@storm-software/cloudflare-tools 0.71.41 → 0.71.43

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 (36) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/{chunk-NFHONUD4.mjs → chunk-BG4BOS55.mjs} +4 -4
  3. package/dist/{chunk-QJJBMXLH.js → chunk-EAEYODL7.js} +4 -4
  4. package/dist/{chunk-UIJO3L53.js → chunk-EEHCZLIG.js} +175 -168
  5. package/dist/{chunk-D2C4YN2P.mjs → chunk-FJC6NTFV.mjs} +1 -1
  6. package/dist/{chunk-WRQN6TUO.js → chunk-FZGJMP4V.js} +5 -5
  7. package/dist/{chunk-CET7FSBB.mjs → chunk-KP72CV3N.mjs} +31 -0
  8. package/dist/{chunk-ZNZEZZQ3.mjs → chunk-LRWE7JIO.mjs} +1 -1
  9. package/dist/{chunk-F62R4VXI.mjs → chunk-RH3QEZJL.mjs} +16 -9
  10. package/dist/{chunk-APKXT2II.js → chunk-U63JI4YT.js} +34 -34
  11. package/dist/{chunk-OVTCUMRN.js → chunk-WKCHZUJS.js} +18 -18
  12. package/dist/{chunk-JC5YYXOF.mjs → chunk-XTJO7LT5.mjs} +3 -3
  13. package/dist/{chunk-B3DTG4AE.mjs → chunk-YHOL7SZX.mjs} +11 -7
  14. package/dist/{chunk-ENJ4VPTU.js → chunk-YQSZDW5I.js} +17 -13
  15. package/dist/{chunk-J756GE67.js → chunk-ZVAXGNHM.js} +36 -5
  16. package/dist/executors.js +5 -5
  17. package/dist/executors.mjs +5 -5
  18. package/dist/generators.js +5 -5
  19. package/dist/generators.mjs +4 -4
  20. package/dist/index.js +8 -8
  21. package/dist/index.mjs +7 -7
  22. package/dist/src/executors/cloudflare-publish/executor.js +3 -3
  23. package/dist/src/executors/cloudflare-publish/executor.mjs +3 -3
  24. package/dist/src/executors/r2-upload-publish/executor.js +5 -5
  25. package/dist/src/executors/r2-upload-publish/executor.mjs +4 -4
  26. package/dist/src/executors/serve/executor.js +4 -4
  27. package/dist/src/executors/serve/executor.mjs +3 -3
  28. package/dist/src/generators/init/generator.js +2 -2
  29. package/dist/src/generators/init/generator.mjs +1 -1
  30. package/dist/src/generators/worker/generator.js +5 -5
  31. package/dist/src/generators/worker/generator.mjs +4 -4
  32. package/dist/src/utils/index.js +3 -3
  33. package/dist/src/utils/index.mjs +2 -2
  34. package/dist/src/utils/r2-bucket-helpers.js +3 -3
  35. package/dist/src/utils/r2-bucket-helpers.mjs +2 -2
  36. package/package.json +5 -5
@@ -3,7 +3,7 @@ import {
3
3
  writeDebug,
4
4
  writeError,
5
5
  writeWarning
6
- } from "./chunk-CET7FSBB.mjs";
6
+ } from "./chunk-KP72CV3N.mjs";
7
7
 
8
8
  // src/utils/r2-bucket-helpers.ts
9
9
  import { Upload } from "@aws-sdk/lib-storage";
@@ -3,15 +3,15 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkJ756GE67js = require('./chunk-J756GE67.js');
6
+ var _chunkZVAXGNHMjs = require('./chunk-ZVAXGNHM.js');
7
7
 
8
8
  // src/utils/r2-bucket-helpers.ts
9
9
  var _libstorage = require('@aws-sdk/lib-storage');
10
10
  var _crypto = require('crypto');
11
11
  var _prettybytes = require('pretty-bytes'); var _prettybytes2 = _interopRequireDefault(_prettybytes);
12
12
  async function uploadFile(client, bucketName, bucketPath, fileName, version, fileContent, contentType = "application/octet-stream", isDryRun = false) {
13
- const key = _optionalChain([(!_optionalChain([bucketPath, 'optionalAccess', _ => _.trim, 'call', _2 => _2()]) || _optionalChain([bucketPath, 'optionalAccess', _3 => _3.trim, 'call', _4 => _4()]) === "/" ? fileName : _chunkJ756GE67js.joinPaths.call(void 0, bucketPath.trim(), fileName)), 'optionalAccess', _5 => _5.replace, 'call', _6 => _6(/^\/+/g, "")]) || "";
14
- _chunkJ756GE67js.writeDebug.call(void 0,
13
+ const key = _optionalChain([(!_optionalChain([bucketPath, 'optionalAccess', _ => _.trim, 'call', _2 => _2()]) || _optionalChain([bucketPath, 'optionalAccess', _3 => _3.trim, 'call', _4 => _4()]) === "/" ? fileName : _chunkZVAXGNHMjs.joinPaths.call(void 0, bucketPath.trim(), fileName)), 'optionalAccess', _5 => _5.replace, 'call', _6 => _6(/^\/+/g, "")]) || "";
14
+ _chunkZVAXGNHMjs.writeDebug.call(void 0,
15
15
  `Uploading ${key} (content-type: ${contentType}, size: ${_prettybytes2.default.call(void 0,
16
16
  Buffer.byteLength(fileContent, getEncoding(contentType))
17
17
  )}) to the ${bucketName} R2 bucket`
@@ -33,10 +33,10 @@ async function uploadFile(client, bucketName, bucketPath, fileName, version, fil
33
33
  });
34
34
  await upload.done();
35
35
  } else {
36
- _chunkJ756GE67js.writeWarning.call(void 0, "[Dry run]: Skipping upload to the R2 bucket.");
36
+ _chunkZVAXGNHMjs.writeWarning.call(void 0, "[Dry run]: Skipping upload to the R2 bucket.");
37
37
  }
38
38
  } catch (error) {
39
- _chunkJ756GE67js.writeError.call(void 0, `Failed to upload ${key} to the ${bucketName} R2 bucket.`);
39
+ _chunkZVAXGNHMjs.writeError.call(void 0, `Failed to upload ${key} to the ${bucketName} R2 bucket.`);
40
40
  throw error;
41
41
  }
42
42
  }
@@ -62,6 +62,35 @@ var DEFAULT_COLOR_CONFIG = {
62
62
  gradient: ["#1fb2a6", "#db2777", "#818cf8"]
63
63
  }
64
64
  };
65
+ function getColors(config) {
66
+ if (!config?.colors || typeof config.colors !== "object" || !config.colors["dark"] && (!config.colors["base"] || typeof config.colors !== "object" || !config.colors["base"]?.["dark"])) {
67
+ return DEFAULT_COLOR_CONFIG;
68
+ }
69
+ if (config.colors["base"]) {
70
+ if (typeof config.colors["base"]["dark"] === "object") {
71
+ return config.colors["base"]["dark"];
72
+ } else if (config.colors["base"]["dark"] === "string") {
73
+ return config.colors["base"];
74
+ }
75
+ }
76
+ if (typeof config.colors["dark"] === "object") {
77
+ return config.colors["dark"];
78
+ }
79
+ return config.colors ?? DEFAULT_COLOR_CONFIG;
80
+ }
81
+ function getColor(key, config) {
82
+ const colors = getColors(config);
83
+ const result = (typeof colors["dark"] === "object" ? colors["dark"][key] : colors[key]) || DEFAULT_COLOR_CONFIG["dark"][key] || DEFAULT_COLOR_CONFIG[key];
84
+ if (result) {
85
+ return result;
86
+ }
87
+ if (key === "link" || key === "debug") {
88
+ return getColor("info", config);
89
+ } else if (key === "fatal") {
90
+ return getColor("danger", config);
91
+ }
92
+ return getColor("brand", config);
93
+ }
65
94
 
66
95
  // ../config-tools/src/logger/chalk.ts
67
96
  import chalk from "chalk";
@@ -328,6 +357,7 @@ var _isFunction = (value) => {
328
357
  return false;
329
358
  }
330
359
  };
360
+ var brandIcon = (config = {}, _chalk = getChalk()) => _chalk.hex(getColor("brand", config))("\u{1F5F2}");
331
361
 
332
362
  // ../config-tools/src/utilities/correct-paths.ts
333
363
  var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
@@ -508,6 +538,7 @@ export {
508
538
  writeTrace,
509
539
  getStopwatch,
510
540
  formatLogMessage,
541
+ brandIcon,
511
542
  correctPaths,
512
543
  joinPaths,
513
544
  isAbsolute,
@@ -7,7 +7,7 @@ import {
7
7
  joinPaths,
8
8
  writeTrace,
9
9
  writeWarning
10
- } from "./chunk-CET7FSBB.mjs";
10
+ } from "./chunk-KP72CV3N.mjs";
11
11
 
12
12
  // ../config-tools/src/utilities/find-up.ts
13
13
  import { existsSync } from "node:fs";
@@ -8,8 +8,9 @@ import {
8
8
  getWorkspaceConfig,
9
9
  schemaRegistry,
10
10
  workspaceConfigSchema
11
- } from "./chunk-ZNZEZZQ3.mjs";
11
+ } from "./chunk-LRWE7JIO.mjs";
12
12
  import {
13
+ brandIcon,
13
14
  correctPaths,
14
15
  formatLogMessage,
15
16
  getStopwatch,
@@ -23,7 +24,7 @@ import {
23
24
  writeSuccess,
24
25
  writeTrace,
25
26
  writeWarning
26
- } from "./chunk-CET7FSBB.mjs";
27
+ } from "./chunk-KP72CV3N.mjs";
27
28
  import {
28
29
  __dirname
29
30
  } from "./chunk-N5UXWPB6.mjs";
@@ -117,7 +118,10 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
117
118
  const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot || projectRoot || workspaceRoot2;
118
119
  const projectName = context.projectName;
119
120
  config.workspaceRoot = workspaceRoot2;
120
- writeInfo(`\u26A1 Running the ${name} executor for ${projectName} `, config);
121
+ writeInfo(
122
+ `${brandIcon(config)} Running the ${name} executor for ${projectName} `,
123
+ config
124
+ );
121
125
  if (!executorOptions.skipReadingConfig) {
122
126
  writeTrace(
123
127
  `Loading the Storm Config from environment variables and storm.config.js file...
@@ -457,12 +461,12 @@ var LARGE_BUFFER = 1024 * 1e6;
457
461
  // ../build-tools/src/config.ts
458
462
  var DEFAULT_JS_BANNER = `
459
463
  // ---------------------------------------
460
- // \u26A1 Built by Storm Software
464
+ // \u{1F5F2} Built by Storm Software
461
465
  // ---------------------------------------
462
466
  `;
463
467
  var DEFAULT_CSS_BANNER = `
464
468
  /* ---------------------------------------
465
- \u26A1 Built by Storm Software
469
+ \u{1F5F2} Built by Storm Software
466
470
  --------------------------------------- */
467
471
  `;
468
472
  var DEFAULT_ENVIRONMENT = "production";
@@ -1122,7 +1126,7 @@ async function cleanOutputPath(context) {
1122
1126
  return context;
1123
1127
  }
1124
1128
  async function build2(options) {
1125
- writeDebug(` \u26A1 Executing Storm ESBuild pipeline`);
1129
+ writeDebug(` ${brandIcon()} Executing Storm ESBuild pipeline`);
1126
1130
  const stopwatch = getStopwatch("ESBuild pipeline");
1127
1131
  try {
1128
1132
  const opts = Array.isArray(options) ? options : [options];
@@ -1612,7 +1616,7 @@ async function cleanOutputPath2(options) {
1612
1616
  return options;
1613
1617
  }
1614
1618
  async function build3(options) {
1615
- writeDebug(` \u26A1 Executing Storm TSDown pipeline`);
1619
+ writeDebug(` ${brandIcon()} Executing Storm TSDown pipeline`);
1616
1620
  const stopwatch = getStopwatch("TSDown pipeline");
1617
1621
  try {
1618
1622
  const opts = Array.isArray(options) ? options : [options];
@@ -1833,9 +1837,12 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
1833
1837
  let options = _options;
1834
1838
  let config;
1835
1839
  try {
1836
- writeInfo(`\u26A1 Running the ${name} generator...
1840
+ writeInfo(
1841
+ `${brandIcon(config)} Running the ${name} generator...
1837
1842
 
1838
- `, config);
1843
+ `,
1844
+ config
1845
+ );
1839
1846
  const workspaceRoot2 = findWorkspaceRoot();
1840
1847
  if (!generatorOptions.skipReadingConfig) {
1841
1848
  writeDebug(
@@ -7,7 +7,7 @@
7
7
 
8
8
 
9
9
 
10
- var _chunkJ756GE67js = require('./chunk-J756GE67.js');
10
+ var _chunkZVAXGNHMjs = require('./chunk-ZVAXGNHM.js');
11
11
 
12
12
  // ../config-tools/src/utilities/find-up.ts
13
13
  var _fs = require('fs');
@@ -76,11 +76,11 @@ var rootDirectories = [
76
76
  ];
77
77
  function findWorkspaceRootSafe(pathInsideMonorepo) {
78
78
  if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
79
- return _chunkJ756GE67js.correctPaths.call(void 0,
79
+ return _chunkZVAXGNHMjs.correctPaths.call(void 0,
80
80
  _nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH))
81
81
  );
82
82
  }
83
- return _chunkJ756GE67js.correctPaths.call(void 0,
83
+ return _chunkZVAXGNHMjs.correctPaths.call(void 0,
84
84
  findFolderUp(
85
85
  _nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())),
86
86
  rootFiles,
@@ -724,7 +724,7 @@ async function getPackageJsonConfig(root) {
724
724
  const workspaceRoot = findWorkspaceRoot(root);
725
725
  if (_fs.existsSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"))) {
726
726
  const file = await _promises.readFile.call(void 0,
727
- _chunkJ756GE67js.joinPaths.call(void 0, workspaceRoot, "package.json"),
727
+ _chunkZVAXGNHMjs.joinPaths.call(void 0, workspaceRoot, "package.json"),
728
728
  "utf8"
729
729
  );
730
730
  if (file) {
@@ -808,7 +808,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
808
808
  envName: _optionalChain([fileName, 'optionalAccess', _5 => _5.toUpperCase, 'call', _6 => _6()]),
809
809
  jitiOptions: {
810
810
  debug: false,
811
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkJ756GE67js.joinPaths.call(void 0,
811
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkZVAXGNHMjs.joinPaths.call(void 0,
812
812
  process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
813
813
  "jiti"
814
814
  )
@@ -822,7 +822,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
822
822
  envName: _optionalChain([fileName, 'optionalAccess', _7 => _7.toUpperCase, 'call', _8 => _8()]),
823
823
  jitiOptions: {
824
824
  debug: false,
825
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkJ756GE67js.joinPaths.call(void 0,
825
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkZVAXGNHMjs.joinPaths.call(void 0,
826
826
  process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
827
827
  "jiti"
828
828
  )
@@ -839,7 +839,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
839
839
  let config = result.config;
840
840
  const configFile = result.configFile;
841
841
  if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
842
- _chunkJ756GE67js.writeTrace.call(void 0,
842
+ _chunkZVAXGNHMjs.writeTrace.call(void 0,
843
843
  `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
844
844
  {
845
845
  logLevel: "all"
@@ -855,7 +855,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
855
855
  for (const result2 of results) {
856
856
  if (_optionalChain([result2, 'optionalAccess', _9 => _9.config]) && _optionalChain([result2, 'optionalAccess', _10 => _10.configFile]) && Object.keys(result2.config).length > 0) {
857
857
  if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
858
- _chunkJ756GE67js.writeTrace.call(void 0,
858
+ _chunkZVAXGNHMjs.writeTrace.call(void 0,
859
859
  `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
860
860
  {
861
861
  logLevel: "all"
@@ -935,15 +935,15 @@ var getConfigEnv = () => {
935
935
  support: process.env[`${prefix}SUPPORT`] || void 0,
936
936
  timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
937
937
  locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
938
- configFile: process.env[`${prefix}WORKSPACE_CONFIG_FILE`] ? _chunkJ756GE67js.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_CONFIG_FILE`]) : void 0,
939
- workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkJ756GE67js.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
938
+ configFile: process.env[`${prefix}WORKSPACE_CONFIG_FILE`] ? _chunkZVAXGNHMjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_CONFIG_FILE`]) : void 0,
939
+ workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkZVAXGNHMjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
940
940
  directories: {
941
- cache: process.env[`${prefix}CACHE_DIR`] ? _chunkJ756GE67js.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? _chunkJ756GE67js.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
942
- data: process.env[`${prefix}DATA_DIR`] ? _chunkJ756GE67js.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? _chunkJ756GE67js.correctPaths.call(void 0, process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
943
- config: process.env[`${prefix}CONFIG_DIR`] ? _chunkJ756GE67js.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? _chunkJ756GE67js.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
944
- temp: process.env[`${prefix}TEMP_DIR`] ? _chunkJ756GE67js.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? _chunkJ756GE67js.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
945
- log: process.env[`${prefix}LOG_DIR`] ? _chunkJ756GE67js.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? _chunkJ756GE67js.correctPaths.call(void 0, process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
946
- build: process.env[`${prefix}BUILD_DIR`] ? _chunkJ756GE67js.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? _chunkJ756GE67js.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
941
+ cache: process.env[`${prefix}CACHE_DIR`] ? _chunkZVAXGNHMjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? _chunkZVAXGNHMjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
942
+ data: process.env[`${prefix}DATA_DIR`] ? _chunkZVAXGNHMjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? _chunkZVAXGNHMjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
943
+ config: process.env[`${prefix}CONFIG_DIR`] ? _chunkZVAXGNHMjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? _chunkZVAXGNHMjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
944
+ temp: process.env[`${prefix}TEMP_DIR`] ? _chunkZVAXGNHMjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? _chunkZVAXGNHMjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
945
+ log: process.env[`${prefix}LOG_DIR`] ? _chunkZVAXGNHMjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? _chunkZVAXGNHMjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
946
+ build: process.env[`${prefix}BUILD_DIR`] ? _chunkZVAXGNHMjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? _chunkZVAXGNHMjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
947
947
  },
948
948
  skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
949
949
  mode: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}MODE`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
@@ -967,7 +967,7 @@ var getConfigEnv = () => {
967
967
  },
968
968
  logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
969
969
  Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
970
- ) ? _chunkJ756GE67js.getLogLevelLabel.call(void 0,
970
+ ) ? _chunkZVAXGNHMjs.getLogLevelLabel.call(void 0,
971
971
  Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
972
972
  ) : process.env[`${prefix}LOG_LEVEL`] : void 0,
973
973
  skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
@@ -1235,42 +1235,42 @@ var setConfigEnv = (config) => {
1235
1235
  process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
1236
1236
  }
1237
1237
  if (config.configFile) {
1238
- process.env[`${prefix}WORKSPACE_CONFIG_FILE`] = _chunkJ756GE67js.correctPaths.call(void 0,
1238
+ process.env[`${prefix}WORKSPACE_CONFIG_FILE`] = _chunkZVAXGNHMjs.correctPaths.call(void 0,
1239
1239
  config.configFile
1240
1240
  );
1241
1241
  }
1242
1242
  if (config.workspaceRoot) {
1243
- process.env[`${prefix}WORKSPACE_ROOT`] = _chunkJ756GE67js.correctPaths.call(void 0, config.workspaceRoot);
1244
- process.env.NX_WORKSPACE_ROOT = _chunkJ756GE67js.correctPaths.call(void 0, config.workspaceRoot);
1245
- process.env.NX_WORKSPACE_ROOT_PATH = _chunkJ756GE67js.correctPaths.call(void 0, config.workspaceRoot);
1243
+ process.env[`${prefix}WORKSPACE_ROOT`] = _chunkZVAXGNHMjs.correctPaths.call(void 0, config.workspaceRoot);
1244
+ process.env.NX_WORKSPACE_ROOT = _chunkZVAXGNHMjs.correctPaths.call(void 0, config.workspaceRoot);
1245
+ process.env.NX_WORKSPACE_ROOT_PATH = _chunkZVAXGNHMjs.correctPaths.call(void 0, config.workspaceRoot);
1246
1246
  }
1247
1247
  if (config.directories) {
1248
1248
  if (!config.skipCache && config.directories.cache) {
1249
- process.env[`${prefix}CACHE_DIR`] = _chunkJ756GE67js.correctPaths.call(void 0,
1249
+ process.env[`${prefix}CACHE_DIR`] = _chunkZVAXGNHMjs.correctPaths.call(void 0,
1250
1250
  config.directories.cache
1251
1251
  );
1252
1252
  process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
1253
1253
  }
1254
1254
  if (config.directories.data) {
1255
- process.env[`${prefix}DATA_DIR`] = _chunkJ756GE67js.correctPaths.call(void 0, config.directories.data);
1255
+ process.env[`${prefix}DATA_DIR`] = _chunkZVAXGNHMjs.correctPaths.call(void 0, config.directories.data);
1256
1256
  process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
1257
1257
  }
1258
1258
  if (config.directories.config) {
1259
- process.env[`${prefix}CONFIG_DIR`] = _chunkJ756GE67js.correctPaths.call(void 0,
1259
+ process.env[`${prefix}CONFIG_DIR`] = _chunkZVAXGNHMjs.correctPaths.call(void 0,
1260
1260
  config.directories.config
1261
1261
  );
1262
1262
  process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
1263
1263
  }
1264
1264
  if (config.directories.temp) {
1265
- process.env[`${prefix}TEMP_DIR`] = _chunkJ756GE67js.correctPaths.call(void 0, config.directories.temp);
1265
+ process.env[`${prefix}TEMP_DIR`] = _chunkZVAXGNHMjs.correctPaths.call(void 0, config.directories.temp);
1266
1266
  process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
1267
1267
  }
1268
1268
  if (config.directories.log) {
1269
- process.env[`${prefix}LOG_DIR`] = _chunkJ756GE67js.correctPaths.call(void 0, config.directories.log);
1269
+ process.env[`${prefix}LOG_DIR`] = _chunkZVAXGNHMjs.correctPaths.call(void 0, config.directories.log);
1270
1270
  process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
1271
1271
  }
1272
1272
  if (config.directories.build) {
1273
- process.env[`${prefix}BUILD_DIR`] = _chunkJ756GE67js.correctPaths.call(void 0,
1273
+ process.env[`${prefix}BUILD_DIR`] = _chunkZVAXGNHMjs.correctPaths.call(void 0,
1274
1274
  config.directories.build
1275
1275
  );
1276
1276
  process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
@@ -1332,9 +1332,9 @@ var setConfigEnv = (config) => {
1332
1332
  process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
1333
1333
  process.env.LOG_LEVEL = String(config.logLevel);
1334
1334
  process.env.NX_VERBOSE_LOGGING = String(
1335
- _chunkJ756GE67js.getLogLevel.call(void 0, config.logLevel) >= _chunkJ756GE67js.LogLevel.DEBUG ? true : false
1335
+ _chunkZVAXGNHMjs.getLogLevel.call(void 0, config.logLevel) >= _chunkZVAXGNHMjs.LogLevel.DEBUG ? true : false
1336
1336
  );
1337
- process.env.RUST_BACKTRACE = _chunkJ756GE67js.getLogLevel.call(void 0, config.logLevel) >= _chunkJ756GE67js.LogLevel.DEBUG ? "full" : "none";
1337
+ process.env.RUST_BACKTRACE = _chunkZVAXGNHMjs.getLogLevel.call(void 0, config.logLevel) >= _chunkZVAXGNHMjs.LogLevel.DEBUG ? "full" : "none";
1338
1338
  }
1339
1339
  if (config.skipConfigLogging !== void 0) {
1340
1340
  process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
@@ -1476,7 +1476,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
1476
1476
  const configFile = await getConfigFile(_workspaceRoot);
1477
1477
  if (!configFile) {
1478
1478
  if (!skipLogs) {
1479
- _chunkJ756GE67js.writeWarning.call(void 0,
1479
+ _chunkZVAXGNHMjs.writeWarning.call(void 0,
1480
1480
  "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",
1481
1481
  { logLevel: "all" }
1482
1482
  );
@@ -1492,7 +1492,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
1492
1492
  defaultConfig
1493
1493
  );
1494
1494
  if (!configInput.variant) {
1495
- configInput.variant = _fs.existsSync.call(void 0, _chunkJ756GE67js.joinPaths.call(void 0, _workspaceRoot, "nx.json")) || _fs.existsSync.call(void 0, _chunkJ756GE67js.joinPaths.call(void 0, _workspaceRoot, ".nx")) || _fs.existsSync.call(void 0, _chunkJ756GE67js.joinPaths.call(void 0, _workspaceRoot, "lerna.json")) || _fs.existsSync.call(void 0, _chunkJ756GE67js.joinPaths.call(void 0, _workspaceRoot, "turbo.json")) ? "monorepo" : "minimal";
1495
+ configInput.variant = _fs.existsSync.call(void 0, _chunkZVAXGNHMjs.joinPaths.call(void 0, _workspaceRoot, "nx.json")) || _fs.existsSync.call(void 0, _chunkZVAXGNHMjs.joinPaths.call(void 0, _workspaceRoot, ".nx")) || _fs.existsSync.call(void 0, _chunkZVAXGNHMjs.joinPaths.call(void 0, _workspaceRoot, "lerna.json")) || _fs.existsSync.call(void 0, _chunkZVAXGNHMjs.joinPaths.call(void 0, _workspaceRoot, "turbo.json")) ? "monorepo" : "minimal";
1496
1496
  }
1497
1497
  try {
1498
1498
  result = applyDefaultConfig(
@@ -1503,7 +1503,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
1503
1503
  throw new Error(
1504
1504
  `Failed to parse Storm Workspace configuration${_optionalChain([error, 'optionalAccess', _35 => _35.message]) ? `: ${error.message}` : ""}
1505
1505
 
1506
- Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${_chunkJ756GE67js.formatLogMessage.call(void 0,
1506
+ Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${_chunkZVAXGNHMjs.formatLogMessage.call(void 0,
1507
1507
  configInput
1508
1508
  )}`,
1509
1509
  {
@@ -1548,9 +1548,9 @@ var loadStormWorkspaceConfig = async (workspaceRoot, skipLogs = false) => {
1548
1548
  );
1549
1549
  setConfigEnv(config);
1550
1550
  if (!skipLogs && !config.skipConfigLogging) {
1551
- _chunkJ756GE67js.writeTrace.call(void 0,
1551
+ _chunkZVAXGNHMjs.writeTrace.call(void 0,
1552
1552
  `\u2699\uFE0F Using Storm Workspace configuration:
1553
- ${_chunkJ756GE67js.formatLogMessage.call(void 0, config)}`,
1553
+ ${_chunkZVAXGNHMjs.formatLogMessage.call(void 0, config)}`,
1554
1554
  config
1555
1555
  );
1556
1556
  }
@@ -5,7 +5,7 @@ var _chunkKUGEZPUOjs = require('./chunk-KUGEZPUO.js');
5
5
 
6
6
 
7
7
 
8
- var _chunkWRQN6TUOjs = require('./chunk-WRQN6TUO.js');
8
+ var _chunkFZGJMP4Vjs = require('./chunk-FZGJMP4V.js');
9
9
 
10
10
 
11
11
 
@@ -13,7 +13,7 @@ var _chunkN7FW365Qjs = require('./chunk-N7FW365Q.js');
13
13
 
14
14
 
15
15
 
16
- var _chunkAPKXT2IIjs = require('./chunk-APKXT2II.js');
16
+ var _chunkU63JI4YTjs = require('./chunk-U63JI4YT.js');
17
17
 
18
18
 
19
19
 
@@ -21,7 +21,7 @@ var _chunkAPKXT2IIjs = require('./chunk-APKXT2II.js');
21
21
 
22
22
 
23
23
 
24
- var _chunkJ756GE67js = require('./chunk-J756GE67.js');
24
+ var _chunkZVAXGNHMjs = require('./chunk-ZVAXGNHM.js');
25
25
 
26
26
  // src/executors/r2-upload-publish/executor.ts
27
27
 
@@ -53,8 +53,8 @@ async function runExecutor(options, context) {
53
53
  throw new Error("The executor requires projectsConfigurations.");
54
54
  }
55
55
  try {
56
- const workspaceRoot = _chunkAPKXT2IIjs.findWorkspaceRoot.call(void 0, );
57
- const config = await _chunkAPKXT2IIjs.getConfig.call(void 0, workspaceRoot);
56
+ const workspaceRoot = _chunkU63JI4YTjs.findWorkspaceRoot.call(void 0, );
57
+ const config = await _chunkU63JI4YTjs.getConfig.call(void 0, workspaceRoot);
58
58
  const projectName = _nullishCoalesce(_optionalChain([context, 'access', _7 => _7.projectsConfigurations, 'access', _8 => _8.projects, 'access', _9 => _9[context.projectName], 'optionalAccess', _10 => _10.name]), () => ( context.projectName));
59
59
  const projectDetails = _chunkN7FW365Qjs.getPackageInfo.call(void 0,
60
60
  context.projectsConfigurations.projects[context.projectName]
@@ -92,7 +92,7 @@ async function runExecutor(options, context) {
92
92
  "The executor failed because the project graph is not available. Please run the build command again."
93
93
  );
94
94
  }
95
- _chunkJ756GE67js.writeDebug.call(void 0,
95
+ _chunkZVAXGNHMjs.writeDebug.call(void 0,
96
96
  `Publishing ${context.projectName} to the ${bucketId} R2 Bucket (at ${registry})`
97
97
  );
98
98
  const client = new (0, _clients3.S3Client)({
@@ -108,13 +108,13 @@ async function runExecutor(options, context) {
108
108
  });
109
109
  const version = _optionalChain([projectDetails, 'optionalAccess', _13 => _13.content, 'optionalAccess', _14 => _14.version]);
110
110
  if (version) {
111
- _chunkJ756GE67js.writeDebug.call(void 0, `Starting upload version ${version}`);
111
+ _chunkZVAXGNHMjs.writeDebug.call(void 0, `Starting upload version ${version}`);
112
112
  }
113
113
  const basePath = options.path;
114
- const files = await _glob.glob.call(void 0, _chunkJ756GE67js.joinPaths.call(void 0, basePath, "**/*"), {
114
+ const files = await _glob.glob.call(void 0, _chunkZVAXGNHMjs.joinPaths.call(void 0, basePath, "**/*"), {
115
115
  ignore: "**/{*.stories.tsx,*.stories.ts,*.spec.tsx,*.spec.ts}"
116
116
  });
117
- const internalDependencies = await _chunkWRQN6TUOjs.getInternalDependencies.call(void 0,
117
+ const internalDependencies = await _chunkFZGJMP4Vjs.getInternalDependencies.call(void 0,
118
118
  context.projectName,
119
119
  projectGraph
120
120
  );
@@ -128,7 +128,7 @@ async function runExecutor(options, context) {
128
128
  }, _nullishCoalesce(_optionalChain([projectDetails, 'optionalAccess', _15 => _15.content, 'access', _16 => _16.dependencies]), () => ( {})));
129
129
  const release = _nullishCoalesce(options.tag, () => ( _child_process.execSync.call(void 0, "npm config get tag").toString().trim()));
130
130
  if (options.clean === true) {
131
- _chunkJ756GE67js.writeDebug.call(void 0, `Clearing out existing items in ${bucketPath}`);
131
+ _chunkZVAXGNHMjs.writeDebug.call(void 0, `Clearing out existing items in ${bucketPath}`);
132
132
  if (!isDryRun) {
133
133
  const response = await client.send(
134
134
  new (0, _clients3.ListObjectsCommand)({
@@ -137,7 +137,7 @@ async function runExecutor(options, context) {
137
137
  })
138
138
  );
139
139
  if (_optionalChain([response, 'optionalAccess', _17 => _17.Contents]) && response.Contents.length > 0) {
140
- _chunkJ756GE67js.writeTrace.call(void 0,
140
+ _chunkZVAXGNHMjs.writeTrace.call(void 0,
141
141
  `Deleting the following existing items from the R2 bucket path ${bucketPath}: ${response.Contents.map((item) => item.Key).join(", ")}`
142
142
  );
143
143
  await client.send(
@@ -152,12 +152,12 @@ async function runExecutor(options, context) {
152
152
  })
153
153
  );
154
154
  } else {
155
- _chunkJ756GE67js.writeDebug.call(void 0,
155
+ _chunkZVAXGNHMjs.writeDebug.call(void 0,
156
156
  `No existing items to delete in the R2 bucket path ${bucketPath}`
157
157
  );
158
158
  }
159
159
  } else {
160
- _chunkJ756GE67js.writeWarning.call(void 0, "[Dry run]: Skipping R2 bucket clean.");
160
+ _chunkZVAXGNHMjs.writeWarning.call(void 0, "[Dry run]: Skipping R2 bucket clean.");
161
161
  }
162
162
  }
163
163
  if (options.writeMetaJson === true) {
@@ -178,7 +178,7 @@ async function runExecutor(options, context) {
178
178
  if (_optionalChain([projectDetails, 'optionalAccess', _22 => _22.type]) === "package.json") {
179
179
  meta.devDependencies = _optionalChain([projectDetails, 'optionalAccess', _23 => _23.content, 'optionalAccess', _24 => _24.devDependencies]);
180
180
  }
181
- await _chunkWRQN6TUOjs.uploadFile.call(void 0,
181
+ await _chunkFZGJMP4Vjs.uploadFile.call(void 0,
182
182
  client,
183
183
  bucketId,
184
184
  bucketPath,
@@ -194,22 +194,22 @@ async function runExecutor(options, context) {
194
194
  if (_optionalChain([_fs.statSync.call(void 0, file, {
195
195
  throwIfNoEntry: false
196
196
  }), 'optionalAccess', _25 => _25.isFile, 'call', _26 => _26()])) {
197
- const name = _chunkJ756GE67js.correctPaths.call(void 0, file).replace(_chunkJ756GE67js.correctPaths.call(void 0, basePath), "");
197
+ const name = _chunkZVAXGNHMjs.correctPaths.call(void 0, file).replace(_chunkZVAXGNHMjs.correctPaths.call(void 0, basePath), "");
198
198
  const type = _mimetypes2.default.lookup(name) || "application/octet-stream";
199
- await _chunkWRQN6TUOjs.uploadFile.call(void 0,
199
+ await _chunkFZGJMP4Vjs.uploadFile.call(void 0,
200
200
  client,
201
201
  bucketId,
202
202
  bucketPath,
203
203
  name,
204
204
  version,
205
- await _promises.readFile.call(void 0, file, _chunkWRQN6TUOjs.getEncoding.call(void 0, type)),
205
+ await _promises.readFile.call(void 0, file, _chunkFZGJMP4Vjs.getEncoding.call(void 0, type)),
206
206
  type,
207
207
  isDryRun
208
208
  );
209
209
  }
210
210
  })
211
211
  );
212
- _chunkJ756GE67js.writeSuccess.call(void 0,
212
+ _chunkZVAXGNHMjs.writeSuccess.call(void 0,
213
213
  `Successfully uploaded the ${projectName} project to the Cloudflare R2 bucket.`,
214
214
  config
215
215
  );
@@ -5,7 +5,7 @@ import {
5
5
  getEncoding,
6
6
  getInternalDependencies,
7
7
  uploadFile
8
- } from "./chunk-D2C4YN2P.mjs";
8
+ } from "./chunk-FJC6NTFV.mjs";
9
9
  import {
10
10
  createCliOptions,
11
11
  getPackageInfo
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  findWorkspaceRoot,
15
15
  getConfig
16
- } from "./chunk-ZNZEZZQ3.mjs";
16
+ } from "./chunk-LRWE7JIO.mjs";
17
17
  import {
18
18
  correctPaths,
19
19
  joinPaths,
@@ -21,7 +21,7 @@ import {
21
21
  writeSuccess,
22
22
  writeTrace,
23
23
  writeWarning
24
- } from "./chunk-CET7FSBB.mjs";
24
+ } from "./chunk-KP72CV3N.mjs";
25
25
 
26
26
  // src/executors/r2-upload-publish/executor.ts
27
27
  import {
@@ -1,18 +1,19 @@
1
1
  import {
2
2
  generator_default
3
- } from "./chunk-NFHONUD4.mjs";
3
+ } from "./chunk-BG4BOS55.mjs";
4
4
  import {
5
5
  findWorkspaceRoot,
6
6
  getConfig
7
- } from "./chunk-ZNZEZZQ3.mjs";
7
+ } from "./chunk-LRWE7JIO.mjs";
8
8
  import {
9
+ brandIcon,
9
10
  getStopwatch,
10
11
  writeDebug,
11
12
  writeError,
12
13
  writeFatal,
13
14
  writeInfo,
14
15
  writeTrace
15
- } from "./chunk-CET7FSBB.mjs";
16
+ } from "./chunk-KP72CV3N.mjs";
16
17
  import {
17
18
  __dirname
18
19
  } from "./chunk-N5UXWPB6.mjs";
@@ -51,16 +52,19 @@ async function applicationGenerator(tree, schema) {
51
52
  const stopwatch = getStopwatch("Storm Worker generator");
52
53
  let config;
53
54
  try {
54
- writeInfo(`\u26A1 Running the Storm Worker generator...
55
-
56
- `, config);
57
55
  const workspaceRoot = findWorkspaceRoot();
56
+ config = await getConfig(workspaceRoot);
57
+ writeInfo(
58
+ `${brandIcon(config)} Running the Storm Worker generator...
59
+
60
+ `,
61
+ config
62
+ );
58
63
  writeDebug(
59
64
  `Loading the Storm Config from environment variables and storm.json file...
60
65
  - workspaceRoot: ${workspaceRoot}`,
61
66
  config
62
67
  );
63
- config = await getConfig(workspaceRoot);
64
68
  writeTrace(
65
69
  `Loaded Storm config into env:
66
70
  ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`,