@fougere/core 0.9.3-alpha.0 → 0.11.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} +3 -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} +9 -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 -16
- 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} +5 -4
- package/dist/Source.js.map +1 -0
- 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/Hosting.d.ts +38 -0
- package/dist/boot/Hosting.d.ts.map +1 -0
- package/dist/boot/Hosting.js +2 -0
- package/dist/boot/Hosting.js.map +1 -0
- package/dist/boot/Peer.d.ts +16 -0
- package/dist/boot/Peer.d.ts.map +1 -0
- package/dist/boot/Peer.js +2 -0
- package/dist/boot/Peer.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 +196 -59
- 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 +2 -2
- package/dist/boot/declared.d.ts.map +1 -1
- package/dist/boot/declared.js +36 -4
- package/dist/boot/declared.js.map +1 -1
- 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 +21 -7
- package/dist/boot/install.d.ts.map +1 -1
- package/dist/boot/install.js +41 -27
- package/dist/boot/install.js.map +1 -1
- package/dist/boot/ownership.d.ts +7 -5
- package/dist/boot/ownership.d.ts.map +1 -1
- package/dist/boot/ownership.js +81 -40
- package/dist/boot/ownership.js.map +1 -1
- package/dist/boot/peerOver.d.ts +4 -0
- package/dist/boot/peerOver.d.ts.map +1 -0
- package/dist/boot/peerOver.js +12 -0
- package/dist/boot/peerOver.js.map +1 -0
- 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/relations.d.ts +54 -0
- package/dist/boot/relations.d.ts.map +1 -0
- package/dist/boot/relations.js +150 -0
- package/dist/boot/relations.js.map +1 -0
- 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 +11 -4
- package/dist/boot/together.d.ts.map +1 -1
- package/dist/boot/together.js +62 -28
- 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 +35 -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/Dependent.d.ts +19 -0
- package/dist/dispatch/Dependent.d.ts.map +1 -0
- package/dist/dispatch/Dependent.js +2 -0
- package/dist/dispatch/Dependent.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 +15 -2
- package/dist/dispatch/Dispatcher.d.ts.map +1 -1
- package/dist/dispatch/Dispatcher.js +36 -8
- package/dist/dispatch/Dispatcher.js.map +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/Journal.d.ts +25 -0
- package/dist/dispatch/Journal.d.ts.map +1 -0
- package/dist/dispatch/Journal.js +3 -0
- package/dist/dispatch/Journal.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 +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/RelationCheck.d.ts +22 -0
- package/dist/dispatch/RelationCheck.d.ts.map +1 -0
- package/dist/dispatch/RelationCheck.js +2 -0
- package/dist/dispatch/RelationCheck.js.map +1 -0
- package/dist/dispatch/Release.d.ts +36 -0
- package/dist/dispatch/Release.d.ts.map +1 -0
- package/dist/dispatch/Release.js +124 -0
- package/dist/dispatch/Release.js.map +1 -0
- 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 +24 -13
- package/dist/dispatch/StorageGuard.d.ts.map +1 -1
- package/dist/dispatch/StorageGuard.js +69 -12
- 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 +97 -33
- 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} +1 -1
- 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} +10 -18
- package/dist/wire/Emit.d.ts.map +1 -0
- package/dist/wire/{emit.js → Emit.js} +17 -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 +4 -11
- package/dist/wire/Invocation.d.ts.map +1 -1
- package/dist/wire/Invocation.js +4 -1
- package/dist/wire/Invocation.js.map +1 -1
- package/dist/wire/InvocationContext.d.ts +12 -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 +14 -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 -17
- 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} +9 -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} +28 -125
- 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 -20
- 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} +7 -23
- 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/Hosting.ts +38 -0
- package/src/boot/Peer.ts +15 -0
- package/src/boot/apply.ts +2 -2
- package/src/boot/bootstrap.ts +240 -87
- package/src/boot/card.ts +15 -11
- package/src/boot/declared.ts +40 -5
- package/src/boot/frame.ts +2 -2
- package/src/boot/hosted.ts +1 -1
- package/src/boot/install.ts +65 -33
- package/src/boot/ownership.ts +92 -52
- package/src/boot/peerOver.ts +17 -0
- package/src/boot/ports.ts +52 -41
- package/src/boot/relations.ts +172 -0
- 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 +82 -38
- 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 +36 -16
- 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/Dependent.ts +19 -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 +44 -8
- 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/Journal.ts +26 -0
- 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/RelationCheck.ts +21 -0
- package/src/dispatch/Release.ts +156 -0
- 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 +75 -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 +101 -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} +10 -18
- 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} +24 -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 +5 -12
- package/src/wire/InvocationContext.ts +11 -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 +14 -0
- package/src/wire/Transport.ts +5 -0
- package/src/wire/{signature.ts → TypeRef.ts} +0 -18
- 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 -113
- 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/source.js.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 -130
- 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 -178
- package/src/wire/middleware.ts +0 -43
package/src/boot/card.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/** What an app says about ITSELF — the `rpc.discover` answer, built from the app. */
|
|
2
2
|
import { Card } from '@fougere/schema';
|
|
3
|
-
import type { App } from './
|
|
4
|
-
import { factsAnnouncedBy } from '../wire/
|
|
5
|
-
import type { InvocationContext } from '../wire/
|
|
6
|
-
import {
|
|
7
|
-
import type
|
|
3
|
+
import type { App } from './App.js';
|
|
4
|
+
import { factsAnnouncedBy } from '../wire/Emit.js';
|
|
5
|
+
import type { InvocationContext } from '../wire/InvocationContext.js';
|
|
6
|
+
import { type CardOp } from '../wire/card/CardOp.js';
|
|
7
|
+
import { type IdentityCard } from '../wire/card/IdentityCard.js';
|
|
8
|
+
import { facadeKeyOf } from '../wire/Facade.js';
|
|
8
9
|
|
|
9
10
|
type AnyFacade = Record<string, (invocation?: InvocationContext) => Promise<unknown>>;
|
|
10
11
|
|
|
@@ -16,12 +17,12 @@ export function identityCardOf(app: App, surface?: string): IdentityCard {
|
|
|
16
17
|
// What this app SERVES, never what instruments it. A frond an extension BROUGHT is a
|
|
17
18
|
// subscriber — `@fougere/calls` and `@fougere/observability` each bring one — and it is
|
|
18
19
|
// in every process that installed the extension, so two remotes then claimed the same
|
|
19
|
-
//
|
|
20
|
+
// facade and routing refused: `Two remotes serve 'export'`. `FrondDescriptor.brought` is
|
|
20
21
|
// the mark `calls`' panel and `rpc.topology` already read.
|
|
21
22
|
fronds: app.fronds.filter((frond) => !frond.brought).map((frond) => {
|
|
22
23
|
// What the frond answers to, not what it stores. This walked `frond.entities`, so a
|
|
23
24
|
// handler carrying no entity — a health check, a search across shapes — was built,
|
|
24
|
-
// served, and absent from the card: `sync` could not generate its
|
|
25
|
+
// served, and absent from the card: `sync` could not generate its facade and a remote
|
|
25
26
|
// consumer had no way to know it existed. The boot has said "pointing at nothing is
|
|
26
27
|
// legal" since handlers became the subject; the card had not caught up.
|
|
27
28
|
const byEntity = new Map(frond.entities.map((entity) => [entity.name, entity]));
|
|
@@ -32,14 +33,14 @@ export function identityCardOf(app: App, surface?: string): IdentityCard {
|
|
|
32
33
|
|
|
33
34
|
return {
|
|
34
35
|
name: frond.name,
|
|
35
|
-
|
|
36
|
+
facades: addresses.flatMap((address) => {
|
|
36
37
|
const ops = facadeOps(app, address, surface);
|
|
37
38
|
if (ops.length === 0) return [];
|
|
38
39
|
const entity = byEntity.get(address);
|
|
39
40
|
return [{
|
|
40
41
|
name: address,
|
|
41
42
|
ops,
|
|
42
|
-
// Absent when nothing of that name is stored. A
|
|
43
|
+
// Absent when nothing of that name is stored. A facade is still a facade.
|
|
43
44
|
...(entity ? { schema: Card.fromSchema(entity.entityClass, address).descriptor } : {}),
|
|
44
45
|
}];
|
|
45
46
|
}),
|
|
@@ -65,7 +66,8 @@ function facadeOps(app: App, entityName: string, surface?: string): CardOp[] {
|
|
|
65
66
|
const effective = app.operationsFor(entityName, surface);
|
|
66
67
|
if (!effective) {
|
|
67
68
|
throw new Error(
|
|
68
|
-
`Facade '${facadeKeyOf(entityName, surface)}' exists without an effective operation table
|
|
69
|
+
`Facade '${facadeKeyOf(entityName, surface)}' exists without an effective operation table. `
|
|
70
|
+
+ 'A facade and its table are built together, so no declaration can produce this.',
|
|
69
71
|
);
|
|
70
72
|
}
|
|
71
73
|
|
|
@@ -73,7 +75,8 @@ function facadeOps(app: App, entityName: string, surface?: string): CardOp[] {
|
|
|
73
75
|
const contract = effective.get(name);
|
|
74
76
|
if (!contract) {
|
|
75
77
|
throw new Error(
|
|
76
|
-
`Facade '${facadeKeyOf(entityName, surface)}' serves '${name}' without an effective contract
|
|
78
|
+
`Facade '${facadeKeyOf(entityName, surface)}' serves '${name}' without an effective contract. `
|
|
79
|
+
+ 'A facade and its table are built together, so no declaration can produce this.',
|
|
77
80
|
);
|
|
78
81
|
}
|
|
79
82
|
|
|
@@ -83,6 +86,7 @@ function facadeOps(app: App, entityName: string, surface?: string): CardOp[] {
|
|
|
83
86
|
...(contract?.input && { input: Card.fromSchema(contract.input, name).descriptor }),
|
|
84
87
|
...(contract?.output && { output: Card.fromSchema(contract.output, name).descriptor }),
|
|
85
88
|
...(contract?.cardinality && { cardinality: contract.cardinality }),
|
|
89
|
+
...(contract.errors?.length ? { errors: contract.errors } : {}),
|
|
86
90
|
kind: contract.kind,
|
|
87
91
|
};
|
|
88
92
|
});
|
package/src/boot/declared.ts
CHANGED
|
@@ -3,8 +3,12 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Documented: [observability](https://fougere.dev/docs/infra/observability).
|
|
5
5
|
*/
|
|
6
|
-
import type { FrondDescriptor } from '../descriptor/
|
|
7
|
-
import { facadeKeyOf
|
|
6
|
+
import type { FrondDescriptor } from '../descriptor/FrondDescriptor.js';
|
|
7
|
+
import { facadeKeyOf } from '../wire/Facade.js';
|
|
8
|
+
import { factsAnnouncedBy, factsAwaitedBy, factsListenedTo } from '../wire/Emit.js';
|
|
9
|
+
import { type DeclaredEdge } from '../wire/topology/DeclaredEdge.js';
|
|
10
|
+
import { type DeclaredFrond } from '../wire/topology/DeclaredFrond.js';
|
|
11
|
+
import { type DeclaredTopology } from '../wire/topology/DeclaredTopology.js';
|
|
8
12
|
|
|
9
13
|
interface Declaring {
|
|
10
14
|
fronds: readonly FrondDescriptor[];
|
|
@@ -62,21 +66,52 @@ export function reachedBy(deps: readonly string[], from: string, index: Map<stri
|
|
|
62
66
|
return [...new Set(reached)];
|
|
63
67
|
}
|
|
64
68
|
|
|
69
|
+
/**
|
|
70
|
+
* The two ways a call leaves a frond: a façade its code names, and a fact it announces.
|
|
71
|
+
*
|
|
72
|
+
* The second cannot be read the way the first is. A dependency names what it reaches, where an
|
|
73
|
+
* announcement names a SUBJECT and a subscriber names nothing at all — so the edge is found from
|
|
74
|
+
* both ends, the announcer's deps and the listener's binding plan. Reading the deps alone
|
|
75
|
+
* reported `demos/pipe-split` as four fronds with nothing between them, and three of its four
|
|
76
|
+
* fronds are reached by a fact.
|
|
77
|
+
*/
|
|
65
78
|
function crossings(hosted: readonly FrondDescriptor[]): DeclaredEdge[] {
|
|
66
79
|
const index = servedBy(hosted);
|
|
80
|
+
const heard = listenedBy(hosted);
|
|
67
81
|
const found = new Map<string, DeclaredEdge>();
|
|
82
|
+
const cross = (from: string, to: string) => {
|
|
83
|
+
if (from !== to) found.set(`${from} ${to}`, { from, to });
|
|
84
|
+
};
|
|
68
85
|
|
|
69
86
|
for (const frond of hosted) {
|
|
70
87
|
for (const handler of frond.handlers) {
|
|
71
|
-
for (const to of reachedBy(handler.deps, frond.name, index))
|
|
72
|
-
|
|
73
|
-
|
|
88
|
+
for (const to of reachedBy(handler.deps, frond.name, index)) cross(frond.name, to);
|
|
89
|
+
}
|
|
90
|
+
for (const fact of announcedIn(frond)) {
|
|
91
|
+
for (const to of heard.get(fact) ?? []) cross(frond.name, to);
|
|
74
92
|
}
|
|
75
93
|
}
|
|
76
94
|
|
|
77
95
|
return [...found.values()];
|
|
78
96
|
}
|
|
79
97
|
|
|
98
|
+
/** Which fronds listen to each fact — every one of them, since an announcement names no recipient. */
|
|
99
|
+
function listenedBy(hosted: readonly FrondDescriptor[]): Map<string, string[]> {
|
|
100
|
+
const index = new Map<string, string[]>();
|
|
101
|
+
for (const frond of hosted) {
|
|
102
|
+
for (const fact of factsListenedTo(frond.handlers)) {
|
|
103
|
+
index.set(fact, [...(index.get(fact) ?? []), frond.name]);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return index;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/** A fact announced here, whether the announcer waits for an answer or not. */
|
|
111
|
+
function announcedIn(frond: FrondDescriptor): string[] {
|
|
112
|
+
return [...new Set([...factsAnnouncedBy(frond.handlers), ...factsAwaitedBy(frond.handlers)])];
|
|
113
|
+
}
|
|
114
|
+
|
|
80
115
|
function hostOf(address: string): string {
|
|
81
116
|
try {
|
|
82
117
|
const url = new URL(address);
|
package/src/boot/frame.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { FieldSet, type SchemaView } from '@fougere/schema';
|
|
6
6
|
import { dequal } from 'dequal';
|
|
7
|
-
import { declares } from '../
|
|
8
|
-
import type { Logger } from '../builtin/
|
|
7
|
+
import { declares } from '../Source.js';
|
|
8
|
+
import type { Logger } from '../builtin/Logger.js';
|
|
9
9
|
|
|
10
10
|
/** One write that landed, and how to take it back. */
|
|
11
11
|
export interface Undo {
|
package/src/boot/hosted.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** What this app hosts — what it STATED, or what a scan FOUND. */
|
|
2
|
-
import type { FrondDescriptor } from '../descriptor/
|
|
2
|
+
import type { FrondDescriptor } from '../descriptor/FrondDescriptor.js';
|
|
3
3
|
import type { ScanResult } from '../scan.js';
|
|
4
4
|
import { Fronds } from '../descriptor/Fronds.js';
|
|
5
5
|
|
package/src/boot/install.ts
CHANGED
|
@@ -1,27 +1,34 @@
|
|
|
1
1
|
/** Putting one frond into the app being built: its scope, what it serves, what it takes. */
|
|
2
2
|
import type { Container } from '@fougere/container';
|
|
3
3
|
import { lowerFirst, type Fields, type SchemaView } from '@fougere/schema';
|
|
4
|
-
import type { Logger } from '../builtin/
|
|
4
|
+
import type { Logger } from '../builtin/Logger.js';
|
|
5
5
|
import type { Dispatcher } from '../dispatch/Dispatcher.js';
|
|
6
6
|
import type { RouteRegistry } from '../dispatch/RouteRegistry.js';
|
|
7
7
|
import type { Emissions } from './Emissions.js';
|
|
8
|
-
import type {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import type {
|
|
12
|
-
import type {
|
|
13
|
-
import type {
|
|
8
|
+
import type { EffectiveOperationModel } from '../EffectiveOperationModel.js';
|
|
9
|
+
import type { EffectiveOperationsMap } from '../EffectiveOperationsMap.js';
|
|
10
|
+
import { nameOf } from '../descriptor/FrondDescriptor.js';
|
|
11
|
+
import type { EntityEntry } from '../descriptor/EntityEntry.js';
|
|
12
|
+
import type { FrondDescriptor } from '../descriptor/FrondDescriptor.js';
|
|
13
|
+
import type { HandlerEntry } from '../descriptor/HandlerEntry.js';
|
|
14
|
+
import type { OperationsMap } from '../wire/OperationsMap.js';
|
|
15
|
+
import type { AppMiddleware } from '../wire/AppMiddleware.js';
|
|
16
|
+
import type { CreateAppOptions } from './CreateAppOptions.js';
|
|
14
17
|
import { registerFrames } from './together.js';
|
|
18
|
+
import type { Diagnostic } from '../diagnostic.js';
|
|
15
19
|
import { HandlerFacade } from '../dispatch/HandlerFacade.js';
|
|
16
20
|
import { targetOf } from '../prefab/prefab.js';
|
|
17
|
-
import { ownersOf,
|
|
21
|
+
import { ownersOf, sharedNames, storageInUserCode, crudOnOwned } from './ownership.js';
|
|
18
22
|
import { StorageGuard } from '../dispatch/StorageGuard.js';
|
|
19
23
|
import { portBindings, seamChains, wrapping, SEAMS } from './ports.js';
|
|
20
|
-
import {
|
|
21
|
-
import { inheritsCrud, subjectOf } from '../prefab/
|
|
22
|
-
import { repositoryKeyOf } from '../prefab/
|
|
23
|
-
import { storageKeyOf } from '../storage/
|
|
24
|
-
import { declares } from '../
|
|
24
|
+
import { contractsKeyOf, facadeKeyOf } from '../wire/Facade.js';
|
|
25
|
+
import { inheritsCrud, subjectOf } from '../prefab/CrudConstructor.js';
|
|
26
|
+
import { repositoryKeyOf } from '../prefab/RepositoryConstructor.js';
|
|
27
|
+
import { storageKeyOf } from '../storage/Storage.js';
|
|
28
|
+
import { declares } from '../Source.js';
|
|
29
|
+
import { heldBy, refuseUnwritableNull, releasing } from './relations.js';
|
|
30
|
+
import type { Hosting } from './Hosting.js';
|
|
31
|
+
import type { RelationCheck } from '../dispatch/RelationCheck.js';
|
|
25
32
|
import { presenterKeyOf } from '../prefab/presenter.js';
|
|
26
33
|
import { collectorKeyOf } from '../prefab/collector.js';
|
|
27
34
|
import { RouteAddress } from '../wire/RouteAddress.js';
|
|
@@ -39,12 +46,22 @@ export interface Assembly {
|
|
|
39
46
|
routeRegistry: RouteRegistry;
|
|
40
47
|
emissions: Emissions;
|
|
41
48
|
dispatcher: Dispatcher;
|
|
42
|
-
/** A
|
|
49
|
+
/** A facade under a named surface answers only what that surface serves. */
|
|
43
50
|
localDispatcher: Dispatcher;
|
|
44
51
|
/** Filled per façade key, read back by `operationsFor` and the identity card. */
|
|
45
52
|
effectiveByKey: Map<string, EffectiveOperationsMap>;
|
|
46
53
|
/** Every `ports:` key some frond actually settled — what is left is a typo. */
|
|
47
54
|
boundPorts: Set<string>;
|
|
55
|
+
/** Where a check writes what does not hold — collected across fronds, refused together. */
|
|
56
|
+
refused: Diagnostic[];
|
|
57
|
+
/**
|
|
58
|
+
* The references this process reads itself, collected across fronds. Whether one is
|
|
59
|
+
* ANSWERED can only be asked once every frond has registered, which is why the list
|
|
60
|
+
* leaves here rather than being judged where it is built.
|
|
61
|
+
*/
|
|
62
|
+
relations: RelationCheck[];
|
|
63
|
+
/** Where each entity is hosted — one answer for a frond's storage, its frames and its surfaces. */
|
|
64
|
+
hosting: Hosting;
|
|
48
65
|
/** What the model resolved before the boot performed any side effect. */
|
|
49
66
|
operationModel: EffectiveOperationModel;
|
|
50
67
|
entityByName: Map<string, SchemaView>;
|
|
@@ -61,7 +78,7 @@ export interface Assembly {
|
|
|
61
78
|
export async function installFrond(frond: FrondDescriptor, assembly: Assembly): Promise<void> {
|
|
62
79
|
const {
|
|
63
80
|
container, routeRegistry, emissions, dispatcher, localDispatcher, effectiveByKey,
|
|
64
|
-
boundPorts, operationModel, entityByName, frondOf, contractsOf, getMiddlewares, use,
|
|
81
|
+
boundPorts, refused, operationModel, entityByName, frondOf, contractsOf, getMiddlewares, use,
|
|
65
82
|
log, options,
|
|
66
83
|
} = assembly;
|
|
67
84
|
|
|
@@ -69,7 +86,7 @@ export async function installFrond(frond: FrondDescriptor, assembly: Assembly):
|
|
|
69
86
|
// register nothing locally — resolve() falls through to the remote façade.
|
|
70
87
|
if (options.remotes && frond.name in options.remotes) {
|
|
71
88
|
log.child(frond.name).info('declared remote — not hosted locally');
|
|
72
|
-
// Its
|
|
89
|
+
// Its facades answer elsewhere, but what they LISTEN to was read here.
|
|
73
90
|
for (const handler of frond.handlers) {
|
|
74
91
|
const key = facadeKeyOf(handler.address, handler.surface);
|
|
75
92
|
const operations = operationModel.forHandler(handler);
|
|
@@ -81,6 +98,9 @@ export async function installFrond(frond: FrondDescriptor, assembly: Assembly):
|
|
|
81
98
|
}
|
|
82
99
|
const scope = container.createScope();
|
|
83
100
|
const frondLog = log.child(frond.name);
|
|
101
|
+
// The frond's own voice, a child of the APP logger and never of `log` — which is the
|
|
102
|
+
// boot's, so a service's line would have claimed `boot:` long after the boot was over.
|
|
103
|
+
scope.registerValue('Logger', container.resolve<Logger>('Logger').child(frond.name));
|
|
84
104
|
|
|
85
105
|
// `reads:` is what makes a cross-source reader exist here, and the list IS its
|
|
86
106
|
// environment — a source holding none of these is never opened. Registered under
|
|
@@ -99,7 +119,7 @@ export async function installFrond(frond: FrondDescriptor, assembly: Assembly):
|
|
|
99
119
|
if (frond.reads?.length && options.sourcesFactory) {
|
|
100
120
|
// Resolved across the WHOLE app, not this frond's own entities: a cross-source
|
|
101
121
|
// query joins entities from different fronds by definition — `Progress` here,
|
|
102
|
-
// `Book` next
|
|
122
|
+
// `Book` next facade — so restricting the list to its own would make it useless.
|
|
103
123
|
// Naming one IS the authorization; that is what the declaration is for.
|
|
104
124
|
const named = frond.reads
|
|
105
125
|
.map((name) => entityByName.get(lowerFirst(name)))
|
|
@@ -117,10 +137,10 @@ export async function installFrond(frond: FrondDescriptor, assembly: Assembly):
|
|
|
117
137
|
|
|
118
138
|
// Who owns what, and the rule that makes owning mean something. Before anything is
|
|
119
139
|
// registered, so a bad line is named by this refusal rather than by the container's.
|
|
120
|
-
|
|
121
|
-
const owners = ownersOf(frond.providers);
|
|
122
|
-
|
|
123
|
-
|
|
140
|
+
sharedNames(frond, refused);
|
|
141
|
+
const owners = ownersOf(frond.providers, frond.name, refused);
|
|
142
|
+
storageInUserCode(frond, owners, (entity) => entityByName.has(entity), refused);
|
|
143
|
+
crudOnOwned(frond, owners, refused);
|
|
124
144
|
|
|
125
145
|
for (const provider of frond.providers) {
|
|
126
146
|
scope.register(nameOf(provider), provider.ctor, { deps: provider.deps });
|
|
@@ -128,7 +148,7 @@ export async function installFrond(frond: FrondDescriptor, assembly: Assembly):
|
|
|
128
148
|
// What this frond puts in front of one of the framework's own ports. Its own, like every
|
|
129
149
|
// provider — a link goes where its frond goes, which is what a frond behind `remotes:`
|
|
130
150
|
// takes with it.
|
|
131
|
-
const seams = seamChains(frond.providers, options.ports);
|
|
151
|
+
const seams = seamChains(frond.providers, options.ports, refused);
|
|
132
152
|
for (const [seam, links] of seams) {
|
|
133
153
|
boundPorts.add(seam);
|
|
134
154
|
frondLog.debug(`seam ${seam} → ${links.map((one) => one.ctor.name).join(' → ')} → the realization`);
|
|
@@ -137,7 +157,10 @@ export async function installFrond(frond: FrondDescriptor, assembly: Assembly):
|
|
|
137
157
|
// reaches the realization instead of the base class it is declared against.
|
|
138
158
|
// Registered AFTER the loop above so a port key always wins over the base's
|
|
139
159
|
// own registration — same precedence as a declared repository over its default.
|
|
140
|
-
for (const [port, chain] of portBindings(frond.providers, (n) => scope.has(n), options.ports)) {
|
|
160
|
+
for (const [port, chain] of portBindings(frond.providers, (n) => scope.has(n), options.ports, refused)) {
|
|
161
|
+
// A chain a refusal emptied — `ports:` named a class that extends nothing. Already
|
|
162
|
+
// reported, and there is no realization left to put a key in front of.
|
|
163
|
+
if (chain.length === 0) continue;
|
|
141
164
|
// A seam is bound where its realization is BUILT, not under a container key — nothing
|
|
142
165
|
// resolves `Storage`, and `<Entity>Storage` is what a handler asks for.
|
|
143
166
|
if (SEAMS.has(port)) continue;
|
|
@@ -165,6 +188,7 @@ export async function installFrond(frond: FrondDescriptor, assembly: Assembly):
|
|
|
165
188
|
// When a handler declares Crud(Entity, Output), scope the storage via .output(Output)
|
|
166
189
|
if (options.storageFactory) {
|
|
167
190
|
const unenforced: string[] = [];
|
|
191
|
+
const release = releasing(assembly.hosting);
|
|
168
192
|
for (const entity of frond.entities) {
|
|
169
193
|
const key = storageKeyOf(entity.name);
|
|
170
194
|
const source = options.sourceOf?.(entity.name) ?? 'db';
|
|
@@ -182,10 +206,15 @@ export async function installFrond(frond: FrondDescriptor, assembly: Assembly):
|
|
|
182
206
|
|
|
183
207
|
// The declared chain first, then the guard OUTSIDE it: the guard hands on the value
|
|
184
208
|
// it parsed, so a wrapper reads what the entity says a row is rather than what
|
|
185
|
-
// arrived. Same order the client
|
|
209
|
+
// arrived. Same order the client facade has held since `StorageGuard` existed.
|
|
186
210
|
const linked = wrapping('Storage', seams.get('Storage') ?? [], scoped, (dep) => scope.resolve(dep));
|
|
187
211
|
// Storage is a way out like the client surface — see `StorageGuard`.
|
|
188
|
-
|
|
212
|
+
refused.push(...refuseUnwritableNull(entity.entityClass, entity.name, entity.filePath));
|
|
213
|
+
const relations = heldBy(entity.entityClass, entity.name, assembly.hosting);
|
|
214
|
+
assembly.relations.push(...relations);
|
|
215
|
+
const guarded = new StorageGuard(
|
|
216
|
+
entity.entityClass.getFields(), entity.name, {}, relations, release,
|
|
217
|
+
).guard(linked);
|
|
189
218
|
scope.registerValue(key, guarded);
|
|
190
219
|
|
|
191
220
|
// The default repository IS the guarded port — it already answers every gesture a
|
|
@@ -194,7 +223,7 @@ export async function installFrond(frond: FrondDescriptor, assembly: Assembly):
|
|
|
194
223
|
// existed to make `repo.storage` true in both, back when `.storage` was the way in.
|
|
195
224
|
//
|
|
196
225
|
// Not registered for an OWNED entity: an aggregate's members are reached through it
|
|
197
|
-
// and nowhere else, and the default would be a second
|
|
226
|
+
// and nowhere else, and the default would be a second facade under a name a handler
|
|
198
227
|
// can spell. Every member is skipped, not just the one the key is named after —
|
|
199
228
|
// that asymmetry was the whole hole.
|
|
200
229
|
const repoKey = repositoryKeyOf(entity.name);
|
|
@@ -223,7 +252,8 @@ export async function installFrond(frond: FrondDescriptor, assembly: Assembly):
|
|
|
223
252
|
// so nothing is registered for a frame nobody wants.
|
|
224
253
|
registerFrames(
|
|
225
254
|
scope,
|
|
226
|
-
[...frond.handlers, ...frond.providers, ...frond.presenters, ...frond.collectors]
|
|
255
|
+
[...frond.handlers, ...frond.providers, ...frond.presenters, ...frond.collectors]
|
|
256
|
+
.flatMap((d) => d.deps.map((key) => ({ key, filePath: d.filePath }))),
|
|
227
257
|
frond.providers,
|
|
228
258
|
{
|
|
229
259
|
entityByName,
|
|
@@ -233,8 +263,10 @@ export async function installFrond(frond: FrondDescriptor, assembly: Assembly):
|
|
|
233
263
|
sourceOf: options.sourceOf,
|
|
234
264
|
transacts: options.transacts,
|
|
235
265
|
transacted: options.transacted,
|
|
266
|
+
hosting: assembly.hosting,
|
|
236
267
|
log: frondLog,
|
|
237
268
|
},
|
|
269
|
+
refused,
|
|
238
270
|
);
|
|
239
271
|
|
|
240
272
|
// Register presenters in scope — PascalCase type name (e.g. 'PostPresenter')
|
|
@@ -278,7 +310,7 @@ export async function installFrond(frond: FrondDescriptor, assembly: Assembly):
|
|
|
278
310
|
const surfaceHandlers = frond.handlers.filter((h) => h.surface);
|
|
279
311
|
const defaultHandlerMap = new Map(defaultHandlers.map((h) => [h.address, h]));
|
|
280
312
|
|
|
281
|
-
/** Build the
|
|
313
|
+
/** Build the facade of a handler and register it under the audience it serves. */
|
|
282
314
|
const buildFacade = (
|
|
283
315
|
entity: EntityEntry | undefined,
|
|
284
316
|
handler: HandlerEntry,
|
|
@@ -304,7 +336,7 @@ export async function installFrond(frond: FrondDescriptor, assembly: Assembly):
|
|
|
304
336
|
});
|
|
305
337
|
// Emissions use the same contracts and execution path as direct calls.
|
|
306
338
|
emissions.note(facade.contracts, facadeKey);
|
|
307
|
-
// The terms alongside the
|
|
339
|
+
// The terms alongside the facade, under the same audience — a surface that serves
|
|
308
340
|
// fewer ops describes fewer ops.
|
|
309
341
|
container.registerValue(contractsKeyOf(handler.address, handler.surface), facade.contracts);
|
|
310
342
|
effectiveByKey.set(facadeKey, facade.effectiveOperations);
|
|
@@ -381,7 +413,7 @@ export async function installFrond(frond: FrondDescriptor, assembly: Assembly):
|
|
|
381
413
|
//
|
|
382
414
|
// Pointing at nothing is legal HERE TOO. This loop used to `continue` when no entity
|
|
383
415
|
// carried the handler's name, so `handlers/public/SearchHandler.ts` with no `Search`
|
|
384
|
-
// entity got no
|
|
416
|
+
// entity got no facade at all and no line saying why — while the very same handler at
|
|
385
417
|
// the default surface is built and logged. One rule, both surfaces.
|
|
386
418
|
for (const handler of surfaceHandlers) {
|
|
387
419
|
const entity = frond.entities.find((e) => e.name === handler.address);
|
|
@@ -390,21 +422,21 @@ export async function installFrond(frond: FrondDescriptor, assembly: Assembly):
|
|
|
390
422
|
// Register scoped storage if output override differs from entity — under the REPOSITORY
|
|
391
423
|
// key, which is what a Crud handler asks for, and under the port's own for a holder
|
|
392
424
|
// that legitimately names it. Registering only the latter left a named surface with
|
|
393
|
-
// no
|
|
425
|
+
// no facade at all once the façade stopped spelling the storage.
|
|
394
426
|
if (entity && options.storageFactory) {
|
|
395
427
|
const baseStorage = options.storageFactory(entity.entityClass, entity.name);
|
|
396
428
|
const outputSchema = handler.outputOverride ?? (handler.ctor as any).__output;
|
|
397
429
|
const scoped = outputSchema && outputSchema !== entity.entityClass
|
|
398
430
|
? baseStorage.output(outputSchema)
|
|
399
431
|
: baseStorage;
|
|
400
|
-
// The view is handed over so a filter on a field this
|
|
432
|
+
// The view is handed over so a filter on a field this facade hides is SAID. The
|
|
401
433
|
// guard holds no logger — a warning is the boot's to voice, as a seed's report is.
|
|
402
434
|
const guarded = new StorageGuard(entity.entityClass.getFields(), entity.name, {
|
|
403
435
|
...(outputSchema && outputSchema !== entity.entityClass
|
|
404
436
|
? { view: (outputSchema as { getFields(): Fields }).getFields() }
|
|
405
437
|
: {}),
|
|
406
438
|
outOfView: (message) => frondLog.warn(message),
|
|
407
|
-
}).guard(scoped);
|
|
439
|
+
}, heldBy(entity.entityClass, entity.name, assembly.hosting), releasing(assembly.hosting)).guard(scoped);
|
|
408
440
|
surfaceScope.registerValue(storageKeyOf(entity.name), guarded);
|
|
409
441
|
surfaceScope.registerValue(repositoryKeyOf(entity.name), guarded);
|
|
410
442
|
}
|
package/src/boot/ownership.ts
CHANGED
|
@@ -1,34 +1,44 @@
|
|
|
1
1
|
import { lowerFirst } from '@fougere/schema';
|
|
2
|
-
import { nameOf, type FrondDescriptor
|
|
3
|
-
import {
|
|
2
|
+
import { nameOf, type FrondDescriptor } from '../descriptor/FrondDescriptor.js';
|
|
3
|
+
import { type ProviderEntry } from '../descriptor/ProviderEntry.js';
|
|
4
|
+
import { inheritsCrud } from '../prefab/CrudConstructor.js';
|
|
4
5
|
import { targetOf } from '../prefab/prefab.js';
|
|
5
|
-
import { ownedBy, repositoryKeyOf } from '../prefab/
|
|
6
|
-
import { entityOfStorageKey } from '../storage/
|
|
6
|
+
import { ownedBy, repositoryKeyOf } from '../prefab/RepositoryConstructor.js';
|
|
7
|
+
import { entityOfStorageKey } from '../storage/Storage.js';
|
|
8
|
+
import type { Diagnostic } from '../diagnostic.js';
|
|
7
9
|
|
|
8
10
|
/** One name, one file: two providers under one key and the second silently replaces the first. */
|
|
9
|
-
export function
|
|
11
|
+
export function sharedNames(frond: FrondDescriptor, refused: Diagnostic[]): void {
|
|
10
12
|
const declared = new Map<string, string>();
|
|
11
13
|
|
|
12
14
|
for (const provider of frond.providers) {
|
|
13
15
|
const name = nameOf(provider);
|
|
14
16
|
const first = declared.get(name);
|
|
15
17
|
if (first !== undefined) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
refused.push({
|
|
19
|
+
severity: 'blocking',
|
|
20
|
+
code: 'provider-name-taken',
|
|
21
|
+
filePath: provider.filePath,
|
|
22
|
+
frond: frond.name,
|
|
23
|
+
subject: name,
|
|
24
|
+
message: `${first} already declares ${name}. A frond registers both under one key, so the `
|
|
25
|
+
+ `second replaces the first and whoever asks for ${name} is handed whichever was `
|
|
26
|
+
+ 'scanned last. Rename one of the two.',
|
|
27
|
+
});
|
|
24
28
|
}
|
|
25
29
|
declared.set(name, provider.filePath);
|
|
26
30
|
}
|
|
27
31
|
}
|
|
28
32
|
|
|
29
33
|
/** Who owns an entity's storage. */
|
|
30
|
-
export function ownersOf(
|
|
34
|
+
export function ownersOf(
|
|
35
|
+
providers: readonly ProviderEntry[],
|
|
36
|
+
frond: string,
|
|
37
|
+
refused: Diagnostic[],
|
|
38
|
+
): Map<string, string> {
|
|
31
39
|
const owners = new Map<string, string>();
|
|
40
|
+
/** Claimed twice, so it has no owner — and no owner is nobody to judge a reader against. */
|
|
41
|
+
const contested = new Set<string>();
|
|
32
42
|
for (const provider of providers) {
|
|
33
43
|
const owned = ownedBy(provider.ctor);
|
|
34
44
|
if (owned.length < 2) continue;
|
|
@@ -39,14 +49,26 @@ export function ownersOf(providers: readonly ProviderEntry[]): Map<string, strin
|
|
|
39
49
|
// Refused rather than settled, for the reason `ports:` refuses two implementations
|
|
40
50
|
// and `remotes` two owners of an entity: whichever won would depend on scan order,
|
|
41
51
|
// and one of the two aggregates would be silently unenforced.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
52
|
+
refused.push({
|
|
53
|
+
severity: 'blocking',
|
|
54
|
+
code: 'entity-owned-twice',
|
|
55
|
+
filePath: provider.filePath,
|
|
56
|
+
frond,
|
|
57
|
+
subject: name,
|
|
58
|
+
message: `${first} and ${provider.ctor.name} both own ${name}. An entity has one owner: `
|
|
59
|
+
+ 'merge the two, or take it out of one of them.',
|
|
60
|
+
});
|
|
61
|
+
contested.add(name);
|
|
62
|
+
continue;
|
|
46
63
|
}
|
|
47
64
|
owners.set(name, provider.ctor.name);
|
|
48
65
|
}
|
|
49
66
|
}
|
|
67
|
+
// The second claimant is BUILT ON what it claims, so `storageInUserCode` would read it as
|
|
68
|
+
// reaching around the first — two more refusals naming the same declaration, in the one
|
|
69
|
+
// case where the answer to "who owns this" is already the diagnostic above.
|
|
70
|
+
for (const name of contested) owners.delete(name);
|
|
71
|
+
|
|
50
72
|
return owners;
|
|
51
73
|
}
|
|
52
74
|
|
|
@@ -62,12 +84,13 @@ function builtOn(ctor: unknown): string[] {
|
|
|
62
84
|
}
|
|
63
85
|
|
|
64
86
|
/** `Storage<E>` is not a word of the user's vocabulary — `<E>Repository` is the one way in. */
|
|
65
|
-
export function
|
|
87
|
+
export function storageInUserCode(
|
|
66
88
|
frond: FrondDescriptor,
|
|
67
89
|
owners: Map<string, string>,
|
|
68
90
|
known: (entity: string) => boolean,
|
|
91
|
+
refused: Diagnostic[],
|
|
69
92
|
): void {
|
|
70
|
-
const
|
|
93
|
+
const facades = [
|
|
71
94
|
...frond.handlers.map((h) => ({ ...h, kind: 'handler' })),
|
|
72
95
|
...frond.presenters.map((p) => ({ ...p, kind: 'presenter' })),
|
|
73
96
|
...frond.collectors.map((c) => ({ ...c, kind: 'collector' })),
|
|
@@ -81,15 +104,19 @@ export function refuseStorageInUserCode(
|
|
|
81
104
|
const held = entityOfStorageKey(registered, known);
|
|
82
105
|
if (!held) continue;
|
|
83
106
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
107
|
+
refused.push({
|
|
108
|
+
severity: 'blocking',
|
|
109
|
+
code: 'storage-key-is-provider',
|
|
110
|
+
filePath: provider.filePath,
|
|
111
|
+
frond: frond.name,
|
|
112
|
+
subject: registered,
|
|
113
|
+
message: `${registered} is a provider, and it is the container key of ${held}'s own storage `
|
|
114
|
+
+ '— the storage is registered second, so the provider is never resolved. Name it for '
|
|
115
|
+
+ 'what it holds; `<Entity>Storage` belongs to the entity.',
|
|
116
|
+
});
|
|
90
117
|
}
|
|
91
118
|
|
|
92
|
-
for (const decl of [...
|
|
119
|
+
for (const decl of [...facades, ...holders]) {
|
|
93
120
|
const allowed = decl.kind === 'provider' ? builtOn(decl.ctor) : [];
|
|
94
121
|
for (const dep of decl.deps) {
|
|
95
122
|
const entity = entityOfStorageKey(dep, known);
|
|
@@ -97,42 +124,55 @@ export function refuseStorageInUserCode(
|
|
|
97
124
|
|
|
98
125
|
const owner = owners.get(entity);
|
|
99
126
|
if (owner && owner !== decl.ctor.name) {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
127
|
+
refused.push({
|
|
128
|
+
severity: 'blocking',
|
|
129
|
+
code: 'aggregate-storage-reached',
|
|
130
|
+
filePath: decl.filePath,
|
|
131
|
+
frond: frond.name,
|
|
132
|
+
subject: `${decl.ctor.name}(${dep})`,
|
|
133
|
+
message: `${decl.ctor.name} asks for ${dep}, and ${owner} owns ${entity}. Nothing else `
|
|
134
|
+
+ `reaches an owned entity's storage — name the operation on ${owner} and ask for it: `
|
|
135
|
+
+ `constructor(private ${entity}: ${owner}) {}`,
|
|
136
|
+
});
|
|
137
|
+
continue;
|
|
107
138
|
}
|
|
108
139
|
if (allowed.includes(entity)) continue;
|
|
109
140
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
141
|
+
refused.push({
|
|
142
|
+
severity: 'blocking',
|
|
143
|
+
code: 'storage-outside-repository',
|
|
144
|
+
filePath: decl.filePath,
|
|
145
|
+
frond: frond.name,
|
|
146
|
+
subject: `${decl.ctor.name}(${dep})`,
|
|
147
|
+
message: `${decl.ctor.name} asks for ${dep}. Storage is reached through a repository, never `
|
|
148
|
+
+ `through the port: constructor(private ${entity}: ${repositoryKeyOf(entity)}) {}. It `
|
|
149
|
+
+ `answers every gesture ${dep} does, whether or not anyone wrote the file — and the day `
|
|
150
|
+
+ `${entity} belongs to an aggregate, this line does not move.`,
|
|
151
|
+
});
|
|
118
152
|
}
|
|
119
153
|
}
|
|
120
154
|
}
|
|
121
155
|
|
|
122
156
|
/** An owned entity has no automatic CRUD — said at boot, not at the first request. */
|
|
123
|
-
export function
|
|
157
|
+
export function crudOnOwned(
|
|
158
|
+
frond: FrondDescriptor,
|
|
159
|
+
owners: Map<string, string>,
|
|
160
|
+
refused: Diagnostic[],
|
|
161
|
+
): void {
|
|
124
162
|
for (const handler of frond.handlers) {
|
|
125
163
|
const owner = owners.get(handler.address);
|
|
126
164
|
if (!owner || handler.deps.length > 0 || !inheritsCrud(handler.ctor)) continue;
|
|
127
165
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
166
|
+
refused.push({
|
|
167
|
+
severity: 'blocking',
|
|
168
|
+
code: 'crud-on-owned-entity',
|
|
169
|
+
filePath: handler.filePath,
|
|
170
|
+
frond: frond.name,
|
|
171
|
+
subject: handler.ctor.name,
|
|
172
|
+
message: `${handler.ctor.name} takes the five gestures on ${handler.address}, which ${owner} `
|
|
173
|
+
+ 'owns. An owned entity has no automatic CRUD: nothing writes it but its owner, so there '
|
|
174
|
+
+ `is no storage to hand this handler. Name the operations on ${owner} and call them: `
|
|
175
|
+
+ `constructor(private ${handler.address}: ${owner}) {}`,
|
|
176
|
+
});
|
|
137
177
|
}
|
|
138
178
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** The two readings core serves everywhere, asked of one process over one transport. */
|
|
2
|
+
import { Invocation } from '../wire/Invocation.js';
|
|
3
|
+
import { RPC_ENTITY } from '../wire/RpcAnswer.js';
|
|
4
|
+
import type { Transport } from '../wire/Transport.js';
|
|
5
|
+
import type { Peer } from './Peer.js';
|
|
6
|
+
|
|
7
|
+
export function peerOver(transport: Transport): Peer {
|
|
8
|
+
const ask = (op: string, params: Record<string, unknown>) =>
|
|
9
|
+
transport({ entity: RPC_ENTITY, op }, { ...Invocation.empty, params: params as never });
|
|
10
|
+
|
|
11
|
+
return {
|
|
12
|
+
missing: async (entity, keys) =>
|
|
13
|
+
((await ask('holds', { entity, keys })) as { missing: readonly unknown[] }).missing,
|
|
14
|
+
dependents: (entity) => ask('dependents', { entity }),
|
|
15
|
+
release: async (entity, key, visited) => { await ask('release', { entity, key, visited }); },
|
|
16
|
+
};
|
|
17
|
+
}
|