main repo

This commit is contained in:
Basilosaurusrex
2025-11-24 18:09:40 +01:00
parent b636ee5e70
commit f027651f9b
34146 changed files with 4436636 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
import { getModuleBuildInfo } from "../get-module-build-info";
import { stringifyRequest } from "../../stringify-request";
import { WEBPACK_RESOURCE_QUERIES } from "../../../../lib/constants";
const EdgeAppRouteLoader = function() {
const { page, absolutePagePath, preferredRegion, appDirLoader: appDirLoaderBase64 = "", middlewareConfig: middlewareConfigBase64 = "" } = this.getOptions();
const appDirLoader = Buffer.from(appDirLoaderBase64, "base64").toString();
const middlewareConfig = JSON.parse(Buffer.from(middlewareConfigBase64, "base64").toString());
// Ensure we only run this loader for as a module.
if (!this._module) throw new Error("This loader is only usable as a module");
const buildInfo = getModuleBuildInfo(this._module);
buildInfo.nextEdgeSSR = {
isServerComponent: false,
page: page,
isAppDir: true
};
buildInfo.route = {
page,
absolutePagePath,
preferredRegion,
middlewareConfig
};
const stringifiedPagePath = stringifyRequest(this, absolutePagePath);
const modulePath = `${appDirLoader}${stringifiedPagePath.substring(1, stringifiedPagePath.length - 1)}?${WEBPACK_RESOURCE_QUERIES.edgeSSREntry}`;
return `
import { EdgeRouteModuleWrapper } from 'next/dist/esm/server/web/edge-route-module-wrapper'
import * as module from ${JSON.stringify(modulePath)}
export const ComponentMod = module
export default EdgeRouteModuleWrapper.wrap(module.routeModule)`;
};
export default EdgeAppRouteLoader;
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../../../src/build/webpack/loaders/next-edge-app-route-loader/index.ts"],"names":["getModuleBuildInfo","stringifyRequest","WEBPACK_RESOURCE_QUERIES","EdgeAppRouteLoader","page","absolutePagePath","preferredRegion","appDirLoader","appDirLoaderBase64","middlewareConfig","middlewareConfigBase64","getOptions","Buffer","from","toString","JSON","parse","_module","Error","buildInfo","nextEdgeSSR","isServerComponent","isAppDir","route","stringifiedPagePath","modulePath","substring","length","edgeSSREntry","stringify"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,2BAA0B;AAC7D,SAASC,gBAAgB,QAAQ,0BAAyB;AAG1D,SAASC,wBAAwB,QAAQ,4BAA2B;AAYpE,MAAMC,qBACJ;IACE,MAAM,EACJC,IAAI,EACJC,gBAAgB,EAChBC,eAAe,EACfC,cAAcC,qBAAqB,EAAE,EACrCC,kBAAkBC,yBAAyB,EAAE,EAC9C,GAAG,IAAI,CAACC,UAAU;IAEnB,MAAMJ,eAAeK,OAAOC,IAAI,CAACL,oBAAoB,UAAUM,QAAQ;IACvE,MAAML,mBAAqCM,KAAKC,KAAK,CACnDJ,OAAOC,IAAI,CAACH,wBAAwB,UAAUI,QAAQ;IAGxD,kDAAkD;IAClD,IAAI,CAAC,IAAI,CAACG,OAAO,EAAE,MAAM,IAAIC,MAAM;IAEnC,MAAMC,YAAYnB,mBAAmB,IAAI,CAACiB,OAAO;IAEjDE,UAAUC,WAAW,GAAG;QACtBC,mBAAmB;QACnBjB,MAAMA;QACNkB,UAAU;IACZ;IACAH,UAAUI,KAAK,GAAG;QAChBnB;QACAC;QACAC;QACAG;IACF;IAEA,MAAMe,sBAAsBvB,iBAAiB,IAAI,EAAEI;IACnD,MAAMoB,aAAa,CAAC,EAAElB,aAAa,EAAEiB,oBAAoBE,SAAS,CAChE,GACAF,oBAAoBG,MAAM,GAAG,GAC7B,CAAC,EAAEzB,yBAAyB0B,YAAY,CAAC,CAAC;IAE5C,OAAO,CAAC;;4BAEgB,EAAEb,KAAKc,SAAS,CAACJ,YAAY;;;;kEAIS,CAAC;AACjE;AAEF,eAAetB,mBAAkB"}