@domain-first/project-structure 7.2.0 → 8.1.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/README.md +125 -26
- package/dist/201.js +87 -338
- package/dist/287.js +1235 -575
- package/dist/561.js +519 -0
- package/dist/711.js +22 -0
- package/dist/870.js +438 -0
- package/dist/agent-cli.d.ts +379 -0
- package/dist/agent-cli.spec.d.ts +1 -0
- package/dist/agent-identifiers.d.ts +4 -0
- package/dist/agent-requests.d.ts +490 -0
- package/dist/config-file.d.ts +231 -26
- package/dist/config-file.spec.d.ts +1 -0
- package/dist/context-dependencies.d.ts +16 -0
- package/dist/dependency-rules.d.ts +17 -17
- package/dist/file-system.d.ts +10 -1
- package/dist/implementation-choices.d.ts +8 -0
- package/dist/implementation-choices.spec.d.ts +1 -0
- package/dist/implementation-options-schema.d.ts +14 -0
- package/dist/index.cjs +3645 -584
- package/dist/index.js +20 -7
- package/dist/init.cjs +717 -122
- package/dist/init.js +24 -12
- package/dist/integration.cjs +3783 -186
- package/dist/integration.js +29 -17
- package/dist/integrations/rest-endpoint-generator.d.ts +4 -2
- package/dist/integrations/storybook.d.ts +1 -0
- package/dist/interaction.d.ts +41 -0
- package/dist/lint.cjs +165 -41
- package/dist/lint.js +22 -7
- package/dist/module-move.d.ts +6 -2
- package/dist/next-app.d.ts +7 -0
- package/dist/react-module-move.d.ts +17 -2
- package/dist/react.cjs +5181 -421
- package/dist/react.js +72 -60
- package/dist/system-implementations.d.ts +6 -0
- package/dist/upgrade-steps.d.ts +81 -0
- package/dist/upgrade-steps.spec.d.ts +1 -0
- package/dist/upgrade.cjs +593 -0
- package/dist/upgrade.d.ts +2 -0
- package/dist/upgrade.js +235 -0
- package/dist/use-cases/add-integration.d.ts +16 -1
- package/dist/use-cases/cross-context-dependencies.spec.d.ts +1 -0
- package/dist/use-cases/initialize.d.ts +4 -4
- package/dist/use-cases/initialize.spec.d.ts +1 -0
- package/dist/use-cases/prompt-implementation-type.d.ts +20 -0
- package/dist/use-cases/scaffold-react-page.d.ts +3 -1
- package/dist/wire-branches.d.ts +26 -0
- package/dist/wiring.d.ts +3 -2
- package/package.json +3 -2
- package/skills/df-ps-implement/SKILL.md +9 -8
- package/skills/df-ps-plan-feature/SKILL.md +8 -7
- package/skills/df-ps-react/SKILL.md +14 -8
- package/skills/df-ps-react/references/generators.md +6 -2
- package/skills/df-ps-scaffold/SKILL.md +28 -17
- package/skills/df-ps-scaffold/references/agent-mode.md +72 -0
- package/skills/df-ps-scaffold/references/agent-operations.md +155 -0
- package/skills/df-ps-scaffold/references/choosing-components.md +13 -13
- package/skills/df-ps-scaffold/references/generators.md +20 -3
- package/skills/df-ps-scaffold/references/units/aggregate.md +4 -3
- package/skills/df-ps-scaffold/references/units/bounded-context.md +1 -1
- package/skills/df-ps-scaffold/references/units/command-query.md +12 -12
- package/skills/df-ps-scaffold/references/units/implementation.md +2 -2
- package/skills/df-ps-scaffold/references/units/move-or-rename.md +1 -1
- package/skills/df-ps-scaffold/references/units/port.md +7 -4
- package/skills/df-ps-scaffold/references/units/use-case.md +1 -1
- package/skills/df-ps-scaffold/scripts/drive.mjs +9 -1
package/dist/config-file.d.ts
CHANGED
|
@@ -1,11 +1,79 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
2
|
/**
|
|
3
|
-
* `df-lint` checks that `rules.lint` can turn off.
|
|
3
|
+
* `df-lint` checks that `backend.rules.lint` can turn off.
|
|
4
4
|
*/
|
|
5
5
|
export declare const lintChecks: readonly ["context-isolation", "shared-kernel", "layers", "dependencies", "react", "clock"];
|
|
6
6
|
export type LintCheck = (typeof lintChecks)[number];
|
|
7
|
-
declare const
|
|
7
|
+
export declare const configFileName = "domain-first.project-structure.config.json";
|
|
8
|
+
export declare const projectConfigSchema: z.ZodObject<{
|
|
8
9
|
rootFolder: z.ZodString;
|
|
10
|
+
}, z.core.$loose>;
|
|
11
|
+
export declare const domainFirstPackages: readonly ["@domain-first/types", "@domain-first/errors", "@domain-first/handlers", "@domain-first/wire", "@domain-first/handlers-rest"];
|
|
12
|
+
export declare const rulesSchema: z.ZodObject<{
|
|
13
|
+
dependencies: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
14
|
+
queries: "queries";
|
|
15
|
+
commands: "commands";
|
|
16
|
+
"use-cases": "use-cases";
|
|
17
|
+
"application-ports": "application-ports";
|
|
18
|
+
repositories: "repositories";
|
|
19
|
+
"domain-services": "domain-services";
|
|
20
|
+
"application-services": "application-services";
|
|
21
|
+
"infrastructure-services": "infrastructure-services";
|
|
22
|
+
"presentation-services": "presentation-services";
|
|
23
|
+
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodArray<z.ZodEnum<{
|
|
24
|
+
queries: "queries";
|
|
25
|
+
commands: "commands";
|
|
26
|
+
"use-cases": "use-cases";
|
|
27
|
+
"application-ports": "application-ports";
|
|
28
|
+
repositories: "repositories";
|
|
29
|
+
"domain-services": "domain-services";
|
|
30
|
+
"application-services": "application-services";
|
|
31
|
+
"infrastructure-services": "infrastructure-services";
|
|
32
|
+
"presentation-services": "presentation-services";
|
|
33
|
+
}>>, z.ZodObject<{
|
|
34
|
+
add: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
35
|
+
queries: "queries";
|
|
36
|
+
commands: "commands";
|
|
37
|
+
"use-cases": "use-cases";
|
|
38
|
+
"application-ports": "application-ports";
|
|
39
|
+
repositories: "repositories";
|
|
40
|
+
"domain-services": "domain-services";
|
|
41
|
+
"application-services": "application-services";
|
|
42
|
+
"infrastructure-services": "infrastructure-services";
|
|
43
|
+
"presentation-services": "presentation-services";
|
|
44
|
+
}>>>;
|
|
45
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
46
|
+
queries: "queries";
|
|
47
|
+
commands: "commands";
|
|
48
|
+
"use-cases": "use-cases";
|
|
49
|
+
"application-ports": "application-ports";
|
|
50
|
+
repositories: "repositories";
|
|
51
|
+
"domain-services": "domain-services";
|
|
52
|
+
"application-services": "application-services";
|
|
53
|
+
"infrastructure-services": "infrastructure-services";
|
|
54
|
+
"presentation-services": "presentation-services";
|
|
55
|
+
}>>>;
|
|
56
|
+
}, z.core.$strip>]>>>;
|
|
57
|
+
lint: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
58
|
+
"context-isolation": "context-isolation";
|
|
59
|
+
"shared-kernel": "shared-kernel";
|
|
60
|
+
layers: "layers";
|
|
61
|
+
dependencies: "dependencies";
|
|
62
|
+
react: "react";
|
|
63
|
+
clock: "clock";
|
|
64
|
+
}> & z.core.$partial, z.ZodBoolean>>;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
export declare const branchNameSchema: z.ZodString;
|
|
67
|
+
/**
|
|
68
|
+
* Custom `envBranchedWire` branches. Absent: `test`, `development` and
|
|
69
|
+
* `production`, selected by `NODE_ENV`. Without `test`, every branch gets
|
|
70
|
+
* the primary implementation and no test implementations are generated.
|
|
71
|
+
*/
|
|
72
|
+
export declare const envBranchesSchema: z.ZodObject<{
|
|
73
|
+
names: z.ZodArray<z.ZodString>;
|
|
74
|
+
test: z.ZodOptional<z.ZodString>;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
export declare const backendConfigSchema: z.ZodObject<{
|
|
9
77
|
domainFirstPackages: z.ZodArray<z.ZodEnum<{
|
|
10
78
|
"@domain-first/types": "@domain-first/types";
|
|
11
79
|
"@domain-first/errors": "@domain-first/errors";
|
|
@@ -13,52 +81,62 @@ declare const configSchema: z.ZodObject<{
|
|
|
13
81
|
"@domain-first/wire": "@domain-first/wire";
|
|
14
82
|
"@domain-first/handlers-rest": "@domain-first/handlers-rest";
|
|
15
83
|
}>>;
|
|
16
|
-
|
|
84
|
+
envBranches: z.ZodOptional<z.ZodObject<{
|
|
85
|
+
names: z.ZodArray<z.ZodString>;
|
|
86
|
+
test: z.ZodOptional<z.ZodString>;
|
|
87
|
+
}, z.core.$strip>>;
|
|
17
88
|
withInMemoryDb: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
-
useReact: z.ZodBoolean;
|
|
19
|
-
storybookFramework: z.ZodOptional<z.ZodString>;
|
|
20
89
|
testingLibrary: z.ZodOptional<z.ZodString>;
|
|
90
|
+
implementations: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
91
|
+
queries: "queries";
|
|
92
|
+
commands: "commands";
|
|
93
|
+
repositories: "repositories";
|
|
94
|
+
ports: "ports";
|
|
95
|
+
}> & z.core.$partial, z.ZodObject<{
|
|
96
|
+
primary: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
97
|
+
test: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
98
|
+
}, z.core.$strict>>>;
|
|
21
99
|
rules: z.ZodOptional<z.ZodObject<{
|
|
22
100
|
dependencies: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
101
|
+
queries: "queries";
|
|
102
|
+
commands: "commands";
|
|
103
|
+
"use-cases": "use-cases";
|
|
104
|
+
"application-ports": "application-ports";
|
|
23
105
|
repositories: "repositories";
|
|
24
106
|
"domain-services": "domain-services";
|
|
25
|
-
"application-ports": "application-ports";
|
|
26
107
|
"application-services": "application-services";
|
|
27
|
-
"use-cases": "use-cases";
|
|
28
|
-
commands: "commands";
|
|
29
|
-
queries: "queries";
|
|
30
108
|
"infrastructure-services": "infrastructure-services";
|
|
31
109
|
"presentation-services": "presentation-services";
|
|
32
110
|
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodArray<z.ZodEnum<{
|
|
111
|
+
queries: "queries";
|
|
112
|
+
commands: "commands";
|
|
113
|
+
"use-cases": "use-cases";
|
|
114
|
+
"application-ports": "application-ports";
|
|
33
115
|
repositories: "repositories";
|
|
34
116
|
"domain-services": "domain-services";
|
|
35
|
-
"application-ports": "application-ports";
|
|
36
117
|
"application-services": "application-services";
|
|
37
|
-
"use-cases": "use-cases";
|
|
38
|
-
commands: "commands";
|
|
39
|
-
queries: "queries";
|
|
40
118
|
"infrastructure-services": "infrastructure-services";
|
|
41
119
|
"presentation-services": "presentation-services";
|
|
42
120
|
}>>, z.ZodObject<{
|
|
43
121
|
add: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
122
|
+
queries: "queries";
|
|
123
|
+
commands: "commands";
|
|
124
|
+
"use-cases": "use-cases";
|
|
125
|
+
"application-ports": "application-ports";
|
|
44
126
|
repositories: "repositories";
|
|
45
127
|
"domain-services": "domain-services";
|
|
46
|
-
"application-ports": "application-ports";
|
|
47
128
|
"application-services": "application-services";
|
|
48
|
-
"use-cases": "use-cases";
|
|
49
|
-
commands: "commands";
|
|
50
|
-
queries: "queries";
|
|
51
129
|
"infrastructure-services": "infrastructure-services";
|
|
52
130
|
"presentation-services": "presentation-services";
|
|
53
131
|
}>>>;
|
|
54
132
|
remove: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
133
|
+
queries: "queries";
|
|
134
|
+
commands: "commands";
|
|
135
|
+
"use-cases": "use-cases";
|
|
136
|
+
"application-ports": "application-ports";
|
|
55
137
|
repositories: "repositories";
|
|
56
138
|
"domain-services": "domain-services";
|
|
57
|
-
"application-ports": "application-ports";
|
|
58
139
|
"application-services": "application-services";
|
|
59
|
-
"use-cases": "use-cases";
|
|
60
|
-
commands: "commands";
|
|
61
|
-
queries: "queries";
|
|
62
140
|
"infrastructure-services": "infrastructure-services";
|
|
63
141
|
"presentation-services": "presentation-services";
|
|
64
142
|
}>>>;
|
|
@@ -72,17 +150,144 @@ declare const configSchema: z.ZodObject<{
|
|
|
72
150
|
clock: "clock";
|
|
73
151
|
}> & z.core.$partial, z.ZodBoolean>>;
|
|
74
152
|
}, z.core.$strip>>;
|
|
75
|
-
}, z.core.$
|
|
153
|
+
}, z.core.$loose>;
|
|
154
|
+
export declare const reactConfigSchema: z.ZodObject<{
|
|
155
|
+
framework: z.ZodOptional<z.ZodEnum<{
|
|
156
|
+
react: "react";
|
|
157
|
+
next: "next";
|
|
158
|
+
}>>;
|
|
159
|
+
storybookFramework: z.ZodOptional<z.ZodString>;
|
|
160
|
+
}, z.core.$loose>;
|
|
161
|
+
export declare const frontendConfigSchema: z.ZodObject<{
|
|
162
|
+
react: z.ZodOptional<z.ZodObject<{
|
|
163
|
+
framework: z.ZodOptional<z.ZodEnum<{
|
|
164
|
+
react: "react";
|
|
165
|
+
next: "next";
|
|
166
|
+
}>>;
|
|
167
|
+
storybookFramework: z.ZodOptional<z.ZodString>;
|
|
168
|
+
}, z.core.$loose>>;
|
|
169
|
+
}, z.core.$loose>;
|
|
170
|
+
export declare const configSchema: z.ZodObject<{
|
|
171
|
+
project: z.ZodObject<{
|
|
172
|
+
rootFolder: z.ZodString;
|
|
173
|
+
}, z.core.$loose>;
|
|
174
|
+
backend: z.ZodOptional<z.ZodObject<{
|
|
175
|
+
domainFirstPackages: z.ZodArray<z.ZodEnum<{
|
|
176
|
+
"@domain-first/types": "@domain-first/types";
|
|
177
|
+
"@domain-first/errors": "@domain-first/errors";
|
|
178
|
+
"@domain-first/handlers": "@domain-first/handlers";
|
|
179
|
+
"@domain-first/wire": "@domain-first/wire";
|
|
180
|
+
"@domain-first/handlers-rest": "@domain-first/handlers-rest";
|
|
181
|
+
}>>;
|
|
182
|
+
envBranches: z.ZodOptional<z.ZodObject<{
|
|
183
|
+
names: z.ZodArray<z.ZodString>;
|
|
184
|
+
test: z.ZodOptional<z.ZodString>;
|
|
185
|
+
}, z.core.$strip>>;
|
|
186
|
+
withInMemoryDb: z.ZodOptional<z.ZodBoolean>;
|
|
187
|
+
testingLibrary: z.ZodOptional<z.ZodString>;
|
|
188
|
+
implementations: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
189
|
+
queries: "queries";
|
|
190
|
+
commands: "commands";
|
|
191
|
+
repositories: "repositories";
|
|
192
|
+
ports: "ports";
|
|
193
|
+
}> & z.core.$partial, z.ZodObject<{
|
|
194
|
+
primary: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
195
|
+
test: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
196
|
+
}, z.core.$strict>>>;
|
|
197
|
+
rules: z.ZodOptional<z.ZodObject<{
|
|
198
|
+
dependencies: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
199
|
+
queries: "queries";
|
|
200
|
+
commands: "commands";
|
|
201
|
+
"use-cases": "use-cases";
|
|
202
|
+
"application-ports": "application-ports";
|
|
203
|
+
repositories: "repositories";
|
|
204
|
+
"domain-services": "domain-services";
|
|
205
|
+
"application-services": "application-services";
|
|
206
|
+
"infrastructure-services": "infrastructure-services";
|
|
207
|
+
"presentation-services": "presentation-services";
|
|
208
|
+
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodArray<z.ZodEnum<{
|
|
209
|
+
queries: "queries";
|
|
210
|
+
commands: "commands";
|
|
211
|
+
"use-cases": "use-cases";
|
|
212
|
+
"application-ports": "application-ports";
|
|
213
|
+
repositories: "repositories";
|
|
214
|
+
"domain-services": "domain-services";
|
|
215
|
+
"application-services": "application-services";
|
|
216
|
+
"infrastructure-services": "infrastructure-services";
|
|
217
|
+
"presentation-services": "presentation-services";
|
|
218
|
+
}>>, z.ZodObject<{
|
|
219
|
+
add: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
220
|
+
queries: "queries";
|
|
221
|
+
commands: "commands";
|
|
222
|
+
"use-cases": "use-cases";
|
|
223
|
+
"application-ports": "application-ports";
|
|
224
|
+
repositories: "repositories";
|
|
225
|
+
"domain-services": "domain-services";
|
|
226
|
+
"application-services": "application-services";
|
|
227
|
+
"infrastructure-services": "infrastructure-services";
|
|
228
|
+
"presentation-services": "presentation-services";
|
|
229
|
+
}>>>;
|
|
230
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
231
|
+
queries: "queries";
|
|
232
|
+
commands: "commands";
|
|
233
|
+
"use-cases": "use-cases";
|
|
234
|
+
"application-ports": "application-ports";
|
|
235
|
+
repositories: "repositories";
|
|
236
|
+
"domain-services": "domain-services";
|
|
237
|
+
"application-services": "application-services";
|
|
238
|
+
"infrastructure-services": "infrastructure-services";
|
|
239
|
+
"presentation-services": "presentation-services";
|
|
240
|
+
}>>>;
|
|
241
|
+
}, z.core.$strip>]>>>;
|
|
242
|
+
lint: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
243
|
+
"context-isolation": "context-isolation";
|
|
244
|
+
"shared-kernel": "shared-kernel";
|
|
245
|
+
layers: "layers";
|
|
246
|
+
dependencies: "dependencies";
|
|
247
|
+
react: "react";
|
|
248
|
+
clock: "clock";
|
|
249
|
+
}> & z.core.$partial, z.ZodBoolean>>;
|
|
250
|
+
}, z.core.$strip>>;
|
|
251
|
+
}, z.core.$loose>>;
|
|
252
|
+
frontend: z.ZodOptional<z.ZodObject<{
|
|
253
|
+
react: z.ZodOptional<z.ZodObject<{
|
|
254
|
+
framework: z.ZodOptional<z.ZodEnum<{
|
|
255
|
+
react: "react";
|
|
256
|
+
next: "next";
|
|
257
|
+
}>>;
|
|
258
|
+
storybookFramework: z.ZodOptional<z.ZodString>;
|
|
259
|
+
}, z.core.$loose>>;
|
|
260
|
+
}, z.core.$loose>>;
|
|
261
|
+
}, z.core.$loose>;
|
|
262
|
+
export type ProjectConfig = z.infer<typeof configSchema>;
|
|
263
|
+
export type BackendConfig = z.infer<typeof backendConfigSchema>;
|
|
264
|
+
/** Make the defaults editable in generated configs without resetting overrides. */
|
|
265
|
+
export declare const scaffoldBackendRules: (rules?: BackendConfig["rules"]) => NonNullable<BackendConfig["rules"]>;
|
|
266
|
+
/**
|
|
267
|
+
* Configs from earlier major versions are not read: `df-upgrade` converts
|
|
268
|
+
* them. The flat 7.x config has no `project` section.
|
|
269
|
+
*/
|
|
270
|
+
export declare const isOutdatedConfig: (value: unknown) => boolean;
|
|
271
|
+
export declare const outdatedConfigMessage = "domain-first.project-structure.config.json uses the format of an earlier major version: run npx df-upgrade.";
|
|
272
|
+
export declare class ConfigOutdatedError extends Error {
|
|
273
|
+
constructor();
|
|
274
|
+
}
|
|
76
275
|
export declare class ConfigFile {
|
|
77
|
-
readonly data:
|
|
276
|
+
readonly data: ProjectConfig;
|
|
78
277
|
private constructor();
|
|
79
278
|
static get Instance(): ConfigFile;
|
|
279
|
+
/** Backend generators require an explicitly configured backend section. */
|
|
280
|
+
static get backend(): BackendConfig;
|
|
80
281
|
private static get path();
|
|
81
282
|
static get exists(): boolean;
|
|
82
|
-
|
|
283
|
+
/** The file exists but has the shape of an earlier major version. */
|
|
284
|
+
static get outdated(): boolean;
|
|
285
|
+
static write: (config: ProjectConfig) => void;
|
|
286
|
+
/** Update only the supplied sections, preserving the latest staged changes. */
|
|
287
|
+
static update: (sections: Partial<ProjectConfig>) => void;
|
|
288
|
+
private static stage;
|
|
83
289
|
}
|
|
84
290
|
/**
|
|
85
|
-
* The dependency rules: the defaults with the config's `rules.dependencies`.
|
|
291
|
+
* The dependency rules: the defaults with the config's `backend.rules.dependencies`.
|
|
86
292
|
*/
|
|
87
293
|
export declare const configuredDependencyRules: () => import("./dependency-rules").DependencyRules;
|
|
88
|
-
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const crossContextImplementation = "cross-context";
|
|
2
|
+
/** Context folders follow the same directory layout as the CLI context menu. */
|
|
3
|
+
export declare const hasNeighboringBoundedContext: (ownerPath: string) => boolean;
|
|
4
|
+
/** A file inside a bounded context, including its project source root. */
|
|
5
|
+
export declare const boundedContextLocation: (file: string) => {
|
|
6
|
+
root: string;
|
|
7
|
+
name: string;
|
|
8
|
+
segments: string[];
|
|
9
|
+
} | undefined;
|
|
10
|
+
/** The reserved implementation type, determined by its infrastructure folder. */
|
|
11
|
+
export declare const isCrossContextImplementation: (file: string) => boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Undefined for local/shared dependencies. Across contexts, only
|
|
14
|
+
* cross-context port adapters and their wiring reach application handlers.
|
|
15
|
+
*/
|
|
16
|
+
export declare const crossContextImportAllowed: (from: string, to: string) => boolean | undefined;
|
|
@@ -15,45 +15,45 @@ export declare const defaultDependencies: Record<ModuleKind, ModuleKind[]>;
|
|
|
15
15
|
* A list replaces the default one; `add` and `remove` change it.
|
|
16
16
|
*/
|
|
17
17
|
export declare const dependencyRulesSchema: z.ZodRecord<z.ZodEnum<{
|
|
18
|
+
queries: "queries";
|
|
19
|
+
commands: "commands";
|
|
20
|
+
"use-cases": "use-cases";
|
|
21
|
+
"application-ports": "application-ports";
|
|
18
22
|
repositories: "repositories";
|
|
19
23
|
"domain-services": "domain-services";
|
|
20
|
-
"application-ports": "application-ports";
|
|
21
24
|
"application-services": "application-services";
|
|
22
|
-
"use-cases": "use-cases";
|
|
23
|
-
commands: "commands";
|
|
24
|
-
queries: "queries";
|
|
25
25
|
"infrastructure-services": "infrastructure-services";
|
|
26
26
|
"presentation-services": "presentation-services";
|
|
27
27
|
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodArray<z.ZodEnum<{
|
|
28
|
+
queries: "queries";
|
|
29
|
+
commands: "commands";
|
|
30
|
+
"use-cases": "use-cases";
|
|
31
|
+
"application-ports": "application-ports";
|
|
28
32
|
repositories: "repositories";
|
|
29
33
|
"domain-services": "domain-services";
|
|
30
|
-
"application-ports": "application-ports";
|
|
31
34
|
"application-services": "application-services";
|
|
32
|
-
"use-cases": "use-cases";
|
|
33
|
-
commands: "commands";
|
|
34
|
-
queries: "queries";
|
|
35
35
|
"infrastructure-services": "infrastructure-services";
|
|
36
36
|
"presentation-services": "presentation-services";
|
|
37
37
|
}>>, z.ZodObject<{
|
|
38
38
|
add: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
39
|
+
queries: "queries";
|
|
40
|
+
commands: "commands";
|
|
41
|
+
"use-cases": "use-cases";
|
|
42
|
+
"application-ports": "application-ports";
|
|
39
43
|
repositories: "repositories";
|
|
40
44
|
"domain-services": "domain-services";
|
|
41
|
-
"application-ports": "application-ports";
|
|
42
45
|
"application-services": "application-services";
|
|
43
|
-
"use-cases": "use-cases";
|
|
44
|
-
commands: "commands";
|
|
45
|
-
queries: "queries";
|
|
46
46
|
"infrastructure-services": "infrastructure-services";
|
|
47
47
|
"presentation-services": "presentation-services";
|
|
48
48
|
}>>>;
|
|
49
49
|
remove: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
50
|
+
queries: "queries";
|
|
51
|
+
commands: "commands";
|
|
52
|
+
"use-cases": "use-cases";
|
|
53
|
+
"application-ports": "application-ports";
|
|
50
54
|
repositories: "repositories";
|
|
51
55
|
"domain-services": "domain-services";
|
|
52
|
-
"application-ports": "application-ports";
|
|
53
56
|
"application-services": "application-services";
|
|
54
|
-
"use-cases": "use-cases";
|
|
55
|
-
commands: "commands";
|
|
56
|
-
queries: "queries";
|
|
57
57
|
"infrastructure-services": "infrastructure-services";
|
|
58
58
|
"presentation-services": "presentation-services";
|
|
59
59
|
}>>>;
|
|
@@ -64,7 +64,7 @@ export declare const defaultDependencyRules: DependencyRules;
|
|
|
64
64
|
/**
|
|
65
65
|
* The kind of a wired module: its folder under `wiring/`.
|
|
66
66
|
*/
|
|
67
|
-
export declare const wiredModuleKind: (wiringKind: string) => "
|
|
67
|
+
export declare const wiredModuleKind: (wiringKind: string) => "queries" | "commands" | "use-cases" | "application-ports" | "repositories" | "domain-services" | "application-services" | "infrastructure-services" | "presentation-services" | undefined;
|
|
68
68
|
/**
|
|
69
69
|
* The kind of a module file, from its path inside a context or the
|
|
70
70
|
* Shared Kernel (`application/use-cases/…`), or undefined for other files
|
package/dist/file-system.d.ts
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Existing files a full rewrite would replace, whatever their content.
|
|
3
3
|
*/
|
|
4
|
-
export declare const filesToOverwrite: (
|
|
4
|
+
export declare const filesToOverwrite: ({ changedOnly }?: {
|
|
5
|
+
changedOnly?: boolean;
|
|
6
|
+
}) => string[];
|
|
7
|
+
/** Review the staged transaction before it is written or discarded. */
|
|
8
|
+
export declare const pendingChanges: () => {
|
|
9
|
+
created: string[];
|
|
10
|
+
updated: string[];
|
|
11
|
+
deleted: string[];
|
|
12
|
+
directories: string[];
|
|
13
|
+
};
|
|
5
14
|
/**
|
|
6
15
|
* Runs a generator that only adds files: its rewrites of files that
|
|
7
16
|
* already exist on disk are dropped, so files edited by the user stay.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ImplementationKind, type ImplementationPurpose } from './implementation-options-schema';
|
|
2
|
+
export { type ImplementationKind, type ImplementationPurpose, implementationKinds } from './implementation-options-schema';
|
|
3
|
+
/** Implementation choices now live in the shared project config. */
|
|
4
|
+
export declare const implementationChoicesFileName = "domain-first.project-structure.config.json";
|
|
5
|
+
/** Saved choices are project-wide, isolated by contract kind and environment role. */
|
|
6
|
+
export declare const savedImplementations: (kind: ImplementationKind, purpose: ImplementationPurpose) => string[];
|
|
7
|
+
/** Cancelling a run cancels its saved choices and any config migration too. */
|
|
8
|
+
export declare const rememberImplementation: (kind: ImplementationKind, purpose: ImplementationPurpose, label: string) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
export declare const implementationKinds: readonly ["repositories", "commands", "queries", "ports"];
|
|
3
|
+
export type ImplementationKind = (typeof implementationKinds)[number];
|
|
4
|
+
export type ImplementationPurpose = 'primary' | 'test';
|
|
5
|
+
export declare const implementationLabelSchema: z.ZodString;
|
|
6
|
+
export declare const implementationOptionsSchema: z.ZodRecord<z.ZodEnum<{
|
|
7
|
+
queries: "queries";
|
|
8
|
+
commands: "commands";
|
|
9
|
+
repositories: "repositories";
|
|
10
|
+
ports: "ports";
|
|
11
|
+
}> & z.core.$partial, z.ZodObject<{
|
|
12
|
+
primary: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
13
|
+
test: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
14
|
+
}, z.core.$strict>>;
|