@storm-software/cloudflare-tools 0.71.224 → 0.71.226

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 (37) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +1 -1
  3. package/dist/{chunk-NTAVFPAR.mjs → chunk-2C6QWYFF.mjs} +3 -3
  4. package/dist/chunk-2JHWKTG5.js +70 -0
  5. package/dist/{chunk-VFK7WI6O.js → chunk-4MIUPZ4C.js} +7 -18
  6. package/dist/chunk-4OE4QJ7R.mjs +70 -0
  7. package/dist/chunk-HGBPLJUS.mjs +269 -0
  8. package/dist/{chunk-XSO2NEF3.js → chunk-K7HL6AE5.js} +4 -4
  9. package/dist/chunk-KG23XMBC.js +266 -0
  10. package/dist/{chunk-WYT4G6BW.mjs → chunk-M42P2A2Q.mjs} +5 -16
  11. package/dist/{chunk-WO7IPWNX.mjs → chunk-MCQYPNIB.mjs} +7 -7
  12. package/dist/{chunk-4WESWVMR.js → chunk-OK6QFJ2N.js} +6 -6
  13. package/dist/{chunk-KDPTLM6V.mjs → chunk-VDSI6S7R.mjs} +1 -1
  14. package/dist/{chunk-NPLOIBSW.mjs → chunk-XKFWUQZ7.mjs} +1 -1
  15. package/dist/executors.js +1 -1
  16. package/dist/executors.mjs +3 -3
  17. package/dist/generators.js +3 -3
  18. package/dist/generators.mjs +3 -3
  19. package/dist/index.js +4 -4
  20. package/dist/index.mjs +5 -5
  21. package/dist/src/executors/cloudflare-publish/executor.js +1 -1
  22. package/dist/src/executors/cloudflare-publish/executor.mjs +3 -3
  23. package/dist/src/executors/r2-upload-publish/executor.mjs +1 -1
  24. package/dist/src/executors/r2-upload-publish/untyped.mjs +1 -1
  25. package/dist/src/executors/serve/executor.js +4 -4
  26. package/dist/src/executors/serve/executor.mjs +3 -3
  27. package/dist/src/generators/init/generator.js +2 -2
  28. package/dist/src/generators/init/generator.mjs +2 -2
  29. package/dist/src/generators/worker/generator.js +3 -3
  30. package/dist/src/generators/worker/generator.mjs +3 -3
  31. package/dist/src/plugins/index.d.mts +2 -2
  32. package/dist/src/plugins/index.d.ts +2 -2
  33. package/dist/src/plugins/index.mjs +1 -1
  34. package/dist/src/utils/http-handler.mjs +1 -1
  35. package/dist/src/utils/index.mjs +1 -1
  36. package/dist/src/utils/r2-bucket-helpers.mjs +1 -1
  37. package/package.json +12 -12
package/CHANGELOG.md CHANGED
@@ -2,6 +2,48 @@
2
2
 
3
3
  # Changelog for Storm Ops - Cloudflare Tools
4
4
 
5
+ ## [0.71.226](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.71.226) (07/03/2026)
6
+
7
+ ### Miscellaneous
8
+
9
+ - **monorepo:** Update workspace packages' dependencies ([c38bf71e8](https://github.com/storm-software/storm-ops/commit/c38bf71e8))
10
+ - **monorepo:** Update workspace packages' dependencies ([94184a932](https://github.com/storm-software/storm-ops/commit/94184a932))
11
+ - **monorepo:** Update workspace packages' dependencies ([5580e18dc](https://github.com/storm-software/storm-ops/commit/5580e18dc))
12
+
13
+ ### Updated Dependencies
14
+
15
+ - Updated **config** to **v1.138.20**
16
+ - Updated **config-tools** to **v1.190.83**
17
+ - Updated **workspace-tools** to **v1.296.63**
18
+
19
+ ## [0.71.225](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.71.225) (06/30/2026)
20
+
21
+ ### Miscellaneous
22
+
23
+ - **monorepo:** Update repository packages' dependencies ([6f81fb5b5](https://github.com/storm-software/storm-ops/commit/6f81fb5b5))
24
+
25
+ ### Bug Fixes
26
+
27
+ - **workspace-tools:** Update Nx to v23.0.1 and resolve out-dated function signature issue in plugin ([86f015008](https://github.com/storm-software/storm-ops/commit/86f015008))
28
+
29
+ ### Updated Dependencies
30
+
31
+ - Updated **config** to **v1.138.19**
32
+ - Updated **config-tools** to **v1.190.82**
33
+ - Updated **workspace-tools** to **v1.296.62**
34
+
35
+ ## [0.71.224](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.71.224) (06/29/2026)
36
+
37
+ ### Bug Fixes
38
+
39
+ - **workspace-tools:** Resolve issue applying the cargo project name parameter ([f927214be](https://github.com/storm-software/storm-ops/commit/f927214be))
40
+
41
+ ### Updated Dependencies
42
+
43
+ - Updated **config** to **v1.138.18**
44
+ - Updated **config-tools** to **v1.190.81**
45
+ - Updated **workspace-tools** to **v1.296.61**
46
+
5
47
  ## [0.71.223](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.71.223) (06/28/2026)
6
48
 
7
49
  ### 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.222-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.225-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 -->
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  generator_default
3
- } from "./chunk-WO7IPWNX.mjs";
3
+ } from "./chunk-4OE4QJ7R.mjs";
4
4
  import {
5
5
  findWorkspaceRoot,
6
6
  getConfig
@@ -16,7 +16,7 @@ import {
16
16
  } from "./chunk-K4H5ZMYA.mjs";
17
17
  import {
18
18
  __dirname
19
- } from "./chunk-KDPTLM6V.mjs";
19
+ } from "./chunk-VDSI6S7R.mjs";
20
20
 
21
21
  // src/generators/worker/generator.ts
22
22
  import {
@@ -31,7 +31,7 @@ import {
31
31
  updateJson,
32
32
  updateProjectConfiguration
33
33
  } from "@nx/devkit";
34
- import { determineProjectNameAndRootOptions } from "@nx/devkit/src/generators/project-name-and-root-utils";
34
+ import { determineProjectNameAndRootOptions } from "@nx/devkit/internal";
35
35
  import { applicationGenerator as nodeApplicationGenerator } from "@nx/node";
36
36
  import { nxVersion } from "@nx/node/src/utils/versions";
37
37
  import { join } from "path";
@@ -0,0 +1,70 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkMCKGQKYUjs = require('./chunk-MCKGQKYU.js');
4
+
5
+ // package.json
6
+ var require_package = _chunkMCKGQKYUjs.__commonJS.call(void 0, {
7
+ "package.json"(exports, module) {
8
+ module.exports = { name: "@storm-software/cloudflare-tools", version: "0.71.226", private: false, description: "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.", keywords: ["monorepo", "open-system", "storm", "storm-ops", "storm-stack", "stormstack", "sullivanpj"], homepage: "https://stormsoftware.com", bugs: "https://github.com/storm-software/storm-ops/issues", repository: { type: "github", url: "https://github.com/storm-software/storm-ops.git", directory: "packages/cloudflare-tools" }, license: "Apache-2.0", author: { name: "Storm Software", email: "contact@stormsoftware.com", url: "https://stormsoftware.com" }, exports: { "./package.json": "./package.json", "./docs/*": "./docs/*", "./migrations.json": "./migrations.json", "./executors.json": "./executors.json", "./executors/*/schema.json": "./dist/src/executors/*/schema.json", "./generators.json": "./generators.json", "./generators/*/schema.json": "./dist/src/generators/*/schema.json", ".": { import: { types: "./dist/index.d.mts", default: "./dist/index.mjs" }, require: { types: "./dist/index.d.ts", default: "./dist/index.js" }, default: { types: "./dist/index.d.ts", default: "./dist/index.js" } }, "./index": { import: { types: "./dist/index.d.mts", default: "./dist/index.mjs" }, require: { types: "./dist/index.d.ts", default: "./dist/index.js" }, default: { types: "./dist/index.d.ts", default: "./dist/index.js" } }, "./executors": { import: { types: "./dist/executors.d.mts", default: "./dist/executors.mjs" }, require: { types: "./dist/executors.d.ts", default: "./dist/executors.js" }, default: { types: "./dist/executors.d.ts", default: "./dist/executors.js" } }, "./executors/*": { import: { types: "./dist/src/executors/*.d.mts", default: "./dist/src/executors/*.mjs" }, require: { types: "./dist/src/executors/*.d.ts", default: "./dist/src/executors/*.js" }, default: { types: "./dist/src/executors/*.d.ts", default: "./dist/src/executors/*.js" } }, "./generators": { import: { types: "./dist/generators.d.mts", default: "./dist/generators.mjs" }, require: { types: "./dist/generators.d.ts", default: "./dist/generators.js" }, default: { types: "./dist/generators.d.ts", default: "./dist/generators.js" } }, "./generators/*": { import: { types: "./dist/src/generators/*.d.mts", default: "./dist/src/generators/*.mjs" }, require: { types: "./dist/src/generators/*.d.ts", default: "./dist/src/generators/*.js" }, default: { types: "./dist/src/generators/*.d.ts", default: "./dist/src/generators/*.js" } }, "./utils": { import: { types: "./dist/src/utils/index.d.mts", default: "./dist/src/utils/index.mjs" }, require: { types: "./dist/src/utils/index.d.ts", default: "./dist/src/utils/index.js" }, default: { types: "./dist/src/utils/index.d.ts", default: "./dist/src/utils/index.js" } }, "./utils/*": { import: { types: "./dist/src/utils/*.d.mts", default: "./dist/src/utils/*.mjs" }, require: { types: "./dist/src/utils/*.d.ts", default: "./dist/src/utils/*.js" }, default: { types: "./dist/src/utils/*.d.ts", default: "./dist/src/utils/*.js" } }, "./executors/*/executor.js": "./dist/src/executors/*/executor.js", "./generators/*/generator.js": "./dist/src/generators/*/generator.js", "./plugin": "./dist/src/plugins/index.js" }, main: "dist/index.js", module: "dist/index.mjs", typings: "dist/index.d.ts", dependencies: { "@aws-sdk/client-s3": "^3.1079.0", "@aws-sdk/lib-storage": "^3.1079.0", "@smithy/node-http-handler": "^4.9.2", "@storm-software/config": "workspace:*", "@storm-software/config-tools": "workspace:*", "@storm-software/workspace-tools": "workspace:*", defu: "catalog:", glob: "catalog:", "mime-types": "^3.0.2", "pretty-bytes": "^7.1.0" }, devDependencies: { "@nx/devkit": "catalog:", "@nx/node": "catalog:", "@nx/web": "catalog:", "@nx/webpack": "catalog:", "@smithy/protocol-http": "^5.5.5", nx: "catalog:", tsup: "catalog:", untyped: "catalog:", wrangler: "^4.107.0" }, peerDependencies: { nx: ">=22.7.1", wrangler: ">=3.58.0" }, peerDependenciesMeta: { nx: { optional: false }, wrangler: { optional: false } }, publishConfig: { access: "public" }, executors: "./executors.json", generators: "./generators.json" };
9
+ }
10
+ });
11
+
12
+ // src/generators/init/generator.ts
13
+
14
+
15
+
16
+
17
+
18
+ var _devkit = require('@nx/devkit');
19
+ var _js = require('@nx/js');
20
+ var _versions = require('@nx/node/src/utils/versions');
21
+
22
+ // src/generators/init/libs/versions.ts
23
+ var cloudflareToolsVersion = require_package().version;
24
+ var wranglerVersion = "^3.51.2";
25
+ var cloudflareWorkersTypeVersions = "^4.20240419.0";
26
+ var honoVersion = "^4.2.6";
27
+
28
+ // src/generators/init/generator.ts
29
+ async function initGenerator(tree, schema) {
30
+ const initTask = await _js.initGenerator.call(void 0, tree, {
31
+ ...schema,
32
+ skipFormat: true
33
+ });
34
+ const installTask = updateDependencies(tree, schema);
35
+ if (!schema.skipFormat) {
36
+ await _devkit.formatFiles.call(void 0, tree);
37
+ }
38
+ return async () => {
39
+ await initTask();
40
+ await installTask();
41
+ };
42
+ }
43
+ function updateDependencies(tree, schema) {
44
+ _devkit.removeDependenciesFromPackageJson.call(void 0,
45
+ tree,
46
+ ["@storm-software/cloudflare-tools"],
47
+ []
48
+ );
49
+ const honoPackage = schema.template === "hono" ? { hono: honoVersion } : {};
50
+ return _devkit.addDependenciesToPackageJson.call(void 0,
51
+ tree,
52
+ {
53
+ tslib: _versions.tslibVersion,
54
+ ...honoPackage
55
+ },
56
+ {
57
+ wrangler: wranglerVersion,
58
+ "@cloudflare/workers-types": cloudflareWorkersTypeVersions,
59
+ "@storm-software/cloudflare-tools": cloudflareToolsVersion
60
+ }
61
+ );
62
+ }
63
+ var generator_default = initGenerator;
64
+ var initSchematic = _devkit.convertNxGenerator.call(void 0, initGenerator);
65
+
66
+
67
+
68
+
69
+
70
+ exports.initGenerator = initGenerator; exports.generator_default = generator_default; exports.initSchematic = initSchematic;
@@ -499,7 +499,7 @@ var _resolve2 = require('resolve'); var _resolve3 = _interopRequireDefault(_reso
499
499
 
500
500
 
501
501
  // ../build-tools/src/utilities/copy-assets.ts
502
- var _copyassetshandlerjs = require('@nx/js/src/utils/assets/copy-assets-handler.js');
502
+ var _internal = require('@nx/js/internal');
503
503
  var _glob = require('glob');
504
504
  var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
505
505
  var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson3 = true, includeSrc = false, banner, footer) => {
@@ -533,7 +533,7 @@ var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, gen
533
533
  ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkAWKQRM2Hjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`,
534
534
  config
535
535
  );
536
- const assetHandler = new (0, _copyassetshandlerjs.CopyAssetsHandler)({
536
+ const assetHandler = new (0, _internal.CopyAssetsHandler)({
537
537
  projectDir: projectRoot,
538
538
  rootDir: config.workspaceRoot,
539
539
  outputDir: outputPath,
@@ -571,7 +571,7 @@ ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `//
571
571
  };
572
572
 
573
573
  // ../build-tools/src/utilities/generate-package-json.ts
574
- var _buildablelibsutils = require('@nx/js/src/utils/buildable-libs-utils');
574
+
575
575
 
576
576
 
577
577
 
@@ -593,7 +593,7 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
593
593
  "The Build process failed because the project graph is not available. Please run the build command again."
594
594
  );
595
595
  }
596
- const projectDependencies = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0,
596
+ const projectDependencies = _internal.calculateProjectBuildableDependencies.call(void 0,
597
597
  void 0,
598
598
  projectGraph,
599
599
  workspaceRoot2,
@@ -1954,14 +1954,12 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
1954
1954
 
1955
1955
 
1956
1956
 
1957
- var _projectnameandrootutils = require('@nx/devkit/src/generators/project-name-and-root-utils');
1957
+ var _internal3 = require('@nx/devkit/internal');
1958
1958
 
1959
1959
 
1960
1960
 
1961
1961
 
1962
1962
  var _js = require('@nx/js');
1963
- var _init = require('@nx/js/src/generators/init/init'); var _init2 = _interopRequireDefault(_init);
1964
- var _generator = require('@nx/js/src/generators/setup-verdaccio/generator'); var _generator2 = _interopRequireDefault(_generator);
1965
1963
 
1966
1964
  // ../workspace-tools/src/utils/versions.ts
1967
1965
  var typesNodeVersion = "20.9.0";
@@ -1973,12 +1971,6 @@ var pnpmVersion = "8.10.2";
1973
1971
  async function typeScriptLibraryGeneratorFn(tree, options, config) {
1974
1972
  const normalized = await normalizeOptions(tree, { ...options });
1975
1973
  const tasks = [];
1976
- tasks.push(
1977
- await _init2.default.call(void 0, tree, {
1978
- ...normalized,
1979
- tsConfigName: normalized.rootProject ? "tsconfig.json" : "tsconfig.base.json"
1980
- })
1981
- );
1982
1974
  tasks.push(
1983
1975
  _devkit.addDependenciesToPackageJson.call(void 0,
1984
1976
  tree,
@@ -1990,9 +1982,6 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
1990
1982
  }
1991
1983
  )
1992
1984
  );
1993
- if (normalized.publishable) {
1994
- tasks.push(await _generator2.default.call(void 0, tree, { ...normalized, skipFormat: true }));
1995
- }
1996
1985
  const projectConfig = {
1997
1986
  root: normalized.directory,
1998
1987
  projectType: "library",
@@ -2216,7 +2205,7 @@ async function normalizeOptions(tree, options, config) {
2216
2205
  names: projectNames,
2217
2206
  projectRoot,
2218
2207
  importPath: normalizedImportPath
2219
- } = await _projectnameandrootutils.determineProjectNameAndRootOptions.call(void 0, tree, {
2208
+ } = await _internal3.determineProjectNameAndRootOptions.call(void 0, tree, {
2220
2209
  name: options.name,
2221
2210
  projectType: "library",
2222
2211
  directory: options.directory,
@@ -3119,7 +3108,7 @@ var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.
3119
3108
  });
3120
3109
 
3121
3110
  // ../workspace-tools/src/release/js-version-actions.ts
3122
- var _versionactionsjs = require('@nx/js/src/release/version-actions.js'); var _versionactionsjs2 = _interopRequireDefault(_versionactionsjs);
3111
+ var _versionactions = require('@nx/js/src/release/version-actions'); var _versionactions2 = _interopRequireDefault(_versionactions);
3123
3112
 
3124
3113
  // ../workspace-tools/src/release/rust-version-actions.ts
3125
3114
 
@@ -0,0 +1,70 @@
1
+ import {
2
+ __commonJS
3
+ } from "./chunk-VDSI6S7R.mjs";
4
+
5
+ // package.json
6
+ var require_package = __commonJS({
7
+ "package.json"(exports, module) {
8
+ module.exports = { name: "@storm-software/cloudflare-tools", version: "0.71.226", private: false, description: "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.", keywords: ["monorepo", "open-system", "storm", "storm-ops", "storm-stack", "stormstack", "sullivanpj"], homepage: "https://stormsoftware.com", bugs: "https://github.com/storm-software/storm-ops/issues", repository: { type: "github", url: "https://github.com/storm-software/storm-ops.git", directory: "packages/cloudflare-tools" }, license: "Apache-2.0", author: { name: "Storm Software", email: "contact@stormsoftware.com", url: "https://stormsoftware.com" }, exports: { "./package.json": "./package.json", "./docs/*": "./docs/*", "./migrations.json": "./migrations.json", "./executors.json": "./executors.json", "./executors/*/schema.json": "./dist/src/executors/*/schema.json", "./generators.json": "./generators.json", "./generators/*/schema.json": "./dist/src/generators/*/schema.json", ".": { import: { types: "./dist/index.d.mts", default: "./dist/index.mjs" }, require: { types: "./dist/index.d.ts", default: "./dist/index.js" }, default: { types: "./dist/index.d.ts", default: "./dist/index.js" } }, "./index": { import: { types: "./dist/index.d.mts", default: "./dist/index.mjs" }, require: { types: "./dist/index.d.ts", default: "./dist/index.js" }, default: { types: "./dist/index.d.ts", default: "./dist/index.js" } }, "./executors": { import: { types: "./dist/executors.d.mts", default: "./dist/executors.mjs" }, require: { types: "./dist/executors.d.ts", default: "./dist/executors.js" }, default: { types: "./dist/executors.d.ts", default: "./dist/executors.js" } }, "./executors/*": { import: { types: "./dist/src/executors/*.d.mts", default: "./dist/src/executors/*.mjs" }, require: { types: "./dist/src/executors/*.d.ts", default: "./dist/src/executors/*.js" }, default: { types: "./dist/src/executors/*.d.ts", default: "./dist/src/executors/*.js" } }, "./generators": { import: { types: "./dist/generators.d.mts", default: "./dist/generators.mjs" }, require: { types: "./dist/generators.d.ts", default: "./dist/generators.js" }, default: { types: "./dist/generators.d.ts", default: "./dist/generators.js" } }, "./generators/*": { import: { types: "./dist/src/generators/*.d.mts", default: "./dist/src/generators/*.mjs" }, require: { types: "./dist/src/generators/*.d.ts", default: "./dist/src/generators/*.js" }, default: { types: "./dist/src/generators/*.d.ts", default: "./dist/src/generators/*.js" } }, "./utils": { import: { types: "./dist/src/utils/index.d.mts", default: "./dist/src/utils/index.mjs" }, require: { types: "./dist/src/utils/index.d.ts", default: "./dist/src/utils/index.js" }, default: { types: "./dist/src/utils/index.d.ts", default: "./dist/src/utils/index.js" } }, "./utils/*": { import: { types: "./dist/src/utils/*.d.mts", default: "./dist/src/utils/*.mjs" }, require: { types: "./dist/src/utils/*.d.ts", default: "./dist/src/utils/*.js" }, default: { types: "./dist/src/utils/*.d.ts", default: "./dist/src/utils/*.js" } }, "./executors/*/executor.js": "./dist/src/executors/*/executor.js", "./generators/*/generator.js": "./dist/src/generators/*/generator.js", "./plugin": "./dist/src/plugins/index.js" }, main: "dist/index.js", module: "dist/index.mjs", typings: "dist/index.d.ts", dependencies: { "@aws-sdk/client-s3": "^3.1079.0", "@aws-sdk/lib-storage": "^3.1079.0", "@smithy/node-http-handler": "^4.9.2", "@storm-software/config": "workspace:*", "@storm-software/config-tools": "workspace:*", "@storm-software/workspace-tools": "workspace:*", defu: "catalog:", glob: "catalog:", "mime-types": "^3.0.2", "pretty-bytes": "^7.1.0" }, devDependencies: { "@nx/devkit": "catalog:", "@nx/node": "catalog:", "@nx/web": "catalog:", "@nx/webpack": "catalog:", "@smithy/protocol-http": "^5.5.5", nx: "catalog:", tsup: "catalog:", untyped: "catalog:", wrangler: "^4.107.0" }, peerDependencies: { nx: ">=22.7.1", wrangler: ">=3.58.0" }, peerDependenciesMeta: { nx: { optional: false }, wrangler: { optional: false } }, publishConfig: { access: "public" }, executors: "./executors.json", generators: "./generators.json" };
9
+ }
10
+ });
11
+
12
+ // src/generators/init/generator.ts
13
+ import {
14
+ addDependenciesToPackageJson,
15
+ convertNxGenerator,
16
+ formatFiles,
17
+ removeDependenciesFromPackageJson
18
+ } from "@nx/devkit";
19
+ import { initGenerator as nodeInitGenerator } from "@nx/js";
20
+ import { tslibVersion } from "@nx/node/src/utils/versions";
21
+
22
+ // src/generators/init/libs/versions.ts
23
+ var cloudflareToolsVersion = require_package().version;
24
+ var wranglerVersion = "^3.51.2";
25
+ var cloudflareWorkersTypeVersions = "^4.20240419.0";
26
+ var honoVersion = "^4.2.6";
27
+
28
+ // src/generators/init/generator.ts
29
+ async function initGenerator(tree, schema) {
30
+ const initTask = await nodeInitGenerator(tree, {
31
+ ...schema,
32
+ skipFormat: true
33
+ });
34
+ const installTask = updateDependencies(tree, schema);
35
+ if (!schema.skipFormat) {
36
+ await formatFiles(tree);
37
+ }
38
+ return async () => {
39
+ await initTask();
40
+ await installTask();
41
+ };
42
+ }
43
+ function updateDependencies(tree, schema) {
44
+ removeDependenciesFromPackageJson(
45
+ tree,
46
+ ["@storm-software/cloudflare-tools"],
47
+ []
48
+ );
49
+ const honoPackage = schema.template === "hono" ? { hono: honoVersion } : {};
50
+ return addDependenciesToPackageJson(
51
+ tree,
52
+ {
53
+ tslib: tslibVersion,
54
+ ...honoPackage
55
+ },
56
+ {
57
+ wrangler: wranglerVersion,
58
+ "@cloudflare/workers-types": cloudflareWorkersTypeVersions,
59
+ "@storm-software/cloudflare-tools": cloudflareToolsVersion
60
+ }
61
+ );
62
+ }
63
+ var generator_default = initGenerator;
64
+ var initSchematic = convertNxGenerator(initGenerator);
65
+
66
+ export {
67
+ initGenerator,
68
+ generator_default,
69
+ initSchematic
70
+ };
@@ -0,0 +1,269 @@
1
+ import {
2
+ generator_default
3
+ } from "./chunk-MCQYPNIB.mjs";
4
+ import {
5
+ findWorkspaceRoot,
6
+ getConfig
7
+ } from "./chunk-5MAMLVMV.mjs";
8
+ import {
9
+ brandIcon,
10
+ getStopwatch,
11
+ writeDebug,
12
+ writeError,
13
+ writeFatal,
14
+ writeInfo,
15
+ writeTrace
16
+ } from "./chunk-K4H5ZMYA.mjs";
17
+ import {
18
+ __dirname
19
+ } from "./chunk-VDSI6S7R.mjs";
20
+
21
+ // src/generators/worker/generator.ts
22
+ import {
23
+ convertNxGenerator,
24
+ ensurePackage,
25
+ formatFiles,
26
+ generateFiles,
27
+ joinPathFragments,
28
+ names,
29
+ readProjectConfiguration,
30
+ runTasksInSerial,
31
+ updateJson,
32
+ updateProjectConfiguration
33
+ } from "@nx/devkit";
34
+ import { determineProjectNameAndRootOptions } from "@nx/devkit/internal";
35
+ import { applicationGenerator as nodeApplicationGenerator } from "@nx/node";
36
+ import { nxVersion } from "@nx/node/src/utils/versions";
37
+ import { join } from "path";
38
+
39
+ // src/generators/worker/libs/get-account-id.ts
40
+ function getAccountId(accountId) {
41
+ return `account_id = "${accountId}"`;
42
+ }
43
+
44
+ // src/generators/worker/libs/vitest-imports.ts
45
+ var vitestImports = `import { describe, expect, it, beforeAll, afterAll } from 'vitest';`;
46
+
47
+ // src/generators/worker/libs/vitest-script.ts
48
+ var vitestScript = `"test": "vitest run"`;
49
+
50
+ // src/generators/worker/generator.ts
51
+ async function applicationGenerator(tree, schema) {
52
+ const stopwatch = getStopwatch("Storm Worker generator");
53
+ let config;
54
+ try {
55
+ const workspaceRoot = findWorkspaceRoot();
56
+ config = await getConfig(workspaceRoot);
57
+ writeInfo(
58
+ `${brandIcon(config)} Running the Storm Worker generator...
59
+
60
+ `,
61
+ config
62
+ );
63
+ writeDebug(
64
+ `Loading the Storm Config from environment variables and storm.json file...
65
+ - workspaceRoot: ${workspaceRoot}`,
66
+ config
67
+ );
68
+ writeTrace(
69
+ `Loaded Storm config into env:
70
+ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`,
71
+ config
72
+ );
73
+ const options = await normalizeOptions(tree, schema, config);
74
+ const tasks = [];
75
+ tasks.push(
76
+ await generator_default(tree, {
77
+ ...options,
78
+ skipFormat: true
79
+ })
80
+ );
81
+ tasks.push(
82
+ await nodeApplicationGenerator(tree, {
83
+ ...options,
84
+ framework: "none",
85
+ skipFormat: true,
86
+ unitTestRunner: options.unitTestRunner == "vitest" ? "none" : options.unitTestRunner,
87
+ e2eTestRunner: "none",
88
+ name: schema.name
89
+ })
90
+ );
91
+ if (options.unitTestRunner === "vitest") {
92
+ const { vitestGenerator, createOrEditViteConfig } = ensurePackage(
93
+ "@nx/vite",
94
+ nxVersion
95
+ );
96
+ const vitestTask = await vitestGenerator(tree, {
97
+ project: options.name,
98
+ uiFramework: "none",
99
+ coverageProvider: "v8",
100
+ skipFormat: true,
101
+ testEnvironment: "node"
102
+ });
103
+ tasks.push(vitestTask);
104
+ createOrEditViteConfig(
105
+ tree,
106
+ {
107
+ project: options.name,
108
+ includeLib: false,
109
+ includeVitest: true,
110
+ testEnvironment: "node"
111
+ },
112
+ true
113
+ );
114
+ }
115
+ addCloudflareFiles(tree, options);
116
+ updateTsAppConfig(tree, options);
117
+ addTargets(tree, options);
118
+ if (options.unitTestRunner === "none") {
119
+ removeTestFiles(tree, options);
120
+ }
121
+ if (!options.skipFormat) {
122
+ await formatFiles(tree);
123
+ }
124
+ if (options.template === "hono") {
125
+ tasks.push(() => {
126
+ const packageJsonPath = joinPathFragments(
127
+ options.directory ?? "",
128
+ "package.json"
129
+ );
130
+ if (tree.exists(packageJsonPath)) {
131
+ updateJson(tree, packageJsonPath, (json) => ({
132
+ ...json,
133
+ dependencies: {
134
+ hono: "4.4.0",
135
+ ...json?.dependencies
136
+ }
137
+ }));
138
+ }
139
+ });
140
+ }
141
+ return runTasksInSerial(...tasks);
142
+ } catch (error) {
143
+ return () => {
144
+ writeFatal(
145
+ "A fatal error occurred while running the generator - the process was forced to terminate",
146
+ config
147
+ );
148
+ writeError(
149
+ `An exception was thrown in the generator's process
150
+ - Details: ${error.message}
151
+ - Stacktrace: ${error.stack}`,
152
+ config
153
+ );
154
+ };
155
+ } finally {
156
+ stopwatch();
157
+ }
158
+ }
159
+ function updateTsAppConfig(tree, options) {
160
+ updateJson(tree, join(options.appProjectRoot, "tsconfig.app.json"), (json) => {
161
+ json.compilerOptions = {
162
+ ...json.compilerOptions,
163
+ esModuleInterop: true,
164
+ target: "es2021",
165
+ lib: ["es2021"],
166
+ module: "es2022",
167
+ moduleResolution: "node",
168
+ resolveJsonModule: true,
169
+ allowJs: true,
170
+ checkJs: false,
171
+ noEmit: true,
172
+ isolatedModules: true,
173
+ allowSyntheticDefaultImports: true,
174
+ forceConsistentCasingInFileNames: true,
175
+ strict: true,
176
+ skipLibCheck: true
177
+ };
178
+ json.compilerOptions.types = [
179
+ ...json.compilerOptions.types,
180
+ "@cloudflare/workers-types"
181
+ ];
182
+ return json;
183
+ });
184
+ }
185
+ function addCloudflareFiles(tree, options) {
186
+ tree.delete(join(options.appProjectRoot, "src/main.ts"));
187
+ generateFiles(
188
+ tree,
189
+ join(__dirname, "./files/common"),
190
+ options.appProjectRoot,
191
+ {
192
+ ...options,
193
+ tmpl: "",
194
+ name: options.name,
195
+ accountId: options.accountId ? getAccountId(options.accountId) : "",
196
+ vitestScript: options.unitTestRunner === "vitest" ? vitestScript : ""
197
+ }
198
+ );
199
+ if (options.template && options.template !== "none") {
200
+ generateFiles(
201
+ tree,
202
+ join(__dirname, `./files/${options.template}`),
203
+ join(options.appProjectRoot, "src"),
204
+ {
205
+ ...options,
206
+ tmpl: "",
207
+ name: options.name,
208
+ accountId: options.accountId ? getAccountId(options.accountId) : "",
209
+ vitestScript: options.unitTestRunner === "vitest" ? vitestScript : "",
210
+ vitestImports: options.unitTestRunner === "vitest" ? vitestImports : ""
211
+ }
212
+ );
213
+ }
214
+ }
215
+ function addTargets(tree, options) {
216
+ try {
217
+ const projectConfiguration = readProjectConfiguration(tree, options.name);
218
+ projectConfiguration.targets = {
219
+ ...projectConfiguration.targets ?? {},
220
+ serve: {
221
+ executor: "@storm-software/cloudflare-tools:serve",
222
+ options: {
223
+ port: options.port
224
+ }
225
+ },
226
+ "nx-release-publish": {
227
+ executor: "@storm-software/cloudflare-tools:cloudflare-publish"
228
+ }
229
+ };
230
+ if (projectConfiguration.targets.build) {
231
+ delete projectConfiguration.targets.build;
232
+ }
233
+ updateProjectConfiguration(tree, options.name, projectConfiguration);
234
+ } catch (e) {
235
+ console.error(e);
236
+ }
237
+ }
238
+ function removeTestFiles(tree, options) {
239
+ tree.delete(join(options.appProjectRoot, "src", "index.test.ts"));
240
+ }
241
+ async function normalizeOptions(host, options, config) {
242
+ const { projectName: appProjectName, projectRoot: appProjectRoot } = await determineProjectNameAndRootOptions(host, {
243
+ name: options.name,
244
+ projectType: "application",
245
+ directory: options.directory,
246
+ rootProject: options.rootProject
247
+ });
248
+ options.rootProject = appProjectRoot === ".";
249
+ return {
250
+ addPlugin: process.env.NX_ADD_PLUGINS !== "false",
251
+ accountId: process.env.STORM_BOT_CLOUDFLARE_ACCOUNT,
252
+ ...options,
253
+ name: names(appProjectName).fileName,
254
+ frontendProject: options.frontendProject ? names(options.frontendProject).fileName : void 0,
255
+ appProjectRoot,
256
+ unitTestRunner: options.unitTestRunner ?? "vitest",
257
+ rootProject: options.rootProject ?? false,
258
+ template: options.template ?? "fetch-handler",
259
+ port: options.port ?? 3e3
260
+ };
261
+ }
262
+ var generator_default2 = applicationGenerator;
263
+ var applicationSchematic = convertNxGenerator(applicationGenerator);
264
+
265
+ export {
266
+ applicationGenerator,
267
+ generator_default2 as generator_default,
268
+ applicationSchematic
269
+ };
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunk4WESWVMRjs = require('./chunk-4WESWVMR.js');
3
+ var _chunk2JHWKTG5js = require('./chunk-2JHWKTG5.js');
4
4
 
5
5
 
6
6
 
@@ -28,7 +28,7 @@ var _chunkAWKQRM2Hjs = require('./chunk-AWKQRM2H.js');
28
28
 
29
29
 
30
30
  var _devkit = require('@nx/devkit');
31
- var _projectnameandrootutils = require('@nx/devkit/src/generators/project-name-and-root-utils');
31
+ var _internal = require('@nx/devkit/internal');
32
32
  var _node = require('@nx/node');
33
33
  var _versions = require('@nx/node/src/utils/versions');
34
34
  var _path = require('path');
@@ -70,7 +70,7 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[
70
70
  const options = await normalizeOptions(tree, schema, config);
71
71
  const tasks = [];
72
72
  tasks.push(
73
- await _chunk4WESWVMRjs.generator_default.call(void 0, tree, {
73
+ await _chunk2JHWKTG5js.generator_default.call(void 0, tree, {
74
74
  ...options,
75
75
  skipFormat: true
76
76
  })
@@ -236,7 +236,7 @@ function removeTestFiles(tree, options) {
236
236
  tree.delete(_path.join.call(void 0, options.appProjectRoot, "src", "index.test.ts"));
237
237
  }
238
238
  async function normalizeOptions(host, options, config) {
239
- const { projectName: appProjectName, projectRoot: appProjectRoot } = await _projectnameandrootutils.determineProjectNameAndRootOptions.call(void 0, host, {
239
+ const { projectName: appProjectName, projectRoot: appProjectRoot } = await _internal.determineProjectNameAndRootOptions.call(void 0, host, {
240
240
  name: options.name,
241
241
  projectType: "application",
242
242
  directory: options.directory,