@storm-software/esbuild 0.35.11 → 0.35.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/README.md +1 -2
  2. package/bin/esbuild.cjs +1225 -2788
  3. package/dist/assets.cjs +6 -6
  4. package/dist/assets.js +5 -5
  5. package/dist/build.cjs +13 -14
  6. package/dist/build.js +12 -13
  7. package/dist/{chunk-C5UZWWWR.js → chunk-2LYIFO7K.js} +3 -9
  8. package/dist/{chunk-KXCV2R7J.cjs → chunk-55UPQQ65.cjs} +288 -179
  9. package/dist/{chunk-INQXL7FE.js → chunk-72UBXZRO.js} +4 -6
  10. package/dist/{chunk-RMRB7CWQ.js → chunk-7KIT5JE6.js} +36 -30
  11. package/dist/{chunk-OHH3RWRK.cjs → chunk-B3MHVZOK.cjs} +10 -12
  12. package/dist/{chunk-NNO5TTNR.cjs → chunk-BK5GLVSJ.cjs} +47 -21
  13. package/dist/{chunk-J3XDBU5Z.cjs → chunk-BWMW4ZUS.cjs} +46 -40
  14. package/dist/{chunk-VITVYHJG.cjs → chunk-C25ALB4J.cjs} +975 -1209
  15. package/dist/chunk-CEJM5IFH.js +37 -0
  16. package/dist/{chunk-ICKIIBXC.js → chunk-FHHEEOIV.js} +2 -2
  17. package/dist/{chunk-PHC57UZZ.cjs → chunk-H7NSISN4.cjs} +33 -24
  18. package/dist/{chunk-QAYURSX7.cjs → chunk-IULOZ7MO.cjs} +5 -5
  19. package/dist/{chunk-QTR5272S.cjs → chunk-JCICRU7K.cjs} +3 -5
  20. package/dist/{chunk-OZEWXLIK.js → chunk-KV6GNLVF.js} +8 -10
  21. package/dist/{chunk-TULJZS5M.js → chunk-KXZCIMKJ.js} +149 -265
  22. package/dist/{chunk-T4UMKHLQ.cjs → chunk-LBRDOW2V.cjs} +18 -9
  23. package/dist/{chunk-5P6GWVMJ.js → chunk-NACKZM5D.js} +189 -116
  24. package/dist/chunk-NLIYZM5H.cjs +25 -0
  25. package/dist/{chunk-WHHAD2OY.js → chunk-Q3WZPCLD.js} +232 -123
  26. package/dist/{chunk-7ESNPD46.js → chunk-QOTJTLX7.js} +1 -1
  27. package/dist/{chunk-J5J57SEI.cjs → chunk-RBXXACL5.cjs} +204 -131
  28. package/dist/{chunk-KYRZY7X7.js → chunk-RNXNYWO3.js} +28 -19
  29. package/dist/{chunk-H35FAHLW.cjs → chunk-T4N45NGL.cjs} +17 -26
  30. package/dist/{chunk-66VO6PT4.js → chunk-VLK67MTI.js} +43 -17
  31. package/dist/{chunk-SR4MG2LN.js → chunk-VNLMOUVN.js} +15 -24
  32. package/dist/chunk-XHTD4QDZ.cjs +6 -0
  33. package/dist/clean.cjs +5 -5
  34. package/dist/clean.js +4 -4
  35. package/dist/config.cjs +6 -6
  36. package/dist/config.js +5 -5
  37. package/dist/context.cjs +7 -8
  38. package/dist/context.js +6 -7
  39. package/dist/index.cjs +15 -16
  40. package/dist/index.js +13 -14
  41. package/dist/package-json.cjs +6 -6
  42. package/dist/package-json.js +5 -5
  43. package/dist/plugins/deps-check.cjs +5 -5
  44. package/dist/plugins/deps-check.js +4 -4
  45. package/dist/plugins/resolve-paths.cjs +82 -5
  46. package/dist/plugins/resolve-paths.js +81 -4
  47. package/dist/tsup.cjs +5 -5
  48. package/dist/tsup.js +4 -4
  49. package/dist/types.cjs +2 -2
  50. package/dist/types.js +2 -2
  51. package/dist/watch.cjs +19 -29
  52. package/dist/watch.js +15 -25
  53. package/package.json +4 -4
  54. package/dist/chunk-AF5YHP7E.cjs +0 -57
  55. package/dist/chunk-BWCGRWHA.cjs +0 -6
  56. package/dist/chunk-ELF4S3RR.cjs +0 -31
  57. package/dist/chunk-IL6FCY37.js +0 -57
  58. package/dist/chunk-LQIX6FZY.js +0 -28
@@ -13,15 +13,14 @@ import {
13
13
  writeDebug,
14
14
  writeTrace,
15
15
  writeWarning
16
- } from "./chunk-5P6GWVMJ.js";
16
+ } from "./chunk-NACKZM5D.js";
17
17
  import {
18
18
  correctPaths,
19
19
  joinPaths
20
- } from "./chunk-OZEWXLIK.js";
20
+ } from "./chunk-KV6GNLVF.js";
21
21
  import {
22
- __name,
23
22
  init_esm_shims
24
- } from "./chunk-INQXL7FE.js";
23
+ } from "./chunk-72UBXZRO.js";
25
24
 
26
25
  // ../build-tools/src/config.ts
27
26
  init_esm_shims();
@@ -39,7 +38,7 @@ init_esm_shims();
39
38
  import { CopyAssetsHandler } from "@nx/js/src/utils/assets/copy-assets-handler";
40
39
  import { glob } from "glob";
41
40
  import { readFile, writeFile } from "node:fs/promises";
42
- var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson = true, includeSrc = false, banner, footer) => {
41
+ var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson = true, includeSrc = false, banner, footer) => {
43
42
  const pendingAssets = Array.from(assets ?? []);
44
43
  pendingAssets.push({
45
44
  input: projectRoot,
@@ -65,8 +64,11 @@ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, proje
65
64
  output: "src/"
66
65
  });
67
66
  }
68
- writeTrace(`\u{1F4DD} Copying the following assets to the output directory:
69
- ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${joinPaths(outputPath, pendingAsset.output)}`).join("\n")}`, config);
67
+ writeTrace(
68
+ `\u{1F4DD} Copying the following assets to the output directory:
69
+ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${joinPaths(outputPath, pendingAsset.output)}`).join("\n")}`,
70
+ config
71
+ );
70
72
  const assetHandler = new CopyAssetsHandler({
71
73
  projectDir: projectRoot,
72
74
  rootDir: config.workspaceRoot,
@@ -75,20 +77,33 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
75
77
  });
76
78
  await assetHandler.processAllAssetsOnce();
77
79
  if (includeSrc === true) {
78
- writeDebug(`\u{1F4DD} Adding banner and writing source files: ${joinPaths(outputPath, "src")}`, config);
80
+ writeDebug(
81
+ `\u{1F4DD} Adding banner and writing source files: ${joinPaths(
82
+ outputPath,
83
+ "src"
84
+ )}`,
85
+ config
86
+ );
79
87
  const files = await glob([
80
88
  joinPaths(config.workspaceRoot, outputPath, "src/**/*.ts"),
81
89
  joinPaths(config.workspaceRoot, outputPath, "src/**/*.tsx"),
82
90
  joinPaths(config.workspaceRoot, outputPath, "src/**/*.js"),
83
91
  joinPaths(config.workspaceRoot, outputPath, "src/**/*.jsx")
84
92
  ]);
85
- await Promise.allSettled(files.map(async (file) => writeFile(file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
93
+ await Promise.allSettled(
94
+ files.map(
95
+ async (file) => writeFile(
96
+ file,
97
+ `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
86
98
 
87
99
  ${await readFile(file, "utf8")}
88
100
 
89
- ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`)));
101
+ ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`
102
+ )
103
+ )
104
+ );
90
105
  }
91
- }, "copyAssets");
106
+ };
92
107
 
93
108
  // ../build-tools/src/utilities/generate-package-json.ts
94
109
  init_esm_shims();
@@ -96,8 +111,12 @@ import { calculateProjectBuildableDependencies } from "@nx/js/src/utils/buildabl
96
111
  import { Glob } from "glob";
97
112
  import { existsSync, readFileSync } from "node:fs";
98
113
  import { readFile as readFile2 } from "node:fs/promises";
99
- import { createProjectGraphAsync, readCachedProjectGraph, readProjectsConfigurationFromProjectGraph } from "nx/src/project-graph/project-graph";
100
- var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot, projectRoot, projectName, packageJson) => {
114
+ import {
115
+ createProjectGraphAsync,
116
+ readCachedProjectGraph,
117
+ readProjectsConfigurationFromProjectGraph
118
+ } from "nx/src/project-graph/project-graph";
119
+ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, packageJson) => {
101
120
  let projectGraph;
102
121
  try {
103
122
  projectGraph = readCachedProjectGraph();
@@ -106,16 +125,35 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot, projec
106
125
  projectGraph = readCachedProjectGraph();
107
126
  }
108
127
  if (!projectGraph) {
109
- throw new Error("The Build process failed because the project graph is not available. Please run the build command again.");
110
- }
111
- const projectDependencies = calculateProjectBuildableDependencies(void 0, projectGraph, workspaceRoot, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
128
+ throw new Error(
129
+ "The Build process failed because the project graph is not available. Please run the build command again."
130
+ );
131
+ }
132
+ const projectDependencies = calculateProjectBuildableDependencies(
133
+ void 0,
134
+ projectGraph,
135
+ workspaceRoot,
136
+ projectName,
137
+ process.env.NX_TASK_TARGET_TARGET || "build",
138
+ process.env.NX_TASK_TARGET_CONFIGURATION || "production",
139
+ true
140
+ );
112
141
  const localPackages = [];
113
- for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data?.root !== projectRoot && dep.node.data?.root !== workspaceRoot)) {
142
+ for (const project of projectDependencies.dependencies.filter(
143
+ (dep) => dep.node.type === "lib" && dep.node.data?.root !== projectRoot && dep.node.data?.root !== workspaceRoot
144
+ )) {
114
145
  const projectNode = project.node;
115
146
  if (projectNode.data.root) {
116
- const projectPackageJsonPath = joinPaths(workspaceRoot, projectNode.data.root, "package.json");
147
+ const projectPackageJsonPath = joinPaths(
148
+ workspaceRoot,
149
+ projectNode.data.root,
150
+ "package.json"
151
+ );
117
152
  if (existsSync(projectPackageJsonPath)) {
118
- const projectPackageJsonContent = await readFile2(projectPackageJsonPath, "utf8");
153
+ const projectPackageJsonContent = await readFile2(
154
+ projectPackageJsonPath,
155
+ "utf8"
156
+ );
119
157
  const projectPackageJson = JSON.parse(projectPackageJsonContent);
120
158
  if (projectPackageJson.private !== true) {
121
159
  localPackages.push(projectPackageJson);
@@ -124,19 +162,33 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot, projec
124
162
  }
125
163
  }
126
164
  if (localPackages.length > 0) {
127
- writeTrace(`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
128
- const projectJsonFile = await readFile2(joinPaths(projectRoot, "project.json"), "utf8");
165
+ writeTrace(
166
+ `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
167
+ );
168
+ const projectJsonFile = await readFile2(
169
+ joinPaths(projectRoot, "project.json"),
170
+ "utf8"
171
+ );
129
172
  const projectJson = JSON.parse(projectJsonFile);
130
173
  const projectName2 = projectJson.name;
131
174
  const projectConfigurations = readProjectsConfigurationFromProjectGraph(projectGraph);
132
175
  if (!projectConfigurations?.projects?.[projectName2]) {
133
- throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
176
+ throw new Error(
177
+ "The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project."
178
+ );
134
179
  }
135
180
  const implicitDependencies = projectConfigurations.projects?.[projectName2].implicitDependencies?.reduce((ret, dep) => {
136
181
  if (projectConfigurations.projects?.[dep]) {
137
- const depPackageJsonPath = joinPaths(workspaceRoot, projectConfigurations.projects[dep].root, "package.json");
182
+ const depPackageJsonPath = joinPaths(
183
+ workspaceRoot,
184
+ projectConfigurations.projects[dep].root,
185
+ "package.json"
186
+ );
138
187
  if (existsSync(depPackageJsonPath)) {
139
- const depPackageJsonContent = readFileSync(depPackageJsonPath, "utf8");
188
+ const depPackageJsonContent = readFileSync(
189
+ depPackageJsonPath,
190
+ "utf8"
191
+ );
140
192
  const depPackageJson = JSON.parse(depPackageJsonContent);
141
193
  if (depPackageJson.private !== true && !ret.includes(depPackageJson.name)) {
142
194
  ret.push(depPackageJson.name);
@@ -161,10 +213,13 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot, projec
161
213
  writeTrace("\u{1F4E6} No local packages dependencies to add to package.json");
162
214
  }
163
215
  return packageJson;
164
- }, "addPackageDependencies");
165
- var addWorkspacePackageJsonFields = /* @__PURE__ */ __name(async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
216
+ };
217
+ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
166
218
  const workspaceRoot = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : findWorkspaceRoot();
167
- const workspacePackageJsonContent = await readFile2(joinPaths(workspaceRoot, "package.json"), "utf8");
219
+ const workspacePackageJsonContent = await readFile2(
220
+ joinPaths(workspaceRoot, "package.json"),
221
+ "utf8"
222
+ );
168
223
  const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
169
224
  packageJson.type ??= "module";
170
225
  packageJson.sideEffects ??= false;
@@ -175,9 +230,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ __name(async (workspaceConfi
175
230
  }
176
231
  packageJson.source ??= `${joinPaths(distSrc, "index.ts").replaceAll("\\", "/")}`;
177
232
  }
178
- packageJson.files ??= [
179
- "dist/**/*"
180
- ];
233
+ packageJson.files ??= ["dist/**/*"];
181
234
  if (includeSrc === true && !packageJson.files.includes("src")) {
182
235
  packageJson.files.push("src/**/*");
183
236
  }
@@ -193,20 +246,16 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ __name(async (workspaceConfi
193
246
  packageJson.author ??= workspacePackageJson.author;
194
247
  packageJson.maintainers ??= workspacePackageJson.maintainers;
195
248
  if (!packageJson.maintainers && packageJson.author) {
196
- packageJson.maintainers = [
197
- packageJson.author
198
- ];
249
+ packageJson.maintainers = [packageJson.author];
199
250
  }
200
251
  packageJson.contributors ??= workspacePackageJson.contributors;
201
252
  if (!packageJson.contributors && packageJson.author) {
202
- packageJson.contributors = [
203
- packageJson.author
204
- ];
253
+ packageJson.contributors = [packageJson.author];
205
254
  }
206
255
  packageJson.repository ??= workspacePackageJson.repository;
207
256
  packageJson.repository.directory ??= projectRoot ? projectRoot : joinPaths("packages", projectName);
208
257
  return packageJson;
209
- }, "addWorkspacePackageJsonFields");
258
+ };
210
259
 
211
260
  // ../config-tools/src/get-config.ts
212
261
  init_esm_shims();
@@ -219,7 +268,7 @@ import defu2 from "defu";
219
268
  init_esm_shims();
220
269
  import { loadConfig } from "c12";
221
270
  import defu from "defu";
222
- var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, options = {}) => {
271
+ var getConfigFileByName = async (fileName, filePath, options = {}) => {
223
272
  const workspacePath = filePath || findWorkspaceRoot(filePath);
224
273
  const configs = await Promise.all([
225
274
  loadConfig({
@@ -229,7 +278,10 @@ var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, opti
229
278
  envName: fileName?.toUpperCase(),
230
279
  jitiOptions: {
231
280
  debug: false,
232
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
281
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
282
+ process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
283
+ "jiti"
284
+ )
233
285
  },
234
286
  ...options
235
287
  }),
@@ -240,32 +292,45 @@ var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, opti
240
292
  envName: fileName?.toUpperCase(),
241
293
  jitiOptions: {
242
294
  debug: false,
243
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
295
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
296
+ process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
297
+ "jiti"
298
+ )
244
299
  },
245
300
  configFile: fileName,
246
301
  ...options
247
302
  })
248
303
  ]);
249
304
  return defu(configs[0] ?? {}, configs[1] ?? {});
250
- }, "getConfigFileByName");
251
- var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames = []) => {
305
+ };
306
+ var getConfigFile = async (filePath, additionalFileNames = []) => {
252
307
  const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
253
308
  const result = await getConfigFileByName("storm-workspace", workspacePath);
254
309
  let config = result.config;
255
310
  const configFile = result.configFile;
256
311
  if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
257
- writeTrace(`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
258
- logLevel: "all"
259
- });
312
+ writeTrace(
313
+ `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
314
+ {
315
+ logLevel: "all"
316
+ }
317
+ );
260
318
  }
261
319
  if (additionalFileNames && additionalFileNames.length > 0) {
262
- const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
320
+ const results = await Promise.all(
321
+ additionalFileNames.map(
322
+ (fileName) => getConfigFileByName(fileName, workspacePath)
323
+ )
324
+ );
263
325
  for (const result2 of results) {
264
326
  if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
265
327
  if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
266
- writeTrace(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
267
- logLevel: "all"
268
- });
328
+ writeTrace(
329
+ `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
330
+ {
331
+ logLevel: "all"
332
+ }
333
+ );
269
334
  }
270
335
  config = defu(result2.config ?? {}, config ?? {});
271
336
  }
@@ -276,21 +341,23 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
276
341
  }
277
342
  config.configFile = configFile;
278
343
  return config;
279
- }, "getConfigFile");
344
+ };
280
345
 
281
346
  // ../config-tools/src/env/get-env.ts
282
347
  init_esm_shims();
283
- var getExtensionEnv = /* @__PURE__ */ __name((extensionName) => {
348
+ var getExtensionEnv = (extensionName) => {
284
349
  const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
285
350
  return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
286
- const name = key.replace(prefix, "").split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
351
+ const name = key.replace(prefix, "").split("_").map(
352
+ (i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : ""
353
+ ).join("");
287
354
  if (name) {
288
355
  ret[name] = process.env[key];
289
356
  }
290
357
  return ret;
291
358
  }, {});
292
- }, "getExtensionEnv");
293
- var getConfigEnv = /* @__PURE__ */ __name(() => {
359
+ };
360
+ var getConfigEnv = () => {
294
361
  const prefix = "STORM_";
295
362
  let config = {
296
363
  extends: process.env[`${prefix}EXTENDS`] || void 0,
@@ -358,14 +425,25 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
358
425
  cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
359
426
  container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
360
427
  },
361
- 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`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0,
428
+ logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
429
+ Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
430
+ ) ? getLogLevelLabel(
431
+ Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
432
+ ) : process.env[`${prefix}LOG_LEVEL`] : void 0,
362
433
  skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
363
434
  };
364
- const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
365
- config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
366
- ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
367
- return ret;
368
- }, {}) : getThemeColorConfigEnv(prefix);
435
+ const themeNames = Object.keys(process.env).filter(
436
+ (envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every(
437
+ (colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
438
+ )
439
+ );
440
+ config.colors = themeNames.length > 0 ? themeNames.reduce(
441
+ (ret, themeName) => {
442
+ ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
443
+ return ret;
444
+ },
445
+ {}
446
+ ) : getThemeColorConfigEnv(prefix);
369
447
  if (config.docs === STORM_DEFAULT_DOCS) {
370
448
  if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
371
449
  config.docs = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
@@ -386,23 +464,17 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
386
464
  config = {
387
465
  ...config,
388
466
  ...parsed,
389
- colors: {
390
- ...config.colors,
391
- ...parsed.colors
392
- },
393
- extensions: {
394
- ...config.extensions,
395
- ...parsed.extensions
396
- }
467
+ colors: { ...config.colors, ...parsed.colors },
468
+ extensions: { ...config.extensions, ...parsed.extensions }
397
469
  };
398
470
  }
399
471
  return config;
400
- }, "getConfigEnv");
401
- var getThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, theme) => {
472
+ };
473
+ var getThemeColorConfigEnv = (prefix, theme) => {
402
474
  const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
403
475
  return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorConfigEnv(prefix + themeName) : getSingleThemeColorConfigEnv(prefix + themeName);
404
- }, "getThemeColorConfigEnv");
405
- var getSingleThemeColorConfigEnv = /* @__PURE__ */ __name((prefix) => {
476
+ };
477
+ var getSingleThemeColorConfigEnv = (prefix) => {
406
478
  return {
407
479
  dark: process.env[`${prefix}DARK`],
408
480
  light: process.env[`${prefix}LIGHT`],
@@ -419,14 +491,16 @@ var getSingleThemeColorConfigEnv = /* @__PURE__ */ __name((prefix) => {
419
491
  positive: process.env[`${prefix}POSITIVE`],
420
492
  negative: process.env[`${prefix}NEGATIVE`]
421
493
  };
422
- }, "getSingleThemeColorConfigEnv");
423
- var getMultiThemeColorConfigEnv = /* @__PURE__ */ __name((prefix) => {
494
+ };
495
+ var getMultiThemeColorConfigEnv = (prefix) => {
424
496
  return {
425
- light: getBaseThemeColorConfigEnv(`${prefix}_LIGHT_`),
497
+ light: getBaseThemeColorConfigEnv(
498
+ `${prefix}_LIGHT_`
499
+ ),
426
500
  dark: getBaseThemeColorConfigEnv(`${prefix}_DARK_`)
427
501
  };
428
- }, "getMultiThemeColorConfigEnv");
429
- var getBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix) => {
502
+ };
503
+ var getBaseThemeColorConfigEnv = (prefix) => {
430
504
  return {
431
505
  foreground: process.env[`${prefix}FOREGROUND`],
432
506
  background: process.env[`${prefix}BACKGROUND`],
@@ -443,14 +517,17 @@ var getBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix) => {
443
517
  positive: process.env[`${prefix}POSITIVE`],
444
518
  negative: process.env[`${prefix}NEGATIVE`]
445
519
  };
446
- }, "getBaseThemeColorConfigEnv");
520
+ };
447
521
 
448
522
  // ../config-tools/src/env/set-env.ts
449
523
  init_esm_shims();
450
- var setExtensionEnv = /* @__PURE__ */ __name((extensionName, extension) => {
524
+ var setExtensionEnv = (extensionName, extension) => {
451
525
  for (const key of Object.keys(extension ?? {})) {
452
526
  if (extension[key]) {
453
- const result = key?.replace(/([A-Z])+/g, (input) => input ? input[0]?.toUpperCase() + input.slice(1) : "").split(/(?=[A-Z])|[.\-\s_]/).map((x) => x.toLowerCase()) ?? [];
527
+ const result = key?.replace(
528
+ /([A-Z])+/g,
529
+ (input) => input ? input[0]?.toUpperCase() + input.slice(1) : ""
530
+ ).split(/(?=[A-Z])|[.\-\s_]/).map((x) => x.toLowerCase()) ?? [];
454
531
  let extensionKey;
455
532
  if (result.length === 0) {
456
533
  return;
@@ -465,8 +542,8 @@ var setExtensionEnv = /* @__PURE__ */ __name((extensionName, extension) => {
465
542
  process.env[`STORM_EXTENSION_${extensionName.toUpperCase()}_${extensionKey.toUpperCase()}`] = extension[key];
466
543
  }
467
544
  }
468
- }, "setExtensionEnv");
469
- var setConfigEnv = /* @__PURE__ */ __name((config) => {
545
+ };
546
+ var setConfigEnv = (config) => {
470
547
  const prefix = "STORM_";
471
548
  if (config.extends) {
472
549
  process.env[`${prefix}EXTENDS`] = Array.isArray(config.extends) ? JSON.stringify(config.extends) : config.extends;
@@ -555,7 +632,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
555
632
  }
556
633
  if (config.directories) {
557
634
  if (!config.skipCache && config.directories.cache) {
558
- process.env[`${prefix}CACHE_DIR`] = correctPaths(config.directories.cache);
635
+ process.env[`${prefix}CACHE_DIR`] = correctPaths(
636
+ config.directories.cache
637
+ );
559
638
  process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
560
639
  }
561
640
  if (config.directories.data) {
@@ -563,7 +642,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
563
642
  process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
564
643
  }
565
644
  if (config.directories.config) {
566
- process.env[`${prefix}CONFIG_DIR`] = correctPaths(config.directories.config);
645
+ process.env[`${prefix}CONFIG_DIR`] = correctPaths(
646
+ config.directories.config
647
+ );
567
648
  process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
568
649
  }
569
650
  if (config.directories.temp) {
@@ -575,7 +656,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
575
656
  process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
576
657
  }
577
658
  if (config.directories.build) {
578
- process.env[`${prefix}BUILD_DIR`] = correctPaths(config.directories.build);
659
+ process.env[`${prefix}BUILD_DIR`] = correctPaths(
660
+ config.directories.build
661
+ );
579
662
  process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
580
663
  }
581
664
  }
@@ -596,7 +679,10 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
596
679
  setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
597
680
  }
598
681
  } else {
599
- setThemeColorConfigEnv(`${prefix}COLOR_`, config.colors);
682
+ setThemeColorConfigEnv(
683
+ `${prefix}COLOR_`,
684
+ config.colors
685
+ );
600
686
  }
601
687
  if (config.repository) {
602
688
  process.env[`${prefix}REPOSITORY`] = config.repository;
@@ -608,7 +694,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
608
694
  process.env[`${prefix}PRE_ID`] = String(config.preid);
609
695
  }
610
696
  if (config.externalPackagePatterns) {
611
- process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`] = JSON.stringify(config.externalPackagePatterns);
697
+ process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`] = JSON.stringify(
698
+ config.externalPackagePatterns
699
+ );
612
700
  }
613
701
  if (config.registry) {
614
702
  if (config.registry.github) {
@@ -621,20 +709,28 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
621
709
  process.env[`${prefix}REGISTRY_CARGO`] = String(config.registry.cargo);
622
710
  }
623
711
  if (config.registry.cyclone) {
624
- process.env[`${prefix}REGISTRY_CYCLONE`] = String(config.registry.cyclone);
712
+ process.env[`${prefix}REGISTRY_CYCLONE`] = String(
713
+ config.registry.cyclone
714
+ );
625
715
  }
626
716
  if (config.registry.container) {
627
- process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.container);
717
+ process.env[`${prefix}REGISTRY_CONTAINER`] = String(
718
+ config.registry.container
719
+ );
628
720
  }
629
721
  }
630
722
  if (config.logLevel) {
631
723
  process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
632
724
  process.env.LOG_LEVEL = String(config.logLevel);
633
- process.env.NX_VERBOSE_LOGGING = String(getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false);
725
+ process.env.NX_VERBOSE_LOGGING = String(
726
+ getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false
727
+ );
634
728
  process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
635
729
  }
636
730
  if (config.skipConfigLogging !== void 0) {
637
- process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
731
+ process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
732
+ config.skipConfigLogging
733
+ );
638
734
  }
639
735
  process.env[`${prefix}CONFIG`] = JSON.stringify(config);
640
736
  for (const key of Object.keys(config.extensions ?? {})) {
@@ -642,11 +738,11 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
642
738
  setExtensionEnv(key, config.extensions[key]);
643
739
  }
644
740
  }
645
- }, "setConfigEnv");
646
- var setThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
741
+ };
742
+ var setThemeColorConfigEnv = (prefix, config) => {
647
743
  return config?.light?.brand || config?.dark?.brand ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
648
- }, "setThemeColorConfigEnv");
649
- var setSingleThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
744
+ };
745
+ var setSingleThemeColorConfigEnv = (prefix, config) => {
650
746
  if (config.dark) {
651
747
  process.env[`${prefix}DARK`] = config.dark;
652
748
  }
@@ -689,14 +785,14 @@ var setSingleThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
689
785
  if (config.negative) {
690
786
  process.env[`${prefix}NEGATIVE`] = config.negative;
691
787
  }
692
- }, "setSingleThemeColorConfigEnv");
693
- var setMultiThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
788
+ };
789
+ var setMultiThemeColorConfigEnv = (prefix, config) => {
694
790
  return {
695
791
  light: setBaseThemeColorConfigEnv(`${prefix}LIGHT_`, config.light),
696
792
  dark: setBaseThemeColorConfigEnv(`${prefix}DARK_`, config.dark)
697
793
  };
698
- }, "setMultiThemeColorConfigEnv");
699
- var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
794
+ };
795
+ var setBaseThemeColorConfigEnv = (prefix, config) => {
700
796
  if (config.foreground) {
701
797
  process.env[`${prefix}FOREGROUND`] = config.foreground;
702
798
  }
@@ -739,12 +835,12 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
739
835
  if (config.negative) {
740
836
  process.env[`${prefix}NEGATIVE`] = config.negative;
741
837
  }
742
- }, "setBaseThemeColorConfigEnv");
838
+ };
743
839
 
744
840
  // ../config-tools/src/create-storm-config.ts
745
841
  var _extension_cache = /* @__PURE__ */ new WeakMap();
746
842
  var _static_cache = void 0;
747
- var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
843
+ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
748
844
  let result;
749
845
  if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
750
846
  let _workspaceRoot = workspaceRoot;
@@ -755,16 +851,19 @@ var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, sc
755
851
  const configFile = await getConfigFile(_workspaceRoot);
756
852
  if (!configFile) {
757
853
  if (!skipLogs) {
758
- writeWarning("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", {
759
- logLevel: "all"
760
- });
854
+ writeWarning(
855
+ "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",
856
+ { logLevel: "all" }
857
+ );
761
858
  }
762
859
  if (useDefault === false) {
763
860
  return void 0;
764
861
  }
765
862
  }
766
863
  const defaultConfig = await getDefaultConfig(_workspaceRoot);
767
- result = await stormWorkspaceConfigSchema.parseAsync(defu2(configEnv, configFile, defaultConfig));
864
+ result = await stormWorkspaceConfigSchema.parseAsync(
865
+ defu2(configEnv, configFile, defaultConfig)
866
+ );
768
867
  result.workspaceRoot ??= _workspaceRoot;
769
868
  } else {
770
869
  result = _static_cache.data;
@@ -780,11 +879,9 @@ var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, sc
780
879
  data: result
781
880
  };
782
881
  return result;
783
- }, "createStormWorkspaceConfig");
784
- var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
785
- const extension_cache_key = {
786
- extensionName
787
- };
882
+ };
883
+ var createConfigExtension = (extensionName, schema) => {
884
+ const extension_cache_key = { extensionName };
788
885
  if (_extension_cache.has(extension_cache_key)) {
789
886
  return _extension_cache.get(extension_cache_key);
790
887
  }
@@ -794,32 +891,41 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
794
891
  }
795
892
  _extension_cache.set(extension_cache_key, extension);
796
893
  return extension;
797
- }, "createConfigExtension");
798
- var loadStormWorkspaceConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
799
- const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs, true);
894
+ };
895
+ var loadStormWorkspaceConfig = async (workspaceRoot, skipLogs = false) => {
896
+ const config = await createStormWorkspaceConfig(
897
+ void 0,
898
+ void 0,
899
+ workspaceRoot,
900
+ skipLogs,
901
+ true
902
+ );
800
903
  setConfigEnv(config);
801
904
  if (!skipLogs && !config.skipConfigLogging) {
802
- writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
803
- ${formatLogMessage(config)}`, config);
905
+ writeTrace(
906
+ `\u2699\uFE0F Using Storm Workspace configuration:
907
+ ${formatLogMessage(config)}`,
908
+ config
909
+ );
804
910
  }
805
911
  return config;
806
- }, "loadStormWorkspaceConfig");
912
+ };
807
913
 
808
914
  // ../config-tools/src/get-config.ts
809
- var getConfig = /* @__PURE__ */ __name((workspaceRoot, skipLogs = false) => {
915
+ var getConfig = (workspaceRoot, skipLogs = false) => {
810
916
  return loadStormWorkspaceConfig(workspaceRoot, skipLogs);
811
- }, "getConfig");
812
- var getWorkspaceConfig = /* @__PURE__ */ __name((skipLogs = false, options = {}) => {
917
+ };
918
+ var getWorkspaceConfig = (skipLogs = false, options = {}) => {
813
919
  let workspaceRoot = options.workspaceRoot;
814
920
  if (!workspaceRoot) {
815
921
  workspaceRoot = findWorkspaceRoot(options.cwd);
816
922
  }
817
923
  return getConfig(workspaceRoot, skipLogs);
818
- }, "getWorkspaceConfig");
924
+ };
819
925
 
820
926
  // ../build-tools/src/utilities/get-env.ts
821
927
  init_esm_shims();
822
- var getEnv = /* @__PURE__ */ __name((builder, options) => {
928
+ var getEnv = (builder, options) => {
823
929
  return {
824
930
  STORM_BUILD: builder,
825
931
  STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
@@ -830,7 +936,7 @@ var getEnv = /* @__PURE__ */ __name((builder, options) => {
830
936
  STORM_TARGET: JSON.stringify(options.target),
831
937
  ...options.env
832
938
  };
833
- }, "getEnv");
939
+ };
834
940
 
835
941
  // ../build-tools/src/index.ts
836
942
  init_esm_shims();
@@ -883,7 +989,10 @@ import { readFile as readFile3 } from "node:fs/promises";
883
989
 
884
990
  // ../build-tools/src/utilities/task-graph.ts
885
991
  init_esm_shims();
886
- import { createTaskGraph, mapTargetDefaultsToDependencies } from "nx/src/tasks-runner/create-task-graph";
992
+ import {
993
+ createTaskGraph,
994
+ mapTargetDefaultsToDependencies
995
+ } from "nx/src/tasks-runner/create-task-graph";
887
996
 
888
997
  export {
889
998
  DEFAULT_COMPILED_BANNER,