@superbee/core 0.2.0-pre.56 → 0.2.0-pre.57
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/dist/backend.d.ts.map +1 -1
- package/dist/backend.js +4 -3
- package/dist/backend.js.map +1 -1
- package/dist/dependencies.d.ts +10 -0
- package/dist/dependencies.d.ts.map +1 -1
- package/dist/dependencies.js +27 -0
- package/dist/dependencies.js.map +1 -1
- package/dist/document-mutation.d.ts +4 -0
- package/dist/document-mutation.d.ts.map +1 -1
- package/dist/document-mutation.js +3 -0
- package/dist/document-mutation.js.map +1 -1
- package/dist/edge-harness/corpus.d.ts +9 -0
- package/dist/edge-harness/corpus.d.ts.map +1 -0
- package/dist/edge-harness/corpus.js +57 -0
- package/dist/edge-harness/corpus.js.map +1 -0
- package/dist/edge-harness/index.d.ts +21 -0
- package/dist/edge-harness/index.d.ts.map +1 -0
- package/dist/edge-harness/index.js +382 -0
- package/dist/edge-harness/index.js.map +1 -0
- package/dist/edges/find.d.ts +12 -0
- package/dist/edges/find.d.ts.map +1 -0
- package/dist/edges/find.js +42 -0
- package/dist/edges/find.js.map +1 -0
- package/dist/edges/index.d.ts +10 -0
- package/dist/edges/index.d.ts.map +1 -0
- package/dist/edges/index.js +3 -0
- package/dist/edges/index.js.map +1 -0
- package/dist/edges/memory-source.d.ts +8 -0
- package/dist/edges/memory-source.d.ts.map +1 -0
- package/dist/edges/memory-source.js +89 -0
- package/dist/edges/memory-source.js.map +1 -0
- package/dist/edges/source.d.ts +64 -0
- package/dist/edges/source.d.ts.map +1 -0
- package/dist/edges/source.js +2 -0
- package/dist/edges/source.js.map +1 -0
- package/dist/engine.d.ts +4 -0
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +13 -45
- package/dist/engine.js.map +1 -1
- package/dist/hosted-transport/answer-rows.d.ts +5 -2
- package/dist/hosted-transport/answer-rows.d.ts.map +1 -1
- package/dist/hosted-transport/answer-rows.js +4 -2
- package/dist/hosted-transport/answer-rows.js.map +1 -1
- package/dist/hosted-transport/whole-document-transport.d.ts.map +1 -1
- package/dist/hosted-transport/whole-document-transport.js +15 -4
- package/dist/hosted-transport/whole-document-transport.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/kind-field-mutation.d.ts +1 -1
- package/dist/kind-field-mutation.d.ts.map +1 -1
- package/dist/kind-undeclared-fields.d.ts +2 -0
- package/dist/kind-undeclared-fields.d.ts.map +1 -1
- package/dist/kind-undeclared-fields.js +3 -0
- package/dist/kind-undeclared-fields.js.map +1 -1
- package/dist/local-search-index.d.ts +25 -1
- package/dist/local-search-index.d.ts.map +1 -1
- package/dist/local-search-index.js +340 -41
- package/dist/local-search-index.js.map +1 -1
- package/dist/recipe-lifecycle/index.d.ts +1 -0
- package/dist/recipe-lifecycle/index.d.ts.map +1 -1
- package/dist/recipe-lifecycle/index.js +1 -0
- package/dist/recipe-lifecycle/index.js.map +1 -1
- package/dist/relationships.d.ts +9 -2
- package/dist/relationships.d.ts.map +1 -1
- package/dist/relationships.js +33 -24
- package/dist/relationships.js.map +1 -1
- package/dist/search-index.d.ts +3 -1
- package/dist/search-index.d.ts.map +1 -1
- package/dist/search-index.js +3 -1
- package/dist/search-index.js.map +1 -1
- package/dist/source-profiles/index.d.ts +1 -1
- package/dist/source-profiles/index.js +1 -1
- package/dist/storage.d.ts +2 -2
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +2 -2
- package/dist/storage.js.map +1 -1
- package/package.json +9 -1
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@superbee/core/edge-harness`: the rows every edge source passes, for any source to run against
|
|
3
|
+
* itself. Core's in-memory source and its folder and memory-store sources run these same rows; a
|
|
4
|
+
* disk index or a hosted table runs them to prove it answers what they answer.
|
|
5
|
+
*
|
|
6
|
+
* {@link registerEdgeSourceContract} builds the source under test over one folder (see
|
|
7
|
+
* {@link edgeCorpus}) in each OKF edition and checks every row it seeks, the nodes it names, and the
|
|
8
|
+
* relationship page Core reads through it.
|
|
9
|
+
*
|
|
10
|
+
* Node-only: rows register through `node:test` by default and assert with `node:assert`.
|
|
11
|
+
*/
|
|
12
|
+
import assert from "node:assert/strict";
|
|
13
|
+
import nodeTest from "node:test";
|
|
14
|
+
import { relationshipPage } from "../relationships.js";
|
|
15
|
+
import { edgeCorpus } from "./corpus.js";
|
|
16
|
+
export { edgeCorpus } from "./corpus.js";
|
|
17
|
+
const LEGACY_ROWS = [
|
|
18
|
+
["metrics/m", "tasks/a", "z", "/tasks/a.md"],
|
|
19
|
+
["myXnotes/b", "notes/long", "n", "../notes/long.md"],
|
|
20
|
+
["my_notes/a", "notes/long", "n", "../notes/long.md"],
|
|
21
|
+
["notes/long", "tasks/b", "contains", "../tasks/b.md"],
|
|
22
|
+
["notes/long", "tasks/b", "Contains", "../tasks/b.md"],
|
|
23
|
+
["notes/long", "tasks/b", "contains ", "../tasks/b.md"],
|
|
24
|
+
["notes/long", "tasks/a", "\u{E9}", "../tasks/a.md"],
|
|
25
|
+
["notes/long", "tasks/a", "e\u{301}", "../tasks/a.md"],
|
|
26
|
+
["notes/long", "my_notes/a", "k", "../my_notes/a.md"],
|
|
27
|
+
["notes/long", "myXnotes/b", "j", "../myXnotes/b.md"],
|
|
28
|
+
["notes/long", "MY_NOTES/a", "i", "../MY_NOTES/a.md"],
|
|
29
|
+
["notes/long", "tasks/a", "h", "../tasks/a.md"],
|
|
30
|
+
["notes/long", "tasks/b", "g", "../tasks/b.md"],
|
|
31
|
+
["notes/long", "tasks/a", "f", "../tasks/a.md"],
|
|
32
|
+
["notes/long", "tasks/b", "contains", "../tasks/b.md"],
|
|
33
|
+
["notes/long", "tasks/a", "b", "../tasks/a.md"],
|
|
34
|
+
["people/\u{FF5E}", "tasks/a", "t", "../tasks/a.md"],
|
|
35
|
+
["people/\u{FF5E}", "tasks/a", "t", "../tasks/a.md"],
|
|
36
|
+
["people/\u{1D49C}", "tasks/a", "t", "../tasks/a.md"],
|
|
37
|
+
["people/\u{1D49C}", "people/\u{FF5E}", "contains", "\u{FF5E}.md"],
|
|
38
|
+
["roadmap-items/x", "tasks/a", "contains", "/tasks/a.md"],
|
|
39
|
+
["roadmap-items/x", "tasks/b", "supersedes", "/tasks/b.md"],
|
|
40
|
+
["tasks/a", "tasks/b", "b", "b.md"],
|
|
41
|
+
["tasks/a", "ghost", "dangling", "../ghost.md"],
|
|
42
|
+
["tasks/a", "tasks/a", "self", "a.md"],
|
|
43
|
+
["tasks/a", "tasks/b", "b", "b.md"],
|
|
44
|
+
["tasks/a", "tasks/b", "other b", "/tasks/b.md"],
|
|
45
|
+
["tasks/a", "tasks/okf:b", "bad", "okf:b.md"],
|
|
46
|
+
["tasks/a", "tasks/b", "code", "b.md"],
|
|
47
|
+
["tasks/a", "people/\u{FF5E}", "\u{DC}n\u{EF}c\u{F6}d\u{E9}", "../people/\u{FF5E}.md"],
|
|
48
|
+
["tasks/b", "tasks/a", "also a", "a.md"],
|
|
49
|
+
["tasks/b", "people/\u{1D49C}", "\u{DC}n\u{EF}c\u{F6}d\u{E9}", "../people/\u{1D49C}.md"],
|
|
50
|
+
];
|
|
51
|
+
/** Every row each edition answers, in the order a source answers them: by source in code point
|
|
52
|
+
* order, then as written (reference links and path fields after inline links in OKF 0.3). */
|
|
53
|
+
const ROWS = {
|
|
54
|
+
"0.1": LEGACY_ROWS,
|
|
55
|
+
"0.2": LEGACY_ROWS,
|
|
56
|
+
"0.3": [
|
|
57
|
+
["metrics/m", "tasks/b", "ref", "/tasks/b.md"],
|
|
58
|
+
["metrics/m", "tasks/a", "z", "/tasks/a.md"],
|
|
59
|
+
["metrics/m", "tasks/a", "resource", "../tasks/a.md"],
|
|
60
|
+
["metrics/m", "tasks/b", "sources.resource", "/tasks/b.md"],
|
|
61
|
+
["myXnotes/b", "notes/long", "n", "../notes/long.md"],
|
|
62
|
+
["my_notes/a", "notes/long", "n", "../notes/long.md"],
|
|
63
|
+
["notes/long", "tasks/b", "contains", "../tasks/b.md"],
|
|
64
|
+
["notes/long", "tasks/b", "Contains", "../tasks/b.md"],
|
|
65
|
+
["notes/long", "tasks/b", "contains ", "../tasks/b.md"],
|
|
66
|
+
["notes/long", "tasks/a", "\u{E9}", "../tasks/a.md"],
|
|
67
|
+
["notes/long", "tasks/a", "e\u{301}", "../tasks/a.md"],
|
|
68
|
+
["notes/long", "my_notes/a", "k", "../my_notes/a.md"],
|
|
69
|
+
["notes/long", "myXnotes/b", "j", "../myXnotes/b.md"],
|
|
70
|
+
["notes/long", "tasks/a", "h", "../tasks/a.md"],
|
|
71
|
+
["notes/long", "tasks/b", "g", "../tasks/b.md"],
|
|
72
|
+
["notes/long", "tasks/a", "f", "../tasks/a.md"],
|
|
73
|
+
["notes/long", "tasks/b", "contains", "../tasks/b.md"],
|
|
74
|
+
["notes/long", "tasks/a", "b", "../tasks/a.md"],
|
|
75
|
+
["people/\u{FF5E}", "tasks/a", "t", "../tasks/a.md"],
|
|
76
|
+
["people/\u{FF5E}", "tasks/a", "t", "../tasks/a.md"],
|
|
77
|
+
["roadmap-items/x", "tasks/a", "contains", "/tasks/a.md"],
|
|
78
|
+
["roadmap-items/x", "tasks/b", "supersedes", "/tasks/b.md"],
|
|
79
|
+
["roadmap-items/x", "tasks/b", "resource", "/tasks/b.md"],
|
|
80
|
+
["tasks/a", "tasks/b", "b", "b.md"],
|
|
81
|
+
["tasks/a", "tasks/a", "self", "a.md"],
|
|
82
|
+
["tasks/a", "tasks/b", "b", "b.md"],
|
|
83
|
+
["tasks/a", "tasks/b", "other b", "/tasks/b.md"],
|
|
84
|
+
["tasks/b", "tasks/a", "also a", "a.md"],
|
|
85
|
+
["tasks/b", "tasks/a", "a", "./a.md"],
|
|
86
|
+
],
|
|
87
|
+
};
|
|
88
|
+
const LEGACY_HEADS = {
|
|
89
|
+
"tasks/a": ["A", "Task"],
|
|
90
|
+
"tasks/b": ["B", "Task"],
|
|
91
|
+
"people/\u{FF5E}": [null, "Person"],
|
|
92
|
+
"people/\u{1D49C}": ["Script A", null],
|
|
93
|
+
"roadmap-items/x": ["X", "Roadmap Item"],
|
|
94
|
+
"metrics/m": ["M", "Metric"],
|
|
95
|
+
"notes/long": ["Long", "Note"],
|
|
96
|
+
"my_notes/a": ["Under score", "Note"],
|
|
97
|
+
"myXnotes/b": ["Not under score", "Note"],
|
|
98
|
+
};
|
|
99
|
+
/** The nodes with their trimmed titles and types; in OKF 0.3 the untyped document is none. */
|
|
100
|
+
const HEADS = {
|
|
101
|
+
"0.1": LEGACY_HEADS,
|
|
102
|
+
"0.2": LEGACY_HEADS,
|
|
103
|
+
"0.3": {
|
|
104
|
+
"tasks/a": ["A", "Task"],
|
|
105
|
+
"tasks/b": ["B", "Task"],
|
|
106
|
+
"people/\u{FF5E}": [null, "Person"],
|
|
107
|
+
"roadmap-items/x": ["X", "Roadmap Item"],
|
|
108
|
+
"metrics/m": ["M", "Metric"],
|
|
109
|
+
"notes/long": ["Long", "Note"],
|
|
110
|
+
"my_notes/a": ["Under score", "Note"],
|
|
111
|
+
"myXnotes/b": ["Not under score", "Note"],
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
const facet = (...values) => ({
|
|
115
|
+
ids: values.filter((value) => !value.endsWith("/")),
|
|
116
|
+
prefixes: values.filter((value) => value.endsWith("/")),
|
|
117
|
+
});
|
|
118
|
+
/** Selections with what they mean, checked against every row of the edition. */
|
|
119
|
+
const SELECTIONS = [
|
|
120
|
+
{},
|
|
121
|
+
{ from: facet("tasks/a") },
|
|
122
|
+
{ from: facet("tasks/", "tasks/a", "tasks/") },
|
|
123
|
+
{ to: facet("tasks/a") },
|
|
124
|
+
{ to: facet("people/", "ghost") },
|
|
125
|
+
{ text: "Ünïcödé" },
|
|
126
|
+
{ from: facet("tasks/"), to: facet("people/") },
|
|
127
|
+
{ from: facet() },
|
|
128
|
+
{ to: facet() },
|
|
129
|
+
{ to: facet("tasks/a"), text: "t" },
|
|
130
|
+
{ from: facet("metrics/m") },
|
|
131
|
+
{ from: facet("roadmap-items/x"), text: "resource" },
|
|
132
|
+
{ to: facet("people/\u{1D49C}") },
|
|
133
|
+
{ to: facet("tasks/okf:b") },
|
|
134
|
+
{ from: facet("people/") },
|
|
135
|
+
{ from: facet("tasks/a"), to: facet("tasks/a") },
|
|
136
|
+
{ to: facet("nope/") },
|
|
137
|
+
{ from: facet("task") },
|
|
138
|
+
{ text: "" },
|
|
139
|
+
// `_` and ASCII case are literal: an SQL `LIKE` would match each of these more widely.
|
|
140
|
+
{ from: facet("my_notes/") },
|
|
141
|
+
{ to: facet("my_notes/") },
|
|
142
|
+
{ to: facet("MY_NOTES/") },
|
|
143
|
+
{ to: facet("my_notes/a") },
|
|
144
|
+
// Text is exact: no case folding, no trimming, no Unicode normalization.
|
|
145
|
+
{ text: "contains" },
|
|
146
|
+
{ text: "Contains" },
|
|
147
|
+
{ text: "contains " },
|
|
148
|
+
{ text: "\u00E9" },
|
|
149
|
+
{ text: "e\u0301" },
|
|
150
|
+
{ from: facet("notes/long") },
|
|
151
|
+
];
|
|
152
|
+
function selects(selection, [from, to, text]) {
|
|
153
|
+
const matches = (value, f) => f === undefined || f.ids.includes(value) || f.prefixes.some((prefix) => value.startsWith(prefix));
|
|
154
|
+
return matches(from, selection.from) && matches(to, selection.to) && (selection.text === undefined || text === selection.text);
|
|
155
|
+
}
|
|
156
|
+
const LEGACY_PAGES = {
|
|
157
|
+
"tasks/a": [
|
|
158
|
+
["incoming", "metrics/m", "z", "M"],
|
|
159
|
+
["incoming", "notes/long", "f", "Long"],
|
|
160
|
+
["incoming", "notes/long", "b", "Long"],
|
|
161
|
+
["incoming", "notes/long", "\u{E9}", "Long"],
|
|
162
|
+
["incoming", "notes/long", "h", "Long"],
|
|
163
|
+
["incoming", "notes/long", "e\u{301}", "Long"],
|
|
164
|
+
["incoming", "people/\u{FF5E}", "t", null],
|
|
165
|
+
["incoming", "people/\u{1D49C}", "t", "Script A"],
|
|
166
|
+
["incoming", "roadmap-items/x", "contains", "X"],
|
|
167
|
+
["incoming", "tasks/b", "also a", "B"],
|
|
168
|
+
["outgoing", "people/\u{FF5E}", "\u{DC}n\u{EF}c\u{F6}d\u{E9}", null],
|
|
169
|
+
["outgoing", "tasks/b", "b", "B"],
|
|
170
|
+
["outgoing", "tasks/b", "code", "B"],
|
|
171
|
+
["outgoing", "tasks/b", "other b", "B"],
|
|
172
|
+
],
|
|
173
|
+
"tasks/b": [
|
|
174
|
+
["incoming", "notes/long", "Contains", "Long"],
|
|
175
|
+
["incoming", "notes/long", "contains ", "Long"],
|
|
176
|
+
["incoming", "notes/long", "contains", "Long"],
|
|
177
|
+
["incoming", "notes/long", "g", "Long"],
|
|
178
|
+
["incoming", "roadmap-items/x", "supersedes", "X"],
|
|
179
|
+
["incoming", "tasks/a", "b", "A"],
|
|
180
|
+
["incoming", "tasks/a", "code", "A"],
|
|
181
|
+
["incoming", "tasks/a", "other b", "A"],
|
|
182
|
+
["outgoing", "people/\u{1D49C}", "\u{DC}n\u{EF}c\u{F6}d\u{E9}", "Script A"],
|
|
183
|
+
["outgoing", "tasks/a", "also a", "A"],
|
|
184
|
+
],
|
|
185
|
+
"people/\u{FF5E}": [
|
|
186
|
+
["incoming", "people/\u{1D49C}", "contains", "Script A"],
|
|
187
|
+
["incoming", "tasks/a", "\u{DC}n\u{EF}c\u{F6}d\u{E9}", "A"],
|
|
188
|
+
["outgoing", "tasks/a", "t", "A"],
|
|
189
|
+
],
|
|
190
|
+
"people/\u{1D49C}": [
|
|
191
|
+
["incoming", "tasks/b", "\u{DC}n\u{EF}c\u{F6}d\u{E9}", "B"],
|
|
192
|
+
["outgoing", "people/\u{FF5E}", "contains", null],
|
|
193
|
+
["outgoing", "tasks/a", "t", "A"],
|
|
194
|
+
],
|
|
195
|
+
"roadmap-items/x": [
|
|
196
|
+
["outgoing", "tasks/a", "contains", "A"],
|
|
197
|
+
["outgoing", "tasks/b", "supersedes", "B"],
|
|
198
|
+
],
|
|
199
|
+
"metrics/m": [
|
|
200
|
+
["outgoing", "tasks/a", "z", "A"],
|
|
201
|
+
],
|
|
202
|
+
"notes/long": [
|
|
203
|
+
["incoming", "myXnotes/b", "n", "Not under score"],
|
|
204
|
+
["incoming", "my_notes/a", "n", "Under score"],
|
|
205
|
+
["outgoing", "myXnotes/b", "j", "Not under score"],
|
|
206
|
+
["outgoing", "my_notes/a", "k", "Under score"],
|
|
207
|
+
["outgoing", "tasks/a", "f", "A"],
|
|
208
|
+
["outgoing", "tasks/a", "b", "A"],
|
|
209
|
+
["outgoing", "tasks/a", "\u{E9}", "A"],
|
|
210
|
+
["outgoing", "tasks/a", "h", "A"],
|
|
211
|
+
["outgoing", "tasks/a", "e\u{301}", "A"],
|
|
212
|
+
["outgoing", "tasks/b", "Contains", "B"],
|
|
213
|
+
["outgoing", "tasks/b", "contains ", "B"],
|
|
214
|
+
["outgoing", "tasks/b", "contains", "B"],
|
|
215
|
+
["outgoing", "tasks/b", "g", "B"],
|
|
216
|
+
],
|
|
217
|
+
"my_notes/a": [
|
|
218
|
+
["incoming", "notes/long", "k", "Long"],
|
|
219
|
+
["outgoing", "notes/long", "n", "Long"],
|
|
220
|
+
],
|
|
221
|
+
"myXnotes/b": [
|
|
222
|
+
["incoming", "notes/long", "j", "Long"],
|
|
223
|
+
["outgoing", "notes/long", "n", "Long"],
|
|
224
|
+
],
|
|
225
|
+
"MY_NOTES/a": "not_found",
|
|
226
|
+
"ghost": "not_found",
|
|
227
|
+
};
|
|
228
|
+
/** Each document's whole relationship page: one row per direction, neighbor and label, sorted by
|
|
229
|
+
* direction, neighbor in code points, then the label's key; no self links, no non-nodes. */
|
|
230
|
+
const PAGES = {
|
|
231
|
+
"0.1": LEGACY_PAGES,
|
|
232
|
+
"0.2": LEGACY_PAGES,
|
|
233
|
+
"0.3": {
|
|
234
|
+
"tasks/a": [
|
|
235
|
+
["incoming", "metrics/m", "z", "M"],
|
|
236
|
+
["incoming", "metrics/m", "resource", "M"],
|
|
237
|
+
["incoming", "notes/long", "f", "Long"],
|
|
238
|
+
["incoming", "notes/long", "b", "Long"],
|
|
239
|
+
["incoming", "notes/long", "\u{E9}", "Long"],
|
|
240
|
+
["incoming", "notes/long", "h", "Long"],
|
|
241
|
+
["incoming", "notes/long", "e\u{301}", "Long"],
|
|
242
|
+
["incoming", "people/\u{FF5E}", "t", null],
|
|
243
|
+
["incoming", "roadmap-items/x", "contains", "X"],
|
|
244
|
+
["incoming", "tasks/b", "also a", "B"],
|
|
245
|
+
["incoming", "tasks/b", "a", "B"],
|
|
246
|
+
["outgoing", "tasks/b", "b", "B"],
|
|
247
|
+
["outgoing", "tasks/b", "other b", "B"],
|
|
248
|
+
],
|
|
249
|
+
"tasks/b": [
|
|
250
|
+
["incoming", "metrics/m", "ref", "M"],
|
|
251
|
+
["incoming", "metrics/m", "sources.resource", "M"],
|
|
252
|
+
["incoming", "notes/long", "Contains", "Long"],
|
|
253
|
+
["incoming", "notes/long", "contains ", "Long"],
|
|
254
|
+
["incoming", "notes/long", "contains", "Long"],
|
|
255
|
+
["incoming", "notes/long", "g", "Long"],
|
|
256
|
+
["incoming", "roadmap-items/x", "resource", "X"],
|
|
257
|
+
["incoming", "roadmap-items/x", "supersedes", "X"],
|
|
258
|
+
["incoming", "tasks/a", "b", "A"],
|
|
259
|
+
["incoming", "tasks/a", "other b", "A"],
|
|
260
|
+
["outgoing", "tasks/a", "also a", "A"],
|
|
261
|
+
["outgoing", "tasks/a", "a", "A"],
|
|
262
|
+
],
|
|
263
|
+
"people/\u{FF5E}": [
|
|
264
|
+
["outgoing", "tasks/a", "t", "A"],
|
|
265
|
+
],
|
|
266
|
+
"people/\u{1D49C}": "not_found",
|
|
267
|
+
"roadmap-items/x": [
|
|
268
|
+
["outgoing", "tasks/a", "contains", "A"],
|
|
269
|
+
["outgoing", "tasks/b", "resource", "B"],
|
|
270
|
+
["outgoing", "tasks/b", "supersedes", "B"],
|
|
271
|
+
],
|
|
272
|
+
"metrics/m": [
|
|
273
|
+
["outgoing", "tasks/a", "z", "A"],
|
|
274
|
+
["outgoing", "tasks/a", "resource", "A"],
|
|
275
|
+
["outgoing", "tasks/b", "ref", "B"],
|
|
276
|
+
["outgoing", "tasks/b", "sources.resource", "B"],
|
|
277
|
+
],
|
|
278
|
+
"notes/long": [
|
|
279
|
+
["incoming", "myXnotes/b", "n", "Not under score"],
|
|
280
|
+
["incoming", "my_notes/a", "n", "Under score"],
|
|
281
|
+
["outgoing", "myXnotes/b", "j", "Not under score"],
|
|
282
|
+
["outgoing", "my_notes/a", "k", "Under score"],
|
|
283
|
+
["outgoing", "tasks/a", "f", "A"],
|
|
284
|
+
["outgoing", "tasks/a", "b", "A"],
|
|
285
|
+
["outgoing", "tasks/a", "\u{E9}", "A"],
|
|
286
|
+
["outgoing", "tasks/a", "h", "A"],
|
|
287
|
+
["outgoing", "tasks/a", "e\u{301}", "A"],
|
|
288
|
+
["outgoing", "tasks/b", "Contains", "B"],
|
|
289
|
+
["outgoing", "tasks/b", "contains ", "B"],
|
|
290
|
+
["outgoing", "tasks/b", "contains", "B"],
|
|
291
|
+
["outgoing", "tasks/b", "g", "B"],
|
|
292
|
+
],
|
|
293
|
+
"my_notes/a": [
|
|
294
|
+
["incoming", "notes/long", "k", "Long"],
|
|
295
|
+
["outgoing", "notes/long", "n", "Long"],
|
|
296
|
+
],
|
|
297
|
+
"myXnotes/b": [
|
|
298
|
+
["incoming", "notes/long", "j", "Long"],
|
|
299
|
+
["outgoing", "notes/long", "n", "Long"],
|
|
300
|
+
],
|
|
301
|
+
"MY_NOTES/a": "not_found",
|
|
302
|
+
"ghost": "not_found",
|
|
303
|
+
},
|
|
304
|
+
};
|
|
305
|
+
async function rowsOf(source, selection, limit) {
|
|
306
|
+
const read = await source.edges(selection, limit);
|
|
307
|
+
assert.equal(read.status, "ready");
|
|
308
|
+
if (read.status !== "ready")
|
|
309
|
+
throw new Error("unreachable");
|
|
310
|
+
return { rows: read.edges.map(({ from, to, text, href }) => [from, to, text, href]), more: read.more };
|
|
311
|
+
}
|
|
312
|
+
/** Registers every row of the contract for one source, in each edition. */
|
|
313
|
+
export function registerEdgeSourceContract(options) {
|
|
314
|
+
const test = options.test ?? nodeTest;
|
|
315
|
+
for (const edition of ["0.1", "0.2", "0.3"]) {
|
|
316
|
+
const withSource = async (body) => {
|
|
317
|
+
const fixture = await options.create(edgeCorpus(edition), edition);
|
|
318
|
+
try {
|
|
319
|
+
await body(fixture.source);
|
|
320
|
+
}
|
|
321
|
+
finally {
|
|
322
|
+
await fixture.cleanup?.();
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
const all = ROWS[edition];
|
|
326
|
+
test(`${options.name}, OKF ${edition}: every occurrence is a row, by source in code points, then as written`, () => withSource(async (source) => {
|
|
327
|
+
assert.deepEqual(await rowsOf(source, {}), { rows: all, more: false });
|
|
328
|
+
}));
|
|
329
|
+
test(`${options.name}, OKF ${edition}: a selection answers exactly the rows it selects, each once, in the same order`, () => withSource(async (source) => {
|
|
330
|
+
for (const selection of SELECTIONS)
|
|
331
|
+
assert.deepEqual(await rowsOf(source, selection), { rows: all.filter((row) => selects(selection, row)), more: false }, JSON.stringify(selection));
|
|
332
|
+
}));
|
|
333
|
+
test(`${options.name}, OKF ${edition}: over the limit is more, with exactly the first rows in order`, () => withSource(async (source) => {
|
|
334
|
+
for (const limit of [0, 1, 11, all.length - 1, all.length, all.length + 1])
|
|
335
|
+
assert.deepEqual(await rowsOf(source, {}, limit), { rows: all.slice(0, limit), more: all.length > limit }, `limit ${limit}`);
|
|
336
|
+
for (const selection of SELECTIONS) {
|
|
337
|
+
const selected = all.filter((row) => selects(selection, row));
|
|
338
|
+
for (const limit of [1, 2, 10])
|
|
339
|
+
assert.deepEqual(await rowsOf(source, selection, limit), { rows: selected.slice(0, limit), more: selected.length > limit }, `${JSON.stringify(selection)}, limit ${limit}`);
|
|
340
|
+
}
|
|
341
|
+
}));
|
|
342
|
+
test(`${options.name}, OKF ${edition}: heads name the nodes with their trimmed titles and types, nothing else`, () => withSource(async (source) => {
|
|
343
|
+
const asked = [...Object.keys(LEGACY_HEADS), "MY_NOTES/a", "ghost", "tasks/okf:b", "tasks/", ""];
|
|
344
|
+
const read = await source.heads(asked);
|
|
345
|
+
assert.equal(read.status, "ready");
|
|
346
|
+
if (read.status !== "ready")
|
|
347
|
+
return;
|
|
348
|
+
const named = Object.fromEntries([...read.heads].map(([id, head]) => (assert.equal(head.id, id), [id, [head.title, head.type]])));
|
|
349
|
+
assert.deepEqual(named, HEADS[edition]);
|
|
350
|
+
}));
|
|
351
|
+
test(`${options.name}, OKF ${edition}: Core's relationship page reads the same neighbors through it`, () => withSource(async (source) => {
|
|
352
|
+
for (const [documentId, expected] of Object.entries(PAGES[edition])) {
|
|
353
|
+
const page = await relationshipPage(source, documentId, 30);
|
|
354
|
+
if (expected === "not_found") {
|
|
355
|
+
assert.deepEqual(page, { status: "not_found" }, documentId);
|
|
356
|
+
continue;
|
|
357
|
+
}
|
|
358
|
+
assert.equal(page.status, "ready", documentId);
|
|
359
|
+
if (page.status !== "ready")
|
|
360
|
+
continue;
|
|
361
|
+
assert.deepEqual(page.rows.map(({ direction, documentId: id, label, title }) => [direction, id, label, title]), expected, documentId);
|
|
362
|
+
assert.equal(page.more, false);
|
|
363
|
+
// Two at a time, each page strictly after the last row of the one before.
|
|
364
|
+
const paged = [];
|
|
365
|
+
let after;
|
|
366
|
+
for (;;) {
|
|
367
|
+
const next = await relationshipPage(source, documentId, 2, after);
|
|
368
|
+
assert.equal(next.status, "ready");
|
|
369
|
+
if (next.status !== "ready")
|
|
370
|
+
break;
|
|
371
|
+
paged.push(...next.rows.map(({ direction, documentId: id, label, title }) => [direction, id, label, title]));
|
|
372
|
+
const last = next.rows.at(-1);
|
|
373
|
+
if (!next.more || last === undefined)
|
|
374
|
+
break;
|
|
375
|
+
after = { direction: last.direction, documentId: last.documentId, labelKey: last.labelKey };
|
|
376
|
+
}
|
|
377
|
+
assert.deepEqual(paged, expected, `${documentId}, paged`);
|
|
378
|
+
}
|
|
379
|
+
}));
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/edge-harness/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,QAAQ,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,gBAAgB,EAA6B,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAE,UAAU,EAAoB,MAAM,aAAa,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAoB,MAAM,aAAa,CAAC;AAsB3D,MAAM,WAAW,GAAmB;IAClC,CAAC,WAAW,EAAE,SAAS,EAAE,GAAG,EAAE,aAAa,CAAC;IAC5C,CAAC,YAAY,EAAE,YAAY,EAAE,GAAG,EAAE,kBAAkB,CAAC;IACrD,CAAC,YAAY,EAAE,YAAY,EAAE,GAAG,EAAE,kBAAkB,CAAC;IACrD,CAAC,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,CAAC;IACtD,CAAC,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,CAAC;IACtD,CAAC,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,CAAC;IACvD,CAAC,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,eAAe,CAAC;IACpD,CAAC,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,CAAC;IACtD,CAAC,YAAY,EAAE,YAAY,EAAE,GAAG,EAAE,kBAAkB,CAAC;IACrD,CAAC,YAAY,EAAE,YAAY,EAAE,GAAG,EAAE,kBAAkB,CAAC;IACrD,CAAC,YAAY,EAAE,YAAY,EAAE,GAAG,EAAE,kBAAkB,CAAC;IACrD,CAAC,YAAY,EAAE,SAAS,EAAE,GAAG,EAAE,eAAe,CA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C1E,MAAM,KAAK,GAAc,EAAE,CAAC;gBAC5B,IAAI,KAAuC,CAAC;gBAC5C,SAAS,CAAC;oBACR,MAAM,IAAI,GAAG,MAAM,gBAAgB,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;oBAClE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;oBACnC,IAAI,IAAI,CAAC,MAAM,KAAK,OAAO;wBAAE,MAAM;oBACnC,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAW,EAAE,CAAC,CAAC,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;oBACtH,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC9B,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,KAAK,SAAS;wBAAE,MAAM;oBAC5C,KAAK,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAC9F,CAAC;gBACD,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,UAAU,SAAS,CAAC,CAAC;YAC5D,CAAC;QACH,CAAC,CAAC,CAAC,CAAC;IACR,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { EdgeFilter } from "../types.js";
|
|
2
|
+
import type { EdgeReadV1, EdgeSelectionV1, EdgeSource } from "./source.js";
|
|
3
|
+
/** `filter` as a source matches it, each selector once. Each must be a canonical id, or one
|
|
4
|
+
* followed by `/`; Core's `InvalidInputError` otherwise. */
|
|
5
|
+
export declare function edgeSelection(filter: EdgeFilter): EdgeSelectionV1;
|
|
6
|
+
/**
|
|
7
|
+
* The edges matching `selection`, ordered by `from`, `to` and `text` in code points (UTF-8 byte
|
|
8
|
+
* order, an index's order); equal rows keep their written order. More than `limit` rows answer
|
|
9
|
+
* `more` with no rows, never a cut list.
|
|
10
|
+
*/
|
|
11
|
+
export declare function findEdges(source: EdgeSource, selection: EdgeSelectionV1, limit?: number): Promise<EdgeReadV1>;
|
|
12
|
+
//# sourceMappingURL=find.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../src/edges/find.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAQ,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAe,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAkBxF;4DAC4D;AAC5D,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,eAAe,CAIjE;AAKD;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAKnH"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/** Edge reads written once over any {@link EdgeSource}. */
|
|
2
|
+
import { compareCodePoints } from "../code-point-order.js";
|
|
3
|
+
import { assertSafeConceptId } from "../paths.js";
|
|
4
|
+
function facetOf(value) {
|
|
5
|
+
if (value === undefined)
|
|
6
|
+
return undefined;
|
|
7
|
+
const ids = [];
|
|
8
|
+
const prefixes = [];
|
|
9
|
+
for (const selector of new Set(Array.isArray(value) ? value : [value])) {
|
|
10
|
+
if (selector.endsWith("/")) {
|
|
11
|
+
assertSafeConceptId(selector.slice(0, -1));
|
|
12
|
+
prefixes.push(selector);
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
assertSafeConceptId(selector);
|
|
16
|
+
ids.push(selector);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return { ids, prefixes };
|
|
20
|
+
}
|
|
21
|
+
/** `filter` as a source matches it, each selector once. Each must be a canonical id, or one
|
|
22
|
+
* followed by `/`; Core's `InvalidInputError` otherwise. */
|
|
23
|
+
export function edgeSelection(filter) {
|
|
24
|
+
const from = facetOf(filter.from);
|
|
25
|
+
const to = facetOf(filter.to);
|
|
26
|
+
return { ...(from ? { from } : {}), ...(to ? { to } : {}), ...(filter.text === undefined ? {} : { text: filter.text }) };
|
|
27
|
+
}
|
|
28
|
+
const byFromToText = (a, b) => compareCodePoints(a.from, b.from) || compareCodePoints(a.to, b.to) || compareCodePoints(a.text, b.text);
|
|
29
|
+
/**
|
|
30
|
+
* The edges matching `selection`, ordered by `from`, `to` and `text` in code points (UTF-8 byte
|
|
31
|
+
* order, an index's order); equal rows keep their written order. More than `limit` rows answer
|
|
32
|
+
* `more` with no rows, never a cut list.
|
|
33
|
+
*/
|
|
34
|
+
export async function findEdges(source, selection, limit) {
|
|
35
|
+
const read = await source.edges(selection, limit);
|
|
36
|
+
if (read.status !== "ready")
|
|
37
|
+
return read;
|
|
38
|
+
if (read.more)
|
|
39
|
+
return { status: "ready", edges: [], more: true };
|
|
40
|
+
return { status: "ready", edges: [...read.edges].sort(byFromToText), more: false };
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=find.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find.js","sourceRoot":"","sources":["../../src/edges/find.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAIlD,SAAS,OAAO,CAAC,KAAoC;IACnD,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC1C,MAAM,GAAG,GAAa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,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,iBAAiB,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;AAE1G;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,MAAkB,EAAE,SAA0B,EAAE,KAAc;IAC5F,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAClD,IAAI,IAAI,CAAC,MAAM,KAAK,OAAO;QAAE,OAAO,IAAI,CAAC;IACzC,IAAI,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACjE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AACrF,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@superbee/core/edges`: the one interface link reads go through. A store answers through the
|
|
3
|
+
* `EdgeSource` seam, `memoryEdgeSource` holds a complete set of derived link facts in memory, and
|
|
4
|
+
* `findEdges` is the edge read written once over any source. Pure ECMAScript with no dependency, so
|
|
5
|
+
* a Worker, a browser page and the CLI run the same code.
|
|
6
|
+
*/
|
|
7
|
+
export type { EdgeFacetV1, EdgeHeadV1, EdgeHeadsReadV1, EdgeReadV1, EdgeSelectionV1, EdgeSource, } from "./source.js";
|
|
8
|
+
export { memoryEdgeSource } from "./memory-source.js";
|
|
9
|
+
export { edgeSelection, findEdges } from "./find.js";
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/edges/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,YAAY,EACV,WAAW,EACX,UAAU,EACV,eAAe,EACf,UAAU,EACV,eAAe,EACf,UAAU,GACX,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/edges/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RelationshipSource } from "../relationships.js";
|
|
2
|
+
import type { EdgeSource } from "./source.js";
|
|
3
|
+
/**
|
|
4
|
+
* Builds the source over `sources`, already resolved for their edition (Core's
|
|
5
|
+
* `resolveRelationshipSources`): every source is a node, and its links are the rows it answers.
|
|
6
|
+
*/
|
|
7
|
+
export declare function memoryEdgeSource(sources: readonly RelationshipSource[]): EdgeSource;
|
|
8
|
+
//# sourceMappingURL=memory-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-source.d.ts","sourceRoot":"","sources":["../../src/edges/memory-source.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,OAAO,KAAK,EAA4C,UAAU,EAAE,MAAM,aAAa,CAAC;AAWxF;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,SAAS,kBAAkB,EAAE,GAAG,UAAU,CA+DnF"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The in-memory source: one complete set of derived link facts, held as one list grouped by source
|
|
3
|
+
* document, with a lazy index by target. A host builds one per read of its bundle.
|
|
4
|
+
*/
|
|
5
|
+
import { compareCodePoints } from "../code-point-order.js";
|
|
6
|
+
function matches(value, facet) {
|
|
7
|
+
return facet === undefined || facet.ids.includes(value) || facet.prefixes.some((prefix) => value.startsWith(prefix));
|
|
8
|
+
}
|
|
9
|
+
/** Positions in ascending order, each once. */
|
|
10
|
+
function ascending(positions) {
|
|
11
|
+
return [...new Set(positions)].sort((a, b) => a - b);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Builds the source over `sources`, already resolved for their edition (Core's
|
|
15
|
+
* `resolveRelationshipSources`): every source is a node, and its links are the rows it answers.
|
|
16
|
+
*/
|
|
17
|
+
export function memoryEdgeSource(sources) {
|
|
18
|
+
const ordered = [...sources].sort((a, b) => compareCodePoints(a.id, b.id));
|
|
19
|
+
const rows = [];
|
|
20
|
+
const bySource = new Map();
|
|
21
|
+
const heads = new Map();
|
|
22
|
+
for (const { id, title, type, links } of ordered) {
|
|
23
|
+
bySource.set(id, [rows.length, rows.length + links.length]);
|
|
24
|
+
rows.push(...links);
|
|
25
|
+
heads.set(id, Object.freeze({ id, title, type: type ?? null }));
|
|
26
|
+
}
|
|
27
|
+
let byTarget;
|
|
28
|
+
const targets = () => {
|
|
29
|
+
if (byTarget)
|
|
30
|
+
return byTarget;
|
|
31
|
+
byTarget = new Map();
|
|
32
|
+
for (const [position, { to }] of rows.entries()) {
|
|
33
|
+
const list = byTarget.get(to);
|
|
34
|
+
if (list)
|
|
35
|
+
list.push(position);
|
|
36
|
+
else
|
|
37
|
+
byTarget.set(to, [position]);
|
|
38
|
+
}
|
|
39
|
+
return byTarget;
|
|
40
|
+
};
|
|
41
|
+
const range = ([start, end]) => Array.from({ length: end - start }, (_, i) => start + i);
|
|
42
|
+
/** The rows a facet can match, seeking by source or target id; a prefix scans. */
|
|
43
|
+
const seek = (facet, by) => {
|
|
44
|
+
const found = [];
|
|
45
|
+
for (const id of facet.ids) {
|
|
46
|
+
if (by === "from")
|
|
47
|
+
found.push(...(bySource.has(id) ? range(bySource.get(id)) : []));
|
|
48
|
+
else
|
|
49
|
+
found.push(...(targets().get(id) ?? []));
|
|
50
|
+
}
|
|
51
|
+
if (facet.prefixes.length > 0)
|
|
52
|
+
for (const [position, row] of rows.entries())
|
|
53
|
+
if (facet.prefixes.some((prefix) => row[by].startsWith(prefix)))
|
|
54
|
+
found.push(position);
|
|
55
|
+
return ascending(found);
|
|
56
|
+
};
|
|
57
|
+
return Object.freeze({
|
|
58
|
+
async edges(selection, limit = Infinity) {
|
|
59
|
+
if (!(limit === Infinity || (Number.isSafeInteger(limit) && limit >= 0)))
|
|
60
|
+
throw new TypeError("An edge read's limit must be a non-negative integer");
|
|
61
|
+
const candidates = selection.from ? seek(selection.from, "from") : selection.to ? seek(selection.to, "to") : undefined;
|
|
62
|
+
const edges = [];
|
|
63
|
+
let more = false;
|
|
64
|
+
for (const position of candidates ?? rows.keys()) {
|
|
65
|
+
const row = rows[position];
|
|
66
|
+
if (!matches(row.from, selection.from) || !matches(row.to, selection.to))
|
|
67
|
+
continue;
|
|
68
|
+
if (selection.text !== undefined && row.text !== selection.text)
|
|
69
|
+
continue;
|
|
70
|
+
if (edges.length === limit) {
|
|
71
|
+
more = true;
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
edges.push(row);
|
|
75
|
+
}
|
|
76
|
+
return { status: "ready", edges, more };
|
|
77
|
+
},
|
|
78
|
+
async heads(ids) {
|
|
79
|
+
const found = new Map();
|
|
80
|
+
for (const id of ids) {
|
|
81
|
+
const head = heads.get(id);
|
|
82
|
+
if (head)
|
|
83
|
+
found.set(id, head);
|
|
84
|
+
}
|
|
85
|
+
return { status: "ready", heads: found };
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=memory-source.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory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