@storm-software/workspace-tools 1.30.0 → 1.30.2

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.30.0",
3
+ "version": "1.30.2",
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": [
@@ -117232,7 +117232,7 @@ function getConfig(workspaceRoot, projectRoot, sourceRoot, {
117232
117232
  let propertyKey = (0, import_devkit.joinPathFragments)(
117233
117233
  filePath.path,
117234
117234
  removeExtension(filePath.name)
117235
- ).replaceAll("/", "\\").replaceAll(workspaceRoot, "").replaceAll("\\", "/").replaceAll(sourceRoot, "").replaceAll(projectRoot, "");
117235
+ ).replaceAll("\\", "/").replaceAll(workspaceRoot.substring(1).replaceAll("\\", "/"), "").replaceAll(sourceRoot.replaceAll("\\", "/"), "").replaceAll(projectRoot.replaceAll("\\", "/"), "");
117236
117236
  if (propertyKey) {
117237
117237
  while (propertyKey.startsWith("/")) {
117238
117238
  propertyKey = propertyKey.substring(1);
@@ -117325,7 +117325,7 @@ ${Object.keys(options).map(
117325
117325
  output: "."
117326
117326
  });
117327
117327
  }
117328
- if (options.includeSrc !== false) {
117328
+ if (options.includeSrc === true) {
117329
117329
  assets.push({
117330
117330
  input: sourceRoot,
117331
117331
  glob: "**/{*.ts,*.tsx,*.js,*.jsx}",
@@ -117358,16 +117358,17 @@ ${Object.keys(options).map(
117358
117358
  if (implicitDependencies && implicitDependencies.length > 0) {
117359
117359
  options.external = implicitDependencies.reduce(
117360
117360
  (ret, key) => {
117361
- if (context.projectsConfigurations.projects[key].root) {
117362
- const packageJson = (0, import_devkit2.readJsonFile)(
117363
- (0, import_path3.join)(
117364
- context.root,
117365
- context.projectsConfigurations.projects[key].root,
117366
- "package.json"
117367
- )
117368
- );
117369
- if (packageJson.name && !options.external.includes(packageJson.name)) {
117370
- ret.push(packageJson.name);
117361
+ if (Object.keys(context.projectsConfigurations.projects[key]?.targets).length > 0) {
117362
+ const buildTargetName = Object.keys(
117363
+ context.projectsConfigurations.projects[key].targets
117364
+ ).find((name) => name.toLowerCase() === "build");
117365
+ if (buildTargetName && context.projectsConfigurations.projects[key].targets[buildTargetName]?.options?.project) {
117366
+ const packageJson = (0, import_devkit2.readJsonFile)(
117367
+ context.projectsConfigurations.projects[key].targets[buildTargetName].options.project
117368
+ );
117369
+ if (packageJson?.name && !options.external.includes(packageJson.name)) {
117370
+ ret.push(packageJson.name);
117371
+ }
117371
117372
  }
117372
117373
  }
117373
117374
  return ret;
@@ -117455,20 +117456,20 @@ ${Object.keys(options).map(
117455
117456
  default: "./dist/modern/index.cjs"
117456
117457
  },
117457
117458
  default: {
117458
- types: "./dist/modern/**/*.d.ts",
117459
- default: "./dist/modern/**/*.js"
117459
+ types: "./dist/modern/index.d.ts",
117460
+ default: "./dist/modern/index.js"
117460
117461
  },
117461
117462
  "./*": {
117462
117463
  "import": {
117463
- types: "./dist/modern/**/*.d.ts",
117464
+ types: "./dist/modern/index.d.ts",
117464
117465
  default: "./dist/modern/**/*.js"
117465
117466
  },
117466
117467
  require: {
117467
- types: "./dist/modern/**/*.d.cts",
117468
+ types: "./dist/modern/index.d.cts",
117468
117469
  default: "./dist/modern/**/*.cjs"
117469
117470
  },
117470
117471
  "default": {
117471
- types: "./dist/modern/**/*.d.ts",
117472
+ types: "./dist/modern/index.d.ts",
117472
117473
  default: "./dist/modern/**/*.js"
117473
117474
  }
117474
117475
  },
@@ -117496,7 +117497,7 @@ ${Object.keys(options).map(
117496
117497
  packageJson.main ??= "dist/legacy/index.cjs";
117497
117498
  packageJson.module ??= "dist/legacy/index.js";
117498
117499
  options.platform && options.platform !== "node" && (packageJson.browser ??= "dist/modern/index.global.js");
117499
- if (options.includeSrc !== false) {
117500
+ if (options.includeSrc === true) {
117500
117501
  let distSrc = sourceRoot.replace(projectRoot, "");
117501
117502
  if (distSrc.startsWith("/")) {
117502
117503
  distSrc = distSrc.substring(1);
@@ -117508,7 +117509,7 @@ ${Object.keys(options).map(
117508
117509
  }
117509
117510
  packageJson.sideEffects ??= false;
117510
117511
  packageJson.files ??= ["dist/**/*"];
117511
- if (options.includeSrc !== false && !packageJson.files.includes("src")) {
117512
+ if (options.includeSrc === true && !packageJson.files.includes("src")) {
117512
117513
  packageJson.files.push("src/**/*");
117513
117514
  }
117514
117515
  packageJson.publishConfig ??= {
@@ -117536,7 +117537,7 @@ ${Object.keys(options).map(
117536
117537
  })
117537
117538
  );
117538
117539
  }
117539
- if (options.includeSrc !== false) {
117540
+ if (options.includeSrc === true) {
117540
117541
  const files = globSync([
117541
117542
  (0, import_devkit2.joinPathFragments)(context.root, options.outputPath, "src/**/*.ts"),
117542
117543
  (0, import_devkit2.joinPathFragments)(context.root, options.outputPath, "src/**/*.tsx"),
@@ -88629,7 +88629,7 @@ function getConfig(workspaceRoot, projectRoot, sourceRoot, {
88629
88629
  let propertyKey = (0, import_devkit.joinPathFragments)(
88630
88630
  filePath.path,
88631
88631
  removeExtension(filePath.name)
88632
- ).replaceAll("/", "\\").replaceAll(workspaceRoot, "").replaceAll("\\", "/").replaceAll(sourceRoot, "").replaceAll(projectRoot, "");
88632
+ ).replaceAll("\\", "/").replaceAll(workspaceRoot.substring(1).replaceAll("\\", "/"), "").replaceAll(sourceRoot.replaceAll("\\", "/"), "").replaceAll(projectRoot.replaceAll("\\", "/"), "");
88633
88633
  if (propertyKey) {
88634
88634
  while (propertyKey.startsWith("/")) {
88635
88635
  propertyKey = propertyKey.substring(1);
@@ -117263,7 +117263,7 @@ function getConfig(workspaceRoot, projectRoot, sourceRoot, {
117263
117263
  let propertyKey = (0, import_devkit.joinPathFragments)(
117264
117264
  filePath.path,
117265
117265
  removeExtension(filePath.name)
117266
- ).replaceAll("/", "\\").replaceAll(workspaceRoot, "").replaceAll("\\", "/").replaceAll(sourceRoot, "").replaceAll(projectRoot, "");
117266
+ ).replaceAll("\\", "/").replaceAll(workspaceRoot.substring(1).replaceAll("\\", "/"), "").replaceAll(sourceRoot.replaceAll("\\", "/"), "").replaceAll(projectRoot.replaceAll("\\", "/"), "");
117267
117267
  if (propertyKey) {
117268
117268
  while (propertyKey.startsWith("/")) {
117269
117269
  propertyKey = propertyKey.substring(1);
@@ -117356,7 +117356,7 @@ ${Object.keys(options).map(
117356
117356
  output: "."
117357
117357
  });
117358
117358
  }
117359
- if (options.includeSrc !== false) {
117359
+ if (options.includeSrc === true) {
117360
117360
  assets.push({
117361
117361
  input: sourceRoot,
117362
117362
  glob: "**/{*.ts,*.tsx,*.js,*.jsx}",
@@ -117389,16 +117389,17 @@ ${Object.keys(options).map(
117389
117389
  if (implicitDependencies && implicitDependencies.length > 0) {
117390
117390
  options.external = implicitDependencies.reduce(
117391
117391
  (ret, key) => {
117392
- if (context.projectsConfigurations.projects[key].root) {
117393
- const packageJson = (0, import_devkit2.readJsonFile)(
117394
- (0, import_path3.join)(
117395
- context.root,
117396
- context.projectsConfigurations.projects[key].root,
117397
- "package.json"
117398
- )
117399
- );
117400
- if (packageJson.name && !options.external.includes(packageJson.name)) {
117401
- ret.push(packageJson.name);
117392
+ if (Object.keys(context.projectsConfigurations.projects[key]?.targets).length > 0) {
117393
+ const buildTargetName = Object.keys(
117394
+ context.projectsConfigurations.projects[key].targets
117395
+ ).find((name) => name.toLowerCase() === "build");
117396
+ if (buildTargetName && context.projectsConfigurations.projects[key].targets[buildTargetName]?.options?.project) {
117397
+ const packageJson = (0, import_devkit2.readJsonFile)(
117398
+ context.projectsConfigurations.projects[key].targets[buildTargetName].options.project
117399
+ );
117400
+ if (packageJson?.name && !options.external.includes(packageJson.name)) {
117401
+ ret.push(packageJson.name);
117402
+ }
117402
117403
  }
117403
117404
  }
117404
117405
  return ret;
@@ -117486,20 +117487,20 @@ ${Object.keys(options).map(
117486
117487
  default: "./dist/modern/index.cjs"
117487
117488
  },
117488
117489
  default: {
117489
- types: "./dist/modern/**/*.d.ts",
117490
- default: "./dist/modern/**/*.js"
117490
+ types: "./dist/modern/index.d.ts",
117491
+ default: "./dist/modern/index.js"
117491
117492
  },
117492
117493
  "./*": {
117493
117494
  "import": {
117494
- types: "./dist/modern/**/*.d.ts",
117495
+ types: "./dist/modern/index.d.ts",
117495
117496
  default: "./dist/modern/**/*.js"
117496
117497
  },
117497
117498
  require: {
117498
- types: "./dist/modern/**/*.d.cts",
117499
+ types: "./dist/modern/index.d.cts",
117499
117500
  default: "./dist/modern/**/*.cjs"
117500
117501
  },
117501
117502
  "default": {
117502
- types: "./dist/modern/**/*.d.ts",
117503
+ types: "./dist/modern/index.d.ts",
117503
117504
  default: "./dist/modern/**/*.js"
117504
117505
  }
117505
117506
  },
@@ -117527,7 +117528,7 @@ ${Object.keys(options).map(
117527
117528
  packageJson.main ??= "dist/legacy/index.cjs";
117528
117529
  packageJson.module ??= "dist/legacy/index.js";
117529
117530
  options.platform && options.platform !== "node" && (packageJson.browser ??= "dist/modern/index.global.js");
117530
- if (options.includeSrc !== false) {
117531
+ if (options.includeSrc === true) {
117531
117532
  let distSrc = sourceRoot.replace(projectRoot, "");
117532
117533
  if (distSrc.startsWith("/")) {
117533
117534
  distSrc = distSrc.substring(1);
@@ -117539,7 +117540,7 @@ ${Object.keys(options).map(
117539
117540
  }
117540
117541
  packageJson.sideEffects ??= false;
117541
117542
  packageJson.files ??= ["dist/**/*"];
117542
- if (options.includeSrc !== false && !packageJson.files.includes("src")) {
117543
+ if (options.includeSrc === true && !packageJson.files.includes("src")) {
117543
117544
  packageJson.files.push("src/**/*");
117544
117545
  }
117545
117546
  packageJson.publishConfig ??= {
@@ -117567,7 +117568,7 @@ ${Object.keys(options).map(
117567
117568
  })
117568
117569
  );
117569
117570
  }
117570
- if (options.includeSrc !== false) {
117571
+ if (options.includeSrc === true) {
117571
117572
  const files = globSync([
117572
117573
  (0, import_devkit2.joinPathFragments)(context.root, options.outputPath, "src/**/*.ts"),
117573
117574
  (0, import_devkit2.joinPathFragments)(context.root, options.outputPath, "src/**/*.tsx"),
@@ -117263,7 +117263,7 @@ function getConfig(workspaceRoot, projectRoot, sourceRoot, {
117263
117263
  let propertyKey = (0, import_devkit.joinPathFragments)(
117264
117264
  filePath.path,
117265
117265
  removeExtension(filePath.name)
117266
- ).replaceAll("/", "\\").replaceAll(workspaceRoot, "").replaceAll("\\", "/").replaceAll(sourceRoot, "").replaceAll(projectRoot, "");
117266
+ ).replaceAll("\\", "/").replaceAll(workspaceRoot.substring(1).replaceAll("\\", "/"), "").replaceAll(sourceRoot.replaceAll("\\", "/"), "").replaceAll(projectRoot.replaceAll("\\", "/"), "");
117267
117267
  if (propertyKey) {
117268
117268
  while (propertyKey.startsWith("/")) {
117269
117269
  propertyKey = propertyKey.substring(1);
@@ -117356,7 +117356,7 @@ ${Object.keys(options).map(
117356
117356
  output: "."
117357
117357
  });
117358
117358
  }
117359
- if (options.includeSrc !== false) {
117359
+ if (options.includeSrc === true) {
117360
117360
  assets.push({
117361
117361
  input: sourceRoot,
117362
117362
  glob: "**/{*.ts,*.tsx,*.js,*.jsx}",
@@ -117389,16 +117389,17 @@ ${Object.keys(options).map(
117389
117389
  if (implicitDependencies && implicitDependencies.length > 0) {
117390
117390
  options.external = implicitDependencies.reduce(
117391
117391
  (ret, key) => {
117392
- if (context.projectsConfigurations.projects[key].root) {
117393
- const packageJson = (0, import_devkit2.readJsonFile)(
117394
- (0, import_path3.join)(
117395
- context.root,
117396
- context.projectsConfigurations.projects[key].root,
117397
- "package.json"
117398
- )
117399
- );
117400
- if (packageJson.name && !options.external.includes(packageJson.name)) {
117401
- ret.push(packageJson.name);
117392
+ if (Object.keys(context.projectsConfigurations.projects[key]?.targets).length > 0) {
117393
+ const buildTargetName = Object.keys(
117394
+ context.projectsConfigurations.projects[key].targets
117395
+ ).find((name) => name.toLowerCase() === "build");
117396
+ if (buildTargetName && context.projectsConfigurations.projects[key].targets[buildTargetName]?.options?.project) {
117397
+ const packageJson = (0, import_devkit2.readJsonFile)(
117398
+ context.projectsConfigurations.projects[key].targets[buildTargetName].options.project
117399
+ );
117400
+ if (packageJson?.name && !options.external.includes(packageJson.name)) {
117401
+ ret.push(packageJson.name);
117402
+ }
117402
117403
  }
117403
117404
  }
117404
117405
  return ret;
@@ -117486,20 +117487,20 @@ ${Object.keys(options).map(
117486
117487
  default: "./dist/modern/index.cjs"
117487
117488
  },
117488
117489
  default: {
117489
- types: "./dist/modern/**/*.d.ts",
117490
- default: "./dist/modern/**/*.js"
117490
+ types: "./dist/modern/index.d.ts",
117491
+ default: "./dist/modern/index.js"
117491
117492
  },
117492
117493
  "./*": {
117493
117494
  "import": {
117494
- types: "./dist/modern/**/*.d.ts",
117495
+ types: "./dist/modern/index.d.ts",
117495
117496
  default: "./dist/modern/**/*.js"
117496
117497
  },
117497
117498
  require: {
117498
- types: "./dist/modern/**/*.d.cts",
117499
+ types: "./dist/modern/index.d.cts",
117499
117500
  default: "./dist/modern/**/*.cjs"
117500
117501
  },
117501
117502
  "default": {
117502
- types: "./dist/modern/**/*.d.ts",
117503
+ types: "./dist/modern/index.d.ts",
117503
117504
  default: "./dist/modern/**/*.js"
117504
117505
  }
117505
117506
  },
@@ -117527,7 +117528,7 @@ ${Object.keys(options).map(
117527
117528
  packageJson.main ??= "dist/legacy/index.cjs";
117528
117529
  packageJson.module ??= "dist/legacy/index.js";
117529
117530
  options.platform && options.platform !== "node" && (packageJson.browser ??= "dist/modern/index.global.js");
117530
- if (options.includeSrc !== false) {
117531
+ if (options.includeSrc === true) {
117531
117532
  let distSrc = sourceRoot.replace(projectRoot, "");
117532
117533
  if (distSrc.startsWith("/")) {
117533
117534
  distSrc = distSrc.substring(1);
@@ -117539,7 +117540,7 @@ ${Object.keys(options).map(
117539
117540
  }
117540
117541
  packageJson.sideEffects ??= false;
117541
117542
  packageJson.files ??= ["dist/**/*"];
117542
- if (options.includeSrc !== false && !packageJson.files.includes("src")) {
117543
+ if (options.includeSrc === true && !packageJson.files.includes("src")) {
117543
117544
  packageJson.files.push("src/**/*");
117544
117545
  }
117545
117546
  packageJson.publishConfig ??= {
@@ -117567,7 +117568,7 @@ ${Object.keys(options).map(
117567
117568
  })
117568
117569
  );
117569
117570
  }
117570
- if (options.includeSrc !== false) {
117571
+ if (options.includeSrc === true) {
117571
117572
  const files = globSync([
117572
117573
  (0, import_devkit2.joinPathFragments)(context.root, options.outputPath, "src/**/*.ts"),
117573
117574
  (0, import_devkit2.joinPathFragments)(context.root, options.outputPath, "src/**/*.tsx"),
@@ -117263,7 +117263,7 @@ function getConfig(workspaceRoot, projectRoot, sourceRoot, {
117263
117263
  let propertyKey = (0, import_devkit.joinPathFragments)(
117264
117264
  filePath.path,
117265
117265
  removeExtension(filePath.name)
117266
- ).replaceAll("/", "\\").replaceAll(workspaceRoot, "").replaceAll("\\", "/").replaceAll(sourceRoot, "").replaceAll(projectRoot, "");
117266
+ ).replaceAll("\\", "/").replaceAll(workspaceRoot.substring(1).replaceAll("\\", "/"), "").replaceAll(sourceRoot.replaceAll("\\", "/"), "").replaceAll(projectRoot.replaceAll("\\", "/"), "");
117267
117267
  if (propertyKey) {
117268
117268
  while (propertyKey.startsWith("/")) {
117269
117269
  propertyKey = propertyKey.substring(1);
@@ -117356,7 +117356,7 @@ ${Object.keys(options).map(
117356
117356
  output: "."
117357
117357
  });
117358
117358
  }
117359
- if (options.includeSrc !== false) {
117359
+ if (options.includeSrc === true) {
117360
117360
  assets.push({
117361
117361
  input: sourceRoot,
117362
117362
  glob: "**/{*.ts,*.tsx,*.js,*.jsx}",
@@ -117389,16 +117389,17 @@ ${Object.keys(options).map(
117389
117389
  if (implicitDependencies && implicitDependencies.length > 0) {
117390
117390
  options.external = implicitDependencies.reduce(
117391
117391
  (ret, key) => {
117392
- if (context.projectsConfigurations.projects[key].root) {
117393
- const packageJson = (0, import_devkit2.readJsonFile)(
117394
- (0, import_path3.join)(
117395
- context.root,
117396
- context.projectsConfigurations.projects[key].root,
117397
- "package.json"
117398
- )
117399
- );
117400
- if (packageJson.name && !options.external.includes(packageJson.name)) {
117401
- ret.push(packageJson.name);
117392
+ if (Object.keys(context.projectsConfigurations.projects[key]?.targets).length > 0) {
117393
+ const buildTargetName = Object.keys(
117394
+ context.projectsConfigurations.projects[key].targets
117395
+ ).find((name) => name.toLowerCase() === "build");
117396
+ if (buildTargetName && context.projectsConfigurations.projects[key].targets[buildTargetName]?.options?.project) {
117397
+ const packageJson = (0, import_devkit2.readJsonFile)(
117398
+ context.projectsConfigurations.projects[key].targets[buildTargetName].options.project
117399
+ );
117400
+ if (packageJson?.name && !options.external.includes(packageJson.name)) {
117401
+ ret.push(packageJson.name);
117402
+ }
117402
117403
  }
117403
117404
  }
117404
117405
  return ret;
@@ -117486,20 +117487,20 @@ ${Object.keys(options).map(
117486
117487
  default: "./dist/modern/index.cjs"
117487
117488
  },
117488
117489
  default: {
117489
- types: "./dist/modern/**/*.d.ts",
117490
- default: "./dist/modern/**/*.js"
117490
+ types: "./dist/modern/index.d.ts",
117491
+ default: "./dist/modern/index.js"
117491
117492
  },
117492
117493
  "./*": {
117493
117494
  "import": {
117494
- types: "./dist/modern/**/*.d.ts",
117495
+ types: "./dist/modern/index.d.ts",
117495
117496
  default: "./dist/modern/**/*.js"
117496
117497
  },
117497
117498
  require: {
117498
- types: "./dist/modern/**/*.d.cts",
117499
+ types: "./dist/modern/index.d.cts",
117499
117500
  default: "./dist/modern/**/*.cjs"
117500
117501
  },
117501
117502
  "default": {
117502
- types: "./dist/modern/**/*.d.ts",
117503
+ types: "./dist/modern/index.d.ts",
117503
117504
  default: "./dist/modern/**/*.js"
117504
117505
  }
117505
117506
  },
@@ -117527,7 +117528,7 @@ ${Object.keys(options).map(
117527
117528
  packageJson.main ??= "dist/legacy/index.cjs";
117528
117529
  packageJson.module ??= "dist/legacy/index.js";
117529
117530
  options.platform && options.platform !== "node" && (packageJson.browser ??= "dist/modern/index.global.js");
117530
- if (options.includeSrc !== false) {
117531
+ if (options.includeSrc === true) {
117531
117532
  let distSrc = sourceRoot.replace(projectRoot, "");
117532
117533
  if (distSrc.startsWith("/")) {
117533
117534
  distSrc = distSrc.substring(1);
@@ -117539,7 +117540,7 @@ ${Object.keys(options).map(
117539
117540
  }
117540
117541
  packageJson.sideEffects ??= false;
117541
117542
  packageJson.files ??= ["dist/**/*"];
117542
- if (options.includeSrc !== false && !packageJson.files.includes("src")) {
117543
+ if (options.includeSrc === true && !packageJson.files.includes("src")) {
117543
117544
  packageJson.files.push("src/**/*");
117544
117545
  }
117545
117546
  packageJson.publishConfig ??= {
@@ -117567,7 +117568,7 @@ ${Object.keys(options).map(
117567
117568
  })
117568
117569
  );
117569
117570
  }
117570
- if (options.includeSrc !== false) {
117571
+ if (options.includeSrc === true) {
117571
117572
  const files = globSync([
117572
117573
  (0, import_devkit2.joinPathFragments)(context.root, options.outputPath, "src/**/*.ts"),
117573
117574
  (0, import_devkit2.joinPathFragments)(context.root, options.outputPath, "src/**/*.tsx"),