@domain-first/project-structure 8.7.1 → 8.9.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.
Files changed (39) hide show
  1. package/README.md +4 -2
  2. package/dist/287.js +2446 -2005
  3. package/dist/561.js +19 -3
  4. package/dist/780.js +9 -2
  5. package/dist/947.js +4 -0
  6. package/dist/agent-cli.d.ts +37 -5
  7. package/dist/agent-requests.d.ts +24 -0
  8. package/dist/backend-module-move.d.ts +16 -0
  9. package/dist/config-file.d.ts +38 -18
  10. package/dist/graph.cjs +13 -2
  11. package/dist/implementation-options-schema.d.ts +19 -9
  12. package/dist/in-memory-db.d.ts +4 -0
  13. package/dist/index.cjs +3465 -2997
  14. package/dist/init.cjs +94 -77
  15. package/dist/integration-tests.d.ts +39 -0
  16. package/dist/integration-tests.spec.d.ts +1 -0
  17. package/dist/integration.cjs +3489 -3021
  18. package/dist/integrations/drizzle.d.ts +8 -0
  19. package/dist/integrations/drizzle.spec.d.ts +1 -0
  20. package/dist/integrations/index.d.ts +1 -0
  21. package/dist/integrations/testcontainers.d.ts +1 -1
  22. package/dist/lint.cjs +13 -2
  23. package/dist/react.cjs +3465 -2997
  24. package/dist/upgrade-steps.d.ts +19 -4
  25. package/dist/upgrade.cjs +9 -2
  26. package/dist/use-cases/add-integration.d.ts +3 -3
  27. package/dist/use-cases/prompt-implementation-type.d.ts +2 -0
  28. package/package.json +1 -1
  29. package/skills/df-ps-implement/SKILL.md +2 -1
  30. package/skills/df-ps-project-scripts/SKILL.md +22 -5
  31. package/skills/df-ps-scaffold/SKILL.md +1 -0
  32. package/skills/df-ps-scaffold/references/agent-mode.md +1 -1
  33. package/skills/df-ps-scaffold/references/agent-operations.md +3 -2
  34. package/skills/df-ps-scaffold/references/generators.md +27 -2
  35. package/skills/df-ps-scaffold/references/units/aggregate.md +2 -1
  36. package/skills/df-ps-scaffold/references/units/command-query.md +2 -1
  37. package/skills/df-ps-scaffold/references/units/implementation.md +1 -1
  38. package/skills/df-ps-scaffold/references/units/port.md +1 -0
  39. package/skills/df-ps-scaffold/references/units/services.md +3 -2
@@ -0,0 +1,8 @@
1
+ /** The Drizzle folder, relative to the project root. */
2
+ export declare const drizzleFolder: (rootFolder: string) => string;
3
+ export declare const drizzleConfigPath: (rootFolder: string) => string;
4
+ export declare const drizzleScripts: (rootFolder: string) => {
5
+ 'drizzle:generate': string;
6
+ 'drizzle:migrate': string;
7
+ };
8
+ export declare const addDrizzle: () => Promise<string[]>;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,3 +1,4 @@
1
+ export * from './drizzle';
1
2
  export * from './in-memory-db';
2
3
  export * from './missing-domain-first-packages';
3
4
  export * from './openapi';
@@ -2,7 +2,7 @@ export declare const testcontainersScripts: {
2
2
  'test:integration': string;
3
3
  };
4
4
  export declare const testcontainersVitestConfig: (inlineHandlersNext: boolean) => string;
5
- export declare const testcontainersGlobalSetup: (migrationCommand?: string) => string;
5
+ export declare const testcontainersGlobalSetup: (migrationCommands?: string[]) => string;
6
6
  export declare const testcontainersSetupEnv = "import 'dotenv/config';\nimport { inject } from 'vitest';\n\n// Runs before each spec's imports: development implementations get the .env\n// config, and DATABASE_URL points to the container instead of the one from .env.\nif (process.env.NODE_ENV !== 'development') {\n throw new Error(\n `Integration specs need NODE_ENV=development to wire development implementations, got \"${process.env.NODE_ENV}\"`\n );\n}\n\nprocess.env.DATABASE_URL = inject('databaseUrl');\n";
7
7
  /**
8
8
  * Adds the integration folder to `test.exclude` of the unit test config.
package/dist/lint.cjs CHANGED
@@ -215,10 +215,17 @@ const implementationKinds = [
215
215
  'ports'
216
216
  ];
217
217
  const implementationLabelSchema = external_zod_default().string().regex(/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/);
218
- const implementationOptionsSchema = external_zod_default().partialRecord(external_zod_default()["enum"](implementationKinds), external_zod_default().object({
218
+ const implementationGroupSchema = external_zod_default().object({
219
219
  primary: external_zod_default().array(implementationLabelSchema).default([]),
220
220
  test: external_zod_default().array(implementationLabelSchema).default([])
221
- }).strict());
221
+ }).strict();
222
+ const implementationOptionsSchema = external_zod_default().object({
223
+ ...Object.fromEntries(implementationKinds.map((kind)=>[
224
+ kind,
225
+ implementationGroupSchema.optional()
226
+ ])),
227
+ integrationTests: external_zod_default().array(implementationLabelSchema).optional()
228
+ }).strict();
222
229
  class ProjectRoot {
223
230
  path;
224
231
  constructor(){
@@ -584,6 +591,10 @@ new Map([
584
591
  'prisma',
585
592
  'prisma-infrastructure-service'
586
593
  ],
594
+ [
595
+ 'drizzle',
596
+ 'drizzle-infrastructure-service'
597
+ ],
587
598
  [
588
599
  'in-memory',
589
600
  'in-memory-db-infrastructure-service'