@storm-software/cloudflare-tools 0.71.36 → 0.71.37
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 +13 -0
- package/dist/{chunk-4RYJLPOF.mjs → chunk-2WG2QCJL.mjs} +3 -3
- package/dist/{chunk-Z2D7AKMD.mjs → chunk-3X7BL5DM.mjs} +1 -1
- package/dist/{chunk-XRUTB3YT.mjs → chunk-H7RE75NB.mjs} +4 -4
- package/dist/{chunk-G4ZCI2MN.mjs → chunk-I4GOWUAO.mjs} +16 -1
- package/dist/{chunk-4WRUZBE7.mjs → chunk-KPNOOEOX.mjs} +3 -3
- package/dist/{chunk-5GILNZWS.js → chunk-OGBWI4VY.js} +49 -34
- package/dist/{chunk-TPNHSNNZ.mjs → chunk-OJTNJ73Z.mjs} +4 -2
- package/dist/{chunk-WJNXHOQX.js → chunk-RUZIID5D.js} +4 -4
- package/dist/{chunk-VZQDXTIP.js → chunk-TMS3UPJ5.js} +5 -5
- package/dist/{chunk-Z2WQB55R.js → chunk-TTK2XCGF.js} +4 -2
- package/dist/{chunk-GIZHFP3I.mjs → chunk-ULPCX6TC.mjs} +2 -2
- package/dist/{chunk-UQBLSDWU.js → chunk-WRTJQVDN.js} +18 -18
- package/dist/{chunk-ZAGSYBDS.js → chunk-YBP3FYOW.js} +12 -12
- package/dist/{chunk-IVVRVG36.js → chunk-YOQ5PYLY.js} +165 -165
- 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 +5 -5
|
@@ -5,7 +5,7 @@ var _chunkKUGEZPUOjs = require('./chunk-KUGEZPUO.js');
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkTMS3UPJ5js = require('./chunk-TMS3UPJ5.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -13,7 +13,7 @@ var _chunkN7FW365Qjs = require('./chunk-N7FW365Q.js');
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkOGBWI4VYjs = require('./chunk-OGBWI4VY.js');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
@@ -21,7 +21,7 @@ var _chunk5GILNZWSjs = require('./chunk-5GILNZWS.js');
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunkTTK2XCGFjs = require('./chunk-TTK2XCGF.js');
|
|
25
25
|
|
|
26
26
|
// src/executors/r2-upload-publish/executor.ts
|
|
27
27
|
|
|
@@ -53,8 +53,8 @@ async function runExecutor(options, context) {
|
|
|
53
53
|
throw new Error("The executor requires projectsConfigurations.");
|
|
54
54
|
}
|
|
55
55
|
try {
|
|
56
|
-
const workspaceRoot =
|
|
57
|
-
const config = await
|
|
56
|
+
const workspaceRoot = _chunkOGBWI4VYjs.findWorkspaceRoot.call(void 0, );
|
|
57
|
+
const config = await _chunkOGBWI4VYjs.getConfig.call(void 0, workspaceRoot);
|
|
58
58
|
const projectName = _nullishCoalesce(_optionalChain([context, 'access', _7 => _7.projectsConfigurations, 'access', _8 => _8.projects, 'access', _9 => _9[context.projectName], 'optionalAccess', _10 => _10.name]), () => ( context.projectName));
|
|
59
59
|
const projectDetails = _chunkN7FW365Qjs.getPackageInfo.call(void 0,
|
|
60
60
|
context.projectsConfigurations.projects[context.projectName]
|
|
@@ -92,7 +92,7 @@ async function runExecutor(options, context) {
|
|
|
92
92
|
"The executor failed because the project graph is not available. Please run the build command again."
|
|
93
93
|
);
|
|
94
94
|
}
|
|
95
|
-
|
|
95
|
+
_chunkTTK2XCGFjs.writeDebug.call(void 0,
|
|
96
96
|
`Publishing ${context.projectName} to the ${bucketId} R2 Bucket (at ${registry})`
|
|
97
97
|
);
|
|
98
98
|
const client = new (0, _clients3.S3Client)({
|
|
@@ -108,13 +108,13 @@ async function runExecutor(options, context) {
|
|
|
108
108
|
});
|
|
109
109
|
const version = _optionalChain([projectDetails, 'optionalAccess', _13 => _13.content, 'optionalAccess', _14 => _14.version]);
|
|
110
110
|
if (version) {
|
|
111
|
-
|
|
111
|
+
_chunkTTK2XCGFjs.writeDebug.call(void 0, `Starting upload version ${version}`);
|
|
112
112
|
}
|
|
113
113
|
const basePath = options.path;
|
|
114
|
-
const files = await _glob.glob.call(void 0,
|
|
114
|
+
const files = await _glob.glob.call(void 0, _chunkTTK2XCGFjs.joinPaths.call(void 0, basePath, "**/*"), {
|
|
115
115
|
ignore: "**/{*.stories.tsx,*.stories.ts,*.spec.tsx,*.spec.ts}"
|
|
116
116
|
});
|
|
117
|
-
const internalDependencies = await
|
|
117
|
+
const internalDependencies = await _chunkTMS3UPJ5js.getInternalDependencies.call(void 0,
|
|
118
118
|
context.projectName,
|
|
119
119
|
projectGraph
|
|
120
120
|
);
|
|
@@ -128,7 +128,7 @@ async function runExecutor(options, context) {
|
|
|
128
128
|
}, _nullishCoalesce(_optionalChain([projectDetails, 'optionalAccess', _15 => _15.content, 'access', _16 => _16.dependencies]), () => ( {})));
|
|
129
129
|
const release = _nullishCoalesce(options.tag, () => ( _child_process.execSync.call(void 0, "npm config get tag").toString().trim()));
|
|
130
130
|
if (options.clean === true) {
|
|
131
|
-
|
|
131
|
+
_chunkTTK2XCGFjs.writeDebug.call(void 0, `Clearing out existing items in ${bucketPath}`);
|
|
132
132
|
if (!isDryRun) {
|
|
133
133
|
const response = await client.send(
|
|
134
134
|
new (0, _clients3.ListObjectsCommand)({
|
|
@@ -137,7 +137,7 @@ async function runExecutor(options, context) {
|
|
|
137
137
|
})
|
|
138
138
|
);
|
|
139
139
|
if (_optionalChain([response, 'optionalAccess', _17 => _17.Contents]) && response.Contents.length > 0) {
|
|
140
|
-
|
|
140
|
+
_chunkTTK2XCGFjs.writeTrace.call(void 0,
|
|
141
141
|
`Deleting the following existing items from the R2 bucket path ${bucketPath}: ${response.Contents.map((item) => item.Key).join(", ")}`
|
|
142
142
|
);
|
|
143
143
|
await client.send(
|
|
@@ -152,12 +152,12 @@ async function runExecutor(options, context) {
|
|
|
152
152
|
})
|
|
153
153
|
);
|
|
154
154
|
} else {
|
|
155
|
-
|
|
155
|
+
_chunkTTK2XCGFjs.writeDebug.call(void 0,
|
|
156
156
|
`No existing items to delete in the R2 bucket path ${bucketPath}`
|
|
157
157
|
);
|
|
158
158
|
}
|
|
159
159
|
} else {
|
|
160
|
-
|
|
160
|
+
_chunkTTK2XCGFjs.writeWarning.call(void 0, "[Dry run]: Skipping R2 bucket clean.");
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
if (options.writeMetaJson === true) {
|
|
@@ -178,7 +178,7 @@ async function runExecutor(options, context) {
|
|
|
178
178
|
if (_optionalChain([projectDetails, 'optionalAccess', _22 => _22.type]) === "package.json") {
|
|
179
179
|
meta.devDependencies = _optionalChain([projectDetails, 'optionalAccess', _23 => _23.content, 'optionalAccess', _24 => _24.devDependencies]);
|
|
180
180
|
}
|
|
181
|
-
await
|
|
181
|
+
await _chunkTMS3UPJ5js.uploadFile.call(void 0,
|
|
182
182
|
client,
|
|
183
183
|
bucketId,
|
|
184
184
|
bucketPath,
|
|
@@ -194,22 +194,22 @@ async function runExecutor(options, context) {
|
|
|
194
194
|
if (_optionalChain([_fs.statSync.call(void 0, file, {
|
|
195
195
|
throwIfNoEntry: false
|
|
196
196
|
}), 'optionalAccess', _25 => _25.isFile, 'call', _26 => _26()])) {
|
|
197
|
-
const name =
|
|
197
|
+
const name = _chunkTTK2XCGFjs.correctPaths.call(void 0, file).replace(_chunkTTK2XCGFjs.correctPaths.call(void 0, basePath), "");
|
|
198
198
|
const type = _mimetypes2.default.lookup(name) || "application/octet-stream";
|
|
199
|
-
await
|
|
199
|
+
await _chunkTMS3UPJ5js.uploadFile.call(void 0,
|
|
200
200
|
client,
|
|
201
201
|
bucketId,
|
|
202
202
|
bucketPath,
|
|
203
203
|
name,
|
|
204
204
|
version,
|
|
205
|
-
await _promises.readFile.call(void 0, file,
|
|
205
|
+
await _promises.readFile.call(void 0, file, _chunkTMS3UPJ5js.getEncoding.call(void 0, type)),
|
|
206
206
|
type,
|
|
207
207
|
isDryRun
|
|
208
208
|
);
|
|
209
209
|
}
|
|
210
210
|
})
|
|
211
211
|
);
|
|
212
|
-
|
|
212
|
+
_chunkTTK2XCGFjs.writeSuccess.call(void 0,
|
|
213
213
|
`Successfully uploaded the ${projectName} project to the Cloudflare R2 bucket.`,
|
|
214
214
|
config
|
|
215
215
|
);
|
|
@@ -1,10 +1,10 @@
|
|
|
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 _chunkRUZIID5Djs = require('./chunk-RUZIID5D.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkOGBWI4VYjs = require('./chunk-OGBWI4VY.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ var _chunk5GILNZWSjs = require('./chunk-5GILNZWS.js');
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkTTK2XCGFjs = require('./chunk-TTK2XCGF.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 = _chunkTTK2XCGFjs.getStopwatch.call(void 0, "Storm Worker generator");
|
|
49
49
|
let config;
|
|
50
50
|
try {
|
|
51
|
-
|
|
51
|
+
_chunkTTK2XCGFjs.writeInfo.call(void 0, `\u26A1 Running the Storm Worker generator...
|
|
52
52
|
|
|
53
53
|
`, config);
|
|
54
|
-
const workspaceRoot =
|
|
55
|
-
|
|
54
|
+
const workspaceRoot = _chunkOGBWI4VYjs.findWorkspaceRoot.call(void 0, );
|
|
55
|
+
_chunkTTK2XCGFjs.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 _chunkOGBWI4VYjs.getConfig.call(void 0, workspaceRoot);
|
|
61
|
+
_chunkTTK2XCGFjs.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 _chunkRUZIID5Djs.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
|
+
_chunkTTK2XCGFjs.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
|
+
_chunkTTK2XCGFjs.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}`,
|