@alwaysmeticulous/cli 2.259.0 → 2.260.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 (119) hide show
  1. package/dist/{utils → command-utils}/sentry.utils.d.ts +1 -1
  2. package/dist/command-utils/sentry.utils.js.map +1 -0
  3. package/dist/commands/auth/index.d.ts +2 -0
  4. package/dist/commands/auth/index.js +14 -0
  5. package/dist/commands/auth/index.js.map +1 -0
  6. package/dist/commands/auth/logout.command.d.ts +2 -0
  7. package/dist/commands/auth/logout.command.js +17 -0
  8. package/dist/commands/auth/logout.command.js.map +1 -0
  9. package/dist/commands/auth/whoami.command.d.ts +2 -0
  10. package/dist/commands/auth/whoami.command.js +41 -0
  11. package/dist/commands/auth/whoami.command.js.map +1 -0
  12. package/dist/commands/ci/index.d.ts +2 -0
  13. package/dist/commands/ci/index.js +26 -0
  14. package/dist/commands/ci/index.js.map +1 -0
  15. package/dist/commands/ci/prepare.command.d.ts +15 -0
  16. package/dist/commands/{prepare-for-meticulous-tests/prepare-for-meticulous-tests.command.js → ci/prepare.command.js} +22 -31
  17. package/dist/commands/ci/prepare.command.js.map +1 -0
  18. package/dist/commands/ci/run-local.command.d.ts +23 -0
  19. package/dist/commands/{run-all-tests/run-all-tests.command.js → ci/run-local.command.js} +64 -63
  20. package/dist/commands/ci/run-local.command.js.map +1 -0
  21. package/dist/commands/ci/run.command.d.ts +22 -0
  22. package/dist/commands/{run-all-tests-in-cloud/run-all-tests-in-cloud.command.js → ci/run.command.js} +97 -111
  23. package/dist/commands/ci/run.command.js.map +1 -0
  24. package/dist/commands/ci/start-tunnel.command.d.ts +21 -0
  25. package/dist/commands/ci/start-tunnel.command.js +142 -0
  26. package/dist/commands/ci/start-tunnel.command.js.map +1 -0
  27. package/dist/commands/ci/upload-assets.command.d.ts +14 -0
  28. package/dist/commands/{upload-assets-and-execute-test-run-in-cloud/upload-assets-and-execute-test-run-in-cloud.command.js → ci/upload-assets.command.js} +46 -54
  29. package/dist/commands/ci/upload-assets.command.js.map +1 -0
  30. package/dist/commands/ci/upload-container.command.d.ts +15 -0
  31. package/dist/commands/{upload-container-and-execute-test-run-in-cloud/upload-container-and-execute-test-run-in-cloud.command.js → ci/upload-container.command.js} +53 -62
  32. package/dist/commands/ci/upload-container.command.js.map +1 -0
  33. package/dist/commands/deprecated-aliases.d.ts +2 -0
  34. package/dist/commands/deprecated-aliases.js +27 -0
  35. package/dist/commands/deprecated-aliases.js.map +1 -0
  36. package/dist/commands/download/index.d.ts +2 -0
  37. package/dist/commands/download/index.js +20 -0
  38. package/dist/commands/download/index.js.map +1 -0
  39. package/dist/commands/download/replay.command.d.ts +7 -0
  40. package/dist/commands/{download-replay/download-replay.command.js → download/replay.command.js} +17 -23
  41. package/dist/commands/download/replay.command.js.map +1 -0
  42. package/dist/commands/download/session.command.d.ts +7 -0
  43. package/dist/commands/download/session.command.js +32 -0
  44. package/dist/commands/download/session.command.js.map +1 -0
  45. package/dist/commands/download/test-run.command.d.ts +8 -0
  46. package/dist/commands/{download-test-run/download-test-run.command.js → download/test-run.command.js} +21 -21
  47. package/dist/commands/download/test-run.command.js.map +1 -0
  48. package/dist/commands/project/index.d.ts +2 -0
  49. package/dist/commands/project/index.js +13 -0
  50. package/dist/commands/project/index.js.map +1 -0
  51. package/dist/commands/project/show.command.d.ts +6 -0
  52. package/dist/commands/project/show.command.js +26 -0
  53. package/dist/commands/project/show.command.js.map +1 -0
  54. package/dist/commands/record/index.d.ts +2 -0
  55. package/dist/commands/record/index.js +18 -0
  56. package/dist/commands/record/index.js.map +1 -0
  57. package/dist/commands/record/login.command.d.ts +14 -0
  58. package/dist/commands/{record-login/record-login.command.js → record/login.command.js} +16 -31
  59. package/dist/commands/record/login.command.js.map +1 -0
  60. package/dist/commands/record/session.command.d.ts +17 -0
  61. package/dist/commands/record/{record.command.js → session.command.js} +16 -37
  62. package/dist/commands/record/session.command.js.map +1 -0
  63. package/dist/commands/{replay/utils/replay-debugger.ui.js → replay-debugger.ui.js} +2 -7
  64. package/dist/commands/replay-debugger.ui.js.map +1 -0
  65. package/dist/commands/replay.command.d.ts +25 -0
  66. package/dist/commands/{replay/replay.command.js → replay.command.js} +77 -82
  67. package/dist/commands/replay.command.js.map +1 -0
  68. package/dist/index.d.ts +4 -7
  69. package/dist/index.js +8 -14
  70. package/dist/index.js.map +1 -1
  71. package/dist/main.d.ts +1 -1
  72. package/dist/main.js +20 -33
  73. package/dist/main.js.map +1 -1
  74. package/package.json +5 -5
  75. package/dist/command-utils/command-builder.d.ts +0 -10
  76. package/dist/command-utils/command-builder.js +0 -20
  77. package/dist/command-utils/command-builder.js.map +0 -1
  78. package/dist/commands/download-replay/download-replay.command.d.ts +0 -10
  79. package/dist/commands/download-replay/download-replay.command.js.map +0 -1
  80. package/dist/commands/download-session/download-session.command.d.ts +0 -10
  81. package/dist/commands/download-session/download-session.command.js +0 -33
  82. package/dist/commands/download-session/download-session.command.js.map +0 -1
  83. package/dist/commands/download-test-run/download-test-run.command.d.ts +0 -17
  84. package/dist/commands/download-test-run/download-test-run.command.js.map +0 -1
  85. package/dist/commands/logout/logout.command.d.ts +0 -2
  86. package/dist/commands/logout/logout.command.js +0 -18
  87. package/dist/commands/logout/logout.command.js.map +0 -1
  88. package/dist/commands/prepare-for-meticulous-tests/prepare-for-meticulous-tests.command.d.ts +0 -22
  89. package/dist/commands/prepare-for-meticulous-tests/prepare-for-meticulous-tests.command.js.map +0 -1
  90. package/dist/commands/record/record.command.d.ts +0 -67
  91. package/dist/commands/record/record.command.js.map +0 -1
  92. package/dist/commands/record-login/record-login.command.d.ts +0 -56
  93. package/dist/commands/record-login/record-login.command.js.map +0 -1
  94. package/dist/commands/replay/replay.command.d.ts +0 -161
  95. package/dist/commands/replay/replay.command.js.map +0 -1
  96. package/dist/commands/replay/utils/replay-debugger.ui.js.map +0 -1
  97. package/dist/commands/run-all-tests/run-all-tests.command.d.ts +0 -140
  98. package/dist/commands/run-all-tests/run-all-tests.command.js.map +0 -1
  99. package/dist/commands/run-all-tests-in-cloud/run-all-tests-in-cloud.command.d.ts +0 -87
  100. package/dist/commands/run-all-tests-in-cloud/run-all-tests-in-cloud.command.js.map +0 -1
  101. package/dist/commands/show-project/show-project.command.d.ts +0 -6
  102. package/dist/commands/show-project/show-project.command.js +0 -27
  103. package/dist/commands/show-project/show-project.command.js.map +0 -1
  104. package/dist/commands/start-local-tunnel/start-local-tunnel.command.d.ts +0 -81
  105. package/dist/commands/start-local-tunnel/start-local-tunnel.command.js +0 -144
  106. package/dist/commands/start-local-tunnel/start-local-tunnel.command.js.map +0 -1
  107. package/dist/commands/upload-assets-and-execute-test-run-in-cloud/upload-assets-and-execute-test-run-in-cloud.command.d.ts +0 -46
  108. package/dist/commands/upload-assets-and-execute-test-run-in-cloud/upload-assets-and-execute-test-run-in-cloud.command.js.map +0 -1
  109. package/dist/commands/upload-container-and-execute-test-run-in-cloud/upload-container-and-execute-test-run-in-cloud.command.d.ts +0 -50
  110. package/dist/commands/upload-container-and-execute-test-run-in-cloud/upload-container-and-execute-test-run-in-cloud.command.js.map +0 -1
  111. package/dist/commands/whoami/whoami.command.d.ts +0 -2
  112. package/dist/commands/whoami/whoami.command.js +0 -42
  113. package/dist/commands/whoami/whoami.command.js.map +0 -1
  114. package/dist/utils/npm-set-script.utils.d.ts +0 -4
  115. package/dist/utils/npm-set-script.utils.js +0 -17
  116. package/dist/utils/npm-set-script.utils.js.map +0 -1
  117. package/dist/utils/sentry.utils.js.map +0 -1
  118. /package/dist/{utils → command-utils}/sentry.utils.js +0 -0
  119. /package/dist/commands/{replay/utils/replay-debugger.ui.d.ts → replay-debugger.ui.d.ts} +0 -0
@@ -1,43 +1,28 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.recordLoginCommand = exports.recordLoginFlowCommandHandler = void 0;
3
+ exports.recordLoginCommand = void 0;
4
4
  const client_1 = require("@alwaysmeticulous/client");
5
5
  const common_1 = require("@alwaysmeticulous/common");
6
6
  const downloading_helpers_1 = require("@alwaysmeticulous/downloading-helpers");
7
7
  const record_1 = require("@alwaysmeticulous/record");
8
- const command_builder_1 = require("../../command-utils/command-builder");
9
8
  const common_options_1 = require("../../command-utils/common-options");
9
+ const sentry_utils_1 = require("../../command-utils/sentry.utils");
10
10
  const constants_1 = require("../../utils/constants");
11
- const recordLoginFlowCommandHandler = async ({ apiToken, devTools, bypassCSP, width, height, uploadIntervalMs, trace, captureHttpOnlyCookies, appUrl, }) => {
11
+ const handler = async ({ apiToken, devTools, bypassCSP, width, height, uploadIntervalMs, trace, captureHttpOnlyCookies, appUrl, }) => {
12
12
  const logger = (0, common_1.initLogger)();
13
13
  const debugLogger = trace ? await common_1.DebugLogger.create() : null;
14
- debugLogger === null || debugLogger === void 0 ? void 0 : debugLogger.log("Record options:");
15
- debugLogger === null || debugLogger === void 0 ? void 0 : debugLogger.logObject({
16
- apiToken,
17
- devTools,
18
- width,
19
- height,
20
- uploadIntervalMs,
21
- trace,
22
- });
23
- // 1. Fetch the recording token
24
14
  const client = (0, client_1.createClient)({ apiToken });
25
15
  const project = await (0, client_1.getProject)(client);
26
16
  if (!project) {
27
17
  logger.error("Could not retrieve project data. Is the API token correct?");
28
- debugLogger === null || debugLogger === void 0 ? void 0 : debugLogger.log("Could not retrieve project data. Is the API token correct?");
29
18
  process.exit(1);
30
19
  }
31
20
  const recordingToken = project.recordingToken;
32
21
  if (!recordingToken) {
33
22
  logger.error("Could not retrieve recording token.");
34
- debugLogger === null || debugLogger === void 0 ? void 0 : debugLogger.log("Could not retrieve recording token.");
35
23
  process.exit(1);
36
24
  }
37
- logger.debug(`Recording token: ${recordingToken}`);
38
- // 3. Load recording snippets
39
25
  const recordingSnippet = await (0, downloading_helpers_1.fetchAsset)(constants_1.RECORDING_SNIPPET_PATH);
40
- // 4. Start recording
41
26
  await (0, record_1.recordLoginFlowSession)({
42
27
  recordingToken,
43
28
  devTools,
@@ -49,21 +34,21 @@ const recordLoginFlowCommandHandler = async ({ apiToken, devTools, bypassCSP, wi
49
34
  captureHttpOnlyCookies,
50
35
  appUrl,
51
36
  }).catch((error) => {
37
+ debugLogger === null || debugLogger === void 0 ? void 0 : debugLogger.log(`${error}`);
52
38
  throw error;
53
39
  });
54
40
  };
55
- exports.recordLoginFlowCommandHandler = recordLoginFlowCommandHandler;
56
- exports.recordLoginCommand = (0, command_builder_1.buildCommand)("record-login")
57
- .details({
41
+ exports.recordLoginCommand = {
42
+ command: "login",
58
43
  describe: "Record a login flow session (warning: sessions recorded with this command will store credentials)",
59
- })
60
- .options({
61
- ...common_options_1.COMMON_RECORD_OPTIONS,
62
- // We explicitly set the default to true for this command.
63
- bypassCSP: {
64
- ...common_options_1.COMMON_RECORD_OPTIONS.bypassCSP,
65
- default: true,
44
+ builder: {
45
+ ...common_options_1.COMMON_RECORD_OPTIONS,
46
+ // We explicitly set the default to true for this command.
47
+ bypassCSP: {
48
+ ...common_options_1.COMMON_RECORD_OPTIONS.bypassCSP,
49
+ default: true,
50
+ },
66
51
  },
67
- })
68
- .handler(exports.recordLoginFlowCommandHandler);
69
- //# sourceMappingURL=record-login.command.js.map
52
+ handler: (0, sentry_utils_1.wrapHandler)(handler),
53
+ };
54
+ //# sourceMappingURL=login.command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login.command.js","sourceRoot":"","sources":["../../../src/commands/record/login.command.ts"],"names":[],"mappings":";;;AAAA,qDAAoE;AACpE,qDAAmE;AACnE,+EAAmE;AACnE,qDAAkE;AAElE,uEAA2E;AAC3E,mEAA+D;AAC/D,qDAA+D;AAc/D,MAAM,OAAO,GAAG,KAAK,EAAE,EACrB,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,KAAK,EACL,MAAM,EACN,gBAAgB,EAChB,KAAK,EACL,sBAAsB,EACtB,MAAM,GACE,EAAiB,EAAE;IAC3B,MAAM,MAAM,GAAG,IAAA,mBAAU,GAAE,CAAC;IAC5B,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,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0,0 +1,17 @@
1
+ import { CommandModule } from "yargs";
2
+ interface Options {
3
+ apiToken: string | null | undefined;
4
+ commitSha: string | null | undefined;
5
+ devTools: boolean | null | undefined;
6
+ bypassCSP: boolean | null | undefined;
7
+ width: number | null | undefined;
8
+ height: number | null | undefined;
9
+ uploadIntervalMs: number | null | undefined;
10
+ incognito: boolean | null | undefined;
11
+ trace: boolean | null | undefined;
12
+ captureHttpOnlyCookies: boolean;
13
+ appUrl: string | null | undefined;
14
+ maxPayloadSize: number | null | undefined;
15
+ }
16
+ export declare const recordSessionCommand: CommandModule<unknown, Options>;
17
+ export {};
@@ -1,53 +1,33 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.recordCommand = exports.recordCommandHandler = void 0;
3
+ exports.recordSessionCommand = void 0;
4
4
  const path_1 = require("path");
5
5
  const client_1 = require("@alwaysmeticulous/client");
6
6
  const common_1 = require("@alwaysmeticulous/common");
7
7
  const downloading_helpers_1 = require("@alwaysmeticulous/downloading-helpers");
8
8
  const record_1 = require("@alwaysmeticulous/record");
9
- const command_builder_1 = require("../../command-utils/command-builder");
10
9
  const common_options_1 = require("../../command-utils/common-options");
10
+ const sentry_utils_1 = require("../../command-utils/sentry.utils");
11
11
  const constants_1 = require("../../utils/constants");
12
- const recordCommandHandler = async ({ apiToken, commitSha: commitSha_, devTools, bypassCSP, width, height, uploadIntervalMs, incognito, trace, captureHttpOnlyCookies, appUrl, maxPayloadSize, }) => {
12
+ const handler = async ({ apiToken, commitSha: commitSha_, devTools, bypassCSP, width, height, uploadIntervalMs, incognito, trace, captureHttpOnlyCookies, appUrl, maxPayloadSize, }) => {
13
13
  const logger = (0, common_1.initLogger)();
14
14
  const debugLogger = trace ? await common_1.DebugLogger.create() : null;
15
- debugLogger === null || debugLogger === void 0 ? void 0 : debugLogger.log("Record options:");
16
- debugLogger === null || debugLogger === void 0 ? void 0 : debugLogger.logObject({
17
- apiToken,
18
- commitSha: commitSha_,
19
- devTools,
20
- width,
21
- height,
22
- uploadIntervalMs,
23
- incognito,
24
- trace,
25
- });
26
15
  logger.info("Preparing recording...");
27
- // 1. Fetch the recording token
28
16
  const client = (0, client_1.createClient)({ apiToken });
29
17
  const project = await (0, client_1.getProject)(client);
30
18
  if (!project) {
31
19
  logger.error("Could not retrieve project data. Is the API token correct?");
32
- debugLogger === null || debugLogger === void 0 ? void 0 : debugLogger.log("Could not retrieve project data. Is the API token correct?");
33
20
  process.exit(1);
34
21
  }
35
22
  const recordingToken = project.recordingToken;
36
23
  if (!recordingToken) {
37
24
  logger.error("Could not retrieve recording token.");
38
- debugLogger === null || debugLogger === void 0 ? void 0 : debugLogger.log("Could not retrieve recording token.");
39
25
  process.exit(1);
40
26
  }
41
- logger.debug(`Recording token: ${recordingToken}`);
42
- // 2. Guess commit SHA1
43
27
  const commitSha = (await (0, common_1.getCommitSha)(commitSha_)) || "unknown";
44
- logger.debug(`Commit: ${commitSha}`);
45
- // 3. Load recording snippets
46
28
  const recordingSnippet = await (0, downloading_helpers_1.fetchAsset)(constants_1.RECORDING_SNIPPET_PATH);
47
29
  const cookieDir = (0, path_1.join)((0, common_1.getMeticulousLocalDataDir)(), "cookies");
48
- // Report recording start
49
30
  const recordingCommandId = await (0, client_1.getRecordingCommandId)(client);
50
- // 5. Start recording
51
31
  const onDetectedSession = (sessionId) => {
52
32
  const organizationName = encodeURIComponent(project.organization.name);
53
33
  const projectName = encodeURIComponent(project.name);
@@ -81,19 +61,18 @@ const recordCommandHandler = async ({ apiToken, commitSha: commitSha_, devTools,
81
61
  throw error;
82
62
  });
83
63
  };
84
- exports.recordCommandHandler = recordCommandHandler;
85
- exports.recordCommand = (0, command_builder_1.buildCommand)("record")
86
- .details({
64
+ exports.recordSessionCommand = {
65
+ command: "session",
87
66
  describe: "Record a session",
88
- })
89
- .options({
90
- ...common_options_1.COMMON_RECORD_OPTIONS,
91
- commitSha: common_options_1.OPTIONS.commitSha,
92
- incognito: {
93
- boolean: true,
94
- description: "Use an incognito browsing context",
95
- default: true,
67
+ builder: {
68
+ ...common_options_1.COMMON_RECORD_OPTIONS,
69
+ commitSha: common_options_1.OPTIONS.commitSha,
70
+ incognito: {
71
+ boolean: true,
72
+ description: "Use an incognito browsing context",
73
+ default: true,
74
+ },
96
75
  },
97
- })
98
- .handler(exports.recordCommandHandler);
99
- //# sourceMappingURL=record.command.js.map
76
+ handler: (0, sentry_utils_1.wrapHandler)(handler),
77
+ };
78
+ //# sourceMappingURL=session.command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.command.js","sourceRoot":"","sources":["../../../src/commands/record/session.command.ts"],"names":[],"mappings":";;;AAAA,+BAA4B;AAC5B,qDAKkC;AAClC,qDAKkC;AAClC,+EAAmE;AACnE,qDAAyD;AAEzD,uEAAoF;AACpF,mEAA+D;AAC/D,qDAA+D;AAiB/D,MAAM,OAAO,GAAG,KAAK,EAAE,EACrB,QAAQ,EACR,SAAS,EAAE,UAAU,EACrB,QAAQ,EACR,SAAS,EACT,KAAK,EACL,MAAM,EACN,gBAAgB,EAChB,SAAS,EACT,KAAK,EACL,sBAAsB,EACtB,MAAM,EACN,cAAc,GACN,EAAiB,EAAE;IAC3B,MAAM,MAAM,GAAG,IAAA,mBAAU,GAAE,CAAC;IAC5B,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,MAAM,oBAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAE9D,MAAM,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;IAEtC,MAAM,MAAM,GAAG,IAAA,qBAAY,EAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC1C,MAAM,OAAO,GAAG,MAAM,IAAA,mBAAU,EAAC,MAAM,CAAC,CAAC;IACzC,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,CAAC,KAAK,CAAC,4DAA4D,CAAC,CAAC;QAC3E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,MAAM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,CAAC,CACF,CAAC;IACJ,CAAC,CAAC;IAEF,MAAM,IAAA,sBAAa,EAAC;QAClB,cAAc;QACd,aAAa,EAAE,SAAS;QACxB,QAAQ;QACR,SAAS;QACT,gBAAgB;QAChB,KAAK;QACL,MAAM;QACN,gBAAgB;QAChB,SAAS;QACT,SAAS;QACT,WAAW;QACX,iBAAiB;QACjB,sBAAsB;QACtB,MAAM;QACN,cAAc;KACf,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACjB,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,GAAG,CAAC,GAAG,KAAK,EAAE,CAAC,CAAC;QAC7B,MAAM,KAAK,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEW,QAAA,oBAAoB,GAAoC;IACnE,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,kBAAkB;IAC5B,OAAO,EAAE;QACP,GAAG,sCAAqB;QACxB,SAAS,EAAE,wBAAO,CAAC,SAAS;QAC5B,SAAS,EAAE;YACT,OAAO,EAAE,IAAI;YACb,WAAW,EAAE,mCAAmC;YAChD,OAAO,EAAE,IAAI;SACd;KACF;IACD,OAAO,EAAE,IAAA,0BAAW,EAAC,OAAO,CAAC;CAC9B,CAAC"}
@@ -50,19 +50,14 @@ const openStepThroughDebuggerUI = async ({ onCloseReplayedPage, onLogEventTarget
50
50
  logger.info(`[debugger-ui] Auto-advancing to event #${startAtEvent}...`);
51
51
  }
52
52
  }
53
- // Ensure browser is available and get executable path
54
53
  const executablePath = await (0, common_1.ensureBrowser)();
55
- // Start the UI server
56
54
  const uiServer = await (0, replay_debugger_ui_1.startUIServer)();
57
- // Launch the browser with the correct executable path
58
55
  const browser = await (0, puppeteer_core_1.launch)({
59
56
  executablePath,
60
57
  args: [`--window-size=600,1000`],
61
58
  headless: false,
62
59
  });
63
- // Create page for the debugger UI
64
60
  const debuggerPage = (await browser.pages())[0];
65
- // Disable viewport emulation to use the actual window size
66
61
  await debuggerPage.setViewport(null);
67
62
  /**
68
63
  * The index the page is in the process of advancing to. Equal to the current index
@@ -106,8 +101,8 @@ const openStepThroughDebuggerUI = async ({ onCloseReplayedPage, onLogEventTarget
106
101
  const setState = async (newState) => {
107
102
  await readyPromise;
108
103
  state = { ...state, ...newState };
109
- await debuggerPage.evaluate((state) => {
110
- window.__meticulous__replayDebuggerSetState(state);
104
+ await debuggerPage.evaluate((s) => {
105
+ window["__meticulous__replayDebuggerSetState"] = s;
111
106
  }, state);
112
107
  };
113
108
  let advanceToEvent = null;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replay-debugger.ui.js","sourceRoot":"","sources":["../../src/commands/replay-debugger.ui.ts"],"names":[],"mappings":";;;AACA,qDAAqE;AACrE,6EAAqE;AAKrE,mDAAuD;AA4BvD,uFAAuF;AACvF,yFAAyF;AACzF,sEAAsE;AAC/D,MAAM,yBAAyB,GAAG,KAAK,EAAE,EAC9C,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,GACY,EAAkC,EAAE;IAC5D,MAAM,MAAM,GAAG,IAAA,mBAAU,GAAE,CAAC;IAE5B,IAAI,gBAAgB,GAAuB,SAAS,CAAC;IACrD,IAAI,YAAY,IAAI,IAAI,EAAE;QACxB,MAAM,UAAU,GAAG,gBAAgB,CAAC,SAAS,CAC3C,CAAC,KAAK,EAAE,EAAE,CACR,oBAAoB,IAAI,KAAK;YAC7B,KAAK,CAAC,kBAAkB,KAAK,YAAY,CAC5C,CAAC;QAEF,IAAI,UAAU,KAAK,CAAC,CAAC,EAAE;YACrB,MAAM,iBAAiB,GAAG,gBAAgB;iBACvC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;gBAChB,UAAU,EAAE,GAAG;gBACf,WAAW,EACT,oBAAoB,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI;aAC1D,CAAC,CAAC;iBACF,MAAM,CAAC,CA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8B,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;IAE1D,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;QAC5B,QAAQ,CAAC,KAAK,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;QAC5B,mBAAmB,EAAE,CAAC;IACxB,CAAC,CAAC,CAAC;IAEH,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,EAAE,EAAE,CAAC;AAClE,CAAC,CAAC;AApMW,QAAA,yBAAyB,6BAoMpC"}
@@ -0,0 +1,25 @@
1
+ import { ScreenshotDiffOptions } from "@alwaysmeticulous/api";
2
+ import { ReplayExecutionOptions } from "@alwaysmeticulous/sdk-bundles-api";
3
+ import { CommandModule } from "yargs";
4
+ interface Options extends ScreenshotDiffOptions, Omit<ReplayExecutionOptions, "maxDurationMs" | "maxEventCount"> {
5
+ takeSnapshots: boolean;
6
+ appUrl: string | null | undefined;
7
+ simulationIdForAssets: string | null | undefined;
8
+ maxDurationMs: number | null | undefined;
9
+ maxEventCount: number | null | undefined;
10
+ storyboard: boolean;
11
+ apiToken: string | null | undefined;
12
+ commitSha: string | null | undefined;
13
+ sessionId: string;
14
+ cookiesFile: string | null | undefined;
15
+ debugger: boolean;
16
+ startAtEvent: number | undefined;
17
+ baseReplayId: string | null | undefined;
18
+ sessionIdForApplicationStorage: string | null | undefined;
19
+ networkDebuggingRequestRegexes: string[] | undefined;
20
+ networkDebuggingTransformationFns: string[] | undefined;
21
+ networkDebuggingRequestTypes: string[] | undefined;
22
+ networkDebuggingWebsocketUrlRegexes: string[] | undefined;
23
+ }
24
+ export declare const replayCommand: CommandModule<unknown, Options>;
25
+ export {};
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.replayCommand = exports.getReplayTarget = void 0;
3
+ exports.replayCommand = void 0;
4
4
  const client_1 = require("@alwaysmeticulous/client");
5
5
  const common_1 = require("@alwaysmeticulous/common");
6
6
  const replay_orchestrator_launcher_1 = require("@alwaysmeticulous/replay-orchestrator-launcher");
7
- const command_builder_1 = require("../../command-utils/command-builder");
8
- const common_options_1 = require("../../command-utils/common-options");
9
- const out_of_date_client_error_1 = require("../../utils/out-of-date-client-error");
10
- const replay_debugger_ui_1 = require("./utils/replay-debugger.ui");
11
- const replayCommandHandler = async ({ apiToken, commitSha, sessionId, appUrl, simulationIdForAssets, headless, devTools, bypassCSP, takeSnapshots, baseReplayId, diffThreshold, diffPixelThreshold, shiftTime, networkStubbing, moveBeforeMouseEvent, cookiesFile, disableRemoteFonts, noSandbox, skipPauses, maxDurationMs, maxEventCount, storyboard, essentialFeaturesOnly, logPossibleNonDeterminism, sessionIdForApplicationStorage, debugger: enableStepThroughDebugger, startAtEvent, networkDebuggingRequestRegexes, networkDebuggingTransformationFns, networkDebuggingRequestTypes, networkDebuggingWebsocketUrlRegexes, enableCssCoverage, }) => {
7
+ const common_options_1 = require("../command-utils/common-options");
8
+ const sentry_utils_1 = require("../command-utils/sentry.utils");
9
+ const out_of_date_client_error_1 = require("../utils/out-of-date-client-error");
10
+ const replay_debugger_ui_1 = require("./replay-debugger.ui");
11
+ const handler = async ({ apiToken, commitSha, sessionId, appUrl, simulationIdForAssets, headless, devTools, bypassCSP, takeSnapshots, baseReplayId, diffThreshold, diffPixelThreshold, shiftTime, networkStubbing, moveBeforeMouseEvent, cookiesFile, disableRemoteFonts, noSandbox, skipPauses, maxDurationMs, maxEventCount, storyboard, essentialFeaturesOnly, logPossibleNonDeterminism, sessionIdForApplicationStorage, debugger: enableStepThroughDebugger, startAtEvent, networkDebuggingRequestRegexes, networkDebuggingTransformationFns, networkDebuggingRequestTypes, networkDebuggingWebsocketUrlRegexes, enableCssCoverage, }) => {
12
12
  var _a;
13
13
  if (!takeSnapshots && storyboard) {
14
14
  throw new Error("Cannot take storyboard visual snapshots without taking end state snapshots. Please set '--takeSnapshots' to true, or '--storyboard' to false.");
@@ -79,8 +79,7 @@ const replayCommandHandler = async ({ apiToken, commitSha, sessionId, appUrl, si
79
79
  let finalToken;
80
80
  if (isInteractive) {
81
81
  const resolvedToken = await (0, client_1.getAuthToken)(apiToken);
82
- finalToken =
83
- resolvedToken !== null && resolvedToken !== void 0 ? resolvedToken : (await (0, client_1.performOAuthLogin)()).accessToken;
82
+ finalToken = resolvedToken !== null && resolvedToken !== void 0 ? resolvedToken : (await (0, client_1.performOAuthLogin)()).accessToken;
84
83
  }
85
84
  else {
86
85
  finalToken = apiToken !== null && apiToken !== void 0 ? apiToken : undefined;
@@ -89,7 +88,7 @@ const replayCommandHandler = async ({ apiToken, commitSha, sessionId, appUrl, si
89
88
  const getOnClosePageCallback = (0, common_1.defer)();
90
89
  try {
91
90
  const replayExecution = await (0, replay_orchestrator_launcher_1.replayAndStoreResults)({
92
- replayTarget: (0, exports.getReplayTarget)({
91
+ replayTarget: getReplayTarget({
93
92
  appUrl: appUrl !== null && appUrl !== void 0 ? appUrl : null,
94
93
  simulationIdForAssets: simulationIdForAssets !== null && simulationIdForAssets !== void 0 ? simulationIdForAssets : null,
95
94
  }),
@@ -153,78 +152,74 @@ const getReplayTarget = ({ appUrl, simulationIdForAssets, }) => {
153
152
  }
154
153
  return { type: "original-recorded-url" };
155
154
  };
156
- exports.getReplayTarget = getReplayTarget;
157
- exports.replayCommand = (0, command_builder_1.buildCommand)("simulate")
158
- .details({
159
- aliases: ["replay"],
160
- describe: "Simulate (replay) a recorded session",
161
- })
162
- .options({
163
- apiToken: common_options_1.OPTIONS.apiToken,
164
- commitSha: common_options_1.OPTIONS.commitSha,
165
- sessionId: {
166
- string: true,
167
- demandOption: true,
155
+ exports.replayCommand = {
156
+ command: ["simulate", "replay"],
157
+ describe: "Replay a recorded session",
158
+ builder: {
159
+ apiToken: common_options_1.OPTIONS.apiToken,
160
+ commitSha: common_options_1.OPTIONS.commitSha,
161
+ sessionId: {
162
+ string: true,
163
+ demandOption: true,
164
+ },
165
+ appUrl: {
166
+ string: true,
167
+ description: "The URL to execute the test against. If left absent will use the URL the test was originally recorded against.",
168
+ },
169
+ simulationIdForAssets: {
170
+ string: true,
171
+ conflicts: "appUrl",
172
+ description: "If present will run the session against a local server serving up previously snapshotted assets (HTML, JS, CSS etc.) from the specified prior simulation, instead of against a URL. An alternative to specifying an app URL.",
173
+ },
174
+ takeSnapshots: {
175
+ boolean: true,
176
+ description: "Take a visual snapshot at the end of simulation",
177
+ alias: "screenshot",
178
+ default: true,
179
+ },
180
+ debugger: {
181
+ boolean: true,
182
+ description: "Opens a step through debugger to advance through the replay event by event",
183
+ default: false,
184
+ },
185
+ startAtEvent: {
186
+ number: true,
187
+ description: "Automatically advance to this event number when starting the debugger (e.g., to jump to 'Event #95' use --startAtEvent=95). Requires --debugger flag.",
188
+ },
189
+ moveBeforeMouseEvent: common_options_1.OPTIONS.moveBeforeMouseEvent,
190
+ cookiesFile: {
191
+ string: true,
192
+ description: "Path to cookies to inject before simulation",
193
+ },
194
+ baseReplayId: {
195
+ string: true,
196
+ description: "Base replay id to diff the visual snapshots against",
197
+ alias: "baseSimulationId",
198
+ },
199
+ networkDebuggingRequestRegexes: {
200
+ type: "array",
201
+ string: true,
202
+ description: "Regexes to match requests against for debug logging",
203
+ },
204
+ networkDebuggingTransformationFns: {
205
+ type: "array",
206
+ string: true,
207
+ description: "Request transformations to log. Will log all if not specified.",
208
+ },
209
+ networkDebuggingRequestTypes: {
210
+ type: "array",
211
+ string: true,
212
+ description: "Types of requests to capture",
213
+ choices: ["original-recorded-request", "request-to-match"],
214
+ },
215
+ networkDebuggingWebsocketUrlRegexes: {
216
+ type: "array",
217
+ string: true,
218
+ description: "Regexes to match websocket URLs against for debug logging",
219
+ },
220
+ ...common_options_1.COMMON_REPLAY_OPTIONS,
221
+ ...common_options_1.SCREENSHOT_DIFF_OPTIONS,
168
222
  },
169
- appUrl: {
170
- string: true,
171
- description: "The URL to execute the test against. If left absent will use the URL the test was originally recorded against.",
172
- },
173
- simulationIdForAssets: {
174
- string: true,
175
- conflicts: "appUrl",
176
- description: "If present will run the session against a local server serving up previously snapshotted assets (HTML, JS, CSS etc.) from the specified prior simulation, instead of against a URL. An alternative to specifying an app URL.",
177
- },
178
- takeSnapshots: {
179
- boolean: true,
180
- description: "Take a visual snapshot at the end of simulation",
181
- alias: "screenshot",
182
- default: true,
183
- },
184
- debugger: {
185
- boolean: true,
186
- description: "Opens a step through debugger to advance through the replay event by event",
187
- default: false,
188
- },
189
- startAtEvent: {
190
- number: true,
191
- description: "Automatically advance to this event number when starting the debugger (e.g., to jump to 'Event #95' use --startAtEvent=95). Requires --debugger flag. Events will replay rapidly until reaching the specified event.",
192
- },
193
- moveBeforeMouseEvent: common_options_1.OPTIONS.moveBeforeMouseEvent,
194
- cookiesFile: {
195
- string: true,
196
- description: "Path to cookies to inject before simulation",
197
- },
198
- baseReplayId: {
199
- string: true,
200
- description: "Base simulation id to diff the visual snapshots against",
201
- alias: "baseSimulationId",
202
- },
203
- networkDebuggingRequestRegexes: {
204
- type: "array",
205
- string: true,
206
- description: "Regexes to match requests against for debug logging",
207
- },
208
- networkDebuggingTransformationFns: {
209
- type: "array",
210
- string: true,
211
- description: "Request transformations to log. Will log all if not specified.",
212
- },
213
- networkDebuggingRequestTypes: {
214
- type: "array",
215
- string: true,
216
- description: "Types of requests to capture",
217
- choices: ["original-recorded-request", "request-to-match"],
218
- },
219
- networkDebuggingWebsocketUrlRegexes: {
220
- type: "array",
221
- string: true,
222
- description: "Regexes to match websocket URLs against for debug logging",
223
- },
224
- ...common_options_1.COMMON_REPLAY_OPTIONS,
225
- ...common_options_1.SCREENSHOT_DIFF_OPTIONS,
226
- })
227
- .handler(async (options) => {
228
- await replayCommandHandler(options);
229
- });
223
+ handler: (0, sentry_utils_1.wrapHandler)(handler),
224
+ };
230
225
  //# sourceMappingURL=replay.command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replay.command.js","sourceRoot":"","sources":["../../src/commands/replay.command.ts"],"names":[],"mappings":";;;AAIA,qDAIkC;AAClC,qDAAiD;AACjD,iGAAuF;AAWvF,oEAIyC;AACzC,gEAA4D;AAC5D,gFAG2C;AAC3C,6DAAiE;AAyBjE,MAAM,OAAO,GAAG,KAAK,EAAE,EACrB,QAAQ,EACR,SAAS,EACT,SAAS,EACT,MAAM,EACN,qBAAqB,EACrB,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,aAAa,EACb,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,SAAS,EACT,eAAe,EACf,oBAAoB,EACpB,WAAW,EACX,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,aAAa,EACb,aAAa,EACb,UAAU,EACV,qBAAqB,EACrB,yBAAyB,EACzB,8BAA8B,EAC9B,QAAQ,EAAE,yBAAyB,EACnC,YAAY,EACZ,8BAA8B,EAC9B,iCAAiC,EACjC,4BAA4B,EAC5B,mCAAmC,EACnC,iBAAiB,GACT,EAAiB,EAAE;;IAC3B,IAAI,CAAC,aAAa,IAAI,UAAU,EAAE;QAChC,MAAM,IAAI,KAAK,CACb,+IAA+I,CAChJ,CAAC;KACH;IAED,IAAI,QAAQ,IAAI,yBAAyB,EAAE;QACzC,MAAM,IAAI,KAAK,CACb,4EAA4E,CAC7E,CAAC;KACH;IAED,IAAI,YAAY,IAAI,IAAI,EAAE;QACxB,IAAI,CAAC,yBAAyB,EAAE;YAC9B,MAAM,IAAI,KAAK,CACb,uEAAuE,CACxE,CAAC;SACH;QAED,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE;YACnC,MAAM,IAAI,KAAK,CACb,iCAAiC,YAAY,uBAAuB,CACrE,CAAC;SACH;QAED,IAAI,YAAY,GAAG,CAAC,EAAE;YACpB,MAAM,IAAI,KAAK,CACb,iCAAiC,YAAY,yBAAyB,CACvE,CAAC;SACH;KACF;IAED,IAAI,uBAAuB,GAAwC,SAAS,CAAC;IAE7E,I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WAAW,EACT,uJAAuJ;SAC1J;QACD,oBAAoB,EAAE,wBAAO,CAAC,oBAAoB;QAClD,WAAW,EAAE;YACX,MAAM,EAAE,IAAI;YACZ,WAAW,EAAE,6CAA6C;SAC3D;QACD,YAAY,EAAE;YACZ,MAAM,EAAE,IAAI;YACZ,WAAW,EAAE,qDAAqD;YAClE,KAAK,EAAE,kBAAkB;SAC1B;QACD,8BAA8B,EAAE;YAC9B,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,IAAI;YACZ,WAAW,EAAE,qDAAqD;SACnE;QACD,iCAAiC,EAAE;YACjC,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,IAAI;YACZ,WAAW,EACT,gEAAgE;SACnE;QACD,4BAA4B,EAAE;YAC5B,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,IAAI;YACZ,WAAW,EAAE,8BAA8B;YAC3C,OAAO,EAAE,CAAC,2BAA2B,EAAE,kBAAkB,CAAC;SAC3D;QACD,mCAAmC,EAAE;YACnC,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,IAAI;YACZ,WAAW,EAAE,2DAA2D;SACzE;QACD,GAAG,sCAAqB;QACxB,GAAG,wCAAuB;KAC3B;IACD,OAAO,EAAE,IAAA,0BAAW,EAAC,OAAO,CAAC;CAC9B,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,7 +1,4 @@
1
- export { downloadReplayCommand } from "./commands/download-replay/download-replay.command";
2
- export { downloadSessionCommand } from "./commands/download-session/download-session.command";
3
- export { recordCommand } from "./commands/record/record.command";
4
- export { replayCommand } from "./commands/replay/replay.command";
5
- export { runAllTestsCommand } from "./commands/run-all-tests/run-all-tests.command";
6
- export { showProjectCommand } from "./commands/show-project/show-project.command";
7
- export { startLocalTunnelCommand } from "./commands/start-local-tunnel/start-local-tunnel.command";
1
+ export { recordCommand } from "./commands/record/index";
2
+ export { replayCommand } from "./commands/replay.command";
3
+ export { ciRunLocalCommand } from "./commands/ci/run-local.command";
4
+ export { ciStartTunnelCommand } from "./commands/ci/start-tunnel.command";
package/dist/index.js CHANGED
@@ -1,18 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.startLocalTunnelCommand = exports.showProjectCommand = exports.runAllTestsCommand = exports.replayCommand = exports.recordCommand = exports.downloadSessionCommand = exports.downloadReplayCommand = void 0;
4
- var download_replay_command_1 = require("./commands/download-replay/download-replay.command");
5
- Object.defineProperty(exports, "downloadReplayCommand", { enumerable: true, get: function () { return download_replay_command_1.downloadReplayCommand; } });
6
- var download_session_command_1 = require("./commands/download-session/download-session.command");
7
- Object.defineProperty(exports, "downloadSessionCommand", { enumerable: true, get: function () { return download_session_command_1.downloadSessionCommand; } });
8
- var record_command_1 = require("./commands/record/record.command");
9
- Object.defineProperty(exports, "recordCommand", { enumerable: true, get: function () { return record_command_1.recordCommand; } });
10
- var replay_command_1 = require("./commands/replay/replay.command");
3
+ exports.ciStartTunnelCommand = exports.ciRunLocalCommand = exports.replayCommand = exports.recordCommand = void 0;
4
+ var index_1 = require("./commands/record/index");
5
+ Object.defineProperty(exports, "recordCommand", { enumerable: true, get: function () { return index_1.recordCommand; } });
6
+ var replay_command_1 = require("./commands/replay.command");
11
7
  Object.defineProperty(exports, "replayCommand", { enumerable: true, get: function () { return replay_command_1.replayCommand; } });
12
- var run_all_tests_command_1 = require("./commands/run-all-tests/run-all-tests.command");
13
- Object.defineProperty(exports, "runAllTestsCommand", { enumerable: true, get: function () { return run_all_tests_command_1.runAllTestsCommand; } });
14
- var show_project_command_1 = require("./commands/show-project/show-project.command");
15
- Object.defineProperty(exports, "showProjectCommand", { enumerable: true, get: function () { return show_project_command_1.showProjectCommand; } });
16
- var start_local_tunnel_command_1 = require("./commands/start-local-tunnel/start-local-tunnel.command");
17
- Object.defineProperty(exports, "startLocalTunnelCommand", { enumerable: true, get: function () { return start_local_tunnel_command_1.startLocalTunnelCommand; } });
8
+ var run_local_command_1 = require("./commands/ci/run-local.command");
9
+ Object.defineProperty(exports, "ciRunLocalCommand", { enumerable: true, get: function () { return run_local_command_1.ciRunLocalCommand; } });
10
+ var start_tunnel_command_1 = require("./commands/ci/start-tunnel.command");
11
+ Object.defineProperty(exports, "ciStartTunnelCommand", { enumerable: true, get: function () { return start_tunnel_command_1.ciStartTunnelCommand; } });
18
12
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,8FAA2F;AAAlF,gIAAA,qBAAqB,OAAA;AAC9B,iGAA8F;AAArF,kIAAA,sBAAsB,OAAA;AAC/B,mEAAiE;AAAxD,+GAAA,aAAa,OAAA;AACtB,mEAAiE;AAAxD,+GAAA,aAAa,OAAA;AACtB,wFAAoF;AAA3E,2HAAA,kBAAkB,OAAA;AAC3B,qFAAkF;AAAzE,0HAAA,kBAAkB,OAAA;AAC3B,uGAAmG;AAA1F,qIAAA,uBAAuB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,iDAAwD;AAA/C,sGAAA,aAAa,OAAA;AACtB,4DAA0D;AAAjD,+GAAA,aAAa,OAAA;AACtB,qEAAoE;AAA3D,sHAAA,iBAAiB,OAAA;AAC1B,2EAA0E;AAAjE,4HAAA,oBAAoB,OAAA"}
package/dist/main.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const main: () => void;
1
+ export declare const main: () => Promise<void>;
package/dist/main.js CHANGED
@@ -8,22 +8,14 @@ const path_1 = require("path");
8
8
  const common_1 = require("@alwaysmeticulous/common");
9
9
  const sentry_1 = require("@alwaysmeticulous/sentry");
10
10
  const yargs_1 = __importDefault(require("yargs"));
11
- const download_replay_command_1 = require("./commands/download-replay/download-replay.command");
12
- const download_session_command_1 = require("./commands/download-session/download-session.command");
13
- const download_test_run_command_1 = require("./commands/download-test-run/download-test-run.command");
14
- const logout_command_1 = require("./commands/logout/logout.command");
15
- const prepare_for_meticulous_tests_command_1 = require("./commands/prepare-for-meticulous-tests/prepare-for-meticulous-tests.command");
16
- const record_command_1 = require("./commands/record/record.command");
17
- const record_login_command_1 = require("./commands/record-login/record-login.command");
18
- const replay_command_1 = require("./commands/replay/replay.command");
19
- const run_all_tests_command_1 = require("./commands/run-all-tests/run-all-tests.command");
20
- const run_all_tests_in_cloud_command_1 = require("./commands/run-all-tests-in-cloud/run-all-tests-in-cloud.command");
21
- const show_project_command_1 = require("./commands/show-project/show-project.command");
22
- const start_local_tunnel_command_1 = require("./commands/start-local-tunnel/start-local-tunnel.command");
23
- const upload_assets_and_execute_test_run_in_cloud_command_1 = require("./commands/upload-assets-and-execute-test-run-in-cloud/upload-assets-and-execute-test-run-in-cloud.command");
24
- const upload_container_and_execute_test_run_in_cloud_command_1 = require("./commands/upload-container-and-execute-test-run-in-cloud/upload-container-and-execute-test-run-in-cloud.command");
25
- const whoami_command_1 = require("./commands/whoami/whoami.command");
26
- const sentry_utils_1 = require("./utils/sentry.utils");
11
+ const sentry_utils_1 = require("./command-utils/sentry.utils");
12
+ const index_1 = require("./commands/auth/index");
13
+ const index_2 = require("./commands/ci/index");
14
+ const deprecated_aliases_1 = require("./commands/deprecated-aliases");
15
+ const index_3 = require("./commands/download/index");
16
+ const index_4 = require("./commands/project/index");
17
+ const index_5 = require("./commands/record/index");
18
+ const replay_command_1 = require("./commands/replay.command");
27
19
  const handleDataDir = (dataDir) => {
28
20
  (0, common_1.setMeticulousLocalDataDir)(dataDir);
29
21
  };
@@ -32,26 +24,21 @@ const main = async () => {
32
24
  const packageJsonPath = (0, path_1.normalize)((0, path_1.join)(__dirname, "../package.json"));
33
25
  const meticulousVersion = await (0, common_1.getMeticulousVersion)(packageJsonPath);
34
26
  await (0, sentry_1.initSentry)(meticulousVersion);
35
- await yargs_1.default
27
+ const cli = yargs_1.default
36
28
  .scriptName("meticulous")
37
29
  .usage(`$0 <command>
38
30
 
39
31
  Meticulous CLI`)
40
- .command(download_replay_command_1.downloadReplayCommand)
41
- .command(download_session_command_1.downloadSessionCommand)
42
- .command(download_test_run_command_1.downloadTestRunCommand)
43
- .command(prepare_for_meticulous_tests_command_1.prepareForMeticulousTestsCommand)
44
- .command(record_command_1.recordCommand)
45
- .command(record_login_command_1.recordLoginCommand)
46
- .command(replay_command_1.replayCommand)
47
- .command(run_all_tests_command_1.runAllTestsCommand)
48
- .command(run_all_tests_in_cloud_command_1.runAllTestsInCloudCommand)
49
- .command(show_project_command_1.showProjectCommand)
50
- .command(start_local_tunnel_command_1.startLocalTunnelCommand)
51
- .command(upload_assets_and_execute_test_run_in_cloud_command_1.uploadAssetsAndExecuteTestRunInCloudCommand)
52
- .command(upload_container_and_execute_test_run_in_cloud_command_1.uploadContainerAndExecuteTestRunInCloudCommand)
53
- .command(whoami_command_1.whoamiCommand)
54
- .command(logout_command_1.logoutCommand)
32
+ .command(index_1.authCommand)
33
+ .command(index_2.ciCommand)
34
+ .command(index_3.downloadCommand)
35
+ .command(index_4.projectCommand)
36
+ .command(index_5.recordCommand)
37
+ .command(replay_command_1.replayCommand);
38
+ for (const alias of deprecated_aliases_1.deprecatedAliases) {
39
+ cli.command(alias);
40
+ }
41
+ await cli
55
42
  .help()
56
43
  .strict()
57
44
  .demandCommand()
@@ -72,5 +59,5 @@ const main = async () => {
72
59
  ]).argv;
73
60
  };
74
61
  exports.main = main;
75
- (0, exports.main)();
62
+ void (0, exports.main)();
76
63
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;;;;;AAAA,+BAAuC;AACvC,qDAKkC;AAClC,qDAAsD;AACtD,kDAA0B;AAC1B,gGAA2F;AAC3F,mGAA8F;AAC9F,sGAAgG;AAChG,qEAAiE;AACjE,uIAAgI;AAChI,qEAAiE;AACjE,uFAAkF;AAClF,qEAAiE;AACjE,0FAAoF;AACpF,qHAA6G;AAC7G,uFAA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