@beehexa/hexasync-template-index 2608.8.3 → 2608.20.18
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/package.json +4 -4
- package/dist/checkpoints.d.ts +0 -47
- package/dist/checkpoints.d.ts.map +0 -1
- package/dist/checkpoints.js +0 -59
- package/dist/checkpoints.js.map +0 -1
- package/dist/cursorContext.d.ts +0 -204
- package/dist/cursorContext.d.ts.map +0 -1
- package/dist/cursorContext.js +0 -462
- package/dist/cursorContext.js.map +0 -1
- package/dist/detectors.d.ts +0 -103
- package/dist/detectors.d.ts.map +0 -1
- package/dist/detectors.js +0 -104
- package/dist/detectors.js.map +0 -1
- package/dist/discovery.d.ts +0 -193
- package/dist/discovery.d.ts.map +0 -1
- package/dist/discovery.js +0 -394
- package/dist/discovery.js.map +0 -1
- package/dist/effectiveGraph.d.ts +0 -240
- package/dist/effectiveGraph.d.ts.map +0 -1
- package/dist/effectiveGraph.js +0 -523
- package/dist/effectiveGraph.js.map +0 -1
- package/dist/failures.d.ts +0 -50
- package/dist/failures.d.ts.map +0 -1
- package/dist/failures.js +0 -125
- package/dist/failures.js.map +0 -1
- package/dist/graph.d.ts +0 -47
- package/dist/graph.d.ts.map +0 -1
- package/dist/graph.js +0 -230
- package/dist/graph.js.map +0 -1
- package/dist/index.d.ts +0 -21
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -36
- package/dist/index.js.map +0 -1
- package/dist/queries.d.ts +0 -102
- package/dist/queries.d.ts.map +0 -1
- package/dist/queries.js +0 -463
- package/dist/queries.js.map +0 -1
- package/dist/ranges.d.ts +0 -37
- package/dist/ranges.d.ts.map +0 -1
- package/dist/ranges.js +0 -217
- package/dist/ranges.js.map +0 -1
- package/dist/resolveField.d.ts +0 -125
- package/dist/resolveField.d.ts.map +0 -1
- package/dist/resolveField.js +0 -234
- package/dist/resolveField.js.map +0 -1
- package/dist/tier1Service.d.ts +0 -96
- package/dist/tier1Service.d.ts.map +0 -1
- package/dist/tier1Service.js +0 -194
- package/dist/tier1Service.js.map +0 -1
- package/dist/tier2Service.d.ts +0 -195
- package/dist/tier2Service.d.ts.map +0 -1
- package/dist/tier2Service.js +0 -642
- package/dist/tier2Service.js.map +0 -1
- package/dist/yamlScalar.d.ts +0 -17
- package/dist/yamlScalar.d.ts.map +0 -1
- package/dist/yamlScalar.js +0 -101
- package/dist/yamlScalar.js.map +0 -1
package/dist/discovery.js
DELETED
|
@@ -1,394 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tier 1 discovery — find every project in a workspace by locating its `main.yaml` (Story 2.1).
|
|
3
|
-
*
|
|
4
|
-
* "Tier 1" means eager and workspace-wide, and the only thing that makes that affordable is how
|
|
5
|
-
* little it reads: one `main.yaml` per project and nothing else. The corpus holds 7,729 YAML
|
|
6
|
-
* files across 113 projects, so parsing anything more would put NFR-4's 2-second budget out of
|
|
7
|
-
* reach on principle rather than by a margin.
|
|
8
|
-
*
|
|
9
|
-
* TWO KINDS OF PROJECT, detected differently, because they are different document families:
|
|
10
|
-
*
|
|
11
|
-
* - a **profile template** is identified by `main.yaml`, and never by `output.yaml` (FR-37).
|
|
12
|
-
* `output.yaml` is a build artefact: absent in projects nobody has composed yet and present
|
|
13
|
-
* in folders that are not projects at all, so it would be wrong in both directions.
|
|
14
|
-
* - a **connector template** is identified by an `hx-connectors.json` marker. The folder holding
|
|
15
|
-
* that marker IS the connector project — connector definitions are flat catalogue entries
|
|
16
|
-
* (`connectorId`, `systemId`, `systemArea`) with no `main.yaml` anywhere.
|
|
17
|
-
*
|
|
18
|
-
* The distinction is not cosmetic. `compose` operates on profile templates ONLY; `compose
|
|
19
|
-
* description` works on either, because it inlines `!md[...]` and depends on no business rule.
|
|
20
|
-
* Anything offering a profile-only action has to be able to tell the two apart, and detecting
|
|
21
|
-
* only `main.yaml` cannot — it makes a connector folder look like no project at all.
|
|
22
|
-
*
|
|
23
|
-
* There is deliberately no fixed `connectors/` path. A workspace may declare several connector
|
|
24
|
-
* roots, anywhere; the marker is the signal.
|
|
25
|
-
*/
|
|
26
|
-
import { basenameUri, dirnameUri, joinUri, normalizeUri, } from '@beehexa/hexasync-template-model';
|
|
27
|
-
import { DEFAULT_DETECTORS, acceptAll, detectorFor, partialsAwareRoot, } from './detectors.js';
|
|
28
|
-
/**
|
|
29
|
-
* Paths never opened by either tier (Story 2.1, last AC).
|
|
30
|
-
*
|
|
31
|
-
* `__configs/**` is the known case — generated content that is not authored and must not appear
|
|
32
|
-
* in the index, in diagnostics, or in any coverage metric. Configurable rather than hard-coded
|
|
33
|
-
* because the next generated directory will have a different name and nobody will remember to
|
|
34
|
-
* come back here.
|
|
35
|
-
*/
|
|
36
|
-
export const DEFAULT_IGNORED_PATH_SEGMENTS = [
|
|
37
|
-
'__configs',
|
|
38
|
-
'node_modules',
|
|
39
|
-
'.git',
|
|
40
|
-
];
|
|
41
|
-
/** True when any path segment is on the ignore list. */
|
|
42
|
-
export function isIgnoredPath(uri, ignored = DEFAULT_IGNORED_PATH_SEGMENTS) {
|
|
43
|
-
// Segment-wise, not `includes`: a substring test would ignore `my__configs_backup/`, and a
|
|
44
|
-
// silently under-indexed workspace is far harder to notice than an over-indexed one.
|
|
45
|
-
const segments = normalizeUri(uri).split('/');
|
|
46
|
-
return segments.some((segment) => ignored.includes(segment));
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* The display name for a project rooted at `componentPath`.
|
|
50
|
-
*
|
|
51
|
-
* `main.yaml` lives in `<project>/partials/`, so the project is the PARENT — except where the
|
|
52
|
-
* folder is not named `partials`/`partial` at all, in which case it is its own project folder.
|
|
53
|
-
* Both spellings are accepted on read (FR-38); only `partials` is ever emitted.
|
|
54
|
-
*/
|
|
55
|
-
export function projectNameFor(componentPath) {
|
|
56
|
-
return basenameUri(partialsAwareRoot(componentPath)) || componentPath;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* One `DiscoveredProject` from one descriptor, shared by the downward scan and the upward walk.
|
|
60
|
-
*
|
|
61
|
-
* Factored out when `locateProjectUpward` arrived: two constructions would be two chances to
|
|
62
|
-
* disagree about a project's id, name or component path, and every consumer keys on those.
|
|
63
|
-
*/
|
|
64
|
-
function projectFrom(detector, descriptorPath, descriptorText) {
|
|
65
|
-
const componentPath = detector.componentPathFor(descriptorPath);
|
|
66
|
-
return {
|
|
67
|
-
kind: detector.kind,
|
|
68
|
-
id: componentPath,
|
|
69
|
-
name: detector.nameFor(componentPath),
|
|
70
|
-
componentPath,
|
|
71
|
-
descriptorPath,
|
|
72
|
-
descriptorText,
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Both spellings of the component folder, because 2 of the 113 corpus projects use the singular
|
|
77
|
-
* (FR-38). Probed from a project ROOT, where the descriptor sits one level down.
|
|
78
|
-
*/
|
|
79
|
-
const COMPONENT_DIRS = ['partials', 'partial'];
|
|
80
|
-
/**
|
|
81
|
-
* The descriptor FILENAME a detector looks for, when its glob names exactly one.
|
|
82
|
-
*
|
|
83
|
-
* `**/main.yaml` → `main.yaml`. Returns undefined for anything more elaborate rather than guessing:
|
|
84
|
-
* a detector whose descriptor cannot be named this way is one the upward walk must admit it cannot
|
|
85
|
-
* find, and `locateProjectUpward` reports that instead of silently answering "no project".
|
|
86
|
-
*/
|
|
87
|
-
export function descriptorNameOf(detector) {
|
|
88
|
-
const glob = detector.descriptorGlob;
|
|
89
|
-
if (!glob.startsWith('**/'))
|
|
90
|
-
return undefined;
|
|
91
|
-
const tail = glob.slice(3);
|
|
92
|
-
return tail.length > 0 && !tail.includes('/') && !tail.includes('*')
|
|
93
|
-
? tail
|
|
94
|
-
: undefined;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Every project in the workspace, WITHOUT reading a single descriptor.
|
|
98
|
-
*
|
|
99
|
-
* For a list — "show me the projects so I can go to one" — the descriptor's CONTENT buys nothing:
|
|
100
|
-
* `nameFor` derives the name from the folder path, `kind` comes from which glob matched, and both shipped
|
|
101
|
-
* detectors accept every candidate (`accepts: acceptAll`). So `discoverProjects`' read per project is pure
|
|
102
|
-
* cost here: 115 of them on the reported workspace, for information no consumer of a list uses.
|
|
103
|
-
*
|
|
104
|
-
* `discoverProjects` still exists and still reads, because the INHERITANCE questions genuinely need each
|
|
105
|
-
* project's `externals` — who declares a shared file, and who inherits a project. This is the cheap half,
|
|
106
|
-
* for the question that only needs to know that a project is there.
|
|
107
|
-
*
|
|
108
|
-
* A detector whose `accepts` is not the default is EXCLUDED and named in `unverifiable`, because listing a
|
|
109
|
-
* candidate this function cannot confirm would be claiming a project exists on the strength of a filename.
|
|
110
|
-
*/
|
|
111
|
-
export async function listProjects(rootUri, reader, options = {}) {
|
|
112
|
-
const ignored = options.ignoredPathSegments ?? DEFAULT_IGNORED_PATH_SEGMENTS;
|
|
113
|
-
const detectors = options.detectors ?? DEFAULT_DETECTORS;
|
|
114
|
-
const keep = (uri) => !isIgnoredPath(uri, ignored);
|
|
115
|
-
const listable = detectors.filter((detector) => detector.accepts === acceptAll);
|
|
116
|
-
const unverifiable = detectors
|
|
117
|
-
.filter((detector) => detector.accepts !== acceptAll)
|
|
118
|
-
.map((detector) => detector.kind);
|
|
119
|
-
// One glob per kind, concurrently — the same shape `discoverProjects` uses, minus every read.
|
|
120
|
-
const hits = await Promise.all(listable.map(async (detector) => ({
|
|
121
|
-
detector,
|
|
122
|
-
uris: (await reader.glob(rootUri, detector.descriptorGlob)).filter(keep),
|
|
123
|
-
})));
|
|
124
|
-
const byId = new Map();
|
|
125
|
-
// Highest precedence first, so a folder claimed by two kinds resolves by the declared rule.
|
|
126
|
-
for (const { detector, uris } of [...hits].sort((a, b) => b.detector.precedence - a.detector.precedence)) {
|
|
127
|
-
for (const raw of uris) {
|
|
128
|
-
const descriptorPath = normalizeUri(raw);
|
|
129
|
-
const componentPath = detector.componentPathFor(descriptorPath);
|
|
130
|
-
if (byId.has(componentPath))
|
|
131
|
-
continue;
|
|
132
|
-
byId.set(componentPath, {
|
|
133
|
-
kind: detector.kind,
|
|
134
|
-
id: componentPath,
|
|
135
|
-
componentPath,
|
|
136
|
-
descriptorPath,
|
|
137
|
-
name: detector.nameFor(componentPath),
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
return {
|
|
142
|
-
projects: [...byId.values()].sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : a.id < b.id ? -1 : 1),
|
|
143
|
-
unverifiable,
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* The project owning ONE file, by walking UP from it (NFR-8).
|
|
148
|
-
*
|
|
149
|
-
* ### Why this exists
|
|
150
|
-
*
|
|
151
|
-
* `discoverProjects` answers "every project in the workspace", and the editor was using it to answer
|
|
152
|
-
* "which project is this file in" — building a complete list and then searching it. On a monorepo root
|
|
153
|
-
* that cost **234 seconds** (measured: 12,979 directories, three workspace-wide globs, ~6 ms per
|
|
154
|
-
* directory through the host's file search) to answer a question about a single file. NFR-8 forbids
|
|
155
|
-
* eager workspace indexing, and that scan was one.
|
|
156
|
-
*
|
|
157
|
-
* Walking up costs one read per candidate per level — about seven for a file inside `partials`,
|
|
158
|
-
* because the first level up IS the component folder and its descriptor is right there.
|
|
159
|
-
*
|
|
160
|
-
* ### Why upward is not just faster but MORE correct
|
|
161
|
-
*
|
|
162
|
-
* Projects nest (FR-39). `projectForFile` resolves that by preferring the deepest root, because a file
|
|
163
|
-
* in `variux/maileg-2025/eu` belongs to `eu` and not to the outer `variux`. A downward scan that
|
|
164
|
-
* stopped at the first descriptor it met would answer with the OUTERMOST project; walking up and
|
|
165
|
-
* stopping at the first one gives the deepest, which is the right answer, for free.
|
|
166
|
-
*
|
|
167
|
-
* ### The shortcut that is deliberately NOT taken
|
|
168
|
-
*
|
|
169
|
-
* It is tempting to jump straight to the nearest `partials` segment in the file's own path — one read
|
|
170
|
-
* for the common case instead of a dozen. It is also wrong: a project declared WITHOUT a component
|
|
171
|
-
* folder (a connector root) can sit deeper than the nearest `partials`, and the jump would answer with
|
|
172
|
-
* the shallower one. `projectForFile` resolves nesting by depth regardless of kind, so the walk has to
|
|
173
|
-
* as well. A dozen reads is ~80 ms against the 234,000 ms this replaces; correctness is worth more than
|
|
174
|
-
* the remainder.
|
|
175
|
-
*
|
|
176
|
-
* ### A loop, deliberately
|
|
177
|
-
*
|
|
178
|
-
* Iterative, with two independent termination conditions: leaving the root, and `dirnameUri` reaching
|
|
179
|
-
* its own fixed point. A recursive walk over a path that never shortens is a stack overflow in the
|
|
180
|
-
* extension host; a loop that cannot advance simply stops.
|
|
181
|
-
*/
|
|
182
|
-
export async function locateProjectUpward(input) {
|
|
183
|
-
const ignored = input.ignoredPathSegments ?? DEFAULT_IGNORED_PATH_SEGMENTS;
|
|
184
|
-
const root = normalizeUri(input.rootUri);
|
|
185
|
-
// Highest precedence first, so a folder claimed by two kinds resolves by the declared rule rather
|
|
186
|
-
// than by which detector happens to be listed first — the same order the downward scan uses.
|
|
187
|
-
const ordered = [...(input.detectors ?? DEFAULT_DETECTORS)].sort((a, b) => b.precedence - a.precedence);
|
|
188
|
-
const searchable = ordered
|
|
189
|
-
.map((detector) => ({ detector, name: descriptorNameOf(detector) }))
|
|
190
|
-
.filter((entry) => entry.name !== undefined);
|
|
191
|
-
const unsearchable = ordered
|
|
192
|
-
.filter((detector) => descriptorNameOf(detector) === undefined)
|
|
193
|
-
.map((detector) => detector.kind);
|
|
194
|
-
let levels = 0;
|
|
195
|
-
let reads = 0;
|
|
196
|
-
let dir = dirnameUri(normalizeUri(input.fileUri));
|
|
197
|
-
while (dir === root || dir.startsWith(`${root}/`)) {
|
|
198
|
-
levels += 1;
|
|
199
|
-
if (!isIgnoredPath(dir, ignored)) {
|
|
200
|
-
for (const { detector, name } of searchable) {
|
|
201
|
-
// The descriptor here, then one level down through the component folder. The second probe is
|
|
202
|
-
// what makes a file in `<project>/docs/` belong to the project: the profile kind's root is the
|
|
203
|
-
// PARENT of `partials`, so standing at the root the descriptor is not in this directory.
|
|
204
|
-
const candidates = [
|
|
205
|
-
joinUri(dir, name),
|
|
206
|
-
...COMPONENT_DIRS.map((component) => joinUri(dir, component, name)),
|
|
207
|
-
];
|
|
208
|
-
for (const candidate of candidates) {
|
|
209
|
-
reads += 1;
|
|
210
|
-
// `read`, not `exists`: the descriptor's TEXT is needed anyway — for `accepts` and for the
|
|
211
|
-
// project's own record — so asking twice would double the round trips this exists to save.
|
|
212
|
-
const text = await input.reader.read(candidate);
|
|
213
|
-
if (text === undefined)
|
|
214
|
-
continue;
|
|
215
|
-
if (!detector.accepts(candidate, text))
|
|
216
|
-
continue;
|
|
217
|
-
return {
|
|
218
|
-
project: projectFrom(detector, candidate, text),
|
|
219
|
-
levels,
|
|
220
|
-
reads,
|
|
221
|
-
unsearchable,
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
const parent = dirnameUri(dir);
|
|
227
|
-
// The loop's own guard, independent of the prefix test above: `dirnameUri` of a root-most path
|
|
228
|
-
// returns itself, and without this the walk would spin on it forever.
|
|
229
|
-
if (parent === dir)
|
|
230
|
-
break;
|
|
231
|
-
dir = parent;
|
|
232
|
-
}
|
|
233
|
-
return undefined;
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* Find every project under `rootUri`.
|
|
237
|
-
*
|
|
238
|
-
* Projects nest arbitrarily (FR-39) — `001-projects/variux` alone contains 27 — so this globs the
|
|
239
|
-
* whole subtree rather than walking a fixed depth. The ignore list is applied to the glob results
|
|
240
|
-
* BEFORE any file is opened, which is the point: an ignored path must cost nothing to skip.
|
|
241
|
-
*
|
|
242
|
-
* WORKSPACE-WIDE, and therefore expensive: on a monorepo root this is 234 seconds. It answers a
|
|
243
|
-
* question only three features actually ask — workspace symbols, the project picker, and Find
|
|
244
|
-
* References' cold inheritance search (FR-90 AC 3, where the `type: project` edge is declared at the
|
|
245
|
-
* OTHER end and so cannot be read from one project's own files). "Which project is this file in" is
|
|
246
|
-
* `locateProjectUpward`, and must not come from here.
|
|
247
|
-
*/
|
|
248
|
-
export async function discoverProjects(rootUri, reader, options = {}) {
|
|
249
|
-
const ignored = options.ignoredPathSegments ?? DEFAULT_IGNORED_PATH_SEGMENTS;
|
|
250
|
-
const detectors = options.detectors ?? DEFAULT_DETECTORS;
|
|
251
|
-
const keep = (uri) => !isIgnoredPath(uri, ignored);
|
|
252
|
-
// One glob per kind, concurrently. Globbing is the expensive half of Tier 1 and the kinds are
|
|
253
|
-
// independent, so there is no reason to serialize them.
|
|
254
|
-
const hits = await Promise.all(detectors.map(async (detector) => {
|
|
255
|
-
const [descriptors, markers] = await Promise.all([
|
|
256
|
-
reader.glob(rootUri, detector.descriptorGlob),
|
|
257
|
-
detector.scopeMarkerGlob
|
|
258
|
-
? reader.glob(rootUri, detector.scopeMarkerGlob)
|
|
259
|
-
: Promise.resolve([]),
|
|
260
|
-
]);
|
|
261
|
-
// Scope markers are AUTHORITATIVE when any exist, and ignored when none do. That is the
|
|
262
|
-
// priority-then-fallback rule: a workspace that declares its roots means them, and one
|
|
263
|
-
// that has not adopted markers keeps working exactly as before.
|
|
264
|
-
const scopes = markers
|
|
265
|
-
.filter(keep)
|
|
266
|
-
.map((uri) => dirnameUri(normalizeUri(uri)));
|
|
267
|
-
const inScope = (uri) => scopes.length === 0 ||
|
|
268
|
-
scopes.some((root) => uri === root || uri.startsWith(`${root}/`));
|
|
269
|
-
return {
|
|
270
|
-
detector,
|
|
271
|
-
uris: descriptors
|
|
272
|
-
.filter(keep)
|
|
273
|
-
.filter((uri) => inScope(normalizeUri(uri))),
|
|
274
|
-
scopes,
|
|
275
|
-
};
|
|
276
|
-
}));
|
|
277
|
-
// Highest precedence first, so a folder claimed by two kinds resolves by a declared rule
|
|
278
|
-
// rather than by which detector happened to be listed first.
|
|
279
|
-
const ordered = [...hits].sort((a, b) => b.detector.precedence - a.detector.precedence);
|
|
280
|
-
const byId = new Map();
|
|
281
|
-
for (const { detector, uris } of ordered) {
|
|
282
|
-
for (const descriptorUri of uris) {
|
|
283
|
-
const normalized = normalizeUri(descriptorUri);
|
|
284
|
-
const componentPath = detector.componentPathFor(normalized);
|
|
285
|
-
// Keyed by normalized URI (AD-18) so the same project cannot enter twice under two
|
|
286
|
-
// spellings — the failure that would make every downstream count quietly wrong.
|
|
287
|
-
if (byId.has(componentPath))
|
|
288
|
-
continue;
|
|
289
|
-
const descriptorText = await reader.read(normalized);
|
|
290
|
-
// A glob hit that cannot be read is skipped rather than fatal. One unreadable file must
|
|
291
|
-
// not cost the developer every other project.
|
|
292
|
-
if (descriptorText === undefined)
|
|
293
|
-
continue;
|
|
294
|
-
// The shape check a filename cannot express.
|
|
295
|
-
if (!detector.accepts(normalized, descriptorText))
|
|
296
|
-
continue;
|
|
297
|
-
byId.set(componentPath, projectFrom(detector, normalized, descriptorText));
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
// Sorted by identity: the index is compared between versions and shown in pickers, and an
|
|
301
|
-
// order that varied with filesystem traversal would make both jitter for no reason.
|
|
302
|
-
return [...byId.values()].sort((a, b) => a.id < b.id ? -1 : a.id > b.id ? 1 : 0);
|
|
303
|
-
}
|
|
304
|
-
/**
|
|
305
|
-
* The project owning `fileUri`, or `undefined` when none does.
|
|
306
|
-
*
|
|
307
|
-
* Deepest match wins. Projects nest, so a file inside `variux/maileg-2025/eu` belongs to `eu` and
|
|
308
|
-
* not to `variux` — the nearest enclosing project is the boundary that actually governs it.
|
|
309
|
-
*/
|
|
310
|
-
export function projectForFile(fileUri, projects) {
|
|
311
|
-
const target = normalizeUri(fileUri);
|
|
312
|
-
let best;
|
|
313
|
-
for (const project of projects) {
|
|
314
|
-
// The project root is the parent of `partials`, so ownership is tested against that, not
|
|
315
|
-
// against componentPath — otherwise a file in `<project>/docs/` would look project-less.
|
|
316
|
-
const root = projectRootOf(project);
|
|
317
|
-
const prefix = root.endsWith('/') ? root : `${root}/`;
|
|
318
|
-
if (target !== root && !target.startsWith(prefix))
|
|
319
|
-
continue;
|
|
320
|
-
if (!best || projectRootOf(best).length < root.length)
|
|
321
|
-
best = project;
|
|
322
|
-
}
|
|
323
|
-
return best;
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* The project's own folder.
|
|
327
|
-
*
|
|
328
|
-
* For a profile that is the parent of `partials`/`partial`, because `main.yaml` lives one level
|
|
329
|
-
* down. A connector root holds its marker directly, so it IS its own folder — applying the
|
|
330
|
-
* partials rule there would hand ownership of the connector folder to its parent.
|
|
331
|
-
*/
|
|
332
|
-
export function projectRootOf(project, detectors = DEFAULT_DETECTORS) {
|
|
333
|
-
// Asked of the detector, not branched on the kind — that branch is exactly what would need
|
|
334
|
-
// editing for every kind added.
|
|
335
|
-
return (detectorFor(project.kind, detectors)?.rootFor(project.componentPath) ??
|
|
336
|
-
project.componentPath);
|
|
337
|
-
}
|
|
338
|
-
/** What a project of this kind can do — the question callers should ask instead of its name. */
|
|
339
|
-
export function capabilitiesOf(project, detectors = DEFAULT_DETECTORS) {
|
|
340
|
-
return (detectorFor(project.kind, detectors)?.capabilities ?? {
|
|
341
|
-
composes: false,
|
|
342
|
-
composesDescription: true,
|
|
343
|
-
inherits: false,
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
/**
|
|
347
|
-
* Re-read ONE project's `main.yaml` and return an updated project list (Story 2.5 AC 1).
|
|
348
|
-
*
|
|
349
|
-
* The AC requires that a change to one `main.yaml` rebuilds that project's entry and its edges
|
|
350
|
-
* "and unaffected projects are not". A full re-glob reads every `main.yaml` in the workspace —
|
|
351
|
-
* 113 of them on the real corpus, for one keystroke — so this exists to read exactly one.
|
|
352
|
-
*
|
|
353
|
-
* Returns the ORIGINAL array unchanged when nothing moved, so a caller can skip publishing a
|
|
354
|
-
* new version and avoid churning every consumer's cached view for a no-op save.
|
|
355
|
-
*/
|
|
356
|
-
export async function rediscoverProject(mainYamlUri, reader, projects, options = {}) {
|
|
357
|
-
const ignored = options.ignoredPathSegments ?? DEFAULT_IGNORED_PATH_SEGMENTS;
|
|
358
|
-
const normalized = normalizeUri(mainYamlUri);
|
|
359
|
-
if (isIgnoredPath(normalized, ignored))
|
|
360
|
-
return projects;
|
|
361
|
-
const componentPath = dirnameUri(normalized);
|
|
362
|
-
const existingIndex = projects.findIndex((p) => p.id === componentPath);
|
|
363
|
-
const descriptorText = await reader.read(normalized);
|
|
364
|
-
if (descriptorText === undefined) {
|
|
365
|
-
// Deleted. Absent from the list already means nothing to do.
|
|
366
|
-
if (existingIndex < 0)
|
|
367
|
-
return projects;
|
|
368
|
-
return projects.filter((_, i) => i !== existingIndex);
|
|
369
|
-
}
|
|
370
|
-
const entry = {
|
|
371
|
-
// The incremental path is driven by the `main.yaml` watcher, so what it re-reads is a
|
|
372
|
-
// profile descriptor. A connector marker change re-globs, since markers are rare and a
|
|
373
|
-
// new one can appear anywhere.
|
|
374
|
-
kind: 'profile',
|
|
375
|
-
id: componentPath,
|
|
376
|
-
name: projectNameFor(componentPath),
|
|
377
|
-
componentPath,
|
|
378
|
-
descriptorPath: normalized,
|
|
379
|
-
descriptorText,
|
|
380
|
-
};
|
|
381
|
-
if (existingIndex >= 0) {
|
|
382
|
-
// Unchanged content: hand back the same array so the caller can tell nothing happened.
|
|
383
|
-
if (projects[existingIndex].descriptorText === descriptorText)
|
|
384
|
-
return projects;
|
|
385
|
-
const next = [...projects];
|
|
386
|
-
next[existingIndex] = entry;
|
|
387
|
-
return next;
|
|
388
|
-
}
|
|
389
|
-
// New project. Inserted in sorted position rather than appended, because the whole list is
|
|
390
|
-
// ordered by identity and a consumer comparing two versions should not see it jump.
|
|
391
|
-
const next = [...projects, entry];
|
|
392
|
-
return next.sort((a, b) => (a.id < b.id ? -1 : a.id > b.id ? 1 : 0));
|
|
393
|
-
}
|
|
394
|
-
//# sourceMappingURL=discovery.js.map
|
package/dist/discovery.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"discovery.js","sourceRoot":"","sources":["../src/discovery.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AU;QAC1B,cAAc;KACf,CAAC;IAEF,IAAI,aAAa,IAAI,CAAC,EAAE,CAAC;QACvB,uFAAuF;QACvF,IAAI,QAAQ,CAAC,aAAa,CAAE,CAAC,cAAc,KAAK,cAAc;YAC5D,OAAO,QAAQ,CAAC;QAClB,MAAM,IAAI,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC;QAC3B,IAAI,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,2FAA2F;IAC3F,oFAAoF;IACpF,MAAM,IAAI,GAAG,CAAC,GAAG,QAAQ,EAAE,KAAK,CAAC,CAAC;IAClC,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,CAAC"}
|
package/dist/effectiveGraph.d.ts
DELETED
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
import type { TemplateReader } from '@beehexa/hexasync-template-ports';
|
|
2
|
-
import { type ComposeSources, type ProjectVariableSet, type ResolverIO, type WorklistItem, type LibraryVariableSet, type VariableProvenance, type OverwriteRecord } from '@beehexa/hexasync-template-compose';
|
|
3
|
-
/**
|
|
4
|
-
* Collections whose entries are components.
|
|
5
|
-
*
|
|
6
|
-
* Re-exported from the composer rather than re-declared. The two lists were byte-identical, and
|
|
7
|
-
* two answers to "which top-level keys are directives rather than components" is one too many:
|
|
8
|
-
* the day a new directive is added to the merge engine, an independent copy here would start
|
|
9
|
-
* reporting it as authored data in every query and search.
|
|
10
|
-
*/
|
|
11
|
-
export { DIRECTIVE_KEYS } from '@beehexa/hexasync-template-compose';
|
|
12
|
-
/** Where a component came from, which is what makes an inherited one navigable. */
|
|
13
|
-
export interface ComponentProvenance {
|
|
14
|
-
/** The project that DECLARED it — the library or ancestor, not the inheritor. */
|
|
15
|
-
readonly project: string;
|
|
16
|
-
/** 0 = this project's own; higher = further up the inheritance chain. */
|
|
17
|
-
readonly generation: number;
|
|
18
|
-
/** The file it truly lives in. */
|
|
19
|
-
readonly sourceFile: string;
|
|
20
|
-
/**
|
|
21
|
-
* True when this component overrode an INHERITED one — a definition at a higher generation.
|
|
22
|
-
*
|
|
23
|
-
* Computed from generations, not from a count. It was `seen > 1`, which is a different statement:
|
|
24
|
-
* a component declared twice inside one project, with no inheritance anywhere, reported
|
|
25
|
-
* `overrides: true`. The covering test used a genuine inheritance case, so it passed under either
|
|
26
|
-
* meaning and could not tell them apart.
|
|
27
|
-
*/
|
|
28
|
-
readonly overrides: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* True when the identity was defined more than once anywhere in the worklist.
|
|
31
|
-
*
|
|
32
|
-
* The old meaning of `overrides`, kept because it is independently useful — Phase 2's
|
|
33
|
-
* wholesale-overwrite rule is about redefinition regardless of generation — and separated because
|
|
34
|
-
* conflating "someone else also declared this" with "I overrode my ancestor" makes both unusable.
|
|
35
|
-
*/
|
|
36
|
-
readonly redefined: boolean;
|
|
37
|
-
}
|
|
38
|
-
export interface EffectiveComponent {
|
|
39
|
-
/** Collection it belongs to — `objects`, `pullers`, `pushers`, … */
|
|
40
|
-
readonly collection: string;
|
|
41
|
-
/** Token-form id or key. Substitution-independent by design. */
|
|
42
|
-
readonly id: string;
|
|
43
|
-
/** The component's value, token form. */
|
|
44
|
-
readonly value: unknown;
|
|
45
|
-
readonly provenance: ComponentProvenance;
|
|
46
|
-
}
|
|
47
|
-
export interface EffectiveGraph {
|
|
48
|
-
readonly projectId: string;
|
|
49
|
-
/** The project's `partials` folder — the merge base's directory. */
|
|
50
|
-
readonly componentPath: string;
|
|
51
|
-
/** What this project's own files declare, before inheritance. */
|
|
52
|
-
readonly authored: readonly EffectiveComponent[];
|
|
53
|
-
/** What the project actually contains, after inheritance and precedence. */
|
|
54
|
-
readonly effective: readonly EffectiveComponent[];
|
|
55
|
-
/**
|
|
56
|
-
* The composed document itself, in TOKEN form — before variable substitution.
|
|
57
|
-
*
|
|
58
|
-
* Retained rather than discarded because the validation rules read the DOCUMENT, not a component
|
|
59
|
-
* list: `referenceRule` and its siblings walk `ctx.tokenForm`. Re-deriving a document by grouping
|
|
60
|
-
* `effective` back into collections would be a second implementation of "what did compose produce",
|
|
61
|
-
* and this epic has already paid for that mistake twice — the editor and the CLI would then disagree
|
|
62
|
-
* about validity, which is precisely what NFR-2 and counter-metric C3 forbid.
|
|
63
|
-
*
|
|
64
|
-
* Costs nothing: it is the same object the components were collected from, not a copy. Frozen with
|
|
65
|
-
* the rest of the snapshot, so a rule cannot mutate what a later rule reads.
|
|
66
|
-
*/
|
|
67
|
-
readonly mergedValue: unknown;
|
|
68
|
-
/** The assembled variable pool, for point-wise resolution (Story 3.3). */
|
|
69
|
-
readonly variables: Record<string, unknown>;
|
|
70
|
-
/**
|
|
71
|
-
* Where each variable's winning value came from, and what it shadows (Story 2.6, FR-78).
|
|
72
|
-
*
|
|
73
|
-
* Carried on the graph rather than derived by a consumer, because it comes from the same pass that builds
|
|
74
|
-
* `variables` — see `assembleVariablesWithProvenance`. A consumer computing it separately would be a
|
|
75
|
-
* second answer to "which set wins".
|
|
76
|
-
*/
|
|
77
|
-
readonly variableProvenance: Record<string, VariableProvenance>;
|
|
78
|
-
readonly variableSets: readonly ProjectVariableSet[];
|
|
79
|
-
/**
|
|
80
|
-
* `variables.yaml` files DISCOVERED by the component glob but never admitted to the pool.
|
|
81
|
-
*
|
|
82
|
-
* Only the resolver knows this: by the time anything sees the composed output, an unadmitted file
|
|
83
|
-
* is indistinguishable from one that defined nothing. Carried here because VAR-3 and VAR-4 report
|
|
84
|
-
* on it, and a graph that dropped it made the editor silently find FEWER issues than the CLI on the
|
|
85
|
-
* same project — which counter-metric C3 forbids, and which the parity test caught.
|
|
86
|
-
*/
|
|
87
|
-
readonly unadmittedVariableFiles: readonly string[];
|
|
88
|
-
/**
|
|
89
|
-
* The variable declarations of every component library this project borrows a file from (Story 1.8).
|
|
90
|
-
*
|
|
91
|
-
* Only the resolver can know them: they are located from the worklist, which is the only record
|
|
92
|
-
* that this project reads a file from somewhere else. Carried here for the same reason
|
|
93
|
-
* `unadmittedVariableFiles` is — a rule reports on them, and a graph that dropped them would make
|
|
94
|
-
* the editor find fewer issues than the CLI, which C3 forbids.
|
|
95
|
-
*/
|
|
96
|
-
readonly libraryVariableSets: readonly LibraryVariableSet[];
|
|
97
|
-
/**
|
|
98
|
-
* Wholesale array overwrites that DROPPED inherited components (Story 1.9).
|
|
99
|
-
*
|
|
100
|
-
* The one inheritance loss that leaves nothing to point at: an override array whose items carry no
|
|
101
|
-
* `id`, so the merge cannot match element-by-element and replaces the whole array. The dropped
|
|
102
|
-
* components are simply absent from the merged document — no `!` removal, no duplicate, nothing a
|
|
103
|
-
* rule reading the document could notice. Collected here through the merge's `onOverwrite` hook,
|
|
104
|
-
* from the same records the CLI's merge-integrity report has always used.
|
|
105
|
-
*/
|
|
106
|
-
readonly overwrites: readonly OverwriteRecord[];
|
|
107
|
-
/** The worklist that produced it, in merge order — Story 3.5 re-merges from a prefix. */
|
|
108
|
-
readonly worklist: readonly WorklistItem[];
|
|
109
|
-
/** Prefetched file text, so a re-merge costs no IO. */
|
|
110
|
-
readonly sources: ComposeSources;
|
|
111
|
-
/**
|
|
112
|
-
* The document version of every file this was built from (AD-7a).
|
|
113
|
-
*
|
|
114
|
-
* A consumer validating text at version N can tell whether the graph it holds was built from
|
|
115
|
-
* that text or from something older. Without it, a stale answer is indistinguishable from a
|
|
116
|
-
* fresh one — which is exactly the confusion AD-7a exists to prevent.
|
|
117
|
-
*/
|
|
118
|
-
readonly watermark: ReadonlyMap<string, number>;
|
|
119
|
-
/**
|
|
120
|
-
* Retained prefix checkpoints, ascending (Story 3.5). Empty when capture was not asked for.
|
|
121
|
-
*
|
|
122
|
-
* Kept ON the graph rather than beside it so they are evicted with it: a checkpoint outliving
|
|
123
|
-
* the graph it belongs to is a checkpoint that can be resumed onto a worklist that has moved.
|
|
124
|
-
*/
|
|
125
|
-
readonly checkpoints: readonly GraphCheckpoint[];
|
|
126
|
-
/**
|
|
127
|
-
* The worklist index the fold started at, when this graph was resumed from a checkpoint.
|
|
128
|
-
*
|
|
129
|
-
* Absent on a full build. Present so the saving is REPORTABLE — NFR-6a asks for a measured
|
|
130
|
-
* figure, and "it was fast" is not a measurement of how much work was skipped.
|
|
131
|
-
*/
|
|
132
|
-
readonly resumedFrom?: number;
|
|
133
|
-
}
|
|
134
|
-
/** The merge state after one worklist position, enough to resume from (Story 3.5). */
|
|
135
|
-
export interface GraphCheckpoint {
|
|
136
|
-
/** The last worklist index folded into `merged`. */
|
|
137
|
-
readonly index: number;
|
|
138
|
-
/** A deep COPY of the accumulated document — the live one goes on being mutated. */
|
|
139
|
-
readonly merged: unknown;
|
|
140
|
-
/** How much of `authored` had been collected by this point. */
|
|
141
|
-
readonly authoredCount: number;
|
|
142
|
-
/** Winning-definition provenance as it stood, so a resume need not rewalk the prefix. */
|
|
143
|
-
readonly winningSource: ReadonlyMap<string, WinningSource>;
|
|
144
|
-
/**
|
|
145
|
-
* Wholesale losses observed in the PREFIX (Story 1.9).
|
|
146
|
-
*
|
|
147
|
-
* Retained because a resume re-merges only the suffix and therefore only re-observes the suffix's
|
|
148
|
-
* losses. Carrying the previous graph's full set forward instead would keep reporting a loss the
|
|
149
|
-
* developer has just fixed — the finding would survive its own cause, which is what makes a
|
|
150
|
-
* diagnostic untrustworthy. Prefix + freshly-observed suffix is the whole set and nothing else.
|
|
151
|
-
*/
|
|
152
|
-
readonly overwrites: readonly OverwriteRecord[];
|
|
153
|
-
}
|
|
154
|
-
/** Where an identity's winning definition came from, and how many times it was defined. */
|
|
155
|
-
type WinningSource = Omit<ComponentProvenance, 'overrides' | 'redefined'> & {
|
|
156
|
-
seen: number;
|
|
157
|
-
/**
|
|
158
|
-
* The HIGHEST generation any definition of this identity came from.
|
|
159
|
-
*
|
|
160
|
-
* Kept so `overrides` can mean what it says. The merge folds ancestors first and the project's own
|
|
161
|
-
* files last, so the winner has the lowest generation; a winner whose generation is below this
|
|
162
|
-
* maximum is one that beat an inherited definition.
|
|
163
|
-
*/
|
|
164
|
-
maxGeneration: number;
|
|
165
|
-
};
|
|
166
|
-
/** How the host reports the version of an open document. Absent means "as on disk". */
|
|
167
|
-
export type DocumentVersionLookup = (uri: string) => number | undefined;
|
|
168
|
-
export interface BuildEffectiveGraphOptions {
|
|
169
|
-
readonly io: ResolverIO;
|
|
170
|
-
readonly reader: TemplateReader;
|
|
171
|
-
readonly documentVersion?: DocumentVersionLookup;
|
|
172
|
-
/**
|
|
173
|
-
* Retain prefix checkpoints so later edits re-merge incrementally (Story 3.5).
|
|
174
|
-
*
|
|
175
|
-
* Off by default, and deliberately so: capture costs one deep copy per retained position and
|
|
176
|
-
* holds them for the life of the graph. A caller that composes once — the CLI — should pay
|
|
177
|
-
* neither. The editor turns it on for the project being worked in.
|
|
178
|
-
*/
|
|
179
|
-
readonly checkpoints?: boolean | {
|
|
180
|
-
readonly max?: number;
|
|
181
|
-
};
|
|
182
|
-
/**
|
|
183
|
-
* Text the HOST holds that the disk does not — unsaved editor buffers.
|
|
184
|
-
*
|
|
185
|
-
* Without this a rebuild reads through `io`/`reader` and therefore reads the file as SAVED,
|
|
186
|
-
* so an edit to an unsaved `variables.yaml` republishes the old pool under a fresh version and
|
|
187
|
-
* an up-to-date watermark: precisely the false freshness AD-7a exists to prevent. The cursor
|
|
188
|
-
* already resolves against the editor's text (Story 3.7); the build must not disagree with it.
|
|
189
|
-
*/
|
|
190
|
-
readonly overlay?: ReadonlyMap<string, string>;
|
|
191
|
-
}
|
|
192
|
-
/**
|
|
193
|
-
* Serve the host's text for any file it has newer than disk, and fall through for the rest.
|
|
194
|
-
*
|
|
195
|
-
* Exported (Story 2.2 of the extension's Phase 4) because an editor-initiated compose needs exactly
|
|
196
|
-
* this and a second copy would be free to disagree about the one clause that is easy to get wrong:
|
|
197
|
-
* `exists` must be true for a file the overlay holds, or an unsaved file reads as absent.
|
|
198
|
-
*/
|
|
199
|
-
export declare function overlayReader(base: TemplateReader, texts: ReadonlyMap<string, string>): TemplateReader;
|
|
200
|
-
/**
|
|
201
|
-
* Build one project's effective graph.
|
|
202
|
-
*
|
|
203
|
-
* Goes through the composer rather than reimplementing merge, so the graph and the artefact
|
|
204
|
-
* `compose` produces cannot drift — NFR-1's rule that the editor invents no semantics the
|
|
205
|
-
* runtime lacks is only true if there is one implementation of them.
|
|
206
|
-
*/
|
|
207
|
-
export declare function buildEffectiveGraph(projectId: string, componentPath: string, mainYml: string, options: BuildEffectiveGraphOptions): Promise<EffectiveGraph>;
|
|
208
|
-
/**
|
|
209
|
-
* Rebuild a graph after an edit, resuming from a retained prefix checkpoint (Story 3.5, FR-46).
|
|
210
|
-
*
|
|
211
|
-
* Returns `undefined` when the change cannot be applied incrementally, rather than guessing.
|
|
212
|
-
* The caller then does a full build — which is always correct, so every case this declines is a
|
|
213
|
-
* case that stays right rather than a case that breaks.
|
|
214
|
-
*
|
|
215
|
-
* `updates` carries the new text of each changed file. Nothing is read here: an incremental
|
|
216
|
-
* re-merge that went back to the filesystem would be reading the very files the editor already
|
|
217
|
-
* holds newer versions of.
|
|
218
|
-
*/
|
|
219
|
-
export declare function resumeEffectiveGraph(graph: EffectiveGraph,
|
|
220
|
-
/**
|
|
221
|
-
* The checkpoints to resume from — passed in rather than read off the graph.
|
|
222
|
-
*
|
|
223
|
-
* They are the heaviest thing the build produces and the only part a holder may want to drop
|
|
224
|
-
* independently of the graph itself (AD-10's last-good snapshot is worth keeping long after
|
|
225
|
-
* its checkpoints are worth their memory). Making the holder name them is what lets the Tier 2
|
|
226
|
-
* service bound them to the project being edited while every hot graph stays whole.
|
|
227
|
-
*/
|
|
228
|
-
checkpoints: readonly GraphCheckpoint[], updates: ReadonlyMap<string, string>, options?: {
|
|
229
|
-
readonly documentVersion?: DocumentVersionLookup;
|
|
230
|
-
/**
|
|
231
|
-
* The same budget the graph was BUILT with.
|
|
232
|
-
*
|
|
233
|
-
* Passed in rather than defaulted: a holder configured for four checkpoints that resumed
|
|
234
|
-
* against eight would mix two schedules and quietly exceed its own bound.
|
|
235
|
-
*/
|
|
236
|
-
readonly maxCheckpoints?: number;
|
|
237
|
-
}): EffectiveGraph | undefined;
|
|
238
|
-
/** The directory a project's files live under — used to scope watchers. */
|
|
239
|
-
export declare const projectFolderOf: (componentPath: string) => string;
|
|
240
|
-
//# sourceMappingURL=effectiveGraph.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"effectiveGraph.d.ts","sourceRoot":"","sources":["../src/effectiveGraph.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAQL,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACrB,MAAM,oCAAoC,CAAC;AAO5C;;;;;;;GAOG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEpE,mFAAmF;AACnF,MAAM,WAAW,mBAAmB;IAClC,iFAAiF;IACjF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,yEAAyE;IACzE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,kCAAkC;IAClC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B;;;;;;;OAOG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B;;;;;;OAMG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,kBAAkB;IACjC,oEAAoE;IACpE,QAAQ,CAA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