@delurio/cli 0.16.0 → 0.17.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/CHANGELOG.md +6 -0
- package/README.md +9 -9
- package/SPEC.md +3 -1
- package/package.json +7 -7
- package/schemas/binding.schema.json +26 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
While the version is 0.x, a release that can judge the same graphs differently (a new check, a stricter schema) bumps the minor; a fix that judges nothing differently bumps the patch.
|
|
4
4
|
|
|
5
|
+
## 0.17.0 (2026-11-29)
|
|
6
|
+
|
|
7
|
+
This release lets a binding say how long its commands may run (SPEC.md §7). The binding schema takes the new key, and `check` holds a binding to it (rule `schema`).
|
|
8
|
+
|
|
9
|
+
- `commands: { timeout: <seconds> }` in a binding, of a flow or of a navigation graph, says how long each of its commands may run: a `run` action wherever it is, and an `attach`'s helper. Left out, it is 180 seconds, the time a replay already gave every command. It is more than 0 and at most 1800 (30 minutes); `check` refuses any other value (`must be > 0`, `must be <= 1800`), so a time written in milliseconds is not waited for. A command that runs past it is stopped with every process it started (SIGTERM, then SIGKILL 5 seconds later) and fails as a command that exits with an error does. Before, a setup that honestly took 4 minutes, such as a seed, could not pass. A binding without the key is judged as before.
|
|
10
|
+
|
|
5
11
|
## 0.16.0 (2026-11-25)
|
|
6
12
|
|
|
7
13
|
This release takes in what a pilot met when it planned tutorials for a whole panel's flows and filmed one video per flow (SPEC.md §7). The engine's tutorial planner and recorder changed with it; `check` replays a tutorial as the video does, so it changes the same way.
|
package/README.md
CHANGED
|
@@ -120,21 +120,21 @@ A file is a woff2, woff, ttf or otf file of at most 2 MiB, and a kit's files are
|
|
|
120
120
|
## Write a graph in an editor
|
|
121
121
|
|
|
122
122
|
The npm package ships a JSON Schema (2020-12) for each kind of graph file in `schemas/`: `flow`, `ui`, `nav` (also `nav.extracted.yaml`), `domain`, `catalog`, `needs`, `gaps` (`needs.gaps.yaml`) and `binding` (`binding.yaml` and a shared `<name>.binding.yaml`). With them an editor completes keys, explains each one from SPEC.md on hover, and marks a typo, a value of the wrong kind, or a title cut short by a comma inside `{ }`. In VS Code, with the YAML extension, put this in `.vscode/settings.json`, with the version your project pins in
|
|
123
|
-
place of 0.
|
|
123
|
+
place of 0.17.0 (a schema from an older release does not know the keys added since):
|
|
124
124
|
|
|
125
125
|
```json
|
|
126
126
|
{
|
|
127
127
|
"yaml.schemas": {
|
|
128
|
-
"https://unpkg.com/@delurio/cli@0.
|
|
129
|
-
"https://unpkg.com/@delurio/cli@0.
|
|
130
|
-
"https://unpkg.com/@delurio/cli@0.
|
|
131
|
-
"https://unpkg.com/@delurio/cli@0.
|
|
132
|
-
"https://unpkg.com/@delurio/cli@0.
|
|
133
|
-
"https://unpkg.com/@delurio/cli@0.
|
|
134
|
-
"https://unpkg.com/@delurio/cli@0.
|
|
128
|
+
"https://unpkg.com/@delurio/cli@0.17.0/schemas/flow.schema.json": "**/flow.yaml",
|
|
129
|
+
"https://unpkg.com/@delurio/cli@0.17.0/schemas/ui.schema.json": "**/ui.yaml",
|
|
130
|
+
"https://unpkg.com/@delurio/cli@0.17.0/schemas/nav.schema.json": ["**/nav.yaml", "**/nav.extracted.yaml"],
|
|
131
|
+
"https://unpkg.com/@delurio/cli@0.17.0/schemas/domain.schema.json": ["**/domain.yaml", "**/domain/*.yaml"],
|
|
132
|
+
"https://unpkg.com/@delurio/cli@0.17.0/schemas/needs.schema.json": "**/needs.yaml",
|
|
133
|
+
"https://unpkg.com/@delurio/cli@0.17.0/schemas/gaps.schema.json": "**/needs.gaps.yaml",
|
|
134
|
+
"https://unpkg.com/@delurio/cli@0.17.0/schemas/binding.schema.json": ["**/binding.yaml", "**/binding.*.yaml", "**/*.binding.yaml"]
|
|
135
135
|
},
|
|
136
136
|
"json.schemas": [
|
|
137
|
-
{ "fileMatch": ["**/catalog/*.json"], "url": "https://unpkg.com/@delurio/cli@0.
|
|
137
|
+
{ "fileMatch": ["**/catalog/*.json"], "url": "https://unpkg.com/@delurio/cli@0.17.0/schemas/catalog.schema.json" }
|
|
138
138
|
]
|
|
139
139
|
}
|
|
140
140
|
```
|
package/SPEC.md
CHANGED
|
@@ -433,6 +433,8 @@ A node's `before` is done before the node is pressed, such as opening the menu i
|
|
|
433
433
|
|
|
434
434
|
The binding's `data` is read when a walk starts, after its `setup`, and again after each `run`, so a command can hand the next action a value it has just written, such as the link or the code of an e-mail that it read from a mail catcher. A source whose file does not exist yet is allowed: the walk fails, naming the file, only when an action uses a value of it (`{<source>.<path>}`) while the file is still missing.
|
|
435
435
|
|
|
436
|
+
Each command a binding runs, a `run` action wherever it is or an `attach`'s helper, may run for 180 seconds. `commands: { timeout: <seconds> }` gives the binding's commands another time: more than 0 and at most 1800 (30 minutes), so that a time written in milliseconds (`180000`) is refused rather than waited for. A command that runs past its time is stopped with every process it started: they are sent SIGTERM, and whatever of them still runs 5 seconds later SIGKILL. It then fails as a command that exits with an error does, and the report says that it ran over its time. Work that takes longer, such as building the app or loading a whole copy of a database, belongs before the replay, not in a walk.
|
|
437
|
+
|
|
436
438
|
A `{placeholder}` in a binding's string, such as an address, a value an action types or a locator's name, is filled from the first of these that gives it: `{walk}`, the walk's own id; a variable of the scenario's `vars`, or a field of its account; an app of `apps`; a value of `data` (`{<source>.<path>}`); and `{locale}` and `{lang}`, the locale the browser runs in and its language alone (`tr-TR` and `tr`), which is the binding's `browser.locale`, the replay's `--locale`, or the language of the tutorial a recording is told in (below). So one `open: '{app}/{lang}/settings/users'` serves every language a flow is replayed or filmed in. A placeholder that none of these gives fails the walk at the action that uses it, and so does `{locale}` or `{lang}` where no locale is given..
|
|
437
439
|
|
|
438
440
|
A walk reads every screen in one language: the binding's `browser.locale`, a BCP 47 tag the browser is set to, or the replay's `--locale`. Each screen is checked against the flow's catalog of that language (§4), found by the whole tag first and then by its language alone: `tr-TR` reads `catalog/tr.json`, and `pt-BR` reads `pt-BR.json` before `pt.json`. A locale the flow has no catalog for is refused, never checked in another language. A flow the walk enters (`enter`) and a navigation graph are read in the same language. `--locale` may be given more than once: the walks are made in each locale, each with a report of its own. A walk keeps to its language: after a step that switches the app's language, the next screens are still read in the walk's. Without either, the screens are read against the catalog `ui.yaml` names. A recording runs the browser in the language its tutorial is told in (the tutorial's `locale`), as `--locale` runs a walk, and finds the app's nodes by the flow's catalog of that language, so that a tutorial told in English does not look for "Apply" on a page opened in Turkish. Where the binding's `browser.locale` is of the same language, it is kept, with its region; where the flow has no catalog in the tutorial's language, the app is filmed in the binding's locale, and the video tool says so..
|
|
@@ -449,7 +451,7 @@ The **replay** walks a flow on the app through its binding and checks each state
|
|
|
449
451
|
|
|
450
452
|
`enter` says how a scenario's walk comes into the flow, after the scenario opens its page (`open`). `enter: { nav: <nav graph dir>, bind: <nav binding>, entry: <from>-><to> }` presses that entry of a navigation graph (§6), found as its own replay finds it (below), its menu opened first, and the address must become the route of the entry's page; `bind` may be left out when the entry's label alone finds it. `enter: { flow: <graph dir>, bind: <its binding>, given: { .. }, event: <EVENT> }` walks another flow from `given`, by the shortest way its binding can drive, to the transition on `<EVENT>` whose `starts` names this flow (§2, Several flows), and checks its screens on the way; what that `starts` hands over must be this scenario's own `given`. The paths are relative to the binding's file. On arrival the focus must be on the `initialFocus` of the entered flow's first screen, past its rules and server calls, and the flow's own walk then goes on from its initial state, so that every walk of the flow can begin where a person comes in.
|
|
451
453
|
|
|
452
|
-
A binding may tie a navigation graph (§6) to the app instead of a flow. It names the graph with `nav: <id>` in place of `flow`, has the keys a flow's binding has for the app (`root`, `extends`, `apps`, `browser`, `data`, `signIn`, `accounts`), and gives `samples` for the `:params` of the routes; a page is opened at the first app and its route. Without `personas`, each persona of the graph signs in as the account named like it. `personas.<persona>: { as, setup }` lets one account stand for several personas: `as` names the account, and `setup`, commands (`run`) done before that persona's visits, gives the account the persona's facts, such as its role. A `setup` at the top, also commands only, runs once before the first persona, for instance to sign the people up. The other keys say where the replay finds what the graph names, and each may be left out. `frames.<frame>` gives `find`, the frame's chrome, where its `menu` entries are; `page`, where a page of the frame draws its own entries (`link`, `button`); and `user` and `picker`, each `{ open: [actions], find }`: what opens the person's menu or the switcher, and the open menu, where their entries are found. `pages.<page>` gives `refusal`, a locator for the words in which the page says no (the graph says them in prose, so a refusal is checked only with one); `shows`, what proves the page opened, absent when it refuses; `samples`, the `:params` of its route for this page, over the binding's own, so that two pages on one route open at items of their own (a revision in review and one decided); or `skip` with a reason. `entries.<from>-><to>` is keyed by the entry's ends, as a code comment cites it (`N:<from>-><to>`), `<from>` being a page or `frame:<frame>`, followed by its `how` or its label key where two entries share their ends (`frame:workspace->start picker`). It gives a locator for the entry's element, where its label is not its accessible name or the entry needs an item (`data: true`); `skip` with a reason; or `follow`. Without a locator in the binding, an entry is found by its label, as the accessible name of what its `how` draws: a link (`menu`, `link`), a button (`button`) or a menu item (`user`, `picker`), in the frame's `find`, its `page` or the open menu.
|
|
454
|
+
A binding may tie a navigation graph (§6) to the app instead of a flow. It names the graph with `nav: <id>` in place of `flow`, has the keys a flow's binding has for the app (`root`, `commands`, `extends`, `apps`, `browser`, `data`, `signIn`, `accounts`), and gives `samples` for the `:params` of the routes; a page is opened at the first app and its route. Without `personas`, each persona of the graph signs in as the account named like it. `personas.<persona>: { as, setup }` lets one account stand for several personas: `as` names the account, and `setup`, commands (`run`) done before that persona's visits, gives the account the persona's facts, such as its role. A `setup` at the top, also commands only, runs once before the first persona, for instance to sign the people up. The other keys say where the replay finds what the graph names, and each may be left out. `frames.<frame>` gives `find`, the frame's chrome, where its `menu` entries are; `page`, where a page of the frame draws its own entries (`link`, `button`); and `user` and `picker`, each `{ open: [actions], find }`: what opens the person's menu or the switcher, and the open menu, where their entries are found. `pages.<page>` gives `refusal`, a locator for the words in which the page says no (the graph says them in prose, so a refusal is checked only with one); `shows`, what proves the page opened, absent when it refuses; `samples`, the `:params` of its route for this page, over the binding's own, so that two pages on one route open at items of their own (a revision in review and one decided); or `skip` with a reason. `entries.<from>-><to>` is keyed by the entry's ends, as a code comment cites it (`N:<from>-><to>`), `<from>` being a page or `frame:<frame>`, followed by its `how` or its label key where two entries share their ends (`frame:workspace->start picker`). It gives a locator for the entry's element, where its label is not its accessible name or the entry needs an item (`data: true`); `skip` with a reason; or `follow`. Without a locator in the binding, an entry is found by its label, as the accessible name of what its `how` draws: a link (`menu`, `link`), a button (`button`) or a menu item (`user`, `picker`), in the frame's `find`, its `page` or the open menu.
|
|
453
455
|
|
|
454
456
|
`replay <nav graph dir> --bind <binding>` opens every page the binding can open, as every persona it binds, and checks what the graph says that persona meets there: the page stays at the address it was opened at, and it opens, or refuses where its `opensFor` does not hold (its `refusal` shown and its `shows` not); each bound frame's chrome is there on the frame's pages and absent on the others; and each entry of the page or of its frame is shown where its `when` holds for the persona and absent where it does not. An entry that needs an item is checked only where the binding gives its locator. `--persona <id>` and `--page <id>`, each given once or more, keep the walk to those personas and pages. `--follow` also takes each entry shown, once per persona, and checks that it lands on its page's route; a `button` acts, so it is taken only with `follow: true`, and `follow: false` keeps an entry from being taken at all (one that signs out or deletes). `--no-setup` skips the top-level `setup` and uses the people of the last run again. `--locale`, once or more, reads the pages in that language: the entries' labels from the navigation graph's catalog of it, found as a flow's is.
|
|
455
457
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@delurio/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "The open checker and page of delurio-graph/0: check every graph in a project's own CI, offline, with GNU error lines and SARIF.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"elkjs": "0.12.1"
|
|
48
48
|
},
|
|
49
49
|
"optionalDependencies": {
|
|
50
|
-
"@delurio/cli-linux-x64-gnu": "0.
|
|
51
|
-
"@delurio/cli-linux-x64-musl": "0.
|
|
52
|
-
"@delurio/cli-linux-arm64-gnu": "0.
|
|
53
|
-
"@delurio/cli-linux-arm64-musl": "0.
|
|
54
|
-
"@delurio/cli-darwin-arm64": "0.
|
|
55
|
-
"@delurio/cli-win32-x64-msvc": "0.
|
|
50
|
+
"@delurio/cli-linux-x64-gnu": "0.17.0",
|
|
51
|
+
"@delurio/cli-linux-x64-musl": "0.17.0",
|
|
52
|
+
"@delurio/cli-linux-arm64-gnu": "0.17.0",
|
|
53
|
+
"@delurio/cli-linux-arm64-musl": "0.17.0",
|
|
54
|
+
"@delurio/cli-darwin-arm64": "0.17.0",
|
|
55
|
+
"@delurio/cli-win32-x64-msvc": "0.17.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@napi-rs/cli": "3.10.12"
|
|
@@ -71,6 +71,19 @@
|
|
|
71
71
|
"type": "string",
|
|
72
72
|
"description": "The folder commands run in, relative to the binding's file; its folder when left out."
|
|
73
73
|
},
|
|
74
|
+
"commands": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"additionalProperties": false,
|
|
77
|
+
"properties": {
|
|
78
|
+
"timeout": {
|
|
79
|
+
"type": "number",
|
|
80
|
+
"exclusiveMinimum": 0,
|
|
81
|
+
"maximum": 1800,
|
|
82
|
+
"description": "How many seconds each command may run at most (180), up to 1800. One that runs past it is stopped with every process it started, and fails as a command that exits with an error does. Proposed on 26 Nov 2026."
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"description": "How the binding's commands run: every `run` action, wherever it is (a setup, a teardown, a snapshot's, an effect's check), and an attach's helper."
|
|
86
|
+
},
|
|
74
87
|
"apps": {
|
|
75
88
|
"type": "object",
|
|
76
89
|
"description": "Each app's base address, used as {<app>} in addresses.",
|
|
@@ -1030,6 +1043,19 @@
|
|
|
1030
1043
|
"type": "string",
|
|
1031
1044
|
"description": "The folder commands run in, relative to the binding's file; its folder when left out."
|
|
1032
1045
|
},
|
|
1046
|
+
"commands": {
|
|
1047
|
+
"type": "object",
|
|
1048
|
+
"additionalProperties": false,
|
|
1049
|
+
"properties": {
|
|
1050
|
+
"timeout": {
|
|
1051
|
+
"type": "number",
|
|
1052
|
+
"exclusiveMinimum": 0,
|
|
1053
|
+
"maximum": 1800,
|
|
1054
|
+
"description": "How many seconds each command may run at most (180), up to 1800. One that runs past it is stopped with every process it started, and fails as a command that exits with an error does. Proposed on 26 Nov 2026."
|
|
1055
|
+
}
|
|
1056
|
+
},
|
|
1057
|
+
"description": "How the binding's commands run: every `run` action, wherever it is (the setup, a persona's), and an attach's helper."
|
|
1058
|
+
},
|
|
1033
1059
|
"apps": {
|
|
1034
1060
|
"type": "object",
|
|
1035
1061
|
"description": "Each app's base address, used as {<app>} in addresses.",
|