vercel 23.1.3-canary.27 → 23.1.3-canary.30
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/dist/index.js +291 -128
- package/package.json +7 -7
package/dist/index.js
CHANGED
@@ -216884,15 +216884,161 @@ module.exports = new Type('tag:yaml.org,2002:timestamp', {
|
|
216884
216884
|
});
|
216885
216885
|
|
216886
216886
|
|
216887
|
+
/***/ }),
|
216888
|
+
|
216889
|
+
/***/ 7276:
|
216890
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_905327__) {
|
216891
|
+
|
216892
|
+
"use strict";
|
216893
|
+
|
216894
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
216895
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
216896
|
+
};
|
216897
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
216898
|
+
exports.updateFunctionsManifest = exports.convertRuntimeToPlugin = void 0;
|
216899
|
+
const fs_extra_1 = __importDefault(__nested_webpack_require_905327__(5392));
|
216900
|
+
const path_1 = __nested_webpack_require_905327__(5622);
|
216901
|
+
const glob_1 = __importDefault(__nested_webpack_require_905327__(4240));
|
216902
|
+
const normalize_path_1 = __nested_webpack_require_905327__(6261);
|
216903
|
+
const lambda_1 = __nested_webpack_require_905327__(6721);
|
216904
|
+
const minimatch_1 = __importDefault(__nested_webpack_require_905327__(9566));
|
216905
|
+
/**
|
216906
|
+
* Convert legacy Runtime to a Plugin.
|
216907
|
+
* @param buildRuntime - a legacy build() function from a Runtime
|
216908
|
+
* @param ext - the file extension, for example `.py`
|
216909
|
+
*/
|
216910
|
+
function convertRuntimeToPlugin(buildRuntime, ext) {
|
216911
|
+
return async function build({ workPath }) {
|
216912
|
+
const opts = { cwd: workPath };
|
216913
|
+
const files = await glob_1.default('**', opts);
|
216914
|
+
delete files['vercel.json']; // Builders/Runtimes didn't have vercel.json
|
216915
|
+
const entrypoints = await glob_1.default(`api/**/*${ext}`, opts);
|
216916
|
+
const pages = {};
|
216917
|
+
const { functions = {} } = await readVercelConfig(workPath);
|
216918
|
+
const traceDir = path_1.join(workPath, '.output', 'runtime-traced-files');
|
216919
|
+
await fs_extra_1.default.ensureDir(traceDir);
|
216920
|
+
for (const entrypoint of Object.keys(entrypoints)) {
|
216921
|
+
const key = Object.keys(functions).find(src => src === entrypoint || minimatch_1.default(entrypoint, src)) || '';
|
216922
|
+
const config = functions[key] || {};
|
216923
|
+
const { output } = await buildRuntime({
|
216924
|
+
files,
|
216925
|
+
entrypoint,
|
216926
|
+
workPath,
|
216927
|
+
config: {
|
216928
|
+
zeroConfig: true,
|
216929
|
+
includeFiles: config.includeFiles,
|
216930
|
+
excludeFiles: config.excludeFiles,
|
216931
|
+
},
|
216932
|
+
});
|
216933
|
+
pages[entrypoint] = {
|
216934
|
+
handler: output.handler,
|
216935
|
+
runtime: output.runtime,
|
216936
|
+
memory: output.memory,
|
216937
|
+
maxDuration: output.maxDuration,
|
216938
|
+
environment: output.environment,
|
216939
|
+
allowQuery: output.allowQuery,
|
216940
|
+
regions: output.regions,
|
216941
|
+
};
|
216942
|
+
// @ts-ignore This symbol is a private API
|
216943
|
+
const lambdaFiles = output[lambda_1.FILES_SYMBOL];
|
216944
|
+
const entry = path_1.join(workPath, '.output', 'server', 'pages', entrypoint);
|
216945
|
+
await fs_extra_1.default.ensureDir(path_1.dirname(entry));
|
216946
|
+
await linkOrCopy(files[entrypoint].fsPath, entry);
|
216947
|
+
const tracedFiles = [];
|
216948
|
+
Object.entries(lambdaFiles).forEach(async ([relPath, file]) => {
|
216949
|
+
const newPath = path_1.join(traceDir, relPath);
|
216950
|
+
tracedFiles.push({ absolutePath: newPath, relativePath: relPath });
|
216951
|
+
if (file.fsPath) {
|
216952
|
+
await linkOrCopy(file.fsPath, newPath);
|
216953
|
+
}
|
216954
|
+
else if (file.type === 'FileBlob') {
|
216955
|
+
const { data, mode } = file;
|
216956
|
+
await fs_extra_1.default.writeFile(newPath, data, { mode });
|
216957
|
+
}
|
216958
|
+
else {
|
216959
|
+
throw new Error(`Unknown file type: ${file.type}`);
|
216960
|
+
}
|
216961
|
+
});
|
216962
|
+
const nft = path_1.join(workPath, '.output', 'server', 'pages', `${entrypoint}.nft.json`);
|
216963
|
+
const json = JSON.stringify({
|
216964
|
+
version: 1,
|
216965
|
+
files: tracedFiles.map(f => ({
|
216966
|
+
input: normalize_path_1.normalizePath(path_1.relative(nft, f.absolutePath)),
|
216967
|
+
output: normalize_path_1.normalizePath(f.relativePath),
|
216968
|
+
})),
|
216969
|
+
});
|
216970
|
+
await fs_extra_1.default.ensureDir(path_1.dirname(nft));
|
216971
|
+
await fs_extra_1.default.writeFile(nft, json);
|
216972
|
+
}
|
216973
|
+
await updateFunctionsManifest({ workPath, pages });
|
216974
|
+
};
|
216975
|
+
}
|
216976
|
+
exports.convertRuntimeToPlugin = convertRuntimeToPlugin;
|
216977
|
+
async function linkOrCopy(existingPath, newPath) {
|
216978
|
+
try {
|
216979
|
+
await fs_extra_1.default.createLink(existingPath, newPath);
|
216980
|
+
}
|
216981
|
+
catch (err) {
|
216982
|
+
if (err.code !== 'EEXIST') {
|
216983
|
+
await fs_extra_1.default.copyFile(existingPath, newPath);
|
216984
|
+
}
|
216985
|
+
}
|
216986
|
+
}
|
216987
|
+
async function readJson(filePath) {
|
216988
|
+
try {
|
216989
|
+
const str = await fs_extra_1.default.readFile(filePath, 'utf8');
|
216990
|
+
return JSON.parse(str);
|
216991
|
+
}
|
216992
|
+
catch (err) {
|
216993
|
+
if (err.code === 'ENOENT') {
|
216994
|
+
return {};
|
216995
|
+
}
|
216996
|
+
throw err;
|
216997
|
+
}
|
216998
|
+
}
|
216999
|
+
async function readVercelConfig(workPath) {
|
217000
|
+
const vercelJsonPath = path_1.join(workPath, 'vercel.json');
|
217001
|
+
return readJson(vercelJsonPath);
|
217002
|
+
}
|
217003
|
+
/**
|
217004
|
+
* If `.output/functions-manifest.json` exists, append to the pages
|
217005
|
+
* property. Otherwise write a new file. This will also read `vercel.json`
|
217006
|
+
* and apply relevant `functions` property config.
|
217007
|
+
*/
|
217008
|
+
async function updateFunctionsManifest({ workPath, pages, }) {
|
217009
|
+
const functionsManifestPath = path_1.join(workPath, '.output', 'functions-manifest.json');
|
217010
|
+
const vercelConfig = await readVercelConfig(workPath);
|
217011
|
+
const functionsManifest = await readJson(functionsManifestPath);
|
217012
|
+
if (!functionsManifest.version)
|
217013
|
+
functionsManifest.version = 1;
|
217014
|
+
if (!functionsManifest.pages)
|
217015
|
+
functionsManifest.pages = {};
|
217016
|
+
for (const [pageKey, pageConfig] of Object.entries(pages)) {
|
217017
|
+
const fnConfig = await lambda_1.getLambdaOptionsFromFunction({
|
217018
|
+
sourceFile: pageKey,
|
217019
|
+
config: vercelConfig,
|
217020
|
+
});
|
217021
|
+
functionsManifest.pages[pageKey] = {
|
217022
|
+
...pageConfig,
|
217023
|
+
memory: fnConfig.memory || pageConfig.memory,
|
217024
|
+
maxDuration: fnConfig.maxDuration || pageConfig.maxDuration,
|
217025
|
+
regions: vercelConfig.regions || pageConfig.regions,
|
217026
|
+
};
|
217027
|
+
}
|
217028
|
+
await fs_extra_1.default.writeFile(functionsManifestPath, JSON.stringify(functionsManifest));
|
217029
|
+
}
|
217030
|
+
exports.updateFunctionsManifest = updateFunctionsManifest;
|
217031
|
+
|
217032
|
+
|
216887
217033
|
/***/ }),
|
216888
217034
|
|
216889
217035
|
/***/ 1868:
|
216890
|
-
/***/ ((__unused_webpack_module, exports,
|
217036
|
+
/***/ ((__unused_webpack_module, exports, __nested_webpack_require_911451__) => {
|
216891
217037
|
|
216892
217038
|
"use strict";
|
216893
217039
|
|
216894
217040
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
216895
|
-
const _1 =
|
217041
|
+
const _1 = __nested_webpack_require_911451__(2855);
|
216896
217042
|
function debug(message, ...additional) {
|
216897
217043
|
if (_1.getPlatformEnv('BUILDER_DEBUG')) {
|
216898
217044
|
console.log(message, ...additional);
|
@@ -216904,7 +217050,7 @@ exports.default = debug;
|
|
216904
217050
|
/***/ }),
|
216905
217051
|
|
216906
217052
|
/***/ 4246:
|
216907
|
-
/***/ (function(__unused_webpack_module, exports,
|
217053
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_911836__) {
|
216908
217054
|
|
216909
217055
|
"use strict";
|
216910
217056
|
|
@@ -216913,11 +217059,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
216913
217059
|
};
|
216914
217060
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
216915
217061
|
exports.detectBuilders = exports.detectOutputDirectory = exports.detectApiDirectory = exports.detectApiExtensions = exports.sortFiles = void 0;
|
216916
|
-
const minimatch_1 = __importDefault(
|
216917
|
-
const semver_1 =
|
216918
|
-
const path_1 =
|
216919
|
-
const frameworks_1 = __importDefault(
|
216920
|
-
const _1 =
|
217062
|
+
const minimatch_1 = __importDefault(__nested_webpack_require_911836__(9566));
|
217063
|
+
const semver_1 = __nested_webpack_require_911836__(2879);
|
217064
|
+
const path_1 = __nested_webpack_require_911836__(5622);
|
217065
|
+
const frameworks_1 = __importDefault(__nested_webpack_require_911836__(8438));
|
217066
|
+
const _1 = __nested_webpack_require_911836__(2855);
|
216921
217067
|
const slugToFramework = new Map(frameworks_1.default.map(f => [f.slug, f]));
|
216922
217068
|
// We need to sort the file paths by alphabet to make
|
216923
217069
|
// sure the routes stay in the same order e.g. for deduping
|
@@ -217923,7 +218069,7 @@ function getSuggestion(topLevelProp, additionalProperty) {
|
|
217923
218069
|
/***/ }),
|
217924
218070
|
|
217925
218071
|
/***/ 2397:
|
217926
|
-
/***/ (function(__unused_webpack_module, exports,
|
218072
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_948678__) {
|
217927
218073
|
|
217928
218074
|
"use strict";
|
217929
218075
|
|
@@ -217931,8 +218077,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
217931
218077
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
217932
218078
|
};
|
217933
218079
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
217934
|
-
const assert_1 = __importDefault(
|
217935
|
-
const into_stream_1 = __importDefault(
|
218080
|
+
const assert_1 = __importDefault(__nested_webpack_require_948678__(2357));
|
218081
|
+
const into_stream_1 = __importDefault(__nested_webpack_require_948678__(6130));
|
217936
218082
|
class FileBlob {
|
217937
218083
|
constructor({ mode = 0o100644, contentType, data }) {
|
217938
218084
|
assert_1.default(typeof mode === 'number');
|
@@ -217964,7 +218110,7 @@ exports.default = FileBlob;
|
|
217964
218110
|
/***/ }),
|
217965
218111
|
|
217966
218112
|
/***/ 9331:
|
217967
|
-
/***/ (function(__unused_webpack_module, exports,
|
218113
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_950130__) {
|
217968
218114
|
|
217969
218115
|
"use strict";
|
217970
218116
|
|
@@ -217972,11 +218118,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
217972
218118
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
217973
218119
|
};
|
217974
218120
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
217975
|
-
const assert_1 = __importDefault(
|
217976
|
-
const fs_extra_1 = __importDefault(
|
217977
|
-
const multistream_1 = __importDefault(
|
217978
|
-
const path_1 = __importDefault(
|
217979
|
-
const async_sema_1 = __importDefault(
|
218121
|
+
const assert_1 = __importDefault(__nested_webpack_require_950130__(2357));
|
218122
|
+
const fs_extra_1 = __importDefault(__nested_webpack_require_950130__(5392));
|
218123
|
+
const multistream_1 = __importDefault(__nested_webpack_require_950130__(8179));
|
218124
|
+
const path_1 = __importDefault(__nested_webpack_require_950130__(5622));
|
218125
|
+
const async_sema_1 = __importDefault(__nested_webpack_require_950130__(5758));
|
217980
218126
|
const semaToPreventEMFILE = new async_sema_1.default(20);
|
217981
218127
|
class FileFsRef {
|
217982
218128
|
constructor({ mode = 0o100644, contentType, fsPath }) {
|
@@ -218042,7 +218188,7 @@ exports.default = FileFsRef;
|
|
218042
218188
|
/***/ }),
|
218043
218189
|
|
218044
218190
|
/***/ 5187:
|
218045
|
-
/***/ (function(__unused_webpack_module, exports,
|
218191
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_952934__) {
|
218046
218192
|
|
218047
218193
|
"use strict";
|
218048
218194
|
|
@@ -218050,11 +218196,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
218050
218196
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
218051
218197
|
};
|
218052
218198
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
218053
|
-
const assert_1 = __importDefault(
|
218054
|
-
const node_fetch_1 = __importDefault(
|
218055
|
-
const multistream_1 = __importDefault(
|
218056
|
-
const async_retry_1 = __importDefault(
|
218057
|
-
const async_sema_1 = __importDefault(
|
218199
|
+
const assert_1 = __importDefault(__nested_webpack_require_952934__(2357));
|
218200
|
+
const node_fetch_1 = __importDefault(__nested_webpack_require_952934__(2197));
|
218201
|
+
const multistream_1 = __importDefault(__nested_webpack_require_952934__(8179));
|
218202
|
+
const async_retry_1 = __importDefault(__nested_webpack_require_952934__(3691));
|
218203
|
+
const async_sema_1 = __importDefault(__nested_webpack_require_952934__(5758));
|
218058
218204
|
const semaToDownloadFromS3 = new async_sema_1.default(5);
|
218059
218205
|
class BailableError extends Error {
|
218060
218206
|
constructor(...args) {
|
@@ -218135,7 +218281,7 @@ exports.default = FileRef;
|
|
218135
218281
|
/***/ }),
|
218136
218282
|
|
218137
218283
|
/***/ 1611:
|
218138
|
-
/***/ (function(__unused_webpack_module, exports,
|
218284
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_956335__) {
|
218139
218285
|
|
218140
218286
|
"use strict";
|
218141
218287
|
|
@@ -218144,10 +218290,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
218144
218290
|
};
|
218145
218291
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
218146
218292
|
exports.isSymbolicLink = void 0;
|
218147
|
-
const path_1 = __importDefault(
|
218148
|
-
const debug_1 = __importDefault(
|
218149
|
-
const file_fs_ref_1 = __importDefault(
|
218150
|
-
const fs_extra_1 =
|
218293
|
+
const path_1 = __importDefault(__nested_webpack_require_956335__(5622));
|
218294
|
+
const debug_1 = __importDefault(__nested_webpack_require_956335__(1868));
|
218295
|
+
const file_fs_ref_1 = __importDefault(__nested_webpack_require_956335__(9331));
|
218296
|
+
const fs_extra_1 = __nested_webpack_require_956335__(5392);
|
218151
218297
|
const S_IFMT = 61440; /* 0170000 type of file */
|
218152
218298
|
const S_IFLNK = 40960; /* 0120000 symbolic link */
|
218153
218299
|
function isSymbolicLink(mode) {
|
@@ -218209,14 +218355,14 @@ exports.default = download;
|
|
218209
218355
|
/***/ }),
|
218210
218356
|
|
218211
218357
|
/***/ 3838:
|
218212
|
-
/***/ ((__unused_webpack_module, exports,
|
218358
|
+
/***/ ((__unused_webpack_module, exports, __nested_webpack_require_959160__) => {
|
218213
218359
|
|
218214
218360
|
"use strict";
|
218215
218361
|
|
218216
218362
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
218217
|
-
const path_1 =
|
218218
|
-
const os_1 =
|
218219
|
-
const fs_extra_1 =
|
218363
|
+
const path_1 = __nested_webpack_require_959160__(5622);
|
218364
|
+
const os_1 = __nested_webpack_require_959160__(2087);
|
218365
|
+
const fs_extra_1 = __nested_webpack_require_959160__(5392);
|
218220
218366
|
async function getWritableDirectory() {
|
218221
218367
|
const name = Math.floor(Math.random() * 0x7fffffff).toString(16);
|
218222
218368
|
const directory = path_1.join(os_1.tmpdir(), name);
|
@@ -218229,7 +218375,7 @@ exports.default = getWritableDirectory;
|
|
218229
218375
|
/***/ }),
|
218230
218376
|
|
218231
218377
|
/***/ 4240:
|
218232
|
-
/***/ (function(__unused_webpack_module, exports,
|
218378
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_959740__) {
|
218233
218379
|
|
218234
218380
|
"use strict";
|
218235
218381
|
|
@@ -218237,13 +218383,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
218237
218383
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
218238
218384
|
};
|
218239
218385
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
218240
|
-
const path_1 = __importDefault(
|
218241
|
-
const assert_1 = __importDefault(
|
218242
|
-
const glob_1 = __importDefault(
|
218243
|
-
const util_1 =
|
218244
|
-
const fs_extra_1 =
|
218245
|
-
const normalize_path_1 =
|
218246
|
-
const file_fs_ref_1 = __importDefault(
|
218386
|
+
const path_1 = __importDefault(__nested_webpack_require_959740__(5622));
|
218387
|
+
const assert_1 = __importDefault(__nested_webpack_require_959740__(2357));
|
218388
|
+
const glob_1 = __importDefault(__nested_webpack_require_959740__(1104));
|
218389
|
+
const util_1 = __nested_webpack_require_959740__(1669);
|
218390
|
+
const fs_extra_1 = __nested_webpack_require_959740__(5392);
|
218391
|
+
const normalize_path_1 = __nested_webpack_require_959740__(6261);
|
218392
|
+
const file_fs_ref_1 = __importDefault(__nested_webpack_require_959740__(9331));
|
218247
218393
|
const vanillaGlob = util_1.promisify(glob_1.default);
|
218248
218394
|
async function glob(pattern, opts, mountpoint) {
|
218249
218395
|
let options;
|
@@ -218289,7 +218435,7 @@ exports.default = glob;
|
|
218289
218435
|
/***/ }),
|
218290
218436
|
|
218291
218437
|
/***/ 7903:
|
218292
|
-
/***/ (function(__unused_webpack_module, exports,
|
218438
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_961936__) {
|
218293
218439
|
|
218294
218440
|
"use strict";
|
218295
218441
|
|
@@ -218298,9 +218444,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
218298
218444
|
};
|
218299
218445
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
218300
218446
|
exports.getSupportedNodeVersion = exports.getDiscontinuedNodeVersions = exports.getLatestNodeVersion = void 0;
|
218301
|
-
const semver_1 =
|
218302
|
-
const errors_1 =
|
218303
|
-
const debug_1 = __importDefault(
|
218447
|
+
const semver_1 = __nested_webpack_require_961936__(2879);
|
218448
|
+
const errors_1 = __nested_webpack_require_961936__(3983);
|
218449
|
+
const debug_1 = __importDefault(__nested_webpack_require_961936__(1868));
|
218304
218450
|
const allOptions = [
|
218305
218451
|
{ major: 14, range: '14.x', runtime: 'nodejs14.x' },
|
218306
218452
|
{ major: 12, range: '12.x', runtime: 'nodejs12.x' },
|
@@ -218394,7 +218540,7 @@ exports.normalizePath = normalizePath;
|
|
218394
218540
|
/***/ }),
|
218395
218541
|
|
218396
218542
|
/***/ 7792:
|
218397
|
-
/***/ (function(__unused_webpack_module, exports,
|
218543
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_965804__) {
|
218398
218544
|
|
218399
218545
|
"use strict";
|
218400
218546
|
|
@@ -218403,9 +218549,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
218403
218549
|
};
|
218404
218550
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
218405
218551
|
exports.readConfigFile = void 0;
|
218406
|
-
const js_yaml_1 = __importDefault(
|
218407
|
-
const toml_1 = __importDefault(
|
218408
|
-
const fs_extra_1 =
|
218552
|
+
const js_yaml_1 = __importDefault(__nested_webpack_require_965804__(6540));
|
218553
|
+
const toml_1 = __importDefault(__nested_webpack_require_965804__(9434));
|
218554
|
+
const fs_extra_1 = __nested_webpack_require_965804__(5392);
|
218409
218555
|
async function readFileOrNull(file) {
|
218410
218556
|
try {
|
218411
218557
|
const data = await fs_extra_1.readFile(file);
|
@@ -218460,7 +218606,7 @@ exports.default = rename;
|
|
218460
218606
|
/***/ }),
|
218461
218607
|
|
218462
218608
|
/***/ 1442:
|
218463
|
-
/***/ (function(__unused_webpack_module, exports,
|
218609
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_967597__) {
|
218464
218610
|
|
218465
218611
|
"use strict";
|
218466
218612
|
|
@@ -218469,14 +218615,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
218469
218615
|
};
|
218470
218616
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
218471
218617
|
exports.installDependencies = exports.getScriptName = exports.runPipInstall = exports.runBundleInstall = exports.runPackageJsonScript = exports.runNpmInstall = exports.walkParentDirs = exports.scanParentDirs = exports.getNodeVersion = exports.getSpawnOptions = exports.runShellScript = exports.getNodeBinPath = exports.execCommand = exports.spawnCommand = exports.execAsync = exports.spawnAsync = void 0;
|
218472
|
-
const assert_1 = __importDefault(
|
218473
|
-
const fs_extra_1 = __importDefault(
|
218474
|
-
const path_1 = __importDefault(
|
218475
|
-
const debug_1 = __importDefault(
|
218476
|
-
const cross_spawn_1 = __importDefault(
|
218477
|
-
const util_1 =
|
218478
|
-
const errors_1 =
|
218479
|
-
const node_version_1 =
|
218618
|
+
const assert_1 = __importDefault(__nested_webpack_require_967597__(2357));
|
218619
|
+
const fs_extra_1 = __importDefault(__nested_webpack_require_967597__(5392));
|
218620
|
+
const path_1 = __importDefault(__nested_webpack_require_967597__(5622));
|
218621
|
+
const debug_1 = __importDefault(__nested_webpack_require_967597__(1868));
|
218622
|
+
const cross_spawn_1 = __importDefault(__nested_webpack_require_967597__(7618));
|
218623
|
+
const util_1 = __nested_webpack_require_967597__(1669);
|
218624
|
+
const errors_1 = __nested_webpack_require_967597__(3983);
|
218625
|
+
const node_version_1 = __nested_webpack_require_967597__(7903);
|
218480
218626
|
function spawnAsync(command, args, opts = {}) {
|
218481
218627
|
return new Promise((resolve, reject) => {
|
218482
218628
|
const stderrLogs = [];
|
@@ -218787,7 +218933,7 @@ exports.installDependencies = util_1.deprecate(runNpmInstall, 'installDependenci
|
|
218787
218933
|
/***/ }),
|
218788
218934
|
|
218789
218935
|
/***/ 2560:
|
218790
|
-
/***/ (function(__unused_webpack_module, exports,
|
218936
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_981587__) {
|
218791
218937
|
|
218792
218938
|
"use strict";
|
218793
218939
|
|
@@ -218795,7 +218941,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
218795
218941
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
218796
218942
|
};
|
218797
218943
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
218798
|
-
const end_of_stream_1 = __importDefault(
|
218944
|
+
const end_of_stream_1 = __importDefault(__nested_webpack_require_981587__(687));
|
218799
218945
|
function streamToBuffer(stream) {
|
218800
218946
|
return new Promise((resolve, reject) => {
|
218801
218947
|
const buffers = [];
|
@@ -218824,7 +218970,7 @@ exports.default = streamToBuffer;
|
|
218824
218970
|
/***/ }),
|
218825
218971
|
|
218826
218972
|
/***/ 2855:
|
218827
|
-
/***/ (function(__unused_webpack_module, exports,
|
218973
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_982655__) {
|
218828
218974
|
|
218829
218975
|
"use strict";
|
218830
218976
|
|
@@ -218854,29 +219000,29 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
218854
219000
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
218855
219001
|
};
|
218856
219002
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
218857
|
-
exports.getPlatformEnv = exports.isStaticRuntime = exports.isOfficialRuntime = exports.normalizePath = exports.readConfigFile = exports.DetectorFilesystem = exports.detectFramework = exports.detectApiExtensions = exports.detectApiDirectory = exports.detectOutputDirectory = exports.detectBuilders = exports.scanParentDirs = exports.getLambdaOptionsFromFunction = exports.isSymbolicLink = exports.debug = exports.shouldServe = exports.streamToBuffer = exports.getSpawnOptions = exports.getDiscontinuedNodeVersions = exports.getLatestNodeVersion = exports.getNodeVersion = exports.runShellScript = exports.runPipInstall = exports.runBundleInstall = exports.runNpmInstall = exports.getNodeBinPath = exports.walkParentDirs = exports.spawnCommand = exports.execCommand = exports.runPackageJsonScript = exports.installDependencies = exports.getScriptName = exports.spawnAsync = exports.execAsync = exports.rename = exports.glob = exports.getWriteableDirectory = exports.download = exports.Prerender = exports.createLambda = exports.Lambda = exports.FileRef = exports.FileFsRef = exports.FileBlob = void 0;
|
218858
|
-
const file_blob_1 = __importDefault(
|
219003
|
+
exports.getPlatformEnv = exports.isStaticRuntime = exports.isOfficialRuntime = exports.updateFunctionsManifest = exports.convertRuntimeToPlugin = exports.normalizePath = exports.readConfigFile = exports.DetectorFilesystem = exports.detectFramework = exports.detectApiExtensions = exports.detectApiDirectory = exports.detectOutputDirectory = exports.detectBuilders = exports.scanParentDirs = exports.getLambdaOptionsFromFunction = exports.isSymbolicLink = exports.debug = exports.shouldServe = exports.streamToBuffer = exports.getSpawnOptions = exports.getDiscontinuedNodeVersions = exports.getLatestNodeVersion = exports.getNodeVersion = exports.runShellScript = exports.runPipInstall = exports.runBundleInstall = exports.runNpmInstall = exports.getNodeBinPath = exports.walkParentDirs = exports.spawnCommand = exports.execCommand = exports.runPackageJsonScript = exports.installDependencies = exports.getScriptName = exports.spawnAsync = exports.execAsync = exports.rename = exports.glob = exports.getWriteableDirectory = exports.download = exports.Prerender = exports.createLambda = exports.Lambda = exports.FileRef = exports.FileFsRef = exports.FileBlob = void 0;
|
219004
|
+
const file_blob_1 = __importDefault(__nested_webpack_require_982655__(2397));
|
218859
219005
|
exports.FileBlob = file_blob_1.default;
|
218860
|
-
const file_fs_ref_1 = __importDefault(
|
219006
|
+
const file_fs_ref_1 = __importDefault(__nested_webpack_require_982655__(9331));
|
218861
219007
|
exports.FileFsRef = file_fs_ref_1.default;
|
218862
|
-
const file_ref_1 = __importDefault(
|
219008
|
+
const file_ref_1 = __importDefault(__nested_webpack_require_982655__(5187));
|
218863
219009
|
exports.FileRef = file_ref_1.default;
|
218864
|
-
const lambda_1 =
|
219010
|
+
const lambda_1 = __nested_webpack_require_982655__(6721);
|
218865
219011
|
Object.defineProperty(exports, "Lambda", ({ enumerable: true, get: function () { return lambda_1.Lambda; } }));
|
218866
219012
|
Object.defineProperty(exports, "createLambda", ({ enumerable: true, get: function () { return lambda_1.createLambda; } }));
|
218867
219013
|
Object.defineProperty(exports, "getLambdaOptionsFromFunction", ({ enumerable: true, get: function () { return lambda_1.getLambdaOptionsFromFunction; } }));
|
218868
|
-
const prerender_1 =
|
219014
|
+
const prerender_1 = __nested_webpack_require_982655__(2850);
|
218869
219015
|
Object.defineProperty(exports, "Prerender", ({ enumerable: true, get: function () { return prerender_1.Prerender; } }));
|
218870
|
-
const download_1 = __importStar(
|
219016
|
+
const download_1 = __importStar(__nested_webpack_require_982655__(1611));
|
218871
219017
|
exports.download = download_1.default;
|
218872
219018
|
Object.defineProperty(exports, "isSymbolicLink", ({ enumerable: true, get: function () { return download_1.isSymbolicLink; } }));
|
218873
|
-
const get_writable_directory_1 = __importDefault(
|
219019
|
+
const get_writable_directory_1 = __importDefault(__nested_webpack_require_982655__(3838));
|
218874
219020
|
exports.getWriteableDirectory = get_writable_directory_1.default;
|
218875
|
-
const glob_1 = __importDefault(
|
219021
|
+
const glob_1 = __importDefault(__nested_webpack_require_982655__(4240));
|
218876
219022
|
exports.glob = glob_1.default;
|
218877
|
-
const rename_1 = __importDefault(
|
219023
|
+
const rename_1 = __importDefault(__nested_webpack_require_982655__(6718));
|
218878
219024
|
exports.rename = rename_1.default;
|
218879
|
-
const run_user_scripts_1 =
|
219025
|
+
const run_user_scripts_1 = __nested_webpack_require_982655__(1442);
|
218880
219026
|
Object.defineProperty(exports, "execAsync", ({ enumerable: true, get: function () { return run_user_scripts_1.execAsync; } }));
|
218881
219027
|
Object.defineProperty(exports, "spawnAsync", ({ enumerable: true, get: function () { return run_user_scripts_1.spawnAsync; } }));
|
218882
219028
|
Object.defineProperty(exports, "execCommand", ({ enumerable: true, get: function () { return run_user_scripts_1.execCommand; } }));
|
@@ -218893,32 +219039,35 @@ Object.defineProperty(exports, "getNodeVersion", ({ enumerable: true, get: funct
|
|
218893
219039
|
Object.defineProperty(exports, "getSpawnOptions", ({ enumerable: true, get: function () { return run_user_scripts_1.getSpawnOptions; } }));
|
218894
219040
|
Object.defineProperty(exports, "getNodeBinPath", ({ enumerable: true, get: function () { return run_user_scripts_1.getNodeBinPath; } }));
|
218895
219041
|
Object.defineProperty(exports, "scanParentDirs", ({ enumerable: true, get: function () { return run_user_scripts_1.scanParentDirs; } }));
|
218896
|
-
const node_version_1 =
|
219042
|
+
const node_version_1 = __nested_webpack_require_982655__(7903);
|
218897
219043
|
Object.defineProperty(exports, "getLatestNodeVersion", ({ enumerable: true, get: function () { return node_version_1.getLatestNodeVersion; } }));
|
218898
219044
|
Object.defineProperty(exports, "getDiscontinuedNodeVersions", ({ enumerable: true, get: function () { return node_version_1.getDiscontinuedNodeVersions; } }));
|
218899
|
-
const errors_1 =
|
218900
|
-
const stream_to_buffer_1 = __importDefault(
|
219045
|
+
const errors_1 = __nested_webpack_require_982655__(3983);
|
219046
|
+
const stream_to_buffer_1 = __importDefault(__nested_webpack_require_982655__(2560));
|
218901
219047
|
exports.streamToBuffer = stream_to_buffer_1.default;
|
218902
|
-
const should_serve_1 = __importDefault(
|
219048
|
+
const should_serve_1 = __importDefault(__nested_webpack_require_982655__(2564));
|
218903
219049
|
exports.shouldServe = should_serve_1.default;
|
218904
|
-
const debug_1 = __importDefault(
|
219050
|
+
const debug_1 = __importDefault(__nested_webpack_require_982655__(1868));
|
218905
219051
|
exports.debug = debug_1.default;
|
218906
|
-
var detect_builders_1 =
|
219052
|
+
var detect_builders_1 = __nested_webpack_require_982655__(4246);
|
218907
219053
|
Object.defineProperty(exports, "detectBuilders", ({ enumerable: true, get: function () { return detect_builders_1.detectBuilders; } }));
|
218908
219054
|
Object.defineProperty(exports, "detectOutputDirectory", ({ enumerable: true, get: function () { return detect_builders_1.detectOutputDirectory; } }));
|
218909
219055
|
Object.defineProperty(exports, "detectApiDirectory", ({ enumerable: true, get: function () { return detect_builders_1.detectApiDirectory; } }));
|
218910
219056
|
Object.defineProperty(exports, "detectApiExtensions", ({ enumerable: true, get: function () { return detect_builders_1.detectApiExtensions; } }));
|
218911
|
-
var detect_framework_1 =
|
219057
|
+
var detect_framework_1 = __nested_webpack_require_982655__(5224);
|
218912
219058
|
Object.defineProperty(exports, "detectFramework", ({ enumerable: true, get: function () { return detect_framework_1.detectFramework; } }));
|
218913
|
-
var filesystem_1 =
|
219059
|
+
var filesystem_1 = __nested_webpack_require_982655__(461);
|
218914
219060
|
Object.defineProperty(exports, "DetectorFilesystem", ({ enumerable: true, get: function () { return filesystem_1.DetectorFilesystem; } }));
|
218915
|
-
var read_config_file_1 =
|
219061
|
+
var read_config_file_1 = __nested_webpack_require_982655__(7792);
|
218916
219062
|
Object.defineProperty(exports, "readConfigFile", ({ enumerable: true, get: function () { return read_config_file_1.readConfigFile; } }));
|
218917
|
-
var normalize_path_1 =
|
219063
|
+
var normalize_path_1 = __nested_webpack_require_982655__(6261);
|
218918
219064
|
Object.defineProperty(exports, "normalizePath", ({ enumerable: true, get: function () { return normalize_path_1.normalizePath; } }));
|
218919
|
-
|
218920
|
-
|
218921
|
-
|
219065
|
+
var convert_runtime_to_plugin_1 = __nested_webpack_require_982655__(7276);
|
219066
|
+
Object.defineProperty(exports, "convertRuntimeToPlugin", ({ enumerable: true, get: function () { return convert_runtime_to_plugin_1.convertRuntimeToPlugin; } }));
|
219067
|
+
Object.defineProperty(exports, "updateFunctionsManifest", ({ enumerable: true, get: function () { return convert_runtime_to_plugin_1.updateFunctionsManifest; } }));
|
219068
|
+
__exportStar(__nested_webpack_require_982655__(2416), exports);
|
219069
|
+
__exportStar(__nested_webpack_require_982655__(5748), exports);
|
219070
|
+
__exportStar(__nested_webpack_require_982655__(3983), exports);
|
218922
219071
|
/**
|
218923
219072
|
* Helper function to support both `@vercel` and legacy `@now` official Runtimes.
|
218924
219073
|
*/
|
@@ -218963,7 +219112,7 @@ exports.getPlatformEnv = getPlatformEnv;
|
|
218963
219112
|
/***/ }),
|
218964
219113
|
|
218965
219114
|
/***/ 6721:
|
218966
|
-
/***/ (function(__unused_webpack_module, exports,
|
219115
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_992929__) {
|
218967
219116
|
|
218968
219117
|
"use strict";
|
218969
219118
|
|
@@ -218972,13 +219121,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
218972
219121
|
};
|
218973
219122
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
218974
219123
|
exports.getLambdaOptionsFromFunction = exports.createZip = exports.createLambda = exports.Lambda = exports.FILES_SYMBOL = void 0;
|
218975
|
-
const assert_1 = __importDefault(
|
218976
|
-
const async_sema_1 = __importDefault(
|
218977
|
-
const yazl_1 =
|
218978
|
-
const minimatch_1 = __importDefault(
|
218979
|
-
const fs_extra_1 =
|
218980
|
-
const download_1 =
|
218981
|
-
const stream_to_buffer_1 = __importDefault(
|
219124
|
+
const assert_1 = __importDefault(__nested_webpack_require_992929__(2357));
|
219125
|
+
const async_sema_1 = __importDefault(__nested_webpack_require_992929__(5758));
|
219126
|
+
const yazl_1 = __nested_webpack_require_992929__(1223);
|
219127
|
+
const minimatch_1 = __importDefault(__nested_webpack_require_992929__(9566));
|
219128
|
+
const fs_extra_1 = __nested_webpack_require_992929__(5392);
|
219129
|
+
const download_1 = __nested_webpack_require_992929__(1611);
|
219130
|
+
const stream_to_buffer_1 = __importDefault(__nested_webpack_require_992929__(2560));
|
218982
219131
|
exports.FILES_SYMBOL = Symbol('files');
|
218983
219132
|
class Lambda {
|
218984
219133
|
constructor({ zipBuffer, handler, runtime, maxDuration, memory, environment, allowQuery, regions, }) {
|
@@ -219207,12 +219356,12 @@ exports.buildsSchema = {
|
|
219207
219356
|
/***/ }),
|
219208
219357
|
|
219209
219358
|
/***/ 2564:
|
219210
|
-
/***/ ((__unused_webpack_module, exports,
|
219359
|
+
/***/ ((__unused_webpack_module, exports, __nested_webpack_require_1001439__) => {
|
219211
219360
|
|
219212
219361
|
"use strict";
|
219213
219362
|
|
219214
219363
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
219215
|
-
const path_1 =
|
219364
|
+
const path_1 = __nested_webpack_require_1001439__(5622);
|
219216
219365
|
function shouldServe({ entrypoint, files, requestPath, }) {
|
219217
219366
|
requestPath = requestPath.replace(/\/$/, ''); // sanitize trailing '/'
|
219218
219367
|
entrypoint = entrypoint.replace(/\\/, '/'); // windows compatibility
|
@@ -219441,7 +219590,7 @@ module.exports = __webpack_require__(78761);
|
|
219441
219590
|
/******/ var __webpack_module_cache__ = {};
|
219442
219591
|
/******/
|
219443
219592
|
/******/ // The require function
|
219444
|
-
/******/ function
|
219593
|
+
/******/ function __nested_webpack_require_1101078__(moduleId) {
|
219445
219594
|
/******/ // Check if module is in cache
|
219446
219595
|
/******/ if(__webpack_module_cache__[moduleId]) {
|
219447
219596
|
/******/ return __webpack_module_cache__[moduleId].exports;
|
@@ -219456,7 +219605,7 @@ module.exports = __webpack_require__(78761);
|
|
219456
219605
|
/******/ // Execute the module function
|
219457
219606
|
/******/ var threw = true;
|
219458
219607
|
/******/ try {
|
219459
|
-
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports,
|
219608
|
+
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_1101078__);
|
219460
219609
|
/******/ threw = false;
|
219461
219610
|
/******/ } finally {
|
219462
219611
|
/******/ if(threw) delete __webpack_module_cache__[moduleId];
|
@@ -219469,11 +219618,11 @@ module.exports = __webpack_require__(78761);
|
|
219469
219618
|
/************************************************************************/
|
219470
219619
|
/******/ /* webpack/runtime/compat */
|
219471
219620
|
/******/
|
219472
|
-
/******/
|
219621
|
+
/******/ __nested_webpack_require_1101078__.ab = __dirname + "/";/************************************************************************/
|
219473
219622
|
/******/ // module exports must be returned from runtime so entry inlining is disabled
|
219474
219623
|
/******/ // startup
|
219475
219624
|
/******/ // Load entry module and return exports
|
219476
|
-
/******/ return
|
219625
|
+
/******/ return __nested_webpack_require_1101078__(2855);
|
219477
219626
|
/******/ })()
|
219478
219627
|
;
|
219479
219628
|
|
@@ -249468,6 +249617,14 @@ const fields = [
|
|
249468
249617
|
];
|
249469
249618
|
async function main(client) {
|
249470
249619
|
var _a, _b, _c;
|
249620
|
+
if (process.env.__VERCEL_BUILD_RUNNING) {
|
249621
|
+
client.output.error(`${cmd_1.default(`${pkg_name_1.getPkgName()} build`)} must not recursively invoke itself. Check the Build Command in the Project Settings or the ${cmd_1.default('build')} script in ${cmd_1.default('package.json')}`);
|
249622
|
+
client.output.error(`Learn More: https://vercel.link/recursive-invocation-of-commands`);
|
249623
|
+
return 1;
|
249624
|
+
}
|
249625
|
+
else {
|
249626
|
+
process.env.__VERCEL_BUILD_RUNNING = '1';
|
249627
|
+
}
|
249471
249628
|
let argv;
|
249472
249629
|
const buildStamp = stamp_1.default();
|
249473
249630
|
try {
|
@@ -251369,6 +251526,14 @@ const help = () => {
|
|
251369
251526
|
`);
|
251370
251527
|
};
|
251371
251528
|
async function main(client) {
|
251529
|
+
if (process.env.__VERCEL_DEV_RUNNING) {
|
251530
|
+
client.output.error(`${cmd_1.default(`${pkg_name_1.getPkgName()} dev`)} must not recursively invoke itself. Check the Development Command in the Project Settings or the ${cmd_1.default('dev')} script in ${cmd_1.default('package.json')}`);
|
251531
|
+
client.output.error(`Learn More: https://vercel.link/recursive-invocation-of-commands`);
|
251532
|
+
return 1;
|
251533
|
+
}
|
251534
|
+
else {
|
251535
|
+
process.env.__VERCEL_DEV_RUNNING = '1';
|
251536
|
+
}
|
251372
251537
|
let argv;
|
251373
251538
|
let args;
|
251374
251539
|
const { output } = client;
|
@@ -251403,14 +251568,11 @@ async function main(client) {
|
|
251403
251568
|
const pkg = await read_package_1.default(path_1.default.join(dir, 'package.json'));
|
251404
251569
|
if (pkg) {
|
251405
251570
|
const { scripts } = pkg;
|
251406
|
-
if (scripts &&
|
251407
|
-
|
251408
|
-
|
251409
|
-
|
251410
|
-
|
251411
|
-
if (scripts && scripts.dev && /\bvercel\b\W+\bdev\b/.test(scripts.dev)) {
|
251412
|
-
output.error(`The ${cmd_1.default('dev')} script in ${cmd_1.default('package.json')} must not contain ${cmd_1.default('vercel dev')}`);
|
251413
|
-
output.error(`Learn More: http://err.sh/vercel/now-dev-as-dev-script`);
|
251571
|
+
if (scripts &&
|
251572
|
+
scripts.dev &&
|
251573
|
+
/\b(now|vercel)\b\W+\bdev\b/.test(scripts.dev)) {
|
251574
|
+
client.output.error(`${cmd_1.default(`${pkg_name_1.getPkgName()} dev`)} must not recursively invoke itself. Check the Development Command in the Project Settings or the ${cmd_1.default('dev')} script in ${cmd_1.default('package.json')}`);
|
251575
|
+
client.output.error(`Learn More: https://vercel.link/recursive-invocation-of-commands`);
|
251414
251576
|
return 1;
|
251415
251577
|
}
|
251416
251578
|
}
|
@@ -258049,13 +258211,8 @@ exports.isDirectory = isDirectory;
|
|
258049
258211
|
// Returns in which directory the config should be present
|
258050
258212
|
const getGlobalPathConfig = () => {
|
258051
258213
|
let customPath;
|
258052
|
-
|
258053
|
-
|
258054
|
-
customPath = argv['--global-config'];
|
258055
|
-
}
|
258056
|
-
catch (_error) {
|
258057
|
-
// args are optional so consume error
|
258058
|
-
}
|
258214
|
+
const argv = get_args_1.default(process.argv.slice(2), {}, { permissive: true });
|
258215
|
+
customPath = argv['--global-config'];
|
258059
258216
|
const vercelDirectories = xdg_app_paths_1.default('com.vercel.cli').dataDirs();
|
258060
258217
|
const possibleConfigPaths = [
|
258061
258218
|
...vercelDirectories,
|
@@ -258091,13 +258248,8 @@ const errors_ts_1 = __webpack_require__(60156);
|
|
258091
258248
|
const get_args_1 = __importDefault(__webpack_require__(87612));
|
258092
258249
|
function getLocalPathConfig(prefix) {
|
258093
258250
|
let customPath;
|
258094
|
-
|
258095
|
-
|
258096
|
-
customPath = argv['--local-config'];
|
258097
|
-
}
|
258098
|
-
catch (_error) {
|
258099
|
-
// args are optional so consume error
|
258100
|
-
}
|
258251
|
+
const argv = get_args_1.default(process.argv.slice(2), {}, { permissive: true });
|
258252
|
+
customPath = argv['--local-config'];
|
258101
258253
|
// If `--local-config` flag was specified, then that takes priority
|
258102
258254
|
if (customPath) {
|
258103
258255
|
if (typeof customPath !== 'string') {
|
@@ -259924,13 +260076,21 @@ class DevServer {
|
|
259924
260076
|
};
|
259925
260077
|
this.runDevMiddleware = async (req, res) => {
|
259926
260078
|
const { devMiddlewarePlugins } = await plugins_1.loadCliPlugins(this.cwd, this.output);
|
259927
|
-
|
259928
|
-
|
259929
|
-
|
259930
|
-
|
260079
|
+
try {
|
260080
|
+
for (let plugin of devMiddlewarePlugins) {
|
260081
|
+
const result = await plugin.plugin.runDevMiddleware(req, res, this.cwd);
|
260082
|
+
if (result.finished) {
|
260083
|
+
return result;
|
260084
|
+
}
|
259931
260085
|
}
|
260086
|
+
return { finished: false };
|
260087
|
+
}
|
260088
|
+
catch (e) {
|
260089
|
+
return {
|
260090
|
+
finished: true,
|
260091
|
+
error: e,
|
260092
|
+
};
|
259932
260093
|
}
|
259933
|
-
return { finished: false };
|
259934
260094
|
};
|
259935
260095
|
/**
|
259936
260096
|
* Serve project directory as a v2 deployment.
|
@@ -261318,7 +261478,10 @@ class DevServer {
|
|
261318
261478
|
p.stdout.on('data', (data) => {
|
261319
261479
|
process.stdout.write(data.replace(proxyPort, devPort));
|
261320
261480
|
});
|
261321
|
-
p.on('exit', () => {
|
261481
|
+
p.on('exit', (code) => {
|
261482
|
+
if (code > 0) {
|
261483
|
+
process.exit(code);
|
261484
|
+
}
|
261322
261485
|
this.devProcessPort = undefined;
|
261323
261486
|
});
|
261324
261487
|
await checkForPort(port, 1000 * 60 * 5);
|
@@ -270105,7 +270268,7 @@ module.exports = JSON.parse("[\"ac\",\"com.ac\",\"edu.ac\",\"gov.ac\",\"net.ac\"
|
|
270105
270268
|
/***/ ((module) => {
|
270106
270269
|
|
270107
270270
|
"use strict";
|
270108
|
-
module.exports = JSON.parse("{\"name\":\"vercel\",\"version\":\"23.1.3-canary.
|
270271
|
+
module.exports = JSON.parse("{\"name\":\"vercel\",\"version\":\"23.1.3-canary.30\",\"preferGlobal\":true,\"license\":\"Apache-2.0\",\"description\":\"The command-line interface for Vercel\",\"homepage\":\"https://vercel.com\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/vercel/vercel.git\",\"directory\":\"packages/cli\"},\"scripts\":{\"preinstall\":\"node ./scripts/preinstall.js\",\"test\":\"jest\",\"test-unit\":\"jest --coverage --verbose\",\"test-integration-cli\":\"rimraf test/fixtures/integration && ava test/integration.js --serial --fail-fast --verbose\",\"test-integration-dev\":\"ava test/dev/integration.js --serial --fail-fast --verbose\",\"prepublishOnly\":\"yarn build\",\"coverage\":\"codecov\",\"build\":\"node -r ts-eager/register ./scripts/build.ts\",\"build-dev\":\"node -r ts-eager/register ./scripts/build.ts --dev\"},\"bin\":{\"vc\":\"./dist/index.js\",\"vercel\":\"./dist/index.js\"},\"files\":[\"dist\",\"scripts/preinstall.js\"],\"ava\":{\"compileEnhancements\":false,\"extensions\":[\"ts\"],\"require\":[\"ts-node/register/transpile-only\",\"esm\"]},\"engines\":{\"node\":\">= 12\"},\"dependencies\":{\"@vercel/build-utils\":\"2.12.3-canary.18\",\"@vercel/go\":\"1.2.4-canary.3\",\"@vercel/node\":\"1.12.2-canary.6\",\"@vercel/python\":\"2.0.6-canary.5\",\"@vercel/ruby\":\"1.2.8-canary.4\",\"update-notifier\":\"4.1.0\",\"vercel-plugin-middleware\":\"0.0.0-canary.7\",\"vercel-plugin-node\":\"1.12.2-canary.8\"},\"devDependencies\":{\"@next/env\":\"11.1.2\",\"@sentry/node\":\"5.5.0\",\"@sindresorhus/slugify\":\"0.11.0\",\"@tootallnate/once\":\"1.1.2\",\"@types/ansi-escapes\":\"3.0.0\",\"@types/ansi-regex\":\"4.0.0\",\"@types/async-retry\":\"1.2.1\",\"@types/bytes\":\"3.0.0\",\"@types/chance\":\"1.1.3\",\"@types/debug\":\"0.0.31\",\"@types/dotenv\":\"6.1.1\",\"@types/escape-html\":\"0.0.20\",\"@types/express\":\"4.17.13\",\"@types/fs-extra\":\"9.0.13\",\"@types/glob\":\"7.1.1\",\"@types/http-proxy\":\"1.16.2\",\"@types/inquirer\":\"7.3.1\",\"@types/jest\":\"27.0.1\",\"@types/load-json-file\":\"2.0.7\",\"@types/mime-types\":\"2.1.0\",\"@types/minimatch\":\"3.0.3\",\"@types/mri\":\"1.1.0\",\"@types/ms\":\"0.7.30\",\"@types/node\":\"11.11.0\",\"@types/node-fetch\":\"2.5.10\",\"@types/npm-package-arg\":\"6.1.0\",\"@types/pluralize\":\"0.0.29\",\"@types/progress\":\"2.0.3\",\"@types/psl\":\"1.1.0\",\"@types/semver\":\"6.0.1\",\"@types/tar-fs\":\"1.16.1\",\"@types/text-table\":\"0.2.0\",\"@types/title\":\"3.4.1\",\"@types/universal-analytics\":\"0.4.2\",\"@types/update-notifier\":\"5.1.0\",\"@types/which\":\"1.3.2\",\"@types/write-json-file\":\"2.2.1\",\"@vercel/frameworks\":\"0.5.1-canary.11\",\"@vercel/ncc\":\"0.24.0\",\"@vercel/nft\":\"0.17.0\",\"@zeit/fun\":\"0.11.2\",\"@zeit/source-map-support\":\"0.6.2\",\"ajv\":\"6.12.2\",\"alpha-sort\":\"2.0.1\",\"ansi-escapes\":\"3.0.0\",\"ansi-regex\":\"3.0.0\",\"arg\":\"5.0.0\",\"async-listen\":\"1.2.0\",\"async-retry\":\"1.1.3\",\"async-sema\":\"2.1.4\",\"ava\":\"2.2.0\",\"bytes\":\"3.0.0\",\"chalk\":\"4.1.0\",\"chance\":\"1.1.7\",\"chokidar\":\"3.3.1\",\"clipboardy\":\"2.1.0\",\"codecov\":\"3.8.2\",\"cpy\":\"7.2.0\",\"credit-card\":\"3.0.1\",\"date-fns\":\"1.29.0\",\"debug\":\"3.1.0\",\"dot\":\"1.1.3\",\"dotenv\":\"4.0.0\",\"email-prompt\":\"0.3.2\",\"email-validator\":\"1.1.1\",\"epipebomb\":\"1.0.0\",\"escape-html\":\"1.0.3\",\"esm\":\"3.1.4\",\"execa\":\"3.2.0\",\"express\":\"4.17.1\",\"fast-deep-equal\":\"3.1.3\",\"fs-extra\":\"10.0.0\",\"get-port\":\"5.1.1\",\"glob\":\"7.1.2\",\"http-proxy\":\"1.18.1\",\"inquirer\":\"7.0.4\",\"is-docker\":\"2.2.1\",\"is-port-reachable\":\"3.0.0\",\"is-url\":\"1.2.2\",\"jaro-winkler\":\"0.2.8\",\"jsonlines\":\"0.1.1\",\"load-json-file\":\"3.0.0\",\"mime-types\":\"2.1.24\",\"minimatch\":\"3.0.4\",\"mri\":\"1.1.5\",\"ms\":\"2.1.2\",\"node-fetch\":\"2.6.1\",\"npm-package-arg\":\"6.1.0\",\"open\":\"8.2.0\",\"ora\":\"3.4.0\",\"pcre-to-regexp\":\"1.0.0\",\"pluralize\":\"7.0.0\",\"progress\":\"2.0.3\",\"promisepipe\":\"3.0.0\",\"psl\":\"1.1.31\",\"qr-image\":\"3.2.0\",\"raw-body\":\"2.4.1\",\"rimraf\":\"3.0.2\",\"semver\":\"5.5.0\",\"serve-handler\":\"6.1.1\",\"strip-ansi\":\"5.2.0\",\"stripe\":\"5.1.0\",\"tar-fs\":\"1.16.3\",\"test-listen\":\"1.1.0\",\"text-table\":\"0.2.0\",\"title\":\"3.4.1\",\"tmp-promise\":\"1.0.3\",\"tree-kill\":\"1.2.2\",\"ts-eager\":\"2.0.2\",\"ts-node\":\"8.3.0\",\"typescript\":\"4.3.4\",\"universal-analytics\":\"0.4.20\",\"utility-types\":\"2.1.0\",\"which\":\"2.0.2\",\"write-json-file\":\"2.2.0\",\"xdg-app-paths\":\"5.1.0\"},\"jest\":{\"preset\":\"ts-jest\",\"globals\":{\"ts-jest\":{\"diagnostics\":false,\"isolatedModules\":true}},\"verbose\":false,\"testEnvironment\":\"node\",\"testMatch\":[\"<rootDir>/test/**/*.test.ts\"]},\"gitHead\":\"c3abf73f581c23c1c39f91249a21fd9f261f7519\"}");
|
270109
270272
|
|
270110
270273
|
/***/ }),
|
270111
270274
|
|
@@ -270121,7 +270284,7 @@ module.exports = JSON.parse("{\"VISA\":\"Visa\",\"MASTERCARD\":\"MasterCard\",\"
|
|
270121
270284
|
/***/ ((module) => {
|
270122
270285
|
|
270123
270286
|
"use strict";
|
270124
|
-
module.exports = JSON.parse("{\"name\":\"@vercel/client\",\"version\":\"10.2.3-canary.
|
270287
|
+
module.exports = JSON.parse("{\"name\":\"@vercel/client\",\"version\":\"10.2.3-canary.19\",\"main\":\"dist/index.js\",\"typings\":\"dist/index.d.ts\",\"homepage\":\"https://vercel.com\",\"license\":\"MIT\",\"files\":[\"dist\"],\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/vercel/vercel.git\",\"directory\":\"packages/client\"},\"scripts\":{\"build\":\"tsc\",\"test-integration-once\":\"jest --verbose --runInBand --bail tests/create-deployment.test.ts tests/create-legacy-deployment.test.ts tests/paths.test.ts\",\"test-unit\":\"jest --verbose --runInBand --bail tests/unit.*test.*\"},\"engines\":{\"node\":\">= 12\"},\"devDependencies\":{\"@types/async-retry\":\"1.4.1\",\"@types/fs-extra\":\"7.0.0\",\"@types/jest\":\"27.0.1\",\"@types/ms\":\"0.7.30\",\"@types/node\":\"12.0.4\",\"@types/node-fetch\":\"2.5.4\",\"@types/recursive-readdir\":\"2.2.0\",\"typescript\":\"4.3.4\"},\"jest\":{\"preset\":\"ts-jest\",\"testEnvironment\":\"node\",\"verbose\":false,\"setupFilesAfterEnv\":[\"<rootDir>/tests/setup/index.ts\"]},\"dependencies\":{\"@vercel/build-utils\":\"2.12.3-canary.18\",\"@zeit/fetch\":\"5.2.0\",\"async-retry\":\"1.2.3\",\"async-sema\":\"3.0.0\",\"fs-extra\":\"8.0.1\",\"ignore\":\"4.0.6\",\"ms\":\"2.1.2\",\"node-fetch\":\"2.6.1\",\"querystring\":\"^0.2.0\",\"recursive-readdir\":\"2.2.2\",\"sleep-promise\":\"8.0.1\"},\"gitHead\":\"c3abf73f581c23c1c39f91249a21fd9f261f7519\"}");
|
270125
270288
|
|
270126
270289
|
/***/ }),
|
270127
270290
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vercel",
|
3
|
-
"version": "23.1.3-canary.
|
3
|
+
"version": "23.1.3-canary.30",
|
4
4
|
"preferGlobal": true,
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"description": "The command-line interface for Vercel",
|
@@ -43,14 +43,14 @@
|
|
43
43
|
"node": ">= 12"
|
44
44
|
},
|
45
45
|
"dependencies": {
|
46
|
-
"@vercel/build-utils": "2.12.3-canary.
|
46
|
+
"@vercel/build-utils": "2.12.3-canary.18",
|
47
47
|
"@vercel/go": "1.2.4-canary.3",
|
48
48
|
"@vercel/node": "1.12.2-canary.6",
|
49
|
-
"@vercel/python": "2.0.6-canary.
|
50
|
-
"@vercel/ruby": "1.2.8-canary.
|
49
|
+
"@vercel/python": "2.0.6-canary.5",
|
50
|
+
"@vercel/ruby": "1.2.8-canary.4",
|
51
51
|
"update-notifier": "4.1.0",
|
52
|
-
"vercel-plugin-middleware": "0.0.0-canary.
|
53
|
-
"vercel-plugin-node": "1.12.2-canary.
|
52
|
+
"vercel-plugin-middleware": "0.0.0-canary.7",
|
53
|
+
"vercel-plugin-node": "1.12.2-canary.8"
|
54
54
|
},
|
55
55
|
"devDependencies": {
|
56
56
|
"@next/env": "11.1.2",
|
@@ -184,5 +184,5 @@
|
|
184
184
|
"<rootDir>/test/**/*.test.ts"
|
185
185
|
]
|
186
186
|
},
|
187
|
-
"gitHead": "
|
187
|
+
"gitHead": "c3abf73f581c23c1c39f91249a21fd9f261f7519"
|
188
188
|
}
|