@auto-engineer/narrative 1.9.0 → 1.11.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/.turbo/turbo-test.log +3 -3
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +36 -0
- package/dist/src/index.d.ts +2 -23
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +2 -12
- package/dist/src/index.js.map +1 -1
- package/dist/src/schema.d.ts +201 -184
- package/dist/src/schema.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -4
- package/src/index.ts +2 -87
- package/src/schema.ts +18 -0
package/package.json
CHANGED
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
"types": "./dist/src/index.d.ts",
|
|
8
8
|
"import": "./dist/src/index.js"
|
|
9
9
|
},
|
|
10
|
+
"./schema": {
|
|
11
|
+
"types": "./dist/src/schema.d.ts",
|
|
12
|
+
"import": "./dist/src/schema.js"
|
|
13
|
+
},
|
|
10
14
|
"./node": {
|
|
11
15
|
"types": "./dist/src/node.d.ts",
|
|
12
16
|
"import": "./dist/src/node.js"
|
|
@@ -23,9 +27,9 @@
|
|
|
23
27
|
"typescript": "^5.9.2",
|
|
24
28
|
"zod": "^3.22.4",
|
|
25
29
|
"zod-to-json-schema": "^3.22.3",
|
|
26
|
-
"@auto-engineer/file-store": "1.
|
|
27
|
-
"@auto-engineer/
|
|
28
|
-
"@auto-engineer/
|
|
30
|
+
"@auto-engineer/file-store": "1.11.0",
|
|
31
|
+
"@auto-engineer/message-bus": "1.11.0",
|
|
32
|
+
"@auto-engineer/id": "1.11.0"
|
|
29
33
|
},
|
|
30
34
|
"devDependencies": {
|
|
31
35
|
"@types/node": "^20.0.0",
|
|
@@ -35,7 +39,7 @@
|
|
|
35
39
|
"publishConfig": {
|
|
36
40
|
"access": "public"
|
|
37
41
|
},
|
|
38
|
-
"version": "1.
|
|
42
|
+
"version": "1.11.0",
|
|
39
43
|
"scripts": {
|
|
40
44
|
"build": "tsx scripts/build.ts",
|
|
41
45
|
"test": "vitest run --reporter=dot",
|
package/src/index.ts
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import type { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
// Republished to fix workspace:* dependency resolution in 1.3.0
|
|
4
|
-
|
|
5
|
-
// Apollo GraphQL
|
|
6
1
|
export { gql } from 'graphql-tag';
|
|
7
|
-
export { DataSchema, DataSinkSchema, DataSourceSchema, MessageTargetSchema } from './schema';
|
|
8
|
-
// Core types and utilities
|
|
9
2
|
export type {
|
|
10
3
|
Command,
|
|
11
4
|
Data,
|
|
@@ -24,7 +17,6 @@ export type {
|
|
|
24
17
|
} from './types';
|
|
25
18
|
export { createIntegration } from './types';
|
|
26
19
|
|
|
27
|
-
// HTTP GET template literal function
|
|
28
20
|
export const get = (strings: TemplateStringsArray, ...values: unknown[]) => {
|
|
29
21
|
return strings.reduce((result, str, i) => {
|
|
30
22
|
const value = values[i];
|
|
@@ -35,9 +27,7 @@ export const get = (strings: TemplateStringsArray, ...values: unknown[]) => {
|
|
|
35
27
|
export type { ExportSchemaEvents } from './commands/export-schema';
|
|
36
28
|
export type { FieldSelector } from './data-narrative-builders';
|
|
37
29
|
|
|
38
|
-
// Data narrative builders
|
|
39
30
|
export { sink, source } from './data-narrative-builders';
|
|
40
|
-
// Fluent API
|
|
41
31
|
export type {
|
|
42
32
|
FluentCommandSliceBuilder,
|
|
43
33
|
FluentExperienceSliceBuilder,
|
|
@@ -45,10 +35,9 @@ export type {
|
|
|
45
35
|
FluentReactionSliceBuilder,
|
|
46
36
|
} from './fluent-builder';
|
|
47
37
|
export { command, decide, evolve, experience, query, react } from './fluent-builder';
|
|
48
|
-
// Narrative conversion utilities
|
|
49
38
|
export { getNarratives } from './getNarratives';
|
|
39
|
+
export { addAutoIds, hasAllIds } from './id';
|
|
50
40
|
export type { ExampleBuilder, GivenBuilder, SliceTypeValueInterface, ThenBuilder, WhenBuilder } from './narrative';
|
|
51
|
-
// Narrative language functions
|
|
52
41
|
export {
|
|
53
42
|
client,
|
|
54
43
|
data,
|
|
@@ -65,83 +54,9 @@ export {
|
|
|
65
54
|
specs,
|
|
66
55
|
thenError,
|
|
67
56
|
} from './narrative';
|
|
68
|
-
|
|
69
|
-
export {
|
|
70
|
-
ClientServerNamesSchema as ClientServerNamesSystemSchema,
|
|
71
|
-
CommandSchema,
|
|
72
|
-
CommandSliceSchema,
|
|
73
|
-
EventSchema,
|
|
74
|
-
ExampleSchema,
|
|
75
|
-
ExperienceSliceSchema,
|
|
76
|
-
IntegrationSchema,
|
|
77
|
-
MappingEntrySchema,
|
|
78
|
-
MappingFieldRefSchema,
|
|
79
|
-
MessageFieldSchema,
|
|
80
|
-
MessageRefSchema,
|
|
81
|
-
MessageSchema,
|
|
82
|
-
ModuleSchema,
|
|
83
|
-
modelSchema as SpecsSystemSchema,
|
|
84
|
-
modelSchema,
|
|
85
|
-
NarrativeNamesSchema as NarrativeNamesSystemSchema,
|
|
86
|
-
NarrativeSchema,
|
|
87
|
-
QuerySchema,
|
|
88
|
-
QuerySliceSchema,
|
|
89
|
-
ReactSliceSchema,
|
|
90
|
-
RuleSchema,
|
|
91
|
-
SliceNamesSchema as SliceNamesSystemSchema,
|
|
92
|
-
SliceSchema,
|
|
93
|
-
SpecSchema,
|
|
94
|
-
StateSchema,
|
|
95
|
-
StepErrorSchema,
|
|
96
|
-
StepSchema,
|
|
97
|
-
StepWithDocStringSchema,
|
|
98
|
-
StepWithErrorSchema,
|
|
99
|
-
} from './schema';
|
|
100
|
-
|
|
101
|
-
// Testing helpers
|
|
57
|
+
export * from './schema';
|
|
102
58
|
export { createNarrativeSpec, given as testGiven, when as testWhen } from './testing';
|
|
103
59
|
export type { GeneratedNarratives } from './transformers/model-to-narrative';
|
|
104
60
|
export { modelToNarrative } from './transformers/model-to-narrative';
|
|
105
61
|
|
|
106
|
-
import type {
|
|
107
|
-
CommandSliceSchema,
|
|
108
|
-
ExampleSchema,
|
|
109
|
-
ExperienceSliceSchema,
|
|
110
|
-
MappingEntrySchema,
|
|
111
|
-
MappingFieldRefSchema,
|
|
112
|
-
MessageFieldSchema,
|
|
113
|
-
MessageRefSchema,
|
|
114
|
-
MessageSchema,
|
|
115
|
-
ModuleSchema,
|
|
116
|
-
modelSchema,
|
|
117
|
-
NarrativeSchema,
|
|
118
|
-
QuerySliceSchema,
|
|
119
|
-
ReactSliceSchema,
|
|
120
|
-
RuleSchema,
|
|
121
|
-
SliceSchema,
|
|
122
|
-
SpecSchema,
|
|
123
|
-
StepSchema,
|
|
124
|
-
} from './schema';
|
|
125
|
-
export type Model = z.infer<typeof modelSchema>;
|
|
126
|
-
export type Narrative = z.infer<typeof NarrativeSchema>;
|
|
127
|
-
export type Slice = z.infer<typeof SliceSchema>;
|
|
128
|
-
export type QuerySlice = z.infer<typeof QuerySliceSchema>;
|
|
129
|
-
export type ReactSlice = z.infer<typeof ReactSliceSchema>;
|
|
130
|
-
export type CommandSlice = z.infer<typeof CommandSliceSchema>;
|
|
131
|
-
export type ExperienceSlice = z.infer<typeof ExperienceSliceSchema>;
|
|
132
|
-
export type Message = z.infer<typeof MessageSchema>;
|
|
133
|
-
export type Example = z.infer<typeof ExampleSchema>;
|
|
134
|
-
export type MessageField = z.infer<typeof MessageFieldSchema>;
|
|
135
|
-
export type Rule = z.infer<typeof RuleSchema>;
|
|
136
|
-
export type Spec = z.infer<typeof SpecSchema>;
|
|
137
|
-
export type Step = z.infer<typeof StepSchema>;
|
|
138
|
-
export type Module = z.infer<typeof ModuleSchema>;
|
|
139
|
-
export type MessageRef = z.infer<typeof MessageRefSchema>;
|
|
140
|
-
export type MappingFieldRef = z.infer<typeof MappingFieldRefSchema>;
|
|
141
|
-
export type MappingEntry = z.infer<typeof MappingEntrySchema>;
|
|
142
|
-
|
|
143
|
-
// ID assignment utilities
|
|
144
|
-
export { addAutoIds, hasAllIds } from './id';
|
|
145
|
-
export type { ClientSpecNode } from './schema';
|
|
146
|
-
|
|
147
62
|
export { detectQueryAction, extractQueryNameFromRequest } from './transformers/narrative-to-model/spec-processors';
|
package/src/schema.ts
CHANGED
|
@@ -456,3 +456,21 @@ export {
|
|
|
456
456
|
StepWithDocStringSchema,
|
|
457
457
|
StepWithErrorSchema,
|
|
458
458
|
};
|
|
459
|
+
|
|
460
|
+
export type Model = z.infer<typeof modelSchema>;
|
|
461
|
+
export type Narrative = z.infer<typeof NarrativeSchema>;
|
|
462
|
+
export type Slice = z.infer<typeof SliceSchema>;
|
|
463
|
+
export type QuerySlice = z.infer<typeof QuerySliceSchema>;
|
|
464
|
+
export type ReactSlice = z.infer<typeof ReactSliceSchema>;
|
|
465
|
+
export type CommandSlice = z.infer<typeof CommandSliceSchema>;
|
|
466
|
+
export type ExperienceSlice = z.infer<typeof ExperienceSliceSchema>;
|
|
467
|
+
export type Message = z.infer<typeof MessageSchema>;
|
|
468
|
+
export type Example = z.infer<typeof ExampleSchema>;
|
|
469
|
+
export type MessageField = z.infer<typeof MessageFieldSchema>;
|
|
470
|
+
export type Rule = z.infer<typeof RuleSchema>;
|
|
471
|
+
export type Spec = z.infer<typeof SpecSchema>;
|
|
472
|
+
export type Step = z.infer<typeof StepSchema>;
|
|
473
|
+
export type Module = z.infer<typeof ModuleSchema>;
|
|
474
|
+
export type MessageRef = z.infer<typeof MessageRefSchema>;
|
|
475
|
+
export type MappingFieldRef = z.infer<typeof MappingFieldRefSchema>;
|
|
476
|
+
export type MappingEntry = z.infer<typeof MappingEntrySchema>;
|