@storm-software/workspace-tools 1.239.5 → 1.240.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 (159) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +1 -1
  3. package/dist/{chunk-KTQJ3BYS.js → chunk-2JLHVV5S.js} +22 -61
  4. package/dist/{chunk-VTNJFMZL.js → chunk-2VV3TV3C.js} +2 -2
  5. package/dist/{chunk-SOQA673K.mjs → chunk-33S3ENYB.mjs} +6 -6
  6. package/dist/{chunk-SMQLC4ZD.js → chunk-3LJCHADS.js} +5 -5
  7. package/dist/{chunk-STENKYWN.js → chunk-4AOGBZNI.js} +2 -2
  8. package/dist/{chunk-CT2M6P5R.js → chunk-4ZKSU75O.js} +11 -11
  9. package/dist/{chunk-FZRFNRJT.js → chunk-6NSTM255.js} +31 -31
  10. package/dist/{chunk-BQ6QQEKM.js → chunk-6WRRTV43.js} +41 -41
  11. package/dist/{chunk-7ZQ2E7DU.mjs → chunk-762D6XMQ.mjs} +1 -1
  12. package/dist/{chunk-PYLFT2B6.mjs → chunk-7HUOKMPU.mjs} +1 -1
  13. package/dist/{chunk-LQSCFXXH.mjs → chunk-AJ7WQHX5.mjs} +1 -1
  14. package/dist/{chunk-UR7LTGOY.js → chunk-APBDTIK2.js} +2 -2
  15. package/dist/{chunk-OCZKMQKV.mjs → chunk-BFKQCOQJ.mjs} +1 -1
  16. package/dist/{chunk-FDQROX6T.js → chunk-BJAK7EVK.js} +4 -4
  17. package/dist/{chunk-B2TMWHSQ.js → chunk-CRMDACYF.js} +20 -20
  18. package/dist/{chunk-TDO6POJN.js → chunk-EGBJI6CN.js} +15 -15
  19. package/dist/{chunk-NOGV45XZ.mjs → chunk-FOYWFRVO.mjs} +3 -3
  20. package/dist/{chunk-IFT7I2FJ.js → chunk-HCEVPME2.js} +9 -9
  21. package/dist/{chunk-XV2NPRXT.mjs → chunk-HO2DSAZ2.mjs} +1 -1
  22. package/dist/{chunk-3BU4E3N6.mjs → chunk-I5N7XQEK.mjs} +1 -1
  23. package/dist/{chunk-IF2P52VQ.mjs → chunk-JE4JY3YS.mjs} +1 -1
  24. package/dist/{chunk-FTCEJETR.mjs → chunk-JKJK4ONU.mjs} +3 -3
  25. package/dist/{chunk-SLVOLY6P.mjs → chunk-JXMDPU4I.mjs} +3 -3
  26. package/dist/{chunk-VNRL6EUK.mjs → chunk-M47JATRY.mjs} +6 -6
  27. package/dist/{chunk-YP6KREBX.mjs → chunk-M4PPRKPX.mjs} +2 -2
  28. package/dist/{chunk-JES75APB.mjs → chunk-MFWYLIWY.mjs} +2 -2
  29. package/dist/{chunk-7DG4BPDH.js → chunk-MQAKNE4X.js} +5 -5
  30. package/dist/{chunk-E42HWC4D.js → chunk-NWSV2EYZ.js} +2 -2
  31. package/dist/{chunk-BWUHOT6F.mjs → chunk-NYX3ICKR.mjs} +103 -50
  32. package/dist/{chunk-RER3HTR4.js → chunk-PB6J3FU7.js} +2 -2
  33. package/dist/{chunk-XV57DEOH.mjs → chunk-QLOTS3MH.mjs} +1 -1
  34. package/dist/{chunk-M3X4P6AT.js → chunk-RN4QXP7F.js} +111 -58
  35. package/dist/{chunk-WO3SOZPT.mjs → chunk-RRQ7WHLD.mjs} +2 -2
  36. package/dist/{chunk-3W2Z7D4U.js → chunk-SBHOAJIT.js} +2 -2
  37. package/dist/{chunk-ODVU2NXI.mjs → chunk-SC3ANGC5.mjs} +2 -2
  38. package/dist/{chunk-BUKUNOCV.js → chunk-SGSMEZWT.js} +2 -2
  39. package/dist/{chunk-6SV7BVD4.mjs → chunk-WGNNLNSH.mjs} +1 -1
  40. package/dist/{chunk-GIIOK5XW.mjs → chunk-Y5SXJ6IC.mjs} +23 -62
  41. package/dist/{chunk-BNVJA74D.js → chunk-Y7RQKDIF.js} +2 -2
  42. package/dist/{chunk-LSUHHBAM.js → chunk-YVJY3MXR.js} +2 -2
  43. package/dist/{executor-B4MiexNw.d.ts → executor-BHwhDrL-.d.ts} +1 -1
  44. package/dist/{executor-C8vSwRW1.d.ts → executor-BW_5lER2.d.ts} +1 -1
  45. package/dist/{executor-qCehbH9x.d.mts → executor-Bk4ug-RW.d.mts} +1 -1
  46. package/dist/{executor-BqpvCbj5.d.ts → executor-CIGyZdrv.d.ts} +1 -1
  47. package/dist/{executor-D8m1bXgk.d.mts → executor-C_QU1lUw.d.mts} +1 -1
  48. package/dist/{executor-5Wog21g_.d.mts → executor-D2o23AZj.d.mts} +1 -1
  49. package/dist/{executor-hq_H_ICT.d.mts → executor-DL3jAzFW.d.mts} +1 -1
  50. package/dist/{executor-D5hcfG7B.d.ts → executor-DOFe9F7c.d.ts} +1 -1
  51. package/dist/{executor-U929Bp8J.d.ts → executor-hDJ0Fk_g.d.ts} +1 -1
  52. package/dist/{executor-CqbWU1uP.d.mts → executor-ozBp5rj1.d.mts} +1 -1
  53. package/dist/executors.d.mts +6 -6
  54. package/dist/executors.d.ts +6 -6
  55. package/dist/executors.js +14 -14
  56. package/dist/executors.mjs +13 -13
  57. package/dist/{generator-BLYdn00o.d.mts → generator-BNM0qnMp.d.mts} +1 -1
  58. package/dist/{generator-48_WHnGL.d.mts → generator-BPXY7sqO.d.mts} +1 -1
  59. package/dist/{generator-Dyq3mgZU.d.mts → generator-BS6uKMIL.d.mts} +2 -2
  60. package/dist/{generator-DeKyhxAj.d.mts → generator-BsxAYGR_.d.mts} +2 -2
  61. package/dist/{generator-OLytwpdD.d.ts → generator-CFxhJoNw.d.ts} +2 -2
  62. package/dist/{generator-T2p5gT0C.d.ts → generator-CiDljAEY.d.ts} +2 -2
  63. package/dist/{generator-noL-xIjx.d.ts → generator-CiNaIUED.d.ts} +1 -1
  64. package/dist/{generator-BufhnJev.d.ts → generator-DDW7kns9.d.ts} +2 -2
  65. package/dist/{generator-BqzpDHpv.d.mts → generator-DatrLGpK.d.mts} +2 -2
  66. package/dist/{generator-DeNfAL1R.d.ts → generator-QTX2Ix9P.d.ts} +1 -1
  67. package/dist/{generator-CC8n6BWL.d.mts → generator-c8PBxLhH.d.mts} +2 -2
  68. package/dist/{generator-CtpgcwxE.d.ts → generator-ymaJQAJP.d.ts} +2 -2
  69. package/dist/generators.d.mts +8 -8
  70. package/dist/generators.d.ts +8 -8
  71. package/dist/generators.js +9 -9
  72. package/dist/generators.mjs +8 -8
  73. package/dist/index.d.mts +13 -13
  74. package/dist/index.d.ts +13 -13
  75. package/dist/index.js +21 -21
  76. package/dist/index.mjs +20 -20
  77. package/dist/src/base/base-executor.d.mts +2 -2
  78. package/dist/src/base/base-executor.d.ts +2 -2
  79. package/dist/src/base/base-executor.js +3 -3
  80. package/dist/src/base/base-executor.mjs +2 -2
  81. package/dist/src/base/base-generator.d.mts +2 -2
  82. package/dist/src/base/base-generator.d.ts +2 -2
  83. package/dist/src/base/base-generator.js +3 -3
  84. package/dist/src/base/base-generator.mjs +2 -2
  85. package/dist/src/base/index.d.mts +2 -2
  86. package/dist/src/base/index.d.ts +2 -2
  87. package/dist/src/base/index.js +4 -4
  88. package/dist/src/base/index.mjs +3 -3
  89. package/dist/src/executors/cargo-build/executor.js +4 -4
  90. package/dist/src/executors/cargo-build/executor.mjs +3 -3
  91. package/dist/src/executors/cargo-check/executor.js +4 -4
  92. package/dist/src/executors/cargo-check/executor.mjs +3 -3
  93. package/dist/src/executors/cargo-clippy/executor.js +4 -4
  94. package/dist/src/executors/cargo-clippy/executor.mjs +3 -3
  95. package/dist/src/executors/cargo-doc/executor.js +4 -4
  96. package/dist/src/executors/cargo-doc/executor.mjs +3 -3
  97. package/dist/src/executors/cargo-format/executor.js +4 -4
  98. package/dist/src/executors/cargo-format/executor.mjs +3 -3
  99. package/dist/src/executors/clean-package/executor.d.mts +1 -1
  100. package/dist/src/executors/clean-package/executor.d.ts +1 -1
  101. package/dist/src/executors/clean-package/executor.js +5 -5
  102. package/dist/src/executors/clean-package/executor.mjs +2 -2
  103. package/dist/src/executors/esbuild/executor.d.mts +2 -2
  104. package/dist/src/executors/esbuild/executor.d.ts +2 -2
  105. package/dist/src/executors/esbuild/executor.js +5 -5
  106. package/dist/src/executors/esbuild/executor.mjs +4 -4
  107. package/dist/src/executors/size-limit/executor.d.mts +2 -2
  108. package/dist/src/executors/size-limit/executor.d.ts +2 -2
  109. package/dist/src/executors/size-limit/executor.js +4 -4
  110. package/dist/src/executors/size-limit/executor.mjs +3 -3
  111. package/dist/src/executors/tsdown/executor.d.mts +2 -2
  112. package/dist/src/executors/tsdown/executor.d.ts +2 -2
  113. package/dist/src/executors/tsdown/executor.js +5 -5
  114. package/dist/src/executors/tsdown/executor.mjs +4 -4
  115. package/dist/src/executors/typia/executor.d.mts +2 -2
  116. package/dist/src/executors/typia/executor.d.ts +2 -2
  117. package/dist/src/executors/typia/executor.js +4 -4
  118. package/dist/src/executors/typia/executor.mjs +3 -3
  119. package/dist/src/executors/unbuild/executor.d.mts +2 -2
  120. package/dist/src/executors/unbuild/executor.d.ts +2 -2
  121. package/dist/src/executors/unbuild/executor.js +4 -4
  122. package/dist/src/executors/unbuild/executor.mjs +3 -3
  123. package/dist/src/generators/browser-library/generator.d.mts +3 -3
  124. package/dist/src/generators/browser-library/generator.d.ts +3 -3
  125. package/dist/src/generators/browser-library/generator.js +4 -4
  126. package/dist/src/generators/browser-library/generator.mjs +3 -3
  127. package/dist/src/generators/config-schema/generator.d.mts +3 -3
  128. package/dist/src/generators/config-schema/generator.d.ts +3 -3
  129. package/dist/src/generators/config-schema/generator.js +4 -4
  130. package/dist/src/generators/config-schema/generator.mjs +3 -3
  131. package/dist/src/generators/neutral-library/generator.d.mts +3 -3
  132. package/dist/src/generators/neutral-library/generator.d.ts +3 -3
  133. package/dist/src/generators/neutral-library/generator.js +4 -4
  134. package/dist/src/generators/neutral-library/generator.mjs +3 -3
  135. package/dist/src/generators/node-library/generator.d.mts +3 -3
  136. package/dist/src/generators/node-library/generator.d.ts +3 -3
  137. package/dist/src/generators/node-library/generator.js +4 -4
  138. package/dist/src/generators/node-library/generator.mjs +3 -3
  139. package/dist/src/generators/preset/generator.d.mts +3 -3
  140. package/dist/src/generators/preset/generator.d.ts +3 -3
  141. package/dist/src/generators/preset/generator.js +4 -4
  142. package/dist/src/generators/preset/generator.mjs +3 -3
  143. package/dist/src/generators/release-version/generator.d.mts +2 -2
  144. package/dist/src/generators/release-version/generator.d.ts +2 -2
  145. package/dist/src/generators/release-version/generator.js +3 -3
  146. package/dist/src/generators/release-version/generator.mjs +2 -2
  147. package/dist/src/types.d.mts +2 -2
  148. package/dist/src/types.d.ts +2 -2
  149. package/dist/src/utils/apply-workspace-tokens.d.mts +1 -1
  150. package/dist/src/utils/apply-workspace-tokens.d.ts +1 -1
  151. package/dist/src/utils/index.d.mts +2 -2
  152. package/dist/src/utils/index.d.ts +2 -2
  153. package/dist/src/utils/project-tags.d.mts +2 -2
  154. package/dist/src/utils/project-tags.d.ts +2 -2
  155. package/dist/{types-BmsLBqaq.d.ts → types-Bd83s-qg.d.ts} +1 -1
  156. package/dist/{types-CQzaS20Q.d.mts → types-CYi2oThM.d.mts} +1 -1
  157. package/dist/{types-D9vU63tt.d.ts → types-zrlItIRw.d.mts} +3 -3
  158. package/dist/{types-D9vU63tt.d.mts → types-zrlItIRw.d.ts} +3 -3
  159. package/package.json +5 -5
@@ -100,6 +100,8 @@ var ColorConfigMapSchema = _zod2.default.union([
100
100
  }),
101
101
  _zod2.default.record(_zod2.default.string(), ColorConfigSchema)
102
102
  ]);
103
+ var ExtendsItemSchema = _zod2.default.string().trim().describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
104
+ var ExtendsSchema = ExtendsItemSchema.or(_zod2.default.array(ExtendsItemSchema)).describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
103
105
  var WorkspaceBotConfigSchema = _zod2.default.object({
104
106
  name: _zod2.default.string().trim().default("Stormie-Bot").describe("The workspace bot user's name (this is the bot that will be used to perform various tasks)"),
105
107
  email: _zod2.default.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
@@ -114,11 +116,11 @@ var WorkspaceDirectoryConfigSchema = _zod2.default.object({
114
116
  }).describe("Various directories used by the workspace to store data, cache, and configuration files");
115
117
  var StormConfigSchema = _zod2.default.object({
116
118
  $schema: _zod2.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
117
- extends: _zod2.default.string().trim().optional().describe("The path to a base JSON file to use as a configuration preset file"),
119
+ extends: ExtendsSchema.optional(),
118
120
  name: _zod2.default.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
119
121
  namespace: _zod2.default.string().trim().toLowerCase().optional().describe("The namespace of the package"),
120
122
  organization: _zod2.default.string().trim().default("storm-software").describe("The organization of the workspace"),
121
- repository: _zod2.default.string().trim().url().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
123
+ repository: _zod2.default.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
122
124
  license: _zod2.default.string().trim().default("Apache-2.0").describe("The license type of the package"),
123
125
  homepage: _zod2.default.string().trim().url().default(STORM_DEFAULT_HOMEPAGE).describe("The homepage of the workspace"),
124
126
  docs: _zod2.default.string().trim().url().default(STORM_DEFAULT_DOCS).describe("The base documentation site for the workspace"),
@@ -206,6 +208,7 @@ var LogLevelLabel = {
206
208
 
207
209
  // ../config-tools/src/utilities/get-default-config.ts
208
210
  var _fs = require('fs');
211
+ var _promises = require('fs/promises');
209
212
  var _path = require('path');
210
213
  var DEFAULT_COLOR_CONFIG = {
211
214
  "light": {
@@ -235,17 +238,15 @@ var DEFAULT_COLOR_CONFIG = {
235
238
  "negative": "#dc2626"
236
239
  }
237
240
  };
238
- var getDefaultConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (root) => {
241
+ var getDefaultConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (root) => {
239
242
  let license = STORM_DEFAULT_LICENSE;
240
243
  let homepage = STORM_DEFAULT_HOMEPAGE;
241
- let name;
242
- let namespace;
243
- let repository;
244
+ let name = void 0;
245
+ let namespace = void 0;
246
+ let repository = void 0;
244
247
  const workspaceRoot = _chunk5MKQX2FEjs.findWorkspaceRoot.call(void 0, root);
245
248
  if (_fs.existsSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"))) {
246
- const file = _fs.readFileSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"), {
247
- encoding: "utf8"
248
- });
249
+ const file = await _promises.readFile.call(void 0, _chunkXCSSYTCUjs.joinPaths.call(void 0, workspaceRoot, "package.json"), "utf8");
249
250
  if (file) {
250
251
  const packageJson = JSON.parse(file);
251
252
  if (packageJson.name) {
@@ -254,8 +255,12 @@ var getDefaultConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (roo
254
255
  if (packageJson.namespace) {
255
256
  namespace = packageJson.namespace;
256
257
  }
257
- if (_optionalChain([packageJson, 'access', _2 => _2.repository, 'optionalAccess', _3 => _3.url])) {
258
- repository = _optionalChain([packageJson, 'access', _4 => _4.repository, 'optionalAccess', _5 => _5.url]);
258
+ if (packageJson.repository) {
259
+ if (typeof packageJson.repository === "string") {
260
+ repository = packageJson.repository;
261
+ } else if (packageJson.repository.url) {
262
+ repository = packageJson.repository.url;
263
+ }
259
264
  }
260
265
  if (packageJson.license) {
261
266
  license = packageJson.license;
@@ -300,7 +305,7 @@ var chalkDefault = {
300
305
  };
301
306
  var getChalk = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, () => {
302
307
  let _chalk = _chalk3.default;
303
- if (!_optionalChain([_chalk, 'optionalAccess', _6 => _6.hex]) || !_optionalChain([_chalk, 'optionalAccess', _7 => _7.bold, 'optionalAccess', _8 => _8.hex]) || !_optionalChain([_chalk, 'optionalAccess', _9 => _9.bgHex]) || !_optionalChain([_chalk, 'optionalAccess', _10 => _10.whiteBright])) {
308
+ if (!_optionalChain([_chalk, 'optionalAccess', _2 => _2.hex]) || !_optionalChain([_chalk, 'optionalAccess', _3 => _3.bold, 'optionalAccess', _4 => _4.hex]) || !_optionalChain([_chalk, 'optionalAccess', _5 => _5.bgHex]) || !_optionalChain([_chalk, 'optionalAccess', _6 => _6.whiteBright])) {
304
309
  _chalk = chalkDefault;
305
310
  }
306
311
  return _chalk;
@@ -396,7 +401,7 @@ var isVerbose = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (label = Lo
396
401
 
397
402
  // ../config-tools/src/logger/console.ts
398
403
  var getLogFn = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
399
- const colors = !_optionalChain([config, 'access', _11 => _11.colors, 'optionalAccess', _12 => _12.dark]) && !_optionalChain([config, 'access', _13 => _13.colors, 'optionalAccess', _14 => _14["base"]]) && !_optionalChain([config, 'access', _15 => _15.colors, 'optionalAccess', _16 => _16["base"], 'optionalAccess', _17 => _17.dark]) ? DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _18 => _18.colors, 'optionalAccess', _19 => _19.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _20 => _20.colors, 'optionalAccess', _21 => _21["base"], 'optionalAccess', _22 => _22.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _23 => _23.colors, 'optionalAccess', _24 => _24["base"]]) ? _optionalChain([config, 'access', _25 => _25.colors, 'optionalAccess', _26 => _26["base"]]) : DEFAULT_COLOR_CONFIG;
404
+ const colors = !_optionalChain([config, 'access', _7 => _7.colors, 'optionalAccess', _8 => _8.dark]) && !_optionalChain([config, 'access', _9 => _9.colors, 'optionalAccess', _10 => _10["base"]]) && !_optionalChain([config, 'access', _11 => _11.colors, 'optionalAccess', _12 => _12["base"], 'optionalAccess', _13 => _13.dark]) ? DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _14 => _14.colors, 'optionalAccess', _15 => _15.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _16 => _16.colors, 'optionalAccess', _17 => _17["base"], 'optionalAccess', _18 => _18.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _19 => _19.colors, 'optionalAccess', _20 => _20["base"]]) ? _optionalChain([config, 'access', _21 => _21.colors, 'optionalAccess', _22 => _22["base"]]) : DEFAULT_COLOR_CONFIG;
400
405
  const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
401
406
  if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
402
407
  return (_) => {
@@ -464,7 +469,6 @@ var writeInfo = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message, c
464
469
  var writeSuccess = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.SUCCESS, config)(message), "writeSuccess");
465
470
  var writeDebug = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.DEBUG, config)(message), "writeDebug");
466
471
  var writeTrace = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.TRACE, config)(message), "writeTrace");
467
- var writeSystem = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.ALL, config)(message), "writeSystem");
468
472
  var getStopwatch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (name) => {
469
473
  const start = process.hrtime();
470
474
  return () => {
@@ -494,7 +498,7 @@ ${Object.keys(message).filter((key) => !skip.includes(key)).map((key) => ` ${pre
494
498
  }, "formatLogMessage");
495
499
  var _isFunction = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (value) => {
496
500
  try {
497
- return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _27 => _27.constructor]) && _optionalChain([value, 'optionalAccess', _28 => _28.call]) && _optionalChain([value, 'optionalAccess', _29 => _29.apply]));
501
+ return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _23 => _23.constructor]) && _optionalChain([value, 'optionalAccess', _24 => _24.call]) && _optionalChain([value, 'optionalAccess', _25 => _25.apply]));
498
502
  } catch (e) {
499
503
  return false;
500
504
  }
@@ -508,32 +512,32 @@ var _c12 = require('c12');
508
512
 
509
513
  var getConfigFileByName = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (fileName, filePath, options = {}) => {
510
514
  const workspacePath = filePath || _chunk5MKQX2FEjs.findWorkspaceRoot.call(void 0, filePath);
511
- let config = await _c12.loadConfig.call(void 0, {
512
- cwd: workspacePath,
513
- packageJson: true,
514
- name: fileName,
515
- envName: _optionalChain([fileName, 'optionalAccess', _30 => _30.toUpperCase, 'call', _31 => _31()]),
516
- jitiOptions: {
517
- debug: false,
518
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkXCSSYTCUjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
519
- },
520
- ...options
521
- });
522
- if (!config || Object.keys(config).length === 0) {
523
- config = await _c12.loadConfig.call(void 0, {
515
+ const configs = await Promise.all([
516
+ _c12.loadConfig.call(void 0, {
524
517
  cwd: workspacePath,
525
518
  packageJson: true,
526
519
  name: fileName,
527
- envName: _optionalChain([fileName, 'optionalAccess', _32 => _32.toUpperCase, 'call', _33 => _33()]),
520
+ envName: _optionalChain([fileName, 'optionalAccess', _26 => _26.toUpperCase, 'call', _27 => _27()]),
521
+ jitiOptions: {
522
+ debug: false,
523
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkXCSSYTCUjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
524
+ },
525
+ ...options
526
+ }),
527
+ _c12.loadConfig.call(void 0, {
528
+ cwd: workspacePath,
529
+ packageJson: true,
530
+ name: fileName,
531
+ envName: _optionalChain([fileName, 'optionalAccess', _28 => _28.toUpperCase, 'call', _29 => _29()]),
528
532
  jitiOptions: {
529
533
  debug: false,
530
534
  fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkXCSSYTCUjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
531
535
  },
532
536
  configFile: fileName,
533
537
  ...options
534
- });
535
- }
536
- return config;
538
+ })
539
+ ]);
540
+ return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
537
541
  }, "getConfigFileByName");
538
542
  var getConfigFile = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (filePath, additionalFileNames = []) => {
539
543
  const workspacePath = filePath ? filePath : _chunk5MKQX2FEjs.findWorkspaceRoot.call(void 0, filePath);
@@ -541,15 +545,15 @@ var getConfigFile = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (
541
545
  let config = result.config;
542
546
  const configFile = result.configFile;
543
547
  if (config && configFile && Object.keys(config).length > 0) {
544
- writeSystem(`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
548
+ writeTrace(`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
545
549
  logLevel: "all"
546
550
  });
547
551
  }
548
552
  if (additionalFileNames && additionalFileNames.length > 0) {
549
553
  const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
550
554
  for (const result2 of results) {
551
- if (_optionalChain([result2, 'optionalAccess', _34 => _34.config]) && _optionalChain([result2, 'optionalAccess', _35 => _35.configFile]) && Object.keys(result2.config).length > 0) {
552
- writeSystem(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
555
+ if (_optionalChain([result2, 'optionalAccess', _30 => _30.config]) && _optionalChain([result2, 'optionalAccess', _31 => _31.configFile]) && Object.keys(result2.config).length > 0) {
556
+ writeTrace(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
553
557
  logLevel: "all"
554
558
  });
555
559
  config = _defu2.default.call(void 0, _nullishCoalesce(result2.config, () => ( {})), _nullishCoalesce(config, () => ( {})));
@@ -564,6 +568,16 @@ var getConfigFile = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (
564
568
  }, "getConfigFile");
565
569
 
566
570
  // ../config-tools/src/env/get-env.ts
571
+ var getExtensionEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (extensionName) => {
572
+ const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
573
+ return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
574
+ const name = key.replace(prefix, "").split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
575
+ if (name) {
576
+ ret[name] = process.env[key];
577
+ }
578
+ return ret;
579
+ }, {});
580
+ }, "getExtensionEnv");
567
581
  var getConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, () => {
568
582
  const prefix = "STORM_";
569
583
  let config = {
@@ -704,13 +718,13 @@ var getBaseThemeColorConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(vo
704
718
  var setExtensionEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (extensionName, extension) => {
705
719
  for (const key of Object.keys(_nullishCoalesce(extension, () => ( {})))) {
706
720
  if (extension[key]) {
707
- const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _36 => _36.replace, 'call', _37 => _37(/([A-Z])+/g, (input) => input ? _optionalChain([input, 'access', _38 => _38[0], 'optionalAccess', _39 => _39.toUpperCase, 'call', _40 => _40()]) + input.slice(1) : ""), 'access', _41 => _41.split, 'call', _42 => _42(/(?=[A-Z])|[.\-\s_]/), 'access', _43 => _43.map, 'call', _44 => _44((x) => x.toLowerCase())]), () => ( []));
721
+ const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _32 => _32.replace, 'call', _33 => _33(/([A-Z])+/g, (input) => input ? _optionalChain([input, 'access', _34 => _34[0], 'optionalAccess', _35 => _35.toUpperCase, 'call', _36 => _36()]) + input.slice(1) : ""), 'access', _37 => _37.split, 'call', _38 => _38(/(?=[A-Z])|[.\-\s_]/), 'access', _39 => _39.map, 'call', _40 => _40((x) => x.toLowerCase())]), () => ( []));
708
722
  let extensionKey;
709
723
  if (result.length === 0) {
710
724
  return;
711
725
  }
712
726
  if (result.length === 1) {
713
- extensionKey = _nullishCoalesce(_optionalChain([result, 'access', _45 => _45[0], 'optionalAccess', _46 => _46.toUpperCase, 'call', _47 => _47()]), () => ( ""));
727
+ extensionKey = _nullishCoalesce(_optionalChain([result, 'access', _41 => _41[0], 'optionalAccess', _42 => _42.toUpperCase, 'call', _43 => _43()]), () => ( ""));
714
728
  } else {
715
729
  extensionKey = result.reduce((ret, part) => {
716
730
  return `${ret}_${part.toLowerCase()}`;
@@ -723,7 +737,7 @@ var setExtensionEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (exte
723
737
  var setConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (config) => {
724
738
  const prefix = "STORM_";
725
739
  if (config.extends) {
726
- process.env[`${prefix}EXTENDS`] = config.extends;
740
+ process.env[`${prefix}EXTENDS`] = Array.isArray(config.extends) ? JSON.stringify(config.extends) : config.extends;
727
741
  }
728
742
  if (config.name) {
729
743
  process.env[`${prefix}NAME`] = config.name;
@@ -807,7 +821,7 @@ var setConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (config)
807
821
  process.env.NODE_ENV = config.env;
808
822
  process.env.ENVIRONMENT = config.env;
809
823
  }
810
- if (_optionalChain([config, 'access', _48 => _48.colors, 'optionalAccess', _49 => _49.base, 'optionalAccess', _50 => _50.light]) || _optionalChain([config, 'access', _51 => _51.colors, 'optionalAccess', _52 => _52.base, 'optionalAccess', _53 => _53.dark])) {
824
+ if (_optionalChain([config, 'access', _44 => _44.colors, 'optionalAccess', _45 => _45.base, 'optionalAccess', _46 => _46.light]) || _optionalChain([config, 'access', _47 => _47.colors, 'optionalAccess', _48 => _48.base, 'optionalAccess', _49 => _49.dark])) {
811
825
  for (const key of Object.keys(config.colors)) {
812
826
  setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
813
827
  }
@@ -855,7 +869,7 @@ var setConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (config)
855
869
  }
856
870
  }, "setConfigEnv");
857
871
  var setThemeColorConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (prefix, config) => {
858
- return _optionalChain([config, 'optionalAccess', _54 => _54.light, 'optionalAccess', _55 => _55.brand]) || _optionalChain([config, 'optionalAccess', _56 => _56.dark, 'optionalAccess', _57 => _57.brand]) ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
872
+ return _optionalChain([config, 'optionalAccess', _50 => _50.light, 'optionalAccess', _51 => _51.brand]) || _optionalChain([config, 'optionalAccess', _52 => _52.dark, 'optionalAccess', _53 => _53.brand]) ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
859
873
  }, "setThemeColorConfigEnv");
860
874
  var setSingleThemeColorConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (prefix, config) => {
861
875
  if (config.dark) {
@@ -953,30 +967,69 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(vo
953
967
  }, "setBaseThemeColorConfigEnv");
954
968
 
955
969
  // ../config-tools/src/create-storm-config.ts
970
+ var _extension_cache = /* @__PURE__ */ new WeakMap();
956
971
  var _static_cache = void 0;
957
- var loadStormConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (workspaceRoot) => {
958
- let config = {};
959
- if (_optionalChain([_static_cache, 'optionalAccess', _58 => _58.data]) && _optionalChain([_static_cache, 'optionalAccess', _59 => _59.timestamp]) && _static_cache.timestamp >= Date.now() + 3e4) {
960
- writeTrace(`Configuration cache hit - ${_static_cache.timestamp}`, _static_cache.data);
961
- return _static_cache.data;
962
- }
963
- let _workspaceRoot = workspaceRoot;
964
- if (!_workspaceRoot) {
965
- _workspaceRoot = _chunk5MKQX2FEjs.findWorkspaceRoot.call(void 0, );
966
- }
967
- const configFile = await getConfigFile(_workspaceRoot);
968
- if (!configFile) {
969
- writeWarning("No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.json` file to the root of your workspace if it is not.\n", {
970
- logLevel: "all"
971
- });
972
+ var createStormConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (extensionName, schema, workspaceRoot, skipLogs = false) => {
973
+ let result;
974
+ if (!_optionalChain([_static_cache, 'optionalAccess', _54 => _54.data]) || !_optionalChain([_static_cache, 'optionalAccess', _55 => _55.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
975
+ let _workspaceRoot = workspaceRoot;
976
+ if (!_workspaceRoot) {
977
+ _workspaceRoot = _chunk5MKQX2FEjs.findWorkspaceRoot.call(void 0, );
978
+ }
979
+ const configEnv = getConfigEnv();
980
+ const defaultConfig = await getDefaultConfig(_workspaceRoot);
981
+ const configFile = await getConfigFile(_workspaceRoot);
982
+ if (!configFile && !skipLogs) {
983
+ writeWarning("No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.json` file to the root of your workspace if it is not.\n", {
984
+ logLevel: "all"
985
+ });
986
+ }
987
+ result = await StormConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
988
+ result.workspaceRoot ??= _workspaceRoot;
989
+ } else {
990
+ result = _static_cache.data;
972
991
  }
973
- config = _defu2.default.call(void 0, getConfigEnv(), configFile, getDefaultConfig(_workspaceRoot));
992
+ if (schema && extensionName) {
993
+ result.extensions = {
994
+ ...result.extensions,
995
+ [extensionName]: createConfigExtension(extensionName, schema)
996
+ };
997
+ }
998
+ _static_cache = {
999
+ timestamp: Date.now(),
1000
+ data: result
1001
+ };
1002
+ return result;
1003
+ }, "createStormConfig");
1004
+ var createConfigExtension = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (extensionName, schema) => {
1005
+ const extension_cache_key = {
1006
+ extensionName
1007
+ };
1008
+ if (_extension_cache.has(extension_cache_key)) {
1009
+ return _extension_cache.get(extension_cache_key);
1010
+ }
1011
+ let extension = getExtensionEnv(extensionName);
1012
+ if (schema) {
1013
+ extension = schema.parse(extension);
1014
+ }
1015
+ _extension_cache.set(extension_cache_key, extension);
1016
+ return extension;
1017
+ }, "createConfigExtension");
1018
+ var loadStormConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (workspaceRoot, skipLogs = false) => {
1019
+ const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
974
1020
  setConfigEnv(config);
975
- writeTrace(`\u2699\uFE0F Using Storm configuration:
1021
+ if (!skipLogs) {
1022
+ writeTrace(`\u2699\uFE0F Using Storm configuration:
976
1023
  ${formatLogMessage(config)}`, config);
1024
+ }
977
1025
  return config;
978
1026
  }, "loadStormConfig");
979
1027
 
1028
+ // ../config-tools/src/get-config.ts
1029
+ var getConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (workspaceRoot, skipLogs = false) => {
1030
+ return loadStormConfig(workspaceRoot, skipLogs);
1031
+ }, "getConfig");
1032
+
980
1033
 
981
1034
 
982
1035
 
@@ -990,4 +1043,4 @@ ${formatLogMessage(config)}`, config);
990
1043
 
991
1044
 
992
1045
 
993
- exports.StormConfigSchema = StormConfigSchema; exports.isVerbose = isVerbose; exports.writeFatal = writeFatal; exports.writeError = writeError; exports.writeWarning = writeWarning; exports.writeInfo = writeInfo; exports.writeSuccess = writeSuccess; exports.writeDebug = writeDebug; exports.writeTrace = writeTrace; exports.getStopwatch = getStopwatch; exports.formatLogMessage = formatLogMessage; exports.loadStormConfig = loadStormConfig;
1046
+ exports.StormConfigSchema = StormConfigSchema; exports.isVerbose = isVerbose; exports.writeFatal = writeFatal; exports.writeError = writeError; exports.writeWarning = writeWarning; exports.writeInfo = writeInfo; exports.writeSuccess = writeSuccess; exports.writeDebug = writeDebug; exports.writeTrace = writeTrace; exports.getStopwatch = getStopwatch; exports.formatLogMessage = formatLogMessage; exports.getConfig = getConfig;
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  withRunGenerator
3
- } from "./chunk-SLVOLY6P.mjs";
3
+ } from "./chunk-JXMDPU4I.mjs";
4
4
  import {
5
5
  StormConfigSchema,
6
6
  writeInfo,
7
7
  writeSuccess,
8
8
  writeTrace
9
- } from "./chunk-BWUHOT6F.mjs";
9
+ } from "./chunk-NYX3ICKR.mjs";
10
10
  import {
11
11
  findWorkspaceRoot
12
12
  } from "./chunk-DMUTOQCB.mjs";
@@ -4,7 +4,7 @@
4
4
  var _chunkFBLF4KJFjs = require('./chunk-FBLF4KJF.js');
5
5
 
6
6
 
7
- var _chunkTDO6POJNjs = require('./chunk-TDO6POJN.js');
7
+ var _chunkEGBJI6CNjs = require('./chunk-EGBJI6CN.js');
8
8
 
9
9
 
10
10
  var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
@@ -42,7 +42,7 @@ async function neutralLibraryGeneratorFn(tree, schema, config) {
42
42
  return null;
43
43
  }
44
44
  _chunk3GQAWCBQjs.__name.call(void 0, neutralLibraryGeneratorFn, "neutralLibraryGeneratorFn");
45
- var generator_default = _chunkTDO6POJNjs.withRunGenerator.call(void 0, "TypeScript Library Creator (Neutral Platform)", neutralLibraryGeneratorFn, {
45
+ var generator_default = _chunkEGBJI6CNjs.withRunGenerator.call(void 0, "TypeScript Library Creator (Neutral Platform)", neutralLibraryGeneratorFn, {
46
46
  hooks: {
47
47
  applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
48
48
  options.description ??= "A library used by Storm Software to support either browser or NodeJs applications";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  withRunExecutor
3
- } from "./chunk-FTCEJETR.mjs";
3
+ } from "./chunk-JKJK4ONU.mjs";
4
4
  import {
5
5
  writeInfo
6
- } from "./chunk-BWUHOT6F.mjs";
6
+ } from "./chunk-NYX3ICKR.mjs";
7
7
  import {
8
8
  joinPaths
9
9
  } from "./chunk-PVTEDLBL.mjs";
@@ -4,7 +4,7 @@
4
4
  var _chunkULBTYC2Bjs = require('./chunk-ULBTYC2B.js');
5
5
 
6
6
 
7
- var _chunkB2TMWHSQjs = require('./chunk-B2TMWHSQ.js');
7
+ var _chunkCRMDACYFjs = require('./chunk-CRMDACYF.js');
8
8
 
9
9
 
10
10
  var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
@@ -15,7 +15,7 @@ async function cargoClippyExecutor(options, context) {
15
15
  return await _chunkULBTYC2Bjs.cargoCommand.call(void 0, ...command);
16
16
  }
17
17
  _chunk3GQAWCBQjs.__name.call(void 0, cargoClippyExecutor, "cargoClippyExecutor");
18
- var executor_default = _chunkB2TMWHSQjs.withRunExecutor.call(void 0, "Cargo Clippy", cargoClippyExecutor, {
18
+ var executor_default = _chunkCRMDACYFjs.withRunExecutor.call(void 0, "Cargo Clippy", cargoClippyExecutor, {
19
19
  skipReadingConfig: false,
20
20
  hooks: {
21
21
  applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-QZHIWK5Z.mjs";
5
5
  import {
6
6
  withRunExecutor
7
- } from "./chunk-FTCEJETR.mjs";
7
+ } from "./chunk-JKJK4ONU.mjs";
8
8
  import {
9
9
  __name
10
10
  } from "./chunk-XUV4U54K.mjs";
@@ -1,9 +1,7 @@
1
1
  import {
2
- isVerbose,
3
- loadStormConfig,
4
2
  writeDebug,
5
3
  writeTrace
6
- } from "./chunk-BWUHOT6F.mjs";
4
+ } from "./chunk-NYX3ICKR.mjs";
7
5
  import {
8
6
  findWorkspaceRoot
9
7
  } from "./chunk-DMUTOQCB.mjs";
@@ -27,30 +25,10 @@ var DEFAULT_TARGET = "esnext";
27
25
  var DEFAULT_ORGANIZATION = "storm-software";
28
26
 
29
27
  // ../build-tools/src/utilities/copy-assets.ts
30
- import { readCachedProjectGraph, readProjectsConfigurationFromProjectGraph } from "@nx/devkit";
31
- import { copyAssets as copyAssetsBase } from "@nx/js";
28
+ import { CopyAssetsHandler } from "@nx/js/src/utils/assets/copy-assets-handler";
32
29
  import { glob } from "glob";
33
- import { readFile as readFile2, writeFile } from "node:fs/promises";
34
-
35
- // ../build-tools/src/utilities/read-nx-config.ts
36
- import { existsSync } from "node:fs";
37
- import { readFile } from "node:fs/promises";
38
- var readNxConfig = /* @__PURE__ */ __name(async (workspaceRoot) => {
39
- let rootDir = workspaceRoot;
40
- if (!rootDir) {
41
- const config = await loadStormConfig();
42
- rootDir = config.workspaceRoot;
43
- }
44
- const nxJsonPath = joinPaths(rootDir, "nx.json");
45
- if (!existsSync(nxJsonPath)) {
46
- throw new Error("Cannot find project.json configuration");
47
- }
48
- const configContent = await readFile(nxJsonPath, "utf8");
49
- return JSON.parse(configContent);
50
- }, "readNxConfig");
51
-
52
- // ../build-tools/src/utilities/copy-assets.ts
53
- var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, projectRoot, projectName, sourceRoot, generatePackageJson = true, includeSrc = false, banner, footer) => {
30
+ import { readFile, writeFile } from "node:fs/promises";
31
+ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson = true, includeSrc = false, banner, footer) => {
54
32
  const pendingAssets = Array.from(assets ?? []);
55
33
  pendingAssets.push({
56
34
  input: projectRoot,
@@ -58,7 +36,7 @@ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, proje
58
36
  output: "."
59
37
  });
60
38
  pendingAssets.push({
61
- input: config.workspaceRoot,
39
+ input: ".",
62
40
  glob: "LICENSE",
63
41
  output: "."
64
42
  });
@@ -76,36 +54,15 @@ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, proje
76
54
  output: "src/"
77
55
  });
78
56
  }
79
- const nxJson = readNxConfig(config.workspaceRoot);
80
- const projectGraph = readCachedProjectGraph();
81
- const projectsConfigurations = readProjectsConfigurationFromProjectGraph(projectGraph);
82
- if (!projectsConfigurations?.projects?.[projectName]) {
83
- throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
84
- }
85
- const buildTarget = projectsConfigurations.projects[projectName].targets?.build;
86
- if (!buildTarget) {
87
- throw new Error(`The Build process failed because the project does not have a valid build target in the project.json file. Check if the file exists in the root of the project at ${joinPaths(projectRoot, "project.json")}`);
88
- }
89
57
  writeTrace(`\u{1F4DD} Copying the following assets to the output directory:
90
58
  ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${joinPaths(outputPath, pendingAsset.output)}`).join("\n")}`, config);
91
- const result = await copyAssetsBase({
92
- assets: pendingAssets,
93
- watch: false,
94
- outputPath
95
- }, {
96
- root: config.workspaceRoot,
97
- targetName: "build",
98
- target: buildTarget,
99
- projectName,
100
- projectGraph,
101
- projectsConfigurations,
102
- nxJsonConfiguration: nxJson,
103
- cwd: config.workspaceRoot,
104
- isVerbose: isVerbose(config.logLevel)
59
+ const assetHandler = new CopyAssetsHandler({
60
+ projectDir: projectRoot,
61
+ rootDir: config.workspaceRoot,
62
+ outputDir: outputPath,
63
+ assets: pendingAssets
105
64
  });
106
- if (!result.success) {
107
- throw new Error("The Build process failed trying to copy assets");
108
- }
65
+ await assetHandler.processAllAssetsOnce();
109
66
  if (includeSrc === true) {
110
67
  writeDebug(`\u{1F4DD} Adding banner and writing source files: ${joinPaths(outputPath, "src")}`, config);
111
68
  const files = await glob([
@@ -116,7 +73,7 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
116
73
  ]);
117
74
  await Promise.allSettled(files.map(async (file) => writeFile(file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
118
75
 
119
- ${await readFile2(file, "utf8")}
76
+ ${await readFile(file, "utf8")}
120
77
 
121
78
  ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`)));
122
79
  }
@@ -125,18 +82,18 @@ ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `//
125
82
  // ../build-tools/src/utilities/generate-package-json.ts
126
83
  import { calculateProjectBuildableDependencies } from "@nx/js/src/utils/buildable-libs-utils";
127
84
  import { Glob } from "glob";
128
- import { existsSync as existsSync2 } from "node:fs";
129
- import { readFile as readFile3 } from "node:fs/promises";
130
- import { readCachedProjectGraph as readCachedProjectGraph2 } from "nx/src/project-graph/project-graph";
85
+ import { existsSync } from "node:fs";
86
+ import { readFile as readFile2 } from "node:fs/promises";
87
+ import { readCachedProjectGraph } from "nx/src/project-graph/project-graph";
131
88
  var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot, projectRoot, projectName, packageJson) => {
132
- const projectDependencies = calculateProjectBuildableDependencies(void 0, readCachedProjectGraph2(), workspaceRoot, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
89
+ const projectDependencies = calculateProjectBuildableDependencies(void 0, readCachedProjectGraph(), workspaceRoot, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
133
90
  const localPackages = [];
134
91
  for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot)) {
135
92
  const projectNode = project.node;
136
93
  if (projectNode.data.root) {
137
94
  const projectPackageJsonPath = joinPaths(workspaceRoot, projectNode.data.root, "package.json");
138
- if (existsSync2(projectPackageJsonPath)) {
139
- const projectPackageJsonContent = await readFile3(projectPackageJsonPath, "utf8");
95
+ if (existsSync(projectPackageJsonPath)) {
96
+ const projectPackageJsonContent = await readFile2(projectPackageJsonPath, "utf8");
140
97
  const projectPackageJson = JSON.parse(projectPackageJsonContent);
141
98
  if (projectPackageJson.private !== false) {
142
99
  localPackages.push(projectPackageJson);
@@ -173,7 +130,7 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot, projec
173
130
  }, "addPackageDependencies");
174
131
  var addWorkspacePackageJsonFields = /* @__PURE__ */ __name(async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
175
132
  const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : findWorkspaceRoot();
176
- const workspacePackageJsonContent = await readFile3(joinPaths(workspaceRoot, "package.json"), "utf8");
133
+ const workspacePackageJsonContent = await readFile2(joinPaths(workspaceRoot, "package.json"), "utf8");
177
134
  const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
178
135
  packageJson.type ??= "module";
179
136
  packageJson.sideEffects ??= false;
@@ -326,6 +283,10 @@ function getOutExtension(format, pkgType) {
326
283
  }
327
284
  __name(getOutExtension, "getOutExtension");
328
285
 
286
+ // ../build-tools/src/utilities/read-nx-config.ts
287
+ import { existsSync as existsSync2 } from "node:fs";
288
+ import { readFile as readFile3 } from "node:fs/promises";
289
+
329
290
  // ../build-tools/src/utilities/task-graph.ts
330
291
  import { createTaskGraph, mapTargetDefaultsToDependencies } from "nx/src/tasks-runner/create-task-graph";
331
292
 
@@ -7,7 +7,7 @@ var _chunkFBLF4KJFjs = require('./chunk-FBLF4KJF.js');
7
7
  var _chunkHI4G4OOGjs = require('./chunk-HI4G4OOG.js');
8
8
 
9
9
 
10
- var _chunkTDO6POJNjs = require('./chunk-TDO6POJN.js');
10
+ var _chunkEGBJI6CNjs = require('./chunk-EGBJI6CN.js');
11
11
 
12
12
 
13
13
  var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
@@ -49,7 +49,7 @@ async function nodeLibraryGeneratorFn(tree, schema, config) {
49
49
  return null;
50
50
  }
51
51
  _chunk3GQAWCBQjs.__name.call(void 0, nodeLibraryGeneratorFn, "nodeLibraryGeneratorFn");
52
- var generator_default = _chunkTDO6POJNjs.withRunGenerator.call(void 0, "TypeScript Library Creator (NodeJs Platform)", nodeLibraryGeneratorFn, {
52
+ var generator_default = _chunkEGBJI6CNjs.withRunGenerator.call(void 0, "TypeScript Library Creator (NodeJs Platform)", nodeLibraryGeneratorFn, {
53
53
  hooks: {
54
54
  applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
55
55
  options.description ??= "A library used by Storm Software to support NodeJs applications";
@@ -4,7 +4,7 @@
4
4
  var _chunkULBTYC2Bjs = require('./chunk-ULBTYC2B.js');
5
5
 
6
6
 
7
- var _chunkB2TMWHSQjs = require('./chunk-B2TMWHSQ.js');
7
+ var _chunkCRMDACYFjs = require('./chunk-CRMDACYF.js');
8
8
 
9
9
 
10
10
  var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
@@ -15,7 +15,7 @@ async function cargoFormatExecutor(options, context) {
15
15
  return await _chunkULBTYC2Bjs.cargoCommand.call(void 0, ...command);
16
16
  }
17
17
  _chunk3GQAWCBQjs.__name.call(void 0, cargoFormatExecutor, "cargoFormatExecutor");
18
- var executor_default = _chunkB2TMWHSQjs.withRunExecutor.call(void 0, "Cargo Format", cargoFormatExecutor, {
18
+ var executor_default = _chunkCRMDACYFjs.withRunExecutor.call(void 0, "Cargo Format", cargoFormatExecutor, {
19
19
  skipReadingConfig: false,
20
20
  hooks: {
21
21
  applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
@@ -1,6 +1,6 @@
1
1
  import * as _nx_devkit from '@nx/devkit';
2
2
  import { ExecutorContext } from '@nx/devkit';
3
- import { S as StormConfig } from './types-D9vU63tt.js';
3
+ import { S as StormConfig } from './types-zrlItIRw.js';
4
4
 
5
5
  // Generated by @storm-software/untyped
6
6
  // Do not edit this file directly
@@ -1,6 +1,6 @@
1
1
  import * as _nx_devkit from '@nx/devkit';
2
2
  import { ExecutorContext } from '@nx/devkit';
3
- import { S as StormConfig } from './types-D9vU63tt.js';
3
+ import { S as StormConfig } from './types-zrlItIRw.js';
4
4
 
5
5
  // Generated by @storm-software/untyped
6
6
  // Do not edit this file directly
@@ -1,6 +1,6 @@
1
1
  import * as _nx_devkit from '@nx/devkit';
2
2
  import { ExecutorContext } from '@nx/devkit';
3
- import { S as StormConfig } from './types-D9vU63tt.mjs';
3
+ import { S as StormConfig } from './types-zrlItIRw.mjs';
4
4
 
5
5
  // Generated by @storm-software/untyped
6
6
  // Do not edit this file directly
@@ -1,6 +1,6 @@
1
1
  import * as _nx_devkit from '@nx/devkit';
2
2
  import { ExecutorContext } from '@nx/devkit';
3
- import { S as StormConfig } from './types-D9vU63tt.js';
3
+ import { S as StormConfig } from './types-zrlItIRw.js';
4
4
 
5
5
  // Generated by @storm-software/untyped
6
6
  // Do not edit this file directly