vercel 54.15.1 → 54.17.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/chunks/{add-BHCMFK52.js → add-QQY6QOTO.js} +5 -5
- package/dist/chunks/{chunk-4TL5EF3A.js → chunk-2F6JT2OC.js} +4 -1
- package/dist/chunks/{chunk-AWD3IGXU.js → chunk-3NR6OYDV.js} +1 -1
- package/dist/chunks/{chunk-RWRYDAUG.js → chunk-4D42VZRX.js} +1 -1
- package/dist/chunks/{chunk-OOGTHUXU.js → chunk-5X7FBWLF.js} +6 -6
- package/dist/chunks/{chunk-CQ24PL4F.js → chunk-7AQDR2RX.js} +48 -9
- package/dist/chunks/{chunk-TAUAS27Y.js → chunk-7B44AIGE.js} +2 -2
- package/dist/chunks/{chunk-CBMMVXLH.js → chunk-A4B4JQVP.js} +11 -3
- package/dist/chunks/{chunk-AQWK7XXE.js → chunk-BRLY3Q4U.js} +18 -3
- package/dist/chunks/{chunk-D7U6YBVT.js → chunk-DDTKG4J3.js} +1 -1
- package/dist/chunks/{chunk-OEFNWW5M.js → chunk-E6FCE2XJ.js} +2 -2
- package/dist/chunks/{chunk-JNVCGTF2.js → chunk-HJ2TEW5Y.js} +1 -1
- package/dist/chunks/{chunk-PMUUPCDL.js → chunk-JFA4NUXP.js} +1 -1
- package/dist/chunks/{chunk-MABHXDYV.js → chunk-KTX4RQFM.js} +520 -133
- package/dist/chunks/{chunk-TDFUNPL7.js → chunk-KWCZRH7N.js} +5 -8
- package/dist/chunks/{chunk-B5DP7FOH.js → chunk-LGR4JRFA.js} +6 -6
- package/dist/chunks/{chunk-UJZ4RUU6.js → chunk-MS3WAXLU.js} +1 -1
- package/dist/chunks/{chunk-4OEXX4CB.js → chunk-NRIXI6V5.js} +1 -1
- package/dist/chunks/{chunk-4GQBO7KU.js → chunk-P5AZW6W6.js} +8 -2
- package/dist/chunks/{chunk-HIYWSGI7.js → chunk-Q77ALSXR.js} +3 -0
- package/dist/chunks/{chunk-5X6ILMYI.js → chunk-V7JDSYIZ.js} +3 -3
- package/dist/chunks/{chunk-UYC2Q5YZ.js → chunk-WJPWCLMH.js} +1 -1
- package/dist/chunks/{chunk-UEPXHHDN.js → chunk-YW7AYO7N.js} +1 -1
- package/dist/chunks/{compile-vercel-config-LUMMHFTD.js → compile-vercel-config-D2OQCK4B.js} +2 -2
- package/dist/chunks/{delete-X6VOLLCP.js → delete-VMW7FORM.js} +3 -3
- package/dist/chunks/{disable-LFH5IOCZ.js → disable-BDFZELDL.js} +3 -3
- package/dist/chunks/{discard-EVD33PAE.js → discard-WIN3BOXR.js} +3 -3
- package/dist/chunks/{edit-FL3SRS2I.js → edit-IZQX4XAG.js} +5 -5
- package/dist/chunks/{enable-HTU7LQK5.js → enable-RFODZ2L7.js} +3 -3
- package/dist/chunks/{export-R222C6IH.js → export-5CCLXZYT.js} +3 -3
- package/dist/chunks/{inspect-YYTAQP3A.js → inspect-GEUUTDBY.js} +4 -4
- package/dist/chunks/{list-SWJFJSEE.js → list-H35AGNO2.js} +3 -3
- package/dist/chunks/{list-AOJMWKA7.js → list-JIYDXQDJ.js} +4 -4
- package/dist/chunks/{ls-H7KDHFK6.js → ls-WPNFJAS6.js} +5 -5
- package/dist/chunks/{publish-O5VKBFJ6.js → publish-K7OPKXYC.js} +3 -3
- package/dist/chunks/{query-7UDJEOOR.js → query-MAN4NKU4.js} +3 -3
- package/dist/chunks/{reorder-ZPI6Q7DQ.js → reorder-GQ7BOQA7.js} +3 -3
- package/dist/chunks/{restore-7FNMEG4A.js → restore-MODYFJSP.js} +3 -3
- package/dist/chunks/{rm-U37YHRNF.js → rm-A45OKS6U.js} +5 -5
- package/dist/chunks/{routes-YEU33SON.js → routes-KUTLDFIF.js} +2 -2
- package/dist/chunks/{rule-inspect-CVI3TQHN.js → rule-inspect-HJCERQHK.js} +5 -5
- package/dist/chunks/{rules-ZTL4JCZO.js → rules-UNL3IB4P.js} +6 -6
- package/dist/chunks/{schema-LZ6VDRGM.js → schema-WOW2BATT.js} +3 -3
- package/dist/chunks/{update-O6FSP627.js → update-MOM4T2RN.js} +5 -5
- package/dist/commands/build/index.js +18 -18
- package/dist/commands/deploy/index.js +160 -13
- package/dist/commands/dev/index.js +665 -104
- package/dist/commands/env/index.js +6 -6
- package/dist/commands/link/index.js +47 -13
- package/dist/commands/list/index.js +5 -5
- package/dist/commands-bulk.js +44 -40
- package/dist/index.js +46 -42
- package/dist/version.mjs +1 -1
- package/package.json +21 -20
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
handleRulesApiError,
|
|
10
10
|
parseRulesFlagsAndScope,
|
|
11
11
|
rulesCollectionPath
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-HJ2TEW5Y.js";
|
|
13
|
+
import "./chunk-7B44AIGE.js";
|
|
14
14
|
import "./chunk-D7MGZH35.js";
|
|
15
15
|
import {
|
|
16
16
|
validateJsonOutput
|
|
@@ -21,9 +21,9 @@ import {
|
|
|
21
21
|
import {
|
|
22
22
|
AGENT_REASON
|
|
23
23
|
} from "./chunk-QH7WYDEP.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-2F6JT2OC.js";
|
|
25
|
+
import "./chunk-KTX4RQFM.js";
|
|
26
|
+
import "./chunk-Q77ALSXR.js";
|
|
27
27
|
import {
|
|
28
28
|
buildCommandWithGlobalFlags,
|
|
29
29
|
outputAgentError
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
getTeamById,
|
|
12
12
|
getUser,
|
|
13
13
|
getVercelDirectory
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-KTX4RQFM.js";
|
|
15
15
|
import {
|
|
16
16
|
TeamDeleted
|
|
17
17
|
} from "./chunk-LN6B7ZI3.js";
|
|
@@ -27,6 +27,9 @@ async function getScope(client, opts = {}) {
|
|
|
27
27
|
let team = null;
|
|
28
28
|
const defaultTeamId = user.version === "northstar" ? user.defaultTeamId : void 0;
|
|
29
29
|
const currentTeamOrDefaultTeamId = client.config.currentTeam || defaultTeamId;
|
|
30
|
+
if (!client.config.currentTeam && defaultTeamId) {
|
|
31
|
+
client.config.currentTeam = defaultTeamId;
|
|
32
|
+
}
|
|
30
33
|
if (currentTeamOrDefaultTeamId && opts.getTeam !== false) {
|
|
31
34
|
team = await getTeamById(client, currentTeamOrDefaultTeamId);
|
|
32
35
|
if (!team) {
|
|
@@ -7,30 +7,30 @@ const __dirname = __dirname_(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
getUpdateCommandInfo,
|
|
9
9
|
isGlobal
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-E6FCE2XJ.js";
|
|
11
11
|
import {
|
|
12
12
|
getGlobalPathConfig,
|
|
13
13
|
progress,
|
|
14
14
|
writeToConfigFile
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-A4B4JQVP.js";
|
|
16
16
|
import {
|
|
17
17
|
apiCommand,
|
|
18
18
|
listSubcommand2 as listSubcommand,
|
|
19
19
|
loginCommand
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-BRLY3Q4U.js";
|
|
21
21
|
import {
|
|
22
22
|
require_semver
|
|
23
23
|
} from "./chunk-IB5L4LKZ.js";
|
|
24
24
|
import {
|
|
25
25
|
help
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-3NR6OYDV.js";
|
|
27
27
|
import {
|
|
28
28
|
login
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-KTX4RQFM.js";
|
|
30
30
|
import {
|
|
31
31
|
TelemetryClient,
|
|
32
32
|
isNativeBinaryInstall
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-Q77ALSXR.js";
|
|
34
34
|
import {
|
|
35
35
|
require_ms
|
|
36
36
|
} from "./chunk-GGP5R3FU.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
require_lib,
|
|
19
19
|
require_minimatch,
|
|
20
20
|
require_pluralize
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-KTX4RQFM.js";
|
|
22
22
|
import {
|
|
23
23
|
CantParseJSONFile,
|
|
24
24
|
cmd,
|
|
@@ -11422,6 +11422,9 @@ async function writeBuildResult(args) {
|
|
|
11422
11422
|
function isEdgeFunction(v) {
|
|
11423
11423
|
return v?.type === "EdgeFunction";
|
|
11424
11424
|
}
|
|
11425
|
+
function isContainerImage(v) {
|
|
11426
|
+
return v?.runtime === "container";
|
|
11427
|
+
}
|
|
11425
11428
|
function isLambda(v) {
|
|
11426
11429
|
return v?.type === "Lambda";
|
|
11427
11430
|
}
|
|
@@ -11432,21 +11435,23 @@ function isFile(v) {
|
|
|
11432
11435
|
const type = v?.type;
|
|
11433
11436
|
return type === "FileRef" || type === "FileFsRef" || type === "FileBlob";
|
|
11434
11437
|
}
|
|
11435
|
-
function injectServiceEnvVars(
|
|
11438
|
+
function injectServiceEnvVars(fn, service, stripServiceRoutePrefix = false) {
|
|
11439
|
+
const target = fn.config ?? fn;
|
|
11440
|
+
target.environment ??= {};
|
|
11436
11441
|
if (service?.name) {
|
|
11437
|
-
|
|
11442
|
+
target.environment.VERCEL_SERVICE_NAME = service.name;
|
|
11438
11443
|
}
|
|
11439
11444
|
if (service?.type) {
|
|
11440
|
-
|
|
11445
|
+
target.environment.VERCEL_SERVICE_TYPE = service.type;
|
|
11441
11446
|
}
|
|
11442
11447
|
if (service?.trigger) {
|
|
11443
|
-
|
|
11448
|
+
target.environment.VERCEL_SERVICE_TRIGGER = service.trigger;
|
|
11444
11449
|
}
|
|
11445
11450
|
if (service?.routePrefix && service.routePrefix !== "/") {
|
|
11446
|
-
|
|
11451
|
+
target.environment.VERCEL_SERVICE_ROUTE_PREFIX = service.routePrefix;
|
|
11447
11452
|
}
|
|
11448
11453
|
if (stripServiceRoutePrefix) {
|
|
11449
|
-
|
|
11454
|
+
target.environment.VERCEL_SERVICE_ROUTE_PREFIX_STRIP = "1";
|
|
11450
11455
|
}
|
|
11451
11456
|
}
|
|
11452
11457
|
function stripDuplicateSlashes(path2) {
|
|
@@ -11483,7 +11488,14 @@ async function writeBuildResultV2(args) {
|
|
|
11483
11488
|
const overrides = {};
|
|
11484
11489
|
for (const [path2, output] of Object.entries(buildResult.output)) {
|
|
11485
11490
|
const normalizedPath = stripDuplicateSlashes(path2);
|
|
11486
|
-
if (
|
|
11491
|
+
if (isContainerImage(output)) {
|
|
11492
|
+
injectServiceEnvVars(
|
|
11493
|
+
output,
|
|
11494
|
+
service && isExperimentalService(service) ? service : void 0,
|
|
11495
|
+
stripServiceRoutePrefix
|
|
11496
|
+
);
|
|
11497
|
+
await writeContainerImage(outputDir, output, normalizedPath);
|
|
11498
|
+
} else if (isLambda(output)) {
|
|
11487
11499
|
injectServiceEnvVars(
|
|
11488
11500
|
output,
|
|
11489
11501
|
service && isExperimentalService(service) ? service : void 0,
|
|
@@ -11649,7 +11661,14 @@ async function writeBuildResultV3(args) {
|
|
|
11649
11661
|
const path2 = service && typeof service.runtime === "string" ? stripDuplicateSlashes((0, import_fs_detectors2.getInternalServiceFunctionPath)(service.name)) : stripDuplicateSlashes(
|
|
11650
11662
|
build2.config?.zeroConfig ? src.substring(0, src.length - ext.length) : src
|
|
11651
11663
|
);
|
|
11652
|
-
if (
|
|
11664
|
+
if (isContainerImage(output)) {
|
|
11665
|
+
injectServiceEnvVars(
|
|
11666
|
+
output,
|
|
11667
|
+
service && isExperimentalService(service) ? service : void 0,
|
|
11668
|
+
stripServiceRoutePrefix
|
|
11669
|
+
);
|
|
11670
|
+
await writeContainerImage(outputDir, output, path2);
|
|
11671
|
+
} else if (isLambda(output)) {
|
|
11653
11672
|
injectServiceEnvVars(
|
|
11654
11673
|
output,
|
|
11655
11674
|
service && isExperimentalService(service) ? service : void 0,
|
|
@@ -11726,6 +11745,26 @@ async function writeFunctionSymlink(outputDir, dest, fn, existingFunctions) {
|
|
|
11726
11745
|
await import_fs_extra5.default.symlink(target, dest);
|
|
11727
11746
|
return true;
|
|
11728
11747
|
}
|
|
11748
|
+
async function writeContainerImage(outputDir, containerImage, path2) {
|
|
11749
|
+
const dest = join4(outputDir, "functions", `${path2}.func`);
|
|
11750
|
+
const handler = containerImage.handler;
|
|
11751
|
+
if (typeof handler !== "string" || handler.length === 0) {
|
|
11752
|
+
throw new Error(
|
|
11753
|
+
`Container image output for "${path2}" is missing "handler".`
|
|
11754
|
+
);
|
|
11755
|
+
}
|
|
11756
|
+
await import_fs_extra5.default.mkdirp(dest);
|
|
11757
|
+
await import_fs_extra5.default.writeJSON(
|
|
11758
|
+
join4(dest, ".vc-config.json"),
|
|
11759
|
+
{
|
|
11760
|
+
handler,
|
|
11761
|
+
runtime: "container",
|
|
11762
|
+
environment: containerImage.environment ?? {},
|
|
11763
|
+
...containerImage.command ? { command: containerImage.command } : {}
|
|
11764
|
+
},
|
|
11765
|
+
{ spaces: 2 }
|
|
11766
|
+
);
|
|
11767
|
+
}
|
|
11729
11768
|
async function writeEdgeFunction(repoRootPath, outputDir, edgeFunction, path2, existingFunctions, standalone = false) {
|
|
11730
11769
|
const dest = join4(outputDir, "functions", `${path2}.func`);
|
|
11731
11770
|
if (existingFunctions) {
|
|
@@ -12,11 +12,11 @@ import {
|
|
|
12
12
|
} from "./chunk-QH7WYDEP.js";
|
|
13
13
|
import {
|
|
14
14
|
getScope
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-2F6JT2OC.js";
|
|
16
16
|
import {
|
|
17
17
|
getLinkedProject,
|
|
18
18
|
getProjectByNameOrId
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-KTX4RQFM.js";
|
|
20
20
|
import {
|
|
21
21
|
buildCommandWithGlobalFlags,
|
|
22
22
|
outputAgentError
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-V5P25P7F.js";
|
|
10
10
|
import {
|
|
11
11
|
getLocalPathConfig
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MS3WAXLU.js";
|
|
13
13
|
import {
|
|
14
14
|
DEFAULT_VERCEL_CONFIG_FILENAME,
|
|
15
15
|
VERCEL_CONFIG_EXTENSIONS,
|
|
@@ -36,10 +36,10 @@ import {
|
|
|
36
36
|
useKeypress,
|
|
37
37
|
usePrefix,
|
|
38
38
|
useState
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-KTX4RQFM.js";
|
|
40
40
|
import {
|
|
41
41
|
require_load_json_file
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-Q77ALSXR.js";
|
|
43
43
|
import {
|
|
44
44
|
require_lib as require_lib2
|
|
45
45
|
} from "./chunk-N2T234LO.js";
|
|
@@ -1901,6 +1901,14 @@ Are you sure you want to proceed?`;
|
|
|
1901
1901
|
if (this.agentName) {
|
|
1902
1902
|
headers.set("x-ai-agent", this.agentName);
|
|
1903
1903
|
}
|
|
1904
|
+
headers.set(
|
|
1905
|
+
"x-vercel-cli-session-id",
|
|
1906
|
+
this.telemetryEventStore.currentSessionId
|
|
1907
|
+
);
|
|
1908
|
+
headers.set(
|
|
1909
|
+
"x-vercel-cli-invocation-id",
|
|
1910
|
+
this.telemetryEventStore.currentInvocationId
|
|
1911
|
+
);
|
|
1904
1912
|
await this.ensureAuthorized();
|
|
1905
1913
|
if (this.authConfig.token) {
|
|
1906
1914
|
headers.set("authorization", `Bearer ${this.authConfig.token}`);
|
|
@@ -25,10 +25,10 @@ import {
|
|
|
25
25
|
import {
|
|
26
26
|
buildCommand,
|
|
27
27
|
pullCommand
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-YW7AYO7N.js";
|
|
29
29
|
import {
|
|
30
30
|
envCommand
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-KTX4RQFM.js";
|
|
32
32
|
import {
|
|
33
33
|
confirmOption,
|
|
34
34
|
deploymentOption,
|
|
@@ -192,7 +192,7 @@ var continueSubcommand = {
|
|
|
192
192
|
var deployCommand = {
|
|
193
193
|
name: "deploy",
|
|
194
194
|
aliases: [],
|
|
195
|
-
description: "Deploy your project to Vercel. The `deploy` command is the default command for the Vercel CLI, and can be omitted (`vc deploy my-app` equals `vc my-app`).",
|
|
195
|
+
description: "Deploy your project to Vercel. The `deploy` command is the default command for the Vercel CLI, and can be omitted (`vc deploy my-app` equals `vc my-app`). Use `--dry` to inspect the detected framework preset and source files without deploying.",
|
|
196
196
|
arguments: [
|
|
197
197
|
{
|
|
198
198
|
name: "project-path",
|
|
@@ -273,6 +273,13 @@ var deployCommand = {
|
|
|
273
273
|
deprecated: false,
|
|
274
274
|
description: "Don't wait for the deployment to finish"
|
|
275
275
|
},
|
|
276
|
+
{
|
|
277
|
+
name: "dry",
|
|
278
|
+
shorthand: null,
|
|
279
|
+
type: Boolean,
|
|
280
|
+
deprecated: false,
|
|
281
|
+
description: "Inspect the detected framework preset and source files without uploading or creating a deployment. Non-TTY output includes every file as JSON"
|
|
282
|
+
},
|
|
276
283
|
{
|
|
277
284
|
name: "skip-domain",
|
|
278
285
|
shorthand: null,
|
|
@@ -347,6 +354,14 @@ var deployCommand = {
|
|
|
347
354
|
name: "Deploy with prebuilt outputs",
|
|
348
355
|
value: ["vercel build", "vercel deploy --prebuilt"]
|
|
349
356
|
},
|
|
357
|
+
{
|
|
358
|
+
name: "Inspect deployment inputs without deploying",
|
|
359
|
+
value: "vercel deploy --dry"
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
name: "Get every deployment file as JSON",
|
|
363
|
+
value: "vercel deploy --dry --format=json"
|
|
364
|
+
},
|
|
350
365
|
{
|
|
351
366
|
name: "Write Deployment URL to a file",
|
|
352
367
|
value: "vercel > deployment-url.txt"
|
|
@@ -6,10 +6,10 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
require_lib
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KTX4RQFM.js";
|
|
10
10
|
import {
|
|
11
11
|
isNativeBinaryInstall
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-Q77ALSXR.js";
|
|
13
13
|
import {
|
|
14
14
|
packageName
|
|
15
15
|
} from "./chunk-LN6B7ZI3.js";
|
|
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
TelemetryClient
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-Q77ALSXR.js";
|
|
10
10
|
|
|
11
11
|
// src/util/telemetry/commands/routes/index.ts
|
|
12
12
|
var RoutesTelemetryClient = class extends TelemetryClient {
|