@alwaysmeticulous/cli 2.308.0 → 2.311.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 (95) hide show
  1. package/dist/command-utils/__tests__/parse-rewrites.spec.d.ts +2 -0
  2. package/dist/command-utils/__tests__/parse-rewrites.spec.d.ts.map +1 -0
  3. package/dist/command-utils/__tests__/parse-rewrites.spec.js +31 -0
  4. package/dist/command-utils/__tests__/parse-rewrites.spec.js.map +1 -0
  5. package/dist/command-utils/__tests__/warn-regex-rewrites.spec.d.ts +2 -0
  6. package/dist/command-utils/__tests__/warn-regex-rewrites.spec.d.ts.map +1 -0
  7. package/dist/command-utils/__tests__/warn-regex-rewrites.spec.js +140 -0
  8. package/dist/command-utils/__tests__/warn-regex-rewrites.spec.js.map +1 -0
  9. package/dist/command-utils/parse-rewrites.d.ts.map +1 -1
  10. package/dist/command-utils/parse-rewrites.js +6 -3
  11. package/dist/command-utils/parse-rewrites.js.map +1 -1
  12. package/dist/command-utils/warn-regex-rewrites.d.ts +3 -0
  13. package/dist/command-utils/warn-regex-rewrites.d.ts.map +1 -0
  14. package/dist/command-utils/warn-regex-rewrites.js +50 -0
  15. package/dist/command-utils/warn-regex-rewrites.js.map +1 -0
  16. package/dist/commands/agent/index.d.ts.map +1 -1
  17. package/dist/commands/agent/index.js +5 -3
  18. package/dist/commands/agent/index.js.map +1 -1
  19. package/dist/commands/agent/js-coverage-diff.command.d.ts +0 -1
  20. package/dist/commands/agent/js-coverage-diff.command.d.ts.map +1 -1
  21. package/dist/commands/agent/js-coverage-diff.command.js +9 -16
  22. package/dist/commands/agent/js-coverage-diff.command.js.map +1 -1
  23. package/dist/commands/agent/js-coverage.command.js +34 -34
  24. package/dist/commands/agent/js-coverage.command.js.map +1 -1
  25. package/dist/commands/agent/screenshot-dom-diff.command.d.ts +0 -1
  26. package/dist/commands/agent/screenshot-dom-diff.command.d.ts.map +1 -1
  27. package/dist/commands/agent/screenshot-dom-diff.command.js +12 -26
  28. package/dist/commands/agent/screenshot-dom-diff.command.js.map +1 -1
  29. package/dist/commands/agent/screenshot-image-files.command.d.ts.map +1 -1
  30. package/dist/commands/agent/screenshot-image-files.command.js +8 -11
  31. package/dist/commands/agent/screenshot-image-files.command.js.map +1 -1
  32. package/dist/commands/agent/screenshot-image.command.d.ts.map +1 -1
  33. package/dist/commands/agent/screenshot-image.command.js +10 -13
  34. package/dist/commands/agent/screenshot-image.command.js.map +1 -1
  35. package/dist/commands/agent/sessions.command.d.ts +20 -0
  36. package/dist/commands/agent/sessions.command.d.ts.map +1 -0
  37. package/dist/commands/agent/sessions.command.js +173 -0
  38. package/dist/commands/agent/sessions.command.js.map +1 -0
  39. package/dist/commands/agent/sessions.command.spec.d.ts +2 -0
  40. package/dist/commands/agent/sessions.command.spec.d.ts.map +1 -0
  41. package/dist/commands/agent/sessions.command.spec.js +215 -0
  42. package/dist/commands/agent/sessions.command.spec.js.map +1 -0
  43. package/dist/commands/agent/test-run-diffs.command.d.ts.map +1 -1
  44. package/dist/commands/agent/test-run-diffs.command.js +27 -28
  45. package/dist/commands/agent/test-run-diffs.command.js.map +1 -1
  46. package/dist/commands/agent/test-run-diffs.command.spec.js +8 -8
  47. package/dist/commands/agent/test-run-diffs.command.spec.js.map +1 -1
  48. package/dist/commands/agent/test-run-diffs.utils.d.ts +5 -10
  49. package/dist/commands/agent/test-run-diffs.utils.d.ts.map +1 -1
  50. package/dist/commands/agent/test-run-diffs.utils.js +31 -45
  51. package/dist/commands/agent/test-run-diffs.utils.js.map +1 -1
  52. package/dist/commands/agent/test-run-diffs.utils.spec.js +37 -100
  53. package/dist/commands/agent/test-run-diffs.utils.spec.js.map +1 -1
  54. package/dist/commands/agent/test-run-for-commit.command.js +9 -9
  55. package/dist/commands/agent/test-run-for-commit.command.js.map +1 -1
  56. package/dist/commands/agent/timeline.command.d.ts.map +1 -1
  57. package/dist/commands/agent/timeline.command.js +8 -12
  58. package/dist/commands/agent/timeline.command.js.map +1 -1
  59. package/dist/commands/agent/timeline.command.spec.js +9 -9
  60. package/dist/commands/agent/timeline.command.spec.js.map +1 -1
  61. package/dist/commands/agent/trigger-test-run.command.d.ts +20 -0
  62. package/dist/commands/agent/trigger-test-run.command.d.ts.map +1 -1
  63. package/dist/commands/agent/trigger-test-run.command.js +55 -6
  64. package/dist/commands/agent/trigger-test-run.command.js.map +1 -1
  65. package/dist/commands/agent/trigger-test-run.command.spec.js +57 -2
  66. package/dist/commands/agent/trigger-test-run.command.spec.js.map +1 -1
  67. package/dist/commands/auth/__tests__/login.command.spec.js +29 -5
  68. package/dist/commands/auth/__tests__/login.command.spec.js.map +1 -1
  69. package/dist/commands/auth/login.command.d.ts +1 -0
  70. package/dist/commands/auth/login.command.d.ts.map +1 -1
  71. package/dist/commands/auth/login.command.js +31 -18
  72. package/dist/commands/auth/login.command.js.map +1 -1
  73. package/dist/commands/ci/__tests__/session-filter.utils.spec.js +10 -8
  74. package/dist/commands/ci/__tests__/session-filter.utils.spec.js.map +1 -1
  75. package/dist/commands/ci/generate-sessions.command.d.ts +16 -0
  76. package/dist/commands/ci/generate-sessions.command.d.ts.map +1 -0
  77. package/dist/commands/ci/generate-sessions.command.js +136 -0
  78. package/dist/commands/ci/generate-sessions.command.js.map +1 -0
  79. package/dist/commands/ci/index.d.ts.map +1 -1
  80. package/dist/commands/ci/index.js +4 -2
  81. package/dist/commands/ci/index.js.map +1 -1
  82. package/dist/commands/ci/run-with-uploaded-asset-chunks.command.d.ts.map +1 -1
  83. package/dist/commands/ci/run-with-uploaded-asset-chunks.command.js +27 -22
  84. package/dist/commands/ci/run-with-uploaded-asset-chunks.command.js.map +1 -1
  85. package/dist/commands/ci/run-with-uploaded-asset-chunks.command.spec.d.ts +2 -0
  86. package/dist/commands/ci/run-with-uploaded-asset-chunks.command.spec.d.ts.map +1 -0
  87. package/dist/commands/ci/run-with-uploaded-asset-chunks.command.spec.js +37 -0
  88. package/dist/commands/ci/run-with-uploaded-asset-chunks.command.spec.js.map +1 -0
  89. package/dist/commands/ci/run-with-uploaded-asset-chunks.utils.d.ts +8 -0
  90. package/dist/commands/ci/run-with-uploaded-asset-chunks.utils.d.ts.map +1 -0
  91. package/dist/commands/ci/run-with-uploaded-asset-chunks.utils.js +57 -0
  92. package/dist/commands/ci/run-with-uploaded-asset-chunks.utils.js.map +1 -0
  93. package/dist/commands/ci/session-filter.utils.d.ts +3 -3
  94. package/dist/commands/ci/session-filter.utils.js +3 -3
  95. package/package.json +14 -14
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=parse-rewrites.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-rewrites.spec.d.ts","sourceRoot":"","sources":["../../../src/command-utils/__tests__/parse-rewrites.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="740dcfe8-c38e-5791-9b37-83659568749f")}catch(e){}}();
3
+
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ const vitest_1 = require("vitest");
6
+ const cli_user_error_1 = require("../../utils/cli-user-error");
7
+ const parse_rewrites_1 = require("../parse-rewrites");
8
+ vitest_1.vi.mock("@alwaysmeticulous/common", () => ({
9
+ initLogger: () => ({ warn: vitest_1.vi.fn() }),
10
+ }));
11
+ (0, vitest_1.describe)("parseRewrites", () => {
12
+ (0, vitest_1.test)("parses valid rewrites", () => {
13
+ const result = (0, parse_rewrites_1.parseRewrites)('[{"source": "**", "destination": "/index.html"}]');
14
+ (0, vitest_1.expect)(result).toEqual([{ source: "**", destination: "/index.html" }]);
15
+ });
16
+ (0, vitest_1.test)("returns empty array for default input", () => {
17
+ (0, vitest_1.expect)((0, parse_rewrites_1.parseRewrites)("[]")).toEqual([]);
18
+ (0, vitest_1.expect)((0, parse_rewrites_1.parseRewrites)(undefined)).toEqual([]);
19
+ });
20
+ (0, vitest_1.test)("throws on invalid JSON", () => {
21
+ (0, vitest_1.expect)(() => (0, parse_rewrites_1.parseRewrites)("not json")).toThrow(cli_user_error_1.CliUserError);
22
+ });
23
+ (0, vitest_1.test)("throws on non-array JSON", () => {
24
+ (0, vitest_1.expect)(() => (0, parse_rewrites_1.parseRewrites)('{"source": "x"}')).toThrow(cli_user_error_1.CliUserError);
25
+ });
26
+ (0, vitest_1.test)("throws when elements lack required properties", () => {
27
+ (0, vitest_1.expect)(() => (0, parse_rewrites_1.parseRewrites)('[{"source": "x"}]')).toThrow(cli_user_error_1.CliUserError);
28
+ });
29
+ });
30
+ //# sourceMappingURL=parse-rewrites.spec.js.map
31
+ //# debugId=740dcfe8-c38e-5791-9b37-83659568749f
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-rewrites.spec.js","sources":["../../../src/command-utils/__tests__/parse-rewrites.spec.ts"],"sourceRoot":"","names":[],"mappings":";;;;AAAA,mCAAoD;AACpD,+DAA0D;AAC1D,sDAAkD;AAElD,WAAE,CAAC,IAAI,CAAC,0BAA0B,EAAE,GAAG,EAAE,CAAC,CAAC;IACzC,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,WAAE,CAAC,EAAE,EAAE,EAAE,CAAC;CACtC,CAAC,CAAC,CAAC;AAEJ,IAAA,iBAAQ,EAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,IAAA,aAAI,EAAC,uBAAuB,EAAE,GAAG,EAAE;QACjC,MAAM,MAAM,GAAG,IAAA,8BAAa,EAC1B,kDAAkD,CACnD,CAAC;QACF,IAAA,eAAM,EAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC;IACzE,CAAC,CAAC,CAAC;IAEH,IAAA,aAAI,EAAC,uCAAuC,EAAE,GAAG,EAAE;QACjD,IAAA,eAAM,EAAC,IAAA,8BAAa,EAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACxC,IAAA,eAAM,EAAC,IAAA,8BAAa,EAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,IAAA,aAAI,EAAC,wBAAwB,EAAE,GAAG,EAAE;QAClC,IAAA,eAAM,EAAC,GAAG,EAAE,CAAC,IAAA,8BAAa,EAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,6BAAY,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;IAEH,IAAA,aAAI,EAAC,0BAA0B,EAAE,GAAG,EAAE;QACpC,IAAA,eAAM,EAAC,GAAG,EAAE,CAAC,IAAA,8BAAa,EAAC,iBAAiB,CAAC,CAAC,CAAC,OAAO,CAAC,6BAAY,CAAC,CAAC;IACvE,CAAC,CAAC,CAAC;IAEH,IAAA,aAAI,EAAC,+CAA+C,EAAE,GAAG,EAAE;QACzD,IAAA,eAAM,EAAC,GAAG,EAAE,CAAC,IAAA,8BAAa,EAAC,mBAAmB,CAAC,CAAC,CAAC,OAAO,CAAC,6BAAY,CAAC,CAAC;IACzE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","debugId":"740dcfe8-c38e-5791-9b37-83659568749f"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=warn-regex-rewrites.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"warn-regex-rewrites.spec.d.ts","sourceRoot":"","sources":["../../../src/command-utils/__tests__/warn-regex-rewrites.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="dad0a8ed-7870-540f-b8b9-8c1cd243884d")}catch(e){}}();
3
+
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
16
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
17
+ }) : function(o, v) {
18
+ o["default"] = v;
19
+ });
20
+ var __importStar = (this && this.__importStar) || (function () {
21
+ var ownKeys = function(o) {
22
+ ownKeys = Object.getOwnPropertyNames || function (o) {
23
+ var ar = [];
24
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
25
+ return ar;
26
+ };
27
+ return ownKeys(o);
28
+ };
29
+ return function (mod) {
30
+ if (mod && mod.__esModule) return mod;
31
+ var result = {};
32
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
33
+ __setModuleDefault(result, mod);
34
+ return result;
35
+ };
36
+ })();
37
+ Object.defineProperty(exports, "__esModule", { value: true });
38
+ const vitest_1 = require("vitest");
39
+ const warn_regex_rewrites_1 = require("../warn-regex-rewrites");
40
+ vitest_1.vi.mock("@alwaysmeticulous/common", () => {
41
+ const warn = vitest_1.vi.fn();
42
+ return {
43
+ initLogger: () => ({ warn }),
44
+ __mockWarn: warn,
45
+ };
46
+ });
47
+ const getMockWarn = async () => {
48
+ const mod = await Promise.resolve().then(() => __importStar(require("@alwaysmeticulous/common")));
49
+ return mod
50
+ .__mockWarn;
51
+ };
52
+ (0, vitest_1.describe)("warnIfRewriteSourcesLookLikeRegexes", () => {
53
+ (0, vitest_1.test)("warns on capture group with quantifier, e.g. (.*)", async () => {
54
+ const warn = await getMockWarn();
55
+ warn.mockClear();
56
+ (0, warn_regex_rewrites_1.warnIfRewriteSourcesLookLikeRegexes)([
57
+ { source: "/a/b/(.*)", destination: "/index.html" },
58
+ ]);
59
+ (0, vitest_1.expect)(warn).toHaveBeenCalledWith(vitest_1.expect.stringContaining("look like regular expressions"));
60
+ (0, vitest_1.expect)(warn).toHaveBeenCalledWith(vitest_1.expect.stringContaining("/a/b/(.*)"));
61
+ });
62
+ (0, vitest_1.test)("warns on (.+) pattern", async () => {
63
+ const warn = await getMockWarn();
64
+ warn.mockClear();
65
+ (0, warn_regex_rewrites_1.warnIfRewriteSourcesLookLikeRegexes)([
66
+ { source: "/path/(.+)", destination: "/index.html" },
67
+ ]);
68
+ (0, vitest_1.expect)(warn).toHaveBeenCalledWith(vitest_1.expect.stringContaining("/path/(.+)"));
69
+ });
70
+ (0, vitest_1.test)("warns on non-capturing group (?:...)", async () => {
71
+ const warn = await getMockWarn();
72
+ warn.mockClear();
73
+ (0, warn_regex_rewrites_1.warnIfRewriteSourcesLookLikeRegexes)([
74
+ { source: "/(?:foo|bar)/page", destination: "/index.html" },
75
+ ]);
76
+ (0, vitest_1.expect)(warn).toHaveBeenCalledWith(vitest_1.expect.stringContaining("(?:foo|bar)"));
77
+ });
78
+ (0, vitest_1.test)("warns on backslash escape", async () => {
79
+ const warn = await getMockWarn();
80
+ warn.mockClear();
81
+ (0, warn_regex_rewrites_1.warnIfRewriteSourcesLookLikeRegexes)([
82
+ { source: "/user/\\d+", destination: "/index.html" },
83
+ ]);
84
+ (0, vitest_1.expect)(warn).toHaveBeenCalledWith(vitest_1.expect.stringContaining("backslash escape"));
85
+ });
86
+ (0, vitest_1.test)("warns on .* after a slash", async () => {
87
+ const warn = await getMockWarn();
88
+ warn.mockClear();
89
+ (0, warn_regex_rewrites_1.warnIfRewriteSourcesLookLikeRegexes)([
90
+ { source: "/api/.*", destination: "/index.html" },
91
+ ]);
92
+ (0, vitest_1.expect)(warn).toHaveBeenCalledWith(vitest_1.expect.stringContaining("regex wildcard .*"));
93
+ });
94
+ (0, vitest_1.test)("warns on .* at the start of the string", async () => {
95
+ const warn = await getMockWarn();
96
+ warn.mockClear();
97
+ (0, warn_regex_rewrites_1.warnIfRewriteSourcesLookLikeRegexes)([
98
+ { source: ".*", destination: "/index.html" },
99
+ ]);
100
+ (0, vitest_1.expect)(warn).toHaveBeenCalledWith(vitest_1.expect.stringContaining("regex wildcard .*"));
101
+ });
102
+ (0, vitest_1.test)("warns on .+ pattern", async () => {
103
+ const warn = await getMockWarn();
104
+ warn.mockClear();
105
+ (0, warn_regex_rewrites_1.warnIfRewriteSourcesLookLikeRegexes)([
106
+ { source: "/api/.+", destination: "/index.html" },
107
+ ]);
108
+ (0, vitest_1.expect)(warn).toHaveBeenCalledWith(vitest_1.expect.stringContaining("regex quantifier .+"));
109
+ });
110
+ (0, vitest_1.test)("warns on $ end anchor", async () => {
111
+ const warn = await getMockWarn();
112
+ warn.mockClear();
113
+ (0, warn_regex_rewrites_1.warnIfRewriteSourcesLookLikeRegexes)([
114
+ { source: "/path$", destination: "/index.html" },
115
+ ]);
116
+ (0, vitest_1.expect)(warn).toHaveBeenCalledWith(vitest_1.expect.stringContaining("end-of-string anchor"));
117
+ });
118
+ (0, vitest_1.test)("warns on ^ start anchor", async () => {
119
+ const warn = await getMockWarn();
120
+ warn.mockClear();
121
+ (0, warn_regex_rewrites_1.warnIfRewriteSourcesLookLikeRegexes)([
122
+ { source: "^/path", destination: "/index.html" },
123
+ ]);
124
+ (0, vitest_1.expect)(warn).toHaveBeenCalledWith(vitest_1.expect.stringContaining("start-of-string anchor"));
125
+ });
126
+ (0, vitest_1.test)("does not warn on valid glob patterns", async () => {
127
+ const warn = await getMockWarn();
128
+ warn.mockClear();
129
+ (0, warn_regex_rewrites_1.warnIfRewriteSourcesLookLikeRegexes)([
130
+ { source: "**", destination: "/index.html" },
131
+ { source: "/app/**", destination: "/app/index.html" },
132
+ { source: "/files/*.html", destination: "/index.html" },
133
+ { source: "file.*", destination: "/index.html" },
134
+ { source: "*.*", destination: "/index.html" },
135
+ ]);
136
+ (0, vitest_1.expect)(warn).not.toHaveBeenCalled();
137
+ });
138
+ });
139
+ //# sourceMappingURL=warn-regex-rewrites.spec.js.map
140
+ //# debugId=dad0a8ed-7870-540f-b8b9-8c1cd243884d
@@ -0,0 +1 @@
1
+ {"version":3,"file":"warn-regex-rewrites.spec.js","sources":["../../../src/command-utils/__tests__/warn-regex-rewrites.spec.ts"],"sourceRoot":"","names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAoD;AACpD,gEAA6E;AAE7E,WAAE,CAAC,IAAI,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACvC,MAAM,IAAI,GAAG,WAAE,CAAC,EAAE,EAAE,CAAC;IACrB,OAAO;QACL,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC;QAC5B,UAAU,EAAE,IAAI;KACjB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG,KAAK,IAAI,EAAE;IAC7B,MAAM,GAAG,GAAG,wDAAa,0BAA0B,GAAC,CAAC;IACrD,OAAQ,GAA2D;SAChE,UAAU,CAAC;AAChB,CAAC,CAAC;AAEF,IAAA,iBAAQ,EAAC,qCAAqC,EAAE,GAAG,EAAE;IACnD,IAAA,aAAI,EAAC,mDAAmD,EAAE,KAAK,IAAI,EAAE;QACnE,MAAM,IAAI,GAAG,MAAM,WAAW,EAAE,CAAC;QACjC,IAAI,CAAC,SAAS,EAAE,CAAC;QAEjB,IAAA,yDAAmC,EAAC;YAClC,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE;SACpD,CAAC,CAAC;QAEH,IAAA,eA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EAAE;YAChD,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE;SAC9C,CAAC,CAAC;QAEH,IAAA,eAAM,EAAC,IAAI,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","debugId":"dad0a8ed-7870-540f-b8b9-8c1cd243884d"}
@@ -1 +1 @@
1
- {"version":3,"file":"parse-rewrites.d.ts","sourceRoot":"","sources":["../../src/command-utils/parse-rewrites.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAGjE;;;;GAIG;AACH,eAAO,MAAM,aAAa,oBACP,MAAM,KACtB,mBAAmB,CAAC,UAAU,CAkChC,CAAC"}
1
+ {"version":3,"file":"parse-rewrites.d.ts","sourceRoot":"","sources":["../../src/command-utils/parse-rewrites.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAIjE;;;;GAIG;AACH,eAAO,MAAM,aAAa,oBACP,MAAM,KACtB,mBAAmB,CAAC,UAAU,CAoChC,CAAC"}
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4905220c-3b2e-51ec-9202-bd724dda1214")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c5c0ab1d-6101-58d7-8497-bc76e2f69fd0")}catch(e){}}();
3
3
 
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.parseRewrites = void 0;
6
6
  const cli_user_error_1 = require("../utils/cli-user-error");
7
+ const warn_regex_rewrites_1 = require("./warn-regex-rewrites");
7
8
  /**
8
9
  * Parses the `--rewrites` CLI flag's JSON string into the structured array
9
10
  * `AssetUploadMetadata["rewrites"]` expects. Throws a `CliUserError` on
@@ -30,8 +31,10 @@ const parseRewrites = (rewritesString) => {
30
31
  "with 'source' and 'destination' string properties. See " +
31
32
  "https://github.com/vercel/serve-handler?tab=readme-ov-file#rewrites-array for more details.");
32
33
  }
33
- return parsedRewrites;
34
+ const rewrites = parsedRewrites;
35
+ (0, warn_regex_rewrites_1.warnIfRewriteSourcesLookLikeRegexes)(rewrites);
36
+ return rewrites;
34
37
  };
35
38
  exports.parseRewrites = parseRewrites;
36
39
  //# sourceMappingURL=parse-rewrites.js.map
37
- //# debugId=4905220c-3b2e-51ec-9202-bd724dda1214
40
+ //# debugId=c5c0ab1d-6101-58d7-8497-bc76e2f69fd0
@@ -1 +1 @@
1
- {"version":3,"file":"parse-rewrites.js","sources":["../../src/command-utils/parse-rewrites.ts"],"sourceRoot":"","names":[],"mappings":";;;;;AACA,4DAAuD;AAEvD;;;;GAIG;AACI,MAAM,aAAa,GAAG,CAC3B,cAAuB,EACU,EAAE;IACnC,IAAI,cAAuB,CAAC;IAC5B,IAAI,CAAC;QACH,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC;IACtD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,6BAAY,CACpB,sEAAsE;YACpE,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CACtD,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC;QACnC,MAAM,IAAI,6BAAY,CACpB,8DAA8D,CAC/D,CAAC;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,cAAc,CAAC,KAAK,CAClC,CAAC,IAAI,EAAE,EAAE,CACP,OAAO,IAAI,KAAK,QAAQ;QACxB,IAAI,KAAK,IAAI;QACb,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ;QAC/B,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ,CACvC,CAAC;IAEF,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,6BAAY,CACpB,uEAAuE;YACrE,yDAAyD;YACzD,6FAA6F,CAChG,CAAC;IACJ,CAAC;IAED,OAAO,cAAiD,CAAC;AAC3D,CAAC,CAAC;AApCW,QAAA,aAAa,iBAoCxB","debugId":"4905220c-3b2e-51ec-9202-bd724dda1214"}
1
+ {"version":3,"file":"parse-rewrites.js","sources":["../../src/command-utils/parse-rewrites.ts"],"sourceRoot":"","names":[],"mappings":";;;;;AACA,4DAAuD;AACvD,+DAA4E;AAE5E;;;;GAIG;AACI,MAAM,aAAa,GAAG,CAC3B,cAAuB,EACU,EAAE;IACnC,IAAI,cAAuB,CAAC;IAC5B,IAAI,CAAC;QACH,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC;IACtD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,6BAAY,CACpB,sEAAsE;YACpE,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CACtD,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC;QACnC,MAAM,IAAI,6BAAY,CACpB,8DAA8D,CAC/D,CAAC;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,cAAc,CAAC,KAAK,CAClC,CAAC,IAAI,EAAE,EAAE,CACP,OAAO,IAAI,KAAK,QAAQ;QACxB,IAAI,KAAK,IAAI;QACb,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ;QAC/B,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ,CACvC,CAAC;IAEF,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,6BAAY,CACpB,uEAAuE;YACrE,yDAAyD;YACzD,6FAA6F,CAChG,CAAC;IACJ,CAAC;IAED,MAAM,QAAQ,GAAG,cAAiD,CAAC;IACnE,IAAA,yDAAmC,EAAC,QAAQ,CAAC,CAAC;IAC9C,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAtCW,QAAA,aAAa,iBAsCxB","debugId":"c5c0ab1d-6101-58d7-8497-bc76e2f69fd0"}
@@ -0,0 +1,3 @@
1
+ import type { AssetUploadMetadata } from "@alwaysmeticulous/api";
2
+ export declare const warnIfRewriteSourcesLookLikeRegexes: (rewrites: AssetUploadMetadata["rewrites"]) => void;
3
+ //# sourceMappingURL=warn-regex-rewrites.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"warn-regex-rewrites.d.ts","sourceRoot":"","sources":["../../src/command-utils/warn-regex-rewrites.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AA4BjE,eAAO,MAAM,mCAAmC,aACpC,mBAAmB,CAAC,UAAU,CAAC,KACxC,IAwBF,CAAC"}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1dd7ba4a-98c1-599f-9aee-ef50d2bbcedc")}catch(e){}}();
3
+
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.warnIfRewriteSourcesLookLikeRegexes = void 0;
6
+ const common_1 = require("@alwaysmeticulous/common");
7
+ const REGEX_INDICATORS = [
8
+ {
9
+ pattern: /\(\.[*+?]/,
10
+ label: "capture group with quantifier, e.g. (.*)",
11
+ },
12
+ {
13
+ pattern: /\(\?[:=!<]/,
14
+ label: "non-capturing group or lookahead/lookbehind",
15
+ },
16
+ { pattern: /\\/, label: "backslash escape" },
17
+ { pattern: /(^|\/)\.\*/, label: "regex wildcard .*" },
18
+ { pattern: /(^|\/)\.\+/, label: "regex quantifier .+" },
19
+ { pattern: /\$$/, label: "end-of-string anchor $" },
20
+ { pattern: /^\^/, label: "start-of-string anchor ^" },
21
+ ];
22
+ const looksLikeRegex = (source) => {
23
+ for (const { pattern, label } of REGEX_INDICATORS) {
24
+ if (pattern.test(source)) {
25
+ return label;
26
+ }
27
+ }
28
+ return null;
29
+ };
30
+ const warnIfRewriteSourcesLookLikeRegexes = (rewrites) => {
31
+ const suspects = rewrites
32
+ .map((rule) => ({
33
+ source: rule.source,
34
+ reason: looksLikeRegex(rule.source),
35
+ }))
36
+ .filter((entry) => entry.reason != null);
37
+ if (suspects.length === 0) {
38
+ return;
39
+ }
40
+ const logger = (0, common_1.initLogger)();
41
+ logger.warn("One or more --rewrites source patterns look like regular expressions, " +
42
+ "but rewrite sources use glob syntax (see https://github.com/vercel/serve-handler?tab=readme-ov-file#rewrites-array). " +
43
+ "Regex patterns will not match as expected.");
44
+ for (const { source, reason } of suspects) {
45
+ logger.warn(` - "${source}" looks like a regex (${reason})`);
46
+ }
47
+ };
48
+ exports.warnIfRewriteSourcesLookLikeRegexes = warnIfRewriteSourcesLookLikeRegexes;
49
+ //# sourceMappingURL=warn-regex-rewrites.js.map
50
+ //# debugId=1dd7ba4a-98c1-599f-9aee-ef50d2bbcedc
@@ -0,0 +1 @@
1
+ {"version":3,"file":"warn-regex-rewrites.js","sources":["../../src/command-utils/warn-regex-rewrites.ts"],"sourceRoot":"","names":[],"mappings":";;;;;AACA,qDAAsD;AAEtD,MAAM,gBAAgB,GAAyC;IAC7D;QACE,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE,0CAA0C;KAClD;IACD;QACE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AE,IAAI,QAAQ,EAAE,CAAC;QAC1C,MAAM,CAAC,IAAI,CAAC,QAAQ,MAAM,yBAAyB,MAAM,GAAG,CAAC,CAAC;IAChE,CAAC;AACH,CAAC,CAAC;AA1BW,QAAA,mCAAmC,uCA0B9C","debugId":"1dd7ba4a-98c1-599f-9aee-ef50d2bbcedc"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/agent/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAY3C,eAAO,MAAM,YAAY,EAAE,aAmC1B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/agent/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAa3C,eAAO,MAAM,YAAY,EAAE,aAoC1B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d2bb5fd4-e527-5027-aab2-659b0c79dfdc")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c42f26a9-9daa-59be-b9ee-d0ffca4c42cc")}catch(e){}}();
3
3
 
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.agentCommand = void 0;
@@ -8,6 +8,7 @@ const js_coverage_command_1 = require("./js-coverage.command");
8
8
  const screenshot_dom_diff_command_1 = require("./screenshot-dom-diff.command");
9
9
  const screenshot_image_files_command_1 = require("./screenshot-image-files.command");
10
10
  const screenshot_image_command_1 = require("./screenshot-image.command");
11
+ const sessions_command_1 = require("./sessions.command");
11
12
  const test_run_diffs_command_1 = require("./test-run-diffs.command");
12
13
  const test_run_for_commit_command_1 = require("./test-run-for-commit.command");
13
14
  const timeline_command_1 = require("./timeline.command");
@@ -15,7 +16,7 @@ const trigger_test_run_command_1 = require("./trigger-test-run.command");
15
16
  const upload_build_command_1 = require("./upload-build.command");
16
17
  exports.agentCommand = {
17
18
  command: "agent",
18
- describe: "Agent commands for retrieving data from and interacting with Meticulous",
19
+ describe: "Agent commands for retrieving data from and interacting with Meticulous.",
19
20
  builder: (yargs) => yargs
20
21
  .command(test_run_for_commit_command_1.testRunForCommitCommand)
21
22
  .command(test_run_diffs_command_1.testRunDiffsCommand)
@@ -27,6 +28,7 @@ exports.agentCommand = {
27
28
  .command(js_coverage_diff_command_1.jsCoverageDiffCommand)
28
29
  .command(upload_build_command_1.uploadBuildCommand)
29
30
  .command(trigger_test_run_command_1.triggerTestRunCommand)
31
+ .command(sessions_command_1.sessionsCommand)
30
32
  .option("verbose", {
31
33
  boolean: true,
32
34
  default: false,
@@ -46,4 +48,4 @@ exports.agentCommand = {
46
48
  },
47
49
  };
48
50
  //# sourceMappingURL=index.js.map
49
- //# debugId=d2bb5fd4-e527-5027-aab2-659b0c79dfdc
51
+ //# debugId=c42f26a9-9daa-59be-b9ee-d0ffca4c42cc
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/commands/agent/index.ts"],"sourceRoot":"","names":[],"mappings":";;;;;AACA,yEAAmE;AACnE,+DAA0D;AAC1D,+EAA+D;AAC/D,qFAAqE;AACrE,yEAA8D;AAC9D,qEAA+D;AAC/D,+EAAwE;AACxE,yDAAyD;AACzD,yEAAmE;AACnE,iEAA4D;AAE/C,QAAA,YAAY,GAAkB;IACzC,OAAO,EAAE,OAAO;IAChB,QAAQ,EACN,yEAAyE;IAC3E,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,OAAO,CAAC,qDAAuB,CAAC;SAChC,OAAO,CAAC,4CAAmB,CAAC;SAC5B,OAAO,CAAC,kDAAiB,CAAC;SAC1B,OAAO,CAAC,2CAAgB,CAAC;SACzB,OAAO,CAAC,4CAAc,CAAC;SACvB,OAAO,CAAC,sCAAmB,CAAC;SAC5B,OAAO,CAAC,uCAAiB,CAAC;SAC1B,OAAO,CAAC,gDAAqB,CAAC;SAC9B,OAAO,CAAC,yCAAkB,CAAC;SAC3B,OAAO,CAAC,gDAAqB,CAAC;SAC9B,MAAM,CAAC,SAAS,EAAE;QACjB,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,KAAK;QACd,WAAW,EACT,4GAA4G;KAC/G,CAAC;SACD,MAAM,CAAC,MAAM,EAAE;QACd,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,KAAK;QACd,WAAW,EACT,oEAAoE;YACpE,gEAAgE;YAChE,0DAA0D;KAC7D,CAAC;SACD,aAAa,EAAE;SACf,IAAI,EAAE;IACX,OAAO,EAAE,GAAG,EAAE;QACZ,0BAA0B;IAC5B,CAAC;CACF,CAAC","debugId":"d2bb5fd4-e527-5027-aab2-659b0c79dfdc"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/commands/agent/index.ts"],"sourceRoot":"","names":[],"mappings":";;;;;AACA,yEAAmE;AACnE,+DAA0D;AAC1D,+EAA+D;AAC/D,qFAAqE;AACrE,yEAA8D;AAC9D,yDAAqD;AACrD,qEAA+D;AAC/D,+EAAwE;AACxE,yDAAyD;AACzD,yEAAmE;AACnE,iEAA4D;AAE/C,QAAA,YAAY,GAAkB;IACzC,OAAO,EAAE,OAAO;IAChB,QAAQ,EACN,0EAA0E;IAC5E,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,OAAO,CAAC,qDAAuB,CAAC;SAChC,OAAO,CAAC,4CAAmB,CAAC;SAC5B,OAAO,CAAC,kDAAiB,CAAC;SAC1B,OAAO,CAAC,2CAAgB,CAAC;SACzB,OAAO,CAAC,4CAAc,CAAC;SACvB,OAAO,CAAC,sCAAmB,CAAC;SAC5B,OAAO,CAAC,uCAAiB,CAAC;SAC1B,OAAO,CAAC,gDAAqB,CAAC;SAC9B,OAAO,CAAC,yCAAkB,CAAC;SAC3B,OAAO,CAAC,gDAAqB,CAAC;SAC9B,OAAO,CAAC,kCAAe,CAAC;SACxB,MAAM,CAAC,SAAS,EAAE;QACjB,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,KAAK;QACd,WAAW,EACT,4GAA4G;KAC/G,CAAC;SACD,MAAM,CAAC,MAAM,EAAE;QACd,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,KAAK;QACd,WAAW,EACT,oEAAoE;YACpE,gEAAgE;YAChE,0DAA0D;KAC7D,CAAC;SACD,aAAa,EAAE;SACf,IAAI,EAAE;IACX,OAAO,EAAE,GAAG,EAAE;QACZ,0BAA0B;IAC5B,CAAC;CACF,CAAC","debugId":"c42f26a9-9daa-59be-b9ee-d0ffca4c42cc"}
@@ -3,7 +3,6 @@ interface Options {
3
3
  apiToken?: string | null | undefined;
4
4
  replayDiffId: string;
5
5
  screenshotName: string | undefined;
6
- includeAllFiles: boolean;
7
6
  globFilter: string | undefined;
8
7
  json: boolean;
9
8
  }
@@ -1 +1 @@
1
- {"version":3,"file":"js-coverage-diff.command.d.ts","sourceRoot":"","sources":["../../../src/commands/agent/js-coverage-diff.command.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAK3C,UAAU,OAAO;IACf,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,IAAI,EAAE,OAAO,CAAC;CACf;AA6DD,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,OAAO,EAAE,OAAO,CA6BjE,CAAC"}
1
+ {"version":3,"file":"js-coverage-diff.command.d.ts","sourceRoot":"","sources":["../../../src/commands/agent/js-coverage-diff.command.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAK3C,UAAU,OAAO;IACf,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,IAAI,EAAE,OAAO,CAAC;CACf;AA0DD,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,OAAO,EAAE,OAAO,CAuBjE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="aaff74c8-4b9c-5cc4-9df3-c8c20b83b491")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e66f9b1b-49f5-5b6c-80a5-afb7e2bbc564")}catch(e){}}();
3
3
 
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.jsCoverageDiffCommand = void 0;
@@ -8,14 +8,13 @@ const common_1 = require("@alwaysmeticulous/common");
8
8
  const print_json_1 = require("../../command-utils/print-json");
9
9
  const sentry_utils_1 = require("../../command-utils/sentry.utils");
10
10
  const format_coverage_ranges_1 = require("../../utils/format-coverage-ranges");
11
- const handler = async ({ apiToken, replayDiffId, screenshotName, includeAllFiles, globFilter, json, }) => {
11
+ const handler = async ({ apiToken, replayDiffId, screenshotName, globFilter, json, }) => {
12
12
  (0, common_1.initLogger)();
13
13
  const client = await (0, client_1.createClientWithOAuth)({
14
14
  apiToken,
15
15
  enableOAuthLogin: true,
16
16
  });
17
17
  const result = await (0, client_1.getReplayDiffJsCoverage)(client, replayDiffId, screenshotName, {
18
- includeAllFiles,
19
18
  globFilter,
20
19
  });
21
20
  const added = result.diff.filter((d) => d.status === "added").length;
@@ -44,34 +43,28 @@ const handler = async ({ apiToken, replayDiffId, screenshotName, includeAllFiles
44
43
  }
45
44
  // Summary on stderr regardless of --json (which only changes stdout).
46
45
  (0, common_1.logNotice)(`${result.diff.length} file(s) with coverage changes ` +
47
- `(${added} added, ${removed} removed, ${modified} modified); ` +
48
- `base ${result.base?.length ?? 0} file(s), head ${result.head?.length ?? 0} file(s)`);
46
+ `(${added} added, ${removed} removed, ${modified} modified)`);
49
47
  };
50
48
  exports.jsCoverageDiffCommand = {
51
49
  command: "js-coverage-diff",
52
- describe: "Get the JS coverage diff for a replay diff. Outputs TSV, one row per changed file: repoFilePath, status, baseRanges, headRanges (or JSON with --json).",
50
+ describe: "Get the list of per-file JavaScript coverage diffs for a given replay diff (or a single screenshot of it). Outputs a TSV table with columns repoFilePath, status, baseRanges, headRanges.",
53
51
  builder: {
54
- apiToken: { string: true, description: "Meticulous API token" },
52
+ apiToken: { string: true, description: "Meticulous API token." },
55
53
  replayDiffId: {
56
54
  string: true,
57
- description: "The replay diff ID",
55
+ description: "The replay diff ID.",
58
56
  demandOption: true,
59
57
  },
60
58
  screenshotName: {
61
59
  string: true,
62
- description: 'Screenshot name (e.g. "after-event-5" or "end-state"). Omit for the whole-replay diff.',
63
- },
64
- includeAllFiles: {
65
- boolean: true,
66
- default: false,
67
- description: "Include base/head rows with no executed ranges (dropped by default).",
60
+ description: "Restrict coverage to this screenshot, which is only the coverage recorded since the preceding screenshot (omit for the whole-replay diff).",
68
61
  },
69
62
  globFilter: {
70
63
  string: true,
71
- description: 'Keep only repo file paths matching this gitignore-style glob, e.g. "src/components/**". Scopes base, head, and the diff.',
64
+ description: "Output only files whose repo path matches this gitignore-style glob (e.g. src/components/**).",
72
65
  },
73
66
  },
74
67
  handler: (0, sentry_utils_1.wrapHandler)(handler),
75
68
  };
76
69
  //# sourceMappingURL=js-coverage-diff.command.js.map
77
- //# debugId=aaff74c8-4b9c-5cc4-9df3-c8c20b83b491
70
+ //# debugId=e66f9b1b-49f5-5b6c-80a5-afb7e2bbc564
@@ -1 +1 @@
1
- {"version":3,"file":"js-coverage-diff.command.js","sources":["../../../src/commands/agent/js-coverage-diff.command.ts"],"sourceRoot":"","names":[],"mappings":";;;;;AAAA,qDAGkC;AAClC,qDAAiE;AAEjE,+DAA2D;AAC3D,mEAA+D;AAC/D,+EAA0E;AAW1E,MAAM,OAAO,GAAG,KAAK,EAAE,EACrB,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,eAAe,EACf,UAAU,EACV,IAAI,GACI,EAAiB,EAAE;IAC3B,IAAA,mBAAU,GAAE,CAAC;IACb,MAAM,MAAM,GAAG,MAAM,IAAA,8BAAqB,EAAC;QACzC,QAAQ;QACR,gBAAgB,EAAE,IAAI;KACvB,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,MAAM,IAAA,gCAAuB,EAC1C,MAAM,EACN,YAAY,EACZ,cAAc,EACd;QACE,eAAe;QACf,UAAU;KACX,CACF,CAAC;IAEF,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC,MAAM,CAAC;IACrE,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,MAAM,CAAC;IACzE,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAA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,OAAO,EAAE,kBAAkB;IAC3B,QAAQ,EACN,wJAAwJ;IAC1J,OAAO,EAAE;QACP,QAAQ,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,sBAAsB,EAAE;QAC/D,YAAY,EAAE;YACZ,MAAM,EAAE,IAAI;YACZ,WAAW,EAAE,oBAAoB;YACjC,YAAY,EAAE,IAAI;SACnB;QACD,cAAc,EAAE;YACd,MAAM,EAAE,IAAI;YACZ,WAAW,EACT,wFAAwF;SAC3F;QACD,eAAe,EAAE;YACf,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,KAAK;YACd,WAAW,EACT,sEAAsE;SACzE;QACD,UAAU,EAAE;YACV,MAAM,EAAE,IAAI;YACZ,WAAW,EACT,0HAA0H;SAC7H;KACF;IACD,OAAO,EAAE,IAAA,0BAAW,EAAC,OAAO,CAAC;CAC9B,CAAC","debugId":"aaff74c8-4b9c-5cc4-9df3-c8c20b83b491"}
1
+ {"version":3,"file":"js-coverage-diff.command.js","sources":["../../../src/commands/agent/js-coverage-diff.command.ts"],"sourceRoot":"","names":[],"mappings":";;;;;AAAA,qDAGkC;AAClC,qDAAiE;AAEjE,+DAA2D;AAC3D,mEAA+D;AAC/D,+EAA0E;AAU1E,MAAM,OAAO,GAAG,KAAK,EAAE,EACrB,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,UAAU,EACV,IAAI,GACI,EAAiB,EAAE;IAC3B,IAAA,mBAAU,GAAE,CAAC;IACb,MAAM,MAAM,GAAG,MAAM,IAAA,8BAAqB,EAAC;QACzC,QAAQ;QACR,gBAAgB,EAAE,IAAI;KACvB,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,MAAM,IAAA,gCAAuB,EAC1C,MAAM,EACN,YAAY,EACZ,cAAc,EACd;QACE,UAAU;KACX,CACF,CAAC;IAEF,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,M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AAC,MAAM,iCAAiC;QACpD,IAAI,KAAK,WAAW,OAAO,aAAa,QAAQ,YAAY,CAC/D,CAAC;AACJ,CAAC,CAAC;AAEW,QAAA,qBAAqB,GAAoC;IACpE,OAAO,EAAE,kBAAkB;IAC3B,QAAQ,EACN,2LAA2L;IAC7L,OAAO,EAAE;QACP,QAAQ,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,uBAAuB,EAAE;QAChE,YAAY,EAAE;YACZ,MAAM,EAAE,IAAI;YACZ,WAAW,EAAE,qBAAqB;YAClC,YAAY,EAAE,IAAI;SACnB;QACD,cAAc,EAAE;YACd,MAAM,EAAE,IAAI;YACZ,WAAW,EACT,4IAA4I;SAC/I;QACD,UAAU,EAAE;YACV,MAAM,EAAE,IAAI;YACZ,WAAW,EACT,+FAA+F;SAClG;KACF;IACD,OAAO,EAAE,IAAA,0BAAW,EAAC,OAAO,CAAC;CAC9B,CAAC","debugId":"e66f9b1b-49f5-5b6c-80a5-afb7e2bbc564"}
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="78a1485d-27d5-56da-a188-7abd28840888")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="58c5f79a-0fc3-5503-9653-de3f3d830aba")}catch(e){}}();
3
3
 
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.jsCoverageCommand = exports.isAmbiguousTestRunError = exports.coverageColumnValue = exports.coverageFileToJson = exports.parseTestRunIds = exports.parseHeadPlusTestRunIds = exports.determineColumns = exports.assertTestRunOnlyFlagsUnsetForReplay = void 0;
@@ -372,9 +372,9 @@ const isAmbiguousTestRunError = (error) => (0, client_1.isFetchError)(error) &&
372
372
  exports.isAmbiguousTestRunError = isAmbiguousTestRunError;
373
373
  exports.jsCoverageCommand = {
374
374
  command: "js-coverage",
375
- describe: "Get JS coverage for a whole test run or a single replay. Outputs TSV, one row per repo file: repoFilePath plus the requested coverage columns (or JSON with --json).",
375
+ describe: "Get the list of per-file JavaScript coverage for a whole test run or a single replay (or a single screenshot of it). Outputs a TSV table with columns repoFilePath plus the requested additional columns (default if none: executedRanges).",
376
376
  builder: {
377
- apiToken: { string: true, description: "Meticulous API token" },
377
+ apiToken: { string: true, description: "Meticulous API token." },
378
378
  testRunId: {
379
379
  string: true,
380
380
  description: "The test run ID. On its own, returns coverage for the whole test run. Combined with --replayId, the replay must belong to this run (head or base); if it was this run's head, paths resolve against this run, otherwise against the replay's own execution run. " +
@@ -382,12 +382,12 @@ exports.jsCoverageCommand = {
382
382
  },
383
383
  commitSha: {
384
384
  string: true,
385
- description: "A commit SHA, used as an alternative to --testRunId: the latest test run for the commit is resolved and used. For whole-test-run coverage, defaults to the local git HEAD when neither --testRunId nor --commitSha is given.",
385
+ description: "A commit SHA, used as an alternative to --testRunId: looks up the latest test run for the commit. For whole-test-run coverage, defaults to the current git HEAD when neither --testRunId nor --commitSha is given.",
386
386
  },
387
- dontWaitForTestRunToComplete: {
388
- boolean: true,
389
- default: false,
390
- description: "For whole-test-run coverage, return immediately instead of the default of blocking until the run finishes; an unfinished run is then reported as not complete.",
387
+ project: {
388
+ string: true,
389
+ description: "The project to look up the commit for (id, 'org/proj', or simply 'proj'). One-off override, when omitted uses the user-configured default project.",
390
+ conflicts: ["testRunId", "testRunIds"],
391
391
  },
392
392
  replayId: {
393
393
  string: true,
@@ -395,60 +395,60 @@ exports.jsCoverageCommand = {
395
395
  },
396
396
  screenshotName: {
397
397
  string: true,
398
- description: 'Screenshot name (e.g. "after-event-5" or "end-state"), for use with --replayId. Omit for the whole replay.',
398
+ description: "Restrict coverage to this screenshot, which is only the coverage recorded since the preceding screenshot (for use with --replayId; omit for the whole replay).",
399
+ },
400
+ headPlusTestRunIds: {
401
+ string: true,
402
+ description: "Comma-separated additional test run IDs to union with the run resolved via --commitSha, or the current git HEAD by default (cannot be combined with --testRunId — use --testRunIds instead when you already have an explicit primary ID). " +
403
+ "Useful for checking combined coverage of the base (resolved from --commitSha or the current git HEAD) with additional custom-session test runs, each covering a subset of sessions. All runs must be finished, belong to the same project, and have executed the exact same commit as the run resolved above " +
404
+ "(a PR's merge commit is recomputed whenever its base branch moves, so a run triggered against a since-advanced base is rejected). Whole-test-run coverage only.",
405
+ },
406
+ testRunIds: {
407
+ string: true,
408
+ description: "Comma-separated test run IDs: the first is the primary run coverage is returned for, the rest are unioned in exactly like --headPlusTestRunIds. An alternative to --testRunId/--commitSha for callers that already have an ordered list of run IDs on hand. " +
409
+ "Cannot be combined with --testRunId, --commitSha, or --headPlusTestRunIds. Same constraints as --headPlusTestRunIds apply to the additional IDs (same project, same commit as the primary). Whole-test-run coverage only.",
399
410
  },
400
411
  includeAllFiles: {
401
412
  boolean: true,
402
413
  default: false,
403
- description: "Return every file, regardless of the requested columns. By default a file is dropped unless at least one requested column has a value for it (e.g. with only executed ranges, files with no executed lines are dropped). Works for both replay and whole-test-run coverage.",
414
+ description: "Output all files, including those with no value in the requested columns (dropped by default). Works for both replay and whole-test-run coverage.",
404
415
  },
405
416
  globFilter: {
406
417
  string: true,
407
- description: 'Keep only repo file paths matching this gitignore-style glob, e.g. "src/components/**".',
418
+ description: "Output only files whose repo path matches this gitignore-style glob (e.g. src/components/**).",
419
+ },
420
+ prDiffOnly: {
421
+ boolean: true,
422
+ default: false,
423
+ description: "Output only files changed in the PR diff (from coverage.pr.json). Whole-test-run coverage only.",
408
424
  },
409
425
  includeExecutedRanges: {
410
426
  boolean: true,
411
427
  default: false,
412
- description: "Include the executed line ranges column. This is the default column when no other --include* range/percentage flag is given.",
428
+ description: "Add an executedRanges column with the executed line ranges (default if none of the columns are requested).",
413
429
  },
414
430
  includeExecutableRanges: {
415
431
  boolean: true,
416
432
  default: false,
417
- description: "Include the executable line ranges column (lines that could be executed). Whole-test-run coverage only.",
433
+ description: "Add an executableRanges column with the executable line ranges. Whole-test-run coverage only.",
418
434
  },
419
435
  includeUncoveredRanges: {
420
436
  boolean: true,
421
437
  default: false,
422
- description: "Include the uncovered line ranges column (executable minus executed). Whole-test-run coverage only.",
438
+ description: "Add an uncoveredRanges column with the uncovered line ranges (executable minus executed). Whole-test-run coverage only.",
423
439
  },
424
440
  includeCoveragePercentage: {
425
441
  boolean: true,
426
442
  default: false,
427
- description: "Include the coverage percentage column (0–100; executed / executable lines per file). Whole-test-run coverage only.",
443
+ description: "Add a coveragePercentage column with the per-file coverage percentage (0–100). Whole-test-run coverage only.",
428
444
  },
429
- prDiffOnly: {
445
+ dontWaitForTestRunToComplete: {
430
446
  boolean: true,
431
447
  default: false,
432
- description: "Return only coverage for files changed in the PR diff (from coverage.pr.json). Whole-test-run coverage only.",
433
- },
434
- headPlusTestRunIds: {
435
- string: true,
436
- description: "Comma-separated additional test run IDs to union with the run resolved via --commitSha, or the local git HEAD by default (cannot be combined with --testRunId — use --testRunIds instead when you already have an explicit primary ID). " +
437
- "Useful for combining a project's normal coverage with the coverage of a few extra test runs. All runs must be finished, belong to the same project, and have executed the exact same commit as the run resolved above " +
438
- "(a PR's merge commit is recomputed whenever its base branch moves, so a run triggered against a since-advanced base is rejected). Whole-test-run coverage only.",
439
- },
440
- testRunIds: {
441
- string: true,
442
- description: "Comma-separated test run IDs: the first is the primary run coverage is returned for, the rest are unioned in exactly like --headPlusTestRunIds. An alternative to --testRunId/--commitSha for callers that already have an ordered list of run IDs on hand. " +
443
- "Cannot be combined with --testRunId, --commitSha, or --headPlusTestRunIds. Same constraints as --headPlusTestRunIds apply to the additional IDs (same project, same commit as the primary). Whole-test-run coverage only.",
444
- },
445
- project: {
446
- string: true,
447
- description: "Project to resolve --commitSha against (id, 'organization/name', or a bare name unique among your accessible projects). Cannot be combined with --testRunId/--testRunIds (the run already determines the project). One-off override for this call only; when omitted, uses the token's project or the default set via `auth set-project`.",
448
- conflicts: ["testRunId", "testRunIds"],
448
+ description: "For whole-test-run coverage, return immediately instead of the default of blocking until the run finishes; an unfinished run is then reported as not complete.",
449
449
  },
450
450
  },
451
451
  handler: (0, sentry_utils_1.wrapHandler)(handler),
452
452
  };
453
453
  //# sourceMappingURL=js-coverage.command.js.map
454
- //# debugId=78a1485d-27d5-56da-a188-7abd28840888
454
+ //# debugId=58c5f79a-0fc3-5503-9653-de3f3d830aba