@fougere/core 0.2.0-alpha.2 → 0.4.0-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 +3 -2
- package/dist/boot/AppLifecycle.d.ts +18 -0
- package/dist/boot/AppLifecycle.d.ts.map +1 -0
- package/dist/boot/AppLifecycle.js +42 -0
- package/dist/boot/AppLifecycle.js.map +1 -0
- package/dist/boot/Emissions.d.ts +126 -0
- package/dist/boot/Emissions.d.ts.map +1 -0
- package/dist/boot/Emissions.js +233 -0
- package/dist/boot/Emissions.js.map +1 -0
- package/dist/boot/HandlerFacade.d.ts +72 -0
- package/dist/boot/HandlerFacade.d.ts.map +1 -0
- package/dist/boot/HandlerFacade.js +174 -0
- package/dist/boot/HandlerFacade.js.map +1 -0
- package/dist/boot/Lifecycle.d.ts +4 -0
- package/dist/boot/Lifecycle.d.ts.map +1 -0
- package/dist/boot/Lifecycle.js +3 -0
- package/dist/boot/Lifecycle.js.map +1 -0
- package/dist/boot/ambient-port.d.ts +38 -0
- package/dist/boot/ambient-port.d.ts.map +1 -0
- package/dist/boot/ambient-port.js +2 -0
- package/dist/boot/ambient-port.js.map +1 -0
- package/dist/boot/ambient.als.d.ts +3 -0
- package/dist/boot/ambient.als.d.ts.map +1 -0
- package/dist/boot/ambient.als.js +34 -0
- package/dist/boot/ambient.als.js.map +1 -0
- package/dist/boot/ambient.queue.d.ts +10 -0
- package/dist/boot/ambient.queue.d.ts.map +1 -0
- package/dist/boot/ambient.queue.js +60 -0
- package/dist/boot/ambient.queue.js.map +1 -0
- package/dist/boot/apply.d.ts +22 -0
- package/dist/boot/apply.d.ts.map +1 -0
- package/dist/boot/apply.js +38 -0
- package/dist/boot/apply.js.map +1 -0
- package/dist/boot/auth.d.ts +53 -0
- package/dist/boot/auth.d.ts.map +1 -0
- package/dist/boot/auth.js +2 -0
- package/dist/boot/auth.js.map +1 -0
- package/dist/{binding.d.ts → boot/binding.d.ts} +14 -17
- package/dist/boot/binding.d.ts.map +1 -0
- package/dist/{binding.js → boot/binding.js} +19 -10
- package/dist/boot/binding.js.map +1 -0
- package/dist/{boot.d.ts → boot/boot.d.ts} +25 -5
- package/dist/boot/boot.d.ts.map +1 -0
- package/dist/boot/boot.js +70 -0
- package/dist/boot/boot.js.map +1 -0
- package/dist/boot/bootstrap.d.ts.map +1 -0
- package/dist/boot/bootstrap.js +722 -0
- package/dist/boot/bootstrap.js.map +1 -0
- package/dist/boot/frame.d.ts +44 -0
- package/dist/boot/frame.d.ts.map +1 -0
- package/dist/boot/frame.js +172 -0
- package/dist/boot/frame.js.map +1 -0
- package/dist/boot/ownership.d.ts +42 -0
- package/dist/boot/ownership.d.ts.map +1 -0
- package/dist/boot/ownership.js +127 -0
- package/dist/boot/ownership.js.map +1 -0
- package/dist/boot/ports.d.ts +17 -0
- package/dist/boot/ports.d.ts.map +1 -0
- package/dist/boot/ports.js +57 -0
- package/dist/boot/ports.js.map +1 -0
- package/dist/{remote.d.ts → boot/remote.d.ts} +11 -3
- package/dist/boot/remote.d.ts.map +1 -0
- package/dist/{remote.js → boot/remote.js} +26 -28
- package/dist/boot/remote.js.map +1 -0
- package/dist/{seed.d.ts → boot/seed.d.ts} +13 -1
- package/dist/boot/seed.d.ts.map +1 -0
- package/dist/{seed.js → boot/seed.js} +24 -3
- package/dist/boot/seed.js.map +1 -0
- package/dist/boot/together.d.ts +26 -0
- package/dist/boot/together.d.ts.map +1 -0
- package/dist/boot/together.js +163 -0
- package/dist/boot/together.js.map +1 -0
- package/dist/boot/types.d.ts +260 -0
- package/dist/boot/types.d.ts.map +1 -0
- package/dist/boot/types.js.map +1 -0
- package/dist/builtins/config.d.ts +9 -0
- package/dist/builtins/config.d.ts.map +1 -1
- package/dist/builtins/config.js +16 -1
- package/dist/builtins/config.js.map +1 -1
- package/dist/builtins/logger.d.ts +37 -4
- package/dist/builtins/logger.d.ts.map +1 -1
- package/dist/builtins/logger.js +66 -7
- package/dist/builtins/logger.js.map +1 -1
- package/dist/config-loader.d.ts +39 -35
- package/dist/config-loader.d.ts.map +1 -1
- package/dist/config-loader.js +15 -54
- package/dist/config-loader.js.map +1 -1
- package/dist/contract/Call.d.ts +10 -0
- package/dist/contract/Call.d.ts.map +1 -0
- package/dist/contract/Call.js +15 -0
- package/dist/contract/Call.js.map +1 -0
- package/dist/contract/Invocation.d.ts +27 -0
- package/dist/contract/Invocation.d.ts.map +1 -0
- package/dist/contract/Invocation.js +59 -0
- package/dist/contract/Invocation.js.map +1 -0
- package/dist/contract/RouteAddress.d.ts +17 -0
- package/dist/contract/RouteAddress.d.ts.map +1 -0
- package/dist/contract/RouteAddress.js +38 -0
- package/dist/contract/RouteAddress.js.map +1 -0
- package/dist/contract.d.ts +25 -19
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js +25 -10
- package/dist/contract.js.map +1 -1
- package/dist/crypto/encoding.d.ts +25 -0
- package/dist/crypto/encoding.d.ts.map +1 -0
- package/dist/crypto/encoding.js +58 -0
- package/dist/crypto/encoding.js.map +1 -0
- package/dist/crypto/node.d.ts +4 -0
- package/dist/crypto/node.d.ts.map +1 -0
- package/dist/crypto/node.js +25 -0
- package/dist/crypto/node.js.map +1 -0
- package/dist/crypto/port.d.ts +42 -0
- package/dist/crypto/port.d.ts.map +1 -0
- package/dist/crypto/port.js +19 -0
- package/dist/crypto/port.js.map +1 -0
- package/dist/crypto/webcrypto.d.ts +4 -0
- package/dist/crypto/webcrypto.d.ts.map +1 -0
- package/dist/crypto/webcrypto.js +34 -0
- package/dist/crypto/webcrypto.js.map +1 -0
- package/dist/dispatch/ArgumentResolver.d.ts +10 -0
- package/dist/dispatch/ArgumentResolver.d.ts.map +1 -0
- package/dist/dispatch/ArgumentResolver.js +12 -0
- package/dist/dispatch/ArgumentResolver.js.map +1 -0
- package/dist/dispatch/ArrayResult.d.ts +3 -0
- package/dist/dispatch/ArrayResult.d.ts.map +1 -0
- package/dist/dispatch/ArrayResult.js +11 -0
- package/dist/dispatch/ArrayResult.js.map +1 -0
- package/dist/dispatch/DispatchEvent.d.ts +18 -0
- package/dist/dispatch/DispatchEvent.d.ts.map +1 -0
- package/dist/dispatch/DispatchEvent.js +30 -0
- package/dist/dispatch/DispatchEvent.js.map +1 -0
- package/dist/dispatch/DispatchLifecycle.d.ts +9 -0
- package/dist/dispatch/DispatchLifecycle.d.ts.map +1 -0
- package/dist/dispatch/DispatchLifecycle.js +25 -0
- package/dist/dispatch/DispatchLifecycle.js.map +1 -0
- package/dist/dispatch/DispatchPort.d.ts +6 -0
- package/dist/dispatch/DispatchPort.d.ts.map +1 -0
- package/dist/dispatch/DispatchPort.js +2 -0
- package/dist/dispatch/DispatchPort.js.map +1 -0
- package/dist/dispatch/Dispatcher.d.ts +16 -0
- package/dist/dispatch/Dispatcher.d.ts.map +1 -0
- package/dist/dispatch/Dispatcher.js +44 -0
- package/dist/dispatch/Dispatcher.js.map +1 -0
- package/dist/dispatch/InFlight.d.ts +12 -0
- package/dist/dispatch/InFlight.d.ts.map +1 -0
- package/dist/dispatch/InFlight.js +46 -0
- package/dist/dispatch/InFlight.js.map +1 -0
- package/dist/dispatch/InputValidator.d.ts +7 -0
- package/dist/dispatch/InputValidator.d.ts.map +1 -0
- package/dist/dispatch/InputValidator.js +22 -0
- package/dist/dispatch/InputValidator.js.map +1 -0
- package/dist/dispatch/LocalRoutePolicy.d.ts +11 -0
- package/dist/dispatch/LocalRoutePolicy.d.ts.map +1 -0
- package/dist/dispatch/LocalRoutePolicy.js +32 -0
- package/dist/dispatch/LocalRoutePolicy.js.map +1 -0
- package/dist/dispatch/OperationExecutor.d.ts +25 -0
- package/dist/dispatch/OperationExecutor.d.ts.map +1 -0
- package/dist/dispatch/OperationExecutor.js +32 -0
- package/dist/dispatch/OperationExecutor.js.map +1 -0
- package/dist/dispatch/OperationRoute.d.ts +13 -0
- package/dist/dispatch/OperationRoute.d.ts.map +1 -0
- package/dist/dispatch/OperationRoute.js +15 -0
- package/dist/dispatch/OperationRoute.js.map +1 -0
- package/dist/dispatch/OutputProjector.d.ts +12 -0
- package/dist/dispatch/OutputProjector.d.ts.map +1 -0
- package/dist/dispatch/OutputProjector.js +30 -0
- package/dist/dispatch/OutputProjector.js.map +1 -0
- package/dist/dispatch/OutputView.d.ts +8 -0
- package/dist/dispatch/OutputView.d.ts.map +1 -0
- package/dist/dispatch/OutputView.js +10 -0
- package/dist/dispatch/OutputView.js.map +1 -0
- package/dist/dispatch/PresenterArgumentResolver.d.ts +12 -0
- package/dist/dispatch/PresenterArgumentResolver.d.ts.map +1 -0
- package/dist/dispatch/PresenterArgumentResolver.js +20 -0
- package/dist/dispatch/PresenterArgumentResolver.js.map +1 -0
- package/dist/dispatch/PresenterExecutor.d.ts +11 -0
- package/dist/dispatch/PresenterExecutor.d.ts.map +1 -0
- package/dist/dispatch/PresenterExecutor.js +56 -0
- package/dist/dispatch/PresenterExecutor.js.map +1 -0
- package/dist/dispatch/RemoteRouteResolver.d.ts +13 -0
- package/dist/dispatch/RemoteRouteResolver.d.ts.map +1 -0
- package/dist/dispatch/RemoteRouteResolver.js +18 -0
- package/dist/dispatch/RemoteRouteResolver.js.map +1 -0
- package/dist/dispatch/Route.d.ts +10 -0
- package/dist/dispatch/Route.d.ts.map +1 -0
- package/dist/dispatch/Route.js +2 -0
- package/dist/dispatch/Route.js.map +1 -0
- package/dist/dispatch/RouteNotFoundError.d.ts +10 -0
- package/dist/dispatch/RouteNotFoundError.d.ts.map +1 -0
- package/dist/dispatch/RouteNotFoundError.js +24 -0
- package/dist/dispatch/RouteNotFoundError.js.map +1 -0
- package/dist/dispatch/RoutePolicy.d.ts +8 -0
- package/dist/dispatch/RoutePolicy.d.ts.map +1 -0
- package/dist/dispatch/RoutePolicy.js +2 -0
- package/dist/dispatch/RoutePolicy.js.map +1 -0
- package/dist/dispatch/RouteRegistry.d.ts +18 -0
- package/dist/dispatch/RouteRegistry.d.ts.map +1 -0
- package/dist/dispatch/RouteRegistry.js +62 -0
- package/dist/dispatch/RouteRegistry.js.map +1 -0
- package/dist/dispatch/RouteResolver.d.ts +7 -0
- package/dist/dispatch/RouteResolver.d.ts.map +1 -0
- package/dist/dispatch/RouteResolver.js +2 -0
- package/dist/dispatch/RouteResolver.js.map +1 -0
- package/dist/dispatch/StorageGuard.d.ts +15 -0
- package/dist/dispatch/StorageGuard.d.ts.map +1 -0
- package/dist/dispatch/StorageGuard.js +63 -0
- package/dist/dispatch/StorageGuard.js.map +1 -0
- package/dist/effective-operation.d.ts +90 -0
- package/dist/effective-operation.d.ts.map +1 -0
- package/dist/effective-operation.js +449 -0
- package/dist/effective-operation.js.map +1 -0
- package/dist/emit.d.ts +2 -2
- package/dist/emit.d.ts.map +1 -1
- package/dist/emit.js +2 -2
- package/dist/emit.js.map +1 -1
- package/dist/entry/DynamicFacade.d.ts +10 -0
- package/dist/entry/DynamicFacade.d.ts.map +1 -0
- package/dist/entry/DynamicFacade.js +27 -0
- package/dist/entry/DynamicFacade.js.map +1 -0
- package/dist/entry/FacadeEntry.d.ts +11 -0
- package/dist/entry/FacadeEntry.d.ts.map +1 -0
- package/dist/entry/FacadeEntry.js +26 -0
- package/dist/entry/FacadeEntry.js.map +1 -0
- package/dist/entry/TransportEntry.d.ts +13 -0
- package/dist/entry/TransportEntry.d.ts.map +1 -0
- package/dist/entry/TransportEntry.js +24 -0
- package/dist/entry/TransportEntry.js.map +1 -0
- package/dist/frond-config.d.ts +24 -7
- package/dist/frond-config.d.ts.map +1 -1
- package/dist/frond-config.js.map +1 -1
- package/dist/graph.d.ts +1 -1
- package/dist/graph.d.ts.map +1 -1
- package/dist/graph.js +3 -2
- package/dist/graph.js.map +1 -1
- package/dist/identity-keys.d.ts +14 -0
- package/dist/identity-keys.d.ts.map +1 -0
- package/dist/identity-keys.js +37 -0
- package/dist/identity-keys.js.map +1 -0
- package/dist/identity.d.ts +58 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +182 -0
- package/dist/identity.js.map +1 -0
- package/dist/imports.d.ts +2 -2
- package/dist/imports.d.ts.map +1 -1
- package/dist/imports.js +7 -3
- package/dist/imports.js.map +1 -1
- package/dist/index.d.ts +57 -38
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +38 -32
- package/dist/index.js.map +1 -1
- package/dist/loader.d.ts +16 -0
- package/dist/loader.d.ts.map +1 -0
- package/dist/loader.js +25 -0
- package/dist/loader.js.map +1 -0
- package/dist/node.d.ts +21 -0
- package/dist/node.d.ts.map +1 -0
- package/dist/node.js +24 -0
- package/dist/node.js.map +1 -0
- package/dist/orm.d.ts +69 -8
- package/dist/orm.d.ts.map +1 -1
- package/dist/orm.js +35 -2
- package/dist/orm.js.map +1 -1
- package/dist/prefab/collector.d.ts +29 -0
- package/dist/prefab/collector.d.ts.map +1 -0
- package/dist/prefab/collector.js +34 -0
- package/dist/prefab/collector.js.map +1 -0
- package/dist/{crud.d.ts → prefab/crud.d.ts} +7 -8
- package/dist/prefab/crud.d.ts.map +1 -0
- package/dist/{crud.js → prefab/crud.js} +39 -5
- package/dist/prefab/crud.js.map +1 -0
- package/dist/prefab/mirror.d.ts +52 -0
- package/dist/prefab/mirror.d.ts.map +1 -0
- package/dist/prefab/mirror.js +66 -0
- package/dist/prefab/mirror.js.map +1 -0
- package/dist/prefab/prefab.d.ts +15 -0
- package/dist/prefab/prefab.d.ts.map +1 -0
- package/dist/prefab/prefab.js +19 -0
- package/dist/prefab/prefab.js.map +1 -0
- package/dist/{presenter.d.ts → prefab/presenter.d.ts} +6 -17
- package/dist/prefab/presenter.d.ts.map +1 -0
- package/dist/{presenter.js → prefab/presenter.js} +5 -23
- package/dist/prefab/presenter.js.map +1 -0
- package/dist/prefab/repository.d.ts +104 -0
- package/dist/prefab/repository.d.ts.map +1 -0
- package/dist/prefab/repository.js +62 -0
- package/dist/prefab/repository.js.map +1 -0
- package/dist/scan/Fronds.d.ts +45 -0
- package/dist/scan/Fronds.d.ts.map +1 -0
- package/dist/scan/Fronds.js +66 -0
- package/dist/scan/Fronds.js.map +1 -0
- package/dist/scan/conventions.d.ts +74 -0
- package/dist/scan/conventions.d.ts.map +1 -0
- package/dist/scan/conventions.js +82 -0
- package/dist/scan/conventions.js.map +1 -0
- package/dist/scan/emit.d.ts +14 -0
- package/dist/scan/emit.d.ts.map +1 -0
- package/dist/scan/emit.js +212 -0
- package/dist/scan/emit.js.map +1 -0
- package/dist/scan/frond.d.ts +224 -0
- package/dist/scan/frond.d.ts.map +1 -0
- package/dist/scan/frond.js +2 -0
- package/dist/scan/frond.js.map +1 -0
- package/dist/{handler-parser.d.ts → scan/handler-parser.d.ts} +20 -9
- package/dist/scan/handler-parser.d.ts.map +1 -0
- package/dist/scan/handler-parser.js +665 -0
- package/dist/scan/handler-parser.js.map +1 -0
- package/dist/scan/scan-cache.d.ts +16 -0
- package/dist/scan/scan-cache.d.ts.map +1 -0
- package/dist/{scan-cache.js → scan/scan-cache.js} +27 -20
- package/dist/scan/scan-cache.js.map +1 -0
- package/dist/scan/scanner.d.ts +20 -0
- package/dist/scan/scanner.d.ts.map +1 -0
- package/dist/{scanner.js → scan/scanner.js} +212 -167
- package/dist/scan/scanner.js.map +1 -0
- package/dist/verify.d.ts +16 -3
- package/dist/verify.d.ts.map +1 -1
- package/dist/verify.js +21 -18
- package/dist/verify.js.map +1 -1
- package/dist/{call.d.ts → wire/call.d.ts} +76 -7
- package/dist/wire/call.d.ts.map +1 -0
- package/dist/{call.js → wire/call.js} +53 -80
- package/dist/wire/call.js.map +1 -0
- package/dist/{middleware.d.ts → wire/errors.d.ts} +18 -19
- package/dist/wire/errors.d.ts.map +1 -0
- package/dist/{middleware.js → wire/errors.js} +26 -14
- package/dist/wire/errors.js.map +1 -0
- package/dist/{errors.d.ts → wire/http-error.d.ts} +5 -6
- package/dist/wire/http-error.d.ts.map +1 -0
- package/dist/{errors.js → wire/http-error.js} +7 -6
- package/dist/wire/http-error.js.map +1 -0
- package/dist/wire/invocation.d.ts +4 -0
- package/dist/wire/invocation.d.ts.map +1 -0
- package/dist/wire/invocation.js +3 -0
- package/dist/wire/invocation.js.map +1 -0
- package/dist/{middleware/logger.d.ts → wire/loggerMiddleware.d.ts} +3 -3
- package/dist/wire/loggerMiddleware.d.ts.map +1 -0
- package/dist/{middleware/logger.js → wire/loggerMiddleware.js} +2 -2
- package/dist/wire/loggerMiddleware.js.map +1 -0
- package/dist/wire/middleware.d.ts +29 -0
- package/dist/wire/middleware.d.ts.map +1 -0
- package/dist/wire/middleware.js +20 -0
- package/dist/wire/middleware.js.map +1 -0
- package/dist/{operation.d.ts → wire/operation.d.ts} +39 -10
- package/dist/wire/operation.d.ts.map +1 -0
- package/dist/wire/operation.js +167 -0
- package/dist/wire/operation.js.map +1 -0
- package/package.json +27 -8
- package/src/boot/AppLifecycle.ts +50 -0
- package/src/boot/Emissions.ts +263 -0
- package/src/boot/HandlerFacade.ts +242 -0
- package/src/boot/Lifecycle.ts +3 -0
- package/src/boot/ambient-port.ts +41 -0
- package/src/boot/ambient.als.ts +43 -0
- package/src/boot/ambient.queue.ts +75 -0
- package/src/boot/apply.ts +47 -0
- package/src/boot/auth.ts +55 -0
- package/src/boot/binding.ts +182 -0
- package/src/boot/boot.ts +125 -0
- package/src/boot/bootstrap.ts +839 -0
- package/src/boot/frame.ts +210 -0
- package/src/boot/ownership.ts +140 -0
- package/src/boot/ports.ts +66 -0
- package/src/boot/remote.ts +179 -0
- package/src/boot/seed.ts +158 -0
- package/src/boot/together.ts +215 -0
- package/src/boot/types.ts +261 -0
- package/src/builtins/config.ts +19 -0
- package/src/builtins/logger.ts +175 -0
- package/src/config-loader.ts +146 -0
- package/src/contract/Call.ts +18 -0
- package/src/contract/Invocation.ts +72 -0
- package/src/contract/RouteAddress.ts +49 -0
- package/src/contract.ts +74 -0
- package/src/crypto/encoding.ts +59 -0
- package/src/crypto/node.ts +30 -0
- package/src/crypto/port.ts +45 -0
- package/src/crypto/webcrypto.ts +55 -0
- package/src/define.ts +10 -0
- package/src/dispatch/ArgumentResolver.ts +17 -0
- package/src/dispatch/ArrayResult.ts +10 -0
- package/src/dispatch/DispatchEvent.ts +38 -0
- package/src/dispatch/DispatchLifecycle.ts +23 -0
- package/src/dispatch/DispatchPort.ts +6 -0
- package/src/dispatch/Dispatcher.ts +48 -0
- package/src/dispatch/InFlight.ts +49 -0
- package/src/dispatch/InputValidator.ts +28 -0
- package/src/dispatch/LocalRoutePolicy.ts +34 -0
- package/src/dispatch/OperationExecutor.ts +60 -0
- package/src/dispatch/OperationRoute.ts +18 -0
- package/src/dispatch/OutputProjector.ts +32 -0
- package/src/dispatch/OutputView.ts +9 -0
- package/src/dispatch/PresenterArgumentResolver.ts +25 -0
- package/src/dispatch/PresenterExecutor.ts +55 -0
- package/src/dispatch/RemoteRouteResolver.ts +21 -0
- package/src/dispatch/Route.ts +11 -0
- package/src/dispatch/RouteNotFoundError.ts +29 -0
- package/src/dispatch/RoutePolicy.ts +8 -0
- package/src/dispatch/RouteRegistry.ts +73 -0
- package/src/dispatch/RouteResolver.ts +7 -0
- package/src/dispatch/StorageGuard.ts +71 -0
- package/src/effective-operation.ts +597 -0
- package/src/emit.ts +90 -0
- package/src/entry/DynamicFacade.ts +28 -0
- package/src/entry/FacadeEntry.ts +32 -0
- package/src/entry/TransportEntry.ts +30 -0
- package/src/frond-config.ts +138 -0
- package/src/graph.ts +180 -0
- package/src/identity-keys.ts +43 -0
- package/src/identity.ts +235 -0
- package/src/imports.ts +123 -0
- package/src/index.ts +106 -0
- package/src/loader.ts +41 -0
- package/src/node.ts +28 -0
- package/src/orm.ts +252 -0
- package/src/prefab/collector.ts +36 -0
- package/src/prefab/crud.ts +188 -0
- package/src/prefab/mirror.ts +122 -0
- package/src/prefab/prefab.ts +46 -0
- package/src/prefab/presenter.ts +63 -0
- package/src/prefab/repository.ts +170 -0
- package/src/scan/Fronds.ts +73 -0
- package/src/scan/conventions.ts +122 -0
- package/src/scan/emit.ts +231 -0
- package/src/scan/frond.ts +235 -0
- package/src/scan/handler-parser.ts +818 -0
- package/src/scan/scan-cache.ts +115 -0
- package/src/scan/scanner.ts +758 -0
- package/src/verify.ts +193 -0
- package/src/wire/call.ts +369 -0
- package/src/wire/errors.ts +124 -0
- package/src/wire/http-error.ts +77 -0
- package/src/wire/invocation.ts +10 -0
- package/src/wire/loggerMiddleware.ts +29 -0
- package/src/wire/middleware.ts +47 -0
- package/src/wire/operation.ts +258 -0
- package/dist/binding.d.ts.map +0 -1
- package/dist/binding.js.map +0 -1
- package/dist/boot.d.ts.map +0 -1
- package/dist/boot.js +0 -53
- package/dist/boot.js.map +0 -1
- package/dist/bootstrap.d.ts.map +0 -1
- package/dist/bootstrap.js +0 -879
- package/dist/bootstrap.js.map +0 -1
- package/dist/call.d.ts.map +0 -1
- package/dist/call.js.map +0 -1
- package/dist/collector.d.ts +0 -28
- package/dist/collector.d.ts.map +0 -1
- package/dist/collector.js +0 -32
- package/dist/collector.js.map +0 -1
- package/dist/crud.d.ts.map +0 -1
- package/dist/crud.js.map +0 -1
- package/dist/egress.d.ts +0 -52
- package/dist/egress.d.ts.map +0 -1
- package/dist/egress.js +0 -186
- package/dist/egress.js.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js.map +0 -1
- package/dist/handler-parser.d.ts.map +0 -1
- package/dist/handler-parser.js +0 -505
- package/dist/handler-parser.js.map +0 -1
- package/dist/invocation.d.ts +0 -20
- package/dist/invocation.d.ts.map +0 -1
- package/dist/invocation.js +0 -15
- package/dist/invocation.js.map +0 -1
- package/dist/middleware/error-handler.d.ts +0 -15
- package/dist/middleware/error-handler.d.ts.map +0 -1
- package/dist/middleware/error-handler.js +0 -29
- package/dist/middleware/error-handler.js.map +0 -1
- package/dist/middleware/logger.d.ts.map +0 -1
- package/dist/middleware/logger.js.map +0 -1
- package/dist/middleware.d.ts.map +0 -1
- package/dist/middleware.js.map +0 -1
- package/dist/mirror.d.ts +0 -93
- package/dist/mirror.d.ts.map +0 -1
- package/dist/mirror.js +0 -96
- package/dist/mirror.js.map +0 -1
- package/dist/operation.d.ts.map +0 -1
- package/dist/operation.js +0 -95
- package/dist/operation.js.map +0 -1
- package/dist/presenter.d.ts.map +0 -1
- package/dist/presenter.js.map +0 -1
- package/dist/remote.d.ts.map +0 -1
- package/dist/remote.js.map +0 -1
- package/dist/repository.d.ts +0 -55
- package/dist/repository.d.ts.map +0 -1
- package/dist/repository.js +0 -26
- package/dist/repository.js.map +0 -1
- package/dist/scan-cache.d.ts +0 -10
- package/dist/scan-cache.d.ts.map +0 -1
- package/dist/scan-cache.js.map +0 -1
- package/dist/scanner.d.ts +0 -34
- package/dist/scanner.d.ts.map +0 -1
- package/dist/scanner.js.map +0 -1
- package/dist/seed.d.ts.map +0 -1
- package/dist/seed.js.map +0 -1
- package/dist/types.d.ts +0 -421
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
- /package/dist/{bootstrap.d.ts → boot/bootstrap.d.ts} +0 -0
- /package/dist/{types.js → boot/types.js} +0 -0
package/dist/types.d.ts
DELETED
|
@@ -1,421 +0,0 @@
|
|
|
1
|
-
import type { Container } from '@fougere/container';
|
|
2
|
-
import type { ParsedParam } from './operation.js';
|
|
3
|
-
import type { EntityOrm, OrmFactory } from './orm.js';
|
|
4
|
-
import type { SchemaView } from '@fougere/schema';
|
|
5
|
-
import type { OperationContract, OperationsMap } from './operation.js';
|
|
6
|
-
import type { AppMiddleware } from './middleware.js';
|
|
7
|
-
import type { PresenterViews } from './presenter.js';
|
|
8
|
-
import type { Transport } from './call.js';
|
|
9
|
-
/**
|
|
10
|
-
* A discovered provider — a class under `services/` or `repositories/`, injected by type.
|
|
11
|
-
*
|
|
12
|
-
* Which of the two directories it came from is deliberately not recorded. The scan used
|
|
13
|
-
* to tag it `kind: 'service' | 'repository'`, a field it filled on every provider and
|
|
14
|
-
* that **no consumer ever read** — the two directories are two spellings of the same
|
|
15
|
-
* thing, and DI resolves by type either way.
|
|
16
|
-
*/
|
|
17
|
-
export interface ProviderEntry {
|
|
18
|
-
/** Registration key: class name with first letter lowercased. */
|
|
19
|
-
name: string;
|
|
20
|
-
/** The class constructor (default export of the file). */
|
|
21
|
-
ctor: new (...args: unknown[]) => unknown;
|
|
22
|
-
/** Constructor dependency type names (from AST scan). */
|
|
23
|
-
deps: string[];
|
|
24
|
-
/** Absolute file path (for debugging). */
|
|
25
|
-
filePath: string;
|
|
26
|
-
}
|
|
27
|
-
/** A discovered entity (Entity subclass in entities/ dir). */
|
|
28
|
-
export interface EntityEntry {
|
|
29
|
-
/** Registration key: class name lowercased first char (e.g. 'product'). */
|
|
30
|
-
name: string;
|
|
31
|
-
/** The Entity class (has static getFields()). */
|
|
32
|
-
entityClass: SchemaView;
|
|
33
|
-
/** Absolute file path (for debugging). */
|
|
34
|
-
filePath: string;
|
|
35
|
-
/** Whether this entity is part of the frond's public contract. */
|
|
36
|
-
exposed?: boolean;
|
|
37
|
-
}
|
|
38
|
-
/** A discovered handler (controls what a service exposes). */
|
|
39
|
-
export interface HandlerEntry {
|
|
40
|
-
/** Registration key (e.g. 'postHandler'). */
|
|
41
|
-
name: string;
|
|
42
|
-
/**
|
|
43
|
-
* The name this handler answers to — its class name minus `Handler`, lowercased
|
|
44
|
-
* (`PostHandler` → `post`). It is what `facadeKeyOf` builds its key from and what
|
|
45
|
-
* travels as `FrondCall.entity` on the wire.
|
|
46
|
-
*
|
|
47
|
-
* **It is NOT an entity name**, and it was called `entityName` for long enough to
|
|
48
|
-
* mislead: `toEntityName` (`scanner.ts`) strips the suffix without checking that any
|
|
49
|
-
* entity carries the result, and the boot states the consequence — *pointing at
|
|
50
|
-
* nothing is legal*. A health check, a search across several shapes, a pure
|
|
51
|
-
* computation: ordinary handlers that own no row. `PresenterEntry`/`CollectorEntry`
|
|
52
|
-
* keep `entityName` because those really do target a declared entity.
|
|
53
|
-
*/
|
|
54
|
-
address: string;
|
|
55
|
-
/** The handler class. */
|
|
56
|
-
ctor: new (...args: unknown[]) => unknown;
|
|
57
|
-
/** All operations with full signatures for binding. */
|
|
58
|
-
operations: OperationsMap;
|
|
59
|
-
/** Constructor dependency type names (from AST scan). */
|
|
60
|
-
deps: string[];
|
|
61
|
-
/** Absolute file path (for debugging). */
|
|
62
|
-
filePath: string;
|
|
63
|
-
/** Whether this handler is part of the frond's public contract. */
|
|
64
|
-
exposed?: boolean;
|
|
65
|
-
/** Output schema override — when Crud(Entity, Output), restricts ORM output. */
|
|
66
|
-
outputOverride?: SchemaView;
|
|
67
|
-
/** Surface name — subdirectory in handlers/ (e.g. 'admin', 'public'). */
|
|
68
|
-
surface?: string;
|
|
69
|
-
}
|
|
70
|
-
/** Return type metadata for a presenter computed field. */
|
|
71
|
-
export interface PresenterFieldMeta {
|
|
72
|
-
name: string;
|
|
73
|
-
/** Inferred return type name: 'string', 'number', 'boolean', or a class name. */
|
|
74
|
-
returnType?: string;
|
|
75
|
-
/**
|
|
76
|
-
* The field emits a LIST per row — `tags(posts: Post[]): string[][]`.
|
|
77
|
-
*
|
|
78
|
-
* The method answers one value per row, so the outer array level of its return type is
|
|
79
|
-
* the page, not the field: what remains after removing it is the field's own arity.
|
|
80
|
-
* Nothing measured that remainder, so a computed list and a computed scalar looked
|
|
81
|
-
* identical and every projection announced the scalar.
|
|
82
|
-
*/
|
|
83
|
-
list?: boolean;
|
|
84
|
-
/** Whether the return is nullable. */
|
|
85
|
-
nullable?: boolean;
|
|
86
|
-
/**
|
|
87
|
-
* The declared parameters AFTER the rows. Kept raw rather than resolved: the scan
|
|
88
|
-
* meets presenters before collectors, so the plan is computed at boot where the
|
|
89
|
-
* collector names are known — exactly as a handler op's is.
|
|
90
|
-
*
|
|
91
|
-
* A computed field that declares `user: User | null` is then fed by the collector
|
|
92
|
-
* that resolves one. A presenter is not a second mechanism.
|
|
93
|
-
*/
|
|
94
|
-
params?: ParsedParam[];
|
|
95
|
-
}
|
|
96
|
-
/** A discovered presenter (computed fields for an entity's output). */
|
|
97
|
-
export interface PresenterEntry {
|
|
98
|
-
/** Entity name this presenter enriches (e.g. 'post' from PostPresenter). */
|
|
99
|
-
entityName: string;
|
|
100
|
-
/** The presenter class. */
|
|
101
|
-
ctor: new (...args: unknown[]) => unknown;
|
|
102
|
-
/** Computed field names (method names on prototype). */
|
|
103
|
-
fields: string[];
|
|
104
|
-
/** Per-field type metadata (inferred from source via parser). */
|
|
105
|
-
fieldMeta: PresenterFieldMeta[];
|
|
106
|
-
/**
|
|
107
|
-
* The view each computed field emits, when the presenter declares one
|
|
108
|
-
* (`Presenter(Order, { items: [OrderItemView] })`). Stated rather than inferred: the
|
|
109
|
-
* parser reads a scalar off a return type and nothing more, so an object-valued field
|
|
110
|
-
* has no derivable shape without this.
|
|
111
|
-
*/
|
|
112
|
-
views?: PresenterViews;
|
|
113
|
-
/** Constructor dependency type names (from AST scan). */
|
|
114
|
-
deps: string[];
|
|
115
|
-
/** Absolute file path (for debugging). */
|
|
116
|
-
filePath: string;
|
|
117
|
-
}
|
|
118
|
-
/** A discovered collector (resolves handler input params from invocation context). */
|
|
119
|
-
export interface CollectorEntry {
|
|
120
|
-
/** Entity name this collector resolves (e.g. 'user' from UserCollector). */
|
|
121
|
-
entityName: string;
|
|
122
|
-
/** The collector class. */
|
|
123
|
-
ctor: new (...args: unknown[]) => unknown;
|
|
124
|
-
/** Constructor dependency type names (from AST scan). */
|
|
125
|
-
deps: string[];
|
|
126
|
-
/** Absolute file path (for debugging). */
|
|
127
|
-
filePath: string;
|
|
128
|
-
}
|
|
129
|
-
/** A discovered seed file (array of records or async factory). */
|
|
130
|
-
export interface SeedEntry {
|
|
131
|
-
/** Entity name this seed targets (from filename: Author.seed.ts → 'author'). */
|
|
132
|
-
entityName: string;
|
|
133
|
-
/** Raw default export — array or function. Resolved at runtime. */
|
|
134
|
-
data: Record<string, unknown>[] | SeedFactory;
|
|
135
|
-
/** Absolute file path (for debugging). */
|
|
136
|
-
filePath: string;
|
|
137
|
-
}
|
|
138
|
-
/** Seed factory — receives a resolver to access handlers cross-frond. */
|
|
139
|
-
export type SeedFactory = (resolve: <T>(name: string) => T) => Promise<Record<string, unknown>[]>;
|
|
140
|
-
/** Where a frond lives on disk. */
|
|
141
|
-
export interface FrondSource {
|
|
142
|
-
/** Absolute path to the frond directory. */
|
|
143
|
-
path: string;
|
|
144
|
-
/** The @frond/{name} package name. Always present. */
|
|
145
|
-
package: string;
|
|
146
|
-
}
|
|
147
|
-
export interface FrondDescriptor {
|
|
148
|
-
name: string;
|
|
149
|
-
source: FrondSource;
|
|
150
|
-
providers: ProviderEntry[];
|
|
151
|
-
entities: EntityEntry[];
|
|
152
|
-
handlers: HandlerEntry[];
|
|
153
|
-
presenters: PresenterEntry[];
|
|
154
|
-
collectors: CollectorEntry[];
|
|
155
|
-
seeds: SeedEntry[];
|
|
156
|
-
/** Per-surface entity lists from frond.config.ts (e.g. { graphql: ['Post'], rest: ['Post', 'Author'] }). */
|
|
157
|
-
surfaces?: Record<string, string[]>;
|
|
158
|
-
/** Entities this frond may read across sources — see `FrondConfig.reads`. */
|
|
159
|
-
reads?: string[];
|
|
160
|
-
/**
|
|
161
|
-
* Per-operation overrides from frond.config.ts. Key = operation name.
|
|
162
|
-
*
|
|
163
|
-
* Two depths, as declared on {@link OperationOverride}: the surface keys travel to the
|
|
164
|
-
* transport adapters, the contract keys (`input`/`output`/`binding`) travel to the
|
|
165
|
-
* façade — where config is the third producer of an operation's contract, alongside a
|
|
166
|
-
* prefab's `__ops` and the scan.
|
|
167
|
-
*/
|
|
168
|
-
operationsOverrides?: Record<string, OperationContract & {
|
|
169
|
-
kind?: 'query' | 'command';
|
|
170
|
-
/** Class name to resolve from DI (overrides default `{Entity}Handler` lookup). */
|
|
171
|
-
handlerName?: string;
|
|
172
|
-
/** Method name on the resolved handler (defaults to op name). */
|
|
173
|
-
method?: string;
|
|
174
|
-
}>;
|
|
175
|
-
}
|
|
176
|
-
/** Result of scanning a project directory. */
|
|
177
|
-
/**
|
|
178
|
-
* Something the scan could NOT do — recorded instead of swallowed.
|
|
179
|
-
*
|
|
180
|
-
* The scan answers with what it found. Until now it answered the same way whether
|
|
181
|
-
* a directory held nothing or could not be read, and whether a handler declared no
|
|
182
|
-
* operation or failed to parse: `catch → empty`. So every downstream reader — the
|
|
183
|
-
* façade, the identity card, anything asking "what does this app serve?" — could
|
|
184
|
-
* not tell **"there is nothing"** from **"I could not look"**.
|
|
185
|
-
*
|
|
186
|
-
* That distinction is what makes a rule about an ABSENCE sound. Without it, a check
|
|
187
|
-
* derived from the scan reports "nothing wrong" precisely when it read nothing.
|
|
188
|
-
*/
|
|
189
|
-
export interface ScanDiagnostic {
|
|
190
|
-
/**
|
|
191
|
-
* `blocking` — the app now serves less than its source declares, and no caller
|
|
192
|
-
* can know it: a handler that failed to parse contributes zero operations.
|
|
193
|
-
* `warning` — something may be missing and the scan cannot decide, e.g. a base
|
|
194
|
-
* class it is not allowed to resolve. Statable in `frond.config.ts`.
|
|
195
|
-
*/
|
|
196
|
-
severity: 'blocking' | 'warning';
|
|
197
|
-
/** Stable rule name — `handler-parse-failed`, `directory-unreadable`. */
|
|
198
|
-
code: string;
|
|
199
|
-
/** Absolute path of what could not be read. */
|
|
200
|
-
filePath: string;
|
|
201
|
-
/** The frond it belongs to, when the scan got far enough to know. */
|
|
202
|
-
frond?: string;
|
|
203
|
-
/** What could not be done, and what it costs. One sentence, for a human. */
|
|
204
|
-
message: string;
|
|
205
|
-
/** The underlying failure, kept whole. */
|
|
206
|
-
cause?: unknown;
|
|
207
|
-
}
|
|
208
|
-
export interface ScanResult {
|
|
209
|
-
fronds: FrondDescriptor[];
|
|
210
|
-
/** What the scan could not do. Empty is a claim, not a default — see {@link ScanDiagnostic}. */
|
|
211
|
-
diagnostics: ScanDiagnostic[];
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Lazy auth declaration written in fougere.config.ts.
|
|
215
|
-
*
|
|
216
|
-
* Each @fougere/auth-* package exports a factory (e.g. `betterAuth(opts)`) that
|
|
217
|
-
* returns this shape. The `create()` method is called once at boot with the
|
|
218
|
-
* resolved db + ormFactory, so the provider can wire its engine through Fougere.
|
|
219
|
-
*/
|
|
220
|
-
export interface AuthConfig {
|
|
221
|
-
/** Build the runtime — invoked by createApp at boot with the resolved storage handles. */
|
|
222
|
-
create(ctx: AuthContext): AuthRuntime | Promise<AuthRuntime>;
|
|
223
|
-
/**
|
|
224
|
-
* Entities the provider will use. Optional metadata — useful for the core's
|
|
225
|
-
* future migration registry to know which tables auth needs.
|
|
226
|
-
*/
|
|
227
|
-
entities?: Record<string, SchemaView>;
|
|
228
|
-
}
|
|
229
|
-
/**
|
|
230
|
-
* Context passed by the core to an auth provider's create() function.
|
|
231
|
-
* Provides the resources the provider needs to integrate with the app.
|
|
232
|
-
*/
|
|
233
|
-
export interface AuthContext {
|
|
234
|
-
/** Storage handle (Kysely DB instance, Prisma client, etc.) — opaque to core. */
|
|
235
|
-
db: unknown;
|
|
236
|
-
/** Per-entity ORM factory — auth provider uses this to back its adapter. */
|
|
237
|
-
ormFactory: OrmFactory;
|
|
238
|
-
}
|
|
239
|
-
/**
|
|
240
|
-
* Runtime returned by an auth provider's create(config, ctx) function.
|
|
241
|
-
* The core mounts this on the App and the HTTP layer (Nuxt module / router) uses it.
|
|
242
|
-
*/
|
|
243
|
-
export interface AuthRuntime {
|
|
244
|
-
/** Entities used by the provider, including any defaults it filled in. */
|
|
245
|
-
entities: Record<string, SchemaView>;
|
|
246
|
-
/**
|
|
247
|
-
* Per-entity ORMs the provider built for itself. Exposed so app code can
|
|
248
|
-
* query auth tables (e.g. list active sessions for a user) without rebuilding
|
|
249
|
-
* the same EntityOrm.
|
|
250
|
-
*/
|
|
251
|
-
orms: Record<string, EntityOrm>;
|
|
252
|
-
/** Web Standard handler that processes /auth/* requests. */
|
|
253
|
-
handler: (request: Request) => Promise<Response>;
|
|
254
|
-
/** Programmatic API exposed by the provider (getSession, signOut, ...). */
|
|
255
|
-
api: Record<string, unknown>;
|
|
256
|
-
/** Effective mount path (echoes config.basePath or the provider's default). */
|
|
257
|
-
basePath: string;
|
|
258
|
-
}
|
|
259
|
-
/** Options for createApp(). */
|
|
260
|
-
export interface CreateAppOptions {
|
|
261
|
-
/** Project root directory. Defaults to process.cwd(). */
|
|
262
|
-
root?: string;
|
|
263
|
-
/** Factory function to create the container. Required. */
|
|
264
|
-
createContainer: () => Container;
|
|
265
|
-
/** Factory to auto-generate EntityOrm for each scanned entity. */
|
|
266
|
-
ormFactory?: OrmFactory;
|
|
267
|
-
/**
|
|
268
|
-
* Builds the cross-source reader a frond gets when it declares `reads:`.
|
|
269
|
-
*
|
|
270
|
-
* A factory rather than a value, for the same reason `ormFactory` is one: core must
|
|
271
|
-
* not name a storage package, and this one costs 71 MB of downloaded extensions and a
|
|
272
|
-
* native module — nothing a first run that only wanted sqlite should carry. The host
|
|
273
|
-
* decides what backs it; `@fougere/adapter-duckdb` is one answer, not the contract.
|
|
274
|
-
*
|
|
275
|
-
* Called once per frond that asks, with the entity CLASSES its `reads:` named — a
|
|
276
|
-
* name would make the reader resolve the schema a second time.
|
|
277
|
-
*/
|
|
278
|
-
sourcesFactory?: (reads: unknown[], frond: string) => Promise<unknown> | unknown;
|
|
279
|
-
/** Only load these fronds (by name). If absent, load all. */
|
|
280
|
-
fronds?: string[];
|
|
281
|
-
/**
|
|
282
|
-
* Remote fronds — label → address. What each remote hosts is discovered
|
|
283
|
-
* at the first miss (rpc.discover), never declared here.
|
|
284
|
-
*/
|
|
285
|
-
remotes?: Record<string, string>;
|
|
286
|
-
/**
|
|
287
|
-
* Builds the transport used to reach `remotes` addresses. Wired by
|
|
288
|
-
* layer-2 packages (e.g. @fougere/transport-http); required when
|
|
289
|
-
* `remotes` is non-empty.
|
|
290
|
-
*/
|
|
291
|
-
remoteTransport?: (url: string) => Transport;
|
|
292
|
-
/**
|
|
293
|
-
* Which protocol adapters this app serves — see `FougereConfig.adapters`.
|
|
294
|
-
* Carried onto the App so every door reads one answer instead of each host
|
|
295
|
-
* deciding for itself.
|
|
296
|
-
*/
|
|
297
|
-
adapters?: Record<string, boolean | undefined>;
|
|
298
|
-
/**
|
|
299
|
-
* Carries an announced fact out of this process — a broker, a queue, a log.
|
|
300
|
-
*
|
|
301
|
-
* Called for every emission, ALONGSIDE the local dispatch and never instead of it: a
|
|
302
|
-
* listener in this process is reached directly, and this is how the others hear.
|
|
303
|
-
*
|
|
304
|
-
* It exists because the local dispatch finds its listeners by having READ their code,
|
|
305
|
-
* which stops at the repository boundary. A carrier hands the fact to a NAME; the far
|
|
306
|
-
* side subscribes to that same name from its own code, and neither ever reads the other.
|
|
307
|
-
*
|
|
308
|
-
* Its failure never reaches the emitter — same rule as a subscriber's.
|
|
309
|
-
*/
|
|
310
|
-
onEmit?: (fact: string, payload: unknown) => void | Promise<void>;
|
|
311
|
-
/**
|
|
312
|
-
* Storage handle to expose to the auth provider via AuthContext.db.
|
|
313
|
-
* Required when `auth` is set.
|
|
314
|
-
*/
|
|
315
|
-
db?: unknown;
|
|
316
|
-
/** Auth declaration to wire into the app at boot. */
|
|
317
|
-
auth?: AuthConfig;
|
|
318
|
-
}
|
|
319
|
-
/** The App object returned by createApp(). */
|
|
320
|
-
export interface App {
|
|
321
|
-
/** Root container with builtins + frond scopes. */
|
|
322
|
-
container: Container;
|
|
323
|
-
/**
|
|
324
|
-
* Which protocol adapters this app declared, from `fougere.config.ts`.
|
|
325
|
-
*
|
|
326
|
-
* Read by the doors themselves, so an undeclared adapter serves nothing whatever
|
|
327
|
-
* the host mounted — the route file may exist, the middleware may be installed, and
|
|
328
|
-
* the answer is still "not here".
|
|
329
|
-
*/
|
|
330
|
-
adapters: Record<string, boolean | undefined>;
|
|
331
|
-
/** Discovered fronds metadata. */
|
|
332
|
-
fronds: FrondDescriptor[];
|
|
333
|
-
/** Resolve from root container (shortcut). */
|
|
334
|
-
resolve<T>(name: string): T;
|
|
335
|
-
/**
|
|
336
|
-
* Resolve an entity's schema — the local `entityClass` when it's hosted or
|
|
337
|
-
* scanned here, else reconstructed from the remote's identity card
|
|
338
|
-
* (rpc.discover → reconstruct()). The one way to get a live schema for an
|
|
339
|
-
* entity whose class may not be importable at all (another repo, another
|
|
340
|
-
* language) — a card travelled, but until now its `schema` was thrown away.
|
|
341
|
-
*/
|
|
342
|
-
schemaFor(entity: string): Promise<SchemaView>;
|
|
343
|
-
/**
|
|
344
|
-
* The door a name exposes to one audience, or `undefined` when it exposes
|
|
345
|
-
* none. A named surface is CLOSED: a name with no door of its own under that
|
|
346
|
-
* surface is not in it — it never falls back to the full one.
|
|
347
|
-
*
|
|
348
|
-
* **Not always a façade**, despite the name: when the owning frond is declared
|
|
349
|
-
* remote, nothing is registered locally (`bootstrap.ts`, `declaredRemotes`) and
|
|
350
|
-
* this resolves to a doublure — a façade-shaped stand-in (`remote.ts`). The
|
|
351
|
-
* caller cannot tell, which is the point; the word here was simply wrong.
|
|
352
|
-
*
|
|
353
|
-
* The one way an adapter reaches that door. It exists so the key format stays
|
|
354
|
-
* inside core (see `facadeKeyOf`), which is what lets a projection package
|
|
355
|
-
* stay structurally typed and depend on nothing.
|
|
356
|
-
*/
|
|
357
|
-
facadeFor(entity: string, surface?: string): Record<string, Function> | undefined;
|
|
358
|
-
/**
|
|
359
|
-
* The facts this app has a listener for — what a carrier must subscribe to on its behalf.
|
|
360
|
-
*
|
|
361
|
-
* Derived from the signatures it scanned (`Fact<T>` in an op's parameters), so a process
|
|
362
|
-
* states what it listens to without anyone declaring it twice. The dual of `onEmit`: one
|
|
363
|
-
* says what leaves, this says what should be brought in.
|
|
364
|
-
*/
|
|
365
|
-
listensTo(): string[];
|
|
366
|
-
/**
|
|
367
|
-
* Hand a fact that came from OUTSIDE to the listeners in this process — and stop there.
|
|
368
|
-
*
|
|
369
|
-
* The dual of `onEmit`, and deliberately not the same thing as announcing: resolving the
|
|
370
|
-
* emission value to deliver an inbound fact would carry it straight back out through
|
|
371
|
-
* `onEmit`, so a hub echoed every reading it received to the whole fleet. Receiving and
|
|
372
|
-
* announcing are two operations; only one of them leaves.
|
|
373
|
-
*
|
|
374
|
-
* The local dispatch is identical either way — same judge, same binding, same
|
|
375
|
-
* middlewares — so a fact off a wire is no less checked than one raised next door.
|
|
376
|
-
*
|
|
377
|
-
* **It waits, and it tells** — the opposite of announcing, on purpose. It resolves once
|
|
378
|
-
* every listener here is done, and REJECTS with an `AggregateError` if any refused. A
|
|
379
|
-
* carrier's whole job is to know whether the fact landed: at-least-once is retrying what
|
|
380
|
-
* failed, so a delivery that cannot report makes durability impossible to build above it.
|
|
381
|
-
* "Dispatch is not delivery" protects the EMITTER from a slow subscriber; a carrier is
|
|
382
|
-
* not the emitter, it is the party whose business this is.
|
|
383
|
-
*
|
|
384
|
-
* It still holds nothing. A refused fact is refused, and whether it comes back is the
|
|
385
|
-
* carrier's decision — Fougere puts the channel underneath rather than reimplementing it.
|
|
386
|
-
*/
|
|
387
|
-
deliver(fact: string, payload: unknown): Promise<void>;
|
|
388
|
-
/**
|
|
389
|
-
* The storage an entity is backed by, resolved through its owning frond's scope —
|
|
390
|
-
* the dual of {@link facadeFor}. `undefined` when no loaded frond hosts the entity,
|
|
391
|
-
* or when the app booted with no storage at all.
|
|
392
|
-
*
|
|
393
|
-
* `unknown` because the port belongs to whoever wired it: narrowing it to `EntityOrm`
|
|
394
|
-
* is the caller saying which implementation they are standing on.
|
|
395
|
-
*/
|
|
396
|
-
ormFor(entity: string): unknown | undefined;
|
|
397
|
-
/**
|
|
398
|
-
* The presenter of an entity, resolved through its owning frond's scope.
|
|
399
|
-
*
|
|
400
|
-
* Same shape as {@link ormFor}, and it exists so an adapter never spells the container
|
|
401
|
-
* key itself: `schema-graphql` wrote out `${Name}Presenter` by hand, and a key respelled
|
|
402
|
-
* in a second place finds nothing and reports nothing the day the convention moves.
|
|
403
|
-
*/
|
|
404
|
-
presenterFor(entity: string): unknown | undefined;
|
|
405
|
-
/** Dispose the root container. */
|
|
406
|
-
dispose(): Promise<void>;
|
|
407
|
-
/**
|
|
408
|
-
* The same disposal, spelled so the language does it: `await using app = await
|
|
409
|
-
* createApp(…)`. Twelve of the twenty-six mounts in this repo's own tests never
|
|
410
|
-
* called `dispose()` — a scope that closes itself is the only version of that
|
|
411
|
-
* rule nobody forgets.
|
|
412
|
-
*/
|
|
413
|
-
[Symbol.asyncDispose](): Promise<void>;
|
|
414
|
-
/** Register a global app middleware (runs on every operation). */
|
|
415
|
-
use(middleware: AppMiddleware): void;
|
|
416
|
-
/** Register an app middleware scoped to a specific entity. */
|
|
417
|
-
use(entity: string, middleware: AppMiddleware): void;
|
|
418
|
-
/** Auth runtime, present when fougere.config.ts declares `auth`. */
|
|
419
|
-
auth?: AuthRuntime;
|
|
420
|
-
}
|
|
421
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,iEAAiE;IACjE,IAAI,EAAE,MAAM,CAAC;IACb,0DAA0D;IAC1D,IAAI,EAAE,KAAK,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;IAC1C,yDAAyD;IACzD,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,0CAA0C;IAC1C,QAAQ,EAAE,M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;;;;;OAKG;IACH,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,kEAAkE;IAClE,GAAG,CAAC,UAAU,EAAE,aAAa,GAAG,IAAI,CAAC;IACrC,8DAA8D;IAC9D,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,GAAG,IAAI,CAAC;IACrD,oEAAoE;IACpE,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB"}
|
package/dist/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
|
File without changes
|
|
File without changes
|