@storm-software/workspace-tools 1.39.0 → 1.40.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.
@@ -41666,9 +41666,9 @@ var require_generator = __commonJS({
41666
41666
  }
41667
41667
  });
41668
41668
 
41669
- // node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_eslint@8.53.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/utils/flat-config.js
41669
+ // node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/utils/flat-config.js
41670
41670
  var require_flat_config = __commonJS({
41671
- "node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_eslint@8.53.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/utils/flat-config.js"(exports) {
41671
+ "node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/utils/flat-config.js"(exports) {
41672
41672
  "use strict";
41673
41673
  Object.defineProperty(exports, "__esModule", { value: true });
41674
41674
  exports.useFlatConfig = void 0;
@@ -41679,9 +41679,9 @@ var require_flat_config = __commonJS({
41679
41679
  }
41680
41680
  });
41681
41681
 
41682
- // node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_eslint@8.53.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/generators/utils/flat-config/ast-utils.js
41682
+ // node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/generators/utils/flat-config/ast-utils.js
41683
41683
  var require_ast_utils2 = __commonJS({
41684
- "node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_eslint@8.53.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/generators/utils/flat-config/ast-utils.js"(exports) {
41684
+ "node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/generators/utils/flat-config/ast-utils.js"(exports) {
41685
41685
  "use strict";
41686
41686
  Object.defineProperty(exports, "__esModule", { value: true });
41687
41687
  exports.generateAst = exports.mapFilePath = exports.mapFilePaths = exports.generateFlatOverride = exports.generateRequire = exports.stringifyNodeList = exports.generatePluginExtendsElement = exports.generateSpreadElement = exports.createNodeList = exports.addCompatToFlatConfig = exports.addPluginsToExportsBlock = exports.removeCompatExtends = exports.removePlugin = exports.addBlockToFlatConfigExport = exports.addImportToFlatConfig = exports.replaceOverride = exports.hasOverride = exports.removeOverridesFromLintConfig = void 0;
@@ -42153,9 +42153,9 @@ const compat = new FlatCompat({
42153
42153
  }
42154
42154
  });
42155
42155
 
42156
- // node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_eslint@8.53.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/generators/utils/eslint-file.js
42156
+ // node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/generators/utils/eslint-file.js
42157
42157
  var require_eslint_file = __commonJS({
42158
- "node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_eslint@8.53.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/generators/utils/eslint-file.js"(exports) {
42158
+ "node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/generators/utils/eslint-file.js"(exports) {
42159
42159
  "use strict";
42160
42160
  Object.defineProperty(exports, "__esModule", { value: true });
42161
42161
  exports.getPluginImport = exports.addIgnoresToLintConfig = exports.addPluginsToLintConfig = exports.addExtendsToLintConfig = exports.replaceOverridesInLintConfig = exports.lintConfigHasOverride = exports.updateOverrideInLintConfig = exports.addOverrideToLintConfig = exports.updateRelativePathsInConfig = exports.isEslintConfigSupported = exports.findEslintFile = exports.baseEsLintFlatConfigFile = exports.baseEsLintConfigFile = exports.eslintConfigFileWhitelist = void 0;
@@ -42414,9 +42414,9 @@ var require_eslint_file = __commonJS({
42414
42414
  }
42415
42415
  });
42416
42416
 
42417
- // node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_eslint@8.53.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/package.json
42417
+ // node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/package.json
42418
42418
  var require_package4 = __commonJS({
42419
- "node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_eslint@8.53.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/package.json"(exports, module2) {
42419
+ "node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/package.json"(exports, module2) {
42420
42420
  module2.exports = {
42421
42421
  name: "@nx/eslint",
42422
42422
  version: "17.0.3",
@@ -42471,9 +42471,9 @@ var require_package4 = __commonJS({
42471
42471
  }
42472
42472
  });
42473
42473
 
42474
- // node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_eslint@8.53.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/utils/versions.js
42474
+ // node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/utils/versions.js
42475
42475
  var require_versions4 = __commonJS({
42476
- "node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_eslint@8.53.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/utils/versions.js"(exports) {
42476
+ "node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/utils/versions.js"(exports) {
42477
42477
  "use strict";
42478
42478
  Object.defineProperty(exports, "__esModule", { value: true });
42479
42479
  exports.typescriptESLintVersion = exports.eslintConfigPrettierVersion = exports.eslintrcVersion = exports.eslintVersion = exports.nxVersion = void 0;
@@ -42485,9 +42485,9 @@ var require_versions4 = __commonJS({
42485
42485
  }
42486
42486
  });
42487
42487
 
42488
- // node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_eslint@8.53.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/generators/init/global-eslint-config.js
42488
+ // node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/generators/init/global-eslint-config.js
42489
42489
  var require_global_eslint_config = __commonJS({
42490
- "node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_eslint@8.53.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/generators/init/global-eslint-config.js"(exports) {
42490
+ "node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/generators/init/global-eslint-config.js"(exports) {
42491
42491
  "use strict";
42492
42492
  Object.defineProperty(exports, "__esModule", { value: true });
42493
42493
  exports.getGlobalFlatEslintConfiguration = exports.getGlobalEsLintConfiguration = exports.javaScriptOverride = exports.typeScriptOverride = void 0;
@@ -42573,9 +42573,9 @@ var require_global_eslint_config = __commonJS({
42573
42573
  }
42574
42574
  });
42575
42575
 
42576
- // node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_eslint@8.53.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/generators/init/init.js
42576
+ // node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/generators/init/init.js
42577
42577
  var require_init2 = __commonJS({
42578
- "node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_eslint@8.53.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/generators/init/init.js"(exports) {
42578
+ "node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/generators/init/init.js"(exports) {
42579
42579
  "use strict";
42580
42580
  Object.defineProperty(exports, "__esModule", { value: true });
42581
42581
  exports.lintInitGenerator = void 0;
@@ -42639,9 +42639,9 @@ var require_init2 = __commonJS({
42639
42639
  }
42640
42640
  });
42641
42641
 
42642
- // node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_eslint@8.53.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/generators/init/init-migration.js
42642
+ // node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/generators/init/init-migration.js
42643
42643
  var require_init_migration = __commonJS({
42644
- "node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_eslint@8.53.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/generators/init/init-migration.js"(exports) {
42644
+ "node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/generators/init/init-migration.js"(exports) {
42645
42645
  "use strict";
42646
42646
  Object.defineProperty(exports, "__esModule", { value: true });
42647
42647
  exports.findLintTarget = exports.migrateConfigToMonorepoStyle = void 0;
@@ -42730,9 +42730,9 @@ var require_init_migration = __commonJS({
42730
42730
  }
42731
42731
  });
42732
42732
 
42733
- // node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_eslint@8.53.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/generators/lint-project/lint-project.js
42733
+ // node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/generators/lint-project/lint-project.js
42734
42734
  var require_lint_project = __commonJS({
42735
- "node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_eslint@8.53.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/generators/lint-project/lint-project.js"(exports) {
42735
+ "node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/generators/lint-project/lint-project.js"(exports) {
42736
42736
  "use strict";
42737
42737
  Object.defineProperty(exports, "__esModule", { value: true });
42738
42738
  exports.lintProjectGenerator = exports.mapLintPattern = void 0;
@@ -47588,14 +47588,13 @@ var applyWorkspaceTokens = (options, config, tokenizerFn) => {
47588
47588
  // packages/workspace-tools/src/base/base-generator.ts
47589
47589
  var withRunGenerator = (name, generatorFn, generatorOptions = {
47590
47590
  skipReadingConfig: false
47591
- }) => async (tree, options) => {
47591
+ }) => async (tree, _options) => {
47592
47592
  const startTime = Date.now();
47593
+ let options = _options;
47593
47594
  try {
47594
- console.info(
47595
- chalk.bold.hex("#1fb2a6")(`\u26A1 Running the ${name} generator...
47595
+ console.info(chalk.bold.hex("#1fb2a6")(`\u26A1 Running the ${name} generator...
47596
47596
 
47597
- `)
47598
- );
47597
+ `));
47599
47598
  let config;
47600
47599
  if (!generatorOptions.skipReadingConfig) {
47601
47600
  config = getDefaultConfig({
@@ -47611,58 +47610,45 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
47611
47610
  );
47612
47611
  }
47613
47612
  if (generatorOptions?.hooks?.applyDefaultOptions) {
47614
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Running the applyDefaultOptions hook...`));
47613
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the applyDefaultOptions hook..."));
47615
47614
  options = await Promise.resolve(
47616
47615
  generatorOptions.hooks.applyDefaultOptions(options, config)
47617
47616
  );
47618
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Completed the applyDefaultOptions hook...`));
47617
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the applyDefaultOptions hook..."));
47619
47618
  }
47620
- getLogLevel(config.logLevel) >= LogLevel.INFO && console.info(
47621
- chalk.hex("#0ea5e9").italic("\n\n \u2699\uFE0F Generator schema options: \n"),
47622
- options
47623
- );
47619
+ getLogLevel(config.logLevel) >= LogLevel.INFO && console.info(chalk.hex("#0ea5e9").italic("\n\n \u2699\uFE0F Generator schema options: \n"), options);
47624
47620
  const tokenized = applyWorkspaceTokens(
47625
47621
  options,
47626
47622
  { workspaceRoot: tree.root, config },
47627
47623
  applyWorkspaceGeneratorTokens
47628
47624
  );
47629
47625
  if (generatorOptions?.hooks?.preProcess) {
47630
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Running the preProcess hook...`));
47631
- await Promise.resolve(
47632
- generatorOptions.hooks.preProcess(options, config)
47633
- );
47634
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Completed the preProcess hook...`));
47626
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the preProcess hook..."));
47627
+ await Promise.resolve(generatorOptions.hooks.preProcess(options, config));
47628
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the preProcess hook..."));
47635
47629
  }
47636
- const result = await Promise.resolve(
47637
- generatorFn(tree, tokenized, config)
47638
- );
47630
+ const result = await Promise.resolve(generatorFn(tree, tokenized, config));
47639
47631
  if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
47640
47632
  throw new Error(`The ${name} generator failed to run`, {
47641
- cause: result.error
47633
+ cause: result?.error
47642
47634
  });
47643
47635
  }
47644
47636
  if (generatorOptions?.hooks?.postProcess) {
47645
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Running the postProcess hook...`));
47637
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the postProcess hook..."));
47646
47638
  await Promise.resolve(generatorOptions.hooks.postProcess(config));
47647
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Completed the postProcess hook...`));
47639
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the postProcess hook..."));
47648
47640
  }
47649
47641
  console.info(
47650
- chalk.bold.hex("#087f5b")(
47651
- `
47642
+ chalk.bold.hex("#087f5b")(`
47652
47643
 
47653
- \u{1F389} Successfully completed running the ${name} generator!`
47654
- )
47644
+ \u{1F389} Successfully completed running the ${name} generator!`)
47655
47645
  );
47656
47646
  return {
47657
47647
  success: true
47658
47648
  };
47659
47649
  } catch (error) {
47660
47650
  console.error(
47661
- chalk.bold.hex("#7d1a1a")(
47662
- `\u274C An error occurred while running the generator
47663
-
47664
- `
47665
- ),
47651
+ chalk.bold.hex("#7d1a1a")("\u274C An error occurred while running the generator\n\n"),
47666
47652
  error
47667
47653
  );
47668
47654
  console.error(error);
@@ -26259,8 +26259,8 @@ __export(generator_exports, {
26259
26259
  presetGeneratorFn: () => presetGeneratorFn
26260
26260
  });
26261
26261
  module.exports = __toCommonJS(generator_exports);
26262
- var import_devkit = __toESM(require_devkit());
26263
26262
  var path = __toESM(require("path"));
26263
+ var import_devkit = __toESM(require_devkit());
26264
26264
 
26265
26265
  // packages/config-tools/src/config-file/get-config-file.ts
26266
26266
  var import_cosmiconfig = __toESM(require_dist(), 1);
@@ -30347,14 +30347,13 @@ var applyWorkspaceTokens = (options, config, tokenizerFn) => {
30347
30347
  // packages/workspace-tools/src/base/base-generator.ts
30348
30348
  var withRunGenerator = (name, generatorFn, generatorOptions = {
30349
30349
  skipReadingConfig: false
30350
- }) => async (tree, options) => {
30350
+ }) => async (tree, _options) => {
30351
30351
  const startTime = Date.now();
30352
+ let options = _options;
30352
30353
  try {
30353
- console.info(
30354
- chalk.bold.hex("#1fb2a6")(`\u26A1 Running the ${name} generator...
30354
+ console.info(chalk.bold.hex("#1fb2a6")(`\u26A1 Running the ${name} generator...
30355
30355
 
30356
- `)
30357
- );
30356
+ `));
30358
30357
  let config;
30359
30358
  if (!generatorOptions.skipReadingConfig) {
30360
30359
  config = getDefaultConfig({
@@ -30370,58 +30369,45 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
30370
30369
  );
30371
30370
  }
30372
30371
  if (generatorOptions?.hooks?.applyDefaultOptions) {
30373
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Running the applyDefaultOptions hook...`));
30372
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the applyDefaultOptions hook..."));
30374
30373
  options = await Promise.resolve(
30375
30374
  generatorOptions.hooks.applyDefaultOptions(options, config)
30376
30375
  );
30377
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Completed the applyDefaultOptions hook...`));
30376
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the applyDefaultOptions hook..."));
30378
30377
  }
30379
- getLogLevel(config.logLevel) >= LogLevel.INFO && console.info(
30380
- chalk.hex("#0ea5e9").italic("\n\n \u2699\uFE0F Generator schema options: \n"),
30381
- options
30382
- );
30378
+ getLogLevel(config.logLevel) >= LogLevel.INFO && console.info(chalk.hex("#0ea5e9").italic("\n\n \u2699\uFE0F Generator schema options: \n"), options);
30383
30379
  const tokenized = applyWorkspaceTokens(
30384
30380
  options,
30385
30381
  { workspaceRoot: tree.root, config },
30386
30382
  applyWorkspaceGeneratorTokens
30387
30383
  );
30388
30384
  if (generatorOptions?.hooks?.preProcess) {
30389
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Running the preProcess hook...`));
30390
- await Promise.resolve(
30391
- generatorOptions.hooks.preProcess(options, config)
30392
- );
30393
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Completed the preProcess hook...`));
30385
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the preProcess hook..."));
30386
+ await Promise.resolve(generatorOptions.hooks.preProcess(options, config));
30387
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the preProcess hook..."));
30394
30388
  }
30395
- const result = await Promise.resolve(
30396
- generatorFn(tree, tokenized, config)
30397
- );
30389
+ const result = await Promise.resolve(generatorFn(tree, tokenized, config));
30398
30390
  if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
30399
30391
  throw new Error(`The ${name} generator failed to run`, {
30400
- cause: result.error
30392
+ cause: result?.error
30401
30393
  });
30402
30394
  }
30403
30395
  if (generatorOptions?.hooks?.postProcess) {
30404
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Running the postProcess hook...`));
30396
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the postProcess hook..."));
30405
30397
  await Promise.resolve(generatorOptions.hooks.postProcess(config));
30406
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Completed the postProcess hook...`));
30398
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the postProcess hook..."));
30407
30399
  }
30408
30400
  console.info(
30409
- chalk.bold.hex("#087f5b")(
30410
- `
30401
+ chalk.bold.hex("#087f5b")(`
30411
30402
 
30412
- \u{1F389} Successfully completed running the ${name} generator!`
30413
- )
30403
+ \u{1F389} Successfully completed running the ${name} generator!`)
30414
30404
  );
30415
30405
  return {
30416
30406
  success: true
30417
30407
  };
30418
30408
  } catch (error) {
30419
30409
  console.error(
30420
- chalk.bold.hex("#7d1a1a")(
30421
- `\u274C An error occurred while running the generator
30422
-
30423
- `
30424
- ),
30410
+ chalk.bold.hex("#7d1a1a")("\u274C An error occurred while running the generator\n\n"),
30425
30411
  error
30426
30412
  );
30427
30413
  console.error(error);
@@ -30444,7 +30430,7 @@ var pnpmVersion = "8.10.2";
30444
30430
 
30445
30431
  // packages/workspace-tools/src/generators/preset/generator.ts
30446
30432
  async function presetGeneratorFn(tree, options) {
30447
- const projectRoot = `.`;
30433
+ const projectRoot = ".";
30448
30434
  options.description ??= `\u26A1The ${options.namespace ? options.namespace : options.name} monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.`;
30449
30435
  options.namespace ??= options.organization;
30450
30436
  (0, import_devkit.addProjectConfiguration)(tree, `@${options.namespace}/${options.name}`, {
@@ -30452,11 +30438,11 @@ async function presetGeneratorFn(tree, options) {
30452
30438
  projectType: "application",
30453
30439
  targets: {
30454
30440
  "local-registry": {
30455
- "executor": "@nx/js:verdaccio",
30456
- "options": {
30457
- "port": 4873,
30458
- "config": ".verdaccio/config.yml",
30459
- "storage": "tmp/local-registry/storage"
30441
+ executor: "@nx/js:verdaccio",
30442
+ options: {
30443
+ port: 4873,
30444
+ config: ".verdaccio/config.yml",
30445
+ storage: "tmp/local-registry/storage"
30460
30446
  }
30461
30447
  }
30462
30448
  }
@@ -30509,7 +30495,7 @@ async function presetGeneratorFn(tree, options) {
30509
30495
  };
30510
30496
  json.scripts.adr = "pnpm log4brains adr new";
30511
30497
  json.scripts["adr-preview"] = "pnpm log4brains preview";
30512
- json.scripts.prepare = "pnpm add husky -w && pnpm husky install";
30498
+ json.scripts.prepare = "pnpm add lefthook -w && pnpm lefthook install";
30513
30499
  json.scripts.preinstall = "npx -y only-allow pnpm";
30514
30500
  json.scripts["install:csb"] = "corepack enable && pnpm install --frozen-lockfile";
30515
30501
  json.scripts.clean = "rimraf dist";
@@ -30577,7 +30563,7 @@ async function presetGeneratorFn(tree, options) {
30577
30563
  }
30578
30564
  };
30579
30565
  json.nextBundleAnalysis = {
30580
- "buildOutputDirectory": "dist/apps/web/app/.next"
30566
+ buildOutputDirectory: "dist/apps/web/app/.next"
30581
30567
  };
30582
30568
  }
30583
30569
  json.nx = {
@@ -30592,10 +30578,7 @@ async function presetGeneratorFn(tree, options) {
30592
30578
  });
30593
30579
  await (0, import_devkit.formatFiles)(tree);
30594
30580
  let dependencies = {
30595
- "@eslint/eslintrc": "^2.1.3",
30596
30581
  "@nx/devkit": "^17.0.3",
30597
- "@nx/eslint": "^17.0.3",
30598
- "@nx/eslint-plugin": "^17.0.3",
30599
30582
  "@nx/jest": "^17.0.3",
30600
30583
  "@nx/js": "^17.0.3",
30601
30584
  "@semantic-release/changelog": "^6.0.3",
@@ -30617,31 +30600,29 @@ async function presetGeneratorFn(tree, options) {
30617
30600
  "@types/node": "20.8.10",
30618
30601
  "@types/react": "^18.2.37",
30619
30602
  "@types/react-dom": "^18.2.15",
30620
- "eslint": "^8.53.0",
30621
- "husky": "^8.0.3",
30622
- "jest": "^29.7.0",
30603
+ jest: "^29.7.0",
30623
30604
  "jest-environment-jsdom": "^29.7.0",
30624
30605
  "jest-environment-node": "^29.7.0",
30625
30606
  "lint-staged": "^15.0.2",
30626
- "log4brains": "^1.0.1",
30627
- "prettier": "^3.0.3",
30607
+ log4brains: "^1.0.1",
30608
+ prettier: "^3.0.3",
30628
30609
  "prettier-plugin-packagejson": "^2.4.6",
30629
30610
  "prettier-plugin-prisma": "^5.0.0",
30630
30611
  "semantic-release": "^22.0.7",
30631
30612
  "ts-jest": "^29.1.1",
30632
30613
  "ts-node": "^10.9.1",
30633
- "tslib": "^2.6.2",
30634
- "terser": "^5.24.0",
30635
- "typescript": typescriptVersion,
30636
- "verdaccio": "^5.27.0"
30614
+ tslib: "^2.6.2",
30615
+ terser: "^5.24.0",
30616
+ typescript: typescriptVersion,
30617
+ verdaccio: "^5.27.0"
30637
30618
  };
30638
30619
  if (options.includeApps) {
30639
30620
  dependencies = {
30640
30621
  ...dependencies,
30641
- "bundlewatch": "latest",
30642
- "react": "latest",
30622
+ bundlewatch: "latest",
30623
+ react: "latest",
30643
30624
  "react-dom": "latest",
30644
- "storybook": "latest",
30625
+ storybook: "latest",
30645
30626
  "@storybook/addons": "latest",
30646
30627
  "@nx/react": "latest",
30647
30628
  "@nx/next": "latest",