@storm-software/workspace-tools 1.62.0 → 1.62.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.62.0",
3
+ "version": "1.62.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": [
@@ -462433,7 +462433,14 @@ var _isFunction = (value) => {
462433
462433
 
462434
462434
  // packages/workspace-tools/src/utils/file-path-utils.ts
462435
462435
  var removeExtension = (filePath) => {
462436
- return !filePath || (filePath.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
462436
+ const result = !filePath || (filePath.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
462437
+ if (result.startsWith("./")) {
462438
+ return result.substring(2);
462439
+ }
462440
+ if (result.startsWith(".") || result.startsWith("/")) {
462441
+ return result.substring(1);
462442
+ }
462443
+ return result;
462437
462444
  };
462438
462445
 
462439
462446
  // packages/workspace-tools/src/utils/get-project-configurations.ts
@@ -462669,6 +462676,7 @@ var applyDefaultOptions = (options8) => {
462669
462676
  return options8;
462670
462677
  };
462671
462678
  var runTsupBuild = async (context, config, options8) => {
462679
+ const workspaceRoot = config?.workspaceRoot ?? findWorkspaceRoot();
462672
462680
  const stormEnv = Object.keys(options8.env ?? {}).filter((key2) => key2.startsWith("STORM_")).reduce((ret, key2) => {
462673
462681
  ret[key2] = options8.env?.[key2];
462674
462682
  return ret;
@@ -462676,7 +462684,7 @@ var runTsupBuild = async (context, config, options8) => {
462676
462684
  options8.plugins?.push(
462677
462685
  (0, import_esbuild_decorators.esbuildDecorators)({
462678
462686
  tsconfig: options8.tsConfig,
462679
- cwd: config.workspaceRoot
462687
+ cwd: workspaceRoot
462680
462688
  })
462681
462689
  );
462682
462690
  options8.plugins?.push(environmentPlugin(stormEnv));
@@ -462696,8 +462704,7 @@ var runTsupBuild = async (context, config, options8) => {
462696
462704
  ...stormEnv
462697
462705
  },
462698
462706
  dtsTsConfig: getNormalizedTsConfig(
462699
- context,
462700
- config.workspaceRoot ?? ".",
462707
+ workspaceRoot,
462701
462708
  options8.outputPath,
462702
462709
  createTypeScriptCompilationOptions(
462703
462710
  (0, import_normalize_options.normalizeOptions)(
@@ -462707,9 +462714,9 @@ var runTsupBuild = async (context, config, options8) => {
462707
462714
  main: context.main,
462708
462715
  transformers: []
462709
462716
  },
462710
- config.workspaceRoot ?? ".",
462717
+ workspaceRoot,
462711
462718
  context.sourceRoot,
462712
- config.workspaceRoot ?? "."
462719
+ workspaceRoot
462713
462720
  ),
462714
462721
  context.projectName
462715
462722
  )
@@ -462732,7 +462739,7 @@ ${options8.banner}
462732
462739
  const getConfigFns = [options8.getConfig];
462733
462740
  const tsupConfig = (0, import_tsup.defineConfig)(
462734
462741
  getConfigFns.map(
462735
- (getConfigFn) => getConfig(config.workspaceRoot ?? ".", context.projectRoot, getConfigFn, getConfigOptions)
462742
+ (getConfigFn) => getConfig(workspaceRoot, context.projectRoot, getConfigFn, getConfigOptions)
462736
462743
  )
462737
462744
  );
462738
462745
  if (_isFunction2(tsupConfig)) {
@@ -462748,19 +462755,15 @@ ${options8.banner}
462748
462755
  );
462749
462756
  }
462750
462757
  };
462751
- function getNormalizedTsConfig(context, workspaceRoot, outputPath, options8) {
462758
+ function getNormalizedTsConfig(workspaceRoot, outputPath, options8) {
462752
462759
  const config = (0, import_typescript.readConfigFile)(options8.tsConfig, import_typescript.sys.readFile).config;
462753
462760
  const tsConfig = (0, import_typescript.parseJsonConfigFileContent)(
462754
462761
  {
462755
462762
  ...config,
462756
462763
  compilerOptions: {
462757
462764
  ...config?.compilerOptions,
462758
- entry: {
462759
- [removeExtension(context.main).replace(workspaceRoot, "").replace(context.sourceRoot, "")]: context.main
462760
- },
462765
+ include: ["**/*"],
462761
462766
  outDir: outputPath,
462762
- rootDir: workspaceRoot,
462763
- baseUrl: workspaceRoot,
462764
462767
  noEmit: false,
462765
462768
  esModuleInterop: true,
462766
462769
  downlevelIteration: true,
@@ -456441,7 +456441,14 @@ var outExtension = ({ format: format3 }) => {
456441
456441
 
456442
456442
  // packages/workspace-tools/src/utils/file-path-utils.ts
456443
456443
  var removeExtension = (filePath) => {
456444
- return !filePath || (filePath.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
456444
+ const result = !filePath || (filePath.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
456445
+ if (result.startsWith("./")) {
456446
+ return result.substring(2);
456447
+ }
456448
+ if (result.startsWith(".") || result.startsWith("/")) {
456449
+ return result.substring(1);
456450
+ }
456451
+ return result;
456445
456452
  };
456446
456453
 
456447
456454
  // packages/workspace-tools/src/utils/run-tsup-build.ts
@@ -456479,6 +456486,7 @@ var applyDefaultOptions = (options8) => {
456479
456486
  return options8;
456480
456487
  };
456481
456488
  var runTsupBuild = async (context, config, options8) => {
456489
+ const workspaceRoot = config?.workspaceRoot ?? findWorkspaceRoot();
456482
456490
  const stormEnv = Object.keys(options8.env ?? {}).filter((key2) => key2.startsWith("STORM_")).reduce((ret, key2) => {
456483
456491
  ret[key2] = options8.env?.[key2];
456484
456492
  return ret;
@@ -456486,7 +456494,7 @@ var runTsupBuild = async (context, config, options8) => {
456486
456494
  options8.plugins?.push(
456487
456495
  (0, import_esbuild_decorators.esbuildDecorators)({
456488
456496
  tsconfig: options8.tsConfig,
456489
- cwd: config.workspaceRoot
456497
+ cwd: workspaceRoot
456490
456498
  })
456491
456499
  );
456492
456500
  options8.plugins?.push(environmentPlugin(stormEnv));
@@ -456506,8 +456514,7 @@ var runTsupBuild = async (context, config, options8) => {
456506
456514
  ...stormEnv
456507
456515
  },
456508
456516
  dtsTsConfig: getNormalizedTsConfig(
456509
- context,
456510
- config.workspaceRoot ?? ".",
456517
+ workspaceRoot,
456511
456518
  options8.outputPath,
456512
456519
  createTypeScriptCompilationOptions(
456513
456520
  (0, import_normalize_options.normalizeOptions)(
@@ -456517,9 +456524,9 @@ var runTsupBuild = async (context, config, options8) => {
456517
456524
  main: context.main,
456518
456525
  transformers: []
456519
456526
  },
456520
- config.workspaceRoot ?? ".",
456527
+ workspaceRoot,
456521
456528
  context.sourceRoot,
456522
- config.workspaceRoot ?? "."
456529
+ workspaceRoot
456523
456530
  ),
456524
456531
  context.projectName
456525
456532
  )
@@ -456542,7 +456549,7 @@ ${options8.banner}
456542
456549
  const getConfigFns = [options8.getConfig];
456543
456550
  const tsupConfig = (0, import_tsup.defineConfig)(
456544
456551
  getConfigFns.map(
456545
- (getConfigFn) => getConfig(config.workspaceRoot ?? ".", context.projectRoot, getConfigFn, getConfigOptions)
456552
+ (getConfigFn) => getConfig(workspaceRoot, context.projectRoot, getConfigFn, getConfigOptions)
456546
456553
  )
456547
456554
  );
456548
456555
  if (_isFunction2(tsupConfig)) {
@@ -456558,19 +456565,15 @@ ${options8.banner}
456558
456565
  );
456559
456566
  }
456560
456567
  };
456561
- function getNormalizedTsConfig(context, workspaceRoot, outputPath, options8) {
456568
+ function getNormalizedTsConfig(workspaceRoot, outputPath, options8) {
456562
456569
  const config = (0, import_typescript.readConfigFile)(options8.tsConfig, import_typescript.sys.readFile).config;
456563
456570
  const tsConfig = (0, import_typescript.parseJsonConfigFileContent)(
456564
456571
  {
456565
456572
  ...config,
456566
456573
  compilerOptions: {
456567
456574
  ...config?.compilerOptions,
456568
- entry: {
456569
- [removeExtension(context.main).replace(workspaceRoot, "").replace(context.sourceRoot, "")]: context.main
456570
- },
456575
+ include: ["**/*"],
456571
456576
  outDir: outputPath,
456572
- rootDir: workspaceRoot,
456573
- baseUrl: workspaceRoot,
456574
456577
  noEmit: false,
456575
456578
  esModuleInterop: true,
456576
456579
  downlevelIteration: true,
@@ -456441,7 +456441,14 @@ var outExtension = ({ format: format3 }) => {
456441
456441
 
456442
456442
  // packages/workspace-tools/src/utils/file-path-utils.ts
456443
456443
  var removeExtension = (filePath) => {
456444
- return !filePath || (filePath.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
456444
+ const result = !filePath || (filePath.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
456445
+ if (result.startsWith("./")) {
456446
+ return result.substring(2);
456447
+ }
456448
+ if (result.startsWith(".") || result.startsWith("/")) {
456449
+ return result.substring(1);
456450
+ }
456451
+ return result;
456445
456452
  };
456446
456453
 
456447
456454
  // packages/workspace-tools/src/utils/run-tsup-build.ts
@@ -456479,6 +456486,7 @@ var applyDefaultOptions = (options8) => {
456479
456486
  return options8;
456480
456487
  };
456481
456488
  var runTsupBuild = async (context, config, options8) => {
456489
+ const workspaceRoot = config?.workspaceRoot ?? findWorkspaceRoot();
456482
456490
  const stormEnv = Object.keys(options8.env ?? {}).filter((key2) => key2.startsWith("STORM_")).reduce((ret, key2) => {
456483
456491
  ret[key2] = options8.env?.[key2];
456484
456492
  return ret;
@@ -456486,7 +456494,7 @@ var runTsupBuild = async (context, config, options8) => {
456486
456494
  options8.plugins?.push(
456487
456495
  (0, import_esbuild_decorators.esbuildDecorators)({
456488
456496
  tsconfig: options8.tsConfig,
456489
- cwd: config.workspaceRoot
456497
+ cwd: workspaceRoot
456490
456498
  })
456491
456499
  );
456492
456500
  options8.plugins?.push(environmentPlugin(stormEnv));
@@ -456506,8 +456514,7 @@ var runTsupBuild = async (context, config, options8) => {
456506
456514
  ...stormEnv
456507
456515
  },
456508
456516
  dtsTsConfig: getNormalizedTsConfig(
456509
- context,
456510
- config.workspaceRoot ?? ".",
456517
+ workspaceRoot,
456511
456518
  options8.outputPath,
456512
456519
  createTypeScriptCompilationOptions(
456513
456520
  (0, import_normalize_options.normalizeOptions)(
@@ -456517,9 +456524,9 @@ var runTsupBuild = async (context, config, options8) => {
456517
456524
  main: context.main,
456518
456525
  transformers: []
456519
456526
  },
456520
- config.workspaceRoot ?? ".",
456527
+ workspaceRoot,
456521
456528
  context.sourceRoot,
456522
- config.workspaceRoot ?? "."
456529
+ workspaceRoot
456523
456530
  ),
456524
456531
  context.projectName
456525
456532
  )
@@ -456542,7 +456549,7 @@ ${options8.banner}
456542
456549
  const getConfigFns = [options8.getConfig];
456543
456550
  const tsupConfig = (0, import_tsup.defineConfig)(
456544
456551
  getConfigFns.map(
456545
- (getConfigFn) => getConfig(config.workspaceRoot ?? ".", context.projectRoot, getConfigFn, getConfigOptions)
456552
+ (getConfigFn) => getConfig(workspaceRoot, context.projectRoot, getConfigFn, getConfigOptions)
456546
456553
  )
456547
456554
  );
456548
456555
  if (_isFunction2(tsupConfig)) {
@@ -456558,19 +456565,15 @@ ${options8.banner}
456558
456565
  );
456559
456566
  }
456560
456567
  };
456561
- function getNormalizedTsConfig(context, workspaceRoot, outputPath, options8) {
456568
+ function getNormalizedTsConfig(workspaceRoot, outputPath, options8) {
456562
456569
  const config = (0, import_typescript.readConfigFile)(options8.tsConfig, import_typescript.sys.readFile).config;
456563
456570
  const tsConfig = (0, import_typescript.parseJsonConfigFileContent)(
456564
456571
  {
456565
456572
  ...config,
456566
456573
  compilerOptions: {
456567
456574
  ...config?.compilerOptions,
456568
- entry: {
456569
- [removeExtension(context.main).replace(workspaceRoot, "").replace(context.sourceRoot, "")]: context.main
456570
- },
456575
+ include: ["**/*"],
456571
456576
  outDir: outputPath,
456572
- rootDir: workspaceRoot,
456573
- baseUrl: workspaceRoot,
456574
456577
  noEmit: false,
456575
456578
  esModuleInterop: true,
456576
456579
  downlevelIteration: true,
@@ -456441,7 +456441,14 @@ var outExtension = ({ format: format3 }) => {
456441
456441
 
456442
456442
  // packages/workspace-tools/src/utils/file-path-utils.ts
456443
456443
  var removeExtension = (filePath) => {
456444
- return !filePath || (filePath.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
456444
+ const result = !filePath || (filePath.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
456445
+ if (result.startsWith("./")) {
456446
+ return result.substring(2);
456447
+ }
456448
+ if (result.startsWith(".") || result.startsWith("/")) {
456449
+ return result.substring(1);
456450
+ }
456451
+ return result;
456445
456452
  };
456446
456453
 
456447
456454
  // packages/workspace-tools/src/utils/run-tsup-build.ts
@@ -456479,6 +456486,7 @@ var applyDefaultOptions = (options8) => {
456479
456486
  return options8;
456480
456487
  };
456481
456488
  var runTsupBuild = async (context, config, options8) => {
456489
+ const workspaceRoot = config?.workspaceRoot ?? findWorkspaceRoot();
456482
456490
  const stormEnv = Object.keys(options8.env ?? {}).filter((key2) => key2.startsWith("STORM_")).reduce((ret, key2) => {
456483
456491
  ret[key2] = options8.env?.[key2];
456484
456492
  return ret;
@@ -456486,7 +456494,7 @@ var runTsupBuild = async (context, config, options8) => {
456486
456494
  options8.plugins?.push(
456487
456495
  (0, import_esbuild_decorators.esbuildDecorators)({
456488
456496
  tsconfig: options8.tsConfig,
456489
- cwd: config.workspaceRoot
456497
+ cwd: workspaceRoot
456490
456498
  })
456491
456499
  );
456492
456500
  options8.plugins?.push(environmentPlugin(stormEnv));
@@ -456506,8 +456514,7 @@ var runTsupBuild = async (context, config, options8) => {
456506
456514
  ...stormEnv
456507
456515
  },
456508
456516
  dtsTsConfig: getNormalizedTsConfig(
456509
- context,
456510
- config.workspaceRoot ?? ".",
456517
+ workspaceRoot,
456511
456518
  options8.outputPath,
456512
456519
  createTypeScriptCompilationOptions(
456513
456520
  (0, import_normalize_options.normalizeOptions)(
@@ -456517,9 +456524,9 @@ var runTsupBuild = async (context, config, options8) => {
456517
456524
  main: context.main,
456518
456525
  transformers: []
456519
456526
  },
456520
- config.workspaceRoot ?? ".",
456527
+ workspaceRoot,
456521
456528
  context.sourceRoot,
456522
- config.workspaceRoot ?? "."
456529
+ workspaceRoot
456523
456530
  ),
456524
456531
  context.projectName
456525
456532
  )
@@ -456542,7 +456549,7 @@ ${options8.banner}
456542
456549
  const getConfigFns = [options8.getConfig];
456543
456550
  const tsupConfig = (0, import_tsup.defineConfig)(
456544
456551
  getConfigFns.map(
456545
- (getConfigFn) => getConfig(config.workspaceRoot ?? ".", context.projectRoot, getConfigFn, getConfigOptions)
456552
+ (getConfigFn) => getConfig(workspaceRoot, context.projectRoot, getConfigFn, getConfigOptions)
456546
456553
  )
456547
456554
  );
456548
456555
  if (_isFunction2(tsupConfig)) {
@@ -456558,19 +456565,15 @@ ${options8.banner}
456558
456565
  );
456559
456566
  }
456560
456567
  };
456561
- function getNormalizedTsConfig(context, workspaceRoot, outputPath, options8) {
456568
+ function getNormalizedTsConfig(workspaceRoot, outputPath, options8) {
456562
456569
  const config = (0, import_typescript.readConfigFile)(options8.tsConfig, import_typescript.sys.readFile).config;
456563
456570
  const tsConfig = (0, import_typescript.parseJsonConfigFileContent)(
456564
456571
  {
456565
456572
  ...config,
456566
456573
  compilerOptions: {
456567
456574
  ...config?.compilerOptions,
456568
- entry: {
456569
- [removeExtension(context.main).replace(workspaceRoot, "").replace(context.sourceRoot, "")]: context.main
456570
- },
456575
+ include: ["**/*"],
456571
456576
  outDir: outputPath,
456572
- rootDir: workspaceRoot,
456573
- baseUrl: workspaceRoot,
456574
456577
  noEmit: false,
456575
456578
  esModuleInterop: true,
456576
456579
  downlevelIteration: true,
@@ -460954,7 +460954,14 @@ var applyWorkspaceTokens = (options8, config, tokenizerFn) => {
460954
460954
  // packages/workspace-tools/src/utils/file-path-utils.ts
460955
460955
  var import_node_path2 = require("node:path");
460956
460956
  var removeExtension = (filePath) => {
460957
- return !filePath || (filePath.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
460957
+ const result = !filePath || (filePath.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
460958
+ if (result.startsWith("./")) {
460959
+ return result.substring(2);
460960
+ }
460961
+ if (result.startsWith(".") || result.startsWith("/")) {
460962
+ return result.substring(1);
460963
+ }
460964
+ return result;
460958
460965
  };
460959
460966
  function findFileName(filePath) {
460960
460967
  return filePath?.split(filePath?.includes(import_node_path2.sep) ? import_node_path2.sep : filePath?.includes("/") ? "/" : "\\")?.pop() ?? "";
@@ -461268,6 +461275,7 @@ var applyDefaultOptions = (options8) => {
461268
461275
  return options8;
461269
461276
  };
461270
461277
  var runTsupBuild = async (context, config, options8) => {
461278
+ const workspaceRoot = config?.workspaceRoot ?? findWorkspaceRoot();
461271
461279
  const stormEnv = Object.keys(options8.env ?? {}).filter((key2) => key2.startsWith("STORM_")).reduce((ret, key2) => {
461272
461280
  ret[key2] = options8.env?.[key2];
461273
461281
  return ret;
@@ -461275,7 +461283,7 @@ var runTsupBuild = async (context, config, options8) => {
461275
461283
  options8.plugins?.push(
461276
461284
  (0, import_esbuild_decorators.esbuildDecorators)({
461277
461285
  tsconfig: options8.tsConfig,
461278
- cwd: config.workspaceRoot
461286
+ cwd: workspaceRoot
461279
461287
  })
461280
461288
  );
461281
461289
  options8.plugins?.push(environmentPlugin(stormEnv));
@@ -461295,8 +461303,7 @@ var runTsupBuild = async (context, config, options8) => {
461295
461303
  ...stormEnv
461296
461304
  },
461297
461305
  dtsTsConfig: getNormalizedTsConfig(
461298
- context,
461299
- config.workspaceRoot ?? ".",
461306
+ workspaceRoot,
461300
461307
  options8.outputPath,
461301
461308
  createTypeScriptCompilationOptions(
461302
461309
  (0, import_normalize_options.normalizeOptions)(
@@ -461306,9 +461313,9 @@ var runTsupBuild = async (context, config, options8) => {
461306
461313
  main: context.main,
461307
461314
  transformers: []
461308
461315
  },
461309
- config.workspaceRoot ?? ".",
461316
+ workspaceRoot,
461310
461317
  context.sourceRoot,
461311
- config.workspaceRoot ?? "."
461318
+ workspaceRoot
461312
461319
  ),
461313
461320
  context.projectName
461314
461321
  )
@@ -461331,7 +461338,7 @@ ${options8.banner}
461331
461338
  const getConfigFns = [options8.getConfig];
461332
461339
  const tsupConfig = (0, import_tsup.defineConfig)(
461333
461340
  getConfigFns.map(
461334
- (getConfigFn) => getConfig(config.workspaceRoot ?? ".", context.projectRoot, getConfigFn, getConfigOptions)
461341
+ (getConfigFn) => getConfig(workspaceRoot, context.projectRoot, getConfigFn, getConfigOptions)
461335
461342
  )
461336
461343
  );
461337
461344
  if (_isFunction(tsupConfig)) {
@@ -461347,19 +461354,15 @@ ${options8.banner}
461347
461354
  );
461348
461355
  }
461349
461356
  };
461350
- function getNormalizedTsConfig(context, workspaceRoot, outputPath, options8) {
461357
+ function getNormalizedTsConfig(workspaceRoot, outputPath, options8) {
461351
461358
  const config = (0, import_typescript.readConfigFile)(options8.tsConfig, import_typescript.sys.readFile).config;
461352
461359
  const tsConfig = (0, import_typescript.parseJsonConfigFileContent)(
461353
461360
  {
461354
461361
  ...config,
461355
461362
  compilerOptions: {
461356
461363
  ...config?.compilerOptions,
461357
- entry: {
461358
- [removeExtension(context.main).replace(workspaceRoot, "").replace(context.sourceRoot, "")]: context.main
461359
- },
461364
+ include: ["**/*"],
461360
461365
  outDir: outputPath,
461361
- rootDir: workspaceRoot,
461362
- baseUrl: workspaceRoot,
461363
461366
  noEmit: false,
461364
461367
  esModuleInterop: true,
461365
461368
  downlevelIteration: true,