@domain-first/project-structure 2.7.1 → 2.7.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/index.cjs CHANGED
@@ -366,7 +366,7 @@ const scaffoldNewApplicationPort = async (boundedContextFolder)=>{
366
366
  });
367
367
  const wiringFolder = boundedContextFolder.subitem([
368
368
  'wiring',
369
- 'appication-ports'
369
+ 'application-ports'
370
370
  ]);
371
371
  const applicationPortsFolder = boundedContextFolder.subitem([
372
372
  'application',
@@ -378,9 +378,9 @@ export abstract class ${naming.ClassName} {
378
378
  }
379
379
  `.trim());
380
380
  if (scaffoldUnitTests) applicationPortsFolder.createFile(`${naming.fileName}.spec.ts`, `
381
- import { define, test, expect, beforeEach } from '${ConfigFile.Instance.data.testingLibrary}'
381
+ import { describe, test, expect, beforeEach } from '${ConfigFile.Instance.data.testingLibrary}'
382
382
  import { type ${naming.ClassName} } from './${naming.fileName}'
383
- import { wire${naming.ClassName} } from '../../wiring/ports/wire-${naming.fileName}'
383
+ import { wire${naming.ClassName} } from '../../wiring/application-ports/wire-${naming.fileName}'
384
384
 
385
385
  let ${naming.variableName}: ${naming.ClassName}
386
386
 
@@ -388,7 +388,7 @@ beforeEach(() => {
388
388
  ${naming.variableName} = wire${naming.ClassName}()
389
389
  })
390
390
 
391
- define('${naming.withSpaces}', () => {
391
+ describe('${naming.withSpaces}', () => {
392
392
  test('can be wired', () => {
393
393
  expect(${naming.variableName}).toBeDefined()
394
394
  })
@@ -603,7 +603,7 @@ export class ${formatNaming.ClassName}${naming.ClassName}Command extends ${namin
603
603
  })
604
604
  }
605
605
  `.trim() : `
606
- import { ${naming.ClassName}Command } from '../../../domain/commands/${naming.fileName}-command'
606
+ import { ${naming.ClassName}Command } from '../../../application/commands/execution/${naming.fileName}-command'
607
607
 
608
608
  export class ${formatNaming.ClassName}${naming.ClassName}Command extends ${naming.ClassName}Command {
609
609
  constructor() {
@@ -624,7 +624,9 @@ export abstract class ${naming.ClassName}Command {
624
624
  abstract handle: Handler<typeof ${naming.ClassName}Command.inputSchema, typeof ${naming.ClassName}Command.outputSchema>
625
625
  }
626
626
  `.trim());
627
- else commandsFolder.createFile(`${naming.fileName}-command.ts`, `
627
+ else commandsFolder.subitem([
628
+ 'execution'
629
+ ]).createFile(`${naming.fileName}-command.ts`, `
628
630
  export abstract class ${naming.ClassName}Command {
629
631
 
630
632
  }`.trim());
@@ -1057,7 +1059,7 @@ export class ${formatNaming.ClassName}${naming.ClassName}Query extends ${naming.
1057
1059
  })
1058
1060
  }
1059
1061
  `.trim() : `
1060
- import { ${naming.ClassName}Query } from '../../../domain/queries/${naming.fileName}-query'
1062
+ import { ${naming.ClassName}Query } from '../../../application/queries/execution/${naming.fileName}-query'
1061
1063
 
1062
1064
  export class ${formatNaming.ClassName}${naming.ClassName}Query extends ${naming.ClassName}Query {
1063
1065
  constructor() {
@@ -1078,7 +1080,9 @@ export abstract class ${naming.ClassName}Query {
1078
1080
  abstract handle: Handler<typeof ${naming.ClassName}Query.inputSchema, typeof ${naming.ClassName}Query.outputSchema>
1079
1081
  }
1080
1082
  `.trim());
1081
- else queriesFolder.createFile(`${naming.fileName}-query.ts`, `
1083
+ else queriesFolder.subitem([
1084
+ 'execution'
1085
+ ]).createFile(`${naming.fileName}-query.ts`, `
1082
1086
  export abstract class ${naming.ClassName}Query {
1083
1087
 
1084
1088
  }`.trim());
package/dist/index.js CHANGED
@@ -336,7 +336,7 @@ const scaffoldNewApplicationPort = async (boundedContextFolder)=>{
336
336
  });
337
337
  const wiringFolder = boundedContextFolder.subitem([
338
338
  'wiring',
339
- 'appication-ports'
339
+ 'application-ports'
340
340
  ]);
341
341
  const applicationPortsFolder = boundedContextFolder.subitem([
342
342
  'application',
@@ -348,9 +348,9 @@ export abstract class ${naming.ClassName} {
348
348
  }
349
349
  `.trim());
350
350
  if (scaffoldUnitTests) applicationPortsFolder.createFile(`${naming.fileName}.spec.ts`, `
351
- import { define, test, expect, beforeEach } from '${ConfigFile.Instance.data.testingLibrary}'
351
+ import { describe, test, expect, beforeEach } from '${ConfigFile.Instance.data.testingLibrary}'
352
352
  import { type ${naming.ClassName} } from './${naming.fileName}'
353
- import { wire${naming.ClassName} } from '../../wiring/ports/wire-${naming.fileName}'
353
+ import { wire${naming.ClassName} } from '../../wiring/application-ports/wire-${naming.fileName}'
354
354
 
355
355
  let ${naming.variableName}: ${naming.ClassName}
356
356
 
@@ -358,7 +358,7 @@ beforeEach(() => {
358
358
  ${naming.variableName} = wire${naming.ClassName}()
359
359
  })
360
360
 
361
- define('${naming.withSpaces}', () => {
361
+ describe('${naming.withSpaces}', () => {
362
362
  test('can be wired', () => {
363
363
  expect(${naming.variableName}).toBeDefined()
364
364
  })
@@ -573,7 +573,7 @@ export class ${formatNaming.ClassName}${naming.ClassName}Command extends ${namin
573
573
  })
574
574
  }
575
575
  `.trim() : `
576
- import { ${naming.ClassName}Command } from '../../../domain/commands/${naming.fileName}-command'
576
+ import { ${naming.ClassName}Command } from '../../../application/commands/execution/${naming.fileName}-command'
577
577
 
578
578
  export class ${formatNaming.ClassName}${naming.ClassName}Command extends ${naming.ClassName}Command {
579
579
  constructor() {
@@ -594,7 +594,9 @@ export abstract class ${naming.ClassName}Command {
594
594
  abstract handle: Handler<typeof ${naming.ClassName}Command.inputSchema, typeof ${naming.ClassName}Command.outputSchema>
595
595
  }
596
596
  `.trim());
597
- else commandsFolder.createFile(`${naming.fileName}-command.ts`, `
597
+ else commandsFolder.subitem([
598
+ 'execution'
599
+ ]).createFile(`${naming.fileName}-command.ts`, `
598
600
  export abstract class ${naming.ClassName}Command {
599
601
 
600
602
  }`.trim());
@@ -1027,7 +1029,7 @@ export class ${formatNaming.ClassName}${naming.ClassName}Query extends ${naming.
1027
1029
  })
1028
1030
  }
1029
1031
  `.trim() : `
1030
- import { ${naming.ClassName}Query } from '../../../domain/queries/${naming.fileName}-query'
1032
+ import { ${naming.ClassName}Query } from '../../../application/queries/execution/${naming.fileName}-query'
1031
1033
 
1032
1034
  export class ${formatNaming.ClassName}${naming.ClassName}Query extends ${naming.ClassName}Query {
1033
1035
  constructor() {
@@ -1048,7 +1050,9 @@ export abstract class ${naming.ClassName}Query {
1048
1050
  abstract handle: Handler<typeof ${naming.ClassName}Query.inputSchema, typeof ${naming.ClassName}Query.outputSchema>
1049
1051
  }
1050
1052
  `.trim());
1051
- else queriesFolder.createFile(`${naming.fileName}-query.ts`, `
1053
+ else queriesFolder.subitem([
1054
+ 'execution'
1055
+ ]).createFile(`${naming.fileName}-query.ts`, `
1052
1056
  export abstract class ${naming.ClassName}Query {
1053
1057
 
1054
1058
  }`.trim());
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@domain-first/project-structure",
3
3
  "description": "Build and manage your Domain-First project structure with CLI",
4
- "version": "2.7.1",
4
+ "version": "2.7.2",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",