@fougere/core 0.9.2-alpha.0 → 0.10.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/dist/AdapterConfig.d.ts +10 -0
- package/dist/AdapterConfig.d.ts.map +1 -0
- package/dist/AdapterConfig.js +3 -0
- package/dist/AdapterConfig.js.map +1 -0
- package/dist/AnswerFor.d.ts +5 -0
- package/dist/AnswerFor.d.ts.map +1 -0
- package/dist/AnswerFor.js +2 -0
- package/dist/AnswerFor.js.map +1 -0
- package/dist/Binding.d.ts +4 -0
- package/dist/Binding.d.ts.map +1 -0
- package/dist/Binding.js +2 -0
- package/dist/Binding.js.map +1 -0
- package/dist/{identity.d.ts → CallIdentity.d.ts} +4 -17
- package/dist/CallIdentity.d.ts.map +1 -0
- package/dist/{identity.js → CallIdentity.js} +1 -6
- package/dist/CallIdentity.js.map +1 -0
- package/dist/Constraint.d.ts +3 -0
- package/dist/Constraint.d.ts.map +1 -0
- package/dist/Constraint.js +2 -0
- package/dist/Constraint.js.map +1 -0
- package/dist/{conventions.d.ts → Conventions.d.ts} +14 -8
- package/dist/Conventions.d.ts.map +1 -0
- package/dist/{conventions.js → Conventions.js} +7 -3
- package/dist/Conventions.js.map +1 -0
- package/dist/ConventionsInput.d.ts +8 -0
- package/dist/ConventionsInput.d.ts.map +1 -0
- package/dist/ConventionsInput.js +2 -0
- package/dist/ConventionsInput.js.map +1 -0
- package/dist/Ctor.d.ts +3 -0
- package/dist/Ctor.d.ts.map +1 -0
- package/dist/Ctor.js +2 -0
- package/dist/Ctor.js.map +1 -0
- package/dist/Declared.d.ts +8 -0
- package/dist/Declared.d.ts.map +1 -0
- package/dist/Declared.js +2 -0
- package/dist/Declared.js.map +1 -0
- package/dist/DeclaredHandler.d.ts +18 -0
- package/dist/DeclaredHandler.d.ts.map +1 -0
- package/dist/DeclaredHandler.js +2 -0
- package/dist/DeclaredHandler.js.map +1 -0
- package/dist/DeclaredSubject.d.ts +7 -0
- package/dist/DeclaredSubject.d.ts.map +1 -0
- package/dist/DeclaredSubject.js +2 -0
- package/dist/DeclaredSubject.js.map +1 -0
- package/dist/{graph.d.ts → DomainCluster.d.ts} +3 -12
- package/dist/DomainCluster.d.ts.map +1 -0
- package/dist/{graph.js → DomainCluster.js} +1 -1
- package/dist/DomainCluster.js.map +1 -0
- package/dist/EffectiveCollector.d.ts +8 -0
- package/dist/EffectiveCollector.d.ts.map +1 -0
- package/dist/EffectiveCollector.js +2 -0
- package/dist/EffectiveCollector.js.map +1 -0
- package/dist/EffectiveOperation.d.ts +65 -0
- package/dist/EffectiveOperation.d.ts.map +1 -0
- package/dist/EffectiveOperation.js +2 -0
- package/dist/EffectiveOperation.js.map +1 -0
- package/dist/EffectiveOperationModel.d.ts +24 -0
- package/dist/EffectiveOperationModel.d.ts.map +1 -0
- package/dist/{effective-operation.js → EffectiveOperationModel.js} +26 -23
- package/dist/EffectiveOperationModel.js.map +1 -0
- package/dist/EffectiveOperationOptions.d.ts +7 -0
- package/dist/EffectiveOperationOptions.d.ts.map +1 -0
- package/dist/EffectiveOperationOptions.js +2 -0
- package/dist/EffectiveOperationOptions.js.map +1 -0
- package/dist/EffectiveOperationSemantics.d.ts +8 -0
- package/dist/EffectiveOperationSemantics.d.ts.map +1 -0
- package/dist/EffectiveOperationSemantics.js +8 -0
- package/dist/EffectiveOperationSemantics.js.map +1 -0
- package/dist/EffectiveOperationsMap.d.ts +3 -0
- package/dist/EffectiveOperationsMap.d.ts.map +1 -0
- package/dist/EffectiveOperationsMap.js +2 -0
- package/dist/EffectiveOperationsMap.js.map +1 -0
- package/dist/EffectiveParameter.d.ts +14 -0
- package/dist/EffectiveParameter.d.ts.map +1 -0
- package/dist/EffectiveParameter.js +2 -0
- package/dist/EffectiveParameter.js.map +1 -0
- package/dist/EntityNode.d.ts +7 -0
- package/dist/EntityNode.d.ts.map +1 -0
- package/dist/EntityNode.js +2 -0
- package/dist/EntityNode.js.map +1 -0
- package/dist/{config-loader.d.ts → FougereConfig.d.ts} +16 -17
- package/dist/FougereConfig.d.ts.map +1 -0
- package/dist/{config-loader.js → FougereConfig.js} +1 -2
- package/dist/FougereConfig.js.map +1 -0
- package/dist/FougereNames.d.ts +4 -0
- package/dist/FougereNames.d.ts.map +1 -0
- package/dist/FougereNames.js +2 -0
- package/dist/FougereNames.js.map +1 -0
- package/dist/FougerePorts.d.ts +9 -0
- package/dist/FougerePorts.d.ts.map +1 -0
- package/dist/FougerePorts.js +2 -0
- package/dist/FougerePorts.js.map +1 -0
- package/dist/FrondConfig.d.ts +36 -0
- package/dist/FrondConfig.d.ts.map +1 -0
- package/dist/{frond-config.js → FrondConfig.js} +1 -1
- package/dist/FrondConfig.js.map +1 -0
- package/dist/{declare.d.ts → FrondDeclaration.d.ts} +7 -29
- package/dist/FrondDeclaration.d.ts.map +1 -0
- package/dist/{declare.js → FrondDeclaration.js} +2 -3
- package/dist/FrondDeclaration.js.map +1 -0
- package/dist/FrondIdentity.d.ts +8 -0
- package/dist/FrondIdentity.d.ts.map +1 -0
- package/dist/FrondIdentity.js +2 -0
- package/dist/FrondIdentity.js.map +1 -0
- package/dist/NameOf.d.ts +10 -0
- package/dist/NameOf.d.ts.map +1 -0
- package/dist/NameOf.js +2 -0
- package/dist/NameOf.js.map +1 -0
- package/dist/OperationOverride.d.ts +38 -0
- package/dist/OperationOverride.d.ts.map +1 -0
- package/dist/OperationOverride.js +2 -0
- package/dist/OperationOverride.js.map +1 -0
- package/dist/PortChoice.d.ts +13 -0
- package/dist/PortChoice.d.ts.map +1 -0
- package/dist/PortChoice.js +2 -0
- package/dist/PortChoice.js.map +1 -0
- package/dist/{source.d.ts → Source.d.ts} +5 -24
- package/dist/Source.d.ts.map +1 -0
- package/dist/{source.js → Source.js} +1 -1
- package/dist/{source.js.map → Source.js.map} +1 -1
- package/dist/SourceConfig.d.ts +10 -0
- package/dist/SourceConfig.d.ts.map +1 -0
- package/dist/SourceConfig.js +2 -0
- package/dist/SourceConfig.js.map +1 -0
- package/dist/SourceView.d.ts +13 -0
- package/dist/SourceView.d.ts.map +1 -0
- package/dist/SourceView.js +2 -0
- package/dist/SourceView.js.map +1 -0
- package/dist/VerifiedCall.d.ts +8 -0
- package/dist/VerifiedCall.d.ts.map +1 -0
- package/dist/VerifiedCall.js +2 -0
- package/dist/VerifiedCall.js.map +1 -0
- package/dist/boot/App.d.ts +71 -0
- package/dist/boot/App.d.ts.map +1 -0
- package/dist/boot/App.js +2 -0
- package/dist/boot/App.js.map +1 -0
- package/dist/boot/AppLifecycle.d.ts +2 -19
- package/dist/boot/AppLifecycle.d.ts.map +1 -1
- package/dist/boot/AppLifecycle.js.map +1 -1
- package/dist/boot/AuthConfig.d.ts +14 -0
- package/dist/boot/AuthConfig.d.ts.map +1 -0
- package/dist/boot/AuthConfig.js +2 -0
- package/dist/boot/AuthConfig.js.map +1 -0
- package/dist/boot/AuthContext.d.ts +12 -0
- package/dist/boot/AuthContext.d.ts.map +1 -0
- package/dist/boot/AuthContext.js +2 -0
- package/dist/boot/AuthContext.js.map +1 -0
- package/dist/boot/AuthRuntime.d.ts +19 -0
- package/dist/boot/AuthRuntime.d.ts.map +1 -0
- package/dist/boot/AuthRuntime.js +2 -0
- package/dist/boot/AuthRuntime.js.map +1 -0
- package/dist/boot/CreateAppOptions.d.ts +81 -0
- package/dist/boot/CreateAppOptions.d.ts.map +1 -0
- package/dist/boot/CreateAppOptions.js +2 -0
- package/dist/boot/CreateAppOptions.js.map +1 -0
- package/dist/boot/Emissions.d.ts +11 -7
- package/dist/boot/Emissions.d.ts.map +1 -1
- package/dist/boot/Emissions.js +83 -45
- package/dist/boot/Emissions.js.map +1 -1
- package/dist/boot/Extension.d.ts +20 -0
- package/dist/boot/Extension.d.ts.map +1 -0
- package/dist/boot/Extension.js +2 -0
- package/dist/boot/Extension.js.map +1 -0
- package/dist/boot/apply.d.ts +1 -1
- package/dist/boot/apply.js +1 -1
- package/dist/boot/apply.js.map +1 -1
- package/dist/boot/bootstrap.d.ts +2 -1
- package/dist/boot/bootstrap.d.ts.map +1 -1
- package/dist/boot/bootstrap.js +77 -42
- package/dist/boot/bootstrap.js.map +1 -1
- package/dist/boot/card.d.ts +2 -2
- package/dist/boot/card.d.ts.map +1 -1
- package/dist/boot/card.js +11 -8
- package/dist/boot/card.js.map +1 -1
- package/dist/boot/declared.d.ts +29 -0
- package/dist/boot/declared.d.ts.map +1 -0
- package/dist/boot/declared.js +67 -0
- package/dist/boot/declared.js.map +1 -0
- package/dist/boot/frame.d.ts +1 -1
- package/dist/boot/frame.js +1 -1
- package/dist/boot/hosted.d.ts +1 -1
- package/dist/boot/hosted.d.ts.map +1 -1
- package/dist/boot/install.d.ts +11 -7
- package/dist/boot/install.d.ts.map +1 -1
- package/dist/boot/install.js +30 -24
- package/dist/boot/install.js.map +1 -1
- package/dist/boot/ownership.d.ts +8 -4
- package/dist/boot/ownership.d.ts.map +1 -1
- package/dist/boot/ownership.js +91 -33
- package/dist/boot/ownership.js.map +1 -1
- package/dist/boot/ports.d.ts +4 -3
- package/dist/boot/ports.d.ts.map +1 -1
- package/dist/boot/ports.js +48 -37
- package/dist/boot/ports.js.map +1 -1
- package/dist/boot/remote.d.ts +3 -8
- package/dist/boot/remote.d.ts.map +1 -1
- package/dist/boot/remote.js +19 -15
- package/dist/boot/remote.js.map +1 -1
- package/dist/boot/runner.d.ts +2 -2
- package/dist/boot/runner.d.ts.map +1 -1
- package/dist/boot/seed.d.ts +4 -3
- package/dist/boot/seed.d.ts.map +1 -1
- package/dist/boot/seed.js +6 -6
- package/dist/boot/seed.js.map +1 -1
- package/dist/boot/statement-drift.d.ts +4 -3
- package/dist/boot/statement-drift.d.ts.map +1 -1
- package/dist/boot/statement-drift.js.map +1 -1
- package/dist/boot/together.d.ts +8 -4
- package/dist/boot/together.d.ts.map +1 -1
- package/dist/boot/together.js +60 -27
- package/dist/boot/together.js.map +1 -1
- package/dist/builtin/Carry.d.ts +29 -0
- package/dist/builtin/Carry.d.ts.map +1 -0
- package/dist/builtin/Carry.js +46 -0
- package/dist/builtin/Carry.js.map +1 -0
- package/dist/builtin/LogLevel.d.ts +2 -0
- package/dist/builtin/LogLevel.d.ts.map +1 -0
- package/dist/builtin/LogLevel.js +2 -0
- package/dist/builtin/LogLevel.js.map +1 -0
- package/dist/builtin/LogRecord.d.ts +12 -0
- package/dist/builtin/LogRecord.d.ts.map +1 -0
- package/dist/builtin/LogRecord.js +2 -0
- package/dist/builtin/LogRecord.js.map +1 -0
- package/dist/builtin/LogSink.d.ts +4 -0
- package/dist/builtin/LogSink.d.ts.map +1 -0
- package/dist/builtin/LogSink.js +2 -0
- package/dist/builtin/LogSink.js.map +1 -0
- package/dist/builtin/Logger.d.ts +27 -0
- package/dist/builtin/Logger.d.ts.map +1 -0
- package/dist/builtin/{logger.js → Logger.js} +1 -47
- package/dist/builtin/Logger.js.map +1 -0
- package/dist/builtin/LoggerOptions.d.ts +14 -0
- package/dist/builtin/LoggerOptions.d.ts.map +1 -0
- package/dist/builtin/LoggerOptions.js +2 -0
- package/dist/builtin/LoggerOptions.js.map +1 -0
- package/dist/builtin/Rendered.d.ts +21 -0
- package/dist/builtin/Rendered.d.ts.map +1 -0
- package/dist/builtin/Rendered.js +2 -0
- package/dist/builtin/Rendered.js.map +1 -0
- package/dist/contract.d.ts +34 -13
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js +9 -6
- package/dist/contract.js.map +1 -1
- package/dist/crypto/CryptoPort.d.ts +12 -0
- package/dist/crypto/CryptoPort.d.ts.map +1 -0
- package/dist/crypto/CryptoPort.js +2 -0
- package/dist/crypto/CryptoPort.js.map +1 -0
- package/dist/crypto/PublicJwk.d.ts +8 -0
- package/dist/crypto/PublicJwk.d.ts.map +1 -0
- package/dist/crypto/PublicJwk.js +2 -0
- package/dist/crypto/PublicJwk.js.map +1 -0
- package/dist/crypto/Signer.d.ts +5 -0
- package/dist/crypto/Signer.d.ts.map +1 -0
- package/dist/crypto/Signer.js +2 -0
- package/dist/crypto/Signer.js.map +1 -0
- package/dist/crypto/Verifier.d.ts +6 -0
- package/dist/crypto/Verifier.d.ts.map +1 -0
- package/dist/crypto/Verifier.js +2 -0
- package/dist/crypto/Verifier.js.map +1 -0
- package/dist/crypto/node.d.ts +4 -1
- package/dist/crypto/node.d.ts.map +1 -1
- package/dist/crypto/node.js.map +1 -1
- package/dist/crypto/webcrypto.d.ts +4 -1
- package/dist/crypto/webcrypto.d.ts.map +1 -1
- package/dist/crypto/webcrypto.js.map +1 -1
- package/dist/define.d.ts +1 -1
- package/dist/descriptor/CollectorEntry.d.ts +12 -0
- package/dist/descriptor/CollectorEntry.d.ts.map +1 -0
- package/dist/descriptor/CollectorEntry.js +2 -0
- package/dist/descriptor/CollectorEntry.js.map +1 -0
- package/dist/descriptor/EntityEntry.d.ts +13 -0
- package/dist/descriptor/EntityEntry.d.ts.map +1 -0
- package/dist/descriptor/EntityEntry.js +2 -0
- package/dist/descriptor/EntityEntry.js.map +1 -0
- package/dist/descriptor/ExtensionEntry.d.ts +20 -0
- package/dist/descriptor/ExtensionEntry.d.ts.map +1 -0
- package/dist/descriptor/ExtensionEntry.js +2 -0
- package/dist/descriptor/ExtensionEntry.js.map +1 -0
- package/dist/descriptor/FrondDescriptor.d.ts +61 -0
- package/dist/descriptor/FrondDescriptor.d.ts.map +1 -0
- package/dist/descriptor/{frond.js → FrondDescriptor.js} +1 -1
- package/dist/descriptor/FrondDescriptor.js.map +1 -0
- package/dist/descriptor/FrondSource.d.ts +8 -0
- package/dist/descriptor/FrondSource.d.ts.map +1 -0
- package/dist/descriptor/FrondSource.js +2 -0
- package/dist/descriptor/FrondSource.js.map +1 -0
- package/dist/descriptor/Fronds.d.ts +2 -1
- package/dist/descriptor/Fronds.d.ts.map +1 -1
- package/dist/descriptor/Fronds.js.map +1 -1
- package/dist/descriptor/HandlerEntry.d.ts +27 -0
- package/dist/descriptor/HandlerEntry.d.ts.map +1 -0
- package/dist/descriptor/HandlerEntry.js +2 -0
- package/dist/descriptor/HandlerEntry.js.map +1 -0
- package/dist/descriptor/MiddlewareEntry.d.ts +17 -0
- package/dist/descriptor/MiddlewareEntry.d.ts.map +1 -0
- package/dist/descriptor/MiddlewareEntry.js +2 -0
- package/dist/descriptor/MiddlewareEntry.js.map +1 -0
- package/dist/descriptor/PresenterEntry.d.ts +23 -0
- package/dist/descriptor/PresenterEntry.d.ts.map +1 -0
- package/dist/descriptor/PresenterEntry.js +2 -0
- package/dist/descriptor/PresenterEntry.js.map +1 -0
- package/dist/descriptor/PresenterFieldMeta.d.ts +14 -0
- package/dist/descriptor/PresenterFieldMeta.d.ts.map +1 -0
- package/dist/descriptor/PresenterFieldMeta.js +2 -0
- package/dist/descriptor/PresenterFieldMeta.js.map +1 -0
- package/dist/descriptor/ProviderEntry.d.ts +19 -0
- package/dist/descriptor/ProviderEntry.d.ts.map +1 -0
- package/dist/descriptor/ProviderEntry.js +2 -0
- package/dist/descriptor/ProviderEntry.js.map +1 -0
- package/dist/descriptor/SeedEntry.d.ts +11 -0
- package/dist/descriptor/SeedEntry.d.ts.map +1 -0
- package/dist/descriptor/SeedEntry.js +2 -0
- package/dist/descriptor/SeedEntry.js.map +1 -0
- package/dist/descriptor/SeedFactory.d.ts +3 -0
- package/dist/descriptor/SeedFactory.d.ts.map +1 -0
- package/dist/descriptor/SeedFactory.js +2 -0
- package/dist/descriptor/SeedFactory.js.map +1 -0
- package/dist/descriptor/bases.d.ts +17 -0
- package/dist/descriptor/bases.d.ts.map +1 -0
- package/dist/descriptor/bases.js +26 -0
- package/dist/descriptor/bases.js.map +1 -0
- package/dist/descriptor/index.d.ts +22 -6
- package/dist/descriptor/index.d.ts.map +1 -1
- package/dist/descriptor/index.js +19 -5
- package/dist/descriptor/index.js.map +1 -1
- package/dist/descriptor/surface.d.ts +3 -2
- package/dist/descriptor/surface.d.ts.map +1 -1
- package/dist/descriptor/surface.js +1 -1
- package/dist/descriptor/surface.js.map +1 -1
- package/dist/diagnostic.d.ts +33 -0
- package/dist/diagnostic.d.ts.map +1 -0
- package/dist/diagnostic.js +12 -0
- package/dist/diagnostic.js.map +1 -0
- package/dist/dispatch/ArgumentResolver.d.ts +2 -5
- package/dist/dispatch/ArgumentResolver.d.ts.map +1 -1
- package/dist/dispatch/ArgumentResolver.js.map +1 -1
- package/dist/dispatch/CollectorLookup.d.ts +3 -0
- package/dist/dispatch/CollectorLookup.d.ts.map +1 -0
- package/dist/dispatch/CollectorLookup.js +2 -0
- package/dist/dispatch/CollectorLookup.js.map +1 -0
- package/dist/dispatch/CollectorResolver.d.ts +5 -0
- package/dist/dispatch/CollectorResolver.d.ts.map +1 -0
- package/dist/dispatch/CollectorResolver.js +2 -0
- package/dist/dispatch/CollectorResolver.js.map +1 -0
- package/dist/dispatch/DispatchEvent.d.ts +3 -4
- package/dist/dispatch/DispatchEvent.d.ts.map +1 -1
- package/dist/dispatch/DispatchEvent.js.map +1 -1
- package/dist/dispatch/DispatchLifecycle.d.ts +2 -1
- package/dist/dispatch/DispatchLifecycle.d.ts.map +1 -1
- package/dist/dispatch/DispatchLifecycle.js.map +1 -1
- package/dist/dispatch/DispatchObserver.d.ts +3 -0
- package/dist/dispatch/DispatchObserver.d.ts.map +1 -0
- package/dist/dispatch/DispatchObserver.js +2 -0
- package/dist/dispatch/DispatchObserver.js.map +1 -0
- package/dist/dispatch/DispatchPort.d.ts +1 -1
- package/dist/dispatch/DispatchStage.d.ts +2 -0
- package/dist/dispatch/DispatchStage.d.ts.map +1 -0
- package/dist/dispatch/DispatchStage.js +2 -0
- package/dist/dispatch/DispatchStage.js.map +1 -0
- package/dist/dispatch/Dispatcher.d.ts +1 -1
- package/dist/dispatch/Facade.d.ts +25 -0
- package/dist/dispatch/Facade.d.ts.map +1 -0
- package/dist/dispatch/Facade.js +2 -0
- package/dist/dispatch/Facade.js.map +1 -0
- package/dist/dispatch/GuardReport.d.ts +9 -0
- package/dist/dispatch/GuardReport.d.ts.map +1 -0
- package/dist/dispatch/GuardReport.js +2 -0
- package/dist/dispatch/GuardReport.js.map +1 -0
- package/dist/dispatch/HandlerFacade.d.ts +9 -28
- package/dist/dispatch/HandlerFacade.d.ts.map +1 -1
- package/dist/dispatch/HandlerFacade.js +19 -19
- package/dist/dispatch/HandlerFacade.js.map +1 -1
- package/dist/dispatch/InFlight.d.ts.map +1 -1
- package/dist/dispatch/InFlight.js +2 -1
- package/dist/dispatch/InFlight.js.map +1 -1
- package/dist/dispatch/LocalRoutePolicy.d.ts +1 -1
- package/dist/dispatch/LocalRoutePolicy.d.ts.map +1 -1
- package/dist/dispatch/LocalRoutePolicy.js +2 -1
- 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/OperationRoute.js.map +1 -1
- package/dist/dispatch/PresenterArgs.d.ts +2 -0
- package/dist/dispatch/PresenterArgs.d.ts.map +1 -0
- package/dist/dispatch/PresenterArgs.js +2 -0
- package/dist/dispatch/PresenterArgs.js.map +1 -0
- package/dist/dispatch/PresenterExecutor.d.ts +1 -1
- package/dist/dispatch/PresenterExecutor.d.ts.map +1 -1
- package/dist/dispatch/PresenterExecutor.js +2 -1
- package/dist/dispatch/PresenterExecutor.js.map +1 -1
- package/dist/dispatch/Route.d.ts +3 -2
- package/dist/dispatch/Route.d.ts.map +1 -1
- package/dist/dispatch/RouteExecution.d.ts +3 -0
- package/dist/dispatch/RouteExecution.d.ts.map +1 -0
- package/dist/dispatch/RouteExecution.js +2 -0
- package/dist/dispatch/RouteExecution.js.map +1 -0
- package/dist/dispatch/RoutePolicy.d.ts +1 -1
- package/dist/dispatch/StorageGuard.d.ts +6 -12
- package/dist/dispatch/StorageGuard.d.ts.map +1 -1
- package/dist/dispatch/StorageGuard.js +12 -11
- package/dist/dispatch/StorageGuard.js.map +1 -1
- package/dist/dispatch/presenterArguments.d.ts +3 -3
- package/dist/dispatch/presenterArguments.d.ts.map +1 -1
- package/dist/dispatch/routeNotFound.d.ts +2 -2
- package/dist/dispatch/routeNotFound.d.ts.map +1 -1
- package/dist/dispatch/routeNotFound.js +2 -1
- package/dist/dispatch/routeNotFound.js.map +1 -1
- package/dist/dispatch/validateInput.d.ts +1 -1
- package/dist/dispatch/validateInput.d.ts.map +1 -1
- package/dist/dispatch/validateInput.js +2 -1
- package/dist/dispatch/validateInput.js.map +1 -1
- package/dist/entry/facade.js +1 -1
- package/dist/entry/transport.d.ts +1 -1
- package/dist/entry/transport.d.ts.map +1 -1
- package/dist/entry/transport.js +1 -1
- package/dist/index.d.ts +94 -34
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -13
- package/dist/index.js.map +1 -1
- package/dist/node.d.ts +2 -2
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +2 -2
- package/dist/node.js.map +1 -1
- package/dist/prefab/AggregateConstructor.d.ts +8 -0
- package/dist/prefab/AggregateConstructor.d.ts.map +1 -0
- package/dist/prefab/AggregateConstructor.js +2 -0
- package/dist/prefab/AggregateConstructor.js.map +1 -0
- package/dist/prefab/AggregateOf.d.ts +7 -0
- package/dist/prefab/AggregateOf.d.ts.map +1 -0
- package/dist/prefab/AggregateOf.js +2 -0
- package/dist/prefab/AggregateOf.js.map +1 -0
- package/dist/prefab/AggregateShape.d.ts +9 -0
- package/dist/prefab/AggregateShape.d.ts.map +1 -0
- package/dist/prefab/AggregateShape.js +2 -0
- package/dist/prefab/AggregateShape.js.map +1 -0
- package/dist/prefab/{crud.d.ts → CrudConstructor.d.ts} +5 -21
- package/dist/prefab/CrudConstructor.d.ts.map +1 -0
- package/dist/prefab/{crud.js → CrudConstructor.js} +6 -3
- package/dist/prefab/CrudConstructor.js.map +1 -0
- package/dist/prefab/CrudOpName.d.ts +3 -0
- package/dist/prefab/CrudOpName.d.ts.map +1 -0
- package/dist/prefab/CrudOpName.js +2 -0
- package/dist/prefab/CrudOpName.js.map +1 -0
- package/dist/prefab/CrudOps.d.ts +20 -0
- package/dist/prefab/CrudOps.d.ts.map +1 -0
- package/dist/prefab/CrudOps.js +2 -0
- package/dist/prefab/CrudOps.js.map +1 -0
- package/dist/prefab/CrudViews.d.ts +5 -0
- package/dist/prefab/CrudViews.d.ts.map +1 -0
- package/dist/prefab/CrudViews.js +2 -0
- package/dist/prefab/CrudViews.js.map +1 -0
- package/dist/prefab/MirrorConstructor.d.ts +9 -0
- package/dist/prefab/MirrorConstructor.d.ts.map +1 -0
- package/dist/prefab/{mirror.js → MirrorConstructor.js} +1 -1
- package/dist/prefab/MirrorConstructor.js.map +1 -0
- package/dist/prefab/MirrorOf.d.ts +19 -0
- package/dist/prefab/MirrorOf.d.ts.map +1 -0
- package/dist/prefab/MirrorOf.js +2 -0
- package/dist/prefab/MirrorOf.js.map +1 -0
- package/dist/prefab/Refreshed.d.ts +10 -0
- package/dist/prefab/Refreshed.d.ts.map +1 -0
- package/dist/prefab/Refreshed.js +2 -0
- package/dist/prefab/Refreshed.js.map +1 -0
- package/dist/prefab/RepositoryConstructor.d.ts +15 -0
- package/dist/prefab/RepositoryConstructor.d.ts.map +1 -0
- package/dist/prefab/{repository.js → RepositoryConstructor.js} +1 -1
- package/dist/prefab/RepositoryConstructor.js.map +1 -0
- package/dist/prefab/RepositoryOf.d.ts +7 -0
- package/dist/prefab/RepositoryOf.d.ts.map +1 -0
- package/dist/prefab/RepositoryOf.js +2 -0
- package/dist/prefab/RepositoryOf.js.map +1 -0
- package/dist/scan.d.ts +3 -22
- package/dist/scan.d.ts.map +1 -1
- package/dist/storage/{criterion.d.ts → Comparison.d.ts} +2 -3
- package/dist/storage/Comparison.d.ts.map +1 -0
- package/dist/storage/{criterion.js → Comparison.js} +1 -2
- package/dist/storage/Comparison.js.map +1 -0
- package/dist/storage/ComparisonName.d.ts +3 -0
- package/dist/storage/ComparisonName.d.ts.map +1 -0
- package/dist/storage/ComparisonName.js +2 -0
- package/dist/storage/ComparisonName.js.map +1 -0
- package/dist/storage/ListOptions.d.ts +23 -0
- package/dist/storage/ListOptions.d.ts.map +1 -0
- package/dist/storage/ListOptions.js +2 -0
- package/dist/storage/ListOptions.js.map +1 -0
- package/dist/storage/ListResult.d.ts +10 -0
- package/dist/storage/ListResult.d.ts.map +1 -0
- package/dist/storage/ListResult.js +2 -0
- package/dist/storage/ListResult.js.map +1 -0
- package/dist/storage/SelectOption.d.ts +6 -0
- package/dist/storage/SelectOption.d.ts.map +1 -0
- package/dist/storage/SelectOption.js +2 -0
- package/dist/storage/SelectOption.js.map +1 -0
- package/dist/storage/{port.d.ts → Storage.d.ts} +4 -47
- package/dist/storage/Storage.d.ts.map +1 -0
- package/dist/storage/{port.js → Storage.js} +1 -1
- package/dist/storage/Storage.js.map +1 -0
- package/dist/storage/StorageFactory.d.ts +8 -0
- package/dist/storage/StorageFactory.d.ts.map +1 -0
- package/dist/storage/StorageFactory.js +2 -0
- package/dist/storage/StorageFactory.js.map +1 -0
- package/dist/storage/{store.d.ts → Store.d.ts} +3 -5
- package/dist/storage/Store.d.ts.map +1 -0
- package/dist/storage/{store.js → Store.js} +3 -4
- package/dist/storage/Store.js.map +1 -0
- package/dist/storage/Together.d.ts +8 -0
- package/dist/storage/Together.d.ts.map +1 -0
- package/dist/storage/Together.js +2 -0
- package/dist/storage/Together.js.map +1 -0
- package/dist/storage/Values.d.ts +3 -0
- package/dist/storage/Values.d.ts.map +1 -0
- package/dist/storage/Values.js +2 -0
- package/dist/storage/Values.js.map +1 -0
- package/dist/verify.d.ts +6 -15
- package/dist/verify.d.ts.map +1 -1
- package/dist/verify.js +5 -5
- package/dist/verify.js.map +1 -1
- package/dist/wire/Addresses.d.ts +16 -0
- package/dist/wire/Addresses.d.ts.map +1 -0
- package/dist/wire/Addresses.js +2 -0
- package/dist/wire/Addresses.js.map +1 -0
- package/dist/wire/Answer.d.ts +3 -0
- package/dist/wire/Answer.d.ts.map +1 -0
- package/dist/wire/Answer.js +2 -0
- package/dist/wire/Answer.js.map +1 -0
- package/dist/wire/AnyHandler.d.ts +3 -0
- package/dist/wire/AnyHandler.d.ts.map +1 -0
- package/dist/wire/AnyHandler.js +2 -0
- package/dist/wire/AnyHandler.js.map +1 -0
- package/dist/wire/AppMiddleware.d.ts +8 -0
- package/dist/wire/AppMiddleware.d.ts.map +1 -0
- package/dist/wire/{middleware.js → AppMiddleware.js} +1 -2
- package/dist/wire/AppMiddleware.js.map +1 -0
- package/dist/wire/AppNext.d.ts +2 -0
- package/dist/wire/AppNext.d.ts.map +1 -0
- package/dist/wire/AppNext.js +2 -0
- package/dist/wire/AppNext.js.map +1 -0
- package/dist/wire/Call.d.ts +10 -0
- package/dist/wire/Call.d.ts.map +1 -0
- package/dist/wire/Call.js +12 -0
- package/dist/wire/Call.js.map +1 -0
- package/dist/wire/CallPage.d.ts +9 -0
- package/dist/wire/CallPage.d.ts.map +1 -0
- package/dist/wire/CallPage.js +2 -0
- package/dist/wire/CallPage.js.map +1 -0
- package/dist/wire/{CallLog.d.ts → CallRecord.d.ts} +3 -10
- package/dist/wire/CallRecord.d.ts.map +1 -0
- package/dist/wire/CallRecord.js +2 -0
- package/dist/wire/CallRecord.js.map +1 -0
- package/dist/wire/{emit.d.ts → Emit.d.ts} +1 -18
- package/dist/wire/Emit.d.ts.map +1 -0
- package/dist/wire/{emit.js → Emit.js} +1 -6
- package/dist/wire/Emit.js.map +1 -0
- package/dist/wire/ErrorCode.d.ts +23 -0
- package/dist/wire/ErrorCode.d.ts.map +1 -0
- package/dist/wire/ErrorCode.js +30 -0
- package/dist/wire/ErrorCode.js.map +1 -0
- package/dist/wire/Facade.d.ts +10 -0
- package/dist/wire/Facade.d.ts.map +1 -0
- package/dist/wire/Facade.js +9 -0
- package/dist/wire/Facade.js.map +1 -0
- package/dist/wire/FacadeName.d.ts +14 -0
- package/dist/wire/FacadeName.d.ts.map +1 -0
- package/dist/wire/FacadeName.js +2 -0
- package/dist/wire/FacadeName.js.map +1 -0
- package/dist/wire/Fact.d.ts +9 -0
- package/dist/wire/Fact.d.ts.map +1 -0
- package/dist/wire/Fact.js +2 -0
- package/dist/wire/Fact.js.map +1 -0
- package/dist/wire/FougereError.d.ts +35 -0
- package/dist/wire/FougereError.d.ts.map +1 -0
- package/dist/wire/{errors.js → FougereError.js} +9 -32
- package/dist/wire/FougereError.js.map +1 -0
- package/dist/wire/FougereErrorOptions.d.ts +10 -0
- package/dist/wire/FougereErrorOptions.d.ts.map +1 -0
- package/dist/wire/FougereErrorOptions.js +2 -0
- package/dist/wire/FougereErrorOptions.js.map +1 -0
- package/dist/wire/FougereHandlers.d.ts +10 -0
- package/dist/wire/FougereHandlers.d.ts.map +1 -0
- package/dist/wire/FougereHandlers.js +2 -0
- package/dist/wire/FougereHandlers.js.map +1 -0
- package/dist/wire/FougereOperations.d.ts +4 -0
- package/dist/wire/FougereOperations.d.ts.map +1 -0
- package/dist/wire/FougereOperations.js +2 -0
- package/dist/wire/FougereOperations.js.map +1 -0
- package/dist/wire/FrondCall.d.ts +10 -0
- package/dist/wire/FrondCall.d.ts.map +1 -0
- package/dist/wire/FrondCall.js +2 -0
- package/dist/wire/FrondCall.js.map +1 -0
- package/dist/wire/HandlerOf.d.ts +10 -0
- package/dist/wire/HandlerOf.d.ts.map +1 -0
- package/dist/wire/HandlerOf.js +2 -0
- package/dist/wire/HandlerOf.js.map +1 -0
- package/dist/wire/Invocation.d.ts +2 -10
- package/dist/wire/Invocation.d.ts.map +1 -1
- package/dist/wire/Invocation.js.map +1 -1
- package/dist/wire/InvocationContext.d.ts +10 -0
- package/dist/wire/InvocationContext.d.ts.map +1 -0
- package/dist/wire/InvocationContext.js +2 -0
- package/dist/wire/InvocationContext.js.map +1 -0
- package/dist/wire/{middleware.d.ts → OperationContext.d.ts} +2 -9
- package/dist/wire/OperationContext.d.ts.map +1 -0
- package/dist/wire/OperationContext.js +2 -0
- package/dist/wire/OperationContext.js.map +1 -0
- package/dist/wire/{operation.d.ts → OperationContract.d.ts} +15 -12
- package/dist/wire/OperationContract.d.ts.map +1 -0
- package/dist/wire/{operation.js → OperationContract.js} +1 -1
- package/dist/wire/OperationContract.js.map +1 -0
- package/dist/wire/OperationKind.d.ts +2 -0
- package/dist/wire/OperationKind.d.ts.map +1 -0
- package/dist/wire/OperationKind.js +2 -0
- package/dist/wire/OperationKind.js.map +1 -0
- package/dist/wire/OperationKindInference.d.ts +8 -0
- package/dist/wire/OperationKindInference.d.ts.map +1 -0
- package/dist/wire/OperationKindInference.js +2 -0
- package/dist/wire/OperationKindInference.js.map +1 -0
- package/dist/wire/OperationsMap.d.ts +7 -0
- package/dist/wire/OperationsMap.d.ts.map +1 -0
- package/dist/wire/OperationsMap.js +7 -0
- package/dist/wire/OperationsMap.js.map +1 -0
- package/dist/wire/Param.d.ts +8 -0
- package/dist/wire/Param.d.ts.map +1 -0
- package/dist/wire/Param.js +2 -0
- package/dist/wire/Param.js.map +1 -0
- package/dist/wire/PartialInvocation.d.ts +3 -0
- package/dist/wire/PartialInvocation.d.ts.map +1 -0
- package/dist/wire/PartialInvocation.js +2 -0
- package/dist/wire/PartialInvocation.js.map +1 -0
- package/dist/wire/Pipe.d.ts +10 -0
- package/dist/wire/Pipe.d.ts.map +1 -0
- package/dist/wire/Pipe.js +2 -0
- package/dist/wire/Pipe.js.map +1 -0
- package/dist/wire/Refused.d.ts +10 -0
- package/dist/wire/Refused.d.ts.map +1 -0
- package/dist/wire/Refused.js +2 -0
- package/dist/wire/Refused.js.map +1 -0
- package/dist/wire/RouteAddress.d.ts +1 -7
- package/dist/wire/RouteAddress.d.ts.map +1 -1
- package/dist/wire/RouteAddress.js.map +1 -1
- package/dist/wire/RouteAddressInput.d.ts +6 -0
- package/dist/wire/RouteAddressInput.d.ts.map +1 -0
- package/dist/wire/RouteAddressInput.js +2 -0
- package/dist/wire/RouteAddressInput.js.map +1 -0
- package/dist/wire/RouteKind.d.ts +3 -0
- package/dist/wire/RouteKind.d.ts.map +1 -0
- package/dist/wire/RouteKind.js +2 -0
- package/dist/wire/RouteKind.js.map +1 -0
- package/dist/wire/Rows.d.ts +8 -0
- package/dist/wire/Rows.d.ts.map +1 -0
- package/dist/wire/Rows.js +2 -0
- package/dist/wire/Rows.js.map +1 -0
- package/dist/wire/RpcAnswer.d.ts +6 -0
- package/dist/wire/RpcAnswer.d.ts.map +1 -0
- package/dist/wire/RpcAnswer.js +3 -0
- package/dist/wire/RpcAnswer.js.map +1 -0
- package/dist/wire/Signature.d.ts +13 -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/dist/wire/SignedCall.d.ts +12 -0
- package/dist/wire/SignedCall.d.ts.map +1 -0
- package/dist/wire/SignedCall.js +3 -0
- package/dist/wire/SignedCall.js.map +1 -0
- package/dist/wire/Transport.d.ts +5 -0
- package/dist/wire/Transport.d.ts.map +1 -0
- package/dist/wire/Transport.js +2 -0
- package/dist/wire/Transport.js.map +1 -0
- package/dist/wire/{signature.d.ts → TypeRef.d.ts} +1 -18
- package/dist/wire/TypeRef.d.ts.map +1 -0
- package/dist/wire/TypeRef.js +2 -0
- package/dist/wire/TypeRef.js.map +1 -0
- package/dist/wire/binding.d.ts +1 -1
- package/dist/wire/binding.d.ts.map +1 -1
- package/dist/wire/card/CardOp.d.ts +22 -0
- package/dist/wire/card/CardOp.d.ts.map +1 -0
- package/dist/wire/card/CardOp.js +2 -0
- package/dist/wire/card/CardOp.js.map +1 -0
- package/dist/wire/card/IdentityCard.d.ts +22 -0
- package/dist/wire/card/IdentityCard.d.ts.map +1 -0
- package/dist/wire/card/IdentityCard.js +25 -0
- package/dist/wire/card/IdentityCard.js.map +1 -0
- package/dist/wire/drift.d.ts +6 -6
- package/dist/wire/drift.d.ts.map +1 -1
- package/dist/wire/drift.js +18 -18
- package/dist/wire/drift.js.map +1 -1
- package/dist/wire/http-error.d.ts +1 -2
- package/dist/wire/http-error.d.ts.map +1 -1
- package/dist/wire/http-error.js +4 -3
- package/dist/wire/http-error.js.map +1 -1
- package/dist/wire/loggerMiddleware.d.ts +2 -2
- package/dist/wire/loggerMiddleware.d.ts.map +1 -1
- package/dist/wire/refusals.d.ts +33 -0
- package/dist/wire/refusals.d.ts.map +1 -0
- package/dist/wire/refusals.js +44 -0
- package/dist/wire/refusals.js.map +1 -0
- package/dist/wire/topology/DeclaredEdge.d.ts +6 -0
- package/dist/wire/topology/DeclaredEdge.d.ts.map +1 -0
- package/dist/wire/topology/DeclaredEdge.js +2 -0
- package/dist/wire/topology/DeclaredEdge.js.map +1 -0
- package/dist/wire/topology/DeclaredFrond.d.ts +11 -0
- package/dist/wire/topology/DeclaredFrond.d.ts.map +1 -0
- package/dist/wire/topology/DeclaredFrond.js +2 -0
- package/dist/wire/topology/DeclaredFrond.js.map +1 -0
- package/dist/wire/topology/DeclaredTopology.d.ts +12 -0
- package/dist/wire/topology/DeclaredTopology.d.ts.map +1 -0
- package/dist/wire/topology/DeclaredTopology.js +2 -0
- package/dist/wire/topology/DeclaredTopology.js.map +1 -0
- package/dist/wire/topology/Edge.d.ts +8 -0
- package/dist/wire/topology/Edge.d.ts.map +1 -0
- package/dist/wire/topology/Edge.js +2 -0
- package/dist/wire/topology/Edge.js.map +1 -0
- package/dist/wire/topology/FrondPlacement.d.ts +8 -0
- package/dist/wire/topology/FrondPlacement.d.ts.map +1 -0
- package/dist/wire/topology/FrondPlacement.js +2 -0
- package/dist/wire/topology/FrondPlacement.js.map +1 -0
- package/dist/wire/topology/TopologyReport.d.ts +14 -0
- package/dist/wire/topology/TopologyReport.d.ts.map +1 -0
- package/dist/wire/topology/TopologyReport.js +2 -0
- package/dist/wire/topology/TopologyReport.js.map +1 -0
- package/package.json +4 -4
- package/src/AdapterConfig.ts +11 -0
- package/src/AnswerFor.ts +7 -0
- package/src/Binding.ts +4 -0
- package/src/{identity.ts → CallIdentity.ts} +7 -25
- package/src/Constraint.ts +2 -0
- package/src/{conventions.ts → Conventions.ts} +20 -9
- package/src/ConventionsInput.ts +8 -0
- package/src/Ctor.ts +2 -0
- package/src/Declared.ts +8 -0
- package/src/DeclaredHandler.ts +18 -0
- package/src/DeclaredSubject.ts +6 -0
- package/src/{graph.ts → DomainCluster.ts} +2 -12
- package/src/EffectiveCollector.ts +7 -0
- package/src/EffectiveOperation.ts +62 -0
- package/src/{effective-operation.ts → EffectiveOperationModel.ts} +50 -106
- package/src/EffectiveOperationOptions.ts +7 -0
- package/src/EffectiveOperationSemantics.ts +7 -0
- package/src/EffectiveOperationsMap.ts +3 -0
- package/src/EffectiveParameter.ts +13 -0
- package/src/EntityNode.ts +6 -0
- package/src/{config-loader.ts → FougereConfig.ts} +15 -21
- package/src/FougereNames.ts +2 -0
- package/src/FougerePorts.ts +7 -0
- package/src/{frond-config.ts → FrondConfig.ts} +8 -46
- package/src/{declare.ts → FrondDeclaration.ts} +14 -35
- package/src/FrondIdentity.ts +7 -0
- package/src/NameOf.ts +12 -0
- package/src/OperationOverride.ts +38 -0
- package/src/PortChoice.ts +13 -0
- package/src/{source.ts → Source.ts} +4 -21
- package/src/SourceConfig.ts +10 -0
- package/src/SourceView.ts +7 -0
- package/src/VerifiedCall.ts +7 -0
- package/src/boot/App.ts +71 -0
- package/src/boot/AppLifecycle.ts +2 -20
- package/src/boot/AuthConfig.ts +14 -0
- package/src/boot/AuthContext.ts +12 -0
- package/src/boot/AuthRuntime.ts +19 -0
- package/src/boot/CreateAppOptions.ts +81 -0
- package/src/boot/Emissions.ts +86 -56
- package/src/boot/Extension.ts +20 -0
- package/src/boot/apply.ts +2 -2
- package/src/boot/bootstrap.ts +101 -70
- package/src/boot/card.ts +15 -11
- package/src/boot/declared.ts +91 -0
- package/src/boot/frame.ts +2 -2
- package/src/boot/hosted.ts +1 -1
- package/src/boot/install.ts +42 -30
- package/src/boot/ownership.ts +104 -43
- package/src/boot/ports.ts +52 -41
- package/src/boot/remote.ts +24 -17
- package/src/boot/runner.ts +2 -2
- package/src/boot/seed.ts +12 -10
- package/src/boot/statement-drift.ts +6 -5
- package/src/boot/together.ts +77 -37
- package/src/builtin/Carry.ts +49 -0
- package/src/builtin/LogLevel.ts +1 -0
- package/src/builtin/LogRecord.ts +12 -0
- package/src/builtin/LogSink.ts +4 -0
- package/src/builtin/{logger.ts → Logger.ts} +5 -98
- package/src/builtin/LoggerOptions.ts +14 -0
- package/src/builtin/Rendered.ts +21 -0
- package/src/contract.ts +35 -13
- package/src/crypto/CryptoPort.ts +12 -0
- package/src/crypto/PublicJwk.ts +7 -0
- package/src/crypto/Signer.ts +4 -0
- package/src/crypto/Verifier.ts +5 -0
- package/src/crypto/node.ts +4 -1
- package/src/crypto/webcrypto.ts +4 -1
- package/src/define.ts +1 -1
- package/src/descriptor/CollectorEntry.ts +11 -0
- package/src/descriptor/EntityEntry.ts +13 -0
- package/src/descriptor/ExtensionEntry.ts +15 -0
- package/src/descriptor/FrondDescriptor.ts +58 -0
- package/src/descriptor/FrondSource.ts +7 -0
- package/src/descriptor/Fronds.ts +2 -1
- package/src/descriptor/HandlerEntry.ts +27 -0
- package/src/descriptor/MiddlewareEntry.ts +16 -0
- package/src/descriptor/PresenterEntry.ts +23 -0
- package/src/descriptor/PresenterFieldMeta.ts +14 -0
- package/src/descriptor/ProviderEntry.ts +18 -0
- package/src/descriptor/SeedEntry.ts +11 -0
- package/src/descriptor/SeedFactory.ts +2 -0
- package/src/descriptor/bases.ts +30 -0
- package/src/descriptor/index.ts +24 -6
- package/src/descriptor/surface.ts +3 -2
- package/src/diagnostic.ts +41 -0
- package/src/dispatch/ArgumentResolver.ts +2 -7
- package/src/dispatch/CollectorLookup.ts +3 -0
- package/src/dispatch/CollectorResolver.ts +5 -0
- package/src/dispatch/DispatchEvent.ts +3 -6
- package/src/dispatch/DispatchLifecycle.ts +2 -1
- package/src/dispatch/DispatchObserver.ts +3 -0
- package/src/dispatch/DispatchPort.ts +1 -1
- package/src/dispatch/DispatchStage.ts +1 -0
- package/src/dispatch/Dispatcher.ts +1 -1
- package/src/dispatch/Facade.ts +25 -0
- package/src/dispatch/GuardReport.ts +9 -0
- package/src/dispatch/HandlerFacade.ts +28 -46
- package/src/dispatch/InFlight.ts +2 -1
- package/src/dispatch/LocalRoutePolicy.ts +3 -2
- package/src/dispatch/OperationRoute.ts +2 -3
- package/src/dispatch/PresenterArgs.ts +1 -0
- package/src/dispatch/PresenterExecutor.ts +3 -3
- package/src/dispatch/Route.ts +3 -2
- package/src/dispatch/RouteExecution.ts +3 -0
- package/src/dispatch/RoutePolicy.ts +1 -1
- package/src/dispatch/StorageGuard.ts +13 -19
- package/src/dispatch/presenterArguments.ts +3 -3
- package/src/dispatch/routeNotFound.ts +3 -2
- package/src/dispatch/validateInput.ts +3 -2
- package/src/entry/facade.ts +2 -2
- package/src/entry/transport.ts +2 -2
- package/src/index.ts +102 -52
- package/src/node.ts +2 -2
- package/src/prefab/AggregateConstructor.ts +9 -0
- package/src/prefab/AggregateOf.ts +6 -0
- package/src/prefab/AggregateShape.ts +7 -0
- package/src/prefab/{crud.ts → CrudConstructor.ts} +15 -20
- package/src/prefab/CrudOpName.ts +2 -0
- package/src/prefab/CrudOps.ts +24 -0
- package/src/prefab/CrudViews.ts +5 -0
- package/src/prefab/MirrorConstructor.ts +35 -0
- package/src/prefab/MirrorOf.ts +19 -0
- package/src/prefab/Refreshed.ts +9 -0
- package/src/prefab/{repository.ts → RepositoryConstructor.ts} +8 -24
- package/src/prefab/RepositoryOf.ts +7 -0
- package/src/scan.ts +3 -23
- package/src/storage/{criterion.ts → Comparison.ts} +1 -3
- package/src/storage/ComparisonName.ts +3 -0
- package/src/storage/ListOptions.ts +29 -0
- package/src/storage/ListResult.ts +9 -0
- package/src/storage/SelectOption.ts +6 -0
- package/src/storage/{port.ts → Storage.ts} +5 -56
- package/src/storage/StorageFactory.ts +8 -0
- package/src/storage/{store.ts → Store.ts} +5 -7
- package/src/storage/Together.ts +6 -0
- package/src/storage/Values.ts +2 -0
- package/src/verify.ts +12 -21
- package/src/wire/Addresses.ts +17 -0
- package/src/wire/Answer.ts +3 -0
- package/src/wire/AnyHandler.ts +2 -0
- package/src/wire/AppMiddleware.ts +24 -0
- package/src/wire/AppNext.ts +1 -0
- package/src/wire/Call.ts +15 -0
- package/src/wire/CallPage.ts +9 -0
- package/src/wire/{CallLog.ts → CallRecord.ts} +2 -10
- package/src/wire/{emit.ts → Emit.ts} +1 -24
- package/src/wire/ErrorCode.ts +33 -0
- package/src/wire/Facade.ts +28 -0
- package/src/wire/FacadeName.ts +13 -0
- package/src/wire/Fact.ts +8 -0
- package/src/wire/{errors.ts → FougereError.ts} +14 -53
- package/src/wire/FougereErrorOptions.ts +10 -0
- package/src/wire/FougereHandlers.ts +8 -0
- package/src/wire/FougereOperations.ts +2 -0
- package/src/wire/FrondCall.ts +9 -0
- package/src/wire/HandlerOf.ts +10 -0
- package/src/wire/Invocation.ts +2 -11
- package/src/wire/InvocationContext.ts +9 -0
- package/src/wire/OperationContext.ts +18 -0
- package/src/wire/{operation.ts → OperationContract.ts} +14 -23
- package/src/wire/OperationKind.ts +1 -0
- package/src/wire/OperationKindInference.ts +8 -0
- package/src/wire/OperationsMap.ts +14 -0
- package/src/wire/Param.ts +8 -0
- package/src/wire/PartialInvocation.ts +3 -0
- package/src/wire/Pipe.ts +9 -0
- package/src/wire/Refused.ts +13 -0
- package/src/wire/RouteAddress.ts +1 -8
- package/src/wire/RouteAddressInput.ts +5 -0
- package/src/wire/RouteKind.ts +2 -0
- package/src/wire/Rows.ts +7 -0
- package/src/wire/RpcAnswer.ts +7 -0
- package/src/wire/Signature.ts +13 -0
- package/src/wire/SignedCall.ts +12 -0
- package/src/wire/Transport.ts +5 -0
- package/src/wire/{signature.ts → TypeRef.ts} +0 -19
- package/src/wire/binding.ts +1 -1
- package/src/wire/card/CardOp.ts +22 -0
- package/src/wire/card/IdentityCard.ts +41 -0
- package/src/wire/drift.ts +22 -22
- package/src/wire/http-error.ts +4 -3
- package/src/wire/loggerMiddleware.ts +2 -2
- package/src/wire/refusals.ts +55 -0
- package/src/wire/topology/DeclaredEdge.ts +5 -0
- package/src/wire/topology/DeclaredFrond.ts +10 -0
- package/src/wire/topology/DeclaredTopology.ts +12 -0
- package/src/wire/topology/Edge.ts +7 -0
- package/src/wire/topology/FrondPlacement.ts +7 -0
- package/src/wire/topology/TopologyReport.ts +14 -0
- package/dist/boot/auth.d.ts +0 -43
- package/dist/boot/auth.d.ts.map +0 -1
- package/dist/boot/auth.js +0 -2
- package/dist/boot/auth.js.map +0 -1
- package/dist/boot/types.d.ts +0 -147
- package/dist/boot/types.d.ts.map +0 -1
- package/dist/boot/types.js +0 -2
- package/dist/boot/types.js.map +0 -1
- package/dist/builtin/logger.d.ts +0 -96
- package/dist/builtin/logger.d.ts.map +0 -1
- package/dist/builtin/logger.js.map +0 -1
- package/dist/config-loader.d.ts.map +0 -1
- package/dist/config-loader.js.map +0 -1
- package/dist/conventions.d.ts.map +0 -1
- package/dist/conventions.js.map +0 -1
- package/dist/crypto/port.d.ts +0 -26
- package/dist/crypto/port.d.ts.map +0 -1
- package/dist/crypto/port.js +0 -3
- package/dist/crypto/port.js.map +0 -1
- package/dist/declare.d.ts.map +0 -1
- package/dist/declare.js.map +0 -1
- package/dist/descriptor/frond.d.ts +0 -187
- package/dist/descriptor/frond.d.ts.map +0 -1
- package/dist/descriptor/frond.js.map +0 -1
- package/dist/effective-operation.d.ts +0 -93
- package/dist/effective-operation.d.ts.map +0 -1
- package/dist/effective-operation.js.map +0 -1
- package/dist/frond-config.d.ts +0 -71
- package/dist/frond-config.d.ts.map +0 -1
- package/dist/frond-config.js.map +0 -1
- package/dist/graph.d.ts.map +0 -1
- package/dist/graph.js.map +0 -1
- package/dist/identity.d.ts.map +0 -1
- package/dist/identity.js.map +0 -1
- package/dist/prefab/crud.d.ts.map +0 -1
- package/dist/prefab/crud.js.map +0 -1
- package/dist/prefab/mirror.d.ts +0 -33
- package/dist/prefab/mirror.d.ts.map +0 -1
- package/dist/prefab/mirror.js.map +0 -1
- package/dist/prefab/repository.d.ts +0 -40
- package/dist/prefab/repository.d.ts.map +0 -1
- package/dist/prefab/repository.js.map +0 -1
- package/dist/source.d.ts.map +0 -1
- package/dist/storage/criterion.d.ts.map +0 -1
- package/dist/storage/criterion.js.map +0 -1
- package/dist/storage/port.d.ts.map +0 -1
- package/dist/storage/port.js.map +0 -1
- package/dist/storage/store.d.ts.map +0 -1
- package/dist/storage/store.js.map +0 -1
- package/dist/wire/CallLog.d.ts.map +0 -1
- package/dist/wire/CallLog.js +0 -2
- package/dist/wire/CallLog.js.map +0 -1
- package/dist/wire/call.d.ts +0 -105
- package/dist/wire/call.d.ts.map +0 -1
- package/dist/wire/call.js +0 -47
- package/dist/wire/call.js.map +0 -1
- package/dist/wire/emit.d.ts.map +0 -1
- package/dist/wire/emit.js.map +0 -1
- package/dist/wire/errors.d.ts +0 -58
- package/dist/wire/errors.d.ts.map +0 -1
- package/dist/wire/errors.js.map +0 -1
- package/dist/wire/middleware.d.ts.map +0 -1
- package/dist/wire/middleware.js.map +0 -1
- package/dist/wire/operation.d.ts.map +0 -1
- package/dist/wire/operation.js.map +0 -1
- package/dist/wire/signature.d.ts.map +0 -1
- package/dist/wire/signature.js +0 -2
- package/dist/wire/signature.js.map +0 -1
- package/src/boot/auth.ts +0 -45
- package/src/boot/types.ts +0 -148
- package/src/crypto/port.ts +0 -29
- package/src/descriptor/frond.ts +0 -195
- package/src/prefab/mirror.ts +0 -60
- package/src/wire/call.ts +0 -150
- package/src/wire/middleware.ts +0 -43
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Registry, Role, type SchemaView } from '@fougere/schema';
|
|
2
|
-
import type { StorageFactory } from './storage/
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import type { StorageFactory } from './storage/StorageFactory.js';
|
|
3
|
+
import type { Constraint } from './Constraint.js';
|
|
4
|
+
import type { SourceView } from './SourceView.js';
|
|
5
|
+
import type { SourceConfig } from './SourceConfig.js';
|
|
6
6
|
|
|
7
7
|
/** Whether an entity asks for one, anywhere but on its key. */
|
|
8
8
|
export function declares(schema: SchemaView, constraint: Constraint): boolean {
|
|
@@ -36,23 +36,6 @@ export interface Source {
|
|
|
36
36
|
name?: string;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
/** The app as ONE source sees it. */
|
|
40
|
-
export interface SourceView {
|
|
41
|
-
fronds: readonly { readonly name: string; readonly entities: readonly { readonly name: string }[] }[];
|
|
42
|
-
/** The auth provider's own entities, when they ride with this source. */
|
|
43
|
-
auth?: unknown;
|
|
44
|
-
elsewhere: readonly string[];
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/** What a config file can carry about a source — values, never a live driver. */
|
|
48
|
-
export interface SourceConfig {
|
|
49
|
-
/** The adapter that realizes it. Absent means the conventional one. */
|
|
50
|
-
source?: string;
|
|
51
|
-
/** The entities whose rows live here. Absent on the default source: it holds the rest. */
|
|
52
|
-
entities?: string[];
|
|
53
|
-
[key: string]: unknown;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
39
|
/** Which adapter answers a source name — one per process, no subject to hold. */
|
|
57
40
|
class SourceRegistry extends Registry<(conf: SourceConfig) => Source> {
|
|
58
41
|
/** The source this name stands for, built from the config entry that named it. */
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { NameOf } from './NameOf.js';
|
|
2
|
+
|
|
3
|
+
/** What a config file can carry about a source — values, never a live driver. */
|
|
4
|
+
export interface SourceConfig {
|
|
5
|
+
/** The adapter that realizes it. Absent means the conventional one. */
|
|
6
|
+
source?: NameOf<'source'>;
|
|
7
|
+
/** The entities whose rows live here. Absent on the default source: it holds the rest. */
|
|
8
|
+
entities?: string[];
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** The app as ONE source sees it. */
|
|
2
|
+
export interface SourceView {
|
|
3
|
+
fronds: readonly { readonly name: string; readonly entities: readonly { readonly name: string }[] }[];
|
|
4
|
+
/** The auth provider's own entities, when they ride with this source. */
|
|
5
|
+
auth?: unknown;
|
|
6
|
+
elsewhere: readonly string[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** What `verifyEnvelope` establishes — never what the caller asked for. */
|
|
2
|
+
export interface VerifiedCall {
|
|
3
|
+
/** The frond that signed, as the root named it. */
|
|
4
|
+
caller: string;
|
|
5
|
+
/** The state it asserted, now proven to come from `caller`. */
|
|
6
|
+
state: Record<string, unknown>;
|
|
7
|
+
}
|
package/src/boot/App.ts
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { Container } from '@fougere/container';
|
|
2
|
+
import type { Fronds } from '../descriptor/Fronds.js';
|
|
3
|
+
import type { SchemaView } from '@fougere/schema';
|
|
4
|
+
import type { AppMiddleware } from '../wire/AppMiddleware.js';
|
|
5
|
+
import type { RpcAnswer } from '../wire/RpcAnswer.js';
|
|
6
|
+
import type { AuthRuntime } from './AuthRuntime.js';
|
|
7
|
+
import type { EffectiveOperationsMap } from '../EffectiveOperationsMap.js';
|
|
8
|
+
import type { DispatchObserver } from '../dispatch/DispatchObserver.js';
|
|
9
|
+
import type { DispatchPort } from '../dispatch/DispatchPort.js';
|
|
10
|
+
|
|
11
|
+
/** The App object returned by createApp(). */
|
|
12
|
+
export interface App extends DispatchPort {
|
|
13
|
+
/** Process-only dispatch capability used by incoming transports. */
|
|
14
|
+
local: DispatchPort;
|
|
15
|
+
/** Root container with builtins + frond scopes. */
|
|
16
|
+
container: Container;
|
|
17
|
+
/** Which protocol adapters this app declared, from `fougere.config.ts`. */
|
|
18
|
+
adapters: Record<string, boolean | undefined>;
|
|
19
|
+
/** Where a call goes, as the config declared it — frond name to address. */
|
|
20
|
+
remotes: Readonly<Record<string, string>>;
|
|
21
|
+
/** Discovered fronds metadata. */
|
|
22
|
+
fronds: Fronds;
|
|
23
|
+
/** Resolve from root container (shortcut). */
|
|
24
|
+
resolve<T>(name: string): T;
|
|
25
|
+
/**
|
|
26
|
+
* Resolve an entity's schema — the local `entityClass` when it's hosted or scanned here, else
|
|
27
|
+
* reconstructed from the remote's identity card (`rpc.discover` to `Card.toSchema`).
|
|
28
|
+
*/
|
|
29
|
+
schemaFor(entity: string): Promise<SchemaView>;
|
|
30
|
+
/** The facade a name exposes to one audience, or `undefined` when it exposes none. */
|
|
31
|
+
facadeFor(entity: string, surface?: string): Record<string, Function> | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* The canonical contracts served beside a facade, after prefab + scan + config, binding, kind,
|
|
34
|
+
* topology and surface resolution.
|
|
35
|
+
*/
|
|
36
|
+
operationsFor(entity: string, surface?: string): EffectiveOperationsMap | undefined;
|
|
37
|
+
/** The facts this app has a listener for — what a carrier must subscribe to on its behalf. */
|
|
38
|
+
listensTo(): string[];
|
|
39
|
+
/** Hand a fact that came from OUTSIDE to the listeners in this process — and stop there. */
|
|
40
|
+
deliver(fact: string, payload: unknown): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* The storage an entity is backed by, resolved through its owning frond's scope — the dual of
|
|
43
|
+
* {@link facadeFor}.
|
|
44
|
+
*/
|
|
45
|
+
storageFor(entity: string): unknown | undefined;
|
|
46
|
+
/** The presenter of an entity, resolved through its owning frond's scope. */
|
|
47
|
+
presenterFor(entity: string): unknown | undefined;
|
|
48
|
+
/** Dispose the root container. */
|
|
49
|
+
dispose(): Promise<void>;
|
|
50
|
+
/** Stop taking calls, and resolve once the running ones are done. */
|
|
51
|
+
drain(timeoutMs?: number): Promise<void>;
|
|
52
|
+
/** How many calls are running right now — one count for all three facades and the wire. */
|
|
53
|
+
inFlight(): number;
|
|
54
|
+
/** The same disposal, spelled so the language does it: `await using app = await createApp(…)`. */
|
|
55
|
+
[Symbol.asyncDispose](): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* What this app took on, in the order it will release them. The reading of
|
|
58
|
+
* `CreateAppOptions.extensions` after the boot resolved it.
|
|
59
|
+
*/
|
|
60
|
+
extensions(): string[];
|
|
61
|
+
/** Declare one `rpc` op — what the app says about ITSELF, beside the card. */
|
|
62
|
+
serveRpc(operationName: string, answer: RpcAnswer): void;
|
|
63
|
+
/** Watch every dispatch transition; the returned function unsubscribes. */
|
|
64
|
+
observe(observer: DispatchObserver): () => void;
|
|
65
|
+
/** Register a global app middleware (runs on every operation). */
|
|
66
|
+
use(middleware: AppMiddleware): void;
|
|
67
|
+
/** Register an app middleware scoped to a specific entity. */
|
|
68
|
+
use(entity: string, middleware: AppMiddleware): void;
|
|
69
|
+
/** Auth runtime, present when fougere.config.ts declares `auth`. */
|
|
70
|
+
auth?: AuthRuntime;
|
|
71
|
+
}
|
package/src/boot/AppLifecycle.ts
CHANGED
|
@@ -1,23 +1,5 @@
|
|
|
1
|
-
import type { App } from './
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* One process-level extension and its reversible lifecycle.
|
|
6
|
-
*
|
|
7
|
-
* Documented: [lifecycle](https://fougere.dev/docs/infra/lifecycle).
|
|
8
|
-
*/
|
|
9
|
-
export interface Extension {
|
|
10
|
-
name: string;
|
|
11
|
-
/**
|
|
12
|
-
* Fronds it brings — read BEFORE the ascent, since a frond is installed while the app is
|
|
13
|
-
* still being made and `up` receives one that already exists. This is how an optional
|
|
14
|
-
* package accepts a fact: `calls` and `observability` both want every `LogLine`, and a
|
|
15
|
-
* signature is the only way to ask for one.
|
|
16
|
-
*/
|
|
17
|
-
fronds?: readonly FrondDescriptor[];
|
|
18
|
-
up?(app: App): void | Promise<void>;
|
|
19
|
-
down?(app: App): void | Promise<void>;
|
|
20
|
-
}
|
|
1
|
+
import type { App } from './App.js';
|
|
2
|
+
import type { Extension } from './Extension.js';
|
|
21
3
|
|
|
22
4
|
/** Runs application extensions up in order and down in reverse order. */
|
|
23
5
|
export class AppLifecycle {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SchemaView } from '@fougere/schema';
|
|
2
|
+
import type { AuthContext } from './AuthContext.js';
|
|
3
|
+
import type { AuthRuntime } from './AuthRuntime.js';
|
|
4
|
+
|
|
5
|
+
/** Lazy auth declaration written in fougere.config.ts. */
|
|
6
|
+
export interface AuthConfig {
|
|
7
|
+
/** Build the runtime — invoked by createApp at boot with the resolved storage handles. */
|
|
8
|
+
create(ctx: AuthContext): AuthRuntime | Promise<AuthRuntime>;
|
|
9
|
+
/**
|
|
10
|
+
* Entities the provider will use. Optional metadata — useful for the core's
|
|
11
|
+
* future migration registry to know which tables auth needs.
|
|
12
|
+
*/
|
|
13
|
+
entities?: Record<string, SchemaView>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { StorageFactory } from '../storage/StorageFactory.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Context passed by the core to an auth provider's create() function.
|
|
5
|
+
* Provides the resources the provider needs to integrate with the app.
|
|
6
|
+
*/
|
|
7
|
+
export interface AuthContext {
|
|
8
|
+
/** Storage handle (Kysely DB instance, Prisma client, etc.) — opaque to core. */
|
|
9
|
+
db: unknown;
|
|
10
|
+
/** Per-entity storage factory — auth provider uses this to back its adapter. */
|
|
11
|
+
storageFactory: StorageFactory;
|
|
12
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SchemaView } from '@fougere/schema';
|
|
2
|
+
import type { Storage } from '../storage/Storage.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Runtime returned by an auth provider's create(config, ctx) function.
|
|
6
|
+
* The core mounts this on the App and the HTTP layer (Nuxt module / router) uses it.
|
|
7
|
+
*/
|
|
8
|
+
export interface AuthRuntime {
|
|
9
|
+
/** Entities used by the provider, including any defaults it filled in. */
|
|
10
|
+
entities: Record<string, SchemaView>;
|
|
11
|
+
/** Per-entity ORMs the provider built for itself. */
|
|
12
|
+
storages: Record<string, Storage>;
|
|
13
|
+
/** Web Standard handler that processes /auth/* requests. */
|
|
14
|
+
handler: (request: Request) => Promise<Response>;
|
|
15
|
+
/** Programmatic API exposed by the provider (getSession, signOut, ...). */
|
|
16
|
+
api: Record<string, unknown>;
|
|
17
|
+
/** Effective mount path (echoes config.basePath or the provider's default). */
|
|
18
|
+
basePath: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { Container } from '@fougere/container';
|
|
2
|
+
import type { FrondDescriptor } from '../descriptor/FrondDescriptor.js';
|
|
3
|
+
import type { ScanResult } from '../scan.js';
|
|
4
|
+
import type { StorageFactory } from '../storage/StorageFactory.js';
|
|
5
|
+
import type { Constraint } from '../Constraint.js';
|
|
6
|
+
import type { Transport } from '../wire/Transport.js';
|
|
7
|
+
import type { Extension } from './Extension.js';
|
|
8
|
+
import type { AuthConfig } from './AuthConfig.js';
|
|
9
|
+
import type { DispatchObserver } from '../dispatch/DispatchObserver.js';
|
|
10
|
+
import type { App } from './App.js';
|
|
11
|
+
|
|
12
|
+
/** Options for createApp(). */
|
|
13
|
+
export interface CreateAppOptions {
|
|
14
|
+
/** Factory function to create the container. Required. */
|
|
15
|
+
createContainer: () => Container;
|
|
16
|
+
/** Factory to auto-generate Storage for each scanned entity. */
|
|
17
|
+
storageFactory?: StorageFactory;
|
|
18
|
+
/**
|
|
19
|
+
* Which source an entity's rows live in, and how to open a transaction on one — the two
|
|
20
|
+
* questions that decide whether `Together<[…]>` gets the engine's own unwind or replays inverses
|
|
21
|
+
* itself.
|
|
22
|
+
*/
|
|
23
|
+
sourceOf?: (entityName: string) => string;
|
|
24
|
+
transacts?: (source: string) => boolean;
|
|
25
|
+
transacted?: <R>(source: string, fn: (storageFactory: StorageFactory) => Promise<R>) => Promise<R>;
|
|
26
|
+
/**
|
|
27
|
+
* Bring the shape of what lives here up to date — a source's own gesture, declared on
|
|
28
|
+
* `Source.migrate` and handed over whole.
|
|
29
|
+
*
|
|
30
|
+
* Handed here rather than assembled by the host: four of them wrote
|
|
31
|
+
* `migrating(storage.migrate)` themselves, one of them as a string inside generated
|
|
32
|
+
* code, and eight demos wrote nothing — so they had no migration and nothing said it.
|
|
33
|
+
* The ASCENT is core's to order, since rows after tables is not a host's preference.
|
|
34
|
+
*/
|
|
35
|
+
migrate?: (app: App) => Promise<void> | void;
|
|
36
|
+
/** Whether that source refuses a constraint at the rows — the boot says so when it does not. */
|
|
37
|
+
enforces?: (source: string, constraint: Constraint) => boolean;
|
|
38
|
+
/** Builds the cross-source reader a frond gets when it declares `reads:`. */
|
|
39
|
+
sourcesFactory?: (reads: unknown[], frond: string) => Promise<unknown> | unknown;
|
|
40
|
+
/** What this app is built from — required, because producing it is what reads a disk. */
|
|
41
|
+
scan?: ScanResult | (() => Promise<ScanResult> | ScanResult);
|
|
42
|
+
/** What this app STATES it hosts — `frond('blog', { entities: [Post] })`. */
|
|
43
|
+
fronds?: readonly FrondDescriptor[];
|
|
44
|
+
/**
|
|
45
|
+
* Remote fronds — label → address. What each remote hosts is discovered
|
|
46
|
+
* at the first miss (rpc.discover), never declared here.
|
|
47
|
+
*/
|
|
48
|
+
remotes?: Record<string, string>;
|
|
49
|
+
/** Builds the transport used to reach `remotes` addresses. */
|
|
50
|
+
remoteTransport?: (url: string) => Transport;
|
|
51
|
+
/**
|
|
52
|
+
* Which realization answers which port — see `FougereConfig.ports`. Needed only
|
|
53
|
+
* when two classes extend the same port; one is resolved by convention.
|
|
54
|
+
*/
|
|
55
|
+
/**
|
|
56
|
+
* What answers a port. A string names the realization; a LIST is the chain, from the
|
|
57
|
+
* outside in — `['Retrying', 'Stripe']` puts `Retrying` in front of `Stripe`, and the
|
|
58
|
+
* last name is what actually charges.
|
|
59
|
+
*/
|
|
60
|
+
ports?: Record<string, string | readonly string[]>;
|
|
61
|
+
/** What this app takes on beyond its fronds, each stating what it does and what it undoes. */
|
|
62
|
+
extensions?: readonly (Extension | undefined)[];
|
|
63
|
+
/**
|
|
64
|
+
* Released by `app.dispose()` AFTER the container, for a resource handed in rather than built
|
|
65
|
+
* here — a storage connection is the one case today.
|
|
66
|
+
*/
|
|
67
|
+
onDispose?: () => Promise<void> | void;
|
|
68
|
+
/** Which protocol adapters this app serves — see `FougereConfig.adapters`. */
|
|
69
|
+
adapters?: Record<string, boolean | undefined>;
|
|
70
|
+
/** Carries an announced fact out of this process — a broker, a queue, a log. */
|
|
71
|
+
onEmit?: (fact: string, payload: unknown) => void | Promise<void>;
|
|
72
|
+
/** Passive observers of every dispatch transition. */
|
|
73
|
+
dispatchObservers?: readonly DispatchObserver[];
|
|
74
|
+
/**
|
|
75
|
+
* Storage handle to expose to the auth provider via AuthContext.db.
|
|
76
|
+
* Required when `auth` is set.
|
|
77
|
+
*/
|
|
78
|
+
db?: unknown;
|
|
79
|
+
/** Auth declaration to wire into the app at boot. */
|
|
80
|
+
auth?: AuthConfig;
|
|
81
|
+
}
|
package/src/boot/Emissions.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { applyCreate, dotted, lowerFirst, type SchemaView } from '@fougere/schema';
|
|
2
2
|
import type { Container } from '@fougere/container';
|
|
3
|
-
import { validationErrorsOf } from '../wire/
|
|
4
|
-
import { awaitKeyOf, emitKeyOf, factsAnnouncedBy, factsAwaitedBy } from '../wire/
|
|
3
|
+
import { validationErrorsOf } from '../wire/FougereError.js';
|
|
4
|
+
import { awaitKeyOf, emitKeyOf, factsAnnouncedBy, factsAwaitedBy } from '../wire/Emit.js';
|
|
5
5
|
import { ambient } from '#ambient';
|
|
6
|
+
import type { Diagnostic } from '../diagnostic.js';
|
|
6
7
|
import { Invocation } from '../wire/Invocation.js';
|
|
7
|
-
import type { Logger } from '../builtin/
|
|
8
|
+
import type { Logger } from '../builtin/Logger.js';
|
|
8
9
|
import type { Fronds } from '../descriptor/Fronds.js';
|
|
9
|
-
import type { OperationsMap } from '../wire/
|
|
10
|
+
import type { OperationsMap } from '../wire/OperationsMap.js';
|
|
10
11
|
|
|
11
|
-
/** A
|
|
12
|
+
/** A facade and the op on it that accepts a fact. */
|
|
12
13
|
interface Listener {
|
|
13
|
-
|
|
14
|
+
facade: string;
|
|
14
15
|
op: string;
|
|
15
16
|
}
|
|
16
17
|
|
|
@@ -19,7 +20,7 @@ type Carrier = (fact: string, payload: unknown) => void | Promise<void>;
|
|
|
19
20
|
|
|
20
21
|
/** Emissions — the only place in Fougere where an initiator names a SUBJECT. */
|
|
21
22
|
export class Emissions {
|
|
22
|
-
/** Who listens to what. Filled as each
|
|
23
|
+
/** Who listens to what. Filled as each facade's contracts are resolved. */
|
|
23
24
|
private readonly subscribers = new Map<string, Listener[]>();
|
|
24
25
|
|
|
25
26
|
/** Who FINISHES a fact, in the order they run — see `orderPipes`. */
|
|
@@ -38,13 +39,21 @@ export class Emissions {
|
|
|
38
39
|
/** What is announced AND waited for — `Emit<T, A>`, where the second type says so. */
|
|
39
40
|
private readonly awaited: Set<string>;
|
|
40
41
|
|
|
42
|
+
/** Where each facade and each frond was written, so a refusal here names a file to open. */
|
|
43
|
+
private readonly fileOf = new Map<string, string>();
|
|
44
|
+
|
|
41
45
|
constructor(
|
|
42
46
|
fronds: Fronds,
|
|
43
47
|
private readonly shapes: Map<string, SchemaView>,
|
|
44
48
|
private readonly container: Container,
|
|
45
49
|
private readonly log: Logger,
|
|
50
|
+
private readonly refused: Diagnostic[],
|
|
46
51
|
private readonly carry?: Carrier,
|
|
47
52
|
) {
|
|
53
|
+
for (const frond of fronds) {
|
|
54
|
+
this.fileOf.set(frond.name, frond.source.path);
|
|
55
|
+
for (const handler of frond.handlers) this.fileOf.set(facadeOf(handler.name), handler.filePath);
|
|
56
|
+
}
|
|
48
57
|
this.announced = new Set(fronds.flatMap((frond) => factsAnnouncedBy(frond.handlers)));
|
|
49
58
|
this.awaited = new Set(fronds.flatMap((frond) => factsAwaitedBy(frond.handlers)));
|
|
50
59
|
// Read from the frond that OWNS the fact: ordering is a decision about the fact, and
|
|
@@ -54,10 +63,15 @@ export class Emissions {
|
|
|
54
63
|
|
|
55
64
|
return Object.entries(frond.pipes ?? {}).map(([fact, order]) => {
|
|
56
65
|
if (!owned.has(lowerFirst(fact))) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
66
|
+
this.refused.push({
|
|
67
|
+
severity: 'blocking',
|
|
68
|
+
code: 'pipes-not-owned',
|
|
69
|
+
filePath: frond.source.path,
|
|
70
|
+
frond: frond.name,
|
|
71
|
+
subject: fact,
|
|
72
|
+
message: `Frond '${frond.name}' orders the links of '${fact}', which it does not own. `
|
|
73
|
+
+ 'The order belongs to the frond that declares the entity — state `pipes:` there.',
|
|
74
|
+
});
|
|
61
75
|
}
|
|
62
76
|
|
|
63
77
|
return [lowerFirst(fact), order] as const;
|
|
@@ -69,16 +83,16 @@ export class Emissions {
|
|
|
69
83
|
* Who listens to what — read from the PLAN, where `{ kind: 'fact' }` is a sentence
|
|
70
84
|
* `computeBindingPlan` already wrote, so nothing re-derives what a parameter is.
|
|
71
85
|
*/
|
|
72
|
-
note(contracts: OperationsMap,
|
|
86
|
+
note(contracts: OperationsMap, facade: string): void {
|
|
73
87
|
for (const [op, contract] of contracts) {
|
|
74
88
|
for (const bound of contract.binding ?? []) {
|
|
75
89
|
if (bound.source.kind === 'pipe') {
|
|
76
|
-
this.claimPipe(bound.source.factName, {
|
|
90
|
+
this.claimPipe(bound.source.factName, { facade, op });
|
|
77
91
|
continue;
|
|
78
92
|
}
|
|
79
93
|
if (bound.source.kind !== 'fact') continue;
|
|
80
94
|
const listeners = this.subscribers.get(bound.source.factName) ?? [];
|
|
81
|
-
listeners.push({
|
|
95
|
+
listeners.push({ facade, op });
|
|
82
96
|
this.subscribers.set(bound.source.factName, listeners);
|
|
83
97
|
}
|
|
84
98
|
}
|
|
@@ -87,7 +101,7 @@ export class Emissions {
|
|
|
87
101
|
/** One more op that finishes this fact. What ORDER they run in is settled at `register`. */
|
|
88
102
|
private claimPipe(fact: string, taking: Listener): void {
|
|
89
103
|
const held = this.pipes.get(fact) ?? [];
|
|
90
|
-
if (held.some((one) => `${one.
|
|
104
|
+
if (held.some((one) => `${one.facade}.${one.op}` === `${taking.facade}.${taking.op}`)) return;
|
|
91
105
|
held.push(taking);
|
|
92
106
|
this.pipes.set(fact, held);
|
|
93
107
|
}
|
|
@@ -102,27 +116,37 @@ export class Emissions {
|
|
|
102
116
|
private orderPipes(): void {
|
|
103
117
|
for (const [fact, links] of this.pipes) {
|
|
104
118
|
const declared = this.ordered.get(fact);
|
|
105
|
-
const named = (one: Listener) => `${one.
|
|
119
|
+
const named = (one: Listener) => `${one.facade}.${one.op}`;
|
|
106
120
|
|
|
107
121
|
if (!declared) {
|
|
108
122
|
if (links.length < 2) continue;
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
123
|
+
this.refused.push({
|
|
124
|
+
severity: 'blocking',
|
|
125
|
+
code: 'pipes-unordered',
|
|
126
|
+
filePath: this.fileOf.get(links[0]!.facade) ?? '',
|
|
127
|
+
subject: fact,
|
|
128
|
+
message: `${links.length} ops finish the fact '${fact}': ${links.map(named).join(', ')}. `
|
|
129
|
+
+ 'They run one after another and nothing says in which order. State it on the frond '
|
|
130
|
+
+ `that owns '${fact}': export default { pipes: { ${fact}: ['FirstHandler', `
|
|
131
|
+
+ "'SecondHandler'] } }; — or make all but one accept `Fact<…>`, which changes nothing "
|
|
132
|
+
+ 'and reads it.',
|
|
133
|
+
});
|
|
134
|
+
continue;
|
|
116
135
|
}
|
|
117
136
|
|
|
118
|
-
const at = (one: Listener) => declared.findIndex((name) =>
|
|
137
|
+
const at = (one: Listener) => declared.findIndex((name) => facadeOf(name) === one.facade);
|
|
119
138
|
const unlisted = links.filter((one) => at(one) < 0);
|
|
120
139
|
if (unlisted.length > 0) {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
140
|
+
this.refused.push({
|
|
141
|
+
severity: 'blocking',
|
|
142
|
+
code: 'pipes-unlisted',
|
|
143
|
+
filePath: this.fileOf.get(unlisted[0]!.facade) ?? '',
|
|
144
|
+
subject: fact,
|
|
145
|
+
message: `${unlisted.map(named).join(', ')} finish${unlisted.length > 1 ? '' : 'es'} the `
|
|
146
|
+
+ `fact '${fact}', and '${fact}' orders ${declared.join(', ')} — so where it runs is `
|
|
147
|
+
+ 'not said. Add it to `pipes:`, or make it accept `Fact<…>`.',
|
|
148
|
+
});
|
|
149
|
+
continue;
|
|
126
150
|
}
|
|
127
151
|
|
|
128
152
|
this.pipes.set(fact, [...links].sort((one, other) => at(one) - at(other)));
|
|
@@ -139,9 +163,9 @@ export class Emissions {
|
|
|
139
163
|
return [...this.subscribers.keys()];
|
|
140
164
|
}
|
|
141
165
|
|
|
142
|
-
/** The
|
|
143
|
-
|
|
144
|
-
return (this.subscribers.get(fact) ?? []).map(({
|
|
166
|
+
/** The facades that accept one fact — the addresses a middleware must leave alone. */
|
|
167
|
+
facadesFor(fact: string): string[] {
|
|
168
|
+
return (this.subscribers.get(fact) ?? []).map(({ facade }) => facade);
|
|
145
169
|
}
|
|
146
170
|
|
|
147
171
|
/** Register one emission value per fact — announced here, or merely listened to. */
|
|
@@ -156,12 +180,17 @@ export class Emissions {
|
|
|
156
180
|
// subscribers only, and say nothing about it. Refused here rather than half-answered
|
|
157
181
|
// at the first call: the second type is in a signature, so a boot can read it.
|
|
158
182
|
if (this.carry) {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
183
|
+
this.refused.push({
|
|
184
|
+
severity: 'blocking',
|
|
185
|
+
code: 'emit-await-with-carrier',
|
|
186
|
+
filePath: this.fileOf.get(facadeOf(fact)) ?? '',
|
|
187
|
+
subject: fact,
|
|
188
|
+
message: `'${fact}' is announced with an answer type, and this app has a carrier `
|
|
189
|
+
+ '(`onEmit`). Waiting means knowing who answers; a carrier reaches whoever subscribed '
|
|
190
|
+
+ `elsewhere and brings nothing back. Name the subscribers in \`remotes:\`, or drop the `
|
|
191
|
+
+ `second type of \`Emit<${fact}, …>\`.`,
|
|
192
|
+
});
|
|
193
|
+
continue;
|
|
165
194
|
}
|
|
166
195
|
this.container.registerValue(awaitKeyOf(fact), (raw: unknown) => this.announce(fact, raw, true));
|
|
167
196
|
}
|
|
@@ -187,8 +216,8 @@ export class Emissions {
|
|
|
187
216
|
|
|
188
217
|
const handed = this.handToListeners(fact, payload);
|
|
189
218
|
if (!waiting) {
|
|
190
|
-
for (const {
|
|
191
|
-
void done.catch((cause) => this.log.error(`${fact} → ${
|
|
219
|
+
for (const { facade, op, done } of handed) {
|
|
220
|
+
void done.catch((cause) => this.log.error(`${fact} → ${facade}.${op}`, this.describeRefusal(fact, cause) ?? cause));
|
|
192
221
|
}
|
|
193
222
|
|
|
194
223
|
return [];
|
|
@@ -202,13 +231,13 @@ export class Emissions {
|
|
|
202
231
|
const missing = settled.flatMap((result, at) =>
|
|
203
232
|
(result.status === 'rejected' ? [{ ...handed[at]!, reason: result.reason as unknown }] : []));
|
|
204
233
|
if (missing.length > 0) {
|
|
205
|
-
for (const {
|
|
206
|
-
this.log.error(`${fact} → ${
|
|
234
|
+
for (const { facade, op, reason } of missing) {
|
|
235
|
+
this.log.error(`${fact} → ${facade}.${op}`, this.describeRefusal(fact, reason) ?? reason);
|
|
207
236
|
}
|
|
208
237
|
throw new AggregateError(
|
|
209
238
|
missing.map((one) => one.reason),
|
|
210
239
|
`${fact} — ${missing.length} of ${handed.length} subscriber(s) did not answer`
|
|
211
|
-
+ ` (${missing.map((one) => `${one.
|
|
240
|
+
+ ` (${missing.map((one) => `${one.facade}.${one.op}`).join(', ')}).`
|
|
212
241
|
+ ' An announcement with an answer type waits for everyone: a partial answer would'
|
|
213
242
|
+ ' look like a complete one.',
|
|
214
243
|
);
|
|
@@ -227,14 +256,14 @@ export class Emissions {
|
|
|
227
256
|
|
|
228
257
|
const refused = settled.flatMap((result, i) =>
|
|
229
258
|
result.status === 'rejected' ? [{ ...handed[i], reason: result.reason as unknown }] : []);
|
|
230
|
-
for (const {
|
|
231
|
-
this.log.error(`${fact} → ${
|
|
259
|
+
for (const { facade, op, reason } of refused) {
|
|
260
|
+
this.log.error(`${fact} → ${facade}.${op}`, this.describeRefusal(fact, reason) ?? reason);
|
|
232
261
|
}
|
|
233
262
|
if (refused.length > 0) {
|
|
234
263
|
throw new AggregateError(
|
|
235
264
|
refused.map((r) => r.reason),
|
|
236
265
|
`${fact} — ${refused.length} of ${handed.length} listener(s) refused it`
|
|
237
|
-
+ ` (${refused.map((r) => `${r.
|
|
266
|
+
+ ` (${refused.map((r) => `${r.facade}.${r.op}`).join(', ')}).`
|
|
238
267
|
+ ` Nothing here holds it: the carrier decides whether it comes back.`,
|
|
239
268
|
);
|
|
240
269
|
}
|
|
@@ -250,7 +279,7 @@ export class Emissions {
|
|
|
250
279
|
private async finished(fact: string, payload: unknown): Promise<unknown> {
|
|
251
280
|
let carried = payload;
|
|
252
281
|
for (const link of this.pipes.get(fact) ?? []) {
|
|
253
|
-
const facade = this.container.resolve<Record<string, Function>>(link.
|
|
282
|
+
const facade = this.container.resolve<Record<string, Function>>(link.facade);
|
|
254
283
|
const answered = await facade[link.op]({ ...Invocation.empty, input: carried });
|
|
255
284
|
|
|
256
285
|
// A link that answers nothing SUPPRESSES the fact — every subscriber was then handed
|
|
@@ -260,7 +289,7 @@ export class Emissions {
|
|
|
260
289
|
// each reader; it is not a link's to decide for everyone.
|
|
261
290
|
if (answered === null || answered === undefined) {
|
|
262
291
|
throw new Error(
|
|
263
|
-
`${link.
|
|
292
|
+
`${link.facade}.${link.op} finishes the fact '${fact}' and answered nothing.\n`
|
|
264
293
|
+ ' A link says what the fact IS, it does not take it back — the announcer has '
|
|
265
294
|
+ 'already said it happened, and nothing can tell it otherwise.\n'
|
|
266
295
|
+ ' Return the fact, amended or as it stands.',
|
|
@@ -289,7 +318,8 @@ export class Emissions {
|
|
|
289
318
|
if (walked.includes(fact)) {
|
|
290
319
|
throw new Error(
|
|
291
320
|
`Emission cycle: ${[...walked, fact].join(' → ')}.\n`
|
|
292
|
-
+
|
|
321
|
+
+ ' A fact cannot cause itself. One of the subscribers above announces a fact that leads back here.\n'
|
|
322
|
+
+ ' Make it accept `Fact<…>` and read, or announce outside the subscriber.',
|
|
293
323
|
);
|
|
294
324
|
}
|
|
295
325
|
|
|
@@ -299,17 +329,17 @@ export class Emissions {
|
|
|
299
329
|
return [];
|
|
300
330
|
}
|
|
301
331
|
|
|
302
|
-
return listeners.map(({
|
|
303
|
-
|
|
332
|
+
return listeners.map(({ facade, op }) => ({
|
|
333
|
+
facade,
|
|
304
334
|
op,
|
|
305
335
|
done: ambient.enterChain(fact, async () => {
|
|
306
|
-
let
|
|
336
|
+
let handler: Record<string, Function>;
|
|
307
337
|
try {
|
|
308
|
-
|
|
338
|
+
handler = this.container.resolve<Record<string, Function>>(facade);
|
|
309
339
|
} catch (cause) {
|
|
310
|
-
throw new Error(`${fact} → ${
|
|
340
|
+
throw new Error(`${fact} → ${facade} could not be reached`, { cause });
|
|
311
341
|
}
|
|
312
|
-
return
|
|
342
|
+
return handler[op]({ ...Invocation.empty, input: payload });
|
|
313
343
|
}),
|
|
314
344
|
}));
|
|
315
345
|
}
|
|
@@ -327,7 +357,7 @@ export class Emissions {
|
|
|
327
357
|
* The container key a declared CLASS NAME answers under — `RedactHandler` → `redactHandler`,
|
|
328
358
|
* the same key `facadeKeyOf` builds from an address.
|
|
329
359
|
*/
|
|
330
|
-
function
|
|
360
|
+
function facadeOf(declared: string): string {
|
|
331
361
|
const key = lowerFirst(declared);
|
|
332
362
|
|
|
333
363
|
return key.endsWith('Handler') ? key : `${key}Handler`;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { App } from './App.js';
|
|
2
|
+
import type { FrondDescriptor } from '../descriptor/FrondDescriptor.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* One process-level extension and its reversible lifecycle.
|
|
6
|
+
*
|
|
7
|
+
* Documented: [lifecycle](https://fougere.dev/docs/infra/lifecycle).
|
|
8
|
+
*/
|
|
9
|
+
export interface Extension {
|
|
10
|
+
name: string;
|
|
11
|
+
/**
|
|
12
|
+
* Fronds it brings — read BEFORE the ascent, since a frond is installed while the app is
|
|
13
|
+
* still being made and `up` receives one that already exists. This is how an optional
|
|
14
|
+
* package accepts a fact: `calls` and `observability` both want every `LogLine`, and a
|
|
15
|
+
* signature is the only way to ask for one.
|
|
16
|
+
*/
|
|
17
|
+
fronds?: readonly FrondDescriptor[];
|
|
18
|
+
up?(app: App): void | Promise<void>;
|
|
19
|
+
down?(app: App): void | Promise<void>;
|
|
20
|
+
}
|
package/src/boot/apply.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { FougereConfig } from '../
|
|
2
|
-
import {
|
|
1
|
+
import type { FougereConfig } from '../FougereConfig.js';
|
|
2
|
+
import { envLevel, logLevel, setLogLevel } from '../builtin/Logger.js';
|
|
3
3
|
import { dequal } from 'dequal';
|
|
4
4
|
|
|
5
5
|
export interface ConfigApplication {
|