vercel 56.5.0 → 58.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 (90) hide show
  1. package/dist/chunks/{add-KNK5E2YT.js → add-7PPD4ZUJ.js} +2 -2
  2. package/dist/chunks/{add-6GRH6G2M.js → add-E4KH6P4A.js} +6 -5
  3. package/dist/chunks/{chunk-YS6EDZHB.js → chunk-2MJROFVC.js} +5 -1
  4. package/dist/chunks/chunk-3PGXYIKC.js +147 -0
  5. package/dist/chunks/chunk-5AJPMLDV.js +28 -0
  6. package/dist/chunks/{chunk-V5P25P7F.js → chunk-A3NYPUKZ.js} +7 -12
  7. package/dist/chunks/{chunk-JQG5EDRD.js → chunk-AZTV7WPZ.js} +1 -1
  8. package/dist/chunks/{chunk-3BHSS5E2.js → chunk-B2MTCHPO.js} +65 -210
  9. package/dist/chunks/{chunk-GAOAGU5K.js → chunk-BYQQLGCT.js} +1 -1
  10. package/dist/chunks/{chunk-ARKHETJP.js → chunk-DGFASMSE.js} +1 -1
  11. package/dist/chunks/{chunk-W346YNDN.js → chunk-DWMH5M4Q.js} +4 -1
  12. package/dist/chunks/{chunk-PRYNIKBZ.js → chunk-EA22NMFU.js} +1 -1
  13. package/dist/chunks/{chunk-26TEKOBZ.js → chunk-FB4UFWEC.js} +8 -1
  14. package/dist/chunks/chunk-FGDKMNEN.js +21 -0
  15. package/dist/chunks/{chunk-23U6FANO.js → chunk-FYR7WEUJ.js} +11 -18
  16. package/dist/chunks/chunk-GZLPFESR.js +48 -0
  17. package/dist/chunks/{chunk-STJJ3DFO.js → chunk-KCF6S3XF.js} +16 -1
  18. package/dist/chunks/{chunk-PPEQUJ7T.js → chunk-KGVT2RSG.js} +3 -3
  19. package/dist/chunks/{chunk-4MK452Y5.js → chunk-L4WYMJB3.js} +8 -8
  20. package/dist/chunks/{chunk-BM36UWE2.js → chunk-MDQJLTGN.js} +1 -1
  21. package/dist/chunks/{chunk-Z7NPYIZ6.js → chunk-NM43FFV6.js} +0 -8
  22. package/dist/chunks/chunk-OF2GNB42.js +53 -0
  23. package/dist/chunks/{chunk-YTFJGKRG.js → chunk-OQGN4TEC.js} +1 -1
  24. package/dist/chunks/chunk-PRWJUY5U.js +848 -0
  25. package/dist/chunks/{chunk-F5OMERHI.js → chunk-QZD5DKUR.js} +10 -23
  26. package/dist/chunks/{chunk-SWEPOMSA.js → chunk-R54DAHCL.js} +4 -3
  27. package/dist/chunks/{chunk-DOF6CJLL.js → chunk-RSCSALZH.js} +15 -839
  28. package/dist/chunks/{chunk-G4MTGCZ5.js → chunk-TEWJ7TIW.js} +1 -1
  29. package/dist/chunks/{chunk-TMK6RSYW.js → chunk-TPX7RZBM.js} +1433 -979
  30. package/dist/chunks/chunk-V4RMJKQP.js +36 -0
  31. package/dist/chunks/{chunk-DI3HR3K6.js → chunk-VUESC3YO.js} +1 -1
  32. package/dist/chunks/{chunk-IBP2XAUH.js → chunk-WANVKOVB.js} +39 -5
  33. package/dist/chunks/{chunk-X43U65TH.js → chunk-WDE2EDYX.js} +2 -2
  34. package/dist/chunks/{chunk-6RTK6BWX.js → chunk-YA3WQFLY.js} +1 -1
  35. package/dist/chunks/{chunk-EYICIM2K.js → chunk-YZMZCQP3.js} +4 -4
  36. package/dist/chunks/{chunk-CM3DLBDY.js → chunk-ZMVFTCQF.js} +1 -1
  37. package/dist/chunks/{compile-vercel-config-IFET4E6H.js → compile-vercel-config-G2IVBXEI.js} +1 -1
  38. package/dist/chunks/config-validator.mjs +1 -1
  39. package/dist/chunks/{delete-PXB5WRH7.js → delete-2EIVGM6P.js} +2 -2
  40. package/dist/chunks/{delete-X2MUMONI.js → delete-E6ZQNE5X.js} +2 -2
  41. package/dist/chunks/{disable-GBL3SHJL.js → disable-M3Q6BBB7.js} +2 -2
  42. package/dist/chunks/{discard-XVVSRGDR.js → discard-3R6ETBPS.js} +2 -2
  43. package/dist/chunks/{edit-EIHRP6XT.js → edit-7JUDPVXD.js} +3 -3
  44. package/dist/chunks/{edit-K5Y2BDJO.js → edit-ICVMGRRU.js} +2 -2
  45. package/dist/chunks/{enable-W7AMJWKH.js → enable-HLTA35QL.js} +2 -2
  46. package/dist/chunks/{export-N3AZ2KOO.js → export-E6XZUFW3.js} +2 -2
  47. package/dist/chunks/{image-DRTGVPVJ.js → image-SIRPPQZT.js} +3 -3
  48. package/dist/chunks/{inspect-DYXTX6P4.js → inspect-4FYBOOM5.js} +2 -2
  49. package/dist/chunks/{inspect-AAIVWSJI.js → inspect-65YX7L3O.js} +2 -2
  50. package/dist/chunks/inspect-6TQWDIBG.js +587 -0
  51. package/dist/chunks/{inspect-IPSAYR2C.js → inspect-NFOURIGN.js} +2 -2
  52. package/dist/chunks/{inspect-SLZLI6ZC.js → inspect-OEWWGAHZ.js} +3 -3
  53. package/dist/chunks/{list-IF2YW73F.js → list-27DCGMBI.js} +1 -1
  54. package/dist/chunks/{list-V7VTXVK4.js → list-APFMKZJO.js} +41 -54
  55. package/dist/chunks/{list-K2HLGUXV.js → list-XQCZVLES.js} +3 -3
  56. package/dist/chunks/{login-7C6HQEOG.js → login-FMU4CQOV.js} +2 -2
  57. package/dist/chunks/{ls-2NU353QP.js → ls-24BRCAZR.js} +2 -2
  58. package/dist/chunks/ls-3L6EN4YU.js +188 -0
  59. package/dist/chunks/{ls-NKECPPOR.js → ls-BFACWH6C.js} +2 -2
  60. package/dist/chunks/{ls-QQQHOJBE.js → ls-T5RGDBCV.js} +2 -2
  61. package/dist/chunks/{open-2FAPZA6V.js → open-AG3VYJZM.js} +2 -2
  62. package/dist/chunks/{publish-G7PB64LJ.js → publish-5OVCPS4J.js} +2 -2
  63. package/dist/chunks/{query-D4QBT4WR.js → query-QS4VKBXJ.js} +8 -8
  64. package/dist/chunks/{reorder-3Z7YIPAX.js → reorder-B5V2P7YM.js} +2 -2
  65. package/dist/chunks/{reply-7QQBXL5H.js → reply-JBLWE6RS.js} +2 -2
  66. package/dist/chunks/{resolve-UYKTDZEX.js → resolve-2I6XH2G3.js} +2 -2
  67. package/dist/chunks/{restore-Q2DR7SMW.js → restore-O63FZXCL.js} +2 -2
  68. package/dist/chunks/{rm-OCLUTM57.js → rm-HUED5R3Q.js} +6 -5
  69. package/dist/chunks/{rm-O4M4GFSK.js → rm-N7W3QYWZ.js} +2 -2
  70. package/dist/chunks/{rm-PCWMEHQ2.js → rm-P3NJSCMY.js} +2 -2
  71. package/dist/chunks/rule-inspect-M3QUSPU2.js +283 -0
  72. package/dist/chunks/{rules-LIH5FLPJ.js → rules-NSSWPJ2B.js} +7 -7
  73. package/dist/chunks/{schema-OFALTXXM.js → schema-G2PAXPVA.js} +6 -4
  74. package/dist/chunks/{tags-P4HIAI6D.js → tags-JFMO63D4.js} +2 -2
  75. package/dist/chunks/{update-E3ZQAFBS.js → update-VJCKD6YG.js} +6 -5
  76. package/dist/commands/build/index.js +42 -10
  77. package/dist/commands/deploy/index.js +34 -24
  78. package/dist/commands/dev/index.js +23 -13
  79. package/dist/commands/env/index.js +8 -7
  80. package/dist/commands/link/index.js +8 -8
  81. package/dist/commands/list/index.js +2 -2
  82. package/dist/commands-bulk.js +1959 -1816
  83. package/dist/index.js +19 -20
  84. package/dist/vc.js +54 -18
  85. package/dist/version.mjs +1 -1
  86. package/package.json +35 -35
  87. package/dist/chunks/chunk-GNV7547O.js +0 -86
  88. package/dist/chunks/inspect-5YUAEI3L.js +0 -351
  89. package/dist/chunks/ls-RH6Y4XBS.js +0 -113
  90. package/dist/chunks/rule-inspect-XJ47UEG7.js +0 -141
@@ -9,7 +9,7 @@ import {
9
9
  handleVcrApiError,
10
10
  resolveVcrScope,
11
11
  validateVcrJsonOutput
12
- } from "./chunk-DI3HR3K6.js";
12
+ } from "./chunk-VUESC3YO.js";
13
13
  import {
14
14
  outputError
15
15
  } from "./chunk-BUZRVER7.js";
@@ -19,7 +19,7 @@ import {
19
19
  } from "./chunk-3VS4DTAU.js";
20
20
  import "./chunk-GIL3VAUR.js";
21
21
  import "./chunk-FYQPTH5C.js";
22
- import "./chunk-TMK6RSYW.js";
22
+ import "./chunk-TPX7RZBM.js";
23
23
  import "./chunk-ECCWJHC6.js";
24
24
  import {
25
25
  AGENT_REASON,
@@ -9,16 +9,16 @@ import {
9
9
  handleRulesApiError,
10
10
  parseRulesFlagsAndScope,
11
11
  rulesCollectionPath
12
- } from "./chunk-SWEPOMSA.js";
13
- import "./chunk-23U6FANO.js";
12
+ } from "./chunk-R54DAHCL.js";
13
+ import "./chunk-FYR7WEUJ.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-TMK6RSYW.js";
20
+ } from "./chunk-KCF6S3XF.js";
21
+ import "./chunk-TPX7RZBM.js";
22
22
  import "./chunk-ECCWJHC6.js";
23
23
  import {
24
24
  AGENT_REASON,
@@ -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;
@@ -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`
@@ -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
+ };
@@ -0,0 +1,28 @@
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/util/output/format-granularity.ts
9
+ function formatGranularity(value) {
10
+ if (!value || typeof value !== "object") {
11
+ return void 0;
12
+ }
13
+ const granularity = value;
14
+ if (typeof granularity.minutes === "number") {
15
+ return `${granularity.minutes}m`;
16
+ }
17
+ if (typeof granularity.hours === "number") {
18
+ return `${granularity.hours}h`;
19
+ }
20
+ if (typeof granularity.days === "number") {
21
+ return `${granularity.days}d`;
22
+ }
23
+ return void 0;
24
+ }
25
+
26
+ export {
27
+ formatGranularity
28
+ };
@@ -4,19 +4,14 @@ 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);
18
- }
8
+ // src/util/output/indent.ts
9
+ var indent_default = (input, level) => {
10
+ const fill = " ".repeat(level);
11
+ return `${fill}${input.replace(/\n/g, `
12
+ ${fill}`)}`;
13
+ };
19
14
 
20
15
  export {
21
- highlight
16
+ indent_default
22
17
  };
@@ -8,7 +8,7 @@ import {
8
8
  VERCEL_DIR,
9
9
  VERCEL_DIR_PROJECT,
10
10
  require_lib
11
- } from "./chunk-TMK6RSYW.js";
11
+ } from "./chunk-TPX7RZBM.js";
12
12
  import {
13
13
  require_dist
14
14
  } from "./chunk-OX7KI3LF.js";