@storm-software/workspace-tools 1.41.0 → 1.41.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/workspace-tools",
3
- "version": "1.41.0",
3
+ "version": "1.41.1",
4
4
  "private": false,
5
5
  "description": "⚡ A Nx plugin package that contains various executors and generators used in a Storm workspaces.",
6
6
  "keywords": [
@@ -45,6 +45,8 @@
45
45
  "esbuild-plugin-pino": "^2.1.0",
46
46
  "fs-extra": "^11.1.1",
47
47
  "glob": "^10.3.10",
48
+ "prettier": "3.0.3",
49
+ "prettier-plugin-packagejson": "^2.4.9",
48
50
  "resolve": "^1.22.8",
49
51
  "resolve-from": "^5.0.0",
50
52
  "rollup": "^4.5.0",
package/src/base/index.js CHANGED
@@ -47645,14 +47645,13 @@ var applyWorkspaceTokens = (options, config, tokenizerFn) => {
47645
47645
  var withRunExecutor = (name, executorFn, executorOptions = {
47646
47646
  skipReadingConfig: false,
47647
47647
  hooks: {}
47648
- }) => async (options, context) => {
47648
+ }) => async (_options, context) => {
47649
47649
  const startTime = Date.now();
47650
+ let options = _options;
47650
47651
  try {
47651
- console.info(
47652
- chalk.bold.hex("#1fb2a6")(`\u26A1 Running the ${name} executor...
47652
+ console.info(chalk.bold.hex("#1fb2a6")(`\u26A1 Running the ${name} executor...
47653
47653
 
47654
- `)
47655
- );
47654
+ `));
47656
47655
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
47657
47656
  throw new Error(
47658
47657
  "The Build process failed because the context is not valid. Please run this command from a workspace."
@@ -47677,19 +47676,11 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
47677
47676
  );
47678
47677
  }
47679
47678
  if (executorOptions?.hooks?.applyDefaultOptions) {
47680
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Running the applyDefaultOptions hook...`));
47681
- options = await Promise.resolve(
47682
- executorOptions.hooks.applyDefaultOptions(options, config)
47683
- );
47684
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Completed the applyDefaultOptions hook...`));
47679
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the applyDefaultOptions hook..."));
47680
+ options = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options, config));
47681
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the applyDefaultOptions hook..."));
47685
47682
  }
47686
- getLogLevel(config.logLevel) >= LogLevel.INFO && console.info(
47687
- chalk.hex("#0ea5e9").italic(`
47688
-
47689
- \u2699\uFE0F Executor schema options:
47690
- `),
47691
- options
47692
- );
47683
+ getLogLevel(config.logLevel) >= LogLevel.INFO && console.info(chalk.hex("#0ea5e9").italic("\n\n \u2699\uFE0F Executor schema options: \n"), options);
47693
47684
  const tokenized = applyWorkspaceTokens(
47694
47685
  options,
47695
47686
  {
@@ -47704,44 +47695,34 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
47704
47695
  applyWorkspaceExecutorTokens
47705
47696
  );
47706
47697
  if (executorOptions?.hooks?.preProcess) {
47707
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Running the preProcess hook...`));
47708
- await Promise.resolve(
47709
- executorOptions.hooks.preProcess(tokenized, config)
47710
- );
47711
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Completed the preProcess hook...`));
47698
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the preProcess hook..."));
47699
+ await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
47700
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the preProcess hook..."));
47712
47701
  }
47713
- const result = await Promise.resolve(
47714
- executorFn(tokenized, context, config)
47715
- );
47702
+ const result = await Promise.resolve(executorFn(tokenized, context, config));
47716
47703
  if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
47717
47704
  throw new Error(`The ${name} executor failed to run`, {
47718
- cause: result.error
47705
+ cause: result?.error
47719
47706
  });
47720
47707
  }
47721
47708
  if (executorOptions?.hooks?.postProcess) {
47722
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Running the postProcess hook...`));
47709
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the postProcess hook..."));
47723
47710
  await Promise.resolve(executorOptions.hooks.postProcess(config));
47724
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Completed the postProcess hook...`));
47711
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the postProcess hook..."));
47725
47712
  }
47726
47713
  console.info(
47727
- chalk.bold.hex("#087f5b")(
47728
- `
47714
+ chalk.bold.hex("#087f5b")(`
47729
47715
 
47730
47716
  \u{1F389} Successfully completed running the ${name} executor!
47731
47717
 
47732
- `
47733
- )
47718
+ `)
47734
47719
  );
47735
47720
  return {
47736
47721
  success: true
47737
47722
  };
47738
47723
  } catch (error) {
47739
47724
  console.error(
47740
- chalk.bold.hex("#7d1a1a")(
47741
- `\u274C An error occurred while running the executor
47742
-
47743
- `
47744
- ),
47725
+ chalk.bold.hex("#7d1a1a")("\u274C An error occurred while running the executor\n\n"),
47745
47726
  error
47746
47727
  );
47747
47728
  return {
@@ -65535,14 +65535,13 @@ var applyWorkspaceTokens = (options, config, tokenizerFn) => {
65535
65535
  var withRunExecutor = (name, executorFn, executorOptions = {
65536
65536
  skipReadingConfig: false,
65537
65537
  hooks: {}
65538
- }) => async (options, context) => {
65538
+ }) => async (_options, context) => {
65539
65539
  const startTime = Date.now();
65540
+ let options = _options;
65540
65541
  try {
65541
- console.info(
65542
- chalk.bold.hex("#1fb2a6")(`\u26A1 Running the ${name} executor...
65542
+ console.info(chalk.bold.hex("#1fb2a6")(`\u26A1 Running the ${name} executor...
65543
65543
 
65544
- `)
65545
- );
65544
+ `));
65546
65545
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
65547
65546
  throw new Error(
65548
65547
  "The Build process failed because the context is not valid. Please run this command from a workspace."
@@ -65567,19 +65566,11 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
65567
65566
  );
65568
65567
  }
65569
65568
  if (executorOptions?.hooks?.applyDefaultOptions) {
65570
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Running the applyDefaultOptions hook...`));
65571
- options = await Promise.resolve(
65572
- executorOptions.hooks.applyDefaultOptions(options, config)
65573
- );
65574
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Completed the applyDefaultOptions hook...`));
65569
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the applyDefaultOptions hook..."));
65570
+ options = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options, config));
65571
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the applyDefaultOptions hook..."));
65575
65572
  }
65576
- getLogLevel(config.logLevel) >= LogLevel.INFO && console.info(
65577
- chalk.hex("#0ea5e9").italic(`
65578
-
65579
- \u2699\uFE0F Executor schema options:
65580
- `),
65581
- options
65582
- );
65573
+ getLogLevel(config.logLevel) >= LogLevel.INFO && console.info(chalk.hex("#0ea5e9").italic("\n\n \u2699\uFE0F Executor schema options: \n"), options);
65583
65574
  const tokenized = applyWorkspaceTokens(
65584
65575
  options,
65585
65576
  {
@@ -65594,44 +65585,34 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
65594
65585
  applyWorkspaceExecutorTokens
65595
65586
  );
65596
65587
  if (executorOptions?.hooks?.preProcess) {
65597
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Running the preProcess hook...`));
65598
- await Promise.resolve(
65599
- executorOptions.hooks.preProcess(tokenized, config)
65600
- );
65601
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Completed the preProcess hook...`));
65588
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the preProcess hook..."));
65589
+ await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
65590
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the preProcess hook..."));
65602
65591
  }
65603
- const result = await Promise.resolve(
65604
- executorFn(tokenized, context, config)
65605
- );
65592
+ const result = await Promise.resolve(executorFn(tokenized, context, config));
65606
65593
  if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
65607
65594
  throw new Error(`The ${name} executor failed to run`, {
65608
- cause: result.error
65595
+ cause: result?.error
65609
65596
  });
65610
65597
  }
65611
65598
  if (executorOptions?.hooks?.postProcess) {
65612
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Running the postProcess hook...`));
65599
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the postProcess hook..."));
65613
65600
  await Promise.resolve(executorOptions.hooks.postProcess(config));
65614
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Completed the postProcess hook...`));
65601
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the postProcess hook..."));
65615
65602
  }
65616
65603
  console.info(
65617
- chalk.bold.hex("#087f5b")(
65618
- `
65604
+ chalk.bold.hex("#087f5b")(`
65619
65605
 
65620
65606
  \u{1F389} Successfully completed running the ${name} executor!
65621
65607
 
65622
- `
65623
- )
65608
+ `)
65624
65609
  );
65625
65610
  return {
65626
65611
  success: true
65627
65612
  };
65628
65613
  } catch (error) {
65629
65614
  console.error(
65630
- chalk.bold.hex("#7d1a1a")(
65631
- `\u274C An error occurred while running the executor
65632
-
65633
- `
65634
- ),
65615
+ chalk.bold.hex("#7d1a1a")("\u274C An error occurred while running the executor\n\n"),
65635
65616
  error
65636
65617
  );
65637
65618
  return {
@@ -127813,8 +127813,6 @@ __export(executor_exports, {
127813
127813
  tsupExecutorFn: () => tsupExecutorFn
127814
127814
  });
127815
127815
  module.exports = __toCommonJS(executor_exports);
127816
- var import_fs4 = require("fs");
127817
- var import_path4 = require("path");
127818
127816
  var import_esbuild_decorators = __toESM(require_src());
127819
127817
  var import_devkit2 = __toESM(require_devkit());
127820
127818
  var import_js = __toESM(require_src2());
@@ -127863,6 +127861,7 @@ var environmentPlugin = (data) => ({
127863
127861
  });
127864
127862
 
127865
127863
  // packages/workspace-tools/src/executors/tsup/executor.ts
127864
+ var import_fs4 = require("fs");
127866
127865
  var import_fs_extra = __toESM(require_lib3());
127867
127866
  var import_promises2 = require("fs/promises");
127868
127867
 
@@ -134042,6 +134041,7 @@ glob.glob = glob;
134042
134041
 
134043
134042
  // packages/workspace-tools/src/executors/tsup/executor.ts
134044
134043
  var import_fileutils = require("nx/src/utils/fileutils");
134044
+ var import_path4 = require("path");
134045
134045
  var import_prettier = require("prettier");
134046
134046
  var import_tsup = __toESM(require_dist5());
134047
134047
  var ts = __toESM(require("typescript"));
@@ -138155,14 +138155,13 @@ var applyWorkspaceTokens = (options, config, tokenizerFn) => {
138155
138155
  var withRunExecutor = (name, executorFn, executorOptions = {
138156
138156
  skipReadingConfig: false,
138157
138157
  hooks: {}
138158
- }) => async (options, context) => {
138158
+ }) => async (_options, context) => {
138159
138159
  const startTime = Date.now();
138160
+ let options = _options;
138160
138161
  try {
138161
- console.info(
138162
- chalk.bold.hex("#1fb2a6")(`\u26A1 Running the ${name} executor...
138162
+ console.info(chalk.bold.hex("#1fb2a6")(`\u26A1 Running the ${name} executor...
138163
138163
 
138164
- `)
138165
- );
138164
+ `));
138166
138165
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
138167
138166
  throw new Error(
138168
138167
  "The Build process failed because the context is not valid. Please run this command from a workspace."
@@ -138187,19 +138186,11 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
138187
138186
  );
138188
138187
  }
138189
138188
  if (executorOptions?.hooks?.applyDefaultOptions) {
138190
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Running the applyDefaultOptions hook...`));
138191
- options = await Promise.resolve(
138192
- executorOptions.hooks.applyDefaultOptions(options, config)
138193
- );
138194
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Completed the applyDefaultOptions hook...`));
138189
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the applyDefaultOptions hook..."));
138190
+ options = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options, config));
138191
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the applyDefaultOptions hook..."));
138195
138192
  }
138196
- getLogLevel(config.logLevel) >= LogLevel.INFO && console.info(
138197
- chalk.hex("#0ea5e9").italic(`
138198
-
138199
- \u2699\uFE0F Executor schema options:
138200
- `),
138201
- options
138202
- );
138193
+ getLogLevel(config.logLevel) >= LogLevel.INFO && console.info(chalk.hex("#0ea5e9").italic("\n\n \u2699\uFE0F Executor schema options: \n"), options);
138203
138194
  const tokenized = applyWorkspaceTokens(
138204
138195
  options,
138205
138196
  {
@@ -138214,44 +138205,34 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
138214
138205
  applyWorkspaceExecutorTokens
138215
138206
  );
138216
138207
  if (executorOptions?.hooks?.preProcess) {
138217
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Running the preProcess hook...`));
138218
- await Promise.resolve(
138219
- executorOptions.hooks.preProcess(tokenized, config)
138220
- );
138221
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Completed the preProcess hook...`));
138208
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the preProcess hook..."));
138209
+ await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
138210
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the preProcess hook..."));
138222
138211
  }
138223
- const result = await Promise.resolve(
138224
- executorFn(tokenized, context, config)
138225
- );
138212
+ const result = await Promise.resolve(executorFn(tokenized, context, config));
138226
138213
  if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
138227
138214
  throw new Error(`The ${name} executor failed to run`, {
138228
- cause: result.error
138215
+ cause: result?.error
138229
138216
  });
138230
138217
  }
138231
138218
  if (executorOptions?.hooks?.postProcess) {
138232
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Running the postProcess hook...`));
138219
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the postProcess hook..."));
138233
138220
  await Promise.resolve(executorOptions.hooks.postProcess(config));
138234
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Completed the postProcess hook...`));
138221
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the postProcess hook..."));
138235
138222
  }
138236
138223
  console.info(
138237
- chalk.bold.hex("#087f5b")(
138238
- `
138224
+ chalk.bold.hex("#087f5b")(`
138239
138225
 
138240
138226
  \u{1F389} Successfully completed running the ${name} executor!
138241
138227
 
138242
- `
138243
- )
138228
+ `)
138244
138229
  );
138245
138230
  return {
138246
138231
  success: true
138247
138232
  };
138248
138233
  } catch (error) {
138249
138234
  console.error(
138250
- chalk.bold.hex("#7d1a1a")(
138251
- `\u274C An error occurred while running the executor
138252
-
138253
- `
138254
- ),
138235
+ chalk.bold.hex("#7d1a1a")("\u274C An error occurred while running the executor\n\n"),
138255
138236
  error
138256
138237
  );
138257
138238
  return {
@@ -138740,7 +138721,7 @@ ${(0, import_fs4.readFileSync)(file, "utf-8")}`,
138740
138721
  ...options,
138741
138722
  watch: false,
138742
138723
  main: options.entry,
138743
- transformers: ["typia/lib/transform"]
138724
+ transformers: options.skipTypia ? [] : ["typia/lib/transform"]
138744
138725
  },
138745
138726
  context.root,
138746
138727
  sourceRoot,
@@ -138804,6 +138785,7 @@ function getNormalizedTsConfig(workspaceRoot, outputPath, options) {
138804
138785
  esModuleInterop: true,
138805
138786
  downlevelIteration: true,
138806
138787
  forceConsistentCasingInFileNames: true,
138788
+ emitDeclarationOnly: true,
138807
138789
  declaration: true,
138808
138790
  declarationMap: true,
138809
138791
  declarationDir: (0, import_path4.join)(workspaceRoot, "tmp", ".tsup", "declaration")
@@ -138819,11 +138801,16 @@ function getNormalizedTsConfig(workspaceRoot, outputPath, options) {
138819
138801
  return tsConfig;
138820
138802
  }
138821
138803
  var build = async (options) => {
138822
- Array.isArray(options) ? options.length > 0 ? options[0].silent : false : options.silent && console.log("\u2699\uFE0F Tsup build config: \n", options, "\n");
138823
- if (Array.isArray(options)) {
138824
- await Promise.all(options.map((buildOptions) => (0, import_tsup.build)(buildOptions)));
138825
- } else {
138826
- await (0, import_tsup.build)(options);
138804
+ try {
138805
+ Array.isArray(options) ? options.length > 0 ? options[0].silent : false : options.silent && console.log("\u2699\uFE0F Tsup build config: \n", options, "\n");
138806
+ if (Array.isArray(options)) {
138807
+ await Promise.all(options.map((buildOptions) => (0, import_tsup.build)(buildOptions)));
138808
+ } else {
138809
+ await (0, import_tsup.build)(options);
138810
+ }
138811
+ } catch (e) {
138812
+ console.error("\u26A0\uFE0F A failure occured during the Tsup Build executor");
138813
+ console.error(e);
138827
138814
  }
138828
138815
  };
138829
138816
  var applyDefaultOptions = (options) => {
@@ -138853,7 +138840,6 @@ var applyDefaultOptions = (options) => {
138853
138840
  options.skipTypia ??= false;
138854
138841
  options.define ??= {};
138855
138842
  options.env ??= {};
138856
- options.verbose ??= !!process.env.CI;
138857
138843
  options.getConfig ??= { dist: defaultConfig };
138858
138844
  return options;
138859
138845
  };
@@ -131922,14 +131922,13 @@ var applyWorkspaceTokens = (options, config, tokenizerFn) => {
131922
131922
  var withRunExecutor = (name, executorFn, executorOptions = {
131923
131923
  skipReadingConfig: false,
131924
131924
  hooks: {}
131925
- }) => async (options, context) => {
131925
+ }) => async (_options, context) => {
131926
131926
  const startTime = Date.now();
131927
+ let options = _options;
131927
131928
  try {
131928
- console.info(
131929
- chalk.bold.hex("#1fb2a6")(`\u26A1 Running the ${name} executor...
131929
+ console.info(chalk.bold.hex("#1fb2a6")(`\u26A1 Running the ${name} executor...
131930
131930
 
131931
- `)
131932
- );
131931
+ `));
131933
131932
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
131934
131933
  throw new Error(
131935
131934
  "The Build process failed because the context is not valid. Please run this command from a workspace."
@@ -131954,19 +131953,11 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
131954
131953
  );
131955
131954
  }
131956
131955
  if (executorOptions?.hooks?.applyDefaultOptions) {
131957
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Running the applyDefaultOptions hook...`));
131958
- options = await Promise.resolve(
131959
- executorOptions.hooks.applyDefaultOptions(options, config)
131960
- );
131961
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Completed the applyDefaultOptions hook...`));
131956
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the applyDefaultOptions hook..."));
131957
+ options = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options, config));
131958
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the applyDefaultOptions hook..."));
131962
131959
  }
131963
- getLogLevel(config.logLevel) >= LogLevel.INFO && console.info(
131964
- chalk.hex("#0ea5e9").italic(`
131965
-
131966
- \u2699\uFE0F Executor schema options:
131967
- `),
131968
- options
131969
- );
131960
+ getLogLevel(config.logLevel) >= LogLevel.INFO && console.info(chalk.hex("#0ea5e9").italic("\n\n \u2699\uFE0F Executor schema options: \n"), options);
131970
131961
  const tokenized = applyWorkspaceTokens(
131971
131962
  options,
131972
131963
  {
@@ -131981,44 +131972,34 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
131981
131972
  applyWorkspaceExecutorTokens
131982
131973
  );
131983
131974
  if (executorOptions?.hooks?.preProcess) {
131984
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Running the preProcess hook...`));
131985
- await Promise.resolve(
131986
- executorOptions.hooks.preProcess(tokenized, config)
131987
- );
131988
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Completed the preProcess hook...`));
131975
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the preProcess hook..."));
131976
+ await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
131977
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the preProcess hook..."));
131989
131978
  }
131990
- const result = await Promise.resolve(
131991
- executorFn(tokenized, context, config)
131992
- );
131979
+ const result = await Promise.resolve(executorFn(tokenized, context, config));
131993
131980
  if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
131994
131981
  throw new Error(`The ${name} executor failed to run`, {
131995
- cause: result.error
131982
+ cause: result?.error
131996
131983
  });
131997
131984
  }
131998
131985
  if (executorOptions?.hooks?.postProcess) {
131999
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Running the postProcess hook...`));
131986
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the postProcess hook..."));
132000
131987
  await Promise.resolve(executorOptions.hooks.postProcess(config));
132001
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Completed the postProcess hook...`));
131988
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the postProcess hook..."));
132002
131989
  }
132003
131990
  console.info(
132004
- chalk.bold.hex("#087f5b")(
132005
- `
131991
+ chalk.bold.hex("#087f5b")(`
132006
131992
 
132007
131993
  \u{1F389} Successfully completed running the ${name} executor!
132008
131994
 
132009
- `
132010
- )
131995
+ `)
132011
131996
  );
132012
131997
  return {
132013
131998
  success: true
132014
131999
  };
132015
132000
  } catch (error) {
132016
132001
  console.error(
132017
- chalk.bold.hex("#7d1a1a")(
132018
- `\u274C An error occurred while running the executor
132019
-
132020
- `
132021
- ),
132002
+ chalk.bold.hex("#7d1a1a")("\u274C An error occurred while running the executor\n\n"),
132022
132003
  error
132023
132004
  );
132024
132005
  return {
@@ -132064,8 +132045,6 @@ ${commentStart} ----------------------------------------------------------------
132064
132045
  };
132065
132046
 
132066
132047
  // packages/workspace-tools/src/executors/tsup/executor.ts
132067
- var import_fs4 = require("fs");
132068
- var import_path4 = require("path");
132069
132048
  var import_esbuild_decorators = __toESM(require_src());
132070
132049
  var import_devkit2 = __toESM(require_devkit());
132071
132050
  var import_js = __toESM(require_src2());
@@ -132114,6 +132093,7 @@ var environmentPlugin = (data) => ({
132114
132093
  });
132115
132094
 
132116
132095
  // packages/workspace-tools/src/executors/tsup/executor.ts
132096
+ var import_fs4 = require("fs");
132117
132097
  var import_fs_extra = __toESM(require_lib6());
132118
132098
  var import_promises2 = require("fs/promises");
132119
132099
 
@@ -138293,6 +138273,7 @@ glob.glob = glob;
138293
138273
 
138294
138274
  // packages/workspace-tools/src/executors/tsup/executor.ts
138295
138275
  var import_fileutils = require("nx/src/utils/fileutils");
138276
+ var import_path4 = require("path");
138296
138277
  var import_prettier = require("prettier");
138297
138278
  var import_tsup = __toESM(require_dist6());
138298
138279
  var ts = __toESM(require("typescript"));
@@ -138771,7 +138752,7 @@ ${(0, import_fs4.readFileSync)(file, "utf-8")}`,
138771
138752
  ...options,
138772
138753
  watch: false,
138773
138754
  main: options.entry,
138774
- transformers: ["typia/lib/transform"]
138755
+ transformers: options.skipTypia ? [] : ["typia/lib/transform"]
138775
138756
  },
138776
138757
  context.root,
138777
138758
  sourceRoot,
@@ -138835,6 +138816,7 @@ function getNormalizedTsConfig(workspaceRoot, outputPath, options) {
138835
138816
  esModuleInterop: true,
138836
138817
  downlevelIteration: true,
138837
138818
  forceConsistentCasingInFileNames: true,
138819
+ emitDeclarationOnly: true,
138838
138820
  declaration: true,
138839
138821
  declarationMap: true,
138840
138822
  declarationDir: (0, import_path4.join)(workspaceRoot, "tmp", ".tsup", "declaration")
@@ -138850,11 +138832,16 @@ function getNormalizedTsConfig(workspaceRoot, outputPath, options) {
138850
138832
  return tsConfig;
138851
138833
  }
138852
138834
  var build = async (options) => {
138853
- Array.isArray(options) ? options.length > 0 ? options[0].silent : false : options.silent && console.log("\u2699\uFE0F Tsup build config: \n", options, "\n");
138854
- if (Array.isArray(options)) {
138855
- await Promise.all(options.map((buildOptions) => (0, import_tsup.build)(buildOptions)));
138856
- } else {
138857
- await (0, import_tsup.build)(options);
138835
+ try {
138836
+ Array.isArray(options) ? options.length > 0 ? options[0].silent : false : options.silent && console.log("\u2699\uFE0F Tsup build config: \n", options, "\n");
138837
+ if (Array.isArray(options)) {
138838
+ await Promise.all(options.map((buildOptions) => (0, import_tsup.build)(buildOptions)));
138839
+ } else {
138840
+ await (0, import_tsup.build)(options);
138841
+ }
138842
+ } catch (e) {
138843
+ console.error("\u26A0\uFE0F A failure occured during the Tsup Build executor");
138844
+ console.error(e);
138858
138845
  }
138859
138846
  };
138860
138847
  var applyDefaultOptions = (options) => {
@@ -138884,7 +138871,6 @@ var applyDefaultOptions = (options) => {
138884
138871
  options.skipTypia ??= false;
138885
138872
  options.define ??= {};
138886
138873
  options.env ??= {};
138887
- options.verbose ??= !!process.env.CI;
138888
138874
  options.getConfig ??= { dist: defaultConfig };
138889
138875
  return options;
138890
138876
  };