@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
|
@@ -0,0 +1,233 @@
|
|
|
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
|
+
import { AutoMap } from '@cratis/chronicle.contracts';
|
|
4
|
+
import { EventSequenceId } from '../../eventSequences/EventSequenceId.js';
|
|
5
|
+
import { eventContractPath } from '../../projections/eventContractPath.js';
|
|
6
|
+
import { eventContextPropertyExpression } from '../../projections/eventContextPropertyExpression.js';
|
|
7
|
+
import { InvalidEventContextPropertyError } from '../../projections/InvalidEventContextPropertyError.js';
|
|
8
|
+
import { getEventTypeMapKey } from '../../projections/modelBound/childrenAndNestedBuilder.js';
|
|
9
|
+
import { UnsupportedProjectionOperation } from './UnsupportedProjectionOperation.js';
|
|
10
|
+
/** Validates *all* subscribed operations against the bounded scenario subset, before replay. */
|
|
11
|
+
export class ProjectionCapabilities {
|
|
12
|
+
/**
|
|
13
|
+
* Throws with the original declaration and contract path for the first unsupported operation.
|
|
14
|
+
* @param compiled - Definitions and their schema/provenance evidence.
|
|
15
|
+
* @param definition - The compiled contract to validate.
|
|
16
|
+
*/
|
|
17
|
+
static validate(compiled, definition) {
|
|
18
|
+
const model = String(definition.ReadModel ?? definition.Identifier ?? '<unknown>');
|
|
19
|
+
const wire = definition;
|
|
20
|
+
const reject = (path, reason, fallback) => {
|
|
21
|
+
const source = compiled.provenance.get(definition)?.find(entry => entry.contractPath.startsWith('From['))?.declaration ?? '.from';
|
|
22
|
+
const declaration = compiled.provenance.get(definition)?.find(entry => entry.contractPath === path)?.declaration
|
|
23
|
+
?? fallback ?? (path.includes('.AutoMap.') ? `${source} (AutoMap)`
|
|
24
|
+
: path.startsWith('InitialModelState') ? '.withInitialValues'
|
|
25
|
+
: path.startsWith('ReadModel') ? source : 'contract');
|
|
26
|
+
throw new UnsupportedProjectionOperation(model, path, declaration, reason);
|
|
27
|
+
};
|
|
28
|
+
if (!compiled.definitions.includes(definition))
|
|
29
|
+
reject('Definition', 'definition is not part of this compile');
|
|
30
|
+
const provenance = compiled.provenance.get(definition) ?? reject('Definition', 'capability provenance is unavailable');
|
|
31
|
+
const catalog = compiled.eventSchemas.get(definition) ?? reject('Definition', 'event-schema catalog is unavailable');
|
|
32
|
+
const variant = provenance.find(entry => entry.contractPath === 'Variant');
|
|
33
|
+
if (variant)
|
|
34
|
+
reject('Variant', 'variants require a kernel-backed test');
|
|
35
|
+
if (wire.IsActive === false)
|
|
36
|
+
reject('IsActive', 'passive projections require a kernel-backed test');
|
|
37
|
+
if (wire.EventSequenceId !== EventSequenceId.eventLog.value)
|
|
38
|
+
reject('EventSequenceId', 'non-default event sequences require a kernel-backed test');
|
|
39
|
+
for (const section of ['Join', 'Children', 'Nested', 'RemovedWithJoin']) {
|
|
40
|
+
const value = wire[section];
|
|
41
|
+
const paths = Array.isArray(value) ? value.map((entry) => eventContractPath(section, entry.Key))
|
|
42
|
+
: Object.keys(value ?? {}).map(property => `${section}.${property}`);
|
|
43
|
+
if (paths.length)
|
|
44
|
+
reject(paths[0], `${section === 'Children' ? 'children projections' : section === 'Nested' ? 'nested projections' : section === 'Join' ? 'joins' : 'removedWithJoin'} require a kernel-backed test`);
|
|
45
|
+
}
|
|
46
|
+
if (wire.FromEvery?.length)
|
|
47
|
+
reject('FromEvery', 'derivative projections require a kernel-backed test');
|
|
48
|
+
if (wire.FromEventProperty)
|
|
49
|
+
reject('FromEventProperty', 'event-property subscriptions require a kernel-backed test');
|
|
50
|
+
const all = wire.All;
|
|
51
|
+
if (provenance.some(entry => entry.contractPath === 'All') || all?.IncludeChildren ||
|
|
52
|
+
Object.keys(all?.Properties ?? {}).length || all?.AutoMap === AutoMap.Enabled) {
|
|
53
|
+
reject('All', 'fromEvery/all subscriptions require a kernel-backed test');
|
|
54
|
+
}
|
|
55
|
+
const readModel = compiled.readModels.find(candidate => candidate.Type.Identifier === model)
|
|
56
|
+
?? reject('ReadModel', 'a single registered read-model schema is required');
|
|
57
|
+
let schema;
|
|
58
|
+
try {
|
|
59
|
+
schema = JSON.parse(readModel.Schema);
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
reject('ReadModel.Schema', 'read-model schema is not valid JSON');
|
|
63
|
+
}
|
|
64
|
+
const identifier = schema.properties?.id ?? schema.properties?.Id ?? { type: 'string' };
|
|
65
|
+
if (!((identifier.type === 'string' && (!identifier.format || identifier.format === 'guid')) ||
|
|
66
|
+
(identifier.type === 'number' && (!identifier.format || identifier.format === 'double')) ||
|
|
67
|
+
(identifier.type === 'integer' && ['int32', 'uint32'].includes(identifier.format ?? '')))) {
|
|
68
|
+
reject('ReadModel.Schema.id', 'identifier schema must be string, number, or GUID (int32/uint32 identifiers are supported)');
|
|
69
|
+
}
|
|
70
|
+
let initial;
|
|
71
|
+
try {
|
|
72
|
+
initial = JSON.parse(String(wire.InitialModelState ?? '{}'));
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
reject('InitialModelState', 'initial values must be a JSON object');
|
|
76
|
+
}
|
|
77
|
+
if (initial === null || typeof initial !== 'object' || Array.isArray(initial))
|
|
78
|
+
reject('InitialModelState', 'initial values must be a JSON object');
|
|
79
|
+
for (const [property, value] of Object.entries(initial)) {
|
|
80
|
+
const target = schema.properties?.[property]
|
|
81
|
+
?? reject(`InitialModelState.${property}`, 'initial value has no read-model schema');
|
|
82
|
+
this.checkSchema(target, `InitialModelState.${property}`, reject);
|
|
83
|
+
if (typeof value === 'number') {
|
|
84
|
+
const outsideIntegerRange = !Number.isSafeInteger(value) ||
|
|
85
|
+
(target.format === 'int32' && (value < -2147483648 || value > 2147483647)) ||
|
|
86
|
+
(target.format === 'uint32' && (value < 0 || value > 4294967295));
|
|
87
|
+
if (!Number.isFinite(value) || (target.type === 'integer' && outsideIntegerRange)) {
|
|
88
|
+
reject(`InitialModelState.${property}`, 'initial numeric value is outside the supported finite/integer range');
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
const generations = new Map();
|
|
93
|
+
const requireEventSchema = (eventType, path) => {
|
|
94
|
+
const previous = generations.get(eventType.Id);
|
|
95
|
+
if (previous !== undefined && previous !== eventType.Generation)
|
|
96
|
+
reject(path, 'multiple generations of the same event-type id require a kernel-backed test');
|
|
97
|
+
generations.set(eventType.Id, eventType.Generation);
|
|
98
|
+
const event = catalog.get(getEventTypeMapKey(eventType)) ?? reject(path, 'participating event schema is unavailable');
|
|
99
|
+
return event.schema;
|
|
100
|
+
};
|
|
101
|
+
const from = wire.From ?? [];
|
|
102
|
+
const removedWith = wire.RemovedWith ?? [];
|
|
103
|
+
for (const entry of [...from, ...removedWith]) {
|
|
104
|
+
const section = from.includes(entry) ? 'From' : 'RemovedWith';
|
|
105
|
+
const path = eventContractPath(section, entry.Key);
|
|
106
|
+
const eventSchema = requireEventSchema(entry.Key, path);
|
|
107
|
+
if (entry.Value.Key !== '$eventSourceId')
|
|
108
|
+
reject(`${path}.Key`, 'only $eventSourceId keys are supported');
|
|
109
|
+
if (entry.Value.ParentKey)
|
|
110
|
+
reject(`${path}.ParentKey`, 'parent keys require a kernel-backed test');
|
|
111
|
+
if (section === 'RemovedWith')
|
|
112
|
+
continue;
|
|
113
|
+
const properties = entry.Value.Properties ?? {};
|
|
114
|
+
for (const [property, expression] of Object.entries(properties)) {
|
|
115
|
+
const mappingPath = `${path}.Properties.${property}`;
|
|
116
|
+
this.checkMapping(schema, eventSchema, property, expression, mappingPath, reject);
|
|
117
|
+
}
|
|
118
|
+
const expressions = Object.values(properties);
|
|
119
|
+
const aggregateOnly = expressions.length > 0 && expressions.every(expression => /^(?:\$add\([^()]+\)|\$subtract\([^()]+\)|\$count|\$increment|\$decrement)$/.test(expression));
|
|
120
|
+
if (wire.AutoMap === AutoMap.Enabled && !aggregateOnly) {
|
|
121
|
+
this.checkAutoMap(schema, eventSchema, properties, wire.NoAutoMapProperties ?? [], path, reject);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
static checkAutoMap(modelSchema, eventSchema, explicit, exclusions, path, reject) {
|
|
126
|
+
for (const [destination] of Object.entries(modelSchema.properties ?? {})) {
|
|
127
|
+
if (destination in explicit || exclusions.includes(destination))
|
|
128
|
+
continue;
|
|
129
|
+
const candidates = Object.keys(eventSchema.properties ?? {}).filter(source => source.toLowerCase() === destination.toLowerCase());
|
|
130
|
+
if (candidates.length > 1)
|
|
131
|
+
reject(`${path}.AutoMap.${destination}`, `inferred AutoMap source is ambiguous: ${candidates.join(', ')}`);
|
|
132
|
+
if (candidates.length)
|
|
133
|
+
this.checkMapping(modelSchema, eventSchema, destination, candidates[0], `${path}.AutoMap.${destination}`, reject);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
static checkMapping(modelSchema, eventSchema, destination, expression, path, reject) {
|
|
137
|
+
const fail = (reason) => reject(path, `expression '${expression}': ${reason}`);
|
|
138
|
+
const target = modelSchema.properties?.[destination]
|
|
139
|
+
?? fail('dynamic or unknown destination paths require a kernel-backed test');
|
|
140
|
+
if (destination.includes('.') || destination.includes('$'))
|
|
141
|
+
fail('dynamic or unknown destination paths require a kernel-backed test');
|
|
142
|
+
this.checkSchema(target, path, (_path, reason) => fail(reason));
|
|
143
|
+
if (expression === '$eventSourceId' || expression === '$null')
|
|
144
|
+
return;
|
|
145
|
+
if (expression.startsWith('$eventContext(')) {
|
|
146
|
+
if (/^\$eventContext\(.+\(\)\)$/.test(expression))
|
|
147
|
+
fail('derived event-context functions require a kernel-backed test');
|
|
148
|
+
const path = /^\$eventContext\(([^()]*)\)$/.exec(expression)?.[1];
|
|
149
|
+
if (path) {
|
|
150
|
+
try {
|
|
151
|
+
if (eventContextPropertyExpression(path) === expression)
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
catch (error) {
|
|
155
|
+
if (!(error instanceof InvalidEventContextPropertyError))
|
|
156
|
+
throw error;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
fail('event-context path is not supported by the client');
|
|
160
|
+
}
|
|
161
|
+
if (/^\$value\([\p{L}\p{Mn}\p{Nd}\p{Pc} ._/:*+-]*\)$/u.test(expression)) {
|
|
162
|
+
const text = expression.slice(7, -1);
|
|
163
|
+
if (target.format === 'date-time')
|
|
164
|
+
fail('$value date-time literals require a kernel-backed test');
|
|
165
|
+
if (this.numeric(target)) {
|
|
166
|
+
if (!/^[+-]?(?:\d+(?:\.\d+)?|\.\d+)$/.test(text) || !Number.isFinite(Number(text)) ||
|
|
167
|
+
(target.type === 'integer' && (!Number.isSafeInteger(Number(text)) ||
|
|
168
|
+
(target.format === 'int32' && (Number(text) < -2147483648 || Number(text) > 2147483647)) ||
|
|
169
|
+
(target.format === 'uint32' && (Number(text) < 0 || Number(text) > 4294967295))))) {
|
|
170
|
+
fail('$value numeric literal is outside the supported finite/integer range');
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
else if (target.type === 'boolean' && !/^(?:true|false)$/i.test(text)) {
|
|
174
|
+
fail('$value boolean literal must be true or false');
|
|
175
|
+
}
|
|
176
|
+
else if (target.format === 'guid' && !/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(text)) {
|
|
177
|
+
fail('$value GUID literal is not canonical');
|
|
178
|
+
}
|
|
179
|
+
else if (target.type === 'object' || target.type === 'array') {
|
|
180
|
+
fail('$value object/array literals require a kernel-backed test');
|
|
181
|
+
}
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
const operation = /^(\$add|\$subtract)\(([^()]+)\)$/.exec(expression);
|
|
185
|
+
const arithmetic = operation || ['$count', '$increment', '$decrement'].includes(expression);
|
|
186
|
+
if (arithmetic) {
|
|
187
|
+
if (!this.numeric(target))
|
|
188
|
+
fail('arithmetic requires a supported finite number/double or int32/uint32 schema (not float, decimal, duration, or int64)');
|
|
189
|
+
if (operation) {
|
|
190
|
+
const operand = this.propertyAt(eventSchema, operation[2]);
|
|
191
|
+
if (!operand || !this.numeric(operand))
|
|
192
|
+
fail('arithmetic operand requires a supported numeric event schema');
|
|
193
|
+
}
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
if (/^[A-Za-z_][\w]*(?:\.[A-Za-z_][\w]*)*$/.test(expression)) {
|
|
197
|
+
const source = this.propertyAt(eventSchema, expression);
|
|
198
|
+
if (!source)
|
|
199
|
+
return fail(`event property '${expression}' is absent from the participating event schema`);
|
|
200
|
+
this.checkSchema(source, path, (_path, reason) => fail(reason));
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
if (expression.startsWith('$context.')) {
|
|
204
|
+
return fail('is a legacy expression the kernel does not resolve; event-context mappings use $eventContext(...)');
|
|
205
|
+
}
|
|
206
|
+
fail('requires a kernel-backed test');
|
|
207
|
+
}
|
|
208
|
+
static propertyAt(schema, path) {
|
|
209
|
+
return path.split('.').reduce((current, segment) => current?.properties?.[segment], schema);
|
|
210
|
+
}
|
|
211
|
+
static numeric(schema) {
|
|
212
|
+
return (schema.type === 'number' && (!schema.format || schema.format === 'double')) ||
|
|
213
|
+
(schema.type === 'integer' && ['int32', 'uint32'].includes(schema.format ?? ''));
|
|
214
|
+
}
|
|
215
|
+
static checkSchema(schema, path, reject) {
|
|
216
|
+
if (!schema.type || schema.type === 'null' || (schema.format && !['guid', 'date-time', 'double', 'int32', 'uint32'].includes(schema.format)) ||
|
|
217
|
+
(schema.format === 'date-time' && schema.type !== 'string') ||
|
|
218
|
+
(schema.format === 'guid' && schema.type !== 'string') ||
|
|
219
|
+
(schema.format === 'double' && schema.type !== 'number') ||
|
|
220
|
+
(['int32', 'uint32'].includes(schema.format ?? '') && schema.type !== 'integer')) {
|
|
221
|
+
reject(path, `schema type/format '${schema.type ?? 'unknown'}${schema.format ? `/${schema.format}` : ''}' requires a kernel-backed test`);
|
|
222
|
+
}
|
|
223
|
+
if (schema.type === 'integer' && !this.numeric(schema))
|
|
224
|
+
reject(path, 'integer width requires a kernel-backed test');
|
|
225
|
+
if (schema.type === 'array' && schema.items)
|
|
226
|
+
this.checkSchema(schema.items, path, reject);
|
|
227
|
+
if (schema.type === 'object') {
|
|
228
|
+
for (const property of Object.values(schema.properties ?? {}))
|
|
229
|
+
this.checkSchema(property, path, reject);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
//# sourceMappingURL=ProjectionCapabilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectionCapabilities.js","sourceRoot":"","sources":["../../../testing/projections/ProjectionCapabilities.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG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
|
+
/** A compiled projection uses a kernel feature outside the infrastructure-free scenario boundary. */
|
|
2
|
+
export declare class UnsupportedProjectionOperation extends Error {
|
|
3
|
+
/**
|
|
4
|
+
* @param model - The read model being evaluated.
|
|
5
|
+
* @param contractPath - Location of the unsupported operation in the compiled contract.
|
|
6
|
+
* @param declaration - Source declaration responsible for the operation.
|
|
7
|
+
* @param reason - Why an infrastructure-free evaluation cannot represent it.
|
|
8
|
+
*/
|
|
9
|
+
constructor(model: string, contractPath: string, declaration: string, reason: string);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=UnsupportedProjectionOperation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnsupportedProjectionOperation.d.ts","sourceRoot":"","sources":["../../../testing/projections/UnsupportedProjectionOperation.ts"],"names":[],"mappings":"AAGA,qGAAqG;AACrG,qBAAa,8BAA+B,SAAQ,KAAK;IACrD;;;;;OAKG;IACH,YAAY,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAGnF;CACJ"}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
/** A compiled projection uses a kernel feature outside the infrastructure-free scenario boundary. */
|
|
4
|
+
export class UnsupportedProjectionOperation extends Error {
|
|
5
|
+
/**
|
|
6
|
+
* @param model - The read model being evaluated.
|
|
7
|
+
* @param contractPath - Location of the unsupported operation in the compiled contract.
|
|
8
|
+
* @param declaration - Source declaration responsible for the operation.
|
|
9
|
+
* @param reason - Why an infrastructure-free evaluation cannot represent it.
|
|
10
|
+
*/
|
|
11
|
+
constructor(model, contractPath, declaration, reason) {
|
|
12
|
+
super(`UnsupportedProjectionOperation: ${model}, ${contractPath} (${declaration}): ${reason}`);
|
|
13
|
+
this.name = 'UnsupportedProjectionOperation';
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=UnsupportedProjectionOperation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnsupportedProjectionOperation.js","sourceRoot":"","sources":["../../../testing/projections/UnsupportedProjectionOperation.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,qGAAqG;AACrG,MAAM,OAAO,8BAA+B,SAAQ,KAAK;IACrD;;;;;OAKG;IACH,YAAY,KAAa,EAAE,YAAoB,EAAE,WAAmB,EAAE,MAAc;QAChF,KAAK,CAAC,mCAAmC,KAAK,KAAK,YAAY,KAAK,WAAW,MAAM,MAAM,EAAE,CAAC,CAAC;QAC/F,IAAI,CAAC,IAAI,GAAG,gCAAgC,CAAC;IACjD,CAAC;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Changed.d.ts","sourceRoot":"","sources":["../../../../../testing/projections/for_ProjectionCapabilities/given/Changed.ts"],"names":[],"mappings":"AAMA,qBAAa,OAAO;IAAG,IAAI,EAAG,MAAM,CAAC;IAAC,QAAQ,EAAG,MAAM,CAAC;IAAC,MAAM,EAAG,MAAM,EAAE,CAAC;IAAC,OAAO,EAAG,MAAM,CAAC;CAAE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
import { field } from '@cratis/fundamentals';
|
|
4
|
+
import { eventType } from '../../../../events/eventTypeDecorator.js';
|
|
5
|
+
export class Changed {
|
|
6
|
+
name;
|
|
7
|
+
quantity;
|
|
8
|
+
labels;
|
|
9
|
+
details;
|
|
10
|
+
}
|
|
11
|
+
field(String)(Changed.prototype, 'name');
|
|
12
|
+
field(Number)(Changed.prototype, 'quantity');
|
|
13
|
+
field(Array)(Changed.prototype, 'labels');
|
|
14
|
+
field(Object)(Changed.prototype, 'details');
|
|
15
|
+
eventType('capability-changed')(Changed);
|
|
16
|
+
//# sourceMappingURL=Changed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Changed.js","sourceRoot":"","sources":["../../../../../testing/projections/for_ProjectionCapabilities/given/Changed.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAErE,MAAM,OAAO,OAAO;IAAG,IAAI,CAAU;IAAC,QAAQ,CAAU;IAAC,MAAM,CAAY;IAAC,OAAO,CAAU;CAAE;AAC/F,KAAK,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AACzC,KAAK,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;AAC7C,KAAK,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;AAC1C,KAAK,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;AAC5C,SAAS,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Model.d.ts","sourceRoot":"","sources":["../../../../../testing/projections/for_ProjectionCapabilities/given/Model.ts"],"names":[],"mappings":"AAKA,qBAAa,KAAK;IAAG,EAAE,EAAG,MAAM,CAAC;IAAC,IAAI,EAAG,MAAM,CAAC;IAAC,QAAQ,EAAG,MAAM,CAAC;IAAC,KAAK,EAAG,MAAM,CAAC;IAAC,KAAK,EAAG,MAAM,CAAC;IAAC,MAAM,EAAG,MAAM,EAAE,CAAC;IAAC,OAAO,EAAG,MAAM,CAAC;CAAE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
import { field } from '@cratis/fundamentals';
|
|
4
|
+
export class Model {
|
|
5
|
+
id;
|
|
6
|
+
name;
|
|
7
|
+
quantity;
|
|
8
|
+
total;
|
|
9
|
+
state;
|
|
10
|
+
labels;
|
|
11
|
+
details;
|
|
12
|
+
}
|
|
13
|
+
field(String)(Model.prototype, 'id');
|
|
14
|
+
field(String)(Model.prototype, 'name');
|
|
15
|
+
field(Number)(Model.prototype, 'quantity');
|
|
16
|
+
field(Number)(Model.prototype, 'total');
|
|
17
|
+
field(String)(Model.prototype, 'state');
|
|
18
|
+
field(Array)(Model.prototype, 'labels');
|
|
19
|
+
field(Object)(Model.prototype, 'details');
|
|
20
|
+
//# sourceMappingURL=Model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Model.js","sourceRoot":"","sources":["../../../../../testing/projections/for_ProjectionCapabilities/given/Model.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE7C,MAAM,OAAO,KAAK;IAAG,EAAE,CAAU;IAAC,IAAI,CAAU;IAAC,QAAQ,CAAU;IAAC,KAAK,CAAU;IAAC,KAAK,CAAU;IAAC,MAAM,CAAY;IAAC,OAAO,CAAU;CAAE;AAC1I,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AACrC,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AACvC,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;AAC3C,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AACxC,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AACxC,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;AACxC,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Removed.d.ts","sourceRoot":"","sources":["../../../../../testing/projections/for_ProjectionCapabilities/given/Removed.ts"],"names":[],"mappings":"AAKA,qBAAa,OAAO;CAAG"}
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
import { eventType } from '../../../../events/eventTypeDecorator.js';
|
|
4
|
+
export class Removed {
|
|
5
|
+
}
|
|
6
|
+
eventType('capability-removed')(Removed);
|
|
7
|
+
//# sourceMappingURL=Removed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Removed.js","sourceRoot":"","sources":["../../../../../testing/projections/for_ProjectionCapabilities/given/Removed.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAErE,MAAM,OAAO,OAAO;CAAG;AACvB,SAAS,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Constructor } from '@cratis/fundamentals';
|
|
2
|
+
import { IProjectionBuilderFor } from '../../../../projections/declarative/IProjectionBuilderFor.js';
|
|
3
|
+
import { Model } from './Model.js';
|
|
4
|
+
export declare function compileModelBound(configure?: (model: typeof Model) => void, eventTypes?: Constructor[]): {
|
|
5
|
+
compiled: import("../../../../projections/CompiledProjectionDefinitions.js").CompiledProjectionDefinitions;
|
|
6
|
+
definition: import("@cratis/chronicle.contracts").ProjectionDefinition;
|
|
7
|
+
};
|
|
8
|
+
export declare function compileDeclarative(define: (builder: IProjectionBuilderFor<Model>) => void, eventTypes?: Constructor[]): {
|
|
9
|
+
compiled: import("../../../../projections/CompiledProjectionDefinitions.js").CompiledProjectionDefinitions;
|
|
10
|
+
definition: import("@cratis/chronicle.contracts").ProjectionDefinition;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=compile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../../../../testing/projections/for_ProjectionCapabilities/given/compile.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,8DAA8D,CAAC;AAMrG,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAUnC,wBAAgB,iBAAiB,CAAC,SAAS,GAAE,CAAC,KAAK,EAAE,OAAO,KAAK,KAAK,IAAe,EAAE,UAAU,GAAE,WAAW,EAAO;;;EAMpH;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,qBAAqB,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,UAAU,GAAE,WAAW,EAAO;;;EASzH"}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
import { projection } from '../../../../projections/declarative/projection.js';
|
|
4
|
+
import { fromEvent } from '../../../../projections/modelBound/fromEvent.js';
|
|
5
|
+
import { ProjectionDefinitionCompiler } from '../../../../projections/ProjectionDefinitionCompiler.js';
|
|
6
|
+
import { Changed } from './Changed.js';
|
|
7
|
+
import { Model } from './Model.js';
|
|
8
|
+
import { Removed } from './Removed.js';
|
|
9
|
+
function artifacts(model, projections, eventTypes) {
|
|
10
|
+
return {
|
|
11
|
+
readModels: [model], projections, eventTypes: [Changed, Removed, ...eventTypes],
|
|
12
|
+
globalForHandlers: [], reducers: [], reactors: [], seeders: [], constraints: [], webhooks: [], eventTypeMigrations: []
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export function compileModelBound(configure = () => { }, eventTypes = []) {
|
|
16
|
+
class Candidate extends Model {
|
|
17
|
+
}
|
|
18
|
+
fromEvent(Changed)(Candidate);
|
|
19
|
+
configure(Candidate);
|
|
20
|
+
const compiled = new ProjectionDefinitionCompiler(artifacts(Candidate, [], eventTypes), 'test-sink').compile([], [Candidate]);
|
|
21
|
+
return { compiled, definition: compiled.definitions[0] };
|
|
22
|
+
}
|
|
23
|
+
export function compileDeclarative(define, eventTypes = []) {
|
|
24
|
+
class Candidate extends Model {
|
|
25
|
+
}
|
|
26
|
+
class CandidateProjection {
|
|
27
|
+
define(builder) { define(builder); }
|
|
28
|
+
}
|
|
29
|
+
projection('capability-projection', Candidate)(CandidateProjection);
|
|
30
|
+
const compiled = new ProjectionDefinitionCompiler(artifacts(Candidate, [CandidateProjection], eventTypes), 'test-sink')
|
|
31
|
+
.compile([CandidateProjection], []);
|
|
32
|
+
return { compiled, definition: compiled.definitions[0] };
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=compile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compile.js","sourceRoot":"","sources":["../../../../../testing/projections/for_ProjectionCapabilities/given/compile.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAMrG,OAAO,EAAE,UAAU,EAAE,MAAM,mDAAmD,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,iDAAiD,CAAC;AAC5E,OAAO,EAAE,4BAA4B,EAAE,MAAM,yDAAyD,CAAC;AACvG,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,S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