@storm-software/cloudflare-tools 0.63.5 → 0.63.7

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  # Changelog for Storm Ops - Cloudflare Tools
4
4
 
5
+ ## [0.63.6](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.63.6) (2025-05-28)
6
+
7
+ ### Miscellaneous
8
+
9
+ - **monorepo:** Update workspace package links
10
+
11
+ ## [0.63.5](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.63.5) (2025-05-25)
12
+
13
+ ### Miscellaneous
14
+
15
+ - **monorepo:** Regenerate README markdown files
16
+
5
17
  ## [0.63.4](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.63.4) (2025-05-25)
6
18
 
7
19
  ### Miscellaneous
package/README.md CHANGED
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
21
21
 
22
22
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
23
23
 
24
- [![Version](https://img.shields.io/badge/version-0.63.3-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)
24
+ [![Version](https://img.shields.io/badge/version-0.63.5-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)
25
25
 
26
26
  <!-- prettier-ignore-start -->
27
27
  <!-- markdownlint-disable -->
@@ -23,7 +23,7 @@ import {
23
23
  import {
24
24
  __dirname,
25
25
  __require
26
- } from "./chunk-OJTXF2HH.mjs";
26
+ } from "./chunk-IF6Q2IFM.mjs";
27
27
 
28
28
  // ../config-tools/src/utilities/apply-workspace-tokens.ts
29
29
  var applyWorkspaceBaseTokens = async (option, tokenParams) => {
@@ -1,3 +1,6 @@
1
+ import {
2
+ generator_default
3
+ } from "./chunk-HQJ4FJP2.mjs";
1
4
  import {
2
5
  getConfig
3
6
  } from "./chunk-7H2K6PT4.mjs";
@@ -10,12 +13,9 @@ import {
10
13
  writeInfo,
11
14
  writeTrace
12
15
  } from "./chunk-GOL5LHR6.mjs";
13
- import {
14
- generator_default
15
- } from "./chunk-KUEV4L3P.mjs";
16
16
  import {
17
17
  __dirname
18
- } from "./chunk-OJTXF2HH.mjs";
18
+ } from "./chunk-IF6Q2IFM.mjs";
19
19
 
20
20
  // src/generators/worker/generator.ts
21
21
  import {
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  __commonJS
3
- } from "./chunk-OJTXF2HH.mjs";
3
+ } from "./chunk-IF6Q2IFM.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.63.4",
10
+ version: "0.63.6",
11
11
  description: "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
12
12
  repository: {
13
13
  type: "github",
@@ -175,7 +175,7 @@ var require_package = __commonJS({
175
175
  nx: "catalog:",
176
176
  tsup: "catalog:",
177
177
  untyped: "catalog:",
178
- wrangler: "^4.16.1"
178
+ wrangler: "^4.17.0"
179
179
  },
180
180
  publishConfig: {
181
181
  access: "public"
@@ -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__e3d6992a9b39d25b1f30c31059d0949b/node_modules/tsup/assets/esm_shims.js
12
+ // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=751a554d775c3572381af4e7e5fa22eeda6dd6856012fb1cf521d6806eb2dc74__d6fab86dcb765b6313d37ecbdc55b462/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);
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-RH2IXKSC.mjs";
4
4
  import {
5
5
  __require
6
- } from "./chunk-OJTXF2HH.mjs";
6
+ } from "./chunk-IF6Q2IFM.mjs";
7
7
 
8
8
  // src/executors/cloudflare-publish/executor.ts
9
9
  import { joinPathFragments } from "@nx/devkit";
@@ -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 _chunkBYI4UJ3Tjs = require('./chunk-BYI4UJ3T.js');
3
+ var _chunkRVFMSGK4js = require('./chunk-RVFMSGK4.js');
4
4
 
5
5
 
6
6
  var _chunkOL65RB72js = require('./chunk-OL65RB72.js');
@@ -66,7 +66,7 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[
66
66
  const options = await normalizeOptions(tree, schema, config);
67
67
  const tasks = [];
68
68
  tasks.push(
69
- await _chunkBYI4UJ3Tjs.generator_default.call(void 0, tree, {
69
+ await _chunkRVFMSGK4js.generator_default.call(void 0, tree, {
70
70
  ...options,
71
71
  skipFormat: true
72
72
  })
@@ -7,7 +7,7 @@ var require_package = _chunkMCKGQKYUjs.__commonJS.call(void 0, {
7
7
  "package.json"(exports, module) {
8
8
  module.exports = {
9
9
  name: "@storm-software/cloudflare-tools",
10
- version: "0.63.4",
10
+ version: "0.63.6",
11
11
  description: "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
12
12
  repository: {
13
13
  type: "github",
@@ -175,7 +175,7 @@ var require_package = _chunkMCKGQKYUjs.__commonJS.call(void 0, {
175
175
  nx: "catalog:",
176
176
  tsup: "catalog:",
177
177
  untyped: "catalog:",
178
- wrangler: "^4.16.1"
178
+ wrangler: "^4.17.0"
179
179
  },
180
180
  publishConfig: {
181
181
  access: "public"
@@ -1,9 +1,9 @@
1
1
  import "./chunk-YSCEY447.mjs";
2
- import "./chunk-2BTH7LON.mjs";
3
- import "./chunk-WPBJ3OWD.mjs";
2
+ import "./chunk-JZLMK6VH.mjs";
3
+ import "./chunk-62S6LQ23.mjs";
4
4
  import "./chunk-5M3ADTI2.mjs";
5
5
  import "./chunk-JHXH6ZN3.mjs";
6
6
  import "./chunk-RH2IXKSC.mjs";
7
7
  import "./chunk-7H2K6PT4.mjs";
8
8
  import "./chunk-GOL5LHR6.mjs";
9
- import "./chunk-OJTXF2HH.mjs";
9
+ import "./chunk-IF6Q2IFM.mjs";
@@ -2,11 +2,11 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkWEK3MHPWjs = require('./chunk-WEK3MHPW.js');
5
+ var _chunkME5BVVJDjs = require('./chunk-ME5BVVJD.js');
6
6
 
7
7
 
8
8
 
9
- var _chunkBYI4UJ3Tjs = require('./chunk-BYI4UJ3T.js');
9
+ var _chunkRVFMSGK4js = require('./chunk-RVFMSGK4.js');
10
10
  require('./chunk-OL65RB72.js');
11
11
  require('./chunk-SQUJ3SXL.js');
12
12
  require('./chunk-MCKGQKYU.js');
@@ -15,4 +15,4 @@ require('./chunk-MCKGQKYU.js');
15
15
 
16
16
 
17
17
 
18
- exports.applicationGenerator = _chunkWEK3MHPWjs.applicationGenerator; exports.applicationSchematic = _chunkWEK3MHPWjs.applicationSchematic; exports.initGenerator = _chunkBYI4UJ3Tjs.initGenerator; exports.initSchematic = _chunkBYI4UJ3Tjs.initSchematic;
18
+ exports.applicationGenerator = _chunkME5BVVJDjs.applicationGenerator; exports.applicationSchematic = _chunkME5BVVJDjs.applicationSchematic; exports.initGenerator = _chunkRVFMSGK4js.initGenerator; exports.initSchematic = _chunkRVFMSGK4js.initSchematic;
@@ -2,14 +2,14 @@ import "./chunk-3J7KBHMJ.mjs";
2
2
  import {
3
3
  applicationGenerator,
4
4
  applicationSchematic
5
- } from "./chunk-GJCMMK3Z.mjs";
5
+ } from "./chunk-EVOPBRQM.mjs";
6
6
  import {
7
7
  initGenerator,
8
8
  initSchematic
9
- } from "./chunk-KUEV4L3P.mjs";
9
+ } from "./chunk-HQJ4FJP2.mjs";
10
10
  import "./chunk-7H2K6PT4.mjs";
11
11
  import "./chunk-GOL5LHR6.mjs";
12
- import "./chunk-OJTXF2HH.mjs";
12
+ import "./chunk-IF6Q2IFM.mjs";
13
13
  export {
14
14
  applicationGenerator,
15
15
  applicationSchematic,
package/dist/index.js CHANGED
@@ -3,11 +3,11 @@ require('./chunk-DHBG5ASJ.js');
3
3
 
4
4
 
5
5
 
6
- var _chunkWEK3MHPWjs = require('./chunk-WEK3MHPW.js');
6
+ var _chunkME5BVVJDjs = require('./chunk-ME5BVVJD.js');
7
7
 
8
8
 
9
9
 
10
- var _chunkBYI4UJ3Tjs = require('./chunk-BYI4UJ3T.js');
10
+ var _chunkRVFMSGK4js = require('./chunk-RVFMSGK4.js');
11
11
  require('./chunk-CVGPWUNP.js');
12
12
  require('./chunk-T2OGA6MB.js');
13
13
  require('./chunk-LRDYN7AR.js');
@@ -162,4 +162,4 @@ function createPackageJson(projectJsonPath, workspaceRoot) {
162
162
 
163
163
 
164
164
 
165
- exports.applicationGenerator = _chunkWEK3MHPWjs.applicationGenerator; exports.applicationSchematic = _chunkWEK3MHPWjs.applicationSchematic; exports.createNodesV2 = createNodesV2; exports.getInternalDependencies = _chunk2HJQOPBDjs.getInternalDependencies; exports.initGenerator = _chunkBYI4UJ3Tjs.initGenerator; exports.initSchematic = _chunkBYI4UJ3Tjs.initSchematic; exports.name = name; exports.r2UploadFile = _chunk2HJQOPBDjs.r2UploadFile;
165
+ exports.applicationGenerator = _chunkME5BVVJDjs.applicationGenerator; exports.applicationSchematic = _chunkME5BVVJDjs.applicationSchematic; exports.createNodesV2 = createNodesV2; exports.getInternalDependencies = _chunk2HJQOPBDjs.getInternalDependencies; exports.initGenerator = _chunkRVFMSGK4js.initGenerator; exports.initSchematic = _chunkRVFMSGK4js.initSchematic; exports.name = name; exports.r2UploadFile = _chunk2HJQOPBDjs.r2UploadFile;
package/dist/index.mjs CHANGED
@@ -3,14 +3,14 @@ import "./chunk-3J7KBHMJ.mjs";
3
3
  import {
4
4
  applicationGenerator,
5
5
  applicationSchematic
6
- } from "./chunk-GJCMMK3Z.mjs";
6
+ } from "./chunk-EVOPBRQM.mjs";
7
7
  import {
8
8
  initGenerator,
9
9
  initSchematic
10
- } from "./chunk-KUEV4L3P.mjs";
10
+ } from "./chunk-HQJ4FJP2.mjs";
11
11
  import "./chunk-7Z5PILRU.mjs";
12
- import "./chunk-2BTH7LON.mjs";
13
- import "./chunk-WPBJ3OWD.mjs";
12
+ import "./chunk-JZLMK6VH.mjs";
13
+ import "./chunk-62S6LQ23.mjs";
14
14
  import "./chunk-5M3ADTI2.mjs";
15
15
  import {
16
16
  getInternalDependencies,
@@ -22,7 +22,7 @@ import {
22
22
  } from "./chunk-RH2IXKSC.mjs";
23
23
  import "./chunk-7H2K6PT4.mjs";
24
24
  import "./chunk-GOL5LHR6.mjs";
25
- import "./chunk-OJTXF2HH.mjs";
25
+ import "./chunk-IF6Q2IFM.mjs";
26
26
 
27
27
  // src/plugins/index.ts
28
28
  import {
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  runExecutor
3
- } from "../../../chunk-2BTH7LON.mjs";
4
- import "../../../chunk-WPBJ3OWD.mjs";
3
+ } from "../../../chunk-JZLMK6VH.mjs";
4
+ import "../../../chunk-62S6LQ23.mjs";
5
5
  import "../../../chunk-RH2IXKSC.mjs";
6
6
  import "../../../chunk-7H2K6PT4.mjs";
7
7
  import "../../../chunk-GOL5LHR6.mjs";
8
- import "../../../chunk-OJTXF2HH.mjs";
8
+ import "../../../chunk-IF6Q2IFM.mjs";
9
9
  export {
10
10
  runExecutor as default
11
11
  };
@@ -5,7 +5,7 @@ import "../../../chunk-JHXH6ZN3.mjs";
5
5
  import "../../../chunk-RH2IXKSC.mjs";
6
6
  import "../../../chunk-7H2K6PT4.mjs";
7
7
  import "../../../chunk-GOL5LHR6.mjs";
8
- import "../../../chunk-OJTXF2HH.mjs";
8
+ import "../../../chunk-IF6Q2IFM.mjs";
9
9
  export {
10
10
  runExecutor as default
11
11
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withRunExecutor
3
- } from "../../../chunk-WPBJ3OWD.mjs";
3
+ } from "../../../chunk-62S6LQ23.mjs";
4
4
  import {
5
5
  createCliOptions
6
6
  } from "../../../chunk-RH2IXKSC.mjs";
@@ -8,7 +8,7 @@ import "../../../chunk-7H2K6PT4.mjs";
8
8
  import "../../../chunk-GOL5LHR6.mjs";
9
9
  import {
10
10
  __require
11
- } from "../../../chunk-OJTXF2HH.mjs";
11
+ } from "../../../chunk-IF6Q2IFM.mjs";
12
12
 
13
13
  // src/executors/serve/executor.ts
14
14
  import { createAsyncIterable } from "@nx/devkit/src/utils/async-iterable";
@@ -2,10 +2,10 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkBYI4UJ3Tjs = require('../../../chunk-BYI4UJ3T.js');
5
+ var _chunkRVFMSGK4js = require('../../../chunk-RVFMSGK4.js');
6
6
  require('../../../chunk-MCKGQKYU.js');
7
7
 
8
8
 
9
9
 
10
10
 
11
- exports.default = _chunkBYI4UJ3Tjs.generator_default; exports.initGenerator = _chunkBYI4UJ3Tjs.initGenerator; exports.initSchematic = _chunkBYI4UJ3Tjs.initSchematic;
11
+ exports.default = _chunkRVFMSGK4js.generator_default; exports.initGenerator = _chunkRVFMSGK4js.initGenerator; exports.initSchematic = _chunkRVFMSGK4js.initSchematic;
@@ -2,8 +2,8 @@ import {
2
2
  generator_default,
3
3
  initGenerator,
4
4
  initSchematic
5
- } from "../../../chunk-KUEV4L3P.mjs";
6
- import "../../../chunk-OJTXF2HH.mjs";
5
+ } from "../../../chunk-HQJ4FJP2.mjs";
6
+ import "../../../chunk-IF6Q2IFM.mjs";
7
7
  export {
8
8
  generator_default as default,
9
9
  initGenerator,
@@ -2,8 +2,8 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkWEK3MHPWjs = require('../../../chunk-WEK3MHPW.js');
6
- require('../../../chunk-BYI4UJ3T.js');
5
+ var _chunkME5BVVJDjs = require('../../../chunk-ME5BVVJD.js');
6
+ require('../../../chunk-RVFMSGK4.js');
7
7
  require('../../../chunk-OL65RB72.js');
8
8
  require('../../../chunk-SQUJ3SXL.js');
9
9
  require('../../../chunk-MCKGQKYU.js');
@@ -11,4 +11,4 @@ require('../../../chunk-MCKGQKYU.js');
11
11
 
12
12
 
13
13
 
14
- exports.applicationGenerator = _chunkWEK3MHPWjs.applicationGenerator; exports.applicationSchematic = _chunkWEK3MHPWjs.applicationSchematic; exports.default = _chunkWEK3MHPWjs.generator_default;
14
+ exports.applicationGenerator = _chunkME5BVVJDjs.applicationGenerator; exports.applicationSchematic = _chunkME5BVVJDjs.applicationSchematic; exports.default = _chunkME5BVVJDjs.generator_default;
@@ -2,11 +2,11 @@ import {
2
2
  applicationGenerator,
3
3
  applicationSchematic,
4
4
  generator_default
5
- } from "../../../chunk-GJCMMK3Z.mjs";
6
- import "../../../chunk-KUEV4L3P.mjs";
5
+ } from "../../../chunk-EVOPBRQM.mjs";
6
+ import "../../../chunk-HQJ4FJP2.mjs";
7
7
  import "../../../chunk-7H2K6PT4.mjs";
8
8
  import "../../../chunk-GOL5LHR6.mjs";
9
- import "../../../chunk-OJTXF2HH.mjs";
9
+ import "../../../chunk-IF6Q2IFM.mjs";
10
10
  export {
11
11
  applicationGenerator,
12
12
  applicationSchematic,
@@ -4,7 +4,7 @@ import {
4
4
  r2UploadFile
5
5
  } from "../../chunk-JHXH6ZN3.mjs";
6
6
  import "../../chunk-GOL5LHR6.mjs";
7
- import "../../chunk-OJTXF2HH.mjs";
7
+ import "../../chunk-IF6Q2IFM.mjs";
8
8
  export {
9
9
  getInternalDependencies,
10
10
  r2UploadFile
@@ -3,7 +3,7 @@ import {
3
3
  r2UploadFile
4
4
  } from "../../chunk-JHXH6ZN3.mjs";
5
5
  import "../../chunk-GOL5LHR6.mjs";
6
- import "../../chunk-OJTXF2HH.mjs";
6
+ import "../../chunk-IF6Q2IFM.mjs";
7
7
  export {
8
8
  getInternalDependencies,
9
9
  r2UploadFile
@@ -1,4 +1,4 @@
1
- import "./chunk-OJTXF2HH.mjs";
1
+ import "./chunk-IF6Q2IFM.mjs";
2
2
 
3
3
  // tsup.config.ts
4
4
  import { defineConfig } from "tsup";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/cloudflare-tools",
3
- "version": "0.63.5",
3
+ "version": "0.63.7",
4
4
  "description": "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
5
5
  "repository": {
6
6
  "type": "github",
@@ -141,7 +141,7 @@
141
141
  "nx": "21.0.3",
142
142
  "tsup": "8.4.0",
143
143
  "untyped": "^1.5.2",
144
- "wrangler": "^4.16.1"
144
+ "wrangler": "^4.17.0"
145
145
  },
146
146
  "publishConfig": { "access": "public" },
147
147
  "executors": "./executors.json",
@@ -1,265 +0,0 @@
1
- import {
2
- generator_default
3
- } from "./chunk-KUEV4L3P.mjs";
4
- import {
5
- getConfig
6
- } from "./chunk-7H2K6PT4.mjs";
7
- import {
8
- findWorkspaceRoot,
9
- getStopwatch,
10
- writeDebug,
11
- writeError,
12
- writeFatal,
13
- writeInfo,
14
- writeTrace
15
- } from "./chunk-GOL5LHR6.mjs";
16
- import {
17
- __dirname
18
- } from "./chunk-OJTXF2HH.mjs";
19
-
20
- // src/generators/worker/generator.ts
21
- import {
22
- convertNxGenerator,
23
- ensurePackage,
24
- formatFiles,
25
- generateFiles,
26
- joinPathFragments,
27
- names,
28
- readProjectConfiguration,
29
- runTasksInSerial,
30
- updateJson,
31
- updateProjectConfiguration
32
- } from "@nx/devkit";
33
- import { determineProjectNameAndRootOptions } from "@nx/devkit/src/generators/project-name-and-root-utils";
34
- import { applicationGenerator as nodeApplicationGenerator } from "@nx/node";
35
- import { nxVersion } from "@nx/node/src/utils/versions";
36
- import { join } from "path";
37
-
38
- // src/generators/worker/libs/get-account-id.ts
39
- function getAccountId(accountId) {
40
- return `account_id = "${accountId}"`;
41
- }
42
-
43
- // src/generators/worker/libs/vitest-imports.ts
44
- var vitestImports = `import { describe, expect, it, beforeAll, afterAll } from 'vitest';`;
45
-
46
- // src/generators/worker/libs/vitest-script.ts
47
- var vitestScript = `"test": "vitest run"`;
48
-
49
- // src/generators/worker/generator.ts
50
- async function applicationGenerator(tree, schema) {
51
- const stopwatch = getStopwatch("Storm Worker generator");
52
- let config;
53
- try {
54
- writeInfo(`\u26A1 Running the Storm Worker generator...
55
-
56
- `, config);
57
- const workspaceRoot = findWorkspaceRoot();
58
- writeDebug(
59
- `Loading the Storm Config from environment variables and storm.json file...
60
- - workspaceRoot: ${workspaceRoot}`,
61
- config
62
- );
63
- config = await getConfig(workspaceRoot);
64
- writeTrace(
65
- `Loaded Storm config into env:
66
- ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`,
67
- config
68
- );
69
- const options = await normalizeOptions(tree, schema, config);
70
- const tasks = [];
71
- tasks.push(
72
- await generator_default(tree, {
73
- ...options,
74
- skipFormat: true
75
- })
76
- );
77
- tasks.push(
78
- await nodeApplicationGenerator(tree, {
79
- ...options,
80
- framework: "none",
81
- skipFormat: true,
82
- unitTestRunner: options.unitTestRunner == "vitest" ? "none" : options.unitTestRunner,
83
- e2eTestRunner: "none",
84
- name: schema.name
85
- })
86
- );
87
- if (options.unitTestRunner === "vitest") {
88
- const { vitestGenerator, createOrEditViteConfig } = ensurePackage(
89
- "@nx/vite",
90
- nxVersion
91
- );
92
- const vitestTask = await vitestGenerator(tree, {
93
- project: options.name,
94
- uiFramework: "none",
95
- coverageProvider: "v8",
96
- skipFormat: true,
97
- testEnvironment: "node"
98
- });
99
- tasks.push(vitestTask);
100
- createOrEditViteConfig(
101
- tree,
102
- {
103
- project: options.name,
104
- includeLib: false,
105
- includeVitest: true,
106
- testEnvironment: "node"
107
- },
108
- true
109
- );
110
- }
111
- addCloudflareFiles(tree, options);
112
- updateTsAppConfig(tree, options);
113
- addTargets(tree, options);
114
- if (options.unitTestRunner === "none") {
115
- removeTestFiles(tree, options);
116
- }
117
- if (!options.skipFormat) {
118
- await formatFiles(tree);
119
- }
120
- if (options.template === "hono") {
121
- tasks.push(() => {
122
- const packageJsonPath = joinPathFragments(
123
- options.directory ?? "",
124
- "package.json"
125
- );
126
- if (tree.exists(packageJsonPath)) {
127
- updateJson(tree, packageJsonPath, (json) => ({
128
- ...json,
129
- dependencies: {
130
- hono: "4.4.0",
131
- ...json?.dependencies
132
- }
133
- }));
134
- }
135
- });
136
- }
137
- return runTasksInSerial(...tasks);
138
- } catch (error) {
139
- return () => {
140
- writeFatal(
141
- "A fatal error occurred while running the generator - the process was forced to terminate",
142
- config
143
- );
144
- writeError(
145
- `An exception was thrown in the generator's process
146
- - Details: ${error.message}
147
- - Stacktrace: ${error.stack}`,
148
- config
149
- );
150
- };
151
- } finally {
152
- stopwatch();
153
- }
154
- }
155
- function updateTsAppConfig(tree, options) {
156
- updateJson(tree, join(options.appProjectRoot, "tsconfig.app.json"), (json) => {
157
- json.compilerOptions = {
158
- ...json.compilerOptions,
159
- esModuleInterop: true,
160
- target: "es2021",
161
- lib: ["es2021"],
162
- module: "es2022",
163
- moduleResolution: "node",
164
- resolveJsonModule: true,
165
- allowJs: true,
166
- checkJs: false,
167
- noEmit: true,
168
- isolatedModules: true,
169
- allowSyntheticDefaultImports: true,
170
- forceConsistentCasingInFileNames: true,
171
- strict: true,
172
- skipLibCheck: true
173
- };
174
- json.compilerOptions.types = [
175
- ...json.compilerOptions.types,
176
- "@cloudflare/workers-types"
177
- ];
178
- return json;
179
- });
180
- }
181
- function addCloudflareFiles(tree, options) {
182
- tree.delete(join(options.appProjectRoot, "src/main.ts"));
183
- generateFiles(
184
- tree,
185
- join(__dirname, "./files/common"),
186
- options.appProjectRoot,
187
- {
188
- ...options,
189
- tmpl: "",
190
- name: options.name,
191
- accountId: options.accountId ? getAccountId(options.accountId) : "",
192
- vitestScript: options.unitTestRunner === "vitest" ? vitestScript : ""
193
- }
194
- );
195
- if (options.template && options.template !== "none") {
196
- generateFiles(
197
- tree,
198
- join(__dirname, `./files/${options.template}`),
199
- join(options.appProjectRoot, "src"),
200
- {
201
- ...options,
202
- tmpl: "",
203
- name: options.name,
204
- accountId: options.accountId ? getAccountId(options.accountId) : "",
205
- vitestScript: options.unitTestRunner === "vitest" ? vitestScript : "",
206
- vitestImports: options.unitTestRunner === "vitest" ? vitestImports : ""
207
- }
208
- );
209
- }
210
- }
211
- function addTargets(tree, options) {
212
- try {
213
- const projectConfiguration = readProjectConfiguration(tree, options.name);
214
- projectConfiguration.targets = {
215
- ...projectConfiguration.targets ?? {},
216
- serve: {
217
- executor: "@storm-software/cloudflare-tools:serve",
218
- options: {
219
- port: options.port
220
- }
221
- },
222
- "nx-release-publish": {
223
- executor: "@storm-software/cloudflare-tools:cloudflare-publish"
224
- }
225
- };
226
- if (projectConfiguration.targets.build) {
227
- delete projectConfiguration.targets.build;
228
- }
229
- updateProjectConfiguration(tree, options.name, projectConfiguration);
230
- } catch (e) {
231
- console.error(e);
232
- }
233
- }
234
- function removeTestFiles(tree, options) {
235
- tree.delete(join(options.appProjectRoot, "src", "index.test.ts"));
236
- }
237
- async function normalizeOptions(host, options, config) {
238
- const { projectName: appProjectName, projectRoot: appProjectRoot } = await determineProjectNameAndRootOptions(host, {
239
- name: options.name,
240
- projectType: "application",
241
- directory: options.directory,
242
- rootProject: options.rootProject
243
- });
244
- options.rootProject = appProjectRoot === ".";
245
- return {
246
- addPlugin: process.env.NX_ADD_PLUGINS !== "false",
247
- accountId: process.env.STORM_BOT_CLOUDFLARE_ACCOUNT,
248
- ...options,
249
- name: names(appProjectName).fileName,
250
- frontendProject: options.frontendProject ? names(options.frontendProject).fileName : void 0,
251
- appProjectRoot,
252
- unitTestRunner: options.unitTestRunner ?? "vitest",
253
- rootProject: options.rootProject ?? false,
254
- template: options.template ?? "fetch-handler",
255
- port: options.port ?? 3e3
256
- };
257
- }
258
- var generator_default2 = applicationGenerator;
259
- var applicationSchematic = convertNxGenerator(applicationGenerator);
260
-
261
- export {
262
- applicationGenerator,
263
- generator_default2 as generator_default,
264
- applicationSchematic
265
- };
@@ -1,262 +0,0 @@
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
-
3
- var _chunkOL65RB72js = require('./chunk-OL65RB72.js');
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
- var _chunkSQUJ3SXLjs = require('./chunk-SQUJ3SXL.js');
13
-
14
-
15
- var _chunkBYI4UJ3Tjs = require('./chunk-BYI4UJ3T.js');
16
-
17
- // src/generators/worker/generator.ts
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
-
28
-
29
- var _devkit = require('@nx/devkit');
30
- var _projectnameandrootutils = require('@nx/devkit/src/generators/project-name-and-root-utils');
31
- var _node = require('@nx/node');
32
- var _versions = require('@nx/node/src/utils/versions');
33
- var _path = require('path');
34
-
35
- // src/generators/worker/libs/get-account-id.ts
36
- function getAccountId(accountId) {
37
- return `account_id = "${accountId}"`;
38
- }
39
-
40
- // src/generators/worker/libs/vitest-imports.ts
41
- var vitestImports = `import { describe, expect, it, beforeAll, afterAll } from 'vitest';`;
42
-
43
- // src/generators/worker/libs/vitest-script.ts
44
- var vitestScript = `"test": "vitest run"`;
45
-
46
- // src/generators/worker/generator.ts
47
- async function applicationGenerator(tree, schema) {
48
- const stopwatch = _chunkSQUJ3SXLjs.getStopwatch.call(void 0, "Storm Worker generator");
49
- let config;
50
- try {
51
- _chunkSQUJ3SXLjs.writeInfo.call(void 0, `\u26A1 Running the Storm Worker generator...
52
-
53
- `, config);
54
- const workspaceRoot = _chunkSQUJ3SXLjs.findWorkspaceRoot.call(void 0, );
55
- _chunkSQUJ3SXLjs.writeDebug.call(void 0,
56
- `Loading the Storm Config from environment variables and storm.json file...
57
- - workspaceRoot: ${workspaceRoot}`,
58
- config
59
- );
60
- config = await _chunkOL65RB72js.getConfig.call(void 0, workspaceRoot);
61
- _chunkSQUJ3SXLjs.writeTrace.call(void 0,
62
- `Loaded Storm config into env:
63
- ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`,
64
- config
65
- );
66
- const options = await normalizeOptions(tree, schema, config);
67
- const tasks = [];
68
- tasks.push(
69
- await _chunkBYI4UJ3Tjs.generator_default.call(void 0, tree, {
70
- ...options,
71
- skipFormat: true
72
- })
73
- );
74
- tasks.push(
75
- await _node.applicationGenerator.call(void 0, tree, {
76
- ...options,
77
- framework: "none",
78
- skipFormat: true,
79
- unitTestRunner: options.unitTestRunner == "vitest" ? "none" : options.unitTestRunner,
80
- e2eTestRunner: "none",
81
- name: schema.name
82
- })
83
- );
84
- if (options.unitTestRunner === "vitest") {
85
- const { vitestGenerator, createOrEditViteConfig } = _devkit.ensurePackage.call(void 0,
86
- "@nx/vite",
87
- _versions.nxVersion
88
- );
89
- const vitestTask = await vitestGenerator(tree, {
90
- project: options.name,
91
- uiFramework: "none",
92
- coverageProvider: "v8",
93
- skipFormat: true,
94
- testEnvironment: "node"
95
- });
96
- tasks.push(vitestTask);
97
- createOrEditViteConfig(
98
- tree,
99
- {
100
- project: options.name,
101
- includeLib: false,
102
- includeVitest: true,
103
- testEnvironment: "node"
104
- },
105
- true
106
- );
107
- }
108
- addCloudflareFiles(tree, options);
109
- updateTsAppConfig(tree, options);
110
- addTargets(tree, options);
111
- if (options.unitTestRunner === "none") {
112
- removeTestFiles(tree, options);
113
- }
114
- if (!options.skipFormat) {
115
- await _devkit.formatFiles.call(void 0, tree);
116
- }
117
- if (options.template === "hono") {
118
- tasks.push(() => {
119
- const packageJsonPath = _devkit.joinPathFragments.call(void 0,
120
- _nullishCoalesce(options.directory, () => ( "")),
121
- "package.json"
122
- );
123
- if (tree.exists(packageJsonPath)) {
124
- _devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => ({
125
- ...json,
126
- dependencies: {
127
- hono: "4.4.0",
128
- ..._optionalChain([json, 'optionalAccess', _ => _.dependencies])
129
- }
130
- }));
131
- }
132
- });
133
- }
134
- return _devkit.runTasksInSerial.call(void 0, ...tasks);
135
- } catch (error) {
136
- return () => {
137
- _chunkSQUJ3SXLjs.writeFatal.call(void 0,
138
- "A fatal error occurred while running the generator - the process was forced to terminate",
139
- config
140
- );
141
- _chunkSQUJ3SXLjs.writeError.call(void 0,
142
- `An exception was thrown in the generator's process
143
- - Details: ${error.message}
144
- - Stacktrace: ${error.stack}`,
145
- config
146
- );
147
- };
148
- } finally {
149
- stopwatch();
150
- }
151
- }
152
- function updateTsAppConfig(tree, options) {
153
- _devkit.updateJson.call(void 0, tree, _path.join.call(void 0, options.appProjectRoot, "tsconfig.app.json"), (json) => {
154
- json.compilerOptions = {
155
- ...json.compilerOptions,
156
- esModuleInterop: true,
157
- target: "es2021",
158
- lib: ["es2021"],
159
- module: "es2022",
160
- moduleResolution: "node",
161
- resolveJsonModule: true,
162
- allowJs: true,
163
- checkJs: false,
164
- noEmit: true,
165
- isolatedModules: true,
166
- allowSyntheticDefaultImports: true,
167
- forceConsistentCasingInFileNames: true,
168
- strict: true,
169
- skipLibCheck: true
170
- };
171
- json.compilerOptions.types = [
172
- ...json.compilerOptions.types,
173
- "@cloudflare/workers-types"
174
- ];
175
- return json;
176
- });
177
- }
178
- function addCloudflareFiles(tree, options) {
179
- tree.delete(_path.join.call(void 0, options.appProjectRoot, "src/main.ts"));
180
- _devkit.generateFiles.call(void 0,
181
- tree,
182
- _path.join.call(void 0, __dirname, "./files/common"),
183
- options.appProjectRoot,
184
- {
185
- ...options,
186
- tmpl: "",
187
- name: options.name,
188
- accountId: options.accountId ? getAccountId(options.accountId) : "",
189
- vitestScript: options.unitTestRunner === "vitest" ? vitestScript : ""
190
- }
191
- );
192
- if (options.template && options.template !== "none") {
193
- _devkit.generateFiles.call(void 0,
194
- tree,
195
- _path.join.call(void 0, __dirname, `./files/${options.template}`),
196
- _path.join.call(void 0, options.appProjectRoot, "src"),
197
- {
198
- ...options,
199
- tmpl: "",
200
- name: options.name,
201
- accountId: options.accountId ? getAccountId(options.accountId) : "",
202
- vitestScript: options.unitTestRunner === "vitest" ? vitestScript : "",
203
- vitestImports: options.unitTestRunner === "vitest" ? vitestImports : ""
204
- }
205
- );
206
- }
207
- }
208
- function addTargets(tree, options) {
209
- try {
210
- const projectConfiguration = _devkit.readProjectConfiguration.call(void 0, tree, options.name);
211
- projectConfiguration.targets = {
212
- ..._nullishCoalesce(projectConfiguration.targets, () => ( {})),
213
- serve: {
214
- executor: "@storm-software/cloudflare-tools:serve",
215
- options: {
216
- port: options.port
217
- }
218
- },
219
- "nx-release-publish": {
220
- executor: "@storm-software/cloudflare-tools:cloudflare-publish"
221
- }
222
- };
223
- if (projectConfiguration.targets.build) {
224
- delete projectConfiguration.targets.build;
225
- }
226
- _devkit.updateProjectConfiguration.call(void 0, tree, options.name, projectConfiguration);
227
- } catch (e) {
228
- console.error(e);
229
- }
230
- }
231
- function removeTestFiles(tree, options) {
232
- tree.delete(_path.join.call(void 0, options.appProjectRoot, "src", "index.test.ts"));
233
- }
234
- async function normalizeOptions(host, options, config) {
235
- const { projectName: appProjectName, projectRoot: appProjectRoot } = await _projectnameandrootutils.determineProjectNameAndRootOptions.call(void 0, host, {
236
- name: options.name,
237
- projectType: "application",
238
- directory: options.directory,
239
- rootProject: options.rootProject
240
- });
241
- options.rootProject = appProjectRoot === ".";
242
- return {
243
- addPlugin: process.env.NX_ADD_PLUGINS !== "false",
244
- accountId: process.env.STORM_BOT_CLOUDFLARE_ACCOUNT,
245
- ...options,
246
- name: _devkit.names.call(void 0, appProjectName).fileName,
247
- frontendProject: options.frontendProject ? _devkit.names.call(void 0, options.frontendProject).fileName : void 0,
248
- appProjectRoot,
249
- unitTestRunner: _nullishCoalesce(options.unitTestRunner, () => ( "vitest")),
250
- rootProject: _nullishCoalesce(options.rootProject, () => ( false)),
251
- template: _nullishCoalesce(options.template, () => ( "fetch-handler")),
252
- port: _nullishCoalesce(options.port, () => ( 3e3))
253
- };
254
- }
255
- var generator_default2 = applicationGenerator;
256
- var applicationSchematic = _devkit.convertNxGenerator.call(void 0, applicationGenerator);
257
-
258
-
259
-
260
-
261
-
262
- exports.applicationGenerator = applicationGenerator; exports.generator_default = generator_default2; exports.applicationSchematic = applicationSchematic;