@fougere/core 0.6.0-alpha.0 → 0.8.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/AppLifecycle.d.ts +1 -1
- package/dist/boot/AppLifecycle.d.ts.map +1 -1
- package/dist/boot/AppLifecycle.js +13 -2
- package/dist/boot/AppLifecycle.js.map +1 -1
- package/dist/boot/Emissions.d.ts +13 -90
- 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 +9 -16
- package/dist/boot/apply.js.map +1 -1
- package/dist/boot/auth.d.ts +2 -12
- package/dist/boot/auth.d.ts.map +1 -1
- package/dist/boot/boot.d.ts +3 -16
- 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 +84 -130
- package/dist/boot/bootstrap.js.map +1 -1
- package/dist/boot/card.d.ts +1 -17
- package/dist/boot/card.d.ts.map +1 -1
- package/dist/boot/card.js +3 -32
- package/dist/boot/card.js.map +1 -1
- package/dist/boot/frame.d.ts +8 -32
- package/dist/boot/frame.d.ts.map +1 -1
- package/dist/boot/frame.js +17 -56
- package/dist/boot/frame.js.map +1 -1
- package/dist/boot/hosted.d.ts +2 -24
- package/dist/boot/hosted.d.ts.map +1 -1
- package/dist/boot/hosted.js +10 -15
- package/dist/boot/hosted.js.map +1 -1
- package/dist/boot/ownership.d.ts +3 -36
- package/dist/boot/ownership.d.ts.map +1 -1
- package/dist/boot/ownership.js +5 -40
- package/dist/boot/ownership.js.map +1 -1
- package/dist/boot/ports.d.ts +1 -14
- 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 +4 -21
- package/dist/boot/runner.d.ts.map +1 -1
- package/dist/boot/runner.js +4 -17
- package/dist/boot/runner.js.map +1 -1
- package/dist/boot/seed.d.ts +4 -31
- package/dist/boot/seed.d.ts.map +1 -1
- package/dist/boot/seed.js +6 -37
- package/dist/boot/seed.js.map +1 -1
- package/dist/boot/statement-drift.d.ts +2 -21
- 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 +4 -8
- package/dist/boot/together.d.ts.map +1 -1
- package/dist/boot/together.js +15 -50
- package/dist/boot/together.js.map +1 -1
- package/dist/boot/types.d.ts +31 -173
- 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 +15 -31
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js +13 -26
- package/dist/contract.js.map +1 -1
- package/dist/criterion.d.ts +37 -0
- package/dist/criterion.d.ts.map +1 -0
- package/dist/criterion.js +28 -0
- package/dist/criterion.js.map +1 -0
- 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 +19 -37
- package/dist/declare.d.ts.map +1 -1
- package/dist/declare.js +23 -30
- package/dist/declare.js.map +1 -1
- 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 +3 -28
- package/dist/descriptor/Fronds.d.ts.map +1 -1
- package/dist/descriptor/Fronds.js +6 -31
- package/dist/descriptor/Fronds.js.map +1 -1
- package/dist/descriptor/frond.d.ts +25 -60
- package/dist/descriptor/frond.d.ts.map +1 -1
- package/dist/descriptor/frond.js +5 -1
- package/dist/descriptor/frond.js.map +1 -1
- package/dist/dispatch/ArgumentResolver.d.ts +1 -1
- package/dist/dispatch/ArgumentResolver.d.ts.map +1 -1
- package/dist/dispatch/ArgumentResolver.js +5 -5
- 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 -2
- 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 +40 -8
- package/dist/dispatch/StorageGuard.d.ts.map +1 -1
- package/dist/dispatch/StorageGuard.js +151 -20
- 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 +1 -24
- package/dist/effective-operation.d.ts.map +1 -1
- package/dist/effective-operation.js +21 -50
- 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 +7 -70
- 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/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 +1 -7
- 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 +17 -24
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -18
- 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 +16 -32
- package/dist/prefab/crud.d.ts.map +1 -1
- package/dist/prefab/crud.js +31 -58
- package/dist/prefab/crud.js.map +1 -1
- package/dist/prefab/mirror.d.ts +2 -24
- package/dist/prefab/mirror.d.ts.map +1 -1
- package/dist/prefab/mirror.js +2 -20
- 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 +5 -73
- package/dist/prefab/repository.d.ts.map +1 -1
- package/dist/prefab/repository.js +3 -16
- 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/contract.d.ts +27 -0
- package/dist/scan/contract.d.ts.map +1 -0
- package/dist/scan/contract.js +46 -0
- package/dist/scan/contract.js.map +1 -0
- 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 +1 -5
- package/dist/scan/emit.d.ts.map +1 -1
- package/dist/scan/emit.js +10 -78
- package/dist/scan/emit.js.map +1 -1
- package/dist/scan/handler-parser.d.ts +4 -26
- package/dist/scan/handler-parser.d.ts.map +1 -1
- package/dist/scan/handler-parser.js +26 -83
- package/dist/scan/handler-parser.js.map +1 -1
- package/dist/scan/result.d.ts +3 -16
- package/dist/scan/result.d.ts.map +1 -1
- package/dist/scan/scanner.d.ts +2 -27
- package/dist/scan/scanner.d.ts.map +1 -1
- package/dist/scan/scanner.js +45 -133
- package/dist/scan/scanner.js.map +1 -1
- package/dist/scan/statement.d.ts.map +1 -1
- package/dist/scan/statement.js +60 -37
- package/dist/scan/statement.js.map +1 -1
- package/dist/source.d.ts +53 -0
- package/dist/source.d.ts.map +1 -0
- package/dist/source.js +18 -0
- package/dist/source.js.map +1 -0
- package/dist/storage.d.ts +13 -210
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +4 -68
- package/dist/storage.js.map +1 -1
- package/dist/store.d.ts +18 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +179 -0
- package/dist/store.js.map +1 -0
- package/dist/verify.d.ts +5 -38
- package/dist/verify.d.ts.map +1 -1
- package/dist/verify.js +17 -37
- 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/{contract → wire}/RouteAddress.d.ts +5 -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 +5 -21
- package/dist/wire/binding.d.ts.map +1 -1
- package/dist/wire/binding.js +5 -10
- package/dist/wire/binding.js.map +1 -1
- package/dist/wire/call.d.ts +24 -133
- package/dist/wire/call.d.ts.map +1 -1
- package/dist/wire/call.js +15 -41
- 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 +7 -43
- package/dist/wire/operation.d.ts.map +1 -1
- package/dist/wire/operation.js +4 -15
- package/dist/wire/operation.js.map +1 -1
- package/dist/wire/signature.d.ts +4 -25
- package/dist/wire/signature.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/boot/AppLifecycle.ts +15 -2
- package/src/boot/Emissions.ts +21 -118
- 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 +9 -16
- package/src/boot/auth.ts +2 -12
- package/src/boot/boot.ts +6 -21
- package/src/boot/bootstrap.ts +95 -140
- package/src/boot/card.ts +4 -33
- package/src/boot/frame.ts +24 -64
- package/src/boot/hosted.ts +12 -34
- package/src/boot/ownership.ts +5 -39
- package/src/boot/ports.ts +1 -14
- package/src/boot/remote.ts +11 -58
- package/src/boot/runner.ts +5 -22
- package/src/boot/seed.ts +6 -37
- package/src/boot/statement-drift.ts +5 -24
- package/src/boot/together.ts +18 -51
- package/src/boot/types.ts +31 -173
- 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 +19 -39
- package/src/criterion.ts +54 -0
- 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/declare.ts +42 -41
- package/src/define.ts +2 -3
- package/src/descriptor/Fronds.ts +6 -31
- package/src/descriptor/frond.ts +26 -60
- package/src/dispatch/ArgumentResolver.ts +6 -6
- 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 -2
- 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 +175 -19
- 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 +21 -50
- 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 +7 -70
- package/src/identity-keys.ts +3 -16
- package/src/identity.ts +12 -80
- package/src/imports.ts +2 -31
- package/src/index.ts +17 -24
- package/src/loader.ts +2 -16
- package/src/node.ts +2 -11
- package/src/prefab/collector.ts +1 -22
- package/src/prefab/crud.ts +37 -76
- package/src/prefab/mirror.ts +4 -44
- package/src/prefab/prefab.ts +2 -21
- package/src/prefab/presenter.ts +2 -36
- package/src/prefab/repository.ts +7 -83
- package/src/scan/adapters.ts +32 -0
- package/src/scan/bundling.ts +1 -12
- package/src/scan/contract.ts +80 -0
- package/src/scan/conventions.ts +6 -40
- package/src/scan/emit.ts +11 -80
- package/src/scan/handler-parser.ts +27 -96
- package/src/scan/result.ts +3 -16
- package/src/scan/scanner.ts +46 -132
- package/src/scan/statement.ts +73 -41
- package/src/source.ts +63 -0
- package/src/storage.ts +14 -234
- package/src/store.ts +191 -0
- package/src/verify.ts +16 -57
- package/src/wire/CallLog.ts +30 -0
- package/src/{contract → wire}/Invocation.ts +24 -17
- package/src/{contract → wire}/RouteAddress.ts +7 -0
- package/src/wire/binding.ts +9 -25
- package/src/wire/call.ts +30 -133
- 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 +8 -48
- package/src/wire/signature.ts +4 -25
- package/dist/boot/HandlerFacade.d.ts.map +0 -1
- package/dist/boot/HandlerFacade.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.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/rows.d.ts +0 -40
- package/dist/rows.d.ts.map +0 -1
- package/dist/rows.js +0 -146
- package/dist/rows.js.map +0 -1
- package/src/boot/HandlerFacade.ts +0 -242
- 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/rows.ts +0 -155
- /package/dist/{contract → wire}/CallLog.js +0 -0
package/dist/declare.d.ts
CHANGED
|
@@ -1,31 +1,10 @@
|
|
|
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
|
-
*/
|
|
1
|
+
/** A frond stated by its author, for an app that will not scan. */
|
|
18
2
|
import { type SchemaView } from '@fougere/schema';
|
|
19
3
|
import type { FrondDescriptor, SeedEntry } from './descriptor/frond.js';
|
|
4
|
+
import type { OperationContract } from './wire/operation.js';
|
|
20
5
|
/** A class, as a declaration hands it over: the constructor itself. */
|
|
21
6
|
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 storage needs nothing here.
|
|
28
|
-
*/
|
|
7
|
+
/** What a subject needs beyond its class, when its constructor names a frame or a port. */
|
|
29
8
|
export interface DeclaredSubject {
|
|
30
9
|
ctor: Ctor;
|
|
31
10
|
deps?: string[];
|
|
@@ -33,14 +12,23 @@ export interface DeclaredSubject {
|
|
|
33
12
|
/** A handler, and the surface it answers on when it is not the default one. */
|
|
34
13
|
export interface DeclaredHandler extends DeclaredSubject {
|
|
35
14
|
/**
|
|
36
|
-
* The scan reads this from the directory (`handlers/public/`), so a statement has to
|
|
37
|
-
*
|
|
38
|
-
*
|
|
15
|
+
* The scan reads this from the directory (`handlers/public/`), so a statement has to say it: two
|
|
16
|
+
* handlers over one entity collide on their address otherwise, and the refusal names the same
|
|
17
|
+
* route twice.
|
|
39
18
|
*/
|
|
40
19
|
surface?: string;
|
|
20
|
+
/**
|
|
21
|
+
* What each method takes and answers — read from SOURCE by the scan, and unreachable
|
|
22
|
+
* from a class at runtime. A prefab declares its own (`Crud.__ops`) and needs nothing
|
|
23
|
+
* here; a method someone wrote does, or the route it should serve does not exist.
|
|
24
|
+
*/
|
|
25
|
+
operations?: ReadonlyMap<string, OperationContract> | Record<string, OperationContract>;
|
|
41
26
|
}
|
|
42
27
|
/** A class on its own, or a class with what it asks for. */
|
|
43
|
-
export type Declared = Ctor | DeclaredSubject
|
|
28
|
+
export type Declared = Ctor | (DeclaredSubject & {
|
|
29
|
+
/** The container key, when the class's own name cannot be trusted to survive a build. */
|
|
30
|
+
name?: string;
|
|
31
|
+
});
|
|
44
32
|
/** What a declaration states about one frond. Everything else is derived from the classes. */
|
|
45
33
|
export interface FrondDeclaration {
|
|
46
34
|
entities?: SchemaView[];
|
|
@@ -56,16 +44,10 @@ export interface FrondDeclaration {
|
|
|
56
44
|
surfaces?: Record<string, string[]>;
|
|
57
45
|
/** The import scope this frond answers under. Defaults to the conventional one. */
|
|
58
46
|
scope?: string;
|
|
47
|
+
/** What `frond.config.ts` states — the third producer of an operation contract. */
|
|
48
|
+
operationsOverrides?: FrondDescriptor['operationsOverrides'];
|
|
59
49
|
}
|
|
60
|
-
/**
|
|
61
|
-
* State a frond without reading a disk.
|
|
62
|
-
*
|
|
63
|
-
* ```ts
|
|
64
|
-
* createApp({
|
|
65
|
-
* scan: { fronds: Fronds.hosting([frond('blog', { entities: [Post], handlers: [PostHandler] })]), diagnostics: [] },
|
|
66
|
-
* })
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
50
|
+
/** State a frond without reading a disk. */
|
|
69
51
|
export declare function frond(name: string, declared?: FrondDeclaration): FrondDescriptor;
|
|
70
52
|
export {};
|
|
71
53
|
//# sourceMappingURL=declare.d.ts.map
|
package/dist/declare.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"declare.d.ts","sourceRoot":"","sources":["../src/declare.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"declare.d.ts","sourceRoot":"","sources":["../src/declare.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,OAAO,EAAc,KAAK,UAAU,EAAE,MAAM,iBAA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AAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACpC,mFAAmF;IACnF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mFAAmF;IACnF,mBAAmB,CAAC,EAAE,eAAe,CAAC,qBAAqB,CAAC,CAAC;CAC9D;AAED,4CAA4C;AAC5C,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,gBAAqB,GAAG,eAAe,CAuFpF"}
|
package/dist/declare.js
CHANGED
|
@@ -1,29 +1,12 @@
|
|
|
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
|
-
*/
|
|
1
|
+
/** A frond stated by its author, for an app that will not scan. */
|
|
18
2
|
import { lowerFirst } from '@fougere/schema';
|
|
19
3
|
import { DEFAULT_CONVENTIONS } from './scan/conventions.js';
|
|
20
4
|
import { getPresenterFields } from './prefab/presenter.js';
|
|
21
5
|
const ctorOf = (d) => (typeof d === 'function' ? d : d.ctor);
|
|
22
6
|
/**
|
|
23
7
|
* What a prefab was BUILT ON — `Presenter(Post)` and `Collector(User)` both keep it under
|
|
24
|
-
* `__entity`, which is the only place it survives: nothing in the FORM of `PostPresenter`
|
|
25
|
-
*
|
|
26
|
-
* rather than yielding a frond whose presenter belongs to no entity.
|
|
8
|
+
* `__entity`, which is the only place it survives: nothing in the FORM of `PostPresenter` says
|
|
9
|
+
* `Post`.
|
|
27
10
|
*/
|
|
28
11
|
function subjectOf(ctor, kind) {
|
|
29
12
|
const subject = ctor.__entity;
|
|
@@ -34,20 +17,26 @@ function subjectOf(ctor, kind) {
|
|
|
34
17
|
return subject;
|
|
35
18
|
}
|
|
36
19
|
const depsOf = (d) => (typeof d === 'function' ? [] : d.deps ?? []);
|
|
20
|
+
/**
|
|
21
|
+
* A Map either way — a statement is read as code, and an object literal is what code
|
|
22
|
+
* looks like there. What a prefab declares of itself is merged BELOW: a method the author
|
|
23
|
+
* wrote over `create` is the one that runs, so its contract is the one that answers.
|
|
24
|
+
*/
|
|
25
|
+
function statedOperations(h) {
|
|
26
|
+
const declared = typeof h === 'function' ? undefined : h.operations;
|
|
27
|
+
const own = ctorOf(h).__ops ?? {};
|
|
28
|
+
const merged = new Map(Object.entries(own));
|
|
29
|
+
for (const [op, contract] of declared instanceof Map ? declared : Object.entries(declared ?? {})) {
|
|
30
|
+
merged.set(op, contract);
|
|
31
|
+
}
|
|
32
|
+
return merged;
|
|
33
|
+
}
|
|
37
34
|
/** `PostHandler` answers at `post` — the same rule the scan applies to a file it found. */
|
|
38
35
|
function addressOf(className) {
|
|
39
36
|
const base = className.endsWith('Handler') ? className.slice(0, -7) : className;
|
|
40
37
|
return lowerFirst(base);
|
|
41
38
|
}
|
|
42
|
-
/**
|
|
43
|
-
* State a frond without reading a disk.
|
|
44
|
-
*
|
|
45
|
-
* ```ts
|
|
46
|
-
* createApp({
|
|
47
|
-
* scan: { fronds: Fronds.hosting([frond('blog', { entities: [Post], handlers: [PostHandler] })]), diagnostics: [] },
|
|
48
|
-
* })
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
39
|
+
/** State a frond without reading a disk. */
|
|
51
40
|
export function frond(name, declared = {}) {
|
|
52
41
|
const scope = declared.scope ?? DEFAULT_CONVENTIONS.scope;
|
|
53
42
|
const entities = (declared.entities ?? []).map((entityClass) => ({
|
|
@@ -67,7 +56,7 @@ export function frond(name, declared = {}) {
|
|
|
67
56
|
// A handler about no stored row is ordinary — the address is not a promise that an
|
|
68
57
|
// entity carries it, which is why this is not looked up.
|
|
69
58
|
entityName: address,
|
|
70
|
-
operations:
|
|
59
|
+
operations: statedOperations(h),
|
|
71
60
|
deps: depsOf(h),
|
|
72
61
|
filePath: '',
|
|
73
62
|
exposed: true,
|
|
@@ -101,6 +90,9 @@ export function frond(name, declared = {}) {
|
|
|
101
90
|
};
|
|
102
91
|
});
|
|
103
92
|
const providers = (declared.providers ?? []).map((p) => ({
|
|
93
|
+
// Written down where a statement says it, read off the class otherwise — the class's
|
|
94
|
+
// own name is what a bundler is free to rewrite.
|
|
95
|
+
...(typeof p === 'function' || !p.name ? {} : { name: p.name }),
|
|
104
96
|
ctor: ctorOf(p),
|
|
105
97
|
deps: depsOf(p),
|
|
106
98
|
filePath: '',
|
|
@@ -113,6 +105,7 @@ export function frond(name, declared = {}) {
|
|
|
113
105
|
return {
|
|
114
106
|
name,
|
|
115
107
|
source: { path: '', package: `${scope}/${name}` },
|
|
108
|
+
...(declared.operationsOverrides ? { operationsOverrides: declared.operationsOverrides } : {}),
|
|
116
109
|
providers,
|
|
117
110
|
entities,
|
|
118
111
|
handlers,
|
package/dist/declare.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"declare.js","sourceRoot":"","sources":["../src/declare.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"declare.js","sourceRoot":"","sources":["../src/declare.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,OAAO,EAAE,UAAU,EAAmB,MAAM,iBAAiB,CAAC;AAK9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,u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AC,CAAC,CAAC,EAAE,CAAC;KAC9D,CAAC;AACJ,CAAC"}
|
package/dist/define.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { FougereConfig } from './config-loader.js';
|
|
2
2
|
/**
|
|
3
|
-
* Identity helper for fougere.config.ts — preserves literal types for autocomplete
|
|
4
|
-
*
|
|
5
|
-
* but more explicit and aligned with defineFrond().
|
|
3
|
+
* Identity helper for fougere.config.ts — preserves literal types for autocomplete while
|
|
4
|
+
* validating against FougereConfig.
|
|
6
5
|
*/
|
|
7
6
|
export declare function defineFougere<T extends FougereConfig>(config: T): T;
|
|
8
7
|
//# sourceMappingURL=define.d.ts.map
|
package/dist/define.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD
|
|
1
|
+
{"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,aAAa,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAEnE"}
|
package/dist/define.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Identity helper for fougere.config.ts — preserves literal types for autocomplete
|
|
3
|
-
*
|
|
4
|
-
* but more explicit and aligned with defineFrond().
|
|
2
|
+
* Identity helper for fougere.config.ts — preserves literal types for autocomplete while
|
|
3
|
+
* validating against FougereConfig.
|
|
5
4
|
*/
|
|
6
5
|
export function defineFougere(config) {
|
|
7
6
|
return config;
|
package/dist/define.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define.js","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"define.js","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,UAAU,aAAa,CAA0B,MAAS;IAC9D,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
import type { SchemaView } from '@fougere/schema';
|
|
2
2
|
import type { EntityEntry, FrondDescriptor } from './frond.js';
|
|
3
|
-
/**
|
|
4
|
-
* What this app hosts, with the questions everyone was asking it by hand.
|
|
5
|
-
*
|
|
6
|
-
* The list was a bare array, so every reader re-walked it: "which frond owns this
|
|
7
|
-
* entity" was spelled four times, "every entity by name" three times as three literal
|
|
8
|
-
* copies of the same `Map`, and the two inside the boot even carried comments saying so.
|
|
9
|
-
* A concept nobody can question is a concept everyone rebuilds.
|
|
10
|
-
*
|
|
11
|
-
* It IS an array — the same reason `ListResult` is one: twenty call sites iterate,
|
|
12
|
-
* filter and spread it, and none of them is wrong to. `Symbol.species` is `Array` so a
|
|
13
|
-
* `.map()` over it answers a plain array rather than something that claims to be a
|
|
14
|
-
* hosting table and holds strings.
|
|
15
|
-
*/
|
|
3
|
+
/** What this app hosts, with the questions everyone was asking it by hand. */
|
|
16
4
|
export declare class Fronds extends Array<FrondDescriptor> {
|
|
17
5
|
static get [Symbol.species](): ArrayConstructor;
|
|
18
6
|
/** The fronds an app hosts, scanned or stated. The only gate in — `Array.of` is taken. */
|
|
@@ -21,24 +9,11 @@ export declare class Fronds extends Array<FrondDescriptor> {
|
|
|
21
9
|
owner(entity: string): FrondDescriptor | undefined;
|
|
22
10
|
/** The entity of that name, wherever it was declared. */
|
|
23
11
|
entity(name: string): EntityEntry | undefined;
|
|
24
|
-
/**
|
|
25
|
-
* Every entity class, by name — across all fronds and never per-frond.
|
|
26
|
-
*
|
|
27
|
-
* A fact is announced in one frond and heard in another, so the subscriber's own
|
|
28
|
-
* frond does not hold the shape it must judge; a `reads:` clause names entities
|
|
29
|
-
* that belong to neighbours by definition.
|
|
30
|
-
*/
|
|
12
|
+
/** Every entity class, by name — across all fronds and never per-frond. */
|
|
31
13
|
schemas(): Map<string, SchemaView>;
|
|
32
14
|
/** Every declared entity, sorted. What is DECLARED, not what answers. */
|
|
33
15
|
entityNames(): string[];
|
|
34
|
-
/**
|
|
35
|
-
* The names a call may address, sorted — what a NOT_FOUND must print.
|
|
36
|
-
*
|
|
37
|
-
* Not `entityNames()`, which is what the scan found: an entity with no handler is
|
|
38
|
-
* scanned and serves nothing, so the refusal read *"Entity 'indexed' is not hosted
|
|
39
|
-
* here. Hosted here: indexed."* — naming the very thing it had just refused. A façade
|
|
40
|
-
* is keyed on a HANDLER's address, and that is what this lists.
|
|
41
|
-
*/
|
|
16
|
+
/** The names a call may address, sorted — what a NOT_FOUND must print. */
|
|
42
17
|
servedNames(surface?: string): string[];
|
|
43
18
|
}
|
|
44
19
|
//# sourceMappingURL=Fronds.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fronds.d.ts","sourceRoot":"","sources":["../../src/descriptor/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
|
|
1
|
+
{"version":3,"file":"Fronds.d.ts","sourceRoot":"","sources":["../../src/descriptor/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,8EAA8E;AAC9E,qBAAa,MAAO,SAAQ,KAAK,CAAC,eAAe,CAAC;IAChD,WAAoB,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAEvD;IAED,0FAA0F;IAC1F,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,eAAe,EAAE,GAAG,MAAM;IAM1D,8EAA8E;IAC9E,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;IAIlD,yDAAyD;IACzD,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAQ7C,2EAA2E;IAC3E,OAAO,IAAI,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC;IAIlC,yEAAyE;IACzE,WAAW,IAAI,MAAM,EAAE;IAIvB,0EAA0E;IAC1E,WAAW,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE;CAKxC"}
|
|
@@ -1,25 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* What this app hosts, with the questions everyone was asking it by hand.
|
|
3
|
-
*
|
|
4
|
-
* The list was a bare array, so every reader re-walked it: "which frond owns this
|
|
5
|
-
* entity" was spelled four times, "every entity by name" three times as three literal
|
|
6
|
-
* copies of the same `Map`, and the two inside the boot even carried comments saying so.
|
|
7
|
-
* A concept nobody can question is a concept everyone rebuilds.
|
|
8
|
-
*
|
|
9
|
-
* It IS an array — the same reason `ListResult` is one: twenty call sites iterate,
|
|
10
|
-
* filter and spread it, and none of them is wrong to. `Symbol.species` is `Array` so a
|
|
11
|
-
* `.map()` over it answers a plain array rather than something that claims to be a
|
|
12
|
-
* hosting table and holds strings.
|
|
13
|
-
*/
|
|
1
|
+
/** What this app hosts, with the questions everyone was asking it by hand. */
|
|
14
2
|
export class Fronds extends Array {
|
|
15
3
|
static get [Symbol.species]() {
|
|
16
4
|
return Array;
|
|
17
5
|
}
|
|
18
6
|
/** The fronds an app hosts, scanned or stated. The only gate in — `Array.of` is taken. */
|
|
19
7
|
static hosting(fronds) {
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
return
|
|
8
|
+
const all = new Fronds();
|
|
9
|
+
all.push(...fronds);
|
|
10
|
+
return all;
|
|
23
11
|
}
|
|
24
12
|
/** The frond that hosts an entity — `undefined` when no loaded frond does. */
|
|
25
13
|
owner(entity) {
|
|
@@ -34,13 +22,7 @@ export class Fronds extends Array {
|
|
|
34
22
|
}
|
|
35
23
|
return undefined;
|
|
36
24
|
}
|
|
37
|
-
/**
|
|
38
|
-
* Every entity class, by name — across all fronds and never per-frond.
|
|
39
|
-
*
|
|
40
|
-
* A fact is announced in one frond and heard in another, so the subscriber's own
|
|
41
|
-
* frond does not hold the shape it must judge; a `reads:` clause names entities
|
|
42
|
-
* that belong to neighbours by definition.
|
|
43
|
-
*/
|
|
25
|
+
/** Every entity class, by name — across all fronds and never per-frond. */
|
|
44
26
|
schemas() {
|
|
45
27
|
return new Map(this.flatMap((frond) => frond.entities.map((e) => [e.name, e.entityClass])));
|
|
46
28
|
}
|
|
@@ -48,14 +30,7 @@ export class Fronds extends Array {
|
|
|
48
30
|
entityNames() {
|
|
49
31
|
return this.flatMap((frond) => frond.entities.map((e) => e.name)).sort();
|
|
50
32
|
}
|
|
51
|
-
/**
|
|
52
|
-
* The names a call may address, sorted — what a NOT_FOUND must print.
|
|
53
|
-
*
|
|
54
|
-
* Not `entityNames()`, which is what the scan found: an entity with no handler is
|
|
55
|
-
* scanned and serves nothing, so the refusal read *"Entity 'indexed' is not hosted
|
|
56
|
-
* here. Hosted here: indexed."* — naming the very thing it had just refused. A façade
|
|
57
|
-
* is keyed on a HANDLER's address, and that is what this lists.
|
|
58
|
-
*/
|
|
33
|
+
/** The names a call may address, sorted — what a NOT_FOUND must print. */
|
|
59
34
|
servedNames(surface) {
|
|
60
35
|
return this.flatMap((frond) => frond.handlers
|
|
61
36
|
.filter((handler) => (handler.surface ?? undefined) === surface)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fronds.js","sourceRoot":"","sources":["../../src/descriptor/Fronds.ts"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"Fronds.js","sourceRoot":"","sources":["../../src/descriptor/Fronds.ts"],"names":[],"mappings":"AAGA,8EAA8E;AAC9E,MAAM,OAAO,MAAO,S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CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3E,CAAC;IAED,0EAA0E;IAC1E,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"}
|
|
@@ -1,37 +1,30 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* What a frond is made of — one interface per convention directory.
|
|
3
|
-
*
|
|
4
|
-
* Produced two ways and indistinguishable once here: the scan DERIVES it from a
|
|
5
|
-
* directory tree, `frond()` STATES it outright. `frond-config.ts` is the declared
|
|
6
|
-
* side; they meet at `FrondDescriptor.operationsOverrides`.
|
|
7
|
-
*/
|
|
1
|
+
/** What a frond is made of — one interface per convention directory. */
|
|
8
2
|
import type { SchemaView } from '@fougere/schema';
|
|
9
3
|
import type { Param, OperationContract, OperationsMap } from '../wire/operation.js';
|
|
10
4
|
import type { PresenterViews } from '../prefab/presenter.js';
|
|
11
|
-
/**
|
|
12
|
-
* A discovered provider — a class under `services/` or `repositories/`, injected by type.
|
|
13
|
-
*
|
|
14
|
-
* Which of the two directories it came from is deliberately not recorded. The scan used
|
|
15
|
-
* to tag it `kind: 'service' | 'repository'`, a field it filled on every provider and
|
|
16
|
-
* that **no consumer ever read** — the two directories are two spellings of the same
|
|
17
|
-
* thing, and DI resolves by type either way.
|
|
18
|
-
*/
|
|
5
|
+
/** A discovered provider — a class under `services/` or `repositories/`, injected by type. */
|
|
19
6
|
export interface ProviderEntry {
|
|
20
7
|
/**
|
|
21
|
-
* The
|
|
8
|
+
* The container key — the class name as the SOURCE spells it.
|
|
22
9
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* module `fougere build` writes states the class by name, and that is where it showed.
|
|
10
|
+
* Read at boot off `ctor.name` for a decade of no consequence, until a bundler lowered
|
|
11
|
+
* a `static readonly` field and renamed the declaration doing it: the provider
|
|
12
|
+
* registered as `_Communes` and the handler asking for `Communes` got a container miss.
|
|
13
|
+
* A name a tool may rewrite is written down, for the same reason `deps` is.
|
|
28
14
|
*/
|
|
15
|
+
name?: string;
|
|
16
|
+
/** The class constructor (default export of the file). */
|
|
29
17
|
ctor: new (...args: never[]) => unknown;
|
|
30
18
|
/** Constructor dependency type names (from AST scan). */
|
|
31
19
|
deps: string[];
|
|
32
20
|
/** Absolute file path (for debugging). */
|
|
33
21
|
filePath: string;
|
|
34
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* The key a provider answers under. What the source said, and the class's own name only
|
|
25
|
+
* where nobody wrote it down — a statement is read as code, and code can say it.
|
|
26
|
+
*/
|
|
27
|
+
export declare const nameOf: (provider: ProviderEntry) => string;
|
|
35
28
|
/** A discovered entity (Entity subclass in entities/ dir). */
|
|
36
29
|
export interface EntityEntry {
|
|
37
30
|
/** Registration key: class name lowercased first char (e.g. 'product'). */
|
|
@@ -48,16 +41,8 @@ export interface HandlerEntry {
|
|
|
48
41
|
/** Registration key (e.g. 'postHandler'). */
|
|
49
42
|
name: string;
|
|
50
43
|
/**
|
|
51
|
-
* The name this handler answers to — its class name minus `Handler`, lowercased
|
|
52
|
-
*
|
|
53
|
-
* travels as `FrondCall.entity` on the wire.
|
|
54
|
-
*
|
|
55
|
-
* **It is NOT an entity name**, and it was called `entityName` for long enough to
|
|
56
|
-
* mislead: `toEntityName` (`scanner.ts`) strips the suffix without checking that any
|
|
57
|
-
* entity carries the result, and the boot states the consequence — *pointing at
|
|
58
|
-
* nothing is legal*. A health check, a search across several shapes, a pure
|
|
59
|
-
* computation: ordinary handlers that own no row. `PresenterEntry`/`CollectorEntry`
|
|
60
|
-
* keep `entityName` because those really do target a declared entity.
|
|
44
|
+
* The name this handler answers to — its class name minus `Handler`, lowercased (`PostHandler` →
|
|
45
|
+
* `post`).
|
|
61
46
|
*/
|
|
62
47
|
address: string;
|
|
63
48
|
/** The handler class. */
|
|
@@ -80,25 +65,11 @@ export interface PresenterFieldMeta {
|
|
|
80
65
|
name: string;
|
|
81
66
|
/** Inferred return type name: 'string', 'number', 'boolean', or a class name. */
|
|
82
67
|
returnType?: string;
|
|
83
|
-
/**
|
|
84
|
-
* The field emits a LIST per row — `tags(posts: Post[]): string[][]`.
|
|
85
|
-
*
|
|
86
|
-
* The method answers one value per row, so the outer array level of its return type is
|
|
87
|
-
* the page, not the field: what remains after removing it is the field's own arity.
|
|
88
|
-
* Nothing measured that remainder, so a computed list and a computed scalar looked
|
|
89
|
-
* identical and every projection announced the scalar.
|
|
90
|
-
*/
|
|
68
|
+
/** The field emits a LIST per row — `tags(posts: Post[]): string[][]`. */
|
|
91
69
|
list?: boolean;
|
|
92
70
|
/** Whether the return is nullable. */
|
|
93
71
|
nullable?: boolean;
|
|
94
|
-
/**
|
|
95
|
-
* The declared parameters AFTER the rows. Kept raw rather than resolved: the scan
|
|
96
|
-
* meets presenters before collectors, so the plan is computed at boot where the
|
|
97
|
-
* collector names are known — exactly as a handler op's is.
|
|
98
|
-
*
|
|
99
|
-
* A computed field that declares `user?: User` is then fed by the collector
|
|
100
|
-
* that resolves one. A presenter is not a second mechanism.
|
|
101
|
-
*/
|
|
72
|
+
/** The declared parameters AFTER the rows. */
|
|
102
73
|
params?: Param[];
|
|
103
74
|
}
|
|
104
75
|
/** A discovered presenter (computed fields for an entity's output). */
|
|
@@ -112,10 +83,8 @@ export interface PresenterEntry {
|
|
|
112
83
|
/** Per-field type metadata (inferred from source via parser). */
|
|
113
84
|
fieldMeta: PresenterFieldMeta[];
|
|
114
85
|
/**
|
|
115
|
-
* The view each computed field emits, when the presenter declares one
|
|
116
|
-
*
|
|
117
|
-
* parser reads a scalar off a return type and nothing more, so an object-valued field
|
|
118
|
-
* has no derivable shape without this.
|
|
86
|
+
* The view each computed field emits, when the presenter declares one (`Presenter(Order, {
|
|
87
|
+
* items: [OrderItemView] })`).
|
|
119
88
|
*/
|
|
120
89
|
views?: PresenterViews;
|
|
121
90
|
/** Constructor dependency type names (from AST scan). */
|
|
@@ -161,18 +130,14 @@ export interface FrondDescriptor {
|
|
|
161
130
|
presenters: PresenterEntry[];
|
|
162
131
|
collectors: CollectorEntry[];
|
|
163
132
|
seeds: SeedEntry[];
|
|
164
|
-
/**
|
|
133
|
+
/**
|
|
134
|
+
* Per-surface entity lists from frond.config.ts (e.g. { graphql: ['Post'], rest: ['Post',
|
|
135
|
+
* 'Author'] }).
|
|
136
|
+
*/
|
|
165
137
|
surfaces?: Record<string, string[]>;
|
|
166
138
|
/** Entities this frond may read across sources — see `FrondConfig.reads`. */
|
|
167
139
|
reads?: string[];
|
|
168
|
-
/**
|
|
169
|
-
* Per-operation overrides from frond.config.ts. Key = operation name.
|
|
170
|
-
*
|
|
171
|
-
* Two depths, as declared on {@link OperationOverride}: the surface keys travel to the
|
|
172
|
-
* transport adapters, the contract keys (`input`/`output`/`binding`) travel to the
|
|
173
|
-
* façade — where config is the third producer of an operation's contract, alongside a
|
|
174
|
-
* prefab's `__ops` and the scan.
|
|
175
|
-
*/
|
|
140
|
+
/** Per-operation overrides from frond.config.ts. */
|
|
176
141
|
operationsOverrides?: Record<string, OperationContract & {
|
|
177
142
|
kind?: 'query' | 'command';
|
|
178
143
|
/** Class name to resolve from DI (overrides default `{Entity}Handler` lookup). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frond.d.ts","sourceRoot":"","sources":["../../src/descriptor/frond.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"frond.d.ts","sourceRoot":"","sources":["../../src/descriptor/frond.ts"],"names":[],"mappings":"AA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G,WAAW,CAAC;IAC9C,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,yEAAyE;AACzE,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;AAElG,mCAAmC;AACnC,MAAM,WAAW,WAAW;IAC1B,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,EAAE,aAAa,EAAE,CAAC;IAC3B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACpC,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,oDAAoD;IACpD,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,GAAG;QACvD,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAC3B,kFAAkF;QAClF,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,iEAAiE;QACjE,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;CACJ"}
|
package/dist/descriptor/frond.js
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* The key a provider answers under. What the source said, and the class's own name only
|
|
3
|
+
* where nobody wrote it down — a statement is read as code, and code can say it.
|
|
4
|
+
*/
|
|
5
|
+
export const nameOf = (provider) => provider.name ?? provider.ctor.name;
|
|
2
6
|
//# sourceMappingURL=frond.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frond.js","sourceRoot":"","sources":["../../src/descriptor/frond.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"frond.js","sourceRoot":"","sources":["../../src/descriptor/frond.ts"],"names":[],"mappings":"AAyBA;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,QAAuB,EAAU,EAAE,CAAC,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { InvocationContext } from '../
|
|
1
|
+
import type { InvocationContext } from '../wire/Invocation.js';
|
|
2
2
|
import type { BindingPlan } from '../wire/binding.js';
|
|
3
3
|
export interface CollectorResolver {
|
|
4
4
|
collect(ctx: InvocationContext): Promise<unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArgumentResolver.d.ts","sourceRoot":"","sources":["../../src/dispatch/ArgumentResolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ArgumentResolver.d.ts","sourceRoot":"","sources":["../../src/dispatch/ArgumentResolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACnD;AAED,MAAM,MAAM,eAAe,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,iBAAiB,GAAG,SAAS,CAAC;AAElF,4EAA4E;AAC5E,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC;gBAAX,UAAU,CAAC,EAAE,eAAe,YAAA;IAEnD,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAiD7E"}
|
|
@@ -34,15 +34,15 @@ export class ArgumentResolver {
|
|
|
34
34
|
}
|
|
35
35
|
case 'fact': {
|
|
36
36
|
// A fact IS the payload — the whole of what happened, never a piece of it.
|
|
37
|
-
// Identical to `
|
|
38
|
-
// agree by coincidence, not by rule, and the day `
|
|
37
|
+
// Identical to `input` today, and deliberately not sharing its branch: the two
|
|
38
|
+
// agree by coincidence, not by rule, and the day `input` learns to look up a
|
|
39
39
|
// value by parameter name a subscriber would receive ONE FIELD of the fact it
|
|
40
40
|
// subscribed to. Splitting it costs nothing and removes that trap.
|
|
41
|
-
args.push(ctx.
|
|
41
|
+
args.push(ctx.input);
|
|
42
42
|
break;
|
|
43
43
|
}
|
|
44
|
-
case '
|
|
45
|
-
args.push(ctx.
|
|
44
|
+
case 'input': {
|
|
45
|
+
args.push(ctx.input);
|
|
46
46
|
break;
|
|
47
47
|
}
|
|
48
48
|
case 'query': {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArgumentResolver.js","sourceRoot":"","sources":["../../src/dispatch/ArgumentResolver.ts"],"names":[],"mappings":"AASA,4EAA4E;AAC5E,MAAM,OAAO,gBAAgB;IACE;IAA7B,YAA6B,UAA4B;QAA5B,eAAU,GAAV,UAAU,CAAkB;IAAG,CAAC;IAE7D,KAAK,CAAC,OAAO,CAAC,IAAiB,EAAE,GAAsB;QACrD,MAAM,IAAI,GAAc,EAAE,CAAC;QAE3B,KAAK,MAAM,OAAO,IAAI,IAAI,EAAE,CAAC;YAC3B,QAAQ,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;gBAC5B,KAAK,WAAW,CAAC,CAAC,C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AM,KAAK,SAAS;wBAAE,GAAG,GAAG,GAAG,KAAK,MAAM,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,IAAI,CAAC;oBAC5G,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;oBACf,MAAM;gBACR,CAAC;gBACD,KAAK,MAAM,CAAC,CAAC,CAAC;oBACZ,2EAA2E;oBAC3E,+EAA+E;oBAC/E,6EAA6E;oBAC7E,8EAA8E;oBAC9E,mEAAmE;oBACnE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;oBACrB,MAAM;gBACR,CAAC;gBACD,KAAK,OAAO,CAAC,CAAC,CAAC;oBACb,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;oBACrB,MAAM;gBACR,CAAC;gBACD,KAAK,OAAO,CAAC,CAAC,CAAC;oBACb,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;oBACrB,MAAM;gBACR,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Call } from '../
|
|
2
|
-
import type { RouteKind } from '../
|
|
1
|
+
import type { Call } from '../wire/call.js';
|
|
2
|
+
import type { RouteKind } from '../wire/RouteAddress.js';
|
|
3
3
|
export type DispatchStage = 'received' | 'resolved' | 'completed' | 'failed' | 'settled';
|
|
4
4
|
/** Immutable transition observed across one dispatch lifecycle. */
|
|
5
5
|
export declare class DispatchEvent {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DispatchEvent.d.ts","sourceRoot":"","sources":["../../src/dispatch/DispatchEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"DispatchEvent.d.ts","sourceRoot":"","sources":["../../src/dispatch/DispatchEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEzF,mEAAmE;AACnE,qBAAa,aAAa;IAEtB,QAAQ,CAAC,KAAK,EAAE,aAAa;IAC7B,QAAQ,CAAC,IAAI,EAAE,IAAI;IACnB,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO;IAJ1B,OAAO;IASP,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,aAAa;IAI1C,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,GAAG,aAAa;IAIhE,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,GAAG,aAAa;IAIjE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,SAAS,GAAG,aAAa;IAI/E,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,CAAC,EAAE,SAAS,GAAG,aAAa;CAGjE;AAED,MAAM,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC"}
|
|
@@ -4,13 +4,7 @@ export declare class DispatchLifecycle {
|
|
|
4
4
|
private readonly diagnose;
|
|
5
5
|
private readonly observers;
|
|
6
6
|
constructor(observers?: readonly DispatchObserver[], diagnose?: (error: unknown, event: DispatchEvent) => void);
|
|
7
|
-
/**
|
|
8
|
-
* Subscribe after the dispatcher was built, and get the unsubscription back.
|
|
9
|
-
*
|
|
10
|
-
* The list used to be settled at construction, so only the caller of `createApp` could
|
|
11
|
-
* observe — an extension, which runs in `up(app)`, could not. `app.use` already adds a
|
|
12
|
-
* middleware this late; this is its dual, and the pair is *participate* / *watch*.
|
|
13
|
-
*/
|
|
7
|
+
/** Subscribe after the dispatcher was built, and get the unsubscription back. */
|
|
14
8
|
add(observer: DispatchObserver): () => void;
|
|
15
9
|
publish(event: DispatchEvent): void;
|
|
16
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DispatchLifecycle.d.ts","sourceRoot":"","sources":["../../src/dispatch/DispatchLifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE1E,kFAAkF;AAClF,qBAAa,iBAAiB;IAK1B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAJ3B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqB;gBAG7C,SAAS,GAAE,SAAS,gBAAgB,EAAO,EAC1B,QAAQ,GAAE,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,KAAK,IAAe;IAKtF
|
|
1
|
+
{"version":3,"file":"DispatchLifecycle.d.ts","sourceRoot":"","sources":["../../src/dispatch/DispatchLifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE1E,kFAAkF;AAClF,qBAAa,iBAAiB;IAK1B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAJ3B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqB;gBAG7C,SAAS,GAAE,SAAS,gBAAgB,EAAO,EAC1B,QAAQ,GAAE,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,KAAK,IAAe;IAKtF,iFAAiF;IACjF,GAAG,CAAC,QAAQ,EAAE,gBAAgB,GAAG,MAAM,IAAI;IAS3C,OAAO,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;CAapC"}
|