@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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [1.41.0](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.40.1...workspace-tools-v1.41.0) (2024-01-14)
2
+
3
+
4
+ ### Features
5
+
6
+ * **git-tools:** Improved all CLI tools and git hooks to use the `zx` package ([a905c21](https://github.com/storm-software/storm-ops/commit/a905c213d710d995cc114b32a90bf4d042c550d6))
7
+
1
8
  ## [1.40.1](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.40.0...workspace-tools-v1.40.1) (2024-01-14)
2
9
 
3
10
 
package/index.js CHANGED
@@ -131997,14 +131997,13 @@ var applyWorkspaceTokens = (options, config, tokenizerFn) => {
131997
131997
  var withRunExecutor = (name, executorFn, executorOptions = {
131998
131998
  skipReadingConfig: false,
131999
131999
  hooks: {}
132000
- }) => async (options, context) => {
132000
+ }) => async (_options, context) => {
132001
132001
  const startTime = Date.now();
132002
+ let options = _options;
132002
132003
  try {
132003
- console.info(
132004
- chalk.bold.hex("#1fb2a6")(`\u26A1 Running the ${name} executor...
132004
+ console.info(chalk.bold.hex("#1fb2a6")(`\u26A1 Running the ${name} executor...
132005
132005
 
132006
- `)
132007
- );
132006
+ `));
132008
132007
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
132009
132008
  throw new Error(
132010
132009
  "The Build process failed because the context is not valid. Please run this command from a workspace."
@@ -132029,19 +132028,11 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
132029
132028
  );
132030
132029
  }
132031
132030
  if (executorOptions?.hooks?.applyDefaultOptions) {
132032
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Running the applyDefaultOptions hook...`));
132033
- options = await Promise.resolve(
132034
- executorOptions.hooks.applyDefaultOptions(options, config)
132035
- );
132036
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Completed the applyDefaultOptions hook...`));
132031
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the applyDefaultOptions hook..."));
132032
+ options = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options, config));
132033
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the applyDefaultOptions hook..."));
132037
132034
  }
132038
- getLogLevel(config.logLevel) >= LogLevel.INFO && console.info(
132039
- chalk.hex("#0ea5e9").italic(`
132040
-
132041
- \u2699\uFE0F Executor schema options:
132042
- `),
132043
- options
132044
- );
132035
+ getLogLevel(config.logLevel) >= LogLevel.INFO && console.info(chalk.hex("#0ea5e9").italic("\n\n \u2699\uFE0F Executor schema options: \n"), options);
132045
132036
  const tokenized = applyWorkspaceTokens(
132046
132037
  options,
132047
132038
  {
@@ -132056,44 +132047,34 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
132056
132047
  applyWorkspaceExecutorTokens
132057
132048
  );
132058
132049
  if (executorOptions?.hooks?.preProcess) {
132059
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Running the preProcess hook...`));
132060
- await Promise.resolve(
132061
- executorOptions.hooks.preProcess(tokenized, config)
132062
- );
132063
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Completed the preProcess hook...`));
132050
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the preProcess hook..."));
132051
+ await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
132052
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the preProcess hook..."));
132064
132053
  }
132065
- const result = await Promise.resolve(
132066
- executorFn(tokenized, context, config)
132067
- );
132054
+ const result = await Promise.resolve(executorFn(tokenized, context, config));
132068
132055
  if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
132069
132056
  throw new Error(`The ${name} executor failed to run`, {
132070
- cause: result.error
132057
+ cause: result?.error
132071
132058
  });
132072
132059
  }
132073
132060
  if (executorOptions?.hooks?.postProcess) {
132074
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Running the postProcess hook...`));
132061
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the postProcess hook..."));
132075
132062
  await Promise.resolve(executorOptions.hooks.postProcess(config));
132076
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim(`Completed the postProcess hook...`));
132063
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the postProcess hook..."));
132077
132064
  }
132078
132065
  console.info(
132079
- chalk.bold.hex("#087f5b")(
132080
- `
132066
+ chalk.bold.hex("#087f5b")(`
132081
132067
 
132082
132068
  \u{1F389} Successfully completed running the ${name} executor!
132083
132069
 
132084
- `
132085
- )
132070
+ `)
132086
132071
  );
132087
132072
  return {
132088
132073
  success: true
132089
132074
  };
132090
132075
  } catch (error) {
132091
132076
  console.error(
132092
- chalk.bold.hex("#7d1a1a")(
132093
- `\u274C An error occurred while running the executor
132094
-
132095
- `
132096
- ),
132077
+ chalk.bold.hex("#7d1a1a")("\u274C An error occurred while running the executor\n\n"),
132097
132078
  error
132098
132079
  );
132099
132080
  return {
@@ -132693,8 +132674,6 @@ ${commentStart} ----------------------------------------------------------------
132693
132674
  };
132694
132675
 
132695
132676
  // packages/workspace-tools/src/executors/tsup/executor.ts
132696
- var import_fs4 = require("fs");
132697
- var import_path4 = require("path");
132698
132677
  var import_esbuild_decorators = __toESM(require_src2());
132699
132678
  var import_devkit3 = __toESM(require_devkit());
132700
132679
  var import_js2 = __toESM(require_src());
@@ -132743,6 +132722,7 @@ var environmentPlugin = (data) => ({
132743
132722
  });
132744
132723
 
132745
132724
  // packages/workspace-tools/src/executors/tsup/executor.ts
132725
+ var import_fs4 = require("fs");
132746
132726
  var import_fs_extra = __toESM(require_lib6());
132747
132727
  var import_promises2 = require("fs/promises");
132748
132728
 
@@ -138922,6 +138902,7 @@ glob.glob = glob;
138922
138902
 
138923
138903
  // packages/workspace-tools/src/executors/tsup/executor.ts
138924
138904
  var import_fileutils = require("nx/src/utils/fileutils");
138905
+ var import_path4 = require("path");
138925
138906
  var import_prettier = require("prettier");
138926
138907
  var import_tsup = __toESM(require_dist6());
138927
138908
  var ts = __toESM(require("typescript"));
@@ -139345,7 +139326,7 @@ ${(0, import_fs4.readFileSync)(file, "utf-8")}`,
139345
139326
  ...options,
139346
139327
  watch: false,
139347
139328
  main: options.entry,
139348
- transformers: ["typia/lib/transform"]
139329
+ transformers: options.skipTypia ? [] : ["typia/lib/transform"]
139349
139330
  },
139350
139331
  context.root,
139351
139332
  sourceRoot,
@@ -139409,6 +139390,7 @@ function getNormalizedTsConfig(workspaceRoot, outputPath, options) {
139409
139390
  esModuleInterop: true,
139410
139391
  downlevelIteration: true,
139411
139392
  forceConsistentCasingInFileNames: true,
139393
+ emitDeclarationOnly: true,
139412
139394
  declaration: true,
139413
139395
  declarationMap: true,
139414
139396
  declarationDir: (0, import_path4.join)(workspaceRoot, "tmp", ".tsup", "declaration")
@@ -139424,11 +139406,16 @@ function getNormalizedTsConfig(workspaceRoot, outputPath, options) {
139424
139406
  return tsConfig;
139425
139407
  }
139426
139408
  var build = async (options) => {
139427
- Array.isArray(options) ? options.length > 0 ? options[0].silent : false : options.silent && console.log("\u2699\uFE0F Tsup build config: \n", options, "\n");
139428
- if (Array.isArray(options)) {
139429
- await Promise.all(options.map((buildOptions) => (0, import_tsup.build)(buildOptions)));
139430
- } else {
139431
- await (0, import_tsup.build)(options);
139409
+ try {
139410
+ Array.isArray(options) ? options.length > 0 ? options[0].silent : false : options.silent && console.log("\u2699\uFE0F Tsup build config: \n", options, "\n");
139411
+ if (Array.isArray(options)) {
139412
+ await Promise.all(options.map((buildOptions) => (0, import_tsup.build)(buildOptions)));
139413
+ } else {
139414
+ await (0, import_tsup.build)(options);
139415
+ }
139416
+ } catch (e) {
139417
+ console.error("\u26A0\uFE0F A failure occured during the Tsup Build executor");
139418
+ console.error(e);
139432
139419
  }
139433
139420
  };
139434
139421
  var applyDefaultOptions = (options) => {
@@ -139458,7 +139445,6 @@ var applyDefaultOptions = (options) => {
139458
139445
  options.skipTypia ??= false;
139459
139446
  options.define ??= {};
139460
139447
  options.env ??= {};
139461
- options.verbose ??= !!process.env.CI;
139462
139448
  options.getConfig ??= { dist: defaultConfig };
139463
139449
  return options;
139464
139450
  };
@@ -139502,6 +139488,9 @@ function neutralConfig({
139502
139488
  metafile = false,
139503
139489
  define: define2,
139504
139490
  env: env2,
139491
+ apiReport = true,
139492
+ docModel = true,
139493
+ tsdocMetadata = true,
139505
139494
  plugins,
139506
139495
  generatePackageJson,
139507
139496
  dtsTsConfig,
@@ -139542,9 +139531,9 @@ function neutralConfig({
139542
139531
  }
139543
139532
  }
139544
139533
  },
139545
- apiReport: false,
139546
- docModel: false,
139547
- tsdocMetadata: false,
139534
+ apiReport,
139535
+ docModel,
139536
+ tsdocMetadata,
139548
139537
  sourcemap: debug,
139549
139538
  clean: false,
139550
139539
  tsconfigDecoratorMetadata: true,