doc-detective-common 4.25.1 → 4.26.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.cjs +15966 -4090
- package/dist/schemas/schemas.json +15966 -4090
- package/dist/types/generated/closeSurface_v3.d.ts +2 -2
- package/dist/types/generated/dragAndDrop_v3.d.ts +1 -1
- package/dist/types/generated/goTo_v3.d.ts +1 -1
- package/dist/types/generated/record_v3.d.ts +1 -1
- package/dist/types/generated/runBrowserScript_v3.d.ts +1 -1
- package/dist/types/generated/screenshot_v3.d.ts +1 -1
- package/dist/types/generated/startSurface_v3.d.ts +317 -3
- package/dist/types/generated/startSurface_v3.d.ts.map +1 -1
- package/dist/types/generated/step_v3.d.ts +329 -15
- package/dist/types/generated/step_v3.d.ts.map +1 -1
- package/dist/types/generated/surface_v3.d.ts +1 -1
- package/dist/types/generated/swipe_v3.d.ts +2 -2
- package/dist/types/generated/test_v3.d.ts +669 -41
- package/dist/types/generated/test_v3.d.ts.map +1 -1
- package/dist/types/generated/type_v3.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1038,6 +1038,10 @@ export type Routing58 = {
|
|
|
1038
1038
|
export type Routing59 = {
|
|
1039
1039
|
[k: string]: unknown;
|
|
1040
1040
|
};
|
|
1041
|
+
/**
|
|
1042
|
+
* Open (provision) one or more surfaces and register them by name so later steps can target them with `surface`. Three kinds: a native APP (Windows/macOS desktop by executable path, `.app` path, bundle ID, or UWP AppUserModelID; Android/iOS apps on managed emulators/simulators — macOS desktop additionally requires the Accessibility permission for the process that runs Doc Detective), a BROWSER session (opens blank and ready on the context's automation server; navigate it with a `goTo` step), or a background PROCESS (equivalent to `runShell` with `background` — both forms stay valid). An ARRAY of descriptors opens them all concurrently — the step completes when every one is ready, and device boots overlap. See docs/design/multi-surface-targeting.md and docs/design/native-app-surfaces.md.
|
|
1043
|
+
*/
|
|
1044
|
+
export type StartSurface1 = AppDescriptor | BrowserDescriptor | ProcessDescriptor | ParallelSurfaces;
|
|
1041
1045
|
export type DeviceByName = string;
|
|
1042
1046
|
/**
|
|
1043
1047
|
* Wait for a specific element to be present. At least one finding field must be specified.
|
|
@@ -1045,6 +1049,34 @@ export type DeviceByName = string;
|
|
|
1045
1049
|
export type ElementCriteria2 = {
|
|
1046
1050
|
[k: string]: unknown;
|
|
1047
1051
|
};
|
|
1052
|
+
/**
|
|
1053
|
+
* Open several surfaces concurrently (any mix of kinds). All descriptors launch in parallel; the step completes when every one is ready. Names must be unique within the array and across the context's open surfaces (checked at runtime). Device boots overlap — worth real wall-clock on 30–60s emulator starts.
|
|
1054
|
+
*
|
|
1055
|
+
* @minItems 1
|
|
1056
|
+
*/
|
|
1057
|
+
export type ParallelSurfaces = [
|
|
1058
|
+
AppDescriptor1 | BrowserDescriptor1 | ProcessDescriptor1,
|
|
1059
|
+
...(AppDescriptor1 | BrowserDescriptor1 | ProcessDescriptor1)[]
|
|
1060
|
+
];
|
|
1061
|
+
export type DeviceByName1 = string;
|
|
1062
|
+
/**
|
|
1063
|
+
* Wait for a specific element to be present. At least one finding field must be specified.
|
|
1064
|
+
*/
|
|
1065
|
+
export type ElementCriteria3 = {
|
|
1066
|
+
[k: string]: unknown;
|
|
1067
|
+
} | {
|
|
1068
|
+
[k: string]: unknown;
|
|
1069
|
+
} | {
|
|
1070
|
+
[k: string]: unknown;
|
|
1071
|
+
} | {
|
|
1072
|
+
[k: string]: unknown;
|
|
1073
|
+
} | {
|
|
1074
|
+
[k: string]: unknown;
|
|
1075
|
+
} | {
|
|
1076
|
+
[k: string]: unknown;
|
|
1077
|
+
} | {
|
|
1078
|
+
[k: string]: unknown;
|
|
1079
|
+
};
|
|
1048
1080
|
/**
|
|
1049
1081
|
* A condition expression, or an array of expressions combined with logical AND.
|
|
1050
1082
|
*/
|
|
@@ -1944,7 +1976,7 @@ export interface GoTo {
|
|
|
1944
1976
|
}
|
|
1945
1977
|
export interface BrowserSurface {
|
|
1946
1978
|
/**
|
|
1947
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
1979
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
1948
1980
|
*/
|
|
1949
1981
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
1950
1982
|
/**
|
|
@@ -2747,7 +2779,7 @@ export interface RunBrowserScriptDetailed {
|
|
|
2747
2779
|
}
|
|
2748
2780
|
export interface BrowserSurface1 {
|
|
2749
2781
|
/**
|
|
2750
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
2782
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
2751
2783
|
*/
|
|
2752
2784
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
2753
2785
|
/**
|
|
@@ -2938,7 +2970,7 @@ export interface ProcessSurface {
|
|
|
2938
2970
|
}
|
|
2939
2971
|
export interface BrowserSurface2 {
|
|
2940
2972
|
/**
|
|
2941
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
2973
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
2942
2974
|
*/
|
|
2943
2975
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
2944
2976
|
/**
|
|
@@ -3212,7 +3244,7 @@ export interface CaptureScreenshotFields {
|
|
|
3212
3244
|
}
|
|
3213
3245
|
export interface BrowserSurface3 {
|
|
3214
3246
|
/**
|
|
3215
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
3247
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
3216
3248
|
*/
|
|
3217
3249
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
3218
3250
|
/**
|
|
@@ -3607,7 +3639,7 @@ export interface RecordDetailed {
|
|
|
3607
3639
|
}
|
|
3608
3640
|
export interface BrowserSurface4 {
|
|
3609
3641
|
/**
|
|
3610
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
3642
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
3611
3643
|
*/
|
|
3612
3644
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
3613
3645
|
/**
|
|
@@ -3976,7 +4008,7 @@ export interface ProcessSurface1 {
|
|
|
3976
4008
|
}
|
|
3977
4009
|
export interface BrowserSurface5 {
|
|
3978
4010
|
/**
|
|
3979
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
4011
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
3980
4012
|
*/
|
|
3981
4013
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
3982
4014
|
/**
|
|
@@ -4051,7 +4083,7 @@ export interface ProcessSurface2 {
|
|
|
4051
4083
|
}
|
|
4052
4084
|
export interface BrowserSurface6 {
|
|
4053
4085
|
/**
|
|
4054
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
4086
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
4055
4087
|
*/
|
|
4056
4088
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
4057
4089
|
/**
|
|
@@ -4255,10 +4287,7 @@ export interface StartSurface {
|
|
|
4255
4287
|
startSurface: StartSurface1;
|
|
4256
4288
|
[k: string]: unknown;
|
|
4257
4289
|
}
|
|
4258
|
-
|
|
4259
|
-
* Open (provision) a surface and register it by name so later steps can target it with `surface`. Phases A1–A2 ship the desktop native app branch: launch a Windows or macOS application by executable path, `.app` path, bundle ID, or UWP AppUserModelID. macOS additionally requires the Accessibility permission for the process that runs Doc Detective (System Settings → Privacy & Security → Accessibility); without it the context lands as SKIPPED with a walkthrough. Phase A3 adds Android apps on a managed emulator, and phase A4 adds iOS app surfaces on macOS via XCUITest/simctl. Browser/process branches and the parallel array form arrive with multi-surface Phase 6. See docs/design/native-app-surfaces.md.
|
|
4260
|
-
*/
|
|
4261
|
-
export interface StartSurface1 {
|
|
4290
|
+
export interface AppDescriptor {
|
|
4262
4291
|
/**
|
|
4263
4292
|
* The app identifier: an executable path (`C:\\Windows\\System32\\notepad.exe`), a `.app` path, a bundle ID (`com.apple.TextEdit`), a package name (`com.example.myapp`), or a UWP AppUserModelID (`Microsoft.WindowsCalculator_8wekyb3d8bbwe!App`). Disambiguated by syntax — never by a type field.
|
|
4264
4293
|
*/
|
|
@@ -4272,7 +4301,7 @@ export interface StartSurface1 {
|
|
|
4272
4301
|
*/
|
|
4273
4302
|
args?: string[];
|
|
4274
4303
|
/**
|
|
4275
|
-
* Working directory for the launched app
|
|
4304
|
+
* Working directory for the launched app. Not honored by the current desktop app drivers, so a non-default value fails with guidance: on Windows the NovaWindows driver ignores it (the app inherits the driver's own working directory), and on macOS the driver launches apps through LaunchServices, which offers no working-directory control. Launch the app via runShell if the cwd matters. Reserved for when a driver gains support. Default: the run's working directory.
|
|
4276
4305
|
*/
|
|
4277
4306
|
workingDirectory?: string;
|
|
4278
4307
|
/**
|
|
@@ -4353,6 +4382,291 @@ export interface AppReadiness1 {
|
|
|
4353
4382
|
delayMs?: number;
|
|
4354
4383
|
find?: ElementCriteria2;
|
|
4355
4384
|
}
|
|
4385
|
+
export interface BrowserDescriptor {
|
|
4386
|
+
/**
|
|
4387
|
+
* Browser engine to open. The session opens on the context's automation server with a blank page and registers as a surface; use a goTo step (with `surface`) to navigate it. No cross-engine fallback — the one exception is `edge`, which is Chromium and opens on the same Chrome/chromedriver stack (it registers under the `chrome` engine, and defaults its surface name to `chrome` when you don't set one).
|
|
4388
|
+
*/
|
|
4389
|
+
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
4390
|
+
/**
|
|
4391
|
+
* Surface-registry name later steps use in `surface`. Default: the engine name. Must be unique across all open surfaces — the context's default browser already owns its engine name, so name a second same-engine session explicitly. An engine keyword may only name a session of that engine.
|
|
4392
|
+
*/
|
|
4393
|
+
name?: string;
|
|
4394
|
+
/**
|
|
4395
|
+
* Run this session headless. Default: the context's browser headless setting.
|
|
4396
|
+
*/
|
|
4397
|
+
headless?: boolean;
|
|
4398
|
+
size?: BrowserWindowSize;
|
|
4399
|
+
viewport?: BrowserViewportSize;
|
|
4400
|
+
/**
|
|
4401
|
+
* Escape-hatch passthrough: merged into the session's capabilities after the ones Doc Detective computes. Driver- and version-specific; use sparingly.
|
|
4402
|
+
*/
|
|
4403
|
+
driverOptions?: {
|
|
4404
|
+
[k: string]: unknown;
|
|
4405
|
+
};
|
|
4406
|
+
}
|
|
4407
|
+
/**
|
|
4408
|
+
* Outer window dimensions for this session. Default: the context's browser window size.
|
|
4409
|
+
*/
|
|
4410
|
+
export interface BrowserWindowSize {
|
|
4411
|
+
/**
|
|
4412
|
+
* Outer window width in pixels.
|
|
4413
|
+
*/
|
|
4414
|
+
width?: number;
|
|
4415
|
+
/**
|
|
4416
|
+
* Outer window height in pixels.
|
|
4417
|
+
*/
|
|
4418
|
+
height?: number;
|
|
4419
|
+
}
|
|
4420
|
+
/**
|
|
4421
|
+
* Viewport (page-content) dimensions for this session; the window is resized so the content area matches. Takes precedence over `size` when both are set.
|
|
4422
|
+
*/
|
|
4423
|
+
export interface BrowserViewportSize {
|
|
4424
|
+
/**
|
|
4425
|
+
* Viewport width in pixels.
|
|
4426
|
+
*/
|
|
4427
|
+
width?: number;
|
|
4428
|
+
/**
|
|
4429
|
+
* Viewport height in pixels.
|
|
4430
|
+
*/
|
|
4431
|
+
height?: number;
|
|
4432
|
+
}
|
|
4433
|
+
export interface ProcessDescriptor {
|
|
4434
|
+
/**
|
|
4435
|
+
* Shell command to start as a long-running background process (same shell semantics as runShell: pipes, `&&`, globbing, environment-variable expansion). Equivalent to a `runShell` step with `background` — both forms remain valid.
|
|
4436
|
+
*/
|
|
4437
|
+
process: string;
|
|
4438
|
+
/**
|
|
4439
|
+
* Surface-registry name later steps use in `surface`, and the handle a closeSurface step stops. Unique across all open surfaces.
|
|
4440
|
+
*/
|
|
4441
|
+
name: string;
|
|
4442
|
+
/**
|
|
4443
|
+
* Arguments for the command.
|
|
4444
|
+
*/
|
|
4445
|
+
args?: string[];
|
|
4446
|
+
/**
|
|
4447
|
+
* Working directory for the process.
|
|
4448
|
+
*/
|
|
4449
|
+
workingDirectory?: string;
|
|
4450
|
+
/**
|
|
4451
|
+
* Run the process in a pseudo-terminal (PTY) instead of a pipe, so full-screen/interactive TUIs (those that check `isTTY`) render and accept keystrokes. Requires the PTY backend `@homebridge/node-pty-prebuilt-multiarch` to be installed (`npm install @homebridge/node-pty-prebuilt-multiarch`); it is not bundled, and if it is unavailable the descriptor is skipped. `stdout` and `stderr` are merged into one stream in PTY mode. PTY output includes raw ANSI escape sequences (colors, cursor movement); `waitUntil.stdio` patterns should target text that renders without interleaved control codes, or use a regex that tolerates them.
|
|
4452
|
+
*/
|
|
4453
|
+
tty?: boolean;
|
|
4454
|
+
/**
|
|
4455
|
+
* Conditions that must all be met before the process is considered ready and the descriptor completes. Omit to consider the process ready as soon as it is spawned. Specify any combination; every condition given must pass before `timeout` elapses. Note: a process that forks a daemon and then exits (common for some Docker images and databases) is treated as having exited before becoming ready and the descriptor fails — use `port`, `httpGet`, or `delayMs` for those rather than a condition that depends on the foreground process staying alive.
|
|
4456
|
+
*/
|
|
4457
|
+
waitUntil?: {
|
|
4458
|
+
/**
|
|
4459
|
+
* Wait until this TCP port accepts connections on localhost.
|
|
4460
|
+
*/
|
|
4461
|
+
port?: number;
|
|
4462
|
+
/**
|
|
4463
|
+
* Wait until the process's output contains this content. Searches both stdout and stderr. Supports strings and regular expressions. To use a regular expression, the string must start and end with a forward slash, like in `/ready on \d+/`.
|
|
4464
|
+
*/
|
|
4465
|
+
stdio?: string;
|
|
4466
|
+
/**
|
|
4467
|
+
* Wait until an HTTP GET request to this URL returns a 2xx status.
|
|
4468
|
+
*/
|
|
4469
|
+
httpGet?: string;
|
|
4470
|
+
/**
|
|
4471
|
+
* Wait at least this many milliseconds.
|
|
4472
|
+
*/
|
|
4473
|
+
delayMs?: number;
|
|
4474
|
+
};
|
|
4475
|
+
/**
|
|
4476
|
+
* Max time in milliseconds to wait for `waitUntil` before the descriptor fails.
|
|
4477
|
+
*/
|
|
4478
|
+
timeout?: number;
|
|
4479
|
+
}
|
|
4480
|
+
export interface AppDescriptor1 {
|
|
4481
|
+
/**
|
|
4482
|
+
* The app identifier: an executable path (`C:\\Windows\\System32\\notepad.exe`), a `.app` path, a bundle ID (`com.apple.TextEdit`), a package name (`com.example.myapp`), or a UWP AppUserModelID (`Microsoft.WindowsCalculator_8wekyb3d8bbwe!App`). Disambiguated by syntax — never by a type field.
|
|
4483
|
+
*/
|
|
4484
|
+
app: string;
|
|
4485
|
+
/**
|
|
4486
|
+
* Surface-registry name later steps use in `surface`. Default: the executable basename without extension, or the final dot-segment of an ID.
|
|
4487
|
+
*/
|
|
4488
|
+
name?: string;
|
|
4489
|
+
/**
|
|
4490
|
+
* Launch arguments (desktop apps). On macOS they pass to the app as a real argument array. On Windows they join into a single shell-style argument string for the driver, so an argument with embedded spaces must carry its own quotes (e.g. "\"My File.txt\"").
|
|
4491
|
+
*/
|
|
4492
|
+
args?: string[];
|
|
4493
|
+
/**
|
|
4494
|
+
* Working directory for the launched app. Not honored by the current desktop app drivers, so a non-default value fails with guidance: on Windows the NovaWindows driver ignores it (the app inherits the driver's own working directory), and on macOS the driver launches apps through LaunchServices, which offers no working-directory control. Launch the app via runShell if the cwd matters. Reserved for when a driver gains support. Default: the run's working directory.
|
|
4495
|
+
*/
|
|
4496
|
+
workingDirectory?: string;
|
|
4497
|
+
/**
|
|
4498
|
+
* Extra environment variables for the launched app (desktop apps). Supported on macOS; not supported by the Windows driver, where any value fails with guidance (set variables in the shell that launches Doc Detective instead).
|
|
4499
|
+
*/
|
|
4500
|
+
env?: {
|
|
4501
|
+
[k: string]: string;
|
|
4502
|
+
};
|
|
4503
|
+
/**
|
|
4504
|
+
* Path to an installable artifact (`.apk`/`.app`/`.ipa`) to install on the device before launch. Supported on Android and iOS app surfaces.
|
|
4505
|
+
*/
|
|
4506
|
+
install?: string;
|
|
4507
|
+
/**
|
|
4508
|
+
* Android main activity override (defaults to the package's launcher activity). Android-only.
|
|
4509
|
+
*/
|
|
4510
|
+
activity?: string;
|
|
4511
|
+
/**
|
|
4512
|
+
* Device the app runs on. Omit for a host desktop app, or (in a mobile context) to use the context's default device. A string references a device by name; an object refines it. Supported on Android and iOS mobile targets.
|
|
4513
|
+
*/
|
|
4514
|
+
device?: DeviceByName1 | (DeviceDescriptor1 & {
|
|
4515
|
+
[k: string]: unknown;
|
|
4516
|
+
});
|
|
4517
|
+
/**
|
|
4518
|
+
* Escape-hatch passthrough: merged into the automation session's capabilities after the ones Doc Detective computes (namespaced per driver, e.g. `appium:noReset`). Driver- and version-specific; use sparingly.
|
|
4519
|
+
*/
|
|
4520
|
+
driverOptions?: {
|
|
4521
|
+
[k: string]: unknown;
|
|
4522
|
+
};
|
|
4523
|
+
waitUntil?: AppReadiness2;
|
|
4524
|
+
/**
|
|
4525
|
+
* Startup ceiling in milliseconds (launch + install + readiness).
|
|
4526
|
+
*/
|
|
4527
|
+
timeout?: number;
|
|
4528
|
+
}
|
|
4529
|
+
export interface DeviceDescriptor1 {
|
|
4530
|
+
/**
|
|
4531
|
+
* Target platform. Selects the mobile driver. Required in `startSurface.device`; implied by the context in `context.device`.
|
|
4532
|
+
*/
|
|
4533
|
+
platform?: "android" | "ios";
|
|
4534
|
+
/**
|
|
4535
|
+
* Device name and registry identity — the same name resolves to the same device. Reference form: names an existing AVD (Android) / simulator (iOS) to reuse. If no device by this name exists, Doc Detective creates one under this name using `deviceType`/`osVersion` (or their defaults), provided the toolchain is installed (`doc-detective install android` or `doc-detective install ios`).
|
|
4536
|
+
*/
|
|
4537
|
+
name?: string;
|
|
4538
|
+
/**
|
|
4539
|
+
* Abstract hardware profile used when creating a device (portable across `android`/`ios`). Doc Detective maps it to a built-in profile. Ignored when `name` already matches an existing device. Default: `phone`.
|
|
4540
|
+
*/
|
|
4541
|
+
deviceType?: "phone" | "tablet";
|
|
4542
|
+
/**
|
|
4543
|
+
* Platform version used when creating a device; must match an installed image/runtime for the target platform (install more with `doc-detective install android` or `doc-detective install ios`). Ignored when `name` already matches an existing device. Default: the newest installed version.
|
|
4544
|
+
*/
|
|
4545
|
+
osVersion?: string;
|
|
4546
|
+
/**
|
|
4547
|
+
* Run the Android emulator without a window. No-op on iOS (simulators boot without the Simulator UI on CI) and ignored where not applicable.
|
|
4548
|
+
*/
|
|
4549
|
+
headless?: boolean;
|
|
4550
|
+
/**
|
|
4551
|
+
* Initial orientation. Reserved; validated now, not yet implemented.
|
|
4552
|
+
*/
|
|
4553
|
+
orientation?: "portrait" | "landscape";
|
|
4554
|
+
/**
|
|
4555
|
+
* Pin a specific device/emulator instance by UDID. Reserved; validated now, not yet implemented.
|
|
4556
|
+
*/
|
|
4557
|
+
udid?: string;
|
|
4558
|
+
/**
|
|
4559
|
+
* Cloud device farm configuration, keyed by provider. Reserved; validated now, not yet implemented.
|
|
4560
|
+
*/
|
|
4561
|
+
provider?: {
|
|
4562
|
+
[k: string]: unknown;
|
|
4563
|
+
};
|
|
4564
|
+
}
|
|
4565
|
+
/**
|
|
4566
|
+
* Startup readiness: a fixed delay and/or an element that must exist before the surface is considered open. No condition applies by default.
|
|
4567
|
+
*/
|
|
4568
|
+
export interface AppReadiness2 {
|
|
4569
|
+
/**
|
|
4570
|
+
* Fixed delay (ms).
|
|
4571
|
+
*/
|
|
4572
|
+
delayMs?: number;
|
|
4573
|
+
find?: ElementCriteria3;
|
|
4574
|
+
}
|
|
4575
|
+
export interface BrowserDescriptor1 {
|
|
4576
|
+
/**
|
|
4577
|
+
* Browser engine to open. The session opens on the context's automation server with a blank page and registers as a surface; use a goTo step (with `surface`) to navigate it. No cross-engine fallback — the one exception is `edge`, which is Chromium and opens on the same Chrome/chromedriver stack (it registers under the `chrome` engine, and defaults its surface name to `chrome` when you don't set one).
|
|
4578
|
+
*/
|
|
4579
|
+
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
4580
|
+
/**
|
|
4581
|
+
* Surface-registry name later steps use in `surface`. Default: the engine name. Must be unique across all open surfaces — the context's default browser already owns its engine name, so name a second same-engine session explicitly. An engine keyword may only name a session of that engine.
|
|
4582
|
+
*/
|
|
4583
|
+
name?: string;
|
|
4584
|
+
/**
|
|
4585
|
+
* Run this session headless. Default: the context's browser headless setting.
|
|
4586
|
+
*/
|
|
4587
|
+
headless?: boolean;
|
|
4588
|
+
size?: BrowserWindowSize1;
|
|
4589
|
+
viewport?: BrowserViewportSize1;
|
|
4590
|
+
/**
|
|
4591
|
+
* Escape-hatch passthrough: merged into the session's capabilities after the ones Doc Detective computes. Driver- and version-specific; use sparingly.
|
|
4592
|
+
*/
|
|
4593
|
+
driverOptions?: {
|
|
4594
|
+
[k: string]: unknown;
|
|
4595
|
+
};
|
|
4596
|
+
}
|
|
4597
|
+
/**
|
|
4598
|
+
* Outer window dimensions for this session. Default: the context's browser window size.
|
|
4599
|
+
*/
|
|
4600
|
+
export interface BrowserWindowSize1 {
|
|
4601
|
+
/**
|
|
4602
|
+
* Outer window width in pixels.
|
|
4603
|
+
*/
|
|
4604
|
+
width?: number;
|
|
4605
|
+
/**
|
|
4606
|
+
* Outer window height in pixels.
|
|
4607
|
+
*/
|
|
4608
|
+
height?: number;
|
|
4609
|
+
}
|
|
4610
|
+
/**
|
|
4611
|
+
* Viewport (page-content) dimensions for this session; the window is resized so the content area matches. Takes precedence over `size` when both are set.
|
|
4612
|
+
*/
|
|
4613
|
+
export interface BrowserViewportSize1 {
|
|
4614
|
+
/**
|
|
4615
|
+
* Viewport width in pixels.
|
|
4616
|
+
*/
|
|
4617
|
+
width?: number;
|
|
4618
|
+
/**
|
|
4619
|
+
* Viewport height in pixels.
|
|
4620
|
+
*/
|
|
4621
|
+
height?: number;
|
|
4622
|
+
}
|
|
4623
|
+
export interface ProcessDescriptor1 {
|
|
4624
|
+
/**
|
|
4625
|
+
* Shell command to start as a long-running background process (same shell semantics as runShell: pipes, `&&`, globbing, environment-variable expansion). Equivalent to a `runShell` step with `background` — both forms remain valid.
|
|
4626
|
+
*/
|
|
4627
|
+
process: string;
|
|
4628
|
+
/**
|
|
4629
|
+
* Surface-registry name later steps use in `surface`, and the handle a closeSurface step stops. Unique across all open surfaces.
|
|
4630
|
+
*/
|
|
4631
|
+
name: string;
|
|
4632
|
+
/**
|
|
4633
|
+
* Arguments for the command.
|
|
4634
|
+
*/
|
|
4635
|
+
args?: string[];
|
|
4636
|
+
/**
|
|
4637
|
+
* Working directory for the process.
|
|
4638
|
+
*/
|
|
4639
|
+
workingDirectory?: string;
|
|
4640
|
+
/**
|
|
4641
|
+
* Run the process in a pseudo-terminal (PTY) instead of a pipe, so full-screen/interactive TUIs (those that check `isTTY`) render and accept keystrokes. Requires the PTY backend `@homebridge/node-pty-prebuilt-multiarch` to be installed (`npm install @homebridge/node-pty-prebuilt-multiarch`); it is not bundled, and if it is unavailable the descriptor is skipped. `stdout` and `stderr` are merged into one stream in PTY mode. PTY output includes raw ANSI escape sequences (colors, cursor movement); `waitUntil.stdio` patterns should target text that renders without interleaved control codes, or use a regex that tolerates them.
|
|
4642
|
+
*/
|
|
4643
|
+
tty?: boolean;
|
|
4644
|
+
/**
|
|
4645
|
+
* Conditions that must all be met before the process is considered ready and the descriptor completes. Omit to consider the process ready as soon as it is spawned. Specify any combination; every condition given must pass before `timeout` elapses. Note: a process that forks a daemon and then exits (common for some Docker images and databases) is treated as having exited before becoming ready and the descriptor fails — use `port`, `httpGet`, or `delayMs` for those rather than a condition that depends on the foreground process staying alive.
|
|
4646
|
+
*/
|
|
4647
|
+
waitUntil?: {
|
|
4648
|
+
/**
|
|
4649
|
+
* Wait until this TCP port accepts connections on localhost.
|
|
4650
|
+
*/
|
|
4651
|
+
port?: number;
|
|
4652
|
+
/**
|
|
4653
|
+
* Wait until the process's output contains this content. Searches both stdout and stderr. Supports strings and regular expressions. To use a regular expression, the string must start and end with a forward slash, like in `/ready on \d+/`.
|
|
4654
|
+
*/
|
|
4655
|
+
stdio?: string;
|
|
4656
|
+
/**
|
|
4657
|
+
* Wait until an HTTP GET request to this URL returns a 2xx status.
|
|
4658
|
+
*/
|
|
4659
|
+
httpGet?: string;
|
|
4660
|
+
/**
|
|
4661
|
+
* Wait at least this many milliseconds.
|
|
4662
|
+
*/
|
|
4663
|
+
delayMs?: number;
|
|
4664
|
+
};
|
|
4665
|
+
/**
|
|
4666
|
+
* Max time in milliseconds to wait for `waitUntil` before the descriptor fails.
|
|
4667
|
+
*/
|
|
4668
|
+
timeout?: number;
|
|
4669
|
+
}
|
|
4356
4670
|
export interface Common15 {
|
|
4357
4671
|
/**
|
|
4358
4672
|
* JSON Schema for this object.
|
|
@@ -4651,7 +4965,7 @@ export interface DragAndDrop1 {
|
|
|
4651
4965
|
}
|
|
4652
4966
|
export interface BrowserSurface7 {
|
|
4653
4967
|
/**
|
|
4654
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
4968
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
4655
4969
|
*/
|
|
4656
4970
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
4657
4971
|
/**
|
|
@@ -4988,7 +5302,7 @@ export interface SwipeDirectional {
|
|
|
4988
5302
|
}
|
|
4989
5303
|
export interface BrowserSurface8 {
|
|
4990
5304
|
/**
|
|
4991
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
5305
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
4992
5306
|
*/
|
|
4993
5307
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
4994
5308
|
/**
|
|
@@ -5095,7 +5409,7 @@ export interface Point1 {
|
|
|
5095
5409
|
}
|
|
5096
5410
|
export interface BrowserSurface9 {
|
|
5097
5411
|
/**
|
|
5098
|
-
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet
|
|
5412
|
+
* Browser engine. Selects the browser surface with that engine (or the one named by `name`). A goTo step opens the browser if it isn't open yet — you can also open one explicitly with `startSurface`; other steps require it to already be open.
|
|
5099
5413
|
*/
|
|
5100
5414
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
5101
5415
|
/**
|