@fougere/core 0.6.0-alpha.0 → 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 +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 +3 -15
- 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 +3 -10
- package/dist/boot/boot.js.map +1 -1
- package/dist/boot/bootstrap.d.ts.map +1 -1
- package/dist/boot/bootstrap.js +61 -127
- 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 +20 -54
- 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 +28 -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 +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 +6 -36
- package/dist/declare.d.ts.map +1 -1
- package/dist/declare.js +4 -29
- 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 +14 -63
- package/dist/descriptor/frond.d.ts.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 +8 -7
- package/dist/dispatch/StorageGuard.d.ts.map +1 -1
- package/dist/dispatch/StorageGuard.js +61 -18
- 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/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 +4 -38
- 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 +28 -127
- package/dist/scan/scanner.js.map +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 +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 +146 -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/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 +3 -15
- package/src/boot/auth.ts +2 -12
- package/src/boot/boot.ts +5 -20
- package/src/boot/bootstrap.ts +69 -136
- package/src/boot/card.ts +4 -33
- package/src/boot/frame.ts +28 -62
- 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 +28 -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 +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/declare.ts +8 -39
- package/src/define.ts +2 -3
- package/src/descriptor/Fronds.ts +6 -31
- package/src/descriptor/frond.ts +14 -63
- 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 +70 -18
- 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/conventions.ts +6 -40
- package/src/scan/emit.ts +4 -38
- package/src/scan/handler-parser.ts +27 -96
- package/src/scan/result.ts +3 -16
- package/src/scan/scanner.ts +27 -126
- package/src/scan/statement.ts +4 -30
- package/src/source.ts +44 -0
- package/src/storage.ts +14 -234
- package/src/store.ts +152 -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/verify.d.ts
CHANGED
|
@@ -1,22 +1,9 @@
|
|
|
1
1
|
import type { FrondDescriptor } from './descriptor/frond.js';
|
|
2
|
-
/**
|
|
3
|
-
* What a rule found in an app.
|
|
4
|
-
*
|
|
5
|
-
* `message` is the sentence the rule replaces — the prose a human used to have
|
|
6
|
-
* to remember. `Known issues` says "Keep collectors in the consuming frond";
|
|
7
|
-
* this is that sentence, told about a specific handler, by something that runs.
|
|
8
|
-
*/
|
|
2
|
+
/** What a rule found in an app. */
|
|
9
3
|
export interface Violation {
|
|
10
4
|
/** Rule name, stable — 'cross-frond-dependency'. */
|
|
11
5
|
rule: string;
|
|
12
|
-
/**
|
|
13
|
-
* What it costs, decided by the rule that raises it — never by whoever renders it.
|
|
14
|
-
*
|
|
15
|
-
* The two rules here are not the same animal: a cross-frond dependency resolves
|
|
16
|
-
* today and stops resolving the day the other frond answers over the wire, while a
|
|
17
|
-
* collector declared elsewhere is already wrong in one process. A reader holding a
|
|
18
|
-
* table of rule names would be a second opinion on a fact the rule already has.
|
|
19
|
-
*/
|
|
6
|
+
/** What it costs, decided by the rule that raises it — never by whoever renders it. */
|
|
20
7
|
severity: 'blocking' | 'warning';
|
|
21
8
|
/** The frond the subject lives in. */
|
|
22
9
|
frond: string;
|
|
@@ -24,15 +11,7 @@ export interface Violation {
|
|
|
24
11
|
subject: string;
|
|
25
12
|
/** Where to go and look. */
|
|
26
13
|
filePath: string;
|
|
27
|
-
/**
|
|
28
|
-
* What the subject reaches for, and where it actually lives.
|
|
29
|
-
*
|
|
30
|
-
* `frond` above is the CONSUMER; the target used to exist only inside the
|
|
31
|
-
* sentence. A reader that has to parse prose to learn which frond a violation
|
|
32
|
-
* points at is a second opinion on a fact the checker already held — so the
|
|
33
|
-
* boot can ask "does this violation target a frond named in `remotes:`?" by
|
|
34
|
-
* reading a field.
|
|
35
|
-
*/
|
|
14
|
+
/** What the subject reaches for, and where it actually lives. */
|
|
36
15
|
dependsOn: {
|
|
37
16
|
key: string;
|
|
38
17
|
frond: string;
|
|
@@ -42,20 +21,8 @@ export interface Violation {
|
|
|
42
21
|
message: string;
|
|
43
22
|
}
|
|
44
23
|
/**
|
|
45
|
-
* Does this app survive being split?
|
|
46
|
-
*
|
|
47
|
-
* A frond runs in-process or in its own process behind JSON-RPC with identical
|
|
48
|
-
* user code — that is the whole claim. What the claim does not say is that
|
|
49
|
-
* *every* app survives the move: a dependency that crosses a frond boundary
|
|
50
|
-
* resolves today because both scopes live in one container, and resolves to
|
|
51
|
-
* nothing the day the other frond answers over the wire.
|
|
52
|
-
*
|
|
53
|
-
* The question only exists where a module boundary is meant to become a process
|
|
54
|
-
* boundary later. Where every inter-module call is already remote there is
|
|
55
|
-
* nothing to check, and where no exit is planned there is nothing to check
|
|
56
|
-
* either. Here it means something, and until now it had no answer.
|
|
57
|
-
*
|
|
58
|
-
* Pure over `app.fronds`: no mount, no process, no file. Call it from a test.
|
|
24
|
+
* Does this app survive being split? A frond runs in-process or in its own process behind JSON-RPC
|
|
25
|
+
* with identical user code — that is the whole claim.
|
|
59
26
|
*/
|
|
60
27
|
export declare function verify(app: {
|
|
61
28
|
fronds: readonly FrondDescriptor[];
|
package/dist/verify.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../src/verify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAO7D
|
|
1
|
+
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../src/verify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAO7D,mCAAmC;AACnC,MAAM,WAAW,SAAS;IACxB,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,uFAAuF;IACvF,QAAQ,EAAE,UAAU,GAAG,SAAS,CAAC;IACjC,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,4BAA4B;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,iEAAiE;IACjE,SAAS,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACxD,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAC;CACjB;AAgCD;;;GAGG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE;IAAE,MAAM,EAAE,SAAS,eAAe,EAAE,CAAA;CAAE,GAAG,SAAS,EAAE,CAiF/E;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE;IAAE,MAAM,EAAE,SAAS,eAAe,EAAE,CAAA;CAAE,GAAG,IAAI,CAKlF"}
|
package/dist/verify.js
CHANGED
|
@@ -4,33 +4,25 @@ import { storageKeyOf } from './storage.js';
|
|
|
4
4
|
import { presenterKeyOf } from './prefab/presenter.js';
|
|
5
5
|
import { collectorKeyOf } from './prefab/collector.js';
|
|
6
6
|
/**
|
|
7
|
-
* The container keys a frond registers in its own scope, keyed as a handler's
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* Every key comes from the function that states it, never from a derivation
|
|
11
|
-
* respelled here: a second reader that spells one differently finds nothing and
|
|
12
|
-
* reports nothing wrong, which is the failure mode a checker must not have.
|
|
7
|
+
* The container keys a frond registers in its own scope, keyed as a handler's `deps` spell them —
|
|
8
|
+
* DI resolves by type name, so both sides are PascalCase.
|
|
13
9
|
*/
|
|
14
10
|
function registrationsOf(frond) {
|
|
15
11
|
const out = new Map();
|
|
16
12
|
const put = (key, kind) => out.set(key, { frond: frond.name, kind });
|
|
17
|
-
for (const
|
|
18
|
-
put(
|
|
19
|
-
for (const
|
|
20
|
-
put(presenterKeyOf(
|
|
21
|
-
for (const
|
|
22
|
-
put(collectorKeyOf(
|
|
13
|
+
for (const provider of frond.providers)
|
|
14
|
+
put(provider.ctor.name, 'provider');
|
|
15
|
+
for (const presenter of frond.presenters)
|
|
16
|
+
put(presenterKeyOf(presenter.entityName), 'presenter');
|
|
17
|
+
for (const collector of frond.collectors)
|
|
18
|
+
put(collectorKeyOf(collector.typeName), 'collector');
|
|
23
19
|
for (const e of frond.entities) {
|
|
24
20
|
put(storageKeyOf(e.name), 'storage');
|
|
25
21
|
put(repositoryKeyOf(e.name), 'repository');
|
|
26
22
|
}
|
|
27
23
|
return out;
|
|
28
24
|
}
|
|
29
|
-
/**
|
|
30
|
-
* Everything in a frond that is constructed by DI, so carries `deps`.
|
|
31
|
-
* Handlers, presenters and collectors are all built from a constructor whose
|
|
32
|
-
* argument types the scan read; each one can therefore reach across.
|
|
33
|
-
*/
|
|
25
|
+
/** Everything in a frond that is constructed by DI, so carries `deps`. */
|
|
34
26
|
function injectablesOf(frond) {
|
|
35
27
|
return [
|
|
36
28
|
...frond.handlers.map((h) => ({ name: h.ctor.name, deps: h.deps, filePath: h.filePath })),
|
|
@@ -39,20 +31,8 @@ function injectablesOf(frond) {
|
|
|
39
31
|
];
|
|
40
32
|
}
|
|
41
33
|
/**
|
|
42
|
-
* Does this app survive being split?
|
|
43
|
-
*
|
|
44
|
-
* A frond runs in-process or in its own process behind JSON-RPC with identical
|
|
45
|
-
* user code — that is the whole claim. What the claim does not say is that
|
|
46
|
-
* *every* app survives the move: a dependency that crosses a frond boundary
|
|
47
|
-
* resolves today because both scopes live in one container, and resolves to
|
|
48
|
-
* nothing the day the other frond answers over the wire.
|
|
49
|
-
*
|
|
50
|
-
* The question only exists where a module boundary is meant to become a process
|
|
51
|
-
* boundary later. Where every inter-module call is already remote there is
|
|
52
|
-
* nothing to check, and where no exit is planned there is nothing to check
|
|
53
|
-
* either. Here it means something, and until now it had no answer.
|
|
54
|
-
*
|
|
55
|
-
* Pure over `app.fronds`: no mount, no process, no file. Call it from a test.
|
|
34
|
+
* Does this app survive being split? A frond runs in-process or in its own process behind JSON-RPC
|
|
35
|
+
* with identical user code — that is the whole claim.
|
|
56
36
|
*/
|
|
57
37
|
export function verify(app) {
|
|
58
38
|
const index = new Map();
|
|
@@ -65,8 +45,8 @@ export function verify(app) {
|
|
|
65
45
|
// they need their own index and their own rule.
|
|
66
46
|
const collectorFronds = new Map();
|
|
67
47
|
for (const frond of app.fronds) {
|
|
68
|
-
for (const
|
|
69
|
-
collectorFronds.set(
|
|
48
|
+
for (const collector of frond.collectors)
|
|
49
|
+
collectorFronds.set(collector.typeName, frond.name);
|
|
70
50
|
}
|
|
71
51
|
const violations = [];
|
|
72
52
|
for (const frond of app.fronds) {
|
|
@@ -99,8 +79,8 @@ export function verify(app) {
|
|
|
99
79
|
}
|
|
100
80
|
// Rule 2 — an operation parameter that wanted a collector this frond has not
|
|
101
81
|
// got. The preliminary binding convention can only see this frond's collector
|
|
102
|
-
// set, so it produces
|
|
103
|
-
// before boot: another frond's collector proves the provenance is not
|
|
82
|
+
// set, so it produces input evidence. EffectiveOperation refuses that evidence
|
|
83
|
+
// before boot: another frond's collector proves the provenance is not an input.
|
|
104
84
|
const own = new Set(frond.collectors.map((c) => c.typeName));
|
|
105
85
|
for (const handler of frond.handlers) {
|
|
106
86
|
for (const [opName, op] of handler.operations) {
|
|
@@ -112,7 +92,7 @@ export function verify(app) {
|
|
|
112
92
|
if (own.has(wanted))
|
|
113
93
|
continue;
|
|
114
94
|
const elsewhere = collectorFronds.get(wanted);
|
|
115
|
-
// No collector anywhere for that type may be an ordinary
|
|
95
|
+
// No collector anywhere for that type may be an ordinary input parameter.
|
|
116
96
|
// Only a collector that exists in the wrong place makes that interpretation
|
|
117
97
|
// provably false.
|
|
118
98
|
if (!elsewhere)
|
|
@@ -126,7 +106,7 @@ export function verify(app) {
|
|
|
126
106
|
dependsOn: { key: collectorKeyOf(wanted), frond: elsewhere, kind: 'collector' },
|
|
127
107
|
message: `'${param.name}' is typed ${param.type.name}, and the collector that produces one ` +
|
|
128
108
|
`is declared in frond '${elsewhere}'. A binding plan only sees its own frond's ` +
|
|
129
|
-
`collectors, so the preliminary
|
|
109
|
+
`collectors, so the preliminary input interpretation is invalid. Fougere refuses ` +
|
|
130
110
|
`the operation before it can receive what the caller sent. ` +
|
|
131
111
|
`Move the collector into '${frond.name}'.`,
|
|
132
112
|
});
|
package/dist/verify.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify.js","sourceRoot":"","sources":["../src/verify.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"verify.js","sourceRoot":"","sources":["../src/verify.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAuBvD;;;GAGG;AACH,SAAS,eAAe,CAAC,KAAsB;IAC7C,MAAM,GAAG,GAAG,IAAI,GAAG,EAAwB,CAAC;IAC5C,MAAM,GAAG,GAAG,CAAC,GAAW,EAAE,IAAY,EAAE,EAAE,CAAC,GA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AAC,IAAI,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,OAAO,SAAS,CAAC,CAAC,OAAO,SAAS,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;IAClH,MAAM,IAAI,KAAK,CAAC,GAAG,UAAU,CAAC,MAAM,uDAAuD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACjH,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { RouteKind } from './RouteAddress.js';
|
|
2
|
+
/** What crosses the door. */
|
|
3
|
+
export interface CallRecord {
|
|
4
|
+
/** Monotonic, and the whole cursor protocol: a reader asks for what is above its own. */
|
|
5
|
+
seq: number;
|
|
6
|
+
frond?: string;
|
|
7
|
+
entity: string;
|
|
8
|
+
operation: string;
|
|
9
|
+
surface?: string;
|
|
10
|
+
/** Known at `resolved`, so absent on a call that never found a route. */
|
|
11
|
+
route?: RouteKind;
|
|
12
|
+
/** The traceparent the invocation carried, when one did. */
|
|
13
|
+
trace?: string;
|
|
14
|
+
/** The peer that established this call, when one did. */
|
|
15
|
+
caller?: string;
|
|
16
|
+
startedAt: number;
|
|
17
|
+
/** Known at `settled`. */
|
|
18
|
+
ms?: number;
|
|
19
|
+
verdict: 'running' | 'ok' | 'failed';
|
|
20
|
+
refusal?: {
|
|
21
|
+
code?: string;
|
|
22
|
+
message: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/** One page of the ring. */
|
|
26
|
+
export interface CallPage {
|
|
27
|
+
calls: CallRecord[];
|
|
28
|
+
cursor: number;
|
|
29
|
+
inFlight: number;
|
|
30
|
+
dropped: number;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=CallLog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CallLog.d.ts","sourceRoot":"","sources":["../../src/wire/CallLog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,6BAA6B;AAC7B,MAAM,WAAW,UAAU;IACzB,yFAAyF;IACzF,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yEAAyE;IACzE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,0BAA0B;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,SAAS,GAAG,IAAI,GAAG,QAAQ,CAAC;IACrC,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9C;AAED,4BAA4B;AAC5B,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CallLog.js","sourceRoot":"","sources":["../../src/
|
|
1
|
+
{"version":3,"file":"CallLog.js","sourceRoot":"","sources":["../../src/wire/CallLog.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface InvocationContext {
|
|
2
|
+
params: Record<string, unknown>;
|
|
3
|
+
query: Record<string, unknown>;
|
|
4
|
+
input: unknown;
|
|
5
|
+
state: Record<string, unknown>;
|
|
6
|
+
trace?: string;
|
|
7
|
+
identity?: string;
|
|
8
|
+
caller?: string;
|
|
9
|
+
}
|
|
10
|
+
export type PartialInvocation = Partial<InvocationContext>;
|
|
11
|
+
/** Canonical invocation shared by every entry and transport. */
|
|
12
|
+
export declare class Invocation implements InvocationContext {
|
|
13
|
+
readonly params: Record<string, unknown>;
|
|
14
|
+
readonly query: Record<string, unknown>;
|
|
15
|
+
readonly input: unknown;
|
|
16
|
+
readonly state: Record<string, unknown>;
|
|
17
|
+
readonly trace?: string;
|
|
18
|
+
readonly identity?: string;
|
|
19
|
+
readonly caller?: string;
|
|
20
|
+
/** Gives every entry and every transport the same seven-member value, frozen. */
|
|
21
|
+
private constructor();
|
|
22
|
+
/** Takes a raw object or an invocation, so a caller never has to know which it holds. */
|
|
23
|
+
static from(context?: PartialInvocation): Invocation;
|
|
24
|
+
/** Replaces the input — how the façade hands on the value it parsed. */
|
|
25
|
+
withInput(input: unknown): Invocation;
|
|
26
|
+
/** Replaces the host-owned state, which a middleware enriches before the handler runs. */
|
|
27
|
+
withState(state: Record<string, unknown>): Invocation;
|
|
28
|
+
}
|
|
29
|
+
export declare const EMPTY_INVOCATION: Invocation;
|
|
30
|
+
/** Names the same gesture as `Invocation.from` for callers that read better this way. */
|
|
31
|
+
export declare function canonicalInvocation(context?: PartialInvocation): Invocation;
|
|
32
|
+
//# sourceMappingURL=Invocation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Invocation.d.ts","sourceRoot":"","sources":["../../src/wire/Invocation.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAuB3D,gEAAgE;AAChE,qBAAa,UAAW,YAAW,iBAAiB;IAClD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEzB,iFAAiF;IACjF,OAAO;IAaP,yFAAyF;IACzF,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,UAAU;IAIpD,wEAAwE;IACxE,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU;IAIrC,0FAA0F;IAC1F,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,UAAU;CAGtD;AAED,eAAO,MAAM,gBAAgB,YAAoB,CAAC;AAElD,yFAAyF;AACzF,wBAAgB,mBAAmB,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,UAAU,CAE3E"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/** Freezes plain data deeply, and leaves a class instance alone — a `Date` is not a record. */
|
|
2
|
+
function canonicalValue(value) {
|
|
3
|
+
if (value === null || value === undefined || typeof value !== 'object')
|
|
4
|
+
return value;
|
|
5
|
+
if (Array.isArray(value))
|
|
6
|
+
return Object.freeze(value.map(canonicalValue));
|
|
7
|
+
const prototype = Object.getPrototypeOf(value);
|
|
8
|
+
if (prototype !== Object.prototype && prototype !== null)
|
|
9
|
+
return value;
|
|
10
|
+
return canonicalRecord(value);
|
|
11
|
+
}
|
|
12
|
+
/** Drops the keys set to `undefined`, so an input and its JSON round-trip agree. */
|
|
13
|
+
function canonicalRecord(value) {
|
|
14
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
15
|
+
return Object.freeze({});
|
|
16
|
+
const result = {};
|
|
17
|
+
for (const [key, member] of Object.entries(value)) {
|
|
18
|
+
if (member !== undefined)
|
|
19
|
+
result[key] = canonicalValue(member);
|
|
20
|
+
}
|
|
21
|
+
return Object.freeze(result);
|
|
22
|
+
}
|
|
23
|
+
/** Canonical invocation shared by every entry and transport. */
|
|
24
|
+
export class Invocation {
|
|
25
|
+
params;
|
|
26
|
+
query;
|
|
27
|
+
input;
|
|
28
|
+
state;
|
|
29
|
+
trace;
|
|
30
|
+
identity;
|
|
31
|
+
caller;
|
|
32
|
+
/** Gives every entry and every transport the same seven-member value, frozen. */
|
|
33
|
+
constructor(context) {
|
|
34
|
+
this.params = canonicalRecord(context.params);
|
|
35
|
+
this.query = canonicalRecord(context.query);
|
|
36
|
+
this.input = canonicalValue(context.input);
|
|
37
|
+
// State is host-owned and may still be enriched by existing middlewares. Moving it
|
|
38
|
+
// to immutable lifecycle context is a separate migration.
|
|
39
|
+
this.state = context.state ?? {};
|
|
40
|
+
if (context.trace !== undefined)
|
|
41
|
+
this.trace = context.trace;
|
|
42
|
+
if (context.identity !== undefined)
|
|
43
|
+
this.identity = context.identity;
|
|
44
|
+
if (context.caller !== undefined)
|
|
45
|
+
this.caller = context.caller;
|
|
46
|
+
Object.freeze(this);
|
|
47
|
+
}
|
|
48
|
+
/** Takes a raw object or an invocation, so a caller never has to know which it holds. */
|
|
49
|
+
static from(context) {
|
|
50
|
+
return context instanceof Invocation ? context : new Invocation(context ?? {});
|
|
51
|
+
}
|
|
52
|
+
/** Replaces the input — how the façade hands on the value it parsed. */
|
|
53
|
+
withInput(input) {
|
|
54
|
+
return new Invocation({ ...this, input });
|
|
55
|
+
}
|
|
56
|
+
/** Replaces the host-owned state, which a middleware enriches before the handler runs. */
|
|
57
|
+
withState(state) {
|
|
58
|
+
return new Invocation({ ...this, state });
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
export const EMPTY_INVOCATION = Invocation.from();
|
|
62
|
+
/** Names the same gesture as `Invocation.from` for callers that read better this way. */
|
|
63
|
+
export function canonicalInvocation(context) {
|
|
64
|
+
return Invocation.from(context);
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=Invocation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Invocation.js","sourceRoot":"","sources":["../../src/wire/Invocation.ts"],"names":[],"mappings":"AAYA,+FAA+F;AAC/F,SAAS,cAAc,CAAC,KAAc;IACpC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACrF,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC;IAE1E,MAAM,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC/C,IAAI,SAAS,KAAK,MAAM,CAAC,SAAS,IAAI,SAAS,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IACvE,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;AAChC,CAAC;AAED,oFAAoF;AACpF,SAAS,eAAe,CAAC,KAAc;IACrC,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAE1F,MAAM,MAAM,GAA4B,EAAE,CAAC;IAC3C,KAAK,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC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AE,CAAC,CAAC;IACjF,CAAC;IAED,wEAAwE;IACxE,SAAS,CAAC,KAAc;QACtB,OAAO,IAAI,UAAU,CAAC,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED,0FAA0F;IAC1F,SAAS,CAAC,KAA8B;QACtC,OAAO,IAAI,UAAU,CAAC,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC5C,CAAC;CACF;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC;AAElD,yFAAyF;AACzF,MAAM,UAAU,mBAAmB,CAAC,OAA2B;IAC7D,OAAO,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -10,10 +10,15 @@ export declare class RouteAddress {
|
|
|
10
10
|
readonly entity: string;
|
|
11
11
|
readonly operation: string;
|
|
12
12
|
readonly surface?: string;
|
|
13
|
+
/** Names one callable operation, and freezes it so a registry key cannot drift. */
|
|
13
14
|
constructor(input: RouteAddressInput);
|
|
15
|
+
/** Serializes the three segments so a route can be looked up in a `Map`. */
|
|
14
16
|
key(): string;
|
|
17
|
+
/** Compares two addresses by their key, so `surface` counts as much as the operation. */
|
|
15
18
|
equals(other: RouteAddress): boolean;
|
|
19
|
+
/** Writes the address the way a log and an error message name it. */
|
|
16
20
|
toString(): string;
|
|
21
|
+
/** Sends the address over the wire without `surface: undefined` riding along. */
|
|
17
22
|
toJSON(): RouteAddressInput;
|
|
18
23
|
}
|
|
19
24
|
//# sourceMappingURL=RouteAddress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RouteAddress.d.ts","sourceRoot":"","sources":["../../src/wire/RouteAddress.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEtD,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAaD,oDAAoD;AACpD,qBAAa,YAAY;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE1B,mFAAmF;gBACvE,KAAK,EAAE,iBAAiB;IAOpC,4EAA4E;IAC5E,GAAG,IAAI,MAAM;IAIb,yFAAyF;IACzF,MAAM,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO;IAIpC,qEAAqE;IACrE,QAAQ,IAAI,MAAM;IAKlB,iFAAiF;IACjF,MAAM,IAAI,iBAAiB;CAO5B"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
/** Refuses an empty segment, so no address can be built that nothing can serve. */
|
|
1
2
|
function required(value, name) {
|
|
2
3
|
if (value.trim().length === 0)
|
|
3
4
|
throw new TypeError(`Route ${name} cannot be empty`);
|
|
4
5
|
return value;
|
|
5
6
|
}
|
|
7
|
+
/** Applies the same refusal to a segment that may be absent, but not blank. */
|
|
6
8
|
function optional(value, name) {
|
|
7
9
|
return value === undefined ? undefined : required(value, name);
|
|
8
10
|
}
|
|
@@ -11,22 +13,27 @@ export class RouteAddress {
|
|
|
11
13
|
entity;
|
|
12
14
|
operation;
|
|
13
15
|
surface;
|
|
16
|
+
/** Names one callable operation, and freezes it so a registry key cannot drift. */
|
|
14
17
|
constructor(input) {
|
|
15
18
|
this.entity = required(input.entity, 'entity');
|
|
16
19
|
this.operation = required(input.operation, 'operation');
|
|
17
20
|
this.surface = optional(input.surface, 'surface');
|
|
18
21
|
Object.freeze(this);
|
|
19
22
|
}
|
|
23
|
+
/** Serializes the three segments so a route can be looked up in a `Map`. */
|
|
20
24
|
key() {
|
|
21
25
|
return JSON.stringify([this.surface ?? null, this.entity, this.operation]);
|
|
22
26
|
}
|
|
27
|
+
/** Compares two addresses by their key, so `surface` counts as much as the operation. */
|
|
23
28
|
equals(other) {
|
|
24
29
|
return this.key() === other.key();
|
|
25
30
|
}
|
|
31
|
+
/** Writes the address the way a log and an error message name it. */
|
|
26
32
|
toString() {
|
|
27
33
|
const audience = this.surface ? `${this.surface}/` : '';
|
|
28
34
|
return `${audience}${this.entity}.${this.operation}`;
|
|
29
35
|
}
|
|
36
|
+
/** Sends the address over the wire without `surface: undefined` riding along. */
|
|
30
37
|
toJSON() {
|
|
31
38
|
return {
|
|
32
39
|
entity: this.entity,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RouteAddress.js","sourceRoot":"","sources":["../../src/wire/RouteAddress.ts"],"names":[],"mappings":"AASA,mFAAmF;AACnF,SAAS,QAAQ,CAAC,KAAa,EAAE,IAAY;IAC3C,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IAAI,SAAS,CAAC,SAAS,IAAI,kBAAkB,CAAC,CAAC;IACpF,OAAO,KAAK,CAAC;AACf,CAAC;AAED,+EAA+E;AAC/E,SAAS,QAAQ,CAAC,KAAyB,EAAE,IAAY;IACvD,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACjE,CAAC;AAED,oDAAoD;AACpD,MAAM,OAAO,YAAY;IACd,MAAM,CAAS;IACf,SAAS,CAAS;IAClB,OAAO,CAAU;IAE1B,mFAAmF;IACnF,YAAY,KAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC/C,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;QACxD,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAClD,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IAED,4EAA4E;IAC5E,GAAG;QACD,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IAC7E,CAAC;IAED,yFAAyF;IACzF,MAAM,CAAC,KAAmB;QACxB,OAAO,IAAI,CAAC,GAAG,EAAE,KAAK,KAAK,CAAC,GAAG,EAAE,CAAC;IACpC,CAAC;IAED,qEAAqE;IACrE,QAAQ;QACN,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QACxD,OAAO,GAAG,QAAQ,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;IACvD,CAAC;IAED,iFAAiF;IACjF,MAAM;QACJ,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,GAAG,CAAC,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACjE,CAAC;IACJ,CAAC;CACF"}
|
package/dist/wire/binding.d.ts
CHANGED
|
@@ -1,24 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Where each parameter of an operation gets its value — decided once at boot from the
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* The branches are ORDERED and each states why it sits where it does; the list used to
|
|
6
|
-
* be repeated here too, and it had already lost `Fact` — the one whose position is
|
|
7
|
-
* load-bearing, since the fall-through would otherwise hand it the caller's body.
|
|
2
|
+
* Where each parameter of an operation gets its value — decided once at boot from the parsed
|
|
3
|
+
* signature, replayed per call by `resolveArgs`.
|
|
8
4
|
*/
|
|
9
5
|
import type { Param } from './signature.js';
|
|
10
6
|
type ParamSource = {
|
|
11
7
|
kind: 'collector';
|
|
12
8
|
typeName: string;
|
|
13
9
|
}
|
|
14
|
-
/**
|
|
15
|
-
* `Fact<PostPublished>` — something that happened, not something a caller typed.
|
|
16
|
-
*
|
|
17
|
-
* It resolves from the body exactly like `body` does, and that is deliberate: an
|
|
18
|
-
* emission and a direct call ARE the same call, so a subscriber cannot tell them apart
|
|
19
|
-
* and does not need to. The branch exists so the PLAN says what this parameter is —
|
|
20
|
-
* that sentence is what makes the subscriber index readable without reparsing types.
|
|
21
|
-
*/
|
|
10
|
+
/** `Fact<PostPublished>` — something that happened, not something a caller typed. */
|
|
22
11
|
| {
|
|
23
12
|
kind: 'fact';
|
|
24
13
|
factName: string;
|
|
@@ -27,7 +16,7 @@ type ParamSource = {
|
|
|
27
16
|
name: string;
|
|
28
17
|
coerce?: 'number' | 'boolean';
|
|
29
18
|
} | {
|
|
30
|
-
kind: '
|
|
19
|
+
kind: 'input';
|
|
31
20
|
} | {
|
|
32
21
|
kind: 'context';
|
|
33
22
|
}
|
|
@@ -41,12 +30,7 @@ interface ParamBinding {
|
|
|
41
30
|
optional: boolean;
|
|
42
31
|
}
|
|
43
32
|
export type BindingPlan = ParamBinding[];
|
|
44
|
-
/**
|
|
45
|
-
* Build a BindingPlan from parsed method params.
|
|
46
|
-
*
|
|
47
|
-
* @param params - Parsed parameter list from AST
|
|
48
|
-
* @param collectorTypeNames - Registration keys of the types a Collector answers for
|
|
49
|
-
*/
|
|
33
|
+
/** Build a BindingPlan from parsed method params. */
|
|
50
34
|
export declare function computeBindingPlan(params: Param[], collectorTypeNames: Set<string>): BindingPlan;
|
|
51
35
|
export {};
|
|
52
36
|
//# sourceMappingURL=binding.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binding.d.ts","sourceRoot":"","sources":["../../src/wire/binding.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"binding.d.ts","sourceRoot":"","sources":["../../src/wire/binding.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAK5C,KAAK,WAAW,GACZ;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE;AACzC,qFAAqF;GACnF;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;CAAE,GAC9D;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GACjB;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE;AACrB,2EAA2E;GACzE;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAEtB,UAAU,YAAY;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,MAAM,WAAW,GAAG,YAAY,EAAE,CAAC;AAczC,qDAAqD;AACrD,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,KAAK,EAAE,EACf,kBAAkB,EAAE,GAAG,CAAC,MAAM,CAAC,GAC9B,WAAW,CA0Db"}
|
package/dist/wire/binding.js
CHANGED
|
@@ -9,21 +9,16 @@ function coercionFor(typeName) {
|
|
|
9
9
|
return undefined;
|
|
10
10
|
}
|
|
11
11
|
// ── Compute ───────────────────────────────────
|
|
12
|
-
/**
|
|
13
|
-
* Build a BindingPlan from parsed method params.
|
|
14
|
-
*
|
|
15
|
-
* @param params - Parsed parameter list from AST
|
|
16
|
-
* @param collectorTypeNames - Registration keys of the types a Collector answers for
|
|
17
|
-
*/
|
|
12
|
+
/** Build a BindingPlan from parsed method params. */
|
|
18
13
|
export function computeBindingPlan(params, collectorTypeNames) {
|
|
19
14
|
return params.map((param) => {
|
|
20
15
|
const typeName = param.type.name;
|
|
21
16
|
// `lowerFirst`, never `toLowerCase()`: the collector set is keyed the way the
|
|
22
17
|
// scan spells it, and the two agree on one word only — `AuthorUser` looked up as
|
|
23
|
-
// `authoruser` missed `authorUser` and fell through to branch 4, the request
|
|
18
|
+
// `authoruser` missed `authorUser` and fell through to branch 4, the request input.
|
|
24
19
|
const typeKey = lowerFirst(typeName);
|
|
25
20
|
// 0. Fact — `Fact<X>` names itself, so nothing has to be known in advance. It comes
|
|
26
|
-
// FIRST because branch 4 would otherwise hand it the caller's
|
|
21
|
+
// FIRST because branch 4 would otherwise hand it the caller's input under the name
|
|
27
22
|
// of something that happened.
|
|
28
23
|
const factOf = param.type.name === 'Fact' ? param.type.generics?.[0]?.name : undefined;
|
|
29
24
|
if (factOf) {
|
|
@@ -61,10 +56,10 @@ export function computeBindingPlan(params, collectorTypeNames) {
|
|
|
61
56
|
optional: param.optional ?? false,
|
|
62
57
|
};
|
|
63
58
|
}
|
|
64
|
-
// 4. Everything else —
|
|
59
|
+
// 4. Everything else — input
|
|
65
60
|
return {
|
|
66
61
|
name: param.name,
|
|
67
|
-
source: { kind: '
|
|
62
|
+
source: { kind: 'input' },
|
|
68
63
|
optional: param.optional ?? false,
|
|
69
64
|
};
|
|
70
65
|
});
|
package/dist/wire/binding.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binding.js","sourceRoot":"","sources":["../../src/wire/binding.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"binding.js","sourceRoot":"","sources":["../../src/wire/binding.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAsB7C,iDAAiD;AAEjD,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,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