vercel 23.1.3-canary.67 → 23.1.3-canary.68
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 +336 -124
- package/package.json +6 -5
package/dist/index.js
CHANGED
@@ -218488,6 +218488,169 @@ function sortFilesBySegmentCount(fileA, fileB) {
|
|
218488
218488
|
}
|
218489
218489
|
|
218490
218490
|
|
218491
|
+
/***/ }),
|
218492
|
+
|
218493
|
+
/***/ 1182:
|
218494
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_962533__) {
|
218495
|
+
|
218496
|
+
"use strict";
|
218497
|
+
|
218498
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
218499
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
218500
|
+
};
|
218501
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
218502
|
+
exports.detectFileSystemAPI = void 0;
|
218503
|
+
const semver_1 = __importDefault(__nested_webpack_require_962533__(2879));
|
218504
|
+
const _1 = __nested_webpack_require_962533__(2855);
|
218505
|
+
const enableFileSystemApiFrameworks = new Set(['solidstart']);
|
218506
|
+
/**
|
218507
|
+
* If the Deployment can be built with the new File System API,
|
218508
|
+
* we'll return the new Builder here, otherwise return `null`.
|
218509
|
+
*/
|
218510
|
+
async function detectFileSystemAPI({ files, projectSettings, builders, vercelConfig, pkg, tag, enableFlag = false, }) {
|
218511
|
+
const framework = projectSettings.framework || '';
|
218512
|
+
const deps = Object.assign({}, pkg === null || pkg === void 0 ? void 0 : pkg.dependencies, pkg === null || pkg === void 0 ? void 0 : pkg.devDependencies);
|
218513
|
+
const plugins = Object.keys(deps).filter(dep => dep.startsWith('vercel-plugin-'));
|
218514
|
+
const hasDotOutput = Object.keys(files).some(file => file.startsWith('.output/'));
|
218515
|
+
const hasMiddleware = Boolean(files['_middleware.js'] || files['_middleware.ts']);
|
218516
|
+
const metadata = {
|
218517
|
+
plugins,
|
218518
|
+
hasDotOutput,
|
218519
|
+
hasMiddleware,
|
218520
|
+
};
|
218521
|
+
const isEnabled = enableFlag ||
|
218522
|
+
hasMiddleware ||
|
218523
|
+
hasDotOutput ||
|
218524
|
+
enableFileSystemApiFrameworks.has(framework);
|
218525
|
+
if (!isEnabled) {
|
218526
|
+
return { metadata, fsApiBuilder: null, reason: 'Flag not enabled.' };
|
218527
|
+
}
|
218528
|
+
if ((vercelConfig === null || vercelConfig === void 0 ? void 0 : vercelConfig.builds) && vercelConfig.builds.length > 0) {
|
218529
|
+
return {
|
218530
|
+
metadata,
|
218531
|
+
fsApiBuilder: null,
|
218532
|
+
reason: 'Detected `builds` in vercel.json. Please remove it in favor of CLI plugins.',
|
218533
|
+
};
|
218534
|
+
}
|
218535
|
+
if (Object.values((vercelConfig === null || vercelConfig === void 0 ? void 0 : vercelConfig.functions) || {}).some(fn => !!fn.runtime)) {
|
218536
|
+
return {
|
218537
|
+
metadata,
|
218538
|
+
fsApiBuilder: null,
|
218539
|
+
reason: 'Detected `functions.runtime` in vercel.json. Please remove it in favor of CLI plugins.',
|
218540
|
+
};
|
218541
|
+
}
|
218542
|
+
if (process.env.HUGO_VERSION) {
|
218543
|
+
return {
|
218544
|
+
metadata,
|
218545
|
+
fsApiBuilder: null,
|
218546
|
+
reason: 'Detected `HUGO_VERSION` environment variable. Please remove it.',
|
218547
|
+
};
|
218548
|
+
}
|
218549
|
+
if (process.env.ZOLA_VERSION) {
|
218550
|
+
return {
|
218551
|
+
metadata,
|
218552
|
+
fsApiBuilder: null,
|
218553
|
+
reason: 'Detected `ZOLA_VERSION` environment variable. Please remove it.',
|
218554
|
+
};
|
218555
|
+
}
|
218556
|
+
if (process.env.GUTENBERG_VERSION) {
|
218557
|
+
return {
|
218558
|
+
metadata,
|
218559
|
+
fsApiBuilder: null,
|
218560
|
+
reason: 'Detected `GUTENBERG_VERSION` environment variable. Please remove it.',
|
218561
|
+
};
|
218562
|
+
}
|
218563
|
+
const invalidBuilder = builders.find(({ use }) => {
|
218564
|
+
const valid = _1.isOfficialRuntime('go', use) ||
|
218565
|
+
_1.isOfficialRuntime('python', use) ||
|
218566
|
+
_1.isOfficialRuntime('ruby', use) ||
|
218567
|
+
_1.isOfficialRuntime('node', use) ||
|
218568
|
+
_1.isOfficialRuntime('next', use) ||
|
218569
|
+
_1.isOfficialRuntime('static', use) ||
|
218570
|
+
_1.isOfficialRuntime('static-build', use);
|
218571
|
+
return !valid;
|
218572
|
+
});
|
218573
|
+
if (invalidBuilder) {
|
218574
|
+
return {
|
218575
|
+
metadata,
|
218576
|
+
fsApiBuilder: null,
|
218577
|
+
reason: `Detected \`${invalidBuilder.use}\` in vercel.json. Please remove it in favor of CLI plugins.`,
|
218578
|
+
};
|
218579
|
+
}
|
218580
|
+
for (const lang of ['go', 'python', 'ruby']) {
|
218581
|
+
for (const { use } of builders) {
|
218582
|
+
const plugin = 'vercel-plugin-' + lang;
|
218583
|
+
if (_1.isOfficialRuntime(lang, use) && !deps[plugin]) {
|
218584
|
+
return {
|
218585
|
+
metadata,
|
218586
|
+
fsApiBuilder: null,
|
218587
|
+
reason: `Detected \`${lang}\` Serverless Function usage without plugin \`${plugin}\`. Please run \`npm i ${plugin}\`.`,
|
218588
|
+
};
|
218589
|
+
}
|
218590
|
+
}
|
218591
|
+
}
|
218592
|
+
if (framework === 'nuxtjs' ||
|
218593
|
+
framework === 'sveltekit' ||
|
218594
|
+
framework === 'redwoodjs') {
|
218595
|
+
return {
|
218596
|
+
metadata,
|
218597
|
+
fsApiBuilder: null,
|
218598
|
+
reason: `Detected framework \`${framework}\` that only supports legacy File System API. Please contact the framework author.`,
|
218599
|
+
};
|
218600
|
+
}
|
218601
|
+
if (framework === 'nextjs' && !hasDotOutput) {
|
218602
|
+
// Use the old pipeline if a custom output directory was specified for Next.js
|
218603
|
+
// because `vercel build` cannot ensure that the directory will be in the same
|
218604
|
+
// location as `.output`, which can break imports (not just nft.json files).
|
218605
|
+
if (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.outputDirectory) {
|
218606
|
+
return {
|
218607
|
+
metadata,
|
218608
|
+
fsApiBuilder: null,
|
218609
|
+
reason: `Detected Next.js with Output Directory \`${projectSettings.outputDirectory}\` override. Please change it back to the default.`,
|
218610
|
+
};
|
218611
|
+
}
|
218612
|
+
const versionRange = deps['next'];
|
218613
|
+
if (!versionRange) {
|
218614
|
+
return {
|
218615
|
+
metadata,
|
218616
|
+
fsApiBuilder: null,
|
218617
|
+
reason: `Detected Next.js in Project Settings but missing \`next\` package.json dependencies. Please run \`npm i next\`.`,
|
218618
|
+
};
|
218619
|
+
}
|
218620
|
+
// TODO: We'll need to check the lockfile if one is present.
|
218621
|
+
if (versionRange !== 'latest' && versionRange !== 'canary') {
|
218622
|
+
const fixedVersion = semver_1.default.valid(semver_1.default.coerce(versionRange) || '');
|
218623
|
+
if (!fixedVersion || !semver_1.default.gte(fixedVersion, '12.0.0')) {
|
218624
|
+
return {
|
218625
|
+
metadata,
|
218626
|
+
fsApiBuilder: null,
|
218627
|
+
reason: `Detected legacy Next.js version "${versionRange}" in package.json. Please run \`npm i next@latest\` to upgrade.`,
|
218628
|
+
};
|
218629
|
+
}
|
218630
|
+
}
|
218631
|
+
}
|
218632
|
+
const frontendBuilder = builders.find(({ use }) => _1.isOfficialRuntime('next', use) ||
|
218633
|
+
_1.isOfficialRuntime('static', use) ||
|
218634
|
+
_1.isOfficialRuntime('static-build', use));
|
218635
|
+
const config = (frontendBuilder === null || frontendBuilder === void 0 ? void 0 : frontendBuilder.config) || {};
|
218636
|
+
const withTag = tag ? `@${tag}` : '';
|
218637
|
+
const fsApiBuilder = {
|
218638
|
+
use: `@vercelruntimes/file-system-api${withTag}`,
|
218639
|
+
src: '**',
|
218640
|
+
config: {
|
218641
|
+
...config,
|
218642
|
+
fileSystemAPI: true,
|
218643
|
+
framework: config.framework || framework || null,
|
218644
|
+
projectSettings,
|
218645
|
+
hasMiddleware,
|
218646
|
+
hasDotOutput,
|
218647
|
+
},
|
218648
|
+
};
|
218649
|
+
return { metadata, fsApiBuilder, reason: null };
|
218650
|
+
}
|
218651
|
+
exports.detectFileSystemAPI = detectFileSystemAPI;
|
218652
|
+
|
218653
|
+
|
218491
218654
|
/***/ }),
|
218492
218655
|
|
218493
218656
|
/***/ 5224:
|
@@ -218721,7 +218884,7 @@ function getSuggestion(topLevelProp, additionalProperty) {
|
|
218721
218884
|
/***/ }),
|
218722
218885
|
|
218723
218886
|
/***/ 2397:
|
218724
|
-
/***/ (function(__unused_webpack_module, exports,
|
218887
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_976741__) {
|
218725
218888
|
|
218726
218889
|
"use strict";
|
218727
218890
|
|
@@ -218729,8 +218892,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
218729
218892
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
218730
218893
|
};
|
218731
218894
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
218732
|
-
const assert_1 = __importDefault(
|
218733
|
-
const into_stream_1 = __importDefault(
|
218895
|
+
const assert_1 = __importDefault(__nested_webpack_require_976741__(2357));
|
218896
|
+
const into_stream_1 = __importDefault(__nested_webpack_require_976741__(6130));
|
218734
218897
|
class FileBlob {
|
218735
218898
|
constructor({ mode = 0o100644, contentType, data }) {
|
218736
218899
|
assert_1.default(typeof mode === 'number');
|
@@ -218762,7 +218925,7 @@ exports.default = FileBlob;
|
|
218762
218925
|
/***/ }),
|
218763
218926
|
|
218764
218927
|
/***/ 9331:
|
218765
|
-
/***/ (function(__unused_webpack_module, exports,
|
218928
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_978193__) {
|
218766
218929
|
|
218767
218930
|
"use strict";
|
218768
218931
|
|
@@ -218770,11 +218933,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
218770
218933
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
218771
218934
|
};
|
218772
218935
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
218773
|
-
const assert_1 = __importDefault(
|
218774
|
-
const fs_extra_1 = __importDefault(
|
218775
|
-
const multistream_1 = __importDefault(
|
218776
|
-
const path_1 = __importDefault(
|
218777
|
-
const async_sema_1 = __importDefault(
|
218936
|
+
const assert_1 = __importDefault(__nested_webpack_require_978193__(2357));
|
218937
|
+
const fs_extra_1 = __importDefault(__nested_webpack_require_978193__(5392));
|
218938
|
+
const multistream_1 = __importDefault(__nested_webpack_require_978193__(8179));
|
218939
|
+
const path_1 = __importDefault(__nested_webpack_require_978193__(5622));
|
218940
|
+
const async_sema_1 = __importDefault(__nested_webpack_require_978193__(5758));
|
218778
218941
|
const semaToPreventEMFILE = new async_sema_1.default(20);
|
218779
218942
|
class FileFsRef {
|
218780
218943
|
constructor({ mode = 0o100644, contentType, fsPath }) {
|
@@ -218840,7 +219003,7 @@ exports.default = FileFsRef;
|
|
218840
219003
|
/***/ }),
|
218841
219004
|
|
218842
219005
|
/***/ 5187:
|
218843
|
-
/***/ (function(__unused_webpack_module, exports,
|
219006
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_980997__) {
|
218844
219007
|
|
218845
219008
|
"use strict";
|
218846
219009
|
|
@@ -218848,11 +219011,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
218848
219011
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
218849
219012
|
};
|
218850
219013
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
218851
|
-
const assert_1 = __importDefault(
|
218852
|
-
const node_fetch_1 = __importDefault(
|
218853
|
-
const multistream_1 = __importDefault(
|
218854
|
-
const async_retry_1 = __importDefault(
|
218855
|
-
const async_sema_1 = __importDefault(
|
219014
|
+
const assert_1 = __importDefault(__nested_webpack_require_980997__(2357));
|
219015
|
+
const node_fetch_1 = __importDefault(__nested_webpack_require_980997__(2197));
|
219016
|
+
const multistream_1 = __importDefault(__nested_webpack_require_980997__(8179));
|
219017
|
+
const async_retry_1 = __importDefault(__nested_webpack_require_980997__(3691));
|
219018
|
+
const async_sema_1 = __importDefault(__nested_webpack_require_980997__(5758));
|
218856
219019
|
const semaToDownloadFromS3 = new async_sema_1.default(5);
|
218857
219020
|
class BailableError extends Error {
|
218858
219021
|
constructor(...args) {
|
@@ -218933,7 +219096,7 @@ exports.default = FileRef;
|
|
218933
219096
|
/***/ }),
|
218934
219097
|
|
218935
219098
|
/***/ 1611:
|
218936
|
-
/***/ (function(__unused_webpack_module, exports,
|
219099
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_984398__) {
|
218937
219100
|
|
218938
219101
|
"use strict";
|
218939
219102
|
|
@@ -218942,10 +219105,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
218942
219105
|
};
|
218943
219106
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
218944
219107
|
exports.isSymbolicLink = void 0;
|
218945
|
-
const path_1 = __importDefault(
|
218946
|
-
const debug_1 = __importDefault(
|
218947
|
-
const file_fs_ref_1 = __importDefault(
|
218948
|
-
const fs_extra_1 =
|
219108
|
+
const path_1 = __importDefault(__nested_webpack_require_984398__(5622));
|
219109
|
+
const debug_1 = __importDefault(__nested_webpack_require_984398__(1868));
|
219110
|
+
const file_fs_ref_1 = __importDefault(__nested_webpack_require_984398__(9331));
|
219111
|
+
const fs_extra_1 = __nested_webpack_require_984398__(5392);
|
218949
219112
|
const S_IFMT = 61440; /* 0170000 type of file */
|
218950
219113
|
const S_IFLNK = 40960; /* 0120000 symbolic link */
|
218951
219114
|
function isSymbolicLink(mode) {
|
@@ -219007,14 +219170,14 @@ exports.default = download;
|
|
219007
219170
|
/***/ }),
|
219008
219171
|
|
219009
219172
|
/***/ 3838:
|
219010
|
-
/***/ ((__unused_webpack_module, exports,
|
219173
|
+
/***/ ((__unused_webpack_module, exports, __nested_webpack_require_987223__) => {
|
219011
219174
|
|
219012
219175
|
"use strict";
|
219013
219176
|
|
219014
219177
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
219015
|
-
const path_1 =
|
219016
|
-
const os_1 =
|
219017
|
-
const fs_extra_1 =
|
219178
|
+
const path_1 = __nested_webpack_require_987223__(5622);
|
219179
|
+
const os_1 = __nested_webpack_require_987223__(2087);
|
219180
|
+
const fs_extra_1 = __nested_webpack_require_987223__(5392);
|
219018
219181
|
async function getWritableDirectory() {
|
219019
219182
|
const name = Math.floor(Math.random() * 0x7fffffff).toString(16);
|
219020
219183
|
const directory = path_1.join(os_1.tmpdir(), name);
|
@@ -219027,7 +219190,7 @@ exports.default = getWritableDirectory;
|
|
219027
219190
|
/***/ }),
|
219028
219191
|
|
219029
219192
|
/***/ 4240:
|
219030
|
-
/***/ (function(__unused_webpack_module, exports,
|
219193
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_987803__) {
|
219031
219194
|
|
219032
219195
|
"use strict";
|
219033
219196
|
|
@@ -219035,13 +219198,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
219035
219198
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
219036
219199
|
};
|
219037
219200
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
219038
|
-
const path_1 = __importDefault(
|
219039
|
-
const assert_1 = __importDefault(
|
219040
|
-
const glob_1 = __importDefault(
|
219041
|
-
const util_1 =
|
219042
|
-
const fs_extra_1 =
|
219043
|
-
const normalize_path_1 =
|
219044
|
-
const file_fs_ref_1 = __importDefault(
|
219201
|
+
const path_1 = __importDefault(__nested_webpack_require_987803__(5622));
|
219202
|
+
const assert_1 = __importDefault(__nested_webpack_require_987803__(2357));
|
219203
|
+
const glob_1 = __importDefault(__nested_webpack_require_987803__(1104));
|
219204
|
+
const util_1 = __nested_webpack_require_987803__(1669);
|
219205
|
+
const fs_extra_1 = __nested_webpack_require_987803__(5392);
|
219206
|
+
const normalize_path_1 = __nested_webpack_require_987803__(6261);
|
219207
|
+
const file_fs_ref_1 = __importDefault(__nested_webpack_require_987803__(9331));
|
219045
219208
|
const vanillaGlob = util_1.promisify(glob_1.default);
|
219046
219209
|
async function glob(pattern, opts, mountpoint) {
|
219047
219210
|
let options;
|
@@ -219087,7 +219250,7 @@ exports.default = glob;
|
|
219087
219250
|
/***/ }),
|
219088
219251
|
|
219089
219252
|
/***/ 7903:
|
219090
|
-
/***/ (function(__unused_webpack_module, exports,
|
219253
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_989999__) {
|
219091
219254
|
|
219092
219255
|
"use strict";
|
219093
219256
|
|
@@ -219096,9 +219259,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
219096
219259
|
};
|
219097
219260
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
219098
219261
|
exports.getSupportedNodeVersion = exports.getDiscontinuedNodeVersions = exports.getLatestNodeVersion = void 0;
|
219099
|
-
const semver_1 =
|
219100
|
-
const errors_1 =
|
219101
|
-
const debug_1 = __importDefault(
|
219262
|
+
const semver_1 = __nested_webpack_require_989999__(2879);
|
219263
|
+
const errors_1 = __nested_webpack_require_989999__(3983);
|
219264
|
+
const debug_1 = __importDefault(__nested_webpack_require_989999__(1868));
|
219102
219265
|
const allOptions = [
|
219103
219266
|
{ major: 14, range: '14.x', runtime: 'nodejs14.x' },
|
219104
219267
|
{ major: 12, range: '12.x', runtime: 'nodejs12.x' },
|
@@ -219192,7 +219355,7 @@ exports.normalizePath = normalizePath;
|
|
219192
219355
|
/***/ }),
|
219193
219356
|
|
219194
219357
|
/***/ 7792:
|
219195
|
-
/***/ (function(__unused_webpack_module, exports,
|
219358
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_993867__) {
|
219196
219359
|
|
219197
219360
|
"use strict";
|
219198
219361
|
|
@@ -219201,9 +219364,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
219201
219364
|
};
|
219202
219365
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
219203
219366
|
exports.readConfigFile = void 0;
|
219204
|
-
const js_yaml_1 = __importDefault(
|
219205
|
-
const toml_1 = __importDefault(
|
219206
|
-
const fs_extra_1 =
|
219367
|
+
const js_yaml_1 = __importDefault(__nested_webpack_require_993867__(6540));
|
219368
|
+
const toml_1 = __importDefault(__nested_webpack_require_993867__(9434));
|
219369
|
+
const fs_extra_1 = __nested_webpack_require_993867__(5392);
|
219207
219370
|
async function readFileOrNull(file) {
|
219208
219371
|
try {
|
219209
219372
|
const data = await fs_extra_1.readFile(file);
|
@@ -219258,7 +219421,7 @@ exports.default = rename;
|
|
219258
219421
|
/***/ }),
|
219259
219422
|
|
219260
219423
|
/***/ 1442:
|
219261
|
-
/***/ (function(__unused_webpack_module, exports,
|
219424
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_995660__) {
|
219262
219425
|
|
219263
219426
|
"use strict";
|
219264
219427
|
|
@@ -219267,14 +219430,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
219267
219430
|
};
|
219268
219431
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
219269
219432
|
exports.installDependencies = exports.getScriptName = exports.runPipInstall = exports.runBundleInstall = exports.runPackageJsonScript = exports.runNpmInstall = exports.walkParentDirs = exports.scanParentDirs = exports.getNodeVersion = exports.getSpawnOptions = exports.runShellScript = exports.getNodeBinPath = exports.execCommand = exports.spawnCommand = exports.execAsync = exports.spawnAsync = void 0;
|
219270
|
-
const assert_1 = __importDefault(
|
219271
|
-
const fs_extra_1 = __importDefault(
|
219272
|
-
const path_1 = __importDefault(
|
219273
|
-
const debug_1 = __importDefault(
|
219274
|
-
const cross_spawn_1 = __importDefault(
|
219275
|
-
const util_1 =
|
219276
|
-
const errors_1 =
|
219277
|
-
const node_version_1 =
|
219433
|
+
const assert_1 = __importDefault(__nested_webpack_require_995660__(2357));
|
219434
|
+
const fs_extra_1 = __importDefault(__nested_webpack_require_995660__(5392));
|
219435
|
+
const path_1 = __importDefault(__nested_webpack_require_995660__(5622));
|
219436
|
+
const debug_1 = __importDefault(__nested_webpack_require_995660__(1868));
|
219437
|
+
const cross_spawn_1 = __importDefault(__nested_webpack_require_995660__(7618));
|
219438
|
+
const util_1 = __nested_webpack_require_995660__(1669);
|
219439
|
+
const errors_1 = __nested_webpack_require_995660__(3983);
|
219440
|
+
const node_version_1 = __nested_webpack_require_995660__(7903);
|
219278
219441
|
function spawnAsync(command, args, opts = {}) {
|
219279
219442
|
return new Promise((resolve, reject) => {
|
219280
219443
|
const stderrLogs = [];
|
@@ -219585,7 +219748,7 @@ exports.installDependencies = util_1.deprecate(runNpmInstall, 'installDependenci
|
|
219585
219748
|
/***/ }),
|
219586
219749
|
|
219587
219750
|
/***/ 2560:
|
219588
|
-
/***/ (function(__unused_webpack_module, exports,
|
219751
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_1009650__) {
|
219589
219752
|
|
219590
219753
|
"use strict";
|
219591
219754
|
|
@@ -219593,7 +219756,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
219593
219756
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
219594
219757
|
};
|
219595
219758
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
219596
|
-
const end_of_stream_1 = __importDefault(
|
219759
|
+
const end_of_stream_1 = __importDefault(__nested_webpack_require_1009650__(687));
|
219597
219760
|
function streamToBuffer(stream) {
|
219598
219761
|
return new Promise((resolve, reject) => {
|
219599
219762
|
const buffers = [];
|
@@ -219622,7 +219785,7 @@ exports.default = streamToBuffer;
|
|
219622
219785
|
/***/ }),
|
219623
219786
|
|
219624
219787
|
/***/ 1148:
|
219625
|
-
/***/ (function(__unused_webpack_module, exports,
|
219788
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_1010718__) {
|
219626
219789
|
|
219627
219790
|
"use strict";
|
219628
219791
|
|
@@ -219630,9 +219793,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
219630
219793
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
219631
219794
|
};
|
219632
219795
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
219633
|
-
const path_1 = __importDefault(
|
219634
|
-
const fs_extra_1 = __importDefault(
|
219635
|
-
const ignore_1 = __importDefault(
|
219796
|
+
const path_1 = __importDefault(__nested_webpack_require_1010718__(5622));
|
219797
|
+
const fs_extra_1 = __importDefault(__nested_webpack_require_1010718__(5392));
|
219798
|
+
const ignore_1 = __importDefault(__nested_webpack_require_1010718__(3556));
|
219636
219799
|
function isCodedError(error) {
|
219637
219800
|
return (error !== null &&
|
219638
219801
|
error !== undefined &&
|
@@ -219689,7 +219852,7 @@ exports.default = default_1;
|
|
219689
219852
|
/***/ }),
|
219690
219853
|
|
219691
219854
|
/***/ 2855:
|
219692
|
-
/***/ (function(__unused_webpack_module, exports,
|
219855
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_1013100__) {
|
219693
219856
|
|
219694
219857
|
"use strict";
|
219695
219858
|
|
@@ -219719,30 +219882,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
219719
219882
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
219720
219883
|
};
|
219721
219884
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
219722
|
-
exports.getInputHash = exports.getPlatformEnv = exports.isStaticRuntime = exports.isOfficialRuntime = exports.updateRoutesManifest = exports.updateFunctionsManifest = exports.convertRuntimeToPlugin = exports.normalizePath = exports.readConfigFile = exports.DetectorFilesystem = exports.detectFramework = exports.detectApiExtensions = exports.detectApiDirectory = exports.detectOutputDirectory = exports.detectBuilders = exports.getIgnoreFilter = exports.scanParentDirs = exports.getLambdaOptionsFromFunction = exports.isSymbolicLink = exports.debug = exports.shouldServe = exports.streamToBuffer = exports.getSpawnOptions = exports.getDiscontinuedNodeVersions = exports.getLatestNodeVersion = exports.getNodeVersion = exports.runShellScript = exports.runPipInstall = exports.runBundleInstall = exports.runNpmInstall = exports.getNodeBinPath = exports.walkParentDirs = exports.spawnCommand = exports.execCommand = exports.runPackageJsonScript = exports.installDependencies = exports.getScriptName = exports.spawnAsync = exports.execAsync = exports.rename = exports.glob = exports.getWriteableDirectory = exports.download = exports.Prerender = exports.createLambda = exports.Lambda = exports.FileRef = exports.FileFsRef = exports.FileBlob = void 0;
|
219723
|
-
const crypto_1 =
|
219724
|
-
const file_blob_1 = __importDefault(
|
219885
|
+
exports.getInputHash = exports.getPlatformEnv = exports.isStaticRuntime = exports.isOfficialRuntime = exports.updateRoutesManifest = exports.updateFunctionsManifest = exports.convertRuntimeToPlugin = exports.normalizePath = exports.readConfigFile = exports.DetectorFilesystem = exports.detectFramework = exports.detectFileSystemAPI = exports.detectApiExtensions = exports.detectApiDirectory = exports.detectOutputDirectory = exports.detectBuilders = exports.getIgnoreFilter = exports.scanParentDirs = exports.getLambdaOptionsFromFunction = exports.isSymbolicLink = exports.debug = exports.shouldServe = exports.streamToBuffer = exports.getSpawnOptions = exports.getDiscontinuedNodeVersions = exports.getLatestNodeVersion = exports.getNodeVersion = exports.runShellScript = exports.runPipInstall = exports.runBundleInstall = exports.runNpmInstall = exports.getNodeBinPath = exports.walkParentDirs = exports.spawnCommand = exports.execCommand = exports.runPackageJsonScript = exports.installDependencies = exports.getScriptName = exports.spawnAsync = exports.execAsync = exports.rename = exports.glob = exports.getWriteableDirectory = exports.download = exports.Prerender = exports.createLambda = exports.Lambda = exports.FileRef = exports.FileFsRef = exports.FileBlob = void 0;
|
219886
|
+
const crypto_1 = __nested_webpack_require_1013100__(6417);
|
219887
|
+
const file_blob_1 = __importDefault(__nested_webpack_require_1013100__(2397));
|
219725
219888
|
exports.FileBlob = file_blob_1.default;
|
219726
|
-
const file_fs_ref_1 = __importDefault(
|
219889
|
+
const file_fs_ref_1 = __importDefault(__nested_webpack_require_1013100__(9331));
|
219727
219890
|
exports.FileFsRef = file_fs_ref_1.default;
|
219728
|
-
const file_ref_1 = __importDefault(
|
219891
|
+
const file_ref_1 = __importDefault(__nested_webpack_require_1013100__(5187));
|
219729
219892
|
exports.FileRef = file_ref_1.default;
|
219730
|
-
const lambda_1 =
|
219893
|
+
const lambda_1 = __nested_webpack_require_1013100__(6721);
|
219731
219894
|
Object.defineProperty(exports, "Lambda", ({ enumerable: true, get: function () { return lambda_1.Lambda; } }));
|
219732
219895
|
Object.defineProperty(exports, "createLambda", ({ enumerable: true, get: function () { return lambda_1.createLambda; } }));
|
219733
219896
|
Object.defineProperty(exports, "getLambdaOptionsFromFunction", ({ enumerable: true, get: function () { return lambda_1.getLambdaOptionsFromFunction; } }));
|
219734
|
-
const prerender_1 =
|
219897
|
+
const prerender_1 = __nested_webpack_require_1013100__(2850);
|
219735
219898
|
Object.defineProperty(exports, "Prerender", ({ enumerable: true, get: function () { return prerender_1.Prerender; } }));
|
219736
|
-
const download_1 = __importStar(
|
219899
|
+
const download_1 = __importStar(__nested_webpack_require_1013100__(1611));
|
219737
219900
|
exports.download = download_1.default;
|
219738
219901
|
Object.defineProperty(exports, "isSymbolicLink", ({ enumerable: true, get: function () { return download_1.isSymbolicLink; } }));
|
219739
|
-
const get_writable_directory_1 = __importDefault(
|
219902
|
+
const get_writable_directory_1 = __importDefault(__nested_webpack_require_1013100__(3838));
|
219740
219903
|
exports.getWriteableDirectory = get_writable_directory_1.default;
|
219741
|
-
const glob_1 = __importDefault(
|
219904
|
+
const glob_1 = __importDefault(__nested_webpack_require_1013100__(4240));
|
219742
219905
|
exports.glob = glob_1.default;
|
219743
|
-
const rename_1 = __importDefault(
|
219906
|
+
const rename_1 = __importDefault(__nested_webpack_require_1013100__(6718));
|
219744
219907
|
exports.rename = rename_1.default;
|
219745
|
-
const run_user_scripts_1 =
|
219908
|
+
const run_user_scripts_1 = __nested_webpack_require_1013100__(1442);
|
219746
219909
|
Object.defineProperty(exports, "execAsync", ({ enumerable: true, get: function () { return run_user_scripts_1.execAsync; } }));
|
219747
219910
|
Object.defineProperty(exports, "spawnAsync", ({ enumerable: true, get: function () { return run_user_scripts_1.spawnAsync; } }));
|
219748
219911
|
Object.defineProperty(exports, "execCommand", ({ enumerable: true, get: function () { return run_user_scripts_1.execCommand; } }));
|
@@ -219759,38 +219922,40 @@ Object.defineProperty(exports, "getNodeVersion", ({ enumerable: true, get: funct
|
|
219759
219922
|
Object.defineProperty(exports, "getSpawnOptions", ({ enumerable: true, get: function () { return run_user_scripts_1.getSpawnOptions; } }));
|
219760
219923
|
Object.defineProperty(exports, "getNodeBinPath", ({ enumerable: true, get: function () { return run_user_scripts_1.getNodeBinPath; } }));
|
219761
219924
|
Object.defineProperty(exports, "scanParentDirs", ({ enumerable: true, get: function () { return run_user_scripts_1.scanParentDirs; } }));
|
219762
|
-
const node_version_1 =
|
219925
|
+
const node_version_1 = __nested_webpack_require_1013100__(7903);
|
219763
219926
|
Object.defineProperty(exports, "getLatestNodeVersion", ({ enumerable: true, get: function () { return node_version_1.getLatestNodeVersion; } }));
|
219764
219927
|
Object.defineProperty(exports, "getDiscontinuedNodeVersions", ({ enumerable: true, get: function () { return node_version_1.getDiscontinuedNodeVersions; } }));
|
219765
|
-
const errors_1 =
|
219766
|
-
const stream_to_buffer_1 = __importDefault(
|
219928
|
+
const errors_1 = __nested_webpack_require_1013100__(3983);
|
219929
|
+
const stream_to_buffer_1 = __importDefault(__nested_webpack_require_1013100__(2560));
|
219767
219930
|
exports.streamToBuffer = stream_to_buffer_1.default;
|
219768
|
-
const should_serve_1 = __importDefault(
|
219931
|
+
const should_serve_1 = __importDefault(__nested_webpack_require_1013100__(2564));
|
219769
219932
|
exports.shouldServe = should_serve_1.default;
|
219770
|
-
const debug_1 = __importDefault(
|
219933
|
+
const debug_1 = __importDefault(__nested_webpack_require_1013100__(1868));
|
219771
219934
|
exports.debug = debug_1.default;
|
219772
|
-
const get_ignore_filter_1 = __importDefault(
|
219935
|
+
const get_ignore_filter_1 = __importDefault(__nested_webpack_require_1013100__(1148));
|
219773
219936
|
exports.getIgnoreFilter = get_ignore_filter_1.default;
|
219774
|
-
var detect_builders_1 =
|
219937
|
+
var detect_builders_1 = __nested_webpack_require_1013100__(4246);
|
219775
219938
|
Object.defineProperty(exports, "detectBuilders", ({ enumerable: true, get: function () { return detect_builders_1.detectBuilders; } }));
|
219776
219939
|
Object.defineProperty(exports, "detectOutputDirectory", ({ enumerable: true, get: function () { return detect_builders_1.detectOutputDirectory; } }));
|
219777
219940
|
Object.defineProperty(exports, "detectApiDirectory", ({ enumerable: true, get: function () { return detect_builders_1.detectApiDirectory; } }));
|
219778
219941
|
Object.defineProperty(exports, "detectApiExtensions", ({ enumerable: true, get: function () { return detect_builders_1.detectApiExtensions; } }));
|
219779
|
-
var
|
219942
|
+
var detect_file_system_api_1 = __nested_webpack_require_1013100__(1182);
|
219943
|
+
Object.defineProperty(exports, "detectFileSystemAPI", ({ enumerable: true, get: function () { return detect_file_system_api_1.detectFileSystemAPI; } }));
|
219944
|
+
var detect_framework_1 = __nested_webpack_require_1013100__(5224);
|
219780
219945
|
Object.defineProperty(exports, "detectFramework", ({ enumerable: true, get: function () { return detect_framework_1.detectFramework; } }));
|
219781
|
-
var filesystem_1 =
|
219946
|
+
var filesystem_1 = __nested_webpack_require_1013100__(461);
|
219782
219947
|
Object.defineProperty(exports, "DetectorFilesystem", ({ enumerable: true, get: function () { return filesystem_1.DetectorFilesystem; } }));
|
219783
|
-
var read_config_file_1 =
|
219948
|
+
var read_config_file_1 = __nested_webpack_require_1013100__(7792);
|
219784
219949
|
Object.defineProperty(exports, "readConfigFile", ({ enumerable: true, get: function () { return read_config_file_1.readConfigFile; } }));
|
219785
|
-
var normalize_path_1 =
|
219950
|
+
var normalize_path_1 = __nested_webpack_require_1013100__(6261);
|
219786
219951
|
Object.defineProperty(exports, "normalizePath", ({ enumerable: true, get: function () { return normalize_path_1.normalizePath; } }));
|
219787
|
-
var convert_runtime_to_plugin_1 =
|
219952
|
+
var convert_runtime_to_plugin_1 = __nested_webpack_require_1013100__(7276);
|
219788
219953
|
Object.defineProperty(exports, "convertRuntimeToPlugin", ({ enumerable: true, get: function () { return convert_runtime_to_plugin_1.convertRuntimeToPlugin; } }));
|
219789
219954
|
Object.defineProperty(exports, "updateFunctionsManifest", ({ enumerable: true, get: function () { return convert_runtime_to_plugin_1.updateFunctionsManifest; } }));
|
219790
219955
|
Object.defineProperty(exports, "updateRoutesManifest", ({ enumerable: true, get: function () { return convert_runtime_to_plugin_1.updateRoutesManifest; } }));
|
219791
|
-
__exportStar(
|
219792
|
-
__exportStar(
|
219793
|
-
__exportStar(
|
219956
|
+
__exportStar(__nested_webpack_require_1013100__(2416), exports);
|
219957
|
+
__exportStar(__nested_webpack_require_1013100__(5748), exports);
|
219958
|
+
__exportStar(__nested_webpack_require_1013100__(3983), exports);
|
219794
219959
|
/**
|
219795
219960
|
* Helper function to support both `@vercel` and legacy `@now` official Runtimes.
|
219796
219961
|
*/
|
@@ -219843,7 +220008,7 @@ exports.getInputHash = getInputHash;
|
|
219843
220008
|
/***/ }),
|
219844
220009
|
|
219845
220010
|
/***/ 6721:
|
219846
|
-
/***/ (function(__unused_webpack_module, exports,
|
220011
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_1024320__) {
|
219847
220012
|
|
219848
220013
|
"use strict";
|
219849
220014
|
|
@@ -219852,13 +220017,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
219852
220017
|
};
|
219853
220018
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
219854
220019
|
exports.getLambdaOptionsFromFunction = exports.createZip = exports.createLambda = exports.Lambda = exports.FILES_SYMBOL = void 0;
|
219855
|
-
const assert_1 = __importDefault(
|
219856
|
-
const async_sema_1 = __importDefault(
|
219857
|
-
const yazl_1 =
|
219858
|
-
const minimatch_1 = __importDefault(
|
219859
|
-
const fs_extra_1 =
|
219860
|
-
const download_1 =
|
219861
|
-
const stream_to_buffer_1 = __importDefault(
|
220020
|
+
const assert_1 = __importDefault(__nested_webpack_require_1024320__(2357));
|
220021
|
+
const async_sema_1 = __importDefault(__nested_webpack_require_1024320__(5758));
|
220022
|
+
const yazl_1 = __nested_webpack_require_1024320__(1223);
|
220023
|
+
const minimatch_1 = __importDefault(__nested_webpack_require_1024320__(9566));
|
220024
|
+
const fs_extra_1 = __nested_webpack_require_1024320__(5392);
|
220025
|
+
const download_1 = __nested_webpack_require_1024320__(1611);
|
220026
|
+
const stream_to_buffer_1 = __importDefault(__nested_webpack_require_1024320__(2560));
|
219862
220027
|
exports.FILES_SYMBOL = Symbol('files');
|
219863
220028
|
class Lambda {
|
219864
220029
|
constructor({ zipBuffer, handler, runtime, maxDuration, memory, environment, allowQuery, regions, }) {
|
@@ -220087,12 +220252,12 @@ exports.buildsSchema = {
|
|
220087
220252
|
/***/ }),
|
220088
220253
|
|
220089
220254
|
/***/ 2564:
|
220090
|
-
/***/ ((__unused_webpack_module, exports,
|
220255
|
+
/***/ ((__unused_webpack_module, exports, __nested_webpack_require_1032830__) => {
|
220091
220256
|
|
220092
220257
|
"use strict";
|
220093
220258
|
|
220094
220259
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
220095
|
-
const path_1 =
|
220260
|
+
const path_1 = __nested_webpack_require_1032830__(5622);
|
220096
220261
|
function shouldServe({ entrypoint, files, requestPath, }) {
|
220097
220262
|
requestPath = requestPath.replace(/\/$/, ''); // sanitize trailing '/'
|
220098
220263
|
entrypoint = entrypoint.replace(/\\/, '/'); // windows compatibility
|
@@ -220329,7 +220494,7 @@ module.exports = __webpack_require__(78761);
|
|
220329
220494
|
/******/ var __webpack_module_cache__ = {};
|
220330
220495
|
/******/
|
220331
220496
|
/******/ // The require function
|
220332
|
-
/******/ function
|
220497
|
+
/******/ function __nested_webpack_require_1132565__(moduleId) {
|
220333
220498
|
/******/ // Check if module is in cache
|
220334
220499
|
/******/ if(__webpack_module_cache__[moduleId]) {
|
220335
220500
|
/******/ return __webpack_module_cache__[moduleId].exports;
|
@@ -220344,7 +220509,7 @@ module.exports = __webpack_require__(78761);
|
|
220344
220509
|
/******/ // Execute the module function
|
220345
220510
|
/******/ var threw = true;
|
220346
220511
|
/******/ try {
|
220347
|
-
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports,
|
220512
|
+
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_1132565__);
|
220348
220513
|
/******/ threw = false;
|
220349
220514
|
/******/ } finally {
|
220350
220515
|
/******/ if(threw) delete __webpack_module_cache__[moduleId];
|
@@ -220357,11 +220522,11 @@ module.exports = __webpack_require__(78761);
|
|
220357
220522
|
/************************************************************************/
|
220358
220523
|
/******/ /* webpack/runtime/compat */
|
220359
220524
|
/******/
|
220360
|
-
/******/
|
220525
|
+
/******/ __nested_webpack_require_1132565__.ab = __dirname + "/";/************************************************************************/
|
220361
220526
|
/******/ // module exports must be returned from runtime so entry inlining is disabled
|
220362
220527
|
/******/ // startup
|
220363
220528
|
/******/ // Load entry module and return exports
|
220364
|
-
/******/ return
|
220529
|
+
/******/ return __nested_webpack_require_1132565__(2855);
|
220365
220530
|
/******/ })()
|
220366
220531
|
;
|
220367
220532
|
|
@@ -238814,9 +238979,9 @@ async function hashes(files, map = new Map()) {
|
|
238814
238979
|
const h = hash(data);
|
238815
238980
|
const entry = map.get(h);
|
238816
238981
|
if (entry) {
|
238817
|
-
|
238818
|
-
|
238819
|
-
|
238982
|
+
const names = new Set(entry.names);
|
238983
|
+
names.add(name);
|
238984
|
+
entry.names = [...names];
|
238820
238985
|
}
|
238821
238986
|
else {
|
238822
238987
|
map.set(h, { names: [name], data, mode });
|
@@ -250298,6 +250463,7 @@ const glob_1 = __importDefault(__webpack_require__(91104));
|
|
250298
250463
|
const path_1 = __webpack_require__(85622);
|
250299
250464
|
const pluralize_1 = __importDefault(__webpack_require__(31974));
|
250300
250465
|
const emoji_1 = __webpack_require__(41806);
|
250466
|
+
const errors_ts_1 = __webpack_require__(60156);
|
250301
250467
|
const get_args_1 = __importDefault(__webpack_require__(87612));
|
250302
250468
|
const handle_error_1 = __importDefault(__webpack_require__(70870));
|
250303
250469
|
const confirm_1 = __importDefault(__webpack_require__(33564));
|
@@ -250311,6 +250477,7 @@ const plugins_1 = __webpack_require__(13233);
|
|
250311
250477
|
const find_framework_1 = __webpack_require__(77969);
|
250312
250478
|
const link_1 = __webpack_require__(67630);
|
250313
250479
|
const project_settings_1 = __webpack_require__(42697);
|
250480
|
+
const read_json_file_1 = __importDefault(__webpack_require__(16898));
|
250314
250481
|
const pull_1 = __importDefault(__webpack_require__(6277));
|
250315
250482
|
const sema = new async_sema_1.default(16, {
|
250316
250483
|
capacity: 100,
|
@@ -250394,6 +250561,33 @@ async function main(client) {
|
|
250394
250561
|
env: { ...combinedEnv, VERCEL: '1' },
|
250395
250562
|
};
|
250396
250563
|
process.chdir(cwd);
|
250564
|
+
const pkg = await read_json_file_1.default('./package.json');
|
250565
|
+
if (pkg instanceof errors_ts_1.CantParseJSONFile) {
|
250566
|
+
throw pkg;
|
250567
|
+
}
|
250568
|
+
const vercelConfig = await read_json_file_1.default('./vercel.json');
|
250569
|
+
if (vercelConfig instanceof errors_ts_1.CantParseJSONFile) {
|
250570
|
+
throw vercelConfig;
|
250571
|
+
}
|
250572
|
+
if (!process.env.NOW_BUILDER) {
|
250573
|
+
// This validation is only necessary when
|
250574
|
+
// a user runs `vercel build` locally.
|
250575
|
+
const globFiles = await build_utils_1.glob('**', { cwd });
|
250576
|
+
const zeroConfig = await build_utils_1.detectBuilders(Object.keys(globFiles), pkg);
|
250577
|
+
const { reason } = await build_utils_1.detectFileSystemAPI({
|
250578
|
+
files: globFiles,
|
250579
|
+
projectSettings: project.settings,
|
250580
|
+
builders: zeroConfig.builders || [],
|
250581
|
+
pkg,
|
250582
|
+
vercelConfig,
|
250583
|
+
tag: '',
|
250584
|
+
enableFlag: true,
|
250585
|
+
});
|
250586
|
+
if (reason) {
|
250587
|
+
client.output.error(`${cmd_1.default(`${pkg_name_1.getPkgName()} build`)} failed: ${reason}`);
|
250588
|
+
return 1;
|
250589
|
+
}
|
250590
|
+
}
|
250397
250591
|
const framework = find_framework_1.findFramework(project.settings.framework);
|
250398
250592
|
// If this is undefined, we bail. If it is null, then findFramework should return "Other",
|
250399
250593
|
// so this should really never happen, but just in case....
|
@@ -251713,8 +251907,8 @@ exports.default = async (client) => {
|
|
251713
251907
|
if (!pathValidation.valid) {
|
251714
251908
|
return pathValidation.exitCode;
|
251715
251909
|
}
|
251716
|
-
const {
|
251717
|
-
const autoConfirm = argv['--confirm']
|
251910
|
+
const { path } = pathValidation;
|
251911
|
+
const autoConfirm = argv['--confirm'];
|
251718
251912
|
// deprecate --name
|
251719
251913
|
if (argv['--name']) {
|
251720
251914
|
output.print(`${emoji_1.prependEmoji(`The ${param_1.default('--name')} option is deprecated (https://vercel.link/name-flag)`, emoji_1.emoji('warning'))}\n`);
|
@@ -251752,8 +251946,7 @@ exports.default = async (client) => {
|
|
251752
251946
|
// user input.
|
251753
251947
|
const detectedProjectName = get_project_name_1.default({
|
251754
251948
|
argv,
|
251755
|
-
nowConfig: localConfig
|
251756
|
-
isFile,
|
251949
|
+
nowConfig: localConfig,
|
251757
251950
|
paths,
|
251758
251951
|
});
|
251759
251952
|
const projectOrNewProjectName = await input_project_1.default(client, org, detectedProjectName, autoConfirm);
|
@@ -251885,7 +252078,6 @@ exports.default = async (client) => {
|
|
251885
252078
|
rootDirectory,
|
251886
252079
|
quiet,
|
251887
252080
|
wantsPublic: argv['--public'] || localConfig.public,
|
251888
|
-
isFile,
|
251889
252081
|
type: null,
|
251890
252082
|
nowConfig: localConfig,
|
251891
252083
|
regions,
|
@@ -251898,7 +252090,7 @@ exports.default = async (client) => {
|
|
251898
252090
|
// Only add projectSettings for zero config deployments
|
251899
252091
|
createArgs.projectSettings = { sourceFilesOutsideRootDirectory };
|
251900
252092
|
}
|
251901
|
-
deployment = await create_deploy_1.default(client, now, contextName, [sourcePath], createArgs, org, !project
|
252093
|
+
deployment = await create_deploy_1.default(client, now, contextName, [sourcePath], createArgs, org, !project, path);
|
251902
252094
|
if (deployment.code === 'missing_project_settings') {
|
251903
252095
|
let { projectSettings, framework } = deployment;
|
251904
252096
|
if (rootDirectory) {
|
@@ -252011,7 +252203,7 @@ exports.default = async (client) => {
|
|
252011
252203
|
error_1.handleError(err);
|
252012
252204
|
return 1;
|
252013
252205
|
}
|
252014
|
-
return printDeploymentStatus(output, client, deployment, deployStamp, !argv['--no-clipboard']
|
252206
|
+
return printDeploymentStatus(output, client, deployment, deployStamp, !argv['--no-clipboard']);
|
252015
252207
|
};
|
252016
252208
|
function handleCreateDeployError(output, error, localConfig) {
|
252017
252209
|
if (error instanceof errors_ts_1.InvalidDomain) {
|
@@ -252077,7 +252269,7 @@ const addProcessEnv = async (log, env) => {
|
|
252077
252269
|
}
|
252078
252270
|
}
|
252079
252271
|
};
|
252080
|
-
const printDeploymentStatus = async (output, client, { readyState, alias: aliasList, aliasError, target, indications, url: deploymentUrl, aliasWarning, }, deployStamp, isClipboardEnabled
|
252272
|
+
const printDeploymentStatus = async (output, client, { readyState, alias: aliasList, aliasError, target, indications, url: deploymentUrl, aliasWarning, }, deployStamp, isClipboardEnabled) => {
|
252081
252273
|
indications = indications || [];
|
252082
252274
|
const isProdDeployment = target === 'production';
|
252083
252275
|
if (readyState !== 'READY') {
|
@@ -252091,7 +252283,7 @@ const printDeploymentStatus = async (output, client, { readyState, alias: aliasL
|
|
252091
252283
|
// print preview/production url
|
252092
252284
|
let previewUrl;
|
252093
252285
|
let isWildcard;
|
252094
|
-
if (
|
252286
|
+
if (Array.isArray(aliasList) && aliasList.length > 0) {
|
252095
252287
|
const previewUrlInfo = await get_preferred_preview_url_1.getPreferredPreviewURL(client, aliasList);
|
252096
252288
|
if (previewUrlInfo) {
|
252097
252289
|
isWildcard = previewUrlInfo.isWildcard;
|
@@ -261584,6 +261776,28 @@ class DevServer {
|
|
261584
261776
|
if (warnings && warnings.length > 0) {
|
261585
261777
|
warnings.forEach(warning => this.output.warn(warning.message, null, warning.link, warning.action));
|
261586
261778
|
}
|
261779
|
+
const { reason, metadata } = await build_utils_1.detectFileSystemAPI({
|
261780
|
+
files,
|
261781
|
+
builders: builders || [],
|
261782
|
+
projectSettings: projectSettings || this.projectSettings || {},
|
261783
|
+
vercelConfig,
|
261784
|
+
pkg,
|
261785
|
+
tag: '',
|
261786
|
+
enableFlag: true,
|
261787
|
+
});
|
261788
|
+
if (reason) {
|
261789
|
+
if (metadata.hasMiddleware) {
|
261790
|
+
this.output.error(`Detected middleware usage which requires the latest API. ${reason}`);
|
261791
|
+
await this.exit();
|
261792
|
+
}
|
261793
|
+
else if (metadata.plugins.length > 0) {
|
261794
|
+
this.output.error(`Detected CLI plugins which requires the latest API. ${reason}`);
|
261795
|
+
await this.exit();
|
261796
|
+
}
|
261797
|
+
else {
|
261798
|
+
this.output.warn(`Unable to use latest API. ${reason}`);
|
261799
|
+
}
|
261800
|
+
}
|
261587
261801
|
if (builders) {
|
261588
261802
|
if (this.devCommand) {
|
261589
261803
|
builders = builders.filter(filterFrontendBuilds);
|
@@ -265957,7 +266171,7 @@ exports.default = getPrefixedFlags;
|
|
265957
266171
|
|
265958
266172
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
265959
266173
|
const path_1 = __webpack_require__(85622);
|
265960
|
-
function getProjectName({ argv, nowConfig = {},
|
266174
|
+
function getProjectName({ argv, nowConfig = {}, paths = [], }) {
|
265961
266175
|
const nameCli = argv['--name'];
|
265962
266176
|
if (nameCli) {
|
265963
266177
|
return nameCli;
|
@@ -265965,9 +266179,6 @@ function getProjectName({ argv, nowConfig = {}, isFile = false, paths = [], }) {
|
|
265965
266179
|
if (nowConfig.name) {
|
265966
266180
|
return nowConfig.name;
|
265967
266181
|
}
|
265968
|
-
if (isFile || paths.length > 1) {
|
265969
|
-
return 'files';
|
265970
|
-
}
|
265971
266182
|
// Otherwise, use the name of the directory
|
265972
266183
|
return path_1.basename(paths[0] || '');
|
265973
266184
|
}
|
@@ -266790,7 +267001,7 @@ const get_project_by_id_or_name_1 = __importDefault(__webpack_require__(41123));
|
|
266790
267001
|
const chalk_1 = __importDefault(__webpack_require__(961));
|
266791
267002
|
const errors_ts_1 = __webpack_require__(60156);
|
266792
267003
|
const slugify_1 = __importDefault(__webpack_require__(98537));
|
266793
|
-
async function inputProject(client, org, detectedProjectName, autoConfirm) {
|
267004
|
+
async function inputProject(client, org, detectedProjectName, autoConfirm = false) {
|
266794
267005
|
const { output } = client;
|
266795
267006
|
const slugifiedName = slugify_1.default(detectedProjectName);
|
266796
267007
|
// attempt to auto-detect a project to link
|
@@ -266902,7 +267113,7 @@ const path_1 = __importDefault(__webpack_require__(85622));
|
|
266902
267113
|
const chalk_1 = __importDefault(__webpack_require__(961));
|
266903
267114
|
const inquirer_1 = __importDefault(__webpack_require__(64016));
|
266904
267115
|
const validate_paths_1 = __webpack_require__(54579);
|
266905
|
-
async function inputRootDirectory(cwd, output, autoConfirm) {
|
267116
|
+
async function inputRootDirectory(cwd, output, autoConfirm = false) {
|
266906
267117
|
if (autoConfirm) {
|
266907
267118
|
return null;
|
266908
267119
|
}
|
@@ -267860,7 +268071,6 @@ async function setupAndLink(client, path, { forceDelete = false, autoConfirm = f
|
|
267860
268071
|
withCache: undefined,
|
267861
268072
|
quiet,
|
267862
268073
|
wantsPublic: (localConfig === null || localConfig === void 0 ? void 0 : localConfig.public) || false,
|
267863
|
-
isFile,
|
267864
268074
|
nowConfig: localConfig,
|
267865
268075
|
regions: undefined,
|
267866
268076
|
meta: {},
|
@@ -267872,7 +268082,7 @@ async function setupAndLink(client, path, { forceDelete = false, autoConfirm = f
|
|
267872
268082
|
// Only add projectSettings for zero config deployments
|
267873
268083
|
createArgs.projectSettings = { sourceFilesOutsideRootDirectory };
|
267874
268084
|
}
|
267875
|
-
const deployment = await create_deploy_1.default(client, now, config.currentTeam || 'current user', [sourcePath], createArgs, org,
|
268085
|
+
const deployment = await create_deploy_1.default(client, now, config.currentTeam || 'current user', [sourcePath], createArgs, org, true, path);
|
267876
268086
|
if (!deployment ||
|
267877
268087
|
!('code' in deployment) ||
|
267878
268088
|
deployment.code !== 'missing_project_settings') {
|
@@ -270643,7 +270853,6 @@ const util_1 = __webpack_require__(31669);
|
|
270643
270853
|
const chalk_1 = __importDefault(__webpack_require__(961));
|
270644
270854
|
const os_1 = __webpack_require__(12087);
|
270645
270855
|
const confirm_1 = __importDefault(__webpack_require__(33564));
|
270646
|
-
const emoji_1 = __webpack_require__(41806);
|
270647
270856
|
const humanize_path_1 = __importDefault(__webpack_require__(45090));
|
270648
270857
|
const stat = util_1.promisify(fs_1.lstat);
|
270649
270858
|
/**
|
@@ -270680,9 +270889,12 @@ async function validatePaths(output, paths) {
|
|
270680
270889
|
output.print(`${chalk_1.default.red('Error!')} Could not find ${chalk_1.default.cyan(`“${humanize_path_1.default(path)}”`)}\n`);
|
270681
270890
|
return { valid: false, exitCode: 1 };
|
270682
270891
|
}
|
270683
|
-
|
270684
|
-
|
270685
|
-
|
270892
|
+
if (!pathStat.isDirectory()) {
|
270893
|
+
output.prettyError({
|
270894
|
+
message: 'Support for single file deployments has been removed.',
|
270895
|
+
link: 'https://vercel.link/no-single-file-deployments',
|
270896
|
+
});
|
270897
|
+
return { valid: false, exitCode: 1 };
|
270686
270898
|
}
|
270687
270899
|
// ask confirmation if the directory is home
|
270688
270900
|
if (path === os_1.homedir()) {
|
@@ -270692,7 +270904,7 @@ async function validatePaths(output, paths) {
|
|
270692
270904
|
return { valid: false, exitCode: 0 };
|
270693
270905
|
}
|
270694
270906
|
}
|
270695
|
-
return { valid: true, path
|
270907
|
+
return { valid: true, path };
|
270696
270908
|
}
|
270697
270909
|
exports.default = validatePaths;
|
270698
270910
|
|
@@ -271071,7 +271283,7 @@ module.exports = JSON.parse("[\"ac\",\"com.ac\",\"edu.ac\",\"gov.ac\",\"net.ac\"
|
|
271071
271283
|
/***/ ((module) => {
|
271072
271284
|
|
271073
271285
|
"use strict";
|
271074
|
-
module.exports = JSON.parse("{\"name\":\"vercel\",\"version\":\"23.1.3-canary.
|
271286
|
+
module.exports = JSON.parse("{\"name\":\"vercel\",\"version\":\"23.1.3-canary.68\",\"preferGlobal\":true,\"license\":\"Apache-2.0\",\"description\":\"The command-line interface for Vercel\",\"homepage\":\"https://vercel.com\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/vercel/vercel.git\",\"directory\":\"packages/cli\"},\"scripts\":{\"preinstall\":\"node ./scripts/preinstall.js\",\"test\":\"jest\",\"test-unit\":\"jest --coverage --verbose\",\"test-integration-cli\":\"rimraf test/fixtures/integration && ava test/integration.js --serial --fail-fast --verbose\",\"test-integration-dev\":\"ava test/dev/integration.js --serial --fail-fast --verbose\",\"prepublishOnly\":\"yarn build\",\"coverage\":\"codecov\",\"build\":\"node -r ts-eager/register ./scripts/build.ts\",\"build-dev\":\"node -r ts-eager/register ./scripts/build.ts --dev\"},\"bin\":{\"vc\":\"./dist/index.js\",\"vercel\":\"./dist/index.js\"},\"files\":[\"dist\",\"scripts/preinstall.js\"],\"ava\":{\"compileEnhancements\":false,\"extensions\":[\"ts\"],\"require\":[\"ts-node/register/transpile-only\",\"esm\"]},\"engines\":{\"node\":\">= 12\"},\"dependencies\":{\"@vercel/build-utils\":\"2.12.3-canary.43\",\"@vercel/go\":\"1.2.4-canary.4\",\"@vercel/node\":\"1.12.2-canary.7\",\"@vercel/python\":\"2.1.2-canary.2\",\"@vercel/ruby\":\"1.2.10-canary.0\",\"update-notifier\":\"4.1.0\",\"vercel-plugin-middleware\":\"0.0.0-canary.20\",\"vercel-plugin-node\":\"1.12.2-canary.35\"},\"devDependencies\":{\"@next/env\":\"11.1.2\",\"@sentry/node\":\"5.5.0\",\"@sindresorhus/slugify\":\"0.11.0\",\"@tootallnate/once\":\"1.1.2\",\"@types/ansi-escapes\":\"3.0.0\",\"@types/ansi-regex\":\"4.0.0\",\"@types/async-retry\":\"1.2.1\",\"@types/bytes\":\"3.0.0\",\"@types/chance\":\"1.1.3\",\"@types/debug\":\"0.0.31\",\"@types/dotenv\":\"6.1.1\",\"@types/escape-html\":\"0.0.20\",\"@types/express\":\"4.17.13\",\"@types/fs-extra\":\"9.0.13\",\"@types/glob\":\"7.1.1\",\"@types/http-proxy\":\"1.16.2\",\"@types/inquirer\":\"7.3.1\",\"@types/jest\":\"27.0.1\",\"@types/load-json-file\":\"2.0.7\",\"@types/mime-types\":\"2.1.0\",\"@types/minimatch\":\"3.0.3\",\"@types/mri\":\"1.1.0\",\"@types/ms\":\"0.7.30\",\"@types/node\":\"11.11.0\",\"@types/node-fetch\":\"2.5.10\",\"@types/npm-package-arg\":\"6.1.0\",\"@types/pluralize\":\"0.0.29\",\"@types/progress\":\"2.0.3\",\"@types/psl\":\"1.1.0\",\"@types/semver\":\"6.0.1\",\"@types/tar-fs\":\"1.16.1\",\"@types/text-table\":\"0.2.0\",\"@types/title\":\"3.4.1\",\"@types/universal-analytics\":\"0.4.2\",\"@types/update-notifier\":\"5.1.0\",\"@types/which\":\"1.3.2\",\"@types/write-json-file\":\"2.2.1\",\"@vercel/client\":\"10.2.3-canary.46\",\"@vercel/frameworks\":\"0.5.1-canary.17\",\"@vercel/ncc\":\"0.24.0\",\"@vercel/nft\":\"0.17.0\",\"@zeit/fun\":\"0.11.2\",\"@zeit/source-map-support\":\"0.6.2\",\"ajv\":\"6.12.2\",\"alpha-sort\":\"2.0.1\",\"ansi-escapes\":\"3.0.0\",\"ansi-regex\":\"3.0.0\",\"arg\":\"5.0.0\",\"async-listen\":\"1.2.0\",\"async-retry\":\"1.1.3\",\"async-sema\":\"2.1.4\",\"ava\":\"2.2.0\",\"bytes\":\"3.0.0\",\"chalk\":\"4.1.0\",\"chance\":\"1.1.7\",\"chokidar\":\"3.3.1\",\"clipboardy\":\"2.1.0\",\"codecov\":\"3.8.2\",\"cpy\":\"7.2.0\",\"credit-card\":\"3.0.1\",\"date-fns\":\"1.29.0\",\"debug\":\"3.1.0\",\"dot\":\"1.1.3\",\"dotenv\":\"4.0.0\",\"email-prompt\":\"0.3.2\",\"email-validator\":\"1.1.1\",\"epipebomb\":\"1.0.0\",\"escape-html\":\"1.0.3\",\"esm\":\"3.1.4\",\"execa\":\"3.2.0\",\"express\":\"4.17.1\",\"fast-deep-equal\":\"3.1.3\",\"fs-extra\":\"10.0.0\",\"get-port\":\"5.1.1\",\"glob\":\"7.1.2\",\"http-proxy\":\"1.18.1\",\"inquirer\":\"7.0.4\",\"is-docker\":\"2.2.1\",\"is-port-reachable\":\"3.0.0\",\"is-url\":\"1.2.2\",\"jaro-winkler\":\"0.2.8\",\"jsonlines\":\"0.1.1\",\"load-json-file\":\"3.0.0\",\"mime-types\":\"2.1.24\",\"minimatch\":\"3.0.4\",\"mri\":\"1.1.5\",\"ms\":\"2.1.2\",\"node-fetch\":\"2.6.1\",\"npm-package-arg\":\"6.1.0\",\"open\":\"8.2.0\",\"ora\":\"3.4.0\",\"pcre-to-regexp\":\"1.0.0\",\"pluralize\":\"7.0.0\",\"progress\":\"2.0.3\",\"promisepipe\":\"3.0.0\",\"psl\":\"1.1.31\",\"qr-image\":\"3.2.0\",\"raw-body\":\"2.4.1\",\"rimraf\":\"3.0.2\",\"semver\":\"5.5.0\",\"serve-handler\":\"6.1.1\",\"strip-ansi\":\"5.2.0\",\"stripe\":\"5.1.0\",\"tar-fs\":\"1.16.3\",\"test-listen\":\"1.1.0\",\"text-table\":\"0.2.0\",\"title\":\"3.4.1\",\"tmp-promise\":\"1.0.3\",\"tree-kill\":\"1.2.2\",\"ts-eager\":\"2.0.2\",\"ts-node\":\"8.3.0\",\"typescript\":\"4.3.4\",\"universal-analytics\":\"0.4.20\",\"utility-types\":\"2.1.0\",\"which\":\"2.0.2\",\"write-json-file\":\"2.2.0\",\"xdg-app-paths\":\"5.1.0\"},\"jest\":{\"preset\":\"ts-jest\",\"globals\":{\"ts-jest\":{\"diagnostics\":false,\"isolatedModules\":true}},\"verbose\":false,\"testEnvironment\":\"node\",\"testMatch\":[\"<rootDir>/test/**/*.test.ts\"]},\"gitHead\":\"01ea7b4b2a4acb47b6de5f593d9c33856caf4403\"}");
|
271075
271287
|
|
271076
271288
|
/***/ }),
|
271077
271289
|
|
@@ -271087,7 +271299,7 @@ module.exports = JSON.parse("{\"VISA\":\"Visa\",\"MASTERCARD\":\"MasterCard\",\"
|
|
271087
271299
|
/***/ ((module) => {
|
271088
271300
|
|
271089
271301
|
"use strict";
|
271090
|
-
module.exports = JSON.parse("{\"name\":\"@vercel/client\",\"version\":\"10.2.3-canary.
|
271302
|
+
module.exports = JSON.parse("{\"name\":\"@vercel/client\",\"version\":\"10.2.3-canary.46\",\"main\":\"dist/index.js\",\"typings\":\"dist/index.d.ts\",\"homepage\":\"https://vercel.com\",\"license\":\"MIT\",\"files\":[\"dist\"],\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/vercel/vercel.git\",\"directory\":\"packages/client\"},\"scripts\":{\"build\":\"tsc\",\"test-integration-once\":\"jest --verbose --runInBand --bail tests/create-deployment.test.ts tests/create-legacy-deployment.test.ts tests/paths.test.ts\",\"test-unit\":\"jest --verbose --runInBand --bail tests/unit.*test.*\"},\"engines\":{\"node\":\">= 12\"},\"devDependencies\":{\"@types/async-retry\":\"1.4.1\",\"@types/fs-extra\":\"7.0.0\",\"@types/jest\":\"27.0.1\",\"@types/ms\":\"0.7.30\",\"@types/node\":\"12.0.4\",\"@types/node-fetch\":\"2.5.4\",\"@types/recursive-readdir\":\"2.2.0\",\"typescript\":\"4.3.4\"},\"jest\":{\"preset\":\"ts-jest\",\"testEnvironment\":\"node\",\"verbose\":false,\"setupFilesAfterEnv\":[\"<rootDir>/tests/setup/index.ts\"]},\"dependencies\":{\"@vercel/build-utils\":\"2.12.3-canary.43\",\"@zeit/fetch\":\"5.2.0\",\"async-retry\":\"1.2.3\",\"async-sema\":\"3.0.0\",\"fs-extra\":\"8.0.1\",\"ignore\":\"4.0.6\",\"ms\":\"2.1.2\",\"node-fetch\":\"2.6.1\",\"querystring\":\"^0.2.0\",\"recursive-readdir\":\"2.2.2\",\"sleep-promise\":\"8.0.1\"},\"gitHead\":\"01ea7b4b2a4acb47b6de5f593d9c33856caf4403\"}");
|
271091
271303
|
|
271092
271304
|
/***/ }),
|
271093
271305
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vercel",
|
3
|
-
"version": "23.1.3-canary.
|
3
|
+
"version": "23.1.3-canary.68",
|
4
4
|
"preferGlobal": true,
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"description": "The command-line interface for Vercel",
|
@@ -43,14 +43,14 @@
|
|
43
43
|
"node": ">= 12"
|
44
44
|
},
|
45
45
|
"dependencies": {
|
46
|
-
"@vercel/build-utils": "2.12.3-canary.
|
46
|
+
"@vercel/build-utils": "2.12.3-canary.43",
|
47
47
|
"@vercel/go": "1.2.4-canary.4",
|
48
48
|
"@vercel/node": "1.12.2-canary.7",
|
49
49
|
"@vercel/python": "2.1.2-canary.2",
|
50
50
|
"@vercel/ruby": "1.2.10-canary.0",
|
51
51
|
"update-notifier": "4.1.0",
|
52
|
-
"vercel-plugin-middleware": "0.0.0-canary.
|
53
|
-
"vercel-plugin-node": "1.12.2-canary.
|
52
|
+
"vercel-plugin-middleware": "0.0.0-canary.20",
|
53
|
+
"vercel-plugin-node": "1.12.2-canary.35"
|
54
54
|
},
|
55
55
|
"devDependencies": {
|
56
56
|
"@next/env": "11.1.2",
|
@@ -90,6 +90,7 @@
|
|
90
90
|
"@types/update-notifier": "5.1.0",
|
91
91
|
"@types/which": "1.3.2",
|
92
92
|
"@types/write-json-file": "2.2.1",
|
93
|
+
"@vercel/client": "10.2.3-canary.46",
|
93
94
|
"@vercel/frameworks": "0.5.1-canary.17",
|
94
95
|
"@vercel/ncc": "0.24.0",
|
95
96
|
"@vercel/nft": "0.17.0",
|
@@ -184,5 +185,5 @@
|
|
184
185
|
"<rootDir>/test/**/*.test.ts"
|
185
186
|
]
|
186
187
|
},
|
187
|
-
"gitHead": "
|
188
|
+
"gitHead": "01ea7b4b2a4acb47b6de5f593d9c33856caf4403"
|
188
189
|
}
|