@storm-software/cloudflare-tools 0.69.7 → 0.69.9
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-Q4LQ5PPN.js → chunk-3SANBYBY.js} +62 -62
- package/dist/{chunk-AMJC7IYY.js → chunk-ACJLPNZQ.js} +1 -1
- package/dist/{chunk-JWF57AVG.js → chunk-AV3F7R3S.js} +6 -6
- package/dist/{chunk-KQ2FYXAH.mjs → chunk-ENJZEWWP.mjs} +2 -2
- package/dist/{chunk-CS7XAMRZ.js → chunk-ESCAEH5S.js} +2 -2
- package/dist/chunk-I3T42HZ4.js +262 -0
- package/dist/{chunk-3D34OZXV.mjs → chunk-IQCKAFLI.mjs} +3 -3
- package/dist/{chunk-DOKEDIHC.mjs → chunk-JPKUU56U.mjs} +3 -3
- package/dist/{chunk-DQ66YFHA.js → chunk-KAC75BBW.js} +5 -5
- package/dist/{chunk-COOQTBNS.mjs → chunk-MAOGR4ZA.mjs} +5 -5
- package/dist/chunk-MUN3IQVG.mjs +265 -0
- package/dist/chunk-N5B4PUK6.mjs +209 -0
- package/dist/{chunk-GWFET2SG.mjs → chunk-NTAV5AUH.mjs} +1 -1
- package/dist/chunk-WNKYNP5G.js +209 -0
- package/dist/{chunk-6YI6SWWG.mjs → chunk-XTLKKAUD.mjs} +1 -1
- package/dist/{chunk-4RMMRGT6.mjs → chunk-ZKRNXBH6.mjs} +1 -1
- package/dist/executors.js +4 -4
- package/dist/executors.mjs +6 -6
- package/dist/generators.js +5 -5
- package/dist/generators.mjs +5 -5
- package/dist/index.js +12 -12
- package/dist/index.mjs +16 -16
- package/dist/src/executors/cloudflare-publish/executor.js +2 -2
- package/dist/src/executors/cloudflare-publish/executor.mjs +4 -4
- package/dist/src/executors/r2-upload-publish/executor.js +4 -4
- package/dist/src/executors/r2-upload-publish/executor.mjs +4 -4
- package/dist/src/executors/serve/executor.js +3 -3
- 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 +2 -2
- package/dist/src/generators/worker/generator.js +4 -4
- package/dist/src/generators/worker/generator.mjs +4 -4
- package/dist/src/utils/index.mjs +1 -1
- package/dist/src/utils/r2-bucket-helpers.mjs +1 -1
- package/dist/tsup.config.mjs +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getInternalDependencies,
|
|
3
|
+
r2UploadFile
|
|
4
|
+
} from "./chunk-IANDAPQS.mjs";
|
|
5
|
+
import {
|
|
6
|
+
createCliOptions,
|
|
7
|
+
getPackageInfo
|
|
8
|
+
} from "./chunk-PH3DHY4Q.mjs";
|
|
9
|
+
import {
|
|
10
|
+
findWorkspaceRoot,
|
|
11
|
+
getConfig
|
|
12
|
+
} from "./chunk-XTLKKAUD.mjs";
|
|
13
|
+
import {
|
|
14
|
+
writeDebug,
|
|
15
|
+
writeInfo,
|
|
16
|
+
writeSuccess,
|
|
17
|
+
writeWarning
|
|
18
|
+
} from "./chunk-V44DYGWX.mjs";
|
|
19
|
+
|
|
20
|
+
// src/executors/r2-upload-publish/executor.ts
|
|
21
|
+
import { S3 } from "@aws-sdk/client-s3";
|
|
22
|
+
import {
|
|
23
|
+
createProjectGraphAsync,
|
|
24
|
+
joinPathFragments,
|
|
25
|
+
readCachedProjectGraph
|
|
26
|
+
} from "@nx/devkit";
|
|
27
|
+
import { glob } from "glob";
|
|
28
|
+
import { execSync } from "node:child_process";
|
|
29
|
+
import { readFile } from "node:fs/promises";
|
|
30
|
+
async function runExecutor(options, context) {
|
|
31
|
+
const isDryRun = process.env.NX_DRY_RUN === "true" || options.dryRun || false;
|
|
32
|
+
if (!context.projectName) {
|
|
33
|
+
throw new Error("The executor requires a projectName.");
|
|
34
|
+
}
|
|
35
|
+
console.info(
|
|
36
|
+
`\u{1F680} Running Storm Cloudflare Publish executor on the ${context.projectName} worker`
|
|
37
|
+
);
|
|
38
|
+
if (!context.projectName || !context.projectsConfigurations?.projects || !context.projectsConfigurations.projects[context.projectName] || !context.projectsConfigurations.projects[context.projectName]?.root) {
|
|
39
|
+
throw new Error("The executor requires projectsConfigurations.");
|
|
40
|
+
}
|
|
41
|
+
try {
|
|
42
|
+
const workspaceRoot = findWorkspaceRoot();
|
|
43
|
+
const config = await getConfig(workspaceRoot);
|
|
44
|
+
const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
|
|
45
|
+
const projectName = context.projectsConfigurations.projects[context.projectName]?.name ?? context.projectName;
|
|
46
|
+
const projectDetails = getPackageInfo(
|
|
47
|
+
context.projectsConfigurations.projects[context.projectName]
|
|
48
|
+
);
|
|
49
|
+
if (!projectDetails?.content) {
|
|
50
|
+
throw new Error(
|
|
51
|
+
`Could not find the project details for ${context.projectName}`
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
const args = createCliOptions({ ...options });
|
|
55
|
+
if (isDryRun) {
|
|
56
|
+
args.push("--dry-run");
|
|
57
|
+
}
|
|
58
|
+
const cloudflareAccountId = process.env.STORM_BOT_CLOUDFLARE_ACCOUNT;
|
|
59
|
+
if (!options?.registry && !cloudflareAccountId) {
|
|
60
|
+
throw new Error(
|
|
61
|
+
"The Storm Registry URL is not set in the Storm config. Please set either the `extensions.cyclone.registry` or `config.extensions.cyclone.accountId` property in the Storm config."
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
if (!process.env.AWS_ACCESS_KEY_ID || !process.env.AWS_SECRET_ACCESS_KEY) {
|
|
65
|
+
throw new Error(
|
|
66
|
+
"The AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables are not set. Please set these environment variables to upload to the Cyclone Registry."
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
const endpoint = options?.registry ? options.registry : `https://${cloudflareAccountId}.r2.cloudflarestorage.com`;
|
|
70
|
+
let projectGraph;
|
|
71
|
+
try {
|
|
72
|
+
projectGraph = readCachedProjectGraph();
|
|
73
|
+
} catch {
|
|
74
|
+
await createProjectGraphAsync();
|
|
75
|
+
projectGraph = readCachedProjectGraph();
|
|
76
|
+
}
|
|
77
|
+
if (!projectGraph) {
|
|
78
|
+
throw new Error(
|
|
79
|
+
"The executor failed because the project graph is not available. Please run the build command again."
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
writeInfo(
|
|
83
|
+
`Publishing ${context.projectName} to the Storm Registry at ${endpoint}`
|
|
84
|
+
);
|
|
85
|
+
const s3Client = new S3({
|
|
86
|
+
region: "auto",
|
|
87
|
+
endpoint,
|
|
88
|
+
credentials: {
|
|
89
|
+
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
|
|
90
|
+
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
const version = projectDetails.content?.version;
|
|
94
|
+
writeInfo(`Generated component version: ${version}`);
|
|
95
|
+
const files = await glob(joinPathFragments(sourceRoot, "**/*"), {
|
|
96
|
+
ignore: "**/{*.stories.tsx,*.stories.ts,*.spec.tsx,*.spec.ts}"
|
|
97
|
+
});
|
|
98
|
+
const projectPath = `registry/${context.projectName}`;
|
|
99
|
+
const internalDependencies = await getInternalDependencies(
|
|
100
|
+
context.projectName,
|
|
101
|
+
projectGraph
|
|
102
|
+
);
|
|
103
|
+
const dependencies = internalDependencies.filter(
|
|
104
|
+
(projectNode) => !projectNode.data.tags || projectNode.data.tags.every((tag) => tag.toLowerCase() !== "component")
|
|
105
|
+
).reduce((ret, dep) => {
|
|
106
|
+
if (!ret[dep.name]) {
|
|
107
|
+
ret[dep.name] = "latest";
|
|
108
|
+
}
|
|
109
|
+
return ret;
|
|
110
|
+
}, projectDetails.content.dependencies ?? {});
|
|
111
|
+
const release = options.tag ?? execSync("npm config get tag").toString().trim();
|
|
112
|
+
writeInfo(`Clearing out existing items in ${projectPath}`);
|
|
113
|
+
if (!isDryRun) {
|
|
114
|
+
const response = await s3Client.listObjects({
|
|
115
|
+
Bucket: options.bucketId,
|
|
116
|
+
Prefix: projectPath
|
|
117
|
+
});
|
|
118
|
+
if (response?.Contents && response.Contents.length > 0) {
|
|
119
|
+
writeDebug(
|
|
120
|
+
`Deleting the following existing items from the component registry: ${response.Contents.map((item) => item.Key).join(", ")}`
|
|
121
|
+
);
|
|
122
|
+
await Promise.all(
|
|
123
|
+
response.Contents.map(
|
|
124
|
+
(item) => s3Client.deleteObjects({
|
|
125
|
+
Bucket: options.bucketId,
|
|
126
|
+
Delete: {
|
|
127
|
+
Objects: [
|
|
128
|
+
{
|
|
129
|
+
Key: item.Key
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
Quiet: false
|
|
133
|
+
}
|
|
134
|
+
})
|
|
135
|
+
)
|
|
136
|
+
);
|
|
137
|
+
} else {
|
|
138
|
+
writeDebug(
|
|
139
|
+
`No existing items to delete in the component registry path ${projectPath}`
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
} else {
|
|
143
|
+
writeWarning("[Dry run]: skipping upload to the Cyclone Registry.");
|
|
144
|
+
}
|
|
145
|
+
const meta = {
|
|
146
|
+
name: context.projectName,
|
|
147
|
+
version,
|
|
148
|
+
release,
|
|
149
|
+
description: projectDetails.content.description,
|
|
150
|
+
tags: projectDetails.content.keywords,
|
|
151
|
+
dependencies,
|
|
152
|
+
devDependencies: null,
|
|
153
|
+
internalDependencies: internalDependencies.filter(
|
|
154
|
+
(projectNode) => projectNode.data.tags && projectNode.data.tags.some((tag) => tag.toLowerCase() === "component")
|
|
155
|
+
).map((dep) => dep.name)
|
|
156
|
+
};
|
|
157
|
+
if (projectDetails.type === "package.json") {
|
|
158
|
+
meta.devDependencies = projectDetails.content.devDependencies;
|
|
159
|
+
}
|
|
160
|
+
const metaJson = JSON.stringify(meta);
|
|
161
|
+
writeInfo(`Generating meta.json file:
|
|
162
|
+
${metaJson}`);
|
|
163
|
+
await r2UploadFile(
|
|
164
|
+
s3Client,
|
|
165
|
+
options.bucketId,
|
|
166
|
+
projectPath,
|
|
167
|
+
"meta.json",
|
|
168
|
+
version,
|
|
169
|
+
metaJson,
|
|
170
|
+
"application/json",
|
|
171
|
+
isDryRun
|
|
172
|
+
);
|
|
173
|
+
await Promise.all(
|
|
174
|
+
files.map((file) => {
|
|
175
|
+
const fileName = file.replaceAll("\\", "/").replace(sourceRoot.replaceAll("\\", "/"), "");
|
|
176
|
+
return readFile(file, { encoding: "utf8" }).then(
|
|
177
|
+
(fileContent) => r2UploadFile(
|
|
178
|
+
s3Client,
|
|
179
|
+
options.bucketId,
|
|
180
|
+
projectPath,
|
|
181
|
+
fileName,
|
|
182
|
+
version,
|
|
183
|
+
fileContent,
|
|
184
|
+
"text/plain",
|
|
185
|
+
isDryRun
|
|
186
|
+
)
|
|
187
|
+
);
|
|
188
|
+
})
|
|
189
|
+
);
|
|
190
|
+
writeSuccess(
|
|
191
|
+
`Successfully uploaded the ${projectName} component to the Cyclone Registry`,
|
|
192
|
+
config
|
|
193
|
+
);
|
|
194
|
+
return {
|
|
195
|
+
success: true
|
|
196
|
+
};
|
|
197
|
+
} catch (error) {
|
|
198
|
+
console.error("Failed to publish to Cloudflare Workers Registry");
|
|
199
|
+
console.error(error);
|
|
200
|
+
console.log("");
|
|
201
|
+
return {
|
|
202
|
+
success: false
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export {
|
|
208
|
+
runExecutor
|
|
209
|
+
};
|
|
@@ -0,0 +1,209 @@
|
|
|
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
|
+
|
|
4
|
+
var _chunkNCQM44P3js = require('./chunk-NCQM44P3.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunkNU34IEWNjs = require('./chunk-NU34IEWN.js');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunkACJLPNZQjs = require('./chunk-ACJLPNZQ.js');
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
var _chunk2CDSXWFAjs = require('./chunk-2CDSXWFA.js');
|
|
19
|
+
|
|
20
|
+
// src/executors/r2-upload-publish/executor.ts
|
|
21
|
+
var _clients3 = require('@aws-sdk/client-s3');
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
var _devkit = require('@nx/devkit');
|
|
27
|
+
var _glob = require('glob');
|
|
28
|
+
var _child_process = require('child_process');
|
|
29
|
+
var _promises = require('fs/promises');
|
|
30
|
+
async function runExecutor(options, context) {
|
|
31
|
+
const isDryRun = process.env.NX_DRY_RUN === "true" || options.dryRun || false;
|
|
32
|
+
if (!context.projectName) {
|
|
33
|
+
throw new Error("The executor requires a projectName.");
|
|
34
|
+
}
|
|
35
|
+
console.info(
|
|
36
|
+
`\u{1F680} Running Storm Cloudflare Publish executor on the ${context.projectName} worker`
|
|
37
|
+
);
|
|
38
|
+
if (!context.projectName || !_optionalChain([context, 'access', _ => _.projectsConfigurations, 'optionalAccess', _2 => _2.projects]) || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _3 => _3.projectsConfigurations, 'access', _4 => _4.projects, 'access', _5 => _5[context.projectName], 'optionalAccess', _6 => _6.root])) {
|
|
39
|
+
throw new Error("The executor requires projectsConfigurations.");
|
|
40
|
+
}
|
|
41
|
+
try {
|
|
42
|
+
const workspaceRoot = _chunkACJLPNZQjs.findWorkspaceRoot.call(void 0, );
|
|
43
|
+
const config = await _chunkACJLPNZQjs.getConfig.call(void 0, workspaceRoot);
|
|
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
|
+
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
|
+
const projectDetails = _chunkNU34IEWNjs.getPackageInfo.call(void 0,
|
|
47
|
+
context.projectsConfigurations.projects[context.projectName]
|
|
48
|
+
);
|
|
49
|
+
if (!_optionalChain([projectDetails, 'optionalAccess', _15 => _15.content])) {
|
|
50
|
+
throw new Error(
|
|
51
|
+
`Could not find the project details for ${context.projectName}`
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
const args = _chunkNU34IEWNjs.createCliOptions.call(void 0, { ...options });
|
|
55
|
+
if (isDryRun) {
|
|
56
|
+
args.push("--dry-run");
|
|
57
|
+
}
|
|
58
|
+
const cloudflareAccountId = process.env.STORM_BOT_CLOUDFLARE_ACCOUNT;
|
|
59
|
+
if (!_optionalChain([options, 'optionalAccess', _16 => _16.registry]) && !cloudflareAccountId) {
|
|
60
|
+
throw new Error(
|
|
61
|
+
"The Storm Registry URL is not set in the Storm config. Please set either the `extensions.cyclone.registry` or `config.extensions.cyclone.accountId` property in the Storm config."
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
if (!process.env.AWS_ACCESS_KEY_ID || !process.env.AWS_SECRET_ACCESS_KEY) {
|
|
65
|
+
throw new Error(
|
|
66
|
+
"The AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables are not set. Please set these environment variables to upload to the Cyclone Registry."
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
const endpoint = _optionalChain([options, 'optionalAccess', _17 => _17.registry]) ? options.registry : `https://${cloudflareAccountId}.r2.cloudflarestorage.com`;
|
|
70
|
+
let projectGraph;
|
|
71
|
+
try {
|
|
72
|
+
projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
|
|
73
|
+
} catch (e) {
|
|
74
|
+
await _devkit.createProjectGraphAsync.call(void 0, );
|
|
75
|
+
projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
|
|
76
|
+
}
|
|
77
|
+
if (!projectGraph) {
|
|
78
|
+
throw new Error(
|
|
79
|
+
"The executor failed because the project graph is not available. Please run the build command again."
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
_chunk2CDSXWFAjs.writeInfo.call(void 0,
|
|
83
|
+
`Publishing ${context.projectName} to the Storm Registry at ${endpoint}`
|
|
84
|
+
);
|
|
85
|
+
const s3Client = new (0, _clients3.S3)({
|
|
86
|
+
region: "auto",
|
|
87
|
+
endpoint,
|
|
88
|
+
credentials: {
|
|
89
|
+
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
|
|
90
|
+
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
const version = _optionalChain([projectDetails, 'access', _18 => _18.content, 'optionalAccess', _19 => _19.version]);
|
|
94
|
+
_chunk2CDSXWFAjs.writeInfo.call(void 0, `Generated component version: ${version}`);
|
|
95
|
+
const files = await _glob.glob.call(void 0, _devkit.joinPathFragments.call(void 0, sourceRoot, "**/*"), {
|
|
96
|
+
ignore: "**/{*.stories.tsx,*.stories.ts,*.spec.tsx,*.spec.ts}"
|
|
97
|
+
});
|
|
98
|
+
const projectPath = `registry/${context.projectName}`;
|
|
99
|
+
const internalDependencies = await _chunkNCQM44P3js.getInternalDependencies.call(void 0,
|
|
100
|
+
context.projectName,
|
|
101
|
+
projectGraph
|
|
102
|
+
);
|
|
103
|
+
const dependencies = internalDependencies.filter(
|
|
104
|
+
(projectNode) => !projectNode.data.tags || projectNode.data.tags.every((tag) => tag.toLowerCase() !== "component")
|
|
105
|
+
).reduce((ret, dep) => {
|
|
106
|
+
if (!ret[dep.name]) {
|
|
107
|
+
ret[dep.name] = "latest";
|
|
108
|
+
}
|
|
109
|
+
return ret;
|
|
110
|
+
}, _nullishCoalesce(projectDetails.content.dependencies, () => ( {})));
|
|
111
|
+
const release = _nullishCoalesce(options.tag, () => ( _child_process.execSync.call(void 0, "npm config get tag").toString().trim()));
|
|
112
|
+
_chunk2CDSXWFAjs.writeInfo.call(void 0, `Clearing out existing items in ${projectPath}`);
|
|
113
|
+
if (!isDryRun) {
|
|
114
|
+
const response = await s3Client.listObjects({
|
|
115
|
+
Bucket: options.bucketId,
|
|
116
|
+
Prefix: projectPath
|
|
117
|
+
});
|
|
118
|
+
if (_optionalChain([response, 'optionalAccess', _20 => _20.Contents]) && response.Contents.length > 0) {
|
|
119
|
+
_chunk2CDSXWFAjs.writeDebug.call(void 0,
|
|
120
|
+
`Deleting the following existing items from the component registry: ${response.Contents.map((item) => item.Key).join(", ")}`
|
|
121
|
+
);
|
|
122
|
+
await Promise.all(
|
|
123
|
+
response.Contents.map(
|
|
124
|
+
(item) => s3Client.deleteObjects({
|
|
125
|
+
Bucket: options.bucketId,
|
|
126
|
+
Delete: {
|
|
127
|
+
Objects: [
|
|
128
|
+
{
|
|
129
|
+
Key: item.Key
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
Quiet: false
|
|
133
|
+
}
|
|
134
|
+
})
|
|
135
|
+
)
|
|
136
|
+
);
|
|
137
|
+
} else {
|
|
138
|
+
_chunk2CDSXWFAjs.writeDebug.call(void 0,
|
|
139
|
+
`No existing items to delete in the component registry path ${projectPath}`
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
} else {
|
|
143
|
+
_chunk2CDSXWFAjs.writeWarning.call(void 0, "[Dry run]: skipping upload to the Cyclone Registry.");
|
|
144
|
+
}
|
|
145
|
+
const meta = {
|
|
146
|
+
name: context.projectName,
|
|
147
|
+
version,
|
|
148
|
+
release,
|
|
149
|
+
description: projectDetails.content.description,
|
|
150
|
+
tags: projectDetails.content.keywords,
|
|
151
|
+
dependencies,
|
|
152
|
+
devDependencies: null,
|
|
153
|
+
internalDependencies: internalDependencies.filter(
|
|
154
|
+
(projectNode) => projectNode.data.tags && projectNode.data.tags.some((tag) => tag.toLowerCase() === "component")
|
|
155
|
+
).map((dep) => dep.name)
|
|
156
|
+
};
|
|
157
|
+
if (projectDetails.type === "package.json") {
|
|
158
|
+
meta.devDependencies = projectDetails.content.devDependencies;
|
|
159
|
+
}
|
|
160
|
+
const metaJson = JSON.stringify(meta);
|
|
161
|
+
_chunk2CDSXWFAjs.writeInfo.call(void 0, `Generating meta.json file:
|
|
162
|
+
${metaJson}`);
|
|
163
|
+
await _chunkNCQM44P3js.r2UploadFile.call(void 0,
|
|
164
|
+
s3Client,
|
|
165
|
+
options.bucketId,
|
|
166
|
+
projectPath,
|
|
167
|
+
"meta.json",
|
|
168
|
+
version,
|
|
169
|
+
metaJson,
|
|
170
|
+
"application/json",
|
|
171
|
+
isDryRun
|
|
172
|
+
);
|
|
173
|
+
await Promise.all(
|
|
174
|
+
files.map((file) => {
|
|
175
|
+
const fileName = file.replaceAll("\\", "/").replace(sourceRoot.replaceAll("\\", "/"), "");
|
|
176
|
+
return _promises.readFile.call(void 0, file, { encoding: "utf8" }).then(
|
|
177
|
+
(fileContent) => _chunkNCQM44P3js.r2UploadFile.call(void 0,
|
|
178
|
+
s3Client,
|
|
179
|
+
options.bucketId,
|
|
180
|
+
projectPath,
|
|
181
|
+
fileName,
|
|
182
|
+
version,
|
|
183
|
+
fileContent,
|
|
184
|
+
"text/plain",
|
|
185
|
+
isDryRun
|
|
186
|
+
)
|
|
187
|
+
);
|
|
188
|
+
})
|
|
189
|
+
);
|
|
190
|
+
_chunk2CDSXWFAjs.writeSuccess.call(void 0,
|
|
191
|
+
`Successfully uploaded the ${projectName} component to the Cyclone Registry`,
|
|
192
|
+
config
|
|
193
|
+
);
|
|
194
|
+
return {
|
|
195
|
+
success: true
|
|
196
|
+
};
|
|
197
|
+
} catch (error) {
|
|
198
|
+
console.error("Failed to publish to Cloudflare Workers Registry");
|
|
199
|
+
console.error(error);
|
|
200
|
+
console.log("");
|
|
201
|
+
return {
|
|
202
|
+
success: false
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
exports.runExecutor = runExecutor;
|
|
@@ -228,7 +228,7 @@ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
|
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
// ../config/src/schema.ts
|
|
231
|
-
import * as z from "zod
|
|
231
|
+
import * as z from "zod";
|
|
232
232
|
|
|
233
233
|
// ../config/src/constants.ts
|
|
234
234
|
var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
|
|
@@ -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=751a554d775c3572381af4e7e5fa22eeda6dd6856012fb1cf521d6806eb2dc74__ddb3b66b5bfdfee432784e29054df212/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);
|
package/dist/executors.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";require('./chunk-XO66D74Z.js');
|
|
2
2
|
require('./chunk-IRORGRVZ.js');
|
|
3
|
-
require('./chunk-
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-NCQM44P3.js');
|
|
3
|
+
require('./chunk-KAC75BBW.js');
|
|
4
|
+
require('./chunk-3SANBYBY.js');
|
|
6
5
|
require('./chunk-NU34IEWN.js');
|
|
7
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-NCQM44P3.js');
|
|
7
|
+
require('./chunk-ACJLPNZQ.js');
|
|
8
8
|
require('./chunk-2CDSXWFA.js');
|
|
9
9
|
require('./chunk-MCKGQKYU.js');
|
package/dist/executors.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./chunk-YSCEY447.mjs";
|
|
2
|
-
import "./chunk-
|
|
3
|
-
import "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-IANDAPQS.mjs";
|
|
2
|
+
import "./chunk-NTAV5AUH.mjs";
|
|
3
|
+
import "./chunk-MAOGR4ZA.mjs";
|
|
4
|
+
import "./chunk-ENJZEWWP.mjs";
|
|
6
5
|
import "./chunk-PH3DHY4Q.mjs";
|
|
7
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-IANDAPQS.mjs";
|
|
7
|
+
import "./chunk-XTLKKAUD.mjs";
|
|
8
8
|
import "./chunk-V44DYGWX.mjs";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-ZKRNXBH6.mjs";
|
package/dist/generators.js
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkAV3F7R3Sjs = require('./chunk-AV3F7R3S.js');
|
|
6
|
+
require('./chunk-ACJLPNZQ.js');
|
|
7
|
+
require('./chunk-2CDSXWFA.js');
|
|
6
8
|
|
|
7
9
|
|
|
8
10
|
|
|
9
|
-
var
|
|
10
|
-
require('./chunk-AMJC7IYY.js');
|
|
11
|
-
require('./chunk-2CDSXWFA.js');
|
|
11
|
+
var _chunkESCAEH5Sjs = require('./chunk-ESCAEH5S.js');
|
|
12
12
|
require('./chunk-MCKGQKYU.js');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
exports.applicationGenerator =
|
|
18
|
+
exports.applicationGenerator = _chunkAV3F7R3Sjs.applicationGenerator; exports.applicationSchematic = _chunkAV3F7R3Sjs.applicationSchematic; exports.initGenerator = _chunkESCAEH5Sjs.initGenerator; exports.initSchematic = _chunkESCAEH5Sjs.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-MUN3IQVG.mjs";
|
|
6
|
+
import "./chunk-XTLKKAUD.mjs";
|
|
7
|
+
import "./chunk-V44DYGWX.mjs";
|
|
6
8
|
import {
|
|
7
9
|
initGenerator,
|
|
8
10
|
initSchematic
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-V44DYGWX.mjs";
|
|
12
|
-
import "./chunk-4RMMRGT6.mjs";
|
|
11
|
+
} from "./chunk-JPKUU56U.mjs";
|
|
12
|
+
import "./chunk-ZKRNXBH6.mjs";
|
|
13
13
|
export {
|
|
14
14
|
applicationGenerator,
|
|
15
15
|
applicationSchematic,
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }require('./chunk-XO66D74Z.js');
|
|
2
|
-
require('./chunk-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _chunkJWF57AVGjs = require('./chunk-JWF57AVG.js');
|
|
2
|
+
require('./chunk-IRORGRVZ.js');
|
|
3
|
+
require('./chunk-KAC75BBW.js');
|
|
4
|
+
require('./chunk-3SANBYBY.js');
|
|
7
5
|
|
|
8
6
|
|
|
9
7
|
|
|
10
|
-
var
|
|
8
|
+
var _chunkNU34IEWNjs = require('./chunk-NU34IEWN.js');
|
|
9
|
+
require('./chunk-DHBG5ASJ.js');
|
|
11
10
|
require('./chunk-CVGPWUNP.js');
|
|
12
|
-
require('./chunk-IRORGRVZ.js');
|
|
13
|
-
require('./chunk-Q4LQ5PPN.js');
|
|
14
|
-
require('./chunk-DQ66YFHA.js');
|
|
15
11
|
|
|
16
12
|
|
|
17
13
|
|
|
@@ -19,9 +15,13 @@ var _chunkNCQM44P3js = require('./chunk-NCQM44P3.js');
|
|
|
19
15
|
|
|
20
16
|
|
|
21
17
|
|
|
22
|
-
var
|
|
23
|
-
require('./chunk-
|
|
18
|
+
var _chunkAV3F7R3Sjs = require('./chunk-AV3F7R3S.js');
|
|
19
|
+
require('./chunk-ACJLPNZQ.js');
|
|
24
20
|
require('./chunk-2CDSXWFA.js');
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
var _chunkESCAEH5Sjs = require('./chunk-ESCAEH5S.js');
|
|
25
25
|
require('./chunk-MCKGQKYU.js');
|
|
26
26
|
|
|
27
27
|
// src/plugins/index.ts
|
|
@@ -163,4 +163,4 @@ function createPackageJson(projectJsonPath, workspaceRoot) {
|
|
|
163
163
|
|
|
164
164
|
|
|
165
165
|
|
|
166
|
-
exports.applicationGenerator =
|
|
166
|
+
exports.applicationGenerator = _chunkAV3F7R3Sjs.applicationGenerator; exports.applicationSchematic = _chunkAV3F7R3Sjs.applicationSchematic; exports.createNodesV2 = createNodesV2; exports.getInternalDependencies = _chunkNCQM44P3js.getInternalDependencies; exports.initGenerator = _chunkESCAEH5Sjs.initGenerator; exports.initSchematic = _chunkESCAEH5Sjs.initSchematic; exports.name = name; exports.r2UploadFile = _chunkNCQM44P3js.r2UploadFile;
|
package/dist/index.mjs
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import "./chunk-YSCEY447.mjs";
|
|
2
|
-
import "./chunk-
|
|
2
|
+
import "./chunk-NTAV5AUH.mjs";
|
|
3
|
+
import "./chunk-MAOGR4ZA.mjs";
|
|
4
|
+
import "./chunk-ENJZEWWP.mjs";
|
|
3
5
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import
|
|
8
|
-
initGenerator,
|
|
9
|
-
initSchematic
|
|
10
|
-
} from "./chunk-DOKEDIHC.mjs";
|
|
6
|
+
ProjectTagConstants,
|
|
7
|
+
addProjectTag
|
|
8
|
+
} from "./chunk-PH3DHY4Q.mjs";
|
|
9
|
+
import "./chunk-3J7KBHMJ.mjs";
|
|
11
10
|
import "./chunk-7Z5PILRU.mjs";
|
|
12
|
-
import "./chunk-GWFET2SG.mjs";
|
|
13
|
-
import "./chunk-KQ2FYXAH.mjs";
|
|
14
|
-
import "./chunk-COOQTBNS.mjs";
|
|
15
11
|
import {
|
|
16
12
|
getInternalDependencies,
|
|
17
13
|
r2UploadFile
|
|
18
14
|
} from "./chunk-IANDAPQS.mjs";
|
|
19
15
|
import {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
16
|
+
applicationGenerator,
|
|
17
|
+
applicationSchematic
|
|
18
|
+
} from "./chunk-MUN3IQVG.mjs";
|
|
19
|
+
import "./chunk-XTLKKAUD.mjs";
|
|
24
20
|
import "./chunk-V44DYGWX.mjs";
|
|
25
|
-
import
|
|
21
|
+
import {
|
|
22
|
+
initGenerator,
|
|
23
|
+
initSchematic
|
|
24
|
+
} from "./chunk-JPKUU56U.mjs";
|
|
25
|
+
import "./chunk-ZKRNXBH6.mjs";
|
|
26
26
|
|
|
27
27
|
// src/plugins/index.ts
|
|
28
28
|
import {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
var _chunkIRORGRVZjs = require('../../../chunk-IRORGRVZ.js');
|
|
4
|
-
require('../../../chunk-
|
|
4
|
+
require('../../../chunk-3SANBYBY.js');
|
|
5
5
|
require('../../../chunk-NU34IEWN.js');
|
|
6
|
-
require('../../../chunk-
|
|
6
|
+
require('../../../chunk-ACJLPNZQ.js');
|
|
7
7
|
require('../../../chunk-2CDSXWFA.js');
|
|
8
8
|
require('../../../chunk-MCKGQKYU.js');
|
|
9
9
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runExecutor
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import "../../../chunk-
|
|
3
|
+
} from "../../../chunk-NTAV5AUH.mjs";
|
|
4
|
+
import "../../../chunk-ENJZEWWP.mjs";
|
|
5
5
|
import "../../../chunk-PH3DHY4Q.mjs";
|
|
6
|
-
import "../../../chunk-
|
|
6
|
+
import "../../../chunk-XTLKKAUD.mjs";
|
|
7
7
|
import "../../../chunk-V44DYGWX.mjs";
|
|
8
|
-
import "../../../chunk-
|
|
8
|
+
import "../../../chunk-ZKRNXBH6.mjs";
|
|
9
9
|
export {
|
|
10
10
|
runExecutor as default
|
|
11
11
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../../chunk-NCQM44P3.js');
|
|
3
|
+
var _chunkKAC75BBWjs = require('../../../chunk-KAC75BBW.js');
|
|
5
4
|
require('../../../chunk-NU34IEWN.js');
|
|
6
|
-
require('../../../chunk-
|
|
5
|
+
require('../../../chunk-NCQM44P3.js');
|
|
6
|
+
require('../../../chunk-ACJLPNZQ.js');
|
|
7
7
|
require('../../../chunk-2CDSXWFA.js');
|
|
8
8
|
require('../../../chunk-MCKGQKYU.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.default =
|
|
11
|
+
exports.default = _chunkKAC75BBWjs.runExecutor;
|