@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
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/** Who holds a `ref()`: the source it lives in, this process, or nobody. */
|
|
2
|
+
import { lowerFirst, Role, Shapes } from '@fougere/schema';
|
|
3
|
+
/**
|
|
4
|
+
* Does a foreign key hold this reference? Both sides in ONE source that keeps relations — two
|
|
5
|
+
* databases share no constraint, and a frond behind `remotes:` registers no storage here at
|
|
6
|
+
* all. So the PAIR decides, never the engine.
|
|
7
|
+
*
|
|
8
|
+
* And the pair is not enough: an engine's cascade does not pass through the guard, so a hop it
|
|
9
|
+
* owns above a hop it does not would take rows out with nothing left to release THEIR rows. One
|
|
10
|
+
* unkeyed hop anywhere below and the guard takes the whole tree — the engine's own cascade then
|
|
11
|
+
* finds nothing left to do, since the guard walks deepest first and the row goes last.
|
|
12
|
+
*/
|
|
13
|
+
function keyed(namer, target, hosting, seen = new Set()) {
|
|
14
|
+
const pair = hosting.hostedHere(namer)
|
|
15
|
+
&& hosting.hostedHere(target)
|
|
16
|
+
&& hosting.sourceOf(namer) === hosting.sourceOf(target)
|
|
17
|
+
&& hosting.enforces(hosting.sourceOf(namer), 'relation');
|
|
18
|
+
if (!pair || seen.has(namer))
|
|
19
|
+
return pair;
|
|
20
|
+
seen.add(namer);
|
|
21
|
+
return referencesTo(namer, hosting).every(({ entity }) => keyed(entity, namer, hosting, seen));
|
|
22
|
+
}
|
|
23
|
+
/** Every field of every entity that names `target` — read over the whole app, both ways need it. */
|
|
24
|
+
function referencesTo(target, hosting) {
|
|
25
|
+
const found = [];
|
|
26
|
+
for (const [entity, schema] of hosting.entities()) {
|
|
27
|
+
for (const [field, declared] of Object.entries(schema.getFields())) {
|
|
28
|
+
const role = Role.of(declared);
|
|
29
|
+
if (role.isReference && role.target?.name && lowerFirst(role.target.name) === target) {
|
|
30
|
+
found.push({ entity, field, role });
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return found;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The references a foreign key cannot hold, each as a read the guard makes before the write.
|
|
38
|
+
*
|
|
39
|
+
* Documented: [entities](https://fougere.dev/docs/schema/entities).
|
|
40
|
+
*/
|
|
41
|
+
export function heldBy(entity, name, hosting) {
|
|
42
|
+
const checks = [];
|
|
43
|
+
for (const [field, declared] of Object.entries(entity.getFields())) {
|
|
44
|
+
const role = Role.of(declared);
|
|
45
|
+
if (!role.isReference || !role.target?.name)
|
|
46
|
+
continue;
|
|
47
|
+
const target = lowerFirst(role.target.name);
|
|
48
|
+
if (keyed(name, target, hosting))
|
|
49
|
+
continue;
|
|
50
|
+
checks.push({
|
|
51
|
+
field,
|
|
52
|
+
target,
|
|
53
|
+
missing: async (keys) => {
|
|
54
|
+
const storage = hosting.storageOf(target);
|
|
55
|
+
// Nothing here holds those rows — the process that does answers the same reading,
|
|
56
|
+
// so the question crosses rather than being given up on.
|
|
57
|
+
if (!storage)
|
|
58
|
+
return hosting.peerOf(target)?.missing(target, keys) ?? [];
|
|
59
|
+
const found = await storage.findByKeys(keys.map(String));
|
|
60
|
+
return keys.filter((key) => !found.has(String(key)));
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
return checks;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The rows that name this entity's, and what becomes of them — the dual of `heldBy`.
|
|
68
|
+
*
|
|
69
|
+
* Read over EVERY entity of the app, because a namer is declared wherever its own frond is,
|
|
70
|
+
* and the target learns of it from nowhere else. What a key already holds is left out: the
|
|
71
|
+
* engine answers it at the rows, inside the delete's own transaction.
|
|
72
|
+
*
|
|
73
|
+
* Documented: [entities](https://fougere.dev/docs/schema/entities).
|
|
74
|
+
*/
|
|
75
|
+
export function dependentsOf(target, hosting) {
|
|
76
|
+
return referencesTo(target, hosting)
|
|
77
|
+
.filter(({ entity }) => !keyed(entity, target, hosting))
|
|
78
|
+
.map(({ entity, field, role }) => ({ entity, field, onDelete: role.onDelete ?? 'restrict' }));
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* `set null` on a field that may not hold one — refused where the FIELD is, not in `ref()`.
|
|
82
|
+
*
|
|
83
|
+
* `optional()` wraps a `ref()` and is applied after it, so only the field the entity ended up
|
|
84
|
+
* declaring knows whether null is admitted. Asked here rather than at the target, because the
|
|
85
|
+
* declaration is the namer's and so is the fix.
|
|
86
|
+
*/
|
|
87
|
+
export function refuseUnwritableNull(entity, name, filePath) {
|
|
88
|
+
const refused = [];
|
|
89
|
+
for (const [field, declared] of Object.entries(entity.getFields())) {
|
|
90
|
+
if (Role.of(declared).onDelete !== 'set null' || Shapes.isNullable(declared.shape))
|
|
91
|
+
continue;
|
|
92
|
+
refused.push({
|
|
93
|
+
severity: 'blocking',
|
|
94
|
+
code: 'on-delete-null-refused',
|
|
95
|
+
filePath,
|
|
96
|
+
subject: `${name}.${field}`,
|
|
97
|
+
message: `${name}.${field} states onDelete 'set null', and the field admits no null — so the `
|
|
98
|
+
+ 'row could neither be emptied nor kept. Wrap it in `optional()`, or state `cascade` '
|
|
99
|
+
+ 'to take the row out with its target.',
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
return refused;
|
|
103
|
+
}
|
|
104
|
+
/** The checks nothing in this process can answer — asked once every frond has registered. */
|
|
105
|
+
export function unheldAmong(checks, hosting) {
|
|
106
|
+
return checks
|
|
107
|
+
.filter((check) => hosting.storageOf(check.target) === undefined)
|
|
108
|
+
.map((check) => `${check.field} → ${check.target}`);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* What a release asks the boot, built once per app — the same `Hosting` the guard reads.
|
|
112
|
+
*
|
|
113
|
+
* `dependentsOf` is answered per call rather than cached: a frond installed after this one
|
|
114
|
+
* brings rows that name an entity already registered, and a table taken at boot would miss
|
|
115
|
+
* exactly the crossings this exists for.
|
|
116
|
+
*/
|
|
117
|
+
export function releasing(hosting) {
|
|
118
|
+
return {
|
|
119
|
+
dependentsOf: (entity) => dependentsOf(entity, hosting),
|
|
120
|
+
rowsOf: (entity) => hosting.storageOf(entity),
|
|
121
|
+
schemaOf: (entity) => hosting.entities().get(entity),
|
|
122
|
+
peers: () => hosting.peers(),
|
|
123
|
+
journal: (entity) => hosting.journal(entity),
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* A release this process can START and cannot FINISH.
|
|
128
|
+
*
|
|
129
|
+
* Read from what is HERE and never asked of anyone: an entity states `cascade` or `set null`,
|
|
130
|
+
* and nothing registered a journal — both facts are local, so the line is too. The same shape
|
|
131
|
+
* as `unique declared, and the source does not enforce it`, one rung up: what is declared, and
|
|
132
|
+
* what this process cannot keep.
|
|
133
|
+
*
|
|
134
|
+
* Silent when a key holds every hop: the engine carries those out in one statement, and there
|
|
135
|
+
* is no half-done state for anybody to finish.
|
|
136
|
+
*/
|
|
137
|
+
export function unfinishable(hosting) {
|
|
138
|
+
if (hosting.journal('') !== undefined)
|
|
139
|
+
return [];
|
|
140
|
+
const found = [];
|
|
141
|
+
for (const [entity] of hosting.entities()) {
|
|
142
|
+
for (const dependent of dependentsOf(entity, hosting)) {
|
|
143
|
+
if (dependent.onDelete === 'restrict')
|
|
144
|
+
continue;
|
|
145
|
+
found.push(`${dependent.entity}.${dependent.field} → ${entity} (${dependent.onDelete})`);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return found;
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=relations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relations.js","sourceRoot":"","sources":["../../src/boot/relations.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAmB,MAAM,iBAAiB,CAAC;AAO5E;;;;;;;;;GASG;AACH,SAAS,KAAK,CAAC,KAAa,EAAE,MAAc,EAAE,OAAgB,EAAE,OAAO,IAAI,GAAG,EAAU;IACtF,MAAM,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC;WACjC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC;WAC1B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;WACpD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC;IAC3D,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAC1C,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;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AAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAqB;QACjE,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC;QACpD,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE;QAC5B,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC;KAC7C,CAAC;AACJ,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,YAAY,CAAC,OAAgB;IAC3C,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IAEjD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;QAC1C,KAAK,MAAM,SAAS,IAAI,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;YACtD,IAAI,SAAS,CAAC,QAAQ,KAAK,UAAU;gBAAE,SAAS;YAChD,KAAK,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,IAAI,SAAS,CAAC,KAAK,MAAM,MAAM,KAAK,SAAS,CAAC,QAAQ,GAAG,CAAC,CAAC;QAC3F,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/dist/boot/remote.d.ts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* Documented: [the gradient](https://fougere.dev/docs/infra/gradient).
|
|
5
|
-
*/
|
|
6
|
-
import type { Transport } from '../wire/call.js';
|
|
7
|
-
import { type AppMiddleware } from '../wire/middleware.js';
|
|
8
|
-
import { type InvocationContext } from '../wire/Invocation.js';
|
|
1
|
+
import type { Transport } from '../wire/Transport.js';
|
|
2
|
+
import { type AppMiddleware } from '../wire/AppMiddleware.js';
|
|
3
|
+
import { type InvocationContext } from '../wire/InvocationContext.js';
|
|
9
4
|
import { type SchemaView } from '@fougere/schema';
|
|
10
5
|
interface Route {
|
|
11
6
|
frond: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../src/boot/remote.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../src/boot/remote.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGtD,OAAO,EAAkB,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAG9E,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGtE,OAAO,EAAQ,KAAK,UAAU,EAAyB,MAAM,iBAAiB,CAAC;AAG/E,UAAU,KAAK;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;CACvC;AAED,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,SAAS,GACxC,YAAY,CAsFd;AAED,KAAK,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,EAAE,iBAAiB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;AAEnF,+EAA+E;AAC/E,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,YAAY,EACpB,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,aAAa,EAAE,GACnD,MAAM,CAYR"}
|
package/dist/boot/remote.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { RPC_ENTITY } from '../wire/RpcAnswer.js';
|
|
2
|
+
import { assertIdentityCard } from '../wire/card/IdentityCard.js';
|
|
3
|
+
import { runMiddlewares } from '../wire/AppMiddleware.js';
|
|
3
4
|
import { Invocation } from '../wire/Invocation.js';
|
|
4
|
-
import {
|
|
5
|
+
import { ErrorCode } from '../wire/ErrorCode.js';
|
|
6
|
+
import { FougereError } from '../wire/FougereError.js';
|
|
5
7
|
import { Card } from '@fougere/schema';
|
|
6
8
|
import { dynamicOperations } from '../entry/facade.js';
|
|
7
9
|
export function createRemoteRouter(remotes, makeTransport) {
|
|
@@ -10,7 +12,7 @@ export function createRemoteRouter(remotes, makeTransport) {
|
|
|
10
12
|
// what decides which entities live behind it.
|
|
11
13
|
const pending = new Map(Object.entries(remotes));
|
|
12
14
|
const transports = new Map();
|
|
13
|
-
/** Which remote label claimed a
|
|
15
|
+
/** Which remote label claimed a facade name — so a second claim can name the first. */
|
|
14
16
|
const claimedBy = new Map();
|
|
15
17
|
const discover = async () => {
|
|
16
18
|
// Asking is concurrent; INDEXING is not, and is done in the order `remotes` declares.
|
|
@@ -37,27 +39,27 @@ export function createRemoteRouter(remotes, makeTransport) {
|
|
|
37
39
|
pending.delete(label);
|
|
38
40
|
const card = assertIdentityCard(answer, `Remote '${label}' (${url})`);
|
|
39
41
|
for (const frond of card.fronds) {
|
|
40
|
-
//
|
|
41
|
-
// adding one here would answer a call with a transport to a
|
|
42
|
+
// Facades only. A fact is not routable — nobody calls it, it arrives — so
|
|
43
|
+
// adding one here would answer a call with a transport to a facade that
|
|
42
44
|
// does not exist.
|
|
43
|
-
for (const
|
|
44
|
-
const first = claimedBy.get(
|
|
45
|
+
for (const facade of frond.facades) {
|
|
46
|
+
const first = claimedBy.get(facade.name);
|
|
45
47
|
/** Two remotes claiming one name is refused, not silently arbitrated. */
|
|
46
48
|
if (first !== undefined && first !== label) {
|
|
47
49
|
throw new FougereError({
|
|
48
50
|
code: ErrorCode.INTERNAL_ERROR,
|
|
49
|
-
message: `Two remotes serve '${
|
|
51
|
+
message: `[claim] Two remotes serve '${facade.name}': '${first}' and '${label}'.\n`
|
|
50
52
|
+ ` A call names an entity, not a frond, so nothing could choose between them.\n`
|
|
51
53
|
+ ` - Keep one of the two out of \`remotes:\`, or\n`
|
|
52
54
|
+ ` - expose one of them under a different entity name.`,
|
|
53
|
-
entity:
|
|
55
|
+
entity: facade.name,
|
|
54
56
|
});
|
|
55
57
|
}
|
|
56
|
-
claimedBy.set(
|
|
57
|
-
byEntity.set(
|
|
58
|
+
claimedBy.set(facade.name, label);
|
|
59
|
+
byEntity.set(facade.name, {
|
|
58
60
|
frond: frond.name,
|
|
59
61
|
transport,
|
|
60
|
-
...(
|
|
62
|
+
...(facade.schema ? { schema: Card.fromDescriptor(facade.schema).toSchema() } : {}),
|
|
61
63
|
});
|
|
62
64
|
}
|
|
63
65
|
}
|
|
@@ -73,13 +75,15 @@ export function createRemoteRouter(remotes, makeTransport) {
|
|
|
73
75
|
if (pending.size > 0) {
|
|
74
76
|
throw new FougereError({
|
|
75
77
|
code: ErrorCode.SERVICE_UNAVAILABLE,
|
|
76
|
-
message: `No reachable remote hosts '${entity}' — unreachable: ${[...pending.keys()].join(', ')}
|
|
78
|
+
message: `No reachable remote hosts '${entity}' — unreachable: ${[...pending.keys()].join(', ')}.\n`
|
|
79
|
+
+ ' Named in `remotes:`, and did not answer.',
|
|
77
80
|
entity,
|
|
78
81
|
});
|
|
79
82
|
}
|
|
80
83
|
throw new FougereError({
|
|
81
84
|
code: ErrorCode.NOT_FOUND,
|
|
82
|
-
message: `No declared remote hosts '${entity}'
|
|
85
|
+
message: `No declared remote hosts '${entity}'.\n`
|
|
86
|
+
+ ' Nothing here serves it either — add its frond to `fronds:`/`scan:`, or name the frond that does in `remotes:`.',
|
|
83
87
|
entity,
|
|
84
88
|
});
|
|
85
89
|
},
|
package/dist/boot/remote.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote.js","sourceRoot":"","sources":["../../src/boot/remote.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"remote.js","sourceRoot":"","sources":["../../src/boot/remote.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,cAAc,EAAsB,MAAM,0BAA0B,CAAC;AAE9E,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,IAAI,EAA0C,MAAM,iBAAiB,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAgBvD,MAAM,UAAU,kBAAkB,CAChC,OAA+B,EAC/B,aAAyC;IAEzC,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAiB,CAAC;IAC1C,2EAA2E;IAC3E,8CAA8C;IAC9C,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;IACjD,MAAM,UAAU,GAAG,IAAI,GAAG,EAAqB,CAAC;IAEhD,uFAAuF;IACvF,MAAM,SAAS,GAAG,IAAI,GAAG,EAAkB,CAAC;IAE5C,MAAM,QAAQ,GAAG,KAAK,IAAmB,EAAE;QACzC,sFAAsF;QACtF,mFAAmF;QACnF,6EAA6E;QAC7E,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,GAAG,CAC7B,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,EAAE;YACtC,MAAM,SA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BACrB,IAAI,EAAE,SAAS,CAAC,SAAS;gBACzB,OAAO,EAAE,6BAA6B,MAAM,MAAM;sBAC9C,kHAAkH;gBACtH,MAAM;aACP,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC;AAID,+EAA+E;AAC/E,MAAM,UAAU,kBAAkB,CAChC,MAAc,EACd,MAAoB,EACpB,cAAoD;IAEpD,MAAM,IAAI,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,KAAK,EAAE,aAAgC,UAAU,CAAC,KAAK,EAAE,EAAE;QACtF,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACxD,MAAM,IAAI,GAAc,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;QAC9C,MAAM,GAAG,GAAqB;YAC5B,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,UAAU;SAC5E,CAAC;QACF,OAAO,cAAc,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CACtD,SAAS,CAAC,IAAI,EAAE,GAAG,CAAC,UAAU,IAAI,UAAU,CAAC,CAAC,CAAC;IACnD,CAAC,CAAC;IAEF,OAAO,iBAAiB,CAAC,IAAI,CAAW,CAAC;AAC3C,CAAC"}
|
package/dist/boot/runner.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** A Transport built from an app — the two ways a call enters this process. */
|
|
2
|
-
import type { App } from './
|
|
3
|
-
import type { Transport } from '../wire/
|
|
2
|
+
import type { App } from './App.js';
|
|
3
|
+
import type { Transport } from '../wire/Transport.js';
|
|
4
4
|
/** Build the local runner — the reference realization of Transport. */
|
|
5
5
|
export declare function createLocalRunner(app: App, surface?: string): Transport;
|
|
6
6
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/boot/runner.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/boot/runner.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGtD,uEAAuE;AACvE,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAEvE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAErE"}
|
package/dist/boot/seed.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { FrondDescriptor
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { FrondDescriptor } from '../descriptor/FrondDescriptor.js';
|
|
2
|
+
import type { SeedEntry } from '../descriptor/SeedEntry.js';
|
|
3
|
+
import type { App } from './App.js';
|
|
4
|
+
import type { Extension } from './Extension.js';
|
|
4
5
|
/** What the ordering satisfied, and what no order can. */
|
|
5
6
|
export interface SeedOrder {
|
|
6
7
|
ordered: SeedEntry[];
|
package/dist/boot/seed.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seed.d.ts","sourceRoot":"","sources":["../../src/boot/seed.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"seed.d.ts","sourceRoot":"","sources":["../../src/boot/seed.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,0DAA0D;AAC1D,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,iFAAiF;IACjF,KAAK,EAAE,SAAS,EAAE,CAAC;CACpB;AAED,mFAAmF;AACnF,wBAAgB,UAAU,CAAC,MAAM,EAAE,eAAe,EAAE,GAAG,SAAS,CAyC/D;AAQD;;;;GAIG;AACH,wBAAsB,QAAQ,CAC5B,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,SAAS,EAAE,EAClB,MAAM,GAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAe,GAC3C,OAAO,CAAC,IAAI,CAAC,CA+Bf;AAsBD;;;GAGG;AACH,wBAAgB,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAAG,SAAS,CAgBrE"}
|
package/dist/boot/seed.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Role } from '@fougere/schema';
|
|
2
|
-
import { facadeKeyOf } from '../wire/
|
|
2
|
+
import { facadeKeyOf } from '../wire/Facade.js';
|
|
3
3
|
/** Seeds in dependency order — a `ref()` target is planted before its referrer. */
|
|
4
4
|
export function orderSeeds(fronds) {
|
|
5
5
|
const refs = new Map();
|
|
@@ -46,12 +46,12 @@ export async function runSeeds(app, seeds, report = () => { }) {
|
|
|
46
46
|
for (const seed of seeds) {
|
|
47
47
|
const resolve = (name) => app.resolve(name + 'Handler');
|
|
48
48
|
const data = typeof seed.data === 'function' ? await seed.data(resolve) : seed.data;
|
|
49
|
-
const
|
|
50
|
-
if (!
|
|
49
|
+
const facade = facadeFor(app, seed.entityName);
|
|
50
|
+
if (!facade) {
|
|
51
51
|
report(` ${seed.entityName}: no handler façade nor storage — skipping seed`);
|
|
52
52
|
continue;
|
|
53
53
|
}
|
|
54
|
-
const existing = await
|
|
54
|
+
const existing = await facade.list();
|
|
55
55
|
if (existing.length > 0) {
|
|
56
56
|
report(` ${seed.entityName}: skipped (${existing.length} exist)`);
|
|
57
57
|
continue;
|
|
@@ -60,7 +60,7 @@ export async function runSeeds(app, seeds, report = () => { }) {
|
|
|
60
60
|
// key is exactly what a seed gets wrong.
|
|
61
61
|
for (const item of data) {
|
|
62
62
|
try {
|
|
63
|
-
await
|
|
63
|
+
await facade.write(item);
|
|
64
64
|
}
|
|
65
65
|
catch (cause) {
|
|
66
66
|
throw new Error(`Seed '${seed.entityName}' failed on ${JSON.stringify(item)}: ${cause?.message ?? cause}`, { cause });
|
|
@@ -70,7 +70,7 @@ export async function runSeeds(app, seeds, report = () => { }) {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
/** A seed is not a client. */
|
|
73
|
-
function
|
|
73
|
+
function facadeFor(app, entityName) {
|
|
74
74
|
let handler;
|
|
75
75
|
try {
|
|
76
76
|
handler = app.resolve(facadeKeyOf(entityName));
|
package/dist/boot/seed.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seed.js","sourceRoot":"","sources":["../../src/boot/seed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"seed.js","sourceRoot":"","sources":["../../src/boot/seed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAchD,mFAAmF;AACnF,MAAM,UAAU,UAAU,CAAC,MAAyB;IAClD,MAAM,IAAI,GAAG,IAAI,GAAG,EAAuB,CAAC;IAC5C,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;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G,OAAO,EAAE,GAAG,KAAK,CAAC,CAAC;YACrC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;gBAAE,MAAM,QAAQ,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QAC3D,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** Where a STATED contract and the signature it is about have stopped agreeing. */
|
|
2
|
-
import type { FrondDescriptor
|
|
3
|
-
import type {
|
|
2
|
+
import type { FrondDescriptor } from '../descriptor/FrondDescriptor.js';
|
|
3
|
+
import type { HandlerEntry } from '../descriptor/HandlerEntry.js';
|
|
4
|
+
import type { Diagnostic } from '../diagnostic.js';
|
|
4
5
|
/** What a frond's stated contracts no longer match. */
|
|
5
|
-
export declare function statementDrift(frond: FrondDescriptor, handler: HandlerEntry):
|
|
6
|
+
export declare function statementDrift(frond: FrondDescriptor, handler: HandlerEntry): Diagnostic[];
|
|
6
7
|
//# sourceMappingURL=statement-drift.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statement-drift.d.ts","sourceRoot":"","sources":["../../src/boot/statement-drift.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"statement-drift.d.ts","sourceRoot":"","sources":["../../src/boot/statement-drift.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAWnD,uDAAuD;AACvD,wBAAgB,cAAc,CAAC,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,YAAY,GAAG,UAAU,EAAE,CA2B1F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statement-drift.js","sourceRoot":"","sources":["../../src/boot/statement-drift.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"statement-drift.js","sourceRoot":"","sources":["../../src/boot/statement-drift.ts"],"names":[],"mappings":"AAOA,iFAAiF;AACjF,SAAS,gBAAgB,CAAC,IAAiB,EAAE,SAAoB;IAC/D,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAmB,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAEhF,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;AACvE,CAAC;AAED,uDAAuD;AACvD,MAAM,UAAU,cAAc,CAAC,KAAsB,EAAE,OAAqB;IAC1E,MAAM,KAAK,GAAiB,EAAE,CAAC;IAE/B,KAAK,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,mBAAmB,IAAI,EAAE,CAAC,EAAE,CAAC;QAC/E,IAAI,CAAC,QAAQ,CAAC,OAAO;YAAE,SAAS;QAEhC,qFAAqF;QACrF,oFAAoF;QACpF,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC;QAC1D,IAAI,CAAC,SAAS;YAAE,SAAS;QAEzB,MAAM,OAAO,GAAG,gBAAgB,CAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAC9D,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QAEnC,KAAK,CAAC,IAAI,CAAC;YACT,QAAQ,EAAE,SAAS;YACnB,IAAI,EAAE,wBAAwB;YAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,KAAK,EAAE,KAAK,CAAC,IAAI;YACjB,OAAO,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE;YACvC,OAAO,EAAE,yBAAyB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM;kBAC7E,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,qBAAqB,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAmB,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK;kBACtH,0DAA0D;SAC/D,CAAC,CAAC;IACL,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/dist/boot/together.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type SchemaView } from '@fougere/schema';
|
|
2
2
|
import type { Container } from '@fougere/container';
|
|
3
|
-
import { type StorageFactory } from '../storage/
|
|
4
|
-
import type { Logger } from '../builtin/
|
|
5
|
-
import type { ProviderEntry } from '../descriptor/
|
|
3
|
+
import { type StorageFactory } from '../storage/StorageFactory.js';
|
|
4
|
+
import type { Logger } from '../builtin/Logger.js';
|
|
5
|
+
import type { ProviderEntry } from '../descriptor/ProviderEntry.js';
|
|
6
|
+
import type { Hosting } from './Hosting.js';
|
|
7
|
+
import type { Diagnostic } from '../diagnostic.js';
|
|
6
8
|
/** Everything the boot knows that a frame needs, gathered once for every frond. */
|
|
7
9
|
export interface FrameWorld {
|
|
8
10
|
/** Every entity of every frond, by registration key. A frame crosses fronds by design. */
|
|
@@ -15,8 +17,13 @@ export interface FrameWorld {
|
|
|
15
17
|
/** Whether that source hands one out — asked before the frame is built, not at the call. */
|
|
16
18
|
transacts?: (source: string) => boolean;
|
|
17
19
|
transacted?: <R>(source: string, fn: (storageFactory: StorageFactory) => Promise<R>) => Promise<R>;
|
|
20
|
+
/** What a member's references ask before a write — the answer its frond's own storage gets. */
|
|
21
|
+
hosting: Hosting;
|
|
18
22
|
log: Logger;
|
|
19
23
|
}
|
|
20
24
|
/** Register one frame per key a handler or provider of this frond asked for. */
|
|
21
|
-
export declare function registerFrames(scope: Container,
|
|
25
|
+
export declare function registerFrames(scope: Container, wanted: Iterable<{
|
|
26
|
+
key: string;
|
|
27
|
+
filePath: string;
|
|
28
|
+
}>, providers: readonly ProviderEntry[], world: FrameWorld, refused: Diagnostic[]): void;
|
|
22
29
|
//# sourceMappingURL=together.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"together.d.ts","sourceRoot":"","sources":["../../src/boot/together.ts"],"names":[],"mappings":"AAMA,OAAO,EAA0B,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"together.d.ts","sourceRoot":"","sources":["../../src/boot/together.ts"],"names":[],"mappings":"AAMA,OAAO,EAA0B,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAGpE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,mFAAmF;AACnF,MAAM,WAAW,UAAU;IACzB,0FAA0F;IAC1F,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACtC,kFAAkF;IAClF,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACvC,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,CAAC;IAC1C,4FAA4F;IAC5F,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;IACxC,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,cAAc,EAAE,cAAc,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IACnG,+FAA+F;IAC/F,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;CACb;AAuHD,gFAAgF;AAChF,wBAAgB,cAAc,CAC5B,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,QAAQ,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,EACnD,SAAS,EAAE,SAAS,aAAa,EAAE,EACnC,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,UAAU,EAAE,GACpB,IAAI,CAqEN"}
|
package/dist/boot/together.js
CHANGED
|
@@ -5,53 +5,74 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { ambient } from '#ambient';
|
|
7
7
|
import { upperFirst, lowerFirst } from '@fougere/schema';
|
|
8
|
-
import { membersOfTogetherKey, storageKeyOf
|
|
8
|
+
import { entityOfStorageKey, membersOfTogetherKey, storageKeyOf } from '../storage/Storage.js';
|
|
9
9
|
import { StorageGuard } from '../dispatch/StorageGuard.js';
|
|
10
|
+
import { heldBy, releasing } from './relations.js';
|
|
10
11
|
import { recording, unwind } from './frame.js';
|
|
11
|
-
/** Each declared name, resolved to what it designates. */
|
|
12
|
-
function resolve(names, declared, world) {
|
|
13
|
-
const
|
|
12
|
+
/** Each declared name, resolved to what it designates — or nothing, and why. */
|
|
13
|
+
function resolve(names, declared, world, asked, refused) {
|
|
14
|
+
const before = refused.length;
|
|
15
|
+
const entities = names.entities.flatMap((member) => {
|
|
14
16
|
const name = lowerFirst(member);
|
|
15
17
|
const schema = world.entityByName.get(name);
|
|
16
18
|
if (!schema) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
refused.push({
|
|
20
|
+
...asked,
|
|
21
|
+
code: 'together-entity-unknown',
|
|
22
|
+
message: `Together<[…${member}…]>: no entity named '${member}' is scanned in this app. `
|
|
23
|
+
+ 'The first list names entities; a class of this frond goes in the second.',
|
|
24
|
+
});
|
|
25
|
+
return [];
|
|
19
26
|
}
|
|
20
|
-
return { name, schema };
|
|
27
|
+
return [{ name, schema }];
|
|
21
28
|
});
|
|
22
|
-
const providers = names.providers.
|
|
29
|
+
const providers = names.providers.flatMap((member) => {
|
|
23
30
|
const entry = declared.find((provider) => provider.ctor.name === member);
|
|
24
31
|
if (!entry) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
32
|
+
refused.push({
|
|
33
|
+
...asked,
|
|
34
|
+
code: 'together-provider-unknown',
|
|
35
|
+
message: `Together<[…], [… ${member} …]>: this frond declares no class named '${member}'. `
|
|
36
|
+
+ 'The second list names providers to rebuild inside the frame — a service, a mirror, '
|
|
37
|
+
+ 'a repository — so that what they write is covered by the unwind.',
|
|
38
|
+
});
|
|
39
|
+
return [];
|
|
28
40
|
}
|
|
29
|
-
return entry;
|
|
41
|
+
return [entry];
|
|
30
42
|
});
|
|
31
|
-
return { entities, providers };
|
|
43
|
+
return refused.length === before ? { entities, providers } : undefined;
|
|
32
44
|
}
|
|
33
45
|
/** A member that cannot write here at all — its frond is hosted elsewhere. */
|
|
34
|
-
function
|
|
46
|
+
function remoteMembers(members, world, asked, refused) {
|
|
35
47
|
for (const member of members.entities) {
|
|
36
48
|
const frond = world.frondOf.get(member.name);
|
|
37
49
|
if (frond && !world.hostedHere(frond)) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
50
|
+
refused.push({
|
|
51
|
+
...asked,
|
|
52
|
+
code: 'together-member-remote',
|
|
53
|
+
message: `'${member.name}' belongs to frond '${frond}', which this process declares in `
|
|
54
|
+
+ 'remotes: — it registers no storage here, so its writes cannot be part of a frame. '
|
|
55
|
+
+ 'Host the frond here, or split the work and join the halves with a fact.',
|
|
56
|
+
});
|
|
41
57
|
}
|
|
42
58
|
}
|
|
43
59
|
}
|
|
44
60
|
/** A provider member writing an entity the frame does not name. */
|
|
45
|
-
function
|
|
61
|
+
function uncoveredWrites(members, world, asked, refused) {
|
|
46
62
|
const covered = new Set(members.entities.map((member) => member.name));
|
|
47
63
|
for (const provider of members.providers) {
|
|
48
64
|
for (const dep of provider.deps) {
|
|
49
65
|
const entity = entityOfStorageKey(dep, (name) => world.entityByName.has(name));
|
|
50
66
|
if (!entity || covered.has(entity))
|
|
51
67
|
continue;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
68
|
+
refused.push({
|
|
69
|
+
...asked,
|
|
70
|
+
filePath: provider.filePath,
|
|
71
|
+
code: 'together-write-uncovered',
|
|
72
|
+
message: `${provider.ctor.name} writes ${entity}, which is not in the frame's entity list `
|
|
73
|
+
+ `— its writes would escape the unwind. Add it: `
|
|
74
|
+
+ `Together<[…, ${upperFirst(entity)}], [… ${provider.ctor.name} …]>.`,
|
|
75
|
+
});
|
|
55
76
|
}
|
|
56
77
|
}
|
|
57
78
|
}
|
|
@@ -76,21 +97,34 @@ async function inScope(parent, members, factory, wrap, fn) {
|
|
|
76
97
|
}
|
|
77
98
|
}
|
|
78
99
|
/** Register one frame per key a handler or provider of this frond asked for. */
|
|
79
|
-
export function registerFrames(scope,
|
|
100
|
+
export function registerFrames(scope, wanted, providers, world, refused) {
|
|
80
101
|
let registered = 0;
|
|
81
|
-
|
|
102
|
+
const seen = new Set();
|
|
103
|
+
for (const { key, filePath } of wanted) {
|
|
104
|
+
if (seen.has(key))
|
|
105
|
+
continue;
|
|
106
|
+
seen.add(key);
|
|
82
107
|
const names = membersOfTogetherKey(key);
|
|
83
108
|
if (!names)
|
|
84
109
|
continue;
|
|
85
110
|
registered += 1;
|
|
111
|
+
const asked = { severity: 'blocking', filePath, subject: key };
|
|
86
112
|
if (!world.storageFactory) {
|
|
87
|
-
|
|
113
|
+
refused.push({
|
|
114
|
+
...asked,
|
|
115
|
+
code: 'together-needs-storage',
|
|
116
|
+
message: `Together<[${names.entities.join(', ')}]> needs storage, and this boot declares none.`,
|
|
117
|
+
});
|
|
118
|
+
continue;
|
|
88
119
|
}
|
|
89
|
-
const members = resolve(names, providers, world);
|
|
90
|
-
|
|
91
|
-
|
|
120
|
+
const members = resolve(names, providers, world, asked, refused);
|
|
121
|
+
// Nothing left to build a frame out of, and the refusals above already say what is missing.
|
|
122
|
+
if (!members)
|
|
123
|
+
continue;
|
|
124
|
+
remoteMembers(members, world, asked, refused);
|
|
125
|
+
uncoveredWrites(members, world, asked, refused);
|
|
92
126
|
const sources = new Set(members.entities.map((member) => world.sourceOf?.(member.name) ?? 'db'));
|
|
93
|
-
const validator = (storage, name, schema) => new StorageGuard(schema.getFields(), name).guard(storage);
|
|
127
|
+
const validator = (storage, name, schema) => new StorageGuard(schema.getFields(), name, {}, heldBy(schema, name, world.hosting), releasing(world.hosting)).guard(storage);
|
|
94
128
|
// One engine and a way into it: the engine gives the unwind AND the isolation. The
|
|
95
129
|
// question goes to the source these members live in — a composition answering for the
|
|
96
130
|
// default one would compensate a frame whose own engine holds transactions.
|