@storm-software/workspace-tools 1.156.0 → 1.158.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 (129) hide show
  1. package/CHANGELOG.md +178 -128
  2. package/README.md +2 -1
  3. package/config/nx.json +4 -4
  4. package/declarations.d.ts +4 -13
  5. package/index.js +2394 -2290
  6. package/meta.json +1 -1
  7. package/package.json +7 -7
  8. package/src/base/index.js +3558 -3512
  9. package/src/executors/clean-package/executor.js +68061 -68048
  10. package/src/executors/npm-publish/executor.js +1 -1
  11. package/src/executors/rolldown/executor.js +5482 -5465
  12. package/src/executors/size-limit/executor.js +5482 -5465
  13. package/src/executors/tsup/executor.js +5482 -5465
  14. package/src/executors/tsup-browser/executor.js +5482 -5465
  15. package/src/executors/tsup-browser/schema.d.ts +4 -1
  16. package/src/executors/tsup-neutral/executor.js +5482 -5465
  17. package/src/executors/tsup-neutral/schema.d.ts +4 -1
  18. package/src/executors/tsup-node/executor.js +5482 -5465
  19. package/src/executors/tsup-node/schema.d.ts +4 -1
  20. package/src/executors/typia/executor.js +5482 -5465
  21. package/src/executors/unbuild/executor.js +5482 -5465
  22. package/src/generators/browser-library/generator.js +3550 -3507
  23. package/src/generators/config-schema/generator.js +302 -287
  24. package/src/generators/init/init.js +3 -3
  25. package/src/generators/neutral-library/generator.js +3550 -3507
  26. package/src/generators/node-library/generator.js +3550 -3507
  27. package/src/generators/preset/generator.js +5484 -5469
  28. package/{packages/workspace-tools/src → src}/generators/release-version/generator.d.ts +3 -8
  29. package/src/generators/release-version/generator.js +6050 -6076
  30. package/src/generators/release-version/schema.d.ts +2 -1
  31. package/src/generators/release-version/schema.json +4 -15
  32. package/src/plugins/rust/index.js +4 -5
  33. package/src/plugins/typescript/index.js +7 -1
  34. package/src/utils/index.js +4522 -4499
  35. package/{packages/workspace-tools/src → src}/utils/lock-file.d.ts +1 -1
  36. package/src/utils/lock-file.js +9 -5
  37. package/{packages/workspace-tools/src → src}/utils/toml.d.ts +1 -36
  38. package/packages/build-tools/src/build/index.d.ts +0 -3
  39. package/packages/build-tools/src/build/rolldown.d.ts +0 -20
  40. package/packages/build-tools/src/build/ts-build.d.ts +0 -20
  41. package/packages/build-tools/src/build/unbuild.d.ts +0 -20
  42. package/packages/build-tools/src/cli/index.d.ts +0 -2
  43. package/packages/build-tools/src/config/browser-config.d.ts +0 -2
  44. package/packages/build-tools/src/config/default-config.d.ts +0 -2
  45. package/packages/build-tools/src/config/get-config.d.ts +0 -2
  46. package/packages/build-tools/src/config/get-rolldown-config.d.ts +0 -6
  47. package/packages/build-tools/src/config/get-unbuild-config.d.ts +0 -6
  48. package/packages/build-tools/src/config/index.d.ts +0 -7
  49. package/packages/build-tools/src/config/neutral-config.d.ts +0 -2
  50. package/packages/build-tools/src/config/node-config.d.ts +0 -3
  51. package/packages/build-tools/src/index.d.ts +0 -6
  52. package/packages/build-tools/src/plugins/analyze-plugin.d.ts +0 -4
  53. package/packages/build-tools/src/plugins/index.d.ts +0 -4
  54. package/packages/build-tools/src/plugins/swc-plugin.d.ts +0 -2
  55. package/packages/build-tools/src/plugins/ts-resolve.d.ts +0 -6
  56. package/packages/build-tools/src/plugins/type-definitions.d.ts +0 -7
  57. package/packages/build-tools/src/types.d.ts +0 -213
  58. package/packages/build-tools/src/utils/apply-default-options.d.ts +0 -6
  59. package/packages/build-tools/src/utils/generate-package-json.d.ts +0 -7
  60. package/packages/build-tools/src/utils/get-entry-points.d.ts +0 -3
  61. package/packages/build-tools/src/utils/get-file-banner.d.ts +0 -8
  62. package/packages/build-tools/src/utils/get-project-deps.d.ts +0 -5
  63. package/packages/build-tools/src/utils/index.d.ts +0 -7
  64. package/packages/build-tools/src/utils/out-extension.d.ts +0 -8
  65. package/packages/build-tools/src/utils/run-tsup-build.d.ts +0 -3
  66. package/packages/build-tools/src/utils/task-graph.d.ts +0 -6
  67. package/packages/config/src/constants.d.ts +0 -3
  68. package/packages/config/src/define-config.d.ts +0 -174
  69. package/packages/config/src/index.d.ts +0 -12
  70. package/packages/config/src/schema.d.ts +0 -1915
  71. package/packages/config/src/types.d.ts +0 -23
  72. package/packages/config-tools/src/config-file/get-config-file.d.ts +0 -16
  73. package/packages/config-tools/src/config-file/index.d.ts +0 -1
  74. package/packages/config-tools/src/create-storm-config.d.ts +0 -26
  75. package/packages/config-tools/src/env/get-env.d.ts +0 -15
  76. package/packages/config-tools/src/env/index.d.ts +0 -2
  77. package/packages/config-tools/src/env/set-env.d.ts +0 -14
  78. package/packages/config-tools/src/index.d.ts +0 -13
  79. package/packages/config-tools/src/types.d.ts +0 -33
  80. package/packages/config-tools/src/utilities/apply-workspace-tokens.d.ts +0 -4
  81. package/packages/config-tools/src/utilities/chalk.d.ts +0 -23
  82. package/packages/config-tools/src/utilities/correct-paths.d.ts +0 -1
  83. package/packages/config-tools/src/utilities/file-path-utils.d.ts +0 -2
  84. package/packages/config-tools/src/utilities/find-up.d.ts +0 -4
  85. package/packages/config-tools/src/utilities/find-workspace-root.d.ts +0 -14
  86. package/packages/config-tools/src/utilities/get-default-config.d.ts +0 -15
  87. package/packages/config-tools/src/utilities/get-log-level.d.ts +0 -15
  88. package/packages/config-tools/src/utilities/index.d.ts +0 -10
  89. package/packages/config-tools/src/utilities/logger.d.ts +0 -74
  90. package/packages/config-tools/src/utilities/process-handler.d.ts +0 -4
  91. package/packages/config-tools/src/utilities/run.d.ts +0 -18
  92. package/{packages/workspace-tools/index.d.ts → index.d.ts} +0 -0
  93. package/{packages/workspace-tools/src → src}/base/base-executor.d.ts +0 -0
  94. package/{packages/workspace-tools/src → src}/base/base-generator.d.ts +0 -0
  95. package/{packages/workspace-tools/src → src}/base/index.d.ts +0 -0
  96. package/{packages/workspace-tools/src → src}/base/typescript-library-generator.d.ts +0 -0
  97. package/{packages/workspace-tools/src → src}/executors/cargo-publish/executor.d.ts +0 -0
  98. package/{packages/workspace-tools/src → src}/executors/clean-package/constants.d.ts +0 -0
  99. package/{packages/workspace-tools/src → src}/executors/clean-package/executor.d.ts +0 -0
  100. package/{packages/workspace-tools/src → src}/executors/clean-package/types.d.ts +0 -0
  101. package/{packages/workspace-tools/src → src}/executors/clean-package/utils.d.ts +0 -0
  102. package/{packages/workspace-tools/src → src}/executors/npm-publish/executor.d.ts +0 -0
  103. package/{packages/workspace-tools/src → src}/executors/rolldown/executor.d.ts +0 -0
  104. package/{packages/workspace-tools/src → src}/executors/size-limit/executor.d.ts +0 -0
  105. package/{packages/workspace-tools/src → src}/executors/tsup/executor.d.ts +0 -0
  106. package/{packages/workspace-tools/src → src}/executors/tsup-browser/executor.d.ts +0 -0
  107. package/{packages/workspace-tools/src → src}/executors/tsup-neutral/executor.d.ts +0 -0
  108. package/{packages/workspace-tools/src → src}/executors/tsup-node/executor.d.ts +0 -0
  109. package/{packages/workspace-tools/src → src}/executors/typia/executor.d.ts +0 -0
  110. package/{packages/workspace-tools/src → src}/executors/unbuild/executor.d.ts +0 -0
  111. package/{packages/workspace-tools/src → src}/generators/browser-library/generator.d.ts +0 -0
  112. package/{packages/workspace-tools/src → src}/generators/config-schema/generator.d.ts +0 -0
  113. package/{packages/workspace-tools/src → src}/generators/init/init.d.ts +0 -0
  114. package/{packages/workspace-tools/src → src}/generators/neutral-library/generator.d.ts +0 -0
  115. package/{packages/workspace-tools/src → src}/generators/node-library/generator.d.ts +0 -0
  116. package/{packages/workspace-tools/src → src}/generators/preset/generator.d.ts +0 -0
  117. package/{packages/workspace-tools/src → src}/plugins/rust/cargo-toml.d.ts +0 -0
  118. package/{packages/workspace-tools/src → src}/plugins/rust/index.d.ts +0 -0
  119. package/{packages/workspace-tools/src → src}/plugins/typescript/index.d.ts +0 -0
  120. package/{packages/workspace-tools/src → src}/plugins/typescript/project-config.d.ts +0 -0
  121. package/{packages/workspace-tools/src → src}/utils/apply-workspace-tokens.d.ts +0 -0
  122. package/{packages/workspace-tools/src → src}/utils/cargo.d.ts +0 -0
  123. package/{packages/workspace-tools/src → src}/utils/create-cli-options.d.ts +0 -0
  124. package/{packages/workspace-tools/src → src}/utils/get-project-configurations.d.ts +0 -0
  125. package/{packages/workspace-tools/src → src}/utils/index.d.ts +5 -5
  126. /package/{packages/workspace-tools/src → src}/utils/project-tags.d.ts +0 -0
  127. /package/{packages/workspace-tools/src → src}/utils/run-tsup-build.d.ts +0 -0
  128. /package/{packages/workspace-tools/src → src}/utils/typia-transform.d.ts +0 -0
  129. /package/{packages/workspace-tools/src → src}/utils/versions.d.ts +0 -0
@@ -34728,8 +34728,8 @@ function getLineInfo(input, offset2) {
34728
34728
  }
34729
34729
  function getOptions(opts) {
34730
34730
  var options = {};
34731
- for (var opt in defaultOptions2) {
34732
- options[opt] = opts && hasOwn(opts, opt) ? opts[opt] : defaultOptions2[opt];
34731
+ for (var opt in defaultOptions) {
34732
+ options[opt] = opts && hasOwn(opts, opt) ? opts[opt] : defaultOptions[opt];
34733
34733
  }
34734
34734
  if (options.ecmaVersion === "latest") {
34735
34735
  options.ecmaVersion = 1e8;
@@ -34901,7 +34901,7 @@ function stringToBigInt(str) {
34901
34901
  }
34902
34902
  return BigInt(str.replace(/_/g, ""));
34903
34903
  }
34904
- var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars, nonASCIIidentifierStartChars, reservedWords, ecma5AndLessKeywords, keywords$1, keywordRelationalOperator, nonASCIIidentifierStart, nonASCIIidentifier, TokenType, beforeExpr, startsExpr, keywords, types$1, lineBreak, lineBreakG, nonASCIIwhitespace, skipWhiteSpace, ref, hasOwnProperty2, toString, hasOwn, isArray, regexpCache, loneSurrogate, Position, SourceLocation, defaultOptions2, warnedAboutEcmaVersion, SCOPE_TOP, SCOPE_FUNCTION, SCOPE_ASYNC, SCOPE_GENERATOR, SCOPE_ARROW, SCOPE_SIMPLE_CATCH, SCOPE_SUPER, SCOPE_DIRECT_SUPER, SCOPE_CLASS_STATIC_BLOCK, SCOPE_VAR, BIND_NONE, BIND_VAR, BIND_LEXICAL, BIND_FUNCTION, BIND_SIMPLE_CATCH, BIND_OUTSIDE, Parser, prototypeAccessors, pp$9, literal, DestructuringErrors, pp$8, loopLabel, switchLabel, empty$1, FUNC_STATEMENT, FUNC_HANGING_STATEMENT, FUNC_NULLABLE_ID, pp$7, TokContext, types, pp$6, pp$5, empty, pp$4, pp$3, Scope, Node, pp$2, ecma9BinaryProperties, ecma10BinaryProperties, ecma11BinaryProperties, ecma12BinaryProperties, ecma13BinaryProperties, ecma14BinaryProperties, unicodeBinaryProperties, ecma14BinaryPropertiesOfStrings, unicodeBinaryPropertiesOfStrings, unicodeGeneralCategoryValues, ecma9ScriptValues, ecma10ScriptValues, ecma11ScriptValues, ecma12ScriptValues, ecma13ScriptValues, ecma14ScriptValues, unicodeScriptValues, data, ecmaVersion, i2, list, pp$1, BranchID, RegExpValidationState, CharSetNone, CharSetOk, CharSetString, Token, pp, INVALID_TEMPLATE_ESCAPE_ERROR, version;
34904
+ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars, nonASCIIidentifierStartChars, reservedWords, ecma5AndLessKeywords, keywords$1, keywordRelationalOperator, nonASCIIidentifierStart, nonASCIIidentifier, TokenType, beforeExpr, startsExpr, keywords, types$1, lineBreak, lineBreakG, nonASCIIwhitespace, skipWhiteSpace, ref, hasOwnProperty2, toString, hasOwn, isArray, regexpCache, loneSurrogate, Position, SourceLocation, defaultOptions, warnedAboutEcmaVersion, SCOPE_TOP, SCOPE_FUNCTION, SCOPE_ASYNC, SCOPE_GENERATOR, SCOPE_ARROW, SCOPE_SIMPLE_CATCH, SCOPE_SUPER, SCOPE_DIRECT_SUPER, SCOPE_CLASS_STATIC_BLOCK, SCOPE_VAR, BIND_NONE, BIND_VAR, BIND_LEXICAL, BIND_FUNCTION, BIND_SIMPLE_CATCH, BIND_OUTSIDE, Parser, prototypeAccessors, pp$9, literal, DestructuringErrors, pp$8, loopLabel, switchLabel, empty$1, FUNC_STATEMENT, FUNC_HANGING_STATEMENT, FUNC_NULLABLE_ID, pp$7, TokContext, types, pp$6, pp$5, empty, pp$4, pp$3, Scope, Node, pp$2, ecma9BinaryProperties, ecma10BinaryProperties, ecma11BinaryProperties, ecma12BinaryProperties, ecma13BinaryProperties, ecma14BinaryProperties, unicodeBinaryProperties, ecma14BinaryPropertiesOfStrings, unicodeBinaryPropertiesOfStrings, unicodeGeneralCategoryValues, ecma9ScriptValues, ecma10ScriptValues, ecma11ScriptValues, ecma12ScriptValues, ecma13ScriptValues, ecma14ScriptValues, unicodeScriptValues, data, ecmaVersion, i2, list, pp$1, BranchID, RegExpValidationState, CharSetNone, CharSetOk, CharSetString, Token, pp, INVALID_TEMPLATE_ESCAPE_ERROR, version;
34905
34905
  var init_acorn = __esm({
34906
34906
  "node_modules/.pnpm/acorn@8.12.0/node_modules/acorn/dist/acorn.mjs"() {
34907
34907
  astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 81, 2, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
@@ -35063,7 +35063,7 @@ var init_acorn = __esm({
35063
35063
  this.source = p2.sourceFile;
35064
35064
  }
35065
35065
  };
35066
- defaultOptions2 = {
35066
+ defaultOptions = {
35067
35067
  // `ecmaVersion` indicates the ECMAScript version to parse. Must be
35068
35068
  // either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10
35069
35069
  // (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"`
@@ -39997,7 +39997,7 @@ var init_acorn = __esm({
39997
39997
  Parser.acorn = {
39998
39998
  Parser,
39999
39999
  version,
40000
- defaultOptions: defaultOptions2,
40000
+ defaultOptions,
40001
40001
  Position,
40002
40002
  SourceLocation,
40003
40003
  getLineInfo,
@@ -65490,199 +65490,80 @@ var init_find_workspace_root = __esm({
65490
65490
  }
65491
65491
  });
65492
65492
 
65493
- // packages/config-tools/src/utilities/get-default-config.ts
65494
- var import_node_fs10, import_node_path6, DEFAULT_COLOR_CONFIG, DEFAULT_STORM_CONFIG, getDefaultConfig;
65495
- var init_get_default_config = __esm({
65496
- "packages/config-tools/src/utilities/get-default-config.ts"() {
65497
- init_src();
65498
- import_node_fs10 = require("node:fs");
65499
- import_node_path6 = require("node:path");
65493
+ // packages/config-tools/src/utilities/apply-workspace-tokens.ts
65494
+ var applyWorkspaceBaseTokens, applyWorkspaceProjectTokens, applyWorkspaceTokens;
65495
+ var init_apply_workspace_tokens = __esm({
65496
+ "packages/config-tools/src/utilities/apply-workspace-tokens.ts"() {
65500
65497
  init_find_workspace_root();
65501
- DEFAULT_COLOR_CONFIG = {
65502
- light: {
65503
- background: "#f4f4f5",
65504
- foreground: "#1d232a",
65505
- brand: "#1fb2a6",
65506
- brand2: "#7434DB",
65507
- brand3: "#00C2CE",
65508
- help: "#8250df",
65509
- success: "#087f5b",
65510
- info: "#0550ae",
65511
- warning: "#e3b341",
65512
- error: "#a40e26"
65513
- },
65514
- dark: {
65515
- background: "#0D1017",
65516
- foreground: "#fcfcf5",
65517
- brand: "#1fb2a6",
65518
- brand2: "#7434DB",
65519
- brand3: "#00C2CE",
65520
- help: "#8256D0",
65521
- success: "#087f5b",
65522
- info: "#316DCA",
65523
- warning: "#F3D371",
65524
- error: "#d1242f"
65498
+ applyWorkspaceBaseTokens = async (option, tokenizerOptions) => {
65499
+ let result = option;
65500
+ if (!result) {
65501
+ return result;
65525
65502
  }
65526
- };
65527
- DEFAULT_STORM_CONFIG = {
65528
- name: "storm",
65529
- namespace: "storm-software",
65530
- license: "Apache 2.0",
65531
- homepage: "https://stormsoftware.com",
65532
- owner: "@storm-software/development",
65533
- worker: "stormie-bot",
65534
- runtimeDirectory: "node_modules/.storm",
65535
- cacheDirectory: "node_modules/.cache/storm",
65536
- skipCache: false,
65537
- packageManager: "npm",
65538
- timezone: "America/New_York",
65539
- locale: "en-US",
65540
- env: "production",
65541
- branch: "main",
65542
- organization: "storm-software",
65543
- configFile: null,
65544
- runtimeVersion: "1.0.0",
65545
- colors: { ...DEFAULT_COLOR_CONFIG },
65546
- extensions: {}
65547
- };
65548
- getDefaultConfig = (config = {}, root) => {
65549
- let name = "storm-workspace";
65550
- let namespace = "storm-software";
65551
- let repository = "https://github.com/storm-software/storm-ops";
65552
- let license = DEFAULT_STORM_CONFIG.license;
65553
- let homepage = DEFAULT_STORM_CONFIG.homepage;
65554
- const workspaceRoot = findWorkspaceRoot(root);
65555
- if ((0, import_node_fs10.existsSync)((0, import_node_path6.join)(workspaceRoot, "package.json"))) {
65556
- const file = (0, import_node_fs10.readFileSync)((0, import_node_path6.join)(workspaceRoot, "package.json"), {
65557
- encoding: "utf-8"
65558
- });
65559
- if (file) {
65560
- const packageJson = JSON.parse(file);
65561
- if (packageJson.name) {
65562
- name = packageJson.name;
65563
- }
65564
- if (packageJson.namespace) {
65565
- namespace = packageJson.namespace;
65566
- }
65567
- if (packageJson.repository?.url) {
65568
- repository = packageJson.repository?.url;
65569
- }
65570
- if (packageJson.license) {
65571
- license = packageJson.license;
65572
- }
65573
- if (packageJson.homepage) {
65574
- homepage = packageJson.homepage;
65503
+ if (tokenizerOptions) {
65504
+ const optionKeys = Object.keys(tokenizerOptions);
65505
+ if (optionKeys.some((optionKey) => result.includes(`{${optionKey}}`))) {
65506
+ for (const optionKey of optionKeys) {
65507
+ if (result.includes(`{${optionKey}}`)) {
65508
+ result = result.replaceAll(
65509
+ `{${optionKey}}`,
65510
+ tokenizerOptions.config?.[optionKey] ?? ""
65511
+ );
65512
+ }
65575
65513
  }
65576
65514
  }
65577
65515
  }
65578
- return StormConfigSchema.parse({
65579
- ...DEFAULT_STORM_CONFIG,
65580
- ...Object.keys(config).reduce((ret, key) => {
65581
- if (typeof config[key] === "string" && !config[key]) {
65582
- ret[key] = void 0;
65583
- } else {
65584
- ret[key] = config[key];
65516
+ if (tokenizerOptions.config) {
65517
+ const configKeys = Object.keys(tokenizerOptions.config);
65518
+ if (configKeys.some((configKey) => result.includes(`{${configKey}}`))) {
65519
+ for (const configKey of configKeys) {
65520
+ if (result.includes(`{${configKey}}`)) {
65521
+ result = result.replaceAll(
65522
+ `{${configKey}}`,
65523
+ tokenizerOptions.config[configKey]
65524
+ );
65525
+ }
65585
65526
  }
65586
- return ret;
65587
- }, {}),
65588
- colors: { ...DEFAULT_COLOR_CONFIG, ...config.colors },
65589
- workspaceRoot,
65590
- name,
65591
- namespace,
65592
- repository,
65593
- license: license ?? DEFAULT_STORM_CONFIG.license,
65594
- homepage: homepage ?? DEFAULT_STORM_CONFIG.homepage,
65595
- docs: `${homepage ?? DEFAULT_STORM_CONFIG.homepage}/docs`,
65596
- licensing: `${homepage ?? DEFAULT_STORM_CONFIG.homepage}/licensing`,
65597
- extensions: {
65598
- ...config.extensions
65599
65527
  }
65600
- });
65601
- };
65602
- }
65603
- });
65604
-
65605
- // packages/config-tools/src/types.ts
65606
- var LogLevel, LogLevelLabel;
65607
- var init_types2 = __esm({
65608
- "packages/config-tools/src/types.ts"() {
65609
- LogLevel = {
65610
- SILENT: 0,
65611
- FATAL: 10,
65612
- ERROR: 20,
65613
- WARN: 30,
65614
- SUCCESS: 35,
65615
- INFO: 40,
65616
- DEBUG: 60,
65617
- TRACE: 70,
65618
- ALL: 100
65619
- };
65620
- LogLevelLabel = {
65621
- SILENT: "silent",
65622
- FATAL: "fatal",
65623
- ERROR: "error",
65624
- WARN: "warn",
65625
- INFO: "info",
65626
- DEBUG: "debug",
65627
- TRACE: "trace",
65628
- ALL: "all"
65629
- };
65630
- }
65631
- });
65632
-
65633
- // packages/config-tools/src/utilities/get-log-level.ts
65634
- var getLogLevel, getLogLevelLabel;
65635
- var init_get_log_level = __esm({
65636
- "packages/config-tools/src/utilities/get-log-level.ts"() {
65637
- init_types2();
65638
- getLogLevel = (label) => {
65639
- switch (label) {
65640
- case "all":
65641
- return LogLevel.ALL;
65642
- case "trace":
65643
- return LogLevel.TRACE;
65644
- case "debug":
65645
- return LogLevel.DEBUG;
65646
- case "info":
65647
- return LogLevel.INFO;
65648
- case "warn":
65649
- return LogLevel.WARN;
65650
- case "error":
65651
- return LogLevel.ERROR;
65652
- case "fatal":
65653
- return LogLevel.FATAL;
65654
- case "silent":
65655
- return LogLevel.SILENT;
65656
- default:
65657
- return LogLevel.INFO;
65658
- }
65659
- };
65660
- getLogLevelLabel = (logLevel = LogLevel.INFO) => {
65661
- if (logLevel >= LogLevel.ALL) {
65662
- return LogLevelLabel.ALL;
65663
- }
65664
- if (logLevel >= LogLevel.TRACE) {
65665
- return LogLevelLabel.TRACE;
65666
65528
  }
65667
- if (logLevel >= LogLevel.DEBUG) {
65668
- return LogLevelLabel.DEBUG;
65669
- }
65670
- if (logLevel >= LogLevel.INFO) {
65671
- return LogLevelLabel.INFO;
65672
- }
65673
- if (logLevel >= LogLevel.WARN) {
65674
- return LogLevelLabel.WARN;
65675
- }
65676
- if (logLevel >= LogLevel.ERROR) {
65677
- return LogLevelLabel.ERROR;
65529
+ if (result.includes("{workspaceRoot}")) {
65530
+ result = result.replaceAll(
65531
+ "{workspaceRoot}",
65532
+ tokenizerOptions.workspaceRoot ?? tokenizerOptions.config?.workspaceRoot ?? findWorkspaceRoot()
65533
+ );
65678
65534
  }
65679
- if (logLevel >= LogLevel.FATAL) {
65680
- return LogLevelLabel.FATAL;
65535
+ return result;
65536
+ };
65537
+ applyWorkspaceProjectTokens = (option, tokenizerOptions) => {
65538
+ return applyWorkspaceBaseTokens(option, tokenizerOptions);
65539
+ };
65540
+ applyWorkspaceTokens = async (options, config, tokenizerFn) => {
65541
+ if (!options) {
65542
+ return {};
65681
65543
  }
65682
- if (logLevel <= LogLevel.SILENT) {
65683
- return LogLevelLabel.SILENT;
65544
+ const result = {};
65545
+ for (const option of Object.keys(options)) {
65546
+ if (typeof options[option] === "string") {
65547
+ result[option] = await Promise.resolve(
65548
+ tokenizerFn(options[option], config)
65549
+ );
65550
+ } else if (Array.isArray(options[option])) {
65551
+ result[option] = await Promise.all(
65552
+ options[option].map(
65553
+ async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, config)) : item
65554
+ )
65555
+ );
65556
+ } else if (typeof options[option] === "object") {
65557
+ result[option] = await applyWorkspaceTokens(
65558
+ options[option],
65559
+ config,
65560
+ tokenizerFn
65561
+ );
65562
+ } else {
65563
+ result[option] = options[option];
65564
+ }
65684
65565
  }
65685
- return LogLevelLabel.INFO;
65566
+ return result;
65686
65567
  };
65687
65568
  }
65688
65569
  });
@@ -67263,6 +67144,226 @@ var init_chalk = __esm({
67263
67144
  }
67264
67145
  });
67265
67146
 
67147
+ // packages/config-tools/src/utilities/file-path-utils.ts
67148
+ function findFileName(filePath) {
67149
+ return filePath?.split(
67150
+ filePath?.includes(import_node_path6.sep) ? import_node_path6.sep : filePath?.includes("/") ? "/" : "\\"
67151
+ )?.pop() ?? "";
67152
+ }
67153
+ var import_node_path6, removeExtension;
67154
+ var init_file_path_utils = __esm({
67155
+ "packages/config-tools/src/utilities/file-path-utils.ts"() {
67156
+ import_node_path6 = require("node:path");
67157
+ removeExtension = (filePath) => {
67158
+ const result = !filePath || (filePath.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
67159
+ if (result.startsWith("./")) {
67160
+ return result.substring(2);
67161
+ }
67162
+ if (result.startsWith(".") || result.startsWith("/")) {
67163
+ return result.substring(1);
67164
+ }
67165
+ return result;
67166
+ };
67167
+ }
67168
+ });
67169
+
67170
+ // packages/config-tools/src/utilities/get-default-config.ts
67171
+ var import_node_fs10, import_node_path7, DEFAULT_COLOR_CONFIG, DEFAULT_STORM_CONFIG, getDefaultConfig;
67172
+ var init_get_default_config = __esm({
67173
+ "packages/config-tools/src/utilities/get-default-config.ts"() {
67174
+ init_src();
67175
+ import_node_fs10 = require("node:fs");
67176
+ import_node_path7 = require("node:path");
67177
+ init_find_workspace_root();
67178
+ DEFAULT_COLOR_CONFIG = {
67179
+ light: {
67180
+ background: "#f4f4f5",
67181
+ foreground: "#1d232a",
67182
+ brand: "#1fb2a6",
67183
+ brand2: "#7434DB",
67184
+ brand3: "#00C2CE",
67185
+ help: "#8250df",
67186
+ success: "#087f5b",
67187
+ info: "#0550ae",
67188
+ warning: "#e3b341",
67189
+ error: "#a40e26"
67190
+ },
67191
+ dark: {
67192
+ background: "#0D1017",
67193
+ foreground: "#fcfcf5",
67194
+ brand: "#1fb2a6",
67195
+ brand2: "#7434DB",
67196
+ brand3: "#00C2CE",
67197
+ help: "#8256D0",
67198
+ success: "#087f5b",
67199
+ info: "#316DCA",
67200
+ warning: "#F3D371",
67201
+ error: "#d1242f"
67202
+ }
67203
+ };
67204
+ DEFAULT_STORM_CONFIG = {
67205
+ name: "storm",
67206
+ namespace: "storm-software",
67207
+ license: "Apache 2.0",
67208
+ homepage: "https://stormsoftware.com",
67209
+ owner: "@storm-software/development",
67210
+ worker: "stormie-bot",
67211
+ runtimeDirectory: "node_modules/.storm",
67212
+ cacheDirectory: "node_modules/.cache/storm",
67213
+ skipCache: false,
67214
+ packageManager: "npm",
67215
+ timezone: "America/New_York",
67216
+ locale: "en-US",
67217
+ env: "production",
67218
+ branch: "main",
67219
+ organization: "storm-software",
67220
+ configFile: null,
67221
+ runtimeVersion: "1.0.0",
67222
+ colors: { ...DEFAULT_COLOR_CONFIG },
67223
+ extensions: {}
67224
+ };
67225
+ getDefaultConfig = (config = {}, root) => {
67226
+ let name = "storm-workspace";
67227
+ let namespace = "storm-software";
67228
+ let repository = "https://github.com/storm-software/storm-ops";
67229
+ let license = DEFAULT_STORM_CONFIG.license;
67230
+ let homepage = DEFAULT_STORM_CONFIG.homepage;
67231
+ const workspaceRoot = findWorkspaceRoot(root);
67232
+ if ((0, import_node_fs10.existsSync)((0, import_node_path7.join)(workspaceRoot, "package.json"))) {
67233
+ const file = (0, import_node_fs10.readFileSync)((0, import_node_path7.join)(workspaceRoot, "package.json"), {
67234
+ encoding: "utf-8"
67235
+ });
67236
+ if (file) {
67237
+ const packageJson = JSON.parse(file);
67238
+ if (packageJson.name) {
67239
+ name = packageJson.name;
67240
+ }
67241
+ if (packageJson.namespace) {
67242
+ namespace = packageJson.namespace;
67243
+ }
67244
+ if (packageJson.repository?.url) {
67245
+ repository = packageJson.repository?.url;
67246
+ }
67247
+ if (packageJson.license) {
67248
+ license = packageJson.license;
67249
+ }
67250
+ if (packageJson.homepage) {
67251
+ homepage = packageJson.homepage;
67252
+ }
67253
+ }
67254
+ }
67255
+ return StormConfigSchema.parse({
67256
+ ...DEFAULT_STORM_CONFIG,
67257
+ ...Object.keys(config).reduce((ret, key) => {
67258
+ if (typeof config[key] === "string" && !config[key]) {
67259
+ ret[key] = void 0;
67260
+ } else {
67261
+ ret[key] = config[key];
67262
+ }
67263
+ return ret;
67264
+ }, {}),
67265
+ colors: { ...DEFAULT_COLOR_CONFIG, ...config.colors },
67266
+ workspaceRoot,
67267
+ name,
67268
+ namespace,
67269
+ repository,
67270
+ license: license ?? DEFAULT_STORM_CONFIG.license,
67271
+ homepage: homepage ?? DEFAULT_STORM_CONFIG.homepage,
67272
+ docs: `${homepage ?? DEFAULT_STORM_CONFIG.homepage}/docs`,
67273
+ licensing: `${homepage ?? DEFAULT_STORM_CONFIG.homepage}/licensing`,
67274
+ extensions: {
67275
+ ...config.extensions
67276
+ }
67277
+ });
67278
+ };
67279
+ }
67280
+ });
67281
+
67282
+ // packages/config-tools/src/types.ts
67283
+ var LogLevel, LogLevelLabel;
67284
+ var init_types2 = __esm({
67285
+ "packages/config-tools/src/types.ts"() {
67286
+ LogLevel = {
67287
+ SILENT: 0,
67288
+ FATAL: 10,
67289
+ ERROR: 20,
67290
+ WARN: 30,
67291
+ SUCCESS: 35,
67292
+ INFO: 40,
67293
+ DEBUG: 60,
67294
+ TRACE: 70,
67295
+ ALL: 100
67296
+ };
67297
+ LogLevelLabel = {
67298
+ SILENT: "silent",
67299
+ FATAL: "fatal",
67300
+ ERROR: "error",
67301
+ WARN: "warn",
67302
+ INFO: "info",
67303
+ DEBUG: "debug",
67304
+ TRACE: "trace",
67305
+ ALL: "all"
67306
+ };
67307
+ }
67308
+ });
67309
+
67310
+ // packages/config-tools/src/utilities/get-log-level.ts
67311
+ var getLogLevel, getLogLevelLabel;
67312
+ var init_get_log_level = __esm({
67313
+ "packages/config-tools/src/utilities/get-log-level.ts"() {
67314
+ init_types2();
67315
+ getLogLevel = (label) => {
67316
+ switch (label) {
67317
+ case "all":
67318
+ return LogLevel.ALL;
67319
+ case "trace":
67320
+ return LogLevel.TRACE;
67321
+ case "debug":
67322
+ return LogLevel.DEBUG;
67323
+ case "info":
67324
+ return LogLevel.INFO;
67325
+ case "warn":
67326
+ return LogLevel.WARN;
67327
+ case "error":
67328
+ return LogLevel.ERROR;
67329
+ case "fatal":
67330
+ return LogLevel.FATAL;
67331
+ case "silent":
67332
+ return LogLevel.SILENT;
67333
+ default:
67334
+ return LogLevel.INFO;
67335
+ }
67336
+ };
67337
+ getLogLevelLabel = (logLevel = LogLevel.INFO) => {
67338
+ if (logLevel >= LogLevel.ALL) {
67339
+ return LogLevelLabel.ALL;
67340
+ }
67341
+ if (logLevel >= LogLevel.TRACE) {
67342
+ return LogLevelLabel.TRACE;
67343
+ }
67344
+ if (logLevel >= LogLevel.DEBUG) {
67345
+ return LogLevelLabel.DEBUG;
67346
+ }
67347
+ if (logLevel >= LogLevel.INFO) {
67348
+ return LogLevelLabel.INFO;
67349
+ }
67350
+ if (logLevel >= LogLevel.WARN) {
67351
+ return LogLevelLabel.WARN;
67352
+ }
67353
+ if (logLevel >= LogLevel.ERROR) {
67354
+ return LogLevelLabel.ERROR;
67355
+ }
67356
+ if (logLevel >= LogLevel.FATAL) {
67357
+ return LogLevelLabel.FATAL;
67358
+ }
67359
+ if (logLevel <= LogLevel.SILENT) {
67360
+ return LogLevelLabel.SILENT;
67361
+ }
67362
+ return LogLevelLabel.INFO;
67363
+ };
67364
+ }
67365
+ });
67366
+
67266
67367
  // packages/config-tools/src/utilities/logger.ts
67267
67368
  var getLogFn, writeFatal, writeError, writeWarning, writeInfo, writeSuccess, writeDebug, writeTrace, writeSystem, getStopwatch, formatLogMessage, _isFunction;
67268
67369
  var init_logger = __esm({
@@ -67465,106 +67566,19 @@ var init_run = __esm({
67465
67566
  }
67466
67567
  });
67467
67568
 
67468
- // packages/config-tools/src/utilities/file-path-utils.ts
67469
- function findFileName(filePath) {
67470
- return filePath?.split(filePath?.includes(import_node_path7.sep) ? import_node_path7.sep : filePath?.includes("/") ? "/" : "\\")?.pop() ?? "";
67471
- }
67472
- var import_node_path7, removeExtension;
67473
- var init_file_path_utils = __esm({
67474
- "packages/config-tools/src/utilities/file-path-utils.ts"() {
67475
- import_node_path7 = require("node:path");
67476
- removeExtension = (filePath) => {
67477
- const result = !filePath || (filePath.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
67478
- if (result.startsWith("./")) {
67479
- return result.substring(2);
67480
- }
67481
- if (result.startsWith(".") || result.startsWith("/")) {
67482
- return result.substring(1);
67483
- }
67484
- return result;
67485
- };
67486
- }
67487
- });
67488
-
67489
- // packages/config-tools/src/utilities/apply-workspace-tokens.ts
67490
- var applyWorkspaceBaseTokens, applyWorkspaceProjectTokens, applyWorkspaceTokens;
67491
- var init_apply_workspace_tokens = __esm({
67492
- "packages/config-tools/src/utilities/apply-workspace-tokens.ts"() {
67493
- init_find_workspace_root();
67494
- applyWorkspaceBaseTokens = async (option, tokenizerOptions) => {
67495
- let result = option;
67496
- if (!result) {
67497
- return result;
67498
- }
67499
- if (tokenizerOptions) {
67500
- const optionKeys = Object.keys(tokenizerOptions);
67501
- if (optionKeys.some((optionKey) => result.includes(`{${optionKey}}`))) {
67502
- for (const optionKey of optionKeys) {
67503
- if (result.includes(`{${optionKey}}`)) {
67504
- result = result.replaceAll(`{${optionKey}}`, tokenizerOptions.config?.[optionKey] ?? "");
67505
- }
67506
- }
67507
- }
67508
- }
67509
- if (tokenizerOptions.config) {
67510
- const configKeys = Object.keys(tokenizerOptions.config);
67511
- if (configKeys.some((configKey) => result.includes(`{${configKey}}`))) {
67512
- for (const configKey of configKeys) {
67513
- if (result.includes(`{${configKey}}`)) {
67514
- result = result.replaceAll(`{${configKey}}`, tokenizerOptions.config[configKey]);
67515
- }
67516
- }
67517
- }
67518
- }
67519
- if (result.includes("{workspaceRoot}")) {
67520
- result = result.replaceAll(
67521
- "{workspaceRoot}",
67522
- tokenizerOptions.workspaceRoot ?? tokenizerOptions.config?.workspaceRoot ?? findWorkspaceRoot()
67523
- );
67524
- }
67525
- return result;
67526
- };
67527
- applyWorkspaceProjectTokens = (option, tokenizerOptions) => {
67528
- return applyWorkspaceBaseTokens(option, tokenizerOptions);
67529
- };
67530
- applyWorkspaceTokens = async (options, config, tokenizerFn) => {
67531
- if (!options) {
67532
- return {};
67533
- }
67534
- const result = {};
67535
- for (const option of Object.keys(options)) {
67536
- if (typeof options[option] === "string") {
67537
- result[option] = await Promise.resolve(tokenizerFn(options[option], config));
67538
- } else if (Array.isArray(options[option])) {
67539
- result[option] = await Promise.all(
67540
- options[option].map(
67541
- async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, config)) : item
67542
- )
67543
- );
67544
- } else if (typeof options[option] === "object") {
67545
- result[option] = await applyWorkspaceTokens(options[option], config, tokenizerFn);
67546
- } else {
67547
- result[option] = options[option];
67548
- }
67549
- }
67550
- return result;
67551
- };
67552
- }
67553
- });
67554
-
67555
67569
  // packages/config-tools/src/utilities/index.ts
67556
67570
  var init_utilities = __esm({
67557
67571
  "packages/config-tools/src/utilities/index.ts"() {
67572
+ init_apply_workspace_tokens();
67573
+ init_chalk();
67574
+ init_correct_paths();
67575
+ init_file_path_utils();
67558
67576
  init_find_workspace_root();
67559
67577
  init_get_default_config();
67560
67578
  init_get_log_level();
67561
67579
  init_logger();
67562
67580
  init_process_handler();
67563
67581
  init_run();
67564
- init_correct_paths();
67565
- init_file_path_utils();
67566
- init_apply_workspace_tokens();
67567
- init_chalk();
67568
67582
  }
67569
67583
  });
67570
67584
 
@@ -68252,10 +68266,11 @@ __export(generator_exports, {
68252
68266
  module.exports = __toCommonJS(generator_exports);
68253
68267
  var import_devkit = require("@nx/devkit");
68254
68268
  init_src();
68269
+ init_src2();
68255
68270
 
68256
68271
  // node_modules/.pnpm/zod-to-json-schema@3.23.1_zod@3.23.8/node_modules/zod-to-json-schema/dist/esm/Options.js
68257
68272
  var ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use");
68258
- var defaultOptions = {
68273
+ var defaultOptions2 = {
68259
68274
  name: void 0,
68260
68275
  $refStrategy: "root",
68261
68276
  basePath: ["#"],
@@ -68277,10 +68292,10 @@ var defaultOptions = {
68277
68292
  nameStrategy: "ref"
68278
68293
  };
68279
68294
  var getDefaultOptions = (options) => typeof options === "string" ? {
68280
- ...defaultOptions,
68295
+ ...defaultOptions2,
68281
68296
  name: options
68282
68297
  } : {
68283
- ...defaultOptions,
68298
+ ...defaultOptions2,
68284
68299
  ...options
68285
68300
  };
68286
68301
 
@@ -69412,7 +69427,6 @@ var zodToJsonSchema = (schema, options) => {
69412
69427
  };
69413
69428
 
69414
69429
  // packages/workspace-tools/src/base/base-generator.ts
69415
- init_src2();
69416
69430
  var withRunGenerator = (name, generatorFn, generatorOptions = {
69417
69431
  skipReadingConfig: false
69418
69432
  }) => async (tree, _options) => {
@@ -69425,7 +69439,9 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
69425
69439
  writeSuccess: writeSuccess2,
69426
69440
  writeTrace: writeTrace2,
69427
69441
  findWorkspaceRoot: findWorkspaceRoot2,
69428
- loadStormConfig: loadStormConfig2
69442
+ loadStormConfig: loadStormConfig2,
69443
+ applyWorkspaceBaseTokens: applyWorkspaceBaseTokens2,
69444
+ applyWorkspaceTokens: applyWorkspaceTokens2
69429
69445
  } = await Promise.resolve().then(() => (init_src2(), src_exports));
69430
69446
  const stopwatch = getStopwatch2(name);
69431
69447
  let options = _options;
@@ -69455,10 +69471,10 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
69455
69471
  ${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`,
69456
69472
  config
69457
69473
  );
69458
- const tokenized = await applyWorkspaceTokens(
69474
+ const tokenized = await applyWorkspaceTokens2(
69459
69475
  options,
69460
69476
  { workspaceRoot: tree.root, config },
69461
- applyWorkspaceBaseTokens
69477
+ applyWorkspaceBaseTokens2
69462
69478
  );
69463
69479
  if (generatorOptions?.hooks?.preProcess) {
69464
69480
  writeDebug2("Running the preProcess hook...", config);
@@ -69485,7 +69501,7 @@ ${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[ke
69485
69501
  writeDebug2("Completed the postProcess hook", config);
69486
69502
  }
69487
69503
  return () => {
69488
- writeSuccess2(`Completed running the ${name} task executor!
69504
+ writeSuccess2(`Completed running the ${name} generator!
69489
69505
  `, config);
69490
69506
  };
69491
69507
  } catch (error) {
@@ -69507,7 +69523,6 @@ ${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[ke
69507
69523
  };
69508
69524
 
69509
69525
  // packages/workspace-tools/src/generators/config-schema/generator.ts
69510
- init_src2();
69511
69526
  async function configSchemaGeneratorFn(tree, options, config) {
69512
69527
  const { findWorkspaceRoot: findWorkspaceRoot2, writeInfo: writeInfo2, writeSuccess: writeSuccess2 } = await Promise.resolve().then(() => (init_src2(), src_exports));
69513
69528
  writeInfo2("\u{1F4E6} Running Storm Configuration JSON Schema generator", config);