@cratis/chronicle 6.16.1 → 6.17.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/artifacts/ActivatedArtifact.ts +5 -1
- package/artifacts/ArtifactCompletionFailed.ts +20 -0
- package/artifacts/ArtifactInvocationContext.ts +21 -0
- package/artifacts/for_withActivatedArtifact/when_completing/after_processing_failure.spec.ts +34 -0
- package/artifacts/index.ts +2 -0
- package/artifacts/withActivatedArtifact.ts +20 -3
- package/dist/artifacts/ActivatedArtifact.d.ts +4 -1
- package/dist/artifacts/ActivatedArtifact.d.ts.map +1 -1
- package/dist/artifacts/ArtifactCompletionFailed.d.ts +9 -0
- package/dist/artifacts/ArtifactCompletionFailed.d.ts.map +1 -0
- package/dist/artifacts/ArtifactCompletionFailed.js +19 -0
- package/dist/artifacts/ArtifactCompletionFailed.js.map +1 -0
- package/dist/artifacts/ArtifactInvocationContext.d.ts +18 -0
- package/dist/artifacts/ArtifactInvocationContext.d.ts.map +1 -0
- package/dist/artifacts/ArtifactInvocationContext.js +4 -0
- package/dist/artifacts/ArtifactInvocationContext.js.map +1 -0
- package/dist/artifacts/index.d.ts +2 -0
- package/dist/artifacts/index.d.ts.map +1 -1
- package/dist/artifacts/index.js +1 -0
- package/dist/artifacts/index.js.map +1 -1
- package/dist/artifacts/withActivatedArtifact.d.ts +2 -1
- package/dist/artifacts/withActivatedArtifact.d.ts.map +1 -1
- package/dist/artifacts/withActivatedArtifact.js +22 -3
- package/dist/artifacts/withActivatedArtifact.js.map +1 -1
- package/dist/projections/CompiledProjectionDefinitions.d.ts +6 -0
- package/dist/projections/CompiledProjectionDefinitions.d.ts.map +1 -1
- package/dist/projections/ProjectionCapabilityProvenance.d.ts +8 -0
- package/dist/projections/ProjectionCapabilityProvenance.d.ts.map +1 -0
- package/dist/projections/ProjectionCapabilityProvenance.js +4 -0
- package/dist/projections/ProjectionCapabilityProvenance.js.map +1 -0
- package/dist/projections/ProjectionDefinitionCompiler.d.ts +1 -0
- package/dist/projections/ProjectionDefinitionCompiler.d.ts.map +1 -1
- package/dist/projections/ProjectionDefinitionCompiler.js +130 -4
- package/dist/projections/ProjectionDefinitionCompiler.js.map +1 -1
- package/dist/projections/ProjectionEventSchema.d.ts +10 -0
- package/dist/projections/ProjectionEventSchema.d.ts.map +1 -0
- package/dist/projections/ProjectionEventSchema.js +4 -0
- package/dist/projections/ProjectionEventSchema.js.map +1 -0
- package/dist/projections/VariantReclassifier.d.ts +2 -0
- package/dist/projections/VariantReclassifier.d.ts.map +1 -1
- package/dist/projections/VariantReclassifier.js.map +1 -1
- package/dist/projections/captureProjectionProvenance.d.ts +4 -0
- package/dist/projections/captureProjectionProvenance.d.ts.map +1 -0
- package/dist/projections/captureProjectionProvenance.js +56 -0
- package/dist/projections/captureProjectionProvenance.js.map +1 -0
- package/dist/projections/declarative/FromBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/FromBuilder.js +9 -0
- package/dist/projections/declarative/FromBuilder.js.map +1 -1
- package/dist/projections/declarative/ProjectionBuilderCore.d.ts.map +1 -1
- package/dist/projections/declarative/ProjectionBuilderCore.js +8 -0
- package/dist/projections/declarative/ProjectionBuilderCore.js.map +1 -1
- package/dist/projections/declarative/projectionBuilderProvenance.d.ts +16 -0
- package/dist/projections/declarative/projectionBuilderProvenance.d.ts.map +1 -0
- package/dist/projections/declarative/projectionBuilderProvenance.js +28 -0
- package/dist/projections/declarative/projectionBuilderProvenance.js.map +1 -0
- package/dist/projections/eventContractPath.d.ts +4 -0
- package/dist/projections/eventContractPath.d.ts.map +1 -0
- package/dist/projections/eventContractPath.js +7 -0
- package/dist/projections/eventContractPath.js.map +1 -0
- package/dist/reactors/Reactors.d.ts.map +1 -1
- package/dist/reactors/Reactors.js +12 -3
- package/dist/reactors/Reactors.js.map +1 -1
- package/dist/reducers/Reducers.d.ts.map +1 -1
- package/dist/reducers/Reducers.js +12 -3
- package/dist/reducers/Reducers.js.map +1 -1
- package/dist/testing/projections/ProjectionCapabilities.d.ts +17 -0
- package/dist/testing/projections/ProjectionCapabilities.d.ts.map +1 -0
- package/dist/testing/projections/ProjectionCapabilities.js +233 -0
- package/dist/testing/projections/ProjectionCapabilities.js.map +1 -0
- package/dist/testing/projections/UnsupportedProjectionOperation.d.ts +11 -0
- package/dist/testing/projections/UnsupportedProjectionOperation.d.ts.map +1 -0
- package/dist/testing/projections/UnsupportedProjectionOperation.js +16 -0
- package/dist/testing/projections/UnsupportedProjectionOperation.js.map +1 -0
- package/dist/testing/projections/for_ProjectionCapabilities/given/Changed.d.ts +7 -0
- package/dist/testing/projections/for_ProjectionCapabilities/given/Changed.d.ts.map +1 -0
- package/dist/testing/projections/for_ProjectionCapabilities/given/Changed.js +16 -0
- package/dist/testing/projections/for_ProjectionCapabilities/given/Changed.js.map +1 -0
- package/dist/testing/projections/for_ProjectionCapabilities/given/Model.d.ts +10 -0
- package/dist/testing/projections/for_ProjectionCapabilities/given/Model.d.ts.map +1 -0
- package/dist/testing/projections/for_ProjectionCapabilities/given/Model.js +20 -0
- package/dist/testing/projections/for_ProjectionCapabilities/given/Model.js.map +1 -0
- package/dist/testing/projections/for_ProjectionCapabilities/given/Removed.d.ts +3 -0
- package/dist/testing/projections/for_ProjectionCapabilities/given/Removed.d.ts.map +1 -0
- package/dist/testing/projections/for_ProjectionCapabilities/given/Removed.js +7 -0
- package/dist/testing/projections/for_ProjectionCapabilities/given/Removed.js.map +1 -0
- package/dist/testing/projections/for_ProjectionCapabilities/given/compile.d.ts +12 -0
- package/dist/testing/projections/for_ProjectionCapabilities/given/compile.d.ts.map +1 -0
- package/dist/testing/projections/for_ProjectionCapabilities/given/compile.js +34 -0
- package/dist/testing/projections/for_ProjectionCapabilities/given/compile.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/projections/CompiledProjectionDefinitions.ts +6 -0
- package/projections/ProjectionCapabilityProvenance.ts +10 -0
- package/projections/ProjectionDefinitionCompiler.ts +127 -4
- package/projections/ProjectionEventSchema.ts +13 -0
- package/projections/VariantReclassifier.ts +2 -0
- package/projections/captureProjectionProvenance.ts +50 -0
- package/projections/declarative/FromBuilder.ts +9 -0
- package/projections/declarative/ProjectionBuilderCore.ts +7 -0
- package/projections/declarative/projectionBuilderProvenance.ts +40 -0
- package/projections/eventContractPath.ts +9 -0
- package/reactors/Reactors.ts +13 -3
- package/reactors/for_Reactors/when_delivering/with_activation.spec.ts +93 -2
- package/reducers/Reducers.ts +14 -3
- package/reducers/for_Reducers/when_delivering/with_activation.spec.ts +67 -1
- package/testing/projections/ProjectionCapabilities.ts +213 -0
- package/testing/projections/UnsupportedProjectionOperation.ts +16 -0
- package/testing/projections/for_ProjectionCapabilities/given/Changed.ts +12 -0
- package/testing/projections/for_ProjectionCapabilities/given/Model.ts +13 -0
- package/testing/projections/for_ProjectionCapabilities/given/Removed.ts +7 -0
- package/testing/projections/for_ProjectionCapabilities/given/compile.ts +39 -0
- package/testing/projections/for_ProjectionCapabilities/when_compiling_capability_evidence.spec.ts +68 -0
- package/testing/projections/for_ProjectionCapabilities/when_rejecting_unsupported_operations.spec.ts +230 -0
- package/testing/projections/for_ProjectionCapabilities/when_validating_numeric_schemas.spec.ts +73 -0
- package/testing/projections/for_ProjectionCapabilities/when_validating_schema_boundaries.spec.ts +118 -0
- package/testing/projections/for_ProjectionCapabilities/when_validating_supported_operations.spec.ts +103 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"7.0.2","root":["../ChronicleClient.ts","../ChronicleOptions.ts","../EventStore.ts","../EventStoreName.ts","../EventStoreNamespaceName.ts","../IChronicleClient.ts","../IEventStore.ts","../Metrics.ts","../Tracing.ts","../index.ts","../artifacts/ActivatedArtifact.ts","../artifacts/ArtifactActivationContext.ts","../artifacts/ArtifactDelivery.ts","../artifacts/ArtifactKind.ts","../artifacts/ClientArtifactsActivator.ts","../artifacts/DefaultClientArtifactsProvider.ts","../artifacts/IClientArtifactsProvider.ts","../artifacts/index.ts","../artifacts/validateArtifactSchemas.ts","../artifacts/withActivatedArtifact.ts","../auditing/Causation.ts","../auditing/CausationManager.ts","../auditing/CausationType.ts","../auditing/ICausationManager.ts","../auditing/index.ts","../compliance/ComplianceContracts.ts","../compliance/ComplianceMetadata.ts","../compliance/ComplianceMetadataResolver.ts","../compliance/ComplianceMetadataType.ts","../compliance/IPIIManager.ts","../compliance/PIIManager.ts","../compliance/PIINotSupportedOnEventSourceId.ts","../compliance/index.ts","../compliance/pii.ts","../compliance/subject.ts","../confidentiality/EncryptedNotSupportedOnEventSourceId.ts","../confidentiality/EncryptionScope.ts","../confidentiality/PIIAndEncryptedCombinedNotSupported.ts","../confidentiality/SecurityMetadata.ts","../confidentiality/SecurityMetadataResolver.ts","../confidentiality/SecurityMetadataType.ts","../confidentiality/encrypted.ts","../confidentiality/index.ts","../connection/ChronicleConnection.ts","../connection/ChronicleConnectionString.ts","../connection/ChronicleServerAddressResolver.ts","../connection/ChronicleServices.ts","../connection/ChronicleSrvResolutionError.ts","../connection/ChronicleSrvResolver.ts","../connection/CompatibilityPreflight.ts","../connection/ConnectionLifecycle.ts","../connection/DateTimeOffset.ts","../connection/Guid.ts","../connection/ILoadBalancerStrategy.ts","../connection/IncompatibleChronicleServer.ts","../connection/KernelKeepAlive.ts","../connection/LeastConnectionsLoadBalancerStrategy.ts","../connection/LoadBalancerMode.ts","../connection/LoadBalancerStrategyFactory.ts","../connection/RandomLoadBalancerStrategy.ts","../connection/RejectedChronicleCredentials.ts","../connection/RoundRobinLoadBalancerStrategy.ts","../connection/TokenProvider.ts","../connection/callResults.ts","../connection/clientVersion.ts","../connection/fetchOAuthAccessToken.ts","../connection/formatServerAddress.ts","../connection/index.ts","../correlation/CorrelationId.ts","../correlation/CorrelationIdManager.ts","../correlation/ICorrelationIdAccessor.ts","../correlation/ICorrelationIdSetter.ts","../correlation/index.ts","../eventSequences/AppendError.ts","../eventSequences/AppendOperationsBroadcaster.ts","../eventSequences/AppendOptions.ts","../eventSequences/AppendResult.ts","../eventSequences/AppendedEventWithResult.ts","../eventSequences/CompleteStreamError.ts","../eventSequences/CompleteStreamResult.ts","../eventSequences/ConcurrencyScope.ts","../eventSequences/ConcurrencyViolation.ts","../eventSequences/ConstraintViolation.ts","../eventSequences/EventForEventSourceId.ts","../eventSequences/EventLog.ts","../eventSequences/EventSequence.ts","../eventSequences/EventSequenceId.ts","../eventSequences/EventSequenceNumber.ts","../eventSequences/IEventLog.ts","../eventSequences/IEventSequence.ts","../eventSequences/ITransactionalEventSequence.ts","../eventSequences/TransactionalEventSequence.ts","../eventSequences/WaitForCompletionOptions.ts","../eventSequences/WaitForCompletionResult.ts","../eventSequences/index.ts","../eventStoreSubscriptions/EventStoreSubscriptionBuilder.ts","../eventStoreSubscriptions/EventStoreSubscriptionDefinition.ts","../eventStoreSubscriptions/EventStoreSubscriptionId.ts","../eventStoreSubscriptions/EventStoreSubscriptions.ts","../eventStoreSubscriptions/IEventStoreSubscriptionBuilder.ts","../eventStoreSubscriptions/IEventStoreSubscriptions.ts","../eventStoreSubscriptions/contracts.ts","../eventStoreSubscriptions/index.ts","../events/AppendedEvent.ts","../events/CausationEntry.ts","../events/EventContext.ts","../events/EventType.ts","../events/EventTypeGeneration.ts","../events/EventTypeId.ts","../events/EventTypes.ts","../events/IEventTypes.ts","../events/Tag.ts","../events/WireEventContext.ts","../events/eventTypeDecorator.ts","../events/filterEventsByTagDecorator.ts","../events/index.ts","../events/isRegisteredEvent.ts","../events/mergeTags.ts","../events/tagDecorator.ts","../events/toClientEventContext.ts","../events/constraints/ConstraintBuilder.ts","../events/constraints/ConstraintId.ts","../events/constraints/Constraints.ts","../events/constraints/IConstraint.ts","../events/constraints/IConstraintBuilder.ts","../events/constraints/IConstraints.ts","../events/constraints/IUniqueConstraintBuilder.ts","../events/constraints/UniqueConstraintBuilder.ts","../events/constraints/constraint.ts","../events/constraints/index.ts","../events/constraints/removeConstraint.ts","../events/constraints/unique.ts","../events/migrations/EventMigrationBuilder.ts","../events/migrations/EventMigrationPropertyBuilder.ts","../events/migrations/EventTypeMigrators.ts","../events/migrations/IEventMigrationBuilder.ts","../events/migrations/IEventMigrationPropertyBuilder.ts","../events/migrations/IEventTypeMigration.ts","../events/migrations/IEventTypeMigrators.ts","../events/migrations/InvalidMigrationGenerationGap.ts","../events/migrations/eventTypeMigration.ts","../events/migrations/index.ts","../externalServices/ExternalServiceBuilder.ts","../externalServices/ExternalServices.ts","../externalServices/IExternalServiceBuilder.ts","../externalServices/IExternalServices.ts","../externalServices/index.ts","../identities/IIdentityManager.ts","../identities/IdentityManager.ts","../identities/index.ts","../identity/IIdentityProvider.ts","../identity/Identity.ts","../identity/IdentityProvider.ts","../identity/index.ts","../jobs/IJobs.ts","../jobs/JobId.ts","../jobs/Jobs.ts","../jobs/index.ts","../observation/FailedPartition.ts","../observation/FailedPartitionAttempt.ts","../observation/FailedPartitions.ts","../observation/ICanBeNotifiedWhenPartitionReplayed.ts","../observation/ICanBeNotifiedWhenReplay.ts","../observation/IFailedPartitions.ts","../observation/IObservers.ts","../observation/ObserverId.ts","../observation/ObserverInformation.ts","../observation/ObserverRemovalOutcome.ts","../observation/ObserverRemovalResult.ts","../observation/ObserverRunningState.ts","../observation/ObserverType.ts","../observation/Observers.ts","../observation/index.ts","../observation/notifyReplayLifecycle.ts","../observation/toClientFailedPartition.ts","../observation/toObserverInformation.ts","../observation/toObserverRemovalResult.ts","../observation/toObserverRunningState.ts","../projections/CompiledProjectionDefinitions.ts","../projections/GlobalHandlerPropertyNotOnVariant.ts","../projections/IProjections.ts","../projections/InvalidEventContextPropertyError.ts","../projections/ProjectionDefinitionCompiler.ts","../projections/ProjectionId.ts","../projections/ProjectionQueryResult.ts","../projections/ProjectionState.ts","../projections/Projections.ts","../projections/ResolvedModelBoundMetadata.ts","../projections/UnableToQueryProjection.ts","../projections/VariantMustDeclareEntersOnEvent.ts","../projections/VariantReclassifier.ts","../projections/canonicalStringify.ts","../projections/constantValueExpression.ts","../projections/eventContextPropertyExpression.ts","../projections/index.ts","../projections/invalidEventContextPropertyInProjection.ts","../projections/notSetPropertyPath.ts","../projections/declarative/AddBuilder.ts","../projections/declarative/AddChildBuilder.ts","../projections/declarative/AllSetBuilder.ts","../projections/declarative/ChildrenBuilder.ts","../projections/declarative/CompositeKeyBuilder.ts","../projections/declarative/FromBuilder.ts","../projections/declarative/FromEveryBuilder.ts","../projections/declarative/IAddBuilder.ts","../projections/declarative/IAddChildBuilder.ts","../projections/declarative/IAllSetBuilder.ts","../projections/declarative/IChildrenBuilder.ts","../projections/declarative/ICompositeKeyBuilder.ts","../projections/declarative/IFromBuilder.ts","../projections/declarative/IFromEveryBuilder.ts","../projections/declarative/IJoinBuilder.ts","../projections/declarative/INestedBuilder.ts","../projections/declarative/IProjectionBuilder.ts","../projections/declarative/IProjectionBuilderFor.ts","../projections/declarative/IProjectionFor.ts","../projections/declarative/IReadModelPropertiesBuilder.ts","../projections/declarative/IRemovedWithBuilder.ts","../projections/declarative/IRemovedWithJoinBuilder.ts","../projections/declarative/ISetBuilder.ts","../projections/declarative/ISubtractBuilder.ts","../projections/declarative/JoinBuilder.ts","../projections/declarative/NestedBuilder.ts","../projections/declarative/ProjectionBuilderCore.ts","../projections/declarative/ProjectionBuilderFor.ts","../projections/declarative/RemovedWithBuilder.ts","../projections/declarative/RemovedWithJoinBuilder.ts","../projections/declarative/SetBuilder.ts","../projections/declarative/SubtractBuilder.ts","../projections/declarative/index.ts","../projections/declarative/projection.ts","../projections/modelBound/FromEventMetadata.ts","../projections/modelBound/FromEventOptions.ts","../projections/modelBound/addFrom.ts","../projections/modelBound/childrenAndNestedBuilder.ts","../projections/modelBound/childrenFrom.ts","../projections/modelBound/clearWith.ts","../projections/modelBound/count.ts","../projections/modelBound/decrement.ts","../projections/modelBound/entersOn.ts","../projections/modelBound/eventSequence.ts","../projections/modelBound/fromAll.ts","../projections/modelBound/fromEvent.ts","../projections/modelBound/fromEvery.ts","../projections/modelBound/globalFor.ts","../projections/modelBound/increment.ts","../projections/modelBound/index.ts","../projections/modelBound/isModelBoundProjection.ts","../projections/modelBound/join.ts","../projections/modelBound/nested.ts","../projections/modelBound/noAutoMap.ts","../projections/modelBound/notRewindable.ts","../projections/modelBound/passive.ts","../projections/modelBound/removedWith.ts","../projections/modelBound/removedWithJoin.ts","../projections/modelBound/setFrom.ts","../projections/modelBound/setFromContext.ts","../projections/modelBound/setValue.ts","../projections/modelBound/subtractFrom.ts","../projections/modelBound/variantOf.ts","../reactors/IReactors.ts","../reactors/ReactorId.ts","../reactors/ReactorResultHandler.ts","../reactors/ReactorServices.ts","../reactors/ReactorSideEffects.ts","../reactors/Reactors.ts","../reactors/index.ts","../reactors/onceOnly.ts","../reactors/reactor.ts","../reactors/replay.ts","../readModels/IMaterializedReadModels.ts","../readModels/IReadModels.ts","../readModels/MaterializedReadModels.ts","../readModels/ReadModelChangeset.ts","../readModels/ReadModelId.ts","../readModels/ReadModelSnapshot.ts","../readModels/ReadModelSubjectResolver.ts","../readModels/ReadModels.ts","../readModels/assertUniqueReadModelIds.ts","../readModels/buildReadModelDefinition.ts","../readModels/deserializeReadModel.ts","../readModels/index.ts","../readModels/indexDecorator.ts","../readModels/readModel.ts","../readModels/rootReadModelTypes.ts","../reducers/IReducers.ts","../reducers/ReducerEventDispatcher.ts","../reducers/ReducerEventHandler.ts","../reducers/ReducerId.ts","../reducers/Reducers.ts","../reducers/index.ts","../reducers/reducer.ts","../schemas/JsonSchema.ts","../schemas/JsonSchemaGenerator.ts","../schemas/createDeferredSchema.ts","../schemas/index.ts","../schemas/jsonSchemaProperty.ts","../seeding/EventSeeding.ts","../seeding/ICanSeedEvents.ts","../seeding/IEventSeeding.ts","../seeding/IEventSeedingBuilder.ts","../seeding/IEventSeedingScopeBuilder.ts","../seeding/index.ts","../seeding/seeder.ts","../sinks/WellKnownSinks.ts","../sinks/index.ts","../testing/ReadModelScenario.ts","../testing/ReadModelScenarioGiven.ts","../testing/ReadModelScenarioGivenBuilder.ts","../testing/index.ts","../transactions/IUnitOfWork.ts","../transactions/IUnitOfWorkManager.ts","../transactions/NoUnitOfWorkHasBeenStarted.ts","../transactions/UnitOfWork.ts","../transactions/UnitOfWorkManager.ts","../transactions/index.ts","../types/DecoratorType.ts","../types/TypeDiscoverer.ts","../types/TypeIntrospector.ts","../types/conceptValueType.ts","../types/index.ts","../types/modelBoundProperty.ts","../types/modelBoundPropertyMetadata.ts","../types/propertyDecoratorMetadata.ts","../types/standardDecoratorMetadata.ts","../webhooks/IWebhook.ts","../webhooks/IWebhookDefinitionBuilder.ts","../webhooks/IWebhooks.ts","../webhooks/WebhookDefinitionBuilder.ts","../webhooks/WebhookId.ts","../webhooks/WebhookTargetUrl.ts","../webhooks/Webhooks.ts","../webhooks/index.ts","../webhooks/webhook.ts"],"packageJsons":["../package.json","../../node_modules/@bufbuild/protobuf/dist/esm/package.json","../../node_modules/@bufbuild/protobuf/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/package.json","../../node_modules/@cratis/chronicle.contracts/package.json","../../node_modules/@cratis/fundamentals/dist/esm/package.json","../../node_modules/@cratis/fundamentals/package.json","../../node_modules/@grpc/grpc-js/package.json","../../node_modules/@grpc/proto-loader/package.json","../../node_modules/@js-sdsl/ordered-map/package.json","../../node_modules/@opentelemetry/api/package.json","../../node_modules/@types/node/package.json","../../node_modules/glob/dist/esm/package.json","../../node_modules/glob/package.json","../../node_modules/long/package.json","../../node_modules/long/umd/package.json","../../node_modules/lru-cache/dist/esm/package.json","../../node_modules/lru-cache/package.json","../../node_modules/minimatch/dist/esm/package.json","../../node_modules/minimatch/package.json","../../node_modules/minipass/dist/esm/package.json","../../node_modules/minipass/package.json","../../node_modules/nice-grpc-common/package.json","../../node_modules/nice-grpc/package.json","../../node_modules/path-scurry/dist/esm/package.json","../../node_modules/path-scurry/package.json","../../node_modules/protobufjs/package.json","../../node_modules/reflect-metadata/package.json","../../node_modules/ts-error/package.json","../../node_modules/undici-types/package.json","../../node_modules/undici/package.json"],"missingPackageJsons":["../../node_modules/@bufbuild/protobuf/dist/esm/codegenv1/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/codegenv2/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/reflect/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/wire/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/wkt/package.json","../../node_modules/@bufbuild/protobuf/wire/package.json","../../node_modules/@cratis/chronicle.contracts/dist/esm/generated/google/package.json","../../node_modules/@cratis/chronicle.contracts/dist/esm/generated/google/protobuf/package.json","../../node_modules/@cratis/chronicle.contracts/dist/esm/generated/package.json","../../node_modules/@cratis/chronicle.contracts/dist/esm/generated/protobuf-net/package.json","../../node_modules/@cratis/chronicle.contracts/dist/esm/package.json","../../node_modules/@cratis/chronicle.contracts/dist/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/reflect/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/wire/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/wkt/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/wire/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/nice-grpc-common/package.json","../../node_modules/@cratis/fundamentals/dist/esm/geospatial/package.json","../../node_modules/@cratis/fundamentals/dist/esm/json/package.json","../../node_modules/@grpc/grpc-js/build/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/google/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/grpc/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/data/orca/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/data/orca/v3/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/data/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/service/package.json","../../node_modules/@grpc/grpc-js/build/src/package.json","../../node_modules/@grpc/proto-loader/build/package.json","../../node_modules/@grpc/proto-loader/build/src/package.json","../../node_modules/@js-sdsl/ordered-map/dist/esm/package.json","../../node_modules/@js-sdsl/ordered-map/dist/package.json","../../node_modules/@opentelemetry/api/build/package.json","../../node_modules/@opentelemetry/api/build/src/api/package.json","../../node_modules/@opentelemetry/api/build/src/baggage/internal/package.json","../../node_modules/@opentelemetry/api/build/src/baggage/package.json","../../node_modules/@opentelemetry/api/build/src/common/package.json","../../node_modules/@opentelemetry/api/build/src/context/package.json","../../node_modules/@opentelemetry/api/build/src/diag/package.json","../../node_modules/@opentelemetry/api/build/src/metrics/package.json","../../node_modules/@opentelemetry/api/build/src/package.json","../../node_modules/@opentelemetry/api/build/src/propagation/package.json","../../node_modules/@opentelemetry/api/build/src/trace/internal/package.json","../../node_modules/@opentelemetry/api/build/src/trace/package.json","../../node_modules/@types/assert/package.json","../../node_modules/@types/assert/strict/package.json","../../node_modules/@types/async_hooks/package.json","../../node_modules/@types/buffer/package.json","../../node_modules/@types/child_process/package.json","../../node_modules/@types/cluster/package.json","../../node_modules/@types/console/package.json","../../node_modules/@types/constants/package.json","../../node_modules/@types/crypto/package.json","../../node_modules/@types/dgram/package.json","../../node_modules/@types/diagnostics_channel/package.json","../../node_modules/@types/dns/package.json","../../node_modules/@types/dns/promises/package.json","../../node_modules/@types/domain/package.json","../../node_modules/@types/events/package.json","../../node_modules/@types/fs/package.json","../../node_modules/@types/fs/promises/package.json","../../node_modules/@types/http/package.json","../../node_modules/@types/http2/package.json","../../node_modules/@types/https/package.json","../../node_modules/@types/inspector/package.json","../../node_modules/@types/inspector/promises/package.json","../../node_modules/@types/module/package.json","../../node_modules/@types/net/package.json","../../node_modules/@types/node/assert/package.json","../../node_modules/@types/node/dns/package.json","../../node_modules/@types/node/fs/package.json","../../node_modules/@types/node/inspector/package.json","../../node_modules/@types/node/path/package.json","../../node_modules/@types/node/readline/package.json","../../node_modules/@types/node/stream/package.json","../../node_modules/@types/node/test/package.json","../../node_modules/@types/node/timers/package.json","../../node_modules/@types/node/util/package.json","../../node_modules/@types/node/web-globals/package.json","../../node_modules/@types/node/zlib/package.json","../../node_modules/@types/os/package.json","../../node_modules/@types/path/package.json","../../node_modules/@types/path/posix/package.json","../../node_modules/@types/path/win32/package.json","../../node_modules/@types/perf_hooks/package.json","../../node_modules/@types/process/package.json","../../node_modules/@types/punycode/package.json","../../node_modules/@types/querystring/package.json","../../node_modules/@types/readline/package.json","../../node_modules/@types/readline/promises/package.json","../../node_modules/@types/repl/package.json","../../node_modules/@types/stream/consumers/package.json","../../node_modules/@types/stream/iter/package.json","../../node_modules/@types/stream/package.json","../../node_modules/@types/stream/promises/package.json","../../node_modules/@types/stream/web/package.json","../../node_modules/@types/string_decoder/package.json","../../node_modules/@types/timers/package.json","../../node_modules/@types/timers/promises/package.json","../../node_modules/@types/tls/package.json","../../node_modules/@types/trace_events/package.json","../../node_modules/@types/tty/package.json","../../node_modules/@types/url/package.json","../../node_modules/@types/util/package.json","../../node_modules/@types/util/types/package.json","../../node_modules/@types/v8/package.json","../../node_modules/@types/vm/package.json","../../node_modules/@types/wasi/package.json","../../node_modules/@types/worker_threads/package.json","../../node_modules/@types/zlib/package.json","../../node_modules/assert/package.json","../../node_modules/assert/strict/package.json","../../node_modules/async_hooks/package.json","../../node_modules/buffer/package.json","../../node_modules/child_process/package.json","../../node_modules/cluster/package.json","../../node_modules/console/package.json","../../node_modules/constants/package.json","../../node_modules/crypto/package.json","../../node_modules/dgram/package.json","../../node_modules/diagnostics_channel/package.json","../../node_modules/dns/package.json","../../node_modules/dns/promises/package.json","../../node_modules/domain/package.json","../../node_modules/events/package.json","../../node_modules/fs/package.json","../../node_modules/fs/promises/package.json","../../node_modules/http/package.json","../../node_modules/http2/package.json","../../node_modules/https/package.json","../../node_modules/inspector/package.json","../../node_modules/inspector/promises/package.json","../../node_modules/module/package.json","../../node_modules/net/package.json","../../node_modules/nice-grpc-common/lib/client/package.json","../../node_modules/nice-grpc-common/lib/package.json","../../node_modules/nice-grpc-common/lib/server/package.json","../../node_modules/nice-grpc/lib/client/package.json","../../node_modules/nice-grpc/lib/package.json","../../node_modules/nice-grpc/lib/server/package.json","../../node_modules/nice-grpc/lib/service-definitions/package.json","../../node_modules/nice-grpc/lib/utils/package.json","../../node_modules/os/package.json","../../node_modules/path/package.json","../../node_modules/path/posix/package.json","../../node_modules/path/win32/package.json","../../node_modules/perf_hooks/package.json","../../node_modules/process/package.json","../../node_modules/protobufjs/ext/descriptor/package.json","../../node_modules/protobufjs/ext/package.json","../../node_modules/protobufjs/node_modules/@types/long/package.json","../../node_modules/protobufjs/node_modules/long/package.json","../../node_modules/punycode/package.json","../../node_modules/querystring/package.json","../../node_modules/readline/package.json","../../node_modules/readline/promises/package.json","../../node_modules/repl/package.json","../../node_modules/stream/consumers/package.json","../../node_modules/stream/iter/package.json","../../node_modules/stream/package.json","../../node_modules/stream/promises/package.json","../../node_modules/stream/web/package.json","../../node_modules/string_decoder/package.json","../../node_modules/timers/package.json","../../node_modules/timers/promises/package.json","../../node_modules/tls/package.json","../../node_modules/trace_events/package.json","../../node_modules/ts-error/lib/package.json","../../node_modules/tty/package.json","../../node_modules/undici/types/package.json","../../node_modules/url/package.json","../../node_modules/util/package.json","../../node_modules/util/types/package.json","../../node_modules/v8/package.json","../../node_modules/vm/package.json","../../node_modules/wasi/package.json","../../node_modules/worker_threads/package.json","../../node_modules/zlib/package.json"]}
|
|
1
|
+
{"version":"7.0.2","root":["../ChronicleClient.ts","../ChronicleOptions.ts","../EventStore.ts","../EventStoreName.ts","../EventStoreNamespaceName.ts","../IChronicleClient.ts","../IEventStore.ts","../Metrics.ts","../Tracing.ts","../index.ts","../artifacts/ActivatedArtifact.ts","../artifacts/ArtifactActivationContext.ts","../artifacts/ArtifactCompletionFailed.ts","../artifacts/ArtifactDelivery.ts","../artifacts/ArtifactInvocationContext.ts","../artifacts/ArtifactKind.ts","../artifacts/ClientArtifactsActivator.ts","../artifacts/DefaultClientArtifactsProvider.ts","../artifacts/IClientArtifactsProvider.ts","../artifacts/index.ts","../artifacts/validateArtifactSchemas.ts","../artifacts/withActivatedArtifact.ts","../auditing/Causation.ts","../auditing/CausationManager.ts","../auditing/CausationType.ts","../auditing/ICausationManager.ts","../auditing/index.ts","../compliance/ComplianceContracts.ts","../compliance/ComplianceMetadata.ts","../compliance/ComplianceMetadataResolver.ts","../compliance/ComplianceMetadataType.ts","../compliance/IPIIManager.ts","../compliance/PIIManager.ts","../compliance/PIINotSupportedOnEventSourceId.ts","../compliance/index.ts","../compliance/pii.ts","../compliance/subject.ts","../confidentiality/EncryptedNotSupportedOnEventSourceId.ts","../confidentiality/EncryptionScope.ts","../confidentiality/PIIAndEncryptedCombinedNotSupported.ts","../confidentiality/SecurityMetadata.ts","../confidentiality/SecurityMetadataResolver.ts","../confidentiality/SecurityMetadataType.ts","../confidentiality/encrypted.ts","../confidentiality/index.ts","../connection/ChronicleConnection.ts","../connection/ChronicleConnectionString.ts","../connection/ChronicleServerAddressResolver.ts","../connection/ChronicleServices.ts","../connection/ChronicleSrvResolutionError.ts","../connection/ChronicleSrvResolver.ts","../connection/CompatibilityPreflight.ts","../connection/ConnectionLifecycle.ts","../connection/DateTimeOffset.ts","../connection/Guid.ts","../connection/ILoadBalancerStrategy.ts","../connection/IncompatibleChronicleServer.ts","../connection/KernelKeepAlive.ts","../connection/LeastConnectionsLoadBalancerStrategy.ts","../connection/LoadBalancerMode.ts","../connection/LoadBalancerStrategyFactory.ts","../connection/RandomLoadBalancerStrategy.ts","../connection/RejectedChronicleCredentials.ts","../connection/RoundRobinLoadBalancerStrategy.ts","../connection/TokenProvider.ts","../connection/callResults.ts","../connection/clientVersion.ts","../connection/fetchOAuthAccessToken.ts","../connection/formatServerAddress.ts","../connection/index.ts","../correlation/CorrelationId.ts","../correlation/CorrelationIdManager.ts","../correlation/ICorrelationIdAccessor.ts","../correlation/ICorrelationIdSetter.ts","../correlation/index.ts","../eventSequences/AppendError.ts","../eventSequences/AppendOperationsBroadcaster.ts","../eventSequences/AppendOptions.ts","../eventSequences/AppendResult.ts","../eventSequences/AppendedEventWithResult.ts","../eventSequences/CompleteStreamError.ts","../eventSequences/CompleteStreamResult.ts","../eventSequences/ConcurrencyScope.ts","../eventSequences/ConcurrencyViolation.ts","../eventSequences/ConstraintViolation.ts","../eventSequences/EventForEventSourceId.ts","../eventSequences/EventLog.ts","../eventSequences/EventSequence.ts","../eventSequences/EventSequenceId.ts","../eventSequences/EventSequenceNumber.ts","../eventSequences/IEventLog.ts","../eventSequences/IEventSequence.ts","../eventSequences/ITransactionalEventSequence.ts","../eventSequences/TransactionalEventSequence.ts","../eventSequences/WaitForCompletionOptions.ts","../eventSequences/WaitForCompletionResult.ts","../eventSequences/index.ts","../eventStoreSubscriptions/EventStoreSubscriptionBuilder.ts","../eventStoreSubscriptions/EventStoreSubscriptionDefinition.ts","../eventStoreSubscriptions/EventStoreSubscriptionId.ts","../eventStoreSubscriptions/EventStoreSubscriptions.ts","../eventStoreSubscriptions/IEventStoreSubscriptionBuilder.ts","../eventStoreSubscriptions/IEventStoreSubscriptions.ts","../eventStoreSubscriptions/contracts.ts","../eventStoreSubscriptions/index.ts","../events/AppendedEvent.ts","../events/CausationEntry.ts","../events/EventContext.ts","../events/EventType.ts","../events/EventTypeGeneration.ts","../events/EventTypeId.ts","../events/EventTypes.ts","../events/IEventTypes.ts","../events/Tag.ts","../events/WireEventContext.ts","../events/eventTypeDecorator.ts","../events/filterEventsByTagDecorator.ts","../events/index.ts","../events/isRegisteredEvent.ts","../events/mergeTags.ts","../events/tagDecorator.ts","../events/toClientEventContext.ts","../events/constraints/ConstraintBuilder.ts","../events/constraints/ConstraintId.ts","../events/constraints/Constraints.ts","../events/constraints/IConstraint.ts","../events/constraints/IConstraintBuilder.ts","../events/constraints/IConstraints.ts","../events/constraints/IUniqueConstraintBuilder.ts","../events/constraints/UniqueConstraintBuilder.ts","../events/constraints/constraint.ts","../events/constraints/index.ts","../events/constraints/removeConstraint.ts","../events/constraints/unique.ts","../events/migrations/EventMigrationBuilder.ts","../events/migrations/EventMigrationPropertyBuilder.ts","../events/migrations/EventTypeMigrators.ts","../events/migrations/IEventMigrationBuilder.ts","../events/migrations/IEventMigrationPropertyBuilder.ts","../events/migrations/IEventTypeMigration.ts","../events/migrations/IEventTypeMigrators.ts","../events/migrations/InvalidMigrationGenerationGap.ts","../events/migrations/eventTypeMigration.ts","../events/migrations/index.ts","../externalServices/ExternalServiceBuilder.ts","../externalServices/ExternalServices.ts","../externalServices/IExternalServiceBuilder.ts","../externalServices/IExternalServices.ts","../externalServices/index.ts","../identities/IIdentityManager.ts","../identities/IdentityManager.ts","../identities/index.ts","../identity/IIdentityProvider.ts","../identity/Identity.ts","../identity/IdentityProvider.ts","../identity/index.ts","../jobs/IJobs.ts","../jobs/JobId.ts","../jobs/Jobs.ts","../jobs/index.ts","../observation/FailedPartition.ts","../observation/FailedPartitionAttempt.ts","../observation/FailedPartitions.ts","../observation/ICanBeNotifiedWhenPartitionReplayed.ts","../observation/ICanBeNotifiedWhenReplay.ts","../observation/IFailedPartitions.ts","../observation/IObservers.ts","../observation/ObserverId.ts","../observation/ObserverInformation.ts","../observation/ObserverRemovalOutcome.ts","../observation/ObserverRemovalResult.ts","../observation/ObserverRunningState.ts","../observation/ObserverType.ts","../observation/Observers.ts","../observation/index.ts","../observation/notifyReplayLifecycle.ts","../observation/toClientFailedPartition.ts","../observation/toObserverInformation.ts","../observation/toObserverRemovalResult.ts","../observation/toObserverRunningState.ts","../projections/CompiledProjectionDefinitions.ts","../projections/GlobalHandlerPropertyNotOnVariant.ts","../projections/IProjections.ts","../projections/InvalidEventContextPropertyError.ts","../projections/ProjectionCapabilityProvenance.ts","../projections/ProjectionDefinitionCompiler.ts","../projections/ProjectionEventSchema.ts","../projections/ProjectionId.ts","../projections/ProjectionQueryResult.ts","../projections/ProjectionState.ts","../projections/Projections.ts","../projections/ResolvedModelBoundMetadata.ts","../projections/UnableToQueryProjection.ts","../projections/VariantMustDeclareEntersOnEvent.ts","../projections/VariantReclassifier.ts","../projections/canonicalStringify.ts","../projections/captureProjectionProvenance.ts","../projections/constantValueExpression.ts","../projections/eventContextPropertyExpression.ts","../projections/eventContractPath.ts","../projections/index.ts","../projections/invalidEventContextPropertyInProjection.ts","../projections/notSetPropertyPath.ts","../projections/declarative/AddBuilder.ts","../projections/declarative/AddChildBuilder.ts","../projections/declarative/AllSetBuilder.ts","../projections/declarative/ChildrenBuilder.ts","../projections/declarative/CompositeKeyBuilder.ts","../projections/declarative/FromBuilder.ts","../projections/declarative/FromEveryBuilder.ts","../projections/declarative/IAddBuilder.ts","../projections/declarative/IAddChildBuilder.ts","../projections/declarative/IAllSetBuilder.ts","../projections/declarative/IChildrenBuilder.ts","../projections/declarative/ICompositeKeyBuilder.ts","../projections/declarative/IFromBuilder.ts","../projections/declarative/IFromEveryBuilder.ts","../projections/declarative/IJoinBuilder.ts","../projections/declarative/INestedBuilder.ts","../projections/declarative/IProjectionBuilder.ts","../projections/declarative/IProjectionBuilderFor.ts","../projections/declarative/IProjectionFor.ts","../projections/declarative/IReadModelPropertiesBuilder.ts","../projections/declarative/IRemovedWithBuilder.ts","../projections/declarative/IRemovedWithJoinBuilder.ts","../projections/declarative/ISetBuilder.ts","../projections/declarative/ISubtractBuilder.ts","../projections/declarative/JoinBuilder.ts","../projections/declarative/NestedBuilder.ts","../projections/declarative/ProjectionBuilderCore.ts","../projections/declarative/ProjectionBuilderFor.ts","../projections/declarative/RemovedWithBuilder.ts","../projections/declarative/RemovedWithJoinBuilder.ts","../projections/declarative/SetBuilder.ts","../projections/declarative/SubtractBuilder.ts","../projections/declarative/index.ts","../projections/declarative/projection.ts","../projections/declarative/projectionBuilderProvenance.ts","../projections/modelBound/FromEventMetadata.ts","../projections/modelBound/FromEventOptions.ts","../projections/modelBound/addFrom.ts","../projections/modelBound/childrenAndNestedBuilder.ts","../projections/modelBound/childrenFrom.ts","../projections/modelBound/clearWith.ts","../projections/modelBound/count.ts","../projections/modelBound/decrement.ts","../projections/modelBound/entersOn.ts","../projections/modelBound/eventSequence.ts","../projections/modelBound/fromAll.ts","../projections/modelBound/fromEvent.ts","../projections/modelBound/fromEvery.ts","../projections/modelBound/globalFor.ts","../projections/modelBound/increment.ts","../projections/modelBound/index.ts","../projections/modelBound/isModelBoundProjection.ts","../projections/modelBound/join.ts","../projections/modelBound/nested.ts","../projections/modelBound/noAutoMap.ts","../projections/modelBound/notRewindable.ts","../projections/modelBound/passive.ts","../projections/modelBound/removedWith.ts","../projections/modelBound/removedWithJoin.ts","../projections/modelBound/setFrom.ts","../projections/modelBound/setFromContext.ts","../projections/modelBound/setValue.ts","../projections/modelBound/subtractFrom.ts","../projections/modelBound/variantOf.ts","../reactors/IReactors.ts","../reactors/ReactorId.ts","../reactors/ReactorResultHandler.ts","../reactors/ReactorServices.ts","../reactors/ReactorSideEffects.ts","../reactors/Reactors.ts","../reactors/index.ts","../reactors/onceOnly.ts","../reactors/reactor.ts","../reactors/replay.ts","../readModels/IMaterializedReadModels.ts","../readModels/IReadModels.ts","../readModels/MaterializedReadModels.ts","../readModels/ReadModelChangeset.ts","../readModels/ReadModelId.ts","../readModels/ReadModelSnapshot.ts","../readModels/ReadModelSubjectResolver.ts","../readModels/ReadModels.ts","../readModels/assertUniqueReadModelIds.ts","../readModels/buildReadModelDefinition.ts","../readModels/deserializeReadModel.ts","../readModels/index.ts","../readModels/indexDecorator.ts","../readModels/readModel.ts","../readModels/rootReadModelTypes.ts","../reducers/IReducers.ts","../reducers/ReducerEventDispatcher.ts","../reducers/ReducerEventHandler.ts","../reducers/ReducerId.ts","../reducers/Reducers.ts","../reducers/index.ts","../reducers/reducer.ts","../schemas/JsonSchema.ts","../schemas/JsonSchemaGenerator.ts","../schemas/createDeferredSchema.ts","../schemas/index.ts","../schemas/jsonSchemaProperty.ts","../seeding/EventSeeding.ts","../seeding/ICanSeedEvents.ts","../seeding/IEventSeeding.ts","../seeding/IEventSeedingBuilder.ts","../seeding/IEventSeedingScopeBuilder.ts","../seeding/index.ts","../seeding/seeder.ts","../sinks/WellKnownSinks.ts","../sinks/index.ts","../testing/ReadModelScenario.ts","../testing/ReadModelScenarioGiven.ts","../testing/ReadModelScenarioGivenBuilder.ts","../testing/index.ts","../testing/projections/ProjectionCapabilities.ts","../testing/projections/UnsupportedProjectionOperation.ts","../testing/projections/for_ProjectionCapabilities/given/Changed.ts","../testing/projections/for_ProjectionCapabilities/given/Model.ts","../testing/projections/for_ProjectionCapabilities/given/Removed.ts","../testing/projections/for_ProjectionCapabilities/given/compile.ts","../transactions/IUnitOfWork.ts","../transactions/IUnitOfWorkManager.ts","../transactions/NoUnitOfWorkHasBeenStarted.ts","../transactions/UnitOfWork.ts","../transactions/UnitOfWorkManager.ts","../transactions/index.ts","../types/DecoratorType.ts","../types/TypeDiscoverer.ts","../types/TypeIntrospector.ts","../types/conceptValueType.ts","../types/index.ts","../types/modelBoundProperty.ts","../types/modelBoundPropertyMetadata.ts","../types/propertyDecoratorMetadata.ts","../types/standardDecoratorMetadata.ts","../webhooks/IWebhook.ts","../webhooks/IWebhookDefinitionBuilder.ts","../webhooks/IWebhooks.ts","../webhooks/WebhookDefinitionBuilder.ts","../webhooks/WebhookId.ts","../webhooks/WebhookTargetUrl.ts","../webhooks/Webhooks.ts","../webhooks/index.ts","../webhooks/webhook.ts"],"packageJsons":["../package.json","../../node_modules/@bufbuild/protobuf/dist/esm/package.json","../../node_modules/@bufbuild/protobuf/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/package.json","../../node_modules/@cratis/chronicle.contracts/package.json","../../node_modules/@cratis/fundamentals/dist/esm/package.json","../../node_modules/@cratis/fundamentals/package.json","../../node_modules/@grpc/grpc-js/package.json","../../node_modules/@grpc/proto-loader/package.json","../../node_modules/@js-sdsl/ordered-map/package.json","../../node_modules/@opentelemetry/api/package.json","../../node_modules/@types/node/package.json","../../node_modules/glob/dist/esm/package.json","../../node_modules/glob/package.json","../../node_modules/long/package.json","../../node_modules/long/umd/package.json","../../node_modules/lru-cache/dist/esm/package.json","../../node_modules/lru-cache/package.json","../../node_modules/minimatch/dist/esm/package.json","../../node_modules/minimatch/package.json","../../node_modules/minipass/dist/esm/package.json","../../node_modules/minipass/package.json","../../node_modules/nice-grpc-common/package.json","../../node_modules/nice-grpc/package.json","../../node_modules/path-scurry/dist/esm/package.json","../../node_modules/path-scurry/package.json","../../node_modules/protobufjs/package.json","../../node_modules/reflect-metadata/package.json","../../node_modules/ts-error/package.json","../../node_modules/undici-types/package.json","../../node_modules/undici/package.json"],"missingPackageJsons":["../../node_modules/@bufbuild/protobuf/dist/esm/codegenv1/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/codegenv2/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/reflect/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/wire/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/wkt/package.json","../../node_modules/@bufbuild/protobuf/wire/package.json","../../node_modules/@cratis/chronicle.contracts/dist/esm/generated/google/package.json","../../node_modules/@cratis/chronicle.contracts/dist/esm/generated/google/protobuf/package.json","../../node_modules/@cratis/chronicle.contracts/dist/esm/generated/package.json","../../node_modules/@cratis/chronicle.contracts/dist/esm/generated/protobuf-net/package.json","../../node_modules/@cratis/chronicle.contracts/dist/esm/package.json","../../node_modules/@cratis/chronicle.contracts/dist/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/reflect/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/wire/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/wkt/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/wire/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/nice-grpc-common/package.json","../../node_modules/@cratis/fundamentals/dist/esm/geospatial/package.json","../../node_modules/@cratis/fundamentals/dist/esm/json/package.json","../../node_modules/@grpc/grpc-js/build/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/google/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/grpc/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/data/orca/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/data/orca/v3/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/data/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/service/package.json","../../node_modules/@grpc/grpc-js/build/src/package.json","../../node_modules/@grpc/proto-loader/build/package.json","../../node_modules/@grpc/proto-loader/build/src/package.json","../../node_modules/@js-sdsl/ordered-map/dist/esm/package.json","../../node_modules/@js-sdsl/ordered-map/dist/package.json","../../node_modules/@opentelemetry/api/build/package.json","../../node_modules/@opentelemetry/api/build/src/api/package.json","../../node_modules/@opentelemetry/api/build/src/baggage/internal/package.json","../../node_modules/@opentelemetry/api/build/src/baggage/package.json","../../node_modules/@opentelemetry/api/build/src/common/package.json","../../node_modules/@opentelemetry/api/build/src/context/package.json","../../node_modules/@opentelemetry/api/build/src/diag/package.json","../../node_modules/@opentelemetry/api/build/src/metrics/package.json","../../node_modules/@opentelemetry/api/build/src/package.json","../../node_modules/@opentelemetry/api/build/src/propagation/package.json","../../node_modules/@opentelemetry/api/build/src/trace/internal/package.json","../../node_modules/@opentelemetry/api/build/src/trace/package.json","../../node_modules/@types/assert/package.json","../../node_modules/@types/assert/strict/package.json","../../node_modules/@types/async_hooks/package.json","../../node_modules/@types/buffer/package.json","../../node_modules/@types/child_process/package.json","../../node_modules/@types/cluster/package.json","../../node_modules/@types/console/package.json","../../node_modules/@types/constants/package.json","../../node_modules/@types/crypto/package.json","../../node_modules/@types/dgram/package.json","../../node_modules/@types/diagnostics_channel/package.json","../../node_modules/@types/dns/package.json","../../node_modules/@types/dns/promises/package.json","../../node_modules/@types/domain/package.json","../../node_modules/@types/events/package.json","../../node_modules/@types/fs/package.json","../../node_modules/@types/fs/promises/package.json","../../node_modules/@types/http/package.json","../../node_modules/@types/http2/package.json","../../node_modules/@types/https/package.json","../../node_modules/@types/inspector/package.json","../../node_modules/@types/inspector/promises/package.json","../../node_modules/@types/module/package.json","../../node_modules/@types/net/package.json","../../node_modules/@types/node/assert/package.json","../../node_modules/@types/node/dns/package.json","../../node_modules/@types/node/fs/package.json","../../node_modules/@types/node/inspector/package.json","../../node_modules/@types/node/path/package.json","../../node_modules/@types/node/readline/package.json","../../node_modules/@types/node/stream/package.json","../../node_modules/@types/node/test/package.json","../../node_modules/@types/node/timers/package.json","../../node_modules/@types/node/util/package.json","../../node_modules/@types/node/web-globals/package.json","../../node_modules/@types/node/zlib/package.json","../../node_modules/@types/os/package.json","../../node_modules/@types/path/package.json","../../node_modules/@types/path/posix/package.json","../../node_modules/@types/path/win32/package.json","../../node_modules/@types/perf_hooks/package.json","../../node_modules/@types/process/package.json","../../node_modules/@types/punycode/package.json","../../node_modules/@types/querystring/package.json","../../node_modules/@types/readline/package.json","../../node_modules/@types/readline/promises/package.json","../../node_modules/@types/repl/package.json","../../node_modules/@types/stream/consumers/package.json","../../node_modules/@types/stream/iter/package.json","../../node_modules/@types/stream/package.json","../../node_modules/@types/stream/promises/package.json","../../node_modules/@types/stream/web/package.json","../../node_modules/@types/string_decoder/package.json","../../node_modules/@types/timers/package.json","../../node_modules/@types/timers/promises/package.json","../../node_modules/@types/tls/package.json","../../node_modules/@types/trace_events/package.json","../../node_modules/@types/tty/package.json","../../node_modules/@types/url/package.json","../../node_modules/@types/util/package.json","../../node_modules/@types/util/types/package.json","../../node_modules/@types/v8/package.json","../../node_modules/@types/vm/package.json","../../node_modules/@types/wasi/package.json","../../node_modules/@types/worker_threads/package.json","../../node_modules/@types/zlib/package.json","../../node_modules/assert/package.json","../../node_modules/assert/strict/package.json","../../node_modules/async_hooks/package.json","../../node_modules/buffer/package.json","../../node_modules/child_process/package.json","../../node_modules/cluster/package.json","../../node_modules/console/package.json","../../node_modules/constants/package.json","../../node_modules/crypto/package.json","../../node_modules/dgram/package.json","../../node_modules/diagnostics_channel/package.json","../../node_modules/dns/package.json","../../node_modules/dns/promises/package.json","../../node_modules/domain/package.json","../../node_modules/events/package.json","../../node_modules/fs/package.json","../../node_modules/fs/promises/package.json","../../node_modules/http/package.json","../../node_modules/http2/package.json","../../node_modules/https/package.json","../../node_modules/inspector/package.json","../../node_modules/inspector/promises/package.json","../../node_modules/module/package.json","../../node_modules/net/package.json","../../node_modules/nice-grpc-common/lib/client/package.json","../../node_modules/nice-grpc-common/lib/package.json","../../node_modules/nice-grpc-common/lib/server/package.json","../../node_modules/nice-grpc/lib/client/package.json","../../node_modules/nice-grpc/lib/package.json","../../node_modules/nice-grpc/lib/server/package.json","../../node_modules/nice-grpc/lib/service-definitions/package.json","../../node_modules/nice-grpc/lib/utils/package.json","../../node_modules/os/package.json","../../node_modules/path/package.json","../../node_modules/path/posix/package.json","../../node_modules/path/win32/package.json","../../node_modules/perf_hooks/package.json","../../node_modules/process/package.json","../../node_modules/protobufjs/ext/descriptor/package.json","../../node_modules/protobufjs/ext/package.json","../../node_modules/protobufjs/node_modules/@types/long/package.json","../../node_modules/protobufjs/node_modules/long/package.json","../../node_modules/punycode/package.json","../../node_modules/querystring/package.json","../../node_modules/readline/package.json","../../node_modules/readline/promises/package.json","../../node_modules/repl/package.json","../../node_modules/stream/consumers/package.json","../../node_modules/stream/iter/package.json","../../node_modules/stream/package.json","../../node_modules/stream/promises/package.json","../../node_modules/stream/web/package.json","../../node_modules/string_decoder/package.json","../../node_modules/timers/package.json","../../node_modules/timers/promises/package.json","../../node_modules/tls/package.json","../../node_modules/trace_events/package.json","../../node_modules/ts-error/lib/package.json","../../node_modules/tty/package.json","../../node_modules/undici/types/package.json","../../node_modules/url/package.json","../../node_modules/util/package.json","../../node_modules/util/types/package.json","../../node_modules/v8/package.json","../../node_modules/vm/package.json","../../node_modules/wasi/package.json","../../node_modules/worker_threads/package.json","../../node_modules/zlib/package.json"]}
|
package/package.json
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
import type { ProjectionDefinition } from '@cratis/chronicle.contracts';
|
|
5
5
|
import type { buildReadModelDefinition } from '../readModels/buildReadModelDefinition.js';
|
|
6
|
+
import type { ProjectionCapabilityProvenance } from './ProjectionCapabilityProvenance.js';
|
|
7
|
+
import type { ProjectionEventSchema } from './ProjectionEventSchema.js';
|
|
6
8
|
|
|
7
9
|
/** Connection-independent contracts produced for projection registration. */
|
|
8
10
|
export interface CompiledProjectionDefinitions {
|
|
@@ -10,4 +12,8 @@ export interface CompiledProjectionDefinitions {
|
|
|
10
12
|
readonly definitions: ProjectionDefinition[];
|
|
11
13
|
/** Read models registered before the projections. */
|
|
12
14
|
readonly readModels: ReturnType<typeof buildReadModelDefinition>[];
|
|
15
|
+
/** Pre-lowering declaration-to-contract paths, keyed by final definition identity. */
|
|
16
|
+
readonly provenance: ReadonlyMap<ProjectionDefinition, readonly ProjectionCapabilityProvenance[]>;
|
|
17
|
+
/** Isolated schemas for every event referenced by each definition, keyed by id:generation:tombstone. */
|
|
18
|
+
readonly eventSchemas: ReadonlyMap<ProjectionDefinition, ReadonlyMap<string, ProjectionEventSchema>>;
|
|
13
19
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
/** A declaration and the contract path it produced, captured before variant lowering. */
|
|
5
|
+
export interface ProjectionCapabilityProvenance {
|
|
6
|
+
/** Stable path into the compiled projection contract. */
|
|
7
|
+
readonly contractPath: string;
|
|
8
|
+
/** Source declaration responsible for the contract entry. */
|
|
9
|
+
readonly declaration: string;
|
|
10
|
+
}
|
|
@@ -5,6 +5,7 @@ import { AutoMap, ReadModelObserverType, type ProjectionDefinition } from '@crat
|
|
|
5
5
|
import { Constructor } from '@cratis/fundamentals';
|
|
6
6
|
import { IClientArtifactsProvider } from '../artifacts/index.js';
|
|
7
7
|
import { EventSequenceId } from '../eventSequences/EventSequenceId.js';
|
|
8
|
+
import { getEventTypeFor, getEventTypeJsonSchemaFor } from '../events/eventTypeDecorator.js';
|
|
8
9
|
import { getReadModelMetadata } from '../readModels/index.js';
|
|
9
10
|
import { getReadModelId } from '../readModels/readModel.js';
|
|
10
11
|
import { buildReadModelDefinition } from '../readModels/buildReadModelDefinition.js';
|
|
@@ -14,6 +15,11 @@ import { WellKnownSinks } from '../sinks/index.js';
|
|
|
14
15
|
import { TypeIntrospector } from '../types/index.js';
|
|
15
16
|
import { canonicalStringify } from './canonicalStringify.js';
|
|
16
17
|
import { CompiledProjectionDefinitions } from './CompiledProjectionDefinitions.js';
|
|
18
|
+
import { captureProjectionProvenance } from './captureProjectionProvenance.js';
|
|
19
|
+
import { eventContractPath } from './eventContractPath.js';
|
|
20
|
+
import { getProjectionBuilderProvenance } from './declarative/projectionBuilderProvenance.js';
|
|
21
|
+
import type { ProjectionCapabilityProvenance } from './ProjectionCapabilityProvenance.js';
|
|
22
|
+
import type { ProjectionEventSchema } from './ProjectionEventSchema.js';
|
|
17
23
|
import { constantValueExpression } from './constantValueExpression.js';
|
|
18
24
|
import { eventContextPropertyExpression } from './eventContextPropertyExpression.js';
|
|
19
25
|
import { InvalidEventContextPropertyError } from './InvalidEventContextPropertyError.js';
|
|
@@ -42,6 +48,14 @@ import { getRemovedWithJoinClassMetadata, getRemovedWithJoinPropertyMetadata } f
|
|
|
42
48
|
import { getVariantOfMetadata } from './modelBound/variantOf.js';
|
|
43
49
|
import { getEntersOnMetadata } from './modelBound/entersOn.js';
|
|
44
50
|
import { getGlobalForMetadata } from './modelBound/globalFor.js';
|
|
51
|
+
import { getSetFromMetadata } from './modelBound/setFrom.js';
|
|
52
|
+
import { getSetFromContextMetadata } from './modelBound/setFromContext.js';
|
|
53
|
+
import { getSetValueMetadata } from './modelBound/setValue.js';
|
|
54
|
+
import { getAddFromMetadata } from './modelBound/addFrom.js';
|
|
55
|
+
import { getSubtractFromMetadata } from './modelBound/subtractFrom.js';
|
|
56
|
+
import { getCountMetadata } from './modelBound/count.js';
|
|
57
|
+
import { getIncrementMetadata } from './modelBound/increment.js';
|
|
58
|
+
import { getDecrementMetadata } from './modelBound/decrement.js';
|
|
45
59
|
import type { JoinRecord } from './declarative/ProjectionBuilderCore.js';
|
|
46
60
|
import { BuiltProjection, crossWireGroups, mergeGlobalHandlers, reclassify, VariantDeclaration } from './VariantReclassifier.js';
|
|
47
61
|
|
|
@@ -79,12 +93,53 @@ export class ProjectionDefinitionCompiler {
|
|
|
79
93
|
// existing sparse wire objects: adding those default-valued fields would change the payload.
|
|
80
94
|
// Evaluators must tolerate absent optional contract fields (for example NoAutoMapProperties).
|
|
81
95
|
const definitions = builtProjections.map(built => built.definition as unknown as ProjectionDefinition);
|
|
96
|
+
const provenance = new Map<ProjectionDefinition, readonly ProjectionCapabilityProvenance[]>();
|
|
97
|
+
const eventSchemas = new Map<ProjectionDefinition, ReadonlyMap<string, ProjectionEventSchema>>();
|
|
98
|
+
const availableEvents = new Map<string, Constructor>(this._clientArtifacts.eventTypes.map(type => {
|
|
99
|
+
const event = getEventTypeFor(type);
|
|
100
|
+
return [`${event.id.value}:${event.generation.value}`, type] as const;
|
|
101
|
+
}));
|
|
102
|
+
for (let index = 0; index < definitions.length; index++) {
|
|
103
|
+
provenance.set(definitions[index], builtProjections[index].provenance ?? []);
|
|
104
|
+
eventSchemas.set(definitions[index], this.buildEventSchemaCatalog(definitions[index], availableEvents));
|
|
105
|
+
}
|
|
82
106
|
return {
|
|
83
107
|
definitions,
|
|
84
|
-
readModels: this.buildReadModelDefinitions(definitions)
|
|
108
|
+
readModels: this.buildReadModelDefinitions(definitions),
|
|
109
|
+
provenance,
|
|
110
|
+
eventSchemas
|
|
85
111
|
};
|
|
86
112
|
}
|
|
87
113
|
|
|
114
|
+
private buildEventSchemaCatalog(definition: ProjectionDefinition, availableEvents: ReadonlyMap<string, Constructor>): ReadonlyMap<string, ProjectionEventSchema> {
|
|
115
|
+
const catalog = new Map<string, ProjectionEventSchema>();
|
|
116
|
+
const collect = (node: Record<string, unknown>) => {
|
|
117
|
+
for (const section of ['From', 'Join', 'RemovedWith', 'RemovedWithJoin'] as const) {
|
|
118
|
+
for (const entry of node[section] as Array<{ Key: ContractEventType }> ?? []) {
|
|
119
|
+
const eventType = entry.Key;
|
|
120
|
+
const key = getEventTypeMapKey(eventType);
|
|
121
|
+
const type = availableEvents.get(`${eventType.Id}:${eventType.Generation}`);
|
|
122
|
+
if (type && !catalog.has(key)) {
|
|
123
|
+
// Registration uses this exact schema path. Clone it so a compile or consumer
|
|
124
|
+
// cannot mutate metadata or another compile's catalog.
|
|
125
|
+
catalog.set(key, { eventType: { ...eventType }, schema: structuredClone(getEventTypeJsonSchemaFor(type)) });
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
const fromEventProperty = node.FromEventProperty as { Event?: ContractEventType } | undefined;
|
|
130
|
+
if (fromEventProperty?.Event) {
|
|
131
|
+
const key = getEventTypeMapKey(fromEventProperty.Event);
|
|
132
|
+
const type = availableEvents.get(`${fromEventProperty.Event.Id}:${fromEventProperty.Event.Generation}`);
|
|
133
|
+
if (type && !catalog.has(key)) catalog.set(key, { eventType: { ...fromEventProperty.Event }, schema: structuredClone(getEventTypeJsonSchemaFor(type)) });
|
|
134
|
+
}
|
|
135
|
+
for (const section of ['Children', 'Nested'] as const) {
|
|
136
|
+
for (const child of Object.values(node[section] as Record<string, Record<string, unknown>> ?? {})) collect(child);
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
collect(definition as unknown as Record<string, unknown>);
|
|
140
|
+
return catalog;
|
|
141
|
+
}
|
|
142
|
+
|
|
88
143
|
private buildWithContextValidation(type: Constructor, build: () => BuiltProjection, readModelType?: Constructor): BuiltProjection {
|
|
89
144
|
try {
|
|
90
145
|
return build();
|
|
@@ -165,6 +220,12 @@ export class ProjectionDefinitionCompiler {
|
|
|
165
220
|
}
|
|
166
221
|
}
|
|
167
222
|
|
|
223
|
+
const declarations = getProjectionBuilderProvenance(builder);
|
|
224
|
+
const provenance = captureProjectionProvenance(definition, false,
|
|
225
|
+
new Map([...declarations.keys, ...declarations.children]));
|
|
226
|
+
if (declarations.fromEvery && !provenance.some(entry => entry.contractPath === 'All')) {
|
|
227
|
+
provenance.push({ contractPath: 'All', declaration: '.fromEvery' });
|
|
228
|
+
}
|
|
168
229
|
let variant: VariantDeclaration | undefined;
|
|
169
230
|
const variantDeclaration = builder.getVariantDeclaration();
|
|
170
231
|
if (variantDeclaration) {
|
|
@@ -174,8 +235,11 @@ export class ProjectionDefinitionCompiler {
|
|
|
174
235
|
definition.From = reclassified.from;
|
|
175
236
|
definition.Join = reclassified.join;
|
|
176
237
|
variant = variantDeclaration;
|
|
238
|
+
provenance.push({ contractPath: 'Variant', declaration: '.variantOf' });
|
|
239
|
+
provenance.push({ contractPath: 'Variant.Key', declaration: '.variantOf' });
|
|
240
|
+
for (const entering of variant.enteringEventTypes) provenance.push({ contractPath: eventContractPath('EntersOn', entering), declaration: '.entersOn' });
|
|
177
241
|
}
|
|
178
|
-
return { typeName: type.name, definition, variant };
|
|
242
|
+
return { typeName: type.name, definition, variant, provenance };
|
|
179
243
|
}
|
|
180
244
|
|
|
181
245
|
private inferReadModelIdentifier(mappedProperties: string[]): string | undefined {
|
|
@@ -203,6 +267,16 @@ export class ProjectionDefinitionCompiler {
|
|
|
203
267
|
const eventSequenceId = getEventSequenceMetadata(type);
|
|
204
268
|
const properties = TypeIntrospector.getTrackedProperties(type);
|
|
205
269
|
const prototype = type.prototype;
|
|
270
|
+
const overrides = new Map<string, string>();
|
|
271
|
+
const declaredFrom = new Set(getFromEventMetadata(type).map(entry => getEventTypeMapKey(toContractEventType(entry.eventType))));
|
|
272
|
+
const recordMappings = (property: string, metadata: Array<{ eventType: Function }>, declaration: string) => {
|
|
273
|
+
for (const mapping of metadata) {
|
|
274
|
+
const eventType = toContractEventType(mapping.eventType);
|
|
275
|
+
const path = eventContractPath('From', eventType);
|
|
276
|
+
overrides.set(`${path}.Properties.${property}`, declaration);
|
|
277
|
+
if (!declaredFrom.has(getEventTypeMapKey(eventType)) && !overrides.has(path)) overrides.set(path, declaration);
|
|
278
|
+
}
|
|
279
|
+
};
|
|
206
280
|
|
|
207
281
|
const fromByEventType = new Map<string, FromRecord>();
|
|
208
282
|
const joinByEventType = new Map<string, { Key: ContractEventType; Value: { On: string; Properties: Record<string, string>; Key: string } }>();
|
|
@@ -244,6 +318,23 @@ export class ProjectionDefinitionCompiler {
|
|
|
244
318
|
}
|
|
245
319
|
|
|
246
320
|
for (const property of properties) {
|
|
321
|
+
recordMappings(property, getSetFromMetadata(prototype, property), '@setFrom');
|
|
322
|
+
recordMappings(property, getSetFromContextMetadata(prototype, property), '@setFromContext');
|
|
323
|
+
recordMappings(property, getSetValueMetadata(prototype, property), '@setValue');
|
|
324
|
+
recordMappings(property, getAddFromMetadata(prototype, property), '@addFrom');
|
|
325
|
+
recordMappings(property, getSubtractFromMetadata(prototype, property), '@subtractFrom');
|
|
326
|
+
recordMappings(property, getIncrementMetadata(prototype, property), '@increment');
|
|
327
|
+
recordMappings(property, getDecrementMetadata(prototype, property), '@decrement');
|
|
328
|
+
recordMappings(property, getCountMetadata(prototype, property), '@count');
|
|
329
|
+
for (const [declaration, mappings] of [
|
|
330
|
+
['@increment', getIncrementMetadata(prototype, property)],
|
|
331
|
+
['@decrement', getDecrementMetadata(prototype, property)],
|
|
332
|
+
['@count', getCountMetadata(prototype, property)]
|
|
333
|
+
] as const) {
|
|
334
|
+
for (const mapping of mappings) {
|
|
335
|
+
if (mapping.constantKey) overrides.set(`${eventContractPath('From', toContractEventType(mapping.eventType))}.Key`, declaration);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
247
338
|
applyPropertyMappings(prototype, property, fromByEventType);
|
|
248
339
|
for (const mapping of getJoinMetadata(prototype, property)) {
|
|
249
340
|
const entry = this.ensureJoinEntry(joinByEventType, mapping.eventType);
|
|
@@ -278,6 +369,7 @@ export class ProjectionDefinitionCompiler {
|
|
|
278
369
|
for (const clearWith of getClearWithPropertyMetadata(prototype, property)) {
|
|
279
370
|
const entry = ensureFromEntry(fromByEventType, clearWith.eventType);
|
|
280
371
|
entry.Value.Properties[property] = '$null';
|
|
372
|
+
overrides.set(`${eventContractPath('From', toContractEventType(clearWith.eventType))}.Properties.${property}`, '@clearWith');
|
|
281
373
|
}
|
|
282
374
|
}
|
|
283
375
|
}
|
|
@@ -294,6 +386,8 @@ export class ProjectionDefinitionCompiler {
|
|
|
294
386
|
|
|
295
387
|
let from = Array.from(fromByEventType.values());
|
|
296
388
|
let join = Array.from(joinByEventType.values());
|
|
389
|
+
let preLoweringFrom = from;
|
|
390
|
+
let preLoweringJoin = join;
|
|
297
391
|
let variant: VariantDeclaration | undefined;
|
|
298
392
|
const variantMetadata = getVariantOfMetadata(type);
|
|
299
393
|
if (variantMetadata) {
|
|
@@ -303,6 +397,7 @@ export class ProjectionDefinitionCompiler {
|
|
|
303
397
|
if (entersOn.key) {
|
|
304
398
|
const entry = ensureFromEntry(fromByEventType, entersOn.eventType);
|
|
305
399
|
entry.Value.Key = entersOn.key;
|
|
400
|
+
overrides.set(`${eventContractPath('From', contractType)}.Key`, '@entersOn');
|
|
306
401
|
}
|
|
307
402
|
return contractType;
|
|
308
403
|
});
|
|
@@ -311,11 +406,21 @@ export class ProjectionDefinitionCompiler {
|
|
|
311
406
|
for (const handlerType of this._clientArtifacts.globalForHandlers) {
|
|
312
407
|
const globalForMetadata = getGlobalForMetadata(handlerType);
|
|
313
408
|
if (globalForMetadata?.identity === variantMetadata.identity) {
|
|
314
|
-
|
|
409
|
+
const records = this.buildFromRecordsForType(handlerType);
|
|
410
|
+
globalHandlers.set(handlerType.name, records);
|
|
411
|
+
for (const record of records) {
|
|
412
|
+
const path = eventContractPath('From', record.Key);
|
|
413
|
+
overrides.set(path, `@globalFor(${handlerType.name})`);
|
|
414
|
+
for (const property of Object.keys(record.Value.Properties)) {
|
|
415
|
+
overrides.set(`${path}.Properties.${property}`, `@globalFor(${handlerType.name})`);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
315
418
|
}
|
|
316
419
|
}
|
|
317
420
|
const memberNames = new Set(getReadModelMetadata(type)?.members.keys() ?? TypeIntrospector.getMembers(type).keys());
|
|
318
421
|
const merged = mergeGlobalHandlers(type.name, memberNames, from, globalHandlers);
|
|
422
|
+
preLoweringFrom = merged;
|
|
423
|
+
preLoweringJoin = join;
|
|
319
424
|
const reclassified = reclassify(type.name, merged, join, enteringEventTypes, variantMetadata.key);
|
|
320
425
|
from = reclassified.from;
|
|
321
426
|
join = reclassified.join;
|
|
@@ -346,7 +451,25 @@ export class ProjectionDefinitionCompiler {
|
|
|
346
451
|
NoAutoMapProperties: properties.filter(property => isPropertyNoAutoMap(prototype, property)),
|
|
347
452
|
Nested: nestedByProperty
|
|
348
453
|
};
|
|
349
|
-
|
|
454
|
+
const provenance = captureProjectionProvenance({ ...definition, From: preLoweringFrom, Join: preLoweringJoin }, true, overrides);
|
|
455
|
+
if (Object.keys(allProperties).length && Object.keys(allProperties).every(property =>
|
|
456
|
+
getFromAllMetadata(prototype, property) && !getFromEveryMetadata(prototype, property))) {
|
|
457
|
+
const index = provenance.findIndex(entry => entry.contractPath === 'All');
|
|
458
|
+
if (index >= 0) provenance[index] = { contractPath: 'All', declaration: '@fromAll' };
|
|
459
|
+
}
|
|
460
|
+
for (const property of Object.keys(allProperties)) {
|
|
461
|
+
if (getFromAllMetadata(prototype, property) && !getFromEveryMetadata(prototype, property)) {
|
|
462
|
+
const path = `All.Properties.${property}`;
|
|
463
|
+
const index = provenance.findIndex(entry => entry.contractPath === path);
|
|
464
|
+
if (index >= 0) provenance[index] = { contractPath: path, declaration: '@fromAll' };
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
if (variant) {
|
|
468
|
+
provenance.push({ contractPath: 'Variant', declaration: '@variantOf' });
|
|
469
|
+
provenance.push({ contractPath: 'Variant.Key', declaration: '@variantOf' });
|
|
470
|
+
for (const entering of variant.enteringEventTypes) provenance.push({ contractPath: eventContractPath('EntersOn', entering), declaration: '@entersOn' });
|
|
471
|
+
}
|
|
472
|
+
return { typeName: type.name, definition, variant, provenance };
|
|
350
473
|
}
|
|
351
474
|
|
|
352
475
|
/**
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import type { JsonSchema } from '../schemas/JsonSchema.js';
|
|
5
|
+
import type { ContractEventType } from './declarative/ProjectionBuilderCore.js';
|
|
6
|
+
|
|
7
|
+
/** Schema registered for one participating event type and generation. */
|
|
8
|
+
export interface ProjectionEventSchema {
|
|
9
|
+
/** Event identifier, generation, and tombstone status. */
|
|
10
|
+
readonly eventType: ContractEventType;
|
|
11
|
+
/** Isolated copy of the schema registered for this event. */
|
|
12
|
+
readonly schema: JsonSchema;
|
|
13
|
+
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { ContractEventType, FromRecord, JoinRecord } from './declarative/ProjectionBuilderCore.js';
|
|
5
5
|
import { GlobalHandlerPropertyNotOnVariant } from './GlobalHandlerPropertyNotOnVariant.js';
|
|
6
|
+
import type { ProjectionCapabilityProvenance } from './ProjectionCapabilityProvenance.js';
|
|
6
7
|
import { VariantMustDeclareEntersOnEvent } from './VariantMustDeclareEntersOnEvent.js';
|
|
7
8
|
|
|
8
9
|
const EVENT_SOURCE_ID_KEY = '$eventSourceId';
|
|
@@ -28,6 +29,7 @@ export interface BuiltProjection {
|
|
|
28
29
|
readonly typeName: string;
|
|
29
30
|
readonly definition: Record<string, unknown>;
|
|
30
31
|
readonly variant?: VariantDeclaration;
|
|
32
|
+
readonly provenance?: ProjectionCapabilityProvenance[];
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
function eventTypeKey(eventType: ContractEventType): string {
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import type { ProjectionCapabilityProvenance } from './ProjectionCapabilityProvenance.js';
|
|
5
|
+
import type { ContractEventType } from './declarative/ProjectionBuilderCore.js';
|
|
6
|
+
import { eventContractPath } from './eventContractPath.js';
|
|
7
|
+
|
|
8
|
+
/** Captures pre-lowering declarations without changing the registration contract. */
|
|
9
|
+
export function captureProjectionProvenance(definition: Record<string, unknown>, modelBound: boolean, overrides: ReadonlyMap<string, string> = new Map()): ProjectionCapabilityProvenance[] {
|
|
10
|
+
const result: ProjectionCapabilityProvenance[] = [];
|
|
11
|
+
const add = (contractPath: string, declaration: string) => result.push({ contractPath, declaration: overrides.get(contractPath) ?? declaration });
|
|
12
|
+
const prefix = modelBound ? '@' : '.';
|
|
13
|
+
const from = definition.From as Array<{ Key: ContractEventType; Value: { Properties: Record<string, string>; Key: string; ParentKey: string } }> ?? [];
|
|
14
|
+
for (const entry of from) {
|
|
15
|
+
const path = eventContractPath('From', entry.Key);
|
|
16
|
+
add(path, `${prefix}${modelBound ? 'fromEvent' : 'from'}`);
|
|
17
|
+
add(`${path}.Key`, `${prefix}${modelBound ? 'fromEvent' : 'from().usingKey'}`);
|
|
18
|
+
add(`${path}.ParentKey`, `${prefix}${modelBound ? 'fromEvent' : 'from().usingParentKey'}`);
|
|
19
|
+
for (const [property, expression] of Object.entries(entry.Value.Properties ?? {})) {
|
|
20
|
+
const operation = expression.startsWith('$add(') ? 'addFrom' : expression.startsWith('$subtract(') ? 'subtractFrom'
|
|
21
|
+
: expression === '$count' ? 'count' : expression === '$increment' ? 'increment'
|
|
22
|
+
: expression === '$decrement' ? 'decrement' : expression === '$null' ? 'clearWith'
|
|
23
|
+
: expression.startsWith('$value(') ? 'setValue' : expression.startsWith('$eventContext(') ? 'setFromContext' : 'setFrom';
|
|
24
|
+
add(`${path}.Properties.${property}`, `${prefix}${modelBound ? operation : `from().${operation}`}`);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
for (const section of ['Join', 'RemovedWith', 'RemovedWithJoin'] as const) {
|
|
28
|
+
for (const entry of definition[section] as Array<{ Key: ContractEventType; Value: { Properties?: Record<string, string>; Key?: string; ParentKey?: string } }> ?? []) {
|
|
29
|
+
const path = eventContractPath(section, entry.Key);
|
|
30
|
+
const declaration = modelBound ? `@${section[0].toLowerCase()}${section.slice(1)}` : `.${section[0].toLowerCase()}${section.slice(1)}`;
|
|
31
|
+
add(path, declaration);
|
|
32
|
+
if (entry.Value.Key !== undefined) add(`${path}.Key`, declaration);
|
|
33
|
+
if (entry.Value.ParentKey !== undefined) add(`${path}.ParentKey`, declaration);
|
|
34
|
+
for (const property of Object.keys(entry.Value.Properties ?? {})) add(`${path}.Properties.${property}`, declaration);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
for (const section of ['Children', 'Nested'] as const) {
|
|
38
|
+
for (const property of Object.keys(definition[section] as Record<string, unknown> ?? {})) {
|
|
39
|
+
add(`${section}.${property}`, modelBound ? (section === 'Children' ? '@childrenFrom' : '@nested') : `.${section.toLowerCase()}`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
const all = definition.All as { Properties?: Record<string, string>; IncludeChildren?: boolean } | undefined;
|
|
43
|
+
if (all?.IncludeChildren || Object.keys(all?.Properties ?? {}).length) add('All', modelBound ? '@fromEvery' : '.fromEvery');
|
|
44
|
+
for (const property of Object.keys(all?.Properties ?? {})) add(`All.Properties.${property}`, modelBound ? '@fromEvery' : '.fromEvery');
|
|
45
|
+
if ((definition.FromEvery as unknown[] | undefined)?.length) add('FromEvery', modelBound ? '@fromEvery' : '.fromEvery');
|
|
46
|
+
if (definition.IsActive === false) add('IsActive', modelBound ? '@passive' : '.passive');
|
|
47
|
+
if (definition.EventSequenceId) add('EventSequenceId', modelBound ? '@eventSequence' : '.fromEventSequence');
|
|
48
|
+
if (definition.FromEventProperty) add('FromEventProperty', modelBound ? '@fromEvent' : '.from');
|
|
49
|
+
return result;
|
|
50
|
+
}
|
|
@@ -15,6 +15,7 @@ import { ISetBuilder } from './ISetBuilder.js';
|
|
|
15
15
|
import { ISubtractBuilder } from './ISubtractBuilder.js';
|
|
16
16
|
import { SetBuilder } from './SetBuilder.js';
|
|
17
17
|
import { SubtractBuilder } from './SubtractBuilder.js';
|
|
18
|
+
import { recordKeyDeclaration } from './projectionBuilderProvenance.js';
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
21
|
* Accumulated property mapping for a from clause.
|
|
@@ -58,12 +59,14 @@ export class FromBuilder<TReadModel, TEvent> implements IFromBuilder<TReadModel,
|
|
|
58
59
|
const proxy = new Proxy({}, handler);
|
|
59
60
|
keyAccessor(proxy as TEvent);
|
|
60
61
|
this.entry.key = handler.property;
|
|
62
|
+
recordKeyDeclaration(this, 'Key', '.from().usingKey');
|
|
61
63
|
return this;
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
/** @inheritdoc */
|
|
65
67
|
usingKeyFromContext(contextPropertyName: string): this {
|
|
66
68
|
this.entry.key = eventContextPropertyExpression(contextPropertyName);
|
|
69
|
+
recordKeyDeclaration(this, 'Key', '.from().usingKeyFromContext');
|
|
67
70
|
return this;
|
|
68
71
|
}
|
|
69
72
|
|
|
@@ -73,12 +76,14 @@ export class FromBuilder<TReadModel, TEvent> implements IFromBuilder<TReadModel,
|
|
|
73
76
|
const proxy = new Proxy({}, handler);
|
|
74
77
|
keyAccessor(proxy as TEvent);
|
|
75
78
|
this.entry.parentKey = handler.property;
|
|
79
|
+
recordKeyDeclaration(this, 'ParentKey', '.from().usingParentKey');
|
|
76
80
|
return this;
|
|
77
81
|
}
|
|
78
82
|
|
|
79
83
|
/** @inheritdoc */
|
|
80
84
|
usingParentKeyFromContext(contextPropertyName: string): this {
|
|
81
85
|
this.entry.parentKey = eventContextPropertyExpression(contextPropertyName);
|
|
86
|
+
recordKeyDeclaration(this, 'ParentKey', '.from().usingParentKeyFromContext');
|
|
82
87
|
return this;
|
|
83
88
|
}
|
|
84
89
|
|
|
@@ -87,6 +92,7 @@ export class FromBuilder<TReadModel, TEvent> implements IFromBuilder<TReadModel,
|
|
|
87
92
|
const compositeKeyBuilder = new CompositeKeyBuilder<TKeyType, TEvent>();
|
|
88
93
|
builderCallback(compositeKeyBuilder);
|
|
89
94
|
this.entry.key = compositeKeyBuilder.build();
|
|
95
|
+
recordKeyDeclaration(this, 'Key', '.from().usingCompositeKey');
|
|
90
96
|
return this;
|
|
91
97
|
}
|
|
92
98
|
|
|
@@ -95,18 +101,21 @@ export class FromBuilder<TReadModel, TEvent> implements IFromBuilder<TReadModel,
|
|
|
95
101
|
const compositeKeyBuilder = new CompositeKeyBuilder<TKeyType, TEvent>();
|
|
96
102
|
builderCallback(compositeKeyBuilder);
|
|
97
103
|
this.entry.parentKey = compositeKeyBuilder.build();
|
|
104
|
+
recordKeyDeclaration(this, 'ParentKey', '.from().usingParentCompositeKey');
|
|
98
105
|
return this;
|
|
99
106
|
}
|
|
100
107
|
|
|
101
108
|
/** @inheritdoc */
|
|
102
109
|
usingConstantKey(value: string): this {
|
|
103
110
|
this.entry.key = constantValueExpression(value);
|
|
111
|
+
recordKeyDeclaration(this, 'Key', '.from().usingConstantKey');
|
|
104
112
|
return this;
|
|
105
113
|
}
|
|
106
114
|
|
|
107
115
|
/** @inheritdoc */
|
|
108
116
|
usingConstantParentKey(value: string): this {
|
|
109
117
|
this.entry.parentKey = constantValueExpression(value);
|
|
118
|
+
recordKeyDeclaration(this, 'ParentKey', '.from().usingConstantParentKey');
|
|
110
119
|
return this;
|
|
111
120
|
}
|
|
112
121
|
|