@storm-software/tsdown 0.22.2 → 0.22.3

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.
@@ -20,7 +20,7 @@
20
20
 
21
21
 
22
22
 
23
- var _chunkEHVHDVI3cjs = require('./chunk-EHVHDVI3.cjs');
23
+ var _chunk2Z7WS4H3cjs = require('./chunk-2Z7WS4H3.cjs');
24
24
 
25
25
 
26
26
  var _chunk5KRF6IVWcjs = require('./chunk-5KRF6IVW.cjs');
@@ -60,41 +60,41 @@ var _promises = require('fs/promises');
60
60
  var _c12 = require('c12');
61
61
  var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
62
62
  var getConfigFileByName = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (fileName, filePath, options = {}) => {
63
- const workspacePath = filePath || _chunkEHVHDVI3cjs.findWorkspaceRoot.call(void 0, filePath);
64
- let config = await _c12.loadConfig.call(void 0, {
65
- cwd: workspacePath,
66
- packageJson: true,
67
- name: fileName,
68
- envName: _optionalChain([fileName, 'optionalAccess', _ => _.toUpperCase, 'call', _2 => _2()]),
69
- jitiOptions: {
70
- debug: false,
71
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkEHVHDVI3cjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
72
- },
73
- ...options
74
- });
75
- if (!config || Object.keys(config).length === 0) {
76
- config = await _c12.loadConfig.call(void 0, {
63
+ const workspacePath = filePath || _chunk2Z7WS4H3cjs.findWorkspaceRoot.call(void 0, filePath);
64
+ const configs = await Promise.all([
65
+ _c12.loadConfig.call(void 0, {
66
+ cwd: workspacePath,
67
+ packageJson: true,
68
+ name: fileName,
69
+ envName: _optionalChain([fileName, 'optionalAccess', _ => _.toUpperCase, 'call', _2 => _2()]),
70
+ jitiOptions: {
71
+ debug: false,
72
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunk2Z7WS4H3cjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
73
+ },
74
+ ...options
75
+ }),
76
+ _c12.loadConfig.call(void 0, {
77
77
  cwd: workspacePath,
78
78
  packageJson: true,
79
79
  name: fileName,
80
80
  envName: _optionalChain([fileName, 'optionalAccess', _3 => _3.toUpperCase, 'call', _4 => _4()]),
81
81
  jitiOptions: {
82
82
  debug: false,
83
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkEHVHDVI3cjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
83
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunk2Z7WS4H3cjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
84
84
  },
85
85
  configFile: fileName,
86
86
  ...options
87
- });
88
- }
89
- return config;
87
+ })
88
+ ]);
89
+ return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
90
90
  }, "getConfigFileByName");
91
91
  var getConfigFile = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (filePath, additionalFileNames = []) => {
92
- const workspacePath = filePath ? filePath : _chunkEHVHDVI3cjs.findWorkspaceRoot.call(void 0, filePath);
92
+ const workspacePath = filePath ? filePath : _chunk2Z7WS4H3cjs.findWorkspaceRoot.call(void 0, filePath);
93
93
  const result = await getConfigFileByName("storm", workspacePath);
94
94
  let config = result.config;
95
95
  const configFile = result.configFile;
96
96
  if (config && configFile && Object.keys(config).length > 0) {
97
- _chunkEHVHDVI3cjs.writeSystem.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
97
+ _chunk2Z7WS4H3cjs.writeTrace.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
98
98
  logLevel: "all"
99
99
  });
100
100
  }
@@ -102,7 +102,7 @@ var getConfigFile = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
102
102
  const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
103
103
  for (const result2 of results) {
104
104
  if (_optionalChain([result2, 'optionalAccess', _5 => _5.config]) && _optionalChain([result2, 'optionalAccess', _6 => _6.configFile]) && Object.keys(result2.config).length > 0) {
105
- _chunkEHVHDVI3cjs.writeSystem.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
105
+ _chunk2Z7WS4H3cjs.writeTrace.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
106
106
  logLevel: "all"
107
107
  });
108
108
  config = _defu2.default.call(void 0, _nullishCoalesce(result2.config, () => ( {})), _nullishCoalesce(config, () => ( {})));
@@ -120,6 +120,16 @@ var getConfigFile = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
120
120
 
121
121
 
122
122
  // ../config-tools/src/env/get-env.ts
123
+ var getExtensionEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (extensionName) => {
124
+ const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
125
+ return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
126
+ const name = key.replace(prefix, "").split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
127
+ if (name) {
128
+ ret[name] = process.env[key];
129
+ }
130
+ return ret;
131
+ }, {});
132
+ }, "getExtensionEnv");
123
133
  var getConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, () => {
124
134
  const prefix = "STORM_";
125
135
  let config = {
@@ -139,15 +149,15 @@ var getConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, () => {
139
149
  licensing: process.env[`${prefix}LICENSING`] || void 0,
140
150
  timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
141
151
  locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
142
- configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunkEHVHDVI3cjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
143
- workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkEHVHDVI3cjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
152
+ configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunk2Z7WS4H3cjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
153
+ workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunk2Z7WS4H3cjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
144
154
  directories: {
145
- cache: process.env[`${prefix}CACHE_DIR`] ? _chunkEHVHDVI3cjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
146
- data: process.env[`${prefix}DATA_DIR`] ? _chunkEHVHDVI3cjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
147
- config: process.env[`${prefix}CONFIG_DIR`] ? _chunkEHVHDVI3cjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
148
- temp: process.env[`${prefix}TEMP_DIR`] ? _chunkEHVHDVI3cjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
149
- log: process.env[`${prefix}LOG_DIR`] ? _chunkEHVHDVI3cjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
150
- build: process.env[`${prefix}BUILD_DIR`] ? _chunkEHVHDVI3cjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : void 0
155
+ cache: process.env[`${prefix}CACHE_DIR`] ? _chunk2Z7WS4H3cjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
156
+ data: process.env[`${prefix}DATA_DIR`] ? _chunk2Z7WS4H3cjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
157
+ config: process.env[`${prefix}CONFIG_DIR`] ? _chunk2Z7WS4H3cjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
158
+ temp: process.env[`${prefix}TEMP_DIR`] ? _chunk2Z7WS4H3cjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
159
+ log: process.env[`${prefix}LOG_DIR`] ? _chunk2Z7WS4H3cjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
160
+ build: process.env[`${prefix}BUILD_DIR`] ? _chunk2Z7WS4H3cjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : void 0
151
161
  },
152
162
  skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
153
163
  env: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}ENV`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
@@ -170,23 +180,23 @@ var getConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, () => {
170
180
  cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
171
181
  container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
172
182
  },
173
- logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? _chunkEHVHDVI3cjs.getLogLevelLabel.call(void 0, Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0
183
+ 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`])) ? _chunk2Z7WS4H3cjs.getLogLevelLabel.call(void 0, Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0
174
184
  };
175
- const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunkEHVHDVI3cjs.COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
185
+ const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunk2Z7WS4H3cjs.COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
176
186
  config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
177
187
  ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
178
188
  return ret;
179
189
  }, {}) : getThemeColorConfigEnv(prefix);
180
- if (config.docs === _chunkEHVHDVI3cjs.STORM_DEFAULT_DOCS) {
181
- if (config.homepage === _chunkEHVHDVI3cjs.STORM_DEFAULT_HOMEPAGE) {
182
- config.docs = `${_chunkEHVHDVI3cjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
190
+ if (config.docs === _chunk2Z7WS4H3cjs.STORM_DEFAULT_DOCS) {
191
+ if (config.homepage === _chunk2Z7WS4H3cjs.STORM_DEFAULT_HOMEPAGE) {
192
+ config.docs = `${_chunk2Z7WS4H3cjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
183
193
  } else {
184
194
  config.docs = `${config.homepage}/docs`;
185
195
  }
186
196
  }
187
- if (config.licensing === _chunkEHVHDVI3cjs.STORM_DEFAULT_LICENSING) {
188
- if (config.homepage === _chunkEHVHDVI3cjs.STORM_DEFAULT_HOMEPAGE) {
189
- config.licensing = `${_chunkEHVHDVI3cjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
197
+ if (config.licensing === _chunk2Z7WS4H3cjs.STORM_DEFAULT_LICENSING) {
198
+ if (config.homepage === _chunk2Z7WS4H3cjs.STORM_DEFAULT_HOMEPAGE) {
199
+ config.licensing = `${_chunk2Z7WS4H3cjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
190
200
  } else {
191
201
  config.licensing = `${config.homepage}/docs`;
192
202
  }
@@ -279,7 +289,7 @@ var setExtensionEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (ext
279
289
  var setConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config) => {
280
290
  const prefix = "STORM_";
281
291
  if (config.extends) {
282
- process.env[`${prefix}EXTENDS`] = config.extends;
292
+ process.env[`${prefix}EXTENDS`] = Array.isArray(config.extends) ? JSON.stringify(config.extends) : config.extends;
283
293
  }
284
294
  if (config.name) {
285
295
  process.env[`${prefix}NAME`] = config.name;
@@ -324,31 +334,31 @@ var setConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config
324
334
  process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
325
335
  }
326
336
  if (config.configFile) {
327
- process.env[`${prefix}CONFIG_FILE`] = _chunkEHVHDVI3cjs.correctPaths.call(void 0, config.configFile);
337
+ process.env[`${prefix}CONFIG_FILE`] = _chunk2Z7WS4H3cjs.correctPaths.call(void 0, config.configFile);
328
338
  }
329
339
  if (config.workspaceRoot) {
330
- process.env[`${prefix}WORKSPACE_ROOT`] = _chunkEHVHDVI3cjs.correctPaths.call(void 0, config.workspaceRoot);
331
- process.env.NX_WORKSPACE_ROOT = _chunkEHVHDVI3cjs.correctPaths.call(void 0, config.workspaceRoot);
332
- process.env.NX_WORKSPACE_ROOT_PATH = _chunkEHVHDVI3cjs.correctPaths.call(void 0, config.workspaceRoot);
340
+ process.env[`${prefix}WORKSPACE_ROOT`] = _chunk2Z7WS4H3cjs.correctPaths.call(void 0, config.workspaceRoot);
341
+ process.env.NX_WORKSPACE_ROOT = _chunk2Z7WS4H3cjs.correctPaths.call(void 0, config.workspaceRoot);
342
+ process.env.NX_WORKSPACE_ROOT_PATH = _chunk2Z7WS4H3cjs.correctPaths.call(void 0, config.workspaceRoot);
333
343
  }
334
344
  if (config.directories) {
335
345
  if (!config.skipCache && config.directories.cache) {
336
- process.env[`${prefix}CACHE_DIR`] = _chunkEHVHDVI3cjs.correctPaths.call(void 0, config.directories.cache);
346
+ process.env[`${prefix}CACHE_DIR`] = _chunk2Z7WS4H3cjs.correctPaths.call(void 0, config.directories.cache);
337
347
  }
338
348
  if (config.directories.data) {
339
- process.env[`${prefix}DATA_DIR`] = _chunkEHVHDVI3cjs.correctPaths.call(void 0, config.directories.data);
349
+ process.env[`${prefix}DATA_DIR`] = _chunk2Z7WS4H3cjs.correctPaths.call(void 0, config.directories.data);
340
350
  }
341
351
  if (config.directories.config) {
342
- process.env[`${prefix}CONFIG_DIR`] = _chunkEHVHDVI3cjs.correctPaths.call(void 0, config.directories.config);
352
+ process.env[`${prefix}CONFIG_DIR`] = _chunk2Z7WS4H3cjs.correctPaths.call(void 0, config.directories.config);
343
353
  }
344
354
  if (config.directories.temp) {
345
- process.env[`${prefix}TEMP_DIR`] = _chunkEHVHDVI3cjs.correctPaths.call(void 0, config.directories.temp);
355
+ process.env[`${prefix}TEMP_DIR`] = _chunk2Z7WS4H3cjs.correctPaths.call(void 0, config.directories.temp);
346
356
  }
347
357
  if (config.directories.log) {
348
- process.env[`${prefix}LOG_DIR`] = _chunkEHVHDVI3cjs.correctPaths.call(void 0, config.directories.log);
358
+ process.env[`${prefix}LOG_DIR`] = _chunk2Z7WS4H3cjs.correctPaths.call(void 0, config.directories.log);
349
359
  }
350
360
  if (config.directories.build) {
351
- process.env[`${prefix}BUILD_DIR`] = _chunkEHVHDVI3cjs.correctPaths.call(void 0, config.directories.build);
361
+ process.env[`${prefix}BUILD_DIR`] = _chunk2Z7WS4H3cjs.correctPaths.call(void 0, config.directories.build);
352
362
  }
353
363
  }
354
364
  if (config.skipCache !== void 0) {
@@ -402,8 +412,8 @@ var setConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config
402
412
  if (config.logLevel) {
403
413
  process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
404
414
  process.env.LOG_LEVEL = String(config.logLevel);
405
- process.env.NX_VERBOSE_LOGGING = String(_chunkEHVHDVI3cjs.getLogLevel.call(void 0, config.logLevel) >= _chunkEHVHDVI3cjs.LogLevel.DEBUG ? true : false);
406
- process.env.RUST_BACKTRACE = _chunkEHVHDVI3cjs.getLogLevel.call(void 0, config.logLevel) >= _chunkEHVHDVI3cjs.LogLevel.DEBUG ? "full" : "none";
415
+ process.env.NX_VERBOSE_LOGGING = String(_chunk2Z7WS4H3cjs.getLogLevel.call(void 0, config.logLevel) >= _chunk2Z7WS4H3cjs.LogLevel.DEBUG ? true : false);
416
+ process.env.RUST_BACKTRACE = _chunk2Z7WS4H3cjs.getLogLevel.call(void 0, config.logLevel) >= _chunk2Z7WS4H3cjs.LogLevel.DEBUG ? "full" : "none";
407
417
  }
408
418
  process.env[`${prefix}CONFIG`] = JSON.stringify(config);
409
419
  for (const key of Object.keys(_nullishCoalesce(config.extensions, () => ( {})))) {
@@ -509,40 +519,79 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(v
509
519
  }, "setBaseThemeColorConfigEnv");
510
520
 
511
521
  // ../config-tools/src/create-storm-config.ts
522
+ var _extension_cache = /* @__PURE__ */ new WeakMap();
512
523
  var _static_cache = void 0;
513
- var loadStormConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (workspaceRoot) => {
514
- let config = {};
515
- if (_optionalChain([_static_cache, 'optionalAccess', _29 => _29.data]) && _optionalChain([_static_cache, 'optionalAccess', _30 => _30.timestamp]) && _static_cache.timestamp >= Date.now() + 3e4) {
516
- _chunkEHVHDVI3cjs.writeTrace.call(void 0, `Configuration cache hit - ${_static_cache.timestamp}`, _static_cache.data);
517
- return _static_cache.data;
518
- }
519
- let _workspaceRoot = workspaceRoot;
520
- if (!_workspaceRoot) {
521
- _workspaceRoot = _chunkEHVHDVI3cjs.findWorkspaceRoot.call(void 0, );
522
- }
523
- const configFile = await getConfigFile(_workspaceRoot);
524
- if (!configFile) {
525
- _chunkEHVHDVI3cjs.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", {
526
- logLevel: "all"
527
- });
524
+ var createStormConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (extensionName, schema, workspaceRoot, skipLogs = false) => {
525
+ let result;
526
+ if (!_optionalChain([_static_cache, 'optionalAccess', _29 => _29.data]) || !_optionalChain([_static_cache, 'optionalAccess', _30 => _30.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
527
+ let _workspaceRoot = workspaceRoot;
528
+ if (!_workspaceRoot) {
529
+ _workspaceRoot = _chunk2Z7WS4H3cjs.findWorkspaceRoot.call(void 0, );
530
+ }
531
+ const configEnv = getConfigEnv();
532
+ const defaultConfig = await _chunk2Z7WS4H3cjs.getDefaultConfig.call(void 0, _workspaceRoot);
533
+ const configFile = await getConfigFile(_workspaceRoot);
534
+ if (!configFile && !skipLogs) {
535
+ _chunk2Z7WS4H3cjs.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", {
536
+ logLevel: "all"
537
+ });
538
+ }
539
+ result = await _chunk2Z7WS4H3cjs.StormConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
540
+ result.workspaceRoot ??= _workspaceRoot;
541
+ } else {
542
+ result = _static_cache.data;
528
543
  }
529
- config = _defu2.default.call(void 0, getConfigEnv(), configFile, _chunkEHVHDVI3cjs.getDefaultConfig.call(void 0, _workspaceRoot));
544
+ if (schema && extensionName) {
545
+ result.extensions = {
546
+ ...result.extensions,
547
+ [extensionName]: createConfigExtension(extensionName, schema)
548
+ };
549
+ }
550
+ _static_cache = {
551
+ timestamp: Date.now(),
552
+ data: result
553
+ };
554
+ return result;
555
+ }, "createStormConfig");
556
+ var createConfigExtension = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (extensionName, schema) => {
557
+ const extension_cache_key = {
558
+ extensionName
559
+ };
560
+ if (_extension_cache.has(extension_cache_key)) {
561
+ return _extension_cache.get(extension_cache_key);
562
+ }
563
+ let extension = getExtensionEnv(extensionName);
564
+ if (schema) {
565
+ extension = schema.parse(extension);
566
+ }
567
+ _extension_cache.set(extension_cache_key, extension);
568
+ return extension;
569
+ }, "createConfigExtension");
570
+ var loadStormConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (workspaceRoot, skipLogs = false) => {
571
+ const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
530
572
  setConfigEnv(config);
531
- _chunkEHVHDVI3cjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm configuration:
532
- ${_chunkEHVHDVI3cjs.formatLogMessage.call(void 0, config)}`, config);
573
+ if (!skipLogs) {
574
+ _chunk2Z7WS4H3cjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm configuration:
575
+ ${_chunk2Z7WS4H3cjs.formatLogMessage.call(void 0, config)}`, config);
576
+ }
533
577
  return config;
534
578
  }, "loadStormConfig");
535
579
 
580
+ // ../config-tools/src/get-config.ts
581
+ var getConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (workspaceRoot, skipLogs = false) => {
582
+ return loadStormConfig(workspaceRoot, skipLogs);
583
+ }, "getConfig");
584
+
536
585
  // ../build-tools/src/utilities/read-nx-config.ts
537
586
 
538
587
 
539
588
  var readNxConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (workspaceRoot) => {
540
589
  let rootDir = workspaceRoot;
541
590
  if (!rootDir) {
542
- const config = await loadStormConfig();
591
+ const config = await getConfig();
543
592
  rootDir = config.workspaceRoot;
544
593
  }
545
- const nxJsonPath = _chunkEHVHDVI3cjs.joinPaths.call(void 0, rootDir, "nx.json");
594
+ const nxJsonPath = _chunk2Z7WS4H3cjs.joinPaths.call(void 0, rootDir, "nx.json");
546
595
  if (!_fs.existsSync.call(void 0, nxJsonPath)) {
547
596
  throw new Error("Cannot find project.json configuration");
548
597
  }
@@ -554,7 +603,7 @@ var readNxConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (
554
603
  var copyAssets = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (config, assets, outputPath, projectRoot, projectName, sourceRoot, generatePackageJson2 = true, includeSrc = false, banner, footer) => {
555
604
  const pendingAssets = Array.from(_nullishCoalesce(assets, () => ( [])));
556
605
  pendingAssets.push({
557
- input: projectRoot,
606
+ input: _chunk2Z7WS4H3cjs.joinPaths.call(void 0, config.workspaceRoot, projectRoot),
558
607
  glob: "*.md",
559
608
  output: "."
560
609
  });
@@ -585,10 +634,10 @@ var copyAssets = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (co
585
634
  }
586
635
  const buildTarget = _optionalChain([projectsConfigurations, 'access', _33 => _33.projects, 'access', _34 => _34[projectName], 'access', _35 => _35.targets, 'optionalAccess', _36 => _36.build]);
587
636
  if (!buildTarget) {
588
- 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 ${_chunkEHVHDVI3cjs.joinPaths.call(void 0, projectRoot, "project.json")}`);
637
+ 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 ${_chunk2Z7WS4H3cjs.joinPaths.call(void 0, projectRoot, "project.json")}`);
589
638
  }
590
- _chunkEHVHDVI3cjs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
591
- ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkEHVHDVI3cjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
639
+ _chunk2Z7WS4H3cjs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
640
+ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunk2Z7WS4H3cjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
592
641
  const result = await _js.copyAssets.call(void 0, {
593
642
  assets: pendingAssets,
594
643
  watch: false,
@@ -602,18 +651,18 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
602
651
  projectsConfigurations,
603
652
  nxJsonConfiguration: nxJson,
604
653
  cwd: config.workspaceRoot,
605
- isVerbose: _chunkEHVHDVI3cjs.isVerbose.call(void 0, config.logLevel)
654
+ isVerbose: _chunk2Z7WS4H3cjs.isVerbose.call(void 0, config.logLevel)
606
655
  });
607
656
  if (!result.success) {
608
657
  throw new Error("The Build process failed trying to copy assets");
609
658
  }
610
659
  if (includeSrc === true) {
611
- _chunkEHVHDVI3cjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkEHVHDVI3cjs.joinPaths.call(void 0, outputPath, "src")}`, config);
660
+ _chunk2Z7WS4H3cjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunk2Z7WS4H3cjs.joinPaths.call(void 0, outputPath, "src")}`, config);
612
661
  const files = await _glob.glob.call(void 0, [
613
- _chunkEHVHDVI3cjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
614
- _chunkEHVHDVI3cjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
615
- _chunkEHVHDVI3cjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
616
- _chunkEHVHDVI3cjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
662
+ _chunk2Z7WS4H3cjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
663
+ _chunk2Z7WS4H3cjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
664
+ _chunk2Z7WS4H3cjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
665
+ _chunk2Z7WS4H3cjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
617
666
  ]);
618
667
  await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
619
668
 
@@ -635,7 +684,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void
635
684
  for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot)) {
636
685
  const projectNode = project.node;
637
686
  if (projectNode.data.root) {
638
- const projectPackageJsonPath = _chunkEHVHDVI3cjs.joinPaths.call(void 0, workspaceRoot, projectNode.data.root, "package.json");
687
+ const projectPackageJsonPath = _chunk2Z7WS4H3cjs.joinPaths.call(void 0, workspaceRoot, projectNode.data.root, "package.json");
639
688
  if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
640
689
  const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
641
690
  const projectPackageJson = JSON.parse(projectPackageJsonContent);
@@ -646,7 +695,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void
646
695
  }
647
696
  }
648
697
  if (localPackages.length > 0) {
649
- _chunkEHVHDVI3cjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
698
+ _chunk2Z7WS4H3cjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
650
699
  packageJson.peerDependencies = localPackages.reduce((ret, localPackage) => {
651
700
  if (!ret[localPackage.name]) {
652
701
  ret[localPackage.name] = `>=${localPackage.version || "0.0.1"}`;
@@ -668,13 +717,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void
668
717
  return ret;
669
718
  }, _nullishCoalesce(packageJson.peerDependencies, () => ( {})));
670
719
  } else {
671
- _chunkEHVHDVI3cjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
720
+ _chunk2Z7WS4H3cjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
672
721
  }
673
722
  return packageJson;
674
723
  }, "addPackageDependencies");
675
724
  var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
676
- const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunkEHVHDVI3cjs.findWorkspaceRoot.call(void 0, );
677
- const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkEHVHDVI3cjs.joinPaths.call(void 0, workspaceRoot, "package.json"), "utf8");
725
+ const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunk2Z7WS4H3cjs.findWorkspaceRoot.call(void 0, );
726
+ const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunk2Z7WS4H3cjs.joinPaths.call(void 0, workspaceRoot, "package.json"), "utf8");
678
727
  const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
679
728
  packageJson.type ??= "module";
680
729
  packageJson.sideEffects ??= false;
@@ -683,7 +732,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.cal
683
732
  if (distSrc.startsWith("/")) {
684
733
  distSrc = distSrc.substring(1);
685
734
  }
686
- packageJson.source ??= `${_chunkEHVHDVI3cjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
735
+ packageJson.source ??= `${_chunk2Z7WS4H3cjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
687
736
  }
688
737
  packageJson.files ??= [
689
738
  "dist/**/*"
@@ -714,7 +763,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.cal
714
763
  ];
715
764
  }
716
765
  packageJson.repository ??= workspacePackageJson.repository;
717
- packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkEHVHDVI3cjs.joinPaths.call(void 0, "packages", projectName);
766
+ packageJson.repository.directory ??= projectRoot ? projectRoot : _chunk2Z7WS4H3cjs.joinPaths.call(void 0, "packages", projectName);
718
767
  return packageJson;
719
768
  }, "addWorkspacePackageJsonFields");
720
769
  var addPackageJsonExport = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (file, type = "module", sourceRoot) => {
@@ -741,7 +790,7 @@ var addPackageJsonExport = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0,
741
790
  // ../build-tools/src/utilities/get-entry-points.ts
742
791
 
743
792
  var getEntryPoints = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
744
- const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunkEHVHDVI3cjs.findWorkspaceRoot.call(void 0, );
793
+ const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunk2Z7WS4H3cjs.findWorkspaceRoot.call(void 0, );
745
794
  const entryPoints = [];
746
795
  if (entry) {
747
796
  if (Array.isArray(entry)) {
@@ -753,7 +802,7 @@ var getEntryPoints = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
753
802
  }
754
803
  }
755
804
  if (emitOnAll) {
756
- entryPoints.push(_chunkEHVHDVI3cjs.joinPaths.call(void 0, workspaceRoot, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
805
+ entryPoints.push(_chunk2Z7WS4H3cjs.joinPaths.call(void 0, workspaceRoot, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
757
806
  }
758
807
  const results = [];
759
808
  for (const entryPoint in entryPoints) {
@@ -762,9 +811,9 @@ var getEntryPoints = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
762
811
  withFileTypes: true
763
812
  });
764
813
  results.push(...files.reduce((ret, filePath) => {
765
- const result = _chunkEHVHDVI3cjs.correctPaths.call(void 0, _chunkEHVHDVI3cjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkEHVHDVI3cjs.correctPaths.call(void 0, workspaceRoot), "").replaceAll(_chunkEHVHDVI3cjs.correctPaths.call(void 0, projectRoot), ""));
814
+ const result = _chunk2Z7WS4H3cjs.correctPaths.call(void 0, _chunk2Z7WS4H3cjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunk2Z7WS4H3cjs.correctPaths.call(void 0, workspaceRoot), "").replaceAll(_chunk2Z7WS4H3cjs.correctPaths.call(void 0, projectRoot), ""));
766
815
  if (result) {
767
- _chunkEHVHDVI3cjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkEHVHDVI3cjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
816
+ _chunk2Z7WS4H3cjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunk2Z7WS4H3cjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
768
817
  if (!results.includes(result)) {
769
818
  results.push(result);
770
819
  }
@@ -805,13 +854,13 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
805
854
  if (!workspaceRoot) {
806
855
  throw new Error("Cannot find Nx workspace root");
807
856
  }
808
- const config = await loadStormConfig(workspaceRoot.dir);
809
- _chunkEHVHDVI3cjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
810
- const stopwatch = _chunkEHVHDVI3cjs.getStopwatch.call(void 0, "Build options resolution");
857
+ const config = await getConfig(workspaceRoot.dir);
858
+ _chunk2Z7WS4H3cjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
859
+ const stopwatch = _chunk2Z7WS4H3cjs.getStopwatch.call(void 0, "Build options resolution");
811
860
  const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
812
861
  exitOnError: true
813
862
  });
814
- const projectJsonPath = _chunkEHVHDVI3cjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "project.json");
863
+ const projectJsonPath = _chunk2Z7WS4H3cjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "project.json");
815
864
  if (!await _node.hfs.isFile(projectJsonPath)) {
816
865
  throw new Error("Cannot find project.json configuration");
817
866
  }
@@ -824,7 +873,7 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
824
873
  const options = _defu2.default.call(void 0, userOptions, _chunk5KRF6IVWcjs.DEFAULT_BUILD_OPTIONS);
825
874
  options.name ??= `${projectName}-${options.format}`;
826
875
  options.target ??= DEFAULT_TARGET;
827
- const packageJsonPath = _chunkEHVHDVI3cjs.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
876
+ const packageJsonPath = _chunk2Z7WS4H3cjs.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
828
877
  if (!await _node.hfs.isFile(packageJsonPath)) {
829
878
  throw new Error("Cannot find package.json configuration");
830
879
  }
@@ -833,20 +882,20 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
833
882
  ...options,
834
883
  config,
835
884
  ...userOptions,
836
- tsconfig: _chunkEHVHDVI3cjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
885
+ tsconfig: _chunk2Z7WS4H3cjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
837
886
  format: options.format || "cjs",
838
887
  entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
839
888
  "./src/index.ts"
840
889
  ], userOptions.emitOnAll),
841
- outdir: userOptions.outputPath || _chunkEHVHDVI3cjs.joinPaths.call(void 0, "dist", projectRoot),
890
+ outdir: userOptions.outputPath || _chunk2Z7WS4H3cjs.joinPaths.call(void 0, "dist", projectRoot),
842
891
  plugins: [],
843
892
  name: userOptions.name || projectName,
844
893
  projectConfigurations,
845
894
  projectName,
846
895
  projectGraph,
847
- sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkEHVHDVI3cjs.joinPaths.call(void 0, projectRoot, "src"),
896
+ sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunk2Z7WS4H3cjs.joinPaths.call(void 0, projectRoot, "src"),
848
897
  minify: userOptions.minify || !userOptions.debug,
849
- verbose: userOptions.verbose || _chunkEHVHDVI3cjs.isVerbose.call(void 0, ) || userOptions.debug === true,
898
+ verbose: userOptions.verbose || _chunk2Z7WS4H3cjs.isVerbose.call(void 0, ) || userOptions.debug === true,
850
899
  includeSrc: userOptions.includeSrc === true,
851
900
  metafile: userOptions.metafile !== false,
852
901
  generatePackageJson: userOptions.generatePackageJson !== false,
@@ -880,14 +929,14 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
880
929
  return result;
881
930
  }, "resolveOptions");
882
931
  async function generatePackageJson(options) {
883
- if (options.generatePackageJson !== false && await _node.hfs.isFile(_chunkEHVHDVI3cjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
884
- _chunkEHVHDVI3cjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
885
- const stopwatch = _chunkEHVHDVI3cjs.getStopwatch.call(void 0, "Write package.json file");
886
- const packageJsonPath = _chunkEHVHDVI3cjs.joinPaths.call(void 0, options.projectRoot, "project.json");
932
+ if (options.generatePackageJson !== false && await _node.hfs.isFile(_chunk2Z7WS4H3cjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
933
+ _chunk2Z7WS4H3cjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
934
+ const stopwatch = _chunk2Z7WS4H3cjs.getStopwatch.call(void 0, "Write package.json file");
935
+ const packageJsonPath = _chunk2Z7WS4H3cjs.joinPaths.call(void 0, options.projectRoot, "project.json");
887
936
  if (!await _node.hfs.isFile(packageJsonPath)) {
888
937
  throw new Error("Cannot find package.json configuration");
889
938
  }
890
- let packageJson = await _node.hfs.json(_chunkEHVHDVI3cjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"));
939
+ let packageJson = await _node.hfs.json(_chunk2Z7WS4H3cjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"));
891
940
  if (!packageJson) {
892
941
  throw new Error("Cannot find package.json configuration file");
893
942
  }
@@ -925,15 +974,15 @@ async function generatePackageJson(options) {
925
974
  }
926
975
  return ret;
927
976
  }, packageJson.exports);
928
- await _devkit.writeJsonFile.call(void 0, _chunkEHVHDVI3cjs.joinPaths.call(void 0, options.outdir, "package.json"), packageJson);
977
+ await _devkit.writeJsonFile.call(void 0, _chunk2Z7WS4H3cjs.joinPaths.call(void 0, options.outdir, "package.json"), packageJson);
929
978
  stopwatch();
930
979
  }
931
980
  return options;
932
981
  }
933
982
  _chunkUSNT2KNTcjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
934
983
  async function executeTSDown(options) {
935
- _chunkEHVHDVI3cjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.config);
936
- const stopwatch = _chunkEHVHDVI3cjs.getStopwatch.call(void 0, `${options.name} build`);
984
+ _chunk2Z7WS4H3cjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.config);
985
+ const stopwatch = _chunk2Z7WS4H3cjs.getStopwatch.call(void 0, `${options.name} build`);
937
986
  await _tsdown.build.call(void 0, {
938
987
  ...options,
939
988
  entry: options.entryPoints,
@@ -945,27 +994,27 @@ async function executeTSDown(options) {
945
994
  }
946
995
  _chunkUSNT2KNTcjs.__name.call(void 0, executeTSDown, "executeTSDown");
947
996
  async function copyBuildAssets(options) {
948
- _chunkEHVHDVI3cjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
949
- const stopwatch = _chunkEHVHDVI3cjs.getStopwatch.call(void 0, `${options.name} asset copy`);
997
+ _chunk2Z7WS4H3cjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
998
+ const stopwatch = _chunk2Z7WS4H3cjs.getStopwatch.call(void 0, `${options.name} asset copy`);
950
999
  await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outdir, options.projectRoot, options.projectName, options.sourceRoot, true, false);
951
1000
  stopwatch();
952
1001
  return options;
953
1002
  }
954
1003
  _chunkUSNT2KNTcjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
955
1004
  async function reportResults(options) {
956
- _chunkEHVHDVI3cjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${options.name} build completed successfully`, options.config);
1005
+ _chunk2Z7WS4H3cjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${options.name} build completed successfully`, options.config);
957
1006
  }
958
1007
  _chunkUSNT2KNTcjs.__name.call(void 0, reportResults, "reportResults");
959
1008
  async function cleanOutputPath(options) {
960
1009
  if (options.clean !== false && options.outdir) {
961
- await _chunkEHVHDVI3cjs.clean.call(void 0, options.name, options.outdir, options.config);
1010
+ await _chunk2Z7WS4H3cjs.clean.call(void 0, options.name, options.outdir, options.config);
962
1011
  }
963
1012
  return options;
964
1013
  }
965
1014
  _chunkUSNT2KNTcjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
966
1015
  async function build(options) {
967
- _chunkEHVHDVI3cjs.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
968
- const stopwatch = _chunkEHVHDVI3cjs.getStopwatch.call(void 0, "TSDown pipeline");
1016
+ _chunk2Z7WS4H3cjs.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
1017
+ const stopwatch = _chunk2Z7WS4H3cjs.getStopwatch.call(void 0, "TSDown pipeline");
969
1018
  try {
970
1019
  const opts = Array.isArray(options) ? options : [
971
1020
  options
@@ -983,11 +1032,11 @@ async function build(options) {
983
1032
  await reportResults(opt);
984
1033
  }));
985
1034
  } else {
986
- _chunkEHVHDVI3cjs.writeWarning.call(void 0, " \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function.");
1035
+ _chunk2Z7WS4H3cjs.writeWarning.call(void 0, " \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function.");
987
1036
  }
988
- _chunkEHVHDVI3cjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
1037
+ _chunk2Z7WS4H3cjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
989
1038
  } catch (error) {
990
- _chunkEHVHDVI3cjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
1039
+ _chunk2Z7WS4H3cjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
991
1040
  throw error;
992
1041
  } finally {
993
1042
  stopwatch();
package/dist/clean.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkEHVHDVI3cjs = require('./chunk-EHVHDVI3.cjs');
3
+ var _chunk2Z7WS4H3cjs = require('./chunk-2Z7WS4H3.cjs');
4
4
  require('./chunk-USNT2KNT.cjs');
5
5
 
6
6
 
7
- exports.clean = _chunkEHVHDVI3cjs.clean;
7
+ exports.clean = _chunk2Z7WS4H3cjs.clean;