@alwaysmeticulous/cli 2.3.4 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/command-utils/command-utils.d.ts +9 -0
  2. package/dist/command-utils/command-utils.js +18 -0
  3. package/dist/command-utils/common-options.d.ts +110 -0
  4. package/dist/command-utils/common-options.js +87 -0
  5. package/dist/command-utils/common-types.d.ts +20 -0
  6. package/dist/command-utils/common-types.js +2 -0
  7. package/dist/commands/create-test/create-test.command.d.ts +2 -2
  8. package/dist/commands/create-test/create-test.command.js +23 -40
  9. package/dist/commands/record/record.command.d.ts +9 -9
  10. package/dist/commands/record/record.command.js +2 -1
  11. package/dist/commands/replay/replay.command.d.ts +24 -26
  12. package/dist/commands/replay/replay.command.js +84 -76
  13. package/dist/commands/run-all-tests/run-all-tests.command.d.ts +11 -18
  14. package/dist/commands/run-all-tests/run-all-tests.command.js +38 -77
  15. package/dist/commands/screenshot-diff/screenshot-diff.command.d.ts +4 -4
  16. package/dist/commands/screenshot-diff/screenshot-diff.command.js +15 -19
  17. package/dist/config/config.js +2 -3
  18. package/dist/config/config.types.d.ts +7 -8
  19. package/dist/deflake-tests/deflake-tests.handler.d.ts +12 -3
  20. package/dist/deflake-tests/deflake-tests.handler.js +41 -6
  21. package/dist/image/diff.utils.d.ts +8 -1
  22. package/dist/image/diff.utils.js +1 -5
  23. package/dist/parallel-tests/messages.types.d.ts +3 -18
  24. package/dist/parallel-tests/parallel-tests.handler.d.ts +9 -14
  25. package/dist/parallel-tests/parallel-tests.handler.js +11 -15
  26. package/dist/parallel-tests/task.handler.js +2 -26
  27. package/dist/tsconfig.tsbuildinfo +1 -1
  28. package/dist/utils/config.utils.d.ts +6 -1
  29. package/dist/utils/config.utils.js +17 -8
  30. package/package.json +6 -6
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getSimulationIdForAssets = exports.addTestCase = void 0;
3
+ exports.getReplayTargetForTestCase = exports.addTestCase = void 0;
4
4
  const config_1 = require("../config/config");
5
5
  const addTestCase = async (testCase) => {
6
6
  const meticulousConfig = await (0, config_1.readConfig)();
@@ -11,14 +11,23 @@ const addTestCase = async (testCase) => {
11
11
  await (0, config_1.saveConfig)(newConfig);
12
12
  };
13
13
  exports.addTestCase = addTestCase;
14
- const getSimulationIdForAssets = (testCase, useAssetsSnapshottedInBaseSimulation) => {
15
- var _a;
16
- if ((_a = testCase.options) === null || _a === void 0 ? void 0 : _a.useAssetsFromReplayId) {
17
- return testCase.options.useAssetsFromReplayId;
14
+ const getReplayTargetForTestCase = ({ useAssetsSnapshottedInBaseSimulation, appUrl, testCase, }) => {
15
+ var _a, _b;
16
+ if (((_a = testCase.options) === null || _a === void 0 ? void 0 : _a.simulationIdForAssets) != null) {
17
+ return {
18
+ type: "snapshotted-assets",
19
+ simulationIdForAssets: (_b = testCase.options) === null || _b === void 0 ? void 0 : _b.simulationIdForAssets,
20
+ };
18
21
  }
19
22
  if (useAssetsSnapshottedInBaseSimulation) {
20
- return testCase.baseReplayId;
23
+ return {
24
+ type: "snapshotted-assets",
25
+ simulationIdForAssets: testCase.baseReplayId,
26
+ };
21
27
  }
22
- return undefined;
28
+ if (appUrl) {
29
+ return { type: "url", appUrl };
30
+ }
31
+ return { type: "original-recorded-url" };
23
32
  };
24
- exports.getSimulationIdForAssets = getSimulationIdForAssets;
33
+ exports.getReplayTargetForTestCase = getReplayTargetForTestCase;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwaysmeticulous/cli",
3
- "version": "2.3.4",
3
+ "version": "2.4.0",
4
4
  "description": "The Meticulous CLI",
5
5
  "license": "ISC",
6
6
  "main": "dist/index.js",
@@ -24,7 +24,7 @@
24
24
  "cli:dev": "ts-node src/main.ts"
25
25
  },
26
26
  "dependencies": {
27
- "@alwaysmeticulous/common": "^2.3.4",
27
+ "@alwaysmeticulous/common": "^2.4.0",
28
28
  "@sentry/node": "^7.2.0",
29
29
  "adm-zip": "^0.5.9",
30
30
  "archiver": "^5.3.1",
@@ -43,9 +43,9 @@
43
43
  "@types/express": "^4.17.14"
44
44
  },
45
45
  "peerDependencies": {
46
- "@alwaysmeticulous/record": "^2.3.2",
47
- "@alwaysmeticulous/replay-debugger": "^2.3.2",
48
- "@alwaysmeticulous/replayer": "^2.3.2"
46
+ "@alwaysmeticulous/record": "^2.3.3",
47
+ "@alwaysmeticulous/replay-debugger": "^2.3.3",
48
+ "@alwaysmeticulous/replayer": "^2.3.3"
49
49
  },
50
50
  "peerDependenciesMeta": {
51
51
  "@alwaysmeticulous/record": {
@@ -75,5 +75,5 @@
75
75
  "bugs": {
76
76
  "url": "https://github.com/alwaysmeticulous/meticulous-sdk/issues"
77
77
  },
78
- "gitHead": "25652d1739568f3ca0c88587fa55c2bb706f2c50"
78
+ "gitHead": "530183206cd8ff57b1950fc4c67eeb8672489380"
79
79
  }