@domain-first/project-structure 0.0.1 → 0.0.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
@@ -181,7 +181,7 @@ const initializeUseCase = async ()=>{
181
181
  import { branchedWire } from '@domain-first/wire'
182
182
 
183
183
  export const envBranchedWire = branchedWire(() => {
184
- return process.env.NODE_ENV as 'test' | 'development' | 'production'
184
+ return process.env.NODE_ENV ?? 'development' as 'test' | 'development' | 'production'
185
185
  });
186
186
  `);
187
187
  if (domainFirstPackages.includes('@domain-first/errors')) rootFolder.subitem([
@@ -650,7 +650,7 @@ export class ${endpointNaming.ClassName} {
650
650
 
651
651
  get handle() {
652
652
  return this.endpointGenerator(this.logic, {
653
- route: { method: '${method}', path: ['${controller}'${path.length ? `, ${path.map((x)=>`'${x}'`).join(', ')}` : ''}] },
653
+ route: { method: '${method}', path: ['${boundedContextFolder.name}-${controller}'${path.length ? `, ${path.map((x)=>`'${x}'`).join(', ')}` : ''}] },
654
654
  tags: ['${boundedContextFolder.name}: ${controller}'],
655
655
  })
656
656
  }
package/dist/index.js CHANGED
@@ -151,7 +151,7 @@ const initializeUseCase = async ()=>{
151
151
  import { branchedWire } from '@domain-first/wire'
152
152
 
153
153
  export const envBranchedWire = branchedWire(() => {
154
- return process.env.NODE_ENV as 'test' | 'development' | 'production'
154
+ return process.env.NODE_ENV ?? 'development' as 'test' | 'development' | 'production'
155
155
  });
156
156
  `);
157
157
  if (domainFirstPackages.includes('@domain-first/errors')) rootFolder.subitem([
@@ -620,7 +620,7 @@ export class ${endpointNaming.ClassName} {
620
620
 
621
621
  get handle() {
622
622
  return this.endpointGenerator(this.logic, {
623
- route: { method: '${method}', path: ['${controller}'${path.length ? `, ${path.map((x)=>`'${x}'`).join(', ')}` : ''}] },
623
+ route: { method: '${method}', path: ['${boundedContextFolder.name}-${controller}'${path.length ? `, ${path.map((x)=>`'${x}'`).join(', ')}` : ''}] },
624
624
  tags: ['${boundedContextFolder.name}: ${controller}'],
625
625
  })
626
626
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@domain-first/project-structure",
3
3
  "description": "Build and manage your project structure with CLI",
4
- "version": "0.0.1",
4
+ "version": "0.0.2",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {