vercel 48.6.2 → 48.6.3
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 +67 -71
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7304,13 +7304,13 @@ var require_chalk = __commonJS2({
|
|
|
7304
7304
|
styles[key] = {
|
|
7305
7305
|
get() {
|
|
7306
7306
|
const codes = ansiStyles[key];
|
|
7307
|
-
return
|
|
7307
|
+
return build2.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
|
|
7308
7308
|
}
|
|
7309
7309
|
};
|
|
7310
7310
|
}
|
|
7311
7311
|
styles.visible = {
|
|
7312
7312
|
get() {
|
|
7313
|
-
return
|
|
7313
|
+
return build2.call(this, this._styles || [], true, "visible");
|
|
7314
7314
|
}
|
|
7315
7315
|
};
|
|
7316
7316
|
ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), "g");
|
|
@@ -7328,7 +7328,7 @@ var require_chalk = __commonJS2({
|
|
|
7328
7328
|
close: ansiStyles.color.close,
|
|
7329
7329
|
closeRe: ansiStyles.color.closeRe
|
|
7330
7330
|
};
|
|
7331
|
-
return
|
|
7331
|
+
return build2.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
|
|
7332
7332
|
};
|
|
7333
7333
|
}
|
|
7334
7334
|
};
|
|
@@ -7349,14 +7349,14 @@ var require_chalk = __commonJS2({
|
|
|
7349
7349
|
close: ansiStyles.bgColor.close,
|
|
7350
7350
|
closeRe: ansiStyles.bgColor.closeRe
|
|
7351
7351
|
};
|
|
7352
|
-
return
|
|
7352
|
+
return build2.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
|
|
7353
7353
|
};
|
|
7354
7354
|
}
|
|
7355
7355
|
};
|
|
7356
7356
|
}
|
|
7357
7357
|
var proto = Object.defineProperties(() => {
|
|
7358
7358
|
}, styles);
|
|
7359
|
-
function
|
|
7359
|
+
function build2(_styles, _empty, key) {
|
|
7360
7360
|
const builder = function() {
|
|
7361
7361
|
return applyStyle.apply(builder, arguments);
|
|
7362
7362
|
};
|
|
@@ -42518,7 +42518,7 @@ var require_colors = __commonJS2({
|
|
|
42518
42518
|
}
|
|
42519
42519
|
return str.replace(matchOperatorsRe, "\\$&");
|
|
42520
42520
|
};
|
|
42521
|
-
function
|
|
42521
|
+
function build2(_styles) {
|
|
42522
42522
|
var builder = function builder2() {
|
|
42523
42523
|
return applyStyle.apply(builder2, arguments);
|
|
42524
42524
|
};
|
|
@@ -42533,7 +42533,7 @@ var require_colors = __commonJS2({
|
|
|
42533
42533
|
ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g");
|
|
42534
42534
|
ret[key] = {
|
|
42535
42535
|
get: function() {
|
|
42536
|
-
return
|
|
42536
|
+
return build2(this._styles.concat(key));
|
|
42537
42537
|
}
|
|
42538
42538
|
};
|
|
42539
42539
|
});
|
|
@@ -42592,7 +42592,7 @@ var require_colors = __commonJS2({
|
|
|
42592
42592
|
Object.keys(styles).forEach(function(name) {
|
|
42593
42593
|
ret[name] = {
|
|
42594
42594
|
get: function() {
|
|
42595
|
-
return
|
|
42595
|
+
return build2([name]);
|
|
42596
42596
|
}
|
|
42597
42597
|
};
|
|
42598
42598
|
});
|
|
@@ -135904,9 +135904,9 @@ function sortBuilders(builds) {
|
|
|
135904
135904
|
import_frameworks2.frameworkList.map((f) => f.useRuntime?.use || "@vercel/static-build")
|
|
135905
135905
|
);
|
|
135906
135906
|
frontendRuntimeSet2.delete("@vercel/python");
|
|
135907
|
-
const toNumber = (
|
|
135908
|
-
return builds.sort((build1,
|
|
135909
|
-
return toNumber(build1) - toNumber(
|
|
135907
|
+
const toNumber = (build2) => build2.use === "@vercel/python" ? 1 : frontendRuntimeSet2.has(build2.use) ? 0 : 2;
|
|
135908
|
+
return builds.sort((build1, build2) => {
|
|
135909
|
+
return toNumber(build1) - toNumber(build2);
|
|
135910
135910
|
});
|
|
135911
135911
|
}
|
|
135912
135912
|
var import_frameworks2;
|
|
@@ -145937,7 +145937,7 @@ var init_unzip = __esm({
|
|
|
145937
145937
|
});
|
|
145938
145938
|
|
|
145939
145939
|
// src/util/build/write-build-result.ts
|
|
145940
|
-
async function writeBuildResult(repoRootPath, outputDir, buildResult,
|
|
145940
|
+
async function writeBuildResult(repoRootPath, outputDir, buildResult, build2, builder, builderPkg, vercelConfig, standalone = false) {
|
|
145941
145941
|
let version2 = builder.version;
|
|
145942
145942
|
if ((0, import_build_utils11.isExperimentalBackendsEnabled)() && "output" in buildResult) {
|
|
145943
145943
|
version2 = 2;
|
|
@@ -145947,7 +145947,7 @@ async function writeBuildResult(repoRootPath, outputDir, buildResult, build3, bu
|
|
|
145947
145947
|
repoRootPath,
|
|
145948
145948
|
outputDir,
|
|
145949
145949
|
buildResult,
|
|
145950
|
-
|
|
145950
|
+
build2,
|
|
145951
145951
|
vercelConfig,
|
|
145952
145952
|
standalone
|
|
145953
145953
|
);
|
|
@@ -145956,7 +145956,7 @@ async function writeBuildResult(repoRootPath, outputDir, buildResult, build3, bu
|
|
|
145956
145956
|
repoRootPath,
|
|
145957
145957
|
outputDir,
|
|
145958
145958
|
buildResult,
|
|
145959
|
-
|
|
145959
|
+
build2,
|
|
145960
145960
|
vercelConfig,
|
|
145961
145961
|
standalone
|
|
145962
145962
|
);
|
|
@@ -145981,16 +145981,16 @@ function isFile(v) {
|
|
|
145981
145981
|
function stripDuplicateSlashes(path11) {
|
|
145982
145982
|
return normalize2(path11).replace(/(^\/|\/$)/g, "");
|
|
145983
145983
|
}
|
|
145984
|
-
async function writeBuildResultV2(repoRootPath, outputDir, buildResult,
|
|
145984
|
+
async function writeBuildResultV2(repoRootPath, outputDir, buildResult, build2, vercelConfig, standalone = false) {
|
|
145985
145985
|
if ("buildOutputPath" in buildResult) {
|
|
145986
145986
|
await mergeBuilderOutput(outputDir, buildResult);
|
|
145987
145987
|
return;
|
|
145988
145988
|
}
|
|
145989
145989
|
if (!buildResult.output) {
|
|
145990
145990
|
const configFile = vercelConfig?.[import_client3.fileNameSymbol];
|
|
145991
|
-
const updateMessage =
|
|
145991
|
+
const updateMessage = build2.use.startsWith("@now/") ? ` Please update from "@now" to "@vercel" in your \`${configFile}\` file.` : "";
|
|
145992
145992
|
throw new Error(
|
|
145993
|
-
`The build result from "${
|
|
145993
|
+
`The build result from "${build2.use}" is missing the "output" property.${updateMessage}`
|
|
145994
145994
|
);
|
|
145995
145995
|
}
|
|
145996
145996
|
const existingFunctions = /* @__PURE__ */ new Map();
|
|
@@ -146083,7 +146083,7 @@ async function writeBuildResultV2(repoRootPath, outputDir, buildResult, build3,
|
|
|
146083
146083
|
}
|
|
146084
146084
|
return Object.keys(overrides).length > 0 ? overrides : void 0;
|
|
146085
146085
|
}
|
|
146086
|
-
async function writeBuildResultV3(repoRootPath, outputDir, buildResult,
|
|
146086
|
+
async function writeBuildResultV3(repoRootPath, outputDir, buildResult, build2, vercelConfig, standalone = false) {
|
|
146087
146087
|
const { output: output2 } = buildResult;
|
|
146088
146088
|
if (process.env.VERCEL_EXPERIMENTAL_ROUTES_JSON === "1") {
|
|
146089
146089
|
const routesJsonPath = (0, import_path21.join)(outputDir, "..", "routes.json");
|
|
@@ -146107,7 +146107,7 @@ async function writeBuildResultV3(repoRootPath, outputDir, buildResult, build3,
|
|
|
146107
146107
|
repoRootPath,
|
|
146108
146108
|
outputDir,
|
|
146109
146109
|
{ output: newOutput, routes: buildResult.routes },
|
|
146110
|
-
|
|
146110
|
+
build2,
|
|
146111
146111
|
vercelConfig,
|
|
146112
146112
|
standalone
|
|
146113
146113
|
);
|
|
@@ -146116,7 +146116,7 @@ async function writeBuildResultV3(repoRootPath, outputDir, buildResult, build3,
|
|
|
146116
146116
|
}
|
|
146117
146117
|
}
|
|
146118
146118
|
}
|
|
146119
|
-
const src =
|
|
146119
|
+
const src = build2.src;
|
|
146120
146120
|
if (typeof src !== "string") {
|
|
146121
146121
|
throw new Error(`Expected "build.src" to be a string`);
|
|
146122
146122
|
}
|
|
@@ -146126,7 +146126,7 @@ async function writeBuildResultV3(repoRootPath, outputDir, buildResult, build3,
|
|
|
146126
146126
|
}) : {};
|
|
146127
146127
|
const ext = (0, import_path21.extname)(src);
|
|
146128
146128
|
const path11 = stripDuplicateSlashes(
|
|
146129
|
-
|
|
146129
|
+
build2.config?.zeroConfig ? src.substring(0, src.length - ext.length) : src
|
|
146130
146130
|
);
|
|
146131
146131
|
if (isLambda(output2)) {
|
|
146132
146132
|
await writeLambda(
|
|
@@ -146149,7 +146149,7 @@ async function writeBuildResultV3(repoRootPath, outputDir, buildResult, build3,
|
|
|
146149
146149
|
);
|
|
146150
146150
|
} else {
|
|
146151
146151
|
throw new Error(
|
|
146152
|
-
`Unsupported output type: "${output2.type}" for ${
|
|
146152
|
+
`Unsupported output type: "${output2.type}" for ${build2.src}`
|
|
146153
146153
|
);
|
|
146154
146154
|
}
|
|
146155
146155
|
}
|
|
@@ -148284,19 +148284,19 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span, stand
|
|
|
148284
148284
|
await import_fs_extra18.default.mkdirp(outputDir);
|
|
148285
148285
|
const ops = [];
|
|
148286
148286
|
const buildsJsonBuilds = new Map(
|
|
148287
|
-
builds.map((
|
|
148288
|
-
const builderWithPkg = buildersWithPkgs.get(
|
|
148287
|
+
builds.map((build2) => {
|
|
148288
|
+
const builderWithPkg = buildersWithPkgs.get(build2.use);
|
|
148289
148289
|
if (!builderWithPkg) {
|
|
148290
|
-
throw new Error(`Failed to load Builder "${
|
|
148290
|
+
throw new Error(`Failed to load Builder "${build2.use}"`);
|
|
148291
148291
|
}
|
|
148292
148292
|
const { builder, pkg: builderPkg } = builderWithPkg;
|
|
148293
148293
|
return [
|
|
148294
|
-
|
|
148294
|
+
build2,
|
|
148295
148295
|
{
|
|
148296
148296
|
require: builderPkg.name,
|
|
148297
148297
|
requirePath: builderWithPkg.path,
|
|
148298
148298
|
apiVersion: builder.version,
|
|
148299
|
-
...
|
|
148299
|
+
...build2
|
|
148300
148300
|
}
|
|
148301
148301
|
];
|
|
148302
148302
|
})
|
|
@@ -148313,12 +148313,12 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span, stand
|
|
|
148313
148313
|
const repoRootPath = cwd;
|
|
148314
148314
|
const corepackShimDir = await initCorepack({ repoRootPath });
|
|
148315
148315
|
const diagnostics = {};
|
|
148316
|
-
for (const
|
|
148317
|
-
if (typeof
|
|
148316
|
+
for (const build2 of sortedBuilders) {
|
|
148317
|
+
if (typeof build2.src !== "string")
|
|
148318
148318
|
continue;
|
|
148319
|
-
const builderWithPkg = buildersWithPkgs.get(
|
|
148319
|
+
const builderWithPkg = buildersWithPkgs.get(build2.use);
|
|
148320
148320
|
if (!builderWithPkg) {
|
|
148321
|
-
throw new Error(`Failed to load Builder "${
|
|
148321
|
+
throw new Error(`Failed to load Builder "${build2.use}"`);
|
|
148322
148322
|
}
|
|
148323
148323
|
try {
|
|
148324
148324
|
const { builder, pkg: builderPkg } = builderWithPkg;
|
|
@@ -148335,10 +148335,10 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span, stand
|
|
|
148335
148335
|
output_manager_default.debug(`Setting env ${envKey} to "${value}"`);
|
|
148336
148336
|
}
|
|
148337
148337
|
}
|
|
148338
|
-
const isFrontendBuilder =
|
|
148338
|
+
const isFrontendBuilder = build2.config && "framework" in build2.config;
|
|
148339
148339
|
const buildConfig = isZeroConfig ? {
|
|
148340
148340
|
outputDirectory: projectSettings.outputDirectory ?? void 0,
|
|
148341
|
-
...
|
|
148341
|
+
...build2.config,
|
|
148342
148342
|
projectSettings,
|
|
148343
148343
|
installCommand: projectSettings.installCommand ?? void 0,
|
|
148344
148344
|
devCommand: projectSettings.devCommand ?? void 0,
|
|
@@ -148347,7 +148347,7 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span, stand
|
|
|
148347
148347
|
nodeVersion: projectSettings.nodeVersion,
|
|
148348
148348
|
bunVersion: localConfig.bunVersion ?? void 0
|
|
148349
148349
|
} : {
|
|
148350
|
-
...
|
|
148350
|
+
...build2.config || {},
|
|
148351
148351
|
bunVersion: localConfig.bunVersion ?? void 0
|
|
148352
148352
|
};
|
|
148353
148353
|
const builderSpan = span.child("vc.builder", {
|
|
@@ -148355,7 +148355,7 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span, stand
|
|
|
148355
148355
|
});
|
|
148356
148356
|
const buildOptions = {
|
|
148357
148357
|
files: filesMap,
|
|
148358
|
-
entrypoint:
|
|
148358
|
+
entrypoint: build2.src,
|
|
148359
148359
|
workPath,
|
|
148360
148360
|
repoRootPath,
|
|
148361
148361
|
config: buildConfig,
|
|
@@ -148363,15 +148363,12 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span, stand
|
|
|
148363
148363
|
span: builderSpan
|
|
148364
148364
|
};
|
|
148365
148365
|
output_manager_default.debug(
|
|
148366
|
-
`Building entrypoint "${
|
|
148366
|
+
`Building entrypoint "${build2.src}" with "${builderPkg.name}"`
|
|
148367
148367
|
);
|
|
148368
148368
|
let buildResult;
|
|
148369
148369
|
try {
|
|
148370
148370
|
buildResult = await builderSpan.trace(
|
|
148371
148371
|
() => {
|
|
148372
|
-
if ((0, import_build_utils13.shouldUseExperimentalBackends)(buildConfig.framework) && builderPkg.name !== "@vercel/static") {
|
|
148373
|
-
return experimentalBackendBuilder.build(buildOptions);
|
|
148374
|
-
}
|
|
148375
148372
|
return builder.build(buildOptions);
|
|
148376
148373
|
}
|
|
148377
148374
|
);
|
|
@@ -148400,7 +148397,7 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span, stand
|
|
|
148400
148397
|
if ((0, import_build_utils13.getDiscontinuedNodeVersions)().some((o) => o.runtime === lambdaRuntime)) {
|
|
148401
148398
|
throw new import_build_utils13.NowBuildError({
|
|
148402
148399
|
code: "NODEJS_DISCONTINUED_VERSION",
|
|
148403
|
-
message: `The Runtime "${
|
|
148400
|
+
message: `The Runtime "${build2.use}" is using "${lambdaRuntime}", which is discontinued. Please upgrade your Runtime to a more recent version or consult the author for more details.`,
|
|
148404
148401
|
link: "https://vercel.link/function-runtimes"
|
|
148405
148402
|
});
|
|
148406
148403
|
}
|
|
@@ -148410,7 +148407,7 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span, stand
|
|
|
148410
148407
|
"@vercel/hono",
|
|
148411
148408
|
"@vercel/fastify"
|
|
148412
148409
|
];
|
|
148413
|
-
const isBackendBuilder =
|
|
148410
|
+
const isBackendBuilder = build2.use && backendBuilders.includes(build2.use);
|
|
148414
148411
|
if (process.env.VERCEL_EXPERIMENTAL_ROUTES_JSON === "1") {
|
|
148415
148412
|
if ("output" in buildResult && buildResult.output && isBackendBuilder) {
|
|
148416
148413
|
const routesJsonPath = (0, import_path27.join)(outputDir, "..", "routes.json");
|
|
@@ -148448,7 +148445,7 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span, stand
|
|
|
148448
148445
|
}
|
|
148449
148446
|
}
|
|
148450
148447
|
}
|
|
148451
|
-
buildResults.set(
|
|
148448
|
+
buildResults.set(build2, buildResult);
|
|
148452
148449
|
let buildOutputLength = 0;
|
|
148453
148450
|
if ("output" in buildResult) {
|
|
148454
148451
|
buildOutputLength = Array.isArray(buildResult.output) ? buildResult.output.length : 1;
|
|
@@ -148461,7 +148458,7 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span, stand
|
|
|
148461
148458
|
repoRootPath,
|
|
148462
148459
|
outputDir,
|
|
148463
148460
|
buildResult,
|
|
148464
|
-
|
|
148461
|
+
build2,
|
|
148465
148462
|
builder,
|
|
148466
148463
|
builderPkg,
|
|
148467
148464
|
localConfig,
|
|
@@ -148476,7 +148473,7 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span, stand
|
|
|
148476
148473
|
)
|
|
148477
148474
|
);
|
|
148478
148475
|
} catch (err) {
|
|
148479
|
-
const buildJsonBuild = buildsJsonBuilds.get(
|
|
148476
|
+
const buildJsonBuild = buildsJsonBuilds.get(build2);
|
|
148480
148477
|
if (buildJsonBuild) {
|
|
148481
148478
|
buildJsonBuild.error = toEnumerableError(err);
|
|
148482
148479
|
}
|
|
@@ -148530,10 +148527,10 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span, stand
|
|
|
148530
148527
|
if (existingConfig.overrides) {
|
|
148531
148528
|
overrides.push(existingConfig.overrides);
|
|
148532
148529
|
}
|
|
148533
|
-
for (const [
|
|
148530
|
+
for (const [build2, buildResult] of buildResults.entries()) {
|
|
148534
148531
|
if ("buildOutputPath" in buildResult) {
|
|
148535
|
-
output_manager_default.debug(`Using "config.json" for "${
|
|
148536
|
-
buildResults.set(
|
|
148532
|
+
output_manager_default.debug(`Using "config.json" for "${build2.use}`);
|
|
148533
|
+
buildResults.set(build2, existingConfig);
|
|
148537
148534
|
break;
|
|
148538
148535
|
}
|
|
148539
148536
|
}
|
|
@@ -148594,8 +148591,8 @@ async function getFramework(cwd, buildResults) {
|
|
|
148594
148591
|
return;
|
|
148595
148592
|
}
|
|
148596
148593
|
if (detectedFramework.useRuntime) {
|
|
148597
|
-
for (const [
|
|
148598
|
-
if ("framework" in buildResult &&
|
|
148594
|
+
for (const [build2, buildResult] of buildResults.entries()) {
|
|
148595
|
+
if ("framework" in buildResult && build2.use === detectedFramework.useRuntime.use) {
|
|
148599
148596
|
return buildResult.framework;
|
|
148600
148597
|
}
|
|
148601
148598
|
}
|
|
@@ -148614,8 +148611,8 @@ async function getFramework(cwd, buildResults) {
|
|
|
148614
148611
|
};
|
|
148615
148612
|
}
|
|
148616
148613
|
}
|
|
148617
|
-
function expandBuild(files,
|
|
148618
|
-
if (!
|
|
148614
|
+
function expandBuild(files, build2) {
|
|
148615
|
+
if (!build2.use) {
|
|
148619
148616
|
throw new import_build_utils13.NowBuildError({
|
|
148620
148617
|
code: `invalid_build_specification`,
|
|
148621
148618
|
message: "Field `use` is missing in build specification",
|
|
@@ -148623,7 +148620,7 @@ function expandBuild(files, build3) {
|
|
|
148623
148620
|
action: "View Documentation"
|
|
148624
148621
|
});
|
|
148625
148622
|
}
|
|
148626
|
-
let src = (0, import_path27.normalize)(
|
|
148623
|
+
let src = (0, import_path27.normalize)(build2.src || "**").split(import_path27.sep).join("/");
|
|
148627
148624
|
if (src === "." || src === "./") {
|
|
148628
148625
|
throw new import_build_utils13.NowBuildError({
|
|
148629
148626
|
code: `invalid_build_specification`,
|
|
@@ -148640,7 +148637,7 @@ function expandBuild(files, build3) {
|
|
|
148640
148637
|
);
|
|
148641
148638
|
return matches.map((m) => {
|
|
148642
148639
|
return {
|
|
148643
|
-
...
|
|
148640
|
+
...build2,
|
|
148644
148641
|
src: m
|
|
148645
148642
|
};
|
|
148646
148643
|
});
|
|
@@ -148712,7 +148709,7 @@ async function getFrameworkRoutes(framework, dirPrefix) {
|
|
|
148712
148709
|
}
|
|
148713
148710
|
return routes2;
|
|
148714
148711
|
}
|
|
148715
|
-
var import_chalk55, import_dotenv, import_fs_extra18, import_minimatch2, import_path27, import_semver3,
|
|
148712
|
+
var import_chalk55, import_dotenv, import_fs_extra18, import_minimatch2, import_path27, import_semver3, import_build_utils13, import_client6, import_frameworks5, import_fs_detectors4, import_routing_utils2, import_promises2, InMemoryReporter;
|
|
148716
148713
|
var init_build2 = __esm({
|
|
148717
148714
|
"src/commands/build/index.ts"() {
|
|
148718
148715
|
"use strict";
|
|
@@ -148722,7 +148719,6 @@ var init_build2 = __esm({
|
|
|
148722
148719
|
import_minimatch2 = __toESM3(require_minimatch2());
|
|
148723
148720
|
import_path27 = require("path");
|
|
148724
148721
|
import_semver3 = __toESM3(require_semver());
|
|
148725
|
-
experimentalBackendBuilder = __toESM3(require("@vercel/backends"));
|
|
148726
148722
|
import_build_utils13 = require("@vercel/build-utils");
|
|
148727
148723
|
import_client6 = __toESM3(require_dist7());
|
|
148728
148724
|
import_frameworks5 = __toESM3(require_frameworks());
|
|
@@ -151126,7 +151122,7 @@ var init_util = __esm({
|
|
|
151126
151122
|
regions,
|
|
151127
151123
|
quiet = false,
|
|
151128
151124
|
env,
|
|
151129
|
-
build:
|
|
151125
|
+
build: build2,
|
|
151130
151126
|
forceNew = false,
|
|
151131
151127
|
withCache = false,
|
|
151132
151128
|
target = null,
|
|
@@ -151142,7 +151138,7 @@ var init_util = __esm({
|
|
|
151142
151138
|
const requestBody = {
|
|
151143
151139
|
...nowConfig,
|
|
151144
151140
|
env,
|
|
151145
|
-
build:
|
|
151141
|
+
build: build2,
|
|
151146
151142
|
public: wantsPublic || nowConfig.public,
|
|
151147
151143
|
name,
|
|
151148
151144
|
project,
|
|
@@ -152113,7 +152109,7 @@ var init_deploy2 = __esm({
|
|
|
152113
152109
|
return 1;
|
|
152114
152110
|
}
|
|
152115
152111
|
const prebuiltBuild = await getPrebuiltJson(vercelOutputDir);
|
|
152116
|
-
const prebuiltError = prebuiltBuild?.error || prebuiltBuild?.builds?.find((
|
|
152112
|
+
const prebuiltError = prebuiltBuild?.error || prebuiltBuild?.builds?.find((build2) => "error" in build2)?.error;
|
|
152117
152113
|
if (prebuiltError) {
|
|
152118
152114
|
output_manager_default.log(
|
|
152119
152115
|
`Prebuilt deployment cannot be created because ${getCommandName(
|
|
@@ -170181,8 +170177,8 @@ async function getReachableHostOnPort(port) {
|
|
|
170181
170177
|
]);
|
|
170182
170178
|
return results.find(Boolean) || false;
|
|
170183
170179
|
}
|
|
170184
|
-
function filterFrontendBuilds(
|
|
170185
|
-
const { name } = (0, import_npm_package_arg2.default)(
|
|
170180
|
+
function filterFrontendBuilds(build2) {
|
|
170181
|
+
const { name } = (0, import_npm_package_arg2.default)(build2.use);
|
|
170186
170182
|
return !frontendRuntimeSet.has(name || "");
|
|
170187
170183
|
}
|
|
170188
170184
|
function hasNewRoutingProperties(vercelConfig) {
|
|
@@ -177658,7 +177654,7 @@ var init_builds = __esm({
|
|
|
177658
177654
|
getCommonPath = (buildGroup) => {
|
|
177659
177655
|
const commonPath = [];
|
|
177660
177656
|
const splits = buildGroup.map(
|
|
177661
|
-
(
|
|
177657
|
+
(build2) => getDirPath(build2.entrypoint).split("/")
|
|
177662
177658
|
);
|
|
177663
177659
|
const shortest = splits.reduce(
|
|
177664
177660
|
(prevValue, currentValue) => Math.min(prevValue, currentValue.length),
|
|
@@ -177674,15 +177670,15 @@ var init_builds = __esm({
|
|
|
177674
177670
|
}
|
|
177675
177671
|
return commonPath.join("/") || "/";
|
|
177676
177672
|
};
|
|
177677
|
-
styleBuild = (
|
|
177678
|
-
const { entrypoint, id } =
|
|
177673
|
+
styleBuild = (build2, times, longestSource) => {
|
|
177674
|
+
const { entrypoint, id } = build2;
|
|
177679
177675
|
const time = typeof times[id] === "string" ? times[id] : "";
|
|
177680
177676
|
let pathColor = import_chalk98.default.cyan;
|
|
177681
|
-
if (isFailed(
|
|
177677
|
+
if (isFailed(build2)) {
|
|
177682
177678
|
pathColor = import_chalk98.default.red;
|
|
177683
177679
|
}
|
|
177684
177680
|
const entry = entrypoint.padEnd(longestSource + padding);
|
|
177685
|
-
const prefix = hasOutput(
|
|
177681
|
+
const prefix = hasOutput(build2) ? "\u250C" : "\u2576";
|
|
177686
177682
|
return `${import_chalk98.default.grey(prefix)} ${pathColor(entry)}${time}`;
|
|
177687
177683
|
};
|
|
177688
177684
|
styleHiddenBuilds = (commonPath, buildGroup, times, longestSource, isHidden2 = false) => {
|
|
@@ -177774,7 +177770,7 @@ var init_builds = __esm({
|
|
|
177774
177770
|
return nextList;
|
|
177775
177771
|
};
|
|
177776
177772
|
builds_default = (builds, times) => {
|
|
177777
|
-
let path11 = builds.sort(sortByEntrypoint).map((
|
|
177773
|
+
let path11 = builds.sort(sortByEntrypoint).map((build2) => [build2]);
|
|
177778
177774
|
const highestLevel = builds.reduce((prev, curr) => {
|
|
177779
177775
|
const partCounter = curr.entrypoint.split("/").length - 1;
|
|
177780
177776
|
return partCounter > prev ? partCounter : prev;
|
|
@@ -177837,9 +177833,9 @@ var init_builds = __esm({
|
|
|
177837
177833
|
finalBuildsLength++;
|
|
177838
177834
|
}
|
|
177839
177835
|
const outputs = [];
|
|
177840
|
-
for (const
|
|
177841
|
-
if (Array.isArray(
|
|
177842
|
-
outputs.push(...
|
|
177836
|
+
for (const build2 of buildGroup) {
|
|
177837
|
+
if (Array.isArray(build2.output)) {
|
|
177838
|
+
outputs.push(...build2.output);
|
|
177843
177839
|
}
|
|
177844
177840
|
}
|
|
177845
177841
|
outputs.slice(0, MAX_OUTPUTS_PER_GROUP).forEach(
|
|
@@ -178174,8 +178170,8 @@ async function printDetails({
|
|
|
178174
178170
|
}
|
|
178175
178171
|
if (builds.length > 0) {
|
|
178176
178172
|
const times = {};
|
|
178177
|
-
for (const
|
|
178178
|
-
const { id: id2, createdAt: createdAt2, readyStateAt } =
|
|
178173
|
+
for (const build2 of builds) {
|
|
178174
|
+
const { id: id2, createdAt: createdAt2, readyStateAt } = build2;
|
|
178179
178175
|
times[id2] = createdAt2 && readyStateAt ? elapsed(readyStateAt - createdAt2) : null;
|
|
178180
178176
|
}
|
|
178181
178177
|
print(import_chalk100.default.bold(" Builds\n\n"));
|