@fougere/core 0.6.0-alpha.0 → 0.8.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/boot/AppLifecycle.d.ts +1 -1
- package/dist/boot/AppLifecycle.d.ts.map +1 -1
- package/dist/boot/AppLifecycle.js +13 -2
- package/dist/boot/AppLifecycle.js.map +1 -1
- package/dist/boot/Emissions.d.ts +13 -90
- package/dist/boot/Emissions.d.ts.map +1 -1
- package/dist/boot/Emissions.js +21 -118
- package/dist/boot/Emissions.js.map +1 -1
- package/dist/boot/ambient-port.d.ts +3 -24
- package/dist/boot/ambient-port.d.ts.map +1 -1
- package/dist/boot/ambient.als.d.ts.map +1 -1
- package/dist/boot/ambient.als.js +7 -12
- package/dist/boot/ambient.als.js.map +1 -1
- package/dist/boot/ambient.queue.d.ts +2 -5
- package/dist/boot/ambient.queue.d.ts.map +1 -1
- package/dist/boot/ambient.queue.js.map +1 -1
- package/dist/boot/apply.d.ts +1 -13
- package/dist/boot/apply.d.ts.map +1 -1
- package/dist/boot/apply.js +9 -16
- package/dist/boot/apply.js.map +1 -1
- package/dist/boot/auth.d.ts +2 -12
- package/dist/boot/auth.d.ts.map +1 -1
- package/dist/boot/boot.d.ts +3 -16
- package/dist/boot/boot.d.ts.map +1 -1
- package/dist/boot/boot.js +4 -11
- package/dist/boot/boot.js.map +1 -1
- package/dist/boot/bootstrap.d.ts.map +1 -1
- package/dist/boot/bootstrap.js +84 -130
- package/dist/boot/bootstrap.js.map +1 -1
- package/dist/boot/card.d.ts +1 -17
- package/dist/boot/card.d.ts.map +1 -1
- package/dist/boot/card.js +3 -32
- package/dist/boot/card.js.map +1 -1
- package/dist/boot/frame.d.ts +8 -32
- package/dist/boot/frame.d.ts.map +1 -1
- package/dist/boot/frame.js +17 -56
- package/dist/boot/frame.js.map +1 -1
- package/dist/boot/hosted.d.ts +2 -24
- package/dist/boot/hosted.d.ts.map +1 -1
- package/dist/boot/hosted.js +10 -15
- package/dist/boot/hosted.js.map +1 -1
- package/dist/boot/ownership.d.ts +3 -36
- package/dist/boot/ownership.d.ts.map +1 -1
- package/dist/boot/ownership.js +5 -40
- package/dist/boot/ownership.js.map +1 -1
- package/dist/boot/ports.d.ts +1 -14
- package/dist/boot/ports.d.ts.map +1 -1
- package/dist/boot/ports.js +1 -14
- package/dist/boot/ports.js.map +1 -1
- package/dist/boot/remote.d.ts +5 -38
- package/dist/boot/remote.d.ts.map +1 -1
- package/dist/boot/remote.js +8 -41
- package/dist/boot/remote.js.map +1 -1
- package/dist/boot/runner.d.ts +4 -21
- package/dist/boot/runner.d.ts.map +1 -1
- package/dist/boot/runner.js +4 -17
- package/dist/boot/runner.js.map +1 -1
- package/dist/boot/seed.d.ts +4 -31
- package/dist/boot/seed.d.ts.map +1 -1
- package/dist/boot/seed.js +6 -37
- package/dist/boot/seed.js.map +1 -1
- package/dist/boot/statement-drift.d.ts +2 -21
- package/dist/boot/statement-drift.d.ts.map +1 -1
- package/dist/boot/statement-drift.js +4 -9
- package/dist/boot/statement-drift.js.map +1 -1
- package/dist/boot/together.d.ts +4 -8
- package/dist/boot/together.d.ts.map +1 -1
- package/dist/boot/together.js +15 -50
- package/dist/boot/together.js.map +1 -1
- package/dist/boot/types.d.ts +31 -173
- package/dist/boot/types.d.ts.map +1 -1
- package/dist/builtin/config.d.ts +7 -0
- package/dist/builtin/config.d.ts.map +1 -0
- package/dist/builtin/config.js +15 -0
- package/dist/builtin/config.js.map +1 -0
- package/dist/{builtins → builtin}/logger.d.ts +4 -25
- package/dist/builtin/logger.d.ts.map +1 -0
- package/dist/{builtins → builtin}/logger.js +5 -32
- package/dist/builtin/logger.js.map +1 -0
- package/dist/config-loader.d.ts +9 -67
- package/dist/config-loader.d.ts.map +1 -1
- package/dist/config-loader.js +5 -18
- package/dist/config-loader.js.map +1 -1
- package/dist/contract.d.ts +15 -31
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js +13 -26
- package/dist/contract.js.map +1 -1
- package/dist/criterion.d.ts +37 -0
- package/dist/criterion.d.ts.map +1 -0
- package/dist/criterion.js +28 -0
- package/dist/criterion.js.map +1 -0
- package/dist/crypto/encoding.d.ts +2 -15
- package/dist/crypto/encoding.d.ts.map +1 -1
- package/dist/crypto/encoding.js +2 -15
- package/dist/crypto/encoding.js.map +1 -1
- package/dist/crypto/node.d.ts.map +1 -1
- package/dist/crypto/node.js +1 -7
- package/dist/crypto/node.js.map +1 -1
- package/dist/crypto/port.d.ts +2 -18
- package/dist/crypto/port.d.ts.map +1 -1
- package/dist/crypto/port.js +1 -17
- package/dist/crypto/port.js.map +1 -1
- package/dist/crypto/webcrypto.d.ts.map +1 -1
- package/dist/crypto/webcrypto.js +1 -12
- package/dist/crypto/webcrypto.js.map +1 -1
- package/dist/declare.d.ts +19 -37
- package/dist/declare.d.ts.map +1 -1
- package/dist/declare.js +23 -30
- package/dist/declare.js.map +1 -1
- package/dist/define.d.ts +2 -3
- package/dist/define.d.ts.map +1 -1
- package/dist/define.js +2 -3
- package/dist/define.js.map +1 -1
- package/dist/descriptor/Fronds.d.ts +3 -28
- package/dist/descriptor/Fronds.d.ts.map +1 -1
- package/dist/descriptor/Fronds.js +6 -31
- package/dist/descriptor/Fronds.js.map +1 -1
- package/dist/descriptor/frond.d.ts +25 -60
- package/dist/descriptor/frond.d.ts.map +1 -1
- package/dist/descriptor/frond.js +5 -1
- package/dist/descriptor/frond.js.map +1 -1
- package/dist/dispatch/ArgumentResolver.d.ts +1 -1
- package/dist/dispatch/ArgumentResolver.d.ts.map +1 -1
- package/dist/dispatch/ArgumentResolver.js +5 -5
- package/dist/dispatch/ArgumentResolver.js.map +1 -1
- package/dist/dispatch/DispatchEvent.d.ts +2 -2
- package/dist/dispatch/DispatchEvent.d.ts.map +1 -1
- package/dist/dispatch/DispatchLifecycle.d.ts +1 -7
- package/dist/dispatch/DispatchLifecycle.d.ts.map +1 -1
- package/dist/dispatch/DispatchLifecycle.js +1 -7
- package/dist/dispatch/DispatchLifecycle.js.map +1 -1
- package/dist/dispatch/DispatchPort.d.ts +1 -1
- package/dist/dispatch/DispatchPort.d.ts.map +1 -1
- package/dist/dispatch/Dispatcher.d.ts +1 -1
- package/dist/dispatch/Dispatcher.d.ts.map +1 -1
- package/dist/dispatch/Dispatcher.js +2 -2
- package/dist/dispatch/Dispatcher.js.map +1 -1
- package/dist/{boot → dispatch}/HandlerFacade.d.ts +25 -38
- package/dist/dispatch/HandlerFacade.d.ts.map +1 -0
- package/dist/{boot → dispatch}/HandlerFacade.js +65 -74
- package/dist/dispatch/HandlerFacade.js.map +1 -0
- package/dist/dispatch/LocalRoutePolicy.d.ts +1 -1
- package/dist/dispatch/LocalRoutePolicy.d.ts.map +1 -1
- package/dist/dispatch/LocalRoutePolicy.js +4 -4
- package/dist/dispatch/LocalRoutePolicy.js.map +1 -1
- package/dist/dispatch/OperationRoute.d.ts +2 -2
- package/dist/dispatch/OperationRoute.d.ts.map +1 -1
- package/dist/dispatch/OutputView.d.ts +3 -2
- package/dist/dispatch/OutputView.d.ts.map +1 -1
- package/dist/dispatch/OutputView.js +19 -1
- package/dist/dispatch/OutputView.js.map +1 -1
- package/dist/dispatch/Route.d.ts +2 -2
- package/dist/dispatch/Route.d.ts.map +1 -1
- package/dist/dispatch/RoutePolicy.d.ts +1 -1
- package/dist/dispatch/RoutePolicy.d.ts.map +1 -1
- package/dist/dispatch/RouteRegistry.d.ts +1 -1
- package/dist/dispatch/RouteRegistry.d.ts.map +1 -1
- package/dist/dispatch/RouteRegistry.js +2 -2
- package/dist/dispatch/RouteRegistry.js.map +1 -1
- package/dist/dispatch/RouteResolver.d.ts +2 -4
- package/dist/dispatch/RouteResolver.d.ts.map +1 -1
- package/dist/dispatch/StorageGuard.d.ts +40 -8
- package/dist/dispatch/StorageGuard.d.ts.map +1 -1
- package/dist/dispatch/StorageGuard.js +151 -20
- package/dist/dispatch/StorageGuard.js.map +1 -1
- package/dist/dispatch/presenterArguments.d.ts +7 -0
- package/dist/dispatch/presenterArguments.d.ts.map +1 -0
- package/dist/dispatch/presenterArguments.js +12 -0
- package/dist/dispatch/presenterArguments.js.map +1 -0
- package/dist/dispatch/remoteRoutes.d.ts +7 -0
- package/dist/dispatch/remoteRoutes.d.ts.map +1 -0
- package/dist/dispatch/{RemoteRouteResolver.js → remoteRoutes.js} +6 -10
- package/dist/dispatch/remoteRoutes.js.map +1 -0
- package/dist/dispatch/routeNotFound.d.ts +9 -0
- package/dist/dispatch/routeNotFound.d.ts.map +1 -0
- package/dist/dispatch/routeNotFound.js +21 -0
- package/dist/dispatch/routeNotFound.js.map +1 -0
- package/dist/dispatch/validateInput.d.ts +5 -0
- package/dist/dispatch/validateInput.d.ts.map +1 -0
- package/dist/dispatch/validateInput.js +20 -0
- package/dist/dispatch/validateInput.js.map +1 -0
- package/dist/effective-operation.d.ts +1 -24
- package/dist/effective-operation.d.ts.map +1 -1
- package/dist/effective-operation.js +21 -50
- package/dist/effective-operation.js.map +1 -1
- package/dist/emit.d.ts +4 -42
- package/dist/emit.d.ts.map +1 -1
- package/dist/emit.js +3 -39
- package/dist/emit.js.map +1 -1
- package/dist/entry/facade.d.ts +8 -0
- package/dist/entry/facade.d.ts.map +1 -0
- package/dist/entry/facade.js +28 -0
- package/dist/entry/facade.js.map +1 -0
- package/dist/entry/transport.d.ts +5 -0
- package/dist/entry/transport.d.ts.map +1 -0
- package/dist/entry/transport.js +11 -0
- package/dist/entry/transport.js.map +1 -0
- package/dist/frond-config.d.ts +7 -70
- package/dist/frond-config.d.ts.map +1 -1
- package/dist/frond-config.js +1 -9
- package/dist/frond-config.js.map +1 -1
- package/dist/identity-keys.d.ts +2 -5
- package/dist/identity-keys.d.ts.map +1 -1
- package/dist/identity-keys.js +3 -16
- package/dist/identity-keys.js.map +1 -1
- package/dist/identity.d.ts +4 -30
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +11 -73
- package/dist/identity.js.map +1 -1
- package/dist/imports.d.ts +1 -7
- package/dist/imports.d.ts.map +1 -1
- package/dist/imports.js +1 -7
- package/dist/imports.js.map +1 -1
- package/dist/index.d.ts +17 -24
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -18
- package/dist/index.js.map +1 -1
- package/dist/loader.d.ts +1 -8
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +1 -8
- package/dist/loader.js.map +1 -1
- package/dist/node.d.ts +2 -11
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +2 -11
- package/dist/node.js.map +1 -1
- package/dist/prefab/collector.d.ts +1 -22
- package/dist/prefab/collector.d.ts.map +1 -1
- package/dist/prefab/collector.js +1 -22
- package/dist/prefab/collector.js.map +1 -1
- package/dist/prefab/crud.d.ts +16 -32
- package/dist/prefab/crud.d.ts.map +1 -1
- package/dist/prefab/crud.js +31 -58
- package/dist/prefab/crud.js.map +1 -1
- package/dist/prefab/mirror.d.ts +2 -24
- package/dist/prefab/mirror.d.ts.map +1 -1
- package/dist/prefab/mirror.js +2 -20
- package/dist/prefab/mirror.js.map +1 -1
- package/dist/prefab/prefab.d.ts +1 -7
- package/dist/prefab/prefab.d.ts.map +1 -1
- package/dist/prefab/prefab.js +1 -7
- package/dist/prefab/prefab.js.map +1 -1
- package/dist/prefab/presenter.d.ts +2 -36
- package/dist/prefab/presenter.d.ts.map +1 -1
- package/dist/prefab/presenter.js +2 -36
- package/dist/prefab/presenter.js.map +1 -1
- package/dist/prefab/repository.d.ts +5 -73
- package/dist/prefab/repository.d.ts.map +1 -1
- package/dist/prefab/repository.js +3 -16
- package/dist/prefab/repository.js.map +1 -1
- package/dist/scan/adapters.d.ts +3 -0
- package/dist/scan/adapters.d.ts.map +1 -0
- package/dist/scan/adapters.js +25 -0
- package/dist/scan/adapters.js.map +1 -0
- package/dist/scan/bundling.d.ts +1 -12
- package/dist/scan/bundling.d.ts.map +1 -1
- package/dist/scan/bundling.js +1 -12
- package/dist/scan/bundling.js.map +1 -1
- package/dist/scan/contract.d.ts +27 -0
- package/dist/scan/contract.d.ts.map +1 -0
- package/dist/scan/contract.js +46 -0
- package/dist/scan/contract.js.map +1 -0
- package/dist/scan/conventions.d.ts +6 -40
- package/dist/scan/conventions.d.ts.map +1 -1
- package/dist/scan/conventions.js +5 -34
- package/dist/scan/conventions.js.map +1 -1
- package/dist/scan/emit.d.ts +1 -5
- package/dist/scan/emit.d.ts.map +1 -1
- package/dist/scan/emit.js +10 -78
- package/dist/scan/emit.js.map +1 -1
- package/dist/scan/handler-parser.d.ts +4 -26
- package/dist/scan/handler-parser.d.ts.map +1 -1
- package/dist/scan/handler-parser.js +26 -83
- package/dist/scan/handler-parser.js.map +1 -1
- package/dist/scan/result.d.ts +3 -16
- package/dist/scan/result.d.ts.map +1 -1
- package/dist/scan/scanner.d.ts +2 -27
- package/dist/scan/scanner.d.ts.map +1 -1
- package/dist/scan/scanner.js +45 -133
- package/dist/scan/scanner.js.map +1 -1
- package/dist/scan/statement.d.ts.map +1 -1
- package/dist/scan/statement.js +60 -37
- package/dist/scan/statement.js.map +1 -1
- package/dist/source.d.ts +53 -0
- package/dist/source.d.ts.map +1 -0
- package/dist/source.js +18 -0
- package/dist/source.js.map +1 -0
- package/dist/storage.d.ts +13 -210
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +4 -68
- package/dist/storage.js.map +1 -1
- package/dist/store.d.ts +18 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +179 -0
- package/dist/store.js.map +1 -0
- package/dist/verify.d.ts +5 -38
- package/dist/verify.d.ts.map +1 -1
- package/dist/verify.js +17 -37
- package/dist/verify.js.map +1 -1
- package/dist/wire/CallLog.d.ts +32 -0
- package/dist/wire/CallLog.d.ts.map +1 -0
- package/dist/{contract → wire}/CallLog.js.map +1 -1
- package/dist/wire/Invocation.d.ts +32 -0
- package/dist/wire/Invocation.d.ts.map +1 -0
- package/dist/wire/Invocation.js +66 -0
- package/dist/wire/Invocation.js.map +1 -0
- package/dist/{contract → wire}/RouteAddress.d.ts +5 -0
- package/dist/wire/RouteAddress.d.ts.map +1 -0
- package/dist/{contract → wire}/RouteAddress.js +7 -0
- package/dist/wire/RouteAddress.js.map +1 -0
- package/dist/wire/binding.d.ts +5 -21
- package/dist/wire/binding.d.ts.map +1 -1
- package/dist/wire/binding.js +5 -10
- package/dist/wire/binding.js.map +1 -1
- package/dist/wire/call.d.ts +24 -133
- package/dist/wire/call.d.ts.map +1 -1
- package/dist/wire/call.js +15 -41
- package/dist/wire/call.js.map +1 -1
- package/dist/wire/drift.d.ts +3 -28
- package/dist/wire/drift.d.ts.map +1 -1
- package/dist/wire/drift.js +4 -23
- package/dist/wire/drift.js.map +1 -1
- package/dist/wire/errors.d.ts +4 -24
- package/dist/wire/errors.d.ts.map +1 -1
- package/dist/wire/errors.js +4 -24
- package/dist/wire/errors.js.map +1 -1
- package/dist/wire/http-error.d.ts +2 -13
- package/dist/wire/http-error.d.ts.map +1 -1
- package/dist/wire/http-error.js +5 -19
- package/dist/wire/http-error.js.map +1 -1
- package/dist/wire/loggerMiddleware.d.ts +2 -8
- package/dist/wire/loggerMiddleware.d.ts.map +1 -1
- package/dist/wire/loggerMiddleware.js +1 -7
- package/dist/wire/loggerMiddleware.js.map +1 -1
- package/dist/wire/middleware.d.ts +3 -7
- package/dist/wire/middleware.d.ts.map +1 -1
- package/dist/wire/middleware.js +1 -5
- package/dist/wire/middleware.js.map +1 -1
- package/dist/wire/operation.d.ts +7 -43
- package/dist/wire/operation.d.ts.map +1 -1
- package/dist/wire/operation.js +4 -15
- package/dist/wire/operation.js.map +1 -1
- package/dist/wire/signature.d.ts +4 -25
- package/dist/wire/signature.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/boot/AppLifecycle.ts +15 -2
- package/src/boot/Emissions.ts +21 -118
- package/src/boot/ambient-port.ts +3 -24
- package/src/boot/ambient.als.ts +7 -12
- package/src/boot/ambient.queue.ts +2 -5
- package/src/boot/apply.ts +9 -16
- package/src/boot/auth.ts +2 -12
- package/src/boot/boot.ts +6 -21
- package/src/boot/bootstrap.ts +95 -140
- package/src/boot/card.ts +4 -33
- package/src/boot/frame.ts +24 -64
- package/src/boot/hosted.ts +12 -34
- package/src/boot/ownership.ts +5 -39
- package/src/boot/ports.ts +1 -14
- package/src/boot/remote.ts +11 -58
- package/src/boot/runner.ts +5 -22
- package/src/boot/seed.ts +6 -37
- package/src/boot/statement-drift.ts +5 -24
- package/src/boot/together.ts +18 -51
- package/src/boot/types.ts +31 -173
- package/src/{builtins → builtin}/config.ts +1 -7
- package/src/{builtins → builtin}/logger.ts +6 -39
- package/src/config-loader.ts +12 -71
- package/src/contract.ts +19 -39
- package/src/criterion.ts +54 -0
- package/src/crypto/encoding.ts +2 -15
- package/src/crypto/node.ts +1 -7
- package/src/crypto/port.ts +2 -18
- package/src/crypto/webcrypto.ts +1 -12
- package/src/declare.ts +42 -41
- package/src/define.ts +2 -3
- package/src/descriptor/Fronds.ts +6 -31
- package/src/descriptor/frond.ts +26 -60
- package/src/dispatch/ArgumentResolver.ts +6 -6
- package/src/dispatch/DispatchEvent.ts +2 -2
- package/src/dispatch/DispatchLifecycle.ts +1 -7
- package/src/dispatch/DispatchPort.ts +1 -1
- package/src/dispatch/Dispatcher.ts +3 -3
- package/src/dispatch/HandlerFacade.ts +231 -0
- package/src/dispatch/LocalRoutePolicy.ts +4 -4
- package/src/dispatch/OperationRoute.ts +2 -2
- package/src/dispatch/OutputView.ts +24 -2
- package/src/dispatch/Route.ts +2 -2
- package/src/dispatch/RoutePolicy.ts +1 -1
- package/src/dispatch/RouteRegistry.ts +2 -2
- package/src/dispatch/RouteResolver.ts +2 -4
- package/src/dispatch/StorageGuard.ts +175 -19
- package/src/dispatch/presenterArguments.ts +25 -0
- package/src/dispatch/{RemoteRouteResolver.ts → remoteRoutes.ts} +7 -9
- package/src/dispatch/routeNotFound.ts +33 -0
- package/src/dispatch/validateInput.ts +28 -0
- package/src/effective-operation.ts +21 -50
- package/src/emit.ts +5 -63
- package/src/entry/facade.ts +44 -0
- package/src/entry/transport.ts +16 -0
- package/src/frond-config.ts +7 -70
- package/src/identity-keys.ts +3 -16
- package/src/identity.ts +12 -80
- package/src/imports.ts +2 -31
- package/src/index.ts +17 -24
- package/src/loader.ts +2 -16
- package/src/node.ts +2 -11
- package/src/prefab/collector.ts +1 -22
- package/src/prefab/crud.ts +37 -76
- package/src/prefab/mirror.ts +4 -44
- package/src/prefab/prefab.ts +2 -21
- package/src/prefab/presenter.ts +2 -36
- package/src/prefab/repository.ts +7 -83
- package/src/scan/adapters.ts +32 -0
- package/src/scan/bundling.ts +1 -12
- package/src/scan/contract.ts +80 -0
- package/src/scan/conventions.ts +6 -40
- package/src/scan/emit.ts +11 -80
- package/src/scan/handler-parser.ts +27 -96
- package/src/scan/result.ts +3 -16
- package/src/scan/scanner.ts +46 -132
- package/src/scan/statement.ts +73 -41
- package/src/source.ts +63 -0
- package/src/storage.ts +14 -234
- package/src/store.ts +191 -0
- package/src/verify.ts +16 -57
- package/src/wire/CallLog.ts +30 -0
- package/src/{contract → wire}/Invocation.ts +24 -17
- package/src/{contract → wire}/RouteAddress.ts +7 -0
- package/src/wire/binding.ts +9 -25
- package/src/wire/call.ts +30 -133
- package/src/wire/drift.ts +5 -30
- package/src/wire/errors.ts +4 -24
- package/src/wire/http-error.ts +5 -19
- package/src/wire/loggerMiddleware.ts +2 -8
- package/src/wire/middleware.ts +3 -7
- package/src/wire/operation.ts +8 -48
- package/src/wire/signature.ts +4 -25
- package/dist/boot/HandlerFacade.d.ts.map +0 -1
- package/dist/boot/HandlerFacade.js.map +0 -1
- package/dist/builtins/config.d.ts +0 -13
- package/dist/builtins/config.d.ts.map +0 -1
- package/dist/builtins/config.js +0 -21
- package/dist/builtins/config.js.map +0 -1
- package/dist/builtins/logger.d.ts.map +0 -1
- package/dist/builtins/logger.js.map +0 -1
- package/dist/contract/Call.d.ts +0 -10
- package/dist/contract/Call.d.ts.map +0 -1
- package/dist/contract/Call.js +0 -15
- package/dist/contract/Call.js.map +0 -1
- package/dist/contract/CallLog.d.ts +0 -57
- package/dist/contract/CallLog.d.ts.map +0 -1
- package/dist/contract/Invocation.d.ts +0 -27
- package/dist/contract/Invocation.d.ts.map +0 -1
- package/dist/contract/Invocation.js +0 -59
- package/dist/contract/Invocation.js.map +0 -1
- package/dist/contract/RouteAddress.d.ts.map +0 -1
- package/dist/contract/RouteAddress.js.map +0 -1
- package/dist/dispatch/InputValidator.d.ts +0 -7
- package/dist/dispatch/InputValidator.d.ts.map +0 -1
- package/dist/dispatch/InputValidator.js +0 -22
- package/dist/dispatch/InputValidator.js.map +0 -1
- package/dist/dispatch/OperationExecutor.d.ts +0 -25
- package/dist/dispatch/OperationExecutor.d.ts.map +0 -1
- package/dist/dispatch/OperationExecutor.js +0 -32
- package/dist/dispatch/OperationExecutor.js.map +0 -1
- package/dist/dispatch/OutputProjector.d.ts +0 -12
- package/dist/dispatch/OutputProjector.d.ts.map +0 -1
- package/dist/dispatch/OutputProjector.js +0 -30
- package/dist/dispatch/OutputProjector.js.map +0 -1
- package/dist/dispatch/PresenterArgumentResolver.d.ts +0 -12
- package/dist/dispatch/PresenterArgumentResolver.d.ts.map +0 -1
- package/dist/dispatch/PresenterArgumentResolver.js +0 -20
- package/dist/dispatch/PresenterArgumentResolver.js.map +0 -1
- package/dist/dispatch/RemoteRouteResolver.d.ts +0 -13
- package/dist/dispatch/RemoteRouteResolver.d.ts.map +0 -1
- package/dist/dispatch/RemoteRouteResolver.js.map +0 -1
- package/dist/dispatch/RouteNotFoundError.d.ts +0 -10
- package/dist/dispatch/RouteNotFoundError.d.ts.map +0 -1
- package/dist/dispatch/RouteNotFoundError.js +0 -24
- package/dist/dispatch/RouteNotFoundError.js.map +0 -1
- package/dist/entry/DynamicFacade.d.ts +0 -10
- package/dist/entry/DynamicFacade.d.ts.map +0 -1
- package/dist/entry/DynamicFacade.js +0 -27
- package/dist/entry/DynamicFacade.js.map +0 -1
- package/dist/entry/FacadeEntry.d.ts +0 -11
- package/dist/entry/FacadeEntry.d.ts.map +0 -1
- package/dist/entry/FacadeEntry.js +0 -26
- package/dist/entry/FacadeEntry.js.map +0 -1
- package/dist/entry/TransportEntry.d.ts +0 -13
- package/dist/entry/TransportEntry.d.ts.map +0 -1
- package/dist/entry/TransportEntry.js +0 -24
- package/dist/entry/TransportEntry.js.map +0 -1
- package/dist/rows.d.ts +0 -40
- package/dist/rows.d.ts.map +0 -1
- package/dist/rows.js +0 -146
- package/dist/rows.js.map +0 -1
- package/src/boot/HandlerFacade.ts +0 -242
- package/src/contract/Call.ts +0 -18
- package/src/contract/CallLog.ts +0 -55
- package/src/dispatch/InputValidator.ts +0 -28
- package/src/dispatch/OperationExecutor.ts +0 -60
- package/src/dispatch/OutputProjector.ts +0 -32
- package/src/dispatch/PresenterArgumentResolver.ts +0 -25
- package/src/dispatch/RouteNotFoundError.ts +0 -29
- package/src/entry/DynamicFacade.ts +0 -28
- package/src/entry/FacadeEntry.ts +0 -32
- package/src/entry/TransportEntry.ts +0 -30
- package/src/rows.ts +0 -155
- /package/dist/{contract → wire}/CallLog.js +0 -0
package/dist/boot/together.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type SchemaView } from '@fougere/schema';
|
|
2
2
|
import type { Container } from '@fougere/container';
|
|
3
3
|
import { type StorageFactory } from '../storage.js';
|
|
4
|
-
import type { Logger } from '../
|
|
4
|
+
import type { Logger } from '../builtin/logger.js';
|
|
5
5
|
import type { ProviderEntry } from '../descriptor/frond.js';
|
|
6
6
|
/** Everything the boot knows that a frame needs, gathered once for every frond. */
|
|
7
7
|
export interface FrameWorld {
|
|
@@ -12,15 +12,11 @@ export interface FrameWorld {
|
|
|
12
12
|
hostedHere: (frond: string) => boolean;
|
|
13
13
|
storageFactory?: StorageFactory;
|
|
14
14
|
sourceOf?: (entityName: string) => string;
|
|
15
|
+
/** Whether that source hands one out — asked before the frame is built, not at the call. */
|
|
16
|
+
transacts?: (source: string) => boolean;
|
|
15
17
|
transacted?: <R>(source: string, fn: (storageFactory: StorageFactory) => Promise<R>) => Promise<R>;
|
|
16
18
|
log: Logger;
|
|
17
19
|
}
|
|
18
|
-
/**
|
|
19
|
-
* Register one frame per key a handler or provider of this frond asked for.
|
|
20
|
-
*
|
|
21
|
-
* Called with the frond's scope, because that is where the asking constructor resolves —
|
|
22
|
-
* while the MEMBERS are looked up app-wide, a frame crossing fronds being the ordinary case
|
|
23
|
-
* rather than the exception (the frond is not the storage boundary; `sources:` is).
|
|
24
|
-
*/
|
|
20
|
+
/** Register one frame per key a handler or provider of this frond asked for. */
|
|
25
21
|
export declare function registerFrames(scope: Container, keys: Iterable<string>, providers: readonly ProviderEntry[], world: FrameWorld): void;
|
|
26
22
|
//# sourceMappingURL=together.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"together.d.ts","sourceRoot":"","sources":["../../src/boot/together.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"together.d.ts","sourceRoot":"","sources":["../../src/boot/together.ts"],"names":[],"mappings":"AAEA,OAAO,EAA0B,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAwE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAC1H,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAI5D,mFAAmF;AACnF,MAAM,WAAW,UAAU;IACzB,0FAA0F;IAC1F,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACtC,kFAAkF;IAClF,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACvC,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,CAAC;IAC1C,4FAA4F;IAC5F,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;IACxC,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,cAAc,EAAE,cAAc,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IACnG,GAAG,EAAE,MAAM,CAAC;CACb;AA6FD,gFAAgF;AAChF,wBAAgB,cAAc,CAC5B,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,EACtB,SAAS,EAAE,SAAS,aAAa,EAAE,EACnC,KAAK,EAAE,UAAU,GAChB,IAAI,CA0DN"}
|
package/dist/boot/together.js
CHANGED
|
@@ -1,25 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Building a frame — what a handler asking for `Together<[…]>` receives.
|
|
3
|
-
*
|
|
4
|
-
* The declaration names its members and nothing else; where they live, and therefore
|
|
5
|
-
* which of the two realizations they get, is read HERE and stated at boot. A frame whose
|
|
6
|
-
* members share an engine is a transaction; one whose members are split replays its own
|
|
7
|
-
* inverses (`frame.ts`). Same user code, two guarantees, and the boot says which — the
|
|
8
|
-
* one thing a gradient must never leave to assumption.
|
|
9
|
-
*/
|
|
1
|
+
/** Building a frame — what a handler asking for `Together<[…]>` receives. */
|
|
10
2
|
import { ambient } from '#ambient';
|
|
11
3
|
import { upperFirst, lowerFirst } from '@fougere/schema';
|
|
12
4
|
import { membersOfTogetherKey, storageKeyOf, entityOfStorageKey } from '../storage.js';
|
|
13
5
|
import { StorageGuard } from '../dispatch/StorageGuard.js';
|
|
14
6
|
import { recording, unwind } from './frame.js';
|
|
15
|
-
/**
|
|
16
|
-
* Each declared name, resolved to what it designates.
|
|
17
|
-
*
|
|
18
|
-
* A name that resolves to nothing is refused rather than skipped: `Together<[Account,
|
|
19
|
-
* Ledgre]>` is a typo whose only other symptom is a frame quietly one member short. The
|
|
20
|
-
* two lists are checked against different registries, which is exactly why the declaration
|
|
21
|
-
* separates them — nothing here has to guess what kind a name is.
|
|
22
|
-
*/
|
|
7
|
+
/** Each declared name, resolved to what it designates. */
|
|
23
8
|
function resolve(names, declared, world) {
|
|
24
9
|
const entities = names.entities.map((member) => {
|
|
25
10
|
const name = lowerFirst(member);
|
|
@@ -41,12 +26,7 @@ function resolve(names, declared, world) {
|
|
|
41
26
|
});
|
|
42
27
|
return { entities, providers };
|
|
43
28
|
}
|
|
44
|
-
/**
|
|
45
|
-
* A member that cannot write here at all — its frond is hosted elsewhere.
|
|
46
|
-
*
|
|
47
|
-
* Refused rather than compensated: a compensated frame still writes through a local storage,
|
|
48
|
-
* and a remote frond registers none. There is nothing to record and nothing to undo.
|
|
49
|
-
*/
|
|
29
|
+
/** A member that cannot write here at all — its frond is hosted elsewhere. */
|
|
50
30
|
function refuseRemote(members, world, key) {
|
|
51
31
|
for (const member of members.entities) {
|
|
52
32
|
const frond = world.frondOf.get(member.name);
|
|
@@ -57,12 +37,7 @@ function refuseRemote(members, world, key) {
|
|
|
57
37
|
}
|
|
58
38
|
}
|
|
59
39
|
}
|
|
60
|
-
/**
|
|
61
|
-
* A provider member writing an entity the frame does not name.
|
|
62
|
-
*
|
|
63
|
-
* The frame does not widen itself to cover it: doing so would pull an entity from another
|
|
64
|
-
* source into the group without anyone writing it down. Named instead, with the one-word fix.
|
|
65
|
-
*/
|
|
40
|
+
/** A provider member writing an entity the frame does not name. */
|
|
66
41
|
function refuseUncoveredWrites(members, key, world) {
|
|
67
42
|
const covered = new Set(members.entities.map((member) => member.name));
|
|
68
43
|
for (const provider of members.providers) {
|
|
@@ -76,13 +51,7 @@ function refuseUncoveredWrites(members, key, world) {
|
|
|
76
51
|
}
|
|
77
52
|
}
|
|
78
53
|
}
|
|
79
|
-
/**
|
|
80
|
-
* Open the block: build every member over `factory`, in a scope of their own.
|
|
81
|
-
*
|
|
82
|
-
* The scope is what makes a provider member work without a locator — its storage keys are
|
|
83
|
-
* registered here, so the container hands it the framed ones through the ordinary
|
|
84
|
-
* constructor. It is disposed when the block ends, whichever way it ended.
|
|
85
|
-
*/
|
|
54
|
+
/** Open the block. */
|
|
86
55
|
async function inScope(parent, members, factory, wrap, fn) {
|
|
87
56
|
const scope = parent.createScope();
|
|
88
57
|
try {
|
|
@@ -102,13 +71,7 @@ async function inScope(parent, members, factory, wrap, fn) {
|
|
|
102
71
|
await scope.dispose();
|
|
103
72
|
}
|
|
104
73
|
}
|
|
105
|
-
/**
|
|
106
|
-
* Register one frame per key a handler or provider of this frond asked for.
|
|
107
|
-
*
|
|
108
|
-
* Called with the frond's scope, because that is where the asking constructor resolves —
|
|
109
|
-
* while the MEMBERS are looked up app-wide, a frame crossing fronds being the ordinary case
|
|
110
|
-
* rather than the exception (the frond is not the storage boundary; `sources:` is).
|
|
111
|
-
*/
|
|
74
|
+
/** Register one frame per key a handler or provider of this frond asked for. */
|
|
112
75
|
export function registerFrames(scope, keys, providers, world) {
|
|
113
76
|
let registered = 0;
|
|
114
77
|
for (const key of new Set(keys)) {
|
|
@@ -123,18 +86,20 @@ export function registerFrames(scope, keys, providers, world) {
|
|
|
123
86
|
refuseRemote(members, world, key);
|
|
124
87
|
refuseUncoveredWrites(members, key, world);
|
|
125
88
|
const sources = new Set(members.entities.map((member) => world.sourceOf?.(member.name) ?? 'db'));
|
|
126
|
-
const
|
|
127
|
-
// One engine and a way into it: the engine gives the unwind AND the isolation.
|
|
128
|
-
|
|
129
|
-
|
|
89
|
+
const validator = (storage, name, schema) => new StorageGuard(schema.getFields(), name).guard(storage);
|
|
90
|
+
// One engine and a way into it: the engine gives the unwind AND the isolation. The
|
|
91
|
+
// question goes to the source these members live in — a composition answering for the
|
|
92
|
+
// default one would compensate a frame whose own engine holds transactions.
|
|
93
|
+
const source = sources.size === 1 ? [...sources][0] : undefined;
|
|
94
|
+
if (world.transacted && source !== undefined && (world.transacts?.(source) ?? true)) {
|
|
130
95
|
world.log.info(`${key} — transaction, source '${source}'`);
|
|
131
96
|
scope.registerValue(key, {
|
|
132
|
-
run: (fn) => ambient.enterFrame(key, () => world.transacted(source, (factory) => inScope(scope, members, factory,
|
|
97
|
+
run: (fn) => ambient.enterFrame(key, () => world.transacted(source, (factory) => inScope(scope, members, factory, validator, fn))),
|
|
133
98
|
});
|
|
134
99
|
continue;
|
|
135
100
|
}
|
|
136
101
|
// Split, or an engine that hands out no transaction: the frame keeps the before-image
|
|
137
|
-
// of every write and replays the inverses itself. `
|
|
102
|
+
// of every write and replays the inverses itself. `validator` stays OUTSIDE `recording`, so
|
|
138
103
|
// a write the entity refuses never enters the journal.
|
|
139
104
|
const why = sources.size > 1
|
|
140
105
|
? members.entities.map((m) => `${m.name} in '${world.sourceOf?.(m.name) ?? 'db'}'`).join(', ')
|
|
@@ -143,7 +108,7 @@ export function registerFrames(scope, keys, providers, world) {
|
|
|
143
108
|
scope.registerValue(key, {
|
|
144
109
|
run: (fn) => ambient.enterFrame(key, async () => {
|
|
145
110
|
const journal = [];
|
|
146
|
-
const record = (storage, name, schema) =>
|
|
111
|
+
const record = (storage, name, schema) => validator(recording(storage, name, schema, journal), name, schema);
|
|
147
112
|
try {
|
|
148
113
|
return await inScope(scope, members, world.storageFactory, record, fn);
|
|
149
114
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"together.js","sourceRoot":"","sources":["../../src/boot/together.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"together.js","sourceRoot":"","sources":["../../src/boot/together.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAmB,MAAM,iBAAiB,CAAC;AAE1E,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,kBAAkB,EAAqC,MAAM,eAAe,CAAC;AAG1H,OAAO,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AC,cAAe,EAAE,MAAM,EAAE,EAAW,CAAC,CAAC;gBACnF,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,OAAO,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;gBAC3C,CAAC;YACH,CAAC,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IACD,IAAI,UAAU,GAAG,CAAC,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;QACvC,KAAK,CAAC,GAAG,CAAC,IAAI,CACZ,kFAAkF;cAChF,mDAAmD,CACtD,CAAC;IACJ,CAAC;AACH,CAAC"}
|
package/dist/boot/types.d.ts
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The boot's two ends: what `createApp` takes, and what it hands back.
|
|
3
|
-
*
|
|
4
|
-
* The scan's descriptors moved to `frond.ts` and the auth contract to `auth.ts` — this
|
|
5
|
-
* file was named after a role ("the types"), so everything with nowhere else to be
|
|
6
|
-
* landed in it, seventeen notions deep.
|
|
7
|
-
*/
|
|
1
|
+
/** The boot's two ends. */
|
|
8
2
|
import type { Container } from '@fougere/container';
|
|
9
3
|
import type { Fronds } from '../descriptor/Fronds.js';
|
|
10
4
|
import type { FrondDescriptor } from '../descriptor/frond.js';
|
|
11
5
|
import type { ScanResult } from '../scan/result.js';
|
|
12
6
|
import type { SchemaView } from '@fougere/schema';
|
|
13
7
|
import type { StorageFactory } from '../storage.js';
|
|
8
|
+
import type { Constraint } from '../source.js';
|
|
14
9
|
import type { AppMiddleware } from '../wire/middleware.js';
|
|
15
10
|
import type { RpcAnswer, Transport } from '../wire/call.js';
|
|
16
11
|
import type { Extension } from './AppLifecycle.js';
|
|
@@ -26,103 +21,42 @@ export interface CreateAppOptions {
|
|
|
26
21
|
storageFactory?: StorageFactory;
|
|
27
22
|
/**
|
|
28
23
|
* Which source an entity's rows live in, and how to open a transaction on one — the two
|
|
29
|
-
* questions that decide whether `Together<[…]>` gets the engine's own unwind or replays
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* Optional together, because a host may hand in a bare `storageFactory` and know neither. A
|
|
33
|
-
* frame then compensates: not knowing where the rows are and promising atomicity over
|
|
34
|
-
* them are two different things, and only one of them is honest.
|
|
24
|
+
* questions that decide whether `Together<[…]>` gets the engine's own unwind or replays inverses
|
|
25
|
+
* itself.
|
|
35
26
|
*/
|
|
36
27
|
sourceOf?: (entityName: string) => string;
|
|
28
|
+
transacts?: (source: string) => boolean;
|
|
37
29
|
transacted?: <R>(source: string, fn: (storageFactory: StorageFactory) => Promise<R>) => Promise<R>;
|
|
38
|
-
/**
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
* A factory rather than a value, for the same reason `storageFactory` is one: core must
|
|
42
|
-
* not name a storage package, and this one costs 71 MB of downloaded extensions and a
|
|
43
|
-
* native module — nothing a first run that only wanted sqlite should carry. The host
|
|
44
|
-
* decides what backs it; `@fougere/adapter-duckdb` is one answer, not the contract.
|
|
45
|
-
*
|
|
46
|
-
* Called once per frond that asks, with the entity CLASSES its `reads:` named — a
|
|
47
|
-
* name would make the reader resolve the schema a second time.
|
|
48
|
-
*/
|
|
30
|
+
/** Whether that source refuses a constraint at the rows — the boot says so when it does not. */
|
|
31
|
+
enforces?: (source: string, constraint: Constraint) => boolean;
|
|
32
|
+
/** Builds the cross-source reader a frond gets when it declares `reads:`. */
|
|
49
33
|
sourcesFactory?: (reads: unknown[], frond: string) => Promise<unknown> | unknown;
|
|
50
|
-
/**
|
|
51
|
-
* What this app is built from — required, because producing it is what reads a disk.
|
|
52
|
-
*
|
|
53
|
-
* `scanProject` (`@fougere/core/node`) reads the fronds off the filesystem; a module a
|
|
54
|
-
* build wrote holds the same value with no disk at all. `createApp` cannot tell them
|
|
55
|
-
* apart, and that is the point: it names no builtin, so a runtime without `node:fs`
|
|
56
|
-
* runs it. `root` and `fronds` used to live here — both were arguments to the scan.
|
|
57
|
-
*/
|
|
34
|
+
/** What this app is built from — required, because producing it is what reads a disk. */
|
|
58
35
|
scan?: ScanResult | (() => Promise<ScanResult> | ScanResult);
|
|
59
|
-
/**
|
|
60
|
-
* What this app STATES it hosts — `frond('blog', { entities: [Post] })`.
|
|
61
|
-
*
|
|
62
|
-
* Passing this and not `scan:` is how an app says "do not scan": nothing reads a disk,
|
|
63
|
-
* nothing loads `typescript`, and what was not named does not exist. Passing both fills
|
|
64
|
-
* the members left unnamed from what the scan found — the app's word wins, the way
|
|
65
|
-
* `frond.config.ts` wins over the scan one level down.
|
|
66
|
-
*/
|
|
36
|
+
/** What this app STATES it hosts — `frond('blog', { entities: [Post] })`. */
|
|
67
37
|
fronds?: readonly FrondDescriptor[];
|
|
68
38
|
/**
|
|
69
39
|
* Remote fronds — label → address. What each remote hosts is discovered
|
|
70
40
|
* at the first miss (rpc.discover), never declared here.
|
|
71
41
|
*/
|
|
72
42
|
remotes?: Record<string, string>;
|
|
73
|
-
/**
|
|
74
|
-
* Builds the transport used to reach `remotes` addresses. Wired by
|
|
75
|
-
* layer-2 packages (e.g. @fougere/transport-http); required when
|
|
76
|
-
* `remotes` is non-empty.
|
|
77
|
-
*/
|
|
43
|
+
/** Builds the transport used to reach `remotes` addresses. */
|
|
78
44
|
remoteTransport?: (url: string) => Transport;
|
|
79
45
|
/**
|
|
80
46
|
* Which realization answers which port — see `FougereConfig.ports`. Needed only
|
|
81
47
|
* when two classes extend the same port; one is resolved by convention.
|
|
82
48
|
*/
|
|
83
49
|
ports?: Record<string, string>;
|
|
84
|
-
/**
|
|
85
|
-
* What this app takes on beyond its fronds, each stating what it does and what it undoes.
|
|
86
|
-
*
|
|
87
|
-
* `up` runs before `createApp` returns, in this order; `down` runs inside `dispose()`,
|
|
88
|
-
* in reverse. Three levels release in reverse of construction, which is the container's
|
|
89
|
-
* own rule read one level out: extensions first (built last), then the container, then
|
|
90
|
-
* `onDispose` — a resource opened before any of this existed.
|
|
91
|
-
*
|
|
92
|
-
* A member may be `undefined`, so a host writes a conditional one inline rather than a
|
|
93
|
-
* spread over a ternary. The framework's own two are always declared, `migrate` as an
|
|
94
|
-
* empty slot when nothing migrates: a host filling it later REPLACES that member in
|
|
95
|
-
* place instead of adding one after the seeds.
|
|
96
|
-
*/
|
|
50
|
+
/** What this app takes on beyond its fronds, each stating what it does and what it undoes. */
|
|
97
51
|
extensions?: readonly (Extension | undefined)[];
|
|
98
52
|
/**
|
|
99
|
-
* Released by `app.dispose()` AFTER the container, for a resource handed in rather
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
* NOT an extension, and the difference is a time: this was opened BEFORE the container,
|
|
103
|
-
* so it closes after it, while an extension's `up` runs after the container and its
|
|
104
|
-
* `down` therefore runs before. A storage's migration is an extension; its connection
|
|
105
|
-
* is not, and `ResolvedStorage` declares the two beside each other.
|
|
53
|
+
* Released by `app.dispose()` AFTER the container, for a resource handed in rather than built
|
|
54
|
+
* here — a storage connection is the one case today.
|
|
106
55
|
*/
|
|
107
56
|
onDispose?: () => Promise<void> | void;
|
|
108
|
-
/**
|
|
109
|
-
* Which protocol adapters this app serves — see `FougereConfig.adapters`.
|
|
110
|
-
* Carried onto the App so every door reads one answer instead of each host
|
|
111
|
-
* deciding for itself.
|
|
112
|
-
*/
|
|
57
|
+
/** Which protocol adapters this app serves — see `FougereConfig.adapters`. */
|
|
113
58
|
adapters?: Record<string, boolean | undefined>;
|
|
114
|
-
/**
|
|
115
|
-
* Carries an announced fact out of this process — a broker, a queue, a log.
|
|
116
|
-
*
|
|
117
|
-
* Called for every emission, ALONGSIDE the local dispatch and never instead of it: a
|
|
118
|
-
* listener in this process is reached directly, and this is how the others hear.
|
|
119
|
-
*
|
|
120
|
-
* It exists because the local dispatch finds its listeners by having READ their code,
|
|
121
|
-
* which stops at the repository boundary. A carrier hands the fact to a NAME; the far
|
|
122
|
-
* side subscribes to that same name from its own code, and neither ever reads the other.
|
|
123
|
-
*
|
|
124
|
-
* Its failure never reaches the emitter — same rule as a subscriber's.
|
|
125
|
-
*/
|
|
59
|
+
/** Carries an announced fact out of this process — a broker, a queue, a log. */
|
|
126
60
|
onEmit?: (fact: string, payload: unknown) => void | Promise<void>;
|
|
127
61
|
/** Passive observers of every dispatch transition. */
|
|
128
62
|
dispatchObservers?: readonly DispatchObserver[];
|
|
@@ -140,13 +74,7 @@ export interface App extends DispatchPort {
|
|
|
140
74
|
local: DispatchPort;
|
|
141
75
|
/** Root container with builtins + frond scopes. */
|
|
142
76
|
container: Container;
|
|
143
|
-
/**
|
|
144
|
-
* Which protocol adapters this app declared, from `fougere.config.ts`.
|
|
145
|
-
*
|
|
146
|
-
* Read by the doors themselves, so an undeclared adapter serves nothing whatever
|
|
147
|
-
* the host mounted — the route file may exist, the middleware may be installed, and
|
|
148
|
-
* the answer is still "not here".
|
|
149
|
-
*/
|
|
77
|
+
/** Which protocol adapters this app declared, from `fougere.config.ts`. */
|
|
150
78
|
adapters: Record<string, boolean | undefined>;
|
|
151
79
|
/** Where a call goes, as the config declared it — frond name to address. */
|
|
152
80
|
remotes: Readonly<Record<string, string>>;
|
|
@@ -155,113 +83,43 @@ export interface App extends DispatchPort {
|
|
|
155
83
|
/** Resolve from root container (shortcut). */
|
|
156
84
|
resolve<T>(name: string): T;
|
|
157
85
|
/**
|
|
158
|
-
* Resolve an entity's schema — the local `entityClass` when it's hosted or
|
|
159
|
-
*
|
|
160
|
-
* (`rpc.discover` to `Card.toSchema`). The one way to get a live schema for an
|
|
161
|
-
* entity whose class may not be importable at all (another repo, another
|
|
162
|
-
* language) — a card travelled, but until now its `schema` was thrown away.
|
|
86
|
+
* Resolve an entity's schema — the local `entityClass` when it's hosted or scanned here, else
|
|
87
|
+
* reconstructed from the remote's identity card (`rpc.discover` to `Card.toSchema`).
|
|
163
88
|
*/
|
|
164
89
|
schemaFor(entity: string): Promise<SchemaView>;
|
|
165
|
-
/**
|
|
166
|
-
* The door a name exposes to one audience, or `undefined` when it exposes
|
|
167
|
-
* none. A named surface is CLOSED: a name with no door of its own under that
|
|
168
|
-
* surface is not in it — it never falls back to the full one.
|
|
169
|
-
*
|
|
170
|
-
* **Not always a façade**, despite the name: when the owning frond is declared
|
|
171
|
-
* remote, nothing is registered locally (`bootstrap.ts`, `declaredRemotes`) and
|
|
172
|
-
* this resolves to a doublure — a façade-shaped stand-in (`remote.ts`). The
|
|
173
|
-
* caller cannot tell, which is the point; the word here was simply wrong.
|
|
174
|
-
*
|
|
175
|
-
* The one way an adapter reaches that door. It exists so the key format stays
|
|
176
|
-
* inside core (see `facadeKeyOf`), which is what lets a projection package
|
|
177
|
-
* stay structurally typed and depend on nothing.
|
|
178
|
-
*/
|
|
90
|
+
/** The door a name exposes to one audience, or `undefined` when it exposes none. */
|
|
179
91
|
facadeFor(entity: string, surface?: string): Record<string, Function> | undefined;
|
|
180
92
|
/**
|
|
181
|
-
* The canonical contracts served beside a facade, after prefab + scan + config,
|
|
182
|
-
*
|
|
183
|
-
* this table instead of replaying those decisions.
|
|
93
|
+
* The canonical contracts served beside a facade, after prefab + scan + config, binding, kind,
|
|
94
|
+
* topology and surface resolution.
|
|
184
95
|
*/
|
|
185
96
|
operationsFor(entity: string, surface?: string): EffectiveOperationsMap | undefined;
|
|
186
|
-
/**
|
|
187
|
-
* The facts this app has a listener for — what a carrier must subscribe to on its behalf.
|
|
188
|
-
*
|
|
189
|
-
* Derived from the signatures it scanned (`Fact<T>` in an op's parameters), so a process
|
|
190
|
-
* states what it listens to without anyone declaring it twice. The dual of `onEmit`: one
|
|
191
|
-
* says what leaves, this says what should be brought in.
|
|
192
|
-
*/
|
|
97
|
+
/** The facts this app has a listener for — what a carrier must subscribe to on its behalf. */
|
|
193
98
|
listensTo(): string[];
|
|
194
|
-
/**
|
|
195
|
-
* Hand a fact that came from OUTSIDE to the listeners in this process — and stop there.
|
|
196
|
-
*
|
|
197
|
-
* The dual of `onEmit`, and deliberately not the same thing as announcing: resolving the
|
|
198
|
-
* emission value to deliver an inbound fact would carry it straight back out through
|
|
199
|
-
* `onEmit`, so a hub echoed every reading it received to the whole fleet. Receiving and
|
|
200
|
-
* announcing are two operations; only one of them leaves.
|
|
201
|
-
*
|
|
202
|
-
* The local dispatch is identical either way — same judge, same binding, same
|
|
203
|
-
* middlewares — so a fact off a wire is no less checked than one raised next door.
|
|
204
|
-
*
|
|
205
|
-
* **It waits, and it tells** — the opposite of announcing, on purpose. It resolves once
|
|
206
|
-
* every listener here is done, and REJECTS with an `AggregateError` if any refused. A
|
|
207
|
-
* carrier's whole job is to know whether the fact landed: at-least-once is retrying what
|
|
208
|
-
* failed, so a delivery that cannot report makes durability impossible to build above it.
|
|
209
|
-
* "Dispatch is not delivery" protects the EMITTER from a slow subscriber; a carrier is
|
|
210
|
-
* not the emitter, it is the party whose business this is.
|
|
211
|
-
*
|
|
212
|
-
* It still holds nothing. A refused fact is refused, and whether it comes back is the
|
|
213
|
-
* carrier's decision — Fougere puts the channel underneath rather than reimplementing it.
|
|
214
|
-
*/
|
|
99
|
+
/** Hand a fact that came from OUTSIDE to the listeners in this process — and stop there. */
|
|
215
100
|
deliver(fact: string, payload: unknown): Promise<void>;
|
|
216
101
|
/**
|
|
217
|
-
* The storage an entity is backed by, resolved through its owning frond's scope —
|
|
218
|
-
*
|
|
219
|
-
* or when the app booted with no storage at all.
|
|
220
|
-
*
|
|
221
|
-
* `unknown` because the port belongs to whoever wired it: narrowing it to `Storage`
|
|
222
|
-
* is the caller saying which implementation they are standing on.
|
|
102
|
+
* The storage an entity is backed by, resolved through its owning frond's scope — the dual of
|
|
103
|
+
* {@link facadeFor}.
|
|
223
104
|
*/
|
|
224
105
|
storageFor(entity: string): unknown | undefined;
|
|
225
|
-
/**
|
|
226
|
-
* The presenter of an entity, resolved through its owning frond's scope.
|
|
227
|
-
*
|
|
228
|
-
* Same shape as {@link storageFor}, and it exists so an adapter never spells the container
|
|
229
|
-
* key itself: `schema-graphql` wrote out `${Name}Presenter` by hand, and a key respelled
|
|
230
|
-
* in a second place finds nothing and reports nothing the day the convention moves.
|
|
231
|
-
*/
|
|
106
|
+
/** The presenter of an entity, resolved through its owning frond's scope. */
|
|
232
107
|
presenterFor(entity: string): unknown | undefined;
|
|
233
108
|
/** Dispose the root container. */
|
|
234
109
|
dispose(): Promise<void>;
|
|
235
|
-
/**
|
|
236
|
-
* Stop taking calls, and resolve once the running ones are done.
|
|
237
|
-
*
|
|
238
|
-
* The step before releasing, when there is work on the app: `dispose()` closes a
|
|
239
|
-
* storage connection the running calls are standing on. Rejects on `timeoutMs`
|
|
240
|
-
* naming how many are left, rather than resolving as if it had succeeded.
|
|
241
|
-
*/
|
|
110
|
+
/** Stop taking calls, and resolve once the running ones are done. */
|
|
242
111
|
drain(timeoutMs?: number): Promise<void>;
|
|
243
112
|
/** How many calls are running right now — one count for all three doors and the wire. */
|
|
244
113
|
inFlight(): number;
|
|
245
|
-
/**
|
|
246
|
-
* The same disposal, spelled so the language does it: `await using app = await
|
|
247
|
-
* createApp(…)`. Twelve of the twenty-six mounts in this repo's own tests never
|
|
248
|
-
* called `dispose()` — a scope that closes itself is the only version of that
|
|
249
|
-
* rule nobody forgets.
|
|
250
|
-
*/
|
|
114
|
+
/** The same disposal, spelled so the language does it: `await using app = await createApp(…)`. */
|
|
251
115
|
[Symbol.asyncDispose](): Promise<void>;
|
|
252
116
|
/**
|
|
253
117
|
* What this app took on, in the order it will release them. The reading of
|
|
254
118
|
* `CreateAppOptions.extensions` after the boot resolved it.
|
|
255
119
|
*/
|
|
256
120
|
extensions(): string[];
|
|
257
|
-
/**
|
|
258
|
-
|
|
259
|
-
*
|
|
260
|
-
* The gesture a package uses to add a reading core does not hold: an app that never
|
|
261
|
-
* installed it never registers it, so the runner's refusal is the whole degradation.
|
|
262
|
-
* A name already declared is refused rather than replaced — `discover` included.
|
|
263
|
-
*/
|
|
264
|
-
serveRpc(op: string, answer: RpcAnswer): void;
|
|
121
|
+
/** Declare one `rpc` op — what the app says about ITSELF, beside the card. */
|
|
122
|
+
serveRpc(operationName: string, answer: RpcAnswer): void;
|
|
265
123
|
/** Register a global app middleware (runs on every operation). */
|
|
266
124
|
/** Watch every dispatch transition; the returned function unsubscribes. */
|
|
267
125
|
observe(observer: DispatchObserver): () => void;
|
package/dist/boot/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/boot/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/boot/types.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,+BAA+B;AAC/B,MAAM,WAAW,gBAAgB;IAC/B,0DAA0D;IAC1D,eAAe,EAAE,MAAM,SAAS,CAAC;IAC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AA4F;IAC5F,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD;;;OAGG;IACH,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IAChD,6EAA6E;IAC7E,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IAClD,kCAAkC;IAClC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACzB,qEAAqE;IACrE,KAAK,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,yFAAyF;IACzF,QAAQ,IAAI,MAAM,CAAC;IACnB,kGAAkG;IAClG,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC;;;OAGG;IACH,UAAU,IAAI,MAAM,EAAE,CAAC;IACvB,8EAA8E;IAC9E,QAAQ,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAAC;IACzD,kEAAkE;IAClE,2EAA2E;IAC3E,OAAO,CAAC,QAAQ,EAAE,gBAAgB,GAAG,MAAM,IAAI,CAAC;IAChD,GAAG,CAAC,UAAU,EAAE,aAAa,GAAG,IAAI,CAAC;IACrC,8DAA8D;IAC9D,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,GAAG,IAAI,CAAC;IACrD,oEAAoE;IACpE,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** The process environment, as a service — so a handler asks for it rather than reading it. */
|
|
2
|
+
export declare class Config {
|
|
3
|
+
private readonly env;
|
|
4
|
+
constructor(env?: Record<string, string | undefined>);
|
|
5
|
+
get<T = string>(key: string, fallback?: T): T;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/builtin/config.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,qBAAa,MAAM;IACL,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAkB;IAErF,GAAG,CAAC,CAAC,GAAG,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC;CAG9C"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** The process environment, as a service — so a handler asks for it rather than reading it. */
|
|
2
|
+
export class Config {
|
|
3
|
+
env;
|
|
4
|
+
constructor(env = envOfProcess()) {
|
|
5
|
+
this.env = env;
|
|
6
|
+
}
|
|
7
|
+
get(key, fallback) {
|
|
8
|
+
return this.env[key] ?? fallback;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
function envOfProcess() {
|
|
12
|
+
const proc = globalThis.process;
|
|
13
|
+
return proc?.env ?? {};
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/builtin/config.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,OAAO,MAAM;IACY;IAA7B,YAA6B,MAA0C,YAAY,EAAE;QAAxD,QAAG,GAAH,GAAG,CAAqD;IAAG,CAAC;IAEzF,GAAG,CAAa,GAAW,EAAE,QAAY;QACvC,OAAQ,IAAI,CAAC,GAAG,CAAC,GAAG,CAAO,IAAK,QAAc,CAAC;IACjD,CAAC;CACF;AAED,SAAS,YAAY;IACnB,MAAM,IAAI,GAAI,UAAyE,CAAC,OAAO,CAAC;IAChG,OAAO,IAAI,EAAE,GAAG,IAAI,EAAE,CAAC;AACzB,CAAC"}
|
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Fougere Logger — structured, colored, multi-runtime.
|
|
3
|
-
*
|
|
4
|
-
* Works on Node, Bun, Deno, Cloudflare Workers (console-based, no native bindings).
|
|
5
|
-
*/
|
|
1
|
+
/** Fougere Logger — structured, colored, multi-runtime. */
|
|
6
2
|
export type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'silent';
|
|
7
|
-
/**
|
|
8
|
-
* One line, before it was formatted for a terminal.
|
|
9
|
-
*
|
|
10
|
-
* The console form is already cooked — ANSI codes, a badge, a timestamp — so anything
|
|
11
|
-
* that wants to FORWARD a log needs it before that. What travels is the structure, and
|
|
12
|
-
* nothing here knows where it goes.
|
|
13
|
-
*/
|
|
3
|
+
/** One line, before it was formatted for a terminal. */
|
|
14
4
|
export interface LogRecord {
|
|
15
5
|
level: Exclude<LogLevel, 'silent'>;
|
|
16
6
|
/** The logger's own name — 'boot:app', 'boot:app:catalog'. */
|
|
@@ -23,20 +13,9 @@ export interface LogRecord {
|
|
|
23
13
|
export type LogSink = (record: LogRecord) => void;
|
|
24
14
|
/** Take every line this process logs. Returns the way to withdraw. */
|
|
25
15
|
export declare function onLog(next: LogSink): () => void;
|
|
26
|
-
/**
|
|
27
|
-
* The level the PROCESS was started with. Read here rather than only at `applyConfig`,
|
|
28
|
-
* which runs after the boot has already said where its root is — an operator asking for
|
|
29
|
-
* `warn` got that line anyway. Guarded: this module runs on Workers, where there is no
|
|
30
|
-
* `process`.
|
|
31
|
-
*/
|
|
16
|
+
/** The level the PROCESS was started with. */
|
|
32
17
|
export declare function envLevel(): LogLevel | undefined;
|
|
33
|
-
/**
|
|
34
|
-
* Set the level for every logger in this process, at once.
|
|
35
|
-
*
|
|
36
|
-
* Refuses a level it does not know rather than storing `undefined` as the threshold:
|
|
37
|
-
* every comparison against it is then `NaN`, so nothing is filtered and `logLevel()`
|
|
38
|
-
* reports its own fallback instead of what is in force.
|
|
39
|
-
*/
|
|
18
|
+
/** Set the level for every logger in this process, at once. */
|
|
40
19
|
export declare function setLogLevel(level: LogLevel): void;
|
|
41
20
|
/** What the level is now — the dual, so a reload can report what it changed. */
|
|
42
21
|
export declare function logLevel(): LogLevel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/builtin/logger.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAE3D,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEtE,wDAAwD;AACxD,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACnC,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,0BAA0B;IAC1B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,MAAM,OAAO,GAAG,CAAC,MAAM,EAAE,SAAS,KAAK,IAAI,CAAC;AAKlD,sEAAsE;AACtE,wBAAgB,KAAK,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,IAAI,CAM/C;AAOD,8CAA8C;AAC9C,wBAAgB,QAAQ,IAAI,QAAQ,GAAG,SAAS,CAG/C;AAED,+DAA+D;AAC/D,wBAAgB,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAKjD;AAED,gFAAgF;AAChF,wBAAgB,QAAQ,IAAI,QAAQ,CAEnC;AAuCD,MAAM,WAAW,aAAa;IAC5B,4BAA4B;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,qBAAa,MAAM;IACjB,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,KAAK,CAAU;gBAEX,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC;IAKlE,oFAAoF;IACpF,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAI3B,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE;IACrC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE;IACpC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE;IACpC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE;IAErC,OAAO,CAAC,GAAG;CAyBZ"}
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Works on Node, Bun, Deno, Cloudflare Workers (console-based, no native bindings).
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Who else takes this process's log lines, beside the console. A list, like the span
|
|
8
|
-
* sinks: a line is one fact, and forwarding it twice is the caller's business.
|
|
9
|
-
*
|
|
10
|
-
* Nothing is built when nobody listens — the record is only shaped if a sink exists.
|
|
11
|
-
*/
|
|
1
|
+
/** Fougere Logger — structured, colored, multi-runtime. */
|
|
2
|
+
/** Who else takes this process's log lines, beside the console. */
|
|
12
3
|
const sinks = [];
|
|
13
4
|
/** Take every line this process logs. Returns the way to withdraw. */
|
|
14
5
|
export function onLog(next) {
|
|
@@ -20,32 +11,14 @@ export function onLog(next) {
|
|
|
20
11
|
};
|
|
21
12
|
}
|
|
22
13
|
const LEVELS = { debug: 0, info: 1, warn: 2, error: 3, silent: 4 };
|
|
23
|
-
/**
|
|
24
|
-
* The level, held ONCE for the process and CONSULTED at every emission.
|
|
25
|
-
*
|
|
26
|
-
* It used to be copied into each Logger by the constructor, and copied again by
|
|
27
|
-
* `child()` — so there was no place where "the level" was, and changing it meant
|
|
28
|
-
* rebuilding every logger AND everything that had been handed one. A value read at
|
|
29
|
-
* the moment it is used costs the same and can move.
|
|
30
|
-
*/
|
|
14
|
+
/** The level, held ONCE for the process and CONSULTED at every emission. */
|
|
31
15
|
let threshold = LEVELS[envLevel() ?? 'info'];
|
|
32
|
-
/**
|
|
33
|
-
* The level the PROCESS was started with. Read here rather than only at `applyConfig`,
|
|
34
|
-
* which runs after the boot has already said where its root is — an operator asking for
|
|
35
|
-
* `warn` got that line anyway. Guarded: this module runs on Workers, where there is no
|
|
36
|
-
* `process`.
|
|
37
|
-
*/
|
|
16
|
+
/** The level the PROCESS was started with. */
|
|
38
17
|
export function envLevel() {
|
|
39
18
|
const raw = typeof process === 'undefined' ? undefined : process.env.FOUGERE_LOG_LEVEL;
|
|
40
19
|
return raw !== undefined && raw in LEVELS ? raw : undefined;
|
|
41
20
|
}
|
|
42
|
-
/**
|
|
43
|
-
* Set the level for every logger in this process, at once.
|
|
44
|
-
*
|
|
45
|
-
* Refuses a level it does not know rather than storing `undefined` as the threshold:
|
|
46
|
-
* every comparison against it is then `NaN`, so nothing is filtered and `logLevel()`
|
|
47
|
-
* reports its own fallback instead of what is in force.
|
|
48
|
-
*/
|
|
21
|
+
/** Set the level for every logger in this process, at once. */
|
|
49
22
|
export function setLogLevel(level) {
|
|
50
23
|
if (!(level in LEVELS)) {
|
|
51
24
|
throw new Error(`Unknown log level: '${level}'. One of ${Object.keys(LEVELS).join(', ')}.`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/builtin/logger.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAiB3D,mEAAmE;AACnE,MAAM,KAAK,GAAc,EAAE,CAAC;AAE5B,sEAAsE;AACtE,MAAM,UAAU,KAAK,CAAC,IAAa;IACjC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjB,OAAO,GAAG,EAAE;QACV,MAAM,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC/B,IAAI,EA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