@cratis/chronicle 6.72.0 → 6.72.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/testing/for_ReadModelScenario/when_stepping_with_children/given/compiled_projection.d.ts +51 -0
- package/dist/testing/for_ReadModelScenario/when_stepping_with_children/given/compiled_projection.d.ts.map +1 -0
- package/dist/testing/for_ReadModelScenario/when_stepping_with_children/given/compiled_projection.js +115 -0
- package/dist/testing/for_ReadModelScenario/when_stepping_with_children/given/compiled_projection.js.map +1 -0
- package/dist/testing/for_ReadModelScenario/when_stepping_with_children/given/lifecycle.d.ts +24 -0
- package/dist/testing/for_ReadModelScenario/when_stepping_with_children/given/lifecycle.d.ts.map +1 -0
- package/dist/testing/for_ReadModelScenario/when_stepping_with_children/given/lifecycle.js +34 -0
- package/dist/testing/for_ReadModelScenario/when_stepping_with_children/given/lifecycle.js.map +1 -0
- package/dist/testing/for_ReadModelScenario/when_stepping_with_children/given/oracle_input.d.ts +7 -0
- package/dist/testing/for_ReadModelScenario/when_stepping_with_children/given/oracle_input.d.ts.map +1 -0
- package/dist/testing/for_ReadModelScenario/when_stepping_with_children/given/oracle_input.js +33 -0
- package/dist/testing/for_ReadModelScenario/when_stepping_with_children/given/oracle_input.js.map +1 -0
- package/dist/testing/for_ReadModelScenario/when_subtracting_with_children/given/compiled_projection.d.ts +145 -0
- package/dist/testing/for_ReadModelScenario/when_subtracting_with_children/given/compiled_projection.d.ts.map +1 -0
- package/dist/testing/for_ReadModelScenario/when_subtracting_with_children/given/compiled_projection.js +142 -0
- package/dist/testing/for_ReadModelScenario/when_subtracting_with_children/given/compiled_projection.js.map +1 -0
- package/dist/testing/for_ReadModelScenario/when_subtracting_with_children/given/lifecycle.d.ts +24 -0
- package/dist/testing/for_ReadModelScenario/when_subtracting_with_children/given/lifecycle.d.ts.map +1 -0
- package/dist/testing/for_ReadModelScenario/when_subtracting_with_children/given/lifecycle.js +34 -0
- package/dist/testing/for_ReadModelScenario/when_subtracting_with_children/given/lifecycle.js.map +1 -0
- package/dist/testing/for_ReadModelScenario/when_subtracting_with_children/given/oracle_input.d.ts +7 -0
- package/dist/testing/for_ReadModelScenario/when_subtracting_with_children/given/oracle_input.d.ts.map +1 -0
- package/dist/testing/for_ReadModelScenario/when_subtracting_with_children/given/oracle_input.js +33 -0
- package/dist/testing/for_ReadModelScenario/when_subtracting_with_children/given/oracle_input.js.map +1 -0
- package/dist/testing/projections/ProjectionArithmeticChildrenCapabilities.d.ts.map +1 -1
- package/dist/testing/projections/ProjectionArithmeticChildrenCapabilities.js +3 -1
- package/dist/testing/projections/ProjectionArithmeticChildrenCapabilities.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/testing/for_ReadModelScenario/when_stepping_with_children/given/compiled_projection.ts +59 -0
- package/testing/for_ReadModelScenario/when_stepping_with_children/given/lifecycle.ts +38 -0
- package/testing/for_ReadModelScenario/when_stepping_with_children/given/oracle_input.ts +36 -0
- package/testing/for_ReadModelScenario/when_stepping_with_children/with_a_fluent_projection.spec.ts +30 -0
- package/testing/for_ReadModelScenario/when_stepping_with_children/with_legacy_decorators.legacy.spec.ts +56 -0
- package/testing/for_ReadModelScenario/when_stepping_with_children/with_standard_decorators.standard.spec.ts +58 -0
- package/testing/for_ReadModelScenario/when_subtracting_with_children/given/compiled_projection.ts +71 -0
- package/testing/for_ReadModelScenario/when_subtracting_with_children/given/lifecycle.ts +38 -0
- package/testing/for_ReadModelScenario/when_subtracting_with_children/given/oracle_input.ts +36 -0
- package/testing/for_ReadModelScenario/when_subtracting_with_children/with_a_fluent_projection.spec.ts +40 -0
- package/testing/for_ReadModelScenario/when_subtracting_with_children/with_legacy_decorators.legacy.spec.ts +50 -0
- package/testing/for_ReadModelScenario/when_subtracting_with_children/with_standard_decorators.standard.spec.ts +51 -0
- package/testing/projections/ProjectionArithmeticChildrenCapabilities.ts +2 -1
- package/testing/projections/for_ProjectionCapabilities/when_validating_add_with_children.spec.ts +1 -1
- package/testing/projections/for_ProjectionCapabilities/when_validating_count_with_children.spec.ts +11 -10
- package/testing/projections/for_ProjectionCapabilities/when_validating_steps_with_children.spec.ts +99 -0
- package/testing/projections/for_ProjectionCapabilities/when_validating_subtract_with_children.spec.ts +105 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { IProjectionBuilderFor } from '../../../../projections/declarative/IProjectionBuilderFor.js';
|
|
2
|
+
export type Operation = 'increment' | 'decrement';
|
|
3
|
+
export declare class Stepped {
|
|
4
|
+
readonly total: number;
|
|
5
|
+
constructor(total: number);
|
|
6
|
+
}
|
|
7
|
+
export declare class ItemChanged {
|
|
8
|
+
readonly itemId: string;
|
|
9
|
+
readonly name: string;
|
|
10
|
+
constructor(itemId: string, name: string);
|
|
11
|
+
}
|
|
12
|
+
export declare class ItemRemoved {
|
|
13
|
+
readonly itemId: string;
|
|
14
|
+
constructor(itemId: string);
|
|
15
|
+
}
|
|
16
|
+
export declare class Removed {
|
|
17
|
+
}
|
|
18
|
+
export declare class Item {
|
|
19
|
+
itemId: string;
|
|
20
|
+
name: string;
|
|
21
|
+
}
|
|
22
|
+
export declare class Totals {
|
|
23
|
+
id: string;
|
|
24
|
+
total: number;
|
|
25
|
+
items: Item[];
|
|
26
|
+
}
|
|
27
|
+
export declare const variants: {
|
|
28
|
+
name: string;
|
|
29
|
+
operation: Operation;
|
|
30
|
+
event: typeof Stepped;
|
|
31
|
+
model: typeof Totals;
|
|
32
|
+
artifacts: {
|
|
33
|
+
readModels: (typeof Totals)[];
|
|
34
|
+
projections: {
|
|
35
|
+
new (): {
|
|
36
|
+
define(builder: IProjectionBuilderFor<Totals>): void;
|
|
37
|
+
};
|
|
38
|
+
}[];
|
|
39
|
+
eventTypes: (typeof Stepped | typeof ItemChanged | typeof ItemRemoved | typeof Removed)[];
|
|
40
|
+
globalForHandlers: never[];
|
|
41
|
+
reducers: never[];
|
|
42
|
+
reactors: never[];
|
|
43
|
+
seeders: never[];
|
|
44
|
+
constraints: never[];
|
|
45
|
+
webhooks: never[];
|
|
46
|
+
eventTypeMigrations: never[];
|
|
47
|
+
};
|
|
48
|
+
compile: () => import("../../../../projections/CompiledProjectionDefinitions.js").CompiledProjectionDefinitions;
|
|
49
|
+
}[];
|
|
50
|
+
export declare const compile: () => import("../../../../projections/CompiledProjectionDefinitions.js").CompiledProjectionDefinitions;
|
|
51
|
+
//# sourceMappingURL=compiled_projection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compiled_projection.d.ts","sourceRoot":"","sources":["../../../../../testing/for_ReadModelScenario/when_stepping_with_children/given/compiled_projection.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8DAA8D,CAAC;AAI1G,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,WAAW,CAAC;AAClD,qBACa,OAAO;IACD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACtC,YAAY,KAAK,EAAE,MAAM,EAAyB;CACrD;AACD,qBACa,WAAW;IACL,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACrC,YAAY,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAA6C;CACxF;AACD,qBACa,WAAW;IACL,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACvC,YAAY,MAAM,EAAE,MAAM,EAA2B;CACxD;AACD,qBACa,OAAO;CAAG;AACvB,qBAAa,IAAI;IACE,MAAM,EAAG,MAAM,CAAC;IAChB,IAAI,EAAG,MAAM,CAAC;CAChC;AACD,qBAAa,MAAM;IACA,EAAE,EAAG,MAAM,CAAC;IACZ,KAAK,EAAG,MAAM,CAAC;IACc,KAAK,EAAG,IAAI,EAAE,CAAC;CAC9D;AAoBD,eAAO,MAAM,QAAQ;;;;;;;;;gCAhBG,qBAAqB,CAAC,MAAM,CAAC,GAAG,IAAI;;;;;;;;;;;;;GAgBQ,CAAC;AACrE,eAAO,MAAQ,OAAO,wGAAgB,CAAC"}
|
package/dist/testing/for_ReadModelScenario/when_stepping_with_children/given/compiled_projection.js
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
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
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
4
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
5
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
6
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
7
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
8
|
+
};
|
|
9
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
10
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
11
|
+
};
|
|
12
|
+
import { field } from '@cratis/fundamentals';
|
|
13
|
+
import { eventType } from '../../../../events/eventTypeDecorator.js';
|
|
14
|
+
import { projection } from '../../../../projections/declarative/projection.js';
|
|
15
|
+
import { ProjectionDefinitionCompiler } from '../../../../projections/ProjectionDefinitionCompiler.js';
|
|
16
|
+
let Stepped = class Stepped {
|
|
17
|
+
total;
|
|
18
|
+
constructor(total) { this.total = total; }
|
|
19
|
+
};
|
|
20
|
+
__decorate([
|
|
21
|
+
field(Number),
|
|
22
|
+
__metadata("design:type", Number)
|
|
23
|
+
], Stepped.prototype, "total", void 0);
|
|
24
|
+
Stepped = __decorate([
|
|
25
|
+
eventType('Stepped'),
|
|
26
|
+
__metadata("design:paramtypes", [Number])
|
|
27
|
+
], Stepped);
|
|
28
|
+
export { Stepped };
|
|
29
|
+
let ItemChanged = class ItemChanged {
|
|
30
|
+
itemId;
|
|
31
|
+
name;
|
|
32
|
+
constructor(itemId, name) { this.itemId = itemId; this.name = name; }
|
|
33
|
+
};
|
|
34
|
+
__decorate([
|
|
35
|
+
field(String),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], ItemChanged.prototype, "itemId", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
field(String),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], ItemChanged.prototype, "name", void 0);
|
|
42
|
+
ItemChanged = __decorate([
|
|
43
|
+
eventType('ItemChanged'),
|
|
44
|
+
__metadata("design:paramtypes", [String, String])
|
|
45
|
+
], ItemChanged);
|
|
46
|
+
export { ItemChanged };
|
|
47
|
+
let ItemRemoved = class ItemRemoved {
|
|
48
|
+
itemId;
|
|
49
|
+
constructor(itemId) { this.itemId = itemId; }
|
|
50
|
+
};
|
|
51
|
+
__decorate([
|
|
52
|
+
field(String),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], ItemRemoved.prototype, "itemId", void 0);
|
|
55
|
+
ItemRemoved = __decorate([
|
|
56
|
+
eventType('ItemRemoved'),
|
|
57
|
+
__metadata("design:paramtypes", [String])
|
|
58
|
+
], ItemRemoved);
|
|
59
|
+
export { ItemRemoved };
|
|
60
|
+
let Removed = class Removed {
|
|
61
|
+
};
|
|
62
|
+
Removed = __decorate([
|
|
63
|
+
eventType('Removed')
|
|
64
|
+
], Removed);
|
|
65
|
+
export { Removed };
|
|
66
|
+
export class Item {
|
|
67
|
+
itemId;
|
|
68
|
+
name;
|
|
69
|
+
}
|
|
70
|
+
__decorate([
|
|
71
|
+
field(String),
|
|
72
|
+
__metadata("design:type", String)
|
|
73
|
+
], Item.prototype, "itemId", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
field(String),
|
|
76
|
+
__metadata("design:type", String)
|
|
77
|
+
], Item.prototype, "name", void 0);
|
|
78
|
+
export class Totals {
|
|
79
|
+
id;
|
|
80
|
+
total;
|
|
81
|
+
items;
|
|
82
|
+
}
|
|
83
|
+
__decorate([
|
|
84
|
+
field(String),
|
|
85
|
+
__metadata("design:type", String)
|
|
86
|
+
], Totals.prototype, "id", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
field(Number),
|
|
89
|
+
__metadata("design:type", Number)
|
|
90
|
+
], Totals.prototype, "total", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
field(Array, { genericArguments: [Item] }),
|
|
93
|
+
__metadata("design:type", Array)
|
|
94
|
+
], Totals.prototype, "items", void 0);
|
|
95
|
+
function variant(operation) {
|
|
96
|
+
class TotalsProjection {
|
|
97
|
+
define(builder) {
|
|
98
|
+
builder.from(Stepped, from => from[operation](model => model.total))
|
|
99
|
+
.children(model => model.items, child => child.identifiedBy(item => item.itemId)
|
|
100
|
+
.from(ItemChanged, from => from.usingKey(value => value.itemId))
|
|
101
|
+
.removedWith(ItemRemoved, removal => removal.usingKey(value => value.itemId)))
|
|
102
|
+
.removedWith(Removed);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
const name = `${operation}-children-fluent`;
|
|
106
|
+
projection(name, Totals)(TotalsProjection);
|
|
107
|
+
const artifacts = {
|
|
108
|
+
readModels: [Totals], projections: [TotalsProjection], eventTypes: [Stepped, ItemChanged, ItemRemoved, Removed],
|
|
109
|
+
globalForHandlers: [], reducers: [], reactors: [], seeders: [], constraints: [], webhooks: [], eventTypeMigrations: []
|
|
110
|
+
};
|
|
111
|
+
return { name, operation, event: Stepped, model: Totals, artifacts, compile: () => new ProjectionDefinitionCompiler(artifacts, 'test').compile([TotalsProjection], []) };
|
|
112
|
+
}
|
|
113
|
+
export const variants = [variant('increment'), variant('decrement')];
|
|
114
|
+
export const { compile } = variants[0];
|
|
115
|
+
//# sourceMappingURL=compiled_projection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compiled_projection.js","sourceRoot":"","sources":["../../../../../testing/for_ReadModelScenario/when_stepping_with_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IAC5C,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAC3C,MAAM,SAAS,GAAG;QACd,UAAU,EAAE,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC,gBAAgB,CAAC,EAAE,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,CAAC;QAC/G,iBAAiB,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,mBAAmB,EAAE,EAAE;KACtF,CAAC;IACrC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,4BAA4B,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,gBAAgB,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;AAC7K,CAAC;AACD,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;AACrE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ReadModelScenario } from '../../../ReadModelScenario.js';
|
|
2
|
+
type SteppedParent = {
|
|
3
|
+
id: string;
|
|
4
|
+
total: number;
|
|
5
|
+
items: Array<{
|
|
6
|
+
itemId: string;
|
|
7
|
+
name: string;
|
|
8
|
+
}>;
|
|
9
|
+
};
|
|
10
|
+
export declare function history(step?: (total: number) => object): {
|
|
11
|
+
source: string;
|
|
12
|
+
event: object;
|
|
13
|
+
}[];
|
|
14
|
+
export declare function lifecycle<T extends SteppedParent>(scenario: ReadModelScenario<T>): Promise<{
|
|
15
|
+
first: T;
|
|
16
|
+
other: T;
|
|
17
|
+
remaining: T;
|
|
18
|
+
removed: T | null;
|
|
19
|
+
surviving: T;
|
|
20
|
+
recreated: T;
|
|
21
|
+
repeated: T;
|
|
22
|
+
}>;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=lifecycle.d.ts.map
|
package/dist/testing/for_ReadModelScenario/when_stepping_with_children/given/lifecycle.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../../../testing/for_ReadModelScenario/when_stepping_with_children/given/lifecycle.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAGvE,KAAK,aAAa,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC;AAEnG,wBAAgB,OAAO,CAAC,IAAI,GAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAoC;;;IAUpF;AAED,wBAAsB,SAAS,CAAC,CAAC,SAAS,aAAa,EAAE,QAAQ,EAAE,iBAAiB,CAAC,CAAC,CAAC;;;;;;;;GAiBtF"}
|
|
@@ -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 { Stepped, ItemChanged, ItemRemoved, Removed } from './compiled_projection.js';
|
|
4
|
+
export function history(step = total => new Stepped(total)) {
|
|
5
|
+
return [
|
|
6
|
+
{ source: 'A', event: step(2.5) }, { source: 'A', event: step(-1) },
|
|
7
|
+
{ source: 'A', event: new ItemChanged('one', 'first') }, { source: 'A', event: new ItemChanged('two', 'second') },
|
|
8
|
+
{ source: 'A', event: new ItemChanged('one', 'updated') }, { source: 'A', event: step(0) },
|
|
9
|
+
{ source: 'B', event: step(8) }, { source: 'B', event: new ItemChanged('one', 'independent') },
|
|
10
|
+
{ source: 'A', event: new ItemRemoved('one') }, { source: 'A', event: new ItemRemoved('unknown') },
|
|
11
|
+
{ source: 'A', event: new Removed() }, { source: 'A', event: step(4.5) },
|
|
12
|
+
{ source: 'A', event: new ItemChanged('new', 'recreated') }
|
|
13
|
+
];
|
|
14
|
+
}
|
|
15
|
+
export async function lifecycle(scenario) {
|
|
16
|
+
const events = history();
|
|
17
|
+
const seed = (start, end) => {
|
|
18
|
+
for (const { source, event } of events.slice(start, end))
|
|
19
|
+
scenario.given.forEventSource(source).events(event);
|
|
20
|
+
};
|
|
21
|
+
seed(0, 8);
|
|
22
|
+
const first = (await scenario.instanceForEventSourceId('A'));
|
|
23
|
+
const other = (await scenario.instanceForEventSourceId('B'));
|
|
24
|
+
seed(8, 10);
|
|
25
|
+
const remaining = (await scenario.instanceForEventSourceId('A'));
|
|
26
|
+
seed(10, 11);
|
|
27
|
+
const removed = await scenario.instanceForEventSourceId('A');
|
|
28
|
+
const surviving = (await scenario.instanceForEventSourceId('B'));
|
|
29
|
+
seed(11, 13);
|
|
30
|
+
const recreated = (await scenario.instanceForEventSourceId('A'));
|
|
31
|
+
const repeated = (await scenario.instanceForEventSourceId('A'));
|
|
32
|
+
return { first, other, remaining, removed, surviving, recreated, repeated };
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=lifecycle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle.js","sourceRoot":"","sources":["../../../../../testing/for_ReadModelScenario/when_stepping_with_children/given/lifecycle.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAGrG,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAItF,M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O,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;AAChF,CAAC"}
|
package/dist/testing/for_ReadModelScenario/when_stepping_with_children/given/oracle_input.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oracle_input.d.ts","sourceRoot":"","sources":["../../../../../testing/for_ReadModelScenario/when_stepping_with_children/given/oracle_input.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAMxD,wBAAgB,iBAAiB,CAAC,SAAS,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,KAAK,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,OAAO,CAAA;CAAE,QAsB5H"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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 { readFileSync } from 'node:fs';
|
|
4
|
+
import { JsonSerializer } from '@cratis/fundamentals';
|
|
5
|
+
import { chai } from 'vitest';
|
|
6
|
+
import { getEventTypeMetadata } from '../../../../events/eventTypeDecorator.js';
|
|
7
|
+
import { history } from './lifecycle.js';
|
|
8
|
+
chai.should();
|
|
9
|
+
function should(value) { return value.should; }
|
|
10
|
+
export function assertOracleInput(candidate) {
|
|
11
|
+
const fixture = JSON.parse(readFileSync(new URL(`../../../projections/fixtures/${candidate.name}.json`, import.meta.url), 'utf8'));
|
|
12
|
+
const compiled = candidate.compile();
|
|
13
|
+
const { LastUpdated, ...wire } = compiled.definitions[0];
|
|
14
|
+
should(LastUpdated).deep.equal(fixture.compilerLastUpdated);
|
|
15
|
+
should(JSON.parse(JSON.stringify({ ...wire, NoAutoMapProperties: Object.hasOwn(wire, 'NoAutoMapProperties') ? wire.NoAutoMapProperties : [] }))).deep.equal(fixture.wireDefinition);
|
|
16
|
+
should(JSON.parse(compiled.readModels[0].Schema)).deep.equal(fixture.readModel.schema);
|
|
17
|
+
const schemas = [...compiled.eventSchemas.get(compiled.definitions[0]).values()].map(entry => {
|
|
18
|
+
should(entry.eventType.Tombstone).be.false;
|
|
19
|
+
const { Tombstone: _falseFlag, ...eventType } = entry.eventType;
|
|
20
|
+
return { ...entry, eventType };
|
|
21
|
+
});
|
|
22
|
+
should(schemas).deep.equal(fixture.eventSchemas);
|
|
23
|
+
const events = history(amount => new candidate.event(amount));
|
|
24
|
+
should(events.length).equal(fixture.events.length);
|
|
25
|
+
events.forEach(({ source, event }, index) => {
|
|
26
|
+
const captured = fixture.events[index];
|
|
27
|
+
const type = getEventTypeMetadata(event.constructor).eventType;
|
|
28
|
+
should(captured.context.eventType).deep.equal({ Id: type.id.value, Generation: type.generation.value });
|
|
29
|
+
should(captured.context.eventSourceId).equal(source);
|
|
30
|
+
should(captured.content).deep.equal(JSON.parse(JsonSerializer.serialize(event)));
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=oracle_input.js.map
|
package/dist/testing/for_ReadModelScenario/when_stepping_with_children/given/oracle_input.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oracle_input.js","sourceRoot":"","sources":["../../../../../testing/for_ReadModelScenario/when_stepping_with_children/given/oracle_input.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,IAAI,EAAkB,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAEhF,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,IAAI,CAAC,MAAM,EAAE,CAAC;AACd,SAAS,MAAM,CAAC,KAAc,IAAe,OAAQ,KAA+B,CAAC,MAA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jectionBuilderFor } from '../../../../projections/declarative/IProjectionBuilderFor.js';
|
|
2
|
+
export declare class Subtracted {
|
|
3
|
+
readonly amount: number;
|
|
4
|
+
constructor(amount: number);
|
|
5
|
+
}
|
|
6
|
+
declare class TotalSubtracted {
|
|
7
|
+
readonly total: number;
|
|
8
|
+
constructor(total: number);
|
|
9
|
+
}
|
|
10
|
+
declare class UnderscoreSubtracted {
|
|
11
|
+
readonly _amount: number;
|
|
12
|
+
constructor(_amount: number);
|
|
13
|
+
}
|
|
14
|
+
export declare class ItemChanged {
|
|
15
|
+
readonly itemId: string;
|
|
16
|
+
readonly name: string;
|
|
17
|
+
constructor(itemId: string, name: string);
|
|
18
|
+
}
|
|
19
|
+
export declare class ItemRemoved {
|
|
20
|
+
readonly itemId: string;
|
|
21
|
+
constructor(itemId: string);
|
|
22
|
+
}
|
|
23
|
+
export declare class Removed {
|
|
24
|
+
}
|
|
25
|
+
export declare class Item {
|
|
26
|
+
itemId: string;
|
|
27
|
+
name: string;
|
|
28
|
+
}
|
|
29
|
+
export declare class Totals {
|
|
30
|
+
id: string;
|
|
31
|
+
total: number;
|
|
32
|
+
items: Item[];
|
|
33
|
+
}
|
|
34
|
+
export declare const variants: ({
|
|
35
|
+
name: string;
|
|
36
|
+
event: new (amount: number) => Subtracted;
|
|
37
|
+
model: typeof Totals;
|
|
38
|
+
artifacts: {
|
|
39
|
+
readModels: (typeof Totals)[];
|
|
40
|
+
projections: {
|
|
41
|
+
new (): {
|
|
42
|
+
define(builder: IProjectionBuilderFor<Totals>): void;
|
|
43
|
+
};
|
|
44
|
+
}[];
|
|
45
|
+
eventTypes: (typeof ItemChanged | typeof ItemRemoved | typeof Removed | (new (amount: number) => Subtracted))[];
|
|
46
|
+
globalForHandlers: never[];
|
|
47
|
+
reducers: never[];
|
|
48
|
+
reactors: never[];
|
|
49
|
+
seeders: never[];
|
|
50
|
+
constraints: never[];
|
|
51
|
+
webhooks: never[];
|
|
52
|
+
eventTypeMigrations: never[];
|
|
53
|
+
};
|
|
54
|
+
compile: () => import("../../../../projections/CompiledProjectionDefinitions.js").CompiledProjectionDefinitions;
|
|
55
|
+
} | {
|
|
56
|
+
name: string;
|
|
57
|
+
event: new (amount: number) => TotalSubtracted;
|
|
58
|
+
model: typeof Totals;
|
|
59
|
+
artifacts: {
|
|
60
|
+
readModels: (typeof Totals)[];
|
|
61
|
+
projections: {
|
|
62
|
+
new (): {
|
|
63
|
+
define(builder: IProjectionBuilderFor<Totals>): void;
|
|
64
|
+
};
|
|
65
|
+
}[];
|
|
66
|
+
eventTypes: (typeof ItemChanged | typeof ItemRemoved | typeof Removed | (new (amount: number) => TotalSubtracted))[];
|
|
67
|
+
globalForHandlers: never[];
|
|
68
|
+
reducers: never[];
|
|
69
|
+
reactors: never[];
|
|
70
|
+
seeders: never[];
|
|
71
|
+
constraints: never[];
|
|
72
|
+
webhooks: never[];
|
|
73
|
+
eventTypeMigrations: never[];
|
|
74
|
+
};
|
|
75
|
+
compile: () => import("../../../../projections/CompiledProjectionDefinitions.js").CompiledProjectionDefinitions;
|
|
76
|
+
} | {
|
|
77
|
+
name: string;
|
|
78
|
+
event: new (amount: number) => UnderscoreSubtracted;
|
|
79
|
+
model: typeof Totals;
|
|
80
|
+
artifacts: {
|
|
81
|
+
readModels: (typeof Totals)[];
|
|
82
|
+
projections: {
|
|
83
|
+
new (): {
|
|
84
|
+
define(builder: IProjectionBuilderFor<Totals>): void;
|
|
85
|
+
};
|
|
86
|
+
}[];
|
|
87
|
+
eventTypes: (typeof ItemChanged | typeof ItemRemoved | typeof Removed | (new (amount: number) => UnderscoreSubtracted))[];
|
|
88
|
+
globalForHandlers: never[];
|
|
89
|
+
reducers: never[];
|
|
90
|
+
reactors: never[];
|
|
91
|
+
seeders: never[];
|
|
92
|
+
constraints: never[];
|
|
93
|
+
webhooks: never[];
|
|
94
|
+
eventTypeMigrations: never[];
|
|
95
|
+
};
|
|
96
|
+
compile: () => import("../../../../projections/CompiledProjectionDefinitions.js").CompiledProjectionDefinitions;
|
|
97
|
+
})[];
|
|
98
|
+
export declare const artifacts: {
|
|
99
|
+
readModels: (typeof Totals)[];
|
|
100
|
+
projections: {
|
|
101
|
+
new (): {
|
|
102
|
+
define(builder: IProjectionBuilderFor<Totals>): void;
|
|
103
|
+
};
|
|
104
|
+
}[];
|
|
105
|
+
eventTypes: (typeof ItemChanged | typeof ItemRemoved | typeof Removed | (new (amount: number) => Subtracted))[];
|
|
106
|
+
globalForHandlers: never[];
|
|
107
|
+
reducers: never[];
|
|
108
|
+
reactors: never[];
|
|
109
|
+
seeders: never[];
|
|
110
|
+
constraints: never[];
|
|
111
|
+
webhooks: never[];
|
|
112
|
+
eventTypeMigrations: never[];
|
|
113
|
+
} | {
|
|
114
|
+
readModels: (typeof Totals)[];
|
|
115
|
+
projections: {
|
|
116
|
+
new (): {
|
|
117
|
+
define(builder: IProjectionBuilderFor<Totals>): void;
|
|
118
|
+
};
|
|
119
|
+
}[];
|
|
120
|
+
eventTypes: (typeof ItemChanged | typeof ItemRemoved | typeof Removed | (new (amount: number) => TotalSubtracted))[];
|
|
121
|
+
globalForHandlers: never[];
|
|
122
|
+
reducers: never[];
|
|
123
|
+
reactors: never[];
|
|
124
|
+
seeders: never[];
|
|
125
|
+
constraints: never[];
|
|
126
|
+
webhooks: never[];
|
|
127
|
+
eventTypeMigrations: never[];
|
|
128
|
+
} | {
|
|
129
|
+
readModels: (typeof Totals)[];
|
|
130
|
+
projections: {
|
|
131
|
+
new (): {
|
|
132
|
+
define(builder: IProjectionBuilderFor<Totals>): void;
|
|
133
|
+
};
|
|
134
|
+
}[];
|
|
135
|
+
eventTypes: (typeof ItemChanged | typeof ItemRemoved | typeof Removed | (new (amount: number) => UnderscoreSubtracted))[];
|
|
136
|
+
globalForHandlers: never[];
|
|
137
|
+
reducers: never[];
|
|
138
|
+
reactors: never[];
|
|
139
|
+
seeders: never[];
|
|
140
|
+
constraints: never[];
|
|
141
|
+
webhooks: never[];
|
|
142
|
+
eventTypeMigrations: never[];
|
|
143
|
+
}, compile: (() => import("../../../../projections/CompiledProjectionDefinitions.js").CompiledProjectionDefinitions) | (() => import("../../../../projections/CompiledProjectionDefinitions.js").CompiledProjectionDefinitions) | (() => import("../../../../projections/CompiledProjectionDefinitions.js").CompiledProjectionDefinitions);
|
|
144
|
+
export {};
|
|
145
|
+
//# sourceMappingURL=compiled_projection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compiled_projection.d.ts","sourceRoot":"","sources":["../../../../../testing/for_ReadModelScenario/when_subtracting_with_children/given/compiled_projection.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8DAA8D,CAAC;AAI1G,qBACa,UAAU;IACJ,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACvC,YAAY,MAAM,EAAE,MAAM,EAA2B;CACxD;AACD,cACM,eAAe;IACF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACtC,YAAY,KAAK,EAAE,MAAM,EAAyB;CACrD;AACD,cACM,oBAAoB;IACP,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACxC,YAAY,OAAO,EAAE,MAAM,EAA6B;CAC3D;AACD,qBACa,WAAW;IACL,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACrC,YAAY,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAA6C;CACxF;AACD,qBACa,WAAW;IACL,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACvC,YAAY,MAAM,EAAE,MAAM,EAA2B;CACxD;AACD,qBACa,OAAO;CAAG;AACvB,qBAAa,IAAI;IACE,MAAM,EAAG,MAAM,CAAC;IAChB,IAAI,EAAG,MAAM,CAAC;CAChC;AACD,qBAAa,MAAM;IACA,EAAE,EAAG,MAAM,CAAC;IACZ,KAAK,EAAG,MAAM,CAAC;IACc,KAAK,EAAG,IAAI,EAAE,CAAC;CAC9D;AAmBD,eAAO,MAAM,QAAQ;;wBAjBgD,MAAM;;;;;;gCAEnD,qBAAqB,CAAC,MAAM,CAAC,GAAG,IAAI;;;;;;;;;;;;;;;wBAFS,MAAM;;;;;;gCAEnD,qBAAqB,CAAC,MAAM,CAAC,GAAG,IAAI;;;;;;;;;;;;;;;wBAFS,MAAM;;;;;;gCAEnD,qBAAqB,CAAC,MAAM,CAAC,GAAG,IAAI;;;;;;;;;;;;;IAmB3D,CAAC;AACF,eAAO,MAAQ,SAAS;;;;4BApBA,qBAAqB,CAAC,MAAM,CAAC,GAAG,IAAI;;;0FAFS,MAAM;;;;;;;;;;;;4BAEnD,qBAAqB,CAAC,MAAM,CAAC,GAAG,IAAI;;;0FAFS,MAAM;;;;;;;;;;;;4BAEnD,qBAAqB,CAAC,MAAM,CAAC,GAAG,IAAI;;;0FAFS,MAAM;;;;;;;;GAsBjD,OAAO,gUAAgB,CAAC"}
|
|
@@ -0,0 +1,142 @@
|
|
|
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
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
4
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
5
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
6
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
7
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
8
|
+
};
|
|
9
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
10
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
11
|
+
};
|
|
12
|
+
import { field } from '@cratis/fundamentals';
|
|
13
|
+
import { eventType } from '../../../../events/eventTypeDecorator.js';
|
|
14
|
+
import { projection } from '../../../../projections/declarative/projection.js';
|
|
15
|
+
import { ProjectionDefinitionCompiler } from '../../../../projections/ProjectionDefinitionCompiler.js';
|
|
16
|
+
let Subtracted = class Subtracted {
|
|
17
|
+
amount;
|
|
18
|
+
constructor(amount) { this.amount = amount; }
|
|
19
|
+
};
|
|
20
|
+
__decorate([
|
|
21
|
+
field(Number),
|
|
22
|
+
__metadata("design:type", Number)
|
|
23
|
+
], Subtracted.prototype, "amount", void 0);
|
|
24
|
+
Subtracted = __decorate([
|
|
25
|
+
eventType('Subtracted'),
|
|
26
|
+
__metadata("design:paramtypes", [Number])
|
|
27
|
+
], Subtracted);
|
|
28
|
+
export { Subtracted };
|
|
29
|
+
let TotalSubtracted = class TotalSubtracted {
|
|
30
|
+
total;
|
|
31
|
+
constructor(total) { this.total = total; }
|
|
32
|
+
};
|
|
33
|
+
__decorate([
|
|
34
|
+
field(Number),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], TotalSubtracted.prototype, "total", void 0);
|
|
37
|
+
TotalSubtracted = __decorate([
|
|
38
|
+
eventType('TotalSubtracted'),
|
|
39
|
+
__metadata("design:paramtypes", [Number])
|
|
40
|
+
], TotalSubtracted);
|
|
41
|
+
let UnderscoreSubtracted = class UnderscoreSubtracted {
|
|
42
|
+
_amount;
|
|
43
|
+
constructor(_amount) { this._amount = _amount; }
|
|
44
|
+
};
|
|
45
|
+
__decorate([
|
|
46
|
+
field(Number),
|
|
47
|
+
__metadata("design:type", Number)
|
|
48
|
+
], UnderscoreSubtracted.prototype, "_amount", void 0);
|
|
49
|
+
UnderscoreSubtracted = __decorate([
|
|
50
|
+
eventType('UnderscoreSubtracted'),
|
|
51
|
+
__metadata("design:paramtypes", [Number])
|
|
52
|
+
], UnderscoreSubtracted);
|
|
53
|
+
let ItemChanged = class ItemChanged {
|
|
54
|
+
itemId;
|
|
55
|
+
name;
|
|
56
|
+
constructor(itemId, name) { this.itemId = itemId; this.name = name; }
|
|
57
|
+
};
|
|
58
|
+
__decorate([
|
|
59
|
+
field(String),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], ItemChanged.prototype, "itemId", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
field(String),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], ItemChanged.prototype, "name", void 0);
|
|
66
|
+
ItemChanged = __decorate([
|
|
67
|
+
eventType('ItemChanged'),
|
|
68
|
+
__metadata("design:paramtypes", [String, String])
|
|
69
|
+
], ItemChanged);
|
|
70
|
+
export { ItemChanged };
|
|
71
|
+
let ItemRemoved = class ItemRemoved {
|
|
72
|
+
itemId;
|
|
73
|
+
constructor(itemId) { this.itemId = itemId; }
|
|
74
|
+
};
|
|
75
|
+
__decorate([
|
|
76
|
+
field(String),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], ItemRemoved.prototype, "itemId", void 0);
|
|
79
|
+
ItemRemoved = __decorate([
|
|
80
|
+
eventType('ItemRemoved'),
|
|
81
|
+
__metadata("design:paramtypes", [String])
|
|
82
|
+
], ItemRemoved);
|
|
83
|
+
export { ItemRemoved };
|
|
84
|
+
let Removed = class Removed {
|
|
85
|
+
};
|
|
86
|
+
Removed = __decorate([
|
|
87
|
+
eventType('Removed')
|
|
88
|
+
], Removed);
|
|
89
|
+
export { Removed };
|
|
90
|
+
export class Item {
|
|
91
|
+
itemId;
|
|
92
|
+
name;
|
|
93
|
+
}
|
|
94
|
+
__decorate([
|
|
95
|
+
field(String),
|
|
96
|
+
__metadata("design:type", String)
|
|
97
|
+
], Item.prototype, "itemId", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
field(String),
|
|
100
|
+
__metadata("design:type", String)
|
|
101
|
+
], Item.prototype, "name", void 0);
|
|
102
|
+
export class Totals {
|
|
103
|
+
id;
|
|
104
|
+
total;
|
|
105
|
+
items;
|
|
106
|
+
}
|
|
107
|
+
__decorate([
|
|
108
|
+
field(String),
|
|
109
|
+
__metadata("design:type", String)
|
|
110
|
+
], Totals.prototype, "id", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
field(Number),
|
|
113
|
+
__metadata("design:type", Number)
|
|
114
|
+
], Totals.prototype, "total", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
field(Array, { genericArguments: [Item] }),
|
|
117
|
+
__metadata("design:type", Array)
|
|
118
|
+
], Totals.prototype, "items", void 0);
|
|
119
|
+
function variant(name, event, operand) {
|
|
120
|
+
class TotalsProjection {
|
|
121
|
+
define(builder) {
|
|
122
|
+
builder.from(event, from => from.subtract(model => model.total).with(operand))
|
|
123
|
+
.children(model => model.items, child => child.identifiedBy(item => item.itemId)
|
|
124
|
+
.from(ItemChanged, from => from.usingKey(value => value.itemId))
|
|
125
|
+
.removedWith(ItemRemoved, removal => removal.usingKey(value => value.itemId)))
|
|
126
|
+
.removedWith(Removed);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
projection(name, Totals)(TotalsProjection);
|
|
130
|
+
const artifacts = {
|
|
131
|
+
readModels: [Totals], projections: [TotalsProjection], eventTypes: [event, ItemChanged, ItemRemoved, Removed],
|
|
132
|
+
globalForHandlers: [], reducers: [], reactors: [], seeders: [], constraints: [], webhooks: [], eventTypeMigrations: []
|
|
133
|
+
};
|
|
134
|
+
return { name, event, model: Totals, artifacts, compile: () => new ProjectionDefinitionCompiler(artifacts, 'test').compile([TotalsProjection], []) };
|
|
135
|
+
}
|
|
136
|
+
export const variants = [
|
|
137
|
+
variant('subtract-children-lifecycle', Subtracted, event => event.amount),
|
|
138
|
+
variant('subtract-children-same-property', TotalSubtracted, event => event.total),
|
|
139
|
+
variant('subtract-children-leading-underscore', UnderscoreSubtracted, event => event._amount)
|
|
140
|
+
];
|
|
141
|
+
export const { artifacts, compile } = variants[0];
|
|
142
|
+
//# sourceMappingURL=compiled_projection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compiled_projection.js","sourceRoot":"","sources":["../../../../../testing/for_ReadModelScenario/when_subtracting_with_children/given/compiled_projection.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;;;;;;;;;;AAErG,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAErE,OAAO,EAAE,UAAU,EAAE,MAAM,mDAAmD,CAAC;AAC/E,OAAO,EAAE,4BAA4B,EAAE,MAAM,yDAAyD,CAAC;AAGhG,IAAM,UAAU,GAAhB,MAAM,UAAU;IACK,MAAM,CAAS;IACvC,YAAY,MAAc,IAAI,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC;CACxD,CAAA;AAF2B;IAAvB,KAAK,CAAC,MAAM,CAAC;;0CAAyB;AAD9B,UAAU;IADtB,SAAS,CAAC,YAAY,CAAC;;GACX,UAAU,CAGtB;;AACD,IACM,eAAe,GADrB,MACM,eAAe;IACO,KAAK,CAAS;IACtC,YAAY,KAAa,IAAI,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC;CACrD,CAAA;AAF2B;IAAvB,KAAK,CAAC,MAAM,CAAC;;8CAAwB;AADpC,eAAe;IADpB,SAAS,CAAC,iBAAiB,CAAC;;GACvB,eAAe,CAGpB;AACD,IACM,oBAAoB,GAD1B,MACM,oBAAoB;IACE,OAAO,CAAS;IACxC,YAAY,OAAe,IAAI,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC;CAC3D,CAAA;AAF2B;IAAvB,KAAK,CAAC,MAAM,CAAC;;qDAA0B;AADtC,oBAAoB;IADzB,SAAS,CAAC,sBAAsB,CAAC;;GAC5B,oBAAoB,CAGzB;AAEM,IAAM,WAAW,GAAjB,MAAM,WAAW;IACI,MAAM,CAAS;IACf,IAAI,CAAS;IACrC,YAAY,MAAc,EAAE,IAAY,IAAI,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,I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,MAAM,QAAQ,GAAG;IACpB,OAAO,CAAC,6BAA6B,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC;IACzE,OAAO,CAAC,iCAAiC,EAAE,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;IACjF,OAAO,CAAC,sCAAsC,EAAE,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;CAChG,CAAC;AACF,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC"}
|
package/dist/testing/for_ReadModelScenario/when_subtracting_with_children/given/lifecycle.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ReadModelScenario } from '../../../ReadModelScenario.js';
|
|
2
|
+
type SubtractedParent = {
|
|
3
|
+
id: string;
|
|
4
|
+
total: number;
|
|
5
|
+
items: Array<{
|
|
6
|
+
itemId: string;
|
|
7
|
+
name: string;
|
|
8
|
+
}>;
|
|
9
|
+
};
|
|
10
|
+
export declare function history(subtract?: (amount: number) => object): {
|
|
11
|
+
source: string;
|
|
12
|
+
event: object;
|
|
13
|
+
}[];
|
|
14
|
+
export declare function lifecycle<T extends SubtractedParent>(scenario: ReadModelScenario<T>): Promise<{
|
|
15
|
+
first: T;
|
|
16
|
+
other: T;
|
|
17
|
+
remaining: T;
|
|
18
|
+
removed: T | null;
|
|
19
|
+
surviving: T;
|
|
20
|
+
recreated: T;
|
|
21
|
+
repeated: T;
|
|
22
|
+
}>;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=lifecycle.d.ts.map
|
package/dist/testing/for_ReadModelScenario/when_subtracting_with_children/given/lifecycle.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../../../testing/for_ReadModelScenario/when_subtracting_with_children/given/lifecycle.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAGvE,KAAK,gBAAgB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC;AAEtG,wBAAgB,OAAO,CAAC,QAAQ,GAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAyC;;;IAU9F;AAED,wBAAsB,SAAS,CAAC,CAAC,SAAS,gBAAgB,EAAE,QAAQ,EAAE,iBAAiB,CAAC,CAAC,CAAC;;;;;;;;GAiBzF"}
|