vercel 56.4.1 → 57.0.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 (94) hide show
  1. package/dist/chunks/{add-L3Z6PL54.js → add-7M577U56.js} +7 -6
  2. package/dist/chunks/{add-RFEJCIBM.js → add-YRZTDNXX.js} +3 -3
  3. package/dist/chunks/{chunk-V5P25P7F.js → chunk-2473DUBR.js} +4 -11
  4. package/dist/chunks/{chunk-5EXIJBLL.js → chunk-2EDWKVNP.js} +8 -8
  5. package/dist/chunks/{chunk-YS6EDZHB.js → chunk-2MJROFVC.js} +5 -1
  6. package/dist/chunks/{chunk-OOD67FAL.js → chunk-3242RXCN.js} +1 -1
  7. package/dist/chunks/chunk-3PGXYIKC.js +147 -0
  8. package/dist/chunks/{chunk-CHZBEMLF.js → chunk-4PGF367U.js} +47 -210
  9. package/dist/chunks/{chunk-GKVAAY2A.js → chunk-555WJSO5.js} +1 -1
  10. package/dist/chunks/chunk-5AJPMLDV.js +28 -0
  11. package/dist/chunks/{chunk-IHQ7DPQI.js → chunk-A2TYQBX2.js} +117 -3
  12. package/dist/chunks/chunk-A3NYPUKZ.js +17 -0
  13. package/dist/chunks/{chunk-W346YNDN.js → chunk-DWMH5M4Q.js} +4 -1
  14. package/dist/chunks/chunk-E336ZXPP.js +43 -0
  15. package/dist/chunks/chunk-F5PQWDOC.js +245 -0
  16. package/dist/chunks/{chunk-Y7TVKRRJ.js → chunk-F7X55TOY.js} +15 -839
  17. package/dist/chunks/chunk-FGDKMNEN.js +21 -0
  18. package/dist/chunks/chunk-FHEMFAHB.js +320 -0
  19. package/dist/chunks/{chunk-NLRIKNPX.js → chunk-GP5VCTEU.js} +1 -1
  20. package/dist/chunks/chunk-GZLPFESR.js +48 -0
  21. package/dist/chunks/{chunk-HZKJMZEQ.js → chunk-HD7B425F.js} +2 -2
  22. package/dist/chunks/{chunk-J6KTUJHV.js → chunk-IOAZNR6Z.js} +1 -1
  23. package/dist/chunks/{chunk-STJJ3DFO.js → chunk-KCF6S3XF.js} +16 -1
  24. package/dist/chunks/chunk-LMHT3QR3.js +247 -0
  25. package/dist/chunks/{chunk-A4XB42AB.js → chunk-MAHINYBW.js} +4 -3
  26. package/dist/chunks/{chunk-DXFSBJTA.js → chunk-MIFDRYTN.js} +1 -1
  27. package/dist/chunks/{chunk-VLTQJKP6.js → chunk-NH43BFJ3.js} +1 -1
  28. package/dist/chunks/{chunk-Z7NPYIZ6.js → chunk-NM43FFV6.js} +0 -8
  29. package/dist/chunks/{chunk-MQRHJEBS.js → chunk-NRNMT43R.js} +3 -3
  30. package/dist/chunks/chunk-OF2GNB42.js +53 -0
  31. package/dist/chunks/chunk-PRWJUY5U.js +848 -0
  32. package/dist/chunks/{chunk-F5OMERHI.js → chunk-QZD5DKUR.js} +10 -23
  33. package/dist/chunks/{chunk-4M3ZQCYN.js → chunk-RAFH25WW.js} +8 -1
  34. package/dist/chunks/{chunk-43B3LNUF.js → chunk-RYO6FJFB.js} +1 -1
  35. package/dist/chunks/{chunk-XFGY3JAX.js → chunk-T4NODP6Y.js} +11 -18
  36. package/dist/chunks/{chunk-GLAHGVBS.js → chunk-TBR2Q37Y.js} +2038 -1786
  37. package/dist/chunks/chunk-V4RMJKQP.js +36 -0
  38. package/dist/chunks/chunk-WR7JTCGL.js +104 -0
  39. package/dist/chunks/{chunk-6RTK6BWX.js → chunk-YA3WQFLY.js} +1 -1
  40. package/dist/chunks/{chunk-UHGAPG7O.js → chunk-YOZCJHLZ.js} +4 -4
  41. package/dist/chunks/{compile-vercel-config-J2X5OV6K.js → compile-vercel-config-3OHO3TJA.js} +2 -2
  42. package/dist/chunks/config-validator.mjs +1 -0
  43. package/dist/chunks/delete-3DZOCWCC.js +150 -0
  44. package/dist/chunks/{delete-57A44RN7.js → delete-VOSJLNEA.js} +3 -3
  45. package/dist/chunks/{disable-DNZ52MEO.js → disable-LQDEVRQF.js} +3 -3
  46. package/dist/chunks/{discard-HACSIZ74.js → discard-RGV4JKXQ.js} +3 -3
  47. package/dist/chunks/{edit-HJ47TQU3.js → edit-SFIEOQ24.js} +4 -4
  48. package/dist/chunks/edit-UPZPI54L.js +153 -0
  49. package/dist/chunks/{enable-BVLRVRYM.js → enable-6UVH35WC.js} +3 -3
  50. package/dist/chunks/{export-7MJFGMG7.js → export-6CEG3CK7.js} +3 -3
  51. package/dist/chunks/{image-4UMD7UZP.js → image-CQRCD2OE.js} +3 -3
  52. package/dist/chunks/inspect-4ZAH3RFT.js +205 -0
  53. package/dist/chunks/inspect-EXQBIAFF.js +587 -0
  54. package/dist/chunks/{inspect-WBHUZC3R.js → inspect-K5ZMQG7X.js} +3 -3
  55. package/dist/chunks/{inspect-4JD2QN67.js → inspect-UM3LDRPV.js} +3 -3
  56. package/dist/chunks/{inspect-XX3OXSHC.js → inspect-ZFRY3X3H.js} +3 -3
  57. package/dist/chunks/{list-AM6K2JCW.js → list-4DRVM7Q4.js} +42 -55
  58. package/dist/chunks/{list-5H57NTM4.js → list-FJCBOCCA.js} +2 -2
  59. package/dist/chunks/list-KCUHD4OA.js +360 -0
  60. package/dist/chunks/{login-YO34E4V5.js → login-DFGYNU3K.js} +3 -3
  61. package/dist/chunks/{ls-44NPIO2N.js → ls-34NCZKBE.js} +3 -3
  62. package/dist/chunks/{ls-P7ZLBWW2.js → ls-4QHHVXXD.js} +3 -3
  63. package/dist/chunks/{ls-YDUYTLXW.js → ls-CG6A7UXF.js} +3 -3
  64. package/dist/chunks/ls-RHEQ6YQB.js +188 -0
  65. package/dist/chunks/open-E3XADEMX.js +106 -0
  66. package/dist/chunks/{publish-RXFUYSW3.js → publish-Z3AQRUCS.js} +3 -3
  67. package/dist/chunks/{query-ILJJL3BZ.js → query-3EV66DO3.js} +9 -9
  68. package/dist/chunks/{reorder-GBCOPZT4.js → reorder-VA5E5ZJT.js} +3 -3
  69. package/dist/chunks/reply-SNSCNKAW.js +167 -0
  70. package/dist/chunks/resolve-6ZX4RTXX.js +228 -0
  71. package/dist/chunks/{restore-YK5DGGRX.js → restore-NEHI5B5P.js} +3 -3
  72. package/dist/chunks/{rm-O474MI5C.js → rm-22B22E47.js} +3 -3
  73. package/dist/chunks/{rm-LK6P7XTA.js → rm-E5ZVLAKO.js} +3 -3
  74. package/dist/chunks/{rm-FRZMXB2W.js → rm-FR6KE744.js} +7 -6
  75. package/dist/chunks/rule-inspect-DMP2CKJQ.js +283 -0
  76. package/dist/chunks/{rules-MZ2MP6KJ.js → rules-EYGXEI2Z.js} +7 -7
  77. package/dist/chunks/{schema-FR6CCQIZ.js → schema-2IIWOBSQ.js} +7 -5
  78. package/dist/chunks/{tags-AKRTKFRV.js → tags-ZDVYRHAY.js} +2 -2
  79. package/dist/chunks/{update-W3CWQB2F.js → update-QH4DQMZV.js} +7 -6
  80. package/dist/commands/build/index.js +45 -13
  81. package/dist/commands/deploy/index.js +38 -27
  82. package/dist/commands/dev/index.js +13 -16
  83. package/dist/commands/env/index.js +13 -11
  84. package/dist/commands/link/index.js +10 -9
  85. package/dist/commands/list/index.js +5 -5
  86. package/dist/commands-bulk.js +2981 -2179
  87. package/dist/index.js +31 -21
  88. package/dist/vc.js +54 -18
  89. package/dist/version.mjs +1 -1
  90. package/package.json +35 -35
  91. package/dist/chunks/chunk-F32B76CK.js +0 -86
  92. package/dist/chunks/inspect-5YZP7IWI.js +0 -351
  93. package/dist/chunks/ls-MB74DIQV.js +0 -113
  94. package/dist/chunks/rule-inspect-YEZGYINZ.js +0 -141
@@ -9,22 +9,22 @@ import {
9
9
  handleRulesApiError,
10
10
  parseRulesFlagsAndScope,
11
11
  rulesCollectionPath
12
- } from "./chunk-A4XB42AB.js";
13
- import "./chunk-XFGY3JAX.js";
12
+ } from "./chunk-MAHINYBW.js";
13
+ import "./chunk-T4NODP6Y.js";
14
14
  import "./chunk-BUZRVER7.js";
15
15
  import {
16
16
  validateJsonOutput
17
17
  } from "./chunk-XPKWKPWA.js";
18
18
  import {
19
19
  rulesAddSubcommand
20
- } from "./chunk-STJJ3DFO.js";
21
- import "./chunk-GLAHGVBS.js";
20
+ } from "./chunk-KCF6S3XF.js";
21
+ import "./chunk-TBR2Q37Y.js";
22
+ import "./chunk-ECCWJHC6.js";
22
23
  import {
23
24
  AGENT_REASON,
24
25
  buildCommandWithGlobalFlags,
25
26
  outputAgentError
26
27
  } from "./chunk-UDWRZXIT.js";
27
- import "./chunk-ECCWJHC6.js";
28
28
  import {
29
29
  parseArguments,
30
30
  printError
@@ -108,7 +108,8 @@ async function add(client, argv) {
108
108
  "--project": parsedArgs.flags["--project"],
109
109
  "--all": parsedArgs.flags["--all"]
110
110
  },
111
- fr.jsonOutput
111
+ fr.jsonOutput,
112
+ "alerts rules add"
112
113
  );
113
114
  if (typeof scope === "number") {
114
115
  return scope;
@@ -9,7 +9,7 @@ import {
9
9
  handleVcrApiError,
10
10
  resolveVcrScope,
11
11
  validateVcrJsonOutput
12
- } from "./chunk-NLRIKNPX.js";
12
+ } from "./chunk-GP5VCTEU.js";
13
13
  import {
14
14
  outputError
15
15
  } from "./chunk-BUZRVER7.js";
@@ -19,13 +19,13 @@ import {
19
19
  } from "./chunk-3VS4DTAU.js";
20
20
  import "./chunk-GIL3VAUR.js";
21
21
  import "./chunk-FYQPTH5C.js";
22
- import "./chunk-GLAHGVBS.js";
22
+ import "./chunk-TBR2Q37Y.js";
23
+ import "./chunk-ECCWJHC6.js";
23
24
  import {
24
25
  AGENT_REASON,
25
26
  buildCommandWithGlobalFlags,
26
27
  outputAgentError
27
28
  } from "./chunk-UDWRZXIT.js";
28
- import "./chunk-ECCWJHC6.js";
29
29
  import {
30
30
  parseArguments,
31
31
  printError
@@ -4,19 +4,12 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import {
8
- require_source
9
- } from "./chunk-S7KYDPEM.js";
10
- import {
11
- __toESM
12
- } from "./chunk-TZ2YI2VH.js";
13
7
 
14
- // src/util/output/highlight.ts
15
- var import_chalk = __toESM(require_source(), 1);
16
- function highlight(text) {
17
- return import_chalk.default.bold.underline(text);
8
+ // src/util/can-prompt.ts
9
+ function canPrompt(client) {
10
+ return Boolean(client.stdin.isTTY) && !client.nonInteractive;
18
11
  }
19
12
 
20
13
  export {
21
- highlight
14
+ canPrompt
22
15
  };
@@ -7,17 +7,15 @@ const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  getUpdateCommandInfo,
9
9
  isGlobal
10
- } from "./chunk-43B3LNUF.js";
10
+ } from "./chunk-RYO6FJFB.js";
11
11
  import {
12
- getGlobalPathConfig,
13
- progress,
14
- writeToConfigFile
15
- } from "./chunk-CHZBEMLF.js";
12
+ progress
13
+ } from "./chunk-4PGF367U.js";
16
14
  import {
17
15
  apiCommand,
18
16
  listSubcommand3 as listSubcommand,
19
17
  loginCommand
20
- } from "./chunk-IHQ7DPQI.js";
18
+ } from "./chunk-A2TYQBX2.js";
21
19
  import {
22
20
  require_semver
23
21
  } from "./chunk-IB5L4LKZ.js";
@@ -25,8 +23,10 @@ import {
25
23
  help
26
24
  } from "./chunk-DMSLNAVH.js";
27
25
  import {
28
- login
29
- } from "./chunk-GLAHGVBS.js";
26
+ getGlobalPathConfig,
27
+ login,
28
+ writeToConfigFile
29
+ } from "./chunk-TBR2Q37Y.js";
30
30
  import {
31
31
  TelemetryClient,
32
32
  isNativeBinaryInstall
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  rulesAggregateCommand
9
- } from "./chunk-STJJ3DFO.js";
9
+ } from "./chunk-KCF6S3XF.js";
10
10
  import {
11
11
  formatOption,
12
12
  limitOption,
@@ -127,6 +127,10 @@ var alertsCommand = {
127
127
  name: "Filter by type",
128
128
  value: `${packageName} alerts --type usage_anomaly --type error_anomaly`
129
129
  },
130
+ {
131
+ name: "List custom alert groups",
132
+ value: `${packageName} alerts --type custom_alert`
133
+ },
130
134
  {
131
135
  name: "Output JSON",
132
136
  value: `${packageName} alerts --format json`
@@ -8,7 +8,7 @@ import {
8
8
  VERCEL_DIR,
9
9
  VERCEL_DIR_PROJECT,
10
10
  require_lib
11
- } from "./chunk-GLAHGVBS.js";
11
+ } from "./chunk-TBR2Q37Y.js";
12
12
  import {
13
13
  require_dist
14
14
  } from "./chunk-OX7KI3LF.js";
@@ -0,0 +1,147 @@
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
+ indent_default
9
+ } from "./chunk-A3NYPUKZ.js";
10
+ import {
11
+ humanizeIdentifier
12
+ } from "./chunk-FGDKMNEN.js";
13
+ import {
14
+ truncateMiddle
15
+ } from "./chunk-OF2GNB42.js";
16
+ import {
17
+ table
18
+ } from "./chunk-NZRWTCRM.js";
19
+
20
+ // src/commands/alerts/format.ts
21
+ function renderAlertTable(rows, hsep = 3) {
22
+ return indent_default(
23
+ table(rows, { hsep }).split("\n").map((line) => line.trimEnd()).join("\n"),
24
+ 2
25
+ );
26
+ }
27
+ function normalizeTimestamp(value) {
28
+ if (value === void 0 || !Number.isFinite(value)) {
29
+ return void 0;
30
+ }
31
+ return Math.abs(value) < 1e12 ? value * 1e3 : value;
32
+ }
33
+ function getPrimaryAlert(group) {
34
+ return group.alerts?.[0];
35
+ }
36
+ function getGroupTitle(group) {
37
+ return group.ai?.title || group.title || getPrimaryAlert(group)?.title || "Alert group";
38
+ }
39
+ function getGroupType(group) {
40
+ return group.type || getPrimaryAlert(group)?.type || "-";
41
+ }
42
+ function getGroupStartedAt(group) {
43
+ const primaryAlert = getPrimaryAlert(group);
44
+ return normalizeTimestamp(
45
+ group.recordedStartedAt ?? primaryAlert?.recordedStartedAt ?? primaryAlert?.startedAt
46
+ );
47
+ }
48
+ function formatTriggerOperator(value) {
49
+ switch (value) {
50
+ case "gt":
51
+ return ">";
52
+ case "gte":
53
+ return ">=";
54
+ case "lt":
55
+ return "<";
56
+ case "lte":
57
+ return "<=";
58
+ default:
59
+ return void 0;
60
+ }
61
+ }
62
+ function humanizeReference(value, opts = {}) {
63
+ return value.split("/").map((part) => {
64
+ const label = humanizeIdentifier(part);
65
+ return opts.case === "title" ? label : label.toLowerCase();
66
+ }).join(" / ");
67
+ }
68
+ function formatRuleScope(projectId, {
69
+ projectIdMaxLength = 48,
70
+ filterMaxLength = 80
71
+ } = {}) {
72
+ if (!projectId) {
73
+ return "team-wide";
74
+ }
75
+ const projectIdMatch = projectId.match(/^projectId eq '([^']+)'$/);
76
+ if (projectIdMatch?.[1]) {
77
+ return `project: ${truncateMiddle(projectIdMatch[1], projectIdMaxLength)}`;
78
+ }
79
+ if (!/\s/.test(projectId)) {
80
+ return `project: ${truncateMiddle(projectId, projectIdMaxLength)}`;
81
+ }
82
+ return `project filter: ${truncateMiddle(projectId, filterMaxLength)}`;
83
+ }
84
+ function isCustomAlertRule(rule) {
85
+ return Boolean(rule.customAlert) || Boolean(
86
+ rule.alertTypes?.some((alertType) => alertType.type === "custom_alert")
87
+ );
88
+ }
89
+ function formatCustomAlertTrigger(customAlert) {
90
+ const operator = formatTriggerOperator(customAlert.triggerOperator);
91
+ const threshold = typeof customAlert.triggerThreshold === "number" ? String(customAlert.triggerThreshold) : void 0;
92
+ const trigger = customAlert.triggerType === "anomaly" ? `z-score ${[operator, threshold].filter(Boolean).join(" ")}` : ["threshold", operator, threshold].filter(Boolean).join(" ");
93
+ return trigger || void 0;
94
+ }
95
+ function parseCustomAlertQuery(value) {
96
+ if (!value) {
97
+ return {};
98
+ }
99
+ try {
100
+ return JSON.parse(value);
101
+ } catch {
102
+ return {};
103
+ }
104
+ }
105
+ function formatFormula(formula) {
106
+ if (!formula?.left || !formula.right) {
107
+ return void 0;
108
+ }
109
+ switch (formula.operator) {
110
+ case "divide":
111
+ return `${humanizeReference(formula.left)} / ${humanizeReference(
112
+ formula.right
113
+ )}`;
114
+ default:
115
+ return void 0;
116
+ }
117
+ }
118
+ function formatCustomAlertMetric(customAlert) {
119
+ const formula = formatFormula(customAlert.formula);
120
+ if (formula) {
121
+ return formula;
122
+ }
123
+ const query = parseCustomAlertQuery(customAlert.queryJsonString);
124
+ const firstRollup = Object.values(query.rollups ?? {})[0];
125
+ const parts = [query.event, firstRollup?.aggregation, firstRollup?.measure];
126
+ const base = parts.flatMap((part) => part ? [humanizeReference(part)] : []).join(" ");
127
+ const groupBy = query.groupBy ?? [];
128
+ if (base && groupBy.length > 0) {
129
+ return `${base} by ${groupBy.map((value) => humanizeReference(value)).join(", ")}`;
130
+ }
131
+ return base || void 0;
132
+ }
133
+
134
+ export {
135
+ renderAlertTable,
136
+ normalizeTimestamp,
137
+ getGroupTitle,
138
+ getGroupType,
139
+ getGroupStartedAt,
140
+ formatTriggerOperator,
141
+ humanizeReference,
142
+ formatRuleScope,
143
+ isCustomAlertRule,
144
+ formatCustomAlertTrigger,
145
+ parseCustomAlertQuery,
146
+ formatCustomAlertMetric
147
+ };