vercel 24.2.4-canary.0 → 24.2.5-canary.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 +1097 -36
- package/package.json +19 -13
package/dist/index.js
CHANGED
@@ -225335,6 +225335,408 @@ async function prompt(output, message) {
|
|
225335
225335
|
}
|
225336
225336
|
|
225337
225337
|
|
225338
|
+
/***/ }),
|
225339
|
+
|
225340
|
+
/***/ 11004:
|
225341
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
225342
|
+
|
225343
|
+
"use strict";
|
225344
|
+
|
225345
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
225346
|
+
if (k2 === undefined) k2 = k;
|
225347
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
225348
|
+
}) : (function(o, m, k, k2) {
|
225349
|
+
if (k2 === undefined) k2 = k;
|
225350
|
+
o[k2] = m[k];
|
225351
|
+
}));
|
225352
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
225353
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
225354
|
+
}) : function(o, v) {
|
225355
|
+
o["default"] = v;
|
225356
|
+
});
|
225357
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
225358
|
+
if (mod && mod.__esModule) return mod;
|
225359
|
+
var result = {};
|
225360
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
225361
|
+
__setModuleDefault(result, mod);
|
225362
|
+
return result;
|
225363
|
+
};
|
225364
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
225365
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
225366
|
+
};
|
225367
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
225368
|
+
const fs_extra_1 = __importDefault(__webpack_require__(45392));
|
225369
|
+
const chalk_1 = __importDefault(__webpack_require__(961));
|
225370
|
+
const dotenv_1 = __importDefault(__webpack_require__(26397));
|
225371
|
+
const path_1 = __webpack_require__(85622);
|
225372
|
+
const build_utils_1 = __webpack_require__(3131);
|
225373
|
+
const minimatch_1 = __importDefault(__webpack_require__(99566));
|
225374
|
+
const routing_utils_1 = __webpack_require__(72948);
|
225375
|
+
const pull_1 = __importDefault(__webpack_require__(6277));
|
225376
|
+
const get_files_1 = __webpack_require__(23174);
|
225377
|
+
const get_args_1 = __importDefault(__webpack_require__(87612));
|
225378
|
+
const cmd_1 = __importDefault(__webpack_require__(87350));
|
225379
|
+
const cli = __importStar(__webpack_require__(98106));
|
225380
|
+
const pkg_1 = __importDefault(__webpack_require__(80984));
|
225381
|
+
const read_json_file_1 = __importDefault(__webpack_require__(16898));
|
225382
|
+
const errors_ts_1 = __webpack_require__(60156);
|
225383
|
+
const project_settings_1 = __webpack_require__(42697);
|
225384
|
+
const link_1 = __webpack_require__(67630);
|
225385
|
+
const confirm_1 = __importDefault(__webpack_require__(33564));
|
225386
|
+
const emoji_1 = __webpack_require__(41806);
|
225387
|
+
const stamp_1 = __importDefault(__webpack_require__(92205));
|
225388
|
+
const write_build_result_1 = __webpack_require__(28689);
|
225389
|
+
const import_builders_1 = __webpack_require__(57049);
|
225390
|
+
const help = () => {
|
225391
|
+
return console.log(`
|
225392
|
+
${chalk_1.default.bold(`${cli.logo} ${cli.name} build`)}
|
225393
|
+
|
225394
|
+
${chalk_1.default.dim('Options:')}
|
225395
|
+
|
225396
|
+
-h, --help Output usage information
|
225397
|
+
-A ${chalk_1.default.bold.underline('FILE')}, --local-config=${chalk_1.default.bold.underline('FILE')} Path to the local ${'`vercel.json`'} file
|
225398
|
+
-Q ${chalk_1.default.bold.underline('DIR')}, --global-config=${chalk_1.default.bold.underline('DIR')} Path to the global ${'`.vercel`'} directory
|
225399
|
+
--cwd [path] The current working directory
|
225400
|
+
--prod Build a production deployment
|
225401
|
+
-d, --debug Debug mode [off]
|
225402
|
+
-y, --yes Skip the confirmation prompt
|
225403
|
+
|
225404
|
+
${chalk_1.default.dim('Examples:')}
|
225405
|
+
|
225406
|
+
${chalk_1.default.gray('–')} Build the project
|
225407
|
+
|
225408
|
+
${chalk_1.default.cyan(`$ ${cli.name} build`)}
|
225409
|
+
${chalk_1.default.cyan(`$ ${cli.name} build --cwd ./path-to-project`)}
|
225410
|
+
`);
|
225411
|
+
};
|
225412
|
+
async function main(client) {
|
225413
|
+
var _a, _b, _c, _d;
|
225414
|
+
const { output } = client;
|
225415
|
+
// Ensure that `vc build` is not being invoked recursively
|
225416
|
+
if (process.env.__VERCEL_BUILD_RUNNING) {
|
225417
|
+
output.error(`${cmd_1.default(`${cli.name} build`)} must not recursively invoke itself. Check the Build Command in the Project Settings or the ${cmd_1.default('build')} script in ${cmd_1.default('package.json')}`);
|
225418
|
+
output.error(`Learn More: https://vercel.link/recursive-invocation-of-commands`);
|
225419
|
+
return 1;
|
225420
|
+
}
|
225421
|
+
else {
|
225422
|
+
process.env.__VERCEL_BUILD_RUNNING = '1';
|
225423
|
+
}
|
225424
|
+
// Parse CLI args
|
225425
|
+
const argv = get_args_1.default(client.argv.slice(2), {
|
225426
|
+
'--cwd': String,
|
225427
|
+
'--prod': Boolean,
|
225428
|
+
});
|
225429
|
+
if (argv['--help']) {
|
225430
|
+
help();
|
225431
|
+
return 2;
|
225432
|
+
}
|
225433
|
+
// Set the working directory if necessary
|
225434
|
+
if (argv['--cwd']) {
|
225435
|
+
process.chdir(argv['--cwd']);
|
225436
|
+
}
|
225437
|
+
const cwd = process.cwd();
|
225438
|
+
// TODO: read project settings from the API, fall back to local `project.json` if that fails
|
225439
|
+
// Read project settings, and pull them from Vercel if necessary
|
225440
|
+
let project = await project_settings_1.readProjectSettings(path_1.join(cwd, link_1.VERCEL_DIR));
|
225441
|
+
const isTTY = process.stdin.isTTY;
|
225442
|
+
while (!(project === null || project === void 0 ? void 0 : project.settings)) {
|
225443
|
+
if (!isTTY) {
|
225444
|
+
client.output.print(`No Project Settings found locally. Run ${cli.getCommandName('pull --yes')} to retreive them.`);
|
225445
|
+
return 1;
|
225446
|
+
}
|
225447
|
+
const confirmed = await confirm_1.default(`No Project Settings found locally. Run ${cli.getCommandName('pull')} for retrieving them?`, true);
|
225448
|
+
if (!confirmed) {
|
225449
|
+
client.output.print(`Aborted. No Project Settings retrieved.\n`);
|
225450
|
+
return 0;
|
225451
|
+
}
|
225452
|
+
client.argv = [];
|
225453
|
+
const result = await pull_1.default(client);
|
225454
|
+
if (result !== 0) {
|
225455
|
+
return result;
|
225456
|
+
}
|
225457
|
+
project = await project_settings_1.readProjectSettings(path_1.join(cwd, link_1.VERCEL_DIR));
|
225458
|
+
}
|
225459
|
+
// Build `target` influences which environment variables will be used
|
225460
|
+
const target = argv['--prod'] ? 'production' : 'preview';
|
225461
|
+
// TODO: load env vars from the API, fall back to local files if that fails
|
225462
|
+
const envPath = await checkExists([
|
225463
|
+
path_1.join(cwd, link_1.VERCEL_DIR, `.env.${target}.local`),
|
225464
|
+
path_1.join(cwd, `.env`),
|
225465
|
+
]);
|
225466
|
+
if (envPath) {
|
225467
|
+
dotenv_1.default.config({ path: envPath, debug: client.output.isDebugEnabled() });
|
225468
|
+
output.log(`Loaded env from "${path_1.relative(cwd, envPath)}"`);
|
225469
|
+
}
|
225470
|
+
// Some build processes use this env var to platform detect Vercel
|
225471
|
+
process.env.NOW_BUILDER = '1';
|
225472
|
+
const workPath = path_1.join(cwd, project.settings.rootDirectory || '.');
|
225473
|
+
// Load `package.json` and `vercel.json` files
|
225474
|
+
const [pkg, vercelConfig] = await Promise.all([
|
225475
|
+
read_json_file_1.default(path_1.join(workPath, 'package.json')),
|
225476
|
+
read_json_file_1.default(path_1.join(workPath, 'vercel.json')).then(config => config || read_json_file_1.default(path_1.join(workPath, 'now.json'))),
|
225477
|
+
]);
|
225478
|
+
if (pkg instanceof errors_ts_1.CantParseJSONFile)
|
225479
|
+
throw pkg;
|
225480
|
+
if (vercelConfig instanceof errors_ts_1.CantParseJSONFile)
|
225481
|
+
throw vercelConfig;
|
225482
|
+
// Get a list of source files
|
225483
|
+
const files = (await get_files_1.staticFiles(workPath, client)).map(f => path_1.relative(workPath, f));
|
225484
|
+
const routesResult = routing_utils_1.getTransformedRoutes({ nowConfig: vercelConfig || {} });
|
225485
|
+
if (routesResult.error) {
|
225486
|
+
output.prettyError(routesResult.error);
|
225487
|
+
return 1;
|
225488
|
+
}
|
225489
|
+
if ((vercelConfig === null || vercelConfig === void 0 ? void 0 : vercelConfig.builds) && vercelConfig.functions) {
|
225490
|
+
output.prettyError({
|
225491
|
+
message: 'The `functions` property cannot be used in conjunction with the `builds` property. Please remove one of them.',
|
225492
|
+
link: 'https://vercel.link/functions-and-builds',
|
225493
|
+
});
|
225494
|
+
return 1;
|
225495
|
+
}
|
225496
|
+
let builds = (vercelConfig === null || vercelConfig === void 0 ? void 0 : vercelConfig.builds) || [];
|
225497
|
+
let zeroConfigRoutes = [];
|
225498
|
+
if (builds.length > 0) {
|
225499
|
+
output.warn('Due to `builds` existing in your configuration file, the Build and Development Settings defined in your Project Settings will not apply. Learn More: https://vercel.link/unused-build-settings');
|
225500
|
+
builds = builds.map(b => expandBuild(files, b)).flat();
|
225501
|
+
}
|
225502
|
+
else {
|
225503
|
+
// Zero config
|
225504
|
+
// Detect the Vercel Builders that will need to be invoked
|
225505
|
+
const detectedBuilders = await build_utils_1.detectBuilders(files, pkg, {
|
225506
|
+
...vercelConfig,
|
225507
|
+
projectSettings: project.settings,
|
225508
|
+
featHandleMiss: true,
|
225509
|
+
});
|
225510
|
+
if (detectedBuilders.errors && detectedBuilders.errors.length > 0) {
|
225511
|
+
output.prettyError(detectedBuilders.errors[0]);
|
225512
|
+
return 1;
|
225513
|
+
}
|
225514
|
+
for (const w of detectedBuilders.warnings) {
|
225515
|
+
console.log(`Warning: ${w.message} ${w.action || 'Learn More'}: ${w.link}`);
|
225516
|
+
}
|
225517
|
+
if (detectedBuilders.builders) {
|
225518
|
+
builds = detectedBuilders.builders;
|
225519
|
+
}
|
225520
|
+
else {
|
225521
|
+
builds = [{ src: '**', use: '@vercel/static' }];
|
225522
|
+
}
|
225523
|
+
zeroConfigRoutes.push(...(detectedBuilders.redirectRoutes || []));
|
225524
|
+
zeroConfigRoutes.push(...routing_utils_1.appendRoutesToPhase({
|
225525
|
+
routes: [],
|
225526
|
+
newRoutes: detectedBuilders.rewriteRoutes,
|
225527
|
+
phase: 'filesystem',
|
225528
|
+
}));
|
225529
|
+
zeroConfigRoutes = routing_utils_1.appendRoutesToPhase({
|
225530
|
+
routes: zeroConfigRoutes,
|
225531
|
+
newRoutes: detectedBuilders.errorRoutes,
|
225532
|
+
phase: 'error',
|
225533
|
+
});
|
225534
|
+
zeroConfigRoutes.push(...(detectedBuilders.defaultRoutes || []));
|
225535
|
+
}
|
225536
|
+
const builderSpecs = new Set(builds.map(b => b.use));
|
225537
|
+
const buildersWithPkgs = await import_builders_1.importBuilders(builderSpecs, cwd, output);
|
225538
|
+
// Populate Files -> FileFsRef mapping
|
225539
|
+
const filesMap = {};
|
225540
|
+
for (const path of files) {
|
225541
|
+
const fsPath = path_1.join(workPath, path);
|
225542
|
+
const { mode } = await fs_extra_1.default.stat(fsPath);
|
225543
|
+
filesMap[path] = new build_utils_1.FileFsRef({ mode, fsPath });
|
225544
|
+
}
|
225545
|
+
// Delete output directory from potential previous build
|
225546
|
+
await fs_extra_1.default.remove(write_build_result_1.OUTPUT_DIR);
|
225547
|
+
const buildStamp = stamp_1.default();
|
225548
|
+
// Create fresh new output directory
|
225549
|
+
await fs_extra_1.default.mkdirp(write_build_result_1.OUTPUT_DIR);
|
225550
|
+
const ops = [];
|
225551
|
+
// Write the `detectedBuilders` result to output dir
|
225552
|
+
ops.push(fs_extra_1.default.writeJSON(path_1.join(write_build_result_1.OUTPUT_DIR, 'builds.json'), {
|
225553
|
+
'//': 'This file was generated by the `vercel build` command. It is not part of the Build Output API.',
|
225554
|
+
target,
|
225555
|
+
builds: builds.map(build => {
|
225556
|
+
const builderWithPkg = buildersWithPkgs.get(build.use);
|
225557
|
+
if (!builderWithPkg) {
|
225558
|
+
throw new Error(`Failed to load Builder "${build.use}"`);
|
225559
|
+
}
|
225560
|
+
const { builder, pkg: builderPkg } = builderWithPkg;
|
225561
|
+
return {
|
225562
|
+
require: builderPkg.name,
|
225563
|
+
apiVersion: builder.version,
|
225564
|
+
...build,
|
225565
|
+
};
|
225566
|
+
}),
|
225567
|
+
}, {
|
225568
|
+
spaces: 2,
|
225569
|
+
}));
|
225570
|
+
// The `meta` config property is re-used for each Builder
|
225571
|
+
// invocation so that Builders can share state between
|
225572
|
+
// subsequent entrypoint builds.
|
225573
|
+
const meta = {
|
225574
|
+
skipDownload: true,
|
225575
|
+
cliVersion: pkg_1.default.version,
|
225576
|
+
};
|
225577
|
+
// Execute Builders for detected entrypoints
|
225578
|
+
// TODO: parallelize builds
|
225579
|
+
const buildResults = new Map();
|
225580
|
+
const overrides = [];
|
225581
|
+
for (const build of builds) {
|
225582
|
+
if (typeof build.src !== 'string')
|
225583
|
+
continue;
|
225584
|
+
const builderWithPkg = buildersWithPkgs.get(build.use);
|
225585
|
+
if (!builderWithPkg) {
|
225586
|
+
throw new Error(`Failed to load Builder "${build.use}"`);
|
225587
|
+
}
|
225588
|
+
const { builder, pkg: builderPkg } = builderWithPkg;
|
225589
|
+
const buildConfig = {
|
225590
|
+
outputDirectory: (_a = project.settings.outputDirectory) !== null && _a !== void 0 ? _a : undefined,
|
225591
|
+
...build.config,
|
225592
|
+
projectSettings: project.settings,
|
225593
|
+
installCommand: (_b = project.settings.installCommand) !== null && _b !== void 0 ? _b : undefined,
|
225594
|
+
devCommand: (_c = project.settings.devCommand) !== null && _c !== void 0 ? _c : undefined,
|
225595
|
+
buildCommand: (_d = project.settings.buildCommand) !== null && _d !== void 0 ? _d : undefined,
|
225596
|
+
framework: project.settings.framework,
|
225597
|
+
nodeVersion: project.settings.nodeVersion,
|
225598
|
+
};
|
225599
|
+
const repoRootPath = cwd === workPath ? undefined : cwd;
|
225600
|
+
const buildOptions = {
|
225601
|
+
files: filesMap,
|
225602
|
+
entrypoint: build.src,
|
225603
|
+
workPath,
|
225604
|
+
repoRootPath,
|
225605
|
+
config: buildConfig,
|
225606
|
+
meta,
|
225607
|
+
};
|
225608
|
+
output.debug(`Building entrypoint "${build.src}" with "${builderPkg.name}"`);
|
225609
|
+
const buildResult = await builder.build(buildOptions);
|
225610
|
+
// Store the build result to generate the final `config.json` after
|
225611
|
+
// all builds have completed
|
225612
|
+
buildResults.set(build, buildResult);
|
225613
|
+
// Start flushing the file outputs to the filesystem asynchronously
|
225614
|
+
ops.push(write_build_result_1.writeBuildResult(buildResult, build, builder, builderPkg, vercelConfig === null || vercelConfig === void 0 ? void 0 : vercelConfig.cleanUrls).then(override => {
|
225615
|
+
if (override)
|
225616
|
+
overrides.push(override);
|
225617
|
+
}, err => err));
|
225618
|
+
}
|
225619
|
+
// Wait for filesystem operations to complete
|
225620
|
+
// TODO render progress bar?
|
225621
|
+
let hadError = false;
|
225622
|
+
const errors = await Promise.all(ops);
|
225623
|
+
for (const error of errors) {
|
225624
|
+
if (error) {
|
225625
|
+
hadError = true;
|
225626
|
+
output.prettyError(error);
|
225627
|
+
}
|
225628
|
+
}
|
225629
|
+
if (hadError)
|
225630
|
+
return 1;
|
225631
|
+
// Merge existing `config.json` file into the one that will be produced
|
225632
|
+
const configPath = path_1.join(write_build_result_1.OUTPUT_DIR, 'config.json');
|
225633
|
+
// TODO: properly type
|
225634
|
+
const existingConfig = await read_json_file_1.default(configPath);
|
225635
|
+
if (existingConfig instanceof errors_ts_1.CantParseJSONFile) {
|
225636
|
+
throw existingConfig;
|
225637
|
+
}
|
225638
|
+
if (existingConfig) {
|
225639
|
+
if (existingConfig.overrides) {
|
225640
|
+
overrides.push(existingConfig.overrides);
|
225641
|
+
}
|
225642
|
+
// Find the `Build` entry for this config file and update the build result
|
225643
|
+
for (const [build, buildResult] of buildResults.entries()) {
|
225644
|
+
if ('buildOutputPath' in buildResult) {
|
225645
|
+
output.debug(`Using "config.json" for "${build.use}`);
|
225646
|
+
buildResults.set(build, existingConfig);
|
225647
|
+
break;
|
225648
|
+
}
|
225649
|
+
}
|
225650
|
+
}
|
225651
|
+
const builderRoutes = Array.from(buildResults.entries())
|
225652
|
+
.filter(b => 'routes' in b[1] && Array.isArray(b[1].routes))
|
225653
|
+
.map(b => {
|
225654
|
+
return {
|
225655
|
+
use: b[0].use,
|
225656
|
+
entrypoint: b[0].src,
|
225657
|
+
routes: b[1].routes,
|
225658
|
+
};
|
225659
|
+
});
|
225660
|
+
if (zeroConfigRoutes.length) {
|
225661
|
+
builderRoutes.unshift({
|
225662
|
+
use: '@vercel/zero-config-routes',
|
225663
|
+
entrypoint: '/',
|
225664
|
+
routes: zeroConfigRoutes,
|
225665
|
+
});
|
225666
|
+
}
|
225667
|
+
const mergedRoutes = routing_utils_1.mergeRoutes({
|
225668
|
+
userRoutes: routesResult.routes,
|
225669
|
+
builds: builderRoutes,
|
225670
|
+
});
|
225671
|
+
const mergedImages = mergeImages(buildResults.values());
|
225672
|
+
const mergedWildcard = mergeWildcard(buildResults.values());
|
225673
|
+
const mergedOverrides = overrides.length > 0 ? Object.assign({}, ...overrides) : undefined;
|
225674
|
+
// Write out the final `config.json` file based on the
|
225675
|
+
// user configuration and Builder build results
|
225676
|
+
// TODO: properly type
|
225677
|
+
const config = {
|
225678
|
+
version: 3,
|
225679
|
+
routes: mergedRoutes,
|
225680
|
+
images: mergedImages,
|
225681
|
+
wildcard: mergedWildcard,
|
225682
|
+
overrides: mergedOverrides,
|
225683
|
+
};
|
225684
|
+
await fs_extra_1.default.writeJSON(path_1.join(write_build_result_1.OUTPUT_DIR, 'config.json'), config, { spaces: 2 });
|
225685
|
+
output.print(`${emoji_1.prependEmoji(`Build Completed in ${chalk_1.default.bold(write_build_result_1.OUTPUT_DIR)} ${chalk_1.default.gray(buildStamp())}`, emoji_1.emoji('success'))}\n`);
|
225686
|
+
return 0;
|
225687
|
+
}
|
225688
|
+
exports.default = main;
|
225689
|
+
function expandBuild(files, build) {
|
225690
|
+
if (!build.src)
|
225691
|
+
return [];
|
225692
|
+
let pattern = build.src;
|
225693
|
+
if (pattern[0] === '/') {
|
225694
|
+
// Remove a leading slash so that the globbing is relative
|
225695
|
+
// to `cwd` instead of the root of the filesystem.
|
225696
|
+
pattern = pattern.substring(1);
|
225697
|
+
}
|
225698
|
+
const matches = files.filter(name => name === pattern || minimatch_1.default(name, pattern, { dot: true }));
|
225699
|
+
return matches.map(m => {
|
225700
|
+
return {
|
225701
|
+
...build,
|
225702
|
+
src: m,
|
225703
|
+
};
|
225704
|
+
});
|
225705
|
+
}
|
225706
|
+
function mergeImages(buildResults) {
|
225707
|
+
let images = undefined;
|
225708
|
+
for (const result of buildResults) {
|
225709
|
+
if ('images' in result && result.images) {
|
225710
|
+
images = Object.assign({} || images, result.images);
|
225711
|
+
}
|
225712
|
+
}
|
225713
|
+
return images;
|
225714
|
+
}
|
225715
|
+
function mergeWildcard(buildResults) {
|
225716
|
+
let wildcard = undefined;
|
225717
|
+
for (const result of buildResults) {
|
225718
|
+
if ('wildcard' in result && result.wildcard) {
|
225719
|
+
if (!wildcard)
|
225720
|
+
wildcard = [];
|
225721
|
+
wildcard.push(...result.wildcard);
|
225722
|
+
}
|
225723
|
+
}
|
225724
|
+
return wildcard;
|
225725
|
+
}
|
225726
|
+
async function checkExists(paths) {
|
225727
|
+
for (const path of paths) {
|
225728
|
+
try {
|
225729
|
+
await fs_extra_1.default.stat(path);
|
225730
|
+
return path;
|
225731
|
+
}
|
225732
|
+
catch (err) {
|
225733
|
+
if (err.code !== 'ENOENT')
|
225734
|
+
throw err;
|
225735
|
+
}
|
225736
|
+
}
|
225737
|
+
}
|
225738
|
+
|
225739
|
+
|
225338
225740
|
/***/ }),
|
225339
225741
|
|
225340
225742
|
/***/ 43201:
|
@@ -228871,6 +229273,7 @@ exports.default = new Map([
|
|
228871
229273
|
['aliases', 'alias'],
|
228872
229274
|
['billing', 'billing'],
|
228873
229275
|
['bisect', 'bisect'],
|
229276
|
+
['build', 'build'],
|
228874
229277
|
['cc', 'billing'],
|
228875
229278
|
['cert', 'certs'],
|
228876
229279
|
['certs', 'certs'],
|
@@ -231631,7 +232034,7 @@ const main = async () => {
|
|
231631
232034
|
// * a path to deploy (as in: `vercel path/`)
|
231632
232035
|
// * a subcommand (as in: `vercel ls`)
|
231633
232036
|
const targetOrSubcommand = argv._[2];
|
231634
|
-
const betaCommands = [];
|
232037
|
+
const betaCommands = ['build'];
|
231635
232038
|
if (betaCommands.includes(targetOrSubcommand)) {
|
231636
232039
|
console.log(`${chalk_1.default.grey(`${pkg_name_1.getTitleName()} CLI ${pkg_1.default.version} ${targetOrSubcommand} (beta) — https://vercel.com/feedback`)}`);
|
231637
232040
|
}
|
@@ -231708,7 +232111,14 @@ const main = async () => {
|
|
231708
232111
|
return 1;
|
231709
232112
|
}
|
231710
232113
|
let authConfig = null;
|
231711
|
-
const subcommandsWithoutToken = [
|
232114
|
+
const subcommandsWithoutToken = [
|
232115
|
+
'login',
|
232116
|
+
'logout',
|
232117
|
+
'help',
|
232118
|
+
'init',
|
232119
|
+
'update',
|
232120
|
+
'build',
|
232121
|
+
];
|
231712
232122
|
if (authConfigExists) {
|
231713
232123
|
try {
|
231714
232124
|
authConfig = configFiles.readAuthConfigFile();
|
@@ -231876,6 +232286,7 @@ const main = async () => {
|
|
231876
232286
|
if (typeof scope === 'string' &&
|
231877
232287
|
targetCommand !== 'login' &&
|
231878
232288
|
targetCommand !== 'dev' &&
|
232289
|
+
targetCommand !== 'build' &&
|
231879
232290
|
!(targetCommand === 'teams' && argv._[3] !== 'invite')) {
|
231880
232291
|
let user = null;
|
231881
232292
|
try {
|
@@ -231938,6 +232349,9 @@ const main = async () => {
|
|
231938
232349
|
case 'bisect':
|
231939
232350
|
func = __webpack_require__(76792).default;
|
231940
232351
|
break;
|
232352
|
+
case 'build':
|
232353
|
+
func = __webpack_require__(11004).default;
|
232354
|
+
break;
|
231941
232355
|
case 'certs':
|
231942
232356
|
func = __webpack_require__(20490).default;
|
231943
232357
|
break;
|
@@ -232463,6 +232877,662 @@ const isFailed = ({ readyState }) => readyState.endsWith('_ERROR') || readyState
|
|
232463
232877
|
exports.isFailed = isFailed;
|
232464
232878
|
|
232465
232879
|
|
232880
|
+
/***/ }),
|
232881
|
+
|
232882
|
+
/***/ 57049:
|
232883
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
232884
|
+
|
232885
|
+
"use strict";
|
232886
|
+
|
232887
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
232888
|
+
if (k2 === undefined) k2 = k;
|
232889
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
232890
|
+
}) : (function(o, m, k, k2) {
|
232891
|
+
if (k2 === undefined) k2 = k;
|
232892
|
+
o[k2] = m[k];
|
232893
|
+
}));
|
232894
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
232895
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
232896
|
+
}) : function(o, v) {
|
232897
|
+
o["default"] = v;
|
232898
|
+
});
|
232899
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
232900
|
+
if (mod && mod.__esModule) return mod;
|
232901
|
+
var result = {};
|
232902
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
232903
|
+
__setModuleDefault(result, mod);
|
232904
|
+
return result;
|
232905
|
+
};
|
232906
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
232907
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
232908
|
+
};
|
232909
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
232910
|
+
exports.importBuilders = void 0;
|
232911
|
+
const npm_package_arg_1 = __importDefault(__webpack_require__(79726));
|
232912
|
+
const semver_1 = __webpack_require__(92879);
|
232913
|
+
const path_1 = __webpack_require__(85622);
|
232914
|
+
const fs_extra_1 = __webpack_require__(45392);
|
232915
|
+
const build_utils_1 = __webpack_require__(3131);
|
232916
|
+
const staticBuilder = __importStar(__webpack_require__(33274));
|
232917
|
+
const link_1 = __webpack_require__(67630);
|
232918
|
+
const read_json_file_1 = __importDefault(__webpack_require__(16898));
|
232919
|
+
const errors_ts_1 = __webpack_require__(60156);
|
232920
|
+
/**
|
232921
|
+
* Imports the specified Vercel Builders, installing any missing ones
|
232922
|
+
* into `.vercel/builders` if necessary.
|
232923
|
+
*/
|
232924
|
+
async function importBuilders(builderSpecs, cwd, output) {
|
232925
|
+
const results = new Map();
|
232926
|
+
const resolvedSpecs = new Map();
|
232927
|
+
const buildersDir = path_1.join(cwd, link_1.VERCEL_DIR, 'builders');
|
232928
|
+
const buildersPkgPath = path_1.join(buildersDir, 'package.json');
|
232929
|
+
do {
|
232930
|
+
const buildersToAdd = new Set();
|
232931
|
+
for (const spec of builderSpecs) {
|
232932
|
+
const resolvedSpec = resolvedSpecs.get(spec) || spec;
|
232933
|
+
const parsed = npm_package_arg_1.default(resolvedSpec);
|
232934
|
+
let { name } = parsed;
|
232935
|
+
if (!name) {
|
232936
|
+
// A URL was specified - will need to install it and resolve the
|
232937
|
+
// proper package name from the written `package.json` file
|
232938
|
+
buildersToAdd.add(spec);
|
232939
|
+
continue;
|
232940
|
+
}
|
232941
|
+
if (name === '@vercel/static') {
|
232942
|
+
// `@vercel/static` is a special-case built-in builder
|
232943
|
+
results.set(name, {
|
232944
|
+
builder: staticBuilder,
|
232945
|
+
pkg: { name },
|
232946
|
+
path: '',
|
232947
|
+
pkgPath: '',
|
232948
|
+
});
|
232949
|
+
continue;
|
232950
|
+
}
|
232951
|
+
try {
|
232952
|
+
let pkgPath;
|
232953
|
+
let builderPkg;
|
232954
|
+
try {
|
232955
|
+
// First try `.vercel/builders`. The package name should always be available
|
232956
|
+
// at the top-level of `node_modules` since CLI is installing those directly.
|
232957
|
+
pkgPath = path_1.join(buildersDir, 'node_modules', name, 'package.json');
|
232958
|
+
builderPkg = await fs_extra_1.readJSON(pkgPath);
|
232959
|
+
}
|
232960
|
+
catch (err) {
|
232961
|
+
if ((err === null || err === void 0 ? void 0 : err.code) !== 'ENOENT')
|
232962
|
+
throw err;
|
232963
|
+
// If `pkgPath` wasn't found in `.vercel/builders` then try as a CLI local
|
232964
|
+
// dependency. `require.resolve()` will throw if the Builder is not a CLI
|
232965
|
+
// dep, in which case we'll install it into `.vercel/builders`.
|
232966
|
+
pkgPath = require.resolve(`${name}/package.json`, {
|
232967
|
+
paths: [__dirname],
|
232968
|
+
});
|
232969
|
+
builderPkg = await fs_extra_1.readJSON(pkgPath);
|
232970
|
+
}
|
232971
|
+
if (!builderPkg || !pkgPath) {
|
232972
|
+
throw new Error(`Failed to load \`package.json\` for "${name}"`);
|
232973
|
+
}
|
232974
|
+
if (typeof builderPkg.version !== 'string') {
|
232975
|
+
throw new Error(`\`package.json\` for "${name}" does not contain a "version" field`);
|
232976
|
+
}
|
232977
|
+
if (parsed.type === 'version' &&
|
232978
|
+
parsed.rawSpec !== builderPkg.version) {
|
232979
|
+
// An explicit Builder version was specified but it does
|
232980
|
+
// not match the version that is currently installed
|
232981
|
+
output.debug(`Installed version "${name}@${builderPkg.version}" does not match "${parsed.rawSpec}"`);
|
232982
|
+
buildersToAdd.add(spec);
|
232983
|
+
continue;
|
232984
|
+
}
|
232985
|
+
if (parsed.type === 'range' &&
|
232986
|
+
!semver_1.satisfies(builderPkg.version, parsed.rawSpec)) {
|
232987
|
+
// An explicit Builder range was specified but it is not
|
232988
|
+
// compatible with the version that is currently installed
|
232989
|
+
output.debug(`Installed version "${name}@${builderPkg.version}" is not compatible with "${parsed.rawSpec}"`);
|
232990
|
+
buildersToAdd.add(spec);
|
232991
|
+
continue;
|
232992
|
+
}
|
232993
|
+
// TODO: handle `parsed.type === 'tag'` ("latest" vs. anything else?)
|
232994
|
+
const path = path_1.join(path_1.dirname(pkgPath), builderPkg.main || 'index.js');
|
232995
|
+
const builder = require(path);
|
232996
|
+
results.set(spec, {
|
232997
|
+
builder,
|
232998
|
+
pkg: builderPkg,
|
232999
|
+
path,
|
233000
|
+
pkgPath,
|
233001
|
+
});
|
233002
|
+
output.debug(`Imported Builder "${name}" from "${path_1.dirname(pkgPath)}"`);
|
233003
|
+
}
|
233004
|
+
catch (err) {
|
233005
|
+
if (err.code === 'MODULE_NOT_FOUND') {
|
233006
|
+
output.debug(`Failed to import "${name}": ${err}`);
|
233007
|
+
buildersToAdd.add(spec);
|
233008
|
+
if (err.message.includes('@now/build-utils')) {
|
233009
|
+
const upgradeMessage = parsed.scope === '@now'
|
233010
|
+
? ` Please update from "@now" to "@vercel".`
|
233011
|
+
: '';
|
233012
|
+
throw new Error(`The legacy "${name}" Builder is not supported.${upgradeMessage}`);
|
233013
|
+
}
|
233014
|
+
}
|
233015
|
+
else {
|
233016
|
+
throw err;
|
233017
|
+
}
|
233018
|
+
}
|
233019
|
+
}
|
233020
|
+
// Add any Builders that are not yet present into `.vercel/builders`
|
233021
|
+
if (buildersToAdd.size > 0) {
|
233022
|
+
try {
|
233023
|
+
const emptyPkgJson = {
|
233024
|
+
private: true,
|
233025
|
+
license: 'UNLICENSED',
|
233026
|
+
};
|
233027
|
+
await fs_extra_1.outputJSON(buildersPkgPath, emptyPkgJson, {
|
233028
|
+
flag: 'wx',
|
233029
|
+
});
|
233030
|
+
}
|
233031
|
+
catch (err) {
|
233032
|
+
if (err.code !== 'EEXIST')
|
233033
|
+
throw err;
|
233034
|
+
}
|
233035
|
+
output.debug(`Installing Builders: ${Array.from(buildersToAdd).join(', ')}`);
|
233036
|
+
await build_utils_1.spawnAsync('yarn', ['add', '@vercel/build-utils', ...buildersToAdd], { cwd: buildersDir });
|
233037
|
+
// Cross-reference any builderSpecs from the saved `package.json` file,
|
233038
|
+
// in case they were installed from a URL
|
233039
|
+
const buildersPkg = await read_json_file_1.default(buildersPkgPath);
|
233040
|
+
if (buildersPkg instanceof errors_ts_1.CantParseJSONFile)
|
233041
|
+
throw buildersPkg;
|
233042
|
+
if (!buildersPkg) {
|
233043
|
+
throw new Error(`Failed to load "${buildersPkgPath}"`);
|
233044
|
+
}
|
233045
|
+
for (const spec of buildersToAdd) {
|
233046
|
+
for (const [name, version] of Object.entries(buildersPkg.dependencies || {})) {
|
233047
|
+
if (version === spec) {
|
233048
|
+
output.debug(`Resolved Builder spec "${spec}" to name "${name}"`);
|
233049
|
+
resolvedSpecs.set(spec, name);
|
233050
|
+
}
|
233051
|
+
}
|
233052
|
+
}
|
233053
|
+
}
|
233054
|
+
} while (results.size !== builderSpecs.size);
|
233055
|
+
return results;
|
233056
|
+
}
|
233057
|
+
exports.importBuilders = importBuilders;
|
233058
|
+
|
233059
|
+
|
233060
|
+
/***/ }),
|
233061
|
+
|
233062
|
+
/***/ 33274:
|
233063
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
233064
|
+
|
233065
|
+
"use strict";
|
233066
|
+
|
233067
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
233068
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
233069
|
+
};
|
233070
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
233071
|
+
exports.build = exports.version = void 0;
|
233072
|
+
const minimatch_1 = __importDefault(__webpack_require__(99566));
|
233073
|
+
exports.version = 2;
|
233074
|
+
const build = async ({ entrypoint, files, config }) => {
|
233075
|
+
const output = {};
|
233076
|
+
const outputDirectory = config.zeroConfig ? config.outputDirectory : '';
|
233077
|
+
for (let [filename, fileFsRef] of Object.entries(files)) {
|
233078
|
+
if (filename.startsWith('.git/') ||
|
233079
|
+
filename === 'vercel.json' ||
|
233080
|
+
filename === 'now.json') {
|
233081
|
+
continue;
|
233082
|
+
}
|
233083
|
+
if (entrypoint &&
|
233084
|
+
!(entrypoint === filename ||
|
233085
|
+
minimatch_1.default(filename, entrypoint, { dot: true }))) {
|
233086
|
+
continue;
|
233087
|
+
}
|
233088
|
+
if (outputDirectory) {
|
233089
|
+
const outputMatch = outputDirectory + '/';
|
233090
|
+
if (filename.startsWith(outputMatch)) {
|
233091
|
+
// static output files are moved to the root directory
|
233092
|
+
filename = filename.slice(outputMatch.length);
|
233093
|
+
}
|
233094
|
+
}
|
233095
|
+
output[filename] = fileFsRef;
|
233096
|
+
}
|
233097
|
+
return { output };
|
233098
|
+
};
|
233099
|
+
exports.build = build;
|
233100
|
+
|
233101
|
+
|
233102
|
+
/***/ }),
|
233103
|
+
|
233104
|
+
/***/ 58168:
|
233105
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
233106
|
+
|
233107
|
+
"use strict";
|
233108
|
+
|
233109
|
+
/**
|
233110
|
+
* Code modified from `extract-zip` to accept Buffer.
|
233111
|
+
* https://github.com/maxogden/extract-zip/blob/master/index.js
|
233112
|
+
* BSD-2 Copyright (c) 2014 Max Ogden and other contributors
|
233113
|
+
*/
|
233114
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
233115
|
+
if (k2 === undefined) k2 = k;
|
233116
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
233117
|
+
}) : (function(o, m, k, k2) {
|
233118
|
+
if (k2 === undefined) k2 = k;
|
233119
|
+
o[k2] = m[k];
|
233120
|
+
}));
|
233121
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
233122
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
233123
|
+
}) : function(o, v) {
|
233124
|
+
o["default"] = v;
|
233125
|
+
});
|
233126
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
233127
|
+
if (mod && mod.__esModule) return mod;
|
233128
|
+
var result = {};
|
233129
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
233130
|
+
__setModuleDefault(result, mod);
|
233131
|
+
return result;
|
233132
|
+
};
|
233133
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
233134
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
233135
|
+
};
|
233136
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
233137
|
+
exports.unzip = void 0;
|
233138
|
+
const path_1 = __importDefault(__webpack_require__(85622));
|
233139
|
+
const promisepipe_1 = __importDefault(__webpack_require__(48568));
|
233140
|
+
const fs = __importStar(__webpack_require__(45392));
|
233141
|
+
const build_utils_1 = __webpack_require__(3131);
|
233142
|
+
const yauzl_promise_1 = __webpack_require__(18755);
|
233143
|
+
async function* createZipIterator(zipFile) {
|
233144
|
+
let entry;
|
233145
|
+
while ((entry = await zipFile.readEntry()) !== null) {
|
233146
|
+
yield entry;
|
233147
|
+
}
|
233148
|
+
}
|
233149
|
+
async function unzip(buffer, dir) {
|
233150
|
+
const zipFile = await yauzl_promise_1.fromBuffer(buffer);
|
233151
|
+
for await (const entry of createZipIterator(zipFile)) {
|
233152
|
+
if (entry.fileName.startsWith('__MACOSX/'))
|
233153
|
+
continue;
|
233154
|
+
try {
|
233155
|
+
const destDir = path_1.default.dirname(path_1.default.join(dir, entry.fileName));
|
233156
|
+
await fs.mkdirp(destDir);
|
233157
|
+
const canonicalDestDir = await fs.realpath(destDir);
|
233158
|
+
const relativeDestDir = path_1.default.relative(dir, canonicalDestDir);
|
233159
|
+
if (relativeDestDir.split(path_1.default.sep).includes('..')) {
|
233160
|
+
throw new Error(`Out of bound path "${canonicalDestDir}" found while processing file ${entry.fileName}`);
|
233161
|
+
}
|
233162
|
+
await extractEntry(zipFile, entry, dir);
|
233163
|
+
}
|
233164
|
+
catch (err) {
|
233165
|
+
await zipFile.close();
|
233166
|
+
throw err;
|
233167
|
+
}
|
233168
|
+
}
|
233169
|
+
}
|
233170
|
+
exports.unzip = unzip;
|
233171
|
+
async function extractEntry(zipFile, entry, dir) {
|
233172
|
+
const dest = path_1.default.join(dir, entry.fileName);
|
233173
|
+
// convert external file attr int into a fs stat mode int
|
233174
|
+
const mode = (entry.externalFileAttributes >> 16) & 0xffff;
|
233175
|
+
// check if it's a symlink or dir (using stat mode constants)
|
233176
|
+
const IFMT = 61440;
|
233177
|
+
const IFDIR = 16384;
|
233178
|
+
const IFLNK = 40960;
|
233179
|
+
const symlink = (mode & IFMT) === IFLNK;
|
233180
|
+
let isDir = (mode & IFMT) === IFDIR;
|
233181
|
+
// Failsafe, borrowed from jsZip
|
233182
|
+
if (!isDir && entry.fileName.endsWith('/')) {
|
233183
|
+
isDir = true;
|
233184
|
+
}
|
233185
|
+
// check for windows weird way of specifying a directory
|
233186
|
+
// https://github.com/maxogden/extract-zip/issues/13#issuecomment-154494566
|
233187
|
+
const madeBy = entry.versionMadeBy >> 8;
|
233188
|
+
if (!isDir)
|
233189
|
+
isDir = madeBy === 0 && entry.externalFileAttributes === 16;
|
233190
|
+
const procMode = getExtractedMode(mode, isDir) & 0o777;
|
233191
|
+
// always ensure folders are created
|
233192
|
+
const destDir = isDir ? dest : path_1.default.dirname(dest);
|
233193
|
+
const mkdirOptions = { recursive: true };
|
233194
|
+
if (isDir) {
|
233195
|
+
// @ts-ignore
|
233196
|
+
mkdirOptions.mode = procMode;
|
233197
|
+
}
|
233198
|
+
await fs.mkdir(destDir, mkdirOptions);
|
233199
|
+
if (isDir)
|
233200
|
+
return;
|
233201
|
+
const readStream = await zipFile.openReadStream(entry);
|
233202
|
+
if (symlink) {
|
233203
|
+
const link = await build_utils_1.streamToBuffer(readStream);
|
233204
|
+
await fs.symlink(link.toString('utf8'), dest);
|
233205
|
+
}
|
233206
|
+
else {
|
233207
|
+
await promisepipe_1.default(readStream, fs.createWriteStream(dest, { mode: procMode }));
|
233208
|
+
}
|
233209
|
+
}
|
233210
|
+
function getExtractedMode(entryMode, isDir) {
|
233211
|
+
let mode = entryMode;
|
233212
|
+
// Set defaults, if necessary
|
233213
|
+
if (mode === 0) {
|
233214
|
+
if (isDir) {
|
233215
|
+
mode = 0o755;
|
233216
|
+
}
|
233217
|
+
else {
|
233218
|
+
mode = 0o644;
|
233219
|
+
}
|
233220
|
+
}
|
233221
|
+
return mode;
|
233222
|
+
}
|
233223
|
+
|
233224
|
+
|
233225
|
+
/***/ }),
|
233226
|
+
|
233227
|
+
/***/ 28689:
|
233228
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
233229
|
+
|
233230
|
+
"use strict";
|
233231
|
+
|
233232
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
233233
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
233234
|
+
};
|
233235
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
233236
|
+
exports.findDirs = exports.writeBuildResult = exports.OUTPUT_DIR = void 0;
|
233237
|
+
const fs_extra_1 = __importDefault(__webpack_require__(45392));
|
233238
|
+
const mime_types_1 = __importDefault(__webpack_require__(20708));
|
233239
|
+
const path_1 = __webpack_require__(85622);
|
233240
|
+
const build_utils_1 = __webpack_require__(3131);
|
233241
|
+
const promisepipe_1 = __importDefault(__webpack_require__(48568));
|
233242
|
+
const unzip_1 = __webpack_require__(58168);
|
233243
|
+
const link_1 = __webpack_require__(67630);
|
233244
|
+
exports.OUTPUT_DIR = path_1.join(link_1.VERCEL_DIR, 'output');
|
233245
|
+
async function writeBuildResult(buildResult, build, builder, builderPkg, cleanUrls) {
|
233246
|
+
const { version } = builder;
|
233247
|
+
if (version === 2) {
|
233248
|
+
return writeBuildResultV2(buildResult, cleanUrls);
|
233249
|
+
}
|
233250
|
+
else if (version === 3) {
|
233251
|
+
return writeBuildResultV3(buildResult, build);
|
233252
|
+
}
|
233253
|
+
throw new Error(`Unsupported Builder version \`${version}\` from "${builderPkg.name}"`);
|
233254
|
+
}
|
233255
|
+
exports.writeBuildResult = writeBuildResult;
|
233256
|
+
function isEdgeFunction(v) {
|
233257
|
+
return (v === null || v === void 0 ? void 0 : v.type) === 'EdgeFunction';
|
233258
|
+
}
|
233259
|
+
function isLambda(v) {
|
233260
|
+
return (v === null || v === void 0 ? void 0 : v.type) === 'Lambda';
|
233261
|
+
}
|
233262
|
+
function isPrerender(v) {
|
233263
|
+
return (v === null || v === void 0 ? void 0 : v.type) === 'Prerender';
|
233264
|
+
}
|
233265
|
+
function isFile(v) {
|
233266
|
+
const type = v === null || v === void 0 ? void 0 : v.type;
|
233267
|
+
return type === 'FileRef' || type === 'FileFsRef' || type === 'FileBlob';
|
233268
|
+
}
|
233269
|
+
/**
|
233270
|
+
* Writes the output from the `build()` return value of a v2 Builder to
|
233271
|
+
* the filesystem.
|
233272
|
+
*/
|
233273
|
+
async function writeBuildResultV2(buildResult, cleanUrls) {
|
233274
|
+
if ('buildOutputPath' in buildResult) {
|
233275
|
+
await mergeBuilderOutput(buildResult);
|
233276
|
+
return;
|
233277
|
+
}
|
233278
|
+
const lambdas = new Map();
|
233279
|
+
const overrides = {};
|
233280
|
+
for (const [path, output] of Object.entries(buildResult.output)) {
|
233281
|
+
if (isLambda(output)) {
|
233282
|
+
await writeLambda(output, path, lambdas);
|
233283
|
+
}
|
233284
|
+
else if (isPrerender(output)) {
|
233285
|
+
await writeLambda(output.lambda, path, lambdas);
|
233286
|
+
// Write the fallback file alongside the Lambda directory
|
233287
|
+
let fallback = output.fallback;
|
233288
|
+
if (fallback) {
|
233289
|
+
const ext = getFileExtension(fallback);
|
233290
|
+
const fallbackName = `${path}.prerender-fallback${ext}`;
|
233291
|
+
const fallbackPath = path_1.join(exports.OUTPUT_DIR, 'functions', fallbackName);
|
233292
|
+
const stream = fallback.toStream();
|
233293
|
+
await promisepipe_1.default(stream, fs_extra_1.default.createWriteStream(fallbackPath, { mode: fallback.mode }));
|
233294
|
+
fallback = new build_utils_1.FileFsRef({
|
233295
|
+
...output.fallback,
|
233296
|
+
fsPath: path_1.basename(fallbackName),
|
233297
|
+
});
|
233298
|
+
}
|
233299
|
+
const prerenderConfigPath = path_1.join(exports.OUTPUT_DIR, 'functions', `${path}.prerender-config.json`);
|
233300
|
+
const prerenderConfig = {
|
233301
|
+
...output,
|
233302
|
+
lambda: undefined,
|
233303
|
+
fallback,
|
233304
|
+
};
|
233305
|
+
await fs_extra_1.default.writeJSON(prerenderConfigPath, prerenderConfig, { spaces: 2 });
|
233306
|
+
}
|
233307
|
+
else if (isFile(output)) {
|
233308
|
+
await writeStaticFile(output, path, overrides, cleanUrls);
|
233309
|
+
}
|
233310
|
+
else if (isEdgeFunction(output)) {
|
233311
|
+
await writeEdgeFunction(output, path);
|
233312
|
+
}
|
233313
|
+
else {
|
233314
|
+
throw new Error(`Unsupported output type: "${output.type}" for ${path}`);
|
233315
|
+
}
|
233316
|
+
}
|
233317
|
+
return Object.keys(overrides).length > 0 ? overrides : undefined;
|
233318
|
+
}
|
233319
|
+
/**
|
233320
|
+
* Writes the output from the `build()` return value of a v3 Builder to
|
233321
|
+
* the filesystem.
|
233322
|
+
*/
|
233323
|
+
async function writeBuildResultV3(buildResult, build) {
|
233324
|
+
var _a;
|
233325
|
+
const { output } = buildResult;
|
233326
|
+
if (isLambda(output)) {
|
233327
|
+
const src = build.src;
|
233328
|
+
const ext = path_1.extname(src);
|
233329
|
+
const path = ((_a = build.config) === null || _a === void 0 ? void 0 : _a.zeroConfig)
|
233330
|
+
? src.substring(0, src.length - ext.length)
|
233331
|
+
: src;
|
233332
|
+
await writeLambda(output, path);
|
233333
|
+
}
|
233334
|
+
else {
|
233335
|
+
throw new Error(`Unsupported output type: "${output.type}" for ${build.src}`);
|
233336
|
+
}
|
233337
|
+
}
|
233338
|
+
/**
|
233339
|
+
* Writes a static `File` instance to the file system in the "static" directory.
|
233340
|
+
* If the filename does not have a file extension then one attempts to be inferred
|
233341
|
+
* from the extension of the `fsPath`.
|
233342
|
+
*
|
233343
|
+
* @param file The `File` instance to write
|
233344
|
+
* @param path The URL path where the `File` can be accessed from
|
233345
|
+
* @param overrides Record of override configuration when a File is renamed or has other metadata
|
233346
|
+
*/
|
233347
|
+
async function writeStaticFile(file, path, overrides, cleanUrls = false) {
|
233348
|
+
let fsPath = path;
|
233349
|
+
let override = null;
|
233350
|
+
// If the output path doesn't match the determined file extension of
|
233351
|
+
// the File then add the extension. This is to help avoid conflicts
|
233352
|
+
// where an output path matches a directory name of another output path
|
233353
|
+
// (i.e. `blog` -> `blog.html` and `blog/hello` -> `blog/hello.html`)
|
233354
|
+
const ext = getFileExtension(file);
|
233355
|
+
if (ext && path_1.extname(path) !== ext) {
|
233356
|
+
fsPath += ext;
|
233357
|
+
if (!override)
|
233358
|
+
override = {};
|
233359
|
+
override.path = path;
|
233360
|
+
}
|
233361
|
+
// If `cleanUrls` is true then remove the `.html` file extension
|
233362
|
+
// for HTML files.
|
233363
|
+
if (cleanUrls && path.endsWith('.html')) {
|
233364
|
+
if (!override)
|
233365
|
+
override = {};
|
233366
|
+
override.path = path.slice(0, -5);
|
233367
|
+
}
|
233368
|
+
// Ensure an explicit "content-type" on the `File` is returned in
|
233369
|
+
// the final output asset.
|
233370
|
+
if (file.contentType) {
|
233371
|
+
if (!override)
|
233372
|
+
override = {};
|
233373
|
+
override.contentType = file.contentType;
|
233374
|
+
}
|
233375
|
+
if (override) {
|
233376
|
+
overrides[fsPath] = override;
|
233377
|
+
}
|
233378
|
+
const dest = path_1.join(exports.OUTPUT_DIR, 'static', fsPath);
|
233379
|
+
await fs_extra_1.default.mkdirp(path_1.dirname(dest));
|
233380
|
+
// TODO: handle (or skip) symlinks?
|
233381
|
+
const stream = file.toStream();
|
233382
|
+
await promisepipe_1.default(stream, fs_extra_1.default.createWriteStream(dest, { mode: file.mode }));
|
233383
|
+
}
|
233384
|
+
/**
|
233385
|
+
* Serializes the `EdgeFunction` instance to the file system.
|
233386
|
+
*
|
233387
|
+
* @param edgeFunction The `EdgeFunction` instance
|
233388
|
+
* @param path The URL path where the `EdgeFunction` can be accessed from
|
233389
|
+
*/
|
233390
|
+
async function writeEdgeFunction(edgeFunction, path) {
|
233391
|
+
const dest = path_1.join(exports.OUTPUT_DIR, 'functions', `${path}.func`);
|
233392
|
+
await fs_extra_1.default.mkdirp(dest);
|
233393
|
+
const ops = [];
|
233394
|
+
ops.push(build_utils_1.download(edgeFunction.files, dest));
|
233395
|
+
const config = {
|
233396
|
+
runtime: 'edge',
|
233397
|
+
...edgeFunction,
|
233398
|
+
files: undefined,
|
233399
|
+
type: undefined,
|
233400
|
+
};
|
233401
|
+
const configPath = path_1.join(dest, '.vc-config.json');
|
233402
|
+
ops.push(fs_extra_1.default.writeJSON(configPath, config, {
|
233403
|
+
spaces: 2,
|
233404
|
+
}));
|
233405
|
+
await Promise.all(ops);
|
233406
|
+
}
|
233407
|
+
/**
|
233408
|
+
* Writes the file references from the `Lambda` instance to the file system.
|
233409
|
+
*
|
233410
|
+
* @param lambda The `Lambda` instance
|
233411
|
+
* @param path The URL path where the `Lambda` can be accessed from
|
233412
|
+
* @param lambdas (optional) Map of `Lambda` instances that have previously been written
|
233413
|
+
*/
|
233414
|
+
async function writeLambda(lambda, path, lambdas) {
|
233415
|
+
const dest = path_1.join(exports.OUTPUT_DIR, 'functions', `${path}.func`);
|
233416
|
+
// If the `lambda` has already been written to the filesystem at a different
|
233417
|
+
// location then create a symlink to the previous location instead of copying
|
233418
|
+
// the files again.
|
233419
|
+
const existingLambdaPath = lambdas === null || lambdas === void 0 ? void 0 : lambdas.get(lambda);
|
233420
|
+
if (existingLambdaPath) {
|
233421
|
+
const destDir = path_1.dirname(dest);
|
233422
|
+
const targetDest = path_1.join(exports.OUTPUT_DIR, 'functions', `${existingLambdaPath}.func`);
|
233423
|
+
const target = path_1.relative(destDir, targetDest);
|
233424
|
+
await fs_extra_1.default.mkdirp(destDir);
|
233425
|
+
await fs_extra_1.default.symlink(target, dest);
|
233426
|
+
return;
|
233427
|
+
}
|
233428
|
+
lambdas === null || lambdas === void 0 ? void 0 : lambdas.set(lambda, path);
|
233429
|
+
await fs_extra_1.default.mkdirp(dest);
|
233430
|
+
const ops = [];
|
233431
|
+
if (lambda.files) {
|
233432
|
+
// `files` is defined
|
233433
|
+
ops.push(build_utils_1.download(lambda.files, dest));
|
233434
|
+
}
|
233435
|
+
else if (lambda.zipBuffer) {
|
233436
|
+
// Builders that use the deprecated `createLambda()` might only have `zipBuffer`
|
233437
|
+
ops.push(unzip_1.unzip(lambda.zipBuffer, dest));
|
233438
|
+
}
|
233439
|
+
else {
|
233440
|
+
throw new Error('Malformed `Lambda` - no "files" present');
|
233441
|
+
}
|
233442
|
+
const config = {
|
233443
|
+
...lambda,
|
233444
|
+
type: undefined,
|
233445
|
+
files: undefined,
|
233446
|
+
zipBuffer: undefined,
|
233447
|
+
};
|
233448
|
+
const configPath = path_1.join(dest, '.vc-config.json');
|
233449
|
+
ops.push(fs_extra_1.default.writeJSON(configPath, config, {
|
233450
|
+
spaces: 2,
|
233451
|
+
}));
|
233452
|
+
await Promise.all(ops);
|
233453
|
+
// XXX: remove any `.vercel/builders` directories that were
|
233454
|
+
// extracted into the `dest` dir. This is a temporary band-aid
|
233455
|
+
// to make `vercel-php` work since it is inadvertently including
|
233456
|
+
// `.vercel/builders` into the Lambda files due to glob syntax.
|
233457
|
+
// See: https://github.com/juicyfx/vercel-php/pull/232
|
233458
|
+
for await (const dir of findDirs('.vercel', dest)) {
|
233459
|
+
const absDir = path_1.join(dest, dir);
|
233460
|
+
const entries = await fs_extra_1.default.readdir(absDir);
|
233461
|
+
if (entries.includes('cache')) {
|
233462
|
+
// Delete everything except for "cache"
|
233463
|
+
await Promise.all(entries
|
233464
|
+
.filter(e => e !== 'cache')
|
233465
|
+
.map(entry => fs_extra_1.default.remove(path_1.join(absDir, entry))));
|
233466
|
+
}
|
233467
|
+
else {
|
233468
|
+
// Delete the entire `.vercel` directory
|
233469
|
+
await fs_extra_1.default.remove(absDir);
|
233470
|
+
}
|
233471
|
+
}
|
233472
|
+
}
|
233473
|
+
/**
|
233474
|
+
* When the Root Directory setting is utilized, merge the contents of the
|
233475
|
+
* `.vercel/output` directory that was specified by the Builder into the
|
233476
|
+
* `vc build` output directory.
|
233477
|
+
*/
|
233478
|
+
async function mergeBuilderOutput(buildResult) {
|
233479
|
+
const absOutputDir = path_1.resolve(exports.OUTPUT_DIR);
|
233480
|
+
if (absOutputDir === buildResult.buildOutputPath) {
|
233481
|
+
// `.vercel/output` dir is already in the correct location,
|
233482
|
+
// so no need to do anything
|
233483
|
+
return;
|
233484
|
+
}
|
233485
|
+
await fs_extra_1.default.copy(buildResult.buildOutputPath, exports.OUTPUT_DIR);
|
233486
|
+
}
|
233487
|
+
/**
|
233488
|
+
* Attempts to return the file extension (i.e. `.html`) from the given
|
233489
|
+
* `File` instance, based on its actual filesystem path and/or the
|
233490
|
+
* "content-type" of the File.
|
233491
|
+
*/
|
233492
|
+
function getFileExtension(file) {
|
233493
|
+
let ext = '';
|
233494
|
+
if (file.type === 'FileFsRef') {
|
233495
|
+
ext = path_1.extname(file.fsPath);
|
233496
|
+
}
|
233497
|
+
if (!ext && file.contentType) {
|
233498
|
+
const e = mime_types_1.default.extension(file.contentType);
|
233499
|
+
if (e) {
|
233500
|
+
ext = `.${e}`;
|
233501
|
+
}
|
233502
|
+
}
|
233503
|
+
return ext;
|
233504
|
+
}
|
233505
|
+
/**
|
233506
|
+
* Creates an async iterator that scans a directory
|
233507
|
+
* for sub-directories with the matching `name`.
|
233508
|
+
*/
|
233509
|
+
async function* findDirs(name, dir, root = dir) {
|
233510
|
+
let paths;
|
233511
|
+
try {
|
233512
|
+
paths = await fs_extra_1.default.readdir(dir);
|
233513
|
+
}
|
233514
|
+
catch (err) {
|
233515
|
+
if (err.code !== 'ENOENT') {
|
233516
|
+
throw err;
|
233517
|
+
}
|
233518
|
+
paths = [];
|
233519
|
+
}
|
233520
|
+
for (const path of paths) {
|
233521
|
+
const abs = path_1.join(dir, path);
|
233522
|
+
const s = await fs_extra_1.default.stat(abs);
|
233523
|
+
if (s.isDirectory()) {
|
233524
|
+
if (path === name) {
|
233525
|
+
yield path_1.relative(root, abs);
|
233526
|
+
}
|
233527
|
+
else {
|
233528
|
+
yield* findDirs(name, abs, root);
|
233529
|
+
}
|
233530
|
+
}
|
233531
|
+
}
|
233532
|
+
}
|
233533
|
+
exports.findDirs = findDirs;
|
233534
|
+
|
233535
|
+
|
232466
233536
|
/***/ }),
|
232467
233537
|
|
232468
233538
|
/***/ 82989:
|
@@ -235315,6 +236385,7 @@ const error_404_1 = __importDefault(__webpack_require__(47062));
|
|
235315
236385
|
const error_502_1 = __importDefault(__webpack_require__(73862));
|
235316
236386
|
const redirect_1 = __importDefault(__webpack_require__(14050));
|
235317
236387
|
const expose_system_envs_1 = __importDefault(__webpack_require__(40313));
|
236388
|
+
const tree_kill_1 = __webpack_require__(21780);
|
235318
236389
|
const frontendRuntimeSet = new Set(frameworks_1.default.map(f => { var _a; return ((_a = f.useRuntime) === null || _a === void 0 ? void 0 : _a.use) || '@vercel/static-build'; }));
|
235319
236390
|
function sortBuilders(buildA, buildB) {
|
235320
236391
|
if (buildA && buildA.use && build_utils_1.isOfficialRuntime('static-build', buildA.use)) {
|
@@ -236442,19 +237513,7 @@ class DevServer {
|
|
236442
237513
|
ops.push(builder_1.shutdownBuilder(match, this.output));
|
236443
237514
|
}
|
236444
237515
|
if (devProcess) {
|
236445
|
-
ops.push(
|
236446
|
-
devProcess.once('exit', () => resolve());
|
236447
|
-
try {
|
236448
|
-
process.kill(devProcess.pid);
|
236449
|
-
}
|
236450
|
-
catch (err) {
|
236451
|
-
if (err.code === 'ESRCH') {
|
236452
|
-
// Process already exited
|
236453
|
-
return resolve();
|
236454
|
-
}
|
236455
|
-
reject(err);
|
236456
|
-
}
|
236457
|
-
}));
|
237516
|
+
ops.push(tree_kill_1.treeKill(devProcess.pid));
|
236458
237517
|
}
|
236459
237518
|
ops.push(close(this.server));
|
236460
237519
|
if (this.watcher) {
|
@@ -236488,13 +237547,7 @@ class DevServer {
|
|
236488
237547
|
const { debug } = this.output;
|
236489
237548
|
debug(`Killing builder dev server with PID ${pid}`);
|
236490
237549
|
this.devServerPids.delete(pid);
|
236491
|
-
|
236492
|
-
process.kill(pid, 'SIGTERM');
|
236493
|
-
debug(`Killed builder dev server with PID ${pid}`);
|
236494
|
-
}
|
236495
|
-
catch (err) {
|
236496
|
-
debug(`Failed to kill builder dev server with PID ${pid}: ${err}`);
|
236497
|
-
}
|
237550
|
+
await tree_kill_1.treeKill(pid);
|
236498
237551
|
}
|
236499
237552
|
async send404(req, res, requestId) {
|
236500
237553
|
return this.sendError(req, res, requestId, 'NOT_FOUND', 404);
|
@@ -236770,7 +237823,7 @@ class DevServer {
|
|
236770
237823
|
let command = devCommand
|
236771
237824
|
.replace(/\$PORT/g, `${port}`)
|
236772
237825
|
.replace(/%PORT%/g, `${port}`);
|
236773
|
-
this.output.debug(`Starting dev command with parameters
|
237826
|
+
this.output.debug(`Starting dev command with parameters: ${JSON.stringify({
|
236774
237827
|
cwd,
|
236775
237828
|
command,
|
236776
237829
|
port,
|
@@ -236797,6 +237850,7 @@ class DevServer {
|
|
236797
237850
|
cwd,
|
236798
237851
|
env,
|
236799
237852
|
});
|
237853
|
+
this.devProcess = p;
|
236800
237854
|
if (!p.stdout || !p.stderr) {
|
236801
237855
|
throw new Error('Expected child process to have stdout and stderr');
|
236802
237856
|
}
|
@@ -236805,15 +237859,12 @@ class DevServer {
|
|
236805
237859
|
p.stdout.on('data', (data) => {
|
236806
237860
|
process.stdout.write(data.replace(proxyPort, devPort));
|
236807
237861
|
});
|
236808
|
-
p.on('exit', (code) => {
|
236809
|
-
|
236810
|
-
process.exit(code);
|
236811
|
-
}
|
237862
|
+
p.on('exit', (code, signal) => {
|
237863
|
+
this.output.debug(`Dev command exited with "${signal || code}"`);
|
236812
237864
|
this.devProcessPort = undefined;
|
236813
237865
|
});
|
236814
237866
|
await checkForPort(port, 1000 * 60 * 5);
|
236815
237867
|
this.devProcessPort = port;
|
236816
|
-
this.devProcess = p;
|
236817
237868
|
}
|
236818
237869
|
}
|
236819
237870
|
exports.default = DevServer;
|
@@ -243864,10 +244915,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
243864
244915
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
243865
244916
|
};
|
243866
244917
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
243867
|
-
exports.getCommandName = exports.getTitleName = exports.getPkgName = void 0;
|
244918
|
+
exports.getCommandName = exports.getTitleName = exports.getPkgName = exports.logo = exports.name = void 0;
|
243868
244919
|
const title_1 = __importDefault(__webpack_require__(45676));
|
243869
244920
|
const pkg_1 = __importDefault(__webpack_require__(80984));
|
243870
244921
|
const cmd_1 = __importDefault(__webpack_require__(87350));
|
244922
|
+
/**
|
244923
|
+
* The package name defined in the CLI's `package.json` file (`vercel`).
|
244924
|
+
*/
|
244925
|
+
exports.name = pkg_1.default.name;
|
244926
|
+
/**
|
244927
|
+
* Unicode symbol used to represent the CLI.
|
244928
|
+
*/
|
244929
|
+
exports.logo = '▲';
|
243871
244930
|
/**
|
243872
244931
|
* Returns the package name such as `vercel` or `now`.
|
243873
244932
|
*/
|
@@ -244310,20 +245369,22 @@ const path_1 = __webpack_require__(85622);
|
|
244310
245369
|
// Write the project configuration to `.vercel/project.json`
|
244311
245370
|
// that is needed for `vercel build` and `vercel dev` commands
|
244312
245371
|
async function writeProjectSettings(cwd, project, org) {
|
244313
|
-
const
|
245372
|
+
const projectLinkAndSettings = {
|
244314
245373
|
projectId: project.id,
|
244315
245374
|
orgId: org.id,
|
244316
245375
|
settings: {
|
244317
|
-
|
245376
|
+
framework: project.framework,
|
244318
245377
|
devCommand: project.devCommand,
|
245378
|
+
installCommand: project.installCommand,
|
245379
|
+
buildCommand: project.buildCommand,
|
244319
245380
|
outputDirectory: project.outputDirectory,
|
244320
|
-
directoryListing: project.directoryListing,
|
244321
245381
|
rootDirectory: project.rootDirectory,
|
244322
|
-
|
245382
|
+
directoryListing: project.directoryListing,
|
245383
|
+
nodeVersion: project.nodeVersion,
|
244323
245384
|
},
|
244324
245385
|
};
|
244325
245386
|
const path = path_1.join(cwd, link_1.VERCEL_DIR, link_1.VERCEL_DIR_PROJECT);
|
244326
|
-
return await fs_extra_1.outputJSON(path,
|
245387
|
+
return await fs_extra_1.outputJSON(path, projectLinkAndSettings, {
|
244327
245388
|
spaces: 2,
|
244328
245389
|
});
|
244329
245390
|
}
|
@@ -245299,7 +246360,7 @@ module.exports = JSON.parse("{\"application/1d-interleaved-parityfec\":{\"source
|
|
245299
246360
|
/***/ ((module) => {
|
245300
246361
|
|
245301
246362
|
"use strict";
|
245302
|
-
module.exports = JSON.parse("{\"name\":\"vercel\",\"version\":\"24.2.
|
246363
|
+
module.exports = JSON.parse("{\"name\":\"vercel\",\"version\":\"24.2.5-canary.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/\",\"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\":\"3.1.1-canary.0\",\"@vercel/go\":\"1.4.4-canary.0\",\"@vercel/next\":\"2.8.67-canary.0\",\"@vercel/node\":\"1.15.4-canary.0\",\"@vercel/python\":\"2.3.4-canary.0\",\"@vercel/redwood\":\"0.8.4-canary.0\",\"@vercel/remix\":\"0.0.2-canary.0\",\"@vercel/ruby\":\"1.3.7-canary.0\",\"@vercel/static-build\":\"0.25.3-canary.0\",\"update-notifier\":\"4.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\",\"@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.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/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\",\"@types/yauzl-promise\":\"2.1.0\",\"@vercel/client\":\"11.0.4-canary.0\",\"@vercel/frameworks\":\"0.9.1\",\"@vercel/ncc\":\"0.24.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.4.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-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\",\"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\"]},\"gitHead\":\"e829ce47c356a06564551349e771b457ea95ac74\"}");
|
245303
246364
|
|
245304
246365
|
/***/ }),
|
245305
246366
|
|
@@ -245315,7 +246376,7 @@ module.exports = JSON.parse("{\"VISA\":\"Visa\",\"MASTERCARD\":\"MasterCard\",\"
|
|
245315
246376
|
/***/ ((module) => {
|
245316
246377
|
|
245317
246378
|
"use strict";
|
245318
|
-
module.exports = JSON.parse("{\"name\":\"@vercel/client\",\"version\":\"11.0.
|
246379
|
+
module.exports = JSON.parse("{\"name\":\"@vercel/client\",\"version\":\"11.0.4-canary.0\",\"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\":\">= 12\"},\"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\",\"typescript\":\"4.3.4\"},\"jest\":{\"preset\":\"ts-jest\",\"testEnvironment\":\"node\",\"verbose\":false,\"setupFilesAfterEnv\":[\"<rootDir>/tests/setup/index.ts\"]},\"dependencies\":{\"@vercel/build-utils\":\"3.1.1-canary.0\",\"@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.1\",\"querystring\":\"^0.2.0\",\"sleep-promise\":\"8.0.1\"},\"gitHead\":\"e829ce47c356a06564551349e771b457ea95ac74\"}");
|
245319
246380
|
|
245320
246381
|
/***/ }),
|
245321
246382
|
|