@alwaysmeticulous/sdk-bundles-api 2.160.0 → 2.162.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;
@@ -123,7 +123,10 @@ export interface NetworkRequestMetadata {
123
123
  */
124
124
  requestStartedAt?: number;
125
125
  }
126
- export interface NetworkResponseMetadata {
126
+ export interface NetworkResponseMetadata extends NetworkResponseTimings {
127
+ request: Omit<HarRequest, "queryString">;
128
+ }
129
+ export interface NetworkResponseTimings {
127
130
  /**
128
131
  * Milliseconds since unix epoch when the request was sent
129
132
  */
@@ -1,4 +1,4 @@
1
- import { NetworkResponseMetadata, RecorderMiddleware } from "./middleware";
1
+ import { NetworkResponseTimings, RecorderMiddleware } from "./middleware";
2
2
  export interface MeticulousWindowConfig {
3
3
  METICULOUS_RECORDING_TOKEN?: string;
4
4
  METICULOUS_UPLOAD_INTERVAL_MS?: number;
@@ -26,5 +26,5 @@ export interface NetworkResponseSanitizer {
26
26
  * at replay time. For example, if you want to sanitize email addresses, replace them with a dummy email address
27
27
  * of a current format. That will ensure that the email address will still pass any validation the application may have.
28
28
  */
29
- sanitizeBody: (body: string, metadata: NetworkResponseMetadata) => string;
29
+ sanitizeBody: (body: string, metadata: NetworkResponseTimings) => string;
30
30
  }
@@ -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,25 @@
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
+ });
10
+ export interface MeticulousPublicApiCommon {
11
+ isRunningAsTest?: boolean;
12
+ }
13
+ export interface MeticulousPublicReplayApi {
14
+ /**
15
+ * Call this method to pause the Meticulous replay while your code performs an asynchronous operation
16
+ * that Meticulous does not automatically pause for, such as communication with a Chrome extension.
17
+ *
18
+ * See https://app.meticulous.ai/docs/how-to/fix-false-positive-diffs#pausing-meticulous-replays
19
+ */
20
+ pause: () => void;
21
+ /**
22
+ * See https://app.meticulous.ai/docs/how-to/fix-false-positive-diffs#pausing-meticulous-replays
23
+ */
24
+ resume: () => void;
25
+ }
@@ -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.160.0",
3
+ "version": "2.162.0",
4
4
  "description": "Meticulous common types",
5
5
  "license": "ISC",
6
6
  "main": "dist/index.js",
@@ -46,5 +46,5 @@
46
46
  "bugs": {
47
47
  "url": "https://github.com/alwaysmeticulous/meticulous-sdk/issues"
48
48
  },
49
- "gitHead": "d1e2c73931448733dd3ad91d9def2720bb5f3b47"
49
+ "gitHead": "d71c448c4d1856a0b62e13439d83bc8081c995b2"
50
50
  }