vercel 54.14.0 → 54.14.1

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.
Files changed (61) hide show
  1. package/dist/chunks/{add-PVEKZBHH.js → add-INSQH24S.js} +7 -7
  2. package/dist/chunks/{chunk-FPRA7U2P.js → chunk-467YGYFK.js} +1 -1
  3. package/dist/chunks/{chunk-6K3WJDFA.js → chunk-4WQGP4Z4.js} +9 -9
  4. package/dist/chunks/{chunk-V4GROAUJ.js → chunk-5QKYBWW2.js} +4 -7
  5. package/dist/chunks/chunk-64IF634X.js +18 -0
  6. package/dist/chunks/{chunk-V2WFM23D.js → chunk-74VEZPM6.js} +1 -1
  7. package/dist/chunks/{chunk-5SYDEK2N.js → chunk-D7MGZH35.js} +1 -1
  8. package/dist/chunks/{chunk-Y76J3TGD.js → chunk-DAKMPPIS.js} +1 -1
  9. package/dist/chunks/{chunk-KJ5O7JQQ.js → chunk-F4WXNECT.js} +27 -60
  10. package/dist/chunks/{chunk-RWJORLQP.js → chunk-F6SCQ6XU.js} +58 -16
  11. package/dist/chunks/{chunk-7CJZCFLW.js → chunk-FKNOCLZU.js} +2 -2
  12. package/dist/chunks/{chunk-CO5D46AG.js → chunk-GGP5R3FU.js} +18 -38
  13. package/dist/chunks/{chunk-J5273CSE.js → chunk-HIYWSGI7.js} +19 -10
  14. package/dist/chunks/{chunk-TH555JND.js → chunk-J4LCBXF2.js} +14 -41
  15. package/dist/chunks/{chunk-ABOX5TXU.js → chunk-L7U3Z7E4.js} +3 -3
  16. package/dist/chunks/{chunk-7OZWGXPA.js → chunk-MKB32SJZ.js} +2 -2
  17. package/dist/chunks/{chunk-4KAFHBYE.js → chunk-NMGGBH7K.js} +1 -1
  18. package/dist/chunks/{chunk-C3VH3X5Y.js → chunk-P2AMQX7F.js} +3 -3
  19. package/dist/chunks/{chunk-6D6CSOSK.js → chunk-P6VIXOWO.js} +84 -60
  20. package/dist/chunks/{chunk-PV533MBH.js → chunk-PMUUPCDL.js} +1 -1
  21. package/dist/chunks/{chunk-S4VHXL2Y.js → chunk-TVBXGFEL.js} +1 -1
  22. package/dist/chunks/{chunk-G7QWUIGS.js → chunk-UEFCAT3N.js} +2 -2
  23. package/dist/chunks/{chunk-OEM7RB3X.js → chunk-UJ3ZCBUA.js} +1 -1
  24. package/dist/chunks/{chunk-VNUNCNPE.js → chunk-UPI3OHBK.js} +1 -1
  25. package/dist/chunks/chunk-VXYGCOKL.js +28 -0
  26. package/dist/chunks/{chunk-5UCWXYNH.js → chunk-XLLAD5DR.js} +87 -45
  27. package/dist/chunks/{chunk-Z7KOKD2G.js → chunk-YQPAAXUU.js} +1 -1
  28. package/dist/chunks/{chunk-B6C7NMT3.js → chunk-Z2MBXYZZ.js} +1 -1
  29. package/dist/chunks/{chunk-DAASB6YQ.js → chunk-ZRJQY3VK.js} +22 -2
  30. package/dist/chunks/{compile-vercel-config-MD37D2F7.js → compile-vercel-config-VPPGDFKL.js} +3 -3
  31. package/dist/chunks/{delete-6EMDCXSA.js → delete-O3EHQHYD.js} +8 -6
  32. package/dist/chunks/{disable-FLJ27NHG.js → disable-GJDQC34I.js} +8 -6
  33. package/dist/chunks/{discard-KEIII6RM.js → discard-UZT23XN2.js} +8 -6
  34. package/dist/chunks/{edit-DOL2ZJPG.js → edit-PEQIROSE.js} +10 -8
  35. package/dist/chunks/{enable-PZWZIETT.js → enable-ACNEAJ5S.js} +8 -6
  36. package/dist/chunks/{export-2PFHAELC.js → export-ZICIQKHJ.js} +4 -4
  37. package/dist/chunks/{inspect-WPWOZJ2K.js → inspect-PUFF7LND.js} +6 -6
  38. package/dist/chunks/{list-4R5DCLTB.js → list-FWUV4NO4.js} +5 -5
  39. package/dist/chunks/{list-ZT7QK2H7.js → list-L2UFHHQ7.js} +7 -7
  40. package/dist/chunks/{ls-4JTXQXMQ.js → ls-6HVFGIQS.js} +7 -7
  41. package/dist/chunks/{publish-JV4J3SOA.js → publish-HKTAQMYG.js} +8 -6
  42. package/dist/chunks/{query-N22EYSZZ.js → query-VQ5HDMFO.js} +97 -41
  43. package/dist/chunks/{reorder-TG53BKW4.js → reorder-CVMW6VL7.js} +8 -6
  44. package/dist/chunks/{restore-U7O4VESA.js → restore-32NXH4EH.js} +8 -6
  45. package/dist/chunks/{rm-XA4LYZXI.js → rm-7TPDWMJZ.js} +7 -7
  46. package/dist/chunks/{routes-EAMQVFU2.js → routes-YEU33SON.js} +2 -2
  47. package/dist/chunks/{rule-inspect-HC745CYT.js → rule-inspect-PQORU3SU.js} +7 -7
  48. package/dist/chunks/{rules-RMN72YHN.js → rules-VIITOYFN.js} +6 -6
  49. package/dist/chunks/{schema-CZVKUXM6.js → schema-AECGMSF5.js} +6 -6
  50. package/dist/chunks/{stamp-ENIXDCRO.js → stamp-AA7R3MZS.js} +3 -1
  51. package/dist/chunks/{update-PU3WLIA7.js → update-J4QCT3GS.js} +7 -7
  52. package/dist/commands/build/index.js +16 -14
  53. package/dist/commands/deploy/index.js +22 -163
  54. package/dist/commands/dev/index.js +13 -14
  55. package/dist/commands/env/index.js +153 -92
  56. package/dist/commands/link/index.js +11 -11
  57. package/dist/commands/list/index.js +10 -8
  58. package/dist/commands-bulk.js +222 -85
  59. package/dist/index.js +18 -18
  60. package/dist/version.mjs +1 -1
  61. package/package.json +16 -16
@@ -9,9 +9,9 @@ import {
9
9
  handleRulesApiError,
10
10
  parseRulesFlagsAndScope,
11
11
  rulesCollectionPath
12
- } from "./chunk-7OZWGXPA.js";
13
- import "./chunk-ABOX5TXU.js";
14
- import "./chunk-5SYDEK2N.js";
12
+ } from "./chunk-MKB32SJZ.js";
13
+ import "./chunk-L7U3Z7E4.js";
14
+ import "./chunk-D7MGZH35.js";
15
15
  import {
16
16
  validateJsonOutput
17
17
  } from "./chunk-XPKWKPWA.js";
@@ -21,15 +21,15 @@ import {
21
21
  import {
22
22
  AGENT_REASON
23
23
  } from "./chunk-LJ5WXXG6.js";
24
- import "./chunk-Z7KOKD2G.js";
25
- import "./chunk-5UCWXYNH.js";
26
- import "./chunk-J5273CSE.js";
24
+ import "./chunk-YQPAAXUU.js";
25
+ import "./chunk-XLLAD5DR.js";
26
+ import "./chunk-HIYWSGI7.js";
27
27
  import {
28
28
  buildCommandWithGlobalFlags,
29
29
  outputAgentError
30
30
  } from "./chunk-NHGCQRK5.js";
31
- import "./chunk-CO5D46AG.js";
32
31
  import "./chunk-N2T234LO.js";
32
+ import "./chunk-GGP5R3FU.js";
33
33
  import {
34
34
  getFlagsSpecification,
35
35
  parseArguments,
@@ -8,7 +8,7 @@ import {
8
8
  VERCEL_DIR,
9
9
  VERCEL_DIR_PROJECT,
10
10
  require_lib
11
- } from "./chunk-5UCWXYNH.js";
11
+ } from "./chunk-XLLAD5DR.js";
12
12
  import {
13
13
  require_dist
14
14
  } from "./chunk-Z5SBJH6L.js";
@@ -6,16 +6,19 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  writeProjectSettings
9
- } from "./chunk-FPRA7U2P.js";
9
+ } from "./chunk-467YGYFK.js";
10
+ import {
11
+ stamp_default
12
+ } from "./chunk-64IF634X.js";
10
13
  import {
11
14
  ensureLink
12
- } from "./chunk-7CJZCFLW.js";
15
+ } from "./chunk-FKNOCLZU.js";
13
16
  import {
14
17
  pullCommand
15
- } from "./chunk-OEM7RB3X.js";
18
+ } from "./chunk-UJ3ZCBUA.js";
16
19
  import {
17
20
  help
18
- } from "./chunk-VNUNCNPE.js";
21
+ } from "./chunk-UPI3OHBK.js";
19
22
  import {
20
23
  VERCEL_DIR,
21
24
  VERCEL_DIR_PROJECT,
@@ -23,13 +26,10 @@ import {
23
26
  envPullCommandLogic,
24
27
  humanizePath,
25
28
  parseTarget
26
- } from "./chunk-5UCWXYNH.js";
29
+ } from "./chunk-XLLAD5DR.js";
27
30
  import {
28
31
  TelemetryClient
29
- } from "./chunk-J5273CSE.js";
30
- import {
31
- stamp_default
32
- } from "./chunk-CO5D46AG.js";
32
+ } from "./chunk-HIYWSGI7.js";
33
33
  import {
34
34
  getFlagsSpecification,
35
35
  parseArguments,
@@ -6,7 +6,10 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  require_lib
9
- } from "./chunk-5UCWXYNH.js";
9
+ } from "./chunk-XLLAD5DR.js";
10
+ import {
11
+ isNativeBinaryInstall
12
+ } from "./chunk-HIYWSGI7.js";
10
13
  import {
11
14
  packageName
12
15
  } from "./chunk-LN6B7ZI3.js";
@@ -14,11 +17,6 @@ import {
14
17
  __toESM
15
18
  } from "./chunk-TZ2YI2VH.js";
16
19
 
17
- // src/util/native-install.ts
18
- function isNativeBinaryInstall() {
19
- return process.env.VERCEL_VC_NATIVE === "1";
20
- }
21
-
22
20
  // src/util/get-update-command.ts
23
21
  var import_fs_extra = __toESM(require_lib(), 1);
24
22
  import { sep, dirname, join, resolve } from "path";
@@ -174,7 +172,6 @@ async function getUpdateCommand() {
174
172
  }
175
173
 
176
174
  export {
177
- isNativeBinaryInstall,
178
175
  isGlobal,
179
176
  getUpdateCommandInfo,
180
177
  getUpdateCommand
@@ -0,0 +1,18 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import {
8
+ elapsed
9
+ } from "./chunk-VXYGCOKL.js";
10
+
11
+ // src/util/output/stamp.ts
12
+ var stamp_default = (start = Date.now()) => {
13
+ return () => elapsed(Date.now() - start);
14
+ };
15
+
16
+ export {
17
+ stamp_default
18
+ };
@@ -7,7 +7,7 @@ const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  VERCEL_DIR,
9
9
  isVercelTomlEnabled
10
- } from "./chunk-5UCWXYNH.js";
10
+ } from "./chunk-XLLAD5DR.js";
11
11
  import {
12
12
  parseArguments
13
13
  } from "./chunk-6IQZVQV6.js";
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  require_ms
9
- } from "./chunk-CO5D46AG.js";
9
+ } from "./chunk-GGP5R3FU.js";
10
10
  import {
11
11
  output_manager_default
12
12
  } from "./chunk-Z5SBJH6L.js";
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  STANDARD_ENVIRONMENTS
9
- } from "./chunk-5UCWXYNH.js";
9
+ } from "./chunk-XLLAD5DR.js";
10
10
  import {
11
11
  getCommandName,
12
12
  require_lib
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  metricsCommand
9
- } from "./chunk-DAASB6YQ.js";
9
+ } from "./chunk-ZRJQY3VK.js";
10
10
  import {
11
11
  routesCommand
12
12
  } from "./chunk-WFRHKZFI.js";
@@ -25,10 +25,10 @@ import {
25
25
  import {
26
26
  buildCommand,
27
27
  pullCommand
28
- } from "./chunk-OEM7RB3X.js";
28
+ } from "./chunk-UJ3ZCBUA.js";
29
29
  import {
30
30
  envCommand
31
- } from "./chunk-5UCWXYNH.js";
31
+ } from "./chunk-XLLAD5DR.js";
32
32
  import {
33
33
  confirmOption,
34
34
  forceOption,
@@ -66,13 +66,6 @@ var initSubcommand = {
66
66
  deprecated: false,
67
67
  description: 'Retain build cache when using "--force"'
68
68
  },
69
- {
70
- name: "public",
71
- shorthand: "p",
72
- type: Boolean,
73
- deprecated: false,
74
- description: "Deployment is public (`/_src`) is exposed)"
75
- },
76
69
  {
77
70
  name: "env",
78
71
  shorthand: "e",
@@ -142,21 +135,7 @@ var initSubcommand = {
142
135
  formatOption,
143
136
  jsonOption,
144
137
  confirmOption,
145
- projectOption,
146
- {
147
- name: "functions-beta",
148
- shorthand: null,
149
- type: Boolean,
150
- deprecated: false
151
- // No description — keeps it hidden from --help output
152
- },
153
- {
154
- name: "no-functions-beta",
155
- shorthand: null,
156
- type: Boolean,
157
- deprecated: false
158
- // No description — keeps it hidden from --help output
159
- }
138
+ projectOption
160
139
  ],
161
140
  examples: [
162
141
  {
@@ -231,13 +210,6 @@ var deployCommand = {
231
210
  deprecated: false,
232
211
  description: 'Retain build cache when using "--force"'
233
212
  },
234
- {
235
- name: "public",
236
- shorthand: "p",
237
- type: Boolean,
238
- deprecated: false,
239
- description: "Deployment is public (`/_src`) is exposed)"
240
- },
241
213
  {
242
214
  name: "env",
243
215
  shorthand: "e",
@@ -354,21 +326,7 @@ var deployCommand = {
354
326
  formatOption,
355
327
  jsonOption,
356
328
  confirmOption,
357
- projectOption,
358
- {
359
- name: "functions-beta",
360
- shorthand: null,
361
- type: Boolean,
362
- deprecated: false
363
- // No description — keeps it hidden from --help output
364
- },
365
- {
366
- name: "no-functions-beta",
367
- shorthand: null,
368
- type: Boolean,
369
- deprecated: false
370
- // No description — keeps it hidden from --help output
371
- }
329
+ projectOption
372
330
  ],
373
331
  examples: [
374
332
  {
@@ -398,12 +356,12 @@ var deployCommand = {
398
356
  var addSubcommand = {
399
357
  name: "add",
400
358
  aliases: [],
401
- description: "Add additional Vercel Projects to an existing repository link. Requires an existing repo.json (created by `link --repo`).",
359
+ description: "Add projects to an existing repository link created by link --repo",
402
360
  arguments: [],
403
361
  options: [
404
362
  {
405
363
  ...yesOption,
406
- description: "Skip questions when adding projects using default scope and settings"
364
+ description: "Skip questions when adding projects with default team and settings"
407
365
  }
408
366
  ],
409
367
  examples: [
@@ -416,13 +374,13 @@ var addSubcommand = {
416
374
  var linkCommand = {
417
375
  name: "link",
418
376
  aliases: [],
419
- description: "Link a local directory to a Vercel Project.",
377
+ description: "Link a local directory to a Vercel project",
420
378
  arguments: [],
421
379
  subcommands: [addSubcommand],
422
380
  options: [
423
381
  {
424
382
  name: "repo",
425
- description: "Link multiple projects based on Git repository (alpha)",
383
+ description: "Link multiple projects from the Git repository (alpha)",
426
384
  shorthand: "r",
427
385
  type: Boolean,
428
386
  deprecated: false
@@ -430,11 +388,11 @@ var linkCommand = {
430
388
  {
431
389
  ...projectOption,
432
390
  shorthand: "p",
433
- description: "Project name or ID to link to (required for non-interactive)"
391
+ description: "Set the project name or ID to link; required for non-interactive existing-project links"
434
392
  },
435
393
  {
436
394
  name: "team",
437
- description: "Scope: team ID or slug (use with --project for non-interactive)",
395
+ description: "Set the team ID or slug; use with --project for non-interactive links",
438
396
  shorthand: null,
439
397
  argument: "TEAM_ID_OR_SLUG",
440
398
  type: String,
@@ -442,13 +400,13 @@ var linkCommand = {
442
400
  },
443
401
  {
444
402
  ...yesOption,
445
- description: "Skip questions when setting up new project using default scope and settings"
403
+ description: "Skip questions when setting up with default team and settings"
446
404
  },
447
405
  confirmOption
448
406
  ],
449
407
  examples: [
450
408
  {
451
- name: "Link current directory to a Vercel Project",
409
+ name: "Link current directory to a Vercel project",
452
410
  value: `${packageName} link`
453
411
  },
454
412
  {
@@ -456,15 +414,15 @@ var linkCommand = {
456
414
  value: `${packageName} link --yes`
457
415
  },
458
416
  {
459
- name: "Non-interactive: link to an existing project (CI/agents)",
417
+ name: "Link to an existing project in CI or agent mode",
460
418
  value: `${packageName} link --yes --team <team-id> --project <project-name-or-id>`
461
419
  },
462
420
  {
463
- name: "Link a specific directory to a Vercel Project",
421
+ name: "Link a specific directory to a Vercel project",
464
422
  value: `${packageName} link --cwd /path/to/project`
465
423
  },
466
424
  {
467
- name: "Link to the current Git repository, allowing for multiple Vercel Projects to be linked simultaneously (useful for monorepos)",
425
+ name: "Link multiple projects from the current Git repository",
468
426
  value: `${packageName} link --repo`
469
427
  },
470
428
  {
@@ -1100,9 +1058,10 @@ var creditsSubcommand = {
1100
1058
  }
1101
1059
  ]
1102
1060
  };
1103
- var SUPPORTED_ADDON_ALIASES = ["siem"];
1061
+ var SUPPORTED_ADDON_ALIASES = ["siem", "customEnvironment"];
1104
1062
  var ADDON_LABELS = {
1105
- siem: "SIEM"
1063
+ siem: "SIEM",
1064
+ customEnvironment: "Custom Environments"
1106
1065
  };
1107
1066
  var addonSubcommand = {
1108
1067
  name: "addon",
@@ -1130,6 +1089,10 @@ var addonSubcommand = {
1130
1089
  {
1131
1090
  name: "Purchase 1 unit of the SIEM addon",
1132
1091
  value: `${packageName} buy addon siem 1`
1092
+ },
1093
+ {
1094
+ name: "Purchase 1 unit of the Custom Environments addon",
1095
+ value: `${packageName} buy addon customEnvironment 1`
1133
1096
  }
1134
1097
  ]
1135
1098
  };
@@ -1210,6 +1173,10 @@ var buyCommand = {
1210
1173
  name: "Purchase the SIEM addon",
1211
1174
  value: `${packageName} buy addon siem 1`
1212
1175
  },
1176
+ {
1177
+ name: "Purchase the Custom Environments addon",
1178
+ value: `${packageName} buy addon customEnvironment 1`
1179
+ },
1213
1180
  {
1214
1181
  name: "Upgrade to Pro",
1215
1182
  value: `${packageName} buy pro`
@@ -6,30 +6,30 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  getUpdateCommandInfo,
9
- isGlobal,
10
- isNativeBinaryInstall
11
- } from "./chunk-V4GROAUJ.js";
9
+ isGlobal
10
+ } from "./chunk-5QKYBWW2.js";
12
11
  import {
13
12
  getGlobalPathConfig,
14
13
  writeToConfigFile
15
- } from "./chunk-C3VH3X5Y.js";
14
+ } from "./chunk-P2AMQX7F.js";
16
15
  import {
17
16
  apiCommand,
18
17
  listSubcommand2 as listSubcommand,
19
18
  loginCommand
20
- } from "./chunk-KJ5O7JQQ.js";
19
+ } from "./chunk-F4WXNECT.js";
21
20
  import {
22
21
  help
23
- } from "./chunk-VNUNCNPE.js";
22
+ } from "./chunk-UPI3OHBK.js";
24
23
  import {
25
24
  login
26
- } from "./chunk-5UCWXYNH.js";
25
+ } from "./chunk-XLLAD5DR.js";
27
26
  import {
28
- TelemetryClient
29
- } from "./chunk-J5273CSE.js";
27
+ TelemetryClient,
28
+ isNativeBinaryInstall
29
+ } from "./chunk-HIYWSGI7.js";
30
30
  import {
31
31
  require_ms
32
- } from "./chunk-CO5D46AG.js";
32
+ } from "./chunk-GGP5R3FU.js";
33
33
  import {
34
34
  getFlagsSpecification,
35
35
  parseArguments,
@@ -39,6 +39,9 @@ import {
39
39
  import {
40
40
  packageName
41
41
  } from "./chunk-LN6B7ZI3.js";
42
+ import {
43
+ pkg_default
44
+ } from "./chunk-P4QNYOFB.js";
42
45
  import {
43
46
  output_manager_default
44
47
  } from "./chunk-Z5SBJH6L.js";
@@ -2851,12 +2854,31 @@ async function runTagOperation(client, options) {
2851
2854
  }
2852
2855
 
2853
2856
  // src/util/upgrade.ts
2854
- import { spawn } from "child_process";
2857
+ import { spawn, execFile } from "child_process";
2858
+ import { promisify } from "util";
2855
2859
  import { tmpdir } from "os";
2856
- async function executeUpgrade() {
2860
+ var execFileAsync = promisify(execFile);
2861
+ async function getInstalledVersion() {
2862
+ for (const bin of ["vercel", "vc"]) {
2863
+ try {
2864
+ const { stdout } = await execFileAsync(bin, ["--version"], {
2865
+ encoding: "utf8",
2866
+ windowsHide: true
2867
+ });
2868
+ const version = stdout.trim();
2869
+ if (version) {
2870
+ return version;
2871
+ }
2872
+ } catch {
2873
+ }
2874
+ }
2875
+ return void 0;
2876
+ }
2877
+ async function executeUpgrade(targetVersion) {
2857
2878
  const { command: updateCommand, global } = await getUpdateCommandInfo();
2858
2879
  const [command, ...args] = updateCommand.split(" ");
2859
2880
  const cwd = global ? tmpdir() : process.cwd();
2881
+ const versionBefore = pkg_default.version;
2860
2882
  output_manager_default.log(`Upgrading Vercel CLI...`);
2861
2883
  output_manager_default.debug(`Executing: ${updateCommand} (cwd: ${cwd})`);
2862
2884
  return new Promise((resolve3) => {
@@ -2879,9 +2901,7 @@ async function executeUpgrade() {
2879
2901
  resolve3(1);
2880
2902
  });
2881
2903
  upgradeProcess.on("close", (code) => {
2882
- if (code === 0) {
2883
- output_manager_default.success("Vercel CLI has been upgraded successfully!");
2884
- } else {
2904
+ if (code !== 0) {
2885
2905
  const stdoutStr = Buffer.concat(stdout).toString();
2886
2906
  const stderrStr = Buffer.concat(stderr).toString();
2887
2907
  if (stdoutStr) {
@@ -2894,8 +2914,30 @@ async function executeUpgrade() {
2894
2914
  output_manager_default.log(
2895
2915
  `You can try running the command manually: ${updateCommand}`
2896
2916
  );
2917
+ resolve3(code ?? 1);
2918
+ return;
2919
+ }
2920
+ if (targetVersion) {
2921
+ output_manager_default.success(
2922
+ `Vercel CLI has been upgraded to v${targetVersion} successfully!`
2923
+ );
2924
+ resolve3(0);
2925
+ return;
2897
2926
  }
2898
- resolve3(code ?? 1);
2927
+ getInstalledVersion().then((versionAfter) => {
2928
+ if (versionAfter && versionAfter === versionBefore) {
2929
+ output_manager_default.log(
2930
+ `No upgrade available. Vercel CLI is already on the latest version (v${versionBefore}).`
2931
+ );
2932
+ } else if (versionAfter) {
2933
+ output_manager_default.success(
2934
+ `Vercel CLI has been upgraded to v${versionAfter} successfully!`
2935
+ );
2936
+ } else {
2937
+ output_manager_default.success("Vercel CLI has been upgraded successfully!");
2938
+ }
2939
+ resolve3(0);
2940
+ });
2899
2941
  });
2900
2942
  });
2901
2943
  }
@@ -7,12 +7,12 @@ const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  printProjectNotFoundError,
9
9
  setupAndLink
10
- } from "./chunk-6D6CSOSK.js";
10
+ } from "./chunk-P6VIXOWO.js";
11
11
  import {
12
12
  getLinkedProject,
13
13
  param,
14
14
  resolveProjectCwd
15
- } from "./chunk-5UCWXYNH.js";
15
+ } from "./chunk-XLLAD5DR.js";
16
16
  import {
17
17
  buildCommandWithYes,
18
18
  outputActionRequired
@@ -5,11 +5,7 @@ const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
- require_source
9
- } from "./chunk-S7KYDPEM.js";
10
- import {
11
- __commonJS,
12
- __toESM
8
+ __commonJS
13
9
  } from "./chunk-TZ2YI2VH.js";
14
10
 
15
11
  // ../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js
@@ -89,61 +85,45 @@ var require_ms = __commonJS({
89
85
  return void 0;
90
86
  }
91
87
  }
92
- function fmtShort(ms2) {
93
- var msAbs = Math.abs(ms2);
88
+ function fmtShort(ms) {
89
+ var msAbs = Math.abs(ms);
94
90
  if (msAbs >= d) {
95
- return Math.round(ms2 / d) + "d";
91
+ return Math.round(ms / d) + "d";
96
92
  }
97
93
  if (msAbs >= h) {
98
- return Math.round(ms2 / h) + "h";
94
+ return Math.round(ms / h) + "h";
99
95
  }
100
96
  if (msAbs >= m) {
101
- return Math.round(ms2 / m) + "m";
97
+ return Math.round(ms / m) + "m";
102
98
  }
103
99
  if (msAbs >= s) {
104
- return Math.round(ms2 / s) + "s";
100
+ return Math.round(ms / s) + "s";
105
101
  }
106
- return ms2 + "ms";
102
+ return ms + "ms";
107
103
  }
108
- function fmtLong(ms2) {
109
- var msAbs = Math.abs(ms2);
104
+ function fmtLong(ms) {
105
+ var msAbs = Math.abs(ms);
110
106
  if (msAbs >= d) {
111
- return plural(ms2, msAbs, d, "day");
107
+ return plural(ms, msAbs, d, "day");
112
108
  }
113
109
  if (msAbs >= h) {
114
- return plural(ms2, msAbs, h, "hour");
110
+ return plural(ms, msAbs, h, "hour");
115
111
  }
116
112
  if (msAbs >= m) {
117
- return plural(ms2, msAbs, m, "minute");
113
+ return plural(ms, msAbs, m, "minute");
118
114
  }
119
115
  if (msAbs >= s) {
120
- return plural(ms2, msAbs, s, "second");
116
+ return plural(ms, msAbs, s, "second");
121
117
  }
122
- return ms2 + " ms";
118
+ return ms + " ms";
123
119
  }
124
- function plural(ms2, msAbs, n, name) {
120
+ function plural(ms, msAbs, n, name) {
125
121
  var isPlural = msAbs >= n * 1.5;
126
- return Math.round(ms2 / n) + " " + name + (isPlural ? "s" : "");
122
+ return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
127
123
  }
128
124
  }
129
125
  });
130
126
 
131
- // src/util/output/elapsed.ts
132
- var import_ms = __toESM(require_ms(), 1);
133
- var import_chalk = __toESM(require_source(), 1);
134
- function elapsed(time, ago = false) {
135
- return import_chalk.default.gray(
136
- `[${time < 1e3 ? `${time}ms` : (0, import_ms.default)(time)}${ago ? " ago" : ""}]`
137
- );
138
- }
139
-
140
- // src/util/output/stamp.ts
141
- var stamp_default = (start = Date.now()) => {
142
- return () => elapsed(Date.now() - start);
143
- };
144
-
145
127
  export {
146
- require_ms,
147
- elapsed,
148
- stamp_default
128
+ require_ms
149
129
  };
@@ -2351,6 +2351,11 @@ var require_write_json_file = __commonJS({
2351
2351
  }
2352
2352
  });
2353
2353
 
2354
+ // src/util/native-install.ts
2355
+ function isNativeBinaryInstall() {
2356
+ return process.env.VERCEL_VC_NATIVE === "1";
2357
+ }
2358
+
2354
2359
  // src/util/telemetry/index.ts
2355
2360
  import { randomUUID as randomUUID2 } from "crypto";
2356
2361
  import os from "os";
@@ -2848,17 +2853,20 @@ var TelemetryEventStore = class {
2848
2853
  * FIXME: handle max buffer size
2849
2854
  */
2850
2855
  async sendToSubprocess(payload, outputDebugEnabled) {
2851
- const args = [process.execPath, process.argv[0], process.argv[1]];
2852
- if (args[0] === args[1]) {
2853
- args.shift();
2856
+ const flushArgs = ["telemetry", "flush", JSON.stringify(payload)];
2857
+ let nodeBinaryPath;
2858
+ let script;
2859
+ if (isNativeBinaryInstall()) {
2860
+ nodeBinaryPath = process.execPath;
2861
+ script = flushArgs;
2862
+ } else {
2863
+ const args = [process.execPath, process.argv[0], process.argv[1]];
2864
+ if (args[0] === args[1]) {
2865
+ args.shift();
2866
+ }
2867
+ nodeBinaryPath = args[0];
2868
+ script = [...args.slice(1), ...flushArgs];
2854
2869
  }
2855
- const nodeBinaryPath = args[0];
2856
- const script = [
2857
- ...args.slice(1),
2858
- "telemetry",
2859
- "flush",
2860
- JSON.stringify(payload)
2861
- ];
2862
2870
  const env = cloneEnv(process.env, {
2863
2871
  VERCEL_TELEMETRY_DISABLED: "1"
2864
2872
  });
@@ -2900,6 +2908,7 @@ export {
2900
2908
  require_graceful_fs,
2901
2909
  require_dist,
2902
2910
  require_load_json_file,
2911
+ isNativeBinaryInstall,
2903
2912
  TelemetryClient,
2904
2913
  TelemetryEventStore
2905
2914
  };