@fougere/core 0.1.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +21 -0
- package/dist/binding.d.ts +63 -0
- package/dist/binding.d.ts.map +1 -0
- package/dist/binding.js +107 -0
- package/dist/binding.js.map +1 -0
- package/dist/boot.d.ts +38 -0
- package/dist/boot.d.ts.map +1 -0
- package/dist/boot.js +53 -0
- package/dist/boot.js.map +1 -0
- package/dist/bootstrap.d.ts +4 -0
- package/dist/bootstrap.d.ts.map +1 -0
- package/dist/bootstrap.js +825 -0
- package/dist/bootstrap.js.map +1 -0
- package/dist/builtins/config.d.ts +4 -0
- package/dist/builtins/config.d.ts.map +1 -0
- package/dist/builtins/config.js +6 -0
- package/dist/builtins/config.js.map +1 -0
- package/dist/builtins/logger.d.ts +28 -0
- package/dist/builtins/logger.d.ts.map +1 -0
- package/dist/builtins/logger.js +76 -0
- package/dist/builtins/logger.js.map +1 -0
- package/dist/call.d.ts +172 -0
- package/dist/call.d.ts.map +1 -0
- package/dist/call.js +209 -0
- package/dist/call.js.map +1 -0
- package/dist/collector.d.ts +28 -0
- package/dist/collector.d.ts.map +1 -0
- package/dist/collector.js +32 -0
- package/dist/collector.js.map +1 -0
- package/dist/config-loader.d.ts +59 -0
- package/dist/config-loader.d.ts.map +1 -0
- package/dist/config-loader.js +97 -0
- package/dist/config-loader.js.map +1 -0
- package/dist/contract.d.ts +43 -0
- package/dist/contract.d.ts.map +1 -0
- package/dist/contract.js +29 -0
- package/dist/contract.js.map +1 -0
- package/dist/crud.d.ts +61 -0
- package/dist/crud.d.ts.map +1 -0
- package/dist/crud.js +85 -0
- package/dist/crud.js.map +1 -0
- package/dist/define.d.ts +8 -0
- package/dist/define.d.ts.map +1 -0
- package/dist/define.js +9 -0
- package/dist/define.js.map +1 -0
- package/dist/egress.d.ts +78 -0
- package/dist/egress.d.ts.map +1 -0
- package/dist/egress.js +185 -0
- package/dist/egress.js.map +1 -0
- package/dist/emit.d.ts +51 -0
- package/dist/emit.d.ts.map +1 -0
- package/dist/emit.js +57 -0
- package/dist/emit.js.map +1 -0
- package/dist/errors.d.ts +22 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +74 -0
- package/dist/errors.js.map +1 -0
- package/dist/frond-config.d.ts +80 -0
- package/dist/frond-config.d.ts.map +1 -0
- package/dist/frond-config.js +32 -0
- package/dist/frond-config.js.map +1 -0
- package/dist/graph.d.ts +33 -0
- package/dist/graph.d.ts.map +1 -0
- package/dist/graph.js +142 -0
- package/dist/graph.js.map +1 -0
- package/dist/handler-parser.d.ts +82 -0
- package/dist/handler-parser.d.ts.map +1 -0
- package/dist/handler-parser.js +505 -0
- package/dist/handler-parser.js.map +1 -0
- package/dist/imports.d.ts +22 -0
- package/dist/imports.d.ts.map +1 -0
- package/dist/imports.js +80 -0
- package/dist/imports.js.map +1 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -0
- package/dist/invocation.d.ts +20 -0
- package/dist/invocation.d.ts.map +1 -0
- package/dist/invocation.js +15 -0
- package/dist/invocation.js.map +1 -0
- package/dist/middleware/error-handler.d.ts +15 -0
- package/dist/middleware/error-handler.d.ts.map +1 -0
- package/dist/middleware/error-handler.js +29 -0
- package/dist/middleware/error-handler.js.map +1 -0
- package/dist/middleware/logger.d.ts +14 -0
- package/dist/middleware/logger.d.ts.map +1 -0
- package/dist/middleware/logger.js +25 -0
- package/dist/middleware/logger.js.map +1 -0
- package/dist/middleware.d.ts +75 -0
- package/dist/middleware.d.ts.map +1 -0
- package/dist/middleware.js +89 -0
- package/dist/middleware.js.map +1 -0
- package/dist/operation.d.ts +87 -0
- package/dist/operation.d.ts.map +1 -0
- package/dist/operation.js +95 -0
- package/dist/operation.js.map +1 -0
- package/dist/orm.d.ts +96 -0
- package/dist/orm.d.ts.map +1 -0
- package/dist/orm.js +33 -0
- package/dist/orm.js.map +1 -0
- package/dist/presenter.d.ts +63 -0
- package/dist/presenter.d.ts.map +1 -0
- package/dist/presenter.js +72 -0
- package/dist/presenter.js.map +1 -0
- package/dist/remote.d.ts +48 -0
- package/dist/remote.d.ts.map +1 -0
- package/dist/remote.js +135 -0
- package/dist/remote.js.map +1 -0
- package/dist/repository.d.ts +55 -0
- package/dist/repository.d.ts.map +1 -0
- package/dist/repository.js +26 -0
- package/dist/repository.js.map +1 -0
- package/dist/scan-cache.d.ts +10 -0
- package/dist/scan-cache.d.ts.map +1 -0
- package/dist/scan-cache.js +92 -0
- package/dist/scan-cache.js.map +1 -0
- package/dist/scanner.d.ts +34 -0
- package/dist/scanner.d.ts.map +1 -0
- package/dist/scanner.js +595 -0
- package/dist/scanner.js.map +1 -0
- package/dist/seed.d.ts +28 -0
- package/dist/seed.d.ts.map +1 -0
- package/dist/seed.js +110 -0
- package/dist/seed.js.map +1 -0
- package/dist/types.d.ts +387 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/verify.d.ts +57 -0
- package/dist/verify.d.ts.map +1 -0
- package/dist/verify.js +147 -0
- package/dist/verify.js.map +1 -0
- package/package.json +47 -0
package/dist/verify.js
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { repositoryKeyOf } from './repository.js';
|
|
2
|
+
import { ormKeyOf } from './orm.js';
|
|
3
|
+
import { presenterKeyOf } from './presenter.js';
|
|
4
|
+
import { collectorKeyOf } from './collector.js';
|
|
5
|
+
/**
|
|
6
|
+
* The container keys a frond registers in its own scope, keyed as a handler's
|
|
7
|
+
* `deps` spell them — DI resolves by type name, so both sides are PascalCase.
|
|
8
|
+
*
|
|
9
|
+
* Every key comes from the function that states it, never from a derivation
|
|
10
|
+
* respelled here: a second reader that spells one differently finds nothing and
|
|
11
|
+
* reports nothing wrong, which is the failure mode a checker must not have.
|
|
12
|
+
*/
|
|
13
|
+
function registrationsOf(frond) {
|
|
14
|
+
const out = new Map();
|
|
15
|
+
const put = (key, kind) => out.set(key, { frond: frond.name, kind });
|
|
16
|
+
for (const p of frond.providers)
|
|
17
|
+
put(p.ctor.name, 'provider');
|
|
18
|
+
for (const p of frond.presenters)
|
|
19
|
+
put(presenterKeyOf(p.entityName), 'presenter');
|
|
20
|
+
for (const c of frond.collectors)
|
|
21
|
+
put(collectorKeyOf(c.entityName), 'collector');
|
|
22
|
+
for (const e of frond.entities) {
|
|
23
|
+
put(ormKeyOf(e.name), 'ORM');
|
|
24
|
+
put(repositoryKeyOf(e.name), 'repository');
|
|
25
|
+
}
|
|
26
|
+
return out;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Everything in a frond that is constructed by DI, so carries `deps`.
|
|
30
|
+
* Handlers, presenters and collectors are all built from a constructor whose
|
|
31
|
+
* argument types the scan read; each one can therefore reach across.
|
|
32
|
+
*/
|
|
33
|
+
function injectablesOf(frond) {
|
|
34
|
+
return [
|
|
35
|
+
...frond.handlers.map((h) => ({ name: h.ctor.name, deps: h.deps, filePath: h.filePath })),
|
|
36
|
+
...frond.presenters.map((p) => ({ name: p.ctor.name, deps: p.deps, filePath: p.filePath })),
|
|
37
|
+
...frond.collectors.map((c) => ({ name: c.ctor.name, deps: c.deps, filePath: c.filePath })),
|
|
38
|
+
];
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Does this app survive being split?
|
|
42
|
+
*
|
|
43
|
+
* A frond runs in-process or in its own process behind JSON-RPC with identical
|
|
44
|
+
* user code — that is the whole claim. What the claim does not say is that
|
|
45
|
+
* *every* app survives the move: a dependency that crosses a frond boundary
|
|
46
|
+
* resolves today because both scopes live in one container, and resolves to
|
|
47
|
+
* nothing the day the other frond answers over the wire.
|
|
48
|
+
*
|
|
49
|
+
* The gradient is the one question no other framework can ask. Nest has nothing
|
|
50
|
+
* to check — every inter-module call is already remote, so nothing changes when
|
|
51
|
+
* you split. Spring Modulith has nothing to check either — it plans no exit.
|
|
52
|
+
* Here the question means something, and until now it had no answer.
|
|
53
|
+
*
|
|
54
|
+
* Pure over `app.fronds`: no mount, no process, no file. Call it from a test.
|
|
55
|
+
*/
|
|
56
|
+
export function verify(app) {
|
|
57
|
+
const index = new Map();
|
|
58
|
+
for (const frond of app.fronds) {
|
|
59
|
+
for (const [key, reg] of registrationsOf(frond))
|
|
60
|
+
index.set(key, reg);
|
|
61
|
+
}
|
|
62
|
+
// Which frond declares a collector for which entity. Collectors are the one
|
|
63
|
+
// thing a handler asks for by OPERATION PARAMETER, never by constructor, so
|
|
64
|
+
// they need their own index and their own rule.
|
|
65
|
+
const collectorFronds = new Map();
|
|
66
|
+
for (const frond of app.fronds) {
|
|
67
|
+
for (const c of frond.collectors)
|
|
68
|
+
collectorFronds.set(c.entityName, frond.name);
|
|
69
|
+
}
|
|
70
|
+
const violations = [];
|
|
71
|
+
for (const frond of app.fronds) {
|
|
72
|
+
// Rule 1 — a constructor dependency declared in another frond's scope.
|
|
73
|
+
// Façade keys are exempt by construction, not by omission: a `Facade<X>`
|
|
74
|
+
// dependency is spelled camelCase (`articleHandler`) while every type key
|
|
75
|
+
// here is PascalCase, so the two namespaces cannot collide. The façade IS
|
|
76
|
+
// the sanctioned crossing — see tests/cross-frond.test.ts.
|
|
77
|
+
for (const subject of injectablesOf(frond)) {
|
|
78
|
+
for (const dep of subject.deps) {
|
|
79
|
+
const declared = index.get(dep);
|
|
80
|
+
// Not in the index at all = a builtin (Logger, Config), a
|
|
81
|
+
// façade key, or an unresolved name. None is a boundary crossing, and
|
|
82
|
+
// an unresolved dependency is the container's complaint, not this rule's.
|
|
83
|
+
if (!declared || declared.frond === frond.name)
|
|
84
|
+
continue;
|
|
85
|
+
violations.push({
|
|
86
|
+
rule: 'cross-frond-dependency',
|
|
87
|
+
frond: frond.name,
|
|
88
|
+
subject: subject.name,
|
|
89
|
+
filePath: subject.filePath,
|
|
90
|
+
dependsOn: { key: dep, frond: declared.frond, kind: declared.kind },
|
|
91
|
+
message: `${subject.name} depends on ${dep}, the ${declared.kind} of frond '${declared.frond}'. ` +
|
|
92
|
+
`Each frond registers into its own scope, so this does not resolve here. ` +
|
|
93
|
+
`Declare ${dep} in '${frond.name}', or reach '${declared.frond}' through its ` +
|
|
94
|
+
`façade — the one sanctioned crossing.`,
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
// Rule 2 — an operation parameter that wanted a collector this frond has not
|
|
99
|
+
// got. `computeBindingPlan` gates the collector branch on the frond's OWN
|
|
100
|
+
// collector set (bootstrap.ts:167), then falls through to branch 4,
|
|
101
|
+
// "Everything else — body" (binding.ts:90). So the parameter does not go
|
|
102
|
+
// missing: it carries what the caller sent. Measured in
|
|
103
|
+
// tests/collector-frond.test.ts.
|
|
104
|
+
const own = new Set(frond.collectors.map((c) => c.entityName));
|
|
105
|
+
for (const handler of frond.handlers) {
|
|
106
|
+
for (const [opName, op] of handler.operations) {
|
|
107
|
+
for (const param of op.signature?.params ?? []) {
|
|
108
|
+
const wanted = param.type.name.toLowerCase();
|
|
109
|
+
if (own.has(wanted))
|
|
110
|
+
continue;
|
|
111
|
+
const elsewhere = collectorFronds.get(wanted);
|
|
112
|
+
// No collector anywhere for that type = an ordinary body parameter,
|
|
113
|
+
// which is what branch 4 is FOR. Only a collector that exists in the
|
|
114
|
+
// wrong place makes the fall-through a lie.
|
|
115
|
+
if (!elsewhere)
|
|
116
|
+
continue;
|
|
117
|
+
violations.push({
|
|
118
|
+
rule: 'collector-in-another-frond',
|
|
119
|
+
frond: frond.name,
|
|
120
|
+
subject: `${handler.ctor.name}.${opName}(${param.name})`,
|
|
121
|
+
filePath: handler.filePath,
|
|
122
|
+
dependsOn: { key: collectorKeyOf(wanted), frond: elsewhere, kind: 'collector' },
|
|
123
|
+
message: `'${param.name}' is typed ${param.type.name}, and the collector that produces one ` +
|
|
124
|
+
`is declared in frond '${elsewhere}'. A binding plan only sees its own frond's ` +
|
|
125
|
+
`collectors, so this parameter falls through to the request body — it receives ` +
|
|
126
|
+
`what the CALLER sent. An op that judges it (\`if (${param.name}.role !== 'admin') throw\`) ` +
|
|
127
|
+
`is judging the caller's own claim about themselves. ` +
|
|
128
|
+
`Move the collector into '${frond.name}'.`,
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return violations;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* The same verdict, as an assertion. Throws naming every rule that failed, so a
|
|
138
|
+
* test is one line and its output is the sentence — not a diff of two objects.
|
|
139
|
+
*/
|
|
140
|
+
export function assertSplittable(app) {
|
|
141
|
+
const violations = verify(app);
|
|
142
|
+
if (violations.length === 0)
|
|
143
|
+
return;
|
|
144
|
+
const lines = violations.map((v) => ` [${v.rule}] ${v.frond}/${v.subject}\n ${v.message}\n ${v.filePath}`);
|
|
145
|
+
throw new Error(`${violations.length} violation(s) — this app does not survive a split:\n${lines.join('\n')}`);
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL=verify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify.js","sourceRoot":"","sources":["../src/verify.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAmChD;;;;;;;GAOG;AACH,SAAS,eAAe,CAAC,KAAsB;IAC7C,MAAM,GAAG,GAAG,IAAI,GAAG,EAAwB,CAAC;IAC5C,MAAM,GAAG,GAAG,CAAC,GAAW,EAAE,IAAY,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAErF,KAAK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M,IAAI,KAAK,CAAC,GAAG,UAAU,CAAC,MAAM,uDAAuD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACjH,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fougere/core",
|
|
3
|
+
"version": "0.1.0-alpha.0",
|
|
4
|
+
"description": "The core — scan, call contract, façades, remote stand-ins.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/chok/fougere.git",
|
|
9
|
+
"directory": "packages/core"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"main": "dist/index.js",
|
|
13
|
+
"types": "dist/index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"import": "./dist/index.js",
|
|
18
|
+
"default": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./contract": {
|
|
21
|
+
"types": "./dist/contract.d.ts",
|
|
22
|
+
"import": "./dist/contract.js",
|
|
23
|
+
"default": "./dist/contract.js"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist"
|
|
28
|
+
],
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"typescript": "^5.5.0",
|
|
31
|
+
"@fougere/container": "0.1.0-alpha.0",
|
|
32
|
+
"@fougere/schema": "0.1.0-alpha.0"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@types/node": "^22.0.0",
|
|
36
|
+
"@fougere/container-fougere": "0.1.0-alpha.0"
|
|
37
|
+
},
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"access": "public"
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "rm -rf dist && tsc",
|
|
43
|
+
"test": "vitest run",
|
|
44
|
+
"test:watch": "vitest",
|
|
45
|
+
"typecheck": "tsc --noEmit -p tsconfig.test.json"
|
|
46
|
+
}
|
|
47
|
+
}
|