@netlify/plugin-nextjs 4.41.0-alpha-isr-blobs.0 → 4.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/helpers/config.js +10 -2
- package/lib/helpers/edge.js +2 -5
- package/lib/helpers/flags.js +7 -1
- package/lib/helpers/functions.js +3 -1
- package/lib/helpers/functionsMetaData.js +6 -3
- package/lib/index.js +13 -10
- package/lib/templates/blobStorage.js +2 -3
- package/lib/templates/getHandler.js +12 -7
- package/lib/templates/requireHooks.js +5 -5
- package/lib/templates/server.js +4 -1
- package/package.json +4 -5
- package/src/templates/vendor/esm.sh/v91/next@12.2.5/deno/dist/compiled/cookie.js +12 -7
- package/src/templates/vendor/esm.sh/v91/next@12.2.5/deno/dist/server/web/spec-extension/request.js +11 -1
- package/src/templates/vendor/esm.sh/v91/next@12.2.5/deno/dist/server/web/spec-extension/response.js +4 -1
- package/src/templates/vendor/import_map.json +1 -17
- package/lib/templates/blob.js +0 -341
- package/src/templates/vendor/esm.sh/v91/next@12.2.5/deno/dist/server/web/error.js +0 -9
- package/src/templates/vendor/esm.sh/v91/next@12.2.5/deno/dist/server/web/next-url.js +0 -2
- package/src/templates/vendor/esm.sh/v91/next@12.2.5/deno/dist/server/web/spec-extension/cookies.js +0 -2
- package/src/templates/vendor/esm.sh/v91/next@12.2.5/deno/dist/server/web/utils.js +0 -2
- package/src/templates/vendor/esm.sh/v91/next@12.2.5/deno/dist/shared/lib/get-hostname.js +0 -2
- package/src/templates/vendor/esm.sh/v91/next@12.2.5/deno/dist/shared/lib/i18n/detect-domain-locale.js +0 -2
- package/src/templates/vendor/esm.sh/v91/next@12.2.5/deno/dist/shared/lib/i18n/normalize-locale-path.js +0 -2
- package/src/templates/vendor/esm.sh/v91/next@12.2.5/deno/dist/shared/lib/router/utils/add-locale.js +0 -2
- package/src/templates/vendor/esm.sh/v91/next@12.2.5/deno/dist/shared/lib/router/utils/add-path-prefix.js +0 -2
- package/src/templates/vendor/esm.sh/v91/next@12.2.5/deno/dist/shared/lib/router/utils/add-path-suffix.js +0 -2
- package/src/templates/vendor/esm.sh/v91/next@12.2.5/deno/dist/shared/lib/router/utils/format-next-pathname-info.js +0 -2
- package/src/templates/vendor/esm.sh/v91/next@12.2.5/deno/dist/shared/lib/router/utils/get-next-pathname-info.js +0 -2
- package/src/templates/vendor/esm.sh/v91/next@12.2.5/deno/dist/shared/lib/router/utils/parse-path.js +0 -2
- package/src/templates/vendor/esm.sh/v91/next@12.2.5/deno/dist/shared/lib/router/utils/path-has-prefix.js +0 -2
- package/src/templates/vendor/esm.sh/v91/next@12.2.5/deno/dist/shared/lib/router/utils/remove-path-prefix.js +0 -2
- package/src/templates/vendor/esm.sh/v91/next@12.2.5/deno/dist/shared/lib/router/utils/remove-trailing-slash.js +0 -2
package/lib/helpers/config.js
CHANGED
|
@@ -49,9 +49,9 @@ const updateRequiredServerFiles = async (publish, modifiedConfig) => {
|
|
|
49
49
|
await (0, fs_extra_1.writeJSON)(configFile, modifiedConfig);
|
|
50
50
|
};
|
|
51
51
|
exports.updateRequiredServerFiles = updateRequiredServerFiles;
|
|
52
|
-
const resolveModuleRoot = (moduleName) => {
|
|
52
|
+
const resolveModuleRoot = (moduleName, paths = [process.cwd()]) => {
|
|
53
53
|
try {
|
|
54
|
-
return (0, pathe_1.dirname)((0, pathe_1.relative)(process.cwd(), require.resolve(`${moduleName}/package.json`, { paths
|
|
54
|
+
return (0, pathe_1.dirname)((0, pathe_1.relative)(process.cwd(), require.resolve(`${moduleName}/package.json`, { paths })));
|
|
55
55
|
}
|
|
56
56
|
catch {
|
|
57
57
|
return null;
|
|
@@ -89,6 +89,14 @@ const configureHandlerFunctions = async ({ netlifyConfig, publish, ignore = [],
|
|
|
89
89
|
const nextRoot = (0, exports.resolveModuleRoot)('next');
|
|
90
90
|
if (nextRoot) {
|
|
91
91
|
netlifyConfig.functions[functionName].included_files.push(`!${nextRoot}/dist/server/lib/squoosh/**/*.wasm`, `!${nextRoot}/dist/next-server/server/lib/squoosh/**/*.wasm`, `!${nextRoot}/dist/compiled/webpack/bundle4.js`, `!${nextRoot}/dist/compiled/webpack/bundle5.js`);
|
|
92
|
+
// on Next 13.5+ there is no longer statically analyzable import to styled-jsx/style
|
|
93
|
+
// so lambda fails to bundle it. Next require hooks actually try to resolve it
|
|
94
|
+
// and fail if it is not bundled, so we forcefully add it to lambda.
|
|
95
|
+
const styledJsxRoot = (0, exports.resolveModuleRoot)('styled-jsx', [(0, pathe_1.join)(process.cwd(), nextRoot)]);
|
|
96
|
+
if (styledJsxRoot) {
|
|
97
|
+
const styledJsxStyleModulePath = (0, pathe_1.join)(styledJsxRoot, 'style.js');
|
|
98
|
+
netlifyConfig.functions[functionName].included_files.push(styledJsxStyleModulePath);
|
|
99
|
+
}
|
|
92
100
|
}
|
|
93
101
|
excludedModules.forEach((moduleName) => {
|
|
94
102
|
const moduleRoot = (0, exports.resolveModuleRoot)(moduleName);
|
package/lib/helpers/edge.js
CHANGED
|
@@ -197,7 +197,6 @@ exports.getEdgeFunctionPatternForPage = getEdgeFunctionPatternForPage;
|
|
|
197
197
|
*/
|
|
198
198
|
// eslint-disable-next-line max-lines-per-function
|
|
199
199
|
const writeEdgeFunctions = async ({ netlifyConfig, routesManifest, constants: { PACKAGE_PATH = '' }, }) => {
|
|
200
|
-
var _a;
|
|
201
200
|
const generator = await (0, functionsMetaData_1.getPluginVersion)();
|
|
202
201
|
const manifest = {
|
|
203
202
|
functions: [],
|
|
@@ -209,7 +208,6 @@ const writeEdgeFunctions = async ({ netlifyConfig, routesManifest, constants: {
|
|
|
209
208
|
const { publish } = netlifyConfig.build;
|
|
210
209
|
const nextConfigFile = await (0, config_1.getRequiredServerFiles)(publish);
|
|
211
210
|
const nextConfig = nextConfigFile.config;
|
|
212
|
-
const usesAppDir = (_a = nextConfig.experimental) === null || _a === void 0 ? void 0 : _a.appDir;
|
|
213
211
|
await (0, fs_extra_1.copy)(getEdgeTemplatePath('../vendor'), (0, path_1.join)(edgeFunctionRoot, 'vendor'));
|
|
214
212
|
await (0, fs_extra_1.copy)(getEdgeTemplatePath('../edge-shared'), (0, path_1.join)(edgeFunctionRoot, 'edge-shared'));
|
|
215
213
|
await (0, fs_extra_1.writeJSON)((0, path_1.join)(edgeFunctionRoot, 'edge-shared', 'nextConfig.json'), nextConfig);
|
|
@@ -279,8 +277,7 @@ const writeEdgeFunctions = async ({ netlifyConfig, routesManifest, constants: {
|
|
|
279
277
|
function: functionName,
|
|
280
278
|
name: edgeFunctionDefinition.name,
|
|
281
279
|
pattern,
|
|
282
|
-
|
|
283
|
-
cache: usesAppDir ? 'manual' : undefined,
|
|
280
|
+
cache: 'manual',
|
|
284
281
|
generator,
|
|
285
282
|
});
|
|
286
283
|
// pages-dir page routes also have a data route. If there's a match, add an entry mapping that to the function too
|
|
@@ -290,7 +287,7 @@ const writeEdgeFunctions = async ({ netlifyConfig, routesManifest, constants: {
|
|
|
290
287
|
function: functionName,
|
|
291
288
|
name: edgeFunctionDefinition.name,
|
|
292
289
|
pattern: dataRoute,
|
|
293
|
-
cache:
|
|
290
|
+
cache: 'manual',
|
|
294
291
|
generator,
|
|
295
292
|
});
|
|
296
293
|
}
|
package/lib/helpers/flags.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.bundleBasedOnNftFiles = exports.splitApiRoutes = void 0;
|
|
6
|
+
exports.useBlobsForISRAssets = exports.bundleBasedOnNftFiles = exports.splitApiRoutes = void 0;
|
|
7
7
|
const destr_1 = __importDefault(require("destr"));
|
|
8
8
|
const fs_extra_1 = require("fs-extra");
|
|
9
9
|
const pathe_1 = require("pathe");
|
|
@@ -38,3 +38,9 @@ const bundleBasedOnNftFiles = (featureFlags) => {
|
|
|
38
38
|
return isEnabled;
|
|
39
39
|
};
|
|
40
40
|
exports.bundleBasedOnNftFiles = bundleBasedOnNftFiles;
|
|
41
|
+
const useBlobsForISRAssets = (featureFlags) => {
|
|
42
|
+
var _a, _b;
|
|
43
|
+
const isEnabled = (_b = (_a = (0, destr_1.default)(process.env.NEXT_USE_BLOBS_FOR_ISR)) !== null && _a !== void 0 ? _a : featureFlags['next-runtime-use-blobs-for-isr-assets']) !== null && _b !== void 0 ? _b : false;
|
|
44
|
+
return isEnabled;
|
|
45
|
+
};
|
|
46
|
+
exports.useBlobsForISRAssets = useBlobsForISRAssets;
|
package/lib/helpers/functions.js
CHANGED
|
@@ -66,11 +66,13 @@ const generateFunctions = async ({ INTERNAL_FUNCTIONS_SRC, PUBLISH_DIR, PACKAGE_
|
|
|
66
66
|
includedFiles.push(...nfInternalFiles);
|
|
67
67
|
}
|
|
68
68
|
const writeHandler = async (functionName, functionTitle, isODB) => {
|
|
69
|
+
const useHooks = await (0, functionsMetaData_1.useRequireHooks)();
|
|
69
70
|
const handlerSource = (0, getHandler_1.getHandler)({
|
|
70
71
|
isODB,
|
|
71
72
|
publishDir,
|
|
72
73
|
appDir: (0, pathe_1.relative)(functionDir, appDir),
|
|
73
74
|
nextServerModuleRelativeLocation,
|
|
75
|
+
useHooks,
|
|
74
76
|
});
|
|
75
77
|
await (0, fs_extra_1.ensureDir)((0, pathe_1.join)(functionsDir, functionName));
|
|
76
78
|
// write main handler file (standard or ODB)
|
|
@@ -80,7 +82,6 @@ const generateFunctions = async ({ INTERNAL_FUNCTIONS_SRC, PUBLISH_DIR, PACKAGE_
|
|
|
80
82
|
await (0, fs_extra_1.copyFile)((0, pathe_1.join)(__dirname, '..', '..', 'lib', 'templates', 'server.js'), (0, pathe_1.join)(functionsDir, functionName, 'server.js'));
|
|
81
83
|
await (0, fs_extra_1.copyFile)((0, pathe_1.join)(__dirname, '..', '..', 'lib', 'templates', 'requireHooks.js'), (0, pathe_1.join)(functionsDir, functionName, 'requireHooks.js'));
|
|
82
84
|
await (0, fs_extra_1.copyFile)((0, pathe_1.join)(__dirname, '..', '..', 'lib', 'templates', 'handlerUtils.js'), (0, pathe_1.join)(functionsDir, functionName, 'handlerUtils.js'));
|
|
83
|
-
await (0, fs_extra_1.copyFile)((0, pathe_1.join)(__dirname, '..', '..', 'lib', 'templates', 'blob.js'), (0, pathe_1.join)(functionsDir, functionName, 'blob.js'));
|
|
84
85
|
await (0, fs_extra_1.copyFile)((0, pathe_1.join)(__dirname, '..', '..', 'lib', 'templates', 'blobStorage.js'), (0, pathe_1.join)(functionsDir, functionName, 'blobStorage.js'));
|
|
85
86
|
await (0, functionsMetaData_1.writeFunctionConfiguration)({ functionName, functionTitle, functionsDir });
|
|
86
87
|
const nfInternalFiles = await (0, tiny_glob_1.default)((0, pathe_1.join)(functionsDir, functionName, '**'));
|
|
@@ -214,6 +215,7 @@ const getCommonDependencies = async (publish) => {
|
|
|
214
215
|
(0, exports.traceNPMPackage)('follow-redirects', publish),
|
|
215
216
|
// using package.json because otherwise, we'd find some /dist/... path
|
|
216
217
|
(0, exports.traceNPMPackage)('@netlify/functions/package.json', publish),
|
|
218
|
+
(0, exports.traceNPMPackage)('@netlify/blobs/package.json', publish),
|
|
217
219
|
(0, exports.traceNPMPackage)('is-promise', publish),
|
|
218
220
|
]);
|
|
219
221
|
return deps.flat(1);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.writeFunctionConfiguration = exports.getPluginVersion = void 0;
|
|
3
|
+
exports.writeFunctionConfiguration = exports.useRequireHooks = exports.getPluginVersion = void 0;
|
|
4
4
|
const fs_extra_1 = require("fs-extra");
|
|
5
5
|
const pathe_1 = require("pathe");
|
|
6
|
+
const semver_1 = require("semver");
|
|
6
7
|
const constants_1 = require("../constants");
|
|
7
8
|
const config_1 = require("./config");
|
|
8
9
|
const getNextRuntimeVersion = async (packageJsonPath, useNodeModulesPath) => {
|
|
@@ -13,8 +14,8 @@ const getNextRuntimeVersion = async (packageJsonPath, useNodeModulesPath) => {
|
|
|
13
14
|
return useNodeModulesPath ? packagePlugin.version : packagePlugin.dependencies[constants_1.NEXT_PLUGIN];
|
|
14
15
|
};
|
|
15
16
|
const PLUGIN_PACKAGE_PATH = '.netlify/plugins/package.json';
|
|
16
|
-
const nextPluginVersion = async () => {
|
|
17
|
-
const moduleRoot = (0, config_1.resolveModuleRoot)(constants_1.NEXT_PLUGIN);
|
|
17
|
+
const nextPluginVersion = async (module) => {
|
|
18
|
+
const moduleRoot = (0, config_1.resolveModuleRoot)(module || constants_1.NEXT_PLUGIN);
|
|
18
19
|
const nodeModulesPath = moduleRoot ? (0, pathe_1.join)(moduleRoot, 'package.json') : null;
|
|
19
20
|
return ((await getNextRuntimeVersion(nodeModulesPath, true)) ||
|
|
20
21
|
(await getNextRuntimeVersion(PLUGIN_PACKAGE_PATH, false)) ||
|
|
@@ -23,6 +24,8 @@ const nextPluginVersion = async () => {
|
|
|
23
24
|
};
|
|
24
25
|
const getPluginVersion = async () => `${constants_1.NEXT_PLUGIN_NAME}@${await nextPluginVersion()}`;
|
|
25
26
|
exports.getPluginVersion = getPluginVersion;
|
|
27
|
+
const useRequireHooks = async () => (0, semver_1.satisfies)(await nextPluginVersion('next'), '13.3.3 - 13.4.9');
|
|
28
|
+
exports.useRequireHooks = useRequireHooks;
|
|
26
29
|
/**
|
|
27
30
|
* Creates a function configuration file for the given function.
|
|
28
31
|
*
|
package/lib/index.js
CHANGED
|
@@ -109,16 +109,19 @@ const plugin = {
|
|
|
109
109
|
});
|
|
110
110
|
await (0, files_1.movePublicFiles)({ appDir, outdir, publish, basePath });
|
|
111
111
|
if (!(0, destr_1.default)(process.env.SERVE_STATIC_FILES_FROM_ORIGIN)) {
|
|
112
|
+
const useBlobs = (0, flags_1.useBlobsForISRAssets)(featureFlags);
|
|
112
113
|
const { NETLIFY_API_HOST, NETLIFY_API_TOKEN, SITE_ID } = constants;
|
|
113
|
-
const testBlobStorage =
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
114
|
+
const testBlobStorage = useBlobs
|
|
115
|
+
? new blobStorage_1.Blobs({
|
|
116
|
+
authentication: {
|
|
117
|
+
apiURL: `https://${NETLIFY_API_HOST}`,
|
|
118
|
+
token: NETLIFY_API_TOKEN,
|
|
119
|
+
},
|
|
120
|
+
context: `deploy:${process.env.DEPLOY_ID}`,
|
|
121
|
+
siteID: SITE_ID,
|
|
122
|
+
})
|
|
123
|
+
: undefined;
|
|
124
|
+
const netliBlob = testBlobStorage && (await (0, blobStorage_1.isBlobStorageAvailable)(testBlobStorage)) ? testBlobStorage : undefined;
|
|
122
125
|
await (0, files_1.moveStaticPages)({ target, netlifyConfig, nextConfig: { basePath, i18n }, netliBlob });
|
|
123
126
|
}
|
|
124
127
|
await (0, redirects_1.generateStaticRedirects)({
|
|
@@ -155,7 +158,7 @@ const plugin = {
|
|
|
155
158
|
await (0, verification_1.checkForOldFunctions)({ functions });
|
|
156
159
|
await (0, verification_1.checkZipSize)((0, path_1.join)(FUNCTIONS_DIST, `${constants_1.ODB_FUNCTION_NAME}.zip`));
|
|
157
160
|
const nextConfig = await (0, config_1.getNextConfig)({ publish, failBuild });
|
|
158
|
-
const { basePath, appDir, experimental } = nextConfig;
|
|
161
|
+
const { basePath, appDir, experimental, } = nextConfig;
|
|
159
162
|
(0, config_1.generateCustomHeaders)(nextConfig, headers);
|
|
160
163
|
(0, verification_1.warnForProblematicUserRewrites)({ basePath, redirects });
|
|
161
164
|
(0, verification_1.warnForRootRedirects)({ appDir });
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Blobs = exports.getNormalizedBlobKey = exports.getBlobInit = exports.setBlobInit = exports.isBlobStorageAvailable = void 0;
|
|
4
4
|
const buffer_1 = require("buffer");
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
exports.Blobs = Blobs;
|
|
5
|
+
const blobs_1 = require("@netlify/blobs");
|
|
6
|
+
Object.defineProperty(exports, "Blobs", { enumerable: true, get: function () { return blobs_1.Blobs; } });
|
|
8
7
|
const isBlobStorageAvailable = async (netliBlob) => {
|
|
9
8
|
try {
|
|
10
9
|
// request a key that is not present. If it returns `null` then the blob storage is available
|
|
@@ -17,7 +17,7 @@ const { overrideRequireHooks, applyRequireHooks } = require('./requireHooks');
|
|
|
17
17
|
const { getNetlifyNextServer } = require('./server');
|
|
18
18
|
// We return a function and then call `toString()` on it to serialise it as the launcher function
|
|
19
19
|
// eslint-disable-next-line max-lines-per-function
|
|
20
|
-
const makeHandler = ({ conf, app, pageRoot, NextServer, staticManifest = [], blobsManifest = new Set(), mode = 'ssr', }) => {
|
|
20
|
+
const makeHandler = ({ conf, app, pageRoot, NextServer, staticManifest = [], blobsManifest = new Set(), mode = 'ssr', useHooks, }) => {
|
|
21
21
|
var _a;
|
|
22
22
|
// Change working directory into the site root, unless using Nx, which moves the
|
|
23
23
|
// dist directory and handles this itself
|
|
@@ -31,10 +31,15 @@ const makeHandler = ({ conf, app, pageRoot, NextServer, staticManifest = [], blo
|
|
|
31
31
|
require.resolve('./pages.js');
|
|
32
32
|
}
|
|
33
33
|
catch { }
|
|
34
|
+
const { appDir } = conf.experimental;
|
|
34
35
|
// Next 13.4 conditionally uses different React versions and we need to make sure we use the same one
|
|
35
|
-
|
|
36
|
+
// With the release of 13.5 experimental.appDir is no longer used.
|
|
37
|
+
// we will need to check if appDir is set and Next version before running requireHooks
|
|
38
|
+
if (appDir && useHooks)
|
|
39
|
+
overrideRequireHooks(conf.experimental);
|
|
36
40
|
const NetlifyNextServer = getNetlifyNextServer(NextServer);
|
|
37
|
-
|
|
41
|
+
if (appDir && useHooks)
|
|
42
|
+
applyRequireHooks();
|
|
38
43
|
const ONE_YEAR_IN_SECONDS = 31536000;
|
|
39
44
|
(_a = process.env).NODE_ENV || (_a.NODE_ENV = 'production');
|
|
40
45
|
// We don't want to write ISR files to disk in the lambda environment
|
|
@@ -158,7 +163,7 @@ const makeHandler = ({ conf, app, pageRoot, NextServer, staticManifest = [], blo
|
|
|
158
163
|
};
|
|
159
164
|
};
|
|
160
165
|
};
|
|
161
|
-
const getHandler = ({ isODB = false, publishDir = '../../../.next', appDir = '../../..', nextServerModuleRelativeLocation, }) =>
|
|
166
|
+
const getHandler = ({ isODB = false, publishDir = '../../../.next', appDir = '../../..', nextServerModuleRelativeLocation, useHooks, }) =>
|
|
162
167
|
// This is a string, but if you have the right editor plugin it should format as js (e.g. bierner.comment-tagged-templates in VS Code)
|
|
163
168
|
(0, outdent_1.outdent /* javascript */) `
|
|
164
169
|
if (!${JSON.stringify(nextServerModuleRelativeLocation)}) {
|
|
@@ -173,7 +178,7 @@ const getHandler = ({ isODB = false, publishDir = '../../../.next', appDir = '..
|
|
|
173
178
|
const { setBlobInit } = require('./blobStorage')
|
|
174
179
|
// We copy the file here rather than requiring from the node module
|
|
175
180
|
const { Bridge } = require("./bridge");
|
|
176
|
-
const { augmentFsModule, getMaxAge, getMultiValueHeaders, getPrefetchResponse, normalizePath } = require('./handlerUtils')
|
|
181
|
+
const { augmentFsModule, getMaxAge, getMultiValueHeaders, getPrefetchResponse, normalizePath, nextVersionNum } = require('./handlerUtils')
|
|
177
182
|
const { overrideRequireHooks, applyRequireHooks } = require("./requireHooks")
|
|
178
183
|
const { getNetlifyNextServer } = require("./server")
|
|
179
184
|
const NextServer = require(${JSON.stringify(nextServerModuleRelativeLocation)}).default
|
|
@@ -190,7 +195,7 @@ const getHandler = ({ isODB = false, publishDir = '../../../.next', appDir = '..
|
|
|
190
195
|
const path = require("path");
|
|
191
196
|
const pageRoot = path.resolve(path.join(__dirname, "${publishDir}", "server"));
|
|
192
197
|
exports.handler = ${isODB
|
|
193
|
-
? `builder((${makeHandler.toString()})({ conf: config, app: "${appDir}", pageRoot, NextServer, staticManifest, blobsManifest, mode: 'odb' }));`
|
|
194
|
-
: `(${makeHandler.toString()})({ conf: config, app: "${appDir}", pageRoot, NextServer, staticManifest, blobsManifest, mode: 'ssr' });`}
|
|
198
|
+
? `builder((${makeHandler.toString()})({ conf: config, app: "${appDir}", pageRoot, NextServer, staticManifest, blobsManifest, mode: 'odb', useHooks: ${useHooks}}));`
|
|
199
|
+
: `(${makeHandler.toString()})({ conf: config, app: "${appDir}", pageRoot, NextServer, staticManifest, blobsManifest, mode: 'ssr', useHooks: ${useHooks}});`}
|
|
195
200
|
`;
|
|
196
201
|
exports.getHandler = getHandler;
|
|
@@ -10,18 +10,18 @@ exports.applyRequireHooks = exports.overrideRequireHooks = void 0;
|
|
|
10
10
|
const module_1 = __importDefault(require("module"));
|
|
11
11
|
const resolveFilename = module_1.default._resolveFilename;
|
|
12
12
|
const requireHooks = new Map();
|
|
13
|
-
const overrideRequireHooks = (
|
|
14
|
-
setRequireHooks(
|
|
13
|
+
const overrideRequireHooks = (experimental) => {
|
|
14
|
+
setRequireHooks(experimental);
|
|
15
15
|
resolveRequireHooks();
|
|
16
16
|
};
|
|
17
17
|
exports.overrideRequireHooks = overrideRequireHooks;
|
|
18
|
-
const setRequireHooks = (
|
|
18
|
+
const setRequireHooks = (experimental) => {
|
|
19
19
|
requireHooks.set('default', new Map([
|
|
20
20
|
['react', `react`],
|
|
21
21
|
['react/jsx-runtime', `react/jsx-runtime`],
|
|
22
22
|
]));
|
|
23
|
-
if (
|
|
24
|
-
if (
|
|
23
|
+
if (experimental.appDir) {
|
|
24
|
+
if (experimental.serverActions) {
|
|
25
25
|
requireHooks.set('experimental', new Map([
|
|
26
26
|
['react', `next/dist/compiled/react-experimental`],
|
|
27
27
|
['react/jsx-runtime', `next/dist/compiled/react-experimental/jsx-runtime`],
|
package/lib/templates/server.js
CHANGED
|
@@ -51,7 +51,10 @@ const getNetlifyNextServer = (NextServer) => {
|
|
|
51
51
|
// preserve the URL before Next.js mutates it for i18n
|
|
52
52
|
const { url, headers } = req;
|
|
53
53
|
// conditionally use the prebundled React module
|
|
54
|
-
|
|
54
|
+
// PrebundledReact should only apply when appDir is set it falls between the specified Next versions
|
|
55
|
+
const { experimental } = this.nextConfig;
|
|
56
|
+
if (experimental === null || experimental === void 0 ? void 0 : experimental.appDir)
|
|
57
|
+
this.netlifyPrebundleReact(url, this.nextConfig, parsedUrl);
|
|
55
58
|
// intercept on-demand revalidation requests and handle with the Netlify API
|
|
56
59
|
if (headers['x-prerender-revalidate'] && this.netlifyConfig.revalidateToken) {
|
|
57
60
|
// handle on-demand revalidation by purging the ODB cache
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/plugin-nextjs",
|
|
3
|
-
"version": "4.41.0
|
|
3
|
+
"version": "4.41.0",
|
|
4
4
|
"description": "Run Next.js seamlessly on Netlify",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"manifest.yml"
|
|
13
13
|
],
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@netlify/blobs": "^2.
|
|
16
|
-
"@netlify/esbuild": "0.14.39
|
|
15
|
+
"@netlify/blobs": "^2.2.0",
|
|
16
|
+
"@netlify/esbuild": "0.14.39",
|
|
17
17
|
"@netlify/functions": "^1.6.0",
|
|
18
18
|
"@netlify/ipx": "^1.4.5",
|
|
19
19
|
"@vercel/node-bridge": "^2.1.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@delucis/if-env": "^1.1.2",
|
|
42
|
-
"@netlify/build": "^29.
|
|
42
|
+
"@netlify/build": "^29.23.1",
|
|
43
43
|
"@types/fs-extra": "^9.0.13",
|
|
44
44
|
"@types/jest": "^27.4.1",
|
|
45
45
|
"@types/merge-stream": "^1.1.2",
|
|
@@ -55,7 +55,6 @@
|
|
|
55
55
|
"publish:test": "cd .. && npm ci && npm test",
|
|
56
56
|
"clean": "rimraf lib dist-types",
|
|
57
57
|
"build": "run-s build:*",
|
|
58
|
-
"build:blob": "node blob-cjs-build.mjs",
|
|
59
58
|
"build:vendor": "rimraf src/templates/vendor && deno vendor src/templates/vendor.ts --output=src/templates/vendor && patch src/templates/vendor/deno.land/x/html_rewriter@v0.1.0-pre.17/index.ts html_rewriter.patch",
|
|
60
59
|
"build:tsc": "tsc",
|
|
61
60
|
"watch": "tsc --watch",
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
/* esm.sh - esbuild bundle(next@12.2.5/dist/compiled/cookie) deno production */
|
|
2
|
-
var
|
|
3
|
-
/*!
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
var A=Object.create;var S=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var z=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),D=(i,e)=>{for(var a in e)S(i,a,{get:e[a],enumerable:!0})},y=(i,e,a,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of N(e))!q.call(i,s)&&s!==a&&S(i,s,{get:()=>e[s],enumerable:!(l=U(e,s))||l.enumerable});return i},u=(i,e,a)=>(y(i,e,"default"),a&&y(a,e,"default")),g=(i,e,a)=>(a=i!=null?A(O(i)):{},y(e||!i||!i.__esModule?S(a,"default",{value:i,enumerable:!0}):a,i));var _=z((F,T)=>{(()=>{"use strict";typeof __nccwpck_require__<"u"&&(__nccwpck_require__.ab="/_virtual/esm.sh/v91/next@12.2.5/deno/dist/compiled/");var i={};(()=>{var e=i;e.parse=b,e.serialize=k;var a=decodeURIComponent,l=encodeURIComponent,s=/; */,w=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function b(n,d){if(typeof n!="string")throw new TypeError("argument str must be a string");for(var f={},r=d||{},m=n.split(s),c=r.decode||a,t=0;t<m.length;t++){var o=m[t],v=o.indexOf("=");if(!(v<0)){var x=o.substr(0,v).trim(),h=o.substr(++v,o.length).trim();h[0]=='"'&&(h=h.slice(1,-1)),f[x]==null&&(f[x]=C(h,c))}}return f}function k(n,d,f){var r=f||{},m=r.encode||l;if(typeof m!="function")throw new TypeError("option encode is invalid");if(!w.test(n))throw new TypeError("argument name is invalid");var c=m(d);if(c&&!w.test(c))throw new TypeError("argument val is invalid");var t=n+"="+c;if(r.maxAge!=null){var o=r.maxAge-0;if(isNaN(o)||!isFinite(o))throw new TypeError("option maxAge is invalid");t+="; Max-Age="+Math.floor(o)}if(r.domain){if(!w.test(r.domain))throw new TypeError("option domain is invalid");t+="; Domain="+r.domain}if(r.path){if(!w.test(r.path))throw new TypeError("option path is invalid");t+="; Path="+r.path}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");t+="; Expires="+r.expires.toUTCString()}if(r.httpOnly&&(t+="; HttpOnly"),r.secure&&(t+="; Secure"),r.sameSite){var v=typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite;switch(v){case!0:t+="; SameSite=Strict";break;case"lax":t+="; SameSite=Lax";break;case"strict":t+="; SameSite=Strict";break;case"none":t+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return t}function C(n,d){try{return d(n)}catch{return n}}})(),T.exports=i})()});var p={};D(p,{default:()=>M});var I=g(_());u(p,g(_()));var{default:E,...L}=I,M=E!==void 0?E:L;export{M as default};
|
|
3
|
+
/*! Bundled license information:
|
|
4
|
+
|
|
5
|
+
next/dist/compiled/cookie/index.js:
|
|
6
|
+
(*!
|
|
7
|
+
* cookie
|
|
8
|
+
* Copyright(c) 2012-2014 Roman Shtylman
|
|
9
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
10
|
+
* MIT Licensed
|
|
11
|
+
*)
|
|
12
|
+
*/
|
|
13
|
+
//# sourceMappingURL=cookie.js.map
|
package/src/templates/vendor/esm.sh/v91/next@12.2.5/deno/dist/server/web/spec-extension/request.js
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
/* esm.sh - esbuild bundle(next@12.2.5/dist/server/web/spec-extension/request) deno production */
|
|
2
|
-
import
|
|
2
|
+
import * as __0$ from "/v91/next@12.2.5/deno/dist/compiled/cookie.js";
|
|
3
|
+
var require=n=>{const e=m=>typeof m.default<"u"?m.default:m,c=m=>Object.assign({},m);switch(n){case"next/dist/compiled/cookie":return e(__0$);default:throw new Error("module \""+n+"\" not found");}};
|
|
4
|
+
var xe=Object.create;var w=Object.defineProperty;var _e=Object.getOwnPropertyDescriptor;var be=Object.getOwnPropertyNames;var ye=Object.getPrototypeOf,Le=Object.prototype.hasOwnProperty;var we=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var l=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),je=(t,e)=>{for(var r in e)w(t,r,{get:e[r],enumerable:!0})},L=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of be(e))!Le.call(t,i)&&i!==r&&w(t,i,{get:()=>e[i],enumerable:!(s=_e(e,i))||s.enumerable});return t},c=(t,e,r)=>(L(t,e,"default"),r&&L(r,e,"default")),G=(t,e,r)=>(r=t!=null?xe(ye(t)):{},L(e||!t||!t.__esModule?w(r,"default",{value:t,enumerable:!0}):r,t));var Q=l(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});j.detectDomainLocale=qe;function qe(t,e,r){let s;if(t){r&&(r=r.toLowerCase());for(let o of t){var i,n;let u=(i=o.domain)==null?void 0:i.split(":")[0].toLowerCase();if(e===u||r===o.defaultLocale.toLowerCase()||(n=o.locales)!=null&&n.some(h=>h.toLowerCase()===r)){s=o;break}}}return s}});var V=l(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.removeTrailingSlash=Ce;function Ce(t){return t.replace(/\/$/,"")||"/"}});var v=l(C=>{"use strict";Object.defineProperty(C,"__esModule",{value:!0});C.parsePath=Ie;function Ie(t){let e=t.indexOf("#"),r=t.indexOf("?"),s=r>-1&&(e<0||r<e);return s||e>-1?{pathname:t.substring(0,s?r:e),query:s?t.substring(r,e>-1?e:void 0):"",hash:e>-1?t.slice(e):""}:{pathname:t,query:"",hash:""}}});var S=l(I=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0});I.addPathPrefix=Ne;var Se=v();function Ne(t,e){if(!t.startsWith("/")||!e)return t;let{pathname:r,query:s,hash:i}=Se.parsePath(t);return`${e}${r}${s}${i}`}});var X=l(N=>{"use strict";Object.defineProperty(N,"__esModule",{value:!0});N.addPathSuffix=$e;var Re=v();function $e(t,e){if(!t.startsWith("/")||!e)return t;let{pathname:r,query:s,hash:i}=Re.parsePath(t);return`${r}${e}${s}${i}`}});var x=l(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.pathHasPrefix=ke;var Oe=v();function ke(t,e){if(typeof t!="string")return!1;let{pathname:r}=Oe.parsePath(t);return r===e||r.startsWith(e+"/")}});var K=l($=>{"use strict";Object.defineProperty($,"__esModule",{value:!0});$.addLocale=He;var Ae=S(),B=x();function He(t,e,r,s){return e&&e!==r&&(s||!B.pathHasPrefix(t.toLowerCase(),`/${e.toLowerCase()}`)&&!B.pathHasPrefix(t.toLowerCase(),"/api"))?Ae.addPathPrefix(t,`/${e}`):t}});var ee=l(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.formatNextPathnameInfo=Ee;var Ue=V(),Y=S(),Z=X(),Me=K();function Ee(t){let e=Me.addLocale(t.pathname,t.locale,t.buildId?void 0:t.defaultLocale,t.ignorePrefix);return t.buildId&&(e=Z.addPathSuffix(Y.addPathPrefix(e,`/_next/data/${t.buildId}`),t.pathname==="/"?"index.json":".json")),e=Y.addPathPrefix(e,t.basePath),t.trailingSlash?!t.buildId&&!e.endsWith("/")?Z.addPathSuffix(e,"/"):e:Ue.removeTrailingSlash(e)}});var te=l(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.getHostname=Te;function Te(t,e){var r;return(r=!Array.isArray(e?.host)&&e?.host||t.hostname)==null?void 0:r.split(":")[0].toLowerCase()}});var re=l(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});A.normalizeLocalePath=ze;function ze(t,e){let r,s=t.split("/");return(e||[]).some(i=>s[1]&&s[1].toLowerCase()===i.toLowerCase()?(r=i,s.splice(1,1),t=s.join("/")||"/",!0):!1),{pathname:t,detectedLocale:r}}});var se=l(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.removePathPrefix=De;var We=x();function De(t,e){if(We.pathHasPrefix(t,e)){let r=t.slice(e.length);return r.startsWith("/")?r:`/${r}`}return t}});var ae=l(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.getNextPathnameInfo=Qe;var Je=re(),Fe=se(),Ge=x();function Qe(t,e){var r;let{basePath:s,i18n:i,trailingSlash:n}=(r=e.nextConfig)!=null?r:{},o={pathname:t,trailingSlash:t!=="/"?t.endsWith("/"):n};if(s&&Ge.pathHasPrefix(o.pathname,s)&&(o.pathname=Fe.removePathPrefix(o.pathname,s),o.basePath=s),e.parseData===!0&&o.pathname.startsWith("/_next/data/")&&o.pathname.endsWith(".json")){let u=o.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/"),h=u[0];o.pathname=u[1]!=="index"?`/${u.slice(1).join("/")}`:"/",o.buildId=h}if(i){let u=Je.normalizeLocalePath(o.pathname,i.locales);o.locale=u?.detectedLocale,o.pathname=u?.pathname||o.pathname}return o}});var ne=l(E=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0});var Ve=Q(),Xe=ee(),Be=te(),Ke=ae(),a=Symbol("NextURLInternal"),M=class t{constructor(e,r,s){let i,n;typeof r=="object"&&"pathname"in r||typeof r=="string"?(i=r,n=s||{}):n=s||r||{},this[a]={url:oe(e,i??n.base),options:n,basePath:""},this.analyzeUrl()}analyzeUrl(){var e,r,s,i,n;let o=Ke.getNextPathnameInfo(this[a].url.pathname,{nextConfig:this[a].options.nextConfig,parseData:!0});this[a].domainLocale=Ve.detectDomainLocale((e=this[a].options.nextConfig)==null||(r=e.i18n)==null?void 0:r.domains,Be.getHostname(this[a].url,this[a].options.headers));let u=((s=this[a].domainLocale)==null?void 0:s.defaultLocale)||((i=this[a].options.nextConfig)==null||(n=i.i18n)==null?void 0:n.defaultLocale);this[a].url.pathname=o.pathname,this[a].defaultLocale=u;var h;this[a].basePath=(h=o.basePath)!=null?h:"",this[a].buildId=o.buildId;var P;this[a].locale=(P=o.locale)!=null?P:u,this[a].trailingSlash=o.trailingSlash}formatPathname(){return Xe.formatNextPathnameInfo({basePath:this[a].basePath,buildId:this[a].buildId,defaultLocale:this[a].options.forceLocale?void 0:this[a].defaultLocale,locale:this[a].locale,pathname:this[a].url.pathname,trailingSlash:this[a].trailingSlash})}get buildId(){return this[a].buildId}set buildId(e){this[a].buildId=e}get locale(){var e;return(e=this[a].locale)!=null?e:""}set locale(e){var r,s;if(!this[a].locale||!(!((r=this[a].options.nextConfig)==null||(s=r.i18n)==null)&&s.locales.includes(e)))throw new TypeError(`The NextURL configuration includes no locale "${e}"`);this[a].locale=e}get defaultLocale(){return this[a].defaultLocale}get domainLocale(){return this[a].domainLocale}get searchParams(){return this[a].url.searchParams}get host(){return this[a].url.host}set host(e){this[a].url.host=e}get hostname(){return this[a].url.hostname}set hostname(e){this[a].url.hostname=e}get port(){return this[a].url.port}set port(e){this[a].url.port=e}get protocol(){return this[a].url.protocol}set protocol(e){this[a].url.protocol=e}get href(){let e=this.formatPathname();return`${this.protocol}//${this.host}${e}${this[a].url.search}`}set href(e){this[a].url=oe(e),this.analyzeUrl()}get origin(){return this[a].url.origin}get pathname(){return this[a].url.pathname}set pathname(e){this[a].url.pathname=e}get hash(){return this[a].url.hash}set hash(e){this[a].url.hash=e}get search(){return this[a].url.search}set search(e){this[a].url.search=e}get password(){return this[a].url.password}set password(e){this[a].url.password=e}get username(){return this[a].url.username}set username(e){this[a].url.username=e}get basePath(){return this[a].basePath}set basePath(e){this[a].basePath=e.startsWith("/")?e:`/${e}`}toString(){return this.href}toJSON(){return this.href}[Symbol.for("edge-runtime.inspect.custom")](){return{href:this.href,origin:this.origin,protocol:this.protocol,username:this.username,password:this.password,host:this.host,hostname:this.hostname,port:this.port,pathname:this.pathname,search:this.search,searchParams:this.searchParams,hash:this.hash}}clone(){return new t(String(this),this[a].options)}};E.NextURL=M;var ie=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|::1|localhost)/;function oe(t,e){return new URL(String(t).replace(ie,"localhost"),e&&String(e).replace(ie,"localhost"))}});var le=l(p=>{"use strict";Object.defineProperty(p,"__esModule",{value:!0});p.fromNodeHeaders=Ye;p.toNodeHeaders=Ze;p.splitCookiesString=ue;p.validateURL=et;function Ye(t){let e=new Headers;for(let[r,s]of Object.entries(t)){let i=Array.isArray(s)?s:[s];for(let n of i)n!==void 0&&e.append(r,n)}return e}function Ze(t){let e={};if(t)for(let[r,s]of t.entries())e[r]=s,r.toLowerCase()==="set-cookie"&&(e[r]=ue(s));return e}function ue(t){var e=[],r=0,s,i,n,o,u;function h(){for(;r<t.length&&/\s/.test(t.charAt(r));)r+=1;return r<t.length}function P(){return i=t.charAt(r),i!=="="&&i!==";"&&i!==","}for(;r<t.length;){for(s=r,u=!1;h();)if(i=t.charAt(r),i===","){for(n=r,r+=1,h(),o=r;r<t.length&&P();)r+=1;r<t.length&&t.charAt(r)==="="?(u=!0,r=o,e.push(t.substring(s,n)),s=r):r=n+1}else r+=1;(!u||r>=t.length)&&e.push(t.substring(s,t.length))}return e}function et(t){try{return String(new URL(String(t)))}catch(e){throw new Error("URLs is malformed. Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls",{cause:e})}}});var he=l(m=>{"use strict";Object.defineProperty(m,"__esModule",{value:!0});var T=class extends Error{constructor({page:e}){super(`The middleware "${e}" accepts an async API directly with the form:
|
|
5
|
+
|
|
6
|
+
export function middleware(request, event) {
|
|
7
|
+
return NextResponse.redirect('/new-location')
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
Read more: https://nextjs.org/docs/messages/middleware-new-signature
|
|
11
|
+
`)}};m.PageSignatureError=T;var z=class extends Error{constructor(){super("The request.page has been deprecated in favour of `URLPattern`.\n Read more: https://nextjs.org/docs/messages/middleware-request-page\n ")}};m.RemovedPageError=z;var W=class extends Error{constructor(){super("The request.ua has been removed in favour of `userAgent` function.\n Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n ")}};m.RemovedUAError=W});var pe=l(y=>{"use strict";Object.defineProperty(y,"__esModule",{value:!0});var _=tt(we("next/dist/compiled/cookie"));function tt(t){return t&&t.__esModule?t:{default:t}}var rt=t=>(t=Object.assign({},t),t.maxAge&&(t.expires=new Date(Date.now()+t.maxAge*1e3)),t.path==null&&(t.path="/"),t),st=t=>typeof t=="object"?`j:${JSON.stringify(t)}`:String(t),de=(t,e={})=>_.default.serialize(t,"",{expires:new Date(0),path:"/",...e}),ce=t=>{let e=t.headers.get("set-cookie");return e!=null?e.split(", "):[]},fe=t=>t.join(", "),b=class extends Map{constructor(e){let r=typeof e=="string"?_.default.parse(e):{};super(Object.entries(r))}set(e,r,s={}){return super.set(e,_.default.serialize(e,st(r),rt(s)))}[Symbol.for("edge-runtime.inspect.custom")](){return Object.fromEntries(this.entries())}};y.Cookies=b;var D=class extends b{constructor(e){super(e.headers.get("cookie")),this.response=e}get=(...e)=>this.getWithOptions(...e).value;getWithOptions=(...e)=>{let r=super.get(...e);if(typeof r!="string")return{value:r,options:{}};let{[e[0]]:s,...i}=_.default.parse(r);return{value:s,options:i}};set=(...e)=>{let r=super.has(e[0]);super.set(...e);let s=super.get(e[0]);if(typeof s!="string")throw new Error(`Invariant: failed to generate cookie for ${JSON.stringify(e)}`);if(r){let i=fe(ce(this.response).filter(n=>!n.startsWith(`${e[0]}=`)));i?this.response.headers.set("set-cookie",[s,i].join(", ")):this.response.headers.set("set-cookie",s)}else this.response.headers.append("set-cookie",s);return this};delete=(e,r={})=>{let s=super.delete(e);if(s){let i=fe(ce(this.response).filter(o=>!o.startsWith(`${e}=`))),n=de(e,r);this.response.headers.set("set-cookie",[n,i].join(", "))}return s};clear=(e={})=>{let r=Array.from(super.keys()).map(s=>de(s,e)).join(", ");return r&&this.response.headers.set("set-cookie",r),super.clear()}};y.NextCookies=D});var F=l(g=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});g.INTERNALS=void 0;var at=ne(),me=le(),ge=he(),it=pe(),f=Symbol("internal request");g.INTERNALS=f;var J=class extends Request{constructor(e,r={}){let s=typeof e!="string"&&"url"in e?e.url:String(e);me.validateURL(s),super(s,r),this[f]={cookies:new it.NextCookies(this),geo:r.geo||{},ip:r.ip,url:new at.NextURL(s,{headers:me.toNodeHeaders(this.headers),nextConfig:r.nextConfig})}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,geo:this.geo,ip:this.ip,nextUrl:this.nextUrl,url:this.url,bodyUsed:this.bodyUsed,cache:this.cache,credentials:this.credentials,destination:this.destination,headers:Object.fromEntries(this.headers),integrity:this.integrity,keepalive:this.keepalive,method:this.method,mode:this.mode,redirect:this.redirect,referrer:this.referrer,referrerPolicy:this.referrerPolicy,signal:this.signal}}get cookies(){return this[f].cookies}get geo(){return this[f].geo}get ip(){return this[f].ip}get nextUrl(){return this[f].url}get page(){throw new ge.RemovedPageError}get ua(){throw new ge.RemovedUAError}get url(){return this[f].url.toString()}};g.NextRequest=J});var d={};je(d,{INTERNALS:()=>nt,NextRequest:()=>ut,__esModule:()=>ot,default:()=>ht});var ve=G(F());c(d,G(F()));var{__esModule:ot,INTERNALS:nt,NextRequest:ut}=ve,{default:Pe,...lt}=ve,ht=Pe!==void 0?Pe:lt;export{nt as INTERNALS,ut as NextRequest,ot as __esModule,ht as default};
|
|
12
|
+
//# sourceMappingURL=request.js.map
|
package/src/templates/vendor/esm.sh/v91/next@12.2.5/deno/dist/server/web/spec-extension/response.js
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
/* esm.sh - esbuild bundle(next@12.2.5/dist/server/web/spec-extension/response) deno production */
|
|
2
|
-
import
|
|
2
|
+
import * as __0$ from "/v91/next@12.2.5/deno/dist/compiled/cookie.js";
|
|
3
|
+
var require=n=>{const e=m=>typeof m.default<"u"?m.default:m,c=m=>Object.assign({},m);switch(n){case"next/dist/compiled/cookie":return e(__0$);default:throw new Error("module \""+n+"\" not found");}};
|
|
4
|
+
var fe=Object.create;var b=Object.defineProperty;var pe=Object.getOwnPropertyDescriptor;var me=Object.getOwnPropertyNames;var Pe=Object.getPrototypeOf,ve=Object.prototype.hasOwnProperty;var ge=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var u=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),xe=(t,e)=>{for(var r in e)b(t,r,{get:e[r],enumerable:!0})},_=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of me(e))!ve.call(t,o)&&o!==r&&b(t,o,{get:()=>e[o],enumerable:!(s=pe(e,o))||s.enumerable});return t},c=(t,e,r)=>(_(t,e,"default"),r&&_(r,e,"default")),D=(t,e,r)=>(r=t!=null?fe(Pe(t)):{},_(e||!t||!t.__esModule?b(r,"default",{value:t,enumerable:!0}):r,t));var T=u(y=>{"use strict";Object.defineProperty(y,"__esModule",{value:!0});y.detectDomainLocale=_e;function _e(t,e,r){let s;if(t){r&&(r=r.toLowerCase());for(let n of t){var o,i;let l=(o=n.domain)==null?void 0:o.split(":")[0].toLowerCase();if(e===l||r===n.defaultLocale.toLowerCase()||(i=n.locales)!=null&&i.some(h=>h.toLowerCase()===r)){s=n;break}}}return s}});var J=u(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});w.removeTrailingSlash=be;function be(t){return t.replace(/\/$/,"")||"/"}});var m=u(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.parsePath=ye;function ye(t){let e=t.indexOf("#"),r=t.indexOf("?"),s=r>-1&&(e<0||r<e);return s||e>-1?{pathname:t.substring(0,s?r:e),query:s?t.substring(r,e>-1?e:void 0):"",hash:e>-1?t.slice(e):""}:{pathname:t,query:"",hash:""}}});var C=u(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});j.addPathPrefix=Le;var we=m();function Le(t,e){if(!t.startsWith("/")||!e)return t;let{pathname:r,query:s,hash:o}=we.parsePath(t);return`${e}${r}${s}${o}`}});var F=u(I=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0});I.addPathSuffix=Ce;var je=m();function Ce(t,e){if(!t.startsWith("/")||!e)return t;let{pathname:r,query:s,hash:o}=je.parsePath(t);return`${r}${e}${s}${o}`}});var P=u(S=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});S.pathHasPrefix=Se;var Ie=m();function Se(t,e){if(typeof t!="string")return!1;let{pathname:r}=Ie.parsePath(t);return r===e||r.startsWith(e+"/")}});var Q=u(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.addLocale=He;var qe=C(),G=P();function He(t,e,r,s){return e&&e!==r&&(s||!G.pathHasPrefix(t.toLowerCase(),`/${e.toLowerCase()}`)&&!G.pathHasPrefix(t.toLowerCase(),"/api"))?qe.addPathPrefix(t,`/${e}`):t}});var B=u(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.formatNextPathnameInfo=Ne;var Oe=J(),V=C(),X=F(),$e=Q();function Ne(t){let e=$e.addLocale(t.pathname,t.locale,t.buildId?void 0:t.defaultLocale,t.ignorePrefix);return t.buildId&&(e=X.addPathSuffix(V.addPathPrefix(e,`/_next/data/${t.buildId}`),t.pathname==="/"?"index.json":".json")),e=V.addPathPrefix(e,t.basePath),t.trailingSlash?!t.buildId&&!e.endsWith("/")?X.addPathSuffix(e,"/"):e:Oe.removeTrailingSlash(e)}});var K=u(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.getHostname=ke;function ke(t,e){var r;return(r=!Array.isArray(e?.host)&&e?.host||t.hostname)==null?void 0:r.split(":")[0].toLowerCase()}});var Y=u($=>{"use strict";Object.defineProperty($,"__esModule",{value:!0});$.normalizeLocalePath=Re;function Re(t,e){let r,s=t.split("/");return(e||[]).some(o=>s[1]&&s[1].toLowerCase()===o.toLowerCase()?(r=o,s.splice(1,1),t=s.join("/")||"/",!0):!1),{pathname:t,detectedLocale:r}}});var Z=u(N=>{"use strict";Object.defineProperty(N,"__esModule",{value:!0});N.removePathPrefix=Ue;var Me=P();function Ue(t,e){if(Me.pathHasPrefix(t,e)){let r=t.slice(e.length);return r.startsWith("/")?r:`/${r}`}return t}});var ee=u(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.getNextPathnameInfo=Ee;var Ae=Y(),ze=Z(),We=P();function Ee(t,e){var r;let{basePath:s,i18n:o,trailingSlash:i}=(r=e.nextConfig)!=null?r:{},n={pathname:t,trailingSlash:t!=="/"?t.endsWith("/"):i};if(s&&We.pathHasPrefix(n.pathname,s)&&(n.pathname=ze.removePathPrefix(n.pathname,s),n.basePath=s),e.parseData===!0&&n.pathname.startsWith("/_next/data/")&&n.pathname.endsWith(".json")){let l=n.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/"),h=l[0];n.pathname=l[1]!=="index"?`/${l.slice(1).join("/")}`:"/",n.buildId=h}if(o){let l=Ae.normalizeLocalePath(n.pathname,o.locales);n.locale=l?.detectedLocale,n.pathname=l?.pathname||n.pathname}return n}});var se=u(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});var De=T(),Te=B(),Je=K(),Fe=ee(),a=Symbol("NextURLInternal"),R=class t{constructor(e,r,s){let o,i;typeof r=="object"&&"pathname"in r||typeof r=="string"?(o=r,i=s||{}):i=s||r||{},this[a]={url:re(e,o??i.base),options:i,basePath:""},this.analyzeUrl()}analyzeUrl(){var e,r,s,o,i;let n=Fe.getNextPathnameInfo(this[a].url.pathname,{nextConfig:this[a].options.nextConfig,parseData:!0});this[a].domainLocale=De.detectDomainLocale((e=this[a].options.nextConfig)==null||(r=e.i18n)==null?void 0:r.domains,Je.getHostname(this[a].url,this[a].options.headers));let l=((s=this[a].domainLocale)==null?void 0:s.defaultLocale)||((o=this[a].options.nextConfig)==null||(i=o.i18n)==null?void 0:i.defaultLocale);this[a].url.pathname=n.pathname,this[a].defaultLocale=l;var h;this[a].basePath=(h=n.basePath)!=null?h:"",this[a].buildId=n.buildId;var p;this[a].locale=(p=n.locale)!=null?p:l,this[a].trailingSlash=n.trailingSlash}formatPathname(){return Te.formatNextPathnameInfo({basePath:this[a].basePath,buildId:this[a].buildId,defaultLocale:this[a].options.forceLocale?void 0:this[a].defaultLocale,locale:this[a].locale,pathname:this[a].url.pathname,trailingSlash:this[a].trailingSlash})}get buildId(){return this[a].buildId}set buildId(e){this[a].buildId=e}get locale(){var e;return(e=this[a].locale)!=null?e:""}set locale(e){var r,s;if(!this[a].locale||!(!((r=this[a].options.nextConfig)==null||(s=r.i18n)==null)&&s.locales.includes(e)))throw new TypeError(`The NextURL configuration includes no locale "${e}"`);this[a].locale=e}get defaultLocale(){return this[a].defaultLocale}get domainLocale(){return this[a].domainLocale}get searchParams(){return this[a].url.searchParams}get host(){return this[a].url.host}set host(e){this[a].url.host=e}get hostname(){return this[a].url.hostname}set hostname(e){this[a].url.hostname=e}get port(){return this[a].url.port}set port(e){this[a].url.port=e}get protocol(){return this[a].url.protocol}set protocol(e){this[a].url.protocol=e}get href(){let e=this.formatPathname();return`${this.protocol}//${this.host}${e}${this[a].url.search}`}set href(e){this[a].url=re(e),this.analyzeUrl()}get origin(){return this[a].url.origin}get pathname(){return this[a].url.pathname}set pathname(e){this[a].url.pathname=e}get hash(){return this[a].url.hash}set hash(e){this[a].url.hash=e}get search(){return this[a].url.search}set search(e){this[a].url.search=e}get password(){return this[a].url.password}set password(e){this[a].url.password=e}get username(){return this[a].url.username}set username(e){this[a].url.username=e}get basePath(){return this[a].basePath}set basePath(e){this[a].basePath=e.startsWith("/")?e:`/${e}`}toString(){return this.href}toJSON(){return this.href}[Symbol.for("edge-runtime.inspect.custom")](){return{href:this.href,origin:this.origin,protocol:this.protocol,username:this.username,password:this.password,host:this.host,hostname:this.hostname,port:this.port,pathname:this.pathname,search:this.search,searchParams:this.searchParams,hash:this.hash}}clone(){return new t(String(this),this[a].options)}};M.NextURL=R;var te=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|::1|localhost)/;function re(t,e){return new URL(String(t).replace(te,"localhost"),e&&String(e).replace(te,"localhost"))}});var oe=u(f=>{"use strict";Object.defineProperty(f,"__esModule",{value:!0});f.fromNodeHeaders=Ge;f.toNodeHeaders=Qe;f.splitCookiesString=ae;f.validateURL=Ve;function Ge(t){let e=new Headers;for(let[r,s]of Object.entries(t)){let o=Array.isArray(s)?s:[s];for(let i of o)i!==void 0&&e.append(r,i)}return e}function Qe(t){let e={};if(t)for(let[r,s]of t.entries())e[r]=s,r.toLowerCase()==="set-cookie"&&(e[r]=ae(s));return e}function ae(t){var e=[],r=0,s,o,i,n,l;function h(){for(;r<t.length&&/\s/.test(t.charAt(r));)r+=1;return r<t.length}function p(){return o=t.charAt(r),o!=="="&&o!==";"&&o!==","}for(;r<t.length;){for(s=r,l=!1;h();)if(o=t.charAt(r),o===","){for(i=r,r+=1,h(),n=r;r<t.length&&p();)r+=1;r<t.length&&t.charAt(r)==="="?(l=!0,r=n,e.push(t.substring(s,i)),s=r):r=i+1}else r+=1;(!l||r>=t.length)&&e.push(t.substring(s,t.length))}return e}function Ve(t){try{return String(new URL(String(t)))}catch(e){throw new Error("URLs is malformed. Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls",{cause:e})}}});var ue=u(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});var v=Xe(ge("next/dist/compiled/cookie"));function Xe(t){return t&&t.__esModule?t:{default:t}}var Be=t=>(t=Object.assign({},t),t.maxAge&&(t.expires=new Date(Date.now()+t.maxAge*1e3)),t.path==null&&(t.path="/"),t),Ke=t=>typeof t=="object"?`j:${JSON.stringify(t)}`:String(t),ne=(t,e={})=>v.default.serialize(t,"",{expires:new Date(0),path:"/",...e}),ie=t=>{let e=t.headers.get("set-cookie");return e!=null?e.split(", "):[]},le=t=>t.join(", "),g=class extends Map{constructor(e){let r=typeof e=="string"?v.default.parse(e):{};super(Object.entries(r))}set(e,r,s={}){return super.set(e,v.default.serialize(e,Ke(r),Be(s)))}[Symbol.for("edge-runtime.inspect.custom")](){return Object.fromEntries(this.entries())}};x.Cookies=g;var U=class extends g{constructor(e){super(e.headers.get("cookie")),this.response=e}get=(...e)=>this.getWithOptions(...e).value;getWithOptions=(...e)=>{let r=super.get(...e);if(typeof r!="string")return{value:r,options:{}};let{[e[0]]:s,...o}=v.default.parse(r);return{value:s,options:o}};set=(...e)=>{let r=super.has(e[0]);super.set(...e);let s=super.get(e[0]);if(typeof s!="string")throw new Error(`Invariant: failed to generate cookie for ${JSON.stringify(e)}`);if(r){let o=le(ie(this.response).filter(i=>!i.startsWith(`${e[0]}=`)));o?this.response.headers.set("set-cookie",[s,o].join(", ")):this.response.headers.set("set-cookie",s)}else this.response.headers.append("set-cookie",s);return this};delete=(e,r={})=>{let s=super.delete(e);if(s){let o=le(ie(this.response).filter(n=>!n.startsWith(`${e}=`))),i=ne(e,r);this.response.headers.set("set-cookie",[i,o].join(", "))}return s};clear=(e={})=>{let r=Array.from(super.keys()).map(s=>ne(s,e)).join(", ");return r&&this.response.headers.set("set-cookie",r),super.clear()}};x.NextCookies=U});var E=u(W=>{"use strict";Object.defineProperty(W,"__esModule",{value:!0});var Ye=se(),A=oe(),Ze=ue(),he=Symbol("internal response"),et=new Set([301,302,303,307,308]),z=class t extends Response{constructor(e,r={}){super(e,r),this[he]={cookies:new Ze.NextCookies(this),url:r.url?new Ye.NextURL(r.url,{headers:A.toNodeHeaders(this.headers),nextConfig:r.nextConfig}):void 0}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,url:this.url,body:this.body,bodyUsed:this.bodyUsed,headers:Object.fromEntries(this.headers),ok:this.ok,redirected:this.redirected,status:this.status,statusText:this.statusText,type:this.type}}get cookies(){return this[he].cookies}static json(e,r){let s=Response.json(e,r);return new t(s.body,s)}static redirect(e,r){var s;let o=typeof r=="number"?r:(s=r?.status)!=null?s:307;if(!et.has(o))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');let i=typeof r=="object"?r:{},n=new Headers(i?.headers);return n.set("Location",A.validateURL(e)),new t(null,{...i,headers:n,status:o})}static rewrite(e,r){let s=new Headers(r?.headers);return s.set("x-middleware-rewrite",A.validateURL(e)),new t(null,{...r,headers:s})}static next(e){let r=new Headers(e?.headers);return r.set("x-middleware-next","1"),new t(null,{...e,headers:r})}};W.NextResponse=z});var d={};xe(d,{NextResponse:()=>rt,__esModule:()=>tt,default:()=>at});var ce=D(E());c(d,D(E()));var{__esModule:tt,NextResponse:rt}=ce,{default:de,...st}=ce,at=de!==void 0?de:st;export{rt as NextResponse,tt as __esModule,at as default};
|
|
5
|
+
//# sourceMappingURL=response.js.map
|
|
@@ -7,23 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"scopes": {
|
|
9
9
|
"./esm.sh/": {
|
|
10
|
-
"/v91/next@12.2.5/deno/dist/
|
|
11
|
-
"/v91/next@12.2.5/deno/dist/shared/lib/get-hostname.js": "./esm.sh/v91/next@12.2.5/deno/dist/shared/lib/get-hostname.js",
|
|
12
|
-
"/v91/next@12.2.5/deno/dist/shared/lib/router/utils/format-next-pathname-info.js": "./esm.sh/v91/next@12.2.5/deno/dist/shared/lib/router/utils/format-next-pathname-info.js",
|
|
13
|
-
"/v91/next@12.2.5/deno/dist/shared/lib/i18n/detect-domain-locale.js": "./esm.sh/v91/next@12.2.5/deno/dist/shared/lib/i18n/detect-domain-locale.js",
|
|
14
|
-
"/v91/next@12.2.5/deno/dist/compiled/cookie.js": "./esm.sh/v91/next@12.2.5/deno/dist/compiled/cookie.js",
|
|
15
|
-
"/v91/next@12.2.5/deno/dist/server/web/error.js": "./esm.sh/v91/next@12.2.5/deno/dist/server/web/error.js",
|
|
16
|
-
"/v91/next@12.2.5/deno/dist/server/web/utils.js": "./esm.sh/v91/next@12.2.5/deno/dist/server/web/utils.js",
|
|
17
|
-
"/v91/next@12.2.5/deno/dist/server/web/next-url.js": "./esm.sh/v91/next@12.2.5/deno/dist/server/web/next-url.js",
|
|
18
|
-
"/v91/next@12.2.5/deno/dist/server/web/spec-extension/cookies.js": "./esm.sh/v91/next@12.2.5/deno/dist/server/web/spec-extension/cookies.js",
|
|
19
|
-
"/v91/next@12.2.5/deno/dist/shared/lib/router/utils/path-has-prefix.js": "./esm.sh/v91/next@12.2.5/deno/dist/shared/lib/router/utils/path-has-prefix.js",
|
|
20
|
-
"/v91/next@12.2.5/deno/dist/shared/lib/router/utils/add-path-prefix.js": "./esm.sh/v91/next@12.2.5/deno/dist/shared/lib/router/utils/add-path-prefix.js",
|
|
21
|
-
"/v91/next@12.2.5/deno/dist/shared/lib/router/utils/parse-path.js": "./esm.sh/v91/next@12.2.5/deno/dist/shared/lib/router/utils/parse-path.js",
|
|
22
|
-
"/v91/next@12.2.5/deno/dist/shared/lib/router/utils/add-locale.js": "./esm.sh/v91/next@12.2.5/deno/dist/shared/lib/router/utils/add-locale.js",
|
|
23
|
-
"/v91/next@12.2.5/deno/dist/shared/lib/router/utils/add-path-suffix.js": "./esm.sh/v91/next@12.2.5/deno/dist/shared/lib/router/utils/add-path-suffix.js",
|
|
24
|
-
"/v91/next@12.2.5/deno/dist/shared/lib/router/utils/remove-trailing-slash.js": "./esm.sh/v91/next@12.2.5/deno/dist/shared/lib/router/utils/remove-trailing-slash.js",
|
|
25
|
-
"/v91/next@12.2.5/deno/dist/shared/lib/i18n/normalize-locale-path.js": "./esm.sh/v91/next@12.2.5/deno/dist/shared/lib/i18n/normalize-locale-path.js",
|
|
26
|
-
"/v91/next@12.2.5/deno/dist/shared/lib/router/utils/remove-path-prefix.js": "./esm.sh/v91/next@12.2.5/deno/dist/shared/lib/router/utils/remove-path-prefix.js"
|
|
10
|
+
"/v91/next@12.2.5/deno/dist/compiled/cookie.js": "./esm.sh/v91/next@12.2.5/deno/dist/compiled/cookie.js"
|
|
27
11
|
}
|
|
28
12
|
}
|
|
29
13
|
}
|
package/lib/templates/blob.js
DELETED
|
@@ -1,341 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
// src/templates/netliblob.mts
|
|
19
|
-
var netliblob_exports = {};
|
|
20
|
-
__export(netliblob_exports, {
|
|
21
|
-
Blobs: () => Blobs
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(netliblob_exports);
|
|
24
|
-
// ../../node_modules/@netlify/blobs/dist/src/main.js
|
|
25
|
-
var import_node_fs = require("fs");
|
|
26
|
-
var import_promises = require("fs/promises");
|
|
27
|
-
var import_node_stream = require("stream");
|
|
28
|
-
var AbortError = class extends Error {
|
|
29
|
-
constructor(message) {
|
|
30
|
-
super();
|
|
31
|
-
this.name = "AbortError";
|
|
32
|
-
this.message = message;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
var getDOMException = (errorMessage) => globalThis.DOMException === void 0 ? new AbortError(errorMessage) : new DOMException(errorMessage);
|
|
36
|
-
var getAbortedReason = (signal) => {
|
|
37
|
-
const reason = signal.reason === void 0 ? getDOMException("This operation was aborted.") : signal.reason;
|
|
38
|
-
return reason instanceof Error ? reason : getDOMException(reason);
|
|
39
|
-
};
|
|
40
|
-
async function pMap(iterable, mapper, { concurrency = Number.POSITIVE_INFINITY, stopOnError = true, signal } = {}) {
|
|
41
|
-
return new Promise((resolve, reject_) => {
|
|
42
|
-
if (iterable[Symbol.iterator] === void 0 && iterable[Symbol.asyncIterator] === void 0) {
|
|
43
|
-
throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
|
|
44
|
-
}
|
|
45
|
-
if (typeof mapper !== "function") {
|
|
46
|
-
throw new TypeError("Mapper function is required");
|
|
47
|
-
}
|
|
48
|
-
if (!((Number.isSafeInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency >= 1)) {
|
|
49
|
-
throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`);
|
|
50
|
-
}
|
|
51
|
-
const result = [];
|
|
52
|
-
const errors = [];
|
|
53
|
-
const skippedIndexesMap = /* @__PURE__ */ new Map();
|
|
54
|
-
let isRejected = false;
|
|
55
|
-
let isResolved = false;
|
|
56
|
-
let isIterableDone = false;
|
|
57
|
-
let resolvingCount = 0;
|
|
58
|
-
let currentIndex = 0;
|
|
59
|
-
const iterator = iterable[Symbol.iterator] === void 0 ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();
|
|
60
|
-
const reject = (reason) => {
|
|
61
|
-
isRejected = true;
|
|
62
|
-
isResolved = true;
|
|
63
|
-
reject_(reason);
|
|
64
|
-
};
|
|
65
|
-
if (signal) {
|
|
66
|
-
if (signal.aborted) {
|
|
67
|
-
reject(getAbortedReason(signal));
|
|
68
|
-
}
|
|
69
|
-
signal.addEventListener("abort", () => {
|
|
70
|
-
reject(getAbortedReason(signal));
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
const next = async () => {
|
|
74
|
-
if (isResolved) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
const nextItem = await iterator.next();
|
|
78
|
-
const index = currentIndex;
|
|
79
|
-
currentIndex++;
|
|
80
|
-
if (nextItem.done) {
|
|
81
|
-
isIterableDone = true;
|
|
82
|
-
if (resolvingCount === 0 && !isResolved) {
|
|
83
|
-
if (!stopOnError && errors.length > 0) {
|
|
84
|
-
reject(new AggregateError(errors));
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
isResolved = true;
|
|
88
|
-
if (skippedIndexesMap.size === 0) {
|
|
89
|
-
resolve(result);
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
const pureResult = [];
|
|
93
|
-
for (const [index2, value] of result.entries()) {
|
|
94
|
-
if (skippedIndexesMap.get(index2) === pMapSkip) {
|
|
95
|
-
continue;
|
|
96
|
-
}
|
|
97
|
-
pureResult.push(value);
|
|
98
|
-
}
|
|
99
|
-
resolve(pureResult);
|
|
100
|
-
}
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
resolvingCount++;
|
|
104
|
-
(async () => {
|
|
105
|
-
try {
|
|
106
|
-
const element = await nextItem.value;
|
|
107
|
-
if (isResolved) {
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
110
|
-
const value = await mapper(element, index);
|
|
111
|
-
if (value === pMapSkip) {
|
|
112
|
-
skippedIndexesMap.set(index, value);
|
|
113
|
-
}
|
|
114
|
-
result[index] = value;
|
|
115
|
-
resolvingCount--;
|
|
116
|
-
await next();
|
|
117
|
-
}
|
|
118
|
-
catch (error) {
|
|
119
|
-
if (stopOnError) {
|
|
120
|
-
reject(error);
|
|
121
|
-
}
|
|
122
|
-
else {
|
|
123
|
-
errors.push(error);
|
|
124
|
-
resolvingCount--;
|
|
125
|
-
try {
|
|
126
|
-
await next();
|
|
127
|
-
}
|
|
128
|
-
catch (error2) {
|
|
129
|
-
reject(error2);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
})();
|
|
134
|
-
};
|
|
135
|
-
(async () => {
|
|
136
|
-
for (let index = 0; index < concurrency; index++) {
|
|
137
|
-
try {
|
|
138
|
-
await next();
|
|
139
|
-
}
|
|
140
|
-
catch (error) {
|
|
141
|
-
reject(error);
|
|
142
|
-
break;
|
|
143
|
-
}
|
|
144
|
-
if (isIterableDone || isRejected) {
|
|
145
|
-
break;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
})();
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
var pMapSkip = Symbol("skip");
|
|
152
|
-
var DEFAULT_RETRY_DELAY = 5e3;
|
|
153
|
-
var MIN_RETRY_DELAY = 1e3;
|
|
154
|
-
var MAX_RETRY = 5;
|
|
155
|
-
var RATE_LIMIT_HEADER = "X-RateLimit-Reset";
|
|
156
|
-
var fetchAndRetry = async (fetcher, url, options, attemptsLeft = MAX_RETRY) => {
|
|
157
|
-
try {
|
|
158
|
-
const res = await fetcher(url, options);
|
|
159
|
-
if (attemptsLeft > 0 && (res.status === 429 || res.status >= 500)) {
|
|
160
|
-
const delay = getDelay(res.headers.get(RATE_LIMIT_HEADER));
|
|
161
|
-
await sleep(delay);
|
|
162
|
-
return fetchAndRetry(fetcher, url, options, attemptsLeft - 1);
|
|
163
|
-
}
|
|
164
|
-
return res;
|
|
165
|
-
}
|
|
166
|
-
catch (error) {
|
|
167
|
-
if (attemptsLeft === 0) {
|
|
168
|
-
throw error;
|
|
169
|
-
}
|
|
170
|
-
const delay = getDelay();
|
|
171
|
-
await sleep(delay);
|
|
172
|
-
return fetchAndRetry(fetcher, url, options, attemptsLeft - 1);
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
|
-
var getDelay = (rateLimitReset) => {
|
|
176
|
-
if (!rateLimitReset) {
|
|
177
|
-
return DEFAULT_RETRY_DELAY;
|
|
178
|
-
}
|
|
179
|
-
return Math.max(Number(rateLimitReset) * 1e3 - Date.now(), MIN_RETRY_DELAY);
|
|
180
|
-
};
|
|
181
|
-
var sleep = (ms) => new Promise((resolve) => {
|
|
182
|
-
setTimeout(resolve, ms);
|
|
183
|
-
});
|
|
184
|
-
var EXPIRY_HEADER = "x-nf-expires-at";
|
|
185
|
-
var Blobs = class _Blobs {
|
|
186
|
-
constructor({ authentication, context, fetcher, siteID }) {
|
|
187
|
-
var _a;
|
|
188
|
-
this.context = context !== null && context !== void 0 ? context : "production";
|
|
189
|
-
this.fetcher = fetcher !== null && fetcher !== void 0 ? fetcher : globalThis.fetch;
|
|
190
|
-
this.siteID = siteID;
|
|
191
|
-
if ("contextURL" in authentication) {
|
|
192
|
-
this.authentication = authentication;
|
|
193
|
-
}
|
|
194
|
-
else {
|
|
195
|
-
this.authentication = {
|
|
196
|
-
apiURL: (_a = authentication.apiURL) !== null && _a !== void 0 ? _a : "https://api.netlify.com",
|
|
197
|
-
token: authentication.token
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
if (fetcher) {
|
|
201
|
-
this.fetcher = fetcher;
|
|
202
|
-
}
|
|
203
|
-
else if (globalThis.fetch) {
|
|
204
|
-
this.fetcher = globalThis.fetch;
|
|
205
|
-
}
|
|
206
|
-
else {
|
|
207
|
-
throw new Error("You must specify a fetch-compatible `fetcher` parameter when `fetch` is not available globally");
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
async getFinalRequest(key, method) {
|
|
211
|
-
const encodedKey = encodeURIComponent(key);
|
|
212
|
-
if ("contextURL" in this.authentication) {
|
|
213
|
-
return {
|
|
214
|
-
headers: {
|
|
215
|
-
authorization: `Bearer ${this.authentication.token}`
|
|
216
|
-
},
|
|
217
|
-
url: `${this.authentication.contextURL}/${this.siteID}/${this.context}/${encodedKey}`
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
const apiURL = `${this.authentication.apiURL}/api/v1/sites/${this.siteID}/blobs/${encodedKey}?context=${this.context}`;
|
|
221
|
-
const headers = { authorization: `Bearer ${this.authentication.token}` };
|
|
222
|
-
const res = await this.fetcher(apiURL, { headers, method });
|
|
223
|
-
if (res.status !== 200) {
|
|
224
|
-
throw new Error(`${method} operation has failed: API returned a ${res.status} response`);
|
|
225
|
-
}
|
|
226
|
-
const { url } = await res.json();
|
|
227
|
-
return {
|
|
228
|
-
url
|
|
229
|
-
};
|
|
230
|
-
}
|
|
231
|
-
static getExpirationHeaders(expiration) {
|
|
232
|
-
if (typeof expiration === "number") {
|
|
233
|
-
return {
|
|
234
|
-
[EXPIRY_HEADER]: (Date.now() + expiration).toString()
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
if (expiration instanceof Date) {
|
|
238
|
-
return {
|
|
239
|
-
[EXPIRY_HEADER]: expiration.getTime().toString()
|
|
240
|
-
};
|
|
241
|
-
}
|
|
242
|
-
if (expiration === void 0) {
|
|
243
|
-
return {};
|
|
244
|
-
}
|
|
245
|
-
throw new TypeError(`'expiration' value must be a number or a Date, ${typeof expiration} found.`);
|
|
246
|
-
}
|
|
247
|
-
isConfigured() {
|
|
248
|
-
var _a;
|
|
249
|
-
return Boolean((_a = this.authentication) === null || _a === void 0 ? void 0 : _a.token) && Boolean(this.siteID);
|
|
250
|
-
}
|
|
251
|
-
async makeStoreRequest(key, method, extraHeaders, body) {
|
|
252
|
-
if (!this.isConfigured()) {
|
|
253
|
-
throw new Error("The blob store is unavailable because it's missing required configuration properties");
|
|
254
|
-
}
|
|
255
|
-
const { headers: baseHeaders = {}, url } = await this.getFinalRequest(key, method);
|
|
256
|
-
const headers = {
|
|
257
|
-
...baseHeaders,
|
|
258
|
-
...extraHeaders
|
|
259
|
-
};
|
|
260
|
-
if (method === "put") {
|
|
261
|
-
headers["cache-control"] = "max-age=0, stale-while-revalidate=60";
|
|
262
|
-
}
|
|
263
|
-
const options = {
|
|
264
|
-
body,
|
|
265
|
-
headers,
|
|
266
|
-
method
|
|
267
|
-
};
|
|
268
|
-
if (body instanceof ReadableStream) {
|
|
269
|
-
options.duplex = "half";
|
|
270
|
-
}
|
|
271
|
-
const res = await fetchAndRetry(this.fetcher, url, options);
|
|
272
|
-
if (res.status === 404 && method === "get") {
|
|
273
|
-
return null;
|
|
274
|
-
}
|
|
275
|
-
if (res.status !== 200) {
|
|
276
|
-
throw new Error(`${method} operation has failed: store returned a ${res.status} response`);
|
|
277
|
-
}
|
|
278
|
-
return res;
|
|
279
|
-
}
|
|
280
|
-
async delete(key) {
|
|
281
|
-
await this.makeStoreRequest(key, "delete");
|
|
282
|
-
}
|
|
283
|
-
async get(key, options) {
|
|
284
|
-
const { type } = options !== null && options !== void 0 ? options : {};
|
|
285
|
-
const res = await this.makeStoreRequest(key, "get");
|
|
286
|
-
const expiration = res === null || res === void 0 ? void 0 : res.headers.get(EXPIRY_HEADER);
|
|
287
|
-
if (typeof expiration === "string") {
|
|
288
|
-
const expirationTS = Number.parseInt(expiration);
|
|
289
|
-
if (!Number.isNaN(expirationTS) && expirationTS <= Date.now()) {
|
|
290
|
-
return null;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
if (res === null) {
|
|
294
|
-
return res;
|
|
295
|
-
}
|
|
296
|
-
if (type === void 0 || type === "text") {
|
|
297
|
-
return res.text();
|
|
298
|
-
}
|
|
299
|
-
if (type === "arrayBuffer") {
|
|
300
|
-
return res.arrayBuffer();
|
|
301
|
-
}
|
|
302
|
-
if (type === "blob") {
|
|
303
|
-
return res.blob();
|
|
304
|
-
}
|
|
305
|
-
if (type === "json") {
|
|
306
|
-
return res.json();
|
|
307
|
-
}
|
|
308
|
-
if (type === "stream") {
|
|
309
|
-
return res.body;
|
|
310
|
-
}
|
|
311
|
-
throw new Error(`Invalid 'type' property: ${type}. Expected: arrayBuffer, blob, json, stream, or text.`);
|
|
312
|
-
}
|
|
313
|
-
async set(key, data, { expiration } = {}) {
|
|
314
|
-
const headers = _Blobs.getExpirationHeaders(expiration);
|
|
315
|
-
await this.makeStoreRequest(key, "put", headers, data);
|
|
316
|
-
}
|
|
317
|
-
async setFile(key, path, { expiration } = {}) {
|
|
318
|
-
const { size } = await (0, import_promises.stat)(path);
|
|
319
|
-
const file = import_node_stream.Readable.toWeb((0, import_node_fs.createReadStream)(path));
|
|
320
|
-
const headers = {
|
|
321
|
-
..._Blobs.getExpirationHeaders(expiration),
|
|
322
|
-
"content-length": size.toString()
|
|
323
|
-
};
|
|
324
|
-
await this.makeStoreRequest(key, "put", headers, file);
|
|
325
|
-
}
|
|
326
|
-
setFiles(files, { concurrency = 5 } = {}) {
|
|
327
|
-
return pMap(files, ({ key, path, ...options }) => this.setFile(key, path, options), { concurrency });
|
|
328
|
-
}
|
|
329
|
-
async setJSON(key, data, { expiration } = {}) {
|
|
330
|
-
const payload = JSON.stringify(data);
|
|
331
|
-
const headers = {
|
|
332
|
-
..._Blobs.getExpirationHeaders(expiration),
|
|
333
|
-
"content-type": "application/json"
|
|
334
|
-
};
|
|
335
|
-
await this.makeStoreRequest(key, "put", headers, payload);
|
|
336
|
-
}
|
|
337
|
-
};
|
|
338
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
339
|
-
0 && (module.exports = {
|
|
340
|
-
Blobs
|
|
341
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/* esm.sh - esbuild bundle(next@12.2.5/dist/server/web/error) deno production */
|
|
2
|
-
var l=Object.create;var c=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var _=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var w=(e,r,t,u)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of f(r))!h.call(e,s)&&s!==t&&c(e,s,{get:()=>r[s],enumerable:!(u=g(r,s))||u.enumerable});return e};var v=(e,r,t)=>(t=e!=null?l(x(e)):{},w(r||!e||!e.__esModule?c(t,"default",{value:e,enumerable:!0}):t,e));var i=_(o=>{"use strict";Object.defineProperty(o,"__esModule",{value:!0});var a=class extends Error{constructor({page:r}){super(`The middleware "${r}" accepts an async API directly with the form:
|
|
3
|
-
|
|
4
|
-
export function middleware(request, event) {
|
|
5
|
-
return NextResponse.redirect('/new-location')
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
Read more: https://nextjs.org/docs/messages/middleware-new-signature
|
|
9
|
-
`)}};o.PageSignatureError=a;var n=class extends Error{constructor(){super("The request.page has been deprecated in favour of `URLPattern`.\n Read more: https://nextjs.org/docs/messages/middleware-request-page\n ")}};o.RemovedPageError=n;var d=class extends Error{constructor(){super("The request.ua has been removed in favour of `userAgent` function.\n Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n ")}};o.RemovedUAError=d});var p=v(i()),j=!0,{PageSignatureError:q,RemovedPageError:b,RemovedUAError:y}=p,{default:m,...R}=p,A=m!==void 0?m:R;export{q as PageSignatureError,b as RemovedPageError,y as RemovedUAError,j as __esModule,A as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* esm.sh - esbuild bundle(next@12.2.5/dist/server/web/next-url) deno production */
|
|
2
|
-
import __next_dist_shared_lib_router_utils_get_next_pathname_info$ from "/v91/next@12.2.5/deno/dist/shared/lib/router/utils/get-next-pathname-info.js";import __next_dist_shared_lib_get_hostname$ from "/v91/next@12.2.5/deno/dist/shared/lib/get-hostname.js";import __next_dist_shared_lib_router_utils_format_next_pathname_info$ from "/v91/next@12.2.5/deno/dist/shared/lib/router/utils/format-next-pathname-info.js";import __next_dist_shared_lib_i18n_detect_domain_locale$ from "/v91/next@12.2.5/deno/dist/shared/lib/i18n/detect-domain-locale.js";var _=Object.create;var p=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty;var l=(s=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(s,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):s)(function(s){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+s+'" is not supported')});var w=(s,t)=>()=>(t||s((t={exports:{}}).exports,t),t.exports);var y=(s,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of I(t))!S.call(s,a)&&a!==r&&p(s,a,{get:()=>t[a],enumerable:!(o=v(t,a))||o.enumerable});return s};var N=(s,t,r)=>(r=s!=null?_(x(s)):{},y(t||!s||!s.__esModule?p(r,"default",{value:s,enumerable:!0}):r,s));var L=w(u=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});var U=__next_dist_shared_lib_i18n_detect_domain_locale$,C=__next_dist_shared_lib_router_utils_format_next_pathname_info$,$=__next_dist_shared_lib_get_hostname$,R=__next_dist_shared_lib_router_utils_get_next_pathname_info$,e=Symbol("NextURLInternal"),n=class{constructor(t,r,o){let a,h;typeof r=="object"&&"pathname"in r||typeof r=="string"?(a=r,h=o||{}):h=o||r||{},this[e]={url:g(t,a??h.base),options:h,basePath:""},this.analyzeUrl()}analyzeUrl(){var t,r,o,a,h;let i=R.getNextPathnameInfo(this[e].url.pathname,{nextConfig:this[e].options.nextConfig,parseData:!0});this[e].domainLocale=U.detectDomainLocale((t=this[e].options.nextConfig)==null||(r=t.i18n)==null?void 0:r.domains,$.getHostname(this[e].url,this[e].options.headers));let c=((o=this[e].domainLocale)==null?void 0:o.defaultLocale)||((a=this[e].options.nextConfig)==null||(h=a.i18n)==null?void 0:h.defaultLocale);this[e].url.pathname=i.pathname,this[e].defaultLocale=c;var d;this[e].basePath=(d=i.basePath)!=null?d:"",this[e].buildId=i.buildId;var m;this[e].locale=(m=i.locale)!=null?m:c,this[e].trailingSlash=i.trailingSlash}formatPathname(){return C.formatNextPathnameInfo({basePath:this[e].basePath,buildId:this[e].buildId,defaultLocale:this[e].options.forceLocale?void 0:this[e].defaultLocale,locale:this[e].locale,pathname:this[e].url.pathname,trailingSlash:this[e].trailingSlash})}get buildId(){return this[e].buildId}set buildId(t){this[e].buildId=t}get locale(){var t;return(t=this[e].locale)!=null?t:""}set locale(t){var r,o;if(!this[e].locale||!(!((r=this[e].options.nextConfig)==null||(o=r.i18n)==null)&&o.locales.includes(t)))throw new TypeError(`The NextURL configuration includes no locale "${t}"`);this[e].locale=t}get defaultLocale(){return this[e].defaultLocale}get domainLocale(){return this[e].domainLocale}get searchParams(){return this[e].url.searchParams}get host(){return this[e].url.host}set host(t){this[e].url.host=t}get hostname(){return this[e].url.hostname}set hostname(t){this[e].url.hostname=t}get port(){return this[e].url.port}set port(t){this[e].url.port=t}get protocol(){return this[e].url.protocol}set protocol(t){this[e].url.protocol=t}get href(){let t=this.formatPathname();return`${this.protocol}//${this.host}${t}${this[e].url.search}`}set href(t){this[e].url=g(t),this.analyzeUrl()}get origin(){return this[e].url.origin}get pathname(){return this[e].url.pathname}set pathname(t){this[e].url.pathname=t}get hash(){return this[e].url.hash}set hash(t){this[e].url.hash=t}get search(){return this[e].url.search}set search(t){this[e].url.search=t}get password(){return this[e].url.password}set password(t){this[e].url.password=t}get username(){return this[e].url.username}set username(t){this[e].url.username=t}get basePath(){return this[e].basePath}set basePath(t){this[e].basePath=t.startsWith("/")?t:`/${t}`}toString(){return this.href}toJSON(){return this.href}[Symbol.for("edge-runtime.inspect.custom")](){return{href:this.href,origin:this.origin,protocol:this.protocol,username:this.username,password:this.password,host:this.host,hostname:this.hostname,port:this.port,pathname:this.pathname,search:this.search,searchParams:this.searchParams,hash:this.hash}}clone(){return new n(String(this),this[e].options)}};u.NextURL=n;var f=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|::1|localhost)/;function g(s,t){return new URL(String(s).replace(f,"localhost"),t&&String(t).replace(f,"localhost"))}});var b=N(L()),T=!0,{NextURL:z}=b,{default:P,...q}=b,D=P!==void 0?P:q;export{z as NextURL,T as __esModule,D as default};
|
package/src/templates/vendor/esm.sh/v91/next@12.2.5/deno/dist/server/web/spec-extension/cookies.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* esm.sh - esbuild bundle(next@12.2.5/dist/server/web/spec-extension/cookies) deno production */
|
|
2
|
-
import __next_dist_compiled_cookie$ from "/v91/next@12.2.5/deno/dist/compiled/cookie.js";var x=Object.create;var l=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var j=(t=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(t,{get:(e,s)=>(typeof require!="undefined"?require:e)[s]}):t)(function(t){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var z=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var w=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of C(e))!y.call(t,i)&&i!==s&&l(t,i,{get:()=>e[i],enumerable:!(r=m(e,i))||r.enumerable});return t};var v=(t,e,s)=>(s=t!=null?x(O(t)):{},w(e||!t||!t.__esModule?l(s,"default",{value:t,enumerable:!0}):s,t));var h=z(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});var o=A(__next_dist_compiled_cookie$);function A(t){return t&&t.__esModule?t:{default:t}}var D=t=>(t=Object.assign({},t),t.maxAge&&(t.expires=new Date(Date.now()+t.maxAge*1e3)),t.path==null&&(t.path="/"),t),M=t=>typeof t=="object"?`j:${JSON.stringify(t)}`:String(t),p=(t,e={})=>o.default.serialize(t,"",{expires:new Date(0),path:"/",...e}),d=t=>{let e=t.headers.get("set-cookie");return e!=null?e.split(", "):[]},f=t=>t.join(", "),n=class extends Map{constructor(e){let s=typeof e=="string"?o.default.parse(e):{};super(Object.entries(s))}set(e,s,r={}){return super.set(e,o.default.serialize(e,M(s),D(r)))}[Symbol.for("edge-runtime.inspect.custom")](){return Object.fromEntries(this.entries())}};a.Cookies=n;var c=class extends n{constructor(e){super(e.headers.get("cookie")),this.response=e}get=(...e)=>this.getWithOptions(...e).value;getWithOptions=(...e)=>{let s=super.get(...e);if(typeof s!="string")return{value:s,options:{}};let{[e[0]]:r,...i}=o.default.parse(s);return{value:r,options:i}};set=(...e)=>{let s=super.has(e[0]);super.set(...e);let r=super.get(e[0]);if(typeof r!="string")throw new Error(`Invariant: failed to generate cookie for ${JSON.stringify(e)}`);if(s){let i=f(d(this.response).filter(u=>!u.startsWith(`${e[0]}=`)));i?this.response.headers.set("set-cookie",[r,i].join(", ")):this.response.headers.set("set-cookie",r)}else this.response.headers.append("set-cookie",r);return this};delete=(e,s={})=>{let r=super.delete(e);if(r){let i=f(d(this.response).filter(g=>!g.startsWith(`${e}=`))),u=p(e,s);this.response.headers.set("set-cookie",[u,i].join(", "))}return r};clear=(e={})=>{let s=Array.from(super.keys()).map(r=>p(r,e)).join(", ");return s&&this.response.headers.set("set-cookie",s),super.clear()}};a.NextCookies=c});var _=v(h()),b=!0,{Cookies:E,NextCookies:N}=_,{default:k,...S}=_,q=k!==void 0?k:S;export{E as Cookies,N as NextCookies,b as __esModule,q as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* esm.sh - esbuild bundle(next@12.2.5/dist/server/web/utils) deno production */
|
|
2
|
-
var m=Object.create;var f=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty;var L=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var A=(e,r,t,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of _(r))!H.call(e,s)&&s!==t&&f(e,s,{get:()=>r[s],enumerable:!(a=w(r,s))||a.enumerable});return e};var C=(e,r,t)=>(t=e!=null?m(y(e)):{},A(r||!e||!e.__esModule?f(t,"default",{value:e,enumerable:!0}):t,e));var h=L(o=>{"use strict";Object.defineProperty(o,"__esModule",{value:!0});o.fromNodeHeaders=N;o.toNodeHeaders=R;o.splitCookiesString=i;o.validateURL=U;function N(e){let r=new Headers;for(let[t,a]of Object.entries(e)){let s=Array.isArray(a)?a:[a];for(let n of s)n!==void 0&&r.append(t,n)}return r}function R(e){let r={};if(e)for(let[t,a]of e.entries())r[t]=a,t.toLowerCase()==="set-cookie"&&(r[t]=i(a));return r}function i(e){var r=[],t=0,a,s,n,u,l;function d(){for(;t<e.length&&/\s/.test(e.charAt(t));)t+=1;return t<e.length}function v(){return s=e.charAt(t),s!=="="&&s!==";"&&s!==","}for(;t<e.length;){for(a=t,l=!1;d();)if(s=e.charAt(t),s===","){for(n=t,t+=1,d(),u=t;t<e.length&&v();)t+=1;t<e.length&&e.charAt(t)==="="?(l=!0,t=u,r.push(e.substring(a,n)),a=t):t=n+1}else t+=1;(!l||t>=e.length)&&r.push(e.substring(a,e.length))}return r}function U(e){try{return String(new URL(String(e)))}catch(r){throw new Error("URLs is malformed. Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls",{cause:r})}}});var p=C(h()),j=!0,{fromNodeHeaders:M,toNodeHeaders:O,splitCookiesString:P,validateURL:E}=p,{default:c,...b}=p,F=c!==void 0?c:b;export{j as __esModule,F as default,M as fromNodeHeaders,P as splitCookiesString,O as toNodeHeaders,E as validateURL};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* esm.sh - esbuild bundle(next@12.2.5/dist/shared/lib/get-hostname) deno production */
|
|
2
|
-
var _=Object.create;var s=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty;var p=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var v=(e,t,o,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of f(t))!c.call(e,r)&&r!==o&&s(e,r,{get:()=>t[r],enumerable:!(u=d(t,r))||u.enumerable});return e};var g=(e,t,o)=>(o=e!=null?_(m(e)):{},v(t||!e||!e.__esModule?s(o,"default",{value:e,enumerable:!0}):o,e));var l=p(n=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.getHostname=x;function x(e,t){var o;return(o=!Array.isArray(t?.host)&&t?.host||e.hostname)==null?void 0:o.split(":")[0].toLowerCase()}});var i=g(l()),M=!0,{getHostname:b}=i,{default:a,...y}=i,j=a!==void 0?a:y;export{M as __esModule,j as default,b as getHostname};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* esm.sh - esbuild bundle(next@12.2.5/dist/shared/lib/i18n/detect-domain-locale) deno production */
|
|
2
|
-
var c=Object.create;var l=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var L=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports);var x=(o,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of v(e))!C.call(o,a)&&a!==t&&l(o,a,{get:()=>e[a],enumerable:!(n=p(e,a))||n.enumerable});return o};var D=(o,e,t)=>(t=o!=null?c(w(o)):{},x(e||!o||!o.__esModule?l(t,"default",{value:o,enumerable:!0}):t,o));var u=L(s=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});s.detectDomainLocale=b;function b(o,e,t){let n;if(o){t&&(t=t.toLowerCase());for(let r of o){var a,i;let _=(a=r.domain)==null?void 0:a.split(":")[0].toLowerCase();if(e===_||t===r.defaultLocale.toLowerCase()||((i=r.locales)==null?void 0:i.some(d=>d.toLowerCase()===t))){n=r;break}}}return n}});var m=D(u()),y=!0,{detectDomainLocale:H}=m,{default:f,...M}=m,O=f!==void 0?f:M;export{y as __esModule,O as default,H as detectDomainLocale};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* esm.sh - esbuild bundle(next@12.2.5/dist/shared/lib/i18n/normalize-locale-path) deno production */
|
|
2
|
-
var i=Object.create;var l=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var f=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty;var p=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var L=(e,t,o,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of _(t))!m.call(e,r)&&r!==o&&l(e,r,{get:()=>t[r],enumerable:!(s=d(t,r))||s.enumerable});return e};var P=(e,t,o)=>(o=e!=null?i(f(e)):{},L(t||!e||!e.__esModule?l(o,"default",{value:e,enumerable:!0}):o,e));var u=p(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.normalizeLocalePath=x;function x(e,t){let o,s=e.split("/");return(t||[]).some(r=>s[1]&&s[1].toLowerCase()===r.toLowerCase()?(o=r,s.splice(1,1),e=s.join("/")||"/",!0):!1),{pathname:e,detectedLocale:o}}});var c=P(u()),w=!0,{normalizeLocalePath:C}=c,{default:n,...z}=c,M=n!==void 0?n:z;export{w as __esModule,M as default,C as normalizeLocalePath};
|
package/src/templates/vendor/esm.sh/v91/next@12.2.5/deno/dist/shared/lib/router/utils/add-locale.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* esm.sh - esbuild bundle(next@12.2.5/dist/shared/lib/router/utils/add-locale) deno production */
|
|
2
|
-
import __next_dist_shared_lib_router_utils_path_has_prefix$ from "/v91/next@12.2.5/deno/dist/shared/lib/router/utils/path-has-prefix.js";import __next_dist_shared_lib_router_utils_add_path_prefix$ from "/v91/next@12.2.5/deno/dist/shared/lib/router/utils/add-path-prefix.js";var x=Object.create;var u=Object.defineProperty;var P=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var p=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty;var s=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(r,t)=>(typeof require!="undefined"?require:r)[t]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var l=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var m=(e,r,t,d)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of c(r))!L.call(e,a)&&a!==t&&u(e,a,{get:()=>r[a],enumerable:!(d=P(r,a))||d.enumerable});return e};var v=(e,r,t)=>(t=e!=null?x(p(e)):{},m(r||!e||!e.__esModule?u(t,"default",{value:e,enumerable:!0}):t,e));var f=l(o=>{"use strict";Object.defineProperty(o,"__esModule",{value:!0});o.addLocale=C;var w=__next_dist_shared_lib_router_utils_add_path_prefix$,i=__next_dist_shared_lib_router_utils_path_has_prefix$;function C(e,r,t,d){return r&&r!==t&&(d||!i.pathHasPrefix(e.toLowerCase(),`/${r.toLowerCase()}`)&&!i.pathHasPrefix(e.toLowerCase(),"/api"))?w.addPathPrefix(e,`/${r}`):e}});var n=v(f()),M=!0,{addLocale:$}=n,{default:_,...H}=n,b=_!==void 0?_:H;export{M as __esModule,$ as addLocale,b as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* esm.sh - esbuild bundle(next@12.2.5/dist/shared/lib/router/utils/add-path-prefix) deno production */
|
|
2
|
-
import __next_dist_shared_lib_router_utils_parse_path$ from "/v91/next@12.2.5/deno/dist/shared/lib/router/utils/parse-path.js";var f=Object.create;var s=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var c=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var l=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var p=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var x=(e,t,r,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of P(t))!h.call(e,a)&&a!==r&&s(e,a,{get:()=>t[a],enumerable:!(u=i(t,a))||u.enumerable});return e};var m=(e,t,r)=>(r=e!=null?f(c(e)):{},x(t||!e||!e.__esModule?s(r,"default",{value:e,enumerable:!0}):r,e));var o=p(d=>{"use strict";Object.defineProperty(d,"__esModule",{value:!0});d.addPathPrefix=q;var $=__next_dist_shared_lib_router_utils_parse_path$;function q(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:u,hash:a}=$.parsePath(e);return`${t}${r}${u}${a}`}});var _=m(o()),b=!0,{addPathPrefix:j}=_,{default:n,...v}=_,O=n!==void 0?n:v;export{b as __esModule,j as addPathPrefix,O as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* esm.sh - esbuild bundle(next@12.2.5/dist/shared/lib/router/utils/add-path-suffix) deno production */
|
|
2
|
-
import __next_dist_shared_lib_router_utils_parse_path$ from "/v91/next@12.2.5/deno/dist/shared/lib/router/utils/parse-path.js";var _=Object.create;var o=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty;var p=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var P=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var x=(e,t,r,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of c(t))!l.call(e,a)&&a!==r&&o(e,a,{get:()=>t[a],enumerable:!(u=i(t,a))||u.enumerable});return e};var m=(e,t,r)=>(r=e!=null?_(h(e)):{},x(t||!e||!e.__esModule?o(r,"default",{value:e,enumerable:!0}):r,e));var s=P(d=>{"use strict";Object.defineProperty(d,"__esModule",{value:!0});d.addPathSuffix=S;var $=__next_dist_shared_lib_router_utils_parse_path$;function S(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:u,hash:a}=$.parsePath(e);return`${r}${t}${u}${a}`}});var n=m(s()),M=!0,{addPathSuffix:b}=n,{default:f,...q}=n,j=f!==void 0?f:q;export{M as __esModule,b as addPathSuffix,j as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* esm.sh - esbuild bundle(next@12.2.5/dist/shared/lib/router/utils/format-next-pathname-info) deno production */
|
|
2
|
-
import __next_dist_shared_lib_router_utils_add_locale$ from "/v91/next@12.2.5/deno/dist/shared/lib/router/utils/add-locale.js";import __next_dist_shared_lib_router_utils_add_path_suffix$ from "/v91/next@12.2.5/deno/dist/shared/lib/router/utils/add-path-suffix.js";import __next_dist_shared_lib_router_utils_add_path_prefix$ from "/v91/next@12.2.5/deno/dist/shared/lib/router/utils/add-path-prefix.js";import __next_dist_shared_lib_router_utils_remove_trailing_slash$ from "/v91/next@12.2.5/deno/dist/shared/lib/router/utils/remove-trailing-slash.js";var x=Object.create;var i=Object.defineProperty;var P=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty;var r=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(a,t)=>(typeof require!="undefined"?require:a)[t]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var p=(e,a)=>()=>(a||e((a={exports:{}}).exports,a),a.exports);var v=(e,a,t,l)=>{if(a&&typeof a=="object"||typeof a=="function")for(let d of _(a))!c.call(e,d)&&d!==t&&i(e,d,{get:()=>a[d],enumerable:!(l=P(a,d))||l.enumerable});return e};var I=(e,a,t)=>(t=e!=null?x(m(e)):{},v(a||!e||!e.__esModule?i(t,"default",{value:e,enumerable:!0}):t,e));var h=p(u=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});u.formatNextPathnameInfo=g;var b=__next_dist_shared_lib_router_utils_remove_trailing_slash$,n=__next_dist_shared_lib_router_utils_add_path_prefix$,o=__next_dist_shared_lib_router_utils_add_path_suffix$,S=__next_dist_shared_lib_router_utils_add_locale$;function g(e){let a=S.addLocale(e.pathname,e.locale,e.buildId?void 0:e.defaultLocale,e.ignorePrefix);return e.buildId&&(a=o.addPathSuffix(n.addPathPrefix(a,`/_next/data/${e.buildId}`),e.pathname==="/"?"index.json":".json")),a=n.addPathPrefix(a,e.basePath),e.trailingSlash?!e.buildId&&!a.endsWith("/")?o.addPathSuffix(a,"/"):a:b.removeTrailingSlash(a)}});var s=I(h()),N=!0,{formatNextPathnameInfo:M}=s,{default:f,...q}=s,T=f!==void 0?f:q;export{N as __esModule,T as default,M as formatNextPathnameInfo};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* esm.sh - esbuild bundle(next@12.2.5/dist/shared/lib/router/utils/get-next-pathname-info) deno production */
|
|
2
|
-
import __next_dist_shared_lib_i18n_normalize_locale_path$ from "/v91/next@12.2.5/deno/dist/shared/lib/i18n/normalize-locale-path.js";import __next_dist_shared_lib_router_utils_path_has_prefix$ from "/v91/next@12.2.5/deno/dist/shared/lib/router/utils/path-has-prefix.js";import __next_dist_shared_lib_router_utils_remove_path_prefix$ from "/v91/next@12.2.5/deno/dist/shared/lib/router/utils/remove-path-prefix.js";var m=Object.create;var h=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var l=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(a,n)=>(typeof require!="undefined"?require:a)[n]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var g=(e,a)=>()=>(a||e((a={exports:{}}).exports,a),a.exports);var b=(e,a,n,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let r of x(a))!v.call(e,r)&&r!==n&&h(e,r,{get:()=>a[r],enumerable:!(i=_(a,r))||i.enumerable});return e};var I=(e,a,n)=>(n=e!=null?m(P(e)):{},b(a||!e||!e.__esModule?h(n,"default",{value:e,enumerable:!0}):n,e));var d=g(s=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});s.getNextPathnameInfo=N;var j=__next_dist_shared_lib_i18n_normalize_locale_path$,L=__next_dist_shared_lib_router_utils_remove_path_prefix$,q=__next_dist_shared_lib_router_utils_path_has_prefix$;function N(e,a){var n;let{basePath:i,i18n:r,trailingSlash:c}=(n=a.nextConfig)!=null?n:{},t={pathname:e,trailingSlash:e!=="/"?e.endsWith("/"):c};if(i&&q.pathHasPrefix(t.pathname,i)&&(t.pathname=L.removePathPrefix(t.pathname,i),t.basePath=i),a.parseData===!0&&t.pathname.startsWith("/_next/data/")&&t.pathname.endsWith(".json")){let o=t.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/"),f=o[0];t.pathname=o[1]!=="index"?`/${o.slice(1).join("/")}`:"/",t.buildId=f}if(r){let o=j.normalizeLocalePath(t.pathname,r.locales);t.locale=o?.detectedLocale,t.pathname=o?.pathname||t.pathname}return t}});var u=I(d()),H=!0,{getNextPathnameInfo:M}=u,{default:p,...W}=u,S=p!==void 0?p:W;export{H as __esModule,S as default,M as getNextPathnameInfo};
|
package/src/templates/vendor/esm.sh/v91/next@12.2.5/deno/dist/shared/lib/router/utils/parse-path.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* esm.sh - esbuild bundle(next@12.2.5/dist/shared/lib/router/utils/parse-path) deno production */
|
|
2
|
-
var f=Object.create;var o=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var l=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var x=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var m=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of _(e))!h.call(t,n)&&n!==r&&o(t,n,{get:()=>e[n],enumerable:!(s=c(e,n))||s.enumerable});return t};var p=(t,e,r)=>(r=t!=null?f(l(t)):{},m(e||!t||!t.__esModule?o(r,"default",{value:t,enumerable:!0}):r,t));var d=x(u=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});u.parsePath=y;function y(t){let e=t.indexOf("#"),r=t.indexOf("?"),s=r>-1&&(e<0||r<e);return s||e>-1?{pathname:t.substring(0,s?r:e),query:s?t.substring(r,e>-1?e:void 0):"",hash:e>-1?t.slice(e):""}:{pathname:t,query:"",hash:""}}});var i=p(d()),O=!0,{parsePath:g}=i,{default:a,...P}=i,I=a!==void 0?a:P;export{O as __esModule,I as default,g as parsePath};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* esm.sh - esbuild bundle(next@12.2.5/dist/shared/lib/router/utils/path-has-prefix) deno production */
|
|
2
|
-
import __next_dist_shared_lib_router_utils_parse_path$ from "/v91/next@12.2.5/deno/dist/shared/lib/router/utils/parse-path.js";var _=Object.create;var u=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var l=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty;var h=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var P=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var x=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of d(t))!c.call(e,a)&&a!==r&&u(e,a,{get:()=>t[a],enumerable:!(o=p(t,a))||o.enumerable});return e};var m=(e,t,r)=>(r=e!=null?_(l(e)):{},x(t||!e||!e.__esModule?u(r,"default",{value:e,enumerable:!0}):r,e));var n=P(s=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});s.pathHasPrefix=v;var H=__next_dist_shared_lib_router_utils_parse_path$;function v(e,t){if(typeof e!="string")return!1;let{pathname:r}=H.parsePath(e);return r===t||r.startsWith(t+"/")}});var i=m(n()),g=!0,{pathHasPrefix:j}=i,{default:f,...y}=i,q=f!==void 0?f:y;export{g as __esModule,q as default,j as pathHasPrefix};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* esm.sh - esbuild bundle(next@12.2.5/dist/shared/lib/router/utils/remove-path-prefix) deno production */
|
|
2
|
-
import __next_dist_shared_lib_router_utils_path_has_prefix$ from "/v91/next@12.2.5/deno/dist/shared/lib/router/utils/path-has-prefix.js";var _=Object.create;var s=Object.defineProperty;var P=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var l=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty;var x=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var h=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var m=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of d(t))!c.call(e,o)&&o!==r&&s(e,o,{get:()=>t[o],enumerable:!(i=P(t,o))||i.enumerable});return e};var v=(e,t,r)=>(r=e!=null?_(l(e)):{},m(t||!e||!e.__esModule?s(r,"default",{value:e,enumerable:!0}):r,e));var f=h(u=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});u.removePathPrefix=H;var p=__next_dist_shared_lib_router_utils_path_has_prefix$;function H(e,t){if(p.pathHasPrefix(e,t)){let r=e.slice(t.length);return r.startsWith("/")?r:`/${r}`}return e}});var n=v(f()),j=!0,{removePathPrefix:q}=n,{default:a,...M}=n,w=a!==void 0?a:M;export{j as __esModule,w as default,q as removePathPrefix};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* esm.sh - esbuild bundle(next@12.2.5/dist/shared/lib/router/utils/remove-trailing-slash) deno production */
|
|
2
|
-
var _=Object.create;var a=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var f=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty;var p=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var v=(e,r,t,u)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of c(r))!m.call(e,o)&&o!==t&&a(e,o,{get:()=>r[o],enumerable:!(u=d(r,o))||u.enumerable});return e};var g=(e,r,t)=>(t=e!=null?_(f(e)):{},v(r||!e||!e.__esModule?a(t,"default",{value:e,enumerable:!0}):t,e));var n=p(l=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0});l.removeTrailingSlash=h;function h(e){return e.replace(/\/$/,"")||"/"}});var i=g(n()),M=!0,{removeTrailingSlash:b}=i,{default:s,...x}=i,j=s!==void 0?s:x;export{M as __esModule,j as default,b as removeTrailingSlash};
|