vercel 48.10.1 → 48.10.2
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 +55 -23
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -146351,29 +146351,42 @@ var init_unzip = __esm({
|
|
|
146351
146351
|
});
|
|
146352
146352
|
|
|
146353
146353
|
// src/util/build/write-build-result.ts
|
|
146354
|
-
async function writeBuildResult(
|
|
146354
|
+
async function writeBuildResult(args2) {
|
|
146355
|
+
const {
|
|
146356
|
+
repoRootPath,
|
|
146357
|
+
outputDir,
|
|
146358
|
+
buildResult,
|
|
146359
|
+
build: build2,
|
|
146360
|
+
builder,
|
|
146361
|
+
builderPkg,
|
|
146362
|
+
vercelConfig,
|
|
146363
|
+
standalone,
|
|
146364
|
+
workPath
|
|
146365
|
+
} = args2;
|
|
146355
146366
|
let version2 = builder.version;
|
|
146356
146367
|
if ((0, import_build_utils11.isExperimentalBackendsEnabled)() && "output" in buildResult) {
|
|
146357
146368
|
version2 = 2;
|
|
146358
146369
|
}
|
|
146359
146370
|
if (typeof version2 !== "number" || version2 === 2) {
|
|
146360
|
-
return writeBuildResultV2(
|
|
146371
|
+
return writeBuildResultV2({
|
|
146361
146372
|
repoRootPath,
|
|
146362
146373
|
outputDir,
|
|
146363
146374
|
buildResult,
|
|
146364
|
-
build2,
|
|
146375
|
+
build: build2,
|
|
146365
146376
|
vercelConfig,
|
|
146366
|
-
standalone
|
|
146367
|
-
|
|
146377
|
+
standalone,
|
|
146378
|
+
workPath
|
|
146379
|
+
});
|
|
146368
146380
|
} else if (version2 === 3) {
|
|
146369
|
-
return writeBuildResultV3(
|
|
146381
|
+
return writeBuildResultV3({
|
|
146370
146382
|
repoRootPath,
|
|
146371
146383
|
outputDir,
|
|
146372
146384
|
buildResult,
|
|
146373
|
-
build2,
|
|
146385
|
+
build: build2,
|
|
146374
146386
|
vercelConfig,
|
|
146375
|
-
standalone
|
|
146376
|
-
|
|
146387
|
+
standalone,
|
|
146388
|
+
workPath
|
|
146389
|
+
});
|
|
146377
146390
|
}
|
|
146378
146391
|
throw new Error(
|
|
146379
146392
|
`Unsupported Builder version \`${version2}\` from "${builderPkg.name}"`
|
|
@@ -146395,7 +146408,15 @@ function isFile(v) {
|
|
|
146395
146408
|
function stripDuplicateSlashes(path11) {
|
|
146396
146409
|
return normalize2(path11).replace(/(^\/|\/$)/g, "");
|
|
146397
146410
|
}
|
|
146398
|
-
async function writeBuildResultV2(
|
|
146411
|
+
async function writeBuildResultV2(args2) {
|
|
146412
|
+
const {
|
|
146413
|
+
repoRootPath,
|
|
146414
|
+
outputDir,
|
|
146415
|
+
buildResult,
|
|
146416
|
+
build: build2,
|
|
146417
|
+
vercelConfig,
|
|
146418
|
+
standalone
|
|
146419
|
+
} = args2;
|
|
146399
146420
|
if ("buildOutputPath" in buildResult) {
|
|
146400
146421
|
await mergeBuilderOutput(outputDir, buildResult);
|
|
146401
146422
|
return;
|
|
@@ -146497,9 +146518,18 @@ async function writeBuildResultV2(repoRootPath, outputDir, buildResult, build2,
|
|
|
146497
146518
|
}
|
|
146498
146519
|
return Object.keys(overrides).length > 0 ? overrides : void 0;
|
|
146499
146520
|
}
|
|
146500
|
-
async function writeBuildResultV3(
|
|
146521
|
+
async function writeBuildResultV3(args2) {
|
|
146522
|
+
const {
|
|
146523
|
+
repoRootPath,
|
|
146524
|
+
outputDir,
|
|
146525
|
+
buildResult,
|
|
146526
|
+
build: build2,
|
|
146527
|
+
vercelConfig,
|
|
146528
|
+
standalone,
|
|
146529
|
+
workPath
|
|
146530
|
+
} = args2;
|
|
146501
146531
|
const { output: output2 } = buildResult;
|
|
146502
|
-
const routesJsonPath = (0, import_path21.join)(
|
|
146532
|
+
const routesJsonPath = (0, import_path21.join)(workPath, ".vercel", "routes.json");
|
|
146503
146533
|
if ((0, import_build_utils11.isBackendBuilder)(build2) && (0, import_fs_extra12.existsSync)(routesJsonPath)) {
|
|
146504
146534
|
try {
|
|
146505
146535
|
const newOutput = {
|
|
@@ -146516,14 +146546,15 @@ async function writeBuildResultV3(repoRootPath, outputDir, buildResult, build2,
|
|
|
146516
146546
|
}
|
|
146517
146547
|
}
|
|
146518
146548
|
}
|
|
146519
|
-
return writeBuildResultV2(
|
|
146549
|
+
return writeBuildResultV2({
|
|
146520
146550
|
repoRootPath,
|
|
146521
146551
|
outputDir,
|
|
146522
|
-
{ output: newOutput, routes: buildResult.routes },
|
|
146523
|
-
build2,
|
|
146552
|
+
buildResult: { output: newOutput, routes: buildResult.routes },
|
|
146553
|
+
build: build2,
|
|
146524
146554
|
vercelConfig,
|
|
146525
|
-
standalone
|
|
146526
|
-
|
|
146555
|
+
standalone,
|
|
146556
|
+
workPath
|
|
146557
|
+
});
|
|
146527
146558
|
} catch (error3) {
|
|
146528
146559
|
output_manager_default.error(`Failed to read routes.json: ${error3}`);
|
|
146529
146560
|
}
|
|
@@ -148819,7 +148850,7 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span, stand
|
|
|
148819
148850
|
}
|
|
148820
148851
|
}
|
|
148821
148852
|
if ("output" in buildResult && buildResult.output && (0, import_build_utils13.isBackendBuilder)(build2)) {
|
|
148822
|
-
const routesJsonPath = (0, import_path27.join)(
|
|
148853
|
+
const routesJsonPath = (0, import_path27.join)(workPath, ".vercel", "routes.json");
|
|
148823
148854
|
if ((0, import_fs_extra18.existsSync)(routesJsonPath)) {
|
|
148824
148855
|
try {
|
|
148825
148856
|
const routesJson = await readJSONFile(routesJsonPath);
|
|
@@ -148862,16 +148893,17 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span, stand
|
|
|
148862
148893
|
builderSpan.child("vc.builder.writeBuildResult", {
|
|
148863
148894
|
buildOutputLength: String(buildOutputLength)
|
|
148864
148895
|
}).trace(
|
|
148865
|
-
() => writeBuildResult(
|
|
148896
|
+
() => writeBuildResult({
|
|
148866
148897
|
repoRootPath,
|
|
148867
148898
|
outputDir,
|
|
148868
148899
|
buildResult,
|
|
148869
|
-
build2,
|
|
148900
|
+
build: build2,
|
|
148870
148901
|
builder,
|
|
148871
148902
|
builderPkg,
|
|
148872
|
-
localConfig,
|
|
148873
|
-
standalone
|
|
148874
|
-
|
|
148903
|
+
vercelConfig: localConfig,
|
|
148904
|
+
standalone,
|
|
148905
|
+
workPath
|
|
148906
|
+
})
|
|
148875
148907
|
).then(
|
|
148876
148908
|
(override) => {
|
|
148877
148909
|
if (override)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vercel",
|
|
3
|
-
"version": "48.10.
|
|
3
|
+
"version": "48.10.2",
|
|
4
4
|
"preferGlobal": true,
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "The command-line interface for Vercel",
|
|
@@ -171,8 +171,8 @@
|
|
|
171
171
|
"xdg-app-paths": "5.1.0",
|
|
172
172
|
"yauzl-promise": "2.1.3",
|
|
173
173
|
"@vercel-internals/constants": "1.0.4",
|
|
174
|
-
"@vercel-internals/
|
|
175
|
-
"@vercel-internals/
|
|
174
|
+
"@vercel-internals/types": "3.0.6",
|
|
175
|
+
"@vercel-internals/get-package-json": "1.0.0"
|
|
176
176
|
},
|
|
177
177
|
"scripts": {
|
|
178
178
|
"test": "jest --reporters=default --reporters=jest-junit --env node --verbose --bail",
|