@domain-first/project-structure 2.13.0 → 2.13.1

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 CHANGED
@@ -234,7 +234,9 @@ selected scripts. It does not install packages or execute scripts. Install comma
234
234
  framework, Vite and the React plugin; existing dependency versions are preserved
235
235
  and must be compatible with those packages. Generate a
236
236
  UI-kit component or a widget with separated UI to add your first story. The
237
- static build goes to `<rootFolder>/presentation/react/storybook-static`.
237
+ static build goes to `<rootFolder>/presentation/react/storybook-static`; the
238
+ integration adds this directory to the project `.gitignore` without duplicating
239
+ the entry on subsequent runs.
238
240
 
239
241
  ### Missing domain-first packages
240
242
 
package/dist/index.cjs CHANGED
@@ -376,6 +376,7 @@ const addPrisma = async ()=>{
376
376
  'Next steps (run from the project package directory):',
377
377
  ...install(runtimePackages, false),
378
378
  ...install(developmentPackages, true),
379
+ ` Add !${relativeFolder} in your linter, to ignore prisma files.`,
379
380
  ' Existing dependency versions were kept.',
380
381
  ' Use Node.js 22.18+ and TypeScript 5.9+ with ESM and JSON import support.',
381
382
  ' Set DATABASE_URL in your project environment (.env for the CLI); load it in the application runtime too.',
@@ -466,6 +467,14 @@ const addStorybook = async ()=>{
466
467
  useReact: true,
467
468
  storybookFramework: '@storybook/react-vite'
468
469
  });
470
+ const buildFolder = external_node_path_default().posix.join(config.rootFolder.replaceAll('\\', '/'), 'presentation/react/storybook-static');
471
+ const ignoreEntry = `/${buildFolder}/`;
472
+ const gitignore = new File(external_node_path_default().join(root, '.gitignore'));
473
+ const ignored = gitignore.exists ? gitignore.data : '';
474
+ if (!ignored.split(/\r?\n/).includes(ignoreEntry)) {
475
+ const newline = ignored.includes('\r\n') ? '\r\n' : '\n';
476
+ gitignore.update(`${ignored}${ignored && !ignored.endsWith('\n') ? newline : ''}${ignoreEntry}${newline}`);
477
+ }
469
478
  const dependencies = {
470
479
  ...manifest.dependencies,
471
480
  ...manifest.devDependencies
@@ -527,7 +536,10 @@ const addIntegration = async ()=>{
527
536
  if (nextSteps.length) console.log(nextSteps.map((line)=>/^\s*npm (?:i|install)\b/.test(line) ? (0, external_node_util_namespaceObject.styleText)([
528
537
  'bold',
529
538
  'cyan'
530
- ], line) : line).join('\n'));
539
+ ], line) : line.replace(/^(\s*Add )(!\S+)/, (_, prefix, path)=>prefix + (0, external_node_util_namespaceObject.styleText)([
540
+ 'bold',
541
+ 'cyan'
542
+ ], path))).join('\n'));
531
543
  }
532
544
  };
533
545
  const initializeUseCase = async ()=>{
package/dist/index.js CHANGED
@@ -346,6 +346,7 @@ const addPrisma = async ()=>{
346
346
  'Next steps (run from the project package directory):',
347
347
  ...install(runtimePackages, false),
348
348
  ...install(developmentPackages, true),
349
+ ` Add !${relativeFolder} in your linter, to ignore prisma files.`,
349
350
  ' Existing dependency versions were kept.',
350
351
  ' Use Node.js 22.18+ and TypeScript 5.9+ with ESM and JSON import support.',
351
352
  ' Set DATABASE_URL in your project environment (.env for the CLI); load it in the application runtime too.',
@@ -436,6 +437,14 @@ const addStorybook = async ()=>{
436
437
  useReact: true,
437
438
  storybookFramework: '@storybook/react-vite'
438
439
  });
440
+ const buildFolder = node_path.posix.join(config.rootFolder.replaceAll('\\', '/'), 'presentation/react/storybook-static');
441
+ const ignoreEntry = `/${buildFolder}/`;
442
+ const gitignore = new File(node_path.join(root, '.gitignore'));
443
+ const ignored = gitignore.exists ? gitignore.data : '';
444
+ if (!ignored.split(/\r?\n/).includes(ignoreEntry)) {
445
+ const newline = ignored.includes('\r\n') ? '\r\n' : '\n';
446
+ gitignore.update(`${ignored}${ignored && !ignored.endsWith('\n') ? newline : ''}${ignoreEntry}${newline}`);
447
+ }
439
448
  const dependencies = {
440
449
  ...manifest.dependencies,
441
450
  ...manifest.devDependencies
@@ -497,7 +506,10 @@ const addIntegration = async ()=>{
497
506
  if (nextSteps.length) console.log(nextSteps.map((line)=>/^\s*npm (?:i|install)\b/.test(line) ? styleText([
498
507
  'bold',
499
508
  'cyan'
500
- ], line) : line).join('\n'));
509
+ ], line) : line.replace(/^(\s*Add )(!\S+)/, (_, prefix, path)=>prefix + styleText([
510
+ 'bold',
511
+ 'cyan'
512
+ ], path))).join('\n'));
501
513
  }
502
514
  };
503
515
  const initializeUseCase = async ()=>{
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.13.0",
4
+ "version": "2.13.1",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",