@storm-software/cloudflare-tools 0.71.95 → 0.71.97

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 +25 -0
  2. package/README.md +1 -1
  3. package/dist/{chunk-XVKPJL76.mjs → chunk-25EIQBS4.mjs} +3 -3
  4. package/dist/{chunk-536H3WK5.mjs → chunk-3LRZKOV5.mjs} +2 -2
  5. package/dist/{chunk-GBAVURC4.js → chunk-3U6ZPFIV.js} +35 -35
  6. package/dist/{chunk-FVRCPE3R.mjs → chunk-5GHEIPID.mjs} +1 -1
  7. package/dist/{chunk-YQSDJFL7.mjs → chunk-CF5QUCIQ.mjs} +3 -3
  8. package/dist/{chunk-M2RRHQ7N.mjs → chunk-J4ATY6HP.mjs} +1 -1
  9. package/dist/chunk-LEDLOGWY.mjs +231 -0
  10. package/dist/{chunk-Z7TZ4UY6.mjs → chunk-M3VAGNJQ.mjs} +1 -1
  11. package/dist/{chunk-DVMBIPBR.mjs → chunk-NZNIYQSG.mjs} +8 -8
  12. package/dist/{chunk-L4HBUJPR.mjs → chunk-PEZ2T3XM.mjs} +6 -6
  13. package/dist/{chunk-URSIMVJI.js → chunk-QPHACFB6.js} +13 -13
  14. package/dist/{chunk-PVCPJUY2.js → chunk-RIBK362W.js} +2 -2
  15. package/dist/{chunk-JCQYTCUM.js → chunk-SIS5VQAU.js} +5 -5
  16. package/dist/chunk-U6MGVRZE.mjs +269 -0
  17. package/dist/{chunk-H5RIERY3.js → chunk-VXDMWPFN.js} +7 -7
  18. package/dist/chunk-YAKBHW4S.js +266 -0
  19. package/dist/{chunk-COUZEHRU.js → chunk-YFXBRQQM.js} +20 -20
  20. package/dist/{chunk-EXZP5MWY.mjs → chunk-ZDABHOZ2.mjs} +2 -2
  21. package/dist/{chunk-QY2K3DFK.js → chunk-ZGTWYJC7.js} +167 -167
  22. package/dist/chunk-ZSLL623D.js +231 -0
  23. package/dist/executors.js +6 -6
  24. package/dist/executors.mjs +8 -8
  25. package/dist/generators.js +5 -5
  26. package/dist/generators.mjs +5 -5
  27. package/dist/index.js +11 -11
  28. package/dist/index.mjs +15 -15
  29. package/dist/src/executors/cloudflare-publish/executor.js +3 -3
  30. package/dist/src/executors/cloudflare-publish/executor.mjs +5 -5
  31. package/dist/src/executors/r2-upload-publish/executor.js +6 -6
  32. package/dist/src/executors/r2-upload-publish/executor.mjs +6 -6
  33. package/dist/src/executors/serve/executor.js +4 -4
  34. package/dist/src/executors/serve/executor.mjs +4 -4
  35. package/dist/src/generators/init/generator.js +2 -2
  36. package/dist/src/generators/init/generator.mjs +2 -2
  37. package/dist/src/generators/worker/generator.js +5 -5
  38. package/dist/src/generators/worker/generator.mjs +5 -5
  39. package/dist/src/utils/http-handler.mjs +1 -1
  40. package/dist/src/utils/index.js +3 -3
  41. package/dist/src/utils/index.mjs +3 -3
  42. package/dist/src/utils/r2-bucket-helpers.js +3 -3
  43. package/dist/src/utils/r2-bucket-helpers.mjs +3 -3
  44. package/dist/tsup.config.mjs +1 -1
  45. package/package.json +8 -8
package/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  # Changelog for Storm Ops - Cloudflare Tools
4
4
 
5
+ ## [0.71.96](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.71.96) (03/21/2026)
6
+
7
+ ### Miscellaneous
8
+
9
+ - **monorepo:** Regenerate workspace source files ([7303e3452](https://github.com/storm-software/storm-ops/commit/7303e3452))
10
+ - **monorepo:** Update workspace packages' dependencies ([3c7855def](https://github.com/storm-software/storm-ops/commit/3c7855def))
11
+
12
+ ### Updated Dependencies
13
+
14
+ - Updated **workspace-tools** to **v1.295.22**
15
+ - Updated **config-tools** to **v1.189.46**
16
+ - Updated **config** to **v1.137.0**
17
+
18
+ ## [0.71.95](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.71.95) (03/19/2026)
19
+
20
+ ### Miscellaneous
21
+
22
+ - **monorepo:** Update `README.md` files ([46aa73215](https://github.com/storm-software/storm-ops/commit/46aa73215))
23
+
24
+ ### Updated Dependencies
25
+
26
+ - Updated **workspace-tools** to **v1.295.21**
27
+ - Updated **config-tools** to **v1.189.45**
28
+ - Updated **config** to **v1.136.4**
29
+
5
30
  ## [0.71.94](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.71.94) (03/19/2026)
6
31
 
7
32
  ### Miscellaneous
package/README.md CHANGED
@@ -27,7 +27,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
27
27
 
28
28
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
29
29
 
30
- [![Version](https://img.shields.io/badge/version-0.71.93-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
30
+ [![Version](https://img.shields.io/badge/version-0.71.94-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
31
31
 
32
32
  <!-- prettier-ignore-start -->
33
33
  <!-- markdownlint-disable -->
@@ -5,7 +5,7 @@ import {
5
5
  getEncoding,
6
6
  getInternalDependencies,
7
7
  uploadFile
8
- } from "./chunk-Z7TZ4UY6.mjs";
8
+ } from "./chunk-M3VAGNJQ.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-536H3WK5.mjs";
16
+ } from "./chunk-3LRZKOV5.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-EXZP5MWY.mjs";
24
+ } from "./chunk-ZDABHOZ2.mjs";
25
25
 
26
26
  // src/executors/r2-upload-publish/executor.ts
27
27
  import {
@@ -7,7 +7,7 @@ import {
7
7
  joinPaths,
8
8
  writeTrace,
9
9
  writeWarning
10
- } from "./chunk-EXZP5MWY.mjs";
10
+ } from "./chunk-ZDABHOZ2.mjs";
11
11
 
12
12
  // ../config-tools/src/utilities/find-up.ts
13
13
  import { existsSync } from "node:fs";
@@ -186,7 +186,7 @@ var fatalColorSchema = z.optional(colorSchema);
186
186
  schemaRegistry.add(fatalColorSchema, {
187
187
  description: "The fatal color of the workspace"
188
188
  });
189
- var performanceColorSchema = z._default(colorSchema, "#00ff00");
189
+ var performanceColorSchema = z._default(colorSchema, "#80fd74");
190
190
  schemaRegistry.add(performanceColorSchema, {
191
191
  description: "The performance color of the workspace"
192
192
  });
@@ -7,7 +7,7 @@
7
7
 
8
8
 
9
9
 
10
- var _chunkPVCPJUY2js = require('./chunk-PVCPJUY2.js');
10
+ var _chunkRIBK362Wjs = require('./chunk-RIBK362W.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 _chunkPVCPJUY2js.correctPaths.call(void 0,
79
+ return _chunkRIBK362Wjs.correctPaths.call(void 0,
80
80
  _nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH))
81
81
  );
82
82
  }
83
- return _chunkPVCPJUY2js.correctPaths.call(void 0,
83
+ return _chunkRIBK362Wjs.correctPaths.call(void 0,
84
84
  findFolderUp(
85
85
  _nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())),
86
86
  rootFiles,
@@ -186,7 +186,7 @@ var fatalColorSchema = z.optional(colorSchema);
186
186
  schemaRegistry.add(fatalColorSchema, {
187
187
  description: "The fatal color of the workspace"
188
188
  });
189
- var performanceColorSchema = z._default(colorSchema, "#00ff00");
189
+ var performanceColorSchema = z._default(colorSchema, "#80fd74");
190
190
  schemaRegistry.add(performanceColorSchema, {
191
191
  description: "The performance color of the workspace"
192
192
  });
@@ -733,7 +733,7 @@ async function getPackageJsonConfig(root) {
733
733
  const workspaceRoot = findWorkspaceRoot(root);
734
734
  if (_fs.existsSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"))) {
735
735
  const file = await _promises.readFile.call(void 0,
736
- _chunkPVCPJUY2js.joinPaths.call(void 0, workspaceRoot, "package.json"),
736
+ _chunkRIBK362Wjs.joinPaths.call(void 0, workspaceRoot, "package.json"),
737
737
  "utf8"
738
738
  );
739
739
  if (file) {
@@ -817,7 +817,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
817
817
  envName: _optionalChain([fileName, 'optionalAccess', _5 => _5.toUpperCase, 'call', _6 => _6()]),
818
818
  jitiOptions: {
819
819
  debug: false,
820
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkPVCPJUY2js.joinPaths.call(void 0,
820
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkRIBK362Wjs.joinPaths.call(void 0,
821
821
  process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
822
822
  "jiti"
823
823
  )
@@ -831,7 +831,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
831
831
  envName: _optionalChain([fileName, 'optionalAccess', _7 => _7.toUpperCase, 'call', _8 => _8()]),
832
832
  jitiOptions: {
833
833
  debug: false,
834
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkPVCPJUY2js.joinPaths.call(void 0,
834
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkRIBK362Wjs.joinPaths.call(void 0,
835
835
  process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
836
836
  "jiti"
837
837
  )
@@ -848,7 +848,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
848
848
  let config = result.config;
849
849
  const configFile = result.configFile;
850
850
  if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
851
- _chunkPVCPJUY2js.writeTrace.call(void 0,
851
+ _chunkRIBK362Wjs.writeTrace.call(void 0,
852
852
  `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
853
853
  {
854
854
  logLevel: "all"
@@ -864,7 +864,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
864
864
  for (const result2 of results) {
865
865
  if (_optionalChain([result2, 'optionalAccess', _9 => _9.config]) && _optionalChain([result2, 'optionalAccess', _10 => _10.configFile]) && Object.keys(result2.config).length > 0) {
866
866
  if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
867
- _chunkPVCPJUY2js.writeTrace.call(void 0,
867
+ _chunkRIBK362Wjs.writeTrace.call(void 0,
868
868
  `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
869
869
  {
870
870
  logLevel: "all"
@@ -944,15 +944,15 @@ var getConfigEnv = () => {
944
944
  support: process.env[`${prefix}SUPPORT`] || void 0,
945
945
  timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
946
946
  locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
947
- configFile: process.env[`${prefix}WORKSPACE_CONFIG_FILE`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_CONFIG_FILE`]) : void 0,
948
- workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
947
+ configFile: process.env[`${prefix}WORKSPACE_CONFIG_FILE`] ? _chunkRIBK362Wjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_CONFIG_FILE`]) : void 0,
948
+ workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkRIBK362Wjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
949
949
  directories: {
950
- cache: process.env[`${prefix}CACHE_DIR`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
951
- data: process.env[`${prefix}DATA_DIR`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
952
- config: process.env[`${prefix}CONFIG_DIR`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
953
- temp: process.env[`${prefix}TEMP_DIR`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
954
- log: process.env[`${prefix}LOG_DIR`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
955
- build: process.env[`${prefix}BUILD_DIR`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
950
+ cache: process.env[`${prefix}CACHE_DIR`] ? _chunkRIBK362Wjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? _chunkRIBK362Wjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
951
+ data: process.env[`${prefix}DATA_DIR`] ? _chunkRIBK362Wjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? _chunkRIBK362Wjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
952
+ config: process.env[`${prefix}CONFIG_DIR`] ? _chunkRIBK362Wjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? _chunkRIBK362Wjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
953
+ temp: process.env[`${prefix}TEMP_DIR`] ? _chunkRIBK362Wjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? _chunkRIBK362Wjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
954
+ log: process.env[`${prefix}LOG_DIR`] ? _chunkRIBK362Wjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? _chunkRIBK362Wjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
955
+ build: process.env[`${prefix}BUILD_DIR`] ? _chunkRIBK362Wjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? _chunkRIBK362Wjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
956
956
  },
957
957
  skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
958
958
  mode: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}MODE`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
@@ -976,7 +976,7 @@ var getConfigEnv = () => {
976
976
  },
977
977
  logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
978
978
  Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
979
- ) ? _chunkPVCPJUY2js.getLogLevelLabel.call(void 0,
979
+ ) ? _chunkRIBK362Wjs.getLogLevelLabel.call(void 0,
980
980
  Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
981
981
  ) : process.env[`${prefix}LOG_LEVEL`] : void 0,
982
982
  skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
@@ -1246,42 +1246,42 @@ var setConfigEnv = (config) => {
1246
1246
  process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
1247
1247
  }
1248
1248
  if (config.configFile) {
1249
- process.env[`${prefix}WORKSPACE_CONFIG_FILE`] = _chunkPVCPJUY2js.correctPaths.call(void 0,
1249
+ process.env[`${prefix}WORKSPACE_CONFIG_FILE`] = _chunkRIBK362Wjs.correctPaths.call(void 0,
1250
1250
  config.configFile
1251
1251
  );
1252
1252
  }
1253
1253
  if (config.workspaceRoot) {
1254
- process.env[`${prefix}WORKSPACE_ROOT`] = _chunkPVCPJUY2js.correctPaths.call(void 0, config.workspaceRoot);
1255
- process.env.NX_WORKSPACE_ROOT = _chunkPVCPJUY2js.correctPaths.call(void 0, config.workspaceRoot);
1256
- process.env.NX_WORKSPACE_ROOT_PATH = _chunkPVCPJUY2js.correctPaths.call(void 0, config.workspaceRoot);
1254
+ process.env[`${prefix}WORKSPACE_ROOT`] = _chunkRIBK362Wjs.correctPaths.call(void 0, config.workspaceRoot);
1255
+ process.env.NX_WORKSPACE_ROOT = _chunkRIBK362Wjs.correctPaths.call(void 0, config.workspaceRoot);
1256
+ process.env.NX_WORKSPACE_ROOT_PATH = _chunkRIBK362Wjs.correctPaths.call(void 0, config.workspaceRoot);
1257
1257
  }
1258
1258
  if (config.directories) {
1259
1259
  if (!config.skipCache && config.directories.cache) {
1260
- process.env[`${prefix}CACHE_DIR`] = _chunkPVCPJUY2js.correctPaths.call(void 0,
1260
+ process.env[`${prefix}CACHE_DIR`] = _chunkRIBK362Wjs.correctPaths.call(void 0,
1261
1261
  config.directories.cache
1262
1262
  );
1263
1263
  process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
1264
1264
  }
1265
1265
  if (config.directories.data) {
1266
- process.env[`${prefix}DATA_DIR`] = _chunkPVCPJUY2js.correctPaths.call(void 0, config.directories.data);
1266
+ process.env[`${prefix}DATA_DIR`] = _chunkRIBK362Wjs.correctPaths.call(void 0, config.directories.data);
1267
1267
  process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
1268
1268
  }
1269
1269
  if (config.directories.config) {
1270
- process.env[`${prefix}CONFIG_DIR`] = _chunkPVCPJUY2js.correctPaths.call(void 0,
1270
+ process.env[`${prefix}CONFIG_DIR`] = _chunkRIBK362Wjs.correctPaths.call(void 0,
1271
1271
  config.directories.config
1272
1272
  );
1273
1273
  process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
1274
1274
  }
1275
1275
  if (config.directories.temp) {
1276
- process.env[`${prefix}TEMP_DIR`] = _chunkPVCPJUY2js.correctPaths.call(void 0, config.directories.temp);
1276
+ process.env[`${prefix}TEMP_DIR`] = _chunkRIBK362Wjs.correctPaths.call(void 0, config.directories.temp);
1277
1277
  process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
1278
1278
  }
1279
1279
  if (config.directories.log) {
1280
- process.env[`${prefix}LOG_DIR`] = _chunkPVCPJUY2js.correctPaths.call(void 0, config.directories.log);
1280
+ process.env[`${prefix}LOG_DIR`] = _chunkRIBK362Wjs.correctPaths.call(void 0, config.directories.log);
1281
1281
  process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
1282
1282
  }
1283
1283
  if (config.directories.build) {
1284
- process.env[`${prefix}BUILD_DIR`] = _chunkPVCPJUY2js.correctPaths.call(void 0,
1284
+ process.env[`${prefix}BUILD_DIR`] = _chunkRIBK362Wjs.correctPaths.call(void 0,
1285
1285
  config.directories.build
1286
1286
  );
1287
1287
  process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
@@ -1343,9 +1343,9 @@ var setConfigEnv = (config) => {
1343
1343
  process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
1344
1344
  process.env.LOG_LEVEL = String(config.logLevel);
1345
1345
  process.env.NX_VERBOSE_LOGGING = String(
1346
- _chunkPVCPJUY2js.getLogLevel.call(void 0, config.logLevel) >= _chunkPVCPJUY2js.LogLevel.DEBUG ? true : false
1346
+ _chunkRIBK362Wjs.getLogLevel.call(void 0, config.logLevel) >= _chunkRIBK362Wjs.LogLevel.DEBUG ? true : false
1347
1347
  );
1348
- process.env.RUST_BACKTRACE = _chunkPVCPJUY2js.getLogLevel.call(void 0, config.logLevel) >= _chunkPVCPJUY2js.LogLevel.DEBUG ? "full" : "none";
1348
+ process.env.RUST_BACKTRACE = _chunkRIBK362Wjs.getLogLevel.call(void 0, config.logLevel) >= _chunkRIBK362Wjs.LogLevel.DEBUG ? "full" : "none";
1349
1349
  }
1350
1350
  if (config.skipConfigLogging !== void 0) {
1351
1351
  process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
@@ -1493,7 +1493,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
1493
1493
  const configFile = await getConfigFile(_workspaceRoot);
1494
1494
  if (!configFile) {
1495
1495
  if (!skipLogs) {
1496
- _chunkPVCPJUY2js.writeWarning.call(void 0,
1496
+ _chunkRIBK362Wjs.writeWarning.call(void 0,
1497
1497
  "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",
1498
1498
  { logLevel: "all" }
1499
1499
  );
@@ -1509,7 +1509,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
1509
1509
  defaultConfig
1510
1510
  );
1511
1511
  if (!configInput.variant) {
1512
- configInput.variant = _fs.existsSync.call(void 0, _chunkPVCPJUY2js.joinPaths.call(void 0, _workspaceRoot, "nx.json")) || _fs.existsSync.call(void 0, _chunkPVCPJUY2js.joinPaths.call(void 0, _workspaceRoot, ".nx")) || _fs.existsSync.call(void 0, _chunkPVCPJUY2js.joinPaths.call(void 0, _workspaceRoot, "lerna.json")) || _fs.existsSync.call(void 0, _chunkPVCPJUY2js.joinPaths.call(void 0, _workspaceRoot, "turbo.json")) ? "monorepo" : "minimal";
1512
+ configInput.variant = _fs.existsSync.call(void 0, _chunkRIBK362Wjs.joinPaths.call(void 0, _workspaceRoot, "nx.json")) || _fs.existsSync.call(void 0, _chunkRIBK362Wjs.joinPaths.call(void 0, _workspaceRoot, ".nx")) || _fs.existsSync.call(void 0, _chunkRIBK362Wjs.joinPaths.call(void 0, _workspaceRoot, "lerna.json")) || _fs.existsSync.call(void 0, _chunkRIBK362Wjs.joinPaths.call(void 0, _workspaceRoot, "turbo.json")) ? "monorepo" : "minimal";
1513
1513
  }
1514
1514
  try {
1515
1515
  result = applyDefaultConfig(
@@ -1520,7 +1520,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
1520
1520
  throw new Error(
1521
1521
  `Failed to parse Storm Workspace configuration${_optionalChain([error, 'optionalAccess', _35 => _35.message]) ? `: ${error.message}` : ""}
1522
1522
 
1523
- Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${_chunkPVCPJUY2js.formatLogMessage.call(void 0,
1523
+ Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${_chunkRIBK362Wjs.formatLogMessage.call(void 0,
1524
1524
  configInput
1525
1525
  )}`,
1526
1526
  {
@@ -1565,9 +1565,9 @@ var loadStormWorkspaceConfig = async (workspaceRoot, skipLogs = false) => {
1565
1565
  );
1566
1566
  setConfigEnv(config);
1567
1567
  if (!skipLogs && !config.skipConfigLogging) {
1568
- _chunkPVCPJUY2js.writeTrace.call(void 0,
1568
+ _chunkRIBK362Wjs.writeTrace.call(void 0,
1569
1569
  `\u2699\uFE0F Using Storm Workspace configuration:
1570
- ${_chunkPVCPJUY2js.formatLogMessage.call(void 0, config)}`,
1570
+ ${_chunkRIBK362Wjs.formatLogMessage.call(void 0, config)}`,
1571
1571
  config
1572
1572
  );
1573
1573
  }
@@ -9,7 +9,7 @@ var __commonJS = (cb, mod) => function __require2() {
9
9
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
10
  };
11
11
 
12
- // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=751a554d775c3572381af4e7e5fa22eeda6dd6856012fb1cf521d6806eb2dc74__bcb7786b551c5e2378cdfe9100187f4c/node_modules/tsup/assets/esm_shims.js
12
+ // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=751a554d775c3572381af4e7e5fa22eeda6dd6856012fb1cf521d6806eb2dc74__544fc81e26f13ef0455e9a50e1cc2f07/node_modules/tsup/assets/esm_shims.js
13
13
  import { fileURLToPath } from "url";
14
14
  import path from "path";
15
15
  var getFilename = () => fileURLToPath(import.meta.url);
@@ -8,7 +8,7 @@ import {
8
8
  getWorkspaceConfig,
9
9
  schemaRegistry,
10
10
  workspaceConfigSchema
11
- } from "./chunk-536H3WK5.mjs";
11
+ } from "./chunk-3LRZKOV5.mjs";
12
12
  import {
13
13
  brandIcon,
14
14
  correctPaths,
@@ -24,10 +24,10 @@ import {
24
24
  writeSuccess,
25
25
  writeTrace,
26
26
  writeWarning
27
- } from "./chunk-EXZP5MWY.mjs";
27
+ } from "./chunk-ZDABHOZ2.mjs";
28
28
  import {
29
29
  __dirname
30
- } from "./chunk-FVRCPE3R.mjs";
30
+ } from "./chunk-5GHEIPID.mjs";
31
31
 
32
32
  // ../config-tools/src/utilities/apply-workspace-tokens.ts
33
33
  var applyWorkspaceBaseTokens = async (option, tokenParams) => {
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-3MAI3FU2.mjs";
4
4
  import {
5
5
  __require
6
- } from "./chunk-FVRCPE3R.mjs";
6
+ } from "./chunk-5GHEIPID.mjs";
7
7
 
8
8
  // src/executors/cloudflare-publish/executor.ts
9
9
  import { joinPathFragments } from "@nx/devkit";
@@ -0,0 +1,231 @@
1
+ import {
2
+ createCliOptions,
3
+ getPackageInfo
4
+ } from "./chunk-3MAI3FU2.mjs";
5
+ import {
6
+ findWorkspaceRoot,
7
+ getConfig
8
+ } from "./chunk-3LRZKOV5.mjs";
9
+ import {
10
+ createHttpHandler
11
+ } from "./chunk-SWYYMID7.mjs";
12
+ import {
13
+ getEncoding,
14
+ getInternalDependencies,
15
+ uploadFile
16
+ } from "./chunk-M3VAGNJQ.mjs";
17
+ import {
18
+ correctPaths,
19
+ joinPaths,
20
+ writeDebug,
21
+ writeSuccess,
22
+ writeTrace,
23
+ writeWarning
24
+ } from "./chunk-ZDABHOZ2.mjs";
25
+
26
+ // src/executors/r2-upload-publish/executor.ts
27
+ import {
28
+ DeleteObjectsCommand,
29
+ ListObjectsCommand,
30
+ S3Client
31
+ } from "@aws-sdk/client-s3";
32
+ import {
33
+ createProjectGraphAsync,
34
+ readCachedProjectGraph
35
+ } from "@nx/devkit";
36
+ import { glob } from "glob";
37
+ import mime from "mime-types";
38
+ import { execSync } from "node:child_process";
39
+ import { statSync } from "node:fs";
40
+ import { readFile } from "node:fs/promises";
41
+ async function runExecutor(options, context) {
42
+ const isDryRun = process.env.NX_DRY_RUN === "true" || options.dryRun || false;
43
+ if (!context.projectName) {
44
+ throw new Error("The executor requires a projectName.");
45
+ }
46
+ if (!options.path) {
47
+ throw new Error("The executor requires the `path` option to upload.");
48
+ }
49
+ console.info(
50
+ `\u{1F680} Running Storm Cloudflare Publish executor on the ${context.projectName} worker`
51
+ );
52
+ if (!context.projectName || !context.projectsConfigurations?.projects || !context.projectsConfigurations.projects[context.projectName] || !context.projectsConfigurations.projects[context.projectName]?.root) {
53
+ throw new Error("The executor requires projectsConfigurations.");
54
+ }
55
+ try {
56
+ const workspaceRoot = findWorkspaceRoot();
57
+ const config = await getConfig(workspaceRoot);
58
+ const projectName = context.projectsConfigurations.projects[context.projectName]?.name ?? context.projectName;
59
+ const projectDetails = getPackageInfo(
60
+ context.projectsConfigurations.projects[context.projectName]
61
+ );
62
+ const bucketId = options.bucketId;
63
+ const bucketPath = options.bucketPath || "/";
64
+ if (!bucketId) {
65
+ throw new Error("The executor requires a bucketId.");
66
+ }
67
+ const args = createCliOptions({ ...options });
68
+ if (isDryRun) {
69
+ args.push("--dry-run");
70
+ }
71
+ const cloudflareAccountId = process.env.CLOUDFLARE_ACCOUNT_ID || process.env.STORM_BOT_CLOUDFLARE_ACCOUNT;
72
+ if (!options?.registry && !cloudflareAccountId) {
73
+ throw new Error(
74
+ "The registry option and `CLOUDFLARE_ACCOUNT_ID` (or `STORM_BOT_CLOUDFLARE_ACCOUNT`) environment variable are not set. Please set one of these values to upload to the Cloudflare R2 bucket."
75
+ );
76
+ }
77
+ if (!process.env.STORM_BOT_ACCESS_KEY_ID && !process.env.ACCESS_KEY_ID && !process.env.CLOUDFLARE_ACCESS_KEY_ID && !process.env.AWS_ACCESS_KEY_ID || !process.env.STORM_BOT_SECRET_ACCESS_KEY && !process.env.CLOUDFLARE_SECRET_ACCESS_KEY && !process.env.SECRET_ACCESS_KEY && !process.env.AWS_SECRET_ACCESS_KEY) {
78
+ throw new Error(
79
+ "The `ACCESS_KEY_ID` (or `STORM_BOT_ACCESS_KEY_ID`) and `SECRET_ACCESS_KEY` (or `STORM_BOT_SECRET_ACCESS_KEY`) environment variables are not set. Please set these environment variables to upload to the Cloudflare R2 bucket."
80
+ );
81
+ }
82
+ const registry = options?.registry ? options.registry : `https://${cloudflareAccountId}.r2.cloudflarestorage.com`;
83
+ let projectGraph;
84
+ try {
85
+ projectGraph = readCachedProjectGraph();
86
+ } catch {
87
+ await createProjectGraphAsync();
88
+ projectGraph = readCachedProjectGraph();
89
+ }
90
+ if (!projectGraph) {
91
+ throw new Error(
92
+ "The executor failed because the project graph is not available. Please run the build command again."
93
+ );
94
+ }
95
+ writeDebug(
96
+ `Publishing ${context.projectName} to the ${bucketId} R2 Bucket (at ${registry})`
97
+ );
98
+ const client = new S3Client({
99
+ region: "auto",
100
+ endpoint: registry,
101
+ credentials: {
102
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
103
+ accessKeyId: process.env.STORM_BOT_ACCESS_KEY_ID || process.env.CLOUDFLARE_ACCESS_KEY_ID || process.env.AWS_ACCESS_KEY_ID || process.env.ACCESS_KEY_ID,
104
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
105
+ secretAccessKey: process.env.STORM_BOT_SECRET_ACCESS_KEY || process.env.CLOUDFLARE_SECRET_ACCESS_KEY || process.env.AWS_SECRET_ACCESS_KEY || process.env.SECRET_ACCESS_KEY
106
+ },
107
+ requestHandler: createHttpHandler()
108
+ });
109
+ const version = projectDetails?.content?.version;
110
+ if (version) {
111
+ writeDebug(`Starting upload version ${version}`);
112
+ }
113
+ const basePath = options.path;
114
+ const files = await glob(joinPaths(basePath, "**/*"), {
115
+ ignore: "**/{*.stories.tsx,*.stories.ts,*.spec.tsx,*.spec.ts}"
116
+ });
117
+ const internalDependencies = await getInternalDependencies(
118
+ context.projectName,
119
+ projectGraph
120
+ );
121
+ const dependencies = internalDependencies.filter(
122
+ (projectNode) => !projectNode.data.tags || projectNode.data.tags.every((tag) => tag.toLowerCase() !== "component")
123
+ ).reduce((ret, dep) => {
124
+ if (!ret[dep.name]) {
125
+ ret[dep.name] = "latest";
126
+ }
127
+ return ret;
128
+ }, projectDetails?.content.dependencies ?? {});
129
+ const release = options.tag ?? execSync("npm config get tag").toString().trim();
130
+ if (options.clean === true) {
131
+ writeDebug(`Clearing out existing items in ${bucketPath}`);
132
+ if (!isDryRun) {
133
+ const response = await client.send(
134
+ new ListObjectsCommand({
135
+ Bucket: bucketId,
136
+ Prefix: !bucketPath || bucketPath === "/" ? void 0 : bucketPath
137
+ })
138
+ );
139
+ if (response?.Contents && response.Contents.length > 0) {
140
+ writeTrace(
141
+ `Deleting the following existing items from the R2 bucket path ${bucketPath}: ${response.Contents.map((item) => item.Key).join(", ")}`
142
+ );
143
+ await client.send(
144
+ new DeleteObjectsCommand({
145
+ Bucket: bucketId,
146
+ Delete: {
147
+ Objects: response.Contents.map((item) => ({
148
+ Key: item.Key
149
+ })),
150
+ Quiet: false
151
+ }
152
+ })
153
+ );
154
+ } else {
155
+ writeDebug(
156
+ `No existing items to delete in the R2 bucket path ${bucketPath}`
157
+ );
158
+ }
159
+ } else {
160
+ writeWarning("[Dry run]: Skipping R2 bucket clean.");
161
+ }
162
+ }
163
+ if (options.writeMetaJson === true) {
164
+ const meta = {
165
+ name: context.projectName,
166
+ version,
167
+ release,
168
+ description: projectDetails?.content?.description,
169
+ tags: projectDetails?.content?.keywords,
170
+ dependencies,
171
+ devDependencies: null,
172
+ internalDependencies: internalDependencies.filter(
173
+ (projectNode) => projectNode.data.tags && projectNode.data.tags.some(
174
+ (tag) => tag.toLowerCase() === "component"
175
+ )
176
+ ).map((dep) => dep.name)
177
+ };
178
+ if (projectDetails?.type === "package.json") {
179
+ meta.devDependencies = projectDetails?.content?.devDependencies;
180
+ }
181
+ await uploadFile(
182
+ client,
183
+ bucketId,
184
+ bucketPath,
185
+ "meta.json",
186
+ version,
187
+ JSON.stringify(meta),
188
+ "application/json",
189
+ isDryRun
190
+ );
191
+ }
192
+ await Promise.all(
193
+ files.map(async (file) => {
194
+ if (statSync(file, {
195
+ throwIfNoEntry: false
196
+ })?.isFile()) {
197
+ const name = correctPaths(file).replace(correctPaths(basePath), "");
198
+ const type = mime.lookup(name) || "application/octet-stream";
199
+ await uploadFile(
200
+ client,
201
+ bucketId,
202
+ bucketPath,
203
+ name,
204
+ version,
205
+ await readFile(file, getEncoding(type)),
206
+ type,
207
+ isDryRun
208
+ );
209
+ }
210
+ })
211
+ );
212
+ writeSuccess(
213
+ `Successfully uploaded the ${projectName} project to the Cloudflare R2 bucket.`,
214
+ config
215
+ );
216
+ return {
217
+ success: true
218
+ };
219
+ } catch (error) {
220
+ console.error("Failed to publish to Cloudflare R2 bucket");
221
+ console.error(error);
222
+ console.log("");
223
+ return {
224
+ success: false
225
+ };
226
+ }
227
+ }
228
+
229
+ export {
230
+ runExecutor
231
+ };
@@ -3,7 +3,7 @@ import {
3
3
  writeDebug,
4
4
  writeError,
5
5
  writeWarning
6
- } from "./chunk-EXZP5MWY.mjs";
6
+ } from "./chunk-ZDABHOZ2.mjs";
7
7
 
8
8
  // src/utils/r2-bucket-helpers.ts
9
9
  import { Upload } from "@aws-sdk/lib-storage";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  __commonJS
3
- } from "./chunk-FVRCPE3R.mjs";
3
+ } from "./chunk-5GHEIPID.mjs";
4
4
 
5
5
  // package.json
6
6
  var require_package = __commonJS({
7
7
  "package.json"(exports, module) {
8
8
  module.exports = {
9
9
  name: "@storm-software/cloudflare-tools",
10
- version: "0.71.94",
10
+ version: "0.71.96",
11
11
  private: false,
12
12
  description: "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
13
13
  keywords: [
@@ -132,8 +132,8 @@ var require_package = __commonJS({
132
132
  module: "dist/index.mjs",
133
133
  typings: "dist/index.d.ts",
134
134
  dependencies: {
135
- "@aws-sdk/client-s3": "^3.1012.0",
136
- "@aws-sdk/lib-storage": "^3.1012.0",
135
+ "@aws-sdk/client-s3": "^3.1016.0",
136
+ "@aws-sdk/lib-storage": "^3.1016.0",
137
137
  "@smithy/node-http-handler": "^4.5.0",
138
138
  defu: "catalog:",
139
139
  glob: "catalog:",
@@ -149,16 +149,16 @@ var require_package = __commonJS({
149
149
  nx: "catalog:",
150
150
  tsup: "catalog:",
151
151
  untyped: "catalog:",
152
- wrangler: "^4.75.0"
152
+ wrangler: "^4.77.0"
153
153
  },
154
154
  peerDependencies: {
155
155
  "@nx/devkit": "catalog:",
156
156
  "@nx/js": "catalog:",
157
157
  "@nx/node": "catalog:",
158
158
  "@nx/web": "catalog:",
159
- "@storm-software/config": "1.136.3",
160
- "@storm-software/config-tools": "1.189.44",
161
- "@storm-software/workspace-tools": "1.295.20",
159
+ "@storm-software/config": "1.137.0",
160
+ "@storm-software/config-tools": "1.189.46",
161
+ "@storm-software/workspace-tools": "1.295.22",
162
162
  nx: "catalog:",
163
163
  tsup: "catalog:",
164
164
  wrangler: ">=3.58.0"