@storm-software/cloudflare-tools 0.55.44 → 0.55.46
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 +14 -0
- package/README.md +1 -1
- package/dist/{chunk-75BWJSFW.mjs → chunk-2P5TGL2R.mjs} +10 -2
- package/dist/{chunk-FVMS7RMT.mjs → chunk-37HC2CC6.mjs} +3 -3
- package/dist/{chunk-MIKH2FI5.mjs → chunk-7JTISIUD.mjs} +1 -1
- package/dist/{chunk-CAC2PNUJ.js → chunk-CWBI7ZQ2.js} +16 -16
- package/dist/{chunk-JUJW77CM.js → chunk-FUMCGABO.js} +12 -12
- package/dist/{chunk-ISO7UOVA.js → chunk-GZJSLTK4.js} +247 -226
- package/dist/{chunk-LY3NUGLI.mjs → chunk-HD246TI3.mjs} +88 -67
- package/dist/{chunk-TTDB2VCO.mjs → chunk-PHH7TIFK.mjs} +1 -1
- package/dist/{chunk-HWJBDRIG.js → chunk-QQQD2SIN.js} +9 -1
- package/dist/{chunk-AXF5C7QR.js → chunk-S5NUDAJR.js} +3 -3
- package/dist/{chunk-STUGKRS5.mjs → chunk-WTERMAUR.mjs} +3 -3
- package/dist/{chunk-R2SQ6ZOK.mjs → chunk-YBYGEO5L.mjs} +9 -1
- package/dist/{chunk-TDNPRL4Y.js → chunk-Z3WJNLJW.js} +1 -1
- package/dist/{chunk-R32N7B24.js → chunk-Z5XL2UL5.js} +50 -42
- package/dist/executors.js +5 -5
- package/dist/executors.mjs +5 -5
- package/dist/generators.js +5 -5
- package/dist/generators.mjs +4 -4
- package/dist/index.js +8 -8
- package/dist/index.mjs +7 -7
- package/dist/src/executors/cloudflare-publish/executor.js +3 -3
- package/dist/src/executors/cloudflare-publish/executor.mjs +3 -3
- package/dist/src/executors/r2-upload-publish/executor.js +5 -5
- package/dist/src/executors/r2-upload-publish/executor.mjs +4 -4
- package/dist/src/executors/serve/executor.d.mts +20 -2
- package/dist/src/executors/serve/executor.d.ts +20 -2
- package/dist/src/executors/serve/executor.js +4 -4
- package/dist/src/executors/serve/executor.mjs +3 -3
- package/dist/src/generators/init/generator.js +2 -2
- package/dist/src/generators/init/generator.mjs +1 -1
- package/dist/src/generators/worker/generator.js +5 -5
- package/dist/src/generators/worker/generator.mjs +4 -4
- package/dist/src/utils/index.js +3 -3
- package/dist/src/utils/index.mjs +2 -2
- package/dist/src/utils/r2-bucket-helpers.js +3 -3
- package/dist/src/utils/r2-bucket-helpers.mjs +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Storm Ops - Cloudflare Tools
|
|
4
4
|
|
|
5
|
+
## [0.55.46](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.55.46) (2025-04-07)
|
|
6
|
+
|
|
7
|
+
### Miscellaneous
|
|
8
|
+
|
|
9
|
+
- **monorepo:** Regenerate README markdown files
|
|
10
|
+
([1ac4c6ad4](https://github.com/storm-software/storm-ops/commit/1ac4c6ad4))
|
|
11
|
+
|
|
12
|
+
## [0.55.45](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.55.45) (2025-04-04)
|
|
13
|
+
|
|
14
|
+
### Miscellaneous
|
|
15
|
+
|
|
16
|
+
- **monorepo:** Regenerate README markdown files
|
|
17
|
+
([30c679ec1](https://github.com/storm-software/storm-ops/commit/30c679ec1))
|
|
18
|
+
|
|
5
19
|
## [0.55.44](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.55.44) (2025-04-02)
|
|
6
20
|
|
|
7
21
|
### 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
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
stormWorkspaceConfigSchema,
|
|
15
15
|
writeTrace,
|
|
16
16
|
writeWarning
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-YBYGEO5L.mjs";
|
|
18
18
|
import {
|
|
19
19
|
__name
|
|
20
20
|
} from "./chunk-3HMZSKJD.mjs";
|
|
@@ -111,6 +111,10 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
|
111
111
|
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
112
112
|
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
113
113
|
},
|
|
114
|
+
error: {
|
|
115
|
+
codesFile: process.env[`${prefix}ERROR_CODES_FILE`] || void 0,
|
|
116
|
+
url: process.env[`${prefix}ERROR_URL`] || void 0
|
|
117
|
+
},
|
|
114
118
|
account: {
|
|
115
119
|
twitter: process.env[`${prefix}ACCOUNT_TWITTER`] || void 0,
|
|
116
120
|
discord: process.env[`${prefix}ACCOUNT_DISCORD`] || void 0,
|
|
@@ -284,6 +288,10 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
284
288
|
process.env[`${prefix}BOT_NAME`] = config.bot.name;
|
|
285
289
|
process.env[`${prefix}BOT_EMAIL`] = config.bot.email;
|
|
286
290
|
}
|
|
291
|
+
if (config.error) {
|
|
292
|
+
process.env[`${prefix}ERROR_CODES_FILE`] = config.error.codesFile;
|
|
293
|
+
process.env[`${prefix}ERROR_URL`] = config.error.url;
|
|
294
|
+
}
|
|
287
295
|
if (config.release) {
|
|
288
296
|
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
|
|
289
297
|
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
@@ -414,7 +422,7 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
414
422
|
process.env[`${prefix}REGISTRY_CYCLONE`] = String(config.registry.cyclone);
|
|
415
423
|
}
|
|
416
424
|
if (config.registry.container) {
|
|
417
|
-
process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.
|
|
425
|
+
process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.container);
|
|
418
426
|
}
|
|
419
427
|
}
|
|
420
428
|
if (config.logLevel) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getConfig
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2P5TGL2R.mjs";
|
|
4
4
|
import {
|
|
5
5
|
findWorkspaceRoot,
|
|
6
6
|
getStopwatch,
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
writeFatal,
|
|
10
10
|
writeInfo,
|
|
11
11
|
writeTrace
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YBYGEO5L.mjs";
|
|
13
13
|
import {
|
|
14
14
|
generator_default
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7JTISIUD.mjs";
|
|
16
16
|
import {
|
|
17
17
|
__dirname,
|
|
18
18
|
__name
|
|
@@ -8,7 +8,7 @@ var require_package = __commonJS({
|
|
|
8
8
|
"package.json"(exports, module) {
|
|
9
9
|
module.exports = {
|
|
10
10
|
name: "@storm-software/cloudflare-tools",
|
|
11
|
-
version: "0.55.
|
|
11
|
+
version: "0.55.46",
|
|
12
12
|
description: "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
|
|
13
13
|
repository: {
|
|
14
14
|
type: "github",
|
|
@@ -5,17 +5,17 @@ var _chunkVTHBMY4Bjs = require('./chunk-VTHBMY4B.js');
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkS5NUDAJRjs = require('./chunk-S5NUDAJR.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkZ5XL2UL5js = require('./chunk-Z5XL2UL5.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkQQQD2SINjs = require('./chunk-QQQD2SIN.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
var _chunkJ5SB6L2Ljs = require('./chunk-J5SB6L2L.js');
|
|
@@ -36,8 +36,8 @@ async function runExecutor(options, context) {
|
|
|
36
36
|
throw new Error("The executor requires projectsConfigurations.");
|
|
37
37
|
}
|
|
38
38
|
try {
|
|
39
|
-
const workspaceRoot =
|
|
40
|
-
const config = await
|
|
39
|
+
const workspaceRoot = _chunkQQQD2SINjs.findWorkspaceRoot.call(void 0, );
|
|
40
|
+
const config = await _chunkZ5XL2UL5js.getConfig.call(void 0, workspaceRoot);
|
|
41
41
|
const sourceRoot = _nullishCoalesce(_optionalChain([context, 'access', _7 => _7.projectsConfigurations, 'access', _8 => _8.projects, 'access', _9 => _9[context.projectName], 'optionalAccess', _10 => _10.sourceRoot]), () => ( workspaceRoot));
|
|
42
42
|
const projectName = _nullishCoalesce(_optionalChain([context, 'access', _11 => _11.projectsConfigurations, 'access', _12 => _12.projects, 'access', _13 => _13[context.projectName], 'optionalAccess', _14 => _14.name]), () => ( context.projectName));
|
|
43
43
|
const projectDetails = _chunkVTHBMY4Bjs.getPackageInfo.call(void 0, context.projectsConfigurations.projects[context.projectName]);
|
|
@@ -62,7 +62,7 @@ async function runExecutor(options, context) {
|
|
|
62
62
|
if (!projectGraph) {
|
|
63
63
|
throw new Error("No project graph found in cache");
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
_chunkQQQD2SINjs.writeInfo.call(void 0, `Publishing ${context.projectName} to the Storm Registry at ${endpoint}`);
|
|
66
66
|
const s3Client = new (0, _clients3.S3)({
|
|
67
67
|
region: "auto",
|
|
68
68
|
endpoint,
|
|
@@ -72,12 +72,12 @@ async function runExecutor(options, context) {
|
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
74
|
const version = _optionalChain([projectDetails, 'access', _18 => _18.content, 'optionalAccess', _19 => _19.version]);
|
|
75
|
-
|
|
75
|
+
_chunkQQQD2SINjs.writeInfo.call(void 0, `Generated component version: ${version}`);
|
|
76
76
|
const files = await _glob.glob.call(void 0, _devkit.joinPathFragments.call(void 0, sourceRoot, "**/*"), {
|
|
77
77
|
ignore: "**/{*.stories.tsx,*.stories.ts,*.spec.tsx,*.spec.ts}"
|
|
78
78
|
});
|
|
79
79
|
const projectPath = `registry/${context.projectName}`;
|
|
80
|
-
const internalDependencies = await
|
|
80
|
+
const internalDependencies = await _chunkS5NUDAJRjs.getInternalDependencies.call(void 0, context.projectName, projectGraph);
|
|
81
81
|
const dependencies = internalDependencies.filter((projectNode) => !projectNode.data.tags || projectNode.data.tags.every((tag) => tag.toLowerCase() !== "component")).reduce((ret, dep) => {
|
|
82
82
|
if (!ret[dep.name]) {
|
|
83
83
|
ret[dep.name] = "latest";
|
|
@@ -85,14 +85,14 @@ async function runExecutor(options, context) {
|
|
|
85
85
|
return ret;
|
|
86
86
|
}, _nullishCoalesce(projectDetails.content.dependencies, () => ( {})));
|
|
87
87
|
const release = _nullishCoalesce(options.tag, () => ( _child_process.execSync.call(void 0, "npm config get tag").toString().trim()));
|
|
88
|
-
|
|
88
|
+
_chunkQQQD2SINjs.writeInfo.call(void 0, `Clearing out existing items in ${projectPath}`);
|
|
89
89
|
if (!isDryRun) {
|
|
90
90
|
const response = await s3Client.listObjects({
|
|
91
91
|
Bucket: options.bucketId,
|
|
92
92
|
Prefix: projectPath
|
|
93
93
|
});
|
|
94
94
|
if (_optionalChain([response, 'optionalAccess', _20 => _20.Contents]) && response.Contents.length > 0) {
|
|
95
|
-
|
|
95
|
+
_chunkQQQD2SINjs.writeDebug.call(void 0, `Deleting the following existing items from the component registry: ${response.Contents.map((item) => item.Key).join(", ")}`);
|
|
96
96
|
await Promise.all(response.Contents.map((item) => s3Client.deleteObjects({
|
|
97
97
|
Bucket: options.bucketId,
|
|
98
98
|
Delete: {
|
|
@@ -105,10 +105,10 @@ async function runExecutor(options, context) {
|
|
|
105
105
|
}
|
|
106
106
|
})));
|
|
107
107
|
} else {
|
|
108
|
-
|
|
108
|
+
_chunkQQQD2SINjs.writeDebug.call(void 0, `No existing items to delete in the component registry path ${projectPath}`);
|
|
109
109
|
}
|
|
110
110
|
} else {
|
|
111
|
-
|
|
111
|
+
_chunkQQQD2SINjs.writeWarning.call(void 0, "[Dry run]: skipping upload to the Cyclone Registry.");
|
|
112
112
|
}
|
|
113
113
|
const meta = {
|
|
114
114
|
name: context.projectName,
|
|
@@ -124,16 +124,16 @@ async function runExecutor(options, context) {
|
|
|
124
124
|
meta.devDependencies = projectDetails.content.devDependencies;
|
|
125
125
|
}
|
|
126
126
|
const metaJson = JSON.stringify(meta);
|
|
127
|
-
|
|
127
|
+
_chunkQQQD2SINjs.writeInfo.call(void 0, `Generating meta.json file:
|
|
128
128
|
${metaJson}`);
|
|
129
|
-
await
|
|
129
|
+
await _chunkS5NUDAJRjs.r2UploadFile.call(void 0, s3Client, options.bucketId, projectPath, "meta.json", version, metaJson, "application/json", isDryRun);
|
|
130
130
|
await Promise.all(files.map((file) => {
|
|
131
131
|
const fileName = file.replaceAll("\\", "/").replace(sourceRoot.replaceAll("\\", "/"), "");
|
|
132
132
|
return _promises.readFile.call(void 0, file, {
|
|
133
133
|
encoding: "utf8"
|
|
134
|
-
}).then((fileContent) =>
|
|
134
|
+
}).then((fileContent) => _chunkS5NUDAJRjs.r2UploadFile.call(void 0, s3Client, options.bucketId, projectPath, fileName, version, fileContent, "text/plain", isDryRun));
|
|
135
135
|
}));
|
|
136
|
-
|
|
136
|
+
_chunkQQQD2SINjs.writeSuccess.call(void 0, `Successfully uploaded the ${projectName} component to the Cyclone Registry`, config);
|
|
137
137
|
return {
|
|
138
138
|
success: true
|
|
139
139
|
};
|
|
@@ -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 _chunkZ5XL2UL5js = require('./chunk-Z5XL2UL5.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -9,10 +9,10 @@ var _chunkR32N7B24js = require('./chunk-R32N7B24.js');
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkQQQD2SINjs = require('./chunk-QQQD2SIN.js');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkZ3WJNLJWjs = require('./chunk-Z3WJNLJW.js');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
var _chunkJ5SB6L2Ljs = require('./chunk-J5SB6L2L.js');
|
|
@@ -38,21 +38,21 @@ var vitestScript = `"test": "vitest run"`;
|
|
|
38
38
|
|
|
39
39
|
// src/generators/worker/generator.ts
|
|
40
40
|
async function applicationGenerator(tree, schema) {
|
|
41
|
-
const stopwatch =
|
|
41
|
+
const stopwatch = _chunkQQQD2SINjs.getStopwatch.call(void 0, "Storm Worker generator");
|
|
42
42
|
let config;
|
|
43
43
|
try {
|
|
44
|
-
|
|
44
|
+
_chunkQQQD2SINjs.writeInfo.call(void 0, `\u26A1 Running the Storm Worker generator...
|
|
45
45
|
|
|
46
46
|
`, config);
|
|
47
|
-
const workspaceRoot =
|
|
48
|
-
|
|
47
|
+
const workspaceRoot = _chunkQQQD2SINjs.findWorkspaceRoot.call(void 0, );
|
|
48
|
+
_chunkQQQD2SINjs.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.json file...
|
|
49
49
|
- workspaceRoot: ${workspaceRoot}`, config);
|
|
50
|
-
config = await
|
|
51
|
-
|
|
50
|
+
config = await _chunkZ5XL2UL5js.getConfig.call(void 0, workspaceRoot);
|
|
51
|
+
_chunkQQQD2SINjs.writeTrace.call(void 0, `Loaded Storm config into env:
|
|
52
52
|
${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`, config);
|
|
53
53
|
const options = await normalizeOptions(tree, schema, config);
|
|
54
54
|
const tasks = [];
|
|
55
|
-
tasks.push(await
|
|
55
|
+
tasks.push(await _chunkZ3WJNLJWjs.generator_default.call(void 0, tree, {
|
|
56
56
|
...options,
|
|
57
57
|
skipFormat: true
|
|
58
58
|
}));
|
|
@@ -107,8 +107,8 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[
|
|
|
107
107
|
return _devkit.runTasksInSerial.call(void 0, ...tasks);
|
|
108
108
|
} catch (error) {
|
|
109
109
|
return () => {
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
_chunkQQQD2SINjs.writeFatal.call(void 0, "A fatal error occurred while running the generator - the process was forced to terminate", config);
|
|
111
|
+
_chunkQQQD2SINjs.writeError.call(void 0, `An exception was thrown in the generator's process
|
|
112
112
|
- Details: ${error.message}
|
|
113
113
|
- Stacktrace: ${error.stack}`, config);
|
|
114
114
|
};
|