@storm-software/cloudflare-tools 0.55.85 → 0.55.87

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 (45) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +1 -1
  3. package/dist/{chunk-VTHBMY4B.js → chunk-6XDOBG77.js} +39 -28
  4. package/dist/{chunk-FUE3PSOC.mjs → chunk-CW6SXRL4.mjs} +825 -544
  5. package/dist/{chunk-VRLPVMXP.mjs → chunk-FABNT5TZ.mjs} +15 -13
  6. package/dist/{chunk-QQJ225UZ.mjs → chunk-GPAI4NHQ.mjs} +141 -87
  7. package/dist/{chunk-YNJJF3XM.mjs → chunk-H4XWGL24.mjs} +93 -56
  8. package/dist/{chunk-IVLCYFXD.js → chunk-HBASMEU5.js} +168 -114
  9. package/dist/{chunk-6B5PUF7X.js → chunk-HIUZ6UL7.js} +97 -47
  10. package/dist/{chunk-R7AIVBS7.js → chunk-I4P7DVDN.js} +19 -24
  11. package/dist/{chunk-KWHACLHR.mjs → chunk-ISGKIYF5.mjs} +92 -42
  12. package/dist/{chunk-5RE7UZTH.mjs → chunk-L4WFYC7K.mjs} +39 -28
  13. package/dist/{chunk-PWYTCJYX.js → chunk-LDHIZ5T7.js} +875 -594
  14. package/dist/{chunk-J5SB6L2L.js → chunk-MCKGQKYU.js} +2 -5
  15. package/dist/{chunk-DEJ5S46A.mjs → chunk-MV24QW26.mjs} +195 -127
  16. package/dist/{chunk-V7LBWOVV.js → chunk-PZ5CI56F.js} +196 -128
  17. package/dist/{chunk-AOEF7EWN.mjs → chunk-QPABB45G.mjs} +19 -24
  18. package/dist/{chunk-TLFPZXKG.mjs → chunk-QQ22YQSB.mjs} +3 -6
  19. package/dist/{chunk-QGRENI3O.js → chunk-RIUVF72K.js} +17 -15
  20. package/dist/{chunk-PKQBY4ZM.js → chunk-X4Y76AIM.js} +26 -20
  21. package/dist/{chunk-CNGX2WYG.js → chunk-XCEENUJB.js} +93 -58
  22. package/dist/{chunk-N4KJP2OA.mjs → chunk-YJOYATEB.mjs} +27 -21
  23. package/dist/executors.js +8 -8
  24. package/dist/executors.mjs +8 -8
  25. package/dist/generators.js +6 -6
  26. package/dist/generators.mjs +5 -5
  27. package/dist/index.js +41 -49
  28. package/dist/index.mjs +40 -48
  29. package/dist/src/executors/cloudflare-publish/executor.js +7 -7
  30. package/dist/src/executors/cloudflare-publish/executor.mjs +6 -6
  31. package/dist/src/executors/r2-upload-publish/executor.js +7 -7
  32. package/dist/src/executors/r2-upload-publish/executor.mjs +6 -6
  33. package/dist/src/executors/serve/executor.js +49 -50
  34. package/dist/src/executors/serve/executor.mjs +48 -49
  35. package/dist/src/generators/init/generator.js +3 -3
  36. package/dist/src/generators/init/generator.mjs +2 -2
  37. package/dist/src/generators/worker/generator.js +6 -6
  38. package/dist/src/generators/worker/generator.mjs +5 -5
  39. package/dist/src/utils/index.js +4 -4
  40. package/dist/src/utils/index.mjs +3 -3
  41. package/dist/src/utils/r2-bucket-helpers.js +4 -4
  42. package/dist/src/utils/r2-bucket-helpers.mjs +3 -3
  43. package/dist/tsup.config.js +3 -8
  44. package/dist/tsup.config.mjs +3 -8
  45. package/package.json +1 -1
@@ -1,14 +1,11 @@
1
1
  import {
2
2
  writeDebug,
3
3
  writeWarning
4
- } from "./chunk-DEJ5S46A.mjs";
5
- import {
6
- __name
7
- } from "./chunk-TLFPZXKG.mjs";
4
+ } from "./chunk-MV24QW26.mjs";
8
5
 
9
6
  // src/utils/r2-bucket-helpers.ts
10
7
  import { createHash } from "node:crypto";
11
- var r2UploadFile = /* @__PURE__ */ __name(async (client, bucketName, projectPath, fileName, version, fileContent, contentType = "text/plain", isDryRun = false) => {
8
+ var r2UploadFile = async (client, bucketName, projectPath, fileName, version, fileContent, contentType = "text/plain", isDryRun = false) => {
12
9
  const checksum = createHash("sha256").update(fileContent).digest("base64");
13
10
  const fileKey = `${projectPath}/${fileName.startsWith("/") ? fileName.substring(1) : fileName}`;
14
11
  writeDebug(`Uploading file: ${fileKey}`);
@@ -26,15 +23,20 @@ var r2UploadFile = /* @__PURE__ */ __name(async (client, bucketName, projectPath
26
23
  } else {
27
24
  writeWarning("[Dry run]: skipping upload to the Cyclone Registry.");
28
25
  }
29
- }, "r2UploadFile");
30
- var getInternalDependencies = /* @__PURE__ */ __name((projectName, graph) => {
26
+ };
27
+ var getInternalDependencies = (projectName, graph) => {
31
28
  const allDeps = graph.dependencies[projectName] ?? [];
32
- return Array.from(allDeps.reduce((acc, node) => {
33
- const found = graph.nodes[node.target];
34
- if (found) acc.push(found);
35
- return acc;
36
- }, []));
37
- }, "getInternalDependencies");
29
+ return Array.from(
30
+ allDeps.reduce(
31
+ (acc, node) => {
32
+ const found = graph.nodes[node.target];
33
+ if (found) acc.push(found);
34
+ return acc;
35
+ },
36
+ []
37
+ )
38
+ );
39
+ };
38
40
 
39
41
  export {
40
42
  r2UploadFile,
@@ -14,10 +14,7 @@ import {
14
14
  stormWorkspaceConfigSchema,
15
15
  writeTrace,
16
16
  writeWarning
17
- } from "./chunk-DEJ5S46A.mjs";
18
- import {
19
- __name
20
- } from "./chunk-TLFPZXKG.mjs";
17
+ } from "./chunk-MV24QW26.mjs";
21
18
 
22
19
  // ../config-tools/src/create-storm-config.ts
23
20
  import defu2 from "defu";
@@ -25,7 +22,7 @@ import defu2 from "defu";
25
22
  // ../config-tools/src/config-file/get-config-file.ts
26
23
  import { loadConfig } from "c12";
27
24
  import defu from "defu";
28
- var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, options = {}) => {
25
+ var getConfigFileByName = async (fileName, filePath, options = {}) => {
29
26
  const workspacePath = filePath || findWorkspaceRoot(filePath);
30
27
  const configs = await Promise.all([
31
28
  loadConfig({
@@ -35,7 +32,10 @@ var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, opti
35
32
  envName: fileName?.toUpperCase(),
36
33
  jitiOptions: {
37
34
  debug: false,
38
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
35
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
36
+ process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
37
+ "jiti"
38
+ )
39
39
  },
40
40
  ...options
41
41
  }),
@@ -46,32 +46,45 @@ var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, opti
46
46
  envName: fileName?.toUpperCase(),
47
47
  jitiOptions: {
48
48
  debug: false,
49
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
49
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
50
+ process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
51
+ "jiti"
52
+ )
50
53
  },
51
54
  configFile: fileName,
52
55
  ...options
53
56
  })
54
57
  ]);
55
58
  return defu(configs[0] ?? {}, configs[1] ?? {});
56
- }, "getConfigFileByName");
57
- var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames = []) => {
59
+ };
60
+ var getConfigFile = async (filePath, additionalFileNames = []) => {
58
61
  const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
59
62
  const result = await getConfigFileByName("storm-workspace", workspacePath);
60
63
  let config = result.config;
61
64
  const configFile = result.configFile;
62
65
  if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
63
- writeTrace(`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
64
- logLevel: "all"
65
- });
66
+ writeTrace(
67
+ `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
68
+ {
69
+ logLevel: "all"
70
+ }
71
+ );
66
72
  }
67
73
  if (additionalFileNames && additionalFileNames.length > 0) {
68
- const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
74
+ const results = await Promise.all(
75
+ additionalFileNames.map(
76
+ (fileName) => getConfigFileByName(fileName, workspacePath)
77
+ )
78
+ );
69
79
  for (const result2 of results) {
70
80
  if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
71
81
  if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
72
- writeTrace(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
73
- logLevel: "all"
74
- });
82
+ writeTrace(
83
+ `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
84
+ {
85
+ logLevel: "all"
86
+ }
87
+ );
75
88
  }
76
89
  config = defu(result2.config ?? {}, config ?? {});
77
90
  }
@@ -82,20 +95,22 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
82
95
  }
83
96
  config.configFile = configFile;
84
97
  return config;
85
- }, "getConfigFile");
98
+ };
86
99
 
87
100
  // ../config-tools/src/env/get-env.ts
88
- var getExtensionEnv = /* @__PURE__ */ __name((extensionName) => {
101
+ var getExtensionEnv = (extensionName) => {
89
102
  const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
90
103
  return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
91
- const name = key.replace(prefix, "").split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
104
+ const name = key.replace(prefix, "").split("_").map(
105
+ (i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : ""
106
+ ).join("");
92
107
  if (name) {
93
108
  ret[name] = process.env[key];
94
109
  }
95
110
  return ret;
96
111
  }, {});
97
- }, "getExtensionEnv");
98
- var getConfigEnv = /* @__PURE__ */ __name(() => {
112
+ };
113
+ var getConfigEnv = () => {
99
114
  const prefix = "STORM_";
100
115
  let config = {
101
116
  extends: process.env[`${prefix}EXTENDS`] || void 0,
@@ -163,14 +178,25 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
163
178
  cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
164
179
  container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
165
180
  },
166
- 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,
181
+ logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
182
+ Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
183
+ ) ? getLogLevelLabel(
184
+ Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
185
+ ) : process.env[`${prefix}LOG_LEVEL`] : void 0,
167
186
  skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
168
187
  };
169
- 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}`)));
170
- config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
171
- ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
172
- return ret;
173
- }, {}) : getThemeColorConfigEnv(prefix);
188
+ const themeNames = Object.keys(process.env).filter(
189
+ (envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every(
190
+ (colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
191
+ )
192
+ );
193
+ config.colors = themeNames.length > 0 ? themeNames.reduce(
194
+ (ret, themeName) => {
195
+ ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
196
+ return ret;
197
+ },
198
+ {}
199
+ ) : getThemeColorConfigEnv(prefix);
174
200
  if (config.docs === STORM_DEFAULT_DOCS) {
175
201
  if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
176
202
  config.docs = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
@@ -191,23 +217,17 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
191
217
  config = {
192
218
  ...config,
193
219
  ...parsed,
194
- colors: {
195
- ...config.colors,
196
- ...parsed.colors
197
- },
198
- extensions: {
199
- ...config.extensions,
200
- ...parsed.extensions
201
- }
220
+ colors: { ...config.colors, ...parsed.colors },
221
+ extensions: { ...config.extensions, ...parsed.extensions }
202
222
  };
203
223
  }
204
224
  return config;
205
- }, "getConfigEnv");
206
- var getThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, theme) => {
225
+ };
226
+ var getThemeColorConfigEnv = (prefix, theme) => {
207
227
  const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
208
228
  return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorConfigEnv(prefix + themeName) : getSingleThemeColorConfigEnv(prefix + themeName);
209
- }, "getThemeColorConfigEnv");
210
- var getSingleThemeColorConfigEnv = /* @__PURE__ */ __name((prefix) => {
229
+ };
230
+ var getSingleThemeColorConfigEnv = (prefix) => {
211
231
  return {
212
232
  dark: process.env[`${prefix}DARK`],
213
233
  light: process.env[`${prefix}LIGHT`],
@@ -224,14 +244,16 @@ var getSingleThemeColorConfigEnv = /* @__PURE__ */ __name((prefix) => {
224
244
  positive: process.env[`${prefix}POSITIVE`],
225
245
  negative: process.env[`${prefix}NEGATIVE`]
226
246
  };
227
- }, "getSingleThemeColorConfigEnv");
228
- var getMultiThemeColorConfigEnv = /* @__PURE__ */ __name((prefix) => {
247
+ };
248
+ var getMultiThemeColorConfigEnv = (prefix) => {
229
249
  return {
230
- light: getBaseThemeColorConfigEnv(`${prefix}_LIGHT_`),
250
+ light: getBaseThemeColorConfigEnv(
251
+ `${prefix}_LIGHT_`
252
+ ),
231
253
  dark: getBaseThemeColorConfigEnv(`${prefix}_DARK_`)
232
254
  };
233
- }, "getMultiThemeColorConfigEnv");
234
- var getBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix) => {
255
+ };
256
+ var getBaseThemeColorConfigEnv = (prefix) => {
235
257
  return {
236
258
  foreground: process.env[`${prefix}FOREGROUND`],
237
259
  background: process.env[`${prefix}BACKGROUND`],
@@ -248,13 +270,16 @@ var getBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix) => {
248
270
  positive: process.env[`${prefix}POSITIVE`],
249
271
  negative: process.env[`${prefix}NEGATIVE`]
250
272
  };
251
- }, "getBaseThemeColorConfigEnv");
273
+ };
252
274
 
253
275
  // ../config-tools/src/env/set-env.ts
254
- var setExtensionEnv = /* @__PURE__ */ __name((extensionName, extension) => {
276
+ var setExtensionEnv = (extensionName, extension) => {
255
277
  for (const key of Object.keys(extension ?? {})) {
256
278
  if (extension[key]) {
257
- const result = key?.replace(/([A-Z])+/g, (input) => input ? input[0]?.toUpperCase() + input.slice(1) : "").split(/(?=[A-Z])|[.\-\s_]/).map((x) => x.toLowerCase()) ?? [];
279
+ const result = key?.replace(
280
+ /([A-Z])+/g,
281
+ (input) => input ? input[0]?.toUpperCase() + input.slice(1) : ""
282
+ ).split(/(?=[A-Z])|[.\-\s_]/).map((x) => x.toLowerCase()) ?? [];
258
283
  let extensionKey;
259
284
  if (result.length === 0) {
260
285
  return;
@@ -269,8 +294,8 @@ var setExtensionEnv = /* @__PURE__ */ __name((extensionName, extension) => {
269
294
  process.env[`STORM_EXTENSION_${extensionName.toUpperCase()}_${extensionKey.toUpperCase()}`] = extension[key];
270
295
  }
271
296
  }
272
- }, "setExtensionEnv");
273
- var setConfigEnv = /* @__PURE__ */ __name((config) => {
297
+ };
298
+ var setConfigEnv = (config) => {
274
299
  const prefix = "STORM_";
275
300
  if (config.extends) {
276
301
  process.env[`${prefix}EXTENDS`] = Array.isArray(config.extends) ? JSON.stringify(config.extends) : config.extends;
@@ -359,7 +384,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
359
384
  }
360
385
  if (config.directories) {
361
386
  if (!config.skipCache && config.directories.cache) {
362
- process.env[`${prefix}CACHE_DIR`] = correctPaths(config.directories.cache);
387
+ process.env[`${prefix}CACHE_DIR`] = correctPaths(
388
+ config.directories.cache
389
+ );
363
390
  process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
364
391
  }
365
392
  if (config.directories.data) {
@@ -367,7 +394,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
367
394
  process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
368
395
  }
369
396
  if (config.directories.config) {
370
- process.env[`${prefix}CONFIG_DIR`] = correctPaths(config.directories.config);
397
+ process.env[`${prefix}CONFIG_DIR`] = correctPaths(
398
+ config.directories.config
399
+ );
371
400
  process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
372
401
  }
373
402
  if (config.directories.temp) {
@@ -379,7 +408,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
379
408
  process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
380
409
  }
381
410
  if (config.directories.build) {
382
- process.env[`${prefix}BUILD_DIR`] = correctPaths(config.directories.build);
411
+ process.env[`${prefix}BUILD_DIR`] = correctPaths(
412
+ config.directories.build
413
+ );
383
414
  process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
384
415
  }
385
416
  }
@@ -400,7 +431,10 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
400
431
  setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
401
432
  }
402
433
  } else {
403
- setThemeColorConfigEnv(`${prefix}COLOR_`, config.colors);
434
+ setThemeColorConfigEnv(
435
+ `${prefix}COLOR_`,
436
+ config.colors
437
+ );
404
438
  }
405
439
  if (config.repository) {
406
440
  process.env[`${prefix}REPOSITORY`] = config.repository;
@@ -412,7 +446,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
412
446
  process.env[`${prefix}PRE_ID`] = String(config.preid);
413
447
  }
414
448
  if (config.externalPackagePatterns) {
415
- process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`] = JSON.stringify(config.externalPackagePatterns);
449
+ process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`] = JSON.stringify(
450
+ config.externalPackagePatterns
451
+ );
416
452
  }
417
453
  if (config.registry) {
418
454
  if (config.registry.github) {
@@ -425,20 +461,28 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
425
461
  process.env[`${prefix}REGISTRY_CARGO`] = String(config.registry.cargo);
426
462
  }
427
463
  if (config.registry.cyclone) {
428
- process.env[`${prefix}REGISTRY_CYCLONE`] = String(config.registry.cyclone);
464
+ process.env[`${prefix}REGISTRY_CYCLONE`] = String(
465
+ config.registry.cyclone
466
+ );
429
467
  }
430
468
  if (config.registry.container) {
431
- process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.container);
469
+ process.env[`${prefix}REGISTRY_CONTAINER`] = String(
470
+ config.registry.container
471
+ );
432
472
  }
433
473
  }
434
474
  if (config.logLevel) {
435
475
  process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
436
476
  process.env.LOG_LEVEL = String(config.logLevel);
437
- process.env.NX_VERBOSE_LOGGING = String(getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false);
477
+ process.env.NX_VERBOSE_LOGGING = String(
478
+ getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false
479
+ );
438
480
  process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
439
481
  }
440
482
  if (config.skipConfigLogging !== void 0) {
441
- process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
483
+ process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
484
+ config.skipConfigLogging
485
+ );
442
486
  }
443
487
  process.env[`${prefix}CONFIG`] = JSON.stringify(config);
444
488
  for (const key of Object.keys(config.extensions ?? {})) {
@@ -446,11 +490,11 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
446
490
  setExtensionEnv(key, config.extensions[key]);
447
491
  }
448
492
  }
449
- }, "setConfigEnv");
450
- var setThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
493
+ };
494
+ var setThemeColorConfigEnv = (prefix, config) => {
451
495
  return config?.light?.brand || config?.dark?.brand ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
452
- }, "setThemeColorConfigEnv");
453
- var setSingleThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
496
+ };
497
+ var setSingleThemeColorConfigEnv = (prefix, config) => {
454
498
  if (config.dark) {
455
499
  process.env[`${prefix}DARK`] = config.dark;
456
500
  }
@@ -493,14 +537,14 @@ var setSingleThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
493
537
  if (config.negative) {
494
538
  process.env[`${prefix}NEGATIVE`] = config.negative;
495
539
  }
496
- }, "setSingleThemeColorConfigEnv");
497
- var setMultiThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
540
+ };
541
+ var setMultiThemeColorConfigEnv = (prefix, config) => {
498
542
  return {
499
543
  light: setBaseThemeColorConfigEnv(`${prefix}LIGHT_`, config.light),
500
544
  dark: setBaseThemeColorConfigEnv(`${prefix}DARK_`, config.dark)
501
545
  };
502
- }, "setMultiThemeColorConfigEnv");
503
- var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
546
+ };
547
+ var setBaseThemeColorConfigEnv = (prefix, config) => {
504
548
  if (config.foreground) {
505
549
  process.env[`${prefix}FOREGROUND`] = config.foreground;
506
550
  }
@@ -543,12 +587,12 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
543
587
  if (config.negative) {
544
588
  process.env[`${prefix}NEGATIVE`] = config.negative;
545
589
  }
546
- }, "setBaseThemeColorConfigEnv");
590
+ };
547
591
 
548
592
  // ../config-tools/src/create-storm-config.ts
549
593
  var _extension_cache = /* @__PURE__ */ new WeakMap();
550
594
  var _static_cache = void 0;
551
- var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
595
+ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
552
596
  let result;
553
597
  if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
554
598
  let _workspaceRoot = workspaceRoot;
@@ -559,16 +603,19 @@ var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, sc
559
603
  const configFile = await getConfigFile(_workspaceRoot);
560
604
  if (!configFile) {
561
605
  if (!skipLogs) {
562
- 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", {
563
- logLevel: "all"
564
- });
606
+ writeWarning(
607
+ "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",
608
+ { logLevel: "all" }
609
+ );
565
610
  }
566
611
  if (useDefault === false) {
567
612
  return void 0;
568
613
  }
569
614
  }
570
615
  const defaultConfig = await getDefaultConfig(_workspaceRoot);
571
- result = await stormWorkspaceConfigSchema.parseAsync(defu2(configEnv, configFile, defaultConfig));
616
+ result = await stormWorkspaceConfigSchema.parseAsync(
617
+ defu2(configEnv, configFile, defaultConfig)
618
+ );
572
619
  result.workspaceRoot ??= _workspaceRoot;
573
620
  } else {
574
621
  result = _static_cache.data;
@@ -584,11 +631,9 @@ var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, sc
584
631
  data: result
585
632
  };
586
633
  return result;
587
- }, "createStormWorkspaceConfig");
588
- var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
589
- const extension_cache_key = {
590
- extensionName
591
- };
634
+ };
635
+ var createConfigExtension = (extensionName, schema) => {
636
+ const extension_cache_key = { extensionName };
592
637
  if (_extension_cache.has(extension_cache_key)) {
593
638
  return _extension_cache.get(extension_cache_key);
594
639
  }
@@ -598,28 +643,37 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
598
643
  }
599
644
  _extension_cache.set(extension_cache_key, extension);
600
645
  return extension;
601
- }, "createConfigExtension");
602
- var loadStormWorkspaceConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
603
- const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs, true);
646
+ };
647
+ var loadStormWorkspaceConfig = async (workspaceRoot, skipLogs = false) => {
648
+ const config = await createStormWorkspaceConfig(
649
+ void 0,
650
+ void 0,
651
+ workspaceRoot,
652
+ skipLogs,
653
+ true
654
+ );
604
655
  setConfigEnv(config);
605
656
  if (!skipLogs && !config.skipConfigLogging) {
606
- writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
607
- ${formatLogMessage(config)}`, config);
657
+ writeTrace(
658
+ `\u2699\uFE0F Using Storm Workspace configuration:
659
+ ${formatLogMessage(config)}`,
660
+ config
661
+ );
608
662
  }
609
663
  return config;
610
- }, "loadStormWorkspaceConfig");
664
+ };
611
665
 
612
666
  // ../config-tools/src/get-config.ts
613
- var getConfig = /* @__PURE__ */ __name((workspaceRoot, skipLogs = false) => {
667
+ var getConfig = (workspaceRoot, skipLogs = false) => {
614
668
  return loadStormWorkspaceConfig(workspaceRoot, skipLogs);
615
- }, "getConfig");
616
- var getWorkspaceConfig = /* @__PURE__ */ __name((skipLogs = false, options = {}) => {
669
+ };
670
+ var getWorkspaceConfig = (skipLogs = false, options = {}) => {
617
671
  let workspaceRoot = options.workspaceRoot;
618
672
  if (!workspaceRoot) {
619
673
  workspaceRoot = findWorkspaceRoot(options.cwd);
620
674
  }
621
675
  return getConfig(workspaceRoot, skipLogs);
622
- }, "getWorkspaceConfig");
676
+ };
623
677
 
624
678
  export {
625
679
  getConfig,