@storm-software/tsdown 0.22.1 → 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,12 @@ 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
  }
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);
590
641
  const result = await _js.copyAssets.call(void 0, {
591
- assets,
642
+ assets: pendingAssets,
592
643
  watch: false,
593
644
  outputPath
594
645
  }, {
@@ -600,18 +651,18 @@ var copyAssets = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (co
600
651
  projectsConfigurations,
601
652
  nxJsonConfiguration: nxJson,
602
653
  cwd: config.workspaceRoot,
603
- isVerbose: _chunkEHVHDVI3cjs.isVerbose.call(void 0, config.logLevel)
654
+ isVerbose: _chunk2Z7WS4H3cjs.isVerbose.call(void 0, config.logLevel)
604
655
  });
605
656
  if (!result.success) {
606
657
  throw new Error("The Build process failed trying to copy assets");
607
658
  }
608
659
  if (includeSrc === true) {
609
- _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);
610
661
  const files = await _glob.glob.call(void 0, [
611
- _chunkEHVHDVI3cjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
612
- _chunkEHVHDVI3cjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
613
- _chunkEHVHDVI3cjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
614
- _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")
615
666
  ]);
616
667
  await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
617
668
 
@@ -633,7 +684,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void
633
684
  for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot)) {
634
685
  const projectNode = project.node;
635
686
  if (projectNode.data.root) {
636
- 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");
637
688
  if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
638
689
  const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
639
690
  const projectPackageJson = JSON.parse(projectPackageJsonContent);
@@ -644,7 +695,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void
644
695
  }
645
696
  }
646
697
  if (localPackages.length > 0) {
647
- _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(", ")}`);
648
699
  packageJson.peerDependencies = localPackages.reduce((ret, localPackage) => {
649
700
  if (!ret[localPackage.name]) {
650
701
  ret[localPackage.name] = `>=${localPackage.version || "0.0.1"}`;
@@ -666,13 +717,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void
666
717
  return ret;
667
718
  }, _nullishCoalesce(packageJson.peerDependencies, () => ( {})));
668
719
  } else {
669
- _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");
670
721
  }
671
722
  return packageJson;
672
723
  }, "addPackageDependencies");
673
724
  var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
674
- const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunkEHVHDVI3cjs.findWorkspaceRoot.call(void 0, );
675
- 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");
676
727
  const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
677
728
  packageJson.type ??= "module";
678
729
  packageJson.sideEffects ??= false;
@@ -681,7 +732,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.cal
681
732
  if (distSrc.startsWith("/")) {
682
733
  distSrc = distSrc.substring(1);
683
734
  }
684
- packageJson.source ??= `${_chunkEHVHDVI3cjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
735
+ packageJson.source ??= `${_chunk2Z7WS4H3cjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
685
736
  }
686
737
  packageJson.files ??= [
687
738
  "dist/**/*"
@@ -712,7 +763,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.cal
712
763
  ];
713
764
  }
714
765
  packageJson.repository ??= workspacePackageJson.repository;
715
- 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);
716
767
  return packageJson;
717
768
  }, "addWorkspacePackageJsonFields");
718
769
  var addPackageJsonExport = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (file, type = "module", sourceRoot) => {
@@ -739,7 +790,7 @@ var addPackageJsonExport = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0,
739
790
  // ../build-tools/src/utilities/get-entry-points.ts
740
791
 
741
792
  var getEntryPoints = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
742
- const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunkEHVHDVI3cjs.findWorkspaceRoot.call(void 0, );
793
+ const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunk2Z7WS4H3cjs.findWorkspaceRoot.call(void 0, );
743
794
  const entryPoints = [];
744
795
  if (entry) {
745
796
  if (Array.isArray(entry)) {
@@ -751,7 +802,7 @@ var getEntryPoints = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
751
802
  }
752
803
  }
753
804
  if (emitOnAll) {
754
- 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}"));
755
806
  }
756
807
  const results = [];
757
808
  for (const entryPoint in entryPoints) {
@@ -760,9 +811,9 @@ var getEntryPoints = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
760
811
  withFileTypes: true
761
812
  });
762
813
  results.push(...files.reduce((ret, filePath) => {
763
- 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), ""));
764
815
  if (result) {
765
- _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);
766
817
  if (!results.includes(result)) {
767
818
  results.push(result);
768
819
  }
@@ -803,13 +854,13 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
803
854
  if (!workspaceRoot) {
804
855
  throw new Error("Cannot find Nx workspace root");
805
856
  }
806
- const config = await loadStormConfig(workspaceRoot.dir);
807
- _chunkEHVHDVI3cjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
808
- 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");
809
860
  const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
810
861
  exitOnError: true
811
862
  });
812
- 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");
813
864
  if (!await _node.hfs.isFile(projectJsonPath)) {
814
865
  throw new Error("Cannot find project.json configuration");
815
866
  }
@@ -822,7 +873,7 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
822
873
  const options = _defu2.default.call(void 0, userOptions, _chunk5KRF6IVWcjs.DEFAULT_BUILD_OPTIONS);
823
874
  options.name ??= `${projectName}-${options.format}`;
824
875
  options.target ??= DEFAULT_TARGET;
825
- 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");
826
877
  if (!await _node.hfs.isFile(packageJsonPath)) {
827
878
  throw new Error("Cannot find package.json configuration");
828
879
  }
@@ -831,20 +882,20 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
831
882
  ...options,
832
883
  config,
833
884
  ...userOptions,
834
- 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"),
835
886
  format: options.format || "cjs",
836
887
  entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
837
888
  "./src/index.ts"
838
889
  ], userOptions.emitOnAll),
839
- outdir: userOptions.outputPath || _chunkEHVHDVI3cjs.joinPaths.call(void 0, "dist", projectRoot),
890
+ outdir: userOptions.outputPath || _chunk2Z7WS4H3cjs.joinPaths.call(void 0, "dist", projectRoot),
840
891
  plugins: [],
841
892
  name: userOptions.name || projectName,
842
893
  projectConfigurations,
843
894
  projectName,
844
895
  projectGraph,
845
- 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"),
846
897
  minify: userOptions.minify || !userOptions.debug,
847
- verbose: userOptions.verbose || _chunkEHVHDVI3cjs.isVerbose.call(void 0, ) || userOptions.debug === true,
898
+ verbose: userOptions.verbose || _chunk2Z7WS4H3cjs.isVerbose.call(void 0, ) || userOptions.debug === true,
848
899
  includeSrc: userOptions.includeSrc === true,
849
900
  metafile: userOptions.metafile !== false,
850
901
  generatePackageJson: userOptions.generatePackageJson !== false,
@@ -878,14 +929,14 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
878
929
  return result;
879
930
  }, "resolveOptions");
880
931
  async function generatePackageJson(options) {
881
- if (options.generatePackageJson !== false && await _node.hfs.isFile(_chunkEHVHDVI3cjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
882
- _chunkEHVHDVI3cjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
883
- const stopwatch = _chunkEHVHDVI3cjs.getStopwatch.call(void 0, "Write package.json file");
884
- 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");
885
936
  if (!await _node.hfs.isFile(packageJsonPath)) {
886
937
  throw new Error("Cannot find package.json configuration");
887
938
  }
888
- 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"));
889
940
  if (!packageJson) {
890
941
  throw new Error("Cannot find package.json configuration file");
891
942
  }
@@ -923,15 +974,15 @@ async function generatePackageJson(options) {
923
974
  }
924
975
  return ret;
925
976
  }, packageJson.exports);
926
- 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);
927
978
  stopwatch();
928
979
  }
929
980
  return options;
930
981
  }
931
982
  _chunkUSNT2KNTcjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
932
983
  async function executeTSDown(options) {
933
- _chunkEHVHDVI3cjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.config);
934
- 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`);
935
986
  await _tsdown.build.call(void 0, {
936
987
  ...options,
937
988
  entry: options.entryPoints,
@@ -943,27 +994,27 @@ async function executeTSDown(options) {
943
994
  }
944
995
  _chunkUSNT2KNTcjs.__name.call(void 0, executeTSDown, "executeTSDown");
945
996
  async function copyBuildAssets(options) {
946
- _chunkEHVHDVI3cjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
947
- 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`);
948
999
  await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outdir, options.projectRoot, options.projectName, options.sourceRoot, true, false);
949
1000
  stopwatch();
950
1001
  return options;
951
1002
  }
952
1003
  _chunkUSNT2KNTcjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
953
1004
  async function reportResults(options) {
954
- _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);
955
1006
  }
956
1007
  _chunkUSNT2KNTcjs.__name.call(void 0, reportResults, "reportResults");
957
1008
  async function cleanOutputPath(options) {
958
1009
  if (options.clean !== false && options.outdir) {
959
- 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);
960
1011
  }
961
1012
  return options;
962
1013
  }
963
1014
  _chunkUSNT2KNTcjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
964
1015
  async function build(options) {
965
- _chunkEHVHDVI3cjs.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
966
- 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");
967
1018
  try {
968
1019
  const opts = Array.isArray(options) ? options : [
969
1020
  options
@@ -981,11 +1032,11 @@ async function build(options) {
981
1032
  await reportResults(opt);
982
1033
  }));
983
1034
  } else {
984
- _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.");
985
1036
  }
986
- _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");
987
1038
  } catch (error) {
988
- _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.");
989
1040
  throw error;
990
1041
  } finally {
991
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;