@fougere/core 0.5.0-alpha.1 → 0.7.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/boot/Emissions.d.ts +14 -91
- package/dist/boot/Emissions.d.ts.map +1 -1
- package/dist/boot/Emissions.js +21 -118
- package/dist/boot/Emissions.js.map +1 -1
- package/dist/boot/ambient-port.d.ts +3 -24
- package/dist/boot/ambient-port.d.ts.map +1 -1
- package/dist/boot/ambient.als.d.ts.map +1 -1
- package/dist/boot/ambient.als.js +7 -12
- package/dist/boot/ambient.als.js.map +1 -1
- package/dist/boot/ambient.queue.d.ts +2 -5
- package/dist/boot/ambient.queue.d.ts.map +1 -1
- package/dist/boot/ambient.queue.js.map +1 -1
- package/dist/boot/apply.d.ts +1 -13
- package/dist/boot/apply.d.ts.map +1 -1
- package/dist/boot/apply.js +3 -15
- package/dist/boot/apply.js.map +1 -1
- package/dist/boot/auth.d.ts +6 -16
- package/dist/boot/auth.d.ts.map +1 -1
- package/dist/boot/boot.d.ts +5 -18
- package/dist/boot/boot.d.ts.map +1 -1
- package/dist/boot/boot.js +4 -11
- package/dist/boot/boot.js.map +1 -1
- package/dist/boot/bootstrap.d.ts.map +1 -1
- package/dist/boot/bootstrap.js +106 -163
- package/dist/boot/bootstrap.js.map +1 -1
- package/dist/boot/card.d.ts +5 -0
- package/dist/boot/card.d.ts.map +1 -0
- package/dist/boot/card.js +71 -0
- package/dist/boot/card.js.map +1 -0
- package/dist/boot/frame.d.ts +8 -32
- package/dist/boot/frame.d.ts.map +1 -1
- package/dist/boot/frame.js +23 -57
- package/dist/boot/frame.js.map +1 -1
- package/dist/boot/hosted.d.ts +3 -19
- package/dist/boot/hosted.d.ts.map +1 -1
- package/dist/boot/hosted.js +12 -17
- package/dist/boot/hosted.js.map +1 -1
- package/dist/boot/ownership.d.ts +5 -36
- package/dist/boot/ownership.d.ts.map +1 -1
- package/dist/boot/ownership.js +9 -49
- package/dist/boot/ownership.js.map +1 -1
- package/dist/boot/ports.d.ts +2 -15
- package/dist/boot/ports.d.ts.map +1 -1
- package/dist/boot/ports.js +1 -14
- package/dist/boot/ports.js.map +1 -1
- package/dist/boot/remote.d.ts +5 -38
- package/dist/boot/remote.d.ts.map +1 -1
- package/dist/boot/remote.js +8 -41
- package/dist/boot/remote.js.map +1 -1
- package/dist/boot/runner.d.ts +11 -0
- package/dist/boot/runner.d.ts.map +1 -0
- package/dist/boot/runner.js +13 -0
- package/dist/boot/runner.js.map +1 -0
- package/dist/boot/seed.d.ts +5 -32
- package/dist/boot/seed.d.ts.map +1 -1
- package/dist/boot/seed.js +10 -41
- package/dist/boot/seed.js.map +1 -1
- package/dist/boot/statement-drift.d.ts +4 -22
- package/dist/boot/statement-drift.d.ts.map +1 -1
- package/dist/boot/statement-drift.js +4 -9
- package/dist/boot/statement-drift.js.map +1 -1
- package/dist/boot/together.d.ts +8 -12
- package/dist/boot/together.d.ts.map +1 -1
- package/dist/boot/together.js +28 -65
- package/dist/boot/together.js.map +1 -1
- package/dist/boot/types.d.ts +36 -180
- package/dist/boot/types.d.ts.map +1 -1
- package/dist/builtin/config.d.ts +7 -0
- package/dist/builtin/config.d.ts.map +1 -0
- package/dist/builtin/config.js +15 -0
- package/dist/builtin/config.js.map +1 -0
- package/dist/{builtins → builtin}/logger.d.ts +4 -25
- package/dist/builtin/logger.d.ts.map +1 -0
- package/dist/{builtins → builtin}/logger.js +5 -32
- package/dist/builtin/logger.js.map +1 -0
- package/dist/config-loader.d.ts +9 -67
- package/dist/config-loader.d.ts.map +1 -1
- package/dist/config-loader.js +5 -18
- package/dist/config-loader.js.map +1 -1
- package/dist/contract.d.ts +13 -31
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js +10 -26
- package/dist/contract.js.map +1 -1
- package/dist/crypto/encoding.d.ts +2 -15
- package/dist/crypto/encoding.d.ts.map +1 -1
- package/dist/crypto/encoding.js +2 -15
- package/dist/crypto/encoding.js.map +1 -1
- package/dist/crypto/node.d.ts.map +1 -1
- package/dist/crypto/node.js +1 -7
- package/dist/crypto/node.js.map +1 -1
- package/dist/crypto/port.d.ts +2 -18
- package/dist/crypto/port.d.ts.map +1 -1
- package/dist/crypto/port.js +1 -17
- package/dist/crypto/port.js.map +1 -1
- package/dist/crypto/webcrypto.d.ts.map +1 -1
- package/dist/crypto/webcrypto.js +1 -12
- package/dist/crypto/webcrypto.js.map +1 -1
- package/dist/declare.d.ts +41 -0
- package/dist/declare.d.ts.map +1 -0
- package/dist/{scan/declare.js → declare.js} +6 -31
- package/dist/declare.js.map +1 -0
- package/dist/define.d.ts +2 -3
- package/dist/define.d.ts.map +1 -1
- package/dist/define.js +2 -3
- package/dist/define.js.map +1 -1
- package/dist/descriptor/Fronds.d.ts +19 -0
- package/dist/descriptor/Fronds.d.ts.map +1 -0
- package/dist/descriptor/Fronds.js +40 -0
- package/dist/descriptor/Fronds.js.map +1 -0
- package/dist/descriptor/frond.d.ts +135 -0
- package/dist/descriptor/frond.d.ts.map +1 -0
- package/dist/{scan → descriptor}/frond.js.map +1 -1
- package/dist/dispatch/ArgumentResolver.d.ts +6 -3
- package/dist/dispatch/ArgumentResolver.d.ts.map +1 -1
- package/dist/dispatch/ArgumentResolver.js +48 -3
- package/dist/dispatch/ArgumentResolver.js.map +1 -1
- package/dist/dispatch/DispatchEvent.d.ts +2 -2
- package/dist/dispatch/DispatchEvent.d.ts.map +1 -1
- package/dist/dispatch/DispatchLifecycle.d.ts +1 -7
- package/dist/dispatch/DispatchLifecycle.d.ts.map +1 -1
- package/dist/dispatch/DispatchLifecycle.js +1 -7
- package/dist/dispatch/DispatchLifecycle.js.map +1 -1
- package/dist/dispatch/DispatchPort.d.ts +1 -1
- package/dist/dispatch/DispatchPort.d.ts.map +1 -1
- package/dist/dispatch/Dispatcher.d.ts +1 -1
- package/dist/dispatch/Dispatcher.d.ts.map +1 -1
- package/dist/dispatch/Dispatcher.js +2 -2
- package/dist/dispatch/Dispatcher.js.map +1 -1
- package/dist/{boot → dispatch}/HandlerFacade.d.ts +25 -38
- package/dist/dispatch/HandlerFacade.d.ts.map +1 -0
- package/dist/{boot → dispatch}/HandlerFacade.js +65 -74
- package/dist/dispatch/HandlerFacade.js.map +1 -0
- package/dist/dispatch/LocalRoutePolicy.d.ts +1 -1
- package/dist/dispatch/LocalRoutePolicy.d.ts.map +1 -1
- package/dist/dispatch/LocalRoutePolicy.js +4 -4
- package/dist/dispatch/LocalRoutePolicy.js.map +1 -1
- package/dist/dispatch/OperationRoute.d.ts +2 -2
- package/dist/dispatch/OperationRoute.d.ts.map +1 -1
- package/dist/dispatch/OutputView.d.ts +3 -2
- package/dist/dispatch/OutputView.d.ts.map +1 -1
- package/dist/dispatch/OutputView.js +19 -1
- package/dist/dispatch/OutputView.js.map +1 -1
- package/dist/dispatch/Route.d.ts +2 -3
- package/dist/dispatch/Route.d.ts.map +1 -1
- package/dist/dispatch/RoutePolicy.d.ts +1 -1
- package/dist/dispatch/RoutePolicy.d.ts.map +1 -1
- package/dist/dispatch/RouteRegistry.d.ts +1 -1
- package/dist/dispatch/RouteRegistry.d.ts.map +1 -1
- package/dist/dispatch/RouteRegistry.js +2 -2
- package/dist/dispatch/RouteRegistry.js.map +1 -1
- package/dist/dispatch/RouteResolver.d.ts +2 -4
- package/dist/dispatch/RouteResolver.d.ts.map +1 -1
- package/dist/dispatch/StorageGuard.d.ts +9 -8
- package/dist/dispatch/StorageGuard.d.ts.map +1 -1
- package/dist/dispatch/StorageGuard.js +66 -23
- package/dist/dispatch/StorageGuard.js.map +1 -1
- package/dist/dispatch/presenterArguments.d.ts +7 -0
- package/dist/dispatch/presenterArguments.d.ts.map +1 -0
- package/dist/dispatch/presenterArguments.js +12 -0
- package/dist/dispatch/presenterArguments.js.map +1 -0
- package/dist/dispatch/remoteRoutes.d.ts +7 -0
- package/dist/dispatch/remoteRoutes.d.ts.map +1 -0
- package/dist/dispatch/{RemoteRouteResolver.js → remoteRoutes.js} +6 -10
- package/dist/dispatch/remoteRoutes.js.map +1 -0
- package/dist/dispatch/routeNotFound.d.ts +9 -0
- package/dist/dispatch/routeNotFound.d.ts.map +1 -0
- package/dist/dispatch/routeNotFound.js +21 -0
- package/dist/dispatch/routeNotFound.js.map +1 -0
- package/dist/dispatch/validateInput.d.ts +5 -0
- package/dist/dispatch/validateInput.d.ts.map +1 -0
- package/dist/dispatch/validateInput.js +20 -0
- package/dist/dispatch/validateInput.js.map +1 -0
- package/dist/effective-operation.d.ts +6 -3
- package/dist/effective-operation.d.ts.map +1 -1
- package/dist/effective-operation.js +49 -27
- package/dist/effective-operation.js.map +1 -1
- package/dist/emit.d.ts +4 -42
- package/dist/emit.d.ts.map +1 -1
- package/dist/emit.js +3 -39
- package/dist/emit.js.map +1 -1
- package/dist/entry/facade.d.ts +8 -0
- package/dist/entry/facade.d.ts.map +1 -0
- package/dist/entry/facade.js +28 -0
- package/dist/entry/facade.js.map +1 -0
- package/dist/entry/transport.d.ts +5 -0
- package/dist/entry/transport.d.ts.map +1 -0
- package/dist/entry/transport.js +11 -0
- package/dist/entry/transport.js.map +1 -0
- package/dist/frond-config.d.ts +8 -71
- package/dist/frond-config.d.ts.map +1 -1
- package/dist/frond-config.js +1 -9
- package/dist/frond-config.js.map +1 -1
- package/dist/graph.d.ts +1 -1
- package/dist/graph.d.ts.map +1 -1
- package/dist/identity-keys.d.ts +2 -5
- package/dist/identity-keys.d.ts.map +1 -1
- package/dist/identity-keys.js +3 -16
- package/dist/identity-keys.js.map +1 -1
- package/dist/identity.d.ts +4 -30
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +11 -73
- package/dist/identity.js.map +1 -1
- package/dist/imports.d.ts +2 -8
- package/dist/imports.d.ts.map +1 -1
- package/dist/imports.js +1 -7
- package/dist/imports.js.map +1 -1
- package/dist/index.d.ts +28 -30
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -22
- package/dist/index.js.map +1 -1
- package/dist/loader.d.ts +1 -8
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +1 -8
- package/dist/loader.js.map +1 -1
- package/dist/node.d.ts +2 -11
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +2 -11
- package/dist/node.js.map +1 -1
- package/dist/prefab/collector.d.ts +1 -22
- package/dist/prefab/collector.d.ts.map +1 -1
- package/dist/prefab/collector.js +1 -22
- package/dist/prefab/collector.js.map +1 -1
- package/dist/prefab/crud.d.ts +19 -35
- package/dist/prefab/crud.d.ts.map +1 -1
- package/dist/prefab/crud.js +39 -66
- package/dist/prefab/crud.js.map +1 -1
- package/dist/prefab/mirror.d.ts +5 -27
- package/dist/prefab/mirror.d.ts.map +1 -1
- package/dist/prefab/mirror.js +6 -24
- package/dist/prefab/mirror.js.map +1 -1
- package/dist/prefab/prefab.d.ts +1 -7
- package/dist/prefab/prefab.d.ts.map +1 -1
- package/dist/prefab/prefab.js +1 -7
- package/dist/prefab/prefab.js.map +1 -1
- package/dist/prefab/presenter.d.ts +2 -36
- package/dist/prefab/presenter.d.ts.map +1 -1
- package/dist/prefab/presenter.js +2 -36
- package/dist/prefab/presenter.js.map +1 -1
- package/dist/prefab/repository.d.ts +12 -80
- package/dist/prefab/repository.d.ts.map +1 -1
- package/dist/prefab/repository.js +22 -35
- package/dist/prefab/repository.js.map +1 -1
- package/dist/scan/adapters.d.ts +3 -0
- package/dist/scan/adapters.d.ts.map +1 -0
- package/dist/scan/adapters.js +25 -0
- package/dist/scan/adapters.js.map +1 -0
- package/dist/scan/bundling.d.ts +1 -12
- package/dist/scan/bundling.d.ts.map +1 -1
- package/dist/scan/bundling.js +1 -12
- package/dist/scan/bundling.js.map +1 -1
- package/dist/scan/conventions.d.ts +6 -40
- package/dist/scan/conventions.d.ts.map +1 -1
- package/dist/scan/conventions.js +5 -34
- package/dist/scan/conventions.js.map +1 -1
- package/dist/scan/emit.d.ts +2 -6
- package/dist/scan/emit.d.ts.map +1 -1
- package/dist/scan/emit.js +5 -39
- package/dist/scan/emit.js.map +1 -1
- package/dist/scan/handler-parser.d.ts +9 -76
- package/dist/scan/handler-parser.d.ts.map +1 -1
- package/dist/scan/handler-parser.js +28 -85
- package/dist/scan/handler-parser.js.map +1 -1
- package/dist/scan/result.d.ts +28 -0
- package/dist/scan/result.d.ts.map +1 -0
- package/dist/scan/result.js +2 -0
- package/dist/scan/result.js.map +1 -0
- package/dist/scan/scanner.d.ts +3 -28
- package/dist/scan/scanner.d.ts.map +1 -1
- package/dist/scan/scanner.js +36 -135
- package/dist/scan/scanner.js.map +1 -1
- package/dist/scan/statement.d.ts +1 -1
- package/dist/scan/statement.d.ts.map +1 -1
- package/dist/scan/statement.js +4 -30
- package/dist/scan/statement.js.map +1 -1
- package/dist/source.d.ts +41 -0
- package/dist/source.d.ts.map +1 -0
- package/dist/source.js +10 -0
- package/dist/source.js.map +1 -0
- package/dist/storage.d.ts +92 -0
- package/dist/storage.d.ts.map +1 -0
- package/dist/storage.js +50 -0
- package/dist/storage.js.map +1 -0
- package/dist/store.d.ts +18 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +146 -0
- package/dist/store.js.map +1 -0
- package/dist/verify.d.ts +6 -39
- package/dist/verify.d.ts.map +1 -1
- package/dist/verify.js +19 -39
- package/dist/verify.js.map +1 -1
- package/dist/wire/CallLog.d.ts +32 -0
- package/dist/wire/CallLog.d.ts.map +1 -0
- package/dist/{contract → wire}/CallLog.js.map +1 -1
- package/dist/wire/Invocation.d.ts +32 -0
- package/dist/wire/Invocation.d.ts.map +1 -0
- package/dist/wire/Invocation.js +66 -0
- package/dist/wire/Invocation.js.map +1 -0
- package/dist/wire/RouteAddress.d.ts +24 -0
- package/dist/wire/RouteAddress.d.ts.map +1 -0
- package/dist/{contract → wire}/RouteAddress.js +7 -0
- package/dist/wire/RouteAddress.js.map +1 -0
- package/dist/wire/binding.d.ts +36 -0
- package/dist/wire/binding.d.ts.map +1 -0
- package/dist/{boot → wire}/binding.js +5 -62
- package/dist/wire/binding.js.map +1 -0
- package/dist/wire/call.d.ts +25 -172
- package/dist/wire/call.d.ts.map +1 -1
- package/dist/wire/call.js +15 -166
- package/dist/wire/call.js.map +1 -1
- package/dist/wire/drift.d.ts +3 -28
- package/dist/wire/drift.d.ts.map +1 -1
- package/dist/wire/drift.js +4 -23
- package/dist/wire/drift.js.map +1 -1
- package/dist/wire/errors.d.ts +4 -24
- package/dist/wire/errors.d.ts.map +1 -1
- package/dist/wire/errors.js +4 -24
- package/dist/wire/errors.js.map +1 -1
- package/dist/wire/http-error.d.ts +2 -13
- package/dist/wire/http-error.d.ts.map +1 -1
- package/dist/wire/http-error.js +5 -19
- package/dist/wire/http-error.js.map +1 -1
- package/dist/wire/loggerMiddleware.d.ts +2 -8
- package/dist/wire/loggerMiddleware.d.ts.map +1 -1
- package/dist/wire/loggerMiddleware.js +1 -7
- package/dist/wire/loggerMiddleware.js.map +1 -1
- package/dist/wire/middleware.d.ts +3 -7
- package/dist/wire/middleware.d.ts.map +1 -1
- package/dist/wire/middleware.js +1 -5
- package/dist/wire/middleware.js.map +1 -1
- package/dist/wire/operation.d.ts +12 -74
- package/dist/wire/operation.d.ts.map +1 -1
- package/dist/wire/operation.js +4 -66
- package/dist/wire/operation.js.map +1 -1
- package/dist/wire/signature.d.ts +37 -0
- package/dist/wire/signature.d.ts.map +1 -0
- package/dist/wire/signature.js +2 -0
- package/dist/wire/signature.js.map +1 -0
- package/package.json +3 -3
- package/src/boot/Emissions.ts +22 -119
- package/src/boot/ambient-port.ts +3 -24
- package/src/boot/ambient.als.ts +7 -12
- package/src/boot/ambient.queue.ts +2 -5
- package/src/boot/apply.ts +3 -15
- package/src/boot/auth.ts +6 -16
- package/src/boot/boot.ts +8 -23
- package/src/boot/bootstrap.ts +117 -173
- package/src/boot/card.ts +84 -0
- package/src/boot/frame.ts +31 -65
- package/src/boot/hosted.ts +15 -40
- package/src/boot/ownership.ts +14 -49
- package/src/boot/ports.ts +2 -15
- package/src/boot/remote.ts +11 -58
- package/src/boot/runner.ts +17 -0
- package/src/boot/seed.ts +11 -42
- package/src/boot/statement-drift.ts +10 -28
- package/src/boot/together.ts +38 -72
- package/src/boot/types.ts +36 -180
- package/src/{builtins → builtin}/config.ts +1 -7
- package/src/{builtins → builtin}/logger.ts +6 -39
- package/src/config-loader.ts +12 -71
- package/src/contract.ts +15 -39
- package/src/crypto/encoding.ts +2 -15
- package/src/crypto/node.ts +1 -7
- package/src/crypto/port.ts +2 -18
- package/src/crypto/webcrypto.ts +1 -12
- package/src/{scan/declare.ts → declare.ts} +11 -42
- package/src/define.ts +2 -3
- package/src/descriptor/Fronds.ts +47 -0
- package/src/descriptor/frond.ts +145 -0
- package/src/dispatch/ArgumentResolver.ts +54 -8
- package/src/dispatch/DispatchEvent.ts +2 -2
- package/src/dispatch/DispatchLifecycle.ts +1 -7
- package/src/dispatch/DispatchPort.ts +1 -1
- package/src/dispatch/Dispatcher.ts +3 -3
- package/src/dispatch/HandlerFacade.ts +231 -0
- package/src/dispatch/LocalRoutePolicy.ts +4 -4
- package/src/dispatch/OperationRoute.ts +2 -2
- package/src/dispatch/OutputView.ts +24 -2
- package/src/dispatch/Route.ts +2 -4
- package/src/dispatch/RoutePolicy.ts +1 -1
- package/src/dispatch/RouteRegistry.ts +2 -2
- package/src/dispatch/RouteResolver.ts +2 -4
- package/src/dispatch/StorageGuard.ts +75 -23
- package/src/dispatch/presenterArguments.ts +25 -0
- package/src/dispatch/{RemoteRouteResolver.ts → remoteRoutes.ts} +7 -9
- package/src/dispatch/routeNotFound.ts +33 -0
- package/src/dispatch/validateInput.ts +28 -0
- package/src/effective-operation.ts +60 -37
- package/src/emit.ts +5 -63
- package/src/entry/facade.ts +44 -0
- package/src/entry/transport.ts +16 -0
- package/src/frond-config.ts +8 -71
- package/src/graph.ts +1 -1
- package/src/identity-keys.ts +3 -16
- package/src/identity.ts +12 -80
- package/src/imports.ts +3 -32
- package/src/index.ts +28 -33
- package/src/loader.ts +2 -16
- package/src/node.ts +2 -11
- package/src/prefab/collector.ts +1 -22
- package/src/prefab/crud.ts +51 -90
- package/src/prefab/mirror.ts +9 -49
- package/src/prefab/prefab.ts +2 -21
- package/src/prefab/presenter.ts +2 -36
- package/src/prefab/repository.ts +32 -108
- package/src/scan/adapters.ts +32 -0
- package/src/scan/bundling.ts +1 -12
- package/src/scan/conventions.ts +6 -40
- package/src/scan/emit.ts +7 -43
- package/src/scan/handler-parser.ts +41 -163
- package/src/scan/result.ts +29 -0
- package/src/scan/scanner.ts +40 -138
- package/src/scan/statement.ts +6 -31
- package/src/source.ts +44 -0
- package/src/storage.ts +141 -0
- package/src/store.ts +152 -0
- package/src/verify.ts +19 -60
- package/src/wire/CallLog.ts +30 -0
- package/src/{contract → wire}/Invocation.ts +24 -17
- package/src/{contract → wire}/RouteAddress.ts +10 -0
- package/src/wire/binding.ts +102 -0
- package/src/wire/call.ts +30 -261
- package/src/wire/drift.ts +5 -30
- package/src/wire/errors.ts +4 -24
- package/src/wire/http-error.ts +5 -19
- package/src/wire/loggerMiddleware.ts +2 -8
- package/src/wire/middleware.ts +3 -7
- package/src/wire/operation.ts +13 -110
- package/src/wire/signature.ts +38 -0
- package/dist/boot/HandlerFacade.d.ts.map +0 -1
- package/dist/boot/HandlerFacade.js.map +0 -1
- package/dist/boot/binding.d.ts +0 -60
- package/dist/boot/binding.d.ts.map +0 -1
- package/dist/boot/binding.js.map +0 -1
- package/dist/builtins/config.d.ts +0 -13
- package/dist/builtins/config.d.ts.map +0 -1
- package/dist/builtins/config.js +0 -21
- package/dist/builtins/config.js.map +0 -1
- package/dist/builtins/logger.d.ts.map +0 -1
- package/dist/builtins/logger.js.map +0 -1
- package/dist/contract/Call.d.ts +0 -10
- package/dist/contract/Call.d.ts.map +0 -1
- package/dist/contract/Call.js +0 -15
- package/dist/contract/Call.js.map +0 -1
- package/dist/contract/CallLog.d.ts +0 -57
- package/dist/contract/CallLog.d.ts.map +0 -1
- package/dist/contract/Invocation.d.ts +0 -27
- package/dist/contract/Invocation.d.ts.map +0 -1
- package/dist/contract/Invocation.js +0 -59
- package/dist/contract/Invocation.js.map +0 -1
- package/dist/contract/RouteAddress.d.ts +0 -17
- package/dist/contract/RouteAddress.d.ts.map +0 -1
- package/dist/contract/RouteAddress.js.map +0 -1
- package/dist/dispatch/InputValidator.d.ts +0 -7
- package/dist/dispatch/InputValidator.d.ts.map +0 -1
- package/dist/dispatch/InputValidator.js +0 -22
- package/dist/dispatch/InputValidator.js.map +0 -1
- package/dist/dispatch/OperationExecutor.d.ts +0 -25
- package/dist/dispatch/OperationExecutor.d.ts.map +0 -1
- package/dist/dispatch/OperationExecutor.js +0 -32
- package/dist/dispatch/OperationExecutor.js.map +0 -1
- package/dist/dispatch/OutputProjector.d.ts +0 -12
- package/dist/dispatch/OutputProjector.d.ts.map +0 -1
- package/dist/dispatch/OutputProjector.js +0 -30
- package/dist/dispatch/OutputProjector.js.map +0 -1
- package/dist/dispatch/PresenterArgumentResolver.d.ts +0 -12
- package/dist/dispatch/PresenterArgumentResolver.d.ts.map +0 -1
- package/dist/dispatch/PresenterArgumentResolver.js +0 -20
- package/dist/dispatch/PresenterArgumentResolver.js.map +0 -1
- package/dist/dispatch/RemoteRouteResolver.d.ts +0 -13
- package/dist/dispatch/RemoteRouteResolver.d.ts.map +0 -1
- package/dist/dispatch/RemoteRouteResolver.js.map +0 -1
- package/dist/dispatch/RouteNotFoundError.d.ts +0 -10
- package/dist/dispatch/RouteNotFoundError.d.ts.map +0 -1
- package/dist/dispatch/RouteNotFoundError.js +0 -24
- package/dist/dispatch/RouteNotFoundError.js.map +0 -1
- package/dist/entry/DynamicFacade.d.ts +0 -10
- package/dist/entry/DynamicFacade.d.ts.map +0 -1
- package/dist/entry/DynamicFacade.js +0 -27
- package/dist/entry/DynamicFacade.js.map +0 -1
- package/dist/entry/FacadeEntry.d.ts +0 -11
- package/dist/entry/FacadeEntry.d.ts.map +0 -1
- package/dist/entry/FacadeEntry.js +0 -26
- package/dist/entry/FacadeEntry.js.map +0 -1
- package/dist/entry/TransportEntry.d.ts +0 -13
- package/dist/entry/TransportEntry.d.ts.map +0 -1
- package/dist/entry/TransportEntry.js +0 -24
- package/dist/entry/TransportEntry.js.map +0 -1
- package/dist/orm.d.ts +0 -207
- package/dist/orm.d.ts.map +0 -1
- package/dist/orm.js +0 -66
- package/dist/orm.js.map +0 -1
- package/dist/scan/Fronds.d.ts +0 -45
- package/dist/scan/Fronds.d.ts.map +0 -1
- package/dist/scan/Fronds.js +0 -66
- package/dist/scan/Fronds.js.map +0 -1
- package/dist/scan/declare.d.ts +0 -71
- package/dist/scan/declare.d.ts.map +0 -1
- package/dist/scan/declare.js.map +0 -1
- package/dist/scan/frond.d.ts +0 -224
- package/dist/scan/frond.d.ts.map +0 -1
- package/src/boot/HandlerFacade.ts +0 -242
- package/src/boot/binding.ts +0 -182
- package/src/contract/Call.ts +0 -18
- package/src/contract/CallLog.ts +0 -55
- package/src/dispatch/InputValidator.ts +0 -28
- package/src/dispatch/OperationExecutor.ts +0 -60
- package/src/dispatch/OutputProjector.ts +0 -32
- package/src/dispatch/PresenterArgumentResolver.ts +0 -25
- package/src/dispatch/RouteNotFoundError.ts +0 -29
- package/src/entry/DynamicFacade.ts +0 -28
- package/src/entry/FacadeEntry.ts +0 -32
- package/src/entry/TransportEntry.ts +0 -30
- package/src/orm.ts +0 -252
- package/src/scan/Fronds.ts +0 -73
- package/src/scan/frond.ts +0 -235
- /package/dist/{scan → descriptor}/frond.js +0 -0
- /package/dist/{contract → wire}/CallLog.js +0 -0
package/dist/wire/call.js
CHANGED
|
@@ -1,40 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
* Call contract — a frond call is a value.
|
|
3
|
-
*
|
|
4
|
-
* (frond, entity, op, invocation) → result, or a thrown FougereError.
|
|
5
|
-
* A transport is a function that executes this call elsewhere; the local
|
|
6
|
-
* runner below is the reference realization. Transports move the value,
|
|
7
|
-
* they never reshape it.
|
|
8
|
-
*/
|
|
9
|
-
import { Card } from '@fougere/schema';
|
|
10
|
-
import { factsAnnouncedBy } from '../emit.js';
|
|
1
|
+
import { Invocation } from './Invocation.js';
|
|
11
2
|
import { FougereError, ErrorCode } from './errors.js';
|
|
12
|
-
|
|
3
|
+
/** One normalized request, frozen: where it goes and what the caller supplied. */
|
|
4
|
+
export class Call {
|
|
5
|
+
address;
|
|
6
|
+
invocation;
|
|
7
|
+
constructor(address, invocation) {
|
|
8
|
+
this.address = address;
|
|
9
|
+
this.invocation = Invocation.from(invocation);
|
|
10
|
+
Object.freeze(this);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
13
|
/** Reserved namespace — calls the runner answers itself, never a façade. */
|
|
14
|
-
/**
|
|
15
|
-
* What a receiver accepts before it stops reading a body.
|
|
16
|
-
*
|
|
17
|
-
* Stated once because it was stated FOUR times — `transport/http/policy.ts` said so in its
|
|
18
|
-
* own comment ("spelled in four packages") while three doors kept their own literal, so
|
|
19
|
-
* raising the cap here used to leave three of them refusing at the old one.
|
|
20
|
-
*
|
|
21
|
-
* `@fougere/http` keeps a fourth copy on purpose: it declares no Fougere dependency at all,
|
|
22
|
-
* and giving a leaf port a dependency on the kernel to share a number is the wrong trade.
|
|
23
|
-
*/
|
|
14
|
+
/** What a receiver accepts before it stops reading an input. */
|
|
24
15
|
export const MAX_BODY_BYTES = 1024 * 1024;
|
|
25
16
|
export const RPC_ENTITY = 'rpc';
|
|
26
|
-
/**
|
|
27
|
-
* The shape a card must have to be walked — `fronds`, and each frond's `doors`.
|
|
28
|
-
*
|
|
29
|
-
* A card crosses a process boundary, so it is judged like anything else that does.
|
|
30
|
-
* The check lives beside the type because two readers walk it: the boot indexes a
|
|
31
|
-
* remote's doors, and `fougere sync` writes classes from them. `TypeError:
|
|
32
|
-
* card.fronds is not iterable` was what a malformed card produced at the boot,
|
|
33
|
-
* naming neither the remote nor the address.
|
|
34
|
-
*
|
|
35
|
-
* The descriptor behind a door is NOT checked here — `Card.toSchema` refuses it, and
|
|
36
|
-
* only where one is consumed.
|
|
37
|
-
*/
|
|
17
|
+
/** The shape a card must have to be walked — `fronds`, and each frond's `doors`. */
|
|
38
18
|
export function assertIdentityCard(value, source) {
|
|
39
19
|
const card = value;
|
|
40
20
|
const fronds = Array.isArray(card?.fronds) ? card.fronds : undefined;
|
|
@@ -56,143 +36,12 @@ function cardRefusal(source, what) {
|
|
|
56
36
|
+ ` - Check that the address serves a Fougere app, and that its version still speaks this card.`,
|
|
57
37
|
});
|
|
58
38
|
}
|
|
59
|
-
/**
|
|
60
|
-
* The container key of a façade — THE one place that spells the format.
|
|
61
|
-
*
|
|
62
|
-
* A surface is a named audience, and it is a key: `handlers/public/PostHandler.ts`
|
|
63
|
-
* registers `public:postHandler` next to the default `postHandler`. The default
|
|
64
|
-
* surface is the empty key, so callers that know nothing about surfaces keep
|
|
65
|
-
* designating exactly what they designated before.
|
|
66
|
-
*
|
|
67
|
-
* Nobody outside this package builds this string: adapters ask `app.facadeFor()`,
|
|
68
|
-
* which is why an adapter can stay structurally typed and core-free.
|
|
69
|
-
*/
|
|
39
|
+
/** The container key of a façade — THE one place that spells the format. */
|
|
70
40
|
export function facadeKeyOf(entityName, surface) {
|
|
71
41
|
return surface ? `${surface}:${entityName}Handler` : `${entityName}Handler`;
|
|
72
42
|
}
|
|
73
|
-
/**
|
|
74
|
-
* Where the contracts behind a façade live — the dual of `facadeKeyOf`.
|
|
75
|
-
*
|
|
76
|
-
* The façade answers calls; it does not say what it answers. That sentence used
|
|
77
|
-
* to be true only inside `buildFacade`, so anything asking the app what it hosts
|
|
78
|
-
* got bare names. A door and its terms are registered together, under the same
|
|
79
|
-
* audience.
|
|
80
|
-
*/
|
|
43
|
+
/** Where the contracts behind a façade live — the dual of `facadeKeyOf`. */
|
|
81
44
|
export function contractsKeyOf(entityName, surface) {
|
|
82
45
|
return `${facadeKeyOf(entityName, surface)}:contracts`;
|
|
83
46
|
}
|
|
84
|
-
/**
|
|
85
|
-
* Serialize what the app hosts, for one audience. Served on `rpc.discover`,
|
|
86
|
-
* cached by callers.
|
|
87
|
-
*
|
|
88
|
-
* Hosting means answering: an entity with no façade declares no operation, so
|
|
89
|
-
* it is not among the DOORS — publishing its shape would hand an anonymous caller
|
|
90
|
-
* the structure of tables it can never reach (the auth tables, typically), and
|
|
91
|
-
* `fougere sync` would rebuild a schema with nothing to call on it.
|
|
92
|
-
*
|
|
93
|
-
* `facts` is the one thing that shape-without-a-door rule does not cover, and the
|
|
94
|
-
* reason is the opposite of a leak: an entity nobody exposed is silent, whereas a
|
|
95
|
-
* fact was explicitly declared to leave.
|
|
96
|
-
*
|
|
97
|
-
* `surface` makes that sentence audience-aware rather than app-wide: a door
|
|
98
|
-
* answers with what IT serves. Nothing falls back to the full façade — under a
|
|
99
|
-
* named surface, an entity with no façade of its own is simply not there.
|
|
100
|
-
*/
|
|
101
|
-
export function identityCardOf(app, surface) {
|
|
102
|
-
const declared = app.fronds.schemas();
|
|
103
|
-
return {
|
|
104
|
-
fronds: app.fronds.map((frond) => {
|
|
105
|
-
// What the frond answers to, not what it stores. This walked `frond.entities`, so a
|
|
106
|
-
// handler carrying no entity — a health check, a search across shapes — was built,
|
|
107
|
-
// served, and absent from the card: `sync` could not generate its door and a remote
|
|
108
|
-
// consumer had no way to know it existed. The boot has said "pointing at nothing is
|
|
109
|
-
// legal" since handlers became the subject; the card had not caught up.
|
|
110
|
-
const byEntity = new Map(frond.entities.map((entity) => [entity.name, entity]));
|
|
111
|
-
const addresses = [...new Set([
|
|
112
|
-
...frond.entities.map((entity) => entity.name),
|
|
113
|
-
...frond.handlers.map((handler) => handler.address),
|
|
114
|
-
])];
|
|
115
|
-
return {
|
|
116
|
-
name: frond.name,
|
|
117
|
-
doors: addresses.flatMap((address) => {
|
|
118
|
-
const ops = facadeOps(app, address, surface);
|
|
119
|
-
if (ops.length === 0)
|
|
120
|
-
return [];
|
|
121
|
-
const entity = byEntity.get(address);
|
|
122
|
-
return [{
|
|
123
|
-
name: address,
|
|
124
|
-
ops,
|
|
125
|
-
// Absent when nothing of that name is stored. A door is still a door.
|
|
126
|
-
...(entity ? { schema: Card.fromSchema(entity.entityClass, address).descriptor } : {}),
|
|
127
|
-
}];
|
|
128
|
-
}),
|
|
129
|
-
/**
|
|
130
|
-
* What leaves on its own — the same list on every surface, deliberately.
|
|
131
|
-
*
|
|
132
|
-
* A door has an audience; a fact does not. `Emit<T>` names a subject and *the
|
|
133
|
-
* number of readers is not the emitter's business* (`emit.ts`), so narrowing this
|
|
134
|
-
* by `surface` would invent an axis the primitive refuses. The consequence is
|
|
135
|
-
* stated rather than hidden: a fact's SHAPE is readable by anyone who can read the
|
|
136
|
-
* card at all. What must not be published must not be announced.
|
|
137
|
-
*/
|
|
138
|
-
facts: factsAnnouncedBy(frond.handlers).map((name) => {
|
|
139
|
-
const entityClass = declared.get(name);
|
|
140
|
-
return { name, ...(entityClass ? { schema: Card.fromSchema(entityClass, name).descriptor } : {}) };
|
|
141
|
-
}),
|
|
142
|
-
};
|
|
143
|
-
}),
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
function facadeOps(app, entityName, surface) {
|
|
147
|
-
let facade;
|
|
148
|
-
try {
|
|
149
|
-
facade = app.container.resolve(facadeKeyOf(entityName, surface));
|
|
150
|
-
}
|
|
151
|
-
catch {
|
|
152
|
-
return [];
|
|
153
|
-
}
|
|
154
|
-
// The façade is the list of names; the model is the resolved terms.
|
|
155
|
-
const effective = app.operationsFor(entityName, surface);
|
|
156
|
-
if (!effective) {
|
|
157
|
-
throw new Error(`Facade '${facadeKeyOf(entityName, surface)}' exists without an effective operation table.`);
|
|
158
|
-
}
|
|
159
|
-
return Object.keys(facade).map((name) => {
|
|
160
|
-
const contract = effective.get(name);
|
|
161
|
-
if (!contract) {
|
|
162
|
-
throw new Error(`Facade '${facadeKeyOf(entityName, surface)}' serves '${name}' without an effective contract.`);
|
|
163
|
-
}
|
|
164
|
-
return {
|
|
165
|
-
name,
|
|
166
|
-
...(contract?.description && { description: contract.description }),
|
|
167
|
-
...(contract?.input && { input: Card.fromSchema(contract.input, name).descriptor }),
|
|
168
|
-
...(contract?.output && { output: Card.fromSchema(contract.output, name).descriptor }),
|
|
169
|
-
...(contract?.cardinality && { cardinality: contract.cardinality }),
|
|
170
|
-
kind: contract.kind,
|
|
171
|
-
};
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Build the local runner — the reference realization of Transport.
|
|
176
|
-
*
|
|
177
|
-
* Resolves strictly from the app's own container: a call that lands here is
|
|
178
|
-
* judged here. A miss is a typed NOT_FOUND, never a forward to another remote.
|
|
179
|
-
*/
|
|
180
|
-
export function createLocalRunner(app, surface) {
|
|
181
|
-
return createTransportEntry(app.local, surface);
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* Build the app runner — same judgment, but resolution follows the app's
|
|
185
|
-
* topology: local façades and remote doublures alike. This is the runner
|
|
186
|
-
* an app's own entry points (browser endpoint, bridges) stand on.
|
|
187
|
-
*
|
|
188
|
-
* `surface` is the audience this runner serves, and it belongs to the DOOR that
|
|
189
|
-
* builds the runner, never to the call: a caller cannot name its own audience
|
|
190
|
-
* any more than it can name its own identity (`state` is stamped server-side
|
|
191
|
-
* for the same reason). Reaching the admin door IS the proof. So `FrondCall`
|
|
192
|
-
* gains nothing and the wire format gains nothing — a remote frond's audience
|
|
193
|
-
* is simply which URL `remotes:` points at.
|
|
194
|
-
*/
|
|
195
|
-
export function createAppRunner(app, surface) {
|
|
196
|
-
return createTransportEntry(app, surface);
|
|
197
|
-
}
|
|
198
47
|
//# sourceMappingURL=call.js.map
|
package/dist/wire/call.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call.js","sourceRoot":"","sources":["../../src/wire/call.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"call.js","sourceRoot":"","sources":["../../src/wire/call.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAkD,MAAM,iBAAiB,CAAC;AAE7F,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAA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SAAS,CAAC,cAAc;QAC9B,OAAO,EACL,GAAG,MAAM,uCAAuC,IAAI,KAAK;cACvD,mGAAmG;cACnG,+FAA+F;KACpG,CAAC,CAAC;AACL,CAAC;AAWD,4EAA4E;AAC5E,MAAM,UAAU,WAAW,CAAC,UAAkB,EAAE,OAAgB;IAC9D,OAAO,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,IAAI,UAAU,SAAS,CAAC,CAAC,CAAC,GAAG,UAAU,SAAS,CAAC;AAC9E,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,cAAc,CAAC,UAAkB,EAAE,OAAgB;IACjE,OAAO,GAAG,WAAW,CAAC,UAAU,EAAE,OAAO,CAAC,YAAY,CAAC;AACzD,CAAC"}
|
package/dist/wire/drift.d.ts
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { type Change } from '@fougere/schema';
|
|
2
2
|
import type { IdentityCard } from './call.js';
|
|
3
|
-
/**
|
|
4
|
-
* What separates the copy a consumer holds from what the producer actually serves.
|
|
5
|
-
*
|
|
6
|
-
* It lives beside `IdentityCard` and not in `@fougere/testing` for the reason the card
|
|
7
|
-
* itself does: the subject is the card, and a second reader arrived — the dev panel, which
|
|
8
|
-
* must not drag a 426 KB faker in to compare two of them.
|
|
9
|
-
*/
|
|
3
|
+
/** What separates the copy a consumer holds from what the producer actually serves. */
|
|
10
4
|
export interface CardDrift {
|
|
11
5
|
frond: string;
|
|
12
6
|
/** A door the consumer calls that the producer no longer serves. */
|
|
@@ -27,29 +21,10 @@ export interface CardDrift {
|
|
|
27
21
|
changes: Change[] | 'gone';
|
|
28
22
|
}[];
|
|
29
23
|
}
|
|
30
|
-
/**
|
|
31
|
-
* What a consumer's synced copy no longer matches in what the producer serves.
|
|
32
|
-
*
|
|
33
|
-
* The gap TypeScript cannot see, and the only place the gradient genuinely lies: the code
|
|
34
|
-
* is identical in-process and split, but one side may have aged. `fougere sync` wrote the
|
|
35
|
-
* consumer's copy three weeks ago, the producer moved on, and it still compiles —
|
|
36
|
-
* production is where that is found today. This is what Pact sells; the material was
|
|
37
|
-
* already here, in `rpc.discover` and in `Card.diff`.
|
|
38
|
-
*
|
|
39
|
-
* Read in ONE direction on purpose: what the consumer holds, checked against what is
|
|
40
|
-
* served. A producer serving MORE than the consumer knows is not drift — it is a producer
|
|
41
|
-
* that moved forward without breaking anyone, which is the whole point of the order the
|
|
42
|
-
* repo already states (re-sync the readers, then deploy the sender).
|
|
43
|
-
*/
|
|
24
|
+
/** What a consumer's synced copy no longer matches in what the producer serves. */
|
|
44
25
|
export declare function driftOf(mine: IdentityCard, theirs: IdentityCard, frond: string): CardDrift;
|
|
45
26
|
/** Whether anything at all separates the two cards. */
|
|
46
27
|
export declare function agrees(drift: CardDrift): boolean;
|
|
47
|
-
/**
|
|
48
|
-
* The drift, in the words a deploy needs.
|
|
49
|
-
*
|
|
50
|
-
* A fact says the order out loud, because the repo already states it as a rule and
|
|
51
|
-
* nothing enforced it: a fact is judged strictly, so a reader that has not been re-synced
|
|
52
|
-
* refuses what the sender now announces.
|
|
53
|
-
*/
|
|
28
|
+
/** The drift, in the words a deploy needs. */
|
|
54
29
|
export declare function explain(drift: CardDrift): string[];
|
|
55
30
|
//# sourceMappingURL=drift.d.ts.map
|
package/dist/wire/drift.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drift.d.ts","sourceRoot":"","sources":["../../src/wire/drift.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAyB,MAAM,iBAAiB,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C
|
|
1
|
+
{"version":3,"file":"drift.d.ts","sourceRoot":"","sources":["../../src/wire/drift.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAyB,MAAM,iBAAiB,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,uFAAuF;AACvF,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,mEAAmE;IACnE,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,EAAE,CAAA;KAAE,EAAE,CAAC;IAC9C,gEAAgE;IAChE,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,EAAE,CAAA;KAAE,EAAE,CAAC;IAC9C,4EAA4E;IAC5E,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;KAAE,EAAE,CAAC;CACvD;AAuBD,mFAAmF;AACnF,wBAAgB,OAAO,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAgC1F;AAED,uDAAuD;AACvD,wBAAgB,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAKhD;AAED,8CAA8C;AAC9C,wBAAgB,OAAO,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,EAAE,CAYlD"}
|
package/dist/wire/drift.js
CHANGED
|
@@ -21,25 +21,12 @@ function factsOf(card, frond) {
|
|
|
21
21
|
}
|
|
22
22
|
return found;
|
|
23
23
|
}
|
|
24
|
-
/**
|
|
25
|
-
* What a consumer's synced copy no longer matches in what the producer serves.
|
|
26
|
-
*
|
|
27
|
-
* The gap TypeScript cannot see, and the only place the gradient genuinely lies: the code
|
|
28
|
-
* is identical in-process and split, but one side may have aged. `fougere sync` wrote the
|
|
29
|
-
* consumer's copy three weeks ago, the producer moved on, and it still compiles —
|
|
30
|
-
* production is where that is found today. This is what Pact sells; the material was
|
|
31
|
-
* already here, in `rpc.discover` and in `Card.diff`.
|
|
32
|
-
*
|
|
33
|
-
* Read in ONE direction on purpose: what the consumer holds, checked against what is
|
|
34
|
-
* served. A producer serving MORE than the consumer knows is not drift — it is a producer
|
|
35
|
-
* that moved forward without breaking anyone, which is the whole point of the order the
|
|
36
|
-
* repo already states (re-sync the readers, then deploy the sender).
|
|
37
|
-
*/
|
|
24
|
+
/** What a consumer's synced copy no longer matches in what the producer serves. */
|
|
38
25
|
export function driftOf(mine, theirs, frond) {
|
|
39
|
-
const
|
|
26
|
+
const mineDoors = doorsOf(mine, frond);
|
|
40
27
|
const served = doorsOf(theirs, frond);
|
|
41
28
|
const drift = { frond, missingDoors: [], missingOps: [], shapes: [], facts: [] };
|
|
42
|
-
for (const [name, door] of
|
|
29
|
+
for (const [name, door] of mineDoors) {
|
|
43
30
|
const there = served.get(name);
|
|
44
31
|
if (!there) {
|
|
45
32
|
drift.missingDoors.push(name);
|
|
@@ -80,13 +67,7 @@ export function agrees(drift) {
|
|
|
80
67
|
&& drift.shapes.length === 0
|
|
81
68
|
&& drift.facts.length === 0;
|
|
82
69
|
}
|
|
83
|
-
/**
|
|
84
|
-
* The drift, in the words a deploy needs.
|
|
85
|
-
*
|
|
86
|
-
* A fact says the order out loud, because the repo already states it as a rule and
|
|
87
|
-
* nothing enforced it: a fact is judged strictly, so a reader that has not been re-synced
|
|
88
|
-
* refuses what the sender now announces.
|
|
89
|
-
*/
|
|
70
|
+
/** The drift, in the words a deploy needs. */
|
|
90
71
|
export function explain(drift) {
|
|
91
72
|
const lines = [];
|
|
92
73
|
for (const door of drift.missingDoors)
|
package/dist/wire/drift.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drift.js","sourceRoot":"","sources":["../../src/wire/drift.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAsC,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"drift.js","sourceRoot":"","sources":["../../src/wire/drift.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAsC,MAAM,iBAAiB,CAAC;AAgB3E,q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O,GAAG,MAAM,CAAC,IAAI,MAAM,MAAM,CAAC,EAAE,EAAE,CAAC;QACvD,KAAK,SAAS,CAAC,CAAC,OAAO,GAAG,MAAM,CAAC,KAAK,KAAK,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACtG,KAAK,UAAU,CAAC,CAAC,OAAO,GAAG,MAAM,CAAC,KAAK,oBAAoB,CAAC;QAC5D,KAAK,UAAU,CAAC,CAAC,OAAO,GAAG,MAAM,CAAC,KAAK,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,WAAW,CAAC;QACzF,KAAK,UAAU,CAAC,CAAC,OAAO,GAAG,MAAM,CAAC,KAAK,SAAS,MAAM,CAAC,IAAI,QAAQ,CAAC;IACtE,CAAC;AACH,CAAC"}
|
package/dist/wire/errors.d.ts
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The error vocabulary — what a refusal IS, independently of who hears it.
|
|
3
|
-
*
|
|
4
|
-
* It travels on the wire (`toJSON`/`fromJSON`) and through the browser-safe
|
|
5
|
-
* `@fougere/core/contract`, so nothing here may know about HTTP, a logger, or a
|
|
6
|
-
* middleware chain. Its HTTP reading is one file over, in `http-error.ts`; it used
|
|
7
|
-
* to live in `middleware.ts`, which named the one concept this is not.
|
|
8
|
-
*/
|
|
1
|
+
/** The error vocabulary — what a refusal IS, independently of who hears it. */
|
|
9
2
|
import type { ValidationError } from '@fougere/schema';
|
|
10
3
|
/** Semantic error codes — transport-agnostic. Each bridge maps them to its own format. */
|
|
11
4
|
export declare enum ErrorCode {
|
|
@@ -50,25 +43,12 @@ export declare class FougereError extends Error {
|
|
|
50
43
|
code: ErrorCode;
|
|
51
44
|
message: string;
|
|
52
45
|
};
|
|
53
|
-
/**
|
|
54
|
-
* Dual of toJSON — rebuild a typed error from its wire form.
|
|
55
|
-
*
|
|
56
|
-
* Wire input is untrusted: an unknown code degrades to INTERNAL_ERROR
|
|
57
|
-
* (original code kept in details) instead of forging a fake semantic code.
|
|
58
|
-
*/
|
|
46
|
+
/** Dual of toJSON — rebuild a typed error from its wire form. */
|
|
59
47
|
static fromJSON(json: unknown): FougereError;
|
|
60
48
|
}
|
|
61
49
|
/**
|
|
62
|
-
* The refusals behind a VALIDATION_FAILED, or nothing — the ONE place that reads
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* `details` is `unknown` because it is genuinely polymorphic: `StorageGuard.judge` puts a
|
|
66
|
-
* `string[]` there under INTERNAL_ERROR, `fromJSON` puts `{ originalCode, details }`
|
|
67
|
-
* there for a code it does not know. So the shape is not the field's, it is a reading
|
|
68
|
-
* of the PAIR (code, details) — which is why this is a reader and not a narrower type.
|
|
69
|
-
*
|
|
70
|
-
* It judges rather than casts: five call sites asserted `{ path, message }[]` by hand,
|
|
71
|
-
* and a malformed VALIDATION_FAILED would have been accepted as structured refusals.
|
|
50
|
+
* The refusals behind a VALIDATION_FAILED, or nothing — the ONE place that reads `details` under
|
|
51
|
+
* that code.
|
|
72
52
|
*/
|
|
73
53
|
export declare function validationErrorsOf(error: unknown): ValidationError[] | undefined;
|
|
74
54
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/wire/errors.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/wire/errors.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAE/E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAIvD,0FAA0F;AAC1F,oBAAY,SAAS;IAEnB,iBAAiB,sBAAsB;IACvC,WAAW,gBAAgB;IAG3B,YAAY,iBAAiB;IAC7B,SAAS,cAAc;IAGvB,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,kBAAkB,uBAAuB;IAGzC,mBAAmB,wBAAwB;IAC3C,iBAAiB,sBAAsB;IACvC,oBAAoB,yBAAyB;IAC7C,iBAAiB,sBAAsB;IACvC,eAAe,oBAAoB;IAGnC,cAAc,mBAAmB;IACjC,eAAe,oBAAoB;IACnC,WAAW,gBAAgB;IAC3B,mBAAmB,wBAAwB;IAC3C,eAAe,oBAAoB;CACpC;AAID,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,qBAAa,YAAa,SAAQ,KAAK;IACrC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;gBAEf,OAAO,EAAE,mBAAmB;IASxC,MAAM;;;;;;;IAUN,iEAAiE;IACjE,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,YAAY;CAW7C;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,EAAE,GAAG,SAAS,CAWhF"}
|
package/dist/wire/errors.js
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The error vocabulary — what a refusal IS, independently of who hears it.
|
|
3
|
-
*
|
|
4
|
-
* It travels on the wire (`toJSON`/`fromJSON`) and through the browser-safe
|
|
5
|
-
* `@fougere/core/contract`, so nothing here may know about HTTP, a logger, or a
|
|
6
|
-
* middleware chain. Its HTTP reading is one file over, in `http-error.ts`; it used
|
|
7
|
-
* to live in `middleware.ts`, which named the one concept this is not.
|
|
8
|
-
*/
|
|
1
|
+
/** The error vocabulary — what a refusal IS, independently of who hears it. */
|
|
9
2
|
// ── ErrorCode ──────────────────────────────────
|
|
10
3
|
/** Semantic error codes — transport-agnostic. Each bridge maps them to its own format. */
|
|
11
4
|
export var ErrorCode;
|
|
@@ -57,12 +50,7 @@ export class FougereError extends Error {
|
|
|
57
50
|
...(this.details !== undefined && { details: this.details }),
|
|
58
51
|
};
|
|
59
52
|
}
|
|
60
|
-
/**
|
|
61
|
-
* Dual of toJSON — rebuild a typed error from its wire form.
|
|
62
|
-
*
|
|
63
|
-
* Wire input is untrusted: an unknown code degrades to INTERNAL_ERROR
|
|
64
|
-
* (original code kept in details) instead of forging a fake semantic code.
|
|
65
|
-
*/
|
|
53
|
+
/** Dual of toJSON — rebuild a typed error from its wire form. */
|
|
66
54
|
static fromJSON(json) {
|
|
67
55
|
const raw = (typeof json === 'object' && json !== null ? json : {});
|
|
68
56
|
const known = Object.values(ErrorCode).includes(raw.code);
|
|
@@ -76,16 +64,8 @@ export class FougereError extends Error {
|
|
|
76
64
|
}
|
|
77
65
|
}
|
|
78
66
|
/**
|
|
79
|
-
* The refusals behind a VALIDATION_FAILED, or nothing — the ONE place that reads
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* `details` is `unknown` because it is genuinely polymorphic: `StorageGuard.judge` puts a
|
|
83
|
-
* `string[]` there under INTERNAL_ERROR, `fromJSON` puts `{ originalCode, details }`
|
|
84
|
-
* there for a code it does not know. So the shape is not the field's, it is a reading
|
|
85
|
-
* of the PAIR (code, details) — which is why this is a reader and not a narrower type.
|
|
86
|
-
*
|
|
87
|
-
* It judges rather than casts: five call sites asserted `{ path, message }[]` by hand,
|
|
88
|
-
* and a malformed VALIDATION_FAILED would have been accepted as structured refusals.
|
|
67
|
+
* The refusals behind a VALIDATION_FAILED, or nothing — the ONE place that reads `details` under
|
|
68
|
+
* that code.
|
|
89
69
|
*/
|
|
90
70
|
export function validationErrorsOf(error) {
|
|
91
71
|
if (!(error instanceof FougereError) || error.code !== ErrorCode.VALIDATION_FAILED)
|
package/dist/wire/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/wire/errors.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/wire/errors.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAI/E,kDAAkD;AAElD,0FAA0F;AAC1F,MAAM,CAAN,IAAY,SA6BX;AA7BD,WAAY,SAAS;IACnB,QAAQ;IACR,oDAAuC,CAAA;IACvC,wCAA2B,CAAA;IAE3B,OAAO;IACP,0CAA6B,CAAA;IAC7B,oCAAuB,CAAA;IAEvB,YAAY;IACZ,oCAAuB,CAAA;IACvB,0BAAa,CAAA;IACb,kCAAqB,CAAA;IACrB,8BAAiB,CAAA;IACjB,sDAAyC,CAAA;IAEzC,SAAS;IACT,wDAA2C,CAAA;IAC3C,oDAAuC,CAAA;IACvC,0DAA6C,CAAA;IAC7C,oDAAuC,CAAA;IACvC,gDAAmC,CAAA;IAEnC,SAAS;IACT,8CAAiC,CAAA;IACjC,gDAAmC,CAAA;IACnC,wCAA2B,CAAA;IAC3B,wDAA2C,CAAA;IAC3C,gDAAmC,CAAA;AACrC,CAAC,EA7BW,SAAS,KAAT,SAAS,QA6BpB;AAaD,MAAM,OAAO,YAAa,SAAQ,KAAK;IAC5B,IAAI,CAAY;IAChB,MAAM,CAAU;IAChB,SAAS,CAAU;IACnB,OAAO,CAAW;IAE3B,YAAY,OAA4B;QACtC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;QACjD,IAAI,CAAC,IAAI,GAAG,cAAc,CAA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AAQ,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;YAC/D,SAAS,EAAE,OAAO,GAAG,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;YACxE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE;SAChF,CAAC,CAAC;IACL,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAC/C,IAAI,CAAC,CAAC,KAAK,YAAY,YAAY,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,iBAAiB;QAAE,OAAO,SAAS,CAAC;IACrG,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAC1B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;QAAE,OAAO,SAAS,CAAC;IAC9C,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAC7B,CAAC,KAAK,EAA4B,EAAE,CAClC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;WACxC,OAAQ,KAAyB,CAAC,IAAI,KAAK,QAAQ;WACnD,OAAQ,KAAyB,CAAC,OAAO,KAAK,QAAQ,CAC5D,CAAC;IACF,OAAO,QAAQ,CAAC,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;AACnE,CAAC"}
|
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* HTTP reading of an error — used by HTTP bridges (REST, Next, Inertia).
|
|
3
|
-
*
|
|
4
|
-
* Not imported by GraphQL, CLI, or event bus bridges. The vocabulary it projects
|
|
5
|
-
* is in `errors.ts` and knows nothing of this file.
|
|
6
|
-
*/
|
|
1
|
+
/** HTTP reading of an error — used by HTTP bridges (REST, Next, Inertia). */
|
|
7
2
|
import { FougereError } from './errors.js';
|
|
8
|
-
/**
|
|
9
|
-
* Serialize an application error for an untrusted caller.
|
|
10
|
-
*
|
|
11
|
-
* Every code but INTERNAL_ERROR was written for the caller and travels whole. An
|
|
12
|
-
* INTERNAL_ERROR is replaced by a constant — and logged here, with its cause, so the
|
|
13
|
-
* sentence exists exactly once: on the server.
|
|
14
|
-
*/
|
|
3
|
+
/** Serialize an application error for an untrusted caller. */
|
|
15
4
|
export declare function toPublicError(err: FougereError): ReturnType<FougereError['toJSON']>;
|
|
16
5
|
/** Map any thrown error to `{ status, body }` for HTTP bridges. */
|
|
17
6
|
export declare function toHttpError(err: unknown): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-error.d.ts","sourceRoot":"","sources":["../../src/wire/http-error.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"http-error.d.ts","sourceRoot":"","sources":["../../src/wire/http-error.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,OAAO,EAAE,YAAY,EAAa,MAAM,aAAa,CAAC;AAmCtD,8DAA8D;AAC9D,wBAAgB,aAAa,CAAC,GAAG,EAAE,YAAY,GAAG,UAAU,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAUnF;AAED,mEAAmE;AACnE,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,UAAU,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAA;CAAE,CAYtG"}
|
package/dist/wire/http-error.js
CHANGED
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* HTTP reading of an error — used by HTTP bridges (REST, Next, Inertia).
|
|
3
|
-
*
|
|
4
|
-
* Not imported by GraphQL, CLI, or event bus bridges. The vocabulary it projects
|
|
5
|
-
* is in `errors.ts` and knows nothing of this file.
|
|
6
|
-
*/
|
|
1
|
+
/** HTTP reading of an error — used by HTTP bridges (REST, Next, Inertia). */
|
|
7
2
|
import { FougereError, ErrorCode } from './errors.js';
|
|
8
|
-
import { Logger } from '../
|
|
3
|
+
import { Logger } from '../builtin/logger.js';
|
|
9
4
|
/**
|
|
10
|
-
* An INTERNAL_ERROR is the one class of error whose message never leaves: it was not
|
|
11
|
-
*
|
|
12
|
-
* masking it *silently* is how a bug becomes unobservable — the operator loses the same
|
|
13
|
-
* sentence the attacker does. So the mask and the record live in one function: whoever
|
|
14
|
-
* calls `toPublicError` cannot forget the half that keeps the error findable.
|
|
5
|
+
* An INTERNAL_ERROR is the one class of error whose message never leaves: it was not written for a
|
|
6
|
+
* caller and may quote a path, a query or a row.
|
|
15
7
|
*/
|
|
16
8
|
const log = new Logger('error');
|
|
17
9
|
const HTTP_STATUS = {
|
|
@@ -39,13 +31,7 @@ const HTTP_STATUS = {
|
|
|
39
31
|
function httpStatusFor(code) {
|
|
40
32
|
return HTTP_STATUS[code] ?? 500;
|
|
41
33
|
}
|
|
42
|
-
/**
|
|
43
|
-
* Serialize an application error for an untrusted caller.
|
|
44
|
-
*
|
|
45
|
-
* Every code but INTERNAL_ERROR was written for the caller and travels whole. An
|
|
46
|
-
* INTERNAL_ERROR is replaced by a constant — and logged here, with its cause, so the
|
|
47
|
-
* sentence exists exactly once: on the server.
|
|
48
|
-
*/
|
|
34
|
+
/** Serialize an application error for an untrusted caller. */
|
|
49
35
|
export function toPublicError(err) {
|
|
50
36
|
if (err.code !== ErrorCode.INTERNAL_ERROR)
|
|
51
37
|
return err.toJSON();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-error.js","sourceRoot":"","sources":["../../src/wire/http-error.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"http-error.js","sourceRoot":"","sources":["../../src/wire/http-error.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,O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MAAM,CAAC,EAAE,CAAC;AACtD,CAAC"}
|
|
@@ -2,13 +2,7 @@
|
|
|
2
2
|
* Logger middleware — logs every operation with timing.
|
|
3
3
|
*/
|
|
4
4
|
import type { AppMiddleware } from './middleware.js';
|
|
5
|
-
import type { Logger } from '../
|
|
6
|
-
/**
|
|
7
|
-
* Create a logger middleware that logs operation entry, exit, and errors.
|
|
8
|
-
*
|
|
9
|
-
* ```ts
|
|
10
|
-
* app.use(loggerMiddleware(app.resolve('Logger')))
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
5
|
+
import type { Logger } from '../builtin/logger.js';
|
|
6
|
+
/** Create a logger middleware that logs operation entry, exit, and errors. */
|
|
13
7
|
export declare function loggerMiddleware(logger: Logger): AppMiddleware;
|
|
14
8
|
//# sourceMappingURL=loggerMiddleware.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loggerMiddleware.d.ts","sourceRoot":"","sources":["../../src/wire/loggerMiddleware.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"loggerMiddleware.d.ts","sourceRoot":"","sources":["../../src/wire/loggerMiddleware.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,8EAA8E;AAC9E,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,CAe9D"}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Create a logger middleware that logs operation entry, exit, and errors.
|
|
3
|
-
*
|
|
4
|
-
* ```ts
|
|
5
|
-
* app.use(loggerMiddleware(app.resolve('Logger')))
|
|
6
|
-
* ```
|
|
7
|
-
*/
|
|
1
|
+
/** Create a logger middleware that logs operation entry, exit, and errors. */
|
|
8
2
|
export function loggerMiddleware(logger) {
|
|
9
3
|
return async (ctx, next) => {
|
|
10
4
|
const start = performance.now();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loggerMiddleware.js","sourceRoot":"","sources":["../../src/wire/loggerMiddleware.ts"],"names":[],"mappings":"AAMA
|
|
1
|
+
{"version":3,"file":"loggerMiddleware.js","sourceRoot":"","sources":["../../src/wire/loggerMiddleware.ts"],"names":[],"mappings":"AAMA,8EAA8E;AAC9E,MAAM,UAAU,gBAAgB,CAAC,MAAc;IAC7C,OAAO,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QACzB,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;QAChC,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC;QAC9C,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,EAAE,CAAC;YAC5B,MAAM,EAAE,GAAG,CAAC,WAAW,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAClD,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,SAAS,KAAK,EAAE,KAAK,CAAC,CAAC;YACxD,OAAO,MAAM,CAAC;QAChB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,EAAE,GAAG,CAAC,WAAW,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAClD,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,SAAS,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;YAC9D,MAAM,GAAG,CAAC;QACZ,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* App-level middleware — intercepts handler facade operations.
|
|
3
|
-
*
|
|
4
|
-
* Works regardless of entry point (HTTP, Nitro, event bus, CLI, tests).
|
|
5
|
-
*/
|
|
1
|
+
/** App-level middleware — intercepts handler facade operations. */
|
|
6
2
|
export interface OperationContext {
|
|
7
3
|
/** Entity name (e.g. 'product'). */
|
|
8
4
|
entity: string;
|
|
@@ -17,8 +13,8 @@ export interface OperationContext {
|
|
|
17
13
|
args: unknown[];
|
|
18
14
|
/** Extensible bag — middlewares deposit data here (user, permissions, etc.). */
|
|
19
15
|
state: Record<string, unknown>;
|
|
20
|
-
/** Transport-agnostic invocation context (params, query,
|
|
21
|
-
invocation?: import('../
|
|
16
|
+
/** Transport-agnostic invocation context (params, query, input, state). */
|
|
17
|
+
invocation?: import('../wire/Invocation.js').InvocationContext;
|
|
22
18
|
}
|
|
23
19
|
export type AppNext = () => Promise<unknown>;
|
|
24
20
|
export type AppMiddleware = (ctx: OperationContext, next: AppNext) => Promise<unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../src/wire/middleware.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../src/wire/middleware.ts"],"names":[],"mappings":"AAAA,mEAAmE;AAGnE,MAAM,WAAW,gBAAgB;IAC/B,oCAAoC;IACpC,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,SAAS,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,2EAA2E;IAC3E,UAAU,CAAC,EAAE,OAAO,uBAAuB,EAAE,iBAAiB,CAAC;CAChE;AAED,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;AAC7C,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,gBAAgB,EAAE,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAIvF;;GAEG;AACH,wBAAgB,cAAc,CAC5B,WAAW,EAAE,aAAa,EAAE,EAC5B,GAAG,EAAE,gBAAgB,EACrB,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,OAAO,CAAC,CASlB"}
|
package/dist/wire/middleware.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* App-level middleware — intercepts handler facade operations.
|
|
3
|
-
*
|
|
4
|
-
* Works regardless of entry point (HTTP, Nitro, event bus, CLI, tests).
|
|
5
|
-
*/
|
|
1
|
+
/** App-level middleware — intercepts handler facade operations. */
|
|
6
2
|
// ── Runner ──────────────────────────────────────
|
|
7
3
|
/**
|
|
8
4
|
* Execute a middleware chain (onion model) then the handler.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.js","sourceRoot":"","sources":["../../src/wire/middleware.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"middleware.js","sourceRoot":"","sources":["../../src/wire/middleware.ts"],"names":[],"mappings":"AAAA,mEAAmE;AAwBnE,mDAAmD;AAEnD;;GAEG;AACH,MAAM,UAAU,cAAc,CAC5B,WAA4B,EAC5B,GAAqB,EACrB,OAAgB;IAEhB,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,MAAM,IAAI,GAAG,GAAqB,EAAE;QAClC,IAAI,KAAK,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC;YAC/B,OAAO,WAAW,CAAC,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACzC,CAAC;QACD,OAAO,OAAO,EAAE,CAAC;IACnB,CAAC,CAAC;IACF,OAAO,IAAI,EAAE,CAAC;AAChB,CAAC"}
|