@storm-software/workspace-tools 1.203.0 → 1.204.0

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/index.js +22 -18
  3. package/meta.json +178 -158
  4. package/package.json +1 -1
  5. package/src/base/base-executor.js +10 -12
  6. package/src/base/base-generator.js +10 -12
  7. package/src/base/index.js +14 -16
  8. package/src/base/typescript-library-generator.d.ts +2 -1
  9. package/src/base/typescript-library-generator.js +4 -4
  10. package/src/executors/cargo-build/executor.js +10 -12
  11. package/src/executors/cargo-check/executor.js +10 -12
  12. package/src/executors/cargo-clippy/executor.js +10 -12
  13. package/src/executors/cargo-doc/executor.js +10 -12
  14. package/src/executors/cargo-format/executor.js +10 -12
  15. package/src/executors/clean-package/executor.js +10 -12
  16. package/src/executors/rolldown/executor.js +10 -12
  17. package/src/executors/rollup/executor.js +10 -12
  18. package/src/executors/size-limit/executor.js +10 -12
  19. package/src/executors/tsup/executor.js +10 -12
  20. package/src/executors/tsup-browser/executor.js +10 -12
  21. package/src/executors/tsup-neutral/executor.js +10 -12
  22. package/src/executors/tsup-node/executor.js +10 -12
  23. package/src/executors/typia/executor.js +10 -12
  24. package/src/executors/unbuild/executor.js +10 -12
  25. package/src/generators/browser-library/generator.d.ts +2 -1
  26. package/src/generators/browser-library/generator.js +16 -18
  27. package/src/generators/config-schema/generator.js +10 -12
  28. package/src/generators/neutral-library/generator.d.ts +2 -1
  29. package/src/generators/neutral-library/generator.js +16 -18
  30. package/src/generators/node-library/generator.d.ts +2 -1
  31. package/src/generators/node-library/generator.js +16 -18
  32. package/src/generators/preset/generator.js +10 -12
  33. package/src/generators/release-version/generator.js +10 -12
  34. package/src/plugins/rust/index.js +6 -0
  35. package/src/plugins/typescript/index.js +6 -0
  36. package/src/utils/index.js +16 -12
  37. package/src/utils/project-tags.js +6 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 1.204.0 (2024-12-19)
2
+
3
+ ### Features
4
+
5
+ - **workspace-tools:** Added `platform` to unbuild schema and project tags
6
+ ([bfbe9dee](https://github.com/storm-software/storm-ops/commit/bfbe9dee))
7
+
1
8
  ## 1.203.0 (2024-12-19)
2
9
 
3
10
  ### Features
package/index.js CHANGED
@@ -66405,7 +66405,7 @@ var init_schema = __esm({
66405
66405
  worker: z3.string().trim().default("Stormie-Bot").describe(
66406
66406
  "The worker of the package (this is the bot that will be used to perform various tasks)"
66407
66407
  ),
66408
- env: z3.enum(["development", "staging", "production"]).default("production").describe("The current runtime environment of the package"),
66408
+ envName: z3.enum(["development", "staging", "production"]).default("production").describe("The current runtime environment name for the package"),
66409
66409
  workspaceRoot: z3.string().trim().default("").describe("The root directory of the workspace"),
66410
66410
  packageDirectory: z3.string().trim().optional().describe("The root directory of the package"),
66411
66411
  externalPackagePatterns: z3.array(z3.string()).default([]).describe(
@@ -66527,19 +66527,17 @@ var init_get_default_config = __esm({
66527
66527
  }
66528
66528
  };
66529
66529
  DEFAULT_STORM_CONFIG = {
66530
- name: "storm",
66531
66530
  namespace: "storm-software",
66532
- license: "Apache 2.0",
66531
+ license: "Apache-2.0",
66533
66532
  homepage: "https://stormsoftware.com",
66534
- owner: "@storm-software/development",
66533
+ owner: "@storm-software/admin",
66535
66534
  worker: "stormie-bot",
66536
66535
  runtimeDirectory: "node_modules/.storm",
66537
- cacheDirectory: "node_modules/.cache/storm",
66538
66536
  skipCache: false,
66539
- packageManager: "npm",
66537
+ packageManager: "pnpm",
66540
66538
  timezone: "America/New_York",
66541
66539
  locale: "en-US",
66542
- env: "production",
66540
+ envName: "production",
66543
66541
  branch: "main",
66544
66542
  organization: "storm-software",
66545
66543
  configFile: null,
@@ -67039,7 +67037,7 @@ var init_get_env = __esm({
67039
67037
  cacheDirectory: correctPaths(process.env[`${prefix}CACHE_DIRECTORY`]),
67040
67038
  runtimeVersion: process.env[`${prefix}RUNTIME_VERSION`],
67041
67039
  outputDirectory: correctPaths(process.env[`${prefix}OUTPUT_DIRECTORY`]),
67042
- env: process.env[`${prefix}ENV`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
67040
+ envName: process.env[`${prefix}ENV_NAME`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
67043
67041
  // ci:
67044
67042
  // process.env[`${prefix}CI`] !== undefined
67045
67043
  // ? Boolean(
@@ -67268,10 +67266,10 @@ var init_set_env = __esm({
67268
67266
  config.outputDirectory
67269
67267
  );
67270
67268
  }
67271
- if (config.env) {
67272
- process.env[`${prefix}ENV`] = config.env;
67273
- process.env.NODE_ENV = config.env;
67274
- process.env.ENVIRONMENT = config.env;
67269
+ if (config.envName) {
67270
+ process.env[`${prefix}ENV_NAME`] = config.envName;
67271
+ process.env.NODE_ENV = config.envName;
67272
+ process.env.ENVIRONMENT = config.envName;
67275
67273
  }
67276
67274
  if (config.colors?.base?.light || config.colors?.base?.dark) {
67277
67275
  for (const key of Object.keys(config.colors)) {
@@ -221170,6 +221168,12 @@ var setDefaultProjectTags = (project) => {
221170
221168
  project.targets && Object.keys(project.targets).includes("clean-package") ? ProjectTagConstants.DistStyle.CLEAN : ProjectTagConstants.DistStyle.NORMAL,
221171
221169
  { overwrite: true }
221172
221170
  );
221171
+ addProjectTag(
221172
+ project,
221173
+ ProjectTagConstants.Platform.TAG_ID,
221174
+ project.targets?.build?.options.platform === "node" ? ProjectTagConstants.Platform.NODE : project.targets?.build?.options.platform === "worker" ? ProjectTagConstants.Platform.WORKER : project.targets?.build?.options.platform === "browser" ? ProjectTagConstants.Platform.BROWSER : ProjectTagConstants.Platform.NEUTRAL,
221175
+ { overwrite: false }
221176
+ );
221173
221177
  };
221174
221178
 
221175
221179
  // packages/workspace-tools/src/utils/versions.ts
@@ -221193,7 +221197,7 @@ var nodeVersion = "20.11.0";
221193
221197
  var pnpmVersion = "8.10.2";
221194
221198
 
221195
221199
  // packages/workspace-tools/src/base/typescript-library-generator.ts
221196
- async function typeScriptLibraryGeneratorFn(tree, schema) {
221200
+ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
221197
221201
  const options = await normalizeOptions(tree, { ...schema });
221198
221202
  const tasks = [];
221199
221203
  tasks.push(
@@ -221264,15 +221268,15 @@ async function typeScriptLibraryGeneratorFn(tree, schema) {
221264
221268
  projectConfig,
221265
221269
  ProjectTagConstants.Platform.TAG_ID,
221266
221270
  projectConfig.targets.build.options.platform === "node" ? ProjectTagConstants.Platform.NODE : projectConfig.targets.build.options.platform === "worker" ? ProjectTagConstants.Platform.WORKER : projectConfig.targets.build.options.platform === "browser" ? ProjectTagConstants.Platform.BROWSER : ProjectTagConstants.Platform.NEUTRAL,
221267
- { overwrite: true }
221271
+ { overwrite: false }
221268
221272
  );
221269
221273
  createProjectTsConfigJson(tree, options);
221270
221274
  (0, import_devkit.addProjectConfiguration)(tree, options.name, projectConfig);
221271
221275
  let repository = {
221272
221276
  type: "github",
221273
- url: "https://github.com/storm-software/storm-stack.git"
221277
+ url: config?.repository || `https://github.com/${config?.organization || "storm-software"}/${config?.namespace || config?.name || "repository"}.git`
221274
221278
  };
221275
- let description = schema.description ?? "A package developed by Storm Software used to create modern, scalable web applications.";
221279
+ let description = schema.description || "A package developed by Storm Software used to create modern, scalable web applications.";
221276
221280
  if (tree.exists("package.json")) {
221277
221281
  const packageJson = (0, import_devkit.readJson)(tree, "package.json");
221278
221282
  if (packageJson?.repository) {
@@ -235636,7 +235640,7 @@ async function initGenerator(tree, schema) {
235636
235640
 
235637
235641
  // packages/workspace-tools/src/generators/node-library/generator.ts
235638
235642
  var import_devkit11 = require("@nx/devkit");
235639
- async function nodeLibraryGeneratorFn(tree, schema) {
235643
+ async function nodeLibraryGeneratorFn(tree, schema, config) {
235640
235644
  const filesDir = (0, import_devkit11.joinPathFragments)(__dirname, "./files");
235641
235645
  const tsLibraryGeneratorOptions = {
235642
235646
  ...schema,
@@ -235666,7 +235670,7 @@ async function nodeLibraryGeneratorFn(tree, schema) {
235666
235670
  buildable: options.bundler && options.bundler !== "none",
235667
235671
  hasUnitTestRunner: options.unitTestRunner !== "none"
235668
235672
  });
235669
- await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions);
235673
+ await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions, config);
235670
235674
  await (0, import_devkit11.formatFiles)(tree);
235671
235675
  return null;
235672
235676
  }