@fougere/core 0.8.0-alpha.0 → 0.8.2-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.
@@ -0,0 +1,29 @@
1
+ import type { HandlerEntry } from './descriptor/frond.js';
2
+ export interface HandlerDeclaration {
3
+ /** Stable rule name — the same vocabulary `verify()` uses. */
4
+ rule: 'handler-declaration';
5
+ frond: string;
6
+ filePath: string;
7
+ /** The handler that hosts it. */
8
+ handler: string;
9
+ /** What is declared — `AGREED_WITHIN`, `says`, `Assessment`. */
10
+ subject: string;
11
+ /** What it is in the source: a value, or a shape. */
12
+ kind: 'value' | 'shape';
13
+ message: string;
14
+ }
15
+ /**
16
+ * Everything a handler file declares that is not the handler itself.
17
+ *
18
+ * A handler names gestures; what a gesture uses is declared where its nature says, and one
19
+ * question settles which: does it arrive INJECTED or IMPORTED? A threshold, a formula, a word
20
+ * list arrive imported and belong to the frond's own module, beside its entities. Anything
21
+ * holding a client, a connection or a cursor arrives injected and belongs under `services/`.
22
+ * Neither ever belongs in the file that calls it — nothing there can be reached by a second
23
+ * caller, and the handler grows into the domain it was supposed to address.
24
+ */
25
+ export declare function handlerDeclarations(fronds: readonly {
26
+ name: string;
27
+ handlers: readonly Pick<HandlerEntry, 'name' | 'filePath'>[];
28
+ }[]): Promise<HandlerDeclaration[]>;
29
+ //# sourceMappingURL=declarations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"declarations.d.ts","sourceRoot":"","sources":["../src/declarations.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAQ1D,MAAM,WAAW,kBAAkB;IACjC,8DAA8D;IAC9D,IAAI,EAAE,qBAAqB,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;CACjB;AAuBD;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,SAAS;IACf,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,SAAS,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,UAAU,CAAC,EAAE,CAAC;CAC9D,EAAE,GACF,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAwC/B"}
@@ -0,0 +1,69 @@
1
+ import { readFile } from 'node:fs/promises';
2
+ let _ts;
3
+ async function loadTs() {
4
+ if (!_ts)
5
+ _ts = (await import('@typescript/typescript6')).default;
6
+ return _ts;
7
+ }
8
+ function subjectsOf(typescript, source) {
9
+ const found = [];
10
+ for (const statement of source.statements) {
11
+ if (typescript.isVariableStatement(statement)) {
12
+ for (const declared of statement.declarationList.declarations)
13
+ if (typescript.isIdentifier(declared.name))
14
+ found.push([declared.name.text, 'value']);
15
+ }
16
+ else if (typescript.isFunctionDeclaration(statement) && statement.name) {
17
+ found.push([statement.name.text, 'value']);
18
+ }
19
+ else if (typescript.isInterfaceDeclaration(statement) ||
20
+ typescript.isTypeAliasDeclaration(statement) ||
21
+ typescript.isEnumDeclaration(statement)) {
22
+ found.push([statement.name.text, 'shape']);
23
+ }
24
+ }
25
+ return found;
26
+ }
27
+ /**
28
+ * Everything a handler file declares that is not the handler itself.
29
+ *
30
+ * A handler names gestures; what a gesture uses is declared where its nature says, and one
31
+ * question settles which: does it arrive INJECTED or IMPORTED? A threshold, a formula, a word
32
+ * list arrive imported and belong to the frond's own module, beside its entities. Anything
33
+ * holding a client, a connection or a cursor arrives injected and belongs under `services/`.
34
+ * Neither ever belongs in the file that calls it — nothing there can be reached by a second
35
+ * caller, and the handler grows into the domain it was supposed to address.
36
+ */
37
+ export async function handlerDeclarations(fronds) {
38
+ const typescript = await loadTs();
39
+ const found = [];
40
+ for (const frond of fronds) {
41
+ for (const handler of frond.handlers) {
42
+ const text = await readFile(handler.filePath, 'utf8').catch(() => undefined);
43
+ if (text === undefined)
44
+ continue;
45
+ const source = typescript.createSourceFile(handler.filePath, text, typescript.ScriptTarget.Latest, false);
46
+ for (const [subject, kind] of subjectsOf(typescript, source)) {
47
+ found.push({
48
+ rule: 'handler-declaration',
49
+ frond: frond.name,
50
+ filePath: handler.filePath,
51
+ handler: handler.name,
52
+ subject,
53
+ kind,
54
+ message: kind === 'value'
55
+ ? `'${subject}' is declared in ${handler.name}, so only ${handler.name} can reach it. `
56
+ + `If it needs nothing but its arguments, it is a word of '${frond.name}' and belongs `
57
+ + `in a module beside its entities; if it holds a dependency, it is a service. Either `
58
+ + `way it is stated once and imported, and the handler keeps only the gesture.`
59
+ : `'${subject}' is declared in ${handler.name}, which makes the shape of what an `
60
+ + `operation answers readable only from the file that answers it. A shape belongs `
61
+ + `with the entity it describes, or in the frond's own module — where the caller, `
62
+ + `the test and the other operations can all name it.`,
63
+ });
64
+ }
65
+ }
66
+ }
67
+ return found;
68
+ }
69
+ //# sourceMappingURL=declarations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"declarations.js","sourceRoot":"","sources":["../src/declarations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,IAAI,GAA0B,CAAC;AAC/B,KAAK,UAAU,MAAM;IACnB,IAAI,CAAC,GAAG;QAAE,GAAG,GAAG,CAAC,MAAM,MAAM,CAAC,yBAAyB,CAAC,CAAC,CAAC,OAAO,CAAC;IAClE,OAAO,GAAG,CAAC;AACb,CAAC;AAgBD,SAAS,UAAU,CAAC,UAAqB,EAAE,MAAqB;IAC9D,MAAM,KAAK,GAAkC,EAAE,CAAC;IAEhD,KAAK,MAAM,SAAS,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;QAC1C,IAAI,UAAU,CAAC,mBAAmB,CAAC,SAAS,CAAC,EA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AE,MAAM,CAAC;QAAC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAA;KAAE,EAAE,CAAC;IAC1D,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACpC,mFAAmF;IACnF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mFAAmF;IACnF,mBAAmB,CAAC,EAAE,eAAe,CAAC,qBAAqB,CAAC,CAAC;CAC9D;AAED,4CAA4C;AAC5C,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,gBAAqB,GAAG,eAAe,CA4FpF"}
package/dist/declare.js CHANGED
@@ -83,7 +83,12 @@ export function frond(name, declared = {}) {
83
83
  const collectors = (declared.collectors ?? []).map((c) => {
84
84
  const ctor = ctorOf(c);
85
85
  return {
86
- typeName: subjectOf(ctor, 'collector').name,
86
+ // `lowerFirst`, the way the scan spells it: the boot looks a collector up by the key
87
+ // `computeBindingPlan` derives from a parameter's type, and that key is lowerFirst.
88
+ // Written as `User` here, the set held `User` while every lookup asked for `user` —
89
+ // so a handler taking one fell through to the request input, and the boot refused a
90
+ // contract it had everything to resolve.
91
+ typeName: lowerFirst(subjectOf(ctor, 'collector').name),
87
92
  ctor,
88
93
  deps: depsOf(c),
89
94
  filePath: '',
@@ -1 +1 @@
1
- {"version":3,"file":"declare.js","sourceRoot":"","sources":["../src/declare.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,OAAO,EAAE,UAAU,EAAmB,MAAM,iBAAiB,CAAC;AAK9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAkC3D,MAAM,MAAM,GAAG,CAAC,CAAW,EAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAA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AG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC9D,CAAC;AACJ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -63,6 +63,8 @@ export type { AuthConfig, AuthContext, AuthRuntime } from './boot/auth.js';
63
63
  export { Fronds } from './descriptor/Fronds.js';
64
64
  export { verify, assertSplittable, type Violation } from './verify.js';
65
65
  export type { CrossFrondImport } from './imports.js';
66
+ export type { HandlerDeclaration } from './declarations.js';
67
+ export type { OutsideConvention } from './placement.js';
66
68
  export { signEnvelope, verifyEnvelope, identityFromEnv } from './identity.js';
67
69
  export type { FrondIdentity, VerifiedCall, CallIdentity, SignedCall } from './identity.js';
68
70
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACjE,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACvE,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAC5G,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,YAAY,EAAE,OAAO,EAAE,UAAU,EAA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AiBzC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAkB,MAAM,aAAa,CAAC;AAKvE,uFAAuF;AACvF,sFAAsF;AACtF,mFAAmF;AACnF,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC"}
package/dist/node.d.ts CHANGED
@@ -9,6 +9,8 @@ export { setModuleLoader, getModuleLoader } from './loader.js';
9
9
  export { loadConfig, loadCascadedConfig } from './config-loader.js';
10
10
  export { defineFrond } from './frond-config.js';
11
11
  export { crossFrondImports } from './imports.js';
12
+ export { handlerDeclarations } from './declarations.js';
13
+ export { outsideConventions } from './placement.js';
12
14
  export { adaptersOf } from './scan/adapters.js';
13
15
  export { generateKeyPair, issueGrant } from './identity-keys.js';
14
16
  //# sourceMappingURL=node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EACL,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,mBAAmB,EAC5D,kBAAkB,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,GAC9D,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,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uleLoader } from './loader.js';
9
9
  export { loadConfig, loadCascadedConfig } from './config-loader.js';
10
10
  export { defineFrond } from './frond-config.js';
11
11
  export { crossFrondImports } from './imports.js';
12
+ export { handlerDeclarations } from './declarations.js';
13
+ export { outsideConventions } from './placement.js';
12
14
  export { adaptersOf } from './scan/adapters.js';
13
15
  // Making a key and binding a name to it happen once, at a deployment, on a machine with
14
16
  // a filesystem — the CLI speaking. Verifying happens per call, everywhere, and stays on
package/dist/node.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"node.js","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EACoC,mBAAmB,EAC5D,kBAAkB,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,GAC9D,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAoB,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,wFAAwF;AACxF,wFAAwF;AACxF,mCAAmC;AACnC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"node.js","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EACoC,mBAAmB,EAC5D,kBAAkB,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,GAC9D,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAoB,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,wFAAwF;AACxF,wFAAwF;AACxF,mCAAmC;AACnC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { type Conventions } from './scan/conventions.js';
2
+ import type { FrondDescriptor } from './descriptor/frond.js';
3
+ export interface OutsideConvention {
4
+ /** Stable rule name — the same vocabulary `verify()` uses. */
5
+ rule: 'outside-convention';
6
+ frond: string;
7
+ filePath: string;
8
+ kind: 'file' | 'directory';
9
+ message: string;
10
+ }
11
+ /**
12
+ * What sits in a frond and belongs to no convention — a directory somebody invented, or a
13
+ * module dropped at the root.
14
+ *
15
+ * The eight names are the frond's whole vocabulary, and until now nothing said so: a scan
16
+ * READS them and steps over everything else in silence, so a file outside them is not
17
+ * refused, it is unseen. That silence is what lets a domain word settle wherever it was
18
+ * first needed — most often in the handler that used it, which is a second rule
19
+ * (`handler-declaration`) reporting the same drift one file lower.
20
+ *
21
+ * It names the addresses rather than describing them: a rule that says "put it somewhere
22
+ * better" is advice, and advice is what everybody already had.
23
+ */
24
+ export declare function outsideConventions(fronds: readonly Pick<FrondDescriptor, 'name' | 'source'>[], conventions: Conventions): Promise<OutsideConvention[]>;
25
+ //# sourceMappingURL=placement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"placement.d.ts","sourceRoot":"","sources":["../src/placement.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAe,MAAM,uBAAuB,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,WAAW,iBAAiB;IAChC,8DAA8D;IAC9D,IAAI,EAAE,oBAAoB,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB;AAaD;;;;;;;;;;;;GAYG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,SAAS,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,QAAQ,CAAC,EAAE,EAC3D,WAAW,EAAE,WAAW,GACvB,OAAO,CAAC,iBAAiB,EAAE,CAAC,CA2C9B"}
@@ -0,0 +1,69 @@
1
+ /** A file inside a frond that no convention names. */
2
+ import { readdir } from 'node:fs/promises';
3
+ import { join } from 'node:path';
4
+ import { frondDirsOf } from './scan/conventions.js';
5
+ /**
6
+ * `tests` is not a convention and is not an offence either: `@fougere/testing` reads the
7
+ * LEVEL a case runs at from where its file sits, so a frond holding its own tests is a
8
+ * supported shape (`demos/test-gradient`). The rest are outputs and installs, which are
9
+ * not the project's source at all.
10
+ */
11
+ const NOT_SOURCE = new Set(['tests', 'node_modules', 'dist', 'build', 'coverage']);
12
+ /** The one file a frond states about itself, at its root. */
13
+ const FROND_FILES = new Set(['frond.config.ts', 'package.json', 'tsconfig.json', 'README.md']);
14
+ /**
15
+ * What sits in a frond and belongs to no convention — a directory somebody invented, or a
16
+ * module dropped at the root.
17
+ *
18
+ * The eight names are the frond's whole vocabulary, and until now nothing said so: a scan
19
+ * READS them and steps over everything else in silence, so a file outside them is not
20
+ * refused, it is unseen. That silence is what lets a domain word settle wherever it was
21
+ * first needed — most often in the handler that used it, which is a second rule
22
+ * (`handler-declaration`) reporting the same drift one file lower.
23
+ *
24
+ * It names the addresses rather than describing them: a rule that says "put it somewhere
25
+ * better" is advice, and advice is what everybody already had.
26
+ */
27
+ export async function outsideConventions(fronds, conventions) {
28
+ const known = new Set(frondDirsOf(conventions));
29
+ const addresses = [...known].sort().join(', ');
30
+ const found = [];
31
+ for (const frond of fronds) {
32
+ const entries = await readdir(frond.source.path, { withFileTypes: true }).catch(() => []);
33
+ for (const entry of entries) {
34
+ if (entry.name.startsWith('.') || NOT_SOURCE.has(entry.name))
35
+ continue;
36
+ const filePath = join(frond.source.path, entry.name);
37
+ if (entry.isDirectory()) {
38
+ if (known.has(entry.name))
39
+ continue;
40
+ found.push({
41
+ rule: 'outside-convention',
42
+ frond: frond.name,
43
+ filePath,
44
+ kind: 'directory',
45
+ message: `'${entry.name}/' is a directory no convention names, so nothing in it is read `
46
+ + `as anything — it is a subject somebody filed under its own word. A frond's `
47
+ + `directories are ${addresses}. If what it holds computes with nothing injected it `
48
+ + `is \`${conventions.dirs.rules}/\`; if it holds a dependency it is `
49
+ + `\`${conventions.dirs.services}/\`.`,
50
+ });
51
+ continue;
52
+ }
53
+ if (!entry.name.endsWith('.ts') || FROND_FILES.has(entry.name))
54
+ continue;
55
+ found.push({
56
+ rule: 'outside-convention',
57
+ frond: frond.name,
58
+ filePath,
59
+ kind: 'file',
60
+ message: `'${entry.name}' sits at the root of '${frond.name}', where the frond states `
61
+ + `itself and nothing else. A frond's directories are ${addresses} — this one belongs `
62
+ + `in \`${conventions.dirs.rules}/\` if it computes with nothing injected, in `
63
+ + `\`${conventions.dirs.services}/\` if it holds a dependency.`,
64
+ });
65
+ }
66
+ }
67
+ return found;
68
+ }
69
+ //# sourceMappingURL=placement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"placement.js","sourceRoot":"","sources":["../src/placement.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAoB,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAYtE;;;;;GAKG;AACH,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;AAEnF,6DAA6D;AAC7D,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,iBAAiB,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,CAAC,CAAC,CAAC;AAE/F;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,MAA2D,EAC3D,WAAwB;IAExB,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC;IAChD,MAAM,SAAS,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,KAAK,GAAwB,EAAE,CAAC;IAEtC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,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+C;sBAC7E,KAAK,WAAW,CAAC,IAAI,CAAC,QAAQ,+BAA+B;aAClE,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -13,6 +13,12 @@ export interface Conventions {
13
13
  presenters: string;
14
14
  collectors: string;
15
15
  seeds: string;
16
+ /**
17
+ * What the domain computes with nothing injected. Read into the type program, because
18
+ * a handler names one of its types in a signature, and registered nowhere: no class
19
+ * here answers a container key.
20
+ */
21
+ rules: string;
16
22
  /** What its shapes used to be — written by `fougere freeze`, replayed by `migrate`. */
17
23
  versions: string;
18
24
  };
@@ -1 +1 @@
1
- {"version":3,"file":"conventions.d.ts","sourceRoot":"","sources":["../../src/scan/conventions.ts"],"names":[],"mappings":"AAAA,yDAAyD;AAEzD,MAAM,WAAW,WAAW;IAC1B,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,MAAM,EAAE,MAAM,CAAC;IACf,8EAA8E;IAC9E,IAAI,EAAE;QACJ,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,YAAY,EAAE,MAAM,CAAC;QACrB,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;QACnB,KAAK,EAAE,MAAM,CAAC;QACd,uFAAuF;QACvF,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAED,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB,EAAE,WAajC,CAAC;AAEF,wEAAwE;AACxE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;CACrC,CAAC;AAEF,6DAA6D;AAC7D,wBAAgB,kBAAkB,CAAC,KAAK,CAAC,E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C,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,GAAG,MAAM,CAE3E;AAED,sFAAsF;AACtF,wBAAgB,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,EAAE,CAEjE;AAED,6DAA6D;AAC7D,wBAAgB,WAAW,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,EAAE,CAM9D"}
@@ -11,6 +11,7 @@ export const DEFAULT_CONVENTIONS = {
11
11
  presenters: 'presenters',
12
12
  collectors: 'collectors',
13
13
  seeds: 'seeds',
14
+ rules: 'rules',
14
15
  versions: 'versions',
15
16
  },
16
17
  };
@@ -32,9 +33,10 @@ export function providerDirsOf(conventions) {
32
33
  }
33
34
  /** The frond vocabulary — every directory the scan reads. */
34
35
  export function frondDirsOf(conventions) {
35
- const { entities, handlers, presenters, collectors, seeds, versions } = conventions.dirs;
36
+ const { entities, handlers, presenters, collectors, seeds, rules, versions } = conventions.dirs;
36
37
  return [...new Set([
37
- entities, handlers, presenters, collectors, seeds, versions, ...providerDirsOf(conventions),
38
+ entities, handlers, presenters, collectors, seeds, rules, versions,
39
+ ...providerDirsOf(conventions),
38
40
  ])];
39
41
  }
40
42
  //# sourceMappingURL=conventions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"conventions.js","sourceRoot":"","sources":["../../src/scan/conventions.ts"],"names":[],"mappings":"AAAA,yDAAyD;AAqBzD,6EAA6E;AAC7E,MAAM,CAAC,MAAM,mBAAmB,GAAgB;IAC9C,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE;QACJ,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,UAAU;QACpB,YAAY,EAAE,cAAc;QAC5B,UAAU,EAAE,YAAY;QACxB,UAAU,EAAE,YAAY;QACxB,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,UAAU;KACrB;CACF,CAAC;AASF,6DAA6D;AAC7D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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fougere/core",
3
- "version": "0.8.0-alpha.0",
3
+ "version": "0.8.2-alpha.0",
4
4
  "description": "The core — scan, call contract, façades, remote stand-ins.",
5
5
  "keywords": [
6
6
  "fougere",
@@ -56,8 +56,8 @@
56
56
  "dependencies": {
57
57
  "@typescript/typescript6": "^6.0.2",
58
58
  "dequal": "^2.0.3",
59
- "@fougere/container": "0.8.0-alpha.0",
60
- "@fougere/schema": "0.8.0-alpha.0"
59
+ "@fougere/container": "0.8.2-alpha.0",
60
+ "@fougere/schema": "0.8.2-alpha.0"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@types/node": "^22.0.0"
@@ -0,0 +1,102 @@
1
+ /** What a handler file declares besides its handler. */
2
+ import type ts from '@typescript/typescript6';
3
+ import { readFile } from 'node:fs/promises';
4
+ import type { HandlerEntry } from './descriptor/frond.js';
5
+
6
+ let _ts: typeof ts | undefined;
7
+ async function loadTs(): Promise<typeof ts> {
8
+ if (!_ts) _ts = (await import('@typescript/typescript6')).default;
9
+ return _ts;
10
+ }
11
+
12
+ export interface HandlerDeclaration {
13
+ /** Stable rule name — the same vocabulary `verify()` uses. */
14
+ rule: 'handler-declaration';
15
+ frond: string;
16
+ filePath: string;
17
+ /** The handler that hosts it. */
18
+ handler: string;
19
+ /** What is declared — `AGREED_WITHIN`, `says`, `Assessment`. */
20
+ subject: string;
21
+ /** What it is in the source: a value, or a shape. */
22
+ kind: 'value' | 'shape';
23
+ message: string;
24
+ }
25
+
26
+ function subjectsOf(typescript: typeof ts, source: ts.SourceFile): [string, 'value' | 'shape'][] {
27
+ const found: [string, 'value' | 'shape'][] = [];
28
+
29
+ for (const statement of source.statements) {
30
+ if (typescript.isVariableStatement(statement)) {
31
+ for (const declared of statement.declarationList.declarations)
32
+ if (typescript.isIdentifier(declared.name)) found.push([declared.name.text, 'value']);
33
+ } else if (typescript.isFunctionDeclaration(statement) && statement.name) {
34
+ found.push([statement.name.text, 'value']);
35
+ } else if (
36
+ typescript.isInterfaceDeclaration(statement) ||
37
+ typescript.isTypeAliasDeclaration(statement) ||
38
+ typescript.isEnumDeclaration(statement)
39
+ ) {
40
+ found.push([statement.name.text, 'shape']);
41
+ }
42
+ }
43
+
44
+ return found;
45
+ }
46
+
47
+ /**
48
+ * Everything a handler file declares that is not the handler itself.
49
+ *
50
+ * A handler names gestures; what a gesture uses is declared where its nature says, and one
51
+ * question settles which: does it arrive INJECTED or IMPORTED? A threshold, a formula, a word
52
+ * list arrive imported and belong to the frond's own module, beside its entities. Anything
53
+ * holding a client, a connection or a cursor arrives injected and belongs under `services/`.
54
+ * Neither ever belongs in the file that calls it — nothing there can be reached by a second
55
+ * caller, and the handler grows into the domain it was supposed to address.
56
+ */
57
+ export async function handlerDeclarations(
58
+ fronds: readonly {
59
+ name: string;
60
+ handlers: readonly Pick<HandlerEntry, 'name' | 'filePath'>[];
61
+ }[],
62
+ ): Promise<HandlerDeclaration[]> {
63
+ const typescript = await loadTs();
64
+ const found: HandlerDeclaration[] = [];
65
+
66
+ for (const frond of fronds) {
67
+ for (const handler of frond.handlers) {
68
+ const text = await readFile(handler.filePath, 'utf8').catch(() => undefined);
69
+ if (text === undefined) continue;
70
+
71
+ const source = typescript.createSourceFile(
72
+ handler.filePath,
73
+ text,
74
+ typescript.ScriptTarget.Latest,
75
+ false,
76
+ );
77
+
78
+ for (const [subject, kind] of subjectsOf(typescript, source)) {
79
+ found.push({
80
+ rule: 'handler-declaration',
81
+ frond: frond.name,
82
+ filePath: handler.filePath,
83
+ handler: handler.name,
84
+ subject,
85
+ kind,
86
+ message:
87
+ kind === 'value'
88
+ ? `'${subject}' is declared in ${handler.name}, so only ${handler.name} can reach it. `
89
+ + `If it needs nothing but its arguments, it is a word of '${frond.name}' and belongs `
90
+ + `in a module beside its entities; if it holds a dependency, it is a service. Either `
91
+ + `way it is stated once and imported, and the handler keeps only the gesture.`
92
+ : `'${subject}' is declared in ${handler.name}, which makes the shape of what an `
93
+ + `operation answers readable only from the file that answers it. A shape belongs `
94
+ + `with the entity it describes, or in the frond's own module — where the caller, `
95
+ + `the test and the other operations can all name it.`,
96
+ });
97
+ }
98
+ }
99
+ }
100
+
101
+ return found;
102
+ }
package/src/declare.ts CHANGED
@@ -152,7 +152,12 @@ export function frond(name: string, declared: FrondDeclaration = {}): FrondDescr
152
152
  const ctor = ctorOf(c);
153
153
 
154
154
  return {
155
- typeName: subjectOf(ctor, 'collector').name,
155
+ // `lowerFirst`, the way the scan spells it: the boot looks a collector up by the key
156
+ // `computeBindingPlan` derives from a parameter's type, and that key is lowerFirst.
157
+ // Written as `User` here, the set held `User` while every lookup asked for `user` —
158
+ // so a handler taking one fell through to the request input, and the boot refused a
159
+ // contract it had everything to resolve.
160
+ typeName: lowerFirst(subjectOf(ctor, 'collector').name),
156
161
  ctor,
157
162
  deps: depsOf(c),
158
163
  filePath: '',
package/src/index.ts CHANGED
@@ -108,6 +108,8 @@ export { Fronds } from './descriptor/Fronds.js';
108
108
  export { verify, assertSplittable, type Violation } from './verify.js';
109
109
  // Same question as verify(), answered from the source text instead of the model.
110
110
  export type { CrossFrondImport } from './imports.js';
111
+ export type { HandlerDeclaration } from './declarations.js';
112
+ export type { OutsideConvention } from './placement.js';
111
113
  // Who is calling, established rather than accepted — the proof beside `state`'s claim.
112
114
  // `generateKeyPair` and `issueGrant` are NOT here: they make keys at a deployment and
113
115
  // need `node:crypto` for a gesture WebCrypto has no equal of. They sit on `/node`.
package/src/node.ts CHANGED
@@ -13,6 +13,8 @@ export { setModuleLoader, getModuleLoader } from './loader.js';
13
13
  export { loadConfig, loadCascadedConfig } from './config-loader.js';
14
14
  export { defineFrond } from './frond-config.js';
15
15
  export { crossFrondImports } from './imports.js';
16
+ export { handlerDeclarations } from './declarations.js';
17
+ export { outsideConventions } from './placement.js';
16
18
  export { adaptersOf } from './scan/adapters.js';
17
19
 
18
20
  // Making a key and binding a name to it happen once, at a deployment, on a machine with
@@ -0,0 +1,86 @@
1
+ /** A file inside a frond that no convention names. */
2
+ import { readdir } from 'node:fs/promises';
3
+ import { join } from 'node:path';
4
+ import { type Conventions, frondDirsOf } from './scan/conventions.js';
5
+ import type { FrondDescriptor } from './descriptor/frond.js';
6
+
7
+ export interface OutsideConvention {
8
+ /** Stable rule name — the same vocabulary `verify()` uses. */
9
+ rule: 'outside-convention';
10
+ frond: string;
11
+ filePath: string;
12
+ kind: 'file' | 'directory';
13
+ message: string;
14
+ }
15
+
16
+ /**
17
+ * `tests` is not a convention and is not an offence either: `@fougere/testing` reads the
18
+ * LEVEL a case runs at from where its file sits, so a frond holding its own tests is a
19
+ * supported shape (`demos/test-gradient`). The rest are outputs and installs, which are
20
+ * not the project's source at all.
21
+ */
22
+ const NOT_SOURCE = new Set(['tests', 'node_modules', 'dist', 'build', 'coverage']);
23
+
24
+ /** The one file a frond states about itself, at its root. */
25
+ const FROND_FILES = new Set(['frond.config.ts', 'package.json', 'tsconfig.json', 'README.md']);
26
+
27
+ /**
28
+ * What sits in a frond and belongs to no convention — a directory somebody invented, or a
29
+ * module dropped at the root.
30
+ *
31
+ * The eight names are the frond's whole vocabulary, and until now nothing said so: a scan
32
+ * READS them and steps over everything else in silence, so a file outside them is not
33
+ * refused, it is unseen. That silence is what lets a domain word settle wherever it was
34
+ * first needed — most often in the handler that used it, which is a second rule
35
+ * (`handler-declaration`) reporting the same drift one file lower.
36
+ *
37
+ * It names the addresses rather than describing them: a rule that says "put it somewhere
38
+ * better" is advice, and advice is what everybody already had.
39
+ */
40
+ export async function outsideConventions(
41
+ fronds: readonly Pick<FrondDescriptor, 'name' | 'source'>[],
42
+ conventions: Conventions,
43
+ ): Promise<OutsideConvention[]> {
44
+ const known = new Set(frondDirsOf(conventions));
45
+ const addresses = [...known].sort().join(', ');
46
+ const found: OutsideConvention[] = [];
47
+
48
+ for (const frond of fronds) {
49
+ const entries = await readdir(frond.source.path, { withFileTypes: true }).catch(() => []);
50
+
51
+ for (const entry of entries) {
52
+ if (entry.name.startsWith('.') || NOT_SOURCE.has(entry.name)) continue;
53
+ const filePath = join(frond.source.path, entry.name);
54
+
55
+ if (entry.isDirectory()) {
56
+ if (known.has(entry.name)) continue;
57
+ found.push({
58
+ rule: 'outside-convention',
59
+ frond: frond.name,
60
+ filePath,
61
+ kind: 'directory',
62
+ message: `'${entry.name}/' is a directory no convention names, so nothing in it is read `
63
+ + `as anything — it is a subject somebody filed under its own word. A frond's `
64
+ + `directories are ${addresses}. If what it holds computes with nothing injected it `
65
+ + `is \`${conventions.dirs.rules}/\`; if it holds a dependency it is `
66
+ + `\`${conventions.dirs.services}/\`.`,
67
+ });
68
+ continue;
69
+ }
70
+
71
+ if (!entry.name.endsWith('.ts') || FROND_FILES.has(entry.name)) continue;
72
+ found.push({
73
+ rule: 'outside-convention',
74
+ frond: frond.name,
75
+ filePath,
76
+ kind: 'file',
77
+ message: `'${entry.name}' sits at the root of '${frond.name}', where the frond states `
78
+ + `itself and nothing else. A frond's directories are ${addresses} — this one belongs `
79
+ + `in \`${conventions.dirs.rules}/\` if it computes with nothing injected, in `
80
+ + `\`${conventions.dirs.services}/\` if it holds a dependency.`,
81
+ });
82
+ }
83
+ }
84
+
85
+ return found;
86
+ }
@@ -14,6 +14,12 @@ export interface Conventions {
14
14
  presenters: string;
15
15
  collectors: string;
16
16
  seeds: string;
17
+ /**
18
+ * What the domain computes with nothing injected. Read into the type program, because
19
+ * a handler names one of its types in a signature, and registered nowhere: no class
20
+ * here answers a container key.
21
+ */
22
+ rules: string;
17
23
  /** What its shapes used to be — written by `fougere freeze`, replayed by `migrate`. */
18
24
  versions: string;
19
25
  };
@@ -31,6 +37,7 @@ export const DEFAULT_CONVENTIONS: Conventions = {
31
37
  presenters: 'presenters',
32
38
  collectors: 'collectors',
33
39
  seeds: 'seeds',
40
+ rules: 'rules',
34
41
  versions: 'versions',
35
42
  },
36
43
  };
@@ -63,8 +70,9 @@ export function providerDirsOf(conventions: Conventions): string[] {
63
70
 
64
71
  /** The frond vocabulary — every directory the scan reads. */
65
72
  export function frondDirsOf(conventions: Conventions): string[] {
66
- const { entities, handlers, presenters, collectors, seeds, versions } = conventions.dirs;
73
+ const { entities, handlers, presenters, collectors, seeds, rules, versions } = conventions.dirs;
67
74
  return [...new Set([
68
- entities, handlers, presenters, collectors, seeds, versions, ...providerDirsOf(conventions),
75
+ entities, handlers, presenters, collectors, seeds, rules, versions,
76
+ ...providerDirsOf(conventions),
69
77
  ])];
70
78
  }