@fougere/core 0.12.1-alpha.0 → 0.12.4-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/CallIdentity.d.ts.map +1 -1
- package/dist/CallIdentity.js.map +1 -1
- package/dist/DomainCluster.d.ts.map +1 -1
- package/dist/DomainCluster.js +1 -1
- package/dist/DomainCluster.js.map +1 -1
- package/dist/EffectiveOperationModel.d.ts +1 -4
- package/dist/EffectiveOperationModel.d.ts.map +1 -1
- package/dist/EffectiveOperationModel.js +182 -173
- package/dist/EffectiveOperationModel.js.map +1 -1
- package/dist/FougereConfig.d.ts +5 -3
- package/dist/FougereConfig.d.ts.map +1 -1
- package/dist/FougereConfig.js +11 -13
- package/dist/FougereConfig.js.map +1 -1
- package/dist/FrondConfig.d.ts.map +1 -1
- package/dist/FrondConfig.js.map +1 -1
- package/dist/FrondDeclaration.d.ts.map +1 -1
- package/dist/FrondDeclaration.js +1 -5
- package/dist/FrondDeclaration.js.map +1 -1
- package/dist/Source.js +3 -3
- package/dist/Source.js.map +1 -1
- package/dist/SourceView.d.ts +0 -2
- package/dist/SourceView.d.ts.map +1 -1
- package/dist/boot/App.d.ts +2 -4
- package/dist/boot/App.d.ts.map +1 -1
- package/dist/boot/AppLifecycle.d.ts +5 -0
- package/dist/boot/AppLifecycle.d.ts.map +1 -1
- package/dist/boot/AppLifecycle.js +19 -10
- package/dist/boot/AppLifecycle.js.map +1 -1
- package/dist/boot/AuthRuntime.d.ts +5 -12
- package/dist/boot/AuthRuntime.d.ts.map +1 -1
- package/dist/boot/AuthRuntime.js +2 -1
- package/dist/boot/AuthRuntime.js.map +1 -1
- package/dist/boot/CreateAppOptions.d.ts +0 -11
- package/dist/boot/CreateAppOptions.d.ts.map +1 -1
- package/dist/boot/Emissions.d.ts.map +1 -1
- package/dist/boot/Emissions.js +3 -6
- package/dist/boot/Emissions.js.map +1 -1
- package/dist/boot/Hosting.d.ts +2 -1
- package/dist/boot/Hosting.d.ts.map +1 -1
- package/dist/boot/ambient.als.d.ts.map +1 -1
- package/dist/boot/ambient.als.js.map +1 -1
- package/dist/boot/apply.d.ts.map +1 -1
- package/dist/boot/apply.js.map +1 -1
- package/dist/boot/arity.d.ts +13 -0
- package/dist/boot/arity.d.ts.map +1 -0
- package/dist/boot/arity.js +33 -0
- package/dist/boot/arity.js.map +1 -0
- package/dist/boot/bootstrap.d.ts.map +1 -1
- package/dist/boot/bootstrap.js +143 -265
- 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/frame.d.ts.map +1 -1
- package/dist/boot/frame.js.map +1 -1
- package/dist/boot/install.d.ts.map +1 -1
- package/dist/boot/install.js +105 -115
- package/dist/boot/install.js.map +1 -1
- package/dist/boot/ownership.d.ts.map +1 -1
- package/dist/boot/ownership.js.map +1 -1
- package/dist/boot/relations.d.ts +10 -0
- package/dist/boot/relations.d.ts.map +1 -1
- package/dist/boot/relations.js +35 -2
- package/dist/boot/relations.js.map +1 -1
- package/dist/boot/remote.d.ts.map +1 -1
- package/dist/boot/remote.js.map +1 -1
- package/dist/boot/seed.d.ts.map +1 -1
- package/dist/boot/seed.js +1 -1
- package/dist/boot/seed.js.map +1 -1
- package/dist/boot/statement-drift.d.ts +6 -0
- package/dist/boot/statement-drift.d.ts.map +1 -1
- package/dist/boot/statement-drift.js +19 -0
- package/dist/boot/statement-drift.js.map +1 -1
- package/dist/boot/together.d.ts.map +1 -1
- package/dist/boot/together.js.map +1 -1
- package/dist/builtin/Carry.d.ts.map +1 -1
- package/dist/builtin/Carry.js.map +1 -1
- package/dist/builtin/Logger.d.ts.map +1 -1
- package/dist/builtin/Logger.js +3 -1
- package/dist/builtin/Logger.js.map +1 -1
- package/dist/builtin/config.js.map +1 -1
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js.map +1 -1
- package/dist/crypto/encoding.d.ts.map +1 -1
- package/dist/crypto/encoding.js.map +1 -1
- package/dist/crypto/node.d.ts.map +1 -1
- package/dist/crypto/node.js.map +1 -1
- package/dist/crypto/webcrypto.d.ts.map +1 -1
- package/dist/crypto/webcrypto.js.map +1 -1
- package/dist/descriptor/Fronds.d.ts +5 -0
- package/dist/descriptor/Fronds.d.ts.map +1 -1
- package/dist/descriptor/Fronds.js +8 -0
- package/dist/descriptor/Fronds.js.map +1 -1
- package/dist/descriptor/index.d.ts +1 -0
- package/dist/descriptor/index.d.ts.map +1 -1
- package/dist/descriptor/index.js +1 -0
- package/dist/descriptor/index.js.map +1 -1
- package/dist/dispatch/ArrayResult.d.ts.map +1 -1
- package/dist/dispatch/ArrayResult.js.map +1 -1
- package/dist/dispatch/Dispatcher.d.ts.map +1 -1
- package/dist/dispatch/Dispatcher.js.map +1 -1
- package/dist/dispatch/HandlerFacade.d.ts +6 -1
- package/dist/dispatch/HandlerFacade.d.ts.map +1 -1
- package/dist/dispatch/HandlerFacade.js +11 -3
- package/dist/dispatch/HandlerFacade.js.map +1 -1
- package/dist/dispatch/InFlight.d.ts +3 -2
- package/dist/dispatch/InFlight.d.ts.map +1 -1
- package/dist/dispatch/InFlight.js +11 -1
- package/dist/dispatch/InFlight.js.map +1 -1
- package/dist/dispatch/LocalRoutePolicy.d.ts.map +1 -1
- package/dist/dispatch/LocalRoutePolicy.js.map +1 -1
- package/dist/dispatch/RouteRegistry.d.ts.map +1 -1
- package/dist/dispatch/RouteRegistry.js.map +1 -1
- package/dist/dispatch/StorageGuard.d.ts.map +1 -1
- package/dist/dispatch/StorageGuard.js +4 -1
- package/dist/dispatch/StorageGuard.js.map +1 -1
- package/dist/identity-keys.d.ts.map +1 -1
- package/dist/identity-keys.js.map +1 -1
- package/dist/index.d.ts +2 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js.map +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +1 -1
- package/dist/node.js.map +1 -1
- package/dist/prefab/CrudConstructor.d.ts.map +1 -1
- package/dist/prefab/CrudConstructor.js.map +1 -1
- package/dist/prefab/collector.d.ts.map +1 -1
- package/dist/prefab/collector.js.map +1 -1
- package/dist/prefab/presenter.d.ts.map +1 -1
- package/dist/prefab/presenter.js.map +1 -1
- package/dist/storage/Comparison.d.ts +2 -2
- package/dist/storage/Comparison.d.ts.map +1 -1
- package/dist/storage/Comparison.js +3 -1
- package/dist/storage/Comparison.js.map +1 -1
- package/dist/storage/Storage.d.ts.map +1 -1
- package/dist/storage/Storage.js.map +1 -1
- package/dist/storage/Store.d.ts.map +1 -1
- package/dist/storage/Store.js +1 -1
- package/dist/storage/Store.js.map +1 -1
- package/dist/verify.d.ts.map +1 -1
- package/dist/verify.js.map +1 -1
- package/dist/wire/AppMiddleware.d.ts.map +1 -1
- package/dist/wire/AppMiddleware.js.map +1 -1
- package/dist/wire/Emit.d.ts +0 -2
- package/dist/wire/Emit.d.ts.map +1 -1
- package/dist/wire/Emit.js +1 -1
- package/dist/wire/Emit.js.map +1 -1
- package/dist/wire/Facade.d.ts +7 -0
- package/dist/wire/Facade.d.ts.map +1 -1
- package/dist/wire/Facade.js +13 -0
- package/dist/wire/Facade.js.map +1 -1
- package/dist/wire/FougereError.d.ts.map +1 -1
- package/dist/wire/FougereError.js.map +1 -1
- package/dist/wire/Invocation.d.ts.map +1 -1
- package/dist/wire/Invocation.js.map +1 -1
- package/dist/wire/OperationContract.d.ts +0 -4
- package/dist/wire/OperationContract.d.ts.map +1 -1
- package/dist/wire/OperationContract.js +1 -1
- package/dist/wire/OperationContract.js.map +1 -1
- package/dist/wire/OperationsMap.d.ts +0 -3
- package/dist/wire/OperationsMap.d.ts.map +1 -1
- package/dist/wire/OperationsMap.js +0 -5
- package/dist/wire/OperationsMap.js.map +1 -1
- package/dist/wire/RouteAddress.d.ts.map +1 -1
- package/dist/wire/RouteAddress.js.map +1 -1
- package/dist/wire/binding.d.ts.map +1 -1
- package/dist/wire/binding.js.map +1 -1
- package/dist/wire/card/IdentityCard.d.ts.map +1 -1
- package/dist/wire/card/IdentityCard.js.map +1 -1
- package/dist/wire/drift.d.ts.map +1 -1
- package/dist/wire/drift.js.map +1 -1
- package/dist/wire/http-error.d.ts.map +1 -1
- package/dist/wire/http-error.js.map +1 -1
- package/dist/wire/loggerMiddleware.d.ts.map +1 -1
- package/dist/wire/loggerMiddleware.js.map +1 -1
- package/package.json +5 -5
- package/src/CallIdentity.ts +6 -0
- package/src/DomainCluster.ts +2 -1
- package/src/EffectiveOperationModel.ts +236 -198
- package/src/FougereConfig.ts +17 -16
- package/src/FrondConfig.ts +2 -0
- package/src/FrondDeclaration.ts +1 -7
- package/src/Source.ts +3 -3
- package/src/SourceView.ts +0 -2
- package/src/boot/App.ts +2 -4
- package/src/boot/AppLifecycle.ts +22 -10
- package/src/boot/AuthRuntime.ts +6 -13
- package/src/boot/CreateAppOptions.ts +0 -11
- package/src/boot/Emissions.ts +7 -7
- package/src/boot/Hosting.ts +2 -1
- package/src/boot/ambient.als.ts +2 -0
- package/src/boot/apply.ts +1 -0
- package/src/boot/arity.ts +42 -0
- package/src/boot/bootstrap.ts +175 -300
- package/src/boot/card.ts +2 -0
- package/src/boot/frame.ts +6 -0
- package/src/boot/install.ts +123 -146
- package/src/boot/ownership.ts +1 -0
- package/src/boot/relations.ts +42 -10
- package/src/boot/remote.ts +1 -0
- package/src/boot/seed.ts +3 -5
- package/src/boot/statement-drift.ts +25 -0
- package/src/boot/together.ts +3 -0
- package/src/builtin/Carry.ts +1 -0
- package/src/builtin/Logger.ts +9 -1
- package/src/builtin/config.ts +1 -0
- package/src/contract.ts +1 -0
- package/src/crypto/encoding.ts +4 -0
- package/src/crypto/node.ts +2 -0
- package/src/crypto/webcrypto.ts +2 -0
- package/src/descriptor/Fronds.ts +12 -0
- package/src/descriptor/index.ts +1 -0
- package/src/dispatch/ArrayResult.ts +1 -0
- package/src/dispatch/Dispatcher.ts +1 -0
- package/src/dispatch/HandlerFacade.ts +16 -4
- package/src/dispatch/InFlight.ts +18 -2
- package/src/dispatch/LocalRoutePolicy.ts +1 -0
- package/src/dispatch/RouteRegistry.ts +4 -0
- package/src/dispatch/StorageGuard.ts +9 -1
- package/src/identity-keys.ts +2 -0
- package/src/index.ts +2 -4
- package/src/loader.ts +1 -0
- package/src/node.ts +1 -1
- package/src/prefab/CrudConstructor.ts +1 -11
- package/src/prefab/collector.ts +1 -0
- package/src/prefab/presenter.ts +1 -0
- package/src/storage/Comparison.ts +7 -4
- package/src/storage/Storage.ts +2 -0
- package/src/storage/Store.ts +9 -1
- package/src/verify.ts +2 -0
- package/src/wire/AppMiddleware.ts +2 -0
- package/src/wire/Emit.ts +1 -1
- package/src/wire/Facade.ts +17 -10
- package/src/wire/FougereError.ts +2 -0
- package/src/wire/Invocation.ts +2 -0
- package/src/wire/OperationContract.ts +2 -1
- package/src/wire/OperationsMap.ts +0 -10
- package/src/wire/RouteAddress.ts +2 -0
- package/src/wire/binding.ts +1 -0
- package/src/wire/card/IdentityCard.ts +1 -0
- package/src/wire/drift.ts +3 -0
- package/src/wire/http-error.ts +2 -0
- package/src/wire/loggerMiddleware.ts +1 -0
- package/dist/boot/AuthConfig.d.ts +0 -14
- package/dist/boot/AuthConfig.d.ts.map +0 -1
- package/dist/boot/AuthConfig.js +0 -2
- package/dist/boot/AuthConfig.js.map +0 -1
- package/dist/boot/AuthContext.d.ts +0 -12
- package/dist/boot/AuthContext.d.ts.map +0 -1
- package/dist/boot/AuthContext.js +0 -2
- package/dist/boot/AuthContext.js.map +0 -1
- package/dist/storage/ComparisonName.d.ts +0 -3
- package/dist/storage/ComparisonName.d.ts.map +0 -1
- package/dist/storage/ComparisonName.js +0 -2
- package/dist/storage/ComparisonName.js.map +0 -1
- package/src/boot/AuthConfig.ts +0 -14
- package/src/boot/AuthContext.ts +0 -12
- package/src/storage/ComparisonName.ts +0 -3
package/src/wire/Invocation.ts
CHANGED
|
@@ -8,6 +8,7 @@ function canonicalValue(value: unknown): unknown {
|
|
|
8
8
|
|
|
9
9
|
const prototype = Object.getPrototypeOf(value);
|
|
10
10
|
if (prototype !== Object.prototype && prototype !== null) return value;
|
|
11
|
+
|
|
11
12
|
return canonicalRecord(value);
|
|
12
13
|
}
|
|
13
14
|
|
|
@@ -19,6 +20,7 @@ function canonicalRecord(value: unknown): Record<string, unknown> {
|
|
|
19
20
|
for (const [key, member] of Object.entries(value)) {
|
|
20
21
|
if (member !== undefined) result[key] = canonicalValue(member);
|
|
21
22
|
}
|
|
23
|
+
|
|
22
24
|
return Object.freeze(result);
|
|
23
25
|
}
|
|
24
26
|
|
|
@@ -39,6 +39,7 @@ export function cardinalityOf(type: TypeRef | undefined): OperationContract['car
|
|
|
39
39
|
if (inner.name === 'Page' || inner.name === 'ListResult') return 'page';
|
|
40
40
|
if (inner.array) return 'many';
|
|
41
41
|
if (PRIMITIVE_RETURNS.has(inner.name)) return 'none';
|
|
42
|
+
|
|
42
43
|
return inner.nullable || inner.undefined ? 'maybe' : 'one';
|
|
43
44
|
}
|
|
44
45
|
|
|
@@ -116,7 +117,7 @@ export function inferOperationKind(name: string): OperationKindInference {
|
|
|
116
117
|
}
|
|
117
118
|
|
|
118
119
|
/** Explicit config is authoritative; otherwise the finite convention may decline. */
|
|
119
|
-
|
|
120
|
+
function resolveOperationKind(
|
|
120
121
|
name: string,
|
|
121
122
|
overrides?: Record<string, { kind?: OperationKind }>,
|
|
122
123
|
): OperationKind | undefined {
|
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
import type { Param } from './Param.js';
|
|
2
|
-
import type { TypeRef } from './TypeRef.js';
|
|
3
1
|
import type { OperationContract } from './OperationContract.js';
|
|
4
2
|
|
|
5
3
|
/** Map of operation name → its contract. */
|
|
6
4
|
export type OperationsMap = Map<string, OperationContract>;
|
|
7
|
-
|
|
8
|
-
export type { TypeRef, Param };
|
|
9
|
-
|
|
10
|
-
// ─── Operation intent (read vs write) ──────────
|
|
11
|
-
// Naming convention for inferred handlers — scheduled to die with the
|
|
12
|
-
// handler-kind plan (docs/notes/handler-kind.md). Lives here, NOT in
|
|
13
|
-
// @fougere/schema: it is a runtime convention about operations, not a
|
|
14
|
-
// schema concept.
|
package/src/wire/RouteAddress.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { RouteAddressInput } from './RouteAddressInput.js';
|
|
|
3
3
|
/** Refuses an empty segment, so no address can be built that nothing can serve. */
|
|
4
4
|
function required(value: string, name: string): string {
|
|
5
5
|
if (value.trim().length === 0) throw new TypeError(`Route ${name} cannot be empty`);
|
|
6
|
+
|
|
6
7
|
return value;
|
|
7
8
|
}
|
|
8
9
|
|
|
@@ -38,6 +39,7 @@ export class RouteAddress {
|
|
|
38
39
|
/** Writes the address the way a log and an error message name it. */
|
|
39
40
|
toString(): string {
|
|
40
41
|
const audience = this.surface ? `${this.surface}/` : '';
|
|
42
|
+
|
|
41
43
|
return `${audience}${this.entity}.${this.operation}`;
|
|
42
44
|
}
|
|
43
45
|
|
package/src/wire/binding.ts
CHANGED
|
@@ -38,6 +38,7 @@ const PRIMITIVES = new Set(['string', 'number', 'boolean']);
|
|
|
38
38
|
function coercionFor(typeName: string): 'number' | 'boolean' | undefined {
|
|
39
39
|
if (typeName === 'number') return 'number';
|
|
40
40
|
if (typeName === 'boolean') return 'boolean';
|
|
41
|
+
|
|
41
42
|
return undefined;
|
|
42
43
|
}
|
|
43
44
|
|
|
@@ -27,6 +27,7 @@ export function assertIdentityCard(value: unknown, source: string): IdentityCard
|
|
|
27
27
|
if (!frond || typeof frond.name !== 'string') throw cardRefusal(source, 'a frond with no name');
|
|
28
28
|
if (!Array.isArray(frond.facades)) throw cardRefusal(source, `frond '${frond.name}' has no valid facades array`);
|
|
29
29
|
}
|
|
30
|
+
|
|
30
31
|
return card as IdentityCard;
|
|
31
32
|
}
|
|
32
33
|
|
package/src/wire/drift.ts
CHANGED
|
@@ -29,6 +29,7 @@ function facadesOf(card: IdentityCard, frond: string): Map<string, Answering> {
|
|
|
29
29
|
found.set(facade.name, { ops: new Set(facade.ops.map((op) => op.name)), schema: facade.schema });
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
+
|
|
32
33
|
return found;
|
|
33
34
|
}
|
|
34
35
|
|
|
@@ -38,6 +39,7 @@ function factsOf(card: IdentityCard, frond: string): Map<string, SchemaDescripto
|
|
|
38
39
|
if (one.name !== frond) continue;
|
|
39
40
|
for (const fact of one.facts ?? []) found.set(fact.name, fact.schema as SchemaDescriptor | undefined);
|
|
40
41
|
}
|
|
42
|
+
|
|
41
43
|
return found;
|
|
42
44
|
}
|
|
43
45
|
|
|
@@ -117,6 +119,7 @@ export function explain(drift: CardDrift): string[] {
|
|
|
117
119
|
if (changes === 'gone') { lines.push(`${fact} — you subscribe to it, it is no longer announced`); continue; }
|
|
118
120
|
for (const change of changes) lines.push(`${fact} — ${describe(change)} → re-sync and deploy the readers, THEN the sender`);
|
|
119
121
|
}
|
|
122
|
+
|
|
120
123
|
return lines;
|
|
121
124
|
}
|
|
122
125
|
|
package/src/wire/http-error.ts
CHANGED
|
@@ -40,6 +40,7 @@ export function toPublicError(err: FougereError): ReturnType<FougereError['toJSO
|
|
|
40
40
|
if (err.code !== ErrorCode.INTERNAL_ERROR) return err.toJSON();
|
|
41
41
|
const where = [err.entity, err.operation].filter(Boolean).join('.');
|
|
42
42
|
log.error(`${where || 'internal'}: ${err.message}`, err.cause ?? err);
|
|
43
|
+
|
|
43
44
|
return {
|
|
44
45
|
code: ErrorCode.INTERNAL_ERROR,
|
|
45
46
|
message: 'Internal error',
|
|
@@ -60,5 +61,6 @@ export function toHttpError(err: unknown): { status: number; body: ReturnType<Fo
|
|
|
60
61
|
message: (err as { message?: string })?.message ?? 'Internal error',
|
|
61
62
|
cause: err,
|
|
62
63
|
});
|
|
64
|
+
|
|
63
65
|
return { status: 500, body: toPublicError(framed) };
|
|
64
66
|
}
|
|
@@ -19,6 +19,7 @@ export function loggerMiddleware(logger: Logger): AppMiddleware {
|
|
|
19
19
|
const result = await next();
|
|
20
20
|
const ms = (performance.now() - start).toFixed(1);
|
|
21
21
|
logger.info(`${ctx.entity}.${ctx.operation} (${ms}ms)`);
|
|
22
|
+
|
|
22
23
|
return result;
|
|
23
24
|
} catch (err) {
|
|
24
25
|
const ms = (performance.now() - start).toFixed(1);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { SchemaView } from '@fougere/schema';
|
|
2
|
-
import type { AuthContext } from './AuthContext.js';
|
|
3
|
-
import type { AuthRuntime } from './AuthRuntime.js';
|
|
4
|
-
/** Lazy auth declaration written in fougere.config.ts. */
|
|
5
|
-
export interface AuthConfig {
|
|
6
|
-
/** Build the runtime — invoked by createApp at boot with the resolved storage handles. */
|
|
7
|
-
create(ctx: AuthContext): AuthRuntime | Promise<AuthRuntime>;
|
|
8
|
-
/**
|
|
9
|
-
* Entities the provider will use. Optional metadata — useful for the core's
|
|
10
|
-
* future migration registry to know which tables auth needs.
|
|
11
|
-
*/
|
|
12
|
-
entities?: Record<string, SchemaView>;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=AuthConfig.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthConfig.d.ts","sourceRoot":"","sources":["../../src/boot/AuthConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,0DAA0D;AAC1D,MAAM,WAAW,UAAU;IACzB,0FAA0F;IAC1F,MAAM,CAAC,GAAG,EAAE,WAAW,GAAG,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAC7D;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;CACvC"}
|
package/dist/boot/AuthConfig.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthConfig.js","sourceRoot":"","sources":["../../src/boot/AuthConfig.ts"],"names":[],"mappings":""}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { StorageFactory } from '../storage/StorageFactory.js';
|
|
2
|
-
/**
|
|
3
|
-
* Context passed by the core to an auth provider's create() function.
|
|
4
|
-
* Provides the resources the provider needs to integrate with the app.
|
|
5
|
-
*/
|
|
6
|
-
export interface AuthContext {
|
|
7
|
-
/** Storage handle (Kysely DB instance, Prisma client, etc.) — opaque to core. */
|
|
8
|
-
db: unknown;
|
|
9
|
-
/** Per-entity storage factory — auth provider uses this to back its adapter. */
|
|
10
|
-
storageFactory: StorageFactory;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=AuthContext.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthContext.d.ts","sourceRoot":"","sources":["../../src/boot/AuthContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,iFAAiF;IACjF,EAAE,EAAE,OAAO,CAAC;IACZ,gFAAgF;IAChF,cAAc,EAAE,cAAc,CAAC;CAChC"}
|
package/dist/boot/AuthContext.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthContext.js","sourceRoot":"","sources":["../../src/boot/AuthContext.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ComparisonName.d.ts","sourceRoot":"","sources":["../../src/storage/ComparisonName.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,qFAAsF,CAAC;AAE/G,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ComparisonName.js","sourceRoot":"","sources":["../../src/storage/ComparisonName.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAC"}
|
package/src/boot/AuthConfig.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { SchemaView } from '@fougere/schema';
|
|
2
|
-
import type { AuthContext } from './AuthContext.js';
|
|
3
|
-
import type { AuthRuntime } from './AuthRuntime.js';
|
|
4
|
-
|
|
5
|
-
/** Lazy auth declaration written in fougere.config.ts. */
|
|
6
|
-
export interface AuthConfig {
|
|
7
|
-
/** Build the runtime — invoked by createApp at boot with the resolved storage handles. */
|
|
8
|
-
create(ctx: AuthContext): AuthRuntime | Promise<AuthRuntime>;
|
|
9
|
-
/**
|
|
10
|
-
* Entities the provider will use. Optional metadata — useful for the core's
|
|
11
|
-
* future migration registry to know which tables auth needs.
|
|
12
|
-
*/
|
|
13
|
-
entities?: Record<string, SchemaView>;
|
|
14
|
-
}
|
package/src/boot/AuthContext.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { StorageFactory } from '../storage/StorageFactory.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Context passed by the core to an auth provider's create() function.
|
|
5
|
-
* Provides the resources the provider needs to integrate with the app.
|
|
6
|
-
*/
|
|
7
|
-
export interface AuthContext {
|
|
8
|
-
/** Storage handle (Kysely DB instance, Prisma client, etc.) — opaque to core. */
|
|
9
|
-
db: unknown;
|
|
10
|
-
/** Per-entity storage factory — auth provider uses this to back its adapter. */
|
|
11
|
-
storageFactory: StorageFactory;
|
|
12
|
-
}
|