deploy: v0.12 fix 存档key名

This commit is contained in:
2026-06-24 03:09:02 +00:00
parent 7a08d49fe3
commit e0a5281119
58743 changed files with 7297269 additions and 39505 deletions
@@ -0,0 +1,11 @@
import type { webpack } from 'next/dist/compiled/webpack/webpack';
export type EdgeAppRouteLoaderQuery = {
absolutePagePath: string;
page: string;
appDirLoader: string;
preferredRegion: string | string[] | undefined;
middlewareConfig: string;
cacheHandlers: string;
};
declare const EdgeAppRouteLoader: webpack.LoaderDefinitionFunction<EdgeAppRouteLoaderQuery>;
export default EdgeAppRouteLoader;
@@ -0,0 +1,51 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return _default;
}
});
const _getmodulebuildinfo = require("../get-module-build-info");
const _stringifyrequest = require("../../stringify-request");
const _constants = require("../../../../lib/constants");
const _loadentrypoint = require("../../../load-entrypoint");
const _ismetadataroute = require("../../../../lib/metadata/is-metadata-route");
const EdgeAppRouteLoader = async function() {
const { page, absolutePagePath, preferredRegion, appDirLoader: appDirLoaderBase64 = '', middlewareConfig: middlewareConfigBase64 = '', cacheHandlers: cacheHandlersStringified } = this.getOptions();
const appDirLoader = Buffer.from(appDirLoaderBase64, 'base64').toString();
const middlewareConfig = JSON.parse(Buffer.from(middlewareConfigBase64, 'base64').toString());
const cacheHandlers = JSON.parse(cacheHandlersStringified || '{}');
if (!cacheHandlers.default) {
cacheHandlers.default = require.resolve('../../../../server/lib/cache-handlers/default.external');
}
// Ensure we only run this loader for as a module.
if (!this._module) throw Object.defineProperty(new Error('This loader is only usable as a module'), "__NEXT_ERROR_CODE", {
value: "E433",
enumerable: false,
configurable: true
});
const buildInfo = (0, _getmodulebuildinfo.getModuleBuildInfo)(this._module);
buildInfo.nextEdgeSSR = {
isServerComponent: !(0, _ismetadataroute.isMetadataRoute)(page),
page: page,
isAppDir: true
};
buildInfo.route = {
page,
absolutePagePath,
preferredRegion,
middlewareConfig
};
const stringifiedPagePath = (0, _stringifyrequest.stringifyRequest)(this, absolutePagePath);
const modulePath = `${appDirLoader}${stringifiedPagePath.substring(1, stringifiedPagePath.length - 1)}?${_constants.WEBPACK_RESOURCE_QUERIES.edgeSSREntry}`;
return await (0, _loadentrypoint.loadEntrypoint)('edge-app-route', {
VAR_USERLAND: modulePath,
VAR_PAGE: page
}, {});
};
const _default = EdgeAppRouteLoader;
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
{"version":3,"sources":["../../../../../src/build/webpack/loaders/next-edge-app-route-loader/index.ts"],"sourcesContent":["import { getModuleBuildInfo } from '../get-module-build-info'\nimport { stringifyRequest } from '../../stringify-request'\nimport type { webpack } from 'next/dist/compiled/webpack/webpack'\nimport { WEBPACK_RESOURCE_QUERIES } from '../../../../lib/constants'\nimport type { ProxyConfig } from '../../../analysis/get-page-static-info'\nimport { loadEntrypoint } from '../../../load-entrypoint'\nimport { isMetadataRoute } from '../../../../lib/metadata/is-metadata-route'\n\nexport type EdgeAppRouteLoaderQuery = {\n absolutePagePath: string\n page: string\n appDirLoader: string\n preferredRegion: string | string[] | undefined\n middlewareConfig: string\n cacheHandlers: string\n}\n\nconst EdgeAppRouteLoader: webpack.LoaderDefinitionFunction<EdgeAppRouteLoaderQuery> =\n async function (this) {\n const {\n page,\n absolutePagePath,\n preferredRegion,\n appDirLoader: appDirLoaderBase64 = '',\n middlewareConfig: middlewareConfigBase64 = '',\n cacheHandlers: cacheHandlersStringified,\n } = this.getOptions()\n\n const appDirLoader = Buffer.from(appDirLoaderBase64, 'base64').toString()\n const middlewareConfig: ProxyConfig = JSON.parse(\n Buffer.from(middlewareConfigBase64, 'base64').toString()\n )\n\n const cacheHandlers = JSON.parse(cacheHandlersStringified || '{}')\n\n if (!cacheHandlers.default) {\n cacheHandlers.default = require.resolve(\n '../../../../server/lib/cache-handlers/default.external'\n )\n }\n\n // Ensure we only run this loader for as a module.\n if (!this._module) throw new Error('This loader is only usable as a module')\n\n const buildInfo = getModuleBuildInfo(this._module)\n\n buildInfo.nextEdgeSSR = {\n isServerComponent: !isMetadataRoute(page), // Needed for 'use cache'.\n page: page,\n isAppDir: true,\n }\n buildInfo.route = {\n page,\n absolutePagePath,\n preferredRegion,\n middlewareConfig,\n }\n\n const stringifiedPagePath = stringifyRequest(this, absolutePagePath)\n const modulePath = `${appDirLoader}${stringifiedPagePath.substring(\n 1,\n stringifiedPagePath.length - 1\n )}?${WEBPACK_RESOURCE_QUERIES.edgeSSREntry}`\n\n return await loadEntrypoint(\n 'edge-app-route',\n {\n VAR_USERLAND: modulePath,\n VAR_PAGE: page,\n },\n {}\n )\n }\n\nexport default EdgeAppRouteLoader\n"],"names":["EdgeAppRouteLoader","page","absolutePagePath","preferredRegion","appDirLoader","appDirLoaderBase64","middlewareConfig","middlewareConfigBase64","cacheHandlers","cacheHandlersStringified","getOptions","Buffer","from","toString","JSON","parse","default","require","resolve","_module","Error","buildInfo","getModuleBuildInfo","nextEdgeSSR","isServerComponent","isMetadataRoute","isAppDir","route","stringifiedPagePath","stringifyRequest","modulePath","substring","length","WEBPACK_RESOURCE_QUERIES","edgeSSREntry","loadEntrypoint","VAR_USERLAND","VAR_PAGE"],"mappings":";;;;+BA0EA;;;eAAA;;;oCA1EmC;kCACF;2BAEQ;gCAEV;iCACC;AAWhC,MAAMA,qBACJ;IACE,MAAM,EACJC,IAAI,EACJC,gBAAgB,EAChBC,eAAe,EACfC,cAAcC,qBAAqB,EAAE,EACrCC,kBAAkBC,yBAAyB,EAAE,EAC7CC,eAAeC,wBAAwB,EACxC,GAAG,IAAI,CAACC,UAAU;IAEnB,MAAMN,eAAeO,OAAOC,IAAI,CAACP,oBAAoB,UAAUQ,QAAQ;IACvE,MAAMP,mBAAgCQ,KAAKC,KAAK,CAC9CJ,OAAOC,IAAI,CAACL,wBAAwB,UAAUM,QAAQ;IAGxD,MAAML,gBAAgBM,KAAKC,KAAK,CAACN,4BAA4B;IAE7D,IAAI,CAACD,cAAcQ,OAAO,EAAE;QAC1BR,cAAcQ,OAAO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