@storm-software/cloudflare-tools 0.55.44 → 0.55.45
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-75BWJSFW.mjs → chunk-2P5TGL2R.mjs} +10 -2
- package/dist/{chunk-CAC2PNUJ.js → chunk-4P4IIN6G.js} +17 -17
- package/dist/{chunk-LY3NUGLI.mjs → chunk-BDADKXEW.mjs} +11 -11
- package/dist/{chunk-ISO7UOVA.js → chunk-DZPVDJXE.js} +143 -143
- package/dist/{chunk-TDNPRL4Y.js → chunk-P7YORNEH.js} +1 -1
- package/dist/{chunk-TTDB2VCO.mjs → chunk-PHH7TIFK.mjs} +1 -1
- package/dist/{chunk-STUGKRS5.mjs → chunk-QGY5FTZR.mjs} +6 -6
- package/dist/{chunk-HWJBDRIG.js → chunk-QQQD2SIN.js} +9 -1
- package/dist/{chunk-AXF5C7QR.js → chunk-S5NUDAJR.js} +3 -3
- package/dist/{chunk-MIKH2FI5.mjs → chunk-WGEGIRE6.mjs} +1 -1
- package/dist/{chunk-R2SQ6ZOK.mjs → chunk-YBYGEO5L.mjs} +9 -1
- package/dist/{chunk-R32N7B24.js → chunk-Z5XL2UL5.js} +50 -42
- package/dist/{chunk-JUJW77CM.js → chunk-ZGZLK5XZ.js} +12 -12
- package/dist/{chunk-FVMS7RMT.mjs → chunk-ZTEXBI4T.mjs} +5 -5
- 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 +12 -12
- package/dist/index.mjs +16 -16
- 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,13 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Storm Ops - Cloudflare Tools
|
|
4
4
|
|
|
5
|
+
## [0.55.45](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.55.45) (2025-04-04)
|
|
6
|
+
|
|
7
|
+
### Miscellaneous
|
|
8
|
+
|
|
9
|
+
- **monorepo:** Regenerate README markdown files
|
|
10
|
+
([30c679ec1](https://github.com/storm-software/storm-ops/commit/30c679ec1))
|
|
11
|
+
|
|
5
12
|
## [0.55.44](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.55.44) (2025-04-02)
|
|
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 -->
|
|
@@ -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,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 _chunkS5NUDAJRjs = require('./chunk-S5NUDAJR.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkVTHBMY4Bjs = require('./chunk-VTHBMY4B.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
|
};
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-YYEF6TFG.mjs";
|
|
5
5
|
import {
|
|
6
6
|
getConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2P5TGL2R.mjs";
|
|
8
8
|
import {
|
|
9
9
|
correctPaths,
|
|
10
10
|
findWorkspaceRoot,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
writeSuccess,
|
|
21
21
|
writeTrace,
|
|
22
22
|
writeWarning
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-YBYGEO5L.mjs";
|
|
24
24
|
import {
|
|
25
25
|
__dirname,
|
|
26
26
|
__name,
|
|
@@ -647,10 +647,9 @@ var getEntryPoints = /* @__PURE__ */ __name(async (config, projectRoot, sourceRo
|
|
|
647
647
|
return ret;
|
|
648
648
|
}, []));
|
|
649
649
|
} else {
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
paths.push(result);
|
|
650
|
+
writeDebug(`Trying to add entry point ${entryPoint}"`, config);
|
|
651
|
+
if (!paths.includes(entryPoint)) {
|
|
652
|
+
paths.push(entryPoint);
|
|
654
653
|
}
|
|
655
654
|
}
|
|
656
655
|
return paths;
|
|
@@ -1394,7 +1393,7 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
|
|
|
1394
1393
|
...userOptions,
|
|
1395
1394
|
tsconfig: joinPaths(projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
1396
1395
|
format: options.format || "cjs",
|
|
1397
|
-
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry ?? "./src/index.ts",
|
|
1396
|
+
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry ?? "./src/index.ts", false),
|
|
1398
1397
|
outdir: userOptions.outputPath || joinPaths("dist", projectRoot),
|
|
1399
1398
|
distDir: userOptions.distDir || "dist",
|
|
1400
1399
|
plugins: [],
|
|
@@ -1409,7 +1408,6 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
|
|
|
1409
1408
|
metafile: userOptions.metafile !== false,
|
|
1410
1409
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
1411
1410
|
clean: userOptions.clean !== false,
|
|
1412
|
-
emitOnAll: userOptions.emitOnAll === true,
|
|
1413
1411
|
assets: userOptions.assets ?? [],
|
|
1414
1412
|
injectShims: userOptions.injectShims !== true,
|
|
1415
1413
|
bundle: userOptions.bundle !== false,
|
|
@@ -1486,7 +1484,7 @@ async function generatePackageJson(context2) {
|
|
|
1486
1484
|
if (Array.isArray(context2.options.entryPoints)) {
|
|
1487
1485
|
entryPoints = context2.options.entryPoints.map((entryPoint) => typeof entryPoint === "string" ? {
|
|
1488
1486
|
in: entryPoint,
|
|
1489
|
-
out: entryPoint
|
|
1487
|
+
out: correctPaths(entryPoint.replaceAll(correctPaths(context2.options.config.workspaceRoot), "").replaceAll(correctPaths(context2.options.projectRoot), ""))
|
|
1490
1488
|
} : entryPoint);
|
|
1491
1489
|
}
|
|
1492
1490
|
for (const entryPoint of entryPoints) {
|
|
@@ -1557,7 +1555,6 @@ async function executeEsBuild(context2) {
|
|
|
1557
1555
|
delete options.clean;
|
|
1558
1556
|
delete options.debug;
|
|
1559
1557
|
delete options.generatePackageJson;
|
|
1560
|
-
delete options.emitOnAll;
|
|
1561
1558
|
delete options.distDir;
|
|
1562
1559
|
delete options.includeSrc;
|
|
1563
1560
|
delete options.verbose;
|
|
@@ -1570,7 +1567,10 @@ async function executeEsBuild(context2) {
|
|
|
1570
1567
|
delete options.injectShims;
|
|
1571
1568
|
delete options.external;
|
|
1572
1569
|
writeTrace(`Run esbuild (${context2.options.name}) with the following options:
|
|
1573
|
-
${formatLogMessage(
|
|
1570
|
+
${formatLogMessage({
|
|
1571
|
+
...options,
|
|
1572
|
+
define: "<Hidden>"
|
|
1573
|
+
})}`, context2.options.config);
|
|
1574
1574
|
const result = await esbuild2.build(options);
|
|
1575
1575
|
await esbuild2.stop();
|
|
1576
1576
|
if (result.metafile) {
|