@storm-software/workspace-tools 1.30.9 → 1.30.10

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.9",
3
+ "version": "1.30.10",
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": [
@@ -117041,12 +117041,82 @@ function modernConfig({
117041
117041
  outExtension
117042
117042
  };
117043
117043
  }
117044
+ function legacyConfig({
117045
+ entry,
117046
+ outDir,
117047
+ projectRoot,
117048
+ workspaceRoot,
117049
+ tsconfig = "tsconfig.json",
117050
+ splitting,
117051
+ treeshake,
117052
+ debug = false,
117053
+ external,
117054
+ banner = {},
117055
+ platform = "neutral",
117056
+ verbose = false,
117057
+ shims = true,
117058
+ define: define2,
117059
+ env,
117060
+ plugins,
117061
+ generatePackageJson,
117062
+ dtsTsConfig
117063
+ }) {
117064
+ let outputPath = (0, import_devkit.joinPathFragments)(outDir, "dist", "legacy");
117065
+ return {
117066
+ name: "legacy",
117067
+ entry,
117068
+ format: platform !== "node" ? ["cjs", "esm", "iife"] : ["cjs", "esm"],
117069
+ target: ["es2022", "node18"],
117070
+ tsconfig,
117071
+ splitting,
117072
+ generatePackageJson,
117073
+ treeshake: treeshake ? {
117074
+ preset: "recommended"
117075
+ } : false,
117076
+ projectRoot,
117077
+ workspaceRoot,
117078
+ outDir: outputPath,
117079
+ silent: !verbose,
117080
+ metafile: true,
117081
+ shims,
117082
+ external,
117083
+ platform,
117084
+ banner,
117085
+ define: define2,
117086
+ env,
117087
+ dts: false,
117088
+ experimentalDts: {
117089
+ entry,
117090
+ compilerOptions: {
117091
+ ...dtsTsConfig,
117092
+ options: {
117093
+ ...dtsTsConfig.options,
117094
+ outDir: outputPath
117095
+ }
117096
+ }
117097
+ },
117098
+ /*minify: debug ? false : "terser",
117099
+ terserOptions: {
117100
+ compress: true,
117101
+ ecma: 2020,
117102
+ keep_classnames: true,
117103
+ keep_fnames: true
117104
+ },*/
117105
+ apiReport: false,
117106
+ docModel: false,
117107
+ tsdocMetadata: false,
117108
+ sourcemap: debug,
117109
+ clean: false,
117110
+ tsconfigDecoratorMetadata: true,
117111
+ plugins,
117112
+ outExtension
117113
+ };
117114
+ }
117044
117115
  function getConfig(workspaceRoot, projectRoot, getConfigFn, {
117045
117116
  outputPath,
117046
117117
  tsConfig,
117047
117118
  additionalEntryPoints,
117048
117119
  platform,
117049
- emitOnAll = true,
117050
117120
  ...rest
117051
117121
  }) {
117052
117122
  return getConfigFn({
@@ -117255,15 +117325,15 @@ ${externalDependencies.map((dep) => {
117255
117325
  const pathToPackageJson = (0, import_path3.join)(context.root, projectRoot, "package.json");
117256
117326
  const packageJson = (0, import_fileutils.fileExists)(pathToPackageJson) ? (0, import_devkit2.readJsonFile)(pathToPackageJson) : { name: context.projectName, version: "0.0.1" };
117257
117327
  delete packageJson.dependencies;
117258
- externalDependencies.forEach((entry2) => {
117259
- const packageConfig = entry2.node.data;
117260
- if (packageConfig?.packageName && !!(projectGraph.externalNodes[entry2.node.name]?.type === "npm")) {
117328
+ externalDependencies.forEach((externalDependency) => {
117329
+ const packageConfig = externalDependency.node.data;
117330
+ if (packageConfig?.packageName && !!(projectGraph.externalNodes[externalDependency.node.name]?.type === "npm")) {
117261
117331
  const { packageName, version } = packageConfig;
117262
117332
  if (workspacePackageJson.dependencies?.[packageName] || workspacePackageJson.devDependencies?.[packageName]) {
117263
117333
  return;
117264
117334
  }
117265
117335
  packageJson.dependencies ??= {};
117266
- packageJson.dependencies[packageName] = !!projectGraph.nodes[entry2.node.name] ? "latest" : version;
117336
+ packageJson.dependencies[packageName] = !!projectGraph.nodes[externalDependency.node.name] ? "latest" : version;
117267
117337
  }
117268
117338
  });
117269
117339
  internalDependencies.forEach((packageName) => {
@@ -117302,7 +117372,8 @@ ${externalDependencies.map((dep) => {
117302
117372
  };
117303
117373
  packageJson.exports = Object.keys(entry).reduce(
117304
117374
  (ret, key) => {
117305
- const packageJsonKey = key.startsWith("./") ? key : `./${key}`;
117375
+ let packageJsonKey = key.startsWith("./") ? key : `./${key}`;
117376
+ packageJsonKey = packageJsonKey.replaceAll("/index", "");
117306
117377
  if (!ret[packageJsonKey]) {
117307
117378
  ret[packageJsonKey] = {
117308
117379
  import: {
@@ -117411,47 +117482,51 @@ ${(0, import_fs3.readFileSync)(file, "utf-8")}`,
117411
117482
  options.plugins.push(environmentPlugin(stormEnv));
117412
117483
  const config = (0, import_tsup.defineConfig)([
117413
117484
  ...Object.keys(entry).reduce((ret, key) => {
117414
- ret.push(
117415
- getConfig(context.root, projectRoot, modernConfig, {
117416
- ...options,
117417
- define: {
117418
- __STORM_CONFIG: JSON.stringify(stormEnv)
117419
- },
117420
- env: {
117421
- __STORM_CONFIG: JSON.stringify(stormEnv),
117422
- ...stormEnv
117423
- },
117424
- dtsTsConfig: getNormalizedTsConfig(
117425
- context.root,
117426
- options.outputPath,
117427
- (0, import_tsc.createTypeScriptCompilationOptions)(
117428
- (0, import_normalize_options.normalizeOptions)(
117429
- {
117430
- ...options,
117431
- watch: false,
117432
- main: key,
117433
- transformers: []
117434
- },
117435
- context.root,
117436
- sourceRoot,
117437
- workspaceRoot
117438
- ),
117439
- context
117440
- )
117441
- ),
117442
- banner: options.banner ? {
117443
- js: `${options.banner}
117485
+ const getConfigOptions = {
117486
+ ...options,
117487
+ define: {
117488
+ __STORM_CONFIG: JSON.stringify(stormEnv)
117489
+ },
117490
+ env: {
117491
+ __STORM_CONFIG: JSON.stringify(stormEnv),
117492
+ ...stormEnv
117493
+ },
117494
+ dtsTsConfig: getNormalizedTsConfig(
117495
+ context.root,
117496
+ options.outputPath,
117497
+ (0, import_tsc.createTypeScriptCompilationOptions)(
117498
+ (0, import_normalize_options.normalizeOptions)(
117499
+ {
117500
+ ...options,
117501
+ watch: false,
117502
+ main: entry[key],
117503
+ transformers: []
117504
+ },
117505
+ context.root,
117506
+ sourceRoot,
117507
+ workspaceRoot
117508
+ ),
117509
+ context
117510
+ )
117511
+ ),
117512
+ banner: options.banner ? {
117513
+ js: `${options.banner}
117444
117514
 
117445
117515
  `,
117446
- css: `/*
117516
+ css: `/*
117447
117517
  ${options.banner}
117448
117518
  */
117449
117519
 
117450
117520
  `
117451
- } : void 0,
117452
- outputPath: options.outputPath,
117453
- entry: key
117454
- })
117521
+ } : void 0,
117522
+ outputPath: options.outputPath,
117523
+ entry: entry[key]
117524
+ };
117525
+ ret.push(
117526
+ getConfig(context.root, projectRoot, legacyConfig, getConfigOptions)
117527
+ );
117528
+ ret.push(
117529
+ getConfig(context.root, projectRoot, modernConfig, getConfigOptions)
117455
117530
  );
117456
117531
  return ret;
117457
117532
  }, [])
@@ -18474,7 +18474,6 @@ function getConfig(workspaceRoot, projectRoot, getConfigFn, {
18474
18474
  tsConfig,
18475
18475
  additionalEntryPoints,
18476
18476
  platform,
18477
- emitOnAll = true,
18478
18477
  ...rest
18479
18478
  }) {
18480
18479
  return getConfigFn({
@@ -117072,12 +117072,82 @@ function modernConfig({
117072
117072
  outExtension
117073
117073
  };
117074
117074
  }
117075
+ function legacyConfig({
117076
+ entry,
117077
+ outDir,
117078
+ projectRoot,
117079
+ workspaceRoot,
117080
+ tsconfig = "tsconfig.json",
117081
+ splitting,
117082
+ treeshake,
117083
+ debug = false,
117084
+ external,
117085
+ banner = {},
117086
+ platform = "neutral",
117087
+ verbose = false,
117088
+ shims = true,
117089
+ define: define2,
117090
+ env,
117091
+ plugins,
117092
+ generatePackageJson,
117093
+ dtsTsConfig
117094
+ }) {
117095
+ let outputPath = (0, import_devkit.joinPathFragments)(outDir, "dist", "legacy");
117096
+ return {
117097
+ name: "legacy",
117098
+ entry,
117099
+ format: platform !== "node" ? ["cjs", "esm", "iife"] : ["cjs", "esm"],
117100
+ target: ["es2022", "node18"],
117101
+ tsconfig,
117102
+ splitting,
117103
+ generatePackageJson,
117104
+ treeshake: treeshake ? {
117105
+ preset: "recommended"
117106
+ } : false,
117107
+ projectRoot,
117108
+ workspaceRoot,
117109
+ outDir: outputPath,
117110
+ silent: !verbose,
117111
+ metafile: true,
117112
+ shims,
117113
+ external,
117114
+ platform,
117115
+ banner,
117116
+ define: define2,
117117
+ env,
117118
+ dts: false,
117119
+ experimentalDts: {
117120
+ entry,
117121
+ compilerOptions: {
117122
+ ...dtsTsConfig,
117123
+ options: {
117124
+ ...dtsTsConfig.options,
117125
+ outDir: outputPath
117126
+ }
117127
+ }
117128
+ },
117129
+ /*minify: debug ? false : "terser",
117130
+ terserOptions: {
117131
+ compress: true,
117132
+ ecma: 2020,
117133
+ keep_classnames: true,
117134
+ keep_fnames: true
117135
+ },*/
117136
+ apiReport: false,
117137
+ docModel: false,
117138
+ tsdocMetadata: false,
117139
+ sourcemap: debug,
117140
+ clean: false,
117141
+ tsconfigDecoratorMetadata: true,
117142
+ plugins,
117143
+ outExtension
117144
+ };
117145
+ }
117075
117146
  function getConfig(workspaceRoot, projectRoot, getConfigFn, {
117076
117147
  outputPath,
117077
117148
  tsConfig,
117078
117149
  additionalEntryPoints,
117079
117150
  platform,
117080
- emitOnAll = true,
117081
117151
  ...rest
117082
117152
  }) {
117083
117153
  return getConfigFn({
@@ -117286,15 +117356,15 @@ ${externalDependencies.map((dep) => {
117286
117356
  const pathToPackageJson = (0, import_path3.join)(context.root, projectRoot, "package.json");
117287
117357
  const packageJson = (0, import_fileutils.fileExists)(pathToPackageJson) ? (0, import_devkit2.readJsonFile)(pathToPackageJson) : { name: context.projectName, version: "0.0.1" };
117288
117358
  delete packageJson.dependencies;
117289
- externalDependencies.forEach((entry2) => {
117290
- const packageConfig = entry2.node.data;
117291
- if (packageConfig?.packageName && !!(projectGraph.externalNodes[entry2.node.name]?.type === "npm")) {
117359
+ externalDependencies.forEach((externalDependency) => {
117360
+ const packageConfig = externalDependency.node.data;
117361
+ if (packageConfig?.packageName && !!(projectGraph.externalNodes[externalDependency.node.name]?.type === "npm")) {
117292
117362
  const { packageName, version } = packageConfig;
117293
117363
  if (workspacePackageJson.dependencies?.[packageName] || workspacePackageJson.devDependencies?.[packageName]) {
117294
117364
  return;
117295
117365
  }
117296
117366
  packageJson.dependencies ??= {};
117297
- packageJson.dependencies[packageName] = !!projectGraph.nodes[entry2.node.name] ? "latest" : version;
117367
+ packageJson.dependencies[packageName] = !!projectGraph.nodes[externalDependency.node.name] ? "latest" : version;
117298
117368
  }
117299
117369
  });
117300
117370
  internalDependencies.forEach((packageName) => {
@@ -117333,7 +117403,8 @@ ${externalDependencies.map((dep) => {
117333
117403
  };
117334
117404
  packageJson.exports = Object.keys(entry).reduce(
117335
117405
  (ret, key) => {
117336
- const packageJsonKey = key.startsWith("./") ? key : `./${key}`;
117406
+ let packageJsonKey = key.startsWith("./") ? key : `./${key}`;
117407
+ packageJsonKey = packageJsonKey.replaceAll("/index", "");
117337
117408
  if (!ret[packageJsonKey]) {
117338
117409
  ret[packageJsonKey] = {
117339
117410
  import: {
@@ -117442,47 +117513,51 @@ ${(0, import_fs3.readFileSync)(file, "utf-8")}`,
117442
117513
  options.plugins.push(environmentPlugin(stormEnv));
117443
117514
  const config = (0, import_tsup.defineConfig)([
117444
117515
  ...Object.keys(entry).reduce((ret, key) => {
117445
- ret.push(
117446
- getConfig(context.root, projectRoot, modernConfig, {
117447
- ...options,
117448
- define: {
117449
- __STORM_CONFIG: JSON.stringify(stormEnv)
117450
- },
117451
- env: {
117452
- __STORM_CONFIG: JSON.stringify(stormEnv),
117453
- ...stormEnv
117454
- },
117455
- dtsTsConfig: getNormalizedTsConfig(
117456
- context.root,
117457
- options.outputPath,
117458
- (0, import_tsc.createTypeScriptCompilationOptions)(
117459
- (0, import_normalize_options.normalizeOptions)(
117460
- {
117461
- ...options,
117462
- watch: false,
117463
- main: key,
117464
- transformers: []
117465
- },
117466
- context.root,
117467
- sourceRoot,
117468
- workspaceRoot
117469
- ),
117470
- context
117471
- )
117472
- ),
117473
- banner: options.banner ? {
117474
- js: `${options.banner}
117516
+ const getConfigOptions = {
117517
+ ...options,
117518
+ define: {
117519
+ __STORM_CONFIG: JSON.stringify(stormEnv)
117520
+ },
117521
+ env: {
117522
+ __STORM_CONFIG: JSON.stringify(stormEnv),
117523
+ ...stormEnv
117524
+ },
117525
+ dtsTsConfig: getNormalizedTsConfig(
117526
+ context.root,
117527
+ options.outputPath,
117528
+ (0, import_tsc.createTypeScriptCompilationOptions)(
117529
+ (0, import_normalize_options.normalizeOptions)(
117530
+ {
117531
+ ...options,
117532
+ watch: false,
117533
+ main: entry[key],
117534
+ transformers: []
117535
+ },
117536
+ context.root,
117537
+ sourceRoot,
117538
+ workspaceRoot
117539
+ ),
117540
+ context
117541
+ )
117542
+ ),
117543
+ banner: options.banner ? {
117544
+ js: `${options.banner}
117475
117545
 
117476
117546
  `,
117477
- css: `/*
117547
+ css: `/*
117478
117548
  ${options.banner}
117479
117549
  */
117480
117550
 
117481
117551
  `
117482
- } : void 0,
117483
- outputPath: options.outputPath,
117484
- entry: key
117485
- })
117552
+ } : void 0,
117553
+ outputPath: options.outputPath,
117554
+ entry: entry[key]
117555
+ };
117556
+ ret.push(
117557
+ getConfig(context.root, projectRoot, legacyConfig, getConfigOptions)
117558
+ );
117559
+ ret.push(
117560
+ getConfig(context.root, projectRoot, modernConfig, getConfigOptions)
117486
117561
  );
117487
117562
  return ret;
117488
117563
  }, [])
@@ -117072,12 +117072,82 @@ function modernConfig({
117072
117072
  outExtension
117073
117073
  };
117074
117074
  }
117075
+ function legacyConfig({
117076
+ entry,
117077
+ outDir,
117078
+ projectRoot,
117079
+ workspaceRoot,
117080
+ tsconfig = "tsconfig.json",
117081
+ splitting,
117082
+ treeshake,
117083
+ debug = false,
117084
+ external,
117085
+ banner = {},
117086
+ platform = "neutral",
117087
+ verbose = false,
117088
+ shims = true,
117089
+ define: define2,
117090
+ env,
117091
+ plugins,
117092
+ generatePackageJson,
117093
+ dtsTsConfig
117094
+ }) {
117095
+ let outputPath = (0, import_devkit.joinPathFragments)(outDir, "dist", "legacy");
117096
+ return {
117097
+ name: "legacy",
117098
+ entry,
117099
+ format: platform !== "node" ? ["cjs", "esm", "iife"] : ["cjs", "esm"],
117100
+ target: ["es2022", "node18"],
117101
+ tsconfig,
117102
+ splitting,
117103
+ generatePackageJson,
117104
+ treeshake: treeshake ? {
117105
+ preset: "recommended"
117106
+ } : false,
117107
+ projectRoot,
117108
+ workspaceRoot,
117109
+ outDir: outputPath,
117110
+ silent: !verbose,
117111
+ metafile: true,
117112
+ shims,
117113
+ external,
117114
+ platform,
117115
+ banner,
117116
+ define: define2,
117117
+ env,
117118
+ dts: false,
117119
+ experimentalDts: {
117120
+ entry,
117121
+ compilerOptions: {
117122
+ ...dtsTsConfig,
117123
+ options: {
117124
+ ...dtsTsConfig.options,
117125
+ outDir: outputPath
117126
+ }
117127
+ }
117128
+ },
117129
+ /*minify: debug ? false : "terser",
117130
+ terserOptions: {
117131
+ compress: true,
117132
+ ecma: 2020,
117133
+ keep_classnames: true,
117134
+ keep_fnames: true
117135
+ },*/
117136
+ apiReport: false,
117137
+ docModel: false,
117138
+ tsdocMetadata: false,
117139
+ sourcemap: debug,
117140
+ clean: false,
117141
+ tsconfigDecoratorMetadata: true,
117142
+ plugins,
117143
+ outExtension
117144
+ };
117145
+ }
117075
117146
  function getConfig(workspaceRoot, projectRoot, getConfigFn, {
117076
117147
  outputPath,
117077
117148
  tsConfig,
117078
117149
  additionalEntryPoints,
117079
117150
  platform,
117080
- emitOnAll = true,
117081
117151
  ...rest
117082
117152
  }) {
117083
117153
  return getConfigFn({
@@ -117286,15 +117356,15 @@ ${externalDependencies.map((dep) => {
117286
117356
  const pathToPackageJson = (0, import_path3.join)(context.root, projectRoot, "package.json");
117287
117357
  const packageJson = (0, import_fileutils.fileExists)(pathToPackageJson) ? (0, import_devkit2.readJsonFile)(pathToPackageJson) : { name: context.projectName, version: "0.0.1" };
117288
117358
  delete packageJson.dependencies;
117289
- externalDependencies.forEach((entry2) => {
117290
- const packageConfig = entry2.node.data;
117291
- if (packageConfig?.packageName && !!(projectGraph.externalNodes[entry2.node.name]?.type === "npm")) {
117359
+ externalDependencies.forEach((externalDependency) => {
117360
+ const packageConfig = externalDependency.node.data;
117361
+ if (packageConfig?.packageName && !!(projectGraph.externalNodes[externalDependency.node.name]?.type === "npm")) {
117292
117362
  const { packageName, version } = packageConfig;
117293
117363
  if (workspacePackageJson.dependencies?.[packageName] || workspacePackageJson.devDependencies?.[packageName]) {
117294
117364
  return;
117295
117365
  }
117296
117366
  packageJson.dependencies ??= {};
117297
- packageJson.dependencies[packageName] = !!projectGraph.nodes[entry2.node.name] ? "latest" : version;
117367
+ packageJson.dependencies[packageName] = !!projectGraph.nodes[externalDependency.node.name] ? "latest" : version;
117298
117368
  }
117299
117369
  });
117300
117370
  internalDependencies.forEach((packageName) => {
@@ -117333,7 +117403,8 @@ ${externalDependencies.map((dep) => {
117333
117403
  };
117334
117404
  packageJson.exports = Object.keys(entry).reduce(
117335
117405
  (ret, key) => {
117336
- const packageJsonKey = key.startsWith("./") ? key : `./${key}`;
117406
+ let packageJsonKey = key.startsWith("./") ? key : `./${key}`;
117407
+ packageJsonKey = packageJsonKey.replaceAll("/index", "");
117337
117408
  if (!ret[packageJsonKey]) {
117338
117409
  ret[packageJsonKey] = {
117339
117410
  import: {
@@ -117442,47 +117513,51 @@ ${(0, import_fs3.readFileSync)(file, "utf-8")}`,
117442
117513
  options.plugins.push(environmentPlugin(stormEnv));
117443
117514
  const config = (0, import_tsup.defineConfig)([
117444
117515
  ...Object.keys(entry).reduce((ret, key) => {
117445
- ret.push(
117446
- getConfig(context.root, projectRoot, modernConfig, {
117447
- ...options,
117448
- define: {
117449
- __STORM_CONFIG: JSON.stringify(stormEnv)
117450
- },
117451
- env: {
117452
- __STORM_CONFIG: JSON.stringify(stormEnv),
117453
- ...stormEnv
117454
- },
117455
- dtsTsConfig: getNormalizedTsConfig(
117456
- context.root,
117457
- options.outputPath,
117458
- (0, import_tsc.createTypeScriptCompilationOptions)(
117459
- (0, import_normalize_options.normalizeOptions)(
117460
- {
117461
- ...options,
117462
- watch: false,
117463
- main: key,
117464
- transformers: []
117465
- },
117466
- context.root,
117467
- sourceRoot,
117468
- workspaceRoot
117469
- ),
117470
- context
117471
- )
117472
- ),
117473
- banner: options.banner ? {
117474
- js: `${options.banner}
117516
+ const getConfigOptions = {
117517
+ ...options,
117518
+ define: {
117519
+ __STORM_CONFIG: JSON.stringify(stormEnv)
117520
+ },
117521
+ env: {
117522
+ __STORM_CONFIG: JSON.stringify(stormEnv),
117523
+ ...stormEnv
117524
+ },
117525
+ dtsTsConfig: getNormalizedTsConfig(
117526
+ context.root,
117527
+ options.outputPath,
117528
+ (0, import_tsc.createTypeScriptCompilationOptions)(
117529
+ (0, import_normalize_options.normalizeOptions)(
117530
+ {
117531
+ ...options,
117532
+ watch: false,
117533
+ main: entry[key],
117534
+ transformers: []
117535
+ },
117536
+ context.root,
117537
+ sourceRoot,
117538
+ workspaceRoot
117539
+ ),
117540
+ context
117541
+ )
117542
+ ),
117543
+ banner: options.banner ? {
117544
+ js: `${options.banner}
117475
117545
 
117476
117546
  `,
117477
- css: `/*
117547
+ css: `/*
117478
117548
  ${options.banner}
117479
117549
  */
117480
117550
 
117481
117551
  `
117482
- } : void 0,
117483
- outputPath: options.outputPath,
117484
- entry: key
117485
- })
117552
+ } : void 0,
117553
+ outputPath: options.outputPath,
117554
+ entry: entry[key]
117555
+ };
117556
+ ret.push(
117557
+ getConfig(context.root, projectRoot, legacyConfig, getConfigOptions)
117558
+ );
117559
+ ret.push(
117560
+ getConfig(context.root, projectRoot, modernConfig, getConfigOptions)
117486
117561
  );
117487
117562
  return ret;
117488
117563
  }, [])