vercel 54.15.0 → 54.16.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 (54) hide show
  1. package/dist/chunks/{add-6XHROCMP.js → add-ODBKI7EV.js} +5 -5
  2. package/dist/chunks/{chunk-AWD3IGXU.js → chunk-3NR6OYDV.js} +1 -1
  3. package/dist/chunks/{chunk-OQD4G5FW.js → chunk-76QQSALN.js} +3 -3
  4. package/dist/chunks/{chunk-3RIVJWW5.js → chunk-7CTLNKAS.js} +48 -9
  5. package/dist/chunks/{chunk-OEYKL4IY.js → chunk-BGQPLZFA.js} +6 -6
  6. package/dist/chunks/{chunk-DCN3SOR6.js → chunk-BIHRICRM.js} +2 -2
  7. package/dist/chunks/{chunk-6SL223IW.js → chunk-FBYYZKN3.js} +4 -1
  8. package/dist/chunks/{chunk-TLVKY7WL.js → chunk-HL5ZRVF2.js} +6 -6
  9. package/dist/chunks/{chunk-WGH26RJV.js → chunk-HXAMK45D.js} +2 -2
  10. package/dist/chunks/{chunk-SFPJ3VR7.js → chunk-INFYZRHS.js} +286 -76
  11. package/dist/chunks/{chunk-PMUUPCDL.js → chunk-JFA4NUXP.js} +1 -1
  12. package/dist/chunks/{chunk-LABX5FSJ.js → chunk-KJMSI2CT.js} +1 -1
  13. package/dist/chunks/{chunk-EAEEBPMD.js → chunk-LJXYGWOY.js} +11 -3
  14. package/dist/chunks/{chunk-AG6TBL6C.js → chunk-MSWXRAHA.js} +1 -1
  15. package/dist/chunks/{chunk-HSXUEJ4T.js → chunk-NVITPK2U.js} +1 -1
  16. package/dist/chunks/{chunk-RHXSECUF.js → chunk-O6YJBWWC.js} +1 -1
  17. package/dist/chunks/{chunk-LOPPFUV3.js → chunk-Q4ZRBN2A.js} +1 -1
  18. package/dist/chunks/{chunk-HIYWSGI7.js → chunk-Q77ALSXR.js} +3 -0
  19. package/dist/chunks/{chunk-6TPH3ZBU.js → chunk-RCUMYP4L.js} +4 -4
  20. package/dist/chunks/{chunk-574PHXNT.js → chunk-U2NYO6GP.js} +1 -1
  21. package/dist/chunks/{chunk-6A62YUBE.js → chunk-UI2T3GI4.js} +2 -2
  22. package/dist/chunks/{chunk-UZD3DM6V.js → chunk-ULNWA6GY.js} +1 -1
  23. package/dist/chunks/{chunk-CENOYXK3.js → chunk-VLQBXXOQ.js} +2 -2
  24. package/dist/chunks/{compile-vercel-config-ATU3UBFK.js → compile-vercel-config-7THB6MTJ.js} +2 -2
  25. package/dist/chunks/{delete-WIN4UHQY.js → delete-USWDARFF.js} +3 -3
  26. package/dist/chunks/{disable-24KUO3TS.js → disable-K6B26MC2.js} +3 -3
  27. package/dist/chunks/{discard-B6ATZCPD.js → discard-2T7HZCGR.js} +3 -3
  28. package/dist/chunks/{edit-DIYIVLFQ.js → edit-2CC2WAO4.js} +5 -5
  29. package/dist/chunks/{enable-BF7NKTV7.js → enable-KEZA6F4T.js} +3 -3
  30. package/dist/chunks/{export-HHONDN7V.js → export-PE2T4HYP.js} +3 -3
  31. package/dist/chunks/{inspect-GSYKUMK5.js → inspect-TQSHD4MH.js} +4 -4
  32. package/dist/chunks/{list-OSJGB5AE.js → list-AU6URG3E.js} +4 -4
  33. package/dist/chunks/{list-PZ4DRWLO.js → list-IDTF5TWY.js} +3 -3
  34. package/dist/chunks/{ls-QBCHGSIC.js → ls-XOAWRTNQ.js} +5 -5
  35. package/dist/chunks/{publish-QYPZQ66O.js → publish-G42C77TP.js} +3 -3
  36. package/dist/chunks/{query-BDMX4CF6.js → query-YTBD7YLX.js} +3 -3
  37. package/dist/chunks/{reorder-YDTGTTJB.js → reorder-BDOOUURL.js} +3 -3
  38. package/dist/chunks/{restore-LXO2ZBAF.js → restore-ENUHC25O.js} +3 -3
  39. package/dist/chunks/{rm-3L7FVCDA.js → rm-ALWF3NBL.js} +5 -5
  40. package/dist/chunks/{routes-YEU33SON.js → routes-KUTLDFIF.js} +2 -2
  41. package/dist/chunks/{rule-inspect-T57QBYJR.js → rule-inspect-BV6MC7PG.js} +5 -5
  42. package/dist/chunks/{rules-E5DTNMFG.js → rules-IGG7M2AC.js} +6 -6
  43. package/dist/chunks/{schema-VYVJ4GYP.js → schema-ZYJOJIGL.js} +3 -3
  44. package/dist/chunks/{update-LT3LZVEZ.js → update-I3WE3IQJ.js} +5 -5
  45. package/dist/commands/build/index.js +18 -18
  46. package/dist/commands/deploy/index.js +12 -12
  47. package/dist/commands/dev/index.js +670 -100
  48. package/dist/commands/env/index.js +6 -6
  49. package/dist/commands/link/index.js +47 -13
  50. package/dist/commands/list/index.js +5 -5
  51. package/dist/commands-bulk.js +88 -45
  52. package/dist/index.js +46 -42
  53. package/dist/version.mjs +1 -1
  54. package/package.json +20 -19
@@ -20,7 +20,7 @@ import {
20
20
  import {
21
21
  formatEnvironment,
22
22
  validateLsArgs
23
- } from "../../chunks/chunk-HSXUEJ4T.js";
23
+ } from "../../chunks/chunk-NVITPK2U.js";
24
24
  import {
25
25
  validateJsonOutput
26
26
  } from "../../chunks/chunk-XPKWKPWA.js";
@@ -29,7 +29,7 @@ import {
29
29
  } from "../../chunks/chunk-YPQSDAEW.js";
30
30
  import {
31
31
  getCommandAliases
32
- } from "../../chunks/chunk-CENOYXK3.js";
32
+ } from "../../chunks/chunk-VLQBXXOQ.js";
33
33
  import "../../chunks/chunk-YE3C5CUX.js";
34
34
  import "../../chunks/chunk-IB56QKCM.js";
35
35
  import "../../chunks/chunk-DPS62LHL.js";
@@ -47,10 +47,10 @@ import {
47
47
  stamp_default
48
48
  } from "../../chunks/chunk-64IF634X.js";
49
49
  import "../../chunks/chunk-VXYGCOKL.js";
50
- import "../../chunks/chunk-LABX5FSJ.js";
50
+ import "../../chunks/chunk-KJMSI2CT.js";
51
51
  import {
52
52
  help
53
- } from "../../chunks/chunk-AWD3IGXU.js";
53
+ } from "../../chunks/chunk-3NR6OYDV.js";
54
54
  import {
55
55
  STANDARD_ENVIRONMENTS,
56
56
  addSubcommand,
@@ -72,11 +72,11 @@ import {
72
72
  require_frameworks,
73
73
  runSubcommand,
74
74
  updateSubcommand
75
- } from "../../chunks/chunk-SFPJ3VR7.js";
75
+ } from "../../chunks/chunk-INFYZRHS.js";
76
76
  import {
77
77
  TelemetryClient,
78
78
  require_dist as require_dist2
79
- } from "../../chunks/chunk-HIYWSGI7.js";
79
+ } from "../../chunks/chunk-Q77ALSXR.js";
80
80
  import {
81
81
  buildCommandWithYes,
82
82
  buildEnvAddCommandWithPreservedArgs,
@@ -11,7 +11,7 @@ import {
11
11
  addSubcommand7 as addSubcommand,
12
12
  getCommandAliases,
13
13
  linkCommand
14
- } from "../../chunks/chunk-CENOYXK3.js";
14
+ } from "../../chunks/chunk-VLQBXXOQ.js";
15
15
  import "../../chunks/chunk-YE3C5CUX.js";
16
16
  import "../../chunks/chunk-IB56QKCM.js";
17
17
  import "../../chunks/chunk-DPS62LHL.js";
@@ -21,25 +21,27 @@ import "../../chunks/chunk-56AJHIQC.js";
21
21
  import "../../chunks/chunk-IJJOI63T.js";
22
22
  import {
23
23
  ensureLink
24
- } from "../../chunks/chunk-DCN3SOR6.js";
25
- import "../../chunks/chunk-OQD4G5FW.js";
24
+ } from "../../chunks/chunk-BIHRICRM.js";
25
+ import "../../chunks/chunk-76QQSALN.js";
26
26
  import "../../chunks/chunk-QH7WYDEP.js";
27
- import "../../chunks/chunk-UZD3DM6V.js";
28
- import "../../chunks/chunk-LABX5FSJ.js";
27
+ import "../../chunks/chunk-ULNWA6GY.js";
28
+ import "../../chunks/chunk-KJMSI2CT.js";
29
29
  import {
30
30
  detectExplicitScope,
31
31
  getScope
32
- } from "../../chunks/chunk-6SL223IW.js";
32
+ } from "../../chunks/chunk-FBYYZKN3.js";
33
33
  import {
34
34
  help
35
- } from "../../chunks/chunk-AWD3IGXU.js";
35
+ } from "../../chunks/chunk-3NR6OYDV.js";
36
36
  import {
37
37
  addRepoLink,
38
- ensureRepoLink
39
- } from "../../chunks/chunk-SFPJ3VR7.js";
38
+ ensureRepoLink,
39
+ pull,
40
+ resolveProjectCwd
41
+ } from "../../chunks/chunk-INFYZRHS.js";
40
42
  import {
41
43
  TelemetryClient
42
- } from "../../chunks/chunk-HIYWSGI7.js";
44
+ } from "../../chunks/chunk-Q77ALSXR.js";
43
45
  import "../../chunks/chunk-NHGCQRK5.js";
44
46
  import "../../chunks/chunk-N2T234LO.js";
45
47
  import "../../chunks/chunk-GGP5R3FU.js";
@@ -56,8 +58,15 @@ import "../../chunks/chunk-P4QNYOFB.js";
56
58
  import {
57
59
  output_manager_default
58
60
  } from "../../chunks/chunk-Z5SBJH6L.js";
59
- import "../../chunks/chunk-S7KYDPEM.js";
60
- import "../../chunks/chunk-TZ2YI2VH.js";
61
+ import {
62
+ require_source
63
+ } from "../../chunks/chunk-S7KYDPEM.js";
64
+ import {
65
+ __toESM
66
+ } from "../../chunks/chunk-TZ2YI2VH.js";
67
+
68
+ // src/commands/link/index.ts
69
+ var import_chalk = __toESM(require_source(), 1);
61
70
 
62
71
  // src/util/telemetry/commands/link/index.ts
63
72
  var LinkTelemetryClient = class extends TelemetryClient {
@@ -110,6 +119,29 @@ var LinkTelemetryClient = class extends TelemetryClient {
110
119
  var COMMAND_CONFIG = {
111
120
  add: getCommandAliases(addSubcommand)
112
121
  };
122
+ function warnOidcRefreshFailed() {
123
+ output_manager_default.print(
124
+ `${import_chalk.default.yellow("!")} Linked project, but failed to refresh VERCEL_OIDC_TOKEN in .env.local. Rerun the link command to retry.
125
+ `
126
+ );
127
+ }
128
+ async function refreshOidcTokenAfterLink(client, cwd) {
129
+ const originalCwd = client.cwd;
130
+ try {
131
+ client.cwd = await resolveProjectCwd(cwd);
132
+ output_manager_default.print("\n");
133
+ const exitCode = await pull(client, ["--yes"], "vercel-cli:link", {
134
+ oidcTokenOnly: true
135
+ });
136
+ if (exitCode !== 0) {
137
+ warnOidcRefreshFailed();
138
+ }
139
+ } catch (_error) {
140
+ warnOidcRefreshFailed();
141
+ } finally {
142
+ client.cwd = originalCwd;
143
+ }
144
+ }
113
145
  async function link(client) {
114
146
  let parsedArgs = null;
115
147
  const flagsSpecification = getFlagsSpecification(linkCommand.options);
@@ -202,11 +234,13 @@ async function link(client) {
202
234
  projectName: parsedArgs.flags["--project"],
203
235
  successEmoji: "success",
204
236
  nonInteractive: linkNonInteractive,
205
- searchAcrossTeams: !explicitScopeProvided
237
+ searchAcrossTeams: !explicitScopeProvided,
238
+ pullEnv: false
206
239
  });
207
240
  if (typeof link2 === "number") {
208
241
  return link2;
209
242
  }
243
+ await refreshOidcTokenAfterLink(client, cwd);
210
244
  }
211
245
  return 0;
212
246
  }
@@ -20,7 +20,7 @@ import {
20
20
  import {
21
21
  formatEnvironment,
22
22
  validateLsArgs
23
- } from "../../chunks/chunk-HSXUEJ4T.js";
23
+ } from "../../chunks/chunk-NVITPK2U.js";
24
24
  import {
25
25
  validateJsonOutput
26
26
  } from "../../chunks/chunk-XPKWKPWA.js";
@@ -32,19 +32,19 @@ import {
32
32
  } from "../../chunks/chunk-VXYGCOKL.js";
33
33
  import {
34
34
  getScope
35
- } from "../../chunks/chunk-6SL223IW.js";
35
+ } from "../../chunks/chunk-FBYYZKN3.js";
36
36
  import {
37
37
  help
38
- } from "../../chunks/chunk-AWD3IGXU.js";
38
+ } from "../../chunks/chunk-3NR6OYDV.js";
39
39
  import {
40
40
  formatProject,
41
41
  getLinkedProject,
42
42
  getProjectByNameOrId,
43
43
  parseTarget
44
- } from "../../chunks/chunk-SFPJ3VR7.js";
44
+ } from "../../chunks/chunk-INFYZRHS.js";
45
45
  import {
46
46
  TelemetryClient
47
- } from "../../chunks/chunk-HIYWSGI7.js";
47
+ } from "../../chunks/chunk-Q77ALSXR.js";
48
48
  import "../../chunks/chunk-NHGCQRK5.js";
49
49
  import "../../chunks/chunk-N2T234LO.js";
50
50
  import {
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  RoutesAddTelemetryClient,
12
12
  RoutesTelemetryClient
13
- } from "./chunks/chunk-PMUUPCDL.js";
13
+ } from "./chunks/chunk-JFA4NUXP.js";
14
14
  import {
15
15
  ALL_ACTION_CHOICES,
16
16
  MAX_CONDITIONS,
@@ -31,7 +31,7 @@ import {
31
31
  runInteractiveEditLoop,
32
32
  stripQuotes,
33
33
  validateActionFlags
34
- } from "./chunks/chunk-RHXSECUF.js";
34
+ } from "./chunks/chunk-O6YJBWWC.js";
35
35
  import {
36
36
  getRouteVersions
37
37
  } from "./chunks/chunk-AHU7WNL2.js";
@@ -49,7 +49,7 @@ import {
49
49
  parsePosition,
50
50
  parseSubcommandArgs,
51
51
  withGlobalFlags
52
- } from "./chunks/chunk-574PHXNT.js";
52
+ } from "./chunks/chunk-U2NYO6GP.js";
53
53
  import {
54
54
  normalizeRepeatableStringFilters
55
55
  } from "./chunks/chunk-D7MGZH35.js";
@@ -65,11 +65,11 @@ import {
65
65
  resolveOpenApiTagForTeamsCli,
66
66
  setAutoUpdate,
67
67
  tryOpenApiFallback
68
- } from "./chunks/chunk-TLVKY7WL.js";
68
+ } from "./chunks/chunk-HL5ZRVF2.js";
69
69
  import {
70
70
  getUpdateCommand,
71
71
  isGlobal
72
- } from "./chunks/chunk-WGH26RJV.js";
72
+ } from "./chunks/chunk-HXAMK45D.js";
73
73
  import {
74
74
  Now,
75
75
  collectContactInformation,
@@ -90,14 +90,14 @@ import {
90
90
  require_format,
91
91
  require_jsonlines,
92
92
  setupDomain
93
- } from "./chunks/chunk-6TPH3ZBU.js";
93
+ } from "./chunks/chunk-RCUMYP4L.js";
94
94
  import {
95
95
  getGlobalPathConfig,
96
96
  persistAuthConfig,
97
97
  readLocalConfig,
98
98
  sleep,
99
99
  writeToConfigFile
100
- } from "./chunks/chunk-EAEEBPMD.js";
100
+ } from "./chunks/chunk-LJXYGWOY.js";
101
101
  import "./chunks/chunk-V5P25P7F.js";
102
102
  import {
103
103
  ellipsis,
@@ -125,7 +125,7 @@ import {
125
125
  import {
126
126
  formatEnvironment,
127
127
  validateLsArgs
128
- } from "./chunks/chunk-HSXUEJ4T.js";
128
+ } from "./chunks/chunk-NVITPK2U.js";
129
129
  import {
130
130
  validateJsonOutput
131
131
  } from "./chunks/chunk-XPKWKPWA.js";
@@ -397,7 +397,7 @@ import {
397
397
  webAnalyticsSubcommand,
398
398
  webhooksCommand,
399
399
  whoamiCommand
400
- } from "./chunks/chunk-CENOYXK3.js";
400
+ } from "./chunks/chunk-VLQBXXOQ.js";
401
401
  import {
402
402
  metricsCommand,
403
403
  schemaSubcommand
@@ -439,9 +439,9 @@ import {
439
439
  import "./chunks/chunk-IJJOI63T.js";
440
440
  import {
441
441
  main
442
- } from "./chunks/chunk-OEYKL4IY.js";
442
+ } from "./chunks/chunk-BGQPLZFA.js";
443
443
  import "./chunks/chunk-IB5L4LKZ.js";
444
- import "./chunks/chunk-AG6TBL6C.js";
444
+ import "./chunks/chunk-MSWXRAHA.js";
445
445
  import {
446
446
  require_execa
447
447
  } from "./chunks/chunk-YI3JV6GM.js";
@@ -456,22 +456,22 @@ import {
456
456
  } from "./chunks/chunk-VXYGCOKL.js";
457
457
  import {
458
458
  ensureLink
459
- } from "./chunks/chunk-DCN3SOR6.js";
460
- import "./chunks/chunk-OQD4G5FW.js";
459
+ } from "./chunks/chunk-BIHRICRM.js";
460
+ import "./chunks/chunk-76QQSALN.js";
461
461
  import {
462
462
  AGENT_ACTION,
463
463
  AGENT_REASON,
464
464
  AGENT_STATUS
465
465
  } from "./chunks/chunk-QH7WYDEP.js";
466
- import "./chunks/chunk-UZD3DM6V.js";
467
- import "./chunks/chunk-LABX5FSJ.js";
466
+ import "./chunks/chunk-ULNWA6GY.js";
467
+ import "./chunks/chunk-KJMSI2CT.js";
468
468
  import {
469
469
  detectExplicitScope,
470
470
  getScope
471
- } from "./chunks/chunk-6SL223IW.js";
471
+ } from "./chunks/chunk-FBYYZKN3.js";
472
472
  import {
473
473
  help
474
- } from "./chunks/chunk-AWD3IGXU.js";
474
+ } from "./chunks/chunk-3NR6OYDV.js";
475
475
  import {
476
476
  STANDARD_ENVIRONMENTS,
477
477
  VERCEL_CONFIG_EXTENSIONS,
@@ -517,10 +517,10 @@ import {
517
517
  selectAndParseRemoteUrl,
518
518
  selectOrg,
519
519
  ua_default
520
- } from "./chunks/chunk-SFPJ3VR7.js";
520
+ } from "./chunks/chunk-INFYZRHS.js";
521
521
  import {
522
522
  TelemetryClient
523
- } from "./chunks/chunk-HIYWSGI7.js";
523
+ } from "./chunks/chunk-Q77ALSXR.js";
524
524
  import {
525
525
  argvHasNonInteractive,
526
526
  buildCommandWithGlobalFlags,
@@ -898,7 +898,7 @@ async function activity(client) {
898
898
  return 0;
899
899
  }
900
900
  telemetry2.trackCliSubcommandLs(subcommandOriginal);
901
- const listFn = (await import("./chunks/list-PZ4DRWLO.js")).default;
901
+ const listFn = (await import("./chunks/list-IDTF5TWY.js")).default;
902
902
  return listFn(client, telemetry2);
903
903
  }
904
904
  }
@@ -2001,17 +2001,17 @@ async function alerts(client) {
2001
2001
  switch (subcommand) {
2002
2002
  case "inspect": {
2003
2003
  telemetry2.trackCliSubcommandInspect(subcommandOriginal);
2004
- const inspectFn = (await import("./chunks/inspect-GSYKUMK5.js")).default;
2004
+ const inspectFn = (await import("./chunks/inspect-TQSHD4MH.js")).default;
2005
2005
  return inspectFn(client, args);
2006
2006
  }
2007
2007
  case "rules": {
2008
2008
  telemetry2.trackCliSubcommandRules(args[0] ?? "ls");
2009
- const rulesFn = (await import("./chunks/rules-E5DTNMFG.js")).default;
2009
+ const rulesFn = (await import("./chunks/rules-IGG7M2AC.js")).default;
2010
2010
  return rulesFn(client, args);
2011
2011
  }
2012
2012
  default: {
2013
2013
  telemetry2.trackCliSubcommandLs(subcommandOriginal);
2014
- const listFn = (await import("./chunks/list-OSJGB5AE.js")).default;
2014
+ const listFn = (await import("./chunks/list-AU6URG3E.js")).default;
2015
2015
  return listFn(client, telemetry2);
2016
2016
  }
2017
2017
  }
@@ -5859,11 +5859,15 @@ async function createPurchase(client, item) {
5859
5859
  // src/util/buy/handle-purchase-error.ts
5860
5860
  var import_open2 = __toESM(require_open(), 1);
5861
5861
  var import_error_utils2 = __toESM(require_dist(), 1);
5862
- var getBillingUrl = (teamSlug) => `https://vercel.com/${teamSlug}/~/settings/billing`;
5862
+
5863
+ // src/util/billing-url.ts
5864
+ var getTeamBillingUrl = (teamSlug) => `https://vercel.com/${teamSlug}/~/settings/billing`;
5865
+
5866
+ // src/util/buy/handle-purchase-error.ts
5863
5867
  function tryOpenBillingPage(teamSlug, openBrowser) {
5864
5868
  if (!openBrowser)
5865
5869
  return;
5866
- const billingUrl = teamSlug ? getBillingUrl(teamSlug) : "https://vercel.com/dashboard";
5870
+ const billingUrl = teamSlug ? getTeamBillingUrl(teamSlug) : "https://vercel.com/dashboard";
5867
5871
  void (0, import_open2.default)(billingUrl).catch((err) => {
5868
5872
  output_manager_default.debug(`Failed to open browser: ${err}`);
5869
5873
  });
@@ -5882,7 +5886,7 @@ function handlePurchaseError(err, teamSlug, opts) {
5882
5886
  return 1;
5883
5887
  }
5884
5888
  if (err.code === "missing_stripe_customer") {
5885
- const billingUrl = teamSlug ? getBillingUrl(teamSlug) : "https://vercel.com/dashboard";
5889
+ const billingUrl = teamSlug ? getTeamBillingUrl(teamSlug) : "https://vercel.com/dashboard";
5886
5890
  const dashboardHint = teamSlug ? ` Please add one: ${output_manager_default.link(billingUrl, billingUrl)}` : ` Please add one in the ${output_manager_default.link("Vercel dashboard", billingUrl)}.`;
5887
5891
  output_manager_default.error(
5888
5892
  `Your team does not have a payment method on file.${dashboardHint}`
@@ -32686,7 +32690,6 @@ var import_error_utils10 = __toESM(require_dist(), 1);
32686
32690
  var import_chalk133 = __toESM(require_source(), 1);
32687
32691
  var import_ms18 = __toESM(require_ms(), 1);
32688
32692
  var import_title2 = __toESM(require_lib2(), 1);
32689
- import { URL as URL2 } from "url";
32690
32693
 
32691
32694
  // src/util/output/builds.ts
32692
32695
  var import_chalk131 = __toESM(require_source(), 1);
@@ -32975,6 +32978,41 @@ function routes(routes2) {
32975
32978
  return toPrint;
32976
32979
  }
32977
32980
 
32981
+ // src/util/parse-deployment-url.ts
32982
+ import { URL as URL2 } from "url";
32983
+ function parseDeploymentUrl(input) {
32984
+ let url;
32985
+ try {
32986
+ url = new URL2(input);
32987
+ } catch {
32988
+ return normalizeDeploymentId(input);
32989
+ }
32990
+ if (url.hostname === "vercel.com" || url.hostname === "www.vercel.com") {
32991
+ return parseVercelDashboardUrl(url);
32992
+ }
32993
+ return { deploymentIdOrHost: url.hostname };
32994
+ }
32995
+ function parseVercelDashboardUrl(url) {
32996
+ const pathParts = url.pathname.split("/").filter(Boolean);
32997
+ if (pathParts.length >= 3) {
32998
+ const [scope, , deploymentId] = pathParts;
32999
+ return {
33000
+ deploymentIdOrHost: normalizeDeploymentId(deploymentId).deploymentIdOrHost,
33001
+ scope
33002
+ };
33003
+ }
33004
+ return { deploymentIdOrHost: url.hostname };
33005
+ }
33006
+ function normalizeDeploymentId(input) {
33007
+ if (input.includes(".")) {
33008
+ return { deploymentIdOrHost: input };
33009
+ }
33010
+ if (input.startsWith("dpl_")) {
33011
+ return { deploymentIdOrHost: input };
33012
+ }
33013
+ return { deploymentIdOrHost: `dpl_${input}` };
33014
+ }
33015
+
32978
33016
  // src/util/telemetry/commands/inspect/index.ts
32979
33017
  var InspectTelemetryClient = class extends TelemetryClient {
32980
33018
  trackCliArgumentUrlOrDeploymentId(idOrHost) {
@@ -33058,6 +33096,15 @@ async function inspect4(client) {
33058
33096
  return 1;
33059
33097
  }
33060
33098
  let contextName = null;
33099
+ const parsed = parseDeploymentUrl(deploymentIdOrHost);
33100
+ deploymentIdOrHost = parsed.deploymentIdOrHost;
33101
+ if (parsed.scope && !detectExplicitScope(client)) {
33102
+ const teams2 = await getTeams(client);
33103
+ const team = teams2.find((t) => t.slug === parsed.scope);
33104
+ if (team) {
33105
+ client.config.currentTeam = team.id;
33106
+ }
33107
+ }
33061
33108
  try {
33062
33109
  ({ contextName } = await getScope(client));
33063
33110
  } catch (err) {
@@ -33077,10 +33124,6 @@ async function inspect4(client) {
33077
33124
  }
33078
33125
  const asJson = formatResult.jsonOutput;
33079
33126
  const startTimestamp = Date.now();
33080
- try {
33081
- deploymentIdOrHost = new URL2(deploymentIdOrHost).hostname;
33082
- } catch {
33083
- }
33084
33127
  output_manager_default.spinner(
33085
33128
  `Fetching deployment "${deploymentIdOrHost}" in ${import_chalk133.default.bold(contextName)}`
33086
33129
  );
@@ -40923,7 +40966,7 @@ async function metrics(client) {
40923
40966
  return 0;
40924
40967
  }
40925
40968
  telemetry2.trackCliSubcommandSchema(subcommandOriginal);
40926
- const schemaFn = (await import("./chunks/schema-VYVJ4GYP.js")).default;
40969
+ const schemaFn = (await import("./chunks/schema-ZYJOJIGL.js")).default;
40927
40970
  return schemaFn(client, telemetry2);
40928
40971
  }
40929
40972
  default: {
@@ -40936,7 +40979,7 @@ async function metrics(client) {
40936
40979
  output_manager_default.print(help(metricsCommand, { columns: client.stderr.columns }));
40937
40980
  return 2;
40938
40981
  }
40939
- const queryFn = (await import("./chunks/query-BDMX4CF6.js")).default;
40982
+ const queryFn = (await import("./chunks/query-YTBD7YLX.js")).default;
40940
40983
  return queryFn(client, telemetry2);
40941
40984
  }
40942
40985
  }
@@ -41126,7 +41169,7 @@ async function createGroup(client) {
41126
41169
  if (groups.length >= maxMicrofrontendsGroupsPerTeam) {
41127
41170
  if (isLimitedPlan) {
41128
41171
  const planName = isProTrialPlan ? "Pro Trial" : "Hobby";
41129
- const url = `https://vercel.com/${teamSlug}/~/settings/billing`;
41172
+ const url = getTeamBillingUrl(teamSlug);
41130
41173
  output_manager_default.log(
41131
41174
  `You've reached the microfrontends group limit for ${planName}. Upgrade to Pro to create more groups.`
41132
41175
  );
@@ -41627,7 +41670,7 @@ async function addToGroup(client) {
41627
41670
  const isLimitedPlan = isProTrialPlan || plan === "hobby";
41628
41671
  if (isLimitedPlan && totalAfter > freeProjects) {
41629
41672
  const planName = isProTrialPlan ? "Pro Trial" : "Hobby";
41630
- const url = `https://vercel.com/${teamSlug}/~/settings/billing`;
41673
+ const url = getTeamBillingUrl(teamSlug);
41631
41674
  output_manager_default.log(
41632
41675
  `You've reached the microfrontends project limit for ${planName}. Upgrade to Pro to add more projects.`
41633
41676
  );
@@ -41695,7 +41738,7 @@ async function addToGroup(client) {
41695
41738
  if (selectedGroup.projects.length >= maxMicrofrontendsPerGroup) {
41696
41739
  if (isLimitedPlan) {
41697
41740
  const planName = isProTrialPlan ? "Pro Trial" : "Hobby";
41698
- const url = `https://vercel.com/${teamSlug}/~/settings/billing`;
41741
+ const url = getTeamBillingUrl(teamSlug);
41699
41742
  output_manager_default.log(
41700
41743
  `You've reached the microfrontends project limit for ${planName}. Upgrade to Pro to add more projects.`
41701
41744
  );
@@ -51847,7 +51890,7 @@ async function main27(client) {
51847
51890
  return 2;
51848
51891
  }
51849
51892
  telemetry2.trackCliSubcommandEdit(subcommandOriginal);
51850
- return (await import("./chunks/edit-DIYIVLFQ.js")).default(client, args);
51893
+ return (await import("./chunks/edit-2CC2WAO4.js")).default(client, args);
51851
51894
  case "delete":
51852
51895
  if (needHelp) {
51853
51896
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -51855,7 +51898,7 @@ async function main27(client) {
51855
51898
  return 2;
51856
51899
  }
51857
51900
  telemetry2.trackCliSubcommandDelete(subcommandOriginal);
51858
- return (await import("./chunks/delete-WIN4UHQY.js")).default(client, args);
51901
+ return (await import("./chunks/delete-USWDARFF.js")).default(client, args);
51859
51902
  case "enable":
51860
51903
  if (needHelp) {
51861
51904
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -51863,7 +51906,7 @@ async function main27(client) {
51863
51906
  return 2;
51864
51907
  }
51865
51908
  telemetry2.trackCliSubcommandEnable(subcommandOriginal);
51866
- return (await import("./chunks/enable-BF7NKTV7.js")).default(client, args);
51909
+ return (await import("./chunks/enable-KEZA6F4T.js")).default(client, args);
51867
51910
  case "disable":
51868
51911
  if (needHelp) {
51869
51912
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -51871,7 +51914,7 @@ async function main27(client) {
51871
51914
  return 2;
51872
51915
  }
51873
51916
  telemetry2.trackCliSubcommandDisable(subcommandOriginal);
51874
- return (await import("./chunks/disable-24KUO3TS.js")).default(client, args);
51917
+ return (await import("./chunks/disable-K6B26MC2.js")).default(client, args);
51875
51918
  case "reorder":
51876
51919
  if (needHelp) {
51877
51920
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -51879,7 +51922,7 @@ async function main27(client) {
51879
51922
  return 2;
51880
51923
  }
51881
51924
  telemetry2.trackCliSubcommandReorder(subcommandOriginal);
51882
- return (await import("./chunks/reorder-YDTGTTJB.js")).default(client, args);
51925
+ return (await import("./chunks/reorder-BDOOUURL.js")).default(client, args);
51883
51926
  case "export":
51884
51927
  if (needHelp) {
51885
51928
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -51887,7 +51930,7 @@ async function main27(client) {
51887
51930
  return 2;
51888
51931
  }
51889
51932
  telemetry2.trackCliSubcommandExport(subcommandOriginal);
51890
- return (await import("./chunks/export-HHONDN7V.js")).default(client, args);
51933
+ return (await import("./chunks/export-PE2T4HYP.js")).default(client, args);
51891
51934
  case "publish":
51892
51935
  if (needHelp) {
51893
51936
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -51895,7 +51938,7 @@ async function main27(client) {
51895
51938
  return 2;
51896
51939
  }
51897
51940
  telemetry2.trackCliSubcommandPublish(subcommandOriginal);
51898
- return (await import("./chunks/publish-QYPZQ66O.js")).default(client, args);
51941
+ return (await import("./chunks/publish-G42C77TP.js")).default(client, args);
51899
51942
  case "restore":
51900
51943
  if (needHelp) {
51901
51944
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -51903,7 +51946,7 @@ async function main27(client) {
51903
51946
  return 2;
51904
51947
  }
51905
51948
  telemetry2.trackCliSubcommandRestore(subcommandOriginal);
51906
- return (await import("./chunks/restore-LXO2ZBAF.js")).default(client, args);
51949
+ return (await import("./chunks/restore-ENUHC25O.js")).default(client, args);
51907
51950
  case "discard-staging":
51908
51951
  if (needHelp) {
51909
51952
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -51911,7 +51954,7 @@ async function main27(client) {
51911
51954
  return 2;
51912
51955
  }
51913
51956
  telemetry2.trackCliSubcommandDiscardStaging(subcommandOriginal);
51914
- return (await import("./chunks/discard-B6ATZCPD.js")).default(client, args);
51957
+ return (await import("./chunks/discard-2T7HZCGR.js")).default(client, args);
51915
51958
  default:
51916
51959
  output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG37));
51917
51960
  output_manager_default.print(help(routesCommand, { columns: client.stderr.columns }));