doc-detective-common 4.13.0 → 4.14.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.
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Auto-generated from runBrowserScript_v3.schema.json
3
+ * Do not edit manually
4
+ */
5
+ /**
6
+ * Execute arbitrary JavaScript in the browser page context. Runs via the WebDriver `executeScript` endpoint, so it has access to the page's `document`, `window`, and DOM. Doc Detective captures the script's return value in the step's `outputs.result`. Distinct from `runCode`, which runs Node/Python/bash on the host machine.
7
+ */
8
+ export type RunBrowserScript = RunBrowserScriptSimple | RunBrowserScriptDetailed;
9
+ /**
10
+ * JavaScript to evaluate in the browser page context. Supports `return` to capture a value into `outputs.result`.
11
+ */
12
+ export type RunBrowserScriptSimple = string;
13
+ export interface RunBrowserScriptDetailed {
14
+ /**
15
+ * JavaScript to evaluate in the browser page context. Supports `return` to capture a value into `outputs.result`. The script reads arguments supplied in `args` through the `arguments` object (`arguments[0]`, `arguments[1]`, and so on).
16
+ */
17
+ script: string;
18
+ /**
19
+ * Arguments passed positionally to the script and exposed through the `arguments` object. Each item may be any JSON-serializable value (string, number, boolean, null, object, or array), matching what `executeScript` accepts.
20
+ */
21
+ args?: unknown[];
22
+ /**
23
+ * Content expected in the script's serialized return value. Doc Detective serializes non-string return values to JSON before matching. If the serialized return value doesn't contain the expected content, the step fails. Supports strings and regular expressions. To use a regular expression, the string must start and end with a forward slash, like in `/^hello-world.* /`.
24
+ */
25
+ output?: string;
26
+ /**
27
+ * File path to save the script's serialized return value, relative to `directory`.
28
+ */
29
+ path?: string;
30
+ /**
31
+ * Directory to save the script's return value. If the directory doesn't exist, creates the directory. If not specified, the directory is your media directory.
32
+ */
33
+ directory?: string;
34
+ /**
35
+ * Allowed variation as a fraction (0 to 1) of text different between the current return value and previously saved value. For example, 0.1 means 10%. If the difference between the current value and the previous value is greater than `maxVariation`, the step returns a warning. If no output exists at `path`, Doc Detective ignores this value.
36
+ */
37
+ maxVariation?: number;
38
+ /**
39
+ * If `true`, overwrites the existing output at `path` if it exists.
40
+ * If `aboveVariation`, overwrites the existing output at `path` if the difference between the new output and the existing output is greater than `maxVariation`.
41
+ */
42
+ overwrite?: "true" | "false" | "aboveVariation";
43
+ /**
44
+ * Maximum time in milliseconds the script may run. If the script runs longer than this, the step fails.
45
+ */
46
+ timeout?: number;
47
+ }
48
+ //# sourceMappingURL=runBrowserScript_v3.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runBrowserScript_v3.d.ts","sourceRoot":"","sources":["../../../src/types/generated/runBrowserScript_v3.ts"],"names":[],"mappings":"AACA;;;GAGG;AAEH;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,GAAG,wBAAwB,CAAC;AACjF;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC;AAE5C,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;IACjB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,gBAAgB,CAAC;IAChD;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,7 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * Auto-generated from runBrowserScript_v3.schema.json
4
+ * Do not edit manually
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=runBrowserScript_v3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runBrowserScript_v3.js","sourceRoot":"","sources":["../../../src/types/generated/runBrowserScript_v3.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB;;;GAGG"}