@storm-software/workspace-tools 1.66.30 → 1.67.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 (41) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +42 -1
  3. package/executors.json +1 -1
  4. package/index.js +225 -96
  5. package/meta.json +1 -1
  6. package/package.json +3 -3
  7. package/src/base/index.js +16 -3
  8. package/src/executors/rolldown/executor.js +81 -19
  9. package/src/executors/rolldown/schema.json +4 -17
  10. package/src/executors/tsup/executor.js +60 -12
  11. package/src/executors/tsup/schema.json +5 -21
  12. package/src/executors/tsup-browser/executor.js +60 -12
  13. package/src/executors/tsup-neutral/executor.js +60 -12
  14. package/src/executors/tsup-node/executor.js +60 -12
  15. package/src/executors/typia/executor.js +16 -3
  16. package/src/generators/browser-library/generator.js +16 -3
  17. package/src/generators/config-schema/generator.js +116 -71
  18. package/src/generators/neutral-library/generator.js +16 -3
  19. package/src/generators/node-library/generator.js +16 -3
  20. package/src/generators/preset/files/.env.template +2 -7
  21. package/src/generators/preset/files/.eslintignore +17 -0
  22. package/src/generators/preset/files/.eslintrc.base.json +42 -0
  23. package/src/generators/preset/files/.github/CODEOWNERS +1 -1
  24. package/src/generators/preset/files/.github/dependabot.yml +24 -0
  25. package/src/generators/preset/files/.github/labels.yml +3 -0
  26. package/src/generators/preset/files/.github/renovate.json.template +14 -2
  27. package/src/generators/preset/files/.github/stale.yml +22 -17
  28. package/src/generators/preset/files/.github/workflows/build-release.yml.template +11 -80
  29. package/src/generators/preset/files/.github/workflows/codeql.yml +1 -1
  30. package/src/generators/preset/files/.github/workflows/dependabot-approve.yml +24 -0
  31. package/src/generators/preset/files/.github/workflows/git-guardian.yml +1 -1
  32. package/src/generators/preset/files/.github/workflows/greetings.yml +2 -3
  33. package/src/generators/preset/files/.vscode/settings.json +127 -42
  34. package/src/generators/preset/files/.vscode/tasks.json +1 -16
  35. package/src/generators/preset/files/storm.config.js.template +29 -0
  36. package/src/generators/preset/files/tsconfig.base.json.template +1 -1
  37. package/src/generators/preset/generator.js +16 -3
  38. package/src/generators/release-version/generator.js +16 -3
  39. package/src/utils/index.js +16 -3
  40. package/src/generators/preset/files/.github/actions/setup-workspace/action.yaml +0 -41
  41. /package/src/generators/preset/files/{.github/.whitesource → .whitesource} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/workspace-tools",
3
- "version": "1.66.30",
3
+ "version": "1.67.0",
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": [
@@ -63,7 +63,7 @@
63
63
  "npm-run-path": "5.2.0",
64
64
  "pkg-types": "^1.0.3",
65
65
  "prettier": "3.2.5",
66
- "prettier-plugin-packagejson": "2.4.9",
66
+ "prettier-plugin-packagejson": "2.4.14",
67
67
  "rollup": "4.10.0",
68
68
  "rollup-plugin-dts": "6.1.0",
69
69
  "semver": "7.5.4",
@@ -71,7 +71,7 @@
71
71
  "tsup": "8.0.0",
72
72
  "typia": "5.4.1",
73
73
  "zod": "3.22.4",
74
- "zod-to-json-schema": "3.22.3"
74
+ "zod-to-json-schema": "3.22.5"
75
75
  },
76
76
  "publishConfig": {
77
77
  "access": "public"
package/src/base/index.js CHANGED
@@ -215278,7 +215278,9 @@ var init_schema = __esm({
215278
215278
  fatal: z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#7d1a1a").describe("The fatal color of the workspace")
215279
215279
  }).describe("Colors used for various workspace elements");
215280
215280
  StormConfigSchema = z.object({
215281
- extends: z.string().trim().optional().describe("The path to a base JSON file to use as a configuration preset file"),
215281
+ extends: z.string().trim().optional().describe(
215282
+ "The path to a base JSON file to use as a configuration preset file"
215283
+ ),
215282
215284
  name: z.string().trim().toLowerCase().optional().describe("The name of the package"),
215283
215285
  namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
215284
215286
  organization: z.string().trim().default("storm-software").describe("The organization of the workspace"),
@@ -215292,7 +215294,9 @@ var init_schema = __esm({
215292
215294
  "The worker of the package (this is the bot that will be used to perform various tasks)"
215293
215295
  ),
215294
215296
  env: z.enum(["development", "staging", "production"]).default("production").describe("The current runtime environment of the package"),
215295
- ci: z.boolean().default(true).describe("An indicator specifying if the current environment is a CI environment"),
215297
+ ci: z.boolean().default(true).describe(
215298
+ "An indicator specifying if the current environment is a CI environment"
215299
+ ),
215296
215300
  workspaceRoot: z.string().trim().optional().describe("The root directory of the workspace"),
215297
215301
  packageDirectory: z.string().trim().optional().describe("The root directory of the package"),
215298
215302
  externalPackagePatterns: z.array(z.string()).default([]).describe(
@@ -215308,7 +215312,16 @@ var init_schema = __esm({
215308
215312
  packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe("The package manager used by the repository"),
215309
215313
  timezone: z.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
215310
215314
  locale: z.string().trim().default("en-US").describe("The default locale of the workspace"),
215311
- logLevel: z.enum(["silent", "fatal", "error", "warn", "info", "debug", "trace", "all"]).default("debug").describe(
215315
+ logLevel: z.enum([
215316
+ "silent",
215317
+ "fatal",
215318
+ "error",
215319
+ "warn",
215320
+ "info",
215321
+ "debug",
215322
+ "trace",
215323
+ "all"
215324
+ ]).default("debug").describe(
215312
215325
  "The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."
215313
215326
  ),
215314
215327
  configFile: z.string().trim().nullable().default(null).describe(
@@ -215278,7 +215278,9 @@ var init_schema = __esm({
215278
215278
  fatal: z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#7d1a1a").describe("The fatal color of the workspace")
215279
215279
  }).describe("Colors used for various workspace elements");
215280
215280
  StormConfigSchema = z.object({
215281
- extends: z.string().trim().optional().describe("The path to a base JSON file to use as a configuration preset file"),
215281
+ extends: z.string().trim().optional().describe(
215282
+ "The path to a base JSON file to use as a configuration preset file"
215283
+ ),
215282
215284
  name: z.string().trim().toLowerCase().optional().describe("The name of the package"),
215283
215285
  namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
215284
215286
  organization: z.string().trim().default("storm-software").describe("The organization of the workspace"),
@@ -215292,7 +215294,9 @@ var init_schema = __esm({
215292
215294
  "The worker of the package (this is the bot that will be used to perform various tasks)"
215293
215295
  ),
215294
215296
  env: z.enum(["development", "staging", "production"]).default("production").describe("The current runtime environment of the package"),
215295
- ci: z.boolean().default(true).describe("An indicator specifying if the current environment is a CI environment"),
215297
+ ci: z.boolean().default(true).describe(
215298
+ "An indicator specifying if the current environment is a CI environment"
215299
+ ),
215296
215300
  workspaceRoot: z.string().trim().optional().describe("The root directory of the workspace"),
215297
215301
  packageDirectory: z.string().trim().optional().describe("The root directory of the package"),
215298
215302
  externalPackagePatterns: z.array(z.string()).default([]).describe(
@@ -215308,7 +215312,16 @@ var init_schema = __esm({
215308
215312
  packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe("The package manager used by the repository"),
215309
215313
  timezone: z.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
215310
215314
  locale: z.string().trim().default("en-US").describe("The default locale of the workspace"),
215311
- logLevel: z.enum(["silent", "fatal", "error", "warn", "info", "debug", "trace", "all"]).default("debug").describe(
215315
+ logLevel: z.enum([
215316
+ "silent",
215317
+ "fatal",
215318
+ "error",
215319
+ "warn",
215320
+ "info",
215321
+ "debug",
215322
+ "trace",
215323
+ "all"
215324
+ ]).default("debug").describe(
215312
215325
  "The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."
215313
215326
  ),
215314
215327
  configFile: z.string().trim().nullable().default(null).describe(
@@ -418903,7 +418916,9 @@ var DefaultConfig = {
418903
418916
  }
418904
418917
  };
418905
418918
  async function getRolldownBuildOptions(config, options, dependencies, packageJson, npmDeps) {
418906
- const buildOptions = defineConfig((0, import_deepmerge2.default)(DefaultConfig, options));
418919
+ const buildOptions = defineConfig(
418920
+ (0, import_deepmerge2.default)(DefaultConfig, options)
418921
+ );
418907
418922
  buildOptions.output ??= DefaultConfig.output;
418908
418923
  buildOptions.output.dir = options?.outputPath;
418909
418924
  buildOptions.resolve = options.resolve;
@@ -418915,9 +418930,16 @@ async function getRolldownBuildOptions(config, options, dependencies, packageJso
418915
418930
  buildOptions.output.banner = options.banner;
418916
418931
  buildOptions.output.footer = options.footer;
418917
418932
  buildOptions.cwd = config.workspaceRoot;
418918
- const tsConfigPath = (0, import_devkit6.joinPathFragments)(config.workspaceRoot ?? "./", options.tsConfig);
418933
+ const tsConfigPath = (0, import_devkit6.joinPathFragments)(
418934
+ config.workspaceRoot ?? "./",
418935
+ options.tsConfig
418936
+ );
418919
418937
  const configFile = import_typescript.default.readConfigFile(tsConfigPath, import_typescript.default.sys.readFile);
418920
- const tsconfig = import_typescript.default.parseJsonConfigFileContent(configFile.config, import_typescript.default.sys, (0, import_node_path6.dirname)(tsConfigPath));
418938
+ const tsconfig = import_typescript.default.parseJsonConfigFileContent(
418939
+ configFile.config,
418940
+ import_typescript.default.sys,
418941
+ (0, import_node_path6.dirname)(tsConfigPath)
418942
+ );
418921
418943
  let externalPackages = [...Object.keys(packageJson.peerDependencies || {})];
418922
418944
  externalPackages.push(
418923
418945
  ...Object.keys(packageJson.dependencies || {}).filter(
@@ -418941,7 +418963,11 @@ async function getRolldownBuildOptions(config, options, dependencies, packageJso
418941
418963
  check: !options.skipTypeCheck,
418942
418964
  tsconfig: options.tsConfig,
418943
418965
  tsconfigOverride: {
418944
- compilerOptions: createTsCompilerOptions(tsconfig, dependencies, options)
418966
+ compilerOptions: createTsCompilerOptions(
418967
+ tsconfig,
418968
+ dependencies,
418969
+ options
418970
+ )
418945
418971
  }
418946
418972
  }),
418947
418973
  (0, import_type_definitions.typeDefinitions)({
@@ -418949,7 +418975,10 @@ async function getRolldownBuildOptions(config, options, dependencies, packageJso
418949
418975
  projectRoot: options.projectRoot
418950
418976
  }),
418951
418977
  (0, import_rollup_plugin_peer_deps_external.default)({
418952
- packageJsonPath: (0, import_devkit6.joinPathFragments)(options.projectRoot, "package.json")
418978
+ packageJsonPath: (0, import_devkit6.joinPathFragments)(
418979
+ options.projectRoot,
418980
+ "package.json"
418981
+ )
418953
418982
  }),
418954
418983
  postcss({
418955
418984
  inject: true,
@@ -418972,7 +419001,9 @@ async function getRolldownBuildOptions(config, options, dependencies, packageJso
418972
419001
  let nextConfig = {
418973
419002
  ...buildOpts,
418974
419003
  plugins: buildOpts.plugins.map((plugin) => (0, import_config_utils.loadConfigFile)(plugin)),
418975
- external: (id) => externalPackages.some((name) => id === name || id.startsWith(`${name}/`)),
419004
+ external: (id) => externalPackages.some(
419005
+ (name) => id === name || id.startsWith(`${name}/`)
419006
+ ),
418976
419007
  cwd: config.workspaceRoot,
418977
419008
  platform: options.platform
418978
419009
  };
@@ -419015,7 +419046,9 @@ async function loadConfig(configPath) {
419015
419046
  if (!isSupportedFormat(configPath)) {
419016
419047
  throw new Error("Unsupported config file format");
419017
419048
  }
419018
- return import((0, import_node_url.pathToFileURL)(configPath).toString()).then((config) => config.default);
419049
+ return import((0, import_node_url.pathToFileURL)(configPath).toString()).then(
419050
+ (config) => config.default
419051
+ );
419019
419052
  }
419020
419053
  function isSupportedFormat(configPath) {
419021
419054
  const ext2 = (0, import_node_path6.extname)(configPath);
@@ -425246,7 +425279,9 @@ var import_project_graph = require("nx/src/project-graph/project-graph");
425246
425279
  // packages/build-tools/src/utils/task-graph.ts
425247
425280
  var import_create_task_graph = require("nx/src/tasks-runner/create-task-graph");
425248
425281
  function getAllWorkspaceTaskGraphs(nxJson, projectGraph) {
425249
- const defaultDependencyConfigs = (0, import_create_task_graph.mapTargetDefaultsToDependencies)(nxJson.targetDefaults);
425282
+ const defaultDependencyConfigs = (0, import_create_task_graph.mapTargetDefaultsToDependencies)(
425283
+ nxJson.targetDefaults
425284
+ );
425250
425285
  const taskGraphs = {};
425251
425286
  const taskGraphErrors = {};
425252
425287
  for (const projectName in projectGraph.nodes) {
@@ -425271,7 +425306,9 @@ function getAllWorkspaceTaskGraphs(nxJson, projectGraph) {
425271
425306
  };
425272
425307
  taskGraphErrors[taskId] = err.message;
425273
425308
  }
425274
- const configurations = Object.keys(project?.data?.targets?.[target]?.configurations || {});
425309
+ const configurations = Object.keys(
425310
+ project?.data?.targets?.[target]?.configurations || {}
425311
+ );
425275
425312
  if (configurations.length > 0) {
425276
425313
  for (const configuration of configurations) {
425277
425314
  const taskId2 = createTaskId(projectName, target, configuration);
@@ -425390,7 +425427,10 @@ async function rolldownWithOptions(config, options) {
425390
425427
  writeInfo(config, `\u{1F9F9} Cleaning output path: ${enhancedOptions.outputPath}`);
425391
425428
  (0, import_fs_extra.removeSync)(enhancedOptions.outputPath);
425392
425429
  }
425393
- writeDebug(config, `\u{1F4E6} Copying asset files to output directory: ${enhancedOptions.outputPath}`);
425430
+ writeDebug(
425431
+ config,
425432
+ `\u{1F4E6} Copying asset files to output directory: ${enhancedOptions.outputPath}`
425433
+ );
425394
425434
  const assets = Array.from(options.assets ?? []);
425395
425435
  if (!enhancedOptions.assets?.some((asset) => asset?.glob === "*.md")) {
425396
425436
  assets.push({
@@ -425399,7 +425439,9 @@ async function rolldownWithOptions(config, options) {
425399
425439
  output: "/"
425400
425440
  });
425401
425441
  }
425402
- if (!enhancedOptions.assets?.some((asset) => asset?.glob === "LICENSE")) {
425442
+ if (!enhancedOptions.assets?.some(
425443
+ (asset) => asset?.glob === "LICENSE"
425444
+ )) {
425403
425445
  assets.push({
425404
425446
  input: "",
425405
425447
  glob: "LICENSE",
@@ -425471,10 +425513,26 @@ async function rolldownWithOptions(config, options) {
425471
425513
  )}`
425472
425514
  );
425473
425515
  const files = globSync([
425474
- (0, import_devkit10.joinPathFragments)(workspaceRoot, enhancedOptions.outputPath, "src/**/*.ts"),
425475
- (0, import_devkit10.joinPathFragments)(workspaceRoot, enhancedOptions.outputPath, "src/**/*.tsx"),
425476
- (0, import_devkit10.joinPathFragments)(workspaceRoot, enhancedOptions.outputPath, "src/**/*.js"),
425477
- (0, import_devkit10.joinPathFragments)(workspaceRoot, enhancedOptions.outputPath, "src/**/*.jsx")
425516
+ (0, import_devkit10.joinPathFragments)(
425517
+ workspaceRoot,
425518
+ enhancedOptions.outputPath,
425519
+ "src/**/*.ts"
425520
+ ),
425521
+ (0, import_devkit10.joinPathFragments)(
425522
+ workspaceRoot,
425523
+ enhancedOptions.outputPath,
425524
+ "src/**/*.tsx"
425525
+ ),
425526
+ (0, import_devkit10.joinPathFragments)(
425527
+ workspaceRoot,
425528
+ enhancedOptions.outputPath,
425529
+ "src/**/*.js"
425530
+ ),
425531
+ (0, import_devkit10.joinPathFragments)(
425532
+ workspaceRoot,
425533
+ enhancedOptions.outputPath,
425534
+ "src/**/*.jsx"
425535
+ )
425478
425536
  ]);
425479
425537
  await Promise.allSettled(
425480
425538
  files.map(
@@ -425500,7 +425558,11 @@ ${enhancedOptions.footer && typeof enhancedOptions.footer === "string" ? enhance
425500
425558
  true
425501
425559
  );
425502
425560
  const packageJson = (0, import_devkit10.readJsonFile)(
425503
- (0, import_devkit10.joinPathFragments)(workspaceRoot, enhancedOptions.projectRoot, "package.json")
425561
+ (0, import_devkit10.joinPathFragments)(
425562
+ workspaceRoot,
425563
+ enhancedOptions.projectRoot,
425564
+ "package.json"
425565
+ )
425504
425566
  );
425505
425567
  const npmDeps = (projectGraph.dependencies[projectName] ?? []).filter((d3) => d3.target.startsWith("npm:")).map((d3) => d3.target.slice(4));
425506
425568
  writeDebug(config, "\u{1F50D} Detecting entry points for the build process");
@@ -72,12 +72,7 @@
72
72
  "platform": {
73
73
  "type": "string",
74
74
  "description": "Platform target for outputs.",
75
- "enum": [
76
- "browser",
77
- "neutral",
78
- "node",
79
- "worker"
80
- ],
75
+ "enum": ["browser", "neutral", "node", "worker"],
81
76
  "default": "neutral"
82
77
  },
83
78
  "banner": {
@@ -104,11 +99,7 @@
104
99
  }
105
100
  }
106
101
  },
107
- "required": [
108
- "tsConfig",
109
- "platform",
110
- "banner"
111
- ],
102
+ "required": ["tsConfig", "platform", "banner"],
112
103
  "definitions": {
113
104
  "assetPattern": {
114
105
  "oneOf": [
@@ -136,11 +127,7 @@
136
127
  }
137
128
  },
138
129
  "additionalProperties": false,
139
- "required": [
140
- "glob",
141
- "input",
142
- "output"
143
- ]
130
+ "required": ["glob", "input", "output"]
144
131
  },
145
132
  {
146
133
  "type": "string"
@@ -148,4 +135,4 @@
148
135
  ]
149
136
  }
150
137
  }
151
- }
138
+ }
@@ -215278,7 +215278,9 @@ var init_schema = __esm({
215278
215278
  fatal: z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#7d1a1a").describe("The fatal color of the workspace")
215279
215279
  }).describe("Colors used for various workspace elements");
215280
215280
  StormConfigSchema = z.object({
215281
- extends: z.string().trim().optional().describe("The path to a base JSON file to use as a configuration preset file"),
215281
+ extends: z.string().trim().optional().describe(
215282
+ "The path to a base JSON file to use as a configuration preset file"
215283
+ ),
215282
215284
  name: z.string().trim().toLowerCase().optional().describe("The name of the package"),
215283
215285
  namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
215284
215286
  organization: z.string().trim().default("storm-software").describe("The organization of the workspace"),
@@ -215292,7 +215294,9 @@ var init_schema = __esm({
215292
215294
  "The worker of the package (this is the bot that will be used to perform various tasks)"
215293
215295
  ),
215294
215296
  env: z.enum(["development", "staging", "production"]).default("production").describe("The current runtime environment of the package"),
215295
- ci: z.boolean().default(true).describe("An indicator specifying if the current environment is a CI environment"),
215297
+ ci: z.boolean().default(true).describe(
215298
+ "An indicator specifying if the current environment is a CI environment"
215299
+ ),
215296
215300
  workspaceRoot: z.string().trim().optional().describe("The root directory of the workspace"),
215297
215301
  packageDirectory: z.string().trim().optional().describe("The root directory of the package"),
215298
215302
  externalPackagePatterns: z.array(z.string()).default([]).describe(
@@ -215308,7 +215312,16 @@ var init_schema = __esm({
215308
215312
  packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe("The package manager used by the repository"),
215309
215313
  timezone: z.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
215310
215314
  locale: z.string().trim().default("en-US").describe("The default locale of the workspace"),
215311
- logLevel: z.enum(["silent", "fatal", "error", "warn", "info", "debug", "trace", "all"]).default("debug").describe(
215315
+ logLevel: z.enum([
215316
+ "silent",
215317
+ "fatal",
215318
+ "error",
215319
+ "warn",
215320
+ "info",
215321
+ "debug",
215322
+ "trace",
215323
+ "all"
215324
+ ]).default("debug").describe(
215312
215325
  "The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."
215313
215326
  ),
215314
215327
  configFile: z.string().trim().nullable().default(null).describe(
@@ -410443,7 +410456,12 @@ async function build3(config, options = {}) {
410443
410456
  await buildWithOptions(
410444
410457
  config,
410445
410458
  applyDefaultOptions(
410446
- { projectRoot, projectName, sourceRoot: projectConfiguration.sourceRoot, ...options },
410459
+ {
410460
+ projectRoot,
410461
+ projectName,
410462
+ sourceRoot: projectConfiguration.sourceRoot,
410463
+ ...options
410464
+ },
410447
410465
  config
410448
410466
  )
410449
410467
  );
@@ -410462,7 +410480,10 @@ async function buildWithOptions(config, options) {
410462
410480
  writeInfo(config, `\u{1F9F9} Cleaning output path: ${enhancedOptions.outputPath}`);
410463
410481
  (0, import_fs_extra.removeSync)(enhancedOptions.outputPath);
410464
410482
  }
410465
- writeDebug(config, `\u{1F4E6} Copying asset files to output directory: ${enhancedOptions.outputPath}`);
410483
+ writeDebug(
410484
+ config,
410485
+ `\u{1F4E6} Copying asset files to output directory: ${enhancedOptions.outputPath}`
410486
+ );
410466
410487
  const assets = Array.from(options.assets ?? []);
410467
410488
  if (!enhancedOptions.assets?.some((asset) => asset?.glob === "*.md")) {
410468
410489
  assets.push({
@@ -410471,7 +410492,9 @@ async function buildWithOptions(config, options) {
410471
410492
  output: "/"
410472
410493
  });
410473
410494
  }
410474
- if (!enhancedOptions.assets?.some((asset) => asset?.glob === "LICENSE")) {
410495
+ if (!enhancedOptions.assets?.some(
410496
+ (asset) => asset?.glob === "LICENSE"
410497
+ )) {
410475
410498
  assets.push({
410476
410499
  input: "",
410477
410500
  glob: "LICENSE",
@@ -410542,10 +410565,26 @@ async function buildWithOptions(config, options) {
410542
410565
  )}`
410543
410566
  );
410544
410567
  const files = globSync([
410545
- (0, import_devkit9.joinPathFragments)(workspaceRoot, enhancedOptions.outputPath, "src/**/*.ts"),
410546
- (0, import_devkit9.joinPathFragments)(workspaceRoot, enhancedOptions.outputPath, "src/**/*.tsx"),
410547
- (0, import_devkit9.joinPathFragments)(workspaceRoot, enhancedOptions.outputPath, "src/**/*.js"),
410548
- (0, import_devkit9.joinPathFragments)(workspaceRoot, enhancedOptions.outputPath, "src/**/*.jsx")
410568
+ (0, import_devkit9.joinPathFragments)(
410569
+ workspaceRoot,
410570
+ enhancedOptions.outputPath,
410571
+ "src/**/*.ts"
410572
+ ),
410573
+ (0, import_devkit9.joinPathFragments)(
410574
+ workspaceRoot,
410575
+ enhancedOptions.outputPath,
410576
+ "src/**/*.tsx"
410577
+ ),
410578
+ (0, import_devkit9.joinPathFragments)(
410579
+ workspaceRoot,
410580
+ enhancedOptions.outputPath,
410581
+ "src/**/*.js"
410582
+ ),
410583
+ (0, import_devkit9.joinPathFragments)(
410584
+ workspaceRoot,
410585
+ enhancedOptions.outputPath,
410586
+ "src/**/*.jsx"
410587
+ )
410549
410588
  ]);
410550
410589
  await Promise.allSettled(
410551
410590
  files.map(
@@ -410570,7 +410609,11 @@ ${(0, import_node_fs4.readFileSync)(file, "utf-8")}`,
410570
410609
  if (enhancedOptions.generatePackageJson !== false) {
410571
410610
  writeDebug(config, "\u270D\uFE0F Writing package.json file");
410572
410611
  await (0, import_fileutils2.writeJsonFile)(
410573
- (0, import_devkit9.joinPathFragments)(workspaceRoot, enhancedOptions.outputPath, "package.json"),
410612
+ (0, import_devkit9.joinPathFragments)(
410613
+ workspaceRoot,
410614
+ enhancedOptions.outputPath,
410615
+ "package.json"
410616
+ ),
410574
410617
  packageJson
410575
410618
  );
410576
410619
  enhancedOptions.external ??= [];
@@ -410581,7 +410624,12 @@ ${(0, import_node_fs4.readFileSync)(file, "utf-8")}`,
410581
410624
  }
410582
410625
  }
410583
410626
  writeDebug(config, "\u{1F50D} Detecting entry points for the build process");
410584
- const entryPoints = getEntryPoints(config, projectRoot, sourceRoot, enhancedOptions);
410627
+ const entryPoints = getEntryPoints(
410628
+ config,
410629
+ projectRoot,
410630
+ sourceRoot,
410631
+ enhancedOptions
410632
+ );
410585
410633
  writeTrace(
410586
410634
  config,
410587
410635
  `Found entry points:
@@ -99,10 +99,7 @@
99
99
  "format": {
100
100
  "type": "array",
101
101
  "description": "The output format for the generated JavaScript files. There are currently three possible values that can be configured: iife, cjs, and esm.",
102
- "default": [
103
- "cjs",
104
- "esm"
105
- ],
102
+ "default": ["cjs", "esm"],
106
103
  "items": {
107
104
  "type": "string"
108
105
  }
@@ -115,12 +112,7 @@
115
112
  "platform": {
116
113
  "type": "string",
117
114
  "description": "Platform target for outputs.",
118
- "enum": [
119
- "browser",
120
- "neutral",
121
- "node",
122
- "worker"
123
- ],
115
+ "enum": ["browser", "neutral", "node", "worker"],
124
116
  "default": "neutral"
125
117
  },
126
118
  "banner": {
@@ -192,11 +184,7 @@
192
184
  }
193
185
  }
194
186
  },
195
- "required": [
196
- "tsConfig",
197
- "platform",
198
- "banner"
199
- ],
187
+ "required": ["tsConfig", "platform", "banner"],
200
188
  "definitions": {
201
189
  "assetPattern": {
202
190
  "oneOf": [
@@ -224,11 +212,7 @@
224
212
  }
225
213
  },
226
214
  "additionalProperties": false,
227
- "required": [
228
- "glob",
229
- "input",
230
- "output"
231
- ]
215
+ "required": ["glob", "input", "output"]
232
216
  },
233
217
  {
234
218
  "type": "string"
@@ -236,4 +220,4 @@
236
220
  ]
237
221
  }
238
222
  }
239
- }
223
+ }
@@ -215278,7 +215278,9 @@ var init_schema = __esm({
215278
215278
  fatal: z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#7d1a1a").describe("The fatal color of the workspace")
215279
215279
  }).describe("Colors used for various workspace elements");
215280
215280
  StormConfigSchema = z.object({
215281
- extends: z.string().trim().optional().describe("The path to a base JSON file to use as a configuration preset file"),
215281
+ extends: z.string().trim().optional().describe(
215282
+ "The path to a base JSON file to use as a configuration preset file"
215283
+ ),
215282
215284
  name: z.string().trim().toLowerCase().optional().describe("The name of the package"),
215283
215285
  namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
215284
215286
  organization: z.string().trim().default("storm-software").describe("The organization of the workspace"),
@@ -215292,7 +215294,9 @@ var init_schema = __esm({
215292
215294
  "The worker of the package (this is the bot that will be used to perform various tasks)"
215293
215295
  ),
215294
215296
  env: z.enum(["development", "staging", "production"]).default("production").describe("The current runtime environment of the package"),
215295
- ci: z.boolean().default(true).describe("An indicator specifying if the current environment is a CI environment"),
215297
+ ci: z.boolean().default(true).describe(
215298
+ "An indicator specifying if the current environment is a CI environment"
215299
+ ),
215296
215300
  workspaceRoot: z.string().trim().optional().describe("The root directory of the workspace"),
215297
215301
  packageDirectory: z.string().trim().optional().describe("The root directory of the package"),
215298
215302
  externalPackagePatterns: z.array(z.string()).default([]).describe(
@@ -215308,7 +215312,16 @@ var init_schema = __esm({
215308
215312
  packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe("The package manager used by the repository"),
215309
215313
  timezone: z.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
215310
215314
  locale: z.string().trim().default("en-US").describe("The default locale of the workspace"),
215311
- logLevel: z.enum(["silent", "fatal", "error", "warn", "info", "debug", "trace", "all"]).default("debug").describe(
215315
+ logLevel: z.enum([
215316
+ "silent",
215317
+ "fatal",
215318
+ "error",
215319
+ "warn",
215320
+ "info",
215321
+ "debug",
215322
+ "trace",
215323
+ "all"
215324
+ ]).default("debug").describe(
215312
215325
  "The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."
215313
215326
  ),
215314
215327
  configFile: z.string().trim().nullable().default(null).describe(
@@ -410569,7 +410582,12 @@ async function build3(config, options = {}) {
410569
410582
  await buildWithOptions(
410570
410583
  config,
410571
410584
  applyDefaultOptions(
410572
- { projectRoot, projectName, sourceRoot: projectConfiguration.sourceRoot, ...options },
410585
+ {
410586
+ projectRoot,
410587
+ projectName,
410588
+ sourceRoot: projectConfiguration.sourceRoot,
410589
+ ...options
410590
+ },
410573
410591
  config
410574
410592
  )
410575
410593
  );
@@ -410588,7 +410606,10 @@ async function buildWithOptions(config, options) {
410588
410606
  writeInfo(config, `\u{1F9F9} Cleaning output path: ${enhancedOptions.outputPath}`);
410589
410607
  (0, import_fs_extra.removeSync)(enhancedOptions.outputPath);
410590
410608
  }
410591
- writeDebug(config, `\u{1F4E6} Copying asset files to output directory: ${enhancedOptions.outputPath}`);
410609
+ writeDebug(
410610
+ config,
410611
+ `\u{1F4E6} Copying asset files to output directory: ${enhancedOptions.outputPath}`
410612
+ );
410592
410613
  const assets = Array.from(options.assets ?? []);
410593
410614
  if (!enhancedOptions.assets?.some((asset) => asset?.glob === "*.md")) {
410594
410615
  assets.push({
@@ -410597,7 +410618,9 @@ async function buildWithOptions(config, options) {
410597
410618
  output: "/"
410598
410619
  });
410599
410620
  }
410600
- if (!enhancedOptions.assets?.some((asset) => asset?.glob === "LICENSE")) {
410621
+ if (!enhancedOptions.assets?.some(
410622
+ (asset) => asset?.glob === "LICENSE"
410623
+ )) {
410601
410624
  assets.push({
410602
410625
  input: "",
410603
410626
  glob: "LICENSE",
@@ -410668,10 +410691,26 @@ async function buildWithOptions(config, options) {
410668
410691
  )}`
410669
410692
  );
410670
410693
  const files = globSync([
410671
- (0, import_devkit9.joinPathFragments)(workspaceRoot, enhancedOptions.outputPath, "src/**/*.ts"),
410672
- (0, import_devkit9.joinPathFragments)(workspaceRoot, enhancedOptions.outputPath, "src/**/*.tsx"),
410673
- (0, import_devkit9.joinPathFragments)(workspaceRoot, enhancedOptions.outputPath, "src/**/*.js"),
410674
- (0, import_devkit9.joinPathFragments)(workspaceRoot, enhancedOptions.outputPath, "src/**/*.jsx")
410694
+ (0, import_devkit9.joinPathFragments)(
410695
+ workspaceRoot,
410696
+ enhancedOptions.outputPath,
410697
+ "src/**/*.ts"
410698
+ ),
410699
+ (0, import_devkit9.joinPathFragments)(
410700
+ workspaceRoot,
410701
+ enhancedOptions.outputPath,
410702
+ "src/**/*.tsx"
410703
+ ),
410704
+ (0, import_devkit9.joinPathFragments)(
410705
+ workspaceRoot,
410706
+ enhancedOptions.outputPath,
410707
+ "src/**/*.js"
410708
+ ),
410709
+ (0, import_devkit9.joinPathFragments)(
410710
+ workspaceRoot,
410711
+ enhancedOptions.outputPath,
410712
+ "src/**/*.jsx"
410713
+ )
410675
410714
  ]);
410676
410715
  await Promise.allSettled(
410677
410716
  files.map(
@@ -410696,7 +410735,11 @@ ${(0, import_node_fs4.readFileSync)(file, "utf-8")}`,
410696
410735
  if (enhancedOptions.generatePackageJson !== false) {
410697
410736
  writeDebug(config, "\u270D\uFE0F Writing package.json file");
410698
410737
  await (0, import_fileutils2.writeJsonFile)(
410699
- (0, import_devkit9.joinPathFragments)(workspaceRoot, enhancedOptions.outputPath, "package.json"),
410738
+ (0, import_devkit9.joinPathFragments)(
410739
+ workspaceRoot,
410740
+ enhancedOptions.outputPath,
410741
+ "package.json"
410742
+ ),
410700
410743
  packageJson
410701
410744
  );
410702
410745
  enhancedOptions.external ??= [];
@@ -410707,7 +410750,12 @@ ${(0, import_node_fs4.readFileSync)(file, "utf-8")}`,
410707
410750
  }
410708
410751
  }
410709
410752
  writeDebug(config, "\u{1F50D} Detecting entry points for the build process");
410710
- const entryPoints = getEntryPoints(config, projectRoot, sourceRoot, enhancedOptions);
410753
+ const entryPoints = getEntryPoints(
410754
+ config,
410755
+ projectRoot,
410756
+ sourceRoot,
410757
+ enhancedOptions
410758
+ );
410711
410759
  writeTrace(
410712
410760
  config,
410713
410761
  `Found entry points: