vercel 58.0.0 → 58.3.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 (108) hide show
  1. package/dist/chunks/{add-E4KH6P4A.js → add-3RKTVRL7.js} +10 -8
  2. package/dist/chunks/{add-7PPD4ZUJ.js → add-X634O3US.js} +14 -9
  3. package/dist/chunks/add-YTFWON7N.js +187 -0
  4. package/dist/chunks/build-DJIDUWYB.js +243 -0
  5. package/dist/chunks/{chunk-DWMH5M4Q.js → chunk-2SFMOCWR.js} +1 -1
  6. package/dist/chunks/{chunk-3PKFXNJZ.js → chunk-3KNPVXJ3.js} +7 -5
  7. package/dist/chunks/chunk-3ZE5CFVM.js +346 -0
  8. package/dist/chunks/{chunk-FHEMFAHB.js → chunk-4LDQIDRM.js} +15 -9
  9. package/dist/chunks/{chunk-R5FOIIHT.js → chunk-4N7XLXM2.js} +2 -2
  10. package/dist/chunks/{chunk-KCF6S3XF.js → chunk-4UYKSYKQ.js} +10 -6
  11. package/dist/chunks/{chunk-AZTV7WPZ.js → chunk-5YXUTGSY.js} +1 -1
  12. package/dist/chunks/{chunk-MDQJLTGN.js → chunk-752Z4JQP.js} +1 -1
  13. package/dist/chunks/{chunk-OGG6UBXK.js → chunk-7QVJTI5H.js} +1 -1
  14. package/dist/chunks/{chunk-FYQPTH5C.js → chunk-A5KP5HAI.js} +7 -5
  15. package/dist/chunks/{chunk-3VS4DTAU.js → chunk-AW5YINX6.js} +106 -12
  16. package/dist/chunks/{chunk-BYQQLGCT.js → chunk-AZNCOIGT.js} +2 -2
  17. package/dist/chunks/{chunk-GIL3VAUR.js → chunk-B3JTF4CF.js} +5 -3
  18. package/dist/chunks/{chunk-4QVAYRYH.js → chunk-BEQV3X2L.js} +16 -1
  19. package/dist/chunks/{chunk-TPX7RZBM.js → chunk-BM5FP7VW.js} +9 -5
  20. package/dist/chunks/{chunk-WDE2EDYX.js → chunk-C33L5ZKY.js} +4 -4
  21. package/dist/chunks/{chunk-VUESC3YO.js → chunk-C6BDHNNF.js} +207 -4
  22. package/dist/chunks/{chunk-4G6QZSBL.js → chunk-CSJBZKC5.js} +6 -4
  23. package/dist/chunks/{chunk-TEWJ7TIW.js → chunk-D3EEVTWR.js} +2 -2
  24. package/dist/chunks/{chunk-3PGXYIKC.js → chunk-EBLH23AQ.js} +2 -2
  25. package/dist/chunks/{chunk-YA3WQFLY.js → chunk-GFG6QDIE.js} +1 -1
  26. package/dist/chunks/{chunk-FB4UFWEC.js → chunk-IH5JOYGQ.js} +4 -4
  27. package/dist/chunks/chunk-J6LK45HT.js +163 -0
  28. package/dist/chunks/{chunk-FYR7WEUJ.js → chunk-JID5CRQL.js} +3 -3
  29. package/dist/chunks/{chunk-ZVLPUREX.js → chunk-JLWQWYKO.js} +2 -2
  30. package/dist/chunks/{chunk-SZXT3PDQ.js → chunk-KBEX5MYS.js} +1 -136
  31. package/dist/chunks/{chunk-NZRWTCRM.js → chunk-KT4XXKJK.js} +1 -1
  32. package/dist/chunks/{chunk-VZSZBD4V.js → chunk-M22O6CYY.js} +1 -1
  33. package/dist/chunks/{chunk-2MJROFVC.js → chunk-MAHXF73X.js} +8 -5
  34. package/dist/chunks/{chunk-YZMZCQP3.js → chunk-MTW6MVY7.js} +10 -8
  35. package/dist/chunks/{chunk-ZMVFTCQF.js → chunk-NVSQ6KXI.js} +1 -1
  36. package/dist/chunks/{chunk-LHFNIZ2P.js → chunk-O5GNPPTU.js} +4 -2
  37. package/dist/chunks/{chunk-KGVT2RSG.js → chunk-OTQD3MHJ.js} +5 -11
  38. package/dist/chunks/{chunk-RSCSALZH.js → chunk-PNXQB4IO.js} +6 -5
  39. package/dist/chunks/{chunk-L4WYMJB3.js → chunk-QZV24TDR.js} +28 -12
  40. package/dist/chunks/chunk-RBIFXFZX.js +52 -0
  41. package/dist/chunks/{chunk-OF2GNB42.js → chunk-RQ7H43CJ.js} +1 -1
  42. package/dist/chunks/{chunk-EA22NMFU.js → chunk-RUOBMMEA.js} +2 -2
  43. package/dist/chunks/{chunk-KSSNLCL4.js → chunk-SOFC4MLS.js} +2 -2
  44. package/dist/chunks/{chunk-R54DAHCL.js → chunk-UDDCOV62.js} +2 -2
  45. package/dist/chunks/{chunk-OQGN4TEC.js → chunk-UJNNTGJY.js} +3 -3
  46. package/dist/chunks/{chunk-DGFASMSE.js → chunk-UQJMDWCY.js} +7 -5
  47. package/dist/chunks/{chunk-B2MTCHPO.js → chunk-WXJ6E3MY.js} +6 -4
  48. package/dist/chunks/{chunk-QZD5DKUR.js → chunk-XIG4GH62.js} +2 -2
  49. package/dist/chunks/chunk-XLKFJPMT.js +150 -0
  50. package/dist/chunks/{chunk-UDWRZXIT.js → chunk-Z5ZQJ5VJ.js} +15 -14
  51. package/dist/chunks/{chunk-WANVKOVB.js → chunk-ZPH66MB6.js} +808 -538
  52. package/dist/chunks/{chunk-DMSLNAVH.js → chunk-ZX2FSPWV.js} +2 -2
  53. package/dist/chunks/clear-J3OCB2DQ.js +132 -0
  54. package/dist/chunks/{compile-vercel-config-G2IVBXEI.js → compile-vercel-config-G2WILJR4.js} +5 -4
  55. package/dist/chunks/{delete-2EIVGM6P.js → delete-3NQLU7PQ.js} +7 -6
  56. package/dist/chunks/{delete-E6ZQNE5X.js → delete-HKUZTZE7.js} +7 -6
  57. package/dist/chunks/{disable-M3Q6BBB7.js → disable-7AIA4JV3.js} +7 -6
  58. package/dist/chunks/{discard-3R6ETBPS.js → discard-MIGUGPGO.js} +7 -6
  59. package/dist/chunks/{edit-7JUDPVXD.js → edit-3AU746TG.js} +8 -7
  60. package/dist/chunks/{edit-ICVMGRRU.js → edit-MDQW3S4R.js} +7 -6
  61. package/dist/chunks/{enable-HLTA35QL.js → enable-EGNWRQEI.js} +7 -6
  62. package/dist/chunks/{export-E6XZUFW3.js → export-EMBHNUMU.js} +7 -6
  63. package/dist/chunks/{image-SIRPPQZT.js → image-XXZ5DRIW.js} +5 -5
  64. package/dist/chunks/{inspect-6TQWDIBG.js → inspect-7V5ZHBBB.js} +13 -11
  65. package/dist/chunks/{inspect-65YX7L3O.js → inspect-MYUNZMLJ.js} +14 -12
  66. package/dist/chunks/{inspect-NFOURIGN.js → inspect-O7SVDBHM.js} +16 -13
  67. package/dist/chunks/{inspect-OEWWGAHZ.js → inspect-S5WJ47OH.js} +8 -7
  68. package/dist/chunks/{inspect-4FYBOOM5.js → inspect-TXVTHRAZ.js} +14 -12
  69. package/dist/chunks/{list-APFMKZJO.js → list-BQLJJACX.js} +13 -11
  70. package/dist/chunks/{list-27DCGMBI.js → list-LC2ON7OM.js} +8 -6
  71. package/dist/chunks/{list-XQCZVLES.js → list-NZ4ZOO6B.js} +8 -7
  72. package/dist/chunks/{login-FMU4CQOV.js → login-4B7KPSUW.js} +22 -51
  73. package/dist/chunks/ls-4J2WGR7U.js +178 -0
  74. package/dist/chunks/{ls-BFACWH6C.js → ls-7XMM4KCU.js} +17 -14
  75. package/dist/chunks/{ls-24BRCAZR.js → ls-FRSKR6K2.js} +15 -13
  76. package/dist/chunks/{ls-3L6EN4YU.js → ls-TWNQ7KZN.js} +13 -11
  77. package/dist/chunks/{ls-T5RGDBCV.js → ls-WCTLFAPI.js} +15 -13
  78. package/dist/chunks/{open-AG3VYJZM.js → open-J4SAVWUP.js} +7 -6
  79. package/dist/chunks/permissions-67T43WNH.js +95 -0
  80. package/dist/chunks/{publish-5OVCPS4J.js → publish-CSXOTJLD.js} +7 -6
  81. package/dist/chunks/push-7KOVRV5N.js +183 -0
  82. package/dist/chunks/{query-QS4VKBXJ.js → query-CTRPYYXR.js} +12 -10
  83. package/dist/chunks/{reorder-B5V2P7YM.js → reorder-E4PPJNEX.js} +7 -6
  84. package/dist/chunks/{reply-JBLWE6RS.js → reply-Z742BMF3.js} +7 -6
  85. package/dist/chunks/{resolve-2I6XH2G3.js → resolve-KPZJZ6IQ.js} +7 -6
  86. package/dist/chunks/{restore-O63FZXCL.js → restore-ZTH2FY4I.js} +7 -6
  87. package/dist/chunks/{rm-P3NJSCMY.js → rm-C4ODJDWP.js} +12 -8
  88. package/dist/chunks/{rm-N7W3QYWZ.js → rm-DE37CFKU.js} +15 -10
  89. package/dist/chunks/{rm-HUED5R3Q.js → rm-FVGLSIHP.js} +10 -8
  90. package/dist/chunks/rm-VOFJM4XW.js +186 -0
  91. package/dist/chunks/{rule-inspect-M3QUSPU2.js → rule-inspect-6RLS3ZNB.js} +13 -11
  92. package/dist/chunks/{rules-NSSWPJ2B.js → rules-VSXJT2QE.js} +8 -8
  93. package/dist/chunks/{schema-G2PAXPVA.js → schema-3E24G2AG.js} +11 -9
  94. package/dist/chunks/{tags-JFMO63D4.js → tags-AIZLNITP.js} +4 -4
  95. package/dist/chunks/{types-QKLIFDDP.js → types-QTOA2BTQ.js} +7 -5
  96. package/dist/chunks/{update-VJCKD6YG.js → update-QHWT7YG4.js} +10 -8
  97. package/dist/commands/build/index.js +15 -19
  98. package/dist/commands/deploy/index.js +33 -25
  99. package/dist/commands/dev/index.js +85 -17
  100. package/dist/commands/env/index.js +32 -24
  101. package/dist/commands/link/index.js +25 -22
  102. package/dist/commands/list/index.js +16 -9
  103. package/dist/commands-bulk.js +4171 -2411
  104. package/dist/help.js +1 -1
  105. package/dist/index.js +38 -34
  106. package/dist/version.mjs +1 -1
  107. package/package.json +43 -94
  108. package/dist/chunks/chunk-6OMC3HOW.js +0 -73
@@ -7,39 +7,44 @@ const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  getUpdateCommandInfo,
9
9
  isGlobal
10
- } from "./chunk-BYQQLGCT.js";
10
+ } from "./chunk-AZNCOIGT.js";
11
11
  import {
12
12
  progress
13
- } from "./chunk-B2MTCHPO.js";
13
+ } from "./chunk-WXJ6E3MY.js";
14
+ import {
15
+ validateJsonOutput
16
+ } from "./chunk-XPKWKPWA.js";
14
17
  import {
15
18
  apiCommand,
16
- listSubcommand3 as listSubcommand,
19
+ listSubcommand4 as listSubcommand,
17
20
  loginCommand
18
- } from "./chunk-WANVKOVB.js";
21
+ } from "./chunk-ZPH66MB6.js";
19
22
  import {
20
23
  require_semver
21
24
  } from "./chunk-IB5L4LKZ.js";
22
25
  import {
23
26
  help
24
- } from "./chunk-DMSLNAVH.js";
27
+ } from "./chunk-ZX2FSPWV.js";
25
28
  import {
26
29
  getGlobalPathConfig,
27
30
  login,
28
31
  writeToConfigFile
29
- } from "./chunk-TPX7RZBM.js";
32
+ } from "./chunk-BM5FP7VW.js";
30
33
  import {
31
34
  TelemetryClient,
32
35
  isNativeBinaryInstall
33
36
  } from "./chunk-ECCWJHC6.js";
34
37
  import {
35
- parseArguments,
36
38
  printError,
37
39
  require_strip_ansi
38
- } from "./chunk-SZXT3PDQ.js";
40
+ } from "./chunk-KBEX5MYS.js";
41
+ import {
42
+ parseArguments
43
+ } from "./chunk-XLKFJPMT.js";
39
44
  import {
40
45
  getFlagsSpecification,
41
46
  packageName
42
- } from "./chunk-KSSNLCL4.js";
47
+ } from "./chunk-SOFC4MLS.js";
43
48
  import {
44
49
  pkg_default
45
50
  } from "./chunk-P4QNYOFB.js";
@@ -1147,6 +1152,11 @@ var ApiTelemetryClient = class extends TelemetryClient {
1147
1152
  });
1148
1153
  }
1149
1154
  }
1155
+ trackCliFlagJson(json) {
1156
+ if (json) {
1157
+ this.trackCliFlag("json");
1158
+ }
1159
+ }
1150
1160
  /**
1151
1161
  * Normalize endpoint by replacing IDs with placeholders for privacy
1152
1162
  */
@@ -1360,7 +1370,7 @@ async function parseOperationKeyValuePairs(endpoint, bodyFields, flags, position
1360
1370
  return;
1361
1371
  }
1362
1372
  throw new Error(
1363
- `Unknown option "${key}" for operation ${endpoint.operationId}. Check the API docs or run \`vercel api ls --format json\`.`
1373
+ `Unknown option "${key}" for operation ${endpoint.operationId}. Check the API docs or run \`vercel api ls --json\`.`
1364
1374
  );
1365
1375
  }
1366
1376
  for (const field of flags["--field"] || []) {
@@ -1910,18 +1920,24 @@ async function api(client) {
1910
1920
  );
1911
1921
  return 2;
1912
1922
  }
1923
+ const formatResult = validateJsonOutput(lsFlags);
1924
+ if (!formatResult.valid) {
1925
+ output_manager_default.error(formatResult.error);
1926
+ return 1;
1927
+ }
1913
1928
  telemetryClient.trackCliSubcommandList();
1914
1929
  if (lsFlags["--refresh"])
1915
1930
  telemetryClient.trackCliFlagRefresh(true);
1916
1931
  if (lsFlags["--format"])
1917
1932
  telemetryClient.trackCliOptionFormat(lsFlags["--format"]);
1933
+ telemetryClient.trackCliFlagJson(lsFlags["--json"]);
1918
1934
  if (lsFlags["--spec-url"])
1919
1935
  telemetryClient.trackCliOptionSpecUrl(lsFlags["--spec-url"]);
1920
1936
  return listEndpoints(
1921
1937
  client,
1922
1938
  lsFlags["--refresh"] ?? false,
1923
1939
  lsFlags["--spec-url"],
1924
- lsFlags["--format"] ?? "table"
1940
+ formatResult.jsonOutput ? "json" : "table"
1925
1941
  );
1926
1942
  }
1927
1943
  if (needHelp) {
@@ -2276,7 +2292,7 @@ function printTagOperationResolveError(result, allEndpoints) {
2276
2292
  const tags = [...new Set(allEndpoints.flatMap((ep) => ep.tags || []))].sort();
2277
2293
  const preview = tags.slice(0, 25).join(", ");
2278
2294
  output_manager_default.error(
2279
- `No operations use tag "${result.tag}".${tags.length > 0 ? ` Example tags: ${preview}${tags.length > 25 ? ", \u2026" : ""}.` : ""} Run \`vercel api ls --format json\` to inspect tags.`
2295
+ `No operations use tag "${result.tag}".${tags.length > 0 ? ` Example tags: ${preview}${tags.length > 25 ? ", \u2026" : ""}.` : ""} Run \`vercel api ls --json\` to inspect tags.`
2280
2296
  );
2281
2297
  return;
2282
2298
  }
@@ -0,0 +1,52 @@
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
+
8
+ // src/commands/vcr/utils/image-ref.ts
9
+ var REPOSITORY_PATTERN = /^[a-z0-9]+(?:(?:\.|_|__|-+)[a-z0-9]+)*$/;
10
+ var TAG_PATTERN = /^[a-zA-Z0-9_][a-zA-Z0-9._-]{0,127}$/;
11
+ var DEFAULT_TAG = "latest";
12
+ function parseNameArg(nameArg, defaultRepo) {
13
+ if (!nameArg) {
14
+ return { repository: defaultRepo, tag: void 0 };
15
+ }
16
+ if (nameArg.includes("/")) {
17
+ return {
18
+ error: `Invalid image name "${nameArg}". Provide only a repository name (optionally with :tag); the registry, team, and project are added automatically.`
19
+ };
20
+ }
21
+ const colon = nameArg.lastIndexOf(":");
22
+ if (colon === -1) {
23
+ return { repository: nameArg, tag: void 0 };
24
+ }
25
+ const repository = nameArg.slice(0, colon);
26
+ const tag = nameArg.slice(colon + 1);
27
+ if (!repository) {
28
+ return {
29
+ error: `Invalid image name "${nameArg}". Missing repository name before ":".`
30
+ };
31
+ }
32
+ return { repository, tag };
33
+ }
34
+ function validateImageParts(parts) {
35
+ if (!REPOSITORY_PATTERN.test(parts.repository)) {
36
+ return `Invalid repository name "${parts.repository}". Use lowercase letters, digits, and separators (\`.\` \`_\` \`-\`), for example "my-app". Pass a valid name explicitly, e.g. \`... my-app\`.`;
37
+ }
38
+ if (parts.tag !== void 0 && !TAG_PATTERN.test(parts.tag)) {
39
+ return `Invalid tag "${parts.tag}". Tags may contain letters, digits, "_", ".", "-" and be up to 128 characters.`;
40
+ }
41
+ return void 0;
42
+ }
43
+ function buildRepositoryReference(parts) {
44
+ return `${parts.registry}/${parts.teamSlug}/${parts.projectName}/${parts.repository}`;
45
+ }
46
+
47
+ export {
48
+ DEFAULT_TAG,
49
+ parseNameArg,
50
+ validateImageParts,
51
+ buildRepositoryReference
52
+ };
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  require_strip_ansi
9
- } from "./chunk-SZXT3PDQ.js";
9
+ } from "./chunk-KBEX5MYS.js";
10
10
  import {
11
11
  __toESM
12
12
  } from "./chunk-TZ2YI2VH.js";
@@ -6,12 +6,12 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  getEnvTargetPlaceholder
9
- } from "./chunk-TPX7RZBM.js";
9
+ } from "./chunk-BM5FP7VW.js";
10
10
  import {
11
11
  packageName,
12
12
  projectOption,
13
13
  yesOption
14
- } from "./chunk-KSSNLCL4.js";
14
+ } from "./chunk-SOFC4MLS.js";
15
15
 
16
16
  // src/commands/build/command.ts
17
17
  var buildCommand = {
@@ -518,8 +518,8 @@ var jsonOption = {
518
518
  name: "json",
519
519
  shorthand: null,
520
520
  type: Boolean,
521
- deprecated: true,
522
- description: "DEPRECATED: Use --format=json instead"
521
+ deprecated: false,
522
+ description: "Output as JSON"
523
523
  };
524
524
  var allOption = {
525
525
  name: "all",
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  resolveAlertsScope
9
- } from "./chunk-FYR7WEUJ.js";
9
+ } from "./chunk-JID5CRQL.js";
10
10
  import {
11
11
  handleValidationError,
12
12
  outputError,
@@ -16,7 +16,7 @@ import {
16
16
  AGENT_REASON,
17
17
  buildCommandWithGlobalFlags,
18
18
  outputAgentError
19
- } from "./chunk-UDWRZXIT.js";
19
+ } from "./chunk-Z5ZQJ5VJ.js";
20
20
 
21
21
  // src/commands/alerts/rules/parse-scope.ts
22
22
  async function parseRulesFlagsAndScope(client, flags, jsonOutput, command = "alerts rules ls") {
@@ -11,15 +11,15 @@ import {
11
11
  getLinkedProject,
12
12
  getProjectByNameOrId,
13
13
  getScope
14
- } from "./chunk-TPX7RZBM.js";
14
+ } from "./chunk-BM5FP7VW.js";
15
15
  import {
16
16
  printError
17
- } from "./chunk-SZXT3PDQ.js";
17
+ } from "./chunk-KBEX5MYS.js";
18
18
  import {
19
19
  ProjectNotFound,
20
20
  getCommandName,
21
21
  isAPIError
22
- } from "./chunk-KSSNLCL4.js";
22
+ } from "./chunk-SOFC4MLS.js";
23
23
  import {
24
24
  output_manager_default
25
25
  } from "./chunk-OX7KI3LF.js";
@@ -6,24 +6,26 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  resolveProjectContext
9
- } from "./chunk-TPX7RZBM.js";
9
+ } from "./chunk-BM5FP7VW.js";
10
10
  import {
11
11
  AGENT_REASON,
12
12
  AGENT_STATUS,
13
13
  buildCommandWithYes,
14
14
  outputAgentError,
15
15
  withGlobalFlags
16
- } from "./chunk-UDWRZXIT.js";
16
+ } from "./chunk-Z5ZQJ5VJ.js";
17
17
  import {
18
- parseArguments,
19
18
  printError
20
- } from "./chunk-SZXT3PDQ.js";
19
+ } from "./chunk-KBEX5MYS.js";
20
+ import {
21
+ parseArguments
22
+ } from "./chunk-XLKFJPMT.js";
21
23
  import {
22
24
  getCommandName,
23
25
  getCommandNamePlain,
24
26
  getFlagsSpecification,
25
27
  getGlobalFlagsFromArgs
26
- } from "./chunk-KSSNLCL4.js";
28
+ } from "./chunk-SOFC4MLS.js";
27
29
  import {
28
30
  output_manager_default
29
31
  } from "./chunk-OX7KI3LF.js";
@@ -31,14 +31,16 @@ import {
31
31
  usePrefix,
32
32
  useState,
33
33
  writeToConfigFile
34
- } from "./chunk-TPX7RZBM.js";
34
+ } from "./chunk-BM5FP7VW.js";
35
35
  import {
36
- parseArguments,
37
36
  require_strip_ansi
38
- } from "./chunk-SZXT3PDQ.js";
37
+ } from "./chunk-KBEX5MYS.js";
38
+ import {
39
+ parseArguments
40
+ } from "./chunk-XLKFJPMT.js";
39
41
  import {
40
42
  APIError
41
- } from "./chunk-KSSNLCL4.js";
43
+ } from "./chunk-SOFC4MLS.js";
42
44
  import {
43
45
  pkg_default
44
46
  } from "./chunk-P4QNYOFB.js";
@@ -16,13 +16,13 @@ import {
16
16
  } from "./chunk-A3NYPUKZ.js";
17
17
  import {
18
18
  ellipsizeMiddle
19
- } from "./chunk-OF2GNB42.js";
19
+ } from "./chunk-RQ7H43CJ.js";
20
20
  import {
21
21
  elapsed
22
22
  } from "./chunk-VXYGCOKL.js";
23
23
  import {
24
24
  table
25
- } from "./chunk-NZRWTCRM.js";
25
+ } from "./chunk-KT4XXKJK.js";
26
26
  import {
27
27
  require_ms
28
28
  } from "./chunk-GGP5R3FU.js";
@@ -0,0 +1,150 @@
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
+ arg_common_default
9
+ } from "./chunk-SOFC4MLS.js";
10
+ import {
11
+ __commonJS,
12
+ __toESM
13
+ } from "./chunk-TZ2YI2VH.js";
14
+
15
+ // ../../node_modules/.pnpm/arg@5.0.0/node_modules/arg/index.js
16
+ var require_arg = __commonJS({
17
+ "../../node_modules/.pnpm/arg@5.0.0/node_modules/arg/index.js"(exports, module) {
18
+ var flagSymbol = Symbol("arg flag");
19
+ var ArgError = class _ArgError extends Error {
20
+ constructor(msg, code) {
21
+ super(msg);
22
+ this.name = "ArgError";
23
+ this.code = code;
24
+ Object.setPrototypeOf(this, _ArgError.prototype);
25
+ }
26
+ };
27
+ function arg2(opts, { argv = process.argv.slice(2), permissive = false, stopAtPositional = false } = {}) {
28
+ if (!opts) {
29
+ throw new ArgError("argument specification object is required", "ARG_CONFIG_NO_SPEC");
30
+ }
31
+ const result = { _: [] };
32
+ const aliases = {};
33
+ const handlers = {};
34
+ for (const key of Object.keys(opts)) {
35
+ if (!key) {
36
+ throw new ArgError("argument key cannot be an empty string", "ARG_CONFIG_EMPTY_KEY");
37
+ }
38
+ if (key[0] !== "-") {
39
+ throw new ArgError(`argument key must start with '-' but found: '${key}'`, "ARG_CONFIG_NONOPT_KEY");
40
+ }
41
+ if (key.length === 1) {
42
+ throw new ArgError(`argument key must have a name; singular '-' keys are not allowed: ${key}`, "ARG_CONFIG_NONAME_KEY");
43
+ }
44
+ if (typeof opts[key] === "string") {
45
+ aliases[key] = opts[key];
46
+ continue;
47
+ }
48
+ let type = opts[key];
49
+ let isFlag = false;
50
+ if (Array.isArray(type) && type.length === 1 && typeof type[0] === "function") {
51
+ const [fn] = type;
52
+ type = (value, name, prev = []) => {
53
+ prev.push(fn(value, name, prev[prev.length - 1]));
54
+ return prev;
55
+ };
56
+ isFlag = fn === Boolean || fn[flagSymbol] === true;
57
+ } else if (typeof type === "function") {
58
+ isFlag = type === Boolean || type[flagSymbol] === true;
59
+ } else {
60
+ throw new ArgError(`type missing or not a function or valid array type: ${key}`, "ARG_CONFIG_VAD_TYPE");
61
+ }
62
+ if (key[1] !== "-" && key.length > 2) {
63
+ throw new ArgError(`short argument keys (with a single hyphen) must have only one character: ${key}`, "ARG_CONFIG_SHORTOPT_TOOLONG");
64
+ }
65
+ handlers[key] = [type, isFlag];
66
+ }
67
+ for (let i = 0, len = argv.length; i < len; i++) {
68
+ const wholeArg = argv[i];
69
+ if (stopAtPositional && result._.length > 0) {
70
+ result._ = result._.concat(argv.slice(i));
71
+ break;
72
+ }
73
+ if (wholeArg === "--") {
74
+ result._ = result._.concat(argv.slice(i + 1));
75
+ break;
76
+ }
77
+ if (wholeArg.length > 1 && wholeArg[0] === "-") {
78
+ const separatedArguments = wholeArg[1] === "-" || wholeArg.length === 2 ? [wholeArg] : wholeArg.slice(1).split("").map((a) => `-${a}`);
79
+ for (let j = 0; j < separatedArguments.length; j++) {
80
+ const arg3 = separatedArguments[j];
81
+ const [originalArgName, argStr] = arg3[1] === "-" ? arg3.split(/=(.*)/, 2) : [arg3, void 0];
82
+ let argName = originalArgName;
83
+ while (argName in aliases) {
84
+ argName = aliases[argName];
85
+ }
86
+ if (!(argName in handlers)) {
87
+ if (permissive) {
88
+ result._.push(arg3);
89
+ continue;
90
+ } else {
91
+ throw new ArgError(`unknown or unexpected option: ${originalArgName}`, "ARG_UNKNOWN_OPTION");
92
+ }
93
+ }
94
+ const [type, isFlag] = handlers[argName];
95
+ if (!isFlag && j + 1 < separatedArguments.length) {
96
+ throw new ArgError(`option requires argument (but was followed by another short argument): ${originalArgName}`, "ARG_MISSING_REQUIRED_SHORTARG");
97
+ }
98
+ if (isFlag) {
99
+ result[argName] = type(true, argName, result[argName]);
100
+ } else if (argStr === void 0) {
101
+ if (argv.length < i + 2 || argv[i + 1].length > 1 && argv[i + 1][0] === "-" && !(argv[i + 1].match(/^-?\d*(\.(?=\d))?\d*$/) && (type === Number || // eslint-disable-next-line no-undef
102
+ typeof BigInt !== "undefined" && type === BigInt))) {
103
+ const extended = originalArgName === argName ? "" : ` (alias for ${argName})`;
104
+ throw new ArgError(`option requires argument: ${originalArgName}${extended}`, "ARG_MISSING_REQUIRED_LONGARG");
105
+ }
106
+ result[argName] = type(argv[i + 1], argName, result[argName]);
107
+ ++i;
108
+ } else {
109
+ result[argName] = type(argStr, argName, result[argName]);
110
+ }
111
+ }
112
+ } else {
113
+ result._.push(wholeArg);
114
+ }
115
+ }
116
+ return result;
117
+ }
118
+ arg2.flag = (fn) => {
119
+ fn[flagSymbol] = true;
120
+ return fn;
121
+ };
122
+ arg2.COUNT = arg2.flag((v, name, existingCount) => (existingCount || 0) + 1);
123
+ arg2.ArgError = ArgError;
124
+ module.exports = arg2;
125
+ }
126
+ });
127
+
128
+ // src/util/get-args.ts
129
+ var import_arg = __toESM(require_arg(), 1);
130
+ function getArgs(argv, argsOptions, argOptions = {}) {
131
+ return (0, import_arg.default)(Object.assign({}, arg_common_default(), argsOptions), {
132
+ ...argOptions,
133
+ argv
134
+ });
135
+ }
136
+ function parseArguments(args, flagsSpecification, parserOptions = {}) {
137
+ const { _: positional, ...rest } = (0, import_arg.default)(
138
+ Object.assign({}, arg_common_default(), flagsSpecification),
139
+ {
140
+ ...parserOptions,
141
+ argv: args
142
+ }
143
+ );
144
+ return { args: positional, flags: rest };
145
+ }
146
+
147
+ export {
148
+ getArgs,
149
+ parseArguments
150
+ };
@@ -12,7 +12,7 @@ import {
12
12
  packageName,
13
13
  stripSensitiveAuthArgs,
14
14
  suggestionFlagTakesSeparateValue
15
- } from "./chunk-KSSNLCL4.js";
15
+ } from "./chunk-SOFC4MLS.js";
16
16
  import {
17
17
  require_dist
18
18
  } from "./chunk-OX7KI3LF.js";
@@ -328,15 +328,15 @@ function outputAgentSuccess(client, payload, exitCode = 0) {
328
328
  `);
329
329
  process.exit(exitCode);
330
330
  }
331
- function buildNextStepsForEdgeConfig(client) {
331
+ function buildNextStepsForGlobalConfig(client) {
332
332
  return [
333
333
  {
334
- command: buildCommandWithGlobalFlags(client.argv, "edge-config list"),
335
- when: "List Edge Config stores in the current team scope"
334
+ command: buildCommandWithGlobalFlags(client.argv, "global-config list"),
335
+ when: "List Global Config stores in the current team scope"
336
336
  },
337
337
  {
338
338
  command: buildCommandWithGlobalFlags(client.argv, "teams switch"),
339
- when: "Switch to the team that owns the Edge Config"
339
+ when: "Switch to the team that owns the Global Config"
340
340
  },
341
341
  {
342
342
  command: buildCommandWithGlobalFlags(client.argv, "whoami"),
@@ -344,7 +344,7 @@ function buildNextStepsForEdgeConfig(client) {
344
344
  }
345
345
  ];
346
346
  }
347
- var EDGE_CONFIG_NON_INTERACTIVE_HINT = "Edge Config commands use your current team scope. Pass --scope or run `vercel teams switch` if the store is missing.";
347
+ var GLOBAL_CONFIG_NON_INTERACTIVE_HINT = "Global Config commands use your current team scope. Pass --scope or run `vercel teams switch` if the store is missing.";
348
348
  var LIST_ERROR_HINT = "Project names are team-scoped. Use --scope when the project belongs to another team, or `list --all` to list deployments across all projects.";
349
349
  function buildNextStepsForList(client, projectName) {
350
350
  return [
@@ -414,10 +414,10 @@ function buildNextStepsForProjectSubcommands(client, variant) {
414
414
  }
415
415
  var PROJECT_SUBCOMMAND_ERROR_HINT = "If you use --cwd, ensure that folder is linked to the right project, or pass an explicit project name. Use --scope when the project belongs to another team.";
416
416
  function resolveNonInteractiveDefaults(client, variant) {
417
- if (variant === "edge-config") {
417
+ if (variant === "global-config") {
418
418
  return {
419
- next: buildNextStepsForEdgeConfig(client),
420
- hint: EDGE_CONFIG_NON_INTERACTIVE_HINT
419
+ next: buildNextStepsForGlobalConfig(client),
420
+ hint: GLOBAL_CONFIG_NON_INTERACTIVE_HINT
421
421
  };
422
422
  }
423
423
  if (variant === "list") {
@@ -465,18 +465,18 @@ function exitWithNonInteractiveError(client, err, exitCode = 1, options = {
465
465
  }
466
466
  const { variant } = options;
467
467
  if (isLinkRequiredLike(err)) {
468
- if (variant === "edge-config") {
468
+ if (variant === "global-config") {
469
469
  writeAgentErrorPayloadAndExit(
470
470
  client,
471
471
  {
472
472
  status: "error",
473
473
  reason: "link_required",
474
474
  message: err instanceof Error ? err.message : String(err),
475
- next: buildNextStepsForEdgeConfig(client),
476
- hint: EDGE_CONFIG_NON_INTERACTIVE_HINT
475
+ next: buildNextStepsForGlobalConfig(client),
476
+ hint: GLOBAL_CONFIG_NON_INTERACTIVE_HINT
477
477
  },
478
478
  exitCode,
479
- "edge-config"
479
+ "global-config"
480
480
  );
481
481
  return;
482
482
  }
@@ -509,7 +509,7 @@ function exitWithNonInteractiveError(client, err, exitCode = 1, options = {
509
509
  if (isAPIError(err)) {
510
510
  const rawMessage = err.serverMessage || err.message;
511
511
  const message = normalizeApiErrorText(rawMessage);
512
- const reason = err.status === 403 ? "forbidden" : err.status === 401 ? "not_authorized" : err.status === 404 ? variant === "edge-config" ? "not_found" : "project_not_found" : err.status === 429 ? "rate_limited" : "api_error";
512
+ const reason = err.status === 403 ? "forbidden" : err.status === 401 ? "not_authorized" : err.status === 404 ? variant === "global-config" ? "not_found" : "project_not_found" : err.status === 429 ? "rate_limited" : "api_error";
513
513
  writeAgentErrorPayloadAndExit(
514
514
  client,
515
515
  {
@@ -613,6 +613,7 @@ var AGENT_REASON = {
613
613
  INVALID_BUDGET: "invalid_budget",
614
614
  INVALID_REFRESH_PERIOD: "invalid_refresh_period",
615
615
  INVALID_EXPIRATION: "invalid_expiration",
616
+ INVALID_ALERT_THRESHOLDS: "invalid_alert_thresholds",
616
617
  /**
617
618
  * Every selected agent needs explicit `--agent`/`--all` consent (see the
618
619
  * payload's skipped[]). `--yes` does not grant it, so this is deliberately