@fougere/core 0.5.0-alpha.1 → 0.7.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 +1 -1
- package/dist/boot/Emissions.d.ts +14 -91
- package/dist/boot/Emissions.d.ts.map +1 -1
- package/dist/boot/Emissions.js +21 -118
- package/dist/boot/Emissions.js.map +1 -1
- package/dist/boot/ambient-port.d.ts +3 -24
- package/dist/boot/ambient-port.d.ts.map +1 -1
- package/dist/boot/ambient.als.d.ts.map +1 -1
- package/dist/boot/ambient.als.js +7 -12
- package/dist/boot/ambient.als.js.map +1 -1
- package/dist/boot/ambient.queue.d.ts +2 -5
- package/dist/boot/ambient.queue.d.ts.map +1 -1
- package/dist/boot/ambient.queue.js.map +1 -1
- package/dist/boot/apply.d.ts +1 -13
- package/dist/boot/apply.d.ts.map +1 -1
- package/dist/boot/apply.js +3 -15
- package/dist/boot/apply.js.map +1 -1
- package/dist/boot/auth.d.ts +6 -16
- package/dist/boot/auth.d.ts.map +1 -1
- package/dist/boot/boot.d.ts +5 -18
- package/dist/boot/boot.d.ts.map +1 -1
- package/dist/boot/boot.js +4 -11
- package/dist/boot/boot.js.map +1 -1
- package/dist/boot/bootstrap.d.ts.map +1 -1
- package/dist/boot/bootstrap.js +106 -163
- package/dist/boot/bootstrap.js.map +1 -1
- package/dist/boot/card.d.ts +5 -0
- package/dist/boot/card.d.ts.map +1 -0
- package/dist/boot/card.js +71 -0
- package/dist/boot/card.js.map +1 -0
- package/dist/boot/frame.d.ts +8 -32
- package/dist/boot/frame.d.ts.map +1 -1
- package/dist/boot/frame.js +23 -57
- package/dist/boot/frame.js.map +1 -1
- package/dist/boot/hosted.d.ts +3 -19
- package/dist/boot/hosted.d.ts.map +1 -1
- package/dist/boot/hosted.js +12 -17
- package/dist/boot/hosted.js.map +1 -1
- package/dist/boot/ownership.d.ts +5 -36
- package/dist/boot/ownership.d.ts.map +1 -1
- package/dist/boot/ownership.js +9 -49
- package/dist/boot/ownership.js.map +1 -1
- package/dist/boot/ports.d.ts +2 -15
- package/dist/boot/ports.d.ts.map +1 -1
- package/dist/boot/ports.js +1 -14
- package/dist/boot/ports.js.map +1 -1
- package/dist/boot/remote.d.ts +5 -38
- package/dist/boot/remote.d.ts.map +1 -1
- package/dist/boot/remote.js +8 -41
- package/dist/boot/remote.js.map +1 -1
- package/dist/boot/runner.d.ts +11 -0
- package/dist/boot/runner.d.ts.map +1 -0
- package/dist/boot/runner.js +13 -0
- package/dist/boot/runner.js.map +1 -0
- package/dist/boot/seed.d.ts +5 -32
- package/dist/boot/seed.d.ts.map +1 -1
- package/dist/boot/seed.js +10 -41
- package/dist/boot/seed.js.map +1 -1
- package/dist/boot/statement-drift.d.ts +4 -22
- package/dist/boot/statement-drift.d.ts.map +1 -1
- package/dist/boot/statement-drift.js +4 -9
- package/dist/boot/statement-drift.js.map +1 -1
- package/dist/boot/together.d.ts +8 -12
- package/dist/boot/together.d.ts.map +1 -1
- package/dist/boot/together.js +28 -65
- package/dist/boot/together.js.map +1 -1
- package/dist/boot/types.d.ts +36 -180
- package/dist/boot/types.d.ts.map +1 -1
- package/dist/builtin/config.d.ts +7 -0
- package/dist/builtin/config.d.ts.map +1 -0
- package/dist/builtin/config.js +15 -0
- package/dist/builtin/config.js.map +1 -0
- package/dist/{builtins → builtin}/logger.d.ts +4 -25
- package/dist/builtin/logger.d.ts.map +1 -0
- package/dist/{builtins → builtin}/logger.js +5 -32
- package/dist/builtin/logger.js.map +1 -0
- package/dist/config-loader.d.ts +9 -67
- package/dist/config-loader.d.ts.map +1 -1
- package/dist/config-loader.js +5 -18
- package/dist/config-loader.js.map +1 -1
- package/dist/contract.d.ts +13 -31
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js +10 -26
- package/dist/contract.js.map +1 -1
- package/dist/crypto/encoding.d.ts +2 -15
- package/dist/crypto/encoding.d.ts.map +1 -1
- package/dist/crypto/encoding.js +2 -15
- package/dist/crypto/encoding.js.map +1 -1
- package/dist/crypto/node.d.ts.map +1 -1
- package/dist/crypto/node.js +1 -7
- package/dist/crypto/node.js.map +1 -1
- package/dist/crypto/port.d.ts +2 -18
- package/dist/crypto/port.d.ts.map +1 -1
- package/dist/crypto/port.js +1 -17
- package/dist/crypto/port.js.map +1 -1
- package/dist/crypto/webcrypto.d.ts.map +1 -1
- package/dist/crypto/webcrypto.js +1 -12
- package/dist/crypto/webcrypto.js.map +1 -1
- package/dist/declare.d.ts +41 -0
- package/dist/declare.d.ts.map +1 -0
- package/dist/{scan/declare.js → declare.js} +6 -31
- package/dist/declare.js.map +1 -0
- package/dist/define.d.ts +2 -3
- package/dist/define.d.ts.map +1 -1
- package/dist/define.js +2 -3
- package/dist/define.js.map +1 -1
- package/dist/descriptor/Fronds.d.ts +19 -0
- package/dist/descriptor/Fronds.d.ts.map +1 -0
- package/dist/descriptor/Fronds.js +40 -0
- package/dist/descriptor/Fronds.js.map +1 -0
- package/dist/descriptor/frond.d.ts +135 -0
- package/dist/descriptor/frond.d.ts.map +1 -0
- package/dist/{scan → descriptor}/frond.js.map +1 -1
- package/dist/dispatch/ArgumentResolver.d.ts +6 -3
- package/dist/dispatch/ArgumentResolver.d.ts.map +1 -1
- package/dist/dispatch/ArgumentResolver.js +48 -3
- package/dist/dispatch/ArgumentResolver.js.map +1 -1
- package/dist/dispatch/DispatchEvent.d.ts +2 -2
- package/dist/dispatch/DispatchEvent.d.ts.map +1 -1
- package/dist/dispatch/DispatchLifecycle.d.ts +1 -7
- package/dist/dispatch/DispatchLifecycle.d.ts.map +1 -1
- package/dist/dispatch/DispatchLifecycle.js +1 -7
- package/dist/dispatch/DispatchLifecycle.js.map +1 -1
- package/dist/dispatch/DispatchPort.d.ts +1 -1
- package/dist/dispatch/DispatchPort.d.ts.map +1 -1
- package/dist/dispatch/Dispatcher.d.ts +1 -1
- package/dist/dispatch/Dispatcher.d.ts.map +1 -1
- package/dist/dispatch/Dispatcher.js +2 -2
- package/dist/dispatch/Dispatcher.js.map +1 -1
- package/dist/{boot → dispatch}/HandlerFacade.d.ts +25 -38
- package/dist/dispatch/HandlerFacade.d.ts.map +1 -0
- package/dist/{boot → dispatch}/HandlerFacade.js +65 -74
- package/dist/dispatch/HandlerFacade.js.map +1 -0
- package/dist/dispatch/LocalRoutePolicy.d.ts +1 -1
- package/dist/dispatch/LocalRoutePolicy.d.ts.map +1 -1
- package/dist/dispatch/LocalRoutePolicy.js +4 -4
- package/dist/dispatch/LocalRoutePolicy.js.map +1 -1
- package/dist/dispatch/OperationRoute.d.ts +2 -2
- package/dist/dispatch/OperationRoute.d.ts.map +1 -1
- package/dist/dispatch/OutputView.d.ts +3 -2
- package/dist/dispatch/OutputView.d.ts.map +1 -1
- package/dist/dispatch/OutputView.js +19 -1
- package/dist/dispatch/OutputView.js.map +1 -1
- package/dist/dispatch/Route.d.ts +2 -3
- package/dist/dispatch/Route.d.ts.map +1 -1
- package/dist/dispatch/RoutePolicy.d.ts +1 -1
- package/dist/dispatch/RoutePolicy.d.ts.map +1 -1
- package/dist/dispatch/RouteRegistry.d.ts +1 -1
- package/dist/dispatch/RouteRegistry.d.ts.map +1 -1
- package/dist/dispatch/RouteRegistry.js +2 -2
- package/dist/dispatch/RouteRegistry.js.map +1 -1
- package/dist/dispatch/RouteResolver.d.ts +2 -4
- package/dist/dispatch/RouteResolver.d.ts.map +1 -1
- package/dist/dispatch/StorageGuard.d.ts +9 -8
- package/dist/dispatch/StorageGuard.d.ts.map +1 -1
- package/dist/dispatch/StorageGuard.js +66 -23
- package/dist/dispatch/StorageGuard.js.map +1 -1
- package/dist/dispatch/presenterArguments.d.ts +7 -0
- package/dist/dispatch/presenterArguments.d.ts.map +1 -0
- package/dist/dispatch/presenterArguments.js +12 -0
- package/dist/dispatch/presenterArguments.js.map +1 -0
- package/dist/dispatch/remoteRoutes.d.ts +7 -0
- package/dist/dispatch/remoteRoutes.d.ts.map +1 -0
- package/dist/dispatch/{RemoteRouteResolver.js → remoteRoutes.js} +6 -10
- package/dist/dispatch/remoteRoutes.js.map +1 -0
- package/dist/dispatch/routeNotFound.d.ts +9 -0
- package/dist/dispatch/routeNotFound.d.ts.map +1 -0
- package/dist/dispatch/routeNotFound.js +21 -0
- package/dist/dispatch/routeNotFound.js.map +1 -0
- package/dist/dispatch/validateInput.d.ts +5 -0
- package/dist/dispatch/validateInput.d.ts.map +1 -0
- package/dist/dispatch/validateInput.js +20 -0
- package/dist/dispatch/validateInput.js.map +1 -0
- package/dist/effective-operation.d.ts +6 -3
- package/dist/effective-operation.d.ts.map +1 -1
- package/dist/effective-operation.js +49 -27
- package/dist/effective-operation.js.map +1 -1
- package/dist/emit.d.ts +4 -42
- package/dist/emit.d.ts.map +1 -1
- package/dist/emit.js +3 -39
- package/dist/emit.js.map +1 -1
- package/dist/entry/facade.d.ts +8 -0
- package/dist/entry/facade.d.ts.map +1 -0
- package/dist/entry/facade.js +28 -0
- package/dist/entry/facade.js.map +1 -0
- package/dist/entry/transport.d.ts +5 -0
- package/dist/entry/transport.d.ts.map +1 -0
- package/dist/entry/transport.js +11 -0
- package/dist/entry/transport.js.map +1 -0
- package/dist/frond-config.d.ts +8 -71
- package/dist/frond-config.d.ts.map +1 -1
- package/dist/frond-config.js +1 -9
- 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/identity-keys.d.ts +2 -5
- package/dist/identity-keys.d.ts.map +1 -1
- package/dist/identity-keys.js +3 -16
- package/dist/identity-keys.js.map +1 -1
- package/dist/identity.d.ts +4 -30
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +11 -73
- package/dist/identity.js.map +1 -1
- package/dist/imports.d.ts +2 -8
- package/dist/imports.d.ts.map +1 -1
- package/dist/imports.js +1 -7
- package/dist/imports.js.map +1 -1
- package/dist/index.d.ts +28 -30
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -22
- package/dist/index.js.map +1 -1
- package/dist/loader.d.ts +1 -8
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +1 -8
- package/dist/loader.js.map +1 -1
- package/dist/node.d.ts +2 -11
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +2 -11
- package/dist/node.js.map +1 -1
- package/dist/prefab/collector.d.ts +1 -22
- package/dist/prefab/collector.d.ts.map +1 -1
- package/dist/prefab/collector.js +1 -22
- package/dist/prefab/collector.js.map +1 -1
- package/dist/prefab/crud.d.ts +19 -35
- package/dist/prefab/crud.d.ts.map +1 -1
- package/dist/prefab/crud.js +39 -66
- package/dist/prefab/crud.js.map +1 -1
- package/dist/prefab/mirror.d.ts +5 -27
- package/dist/prefab/mirror.d.ts.map +1 -1
- package/dist/prefab/mirror.js +6 -24
- package/dist/prefab/mirror.js.map +1 -1
- package/dist/prefab/prefab.d.ts +1 -7
- package/dist/prefab/prefab.d.ts.map +1 -1
- package/dist/prefab/prefab.js +1 -7
- package/dist/prefab/prefab.js.map +1 -1
- package/dist/prefab/presenter.d.ts +2 -36
- package/dist/prefab/presenter.d.ts.map +1 -1
- package/dist/prefab/presenter.js +2 -36
- package/dist/prefab/presenter.js.map +1 -1
- package/dist/prefab/repository.d.ts +12 -80
- package/dist/prefab/repository.d.ts.map +1 -1
- package/dist/prefab/repository.js +22 -35
- package/dist/prefab/repository.js.map +1 -1
- package/dist/scan/adapters.d.ts +3 -0
- package/dist/scan/adapters.d.ts.map +1 -0
- package/dist/scan/adapters.js +25 -0
- package/dist/scan/adapters.js.map +1 -0
- package/dist/scan/bundling.d.ts +1 -12
- package/dist/scan/bundling.d.ts.map +1 -1
- package/dist/scan/bundling.js +1 -12
- package/dist/scan/bundling.js.map +1 -1
- package/dist/scan/conventions.d.ts +6 -40
- package/dist/scan/conventions.d.ts.map +1 -1
- package/dist/scan/conventions.js +5 -34
- package/dist/scan/conventions.js.map +1 -1
- package/dist/scan/emit.d.ts +2 -6
- package/dist/scan/emit.d.ts.map +1 -1
- package/dist/scan/emit.js +5 -39
- package/dist/scan/emit.js.map +1 -1
- package/dist/scan/handler-parser.d.ts +9 -76
- package/dist/scan/handler-parser.d.ts.map +1 -1
- package/dist/scan/handler-parser.js +28 -85
- package/dist/scan/handler-parser.js.map +1 -1
- package/dist/scan/result.d.ts +28 -0
- package/dist/scan/result.d.ts.map +1 -0
- package/dist/scan/result.js +2 -0
- package/dist/scan/result.js.map +1 -0
- package/dist/scan/scanner.d.ts +3 -28
- package/dist/scan/scanner.d.ts.map +1 -1
- package/dist/scan/scanner.js +36 -135
- package/dist/scan/scanner.js.map +1 -1
- package/dist/scan/statement.d.ts +1 -1
- package/dist/scan/statement.d.ts.map +1 -1
- package/dist/scan/statement.js +4 -30
- package/dist/scan/statement.js.map +1 -1
- package/dist/source.d.ts +41 -0
- package/dist/source.d.ts.map +1 -0
- package/dist/source.js +10 -0
- package/dist/source.js.map +1 -0
- package/dist/storage.d.ts +92 -0
- package/dist/storage.d.ts.map +1 -0
- package/dist/storage.js +50 -0
- package/dist/storage.js.map +1 -0
- package/dist/store.d.ts +18 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +146 -0
- package/dist/store.js.map +1 -0
- package/dist/verify.d.ts +6 -39
- package/dist/verify.d.ts.map +1 -1
- package/dist/verify.js +19 -39
- package/dist/verify.js.map +1 -1
- package/dist/wire/CallLog.d.ts +32 -0
- package/dist/wire/CallLog.d.ts.map +1 -0
- package/dist/{contract → wire}/CallLog.js.map +1 -1
- package/dist/wire/Invocation.d.ts +32 -0
- package/dist/wire/Invocation.d.ts.map +1 -0
- package/dist/wire/Invocation.js +66 -0
- package/dist/wire/Invocation.js.map +1 -0
- package/dist/wire/RouteAddress.d.ts +24 -0
- package/dist/wire/RouteAddress.d.ts.map +1 -0
- package/dist/{contract → wire}/RouteAddress.js +7 -0
- package/dist/wire/RouteAddress.js.map +1 -0
- package/dist/wire/binding.d.ts +36 -0
- package/dist/wire/binding.d.ts.map +1 -0
- package/dist/{boot → wire}/binding.js +5 -62
- package/dist/wire/binding.js.map +1 -0
- package/dist/wire/call.d.ts +25 -172
- package/dist/wire/call.d.ts.map +1 -1
- package/dist/wire/call.js +15 -166
- package/dist/wire/call.js.map +1 -1
- package/dist/wire/drift.d.ts +3 -28
- package/dist/wire/drift.d.ts.map +1 -1
- package/dist/wire/drift.js +4 -23
- package/dist/wire/drift.js.map +1 -1
- package/dist/wire/errors.d.ts +4 -24
- package/dist/wire/errors.d.ts.map +1 -1
- package/dist/wire/errors.js +4 -24
- package/dist/wire/errors.js.map +1 -1
- package/dist/wire/http-error.d.ts +2 -13
- package/dist/wire/http-error.d.ts.map +1 -1
- package/dist/wire/http-error.js +5 -19
- package/dist/wire/http-error.js.map +1 -1
- package/dist/wire/loggerMiddleware.d.ts +2 -8
- package/dist/wire/loggerMiddleware.d.ts.map +1 -1
- package/dist/wire/loggerMiddleware.js +1 -7
- package/dist/wire/loggerMiddleware.js.map +1 -1
- package/dist/wire/middleware.d.ts +3 -7
- package/dist/wire/middleware.d.ts.map +1 -1
- package/dist/wire/middleware.js +1 -5
- package/dist/wire/middleware.js.map +1 -1
- package/dist/wire/operation.d.ts +12 -74
- package/dist/wire/operation.d.ts.map +1 -1
- package/dist/wire/operation.js +4 -66
- package/dist/wire/operation.js.map +1 -1
- package/dist/wire/signature.d.ts +37 -0
- package/dist/wire/signature.d.ts.map +1 -0
- package/dist/wire/signature.js +2 -0
- package/dist/wire/signature.js.map +1 -0
- package/package.json +3 -3
- package/src/boot/Emissions.ts +22 -119
- package/src/boot/ambient-port.ts +3 -24
- package/src/boot/ambient.als.ts +7 -12
- package/src/boot/ambient.queue.ts +2 -5
- package/src/boot/apply.ts +3 -15
- package/src/boot/auth.ts +6 -16
- package/src/boot/boot.ts +8 -23
- package/src/boot/bootstrap.ts +117 -173
- package/src/boot/card.ts +84 -0
- package/src/boot/frame.ts +31 -65
- package/src/boot/hosted.ts +15 -40
- package/src/boot/ownership.ts +14 -49
- package/src/boot/ports.ts +2 -15
- package/src/boot/remote.ts +11 -58
- package/src/boot/runner.ts +17 -0
- package/src/boot/seed.ts +11 -42
- package/src/boot/statement-drift.ts +10 -28
- package/src/boot/together.ts +38 -72
- package/src/boot/types.ts +36 -180
- package/src/{builtins → builtin}/config.ts +1 -7
- package/src/{builtins → builtin}/logger.ts +6 -39
- package/src/config-loader.ts +12 -71
- package/src/contract.ts +15 -39
- package/src/crypto/encoding.ts +2 -15
- package/src/crypto/node.ts +1 -7
- package/src/crypto/port.ts +2 -18
- package/src/crypto/webcrypto.ts +1 -12
- package/src/{scan/declare.ts → declare.ts} +11 -42
- package/src/define.ts +2 -3
- package/src/descriptor/Fronds.ts +47 -0
- package/src/descriptor/frond.ts +145 -0
- package/src/dispatch/ArgumentResolver.ts +54 -8
- package/src/dispatch/DispatchEvent.ts +2 -2
- package/src/dispatch/DispatchLifecycle.ts +1 -7
- package/src/dispatch/DispatchPort.ts +1 -1
- package/src/dispatch/Dispatcher.ts +3 -3
- package/src/dispatch/HandlerFacade.ts +231 -0
- package/src/dispatch/LocalRoutePolicy.ts +4 -4
- package/src/dispatch/OperationRoute.ts +2 -2
- package/src/dispatch/OutputView.ts +24 -2
- package/src/dispatch/Route.ts +2 -4
- package/src/dispatch/RoutePolicy.ts +1 -1
- package/src/dispatch/RouteRegistry.ts +2 -2
- package/src/dispatch/RouteResolver.ts +2 -4
- package/src/dispatch/StorageGuard.ts +75 -23
- package/src/dispatch/presenterArguments.ts +25 -0
- package/src/dispatch/{RemoteRouteResolver.ts → remoteRoutes.ts} +7 -9
- package/src/dispatch/routeNotFound.ts +33 -0
- package/src/dispatch/validateInput.ts +28 -0
- package/src/effective-operation.ts +60 -37
- package/src/emit.ts +5 -63
- package/src/entry/facade.ts +44 -0
- package/src/entry/transport.ts +16 -0
- package/src/frond-config.ts +8 -71
- package/src/graph.ts +1 -1
- package/src/identity-keys.ts +3 -16
- package/src/identity.ts +12 -80
- package/src/imports.ts +3 -32
- package/src/index.ts +28 -33
- package/src/loader.ts +2 -16
- package/src/node.ts +2 -11
- package/src/prefab/collector.ts +1 -22
- package/src/prefab/crud.ts +51 -90
- package/src/prefab/mirror.ts +9 -49
- package/src/prefab/prefab.ts +2 -21
- package/src/prefab/presenter.ts +2 -36
- package/src/prefab/repository.ts +32 -108
- package/src/scan/adapters.ts +32 -0
- package/src/scan/bundling.ts +1 -12
- package/src/scan/conventions.ts +6 -40
- package/src/scan/emit.ts +7 -43
- package/src/scan/handler-parser.ts +41 -163
- package/src/scan/result.ts +29 -0
- package/src/scan/scanner.ts +40 -138
- package/src/scan/statement.ts +6 -31
- package/src/source.ts +44 -0
- package/src/storage.ts +141 -0
- package/src/store.ts +152 -0
- package/src/verify.ts +19 -60
- package/src/wire/CallLog.ts +30 -0
- package/src/{contract → wire}/Invocation.ts +24 -17
- package/src/{contract → wire}/RouteAddress.ts +10 -0
- package/src/wire/binding.ts +102 -0
- package/src/wire/call.ts +30 -261
- package/src/wire/drift.ts +5 -30
- package/src/wire/errors.ts +4 -24
- package/src/wire/http-error.ts +5 -19
- package/src/wire/loggerMiddleware.ts +2 -8
- package/src/wire/middleware.ts +3 -7
- package/src/wire/operation.ts +13 -110
- package/src/wire/signature.ts +38 -0
- package/dist/boot/HandlerFacade.d.ts.map +0 -1
- package/dist/boot/HandlerFacade.js.map +0 -1
- package/dist/boot/binding.d.ts +0 -60
- package/dist/boot/binding.d.ts.map +0 -1
- package/dist/boot/binding.js.map +0 -1
- package/dist/builtins/config.d.ts +0 -13
- package/dist/builtins/config.d.ts.map +0 -1
- package/dist/builtins/config.js +0 -21
- package/dist/builtins/config.js.map +0 -1
- package/dist/builtins/logger.d.ts.map +0 -1
- package/dist/builtins/logger.js.map +0 -1
- package/dist/contract/Call.d.ts +0 -10
- package/dist/contract/Call.d.ts.map +0 -1
- package/dist/contract/Call.js +0 -15
- package/dist/contract/Call.js.map +0 -1
- package/dist/contract/CallLog.d.ts +0 -57
- package/dist/contract/CallLog.d.ts.map +0 -1
- package/dist/contract/Invocation.d.ts +0 -27
- package/dist/contract/Invocation.d.ts.map +0 -1
- package/dist/contract/Invocation.js +0 -59
- package/dist/contract/Invocation.js.map +0 -1
- package/dist/contract/RouteAddress.d.ts +0 -17
- package/dist/contract/RouteAddress.d.ts.map +0 -1
- package/dist/contract/RouteAddress.js.map +0 -1
- package/dist/dispatch/InputValidator.d.ts +0 -7
- package/dist/dispatch/InputValidator.d.ts.map +0 -1
- package/dist/dispatch/InputValidator.js +0 -22
- package/dist/dispatch/InputValidator.js.map +0 -1
- package/dist/dispatch/OperationExecutor.d.ts +0 -25
- package/dist/dispatch/OperationExecutor.d.ts.map +0 -1
- package/dist/dispatch/OperationExecutor.js +0 -32
- package/dist/dispatch/OperationExecutor.js.map +0 -1
- package/dist/dispatch/OutputProjector.d.ts +0 -12
- package/dist/dispatch/OutputProjector.d.ts.map +0 -1
- package/dist/dispatch/OutputProjector.js +0 -30
- package/dist/dispatch/OutputProjector.js.map +0 -1
- package/dist/dispatch/PresenterArgumentResolver.d.ts +0 -12
- package/dist/dispatch/PresenterArgumentResolver.d.ts.map +0 -1
- package/dist/dispatch/PresenterArgumentResolver.js +0 -20
- package/dist/dispatch/PresenterArgumentResolver.js.map +0 -1
- package/dist/dispatch/RemoteRouteResolver.d.ts +0 -13
- package/dist/dispatch/RemoteRouteResolver.d.ts.map +0 -1
- package/dist/dispatch/RemoteRouteResolver.js.map +0 -1
- package/dist/dispatch/RouteNotFoundError.d.ts +0 -10
- package/dist/dispatch/RouteNotFoundError.d.ts.map +0 -1
- package/dist/dispatch/RouteNotFoundError.js +0 -24
- package/dist/dispatch/RouteNotFoundError.js.map +0 -1
- package/dist/entry/DynamicFacade.d.ts +0 -10
- package/dist/entry/DynamicFacade.d.ts.map +0 -1
- package/dist/entry/DynamicFacade.js +0 -27
- package/dist/entry/DynamicFacade.js.map +0 -1
- package/dist/entry/FacadeEntry.d.ts +0 -11
- package/dist/entry/FacadeEntry.d.ts.map +0 -1
- package/dist/entry/FacadeEntry.js +0 -26
- package/dist/entry/FacadeEntry.js.map +0 -1
- package/dist/entry/TransportEntry.d.ts +0 -13
- package/dist/entry/TransportEntry.d.ts.map +0 -1
- package/dist/entry/TransportEntry.js +0 -24
- package/dist/entry/TransportEntry.js.map +0 -1
- package/dist/orm.d.ts +0 -207
- package/dist/orm.d.ts.map +0 -1
- package/dist/orm.js +0 -66
- package/dist/orm.js.map +0 -1
- package/dist/scan/Fronds.d.ts +0 -45
- package/dist/scan/Fronds.d.ts.map +0 -1
- package/dist/scan/Fronds.js +0 -66
- package/dist/scan/Fronds.js.map +0 -1
- package/dist/scan/declare.d.ts +0 -71
- package/dist/scan/declare.d.ts.map +0 -1
- package/dist/scan/declare.js.map +0 -1
- package/dist/scan/frond.d.ts +0 -224
- package/dist/scan/frond.d.ts.map +0 -1
- package/src/boot/HandlerFacade.ts +0 -242
- package/src/boot/binding.ts +0 -182
- package/src/contract/Call.ts +0 -18
- package/src/contract/CallLog.ts +0 -55
- package/src/dispatch/InputValidator.ts +0 -28
- package/src/dispatch/OperationExecutor.ts +0 -60
- package/src/dispatch/OutputProjector.ts +0 -32
- package/src/dispatch/PresenterArgumentResolver.ts +0 -25
- package/src/dispatch/RouteNotFoundError.ts +0 -29
- package/src/entry/DynamicFacade.ts +0 -28
- package/src/entry/FacadeEntry.ts +0 -32
- package/src/entry/TransportEntry.ts +0 -30
- package/src/orm.ts +0 -252
- package/src/scan/Fronds.ts +0 -73
- package/src/scan/frond.ts +0 -235
- /package/dist/{scan → descriptor}/frond.js +0 -0
- /package/dist/{contract → wire}/CallLog.js +0 -0
package/dist/orm.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { upperFirst } from '@fougere/schema';
|
|
2
|
-
/**
|
|
3
|
-
* The keys `list()` answers to. Anything else is a mistake, and saying so is the point:
|
|
4
|
-
* the façade refuses an unknown key in a CLIENT's input (`Unknown field`) — this applies the
|
|
5
|
-
* same rule to the framework's own arguments. `list({ orderId })` used to be accepted and
|
|
6
|
-
* the filter dropped, so a one-to-many relation quietly returned the whole table.
|
|
7
|
-
*/
|
|
8
|
-
const LIST_OPTION_KEYS = [
|
|
9
|
-
'limit', 'offset', 'page', 'after', 'orderBy', 'order', 'count', 'where', 'select',
|
|
10
|
-
];
|
|
11
|
-
/** Refuse an option the port does not answer to, naming it and what was expected. */
|
|
12
|
-
export function assertListOptions(options, entity) {
|
|
13
|
-
if (!options)
|
|
14
|
-
return;
|
|
15
|
-
const legal = new Set(LIST_OPTION_KEYS);
|
|
16
|
-
const strangers = Object.keys(options).filter((key) => !legal.has(key));
|
|
17
|
-
if (strangers.length === 0)
|
|
18
|
-
return;
|
|
19
|
-
throw new Error(`${entity}.list(): unknown option ${strangers.map((s) => `\`${s}\``).join(', ')}. ` +
|
|
20
|
-
`Known options are ${LIST_OPTION_KEYS.join(', ')} — to filter, pass \`where: { ${strangers[0]}: … }\`.`);
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Container key of an entity's storage — 'reading' → 'ReadingOrm'.
|
|
24
|
-
*
|
|
25
|
-
* The twin of {@link repositoryKeyOf} and of `facadeKeyOf`: the key of a thing
|
|
26
|
-
* lives with the thing. This one was spelled by hand in four places in
|
|
27
|
-
* `bootstrap.ts` and a fifth in `scanner.ts` — where the SCAN derives what a
|
|
28
|
-
* constructor asks for. Two readers of one convention, neither of them naming it,
|
|
29
|
-
* so a rename would have moved one and left the other resolving to nothing.
|
|
30
|
-
*/
|
|
31
|
-
export function ormKeyOf(entity) {
|
|
32
|
-
return `${upperFirst(entity)}Orm`;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* The container key of a frame — `[['Account', 'Ledger'], ['RateMirror']]` →
|
|
36
|
-
* 'Account+Ledger|RateMirrorTogether'.
|
|
37
|
-
*
|
|
38
|
-
* The DECLARED order, not a sorted one. The tuples are what the callback destructures, so
|
|
39
|
-
* reordering here would hand `[ledger, accounts]` to a signature that says the opposite —
|
|
40
|
-
* the type and the runtime disagreeing about the same line. Two orders of one frame are
|
|
41
|
-
* therefore two keys and two registrations; they cost nothing, a frame holding no state
|
|
42
|
-
* between runs.
|
|
43
|
-
*/
|
|
44
|
-
export function togetherKeyOf(entities, providers = []) {
|
|
45
|
-
const named = entities.map(upperFirst).join(SEPARATOR);
|
|
46
|
-
return `${named}${providers.length ? KINDS + providers.map(upperFirst).join(SEPARATOR) : ''}${FRAME}`;
|
|
47
|
-
}
|
|
48
|
-
const FRAME = 'Together';
|
|
49
|
-
const SEPARATOR = '+';
|
|
50
|
-
/** Separates the two lists — what the unwind covers, and what is rebuilt to make it true. */
|
|
51
|
-
const KINDS = '|';
|
|
52
|
-
/**
|
|
53
|
-
* The members behind a frame key, or `undefined` when the key is not one.
|
|
54
|
-
*
|
|
55
|
-
* The dual of the line above, and here for the reason `factOfEmitKey` is: the boot reads
|
|
56
|
-
* the key back out of a handler's `deps` to know which frames to build. A key and the way
|
|
57
|
-
* to undo it belong together — the pair that is split is the pair that drifts.
|
|
58
|
-
*/
|
|
59
|
-
export function membersOfTogetherKey(key) {
|
|
60
|
-
if (key.length <= FRAME.length || !key.endsWith(FRAME))
|
|
61
|
-
return undefined;
|
|
62
|
-
const [entities, providers = ''] = key.slice(0, -FRAME.length).split(KINDS);
|
|
63
|
-
const split = (list) => list.split(SEPARATOR).filter(Boolean);
|
|
64
|
-
return { entities: split(entities), providers: split(providers) };
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=orm.js.map
|
package/dist/orm.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"orm.js","sourceRoot":"","sources":["../src/orm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,iBAAiB,CAAC;AA2C9D;;;;;GAKG;AACH,MAAM,gBAAgB,GAAG;IACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ;CAC1E,CAAC;AAEX,qFAAqF;AACrF,MAAM,UAAU,iBAAiB,CAAC,OAA2B,EA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AAElB;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,GAAW;IAC9C,IAAI,GAAG,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IACzE,MAAM,CAAC,QAAQ,EAAE,SAAS,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC5E,MAAM,KAAK,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACtE,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAS,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC;AACrE,CAAC"}
|
package/dist/scan/Fronds.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { SchemaView } from '@fougere/schema';
|
|
2
|
-
import type { EntityEntry, FrondDescriptor } from './frond.js';
|
|
3
|
-
/**
|
|
4
|
-
* What this app hosts — the scan's answer, with the questions everyone was asking it
|
|
5
|
-
* by hand.
|
|
6
|
-
*
|
|
7
|
-
* The list was a bare array, so every reader re-walked it: "which frond owns this
|
|
8
|
-
* entity" was spelled four times, "every entity by name" three times as three literal
|
|
9
|
-
* copies of the same `Map`, and the two inside the boot even carried comments saying so.
|
|
10
|
-
* A concept nobody can question is a concept everyone rebuilds.
|
|
11
|
-
*
|
|
12
|
-
* It IS an array — the same reason `ListResult` is one: twenty call sites iterate,
|
|
13
|
-
* filter and spread it, and none of them is wrong to. `Symbol.species` is `Array` so a
|
|
14
|
-
* `.map()` over it answers a plain array rather than something that claims to be a
|
|
15
|
-
* hosting table and holds strings.
|
|
16
|
-
*/
|
|
17
|
-
export declare class Fronds extends Array<FrondDescriptor> {
|
|
18
|
-
static get [Symbol.species](): ArrayConstructor;
|
|
19
|
-
/** What one scan run found. The only gate in — `Array.of` is taken, and named. */
|
|
20
|
-
static scanned(fronds: readonly FrondDescriptor[]): Fronds;
|
|
21
|
-
/** The frond that hosts an entity — `undefined` when no loaded frond does. */
|
|
22
|
-
owner(entity: string): FrondDescriptor | undefined;
|
|
23
|
-
/** The entity of that name, wherever it was scanned. */
|
|
24
|
-
entity(name: string): EntityEntry | undefined;
|
|
25
|
-
/**
|
|
26
|
-
* Every scanned entity class, by name — across all fronds and never per-frond.
|
|
27
|
-
*
|
|
28
|
-
* A fact is announced in one frond and heard in another, so the subscriber's own
|
|
29
|
-
* frond does not hold the shape it must judge; a `reads:` clause names entities
|
|
30
|
-
* that belong to neighbours by definition.
|
|
31
|
-
*/
|
|
32
|
-
schemas(): Map<string, SchemaView>;
|
|
33
|
-
/** Every scanned entity, sorted. What was FOUND, not what answers. */
|
|
34
|
-
entityNames(): string[];
|
|
35
|
-
/**
|
|
36
|
-
* The names a call may address, sorted — what a NOT_FOUND must print.
|
|
37
|
-
*
|
|
38
|
-
* Not `entityNames()`, which is what the scan found: an entity with no handler is
|
|
39
|
-
* scanned and serves nothing, so the refusal read *"Entity 'indexed' is not hosted
|
|
40
|
-
* here. Hosted here: indexed."* — naming the very thing it had just refused. A façade
|
|
41
|
-
* is keyed on a HANDLER's address, and that is what this lists.
|
|
42
|
-
*/
|
|
43
|
-
servedNames(surface?: string): string[];
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=Fronds.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Fronds.d.ts","sourceRoot":"","sources":["../../src/scan/Fronds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE/D;;;;;;;;;;;;;GAaG;AACH,qBAAa,MAAO,SAAQ,KAAK,CAAC,eAAe,CAAC;IAChD,WAAoB,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAEvD;IAED,kFAAkF;IAClF,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,eAAe,EAAE,GAAG,MAAM;IAM1D,8EAA8E;IAC9E,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;IAIlD,wDAAwD;IACxD,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAQ7C;;;;;;OAMG;IACH,OAAO,IAAI,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC;IAIlC,sEAAsE;IACtE,WAAW,IAAI,MAAM,EAAE;IAIvB;;;;;;;OAOG;IACH,WAAW,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE;CAKxC"}
|
package/dist/scan/Fronds.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* What this app hosts — the scan's answer, with the questions everyone was asking it
|
|
3
|
-
* by hand.
|
|
4
|
-
*
|
|
5
|
-
* The list was a bare array, so every reader re-walked it: "which frond owns this
|
|
6
|
-
* entity" was spelled four times, "every entity by name" three times as three literal
|
|
7
|
-
* copies of the same `Map`, and the two inside the boot even carried comments saying so.
|
|
8
|
-
* A concept nobody can question is a concept everyone rebuilds.
|
|
9
|
-
*
|
|
10
|
-
* It IS an array — the same reason `ListResult` is one: twenty call sites iterate,
|
|
11
|
-
* filter and spread it, and none of them is wrong to. `Symbol.species` is `Array` so a
|
|
12
|
-
* `.map()` over it answers a plain array rather than something that claims to be a
|
|
13
|
-
* hosting table and holds strings.
|
|
14
|
-
*/
|
|
15
|
-
export class Fronds extends Array {
|
|
16
|
-
static get [Symbol.species]() {
|
|
17
|
-
return Array;
|
|
18
|
-
}
|
|
19
|
-
/** What one scan run found. The only gate in — `Array.of` is taken, and named. */
|
|
20
|
-
static scanned(fronds) {
|
|
21
|
-
const held = new Fronds();
|
|
22
|
-
held.push(...fronds);
|
|
23
|
-
return held;
|
|
24
|
-
}
|
|
25
|
-
/** The frond that hosts an entity — `undefined` when no loaded frond does. */
|
|
26
|
-
owner(entity) {
|
|
27
|
-
return this.find((frond) => frond.entities.some((e) => e.name === entity));
|
|
28
|
-
}
|
|
29
|
-
/** The entity of that name, wherever it was scanned. */
|
|
30
|
-
entity(name) {
|
|
31
|
-
for (const frond of this) {
|
|
32
|
-
const found = frond.entities.find((e) => e.name === name);
|
|
33
|
-
if (found)
|
|
34
|
-
return found;
|
|
35
|
-
}
|
|
36
|
-
return undefined;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Every scanned entity class, by name — across all fronds and never per-frond.
|
|
40
|
-
*
|
|
41
|
-
* A fact is announced in one frond and heard in another, so the subscriber's own
|
|
42
|
-
* frond does not hold the shape it must judge; a `reads:` clause names entities
|
|
43
|
-
* that belong to neighbours by definition.
|
|
44
|
-
*/
|
|
45
|
-
schemas() {
|
|
46
|
-
return new Map(this.flatMap((frond) => frond.entities.map((e) => [e.name, e.entityClass])));
|
|
47
|
-
}
|
|
48
|
-
/** Every scanned entity, sorted. What was FOUND, not what answers. */
|
|
49
|
-
entityNames() {
|
|
50
|
-
return this.flatMap((frond) => frond.entities.map((e) => e.name)).sort();
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* The names a call may address, sorted — what a NOT_FOUND must print.
|
|
54
|
-
*
|
|
55
|
-
* Not `entityNames()`, which is what the scan found: an entity with no handler is
|
|
56
|
-
* scanned and serves nothing, so the refusal read *"Entity 'indexed' is not hosted
|
|
57
|
-
* here. Hosted here: indexed."* — naming the very thing it had just refused. A façade
|
|
58
|
-
* is keyed on a HANDLER's address, and that is what this lists.
|
|
59
|
-
*/
|
|
60
|
-
servedNames(surface) {
|
|
61
|
-
return this.flatMap((frond) => frond.handlers
|
|
62
|
-
.filter((handler) => (handler.surface ?? undefined) === surface)
|
|
63
|
-
.map((handler) => handler.address)).sort();
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=Fronds.js.map
|
package/dist/scan/Fronds.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Fronds.js","sourceRoot":"","sources":["../../src/scan/Fronds.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,MAAO,SAAQ,KAAsB;IAChD,MAAM,KAAc,CAAC,MAAM,CAAC,OAAO,CAAC;QAClC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,kFAAkF;IAClF,MAAM,CAAC,OAAO,CAAC,MAAkC;QAC/C,MAAM,IAAI,GAAG,IAAI,MAAM,EAAE,CAAC;QAC1B,IAAI,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,8EAA8E;IAC9E,KAAK,CAAC,MAAc;QAClB,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC;IAC7E,CAAC;IAED,wDAAwD;IACxD,MAAM,CAAC,IAAY;QACjB,KAAK,MAAM,KAAK,IAAI,IAAI,EAAE,CAAC;YACzB,MAAM,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;YAC1D,IAAI,KAAK;gBAAE,OAAO,KAAK,CAAC;QAC1B,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;;;;;OAMG;IACH,OAAO;QACL,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,WAAW,CAAU,CAAC,CAAC,CAAC,CAAC;IACvG,CAAC;IAED,sEAAsE;IACtE,WAAW;QACT,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3E,CAAC;IAED;;;;;;;OAOG;IACH,WAAW,CAAC,OAAgB;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ;aAC1C,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,IAAI,SAAS,CAAC,KAAK,OAAO,CAAC;aAC/D,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/C,CAAC;CACF"}
|
package/dist/scan/declare.d.ts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A frond stated by its author, for an app that will not scan.
|
|
3
|
-
*
|
|
4
|
-
* The scan reads the type checker because a signature IS a declaration — and that reading
|
|
5
|
-
* has to happen while the types still exist, which is build time. An app that wants
|
|
6
|
-
* neither a build step nor `typescript` at runtime says the same thing here instead, and
|
|
7
|
-
* `createApp` cannot tell the difference: it consumes a `ScanResult`, never a scanner.
|
|
8
|
-
*
|
|
9
|
-
* What it does NOT ask for is the point. Every name the scan derives from a class is
|
|
10
|
-
* derived here the same way — `PostHandler` answers at `post`, `Post` is stored as `post`
|
|
11
|
-
* — so a declaration states classes and nothing else. `filePath` is empty because there is
|
|
12
|
-
* no file to point at, and a diagnostic that would have quoted one says so plainly.
|
|
13
|
-
*
|
|
14
|
-
* Measured on `demos/nuxt-blog`: 23 of its 29 operations need no word here at all, because
|
|
15
|
-
* `Crud.__ops` declares them at runtime. Only the six the author wrote by hand cost
|
|
16
|
-
* anything, and they cost `frond.config.ts` — where what is not derivable is stated.
|
|
17
|
-
*/
|
|
18
|
-
import { type SchemaView } from '@fougere/schema';
|
|
19
|
-
import type { FrondDescriptor, SeedEntry } from './frond.js';
|
|
20
|
-
/** A class, as a declaration hands it over: the constructor itself. */
|
|
21
|
-
type Ctor = new (...args: never[]) => unknown;
|
|
22
|
-
/**
|
|
23
|
-
* What a subject needs beyond its class, when its constructor names a frame or a port.
|
|
24
|
-
*
|
|
25
|
-
* `deps` is the one thing no runtime can recover: TypeScript erases the parameter types,
|
|
26
|
-
* and `registerFrames` reads them to know which frames to build — asking for one IS
|
|
27
|
-
* declaring it. A handler that takes only its own entity's ORM needs nothing here.
|
|
28
|
-
*/
|
|
29
|
-
export interface DeclaredSubject {
|
|
30
|
-
ctor: Ctor;
|
|
31
|
-
deps?: string[];
|
|
32
|
-
}
|
|
33
|
-
/** A handler, and the surface it answers on when it is not the default one. */
|
|
34
|
-
export interface DeclaredHandler extends DeclaredSubject {
|
|
35
|
-
/**
|
|
36
|
-
* The scan reads this from the directory (`handlers/public/`), so a statement has to
|
|
37
|
-
* say it: two handlers over one entity collide on their address otherwise, and the
|
|
38
|
-
* refusal names the same route twice.
|
|
39
|
-
*/
|
|
40
|
-
surface?: string;
|
|
41
|
-
}
|
|
42
|
-
/** A class on its own, or a class with what it asks for. */
|
|
43
|
-
export type Declared = Ctor | DeclaredSubject;
|
|
44
|
-
/** What a declaration states about one frond. Everything else is derived from the classes. */
|
|
45
|
-
export interface FrondDeclaration {
|
|
46
|
-
entities?: SchemaView[];
|
|
47
|
-
handlers?: (Ctor | DeclaredHandler)[];
|
|
48
|
-
presenters?: (Ctor | DeclaredSubject)[];
|
|
49
|
-
collectors?: (Ctor | DeclaredSubject)[];
|
|
50
|
-
providers?: Declared[];
|
|
51
|
-
seeds?: {
|
|
52
|
-
entityName: string;
|
|
53
|
-
data: SeedEntry['data'];
|
|
54
|
-
}[];
|
|
55
|
-
/** Per-surface entity lists — the same key `frond.config.ts` states. */
|
|
56
|
-
surfaces?: Record<string, string[]>;
|
|
57
|
-
/** The import scope this frond answers under. Defaults to the conventional one. */
|
|
58
|
-
scope?: string;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* State a frond without reading a disk.
|
|
62
|
-
*
|
|
63
|
-
* ```ts
|
|
64
|
-
* createApp({
|
|
65
|
-
* scan: { fronds: Fronds.scanned([frond('blog', { entities: [Post], handlers: [PostHandler] })]), diagnostics: [] },
|
|
66
|
-
* })
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
|
-
export declare function frond(name: string, declared?: FrondDeclaration): FrondDescriptor;
|
|
70
|
-
export {};
|
|
71
|
-
//# sourceMappingURL=declare.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"declare.d.ts","sourceRoot":"","sources":["../../src/scan/declare.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAc,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,KAAK,EACmB,eAAe,EACb,SAAS,EACzC,MAAM,YAAY,CAAC;AAIpB,uEAAuE;AACvE,KAAK,IAAI,GAAG,KAAK,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,OAAO,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,+EAA+E;AAC/E,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,4DAA4D;AAC5D,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,eAAe,CAAC;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AAC,CAAC,CAAC,EAAE,CAAC;KAC9D,CAAC;AACJ,CAAC"}
|
package/dist/scan/frond.d.ts
DELETED
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A frond as the SCAN found it — one interface per convention directory, plus what the
|
|
3
|
-
* run could not read.
|
|
4
|
-
*
|
|
5
|
-
* The declared side is `frond-config.ts`; this is the described one. They meet at
|
|
6
|
-
* `FrondDescriptor.operationsOverrides`, where a declaration reaches the façade.
|
|
7
|
-
*/
|
|
8
|
-
import type { SchemaView } from '@fougere/schema';
|
|
9
|
-
import type { ParsedParam, OperationContract, OperationsMap } from '../wire/operation.js';
|
|
10
|
-
import type { PresenterViews } from '../prefab/presenter.js';
|
|
11
|
-
import type { Fronds } from './Fronds.js';
|
|
12
|
-
/**
|
|
13
|
-
* A discovered provider — a class under `services/` or `repositories/`, injected by type.
|
|
14
|
-
*
|
|
15
|
-
* Which of the two directories it came from is deliberately not recorded. The scan used
|
|
16
|
-
* to tag it `kind: 'service' | 'repository'`, a field it filled on every provider and
|
|
17
|
-
* that **no consumer ever read** — the two directories are two spellings of the same
|
|
18
|
-
* thing, and DI resolves by type either way.
|
|
19
|
-
*/
|
|
20
|
-
export interface ProviderEntry {
|
|
21
|
-
/**
|
|
22
|
-
* The class constructor (default export of the file).
|
|
23
|
-
*
|
|
24
|
-
* `never[]` and not `unknown[]`: the arguments are the CONTAINER's to supply, so the
|
|
25
|
-
* slot must accept any constructor — and with `unknown[]` a real class is refused,
|
|
26
|
-
* because assigning it would need `unknown` to be one of its declared parameters.
|
|
27
|
-
* Invisible on the scan path, where the value arrives as `unknown` and is cast; the
|
|
28
|
-
* module `fougere build` writes states the class by name, and that is where it showed.
|
|
29
|
-
*/
|
|
30
|
-
ctor: new (...args: never[]) => unknown;
|
|
31
|
-
/** Constructor dependency type names (from AST scan). */
|
|
32
|
-
deps: string[];
|
|
33
|
-
/** Absolute file path (for debugging). */
|
|
34
|
-
filePath: string;
|
|
35
|
-
}
|
|
36
|
-
/** A discovered entity (Entity subclass in entities/ dir). */
|
|
37
|
-
export interface EntityEntry {
|
|
38
|
-
/** Registration key: class name lowercased first char (e.g. 'product'). */
|
|
39
|
-
name: string;
|
|
40
|
-
/** The Entity class (has static getFields()). */
|
|
41
|
-
entityClass: SchemaView;
|
|
42
|
-
/** Absolute file path (for debugging). */
|
|
43
|
-
filePath: string;
|
|
44
|
-
/** Whether this entity is part of the frond's public contract. */
|
|
45
|
-
exposed?: boolean;
|
|
46
|
-
}
|
|
47
|
-
/** A discovered handler (controls what a service exposes). */
|
|
48
|
-
export interface HandlerEntry {
|
|
49
|
-
/** Registration key (e.g. 'postHandler'). */
|
|
50
|
-
name: string;
|
|
51
|
-
/**
|
|
52
|
-
* The name this handler answers to — its class name minus `Handler`, lowercased
|
|
53
|
-
* (`PostHandler` → `post`). It is what `facadeKeyOf` builds its key from and what
|
|
54
|
-
* travels as `FrondCall.entity` on the wire.
|
|
55
|
-
*
|
|
56
|
-
* **It is NOT an entity name**, and it was called `entityName` for long enough to
|
|
57
|
-
* mislead: `toEntityName` (`scanner.ts`) strips the suffix without checking that any
|
|
58
|
-
* entity carries the result, and the boot states the consequence — *pointing at
|
|
59
|
-
* nothing is legal*. A health check, a search across several shapes, a pure
|
|
60
|
-
* computation: ordinary handlers that own no row. `PresenterEntry`/`CollectorEntry`
|
|
61
|
-
* keep `entityName` because those really do target a declared entity.
|
|
62
|
-
*/
|
|
63
|
-
address: string;
|
|
64
|
-
/** The handler class. */
|
|
65
|
-
ctor: new (...args: never[]) => unknown;
|
|
66
|
-
/** All operations with full signatures for binding. */
|
|
67
|
-
operations: OperationsMap;
|
|
68
|
-
/** Constructor dependency type names (from AST scan). */
|
|
69
|
-
deps: string[];
|
|
70
|
-
/** Absolute file path (for debugging). */
|
|
71
|
-
filePath: string;
|
|
72
|
-
/** Whether this handler is part of the frond's public contract. */
|
|
73
|
-
exposed?: boolean;
|
|
74
|
-
/** Output schema override — when Crud(Entity, Output), restricts ORM output. */
|
|
75
|
-
outputOverride?: SchemaView;
|
|
76
|
-
/** Surface name — subdirectory in handlers/ (e.g. 'admin', 'public'). */
|
|
77
|
-
surface?: string;
|
|
78
|
-
}
|
|
79
|
-
/** Return type metadata for a presenter computed field. */
|
|
80
|
-
export interface PresenterFieldMeta {
|
|
81
|
-
name: string;
|
|
82
|
-
/** Inferred return type name: 'string', 'number', 'boolean', or a class name. */
|
|
83
|
-
returnType?: string;
|
|
84
|
-
/**
|
|
85
|
-
* The field emits a LIST per row — `tags(posts: Post[]): string[][]`.
|
|
86
|
-
*
|
|
87
|
-
* The method answers one value per row, so the outer array level of its return type is
|
|
88
|
-
* the page, not the field: what remains after removing it is the field's own arity.
|
|
89
|
-
* Nothing measured that remainder, so a computed list and a computed scalar looked
|
|
90
|
-
* identical and every projection announced the scalar.
|
|
91
|
-
*/
|
|
92
|
-
list?: boolean;
|
|
93
|
-
/** Whether the return is nullable. */
|
|
94
|
-
nullable?: boolean;
|
|
95
|
-
/**
|
|
96
|
-
* The declared parameters AFTER the rows. Kept raw rather than resolved: the scan
|
|
97
|
-
* meets presenters before collectors, so the plan is computed at boot where the
|
|
98
|
-
* collector names are known — exactly as a handler op's is.
|
|
99
|
-
*
|
|
100
|
-
* A computed field that declares `user?: User` is then fed by the collector
|
|
101
|
-
* that resolves one. A presenter is not a second mechanism.
|
|
102
|
-
*/
|
|
103
|
-
params?: ParsedParam[];
|
|
104
|
-
}
|
|
105
|
-
/** A discovered presenter (computed fields for an entity's output). */
|
|
106
|
-
export interface PresenterEntry {
|
|
107
|
-
/** Entity name this presenter enriches (e.g. 'post' from PostPresenter). */
|
|
108
|
-
entityName: string;
|
|
109
|
-
/** The presenter class. */
|
|
110
|
-
ctor: new (...args: never[]) => unknown;
|
|
111
|
-
/** Computed field names (method names on prototype). */
|
|
112
|
-
fields: string[];
|
|
113
|
-
/** Per-field type metadata (inferred from source via parser). */
|
|
114
|
-
fieldMeta: PresenterFieldMeta[];
|
|
115
|
-
/**
|
|
116
|
-
* The view each computed field emits, when the presenter declares one
|
|
117
|
-
* (`Presenter(Order, { items: [OrderItemView] })`). Stated rather than inferred: the
|
|
118
|
-
* parser reads a scalar off a return type and nothing more, so an object-valued field
|
|
119
|
-
* has no derivable shape without this.
|
|
120
|
-
*/
|
|
121
|
-
views?: PresenterViews;
|
|
122
|
-
/** Constructor dependency type names (from AST scan). */
|
|
123
|
-
deps: string[];
|
|
124
|
-
/** Absolute file path (for debugging). */
|
|
125
|
-
filePath: string;
|
|
126
|
-
}
|
|
127
|
-
/** A discovered collector (resolves handler input params from invocation context). */
|
|
128
|
-
export interface CollectorEntry {
|
|
129
|
-
/** Registration key of the TYPE this collector resolves — 'user', 'ability'. */
|
|
130
|
-
typeName: string;
|
|
131
|
-
/** The collector class. */
|
|
132
|
-
ctor: new (...args: never[]) => unknown;
|
|
133
|
-
/** Constructor dependency type names (from AST scan). */
|
|
134
|
-
deps: string[];
|
|
135
|
-
/** Absolute file path (for debugging). */
|
|
136
|
-
filePath: string;
|
|
137
|
-
}
|
|
138
|
-
/** A discovered seed file (array of records or async factory). */
|
|
139
|
-
export interface SeedEntry {
|
|
140
|
-
/** Entity name this seed targets (from filename: Author.seed.ts → 'author'). */
|
|
141
|
-
entityName: string;
|
|
142
|
-
/** Raw default export — array or function. Resolved at runtime. */
|
|
143
|
-
data: Record<string, unknown>[] | SeedFactory;
|
|
144
|
-
/** Absolute file path (for debugging). */
|
|
145
|
-
filePath: string;
|
|
146
|
-
}
|
|
147
|
-
/** Seed factory — receives a resolver to access handlers cross-frond. */
|
|
148
|
-
export type SeedFactory = (resolve: <T>(name: string) => T) => Promise<Record<string, unknown>[]>;
|
|
149
|
-
/** Where a frond lives on disk. */
|
|
150
|
-
export interface FrondSource {
|
|
151
|
-
/** Absolute path to the frond directory. */
|
|
152
|
-
path: string;
|
|
153
|
-
/** The @fronds/{name} package name. Always present. */
|
|
154
|
-
package: string;
|
|
155
|
-
}
|
|
156
|
-
export interface FrondDescriptor {
|
|
157
|
-
name: string;
|
|
158
|
-
source: FrondSource;
|
|
159
|
-
providers: ProviderEntry[];
|
|
160
|
-
entities: EntityEntry[];
|
|
161
|
-
handlers: HandlerEntry[];
|
|
162
|
-
presenters: PresenterEntry[];
|
|
163
|
-
collectors: CollectorEntry[];
|
|
164
|
-
seeds: SeedEntry[];
|
|
165
|
-
/** Per-surface entity lists from frond.config.ts (e.g. { graphql: ['Post'], rest: ['Post', 'Author'] }). */
|
|
166
|
-
surfaces?: Record<string, string[]>;
|
|
167
|
-
/** Entities this frond may read across sources — see `FrondConfig.reads`. */
|
|
168
|
-
reads?: string[];
|
|
169
|
-
/**
|
|
170
|
-
* Per-operation overrides from frond.config.ts. Key = operation name.
|
|
171
|
-
*
|
|
172
|
-
* Two depths, as declared on {@link OperationOverride}: the surface keys travel to the
|
|
173
|
-
* transport adapters, the contract keys (`input`/`output`/`binding`) travel to the
|
|
174
|
-
* façade — where config is the third producer of an operation's contract, alongside a
|
|
175
|
-
* prefab's `__ops` and the scan.
|
|
176
|
-
*/
|
|
177
|
-
operationsOverrides?: Record<string, OperationContract & {
|
|
178
|
-
kind?: 'query' | 'command';
|
|
179
|
-
/** Class name to resolve from DI (overrides default `{Entity}Handler` lookup). */
|
|
180
|
-
handlerName?: string;
|
|
181
|
-
/** Method name on the resolved handler (defaults to op name). */
|
|
182
|
-
method?: string;
|
|
183
|
-
}>;
|
|
184
|
-
}
|
|
185
|
-
/** Result of scanning a project directory. */
|
|
186
|
-
/**
|
|
187
|
-
* Something the scan could NOT do — recorded instead of swallowed.
|
|
188
|
-
*
|
|
189
|
-
* The scan answers with what it found. Until now it answered the same way whether
|
|
190
|
-
* a directory held nothing or could not be read, and whether a handler declared no
|
|
191
|
-
* operation or failed to parse: `catch → empty`. So every downstream reader — the
|
|
192
|
-
* façade, the identity card, anything asking "what does this app serve?" — could
|
|
193
|
-
* not tell **"there is nothing"** from **"I could not look"**.
|
|
194
|
-
*
|
|
195
|
-
* That distinction is what makes a rule about an ABSENCE sound. Without it, a check
|
|
196
|
-
* derived from the scan reports "nothing wrong" precisely when it read nothing.
|
|
197
|
-
*/
|
|
198
|
-
export interface ScanDiagnostic {
|
|
199
|
-
/**
|
|
200
|
-
* `blocking` — the app now serves less than its source declares, and no caller
|
|
201
|
-
* can know it: a handler that failed to parse contributes zero operations.
|
|
202
|
-
* `warning` — something may be missing and the scan cannot decide, e.g. a base
|
|
203
|
-
* class it is not allowed to resolve. Statable in `frond.config.ts`.
|
|
204
|
-
*/
|
|
205
|
-
severity: 'blocking' | 'warning';
|
|
206
|
-
/** Stable rule name — `handler-parse-failed`, `directory-unreadable`. */
|
|
207
|
-
code: string;
|
|
208
|
-
/** Absolute path of what could not be read. */
|
|
209
|
-
filePath: string;
|
|
210
|
-
/** The frond it belongs to, when the scan got far enough to know. */
|
|
211
|
-
frond?: string;
|
|
212
|
-
/** The declaration the diagnostic is about — e.g. `PostHandler.publish`. */
|
|
213
|
-
subject?: string;
|
|
214
|
-
/** What could not be done, and what it costs. One sentence, for a human. */
|
|
215
|
-
message: string;
|
|
216
|
-
/** The underlying failure, kept whole. */
|
|
217
|
-
cause?: unknown;
|
|
218
|
-
}
|
|
219
|
-
export interface ScanResult {
|
|
220
|
-
fronds: Fronds;
|
|
221
|
-
/** What the scan could not do. Empty is a claim, not a default — see {@link ScanDiagnostic}. */
|
|
222
|
-
diagnostics: ScanDiagnostic[];
|
|
223
|
-
}
|
|
224
|
-
//# sourceMappingURL=frond.d.ts.map
|
package/dist/scan/frond.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"frond.d.ts","sourceRoot":"","sources":["../../src/scan/frond.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1F,OAAO,KAAK,EAAE,cAAc,EA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