@alwaysmeticulous/sdk-bundles-api 2.161.0 → 2.163.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.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { RecordConfig, RecordSettings, RecordState } from "./record";
1
+ export { RecordConfig, RecordSettings } from "./record";
2
2
  export { MeticulousWindowConfig, NetworkResponseSanitizer, } from "./record/record-settings";
3
3
  export * from "./record/middleware";
4
4
  export { ReplayAndStoreResultsOptions, ReplayTarget, SnapshottedAssetsReplayTarget, URLReplayTarget, OriginalRecordedURLReplayTarget, ReplayExecutionOptions, ReplayOrchestratorScreenshottingOptions, GeneratedBy, GeneratedByNotebookRun, GeneratedByTestRun, GeneratedByReplayCommand, ScreenshotComparisonOptions, ScreenshotComparisonEnabledOptions, CompareScreenshotsTo, CompareScreenshotsToSpecificReplay, CompareScreenshotsToTestRun, DoNotCompareScreenshots, OutOfDateClientError, BeforeUserEventOptions, AppUrlConfig, } from "./replay-orchestrator/sdk-to-bundle/execute-replay";
@@ -8,3 +8,5 @@ export { ExecuteTestRunResult, TestRunExecution, RunningTestRunExecution, Finish
8
8
  export { InProgressTestRun } from "./replay-orchestrator/bundle-to-sdk/execute-scheduled-test-run";
9
9
  export { ReplayAndStoreResultsResult, ReplayExecution, BeforeUserEventResult, IndexedReplayableEvent, } from "./replay-orchestrator/bundle-to-sdk/execute-replay";
10
10
  export { ScreenshotDiffData } from "./replay-orchestrator/bundle-to-sdk/execute-replay";
11
+ export { MeticulousPublicApi } from "./window-api/public-window-api";
12
+ export { MeticulousPrivateApi } from "./window-api/private-window-api";
@@ -40,13 +40,6 @@ export interface RecordConfig extends DeepRequired<Omit<RecordSettings, "disable
40
40
  startTime: Date;
41
41
  windowHostname: string;
42
42
  }
43
- /**
44
- * Meticulous record state and functions
45
- */
46
- export interface RecordState {
47
- /** Initialises and starts Meticulous recording */
48
- initialiseRecorder?: () => void;
49
- }
50
43
  type DeepRequired<T> = T extends object ? {
51
44
  [P in keyof T]-?: DeepRequired<T[P]>;
52
45
  } : T;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This API is exposed on the window under `window.__meticulous`.
3
+ *
4
+ * Please do NOT use. This is designed for internal usage only.
5
+ */
6
+ export interface MeticulousPrivateApi {
7
+ earlyNetworkRecorder?: {
8
+ dispose?: () => Promise<void>;
9
+ };
10
+ /** Initialises and starts Meticulous recording */
11
+ initialiseRecorder?: () => void;
12
+ stopRecording?: () => void;
13
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=private-window-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"private-window-api.js","sourceRoot":"","sources":["../../src/window-api/private-window-api.ts"],"names":[],"mappings":""}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * This API is exposed on the window under `window.Meticulous`.
3
+ */
4
+ export type MeticulousPublicApi = MeticulousPublicApiCommon & ({
5
+ isRunningAsTest: true;
6
+ replay: MeticulousPublicReplayApi;
7
+ } | {
8
+ isRunningAsTest: false;
9
+ record: MeticulousPublicRecordApi;
10
+ });
11
+ export interface MeticulousPublicApiCommon {
12
+ isRunningAsTest?: boolean;
13
+ }
14
+ export interface MeticulousPublicReplayApi {
15
+ /**
16
+ * Call this method to pause the Meticulous replay while your code performs an asynchronous operation
17
+ * that Meticulous does not automatically pause for, such as communication with a Chrome extension.
18
+ *
19
+ * See https://app.meticulous.ai/docs/how-to/fix-false-positive-diffs#pausing-meticulous-replays
20
+ */
21
+ pause: () => void;
22
+ /**
23
+ * See https://app.meticulous.ai/docs/how-to/fix-false-positive-diffs#pausing-meticulous-replays
24
+ */
25
+ resume: () => void;
26
+ /**
27
+ * Call this method to retrieve custom data that was recorded during the test run.
28
+ */
29
+ retrieveCustomData(key: string): string | null;
30
+ /**
31
+ * Call this method to retrieve an array of custom data that was recorded during the test run.
32
+ */
33
+ retrieveCustomDataArray(arrayId: string): string[];
34
+ }
35
+ export interface MeticulousPublicRecordApi {
36
+ /**
37
+ * Call this method to record a single custom data value during the test run.
38
+ * Repeated calls to this method with the same key will overwrite the previous value.
39
+ */
40
+ recordCustomData(key: string, value: string): {
41
+ success: boolean;
42
+ };
43
+ /**
44
+ * Call this method to push a value to an array of custom data during the test run.
45
+ * If the array does not exist, it will be created.
46
+ * If the array already exists, the value will be appended to it.
47
+ */
48
+ pushToCustomDataArray(arrayId: string, valueToAppend: string): {
49
+ success: boolean;
50
+ };
51
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=public-window-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-window-api.js","sourceRoot":"","sources":["../../src/window-api/public-window-api.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwaysmeticulous/sdk-bundles-api",
3
- "version": "2.161.0",
3
+ "version": "2.163.0",
4
4
  "description": "Meticulous common types",
5
5
  "license": "ISC",
6
6
  "main": "dist/index.js",
@@ -19,7 +19,7 @@
19
19
  "depcheck": "depcheck --ignore-patterns=dist"
20
20
  },
21
21
  "devDependencies": {
22
- "@alwaysmeticulous/api": "^2.158.1"
22
+ "@alwaysmeticulous/api": "^2.163.0"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "loglevel": "^1.8.0"
@@ -46,5 +46,5 @@
46
46
  "bugs": {
47
47
  "url": "https://github.com/alwaysmeticulous/meticulous-sdk/issues"
48
48
  },
49
- "gitHead": "64e42104344377fca631912b5447ec16a7b29d12"
49
+ "gitHead": "3433132494bcd861f837662603d25556521dbeac"
50
50
  }