@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.
Files changed (261) hide show
  1. package/dist/CallIdentity.d.ts.map +1 -1
  2. package/dist/CallIdentity.js.map +1 -1
  3. package/dist/DomainCluster.d.ts.map +1 -1
  4. package/dist/DomainCluster.js +1 -1
  5. package/dist/DomainCluster.js.map +1 -1
  6. package/dist/EffectiveOperationModel.d.ts +1 -4
  7. package/dist/EffectiveOperationModel.d.ts.map +1 -1
  8. package/dist/EffectiveOperationModel.js +182 -173
  9. package/dist/EffectiveOperationModel.js.map +1 -1
  10. package/dist/FougereConfig.d.ts +5 -3
  11. package/dist/FougereConfig.d.ts.map +1 -1
  12. package/dist/FougereConfig.js +11 -13
  13. package/dist/FougereConfig.js.map +1 -1
  14. package/dist/FrondConfig.d.ts.map +1 -1
  15. package/dist/FrondConfig.js.map +1 -1
  16. package/dist/FrondDeclaration.d.ts.map +1 -1
  17. package/dist/FrondDeclaration.js +1 -5
  18. package/dist/FrondDeclaration.js.map +1 -1
  19. package/dist/Source.js +3 -3
  20. package/dist/Source.js.map +1 -1
  21. package/dist/SourceView.d.ts +0 -2
  22. package/dist/SourceView.d.ts.map +1 -1
  23. package/dist/boot/App.d.ts +2 -4
  24. package/dist/boot/App.d.ts.map +1 -1
  25. package/dist/boot/AppLifecycle.d.ts +5 -0
  26. package/dist/boot/AppLifecycle.d.ts.map +1 -1
  27. package/dist/boot/AppLifecycle.js +19 -10
  28. package/dist/boot/AppLifecycle.js.map +1 -1
  29. package/dist/boot/AuthRuntime.d.ts +5 -12
  30. package/dist/boot/AuthRuntime.d.ts.map +1 -1
  31. package/dist/boot/AuthRuntime.js +2 -1
  32. package/dist/boot/AuthRuntime.js.map +1 -1
  33. package/dist/boot/CreateAppOptions.d.ts +0 -11
  34. package/dist/boot/CreateAppOptions.d.ts.map +1 -1
  35. package/dist/boot/Emissions.d.ts.map +1 -1
  36. package/dist/boot/Emissions.js +3 -6
  37. package/dist/boot/Emissions.js.map +1 -1
  38. package/dist/boot/Hosting.d.ts +2 -1
  39. package/dist/boot/Hosting.d.ts.map +1 -1
  40. package/dist/boot/ambient.als.d.ts.map +1 -1
  41. package/dist/boot/ambient.als.js.map +1 -1
  42. package/dist/boot/apply.d.ts.map +1 -1
  43. package/dist/boot/apply.js.map +1 -1
  44. package/dist/boot/arity.d.ts +13 -0
  45. package/dist/boot/arity.d.ts.map +1 -0
  46. package/dist/boot/arity.js +33 -0
  47. package/dist/boot/arity.js.map +1 -0
  48. package/dist/boot/bootstrap.d.ts.map +1 -1
  49. package/dist/boot/bootstrap.js +143 -265
  50. package/dist/boot/bootstrap.js.map +1 -1
  51. package/dist/boot/card.d.ts.map +1 -1
  52. package/dist/boot/card.js.map +1 -1
  53. package/dist/boot/frame.d.ts.map +1 -1
  54. package/dist/boot/frame.js.map +1 -1
  55. package/dist/boot/install.d.ts.map +1 -1
  56. package/dist/boot/install.js +105 -115
  57. package/dist/boot/install.js.map +1 -1
  58. package/dist/boot/ownership.d.ts.map +1 -1
  59. package/dist/boot/ownership.js.map +1 -1
  60. package/dist/boot/relations.d.ts +10 -0
  61. package/dist/boot/relations.d.ts.map +1 -1
  62. package/dist/boot/relations.js +35 -2
  63. package/dist/boot/relations.js.map +1 -1
  64. package/dist/boot/remote.d.ts.map +1 -1
  65. package/dist/boot/remote.js.map +1 -1
  66. package/dist/boot/seed.d.ts.map +1 -1
  67. package/dist/boot/seed.js +1 -1
  68. package/dist/boot/seed.js.map +1 -1
  69. package/dist/boot/statement-drift.d.ts +6 -0
  70. package/dist/boot/statement-drift.d.ts.map +1 -1
  71. package/dist/boot/statement-drift.js +19 -0
  72. package/dist/boot/statement-drift.js.map +1 -1
  73. package/dist/boot/together.d.ts.map +1 -1
  74. package/dist/boot/together.js.map +1 -1
  75. package/dist/builtin/Carry.d.ts.map +1 -1
  76. package/dist/builtin/Carry.js.map +1 -1
  77. package/dist/builtin/Logger.d.ts.map +1 -1
  78. package/dist/builtin/Logger.js +3 -1
  79. package/dist/builtin/Logger.js.map +1 -1
  80. package/dist/builtin/config.js.map +1 -1
  81. package/dist/contract.d.ts.map +1 -1
  82. package/dist/contract.js.map +1 -1
  83. package/dist/crypto/encoding.d.ts.map +1 -1
  84. package/dist/crypto/encoding.js.map +1 -1
  85. package/dist/crypto/node.d.ts.map +1 -1
  86. package/dist/crypto/node.js.map +1 -1
  87. package/dist/crypto/webcrypto.d.ts.map +1 -1
  88. package/dist/crypto/webcrypto.js.map +1 -1
  89. package/dist/descriptor/Fronds.d.ts +5 -0
  90. package/dist/descriptor/Fronds.d.ts.map +1 -1
  91. package/dist/descriptor/Fronds.js +8 -0
  92. package/dist/descriptor/Fronds.js.map +1 -1
  93. package/dist/descriptor/index.d.ts +1 -0
  94. package/dist/descriptor/index.d.ts.map +1 -1
  95. package/dist/descriptor/index.js +1 -0
  96. package/dist/descriptor/index.js.map +1 -1
  97. package/dist/dispatch/ArrayResult.d.ts.map +1 -1
  98. package/dist/dispatch/ArrayResult.js.map +1 -1
  99. package/dist/dispatch/Dispatcher.d.ts.map +1 -1
  100. package/dist/dispatch/Dispatcher.js.map +1 -1
  101. package/dist/dispatch/HandlerFacade.d.ts +6 -1
  102. package/dist/dispatch/HandlerFacade.d.ts.map +1 -1
  103. package/dist/dispatch/HandlerFacade.js +11 -3
  104. package/dist/dispatch/HandlerFacade.js.map +1 -1
  105. package/dist/dispatch/InFlight.d.ts +3 -2
  106. package/dist/dispatch/InFlight.d.ts.map +1 -1
  107. package/dist/dispatch/InFlight.js +11 -1
  108. package/dist/dispatch/InFlight.js.map +1 -1
  109. package/dist/dispatch/LocalRoutePolicy.d.ts.map +1 -1
  110. package/dist/dispatch/LocalRoutePolicy.js.map +1 -1
  111. package/dist/dispatch/RouteRegistry.d.ts.map +1 -1
  112. package/dist/dispatch/RouteRegistry.js.map +1 -1
  113. package/dist/dispatch/StorageGuard.d.ts.map +1 -1
  114. package/dist/dispatch/StorageGuard.js +4 -1
  115. package/dist/dispatch/StorageGuard.js.map +1 -1
  116. package/dist/identity-keys.d.ts.map +1 -1
  117. package/dist/identity-keys.js.map +1 -1
  118. package/dist/index.d.ts +2 -4
  119. package/dist/index.d.ts.map +1 -1
  120. package/dist/index.js +2 -0
  121. package/dist/index.js.map +1 -1
  122. package/dist/loader.d.ts.map +1 -1
  123. package/dist/loader.js.map +1 -1
  124. package/dist/node.d.ts +1 -1
  125. package/dist/node.d.ts.map +1 -1
  126. package/dist/node.js +1 -1
  127. package/dist/node.js.map +1 -1
  128. package/dist/prefab/CrudConstructor.d.ts.map +1 -1
  129. package/dist/prefab/CrudConstructor.js.map +1 -1
  130. package/dist/prefab/collector.d.ts.map +1 -1
  131. package/dist/prefab/collector.js.map +1 -1
  132. package/dist/prefab/presenter.d.ts.map +1 -1
  133. package/dist/prefab/presenter.js.map +1 -1
  134. package/dist/storage/Comparison.d.ts +2 -2
  135. package/dist/storage/Comparison.d.ts.map +1 -1
  136. package/dist/storage/Comparison.js +3 -1
  137. package/dist/storage/Comparison.js.map +1 -1
  138. package/dist/storage/Storage.d.ts.map +1 -1
  139. package/dist/storage/Storage.js.map +1 -1
  140. package/dist/storage/Store.d.ts.map +1 -1
  141. package/dist/storage/Store.js +1 -1
  142. package/dist/storage/Store.js.map +1 -1
  143. package/dist/verify.d.ts.map +1 -1
  144. package/dist/verify.js.map +1 -1
  145. package/dist/wire/AppMiddleware.d.ts.map +1 -1
  146. package/dist/wire/AppMiddleware.js.map +1 -1
  147. package/dist/wire/Emit.d.ts +0 -2
  148. package/dist/wire/Emit.d.ts.map +1 -1
  149. package/dist/wire/Emit.js +1 -1
  150. package/dist/wire/Emit.js.map +1 -1
  151. package/dist/wire/Facade.d.ts +7 -0
  152. package/dist/wire/Facade.d.ts.map +1 -1
  153. package/dist/wire/Facade.js +13 -0
  154. package/dist/wire/Facade.js.map +1 -1
  155. package/dist/wire/FougereError.d.ts.map +1 -1
  156. package/dist/wire/FougereError.js.map +1 -1
  157. package/dist/wire/Invocation.d.ts.map +1 -1
  158. package/dist/wire/Invocation.js.map +1 -1
  159. package/dist/wire/OperationContract.d.ts +0 -4
  160. package/dist/wire/OperationContract.d.ts.map +1 -1
  161. package/dist/wire/OperationContract.js +1 -1
  162. package/dist/wire/OperationContract.js.map +1 -1
  163. package/dist/wire/OperationsMap.d.ts +0 -3
  164. package/dist/wire/OperationsMap.d.ts.map +1 -1
  165. package/dist/wire/OperationsMap.js +0 -5
  166. package/dist/wire/OperationsMap.js.map +1 -1
  167. package/dist/wire/RouteAddress.d.ts.map +1 -1
  168. package/dist/wire/RouteAddress.js.map +1 -1
  169. package/dist/wire/binding.d.ts.map +1 -1
  170. package/dist/wire/binding.js.map +1 -1
  171. package/dist/wire/card/IdentityCard.d.ts.map +1 -1
  172. package/dist/wire/card/IdentityCard.js.map +1 -1
  173. package/dist/wire/drift.d.ts.map +1 -1
  174. package/dist/wire/drift.js.map +1 -1
  175. package/dist/wire/http-error.d.ts.map +1 -1
  176. package/dist/wire/http-error.js.map +1 -1
  177. package/dist/wire/loggerMiddleware.d.ts.map +1 -1
  178. package/dist/wire/loggerMiddleware.js.map +1 -1
  179. package/package.json +5 -5
  180. package/src/CallIdentity.ts +6 -0
  181. package/src/DomainCluster.ts +2 -1
  182. package/src/EffectiveOperationModel.ts +236 -198
  183. package/src/FougereConfig.ts +17 -16
  184. package/src/FrondConfig.ts +2 -0
  185. package/src/FrondDeclaration.ts +1 -7
  186. package/src/Source.ts +3 -3
  187. package/src/SourceView.ts +0 -2
  188. package/src/boot/App.ts +2 -4
  189. package/src/boot/AppLifecycle.ts +22 -10
  190. package/src/boot/AuthRuntime.ts +6 -13
  191. package/src/boot/CreateAppOptions.ts +0 -11
  192. package/src/boot/Emissions.ts +7 -7
  193. package/src/boot/Hosting.ts +2 -1
  194. package/src/boot/ambient.als.ts +2 -0
  195. package/src/boot/apply.ts +1 -0
  196. package/src/boot/arity.ts +42 -0
  197. package/src/boot/bootstrap.ts +175 -300
  198. package/src/boot/card.ts +2 -0
  199. package/src/boot/frame.ts +6 -0
  200. package/src/boot/install.ts +123 -146
  201. package/src/boot/ownership.ts +1 -0
  202. package/src/boot/relations.ts +42 -10
  203. package/src/boot/remote.ts +1 -0
  204. package/src/boot/seed.ts +3 -5
  205. package/src/boot/statement-drift.ts +25 -0
  206. package/src/boot/together.ts +3 -0
  207. package/src/builtin/Carry.ts +1 -0
  208. package/src/builtin/Logger.ts +9 -1
  209. package/src/builtin/config.ts +1 -0
  210. package/src/contract.ts +1 -0
  211. package/src/crypto/encoding.ts +4 -0
  212. package/src/crypto/node.ts +2 -0
  213. package/src/crypto/webcrypto.ts +2 -0
  214. package/src/descriptor/Fronds.ts +12 -0
  215. package/src/descriptor/index.ts +1 -0
  216. package/src/dispatch/ArrayResult.ts +1 -0
  217. package/src/dispatch/Dispatcher.ts +1 -0
  218. package/src/dispatch/HandlerFacade.ts +16 -4
  219. package/src/dispatch/InFlight.ts +18 -2
  220. package/src/dispatch/LocalRoutePolicy.ts +1 -0
  221. package/src/dispatch/RouteRegistry.ts +4 -0
  222. package/src/dispatch/StorageGuard.ts +9 -1
  223. package/src/identity-keys.ts +2 -0
  224. package/src/index.ts +2 -4
  225. package/src/loader.ts +1 -0
  226. package/src/node.ts +1 -1
  227. package/src/prefab/CrudConstructor.ts +1 -11
  228. package/src/prefab/collector.ts +1 -0
  229. package/src/prefab/presenter.ts +1 -0
  230. package/src/storage/Comparison.ts +7 -4
  231. package/src/storage/Storage.ts +2 -0
  232. package/src/storage/Store.ts +9 -1
  233. package/src/verify.ts +2 -0
  234. package/src/wire/AppMiddleware.ts +2 -0
  235. package/src/wire/Emit.ts +1 -1
  236. package/src/wire/Facade.ts +17 -10
  237. package/src/wire/FougereError.ts +2 -0
  238. package/src/wire/Invocation.ts +2 -0
  239. package/src/wire/OperationContract.ts +2 -1
  240. package/src/wire/OperationsMap.ts +0 -10
  241. package/src/wire/RouteAddress.ts +2 -0
  242. package/src/wire/binding.ts +1 -0
  243. package/src/wire/card/IdentityCard.ts +1 -0
  244. package/src/wire/drift.ts +3 -0
  245. package/src/wire/http-error.ts +2 -0
  246. package/src/wire/loggerMiddleware.ts +1 -0
  247. package/dist/boot/AuthConfig.d.ts +0 -14
  248. package/dist/boot/AuthConfig.d.ts.map +0 -1
  249. package/dist/boot/AuthConfig.js +0 -2
  250. package/dist/boot/AuthConfig.js.map +0 -1
  251. package/dist/boot/AuthContext.d.ts +0 -12
  252. package/dist/boot/AuthContext.d.ts.map +0 -1
  253. package/dist/boot/AuthContext.js +0 -2
  254. package/dist/boot/AuthContext.js.map +0 -1
  255. package/dist/storage/ComparisonName.d.ts +0 -3
  256. package/dist/storage/ComparisonName.d.ts.map +0 -1
  257. package/dist/storage/ComparisonName.js +0 -2
  258. package/dist/storage/ComparisonName.js.map +0 -1
  259. package/src/boot/AuthConfig.ts +0 -14
  260. package/src/boot/AuthContext.ts +0 -12
  261. package/src/storage/ComparisonName.ts +0 -3
@@ -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
- export function resolveOperationKind(
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.
@@ -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
 
@@ -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
 
@@ -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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=AuthConfig.js.map
@@ -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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=AuthContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AuthContext.js","sourceRoot":"","sources":["../../src/boot/AuthContext.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- export declare const COMPARISONS: readonly ["gte", "lte", "gt", "lt", "ne", "between", "contains", "notIn", "isNull"];
2
- export type ComparisonName = (typeof COMPARISONS)[number];
3
- //# sourceMappingURL=ComparisonName.d.ts.map
@@ -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,2 +0,0 @@
1
- export const COMPARISONS = ['gte', 'lte', 'gt', 'lt', 'ne', 'between', 'contains', 'notIn', 'isNull'];
2
- //# sourceMappingURL=ComparisonName.js.map
@@ -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"}
@@ -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
- }
@@ -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
- }
@@ -1,3 +0,0 @@
1
- export const COMPARISONS = ['gte', 'lte', 'gt', 'lt', 'ne', 'between', 'contains', 'notIn', 'isNull'] as const;
2
-
3
- export type ComparisonName = (typeof COMPARISONS)[number];