@alwaysmeticulous/sdk-bundles-api 2.56.0 → 2.60.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.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ScreenshotDiffOptions } from "@alwaysmeticulous/api";
|
|
2
2
|
import { LogLevelNumbers } from "loglevel";
|
|
3
3
|
import { BeforeUserEventResult } from "../bundle-to-sdk/execute-replay";
|
|
4
|
+
import { NetworkStubbingMode } from "./network-stubbing";
|
|
4
5
|
export interface ReplayAndStoreResultsOptions {
|
|
5
6
|
chromeExecutablePath?: string;
|
|
6
7
|
replayTarget: ReplayTarget;
|
|
@@ -115,6 +116,12 @@ export interface ReplayExecutionOptions {
|
|
|
115
116
|
bypassCSP: boolean;
|
|
116
117
|
shiftTime: boolean;
|
|
117
118
|
networkStubbing: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Defaults to {@link StubAllRequests}
|
|
121
|
+
*
|
|
122
|
+
* networkStubbing must be true if networkStubbingMode is set.
|
|
123
|
+
*/
|
|
124
|
+
networkStubbingMode?: NetworkStubbingMode;
|
|
118
125
|
skipPauses: boolean;
|
|
119
126
|
moveBeforeClick: boolean;
|
|
120
127
|
disableRemoteFonts: boolean;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type NetworkStubbingMode = StubAllRequests | StubNonSSRRequests | CustomStubbing;
|
|
2
|
+
/**
|
|
3
|
+
* The default mode. Stubs all requests, apart from ones for _next/static/ files.
|
|
4
|
+
*/
|
|
5
|
+
export interface StubAllRequests {
|
|
6
|
+
type: "stub-all-requests";
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Stubs all requests apart from NextJS 13 /app dir requests to render server components, and requests for _next/static/ files.
|
|
10
|
+
*
|
|
11
|
+
* Used for NextJs 13 /app directory & server components.
|
|
12
|
+
*/
|
|
13
|
+
export interface StubNonSSRRequests {
|
|
14
|
+
type: "stub-non-ssr-requests";
|
|
15
|
+
}
|
|
16
|
+
export interface CustomStubbing {
|
|
17
|
+
type: "custom-stubbing";
|
|
18
|
+
requestsToNotStub: RequestFilter[];
|
|
19
|
+
}
|
|
20
|
+
export interface RequestFilter {
|
|
21
|
+
/**
|
|
22
|
+
* If defined will filter to only match requests to a URL matching the
|
|
23
|
+
* specified regex.
|
|
24
|
+
*
|
|
25
|
+
* Any JS regex that passes https://github.com/tjenkinson/redos-detector is supported.
|
|
26
|
+
*/
|
|
27
|
+
urlRegex: string;
|
|
28
|
+
}
|
|
29
|
+
export interface NoStubbing {
|
|
30
|
+
type: "no-stubbing";
|
|
31
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwaysmeticulous/sdk-bundles-api",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.60.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": "
|
|
49
|
+
"gitHead": "79db2c64a95e1e13360fc94610cd717bbb9baded"
|
|
50
50
|
}
|