@storm-software/tsdown 0.18.4 → 0.20.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.
package/README.md CHANGED
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
21
21
 
22
22
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
23
23
 
24
- [![Version](https://img.shields.io/badge/version-0.18.4-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
24
+ [![Version](https://img.shields.io/badge/version-0.19.0-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
25
25
 
26
26
  <!-- prettier-ignore-start -->
27
27
  <!-- markdownlint-disable -->
package/dist/build.cjs CHANGED
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkTEQW7DKTcjs = require('./chunk-TEQW7DKT.cjs');
4
- require('./chunk-QYOK2QJA.cjs');
3
+ var _chunkBJNWAMXYcjs = require('./chunk-BJNWAMXY.cjs');
4
+ require('./chunk-3RSRST47.cjs');
5
5
  require('./chunk-5KRF6IVW.cjs');
6
6
  require('./chunk-USNT2KNT.cjs');
7
7
 
8
8
 
9
- exports.build = _chunkTEQW7DKTcjs.build;
9
+ exports.build = _chunkBJNWAMXYcjs.build;
package/dist/build.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  build
3
- } from "./chunk-6NMTPFXQ.js";
4
- import "./chunk-D42RFSA4.js";
3
+ } from "./chunk-D5OWREKY.js";
4
+ import "./chunk-4WO7ZRQL.js";
5
5
  import "./chunk-UQLCBJOS.js";
6
6
  import "./chunk-SHUYVCID.js";
7
7
  export {
@@ -416,7 +416,8 @@ var CONSOLE_ICONS = {
416
416
  [LogLevelLabel.INFO]: useIcon("\u2139", "i"),
417
417
  [LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
418
418
  [LogLevelLabel.DEBUG]: useIcon("\u{1F6E0}", "D"),
419
- [LogLevelLabel.TRACE]: useIcon("\u2709", "\u2192")
419
+ [LogLevelLabel.TRACE]: useIcon("\u{1F6E0}", "T"),
420
+ [LogLevelLabel.ALL]: useIcon("\u2709", "\u2192")
420
421
  };
421
422
 
422
423
  // ../config-tools/src/logger/format-timestamp.ts
@@ -491,48 +492,48 @@ var getLogFn = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (logLevel =
491
492
  if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
492
493
  return (message) => {
493
494
  console.error(`
494
- ${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(_nullishCoalesce(colors.fatal, () => ( "#7d1a1a")))(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal]`)} ${_chalk.hex(_nullishCoalesce(colors.fatal, () => ( "#7d1a1a")))(formatLogMessage(message))}
495
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.fatal, () => ( "#7d1a1a")))(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
495
496
  `);
496
497
  };
497
498
  }
498
499
  if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
499
500
  return (message) => {
500
501
  console.error(`
501
- ${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(_nullishCoalesce(colors.danger, () => ( "#f85149")))(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error]`)} ${_chalk.hex(_nullishCoalesce(colors.danger, () => ( "#f85149")))(formatLogMessage(message))}
502
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.danger, () => ( "#f85149")))(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
502
503
  `);
503
504
  };
504
505
  }
505
506
  if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
506
507
  return (message) => {
507
508
  console.warn(`
508
- ${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(_nullishCoalesce(colors.warning, () => ( "#e3b341")))(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn]`)} ${_chalk.hex(_nullishCoalesce(colors.warning, () => ( "#e3b341")))(formatLogMessage(message))}
509
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.warning, () => ( "#e3b341")))(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
509
510
  `);
510
511
  };
511
512
  }
512
513
  if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel || typeof logLevel === "string" && LogLevel.SUCCESS >= getLogLevel(logLevel)) {
513
514
  return (message) => {
514
515
  console.info(`
515
- ${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(_nullishCoalesce(colors.success, () => ( "#56d364")))(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success]`)} ${_chalk.hex(_nullishCoalesce(colors.success, () => ( "#56d364")))(formatLogMessage(message))}
516
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.success, () => ( "#56d364")))(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
516
517
  `);
517
518
  };
518
519
  }
519
520
  if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
520
521
  return (message) => {
521
522
  console.info(`
522
- ${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(_nullishCoalesce(colors.info, () => ( "#58a6ff")))(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info]`)} ${_chalk.hex(_nullishCoalesce(colors.info, () => ( "#58a6ff")))(formatLogMessage(message))}
523
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.info, () => ( "#58a6ff")))(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
523
524
  `);
524
525
  };
525
526
  }
526
527
  if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel || typeof logLevel === "string" && LogLevel.TRACE >= getLogLevel(logLevel)) {
527
528
  return (message) => {
528
529
  console.debug(`
529
- ${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Debug]`)} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(formatLogMessage(message))}
530
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
530
531
  `);
531
532
  };
532
533
  }
533
534
  return (message) => {
534
535
  console.log(`
535
- ${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System]`)} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(formatLogMessage(message))}
536
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
536
537
  `);
537
538
  };
538
539
  }, "getLogFn");
@@ -416,7 +416,8 @@ var CONSOLE_ICONS = {
416
416
  [LogLevelLabel.INFO]: useIcon("\u2139", "i"),
417
417
  [LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
418
418
  [LogLevelLabel.DEBUG]: useIcon("\u{1F6E0}", "D"),
419
- [LogLevelLabel.TRACE]: useIcon("\u2709", "\u2192")
419
+ [LogLevelLabel.TRACE]: useIcon("\u{1F6E0}", "T"),
420
+ [LogLevelLabel.ALL]: useIcon("\u2709", "\u2192")
420
421
  };
421
422
 
422
423
  // ../config-tools/src/logger/format-timestamp.ts
@@ -491,48 +492,48 @@ var getLogFn = /* @__PURE__ */ __name((logLevel = LogLevel.INFO, config = {}) =>
491
492
  if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
492
493
  return (message) => {
493
494
  console.error(`
494
- ${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.fatal ?? "#7d1a1a")(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal]`)} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(formatLogMessage(message))}
495
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
495
496
  `);
496
497
  };
497
498
  }
498
499
  if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
499
500
  return (message) => {
500
501
  console.error(`
501
- ${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.danger ?? "#f85149")(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error]`)} ${_chalk.hex(colors.danger ?? "#f85149")(formatLogMessage(message))}
502
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.danger ?? "#f85149")(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
502
503
  `);
503
504
  };
504
505
  }
505
506
  if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
506
507
  return (message) => {
507
508
  console.warn(`
508
- ${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.warning ?? "#e3b341")(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn]`)} ${_chalk.hex(colors.warning ?? "#e3b341")(formatLogMessage(message))}
509
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.warning ?? "#e3b341")(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
509
510
  `);
510
511
  };
511
512
  }
512
513
  if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel || typeof logLevel === "string" && LogLevel.SUCCESS >= getLogLevel(logLevel)) {
513
514
  return (message) => {
514
515
  console.info(`
515
- ${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.success ?? "#56d364")(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success]`)} ${_chalk.hex(colors.success ?? "#56d364")(formatLogMessage(message))}
516
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.success ?? "#56d364")(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
516
517
  `);
517
518
  };
518
519
  }
519
520
  if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
520
521
  return (message) => {
521
522
  console.info(`
522
- ${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.info ?? "#58a6ff")(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info]`)} ${_chalk.hex(colors.info ?? "#58a6ff")(formatLogMessage(message))}
523
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? "#58a6ff")(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
523
524
  `);
524
525
  };
525
526
  }
526
527
  if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel || typeof logLevel === "string" && LogLevel.TRACE >= getLogLevel(logLevel)) {
527
528
  return (message) => {
528
529
  console.debug(`
529
- ${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Debug]`)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
530
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
530
531
  `);
531
532
  };
532
533
  }
533
534
  return (message) => {
534
535
  console.log(`
535
- ${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System]`)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
536
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
536
537
  `);
537
538
  };
538
539
  }, "getLogFn");
@@ -20,7 +20,7 @@
20
20
 
21
21
 
22
22
 
23
- var _chunkQYOK2QJAcjs = require('./chunk-QYOK2QJA.cjs');
23
+ var _chunk3RSRST47cjs = require('./chunk-3RSRST47.cjs');
24
24
 
25
25
 
26
26
  var _chunk5KRF6IVWcjs = require('./chunk-5KRF6IVW.cjs');
@@ -52,38 +52,35 @@ var _resolve2 = require('resolve'); var _resolve3 = _interopRequireDefault(_reso
52
52
 
53
53
  // ../build-tools/src/utilities/copy-assets.ts
54
54
 
55
-
56
55
  var _js = require('@nx/js');
57
56
  var _glob = require('glob');
58
-
59
- // ../build-tools/src/utilities/read-nx-config.ts
60
-
57
+ var _promises = require('fs/promises');
61
58
 
62
59
  // ../config-tools/src/config-file/get-config-file.ts
63
60
  var _c12 = require('c12');
64
61
  var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
65
62
  var getConfigFileByName = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (fileName, filePath, options = {}) => {
66
- const workspacePath = filePath || _chunkQYOK2QJAcjs.findWorkspaceRoot.call(void 0, filePath);
67
- let config = _c12.loadConfig.call(void 0, {
63
+ const workspacePath = filePath || _chunk3RSRST47cjs.findWorkspaceRoot.call(void 0, filePath);
64
+ let config = await _c12.loadConfig.call(void 0, {
68
65
  cwd: workspacePath,
69
66
  packageJson: true,
70
67
  name: fileName,
71
68
  envName: _optionalChain([fileName, 'optionalAccess', _ => _.toUpperCase, 'call', _2 => _2()]),
72
69
  jitiOptions: {
73
70
  debug: false,
74
- cache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkQYOK2QJAcjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache", "storm")
71
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunk3RSRST47cjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "config")
75
72
  },
76
73
  ...options
77
74
  });
78
75
  if (!config || Object.keys(config).length === 0) {
79
- config = _c12.loadConfig.call(void 0, {
76
+ config = await _c12.loadConfig.call(void 0, {
80
77
  cwd: workspacePath,
81
78
  packageJson: true,
82
79
  name: fileName,
83
80
  envName: _optionalChain([fileName, 'optionalAccess', _3 => _3.toUpperCase, 'call', _4 => _4()]),
84
81
  jitiOptions: {
85
82
  debug: false,
86
- cache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkQYOK2QJAcjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache", "storm")
83
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunk3RSRST47cjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "config")
87
84
  },
88
85
  configFile: fileName,
89
86
  ...options
@@ -92,12 +89,12 @@ var getConfigFileByName = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0,
92
89
  return config;
93
90
  }, "getConfigFileByName");
94
91
  var getConfigFile = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (filePath, additionalFileNames = []) => {
95
- const workspacePath = filePath ? filePath : _chunkQYOK2QJAcjs.findWorkspaceRoot.call(void 0, filePath);
92
+ const workspacePath = filePath ? filePath : _chunk3RSRST47cjs.findWorkspaceRoot.call(void 0, filePath);
96
93
  const result = await getConfigFileByName("storm", workspacePath);
97
94
  let config = result.config;
98
95
  const configFile = result.configFile;
99
96
  if (config && configFile && Object.keys(config).length > 0) {
100
- _chunkQYOK2QJAcjs.writeSystem.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
97
+ _chunk3RSRST47cjs.writeSystem.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
101
98
  logLevel: "all"
102
99
  });
103
100
  }
@@ -105,7 +102,7 @@ var getConfigFile = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
105
102
  const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
106
103
  for (const result2 of results) {
107
104
  if (_optionalChain([result2, 'optionalAccess', _5 => _5.config]) && _optionalChain([result2, 'optionalAccess', _6 => _6.configFile]) && Object.keys(result2.config).length > 0) {
108
- _chunkQYOK2QJAcjs.writeSystem.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
105
+ _chunk3RSRST47cjs.writeSystem.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
109
106
  logLevel: "all"
110
107
  });
111
108
  config = _defu2.default.call(void 0, _nullishCoalesce(result2.config, () => ( {})), _nullishCoalesce(config, () => ( {})));
@@ -142,15 +139,15 @@ var getConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, () => {
142
139
  licensing: process.env[`${prefix}LICENSING`] || void 0,
143
140
  timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
144
141
  locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
145
- configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunkQYOK2QJAcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
146
- workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkQYOK2QJAcjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
142
+ configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunk3RSRST47cjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
143
+ workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunk3RSRST47cjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
147
144
  directories: {
148
- cache: process.env[`${prefix}CACHE_DIR`] ? _chunkQYOK2QJAcjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
149
- data: process.env[`${prefix}DATA_DIR`] ? _chunkQYOK2QJAcjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
150
- config: process.env[`${prefix}CONFIG_DIR`] ? _chunkQYOK2QJAcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
151
- temp: process.env[`${prefix}TEMP_DIR`] ? _chunkQYOK2QJAcjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
152
- log: process.env[`${prefix}LOG_DIR`] ? _chunkQYOK2QJAcjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
153
- build: process.env[`${prefix}BUILD_DIR`] ? _chunkQYOK2QJAcjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : void 0
145
+ cache: process.env[`${prefix}CACHE_DIR`] ? _chunk3RSRST47cjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
146
+ data: process.env[`${prefix}DATA_DIR`] ? _chunk3RSRST47cjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
147
+ config: process.env[`${prefix}CONFIG_DIR`] ? _chunk3RSRST47cjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
148
+ temp: process.env[`${prefix}TEMP_DIR`] ? _chunk3RSRST47cjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
149
+ log: process.env[`${prefix}LOG_DIR`] ? _chunk3RSRST47cjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
150
+ build: process.env[`${prefix}BUILD_DIR`] ? _chunk3RSRST47cjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : void 0
154
151
  },
155
152
  skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
156
153
  env: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}ENV`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
@@ -173,23 +170,23 @@ var getConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, () => {
173
170
  cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
174
171
  container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
175
172
  },
176
- logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? _chunkQYOK2QJAcjs.getLogLevelLabel.call(void 0, Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0
173
+ logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? _chunk3RSRST47cjs.getLogLevelLabel.call(void 0, Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0
177
174
  };
178
- const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunkQYOK2QJAcjs.COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
175
+ const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunk3RSRST47cjs.COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
179
176
  config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
180
177
  ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
181
178
  return ret;
182
179
  }, {}) : getThemeColorConfigEnv(prefix);
183
- if (config.docs === _chunkQYOK2QJAcjs.STORM_DEFAULT_DOCS) {
184
- if (config.homepage === _chunkQYOK2QJAcjs.STORM_DEFAULT_HOMEPAGE) {
185
- config.docs = `${_chunkQYOK2QJAcjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
180
+ if (config.docs === _chunk3RSRST47cjs.STORM_DEFAULT_DOCS) {
181
+ if (config.homepage === _chunk3RSRST47cjs.STORM_DEFAULT_HOMEPAGE) {
182
+ config.docs = `${_chunk3RSRST47cjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
186
183
  } else {
187
184
  config.docs = `${config.homepage}/docs`;
188
185
  }
189
186
  }
190
- if (config.licensing === _chunkQYOK2QJAcjs.STORM_DEFAULT_LICENSING) {
191
- if (config.homepage === _chunkQYOK2QJAcjs.STORM_DEFAULT_HOMEPAGE) {
192
- config.licensing = `${_chunkQYOK2QJAcjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
187
+ if (config.licensing === _chunk3RSRST47cjs.STORM_DEFAULT_LICENSING) {
188
+ if (config.homepage === _chunk3RSRST47cjs.STORM_DEFAULT_HOMEPAGE) {
189
+ config.licensing = `${_chunk3RSRST47cjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
193
190
  } else {
194
191
  config.licensing = `${config.homepage}/docs`;
195
192
  }
@@ -327,31 +324,31 @@ var setConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config
327
324
  process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
328
325
  }
329
326
  if (config.configFile) {
330
- process.env[`${prefix}CONFIG_FILE`] = _chunkQYOK2QJAcjs.correctPaths.call(void 0, config.configFile);
327
+ process.env[`${prefix}CONFIG_FILE`] = _chunk3RSRST47cjs.correctPaths.call(void 0, config.configFile);
331
328
  }
332
329
  if (config.workspaceRoot) {
333
- process.env[`${prefix}WORKSPACE_ROOT`] = _chunkQYOK2QJAcjs.correctPaths.call(void 0, config.workspaceRoot);
334
- process.env.NX_WORKSPACE_ROOT = _chunkQYOK2QJAcjs.correctPaths.call(void 0, config.workspaceRoot);
335
- process.env.NX_WORKSPACE_ROOT_PATH = _chunkQYOK2QJAcjs.correctPaths.call(void 0, config.workspaceRoot);
330
+ process.env[`${prefix}WORKSPACE_ROOT`] = _chunk3RSRST47cjs.correctPaths.call(void 0, config.workspaceRoot);
331
+ process.env.NX_WORKSPACE_ROOT = _chunk3RSRST47cjs.correctPaths.call(void 0, config.workspaceRoot);
332
+ process.env.NX_WORKSPACE_ROOT_PATH = _chunk3RSRST47cjs.correctPaths.call(void 0, config.workspaceRoot);
336
333
  }
337
334
  if (config.directories) {
338
335
  if (!config.skipCache && config.directories.cache) {
339
- process.env[`${prefix}CACHE_DIR`] = _chunkQYOK2QJAcjs.correctPaths.call(void 0, config.directories.cache);
336
+ process.env[`${prefix}CACHE_DIR`] = _chunk3RSRST47cjs.correctPaths.call(void 0, config.directories.cache);
340
337
  }
341
338
  if (config.directories.data) {
342
- process.env[`${prefix}DATA_DIR`] = _chunkQYOK2QJAcjs.correctPaths.call(void 0, config.directories.data);
339
+ process.env[`${prefix}DATA_DIR`] = _chunk3RSRST47cjs.correctPaths.call(void 0, config.directories.data);
343
340
  }
344
341
  if (config.directories.config) {
345
- process.env[`${prefix}CONFIG_DIR`] = _chunkQYOK2QJAcjs.correctPaths.call(void 0, config.directories.config);
342
+ process.env[`${prefix}CONFIG_DIR`] = _chunk3RSRST47cjs.correctPaths.call(void 0, config.directories.config);
346
343
  }
347
344
  if (config.directories.temp) {
348
- process.env[`${prefix}TEMP_DIR`] = _chunkQYOK2QJAcjs.correctPaths.call(void 0, config.directories.temp);
345
+ process.env[`${prefix}TEMP_DIR`] = _chunk3RSRST47cjs.correctPaths.call(void 0, config.directories.temp);
349
346
  }
350
347
  if (config.directories.log) {
351
- process.env[`${prefix}LOG_DIR`] = _chunkQYOK2QJAcjs.correctPaths.call(void 0, config.directories.log);
348
+ process.env[`${prefix}LOG_DIR`] = _chunk3RSRST47cjs.correctPaths.call(void 0, config.directories.log);
352
349
  }
353
350
  if (config.directories.build) {
354
- process.env[`${prefix}BUILD_DIR`] = _chunkQYOK2QJAcjs.correctPaths.call(void 0, config.directories.build);
351
+ process.env[`${prefix}BUILD_DIR`] = _chunk3RSRST47cjs.correctPaths.call(void 0, config.directories.build);
355
352
  }
356
353
  }
357
354
  if (config.skipCache !== void 0) {
@@ -405,8 +402,8 @@ var setConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config
405
402
  if (config.logLevel) {
406
403
  process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
407
404
  process.env.LOG_LEVEL = String(config.logLevel);
408
- process.env.NX_VERBOSE_LOGGING = String(_chunkQYOK2QJAcjs.getLogLevel.call(void 0, config.logLevel) >= _chunkQYOK2QJAcjs.LogLevel.DEBUG ? true : false);
409
- process.env.RUST_BACKTRACE = _chunkQYOK2QJAcjs.getLogLevel.call(void 0, config.logLevel) >= _chunkQYOK2QJAcjs.LogLevel.DEBUG ? "full" : "none";
405
+ process.env.NX_VERBOSE_LOGGING = String(_chunk3RSRST47cjs.getLogLevel.call(void 0, config.logLevel) >= _chunk3RSRST47cjs.LogLevel.DEBUG ? true : false);
406
+ process.env.RUST_BACKTRACE = _chunk3RSRST47cjs.getLogLevel.call(void 0, config.logLevel) >= _chunk3RSRST47cjs.LogLevel.DEBUG ? "full" : "none";
410
407
  }
411
408
  process.env[`${prefix}CONFIG`] = JSON.stringify(config);
412
409
  for (const key of Object.keys(_nullishCoalesce(config.extensions, () => ( {})))) {
@@ -516,38 +513,41 @@ var _static_cache = void 0;
516
513
  var loadStormConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (workspaceRoot) => {
517
514
  let config = {};
518
515
  if (_optionalChain([_static_cache, 'optionalAccess', _29 => _29.data]) && _optionalChain([_static_cache, 'optionalAccess', _30 => _30.timestamp]) && _static_cache.timestamp >= Date.now() + 3e4) {
519
- _chunkQYOK2QJAcjs.writeTrace.call(void 0, `Configuration cache hit - ${_static_cache.timestamp}`, _static_cache.data);
516
+ _chunk3RSRST47cjs.writeTrace.call(void 0, `Configuration cache hit - ${_static_cache.timestamp}`, _static_cache.data);
520
517
  return _static_cache.data;
521
518
  }
522
519
  let _workspaceRoot = workspaceRoot;
523
520
  if (!_workspaceRoot) {
524
- _workspaceRoot = _chunkQYOK2QJAcjs.findWorkspaceRoot.call(void 0, );
521
+ _workspaceRoot = _chunk3RSRST47cjs.findWorkspaceRoot.call(void 0, );
525
522
  }
526
523
  const configFile = await getConfigFile(_workspaceRoot);
527
524
  if (!configFile) {
528
- _chunkQYOK2QJAcjs.writeWarning.call(void 0, "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", {
525
+ _chunk3RSRST47cjs.writeWarning.call(void 0, "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", {
529
526
  logLevel: "all"
530
527
  });
531
528
  }
532
- config = _defu2.default.call(void 0, getConfigEnv(), configFile, _chunkQYOK2QJAcjs.getDefaultConfig.call(void 0, _workspaceRoot));
529
+ config = _defu2.default.call(void 0, getConfigEnv(), configFile, _chunk3RSRST47cjs.getDefaultConfig.call(void 0, _workspaceRoot));
533
530
  setConfigEnv(config);
534
- _chunkQYOK2QJAcjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm configuration:
535
- ${_chunkQYOK2QJAcjs.formatLogMessage.call(void 0, config)}`, config);
531
+ _chunk3RSRST47cjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm configuration:
532
+ ${_chunk3RSRST47cjs.formatLogMessage.call(void 0, config)}`, config);
536
533
  return config;
537
534
  }, "loadStormConfig");
538
535
 
539
536
  // ../build-tools/src/utilities/read-nx-config.ts
537
+
538
+
540
539
  var readNxConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (workspaceRoot) => {
541
540
  let rootDir = workspaceRoot;
542
541
  if (!rootDir) {
543
542
  const config = await loadStormConfig();
544
543
  rootDir = config.workspaceRoot;
545
544
  }
546
- const nxJsonPath = _chunkQYOK2QJAcjs.joinPaths.call(void 0, rootDir, "nx.json");
547
- if (!await _node.hfs.isFile(nxJsonPath)) {
545
+ const nxJsonPath = _chunk3RSRST47cjs.joinPaths.call(void 0, rootDir, "nx.json");
546
+ if (!_fs.existsSync.call(void 0, nxJsonPath)) {
548
547
  throw new Error("Cannot find project.json configuration");
549
548
  }
550
- return _node.hfs.json(nxJsonPath);
549
+ const configContent = await _promises.readFile.call(void 0, nxJsonPath, "utf8");
550
+ return JSON.parse(configContent);
551
551
  }, "readNxConfig");
552
552
 
553
553
  // ../build-tools/src/utilities/copy-assets.ts
@@ -582,16 +582,14 @@ var copyAssets = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (co
582
582
  });
583
583
  }
584
584
  const nxJson = readNxConfig(config.workspaceRoot);
585
- const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
586
- exitOnError: true
587
- });
585
+ const projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
588
586
  const projectsConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
589
587
  if (!_optionalChain([projectsConfigurations, 'optionalAccess', _37 => _37.projects, 'optionalAccess', _38 => _38[projectName]])) {
590
588
  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.");
591
589
  }
592
- const buildTarget = _optionalChain([projectsConfigurations, 'access', _39 => _39.projects, 'access', _40 => _40[projectName], 'optionalAccess', _41 => _41.targets, 'optionalAccess', _42 => _42.build]);
590
+ const buildTarget = _optionalChain([projectsConfigurations, 'access', _39 => _39.projects, 'access', _40 => _40[projectName], 'access', _41 => _41.targets, 'optionalAccess', _42 => _42.build]);
593
591
  if (!buildTarget) {
594
- 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 ${_chunkQYOK2QJAcjs.joinPaths.call(void 0, projectRoot, "project.json")}`);
592
+ 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 ${_chunk3RSRST47cjs.joinPaths.call(void 0, projectRoot, "project.json")}`);
595
593
  }
596
594
  const result = await _js.copyAssets.call(void 0, {
597
595
  assets,
@@ -606,55 +604,43 @@ var copyAssets = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (co
606
604
  projectsConfigurations,
607
605
  nxJsonConfiguration: nxJson,
608
606
  cwd: config.workspaceRoot,
609
- isVerbose: _chunkQYOK2QJAcjs.isVerbose.call(void 0, config.logLevel)
607
+ isVerbose: _chunk3RSRST47cjs.isVerbose.call(void 0, config.logLevel)
610
608
  });
611
609
  if (!result.success) {
612
610
  throw new Error("The Build process failed trying to copy assets");
613
611
  }
614
612
  if (includeSrc === true) {
615
- _chunkQYOK2QJAcjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkQYOK2QJAcjs.joinPaths.call(void 0, outputPath, "src")}`, config);
613
+ _chunk3RSRST47cjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunk3RSRST47cjs.joinPaths.call(void 0, outputPath, "src")}`, config);
616
614
  const files = await _glob.glob.call(void 0, [
617
- _chunkQYOK2QJAcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
618
- _chunkQYOK2QJAcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
619
- _chunkQYOK2QJAcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
620
- _chunkQYOK2QJAcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
615
+ _chunk3RSRST47cjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
616
+ _chunk3RSRST47cjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
617
+ _chunk3RSRST47cjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
618
+ _chunk3RSRST47cjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
621
619
  ]);
622
- await Promise.allSettled(files.map(async (file) => _node.hfs.write(file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
620
+ await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
623
621
 
624
- ${await _node.hfs.text(file)}
622
+ ${await _promises.readFile.call(void 0, file, "utf8")}
625
623
 
626
624
  ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`)));
627
625
  }
628
626
  }, "copyAssets");
629
627
 
630
628
  // ../build-tools/src/utilities/generate-package-json.ts
631
-
632
629
  var _buildablelibsutils = require('@nx/js/src/utils/buildable-libs-utils');
633
630
 
631
+
632
+
634
633
  var _projectgraph = require('nx/src/project-graph/project-graph');
635
634
  var addPackageDependencies = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (workspaceRoot, projectRoot, projectName, packageJson) => {
636
- const projectGraph = await _projectgraph.createProjectGraphAsync.call(void 0, {
637
- exitOnError: true
638
- });
639
- const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
640
- if (!_optionalChain([projectConfigurations, 'optionalAccess', _43 => _43.projects, 'optionalAccess', _44 => _44[projectName]])) {
641
- 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.");
642
- }
643
- const projectJsonPath = _chunkQYOK2QJAcjs.joinPaths.call(void 0, workspaceRoot, projectRoot, "project.json");
644
- if (!await _node.hfs.isFile(projectJsonPath)) {
645
- throw new Error("Cannot find project.json configuration");
646
- }
647
- if (!_optionalChain([projectConfigurations, 'optionalAccess', _45 => _45.projects, 'optionalAccess', _46 => _46[projectName]])) {
648
- 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.");
649
- }
650
- const projectDependencies = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, projectGraph, workspaceRoot, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
635
+ const projectDependencies = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, _projectgraph.readCachedProjectGraph.call(void 0, ), workspaceRoot, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
651
636
  const localPackages = [];
652
637
  for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot)) {
653
638
  const projectNode = project.node;
654
639
  if (projectNode.data.root) {
655
- const projectPackageJsonPath = _chunkQYOK2QJAcjs.joinPaths.call(void 0, workspaceRoot, projectNode.data.root, "package.json");
656
- if (await _node.hfs.isFile(projectPackageJsonPath)) {
657
- const projectPackageJson = await _node.hfs.json(projectPackageJsonPath);
640
+ const projectPackageJsonPath = _chunk3RSRST47cjs.joinPaths.call(void 0, workspaceRoot, projectNode.data.root, "package.json");
641
+ if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
642
+ const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
643
+ const projectPackageJson = JSON.parse(projectPackageJsonContent);
658
644
  if (projectPackageJson.private !== false) {
659
645
  localPackages.push(projectPackageJson);
660
646
  }
@@ -662,7 +648,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void
662
648
  }
663
649
  }
664
650
  if (localPackages.length > 0) {
665
- _chunkQYOK2QJAcjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
651
+ _chunk3RSRST47cjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
666
652
  packageJson.peerDependencies = localPackages.reduce((ret, localPackage) => {
667
653
  if (!ret[localPackage.name]) {
668
654
  ret[localPackage.name] = `>=${localPackage.version || "0.0.1"}`;
@@ -684,13 +670,14 @@ var addPackageDependencies = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void
684
670
  return ret;
685
671
  }, _nullishCoalesce(packageJson.peerDependencies, () => ( {})));
686
672
  } else {
687
- _chunkQYOK2QJAcjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
673
+ _chunk3RSRST47cjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
688
674
  }
689
675
  return packageJson;
690
676
  }, "addPackageDependencies");
691
677
  var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
692
- const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunkQYOK2QJAcjs.findWorkspaceRoot.call(void 0, );
693
- const workspacePackageJson = await _node.hfs.json(_chunkQYOK2QJAcjs.joinPaths.call(void 0, workspaceRoot, "package.json"));
678
+ const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunk3RSRST47cjs.findWorkspaceRoot.call(void 0, );
679
+ const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunk3RSRST47cjs.joinPaths.call(void 0, workspaceRoot, "package.json"), "utf8");
680
+ const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
694
681
  packageJson.type ??= "module";
695
682
  packageJson.sideEffects ??= false;
696
683
  if (includeSrc === true) {
@@ -698,7 +685,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.cal
698
685
  if (distSrc.startsWith("/")) {
699
686
  distSrc = distSrc.substring(1);
700
687
  }
701
- packageJson.source ??= `${_chunkQYOK2QJAcjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
688
+ packageJson.source ??= `${_chunk3RSRST47cjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
702
689
  }
703
690
  packageJson.files ??= [
704
691
  "dist/**/*"
@@ -729,7 +716,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.cal
729
716
  ];
730
717
  }
731
718
  packageJson.repository ??= workspacePackageJson.repository;
732
- packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkQYOK2QJAcjs.joinPaths.call(void 0, "packages", projectName);
719
+ packageJson.repository.directory ??= projectRoot ? projectRoot : _chunk3RSRST47cjs.joinPaths.call(void 0, "packages", projectName);
733
720
  return packageJson;
734
721
  }, "addWorkspacePackageJsonFields");
735
722
  var addPackageJsonExport = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (file, type = "module", sourceRoot) => {
@@ -756,7 +743,7 @@ var addPackageJsonExport = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0,
756
743
  // ../build-tools/src/utilities/get-entry-points.ts
757
744
 
758
745
  var getEntryPoints = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
759
- const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunkQYOK2QJAcjs.findWorkspaceRoot.call(void 0, );
746
+ const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunk3RSRST47cjs.findWorkspaceRoot.call(void 0, );
760
747
  const entryPoints = [];
761
748
  if (entry) {
762
749
  if (Array.isArray(entry)) {
@@ -768,7 +755,7 @@ var getEntryPoints = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
768
755
  }
769
756
  }
770
757
  if (emitOnAll) {
771
- entryPoints.push(_chunkQYOK2QJAcjs.joinPaths.call(void 0, workspaceRoot, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
758
+ entryPoints.push(_chunk3RSRST47cjs.joinPaths.call(void 0, workspaceRoot, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
772
759
  }
773
760
  const results = [];
774
761
  for (const entryPoint in entryPoints) {
@@ -777,9 +764,9 @@ var getEntryPoints = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
777
764
  withFileTypes: true
778
765
  });
779
766
  results.push(...files.reduce((ret, filePath) => {
780
- const result = _chunkQYOK2QJAcjs.correctPaths.call(void 0, _chunkQYOK2QJAcjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkQYOK2QJAcjs.correctPaths.call(void 0, workspaceRoot), "").replaceAll(_chunkQYOK2QJAcjs.correctPaths.call(void 0, projectRoot), ""));
767
+ const result = _chunk3RSRST47cjs.correctPaths.call(void 0, _chunk3RSRST47cjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunk3RSRST47cjs.correctPaths.call(void 0, workspaceRoot), "").replaceAll(_chunk3RSRST47cjs.correctPaths.call(void 0, projectRoot), ""));
781
768
  if (result) {
782
- _chunkQYOK2QJAcjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkQYOK2QJAcjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
769
+ _chunk3RSRST47cjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunk3RSRST47cjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
783
770
  if (!results.includes(result)) {
784
771
  results.push(result);
785
772
  }
@@ -821,25 +808,25 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
821
808
  throw new Error("Cannot find Nx workspace root");
822
809
  }
823
810
  const config = await loadStormConfig(workspaceRoot.dir);
824
- _chunkQYOK2QJAcjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
825
- const stopwatch = _chunkQYOK2QJAcjs.getStopwatch.call(void 0, "Build options resolution");
811
+ _chunk3RSRST47cjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
812
+ const stopwatch = _chunk3RSRST47cjs.getStopwatch.call(void 0, "Build options resolution");
826
813
  const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
827
814
  exitOnError: true
828
815
  });
829
- const projectJsonPath = _chunkQYOK2QJAcjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "project.json");
816
+ const projectJsonPath = _chunk3RSRST47cjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "project.json");
830
817
  if (!await _node.hfs.isFile(projectJsonPath)) {
831
818
  throw new Error("Cannot find project.json configuration");
832
819
  }
833
820
  const projectJson = await _node.hfs.json(projectJsonPath);
834
821
  const projectName = projectJson.name;
835
822
  const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
836
- if (!_optionalChain([projectConfigurations, 'optionalAccess', _47 => _47.projects, 'optionalAccess', _48 => _48[projectName]])) {
823
+ if (!_optionalChain([projectConfigurations, 'optionalAccess', _43 => _43.projects, 'optionalAccess', _44 => _44[projectName]])) {
837
824
  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.");
838
825
  }
839
826
  const options = _defu2.default.call(void 0, userOptions, _chunk5KRF6IVWcjs.DEFAULT_BUILD_OPTIONS);
840
827
  options.name ??= `${projectName}-${options.format}`;
841
828
  options.target ??= DEFAULT_TARGET;
842
- const packageJsonPath = _chunkQYOK2QJAcjs.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
829
+ const packageJsonPath = _chunk3RSRST47cjs.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
843
830
  if (!await _node.hfs.isFile(packageJsonPath)) {
844
831
  throw new Error("Cannot find package.json configuration");
845
832
  }
@@ -848,20 +835,20 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
848
835
  ...options,
849
836
  config,
850
837
  ...userOptions,
851
- tsconfig: _chunkQYOK2QJAcjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
838
+ tsconfig: _chunk3RSRST47cjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
852
839
  format: options.format || "cjs",
853
840
  entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
854
841
  "./src/index.ts"
855
842
  ], userOptions.emitOnAll),
856
- outdir: userOptions.outputPath || _chunkQYOK2QJAcjs.joinPaths.call(void 0, "dist", projectRoot),
843
+ outdir: userOptions.outputPath || _chunk3RSRST47cjs.joinPaths.call(void 0, "dist", projectRoot),
857
844
  plugins: [],
858
845
  name: userOptions.name || projectName,
859
846
  projectConfigurations,
860
847
  projectName,
861
848
  projectGraph,
862
- sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkQYOK2QJAcjs.joinPaths.call(void 0, projectRoot, "src"),
849
+ sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunk3RSRST47cjs.joinPaths.call(void 0, projectRoot, "src"),
863
850
  minify: userOptions.minify || !userOptions.debug,
864
- verbose: userOptions.verbose || _chunkQYOK2QJAcjs.isVerbose.call(void 0, ) || userOptions.debug === true,
851
+ verbose: userOptions.verbose || _chunk3RSRST47cjs.isVerbose.call(void 0, ) || userOptions.debug === true,
865
852
  includeSrc: userOptions.includeSrc === true,
866
853
  metafile: userOptions.metafile !== false,
867
854
  generatePackageJson: userOptions.generatePackageJson !== false,
@@ -895,14 +882,14 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
895
882
  return result;
896
883
  }, "resolveOptions");
897
884
  async function generatePackageJson(options) {
898
- if (options.generatePackageJson !== false && await _node.hfs.isFile(_chunkQYOK2QJAcjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
899
- _chunkQYOK2QJAcjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
900
- const stopwatch = _chunkQYOK2QJAcjs.getStopwatch.call(void 0, "Write package.json file");
901
- const packageJsonPath = _chunkQYOK2QJAcjs.joinPaths.call(void 0, options.projectRoot, "project.json");
885
+ if (options.generatePackageJson !== false && await _node.hfs.isFile(_chunk3RSRST47cjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
886
+ _chunk3RSRST47cjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
887
+ const stopwatch = _chunk3RSRST47cjs.getStopwatch.call(void 0, "Write package.json file");
888
+ const packageJsonPath = _chunk3RSRST47cjs.joinPaths.call(void 0, options.projectRoot, "project.json");
902
889
  if (!await _node.hfs.isFile(packageJsonPath)) {
903
890
  throw new Error("Cannot find package.json configuration");
904
891
  }
905
- let packageJson = await _node.hfs.json(_chunkQYOK2QJAcjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"));
892
+ let packageJson = await _node.hfs.json(_chunk3RSRST47cjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"));
906
893
  if (!packageJson) {
907
894
  throw new Error("Cannot find package.json configuration file");
908
895
  }
@@ -940,15 +927,15 @@ async function generatePackageJson(options) {
940
927
  }
941
928
  return ret;
942
929
  }, packageJson.exports);
943
- await _devkit.writeJsonFile.call(void 0, _chunkQYOK2QJAcjs.joinPaths.call(void 0, options.outdir, "package.json"), packageJson);
930
+ await _devkit.writeJsonFile.call(void 0, _chunk3RSRST47cjs.joinPaths.call(void 0, options.outdir, "package.json"), packageJson);
944
931
  stopwatch();
945
932
  }
946
933
  return options;
947
934
  }
948
935
  _chunkUSNT2KNTcjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
949
936
  async function executeTSDown(options) {
950
- _chunkQYOK2QJAcjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.config);
951
- const stopwatch = _chunkQYOK2QJAcjs.getStopwatch.call(void 0, `${options.name} build`);
937
+ _chunk3RSRST47cjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.config);
938
+ const stopwatch = _chunk3RSRST47cjs.getStopwatch.call(void 0, `${options.name} build`);
952
939
  await _tsdown.build.call(void 0, {
953
940
  ...options,
954
941
  entry: options.entryPoints,
@@ -960,27 +947,27 @@ async function executeTSDown(options) {
960
947
  }
961
948
  _chunkUSNT2KNTcjs.__name.call(void 0, executeTSDown, "executeTSDown");
962
949
  async function copyBuildAssets(options) {
963
- _chunkQYOK2QJAcjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
964
- const stopwatch = _chunkQYOK2QJAcjs.getStopwatch.call(void 0, `${options.name} asset copy`);
950
+ _chunk3RSRST47cjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
951
+ const stopwatch = _chunk3RSRST47cjs.getStopwatch.call(void 0, `${options.name} asset copy`);
965
952
  await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outdir, options.projectRoot, options.projectName, options.sourceRoot, true, false);
966
953
  stopwatch();
967
954
  return options;
968
955
  }
969
956
  _chunkUSNT2KNTcjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
970
957
  async function reportResults(options) {
971
- _chunkQYOK2QJAcjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${options.name} build completed successfully`, options.config);
958
+ _chunk3RSRST47cjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${options.name} build completed successfully`, options.config);
972
959
  }
973
960
  _chunkUSNT2KNTcjs.__name.call(void 0, reportResults, "reportResults");
974
961
  async function cleanOutputPath(options) {
975
962
  if (options.clean !== false && options.outdir) {
976
- await _chunkQYOK2QJAcjs.clean.call(void 0, options.name, options.outdir, options.config);
963
+ await _chunk3RSRST47cjs.clean.call(void 0, options.name, options.outdir, options.config);
977
964
  }
978
965
  return options;
979
966
  }
980
967
  _chunkUSNT2KNTcjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
981
968
  async function build(options) {
982
- _chunkQYOK2QJAcjs.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
983
- const stopwatch = _chunkQYOK2QJAcjs.getStopwatch.call(void 0, "TSDown pipeline");
969
+ _chunk3RSRST47cjs.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
970
+ const stopwatch = _chunk3RSRST47cjs.getStopwatch.call(void 0, "TSDown pipeline");
984
971
  try {
985
972
  const opts = Array.isArray(options) ? options : [
986
973
  options
@@ -998,11 +985,11 @@ async function build(options) {
998
985
  await reportResults(opt);
999
986
  }));
1000
987
  } else {
1001
- _chunkQYOK2QJAcjs.writeWarning.call(void 0, " \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function.");
988
+ _chunk3RSRST47cjs.writeWarning.call(void 0, " \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function.");
1002
989
  }
1003
- _chunkQYOK2QJAcjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
990
+ _chunk3RSRST47cjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
1004
991
  } catch (error) {
1005
- _chunkQYOK2QJAcjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
992
+ _chunk3RSRST47cjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
1006
993
  throw error;
1007
994
  } finally {
1008
995
  stopwatch();
@@ -20,7 +20,7 @@ import {
20
20
  writeSystem,
21
21
  writeTrace,
22
22
  writeWarning
23
- } from "./chunk-D42RFSA4.js";
23
+ } from "./chunk-4WO7ZRQL.js";
24
24
  import {
25
25
  DEFAULT_BUILD_OPTIONS
26
26
  } from "./chunk-UQLCBJOS.js";
@@ -29,8 +29,8 @@ import {
29
29
  } from "./chunk-SHUYVCID.js";
30
30
 
31
31
  // src/build.ts
32
- import { hfs as hfs4 } from "@humanfs/node";
33
- import { createProjectGraphAsync as createProjectGraphAsync3, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph3, writeJsonFile } from "@nx/devkit";
32
+ import { hfs } from "@humanfs/node";
33
+ import { createProjectGraphAsync, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph2, writeJsonFile } from "@nx/devkit";
34
34
 
35
35
  // ../build-tools/src/config.ts
36
36
  var DEFAULT_ENVIRONMENT = "production";
@@ -51,39 +51,36 @@ import { stripIndents } from "@nx/devkit";
51
51
  import { relative } from "path";
52
52
 
53
53
  // ../build-tools/src/utilities/copy-assets.ts
54
- import { hfs as hfs2 } from "@humanfs/node";
55
- import { createProjectGraphAsync, readProjectsConfigurationFromProjectGraph } from "@nx/devkit";
54
+ import { readCachedProjectGraph, readProjectsConfigurationFromProjectGraph } from "@nx/devkit";
56
55
  import { copyAssets as copyAssetsBase } from "@nx/js";
57
56
  import { glob } from "glob";
58
-
59
- // ../build-tools/src/utilities/read-nx-config.ts
60
- import { hfs } from "@humanfs/node";
57
+ import { readFile as readFile2, writeFile } from "node:fs/promises";
61
58
 
62
59
  // ../config-tools/src/config-file/get-config-file.ts
63
60
  import { loadConfig } from "c12";
64
61
  import defu from "defu";
65
62
  var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, options = {}) => {
66
63
  const workspacePath = filePath || findWorkspaceRoot(filePath);
67
- let config = loadConfig({
64
+ let config = await loadConfig({
68
65
  cwd: workspacePath,
69
66
  packageJson: true,
70
67
  name: fileName,
71
68
  envName: fileName?.toUpperCase(),
72
69
  jitiOptions: {
73
70
  debug: false,
74
- cache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache", "storm")
71
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "config")
75
72
  },
76
73
  ...options
77
74
  });
78
75
  if (!config || Object.keys(config).length === 0) {
79
- config = loadConfig({
76
+ config = await loadConfig({
80
77
  cwd: workspacePath,
81
78
  packageJson: true,
82
79
  name: fileName,
83
80
  envName: fileName?.toUpperCase(),
84
81
  jitiOptions: {
85
82
  debug: false,
86
- cache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache", "storm")
83
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "config")
87
84
  },
88
85
  configFile: fileName,
89
86
  ...options
@@ -537,6 +534,8 @@ ${formatLogMessage(config)}`, config);
537
534
  }, "loadStormConfig");
538
535
 
539
536
  // ../build-tools/src/utilities/read-nx-config.ts
537
+ import { existsSync } from "node:fs";
538
+ import { readFile } from "node:fs/promises";
540
539
  var readNxConfig = /* @__PURE__ */ __name(async (workspaceRoot) => {
541
540
  let rootDir = workspaceRoot;
542
541
  if (!rootDir) {
@@ -544,10 +543,11 @@ var readNxConfig = /* @__PURE__ */ __name(async (workspaceRoot) => {
544
543
  rootDir = config.workspaceRoot;
545
544
  }
546
545
  const nxJsonPath = joinPaths(rootDir, "nx.json");
547
- if (!await hfs.isFile(nxJsonPath)) {
546
+ if (!existsSync(nxJsonPath)) {
548
547
  throw new Error("Cannot find project.json configuration");
549
548
  }
550
- return hfs.json(nxJsonPath);
549
+ const configContent = await readFile(nxJsonPath, "utf8");
550
+ return JSON.parse(configContent);
551
551
  }, "readNxConfig");
552
552
 
553
553
  // ../build-tools/src/utilities/copy-assets.ts
@@ -582,14 +582,12 @@ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, proje
582
582
  });
583
583
  }
584
584
  const nxJson = readNxConfig(config.workspaceRoot);
585
- const projectGraph = await createProjectGraphAsync({
586
- exitOnError: true
587
- });
585
+ const projectGraph = readCachedProjectGraph();
588
586
  const projectsConfigurations = readProjectsConfigurationFromProjectGraph(projectGraph);
589
587
  if (!projectsConfigurations?.projects?.[projectName]) {
590
588
  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.");
591
589
  }
592
- const buildTarget = projectsConfigurations.projects[projectName]?.targets?.build;
590
+ const buildTarget = projectsConfigurations.projects[projectName].targets?.build;
593
591
  if (!buildTarget) {
594
592
  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")}`);
595
593
  }
@@ -619,42 +617,30 @@ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, proje
619
617
  joinPaths(config.workspaceRoot, outputPath, "src/**/*.js"),
620
618
  joinPaths(config.workspaceRoot, outputPath, "src/**/*.jsx")
621
619
  ]);
622
- await Promise.allSettled(files.map(async (file) => hfs2.write(file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
620
+ await Promise.allSettled(files.map(async (file) => writeFile(file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
623
621
 
624
- ${await hfs2.text(file)}
622
+ ${await readFile2(file, "utf8")}
625
623
 
626
624
  ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`)));
627
625
  }
628
626
  }, "copyAssets");
629
627
 
630
628
  // ../build-tools/src/utilities/generate-package-json.ts
631
- import { hfs as hfs3 } from "@humanfs/node";
632
629
  import { calculateProjectBuildableDependencies } from "@nx/js/src/utils/buildable-libs-utils";
633
630
  import { Glob } from "glob";
634
- import { createProjectGraphAsync as createProjectGraphAsync2, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph2 } from "nx/src/project-graph/project-graph";
631
+ import { existsSync as existsSync2 } from "node:fs";
632
+ import { readFile as readFile3 } from "node:fs/promises";
633
+ import { readCachedProjectGraph as readCachedProjectGraph2 } from "nx/src/project-graph/project-graph";
635
634
  var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot, projectRoot, projectName, packageJson) => {
636
- const projectGraph = await createProjectGraphAsync2({
637
- exitOnError: true
638
- });
639
- const projectConfigurations = readProjectsConfigurationFromProjectGraph2(projectGraph);
640
- if (!projectConfigurations?.projects?.[projectName]) {
641
- 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.");
642
- }
643
- const projectJsonPath = joinPaths(workspaceRoot, projectRoot, "project.json");
644
- if (!await hfs3.isFile(projectJsonPath)) {
645
- throw new Error("Cannot find project.json configuration");
646
- }
647
- if (!projectConfigurations?.projects?.[projectName]) {
648
- 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.");
649
- }
650
- const projectDependencies = calculateProjectBuildableDependencies(void 0, projectGraph, workspaceRoot, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
635
+ const projectDependencies = calculateProjectBuildableDependencies(void 0, readCachedProjectGraph2(), workspaceRoot, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
651
636
  const localPackages = [];
652
637
  for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot)) {
653
638
  const projectNode = project.node;
654
639
  if (projectNode.data.root) {
655
640
  const projectPackageJsonPath = joinPaths(workspaceRoot, projectNode.data.root, "package.json");
656
- if (await hfs3.isFile(projectPackageJsonPath)) {
657
- const projectPackageJson = await hfs3.json(projectPackageJsonPath);
641
+ if (existsSync2(projectPackageJsonPath)) {
642
+ const projectPackageJsonContent = await readFile3(projectPackageJsonPath, "utf8");
643
+ const projectPackageJson = JSON.parse(projectPackageJsonContent);
658
644
  if (projectPackageJson.private !== false) {
659
645
  localPackages.push(projectPackageJson);
660
646
  }
@@ -690,7 +676,8 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot, projec
690
676
  }, "addPackageDependencies");
691
677
  var addWorkspacePackageJsonFields = /* @__PURE__ */ __name(async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
692
678
  const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : findWorkspaceRoot();
693
- const workspacePackageJson = await hfs3.json(joinPaths(workspaceRoot, "package.json"));
679
+ const workspacePackageJsonContent = await readFile3(joinPaths(workspaceRoot, "package.json"), "utf8");
680
+ const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
694
681
  packageJson.type ??= "module";
695
682
  packageJson.sideEffects ??= false;
696
683
  if (includeSrc === true) {
@@ -823,16 +810,16 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
823
810
  const config = await loadStormConfig(workspaceRoot.dir);
824
811
  writeDebug(" \u2699\uFE0F Resolving build options", config);
825
812
  const stopwatch = getStopwatch("Build options resolution");
826
- const projectGraph = await createProjectGraphAsync3({
813
+ const projectGraph = await createProjectGraphAsync({
827
814
  exitOnError: true
828
815
  });
829
816
  const projectJsonPath = joinPaths(workspaceRoot.dir, projectRoot, "project.json");
830
- if (!await hfs4.isFile(projectJsonPath)) {
817
+ if (!await hfs.isFile(projectJsonPath)) {
831
818
  throw new Error("Cannot find project.json configuration");
832
819
  }
833
- const projectJson = await hfs4.json(projectJsonPath);
820
+ const projectJson = await hfs.json(projectJsonPath);
834
821
  const projectName = projectJson.name;
835
- const projectConfigurations = readProjectsConfigurationFromProjectGraph3(projectGraph);
822
+ const projectConfigurations = readProjectsConfigurationFromProjectGraph2(projectGraph);
836
823
  if (!projectConfigurations?.projects?.[projectName]) {
837
824
  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.");
838
825
  }
@@ -840,7 +827,7 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
840
827
  options.name ??= `${projectName}-${options.format}`;
841
828
  options.target ??= DEFAULT_TARGET;
842
829
  const packageJsonPath = joinPaths(workspaceRoot.dir, options.projectRoot, "package.json");
843
- if (!await hfs4.isFile(packageJsonPath)) {
830
+ if (!await hfs.isFile(packageJsonPath)) {
844
831
  throw new Error("Cannot find package.json configuration");
845
832
  }
846
833
  const env = getEnv("tsdown", options);
@@ -895,14 +882,14 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
895
882
  return result;
896
883
  }, "resolveOptions");
897
884
  async function generatePackageJson(options) {
898
- if (options.generatePackageJson !== false && await hfs4.isFile(joinPaths(options.projectRoot, "package.json"))) {
885
+ if (options.generatePackageJson !== false && await hfs.isFile(joinPaths(options.projectRoot, "package.json"))) {
899
886
  writeDebug(" \u270D\uFE0F Writing package.json file", options.config);
900
887
  const stopwatch = getStopwatch("Write package.json file");
901
888
  const packageJsonPath = joinPaths(options.projectRoot, "project.json");
902
- if (!await hfs4.isFile(packageJsonPath)) {
889
+ if (!await hfs.isFile(packageJsonPath)) {
903
890
  throw new Error("Cannot find package.json configuration");
904
891
  }
905
- let packageJson = await hfs4.json(joinPaths(options.config.workspaceRoot, options.projectRoot, "package.json"));
892
+ let packageJson = await hfs.json(joinPaths(options.config.workspaceRoot, options.projectRoot, "package.json"));
906
893
  if (!packageJson) {
907
894
  throw new Error("Cannot find package.json configuration file");
908
895
  }
package/dist/clean.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkQYOK2QJAcjs = require('./chunk-QYOK2QJA.cjs');
3
+ var _chunk3RSRST47cjs = require('./chunk-3RSRST47.cjs');
4
4
  require('./chunk-USNT2KNT.cjs');
5
5
 
6
6
 
7
- exports.clean = _chunkQYOK2QJAcjs.clean;
7
+ exports.clean = _chunk3RSRST47cjs.clean;
package/dist/clean.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  clean
3
- } from "./chunk-D42RFSA4.js";
3
+ } from "./chunk-4WO7ZRQL.js";
4
4
  import "./chunk-SHUYVCID.js";
5
5
  export {
6
6
  clean
package/dist/index.cjs CHANGED
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkTEQW7DKTcjs = require('./chunk-TEQW7DKT.cjs');
3
+ var _chunkBJNWAMXYcjs = require('./chunk-BJNWAMXY.cjs');
4
4
 
5
5
 
6
- var _chunkQYOK2QJAcjs = require('./chunk-QYOK2QJA.cjs');
6
+ var _chunk3RSRST47cjs = require('./chunk-3RSRST47.cjs');
7
7
 
8
8
 
9
9
  var _chunk5KRF6IVWcjs = require('./chunk-5KRF6IVW.cjs');
@@ -13,4 +13,4 @@ require('./chunk-SFZRYJZ2.cjs');
13
13
 
14
14
 
15
15
 
16
- exports.DEFAULT_BUILD_OPTIONS = _chunk5KRF6IVWcjs.DEFAULT_BUILD_OPTIONS; exports.build = _chunkTEQW7DKTcjs.build; exports.clean = _chunkQYOK2QJAcjs.clean;
16
+ exports.DEFAULT_BUILD_OPTIONS = _chunk5KRF6IVWcjs.DEFAULT_BUILD_OPTIONS; exports.build = _chunkBJNWAMXYcjs.build; exports.clean = _chunk3RSRST47cjs.clean;
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  build
3
- } from "./chunk-6NMTPFXQ.js";
3
+ } from "./chunk-D5OWREKY.js";
4
4
  import {
5
5
  clean
6
- } from "./chunk-D42RFSA4.js";
6
+ } from "./chunk-4WO7ZRQL.js";
7
7
  import {
8
8
  DEFAULT_BUILD_OPTIONS
9
9
  } from "./chunk-UQLCBJOS.js";
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@storm-software/tsdown","version":"0.18.4","type":"module","description":"A package containing `tsdown` utilities for building Storm Software libraries and applications","repository":{"type":"github","url":"https://github.com/storm-software/storm-ops.git","directory":"packages/tsdown"},"homepage":"https://stormsoftware.com","bugs":"https://github.com/storm-software/storm-ops/issues","author":{"name":"Storm Software","email":"contact@stormsoftware.com","url":"https://stormsoftware.com"},"maintainers":[{"name":"Storm Software","email":"contact@stormsoftware.com","url":"https://stormsoftware.com"},{"name":"Pat Sullivan","email":"admin@stormsoftware.com","url":"https://patsullivan.org"}],"contributors":[{"name":"Storm Software","email":"contact@stormsoftware.com","url":"https://stormsoftware.com"}],"funding":{"type":"github","url":"https://github.com/sponsors/storm-software"},"license":"Apache-2.0","private":false,"packageManager":"pnpm@9.15.2","engines":{"node":">=22.4.0","pnpm":">=9.15.2"},"bin":{"storm-tsdown":"./bin/storm-tsdown.js","storm-tsdown-cjs":"./bin/storm-tsdown.cjs","storm-tsdown-esm":"./bin/storm-tsdown.js"},"main":"./dist/index.cjs","module":"./dist/index.js","exports":{"./package.json":"./package.json","./types":{"import":{"types":"./dist/types.d.ts","default":"./dist/types.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/types.cjs"},"default":{"types":"./dist/types.d.ts","default":"./dist/types.js"}},"./index":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"},"default":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"},"default":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"./config":{"import":{"types":"./dist/config.d.ts","default":"./dist/config.js"},"require":{"types":"./dist/config.d.cts","default":"./dist/config.cjs"},"default":{"types":"./dist/config.d.ts","default":"./dist/config.js"}},"./clean":{"import":{"types":"./dist/clean.d.ts","default":"./dist/clean.js"},"require":{"types":"./dist/clean.d.cts","default":"./dist/clean.cjs"},"default":{"types":"./dist/clean.d.ts","default":"./dist/clean.js"}},"./build":{"import":{"types":"./dist/build/index.d.ts","default":"./dist/build/index.js"},"require":{"types":"./dist/build/index.d.cts","default":"./dist/build/index.cjs"},"default":{"types":"./dist/build/index.d.ts","default":"./dist/build/index.js"}},"./plugins/*":{"import":{"types":"./dist/plugins/*.d.ts","default":"./dist/plugins/*.js"},"require":{"types":"./dist/plugins/*.d.cts","default":"./dist/plugins/*.cjs"},"default":{"types":"./dist/plugins/*.d.ts","default":"./dist/plugins/*.js"}}},"types":"./dist/index.d.ts","files":["dist/**/*"],"keywords":["acidic","cyclone-ui","tsdown","monorepo","storm","storm-ops","storm-stack","sullivanpj"],"peerDependencies":{"@microsoft/api-extractor":"^7.48.1","@nx/devkit":"^20.3.1","@nx/js":"^20.3.1","@storm-software/build-tools":"workspace:*","@storm-software/config-tools":"workspace:*","spdx-exceptions":"^2.5.0","spdx-license-ids":"^3.0.20","tsdown":"0.5.3"},"peerDependenciesMeta":{"@microsoft/api-extractor":{"optional":true},"@nx/devkit":{"optional":false},"@nx/js":{"optional":false},"@storm-software/build-tools":{"optional":false},"@storm-software/config-tools":{"optional":false},"spdx-exceptions":{"optional":true},"spdx-license-ids":{"optional":true},"tsdown":{"optional":false}},"dependencies":{"@humanfs/node":"^0.16.6","chokidar":"^4.0.3","commander":"^12.1.0","es-toolkit":"^1.30.1","globby":"^14.0.2","nx":"^20.3.1","rolldown":"1.0.0-beta.1","source-map":"0.7.4","tsup":"8.3.5"},"devDependencies":{"@microsoft/api-extractor":"^7.48.1","@nx/devkit":"^20.3.1","@nx/js":"^20.3.1","@storm-software/build-tools":"0.125.4","@storm-software/config":"1.94.4","@storm-software/config-tools":"1.133.4","@types/node":"^22.10.2","defu":"6.1.4","rollup":"4.29.1","spdx-exceptions":"^2.5.0","spdx-license-ids":"^3.0.20","tsdown":"0.5.3"},"publishConfig":{"access":"public"},"sideEffects":false}
1
+ {"name":"@storm-software/tsdown","version":"0.20.0","type":"module","description":"A package containing `tsdown` utilities for building Storm Software libraries and applications","repository":{"type":"github","url":"https://github.com/storm-software/storm-ops.git","directory":"packages/tsdown"},"homepage":"https://stormsoftware.com","bugs":"https://github.com/storm-software/storm-ops/issues","author":{"name":"Storm Software","email":"contact@stormsoftware.com","url":"https://stormsoftware.com"},"maintainers":[{"name":"Storm Software","email":"contact@stormsoftware.com","url":"https://stormsoftware.com"},{"name":"Pat Sullivan","email":"admin@stormsoftware.com","url":"https://patsullivan.org"}],"contributors":[{"name":"Storm Software","email":"contact@stormsoftware.com","url":"https://stormsoftware.com"}],"funding":{"type":"github","url":"https://github.com/sponsors/storm-software"},"license":"Apache-2.0","private":false,"packageManager":"pnpm@9.15.2","engines":{"node":">=22.4.0","pnpm":">=9.15.2"},"bin":{"storm-tsdown":"./bin/storm-tsdown.js","storm-tsdown-cjs":"./bin/storm-tsdown.cjs","storm-tsdown-esm":"./bin/storm-tsdown.js"},"main":"./dist/index.cjs","module":"./dist/index.js","exports":{"./package.json":"./package.json","./types":{"import":{"types":"./dist/types.d.ts","default":"./dist/types.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/types.cjs"},"default":{"types":"./dist/types.d.ts","default":"./dist/types.js"}},"./index":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"},"default":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"},"default":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"./config":{"import":{"types":"./dist/config.d.ts","default":"./dist/config.js"},"require":{"types":"./dist/config.d.cts","default":"./dist/config.cjs"},"default":{"types":"./dist/config.d.ts","default":"./dist/config.js"}},"./clean":{"import":{"types":"./dist/clean.d.ts","default":"./dist/clean.js"},"require":{"types":"./dist/clean.d.cts","default":"./dist/clean.cjs"},"default":{"types":"./dist/clean.d.ts","default":"./dist/clean.js"}},"./build":{"import":{"types":"./dist/build/index.d.ts","default":"./dist/build/index.js"},"require":{"types":"./dist/build/index.d.cts","default":"./dist/build/index.cjs"},"default":{"types":"./dist/build/index.d.ts","default":"./dist/build/index.js"}},"./plugins/*":{"import":{"types":"./dist/plugins/*.d.ts","default":"./dist/plugins/*.js"},"require":{"types":"./dist/plugins/*.d.cts","default":"./dist/plugins/*.cjs"},"default":{"types":"./dist/plugins/*.d.ts","default":"./dist/plugins/*.js"}}},"types":"./dist/index.d.ts","files":["dist/**/*"],"keywords":["acidic","cyclone-ui","tsdown","monorepo","storm","storm-ops","storm-stack","sullivanpj"],"peerDependencies":{"@microsoft/api-extractor":"^7.48.1","@nx/devkit":"^20.3.1","@nx/js":"^20.3.1","@storm-software/build-tools":"workspace:*","@storm-software/config-tools":"workspace:*","spdx-exceptions":"^2.5.0","spdx-license-ids":"^3.0.20","tsdown":"0.5.3"},"peerDependenciesMeta":{"@microsoft/api-extractor":{"optional":true},"@nx/devkit":{"optional":false},"@nx/js":{"optional":false},"@storm-software/build-tools":{"optional":false},"@storm-software/config-tools":{"optional":false},"spdx-exceptions":{"optional":true},"spdx-license-ids":{"optional":true},"tsdown":{"optional":false}},"dependencies":{"@humanfs/node":"^0.16.6","chokidar":"^4.0.3","commander":"^12.1.0","es-toolkit":"^1.30.1","globby":"^14.0.2","nx":"^20.3.1","rolldown":"1.0.0-beta.1","source-map":"0.7.4","tsup":"8.3.5"},"devDependencies":{"@microsoft/api-extractor":"^7.48.1","@nx/devkit":"^20.3.1","@nx/js":"^20.3.1","@storm-software/build-tools":"0.127.0","@storm-software/config":"1.96.0","@storm-software/config-tools":"1.136.0","@types/node":"^22.10.2","defu":"6.1.4","rollup":"4.29.1","spdx-exceptions":"^2.5.0","spdx-license-ids":"^3.0.20","tsdown":"0.5.3"},"publishConfig":{"access":"public"},"sideEffects":false}