Initial boiler plate project

This commit is contained in:
2024-09-24 03:52:46 +00:00
parent 6120b2d6c3
commit 154b93e267
10034 changed files with 2079352 additions and 2 deletions

34
node_modules/next/dist/esm/build/templates/app-page.js generated vendored Normal file
View File

@ -0,0 +1,34 @@
"TURBOPACK { transition: next-ssr }";
import { AppPageRouteModule } from "../../server/future/route-modules/app-page/module.compiled";
import { RouteKind } from "../../server/future/route-kind";
// We inject the tree and pages here so that we can use them in the route
// module.
// INJECT:tree
// INJECT:pages
export { tree, pages };
export { default as GlobalError } from "VAR_MODULE_GLOBAL_ERROR";
// INJECT:__next_app_require__
// INJECT:__next_app_load_chunk__
export const originalPathname = "VAR_ORIGINAL_PATHNAME";
export const __next_app__ = {
require: __next_app_require__,
loadChunk: __next_app_load_chunk__
};
export * from "../../server/app-render/entry-base";
// Create and export the route module that will be consumed.
export const routeModule = new AppPageRouteModule({
definition: {
kind: RouteKind.APP_PAGE,
page: "VAR_DEFINITION_PAGE",
pathname: "VAR_DEFINITION_PATHNAME",
// The following aren't used in production.
bundlePath: "",
filename: "",
appPaths: []
},
userland: {
loaderTree: tree
}
});
//# sourceMappingURL=app-page.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/build/templates/app-page.ts"],"names":["AppPageRouteModule","RouteKind","tree","pages","default","GlobalError","originalPathname","__next_app__","require","__next_app_require__","loadChunk","__next_app_load_chunk__","routeModule","definition","kind","APP_PAGE","page","pathname","bundlePath","filename","appPaths","userland","loaderTree"],"mappings":"AAEE;AACF,SAASA,kBAAkB,QAAQ,6DAA4D;AAC/F,SAASC,SAAS,QAAQ,iCAAgC;AAW1D,yEAAyE;AACzE,UAAU;AACV,cAAc;AACd,eAAe;AAEf,SAASC,IAAI,EAAEC,KAAK,GAAE;AAEtB,SAASC,WAAWC,WAAW,QAAQ,0BAAyB;AAMhE,8BAA8B;AAC9B,iCAAiC;AAEjC,OAAO,MAAMC,mBAAmB,wBAAuB;AACvD,OAAO,MAAMC,eAAe;IAC1BC,SAASC;IACTC,WAAWC;AACb,EAAC;AAED,cAAc,qCAAoC;AAElD,4DAA4D;AAC5D,OAAO,MAAMC,cAAc,IAAIZ,mBAAmB;IAChDa,YAAY;QACVC,MAAMb,UAAUc,QAAQ;QACxBC,MAAM;QACNC,UAAU;QACV,2CAA2C;QAC3CC,YAAY;QACZC,UAAU;QACVC,UAAU,EAAE;IACd;IACAC,UAAU;QACRC,YAAYpB;IACd;AACF,GAAE"}

View File

@ -0,0 +1,33 @@
import { AppRouteRouteModule } from "../../server/future/route-modules/app-route/module.compiled";
import { RouteKind } from "../../server/future/route-kind";
import { patchFetch as _patchFetch } from "../../server/lib/patch-fetch";
import * as userland from "VAR_USERLAND";
// We inject the nextConfigOutput here so that we can use them in the route
// module.
// INJECT:nextConfigOutput
const routeModule = new AppRouteRouteModule({
definition: {
kind: RouteKind.APP_ROUTE,
page: "VAR_DEFINITION_PAGE",
pathname: "VAR_DEFINITION_PATHNAME",
filename: "VAR_DEFINITION_FILENAME",
bundlePath: "VAR_DEFINITION_BUNDLE_PATH"
},
resolvedPagePath: "VAR_RESOLVED_PAGE_PATH",
nextConfigOutput,
userland
});
// Pull out the exports that we need to expose from the module. This should
// be eliminated when we've moved the other routes to the new format. These
// are used to hook into the route.
const { requestAsyncStorage, staticGenerationAsyncStorage, serverHooks } = routeModule;
const originalPathname = "VAR_ORIGINAL_PATHNAME";
function patchFetch() {
return _patchFetch({
serverHooks,
staticGenerationAsyncStorage
});
}
export { routeModule, requestAsyncStorage, staticGenerationAsyncStorage, serverHooks, originalPathname, patchFetch, };
//# sourceMappingURL=app-route.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/build/templates/app-route.ts"],"names":["AppRouteRouteModule","RouteKind","patchFetch","_patchFetch","userland","routeModule","definition","kind","APP_ROUTE","page","pathname","filename","bundlePath","resolvedPagePath","nextConfigOutput","requestAsyncStorage","staticGenerationAsyncStorage","serverHooks","originalPathname"],"mappings":"AAAA,SACEA,mBAAmB,QAEd,8DAA6D;AACpE,SAASC,SAAS,QAAQ,iCAAgC;AAC1D,SAASC,cAAcC,WAAW,QAAQ,+BAA8B;AAExE,YAAYC,cAAc,eAAc;AAOxC,2EAA2E;AAC3E,UAAU;AACV,0BAA0B;AAE1B,MAAMC,cAAc,IAAIL,oBAAoB;IAC1CM,YAAY;QACVC,MAAMN,UAAUO,SAAS;QACzBC,MAAM;QACNC,UAAU;QACVC,UAAU;QACVC,YAAY;IACd;IACAC,kBAAkB;IAClBC;IACAV;AACF;AAEA,2EAA2E;AAC3E,2EAA2E;AAC3E,mCAAmC;AACnC,MAAM,EAAEW,mBAAmB,EAAEC,4BAA4B,EAAEC,WAAW,EAAE,GACtEZ;AAEF,MAAMa,mBAAmB;AAEzB,SAAShB;IACP,OAAOC,YAAY;QAAEc;QAAaD;IAA6B;AACjE;AAEA,SACEX,WAAW,EACXU,mBAAmB,EACnBC,4BAA4B,EAC5BC,WAAW,EACXC,gBAAgB,EAChBhB,UAAU,KACX"}

View File

@ -0,0 +1,7 @@
import { EdgeRouteModuleWrapper } from "../../server/web/edge-route-module-wrapper";
// Import the userland code.
import * as module from "VAR_USERLAND";
export const ComponentMod = module;
export default EdgeRouteModuleWrapper.wrap(module.routeModule);
//# sourceMappingURL=edge-app-route.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/build/templates/edge-app-route.ts"],"names":["EdgeRouteModuleWrapper","module","ComponentMod","wrap","routeModule"],"mappings":"AAAA,SAASA,sBAAsB,QAAQ,6CAA4C;AAEnF,4BAA4B;AAC5B,YAAYC,YAAY,eAAc;AAEtC,OAAO,MAAMC,eAAeD,OAAM;AAElC,eAAeD,uBAAuBG,IAAI,CAACF,OAAOG,WAAW,EAAC"}

View File

@ -0,0 +1,70 @@
var _self___RSC_MANIFEST;
import "../../server/web/globals";
import { adapter } from "../../server/web/adapter";
import { getRender } from "../webpack/loaders/next-edge-ssr-loader/render";
import { IncrementalCache } from "../../server/lib/incremental-cache";
import { renderToHTMLOrFlight as renderToHTML } from "../../server/app-render/app-render";
import * as pageMod from "VAR_USERLAND";
import { PAGE_TYPES } from "../../lib/page-types";
import { setReferenceManifestsSingleton } from "../../server/app-render/encryption-utils";
import { createServerModuleMap } from "../../server/app-render/action-utils";
// OPTIONAL_IMPORT:incrementalCacheHandler
const Document = null;
const appMod = null;
const errorMod = null;
const error500Mod = null;
// INJECT:sriEnabled
// INJECT:isServerComponent
// INJECT:dev
// INJECT:serverActions
// INJECT:nextConfig
const maybeJSONParse = (str)=>str ? JSON.parse(str) : undefined;
const buildManifest = self.__BUILD_MANIFEST;
const reactLoadableManifest = maybeJSONParse(self.__REACT_LOADABLE_MANIFEST);
const rscManifest = (_self___RSC_MANIFEST = self.__RSC_MANIFEST) == null ? void 0 : _self___RSC_MANIFEST["VAR_PAGE"];
const rscServerManifest = maybeJSONParse(self.__RSC_SERVER_MANIFEST);
const subresourceIntegrityManifest = sriEnabled ? maybeJSONParse(self.__SUBRESOURCE_INTEGRITY_MANIFEST) : undefined;
const nextFontManifest = maybeJSONParse(self.__NEXT_FONT_MANIFEST);
const interceptionRouteRewrites = maybeJSONParse(self.__INTERCEPTION_ROUTE_REWRITE_MANIFEST) ?? [];
if (rscManifest && rscServerManifest) {
setReferenceManifestsSingleton({
clientReferenceManifest: rscManifest,
serverActionsManifest: rscServerManifest,
serverModuleMap: createServerModuleMap({
serverActionsManifest: rscServerManifest,
pageName: "VAR_PAGE"
})
});
}
const render = getRender({
pagesType: PAGE_TYPES.APP,
dev,
page: "VAR_PAGE",
appMod,
pageMod,
errorMod,
error500Mod,
Document,
buildManifest,
renderToHTML,
reactLoadableManifest,
clientReferenceManifest: isServerComponent ? rscManifest : null,
serverActionsManifest: isServerComponent ? rscServerManifest : null,
serverActions: isServerComponent ? serverActions : undefined,
subresourceIntegrityManifest,
config: nextConfig,
buildId: process.env.__NEXT_BUILD_ID,
nextFontManifest,
incrementalCacheHandler,
interceptionRouteRewrites
});
export const ComponentMod = pageMod;
export default function nHandler(opts) {
return adapter({
...opts,
IncrementalCache,
handler: render
});
}
//# sourceMappingURL=edge-ssr-app.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/build/templates/edge-ssr-app.ts"],"names":["self","adapter","getRender","IncrementalCache","renderToHTMLOrFlight","renderToHTML","pageMod","PAGE_TYPES","setReferenceManifestsSingleton","createServerModuleMap","Document","appMod","errorMod","error500Mod","maybeJSONParse","str","JSON","parse","undefined","buildManifest","__BUILD_MANIFEST","reactLoadableManifest","__REACT_LOADABLE_MANIFEST","rscManifest","__RSC_MANIFEST","rscServerManifest","__RSC_SERVER_MANIFEST","subresourceIntegrityManifest","sriEnabled","__SUBRESOURCE_INTEGRITY_MANIFEST","nextFontManifest","__NEXT_FONT_MANIFEST","interceptionRouteRewrites","__INTERCEPTION_ROUTE_REWRITE_MANIFEST","clientReferenceManifest","serverActionsManifest","serverModuleMap","pageName","render","pagesType","APP","dev","page","isServerComponent","serverActions","config","nextConfig","buildId","process","env","__NEXT_BUILD_ID","incrementalCacheHandler","ComponentMod","nHandler","opts","handler"],"mappings":"IAwCoBA;AAxCpB,OAAO,2BAA0B;AACjC,SAASC,OAAO,QAAQ,2BAA0B;AAClD,SAASC,SAAS,QAAQ,iDAAgD;AAC1E,SAASC,gBAAgB,QAAQ,qCAAoC;AAErE,SAASC,wBAAwBC,YAAY,QAAQ,qCAAoC;AACzF,YAAYC,aAAa,eAAc;AAMvC,SAASC,UAAU,QAAQ,uBAAsB;AACjD,SAASC,8BAA8B,QAAQ,2CAA0C;AACzF,SAASC,qBAAqB,QAAQ,uCAAsC;AAG5E,0CAA0C;AAE1C,MAAMC,WAAyB;AAC/B,MAAMC,SAAS;AACf,MAAMC,WAAW;AACjB,MAAMC,cAAc;AAQpB,oBAAoB;AACpB,2BAA2B;AAC3B,aAAa;AACb,uBAAuB;AACvB,oBAAoB;AAEpB,MAAMC,iBAAiB,CAACC,MAAkBA,MAAMC,KAAKC,KAAK,CAACF,OAAOG;AAElE,MAAMC,gBAA+BnB,KAAKoB,gBAAgB;AAC1D,MAAMC,wBAAwBP,eAAed,KAAKsB,yBAAyB;AAC3E,MAAMC,eAAcvB,uBAAAA,KAAKwB,cAAc,qBAAnBxB,oBAAqB,CAAC,WAAW;AACrD,MAAMyB,oBAAoBX,eAAed,KAAK0B,qBAAqB;AACnE,MAAMC,+BAA+BC,aACjCd,eAAed,KAAK6B,gCAAgC,IACpDX;AACJ,MAAMY,mBAAmBhB,eAAed,KAAK+B,oBAAoB;AAEjE,MAAMC,4BACJlB,eAAed,KAAKiC,qCAAqC,KAAK,EAAE;AAElE,IAAIV,eAAeE,mBAAmB;IACpCjB,+BAA+B;QAC7B0B,yBAAyBX;QACzBY,uBAAuBV;QACvBW,iBAAiB3B,sBAAsB;YACrC0B,uBAAuBV;YACvBY,UAAU;QACZ;IACF;AACF;AAEA,MAAMC,SAASpC,UAAU;IACvBqC,WAAWhC,WAAWiC,GAAG;IACzBC;IACAC,MAAM;IACN/B;IACAL;IACAM;IACAC;IACAH;IACAS;IACAd;IACAgB;IACAa,yBAAyBS,oBAAoBpB,cAAc;IAC3DY,uBAAuBQ,oBAAoBlB,oBAAoB;IAC/DmB,eAAeD,oBAAoBC,gBAAgB1B;IACnDS;IACAkB,QAAQC;IACRC,SAASC,QAAQC,GAAG,CAACC,eAAe;IACpCpB;IACAqB;IACAnB;AACF;AAEA,OAAO,MAAMoB,eAAe9C,QAAO;AAEnC,eAAe,SAAS+C,SAASC,IAA4C;IAC3E,OAAOrD,QAAQ;QACb,GAAGqD,IAAI;QACPnD;QACAoD,SAASjB;IACX;AACF"}

88
node_modules/next/dist/esm/build/templates/edge-ssr.js generated vendored Normal file
View File

@ -0,0 +1,88 @@
import "../../server/web/globals";
import { adapter } from "../../server/web/adapter";
import { getRender } from "../webpack/loaders/next-edge-ssr-loader/render";
import { IncrementalCache } from "../../server/lib/incremental-cache";
import Document from "VAR_MODULE_DOCUMENT";
import * as appMod from "VAR_MODULE_APP";
import * as userlandPage from "VAR_USERLAND";
import * as userlandErrorPage from "VAR_MODULE_GLOBAL_ERROR";
// OPTIONAL_IMPORT:* as userland500Page
// OPTIONAL_IMPORT:incrementalCacheHandler
// TODO: re-enable this once we've refactored to use implicit matches
// const renderToHTML = undefined
import { renderToHTML } from "../../server/render";
import RouteModule from "../../server/future/route-modules/pages/module";
// INJECT:pagesType
// INJECT:sriEnabled
// INJECT:dev
// INJECT:nextConfig
// INJECT:pageRouteModuleOptions
// INJECT:errorRouteModuleOptions
// INJECT:user500RouteModuleOptions
const pageMod = {
...userlandPage,
routeModule: new RouteModule({
...pageRouteModuleOptions,
components: {
App: appMod.default,
Document
},
userland: userlandPage
})
};
const errorMod = {
...userlandErrorPage,
routeModule: new RouteModule({
...errorRouteModuleOptions,
components: {
App: appMod.default,
Document
},
userland: userlandErrorPage
})
};
// FIXME: this needs to be made compatible with the template
const error500Mod = userland500Page ? {
...userland500Page,
routeModule: new RouteModule({
...user500RouteModuleOptions,
components: {
App: appMod.default,
Document
},
userland: userland500Page
})
} : null;
const maybeJSONParse = (str)=>str ? JSON.parse(str) : undefined;
const buildManifest = self.__BUILD_MANIFEST;
const reactLoadableManifest = maybeJSONParse(self.__REACT_LOADABLE_MANIFEST);
const subresourceIntegrityManifest = sriEnabled ? maybeJSONParse(self.__SUBRESOURCE_INTEGRITY_MANIFEST) : undefined;
const nextFontManifest = maybeJSONParse(self.__NEXT_FONT_MANIFEST);
const render = getRender({
pagesType,
dev,
page: "VAR_PAGE",
appMod,
pageMod,
errorMod,
error500Mod,
Document,
buildManifest,
renderToHTML,
reactLoadableManifest,
subresourceIntegrityManifest,
config: nextConfig,
buildId: process.env.__NEXT_BUILD_ID,
nextFontManifest,
incrementalCacheHandler
});
export const ComponentMod = pageMod;
export default function nHandler(opts) {
return adapter({
...opts,
IncrementalCache,
handler: render
});
}
//# sourceMappingURL=edge-ssr.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/build/templates/edge-ssr.ts"],"names":["adapter","getRender","IncrementalCache","Document","appMod","userlandPage","userlandErrorPage","renderToHTML","RouteModule","pageMod","routeModule","pageRouteModuleOptions","components","App","default","userland","errorMod","errorRouteModuleOptions","error500Mod","userland500Page","user500RouteModuleOptions","maybeJSONParse","str","JSON","parse","undefined","buildManifest","self","__BUILD_MANIFEST","reactLoadableManifest","__REACT_LOADABLE_MANIFEST","subresourceIntegrityManifest","sriEnabled","__SUBRESOURCE_INTEGRITY_MANIFEST","nextFontManifest","__NEXT_FONT_MANIFEST","render","pagesType","dev","page","config","nextConfig","buildId","process","env","__NEXT_BUILD_ID","incrementalCacheHandler","ComponentMod","nHandler","opts","handler"],"mappings":"AAAA,OAAO,2BAA0B;AACjC,SAASA,OAAO,QAAQ,2BAA0B;AAClD,SAASC,SAAS,QAAQ,iDAAgD;AAC1E,SAASC,gBAAgB,QAAQ,qCAAoC;AAErE,OAAOC,cAAc,sBAAqB;AAC1C,YAAYC,YAAY,iBAAgB;AACxC,YAAYC,kBAAkB,eAAc;AAC5C,YAAYC,uBAAuB,0BAAyB;AAI5D,uCAAuC;AACvC,0CAA0C;AAE1C,qEAAqE;AACrE,iCAAiC;AAEjC,SAASC,YAAY,QAAQ,sBAAqB;AAClD,OAAOC,iBAAiB,iDAAgD;AAexE,mBAAmB;AACnB,oBAAoB;AACpB,aAAa;AACb,oBAAoB;AACpB,gCAAgC;AAChC,iCAAiC;AACjC,mCAAmC;AAEnC,MAAMC,UAAU;IACd,GAAGJ,YAAY;IACfK,aAAa,IAAIF,YAAY;QAC3B,GAAGG,sBAAsB;QACzBC,YAAY;YACVC,KAAKT,OAAOU,OAAO;YACnBX;QACF;QACAY,UAAUV;IACZ;AACF;AAEA,MAAMW,WAAW;IACf,GAAGV,iBAAiB;IACpBI,aAAa,IAAIF,YAAY;QAC3B,GAAGS,uBAAuB;QAC1BL,YAAY;YACVC,KAAKT,OAAOU,OAAO;YACnBX;QACF;QACAY,UAAUT;IACZ;AACF;AAEA,4DAA4D;AAC5D,MAAMY,cAAcC,kBAChB;IACE,GAAGA,eAAe;IAClBT,aAAa,IAAIF,YAAY;QAC3B,GAAGY,yBAAyB;QAC5BR,YAAY;YACVC,KAAKT,OAAOU,OAAO;YACnBX;QACF;QACAY,UAAUI;IACZ;AACF,IACA;AAEJ,MAAME,iBAAiB,CAACC,MAAkBA,MAAMC,KAAKC,KAAK,CAACF,OAAOG;AAElE,MAAMC,gBAA+BC,KAAKC,gBAAgB;AAC1D,MAAMC,wBAAwBR,eAAeM,KAAKG,yBAAyB;AAC3E,MAAMC,+BAA+BC,aACjCX,eAAeM,KAAKM,gCAAgC,IACpDR;AACJ,MAAMS,mBAAmBb,eAAeM,KAAKQ,oBAAoB;AAEjE,MAAMC,SAASnC,UAAU;IACvBoC;IACAC;IACAC,MAAM;IACNnC;IACAK;IACAO;IACAE;IACAf;IACAuB;IACAnB;IACAsB;IACAE;IACAS,QAAQC;IACRC,SAASC,QAAQC,GAAG,CAACC,eAAe;IACpCX;IACAY;AACF;AAEA,OAAO,MAAMC,eAAetC,QAAO;AAEnC,eAAe,SAASuC,SAASC,IAA4C;IAC3E,OAAOjD,QAAQ;QACb,GAAGiD,IAAI;QACP/C;QACAgD,SAASd;IACX;AACF"}

26
node_modules/next/dist/esm/build/templates/helpers.js generated vendored Normal file
View File

@ -0,0 +1,26 @@
/**
* Hoists a name from a module or promised module.
*
* @param module the module to hoist the name from
* @param name the name to hoist
* @returns the value on the module (or promised module)
*/ export function hoist(module, name) {
// If the name is available in the module, return it.
if (name in module) {
return module[name];
}
// If a property called `then` exists, assume it's a promise and
// return a promise that resolves to the name.
if ("then" in module && typeof module.then === "function") {
return module.then((mod)=>hoist(mod, name));
}
// If we're trying to hoise the default export, and the module is a function,
// return the module itself.
if (typeof module === "function" && name === "default") {
return module;
}
// Otherwise, return undefined.
return undefined;
}
//# sourceMappingURL=helpers.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/build/templates/helpers.ts"],"names":["hoist","module","name","then","mod","undefined"],"mappings":"AAAA;;;;;;CAMC,GACD,OAAO,SAASA,MAAMC,MAAW,EAAEC,IAAY;IAC7C,qDAAqD;IACrD,IAAIA,QAAQD,QAAQ;QAClB,OAAOA,MAAM,CAACC,KAAK;IACrB;IAEA,gEAAgE;IAChE,8CAA8C;IAC9C,IAAI,UAAUD,UAAU,OAAOA,OAAOE,IAAI,KAAK,YAAY;QACzD,OAAOF,OAAOE,IAAI,CAAC,CAACC,MAAaJ,MAAMI,KAAKF;IAC9C;IAEA,6EAA6E;IAC7E,4BAA4B;IAC5B,IAAI,OAAOD,WAAW,cAAcC,SAAS,WAAW;QACtD,OAAOD;IACT;IAEA,+BAA+B;IAC/B,OAAOI;AACT"}

View File

@ -0,0 +1,21 @@
import "../../server/web/globals";
import { adapter } from "../../server/web/adapter";
// Import the userland code.
import * as _mod from "VAR_USERLAND";
const mod = {
..._mod
};
const handler = mod.middleware || mod.default;
const page = "VAR_DEFINITION_PAGE";
if (typeof handler !== "function") {
throw new Error(`The Middleware "${page}" must export a \`middleware\` or a \`default\` function`);
}
export default function nHandler(opts) {
return adapter({
...opts,
page,
handler
});
}
//# sourceMappingURL=middleware.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/build/templates/middleware.ts"],"names":["adapter","_mod","mod","handler","middleware","default","page","Error","nHandler","opts"],"mappings":"AAEA,OAAO,2BAA0B;AAEjC,SAASA,OAAO,QAAQ,2BAA0B;AAElD,4BAA4B;AAC5B,YAAYC,UAAU,eAAc;AAEpC,MAAMC,MAAM;IAAE,GAAGD,IAAI;AAAC;AACtB,MAAME,UAAUD,IAAIE,UAAU,IAAIF,IAAIG,OAAO;AAE7C,MAAMC,OAAO;AAEb,IAAI,OAAOH,YAAY,YAAY;IACjC,MAAM,IAAII,MACR,CAAC,gBAAgB,EAAED,KAAK,wDAAwD,CAAC;AAErF;AAEA,eAAe,SAASE,SACtBC,IAAmE;IAEnE,OAAOT,QAAQ;QACb,GAAGS,IAAI;QACPH;QACAH;IACF;AACF"}

View File

@ -0,0 +1,23 @@
import { PagesAPIRouteModule } from "../../server/future/route-modules/pages-api/module.compiled";
import { RouteKind } from "../../server/future/route-kind";
import { hoist } from "./helpers";
// Import the userland code.
import * as userland from "VAR_USERLAND";
// Re-export the handler (should be the default export).
export default hoist(userland, "default");
// Re-export config.
export const config = hoist(userland, "config");
// Create and export the route module that will be consumed.
export const routeModule = new PagesAPIRouteModule({
definition: {
kind: RouteKind.PAGES_API,
page: "VAR_DEFINITION_PAGE",
pathname: "VAR_DEFINITION_PATHNAME",
// The following aren't used in production.
bundlePath: "",
filename: ""
},
userland
});
//# sourceMappingURL=pages-api.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/build/templates/pages-api.ts"],"names":["PagesAPIRouteModule","RouteKind","hoist","userland","config","routeModule","definition","kind","PAGES_API","page","pathname","bundlePath","filename"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,8DAA6D;AACjG,SAASC,SAAS,QAAQ,iCAAgC;AAE1D,SAASC,KAAK,QAAQ,YAAW;AAEjC,4BAA4B;AAC5B,YAAYC,cAAc,eAAc;AAExC,wDAAwD;AACxD,eAAeD,MAAMC,UAAU,WAAU;AAEzC,oBAAoB;AACpB,OAAO,MAAMC,SAASF,MAAMC,UAAU,UAAS;AAE/C,4DAA4D;AAC5D,OAAO,MAAME,cAAc,IAAIL,oBAAoB;IACjDM,YAAY;QACVC,MAAMN,UAAUO,SAAS;QACzBC,MAAM;QACNC,UAAU;QACV,2CAA2C;QAC3CC,YAAY;QACZC,UAAU;IACZ;IACAT;AACF,GAAE"}

View File

@ -0,0 +1,20 @@
import "../../server/web/globals";
import { adapter } from "../../server/web/adapter";
import { IncrementalCache } from "../../server/lib/incremental-cache";
import { wrapApiHandler } from "../../server/api-utils";
// Import the userland code.
import handler from "VAR_USERLAND";
const page = "VAR_DEFINITION_PAGE";
if (typeof handler !== "function") {
throw new Error(`The Edge Function "pages${page}" must export a \`default\` function`);
}
export default function(opts) {
return adapter({
...opts,
IncrementalCache,
page: "VAR_DEFINITION_PATHNAME",
handler: wrapApiHandler(page, handler)
});
}
//# sourceMappingURL=pages-edge-api.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/build/templates/pages-edge-api.ts"],"names":["adapter","IncrementalCache","wrapApiHandler","handler","page","Error","opts"],"mappings":"AAEA,OAAO,2BAA0B;AAEjC,SAASA,OAAO,QAAQ,2BAA0B;AAClD,SAASC,gBAAgB,QAAQ,qCAAoC;AACrE,SAASC,cAAc,QAAQ,yBAAwB;AAEvD,4BAA4B;AAC5B,OAAOC,aAAa,eAAc;AAElC,MAAMC,OAAO;AAEb,IAAI,OAAOD,YAAY,YAAY;IACjC,MAAM,IAAIE,MACR,CAAC,wBAAwB,EAAED,KAAK,oCAAoC,CAAC;AAEzE;AAEA,eAAe,SACbE,IAAmE;IAEnE,OAAON,QAAQ;QACb,GAAGM,IAAI;QACPL;QACAG,MAAM;QACND,SAASD,eAAeE,MAAMD;IAChC;AACF"}

40
node_modules/next/dist/esm/build/templates/pages.js generated vendored Normal file
View File

@ -0,0 +1,40 @@
import { PagesRouteModule } from "../../server/future/route-modules/pages/module.compiled";
import { RouteKind } from "../../server/future/route-kind";
import { hoist } from "./helpers";
// Import the app and document modules.
import Document from "VAR_MODULE_DOCUMENT";
import App from "VAR_MODULE_APP";
// Import the userland code.
import * as userland from "VAR_USERLAND";
// Re-export the component (should be the default export).
export default hoist(userland, "default");
// Re-export methods.
export const getStaticProps = hoist(userland, "getStaticProps");
export const getStaticPaths = hoist(userland, "getStaticPaths");
export const getServerSideProps = hoist(userland, "getServerSideProps");
export const config = hoist(userland, "config");
export const reportWebVitals = hoist(userland, "reportWebVitals");
// Re-export legacy methods.
export const unstable_getStaticProps = hoist(userland, "unstable_getStaticProps");
export const unstable_getStaticPaths = hoist(userland, "unstable_getStaticPaths");
export const unstable_getStaticParams = hoist(userland, "unstable_getStaticParams");
export const unstable_getServerProps = hoist(userland, "unstable_getServerProps");
export const unstable_getServerSideProps = hoist(userland, "unstable_getServerSideProps");
// Create and export the route module that will be consumed.
export const routeModule = new PagesRouteModule({
definition: {
kind: RouteKind.PAGES,
page: "VAR_DEFINITION_PAGE",
pathname: "VAR_DEFINITION_PATHNAME",
// The following aren't used in production.
bundlePath: "",
filename: ""
},
components: {
App,
Document
},
userland
});
//# sourceMappingURL=pages.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/build/templates/pages.ts"],"names":["PagesRouteModule","RouteKind","hoist","Document","App","userland","getStaticProps","getStaticPaths","getServerSideProps","config","reportWebVitals","unstable_getStaticProps","unstable_getStaticPaths","unstable_getStaticParams","unstable_getServerProps","unstable_getServerSideProps","routeModule","definition","kind","PAGES","page","pathname","bundlePath","filename","components"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,0DAAyD;AAC1F,SAASC,SAAS,QAAQ,iCAAgC;AAC1D,SAASC,KAAK,QAAQ,YAAW;AAEjC,uCAAuC;AACvC,OAAOC,cAAc,sBAAqB;AAC1C,OAAOC,SAAS,iBAAgB;AAEhC,4BAA4B;AAC5B,YAAYC,cAAc,eAAc;AAExC,0DAA0D;AAC1D,eAAeH,MAAMG,UAAU,WAAU;AAEzC,qBAAqB;AACrB,OAAO,MAAMC,iBAAiBJ,MAAMG,UAAU,kBAAiB;AAC/D,OAAO,MAAME,iBAAiBL,MAAMG,UAAU,kBAAiB;AAC/D,OAAO,MAAMG,qBAAqBN,MAAMG,UAAU,sBAAqB;AACvE,OAAO,MAAMI,SAASP,MAAMG,UAAU,UAAS;AAC/C,OAAO,MAAMK,kBAAkBR,MAAMG,UAAU,mBAAkB;AAEjE,4BAA4B;AAC5B,OAAO,MAAMM,0BAA0BT,MACrCG,UACA,2BACD;AACD,OAAO,MAAMO,0BAA0BV,MACrCG,UACA,2BACD;AACD,OAAO,MAAMQ,2BAA2BX,MACtCG,UACA,4BACD;AACD,OAAO,MAAMS,0BAA0BZ,MACrCG,UACA,2BACD;AACD,OAAO,MAAMU,8BAA8Bb,MACzCG,UACA,+BACD;AAED,4DAA4D;AAC5D,OAAO,MAAMW,cAAc,IAAIhB,iBAAiB;IAC9CiB,YAAY;QACVC,MAAMjB,UAAUkB,KAAK;QACrBC,MAAM;QACNC,UAAU;QACV,2CAA2C;QAC3CC,YAAY;QACZC,UAAU;IACZ;IACAC,YAAY;QACVpB;QACAD;IACF;IACAE;AACF,GAAE"}