vercel 54.14.0 → 54.14.2

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 (74) hide show
  1. package/dist/chunks/{add-PVEKZBHH.js → add-PKT6ULVJ.js} +9 -9
  2. package/dist/chunks/{chunk-Y76J3TGD.js → chunk-2HN6DLIY.js} +1 -1
  3. package/dist/chunks/{chunk-FPRA7U2P.js → chunk-2XEEOHHH.js} +1 -1
  4. package/dist/chunks/{chunk-TH555JND.js → chunk-2ZSXQQXI.js} +15 -42
  5. package/dist/chunks/{chunk-6D6CSOSK.js → chunk-372SHB43.js} +86 -62
  6. package/dist/chunks/{chunk-4KAFHBYE.js → chunk-3BR246Y6.js} +1 -1
  7. package/dist/chunks/{chunk-V2WFM23D.js → chunk-4BFK3C7V.js} +2 -2
  8. package/dist/chunks/{chunk-FMN3NXRC.js → chunk-56AJHIQC.js} +1 -1
  9. package/dist/chunks/chunk-64IF634X.js +18 -0
  10. package/dist/chunks/{chunk-VNUNCNPE.js → chunk-AWD3IGXU.js} +3 -3
  11. package/dist/chunks/{chunk-5SYDEK2N.js → chunk-D7MGZH35.js} +1 -1
  12. package/dist/chunks/{chunk-IQQJHYW4.js → chunk-DPS62LHL.js} +2 -2
  13. package/dist/chunks/{chunk-RWJORLQP.js → chunk-FEYVO2US.js} +59 -17
  14. package/dist/chunks/{chunk-ABOX5TXU.js → chunk-FLW73SZ3.js} +3 -3
  15. package/dist/chunks/{chunk-Z7KOKD2G.js → chunk-G3NXHUFT.js} +1 -1
  16. package/dist/chunks/{chunk-CO5D46AG.js → chunk-GGP5R3FU.js} +18 -38
  17. package/dist/chunks/{chunk-J5273CSE.js → chunk-HIYWSGI7.js} +19 -10
  18. package/dist/chunks/{chunk-WFRHKZFI.js → chunk-IB56QKCM.js} +1 -1
  19. package/dist/chunks/{chunk-ZTPOJE63.js → chunk-IJJOI63T.js} +1 -1
  20. package/dist/chunks/{chunk-DAASB6YQ.js → chunk-ILJH44MK.js} +23 -3
  21. package/dist/chunks/{chunk-V4GROAUJ.js → chunk-IPWWE7PB.js} +4 -7
  22. package/dist/chunks/{chunk-G7QWUIGS.js → chunk-J7BMPRCU.js} +3 -3
  23. package/dist/chunks/{chunk-7OZWGXPA.js → chunk-JISJDGJF.js} +2 -2
  24. package/dist/chunks/{chunk-5UCWXYNH.js → chunk-LQR3CHMH.js} +88 -46
  25. package/dist/chunks/{chunk-4NDOMD3E.js → chunk-LYCSVJIX.js} +1 -1
  26. package/dist/chunks/{chunk-6IQZVQV6.js → chunk-MYWLF3BZ.js} +18 -0
  27. package/dist/chunks/{chunk-6K3WJDFA.js → chunk-O4V7CMVO.js} +10 -10
  28. package/dist/chunks/{chunk-KJ5O7JQQ.js → chunk-O7RJHL34.js} +81 -86
  29. package/dist/chunks/{chunk-C3VH3X5Y.js → chunk-OHIZ4SVU.js} +4 -4
  30. package/dist/chunks/{chunk-JFWE5ORG.js → chunk-P4KQ3FJ4.js} +1 -0
  31. package/dist/chunks/{chunk-PV533MBH.js → chunk-PMUUPCDL.js} +1 -1
  32. package/dist/chunks/{chunk-OEM7RB3X.js → chunk-SDZ5ICZL.js} +2 -2
  33. package/dist/chunks/{chunk-NGRSQRSN.js → chunk-SGPBULVT.js} +1 -1
  34. package/dist/chunks/{chunk-RM4XGGZO.js → chunk-TSENBD7C.js} +2 -2
  35. package/dist/chunks/{chunk-O4C4A7HM.js → chunk-VKRW77HH.js} +1 -1
  36. package/dist/chunks/chunk-VXYGCOKL.js +28 -0
  37. package/dist/chunks/{chunk-7CJZCFLW.js → chunk-YLGMXYFG.js} +2 -2
  38. package/dist/chunks/{chunk-B6C7NMT3.js → chunk-Z2MBXYZZ.js} +1 -1
  39. package/dist/chunks/{chunk-S4VHXL2Y.js → chunk-Z3X747P6.js} +1 -1
  40. package/dist/chunks/{compile-vercel-config-MD37D2F7.js → compile-vercel-config-3LV7J3IZ.js} +4 -4
  41. package/dist/chunks/{delete-6EMDCXSA.js → delete-GFW6Y6TZ.js} +10 -8
  42. package/dist/chunks/{disable-FLJ27NHG.js → disable-PGRAS2ZL.js} +10 -8
  43. package/dist/chunks/{discard-KEIII6RM.js → discard-S6N5Q4G5.js} +10 -8
  44. package/dist/chunks/{edit-DOL2ZJPG.js → edit-TICKX4ZV.js} +12 -10
  45. package/dist/chunks/{enable-PZWZIETT.js → enable-L3BYWN6S.js} +10 -8
  46. package/dist/chunks/{export-2PFHAELC.js → export-NXS33U5T.js} +6 -6
  47. package/dist/chunks/{inspect-WPWOZJ2K.js → inspect-OOI5JN3Y.js} +9 -9
  48. package/dist/chunks/{list-4R5DCLTB.js → list-6EHRL2D4.js} +7 -7
  49. package/dist/chunks/{list-ZT7QK2H7.js → list-77WL6463.js} +11 -11
  50. package/dist/chunks/{ls-4JTXQXMQ.js → ls-PBSOEXFG.js} +9 -9
  51. package/dist/chunks/{publish-JV4J3SOA.js → publish-CU2THVYW.js} +10 -8
  52. package/dist/chunks/{query-N22EYSZZ.js → query-HEATRYAK.js} +99 -43
  53. package/dist/chunks/{reorder-TG53BKW4.js → reorder-IQVKSM3H.js} +10 -8
  54. package/dist/chunks/{restore-U7O4VESA.js → restore-RDEOBGAS.js} +10 -8
  55. package/dist/chunks/{rm-XA4LYZXI.js → rm-MCSGTU4J.js} +9 -9
  56. package/dist/chunks/{routes-EAMQVFU2.js → routes-YEU33SON.js} +2 -2
  57. package/dist/chunks/{rule-inspect-HC745CYT.js → rule-inspect-3YK2XSL3.js} +9 -9
  58. package/dist/chunks/{rules-RMN72YHN.js → rules-F4MRDDHM.js} +6 -6
  59. package/dist/chunks/{schema-CZVKUXM6.js → schema-65C5EBJ7.js} +9 -9
  60. package/dist/chunks/{stamp-ENIXDCRO.js → stamp-AA7R3MZS.js} +3 -1
  61. package/dist/chunks/{types-P6JKZFEY.js → types-3R7HKP57.js} +3 -3
  62. package/dist/chunks/{update-PU3WLIA7.js → update-XB4WSRGY.js} +9 -9
  63. package/dist/commands/build/index.js +18 -16
  64. package/dist/commands/deploy/index.js +30 -171
  65. package/dist/commands/dev/index.js +187 -133
  66. package/dist/commands/dev/next-dev-websocket-shim-preload.cjs +190 -0
  67. package/dist/commands/env/index.js +162 -101
  68. package/dist/commands/link/index.js +19 -19
  69. package/dist/commands/list/index.js +13 -11
  70. package/dist/commands-bulk.js +258 -104
  71. package/dist/help.js +1 -1
  72. package/dist/index.js +27 -27
  73. package/dist/version.mjs +1 -1
  74. package/package.json +11 -11
@@ -17,21 +17,23 @@ import {
17
17
  parseSubcommandArgs,
18
18
  resolveRoute,
19
19
  withGlobalFlags
20
- } from "./chunk-G7QWUIGS.js";
20
+ } from "./chunk-J7BMPRCU.js";
21
21
  import {
22
22
  enableSubcommand
23
- } from "./chunk-WFRHKZFI.js";
23
+ } from "./chunk-IB56QKCM.js";
24
+ import {
25
+ stamp_default
26
+ } from "./chunk-64IF634X.js";
27
+ import "./chunk-VXYGCOKL.js";
24
28
  import "./chunk-LJ5WXXG6.js";
25
- import "./chunk-5UCWXYNH.js";
26
- import "./chunk-J5273CSE.js";
29
+ import "./chunk-LQR3CHMH.js";
30
+ import "./chunk-HIYWSGI7.js";
27
31
  import {
28
32
  outputAgentError
29
33
  } from "./chunk-NHGCQRK5.js";
30
- import {
31
- stamp_default
32
- } from "./chunk-CO5D46AG.js";
33
34
  import "./chunk-N2T234LO.js";
34
- import "./chunk-6IQZVQV6.js";
35
+ import "./chunk-GGP5R3FU.js";
36
+ import "./chunk-MYWLF3BZ.js";
35
37
  import {
36
38
  getCommandName
37
39
  } from "./chunk-LN6B7ZI3.js";
@@ -9,19 +9,19 @@ import {
9
9
  getRoutes,
10
10
  parseSubcommandArgs,
11
11
  withGlobalFlags
12
- } from "./chunk-G7QWUIGS.js";
12
+ } from "./chunk-J7BMPRCU.js";
13
13
  import {
14
14
  exportSubcommand
15
- } from "./chunk-WFRHKZFI.js";
15
+ } from "./chunk-IB56QKCM.js";
16
16
  import "./chunk-LJ5WXXG6.js";
17
- import "./chunk-5UCWXYNH.js";
18
- import "./chunk-J5273CSE.js";
17
+ import "./chunk-LQR3CHMH.js";
18
+ import "./chunk-HIYWSGI7.js";
19
19
  import {
20
20
  outputAgentError
21
21
  } from "./chunk-NHGCQRK5.js";
22
- import "./chunk-CO5D46AG.js";
23
22
  import "./chunk-N2T234LO.js";
24
- import "./chunk-6IQZVQV6.js";
23
+ import "./chunk-GGP5R3FU.js";
24
+ import "./chunk-MYWLF3BZ.js";
25
25
  import {
26
26
  getCommandName
27
27
  } from "./chunk-LN6B7ZI3.js";
@@ -6,41 +6,41 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  emitAlertsScopeError
9
- } from "./chunk-ABOX5TXU.js";
9
+ } from "./chunk-FLW73SZ3.js";
10
10
  import {
11
11
  handleValidationError,
12
12
  outputError,
13
13
  validateAllProjectMutualExclusivity
14
- } from "./chunk-5SYDEK2N.js";
14
+ } from "./chunk-D7MGZH35.js";
15
15
  import {
16
16
  validateJsonOutput
17
17
  } from "./chunk-XPKWKPWA.js";
18
18
  import {
19
19
  inspectSubcommand
20
- } from "./chunk-IQQJHYW4.js";
21
- import "./chunk-NGRSQRSN.js";
20
+ } from "./chunk-DPS62LHL.js";
21
+ import "./chunk-SGPBULVT.js";
22
22
  import {
23
23
  AGENT_REASON
24
24
  } from "./chunk-LJ5WXXG6.js";
25
25
  import {
26
26
  getScope
27
- } from "./chunk-Z7KOKD2G.js";
27
+ } from "./chunk-G3NXHUFT.js";
28
28
  import {
29
29
  getLinkedProject,
30
30
  getProjectByNameOrId
31
- } from "./chunk-5UCWXYNH.js";
32
- import "./chunk-J5273CSE.js";
31
+ } from "./chunk-LQR3CHMH.js";
32
+ import "./chunk-HIYWSGI7.js";
33
33
  import {
34
34
  buildCommandWithGlobalFlags,
35
35
  outputAgentError
36
36
  } from "./chunk-NHGCQRK5.js";
37
- import "./chunk-CO5D46AG.js";
38
37
  import "./chunk-N2T234LO.js";
38
+ import "./chunk-GGP5R3FU.js";
39
39
  import {
40
40
  getFlagsSpecification,
41
41
  parseArguments,
42
42
  printError
43
- } from "./chunk-6IQZVQV6.js";
43
+ } from "./chunk-MYWLF3BZ.js";
44
44
  import {
45
45
  ProjectNotFound,
46
46
  isAPIError,
@@ -12,7 +12,7 @@ import {
12
12
  validateIntegerRangeWithDefault,
13
13
  validateTimeBound,
14
14
  validateTimeOrder
15
- } from "./chunk-5SYDEK2N.js";
15
+ } from "./chunk-D7MGZH35.js";
16
16
  import {
17
17
  getCommandFlags
18
18
  } from "./chunk-EOZFDJSY.js";
@@ -21,23 +21,23 @@ import {
21
21
  } from "./chunk-XPKWKPWA.js";
22
22
  import {
23
23
  activityCommand
24
- } from "./chunk-FMN3NXRC.js";
24
+ } from "./chunk-56AJHIQC.js";
25
25
  import {
26
26
  getScope
27
- } from "./chunk-Z7KOKD2G.js";
27
+ } from "./chunk-G3NXHUFT.js";
28
28
  import {
29
29
  getLinkedProject,
30
30
  getProjectByNameOrId
31
- } from "./chunk-5UCWXYNH.js";
32
- import "./chunk-J5273CSE.js";
31
+ } from "./chunk-LQR3CHMH.js";
32
+ import "./chunk-HIYWSGI7.js";
33
33
  import "./chunk-NHGCQRK5.js";
34
- import "./chunk-CO5D46AG.js";
35
34
  import "./chunk-N2T234LO.js";
35
+ import "./chunk-GGP5R3FU.js";
36
36
  import {
37
37
  getFlagsSpecification,
38
38
  parseArguments,
39
39
  printError
40
- } from "./chunk-6IQZVQV6.js";
40
+ } from "./chunk-MYWLF3BZ.js";
41
41
  import {
42
42
  ProjectNotFound,
43
43
  getCommandName,
@@ -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-ABOX5TXU.js";
9
+ } from "./chunk-FLW73SZ3.js";
10
10
  import {
11
11
  handleValidationError,
12
12
  normalizeRepeatableStringFilters,
@@ -15,37 +15,37 @@ import {
15
15
  validateOptionalIntegerRange,
16
16
  validateTimeBound,
17
17
  validateTimeOrder
18
- } from "./chunk-5SYDEK2N.js";
18
+ } from "./chunk-D7MGZH35.js";
19
19
  import {
20
20
  validateJsonOutput
21
21
  } from "./chunk-XPKWKPWA.js";
22
22
  import {
23
23
  alertsCommand
24
- } from "./chunk-IQQJHYW4.js";
25
- import "./chunk-NGRSQRSN.js";
24
+ } from "./chunk-DPS62LHL.js";
25
+ import "./chunk-SGPBULVT.js";
26
26
  import {
27
27
  AGENT_REASON
28
28
  } from "./chunk-LJ5WXXG6.js";
29
- import "./chunk-Z7KOKD2G.js";
30
- import "./chunk-5UCWXYNH.js";
31
- import "./chunk-J5273CSE.js";
29
+ import "./chunk-G3NXHUFT.js";
30
+ import "./chunk-LQR3CHMH.js";
31
+ import "./chunk-HIYWSGI7.js";
32
32
  import {
33
33
  buildCommandWithGlobalFlags,
34
34
  outputAgentError,
35
35
  shouldEmitNonInteractiveCommandError
36
36
  } from "./chunk-NHGCQRK5.js";
37
+ import "./chunk-N2T234LO.js";
37
38
  import {
38
39
  require_ms
39
- } from "./chunk-CO5D46AG.js";
40
- import "./chunk-N2T234LO.js";
40
+ } from "./chunk-GGP5R3FU.js";
41
41
  import {
42
42
  table
43
- } from "./chunk-4NDOMD3E.js";
43
+ } from "./chunk-LYCSVJIX.js";
44
44
  import {
45
45
  getFlagsSpecification,
46
46
  parseArguments,
47
47
  printError
48
- } from "./chunk-6IQZVQV6.js";
48
+ } from "./chunk-MYWLF3BZ.js";
49
49
  import {
50
50
  isAPIError
51
51
  } from "./chunk-LN6B7ZI3.js";
@@ -9,31 +9,31 @@ import {
9
9
  handleRulesApiError,
10
10
  parseRulesFlagsAndScope,
11
11
  rulesCollectionPath
12
- } from "./chunk-7OZWGXPA.js";
13
- import "./chunk-ABOX5TXU.js";
14
- import "./chunk-5SYDEK2N.js";
12
+ } from "./chunk-JISJDGJF.js";
13
+ import "./chunk-FLW73SZ3.js";
14
+ import "./chunk-D7MGZH35.js";
15
15
  import {
16
16
  validateJsonOutput
17
17
  } from "./chunk-XPKWKPWA.js";
18
18
  import {
19
19
  rulesLsSubcommand
20
- } from "./chunk-NGRSQRSN.js";
20
+ } from "./chunk-SGPBULVT.js";
21
21
  import {
22
22
  AGENT_REASON
23
23
  } from "./chunk-LJ5WXXG6.js";
24
- import "./chunk-Z7KOKD2G.js";
25
- import "./chunk-5UCWXYNH.js";
26
- import "./chunk-J5273CSE.js";
24
+ import "./chunk-G3NXHUFT.js";
25
+ import "./chunk-LQR3CHMH.js";
26
+ import "./chunk-HIYWSGI7.js";
27
27
  import {
28
28
  outputAgentError
29
29
  } from "./chunk-NHGCQRK5.js";
30
- import "./chunk-CO5D46AG.js";
31
30
  import "./chunk-N2T234LO.js";
31
+ import "./chunk-GGP5R3FU.js";
32
32
  import {
33
33
  getFlagsSpecification,
34
34
  parseArguments,
35
35
  printError
36
- } from "./chunk-6IQZVQV6.js";
36
+ } from "./chunk-MYWLF3BZ.js";
37
37
  import {
38
38
  isAPIError
39
39
  } from "./chunk-LN6B7ZI3.js";
@@ -17,21 +17,23 @@ import {
17
17
  parseSubcommandArgs,
18
18
  printDiffSummary,
19
19
  withGlobalFlags
20
- } from "./chunk-G7QWUIGS.js";
20
+ } from "./chunk-J7BMPRCU.js";
21
21
  import {
22
22
  publishSubcommand
23
- } from "./chunk-WFRHKZFI.js";
23
+ } from "./chunk-IB56QKCM.js";
24
+ import {
25
+ stamp_default
26
+ } from "./chunk-64IF634X.js";
27
+ import "./chunk-VXYGCOKL.js";
24
28
  import "./chunk-LJ5WXXG6.js";
25
- import "./chunk-5UCWXYNH.js";
26
- import "./chunk-J5273CSE.js";
29
+ import "./chunk-LQR3CHMH.js";
30
+ import "./chunk-HIYWSGI7.js";
27
31
  import {
28
32
  outputAgentError
29
33
  } from "./chunk-NHGCQRK5.js";
30
- import {
31
- stamp_default
32
- } from "./chunk-CO5D46AG.js";
33
34
  import "./chunk-N2T234LO.js";
34
- import "./chunk-6IQZVQV6.js";
35
+ import "./chunk-GGP5R3FU.js";
36
+ import "./chunk-MYWLF3BZ.js";
35
37
  import {
36
38
  getCommandName
37
39
  } from "./chunk-LN6B7ZI3.js";
@@ -11,41 +11,41 @@ import {
11
11
  getDefaultAggregation,
12
12
  getRollupColumnName,
13
13
  handleApiError
14
- } from "./chunk-B6C7NMT3.js";
14
+ } from "./chunk-Z2MBXYZZ.js";
15
15
  import {
16
16
  indent_default
17
17
  } from "./chunk-A3NYPUKZ.js";
18
18
  import {
19
19
  resolveTimeRange,
20
20
  validateAllProjectMutualExclusivity
21
- } from "./chunk-5SYDEK2N.js";
21
+ } from "./chunk-D7MGZH35.js";
22
22
  import {
23
23
  validateJsonOutput
24
24
  } from "./chunk-XPKWKPWA.js";
25
25
  import {
26
26
  metricsCommand
27
- } from "./chunk-DAASB6YQ.js";
27
+ } from "./chunk-ILJH44MK.js";
28
28
  import {
29
29
  getScope
30
- } from "./chunk-Z7KOKD2G.js";
30
+ } from "./chunk-G3NXHUFT.js";
31
31
  import {
32
32
  getLinkedProject,
33
33
  getProjectByNameOrId
34
- } from "./chunk-5UCWXYNH.js";
35
- import "./chunk-J5273CSE.js";
34
+ } from "./chunk-LQR3CHMH.js";
35
+ import "./chunk-HIYWSGI7.js";
36
36
  import "./chunk-NHGCQRK5.js";
37
+ import "./chunk-N2T234LO.js";
37
38
  import {
38
39
  require_ms
39
- } from "./chunk-CO5D46AG.js";
40
- import "./chunk-N2T234LO.js";
40
+ } from "./chunk-GGP5R3FU.js";
41
41
  import {
42
42
  table
43
- } from "./chunk-4NDOMD3E.js";
43
+ } from "./chunk-LYCSVJIX.js";
44
44
  import {
45
45
  getFlagsSpecification,
46
46
  parseArguments,
47
47
  printError
48
- } from "./chunk-6IQZVQV6.js";
48
+ } from "./chunk-MYWLF3BZ.js";
49
49
  import {
50
50
  ProjectNotFound,
51
51
  isAPIError
@@ -161,15 +161,6 @@ function computeGranularity(rangeMs, explicit) {
161
161
  adjusted: false
162
162
  };
163
163
  }
164
- function roundTimeBoundaries(start, end, granularityMs) {
165
- const flooredStart = new Date(
166
- Math.floor(start.getTime() / granularityMs) * granularityMs
167
- );
168
- const ceiledEnd = new Date(
169
- Math.ceil(end.getTime() / granularityMs) * granularityMs
170
- );
171
- return { start: flooredStart, end: ceiledEnd };
172
- }
173
164
  function toGranularityMsFromDuration(duration) {
174
165
  if ("minutes" in duration) {
175
166
  return duration.minutes * MINUTE_MS;
@@ -199,6 +190,10 @@ var MISSING_CHAR = "\xB7";
199
190
  function normalizeUnit(unit) {
200
191
  return unit.trim().toLowerCase().replace(/[_\s]+/g, " ");
201
192
  }
193
+ function isAggregationWithDimension(aggregation) {
194
+ const [, dimension] = aggregation.split("/");
195
+ return Boolean(dimension);
196
+ }
202
197
  function toGroupKey(groupValues) {
203
198
  if (groupValues.length === 0) {
204
199
  return "";
@@ -338,6 +333,30 @@ function buildExpectedTimestamps(periodStart, periodEnd, granularityMs) {
338
333
  }
339
334
  return timestamps;
340
335
  }
336
+ function buildObservedTimestamps(observedTimestamps, granularityMs) {
337
+ const timestamps = [...observedTimestamps].map((timestamp) => Date.parse(timestamp)).filter(Number.isFinite).sort((a, b) => a - b);
338
+ if (timestamps.length === 0 || granularityMs <= 0) {
339
+ return [];
340
+ }
341
+ const start = timestamps[0];
342
+ const end = timestamps[timestamps.length - 1] + granularityMs;
343
+ return buildExpectedTimestamps(
344
+ new Date(start).toISOString(),
345
+ new Date(end).toISOString(),
346
+ granularityMs
347
+ );
348
+ }
349
+ function buildSeriesTimestamps(periodStart, periodEnd, granularityMs, observedTimestamps) {
350
+ const expectedTimestamps = buildExpectedTimestamps(
351
+ periodStart,
352
+ periodEnd,
353
+ granularityMs
354
+ );
355
+ if (observedTimestamps.size === 0 || expectedTimestamps.some((timestamp) => observedTimestamps.has(timestamp))) {
356
+ return expectedTimestamps;
357
+ }
358
+ return buildObservedTimestamps(observedTimestamps, granularityMs);
359
+ }
341
360
  function getMeasureType(unit) {
342
361
  const normalized = normalizeUnit(unit);
343
362
  if (COUNT_UNITS.has(normalized)) {
@@ -387,14 +406,10 @@ function formatMinMaxTimestamp(date, periodStart, periodEnd) {
387
406
  return `${pad4(date.getUTCFullYear())}-${pad2(date.getUTCMonth() + 1)}-${pad2(date.getUTCDate())} ${pad2(date.getUTCHours())}:${pad2(date.getUTCMinutes())}`;
388
407
  }
389
408
  function extractGroupedSeries(data, groupBy, rollupColumn, periodStart, periodEnd, granularityMs) {
390
- const expectedTimestamps = buildExpectedTimestamps(
391
- periodStart,
392
- periodEnd,
393
- granularityMs
394
- );
395
409
  const groups = [];
396
410
  const groupValues = /* @__PURE__ */ new Map();
397
411
  const valueByGroup = /* @__PURE__ */ new Map();
412
+ const observedTimestamps = /* @__PURE__ */ new Set();
398
413
  for (const row of data) {
399
414
  const values = groupBy.map((field) => getGroupFieldValue(row, field));
400
415
  const key = toGroupKey(values);
@@ -411,9 +426,16 @@ function extractGroupedSeries(data, groupBy, rollupColumn, periodStart, periodEn
411
426
  if (!timestamp) {
412
427
  continue;
413
428
  }
429
+ observedTimestamps.add(timestamp);
414
430
  const numeric = toNumericValue(row[rollupColumn]);
415
431
  groupMap.set(timestamp, numeric);
416
432
  }
433
+ const expectedTimestamps = buildSeriesTimestamps(
434
+ periodStart,
435
+ periodEnd,
436
+ granularityMs,
437
+ observedTimestamps
438
+ );
417
439
  const series = /* @__PURE__ */ new Map();
418
440
  for (const key of groups) {
419
441
  const byTimestamp = valueByGroup.get(key);
@@ -527,14 +549,27 @@ function formatMetadataHeader(opts) {
527
549
  value: `${opts.metric} ${opts.aggregation}`
528
550
  },
529
551
  {
552
+ // Period bounds are always UTC; annotate them so the boundary is
553
+ // unambiguous when the Interval below reports a different
554
+ // --bucket-timezone.
530
555
  key: "Period",
531
- value: `${formatPeriodBound(opts.periodStart)} to ${formatPeriodBound(opts.periodEnd)}`
556
+ value: `${formatPeriodBound(opts.periodStart)} to ${formatPeriodBound(opts.periodEnd)} (UTC)`
532
557
  },
533
558
  {
559
+ // Period bounds are always UTC; the timezone only controls calendar
560
+ // bucket alignment, which is a no-op below 1d granularity. Annotate the
561
+ // interval (instead of a standalone Timezone row) to avoid implying the
562
+ // period itself is zone-local.
534
563
  key: "Interval",
535
- value: formatGranularity(opts.granularity)
564
+ value: "days" in opts.granularity ? `${formatGranularity(opts.granularity)} (${opts.bucketTimezone ?? "UTC"})` : formatGranularity(opts.granularity)
536
565
  }
537
566
  ];
567
+ if (typeof opts.periodUnique === "number") {
568
+ rows.push({
569
+ key: "Unique (period)",
570
+ value: formatCount(opts.periodUnique)
571
+ });
572
+ }
538
573
  if (opts.filter) {
539
574
  rows.push({ key: "Filter", value: opts.filter });
540
575
  }
@@ -630,6 +665,9 @@ function formatSparklineSection(groupRows, sparklines, groupByFields) {
630
665
  return lines.join("\n");
631
666
  }
632
667
  function getEffectiveDisplay(baseUnit, aggregation) {
668
+ if (isAggregationWithDimension(aggregation)) {
669
+ return { displayUnit: void 0, measureType: "count" };
670
+ }
633
671
  switch (aggregation) {
634
672
  case "percent":
635
673
  return { displayUnit: "%", measureType: "ratio" };
@@ -640,8 +678,6 @@ function getEffectiveDisplay(baseUnit, aggregation) {
640
678
  measureType: getMeasureType(baseUnit ?? "ratio")
641
679
  };
642
680
  }
643
- case "unique":
644
- return { displayUnit: void 0, measureType: "count" };
645
681
  default:
646
682
  return {
647
683
  displayUnit: baseUnit,
@@ -664,12 +700,21 @@ function formatText(response, opts) {
664
700
  opts.periodEnd,
665
701
  granularityMs
666
702
  );
703
+ let periodUnique;
704
+ if (isAggregationWithDimension(opts.aggregation) && opts.groupBy.length === 0) {
705
+ const summaryValue = toNumericValue(response.summary?.[0]?.[rollupColumn]);
706
+ if (summaryValue !== null) {
707
+ periodUnique = summaryValue;
708
+ }
709
+ }
667
710
  const metadata = formatMetadataHeader({
668
711
  metric: opts.metric,
669
712
  aggregation: opts.aggregation,
670
713
  periodStart: opts.periodStart,
671
714
  periodEnd: opts.periodEnd,
672
715
  granularity: opts.granularity,
716
+ periodUnique,
717
+ bucketTimezone: opts.bucketTimezone,
673
718
  filter: opts.filter,
674
719
  scope: opts.scope,
675
720
  projectName: opts.projectName,
@@ -727,6 +772,16 @@ function handleValidationError(result, jsonOutput, client) {
727
772
  }
728
773
  return 1;
729
774
  }
775
+ function combineFilters(filters) {
776
+ const nonEmptyFilters = filters?.filter((filter) => filter.length > 0) ?? [];
777
+ if (nonEmptyFilters.length === 0) {
778
+ return void 0;
779
+ }
780
+ if (nonEmptyFilters.length === 1) {
781
+ return nonEmptyFilters[0];
782
+ }
783
+ return nonEmptyFilters.map((filter) => `(${filter})`).join(" and ");
784
+ }
730
785
  async function resolveQueryScope(client, opts) {
731
786
  if (opts.project || opts.all) {
732
787
  const { team } = await getScope(client);
@@ -813,20 +868,23 @@ async function query(client, telemetry) {
813
868
  const aggregationFlag = flags["--aggregation"];
814
869
  const groupBy = flags["--group-by"] ?? [];
815
870
  const limit = flags["--limit"];
816
- const filter = flags["--filter"];
871
+ const filters = flags["--filter"];
872
+ const filter = combineFilters(filters);
817
873
  const since = flags["--since"];
818
874
  const until = flags["--until"];
819
875
  const granularity = flags["--granularity"];
876
+ const bucketTimezone = flags["--bucket-timezone"]?.trim();
820
877
  const project = flags["--project"];
821
878
  const all = flags["--all"];
822
879
  telemetry.trackCliArgumentMetricId(metricFlag);
823
880
  telemetry.trackCliOptionAggregation(aggregationFlag);
824
881
  telemetry.trackCliOptionGroupBy(groupBy.length > 0 ? groupBy : void 0);
825
882
  telemetry.trackCliOptionLimit(limit);
826
- telemetry.trackCliOptionFilter(filter);
883
+ telemetry.trackCliOptionFilter(filters);
827
884
  telemetry.trackCliOptionSince(since);
828
885
  telemetry.trackCliOptionUntil(until);
829
886
  telemetry.trackCliOptionGranularity(granularity);
887
+ telemetry.trackCliOptionBucketTimezone(bucketTimezone);
830
888
  telemetry.trackCliOptionProject(project);
831
889
  telemetry.trackCliFlagAll(all);
832
890
  telemetry.trackCliOptionFormat(flags["--format"]);
@@ -877,18 +935,14 @@ async function query(client, telemetry) {
877
935
  if (!jsonOutput && granResult.adjusted && granResult.notice) {
878
936
  output_manager_default.log(`Notice: ${granResult.notice}`);
879
937
  }
880
- const rounded = roundTimeBoundaries(
881
- startTime,
882
- endTime,
883
- toGranularityMsFromDuration(granResult.duration)
884
- );
885
938
  const body = {
886
939
  scope,
887
940
  metric,
888
941
  aggregation,
889
- startTime: rounded.start.toISOString(),
890
- endTime: rounded.end.toISOString(),
942
+ startTime: startTime.toISOString(),
943
+ endTime: endTime.toISOString(),
891
944
  granularity: granResult.duration,
945
+ ...bucketTimezone ? { bucketTimezone } : {},
892
946
  ...groupBy.length > 0 ? { groupBy } : {},
893
947
  ...filter ? { filter } : {},
894
948
  limit: limit ?? 10
@@ -932,9 +986,10 @@ async function query(client, telemetry) {
932
986
  aggregation,
933
987
  groupBy,
934
988
  filter,
935
- startTime: rounded.start.toISOString(),
936
- endTime: rounded.end.toISOString(),
937
- granularity: granResult.duration
989
+ startTime: startTime.toISOString(),
990
+ endTime: endTime.toISOString(),
991
+ granularity: granResult.duration,
992
+ ...bucketTimezone ? { bucketTimezone } : {}
938
993
  },
939
994
  response
940
995
  )
@@ -950,9 +1005,10 @@ async function query(client, telemetry) {
950
1005
  scope,
951
1006
  projectName,
952
1007
  teamName,
953
- periodStart: rounded.start.toISOString(),
954
- periodEnd: rounded.end.toISOString(),
955
- granularity: granResult.duration
1008
+ periodStart: startTime.toISOString(),
1009
+ periodEnd: endTime.toISOString(),
1010
+ granularity: granResult.duration,
1011
+ bucketTimezone
956
1012
  })
957
1013
  );
958
1014
  }
@@ -16,21 +16,23 @@ import {
16
16
  resolveRoute,
17
17
  shellQuoteRouteIdentifierForSuggestion,
18
18
  withGlobalFlags
19
- } from "./chunk-G7QWUIGS.js";
19
+ } from "./chunk-J7BMPRCU.js";
20
20
  import {
21
21
  reorderSubcommand
22
- } from "./chunk-WFRHKZFI.js";
22
+ } from "./chunk-IB56QKCM.js";
23
+ import {
24
+ stamp_default
25
+ } from "./chunk-64IF634X.js";
26
+ import "./chunk-VXYGCOKL.js";
23
27
  import "./chunk-LJ5WXXG6.js";
24
- import "./chunk-5UCWXYNH.js";
25
- import "./chunk-J5273CSE.js";
28
+ import "./chunk-LQR3CHMH.js";
29
+ import "./chunk-HIYWSGI7.js";
26
30
  import {
27
31
  outputAgentError
28
32
  } from "./chunk-NHGCQRK5.js";
29
- import {
30
- stamp_default
31
- } from "./chunk-CO5D46AG.js";
32
33
  import "./chunk-N2T234LO.js";
33
- import "./chunk-6IQZVQV6.js";
34
+ import "./chunk-GGP5R3FU.js";
35
+ import "./chunk-MYWLF3BZ.js";
34
36
  import {
35
37
  getCommandName
36
38
  } from "./chunk-LN6B7ZI3.js";
@@ -19,21 +19,23 @@ import {
19
19
  printDiffSummary,
20
20
  validateRequiredArgs,
21
21
  withGlobalFlags
22
- } from "./chunk-G7QWUIGS.js";
22
+ } from "./chunk-J7BMPRCU.js";
23
23
  import {
24
24
  restoreSubcommand
25
- } from "./chunk-WFRHKZFI.js";
25
+ } from "./chunk-IB56QKCM.js";
26
+ import {
27
+ stamp_default
28
+ } from "./chunk-64IF634X.js";
29
+ import "./chunk-VXYGCOKL.js";
26
30
  import "./chunk-LJ5WXXG6.js";
27
- import "./chunk-5UCWXYNH.js";
28
- import "./chunk-J5273CSE.js";
31
+ import "./chunk-LQR3CHMH.js";
32
+ import "./chunk-HIYWSGI7.js";
29
33
  import {
30
34
  outputAgentError
31
35
  } from "./chunk-NHGCQRK5.js";
32
- import {
33
- stamp_default
34
- } from "./chunk-CO5D46AG.js";
35
36
  import "./chunk-N2T234LO.js";
36
- import "./chunk-6IQZVQV6.js";
37
+ import "./chunk-GGP5R3FU.js";
38
+ import "./chunk-MYWLF3BZ.js";
37
39
  import {
38
40
  getCommandName
39
41
  } from "./chunk-LN6B7ZI3.js";