@alwaysmeticulous/cli 2.31.0 → 2.32.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.
@@ -22,8 +22,9 @@ const getConfigFilePath = async () => {
22
22
  return configFilePath;
23
23
  };
24
24
  const validateReplayOptions = (prevOptions) => {
25
- const { screenshotSelector, diffThreshold, diffPixelThreshold, moveBeforeClick, simulationIdForAssets, } = prevOptions;
25
+ const { appUrl, screenshotSelector, diffThreshold, diffPixelThreshold, moveBeforeClick, simulationIdForAssets, } = prevOptions;
26
26
  return {
27
+ ...(appUrl != null ? { appUrl } : {}),
27
28
  ...(screenshotSelector != null ? { screenshotSelector } : {}),
28
29
  ...(diffThreshold != null ? { diffThreshold } : {}),
29
30
  ...(diffPixelThreshold != null ? { diffPixelThreshold } : {}),
@@ -12,7 +12,7 @@ const addTestCase = async (testCase) => {
12
12
  };
13
13
  exports.addTestCase = addTestCase;
14
14
  const getReplayTargetForTestCase = ({ useAssetsSnapshottedInBaseSimulation, appUrl, testCase, }) => {
15
- var _a, _b;
15
+ var _a, _b, _c;
16
16
  if (((_a = testCase.options) === null || _a === void 0 ? void 0 : _a.simulationIdForAssets) != null) {
17
17
  return {
18
18
  type: "snapshotted-assets",
@@ -28,6 +28,12 @@ const getReplayTargetForTestCase = ({ useAssetsSnapshottedInBaseSimulation, appU
28
28
  simulationIdForAssets: testCase.baseReplayId,
29
29
  };
30
30
  }
31
+ if ((_c = testCase.options) === null || _c === void 0 ? void 0 : _c.appUrl) {
32
+ if (appUrl) {
33
+ throw new Error(`Test cases "${testCase.title}" has an "appUrl" option but --appUrl is also provided.`);
34
+ }
35
+ return { type: "url", appUrl: testCase.options.appUrl };
36
+ }
31
37
  if (appUrl) {
32
38
  return { type: "url", appUrl };
33
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwaysmeticulous/cli",
3
- "version": "2.31.0",
3
+ "version": "2.32.0",
4
4
  "description": "The Meticulous CLI",
5
5
  "license": "ISC",
6
6
  "main": "dist/index.js",
@@ -25,7 +25,7 @@
25
25
  "test": "jest"
26
26
  },
27
27
  "dependencies": {
28
- "@alwaysmeticulous/common": "^2.30.1",
28
+ "@alwaysmeticulous/common": "^2.32.0",
29
29
  "@sentry/node": "^7.36.0",
30
30
  "@sentry/tracing": "^7.36.0",
31
31
  "adm-zip": "^0.5.9",
@@ -43,7 +43,7 @@
43
43
  "yargs": "^17.5.1"
44
44
  },
45
45
  "devDependencies": {
46
- "@alwaysmeticulous/api": "^2.30.1",
46
+ "@alwaysmeticulous/api": "^2.32.0",
47
47
  "@types/express": "^4.17.14",
48
48
  "@types/proper-lockfile": "^4.1.2"
49
49
  },
@@ -93,5 +93,5 @@
93
93
  "coverageDirectory": "../coverage",
94
94
  "testEnvironment": "node"
95
95
  },
96
- "gitHead": "1b4b8369e9cde22a1c0b351f02968817c111b6f2"
96
+ "gitHead": "af5dfd9ad6fcfff55c9fe36df17233d9455b538b"
97
97
  }