obsidian-integration-testing 12.1.2 → 12.3.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/README.md +1 -5
- package/dist/lib/cjs/app-config.cjs +137 -0
- package/dist/lib/cjs/app-config.d.cts +190 -0
- package/dist/lib/cjs/appium-session-config.cjs +7 -1
- package/dist/lib/cjs/appium-session-config.d.cts +20 -0
- package/dist/lib/cjs/cdp-command-timeout-error.cjs +50 -0
- package/dist/lib/cjs/cdp-command-timeout-error.d.cts +48 -0
- package/dist/lib/cjs/connect-to-cdp.cjs +1 -1
- package/dist/lib/cjs/connect-to-cdp.d.cts +5 -0
- package/dist/lib/cjs/emulator-arguments.cjs +19 -3
- package/dist/lib/cjs/emulator-arguments.d.cts +44 -0
- package/dist/lib/cjs/emulator-device-id.cjs +1 -1
- package/dist/lib/cjs/emulator-device-id.d.cts +7 -6
- package/dist/lib/cjs/emulator-marker.cjs +169 -0
- package/dist/lib/cjs/emulator-marker.d.cts +224 -0
- package/dist/lib/cjs/emulator-reaper.cjs +248 -0
- package/dist/lib/cjs/emulator-reaper.d.cts +225 -0
- package/dist/lib/cjs/emulator-reclaim.cjs +312 -0
- package/dist/lib/cjs/emulator-reclaim.d.cts +179 -0
- package/dist/lib/cjs/eval-cap-exceeded-error.cjs +61 -0
- package/dist/lib/cjs/eval-cap-exceeded-error.d.cts +92 -0
- package/dist/lib/cjs/eval-cap.cjs +29 -0
- package/dist/lib/cjs/eval-cap.d.cts +43 -0
- package/dist/lib/cjs/global-setup-core.cjs +2 -3
- package/dist/lib/cjs/index.cjs +21 -1
- package/dist/lib/cjs/index.d.cts +7 -0
- package/dist/lib/cjs/library.cjs +1 -1
- package/dist/lib/cjs/poll-in-obsidian.cjs +1 -1
- package/dist/lib/cjs/poll-in-obsidian.d.cts +7 -2
- package/dist/lib/cjs/setup-lock.cjs +56 -8
- package/dist/lib/cjs/setup-lock.d.cts +53 -0
- package/dist/lib/cjs/soft-keyboard-geometry.cjs +17 -8
- package/dist/lib/cjs/soft-keyboard-geometry.d.cts +46 -9
- package/dist/lib/cjs/soft-keyboard.cjs +7 -4
- package/dist/lib/cjs/soft-keyboard.d.cts +16 -2
- package/dist/lib/cjs/transport-appium.cjs +70 -5
- package/dist/lib/cjs/transport-appium.d.cts +35 -0
- package/dist/lib/cjs/transport-desktop-cdp.cjs +98 -19
- package/dist/lib/cjs/transport-desktop-cdp.d.cts +44 -1
- package/dist/lib/cjs/transport-factory.cjs +297 -190
- package/dist/lib/cjs/transport-factory.d.cts +15 -0
- package/dist/lib/cjs/transport-options.cjs +1 -1
- package/dist/lib/cjs/transport-options.d.cts +38 -1
- package/dist/lib/cjs/webview-cdp.cjs +45 -14
- package/dist/lib/cjs/webview-cdp.d.cts +17 -0
- package/dist/lib/esm/app-config.d.mts +190 -0
- package/dist/lib/esm/app-config.mjs +110 -0
- package/dist/lib/esm/appium-session-config.d.mts +20 -0
- package/dist/lib/esm/appium-session-config.mjs +6 -1
- package/dist/lib/esm/cdp-command-timeout-error.d.mts +48 -0
- package/dist/lib/esm/cdp-command-timeout-error.mjs +26 -0
- package/dist/lib/esm/connect-to-cdp.d.mts +5 -0
- package/dist/lib/esm/connect-to-cdp.mjs +1 -1
- package/dist/lib/esm/emulator-arguments.d.mts +44 -0
- package/dist/lib/esm/emulator-arguments.mjs +16 -2
- package/dist/lib/esm/emulator-device-id.d.mts +7 -6
- package/dist/lib/esm/emulator-device-id.mjs +1 -1
- package/dist/lib/esm/emulator-marker.d.mts +224 -0
- package/dist/lib/esm/emulator-marker.mjs +134 -0
- package/dist/lib/esm/emulator-reaper.d.mts +225 -0
- package/dist/lib/esm/emulator-reaper.mjs +211 -0
- package/dist/lib/esm/emulator-reclaim.d.mts +179 -0
- package/dist/lib/esm/emulator-reclaim.mjs +291 -0
- package/dist/lib/esm/eval-cap-exceeded-error.d.mts +92 -0
- package/dist/lib/esm/eval-cap-exceeded-error.mjs +36 -0
- package/dist/lib/esm/eval-cap.d.mts +43 -0
- package/dist/lib/esm/eval-cap.mjs +5 -0
- package/dist/lib/esm/global-setup-core.mjs +6 -4
- package/dist/lib/esm/index.d.mts +7 -0
- package/dist/lib/esm/index.mjs +21 -1
- package/dist/lib/esm/library.mjs +1 -1
- package/dist/lib/esm/poll-in-obsidian.d.mts +7 -2
- package/dist/lib/esm/poll-in-obsidian.mjs +1 -1
- package/dist/lib/esm/setup-lock.d.mts +53 -0
- package/dist/lib/esm/setup-lock.mjs +52 -7
- package/dist/lib/esm/soft-keyboard-geometry.d.mts +46 -9
- package/dist/lib/esm/soft-keyboard-geometry.mjs +17 -8
- package/dist/lib/esm/soft-keyboard.d.mts +16 -2
- package/dist/lib/esm/soft-keyboard.mjs +7 -4
- package/dist/lib/esm/transport-appium.d.mts +35 -0
- package/dist/lib/esm/transport-appium.mjs +73 -5
- package/dist/lib/esm/transport-desktop-cdp.d.mts +44 -1
- package/dist/lib/esm/transport-desktop-cdp.mjs +98 -19
- package/dist/lib/esm/transport-factory.d.mts +15 -0
- package/dist/lib/esm/transport-factory.mjs +305 -184
- package/dist/lib/esm/transport-options.d.mts +38 -1
- package/dist/lib/esm/transport-options.mjs +1 -1
- package/dist/lib/esm/webview-cdp.d.mts +17 -0
- package/dist/lib/esm/webview-cdp.mjs +45 -14
- package/package.json +4 -4
|
@@ -37,7 +37,13 @@ export interface DesktopCdpTransportConfig {
|
|
|
37
37
|
cdpPort?: number;
|
|
38
38
|
/**
|
|
39
39
|
* Timeout in milliseconds for individual CDP commands.
|
|
40
|
-
*
|
|
40
|
+
*
|
|
41
|
+
* A test's closure travels as one `Runtime.evaluate` command, so this is also
|
|
42
|
+
* the desktop per-eval cap. The default is `DEFAULT_EVAL_CAP_IN_MILLISECONDS`,
|
|
43
|
+
* exported from the package root — import it rather than restating the number,
|
|
44
|
+
* so a closure sized against the cap follows it if it ever moves.
|
|
45
|
+
*
|
|
46
|
+
* @default `30000`
|
|
41
47
|
*/
|
|
42
48
|
commandTimeoutInMilliseconds?: number;
|
|
43
49
|
/**
|
|
@@ -191,6 +197,17 @@ export declare class DesktopCdpTransport implements ObsidianTransport {
|
|
|
191
197
|
private messageId;
|
|
192
198
|
private readonly ownedConfig;
|
|
193
199
|
private ownedInstance;
|
|
200
|
+
/**
|
|
201
|
+
* The in-flight commands of every socket this transport has opened, keyed by
|
|
202
|
+
* the CDP message id each is waiting for. One entry per command, added by
|
|
203
|
+
* {@link sendCommand} and removed by whichever of the reply and the timeout
|
|
204
|
+
* comes first — see {@link getPendingCommands} for why this exists at all.
|
|
205
|
+
*
|
|
206
|
+
* Weak by socket so a closed temporary connection is collectable with its
|
|
207
|
+
* pending map; the dispatcher listener is the socket's own, so nothing here
|
|
208
|
+
* keeps it alive.
|
|
209
|
+
*/
|
|
210
|
+
private readonly pendingCommandsBySocket;
|
|
194
211
|
/**
|
|
195
212
|
* Vault paths THIS transport opened via {@link registerVault}, normalized by
|
|
196
213
|
* {@link normalizeVaultPathForComparison}. A worker attached to a
|
|
@@ -474,6 +491,32 @@ export declare class DesktopCdpTransport implements ObsidianTransport {
|
|
|
474
491
|
* @throws {Error} When no CDP endpoint is configured yet.
|
|
475
492
|
*/
|
|
476
493
|
private getPageTargets;
|
|
494
|
+
/**
|
|
495
|
+
* Returns a socket's in-flight command map, installing its reply dispatcher on
|
|
496
|
+
* first use.
|
|
497
|
+
*
|
|
498
|
+
* ONE `message` listener per socket, for the socket's whole life — not one per
|
|
499
|
+
* command. A listener per in-flight command makes the count scale with how many
|
|
500
|
+
* evaluations a suite has in flight at once, so a consumer that fires eleven
|
|
501
|
+
* concurrent `evalInObsidian` calls crosses Node's default `maxListeners` of 10
|
|
502
|
+
* and is told its transport is leaking memory, which it is not: measured
|
|
503
|
+
* 2026-09-15, fifteen concurrent evaluations registered fifteen listeners on the
|
|
504
|
+
* one long-lived socket and the count fell back to zero the moment they settled.
|
|
505
|
+
* A warning that fires on correct use is worse than no warning, because the real
|
|
506
|
+
* signal — an entry that is added and never removed — is then indistinguishable
|
|
507
|
+
* from it. With one dispatcher the listener count is a constant, and a genuine
|
|
508
|
+
* leak shows instead as a pending map that never empties.
|
|
509
|
+
*
|
|
510
|
+
* The dispatcher is deliberately forgiving about what arrives: a CDP **event**
|
|
511
|
+
* carries no `id` and belongs to no command, and a frame that is not JSON at all
|
|
512
|
+
* belongs to nothing this transport sent. Both are ignored. The old per-command
|
|
513
|
+
* handler parsed unguarded, so one frame that is not JSON threw once per
|
|
514
|
+
* in-flight command, out of the event dispatch, where nothing could catch it.
|
|
515
|
+
*
|
|
516
|
+
* @param ws - The socket whose replies are being awaited.
|
|
517
|
+
* @returns The socket's map of in-flight commands, keyed by CDP message id.
|
|
518
|
+
*/
|
|
519
|
+
private getPendingCommands;
|
|
477
520
|
/**
|
|
478
521
|
* Kills the currently-running owned instance (if any) and waits for it to exit,
|
|
479
522
|
* so the next launch gets a pristine single-window instance.
|