@storm-software/cloudflare-tools 0.55.43 → 0.55.44
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 +8 -0
- package/dist/{chunk-MESLYSHV.mjs → chunk-75BWJSFW.mjs} +9 -9
- package/dist/{chunk-HF5FM2V2.js → chunk-AXF5C7QR.js} +3 -3
- package/dist/{chunk-MCQ4YOON.js → chunk-CAC2PNUJ.js} +17 -17
- package/dist/{chunk-5QU7G4BP.mjs → chunk-FVMS7RMT.mjs} +5 -5
- package/dist/{chunk-FK6PN2T3.js → chunk-HWJBDRIG.js} +2 -2
- package/dist/{chunk-6D3NUIUL.js → chunk-ISO7UOVA.js} +182 -178
- package/dist/{chunk-247N3JYF.js → chunk-JUJW77CM.js} +12 -12
- package/dist/{chunk-E22S7JBO.mjs → chunk-LY3NUGLI.mjs} +12 -8
- package/dist/{chunk-Q67NQSCF.mjs → chunk-MIKH2FI5.mjs} +1 -1
- package/dist/{chunk-M4FHQYTZ.mjs → chunk-R2SQ6ZOK.mjs} +2 -2
- package/dist/{chunk-H2ML72QF.js → chunk-R32N7B24.js} +47 -47
- package/dist/{chunk-S3S7EN37.mjs → chunk-STUGKRS5.mjs} +6 -6
- package/dist/{chunk-PW324BYD.js → chunk-TDNPRL4Y.js} +1 -1
- package/dist/{chunk-LEXIFHU6.mjs → chunk-TTDB2VCO.mjs} +1 -1
- 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 +21 -5
- package/dist/src/executors/serve/executor.d.ts +21 -5
- 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,14 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Storm Ops - Cloudflare Tools
|
|
4
4
|
|
|
5
|
+
## [0.55.44](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.55.44) (2025-04-02)
|
|
6
|
+
|
|
7
|
+
### Miscellaneous
|
|
8
|
+
|
|
9
|
+
- **cloudflare-tools:** Update all references to `StormConfig` to point to
|
|
10
|
+
`StormWorkspaceConfig`
|
|
11
|
+
([cdd9495af](https://github.com/storm-software/storm-ops/commit/cdd9495af))
|
|
12
|
+
|
|
5
13
|
## [0.55.43](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.55.43) (2025-03-18)
|
|
6
14
|
|
|
7
15
|
### Miscellaneous
|
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
STORM_DEFAULT_DOCS,
|
|
5
5
|
STORM_DEFAULT_HOMEPAGE,
|
|
6
6
|
STORM_DEFAULT_LICENSING,
|
|
7
|
-
StormConfigSchema,
|
|
8
7
|
correctPaths,
|
|
9
8
|
findWorkspaceRoot,
|
|
10
9
|
formatLogMessage,
|
|
@@ -12,9 +11,10 @@ import {
|
|
|
12
11
|
getLogLevel,
|
|
13
12
|
getLogLevelLabel,
|
|
14
13
|
joinPaths,
|
|
14
|
+
stormWorkspaceConfigSchema,
|
|
15
15
|
writeTrace,
|
|
16
16
|
writeWarning
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-R2SQ6ZOK.mjs";
|
|
18
18
|
import {
|
|
19
19
|
__name
|
|
20
20
|
} from "./chunk-3HMZSKJD.mjs";
|
|
@@ -534,7 +534,7 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
|
|
|
534
534
|
// ../config-tools/src/create-storm-config.ts
|
|
535
535
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
536
536
|
var _static_cache = void 0;
|
|
537
|
-
var
|
|
537
|
+
var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
538
538
|
let result;
|
|
539
539
|
if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
|
|
540
540
|
let _workspaceRoot = workspaceRoot;
|
|
@@ -549,7 +549,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
|
|
|
549
549
|
logLevel: "all"
|
|
550
550
|
});
|
|
551
551
|
}
|
|
552
|
-
result = await
|
|
552
|
+
result = await stormWorkspaceConfigSchema.parseAsync(defu2(configEnv, configFile, defaultConfig));
|
|
553
553
|
result.workspaceRoot ??= _workspaceRoot;
|
|
554
554
|
} else {
|
|
555
555
|
result = _static_cache.data;
|
|
@@ -565,7 +565,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
|
|
|
565
565
|
data: result
|
|
566
566
|
};
|
|
567
567
|
return result;
|
|
568
|
-
}, "
|
|
568
|
+
}, "createStormWorkspaceConfig");
|
|
569
569
|
var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
570
570
|
const extension_cache_key = {
|
|
571
571
|
extensionName
|
|
@@ -580,19 +580,19 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
|
580
580
|
_extension_cache.set(extension_cache_key, extension);
|
|
581
581
|
return extension;
|
|
582
582
|
}, "createConfigExtension");
|
|
583
|
-
var
|
|
584
|
-
const config = await
|
|
583
|
+
var loadStormWorkspaceConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
|
|
584
|
+
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
585
585
|
setConfigEnv(config);
|
|
586
586
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
587
587
|
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
588
588
|
${formatLogMessage(config)}`, config);
|
|
589
589
|
}
|
|
590
590
|
return config;
|
|
591
|
-
}, "
|
|
591
|
+
}, "loadStormWorkspaceConfig");
|
|
592
592
|
|
|
593
593
|
// ../config-tools/src/get-config.ts
|
|
594
594
|
var getConfig = /* @__PURE__ */ __name((workspaceRoot, skipLogs = false) => {
|
|
595
|
-
return
|
|
595
|
+
return loadStormWorkspaceConfig(workspaceRoot, skipLogs);
|
|
596
596
|
}, "getConfig");
|
|
597
597
|
|
|
598
598
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
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 _chunkHWJBDRIGjs = require('./chunk-HWJBDRIG.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkJ5SB6L2Ljs = require('./chunk-J5SB6L2L.js');
|
|
@@ -11,7 +11,7 @@ var _crypto = require('crypto');
|
|
|
11
11
|
var r2UploadFile = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (client, bucketName, projectPath, fileName, version, fileContent, contentType = "text/plain", isDryRun = false) => {
|
|
12
12
|
const checksum = _crypto.createHash.call(void 0, "sha256").update(fileContent).digest("base64");
|
|
13
13
|
const fileKey = `${projectPath}/${fileName.startsWith("/") ? fileName.substring(1) : fileName}`;
|
|
14
|
-
|
|
14
|
+
_chunkHWJBDRIGjs.writeDebug.call(void 0, `Uploading file: ${fileKey}`);
|
|
15
15
|
if (!isDryRun) {
|
|
16
16
|
await client.putObject({
|
|
17
17
|
Bucket: bucketName,
|
|
@@ -24,7 +24,7 @@ var r2UploadFile = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (c
|
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
} else {
|
|
27
|
-
|
|
27
|
+
_chunkHWJBDRIGjs.writeWarning.call(void 0, "[Dry run]: skipping upload to the Cyclone Registry.");
|
|
28
28
|
}
|
|
29
29
|
}, "r2UploadFile");
|
|
30
30
|
var getInternalDependencies = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (projectName, graph) => {
|
|
@@ -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 _chunkVTHBMY4Bjs = require('./chunk-VTHBMY4B.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkAXF5C7QRjs = require('./chunk-AXF5C7QR.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkR32N7B24js = require('./chunk-R32N7B24.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkHWJBDRIGjs = require('./chunk-HWJBDRIG.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 = _chunkHWJBDRIGjs.findWorkspaceRoot.call(void 0, );
|
|
40
|
+
const config = await _chunkR32N7B24js.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
|
+
_chunkHWJBDRIGjs.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
|
+
_chunkHWJBDRIGjs.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 _chunkAXF5C7QRjs.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
|
+
_chunkHWJBDRIGjs.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
|
+
_chunkHWJBDRIGjs.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
|
+
_chunkHWJBDRIGjs.writeDebug.call(void 0, `No existing items to delete in the component registry path ${projectPath}`);
|
|
109
109
|
}
|
|
110
110
|
} else {
|
|
111
|
-
|
|
111
|
+
_chunkHWJBDRIGjs.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
|
+
_chunkHWJBDRIGjs.writeInfo.call(void 0, `Generating meta.json file:
|
|
128
128
|
${metaJson}`);
|
|
129
|
-
await
|
|
129
|
+
await _chunkAXF5C7QRjs.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) => _chunkAXF5C7QRjs.r2UploadFile.call(void 0, s3Client, options.bucketId, projectPath, fileName, version, fileContent, "text/plain", isDryRun));
|
|
135
135
|
}));
|
|
136
|
-
|
|
136
|
+
_chunkHWJBDRIGjs.writeSuccess.call(void 0, `Successfully uploaded the ${projectName} component to the Cyclone Registry`, config);
|
|
137
137
|
return {
|
|
138
138
|
success: true
|
|
139
139
|
};
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
generator_default
|
|
3
|
-
} from "./chunk-Q67NQSCF.mjs";
|
|
4
1
|
import {
|
|
5
2
|
getConfig
|
|
6
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-75BWJSFW.mjs";
|
|
7
4
|
import {
|
|
8
5
|
findWorkspaceRoot,
|
|
9
6
|
getStopwatch,
|
|
@@ -12,7 +9,10 @@ import {
|
|
|
12
9
|
writeFatal,
|
|
13
10
|
writeInfo,
|
|
14
11
|
writeTrace
|
|
15
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-R2SQ6ZOK.mjs";
|
|
13
|
+
import {
|
|
14
|
+
generator_default
|
|
15
|
+
} from "./chunk-MIKH2FI5.mjs";
|
|
16
16
|
import {
|
|
17
17
|
__dirname,
|
|
18
18
|
__name
|
|
@@ -366,7 +366,7 @@ var WorkspaceDirectoryConfigSchema = _zod2.default.object({
|
|
|
366
366
|
log: _zod2.default.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
367
367
|
build: _zod2.default.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
|
|
368
368
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
369
|
-
var
|
|
369
|
+
var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
370
370
|
$schema: _zod2.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
371
371
|
extends: ExtendsSchema.optional(),
|
|
372
372
|
name: _zod2.default.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
@@ -755,4 +755,4 @@ var _isFunction = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (value) =
|
|
|
755
755
|
|
|
756
756
|
|
|
757
757
|
|
|
758
|
-
exports.LogLevel = LogLevel; exports.STORM_DEFAULT_DOCS = STORM_DEFAULT_DOCS; exports.STORM_DEFAULT_HOMEPAGE = STORM_DEFAULT_HOMEPAGE; exports.STORM_DEFAULT_LICENSING = STORM_DEFAULT_LICENSING; exports.
|
|
758
|
+
exports.LogLevel = LogLevel; exports.STORM_DEFAULT_DOCS = STORM_DEFAULT_DOCS; exports.STORM_DEFAULT_HOMEPAGE = STORM_DEFAULT_HOMEPAGE; exports.STORM_DEFAULT_LICENSING = STORM_DEFAULT_LICENSING; exports.stormWorkspaceConfigSchema = stormWorkspaceConfigSchema; exports.COLOR_KEYS = COLOR_KEYS; exports.correctPaths = correctPaths; exports.joinPaths = joinPaths; exports.findWorkspaceRoot = findWorkspaceRoot; exports.getDefaultConfig = getDefaultConfig; exports.getLogLevel = getLogLevel; exports.getLogLevelLabel = getLogLevelLabel; exports.isVerbose = isVerbose; exports.writeFatal = writeFatal; exports.writeError = writeError; exports.writeWarning = writeWarning; exports.writeInfo = writeInfo; exports.writeSuccess = writeSuccess; exports.writeDebug = writeDebug; exports.writeTrace = writeTrace; exports.getStopwatch = getStopwatch; exports.formatLogMessage = formatLogMessage;
|