vercel 51.2.1 → 51.4.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 (69) hide show
  1. package/dist/chunks/add-RNQLGEYS.js +180 -0
  2. package/dist/chunks/{chunk-XAVGWINL.js → chunk-3GDNTBCE.js} +44 -13
  3. package/dist/chunks/{chunk-SSOWPEZT.js → chunk-4DR2FV6O.js} +2 -2
  4. package/dist/chunks/{chunk-Q6BEDVOU.js → chunk-4PQA6H63.js} +1 -1
  5. package/dist/chunks/{chunk-IS2HEMF4.js → chunk-4RBF6ZDU.js} +4 -2
  6. package/dist/chunks/{chunk-7S7GE4BN.js → chunk-537JTK2U.js} +216 -523
  7. package/dist/chunks/{chunk-K5XJCQQO.js → chunk-5NTBJ33M.js} +1 -1
  8. package/dist/chunks/{chunk-5YQCJTZI.js → chunk-5VKKTHMP.js} +6 -6
  9. package/dist/chunks/{chunk-W6FW7CCT.js → chunk-6C33Y3DC.js} +13 -8
  10. package/dist/chunks/{chunk-5WHDQH2U.js → chunk-7MF47FW3.js} +1 -1
  11. package/dist/chunks/chunk-7ZDERWUW.js +167 -0
  12. package/dist/chunks/{chunk-RK4TKB3D.js → chunk-AUSDBXUD.js} +7 -5
  13. package/dist/chunks/{chunk-BUBUVE23.js → chunk-BJQTGP42.js} +4 -2
  14. package/dist/chunks/{chunk-57RLFBKC.js → chunk-BRQBLRFB.js} +1 -1
  15. package/dist/chunks/chunk-CGTXAXZ4.js +484 -0
  16. package/dist/chunks/{chunk-BQUQ5F7R.js → chunk-CRZM5WM2.js} +4 -2
  17. package/dist/chunks/{chunk-VTQNSCUG.js → chunk-D2D4FJ6S.js} +8 -6
  18. package/dist/chunks/{chunk-G6MVEB4W.js → chunk-DKFFXOHJ.js} +3 -3
  19. package/dist/chunks/chunk-DVQ4SIWF.js +183 -0
  20. package/dist/chunks/{chunk-A4NVECX5.js → chunk-ECRBC4HL.js} +4 -581
  21. package/dist/chunks/{chunk-L2BKVTHL.js → chunk-G6RXZLQ2.js} +2 -2
  22. package/dist/chunks/{chunk-4YZKA4FN.js → chunk-GE6G37P4.js} +1 -1
  23. package/dist/chunks/{chunk-NELCIT4M.js → chunk-GLDQ23LD.js} +1 -1
  24. package/dist/chunks/{chunk-QQTF2FEY.js → chunk-HNU5CXW4.js} +9 -5
  25. package/dist/chunks/chunk-HQXVCOH6.js +139 -0
  26. package/dist/chunks/{chunk-3FMFPD7F.js → chunk-L2JUC7NX.js} +2 -2
  27. package/dist/chunks/{chunk-Y5YCSB6X.js → chunk-LDXYSGPZ.js} +2 -2
  28. package/dist/chunks/{chunk-U5J73OA3.js → chunk-N45K6NXC.js} +1 -1
  29. package/dist/chunks/{chunk-5DLMAFQU.js → chunk-NKJC5SI4.js} +6 -4
  30. package/dist/chunks/{chunk-FSOFFJDV.js → chunk-O7SQKNIT.js} +1 -1
  31. package/dist/chunks/{chunk-XRR5HDB3.js → chunk-P56KWLXY.js} +2 -2
  32. package/dist/chunks/{chunk-EHZKWVK2.js → chunk-PBGN54ZH.js} +5 -5
  33. package/dist/chunks/chunk-RFMC2QXQ.js +602 -0
  34. package/dist/chunks/{chunk-W5K4YCTI.js → chunk-RJD5NYGF.js} +5 -3
  35. package/dist/chunks/{chunk-WXNT7WJO.js → chunk-TAOVG4PS.js} +49 -4
  36. package/dist/chunks/{chunk-4EGCWWSR.js → chunk-UJ4JXXED.js} +143 -16
  37. package/dist/chunks/{chunk-2IAZZEVQ.js → chunk-UWKTUK3W.js} +4 -2
  38. package/dist/chunks/{chunk-VE7MY76H.js → chunk-VGWGLBUC.js} +4 -2
  39. package/dist/chunks/{compile-vercel-config-2GV46IDP.js → compile-vercel-config-ZVY7LBE3.js} +4 -2
  40. package/dist/chunks/{delete-PXMYSQGR.js → delete-SKTJMJNP.js} +7 -5
  41. package/dist/chunks/{disable-2ZQ4OG4A.js → disable-AG7I6DPV.js} +7 -5
  42. package/dist/chunks/{discard-FQZTZ5HK.js → discard-LUK6LBLT.js} +7 -5
  43. package/dist/chunks/{edit-F3J7Q5SZ.js → edit-3BR5HP3U.js} +8 -6
  44. package/dist/chunks/{enable-ZW4W33H5.js → enable-4JNLOKSM.js} +7 -5
  45. package/dist/chunks/{export-ZZV6ESIW.js → export-YLZ6QSHG.js} +7 -5
  46. package/dist/chunks/inspect-HUJLUQAV.js +353 -0
  47. package/dist/chunks/{list-SSIMVNNN.js → list-EPU4SB3E.js} +10 -7
  48. package/dist/chunks/{list-VFPV4TUW.js → list-RMA56KYZ.js} +115 -85
  49. package/dist/chunks/ls-7HHDYE6F.js +114 -0
  50. package/dist/chunks/{publish-3K76MNS3.js → publish-6YE4OUDI.js} +7 -5
  51. package/dist/chunks/{query-CY7JJSSX.js → query-VNBKOI65.js} +15 -12
  52. package/dist/chunks/{reorder-6L7MENN5.js → reorder-VFM23ESC.js} +7 -5
  53. package/dist/chunks/{restore-XUYXOJQ2.js → restore-VX34SXVF.js} +7 -5
  54. package/dist/chunks/rm-5KXF2PY3.js +164 -0
  55. package/dist/chunks/rule-inspect-JG7AE5TI.js +142 -0
  56. package/dist/chunks/rules-XRJBT22L.js +83 -0
  57. package/dist/chunks/{schema-G5FSLZVA.js → schema-FUOKCZTW.js} +9 -7
  58. package/dist/chunks/{types-A4EAQ6F6.js → types-QNN5CDCB.js} +6 -4
  59. package/dist/chunks/update-4FMWTIJK.js +196 -0
  60. package/dist/commands/build/index.js +36 -43
  61. package/dist/commands/deploy/index.js +171 -32
  62. package/dist/commands/dev/index.js +36 -31
  63. package/dist/commands/env/index.js +32 -27
  64. package/dist/commands/link/index.js +21 -17
  65. package/dist/commands/list/index.js +14 -11
  66. package/dist/commands-bulk.js +1640 -884
  67. package/dist/index.js +28 -24
  68. package/dist/version.mjs +1 -1
  69. package/package.json +17 -17
@@ -8,19 +8,23 @@ import {
8
8
  AGENT_REASON,
9
9
  AGENT_STATUS
10
10
  } from "./chunk-E3NE4SKN.js";
11
+ import {
12
+ getLinkedProject
13
+ } from "./chunk-537JTK2U.js";
11
14
  import {
12
15
  buildCommandWithYes,
13
- getLinkedProject,
14
16
  outputAgentError
15
- } from "./chunk-7S7GE4BN.js";
17
+ } from "./chunk-CGTXAXZ4.js";
16
18
  import {
17
- getCommandName,
18
- getCommandNamePlain,
19
19
  getFlagsSpecification,
20
20
  getGlobalFlagsOnlyFromArgs,
21
21
  parseArguments,
22
22
  printError
23
- } from "./chunk-A4NVECX5.js";
23
+ } from "./chunk-RFMC2QXQ.js";
24
+ import {
25
+ getCommandName,
26
+ getCommandNamePlain
27
+ } from "./chunk-ECRBC4HL.js";
24
28
  import {
25
29
  output_manager_default
26
30
  } from "./chunk-ZQKJVHXY.js";
@@ -0,0 +1,139 @@
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
+ resolveAlertsScope
9
+ } from "./chunk-7ZDERWUW.js";
10
+ import {
11
+ handleValidationError,
12
+ outputError,
13
+ validateAllProjectMutualExclusivity
14
+ } from "./chunk-HTOH3MSD.js";
15
+ import {
16
+ AGENT_REASON
17
+ } from "./chunk-E3NE4SKN.js";
18
+ import {
19
+ buildCommandWithGlobalFlags,
20
+ outputAgentError
21
+ } from "./chunk-CGTXAXZ4.js";
22
+
23
+ // src/commands/alerts/rules/parse-scope.ts
24
+ async function parseRulesFlagsAndScope(client, flags, jsonOutput) {
25
+ const mutual = validateAllProjectMutualExclusivity(
26
+ flags["--all"],
27
+ flags["--project"]
28
+ );
29
+ if (!mutual.valid) {
30
+ outputAgentError(
31
+ client,
32
+ {
33
+ status: "error",
34
+ reason: AGENT_REASON.INVALID_ARGUMENTS,
35
+ message: mutual.message,
36
+ next: [
37
+ {
38
+ command: buildCommandWithGlobalFlags(
39
+ client.argv,
40
+ "alerts rules --help"
41
+ ),
42
+ when: "Use either `--project` or `--all`, not both"
43
+ }
44
+ ]
45
+ },
46
+ 1
47
+ );
48
+ return handleValidationError(mutual, jsonOutput, client);
49
+ }
50
+ return resolveAlertsScope(client, {
51
+ project: flags["--project"],
52
+ all: flags["--all"],
53
+ jsonOutput
54
+ });
55
+ }
56
+
57
+ // src/commands/alerts/rules/util.ts
58
+ function buildRulesQuery(scope) {
59
+ const query = new URLSearchParams({ teamId: scope.teamId });
60
+ if (scope.projectId) {
61
+ query.set("projectId", scope.projectId);
62
+ }
63
+ return query;
64
+ }
65
+ function rulesCollectionPath(scope) {
66
+ return `/alerts/v2/alert-rules?${buildRulesQuery(scope).toString()}`;
67
+ }
68
+ function rulesItemPath(scope, ruleId) {
69
+ const query = new URLSearchParams({ teamId: scope.teamId });
70
+ return `/alerts/v2/alert-rules/${encodeURIComponent(ruleId)}?${query.toString()}`;
71
+ }
72
+ function handleRulesApiError(client, err, jsonOutput) {
73
+ const message = err.status === 401 || err.status === 403 ? "You do not have access to alert rules in this scope. Ensure your role can manage Alert Rules, or pass --token and --scope." : err.status >= 500 ? `The alert rules endpoint failed (${err.status}). Re-run with --debug and share the x-vercel-id from the failed request.` : err.serverMessage || `API error (${err.status}).`;
74
+ const reason = err.status === 401 ? "not_authorized" : err.status === 403 ? "forbidden" : err.status === 404 ? AGENT_REASON.NOT_FOUND : err.status === 429 ? "rate_limited" : AGENT_REASON.API_ERROR;
75
+ outputAgentError(
76
+ client,
77
+ {
78
+ status: "error",
79
+ reason,
80
+ message,
81
+ ...err.status === 401 || err.status === 403 ? {
82
+ hint: "Confirm team scope with whoami; use --scope <team-slug> if the rule lives under another team.",
83
+ next: [
84
+ {
85
+ command: buildCommandWithGlobalFlags(client.argv, "whoami"),
86
+ when: "See current user and team"
87
+ },
88
+ {
89
+ command: buildCommandWithGlobalFlags(
90
+ client.argv,
91
+ "alerts rules ls"
92
+ ),
93
+ when: "Retry listing rules after fixing scope or permissions"
94
+ }
95
+ ]
96
+ } : {}
97
+ },
98
+ 1
99
+ );
100
+ return outputError(client, jsonOutput, err.code || "API_ERROR", message);
101
+ }
102
+ function emitRulesArgParseError(client, err, recoverWithProjectFlag) {
103
+ const msg = err instanceof Error ? err.message : String(err);
104
+ const projectFlagMissingArg = msg.includes("--project") && msg.includes("requires argument");
105
+ outputAgentError(
106
+ client,
107
+ {
108
+ status: "error",
109
+ reason: AGENT_REASON.INVALID_ARGUMENTS,
110
+ message: projectFlagMissingArg ? "`--project` requires a project name or id (for example `--project my-app`)." : msg,
111
+ next: projectFlagMissingArg ? [
112
+ {
113
+ command: buildCommandWithGlobalFlags(
114
+ client.argv,
115
+ recoverWithProjectFlag
116
+ ),
117
+ when: "Re-run with a project name or id (replace placeholder)"
118
+ }
119
+ ] : [
120
+ {
121
+ command: buildCommandWithGlobalFlags(
122
+ client.argv,
123
+ "alerts rules --help"
124
+ ),
125
+ when: "See valid `alerts rules` subcommands"
126
+ }
127
+ ]
128
+ },
129
+ 1
130
+ );
131
+ }
132
+
133
+ export {
134
+ parseRulesFlagsAndScope,
135
+ rulesCollectionPath,
136
+ rulesItemPath,
137
+ handleRulesApiError,
138
+ emitRulesArgParseError
139
+ };
@@ -11,10 +11,10 @@ import {
11
11
  getTeamById,
12
12
  getUser,
13
13
  getVercelDirectory
14
- } from "./chunk-7S7GE4BN.js";
14
+ } from "./chunk-537JTK2U.js";
15
15
  import {
16
16
  TeamDeleted
17
- } from "./chunk-A4NVECX5.js";
17
+ } from "./chunk-ECRBC4HL.js";
18
18
  import {
19
19
  output_manager_default
20
20
  } from "./chunk-ZQKJVHXY.js";
@@ -7,13 +7,13 @@ const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  noBorderChars,
9
9
  require_cli_table3
10
- } from "./chunk-4YZKA4FN.js";
10
+ } from "./chunk-GE6G37P4.js";
11
11
  import {
12
12
  require_dist
13
13
  } from "./chunk-U3WLEFHU.js";
14
14
  import {
15
15
  globalCommandOptions
16
- } from "./chunk-A4NVECX5.js";
16
+ } from "./chunk-RFMC2QXQ.js";
17
17
  import {
18
18
  require_source
19
19
  } from "./chunk-S7KYDPEM.js";
@@ -13,7 +13,7 @@ import {
13
13
  InvalidDeploymentId,
14
14
  TooManyRequests,
15
15
  isAPIError
16
- } from "./chunk-A4NVECX5.js";
16
+ } from "./chunk-ECRBC4HL.js";
17
17
 
18
18
  // src/util/to-host.ts
19
19
  function toHost(url) {
@@ -7,12 +7,14 @@ const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  VERCEL_DIR,
9
9
  isVercelTomlEnabled
10
- } from "./chunk-7S7GE4BN.js";
10
+ } from "./chunk-537JTK2U.js";
11
11
  import {
12
- ConflictingConfigFiles,
13
- InvalidLocalConfig,
14
12
  getArgs
15
- } from "./chunk-A4NVECX5.js";
13
+ } from "./chunk-RFMC2QXQ.js";
14
+ import {
15
+ ConflictingConfigFiles,
16
+ InvalidLocalConfig
17
+ } from "./chunk-ECRBC4HL.js";
16
18
 
17
19
  // src/util/config/local-path.ts
18
20
  import path from "path";
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  global_path_default
9
- } from "./chunk-7S7GE4BN.js";
9
+ } from "./chunk-537JTK2U.js";
10
10
  import {
11
11
  output_manager_default
12
12
  } from "./chunk-ZQKJVHXY.js";
@@ -6,11 +6,11 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  STANDARD_ENVIRONMENTS
9
- } from "./chunk-7S7GE4BN.js";
9
+ } from "./chunk-537JTK2U.js";
10
10
  import {
11
11
  getCommandName,
12
12
  require_lib
13
- } from "./chunk-A4NVECX5.js";
13
+ } from "./chunk-ECRBC4HL.js";
14
14
  import {
15
15
  output_manager_default
16
16
  } from "./chunk-ZQKJVHXY.js";
@@ -6,16 +6,16 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  getUpdateCommand
9
- } from "./chunk-SSOWPEZT.js";
9
+ } from "./chunk-4DR2FV6O.js";
10
10
  import {
11
11
  login
12
- } from "./chunk-W6FW7CCT.js";
12
+ } from "./chunk-6C33Y3DC.js";
13
13
  import {
14
14
  loginCommand
15
- } from "./chunk-4EGCWWSR.js";
15
+ } from "./chunk-UJ4JXXED.js";
16
16
  import {
17
17
  help
18
- } from "./chunk-Y5YCSB6X.js";
18
+ } from "./chunk-LDXYSGPZ.js";
19
19
  import {
20
20
  TelemetryClient
21
21
  } from "./chunk-U3WLEFHU.js";
@@ -24,7 +24,7 @@ import {
24
24
  parseArguments,
25
25
  printError,
26
26
  require_strip_ansi
27
- } from "./chunk-A4NVECX5.js";
27
+ } from "./chunk-RFMC2QXQ.js";
28
28
  import {
29
29
  output_manager_default
30
30
  } from "./chunk-ZQKJVHXY.js";