vercel 28.2.5 → 28.4.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/dist/index.js +418 -636
- package/package.json +15 -15
package/dist/index.js
CHANGED
@@ -189360,15 +189360,55 @@ exports.fromPromise = function (fn) {
|
|
189360
189360
|
}
|
189361
189361
|
|
189362
189362
|
|
189363
|
+
/***/ }),
|
189364
|
+
|
189365
|
+
/***/ 6548:
|
189366
|
+
/***/ ((__unused_webpack_module, exports) => {
|
189367
|
+
|
189368
|
+
"use strict";
|
189369
|
+
|
189370
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
189371
|
+
exports.cloneEnv = void 0;
|
189372
|
+
const { hasOwnProperty } = Object.prototype;
|
189373
|
+
/**
|
189374
|
+
* Clones zero or more objects into a single new object while ensuring that the
|
189375
|
+
* `PATH` environment variable is defined when the `PATH` or `Path` environment
|
189376
|
+
* variables are defined.
|
189377
|
+
*
|
189378
|
+
* @param {Object} [...envs] Objects and/or `process.env` to clone and merge
|
189379
|
+
* @returns {Object} The new object
|
189380
|
+
*/
|
189381
|
+
function cloneEnv(...envs) {
|
189382
|
+
return envs.reduce((obj, env) => {
|
189383
|
+
if (env === undefined || env === null) {
|
189384
|
+
return obj;
|
189385
|
+
}
|
189386
|
+
// mixin the env first
|
189387
|
+
obj = Object.assign(obj, env);
|
189388
|
+
if (hasOwnProperty.call(env, 'Path')) {
|
189389
|
+
// the system path is called `Path` on Windows and Node.js will
|
189390
|
+
// automatically return the system path when accessing `PATH`,
|
189391
|
+
// however we lose this proxied value when we destructure and
|
189392
|
+
// thus we must explicitly copy it, but we must also remove the
|
189393
|
+
// `Path` property since we can't have both a `PATH` and `Path`
|
189394
|
+
obj.PATH = obj.Path;
|
189395
|
+
delete obj.Path;
|
189396
|
+
}
|
189397
|
+
return obj;
|
189398
|
+
}, {});
|
189399
|
+
}
|
189400
|
+
exports.cloneEnv = cloneEnv;
|
189401
|
+
|
189402
|
+
|
189363
189403
|
/***/ }),
|
189364
189404
|
|
189365
189405
|
/***/ 1868:
|
189366
|
-
/***/ ((__unused_webpack_module, exports,
|
189406
|
+
/***/ ((__unused_webpack_module, exports, __nested_webpack_require_834617__) => {
|
189367
189407
|
|
189368
189408
|
"use strict";
|
189369
189409
|
|
189370
189410
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
189371
|
-
const get_platform_env_1 =
|
189411
|
+
const get_platform_env_1 = __nested_webpack_require_834617__(4678);
|
189372
189412
|
function debug(message, ...additional) {
|
189373
189413
|
if (get_platform_env_1.getPlatformEnv('BUILDER_DEBUG')) {
|
189374
189414
|
console.log(message, ...additional);
|
@@ -189503,7 +189543,7 @@ function getSuggestion(topLevelProp, additionalProperty) {
|
|
189503
189543
|
/***/ }),
|
189504
189544
|
|
189505
189545
|
/***/ 2397:
|
189506
|
-
/***/ (function(__unused_webpack_module, exports,
|
189546
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_838967__) {
|
189507
189547
|
|
189508
189548
|
"use strict";
|
189509
189549
|
|
@@ -189511,8 +189551,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
189511
189551
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
189512
189552
|
};
|
189513
189553
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
189514
|
-
const assert_1 = __importDefault(
|
189515
|
-
const into_stream_1 = __importDefault(
|
189554
|
+
const assert_1 = __importDefault(__nested_webpack_require_838967__(2357));
|
189555
|
+
const into_stream_1 = __importDefault(__nested_webpack_require_838967__(6130));
|
189516
189556
|
class FileBlob {
|
189517
189557
|
constructor({ mode = 0o100644, contentType, data }) {
|
189518
189558
|
assert_1.default(typeof mode === 'number');
|
@@ -189547,7 +189587,7 @@ exports.default = FileBlob;
|
|
189547
189587
|
/***/ }),
|
189548
189588
|
|
189549
189589
|
/***/ 9331:
|
189550
|
-
/***/ (function(__unused_webpack_module, exports,
|
189590
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_840485__) {
|
189551
189591
|
|
189552
189592
|
"use strict";
|
189553
189593
|
|
@@ -189555,11 +189595,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
189555
189595
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
189556
189596
|
};
|
189557
189597
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
189558
|
-
const assert_1 = __importDefault(
|
189559
|
-
const fs_extra_1 = __importDefault(
|
189560
|
-
const multistream_1 = __importDefault(
|
189561
|
-
const path_1 = __importDefault(
|
189562
|
-
const async_sema_1 = __importDefault(
|
189598
|
+
const assert_1 = __importDefault(__nested_webpack_require_840485__(2357));
|
189599
|
+
const fs_extra_1 = __importDefault(__nested_webpack_require_840485__(5392));
|
189600
|
+
const multistream_1 = __importDefault(__nested_webpack_require_840485__(8179));
|
189601
|
+
const path_1 = __importDefault(__nested_webpack_require_840485__(5622));
|
189602
|
+
const async_sema_1 = __importDefault(__nested_webpack_require_840485__(5758));
|
189563
189603
|
const semaToPreventEMFILE = new async_sema_1.default(20);
|
189564
189604
|
class FileFsRef {
|
189565
189605
|
constructor({ mode = 0o100644, contentType, fsPath }) {
|
@@ -189625,7 +189665,7 @@ exports.default = FileFsRef;
|
|
189625
189665
|
/***/ }),
|
189626
189666
|
|
189627
189667
|
/***/ 5187:
|
189628
|
-
/***/ (function(__unused_webpack_module, exports,
|
189668
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_843289__) {
|
189629
189669
|
|
189630
189670
|
"use strict";
|
189631
189671
|
|
@@ -189633,11 +189673,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
189633
189673
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
189634
189674
|
};
|
189635
189675
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
189636
|
-
const assert_1 = __importDefault(
|
189637
|
-
const node_fetch_1 = __importDefault(
|
189638
|
-
const multistream_1 = __importDefault(
|
189639
|
-
const async_retry_1 = __importDefault(
|
189640
|
-
const async_sema_1 = __importDefault(
|
189676
|
+
const assert_1 = __importDefault(__nested_webpack_require_843289__(2357));
|
189677
|
+
const node_fetch_1 = __importDefault(__nested_webpack_require_843289__(2197));
|
189678
|
+
const multistream_1 = __importDefault(__nested_webpack_require_843289__(8179));
|
189679
|
+
const async_retry_1 = __importDefault(__nested_webpack_require_843289__(3691));
|
189680
|
+
const async_sema_1 = __importDefault(__nested_webpack_require_843289__(5758));
|
189641
189681
|
const semaToDownloadFromS3 = new async_sema_1.default(5);
|
189642
189682
|
class BailableError extends Error {
|
189643
189683
|
constructor(...args) {
|
@@ -189718,7 +189758,7 @@ exports.default = FileRef;
|
|
189718
189758
|
/***/ }),
|
189719
189759
|
|
189720
189760
|
/***/ 1611:
|
189721
|
-
/***/ (function(__unused_webpack_module, exports,
|
189761
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_846690__) {
|
189722
189762
|
|
189723
189763
|
"use strict";
|
189724
189764
|
|
@@ -189727,11 +189767,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
189727
189767
|
};
|
189728
189768
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
189729
189769
|
exports.downloadFile = exports.isSymbolicLink = void 0;
|
189730
|
-
const path_1 = __importDefault(
|
189731
|
-
const debug_1 = __importDefault(
|
189732
|
-
const file_fs_ref_1 = __importDefault(
|
189733
|
-
const fs_extra_1 =
|
189734
|
-
const stream_to_buffer_1 = __importDefault(
|
189770
|
+
const path_1 = __importDefault(__nested_webpack_require_846690__(5622));
|
189771
|
+
const debug_1 = __importDefault(__nested_webpack_require_846690__(1868));
|
189772
|
+
const file_fs_ref_1 = __importDefault(__nested_webpack_require_846690__(9331));
|
189773
|
+
const fs_extra_1 = __nested_webpack_require_846690__(5392);
|
189774
|
+
const stream_to_buffer_1 = __importDefault(__nested_webpack_require_846690__(2560));
|
189735
189775
|
const S_IFMT = 61440; /* 0170000 type of file */
|
189736
189776
|
const S_IFLNK = 40960; /* 0120000 symbolic link */
|
189737
189777
|
function isSymbolicLink(mode) {
|
@@ -189822,14 +189862,14 @@ exports.default = download;
|
|
189822
189862
|
/***/ }),
|
189823
189863
|
|
189824
189864
|
/***/ 3838:
|
189825
|
-
/***/ ((__unused_webpack_module, exports,
|
189865
|
+
/***/ ((__unused_webpack_module, exports, __nested_webpack_require_851125__) => {
|
189826
189866
|
|
189827
189867
|
"use strict";
|
189828
189868
|
|
189829
189869
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
189830
|
-
const path_1 =
|
189831
|
-
const os_1 =
|
189832
|
-
const fs_extra_1 =
|
189870
|
+
const path_1 = __nested_webpack_require_851125__(5622);
|
189871
|
+
const os_1 = __nested_webpack_require_851125__(2087);
|
189872
|
+
const fs_extra_1 = __nested_webpack_require_851125__(5392);
|
189833
189873
|
async function getWritableDirectory() {
|
189834
189874
|
const name = Math.floor(Math.random() * 0x7fffffff).toString(16);
|
189835
189875
|
const directory = path_1.join(os_1.tmpdir(), name);
|
@@ -189842,7 +189882,7 @@ exports.default = getWritableDirectory;
|
|
189842
189882
|
/***/ }),
|
189843
189883
|
|
189844
189884
|
/***/ 4240:
|
189845
|
-
/***/ (function(__unused_webpack_module, exports,
|
189885
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_851705__) {
|
189846
189886
|
|
189847
189887
|
"use strict";
|
189848
189888
|
|
@@ -189850,13 +189890,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
189850
189890
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
189851
189891
|
};
|
189852
189892
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
189853
|
-
const path_1 = __importDefault(
|
189854
|
-
const assert_1 = __importDefault(
|
189855
|
-
const glob_1 = __importDefault(
|
189856
|
-
const util_1 =
|
189857
|
-
const fs_extra_1 =
|
189858
|
-
const normalize_path_1 =
|
189859
|
-
const file_fs_ref_1 = __importDefault(
|
189893
|
+
const path_1 = __importDefault(__nested_webpack_require_851705__(5622));
|
189894
|
+
const assert_1 = __importDefault(__nested_webpack_require_851705__(2357));
|
189895
|
+
const glob_1 = __importDefault(__nested_webpack_require_851705__(1104));
|
189896
|
+
const util_1 = __nested_webpack_require_851705__(1669);
|
189897
|
+
const fs_extra_1 = __nested_webpack_require_851705__(5392);
|
189898
|
+
const normalize_path_1 = __nested_webpack_require_851705__(6261);
|
189899
|
+
const file_fs_ref_1 = __importDefault(__nested_webpack_require_851705__(9331));
|
189860
189900
|
const vanillaGlob = util_1.promisify(glob_1.default);
|
189861
189901
|
async function glob(pattern, opts, mountpoint) {
|
189862
189902
|
let options;
|
@@ -189903,7 +189943,7 @@ exports.default = glob;
|
|
189903
189943
|
/***/ }),
|
189904
189944
|
|
189905
189945
|
/***/ 7903:
|
189906
|
-
/***/ (function(__unused_webpack_module, exports,
|
189946
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_853926__) {
|
189907
189947
|
|
189908
189948
|
"use strict";
|
189909
189949
|
|
@@ -189912,9 +189952,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
189912
189952
|
};
|
189913
189953
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
189914
189954
|
exports.getSupportedNodeVersion = exports.getDiscontinuedNodeVersions = exports.getLatestNodeVersion = void 0;
|
189915
|
-
const semver_1 =
|
189916
|
-
const errors_1 =
|
189917
|
-
const debug_1 = __importDefault(
|
189955
|
+
const semver_1 = __nested_webpack_require_853926__(2879);
|
189956
|
+
const errors_1 = __nested_webpack_require_853926__(3983);
|
189957
|
+
const debug_1 = __importDefault(__nested_webpack_require_853926__(1868));
|
189918
189958
|
const allOptions = [
|
189919
189959
|
{ major: 16, range: '16.x', runtime: 'nodejs16.x' },
|
189920
189960
|
{ major: 14, range: '14.x', runtime: 'nodejs14.x' },
|
@@ -190013,7 +190053,7 @@ exports.normalizePath = normalizePath;
|
|
190013
190053
|
/***/ }),
|
190014
190054
|
|
190015
190055
|
/***/ 7792:
|
190016
|
-
/***/ (function(__unused_webpack_module, exports,
|
190056
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_857780__) {
|
190017
190057
|
|
190018
190058
|
"use strict";
|
190019
190059
|
|
@@ -190022,9 +190062,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
190022
190062
|
};
|
190023
190063
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
190024
190064
|
exports.readConfigFile = void 0;
|
190025
|
-
const js_yaml_1 = __importDefault(
|
190026
|
-
const toml_1 = __importDefault(
|
190027
|
-
const fs_extra_1 =
|
190065
|
+
const js_yaml_1 = __importDefault(__nested_webpack_require_857780__(6540));
|
190066
|
+
const toml_1 = __importDefault(__nested_webpack_require_857780__(9434));
|
190067
|
+
const fs_extra_1 = __nested_webpack_require_857780__(5392);
|
190028
190068
|
async function readFileOrNull(file) {
|
190029
190069
|
try {
|
190030
190070
|
const data = await fs_extra_1.readFile(file);
|
@@ -190079,7 +190119,7 @@ exports.default = rename;
|
|
190079
190119
|
/***/ }),
|
190080
190120
|
|
190081
190121
|
/***/ 1442:
|
190082
|
-
/***/ (function(__unused_webpack_module, exports,
|
190122
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_859573__) {
|
190083
190123
|
|
190084
190124
|
"use strict";
|
190085
190125
|
|
@@ -190088,17 +190128,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
190088
190128
|
};
|
190089
190129
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
190090
190130
|
exports.installDependencies = exports.getScriptName = exports.runPipInstall = exports.runBundleInstall = exports.runPackageJsonScript = exports.runCustomInstallCommand = exports.getEnvForPackageManager = exports.runNpmInstall = exports.walkParentDirs = exports.scanParentDirs = exports.getNodeVersion = exports.getSpawnOptions = exports.runShellScript = exports.getNodeBinPath = exports.execCommand = exports.spawnCommand = exports.execAsync = exports.spawnAsync = void 0;
|
190091
|
-
const assert_1 = __importDefault(
|
190092
|
-
const fs_extra_1 = __importDefault(
|
190093
|
-
const path_1 = __importDefault(
|
190094
|
-
const async_sema_1 = __importDefault(
|
190095
|
-
const cross_spawn_1 = __importDefault(
|
190096
|
-
const semver_1 =
|
190097
|
-
const util_1 =
|
190098
|
-
const debug_1 = __importDefault(
|
190099
|
-
const errors_1 =
|
190100
|
-
const node_version_1 =
|
190101
|
-
const read_config_file_1 =
|
190131
|
+
const assert_1 = __importDefault(__nested_webpack_require_859573__(2357));
|
190132
|
+
const fs_extra_1 = __importDefault(__nested_webpack_require_859573__(5392));
|
190133
|
+
const path_1 = __importDefault(__nested_webpack_require_859573__(5622));
|
190134
|
+
const async_sema_1 = __importDefault(__nested_webpack_require_859573__(5758));
|
190135
|
+
const cross_spawn_1 = __importDefault(__nested_webpack_require_859573__(7618));
|
190136
|
+
const semver_1 = __nested_webpack_require_859573__(2879);
|
190137
|
+
const util_1 = __nested_webpack_require_859573__(1669);
|
190138
|
+
const debug_1 = __importDefault(__nested_webpack_require_859573__(1868));
|
190139
|
+
const errors_1 = __nested_webpack_require_859573__(3983);
|
190140
|
+
const node_version_1 = __nested_webpack_require_859573__(7903);
|
190141
|
+
const read_config_file_1 = __nested_webpack_require_859573__(7792);
|
190142
|
+
const clone_env_1 = __nested_webpack_require_859573__(6548);
|
190102
190143
|
// Only allow one `runNpmInstall()` invocation to run concurrently
|
190103
190144
|
const runNpmInstallSema = new async_sema_1.default(1);
|
190104
190145
|
function spawnAsync(command, args, opts = {}) {
|
@@ -190207,7 +190248,7 @@ async function runShellScript(fsPath, args = [], spawnOpts) {
|
|
190207
190248
|
exports.runShellScript = runShellScript;
|
190208
190249
|
function getSpawnOptions(meta, nodeVersion) {
|
190209
190250
|
const opts = {
|
190210
|
-
env:
|
190251
|
+
env: clone_env_1.cloneEnv(process.env),
|
190211
190252
|
};
|
190212
190253
|
if (!meta.isDev) {
|
190213
190254
|
let found = false;
|
@@ -190378,7 +190419,7 @@ async function runNpmInstall(destPath, args = [], spawnOpts, meta, nodeVersion)
|
|
190378
190419
|
console.log('Installing dependencies...');
|
190379
190420
|
debug_1.default(`Installing to ${destPath}`);
|
190380
190421
|
const opts = { cwd: destPath, ...spawnOpts };
|
190381
|
-
const env =
|
190422
|
+
const env = clone_env_1.cloneEnv(opts.env || process.env);
|
190382
190423
|
delete env.NODE_ENV;
|
190383
190424
|
opts.env = getEnvForPackageManager({
|
190384
190425
|
cliType,
|
@@ -190387,11 +190428,25 @@ async function runNpmInstall(destPath, args = [], spawnOpts, meta, nodeVersion)
|
|
190387
190428
|
env,
|
190388
190429
|
});
|
190389
190430
|
let commandArgs;
|
190431
|
+
const isPotentiallyBrokenNpm = cliType === 'npm' &&
|
190432
|
+
nodeVersion?.major === 16 &&
|
190433
|
+
!args.includes('--legacy-peer-deps') &&
|
190434
|
+
spawnOpts?.env?.ENABLE_EXPERIMENTAL_COREPACK !== '1';
|
190390
190435
|
if (cliType === 'npm') {
|
190391
190436
|
opts.prettyCommand = 'npm install';
|
190392
190437
|
commandArgs = args
|
190393
190438
|
.filter(a => a !== '--prefer-offline')
|
190394
190439
|
.concat(['install', '--no-audit', '--unsafe-perm']);
|
190440
|
+
if (isPotentiallyBrokenNpm &&
|
190441
|
+
spawnOpts?.env?.VERCEL_NPM_LEGACY_PEER_DEPS === '1') {
|
190442
|
+
// Starting in npm@8.6.0, if you ran `npm install --legacy-peer-deps`,
|
190443
|
+
// and then later ran `npm install`, it would fail. So the only way
|
190444
|
+
// to safely upgrade npm from npm@8.5.0 is to set this flag. The docs
|
190445
|
+
// say this flag is not recommended so its is behind a feature flag
|
190446
|
+
// so we can remove it in node@18, which can introduce breaking changes.
|
190447
|
+
// See https://docs.npmjs.com/cli/v8/using-npm/config#legacy-peer-deps
|
190448
|
+
commandArgs.push('--legacy-peer-deps');
|
190449
|
+
}
|
190395
190450
|
}
|
190396
190451
|
else if (cliType === 'pnpm') {
|
190397
190452
|
// PNPM's install command is similar to NPM's but without the audit nonsense
|
@@ -190408,7 +190463,19 @@ async function runNpmInstall(destPath, args = [], spawnOpts, meta, nodeVersion)
|
|
190408
190463
|
if (process.env.NPM_ONLY_PRODUCTION) {
|
190409
190464
|
commandArgs.push('--production');
|
190410
190465
|
}
|
190411
|
-
|
190466
|
+
try {
|
190467
|
+
await spawnAsync(cliType, commandArgs, opts);
|
190468
|
+
}
|
190469
|
+
catch (_) {
|
190470
|
+
const potentialErrorPath = path_1.default.join(process.env.HOME || '/', '.npm', 'eresolve-report.txt');
|
190471
|
+
if (isPotentiallyBrokenNpm &&
|
190472
|
+
!commandArgs.includes('--legacy-peer-deps') &&
|
190473
|
+
fs_extra_1.default.existsSync(potentialErrorPath)) {
|
190474
|
+
console.warn('Warning: Retrying "Install Command" with `--legacy-peer-deps` which may accept a potentially broken dependency and slow install time.');
|
190475
|
+
commandArgs.push('--legacy-peer-deps');
|
190476
|
+
await spawnAsync(cliType, commandArgs, opts);
|
190477
|
+
}
|
190478
|
+
}
|
190412
190479
|
debug_1.default(`Install complete [${Date.now() - installTime}ms]`);
|
190413
190480
|
return true;
|
190414
190481
|
}
|
@@ -190485,10 +190552,7 @@ async function runPackageJsonScript(destPath, scriptNames, spawnOpts) {
|
|
190485
190552
|
cliType,
|
190486
190553
|
lockfileVersion,
|
190487
190554
|
nodeVersion: undefined,
|
190488
|
-
env:
|
190489
|
-
...process.env,
|
190490
|
-
...spawnOpts?.env,
|
190491
|
-
},
|
190555
|
+
env: clone_env_1.cloneEnv(process.env, spawnOpts?.env),
|
190492
190556
|
}),
|
190493
190557
|
};
|
190494
190558
|
if (cliType === 'npm') {
|
@@ -190547,7 +190611,7 @@ exports.installDependencies = util_1.deprecate(runNpmInstall, 'installDependenci
|
|
190547
190611
|
/***/ }),
|
190548
190612
|
|
190549
190613
|
/***/ 2560:
|
190550
|
-
/***/ (function(__unused_webpack_module, exports,
|
190614
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_879929__) {
|
190551
190615
|
|
190552
190616
|
"use strict";
|
190553
190617
|
|
@@ -190555,7 +190619,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
190555
190619
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
190556
190620
|
};
|
190557
190621
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
190558
|
-
const end_of_stream_1 = __importDefault(
|
190622
|
+
const end_of_stream_1 = __importDefault(__nested_webpack_require_879929__(687));
|
190559
190623
|
function streamToBuffer(stream) {
|
190560
190624
|
return new Promise((resolve, reject) => {
|
190561
190625
|
const buffers = [];
|
@@ -190584,7 +190648,7 @@ exports.default = streamToBuffer;
|
|
190584
190648
|
/***/ }),
|
190585
190649
|
|
190586
190650
|
/***/ 1148:
|
190587
|
-
/***/ (function(__unused_webpack_module, exports,
|
190651
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_880997__) {
|
190588
190652
|
|
190589
190653
|
"use strict";
|
190590
190654
|
|
@@ -190592,9 +190656,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
190592
190656
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
190593
190657
|
};
|
190594
190658
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
190595
|
-
const path_1 = __importDefault(
|
190596
|
-
const fs_extra_1 = __importDefault(
|
190597
|
-
const ignore_1 = __importDefault(
|
190659
|
+
const path_1 = __importDefault(__nested_webpack_require_880997__(5622));
|
190660
|
+
const fs_extra_1 = __importDefault(__nested_webpack_require_880997__(5392));
|
190661
|
+
const ignore_1 = __importDefault(__nested_webpack_require_880997__(3556));
|
190598
190662
|
function isCodedError(error) {
|
190599
190663
|
return (error !== null &&
|
190600
190664
|
error !== undefined &&
|
@@ -190651,13 +190715,13 @@ exports.default = default_1;
|
|
190651
190715
|
/***/ }),
|
190652
190716
|
|
190653
190717
|
/***/ 4678:
|
190654
|
-
/***/ ((__unused_webpack_module, exports,
|
190718
|
+
/***/ ((__unused_webpack_module, exports, __nested_webpack_require_883371__) => {
|
190655
190719
|
|
190656
190720
|
"use strict";
|
190657
190721
|
|
190658
190722
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
190659
190723
|
exports.getPlatformEnv = void 0;
|
190660
|
-
const errors_1 =
|
190724
|
+
const errors_1 = __nested_webpack_require_883371__(3983);
|
190661
190725
|
/**
|
190662
190726
|
* Helper function to support both `VERCEL_` and legacy `NOW_` env vars.
|
190663
190727
|
* Throws an error if *both* env vars are defined.
|
@@ -190721,7 +190785,7 @@ exports.getPrefixedEnvVars = getPrefixedEnvVars;
|
|
190721
190785
|
/***/ }),
|
190722
190786
|
|
190723
190787
|
/***/ 2855:
|
190724
|
-
/***/ (function(__unused_webpack_module, exports,
|
190788
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_885630__) {
|
190725
190789
|
|
190726
190790
|
"use strict";
|
190727
190791
|
|
@@ -190751,32 +190815,32 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
190751
190815
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
190752
190816
|
};
|
190753
190817
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
190754
|
-
exports.normalizePath = exports.readConfigFile = exports.EdgeFunction = exports.getIgnoreFilter = exports.scanParentDirs = exports.getLambdaOptionsFromFunction = exports.isSymbolicLink = exports.debug = exports.streamToBuffer = exports.getPrefixedEnvVars = exports.getPlatformEnv = exports.getSpawnOptions = exports.getDiscontinuedNodeVersions = exports.getLatestNodeVersion = exports.getNodeVersion = exports.getEnvForPackageManager = exports.runCustomInstallCommand = 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.downloadFile = exports.download = exports.Prerender = exports.createLambda = exports.NodejsLambda = exports.Lambda = exports.FileRef = exports.FileFsRef = exports.FileBlob = void 0;
|
190755
|
-
const file_blob_1 = __importDefault(
|
190818
|
+
exports.normalizePath = exports.readConfigFile = exports.EdgeFunction = exports.cloneEnv = exports.getIgnoreFilter = exports.scanParentDirs = exports.getLambdaOptionsFromFunction = exports.isSymbolicLink = exports.debug = exports.streamToBuffer = exports.getPrefixedEnvVars = exports.getPlatformEnv = exports.getSpawnOptions = exports.getDiscontinuedNodeVersions = exports.getLatestNodeVersion = exports.getNodeVersion = exports.getEnvForPackageManager = exports.runCustomInstallCommand = 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.downloadFile = exports.download = exports.Prerender = exports.createLambda = exports.NodejsLambda = exports.Lambda = exports.FileRef = exports.FileFsRef = exports.FileBlob = void 0;
|
190819
|
+
const file_blob_1 = __importDefault(__nested_webpack_require_885630__(2397));
|
190756
190820
|
exports.FileBlob = file_blob_1.default;
|
190757
|
-
const file_fs_ref_1 = __importDefault(
|
190821
|
+
const file_fs_ref_1 = __importDefault(__nested_webpack_require_885630__(9331));
|
190758
190822
|
exports.FileFsRef = file_fs_ref_1.default;
|
190759
|
-
const file_ref_1 = __importDefault(
|
190823
|
+
const file_ref_1 = __importDefault(__nested_webpack_require_885630__(5187));
|
190760
190824
|
exports.FileRef = file_ref_1.default;
|
190761
|
-
const lambda_1 =
|
190825
|
+
const lambda_1 = __nested_webpack_require_885630__(6721);
|
190762
190826
|
Object.defineProperty(exports, "Lambda", ({ enumerable: true, get: function () { return lambda_1.Lambda; } }));
|
190763
190827
|
Object.defineProperty(exports, "createLambda", ({ enumerable: true, get: function () { return lambda_1.createLambda; } }));
|
190764
190828
|
Object.defineProperty(exports, "getLambdaOptionsFromFunction", ({ enumerable: true, get: function () { return lambda_1.getLambdaOptionsFromFunction; } }));
|
190765
|
-
const nodejs_lambda_1 =
|
190829
|
+
const nodejs_lambda_1 = __nested_webpack_require_885630__(7049);
|
190766
190830
|
Object.defineProperty(exports, "NodejsLambda", ({ enumerable: true, get: function () { return nodejs_lambda_1.NodejsLambda; } }));
|
190767
|
-
const prerender_1 =
|
190831
|
+
const prerender_1 = __nested_webpack_require_885630__(2850);
|
190768
190832
|
Object.defineProperty(exports, "Prerender", ({ enumerable: true, get: function () { return prerender_1.Prerender; } }));
|
190769
|
-
const download_1 = __importStar(
|
190833
|
+
const download_1 = __importStar(__nested_webpack_require_885630__(1611));
|
190770
190834
|
exports.download = download_1.default;
|
190771
190835
|
Object.defineProperty(exports, "downloadFile", ({ enumerable: true, get: function () { return download_1.downloadFile; } }));
|
190772
190836
|
Object.defineProperty(exports, "isSymbolicLink", ({ enumerable: true, get: function () { return download_1.isSymbolicLink; } }));
|
190773
|
-
const get_writable_directory_1 = __importDefault(
|
190837
|
+
const get_writable_directory_1 = __importDefault(__nested_webpack_require_885630__(3838));
|
190774
190838
|
exports.getWriteableDirectory = get_writable_directory_1.default;
|
190775
|
-
const glob_1 = __importDefault(
|
190839
|
+
const glob_1 = __importDefault(__nested_webpack_require_885630__(4240));
|
190776
190840
|
exports.glob = glob_1.default;
|
190777
|
-
const rename_1 = __importDefault(
|
190841
|
+
const rename_1 = __importDefault(__nested_webpack_require_885630__(6718));
|
190778
190842
|
exports.rename = rename_1.default;
|
190779
|
-
const run_user_scripts_1 =
|
190843
|
+
const run_user_scripts_1 = __nested_webpack_require_885630__(1442);
|
190780
190844
|
Object.defineProperty(exports, "execAsync", ({ enumerable: true, get: function () { return run_user_scripts_1.execAsync; } }));
|
190781
190845
|
Object.defineProperty(exports, "spawnAsync", ({ enumerable: true, get: function () { return run_user_scripts_1.spawnAsync; } }));
|
190782
190846
|
Object.defineProperty(exports, "execCommand", ({ enumerable: true, get: function () { return run_user_scripts_1.execCommand; } }));
|
@@ -190795,35 +190859,37 @@ Object.defineProperty(exports, "getNodeVersion", ({ enumerable: true, get: funct
|
|
190795
190859
|
Object.defineProperty(exports, "getSpawnOptions", ({ enumerable: true, get: function () { return run_user_scripts_1.getSpawnOptions; } }));
|
190796
190860
|
Object.defineProperty(exports, "getNodeBinPath", ({ enumerable: true, get: function () { return run_user_scripts_1.getNodeBinPath; } }));
|
190797
190861
|
Object.defineProperty(exports, "scanParentDirs", ({ enumerable: true, get: function () { return run_user_scripts_1.scanParentDirs; } }));
|
190798
|
-
const node_version_1 =
|
190862
|
+
const node_version_1 = __nested_webpack_require_885630__(7903);
|
190799
190863
|
Object.defineProperty(exports, "getLatestNodeVersion", ({ enumerable: true, get: function () { return node_version_1.getLatestNodeVersion; } }));
|
190800
190864
|
Object.defineProperty(exports, "getDiscontinuedNodeVersions", ({ enumerable: true, get: function () { return node_version_1.getDiscontinuedNodeVersions; } }));
|
190801
|
-
const stream_to_buffer_1 = __importDefault(
|
190865
|
+
const stream_to_buffer_1 = __importDefault(__nested_webpack_require_885630__(2560));
|
190802
190866
|
exports.streamToBuffer = stream_to_buffer_1.default;
|
190803
|
-
const debug_1 = __importDefault(
|
190867
|
+
const debug_1 = __importDefault(__nested_webpack_require_885630__(1868));
|
190804
190868
|
exports.debug = debug_1.default;
|
190805
|
-
const get_ignore_filter_1 = __importDefault(
|
190869
|
+
const get_ignore_filter_1 = __importDefault(__nested_webpack_require_885630__(1148));
|
190806
190870
|
exports.getIgnoreFilter = get_ignore_filter_1.default;
|
190807
|
-
const get_platform_env_1 =
|
190871
|
+
const get_platform_env_1 = __nested_webpack_require_885630__(4678);
|
190808
190872
|
Object.defineProperty(exports, "getPlatformEnv", ({ enumerable: true, get: function () { return get_platform_env_1.getPlatformEnv; } }));
|
190809
|
-
const get_prefixed_env_vars_1 =
|
190873
|
+
const get_prefixed_env_vars_1 = __nested_webpack_require_885630__(6838);
|
190810
190874
|
Object.defineProperty(exports, "getPrefixedEnvVars", ({ enumerable: true, get: function () { return get_prefixed_env_vars_1.getPrefixedEnvVars; } }));
|
190811
|
-
|
190875
|
+
const clone_env_1 = __nested_webpack_require_885630__(6548);
|
190876
|
+
Object.defineProperty(exports, "cloneEnv", ({ enumerable: true, get: function () { return clone_env_1.cloneEnv; } }));
|
190877
|
+
var edge_function_1 = __nested_webpack_require_885630__(8038);
|
190812
190878
|
Object.defineProperty(exports, "EdgeFunction", ({ enumerable: true, get: function () { return edge_function_1.EdgeFunction; } }));
|
190813
|
-
var read_config_file_1 =
|
190879
|
+
var read_config_file_1 = __nested_webpack_require_885630__(7792);
|
190814
190880
|
Object.defineProperty(exports, "readConfigFile", ({ enumerable: true, get: function () { return read_config_file_1.readConfigFile; } }));
|
190815
|
-
var normalize_path_1 =
|
190881
|
+
var normalize_path_1 = __nested_webpack_require_885630__(6261);
|
190816
190882
|
Object.defineProperty(exports, "normalizePath", ({ enumerable: true, get: function () { return normalize_path_1.normalizePath; } }));
|
190817
|
-
__exportStar(
|
190818
|
-
__exportStar(
|
190819
|
-
__exportStar(
|
190820
|
-
__exportStar(
|
190883
|
+
__exportStar(__nested_webpack_require_885630__(2564), exports);
|
190884
|
+
__exportStar(__nested_webpack_require_885630__(2416), exports);
|
190885
|
+
__exportStar(__nested_webpack_require_885630__(5748), exports);
|
190886
|
+
__exportStar(__nested_webpack_require_885630__(3983), exports);
|
190821
190887
|
|
190822
190888
|
|
190823
190889
|
/***/ }),
|
190824
190890
|
|
190825
190891
|
/***/ 6721:
|
190826
|
-
/***/ (function(__unused_webpack_module, exports,
|
190892
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_894448__) {
|
190827
190893
|
|
190828
190894
|
"use strict";
|
190829
190895
|
|
@@ -190832,13 +190898,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
190832
190898
|
};
|
190833
190899
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
190834
190900
|
exports.getLambdaOptionsFromFunction = exports.createZip = exports.createLambda = exports.Lambda = void 0;
|
190835
|
-
const assert_1 = __importDefault(
|
190836
|
-
const async_sema_1 = __importDefault(
|
190837
|
-
const yazl_1 =
|
190838
|
-
const minimatch_1 = __importDefault(
|
190839
|
-
const fs_extra_1 =
|
190840
|
-
const download_1 =
|
190841
|
-
const stream_to_buffer_1 = __importDefault(
|
190901
|
+
const assert_1 = __importDefault(__nested_webpack_require_894448__(2357));
|
190902
|
+
const async_sema_1 = __importDefault(__nested_webpack_require_894448__(5758));
|
190903
|
+
const yazl_1 = __nested_webpack_require_894448__(1223);
|
190904
|
+
const minimatch_1 = __importDefault(__nested_webpack_require_894448__(9566));
|
190905
|
+
const fs_extra_1 = __nested_webpack_require_894448__(5392);
|
190906
|
+
const download_1 = __nested_webpack_require_894448__(1611);
|
190907
|
+
const stream_to_buffer_1 = __importDefault(__nested_webpack_require_894448__(2560));
|
190842
190908
|
class Lambda {
|
190843
190909
|
constructor(opts) {
|
190844
190910
|
const { handler, runtime, maxDuration, memory, environment = {}, allowQuery, regions, supportsMultiPayloads, supportsWrapper, } = opts;
|
@@ -190964,13 +191030,13 @@ exports.getLambdaOptionsFromFunction = getLambdaOptionsFromFunction;
|
|
190964
191030
|
/***/ }),
|
190965
191031
|
|
190966
191032
|
/***/ 7049:
|
190967
|
-
/***/ ((__unused_webpack_module, exports,
|
191033
|
+
/***/ ((__unused_webpack_module, exports, __nested_webpack_require_900131__) => {
|
190968
191034
|
|
190969
191035
|
"use strict";
|
190970
191036
|
|
190971
191037
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
190972
191038
|
exports.NodejsLambda = void 0;
|
190973
|
-
const lambda_1 =
|
191039
|
+
const lambda_1 = __nested_webpack_require_900131__(6721);
|
190974
191040
|
class NodejsLambda extends lambda_1.Lambda {
|
190975
191041
|
constructor({ shouldAddHelpers, shouldAddSourcemapSupport, awsLambdaHandler, ...opts }) {
|
190976
191042
|
super(opts);
|
@@ -191107,13 +191173,13 @@ exports.buildsSchema = {
|
|
191107
191173
|
/***/ }),
|
191108
191174
|
|
191109
191175
|
/***/ 2564:
|
191110
|
-
/***/ ((__unused_webpack_module, exports,
|
191176
|
+
/***/ ((__unused_webpack_module, exports, __nested_webpack_require_904476__) => {
|
191111
191177
|
|
191112
191178
|
"use strict";
|
191113
191179
|
|
191114
191180
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
191115
191181
|
exports.shouldServe = void 0;
|
191116
|
-
const path_1 =
|
191182
|
+
const path_1 = __nested_webpack_require_904476__(5622);
|
191117
191183
|
const shouldServe = ({ entrypoint, files, requestPath, }) => {
|
191118
191184
|
requestPath = requestPath.replace(/\/$/, ''); // sanitize trailing '/'
|
191119
191185
|
entrypoint = entrypoint.replace(/\\/, '/'); // windows compatibility
|
@@ -191358,7 +191424,7 @@ module.exports = __webpack_require__(78761);
|
|
191358
191424
|
/******/ var __webpack_module_cache__ = {};
|
191359
191425
|
/******/
|
191360
191426
|
/******/ // The require function
|
191361
|
-
/******/ function
|
191427
|
+
/******/ function __nested_webpack_require_1281841__(moduleId) {
|
191362
191428
|
/******/ // Check if module is in cache
|
191363
191429
|
/******/ if(__webpack_module_cache__[moduleId]) {
|
191364
191430
|
/******/ return __webpack_module_cache__[moduleId].exports;
|
@@ -191373,7 +191439,7 @@ module.exports = __webpack_require__(78761);
|
|
191373
191439
|
/******/ // Execute the module function
|
191374
191440
|
/******/ var threw = true;
|
191375
191441
|
/******/ try {
|
191376
|
-
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports,
|
191442
|
+
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_1281841__);
|
191377
191443
|
/******/ threw = false;
|
191378
191444
|
/******/ } finally {
|
191379
191445
|
/******/ if(threw) delete __webpack_module_cache__[moduleId];
|
@@ -191386,11 +191452,11 @@ module.exports = __webpack_require__(78761);
|
|
191386
191452
|
/************************************************************************/
|
191387
191453
|
/******/ /* webpack/runtime/compat */
|
191388
191454
|
/******/
|
191389
|
-
/******/
|
191455
|
+
/******/ __nested_webpack_require_1281841__.ab = __dirname + "/";/************************************************************************/
|
191390
191456
|
/******/ // module exports must be returned from runtime so entry inlining is disabled
|
191391
191457
|
/******/ // startup
|
191392
191458
|
/******/ // Load entry module and return exports
|
191393
|
-
/******/ return
|
191459
|
+
/******/ return __nested_webpack_require_1281841__(2855);
|
191394
191460
|
/******/ })()
|
191395
191461
|
;
|
191396
191462
|
|
@@ -209311,7 +209377,7 @@ exports.frameworks = [
|
|
209311
209377
|
name: 'Blitz.js',
|
209312
209378
|
slug: 'blitzjs',
|
209313
209379
|
demo: 'https://blitz-template.vercel.app',
|
209314
|
-
logo: 'https://
|
209380
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/blitz.svg',
|
209315
209381
|
tagline: 'Blitz.js: The Fullstack React Framework',
|
209316
209382
|
description: 'A brand new Blitz.js app - the result of running `npx blitz new`.',
|
209317
209383
|
website: 'https://blitzjs.com',
|
@@ -209346,8 +209412,8 @@ exports.frameworks = [
|
|
209346
209412
|
name: 'Next.js',
|
209347
209413
|
slug: 'nextjs',
|
209348
209414
|
demo: 'https://nextjs-template.vercel.app',
|
209349
|
-
logo: 'https://
|
209350
|
-
darkModeLogo: 'https://
|
209415
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/next.svg',
|
209416
|
+
darkModeLogo: 'https://api-frameworks.vercel.sh/framework-logos/next-dark.svg',
|
209351
209417
|
screenshot: 'https://assets.vercel.com/image/upload/v1647366075/front/import/nextjs.png',
|
209352
209418
|
tagline: 'Next.js makes you productive with React instantly — whether you want to build static or dynamic sites.',
|
209353
209419
|
description: 'A Next.js app and a Serverless Function API.',
|
@@ -209392,7 +209458,7 @@ exports.frameworks = [
|
|
209392
209458
|
name: 'Gatsby.js',
|
209393
209459
|
slug: 'gatsby',
|
209394
209460
|
demo: 'https://gatsby.vercel.app',
|
209395
|
-
logo: 'https://
|
209461
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/gatsby.svg',
|
209396
209462
|
tagline: 'Gatsby helps developers build blazing fast websites and apps with React.',
|
209397
209463
|
description: 'A Gatsby starter app with an API Route.',
|
209398
209464
|
website: 'https://gatsbyjs.org',
|
@@ -209474,7 +209540,7 @@ exports.frameworks = [
|
|
209474
209540
|
name: 'Remix',
|
209475
209541
|
slug: 'remix',
|
209476
209542
|
demo: 'https://remix-run-template.vercel.app',
|
209477
|
-
logo: 'https://
|
209543
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/remix-no-shadow.svg',
|
209478
209544
|
tagline: 'Build Better Websites',
|
209479
209545
|
description: 'A new Remix app — the result of running `npx create-remix`.',
|
209480
209546
|
website: 'https://remix.run',
|
@@ -209511,8 +209577,8 @@ exports.frameworks = [
|
|
209511
209577
|
name: 'Astro',
|
209512
209578
|
slug: 'astro',
|
209513
209579
|
demo: 'https://astro-template.vercel.app',
|
209514
|
-
logo: 'https://
|
209515
|
-
darkModeLogo: 'https://
|
209580
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/astro.svg',
|
209581
|
+
darkModeLogo: 'https://api-frameworks.vercel.sh/framework-logos/astro-dark.svg',
|
209516
209582
|
tagline: 'Astro is a new kind of static site builder for the modern web. Powerful developer experience meets lightweight output.',
|
209517
209583
|
description: 'An Astro site, using the basics starter kit.',
|
209518
209584
|
website: 'https://astro.build',
|
@@ -209562,7 +209628,7 @@ exports.frameworks = [
|
|
209562
209628
|
name: 'Hexo',
|
209563
209629
|
slug: 'hexo',
|
209564
209630
|
demo: 'https://hexo-template.vercel.app',
|
209565
|
-
logo: 'https://
|
209631
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/hexo.svg',
|
209566
209632
|
tagline: 'Hexo is a fast, simple & powerful blog framework powered by Node.js.',
|
209567
209633
|
description: 'A Hexo site, created with the Hexo CLI.',
|
209568
209634
|
website: 'https://hexo.io',
|
@@ -209597,7 +209663,7 @@ exports.frameworks = [
|
|
209597
209663
|
name: 'Eleventy',
|
209598
209664
|
slug: 'eleventy',
|
209599
209665
|
demo: 'https://eleventy-template.vercel.app',
|
209600
|
-
logo: 'https://
|
209666
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/eleventy.svg',
|
209601
209667
|
tagline: '11ty is a simpler static site generator written in JavaScript, created to be an alternative to Jekyll.',
|
209602
209668
|
description: 'An Eleventy site, created with npm init.',
|
209603
209669
|
website: 'https://www.11ty.dev',
|
@@ -209633,7 +209699,7 @@ exports.frameworks = [
|
|
209633
209699
|
name: 'Docusaurus 2',
|
209634
209700
|
slug: 'docusaurus-2',
|
209635
209701
|
demo: 'https://docusaurus-2-template.vercel.app',
|
209636
|
-
logo: 'https://
|
209702
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/docusaurus.svg',
|
209637
209703
|
tagline: 'Docusaurus makes it easy to maintain Open Source documentation websites.',
|
209638
209704
|
description: 'A static Docusaurus site that makes it easy to maintain OSS documentation.',
|
209639
209705
|
website: 'https://v2.docusaurus.io',
|
@@ -209717,7 +209783,7 @@ exports.frameworks = [
|
|
209717
209783
|
name: 'Docusaurus 1',
|
209718
209784
|
slug: 'docusaurus',
|
209719
209785
|
demo: 'https://docusaurus-template.vercel.app',
|
209720
|
-
logo: 'https://
|
209786
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/docusaurus.svg',
|
209721
209787
|
tagline: 'Docusaurus makes it easy to maintain Open Source documentation websites.',
|
209722
209788
|
description: 'A static Docusaurus site that makes it easy to maintain OSS documentation.',
|
209723
209789
|
website: 'https://docusaurus.io/',
|
@@ -209766,7 +209832,7 @@ exports.frameworks = [
|
|
209766
209832
|
name: 'Preact',
|
209767
209833
|
slug: 'preact',
|
209768
209834
|
demo: 'https://preact-template.vercel.app',
|
209769
|
-
logo: 'https://
|
209835
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/preact.svg',
|
209770
209836
|
tagline: 'Preact is a fast 3kB alternative to React with the same modern API.',
|
209771
209837
|
description: 'A Preact app, created with the Preact CLI.',
|
209772
209838
|
website: 'https://preactjs.com',
|
@@ -209810,7 +209876,7 @@ exports.frameworks = [
|
|
209810
209876
|
name: 'SolidStart',
|
209811
209877
|
slug: 'solidstart',
|
209812
209878
|
demo: 'https://solid-start-template.vercel.app',
|
209813
|
-
logo: 'https://
|
209879
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/solid.svg',
|
209814
209880
|
tagline: 'Simple and performant reactivity for building user interfaces.',
|
209815
209881
|
description: 'A Solid app, created with SolidStart.',
|
209816
209882
|
website: 'https://solidjs.com',
|
@@ -209848,7 +209914,7 @@ exports.frameworks = [
|
|
209848
209914
|
name: 'Dojo',
|
209849
209915
|
slug: 'dojo',
|
209850
209916
|
demo: 'https://dojo-template.vercel.app',
|
209851
|
-
logo: 'https://
|
209917
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/dojo.png',
|
209852
209918
|
tagline: 'Dojo is a modern progressive, TypeScript first framework.',
|
209853
209919
|
description: "A Dojo app, created with the Dojo CLI's cli-create-app command.",
|
209854
209920
|
website: 'https://dojo.io',
|
@@ -209908,7 +209974,7 @@ exports.frameworks = [
|
|
209908
209974
|
name: 'Ember.js',
|
209909
209975
|
slug: 'ember',
|
209910
209976
|
demo: 'https://ember-template.vercel.app',
|
209911
|
-
logo: 'https://
|
209977
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/ember.svg',
|
209912
209978
|
tagline: 'Ember.js helps webapp developers be more productive out of the box.',
|
209913
209979
|
description: 'An Ember app, created with the Ember CLI.',
|
209914
209980
|
website: 'https://emberjs.com/',
|
@@ -209952,7 +210018,7 @@ exports.frameworks = [
|
|
209952
210018
|
name: 'Vue.js',
|
209953
210019
|
slug: 'vue',
|
209954
210020
|
demo: 'https://vue-template.vercel.app',
|
209955
|
-
logo: 'https://
|
210021
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/vue.svg',
|
209956
210022
|
tagline: 'Vue.js is a versatile JavaScript framework that is as approachable as it is performant.',
|
209957
210023
|
description: 'A Vue.js app, created with the Vue CLI.',
|
209958
210024
|
website: 'https://vuejs.org',
|
@@ -210007,7 +210073,7 @@ exports.frameworks = [
|
|
210007
210073
|
name: 'Scully',
|
210008
210074
|
slug: 'scully',
|
210009
210075
|
demo: 'https://scully-template.vercel.app',
|
210010
|
-
logo: 'https://
|
210076
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/scullyio-logo.png',
|
210011
210077
|
tagline: 'Scully is a static site generator for Angular.',
|
210012
210078
|
description: 'The Static Site Generator for Angular apps.',
|
210013
210079
|
website: 'https://github.com/scullyio/scully',
|
@@ -210042,7 +210108,7 @@ exports.frameworks = [
|
|
210042
210108
|
name: 'Ionic Angular',
|
210043
210109
|
slug: 'ionic-angular',
|
210044
210110
|
demo: 'https://ionic-angular-template.vercel.app',
|
210045
|
-
logo: 'https://
|
210111
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/ionic.svg',
|
210046
210112
|
tagline: 'Ionic Angular allows you to build mobile PWAs with Angular and the Ionic Framework.',
|
210047
210113
|
description: 'An Ionic Angular site, created with the Ionic CLI.',
|
210048
210114
|
website: 'https://ionicframework.com',
|
@@ -210085,7 +210151,7 @@ exports.frameworks = [
|
|
210085
210151
|
name: 'Angular',
|
210086
210152
|
slug: 'angular',
|
210087
210153
|
demo: 'https://angular-template.vercel.app',
|
210088
|
-
logo: 'https://
|
210154
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/angular.svg',
|
210089
210155
|
tagline: 'Angular is a TypeScript-based cross-platform framework from Google.',
|
210090
210156
|
description: 'An Angular app, created with the Angular CLI.',
|
210091
210157
|
website: 'https://angular.io',
|
@@ -210143,7 +210209,7 @@ exports.frameworks = [
|
|
210143
210209
|
name: 'Polymer',
|
210144
210210
|
slug: 'polymer',
|
210145
210211
|
demo: 'https://polymer-template.vercel.app',
|
210146
|
-
logo: 'https://
|
210212
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/polymer.svg',
|
210147
210213
|
tagline: 'Polymer is an open-source webapps library from Google, for building using Web Components.',
|
210148
210214
|
description: 'A Polymer app, created with the Polymer CLI.',
|
210149
210215
|
website: 'https://www.polymer-project.org/',
|
@@ -210199,7 +210265,7 @@ exports.frameworks = [
|
|
210199
210265
|
name: 'Svelte',
|
210200
210266
|
slug: 'svelte',
|
210201
210267
|
demo: 'https://svelte.vercel.app',
|
210202
|
-
logo: 'https://
|
210268
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/svelte.svg',
|
210203
210269
|
tagline: 'Svelte lets you write high performance reactive apps with significantly less boilerplate.',
|
210204
210270
|
description: 'A basic Svelte app using the default template.',
|
210205
210271
|
website: 'https://svelte.dev',
|
@@ -210247,7 +210313,7 @@ exports.frameworks = [
|
|
210247
210313
|
name: 'SvelteKit',
|
210248
210314
|
slug: 'sveltekit',
|
210249
210315
|
demo: 'https://sveltekit-template.vercel.app',
|
210250
|
-
logo: 'https://
|
210316
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/svelte.svg',
|
210251
210317
|
screenshot: 'https://assets.vercel.com/image/upload/v1647366075/front/import/sveltekit.png',
|
210252
210318
|
tagline: 'SvelteKit is a framework for building web applications of all sizes.',
|
210253
210319
|
description: 'A SvelteKit app optimized Edge-first.',
|
@@ -210283,7 +210349,7 @@ exports.frameworks = [
|
|
210283
210349
|
name: 'Ionic React',
|
210284
210350
|
slug: 'ionic-react',
|
210285
210351
|
demo: 'https://ionic-react-template.vercel.app',
|
210286
|
-
logo: 'https://
|
210352
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/ionic.svg',
|
210287
210353
|
tagline: 'Ionic React allows you to build mobile PWAs with React and the Ionic Framework.',
|
210288
210354
|
description: 'An Ionic React site, created with the Ionic CLI.',
|
210289
210355
|
website: 'https://ionicframework.com',
|
@@ -210342,7 +210408,7 @@ exports.frameworks = [
|
|
210342
210408
|
name: 'Create React App',
|
210343
210409
|
slug: 'create-react-app',
|
210344
210410
|
demo: 'https://create-react-template.vercel.app',
|
210345
|
-
logo: 'https://
|
210411
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/react.svg',
|
210346
210412
|
tagline: 'Create React App allows you to get going with React in no time.',
|
210347
210413
|
description: 'A client-side React app created with create-react-app.',
|
210348
210414
|
website: 'https://create-react-app.dev',
|
@@ -210407,7 +210473,7 @@ exports.frameworks = [
|
|
210407
210473
|
name: 'Gridsome',
|
210408
210474
|
slug: 'gridsome',
|
210409
210475
|
demo: 'https://gridsome-template.vercel.app',
|
210410
|
-
logo: 'https://
|
210476
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/gridsome.svg',
|
210411
210477
|
tagline: 'Gridsome is a Vue.js-powered framework for building websites & apps that are fast by default.',
|
210412
210478
|
description: 'A Gridsome app, created with the Gridsome CLI.',
|
210413
210479
|
website: 'https://gridsome.org/',
|
@@ -210442,7 +210508,7 @@ exports.frameworks = [
|
|
210442
210508
|
name: 'UmiJS',
|
210443
210509
|
slug: 'umijs',
|
210444
210510
|
demo: 'https://umijs-template.vercel.app',
|
210445
|
-
logo: 'https://
|
210511
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/umi.svg',
|
210446
210512
|
tagline: 'UmiJS is an extensible enterprise-level React application framework.',
|
210447
210513
|
description: 'An UmiJS app, created using the Umi CLI.',
|
210448
210514
|
website: 'https://umijs.org',
|
@@ -210486,7 +210552,7 @@ exports.frameworks = [
|
|
210486
210552
|
name: 'Sapper',
|
210487
210553
|
slug: 'sapper',
|
210488
210554
|
demo: 'https://sapper-template.vercel.app',
|
210489
|
-
logo: 'https://
|
210555
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/svelte.svg',
|
210490
210556
|
tagline: 'Sapper is a framework for building high-performance universal web apps with Svelte.',
|
210491
210557
|
description: 'A Sapper app, using the Sapper template.',
|
210492
210558
|
website: 'https://sapper.svelte.dev',
|
@@ -210521,7 +210587,7 @@ exports.frameworks = [
|
|
210521
210587
|
name: 'Saber',
|
210522
210588
|
slug: 'saber',
|
210523
210589
|
demo: 'https://saber-template.vercel.app',
|
210524
|
-
logo: 'https://
|
210590
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/saber.svg',
|
210525
210591
|
tagline: 'Saber is a framework for building static sites in Vue.js that supports data from any source.',
|
210526
210592
|
description: 'A Saber site, created with npm init.',
|
210527
210593
|
website: 'https://saber.land/',
|
@@ -210570,7 +210636,7 @@ exports.frameworks = [
|
|
210570
210636
|
name: 'Stencil',
|
210571
210637
|
slug: 'stencil',
|
210572
210638
|
demo: 'https://stencil.vercel.app',
|
210573
|
-
logo: 'https://
|
210639
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/stencil.svg',
|
210574
210640
|
tagline: 'Stencil is a powerful toolchain for building Progressive Web Apps and Design Systems.',
|
210575
210641
|
description: 'A Stencil site, created with the Stencil CLI.',
|
210576
210642
|
website: 'https://stenciljs.com/',
|
@@ -210629,7 +210695,7 @@ exports.frameworks = [
|
|
210629
210695
|
name: 'Nuxt.js',
|
210630
210696
|
slug: 'nuxtjs',
|
210631
210697
|
demo: 'https://nuxtjs-template.vercel.app',
|
210632
|
-
logo: 'https://
|
210698
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/nuxt.svg',
|
210633
210699
|
screenshot: 'https://assets.vercel.com/image/upload/v1647366075/front/import/nuxtjs.png',
|
210634
210700
|
tagline: 'Nuxt.js is the web comprehensive framework that lets you dream big with Vue.js.',
|
210635
210701
|
description: 'A Nuxt.js app, bootstrapped with create-nuxt-app.',
|
@@ -210686,7 +210752,7 @@ exports.frameworks = [
|
|
210686
210752
|
name: 'RedwoodJS',
|
210687
210753
|
slug: 'redwoodjs',
|
210688
210754
|
demo: 'https://redwood-template.vercel.app',
|
210689
|
-
logo: 'https://
|
210755
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/redwoodjs.svg',
|
210690
210756
|
tagline: 'RedwoodJS is a full-stack framework for the Jamstack.',
|
210691
210757
|
description: 'A RedwoodJS app, bootstraped with create-redwood-app.',
|
210692
210758
|
website: 'https://redwoodjs.com',
|
@@ -210722,7 +210788,7 @@ exports.frameworks = [
|
|
210722
210788
|
name: 'Hugo',
|
210723
210789
|
slug: 'hugo',
|
210724
210790
|
demo: 'https://hugo-template.vercel.app',
|
210725
|
-
logo: 'https://
|
210791
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/hugo.svg',
|
210726
210792
|
tagline: 'Hugo is the world’s fastest framework for building websites, written in Go.',
|
210727
210793
|
description: 'A Hugo site, created with the Hugo CLI.',
|
210728
210794
|
website: 'https://gohugo.io',
|
@@ -210770,7 +210836,7 @@ exports.frameworks = [
|
|
210770
210836
|
name: 'Jekyll',
|
210771
210837
|
slug: 'jekyll',
|
210772
210838
|
demo: 'https://jekyll-template.vercel.app',
|
210773
|
-
logo: 'https://
|
210839
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/jekyll.svg',
|
210774
210840
|
tagline: 'Jekyll makes it super easy to transform your plain text into static websites and blogs.',
|
210775
210841
|
description: 'A Jekyll site, created with the Jekyll CLI.',
|
210776
210842
|
website: 'https://jekyllrb.com/',
|
@@ -210807,7 +210873,7 @@ exports.frameworks = [
|
|
210807
210873
|
name: 'Brunch',
|
210808
210874
|
slug: 'brunch',
|
210809
210875
|
demo: 'https://brunch-template.vercel.app',
|
210810
|
-
logo: 'https://
|
210876
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/brunch.svg',
|
210811
210877
|
tagline: 'Brunch is a fast and simple webapp build tool with seamless incremental compilation for rapid development.',
|
210812
210878
|
description: 'A Brunch app, created with the Brunch CLI.',
|
210813
210879
|
website: 'https://brunch.io/',
|
@@ -210840,7 +210906,7 @@ exports.frameworks = [
|
|
210840
210906
|
name: 'Middleman',
|
210841
210907
|
slug: 'middleman',
|
210842
210908
|
demo: 'https://middleman-template.vercel.app',
|
210843
|
-
logo: 'https://
|
210909
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/middleman.svg',
|
210844
210910
|
tagline: 'Middleman is a static site generator that uses all the shortcuts and tools in modern web development.',
|
210845
210911
|
description: 'A Middleman app, created with the Middleman CLI.',
|
210846
210912
|
website: 'https://middlemanapp.com/',
|
@@ -210874,7 +210940,7 @@ exports.frameworks = [
|
|
210874
210940
|
name: 'Zola',
|
210875
210941
|
slug: 'zola',
|
210876
210942
|
demo: 'https://zola-template.vercel.app',
|
210877
|
-
logo: 'https://
|
210943
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/zola.png',
|
210878
210944
|
tagline: 'Everything you need to make a static site engine in one binary.',
|
210879
210945
|
description: 'A Zola app, created with the "Getting Started" tutorial.',
|
210880
210946
|
website: 'https://www.getzola.org',
|
@@ -210908,7 +210974,7 @@ exports.frameworks = [
|
|
210908
210974
|
name: 'Vite',
|
210909
210975
|
slug: 'vite',
|
210910
210976
|
demo: 'https://vite-vue-template.vercel.app',
|
210911
|
-
logo: 'https://
|
210977
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/vite.svg',
|
210912
210978
|
tagline: 'Vite is a new breed of frontend build tool that significantly improves the frontend development experience.',
|
210913
210979
|
description: 'A Vue.js app, created with Vite.',
|
210914
210980
|
website: 'https://vitejs.dev',
|
@@ -210944,7 +211010,7 @@ exports.frameworks = [
|
|
210944
211010
|
name: 'Parcel',
|
210945
211011
|
slug: 'parcel',
|
210946
211012
|
demo: 'https://parcel-template.vercel.app',
|
210947
|
-
logo: 'https://
|
211013
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/parcel.png',
|
210948
211014
|
tagline: 'Parcel is a zero configuration build tool for the web that scales to projects of any size and complexity.',
|
210949
211015
|
description: 'A vanilla web app built with Parcel.',
|
210950
211016
|
website: 'https://parceljs.org',
|
@@ -210989,7 +211055,7 @@ exports.frameworks = [
|
|
210989
211055
|
name: 'Sanity',
|
210990
211056
|
slug: 'sanity',
|
210991
211057
|
demo: 'https://sanity-studio-template.vercel.app',
|
210992
|
-
logo: 'https://
|
211058
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/sanity.svg',
|
210993
211059
|
tagline: 'The structured content platform.',
|
210994
211060
|
description: 'A Sanity Studio',
|
210995
211061
|
website: 'https://www.sanity.io',
|
@@ -211038,7 +211104,7 @@ exports.frameworks = [
|
|
211038
211104
|
name: 'Hydrogen',
|
211039
211105
|
slug: 'hydrogen',
|
211040
211106
|
demo: 'https://hydrogen-template.vercel.app',
|
211041
|
-
logo: 'https://
|
211107
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/hydrogen.svg',
|
211042
211108
|
tagline: 'React framework for headless commerce',
|
211043
211109
|
description: 'React framework for headless commerce',
|
211044
211110
|
website: 'https://hydrogen.shopify.dev',
|
@@ -211072,7 +211138,7 @@ exports.frameworks = [
|
|
211072
211138
|
{
|
211073
211139
|
name: 'Other',
|
211074
211140
|
slug: null,
|
211075
|
-
logo: 'https://
|
211141
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/other.svg',
|
211076
211142
|
description: 'No framework or an unoptimized framework.',
|
211077
211143
|
settings: {
|
211078
211144
|
installCommand: {
|
@@ -216794,6 +216860,9 @@ async function getWorkspacePackagePaths({ fs, workspace, }) {
|
|
216794
216860
|
case 'pnpm':
|
216795
216861
|
results = await getPnpmWorkspacePackagePaths({ fs: workspaceFs });
|
216796
216862
|
break;
|
216863
|
+
case 'nx':
|
216864
|
+
results = await getNxWorkspacePackagePaths({ fs: workspaceFs });
|
216865
|
+
break;
|
216797
216866
|
default:
|
216798
216867
|
throw new Error(`Unknown workspace implementation: ${type}`);
|
216799
216868
|
}
|
@@ -216829,6 +216898,12 @@ async function getPackageJsonWorkspacePackagePaths({ fs, }) {
|
|
216829
216898
|
}
|
216830
216899
|
return getPackagePaths(packages, fs);
|
216831
216900
|
}
|
216901
|
+
async function getNxWorkspacePackagePaths({ fs, }) {
|
216902
|
+
const nxWorkspaceJsonAsBuffer = await fs.readFile('workspace.json');
|
216903
|
+
const { projects } = JSON.parse(nxWorkspaceJsonAsBuffer.toString());
|
216904
|
+
const packages = Object.values(projects);
|
216905
|
+
return getPackagePaths(packages, fs);
|
216906
|
+
}
|
216832
216907
|
async function getPnpmWorkspacePackagePaths({ fs, }) {
|
216833
216908
|
const pnpmWorkspaceAsBuffer = await fs.readFile('pnpm-workspace.yaml');
|
216834
216909
|
const { packages = [] } = js_yaml_1.default.load(pnpmWorkspaceAsBuffer.toString());
|
@@ -216943,6 +217018,18 @@ exports.workspaceManagers = [
|
|
216943
217018
|
],
|
216944
217019
|
},
|
216945
217020
|
},
|
217021
|
+
{
|
217022
|
+
name: 'nx',
|
217023
|
+
slug: 'nx',
|
217024
|
+
detectors: {
|
217025
|
+
every: [
|
217026
|
+
{
|
217027
|
+
path: 'workspace.json',
|
217028
|
+
matchContent: '"projects":\\s*{[^}]',
|
217029
|
+
},
|
217030
|
+
],
|
217031
|
+
},
|
217032
|
+
},
|
216946
217033
|
{
|
216947
217034
|
name: 'default',
|
216948
217035
|
slug: 'yarn',
|
@@ -227415,7 +227502,82 @@ async function doBuild(client, project, buildsJson, cwd, outputDir) {
|
|
227415
227502
|
userRoutes: routesResult.routes,
|
227416
227503
|
builds: builderRoutes,
|
227417
227504
|
});
|
227418
|
-
const
|
227505
|
+
const images = vercelConfig?.images;
|
227506
|
+
if (images) {
|
227507
|
+
if (typeof images !== 'object') {
|
227508
|
+
throw new Error(`vercel.json "images" should be an object received ${typeof images}.`);
|
227509
|
+
}
|
227510
|
+
if (!Array.isArray(images.domains)) {
|
227511
|
+
throw new Error(`vercel.json "images.domains" should be an Array received ${typeof images.domains}.`);
|
227512
|
+
}
|
227513
|
+
if (images.domains.length > 50) {
|
227514
|
+
throw new Error(`vercel.json "images.domains" exceeds length of 50 received length (${images.domains.length}).`);
|
227515
|
+
}
|
227516
|
+
const invalidImageDomains = images.domains.filter((d) => typeof d !== 'string');
|
227517
|
+
if (invalidImageDomains.length > 0) {
|
227518
|
+
throw new Error(`vercel.json "images.domains" should be an Array of strings received invalid values (${invalidImageDomains.join(', ')}).`);
|
227519
|
+
}
|
227520
|
+
if (images.remotePatterns) {
|
227521
|
+
if (!Array.isArray(images.remotePatterns)) {
|
227522
|
+
throw new Error(`vercel.json "images.remotePatterns" should be an Array received ${typeof images.remotePatterns}.`);
|
227523
|
+
}
|
227524
|
+
if (images.remotePatterns.length > 50) {
|
227525
|
+
throw new Error(`vercel.json "images.remotePatterns" exceeds length of 50, received length (${images.remotePatterns.length}).`);
|
227526
|
+
}
|
227527
|
+
const validProps = new Set(['protocol', 'hostname', 'pathname', 'port']);
|
227528
|
+
const requiredProps = ['hostname'];
|
227529
|
+
const invalidPatterns = images.remotePatterns.filter((d) => !d ||
|
227530
|
+
typeof d !== 'object' ||
|
227531
|
+
Object.entries(d).some(([k, v]) => !validProps.has(k) || typeof v !== 'string') ||
|
227532
|
+
requiredProps.some(k => !(k in d)));
|
227533
|
+
if (invalidPatterns.length > 0) {
|
227534
|
+
throw new Error(`vercel.json "images.remotePatterns" received invalid values:\n${invalidPatterns
|
227535
|
+
.map(item => JSON.stringify(item))
|
227536
|
+
.join('\n')}\n\nremotePatterns value must follow format { protocol: 'https', hostname: 'example.com', port: '', pathname: '/imgs/**' }.`);
|
227537
|
+
}
|
227538
|
+
}
|
227539
|
+
if (!Array.isArray(images.sizes)) {
|
227540
|
+
throw new Error(`vercel.json "images.sizes" should be an Array received ${typeof images.sizes}.`);
|
227541
|
+
}
|
227542
|
+
if (images.sizes.length < 1 || images.sizes.length > 50) {
|
227543
|
+
throw new Error(`vercel.json "images.sizes" should be an Array of length between 1 to 50 received length (${images.sizes.length}).`);
|
227544
|
+
}
|
227545
|
+
const invalidImageSizes = images.sizes.filter((d) => {
|
227546
|
+
return typeof d !== 'number' || d < 1 || d > 10000;
|
227547
|
+
});
|
227548
|
+
if (invalidImageSizes.length > 0) {
|
227549
|
+
throw new Error(`vercel.json "images.sizes" should be an Array of numbers that are between 1 and 10000, received invalid values (${invalidImageSizes.join(', ')}).`);
|
227550
|
+
}
|
227551
|
+
if (images.minimumCacheTTL) {
|
227552
|
+
if (!Number.isInteger(images.minimumCacheTTL) ||
|
227553
|
+
images.minimumCacheTTL < 0) {
|
227554
|
+
throw new Error(`vercel.json "images.minimumCacheTTL" should be an integer 0 or more received (${images.minimumCacheTTL}).`);
|
227555
|
+
}
|
227556
|
+
}
|
227557
|
+
if (images.formats) {
|
227558
|
+
if (!Array.isArray(images.formats)) {
|
227559
|
+
throw new Error(`vercel.json "images.formats" should be an Array received ${typeof images.formats}.`);
|
227560
|
+
}
|
227561
|
+
if (images.formats.length < 1 || images.formats.length > 2) {
|
227562
|
+
throw new Error(`vercel.json "images.formats" must be length 1 or 2, received length (${images.formats.length}).`);
|
227563
|
+
}
|
227564
|
+
const invalid = images.formats.filter(f => {
|
227565
|
+
return f !== 'image/avif' && f !== 'image/webp';
|
227566
|
+
});
|
227567
|
+
if (invalid.length > 0) {
|
227568
|
+
throw new Error(`vercel.json "images.formats" should be an Array of mime type strings, received invalid values (${invalid.join(', ')}).`);
|
227569
|
+
}
|
227570
|
+
}
|
227571
|
+
if (typeof images.dangerouslyAllowSVG !== 'undefined' &&
|
227572
|
+
typeof images.dangerouslyAllowSVG !== 'boolean') {
|
227573
|
+
throw new Error(`vercel.json "images.dangerouslyAllowSVG" should be a boolean received (${images.dangerouslyAllowSVG}).`);
|
227574
|
+
}
|
227575
|
+
if (typeof images.contentSecurityPolicy !== 'undefined' &&
|
227576
|
+
typeof images.contentSecurityPolicy !== 'string') {
|
227577
|
+
throw new Error(`vercel.json "images.contentSecurityPolicy" should be a string received ${images.contentSecurityPolicy}`);
|
227578
|
+
}
|
227579
|
+
}
|
227580
|
+
const mergedImages = mergeImages(images, buildResults.values());
|
227419
227581
|
const mergedWildcard = mergeWildcard(buildResults.values());
|
227420
227582
|
const mergedOverrides = overrides.length > 0 ? Object.assign({}, ...overrides) : undefined;
|
227421
227583
|
// Write out the final `config.json` file based on the
|
@@ -227464,8 +227626,7 @@ function expandBuild(files, build) {
|
|
227464
227626
|
};
|
227465
227627
|
});
|
227466
227628
|
}
|
227467
|
-
function mergeImages(buildResults) {
|
227468
|
-
let images = undefined;
|
227629
|
+
function mergeImages(images, buildResults) {
|
227469
227630
|
for (const result of buildResults) {
|
227470
227631
|
if ('images' in result && result.images) {
|
227471
227632
|
images = Object.assign({}, images, result.images);
|
@@ -228482,7 +228643,12 @@ exports.default = async (client) => {
|
|
228482
228643
|
quiet,
|
228483
228644
|
wantsPublic: argv['--public'] || localConfig.public,
|
228484
228645
|
type: null,
|
228485
|
-
nowConfig:
|
228646
|
+
nowConfig: {
|
228647
|
+
...localConfig,
|
228648
|
+
// `images` is allowed in "vercel.json" and processed
|
228649
|
+
// by `vc build`, but don't send it to the API endpoint
|
228650
|
+
images: undefined,
|
228651
|
+
},
|
228486
228652
|
regions,
|
228487
228653
|
meta,
|
228488
228654
|
gitMetadata,
|
@@ -228738,7 +228904,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
228738
228904
|
const path_1 = __webpack_require__(85622);
|
228739
228905
|
const fs_extra_1 = __importDefault(__webpack_require__(45392));
|
228740
228906
|
const server_1 = __importDefault(__webpack_require__(18433));
|
228741
|
-
const parse_listen_1 =
|
228907
|
+
const parse_listen_1 = __webpack_require__(1919);
|
228742
228908
|
const link_1 = __webpack_require__(67630);
|
228743
228909
|
const get_decrypted_env_records_1 = __importDefault(__webpack_require__(30861));
|
228744
228910
|
const setup_and_link_1 = __importDefault(__webpack_require__(69532));
|
@@ -228750,7 +228916,7 @@ async function dev(client, opts, args) {
|
|
228750
228916
|
const { output } = client;
|
228751
228917
|
const [dir = '.'] = args;
|
228752
228918
|
let cwd = (0, path_1.resolve)(dir);
|
228753
|
-
const listen = (0, parse_listen_1.
|
228919
|
+
const listen = (0, parse_listen_1.parseListen)(opts['--listen'] || '3000');
|
228754
228920
|
// retrieve dev command
|
228755
228921
|
let link = await (0, link_1.getLinkedProject)(client, cwd);
|
228756
228922
|
if (link.status === 'not_linked' && !process.env.__VERCEL_SKIP_DEV_CMD) {
|
@@ -235094,15 +235260,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
235094
235260
|
};
|
235095
235261
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
235096
235262
|
exports.resolveBuilders = exports.importBuilders = void 0;
|
235263
|
+
const url_1 = __webpack_require__(78835);
|
235264
|
+
const pluralize_1 = __importDefault(__webpack_require__(31974));
|
235097
235265
|
const npm_package_arg_1 = __importDefault(__webpack_require__(79726));
|
235098
235266
|
const semver_1 = __webpack_require__(92879);
|
235099
235267
|
const path_1 = __webpack_require__(85622);
|
235100
235268
|
const fs_extra_1 = __webpack_require__(45392);
|
235269
|
+
const fs_detectors_1 = __webpack_require__(20302);
|
235101
235270
|
const build_utils_1 = __webpack_require__(3131);
|
235102
235271
|
const staticBuilder = __importStar(__webpack_require__(33274));
|
235103
235272
|
const link_1 = __webpack_require__(67630);
|
235104
235273
|
const read_json_file_1 = __importDefault(__webpack_require__(16898));
|
235105
235274
|
const errors_ts_1 = __webpack_require__(60156);
|
235275
|
+
const is_error_1 = __webpack_require__(11026);
|
235276
|
+
const cmd_1 = __importDefault(__webpack_require__(87350));
|
235277
|
+
const code_1 = __importDefault(__webpack_require__(62230));
|
235106
235278
|
/**
|
235107
235279
|
* Imports the specified Vercel Builders, installing any missing ones
|
235108
235280
|
* into `.vercel/builders` if necessary.
|
@@ -235133,7 +235305,7 @@ async function resolveBuilders(buildersDir, builderSpecs, output, resolvedSpecs)
|
|
235133
235305
|
buildersToAdd.add(spec);
|
235134
235306
|
continue;
|
235135
235307
|
}
|
235136
|
-
if (
|
235308
|
+
if ((0, fs_detectors_1.isStaticRuntime)(name)) {
|
235137
235309
|
// `@vercel/static` is a special-case built-in builder
|
235138
235310
|
builders.set(name, {
|
235139
235311
|
builder: staticBuilder,
|
@@ -235234,14 +235406,45 @@ async function installBuilders(buildersDir, buildersToAdd, output) {
|
|
235234
235406
|
if (err.code !== 'EEXIST')
|
235235
235407
|
throw err;
|
235236
235408
|
}
|
235237
|
-
output.
|
235238
|
-
|
235239
|
-
|
235240
|
-
|
235409
|
+
output.log(`Installing ${(0, pluralize_1.default)('Builder', buildersToAdd.size)}: ${Array.from(buildersToAdd).join(', ')}`);
|
235410
|
+
try {
|
235411
|
+
await (0, build_utils_1.spawnAsync)('npm', ['install', '@vercel/build-utils', ...buildersToAdd], {
|
235412
|
+
cwd: buildersDir,
|
235413
|
+
stdio: 'pipe',
|
235414
|
+
});
|
235415
|
+
}
|
235416
|
+
catch (err) {
|
235417
|
+
if ((0, is_error_1.isError)(err)) {
|
235418
|
+
err.link =
|
235419
|
+
'https://vercel.link/builder-dependencies-install-failed';
|
235420
|
+
if ((0, is_error_1.isErrnoException)(err) && err.code === 'ENOENT') {
|
235421
|
+
// `npm` is not installed
|
235422
|
+
err.message = `Please install ${(0, cmd_1.default)('npm')} before continuing`;
|
235423
|
+
}
|
235424
|
+
else {
|
235425
|
+
const message = (0, is_error_1.errorToString)(err);
|
235426
|
+
const notFound = /GET (.*) - Not found/.exec(message);
|
235427
|
+
if (notFound) {
|
235428
|
+
const url = new url_1.URL(notFound[1]);
|
235429
|
+
const packageName = decodeURIComponent(url.pathname.slice(1));
|
235430
|
+
err.message = `The package ${(0, code_1.default)(packageName)} is not published on the npm registry`;
|
235431
|
+
}
|
235432
|
+
}
|
235433
|
+
}
|
235434
|
+
throw err;
|
235435
|
+
}
|
235241
235436
|
// Symlink `@now/build-utils` -> `@vercel/build-utils` to support legacy Builders
|
235242
235437
|
const nowScopePath = (0, path_1.join)(buildersDir, 'node_modules/@now');
|
235243
235438
|
await (0, fs_extra_1.mkdirp)(nowScopePath);
|
235244
|
-
|
235439
|
+
try {
|
235440
|
+
await (0, fs_extra_1.symlink)('../@vercel/build-utils', (0, path_1.join)(nowScopePath, 'build-utils'));
|
235441
|
+
}
|
235442
|
+
catch (err) {
|
235443
|
+
if (!(0, is_error_1.isErrnoException)(err) || err.code !== 'EEXIST') {
|
235444
|
+
// Throw unless the error is due to the symlink already existing
|
235445
|
+
throw err;
|
235446
|
+
}
|
235447
|
+
}
|
235245
235448
|
// Cross-reference any builderSpecs from the saved `package.json` file,
|
235246
235449
|
// in case they were installed from a URL
|
235247
235450
|
const buildersPkg = await (0, read_json_file_1.default)(buildersPkgPath);
|
@@ -235296,8 +235499,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
235296
235499
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
235297
235500
|
};
|
235298
235501
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
235299
|
-
exports.build = exports.version = void 0;
|
235502
|
+
exports.shouldServe = exports.build = exports.version = void 0;
|
235300
235503
|
const minimatch_1 = __importDefault(__webpack_require__(99566));
|
235504
|
+
const build_utils_1 = __webpack_require__(3131);
|
235301
235505
|
exports.version = 2;
|
235302
235506
|
const build = async ({ entrypoint, files, config }) => {
|
235303
235507
|
const output = {};
|
@@ -235325,6 +235529,17 @@ const build = async ({ entrypoint, files, config }) => {
|
|
235325
235529
|
return { output };
|
235326
235530
|
};
|
235327
235531
|
exports.build = build;
|
235532
|
+
const shouldServe = _opts => {
|
235533
|
+
const opts = { ..._opts };
|
235534
|
+
const { config: { zeroConfig, outputDirectory }, } = opts;
|
235535
|
+
// Add the output directory prefix
|
235536
|
+
if (zeroConfig && outputDirectory) {
|
235537
|
+
opts.entrypoint = `${outputDirectory}/${opts.entrypoint}`;
|
235538
|
+
opts.requestPath = `${outputDirectory}/${opts.requestPath}`;
|
235539
|
+
}
|
235540
|
+
return (0, build_utils_1.shouldServe)(opts);
|
235541
|
+
};
|
235542
|
+
exports.shouldServe = shouldServe;
|
235328
235543
|
|
235329
235544
|
|
235330
235545
|
/***/ }),
|
@@ -237587,364 +237802,6 @@ function isValidArchive(archive) {
|
|
237587
237802
|
exports.isValidArchive = isValidArchive;
|
237588
237803
|
|
237589
237804
|
|
237590
|
-
/***/ }),
|
237591
|
-
|
237592
|
-
/***/ 30770:
|
237593
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
237594
|
-
|
237595
|
-
"use strict";
|
237596
|
-
|
237597
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
237598
|
-
if (k2 === undefined) k2 = k;
|
237599
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
237600
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
237601
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
237602
|
-
}
|
237603
|
-
Object.defineProperty(o, k2, desc);
|
237604
|
-
}) : (function(o, m, k, k2) {
|
237605
|
-
if (k2 === undefined) k2 = k;
|
237606
|
-
o[k2] = m[k];
|
237607
|
-
}));
|
237608
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
237609
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
237610
|
-
}) : function(o, v) {
|
237611
|
-
o["default"] = v;
|
237612
|
-
});
|
237613
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
237614
|
-
if (mod && mod.__esModule) return mod;
|
237615
|
-
var result = {};
|
237616
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
237617
|
-
__setModuleDefault(result, mod);
|
237618
|
-
return result;
|
237619
|
-
};
|
237620
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
237621
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
237622
|
-
};
|
237623
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
237624
|
-
exports.isBundledBuilder = exports.getBuilder = exports.updateBuilders = exports.installBuilders = exports.filterPackage = exports.getBuildUtils = exports.prepareBuilderDir = exports.prepareCacheDir = exports.builderDirPromise = exports.cacheDirPromise = void 0;
|
237625
|
-
const chalk_1 = __importDefault(__webpack_require__(961));
|
237626
|
-
const execa_1 = __importDefault(__webpack_require__(94237));
|
237627
|
-
const semver_1 = __importDefault(__webpack_require__(92879));
|
237628
|
-
const npm_package_arg_1 = __importDefault(__webpack_require__(79726));
|
237629
|
-
const pluralize_1 = __importDefault(__webpack_require__(31974));
|
237630
|
-
const path_1 = __webpack_require__(85622);
|
237631
|
-
const xdg_app_paths_1 = __importDefault(__webpack_require__(30461));
|
237632
|
-
const fs_extra_1 = __webpack_require__(45392);
|
237633
|
-
const build_utils_1 = __webpack_require__(3131);
|
237634
|
-
const pkg_1 = __importDefault(__webpack_require__(80984));
|
237635
|
-
const cmd_1 = __importDefault(__webpack_require__(87350));
|
237636
|
-
const errors_ts_1 = __webpack_require__(60156);
|
237637
|
-
const staticBuilder = __importStar(__webpack_require__(46241));
|
237638
|
-
const is_error_1 = __webpack_require__(11026);
|
237639
|
-
const require_ = eval('require');
|
237640
|
-
const registryTypes = new Set(['version', 'tag', 'range']);
|
237641
|
-
const createStaticBuilder = (scope) => {
|
237642
|
-
return {
|
237643
|
-
runInProcess: true,
|
237644
|
-
requirePath: `${scope}/static`,
|
237645
|
-
builder: Object.freeze(staticBuilder),
|
237646
|
-
package: Object.freeze({ name: `@${scope}/static`, version: '' }),
|
237647
|
-
};
|
237648
|
-
};
|
237649
|
-
const localBuilders = {
|
237650
|
-
'@now/static': createStaticBuilder('now'),
|
237651
|
-
'@vercel/static': createStaticBuilder('vercel'),
|
237652
|
-
};
|
237653
|
-
exports.cacheDirPromise = prepareCacheDir();
|
237654
|
-
exports.builderDirPromise = prepareBuilderDir();
|
237655
|
-
/**
|
237656
|
-
* Prepare cache directory for installing Vercel runtimes.
|
237657
|
-
*/
|
237658
|
-
async function prepareCacheDir() {
|
237659
|
-
const designated = (0, xdg_app_paths_1.default)('com.vercel.cli').cache();
|
237660
|
-
if (!designated) {
|
237661
|
-
throw new errors_ts_1.NoBuilderCacheError();
|
237662
|
-
}
|
237663
|
-
const cacheDir = (0, path_1.join)(designated, 'dev');
|
237664
|
-
await (0, fs_extra_1.mkdirp)(cacheDir);
|
237665
|
-
return cacheDir;
|
237666
|
-
}
|
237667
|
-
exports.prepareCacheDir = prepareCacheDir;
|
237668
|
-
async function prepareBuilderDir() {
|
237669
|
-
const builderDir = (0, path_1.join)(await exports.cacheDirPromise, 'builders');
|
237670
|
-
await (0, fs_extra_1.mkdirp)(builderDir);
|
237671
|
-
// Create an empty `package.json` file, only if one does not already exist
|
237672
|
-
try {
|
237673
|
-
const buildersPkg = (0, path_1.join)(builderDir, 'package.json');
|
237674
|
-
await (0, fs_extra_1.writeJSON)(buildersPkg, { private: true }, { flag: 'wx' });
|
237675
|
-
}
|
237676
|
-
catch (err) {
|
237677
|
-
if (!(0, is_error_1.isErrnoException)(err) || err.code !== 'EEXIST') {
|
237678
|
-
throw err;
|
237679
|
-
}
|
237680
|
-
}
|
237681
|
-
return builderDir;
|
237682
|
-
}
|
237683
|
-
exports.prepareBuilderDir = prepareBuilderDir;
|
237684
|
-
function getNpmVersion(use = '') {
|
237685
|
-
const parsed = (0, npm_package_arg_1.default)(use);
|
237686
|
-
if (registryTypes.has(parsed.type)) {
|
237687
|
-
return parsed.fetchSpec || '';
|
237688
|
-
}
|
237689
|
-
return '';
|
237690
|
-
}
|
237691
|
-
function getBuildUtils(packages) {
|
237692
|
-
const version = packages
|
237693
|
-
.map(getNpmVersion)
|
237694
|
-
.some(ver => ver.includes('canary'))
|
237695
|
-
? 'canary'
|
237696
|
-
: 'latest';
|
237697
|
-
return `@vercel/build-utils@${version}`;
|
237698
|
-
}
|
237699
|
-
exports.getBuildUtils = getBuildUtils;
|
237700
|
-
function parseVersionSafe(rawSpec) {
|
237701
|
-
try {
|
237702
|
-
return semver_1.default.parse(rawSpec);
|
237703
|
-
}
|
237704
|
-
catch (e) {
|
237705
|
-
return null;
|
237706
|
-
}
|
237707
|
-
}
|
237708
|
-
function filterPackage(builderSpec, buildersPkg, cliPkg) {
|
237709
|
-
if (builderSpec in localBuilders)
|
237710
|
-
return false;
|
237711
|
-
const parsed = (0, npm_package_arg_1.default)(builderSpec);
|
237712
|
-
const parsedVersion = parseVersionSafe(parsed.rawSpec);
|
237713
|
-
// Skip install of Runtimes that are part of Vercel CLI's `dependencies`
|
237714
|
-
if (isBundledBuilder(parsed, cliPkg)) {
|
237715
|
-
return false;
|
237716
|
-
}
|
237717
|
-
// Skip install of already installed Runtime with exact version match
|
237718
|
-
if (parsed.name &&
|
237719
|
-
parsed.type === 'version' &&
|
237720
|
-
parsedVersion &&
|
237721
|
-
buildersPkg.dependencies &&
|
237722
|
-
parsedVersion.version == buildersPkg.dependencies[parsed.name]) {
|
237723
|
-
return false;
|
237724
|
-
}
|
237725
|
-
return true;
|
237726
|
-
}
|
237727
|
-
exports.filterPackage = filterPackage;
|
237728
|
-
/**
|
237729
|
-
* Install a list of builders to the cache directory.
|
237730
|
-
*/
|
237731
|
-
async function installBuilders(packagesSet, output, builderDir) {
|
237732
|
-
const packages = Array.from(packagesSet);
|
237733
|
-
if (packages.length === 0 ||
|
237734
|
-
(packages.length === 1 &&
|
237735
|
-
Object.hasOwnProperty.call(localBuilders, packages[0]))) {
|
237736
|
-
// Static deployment, no builders to install
|
237737
|
-
return;
|
237738
|
-
}
|
237739
|
-
if (!builderDir) {
|
237740
|
-
builderDir = await exports.builderDirPromise;
|
237741
|
-
}
|
237742
|
-
const buildersPkgPath = (0, path_1.join)(builderDir, 'package.json');
|
237743
|
-
const buildersPkgBefore = await (0, fs_extra_1.readJSON)(buildersPkgPath);
|
237744
|
-
const depsBefore = {
|
237745
|
-
...buildersPkgBefore.devDependencies,
|
237746
|
-
...buildersPkgBefore.dependencies,
|
237747
|
-
};
|
237748
|
-
// Filter out any packages that come packaged with Vercel CLI
|
237749
|
-
const packagesToInstall = packages.filter(p => filterPackage(p, buildersPkgBefore, pkg_1.default));
|
237750
|
-
if (packagesToInstall.length === 0) {
|
237751
|
-
output.debug('No Runtimes need to be installed');
|
237752
|
-
return;
|
237753
|
-
}
|
237754
|
-
packagesToInstall.push(getBuildUtils(packages));
|
237755
|
-
await npmInstall(builderDir, output, packagesToInstall, false);
|
237756
|
-
const updatedPackages = [];
|
237757
|
-
const buildersPkgAfter = await (0, fs_extra_1.readJSON)(buildersPkgPath);
|
237758
|
-
const depsAfter = {
|
237759
|
-
...buildersPkgAfter.devDependencies,
|
237760
|
-
...buildersPkgAfter.dependencies,
|
237761
|
-
};
|
237762
|
-
for (const [name, version] of Object.entries(depsAfter)) {
|
237763
|
-
if (version !== depsBefore[name]) {
|
237764
|
-
output.debug(`Runtime "${name}" updated to version \`${version}\``);
|
237765
|
-
updatedPackages.push(name);
|
237766
|
-
}
|
237767
|
-
}
|
237768
|
-
purgeRequireCache(updatedPackages, builderDir, output);
|
237769
|
-
}
|
237770
|
-
exports.installBuilders = installBuilders;
|
237771
|
-
async function npmInstall(cwd, output, packagesToInstall, silent) {
|
237772
|
-
const sortedPackages = packagesToInstall.sort();
|
237773
|
-
if (!silent) {
|
237774
|
-
output.spinner(`Installing ${(0, pluralize_1.default)('Runtime', sortedPackages.length)}: ${sortedPackages.join(', ')}`);
|
237775
|
-
}
|
237776
|
-
output.debug(`Running npm install in ${cwd}`);
|
237777
|
-
try {
|
237778
|
-
const args = [
|
237779
|
-
'install',
|
237780
|
-
'--save-exact',
|
237781
|
-
'--no-package-lock',
|
237782
|
-
'--no-audit',
|
237783
|
-
'--no-progress',
|
237784
|
-
];
|
237785
|
-
if (process.stderr.isTTY) {
|
237786
|
-
// Force colors in the npm child process
|
237787
|
-
// https://docs.npmjs.com/misc/config#color
|
237788
|
-
args.push('--color=always');
|
237789
|
-
}
|
237790
|
-
args.push(...sortedPackages);
|
237791
|
-
const result = await (0, execa_1.default)('npm', args, {
|
237792
|
-
cwd,
|
237793
|
-
reject: false,
|
237794
|
-
stdio: output.isDebugEnabled() ? 'inherit' : 'pipe',
|
237795
|
-
});
|
237796
|
-
if (result.failed) {
|
237797
|
-
output.stopSpinner();
|
237798
|
-
if (result.stdout) {
|
237799
|
-
console.log(result.stdout);
|
237800
|
-
}
|
237801
|
-
if (result.stderr) {
|
237802
|
-
console.error(result.stderr);
|
237803
|
-
}
|
237804
|
-
throw new build_utils_1.NowBuildError({
|
237805
|
-
message: result.code === 'ENOENT'
|
237806
|
-
? `Command not found: ${chalk_1.default.cyan('npm')}\nPlease ensure that ${(0, cmd_1.default)('npm')} is properly installed`
|
237807
|
-
: 'Failed to install `vercel dev` dependencies',
|
237808
|
-
code: 'NPM_INSTALL_ERROR',
|
237809
|
-
link: 'https://vercel.link/npm-install-failed-dev',
|
237810
|
-
});
|
237811
|
-
}
|
237812
|
-
}
|
237813
|
-
finally {
|
237814
|
-
output.stopSpinner();
|
237815
|
-
}
|
237816
|
-
}
|
237817
|
-
async function updateBuilders(packagesSet, output, builderDir) {
|
237818
|
-
if (!builderDir) {
|
237819
|
-
builderDir = await exports.builderDirPromise;
|
237820
|
-
}
|
237821
|
-
const updatedPackages = [];
|
237822
|
-
const packages = Array.from(packagesSet);
|
237823
|
-
const buildersPkgPath = (0, path_1.join)(builderDir, 'package.json');
|
237824
|
-
const buildersPkgBefore = await (0, fs_extra_1.readJSON)(buildersPkgPath);
|
237825
|
-
const depsBefore = {
|
237826
|
-
...buildersPkgBefore.devDependencies,
|
237827
|
-
...buildersPkgBefore.dependencies,
|
237828
|
-
};
|
237829
|
-
const packagesToUpdate = packages.filter(p => {
|
237830
|
-
if (p in localBuilders)
|
237831
|
-
return false;
|
237832
|
-
// If it's a builder that is part of Vercel CLI's
|
237833
|
-
// `dependencies` then don't update it
|
237834
|
-
if (isBundledBuilder((0, npm_package_arg_1.default)(p), pkg_1.default)) {
|
237835
|
-
return false;
|
237836
|
-
}
|
237837
|
-
return true;
|
237838
|
-
});
|
237839
|
-
if (packagesToUpdate.length > 0) {
|
237840
|
-
packagesToUpdate.push(getBuildUtils(packages));
|
237841
|
-
await npmInstall(builderDir, output, packagesToUpdate, true);
|
237842
|
-
const buildersPkgAfter = await (0, fs_extra_1.readJSON)(buildersPkgPath);
|
237843
|
-
const depsAfter = {
|
237844
|
-
...buildersPkgAfter.devDependencies,
|
237845
|
-
...buildersPkgAfter.dependencies,
|
237846
|
-
};
|
237847
|
-
for (const [name, version] of Object.entries(depsAfter)) {
|
237848
|
-
if (version !== depsBefore[name]) {
|
237849
|
-
output.debug(`Runtime "${name}" updated to version \`${version}\``);
|
237850
|
-
updatedPackages.push(name);
|
237851
|
-
}
|
237852
|
-
}
|
237853
|
-
purgeRequireCache(updatedPackages, builderDir, output);
|
237854
|
-
}
|
237855
|
-
return updatedPackages;
|
237856
|
-
}
|
237857
|
-
exports.updateBuilders = updateBuilders;
|
237858
|
-
/**
|
237859
|
-
* Get a builder from the cache directory.
|
237860
|
-
*/
|
237861
|
-
async function getBuilder(builderPkg, output, builderDir, isRetry = false) {
|
237862
|
-
let builderWithPkg = localBuilders[builderPkg];
|
237863
|
-
if (!builderWithPkg) {
|
237864
|
-
if (!builderDir) {
|
237865
|
-
builderDir = await exports.builderDirPromise;
|
237866
|
-
}
|
237867
|
-
let requirePath;
|
237868
|
-
const parsed = (0, npm_package_arg_1.default)(builderPkg);
|
237869
|
-
// First check if it's a bundled Runtime in Vercel CLI's `node_modules`
|
237870
|
-
const bundledBuilder = isBundledBuilder(parsed, pkg_1.default);
|
237871
|
-
if (bundledBuilder && parsed.name) {
|
237872
|
-
requirePath = parsed.name;
|
237873
|
-
}
|
237874
|
-
else {
|
237875
|
-
const buildersPkg = await (0, fs_extra_1.readJSON)((0, path_1.join)(builderDir, 'package.json'));
|
237876
|
-
const pkgName = getPackageName(parsed, buildersPkg) || builderPkg;
|
237877
|
-
requirePath = (0, path_1.join)(builderDir, 'node_modules', pkgName);
|
237878
|
-
}
|
237879
|
-
try {
|
237880
|
-
output.debug(`Requiring runtime: "${requirePath}"`);
|
237881
|
-
const mod = require_(requirePath);
|
237882
|
-
const pkg = require_((0, path_1.join)(requirePath, 'package.json'));
|
237883
|
-
builderWithPkg = {
|
237884
|
-
requirePath,
|
237885
|
-
builder: Object.freeze(mod),
|
237886
|
-
package: Object.freeze(pkg),
|
237887
|
-
};
|
237888
|
-
}
|
237889
|
-
catch (err) {
|
237890
|
-
if ((0, is_error_1.isErrnoException)(err) &&
|
237891
|
-
err.code === 'MODULE_NOT_FOUND' &&
|
237892
|
-
!isRetry) {
|
237893
|
-
output.debug(`Attempted to require ${requirePath}, but it is not installed`);
|
237894
|
-
const pkgSet = new Set([builderPkg]);
|
237895
|
-
await installBuilders(pkgSet, output, builderDir);
|
237896
|
-
// Run `getBuilder()` again now that the builder has been installed
|
237897
|
-
return getBuilder(builderPkg, output, builderDir, true);
|
237898
|
-
}
|
237899
|
-
throw err;
|
237900
|
-
}
|
237901
|
-
// If it's a bundled builder, then cache the require call
|
237902
|
-
if (bundledBuilder) {
|
237903
|
-
localBuilders[builderPkg] = builderWithPkg;
|
237904
|
-
}
|
237905
|
-
}
|
237906
|
-
return builderWithPkg;
|
237907
|
-
}
|
237908
|
-
exports.getBuilder = getBuilder;
|
237909
|
-
function isBundledBuilder(parsed, { dependencies = {} }) {
|
237910
|
-
if (!parsed.name) {
|
237911
|
-
return false;
|
237912
|
-
}
|
237913
|
-
const inCliDependencyList = !!dependencies[parsed.name];
|
237914
|
-
const inScope = parsed.scope === '@vercel';
|
237915
|
-
const isVersionedReference = ['tag', 'version', 'range'].includes(parsed.type);
|
237916
|
-
return inCliDependencyList && inScope && isVersionedReference;
|
237917
|
-
}
|
237918
|
-
exports.isBundledBuilder = isBundledBuilder;
|
237919
|
-
function getPackageName(parsed, buildersPkg) {
|
237920
|
-
if (registryTypes.has(parsed.type)) {
|
237921
|
-
return parsed.name;
|
237922
|
-
}
|
237923
|
-
const deps = {
|
237924
|
-
...buildersPkg.devDependencies,
|
237925
|
-
...buildersPkg.dependencies,
|
237926
|
-
};
|
237927
|
-
for (const [name, dep] of Object.entries(deps)) {
|
237928
|
-
if (dep === parsed.raw || (0, path_1.basename)(dep) === (0, path_1.basename)(parsed.raw)) {
|
237929
|
-
return name;
|
237930
|
-
}
|
237931
|
-
}
|
237932
|
-
return null;
|
237933
|
-
}
|
237934
|
-
function purgeRequireCache(packages, builderDir, output) {
|
237935
|
-
// The `require()` cache for the builder's assets must be purged
|
237936
|
-
const packagesPaths = packages.map(b => (0, path_1.join)(builderDir, 'node_modules', b));
|
237937
|
-
for (const id of Object.keys(require_.cache)) {
|
237938
|
-
for (const path of packagesPaths) {
|
237939
|
-
if (id.startsWith(path)) {
|
237940
|
-
output.debug(`Purging require cache for "${id}"`);
|
237941
|
-
delete require_.cache[id];
|
237942
|
-
}
|
237943
|
-
}
|
237944
|
-
}
|
237945
|
-
}
|
237946
|
-
|
237947
|
-
|
237948
237805
|
/***/ }),
|
237949
237806
|
|
237950
237807
|
/***/ 37655:
|
@@ -237972,10 +237829,10 @@ const highlight_1 = __importDefault(__webpack_require__(8199));
|
|
237972
237829
|
const tree_kill_1 = __webpack_require__(21780);
|
237973
237830
|
const path_helpers_1 = __webpack_require__(73250);
|
237974
237831
|
const errors_ts_1 = __webpack_require__(60156);
|
237975
|
-
const builder_cache_1 = __webpack_require__(30770);
|
237976
237832
|
const routing_utils_1 = __webpack_require__(72948);
|
237977
237833
|
const get_update_command_1 = __importDefault(__webpack_require__(64222));
|
237978
237834
|
const pkg_name_1 = __webpack_require__(98106);
|
237835
|
+
const import_builders_1 = __webpack_require__(57049);
|
237979
237836
|
async function createBuildProcess(match, envConfigs, workPath, output) {
|
237980
237837
|
output.debug(`Creating build process for "${match.entrypoint}"`);
|
237981
237838
|
const builderWorkerPath = (0, path_1.join)(__dirname, 'builder-worker.js');
|
@@ -238009,20 +237866,21 @@ async function createBuildProcess(match, envConfigs, workPath, output) {
|
|
238009
237866
|
});
|
238010
237867
|
}
|
238011
237868
|
async function executeBuild(vercelConfig, devServer, files, match, requestPath, isInitialBuild, filesChanged, filesRemoved) {
|
238012
|
-
const { builderWithPkg: {
|
238013
|
-
const { entrypoint } = match;
|
237869
|
+
const { builderWithPkg: { path: requirePath, builder, pkg }, } = match;
|
237870
|
+
const { entrypoint, use } = match;
|
237871
|
+
const isStatic = (0, fs_detectors_1.isStaticRuntime)(use);
|
238014
237872
|
const { envConfigs, cwd: workPath, devCacheDir } = devServer;
|
238015
237873
|
const debug = devServer.output.isDebugEnabled();
|
238016
237874
|
const startTime = Date.now();
|
238017
|
-
const showBuildTimestamp = !
|
237875
|
+
const showBuildTimestamp = !isStatic && (!isInitialBuild || debug);
|
238018
237876
|
if (showBuildTimestamp) {
|
238019
|
-
devServer.output.log(`Building ${
|
237877
|
+
devServer.output.log(`Building ${use}:${entrypoint}`);
|
238020
237878
|
devServer.output.debug(`Using \`${pkg.name}${pkg.version ? `@${pkg.version}` : ''}\``);
|
238021
237879
|
}
|
238022
237880
|
const config = match.config || {};
|
238023
237881
|
let result;
|
238024
237882
|
let { buildProcess } = match;
|
238025
|
-
if (!
|
237883
|
+
if (!isStatic && !buildProcess) {
|
238026
237884
|
buildProcess = await createBuildProcess(match, envConfigs, workPath, devServer.output);
|
238027
237885
|
}
|
238028
237886
|
const buildOptions = {
|
@@ -238088,9 +237946,6 @@ async function executeBuild(vercelConfig, devServer, files, match, requestPath,
|
|
238088
237946
|
output: buildResultOrOutputs,
|
238089
237947
|
routes: [],
|
238090
237948
|
watch: [],
|
238091
|
-
distPath: typeof buildResultOrOutputs.distPath === 'string'
|
238092
|
-
? buildResultOrOutputs.distPath
|
238093
|
-
: undefined,
|
238094
237949
|
};
|
238095
237950
|
}
|
238096
237951
|
else if (builder.version === 2) {
|
@@ -238235,7 +238090,7 @@ async function executeBuild(vercelConfig, devServer, files, match, requestPath,
|
|
238235
238090
|
Object.assign(match.buildOutput, result.output);
|
238236
238091
|
if (showBuildTimestamp) {
|
238237
238092
|
const endTime = Date.now();
|
238238
|
-
devServer.output.log(`Built ${
|
238093
|
+
devServer.output.log(`Built ${use}:${entrypoint} [${(0, ms_1.default)(endTime - startTime)}]`);
|
238239
238094
|
}
|
238240
238095
|
}
|
238241
238096
|
exports.executeBuild = executeBuild;
|
@@ -238248,6 +238103,8 @@ async function getBuildMatches(vercelConfig, cwd, output, devServer, fileList) {
|
|
238248
238103
|
}
|
238249
238104
|
const noMatches = [];
|
238250
238105
|
const builds = vercelConfig.builds || [{ src: '**', use: '@vercel/static' }];
|
238106
|
+
const builderSpecs = new Set(builds.map(b => b.use).filter(Boolean));
|
238107
|
+
const buildersWithPkgs = await (0, import_builders_1.importBuilders)(builderSpecs, cwd, output);
|
238251
238108
|
for (const buildConfig of builds) {
|
238252
238109
|
let { src = '**', use, config = {} } = buildConfig;
|
238253
238110
|
if (!use) {
|
@@ -238274,6 +238131,7 @@ async function getBuildMatches(vercelConfig, cwd, output, devServer, fileList) {
|
|
238274
238131
|
}
|
238275
238132
|
for (const file of files) {
|
238276
238133
|
src = (0, path_helpers_1.relative)(cwd, file);
|
238134
|
+
const entrypoint = mapToEntrypoint.get(src) || src;
|
238277
238135
|
// Remove the output directory prefix
|
238278
238136
|
if (config.zeroConfig && config.outputDirectory) {
|
238279
238137
|
const outputMatch = config.outputDirectory + '/';
|
@@ -238281,11 +238139,14 @@ async function getBuildMatches(vercelConfig, cwd, output, devServer, fileList) {
|
|
238281
238139
|
src = src.slice(outputMatch.length);
|
238282
238140
|
}
|
238283
238141
|
}
|
238284
|
-
const builderWithPkg =
|
238142
|
+
const builderWithPkg = buildersWithPkgs.get(use);
|
238143
|
+
if (!builderWithPkg) {
|
238144
|
+
throw new Error(`Failed to load Builder "${use}"`);
|
238145
|
+
}
|
238285
238146
|
matches.push({
|
238286
238147
|
...buildConfig,
|
238287
238148
|
src,
|
238288
|
-
entrypoint
|
238149
|
+
entrypoint,
|
238289
238150
|
builderWithPkg,
|
238290
238151
|
buildOutput: {},
|
238291
238152
|
buildResults: new Map(),
|
@@ -238510,6 +238371,7 @@ exports.default = getMimeType;
|
|
238510
238371
|
"use strict";
|
238511
238372
|
|
238512
238373
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
238374
|
+
exports.replaceLocalhost = exports.parseListen = void 0;
|
238513
238375
|
const url_1 = __webpack_require__(78835);
|
238514
238376
|
function parseListen(str, defaultPort = 3000) {
|
238515
238377
|
let port = Number(str);
|
@@ -238549,7 +238411,11 @@ function parseListen(str, defaultPort = 3000) {
|
|
238549
238411
|
throw new Error(`Unknown \`--listen\` scheme (protocol): ${url.protocol}`);
|
238550
238412
|
}
|
238551
238413
|
}
|
238552
|
-
exports.
|
238414
|
+
exports.parseListen = parseListen;
|
238415
|
+
function replaceLocalhost(address) {
|
238416
|
+
return address.replace('[::]', 'localhost').replace('0.0.0.0', 'localhost');
|
238417
|
+
}
|
238418
|
+
exports.replaceLocalhost = replaceLocalhost;
|
238553
238419
|
|
238554
238420
|
|
238555
238421
|
/***/ }),
|
@@ -238848,7 +238714,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
238848
238714
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
238849
238715
|
};
|
238850
238716
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
238851
|
-
const ms_1 = __importDefault(__webpack_require__(80040));
|
238852
238717
|
const url_1 = __importStar(__webpack_require__(78835));
|
238853
238718
|
const http_1 = __importDefault(__webpack_require__(98605));
|
238854
238719
|
const fs_extra_1 = __importDefault(__webpack_require__(45392));
|
@@ -238891,7 +238756,6 @@ const router_1 = __webpack_require__(84369);
|
|
238891
238756
|
const mime_type_1 = __importDefault(__webpack_require__(12165));
|
238892
238757
|
const builder_1 = __webpack_require__(37655);
|
238893
238758
|
const errors_1 = __webpack_require__(92586);
|
238894
|
-
const builder_cache_1 = __webpack_require__(30770);
|
238895
238759
|
// HTML templates
|
238896
238760
|
const error_1 = __importDefault(__webpack_require__(97736));
|
238897
238761
|
const error_base_1 = __importDefault(__webpack_require__(85143));
|
@@ -238905,6 +238769,7 @@ const parse_query_string_1 = __webpack_require__(40165);
|
|
238905
238769
|
const is_error_1 = __webpack_require__(11026);
|
238906
238770
|
const is_url_1 = __importDefault(__webpack_require__(4567));
|
238907
238771
|
const project_settings_1 = __webpack_require__(42697);
|
238772
|
+
const parse_listen_1 = __webpack_require__(1919);
|
238908
238773
|
const frontendRuntimeSet = new Set(frameworks_1.default.map(f => f.useRuntime?.use || '@vercel/static-build'));
|
238909
238774
|
function sortBuilders(buildA, buildB) {
|
238910
238775
|
if (buildA && buildA.use && (0, fs_detectors_1.isOfficialRuntime)('static-build', buildA.use)) {
|
@@ -239040,8 +238905,9 @@ class DevServer {
|
|
239040
238905
|
// the middleware server for every HTTP request?
|
239041
238906
|
const { envConfigs, files, devCacheDir, cwd: workPath } = this;
|
239042
238907
|
try {
|
239043
|
-
|
239044
|
-
|
238908
|
+
const { builder } = middleware.builderWithPkg;
|
238909
|
+
if (builder.version === 3) {
|
238910
|
+
startMiddlewareResult = await builder.startDevServer?.({
|
239045
238911
|
files,
|
239046
238912
|
entrypoint: middleware.entrypoint,
|
239047
238913
|
workPath,
|
@@ -239055,6 +238921,7 @@ class DevServer {
|
|
239055
238921
|
buildEnv: { ...envConfigs.buildEnv },
|
239056
238922
|
},
|
239057
238923
|
});
|
238924
|
+
}
|
239058
238925
|
if (startMiddlewareResult) {
|
239059
238926
|
const { port, pid } = startMiddlewareResult;
|
239060
238927
|
middlewarePid = pid;
|
@@ -239312,8 +239179,8 @@ class DevServer {
|
|
239312
239179
|
// up a single-serve dev HTTP server that vercel dev will proxy this HTTP request
|
239313
239180
|
// to. Once the proxied request is finished, vercel dev shuts down the dev
|
239314
239181
|
// server child process.
|
239315
|
-
const { builder,
|
239316
|
-
if (typeof builder.startDevServer === 'function') {
|
239182
|
+
const { builder, pkg: builderPkg } = match.builderWithPkg;
|
239183
|
+
if (builder.version === 3 && typeof builder.startDevServer === 'function') {
|
239317
239184
|
let devServerResult = null;
|
239318
239185
|
try {
|
239319
239186
|
const { envConfigs, files, devCacheDir, cwd: workPath } = this;
|
@@ -239523,7 +239390,6 @@ class DevServer {
|
|
239523
239390
|
this.vercelConfigWarning = false;
|
239524
239391
|
this.getVercelConfigPromise = null;
|
239525
239392
|
this.blockingBuildsPromise = null;
|
239526
|
-
this.updateBuildersPromise = null;
|
239527
239393
|
this.startPromise = null;
|
239528
239394
|
this.watchAggregationId = null;
|
239529
239395
|
this.watchAggregationEvents = [];
|
@@ -239727,25 +239593,6 @@ class DevServer {
|
|
239727
239593
|
return sortBuilders(matchA[1], matchB[1]);
|
239728
239594
|
}));
|
239729
239595
|
}
|
239730
|
-
async invalidateBuildMatches(vercelConfig, updatedBuilders) {
|
239731
|
-
if (updatedBuilders.length === 0) {
|
239732
|
-
this.output.debug('No builders were updated');
|
239733
|
-
return;
|
239734
|
-
}
|
239735
|
-
// Delete any build matches that have the old builder required already
|
239736
|
-
for (const buildMatch of this.buildMatches.values()) {
|
239737
|
-
const { src, builderWithPkg: { package: pkg }, } = buildMatch;
|
239738
|
-
if ((0, fs_detectors_1.isOfficialRuntime)('static', pkg.name))
|
239739
|
-
continue;
|
239740
|
-
if (pkg.name && updatedBuilders.includes(pkg.name)) {
|
239741
|
-
(0, builder_1.shutdownBuilder)(buildMatch, this.output);
|
239742
|
-
this.buildMatches.delete(src);
|
239743
|
-
this.output.debug(`Invalidated build match for "${src}"`);
|
239744
|
-
}
|
239745
|
-
}
|
239746
|
-
// Re-add the build matches that were just removed, but with the new builder
|
239747
|
-
await this.updateBuildMatches(vercelConfig);
|
239748
|
-
}
|
239749
239596
|
async getLocalEnv(fileName, base) {
|
239750
239597
|
// TODO: use the file watcher to only invalidate the env `dotfile`
|
239751
239598
|
// once a change to the `fileName` occurs
|
@@ -240065,7 +239912,7 @@ class DevServer {
|
|
240065
239912
|
}
|
240066
239913
|
}
|
240067
239914
|
}
|
240068
|
-
this._address = new url_1.URL(
|
239915
|
+
this._address = new url_1.URL((0, parse_listen_1.replaceLocalhost)(address));
|
240069
239916
|
const vercelConfig = await this.getVercelConfig();
|
240070
239917
|
const devCommandPromise = this.runDevCommand();
|
240071
239918
|
const files = await (0, get_files_1.staticFiles)(this.cwd, { output: this.output });
|
@@ -240079,25 +239926,7 @@ class DevServer {
|
|
240079
239926
|
this.files[extensionless] = new build_utils_1.FileFsRef({ mode, fsPath });
|
240080
239927
|
}
|
240081
239928
|
}
|
240082
|
-
const builders = new Set((vercelConfig.builds || [])
|
240083
|
-
.filter((b) => b.use)
|
240084
|
-
.map((b) => b.use));
|
240085
|
-
await (0, builder_cache_1.installBuilders)(builders, this.output);
|
240086
239929
|
await this.updateBuildMatches(vercelConfig, true);
|
240087
|
-
// Updating builders happens lazily, and any builders that were updated
|
240088
|
-
// get their "build matches" invalidated so that the new version is used.
|
240089
|
-
this.updateBuildersTimeout = setTimeout(() => {
|
240090
|
-
this.updateBuildersPromise = (0, builder_cache_1.updateBuilders)(builders, this.output)
|
240091
|
-
.then(updatedBuilders => {
|
240092
|
-
this.updateBuildersPromise = null;
|
240093
|
-
this.invalidateBuildMatches(vercelConfig, updatedBuilders);
|
240094
|
-
})
|
240095
|
-
.catch(err => {
|
240096
|
-
this.updateBuildersPromise = null;
|
240097
|
-
this.output.prettyError(err);
|
240098
|
-
this.output.debug(err.stack);
|
240099
|
-
});
|
240100
|
-
}, (0, ms_1.default)('30s'));
|
240101
239930
|
// Builders that do not define a `shouldServe()` function need to be
|
240102
239931
|
// executed at boot-up time in order to get the initial assets and/or routes
|
240103
239932
|
// that can be served by the builder.
|
@@ -240158,14 +239987,11 @@ class DevServer {
|
|
240158
239987
|
* Shuts down the `vercel dev` server, and cleans up any temporary resources.
|
240159
239988
|
*/
|
240160
239989
|
async stop(exitCode) {
|
240161
|
-
const { devProcess } = this;
|
240162
|
-
const { debug } = this.output;
|
240163
239990
|
if (this.stopping)
|
240164
239991
|
return;
|
240165
239992
|
this.stopping = true;
|
240166
|
-
|
240167
|
-
|
240168
|
-
}
|
239993
|
+
const { devProcess } = this;
|
239994
|
+
const { debug } = this.output;
|
240169
239995
|
const ops = [];
|
240170
239996
|
for (const match of this.buildMatches.values()) {
|
240171
239997
|
ops.push((0, builder_1.shutdownBuilder)(match, this.output));
|
@@ -240178,15 +240004,9 @@ class DevServer {
|
|
240178
240004
|
debug(`Closing file watcher`);
|
240179
240005
|
ops.push(this.watcher.close());
|
240180
240006
|
}
|
240181
|
-
if (this.updateBuildersPromise) {
|
240182
|
-
debug(`Waiting for builders update to complete`);
|
240183
|
-
ops.push(this.updateBuildersPromise);
|
240184
|
-
}
|
240185
240007
|
for (const pid of this.devServerPids) {
|
240186
240008
|
ops.push(this.killBuilderDevServer(pid));
|
240187
240009
|
}
|
240188
|
-
// Ensure that the builders module cache is created
|
240189
|
-
ops.push(builder_cache_1.builderDirPromise);
|
240190
240010
|
try {
|
240191
240011
|
await Promise.all(ops);
|
240192
240012
|
}
|
@@ -240479,7 +240299,7 @@ class DevServer {
|
|
240479
240299
|
}
|
240480
240300
|
this.output.log(`Running Dev Command ${chalk_1.default.cyan.bold(`“${devCommand}”`)}`);
|
240481
240301
|
const port = await (0, get_port_1.default)();
|
240482
|
-
const env = {
|
240302
|
+
const env = (0, build_utils_1.cloneEnv)({
|
240483
240303
|
// Because of child process 'pipe' below, isTTY will be false.
|
240484
240304
|
// Most frameworks use `chalk`/`supports-color` so we enable it anyway.
|
240485
240305
|
FORCE_COLOR: process.stdout.isTTY ? '1' : '0',
|
@@ -240487,10 +240307,9 @@ class DevServer {
|
|
240487
240307
|
// browser window, since it will not be the port that `vc dev`
|
240488
240308
|
// is listening on and thus will be missing Vercel features.
|
240489
240309
|
BROWSER: 'none',
|
240490
|
-
|
240491
|
-
...this.envConfigs.allEnv,
|
240310
|
+
}, process.env, this.envConfigs.allEnv, {
|
240492
240311
|
PORT: `${port}`,
|
240493
|
-
};
|
240312
|
+
});
|
240494
240313
|
// This is necesary so that the dev command in the Project
|
240495
240314
|
// will work cross-platform (especially Windows).
|
240496
240315
|
let command = devCommand
|
@@ -240776,43 +240595,6 @@ function buildMatchEquals(a, b) {
|
|
240776
240595
|
}
|
240777
240596
|
|
240778
240597
|
|
240779
|
-
/***/ }),
|
240780
|
-
|
240781
|
-
/***/ 46241:
|
240782
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
240783
|
-
|
240784
|
-
"use strict";
|
240785
|
-
|
240786
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
240787
|
-
exports.shouldServe = exports.build = exports.version = void 0;
|
240788
|
-
const build_utils_1 = __webpack_require__(3131);
|
240789
|
-
exports.version = 2;
|
240790
|
-
function build({ files, entrypoint, config: { zeroConfig, outputDirectory }, }) {
|
240791
|
-
const path = zeroConfig && outputDirectory
|
240792
|
-
? `${outputDirectory}/${entrypoint}`
|
240793
|
-
: entrypoint;
|
240794
|
-
return {
|
240795
|
-
output: {
|
240796
|
-
[entrypoint]: files[path],
|
240797
|
-
},
|
240798
|
-
routes: [],
|
240799
|
-
watch: [path],
|
240800
|
-
};
|
240801
|
-
}
|
240802
|
-
exports.build = build;
|
240803
|
-
function shouldServe(_opts) {
|
240804
|
-
const opts = { ..._opts };
|
240805
|
-
let { config: { zeroConfig, outputDirectory }, } = opts;
|
240806
|
-
// Add the output directory prefix
|
240807
|
-
if (zeroConfig && outputDirectory) {
|
240808
|
-
opts.entrypoint = `${outputDirectory}/${opts.entrypoint}`;
|
240809
|
-
opts.requestPath = `${outputDirectory}/${opts.requestPath}`;
|
240810
|
-
}
|
240811
|
-
return (0, build_utils_1.shouldServe)(opts);
|
240812
|
-
}
|
240813
|
-
exports.shouldServe = shouldServe;
|
240814
|
-
|
240815
|
-
|
240816
240598
|
/***/ }),
|
240817
240599
|
|
240818
240600
|
/***/ 97736:
|
@@ -249528,7 +249310,7 @@ module.exports = JSON.parse("{\"application/1d-interleaved-parityfec\":{\"source
|
|
249528
249310
|
/***/ ((module) => {
|
249529
249311
|
|
249530
249312
|
"use strict";
|
249531
|
-
module.exports = JSON.parse("{\"name\":\"vercel\",\"version\":\"28.
|
249313
|
+
module.exports = JSON.parse("{\"name\":\"vercel\",\"version\":\"28.4.0\",\"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 --env node --verbose --runInBand --bail --forceExit\",\"test-unit\":\"yarn test test/unit/\",\"test-integration-cli\":\"rimraf test/fixtures/integration && ava test/integration.js --serial --fail-fast --verbose\",\"test-integration-dev\":\"yarn test test/dev/\",\"coverage\":\"codecov\",\"build\":\"ts-node ./scripts/build.ts\",\"dev\":\"ts-node ./src/index.ts\"},\"bin\":{\"vc\":\"./dist/index.js\",\"vercel\":\"./dist/index.js\"},\"files\":[\"dist\",\"scripts/preinstall.js\"],\"ava\":{\"extensions\":[\"ts\"],\"require\":[\"ts-node/register/transpile-only\",\"esm\"]},\"engines\":{\"node\":\">= 14\"},\"dependencies\":{\"@vercel/build-utils\":\"5.4.4\",\"@vercel/go\":\"2.2.7\",\"@vercel/hydrogen\":\"0.0.20\",\"@vercel/next\":\"3.1.27\",\"@vercel/node\":\"2.5.16\",\"@vercel/python\":\"3.1.16\",\"@vercel/redwood\":\"1.0.25\",\"@vercel/remix\":\"1.0.26\",\"@vercel/ruby\":\"1.3.33\",\"@vercel/static-build\":\"1.0.25\",\"update-notifier\":\"5.1.0\"},\"devDependencies\":{\"@alex_neo/jest-expect-message\":\"1.0.5\",\"@next/env\":\"11.1.2\",\"@sentry/node\":\"5.5.0\",\"@sindresorhus/slugify\":\"0.11.0\",\"@swc/core\":\"1.2.218\",\"@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/ini\":\"1.3.31\",\"@types/inquirer\":\"7.3.1\",\"@types/jest\":\"27.4.1\",\"@types/jest-expect-message\":\"1.0.3\",\"@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/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\",\"@types/yauzl-promise\":\"2.1.0\",\"@vercel/client\":\"12.2.6\",\"@vercel/frameworks\":\"1.1.6\",\"@vercel/fs-detectors\":\"3.3.0\",\"@vercel/fun\":\"1.0.4\",\"@vercel/ncc\":\"0.24.0\",\"@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\",\"boxen\":\"4.2.0\",\"bytes\":\"3.0.0\",\"chalk\":\"4.1.0\",\"chance\":\"1.1.7\",\"chokidar\":\"3.3.1\",\"codecov\":\"3.8.2\",\"cpy\":\"7.2.0\",\"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\",\"git-last-commit\":\"1.0.1\",\"glob\":\"7.1.2\",\"http-proxy\":\"1.18.1\",\"ini\":\"3.0.0\",\"inquirer\":\"7.0.4\",\"is-docker\":\"2.2.1\",\"is-port-reachable\":\"3.1.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.7\",\"npm-package-arg\":\"6.1.0\",\"open\":\"8.4.0\",\"ora\":\"3.4.0\",\"pcre-to-regexp\":\"1.0.0\",\"pluralize\":\"7.0.0\",\"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-node\":\"10.9.1\",\"typescript\":\"4.7.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\",\"yauzl-promise\":\"2.1.3\"},\"jest\":{\"preset\":\"ts-jest\",\"globals\":{\"ts-jest\":{\"diagnostics\":false,\"isolatedModules\":true}},\"setupFilesAfterEnv\":[\"@alex_neo/jest-expect-message\"],\"verbose\":false,\"testEnvironment\":\"node\",\"testMatch\":[\"<rootDir>/test/**/*.test.ts\"]}}");
|
249532
249314
|
|
249533
249315
|
/***/ }),
|
249534
249316
|
|
@@ -249536,7 +249318,7 @@ module.exports = JSON.parse("{\"name\":\"vercel\",\"version\":\"28.2.5\",\"prefe
|
|
249536
249318
|
/***/ ((module) => {
|
249537
249319
|
|
249538
249320
|
"use strict";
|
249539
|
-
module.exports = JSON.parse("{\"name\":\"@vercel/client\",\"version\":\"12.2.
|
249321
|
+
module.exports = JSON.parse("{\"name\":\"@vercel/client\",\"version\":\"12.2.6\",\"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\":\"yarn test tests/create-deployment.test.ts tests/create-legacy-deployment.test.ts tests/paths.test.ts\",\"test\":\"jest --env node --verbose --runInBand --bail\",\"test-unit\":\"yarn test tests/unit.*test.*\"},\"engines\":{\"node\":\">= 14\"},\"devDependencies\":{\"@types/async-retry\":\"1.4.1\",\"@types/fs-extra\":\"7.0.0\",\"@types/jest\":\"27.4.1\",\"@types/minimatch\":\"3.0.5\",\"@types/ms\":\"0.7.30\",\"@types/node\":\"12.0.4\",\"@types/node-fetch\":\"2.5.4\",\"@types/recursive-readdir\":\"2.2.0\",\"@types/tar-fs\":\"1.16.1\",\"typescript\":\"4.3.4\"},\"jest\":{\"preset\":\"ts-jest\",\"testEnvironment\":\"node\",\"verbose\":false,\"setupFilesAfterEnv\":[\"<rootDir>/tests/setup/index.ts\"]},\"dependencies\":{\"@vercel/build-utils\":\"5.4.4\",\"@vercel/routing-utils\":\"2.0.2\",\"@zeit/fetch\":\"5.2.0\",\"async-retry\":\"1.2.3\",\"async-sema\":\"3.0.0\",\"fs-extra\":\"8.0.1\",\"ignore\":\"4.0.6\",\"minimatch\":\"5.0.1\",\"ms\":\"2.1.2\",\"node-fetch\":\"2.6.7\",\"querystring\":\"^0.2.0\",\"sleep-promise\":\"8.0.1\",\"tar-fs\":\"1.16.3\"}}");
|
249540
249322
|
|
249541
249323
|
/***/ }),
|
249542
249324
|
|