vercel 52.0.0 → 52.2.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.
Files changed (68) hide show
  1. package/dist/chunks/{add-32PTAGQE.js → add-TH62Y34V.js} +8 -8
  2. package/dist/chunks/{chunk-TAOVG4PS.js → chunk-4Q5VS23S.js} +3 -3
  3. package/dist/chunks/{chunk-VGWGLBUC.js → chunk-5EDL2IVB.js} +2 -2
  4. package/dist/chunks/{chunk-LY3PUG7C.js → chunk-5EZVRZOJ.js} +88 -40
  5. package/dist/chunks/{chunk-BHDZCUTT.js → chunk-77JGNI4Z.js} +2 -2
  6. package/dist/chunks/{chunk-YLGCZTHB.js → chunk-7L7NSLYK.js} +3 -3
  7. package/dist/chunks/{chunk-GE6G37P4.js → chunk-ABDTA3V2.js} +1 -1
  8. package/dist/chunks/{chunk-2OPPBD5D.js → chunk-BUPMO37Q.js} +12 -12
  9. package/dist/chunks/{chunk-G6RXZLQ2.js → chunk-DFUTSURK.js} +2 -2
  10. package/dist/chunks/{chunk-FOWUL5QD.js → chunk-EVDPX5BO.js} +2 -2
  11. package/dist/chunks/{chunk-3Q7JX627.js → chunk-FPTKAORS.js} +4 -4
  12. package/dist/chunks/{chunk-UC4NDDAU.js → chunk-FUUQ2WSC.js} +6 -6
  13. package/dist/chunks/{chunk-FVWOH3F3.js → chunk-FUYNVB23.js} +3 -3
  14. package/dist/chunks/{chunk-PEB65MJA.js → chunk-H2O3DQDC.js} +5 -5
  15. package/dist/chunks/{chunk-CRZM5WM2.js → chunk-HMM7V4AU.js} +2 -2
  16. package/dist/chunks/{chunk-BNSXPMDP.js → chunk-I5OH27IT.js} +4 -4
  17. package/dist/chunks/{chunk-XKHLPA6V.js → chunk-IABMY4Q3.js} +22 -20
  18. package/dist/chunks/{chunk-GLDQ23LD.js → chunk-IEKDY4FP.js} +1 -1
  19. package/dist/chunks/{chunk-4PQA6H63.js → chunk-JCLLQ23G.js} +1 -1
  20. package/dist/chunks/{chunk-RFMC2QXQ.js → chunk-JNOMOD7R.js} +15 -11
  21. package/dist/chunks/{chunk-UWKTUK3W.js → chunk-LN5ZMLBU.js} +2 -2
  22. package/dist/chunks/{chunk-US5SYA7N.js → chunk-LSPPTDRH.js} +2 -2
  23. package/dist/chunks/{chunk-N45K6NXC.js → chunk-MSJX3VKI.js} +1 -1
  24. package/dist/chunks/{chunk-BJQTGP42.js → chunk-NCUOSZ6X.js} +2 -2
  25. package/dist/chunks/{chunk-OP4YIHHX.js → chunk-NJYOE4D7.js} +1 -1
  26. package/dist/chunks/{chunk-V67XYW74.js → chunk-O7R67TAG.js} +2 -2
  27. package/dist/chunks/{chunk-JJBN66Y6.js → chunk-ODASAX4M.js} +1 -1
  28. package/dist/chunks/{chunk-K7R6WOLC.js → chunk-OHOYN7R2.js} +3 -3
  29. package/dist/chunks/{chunk-GJEZXG32.js → chunk-OVFHCZBS.js} +7 -7
  30. package/dist/chunks/{chunk-DVQ4SIWF.js → chunk-P3H4MP5H.js} +2 -2
  31. package/dist/chunks/{chunk-LDXYSGPZ.js → chunk-QPPVRYOB.js} +2 -2
  32. package/dist/chunks/{chunk-I5IBRE7Q.js → chunk-QTX36APP.js} +4 -4
  33. package/dist/chunks/{chunk-EG4NYQUS.js → chunk-WCMV6TSF.js} +1 -1
  34. package/dist/chunks/{chunk-ECRBC4HL.js → chunk-XZ7CVBQ4.js} +26 -0
  35. package/dist/chunks/{chunk-VPI2ZRPP.js → chunk-ZI2C6YH2.js} +5 -5
  36. package/dist/chunks/{chunk-QQWE4QMB.js → chunk-ZJKFUXSF.js} +2 -2
  37. package/dist/chunks/{chunk-HUUTUVP5.js → chunk-ZZDXEXJ5.js} +9 -9
  38. package/dist/chunks/{compile-vercel-config-RAC75XPY.js → compile-vercel-config-H5YVD5ZD.js} +4 -4
  39. package/dist/chunks/{delete-VBCRT33S.js → delete-WW5B2IIN.js} +6 -6
  40. package/dist/chunks/{disable-4AGI6NFV.js → disable-WSV2JYK6.js} +6 -6
  41. package/dist/chunks/{discard-JUCF555L.js → discard-BTIMKAXZ.js} +6 -6
  42. package/dist/chunks/{edit-NNTNLAVV.js → edit-LOQJITTM.js} +7 -7
  43. package/dist/chunks/{enable-DCCSTYJV.js → enable-XMWWLBL7.js} +6 -6
  44. package/dist/chunks/{export-2VCMSLPY.js → export-P2OSIM3L.js} +6 -6
  45. package/dist/chunks/{inspect-TGMNTP57.js → inspect-5NKOJ64V.js} +8 -8
  46. package/dist/chunks/{list-JQLSGKZN.js → list-OLUANKMJ.js} +9 -9
  47. package/dist/chunks/{list-2EQRO64T.js → list-ZSRD6M3H.js} +6 -6
  48. package/dist/chunks/{ls-XCMOFSVP.js → ls-3YMXPZ7A.js} +8 -8
  49. package/dist/chunks/{publish-JY65X2KM.js → publish-T2HPYN5D.js} +6 -6
  50. package/dist/chunks/{query-ID2PPUU6.js → query-ZKNQWF5L.js} +8 -8
  51. package/dist/chunks/{reorder-HYBSLO2T.js → reorder-WQA5LQ7X.js} +6 -6
  52. package/dist/chunks/{restore-33F7XKHU.js → restore-QTREUYWW.js} +6 -6
  53. package/dist/chunks/{rm-D4MBLVAI.js → rm-4JKXZFP3.js} +8 -8
  54. package/dist/chunks/{rule-inspect-ZQQK2DV3.js → rule-inspect-3PUS2RKH.js} +8 -8
  55. package/dist/chunks/{rules-R2BZLO6I.js → rules-GBXWDR3P.js} +8 -8
  56. package/dist/chunks/{schema-3G43CXHB.js → schema-TXE5TXMY.js} +9 -9
  57. package/dist/chunks/{types-QNN5CDCB.js → types-FAFL42RV.js} +4 -4
  58. package/dist/chunks/{update-MI26ZSNY.js → update-57KTLPIK.js} +8 -8
  59. package/dist/commands/build/index.js +15 -15
  60. package/dist/commands/deploy/index.js +24 -24
  61. package/dist/commands/dev/index.js +14 -14
  62. package/dist/commands/env/index.js +18 -18
  63. package/dist/commands/link/index.js +18 -18
  64. package/dist/commands/list/index.js +10 -10
  65. package/dist/commands-bulk.js +93 -65
  66. package/dist/index.js +26 -45
  67. package/dist/version.mjs +1 -1
  68. package/package.json +14 -13
@@ -28,7 +28,7 @@ import {
28
28
  runInteractiveEditLoop,
29
29
  stripQuotes,
30
30
  validateActionFlags
31
- } from "./chunks/chunk-JJBN66Y6.js";
31
+ } from "./chunks/chunk-ODASAX4M.js";
32
32
  import {
33
33
  getRouteVersions
34
34
  } from "./chunks/chunk-AHU7WNL2.js";
@@ -45,7 +45,7 @@ import {
45
45
  parsePosition,
46
46
  parseSubcommandArgs,
47
47
  withGlobalFlags
48
- } from "./chunks/chunk-BNSXPMDP.js";
48
+ } from "./chunks/chunk-I5OH27IT.js";
49
49
  import {
50
50
  indent_default
51
51
  } from "./chunks/chunk-A3NYPUKZ.js";
@@ -59,11 +59,11 @@ import {
59
59
  resolveOpenApiTagForProjectsCli,
60
60
  resolveOpenApiTagForTeamsCli,
61
61
  tryOpenApiFallback
62
- } from "./chunks/chunk-GJEZXG32.js";
62
+ } from "./chunks/chunk-OVFHCZBS.js";
63
63
  import {
64
64
  getUpdateCommand,
65
65
  isGlobal
66
- } from "./chunks/chunk-US5SYA7N.js";
66
+ } from "./chunks/chunk-LSPPTDRH.js";
67
67
  import {
68
68
  Now,
69
69
  collectContactInformation,
@@ -85,16 +85,16 @@ import {
85
85
  require_format,
86
86
  require_jsonlines,
87
87
  setupDomain
88
- } from "./chunks/chunk-HUUTUVP5.js";
88
+ } from "./chunks/chunk-ZZDXEXJ5.js";
89
89
  import {
90
+ persistAuthConfig,
90
91
  processRevocationResponse,
91
92
  readLocalConfig,
92
93
  require_open,
93
94
  revocationRequest,
94
95
  sleep,
95
- writeToAuthConfigFile,
96
96
  writeToConfigFile
97
- } from "./chunks/chunk-LY3PUG7C.js";
97
+ } from "./chunks/chunk-5EZVRZOJ.js";
98
98
  import "./chunks/chunk-V5P25P7F.js";
99
99
  import {
100
100
  getCustomEnvironments,
@@ -105,7 +105,7 @@ import {
105
105
  } from "./chunks/chunk-C5YP6KFI.js";
106
106
  import {
107
107
  formatTable
108
- } from "./chunks/chunk-G6RXZLQ2.js";
108
+ } from "./chunks/chunk-DFUTSURK.js";
109
109
  import "./chunks/chunk-LOS7HHU3.js";
110
110
  import {
111
111
  isValidName
@@ -117,14 +117,14 @@ import {
117
117
  getDeployment,
118
118
  mapCertError,
119
119
  toHost
120
- } from "./chunks/chunk-N45K6NXC.js";
120
+ } from "./chunks/chunk-MSJX3VKI.js";
121
121
  import {
122
122
  getScope
123
- } from "./chunks/chunk-V67XYW74.js";
123
+ } from "./chunks/chunk-O7R67TAG.js";
124
124
  import {
125
125
  formatEnvironment,
126
126
  validateLsArgs
127
- } from "./chunks/chunk-QQWE4QMB.js";
127
+ } from "./chunks/chunk-ZJKFUXSF.js";
128
128
  import {
129
129
  validateJsonOutput
130
130
  } from "./chunks/chunk-XPKWKPWA.js";
@@ -365,7 +365,7 @@ import {
365
365
  webAnalyticsSubcommand,
366
366
  webhooksCommand,
367
367
  whoamiCommand
368
- } from "./chunks/chunk-2OPPBD5D.js";
368
+ } from "./chunks/chunk-BUPMO37Q.js";
369
369
  import {
370
370
  addSubcommand as addSubcommand9,
371
371
  deleteSubcommand,
@@ -381,21 +381,21 @@ import {
381
381
  reorderSubcommand,
382
382
  restoreSubcommand as restoreSubcommand2,
383
383
  routesCommand
384
- } from "./chunks/chunk-CRZM5WM2.js";
384
+ } from "./chunks/chunk-HMM7V4AU.js";
385
385
  import {
386
386
  metricsCommand,
387
387
  schemaSubcommand
388
- } from "./chunks/chunk-BHDZCUTT.js";
389
- import "./chunks/chunk-BJQTGP42.js";
388
+ } from "./chunks/chunk-77JGNI4Z.js";
389
+ import "./chunks/chunk-NCUOSZ6X.js";
390
390
  import {
391
391
  activityCommand,
392
392
  typesSubcommand
393
- } from "./chunks/chunk-UWKTUK3W.js";
393
+ } from "./chunks/chunk-LN5ZMLBU.js";
394
394
  import {
395
395
  alertsCommand,
396
396
  inspectSubcommand,
397
397
  listSubcommand
398
- } from "./chunks/chunk-TAOVG4PS.js";
398
+ } from "./chunks/chunk-4Q5VS23S.js";
399
399
  import {
400
400
  rulesAddSubcommand,
401
401
  rulesAggregateCommand,
@@ -403,26 +403,26 @@ import {
403
403
  rulesLsSubcommand,
404
404
  rulesRmSubcommand,
405
405
  rulesUpdateSubcommand
406
- } from "./chunks/chunk-DVQ4SIWF.js";
407
- import "./chunks/chunk-VGWGLBUC.js";
406
+ } from "./chunks/chunk-P3H4MP5H.js";
407
+ import "./chunks/chunk-5EDL2IVB.js";
408
408
  import {
409
409
  main
410
- } from "./chunks/chunk-UC4NDDAU.js";
411
- import "./chunks/chunk-OP4YIHHX.js";
410
+ } from "./chunks/chunk-FUUQ2WSC.js";
411
+ import "./chunks/chunk-NJYOE4D7.js";
412
412
  import {
413
413
  ua_default
414
- } from "./chunks/chunk-4PQA6H63.js";
414
+ } from "./chunks/chunk-JCLLQ23G.js";
415
415
  import {
416
416
  require_execa
417
- } from "./chunks/chunk-EG4NYQUS.js";
417
+ } from "./chunks/chunk-WCMV6TSF.js";
418
418
  import {
419
419
  ensureLink
420
- } from "./chunks/chunk-I5IBRE7Q.js";
421
- import "./chunks/chunk-PEB65MJA.js";
422
- import "./chunks/chunk-FVWOH3F3.js";
420
+ } from "./chunks/chunk-QTX36APP.js";
421
+ import "./chunks/chunk-H2O3DQDC.js";
422
+ import "./chunks/chunk-FUYNVB23.js";
423
423
  import {
424
424
  autoInstallVercelPlugin
425
- } from "./chunks/chunk-K7R6WOLC.js";
425
+ } from "./chunks/chunk-OHOYN7R2.js";
426
426
  import {
427
427
  AGENT_ACTION,
428
428
  AGENT_REASON,
@@ -430,10 +430,10 @@ import {
430
430
  } from "./chunks/chunk-E3NE4SKN.js";
431
431
  import {
432
432
  help
433
- } from "./chunks/chunk-LDXYSGPZ.js";
433
+ } from "./chunks/chunk-QPPVRYOB.js";
434
434
  import {
435
435
  table
436
- } from "./chunks/chunk-GE6G37P4.js";
436
+ } from "./chunks/chunk-ABDTA3V2.js";
437
437
  import {
438
438
  STANDARD_ENVIRONMENTS,
439
439
  VERCEL_CONFIG_EXTENSIONS,
@@ -473,7 +473,7 @@ import {
473
473
  resolveProjectCwd,
474
474
  selectAndParseRemoteUrl,
475
475
  selectOrg
476
- } from "./chunks/chunk-VPI2ZRPP.js";
476
+ } from "./chunks/chunk-ZI2C6YH2.js";
477
477
  import {
478
478
  TelemetryClient
479
479
  } from "./chunks/chunk-U3WLEFHU.js";
@@ -488,7 +488,7 @@ import {
488
488
  outputActionRequired,
489
489
  outputAgentError,
490
490
  shouldEmitNonInteractiveCommandError
491
- } from "./chunks/chunk-XKHLPA6V.js";
491
+ } from "./chunks/chunk-IABMY4Q3.js";
492
492
  import {
493
493
  elapsed,
494
494
  require_ms,
@@ -503,7 +503,7 @@ import {
503
503
  globalCliFlagTakesValue,
504
504
  parseArguments,
505
505
  printError
506
- } from "./chunks/chunk-RFMC2QXQ.js";
506
+ } from "./chunks/chunk-JNOMOD7R.js";
507
507
  import {
508
508
  APIError,
509
509
  AliasInUse,
@@ -556,8 +556,9 @@ import {
556
556
  packageName,
557
557
  pkg_default,
558
558
  require_bytes,
559
- require_lib as require_lib2
560
- } from "./chunks/chunk-ECRBC4HL.js";
559
+ require_lib as require_lib2,
560
+ stripSensitiveAuthArgs
561
+ } from "./chunks/chunk-XZ7CVBQ4.js";
561
562
  import {
562
563
  emoji,
563
564
  eraseLines,
@@ -845,7 +846,7 @@ async function activity(client) {
845
846
  return 0;
846
847
  }
847
848
  telemetry2.trackCliSubcommandTypes(subcommandOriginal);
848
- const typesFn = (await import("./chunks/types-QNN5CDCB.js")).default;
849
+ const typesFn = (await import("./chunks/types-FAFL42RV.js")).default;
849
850
  return typesFn(client, telemetry2);
850
851
  }
851
852
  default: {
@@ -855,7 +856,7 @@ async function activity(client) {
855
856
  return 0;
856
857
  }
857
858
  telemetry2.trackCliSubcommandLs(subcommandOriginal);
858
- const listFn = (await import("./chunks/list-2EQRO64T.js")).default;
859
+ const listFn = (await import("./chunks/list-ZSRD6M3H.js")).default;
859
860
  return listFn(client, telemetry2);
860
861
  }
861
862
  }
@@ -1332,17 +1333,17 @@ async function alerts(client) {
1332
1333
  switch (subcommand) {
1333
1334
  case "inspect": {
1334
1335
  telemetry2.trackCliSubcommandInspect(subcommandOriginal);
1335
- const inspectFn = (await import("./chunks/inspect-TGMNTP57.js")).default;
1336
+ const inspectFn = (await import("./chunks/inspect-5NKOJ64V.js")).default;
1336
1337
  return inspectFn(client, args);
1337
1338
  }
1338
1339
  case "rules": {
1339
1340
  telemetry2.trackCliSubcommandRules(args[0] ?? "ls");
1340
- const rulesFn = (await import("./chunks/rules-R2BZLO6I.js")).default;
1341
+ const rulesFn = (await import("./chunks/rules-GBXWDR3P.js")).default;
1341
1342
  return rulesFn(client, args);
1342
1343
  }
1343
1344
  default: {
1344
1345
  telemetry2.trackCliSubcommandLs(subcommandOriginal);
1345
- const listFn = (await import("./chunks/list-JQLSGKZN.js")).default;
1346
+ const listFn = (await import("./chunks/list-OLUANKMJ.js")).default;
1346
1347
  return listFn(client, telemetry2);
1347
1348
  }
1348
1349
  }
@@ -19503,11 +19504,12 @@ async function tokensCmd(client, argv) {
19503
19504
  const { args, flags } = parsedArgs;
19504
19505
  const [idOrSlug] = args;
19505
19506
  const addLabel = flags["--add"];
19506
- const removeTokens = flags["--remove"];
19507
+ const removeValues = flags["--remove"];
19508
+ const removeCount = removeValues?.length ?? 0;
19507
19509
  const skipConfirmation = flags["--yes"] === true;
19508
19510
  telemetry2.trackCliArgumentIdOrSlug(idOrSlug);
19509
19511
  telemetry2.trackCliOptionAdd(addLabel);
19510
- telemetry2.trackCliOptionRemove(removeTokens);
19512
+ telemetry2.trackCliOptionRemove(removeValues);
19511
19513
  telemetry2.trackCliFlagYes(flags["--yes"]);
19512
19514
  telemetry2.trackCliOptionFormat(flags["--format"]);
19513
19515
  if (!idOrSlug) {
@@ -19535,11 +19537,11 @@ async function tokensCmd(client, argv) {
19535
19537
  );
19536
19538
  return 1;
19537
19539
  }
19538
- if (addLabel && removeTokens?.length) {
19540
+ if (addLabel && removeCount > 0) {
19539
19541
  output_manager_default.error("Use either `--add` or `--remove`, not both.");
19540
19542
  return 1;
19541
19543
  }
19542
- if (removeTokens?.length && client.nonInteractive && !skipConfirmation) {
19544
+ if (removeCount > 0 && client.nonInteractive && !skipConfirmation) {
19543
19545
  outputAgentError(
19544
19546
  client,
19545
19547
  {
@@ -19613,26 +19615,43 @@ ${created.token}
19613
19615
  `);
19614
19616
  return 0;
19615
19617
  }
19616
- if (removeTokens?.length) {
19618
+ if (removeValues?.length) {
19617
19619
  if (!skipConfirmation && !await client.input.confirm(
19618
- `Revoke ${removeTokens.length} token(s) on ${import_chalk88.default.bold(id)}?`,
19620
+ `Revoke ${removeValues.length} token(s) on ${import_chalk88.default.bold(id)}?`,
19619
19621
  false
19620
19622
  )) {
19621
19623
  output_manager_default.log("Canceled");
19622
19624
  return 0;
19623
19625
  }
19626
+ const rows2 = await client.fetch(`${base}/tokens`);
19627
+ const knownIds = new Set(
19628
+ rows2.map((r) => r.id).filter((v) => Boolean(v))
19629
+ );
19630
+ const ids = [];
19631
+ const tokens = [];
19632
+ for (const value of removeValues) {
19633
+ if (knownIds.has(value))
19634
+ ids.push(value);
19635
+ else
19636
+ tokens.push(value);
19637
+ }
19638
+ const body = {};
19639
+ if (tokens.length)
19640
+ body.tokens = tokens;
19641
+ if (ids.length)
19642
+ body.ids = ids;
19624
19643
  await client.fetch(`${base}/tokens`, {
19625
19644
  method: "DELETE",
19626
- body: { tokens: removeTokens }
19645
+ body
19627
19646
  });
19628
19647
  if (asJson) {
19629
19648
  client.stdout.write(
19630
- `${JSON.stringify({ status: "ok", revoked: removeTokens.length }, null, 2)}
19649
+ `${JSON.stringify({ status: "ok", revoked: removeValues.length }, null, 2)}
19631
19650
  `
19632
19651
  );
19633
19652
  return 0;
19634
19653
  }
19635
- output_manager_default.success(`Revoked ${removeTokens.length} token(s).`);
19654
+ output_manager_default.success(`Revoked ${removeValues.length} token(s).`);
19636
19655
  return 0;
19637
19656
  }
19638
19657
  const rows = await client.fetch(`${base}/tokens`);
@@ -30068,6 +30087,7 @@ var LogoutTelemetryClient = class extends TelemetryClient {
30068
30087
  var import_error_utils11 = __toESM(require_dist(), 1);
30069
30088
  async function logout(client) {
30070
30089
  const { authConfig } = client;
30090
+ const skipWrite = authConfig.skipWrite === true;
30071
30091
  if (!authConfig.token) {
30072
30092
  output_manager_default.note(
30073
30093
  `Not currently logged in, so ${getCommandName("logout")} did nothing`
@@ -30089,9 +30109,11 @@ async function logout(client) {
30089
30109
  }
30090
30110
  try {
30091
30111
  client.updateConfig({ currentTeam: void 0 });
30092
- client.writeToConfigFile();
30093
30112
  client.emptyAuthConfig();
30094
- client.writeToAuthConfigFile();
30113
+ if (!skipWrite) {
30114
+ client.writeToConfigFile();
30115
+ client.persistAuthConfig();
30116
+ }
30095
30117
  output_manager_default.debug("Configuration has been deleted");
30096
30118
  if (!logoutError) {
30097
30119
  output_manager_default.success("Logged out!");
@@ -30156,8 +30178,10 @@ async function logout2(client) {
30156
30178
  delete authConfig.token;
30157
30179
  delete authConfig.userId;
30158
30180
  try {
30159
- writeToConfigFile(config);
30160
- writeToAuthConfigFile(authConfig);
30181
+ if (!authConfig.skipWrite) {
30182
+ writeToConfigFile(config);
30183
+ persistAuthConfig(authConfig, config);
30184
+ }
30161
30185
  output_manager_default.debug("Configuration has been deleted");
30162
30186
  } catch (err) {
30163
30187
  output_manager_default.debug((0, import_error_utils12.errorToString)(err));
@@ -31717,7 +31741,7 @@ async function metrics(client) {
31717
31741
  return 0;
31718
31742
  }
31719
31743
  telemetry2.trackCliSubcommandSchema(subcommandOriginal);
31720
- const schemaFn = (await import("./chunks/schema-3G43CXHB.js")).default;
31744
+ const schemaFn = (await import("./chunks/schema-TXE5TXMY.js")).default;
31721
31745
  return schemaFn(client, telemetry2);
31722
31746
  }
31723
31747
  default: {
@@ -31730,7 +31754,7 @@ async function metrics(client) {
31730
31754
  output_manager_default.print(help(metricsCommand, { columns: client.stderr.columns }));
31731
31755
  return 2;
31732
31756
  }
31733
- const queryFn = (await import("./chunks/query-ID2PPUU6.js")).default;
31757
+ const queryFn = (await import("./chunks/query-ZKNQWF5L.js")).default;
31734
31758
  return queryFn(client, telemetry2);
31735
31759
  }
31736
31760
  }
@@ -42607,7 +42631,7 @@ async function main27(client) {
42607
42631
  return 2;
42608
42632
  }
42609
42633
  telemetry2.trackCliSubcommandEdit(subcommandOriginal);
42610
- return (await import("./chunks/edit-NNTNLAVV.js")).default(client, args);
42634
+ return (await import("./chunks/edit-LOQJITTM.js")).default(client, args);
42611
42635
  case "delete":
42612
42636
  if (needHelp) {
42613
42637
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -42615,7 +42639,7 @@ async function main27(client) {
42615
42639
  return 2;
42616
42640
  }
42617
42641
  telemetry2.trackCliSubcommandDelete(subcommandOriginal);
42618
- return (await import("./chunks/delete-VBCRT33S.js")).default(client, args);
42642
+ return (await import("./chunks/delete-WW5B2IIN.js")).default(client, args);
42619
42643
  case "enable":
42620
42644
  if (needHelp) {
42621
42645
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -42623,7 +42647,7 @@ async function main27(client) {
42623
42647
  return 2;
42624
42648
  }
42625
42649
  telemetry2.trackCliSubcommandEnable(subcommandOriginal);
42626
- return (await import("./chunks/enable-DCCSTYJV.js")).default(client, args);
42650
+ return (await import("./chunks/enable-XMWWLBL7.js")).default(client, args);
42627
42651
  case "disable":
42628
42652
  if (needHelp) {
42629
42653
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -42631,7 +42655,7 @@ async function main27(client) {
42631
42655
  return 2;
42632
42656
  }
42633
42657
  telemetry2.trackCliSubcommandDisable(subcommandOriginal);
42634
- return (await import("./chunks/disable-4AGI6NFV.js")).default(client, args);
42658
+ return (await import("./chunks/disable-WSV2JYK6.js")).default(client, args);
42635
42659
  case "reorder":
42636
42660
  if (needHelp) {
42637
42661
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -42639,7 +42663,7 @@ async function main27(client) {
42639
42663
  return 2;
42640
42664
  }
42641
42665
  telemetry2.trackCliSubcommandReorder(subcommandOriginal);
42642
- return (await import("./chunks/reorder-HYBSLO2T.js")).default(client, args);
42666
+ return (await import("./chunks/reorder-WQA5LQ7X.js")).default(client, args);
42643
42667
  case "export":
42644
42668
  if (needHelp) {
42645
42669
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -42647,7 +42671,7 @@ async function main27(client) {
42647
42671
  return 2;
42648
42672
  }
42649
42673
  telemetry2.trackCliSubcommandExport(subcommandOriginal);
42650
- return (await import("./chunks/export-2VCMSLPY.js")).default(client, args);
42674
+ return (await import("./chunks/export-P2OSIM3L.js")).default(client, args);
42651
42675
  case "publish":
42652
42676
  if (needHelp) {
42653
42677
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -42655,7 +42679,7 @@ async function main27(client) {
42655
42679
  return 2;
42656
42680
  }
42657
42681
  telemetry2.trackCliSubcommandPublish(subcommandOriginal);
42658
- return (await import("./chunks/publish-JY65X2KM.js")).default(client, args);
42682
+ return (await import("./chunks/publish-T2HPYN5D.js")).default(client, args);
42659
42683
  case "restore":
42660
42684
  if (needHelp) {
42661
42685
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -42663,7 +42687,7 @@ async function main27(client) {
42663
42687
  return 2;
42664
42688
  }
42665
42689
  telemetry2.trackCliSubcommandRestore(subcommandOriginal);
42666
- return (await import("./chunks/restore-33F7XKHU.js")).default(client, args);
42690
+ return (await import("./chunks/restore-QTREUYWW.js")).default(client, args);
42667
42691
  case "discard-staging":
42668
42692
  if (needHelp) {
42669
42693
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -42671,7 +42695,7 @@ async function main27(client) {
42671
42695
  return 2;
42672
42696
  }
42673
42697
  telemetry2.trackCliSubcommandDiscardStaging(subcommandOriginal);
42674
- return (await import("./chunks/discard-JUCF555L.js")).default(client, args);
42698
+ return (await import("./chunks/discard-BTIMKAXZ.js")).default(client, args);
42675
42699
  default:
42676
42700
  output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG35));
42677
42701
  output_manager_default.print(help(routesCommand, { columns: client.stderr.columns }));
@@ -45038,6 +45062,10 @@ var USER_SCOPE_AGENT_HINT = `Creating a personal token requires a classic token
45038
45062
  function normalizeApiMessage(message) {
45039
45063
  return message.replace(/\s*\(\d{3}\)\s*$/, "").trim();
45040
45064
  }
45065
+ function getSanitizedRerunCommand(client) {
45066
+ const rerunArgs = stripSensitiveAuthArgs(client.argv.slice(2));
45067
+ return getCommandNamePlain(rerunArgs.join(" ").trim());
45068
+ }
45041
45069
  function isClassicTokenRequiredForCreateError(err) {
45042
45070
  if (!isAPIError(err) || err.status !== 403) {
45043
45071
  return false;
@@ -45136,7 +45164,7 @@ async function add12(client, argv) {
45136
45164
  } catch (err) {
45137
45165
  if (isClassicTokenRequiredForCreateError(err)) {
45138
45166
  await openTokensDashboardInBrowser(client);
45139
- const rerun = getCommandNamePlain(client.argv.slice(2).join(" ").trim());
45167
+ const rerun = getSanitizedRerunCommand(client);
45140
45168
  if (shouldEmitNonInteractiveCommandError(client)) {
45141
45169
  outputAgentError(
45142
45170
  client,
@@ -45161,7 +45189,7 @@ async function add12(client, argv) {
45161
45189
  }
45162
45190
  if (isTokenUserScopeRequiredError(err)) {
45163
45191
  await openTokensDashboardInBrowser(client);
45164
- const rerun = getCommandNamePlain(client.argv.slice(2).join(" ").trim());
45192
+ const rerun = getSanitizedRerunCommand(client);
45165
45193
  const apiMessage = normalizeApiMessage(
45166
45194
  isAPIError(err) ? err.serverMessage || err.message : String(err)
45167
45195
  );
package/dist/index.js CHANGED
@@ -17,49 +17,50 @@ import {
17
17
  login,
18
18
  matchesCliApiTag,
19
19
  tryOpenApiFallback
20
- } from "./chunks/chunk-GJEZXG32.js";
20
+ } from "./chunks/chunk-OVFHCZBS.js";
21
21
  import {
22
22
  getUpdateCommand
23
- } from "./chunks/chunk-US5SYA7N.js";
23
+ } from "./chunks/chunk-LSPPTDRH.js";
24
24
  import {
25
25
  Client,
26
+ defaultGlobalConfig,
26
27
  getAuthConfigFilePath,
27
28
  getConfigFilePath,
29
+ getDefaultAuthConfig,
28
30
  readAuthConfigFile,
29
31
  readConfigFile,
30
- writeToAuthConfigFile,
31
32
  writeToConfigFile
32
- } from "./chunks/chunk-LY3PUG7C.js";
33
+ } from "./chunks/chunk-5EZVRZOJ.js";
33
34
  import {
34
35
  highlight
35
36
  } from "./chunks/chunk-V5P25P7F.js";
36
37
  import {
37
38
  getScope
38
- } from "./chunks/chunk-V67XYW74.js";
39
+ } from "./chunks/chunk-O7R67TAG.js";
39
40
  import {
40
41
  commandNames,
41
42
  commands
42
- } from "./chunks/chunk-2OPPBD5D.js";
43
- import "./chunks/chunk-CRZM5WM2.js";
44
- import "./chunks/chunk-BHDZCUTT.js";
45
- import "./chunks/chunk-BJQTGP42.js";
46
- import "./chunks/chunk-UWKTUK3W.js";
47
- import "./chunks/chunk-TAOVG4PS.js";
48
- import "./chunks/chunk-DVQ4SIWF.js";
49
- import "./chunks/chunk-VGWGLBUC.js";
43
+ } from "./chunks/chunk-BUPMO37Q.js";
44
+ import "./chunks/chunk-HMM7V4AU.js";
45
+ import "./chunks/chunk-77JGNI4Z.js";
46
+ import "./chunks/chunk-NCUOSZ6X.js";
47
+ import "./chunks/chunk-LN5ZMLBU.js";
48
+ import "./chunks/chunk-4Q5VS23S.js";
49
+ import "./chunks/chunk-P3H4MP5H.js";
50
+ import "./chunks/chunk-5EDL2IVB.js";
50
51
  import {
51
52
  require_semver
52
53
  } from "./chunks/chunk-IB5L4LKZ.js";
53
- import "./chunks/chunk-4PQA6H63.js";
54
+ import "./chunks/chunk-JCLLQ23G.js";
54
55
  import {
55
56
  require_execa,
56
57
  require_isexe
57
- } from "./chunks/chunk-EG4NYQUS.js";
58
- import "./chunks/chunk-FVWOH3F3.js";
59
- import "./chunks/chunk-K7R6WOLC.js";
58
+ } from "./chunks/chunk-WCMV6TSF.js";
59
+ import "./chunks/chunk-FUYNVB23.js";
60
+ import "./chunks/chunk-OHOYN7R2.js";
60
61
  import "./chunks/chunk-E3NE4SKN.js";
61
- import "./chunks/chunk-LDXYSGPZ.js";
62
- import "./chunks/chunk-GE6G37P4.js";
62
+ import "./chunks/chunk-QPPVRYOB.js";
63
+ import "./chunks/chunk-ABDTA3V2.js";
63
64
  import {
64
65
  getLinkFromDir,
65
66
  getTeams,
@@ -73,18 +74,18 @@ import {
73
74
  require_lib,
74
75
  require_lib3 as require_lib2,
75
76
  require_xdg_app_paths
76
- } from "./chunks/chunk-VPI2ZRPP.js";
77
+ } from "./chunks/chunk-ZI2C6YH2.js";
77
78
  import {
78
79
  TelemetryClient,
79
80
  TelemetryEventStore
80
81
  } from "./chunks/chunk-U3WLEFHU.js";
81
- import "./chunks/chunk-XKHLPA6V.js";
82
+ import "./chunks/chunk-IABMY4Q3.js";
82
83
  import "./chunks/chunk-CO5D46AG.js";
83
84
  import {
84
85
  getArgs,
85
86
  parseArguments,
86
87
  printError
87
- } from "./chunks/chunk-RFMC2QXQ.js";
88
+ } from "./chunks/chunk-JNOMOD7R.js";
88
89
  import {
89
90
  APIError,
90
91
  CantFindConfig,
@@ -97,7 +98,7 @@ import {
97
98
  init_pkg,
98
99
  pkg_default,
99
100
  pkg_exports
100
- } from "./chunks/chunk-ECRBC4HL.js";
101
+ } from "./chunks/chunk-XZ7CVBQ4.js";
101
102
  import {
102
103
  output_manager_default,
103
104
  require_dist as require_dist2
@@ -22815,16 +22816,6 @@ async function earlyGetConfig(configFile) {
22815
22816
  return new CantFindConfig([vercelFilePath, nowFilePath].map(humanizePath));
22816
22817
  }
22817
22818
 
22818
- // src/util/config/get-default.ts
22819
- var defaultGlobalConfig = {
22820
- "// Note": "This is your Vercel config file. For more information see the global configuration documentation.",
22821
- "// Docs": "https://vercel.com/docs/projects/project-configuration/global-configuration#config.json"
22822
- };
22823
- var defaultAuthConfig = {
22824
- "// Note": "This is your Vercel credentials file. DO NOT SHARE!",
22825
- "// Docs": "https://vercel.com/docs/projects/project-configuration/global-configuration#auth.json"
22826
- };
22827
-
22828
22819
  // src/index.ts
22829
22820
  import { Agent as HttpsAgent } from "https";
22830
22821
 
@@ -23680,20 +23671,10 @@ var main = async () => {
23680
23671
  }
23681
23672
  let authConfig;
23682
23673
  try {
23683
- authConfig = readAuthConfigFile();
23674
+ authConfig = readAuthConfigFile(config2);
23684
23675
  } catch (err) {
23685
23676
  if ((0, import_error_utils4.isErrnoException)(err) && err.code === "ENOENT") {
23686
- authConfig = defaultAuthConfig;
23687
- try {
23688
- writeToAuthConfigFile(authConfig);
23689
- } catch (err2) {
23690
- output_manager_default.error(
23691
- `An unexpected error occurred while trying to write the auth config to "${humanizePath(
23692
- VERCEL_AUTH_CONFIG_PATH
23693
- )}" ${(0, import_error_utils4.errorToString)(err2)}`
23694
- );
23695
- return 1;
23696
- }
23677
+ authConfig = getDefaultAuthConfig();
23697
23678
  } else {
23698
23679
  output_manager_default.error(
23699
23680
  `An unexpected error occurred while trying to read the auth config in "${humanizePath(
package/dist/version.mjs CHANGED
@@ -1 +1 @@
1
- export const version = "52.0.0";
1
+ export const version = "52.2.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vercel",
3
- "version": "52.0.0",
3
+ "version": "52.2.0",
4
4
  "type": "module",
5
5
  "preferGlobal": true,
6
6
  "license": "Apache-2.0",
@@ -33,26 +33,27 @@
33
33
  "proxy-agent": "6.4.0",
34
34
  "sandbox": "2.5.6",
35
35
  "@vercel/prepare-flags-definitions": "0.2.1",
36
- "@vercel/detect-agent": "1.2.3",
37
36
  "@vercel/build-utils": "13.20.0",
38
- "@vercel/express": "0.1.81",
37
+ "@vercel/backends": "0.2.0",
39
38
  "@vercel/elysia": "0.1.71",
40
39
  "@vercel/fastify": "0.1.74",
40
+ "@vercel/express": "0.1.81",
41
+ "@vercel/cli-auth": "0.1.0",
41
42
  "@vercel/go": "3.5.0",
42
- "@vercel/h3": "0.1.80",
43
- "@vercel/backends": "0.2.0",
43
+ "@vercel/hono": "0.2.74",
44
44
  "@vercel/hydrogen": "1.3.6",
45
45
  "@vercel/koa": "0.1.54",
46
46
  "@vercel/nestjs": "0.2.75",
47
+ "@vercel/h3": "0.1.80",
47
48
  "@vercel/next": "4.16.8",
48
- "@vercel/node": "5.7.13",
49
49
  "@vercel/python": "6.36.0",
50
+ "@vercel/node": "5.7.13",
50
51
  "@vercel/redwood": "2.4.12",
51
52
  "@vercel/remix-builder": "5.7.2",
52
53
  "@vercel/ruby": "2.3.2",
53
54
  "@vercel/rust": "1.1.1",
54
55
  "@vercel/static-build": "2.9.21",
55
- "@vercel/hono": "0.2.74"
56
+ "@vercel/detect-agent": "1.2.3"
56
57
  },
57
58
  "devDependencies": {
58
59
  "@alex_neo/jest-expect-message": "1.0.5",
@@ -180,14 +181,14 @@
180
181
  "write-json-file": "2.2.0",
181
182
  "xdg-app-paths": "5.1.0",
182
183
  "yauzl-promise": "2.1.3",
183
- "@vercel-internals/get-package-json": "1.0.0",
184
- "@vercel-internals/types": "3.0.6",
185
- "@vercel/client": "17.3.10",
184
+ "@vercel-internals/constants": "1.0.4",
186
185
  "@vercel/error-utils": "2.0.3",
187
- "@vercel/fs-detectors": "6.0.0",
188
- "@vercel/frameworks": "3.24.1",
186
+ "@vercel/frameworks": "3.24.2",
187
+ "@vercel/client": "17.3.10",
188
+ "@vercel/fs-detectors": "6.0.1",
189
+ "@vercel-internals/get-package-json": "1.0.0",
189
190
  "@vercel/routing-utils": "6.1.1",
190
- "@vercel-internals/constants": "1.0.4"
191
+ "@vercel-internals/types": "3.0.6"
191
192
  },
192
193
  "scripts": {
193
194
  "test": "jest --reporters=default --reporters=jest-junit --env node --verbose --bail",