@qontinui/ui-bridge-wrapper 0.4.2 → 0.5.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 +4 -4
- package/dist/capture-specs-cli.cjs +9 -3
- package/dist/capture-specs-cli.cjs.map +1 -1
- package/dist/index.cjs +9 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/inject-cli.cjs +98 -3
- package/dist/inject-cli.cjs.map +1 -1
- package/dist/inject-cli.d.ts +29 -1
- package/dist/inject-cli.d.ts.map +1 -1
- package/dist/login-web-cli.cjs +125 -9
- package/dist/login-web-cli.cjs.map +1 -1
- package/dist/login-web-cli.d.ts +5 -1
- package/dist/login-web-cli.d.ts.map +1 -1
- package/dist/session-storage-capture.d.ts +78 -0
- package/dist/session-storage-capture.d.ts.map +1 -0
- package/dist/transports/headless.d.ts +16 -0
- package/dist/transports/headless.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -78,10 +78,10 @@ Each bin supports `--help`.
|
|
|
78
78
|
|
|
79
79
|
### Prerequisites for the browser-driving bins
|
|
80
80
|
|
|
81
|
-
`ui-bridge-login-web
|
|
82
|
-
injected transport, which dynamically imports
|
|
83
|
-
(it carries `playwright` as a real dependency).
|
|
84
|
-
standalone you must therefore also:
|
|
81
|
+
`ui-bridge-inject`, `ui-bridge-login-web`, and `ui-bridge-capture-specs` all
|
|
82
|
+
launch Chromium via the injected transport, which dynamically imports
|
|
83
|
+
`@qontinui/ui-bridge-headless` (it carries `playwright` as a real dependency).
|
|
84
|
+
When installing the wrapper standalone you must therefore also:
|
|
85
85
|
|
|
86
86
|
1. Install the optional `@qontinui/ui-bridge-headless` peer alongside it, and
|
|
87
87
|
2. Run `npx playwright install chromium` once (or point `PLAYWRIGHT_BROWSERS_PATH`
|
|
@@ -230,13 +230,17 @@ var HeadlessTransport = class extends BaseTransport {
|
|
|
230
230
|
uiBridgeBase: typeof raw["uiBridgeBase"] === "string" ? raw["uiBridgeBase"] : void 0,
|
|
231
231
|
waitForUiBridgeMs: typeof raw["waitForUiBridgeMs"] === "number" ? raw["waitForUiBridgeMs"] : void 0,
|
|
232
232
|
userAgent: typeof raw["userAgent"] === "string" ? raw["userAgent"] : void 0,
|
|
233
|
-
forwardConsole: typeof raw["forwardConsole"] === "boolean" ? raw["forwardConsole"] : void 0
|
|
233
|
+
forwardConsole: typeof raw["forwardConsole"] === "boolean" ? raw["forwardConsole"] : void 0,
|
|
234
|
+
launchArgs: Array.isArray(raw["launchArgs"]) && raw["launchArgs"].every((a) => typeof a === "string") ? raw["launchArgs"] : void 0,
|
|
235
|
+
storageStatePath: typeof raw["storageStatePath"] === "string" ? raw["storageStatePath"] : void 0
|
|
234
236
|
};
|
|
235
237
|
}
|
|
236
238
|
async onReady() {
|
|
237
239
|
let launchHeadlessTab;
|
|
240
|
+
const headlessSpecifier = "@qontinui/ui-bridge-headless";
|
|
238
241
|
try {
|
|
239
|
-
|
|
242
|
+
const mod = await import(headlessSpecifier);
|
|
243
|
+
({ launchHeadlessTab } = mod);
|
|
240
244
|
} catch (err) {
|
|
241
245
|
const cause = err instanceof Error ? err.message : String(err);
|
|
242
246
|
const code = err?.code;
|
|
@@ -267,7 +271,9 @@ Underlying import error: ${cause}`
|
|
|
267
271
|
viewportHeight: this.options.viewportHeight,
|
|
268
272
|
userAgent: this.options.userAgent,
|
|
269
273
|
forwardConsole: this.options.forwardConsole,
|
|
270
|
-
initScripts: initScripts.length > 0 ? initScripts : void 0
|
|
274
|
+
initScripts: initScripts.length > 0 ? initScripts : void 0,
|
|
275
|
+
launchArgs: this.options.launchArgs && this.options.launchArgs.length > 0 ? this.options.launchArgs : void 0,
|
|
276
|
+
storageStatePath: this.options.storageStatePath
|
|
271
277
|
});
|
|
272
278
|
} catch (err) {
|
|
273
279
|
const cause = err instanceof Error ? err.message : String(err);
|