@cratis/chronicle 6.14.3 → 6.16.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/ChronicleClient.ts +1 -1
- package/ChronicleOptions.ts +9 -1
- package/EventStore.ts +5 -3
- package/artifacts/ActivatedArtifact.ts +12 -0
- package/artifacts/ArtifactActivationContext.ts +37 -0
- package/artifacts/ArtifactDelivery.ts +8 -0
- package/artifacts/ArtifactKind.ts +8 -0
- package/artifacts/ClientArtifactsActivator.ts +10 -0
- package/artifacts/for_ChronicleOptions/when_configuring/with_an_artifact_activator.spec.ts +21 -0
- package/artifacts/index.ts +6 -0
- package/artifacts/withActivatedArtifact.ts +32 -0
- package/dist/ChronicleClient.js +1 -1
- package/dist/ChronicleClient.js.map +1 -1
- package/dist/ChronicleOptions.d.ts +4 -0
- package/dist/ChronicleOptions.d.ts.map +1 -1
- package/dist/ChronicleOptions.js +5 -1
- package/dist/ChronicleOptions.js.map +1 -1
- package/dist/EventStore.d.ts +2 -1
- package/dist/EventStore.d.ts.map +1 -1
- package/dist/EventStore.js +3 -3
- package/dist/EventStore.js.map +1 -1
- package/dist/artifacts/ActivatedArtifact.d.ts +10 -0
- package/dist/artifacts/ActivatedArtifact.d.ts.map +1 -0
- package/dist/artifacts/ActivatedArtifact.js +4 -0
- package/dist/artifacts/ActivatedArtifact.js.map +1 -0
- package/dist/artifacts/ArtifactActivationContext.d.ts +34 -0
- package/dist/artifacts/ArtifactActivationContext.d.ts.map +1 -0
- package/dist/artifacts/ArtifactActivationContext.js +4 -0
- package/dist/artifacts/ArtifactActivationContext.js.map +1 -0
- package/dist/artifacts/ArtifactDelivery.d.ts +6 -0
- package/dist/artifacts/ArtifactDelivery.d.ts.map +1 -0
- package/dist/artifacts/ArtifactDelivery.js +9 -0
- package/dist/artifacts/ArtifactDelivery.js.map +1 -0
- package/dist/artifacts/ArtifactKind.d.ts +6 -0
- package/dist/artifacts/ArtifactKind.d.ts.map +1 -0
- package/dist/artifacts/ArtifactKind.js +9 -0
- package/dist/artifacts/ArtifactKind.js.map +1 -0
- package/dist/artifacts/ClientArtifactsActivator.d.ts +6 -0
- package/dist/artifacts/ClientArtifactsActivator.d.ts.map +1 -0
- package/dist/artifacts/ClientArtifactsActivator.js +4 -0
- package/dist/artifacts/ClientArtifactsActivator.js.map +1 -0
- package/dist/artifacts/index.d.ts +5 -0
- package/dist/artifacts/index.d.ts.map +1 -1
- package/dist/artifacts/index.js +2 -0
- package/dist/artifacts/index.js.map +1 -1
- package/dist/artifacts/withActivatedArtifact.d.ts +9 -0
- package/dist/artifacts/withActivatedArtifact.d.ts.map +1 -0
- package/dist/artifacts/withActivatedArtifact.js +24 -0
- package/dist/artifacts/withActivatedArtifact.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/projections/declarative/ProjectionBuilderFor.d.ts +1 -2
- package/dist/projections/declarative/ProjectionBuilderFor.d.ts.map +1 -1
- package/dist/projections/declarative/ProjectionBuilderFor.js.map +1 -1
- package/dist/projections/modelBound/childrenAndNestedBuilder.d.ts +1 -0
- package/dist/projections/modelBound/childrenAndNestedBuilder.d.ts.map +1 -1
- package/dist/projections/modelBound/childrenAndNestedBuilder.js +8 -5
- package/dist/projections/modelBound/childrenAndNestedBuilder.js.map +1 -1
- package/dist/reactors/ReactorServices.d.ts +12 -0
- package/dist/reactors/ReactorServices.d.ts.map +1 -0
- package/dist/reactors/ReactorServices.js +4 -0
- package/dist/reactors/ReactorServices.js.map +1 -0
- package/dist/reactors/Reactors.d.ts +5 -1
- package/dist/reactors/Reactors.d.ts.map +1 -1
- package/dist/reactors/Reactors.js +99 -39
- package/dist/reactors/Reactors.js.map +1 -1
- package/dist/reactors/index.d.ts +1 -0
- package/dist/reactors/index.d.ts.map +1 -1
- package/dist/reducers/Reducers.d.ts +5 -1
- package/dist/reducers/Reducers.d.ts.map +1 -1
- package/dist/reducers/Reducers.js +73 -28
- package/dist/reducers/Reducers.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/index.ts +1 -0
- package/package.json +1 -1
- package/projections/ProjectionDefinitionCompiler.registration.spec.ts +14 -1
- package/projections/Projections.childrenAndNested.spec.ts +130 -0
- package/projections/declarative/ChildrenBuilder.spec.ts +12 -0
- package/projections/declarative/ProjectionBuilderFor.ts +1 -2
- package/projections/modelBound/childrenAndNestedBuilder.ts +9 -5
- package/reactors/ReactorServices.ts +15 -0
- package/reactors/Reactors.ts +101 -42
- package/reactors/for_Reactors/when_delivering/with_activation.spec.ts +386 -0
- package/reactors/index.ts +1 -0
- package/readModels/rootReadModelTypes.ts +1 -1
- package/reducers/Reducers.ts +75 -31
- package/reducers/for_Reducers/when_delivering/with_activation.spec.ts +177 -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/DefaultClientArtifactsProvider.ts","../artifacts/IClientArtifactsProvider.ts","../artifacts/index.ts","../artifacts/validateArtifactSchemas.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/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/index.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/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/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/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/index.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"]}
|
package/index.ts
CHANGED
|
@@ -35,6 +35,7 @@ export type { IEventStore } from './IEventStore.js';
|
|
|
35
35
|
export { EventStoreName } from './EventStoreName.js';
|
|
36
36
|
export { EventStoreNamespaceName } from './EventStoreNamespaceName.js';
|
|
37
37
|
export { Guid } from '@cratis/fundamentals';
|
|
38
|
+
export { ReplayState } from '@cratis/chronicle.contracts';
|
|
38
39
|
export { ChronicleInstrumentationName, ChronicleTracer } from './Tracing.js';
|
|
39
40
|
export { ChronicleMeter, ChronicleMeterName, ChronicleMetrics } from './Metrics.js';
|
|
40
41
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
|
|
4
4
|
import 'reflect-metadata';
|
|
5
|
-
import { readFileSync } from 'node:fs';
|
|
5
|
+
import { readFileSync, writeFileSync } from 'node:fs';
|
|
6
6
|
import { field, Constructor } from '@cratis/fundamentals';
|
|
7
7
|
import { chai, describe, it, vi } from 'vitest';
|
|
8
8
|
import type { IClientArtifactsProvider } from '../artifacts/index.js';
|
|
@@ -252,6 +252,19 @@ chai.should();
|
|
|
252
252
|
const goldenUrl = new URL('./ProjectionDefinitionCompiler.registration.golden.json', import.meta.url);
|
|
253
253
|
|
|
254
254
|
describe('projection registration payload', () => {
|
|
255
|
+
if (process.env.UPDATE_PROJECTION_GOLDEN === '1') {
|
|
256
|
+
it('regenerates the golden from registration payloads', async () => {
|
|
257
|
+
const goldens = JSON.parse(readFileSync(goldenUrl, 'utf8')) as Array<{ name: string; payload: string }>;
|
|
258
|
+
for (const golden of goldens) {
|
|
259
|
+
const testCase = cases.find(candidate => candidate.name === golden.name);
|
|
260
|
+
if (!testCase) throw new Error(`No registration case for golden '${golden.name}'.`);
|
|
261
|
+
golden.payload = await captureRegistration(artifactsFor(testCase));
|
|
262
|
+
}
|
|
263
|
+
if (goldens.length !== cases.length) throw new Error('Registration golden and cases have different lengths.');
|
|
264
|
+
writeFileSync(goldenUrl, `${JSON.stringify(goldens, null, 2)}\n`);
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
|
|
255
268
|
for (const testCase of cases) {
|
|
256
269
|
it(`should match the registration golden for ${testCase.name}`, async () => {
|
|
257
270
|
const actual = await captureRegistration(artifactsFor(testCase));
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
|
|
4
4
|
import 'reflect-metadata';
|
|
5
|
+
import { AutoMap } from '@cratis/chronicle.contracts';
|
|
5
6
|
import { field } from '@cratis/fundamentals';
|
|
6
7
|
import { describe, expect, it, vi } from 'vitest';
|
|
7
8
|
import { IClientArtifactsProvider } from '../artifacts/index.js';
|
|
@@ -11,6 +12,7 @@ import { childrenFrom } from './modelBound/childrenFrom.js';
|
|
|
11
12
|
import { clearWith } from './modelBound/clearWith.js';
|
|
12
13
|
import { fromEvent } from './modelBound/fromEvent.js';
|
|
13
14
|
import { nested } from './modelBound/nested.js';
|
|
15
|
+
import { noAutoMap } from './modelBound/noAutoMap.js';
|
|
14
16
|
import { setFrom } from './modelBound/setFrom.js';
|
|
15
17
|
import { Projections } from './Projections.js';
|
|
16
18
|
|
|
@@ -66,12 +68,14 @@ class OrderLine {
|
|
|
66
68
|
quantity!: number;
|
|
67
69
|
}
|
|
68
70
|
setFrom(LineQuantityChanged)(OrderLine.prototype, 'quantity');
|
|
71
|
+
noAutoMap(OrderLine.prototype, 'quantity');
|
|
69
72
|
clearWith(LineQuantityCleared)(OrderLine.prototype, 'quantity');
|
|
70
73
|
|
|
71
74
|
class OrderSummary {
|
|
72
75
|
total!: number;
|
|
73
76
|
}
|
|
74
77
|
setFrom(SummaryUpdated)(OrderSummary.prototype, 'total');
|
|
78
|
+
noAutoMap(OrderSummary.prototype, 'total');
|
|
75
79
|
clearWith(SummaryTotalCleared)(OrderSummary.prototype, 'total');
|
|
76
80
|
clearWith(SummaryCleared)(OrderSummary);
|
|
77
81
|
|
|
@@ -99,6 +103,80 @@ clearWith(NoteCleared)(Order.prototype, 'note');
|
|
|
99
103
|
childrenFrom(TagAdded)(Order.prototype, 'tags');
|
|
100
104
|
fromEvent(OrderCreated)(Order);
|
|
101
105
|
|
|
106
|
+
class ExplicitLine {
|
|
107
|
+
productId!: string;
|
|
108
|
+
quantity!: number;
|
|
109
|
+
}
|
|
110
|
+
setFrom(LineQuantityChanged)(ExplicitLine.prototype, 'quantity');
|
|
111
|
+
noAutoMap(ExplicitLine);
|
|
112
|
+
|
|
113
|
+
class ExplicitSummary {
|
|
114
|
+
total!: number;
|
|
115
|
+
}
|
|
116
|
+
setFrom(SummaryUpdated)(ExplicitSummary.prototype, 'total');
|
|
117
|
+
noAutoMap(ExplicitSummary);
|
|
118
|
+
|
|
119
|
+
class OrderWithExplicitParts {
|
|
120
|
+
id!: string;
|
|
121
|
+
lines!: ExplicitLine[];
|
|
122
|
+
summary!: ExplicitSummary | undefined;
|
|
123
|
+
}
|
|
124
|
+
childrenFrom(LineAdded, undefined, 'productId')(OrderWithExplicitParts.prototype, 'lines');
|
|
125
|
+
field(Array, { enumerable: true, genericArguments: [ExplicitLine] })(OrderWithExplicitParts.prototype, 'lines');
|
|
126
|
+
nested(OrderWithExplicitParts.prototype, 'summary');
|
|
127
|
+
field(ExplicitSummary)(OrderWithExplicitParts.prototype, 'summary');
|
|
128
|
+
fromEvent(OrderCreated)(OrderWithExplicitParts);
|
|
129
|
+
|
|
130
|
+
class OrderWithoutAutoMap {
|
|
131
|
+
id!: string;
|
|
132
|
+
lines!: OrderLine[];
|
|
133
|
+
summary!: OrderSummary | undefined;
|
|
134
|
+
}
|
|
135
|
+
childrenFrom(LineAdded, undefined, 'productId')(OrderWithoutAutoMap.prototype, 'lines');
|
|
136
|
+
field(Array, { enumerable: true, genericArguments: [OrderLine] })(OrderWithoutAutoMap.prototype, 'lines');
|
|
137
|
+
nested(OrderWithoutAutoMap.prototype, 'summary');
|
|
138
|
+
field(OrderSummary)(OrderWithoutAutoMap.prototype, 'summary');
|
|
139
|
+
noAutoMap(OrderWithoutAutoMap);
|
|
140
|
+
fromEvent(OrderCreated)(OrderWithoutAutoMap);
|
|
141
|
+
|
|
142
|
+
class Grandchild {
|
|
143
|
+
id!: string;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
class ChildWithGrandchildren {
|
|
147
|
+
grandchildren!: Grandchild[];
|
|
148
|
+
detail!: Grandchild | undefined;
|
|
149
|
+
}
|
|
150
|
+
childrenFrom(LineAdded)(ChildWithGrandchildren.prototype, 'grandchildren');
|
|
151
|
+
field(Array, { enumerable: true, genericArguments: [Grandchild] })(ChildWithGrandchildren.prototype, 'grandchildren');
|
|
152
|
+
nested(ChildWithGrandchildren.prototype, 'detail');
|
|
153
|
+
field(Grandchild)(ChildWithGrandchildren.prototype, 'detail');
|
|
154
|
+
|
|
155
|
+
class DecoratedChildWithGrandchildren {
|
|
156
|
+
grandchildren!: Grandchild[];
|
|
157
|
+
detail!: Grandchild | undefined;
|
|
158
|
+
}
|
|
159
|
+
childrenFrom(LineAdded)(DecoratedChildWithGrandchildren.prototype, 'grandchildren');
|
|
160
|
+
field(Array, { enumerable: true, genericArguments: [Grandchild] })(DecoratedChildWithGrandchildren.prototype, 'grandchildren');
|
|
161
|
+
nested(DecoratedChildWithGrandchildren.prototype, 'detail');
|
|
162
|
+
field(Grandchild)(DecoratedChildWithGrandchildren.prototype, 'detail');
|
|
163
|
+
noAutoMap(DecoratedChildWithGrandchildren);
|
|
164
|
+
|
|
165
|
+
class OrderWithDecoratedChild {
|
|
166
|
+
children!: DecoratedChildWithGrandchildren[];
|
|
167
|
+
}
|
|
168
|
+
childrenFrom(LineAdded)(OrderWithDecoratedChild.prototype, 'children');
|
|
169
|
+
field(Array, { enumerable: true, genericArguments: [DecoratedChildWithGrandchildren] })(OrderWithDecoratedChild.prototype, 'children');
|
|
170
|
+
fromEvent(OrderCreated)(OrderWithDecoratedChild);
|
|
171
|
+
|
|
172
|
+
class DecoratedOrderWithUndecoratedChild {
|
|
173
|
+
children!: ChildWithGrandchildren[];
|
|
174
|
+
}
|
|
175
|
+
childrenFrom(LineAdded)(DecoratedOrderWithUndecoratedChild.prototype, 'children');
|
|
176
|
+
field(Array, { enumerable: true, genericArguments: [ChildWithGrandchildren] })(DecoratedOrderWithUndecoratedChild.prototype, 'children');
|
|
177
|
+
noAutoMap(DecoratedOrderWithUndecoratedChild);
|
|
178
|
+
fromEvent(OrderCreated)(DecoratedOrderWithUndecoratedChild);
|
|
179
|
+
|
|
102
180
|
interface FromRecord {
|
|
103
181
|
Key: { Id: string };
|
|
104
182
|
Value: { Properties: Record<string, string>; Key: string; ParentKey: string };
|
|
@@ -106,8 +184,12 @@ interface FromRecord {
|
|
|
106
184
|
|
|
107
185
|
interface ChildrenDefinition {
|
|
108
186
|
IdentifiedBy: string;
|
|
187
|
+
AutoMap: AutoMap;
|
|
188
|
+
NoAutoMapProperties: string[];
|
|
109
189
|
From: FromRecord[];
|
|
110
190
|
RemovedWith: Array<{ Key: { Id: string }; Value: { Key: string; ParentKey: string } }>;
|
|
191
|
+
Children: Record<string, ChildrenDefinition>;
|
|
192
|
+
Nested: Record<string, ChildrenDefinition>;
|
|
111
193
|
}
|
|
112
194
|
|
|
113
195
|
interface BuiltDefinition {
|
|
@@ -156,6 +238,8 @@ describe('Projections with childrenFrom, nested and clearWith', () => {
|
|
|
156
238
|
const lines = definition.Children.lines;
|
|
157
239
|
|
|
158
240
|
expect(lines.IdentifiedBy).toBe('productId');
|
|
241
|
+
expect(lines.AutoMap).toBe(AutoMap.Enabled);
|
|
242
|
+
expect(lines.NoAutoMapProperties).toEqual(['quantity']);
|
|
159
243
|
const creationEntry = lines.From.find(candidate => candidate.Key.Id === 'LineAdded')!;
|
|
160
244
|
expect(creationEntry.Value.Key).toBe('$eventSourceId');
|
|
161
245
|
expect(creationEntry.Value.ParentKey).toBe('$eventSourceId');
|
|
@@ -182,6 +266,8 @@ describe('Projections with childrenFrom, nested and clearWith', () => {
|
|
|
182
266
|
const tags = definition.Children.tags;
|
|
183
267
|
|
|
184
268
|
expect(tags.From.some(candidate => candidate.Key.Id === 'TagAdded')).toBe(true);
|
|
269
|
+
expect(tags.AutoMap).toBe(AutoMap.Enabled);
|
|
270
|
+
expect(tags.NoAutoMapProperties).toEqual([]);
|
|
185
271
|
});
|
|
186
272
|
|
|
187
273
|
it('should build a nested definition honoring a class-level clearWith on the nested type', async () => {
|
|
@@ -192,6 +278,8 @@ describe('Projections with childrenFrom, nested and clearWith', () => {
|
|
|
192
278
|
const summary = definition.Nested.summary;
|
|
193
279
|
|
|
194
280
|
expect(summary.IdentifiedBy).toBe('*NotSet*');
|
|
281
|
+
expect(summary.AutoMap).toBe(AutoMap.Enabled);
|
|
282
|
+
expect(summary.NoAutoMapProperties).toEqual(['total']);
|
|
195
283
|
const updateEntry = summary.From.find(candidate => candidate.Key.Id === 'SummaryUpdated')!;
|
|
196
284
|
expect(updateEntry.Value.Properties.total).toBe('total');
|
|
197
285
|
expect(summary.RemovedWith).toContainEqual({ Key: expect.objectContaining({ Id: 'SummaryCleared' }), Value: { Key: '$eventSourceId', ParentKey: '' } });
|
|
@@ -208,6 +296,48 @@ describe('Projections with childrenFrom, nested and clearWith', () => {
|
|
|
208
296
|
expect(summary.RemovedWith.some(candidate => candidate.Key.Id === 'SummaryTotalCleared')).toBe(false);
|
|
209
297
|
});
|
|
210
298
|
|
|
299
|
+
it('should disable AutoMap on decorated child and nested types while retaining explicit mappings', async () => {
|
|
300
|
+
const { projections, registerMock } = createProjections([OrderWithExplicitParts]);
|
|
301
|
+
await projections.register();
|
|
302
|
+
|
|
303
|
+
const definition = registerMock.mock.calls[0][0].Projections[0] as BuiltDefinition;
|
|
304
|
+
expect(definition.Children.lines.AutoMap).toBe(AutoMap.Disabled);
|
|
305
|
+
expect(definition.Children.lines.From.find(candidate => candidate.Key.Id === 'LineQuantityChanged')?.Value.Properties.quantity).toBe('quantity');
|
|
306
|
+
expect(definition.Nested.summary.AutoMap).toBe(AutoMap.Disabled);
|
|
307
|
+
expect(definition.Nested.summary.From.find(candidate => candidate.Key.Id === 'SummaryUpdated')?.Value.Properties.total).toBe('total');
|
|
308
|
+
});
|
|
309
|
+
|
|
310
|
+
it('should inherit disabled AutoMap from the declaring model for child and nested types', async () => {
|
|
311
|
+
const { projections, registerMock } = createProjections([OrderWithoutAutoMap]);
|
|
312
|
+
await projections.register();
|
|
313
|
+
|
|
314
|
+
const definition = registerMock.mock.calls[0][0].Projections[0] as BuiltDefinition;
|
|
315
|
+
expect(definition.Children.lines.AutoMap).toBe(AutoMap.Disabled);
|
|
316
|
+
expect(definition.Nested.summary.AutoMap).toBe(AutoMap.Disabled);
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
it('should disable grandchild definitions when their declaring child type is decorated', async () => {
|
|
320
|
+
const { projections, registerMock } = createProjections([OrderWithDecoratedChild]);
|
|
321
|
+
await projections.register();
|
|
322
|
+
|
|
323
|
+
const definition = registerMock.mock.calls[0][0].Projections[0] as BuiltDefinition;
|
|
324
|
+
const child = definition.Children.children;
|
|
325
|
+
expect(child.AutoMap).toBe(AutoMap.Disabled);
|
|
326
|
+
expect(child.Children.grandchildren.AutoMap).toBe(AutoMap.Disabled);
|
|
327
|
+
expect(child.Nested.detail.AutoMap).toBe(AutoMap.Disabled);
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
it('should not cascade the decorated root policy past an undecorated child', async () => {
|
|
331
|
+
const { projections, registerMock } = createProjections([DecoratedOrderWithUndecoratedChild]);
|
|
332
|
+
await projections.register();
|
|
333
|
+
|
|
334
|
+
const definition = registerMock.mock.calls[0][0].Projections[0] as BuiltDefinition;
|
|
335
|
+
const child = definition.Children.children;
|
|
336
|
+
expect(child.AutoMap).toBe(AutoMap.Disabled);
|
|
337
|
+
expect(child.Children.grandchildren.AutoMap).toBe(AutoMap.Enabled);
|
|
338
|
+
expect(child.Nested.detail.AutoMap).toBe(AutoMap.Enabled);
|
|
339
|
+
});
|
|
340
|
+
|
|
211
341
|
it('should build a nested definition honoring a property-level clearWith', async () => {
|
|
212
342
|
const { projections, registerMock } = createProjections([Order]);
|
|
213
343
|
await projections.register();
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
|
|
4
4
|
import 'reflect-metadata';
|
|
5
|
+
import { AutoMap } from '@cratis/chronicle.contracts';
|
|
5
6
|
import { describe, expect, it } from 'vitest';
|
|
6
7
|
import { eventType } from '../../events/eventTypeDecorator.js';
|
|
7
8
|
import { ProjectionBuilderFor } from './ProjectionBuilderFor.js';
|
|
@@ -58,6 +59,7 @@ interface FromRecord {
|
|
|
58
59
|
|
|
59
60
|
interface ChildrenDefinition {
|
|
60
61
|
IdentifiedBy: string;
|
|
62
|
+
AutoMap: AutoMap;
|
|
61
63
|
From: FromRecord[];
|
|
62
64
|
RemovedWith: Array<{ Key: { Id: string } }>;
|
|
63
65
|
FromEventProperty?: { Event: { Id: string } | undefined; PropertyExpression: string };
|
|
@@ -103,6 +105,16 @@ describe('ChildrenBuilder and NestedBuilder', () => {
|
|
|
103
105
|
});
|
|
104
106
|
});
|
|
105
107
|
|
|
108
|
+
it('should allow disabling and enabling AutoMap independently for child and nested builders', () => {
|
|
109
|
+
const builder = new ProjectionBuilderFor<Order>();
|
|
110
|
+
builder.children<OrderLine>(order => order.lines, child => child.noAutoMap());
|
|
111
|
+
builder.nested<OrderSummary>(order => order.summary, summary => summary.noAutoMap().autoMap());
|
|
112
|
+
|
|
113
|
+
const definition = builder.build('order', 'Order') as unknown as BuiltDefinition;
|
|
114
|
+
expect(definition.Children.lines.AutoMap).toBe(AutoMap.Disabled);
|
|
115
|
+
expect(definition.Nested.summary.AutoMap).toBe(AutoMap.Enabled);
|
|
116
|
+
});
|
|
117
|
+
|
|
106
118
|
describe('when using nested with clearWith on the top-level builder', () => {
|
|
107
119
|
it('should produce a nested definition with a RemovedWith entry', () => {
|
|
108
120
|
const builder = new ProjectionBuilderFor<Order>();
|
|
@@ -5,13 +5,12 @@ import { AutoMap } from '@cratis/chronicle.contracts';
|
|
|
5
5
|
import { PropertyAccessor, PropertyPathResolverProxyHandler } from '@cratis/fundamentals';
|
|
6
6
|
import { EventSequenceId } from '../../eventSequences/EventSequenceId.js';
|
|
7
7
|
import { canonicalStringify } from '../canonicalStringify.js';
|
|
8
|
-
import type { ChildrenDefinitionLike } from '../modelBound/childrenAndNestedBuilder.js';
|
|
9
8
|
import { ChildrenBuilder } from './ChildrenBuilder.js';
|
|
10
9
|
import { IChildrenBuilder } from './IChildrenBuilder.js';
|
|
11
10
|
import { INestedBuilder } from './INestedBuilder.js';
|
|
12
11
|
import { IProjectionBuilderFor } from './IProjectionBuilderFor.js';
|
|
13
12
|
import { NestedBuilder } from './NestedBuilder.js';
|
|
14
|
-
import { ContractEventType, ProjectionBuilderCore } from './ProjectionBuilderCore.js';
|
|
13
|
+
import { ChildrenDefinitionLike, ContractEventType, ProjectionBuilderCore } from './ProjectionBuilderCore.js';
|
|
15
14
|
|
|
16
15
|
/**
|
|
17
16
|
* Concrete implementation of {@link IProjectionBuilderFor} that accumulates projection
|
|
@@ -16,6 +16,7 @@ import { getDecrementMetadata } from './decrement.js';
|
|
|
16
16
|
import { getFromEventMetadata } from './fromEvent.js';
|
|
17
17
|
import { getIncrementMetadata } from './increment.js';
|
|
18
18
|
import { isNested } from './nested.js';
|
|
19
|
+
import { isNoAutoMap, isPropertyNoAutoMap } from './noAutoMap.js';
|
|
19
20
|
import { getRemovedWithClassMetadata, getRemovedWithPropertyMetadata } from './removedWith.js';
|
|
20
21
|
import { getRemovedWithJoinClassMetadata, getRemovedWithJoinPropertyMetadata } from './removedWithJoin.js';
|
|
21
22
|
import { getSetFromMetadata } from './setFrom.js';
|
|
@@ -43,6 +44,7 @@ export interface ChildrenDefinitionLike {
|
|
|
43
44
|
RemovedWithJoin: Array<{ Key: ContractEventType; Value: { Key: string } }>;
|
|
44
45
|
AutoMap: AutoMap;
|
|
45
46
|
Nested: Record<string, ChildrenDefinitionLike>;
|
|
47
|
+
NoAutoMapProperties: string[];
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
/**
|
|
@@ -150,7 +152,7 @@ export function applyPropertyMappings(prototype: object, property: string, fromB
|
|
|
150
152
|
}
|
|
151
153
|
}
|
|
152
154
|
|
|
153
|
-
function createEmptyChildrenDefinition(): ChildrenDefinitionLike {
|
|
155
|
+
function createEmptyChildrenDefinition(parentType: Function, childType: Function | undefined): ChildrenDefinitionLike {
|
|
154
156
|
return {
|
|
155
157
|
IdentifiedBy: '$eventSourceId',
|
|
156
158
|
From: [],
|
|
@@ -159,8 +161,10 @@ function createEmptyChildrenDefinition(): ChildrenDefinitionLike {
|
|
|
159
161
|
All: { Properties: {}, IncludeChildren: false, AutoMap: AutoMap.Inherit },
|
|
160
162
|
RemovedWith: [],
|
|
161
163
|
RemovedWithJoin: [],
|
|
162
|
-
AutoMap: AutoMap.Enabled,
|
|
163
|
-
Nested: {}
|
|
164
|
+
AutoMap: isNoAutoMap(parentType) || (childType !== undefined && isNoAutoMap(childType)) ? AutoMap.Disabled : AutoMap.Enabled,
|
|
165
|
+
Nested: {},
|
|
166
|
+
NoAutoMapProperties: childType === undefined ? [] : TypeIntrospector.getTrackedProperties(childType)
|
|
167
|
+
.filter(property => isPropertyNoAutoMap(childType.prototype, property))
|
|
164
168
|
};
|
|
165
169
|
}
|
|
166
170
|
|
|
@@ -317,7 +321,7 @@ function populateFromType(definition: ChildrenDefinitionLike, childType: Functio
|
|
|
317
321
|
*/
|
|
318
322
|
export function buildChildrenEntry(type: Function, property: string, metadataList: ChildrenFromMetadata[]): ChildrenDefinitionLike {
|
|
319
323
|
const childType = resolveChildElementType(type, property);
|
|
320
|
-
const definition = createEmptyChildrenDefinition();
|
|
324
|
+
const definition = createEmptyChildrenDefinition(type, childType);
|
|
321
325
|
|
|
322
326
|
const explicitIdentifiedBy = metadataList.find(metadata => metadata.identifiedBy)?.identifiedBy;
|
|
323
327
|
definition.IdentifiedBy = explicitIdentifiedBy ?? discoverIdentifiedBy(childType) ?? '$eventSourceId';
|
|
@@ -346,7 +350,7 @@ export function buildChildrenEntry(type: Function, property: string, metadataLis
|
|
|
346
350
|
*/
|
|
347
351
|
export function buildNestedEntry(type: Function, property: string): ChildrenDefinitionLike {
|
|
348
352
|
const nestedType = resolveNestedType(type, property);
|
|
349
|
-
const definition = createEmptyChildrenDefinition();
|
|
353
|
+
const definition = createEmptyChildrenDefinition(type, nestedType);
|
|
350
354
|
definition.IdentifiedBy = notSetPropertyPath;
|
|
351
355
|
|
|
352
356
|
// A @clearWith on the property carrying @nested clears this nested object, the same as a
|
|
@@ -0,0 +1,15 @@
|
|
|
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 { IEventStore } from '../IEventStore.js';
|
|
5
|
+
import type { IReadModels } from '../readModels/IReadModels.js';
|
|
6
|
+
|
|
7
|
+
/** Services for the observation's owning store and namespace, not an application default store. */
|
|
8
|
+
export interface ReactorServices {
|
|
9
|
+
/** The event store that owns this reactor observation. */
|
|
10
|
+
readonly eventStore: IEventStore;
|
|
11
|
+
/** The read models from the same event store (`eventStore.readModels`). */
|
|
12
|
+
readonly readModels: IReadModels;
|
|
13
|
+
/** Aborted when the observation disconnects or the client is disposed. */
|
|
14
|
+
readonly signal: AbortSignal;
|
|
15
|
+
}
|