@alwaysmeticulous/sdk-bundles-api 2.348.0 → 2.350.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
|
@@ -10,7 +10,7 @@ export { InProgressTestRun } from "./replay-orchestrator/bundle-to-sdk/execute-s
|
|
|
10
10
|
export { InProgressTestRunChunk, ExecuteTestRunChunkResult, TestRunChunkExecution, } from "./replay-orchestrator/bundle-to-sdk/execute-scheduled-test-run-chunk";
|
|
11
11
|
export { ReplayAndStoreResultsResult, ReplayExecution, BeforeUserEventResult, IndexedReplayableEvent, } from "./replay-orchestrator/bundle-to-sdk/execute-replay";
|
|
12
12
|
export { ScreenshotDiffData } from "./replay-orchestrator/bundle-to-sdk/execute-replay";
|
|
13
|
-
export { MeticulousPublicApi, FeatureFlagOverride, MeticulousPressureObserver, MeticulousPressureObserverConstructor, MeticulousPressureRecord, MeticulousPressureSource, MeticulousPressureState, RecordCustomSnapshotOptions, OnBeforeScreenshotListener, OnBeforeScreenshotListenerOptions, OnReplayCompletionListener, OnReplayCompletionListenerOptions, } from "./window-api/public-window-api";
|
|
13
|
+
export { MeticulousPublicApi, MeticulousPublicAgentSwarmReplayApi, FeatureFlagOverride, MeticulousPressureObserver, MeticulousPressureObserverConstructor, MeticulousPressureRecord, MeticulousPressureSource, MeticulousPressureState, RecordCustomSnapshotOptions, OnBeforeScreenshotListener, OnBeforeScreenshotListenerOptions, OnReplayCompletionListener, OnReplayCompletionListenerOptions, } from "./window-api/public-window-api";
|
|
14
14
|
export { MeticulousPrivateApi } from "./window-api/private-window-api";
|
|
15
15
|
export { CrawlExplorationMode, RunCrawlOptions, RunCrawlResult, } from "./crawler/sdk-to-bundle/run-crawl";
|
|
16
16
|
export { BackendRecorderConfig, BackendRecorderSpanRedactionHook, } from "./backend-recorder/sdk-to-bundle/init-backend-recorder";
|
|
@@ -111,6 +111,17 @@ export interface ReplayAndStoreResultsOptions {
|
|
|
111
111
|
chunkNumber: number;
|
|
112
112
|
chunkAttempt: number;
|
|
113
113
|
};
|
|
114
|
+
/**
|
|
115
|
+
* Customer feature flag values this replay should force, keyed by flag name. Served to the
|
|
116
|
+
* application through `window.Meticulous.context.getFlagOverride` and `getAllFlagOverrides`.
|
|
117
|
+
* Absent or empty means no flag is overridden. Distinct from Meticulous's own engine
|
|
118
|
+
* feature flags.
|
|
119
|
+
*
|
|
120
|
+
* In cloud test runs this is only set on flag-variant replays, never on the ordinary
|
|
121
|
+
* golden-set pair: forcing flags there would churn screenshots against the value the
|
|
122
|
+
* session recorded.
|
|
123
|
+
*/
|
|
124
|
+
customerFeatureFlagOverrides?: Record<string, string | boolean>;
|
|
114
125
|
}
|
|
115
126
|
export interface PreNavigationResult {
|
|
116
127
|
cookies: Cookie[];
|
|
@@ -8,4 +8,10 @@ export type ExecuteScheduledTestRunChunkOptions = Pick<ExecuteTestRunOptions, "c
|
|
|
8
8
|
* The chunk number to execute.
|
|
9
9
|
*/
|
|
10
10
|
chunkNumber: number;
|
|
11
|
+
/**
|
|
12
|
+
* Epoch milliseconds at which the worker running this chunk will kill it.
|
|
13
|
+
* When set, flake-check retries that are unlikely to finish before then are
|
|
14
|
+
* skipped. When absent, retries are scheduled without regard to time.
|
|
15
|
+
*/
|
|
16
|
+
chunkDeadlineEpochMs?: number;
|
|
11
17
|
};
|
|
@@ -4,15 +4,37 @@ import type { HarResponse } from "@alwaysmeticulous/api";
|
|
|
4
4
|
*/
|
|
5
5
|
export type MeticulousPublicApi = MeticulousPublicApiCommon & ({
|
|
6
6
|
isRunningAsTest: true;
|
|
7
|
+
isRunningInAgentSwarm?: false;
|
|
7
8
|
replay: MeticulousPublicReplayApi;
|
|
9
|
+
} | {
|
|
10
|
+
isRunningAsTest: true;
|
|
11
|
+
isRunningInAgentSwarm: true;
|
|
12
|
+
replay: MeticulousPublicAgentSwarmReplayApi;
|
|
13
|
+
record: MeticulousPublicRecordApi;
|
|
8
14
|
} | {
|
|
9
15
|
isRunningAsTest: false;
|
|
16
|
+
isRunningInAgentSwarm?: false;
|
|
10
17
|
record: MeticulousPublicRecordApi;
|
|
11
18
|
});
|
|
12
19
|
export interface MeticulousPublicApiCommon {
|
|
13
20
|
isRunningAsTest?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* True when the app is being driven by a Meticulous Agent swarm browser,
|
|
23
|
+
* which records new sessions against a test deployment. `isRunningAsTest` is
|
|
24
|
+
* also true there, so apps that relax behaviour for Meticulous tests do the
|
|
25
|
+
* same for Agent swarm; check this flag only to tell the two apart.
|
|
26
|
+
*/
|
|
27
|
+
isRunningInAgentSwarm?: boolean;
|
|
14
28
|
context: MeticulousPublicContextApi;
|
|
15
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* The replay API exposed in Agent swarm, where no replay is running. Its
|
|
32
|
+
* methods are no-ops so code written for replays keeps working, and replay-only
|
|
33
|
+
* data such as the session being replayed is absent.
|
|
34
|
+
*/
|
|
35
|
+
export type MeticulousPublicAgentSwarmReplayApi = Omit<MeticulousPublicReplayApi, "isBenchmarkableReplay" | "native" | "commitUnderTest" | "sessionBeingReplayed" | "browser"> & {
|
|
36
|
+
isBenchmarkableReplay: false;
|
|
37
|
+
};
|
|
16
38
|
/**
|
|
17
39
|
* Options for {@link MeticulousPublicReplayApi.recordCustomSnapshot}.
|
|
18
40
|
*/
|
|
@@ -460,6 +482,17 @@ export interface MeticulousPublicContextApi {
|
|
|
460
482
|
* recorder is not loaded at all.
|
|
461
483
|
*/
|
|
462
484
|
getFlagOverride(label: string): FeatureFlagOverride;
|
|
485
|
+
/**
|
|
486
|
+
* Every feature flag value the current replay forces, keyed by flag label: the same overrides
|
|
487
|
+
* {@link getFlagOverride} serves one at a time. Useful when your flag client is initialised
|
|
488
|
+
* with a full set of values up front (e.g. LaunchDarkly `bootstrap`), rather than resolving
|
|
489
|
+
* flags one by one.
|
|
490
|
+
*
|
|
491
|
+
* The returned object is a copy, so mutating it has no effect on the replay. Flags absent from
|
|
492
|
+
* it are not overridden, and your application should evaluate them itself. Always returns `{}`
|
|
493
|
+
* outside of a replay, so it is safe to call from production code.
|
|
494
|
+
*/
|
|
495
|
+
getAllFlagOverrides(): Record<string, string | boolean>;
|
|
463
496
|
/**
|
|
464
497
|
* Call this method to record some custom context about the session. For instance, you could use
|
|
465
498
|
* this to capture whether a user is opted into beta features, or what colour scheme they have
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwaysmeticulous/sdk-bundles-api",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.350.0",
|
|
4
4
|
"description": "Meticulous common types",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@alwaysmeticulous/api": "2.
|
|
12
|
+
"@alwaysmeticulous/api": "2.350.0"
|
|
13
13
|
},
|
|
14
14
|
"author": {
|
|
15
15
|
"name": "The Meticulous Team",
|