vercel 51.2.1 → 51.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 (69) hide show
  1. package/dist/chunks/add-3MIOUOZC.js +180 -0
  2. package/dist/chunks/{chunk-W6FW7CCT.js → chunk-2JQVASXJ.js} +13 -8
  3. package/dist/chunks/{chunk-Q6BEDVOU.js → chunk-4PQA6H63.js} +1 -1
  4. package/dist/chunks/{chunk-IS2HEMF4.js → chunk-4RBF6ZDU.js} +4 -2
  5. package/dist/chunks/{chunk-7S7GE4BN.js → chunk-4VP55L4V.js} +208 -500
  6. package/dist/chunks/{chunk-5YQCJTZI.js → chunk-4WRHMYCG.js} +6 -6
  7. package/dist/chunks/chunk-4ZWTYJSP.js +139 -0
  8. package/dist/chunks/{chunk-3FMFPD7F.js → chunk-APGVHLAW.js} +2 -2
  9. package/dist/chunks/{chunk-5WHDQH2U.js → chunk-BAUYQ7AR.js} +1 -1
  10. package/dist/chunks/{chunk-BUBUVE23.js → chunk-BJQTGP42.js} +4 -2
  11. package/dist/chunks/{chunk-G6MVEB4W.js → chunk-BU3JMDDH.js} +3 -3
  12. package/dist/chunks/chunk-CGTXAXZ4.js +484 -0
  13. package/dist/chunks/{chunk-BQUQ5F7R.js → chunk-CRZM5WM2.js} +4 -2
  14. package/dist/chunks/{chunk-XRR5HDB3.js → chunk-CZXW3DJH.js} +2 -2
  15. package/dist/chunks/chunk-DVQ4SIWF.js +183 -0
  16. package/dist/chunks/{chunk-A4NVECX5.js → chunk-ECRBC4HL.js} +4 -581
  17. package/dist/chunks/{chunk-RK4TKB3D.js → chunk-FNFZO3WQ.js} +7 -5
  18. package/dist/chunks/{chunk-L2BKVTHL.js → chunk-G6RXZLQ2.js} +2 -2
  19. package/dist/chunks/{chunk-4YZKA4FN.js → chunk-GE6G37P4.js} +1 -1
  20. package/dist/chunks/{chunk-NELCIT4M.js → chunk-GLDQ23LD.js} +1 -1
  21. package/dist/chunks/{chunk-5DLMAFQU.js → chunk-GYBFQLYR.js} +6 -4
  22. package/dist/chunks/{chunk-XAVGWINL.js → chunk-JEON5XEH.js} +44 -13
  23. package/dist/chunks/{chunk-Y5YCSB6X.js → chunk-LDXYSGPZ.js} +2 -2
  24. package/dist/chunks/{chunk-U5J73OA3.js → chunk-N45K6NXC.js} +1 -1
  25. package/dist/chunks/{chunk-SSOWPEZT.js → chunk-NCQBQGI6.js} +2 -2
  26. package/dist/chunks/chunk-NE34PEHL.js +167 -0
  27. package/dist/chunks/{chunk-QQTF2FEY.js → chunk-OFUQPP26.js} +9 -5
  28. package/dist/chunks/{chunk-FSOFFJDV.js → chunk-R2BVH5SQ.js} +1 -1
  29. package/dist/chunks/chunk-RFMC2QXQ.js +602 -0
  30. package/dist/chunks/{chunk-VTQNSCUG.js → chunk-RHXEHBO3.js} +8 -6
  31. package/dist/chunks/{chunk-K5XJCQQO.js → chunk-RRYVGOVK.js} +1 -1
  32. package/dist/chunks/{chunk-EHZKWVK2.js → chunk-T7CL42FK.js} +5 -5
  33. package/dist/chunks/{chunk-WXNT7WJO.js → chunk-TAOVG4PS.js} +49 -4
  34. package/dist/chunks/{chunk-57RLFBKC.js → chunk-UB325PS7.js} +1 -1
  35. package/dist/chunks/{chunk-2IAZZEVQ.js → chunk-UWKTUK3W.js} +4 -2
  36. package/dist/chunks/{chunk-VE7MY76H.js → chunk-VGWGLBUC.js} +4 -2
  37. package/dist/chunks/{chunk-4EGCWWSR.js → chunk-VMTOBGCO.js} +50 -16
  38. package/dist/chunks/{chunk-W5K4YCTI.js → chunk-ZS5VKEZL.js} +5 -3
  39. package/dist/chunks/{compile-vercel-config-2GV46IDP.js → compile-vercel-config-A2SLMCWK.js} +4 -2
  40. package/dist/chunks/{delete-PXMYSQGR.js → delete-SEQBCYWT.js} +7 -5
  41. package/dist/chunks/{disable-2ZQ4OG4A.js → disable-GRM5DJGU.js} +7 -5
  42. package/dist/chunks/{discard-FQZTZ5HK.js → discard-IVQWWSPI.js} +7 -5
  43. package/dist/chunks/{edit-F3J7Q5SZ.js → edit-YTMZBT4Y.js} +8 -6
  44. package/dist/chunks/{enable-ZW4W33H5.js → enable-SSU3MG6J.js} +7 -5
  45. package/dist/chunks/{export-ZZV6ESIW.js → export-INCDZTYW.js} +7 -5
  46. package/dist/chunks/inspect-QMY2ZE6J.js +353 -0
  47. package/dist/chunks/{list-VFPV4TUW.js → list-FF4VGSZ2.js} +115 -85
  48. package/dist/chunks/{list-SSIMVNNN.js → list-MMIBPSB3.js} +10 -7
  49. package/dist/chunks/ls-TYEDISJD.js +114 -0
  50. package/dist/chunks/{publish-3K76MNS3.js → publish-OJQCVDL5.js} +7 -5
  51. package/dist/chunks/{query-CY7JJSSX.js → query-LACPOOBL.js} +15 -12
  52. package/dist/chunks/{reorder-6L7MENN5.js → reorder-TBFWHFQZ.js} +7 -5
  53. package/dist/chunks/{restore-XUYXOJQ2.js → restore-5LUZRUME.js} +7 -5
  54. package/dist/chunks/rm-LDXY2G45.js +164 -0
  55. package/dist/chunks/rule-inspect-THIN6POX.js +142 -0
  56. package/dist/chunks/rules-4ZH7VTGC.js +83 -0
  57. package/dist/chunks/{schema-G5FSLZVA.js → schema-OK4OOI2N.js} +9 -7
  58. package/dist/chunks/{types-A4EAQ6F6.js → types-QNN5CDCB.js} +6 -4
  59. package/dist/chunks/update-EXPUPEH6.js +196 -0
  60. package/dist/commands/build/index.js +27 -23
  61. package/dist/commands/deploy/index.js +171 -32
  62. package/dist/commands/dev/index.js +21 -17
  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 +322 -128
  67. package/dist/index.js +28 -24
  68. package/dist/version.mjs +1 -1
  69. package/package.json +19 -19
@@ -0,0 +1,180 @@
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
+ emitRulesArgParseError,
9
+ handleRulesApiError,
10
+ parseRulesFlagsAndScope,
11
+ rulesCollectionPath
12
+ } from "./chunk-4ZWTYJSP.js";
13
+ import "./chunk-NE34PEHL.js";
14
+ import "./chunk-HTOH3MSD.js";
15
+ import "./chunk-APGVHLAW.js";
16
+ import {
17
+ validateJsonOutput
18
+ } from "./chunk-XPKWKPWA.js";
19
+ import {
20
+ rulesAddSubcommand
21
+ } from "./chunk-DVQ4SIWF.js";
22
+ import {
23
+ AGENT_REASON
24
+ } from "./chunk-E3NE4SKN.js";
25
+ import "./chunk-4VP55L4V.js";
26
+ import "./chunk-U3WLEFHU.js";
27
+ import {
28
+ buildCommandWithGlobalFlags,
29
+ outputAgentError
30
+ } from "./chunk-CGTXAXZ4.js";
31
+ import "./chunk-CO5D46AG.js";
32
+ import {
33
+ getFlagsSpecification,
34
+ parseArguments,
35
+ printError
36
+ } from "./chunk-RFMC2QXQ.js";
37
+ import {
38
+ isAPIError,
39
+ packageName
40
+ } from "./chunk-ECRBC4HL.js";
41
+ import {
42
+ output_manager_default
43
+ } from "./chunk-ZQKJVHXY.js";
44
+ import "./chunk-S7KYDPEM.js";
45
+ import "./chunk-TZ2YI2VH.js";
46
+
47
+ // src/commands/alerts/rules/add.ts
48
+ import { readFileSync } from "fs";
49
+ import { resolve } from "path";
50
+ async function add(client, argv) {
51
+ let parsedArgs;
52
+ try {
53
+ parsedArgs = parseArguments(
54
+ argv,
55
+ getFlagsSpecification(rulesAddSubcommand.options)
56
+ );
57
+ } catch (e) {
58
+ emitRulesArgParseError(
59
+ client,
60
+ e,
61
+ "alerts rules add --project <name-or-id> --body <path>"
62
+ );
63
+ printError(e);
64
+ return 1;
65
+ }
66
+ const fr = validateJsonOutput(parsedArgs.flags);
67
+ if (!fr.valid) {
68
+ outputAgentError(
69
+ client,
70
+ {
71
+ status: "error",
72
+ reason: AGENT_REASON.INVALID_ARGUMENTS,
73
+ message: fr.error
74
+ },
75
+ 1
76
+ );
77
+ output_manager_default.error(fr.error);
78
+ return 1;
79
+ }
80
+ const bodyPath = parsedArgs.flags["--body"];
81
+ if (!bodyPath) {
82
+ outputAgentError(
83
+ client,
84
+ {
85
+ status: "error",
86
+ reason: AGENT_REASON.MISSING_ARGUMENTS,
87
+ message: `Missing required flag --body. Example: ${packageName} alerts rules add --body <file>`,
88
+ hint: "Provide a JSON file describing the new rule (id and teamId are assigned by the API).",
89
+ next: [
90
+ {
91
+ command: buildCommandWithGlobalFlags(
92
+ client.argv,
93
+ "alerts rules add --body <file>"
94
+ ),
95
+ when: "Replace <file> with a path to rule JSON"
96
+ }
97
+ ]
98
+ },
99
+ 1
100
+ );
101
+ output_manager_default.error(
102
+ "Missing required flag: --body <PATH> (JSON file for the new rule)."
103
+ );
104
+ return 1;
105
+ }
106
+ const scope = await parseRulesFlagsAndScope(
107
+ client,
108
+ {
109
+ "--project": parsedArgs.flags["--project"],
110
+ "--all": parsedArgs.flags["--all"]
111
+ },
112
+ fr.jsonOutput
113
+ );
114
+ if (typeof scope === "number") {
115
+ return scope;
116
+ }
117
+ let raw;
118
+ try {
119
+ raw = readFileSync(resolve(client.cwd, bodyPath), "utf8");
120
+ } catch {
121
+ outputAgentError(
122
+ client,
123
+ {
124
+ status: "error",
125
+ reason: AGENT_REASON.INVALID_ARGUMENTS,
126
+ message: `Could not read --body file: ${bodyPath}`
127
+ },
128
+ 1
129
+ );
130
+ output_manager_default.error(`Could not read --body file: ${bodyPath}`);
131
+ return 1;
132
+ }
133
+ let body;
134
+ try {
135
+ body = JSON.parse(raw);
136
+ } catch {
137
+ outputAgentError(
138
+ client,
139
+ {
140
+ status: "error",
141
+ reason: AGENT_REASON.INVALID_ARGUMENTS,
142
+ message: "Invalid JSON in --body file."
143
+ },
144
+ 1
145
+ );
146
+ output_manager_default.error("Invalid JSON in --body file.");
147
+ return 1;
148
+ }
149
+ delete body.id;
150
+ delete body.teamId;
151
+ if (scope.projectId !== void 0 && body.projectId === void 0) {
152
+ body.projectId = scope.projectId;
153
+ }
154
+ const path = rulesCollectionPath(scope);
155
+ output_manager_default.spinner("Creating alert rule...");
156
+ try {
157
+ const created = await client.fetch(path, {
158
+ method: "POST",
159
+ body
160
+ });
161
+ if (fr.jsonOutput) {
162
+ client.stdout.write(`${JSON.stringify({ rule: created }, null, 2)}
163
+ `);
164
+ } else {
165
+ const id = created?.id;
166
+ output_manager_default.success(`Created alert rule ${typeof id === "string" ? id : ""}`);
167
+ }
168
+ return 0;
169
+ } catch (err) {
170
+ if (isAPIError(err)) {
171
+ return handleRulesApiError(client, err, fr.jsonOutput);
172
+ }
173
+ throw err;
174
+ } finally {
175
+ output_manager_default.stopSpinner();
176
+ }
177
+ }
178
+ export {
179
+ add as default
180
+ };
@@ -9,13 +9,13 @@ import {
9
9
  } from "./chunk-V5P25P7F.js";
10
10
  import {
11
11
  autoInstallAgentTooling
12
- } from "./chunk-FSOFFJDV.js";
12
+ } from "./chunk-R2BVH5SQ.js";
13
13
  import {
14
14
  ua_default
15
- } from "./chunk-Q6BEDVOU.js";
15
+ } from "./chunk-4PQA6H63.js";
16
16
  import {
17
17
  getLocalPathConfig
18
- } from "./chunk-5DLMAFQU.js";
18
+ } from "./chunk-GYBFQLYR.js";
19
19
  import {
20
20
  DEFAULT_VERCEL_CONFIG_FILENAME,
21
21
  VERCEL_CONFIG_EXTENSIONS,
@@ -41,18 +41,20 @@ import {
41
41
  useKeypress,
42
42
  usePrefix,
43
43
  useState
44
- } from "./chunk-7S7GE4BN.js";
44
+ } from "./chunk-4VP55L4V.js";
45
45
  import {
46
46
  require_load_json_file,
47
47
  require_write_json_file
48
48
  } from "./chunk-U3WLEFHU.js";
49
49
  import {
50
- APIError,
51
- NowError,
52
- getCommandName,
53
50
  printError,
54
51
  require_strip_ansi
55
- } from "./chunk-A4NVECX5.js";
52
+ } from "./chunk-RFMC2QXQ.js";
53
+ import {
54
+ APIError,
55
+ NowError,
56
+ getCommandName
57
+ } from "./chunk-ECRBC4HL.js";
56
58
  import {
57
59
  emoji,
58
60
  link_default,
@@ -2577,6 +2579,9 @@ Are you sure you want to proceed?`;
2577
2579
  const res = await this._fetch(url, opts);
2578
2580
  printIndications(res);
2579
2581
  if (!res.ok) {
2582
+ if (opts.redirect === "manual" && res.status >= 300 && res.status < 400) {
2583
+ return res;
2584
+ }
2580
2585
  const error = await responseError(res);
2581
2586
  if (isSAMLError(error) && error.teamId) {
2582
2587
  try {
@@ -7,7 +7,7 @@ const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  init_pkg,
9
9
  pkg_default
10
- } from "./chunk-A4NVECX5.js";
10
+ } from "./chunk-ECRBC4HL.js";
11
11
 
12
12
  // src/util/ua.ts
13
13
  init_pkg();
@@ -5,9 +5,11 @@ const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
- formatOption,
8
+ formatOption
9
+ } from "./chunk-RFMC2QXQ.js";
10
+ import {
9
11
  packageName
10
- } from "./chunk-A4NVECX5.js";
12
+ } from "./chunk-ECRBC4HL.js";
11
13
 
12
14
  // src/commands/metrics/command.ts
13
15
  var schemaSubcommand = {