obsidian-integration-testing 15.0.0 → 17.0.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/lib/cjs/adb.cjs +2 -2
- package/dist/lib/cjs/adb.d.cts +10 -0
- package/dist/lib/cjs/avd-name-channel.cjs +74 -0
- package/dist/lib/cjs/avd-name-channel.d.cts +152 -0
- package/dist/lib/cjs/avd-probe-verdict.cjs +11 -4
- package/dist/lib/cjs/avd-probe-verdict.d.cts +7 -0
- package/dist/lib/cjs/device-screenshot.cjs +1 -1
- package/dist/lib/cjs/device-screenshot.d.cts +3 -1
- package/dist/lib/cjs/emulator-backend.cjs +22 -1
- package/dist/lib/cjs/emulator-backend.d.cts +81 -0
- package/dist/lib/cjs/emulator-reclaim.cjs +78 -34
- package/dist/lib/cjs/emulator-reclaim.d.cts +57 -9
- package/dist/lib/cjs/enable-plugin.cjs +17 -8
- package/dist/lib/cjs/enable-plugin.d.cts +3 -1
- package/dist/lib/cjs/host-process-query-verdict.cjs +103 -0
- package/dist/lib/cjs/host-process-query-verdict.d.cts +196 -0
- package/dist/lib/cjs/index.cjs +14 -1
- package/dist/lib/cjs/index.d.cts +3 -1
- package/dist/lib/cjs/label-screenshot.cjs +2 -2
- package/dist/lib/cjs/launched-device-selection.cjs +46 -0
- package/dist/lib/cjs/launched-device-selection.d.cts +112 -0
- package/dist/lib/cjs/library.cjs +1 -1
- package/dist/lib/cjs/paint-out-status-bar.cjs +170 -0
- package/dist/lib/cjs/paint-out-status-bar.d.cts +236 -0
- package/dist/lib/cjs/port-owner-query-verdict.cjs +94 -0
- package/dist/lib/cjs/port-owner-query-verdict.d.cts +161 -0
- package/dist/lib/cjs/resolve-emulator-device-id.cjs +27 -4
- package/dist/lib/cjs/sharp-loader.cjs +1 -1
- package/dist/lib/cjs/sharp-loader.d.cts +67 -2
- package/dist/lib/cjs/soft-keyboard-geometry.cjs +12 -2
- package/dist/lib/cjs/soft-keyboard-geometry.d.cts +17 -2
- package/dist/lib/cjs/soft-keyboard.cjs +130 -28
- package/dist/lib/cjs/soft-keyboard.d.cts +65 -6
- package/dist/lib/cjs/transport-appium.cjs +74 -4
- package/dist/lib/cjs/transport-appium.d.cts +49 -2
- package/dist/lib/cjs/transport-factory.cjs +162 -42
- package/dist/lib/esm/adb.d.mts +10 -0
- package/dist/lib/esm/adb.mjs +2 -2
- package/dist/lib/esm/avd-name-channel.d.mts +152 -0
- package/dist/lib/esm/avd-name-channel.mjs +45 -0
- package/dist/lib/esm/avd-probe-verdict.d.mts +7 -0
- package/dist/lib/esm/avd-probe-verdict.mjs +15 -4
- package/dist/lib/esm/device-screenshot.d.mts +3 -1
- package/dist/lib/esm/device-screenshot.mjs +1 -1
- package/dist/lib/esm/emulator-backend.d.mts +81 -0
- package/dist/lib/esm/emulator-backend.mjs +19 -1
- package/dist/lib/esm/emulator-reclaim.d.mts +57 -9
- package/dist/lib/esm/emulator-reclaim.mjs +84 -36
- package/dist/lib/esm/enable-plugin.d.mts +3 -1
- package/dist/lib/esm/enable-plugin.mjs +17 -8
- package/dist/lib/esm/host-process-query-verdict.d.mts +196 -0
- package/dist/lib/esm/host-process-query-verdict.mjs +74 -0
- package/dist/lib/esm/index.d.mts +3 -1
- package/dist/lib/esm/index.mjs +15 -1
- package/dist/lib/esm/label-screenshot.mjs +2 -2
- package/dist/lib/esm/launched-device-selection.d.mts +112 -0
- package/dist/lib/esm/launched-device-selection.mjs +21 -0
- package/dist/lib/esm/library.mjs +1 -1
- package/dist/lib/esm/paint-out-status-bar.d.mts +236 -0
- package/dist/lib/esm/paint-out-status-bar.mjs +142 -0
- package/dist/lib/esm/port-owner-query-verdict.d.mts +161 -0
- package/dist/lib/esm/port-owner-query-verdict.mjs +73 -0
- package/dist/lib/esm/resolve-emulator-device-id.mjs +32 -4
- package/dist/lib/esm/sharp-loader.d.mts +67 -2
- package/dist/lib/esm/sharp-loader.mjs +1 -1
- package/dist/lib/esm/soft-keyboard-geometry.d.mts +17 -2
- package/dist/lib/esm/soft-keyboard-geometry.mjs +11 -2
- package/dist/lib/esm/soft-keyboard.d.mts +65 -6
- package/dist/lib/esm/soft-keyboard.mjs +131 -28
- package/dist/lib/esm/transport-appium.d.mts +49 -2
- package/dist/lib/esm/transport-appium.mjs +74 -4
- package/dist/lib/esm/transport-factory.mjs +176 -44
- package/package.json +1 -1
|
@@ -303,7 +303,11 @@ export declare class AppiumTransport implements ObsidianTransport {
|
|
|
303
303
|
* Registers a vault on mobile by pushing files and configuring localStorage.
|
|
304
304
|
*
|
|
305
305
|
* The registration flow:
|
|
306
|
-
* 1. Push a minimal `.obsidian/app.json` to the device so Obsidian recognizes the vault
|
|
306
|
+
* 1. Push a minimal `.obsidian/app.json` to the device so Obsidian recognizes the vault —
|
|
307
|
+
* **unless one is already there**, which is the usual case, since `register` pushes the
|
|
308
|
+
* whole vault first and that carries the run's real `app.json` across. See
|
|
309
|
+
* {@link pushObsidianMarker}: the marker is a truncating overwrite, so pushing it
|
|
310
|
+
* unconditionally destroyed the headless defaults it had just been handed.
|
|
307
311
|
* 2. Switch to the WebView context
|
|
308
312
|
* 3. Add the vault to localStorage (`mobile-external-vaults`, `mobile-selected-vault`,
|
|
309
313
|
* `enable-plugin-<path>`)
|
|
@@ -398,6 +402,19 @@ export declare class AppiumTransport implements ObsidianTransport {
|
|
|
398
402
|
* @param payload - The raw JSON payload the binding was called with.
|
|
399
403
|
*/
|
|
400
404
|
private handleInputRequest;
|
|
405
|
+
/**
|
|
406
|
+
* Answers whether the device already holds a usable `app.json` at the given path.
|
|
407
|
+
*
|
|
408
|
+
* Reads the file rather than testing for it, for the reason
|
|
409
|
+
* {@link pushObsidianMarker} spells out: only output that parses as a JSON
|
|
410
|
+
* **object** counts as present, so a merged stderr, an empty file, or a read that
|
|
411
|
+
* failed outright all answer `false` and let the caller push. Never throws — a
|
|
412
|
+
* probe that cannot answer is an answer of `false`.
|
|
413
|
+
*
|
|
414
|
+
* @param remoteMarker - The device-side `app.json` path.
|
|
415
|
+
* @returns `true` when the device holds an `app.json` that parses as a JSON object.
|
|
416
|
+
*/
|
|
417
|
+
private hasDeviceAppJson;
|
|
401
418
|
/**
|
|
402
419
|
* Probes the WebView once for how far Obsidian's startup has got.
|
|
403
420
|
*
|
|
@@ -409,13 +426,43 @@ export declare class AppiumTransport implements ObsidianTransport {
|
|
|
409
426
|
*/
|
|
410
427
|
private probeStartup;
|
|
411
428
|
/**
|
|
412
|
-
* Pushes the minimal `.obsidian/app.json` vault marker via `adb push
|
|
429
|
+
* Pushes the minimal `.obsidian/app.json` vault marker via `adb push` — but
|
|
430
|
+
* only over a device that has not got one already.
|
|
413
431
|
*
|
|
414
432
|
* `browser.pushFile` (WebDriver base64) is an order of magnitude slower on a
|
|
415
433
|
* cold or loaded emulator — measured at 9–21s per call for this 2-byte marker,
|
|
416
434
|
* versus sub-second over `adb`. This mirrors {@link pushFiles}, which switched
|
|
417
435
|
* to `adb` for the same reason. `mkdir -p` guarantees the parent directory.
|
|
418
436
|
*
|
|
437
|
+
* ### Why it has to skip rather than always push
|
|
438
|
+
*
|
|
439
|
+
* `adb push` is a **truncating overwrite**, not a merge, and the marker is `{}`.
|
|
440
|
+
* `register` runs {@link pushFiles} first, which tars the whole host vault —
|
|
441
|
+
* dotfiles included — so by the time this runs the device is already holding the
|
|
442
|
+
* real `app.json` `ensureHeadlessVaultConfig` wrote for this run. Pushing the
|
|
443
|
+
* marker over it threw `alwaysUpdateLinks: true` away one call after it arrived,
|
|
444
|
+
* and Obsidian then opened the vault with the shipped default (off): every
|
|
445
|
+
* Android rename that touched links stopped on the interactive *"Update links?"*
|
|
446
|
+
* sheet, hanging the singleton `FileManager.updateQueue` behind it. That is the
|
|
447
|
+
* rename wall `src/headless-vault-config.ts` exists to remove, live on Android
|
|
448
|
+
* only, from 6.0.0 (when this push arrived) to 16.0.1. It cost two projects
|
|
449
|
+
* several runs apiece, and it surfaced as `EvalCapExceededError` naming the
|
|
450
|
+
* transport cap, which sends the reader after the waiting rather than the sheet.
|
|
451
|
+
*
|
|
452
|
+
* The marker exists solely to make Obsidian **recognize** the directory as a
|
|
453
|
+
* vault, and a real `app.json` does that better than `{}` does. So an existing
|
|
454
|
+
* one is left exactly as it is.
|
|
455
|
+
*
|
|
456
|
+
* ### Why the probe is `cat` and not the teardown's `ls -d`
|
|
457
|
+
*
|
|
458
|
+
* `adb shell` merges the device's stderr into stdout on a legacy shell protocol,
|
|
459
|
+
* and `ls`'s failure message *contains the path it was asked about* — so an
|
|
460
|
+
* `includes(path)` test can read **absent** as **present**, skip the push, and
|
|
461
|
+
* leave a genuinely unmarked vault that Obsidian will not open. Reading the file
|
|
462
|
+
* instead makes the ambiguity harmless: an error message does not parse as a JSON
|
|
463
|
+
* object, so anything unexpected falls through to the push, which is exactly the
|
|
464
|
+
* behaviour this replaces.
|
|
465
|
+
*
|
|
419
466
|
* @param deviceVaultPath - The device-side vault directory path.
|
|
420
467
|
*/
|
|
421
468
|
private pushObsidianMarker;
|