@storm-software/cloudflare-tools 0.63.27 → 0.63.28
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 +7 -0
- package/README.md +1 -1
- package/dist/{chunk-NTPBAB34.js → chunk-6TGFIMO5.js} +1 -1
- package/dist/{chunk-3M2F4JUW.mjs → chunk-AOLWFHH5.mjs} +3 -3
- package/dist/{chunk-OKD45PFS.mjs → chunk-D5YG7CU5.mjs} +3 -3
- package/dist/{chunk-NK6XHZKN.js → chunk-DMJM3W36.js} +12 -12
- package/dist/{chunk-MB2PUV2U.mjs → chunk-DW5K6TQT.mjs} +1 -1
- package/dist/{chunk-CCIXQ6JW.js → chunk-GL7JLG36.js} +16 -16
- package/dist/{chunk-6AC4HGUU.mjs → chunk-I5P7M77J.mjs} +1 -1
- package/dist/{chunk-N5LTPQ53.js → chunk-IATTWS2I.js} +3 -3
- package/dist/{chunk-G2NJAIMM.js → chunk-J6WBZNBT.js} +3 -3
- package/dist/{chunk-ZNYU5YAQ.mjs → chunk-LVQQJNPK.mjs} +3 -3
- package/dist/{chunk-6SVJXZBV.js → chunk-PJGFLSPV.js} +122 -117
- package/dist/{chunk-4FMFQGIC.mjs → chunk-QTMO3CXB.mjs} +1 -1
- package/dist/{chunk-AVDLSZLA.js → chunk-YMATJZEA.js} +43 -43
- package/dist/{chunk-446Z4I2E.mjs → chunk-ZHQVMJQB.mjs} +8 -3
- 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.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,13 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Storm Ops - Cloudflare Tools
|
|
4
4
|
|
|
5
|
+
## [0.63.27](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.63.27) (2025-06-20)
|
|
6
|
+
|
|
7
|
+
### Miscellaneous
|
|
8
|
+
|
|
9
|
+
- **monorepo:** Update README markdown files
|
|
10
|
+
([90a90bfac](https://github.com/storm-software/storm-ops/commit/90a90bfac))
|
|
11
|
+
|
|
5
12
|
## [0.63.26](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.63.26) (2025-06-20)
|
|
6
13
|
|
|
7
14
|
### 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 -->
|
|
@@ -7,7 +7,7 @@ var require_package = _chunkMCKGQKYUjs.__commonJS.call(void 0, {
|
|
|
7
7
|
"package.json"(exports, module) {
|
|
8
8
|
module.exports = {
|
|
9
9
|
name: "@storm-software/cloudflare-tools",
|
|
10
|
-
version: "0.63.
|
|
10
|
+
version: "0.63.27",
|
|
11
11
|
description: "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
|
|
12
12
|
repository: {
|
|
13
13
|
type: "github",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generator_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QTMO3CXB.mjs";
|
|
4
4
|
import {
|
|
5
5
|
getConfig
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-I5P7M77J.mjs";
|
|
7
7
|
import {
|
|
8
8
|
findWorkspaceRoot,
|
|
9
9
|
getStopwatch,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
writeFatal,
|
|
13
13
|
writeInfo,
|
|
14
14
|
writeTrace
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-LVQQJNPK.mjs";
|
|
16
16
|
import {
|
|
17
17
|
__dirname
|
|
18
18
|
} from "./chunk-B7N6WOYD.mjs";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getInternalDependencies,
|
|
3
3
|
r2UploadFile
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DW5K6TQT.mjs";
|
|
5
5
|
import {
|
|
6
6
|
createCliOptions,
|
|
7
7
|
getPackageInfo
|
|
8
8
|
} from "./chunk-RH2IXKSC.mjs";
|
|
9
9
|
import {
|
|
10
10
|
getConfig
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-I5P7M77J.mjs";
|
|
12
12
|
import {
|
|
13
13
|
findWorkspaceRoot,
|
|
14
14
|
writeDebug,
|
|
15
15
|
writeInfo,
|
|
16
16
|
writeSuccess,
|
|
17
17
|
writeWarning
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-LVQQJNPK.mjs";
|
|
19
19
|
|
|
20
20
|
// src/executors/r2-upload-publish/executor.ts
|
|
21
21
|
import { S3 } from "@aws-sdk/client-s3";
|
|
@@ -1,9 +1,9 @@
|
|
|
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 _chunk6TGFIMO5js = require('./chunk-6TGFIMO5.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkYMATJZEAjs = require('./chunk-YMATJZEA.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -12,7 +12,7 @@ var _chunkAVDLSZLAjs = require('./chunk-AVDLSZLA.js');
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkIATTWS2Ijs = require('./chunk-IATTWS2I.js');
|
|
16
16
|
|
|
17
17
|
// src/generators/worker/generator.ts
|
|
18
18
|
|
|
@@ -45,20 +45,20 @@ var vitestScript = `"test": "vitest run"`;
|
|
|
45
45
|
|
|
46
46
|
// src/generators/worker/generator.ts
|
|
47
47
|
async function applicationGenerator(tree, schema) {
|
|
48
|
-
const stopwatch =
|
|
48
|
+
const stopwatch = _chunkIATTWS2Ijs.getStopwatch.call(void 0, "Storm Worker generator");
|
|
49
49
|
let config;
|
|
50
50
|
try {
|
|
51
|
-
|
|
51
|
+
_chunkIATTWS2Ijs.writeInfo.call(void 0, `\u26A1 Running the Storm Worker generator...
|
|
52
52
|
|
|
53
53
|
`, config);
|
|
54
|
-
const workspaceRoot =
|
|
55
|
-
|
|
54
|
+
const workspaceRoot = _chunkIATTWS2Ijs.findWorkspaceRoot.call(void 0, );
|
|
55
|
+
_chunkIATTWS2Ijs.writeDebug.call(void 0,
|
|
56
56
|
`Loading the Storm Config from environment variables and storm.json file...
|
|
57
57
|
- workspaceRoot: ${workspaceRoot}`,
|
|
58
58
|
config
|
|
59
59
|
);
|
|
60
|
-
config = await
|
|
61
|
-
|
|
60
|
+
config = await _chunkYMATJZEAjs.getConfig.call(void 0, workspaceRoot);
|
|
61
|
+
_chunkIATTWS2Ijs.writeTrace.call(void 0,
|
|
62
62
|
`Loaded Storm config into env:
|
|
63
63
|
${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`,
|
|
64
64
|
config
|
|
@@ -66,7 +66,7 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[
|
|
|
66
66
|
const options = await normalizeOptions(tree, schema, config);
|
|
67
67
|
const tasks = [];
|
|
68
68
|
tasks.push(
|
|
69
|
-
await
|
|
69
|
+
await _chunk6TGFIMO5js.generator_default.call(void 0, tree, {
|
|
70
70
|
...options,
|
|
71
71
|
skipFormat: true
|
|
72
72
|
})
|
|
@@ -134,11 +134,11 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[
|
|
|
134
134
|
return _devkit.runTasksInSerial.call(void 0, ...tasks);
|
|
135
135
|
} catch (error) {
|
|
136
136
|
return () => {
|
|
137
|
-
|
|
137
|
+
_chunkIATTWS2Ijs.writeFatal.call(void 0,
|
|
138
138
|
"A fatal error occurred while running the generator - the process was forced to terminate",
|
|
139
139
|
config
|
|
140
140
|
);
|
|
141
|
-
|
|
141
|
+
_chunkIATTWS2Ijs.writeError.call(void 0,
|
|
142
142
|
`An exception was thrown in the generator's process
|
|
143
143
|
- Details: ${error.message}
|
|
144
144
|
- Stacktrace: ${error.stack}`,
|
|
@@ -1,21 +1,21 @@
|
|
|
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
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkJ6WBZNBTjs = require('./chunk-J6WBZNBT.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
var _chunkKTFMIXUNjs = require('./chunk-KTFMIXUN.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkYMATJZEAjs = require('./chunk-YMATJZEA.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkIATTWS2Ijs = require('./chunk-IATTWS2I.js');
|
|
19
19
|
|
|
20
20
|
// src/executors/r2-upload-publish/executor.ts
|
|
21
21
|
var _clients3 = require('@aws-sdk/client-s3');
|
|
@@ -39,8 +39,8 @@ async function runExecutor(options, context) {
|
|
|
39
39
|
throw new Error("The executor requires projectsConfigurations.");
|
|
40
40
|
}
|
|
41
41
|
try {
|
|
42
|
-
const workspaceRoot =
|
|
43
|
-
const config = await
|
|
42
|
+
const workspaceRoot = _chunkIATTWS2Ijs.findWorkspaceRoot.call(void 0, );
|
|
43
|
+
const config = await _chunkYMATJZEAjs.getConfig.call(void 0, workspaceRoot);
|
|
44
44
|
const sourceRoot = _nullishCoalesce(_optionalChain([context, 'access', _7 => _7.projectsConfigurations, 'access', _8 => _8.projects, 'access', _9 => _9[context.projectName], 'optionalAccess', _10 => _10.sourceRoot]), () => ( workspaceRoot));
|
|
45
45
|
const projectName = _nullishCoalesce(_optionalChain([context, 'access', _11 => _11.projectsConfigurations, 'access', _12 => _12.projects, 'access', _13 => _13[context.projectName], 'optionalAccess', _14 => _14.name]), () => ( context.projectName));
|
|
46
46
|
const projectDetails = _chunkKTFMIXUNjs.getPackageInfo.call(void 0,
|
|
@@ -79,7 +79,7 @@ async function runExecutor(options, context) {
|
|
|
79
79
|
"The executor failed because the project graph is not available. Please run the build command again."
|
|
80
80
|
);
|
|
81
81
|
}
|
|
82
|
-
|
|
82
|
+
_chunkIATTWS2Ijs.writeInfo.call(void 0,
|
|
83
83
|
`Publishing ${context.projectName} to the Storm Registry at ${endpoint}`
|
|
84
84
|
);
|
|
85
85
|
const s3Client = new (0, _clients3.S3)({
|
|
@@ -91,12 +91,12 @@ async function runExecutor(options, context) {
|
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
93
|
const version = _optionalChain([projectDetails, 'access', _18 => _18.content, 'optionalAccess', _19 => _19.version]);
|
|
94
|
-
|
|
94
|
+
_chunkIATTWS2Ijs.writeInfo.call(void 0, `Generated component version: ${version}`);
|
|
95
95
|
const files = await _glob.glob.call(void 0, _devkit.joinPathFragments.call(void 0, sourceRoot, "**/*"), {
|
|
96
96
|
ignore: "**/{*.stories.tsx,*.stories.ts,*.spec.tsx,*.spec.ts}"
|
|
97
97
|
});
|
|
98
98
|
const projectPath = `registry/${context.projectName}`;
|
|
99
|
-
const internalDependencies = await
|
|
99
|
+
const internalDependencies = await _chunkJ6WBZNBTjs.getInternalDependencies.call(void 0,
|
|
100
100
|
context.projectName,
|
|
101
101
|
projectGraph
|
|
102
102
|
);
|
|
@@ -109,14 +109,14 @@ async function runExecutor(options, context) {
|
|
|
109
109
|
return ret;
|
|
110
110
|
}, _nullishCoalesce(projectDetails.content.dependencies, () => ( {})));
|
|
111
111
|
const release = _nullishCoalesce(options.tag, () => ( _child_process.execSync.call(void 0, "npm config get tag").toString().trim()));
|
|
112
|
-
|
|
112
|
+
_chunkIATTWS2Ijs.writeInfo.call(void 0, `Clearing out existing items in ${projectPath}`);
|
|
113
113
|
if (!isDryRun) {
|
|
114
114
|
const response = await s3Client.listObjects({
|
|
115
115
|
Bucket: options.bucketId,
|
|
116
116
|
Prefix: projectPath
|
|
117
117
|
});
|
|
118
118
|
if (_optionalChain([response, 'optionalAccess', _20 => _20.Contents]) && response.Contents.length > 0) {
|
|
119
|
-
|
|
119
|
+
_chunkIATTWS2Ijs.writeDebug.call(void 0,
|
|
120
120
|
`Deleting the following existing items from the component registry: ${response.Contents.map((item) => item.Key).join(", ")}`
|
|
121
121
|
);
|
|
122
122
|
await Promise.all(
|
|
@@ -135,12 +135,12 @@ async function runExecutor(options, context) {
|
|
|
135
135
|
)
|
|
136
136
|
);
|
|
137
137
|
} else {
|
|
138
|
-
|
|
138
|
+
_chunkIATTWS2Ijs.writeDebug.call(void 0,
|
|
139
139
|
`No existing items to delete in the component registry path ${projectPath}`
|
|
140
140
|
);
|
|
141
141
|
}
|
|
142
142
|
} else {
|
|
143
|
-
|
|
143
|
+
_chunkIATTWS2Ijs.writeWarning.call(void 0, "[Dry run]: skipping upload to the Cyclone Registry.");
|
|
144
144
|
}
|
|
145
145
|
const meta = {
|
|
146
146
|
name: context.projectName,
|
|
@@ -158,9 +158,9 @@ async function runExecutor(options, context) {
|
|
|
158
158
|
meta.devDependencies = projectDetails.content.devDependencies;
|
|
159
159
|
}
|
|
160
160
|
const metaJson = JSON.stringify(meta);
|
|
161
|
-
|
|
161
|
+
_chunkIATTWS2Ijs.writeInfo.call(void 0, `Generating meta.json file:
|
|
162
162
|
${metaJson}`);
|
|
163
|
-
await
|
|
163
|
+
await _chunkJ6WBZNBTjs.r2UploadFile.call(void 0,
|
|
164
164
|
s3Client,
|
|
165
165
|
options.bucketId,
|
|
166
166
|
projectPath,
|
|
@@ -174,7 +174,7 @@ ${metaJson}`);
|
|
|
174
174
|
files.map((file) => {
|
|
175
175
|
const fileName = file.replaceAll("\\", "/").replace(sourceRoot.replaceAll("\\", "/"), "");
|
|
176
176
|
return _promises.readFile.call(void 0, file, { encoding: "utf8" }).then(
|
|
177
|
-
(fileContent) =>
|
|
177
|
+
(fileContent) => _chunkJ6WBZNBTjs.r2UploadFile.call(void 0,
|
|
178
178
|
s3Client,
|
|
179
179
|
options.bucketId,
|
|
180
180
|
projectPath,
|
|
@@ -187,7 +187,7 @@ ${metaJson}`);
|
|
|
187
187
|
);
|
|
188
188
|
})
|
|
189
189
|
);
|
|
190
|
-
|
|
190
|
+
_chunkIATTWS2Ijs.writeSuccess.call(void 0,
|
|
191
191
|
`Successfully uploaded the ${projectName} component to the Cyclone Registry`,
|
|
192
192
|
config
|
|
193
193
|
);
|
|
@@ -417,9 +417,9 @@ var organizationConfigSchema = z.object({
|
|
|
417
417
|
}).describe("The workspace's organization details");
|
|
418
418
|
var stormWorkspaceConfigSchema = z.object({
|
|
419
419
|
$schema: z.string().trim().default(
|
|
420
|
-
"https://
|
|
421
|
-
).
|
|
422
|
-
"The URL to the JSON schema file that describes the Storm configuration file"
|
|
420
|
+
"https://public.storm-cdn.com/schemas/storm-workspace.schema.json"
|
|
421
|
+
).describe(
|
|
422
|
+
"The URL or file path to the JSON schema file that describes the Storm configuration file"
|
|
423
423
|
),
|
|
424
424
|
extends: ExtendsSchema.optional(),
|
|
425
425
|
name: z.string().trim().toLowerCase().optional().describe(
|
|
@@ -1,14 +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
|
|
4
|
+
var _chunkIATTWS2Ijs = require('./chunk-IATTWS2I.js');
|
|
5
5
|
|
|
6
6
|
// src/utils/r2-bucket-helpers.ts
|
|
7
7
|
var _crypto = require('crypto');
|
|
8
8
|
var r2UploadFile = async (client, bucketName, projectPath, fileName, version, fileContent, contentType = "text/plain", isDryRun = false) => {
|
|
9
9
|
const checksum = _crypto.createHash.call(void 0, "sha256").update(fileContent).digest("base64");
|
|
10
10
|
const fileKey = `${projectPath}/${fileName.startsWith("/") ? fileName.substring(1) : fileName}`;
|
|
11
|
-
|
|
11
|
+
_chunkIATTWS2Ijs.writeDebug.call(void 0, `Uploading file: ${fileKey}`);
|
|
12
12
|
if (!isDryRun) {
|
|
13
13
|
await client.putObject({
|
|
14
14
|
Bucket: bucketName,
|
|
@@ -21,7 +21,7 @@ var r2UploadFile = async (client, bucketName, projectPath, fileName, version, fi
|
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
} else {
|
|
24
|
-
|
|
24
|
+
_chunkIATTWS2Ijs.writeWarning.call(void 0, "[Dry run]: skipping upload to the Cyclone Registry.");
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
var getInternalDependencies = (projectName, graph) => {
|
|
@@ -417,9 +417,9 @@ var organizationConfigSchema = z.object({
|
|
|
417
417
|
}).describe("The workspace's organization details");
|
|
418
418
|
var stormWorkspaceConfigSchema = z.object({
|
|
419
419
|
$schema: z.string().trim().default(
|
|
420
|
-
"https://
|
|
421
|
-
).
|
|
422
|
-
"The URL to the JSON schema file that describes the Storm configuration file"
|
|
420
|
+
"https://public.storm-cdn.com/schemas/storm-workspace.schema.json"
|
|
421
|
+
).describe(
|
|
422
|
+
"The URL or file path to the JSON schema file that describes the Storm configuration file"
|
|
423
423
|
),
|
|
424
424
|
extends: ExtendsSchema.optional(),
|
|
425
425
|
name: z.string().trim().toLowerCase().optional().describe(
|