@fougere/core 0.9.2-alpha.0 → 0.9.3-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/dist/boot/declared.d.ts +29 -0
- package/dist/boot/declared.d.ts.map +1 -0
- package/dist/boot/declared.js +67 -0
- package/dist/boot/declared.js.map +1 -0
- package/dist/boot/install.d.ts.map +1 -1
- package/dist/boot/install.js +2 -1
- package/dist/boot/install.js.map +1 -1
- package/dist/boot/ownership.d.ts +2 -0
- package/dist/boot/ownership.d.ts.map +1 -1
- package/dist/boot/ownership.js +17 -0
- package/dist/boot/ownership.js.map +1 -1
- package/dist/boot/types.d.ts +1 -1
- package/dist/boot/types.d.ts.map +1 -1
- package/dist/config-loader.d.ts +0 -1
- package/dist/config-loader.d.ts.map +1 -1
- package/dist/config-loader.js.map +1 -1
- package/dist/contract.d.ts +1 -1
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js.map +1 -1
- package/dist/effective-operation.d.ts +20 -0
- package/dist/effective-operation.d.ts.map +1 -1
- package/dist/effective-operation.js +17 -0
- package/dist/effective-operation.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/prefab/crud.d.ts.map +1 -1
- package/dist/prefab/crud.js +5 -2
- package/dist/prefab/crud.js.map +1 -1
- package/dist/scan.d.ts +1 -1
- package/dist/scan.d.ts.map +1 -1
- package/dist/wire/call.d.ts +26 -1
- package/dist/wire/call.d.ts.map +1 -1
- package/dist/wire/call.js +1 -1
- package/dist/wire/call.js.map +1 -1
- package/dist/wire/signature.d.ts +1 -2
- package/dist/wire/signature.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/boot/declared.ts +88 -0
- package/src/boot/install.ts +2 -1
- package/src/boot/ownership.ts +21 -0
- package/src/boot/types.ts +1 -1
- package/src/config-loader.ts +0 -1
- package/src/contract.ts +4 -1
- package/src/effective-operation.ts +41 -0
- package/src/index.ts +6 -0
- package/src/prefab/crud.ts +5 -2
- package/src/scan.ts +1 -1
- package/src/wire/call.ts +29 -1
- package/src/wire/signature.ts +1 -2
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","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;AAEjE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,EAAuC,MAAM,YAAY,CAAC;AAC5G,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,UAAU,EAA8F,MAAM,wBAAwB,CAAC;AAChJ,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,uFAAuF;AACvF,yEAAyE;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAkB,MAAM,eAAe,CAAC;AAOzE,OAAO,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O,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,gGAAgG;AAChG,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAIjD,OAAO,EACoC,mBAAmB,EAC5D,kBAAkB,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,GAC9D,MAAM,kBAAkB,CAAC;AAa1B,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAkB,MAAM,aAAa,CAAC;AACrD,iFAAiF;AACjF,uFAAuF;AACvF,sFAAsF;AACtF,mFAAmF;AACnF,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crud.d.ts","sourceRoot":"","sources":["../../src/prefab/crud.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,iBAAiB,EAAmB,MAAM,iBAAiB,CAAC;AACtF,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAInD;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAIhE;
|
|
1
|
+
{"version":3,"file":"crud.d.ts","sourceRoot":"","sources":["../../src/prefab/crud.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,iBAAiB,EAAmB,MAAM,iBAAiB,CA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/prefab/crud.js
CHANGED
|
@@ -25,8 +25,11 @@ const fromBody = { name: 'input', source: { kind: 'input' }, optional: false };
|
|
|
25
25
|
const idParam = { name: 'id', type: { raw: 'string', name: 'string' } };
|
|
26
26
|
const inputParam = (entity) => ({ name: 'input', type: { raw: `Partial<${entity}>`, name: entity } });
|
|
27
27
|
const returns = (raw, name, extra) => ({ raw, name, ...extra });
|
|
28
|
-
/**
|
|
29
|
-
|
|
28
|
+
/**
|
|
29
|
+
* The five ops a Crud handler brings, declared rather than discovered.
|
|
30
|
+
*
|
|
31
|
+
* `output` says the entity, and saying it costs nothing at runtime.
|
|
32
|
+
*/
|
|
30
33
|
function crudOps(entity) {
|
|
31
34
|
const name = entity.name ?? 'Entity';
|
|
32
35
|
const input = inputParam(name);
|
package/dist/prefab/crud.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crud.js","sourceRoot":"","sources":["../../src/prefab/crud.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA2C,MAAM,iBAAiB,CAAC;AAGtF,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,IAAa;IACxC,MAAM,KAAK,GAAI,IAA4D,EAAE,SAAS,CAAC;IAEvF,OAAO,OAAO,KAAK,EAAE,IAAI,KAAK,UAAU,IAAI,OAAO,KAAK,EAAE,QAAQ,KAAK,UAAU,CAAC;AACpF,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,IAAa,EAAE,OAAe;IACtD,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE9B,OAAO,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;AAC1D,CAAC;AAED,8EAA8E;AAC9E,MAAM,IAAI,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE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CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACxF,KAAK,CAAC,MAAM,CAAC,KAAiB,IAAgB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAClF,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,KAAiB,IAAgB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;QAClG,KAAK,CAAC,MAAM,CAAC,EAAU,IAAsB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;KAC/E,CAAC,CAAC;AACL,CAAC"}
|
package/dist/scan.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Fronds } from './descriptor/Fronds.js';
|
|
2
|
-
/** Result of scanning a project directory. */
|
|
3
2
|
/** Something the scan could NOT do — recorded instead of swallowed. */
|
|
4
3
|
export interface ScanDiagnostic {
|
|
5
4
|
/**
|
|
@@ -20,6 +19,7 @@ export interface ScanDiagnostic {
|
|
|
20
19
|
/** The underlying failure, kept whole. */
|
|
21
20
|
cause?: unknown;
|
|
22
21
|
}
|
|
22
|
+
/** Result of scanning a project directory. */
|
|
23
23
|
export interface ScanResult {
|
|
24
24
|
fronds: Fronds;
|
|
25
25
|
/** What the scan could not do. Empty is a claim, not a default — see {@link ScanDiagnostic}. */
|
package/dist/scan.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scan.d.ts","sourceRoot":"","sources":["../src/scan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAErD,
|
|
1
|
+
{"version":3,"file":"scan.d.ts","sourceRoot":"","sources":["../src/scan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAErD,uEAAuE;AACvE,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,QAAQ,EAAE,UAAU,GAAG,SAAS,CAAC;IACjC,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4EAA4E;IAC5E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4EAA4E;IAC5E,OAAO,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,8CAA8C;AAC9C,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,gGAAgG;IAChG,WAAW,EAAE,cAAc,EAAE,CAAC;CAC/B"}
|
package/dist/wire/call.d.ts
CHANGED
|
@@ -19,9 +19,9 @@ export interface FrondCall {
|
|
|
19
19
|
}
|
|
20
20
|
/** A transport executes a call somewhere else. Failures surface as thrown FougereError. */
|
|
21
21
|
export type Transport = (call: FrondCall, invocation: InvocationContext) => Promise<unknown>;
|
|
22
|
-
/** Reserved namespace — calls the runner answers itself, never a façade. */
|
|
23
22
|
/** What a receiver accepts before it stops reading an input. */
|
|
24
23
|
export declare const MAX_BODY_BYTES: number;
|
|
24
|
+
/** Reserved namespace — calls the runner answers itself, never a façade. */
|
|
25
25
|
export declare const RPC_ENTITY = "rpc";
|
|
26
26
|
/** What an `rpc` op answers — the door for what the app says about ITSELF, never about a row. */
|
|
27
27
|
export type RpcAnswer = (invocation: InvocationContext, surface?: string) => unknown;
|
|
@@ -82,6 +82,30 @@ export interface Edge {
|
|
|
82
82
|
count: number;
|
|
83
83
|
errors: number;
|
|
84
84
|
}
|
|
85
|
+
/** A frond the config knows of, and where it says to reach it. */
|
|
86
|
+
export interface DeclaredFrond {
|
|
87
|
+
frond: string;
|
|
88
|
+
placement: 'local' | 'remote';
|
|
89
|
+
/**
|
|
90
|
+
* Host and port of the address `remotes:` names, absent when the frond runs here. Never the
|
|
91
|
+
* whole address: a declared one may carry credentials, and this answer leaves the process.
|
|
92
|
+
*/
|
|
93
|
+
at?: string;
|
|
94
|
+
}
|
|
95
|
+
/** One frond reaching another, read from a handler's dependencies rather than from a call. */
|
|
96
|
+
export interface DeclaredEdge {
|
|
97
|
+
from: string;
|
|
98
|
+
to: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* What the config SAYS, beside what the runtime SAW. The two disagree exactly when something
|
|
102
|
+
* is misconfigured, and a frond that never answered is absent from the observed half — so
|
|
103
|
+
* without this one, nothing tells a silent dependency from an absent one.
|
|
104
|
+
*/
|
|
105
|
+
export interface DeclaredTopology {
|
|
106
|
+
fronds: DeclaredFrond[];
|
|
107
|
+
edges: DeclaredEdge[];
|
|
108
|
+
}
|
|
85
109
|
/** The shape of the system as ONE process discovered it — the answer to `rpc.topology`. */
|
|
86
110
|
export interface TopologyReport {
|
|
87
111
|
/** When this process started counting — an edge count is read against it. */
|
|
@@ -90,6 +114,7 @@ export interface TopologyReport {
|
|
|
90
114
|
active: number;
|
|
91
115
|
fronds: FrondPlacement[];
|
|
92
116
|
edges: Edge[];
|
|
117
|
+
declared: DeclaredTopology;
|
|
93
118
|
}
|
|
94
119
|
/** The shape a card must have to be walked — `fronds`, and each frond's `doors`. */
|
|
95
120
|
export declare function assertIdentityCard(value: unknown, source: string): IdentityCard;
|
package/dist/wire/call.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call.d.ts","sourceRoot":"","sources":["../../src/wire/call.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,EAAQ,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAE9D,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC7F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,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AAM,GAAG,YAAY,CAS/E;AAYD,yFAAyF;AAEzF,2FAA2F;AAC3F,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI;KACrB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,MAAM,CAAC,GACtD,CAAC,UAAU,CAAC,EAAE,iBAAiB,KAAK,CAAC,GACrC,KAAK;CACV,CAAC;AAEF,4EAA4E;AAC5E,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAExE;AAED,4EAA4E;AAC5E,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAE3E"}
|
package/dist/wire/call.js
CHANGED
|
@@ -10,9 +10,9 @@ export class Call {
|
|
|
10
10
|
Object.freeze(this);
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
/** Reserved namespace — calls the runner answers itself, never a façade. */
|
|
14
13
|
/** What a receiver accepts before it stops reading an input. */
|
|
15
14
|
export const MAX_BODY_BYTES = 1024 * 1024;
|
|
15
|
+
/** Reserved namespace — calls the runner answers itself, never a façade. */
|
|
16
16
|
export const RPC_ENTITY = 'rpc';
|
|
17
17
|
/** The shape a card must have to be walked — `fronds`, and each frond's `doors`. */
|
|
18
18
|
export function assertIdentityCard(value, source) {
|
package/dist/wire/call.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call.js","sourceRoot":"","sources":["../../src/wire/call.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAkD,MAAM,iBAAiB,CAAC;AAE7F,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEtD,kFAAkF;AAClF,MAAM,OAAO,IAAI;IACN,OAAO,CAAe;IACtB,UAAU,CAAa;IAEhC,YAAY,OAAqB,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AAK,CAAC,IAAI,KAAK,QAAQ;YAAE,MAAM,WAAW,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;QAChG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;YAAE,MAAM,WAAW,CAAC,MAAM,EAAE,UAAU,KAAK,CAAC,IAAI,4BAA4B,CAAC,CAAC;IAC/G,CAAC;IACD,OAAO,IAAoB,CAAC;AAC9B,CAAC;AAED,SAAS,WAAW,CAAC,MAAc,EAAE,IAAY;IAC/C,OAAO,IAAI,YAAY,CAAC;QACtB,IAAI,EAAE,SAAS,CAAC,cAAc;QAC9B,OAAO,EACL,GAAG,MAAM,uCAAuC,IAAI,KAAK;cACvD,mGAAmG;cACnG,+FAA+F;KACpG,CAAC,CAAC;AACL,CAAC;AAWD,4EAA4E;AAC5E,MAAM,UAAU,WAAW,CAAC,UAAkB,EAAE,OAAgB;IAC9D,OAAO,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,IAAI,UAAU,SAAS,CAAC,CAAC,CAAC,GAAG,UAAU,SAAS,CAAC;AAC9E,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,cAAc,CAAC,UAAkB,EAAE,OAAgB;IACjE,OAAO,GAAG,WAAW,CAAC,UAAU,EAAE,OAAO,CAAC,YAAY,CAAC;AACzD,CAAC"}
|
package/dist/wire/signature.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/** A method's signature, as a contract is built from it — the shape, never the reading. */
|
|
2
1
|
/** A type reference — primitives, entities, arrays, generics. */
|
|
3
2
|
export interface TypeRef {
|
|
4
3
|
/** Raw type text as written in source (e.g. 'Pagination<Post>'). */
|
|
@@ -24,7 +23,7 @@ export interface Param {
|
|
|
24
23
|
type: TypeRef;
|
|
25
24
|
optional?: boolean;
|
|
26
25
|
}
|
|
27
|
-
/** A method signature. */
|
|
26
|
+
/** A method's signature, as a contract is built from it — the shape, never the reading. */
|
|
28
27
|
export interface Signature {
|
|
29
28
|
name: string;
|
|
30
29
|
params: Param[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signature.d.ts","sourceRoot":"","sources":["../../src/wire/signature.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"signature.d.ts","sourceRoot":"","sources":["../../src/wire/signature.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,WAAW,OAAO;IACtB,oEAAoE;IACpE,GAAG,EAAE,MAAM,CAAC;IACZ,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,6BAA6B;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mEAAmE;IACnE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,oCAAoC;AACpC,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,2FAA2F;AAC3F,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,+DAA+D;IAC/D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,+EAA+E;IAC/E,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fougere/core",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3-alpha.0",
|
|
4
4
|
"description": "The core — scan, call contract, façades, remote stand-ins.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fougere",
|
|
@@ -61,12 +61,12 @@
|
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@typescript/typescript6": "^6.0.2",
|
|
63
63
|
"dequal": "^2.0.3",
|
|
64
|
-
"@fougere/container": "0.9.
|
|
65
|
-
"@fougere/schema": "0.9.
|
|
64
|
+
"@fougere/container": "0.9.3-alpha.0",
|
|
65
|
+
"@fougere/schema": "0.9.3-alpha.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@types/node": "^22.0.0",
|
|
69
|
-
"@fougere/compiler": "0.9.
|
|
69
|
+
"@fougere/compiler": "0.9.3-alpha.0"
|
|
70
70
|
},
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What an app says about its NEIGHBOURS — the dual of the identity card, which says what it IS.
|
|
3
|
+
*
|
|
4
|
+
* Documented: [observability](https://fougere.dev/docs/infra/observability).
|
|
5
|
+
*/
|
|
6
|
+
import type { FrondDescriptor } from '../descriptor/frond.js';
|
|
7
|
+
import { facadeKeyOf, type DeclaredEdge, type DeclaredFrond, type DeclaredTopology } from '../wire/call.js';
|
|
8
|
+
|
|
9
|
+
interface Declaring {
|
|
10
|
+
fronds: readonly FrondDescriptor[];
|
|
11
|
+
remotes: Readonly<Record<string, string>>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** Read from the config and the scan, never from a call, so nothing has to answer for it. */
|
|
15
|
+
export function declaredTopologyOf({ fronds, remotes }: Declaring): DeclaredTopology {
|
|
16
|
+
const hosted = fronds.filter((frond) => !frond.brought);
|
|
17
|
+
|
|
18
|
+
return { fronds: placements(hosted, remotes), edges: crossings(hosted) };
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function placements(hosted: readonly FrondDescriptor[], remotes: Readonly<Record<string, string>>): DeclaredFrond[] {
|
|
22
|
+
const here = hosted
|
|
23
|
+
.filter((frond) => !remotes[frond.name])
|
|
24
|
+
.map((frond) => ({ frond: frond.name, placement: 'local' as const }));
|
|
25
|
+
|
|
26
|
+
const elsewhere = Object.entries(remotes)
|
|
27
|
+
.map(([frond, address]) => ({ frond, placement: 'remote' as const, at: hostOf(address) }));
|
|
28
|
+
|
|
29
|
+
return [...here, ...elsewhere];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Which frond serves each address — indexed FORWARD, so a dependency is recognized by what
|
|
34
|
+
* answers it and never by its spelling. A surface is left out: its key carries a `:`, and no
|
|
35
|
+
* dependency can name one.
|
|
36
|
+
*/
|
|
37
|
+
export function servedBy(fronds: readonly FrondDescriptor[]): Map<string, string> {
|
|
38
|
+
const index = new Map<string, string>();
|
|
39
|
+
for (const frond of fronds) {
|
|
40
|
+
if (frond.brought) continue;
|
|
41
|
+
for (const handler of frond.handlers) {
|
|
42
|
+
if (handler.surface) continue;
|
|
43
|
+
index.set(facadeKeyOf(handler.address), frond.name);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return index;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The fronds one class reaches through a façade — the only sanctioned crossing.
|
|
52
|
+
*
|
|
53
|
+
* An address no scanned frond serves is left out rather than guessed: naming the frond behind it
|
|
54
|
+
* means reading its card, and a card is a DISCOVERY, which belongs to the other half of the
|
|
55
|
+
* report. This answers what the CODE declares, and never more.
|
|
56
|
+
*/
|
|
57
|
+
export function reachedBy(deps: readonly string[], from: string, index: Map<string, string>): string[] {
|
|
58
|
+
const reached = deps
|
|
59
|
+
.map((dependency) => index.get(dependency))
|
|
60
|
+
.filter((frond): frond is string => frond !== undefined && frond !== from);
|
|
61
|
+
|
|
62
|
+
return [...new Set(reached)];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function crossings(hosted: readonly FrondDescriptor[]): DeclaredEdge[] {
|
|
66
|
+
const index = servedBy(hosted);
|
|
67
|
+
const found = new Map<string, DeclaredEdge>();
|
|
68
|
+
|
|
69
|
+
for (const frond of hosted) {
|
|
70
|
+
for (const handler of frond.handlers) {
|
|
71
|
+
for (const to of reachedBy(handler.deps, frond.name, index)) {
|
|
72
|
+
found.set(`${frond.name} ${to}`, { from: frond.name, to });
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return [...found.values()];
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function hostOf(address: string): string {
|
|
81
|
+
try {
|
|
82
|
+
const url = new URL(address);
|
|
83
|
+
|
|
84
|
+
return `${url.protocol}//${url.host}`;
|
|
85
|
+
} catch {
|
|
86
|
+
return address;
|
|
87
|
+
}
|
|
88
|
+
}
|
package/src/boot/install.ts
CHANGED
|
@@ -14,7 +14,7 @@ import type { CreateAppOptions } from './types.js';
|
|
|
14
14
|
import { registerFrames } from './together.js';
|
|
15
15
|
import { HandlerFacade } from '../dispatch/HandlerFacade.js';
|
|
16
16
|
import { targetOf } from '../prefab/prefab.js';
|
|
17
|
-
import { ownersOf, refuseStorageInUserCode, refuseCrudOnOwned } from './ownership.js';
|
|
17
|
+
import { ownersOf, refuseSharedName, refuseStorageInUserCode, refuseCrudOnOwned } from './ownership.js';
|
|
18
18
|
import { StorageGuard } from '../dispatch/StorageGuard.js';
|
|
19
19
|
import { portBindings, seamChains, wrapping, SEAMS } from './ports.js';
|
|
20
20
|
import { facadeKeyOf, contractsKeyOf } from '../wire/call.js';
|
|
@@ -117,6 +117,7 @@ export async function installFrond(frond: FrondDescriptor, assembly: Assembly):
|
|
|
117
117
|
|
|
118
118
|
// Who owns what, and the rule that makes owning mean something. Before anything is
|
|
119
119
|
// registered, so a bad line is named by this refusal rather than by the container's.
|
|
120
|
+
refuseSharedName(frond);
|
|
120
121
|
const owners = ownersOf(frond.providers);
|
|
121
122
|
refuseStorageInUserCode(frond, owners, (entity) => entityByName.has(entity));
|
|
122
123
|
refuseCrudOnOwned(frond, owners);
|
package/src/boot/ownership.ts
CHANGED
|
@@ -5,6 +5,27 @@ import { targetOf } from '../prefab/prefab.js';
|
|
|
5
5
|
import { ownedBy, repositoryKeyOf } from '../prefab/repository.js';
|
|
6
6
|
import { entityOfStorageKey } from '../storage/port.js';
|
|
7
7
|
|
|
8
|
+
/** One name, one file: two providers under one key and the second silently replaces the first. */
|
|
9
|
+
export function refuseSharedName(frond: FrondDescriptor): void {
|
|
10
|
+
const declared = new Map<string, string>();
|
|
11
|
+
|
|
12
|
+
for (const provider of frond.providers) {
|
|
13
|
+
const name = nameOf(provider);
|
|
14
|
+
const first = declared.get(name);
|
|
15
|
+
if (first !== undefined) {
|
|
16
|
+
throw new Error(
|
|
17
|
+
`[provider] two files declare ${name}:\n`
|
|
18
|
+
+ ` ${first}\n`
|
|
19
|
+
+ ` ${provider.filePath}\n`
|
|
20
|
+
+ ` A frond registers both under one key, so the second replaces the first and whoever `
|
|
21
|
+
+ `asks for ${name} is handed whichever was scanned last.\n`
|
|
22
|
+
+ ' Rename one of the two.',
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
declared.set(name, provider.filePath);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
8
29
|
/** Who owns an entity's storage. */
|
|
9
30
|
export function ownersOf(providers: readonly ProviderEntry[]): Map<string, string> {
|
|
10
31
|
const owners = new Map<string, string>();
|
package/src/boot/types.ts
CHANGED
|
@@ -137,9 +137,9 @@ export interface App extends DispatchPort {
|
|
|
137
137
|
extensions(): string[];
|
|
138
138
|
/** Declare one `rpc` op — what the app says about ITSELF, beside the card. */
|
|
139
139
|
serveRpc(operationName: string, answer: RpcAnswer): void;
|
|
140
|
-
/** Register a global app middleware (runs on every operation). */
|
|
141
140
|
/** Watch every dispatch transition; the returned function unsubscribes. */
|
|
142
141
|
observe(observer: DispatchObserver): () => void;
|
|
142
|
+
/** Register a global app middleware (runs on every operation). */
|
|
143
143
|
use(middleware: AppMiddleware): void;
|
|
144
144
|
/** Register an app middleware scoped to a specific entity. */
|
|
145
145
|
use(entity: string, middleware: AppMiddleware): void;
|
package/src/config-loader.ts
CHANGED
|
@@ -21,7 +21,6 @@ export interface FougereConfig {
|
|
|
21
21
|
logLevel?: LogLevel;
|
|
22
22
|
/** Remote fronds — frondName → base URL. */
|
|
23
23
|
remotes?: Record<string, string>;
|
|
24
|
-
/** Which realization answers which port — port class name → implementation class name. */
|
|
25
24
|
/** What answers a port — a name, or the chain from the outside in. */
|
|
26
25
|
ports?: Record<string, string | readonly string[]>;
|
|
27
26
|
/** Auth declaration — picks a provider package and forwards options to it. */
|
package/src/contract.ts
CHANGED
|
@@ -30,7 +30,10 @@ export { driftOf, agrees, explain } from './wire/drift.js';
|
|
|
30
30
|
export type { CardDrift } from './wire/drift.js';
|
|
31
31
|
|
|
32
32
|
/** What `rpc.discover` answers. */
|
|
33
|
-
export type {
|
|
33
|
+
export type {
|
|
34
|
+
IdentityCard, CardOp, TopologyReport, FrondPlacement, Edge,
|
|
35
|
+
DeclaredTopology, DeclaredFrond, DeclaredEdge,
|
|
36
|
+
} from './wire/call.js';
|
|
34
37
|
export { assertIdentityCard } from './wire/call.js';
|
|
35
38
|
|
|
36
39
|
/** The key a class name is filed under — 'Post' → 'post'. */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** The operation model after every declaration and convention has been resolved. */
|
|
2
2
|
import { lowerFirst, type SchemaView } from '@fougere/schema';
|
|
3
3
|
import { statementDrift } from './boot/statement-drift.js';
|
|
4
|
+
import { reachedBy, servedBy } from './boot/declared.js';
|
|
4
5
|
import { computeBindingPlan, type BindingPlan } from './wire/binding.js';
|
|
5
6
|
import { targetOf } from './prefab/prefab.js';
|
|
6
7
|
import type { CollectorEntry, FrondDescriptor, HandlerEntry } from './descriptor/frond.js';
|
|
@@ -69,6 +70,23 @@ export interface EffectiveOperation extends OperationContract {
|
|
|
69
70
|
runtime: 'local' | 'remote';
|
|
70
71
|
remote?: string;
|
|
71
72
|
};
|
|
73
|
+
/**
|
|
74
|
+
* What running this op reaches, and how much of that crosses a process.
|
|
75
|
+
*
|
|
76
|
+
* `placement` says where the op ANSWERS; this says where it GOES. The pair is what every
|
|
77
|
+
* number a process hard-codes is really a function of — how often a trace is sampled, where
|
|
78
|
+
* a latency histogram's bounds should sit, what a load threshold may assume. An op that
|
|
79
|
+
* answers here and hops twice is not the same subject as one that answers here and hops none.
|
|
80
|
+
*
|
|
81
|
+
* Read from the handler, never from the op: a dependency is declared on the constructor, so
|
|
82
|
+
* the crossing belongs to the CLASS. Every op of one handler reaches the same fronds, and
|
|
83
|
+
* saying otherwise would dress a structural fact as a precise effect.
|
|
84
|
+
*/
|
|
85
|
+
reach: {
|
|
86
|
+
fronds: { frond: string; runtime: 'local' | 'remote' }[];
|
|
87
|
+
/** How many of them are a process away — zero when everything it reaches runs here. */
|
|
88
|
+
hops: number;
|
|
89
|
+
};
|
|
72
90
|
exposure: {
|
|
73
91
|
surfaces: string[];
|
|
74
92
|
adapters: string[];
|
|
@@ -80,6 +98,26 @@ export interface EffectiveOperation extends OperationContract {
|
|
|
80
98
|
|
|
81
99
|
export type EffectiveOperationsMap = Map<string, EffectiveOperation>;
|
|
82
100
|
|
|
101
|
+
/**
|
|
102
|
+
* Where an op's work goes: the fronds its handler reaches, and how many are a process away.
|
|
103
|
+
*
|
|
104
|
+
* A frond this app never scanned is not among them. The report can say a call LEFT — that is
|
|
105
|
+
* `placement` — but naming what is on the far side of an address means reading its card, and a
|
|
106
|
+
* card is a discovery rather than a declaration.
|
|
107
|
+
*/
|
|
108
|
+
function reachOf(
|
|
109
|
+
deps: readonly string[],
|
|
110
|
+
from: string,
|
|
111
|
+
index: Map<string, string>,
|
|
112
|
+
remotes: Record<string, string>,
|
|
113
|
+
): EffectiveOperation['reach'] {
|
|
114
|
+
const fronds = reachedBy(deps, from, index)
|
|
115
|
+
.sort()
|
|
116
|
+
.map((frond) => ({ frond, runtime: (remotes[frond] ? 'remote' : 'local') as 'local' | 'remote' }));
|
|
117
|
+
|
|
118
|
+
return { fronds, hops: fronds.filter((one) => one.runtime === 'remote').length };
|
|
119
|
+
}
|
|
120
|
+
|
|
83
121
|
/** The absence rules every door normalises to before the handler is invoked. */
|
|
84
122
|
export const EFFECTIVE_OPERATION_SEMANTICS = Object.freeze({
|
|
85
123
|
optional: 'undefined' as const,
|
|
@@ -131,6 +169,8 @@ export function resolveEffectiveOperations(
|
|
|
131
169
|
const schemas = new Map(
|
|
132
170
|
fronds.flatMap((frond) => frond.entities.map((entity) => [entity.name, entity.entityClass] as const)),
|
|
133
171
|
);
|
|
172
|
+
/** Every address a frond answers, so a dependency naming one is read as the crossing it is. */
|
|
173
|
+
const served = servedBy(fronds);
|
|
134
174
|
|
|
135
175
|
// Input ambiguity is produced where schemas are available (the scanner), but it is a
|
|
136
176
|
// resolution failure. Lift it into the same refusal table as kind/binding/topology.
|
|
@@ -285,6 +325,7 @@ export function resolveEffectiveOperations(
|
|
|
285
325
|
runtime: remote ? 'remote' : 'local',
|
|
286
326
|
...(remote ? { remote } : {}),
|
|
287
327
|
},
|
|
328
|
+
reach: reachOf(handler.deps, frond.name, served, options.remotes ?? {}),
|
|
288
329
|
exposure: {
|
|
289
330
|
surfaces: servedSurfaces(frond, handler).map((surface) => surface ?? 'default'),
|
|
290
331
|
adapters: exposedAdapters(handler, options.adapters),
|
package/src/index.ts
CHANGED
|
@@ -48,6 +48,9 @@ export type { Declared, FrondDeclaration, DeclaredSubject } from './declare.js';
|
|
|
48
48
|
// only by tests through a deep path — a consumer comparing its own card to a producer's
|
|
49
49
|
// had to dispatch a call to ask a question about itself.
|
|
50
50
|
export { identityCardOf } from './boot/card.js';
|
|
51
|
+
// Its dual: what the app declares about its NEIGHBOURS. Read by `rpc.topology`, by
|
|
52
|
+
// `@fougere/calls` and by `fougere graph`, which each held their own half of it.
|
|
53
|
+
export { declaredTopologyOf } from './boot/declared.js';
|
|
51
54
|
export type { Facade } from './wire/call.js';
|
|
52
55
|
export type {
|
|
53
56
|
FrondCall,
|
|
@@ -57,6 +60,9 @@ export type {
|
|
|
57
60
|
TopologyReport,
|
|
58
61
|
FrondPlacement,
|
|
59
62
|
Edge,
|
|
63
|
+
DeclaredTopology,
|
|
64
|
+
DeclaredFrond,
|
|
65
|
+
DeclaredEdge,
|
|
60
66
|
} from './contract.js';
|
|
61
67
|
export { type Emit, type Fact, type Pipe } from './wire/emit.js';
|
|
62
68
|
export { callValueOf } from './contract.js';
|
package/src/prefab/crud.ts
CHANGED
|
@@ -35,8 +35,11 @@ const inputParam = (entity: string) => ({ name: 'input', type: { raw: `Partial<$
|
|
|
35
35
|
const returns = (raw: string, name: string, extra?: { array?: boolean; nullable?: boolean }) =>
|
|
36
36
|
({ raw, name, ...extra });
|
|
37
37
|
|
|
38
|
-
/**
|
|
39
|
-
|
|
38
|
+
/**
|
|
39
|
+
* The five ops a Crud handler brings, declared rather than discovered.
|
|
40
|
+
*
|
|
41
|
+
* `output` says the entity, and saying it costs nothing at runtime.
|
|
42
|
+
*/
|
|
40
43
|
function crudOps(entity: SchemaView & { partial?: () => SchemaView }): Record<string, OperationContract> {
|
|
41
44
|
const name = (entity as { name?: string }).name ?? 'Entity';
|
|
42
45
|
const input = inputParam(name);
|
package/src/scan.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Fronds } from './descriptor/Fronds.js';
|
|
2
2
|
|
|
3
|
-
/** Result of scanning a project directory. */
|
|
4
3
|
/** Something the scan could NOT do — recorded instead of swallowed. */
|
|
5
4
|
export interface ScanDiagnostic {
|
|
6
5
|
/**
|
|
@@ -22,6 +21,7 @@ export interface ScanDiagnostic {
|
|
|
22
21
|
cause?: unknown;
|
|
23
22
|
}
|
|
24
23
|
|
|
24
|
+
/** Result of scanning a project directory. */
|
|
25
25
|
export interface ScanResult {
|
|
26
26
|
fronds: Fronds;
|
|
27
27
|
/** What the scan could not do. Empty is a claim, not a default — see {@link ScanDiagnostic}. */
|
package/src/wire/call.ts
CHANGED
|
@@ -30,10 +30,10 @@ export interface FrondCall {
|
|
|
30
30
|
/** A transport executes a call somewhere else. Failures surface as thrown FougereError. */
|
|
31
31
|
export type Transport = (call: FrondCall, invocation: InvocationContext) => Promise<unknown>;
|
|
32
32
|
|
|
33
|
-
/** Reserved namespace — calls the runner answers itself, never a façade. */
|
|
34
33
|
/** What a receiver accepts before it stops reading an input. */
|
|
35
34
|
export const MAX_BODY_BYTES = 1024 * 1024;
|
|
36
35
|
|
|
36
|
+
/** Reserved namespace — calls the runner answers itself, never a façade. */
|
|
37
37
|
export const RPC_ENTITY = 'rpc';
|
|
38
38
|
|
|
39
39
|
/** What an `rpc` op answers — the door for what the app says about ITSELF, never about a row. */
|
|
@@ -98,6 +98,33 @@ export interface Edge {
|
|
|
98
98
|
errors: number;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
/** A frond the config knows of, and where it says to reach it. */
|
|
102
|
+
export interface DeclaredFrond {
|
|
103
|
+
frond: string;
|
|
104
|
+
placement: 'local' | 'remote';
|
|
105
|
+
/**
|
|
106
|
+
* Host and port of the address `remotes:` names, absent when the frond runs here. Never the
|
|
107
|
+
* whole address: a declared one may carry credentials, and this answer leaves the process.
|
|
108
|
+
*/
|
|
109
|
+
at?: string;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** One frond reaching another, read from a handler's dependencies rather than from a call. */
|
|
113
|
+
export interface DeclaredEdge {
|
|
114
|
+
from: string;
|
|
115
|
+
to: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* What the config SAYS, beside what the runtime SAW. The two disagree exactly when something
|
|
120
|
+
* is misconfigured, and a frond that never answered is absent from the observed half — so
|
|
121
|
+
* without this one, nothing tells a silent dependency from an absent one.
|
|
122
|
+
*/
|
|
123
|
+
export interface DeclaredTopology {
|
|
124
|
+
fronds: DeclaredFrond[];
|
|
125
|
+
edges: DeclaredEdge[];
|
|
126
|
+
}
|
|
127
|
+
|
|
101
128
|
/** The shape of the system as ONE process discovered it — the answer to `rpc.topology`. */
|
|
102
129
|
export interface TopologyReport {
|
|
103
130
|
/** When this process started counting — an edge count is read against it. */
|
|
@@ -106,6 +133,7 @@ export interface TopologyReport {
|
|
|
106
133
|
active: number;
|
|
107
134
|
fronds: FrondPlacement[];
|
|
108
135
|
edges: Edge[];
|
|
136
|
+
declared: DeclaredTopology;
|
|
109
137
|
}
|
|
110
138
|
|
|
111
139
|
/** The shape a card must have to be walked — `fronds`, and each frond's `doors`. */
|
package/src/wire/signature.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/** A method's signature, as a contract is built from it — the shape, never the reading. */
|
|
2
1
|
/** A type reference — primitives, entities, arrays, generics. */
|
|
3
2
|
export interface TypeRef {
|
|
4
3
|
/** Raw type text as written in source (e.g. 'Pagination<Post>'). */
|
|
@@ -26,7 +25,7 @@ export interface Param {
|
|
|
26
25
|
optional?: boolean;
|
|
27
26
|
}
|
|
28
27
|
|
|
29
|
-
/** A method signature. */
|
|
28
|
+
/** A method's signature, as a contract is built from it — the shape, never the reading. */
|
|
30
29
|
export interface Signature {
|
|
31
30
|
name: string;
|
|
32
31
|
params: Param[];
|