@alwaysmeticulous/cli 2.317.0 → 2.320.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.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=label-commit.utils.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label-commit.utils.spec.d.ts","sourceRoot":"","sources":["../../../../src/commands/ci/__tests__/label-commit.utils.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,23 @@
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]="945013a7-f095-58e2-81ab-9eb6256c7332")}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 label_commit_utils_1 = require("../label-commit.utils");
8
+ (0, vitest_1.describe)("validateCommitLabels", () => {
9
+ (0, vitest_1.it)("accepts supported labels", () => {
10
+ (0, vitest_1.expect)((0, label_commit_utils_1.validateCommitLabels)(["not-relevant"])).toEqual(["not-relevant"]);
11
+ });
12
+ (0, vitest_1.it)("deduplicates labels", () => {
13
+ (0, vitest_1.expect)((0, label_commit_utils_1.validateCommitLabels)(["not-relevant", "not-relevant"])).toEqual([
14
+ "not-relevant",
15
+ ]);
16
+ });
17
+ (0, vitest_1.it)("rejects unsupported labels", () => {
18
+ (0, vitest_1.expect)(() => (0, label_commit_utils_1.validateCommitLabels)(["not-relevant", "flaky"])).toThrow(cli_user_error_1.CliUserError);
19
+ (0, vitest_1.expect)(() => (0, label_commit_utils_1.validateCommitLabels)(["flaky"])).toThrow("Unsupported label(s): flaky. Supported labels: not-relevant.");
20
+ });
21
+ });
22
+ //# sourceMappingURL=label-commit.utils.spec.js.map
23
+ //# debugId=945013a7-f095-58e2-81ab-9eb6256c7332
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label-commit.utils.spec.js","sources":["../../../../src/commands/ci/__tests__/label-commit.utils.spec.ts"],"sourceRoot":"","names":[],"mappings":";;;;AAAA,mCAA8C;AAC9C,kEAA6D;AAC7D,8DAA6D;AAE7D,IAAA,iBAAQ,EAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,IAAA,WAAE,EAAC,0BAA0B,EAAE,GAAG,EAAE;QAClC,IAAA,eAAM,EAAC,IAAA,yCAAoB,EAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;IAEH,IAAA,WAAE,EAAC,qBAAqB,EAAE,GAAG,EAAE;QAC7B,IAAA,eAAM,EAAC,IAAA,yCAAoB,EAAC,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;YACrE,cAAc;SACf,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,IAAA,WAAE,EAAC,4BAA4B,EAAE,GAAG,EAAE;QACpC,IAAA,eAAM,EAAC,GAAG,EAAE,CAAC,IAAA,yCAAoB,EAAC,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CACnE,6BAAY,CACb,CAAC;QACF,IAAA,eAAM,EAAC,GAAG,EAAE,CAAC,IAAA,yCAAoB,EAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CACnD,8DAA8D,CAC/D,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","debugId":"945013a7-f095-58e2-81ab-9eb6256c7332"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/ci/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAW3C,eAAO,MAAM,SAAS,EAAE,aAmBvB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/ci/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAY3C,eAAO,MAAM,SAAS,EAAE,aAoBvB,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]="44b55d04-6242-58aa-bedf-3b66c8e37304")}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]="46c276fc-db83-5f5d-9880-31cf206334a7")}catch(e){}}();
3
3
 
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.ciCommand = void 0;
6
6
  const agent_test_command_1 = require("./agent-test.command");
7
+ const label_commit_command_1 = require("./label-commit.command");
7
8
  const prepare_command_1 = require("./prepare.command");
8
9
  const run_local_command_1 = require("./run-local.command");
9
10
  const run_with_uploaded_asset_chunks_command_1 = require("./run-with-uploaded-asset-chunks.command");
@@ -25,6 +26,7 @@ exports.ciCommand = {
25
26
  .command(run_with_uploaded_asset_chunks_command_1.ciRunWithUploadedAssetChunksCommand)
26
27
  .command(upload_container_command_1.ciUploadContainerCommand)
27
28
  .command(agent_test_command_1.ciAgentTestCommand)
29
+ .command(label_commit_command_1.ciLabelCommitCommand)
28
30
  .demandCommand()
29
31
  .help(),
30
32
  handler: () => {
@@ -32,4 +34,4 @@ exports.ciCommand = {
32
34
  },
33
35
  };
34
36
  //# sourceMappingURL=index.js.map
35
- //# debugId=44b55d04-6242-58aa-bedf-3b66c8e37304
37
+ //# debugId=46c276fc-db83-5f5d-9880-31cf206334a7
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/commands/ci/index.ts"],"sourceRoot":"","names":[],"mappings":";;;;;AACA,6DAA0D;AAC1D,uDAAqD;AACrD,2DAAwD;AACxD,qGAA+F;AAC/F,+CAA6C;AAC7C,iEAA8D;AAC9D,6EAAyE;AACzE,mEAAgE;AAChE,yEAAsE;AAEzD,QAAA,SAAS,GAAkB;IACtC,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,gBAAgB;IAC1B,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,OAAO,CAAC,0BAAY,CAAC;SACrB,OAAO,CAAC,qCAAiB,CAAC;SAC1B,OAAO,CAAC,kCAAgB,CAAC;SACzB,OAAO,CAAC,2CAAoB,CAAC;SAC7B,OAAO,CAAC,6CAAqB,CAAC;SAC9B,OAAO,CAAC,sDAAyB,CAAC;SAClC,OAAO,CAAC,4EAAmC,CAAC;SAC5C,OAAO,CAAC,mDAAwB,CAAC;SACjC,OAAO,CAAC,uCAAkB,CAAC;SAC3B,aAAa,EAAE;SACf,IAAI,EAAE;IACX,OAAO,EAAE,GAAG,EAAE;QACZ,0BAA0B;IAC5B,CAAC;CACF,CAAC","debugId":"44b55d04-6242-58aa-bedf-3b66c8e37304"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/commands/ci/index.ts"],"sourceRoot":"","names":[],"mappings":";;;;;AACA,6DAA0D;AAC1D,iEAA8D;AAC9D,uDAAqD;AACrD,2DAAwD;AACxD,qGAA+F;AAC/F,+CAA6C;AAC7C,iEAA8D;AAC9D,6EAAyE;AACzE,mEAAgE;AAChE,yEAAsE;AAEzD,QAAA,SAAS,GAAkB;IACtC,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,gBAAgB;IAC1B,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,OAAO,CAAC,0BAAY,CAAC;SACrB,OAAO,CAAC,qCAAiB,CAAC;SAC1B,OAAO,CAAC,kCAAgB,CAAC;SACzB,OAAO,CAAC,2CAAoB,CAAC;SAC7B,OAAO,CAAC,6CAAqB,CAAC;SAC9B,OAAO,CAAC,sDAAyB,CAAC;SAClC,OAAO,CAAC,4EAAmC,CAAC;SAC5C,OAAO,CAAC,mDAAwB,CAAC;SACjC,OAAO,CAAC,uCAAkB,CAAC;SAC3B,OAAO,CAAC,2CAAoB,CAAC;SAC7B,aAAa,EAAE;SACf,IAAI,EAAE;IACX,OAAO,EAAE,GAAG,EAAE;QACZ,0BAA0B;IAC5B,CAAC;CACF,CAAC","debugId":"46c276fc-db83-5f5d-9880-31cf206334a7"}
@@ -0,0 +1,9 @@
1
+ import type { CommandModule } from "yargs";
2
+ interface Options {
3
+ apiToken?: string | undefined;
4
+ commitSha?: string | undefined;
5
+ labels: string[];
6
+ }
7
+ export declare const ciLabelCommitCommand: CommandModule<unknown, Options>;
8
+ export {};
9
+ //# sourceMappingURL=label-commit.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label-commit.command.d.ts","sourceRoot":"","sources":["../../../src/commands/ci/label-commit.command.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAM3C,UAAU,OAAO;IACf,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AA2BD,eAAO,MAAM,oBAAoB,EAAE,aAAa,CAAC,OAAO,EAAE,OAAO,CAoBhE,CAAC"}
@@ -0,0 +1,46 @@
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]="fddec0da-30a5-5db7-8cfc-bf8ef63f2738")}catch(e){}}();
3
+
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.ciLabelCommitCommand = void 0;
6
+ const client_1 = require("@alwaysmeticulous/client");
7
+ const common_1 = require("@alwaysmeticulous/common");
8
+ const common_options_1 = require("../../command-utils/common-options");
9
+ const sentry_utils_1 = require("../../command-utils/sentry.utils");
10
+ const cli_user_error_1 = require("../../utils/cli-user-error");
11
+ const label_commit_utils_1 = require("./label-commit.utils");
12
+ const handler = async ({ apiToken, commitSha: commitSha_, labels: labels_, }) => {
13
+ const logger = (0, common_1.initLogger)();
14
+ const labels = (0, label_commit_utils_1.validateCommitLabels)(labels_);
15
+ const commitSha = await (0, common_1.getCommitSha)(commitSha_);
16
+ if (!commitSha) {
17
+ throw new cli_user_error_1.CliUserError("Could not determine a commit SHA. Pass --commitSha or run inside a git repository.");
18
+ }
19
+ const client = await (0, client_1.createClientWithOAuth)({
20
+ apiToken,
21
+ enableOAuthLogin: true,
22
+ });
23
+ await (0, client_1.labelCommit)({ client, commitSha, labels });
24
+ logger.info(`Labelled commit ${commitSha} with: ${labels.join(", ")}`);
25
+ };
26
+ exports.ciLabelCommitCommand = {
27
+ command: "label-commit",
28
+ describe: "Attach labels to a commit. Labelling a commit as 'not-relevant' tells Meticulous the commit doesn't affect the app under test, " +
29
+ "so it can be skipped when searching for a base test run to compare against.",
30
+ builder: {
31
+ apiToken: common_options_1.OPTIONS.apiToken,
32
+ commitSha: {
33
+ string: true,
34
+ description: "The commit to label. Defaults to the current git HEAD when omitted.",
35
+ },
36
+ labels: {
37
+ array: true,
38
+ string: true,
39
+ demandOption: true,
40
+ description: `The labels to attach to the commit. Supported labels: ${client_1.COMMIT_LABEL_TYPES.join(", ")}.`,
41
+ },
42
+ },
43
+ handler: (0, sentry_utils_1.wrapHandler)(handler),
44
+ };
45
+ //# sourceMappingURL=label-commit.command.js.map
46
+ //# debugId=fddec0da-30a5-5db7-8cfc-bf8ef63f2738
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label-commit.command.js","sources":["../../../src/commands/ci/label-commit.command.ts"],"sourceRoot":"","names":[],"mappings":";;;;;AAAA,qDAIkC;AAClC,qDAAoE;AAEpE,uEAA6D;AAC7D,mEAA+D;AAC/D,+DAA0D;AAC1D,6DAA4D;AAQ5D,MAAM,OAAO,GAAG,KAAK,EAAE,EACrB,QAAQ,EACR,SAAS,EAAE,UAAU,EACrB,MAAM,EAAE,OAAO,GACP,EAAiB,EAAE;IAC3B,MAAM,MAAM,GAAG,IAAA,mBAAU,GAAE,CAAC;IAE5B,MAAM,MAAM,GAAG,IAAA,yCAAoB,EAAC,OAAO,CAAC,CAAC;IAE7C,MAAM,SAAS,GAAG,MAAM,IAAA,qBAAY,EAAC,UAAU,CAAC,CAAC;IACjD,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,IAAI,6BAAY,CACpB,oFAAoF,CACrF,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,IAAA,8BAAqB,EAAC;QACzC,QAAQ;QACR,gBAAgB,EAAE,IAAI;KACvB,CAAC,CAAC;IAEH,MAAM,IAAA,oBAAW,EAAC,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC;IACjD,MAAM,CAAC,IAAI,CAAC,mBAAmB,SAAS,UAAU,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzE,CAAC,CAAC;AAEW,QAAA,oBAAoB,GAAoC;IACnE,OAAO,EAAE,cAAc;IACvB,QAAQ,EACN,iIAAiI;QACjI,6EAA6E;IAC/E,OAAO,EAAE;QACP,QAAQ,EAAE,wBAAO,CAAC,QAAQ;QAC1B,SAAS,EAAE;YACT,MAAM,EAAE,IAAI;YACZ,WAAW,EACT,qEAAqE;SACxE;QACD,MAAM,EAAE;YACN,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,IAAI;YACZ,YAAY,EAAE,IAAI;YAClB,WAAW,EAAE,yDAAyD,2BAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;SACvG;KACF;IACD,OAAO,EAAE,IAAA,0BAAW,EAAC,OAAO,CAAC;CAC9B,CAAC","debugId":"fddec0da-30a5-5db7-8cfc-bf8ef63f2738"}
@@ -0,0 +1,8 @@
1
+ import { type CommitLabelType } from "@alwaysmeticulous/client";
2
+ /**
3
+ * Validates the `--labels` values against the supported commit label types,
4
+ * throwing a `CliUserError` for any unsupported ones (the backend re-validates
5
+ * server-side). Returns the deduplicated labels.
6
+ */
7
+ export declare const validateCommitLabels: (labels: string[]) => CommitLabelType[];
8
+ //# sourceMappingURL=label-commit.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label-commit.utils.d.ts","sourceRoot":"","sources":["../../../src/commands/ci/label-commit.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,0BAA0B,CAAC;AAGlC;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,WAAY,MAAM,EAAE,KAAG,eAAe,EAWtE,CAAC"}
@@ -0,0 +1,23 @@
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]="d55f6d43-de30-563d-bddb-8718e9fb16b1")}catch(e){}}();
3
+
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.validateCommitLabels = void 0;
6
+ const client_1 = require("@alwaysmeticulous/client");
7
+ const cli_user_error_1 = require("../../utils/cli-user-error");
8
+ /**
9
+ * Validates the `--labels` values against the supported commit label types,
10
+ * throwing a `CliUserError` for any unsupported ones (the backend re-validates
11
+ * server-side). Returns the deduplicated labels.
12
+ */
13
+ const validateCommitLabels = (labels) => {
14
+ const unsupportedLabels = labels.filter((label) => !client_1.COMMIT_LABEL_TYPES.includes(label));
15
+ if (unsupportedLabels.length > 0) {
16
+ throw new cli_user_error_1.CliUserError(`Unsupported label(s): ${unsupportedLabels.join(", ")}. ` +
17
+ `Supported labels: ${client_1.COMMIT_LABEL_TYPES.join(", ")}.`);
18
+ }
19
+ return [...new Set(labels)];
20
+ };
21
+ exports.validateCommitLabels = validateCommitLabels;
22
+ //# sourceMappingURL=label-commit.utils.js.map
23
+ //# debugId=d55f6d43-de30-563d-bddb-8718e9fb16b1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label-commit.utils.js","sources":["../../../src/commands/ci/label-commit.utils.ts"],"sourceRoot":"","names":[],"mappings":";;;;;AAAA,qDAGkC;AAClC,+DAA0D;AAE1D;;;;GAIG;AACI,MAAM,oBAAoB,GAAG,CAAC,MAAgB,EAAqB,EAAE;IAC1E,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CACrC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAE,2BAAwC,CAAC,QAAQ,CAAC,KAAK,CAAC,CACtE,CAAC;IACF,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACjC,MAAM,IAAI,6BAAY,CACpB,yBAAyB,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;YACvD,qBAAqB,2BAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CACxD,CAAC;IACJ,CAAC;IACD,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,MAA2B,CAAC,CAAC,CAAC;AACnD,CAAC,CAAC;AAXW,QAAA,oBAAoB,wBAW/B","debugId":"d55f6d43-de30-563d-bddb-8718e9fb16b1"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwaysmeticulous/cli",
3
- "version": "2.317.0",
3
+ "version": "2.320.0",
4
4
  "description": "The Meticulous CLI",
5
5
  "license": "ISC",
6
6
  "main": "dist/index.js",
@@ -23,19 +23,19 @@
23
23
  "puppeteer-core": "24.14.0",
24
24
  "tar": "^7.5.19",
25
25
  "yargs": "^17.5.1",
26
- "@alwaysmeticulous/api": "2.312.0",
27
- "@alwaysmeticulous/client": "2.316.1",
26
+ "@alwaysmeticulous/client": "2.320.0",
28
27
  "@alwaysmeticulous/common": "2.310.0",
29
- "@alwaysmeticulous/debug-workspace": "2.316.1",
30
- "@alwaysmeticulous/downloading-helpers": "2.316.1",
31
- "@alwaysmeticulous/record": "2.312.0",
32
- "@alwaysmeticulous/remote-replay-launcher": "2.316.1",
28
+ "@alwaysmeticulous/debug-workspace": "2.320.0",
29
+ "@alwaysmeticulous/downloading-helpers": "2.320.0",
30
+ "@alwaysmeticulous/record": "2.319.0",
31
+ "@alwaysmeticulous/remote-replay-launcher": "2.320.0",
33
32
  "@alwaysmeticulous/replay-debugger-ui": "2.283.1",
34
- "@alwaysmeticulous/replay-orchestrator-launcher": "2.316.1",
35
- "@alwaysmeticulous/sdk-bundles-api": "2.316.0",
33
+ "@alwaysmeticulous/replay-orchestrator-launcher": "2.320.0",
34
+ "@alwaysmeticulous/api": "2.319.0",
36
35
  "@alwaysmeticulous/sentry": "2.310.0",
37
- "@alwaysmeticulous/session-filters": "2.312.0",
38
- "@alwaysmeticulous/tunnels-client": "2.313.1"
36
+ "@alwaysmeticulous/session-filters": "2.319.0",
37
+ "@alwaysmeticulous/tunnels-client": "2.313.1",
38
+ "@alwaysmeticulous/sdk-bundles-api": "2.319.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/cli-progress": "^3.11.5",