@goodbones/core 0.1.0-beta.3 → 0.1.0-beta.5
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/build/dts/core/coverage.d.ts +14 -0
- package/build/dts/core/coverage.d.ts.map +1 -1
- package/build/dts/core/graph.d.ts +2 -0
- package/build/dts/core/graph.d.ts.map +1 -1
- package/build/dts/core/imports.d.ts +3 -1
- package/build/dts/core/imports.d.ts.map +1 -1
- package/build/dts/core/slack.d.ts +10 -0
- package/build/dts/core/slack.d.ts.map +1 -0
- package/build/dts/domain/architecture-config.d.ts +13 -0
- package/build/dts/domain/architecture-config.d.ts.map +1 -1
- package/build/dts/domain/snapshot.d.ts +121 -0
- package/build/dts/domain/snapshot.d.ts.map +1 -0
- package/build/dts/index.d.ts +8 -5
- package/build/dts/index.d.ts.map +1 -1
- package/build/dts/infrastructure/walk.d.ts +6 -0
- package/build/dts/infrastructure/walk.d.ts.map +1 -1
- package/build/dts/manifest/compile.d.ts.map +1 -1
- package/build/dts/manifest/infer.d.ts +55 -0
- package/build/dts/manifest/infer.d.ts.map +1 -0
- package/build/dts/ports/language.d.ts +2 -0
- package/build/dts/ports/language.d.ts.map +1 -1
- package/build/esm/core/coverage.js +72 -32
- package/build/esm/core/coverage.js.map +1 -1
- package/build/esm/core/graph.js +45 -0
- package/build/esm/core/graph.js.map +1 -1
- package/build/esm/core/imports.js +14 -9
- package/build/esm/core/imports.js.map +1 -1
- package/build/esm/core/slack.js +39 -0
- package/build/esm/core/slack.js.map +1 -0
- package/build/esm/domain/architecture-config.js +19 -0
- package/build/esm/domain/architecture-config.js.map +1 -1
- package/build/esm/domain/snapshot.js +95 -0
- package/build/esm/domain/snapshot.js.map +1 -0
- package/build/esm/index.js +7 -4
- package/build/esm/index.js.map +1 -1
- package/build/esm/infrastructure/walk.js +57 -1
- package/build/esm/infrastructure/walk.js.map +1 -1
- package/build/esm/manifest/compile.js +25 -21
- package/build/esm/manifest/compile.js.map +1 -1
- package/build/esm/manifest/infer.js +455 -0
- package/build/esm/manifest/infer.js.map +1 -0
- package/package.json +3 -1
- package/schema/conformance.schema.json +457 -0
- package/src/core/coverage.ts +111 -34
- package/src/core/graph.ts +48 -0
- package/src/core/imports.ts +29 -13
- package/src/core/slack.ts +62 -0
- package/src/domain/architecture-config.ts +21 -0
- package/src/domain/snapshot.ts +180 -0
- package/src/index.ts +38 -1
- package/src/infrastructure/walk.ts +70 -1
- package/src/manifest/compile.ts +34 -27
- package/src/manifest/infer.ts +643 -0
- package/src/ports/language.ts +11 -0
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// Paths
|
|
3
|
+
const dirnameOf = (file) => {
|
|
4
|
+
const at = file.lastIndexOf("/");
|
|
5
|
+
return at === -1 ? "" : file.slice(0, at);
|
|
6
|
+
};
|
|
7
|
+
const basenameOf = (file) => file.slice(file.lastIndexOf("/") + 1);
|
|
8
|
+
// `folder` is `p` or an ancestor of it. The empty folder is every path's.
|
|
9
|
+
const isUnder = (p, folder) => folder === "" || p === folder || p.startsWith(`${folder}/`);
|
|
10
|
+
const depthBelow = (p, folder) => p === folder ? 0 : (folder === "" ? p : p.slice(folder.length + 1)).split("/").length;
|
|
11
|
+
const sorted = (items) => [...items].sort();
|
|
12
|
+
const memberOf = (p, generalize) => {
|
|
13
|
+
for (const group of generalize) {
|
|
14
|
+
for (const member of group.members) {
|
|
15
|
+
const folder = group.parent === "" ? member : `${group.parent}/${member}`;
|
|
16
|
+
if (isUnder(p, folder))
|
|
17
|
+
return { group, member };
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return null;
|
|
21
|
+
};
|
|
22
|
+
const capturedPathOf = (group) => group.parent === "" ? `{${group.capture}}` : `${group.parent}/{${group.capture}}`;
|
|
23
|
+
const rewrite = (p, generalize) => {
|
|
24
|
+
const membership = memberOf(p, generalize);
|
|
25
|
+
if (membership === null)
|
|
26
|
+
return p;
|
|
27
|
+
const { group, member } = membership;
|
|
28
|
+
const folder = group.parent === "" ? member : `${group.parent}/${member}`;
|
|
29
|
+
const captured = capturedPathOf(group);
|
|
30
|
+
return p === folder ? captured : `${captured}${p.slice(folder.length)}`;
|
|
31
|
+
};
|
|
32
|
+
const folderAt = (root, p) => {
|
|
33
|
+
if (p === root.path)
|
|
34
|
+
return root;
|
|
35
|
+
const rest = root.path === "" ? p : p.slice(root.path.length + 1);
|
|
36
|
+
let at = root;
|
|
37
|
+
for (const segment of rest.split("/")) {
|
|
38
|
+
const existing = at.children.get(segment);
|
|
39
|
+
if (existing !== undefined) {
|
|
40
|
+
at = existing;
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
const made = {
|
|
44
|
+
path: at.path === "" ? segment : `${at.path}/${segment}`,
|
|
45
|
+
name: segment,
|
|
46
|
+
files: [],
|
|
47
|
+
children: new Map(),
|
|
48
|
+
};
|
|
49
|
+
at.children.set(segment, made);
|
|
50
|
+
at = made;
|
|
51
|
+
}
|
|
52
|
+
return at;
|
|
53
|
+
};
|
|
54
|
+
const trieOf = (input, generalize) => {
|
|
55
|
+
const roots = input.roots.map((root) => ({
|
|
56
|
+
path: root,
|
|
57
|
+
name: basenameOf(root),
|
|
58
|
+
files: [],
|
|
59
|
+
children: new Map(),
|
|
60
|
+
}));
|
|
61
|
+
for (const file of input.files) {
|
|
62
|
+
const folder = rewrite(dirnameOf(file), generalize);
|
|
63
|
+
const root = roots.find((one) => isUnder(folder, one.path));
|
|
64
|
+
if (root === undefined)
|
|
65
|
+
continue;
|
|
66
|
+
folderAt(root, folder).files.push(file);
|
|
67
|
+
}
|
|
68
|
+
return roots;
|
|
69
|
+
};
|
|
70
|
+
const basesOf = (input, generalize) => {
|
|
71
|
+
const all = new Set(input.roots);
|
|
72
|
+
for (const one of input.packages) {
|
|
73
|
+
all.add(rewrite(one.root, generalize));
|
|
74
|
+
if (one.source !== null)
|
|
75
|
+
all.add(rewrite(one.source, generalize));
|
|
76
|
+
}
|
|
77
|
+
return { all: sorted(all) };
|
|
78
|
+
};
|
|
79
|
+
const baseOf = (folder, bases) => {
|
|
80
|
+
let best = null;
|
|
81
|
+
for (const base of bases.all) {
|
|
82
|
+
if (!isUnder(folder, base))
|
|
83
|
+
continue;
|
|
84
|
+
if (best === null || base.length > best.length)
|
|
85
|
+
best = base;
|
|
86
|
+
}
|
|
87
|
+
return best ?? "";
|
|
88
|
+
};
|
|
89
|
+
// A folder is a node when it is within `depth` of the base it counts from, or
|
|
90
|
+
// when it lies on the way to one — the folders between a walk root and a
|
|
91
|
+
// package are structure, and a node each whatever the depth.
|
|
92
|
+
const isNode = (folder, input, bases) => input.roots.includes(folder.path) ||
|
|
93
|
+
bases.all.some((base) => isUnder(base, folder.path)) ||
|
|
94
|
+
depthBelow(folder.path, baseOf(folder.path, bases)) <= input.depth;
|
|
95
|
+
const nodeOf = (folder, input, bases) => {
|
|
96
|
+
const node = {
|
|
97
|
+
path: folder.path,
|
|
98
|
+
key: `${folder.name}/`,
|
|
99
|
+
folder,
|
|
100
|
+
files: [...folder.files],
|
|
101
|
+
children: new Map(),
|
|
102
|
+
stray: false,
|
|
103
|
+
allow: new Set(),
|
|
104
|
+
external: new Set(),
|
|
105
|
+
edges: 0,
|
|
106
|
+
};
|
|
107
|
+
const absorb = (from) => {
|
|
108
|
+
for (const child of from.children.values()) {
|
|
109
|
+
if (isNode(child, input, bases)) {
|
|
110
|
+
node.children.set(child.name, nodeOf(child, input, bases));
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
node.stray = true;
|
|
114
|
+
for (const file of child.files)
|
|
115
|
+
node.files.push(file);
|
|
116
|
+
absorb(child);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
absorb(folder);
|
|
121
|
+
return node;
|
|
122
|
+
};
|
|
123
|
+
// The deepest node whose folder holds `p` (a rewritten path), or null when
|
|
124
|
+
// no walk root does.
|
|
125
|
+
const governorOf = (p, roots) => {
|
|
126
|
+
const root = roots.find((one) => isUnder(p, one.path));
|
|
127
|
+
if (root === undefined)
|
|
128
|
+
return null;
|
|
129
|
+
const descend = (at) => {
|
|
130
|
+
for (const child of at.children.values())
|
|
131
|
+
if (isUnder(p, child.path))
|
|
132
|
+
return descend(child);
|
|
133
|
+
return at;
|
|
134
|
+
};
|
|
135
|
+
return descend(root);
|
|
136
|
+
};
|
|
137
|
+
const eachNode = (roots, visit) => {
|
|
138
|
+
const walk = (node) => {
|
|
139
|
+
visit(node);
|
|
140
|
+
for (const child of node.children.values())
|
|
141
|
+
walk(child);
|
|
142
|
+
};
|
|
143
|
+
for (const root of roots)
|
|
144
|
+
walk(root);
|
|
145
|
+
};
|
|
146
|
+
// ---------------------------------------------------------------------------
|
|
147
|
+
// Allow sets.
|
|
148
|
+
// What a local target is written as: the node that governs it, as a glob. A
|
|
149
|
+
// file directly in a node that has children of its own is `node/*` — the
|
|
150
|
+
// layer's own files, such as a barrel, and not the tiers beneath — and
|
|
151
|
+
// anything else is `node/**`. A capture in that path survives only when the
|
|
152
|
+
// importer is in the same member; from anywhere else it is `*`.
|
|
153
|
+
const entryFor = (importer, target, roots, generalize) => {
|
|
154
|
+
const rewritten = rewrite(target, generalize);
|
|
155
|
+
const node = governorOf(rewritten, roots);
|
|
156
|
+
if (node === null)
|
|
157
|
+
return target;
|
|
158
|
+
const from = memberOf(importer, generalize);
|
|
159
|
+
const to = memberOf(target, generalize);
|
|
160
|
+
const sameGroup = from !== null &&
|
|
161
|
+
to !== null &&
|
|
162
|
+
from.group.parent === to.group.parent &&
|
|
163
|
+
from.group.capture === to.group.capture;
|
|
164
|
+
if (to !== null && sameGroup && to.member !== from.member) {
|
|
165
|
+
const reach = to.group.crossReach;
|
|
166
|
+
const folder = to.group.parent === "" ? to.member : `${to.group.parent}/${to.member}`;
|
|
167
|
+
if (reach !== null && target === `${folder}/${reach}`) {
|
|
168
|
+
return `${to.group.parent === "" ? "" : `${to.group.parent}/`}*/${reach}`;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
const direct = dirnameOf(rewritten) === node.path && node.children.size > 0;
|
|
172
|
+
const glob = `${node.path}/${direct ? "*" : "**"}`;
|
|
173
|
+
if (to === null)
|
|
174
|
+
return glob;
|
|
175
|
+
const sameMember = sameGroup && from.member === to.member;
|
|
176
|
+
return sameMember ? glob : glob.replace(`{${to.group.capture}}`, "*");
|
|
177
|
+
};
|
|
178
|
+
const fillAllowSets = (roots, input, generalize) => {
|
|
179
|
+
eachNode(roots, (node) => {
|
|
180
|
+
for (const file of node.files) {
|
|
181
|
+
for (const target of input.targetsOf(file)) {
|
|
182
|
+
node.edges += 1;
|
|
183
|
+
switch (target.kind) {
|
|
184
|
+
case "local":
|
|
185
|
+
node.allow.add(entryFor(file, target.path, roots, generalize));
|
|
186
|
+
break;
|
|
187
|
+
case "builtin":
|
|
188
|
+
node.allow.add(target.path);
|
|
189
|
+
break;
|
|
190
|
+
case "external":
|
|
191
|
+
node.external.add(target.package);
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
};
|
|
198
|
+
// ---------------------------------------------------------------------------
|
|
199
|
+
// Candidates: siblings that share a shape.
|
|
200
|
+
// `auth.module.ts` and `user.module.ts` are one kind of file; `index.ts` is
|
|
201
|
+
// its own. The first segment is the name, the rest is what it is.
|
|
202
|
+
const stereotypeOf = (file) => {
|
|
203
|
+
const parts = basenameOf(file).split(".");
|
|
204
|
+
return parts.length >= 3 ? `*.${parts.slice(1).join(".")}` : basenameOf(file);
|
|
205
|
+
};
|
|
206
|
+
const intersect = (a, b) => sorted([...a].filter((one) => b.has(one)));
|
|
207
|
+
const alike = (a, b) => {
|
|
208
|
+
if (intersect(a.folders, b.folders).length >= 2)
|
|
209
|
+
return true;
|
|
210
|
+
const union = new Set([...a.stereotypes, ...b.stereotypes]);
|
|
211
|
+
return union.size > 0 && intersect(a.stereotypes, b.stereotypes).length / union.size >= 0.5;
|
|
212
|
+
};
|
|
213
|
+
const shapeOf = (folder) => ({
|
|
214
|
+
folders: new Set(folder.children.keys()),
|
|
215
|
+
stereotypes: new Set(folder.files.map(stereotypeOf)),
|
|
216
|
+
});
|
|
217
|
+
// `modules` → `module`; `entities` → `entity`; `packages` → `package`. What a
|
|
218
|
+
// human would name the capture; anything unpronounceable is `name`.
|
|
219
|
+
export const singularOf = (plural) => {
|
|
220
|
+
const word = plural.replace(/[^A-Za-z0-9]/g, "");
|
|
221
|
+
const singular = /ies$/.test(word)
|
|
222
|
+
? word.replace(/ies$/, "y")
|
|
223
|
+
: /(ses|xes|zes|shes|ches)$/.test(word)
|
|
224
|
+
? word.slice(0, -2)
|
|
225
|
+
: /[^s]s$/.test(word)
|
|
226
|
+
? word.slice(0, -1)
|
|
227
|
+
: word;
|
|
228
|
+
return singular === "" || /^[0-9]/.test(singular) ? "name" : singular;
|
|
229
|
+
};
|
|
230
|
+
const groupsOf = (members) => {
|
|
231
|
+
const parent = new Map(members.map(([name]) => [name, name]));
|
|
232
|
+
const find = (name) => {
|
|
233
|
+
let at = name;
|
|
234
|
+
while ((parent.get(at) ?? at) !== at)
|
|
235
|
+
at = parent.get(at) ?? at;
|
|
236
|
+
return at;
|
|
237
|
+
};
|
|
238
|
+
for (const [i, [a, shapeA]] of members.entries()) {
|
|
239
|
+
for (const [b, shapeB] of members.slice(i + 1)) {
|
|
240
|
+
if (alike(shapeA, shapeB))
|
|
241
|
+
parent.set(find(a), find(b));
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
const groups = new Map();
|
|
245
|
+
for (const [name] of members) {
|
|
246
|
+
const key = find(name);
|
|
247
|
+
groups.set(key, [...(groups.get(key) ?? []), name]);
|
|
248
|
+
}
|
|
249
|
+
return [...groups.values()]
|
|
250
|
+
.filter((group) => group.length >= 2)
|
|
251
|
+
.map((group) => sorted(group))
|
|
252
|
+
.sort((a, b) => (a[0] ?? "").localeCompare(b[0] ?? ""));
|
|
253
|
+
};
|
|
254
|
+
// The sibling groups under every node of the tree as it stands with the
|
|
255
|
+
// generalizations already accepted — never inside one, since a generalized
|
|
256
|
+
// node's children are already a merge.
|
|
257
|
+
export const candidatesOf = (input, generalize = []) => {
|
|
258
|
+
const trie = trieOf(input, generalize);
|
|
259
|
+
const bases = basesOf(input, generalize);
|
|
260
|
+
const roots = trie.map((folder) => nodeOf(folder, input, bases));
|
|
261
|
+
const candidates = [];
|
|
262
|
+
eachNode(roots, (node) => {
|
|
263
|
+
if (node.path.includes("{") || node.children.size < 2)
|
|
264
|
+
return;
|
|
265
|
+
const members = sorted(node.children.keys()).flatMap((name) => {
|
|
266
|
+
const folder = node.folder.children.get(name);
|
|
267
|
+
return folder === undefined ? [] : [[name, shapeOf(folder)]];
|
|
268
|
+
});
|
|
269
|
+
const shapes = new Map(members);
|
|
270
|
+
const taken = new Set();
|
|
271
|
+
for (const group of groupsOf(members)) {
|
|
272
|
+
const shapesOfGroup = group.flatMap((name) => {
|
|
273
|
+
const shape = shapes.get(name);
|
|
274
|
+
return shape === undefined ? [] : [shape];
|
|
275
|
+
});
|
|
276
|
+
const sharedOf = (pick) => {
|
|
277
|
+
const [head, ...rest] = shapesOfGroup;
|
|
278
|
+
if (head === undefined)
|
|
279
|
+
return [];
|
|
280
|
+
return sorted(rest.reduce((acc, shape) => new Set(intersect(acc, pick(shape))), pick(head)));
|
|
281
|
+
};
|
|
282
|
+
const sharedFolders = sharedOf((shape) => shape.folders);
|
|
283
|
+
const sharedStereotypes = sharedOf((shape) => shape.stereotypes);
|
|
284
|
+
let capture = singularOf(node.folder.name);
|
|
285
|
+
for (let n = 2; taken.has(capture); n += 1)
|
|
286
|
+
capture = `${singularOf(node.folder.name)}${String(n)}`;
|
|
287
|
+
taken.add(capture);
|
|
288
|
+
// Edges between members, and whether they all land on one place.
|
|
289
|
+
const memberFolder = (name) => node.path === "" ? name : `${node.path}/${name}`;
|
|
290
|
+
const isIn = (p) => group.find((name) => isUnder(p, memberFolder(name))) ?? null;
|
|
291
|
+
let crossEdges = 0;
|
|
292
|
+
const landings = new Set();
|
|
293
|
+
for (const file of input.files) {
|
|
294
|
+
const from = isIn(file);
|
|
295
|
+
if (from === null)
|
|
296
|
+
continue;
|
|
297
|
+
for (const target of input.targetsOf(file)) {
|
|
298
|
+
if (target.kind !== "local")
|
|
299
|
+
continue;
|
|
300
|
+
const to = isIn(target.path);
|
|
301
|
+
if (to === null || to === from)
|
|
302
|
+
continue;
|
|
303
|
+
crossEdges += 1;
|
|
304
|
+
landings.add(target.path.slice(memberFolder(to).length + 1));
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
const [landing] = sorted(landings);
|
|
308
|
+
candidates.push({
|
|
309
|
+
parent: node.path,
|
|
310
|
+
members: group,
|
|
311
|
+
sharedFolders,
|
|
312
|
+
sharedStereotypes,
|
|
313
|
+
capture,
|
|
314
|
+
crossEdges,
|
|
315
|
+
crossReach: landings.size === 1 && landing !== undefined ? landing : null,
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
return candidates.sort((a, b) => {
|
|
320
|
+
const byParent = a.parent.localeCompare(b.parent);
|
|
321
|
+
return byParent !== 0 ? byParent : (a.members[0] ?? "").localeCompare(b.members[0] ?? "");
|
|
322
|
+
});
|
|
323
|
+
};
|
|
324
|
+
// ---------------------------------------------------------------------------
|
|
325
|
+
// Collapse: children that all reach the same things are one node.
|
|
326
|
+
const normalized = (node, under) => sorted(new Set([...node.allow].map((entry) => (isUnder(entry, under) ? `${under}/**` : entry))));
|
|
327
|
+
const sameList = (a, b) => a.length === b.length && a.every((one, index) => one === b[index]);
|
|
328
|
+
const collapse = (node) => {
|
|
329
|
+
for (const child of node.children.values())
|
|
330
|
+
collapse(child);
|
|
331
|
+
if (node.children.size === 0)
|
|
332
|
+
return;
|
|
333
|
+
const children = [...node.children.values()];
|
|
334
|
+
if (children.some((child) => child.children.size > 0))
|
|
335
|
+
return;
|
|
336
|
+
const [first] = children;
|
|
337
|
+
if (first === undefined)
|
|
338
|
+
return;
|
|
339
|
+
const shared = normalized(first, node.path);
|
|
340
|
+
const externals = sorted(first.external);
|
|
341
|
+
const agree = children.every((child) => sameList(normalized(child, node.path), shared) && sameList(sorted(child.external), externals));
|
|
342
|
+
if (!agree)
|
|
343
|
+
return;
|
|
344
|
+
const own = normalized(node, node.path);
|
|
345
|
+
if (!own.every((entry) => shared.includes(entry)))
|
|
346
|
+
return;
|
|
347
|
+
if (!sorted(node.external).every((entry) => externals.includes(entry)))
|
|
348
|
+
return;
|
|
349
|
+
node.allow = new Set(shared);
|
|
350
|
+
node.external = new Set(externals);
|
|
351
|
+
for (const child of children) {
|
|
352
|
+
for (const file of child.files)
|
|
353
|
+
node.files.push(file);
|
|
354
|
+
node.edges += child.edges;
|
|
355
|
+
}
|
|
356
|
+
node.children = new Map();
|
|
357
|
+
node.stray = true;
|
|
358
|
+
};
|
|
359
|
+
// ---------------------------------------------------------------------------
|
|
360
|
+
// Emitting.
|
|
361
|
+
const shortenWith = (aliases) => {
|
|
362
|
+
const entries = Object.entries(aliases).sort(([, a], [, b]) => b.length - a.length);
|
|
363
|
+
return (p) => {
|
|
364
|
+
for (const [alias, target] of entries) {
|
|
365
|
+
if (p === target)
|
|
366
|
+
return alias;
|
|
367
|
+
if (p.startsWith(`${target}/`))
|
|
368
|
+
return `${alias}${p.slice(target.length)}`;
|
|
369
|
+
}
|
|
370
|
+
return p;
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
const CATCH_ALL = "**/";
|
|
374
|
+
export const inferManifest = (input, options) => {
|
|
375
|
+
const { generalize } = options;
|
|
376
|
+
const trie = trieOf(input, generalize);
|
|
377
|
+
const bases = basesOf(input, generalize);
|
|
378
|
+
const roots = trie.map((folder) => nodeOf(folder, input, bases));
|
|
379
|
+
fillAllowSets(roots, input, generalize);
|
|
380
|
+
if (options.collapse)
|
|
381
|
+
for (const root of roots)
|
|
382
|
+
collapse(root);
|
|
383
|
+
const shorten = shortenWith(options.aliases ?? {});
|
|
384
|
+
let unrestricted = 0;
|
|
385
|
+
let nodes = 0;
|
|
386
|
+
let files = 0;
|
|
387
|
+
const describe = (node) => {
|
|
388
|
+
const membership = generalize.find((group) => capturedPathOf(group) === node.path);
|
|
389
|
+
const across = membership === undefined
|
|
390
|
+
? ""
|
|
391
|
+
: ` across ${String(membership.members.length)} ${basenameOf(membership.parent)} (${membership.members.join(", ")})`;
|
|
392
|
+
const count = (n, noun) => `${String(n)} ${noun}${n === 1 ? "" : "s"}`;
|
|
393
|
+
return node.files.length === 0
|
|
394
|
+
? `As built on ${options.date}: no files of its own.`
|
|
395
|
+
: `As built on ${options.date}${across}: ${count(node.files.length, "file")}, ${count(node.edges, "edge")}.`;
|
|
396
|
+
};
|
|
397
|
+
const emit = (node) => {
|
|
398
|
+
nodes += 1;
|
|
399
|
+
files += node.files.length;
|
|
400
|
+
const children = {};
|
|
401
|
+
for (const name of sorted(node.children.keys())) {
|
|
402
|
+
const child = node.children.get(name);
|
|
403
|
+
if (child !== undefined)
|
|
404
|
+
children[child.key] = emit(child);
|
|
405
|
+
}
|
|
406
|
+
if (node.stray)
|
|
407
|
+
children[CATCH_ALL] = { layout: "open", children: {} };
|
|
408
|
+
const imports = node.files.length === 0
|
|
409
|
+
? {}
|
|
410
|
+
: {
|
|
411
|
+
imports: {
|
|
412
|
+
message: `This import is not on the allowlist infer wrote for ${node.path}/ on ${options.date}. Add it by name if it belongs here.`,
|
|
413
|
+
unrestricted: true,
|
|
414
|
+
...(node.allow.size > 0 ? { allow: sorted([...node.allow].map(shorten)) } : {}),
|
|
415
|
+
...(node.external.size > 0 ? { external: sorted(node.external) } : {}),
|
|
416
|
+
},
|
|
417
|
+
};
|
|
418
|
+
if (node.files.length > 0)
|
|
419
|
+
unrestricted += 1;
|
|
420
|
+
return {
|
|
421
|
+
message: describe(node),
|
|
422
|
+
layout: "open",
|
|
423
|
+
...imports,
|
|
424
|
+
children,
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
const tree = {};
|
|
428
|
+
for (const root of roots)
|
|
429
|
+
tree[`${shorten(root.path)}/`] = emit(root);
|
|
430
|
+
const within = input.roots.map((root) => shorten(`${root}/**`));
|
|
431
|
+
const manifest = {
|
|
432
|
+
resolve: options.resolve,
|
|
433
|
+
baseline: options.baseline,
|
|
434
|
+
...(options.aliases === undefined || Object.keys(options.aliases).length === 0
|
|
435
|
+
? {}
|
|
436
|
+
: { aliases: options.aliases }),
|
|
437
|
+
limits: { unrestricted, partial: 0 },
|
|
438
|
+
...(options.hasCycles
|
|
439
|
+
? {}
|
|
440
|
+
: {
|
|
441
|
+
graph: {
|
|
442
|
+
cycles: [
|
|
443
|
+
{
|
|
444
|
+
name: "no-cycles",
|
|
445
|
+
message: "These files import each other, directly or through others. The tree had no cycle when this manifest was inferred; keep it that way.",
|
|
446
|
+
within: within.length === 1 ? (within[0] ?? "") : within,
|
|
447
|
+
},
|
|
448
|
+
],
|
|
449
|
+
},
|
|
450
|
+
}),
|
|
451
|
+
tree,
|
|
452
|
+
};
|
|
453
|
+
return { manifest, nodes, files };
|
|
454
|
+
};
|
|
455
|
+
//# sourceMappingURL=infer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infer.js","sourceRoot":"","sources":["../../../src/manifest/infer.ts"],"names":[],"mappings":"AA+FA,8EAA8E;AAC9E,QAAQ;AAER,MAAM,SAAS,GAAG,CAAC,IAAY,EAAU,EAAE;IACzC,MAAM,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACjC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAC5C,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAA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CAAC,EAAE;YACJ,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC;QACjC,MAAM,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,EAAE;QACpC,GAAG,CAAC,OAAO,CAAC,SAAS;YACnB,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC;gBACE,KAAK,EAAE;oBACL,MAAM,EAAE;wBACN;4BACE,IAAI,EAAE,WAAW;4BACjB,OAAO,EACL,qIAAqI;4BACvI,MAAM,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM;yBACzD;qBACF;iBACF;aACF,CAAC;QACN,IAAI;KACL,CAAC;IAEF,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AACpC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodbones/core",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Architecture policy as one manifest of your repository, language-agnostic: the manifest schema, the evaluators for imports, exports, members, surface, structure and the import graph, the ports a language pack implements, and the loader that turns a manifest into a policy every rule of which has proven it can fire.",
|
|
@@ -34,6 +34,8 @@
|
|
|
34
34
|
"default": "./build/esm/testing.js"
|
|
35
35
|
},
|
|
36
36
|
"./schema/architecture.schema.json": "./schema/architecture.schema.json",
|
|
37
|
+
"./schema/architecture-node.schema.json": "./schema/architecture-node.schema.json",
|
|
38
|
+
"./schema/conformance.schema.json": "./schema/conformance.schema.json",
|
|
37
39
|
"./package.json": "./package.json"
|
|
38
40
|
},
|
|
39
41
|
"types": "./build/dts/index.d.ts",
|