@crubal/engine 0.0.0-stage → 0.4.1
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/LICENSE +202 -0
- package/README.md +97 -2
- package/dist/bin/crubal.d.ts +2 -0
- package/dist/bin/crubal.js +103 -0
- package/dist/bin/crubal.js.map +1 -0
- package/dist/src/access.d.ts +149 -0
- package/dist/src/access.js +584 -0
- package/dist/src/access.js.map +1 -0
- package/dist/src/acts.d.ts +531 -0
- package/dist/src/acts.js +1466 -0
- package/dist/src/acts.js.map +1 -0
- package/dist/src/address.d.ts +29 -0
- package/dist/src/address.js +59 -0
- package/dist/src/address.js.map +1 -0
- package/dist/src/arrival.d.ts +55 -0
- package/dist/src/arrival.js +127 -0
- package/dist/src/arrival.js.map +1 -0
- package/dist/src/browser.d.ts +10 -0
- package/dist/src/browser.js +13 -0
- package/dist/src/browser.js.map +1 -0
- package/dist/src/bundle.d.ts +74 -0
- package/dist/src/bundle.js +1118 -0
- package/dist/src/bundle.js.map +1 -0
- package/dist/src/canonical.d.ts +6 -0
- package/dist/src/canonical.js +47 -0
- package/dist/src/canonical.js.map +1 -0
- package/dist/src/carriers.d.ts +7 -0
- package/dist/src/carriers.js +33 -0
- package/dist/src/carriers.js.map +1 -0
- package/dist/src/conditions.d.ts +28 -0
- package/dist/src/conditions.js +227 -0
- package/dist/src/conditions.js.map +1 -0
- package/dist/src/corpus.d.ts +8 -0
- package/dist/src/corpus.js +1207 -0
- package/dist/src/corpus.js.map +1 -0
- package/dist/src/defs.d.ts +176 -0
- package/dist/src/defs.js +692 -0
- package/dist/src/defs.js.map +1 -0
- package/dist/src/dictionary.d.ts +77 -0
- package/dist/src/dictionary.js +629 -0
- package/dist/src/dictionary.js.map +1 -0
- package/dist/src/exchange.d.ts +259 -0
- package/dist/src/exchange.js +1088 -0
- package/dist/src/exchange.js.map +1 -0
- package/dist/src/forms.d.ts +16 -0
- package/dist/src/forms.js +181 -0
- package/dist/src/forms.js.map +1 -0
- package/dist/src/index.d.ts +32 -0
- package/dist/src/index.js +34 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/lex.d.ts +21 -0
- package/dist/src/lex.js +142 -0
- package/dist/src/lex.js.map +1 -0
- package/dist/src/lifecycle.d.ts +92 -0
- package/dist/src/lifecycle.js +451 -0
- package/dist/src/lifecycle.js.map +1 -0
- package/dist/src/log.d.ts +91 -0
- package/dist/src/log.js +629 -0
- package/dist/src/log.js.map +1 -0
- package/dist/src/migrate.d.ts +129 -0
- package/dist/src/migrate.js +415 -0
- package/dist/src/migrate.js.map +1 -0
- package/dist/src/model.d.ts +81 -0
- package/dist/src/model.js +188 -0
- package/dist/src/model.js.map +1 -0
- package/dist/src/packages.d.ts +386 -0
- package/dist/src/packages.js +1171 -0
- package/dist/src/packages.js.map +1 -0
- package/dist/src/print-text.d.ts +7 -0
- package/dist/src/print-text.js +223 -0
- package/dist/src/print-text.js.map +1 -0
- package/dist/src/publish.d.ts +27 -0
- package/dist/src/publish.js +279 -0
- package/dist/src/publish.js.map +1 -0
- package/dist/src/read-text.d.ts +10 -0
- package/dist/src/read-text.js +400 -0
- package/dist/src/read-text.js.map +1 -0
- package/dist/src/records.d.ts +32 -0
- package/dist/src/records.js +104 -0
- package/dist/src/records.js.map +1 -0
- package/dist/src/review.d.ts +22 -0
- package/dist/src/review.js +198 -0
- package/dist/src/review.js.map +1 -0
- package/dist/src/rules.d.ts +101 -0
- package/dist/src/rules.js +670 -0
- package/dist/src/rules.js.map +1 -0
- package/dist/src/schedule.d.ts +24 -0
- package/dist/src/schedule.js +126 -0
- package/dist/src/schedule.js.map +1 -0
- package/dist/src/std-packages.d.ts +9 -0
- package/dist/src/std-packages.js +268 -0
- package/dist/src/std-packages.js.map +1 -0
- package/dist/src/store.d.ts +191 -0
- package/dist/src/store.js +671 -0
- package/dist/src/store.js.map +1 -0
- package/dist/src/surface.d.ts +47 -0
- package/dist/src/surface.js +92 -0
- package/dist/src/surface.js.map +1 -0
- package/dist/src/tree.d.ts +35 -0
- package/dist/src/tree.js +159 -0
- package/dist/src/tree.js.map +1 -0
- package/dist/src/units-table.d.ts +1 -0
- package/dist/src/units-table.js +200 -0
- package/dist/src/units-table.js.map +1 -0
- package/dist/src/units.d.ts +42 -0
- package/dist/src/units.js +98 -0
- package/dist/src/units.js.map +1 -0
- package/dist/src/versions.d.ts +10 -0
- package/dist/src/versions.js +27 -0
- package/dist/src/versions.js.map +1 -0
- package/dist/src/views.d.ts +372 -0
- package/dist/src/views.js +1170 -0
- package/dist/src/views.js.map +1 -0
- package/package.json +60 -4
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
import type { JsonObject } from "./model.ts";
|
|
2
|
+
import { type Dictionary } from "./defs.ts";
|
|
3
|
+
import { type Permissions } from "./access.ts";
|
|
4
|
+
import { type Act, type ActWhen } from "./acts.ts";
|
|
5
|
+
export type PackageInfo = {
|
|
6
|
+
name: string;
|
|
7
|
+
version: string;
|
|
8
|
+
owner: string;
|
|
9
|
+
line: number;
|
|
10
|
+
/** The language version it is written in (11.8), and the line that says so. */
|
|
11
|
+
crubal: number;
|
|
12
|
+
crubalLine: number;
|
|
13
|
+
extends: {
|
|
14
|
+
name: string;
|
|
15
|
+
version: string;
|
|
16
|
+
line: number;
|
|
17
|
+
}[];
|
|
18
|
+
prefixes: Map<string, {
|
|
19
|
+
target: string;
|
|
20
|
+
line: number;
|
|
21
|
+
}>;
|
|
22
|
+
trust: {
|
|
23
|
+
entry: string;
|
|
24
|
+
line: number;
|
|
25
|
+
}[];
|
|
26
|
+
dict: Dictionary;
|
|
27
|
+
contracts: string[];
|
|
28
|
+
/** The rest of the header (11.1), as written. */
|
|
29
|
+
header: {
|
|
30
|
+
[key: string]: string;
|
|
31
|
+
};
|
|
32
|
+
terms: {
|
|
33
|
+
[audience: string]: string;
|
|
34
|
+
};
|
|
35
|
+
/** The utilities the package declares (11.1, `utility:` blocks). */
|
|
36
|
+
utilities: Utility[];
|
|
37
|
+
/** Revision 57: the groups the package declares (11.1, `group:` blocks), each once: its word on a screen, its owner and its place in the order. */
|
|
38
|
+
groups: Group[];
|
|
39
|
+
/** The lanes the package declares (12.10, `lane:` blocks). */
|
|
40
|
+
lanes: Lane[];
|
|
41
|
+
/** The flows the package declares (12.11, `flow:` blocks). */
|
|
42
|
+
flows: Flow[];
|
|
43
|
+
/** The acts the package declares in words (15, revision 25), beside the utilities' lists of names. */
|
|
44
|
+
acts: Act[];
|
|
45
|
+
/** Revision 58: the blocks the package brings under a prefix (11.9), carried as written and understood by whoever owns the prefix. */
|
|
46
|
+
blocks: PrefixedBlock[];
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Revision 58 (11.9, 13.5): a block under a prefix, `<prefix>:<word>: <name> /<version>`. The engine reads its
|
|
50
|
+
* first line and nothing inside it: `lines` is the inside as written, comments removed, indentation kept
|
|
51
|
+
* relative to the first line. It is a member that holds no value (`block:<prefix>:<word>/<name>`).
|
|
52
|
+
*/
|
|
53
|
+
export type PrefixedBlock = {
|
|
54
|
+
sort: string;
|
|
55
|
+
name: string;
|
|
56
|
+
version: string;
|
|
57
|
+
lines: string[];
|
|
58
|
+
line: number;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* A utility block (11.1): a named, versioned tool a platform mounts for the presets, relations or audiences
|
|
62
|
+
* it `serves`, the packages and utilities it `needs`, and the connections and settings a deployment must
|
|
63
|
+
* provide in `setup`. Read like any block; a reader that doesn't know it carries it unchanged (13.5).
|
|
64
|
+
*/
|
|
65
|
+
export type Utility = {
|
|
66
|
+
name: string;
|
|
67
|
+
version: string;
|
|
68
|
+
/** Revision 32: the group the utility stands in where a room segments its rows (Org, Platform, Services, Clients). */
|
|
69
|
+
group?: string;
|
|
70
|
+
/** Revision 57: whom what the utility stands for belongs to (the place, the platform, a person, an outside service), a surface's own lower-case word; the engine carries it and judges nothing of it. */
|
|
71
|
+
owner?: string;
|
|
72
|
+
label?: string;
|
|
73
|
+
describe?: string;
|
|
74
|
+
/** `curator(ship, returns)` → `{ as: "curator", items: ["ship", "returns"] }`; `controller` → no items. */
|
|
75
|
+
serves: {
|
|
76
|
+
as: string;
|
|
77
|
+
items?: string[];
|
|
78
|
+
line: number;
|
|
79
|
+
}[];
|
|
80
|
+
/** Package identities (`domain/name`, optionally ` /version`) and bare utility names. */
|
|
81
|
+
needs: {
|
|
82
|
+
name: string;
|
|
83
|
+
version?: string;
|
|
84
|
+
line: number;
|
|
85
|
+
}[];
|
|
86
|
+
setup: ({
|
|
87
|
+
connection: string;
|
|
88
|
+
line: number;
|
|
89
|
+
} | {
|
|
90
|
+
setting: string;
|
|
91
|
+
line: number;
|
|
92
|
+
})[];
|
|
93
|
+
/** The acts the utility provides by name (11.1, `acts:`), which a lane's presses may name (12.10). */
|
|
94
|
+
acts: {
|
|
95
|
+
name: string;
|
|
96
|
+
line: number;
|
|
97
|
+
}[];
|
|
98
|
+
/** The utility's look wherever it shows (11.1, `mark:`, revision 13): a glyph the mounting app's kit
|
|
99
|
+
* draws and a hue from the eight words. */
|
|
100
|
+
mark?: {
|
|
101
|
+
glyph: string;
|
|
102
|
+
hue: Hue;
|
|
103
|
+
line: number;
|
|
104
|
+
};
|
|
105
|
+
line: number;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* A group (11.1, revision 57): where utilities stand together, declared once. A utility names it by its word
|
|
109
|
+
* (`group:`); the block says the word people see, its owner and its place in the order. Carried, not judged.
|
|
110
|
+
*/
|
|
111
|
+
export type Group = {
|
|
112
|
+
name: string;
|
|
113
|
+
label?: string;
|
|
114
|
+
owner?: string;
|
|
115
|
+
order?: number;
|
|
116
|
+
line: number;
|
|
117
|
+
};
|
|
118
|
+
/** The eight hue words a mark may name (11.1, revision 13); an app maps each to its own colors. */
|
|
119
|
+
export declare const HUES: readonly ["amber", "blue", "violet", "slate", "teal", "plum", "coral", "olive"];
|
|
120
|
+
export type Hue = (typeof HUES)[number];
|
|
121
|
+
export declare const isHue: (v: unknown) => v is Hue;
|
|
122
|
+
/** A press on a lane's home or card (12.10): a word, and where it lands: a path, `page`, or an act; revision 33:
|
|
123
|
+
* the glyph it wears where an app draws presses as glyphs (`Word as glyph -> target`), a lower-case name. */
|
|
124
|
+
export type LanePress = {
|
|
125
|
+
word: string;
|
|
126
|
+
to: string;
|
|
127
|
+
glyph?: string;
|
|
128
|
+
line: number;
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* A lane (12.10): a row of the grid a package declares. What it lists (a view and the picks for what
|
|
132
|
+
* is ahead and what is done), whom it serves, how it sorts (band, house), what its home card shows and
|
|
133
|
+
* how its object cards map to the compass, with the presses that act on them. A utility's own lane
|
|
134
|
+
* (`serve:`) names the function the utility provides instead of a view.
|
|
135
|
+
*/
|
|
136
|
+
export type Lane = {
|
|
137
|
+
name: string;
|
|
138
|
+
version: string;
|
|
139
|
+
/** Revision 32: one of the view's filters whose buckets group the row's cards, each a heading card with its cards tucked. */
|
|
140
|
+
group?: string;
|
|
141
|
+
label?: string;
|
|
142
|
+
/** Revision 55: the lane in one line, what it is; a surface shows it on the lane's own card. */
|
|
143
|
+
describe?: string;
|
|
144
|
+
/** Revision 56: the sort of row the lane is, a surface's own lower-case word (a list, a set of steps); the engine carries it and judges nothing of it. */
|
|
145
|
+
sort?: string;
|
|
146
|
+
/** Revision 57: whom the lane's cards belong to where that differs from its utility, a surface's own lower-case word; carried and not judged. */
|
|
147
|
+
owner?: string;
|
|
148
|
+
/** Revision 55: the lane at length: why a thing is here and how it leaves; a surface shows it where the lane is opened. */
|
|
149
|
+
about?: string;
|
|
150
|
+
utility?: string;
|
|
151
|
+
view?: string;
|
|
152
|
+
serve?: string;
|
|
153
|
+
pick?: {
|
|
154
|
+
filter: string;
|
|
155
|
+
value: string;
|
|
156
|
+
line: number;
|
|
157
|
+
};
|
|
158
|
+
done?: {
|
|
159
|
+
filter: string;
|
|
160
|
+
value: string;
|
|
161
|
+
line: number;
|
|
162
|
+
} | "viewed";
|
|
163
|
+
/**
|
|
164
|
+
* Revision 34: one of the view's marked filters, in place of pick and done. What is ahead is its `open`
|
|
165
|
+
* bucket and the history its `done` bucket; `pick` and `done` hold those two, so a reader of either sees them.
|
|
166
|
+
*/
|
|
167
|
+
step?: string;
|
|
168
|
+
/** Revision 34: marked filters of the view; a record marked on any waits here no longer. */
|
|
169
|
+
until?: string[];
|
|
170
|
+
/** Revision 38: marked filters of the view; a record waits here only once marked on each. */
|
|
171
|
+
after?: string[];
|
|
172
|
+
band: "daily" | "weekly" | "rarely";
|
|
173
|
+
house: number;
|
|
174
|
+
serves: {
|
|
175
|
+
as: string;
|
|
176
|
+
items?: string[];
|
|
177
|
+
line: number;
|
|
178
|
+
}[];
|
|
179
|
+
home: {
|
|
180
|
+
figure?: {
|
|
181
|
+
of: "count";
|
|
182
|
+
} | {
|
|
183
|
+
of: "sum" | "state";
|
|
184
|
+
slot: string;
|
|
185
|
+
};
|
|
186
|
+
word?: {
|
|
187
|
+
one: string;
|
|
188
|
+
many: string;
|
|
189
|
+
} | {
|
|
190
|
+
word: string;
|
|
191
|
+
};
|
|
192
|
+
press?: LanePress;
|
|
193
|
+
chips: string[];
|
|
194
|
+
line: number;
|
|
195
|
+
};
|
|
196
|
+
card?: {
|
|
197
|
+
name: string[];
|
|
198
|
+
sub: string[];
|
|
199
|
+
lines: string[];
|
|
200
|
+
state?: string;
|
|
201
|
+
moment?: string;
|
|
202
|
+
figure?: string;
|
|
203
|
+
primary?: LanePress;
|
|
204
|
+
quiet?: LanePress;
|
|
205
|
+
quick: LanePress[];
|
|
206
|
+
opens: "page";
|
|
207
|
+
/** Revision 56: the face the lane's cards wear, a surface's own lower-case word; over the kind's face for this lane. */
|
|
208
|
+
face?: string;
|
|
209
|
+
line: number;
|
|
210
|
+
};
|
|
211
|
+
line: number;
|
|
212
|
+
};
|
|
213
|
+
/**
|
|
214
|
+
* A stop of a flow (12.11): a lane of the package with the act that moves a card on, or a form (a block)
|
|
215
|
+
* with where its record comes from. Which it is, the check decides by the name: a lane's name is a lane
|
|
216
|
+
* stop, a form contract's name a block; `act` says lane, `of` says block.
|
|
217
|
+
*/
|
|
218
|
+
/** One press a case offers (12.11, revision 41): its word, and the acts it runs in order, each on the record in
|
|
219
|
+
* hand or (a flag's `on found`) on the records its `when` found; none runs nothing. */
|
|
220
|
+
export type CasePress = {
|
|
221
|
+
word: string;
|
|
222
|
+
runs: {
|
|
223
|
+
act: string;
|
|
224
|
+
utility?: string;
|
|
225
|
+
onFound?: true;
|
|
226
|
+
}[];
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* A case at a link (12.11, revision 41): a record touched there that is not simply stamped. A `stranger` is of
|
|
230
|
+
* the lane's level and not on the lane as the flow's context narrows it; a `flag` is on a named lane's list by a
|
|
231
|
+
* link to it. Each is a question with presses and one of three answers: ask, or yes or no without asking.
|
|
232
|
+
*/
|
|
233
|
+
export type StopCase = {
|
|
234
|
+
kind: "stranger" | "flag";
|
|
235
|
+
name?: string;
|
|
236
|
+
answer: "ask" | "yes" | "no";
|
|
237
|
+
when?: {
|
|
238
|
+
lane: string;
|
|
239
|
+
facet: string;
|
|
240
|
+
};
|
|
241
|
+
yes: CasePress;
|
|
242
|
+
no: CasePress;
|
|
243
|
+
or: CasePress[];
|
|
244
|
+
line: number;
|
|
245
|
+
};
|
|
246
|
+
/** Revision 51: an ask's words with each `{record.<facet>}` said as the record touched holds it: a number or a
|
|
247
|
+
* word as written, money and a quantity by their amount, nothing where it is not set. Pure. */
|
|
248
|
+
export declare function askWords(words: string, record: {
|
|
249
|
+
values: JsonObject;
|
|
250
|
+
}): string;
|
|
251
|
+
/** The press a case runs without asking, by its answer or the one given; undefined asks. Pure. */
|
|
252
|
+
export declare function casePress(c: Pick<StopCase, "answer" | "yes" | "no">, answer?: StopCase["answer"]): CasePress | undefined;
|
|
253
|
+
/** Revision 48: an act whose question a touch at the link asks. `asks`: where its `when` holds on the record
|
|
254
|
+
* touched, the record is not stamped; the act's givens are asked (with these words, opened on `open` when said)
|
|
255
|
+
* and the act run with the answer. */
|
|
256
|
+
export type StopAsk = {
|
|
257
|
+
name: string;
|
|
258
|
+
act: string;
|
|
259
|
+
utility?: string;
|
|
260
|
+
when: ActWhen;
|
|
261
|
+
open?: string;
|
|
262
|
+
words?: string;
|
|
263
|
+
line: number;
|
|
264
|
+
};
|
|
265
|
+
export type FlowStop = {
|
|
266
|
+
name: string;
|
|
267
|
+
act?: string;
|
|
268
|
+
of?: string; /** Revision 48: the questions the link asks in place of its stamp. */
|
|
269
|
+
asks?: StopAsk[]; /** Revision 48: acts whose question stays at hand once the link's own act has landed. */
|
|
270
|
+
offers?: {
|
|
271
|
+
act: string;
|
|
272
|
+
utility?: string;
|
|
273
|
+
}[]; /** Revision 41: a record that already carries the stamp is passed over, nothing written. */
|
|
274
|
+
already?: "ignore"; /** Revision 41: the cases the link knows beside "stamp it". */
|
|
275
|
+
cases?: StopCase[]; /** Revision 36: values a block's form opens with, set and locked. */
|
|
276
|
+
with?: {
|
|
277
|
+
facet: string;
|
|
278
|
+
value: string;
|
|
279
|
+
}[];
|
|
280
|
+
line: number;
|
|
281
|
+
};
|
|
282
|
+
/**
|
|
283
|
+
* A flow (12.11): an objective's line of stops, declared by the package whose lanes and forms it walks,
|
|
284
|
+
* served like a lane, walked by a record. The app draws it at the room's head; the engine reads, checks
|
|
285
|
+
* and carries it.
|
|
286
|
+
*/
|
|
287
|
+
export type Flow = {
|
|
288
|
+
name: string;
|
|
289
|
+
version: string;
|
|
290
|
+
label?: string;
|
|
291
|
+
utility?: string;
|
|
292
|
+
follow: "queue" | "card";
|
|
293
|
+
serves: {
|
|
294
|
+
as: string;
|
|
295
|
+
items?: string[];
|
|
296
|
+
line: number;
|
|
297
|
+
}[];
|
|
298
|
+
/** What the flow holds through its run (revision 23): kinds asked once when it is walked (a station). */
|
|
299
|
+
context: string[];
|
|
300
|
+
/** The flow this one stands in for (revision 23): served where the named flow would have been. */
|
|
301
|
+
replaces?: string;
|
|
302
|
+
/** Revision 42: the flow is a closed set: the stop that starts it, the stop whose list is the rest, the stop
|
|
303
|
+
* that finishes it, and the act that cancels it or none. */
|
|
304
|
+
closed?: {
|
|
305
|
+
start: string;
|
|
306
|
+
rest: string;
|
|
307
|
+
finish: string;
|
|
308
|
+
cancel?: string;
|
|
309
|
+
line: number;
|
|
310
|
+
};
|
|
311
|
+
stops: FlowStop[];
|
|
312
|
+
/** `filter = value`, or (revision 34) a marked filter alone: a record marked on it has left the line. */
|
|
313
|
+
done?: {
|
|
314
|
+
filter: string;
|
|
315
|
+
value: string;
|
|
316
|
+
line: number;
|
|
317
|
+
mark?: true;
|
|
318
|
+
};
|
|
319
|
+
line: number;
|
|
320
|
+
};
|
|
321
|
+
/**
|
|
322
|
+
* A stamp a flow's stop leaves (12.11, revision 22): the facet and value a record takes when the stop's act
|
|
323
|
+
* lands (a lane stop: its done) or when its form is kept (a block stop: the next lane stop's pick).
|
|
324
|
+
*/
|
|
325
|
+
export type FlowStamp = {
|
|
326
|
+
stop: string;
|
|
327
|
+
at: number;
|
|
328
|
+
facet: string;
|
|
329
|
+
value: string;
|
|
330
|
+
mark?: true;
|
|
331
|
+
};
|
|
332
|
+
/**
|
|
333
|
+
* The stamps of a flow's stops, derived from its lanes: never declared, never published. `facetOf` resolves
|
|
334
|
+
* a filter's name to its facet's key (the views' filters); a stop whose pick names no filter stamps nothing.
|
|
335
|
+
* A lane stop whose done is `viewed` or absent (an end stop) stamps nothing; a block stop after the last
|
|
336
|
+
* lane stamps nothing. A step stop (revision 34) stamps its mark (`mark: true`; the value is the writer's: now on
|
|
337
|
+
* a date, yes on a yes-no, nothing on a link, which the act sets), and a block before one stamps nothing. Pure.
|
|
338
|
+
*/
|
|
339
|
+
export declare function flowStamps(f: Flow, lanes: Pick<Lane, "name" | "pick" | "done" | "step">[], facetOf: (filter: string) => string | undefined): FlowStamp[];
|
|
340
|
+
/** How two lane stops that follow one another join (12.11, revision 40): whether a record passes from the first
|
|
341
|
+
* to the second. */
|
|
342
|
+
export type FlowJoin = {
|
|
343
|
+
from: string;
|
|
344
|
+
to: string;
|
|
345
|
+
at: number;
|
|
346
|
+
passes: boolean;
|
|
347
|
+
};
|
|
348
|
+
/**
|
|
349
|
+
* The joins of a flow's lane stops, in order, derived from its lanes: never declared, never published. A record
|
|
350
|
+
* passes from one stop to the next where the first's `done` is a state and is the second's `pick`, filter and
|
|
351
|
+
* value, or where the second is a step lane that waits `after` the first's step. A block between two lanes
|
|
352
|
+
* leaves their join as it is. Where nothing passes, the two stand together by what the flow holds (its
|
|
353
|
+
* context) or by their order alone, which is the app's to say. Pure.
|
|
354
|
+
*/
|
|
355
|
+
export declare function flowJoins(f: Pick<Flow, "stops">, lanes: Pick<Lane, "name" | "pick" | "done" | "step" | "after">[]): FlowJoin[];
|
|
356
|
+
/** Split a file into its packages, keeping line numbers true. */
|
|
357
|
+
export declare function readPackages(source: string): PackageInfo[];
|
|
358
|
+
/** Check every package in a file (11.1, 11.3, 11.4). Throws the first problem. */
|
|
359
|
+
export declare function checkPackages(source: string): PackageInfo[];
|
|
360
|
+
/**
|
|
361
|
+
* The flow checks over the packages in force together (11.4, revision 23): everything a file-local check
|
|
362
|
+
* deferred because the package extends others, refused as the publish would have; run where the
|
|
363
|
+
* permissions are checked in force (at install, and on a trial definition).
|
|
364
|
+
*/
|
|
365
|
+
export declare function checkFlowsInForce(p: {
|
|
366
|
+
info: Pick<PackageInfo, "flows" | "lanes" | "utilities">;
|
|
367
|
+
dict: Dictionary;
|
|
368
|
+
contracts: {
|
|
369
|
+
kind: string;
|
|
370
|
+
name: string;
|
|
371
|
+
}[];
|
|
372
|
+
views: {
|
|
373
|
+
filters: Map<string, {
|
|
374
|
+
facet: string;
|
|
375
|
+
}>;
|
|
376
|
+
};
|
|
377
|
+
perms: Permissions;
|
|
378
|
+
}): void;
|
|
379
|
+
/** The act checks over the packages in force together (11.4): what a file-local check deferred. */
|
|
380
|
+
export declare function checkActsInForce(p: {
|
|
381
|
+
info: Pick<PackageInfo, "acts" | "utilities">;
|
|
382
|
+
dict: Dictionary;
|
|
383
|
+
}): void;
|
|
384
|
+
/** Every aspect the kinds declare under `follow:` (11.2, revision 31), which an act's `tells:` may name. */
|
|
385
|
+
/** Level → the facet that is its quantity, over every kind's `shares:` (11.2, revision 35). */
|
|
386
|
+
export declare const sharesOf: (dict: Dictionary) => Map<string, string>;
|