@alwaysmeticulous/sdk-bundles-api 2.339.0 → 2.341.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,8 +1,13 @@
1
1
  /**
2
2
  * Transforms one redactable string from a completed backend span before that span is saved.
3
3
  * Hooks run in array order and must return a string.
4
+ *
5
+ * `jsonPath` locates the string within the serialized span, so a hook can tell a database
6
+ * query's serialized arguments from a URL or a header value and redact each appropriately —
7
+ * rewriting serialized JSON with text substitutions risks emitting something that no longer
8
+ * parses, which silently breaks mock matching at replay time.
4
9
  */
5
- export type BackendRecorderSpanRedactionHook = (value: string) => string;
10
+ export type BackendRecorderSpanRedactionHook = (value: string, jsonPath: readonly string[]) => string;
6
11
  export interface BackendRecorderConfig {
7
12
  /** Enable/disable the recorder. Defaults to `true`. */
8
13
  enabled?: boolean;
@@ -1,3 +1,13 @@
1
+ /**
2
+ * How the crawler spends its time on each page it reaches.
3
+ *
4
+ * - `default`: follow links outwards as soon as the page's clickables are
5
+ * exhausted, covering as many pages as the time budget allows.
6
+ * - `depth`: exercise each page before moving on — scroll through it to render
7
+ * everything below the fold, and prefer the elements that keep us on the page
8
+ * (returning to it when a click does navigate away).
9
+ */
10
+ export type CrawlExplorationMode = "default" | "depth";
1
11
  export interface RunCrawlOptions {
2
12
  /**
3
13
  * The API token of the project to record sessions into. If not provided
@@ -36,6 +46,12 @@ export interface RunCrawlOptions {
36
46
  * The maximum number of sessions to record.
37
47
  */
38
48
  maxNumSessions: number;
49
+ /**
50
+ * How to explore each page reached by the crawl. Defaults to `default`.
51
+ *
52
+ * Optional so that a CLI predating this option keeps working.
53
+ */
54
+ explorationMode?: CrawlExplorationMode | undefined;
39
55
  /**
40
56
  * If present the crawler pauses after opening the start URL in the browser,
41
57
  * calls this to let the user manually log in, and only starts crawling once
package/dist/index.d.ts CHANGED
@@ -12,6 +12,6 @@ export { ReplayAndStoreResultsResult, ReplayExecution, BeforeUserEventResult, In
12
12
  export { ScreenshotDiffData } from "./replay-orchestrator/bundle-to-sdk/execute-replay";
13
13
  export { MeticulousPublicApi, 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
- export { RunCrawlOptions, RunCrawlResult, } from "./crawler/sdk-to-bundle/run-crawl";
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";
17
17
  export { BackendRecorderHandle, MeticulousCloudflareBindingKind, MeticulousCloudflareEnvOptions, MeticulousCloudflareEnvWrapper, MeticulousPrismaExtension, MeticulousIORedisWrapper, MeticulousPostgresJsWrapper, MeticulousOperationSpec, MeticulousOperationWrapper, MeticulousObservationRecorder, MeticulousReplayCheck, MeticulousStubReader, MeticulousValueRecorder, } from "./backend-recorder/bundle-to-sdk/init-backend-recorder";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwaysmeticulous/sdk-bundles-api",
3
- "version": "2.339.0",
3
+ "version": "2.341.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.339.0"
12
+ "@alwaysmeticulous/api": "2.341.0"
13
13
  },
14
14
  "author": {
15
15
  "name": "The Meticulous Team",