@fougere/core 0.18.0-alpha.0 → 0.19.1-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/README.md +1 -1
- package/dist/BootRefusal.d.ts +9 -0
- package/dist/BootRefusal.d.ts.map +1 -0
- package/dist/BootRefusal.js +12 -0
- package/dist/BootRefusal.js.map +1 -0
- package/dist/CallIdentity.d.ts.map +1 -1
- package/dist/CallIdentity.js +2 -1
- package/dist/CallIdentity.js.map +1 -1
- package/dist/boot/AppLifecycle.d.ts.map +1 -1
- package/dist/boot/AppLifecycle.js +2 -1
- package/dist/boot/AppLifecycle.js.map +1 -1
- package/dist/boot/Emissions.d.ts +8 -1
- package/dist/boot/Emissions.d.ts.map +1 -1
- package/dist/boot/Emissions.js +16 -11
- package/dist/boot/Emissions.js.map +1 -1
- package/dist/boot/bootstrap.d.ts.map +1 -1
- package/dist/boot/bootstrap.js +22 -9
- package/dist/boot/bootstrap.js.map +1 -1
- package/dist/boot/card.d.ts.map +1 -1
- package/dist/boot/card.js.map +1 -1
- package/dist/boot/install.d.ts.map +1 -1
- package/dist/boot/install.js +1 -0
- package/dist/boot/install.js.map +1 -1
- package/dist/boot/ownership.d.ts.map +1 -1
- package/dist/boot/ownership.js +26 -14
- package/dist/boot/ownership.js.map +1 -1
- package/dist/diagnostic.d.ts +2 -1
- package/dist/diagnostic.d.ts.map +1 -1
- package/dist/diagnostic.js +2 -1
- package/dist/diagnostic.js.map +1 -1
- package/dist/dispatch/ArgumentResolver.d.ts +13 -1
- package/dist/dispatch/ArgumentResolver.d.ts.map +1 -1
- package/dist/dispatch/ArgumentResolver.js +48 -2
- package/dist/dispatch/ArgumentResolver.js.map +1 -1
- package/dist/dispatch/EntityLookup.d.ts +4 -0
- package/dist/dispatch/EntityLookup.d.ts.map +1 -0
- package/dist/dispatch/EntityLookup.js +2 -0
- package/dist/dispatch/EntityLookup.js.map +1 -0
- package/dist/dispatch/Facade.d.ts +3 -0
- package/dist/dispatch/Facade.d.ts.map +1 -1
- package/dist/dispatch/HandlerFacade.d.ts +2 -0
- package/dist/dispatch/HandlerFacade.d.ts.map +1 -1
- package/dist/dispatch/HandlerFacade.js +14 -4
- package/dist/dispatch/HandlerFacade.js.map +1 -1
- package/dist/entry/facade.d.ts +10 -1
- package/dist/entry/facade.d.ts.map +1 -1
- package/dist/entry/facade.js +26 -2
- package/dist/entry/facade.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/prefab/CrudConstructor.d.ts.map +1 -1
- package/dist/prefab/CrudConstructor.js +5 -4
- package/dist/prefab/CrudConstructor.js.map +1 -1
- package/dist/prefab/Middleware.d.ts +13 -0
- package/dist/prefab/Middleware.d.ts.map +1 -0
- package/dist/prefab/Middleware.js +10 -0
- package/dist/prefab/Middleware.js.map +1 -0
- package/dist/wire/Facade.d.ts +5 -7
- package/dist/wire/Facade.d.ts.map +1 -1
- package/dist/wire/Facade.js.map +1 -1
- package/dist/wire/Invocation.d.ts +2 -1
- package/dist/wire/Invocation.d.ts.map +1 -1
- package/dist/wire/Invocation.js +4 -1
- package/dist/wire/Invocation.js.map +1 -1
- package/dist/wire/InvocationContext.d.ts +6 -0
- package/dist/wire/InvocationContext.d.ts.map +1 -1
- package/dist/wire/OperationContract.js +2 -2
- package/dist/wire/OperationContract.js.map +1 -1
- package/dist/wire/SignedCall.d.ts +2 -0
- package/dist/wire/SignedCall.d.ts.map +1 -1
- package/dist/wire/TypeRef.d.ts +5 -3
- package/dist/wire/TypeRef.d.ts.map +1 -1
- package/dist/wire/binding.d.ts +8 -1
- package/dist/wire/binding.d.ts.map +1 -1
- package/dist/wire/binding.js +2 -2
- package/dist/wire/binding.js.map +1 -1
- package/package.json +3 -3
- package/src/BootRefusal.ts +11 -0
- package/src/CallIdentity.ts +2 -1
- package/src/boot/AppLifecycle.ts +2 -1
- package/src/boot/Emissions.ts +18 -11
- package/src/boot/bootstrap.ts +25 -10
- package/src/boot/card.ts +1 -2
- package/src/boot/install.ts +1 -0
- package/src/boot/ownership.ts +35 -16
- package/src/diagnostic.ts +4 -2
- package/src/dispatch/ArgumentResolver.ts +54 -2
- package/src/dispatch/EntityLookup.ts +4 -0
- package/src/dispatch/Facade.ts +3 -0
- package/src/dispatch/HandlerFacade.ts +14 -6
- package/src/entry/facade.ts +38 -2
- package/src/index.ts +2 -0
- package/src/prefab/CrudConstructor.ts +6 -5
- package/src/prefab/Middleware.ts +13 -0
- package/src/wire/Facade.ts +6 -9
- package/src/wire/Invocation.ts +3 -1
- package/src/wire/InvocationContext.ts +6 -0
- package/src/wire/OperationContract.ts +2 -2
- package/src/wire/SignedCall.ts +2 -0
- package/src/wire/TypeRef.ts +4 -2
- package/src/wire/binding.ts +7 -4
package/src/wire/SignedCall.ts
CHANGED
|
@@ -5,6 +5,8 @@ export interface SignedCall {
|
|
|
5
5
|
params?: Record<string, unknown>;
|
|
6
6
|
query?: Record<string, unknown>;
|
|
7
7
|
input?: unknown;
|
|
8
|
+
/** What code wrote for the handler — pinned like the input, or a signed call replays with others. */
|
|
9
|
+
args?: readonly unknown[];
|
|
8
10
|
state?: Record<string, unknown>;
|
|
9
11
|
/** The hour, pinned like the input: moving it is moving the call. */
|
|
10
12
|
runAt?: number;
|
package/src/wire/TypeRef.ts
CHANGED
|
@@ -16,6 +16,8 @@ export interface TypeRef {
|
|
|
16
16
|
undefined?: boolean;
|
|
17
17
|
/** Whether this is a Promise wrapper (unwrapped in output). */
|
|
18
18
|
promise?: boolean;
|
|
19
|
-
/** `Post['
|
|
20
|
-
|
|
19
|
+
/** `Post['title']` — the field this type is read from, whose rules the value obeys. */
|
|
20
|
+
field?: { entity: string; name: string };
|
|
21
|
+
/** The entity whose row this value designates — set by the scan when `field` is its primary. */
|
|
22
|
+
identifies?: string;
|
|
21
23
|
}
|
package/src/wire/binding.ts
CHANGED
|
@@ -17,8 +17,11 @@ type ParamSource =
|
|
|
17
17
|
* (`Emissions.stamped`, which realizes `created()`); this is the declared form of it.
|
|
18
18
|
*/
|
|
19
19
|
| { kind: 'pipe'; factName: string }
|
|
20
|
-
/**
|
|
21
|
-
|
|
20
|
+
/**
|
|
21
|
+
* `field` is where the value's rules are declared — `title: Post['title']`. `identifies` names
|
|
22
|
+
* the entity whose row the value designates, when that field is its primary.
|
|
23
|
+
*/
|
|
24
|
+
| { kind: 'param'; name: string; coerce?: 'number' | 'boolean'; field?: { entity: string; name: string }; identifies?: string }
|
|
22
25
|
| { kind: 'input' }
|
|
23
26
|
| { kind: 'context' }
|
|
24
27
|
/** The whole query bag, for an op whose argument IS the options (list). */
|
|
@@ -78,9 +81,9 @@ function sourceOf(param: Param, collectorTypeNames: Set<string>): ParamSource {
|
|
|
78
81
|
if (collectorTypeNames.has(typeKey)) return { kind: 'collector', typeName: typeKey };
|
|
79
82
|
if (typeName === 'InvocationContext') return { kind: 'context' };
|
|
80
83
|
if (PRIMITIVES.has(typeName)) {
|
|
81
|
-
const identifies = param.type
|
|
84
|
+
const { field, identifies } = param.type;
|
|
82
85
|
|
|
83
|
-
return { kind: 'param', name: param.name, coerce: coercionFor(typeName), ...(identifies && { identifies }) };
|
|
86
|
+
return { kind: 'param', name: param.name, coerce: coercionFor(typeName), ...(field && { field }), ...(identifies && { identifies }) };
|
|
84
87
|
}
|
|
85
88
|
|
|
86
89
|
return { kind: 'input' };
|