@storm-software/unbuild 0.20.0 → 0.20.1

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 (35) hide show
  1. package/README.md +1 -1
  2. package/bin/unbuild.js +13554 -141
  3. package/bin/unbuild.mjs +13561 -148
  4. package/dist/build.js +9 -10
  5. package/dist/build.mjs +8 -9
  6. package/dist/{chunk-XI6ZXBUG.js → chunk-2345XTVS.js} +105 -108
  7. package/dist/{chunk-ZUXO7HQP.js → chunk-3OJD7CO4.js} +8 -5
  8. package/dist/chunk-AICX43E6.mjs +13496 -0
  9. package/dist/chunk-AYRYNROK.js +27 -0
  10. package/dist/{chunk-5SOSUWM3.mjs → chunk-B5GGHMTB.mjs} +9 -8
  11. package/dist/chunk-BIZYEBW3.mjs +38 -0
  12. package/dist/chunk-DFIGNXGY.js +13496 -0
  13. package/dist/{chunk-34DH32EF.mjs → chunk-FDF3FMZP.mjs} +1 -1
  14. package/dist/{chunk-AH7CDDC4.mjs → chunk-IIVTCNH5.mjs} +6 -3
  15. package/dist/{chunk-FP34RJ2B.mjs → chunk-OG2CKJQU.mjs} +1 -1
  16. package/dist/{chunk-2CDKPC2J.js → chunk-OQPSH7GE.js} +9 -8
  17. package/dist/chunk-RCEWRXM5.js +38 -0
  18. package/dist/{chunk-LMAVRNZF.mjs → chunk-T5NKX2EJ.mjs} +5 -9
  19. package/dist/{chunk-I24R5RY2.mjs → chunk-WGFWMGCJ.mjs} +26 -29
  20. package/dist/{chunk-QUQ5VOD7.js → chunk-WPOEGALQ.js} +3 -3
  21. package/dist/{chunk-JOAJEBTW.js → chunk-XEAFTDQ7.js} +2 -2
  22. package/dist/clean.js +3 -3
  23. package/dist/clean.mjs +2 -2
  24. package/dist/config.js +7 -8
  25. package/dist/config.mjs +6 -7
  26. package/dist/index.js +9 -10
  27. package/dist/index.mjs +8 -9
  28. package/package.json +1 -1
  29. package/dist/chunk-4REDJQMU.js +0 -35
  30. package/dist/chunk-ITLNJJHL.mjs +0 -65
  31. package/dist/chunk-KTRDC23G.mjs +0 -28
  32. package/dist/chunk-L73LP5QX.js +0 -31
  33. package/dist/chunk-TYJGNL6P.mjs +0 -35
  34. package/dist/chunk-V2LF4EEM.js +0 -28
  35. package/dist/chunk-YNOD6WE4.js +0 -65
package/dist/build.js CHANGED
@@ -1,15 +1,14 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkXI6ZXBUGjs = require('./chunk-XI6ZXBUG.js');
4
- require('./chunk-ZUXO7HQP.js');
5
- require('./chunk-L73LP5QX.js');
6
- require('./chunk-YNOD6WE4.js');
7
- require('./chunk-4REDJQMU.js');
8
- require('./chunk-JOAJEBTW.js');
9
- require('./chunk-QUQ5VOD7.js');
10
- require('./chunk-2CDKPC2J.js');
11
- require('./chunk-V2LF4EEM.js');
3
+ var _chunk2345XTVSjs = require('./chunk-2345XTVS.js');
4
+ require('./chunk-3OJD7CO4.js');
5
+ require('./chunk-AYRYNROK.js');
6
+ require('./chunk-DFIGNXGY.js');
7
+ require('./chunk-RCEWRXM5.js');
8
+ require('./chunk-XEAFTDQ7.js');
9
+ require('./chunk-WPOEGALQ.js');
10
+ require('./chunk-OQPSH7GE.js');
12
11
  require('./chunk-3GQAWCBQ.js');
13
12
 
14
13
 
15
- exports.build = _chunkXI6ZXBUGjs.build;
14
+ exports.build = _chunk2345XTVSjs.build;
package/dist/build.mjs CHANGED
@@ -1,14 +1,13 @@
1
1
  import {
2
2
  build
3
- } from "./chunk-I24R5RY2.mjs";
4
- import "./chunk-AH7CDDC4.mjs";
5
- import "./chunk-LMAVRNZF.mjs";
6
- import "./chunk-ITLNJJHL.mjs";
7
- import "./chunk-TYJGNL6P.mjs";
8
- import "./chunk-34DH32EF.mjs";
9
- import "./chunk-FP34RJ2B.mjs";
10
- import "./chunk-5SOSUWM3.mjs";
11
- import "./chunk-KTRDC23G.mjs";
3
+ } from "./chunk-WGFWMGCJ.mjs";
4
+ import "./chunk-IIVTCNH5.mjs";
5
+ import "./chunk-T5NKX2EJ.mjs";
6
+ import "./chunk-AICX43E6.mjs";
7
+ import "./chunk-BIZYEBW3.mjs";
8
+ import "./chunk-FDF3FMZP.mjs";
9
+ import "./chunk-OG2CKJQU.mjs";
10
+ import "./chunk-B5GGHMTB.mjs";
12
11
  import "./chunk-LPEX4YW6.mjs";
13
12
  export {
14
13
  build
@@ -1,12 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkZUXO7HQPjs = require('./chunk-ZUXO7HQP.js');
3
+ var _chunk3OJD7CO4js = require('./chunk-3OJD7CO4.js');
4
4
 
5
5
 
6
- var _chunkL73LP5QXjs = require('./chunk-L73LP5QX.js');
6
+ var _chunkAYRYNROKjs = require('./chunk-AYRYNROK.js');
7
7
 
8
8
 
9
- var _chunkYNOD6WE4js = require('./chunk-YNOD6WE4.js');
9
+ var _chunkDFIGNXGYjs = require('./chunk-DFIGNXGY.js');
10
10
 
11
11
 
12
12
 
@@ -29,13 +29,12 @@ var _chunkYNOD6WE4js = require('./chunk-YNOD6WE4.js');
29
29
 
30
30
 
31
31
 
32
- var _chunk2CDKPC2Jjs = require('./chunk-2CDKPC2J.js');
32
+ var _chunkOQPSH7GEjs = require('./chunk-OQPSH7GE.js');
33
33
 
34
34
 
35
35
  var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
36
36
 
37
37
  // src/build.ts
38
- var _node = require('@humanfs/node');
39
38
  var _devkit = require('@nx/devkit');
40
39
  var _js = require('@nx/js');
41
40
  var _buildablelibsutils = require('@nx/js/src/utils/buildable-libs-utils');
@@ -54,7 +53,7 @@ var _resolve2 = require('resolve'); var _resolve3 = _interopRequireDefault(_reso
54
53
 
55
54
 
56
55
  // ../build-tools/src/utilities/copy-assets.ts
57
-
56
+ var _node = require('@humanfs/node');
58
57
 
59
58
 
60
59
  var _glob = require('glob');
@@ -66,27 +65,27 @@ var _glob = require('glob');
66
65
  var _c12 = require('c12');
67
66
  var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
68
67
  var getConfigFileByName = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (fileName, filePath, options = {}) => {
69
- const workspacePath = filePath || _chunk2CDKPC2Jjs.findWorkspaceRoot.call(void 0, filePath);
70
- let config = _c12.loadConfig.call(void 0, {
68
+ const workspacePath = filePath || _chunkOQPSH7GEjs.findWorkspaceRoot.call(void 0, filePath);
69
+ let config = await _c12.loadConfig.call(void 0, {
71
70
  cwd: workspacePath,
72
71
  packageJson: true,
73
72
  name: fileName,
74
73
  envName: _optionalChain([fileName, 'optionalAccess', _ => _.toUpperCase, 'call', _2 => _2()]),
75
74
  jitiOptions: {
76
75
  debug: false,
77
- cache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunk2CDKPC2Jjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache", "storm")
76
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkOQPSH7GEjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "config")
78
77
  },
79
78
  ...options
80
79
  });
81
80
  if (!config || Object.keys(config).length === 0) {
82
- config = _c12.loadConfig.call(void 0, {
81
+ config = await _c12.loadConfig.call(void 0, {
83
82
  cwd: workspacePath,
84
83
  packageJson: true,
85
84
  name: fileName,
86
85
  envName: _optionalChain([fileName, 'optionalAccess', _3 => _3.toUpperCase, 'call', _4 => _4()]),
87
86
  jitiOptions: {
88
87
  debug: false,
89
- cache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunk2CDKPC2Jjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache", "storm")
88
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkOQPSH7GEjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "config")
90
89
  },
91
90
  configFile: fileName,
92
91
  ...options
@@ -95,12 +94,12 @@ var getConfigFileByName = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, a
95
94
  return config;
96
95
  }, "getConfigFileByName");
97
96
  var getConfigFile = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (filePath, additionalFileNames = []) => {
98
- const workspacePath = filePath ? filePath : _chunk2CDKPC2Jjs.findWorkspaceRoot.call(void 0, filePath);
97
+ const workspacePath = filePath ? filePath : _chunkOQPSH7GEjs.findWorkspaceRoot.call(void 0, filePath);
99
98
  const result = await getConfigFileByName("storm", workspacePath);
100
99
  let config = result.config;
101
100
  const configFile = result.configFile;
102
101
  if (config && configFile && Object.keys(config).length > 0) {
103
- _chunk2CDKPC2Jjs.writeSystem.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
102
+ _chunkOQPSH7GEjs.writeSystem.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
104
103
  logLevel: "all"
105
104
  });
106
105
  }
@@ -108,7 +107,7 @@ var getConfigFile = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (
108
107
  const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
109
108
  for (const result2 of results) {
110
109
  if (_optionalChain([result2, 'optionalAccess', _5 => _5.config]) && _optionalChain([result2, 'optionalAccess', _6 => _6.configFile]) && Object.keys(result2.config).length > 0) {
111
- _chunk2CDKPC2Jjs.writeSystem.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
110
+ _chunkOQPSH7GEjs.writeSystem.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
112
111
  logLevel: "all"
113
112
  });
114
113
  config = _defu2.default.call(void 0, _nullishCoalesce(result2.config, () => ( {})), _nullishCoalesce(config, () => ( {})));
@@ -145,15 +144,15 @@ var getConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, () => {
145
144
  licensing: process.env[`${prefix}LICENSING`] || void 0,
146
145
  timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
147
146
  locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
148
- configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunk2CDKPC2Jjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
149
- workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunk2CDKPC2Jjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
147
+ configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunkOQPSH7GEjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
148
+ workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkOQPSH7GEjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
150
149
  directories: {
151
- cache: process.env[`${prefix}CACHE_DIR`] ? _chunk2CDKPC2Jjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
152
- data: process.env[`${prefix}DATA_DIR`] ? _chunk2CDKPC2Jjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
153
- config: process.env[`${prefix}CONFIG_DIR`] ? _chunk2CDKPC2Jjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
154
- temp: process.env[`${prefix}TEMP_DIR`] ? _chunk2CDKPC2Jjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
155
- log: process.env[`${prefix}LOG_DIR`] ? _chunk2CDKPC2Jjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
156
- build: process.env[`${prefix}BUILD_DIR`] ? _chunk2CDKPC2Jjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : void 0
150
+ cache: process.env[`${prefix}CACHE_DIR`] ? _chunkOQPSH7GEjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
151
+ data: process.env[`${prefix}DATA_DIR`] ? _chunkOQPSH7GEjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
152
+ config: process.env[`${prefix}CONFIG_DIR`] ? _chunkOQPSH7GEjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
153
+ temp: process.env[`${prefix}TEMP_DIR`] ? _chunkOQPSH7GEjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
154
+ log: process.env[`${prefix}LOG_DIR`] ? _chunkOQPSH7GEjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
155
+ build: process.env[`${prefix}BUILD_DIR`] ? _chunkOQPSH7GEjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : void 0
157
156
  },
158
157
  skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
159
158
  env: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}ENV`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
@@ -176,23 +175,23 @@ var getConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, () => {
176
175
  cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
177
176
  container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
178
177
  },
179
- 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`])) ? _chunk2CDKPC2Jjs.getLogLevelLabel.call(void 0, Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0
178
+ 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`])) ? _chunkOQPSH7GEjs.getLogLevelLabel.call(void 0, Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0
180
179
  };
181
- const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunk2CDKPC2Jjs.COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
180
+ const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunkOQPSH7GEjs.COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
182
181
  config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
183
182
  ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
184
183
  return ret;
185
184
  }, {}) : getThemeColorConfigEnv(prefix);
186
- if (config.docs === _chunk2CDKPC2Jjs.STORM_DEFAULT_DOCS) {
187
- if (config.homepage === _chunk2CDKPC2Jjs.STORM_DEFAULT_HOMEPAGE) {
188
- config.docs = `${_chunk2CDKPC2Jjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
185
+ if (config.docs === _chunkOQPSH7GEjs.STORM_DEFAULT_DOCS) {
186
+ if (config.homepage === _chunkOQPSH7GEjs.STORM_DEFAULT_HOMEPAGE) {
187
+ config.docs = `${_chunkOQPSH7GEjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
189
188
  } else {
190
189
  config.docs = `${config.homepage}/docs`;
191
190
  }
192
191
  }
193
- if (config.licensing === _chunk2CDKPC2Jjs.STORM_DEFAULT_LICENSING) {
194
- if (config.homepage === _chunk2CDKPC2Jjs.STORM_DEFAULT_HOMEPAGE) {
195
- config.licensing = `${_chunk2CDKPC2Jjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
192
+ if (config.licensing === _chunkOQPSH7GEjs.STORM_DEFAULT_LICENSING) {
193
+ if (config.homepage === _chunkOQPSH7GEjs.STORM_DEFAULT_HOMEPAGE) {
194
+ config.licensing = `${_chunkOQPSH7GEjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
196
195
  } else {
197
196
  config.licensing = `${config.homepage}/docs`;
198
197
  }
@@ -330,31 +329,31 @@ var setConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (config)
330
329
  process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
331
330
  }
332
331
  if (config.configFile) {
333
- process.env[`${prefix}CONFIG_FILE`] = _chunk2CDKPC2Jjs.correctPaths.call(void 0, config.configFile);
332
+ process.env[`${prefix}CONFIG_FILE`] = _chunkOQPSH7GEjs.correctPaths.call(void 0, config.configFile);
334
333
  }
335
334
  if (config.workspaceRoot) {
336
- process.env[`${prefix}WORKSPACE_ROOT`] = _chunk2CDKPC2Jjs.correctPaths.call(void 0, config.workspaceRoot);
337
- process.env.NX_WORKSPACE_ROOT = _chunk2CDKPC2Jjs.correctPaths.call(void 0, config.workspaceRoot);
338
- process.env.NX_WORKSPACE_ROOT_PATH = _chunk2CDKPC2Jjs.correctPaths.call(void 0, config.workspaceRoot);
335
+ process.env[`${prefix}WORKSPACE_ROOT`] = _chunkOQPSH7GEjs.correctPaths.call(void 0, config.workspaceRoot);
336
+ process.env.NX_WORKSPACE_ROOT = _chunkOQPSH7GEjs.correctPaths.call(void 0, config.workspaceRoot);
337
+ process.env.NX_WORKSPACE_ROOT_PATH = _chunkOQPSH7GEjs.correctPaths.call(void 0, config.workspaceRoot);
339
338
  }
340
339
  if (config.directories) {
341
340
  if (!config.skipCache && config.directories.cache) {
342
- process.env[`${prefix}CACHE_DIR`] = _chunk2CDKPC2Jjs.correctPaths.call(void 0, config.directories.cache);
341
+ process.env[`${prefix}CACHE_DIR`] = _chunkOQPSH7GEjs.correctPaths.call(void 0, config.directories.cache);
343
342
  }
344
343
  if (config.directories.data) {
345
- process.env[`${prefix}DATA_DIR`] = _chunk2CDKPC2Jjs.correctPaths.call(void 0, config.directories.data);
344
+ process.env[`${prefix}DATA_DIR`] = _chunkOQPSH7GEjs.correctPaths.call(void 0, config.directories.data);
346
345
  }
347
346
  if (config.directories.config) {
348
- process.env[`${prefix}CONFIG_DIR`] = _chunk2CDKPC2Jjs.correctPaths.call(void 0, config.directories.config);
347
+ process.env[`${prefix}CONFIG_DIR`] = _chunkOQPSH7GEjs.correctPaths.call(void 0, config.directories.config);
349
348
  }
350
349
  if (config.directories.temp) {
351
- process.env[`${prefix}TEMP_DIR`] = _chunk2CDKPC2Jjs.correctPaths.call(void 0, config.directories.temp);
350
+ process.env[`${prefix}TEMP_DIR`] = _chunkOQPSH7GEjs.correctPaths.call(void 0, config.directories.temp);
352
351
  }
353
352
  if (config.directories.log) {
354
- process.env[`${prefix}LOG_DIR`] = _chunk2CDKPC2Jjs.correctPaths.call(void 0, config.directories.log);
353
+ process.env[`${prefix}LOG_DIR`] = _chunkOQPSH7GEjs.correctPaths.call(void 0, config.directories.log);
355
354
  }
356
355
  if (config.directories.build) {
357
- process.env[`${prefix}BUILD_DIR`] = _chunk2CDKPC2Jjs.correctPaths.call(void 0, config.directories.build);
356
+ process.env[`${prefix}BUILD_DIR`] = _chunkOQPSH7GEjs.correctPaths.call(void 0, config.directories.build);
358
357
  }
359
358
  }
360
359
  if (config.skipCache !== void 0) {
@@ -408,8 +407,8 @@ var setConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (config)
408
407
  if (config.logLevel) {
409
408
  process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
410
409
  process.env.LOG_LEVEL = String(config.logLevel);
411
- process.env.NX_VERBOSE_LOGGING = String(_chunk2CDKPC2Jjs.getLogLevel.call(void 0, config.logLevel) >= _chunk2CDKPC2Jjs.LogLevel.DEBUG ? true : false);
412
- process.env.RUST_BACKTRACE = _chunk2CDKPC2Jjs.getLogLevel.call(void 0, config.logLevel) >= _chunk2CDKPC2Jjs.LogLevel.DEBUG ? "full" : "none";
410
+ process.env.NX_VERBOSE_LOGGING = String(_chunkOQPSH7GEjs.getLogLevel.call(void 0, config.logLevel) >= _chunkOQPSH7GEjs.LogLevel.DEBUG ? true : false);
411
+ process.env.RUST_BACKTRACE = _chunkOQPSH7GEjs.getLogLevel.call(void 0, config.logLevel) >= _chunkOQPSH7GEjs.LogLevel.DEBUG ? "full" : "none";
413
412
  }
414
413
  process.env[`${prefix}CONFIG`] = JSON.stringify(config);
415
414
  for (const key of Object.keys(_nullishCoalesce(config.extensions, () => ( {})))) {
@@ -519,23 +518,23 @@ var _static_cache = void 0;
519
518
  var loadStormConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (workspaceRoot) => {
520
519
  let config = {};
521
520
  if (_optionalChain([_static_cache, 'optionalAccess', _29 => _29.data]) && _optionalChain([_static_cache, 'optionalAccess', _30 => _30.timestamp]) && _static_cache.timestamp >= Date.now() + 3e4) {
522
- _chunk2CDKPC2Jjs.writeTrace.call(void 0, `Configuration cache hit - ${_static_cache.timestamp}`, _static_cache.data);
521
+ _chunkOQPSH7GEjs.writeTrace.call(void 0, `Configuration cache hit - ${_static_cache.timestamp}`, _static_cache.data);
523
522
  return _static_cache.data;
524
523
  }
525
524
  let _workspaceRoot = workspaceRoot;
526
525
  if (!_workspaceRoot) {
527
- _workspaceRoot = _chunk2CDKPC2Jjs.findWorkspaceRoot.call(void 0, );
526
+ _workspaceRoot = _chunkOQPSH7GEjs.findWorkspaceRoot.call(void 0, );
528
527
  }
529
528
  const configFile = await getConfigFile(_workspaceRoot);
530
529
  if (!configFile) {
531
- _chunk2CDKPC2Jjs.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", {
530
+ _chunkOQPSH7GEjs.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", {
532
531
  logLevel: "all"
533
532
  });
534
533
  }
535
- config = _defu2.default.call(void 0, getConfigEnv(), configFile, _chunk2CDKPC2Jjs.getDefaultConfig.call(void 0, _workspaceRoot));
534
+ config = _defu2.default.call(void 0, getConfigEnv(), configFile, _chunkOQPSH7GEjs.getDefaultConfig.call(void 0, _workspaceRoot));
536
535
  setConfigEnv(config);
537
- _chunk2CDKPC2Jjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm configuration:
538
- ${_chunk2CDKPC2Jjs.formatLogMessage.call(void 0, config)}`, config);
536
+ _chunkOQPSH7GEjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm configuration:
537
+ ${_chunkOQPSH7GEjs.formatLogMessage.call(void 0, config)}`, config);
539
538
  return config;
540
539
  }, "loadStormConfig");
541
540
 
@@ -546,7 +545,7 @@ var readNxConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (w
546
545
  const config = await loadStormConfig();
547
546
  rootDir = config.workspaceRoot;
548
547
  }
549
- const nxJsonPath = _chunk2CDKPC2Jjs.joinPaths.call(void 0, rootDir, "nx.json");
548
+ const nxJsonPath = _chunkOQPSH7GEjs.joinPaths.call(void 0, rootDir, "nx.json");
550
549
  if (!await _node.hfs.isFile(nxJsonPath)) {
551
550
  throw new Error("Cannot find project.json configuration");
552
551
  }
@@ -594,7 +593,7 @@ var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (con
594
593
  }
595
594
  const buildTarget = _optionalChain([projectsConfigurations, 'access', _39 => _39.projects, 'access', _40 => _40[projectName], 'optionalAccess', _41 => _41.targets, 'optionalAccess', _42 => _42.build]);
596
595
  if (!buildTarget) {
597
- 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 ${_chunk2CDKPC2Jjs.joinPaths.call(void 0, projectRoot, "project.json")}`);
596
+ 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 ${_chunkOQPSH7GEjs.joinPaths.call(void 0, projectRoot, "project.json")}`);
598
597
  }
599
598
  const result = await _js.copyAssets.call(void 0, {
600
599
  assets,
@@ -609,18 +608,18 @@ var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (con
609
608
  projectsConfigurations,
610
609
  nxJsonConfiguration: nxJson,
611
610
  cwd: config.workspaceRoot,
612
- isVerbose: _chunk2CDKPC2Jjs.isVerbose.call(void 0, config.logLevel)
611
+ isVerbose: _chunkOQPSH7GEjs.isVerbose.call(void 0, config.logLevel)
613
612
  });
614
613
  if (!result.success) {
615
614
  throw new Error("The Build process failed trying to copy assets");
616
615
  }
617
616
  if (includeSrc === true) {
618
- _chunk2CDKPC2Jjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunk2CDKPC2Jjs.joinPaths.call(void 0, outputPath, "src")}`, config);
617
+ _chunkOQPSH7GEjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkOQPSH7GEjs.joinPaths.call(void 0, outputPath, "src")}`, config);
619
618
  const files = await _glob.glob.call(void 0, [
620
- _chunk2CDKPC2Jjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
621
- _chunk2CDKPC2Jjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
622
- _chunk2CDKPC2Jjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
623
- _chunk2CDKPC2Jjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
619
+ _chunkOQPSH7GEjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
620
+ _chunkOQPSH7GEjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
621
+ _chunkOQPSH7GEjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
622
+ _chunkOQPSH7GEjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
624
623
  ]);
625
624
  await Promise.allSettled(files.map(async (file) => _node.hfs.write(file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
626
625
 
@@ -643,7 +642,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
643
642
  if (!_optionalChain([projectConfigurations, 'optionalAccess', _43 => _43.projects, 'optionalAccess', _44 => _44[projectName]])) {
644
643
  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.");
645
644
  }
646
- const projectJsonPath = _chunk2CDKPC2Jjs.joinPaths.call(void 0, workspaceRoot, projectRoot, "project.json");
645
+ const projectJsonPath = _chunkOQPSH7GEjs.joinPaths.call(void 0, workspaceRoot, projectRoot, "project.json");
647
646
  if (!await _node.hfs.isFile(projectJsonPath)) {
648
647
  throw new Error("Cannot find project.json configuration");
649
648
  }
@@ -655,7 +654,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
655
654
  for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot)) {
656
655
  const projectNode = project.node;
657
656
  if (projectNode.data.root) {
658
- const projectPackageJsonPath = _chunk2CDKPC2Jjs.joinPaths.call(void 0, workspaceRoot, projectNode.data.root, "package.json");
657
+ const projectPackageJsonPath = _chunkOQPSH7GEjs.joinPaths.call(void 0, workspaceRoot, projectNode.data.root, "package.json");
659
658
  if (await _node.hfs.isFile(projectPackageJsonPath)) {
660
659
  const projectPackageJson = await _node.hfs.json(projectPackageJsonPath);
661
660
  if (projectPackageJson.private !== false) {
@@ -665,7 +664,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
665
664
  }
666
665
  }
667
666
  if (localPackages.length > 0) {
668
- _chunk2CDKPC2Jjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
667
+ _chunkOQPSH7GEjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
669
668
  packageJson.peerDependencies = localPackages.reduce((ret, localPackage) => {
670
669
  if (!ret[localPackage.name]) {
671
670
  ret[localPackage.name] = `>=${localPackage.version || "0.0.1"}`;
@@ -687,13 +686,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
687
686
  return ret;
688
687
  }, _nullishCoalesce(packageJson.peerDependencies, () => ( {})));
689
688
  } else {
690
- _chunk2CDKPC2Jjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
689
+ _chunkOQPSH7GEjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
691
690
  }
692
691
  return packageJson;
693
692
  }, "addPackageDependencies");
694
693
  var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
695
- const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunk2CDKPC2Jjs.findWorkspaceRoot.call(void 0, );
696
- const workspacePackageJson = await _node.hfs.json(_chunk2CDKPC2Jjs.joinPaths.call(void 0, workspaceRoot, "package.json"));
694
+ const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunkOQPSH7GEjs.findWorkspaceRoot.call(void 0, );
695
+ const workspacePackageJson = await _node.hfs.json(_chunkOQPSH7GEjs.joinPaths.call(void 0, workspaceRoot, "package.json"));
697
696
  packageJson.type ??= "module";
698
697
  packageJson.sideEffects ??= false;
699
698
  if (includeSrc === true) {
@@ -701,7 +700,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call
701
700
  if (distSrc.startsWith("/")) {
702
701
  distSrc = distSrc.substring(1);
703
702
  }
704
- packageJson.source ??= `${_chunk2CDKPC2Jjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
703
+ packageJson.source ??= `${_chunkOQPSH7GEjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
705
704
  }
706
705
  packageJson.files ??= [
707
706
  "dist/**/*"
@@ -732,7 +731,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call
732
731
  ];
733
732
  }
734
733
  packageJson.repository ??= workspacePackageJson.repository;
735
- packageJson.repository.directory ??= projectRoot ? projectRoot : _chunk2CDKPC2Jjs.joinPaths.call(void 0, "packages", projectName);
734
+ packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkOQPSH7GEjs.joinPaths.call(void 0, "packages", projectName);
736
735
  return packageJson;
737
736
  }, "addWorkspacePackageJsonFields");
738
737
  var addPackageJsonExport = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (file, type = "module", sourceRoot) => {
@@ -793,6 +792,8 @@ var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
793
792
  // src/build.ts
794
793
 
795
794
 
795
+ var _promises = require('fs/promises');
796
+
796
797
  var _findworkspaceroot = require('nx/src/utils/find-workspace-root');
797
798
  var _unbuild = require('unbuild');
798
799
  async function resolveOptions(options) {
@@ -800,52 +801,48 @@ async function resolveOptions(options) {
800
801
  if (!projectRoot) {
801
802
  throw new Error("Cannot find project root");
802
803
  }
803
- const outputPath = options.outputPath || _chunk2CDKPC2Jjs.joinPaths.call(void 0, "dist", projectRoot);
804
+ const outputPath = options.outputPath || _chunkOQPSH7GEjs.joinPaths.call(void 0, "dist", projectRoot);
804
805
  const workspaceRoot = _findworkspaceroot.findWorkspaceRoot.call(void 0, projectRoot);
805
806
  if (!workspaceRoot) {
806
807
  throw new Error("Cannot find workspace root");
807
808
  }
808
809
  const config = await loadStormConfig(workspaceRoot.dir);
809
- _chunk2CDKPC2Jjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
810
- const stopwatch = _chunk2CDKPC2Jjs.getStopwatch.call(void 0, "Build options resolution");
810
+ _chunkOQPSH7GEjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
811
+ const stopwatch = _chunkOQPSH7GEjs.getStopwatch.call(void 0, "Build options resolution");
811
812
  if (options.configPath) {
812
- const configFile = await _chunkYNOD6WE4js.loadConfig.call(void 0, options.configPath);
813
+ const configFile = await _chunkDFIGNXGYjs.loadConfig.call(void 0, options.configPath);
813
814
  if (configFile) {
814
815
  options = _defu2.default.call(void 0, options, configFile);
815
816
  }
816
817
  }
817
- const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
818
- exitOnError: true
819
- });
820
- const projectJsonPath = _chunk2CDKPC2Jjs.joinPaths.call(void 0, config.workspaceRoot, projectRoot, "project.json");
821
- if (!await _node.hfs.isFile(projectJsonPath)) {
818
+ const projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
819
+ const projectJsonPath = _chunkOQPSH7GEjs.joinPaths.call(void 0, config.workspaceRoot, projectRoot, "project.json");
820
+ if (!_fs.existsSync.call(void 0, projectJsonPath)) {
822
821
  throw new Error("Cannot find project.json configuration");
823
822
  }
824
- const projectJson = await _node.hfs.json(projectJsonPath);
823
+ const projectJsonContent = await _promises.readFile.call(void 0, projectJsonPath, "utf8");
824
+ const projectJson = JSON.parse(projectJsonContent);
825
825
  const projectName = projectJson.name;
826
- const packageJsonPath = _chunk2CDKPC2Jjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "package.json");
827
- if (!await _node.hfs.isFile(packageJsonPath)) {
826
+ const packageJsonPath = _chunkOQPSH7GEjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "package.json");
827
+ if (!_fs.existsSync.call(void 0, packageJsonPath)) {
828
828
  throw new Error("Cannot find package.json configuration");
829
829
  }
830
- const packageJson = await _node.hfs.json(packageJsonPath);
830
+ const packageJsonContent = await _promises.readFile.call(void 0, packageJsonPath, "utf8");
831
+ const packageJson = JSON.parse(packageJsonContent);
831
832
  let tsconfig = options.tsconfig;
832
833
  if (!tsconfig) {
833
- tsconfig = _chunk2CDKPC2Jjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "tsconfig.json");
834
+ tsconfig = _chunkOQPSH7GEjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "tsconfig.json");
834
835
  }
835
- if (!await _node.hfs.isFile(tsconfig)) {
836
+ if (!_fs.existsSync.call(void 0, tsconfig)) {
836
837
  throw new Error("Cannot find tsconfig.json configuration");
837
838
  }
838
839
  let sourceRoot = projectJson.sourceRoot;
839
840
  if (!sourceRoot) {
840
- sourceRoot = _chunk2CDKPC2Jjs.joinPaths.call(void 0, projectRoot, "src");
841
+ sourceRoot = _chunkOQPSH7GEjs.joinPaths.call(void 0, projectRoot, "src");
841
842
  }
842
- if (!await _node.hfs.isDirectory(sourceRoot)) {
843
+ if (!_fs.existsSync.call(void 0, sourceRoot)) {
843
844
  throw new Error("Cannot find sourceRoot directory");
844
845
  }
845
- const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
846
- if (!_optionalChain([projectConfigurations, 'optionalAccess', _47 => _47.projects, 'optionalAccess', _48 => _48[projectName]])) {
847
- 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.");
848
- }
849
846
  const result = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, projectGraph, workspaceRoot.dir, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
850
847
  let dependencies = result.dependencies;
851
848
  const tsLibDependency = _js.getHelperDependency.call(void 0, _js.HelperDependency.tsc, tsconfig, dependencies, projectGraph, true);
@@ -865,14 +862,14 @@ async function resolveOptions(options) {
865
862
  {
866
863
  builder: "mkdist",
867
864
  input: `.${sourceRoot.replace(projectRoot, "")}`,
868
- outDir: _chunk2CDKPC2Jjs.joinPaths.call(void 0, _path.relative.call(void 0, _chunk2CDKPC2Jjs.joinPaths.call(void 0, config.workspaceRoot, projectRoot), config.workspaceRoot).replaceAll("\\", "/"), outputPath, "dist").replaceAll("\\", "/"),
865
+ outDir: _chunkOQPSH7GEjs.joinPaths.call(void 0, _path.relative.call(void 0, _chunkOQPSH7GEjs.joinPaths.call(void 0, config.workspaceRoot, projectRoot), config.workspaceRoot).replaceAll("\\", "/"), outputPath, "dist").replaceAll("\\", "/"),
869
866
  declaration: options.emitTypes !== false,
870
867
  format: "esm"
871
868
  },
872
869
  {
873
870
  builder: "mkdist",
874
871
  input: `.${sourceRoot.replace(projectRoot, "")}`,
875
- outDir: _chunk2CDKPC2Jjs.joinPaths.call(void 0, _path.relative.call(void 0, _chunk2CDKPC2Jjs.joinPaths.call(void 0, config.workspaceRoot, projectRoot), config.workspaceRoot).replaceAll("\\", "/"), outputPath, "dist").replaceAll("\\", "/"),
872
+ outDir: _chunkOQPSH7GEjs.joinPaths.call(void 0, _path.relative.call(void 0, _chunkOQPSH7GEjs.joinPaths.call(void 0, config.workspaceRoot, projectRoot), config.workspaceRoot).replaceAll("\\", "/"), outputPath, "dist").replaceAll("\\", "/"),
876
873
  declaration: options.emitTypes !== false,
877
874
  format: "cjs",
878
875
  ext: "cjs"
@@ -930,7 +927,7 @@ async function resolveOptions(options) {
930
927
  splitting: options.splitting !== false,
931
928
  treeShaking: options.treeShaking !== false,
932
929
  color: true,
933
- logLevel: config.logLevel === _chunk2CDKPC2Jjs.LogLevelLabel.FATAL ? _chunk2CDKPC2Jjs.LogLevelLabel.ERROR : _chunk2CDKPC2Jjs.isVerbose.call(void 0, ) ? "verbose" : config.logLevel
930
+ logLevel: config.logLevel === _chunkOQPSH7GEjs.LogLevelLabel.FATAL ? _chunkOQPSH7GEjs.LogLevelLabel.ERROR : _chunkOQPSH7GEjs.isVerbose.call(void 0, ) ? "verbose" : config.logLevel
934
931
  }
935
932
  }
936
933
  };
@@ -947,7 +944,7 @@ async function resolveOptions(options) {
947
944
  if (options.rollup) {
948
945
  let rollup = {};
949
946
  if (typeof options.rollup === "string") {
950
- const rollupFile = await _chunkYNOD6WE4js.loadConfig.call(void 0, options.rollup);
947
+ const rollupFile = await _chunkDFIGNXGYjs.loadConfig.call(void 0, options.rollup);
951
948
  if (rollupFile) {
952
949
  rollup = rollupFile;
953
950
  }
@@ -958,7 +955,7 @@ async function resolveOptions(options) {
958
955
  }
959
956
  resolvedOptions.hooks = {
960
957
  "rollup:options": /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (ctx, opts) => {
961
- opts.plugins = await _asyncNullishCoalesce(options.plugins, async () => ( await _chunkL73LP5QXjs.getDefaultBuildPlugins.call(void 0, options, resolvedOptions)));
958
+ opts.plugins = await _asyncNullishCoalesce(options.plugins, async () => ( await _chunkAYRYNROKjs.getDefaultBuildPlugins.call(void 0, options, resolvedOptions)));
962
959
  }, "rollup:options")
963
960
  };
964
961
  stopwatch();
@@ -966,29 +963,29 @@ async function resolveOptions(options) {
966
963
  }
967
964
  _chunk3GQAWCBQjs.__name.call(void 0, resolveOptions, "resolveOptions");
968
965
  async function generatePackageJson(options) {
969
- if (options.generatePackageJson !== false && await _node.hfs.isFile(_chunk2CDKPC2Jjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
970
- _chunk2CDKPC2Jjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
971
- const stopwatch = _chunk2CDKPC2Jjs.getStopwatch.call(void 0, "Write package.json file");
972
- const packageJsonPath = _chunk2CDKPC2Jjs.joinPaths.call(void 0, options.projectRoot, "project.json");
973
- if (!await _node.hfs.isFile(packageJsonPath)) {
966
+ if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkOQPSH7GEjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
967
+ _chunkOQPSH7GEjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
968
+ const stopwatch = _chunkOQPSH7GEjs.getStopwatch.call(void 0, "Write package.json file");
969
+ const packageJsonPath = _chunkOQPSH7GEjs.joinPaths.call(void 0, options.projectRoot, "project.json");
970
+ if (!_fs.existsSync.call(void 0, packageJsonPath)) {
974
971
  throw new Error("Cannot find package.json configuration");
975
972
  }
976
- let packageJson = await _node.hfs.json(_chunk2CDKPC2Jjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"));
977
- if (!packageJson) {
973
+ let packageJsonContent = await _promises.readFile.call(void 0, _chunkOQPSH7GEjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
974
+ if (!packageJsonContent) {
978
975
  throw new Error("Cannot find package.json configuration file");
979
976
  }
977
+ let packageJson = JSON.parse(packageJsonContent);
980
978
  packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
981
979
  packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
982
- packageJson = await addPackageJsonExports(options.sourceRoot, packageJson);
983
- await _devkit.writeJsonFile.call(void 0, _chunk2CDKPC2Jjs.joinPaths.call(void 0, options.outDir, "package.json"), packageJson);
980
+ await _devkit.writeJsonFile.call(void 0, _chunkOQPSH7GEjs.joinPaths.call(void 0, options.outDir, "package.json"), await addPackageJsonExports(options.sourceRoot, packageJson));
984
981
  stopwatch();
985
982
  }
986
983
  return options;
987
984
  }
988
985
  _chunk3GQAWCBQjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
989
986
  async function executeUnbuild(options) {
990
- _chunk2CDKPC2Jjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} (${options.projectRoot}) build`, options.config);
991
- const stopwatch = _chunk2CDKPC2Jjs.getStopwatch.call(void 0, `${options.name} (${options.projectRoot}) build`);
987
+ _chunkOQPSH7GEjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} (${options.projectRoot}) build`, options.config);
988
+ const stopwatch = _chunkOQPSH7GEjs.getStopwatch.call(void 0, `${options.name} (${options.projectRoot}) build`);
992
989
  try {
993
990
  await _unbuild.build.call(void 0, options.projectRoot, false, {
994
991
  ...options,
@@ -1001,8 +998,8 @@ async function executeUnbuild(options) {
1001
998
  }
1002
999
  _chunk3GQAWCBQjs.__name.call(void 0, executeUnbuild, "executeUnbuild");
1003
1000
  async function copyBuildAssets(options) {
1004
- _chunk2CDKPC2Jjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`, options.config);
1005
- const stopwatch = _chunk2CDKPC2Jjs.getStopwatch.call(void 0, `${options.name} asset copy`);
1001
+ _chunkOQPSH7GEjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`, options.config);
1002
+ const stopwatch = _chunkOQPSH7GEjs.getStopwatch.call(void 0, `${options.name} asset copy`);
1006
1003
  await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outDir, options.projectRoot, options.projectName, options.sourceRoot, options.generatePackageJson, options.includeSrc);
1007
1004
  stopwatch();
1008
1005
  return options;
@@ -1010,23 +1007,23 @@ async function copyBuildAssets(options) {
1010
1007
  _chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
1011
1008
  async function cleanOutputPath(options) {
1012
1009
  if (options.clean !== false && options.outDir) {
1013
- await _chunkZUXO7HQPjs.clean.call(void 0, options.name, options.outDir, options.config);
1010
+ await _chunk3OJD7CO4js.clean.call(void 0, options.name, options.outDir, options.config);
1014
1011
  }
1015
1012
  return options;
1016
1013
  }
1017
1014
  _chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
1018
1015
  async function build(options) {
1019
- _chunk2CDKPC2Jjs.writeDebug.call(void 0, ` \u26A1 Executing Storm Unbuild pipeline`);
1020
- const stopwatch = _chunk2CDKPC2Jjs.getStopwatch.call(void 0, "Unbuild pipeline");
1016
+ _chunkOQPSH7GEjs.writeDebug.call(void 0, ` \u26A1 Executing Storm Unbuild pipeline`);
1017
+ const stopwatch = _chunkOQPSH7GEjs.getStopwatch.call(void 0, "Unbuild pipeline");
1021
1018
  try {
1022
1019
  const resolvedOptions = await resolveOptions(options);
1023
1020
  await cleanOutputPath(resolvedOptions);
1024
1021
  await generatePackageJson(resolvedOptions);
1025
1022
  await executeUnbuild(resolvedOptions);
1026
1023
  await copyBuildAssets(resolvedOptions);
1027
- _chunk2CDKPC2Jjs.writeSuccess.call(void 0, ` \u{1F3C1} The ${resolvedOptions.name} build completed successfully`, resolvedOptions.config);
1024
+ _chunkOQPSH7GEjs.writeSuccess.call(void 0, ` \u{1F3C1} The ${resolvedOptions.name} build completed successfully`, resolvedOptions.config);
1028
1025
  } catch (error) {
1029
- _chunk2CDKPC2Jjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
1026
+ _chunkOQPSH7GEjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
1030
1027
  throw error;
1031
1028
  } finally {
1032
1029
  stopwatch();
@@ -1,17 +1,20 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunk2CDKPC2Jjs = require('./chunk-2CDKPC2J.js');
4
+ var _chunkOQPSH7GEjs = require('./chunk-OQPSH7GE.js');
5
5
 
6
6
 
7
7
  var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
8
8
 
9
9
  // src/clean.ts
10
- var _node = require('@humanfs/node');
10
+ var _promises = require('fs/promises');
11
11
  async function clean(name = "Unbuild", directory, config) {
12
- _chunk2CDKPC2Jjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
13
- const stopwatch = _chunk2CDKPC2Jjs.getStopwatch.call(void 0, `${name} output clean`);
14
- await _node.hfs.deleteAll(directory);
12
+ _chunkOQPSH7GEjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
13
+ const stopwatch = _chunkOQPSH7GEjs.getStopwatch.call(void 0, `${name} output clean`);
14
+ await _promises.rm.call(void 0, directory, {
15
+ recursive: true,
16
+ force: true
17
+ });
15
18
  stopwatch();
16
19
  }
17
20
  _chunk3GQAWCBQjs.__name.call(void 0, clean, "clean");