@domain-first/project-structure 2.10.1 → 2.10.3
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 +1 -1
- package/dist/index.cjs +6 -5
- package/dist/index.js +6 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -84,7 +84,7 @@ A bounded context groups a business area and its implementation. Within it, each
|
|
|
84
84
|
| `presentation/` | REST endpoints and presentation services. |
|
|
85
85
|
| `wiring/` | Factories that construct components and select implementations, when `@domain-first/wire` is enabled. |
|
|
86
86
|
|
|
87
|
-
The **Shared Layer** menu provides cross-context errors, entities and value objects, application ports, and application, infrastructure, and presentation services under `<rootFolder>/shared`.
|
|
87
|
+
The **Shared Layer** menu provides cross-context errors, entities and value objects, application ports, and domain, application, infrastructure, and presentation services under `<rootFolder>/shared`.
|
|
88
88
|
|
|
89
89
|
A project using handler and wiring integrations can grow into this structure:
|
|
90
90
|
|
package/dist/index.cjs
CHANGED
|
@@ -236,7 +236,7 @@ import { branchedWire } from '@domain-first/wire'
|
|
|
236
236
|
export const envBranchedWire = branchedWire(() => {
|
|
237
237
|
return process.env.NODE_ENV ?? 'development' as 'test' | 'development' | 'production'
|
|
238
238
|
});
|
|
239
|
-
|
|
239
|
+
`.trim());
|
|
240
240
|
if (domainFirstPackages.includes('@domain-first/errors')) rootFolder.subitem([
|
|
241
241
|
rootFolderName,
|
|
242
242
|
'shared'
|
|
@@ -313,7 +313,7 @@ describe('${aggregateNaming.withSpaces}', () => {
|
|
|
313
313
|
expect(${aggregateNaming.variableName}).toBeDefined()
|
|
314
314
|
})
|
|
315
315
|
})
|
|
316
|
-
|
|
316
|
+
`.trim());
|
|
317
317
|
if (withRepository) {
|
|
318
318
|
aggregatesFolder.createFile(`${aggregateNaming.fileName}-repository.ts`, `export abstract class ${aggregateNaming.ClassName}Repository { }`);
|
|
319
319
|
barrelFile.addLine(`export * from './${aggregateNaming.fileName}-repository'`);
|
|
@@ -444,7 +444,7 @@ import { ${naming.ClassName} } from '../../../application/ports/${naming.fileNam
|
|
|
444
444
|
export class ${currentNaming.ClassName} extends ${naming.ClassName} {
|
|
445
445
|
|
|
446
446
|
}
|
|
447
|
-
|
|
447
|
+
`.trim());
|
|
448
448
|
}
|
|
449
449
|
if (scaffoldUnitTests) {
|
|
450
450
|
const implementationNaming = new UnknownFormatNaming(implementationType);
|
|
@@ -983,7 +983,7 @@ export const wire${endpointNaming.ClassName} = wireClass(
|
|
|
983
983
|
${endpointNaming.ClassName},
|
|
984
984
|
[]
|
|
985
985
|
)
|
|
986
|
-
|
|
986
|
+
`.trim());
|
|
987
987
|
wiringFolder.file('index.ts').addLine(`export * from './${wireNaming.fileName}'`);
|
|
988
988
|
}
|
|
989
989
|
};
|
|
@@ -1626,7 +1626,8 @@ const main = async ()=>{
|
|
|
1626
1626
|
] : [
|
|
1627
1627
|
'New Entity',
|
|
1628
1628
|
'New Value Object',
|
|
1629
|
-
'Errors'
|
|
1629
|
+
'Errors',
|
|
1630
|
+
'New Service'
|
|
1630
1631
|
]
|
|
1631
1632
|
});
|
|
1632
1633
|
switch(operation){
|
package/dist/index.js
CHANGED
|
@@ -206,7 +206,7 @@ import { branchedWire } from '@domain-first/wire'
|
|
|
206
206
|
export const envBranchedWire = branchedWire(() => {
|
|
207
207
|
return process.env.NODE_ENV ?? 'development' as 'test' | 'development' | 'production'
|
|
208
208
|
});
|
|
209
|
-
|
|
209
|
+
`.trim());
|
|
210
210
|
if (domainFirstPackages.includes('@domain-first/errors')) rootFolder.subitem([
|
|
211
211
|
rootFolderName,
|
|
212
212
|
'shared'
|
|
@@ -283,7 +283,7 @@ describe('${aggregateNaming.withSpaces}', () => {
|
|
|
283
283
|
expect(${aggregateNaming.variableName}).toBeDefined()
|
|
284
284
|
})
|
|
285
285
|
})
|
|
286
|
-
|
|
286
|
+
`.trim());
|
|
287
287
|
if (withRepository) {
|
|
288
288
|
aggregatesFolder.createFile(`${aggregateNaming.fileName}-repository.ts`, `export abstract class ${aggregateNaming.ClassName}Repository { }`);
|
|
289
289
|
barrelFile.addLine(`export * from './${aggregateNaming.fileName}-repository'`);
|
|
@@ -414,7 +414,7 @@ import { ${naming.ClassName} } from '../../../application/ports/${naming.fileNam
|
|
|
414
414
|
export class ${currentNaming.ClassName} extends ${naming.ClassName} {
|
|
415
415
|
|
|
416
416
|
}
|
|
417
|
-
|
|
417
|
+
`.trim());
|
|
418
418
|
}
|
|
419
419
|
if (scaffoldUnitTests) {
|
|
420
420
|
const implementationNaming = new UnknownFormatNaming(implementationType);
|
|
@@ -953,7 +953,7 @@ export const wire${endpointNaming.ClassName} = wireClass(
|
|
|
953
953
|
${endpointNaming.ClassName},
|
|
954
954
|
[]
|
|
955
955
|
)
|
|
956
|
-
|
|
956
|
+
`.trim());
|
|
957
957
|
wiringFolder.file('index.ts').addLine(`export * from './${wireNaming.fileName}'`);
|
|
958
958
|
}
|
|
959
959
|
};
|
|
@@ -1596,7 +1596,8 @@ const main = async ()=>{
|
|
|
1596
1596
|
] : [
|
|
1597
1597
|
'New Entity',
|
|
1598
1598
|
'New Value Object',
|
|
1599
|
-
'Errors'
|
|
1599
|
+
'Errors',
|
|
1600
|
+
'New Service'
|
|
1600
1601
|
]
|
|
1601
1602
|
});
|
|
1602
1603
|
switch(operation){
|