vercel 56.3.1 → 56.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 (66) hide show
  1. package/dist/chunks/{add-ANWCBEDB.js → add-2HLAH42D.js} +2 -2
  2. package/dist/chunks/{add-FWXAFWCU.js → add-XY2LNFK3.js} +3 -3
  3. package/dist/chunks/{chunk-7ZECC3BE.js → chunk-2KNVJ7ET.js} +88 -2
  4. package/dist/chunks/{chunk-74TJ5D35.js → chunk-4QRRJEYO.js} +2 -2
  5. package/dist/chunks/{chunk-4Z5LC2CI.js → chunk-6RTK6BWX.js} +4 -96
  6. package/dist/chunks/{chunk-JEWA7HG3.js → chunk-BRTMH4PL.js} +1 -1
  7. package/dist/chunks/{chunk-F3B65VPT.js → chunk-C4TEOOGB.js} +1 -1
  8. package/dist/chunks/{chunk-M5LOXLMK.js → chunk-EJNFC5AV.js} +1 -1
  9. package/dist/chunks/{chunk-UOB64NBX.js → chunk-ENIJVO7C.js} +2 -2
  10. package/dist/chunks/{query-XC3Y3EBD.js → chunk-F5OMERHI.js} +65 -411
  11. package/dist/chunks/{chunk-26VWIAO5.js → chunk-IN3RG4AU.js} +1 -1
  12. package/dist/chunks/{chunk-2E3ZC3JA.js → chunk-JGXABANG.js} +1 -1
  13. package/dist/chunks/{chunk-AHSE4X6V.js → chunk-JIK3GTU3.js} +1 -1
  14. package/dist/chunks/{chunk-NMAHBCNK.js → chunk-K6YMSJMZ.js} +4 -4
  15. package/dist/chunks/{chunk-ETWY3HX7.js → chunk-ORMDX3GR.js} +1 -1
  16. package/dist/chunks/{chunk-JAY74MG2.js → chunk-OSXJ6G4O.js} +3 -3
  17. package/dist/chunks/{chunk-IAEXF3FY.js → chunk-PEC4ROHM.js} +4 -4
  18. package/dist/chunks/{chunk-RGOP4OYL.js → chunk-QX4337BT.js} +10 -7
  19. package/dist/chunks/{chunk-SAEAR237.js → chunk-S7HMSWGQ.js} +2 -2
  20. package/dist/chunks/{chunk-VO6PK3ZA.js → chunk-SLCLT4P5.js} +1 -1
  21. package/dist/chunks/{chunk-XOED7Y6Z.js → chunk-UA3D44SL.js} +1 -1
  22. package/dist/chunks/{chunk-5R5FS7WB.js → chunk-VZGX4CKB.js} +1 -1
  23. package/dist/chunks/{chunk-D7SLHLED.js → chunk-WM3UMX65.js} +1 -1
  24. package/dist/chunks/chunk-Z7NPYIZ6.js +116 -0
  25. package/dist/chunks/{compile-vercel-config-ELXMKFUY.js → compile-vercel-config-4Q4YZ44O.js} +1 -1
  26. package/dist/chunks/{delete-BO3RQ3F6.js → delete-AUDPLCMU.js} +2 -2
  27. package/dist/chunks/{disable-WRXXRGYR.js → disable-WFPXR7GZ.js} +2 -2
  28. package/dist/chunks/{discard-5XOTKSVP.js → discard-RVFKIZZG.js} +2 -2
  29. package/dist/chunks/{edit-ML2P3MKK.js → edit-KO5KX4WU.js} +3 -3
  30. package/dist/chunks/{enable-E5YCEICZ.js → enable-I5HE32DI.js} +2 -2
  31. package/dist/chunks/{export-EUFPKG5T.js → export-4Y5L2TOT.js} +2 -2
  32. package/dist/chunks/{image-5WOBJQFO.js → image-QC5MVWKN.js} +3 -3
  33. package/dist/chunks/{inspect-7PJE37AJ.js → inspect-BULBAPNR.js} +2 -2
  34. package/dist/chunks/{inspect-I3ZNL35B.js → inspect-JUGFKEGR.js} +2 -2
  35. package/dist/chunks/{inspect-W4SOI7QI.js → inspect-PJDCPARM.js} +2 -2
  36. package/dist/chunks/{inspect-BX26XAK2.js → inspect-Q5BKZNVI.js} +2 -2
  37. package/dist/chunks/{list-44G7AUFR.js → list-FJT44SB6.js} +1 -1
  38. package/dist/chunks/{list-VLFAOPR5.js → list-N7OA4FBI.js} +2 -2
  39. package/dist/chunks/{login-CL57KXDR.js → login-BPE774JW.js} +2 -2
  40. package/dist/chunks/{ls-VD2DNABR.js → ls-26VFGQ6P.js} +3 -3
  41. package/dist/chunks/{ls-KIAXSLDB.js → ls-E47M6P5O.js} +2 -2
  42. package/dist/chunks/{ls-42JFBIDV.js → ls-H52WO65Y.js} +2 -2
  43. package/dist/chunks/{ls-EZRL6SGP.js → ls-YV554CRJ.js} +2 -2
  44. package/dist/chunks/{publish-C3QAGQJ7.js → publish-DUTEBRX3.js} +2 -2
  45. package/dist/chunks/query-QDOKUCHX.js +391 -0
  46. package/dist/chunks/{reorder-L56M5KP3.js → reorder-L2M3YGJ4.js} +2 -2
  47. package/dist/chunks/{restore-E5LGXKS3.js → restore-BVDNAJVC.js} +2 -2
  48. package/dist/chunks/{rm-KGRSF2OY.js → rm-4OQ7G6UX.js} +2 -2
  49. package/dist/chunks/{rm-EF4HUVO2.js → rm-7KSHXSTB.js} +3 -3
  50. package/dist/chunks/{rm-AG3FDPTQ.js → rm-VHWBHG3A.js} +2 -2
  51. package/dist/chunks/{rule-inspect-FRDI2PJF.js → rule-inspect-AT6IEOUF.js} +3 -3
  52. package/dist/chunks/{rules-OEOYTZ6U.js → rules-SQFCUKWS.js} +6 -6
  53. package/dist/chunks/{schema-OEWP27BI.js → schema-PWSCMD24.js} +5 -5
  54. package/dist/chunks/{tags-RUHWH6XO.js → tags-BT7ZGJP2.js} +2 -2
  55. package/dist/chunks/{update-BEXGZY7H.js → update-PTDGBKEH.js} +3 -3
  56. package/dist/commands/build/index.js +9 -9
  57. package/dist/commands/deploy/index.js +9 -9
  58. package/dist/commands/dev/index.js +7 -7
  59. package/dist/commands/env/index.js +4 -4
  60. package/dist/commands/link/index.js +6 -6
  61. package/dist/commands/list/index.js +2 -2
  62. package/dist/commands-bulk.js +595 -71
  63. package/dist/index.js +7 -7
  64. package/dist/version.mjs +1 -1
  65. package/package.json +10 -10
  66. package/dist/chunks/chunk-A3NYPUKZ.js +0 -17
@@ -9,7 +9,7 @@ import {
9
9
  handleVcrApiError,
10
10
  resolveVcrScope,
11
11
  validateVcrJsonOutput
12
- } from "./chunk-VO6PK3ZA.js";
12
+ } from "./chunk-SLCLT4P5.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-RGOP4OYL.js";
22
+ import "./chunk-QX4337BT.js";
23
23
  import {
24
24
  AGENT_REASON,
25
25
  buildCommandWithGlobalFlags,
@@ -9,8 +9,8 @@ import {
9
9
  handleRulesApiError,
10
10
  parseRulesFlagsAndScope,
11
11
  rulesCollectionPath
12
- } from "./chunk-JEWA7HG3.js";
13
- import "./chunk-D7SLHLED.js";
12
+ } from "./chunk-BRTMH4PL.js";
13
+ import "./chunk-WM3UMX65.js";
14
14
  import "./chunk-BUZRVER7.js";
15
15
  import {
16
16
  validateJsonOutput
@@ -18,7 +18,7 @@ import {
18
18
  import {
19
19
  rulesAddSubcommand
20
20
  } from "./chunk-STJJ3DFO.js";
21
- import "./chunk-RGOP4OYL.js";
21
+ import "./chunk-QX4337BT.js";
22
22
  import {
23
23
  AGENT_REASON,
24
24
  buildCommandWithGlobalFlags,
@@ -28,10 +28,10 @@ import {
28
28
  import {
29
29
  buildCommand,
30
30
  pullCommand
31
- } from "./chunk-M5LOXLMK.js";
31
+ } from "./chunk-EJNFC5AV.js";
32
32
  import {
33
33
  envCommand
34
- } from "./chunk-RGOP4OYL.js";
34
+ } from "./chunk-QX4337BT.js";
35
35
  import {
36
36
  confirmOption,
37
37
  deploymentOption,
@@ -1023,6 +1023,14 @@ var setupSubcommand = {
1023
1023
  deprecated: false,
1024
1024
  description: "Shell rc file to write the env exports into"
1025
1025
  },
1026
+ {
1027
+ name: "apply",
1028
+ shorthand: null,
1029
+ type: String,
1030
+ argument: "MODE",
1031
+ deprecated: false,
1032
+ description: "How to apply non-interactively: edit (write files, default) or prompt (emit an agent prompt on stdout; requires the macOS Keychain)"
1033
+ },
1026
1034
  yesOption
1027
1035
  ],
1028
1036
  examples: [
@@ -1030,6 +1038,10 @@ var setupSubcommand = {
1030
1038
  name: "Connect all detected coding agents (creates a key)",
1031
1039
  value: `${packageName} ai-gateway coding-agents setup`
1032
1040
  },
1041
+ {
1042
+ name: "Emit a prompt to hand to a coding agent instead of writing files",
1043
+ value: `${packageName} ai-gateway coding-agents setup --apply prompt --yes`
1044
+ },
1033
1045
  {
1034
1046
  name: "Connect specific agents with a budgeted key",
1035
1047
  value: `${packageName} ai-gateway coding-agents setup --agent claude-code --budget 500 --refresh-period monthly`
@@ -4368,6 +4380,21 @@ function formatFlagConditionComparator(comparator, options) {
4368
4380
  return label;
4369
4381
  }
4370
4382
 
4383
+ // src/commands/flags/evaluations-config.ts
4384
+ var FLAG_EVALUATIONS_GRANULARITIES = [
4385
+ "1m",
4386
+ "5m",
4387
+ "15m",
4388
+ "1h",
4389
+ "4h",
4390
+ "1d"
4391
+ ];
4392
+ function isFlagEvaluationsGranularity(value) {
4393
+ return FLAG_EVALUATIONS_GRANULARITIES.some(
4394
+ (granularity) => granularity === value
4395
+ );
4396
+ }
4397
+
4371
4398
  // src/commands/flags/command.ts
4372
4399
  var segmentRuleOperatorDescription = `Valid operators: ${formatFlagConditionComparatorList()}`;
4373
4400
  var listSubcommand11 = {
@@ -4604,6 +4631,61 @@ var versionsSubcommand = {
4604
4631
  }
4605
4632
  ]
4606
4633
  };
4634
+ var evaluationsSubcommand = {
4635
+ name: "evaluations",
4636
+ aliases: ["evals"],
4637
+ description: "Display evaluation metrics for a feature flag",
4638
+ arguments: [
4639
+ {
4640
+ name: "flag",
4641
+ required: true
4642
+ }
4643
+ ],
4644
+ options: [
4645
+ projectOption,
4646
+ {
4647
+ name: "since",
4648
+ shorthand: "s",
4649
+ type: String,
4650
+ deprecated: false,
4651
+ description: "Start time: relative (1h, 30m, 2d) or ISO date (default: 1h)",
4652
+ argument: "TIME"
4653
+ },
4654
+ {
4655
+ name: "until",
4656
+ shorthand: "u",
4657
+ type: String,
4658
+ deprecated: false,
4659
+ description: "End time (default: now)",
4660
+ argument: "TIME"
4661
+ },
4662
+ {
4663
+ name: "granularity",
4664
+ shorthand: "g",
4665
+ type: String,
4666
+ deprecated: false,
4667
+ description: `Time bucket size: ${FLAG_EVALUATIONS_GRANULARITIES.join(", ")} (default: auto)`,
4668
+ argument: "SIZE"
4669
+ },
4670
+ {
4671
+ name: "json",
4672
+ shorthand: null,
4673
+ type: Boolean,
4674
+ deprecated: false,
4675
+ description: "Output in JSON format"
4676
+ }
4677
+ ],
4678
+ examples: [
4679
+ {
4680
+ name: "Show evaluations by variant for the last hour",
4681
+ value: `${packageName} flags evaluations my-feature`
4682
+ },
4683
+ {
4684
+ name: "Show evaluation metrics as JSON",
4685
+ value: `${packageName} flags evaluations my-feature --since 24h --json`
4686
+ }
4687
+ ]
4688
+ };
4607
4689
  var createSubcommand4 = {
4608
4690
  name: "create",
4609
4691
  aliases: ["add"],
@@ -5834,6 +5916,7 @@ var flagsCommand = {
5834
5916
  listSubcommand11,
5835
5917
  inspectSubcommand3,
5836
5918
  versionsSubcommand,
5919
+ evaluationsSubcommand,
5837
5920
  createSubcommand4,
5838
5921
  openSubcommand2,
5839
5922
  updateSubcommand3,
@@ -10472,11 +10555,14 @@ export {
10472
10555
  FLAG_CONDITION_RHS_OPTIONAL_COMPARATORS,
10473
10556
  formatFlagConditionComparatorList,
10474
10557
  formatFlagConditionComparator,
10558
+ FLAG_EVALUATIONS_GRANULARITIES,
10559
+ isFlagEvaluationsGranularity,
10475
10560
  listSubcommand11,
10476
10561
  inspectSubcommand3,
10477
10562
  versionsListSubcommand,
10478
10563
  versionsDiffSubcommand,
10479
10564
  versionsSubcommand,
10565
+ evaluationsSubcommand,
10480
10566
  createSubcommand4,
10481
10567
  openSubcommand2,
10482
10568
  updateSubcommand3,
@@ -6,14 +6,14 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  setupAndLink
9
- } from "./chunk-UOB64NBX.js";
9
+ } from "./chunk-ENIJVO7C.js";
10
10
  import {
11
11
  detectExplicitScope,
12
12
  getLinkedProject,
13
13
  param,
14
14
  printProjectNotFoundError,
15
15
  resolveProjectCwd
16
- } from "./chunk-RGOP4OYL.js";
16
+ } from "./chunk-QX4337BT.js";
17
17
  import {
18
18
  buildCommandWithYes,
19
19
  outputActionRequired
@@ -4,6 +4,10 @@ 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
+ formatErrorJson,
9
+ handleApiError
10
+ } from "./chunk-Z7NPYIZ6.js";
7
11
  import {
8
12
  isAPIError
9
13
  } from "./chunk-KSSNLCL4.js";
@@ -11,97 +15,6 @@ import {
11
15
  output_manager_default
12
16
  } from "./chunk-OX7KI3LF.js";
13
17
 
14
- // src/commands/metrics/output.ts
15
- function getRollupColumnName(metric, aggregation) {
16
- return `${metric}_${aggregation}`.replace(/[./]/g, "_");
17
- }
18
- function getResolvedOrderMetadata(query, response) {
19
- const orderBy = query.orderBy ?? (response.orderBy ? "count" : void 0);
20
- const orderDirection = response.orderDirection ?? query.orderDirection;
21
- return {
22
- ...orderBy ? { orderBy } : {},
23
- ...orderDirection ? { orderDirection } : {}
24
- };
25
- }
26
- function formatQueryJson(query, response) {
27
- const orderMetadata = getResolvedOrderMetadata(query, response);
28
- const queryWithResponseMetadata = {
29
- ...query,
30
- ...orderMetadata
31
- };
32
- return JSON.stringify(
33
- {
34
- query: queryWithResponseMetadata,
35
- summary: response.summary ?? [],
36
- data: response.data ?? [],
37
- statistics: response.statistics ?? {},
38
- ...orderMetadata
39
- },
40
- null,
41
- 2
42
- );
43
- }
44
- function formatErrorJson(code, message, allowedValues) {
45
- const error = {
46
- code,
47
- message
48
- };
49
- if (allowedValues && allowedValues.length > 0) {
50
- error.allowedValues = allowedValues;
51
- }
52
- return JSON.stringify({ error }, null, 2);
53
- }
54
- function handleApiError(err, jsonOutput, client, overrides = {}) {
55
- let code;
56
- let message;
57
- const override = overrides[err.status];
58
- if (override) {
59
- code = override.code || err.code || "BAD_REQUEST";
60
- message = override.message;
61
- } else {
62
- switch (err.status) {
63
- case 402:
64
- code = err.code || "PAYMENT_REQUIRED";
65
- message = err.serverMessage || "This feature requires an Observability Plus subscription. Upgrade at https://vercel.com/dashboard/settings/billing";
66
- break;
67
- case 429:
68
- code = err.code || "RATE_LIMITED";
69
- message = err.serverMessage || "You have reached the metrics query rate limit. Please wait and try again. If you need a higher limit, request one from your Vercel account team.";
70
- break;
71
- case 403:
72
- code = "FORBIDDEN";
73
- message = "You do not have permission to query metrics for this project/team.";
74
- break;
75
- case 500:
76
- code = "INTERNAL_ERROR";
77
- message = "An internal error occurred. Please try again later.";
78
- break;
79
- case 504:
80
- code = "TIMEOUT";
81
- message = "The query timed out. Try a shorter time range or fewer groups.";
82
- break;
83
- case 400:
84
- code = err.code || "BAD_REQUEST";
85
- message = err.serverMessage || `API error (${err.status})`;
86
- break;
87
- default:
88
- code = err.code || "BAD_REQUEST";
89
- message = err.serverMessage || `API error (${err.status})`;
90
- }
91
- }
92
- if (jsonOutput) {
93
- client.stdout.write(formatErrorJson(code, message, err.allowedValues));
94
- } else {
95
- output_manager_default.error(message);
96
- if (err.allowedValues && err.allowedValues.length > 0) {
97
- output_manager_default.print(`
98
- Available values: ${err.allowedValues.join(", ")}
99
- `);
100
- }
101
- }
102
- return 1;
103
- }
104
-
105
18
  // src/commands/metrics/schema-api.ts
106
19
  function toMetricDetail(metric) {
107
20
  return {
@@ -182,11 +95,6 @@ async function fetchMetricDetailOrExit(client, accountId, metricId, jsonOutput)
182
95
  }
183
96
 
184
97
  export {
185
- getRollupColumnName,
186
- getResolvedOrderMetadata,
187
- formatQueryJson,
188
- formatErrorJson,
189
- handleApiError,
190
98
  getDefaultAggregation,
191
99
  fetchMetricListOrExit,
192
100
  fetchMetricDetailOrExit
@@ -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-D7SLHLED.js";
9
+ } from "./chunk-WM3UMX65.js";
10
10
  import {
11
11
  handleValidationError,
12
12
  outputError,
@@ -19,7 +19,7 @@ import {
19
19
  require_lib,
20
20
  require_minimatch,
21
21
  require_pluralize
22
- } from "./chunk-RGOP4OYL.js";
22
+ } from "./chunk-QX4337BT.js";
23
23
  import {
24
24
  CantParseJSONFile,
25
25
  cmd,
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  getEnvTargetPlaceholder
9
- } from "./chunk-RGOP4OYL.js";
9
+ } from "./chunk-QX4337BT.js";
10
10
  import {
11
11
  packageName,
12
12
  projectOption,
@@ -8,7 +8,7 @@ import {
8
8
  getLocalPathConfig,
9
9
  isPromptBackError,
10
10
  isPromptCanceledError
11
- } from "./chunk-XOED7Y6Z.js";
11
+ } from "./chunk-UA3D44SL.js";
12
12
  import {
13
13
  table
14
14
  } from "./chunk-NZRWTCRM.js";
@@ -46,7 +46,7 @@ import {
46
46
  selectAndParseRemoteUrl,
47
47
  selectOrg,
48
48
  writeServicesConfig
49
- } from "./chunk-RGOP4OYL.js";
49
+ } from "./chunk-QX4337BT.js";
50
50
  import {
51
51
  printError
52
52
  } from "./chunk-SZXT3PDQ.js";