@intentius/behold 0.20.0 → 0.22.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 +53 -0
- package/dist/cli.js +301 -65
- package/package.json +1 -1
- package/web/app.js +384 -9
- package/web/embed.js +78 -0
- package/web/embed.test.js +51 -0
- package/web/index.html +20 -0
- package/web/operator.js +14 -1
- package/web/panel.js +11 -3
- package/web/run-playhead.js +13 -1
- package/web/view-url.js +151 -0
- package/web/view-url.test.js +109 -0
- package/web/workspace-gates.js +44 -0
- package/web/workspace-gates.test.js +34 -0
package/README.md
CHANGED
|
@@ -310,6 +310,59 @@ behold shells the **project's own** chant (resolved from the project's
|
|
|
310
310
|
`@intentius/chant ^0.18.1` or later for the live overlay; `graph --live` observed
|
|
311
311
|
nothing before that fix.
|
|
312
312
|
|
|
313
|
+
## Linking to a view, and framing behold in a host
|
|
314
|
+
|
|
315
|
+
The view is in the URL. behold reads it at boot and writes it back as the view
|
|
316
|
+
changes, so a reload keeps it and a link opens where the sender was:
|
|
317
|
+
|
|
318
|
+
```
|
|
319
|
+
http://localhost:4600/?member=delivery&zoom=components&env=prod&node=delivery/appService
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
`member`, `zoom`, `env`, `tier`, `lens` (the colour: `drift`, `cost` or
|
|
323
|
+
`headroom`), `node` and `radial` (`1` or `0`). An empty `env=` is the source
|
|
324
|
+
graph. A value the estate can't honour (a member it doesn't have, a zoom it
|
|
325
|
+
doesn't offer) is named on the now line. A static export takes the same
|
|
326
|
+
parameters against what it captured.
|
|
327
|
+
|
|
328
|
+
A host pane, such as arugula's workspace block, frames behold with
|
|
329
|
+
`?embed=1&host=<the host's origin>`, and optionally `theme=light`, `dark` or
|
|
330
|
+
any theme name the picker lists:
|
|
331
|
+
|
|
332
|
+
- the panel and the inspect pane start folded, and the Deploy tab and the theme
|
|
333
|
+
picker are gone
|
|
334
|
+
- picking a card posts `{type: "behold:select", member, node}` to the parent at
|
|
335
|
+
`host`; picking a member's box posts the same with `node: null`
|
|
336
|
+
- the parent moves the view with `{type: "behold:view", ...}`, carrying any of
|
|
337
|
+
the URL's fields (`member: null` is the whole estate). Messages from any
|
|
338
|
+
other origin are ignored
|
|
339
|
+
- gates are the host's to approve: behold draws them and says so
|
|
340
|
+
|
|
341
|
+
`gates=<env>` sets the env the gate strip reads, apart from the graph's, so a
|
|
342
|
+
host can open behold on the source graph and still show the gates of the env
|
|
343
|
+
it watches. A host whose env changes posts `{type: "behold:view", gates: "<env>"}`
|
|
344
|
+
instead of reloading the frame: behold checks the name as it checks the URL's,
|
|
345
|
+
reads that env's gates at once, and writes `gates=` back into the URL so a
|
|
346
|
+
reload keeps it. `gates: null` (or `""`) hands the strip back to the graph's
|
|
347
|
+
env.
|
|
348
|
+
|
|
349
|
+
behold binds 127.0.0.1 and answers only loopback names, since it runs writes
|
|
350
|
+
with the credentials of whoever started it. A page from another site can't
|
|
351
|
+
write to it. A host that frames behold through a proxy of its own passes the
|
|
352
|
+
proxy's name with `--allow-host <name>` (or `BEHOLD_ALLOWED_HOSTS`); `--host`
|
|
353
|
+
(or `BEHOLD_HOST`) binds another address, which then needs `--allow-host` for
|
|
354
|
+
the names it is reached by.
|
|
355
|
+
|
|
356
|
+
In a declared workspace, the gates waiting on a person come from
|
|
357
|
+
`chant workspace status <env> --json`, keyed `member/op/gate` the way arugula's
|
|
358
|
+
workspace block keys them, so the two show the same set. Standalone, a gate's
|
|
359
|
+
button says who chant will record (the user running behold) before the click.
|
|
360
|
+
Every approve route refuses in preview mode.
|
|
361
|
+
|
|
362
|
+
A host that already watches the workspace tells behold it changed with
|
|
363
|
+
`POST /api/refresh?notify=1`, instead of running behold with `--poll` beside
|
|
364
|
+
it. behold drops its cached reads and every open page re-pulls.
|
|
365
|
+
|
|
313
366
|
## Terraform carve-out: `behold carve <report.json>`
|
|
314
367
|
|
|
315
368
|
`chant carve advise` ranks a Terraform estate by **peelability**: how cleanly
|