@storm-software/cloudflare-tools 0.55.85 → 0.55.87

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +1 -1
  3. package/dist/{chunk-VTHBMY4B.js → chunk-6XDOBG77.js} +39 -28
  4. package/dist/{chunk-FUE3PSOC.mjs → chunk-CW6SXRL4.mjs} +825 -544
  5. package/dist/{chunk-VRLPVMXP.mjs → chunk-FABNT5TZ.mjs} +15 -13
  6. package/dist/{chunk-QQJ225UZ.mjs → chunk-GPAI4NHQ.mjs} +141 -87
  7. package/dist/{chunk-YNJJF3XM.mjs → chunk-H4XWGL24.mjs} +93 -56
  8. package/dist/{chunk-IVLCYFXD.js → chunk-HBASMEU5.js} +168 -114
  9. package/dist/{chunk-6B5PUF7X.js → chunk-HIUZ6UL7.js} +97 -47
  10. package/dist/{chunk-R7AIVBS7.js → chunk-I4P7DVDN.js} +19 -24
  11. package/dist/{chunk-KWHACLHR.mjs → chunk-ISGKIYF5.mjs} +92 -42
  12. package/dist/{chunk-5RE7UZTH.mjs → chunk-L4WFYC7K.mjs} +39 -28
  13. package/dist/{chunk-PWYTCJYX.js → chunk-LDHIZ5T7.js} +875 -594
  14. package/dist/{chunk-J5SB6L2L.js → chunk-MCKGQKYU.js} +2 -5
  15. package/dist/{chunk-DEJ5S46A.mjs → chunk-MV24QW26.mjs} +195 -127
  16. package/dist/{chunk-V7LBWOVV.js → chunk-PZ5CI56F.js} +196 -128
  17. package/dist/{chunk-AOEF7EWN.mjs → chunk-QPABB45G.mjs} +19 -24
  18. package/dist/{chunk-TLFPZXKG.mjs → chunk-QQ22YQSB.mjs} +3 -6
  19. package/dist/{chunk-QGRENI3O.js → chunk-RIUVF72K.js} +17 -15
  20. package/dist/{chunk-PKQBY4ZM.js → chunk-X4Y76AIM.js} +26 -20
  21. package/dist/{chunk-CNGX2WYG.js → chunk-XCEENUJB.js} +93 -58
  22. package/dist/{chunk-N4KJP2OA.mjs → chunk-YJOYATEB.mjs} +27 -21
  23. package/dist/executors.js +8 -8
  24. package/dist/executors.mjs +8 -8
  25. package/dist/generators.js +6 -6
  26. package/dist/generators.mjs +5 -5
  27. package/dist/index.js +41 -49
  28. package/dist/index.mjs +40 -48
  29. package/dist/src/executors/cloudflare-publish/executor.js +7 -7
  30. package/dist/src/executors/cloudflare-publish/executor.mjs +6 -6
  31. package/dist/src/executors/r2-upload-publish/executor.js +7 -7
  32. package/dist/src/executors/r2-upload-publish/executor.mjs +6 -6
  33. package/dist/src/executors/serve/executor.js +49 -50
  34. package/dist/src/executors/serve/executor.mjs +48 -49
  35. package/dist/src/generators/init/generator.js +3 -3
  36. package/dist/src/generators/init/generator.mjs +2 -2
  37. package/dist/src/generators/worker/generator.js +6 -6
  38. package/dist/src/generators/worker/generator.mjs +5 -5
  39. package/dist/src/utils/index.js +4 -4
  40. package/dist/src/utils/index.mjs +3 -3
  41. package/dist/src/utils/r2-bucket-helpers.js +4 -4
  42. package/dist/src/utils/r2-bucket-helpers.mjs +3 -3
  43. package/dist/tsup.config.js +3 -8
  44. package/dist/tsup.config.mjs +3 -8
  45. package/package.json +1 -1
@@ -1,10 +1,9 @@
1
1
  import {
2
2
  createCliOptions
3
- } from "./chunk-5RE7UZTH.mjs";
3
+ } from "./chunk-L4WFYC7K.mjs";
4
4
  import {
5
- __name,
6
5
  __require
7
- } from "./chunk-TLFPZXKG.mjs";
6
+ } from "./chunk-QQ22YQSB.mjs";
8
7
 
9
8
  // src/executors/cloudflare-publish/executor.ts
10
9
  import { joinPathFragments } from "@nx/devkit";
@@ -14,15 +13,18 @@ async function runExecutor(options, context) {
14
13
  if (!context.projectName) {
15
14
  throw new Error("The executor requires a projectName.");
16
15
  }
17
- console.info(`\u{1F680} Running Storm Cloudflare Publish executor on the ${context.projectName} worker`);
16
+ console.info(
17
+ `\u{1F680} Running Storm Cloudflare Publish executor on the ${context.projectName} worker`
18
+ );
18
19
  if (!context.projectName || !context.projectsConfigurations?.projects || !context.projectsConfigurations.projects[context.projectName] || !context.projectsConfigurations.projects[context.projectName]?.root) {
19
20
  throw new Error("The executor requires projectsConfigurations.");
20
21
  }
21
- const packageRoot = joinPathFragments(context.root, context.projectsConfigurations.projects[context.projectName]?.root);
22
+ const packageRoot = joinPathFragments(
23
+ context.root,
24
+ context.projectsConfigurations.projects[context.projectName]?.root
25
+ );
22
26
  try {
23
- const args = createCliOptions({
24
- ...options
25
- });
27
+ const args = createCliOptions({ ...options });
26
28
  if (isDryRun) {
27
29
  args.push("--dry-run");
28
30
  }
@@ -31,10 +33,7 @@ async function runExecutor(options, context) {
31
33
  console.log("");
32
34
  let proc;
33
35
  try {
34
- fork(__require.resolve("wrangler/bin/wrangler"), [
35
- "deploy",
36
- ...args
37
- ], {
36
+ fork(__require.resolve("wrangler/bin/wrangler"), ["deploy", ...args], {
38
37
  env: {
39
38
  CLOUDFLARE_ACCOUNT_ID: process.env.STORM_BOT_CLOUDFLARE_ACCOUNT,
40
39
  CLOUDFLARE_API_TOKEN: process.env.STORM_BOT_CLOUDFLARE_TOKEN,
@@ -43,16 +42,13 @@ async function runExecutor(options, context) {
43
42
  FORCE_COLOR: "true"
44
43
  },
45
44
  cwd: packageRoot,
46
- stdio: [
47
- "pipe",
48
- "pipe",
49
- "pipe",
50
- "ipc"
51
- ]
45
+ stdio: ["pipe", "pipe", "pipe", "ipc"]
52
46
  });
53
47
  } catch (e) {
54
48
  console.error(e);
55
- throw new Error("Unable to run Wrangler. Please ensure Wrangler is installed.");
49
+ throw new Error(
50
+ "Unable to run Wrangler. Please ensure Wrangler is installed."
51
+ );
56
52
  }
57
53
  proc?.stdout?.on("data", (message) => {
58
54
  process.stdout.write(message);
@@ -64,13 +60,13 @@ async function runExecutor(options, context) {
64
60
  proc?.on("close", (code) => {
65
61
  console.log("");
66
62
  if (isDryRun) {
67
- console.log("Would publish to Cloudflare Workers Registry, but [dry-run] was set");
63
+ console.log(
64
+ "Would publish to Cloudflare Workers Registry, but [dry-run] was set"
65
+ );
68
66
  } else {
69
67
  console.log("Published to Cloudflare Workers Registry");
70
68
  }
71
- return resolve({
72
- success: code === 0
73
- });
69
+ return resolve({ success: code === 0 });
74
70
  });
75
71
  });
76
72
  } catch (error) {
@@ -82,7 +78,6 @@ async function runExecutor(options, context) {
82
78
  };
83
79
  }
84
80
  }
85
- __name(runExecutor, "runExecutor");
86
81
 
87
82
  export {
88
83
  runExecutor
@@ -1,6 +1,4 @@
1
- var __defProp = Object.defineProperty;
2
1
  var __getOwnPropNames = Object.getOwnPropertyNames;
3
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
4
2
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
5
3
  get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
6
4
  }) : x)(function(x) {
@@ -11,15 +9,14 @@ var __commonJS = (cb, mod) => function __require2() {
11
9
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
12
10
  };
13
11
 
14
- // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=03667209a675e5896d66bd6058c9830fe9adb022e07ce6b04adc2eb927ede5fd__f9deff99d28cedac02de9c72719d1b4e/node_modules/tsup/assets/esm_shims.js
12
+ // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=616d4d8468728c5caa25e7b97fe871f667b5342103b43bda8e891020bc6b674a__e7bfd10e92d28211ce978b182e37e925/node_modules/tsup/assets/esm_shims.js
15
13
  import { fileURLToPath } from "url";
16
14
  import path from "path";
17
- var getFilename = /* @__PURE__ */ __name(() => fileURLToPath(import.meta.url), "getFilename");
18
- var getDirname = /* @__PURE__ */ __name(() => path.dirname(getFilename()), "getDirname");
15
+ var getFilename = () => fileURLToPath(import.meta.url);
16
+ var getDirname = () => path.dirname(getFilename());
19
17
  var __dirname = /* @__PURE__ */ getDirname();
20
18
 
21
19
  export {
22
- __name,
23
20
  __require,
24
21
  __commonJS,
25
22
  __dirname
@@ -1,17 +1,14 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
3
 
4
- var _chunkV7LBWOVVjs = require('./chunk-V7LBWOVV.js');
5
-
6
-
7
- var _chunkJ5SB6L2Ljs = require('./chunk-J5SB6L2L.js');
4
+ var _chunkPZ5CI56Fjs = require('./chunk-PZ5CI56F.js');
8
5
 
9
6
  // src/utils/r2-bucket-helpers.ts
10
7
  var _crypto = require('crypto');
11
- var r2UploadFile = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (client, bucketName, projectPath, fileName, version, fileContent, contentType = "text/plain", isDryRun = false) => {
8
+ var r2UploadFile = async (client, bucketName, projectPath, fileName, version, fileContent, contentType = "text/plain", isDryRun = false) => {
12
9
  const checksum = _crypto.createHash.call(void 0, "sha256").update(fileContent).digest("base64");
13
10
  const fileKey = `${projectPath}/${fileName.startsWith("/") ? fileName.substring(1) : fileName}`;
14
- _chunkV7LBWOVVjs.writeDebug.call(void 0, `Uploading file: ${fileKey}`);
11
+ _chunkPZ5CI56Fjs.writeDebug.call(void 0, `Uploading file: ${fileKey}`);
15
12
  if (!isDryRun) {
16
13
  await client.putObject({
17
14
  Bucket: bucketName,
@@ -24,17 +21,22 @@ var r2UploadFile = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (c
24
21
  }
25
22
  });
26
23
  } else {
27
- _chunkV7LBWOVVjs.writeWarning.call(void 0, "[Dry run]: skipping upload to the Cyclone Registry.");
24
+ _chunkPZ5CI56Fjs.writeWarning.call(void 0, "[Dry run]: skipping upload to the Cyclone Registry.");
28
25
  }
29
- }, "r2UploadFile");
30
- var getInternalDependencies = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (projectName, graph) => {
26
+ };
27
+ var getInternalDependencies = (projectName, graph) => {
31
28
  const allDeps = _nullishCoalesce(graph.dependencies[projectName], () => ( []));
32
- return Array.from(allDeps.reduce((acc, node) => {
33
- const found = graph.nodes[node.target];
34
- if (found) acc.push(found);
35
- return acc;
36
- }, []));
37
- }, "getInternalDependencies");
29
+ return Array.from(
30
+ allDeps.reduce(
31
+ (acc, node) => {
32
+ const found = graph.nodes[node.target];
33
+ if (found) acc.push(found);
34
+ return acc;
35
+ },
36
+ []
37
+ )
38
+ );
39
+ };
38
40
 
39
41
 
40
42
 
@@ -1,14 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
-
4
- var _chunkJ5SB6L2Ljs = require('./chunk-J5SB6L2L.js');
3
+ var _chunkMCKGQKYUjs = require('./chunk-MCKGQKYU.js');
5
4
 
6
5
  // package.json
7
- var require_package = _chunkJ5SB6L2Ljs.__commonJS.call(void 0, {
6
+ var require_package = _chunkMCKGQKYUjs.__commonJS.call(void 0, {
8
7
  "package.json"(exports, module) {
9
8
  module.exports = {
10
9
  name: "@storm-software/cloudflare-tools",
11
- version: "0.55.85",
10
+ version: "0.55.87",
12
11
  description: "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
13
12
  repository: {
14
13
  type: "github",
@@ -188,6 +187,11 @@ var require_package = _chunkJ5SB6L2Ljs.__commonJS.call(void 0, {
188
187
  });
189
188
 
190
189
  // src/generators/init/generator.ts
190
+
191
+
192
+
193
+
194
+
191
195
  var _devkit = require('@nx/devkit');
192
196
  var _js = require('@nx/js');
193
197
  var _versions = require('@nx/node/src/utils/versions');
@@ -213,24 +217,26 @@ async function initGenerator(tree, schema) {
213
217
  await installTask();
214
218
  };
215
219
  }
216
- _chunkJ5SB6L2Ljs.__name.call(void 0, initGenerator, "initGenerator");
217
220
  function updateDependencies(tree, schema) {
218
- _devkit.removeDependenciesFromPackageJson.call(void 0, tree, [
219
- "@storm-software/cloudflare-tools"
220
- ], []);
221
- const honoPackage = schema.template === "hono" ? {
222
- hono: honoVersion
223
- } : {};
224
- return _devkit.addDependenciesToPackageJson.call(void 0, tree, {
225
- tslib: _versions.tslibVersion,
226
- ...honoPackage
227
- }, {
228
- wrangler: wranglerVersion,
229
- "@cloudflare/workers-types": cloudflareWorkersTypeVersions,
230
- "@storm-software/cloudflare-tools": cloudflareToolsVersion
231
- });
221
+ _devkit.removeDependenciesFromPackageJson.call(void 0,
222
+ tree,
223
+ ["@storm-software/cloudflare-tools"],
224
+ []
225
+ );
226
+ const honoPackage = schema.template === "hono" ? { hono: honoVersion } : {};
227
+ return _devkit.addDependenciesToPackageJson.call(void 0,
228
+ tree,
229
+ {
230
+ tslib: _versions.tslibVersion,
231
+ ...honoPackage
232
+ },
233
+ {
234
+ wrangler: wranglerVersion,
235
+ "@cloudflare/workers-types": cloudflareWorkersTypeVersions,
236
+ "@storm-software/cloudflare-tools": cloudflareToolsVersion
237
+ }
238
+ );
232
239
  }
233
- _chunkJ5SB6L2Ljs.__name.call(void 0, updateDependencies, "updateDependencies");
234
240
  var generator_default = initGenerator;
235
241
  var initSchematic = _devkit.convertNxGenerator.call(void 0, initGenerator);
236
242
 
@@ -1,9 +1,20 @@
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 _chunkPKQBY4ZMjs = require('./chunk-PKQBY4ZM.js');
3
+ var _chunkX4Y76AIMjs = require('./chunk-X4Y76AIM.js');
4
4
 
5
5
 
6
- var _chunkIVLCYFXDjs = require('./chunk-IVLCYFXD.js');
6
+ var _chunkHBASMEU5js = require('./chunk-HBASMEU5.js');
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+ var _chunkPZ5CI56Fjs = require('./chunk-PZ5CI56F.js');
16
+
17
+ // src/generators/worker/generator.ts
7
18
 
8
19
 
9
20
 
@@ -12,12 +23,9 @@ var _chunkIVLCYFXDjs = require('./chunk-IVLCYFXD.js');
12
23
 
13
24
 
14
25
 
15
- var _chunkV7LBWOVVjs = require('./chunk-V7LBWOVV.js');
16
26
 
17
27
 
18
- var _chunkJ5SB6L2Ljs = require('./chunk-J5SB6L2L.js');
19
28
 
20
- // src/generators/worker/generator.ts
21
29
  var _devkit = require('@nx/devkit');
22
30
  var _projectnameandrootutils = require('@nx/devkit/src/generators/project-name-and-root-utils');
23
31
  var _node = require('@nx/node');
@@ -28,7 +36,6 @@ var _path = require('path');
28
36
  function getAccountId(accountId) {
29
37
  return `account_id = "${accountId}"`;
30
38
  }
31
- _chunkJ5SB6L2Ljs.__name.call(void 0, getAccountId, "getAccountId");
32
39
 
33
40
  // src/generators/worker/libs/vitest-imports.ts
34
41
  var vitestImports = `import { describe, expect, it, beforeAll, afterAll } from 'vitest';`;
@@ -38,34 +45,47 @@ var vitestScript = `"test": "vitest run"`;
38
45
 
39
46
  // src/generators/worker/generator.ts
40
47
  async function applicationGenerator(tree, schema) {
41
- const stopwatch = _chunkV7LBWOVVjs.getStopwatch.call(void 0, "Storm Worker generator");
48
+ const stopwatch = _chunkPZ5CI56Fjs.getStopwatch.call(void 0, "Storm Worker generator");
42
49
  let config;
43
50
  try {
44
- _chunkV7LBWOVVjs.writeInfo.call(void 0, `\u26A1 Running the Storm Worker generator...
51
+ _chunkPZ5CI56Fjs.writeInfo.call(void 0, `\u26A1 Running the Storm Worker generator...
45
52
 
46
53
  `, config);
47
- const workspaceRoot = _chunkV7LBWOVVjs.findWorkspaceRoot.call(void 0, );
48
- _chunkV7LBWOVVjs.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.json file...
49
- - workspaceRoot: ${workspaceRoot}`, config);
50
- config = await _chunkIVLCYFXDjs.getConfig.call(void 0, workspaceRoot);
51
- _chunkV7LBWOVVjs.writeTrace.call(void 0, `Loaded Storm config into env:
52
- ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`, config);
54
+ const workspaceRoot = _chunkPZ5CI56Fjs.findWorkspaceRoot.call(void 0, );
55
+ _chunkPZ5CI56Fjs.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 _chunkHBASMEU5js.getConfig.call(void 0, workspaceRoot);
61
+ _chunkPZ5CI56Fjs.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
+ );
53
66
  const options = await normalizeOptions(tree, schema, config);
54
67
  const tasks = [];
55
- tasks.push(await _chunkPKQBY4ZMjs.generator_default.call(void 0, tree, {
56
- ...options,
57
- skipFormat: true
58
- }));
59
- tasks.push(await _node.applicationGenerator.call(void 0, tree, {
60
- ...options,
61
- framework: "none",
62
- skipFormat: true,
63
- unitTestRunner: options.unitTestRunner == "vitest" ? "none" : options.unitTestRunner,
64
- e2eTestRunner: "none",
65
- name: schema.name
66
- }));
68
+ tasks.push(
69
+ await _chunkX4Y76AIMjs.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
+ );
67
84
  if (options.unitTestRunner === "vitest") {
68
- const { vitestGenerator, createOrEditViteConfig } = _devkit.ensurePackage.call(void 0, "@nx/vite", _versions.nxVersion);
85
+ const { vitestGenerator, createOrEditViteConfig } = _devkit.ensurePackage.call(void 0,
86
+ "@nx/vite",
87
+ _versions.nxVersion
88
+ );
69
89
  const vitestTask = await vitestGenerator(tree, {
70
90
  project: options.name,
71
91
  uiFramework: "none",
@@ -74,12 +94,16 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[
74
94
  testEnvironment: "node"
75
95
  });
76
96
  tasks.push(vitestTask);
77
- createOrEditViteConfig(tree, {
78
- project: options.name,
79
- includeLib: false,
80
- includeVitest: true,
81
- testEnvironment: "node"
82
- }, true);
97
+ createOrEditViteConfig(
98
+ tree,
99
+ {
100
+ project: options.name,
101
+ includeLib: false,
102
+ includeVitest: true,
103
+ testEnvironment: "node"
104
+ },
105
+ true
106
+ );
83
107
  }
84
108
  addCloudflareFiles(tree, options);
85
109
  updateTsAppConfig(tree, options);
@@ -92,7 +116,10 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[
92
116
  }
93
117
  if (options.template === "hono") {
94
118
  tasks.push(() => {
95
- const packageJsonPath = _devkit.joinPathFragments.call(void 0, _nullishCoalesce(options.directory, () => ( "")), "package.json");
119
+ const packageJsonPath = _devkit.joinPathFragments.call(void 0,
120
+ _nullishCoalesce(options.directory, () => ( "")),
121
+ "package.json"
122
+ );
96
123
  if (tree.exists(packageJsonPath)) {
97
124
  _devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => ({
98
125
  ...json,
@@ -107,25 +134,28 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[
107
134
  return _devkit.runTasksInSerial.call(void 0, ...tasks);
108
135
  } catch (error) {
109
136
  return () => {
110
- _chunkV7LBWOVVjs.writeFatal.call(void 0, "A fatal error occurred while running the generator - the process was forced to terminate", config);
111
- _chunkV7LBWOVVjs.writeError.call(void 0, `An exception was thrown in the generator's process
137
+ _chunkPZ5CI56Fjs.writeFatal.call(void 0,
138
+ "A fatal error occurred while running the generator - the process was forced to terminate",
139
+ config
140
+ );
141
+ _chunkPZ5CI56Fjs.writeError.call(void 0,
142
+ `An exception was thrown in the generator's process
112
143
  - Details: ${error.message}
113
- - Stacktrace: ${error.stack}`, config);
144
+ - Stacktrace: ${error.stack}`,
145
+ config
146
+ );
114
147
  };
115
148
  } finally {
116
149
  stopwatch();
117
150
  }
118
151
  }
119
- _chunkJ5SB6L2Ljs.__name.call(void 0, applicationGenerator, "applicationGenerator");
120
152
  function updateTsAppConfig(tree, options) {
121
153
  _devkit.updateJson.call(void 0, tree, _path.join.call(void 0, options.appProjectRoot, "tsconfig.app.json"), (json) => {
122
154
  json.compilerOptions = {
123
155
  ...json.compilerOptions,
124
156
  esModuleInterop: true,
125
157
  target: "es2021",
126
- lib: [
127
- "es2021"
128
- ],
158
+ lib: ["es2021"],
129
159
  module: "es2022",
130
160
  moduleResolution: "node",
131
161
  resolveJsonModule: true,
@@ -145,28 +175,36 @@ function updateTsAppConfig(tree, options) {
145
175
  return json;
146
176
  });
147
177
  }
148
- _chunkJ5SB6L2Ljs.__name.call(void 0, updateTsAppConfig, "updateTsAppConfig");
149
178
  function addCloudflareFiles(tree, options) {
150
179
  tree.delete(_path.join.call(void 0, options.appProjectRoot, "src/main.ts"));
151
- _devkit.generateFiles.call(void 0, tree, _path.join.call(void 0, __dirname, "./files/common"), options.appProjectRoot, {
152
- ...options,
153
- tmpl: "",
154
- name: options.name,
155
- accountId: options.accountId ? getAccountId(options.accountId) : "",
156
- vitestScript: options.unitTestRunner === "vitest" ? vitestScript : ""
157
- });
158
- if (options.template && options.template !== "none") {
159
- _devkit.generateFiles.call(void 0, tree, _path.join.call(void 0, __dirname, `./files/${options.template}`), _path.join.call(void 0, options.appProjectRoot, "src"), {
180
+ _devkit.generateFiles.call(void 0,
181
+ tree,
182
+ _path.join.call(void 0, __dirname, "./files/common"),
183
+ options.appProjectRoot,
184
+ {
160
185
  ...options,
161
186
  tmpl: "",
162
187
  name: options.name,
163
188
  accountId: options.accountId ? getAccountId(options.accountId) : "",
164
- vitestScript: options.unitTestRunner === "vitest" ? vitestScript : "",
165
- vitestImports: options.unitTestRunner === "vitest" ? vitestImports : ""
166
- });
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
+ );
167
206
  }
168
207
  }
169
- _chunkJ5SB6L2Ljs.__name.call(void 0, addCloudflareFiles, "addCloudflareFiles");
170
208
  function addTargets(tree, options) {
171
209
  try {
172
210
  const projectConfiguration = _devkit.readProjectConfiguration.call(void 0, tree, options.name);
@@ -190,11 +228,9 @@ function addTargets(tree, options) {
190
228
  console.error(e);
191
229
  }
192
230
  }
193
- _chunkJ5SB6L2Ljs.__name.call(void 0, addTargets, "addTargets");
194
231
  function removeTestFiles(tree, options) {
195
232
  tree.delete(_path.join.call(void 0, options.appProjectRoot, "src", "index.test.ts"));
196
233
  }
197
- _chunkJ5SB6L2Ljs.__name.call(void 0, removeTestFiles, "removeTestFiles");
198
234
  async function normalizeOptions(host, options, config) {
199
235
  const { projectName: appProjectName, projectRoot: appProjectRoot } = await _projectnameandrootutils.determineProjectNameAndRootOptions.call(void 0, host, {
200
236
  name: options.name,
@@ -216,7 +252,6 @@ async function normalizeOptions(host, options, config) {
216
252
  port: _nullishCoalesce(options.port, () => ( 3e3))
217
253
  };
218
254
  }
219
- _chunkJ5SB6L2Ljs.__name.call(void 0, normalizeOptions, "normalizeOptions");
220
255
  var generator_default2 = applicationGenerator;
221
256
  var applicationSchematic = _devkit.convertNxGenerator.call(void 0, applicationGenerator);
222
257
 
@@ -1,14 +1,13 @@
1
1
  import {
2
- __commonJS,
3
- __name
4
- } from "./chunk-TLFPZXKG.mjs";
2
+ __commonJS
3
+ } from "./chunk-QQ22YQSB.mjs";
5
4
 
6
5
  // package.json
7
6
  var require_package = __commonJS({
8
7
  "package.json"(exports, module) {
9
8
  module.exports = {
10
9
  name: "@storm-software/cloudflare-tools",
11
- version: "0.55.85",
10
+ version: "0.55.87",
12
11
  description: "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
13
12
  repository: {
14
13
  type: "github",
@@ -188,7 +187,12 @@ var require_package = __commonJS({
188
187
  });
189
188
 
190
189
  // src/generators/init/generator.ts
191
- import { addDependenciesToPackageJson, convertNxGenerator, formatFiles, removeDependenciesFromPackageJson } from "@nx/devkit";
190
+ import {
191
+ addDependenciesToPackageJson,
192
+ convertNxGenerator,
193
+ formatFiles,
194
+ removeDependenciesFromPackageJson
195
+ } from "@nx/devkit";
192
196
  import { initGenerator as nodeInitGenerator } from "@nx/js";
193
197
  import { tslibVersion } from "@nx/node/src/utils/versions";
194
198
 
@@ -213,24 +217,26 @@ async function initGenerator(tree, schema) {
213
217
  await installTask();
214
218
  };
215
219
  }
216
- __name(initGenerator, "initGenerator");
217
220
  function updateDependencies(tree, schema) {
218
- removeDependenciesFromPackageJson(tree, [
219
- "@storm-software/cloudflare-tools"
220
- ], []);
221
- const honoPackage = schema.template === "hono" ? {
222
- hono: honoVersion
223
- } : {};
224
- return addDependenciesToPackageJson(tree, {
225
- tslib: tslibVersion,
226
- ...honoPackage
227
- }, {
228
- wrangler: wranglerVersion,
229
- "@cloudflare/workers-types": cloudflareWorkersTypeVersions,
230
- "@storm-software/cloudflare-tools": cloudflareToolsVersion
231
- });
221
+ removeDependenciesFromPackageJson(
222
+ tree,
223
+ ["@storm-software/cloudflare-tools"],
224
+ []
225
+ );
226
+ const honoPackage = schema.template === "hono" ? { hono: honoVersion } : {};
227
+ return addDependenciesToPackageJson(
228
+ tree,
229
+ {
230
+ tslib: tslibVersion,
231
+ ...honoPackage
232
+ },
233
+ {
234
+ wrangler: wranglerVersion,
235
+ "@cloudflare/workers-types": cloudflareWorkersTypeVersions,
236
+ "@storm-software/cloudflare-tools": cloudflareToolsVersion
237
+ }
238
+ );
232
239
  }
233
- __name(updateDependencies, "updateDependencies");
234
240
  var generator_default = initGenerator;
235
241
  var initSchematic = convertNxGenerator(initGenerator);
236
242
 
package/dist/executors.js CHANGED
@@ -1,9 +1,9 @@
1
1
  "use strict";require('./chunk-XO66D74Z.js');
2
- require('./chunk-R7AIVBS7.js');
3
- require('./chunk-PWYTCJYX.js');
4
- require('./chunk-6B5PUF7X.js');
5
- require('./chunk-QGRENI3O.js');
6
- require('./chunk-VTHBMY4B.js');
7
- require('./chunk-IVLCYFXD.js');
8
- require('./chunk-V7LBWOVV.js');
9
- require('./chunk-J5SB6L2L.js');
2
+ require('./chunk-I4P7DVDN.js');
3
+ require('./chunk-LDHIZ5T7.js');
4
+ require('./chunk-HIUZ6UL7.js');
5
+ require('./chunk-RIUVF72K.js');
6
+ require('./chunk-6XDOBG77.js');
7
+ require('./chunk-HBASMEU5.js');
8
+ require('./chunk-PZ5CI56F.js');
9
+ require('./chunk-MCKGQKYU.js');
@@ -1,9 +1,9 @@
1
1
  import "./chunk-YSCEY447.mjs";
2
- import "./chunk-AOEF7EWN.mjs";
3
- import "./chunk-FUE3PSOC.mjs";
4
- import "./chunk-KWHACLHR.mjs";
5
- import "./chunk-VRLPVMXP.mjs";
6
- import "./chunk-5RE7UZTH.mjs";
7
- import "./chunk-QQJ225UZ.mjs";
8
- import "./chunk-DEJ5S46A.mjs";
9
- import "./chunk-TLFPZXKG.mjs";
2
+ import "./chunk-QPABB45G.mjs";
3
+ import "./chunk-CW6SXRL4.mjs";
4
+ import "./chunk-ISGKIYF5.mjs";
5
+ import "./chunk-FABNT5TZ.mjs";
6
+ import "./chunk-L4WFYC7K.mjs";
7
+ import "./chunk-GPAI4NHQ.mjs";
8
+ import "./chunk-MV24QW26.mjs";
9
+ import "./chunk-QQ22YQSB.mjs";
@@ -2,17 +2,17 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkCNGX2WYGjs = require('./chunk-CNGX2WYG.js');
5
+ var _chunkXCEENUJBjs = require('./chunk-XCEENUJB.js');
6
6
 
7
7
 
8
8
 
9
- var _chunkPKQBY4ZMjs = require('./chunk-PKQBY4ZM.js');
10
- require('./chunk-IVLCYFXD.js');
11
- require('./chunk-V7LBWOVV.js');
12
- require('./chunk-J5SB6L2L.js');
9
+ var _chunkX4Y76AIMjs = require('./chunk-X4Y76AIM.js');
10
+ require('./chunk-HBASMEU5.js');
11
+ require('./chunk-PZ5CI56F.js');
12
+ require('./chunk-MCKGQKYU.js');
13
13
 
14
14
 
15
15
 
16
16
 
17
17
 
18
- exports.applicationGenerator = _chunkCNGX2WYGjs.applicationGenerator; exports.applicationSchematic = _chunkCNGX2WYGjs.applicationSchematic; exports.initGenerator = _chunkPKQBY4ZMjs.initGenerator; exports.initSchematic = _chunkPKQBY4ZMjs.initSchematic;
18
+ exports.applicationGenerator = _chunkXCEENUJBjs.applicationGenerator; exports.applicationSchematic = _chunkXCEENUJBjs.applicationSchematic; exports.initGenerator = _chunkX4Y76AIMjs.initGenerator; exports.initSchematic = _chunkX4Y76AIMjs.initSchematic;
@@ -2,14 +2,14 @@ import "./chunk-3J7KBHMJ.mjs";
2
2
  import {
3
3
  applicationGenerator,
4
4
  applicationSchematic
5
- } from "./chunk-YNJJF3XM.mjs";
5
+ } from "./chunk-H4XWGL24.mjs";
6
6
  import {
7
7
  initGenerator,
8
8
  initSchematic
9
- } from "./chunk-N4KJP2OA.mjs";
10
- import "./chunk-QQJ225UZ.mjs";
11
- import "./chunk-DEJ5S46A.mjs";
12
- import "./chunk-TLFPZXKG.mjs";
9
+ } from "./chunk-YJOYATEB.mjs";
10
+ import "./chunk-GPAI4NHQ.mjs";
11
+ import "./chunk-MV24QW26.mjs";
12
+ import "./chunk-QQ22YQSB.mjs";
13
13
  export {
14
14
  applicationGenerator,
15
15
  applicationSchematic,