doc-detective-common 4.25.0 → 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
|
@@ -102,7 +102,7 @@ export interface ProcessSurface {
|
|
|
102
102
|
}
|
|
103
103
|
export interface BrowserSurface {
|
|
104
104
|
/**
|
|
105
|
-
* 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
|
|
105
|
+
* 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.
|
|
106
106
|
*/
|
|
107
107
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
108
108
|
/**
|
|
@@ -177,7 +177,7 @@ export interface ProcessSurface1 {
|
|
|
177
177
|
}
|
|
178
178
|
export interface BrowserSurface1 {
|
|
179
179
|
/**
|
|
180
|
-
* 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
|
|
180
|
+
* 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.
|
|
181
181
|
*/
|
|
182
182
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
183
183
|
/**
|
|
@@ -68,7 +68,7 @@ export interface DragAndDrop {
|
|
|
68
68
|
}
|
|
69
69
|
export interface BrowserSurface {
|
|
70
70
|
/**
|
|
71
|
-
* 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
|
|
71
|
+
* 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.
|
|
72
72
|
*/
|
|
73
73
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
74
74
|
/**
|
|
@@ -105,7 +105,7 @@ export type ByIndex1 = number;
|
|
|
105
105
|
export type ByName1 = string;
|
|
106
106
|
export interface BrowserSurface {
|
|
107
107
|
/**
|
|
108
|
-
* 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
|
|
108
|
+
* 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.
|
|
109
109
|
*/
|
|
110
110
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
111
111
|
/**
|
|
@@ -88,7 +88,7 @@ export interface RecordDetailed {
|
|
|
88
88
|
}
|
|
89
89
|
export interface BrowserSurface {
|
|
90
90
|
/**
|
|
91
|
-
* 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
|
|
91
|
+
* 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.
|
|
92
92
|
*/
|
|
93
93
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
94
94
|
/**
|
|
@@ -79,7 +79,7 @@ export interface RunBrowserScriptDetailed {
|
|
|
79
79
|
}
|
|
80
80
|
export interface BrowserSurface {
|
|
81
81
|
/**
|
|
82
|
-
* 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
|
|
82
|
+
* 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.
|
|
83
83
|
*/
|
|
84
84
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
85
85
|
/**
|
|
@@ -93,7 +93,7 @@ export interface CaptureScreenshotFields {
|
|
|
93
93
|
}
|
|
94
94
|
export interface BrowserSurface {
|
|
95
95
|
/**
|
|
96
|
-
* 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
|
|
96
|
+
* 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.
|
|
97
97
|
*/
|
|
98
98
|
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
99
99
|
/**
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
* Auto-generated from startSurface_v3.schema.json
|
|
3
3
|
* Do not edit manually
|
|
4
4
|
*/
|
|
5
|
+
/**
|
|
6
|
+
* 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.
|
|
7
|
+
*/
|
|
8
|
+
export type StartSurface = AppDescriptor | BrowserDescriptor | ProcessDescriptor | ParallelSurfaces;
|
|
5
9
|
export type DeviceByName = string;
|
|
6
10
|
/**
|
|
7
11
|
* Wait for a specific element to exist on the app surface. Fields with no accessibility mapping on the target platform fail at runtime with the supported alternative named.
|
|
@@ -10,9 +14,34 @@ export type ElementCriteria = {
|
|
|
10
14
|
[k: string]: unknown;
|
|
11
15
|
};
|
|
12
16
|
/**
|
|
13
|
-
* Open
|
|
17
|
+
* 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.
|
|
18
|
+
*
|
|
19
|
+
* @minItems 1
|
|
14
20
|
*/
|
|
15
|
-
export
|
|
21
|
+
export type ParallelSurfaces = [
|
|
22
|
+
AppDescriptor1 | BrowserDescriptor1 | ProcessDescriptor1,
|
|
23
|
+
...(AppDescriptor1 | BrowserDescriptor1 | ProcessDescriptor1)[]
|
|
24
|
+
];
|
|
25
|
+
export type DeviceByName1 = string;
|
|
26
|
+
/**
|
|
27
|
+
* Wait for a specific element to exist on the app surface. Fields with no accessibility mapping on the target platform fail at runtime with the supported alternative named.
|
|
28
|
+
*/
|
|
29
|
+
export type ElementCriteria1 = {
|
|
30
|
+
[k: string]: unknown;
|
|
31
|
+
} | {
|
|
32
|
+
[k: string]: unknown;
|
|
33
|
+
} | {
|
|
34
|
+
[k: string]: unknown;
|
|
35
|
+
} | {
|
|
36
|
+
[k: string]: unknown;
|
|
37
|
+
} | {
|
|
38
|
+
[k: string]: unknown;
|
|
39
|
+
} | {
|
|
40
|
+
[k: string]: unknown;
|
|
41
|
+
} | {
|
|
42
|
+
[k: string]: unknown;
|
|
43
|
+
};
|
|
44
|
+
export interface AppDescriptor {
|
|
16
45
|
/**
|
|
17
46
|
* 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.
|
|
18
47
|
*/
|
|
@@ -26,7 +55,7 @@ export interface StartSurface {
|
|
|
26
55
|
*/
|
|
27
56
|
args?: string[];
|
|
28
57
|
/**
|
|
29
|
-
* Working directory for the launched app
|
|
58
|
+
* 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.
|
|
30
59
|
*/
|
|
31
60
|
workingDirectory?: string;
|
|
32
61
|
/**
|
|
@@ -107,4 +136,289 @@ export interface AppReadiness {
|
|
|
107
136
|
delayMs?: number;
|
|
108
137
|
find?: ElementCriteria;
|
|
109
138
|
}
|
|
139
|
+
export interface BrowserDescriptor {
|
|
140
|
+
/**
|
|
141
|
+
* 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).
|
|
142
|
+
*/
|
|
143
|
+
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
144
|
+
/**
|
|
145
|
+
* 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.
|
|
146
|
+
*/
|
|
147
|
+
name?: string;
|
|
148
|
+
/**
|
|
149
|
+
* Run this session headless. Default: the context's browser headless setting.
|
|
150
|
+
*/
|
|
151
|
+
headless?: boolean;
|
|
152
|
+
size?: BrowserWindowSize;
|
|
153
|
+
viewport?: BrowserViewportSize;
|
|
154
|
+
/**
|
|
155
|
+
* Escape-hatch passthrough: merged into the session's capabilities after the ones Doc Detective computes. Driver- and version-specific; use sparingly.
|
|
156
|
+
*/
|
|
157
|
+
driverOptions?: {
|
|
158
|
+
[k: string]: unknown;
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Outer window dimensions for this session. Default: the context's browser window size.
|
|
163
|
+
*/
|
|
164
|
+
export interface BrowserWindowSize {
|
|
165
|
+
/**
|
|
166
|
+
* Outer window width in pixels.
|
|
167
|
+
*/
|
|
168
|
+
width?: number;
|
|
169
|
+
/**
|
|
170
|
+
* Outer window height in pixels.
|
|
171
|
+
*/
|
|
172
|
+
height?: number;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Viewport (page-content) dimensions for this session; the window is resized so the content area matches. Takes precedence over `size` when both are set.
|
|
176
|
+
*/
|
|
177
|
+
export interface BrowserViewportSize {
|
|
178
|
+
/**
|
|
179
|
+
* Viewport width in pixels.
|
|
180
|
+
*/
|
|
181
|
+
width?: number;
|
|
182
|
+
/**
|
|
183
|
+
* Viewport height in pixels.
|
|
184
|
+
*/
|
|
185
|
+
height?: number;
|
|
186
|
+
}
|
|
187
|
+
export interface ProcessDescriptor {
|
|
188
|
+
/**
|
|
189
|
+
* 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.
|
|
190
|
+
*/
|
|
191
|
+
process: string;
|
|
192
|
+
/**
|
|
193
|
+
* Surface-registry name later steps use in `surface`, and the handle a closeSurface step stops. Unique across all open surfaces.
|
|
194
|
+
*/
|
|
195
|
+
name: string;
|
|
196
|
+
/**
|
|
197
|
+
* Arguments for the command.
|
|
198
|
+
*/
|
|
199
|
+
args?: string[];
|
|
200
|
+
/**
|
|
201
|
+
* Working directory for the process.
|
|
202
|
+
*/
|
|
203
|
+
workingDirectory?: string;
|
|
204
|
+
/**
|
|
205
|
+
* 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.
|
|
206
|
+
*/
|
|
207
|
+
tty?: boolean;
|
|
208
|
+
/**
|
|
209
|
+
* 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.
|
|
210
|
+
*/
|
|
211
|
+
waitUntil?: {
|
|
212
|
+
/**
|
|
213
|
+
* Wait until this TCP port accepts connections on localhost.
|
|
214
|
+
*/
|
|
215
|
+
port?: number;
|
|
216
|
+
/**
|
|
217
|
+
* 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+/`.
|
|
218
|
+
*/
|
|
219
|
+
stdio?: string;
|
|
220
|
+
/**
|
|
221
|
+
* Wait until an HTTP GET request to this URL returns a 2xx status.
|
|
222
|
+
*/
|
|
223
|
+
httpGet?: string;
|
|
224
|
+
/**
|
|
225
|
+
* Wait at least this many milliseconds.
|
|
226
|
+
*/
|
|
227
|
+
delayMs?: number;
|
|
228
|
+
};
|
|
229
|
+
/**
|
|
230
|
+
* Max time in milliseconds to wait for `waitUntil` before the descriptor fails.
|
|
231
|
+
*/
|
|
232
|
+
timeout?: number;
|
|
233
|
+
}
|
|
234
|
+
export interface AppDescriptor1 {
|
|
235
|
+
/**
|
|
236
|
+
* 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.
|
|
237
|
+
*/
|
|
238
|
+
app: string;
|
|
239
|
+
/**
|
|
240
|
+
* Surface-registry name later steps use in `surface`. Default: the executable basename without extension, or the final dot-segment of an ID.
|
|
241
|
+
*/
|
|
242
|
+
name?: string;
|
|
243
|
+
/**
|
|
244
|
+
* 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\"").
|
|
245
|
+
*/
|
|
246
|
+
args?: string[];
|
|
247
|
+
/**
|
|
248
|
+
* 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.
|
|
249
|
+
*/
|
|
250
|
+
workingDirectory?: string;
|
|
251
|
+
/**
|
|
252
|
+
* 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).
|
|
253
|
+
*/
|
|
254
|
+
env?: {
|
|
255
|
+
[k: string]: string;
|
|
256
|
+
};
|
|
257
|
+
/**
|
|
258
|
+
* Path to an installable artifact (`.apk`/`.app`/`.ipa`) to install on the device before launch. Supported on Android and iOS app surfaces.
|
|
259
|
+
*/
|
|
260
|
+
install?: string;
|
|
261
|
+
/**
|
|
262
|
+
* Android main activity override (defaults to the package's launcher activity). Android-only.
|
|
263
|
+
*/
|
|
264
|
+
activity?: string;
|
|
265
|
+
/**
|
|
266
|
+
* 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.
|
|
267
|
+
*/
|
|
268
|
+
device?: DeviceByName1 | (DeviceDescriptor1 & {
|
|
269
|
+
[k: string]: unknown;
|
|
270
|
+
});
|
|
271
|
+
/**
|
|
272
|
+
* 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.
|
|
273
|
+
*/
|
|
274
|
+
driverOptions?: {
|
|
275
|
+
[k: string]: unknown;
|
|
276
|
+
};
|
|
277
|
+
waitUntil?: AppReadiness1;
|
|
278
|
+
/**
|
|
279
|
+
* Startup ceiling in milliseconds (launch + install + readiness).
|
|
280
|
+
*/
|
|
281
|
+
timeout?: number;
|
|
282
|
+
}
|
|
283
|
+
export interface DeviceDescriptor1 {
|
|
284
|
+
/**
|
|
285
|
+
* Target platform. Selects the mobile driver. Required in `startSurface.device`; implied by the context in `context.device`.
|
|
286
|
+
*/
|
|
287
|
+
platform?: "android" | "ios";
|
|
288
|
+
/**
|
|
289
|
+
* 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`).
|
|
290
|
+
*/
|
|
291
|
+
name?: string;
|
|
292
|
+
/**
|
|
293
|
+
* 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`.
|
|
294
|
+
*/
|
|
295
|
+
deviceType?: "phone" | "tablet";
|
|
296
|
+
/**
|
|
297
|
+
* 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.
|
|
298
|
+
*/
|
|
299
|
+
osVersion?: string;
|
|
300
|
+
/**
|
|
301
|
+
* Run the Android emulator without a window. No-op on iOS (simulators boot without the Simulator UI on CI) and ignored where not applicable.
|
|
302
|
+
*/
|
|
303
|
+
headless?: boolean;
|
|
304
|
+
/**
|
|
305
|
+
* Initial orientation. Reserved; validated now, not yet implemented.
|
|
306
|
+
*/
|
|
307
|
+
orientation?: "portrait" | "landscape";
|
|
308
|
+
/**
|
|
309
|
+
* Pin a specific device/emulator instance by UDID. Reserved; validated now, not yet implemented.
|
|
310
|
+
*/
|
|
311
|
+
udid?: string;
|
|
312
|
+
/**
|
|
313
|
+
* Cloud device farm configuration, keyed by provider. Reserved; validated now, not yet implemented.
|
|
314
|
+
*/
|
|
315
|
+
provider?: {
|
|
316
|
+
[k: string]: unknown;
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Startup readiness: a fixed delay and/or an element that must exist before the surface is considered open. No condition applies by default.
|
|
321
|
+
*/
|
|
322
|
+
export interface AppReadiness1 {
|
|
323
|
+
/**
|
|
324
|
+
* Fixed delay (ms).
|
|
325
|
+
*/
|
|
326
|
+
delayMs?: number;
|
|
327
|
+
find?: ElementCriteria1;
|
|
328
|
+
}
|
|
329
|
+
export interface BrowserDescriptor1 {
|
|
330
|
+
/**
|
|
331
|
+
* 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).
|
|
332
|
+
*/
|
|
333
|
+
browser: "chrome" | "firefox" | "safari" | "webkit" | "edge";
|
|
334
|
+
/**
|
|
335
|
+
* 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.
|
|
336
|
+
*/
|
|
337
|
+
name?: string;
|
|
338
|
+
/**
|
|
339
|
+
* Run this session headless. Default: the context's browser headless setting.
|
|
340
|
+
*/
|
|
341
|
+
headless?: boolean;
|
|
342
|
+
size?: BrowserWindowSize1;
|
|
343
|
+
viewport?: BrowserViewportSize1;
|
|
344
|
+
/**
|
|
345
|
+
* Escape-hatch passthrough: merged into the session's capabilities after the ones Doc Detective computes. Driver- and version-specific; use sparingly.
|
|
346
|
+
*/
|
|
347
|
+
driverOptions?: {
|
|
348
|
+
[k: string]: unknown;
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Outer window dimensions for this session. Default: the context's browser window size.
|
|
353
|
+
*/
|
|
354
|
+
export interface BrowserWindowSize1 {
|
|
355
|
+
/**
|
|
356
|
+
* Outer window width in pixels.
|
|
357
|
+
*/
|
|
358
|
+
width?: number;
|
|
359
|
+
/**
|
|
360
|
+
* Outer window height in pixels.
|
|
361
|
+
*/
|
|
362
|
+
height?: number;
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Viewport (page-content) dimensions for this session; the window is resized so the content area matches. Takes precedence over `size` when both are set.
|
|
366
|
+
*/
|
|
367
|
+
export interface BrowserViewportSize1 {
|
|
368
|
+
/**
|
|
369
|
+
* Viewport width in pixels.
|
|
370
|
+
*/
|
|
371
|
+
width?: number;
|
|
372
|
+
/**
|
|
373
|
+
* Viewport height in pixels.
|
|
374
|
+
*/
|
|
375
|
+
height?: number;
|
|
376
|
+
}
|
|
377
|
+
export interface ProcessDescriptor1 {
|
|
378
|
+
/**
|
|
379
|
+
* 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.
|
|
380
|
+
*/
|
|
381
|
+
process: string;
|
|
382
|
+
/**
|
|
383
|
+
* Surface-registry name later steps use in `surface`, and the handle a closeSurface step stops. Unique across all open surfaces.
|
|
384
|
+
*/
|
|
385
|
+
name: string;
|
|
386
|
+
/**
|
|
387
|
+
* Arguments for the command.
|
|
388
|
+
*/
|
|
389
|
+
args?: string[];
|
|
390
|
+
/**
|
|
391
|
+
* Working directory for the process.
|
|
392
|
+
*/
|
|
393
|
+
workingDirectory?: string;
|
|
394
|
+
/**
|
|
395
|
+
* 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.
|
|
396
|
+
*/
|
|
397
|
+
tty?: boolean;
|
|
398
|
+
/**
|
|
399
|
+
* 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.
|
|
400
|
+
*/
|
|
401
|
+
waitUntil?: {
|
|
402
|
+
/**
|
|
403
|
+
* Wait until this TCP port accepts connections on localhost.
|
|
404
|
+
*/
|
|
405
|
+
port?: number;
|
|
406
|
+
/**
|
|
407
|
+
* 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+/`.
|
|
408
|
+
*/
|
|
409
|
+
stdio?: string;
|
|
410
|
+
/**
|
|
411
|
+
* Wait until an HTTP GET request to this URL returns a 2xx status.
|
|
412
|
+
*/
|
|
413
|
+
httpGet?: string;
|
|
414
|
+
/**
|
|
415
|
+
* Wait at least this many milliseconds.
|
|
416
|
+
*/
|
|
417
|
+
delayMs?: number;
|
|
418
|
+
};
|
|
419
|
+
/**
|
|
420
|
+
* Max time in milliseconds to wait for `waitUntil` before the descriptor fails.
|
|
421
|
+
*/
|
|
422
|
+
timeout?: number;
|
|
423
|
+
}
|
|
110
424
|
//# sourceMappingURL=startSurface_v3.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"startSurface_v3.d.ts","sourceRoot":"","sources":["../../../src/types/generated/startSurface_v3.ts"],"names":[],"mappings":"AACA;;;GAGG;AAEH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAClC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB,CAAC;
|
|
1
|
+
{"version":3,"file":"startSurface_v3.d.ts","sourceRoot":"","sources":["../../../src/types/generated/startSurface_v3.ts"],"names":[],"mappings":"AACA;;;GAGG;AAEH;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,aAAa,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,gBAAgB,CAAC;AACpG,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAClC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB,CAAC;AACF;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,cAAc,GAAG,kBAAkB,GAAG,kBAAkB;IACxD,GAAG,CAAC,cAAc,GAAG,kBAAkB,GAAG,kBAAkB,CAAC,EAAE;CAChE,CAAC;AACF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AACnC;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACxB;IACE,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB,GACD;IACE,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB,GACD;IACE,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB,GACD;IACE,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB,GACD;IACE,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB,GACD;IACE,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB,GACD;IACE,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB,CAAC;AAEN,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CA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