@storm-software/unbuild 0.39.15 → 0.40.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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeInfo
3
- } from "./chunk-ICS2FLHB.js";
3
+ } from "./chunk-3BDIPKMO.js";
4
4
  import {
5
5
  __name
6
6
  } from "./chunk-3GQAWCBQ.js";
@@ -1,16 +1,16 @@
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(); } } 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 _chunk3VWVLTGDcjs = require('./chunk-3VWVLTGD.cjs');
3
+ var _chunkITHOVA3Dcjs = require('./chunk-ITHOVA3D.cjs');
4
4
 
5
5
 
6
- var _chunk7AESM4QFcjs = require('./chunk-7AESM4QF.cjs');
6
+ var _chunk3BXXHK3Fcjs = require('./chunk-3BXXHK3F.cjs');
7
7
 
8
8
 
9
- var _chunkMNQGUEQ7cjs = require('./chunk-MNQGUEQ7.cjs');
9
+ var _chunkF4MPFQDIcjs = require('./chunk-F4MPFQDI.cjs');
10
10
 
11
11
 
12
12
 
13
- var _chunkHEBZFJ2Ncjs = require('./chunk-HEBZFJ2N.cjs');
13
+ var _chunkNVI74UAFcjs = require('./chunk-NVI74UAF.cjs');
14
14
 
15
15
 
16
16
 
@@ -33,7 +33,7 @@ var _chunkHEBZFJ2Ncjs = require('./chunk-HEBZFJ2N.cjs');
33
33
 
34
34
 
35
35
 
36
- var _chunkOFV7JN7Ocjs = require('./chunk-OFV7JN7O.cjs');
36
+ var _chunkPWE7CANFcjs = require('./chunk-PWE7CANF.cjs');
37
37
 
38
38
 
39
39
  var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
@@ -86,8 +86,8 @@ var copyAssets = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (co
86
86
  output: "src/"
87
87
  });
88
88
  }
89
- _chunkOFV7JN7Ocjs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
90
- ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkOFV7JN7Ocjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
89
+ _chunkPWE7CANFcjs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
90
+ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkPWE7CANFcjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
91
91
  const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
92
92
  projectDir: projectRoot,
93
93
  rootDir: config.workspaceRoot,
@@ -96,12 +96,12 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
96
96
  });
97
97
  await assetHandler.processAllAssetsOnce();
98
98
  if (includeSrc === true) {
99
- _chunkOFV7JN7Ocjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkOFV7JN7Ocjs.joinPaths.call(void 0, outputPath, "src")}`, config);
99
+ _chunkPWE7CANFcjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkPWE7CANFcjs.joinPaths.call(void 0, outputPath, "src")}`, config);
100
100
  const files = await _glob.glob.call(void 0, [
101
- _chunkOFV7JN7Ocjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
102
- _chunkOFV7JN7Ocjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
103
- _chunkOFV7JN7Ocjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
104
- _chunkOFV7JN7Ocjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
101
+ _chunkPWE7CANFcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
102
+ _chunkPWE7CANFcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
103
+ _chunkPWE7CANFcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
104
+ _chunkPWE7CANFcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
105
105
  ]);
106
106
  await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
107
107
 
@@ -124,7 +124,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void
124
124
  for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && _optionalChain([dep, 'access', _ => _.node, 'access', _2 => _2.data, 'optionalAccess', _3 => _3.root]) !== projectRoot && _optionalChain([dep, 'access', _4 => _4.node, 'access', _5 => _5.data, 'optionalAccess', _6 => _6.root]) !== workspaceRoot)) {
125
125
  const projectNode = project.node;
126
126
  if (projectNode.data.root) {
127
- const projectPackageJsonPath = _chunkOFV7JN7Ocjs.joinPaths.call(void 0, workspaceRoot, projectNode.data.root, "package.json");
127
+ const projectPackageJsonPath = _chunkPWE7CANFcjs.joinPaths.call(void 0, workspaceRoot, projectNode.data.root, "package.json");
128
128
  if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
129
129
  const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
130
130
  const projectPackageJson = JSON.parse(projectPackageJsonContent);
@@ -135,8 +135,8 @@ var addPackageDependencies = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void
135
135
  }
136
136
  }
137
137
  if (localPackages.length > 0) {
138
- _chunkOFV7JN7Ocjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
139
- const projectJsonFile = await _promises.readFile.call(void 0, _chunkOFV7JN7Ocjs.joinPaths.call(void 0, projectRoot, "project.json"), "utf8");
138
+ _chunkPWE7CANFcjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
139
+ const projectJsonFile = await _promises.readFile.call(void 0, _chunkPWE7CANFcjs.joinPaths.call(void 0, projectRoot, "project.json"), "utf8");
140
140
  const projectJson = JSON.parse(projectJsonFile);
141
141
  const projectName2 = projectJson.name;
142
142
  const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
@@ -145,7 +145,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void
145
145
  }
146
146
  const implicitDependencies = _optionalChain([projectConfigurations, 'access', _9 => _9.projects, 'optionalAccess', _10 => _10[projectName2], 'access', _11 => _11.implicitDependencies, 'optionalAccess', _12 => _12.reduce, 'call', _13 => _13((ret, dep) => {
147
147
  if (_optionalChain([projectConfigurations, 'access', _14 => _14.projects, 'optionalAccess', _15 => _15[dep]])) {
148
- const depPackageJsonPath = _chunkOFV7JN7Ocjs.joinPaths.call(void 0, workspaceRoot, projectConfigurations.projects[dep].root, "package.json");
148
+ const depPackageJsonPath = _chunkPWE7CANFcjs.joinPaths.call(void 0, workspaceRoot, projectConfigurations.projects[dep].root, "package.json");
149
149
  if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
150
150
  const depPackageJsonContent = _fs.readFileSync.call(void 0, depPackageJsonPath, "utf8");
151
151
  const depPackageJson = JSON.parse(depPackageJsonContent);
@@ -169,13 +169,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void
169
169
  return ret;
170
170
  }, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
171
171
  } else {
172
- _chunkOFV7JN7Ocjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
172
+ _chunkPWE7CANFcjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
173
173
  }
174
174
  return packageJson;
175
175
  }, "addPackageDependencies");
176
176
  var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
177
- const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunkOFV7JN7Ocjs.findWorkspaceRoot.call(void 0, );
178
- const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkOFV7JN7Ocjs.joinPaths.call(void 0, workspaceRoot, "package.json"), "utf8");
177
+ const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunkPWE7CANFcjs.findWorkspaceRoot.call(void 0, );
178
+ const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkPWE7CANFcjs.joinPaths.call(void 0, workspaceRoot, "package.json"), "utf8");
179
179
  const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
180
180
  packageJson.type ??= "module";
181
181
  packageJson.sideEffects ??= false;
@@ -184,7 +184,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.cal
184
184
  if (distSrc.startsWith("/")) {
185
185
  distSrc = distSrc.substring(1);
186
186
  }
187
- packageJson.source ??= `${_chunkOFV7JN7Ocjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
187
+ packageJson.source ??= `${_chunkPWE7CANFcjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
188
188
  }
189
189
  packageJson.files ??= [
190
190
  "dist/**/*"
@@ -215,7 +215,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.cal
215
215
  ];
216
216
  }
217
217
  packageJson.repository ??= workspacePackageJson.repository;
218
- packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkOFV7JN7Ocjs.joinPaths.call(void 0, "packages", projectName);
218
+ packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkPWE7CANFcjs.joinPaths.call(void 0, "packages", projectName);
219
219
  return packageJson;
220
220
  }, "addWorkspacePackageJsonFields");
221
221
 
@@ -223,7 +223,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.cal
223
223
  var _c12 = require('c12');
224
224
  var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
225
225
  var getConfigFileByName = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (fileName, filePath, options = {}) => {
226
- const workspacePath = filePath || _chunkOFV7JN7Ocjs.findWorkspaceRoot.call(void 0, filePath);
226
+ const workspacePath = filePath || _chunkPWE7CANFcjs.findWorkspaceRoot.call(void 0, filePath);
227
227
  const configs = await Promise.all([
228
228
  _c12.loadConfig.call(void 0, {
229
229
  cwd: workspacePath,
@@ -232,7 +232,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0,
232
232
  envName: _optionalChain([fileName, 'optionalAccess', _24 => _24.toUpperCase, 'call', _25 => _25()]),
233
233
  jitiOptions: {
234
234
  debug: false,
235
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkOFV7JN7Ocjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
235
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkPWE7CANFcjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
236
236
  },
237
237
  ...options
238
238
  }),
@@ -243,7 +243,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0,
243
243
  envName: _optionalChain([fileName, 'optionalAccess', _26 => _26.toUpperCase, 'call', _27 => _27()]),
244
244
  jitiOptions: {
245
245
  debug: false,
246
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkOFV7JN7Ocjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
246
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkPWE7CANFcjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
247
247
  },
248
248
  configFile: fileName,
249
249
  ...options
@@ -252,12 +252,12 @@ var getConfigFileByName = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0,
252
252
  return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
253
253
  }, "getConfigFileByName");
254
254
  var getConfigFile = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (filePath, additionalFileNames = []) => {
255
- const workspacePath = filePath ? filePath : _chunkOFV7JN7Ocjs.findWorkspaceRoot.call(void 0, filePath);
255
+ const workspacePath = filePath ? filePath : _chunkPWE7CANFcjs.findWorkspaceRoot.call(void 0, filePath);
256
256
  const result = await getConfigFileByName("storm-workspace", workspacePath);
257
257
  let config = result.config;
258
258
  const configFile = result.configFile;
259
259
  if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
260
- _chunkOFV7JN7Ocjs.writeTrace.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
260
+ _chunkPWE7CANFcjs.writeTrace.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
261
261
  logLevel: "all"
262
262
  });
263
263
  }
@@ -266,7 +266,7 @@ var getConfigFile = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
266
266
  for (const result2 of results) {
267
267
  if (_optionalChain([result2, 'optionalAccess', _28 => _28.config]) && _optionalChain([result2, 'optionalAccess', _29 => _29.configFile]) && Object.keys(result2.config).length > 0) {
268
268
  if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
269
- _chunkOFV7JN7Ocjs.writeTrace.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
269
+ _chunkPWE7CANFcjs.writeTrace.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
270
270
  logLevel: "all"
271
271
  });
272
272
  }
@@ -274,7 +274,7 @@ var getConfigFile = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
274
274
  }
275
275
  }
276
276
  }
277
- if (!config) {
277
+ if (!config || Object.keys(config).length === 0) {
278
278
  return void 0;
279
279
  }
280
280
  config.configFile = configFile;
@@ -332,15 +332,15 @@ var getConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, () => {
332
332
  contact: process.env[`${prefix}CONTACT`] || void 0,
333
333
  timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
334
334
  locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
335
- configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunkOFV7JN7Ocjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
336
- workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkOFV7JN7Ocjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
335
+ configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunkPWE7CANFcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
336
+ workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkPWE7CANFcjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
337
337
  directories: {
338
- cache: process.env[`${prefix}CACHE_DIR`] ? _chunkOFV7JN7Ocjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
339
- data: process.env[`${prefix}DATA_DIR`] ? _chunkOFV7JN7Ocjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
340
- config: process.env[`${prefix}CONFIG_DIR`] ? _chunkOFV7JN7Ocjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
341
- temp: process.env[`${prefix}TEMP_DIR`] ? _chunkOFV7JN7Ocjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
342
- log: process.env[`${prefix}LOG_DIR`] ? _chunkOFV7JN7Ocjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
343
- build: process.env[`${prefix}BUILD_DIR`] ? _chunkOFV7JN7Ocjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : void 0
338
+ cache: process.env[`${prefix}CACHE_DIR`] ? _chunkPWE7CANFcjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? _chunkPWE7CANFcjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
339
+ data: process.env[`${prefix}DATA_DIR`] ? _chunkPWE7CANFcjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? _chunkPWE7CANFcjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
340
+ config: process.env[`${prefix}CONFIG_DIR`] ? _chunkPWE7CANFcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? _chunkPWE7CANFcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
341
+ temp: process.env[`${prefix}TEMP_DIR`] ? _chunkPWE7CANFcjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? _chunkPWE7CANFcjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
342
+ log: process.env[`${prefix}LOG_DIR`] ? _chunkPWE7CANFcjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? _chunkPWE7CANFcjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
343
+ build: process.env[`${prefix}BUILD_DIR`] ? _chunkPWE7CANFcjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? _chunkPWE7CANFcjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
344
344
  },
345
345
  skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
346
346
  mode: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}MODE`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
@@ -363,24 +363,24 @@ var getConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, () => {
363
363
  cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
364
364
  container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
365
365
  },
366
- 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`])) ? _chunkOFV7JN7Ocjs.getLogLevelLabel.call(void 0, Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0,
366
+ 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`])) ? _chunkPWE7CANFcjs.getLogLevelLabel.call(void 0, Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0,
367
367
  skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
368
368
  };
369
- const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunkOFV7JN7Ocjs.COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
369
+ const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunkPWE7CANFcjs.COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
370
370
  config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
371
371
  ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
372
372
  return ret;
373
373
  }, {}) : getThemeColorConfigEnv(prefix);
374
- if (config.docs === _chunkOFV7JN7Ocjs.STORM_DEFAULT_DOCS) {
375
- if (config.homepage === _chunkOFV7JN7Ocjs.STORM_DEFAULT_HOMEPAGE) {
376
- config.docs = `${_chunkOFV7JN7Ocjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
374
+ if (config.docs === _chunkPWE7CANFcjs.STORM_DEFAULT_DOCS) {
375
+ if (config.homepage === _chunkPWE7CANFcjs.STORM_DEFAULT_HOMEPAGE) {
376
+ config.docs = `${_chunkPWE7CANFcjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
377
377
  } else {
378
378
  config.docs = `${config.homepage}/docs`;
379
379
  }
380
380
  }
381
- if (config.licensing === _chunkOFV7JN7Ocjs.STORM_DEFAULT_LICENSING) {
382
- if (config.homepage === _chunkOFV7JN7Ocjs.STORM_DEFAULT_HOMEPAGE) {
383
- config.licensing = `${_chunkOFV7JN7Ocjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
381
+ if (config.licensing === _chunkPWE7CANFcjs.STORM_DEFAULT_LICENSING) {
382
+ if (config.homepage === _chunkPWE7CANFcjs.STORM_DEFAULT_HOMEPAGE) {
383
+ config.licensing = `${_chunkPWE7CANFcjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
384
384
  } else {
385
385
  config.licensing = `${config.homepage}/docs`;
386
386
  }
@@ -550,31 +550,37 @@ var setConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (config
550
550
  process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
551
551
  }
552
552
  if (config.configFile) {
553
- process.env[`${prefix}CONFIG_FILE`] = _chunkOFV7JN7Ocjs.correctPaths.call(void 0, config.configFile);
553
+ process.env[`${prefix}CONFIG_FILE`] = _chunkPWE7CANFcjs.correctPaths.call(void 0, config.configFile);
554
554
  }
555
555
  if (config.workspaceRoot) {
556
- process.env[`${prefix}WORKSPACE_ROOT`] = _chunkOFV7JN7Ocjs.correctPaths.call(void 0, config.workspaceRoot);
557
- process.env.NX_WORKSPACE_ROOT = _chunkOFV7JN7Ocjs.correctPaths.call(void 0, config.workspaceRoot);
558
- process.env.NX_WORKSPACE_ROOT_PATH = _chunkOFV7JN7Ocjs.correctPaths.call(void 0, config.workspaceRoot);
556
+ process.env[`${prefix}WORKSPACE_ROOT`] = _chunkPWE7CANFcjs.correctPaths.call(void 0, config.workspaceRoot);
557
+ process.env.NX_WORKSPACE_ROOT = _chunkPWE7CANFcjs.correctPaths.call(void 0, config.workspaceRoot);
558
+ process.env.NX_WORKSPACE_ROOT_PATH = _chunkPWE7CANFcjs.correctPaths.call(void 0, config.workspaceRoot);
559
559
  }
560
560
  if (config.directories) {
561
561
  if (!config.skipCache && config.directories.cache) {
562
- process.env[`${prefix}CACHE_DIR`] = _chunkOFV7JN7Ocjs.correctPaths.call(void 0, config.directories.cache);
562
+ process.env[`${prefix}CACHE_DIR`] = _chunkPWE7CANFcjs.correctPaths.call(void 0, config.directories.cache);
563
+ process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
563
564
  }
564
565
  if (config.directories.data) {
565
- process.env[`${prefix}DATA_DIR`] = _chunkOFV7JN7Ocjs.correctPaths.call(void 0, config.directories.data);
566
+ process.env[`${prefix}DATA_DIR`] = _chunkPWE7CANFcjs.correctPaths.call(void 0, config.directories.data);
567
+ process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
566
568
  }
567
569
  if (config.directories.config) {
568
- process.env[`${prefix}CONFIG_DIR`] = _chunkOFV7JN7Ocjs.correctPaths.call(void 0, config.directories.config);
570
+ process.env[`${prefix}CONFIG_DIR`] = _chunkPWE7CANFcjs.correctPaths.call(void 0, config.directories.config);
571
+ process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
569
572
  }
570
573
  if (config.directories.temp) {
571
- process.env[`${prefix}TEMP_DIR`] = _chunkOFV7JN7Ocjs.correctPaths.call(void 0, config.directories.temp);
574
+ process.env[`${prefix}TEMP_DIR`] = _chunkPWE7CANFcjs.correctPaths.call(void 0, config.directories.temp);
575
+ process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
572
576
  }
573
577
  if (config.directories.log) {
574
- process.env[`${prefix}LOG_DIR`] = _chunkOFV7JN7Ocjs.correctPaths.call(void 0, config.directories.log);
578
+ process.env[`${prefix}LOG_DIR`] = _chunkPWE7CANFcjs.correctPaths.call(void 0, config.directories.log);
579
+ process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
575
580
  }
576
581
  if (config.directories.build) {
577
- process.env[`${prefix}BUILD_DIR`] = _chunkOFV7JN7Ocjs.correctPaths.call(void 0, config.directories.build);
582
+ process.env[`${prefix}BUILD_DIR`] = _chunkPWE7CANFcjs.correctPaths.call(void 0, config.directories.build);
583
+ process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
578
584
  }
579
585
  }
580
586
  if (config.skipCache !== void 0) {
@@ -628,8 +634,8 @@ var setConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (config
628
634
  if (config.logLevel) {
629
635
  process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
630
636
  process.env.LOG_LEVEL = String(config.logLevel);
631
- process.env.NX_VERBOSE_LOGGING = String(_chunkOFV7JN7Ocjs.getLogLevel.call(void 0, config.logLevel) >= _chunkOFV7JN7Ocjs.LogLevel.DEBUG ? true : false);
632
- process.env.RUST_BACKTRACE = _chunkOFV7JN7Ocjs.getLogLevel.call(void 0, config.logLevel) >= _chunkOFV7JN7Ocjs.LogLevel.DEBUG ? "full" : "none";
637
+ process.env.NX_VERBOSE_LOGGING = String(_chunkPWE7CANFcjs.getLogLevel.call(void 0, config.logLevel) >= _chunkPWE7CANFcjs.LogLevel.DEBUG ? true : false);
638
+ process.env.RUST_BACKTRACE = _chunkPWE7CANFcjs.getLogLevel.call(void 0, config.logLevel) >= _chunkPWE7CANFcjs.LogLevel.DEBUG ? "full" : "none";
633
639
  }
634
640
  if (config.skipConfigLogging !== void 0) {
635
641
  process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
@@ -742,22 +748,27 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(v
742
748
  // ../config-tools/src/create-storm-config.ts
743
749
  var _extension_cache = /* @__PURE__ */ new WeakMap();
744
750
  var _static_cache = void 0;
745
- var createStormWorkspaceConfig = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (extensionName, schema, workspaceRoot, skipLogs = false) => {
751
+ var createStormWorkspaceConfig = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
746
752
  let result;
747
753
  if (!_optionalChain([_static_cache, 'optionalAccess', _52 => _52.data]) || !_optionalChain([_static_cache, 'optionalAccess', _53 => _53.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
748
754
  let _workspaceRoot = workspaceRoot;
749
755
  if (!_workspaceRoot) {
750
- _workspaceRoot = _chunkOFV7JN7Ocjs.findWorkspaceRoot.call(void 0, );
756
+ _workspaceRoot = _chunkPWE7CANFcjs.findWorkspaceRoot.call(void 0, );
751
757
  }
752
758
  const configEnv = getConfigEnv();
753
- const defaultConfig = await _chunkOFV7JN7Ocjs.getDefaultConfig.call(void 0, _workspaceRoot);
754
759
  const configFile = await getConfigFile(_workspaceRoot);
755
- if (!configFile && !skipLogs) {
756
- _chunkOFV7JN7Ocjs.writeWarning.call(void 0, "No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
757
- logLevel: "all"
758
- });
760
+ if (!configFile) {
761
+ if (!skipLogs) {
762
+ _chunkPWE7CANFcjs.writeWarning.call(void 0, "No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
763
+ logLevel: "all"
764
+ });
765
+ }
766
+ if (useDefault === false) {
767
+ return void 0;
768
+ }
759
769
  }
760
- result = await _chunkOFV7JN7Ocjs.stormWorkspaceConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
770
+ const defaultConfig = await _chunkPWE7CANFcjs.getDefaultConfig.call(void 0, _workspaceRoot);
771
+ result = await _chunkPWE7CANFcjs.stormWorkspaceConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
761
772
  result.workspaceRoot ??= _workspaceRoot;
762
773
  } else {
763
774
  result = _static_cache.data;
@@ -789,11 +800,11 @@ var createConfigExtension = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0
789
800
  return extension;
790
801
  }, "createConfigExtension");
791
802
  var loadStormWorkspaceConfig = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (workspaceRoot, skipLogs = false) => {
792
- const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
803
+ const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs, true);
793
804
  setConfigEnv(config);
794
805
  if (!skipLogs && !config.skipConfigLogging) {
795
- _chunkOFV7JN7Ocjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm Workspace configuration:
796
- ${_chunkOFV7JN7Ocjs.formatLogMessage.call(void 0, config)}`, config);
806
+ _chunkPWE7CANFcjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm Workspace configuration:
807
+ ${_chunkPWE7CANFcjs.formatLogMessage.call(void 0, config)}`, config);
797
808
  }
798
809
  return config;
799
810
  }, "loadStormWorkspaceConfig");
@@ -822,24 +833,24 @@ var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
822
833
  var _findworkspaceroot = require('nx/src/utils/find-workspace-root');
823
834
  var _unbuild = require('unbuild');
824
835
  async function resolveOptions(options, config) {
825
- _chunkOFV7JN7Ocjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
826
- const stopwatch = _chunkOFV7JN7Ocjs.getStopwatch.call(void 0, "Build options resolution");
836
+ _chunkPWE7CANFcjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
837
+ const stopwatch = _chunkPWE7CANFcjs.getStopwatch.call(void 0, "Build options resolution");
827
838
  if (options.configPath) {
828
- const configFile = await _chunkHEBZFJ2Ncjs.loadConfig.call(void 0, options.configPath);
839
+ const configFile = await _chunkNVI74UAFcjs.loadConfig.call(void 0, options.configPath);
829
840
  if (configFile) {
830
841
  options = _defu2.default.call(void 0, options, configFile);
831
842
  }
832
843
  }
833
- const outputPath = options.outputPath || _chunkOFV7JN7Ocjs.joinPaths.call(void 0, "dist", options.projectRoot);
844
+ const outputPath = options.outputPath || _chunkPWE7CANFcjs.joinPaths.call(void 0, "dist", options.projectRoot);
834
845
  const projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
835
- const projectJsonPath = _chunkOFV7JN7Ocjs.joinPaths.call(void 0, config.workspaceRoot, options.projectRoot, "project.json");
846
+ const projectJsonPath = _chunkPWE7CANFcjs.joinPaths.call(void 0, config.workspaceRoot, options.projectRoot, "project.json");
836
847
  if (!_fs.existsSync.call(void 0, projectJsonPath)) {
837
848
  throw new Error("Cannot find project.json configuration");
838
849
  }
839
850
  const projectJsonContent = await _promises.readFile.call(void 0, projectJsonPath, "utf8");
840
851
  const projectJson = JSON.parse(projectJsonContent);
841
852
  const projectName = projectJson.name;
842
- const packageJsonPath = _chunkOFV7JN7Ocjs.joinPaths.call(void 0, config.workspaceRoot, options.projectRoot, "package.json");
853
+ const packageJsonPath = _chunkPWE7CANFcjs.joinPaths.call(void 0, config.workspaceRoot, options.projectRoot, "package.json");
843
854
  if (!_fs.existsSync.call(void 0, packageJsonPath)) {
844
855
  throw new Error("Cannot find package.json configuration");
845
856
  }
@@ -847,17 +858,17 @@ async function resolveOptions(options, config) {
847
858
  const packageJson = JSON.parse(packageJsonContent);
848
859
  let tsconfig = options.tsconfig;
849
860
  if (!tsconfig) {
850
- tsconfig = _chunkOFV7JN7Ocjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json");
861
+ tsconfig = _chunkPWE7CANFcjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json");
851
862
  }
852
863
  if (!tsconfig.startsWith(config.workspaceRoot)) {
853
- tsconfig = _chunkOFV7JN7Ocjs.joinPaths.call(void 0, config.workspaceRoot, tsconfig);
864
+ tsconfig = _chunkPWE7CANFcjs.joinPaths.call(void 0, config.workspaceRoot, tsconfig);
854
865
  }
855
866
  if (!_fs.existsSync.call(void 0, tsconfig)) {
856
867
  throw new Error("Cannot find tsconfig.json configuration");
857
868
  }
858
869
  let sourceRoot = projectJson.sourceRoot;
859
870
  if (!sourceRoot) {
860
- sourceRoot = _chunkOFV7JN7Ocjs.joinPaths.call(void 0, options.projectRoot, "src");
871
+ sourceRoot = _chunkPWE7CANFcjs.joinPaths.call(void 0, options.projectRoot, "src");
861
872
  }
862
873
  if (!_fs.existsSync.call(void 0, sourceRoot)) {
863
874
  throw new Error("Cannot find sourceRoot directory");
@@ -892,13 +903,13 @@ async function resolveOptions(options, config) {
892
903
  while (entryPath.startsWith("/")) {
893
904
  entryPath = entryPath.substring(1);
894
905
  }
895
- const outDir = _chunkOFV7JN7Ocjs.joinPaths.call(void 0, _path.relative.call(void 0, _chunkOFV7JN7Ocjs.joinPaths.call(void 0, config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist");
906
+ const outDir = _chunkPWE7CANFcjs.joinPaths.call(void 0, _path.relative.call(void 0, _chunkPWE7CANFcjs.joinPaths.call(void 0, config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist");
896
907
  ret.push({
897
908
  name: `${name}-esm`,
898
909
  builder: "mkdist",
899
910
  input: `./${entryPath}`,
900
911
  outDir,
901
- declaration: options.emitTypes !== false ? "compatible" : false,
912
+ declaration: options.dts !== false ? "compatible" : false,
902
913
  format: "esm",
903
914
  ext: "mjs"
904
915
  });
@@ -907,13 +918,13 @@ async function resolveOptions(options, config) {
907
918
  builder: "mkdist",
908
919
  input: `./${entryPath}`,
909
920
  outDir,
910
- declaration: options.emitTypes !== false ? "compatible" : false,
921
+ declaration: options.dts !== false ? "compatible" : false,
911
922
  format: "cjs",
912
923
  ext: "cjs"
913
924
  });
914
925
  return ret;
915
926
  }, []),
916
- declaration: options.emitTypes !== false ? "compatible" : false,
927
+ declaration: options.dts !== false ? "compatible" : false,
917
928
  failOnWarn: false,
918
929
  sourcemap: _nullishCoalesce(options.sourcemap, () => ( !!options.debug)),
919
930
  outDir: outputPath,
@@ -966,7 +977,7 @@ async function resolveOptions(options, config) {
966
977
  treeShaking: options.treeShaking !== false,
967
978
  platform: options.platform || "neutral",
968
979
  color: true,
969
- logLevel: config.logLevel === _chunkOFV7JN7Ocjs.LogLevelLabel.FATAL ? _chunkOFV7JN7Ocjs.LogLevelLabel.ERROR : _chunkOFV7JN7Ocjs.isVerbose.call(void 0, ) ? "verbose" : config.logLevel
980
+ logLevel: config.logLevel === _chunkPWE7CANFcjs.LogLevelLabel.FATAL ? _chunkPWE7CANFcjs.LogLevelLabel.ERROR : _chunkPWE7CANFcjs.isVerbose.call(void 0, ) ? "verbose" : config.logLevel
970
981
  }
971
982
  }
972
983
  };
@@ -983,7 +994,7 @@ async function resolveOptions(options, config) {
983
994
  if (options.rollup) {
984
995
  let rollup = {};
985
996
  if (typeof options.rollup === "string") {
986
- const rollupFile = await _chunkHEBZFJ2Ncjs.loadConfig.call(void 0, options.rollup);
997
+ const rollupFile = await _chunkNVI74UAFcjs.loadConfig.call(void 0, options.rollup);
987
998
  if (rollupFile) {
988
999
  rollup = rollupFile;
989
1000
  }
@@ -995,14 +1006,14 @@ async function resolveOptions(options, config) {
995
1006
  resolvedOptions.hooks = {
996
1007
  "rollup:options": /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (ctx, opts) => {
997
1008
  if (options.plugins && options.plugins.length > 0) {
998
- _chunkOFV7JN7Ocjs.writeDebug.call(void 0, ` \u{1F9E9} Found ${options.plugins.length} plugins in provided build options`, config);
1009
+ _chunkPWE7CANFcjs.writeDebug.call(void 0, ` \u{1F9E9} Found ${options.plugins.length} plugins in provided build options`, config);
999
1010
  opts.plugins = options.plugins;
1000
1011
  } else {
1001
- _chunkOFV7JN7Ocjs.writeDebug.call(void 0, ` \u{1F9E9} No plugins found in provided build options, using default plugins`, config);
1012
+ _chunkPWE7CANFcjs.writeDebug.call(void 0, ` \u{1F9E9} No plugins found in provided build options, using default plugins`, config);
1002
1013
  opts.plugins = await Promise.all([
1003
- _chunk7AESM4QFcjs.analyzePlugin.call(void 0, resolvedOptions),
1004
- _chunkHEBZFJ2Ncjs.tscPlugin.call(void 0, resolvedOptions),
1005
- _chunkMNQGUEQ7cjs.onErrorPlugin.call(void 0, resolvedOptions)
1014
+ _chunk3BXXHK3Fcjs.analyzePlugin.call(void 0, resolvedOptions),
1015
+ _chunkNVI74UAFcjs.tscPlugin.call(void 0, resolvedOptions),
1016
+ _chunkF4MPFQDIcjs.onErrorPlugin.call(void 0, resolvedOptions)
1006
1017
  ]);
1007
1018
  }
1008
1019
  }, "rollup:options"),
@@ -1055,14 +1066,14 @@ var addPackageJsonExport = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0,
1055
1066
  };
1056
1067
  }, "addPackageJsonExport");
1057
1068
  async function generatePackageJson(options) {
1058
- if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkOFV7JN7Ocjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
1059
- _chunkOFV7JN7Ocjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
1060
- const stopwatch = _chunkOFV7JN7Ocjs.getStopwatch.call(void 0, "Write package.json file");
1061
- const packageJsonPath = _chunkOFV7JN7Ocjs.joinPaths.call(void 0, options.projectRoot, "project.json");
1069
+ if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkPWE7CANFcjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
1070
+ _chunkPWE7CANFcjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
1071
+ const stopwatch = _chunkPWE7CANFcjs.getStopwatch.call(void 0, "Write package.json file");
1072
+ const packageJsonPath = _chunkPWE7CANFcjs.joinPaths.call(void 0, options.projectRoot, "project.json");
1062
1073
  if (!_fs.existsSync.call(void 0, packageJsonPath)) {
1063
1074
  throw new Error("Cannot find package.json configuration");
1064
1075
  }
1065
- const packageJsonContent = await _promises.readFile.call(void 0, _chunkOFV7JN7Ocjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
1076
+ const packageJsonContent = await _promises.readFile.call(void 0, _chunkPWE7CANFcjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
1066
1077
  if (!packageJsonContent) {
1067
1078
  throw new Error("Cannot find package.json configuration file");
1068
1079
  }
@@ -1079,7 +1090,7 @@ async function generatePackageJson(options) {
1079
1090
  while (entryPath.startsWith("/")) {
1080
1091
  entryPath = entryPath.substring(1);
1081
1092
  }
1082
- entryPath = `./${_chunkOFV7JN7Ocjs.joinPaths.call(void 0, options.projectRoot, entryPath)}`;
1093
+ entryPath = `./${_chunkPWE7CANFcjs.joinPaths.call(void 0, options.projectRoot, entryPath)}`;
1083
1094
  if (!ret.includes(entryPath)) {
1084
1095
  ret.push(entryPath);
1085
1096
  }
@@ -1110,23 +1121,23 @@ async function generatePackageJson(options) {
1110
1121
  }, packageJson.exports);
1111
1122
  packageJson.exports["./package.json"] ??= "./package.json";
1112
1123
  packageJson.exports["."] ??= addPackageJsonExport("index", packageJson.type, options.sourceRoot, options.projectRoot);
1113
- await _devkit.writeJsonFile.call(void 0, _chunkOFV7JN7Ocjs.joinPaths.call(void 0, options.outDir, "package.json"), packageJson);
1124
+ await _devkit.writeJsonFile.call(void 0, _chunkPWE7CANFcjs.joinPaths.call(void 0, options.outDir, "package.json"), packageJson);
1114
1125
  stopwatch();
1115
1126
  }
1116
1127
  return options;
1117
1128
  }
1118
1129
  _chunkBGYQAVKQcjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
1119
1130
  async function executeUnbuild(options) {
1120
- _chunkOFV7JN7Ocjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} (${options.projectRoot}) build`, options.config);
1121
- const stopwatch = _chunkOFV7JN7Ocjs.getStopwatch.call(void 0, `${options.name} (${options.projectRoot}) build`);
1131
+ _chunkPWE7CANFcjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} (${options.projectRoot}) build`, options.config);
1132
+ const stopwatch = _chunkPWE7CANFcjs.getStopwatch.call(void 0, `${options.name} (${options.projectRoot}) build`);
1122
1133
  try {
1123
1134
  const config = {
1124
1135
  ...options,
1125
1136
  config: null,
1126
- rootDir: _chunkOFV7JN7Ocjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot)
1137
+ rootDir: _chunkPWE7CANFcjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot)
1127
1138
  };
1128
- _chunkOFV7JN7Ocjs.writeTrace.call(void 0, `Running with unbuild configuration:
1129
- ${_chunkOFV7JN7Ocjs.formatLogMessage.call(void 0, {
1139
+ _chunkPWE7CANFcjs.writeTrace.call(void 0, `Running with unbuild configuration:
1140
+ ${_chunkPWE7CANFcjs.formatLogMessage.call(void 0, {
1130
1141
  ...config,
1131
1142
  env: "<Hidden>"
1132
1143
  })}
@@ -1139,8 +1150,8 @@ ${_chunkOFV7JN7Ocjs.formatLogMessage.call(void 0, {
1139
1150
  }
1140
1151
  _chunkBGYQAVKQcjs.__name.call(void 0, executeUnbuild, "executeUnbuild");
1141
1152
  async function copyBuildAssets(options) {
1142
- _chunkOFV7JN7Ocjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`, options.config);
1143
- const stopwatch = _chunkOFV7JN7Ocjs.getStopwatch.call(void 0, `${options.name} asset copy`);
1153
+ _chunkPWE7CANFcjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`, options.config);
1154
+ const stopwatch = _chunkPWE7CANFcjs.getStopwatch.call(void 0, `${options.name} asset copy`);
1144
1155
  await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outDir, options.projectRoot, options.sourceRoot, options.generatePackageJson, options.includeSrc);
1145
1156
  stopwatch();
1146
1157
  return options;
@@ -1148,9 +1159,9 @@ async function copyBuildAssets(options) {
1148
1159
  _chunkBGYQAVKQcjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
1149
1160
  async function cleanOutputPath(options) {
1150
1161
  if (options.clean !== false && options.outDir) {
1151
- _chunkOFV7JN7Ocjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${options.name} output path: ${options.outDir}`, options.config);
1152
- const stopwatch = _chunkOFV7JN7Ocjs.getStopwatch.call(void 0, `${options.name} output clean`);
1153
- await _chunk3VWVLTGDcjs.cleanDirectories.call(void 0, options.name, options.outDir, options.config);
1162
+ _chunkPWE7CANFcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${options.name} output path: ${options.outDir}`, options.config);
1163
+ const stopwatch = _chunkPWE7CANFcjs.getStopwatch.call(void 0, `${options.name} output clean`);
1164
+ await _chunkITHOVA3Dcjs.cleanDirectories.call(void 0, options.name, options.outDir, options.config);
1154
1165
  stopwatch();
1155
1166
  }
1156
1167
  return options;
@@ -1166,10 +1177,10 @@ async function build(options) {
1166
1177
  throw new Error("Cannot find workspace root");
1167
1178
  }
1168
1179
  const config = await getConfig(workspaceRoot.dir);
1169
- _chunkOFV7JN7Ocjs.writeDebug.call(void 0, ` \u26A1 Executing Storm Unbuild pipeline`, config);
1170
- const stopwatch = _chunkOFV7JN7Ocjs.getStopwatch.call(void 0, "Unbuild pipeline");
1180
+ _chunkPWE7CANFcjs.writeDebug.call(void 0, ` \u26A1 Executing Storm Unbuild pipeline`, config);
1181
+ const stopwatch = _chunkPWE7CANFcjs.getStopwatch.call(void 0, "Unbuild pipeline");
1171
1182
  try {
1172
- options.projectRoot = _chunkOFV7JN7Ocjs.correctPaths.call(void 0, projectRoot);
1183
+ options.projectRoot = _chunkPWE7CANFcjs.correctPaths.call(void 0, projectRoot);
1173
1184
  const resolvedOptions = await resolveOptions(options, config);
1174
1185
  await cleanOutputPath(resolvedOptions);
1175
1186
  if (options.buildOnly !== true) {
@@ -1179,9 +1190,9 @@ async function build(options) {
1179
1190
  if (options.buildOnly !== true) {
1180
1191
  await copyBuildAssets(resolvedOptions);
1181
1192
  }
1182
- _chunkOFV7JN7Ocjs.writeSuccess.call(void 0, ` \u{1F3C1} The ${resolvedOptions.name} build completed successfully`, config);
1193
+ _chunkPWE7CANFcjs.writeSuccess.call(void 0, ` \u{1F3C1} The ${resolvedOptions.name} build completed successfully`, config);
1183
1194
  } catch (error) {
1184
- _chunkOFV7JN7Ocjs.writeFatal.call(void 0, "Fatal errors that the build process could not recover from have occured. The build process has been terminated.", config);
1195
+ _chunkPWE7CANFcjs.writeFatal.call(void 0, "Fatal errors that the build process could not recover from have occured. The build process has been terminated.", config);
1185
1196
  throw error;
1186
1197
  } finally {
1187
1198
  stopwatch();
package/dist/clean.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunk3VWVLTGDcjs = require('./chunk-3VWVLTGD.cjs');
5
- require('./chunk-OFV7JN7O.cjs');
4
+ var _chunkITHOVA3Dcjs = require('./chunk-ITHOVA3D.cjs');
5
+ require('./chunk-PWE7CANF.cjs');
6
6
  require('./chunk-BGYQAVKQ.cjs');
7
7
 
8
8
 
9
9
 
10
- exports.clean = _chunk3VWVLTGDcjs.clean; exports.cleanDirectories = _chunk3VWVLTGDcjs.cleanDirectories;
10
+ exports.clean = _chunkITHOVA3Dcjs.clean; exports.cleanDirectories = _chunkITHOVA3Dcjs.cleanDirectories;
package/dist/clean.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  clean,
3
3
  cleanDirectories
4
- } from "./chunk-M7TXTZYC.js";
5
- import "./chunk-ICS2FLHB.js";
4
+ } from "./chunk-DUDE4LYM.js";
5
+ import "./chunk-3BDIPKMO.js";
6
6
  import "./chunk-3GQAWCBQ.js";
7
7
  export {
8
8
  clean,