@auto-engineer/server-generator-apollo-emmett 0.21.0 → 0.22.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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +20 -0
- package/dist/src/codegen/extract/data-sink.js +2 -2
- package/dist/src/codegen/extract/data-sink.js.map +1 -1
- package/dist/src/codegen/extract/projection.js +2 -2
- package/dist/src/codegen/extract/projection.js.map +1 -1
- package/dist/src/codegen/extract/states.d.ts.map +1 -1
- package/dist/src/codegen/extract/states.js +5 -4
- package/dist/src/codegen/extract/states.js.map +1 -1
- package/dist/src/codegen/scaffoldFromSchema.js +1 -1
- package/dist/src/codegen/scaffoldFromSchema.js.map +1 -1
- package/dist/src/codegen/templates/command/decide.specs.ts +33 -31
- package/dist/src/codegen/templates/command/decide.ts.ejs +1 -1
- package/dist/src/codegen/templates/command/handle.specs.ts +46 -42
- package/dist/src/codegen/templates/command/handle.ts.ejs +2 -2
- package/dist/src/codegen/templates/command/mutation.resolver.specs.ts +12 -10
- package/dist/src/codegen/templates/command/register.specs.ts +13 -11
- package/dist/src/codegen/templates/query/projection.specs.specs.ts +64 -54
- package/dist/src/codegen/templates/query/projection.specs.ts +56 -48
- package/dist/src/codegen/templates/query/projection.specs.ts.ejs +1 -1
- package/dist/src/codegen/templates/query/projection.ts.ejs +10 -10
- package/dist/src/codegen/templates/query/query.resolver.specs.ts +92 -78
- package/dist/src/codegen/templates/query/query.resolver.ts.ejs +2 -2
- package/dist/src/codegen/templates/query/state.specs.ts +14 -12
- package/dist/src/codegen/templates/react/react.specs.specs.ts +8 -6
- package/dist/src/codegen/test-data/specVariant1.d.ts.map +1 -1
- package/dist/src/codegen/test-data/specVariant1.js +18 -16
- package/dist/src/codegen/test-data/specVariant1.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/codegen/extract/data-sink.ts +2 -2
- package/src/codegen/extract/projection.ts +2 -2
- package/src/codegen/extract/states.ts +6 -5
- package/src/codegen/scaffoldFromSchema.ts +1 -1
- package/src/codegen/templates/command/decide.specs.ts +33 -31
- package/src/codegen/templates/command/decide.ts.ejs +1 -1
- package/src/codegen/templates/command/handle.specs.ts +46 -42
- package/src/codegen/templates/command/handle.ts.ejs +2 -2
- package/src/codegen/templates/command/mutation.resolver.specs.ts +12 -10
- package/src/codegen/templates/command/register.specs.ts +13 -11
- package/src/codegen/templates/query/projection.specs.specs.ts +64 -54
- package/src/codegen/templates/query/projection.specs.ts +56 -48
- package/src/codegen/templates/query/projection.specs.ts.ejs +1 -1
- package/src/codegen/templates/query/projection.ts.ejs +10 -10
- package/src/codegen/templates/query/query.resolver.specs.ts +92 -78
- package/src/codegen/templates/query/query.resolver.ts.ejs +2 -2
- package/src/codegen/templates/query/state.specs.ts +14 -12
- package/src/codegen/templates/react/react.specs.specs.ts +8 -6
- package/src/codegen/test-data/specVariant1.ts +18 -16
- package/.turbo/turbo-format.log +0 -4
- package/.turbo/turbo-lint.log +0 -4
- package/.turbo/turbo-test.log +0 -14
- package/.turbo/turbo-type-check.log +0 -4
- package/dist/src/codegen/scaffoldFromSchema.integration.specs.d.ts +0 -2
- package/dist/src/codegen/scaffoldFromSchema.integration.specs.d.ts.map +0 -1
- package/dist/src/codegen/scaffoldFromSchema.integration.specs.js +0 -59
- package/dist/src/codegen/scaffoldFromSchema.integration.specs.js.map +0 -1
package/package.json
CHANGED
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"graphql-type-json": "^0.3.2",
|
|
32
32
|
"uuid": "^11.0.0",
|
|
33
33
|
"web-streams-polyfill": "^4.1.0",
|
|
34
|
-
"@auto-engineer/narrative": "0.
|
|
35
|
-
"@auto-engineer/message-bus": "0.
|
|
34
|
+
"@auto-engineer/narrative": "0.22.0",
|
|
35
|
+
"@auto-engineer/message-bus": "0.22.0"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"typescript": "^5.8.3",
|
|
44
44
|
"vitest": "^3.2.4",
|
|
45
45
|
"tsx": "^4.19.2",
|
|
46
|
-
"@auto-engineer/cli": "0.
|
|
46
|
+
"@auto-engineer/cli": "0.22.0"
|
|
47
47
|
},
|
|
48
|
-
"version": "0.
|
|
48
|
+
"version": "0.22.0",
|
|
49
49
|
"scripts": {
|
|
50
50
|
"generate:server": "tsx src/cli/index.ts",
|
|
51
51
|
"build": "tsc && tsx ../../scripts/fix-esm-imports.ts && rm -rf dist/src/codegen/templates && mkdir -p dist/src/codegen && cp -r src/codegen/templates dist/src/codegen/templates && cp src/server.ts dist/src && cp -r src/utils dist/src && cp -r src/domain dist/src",
|
|
@@ -64,12 +64,12 @@ function processStreamSink(item: unknown, exampleData: Record<string, unknown>)
|
|
|
64
64
|
|
|
65
65
|
export function getStreamFromSink(slice: Slice): { streamPattern?: string; streamId?: string } {
|
|
66
66
|
if (!('server' in slice)) return {};
|
|
67
|
-
if (slice.server == null || !
|
|
67
|
+
if (slice.server?.data?.items == null || !Array.isArray(slice.server.data.items)) {
|
|
68
68
|
return {};
|
|
69
69
|
}
|
|
70
70
|
const gwtSpecs = extractGwtSpecsFromSlice(slice);
|
|
71
71
|
const exampleData = extractExampleDataFromSpecs(slice, gwtSpecs);
|
|
72
|
-
const serverData = slice.server.data;
|
|
72
|
+
const serverData = slice.server.data.items;
|
|
73
73
|
|
|
74
74
|
for (const item of serverData) {
|
|
75
75
|
const result = processStreamSink(item, exampleData);
|
|
@@ -26,7 +26,7 @@ function isProjectionOrigin(origin: unknown): origin is ProjectionOrigin {
|
|
|
26
26
|
|
|
27
27
|
function extractProjectionField<K extends keyof ProjectionOrigin>(slice: Slice, fieldName: K): string | undefined {
|
|
28
28
|
if (!('server' in slice)) return undefined;
|
|
29
|
-
const dataSource = slice.server?.data?.[0];
|
|
29
|
+
const dataSource = slice.server?.data?.items?.[0];
|
|
30
30
|
if (!hasOrigin(dataSource)) return undefined;
|
|
31
31
|
|
|
32
32
|
const origin = dataSource.origin;
|
|
@@ -50,7 +50,7 @@ export function extractProjectionName(slice: Slice): string | undefined {
|
|
|
50
50
|
|
|
51
51
|
export function extractProjectionSingleton(slice: Slice): boolean {
|
|
52
52
|
if (!('server' in slice)) return false;
|
|
53
|
-
const dataSource = slice.server?.data?.[0];
|
|
53
|
+
const dataSource = slice.server?.data?.items?.[0];
|
|
54
54
|
if (!hasOrigin(dataSource)) return false;
|
|
55
55
|
|
|
56
56
|
const origin = dataSource.origin;
|
|
@@ -16,13 +16,14 @@ function createStateMessage(stateName: string, allMessages: MessageDefinition[])
|
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
function hasServerData(slice: Slice): slice is Slice & { server: { data: unknown[] } } {
|
|
19
|
+
function hasServerData(slice: Slice): slice is Slice & { server: { data: { items: unknown[] } } } {
|
|
20
20
|
return (
|
|
21
21
|
'server' in slice &&
|
|
22
22
|
Boolean(slice.server) &&
|
|
23
23
|
'data' in slice.server &&
|
|
24
|
-
|
|
25
|
-
slice.server.data.
|
|
24
|
+
slice.server.data?.items != null &&
|
|
25
|
+
Array.isArray(slice.server.data.items) &&
|
|
26
|
+
slice.server.data.items.length > 0
|
|
26
27
|
);
|
|
27
28
|
}
|
|
28
29
|
|
|
@@ -31,7 +32,7 @@ export function extractStatesFromTarget(slice: Slice, allMessages: MessageDefini
|
|
|
31
32
|
return [];
|
|
32
33
|
}
|
|
33
34
|
|
|
34
|
-
const targets = slice.server.data
|
|
35
|
+
const targets = slice.server.data.items
|
|
35
36
|
.map((d) => (d as DataItem).target?.name)
|
|
36
37
|
.filter((name): name is string => typeof name === 'string');
|
|
37
38
|
const uniqueTargets = Array.from(new Set(targets));
|
|
@@ -47,7 +48,7 @@ export function extractStatesFromData(slice: Slice, allMessages: MessageDefiniti
|
|
|
47
48
|
const states: Message[] = [];
|
|
48
49
|
const seenStates = new Set<string>();
|
|
49
50
|
|
|
50
|
-
for (const dataItem of slice.server.data) {
|
|
51
|
+
for (const dataItem of slice.server.data.items) {
|
|
51
52
|
const item = dataItem as DataItem;
|
|
52
53
|
if (!('origin' in item) || typeof item.target?.name !== 'string') {
|
|
53
54
|
continue;
|
|
@@ -537,7 +537,7 @@ async function prepareTemplateData(
|
|
|
537
537
|
messages: allMessages,
|
|
538
538
|
message:
|
|
539
539
|
slice.type === 'query' && allMessages
|
|
540
|
-
? allMessages.find((m) => m.name === slice.server?.data?.[0]?.target?.name)
|
|
540
|
+
? allMessages.find((m) => m.name === slice.server?.data?.items?.[0]?.target?.name)
|
|
541
541
|
: undefined,
|
|
542
542
|
integrations,
|
|
543
543
|
eventImportGroups,
|
|
@@ -419,43 +419,45 @@ describe('decide.ts.ejs', () => {
|
|
|
419
419
|
},
|
|
420
420
|
server: {
|
|
421
421
|
description: '',
|
|
422
|
-
data:
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
type: 'Command',
|
|
426
|
-
name: 'SuggestItems',
|
|
427
|
-
},
|
|
428
|
-
destination: {
|
|
429
|
-
type: 'integration',
|
|
430
|
-
systems: ['AI'],
|
|
431
|
-
message: {
|
|
432
|
-
name: 'DoChat',
|
|
433
|
-
type: 'command',
|
|
434
|
-
},
|
|
435
|
-
},
|
|
436
|
-
_additionalInstructions: 'Ensure systemPrompt includes product catalogue guidance',
|
|
437
|
-
_withState: {
|
|
422
|
+
data: {
|
|
423
|
+
items: [
|
|
424
|
+
{
|
|
438
425
|
target: {
|
|
439
|
-
type: '
|
|
440
|
-
name: '
|
|
426
|
+
type: 'Command',
|
|
427
|
+
name: 'SuggestItems',
|
|
441
428
|
},
|
|
442
|
-
|
|
429
|
+
destination: {
|
|
443
430
|
type: 'integration',
|
|
444
|
-
systems: ['
|
|
431
|
+
systems: ['AI'],
|
|
432
|
+
message: {
|
|
433
|
+
name: 'DoChat',
|
|
434
|
+
type: 'command',
|
|
435
|
+
},
|
|
436
|
+
},
|
|
437
|
+
_additionalInstructions: 'Ensure systemPrompt includes product catalogue guidance',
|
|
438
|
+
_withState: {
|
|
439
|
+
target: {
|
|
440
|
+
type: 'State',
|
|
441
|
+
name: 'Products',
|
|
442
|
+
},
|
|
443
|
+
origin: {
|
|
444
|
+
type: 'integration',
|
|
445
|
+
systems: ['product-catalog'],
|
|
446
|
+
},
|
|
445
447
|
},
|
|
446
448
|
},
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
449
|
+
{
|
|
450
|
+
target: {
|
|
451
|
+
type: 'Event',
|
|
452
|
+
name: 'ItemsSuggested',
|
|
453
|
+
},
|
|
454
|
+
destination: {
|
|
455
|
+
type: 'stream',
|
|
456
|
+
pattern: 'session-${sessionId}',
|
|
457
|
+
},
|
|
456
458
|
},
|
|
457
|
-
|
|
458
|
-
|
|
459
|
+
],
|
|
460
|
+
},
|
|
459
461
|
specs: [
|
|
460
462
|
{
|
|
461
463
|
type: 'gherkin',
|
|
@@ -9,7 +9,7 @@ const fallbackEvents = Object.values(gwtMapping).flatMap(scenarios =>
|
|
|
9
9
|
);
|
|
10
10
|
const uniqueEventTypes = [...new Set(fallbackEvents.map(e => pascalCase(e.eventRef)))];
|
|
11
11
|
|
|
12
|
-
const integrationData = (slice.server?.data ?? []).filter(d => d.destination?.type === 'integration');
|
|
12
|
+
const integrationData = (slice.server?.data?.items ?? []).filter(d => d.destination?.type === 'integration');
|
|
13
13
|
const integration = integrationData[0];
|
|
14
14
|
const integrationReturnType = integration?._withState?.target?.name;
|
|
15
15
|
const integrationReturnSystem = integration?._withState?.origin?.systems?.[0];
|
|
@@ -58,18 +58,20 @@ describe('generateScaffoldFilePlans', () => {
|
|
|
58
58
|
],
|
|
59
59
|
},
|
|
60
60
|
],
|
|
61
|
-
data:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
61
|
+
data: {
|
|
62
|
+
items: [
|
|
63
|
+
{
|
|
64
|
+
target: {
|
|
65
|
+
type: 'Event',
|
|
66
|
+
name: 'ListingCreated',
|
|
67
|
+
},
|
|
68
|
+
destination: {
|
|
69
|
+
type: 'stream',
|
|
70
|
+
pattern: 'listings-${propertyId}',
|
|
71
|
+
},
|
|
70
72
|
},
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
],
|
|
74
|
+
},
|
|
73
75
|
},
|
|
74
76
|
},
|
|
75
77
|
],
|
|
@@ -149,43 +151,45 @@ describe('generateScaffoldFilePlans', () => {
|
|
|
149
151
|
},
|
|
150
152
|
server: {
|
|
151
153
|
description: '',
|
|
152
|
-
data:
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
type: 'Command',
|
|
156
|
-
name: 'SuggestItems',
|
|
157
|
-
},
|
|
158
|
-
destination: {
|
|
159
|
-
type: 'integration',
|
|
160
|
-
systems: ['AI'],
|
|
161
|
-
message: {
|
|
162
|
-
name: 'DoChat',
|
|
163
|
-
type: 'command',
|
|
164
|
-
},
|
|
165
|
-
},
|
|
166
|
-
_additionalInstructions: 'Ensure systemPrompt includes product catalogue guidance',
|
|
167
|
-
_withState: {
|
|
154
|
+
data: {
|
|
155
|
+
items: [
|
|
156
|
+
{
|
|
168
157
|
target: {
|
|
169
|
-
type: '
|
|
170
|
-
name: '
|
|
158
|
+
type: 'Command',
|
|
159
|
+
name: 'SuggestItems',
|
|
171
160
|
},
|
|
172
|
-
|
|
161
|
+
destination: {
|
|
173
162
|
type: 'integration',
|
|
174
|
-
systems: ['
|
|
163
|
+
systems: ['AI'],
|
|
164
|
+
message: {
|
|
165
|
+
name: 'DoChat',
|
|
166
|
+
type: 'command',
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
_additionalInstructions: 'Ensure systemPrompt includes product catalogue guidance',
|
|
170
|
+
_withState: {
|
|
171
|
+
target: {
|
|
172
|
+
type: 'State',
|
|
173
|
+
name: 'Products',
|
|
174
|
+
},
|
|
175
|
+
origin: {
|
|
176
|
+
type: 'integration',
|
|
177
|
+
systems: ['product-catalog'],
|
|
178
|
+
},
|
|
175
179
|
},
|
|
176
180
|
},
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
181
|
+
{
|
|
182
|
+
target: {
|
|
183
|
+
type: 'Event',
|
|
184
|
+
name: 'ItemsSuggested',
|
|
185
|
+
},
|
|
186
|
+
destination: {
|
|
187
|
+
type: 'stream',
|
|
188
|
+
pattern: 'session-${sessionId}',
|
|
189
|
+
},
|
|
186
190
|
},
|
|
187
|
-
|
|
188
|
-
|
|
191
|
+
],
|
|
192
|
+
},
|
|
189
193
|
specs: [
|
|
190
194
|
{
|
|
191
195
|
type: 'gherkin',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<%
|
|
2
|
-
const integrationData = (slice.server?.data ?? []).filter(d => d.destination?.type === 'integration');
|
|
2
|
+
const integrationData = (slice.server?.data?.items ?? []).filter(d => d.destination?.type === 'integration');
|
|
3
3
|
|
|
4
4
|
const integrationImports = new Map();
|
|
5
5
|
const integrationSideEffectImports = new Set();
|
|
@@ -23,7 +23,7 @@ for (const d of integrationData) {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
const additionalInstructions = (slice.server?.data ?? [])
|
|
26
|
+
const additionalInstructions = (slice.server?.data?.items ?? [])
|
|
27
27
|
.map(d => d._additionalInstructions)
|
|
28
28
|
.filter(Boolean);
|
|
29
29
|
|
|
@@ -153,16 +153,18 @@ describe('mutation.resolver.ts.ejs', () => {
|
|
|
153
153
|
'mutation AnswerQuestion($input: AnswerQuestionInput!) {\\n answerQuestion(input: $input) {\\n success\\n }\\n}',
|
|
154
154
|
server: {
|
|
155
155
|
description: '',
|
|
156
|
-
data:
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
156
|
+
data: {
|
|
157
|
+
items: [
|
|
158
|
+
{
|
|
159
|
+
target: { type: 'Event', name: 'QuestionAnswered' },
|
|
160
|
+
destination: { type: 'stream', pattern: 'questionnaire-participantId' },
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
target: { type: 'Event', name: 'QuestionnaireEditRejected' },
|
|
164
|
+
destination: { type: 'stream', pattern: 'questionnaire-participantId' },
|
|
165
|
+
},
|
|
166
|
+
],
|
|
167
|
+
},
|
|
166
168
|
specs: [
|
|
167
169
|
{
|
|
168
170
|
type: 'gherkin',
|
|
@@ -59,18 +59,20 @@ describe('generateScaffoldFilePlans', () => {
|
|
|
59
59
|
],
|
|
60
60
|
},
|
|
61
61
|
],
|
|
62
|
-
data:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
62
|
+
data: {
|
|
63
|
+
items: [
|
|
64
|
+
{
|
|
65
|
+
target: {
|
|
66
|
+
type: 'Event',
|
|
67
|
+
name: 'ListingCreated',
|
|
68
|
+
},
|
|
69
|
+
destination: {
|
|
70
|
+
type: 'stream',
|
|
71
|
+
pattern: 'listings-${propertyId}',
|
|
72
|
+
},
|
|
71
73
|
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
],
|
|
75
|
+
},
|
|
74
76
|
},
|
|
75
77
|
},
|
|
76
78
|
],
|
|
@@ -83,19 +83,21 @@ describe('projection.specs.ts.ejs', () => {
|
|
|
83
83
|
client: { specs: [] },
|
|
84
84
|
server: {
|
|
85
85
|
description: '',
|
|
86
|
-
data:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
86
|
+
data: {
|
|
87
|
+
items: [
|
|
88
|
+
{
|
|
89
|
+
origin: {
|
|
90
|
+
type: 'projection',
|
|
91
|
+
idField: 'propertyId',
|
|
92
|
+
name: 'AvailablePropertiesProjection',
|
|
93
|
+
},
|
|
94
|
+
target: {
|
|
95
|
+
type: 'State',
|
|
96
|
+
name: 'AvailableListings',
|
|
97
|
+
},
|
|
96
98
|
},
|
|
97
|
-
|
|
98
|
-
|
|
99
|
+
],
|
|
100
|
+
},
|
|
99
101
|
specs: [
|
|
100
102
|
{
|
|
101
103
|
type: 'gherkin',
|
|
@@ -261,19 +263,21 @@ describe('projection.specs.ts.ejs', () => {
|
|
|
261
263
|
client: { specs: [] },
|
|
262
264
|
server: {
|
|
263
265
|
description: '',
|
|
264
|
-
data:
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
266
|
+
data: {
|
|
267
|
+
items: [
|
|
268
|
+
{
|
|
269
|
+
target: {
|
|
270
|
+
type: 'State',
|
|
271
|
+
name: 'QuestionnaireProgress',
|
|
272
|
+
},
|
|
273
|
+
origin: {
|
|
274
|
+
type: 'projection',
|
|
275
|
+
name: 'Questionnaires',
|
|
276
|
+
idField: 'questionnaire-participantId',
|
|
277
|
+
},
|
|
274
278
|
},
|
|
275
|
-
|
|
276
|
-
|
|
279
|
+
],
|
|
280
|
+
},
|
|
277
281
|
specs: [
|
|
278
282
|
{
|
|
279
283
|
type: 'gherkin',
|
|
@@ -544,12 +548,14 @@ describe('projection.specs.ts.ejs', () => {
|
|
|
544
548
|
],
|
|
545
549
|
},
|
|
546
550
|
],
|
|
547
|
-
data:
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
551
|
+
data: {
|
|
552
|
+
items: [
|
|
553
|
+
{
|
|
554
|
+
origin: { name: 'Questionnaires', idField: 'questionnaireId-participantId' },
|
|
555
|
+
target: { name: 'QuestionnaireProgress' },
|
|
556
|
+
},
|
|
557
|
+
],
|
|
558
|
+
},
|
|
553
559
|
},
|
|
554
560
|
},
|
|
555
561
|
],
|
|
@@ -702,19 +708,21 @@ describe('projection.specs.ts.ejs', () => {
|
|
|
702
708
|
client: { specs: [] },
|
|
703
709
|
server: {
|
|
704
710
|
description: '',
|
|
705
|
-
data:
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
711
|
+
data: {
|
|
712
|
+
items: [
|
|
713
|
+
{
|
|
714
|
+
target: {
|
|
715
|
+
type: 'State',
|
|
716
|
+
name: 'TodoSummary',
|
|
717
|
+
},
|
|
718
|
+
origin: {
|
|
719
|
+
type: 'projection',
|
|
720
|
+
name: 'TodoSummaryProjection',
|
|
721
|
+
singleton: true,
|
|
722
|
+
},
|
|
715
723
|
},
|
|
716
|
-
|
|
717
|
-
|
|
724
|
+
],
|
|
725
|
+
},
|
|
718
726
|
specs: [
|
|
719
727
|
{
|
|
720
728
|
type: 'gherkin',
|
|
@@ -887,19 +895,21 @@ describe('projection.specs.ts.ejs', () => {
|
|
|
887
895
|
client: { specs: [] },
|
|
888
896
|
server: {
|
|
889
897
|
description: '',
|
|
890
|
-
data:
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
898
|
+
data: {
|
|
899
|
+
items: [
|
|
900
|
+
{
|
|
901
|
+
target: {
|
|
902
|
+
type: 'State',
|
|
903
|
+
name: 'UserProject',
|
|
904
|
+
},
|
|
905
|
+
origin: {
|
|
906
|
+
type: 'projection',
|
|
907
|
+
name: 'UserProjectsProjection',
|
|
908
|
+
idField: ['userId', 'projectId'],
|
|
909
|
+
},
|
|
900
910
|
},
|
|
901
|
-
|
|
902
|
-
|
|
911
|
+
],
|
|
912
|
+
},
|
|
903
913
|
specs: [
|
|
904
914
|
{
|
|
905
915
|
type: 'gherkin',
|