@qontinui/ui-bridge-wrapper 0.1.5 → 0.4.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 +43 -0
- package/dist/capture-specs-cli.cjs +1023 -0
- package/dist/capture-specs-cli.cjs.map +1 -0
- package/dist/capture-specs-cli.d.ts +90 -0
- package/dist/capture-specs-cli.d.ts.map +1 -0
- package/dist/create-transport.d.ts.map +1 -1
- package/dist/index.cjs +206 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +205 -2
- package/dist/index.js.map +1 -1
- package/dist/inject-cli.cjs +1156 -0
- package/dist/inject-cli.cjs.map +1 -0
- package/dist/inject-cli.d.ts +85 -0
- package/dist/inject-cli.d.ts.map +1 -0
- package/dist/login-web-cli.cjs +1004 -0
- package/dist/login-web-cli.cjs.map +1 -0
- package/dist/login-web-cli.d.ts +116 -0
- package/dist/login-web-cli.d.ts.map +1 -0
- package/dist/transports/headless.d.ts +20 -2
- package/dist/transports/headless.d.ts.map +1 -1
- package/dist/transports/injected.d.ts +88 -0
- package/dist/transports/injected.d.ts.map +1 -0
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +10 -4
package/README.md
CHANGED
|
@@ -50,3 +50,46 @@ await transport.close();
|
|
|
50
50
|
|
|
51
51
|
Phase 3 of the wrapper plan adds a scaffold CLI on top of this package;
|
|
52
52
|
Phase 4 ships reference wrappers that exercise all four transports.
|
|
53
|
+
|
|
54
|
+
## CLI bins
|
|
55
|
+
|
|
56
|
+
The package ships three executables. Each resolves the engine bundle
|
|
57
|
+
(`@qontinui/ui-bridge/injected/bundle.global.js`) from the wrapper package's
|
|
58
|
+
own module tree via the injected transport's `createRequire(import.meta.url)`,
|
|
59
|
+
so **they run from any directory once installed** — there is no "must run from
|
|
60
|
+
the ui-bridge repo root" coupling. Run via `npx @qontinui/ui-bridge-wrapper`
|
|
61
|
+
or a global/dev install:
|
|
62
|
+
|
|
63
|
+
| Bin | What it does |
|
|
64
|
+
| --- | --- |
|
|
65
|
+
| `ui-bridge-inject` | Drive the injected transport against a UI-Bridge-free page (exec one-shot actions, or register as a relay tab). |
|
|
66
|
+
| `ui-bridge-login-web` | Automated web login via the injected transport — drives the full Cognito OAuth redirect chain in one headless tab. Prints one JSON result line; exit 0 = login confirmed. |
|
|
67
|
+
| `ui-bridge-capture-specs` | Log in (same flow) then `goto` + snapshot a set of authed pages, writing one `<slug>.snapshot.json` per page. |
|
|
68
|
+
|
|
69
|
+
Each bin supports `--help`.
|
|
70
|
+
|
|
71
|
+
### Prerequisites for the browser-driving bins
|
|
72
|
+
|
|
73
|
+
`ui-bridge-login-web` and `ui-bridge-capture-specs` launch Chromium via the
|
|
74
|
+
injected transport, which dynamically imports `@qontinui/ui-bridge-headless`
|
|
75
|
+
(it carries `playwright` as a real dependency). When installing the wrapper
|
|
76
|
+
standalone you must therefore also:
|
|
77
|
+
|
|
78
|
+
1. Install the optional `@qontinui/ui-bridge-headless` peer alongside it, and
|
|
79
|
+
2. Run `npx playwright install chromium` once (or point `PLAYWRIGHT_BROWSERS_PATH`
|
|
80
|
+
at an existing Chromium download).
|
|
81
|
+
|
|
82
|
+
Credentials for the login/capture bins come from `--email`/`--password` or the
|
|
83
|
+
env vars `UIB_LOGIN_EMAIL` / `UIB_LOGIN_PASSWORD`. Git Bash callers should
|
|
84
|
+
prefix `MSYS_NO_PATHCONV=1` so a leading-slash `--success` / path value is not
|
|
85
|
+
rewritten into a Windows path before the bin sees it.
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# log in and confirm the authed landing is /build/workflows
|
|
89
|
+
ui-bridge-login-web \
|
|
90
|
+
--url "https://qontinui.io/login?next=%2Fbuild%2Fworkflows" \
|
|
91
|
+
--success /build/workflows
|
|
92
|
+
|
|
93
|
+
# capture the default admin coord pages
|
|
94
|
+
ui-bridge-capture-specs --out ./spec-capture
|
|
95
|
+
```
|