@enspirit/opspicy 0.4.0 → 0.6.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 +33 -14
- package/bin/help.js +2 -1
- package/dist/explorer/api.js +158 -9
- package/dist/explorer/asking.js +51 -0
- package/dist/explorer/dependencies.js +117 -0
- package/dist/explorer/depending.js +139 -0
- package/dist/explorer/diagrams.js +176 -0
- package/dist/explorer/document.js +1 -0
- package/dist/explorer/elo.js +18 -0
- package/dist/explorer/pages.js +5 -2
- package/dist/explorer/script/depending.js +41 -0
- package/dist/explorer/script/main.js +1 -0
- package/dist/explorer/script/review.js +1 -1
- package/dist/explorer/script/run.js +4 -1
- package/dist/explorer/script/runner.js +420 -0
- package/dist/explorer/script/running.js +111 -0
- package/dist/explorer/script/sending.js +1 -1
- package/dist/explorer/script/served.js +4 -2
- package/dist/explorer/serve.js +1 -1
- package/dist/explorer/server.js +28 -6
- package/dist/explorer/site.js +1 -1
- package/dist/explorer/style.css +91 -1
- package/dist/explorer/telling.js +2 -0
- package/dist/explorer/tests.js +51 -18
- package/dist/explorer/wiki.js +4 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -11,13 +11,13 @@ agent: Member
|
|
|
11
11
|
entry: DELETE /api/expenses/:id
|
|
12
12
|
input: ExpenseId
|
|
13
13
|
DomPre:
|
|
14
|
-
- (x) the expense is kept:
|
|
14
|
+
- (x) the expense is kept: kept(input.id)
|
|
15
15
|
DomPost:
|
|
16
|
-
- (x) the expense is kept no more:
|
|
16
|
+
- (x) the expense is kept no more: "!kept(input.id)"
|
|
17
17
|
ReqPre:
|
|
18
18
|
- (x) the requester is signed in
|
|
19
19
|
# Of an expense that is kept: of one that is not, the DomPre says it.
|
|
20
|
-
- (x) the requester paid it:
|
|
20
|
+
- (x) the requester paid it: "!kept(input.id) || expense(input.id).paidBy == me"
|
|
21
21
|
ReqPost:
|
|
22
22
|
- (x) the balances still sum to zero: balanced
|
|
23
23
|
- (x) each who shared it, the payer aside, owes their share less, to the cent: >-
|
|
@@ -66,7 +66,7 @@ To run one, [`example/`](example/) holds a system, a splitter of a group's share
|
|
|
66
66
|
|
|
67
67
|
```sh
|
|
68
68
|
git clone https://github.com/enspirit/opspicy && cd opspicy && npm ci
|
|
69
|
-
node example/splitter.ts &
|
|
69
|
+
SPLITTER_FAULT=yes node example/splitter.ts & # the system, on http://127.0.0.1:4000, with its one fault
|
|
70
70
|
export SPLITTER_API=http://127.0.0.1:4000 SPLITTER_MAY_BE_EMPTIED=yes
|
|
71
71
|
bin/opspicy example/suite # runs the suite
|
|
72
72
|
```
|
|
@@ -83,21 +83,24 @@ AddExpense — Member · POST /api/expenses · expenses/operations/AddExpense.ym
|
|
|
83
83
|
✓ example: Bob pays a lunch for the three, which splits evenly
|
|
84
84
|
✗ example: Ann pays a dinner for the three, which leaves a cent over
|
|
85
85
|
ReqPost "the balances still sum to zero" does not hold after the call
|
|
86
|
+
✓ example: Cy pays the first expense of the group
|
|
86
87
|
✓ counterexample: the amount is nothing — for its type, ExpenseGiven
|
|
87
88
|
✓ counterexample: it is shared with somebody out of the group — for "it is shared among the group"
|
|
88
89
|
✓ counterexample: called as visitor — for "the requester is signed in" [from a condition]
|
|
89
90
|
```
|
|
90
91
|
|
|
91
|
-
Its
|
|
92
|
+
Its six specifications are small. Each operation says first the transition it makes, one `DomPre` and one `DomPost` (an expense is not kept, then it is), then what the rules demand of it, which is more than what one call changes: the balances of the group always sum to zero, a member pays back no more than they owe nor to somebody who is owed less, and only who paid an expense takes it back.
|
|
92
93
|
|
|
93
94
|
| | Its transition | What the rules demand of it |
|
|
94
95
|
| --- | --- | --- |
|
|
96
|
+
| [`SignIn`](example/suite/specification/members/operations/SignIn.yml) | The requester is not signed in; then they are. | The password is theirs, as the world knows it; no password at all is no `Credentials`, which a counterexample `for` the type shows refused. They are who they said they are, and are told the balances, which a visitor is not. |
|
|
97
|
+
| [`SignOut`](example/suite/specification/members/operations/SignOut.yml) | The requester is signed in; then they are not. | Nothing more: a visitor who asks is refused, as a condition says of every operation a member performs. |
|
|
95
98
|
| [`AddExpense`](example/suite/specification/expenses/operations/AddExpense.yml) | The expense is not kept yet; then it is. | Shared among the group; an amount above zero, which its type says, `Int(c \| c > 0)`, and a counterexample `for` the type shows refused. It is as given; each who shares it owes their share more, to the cent; another member sees it too. |
|
|
96
99
|
| [`SettleUp`](example/suite/specification/expenses/operations/SettleUp.yml) | The requester has a debt; then a smaller one. | The requester owes at least the amount, and whom it is paid to is owed at least that much: constraints on the state, not on the input. Both balances move by exactly that much. |
|
|
97
100
|
| [`RemoveExpense`](example/suite/specification/expenses/operations/RemoveExpense.yml) | The expense is kept; then it is not. | Only who paid it, and who shared it owes their share less. |
|
|
98
101
|
| [`ListBalances`](example/suite/specification/expenses/observations/ListBalances.yml) | None: an observation makes no transition. | What it tells is the state, and sums to zero. |
|
|
99
102
|
|
|
100
|
-
|
|
103
|
+
Started so, the splitter has one fault, on purpose: an amount that does not split evenly leaves a cent over, which nobody is made to owe. Its answer is right, and so is every share, to the cent: only the sum of the balances shows it, and only on an uneven split, which is what a run finds. Started without `SPLITTER_FAULT=yes`, it does what its suite says, the cents left over owed by the first of those who share the expense, and a run finds nothing. Then, to read the suite rather than its files:
|
|
101
104
|
|
|
102
105
|
```sh
|
|
103
106
|
bin/opspicy example/suite --report=last.json # the same run, kept
|
|
@@ -105,6 +108,22 @@ bin/opspicy explorer example/suite --report=last.json # writes explore
|
|
|
105
108
|
bin/opspicy serve example/suite --report=last.json --api # http://127.0.0.1:8080, and it runs what its page asks
|
|
106
109
|
```
|
|
107
110
|
|
|
111
|
+
The splitter also gives a page at its front door, `http://127.0.0.1:4000`, to show what such a system is made of before any of this is read. It opens as a *User* has it: an app as any other, to sign in (Ann, Bob or Cy), add an expense, take one back, settle up and read the balances, of a group that spent nothing yet; *Start over* puts the splitter back there, whatever was done, and signs out. Turned to the *Analyst*, or opened at `http://127.0.0.1:4000/#analyst`, the page shows beside the app what it is made of. In the middle, its specification: its operations, each with what it demands before and promises after, decided as the page is used. What a member does in the app is a verb, add an expense, and what the specification says of it, and the splitter runs, is an operation, `AddExpense`: a button is held back while a precondition of its operation fails, and the clause that fails turns red, a moment after it does: a form that was just used is empty again, and would otherwise seem to have failed. A clause is read by its sentence, and *Formaldefs* shows the formaldef of every one, as in the explorer. On the right, the state, the rule it must always satisfy, and every call as a transition from one state to the next, or as a refusal that left it where it was. *The concepts*, which a user has as an analyst does, opens the page that explains it, `http://127.0.0.1:4000/about`: a schema of the splitter as a black box, with its state, the observation of that state through its front door, and an operation with its conditions to be called and what it guarantees of the result, said by its definition and by an example; from there, two ways lead back to the app, as a user and as an analyst, which kept what was asked. The same calls are read another way under *The data exchanges*: where each was sent, the JSON it was sent and the JSON it answered. What a user did is judged and written down all the same, and is there to read. *Ask anyway* lets the page ask what the rules are against, and it is the splitter that refuses. The splitter has no fault there unless it is started with one: with `SPLITTER_FAULT=yes`, a dinner of 100.00 for the three is answered 201, the app has nothing to say, and the page shows the state the rules do not allow. The operations are those of the suite, in its words, [`example/ui/operations.js`](example/ui/operations.js): a test holds the two together.
|
|
112
|
+
|
|
113
|
+
Both are at one address, with what runs the cases, when the example is started whole:
|
|
114
|
+
|
|
115
|
+
```sh
|
|
116
|
+
node example/training.ts # http://127.0.0.1:4000
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
| | |
|
|
120
|
+
| --- | --- |
|
|
121
|
+
| `/` | Leads to the page that explains, `/app/about`, which leads to the three below. |
|
|
122
|
+
| `/app/` | The splitter and its page: the app as a user has it, and `/app/#analyst` with what an analyst reads beside it. Each operation there leads to its page of the specification. |
|
|
123
|
+
| `/spec/` | The explorer of the suite, served with its API. Its Tests page runs every case, of the suite or of one area, and tells each as it is run. |
|
|
124
|
+
|
|
125
|
+
The cases are run against a splitter of their own, which nothing else reaches: a run begins by putting the system back in a seed, and whoever is learning in the app would lose what they did at the first case. That splitter has its fault, since a run is there to find something; `SPLITTER_FAULT=no` starts it without. What is at the address only passes each request on to the server its path names ([`example/training.ts`](example/training.ts)): the splitter and the explorer are what they are alone.
|
|
126
|
+
|
|
108
127
|
## How a case runs
|
|
109
128
|
|
|
110
129
|
| | |
|
|
@@ -184,16 +203,16 @@ A system that stops answering during the run is not that: each case then could n
|
|
|
184
203
|
|
|
185
204
|
| Tag | Is |
|
|
186
205
|
| --- | --- |
|
|
187
|
-
| `0.
|
|
206
|
+
| `0.6.0` | The version tagged `v0.6.0`: the image of that commit, as it was tested. Name one of these. |
|
|
188
207
|
| `latest`, `sha-<commit>` | The main branch, and one commit of it. |
|
|
189
208
|
|
|
190
209
|
**As a tool**, on a suite that is mounted:
|
|
191
210
|
|
|
192
211
|
```sh
|
|
193
|
-
docker run --rm -v "$PWD":/suite:ro enspirit/opspicy:0.
|
|
194
|
-
docker run --rm -v "$PWD":/suite:ro enspirit/opspicy:0.
|
|
195
|
-
docker run --rm -v "$PWD":/suite enspirit/opspicy:0.
|
|
196
|
-
docker run --rm -v "$PWD":/suite:ro -p 127.0.0.1:8080:8080 enspirit/opspicy:0.
|
|
212
|
+
docker run --rm -v "$PWD":/suite:ro enspirit/opspicy:0.6.0 opspicy --check
|
|
213
|
+
docker run --rm -v "$PWD":/suite:ro enspirit/opspicy:0.6.0 tsc -p . # type-checks its config.ts
|
|
214
|
+
docker run --rm -v "$PWD":/suite enspirit/opspicy:0.6.0 opspicy explorer --out=explorer.html
|
|
215
|
+
docker run --rm -v "$PWD":/suite:ro -p 127.0.0.1:8080:8080 enspirit/opspicy:0.6.0 opspicy serve --host=0.0.0.0
|
|
197
216
|
```
|
|
198
217
|
|
|
199
218
|
The last one is read-only: `--api` is offered on the machine the server runs on, which a container is not.
|
|
@@ -201,7 +220,7 @@ The last one is read-only: `--api` is offered on the machine the server runs on,
|
|
|
201
220
|
**As the base of a suite's image**, where the system is reached: on the network of its stack, say.
|
|
202
221
|
|
|
203
222
|
```dockerfile
|
|
204
|
-
FROM enspirit/opspicy:0.
|
|
223
|
+
FROM enspirit/opspicy:0.6.0
|
|
205
224
|
COPY . /suite
|
|
206
225
|
CMD ["tail", "-f", "/dev/null"] # it sleeps, and `opspicy` is run in it
|
|
207
226
|
```
|
|
@@ -228,7 +247,7 @@ Everything it says is a **citizen**: a name, a description, and for some a forma
|
|
|
228
247
|
|
|
229
248
|
### The explorer
|
|
230
249
|
|
|
231
|
-
A wiki of a suite, as one HTML document that fetches nothing: the specification, and the last run of each operation when there is a report of one. A reader searches it, opens a formaldef at a click, follows a name in Elo to the citizen it names, takes notes that become one review file, and, where the document is served with `--api`, runs one case or calls an operation by hand.
|
|
250
|
+
A wiki of a suite, as one HTML document that fetches nothing: the specification, and the last run of each operation when there is a report of one. A reader searches it, opens a formaldef at a click, follows a name in Elo to the citizen it names, takes notes that become one review file, and, where the document is served with `--api`, runs one case, every case of the suite or of an area with each told as it is run, or calls an operation by hand.
|
|
232
251
|
|
|
233
252
|
**[`doc/explorer.md`](doc/explorer.md) is its reference**: its pages, [the notes and the review file](doc/explorer.md#notes-and-the-review-file), [calling an operation](doc/explorer.md#calling-an-operation), [running a case](doc/explorer.md#running-a-case), [the API](doc/explorer.md#served-with---api), and what the document says to its own script.
|
|
234
253
|
|
|
@@ -269,7 +288,7 @@ npm run test:package # needs the registry: installs what would be published, a
|
|
|
269
288
|
| --- | --- |
|
|
270
289
|
| What reads a suite ([`notation`](src/notation.ts), [`citizens`](src/citizens.ts), [`modelling`](src/modelling.ts), [`words`](src/words.ts), [`lines`](src/lines.ts), [`reading`](src/reading.ts), and [`files`](src/files.ts) on a directory made for the test), names ([`naming`](src/naming.ts)), says what a state variable is and which covers which ([`variables`](src/variables.ts)), what a formaldef reads of them ([`reach`](src/reach.ts)), plans ([`planning`](src/planning.ts), and what a case observes: [`observing`](src/observing.ts)), chooses what is run ([`selecting`](src/selecting.ts)), judges ([`judging`](src/judging.ts)) and tells ([`report`](src/report.ts), [`report-file`](src/report-file.ts)) | Pure, and tables of cases with no server and no mock: [`test/`](test/). |
|
|
271
290
|
| What sets a Background, calls and observes ([`world`](src/world.ts), [`observing`](src/observing.ts), [`running`](src/running.ts)), and the command | Cases run over the wire against a keeper of boards, [`test/boards/`](test/boards/), started in the test's own process: a small real server, and the suite that specifies it. What is asked of a database is held as the statements it is asked: no test has one. |
|
|
272
|
-
| The example | [`test/example.test.ts`](test/example.test.ts): the suite of [`example/`](example/) reads, and a run of it against the splitter finds its one fault, and nothing else. |
|
|
291
|
+
| The example | [`test/example.test.ts`](test/example.test.ts): the suite of [`example/`](example/) reads, and a run of it against the splitter finds its one fault when it is started with it, and nothing else; nothing at all when it is not. [`test/example-page.test.ts`](test/example-page.test.ts): the page of the splitter says each clause of the suite in its words, and judges every case of it as a run does. [`test/browser/splitter.test.ts`](test/browser/splitter.test.ts): the page as a member has it, in a Chrome. [`test/example-training.test.ts`](test/example-training.test.ts) and [`test/browser/training.test.ts`](test/browser/training.test.ts): the example at one address, the app under `/app/` and its explorer under `/spec/`, where every case is run and the app loses nothing to it. |
|
|
273
292
|
| What writes the explorer ([`src/explorer/`](src/explorer/)) and what its API answers | The same: pure for the document, over the wire for the API. |
|
|
274
293
|
| What the page's script decides: what a search finds and in what order, the review file, what a call sends and the command that says it ([`src/explorer/script/`](src/explorer/script/)) | `test/script*.test.ts`, which read the script as the page does; the copied command is run through a shell, with a stand-in for `curl`. |
|
|
275
294
|
| What the script does to the page | [`test/browser/`](test/browser/): a headless Chrome, driven with `playwright-core`, on the document opened by `file://` as it is used, and served with its API. They **fail** with a sentence saying so when there is no Chrome, never pass unchecked. |
|
package/bin/help.js
CHANGED
|
@@ -80,7 +80,8 @@ when none is named. Stop it with Ctrl-C.
|
|
|
80
80
|
Options:
|
|
81
81
|
--host=<host> where it listens (127.0.0.1; 0.0.0.0 in a container)
|
|
82
82
|
--port=<port> the port (8080; 0 for any free one)
|
|
83
|
-
--api also run what the page asks: one case,
|
|
83
|
+
--api also run what the page asks: one case, every case of an
|
|
84
|
+
operation, of an area or of the suite, or a call as an actor.
|
|
84
85
|
It meets the system through the suite's config.ts, and running
|
|
85
86
|
a case empties its database: offered on this machine only.
|
|
86
87
|
${ABOUT_THE_SUITE}
|
package/dist/explorer/api.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
// What the served explorer does when its page asks: says what it serves, runs one case,
|
|
2
|
-
//
|
|
1
|
+
// What the served explorer does when its page asks: says what it serves, runs one case, or every
|
|
2
|
+
// case of the suite or of an area, telling each as it is run, calls an operation as an actor of
|
|
3
|
+
// the world, and writes the review beside the specification. It is the
|
|
3
4
|
// runner, asked from a page: a case is run as main.ts runs it, through the front door, against
|
|
4
5
|
// the system the suite's configuration names.
|
|
5
6
|
//
|
|
@@ -7,9 +8,11 @@
|
|
|
7
8
|
// it is read again whenever its files are no longer what they were (afresh.ts). Nothing told
|
|
8
9
|
// here holds what an actor signs in with: a sign-in is neither logged nor answered, and what a
|
|
9
10
|
// run tells is told without what the world holds (telling.ts, masking.ts).
|
|
10
|
-
import { lstatSync, renameSync, rmSync, writeFileSync } from 'node:fs';
|
|
11
|
+
import { lstatSync, readFileSync, renameSync, rmSync, writeFileSync } from 'node:fs';
|
|
11
12
|
import { join } from 'node:path';
|
|
12
13
|
import { namesOf } from '../files.js';
|
|
14
|
+
import { gapsOf } from '../planning.js';
|
|
15
|
+
import { parseReport, reportOf } from '../report-file.js';
|
|
13
16
|
import { meaningOf } from '../meaning.js';
|
|
14
17
|
import { addressed, queryOf } from '../notation.js';
|
|
15
18
|
import { runCase } from '../running.js';
|
|
@@ -17,9 +20,11 @@ import { observedBy } from '../suite.js';
|
|
|
17
20
|
import { NotStarted, reachOf } from '../starting.js';
|
|
18
21
|
import { browserOf } from '../world.js';
|
|
19
22
|
import { suiteAt } from './afresh.js';
|
|
20
|
-
import {
|
|
23
|
+
import { idOf } from './wiki.js';
|
|
24
|
+
import { callAsked, isTold, refused, runAsked, runsAsked } from './asking.js';
|
|
21
25
|
import { secretsOf } from './masking.js';
|
|
22
|
-
import { ranOf } from './telling.js';
|
|
26
|
+
import { amongOf, ranOf } from './telling.js';
|
|
27
|
+
export const isStreamed = (answer) => 'stream' in answer;
|
|
23
28
|
const PROTECTED = 'This stack does not say that its database may be emptied';
|
|
24
29
|
/** Whether the database is somebody's: it is, unless the configuration says in so many words that it may be emptied. What only looks like yes (`'yes'`, `1`) is not. */
|
|
25
30
|
export const isProtected = (config) => config.mayEmptyTheDatabase !== true;
|
|
@@ -32,7 +37,7 @@ export function health(bench) {
|
|
|
32
37
|
const mode = bench.lastMode() ?? 'fast';
|
|
33
38
|
return { status: 200, body: { name: bench.name, ...(bench.version ? { version: bench.version } : {}), target: bench.config.api, protected: isProtected(bench.config), modes, mode: modes.includes(mode) ? mode : 'fast' } };
|
|
34
39
|
}
|
|
35
|
-
let
|
|
40
|
+
let made = 0;
|
|
36
41
|
/** Runs one case, by its anchor: its Background is set, which replaces what the database held, and the case is judged. */
|
|
37
42
|
export async function run(bench, asked) {
|
|
38
43
|
const suite = suiteAt(bench.root);
|
|
@@ -48,13 +53,157 @@ export async function run(bench, asked) {
|
|
|
48
53
|
if (isTold(reach))
|
|
49
54
|
return reach;
|
|
50
55
|
try {
|
|
51
|
-
const outcome = await runCase(reach, suite.model, meaningOf(suite.types, namesOf(suite.model)), found.operation, found.kase, { run: process.pid, n:
|
|
52
|
-
|
|
56
|
+
const outcome = await runCase(reach, suite.model, meaningOf(suite.types, namesOf(suite.model)), found.operation, found.kase, { run: process.pid, n: made++, listening: true });
|
|
57
|
+
const told = ranOf(found.operation, outcome, found.mode, secretsOf(suite.model));
|
|
58
|
+
keptOf(bench).set(idOf('case', found.kase.name), told);
|
|
59
|
+
return { status: 200, body: told };
|
|
53
60
|
}
|
|
54
61
|
finally {
|
|
55
62
|
await reach.database?.end();
|
|
56
63
|
}
|
|
57
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* What the last run of each case told, whole: its call, its answer, what did not hold and its
|
|
67
|
+
* log. A run of many cases tells each in a line, and keeps the rest here, for the page to ask for
|
|
68
|
+
* the case it opens. Kept for as long as the server runs, by the suite it is of, and nowhere else:
|
|
69
|
+
* a log holds what the system answered.
|
|
70
|
+
*/
|
|
71
|
+
const KEPT = new Map();
|
|
72
|
+
function keptOf(bench) {
|
|
73
|
+
const kept = KEPT.get(bench.root) ?? new Map();
|
|
74
|
+
KEPT.set(bench.root, kept);
|
|
75
|
+
return kept;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* What the last run of a case told, by its anchor: of one that was run alone or among others,
|
|
79
|
+
* since this server started. Of one it did not run it keeps nothing, and says so as `null`: that
|
|
80
|
+
* is an answer and no failure, and a page that asks of each case it opens is told so quietly.
|
|
81
|
+
*/
|
|
82
|
+
export function ran(bench, ref) {
|
|
83
|
+
if (!ref)
|
|
84
|
+
return refused(400, 'What a run told is asked by the anchor of its case: ?case=case-CreateBoard-examples-1.');
|
|
85
|
+
return { status: 200, body: keptOf(bench).get(ref) ?? null };
|
|
86
|
+
}
|
|
87
|
+
/** The report a run is added to, when there is one that reads. */
|
|
88
|
+
function reportBefore(file) {
|
|
89
|
+
try {
|
|
90
|
+
return parseReport(readFileSync(file, 'utf8'));
|
|
91
|
+
}
|
|
92
|
+
catch {
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
/** A run in words, as a report says what was asked of it. */
|
|
97
|
+
const asked = (scope) => (scope.of === 'suite' ? [] : scope.of === 'area' ? [`area ${scope.area}`] : scope.of === 'operation' ? [`operation ${scope.operation}`] : [`operation ${scope.operation}, case "${scope.kase}"`]);
|
|
98
|
+
/**
|
|
99
|
+
* The report after a run. A run of the whole suite is the report, as the runner writes it. A run
|
|
100
|
+
* of less is added to the report there was: each operation it ran takes the place of what the
|
|
101
|
+
* report said of it, and a case run alone the place of that case, so that what was run before is
|
|
102
|
+
* still told. Such a report is of several runs: it says so, unless it was one of the whole suite,
|
|
103
|
+
* which it still is.
|
|
104
|
+
*/
|
|
105
|
+
export function reportAfter(before, ran, facts, scope) {
|
|
106
|
+
const now = reportOf(ran, { ...facts, narrowed: asked(scope) });
|
|
107
|
+
if (scope.of === 'suite' || !before)
|
|
108
|
+
return now;
|
|
109
|
+
const operations = before.operations.map((one) => ({ ...one, cases: [...one.cases] }));
|
|
110
|
+
for (const run of now.operations) {
|
|
111
|
+
const at = operations.findIndex((one) => one.file === run.file);
|
|
112
|
+
if (at < 0)
|
|
113
|
+
operations.push(run);
|
|
114
|
+
else if (scope.of !== 'case')
|
|
115
|
+
operations[at] = run;
|
|
116
|
+
else {
|
|
117
|
+
const was = operations[at];
|
|
118
|
+
for (const kase of run.cases) {
|
|
119
|
+
const same = was.cases.findIndex((one) => one.kind === kase.kind && one.when === kase.when && one.generated === kase.generated);
|
|
120
|
+
if (same < 0)
|
|
121
|
+
was.cases.push(kase);
|
|
122
|
+
else
|
|
123
|
+
was.cases[same] = kase;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return { ...now, narrowed: before.narrowed.length ? ['several runs from the explorer'] : [], operations };
|
|
128
|
+
}
|
|
129
|
+
/** The report of a run, in its file: written beside and put in its place, so that who reads it meanwhile reads a whole one. What kept it from being written is said. */
|
|
130
|
+
function reported(file, ran, facts, scope) {
|
|
131
|
+
const beside = `${file}.${process.pid}.part`;
|
|
132
|
+
try {
|
|
133
|
+
writeFileSync(beside, JSON.stringify(reportAfter(reportBefore(file), ran, facts, scope), null, 2) + '\n');
|
|
134
|
+
renameSync(beside, file);
|
|
135
|
+
return { report: file };
|
|
136
|
+
}
|
|
137
|
+
catch (error) {
|
|
138
|
+
return { report: null, unwritten: `The report could not be written to ${file}: ${error instanceof Error ? error.message : String(error)}` };
|
|
139
|
+
}
|
|
140
|
+
finally {
|
|
141
|
+
rmSync(beside, { force: true });
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Runs every case of the suite, of one area or of one operation, or one case, and tells each as
|
|
146
|
+
* it is run. What is told, a message at a time: `started`, with what is to be run; `running`, a
|
|
147
|
+
* case, before it is; `ran`, the same case, with its result and what did not hold; `ended`, with
|
|
148
|
+
* the counts. The whole telling of each case, its log among it, is kept for the page to ask for
|
|
149
|
+
* (`ran`). A run that ended is written to the report of the explorer, when it has one: the whole
|
|
150
|
+
* suite as the runner writes it, less than that added to what the report told. Its pages then
|
|
151
|
+
* tell that run. One that whoever asked did not wait for stops, and writes nothing.
|
|
152
|
+
*/
|
|
153
|
+
export async function runs(bench, asked) {
|
|
154
|
+
const suite = suiteAt(bench.root);
|
|
155
|
+
const found = runsAsked(suite, asked, bench.lastMode());
|
|
156
|
+
if (isTold(found))
|
|
157
|
+
return found;
|
|
158
|
+
if (isProtected(bench.config))
|
|
159
|
+
return refused(403, `${PROTECTED}, and running a case sets its Background, which empties it.`);
|
|
160
|
+
if (found.mode === 'complete' && !completes(suite, bench.config))
|
|
161
|
+
return refused(400, 'The complete run reads what the database shows of the state, and the configuration names no database to read it from.');
|
|
162
|
+
const reach = await reachOf(suite, bench.config, found.mode === 'fast').catch((error) => (error instanceof NotStarted ? refused(503, error.message) : Promise.reject(error)));
|
|
163
|
+
if (isTold(reach))
|
|
164
|
+
return reach;
|
|
165
|
+
const { mode, scope, plan } = found;
|
|
166
|
+
const kept = keptOf(bench);
|
|
167
|
+
const [meaning, secrets] = [meaningOf(suite.types, namesOf(suite.model)), secretsOf(suite.model)];
|
|
168
|
+
const stream = async (say, gone) => {
|
|
169
|
+
const started = Date.now();
|
|
170
|
+
const counts = { passed: 0, failed: 0, error: 0 };
|
|
171
|
+
const ran = [];
|
|
172
|
+
let stopped = false;
|
|
173
|
+
try {
|
|
174
|
+
say({
|
|
175
|
+
is: 'started',
|
|
176
|
+
mode,
|
|
177
|
+
...(scope.of === 'area' ? { area: idOf('area', scope.area) } : {}),
|
|
178
|
+
cases: plan.reduce((sum, one) => sum + one.cases.length, 0),
|
|
179
|
+
operations: plan.map(({ operation, cases }) => ({ ref: idOf('op', operation.name), name: operation.name, cases: cases.map((kase) => idOf('case', kase.name)) })),
|
|
180
|
+
});
|
|
181
|
+
for (const { operation, cases, all } of plan) {
|
|
182
|
+
const outcomes = [];
|
|
183
|
+
for (const kase of cases) {
|
|
184
|
+
if ((stopped = gone()))
|
|
185
|
+
break;
|
|
186
|
+
say({ is: 'running', ref: idOf('case', kase.name) });
|
|
187
|
+
const outcome = await runCase(reach, suite.model, meaning, operation, kase, { run: process.pid, n: made++, listening: true });
|
|
188
|
+
const told = ranOf(operation, outcome, mode, secrets);
|
|
189
|
+
kept.set(idOf('case', kase.name), told);
|
|
190
|
+
counts[told.result] += 1;
|
|
191
|
+
outcomes.push(outcome);
|
|
192
|
+
say({ is: 'ran', ...amongOf(operation, kase, told) });
|
|
193
|
+
}
|
|
194
|
+
if (stopped)
|
|
195
|
+
break;
|
|
196
|
+
ran.push({ operation, outcomes, gaps: gapsOf(operation, all) });
|
|
197
|
+
}
|
|
198
|
+
const written = !stopped && bench.report ? reported(bench.report, ran, { when: new Date(started).toISOString(), narrowed: [], fast: mode === 'fast', stopped: false }, scope) : { report: null };
|
|
199
|
+
say({ is: 'ended', passed: counts.passed, failed: counts.failed, errors: counts.error, seconds: (Date.now() - started) / 1000, stopped, ...written });
|
|
200
|
+
}
|
|
201
|
+
finally {
|
|
202
|
+
await reach.database?.end();
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
return { status: 200, stream };
|
|
206
|
+
}
|
|
58
207
|
/** Calls an operation once, as an actor of the world, with an input: the route is filled from it, and the rest is sent. */
|
|
59
208
|
export async function call(bench, asked) {
|
|
60
209
|
const found = callAsked(suiteAt(bench.root), asked);
|
|
@@ -71,7 +220,7 @@ export async function call(bench, asked) {
|
|
|
71
220
|
return refused(400, error instanceof Error ? error.message : String(error));
|
|
72
221
|
}
|
|
73
222
|
const started = Date.now();
|
|
74
|
-
const theirs = await browserOf(bench.config, `10.254.${(
|
|
223
|
+
const theirs = await browserOf(bench.config, `10.254.${(made >> 8) % 256}.${made++ % 256}`, actor, held).catch(() => null);
|
|
75
224
|
if (!theirs)
|
|
76
225
|
return refused(400, `"${actor}" could not be signed in.`);
|
|
77
226
|
const answer = operation.entry.method === 'GET' ? await theirs.call('GET', `${sent.path}${queryOf(sent.rest)}`) : await theirs.call(operation.entry.method, sent.path, sent.rest ?? {});
|
package/dist/explorer/asking.js
CHANGED
|
@@ -57,3 +57,54 @@ export function callAsked(suite, asked) {
|
|
|
57
57
|
return refused(400, `Nobody is called "${actor}" in the world.`);
|
|
58
58
|
return { operation, actor, held: held[actor] ?? null, input };
|
|
59
59
|
}
|
|
60
|
+
const HOW_RUNS = 'Runs are asked as { area, mode }, { operation, mode } or { case, mode }: the anchor of an area, of an operation or of a case, or none of them for the whole suite, and "fast" or "complete".';
|
|
61
|
+
/**
|
|
62
|
+
* The runs a page asks for, or why none is made: every case of the area an anchor names,
|
|
63
|
+
* `area-expenses`, of the operation one names, `op-AddExpense`, the case one names alone, or every
|
|
64
|
+
* case of the suite when nothing is named. Nothing of a suite that cannot be read is run, as the
|
|
65
|
+
* runner runs nothing of it.
|
|
66
|
+
*/
|
|
67
|
+
export function runsAsked(suite, asked, lastMode) {
|
|
68
|
+
const { area, operation, case: kase, mode: wanted } = record(asked);
|
|
69
|
+
const mode = wanted ?? lastMode ?? 'fast';
|
|
70
|
+
const named = [area, operation, kase].filter((one) => one !== undefined);
|
|
71
|
+
if (named.length > 1 || named.some((one) => typeof one !== 'string') || (mode !== 'fast' && mode !== 'complete'))
|
|
72
|
+
return refused(400, HOW_RUNS);
|
|
73
|
+
const unread = suite.problems;
|
|
74
|
+
const cannot = () => refused(400, `The specification cannot be read, and nothing of it is run until it is: ${unread[0]}${unread.length > 1 ? ` (and ${unread.length - 1} more)` : ''}`);
|
|
75
|
+
const checked = suite.operations.map((written) => (mode === 'fast' ? mustOnly(written) : written));
|
|
76
|
+
const planned = (operations, only) => operations.map((one) => {
|
|
77
|
+
const all = casesOf(one, suite.model);
|
|
78
|
+
return { operation: one, cases: only ? [only] : all, all };
|
|
79
|
+
});
|
|
80
|
+
if (typeof kase === 'string') {
|
|
81
|
+
const found = caseAt(suite, kase, mode);
|
|
82
|
+
if (!found)
|
|
83
|
+
return refused(404, `The specification has no case at "${kase}".`);
|
|
84
|
+
if (unread.length)
|
|
85
|
+
return cannot();
|
|
86
|
+
return { mode, scope: { of: 'case', operation: found.operation.name, kase: found.kase.description }, plan: planned([found.operation], found.kase) };
|
|
87
|
+
}
|
|
88
|
+
if (typeof operation === 'string') {
|
|
89
|
+
const [found, ...others] = checked.filter((one) => idOf('op', one.name) === operation);
|
|
90
|
+
if (!found)
|
|
91
|
+
return refused(404, `The specification has no operation at "${operation}".`);
|
|
92
|
+
if (others.length)
|
|
93
|
+
return refused(409, `The specification has ${others.length + 1} operations at "${operation}": name one otherwise.`);
|
|
94
|
+
if (unread.length)
|
|
95
|
+
return cannot();
|
|
96
|
+
const plan = planned([found]);
|
|
97
|
+
if (!plan[0].cases.length)
|
|
98
|
+
return refused(404, `The operation "${found.name}" has no case to run.`);
|
|
99
|
+
return { mode, scope: { of: 'operation', operation: found.name }, plan };
|
|
100
|
+
}
|
|
101
|
+
const within = typeof area === 'string' ? suite.model.areas.find((one) => idOf('area', one.name) === area)?.name : undefined;
|
|
102
|
+
if (typeof area === 'string' && within === undefined)
|
|
103
|
+
return refused(404, `The specification has no area at "${area}".`);
|
|
104
|
+
if (unread.length)
|
|
105
|
+
return cannot();
|
|
106
|
+
const plan = planned(checked.filter((one) => within === undefined || one.area === within));
|
|
107
|
+
if (!plan.some((one) => one.cases.length))
|
|
108
|
+
return refused(404, within === undefined ? 'The specification has no case to run.' : `The area "${within}" has no case to run.`);
|
|
109
|
+
return { mode, scope: within === undefined ? { of: 'suite' } : { of: 'area', area: within }, plan };
|
|
110
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
// The page of what the areas depend on: two drawings (diagrams.ts), and under each the same as a
|
|
2
|
+
// table, where every name leads to its citizen. What is shown is derived (depending.ts): no file
|
|
3
|
+
// of a suite says it. Pure: the wiki is given, markup is what comes out.
|
|
4
|
+
import { aroundOf } from './depending.js';
|
|
5
|
+
import { areasDrawn, detailDrawn, namesDrawn } from './diagrams.js';
|
|
6
|
+
import { esc, link, plural, table } from './html.js';
|
|
7
|
+
import { areaTitle } from './operation.js';
|
|
8
|
+
import { idOf } from './wiki.js';
|
|
9
|
+
const LEAD = 'What each area says in the words of another, and reads of what another holds. Nothing here is written in the specification: it is read from the formaldefs, and from where each citizen is at home.';
|
|
10
|
+
const HOW = 'An area depends on another when one of its formaldefs names a predicate or a function at home there, when one of its operations says a condition or exchanges a type of it, or when it reads a state the other holds, with no name in between. A state is held by the area whose predicates and functions read it.';
|
|
11
|
+
const areaLink = (name) => link(`#${idOf('area', name)}`, areaTitle(name));
|
|
12
|
+
const none = '<span class="m">none</span>';
|
|
13
|
+
/** A citizen, where a dependency names it: its name leads to it; a condition is told by its sentence. */
|
|
14
|
+
const cited = (one) => (one.kind === 'condition' ? link(`#${one.anchor}`, one.name) : `<a class="mono" href="#${esc(one.anchor)}">${esc(one.name)}</a>`);
|
|
15
|
+
const each = (all) => [...new Map(all.map((one) => [one.anchor, one])).values()].map(cited).join(', ');
|
|
16
|
+
const count = (uses) => new Set(uses.map((one) => one.from.anchor)).size;
|
|
17
|
+
/** A verb, as one citizen or several do it. */
|
|
18
|
+
const does = (uses, verb) => (count(uses) === 1 ? `${verb}s` : verb);
|
|
19
|
+
/** What a dependency goes through, a line for each way: who of the one depends, and on what of the other. */
|
|
20
|
+
function throughOf({ uses }) {
|
|
21
|
+
const of = (through) => uses.filter((one) => one.through === through);
|
|
22
|
+
const told = (through, says) => (of(through).length ? [says(of(through))] : []);
|
|
23
|
+
return [
|
|
24
|
+
...told('name', (all) => `${esc(plural(count(all), 'citizen'))} ${does(all, 'name')} ${each(all.map((one) => one.to))}`),
|
|
25
|
+
...told('condition', (all) => `${esc(plural(count(all), 'operation'))} ${does(all, 'say')} ${each(all.map((one) => one.to))}`),
|
|
26
|
+
...told('type', (all) => `<span class="m">as types:</span> ${each(all.map((one) => one.to))}`),
|
|
27
|
+
...told('state', (all) => `${esc(plural(count(all), 'citizen'))} ${does(all, 'read')} ${each(all.map((one) => one.to))} <span class="m">with no name in between</span>`),
|
|
28
|
+
].join('<br>');
|
|
29
|
+
}
|
|
30
|
+
/** What is listed under a drawing: a heading that says how many, then a row each. A row is no citizen: it lists those that are, each leading to its own. */
|
|
31
|
+
const listed = (title, note, columns, rows, widths, level = 'h3') => `<${level} class="group"><span>${esc(title)}</span><span class="m s">${esc(note)}</span></${level}>${rows.length ? table(columns, rows, widths) : '<p class="sub">None.</p>'}`;
|
|
32
|
+
const LEGEND_AREAS = '<p class="legend dep-legend"><span><i class="dep-key"></i> depends on, from the one above</span><span><i class="dep-key state"></i> by reading its state alone</span><span><i class="dep-key against"></i> against the order: a cycle</span><span><b>7</b> citizens that depend</span></p>';
|
|
33
|
+
/** How a drawing names what it shows: an area by its title, a predicate or a function with what it is given. */
|
|
34
|
+
function namingOf(wiki) {
|
|
35
|
+
const definitions = new Map(wiki.areas.flatMap((area) => [...area.predicates, ...area.functions]).map((one) => [idOf(one.kind, one.name), one]));
|
|
36
|
+
const written = (anchor) => {
|
|
37
|
+
const one = definitions.get(anchor);
|
|
38
|
+
return one ? `${one.name}${one.parameters.length ? `(${one.parameters.join(', ')})` : ''}` : anchor;
|
|
39
|
+
};
|
|
40
|
+
return { title: areaTitle, written };
|
|
41
|
+
}
|
|
42
|
+
/** The one switch of the drawing of an area: off, the areas; on, every citizen that depends. It needs no script, and with it the choice is that of every area, and is remembered. */
|
|
43
|
+
const SWITCH = '<label class="dep-switch"><input type="checkbox" role="switch" class="dep-detail-on"><span class="dep-knob" aria-hidden="true"></span>In detail</label>';
|
|
44
|
+
const LEGEND_DETAIL = '<p class="legend dep-legend"><span><i class="dep-key"></i> names it, says it, or is made of it, from the one above</span><span><i class="dep-key state"></i> reads the state, with no name in between</span><span><i class="dep-key against"></i> against the order: a cycle</span><span><b>7</b> citizens that depend on it</span></p>';
|
|
45
|
+
/** The areas, as the drawing shows each: its title, how many operations it has, and the states it holds. */
|
|
46
|
+
const areasOf = (wiki) => wiki.areas.map((area) => ({ name: area.name, title: areaTitle(area.name), operations: area.operations.length, holds: wiki.state.filter((one) => wiki.dependencies.holders.get(one.name) === area.name).map((one) => one.name) }));
|
|
47
|
+
/**
|
|
48
|
+
* What is around one area, for its own page: the drawing of the areas, of this one and of those it
|
|
49
|
+
* is joined to alone, in the order all of them are in; and, at one switch, the same in detail:
|
|
50
|
+
* every citizen that depends, joined to what it depends on.
|
|
51
|
+
*/
|
|
52
|
+
export function aroundShown(wiki, area) {
|
|
53
|
+
const around = aroundOf(wiki.dependencies, area);
|
|
54
|
+
const all = link('#dependencies', 'Dependencies');
|
|
55
|
+
if (!around.between.length)
|
|
56
|
+
return `<p class="sub">It depends on no other area, and none depends on it: ${all}.</p>`;
|
|
57
|
+
const [on, by] = [around.between.filter((one) => one.from === area).length, around.between.filter((one) => one.to === area).length];
|
|
58
|
+
const note = `depends on ${plural(on, 'area')}, ${by} ${by === 1 ? 'depends' : 'depend'} on it`;
|
|
59
|
+
return `<h2 class="group"><span>Dependencies</span><span class="m s">${esc(note)}</span></h2>
|
|
60
|
+
<p class="sub">This area, those that depend on it above it, and those it depends on under it; in detail, every citizen that depends, joined to what it depends on. The same is told for every area on ${all}.</p>
|
|
61
|
+
<div class="dep-mode">${SWITCH}
|
|
62
|
+
<div class="dep-plain"><div class="scroll dep-scroll">${areasDrawn(areasOf(wiki), around, area)}</div>${LEGEND_AREAS}</div>
|
|
63
|
+
<div class="dep-detailed"><div class="scroll dep-scroll">${detailDrawn(around, namingOf(wiki), area)}</div>${LEGEND_DETAIL}</div>
|
|
64
|
+
</div>`;
|
|
65
|
+
}
|
|
66
|
+
function betweenShown(wiki) {
|
|
67
|
+
const { dependencies } = wiki;
|
|
68
|
+
const at = (name) => dependencies.order.indexOf(name);
|
|
69
|
+
const rows = [...dependencies.between]
|
|
70
|
+
.sort((a, b) => at(a.from) - at(b.from) || at(a.to) - at(b.to))
|
|
71
|
+
.map((one) => [areaLink(one.from), `${areaLink(one.to)}${dependencies.against.has(`${one.from}>${one.to}`) ? '<br><span class="res ko">closes a cycle</span>' : ''}`, throughOf(one)]);
|
|
72
|
+
const cycles = dependencies.against.size ? `${plural(dependencies.against.size, 'dependency')} against the order` : 'no cycle';
|
|
73
|
+
return `<h2 class="group"><span>Between areas</span><span class="m s">${esc(`${plural(dependencies.between.length, 'dependency')}, ${cycles}`)}</span></h2>
|
|
74
|
+
<p class="sub">The areas, those that depend on others first. An arc goes from an area down to one it depends on; one that would go up closes a cycle, and is drawn at the left.</p>
|
|
75
|
+
<div class="scroll dep-scroll">${areasDrawn(areasOf(wiki), dependencies)}</div>${LEGEND_AREAS}
|
|
76
|
+
${listed('Each dependency', plural(rows.length, 'dependency'), ['Area', 'Depends on', 'Through'], rows, ['14%', '16%', '70%'])}`;
|
|
77
|
+
}
|
|
78
|
+
/** The names said beyond their area: each with the operations whose own formaldefs say it, and those that reach it through a condition. */
|
|
79
|
+
function namesShown(wiki) {
|
|
80
|
+
const { uses, reaches } = wiki.dependencies;
|
|
81
|
+
const { written } = namingOf(wiki);
|
|
82
|
+
const said = uses.filter((one) => one.through === 'name');
|
|
83
|
+
const names = [...new Map([...said.map((one) => one.to), ...reaches.map((one) => one.to)].map((one) => [one.anchor, one])).values()].sort((a, b) => a.area.localeCompare(b.area) || a.name.localeCompare(b.name));
|
|
84
|
+
const rows = names.map((one) => {
|
|
85
|
+
const by = said.filter((use) => use.to.anchor === one.anchor).map((use) => use.from);
|
|
86
|
+
const through = reaches.filter((reach) => reach.to.anchor === one.anchor);
|
|
87
|
+
const conditions = each(through.map((reach) => reach.by));
|
|
88
|
+
return [`<a class="mono" href="#${esc(one.anchor)}">${esc(written(one.anchor))}</a>`, areaLink(one.area), by.length ? each(by) : none, through.length ? `${esc(plural(new Set(through.map((reach) => reach.from.anchor)).size, 'operation'))}, <span class="m">saying</span> ${conditions}` : none];
|
|
89
|
+
});
|
|
90
|
+
const drawing = namesDrawn(wiki.dependencies, namingOf(wiki));
|
|
91
|
+
return `<h2 class="group"><span>By name</span><span class="m s">${esc(plural(names.length, 'name'))} said beyond its area</span></h2>
|
|
92
|
+
<p class="sub">The operations whose own formaldefs name a predicate or a function of another area, each joined to that name. What an operation reaches only through a condition it says is in the table, and not drawn: the condition names it.</p>
|
|
93
|
+
${drawing ? `<div class="scroll dep-scroll">${drawing}</div>` : ''}
|
|
94
|
+
${listed('Each name', plural(rows.length, 'name'), ['Name', 'Area', 'Named by', 'Reached through a condition by'], rows, ['22%', '10%', '38%', '30%'])}`;
|
|
95
|
+
}
|
|
96
|
+
/** Who holds each state, and what reads it from elsewhere with no name in between. */
|
|
97
|
+
function statesShown(wiki) {
|
|
98
|
+
const { holders, readers, uses } = wiki.dependencies;
|
|
99
|
+
const rows = wiki.state.map((one) => {
|
|
100
|
+
const holder = holders.get(one.name);
|
|
101
|
+
const read = readers.get(one.name) ?? [];
|
|
102
|
+
const held = holder ? areaLink(holder) : `<span class="m">no area: ${read.length ? `read by ${read.map(areaTitle).map(esc).join(' and ')}` : 'nothing reads it'}</span>`;
|
|
103
|
+
const outside = uses.filter((use) => use.through === 'state' && use.to.name === one.name).map((use) => use.from);
|
|
104
|
+
return [`<a class="mono" href="#${esc(idOf('state', one.name))}">${esc(one.name)}</a>`, held, outside.length ? each(outside) : none];
|
|
105
|
+
});
|
|
106
|
+
return listed('Who holds a state', plural(rows.length, 'state'), ['State', 'Held by', 'Read from another area, with no name in between, by'], rows, ['14%', '16%', '70%'], 'h2');
|
|
107
|
+
}
|
|
108
|
+
/** The page of what the areas depend on. */
|
|
109
|
+
export function dependenciesPage(wiki) {
|
|
110
|
+
const body = `<h1>Dependencies</h1>
|
|
111
|
+
<p class="lead">${esc(LEAD)}</p>
|
|
112
|
+
<p class="sub how">${esc(HOW)}</p>
|
|
113
|
+
${betweenShown(wiki)}
|
|
114
|
+
${namesShown(wiki)}
|
|
115
|
+
${statesShown(wiki)}`;
|
|
116
|
+
return { id: 'dependencies', kind: 'Dependencies', title: 'Dependencies', said: LEAD, body };
|
|
117
|
+
}
|