@storm-software/cloudflare-tools 0.71.255 → 0.71.257
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 +16 -0
- package/README.md +1 -1
- package/dist/{chunk-UVPBKTDG.js → chunk-4V37S5HC.js} +2 -2
- package/dist/{chunk-7FTHWJIB.mjs → chunk-E47DEC3W.mjs} +1 -1
- package/dist/{chunk-PCPYMSGV.js → chunk-II4YUON2.js} +1 -1
- package/dist/{chunk-H3ZX7RCJ.mjs → chunk-K2KQX6RS.mjs} +2 -2
- package/dist/{chunk-JSQ2BIQN.mjs → chunk-LQZENPD6.mjs} +1 -1
- package/dist/{chunk-MAJWVBTD.js → chunk-PNQZODVX.js} +0 -3
- package/dist/{chunk-JEUXOLBS.mjs → chunk-RSJXEHWF.mjs} +2 -2
- package/dist/{chunk-AZJWIQSS.mjs → chunk-T37YMQG6.mjs} +2 -5
- package/dist/executors.js +1 -1
- package/dist/executors.mjs +3 -3
- package/dist/generators.js +3 -3
- package/dist/generators.mjs +3 -3
- package/dist/index.js +4 -4
- package/dist/index.mjs +5 -5
- package/dist/src/executors/cloudflare-publish/executor.js +1 -1
- package/dist/src/executors/cloudflare-publish/executor.mjs +3 -3
- package/dist/src/executors/r2-upload-publish/executor.mjs +1 -1
- package/dist/src/executors/r2-upload-publish/untyped.mjs +1 -1
- package/dist/src/executors/serve/executor.js +2 -2
- package/dist/src/executors/serve/executor.mjs +2 -2
- package/dist/src/generators/init/generator.js +2 -2
- package/dist/src/generators/init/generator.mjs +2 -2
- package/dist/src/generators/worker/generator.js +3 -3
- package/dist/src/generators/worker/generator.mjs +3 -3
- package/dist/src/plugins/index.mjs +1 -1
- package/dist/src/utils/http-handler.mjs +1 -1
- package/dist/src/utils/index.mjs +1 -1
- package/dist/src/utils/r2-bucket-helpers.mjs +1 -1
- package/package.json +7 -7
- package/dist/chunk-EVPKAKX4.mjs +0 -269
- package/dist/chunk-GF7RYBU5.js +0 -70
- package/dist/chunk-SN3DR4IW.mjs +0 -70
- package/dist/chunk-T2SZ6X5Y.js +0 -266
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Storm Ops - Cloudflare Tools
|
|
4
4
|
|
|
5
|
+
## [0.71.256](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.71.256) (08/05/2026)
|
|
6
|
+
|
|
7
|
+
### Miscellaneous
|
|
8
|
+
|
|
9
|
+
- **monorepo:** Update workspace's lockfile ([8d9825be1](https://github.com/storm-software/storm-ops/commit/8d9825be1))
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
- **eslint:** Resolve issue with invalid dependency versions ([9813a20e4](https://github.com/storm-software/storm-ops/commit/9813a20e4))
|
|
14
|
+
|
|
15
|
+
### Updated Dependencies
|
|
16
|
+
|
|
17
|
+
- Updated **config** to **v1.138.50**
|
|
18
|
+
- Updated **config-tools** to **v1.190.113**
|
|
19
|
+
- Updated **workspace-tools** to **v1.296.93**
|
|
20
|
+
|
|
5
21
|
## [0.71.255](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.71.255) (08/05/2026)
|
|
6
22
|
|
|
7
23
|
### 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
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
31
31
|
|
|
32
32
|
<!-- prettier-ignore-start -->
|
|
33
33
|
<!-- markdownlint-disable -->
|
|
@@ -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
|
|
3
|
+
var _chunkII4YUON2js = require('./chunk-II4YUON2.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -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
|
|
73
|
+
await _chunkII4YUON2js.generator_default.call(void 0, tree, {
|
|
74
74
|
...options,
|
|
75
75
|
skipFormat: true
|
|
76
76
|
})
|
|
@@ -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=
|
|
12
|
+
// ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=a9def7e06ce25c19654987ab91979289197bf4d3e7e124c514a4487c3e8d68c6__940a00b2ad0016288753ef187c7a0d65/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);
|
|
@@ -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.71.
|
|
10
|
+
version: "0.71.256",
|
|
11
11
|
private: false,
|
|
12
12
|
description: "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
|
|
13
13
|
keywords: [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generator_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RSJXEHWF.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-
|
|
19
|
+
} from "./chunk-E47DEC3W.mjs";
|
|
20
20
|
|
|
21
21
|
// src/generators/worker/generator.ts
|
|
22
22
|
import {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__commonJS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-E47DEC3W.mjs";
|
|
4
4
|
|
|
5
5
|
// package.json
|
|
6
6
|
var require_package = __commonJS({
|
|
7
7
|
"package.json"(exports, module) {
|
|
8
8
|
module.exports = {
|
|
9
9
|
name: "@storm-software/cloudflare-tools",
|
|
10
|
-
version: "0.71.
|
|
10
|
+
version: "0.71.256",
|
|
11
11
|
private: false,
|
|
12
12
|
description: "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
|
|
13
13
|
keywords: [
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
} from "./chunk-K4H5ZMYA.mjs";
|
|
31
31
|
import {
|
|
32
32
|
__dirname
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-E47DEC3W.mjs";
|
|
34
34
|
|
|
35
35
|
// ../config-tools/src/utilities/apply-workspace-tokens.ts
|
|
36
36
|
var applyWorkspaceBaseTokens = async (option, tokenParams) => {
|
|
@@ -979,10 +979,7 @@ import { existsSync as existsSync2 } from "node:fs";
|
|
|
979
979
|
import { readFile as readFile4 } from "node:fs/promises";
|
|
980
980
|
|
|
981
981
|
// ../build-tools/src/utilities/task-graph.ts
|
|
982
|
-
import {
|
|
983
|
-
createTaskGraph,
|
|
984
|
-
mapTargetDefaultsToDependencies
|
|
985
|
-
} from "nx/src/tasks-runner/create-task-graph";
|
|
982
|
+
import { createTaskGraph } from "nx/src/tasks-runner/create-task-graph";
|
|
986
983
|
|
|
987
984
|
// ../tsdown/src/build.ts
|
|
988
985
|
import defu2 from "defu";
|
package/dist/executors.js
CHANGED
|
@@ -3,7 +3,7 @@ require('./chunk-FLA2SYPV.js');
|
|
|
3
3
|
require('./chunk-KUGEZPUO.js');
|
|
4
4
|
require('./chunk-CLCKX6UN.js');
|
|
5
5
|
require('./chunk-HNDXHX7M.js');
|
|
6
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-PNQZODVX.js');
|
|
7
7
|
require('./chunk-NCVDTA5M.js');
|
|
8
8
|
require('./chunk-YRUROEEP.js');
|
|
9
9
|
require('./chunk-FBLD25X4.js');
|
package/dist/executors.mjs
CHANGED
|
@@ -2,10 +2,10 @@ import "./chunk-YSCEY447.mjs";
|
|
|
2
2
|
import "./chunk-WTWLKDV7.mjs";
|
|
3
3
|
import "./chunk-SWYYMID7.mjs";
|
|
4
4
|
import "./chunk-BY7MA3SM.mjs";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-LQZENPD6.mjs";
|
|
6
|
+
import "./chunk-T37YMQG6.mjs";
|
|
7
7
|
import "./chunk-ZXLMDNFQ.mjs";
|
|
8
8
|
import "./chunk-BJQFVPGK.mjs";
|
|
9
9
|
import "./chunk-CSTZEHUP.mjs";
|
|
10
10
|
import "./chunk-K4H5ZMYA.mjs";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-E47DEC3W.mjs";
|
package/dist/generators.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk4V37S5HCjs = require('./chunk-4V37S5HC.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkII4YUON2js = require('./chunk-II4YUON2.js');
|
|
10
10
|
require('./chunk-YRUROEEP.js');
|
|
11
11
|
require('./chunk-AWKQRM2H.js');
|
|
12
12
|
require('./chunk-MCKGQKYU.js');
|
|
@@ -15,4 +15,4 @@ require('./chunk-MCKGQKYU.js');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
exports.applicationGenerator =
|
|
18
|
+
exports.applicationGenerator = _chunk4V37S5HCjs.applicationGenerator; exports.applicationSchematic = _chunk4V37S5HCjs.applicationSchematic; exports.initGenerator = _chunkII4YUON2js.initGenerator; exports.initSchematic = _chunkII4YUON2js.initSchematic;
|
package/dist/generators.mjs
CHANGED
|
@@ -2,14 +2,14 @@ import "./chunk-3J7KBHMJ.mjs";
|
|
|
2
2
|
import {
|
|
3
3
|
applicationGenerator,
|
|
4
4
|
applicationSchematic
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-K2KQX6RS.mjs";
|
|
6
6
|
import {
|
|
7
7
|
initGenerator,
|
|
8
8
|
initSchematic
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RSJXEHWF.mjs";
|
|
10
10
|
import "./chunk-BJQFVPGK.mjs";
|
|
11
11
|
import "./chunk-K4H5ZMYA.mjs";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-E47DEC3W.mjs";
|
|
13
13
|
export {
|
|
14
14
|
applicationGenerator,
|
|
15
15
|
applicationSchematic,
|
package/dist/index.js
CHANGED
|
@@ -4,11 +4,11 @@ require('./chunk-DHBG5ASJ.js');
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk4V37S5HCjs = require('./chunk-4V37S5HC.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkII4YUON2js = require('./chunk-II4YUON2.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -22,7 +22,7 @@ require('./chunk-CVGPWUNP.js');
|
|
|
22
22
|
|
|
23
23
|
var _chunkCLCKX6UNjs = require('./chunk-CLCKX6UN.js');
|
|
24
24
|
require('./chunk-HNDXHX7M.js');
|
|
25
|
-
require('./chunk-
|
|
25
|
+
require('./chunk-PNQZODVX.js');
|
|
26
26
|
require('./chunk-NCVDTA5M.js');
|
|
27
27
|
require('./chunk-YRUROEEP.js');
|
|
28
28
|
require('./chunk-FBLD25X4.js');
|
|
@@ -39,4 +39,4 @@ require('./chunk-MCKGQKYU.js');
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
exports.applicationGenerator =
|
|
42
|
+
exports.applicationGenerator = _chunk4V37S5HCjs.applicationGenerator; exports.applicationSchematic = _chunk4V37S5HCjs.applicationSchematic; exports.createNodesV2 = _chunkVJLWHQ5Bjs.createNodesV2; exports.getEncoding = _chunkCLCKX6UNjs.getEncoding; exports.getInternalDependencies = _chunkCLCKX6UNjs.getInternalDependencies; exports.initGenerator = _chunkII4YUON2js.initGenerator; exports.initSchematic = _chunkII4YUON2js.initSchematic; exports.isTextFile = _chunkCLCKX6UNjs.isTextFile; exports.name = _chunkVJLWHQ5Bjs.name; exports.uploadFile = _chunkCLCKX6UNjs.uploadFile;
|
package/dist/index.mjs
CHANGED
|
@@ -4,11 +4,11 @@ import "./chunk-3J7KBHMJ.mjs";
|
|
|
4
4
|
import {
|
|
5
5
|
applicationGenerator,
|
|
6
6
|
applicationSchematic
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-K2KQX6RS.mjs";
|
|
8
8
|
import {
|
|
9
9
|
initGenerator,
|
|
10
10
|
initSchematic
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RSJXEHWF.mjs";
|
|
12
12
|
import {
|
|
13
13
|
createNodesV2,
|
|
14
14
|
name
|
|
@@ -21,13 +21,13 @@ import {
|
|
|
21
21
|
isTextFile,
|
|
22
22
|
uploadFile
|
|
23
23
|
} from "./chunk-BY7MA3SM.mjs";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-LQZENPD6.mjs";
|
|
25
|
+
import "./chunk-T37YMQG6.mjs";
|
|
26
26
|
import "./chunk-ZXLMDNFQ.mjs";
|
|
27
27
|
import "./chunk-BJQFVPGK.mjs";
|
|
28
28
|
import "./chunk-CSTZEHUP.mjs";
|
|
29
29
|
import "./chunk-K4H5ZMYA.mjs";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-E47DEC3W.mjs";
|
|
31
31
|
export {
|
|
32
32
|
applicationGenerator,
|
|
33
33
|
applicationSchematic,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
var _chunkHNDXHX7Mjs = require('../../../chunk-HNDXHX7M.js');
|
|
4
|
-
require('../../../chunk-
|
|
4
|
+
require('../../../chunk-PNQZODVX.js');
|
|
5
5
|
require('../../../chunk-NCVDTA5M.js');
|
|
6
6
|
require('../../../chunk-YRUROEEP.js');
|
|
7
7
|
require('../../../chunk-FBLD25X4.js');
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runExecutor
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import "../../../chunk-
|
|
3
|
+
} from "../../../chunk-LQZENPD6.mjs";
|
|
4
|
+
import "../../../chunk-T37YMQG6.mjs";
|
|
5
5
|
import "../../../chunk-ZXLMDNFQ.mjs";
|
|
6
6
|
import "../../../chunk-BJQFVPGK.mjs";
|
|
7
7
|
import "../../../chunk-CSTZEHUP.mjs";
|
|
8
8
|
import "../../../chunk-K4H5ZMYA.mjs";
|
|
9
|
-
import "../../../chunk-
|
|
9
|
+
import "../../../chunk-E47DEC3W.mjs";
|
|
10
10
|
export {
|
|
11
11
|
runExecutor as default
|
|
12
12
|
};
|
|
@@ -7,7 +7,7 @@ import "../../../chunk-ZXLMDNFQ.mjs";
|
|
|
7
7
|
import "../../../chunk-BJQFVPGK.mjs";
|
|
8
8
|
import "../../../chunk-CSTZEHUP.mjs";
|
|
9
9
|
import "../../../chunk-K4H5ZMYA.mjs";
|
|
10
|
-
import "../../../chunk-
|
|
10
|
+
import "../../../chunk-E47DEC3W.mjs";
|
|
11
11
|
export {
|
|
12
12
|
runExecutor as default
|
|
13
13
|
};
|
|
@@ -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
|
|
3
|
+
var _chunkPNQZODVXjs = require('../../../chunk-PNQZODVX.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkNCVDTA5Mjs = require('../../../chunk-NCVDTA5M.js');
|
|
@@ -56,7 +56,7 @@ async function* serveExecutor(options, context) {
|
|
|
56
56
|
success: true
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
var executor_default =
|
|
59
|
+
var executor_default = _chunkPNQZODVXjs.withRunExecutor.call(void 0,
|
|
60
60
|
"Cloudflare Serve executor",
|
|
61
61
|
serveExecutor,
|
|
62
62
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
withRunExecutor
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-T37YMQG6.mjs";
|
|
4
4
|
import {
|
|
5
5
|
createCliOptions
|
|
6
6
|
} from "../../../chunk-ZXLMDNFQ.mjs";
|
|
@@ -9,7 +9,7 @@ import "../../../chunk-CSTZEHUP.mjs";
|
|
|
9
9
|
import "../../../chunk-K4H5ZMYA.mjs";
|
|
10
10
|
import {
|
|
11
11
|
__require
|
|
12
|
-
} from "../../../chunk-
|
|
12
|
+
} from "../../../chunk-E47DEC3W.mjs";
|
|
13
13
|
|
|
14
14
|
// src/executors/serve/executor.ts
|
|
15
15
|
import { createAsyncIterable } from "@nx/devkit/internal";
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkII4YUON2js = require('../../../chunk-II4YUON2.js');
|
|
6
6
|
require('../../../chunk-MCKGQKYU.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.default =
|
|
11
|
+
exports.default = _chunkII4YUON2js.generator_default; exports.initGenerator = _chunkII4YUON2js.initGenerator; exports.initSchematic = _chunkII4YUON2js.initSchematic;
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
generator_default,
|
|
3
3
|
initGenerator,
|
|
4
4
|
initSchematic
|
|
5
|
-
} from "../../../chunk-
|
|
6
|
-
import "../../../chunk-
|
|
5
|
+
} from "../../../chunk-RSJXEHWF.mjs";
|
|
6
|
+
import "../../../chunk-E47DEC3W.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
|
|
6
|
-
require('../../../chunk-
|
|
5
|
+
var _chunk4V37S5HCjs = require('../../../chunk-4V37S5HC.js');
|
|
6
|
+
require('../../../chunk-II4YUON2.js');
|
|
7
7
|
require('../../../chunk-YRUROEEP.js');
|
|
8
8
|
require('../../../chunk-AWKQRM2H.js');
|
|
9
9
|
require('../../../chunk-MCKGQKYU.js');
|
|
@@ -11,4 +11,4 @@ require('../../../chunk-MCKGQKYU.js');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
exports.applicationGenerator =
|
|
14
|
+
exports.applicationGenerator = _chunk4V37S5HCjs.applicationGenerator; exports.applicationSchematic = _chunk4V37S5HCjs.applicationSchematic; exports.default = _chunk4V37S5HCjs.generator_default;
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
applicationGenerator,
|
|
3
3
|
applicationSchematic,
|
|
4
4
|
generator_default
|
|
5
|
-
} from "../../../chunk-
|
|
6
|
-
import "../../../chunk-
|
|
5
|
+
} from "../../../chunk-K2KQX6RS.mjs";
|
|
6
|
+
import "../../../chunk-RSJXEHWF.mjs";
|
|
7
7
|
import "../../../chunk-BJQFVPGK.mjs";
|
|
8
8
|
import "../../../chunk-K4H5ZMYA.mjs";
|
|
9
|
-
import "../../../chunk-
|
|
9
|
+
import "../../../chunk-E47DEC3W.mjs";
|
|
10
10
|
export {
|
|
11
11
|
applicationGenerator,
|
|
12
12
|
applicationSchematic,
|
package/dist/src/utils/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/cloudflare-tools",
|
|
3
|
-
"version": "0.71.
|
|
3
|
+
"version": "0.71.257",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
|
|
6
6
|
"keywords": [
|
|
@@ -144,21 +144,21 @@
|
|
|
144
144
|
"@aws-sdk/client-s3": "^3.1103.0",
|
|
145
145
|
"@aws-sdk/lib-storage": "^3.1103.0",
|
|
146
146
|
"@smithy/node-http-handler": "^4.9.13",
|
|
147
|
-
"@storm-software/config": "
|
|
148
|
-
"@storm-software/config-tools": "
|
|
149
|
-
"@storm-software/workspace-tools": "
|
|
147
|
+
"@storm-software/config": "1.138.51",
|
|
148
|
+
"@storm-software/config-tools": "1.190.114",
|
|
149
|
+
"@storm-software/workspace-tools": "1.296.94",
|
|
150
150
|
"defu": "^6.1.7",
|
|
151
151
|
"glob": "^11.1.0",
|
|
152
152
|
"mime-types": "^3.0.2",
|
|
153
153
|
"pretty-bytes": "^7.1.1"
|
|
154
154
|
},
|
|
155
155
|
"devDependencies": {
|
|
156
|
-
"@nx/devkit": "23.
|
|
156
|
+
"@nx/devkit": "23.1.1",
|
|
157
157
|
"@nx/node": "22.7.5",
|
|
158
158
|
"@nx/web": "22.7.5",
|
|
159
159
|
"@nx/webpack": "22.7.5",
|
|
160
160
|
"@smithy/protocol-http": "^5.5.16",
|
|
161
|
-
"nx": "23.
|
|
161
|
+
"nx": "23.1.1",
|
|
162
162
|
"tsup": "8.4.0",
|
|
163
163
|
"untyped": "^2.0.0",
|
|
164
164
|
"wrangler": "^4.118.0"
|
|
@@ -171,5 +171,5 @@
|
|
|
171
171
|
"publishConfig": { "access": "public" },
|
|
172
172
|
"executors": "./executors.json",
|
|
173
173
|
"generators": "./generators.json",
|
|
174
|
-
"gitHead": "
|
|
174
|
+
"gitHead": "37e2a4dcb02f87727a9de4428f910ba4d9c4524f"
|
|
175
175
|
}
|
package/dist/chunk-EVPKAKX4.mjs
DELETED
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
generator_default
|
|
3
|
-
} from "./chunk-JEUXOLBS.mjs";
|
|
4
|
-
import {
|
|
5
|
-
findWorkspaceRoot,
|
|
6
|
-
getConfig
|
|
7
|
-
} from "./chunk-BJQFVPGK.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-7FTHWJIB.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
|
-
};
|
package/dist/chunk-GF7RYBU5.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
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.255", 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.1103.0", "@aws-sdk/lib-storage": "^3.1103.0", "@smithy/node-http-handler": "^4.9.13", "@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.1" }, devDependencies: { "@nx/devkit": "catalog:", "@nx/node": "catalog:", "@nx/web": "catalog:", "@nx/webpack": "catalog:", "@smithy/protocol-http": "^5.5.16", nx: "catalog:", tsup: "catalog:", untyped: "catalog:", wrangler: "^4.118.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;
|
package/dist/chunk-SN3DR4IW.mjs
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__commonJS
|
|
3
|
-
} from "./chunk-7FTHWJIB.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.255", 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.1103.0", "@aws-sdk/lib-storage": "^3.1103.0", "@smithy/node-http-handler": "^4.9.13", "@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.1" }, devDependencies: { "@nx/devkit": "catalog:", "@nx/node": "catalog:", "@nx/web": "catalog:", "@nx/webpack": "catalog:", "@smithy/protocol-http": "^5.5.16", nx: "catalog:", tsup: "catalog:", untyped: "catalog:", wrangler: "^4.118.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
|
-
};
|
package/dist/chunk-T2SZ6X5Y.js
DELETED
|
@@ -1,266 +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 _chunkPCPYMSGVjs = require('./chunk-PCPYMSGV.js');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var _chunkYRUROEEPjs = require('./chunk-YRUROEEP.js');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var _chunkAWKQRM2Hjs = require('./chunk-AWKQRM2H.js');
|
|
17
|
-
|
|
18
|
-
// src/generators/worker/generator.ts
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
var _devkit = require('@nx/devkit');
|
|
31
|
-
var _internal = require('@nx/devkit/internal');
|
|
32
|
-
var _node = require('@nx/node');
|
|
33
|
-
var _versions = require('@nx/node/src/utils/versions');
|
|
34
|
-
var _path = require('path');
|
|
35
|
-
|
|
36
|
-
// src/generators/worker/libs/get-account-id.ts
|
|
37
|
-
function getAccountId(accountId) {
|
|
38
|
-
return `account_id = "${accountId}"`;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// src/generators/worker/libs/vitest-imports.ts
|
|
42
|
-
var vitestImports = `import { describe, expect, it, beforeAll, afterAll } from 'vitest';`;
|
|
43
|
-
|
|
44
|
-
// src/generators/worker/libs/vitest-script.ts
|
|
45
|
-
var vitestScript = `"test": "vitest run"`;
|
|
46
|
-
|
|
47
|
-
// src/generators/worker/generator.ts
|
|
48
|
-
async function applicationGenerator(tree, schema) {
|
|
49
|
-
const stopwatch = _chunkAWKQRM2Hjs.getStopwatch.call(void 0, "Storm Worker generator");
|
|
50
|
-
let config;
|
|
51
|
-
try {
|
|
52
|
-
const workspaceRoot = _chunkYRUROEEPjs.findWorkspaceRoot.call(void 0, );
|
|
53
|
-
config = await _chunkYRUROEEPjs.getConfig.call(void 0, workspaceRoot);
|
|
54
|
-
_chunkAWKQRM2Hjs.writeInfo.call(void 0,
|
|
55
|
-
`${_chunkAWKQRM2Hjs.brandIcon.call(void 0, config)} Running the Storm Worker generator...
|
|
56
|
-
|
|
57
|
-
`,
|
|
58
|
-
config
|
|
59
|
-
);
|
|
60
|
-
_chunkAWKQRM2Hjs.writeDebug.call(void 0,
|
|
61
|
-
`Loading the Storm Config from environment variables and storm.json file...
|
|
62
|
-
- workspaceRoot: ${workspaceRoot}`,
|
|
63
|
-
config
|
|
64
|
-
);
|
|
65
|
-
_chunkAWKQRM2Hjs.writeTrace.call(void 0,
|
|
66
|
-
`Loaded Storm config into env:
|
|
67
|
-
${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`,
|
|
68
|
-
config
|
|
69
|
-
);
|
|
70
|
-
const options = await normalizeOptions(tree, schema, config);
|
|
71
|
-
const tasks = [];
|
|
72
|
-
tasks.push(
|
|
73
|
-
await _chunkPCPYMSGVjs.generator_default.call(void 0, tree, {
|
|
74
|
-
...options,
|
|
75
|
-
skipFormat: true
|
|
76
|
-
})
|
|
77
|
-
);
|
|
78
|
-
tasks.push(
|
|
79
|
-
await _node.applicationGenerator.call(void 0, tree, {
|
|
80
|
-
...options,
|
|
81
|
-
framework: "none",
|
|
82
|
-
skipFormat: true,
|
|
83
|
-
unitTestRunner: options.unitTestRunner == "vitest" ? "none" : options.unitTestRunner,
|
|
84
|
-
e2eTestRunner: "none",
|
|
85
|
-
name: schema.name
|
|
86
|
-
})
|
|
87
|
-
);
|
|
88
|
-
if (options.unitTestRunner === "vitest") {
|
|
89
|
-
const { vitestGenerator, createOrEditViteConfig } = _devkit.ensurePackage.call(void 0,
|
|
90
|
-
"@nx/vite",
|
|
91
|
-
_versions.nxVersion
|
|
92
|
-
);
|
|
93
|
-
const vitestTask = await vitestGenerator(tree, {
|
|
94
|
-
project: options.name,
|
|
95
|
-
uiFramework: "none",
|
|
96
|
-
coverageProvider: "v8",
|
|
97
|
-
skipFormat: true,
|
|
98
|
-
testEnvironment: "node"
|
|
99
|
-
});
|
|
100
|
-
tasks.push(vitestTask);
|
|
101
|
-
createOrEditViteConfig(
|
|
102
|
-
tree,
|
|
103
|
-
{
|
|
104
|
-
project: options.name,
|
|
105
|
-
includeLib: false,
|
|
106
|
-
includeVitest: true,
|
|
107
|
-
testEnvironment: "node"
|
|
108
|
-
},
|
|
109
|
-
true
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
addCloudflareFiles(tree, options);
|
|
113
|
-
updateTsAppConfig(tree, options);
|
|
114
|
-
addTargets(tree, options);
|
|
115
|
-
if (options.unitTestRunner === "none") {
|
|
116
|
-
removeTestFiles(tree, options);
|
|
117
|
-
}
|
|
118
|
-
if (!options.skipFormat) {
|
|
119
|
-
await _devkit.formatFiles.call(void 0, tree);
|
|
120
|
-
}
|
|
121
|
-
if (options.template === "hono") {
|
|
122
|
-
tasks.push(() => {
|
|
123
|
-
const packageJsonPath = _devkit.joinPathFragments.call(void 0,
|
|
124
|
-
_nullishCoalesce(options.directory, () => ( "")),
|
|
125
|
-
"package.json"
|
|
126
|
-
);
|
|
127
|
-
if (tree.exists(packageJsonPath)) {
|
|
128
|
-
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => ({
|
|
129
|
-
...json,
|
|
130
|
-
dependencies: {
|
|
131
|
-
hono: "4.4.0",
|
|
132
|
-
..._optionalChain([json, 'optionalAccess', _ => _.dependencies])
|
|
133
|
-
}
|
|
134
|
-
}));
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
return _devkit.runTasksInSerial.call(void 0, ...tasks);
|
|
139
|
-
} catch (error) {
|
|
140
|
-
return () => {
|
|
141
|
-
_chunkAWKQRM2Hjs.writeFatal.call(void 0,
|
|
142
|
-
"A fatal error occurred while running the generator - the process was forced to terminate",
|
|
143
|
-
config
|
|
144
|
-
);
|
|
145
|
-
_chunkAWKQRM2Hjs.writeError.call(void 0,
|
|
146
|
-
`An exception was thrown in the generator's process
|
|
147
|
-
- Details: ${error.message}
|
|
148
|
-
- Stacktrace: ${error.stack}`,
|
|
149
|
-
config
|
|
150
|
-
);
|
|
151
|
-
};
|
|
152
|
-
} finally {
|
|
153
|
-
stopwatch();
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
function updateTsAppConfig(tree, options) {
|
|
157
|
-
_devkit.updateJson.call(void 0, tree, _path.join.call(void 0, options.appProjectRoot, "tsconfig.app.json"), (json) => {
|
|
158
|
-
json.compilerOptions = {
|
|
159
|
-
...json.compilerOptions,
|
|
160
|
-
esModuleInterop: true,
|
|
161
|
-
target: "es2021",
|
|
162
|
-
lib: ["es2021"],
|
|
163
|
-
module: "es2022",
|
|
164
|
-
moduleResolution: "node",
|
|
165
|
-
resolveJsonModule: true,
|
|
166
|
-
allowJs: true,
|
|
167
|
-
checkJs: false,
|
|
168
|
-
noEmit: true,
|
|
169
|
-
isolatedModules: true,
|
|
170
|
-
allowSyntheticDefaultImports: true,
|
|
171
|
-
forceConsistentCasingInFileNames: true,
|
|
172
|
-
strict: true,
|
|
173
|
-
skipLibCheck: true
|
|
174
|
-
};
|
|
175
|
-
json.compilerOptions.types = [
|
|
176
|
-
...json.compilerOptions.types,
|
|
177
|
-
"@cloudflare/workers-types"
|
|
178
|
-
];
|
|
179
|
-
return json;
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
function addCloudflareFiles(tree, options) {
|
|
183
|
-
tree.delete(_path.join.call(void 0, options.appProjectRoot, "src/main.ts"));
|
|
184
|
-
_devkit.generateFiles.call(void 0,
|
|
185
|
-
tree,
|
|
186
|
-
_path.join.call(void 0, __dirname, "./files/common"),
|
|
187
|
-
options.appProjectRoot,
|
|
188
|
-
{
|
|
189
|
-
...options,
|
|
190
|
-
tmpl: "",
|
|
191
|
-
name: options.name,
|
|
192
|
-
accountId: options.accountId ? getAccountId(options.accountId) : "",
|
|
193
|
-
vitestScript: options.unitTestRunner === "vitest" ? vitestScript : ""
|
|
194
|
-
}
|
|
195
|
-
);
|
|
196
|
-
if (options.template && options.template !== "none") {
|
|
197
|
-
_devkit.generateFiles.call(void 0,
|
|
198
|
-
tree,
|
|
199
|
-
_path.join.call(void 0, __dirname, `./files/${options.template}`),
|
|
200
|
-
_path.join.call(void 0, options.appProjectRoot, "src"),
|
|
201
|
-
{
|
|
202
|
-
...options,
|
|
203
|
-
tmpl: "",
|
|
204
|
-
name: options.name,
|
|
205
|
-
accountId: options.accountId ? getAccountId(options.accountId) : "",
|
|
206
|
-
vitestScript: options.unitTestRunner === "vitest" ? vitestScript : "",
|
|
207
|
-
vitestImports: options.unitTestRunner === "vitest" ? vitestImports : ""
|
|
208
|
-
}
|
|
209
|
-
);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
function addTargets(tree, options) {
|
|
213
|
-
try {
|
|
214
|
-
const projectConfiguration = _devkit.readProjectConfiguration.call(void 0, tree, options.name);
|
|
215
|
-
projectConfiguration.targets = {
|
|
216
|
-
..._nullishCoalesce(projectConfiguration.targets, () => ( {})),
|
|
217
|
-
serve: {
|
|
218
|
-
executor: "@storm-software/cloudflare-tools:serve",
|
|
219
|
-
options: {
|
|
220
|
-
port: options.port
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
"nx-release-publish": {
|
|
224
|
-
executor: "@storm-software/cloudflare-tools:cloudflare-publish"
|
|
225
|
-
}
|
|
226
|
-
};
|
|
227
|
-
if (projectConfiguration.targets.build) {
|
|
228
|
-
delete projectConfiguration.targets.build;
|
|
229
|
-
}
|
|
230
|
-
_devkit.updateProjectConfiguration.call(void 0, tree, options.name, projectConfiguration);
|
|
231
|
-
} catch (e) {
|
|
232
|
-
console.error(e);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
function removeTestFiles(tree, options) {
|
|
236
|
-
tree.delete(_path.join.call(void 0, options.appProjectRoot, "src", "index.test.ts"));
|
|
237
|
-
}
|
|
238
|
-
async function normalizeOptions(host, options, config) {
|
|
239
|
-
const { projectName: appProjectName, projectRoot: appProjectRoot } = await _internal.determineProjectNameAndRootOptions.call(void 0, host, {
|
|
240
|
-
name: options.name,
|
|
241
|
-
projectType: "application",
|
|
242
|
-
directory: options.directory,
|
|
243
|
-
rootProject: options.rootProject
|
|
244
|
-
});
|
|
245
|
-
options.rootProject = appProjectRoot === ".";
|
|
246
|
-
return {
|
|
247
|
-
addPlugin: process.env.NX_ADD_PLUGINS !== "false",
|
|
248
|
-
accountId: process.env.STORM_BOT_CLOUDFLARE_ACCOUNT,
|
|
249
|
-
...options,
|
|
250
|
-
name: _devkit.names.call(void 0, appProjectName).fileName,
|
|
251
|
-
frontendProject: options.frontendProject ? _devkit.names.call(void 0, options.frontendProject).fileName : void 0,
|
|
252
|
-
appProjectRoot,
|
|
253
|
-
unitTestRunner: _nullishCoalesce(options.unitTestRunner, () => ( "vitest")),
|
|
254
|
-
rootProject: _nullishCoalesce(options.rootProject, () => ( false)),
|
|
255
|
-
template: _nullishCoalesce(options.template, () => ( "fetch-handler")),
|
|
256
|
-
port: _nullishCoalesce(options.port, () => ( 3e3))
|
|
257
|
-
};
|
|
258
|
-
}
|
|
259
|
-
var generator_default2 = applicationGenerator;
|
|
260
|
-
var applicationSchematic = _devkit.convertNxGenerator.call(void 0, applicationGenerator);
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
exports.applicationGenerator = applicationGenerator; exports.generator_default = generator_default2; exports.applicationSchematic = applicationSchematic;
|