@storm-software/cloudflare-tools 0.71.95 → 0.71.97
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 +25 -0
- package/README.md +1 -1
- package/dist/{chunk-XVKPJL76.mjs → chunk-25EIQBS4.mjs} +3 -3
- package/dist/{chunk-536H3WK5.mjs → chunk-3LRZKOV5.mjs} +2 -2
- package/dist/{chunk-GBAVURC4.js → chunk-3U6ZPFIV.js} +35 -35
- package/dist/{chunk-FVRCPE3R.mjs → chunk-5GHEIPID.mjs} +1 -1
- package/dist/{chunk-YQSDJFL7.mjs → chunk-CF5QUCIQ.mjs} +3 -3
- package/dist/{chunk-M2RRHQ7N.mjs → chunk-J4ATY6HP.mjs} +1 -1
- package/dist/chunk-LEDLOGWY.mjs +231 -0
- package/dist/{chunk-Z7TZ4UY6.mjs → chunk-M3VAGNJQ.mjs} +1 -1
- package/dist/{chunk-DVMBIPBR.mjs → chunk-NZNIYQSG.mjs} +8 -8
- package/dist/{chunk-L4HBUJPR.mjs → chunk-PEZ2T3XM.mjs} +6 -6
- package/dist/{chunk-URSIMVJI.js → chunk-QPHACFB6.js} +13 -13
- package/dist/{chunk-PVCPJUY2.js → chunk-RIBK362W.js} +2 -2
- package/dist/{chunk-JCQYTCUM.js → chunk-SIS5VQAU.js} +5 -5
- package/dist/chunk-U6MGVRZE.mjs +269 -0
- package/dist/{chunk-H5RIERY3.js → chunk-VXDMWPFN.js} +7 -7
- package/dist/chunk-YAKBHW4S.js +266 -0
- package/dist/{chunk-COUZEHRU.js → chunk-YFXBRQQM.js} +20 -20
- package/dist/{chunk-EXZP5MWY.mjs → chunk-ZDABHOZ2.mjs} +2 -2
- package/dist/{chunk-QY2K3DFK.js → chunk-ZGTWYJC7.js} +167 -167
- package/dist/chunk-ZSLL623D.js +231 -0
- package/dist/executors.js +6 -6
- package/dist/executors.mjs +8 -8
- package/dist/generators.js +5 -5
- package/dist/generators.mjs +5 -5
- package/dist/index.js +11 -11
- package/dist/index.mjs +15 -15
- package/dist/src/executors/cloudflare-publish/executor.js +3 -3
- package/dist/src/executors/cloudflare-publish/executor.mjs +5 -5
- package/dist/src/executors/r2-upload-publish/executor.js +6 -6
- package/dist/src/executors/r2-upload-publish/executor.mjs +6 -6
- package/dist/src/executors/serve/executor.js +4 -4
- package/dist/src/executors/serve/executor.mjs +4 -4
- 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 +5 -5
- package/dist/src/generators/worker/generator.mjs +5 -5
- package/dist/src/utils/http-handler.mjs +1 -1
- package/dist/src/utils/index.js +3 -3
- package/dist/src/utils/index.mjs +3 -3
- package/dist/src/utils/r2-bucket-helpers.js +3 -3
- package/dist/src/utils/r2-bucket-helpers.mjs +3 -3
- package/dist/tsup.config.mjs +1 -1
- package/package.json +8 -8
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
generator_default
|
|
3
|
-
} from "./chunk-DVMBIPBR.mjs";
|
|
4
1
|
import {
|
|
5
2
|
findWorkspaceRoot,
|
|
6
3
|
getConfig
|
|
7
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3LRZKOV5.mjs";
|
|
8
5
|
import {
|
|
9
6
|
brandIcon,
|
|
10
7
|
getStopwatch,
|
|
@@ -13,10 +10,13 @@ import {
|
|
|
13
10
|
writeFatal,
|
|
14
11
|
writeInfo,
|
|
15
12
|
writeTrace
|
|
16
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ZDABHOZ2.mjs";
|
|
14
|
+
import {
|
|
15
|
+
generator_default
|
|
16
|
+
} from "./chunk-NZNIYQSG.mjs";
|
|
17
17
|
import {
|
|
18
18
|
__dirname
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-5GHEIPID.mjs";
|
|
20
20
|
|
|
21
21
|
// src/generators/worker/generator.ts
|
|
22
22
|
import {
|
|
@@ -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 _chunkVXDMWPFNjs = require('./chunk-VXDMWPFN.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk3U6ZPFIVjs = require('./chunk-3U6ZPFIV.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -13,7 +13,7 @@ var _chunkGBAVURC4js = require('./chunk-GBAVURC4.js');
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkRIBK362Wjs = require('./chunk-RIBK362W.js');
|
|
17
17
|
|
|
18
18
|
// src/generators/worker/generator.ts
|
|
19
19
|
|
|
@@ -46,23 +46,23 @@ var vitestScript = `"test": "vitest run"`;
|
|
|
46
46
|
|
|
47
47
|
// src/generators/worker/generator.ts
|
|
48
48
|
async function applicationGenerator(tree, schema) {
|
|
49
|
-
const stopwatch =
|
|
49
|
+
const stopwatch = _chunkRIBK362Wjs.getStopwatch.call(void 0, "Storm Worker generator");
|
|
50
50
|
let config;
|
|
51
51
|
try {
|
|
52
|
-
const workspaceRoot =
|
|
53
|
-
config = await
|
|
54
|
-
|
|
55
|
-
`${
|
|
52
|
+
const workspaceRoot = _chunk3U6ZPFIVjs.findWorkspaceRoot.call(void 0, );
|
|
53
|
+
config = await _chunk3U6ZPFIVjs.getConfig.call(void 0, workspaceRoot);
|
|
54
|
+
_chunkRIBK362Wjs.writeInfo.call(void 0,
|
|
55
|
+
`${_chunkRIBK362Wjs.brandIcon.call(void 0, config)} Running the Storm Worker generator...
|
|
56
56
|
|
|
57
57
|
`,
|
|
58
58
|
config
|
|
59
59
|
);
|
|
60
|
-
|
|
60
|
+
_chunkRIBK362Wjs.writeDebug.call(void 0,
|
|
61
61
|
`Loading the Storm Config from environment variables and storm.json file...
|
|
62
62
|
- workspaceRoot: ${workspaceRoot}`,
|
|
63
63
|
config
|
|
64
64
|
);
|
|
65
|
-
|
|
65
|
+
_chunkRIBK362Wjs.writeTrace.call(void 0,
|
|
66
66
|
`Loaded Storm config into env:
|
|
67
67
|
${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`,
|
|
68
68
|
config
|
|
@@ -70,7 +70,7 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[
|
|
|
70
70
|
const options = await normalizeOptions(tree, schema, config);
|
|
71
71
|
const tasks = [];
|
|
72
72
|
tasks.push(
|
|
73
|
-
await
|
|
73
|
+
await _chunkVXDMWPFNjs.generator_default.call(void 0, tree, {
|
|
74
74
|
...options,
|
|
75
75
|
skipFormat: true
|
|
76
76
|
})
|
|
@@ -138,11 +138,11 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[
|
|
|
138
138
|
return _devkit.runTasksInSerial.call(void 0, ...tasks);
|
|
139
139
|
} catch (error) {
|
|
140
140
|
return () => {
|
|
141
|
-
|
|
141
|
+
_chunkRIBK362Wjs.writeFatal.call(void 0,
|
|
142
142
|
"A fatal error occurred while running the generator - the process was forced to terminate",
|
|
143
143
|
config
|
|
144
144
|
);
|
|
145
|
-
|
|
145
|
+
_chunkRIBK362Wjs.writeError.call(void 0,
|
|
146
146
|
`An exception was thrown in the generator's process
|
|
147
147
|
- Details: ${error.message}
|
|
148
148
|
- Stacktrace: ${error.stack}`,
|
|
@@ -41,7 +41,7 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
41
41
|
warning: "#e3b341",
|
|
42
42
|
danger: "#D8314A",
|
|
43
43
|
fatal: "#51070f",
|
|
44
|
-
performance: "#
|
|
44
|
+
performance: "#13c302",
|
|
45
45
|
link: "#3fa6ff",
|
|
46
46
|
positive: "#22c55e",
|
|
47
47
|
negative: "#dc2626",
|
|
@@ -59,7 +59,7 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
59
59
|
warning: "#f3d371",
|
|
60
60
|
danger: "#D8314A",
|
|
61
61
|
fatal: "#a40e26",
|
|
62
|
-
performance: "#
|
|
62
|
+
performance: "#80fd74",
|
|
63
63
|
link: "#3fa6ff",
|
|
64
64
|
positive: "#22c55e",
|
|
65
65
|
negative: "#dc2626",
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkRIBK362Wjs = require('./chunk-RIBK362W.js');
|
|
7
7
|
|
|
8
8
|
// src/utils/r2-bucket-helpers.ts
|
|
9
9
|
var _libstorage = require('@aws-sdk/lib-storage');
|
|
10
10
|
var _crypto = require('crypto');
|
|
11
11
|
var _prettybytes = require('pretty-bytes'); var _prettybytes2 = _interopRequireDefault(_prettybytes);
|
|
12
12
|
async function uploadFile(client, bucketName, bucketPath, fileName, version, fileContent, contentType = "application/octet-stream", isDryRun = false) {
|
|
13
|
-
const key = _optionalChain([(!_optionalChain([bucketPath, 'optionalAccess', _ => _.trim, 'call', _2 => _2()]) || _optionalChain([bucketPath, 'optionalAccess', _3 => _3.trim, 'call', _4 => _4()]) === "/" ? fileName :
|
|
14
|
-
|
|
13
|
+
const key = _optionalChain([(!_optionalChain([bucketPath, 'optionalAccess', _ => _.trim, 'call', _2 => _2()]) || _optionalChain([bucketPath, 'optionalAccess', _3 => _3.trim, 'call', _4 => _4()]) === "/" ? fileName : _chunkRIBK362Wjs.joinPaths.call(void 0, bucketPath.trim(), fileName)), 'optionalAccess', _5 => _5.replace, 'call', _6 => _6(/^\/+/g, "")]) || "";
|
|
14
|
+
_chunkRIBK362Wjs.writeDebug.call(void 0,
|
|
15
15
|
`Uploading ${key} (content-type: ${contentType}, size: ${_prettybytes2.default.call(void 0,
|
|
16
16
|
Buffer.byteLength(fileContent, getEncoding(contentType))
|
|
17
17
|
)}) to the ${bucketName} R2 bucket`
|
|
@@ -33,10 +33,10 @@ async function uploadFile(client, bucketName, bucketPath, fileName, version, fil
|
|
|
33
33
|
});
|
|
34
34
|
await upload.done();
|
|
35
35
|
} else {
|
|
36
|
-
|
|
36
|
+
_chunkRIBK362Wjs.writeWarning.call(void 0, "[Dry run]: Skipping upload to the R2 bucket.");
|
|
37
37
|
}
|
|
38
38
|
} catch (error) {
|
|
39
|
-
|
|
39
|
+
_chunkRIBK362Wjs.writeError.call(void 0, `Failed to upload ${key} to the ${bucketName} R2 bucket.`);
|
|
40
40
|
throw error;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import {
|
|
2
|
+
generator_default
|
|
3
|
+
} from "./chunk-NZNIYQSG.mjs";
|
|
4
|
+
import {
|
|
5
|
+
findWorkspaceRoot,
|
|
6
|
+
getConfig
|
|
7
|
+
} from "./chunk-3LRZKOV5.mjs";
|
|
8
|
+
import {
|
|
9
|
+
brandIcon,
|
|
10
|
+
getStopwatch,
|
|
11
|
+
writeDebug,
|
|
12
|
+
writeError,
|
|
13
|
+
writeFatal,
|
|
14
|
+
writeInfo,
|
|
15
|
+
writeTrace
|
|
16
|
+
} from "./chunk-ZDABHOZ2.mjs";
|
|
17
|
+
import {
|
|
18
|
+
__dirname
|
|
19
|
+
} from "./chunk-5GHEIPID.mjs";
|
|
20
|
+
|
|
21
|
+
// src/generators/worker/generator.ts
|
|
22
|
+
import {
|
|
23
|
+
convertNxGenerator,
|
|
24
|
+
ensurePackage,
|
|
25
|
+
formatFiles,
|
|
26
|
+
generateFiles,
|
|
27
|
+
joinPathFragments,
|
|
28
|
+
names,
|
|
29
|
+
readProjectConfiguration,
|
|
30
|
+
runTasksInSerial,
|
|
31
|
+
updateJson,
|
|
32
|
+
updateProjectConfiguration
|
|
33
|
+
} from "@nx/devkit";
|
|
34
|
+
import { determineProjectNameAndRootOptions } from "@nx/devkit/src/generators/project-name-and-root-utils";
|
|
35
|
+
import { applicationGenerator as nodeApplicationGenerator } from "@nx/node";
|
|
36
|
+
import { nxVersion } from "@nx/node/src/utils/versions";
|
|
37
|
+
import { join } from "path";
|
|
38
|
+
|
|
39
|
+
// src/generators/worker/libs/get-account-id.ts
|
|
40
|
+
function getAccountId(accountId) {
|
|
41
|
+
return `account_id = "${accountId}"`;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// src/generators/worker/libs/vitest-imports.ts
|
|
45
|
+
var vitestImports = `import { describe, expect, it, beforeAll, afterAll } from 'vitest';`;
|
|
46
|
+
|
|
47
|
+
// src/generators/worker/libs/vitest-script.ts
|
|
48
|
+
var vitestScript = `"test": "vitest run"`;
|
|
49
|
+
|
|
50
|
+
// src/generators/worker/generator.ts
|
|
51
|
+
async function applicationGenerator(tree, schema) {
|
|
52
|
+
const stopwatch = getStopwatch("Storm Worker generator");
|
|
53
|
+
let config;
|
|
54
|
+
try {
|
|
55
|
+
const workspaceRoot = findWorkspaceRoot();
|
|
56
|
+
config = await getConfig(workspaceRoot);
|
|
57
|
+
writeInfo(
|
|
58
|
+
`${brandIcon(config)} Running the Storm Worker generator...
|
|
59
|
+
|
|
60
|
+
`,
|
|
61
|
+
config
|
|
62
|
+
);
|
|
63
|
+
writeDebug(
|
|
64
|
+
`Loading the Storm Config from environment variables and storm.json file...
|
|
65
|
+
- workspaceRoot: ${workspaceRoot}`,
|
|
66
|
+
config
|
|
67
|
+
);
|
|
68
|
+
writeTrace(
|
|
69
|
+
`Loaded Storm config into env:
|
|
70
|
+
${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`,
|
|
71
|
+
config
|
|
72
|
+
);
|
|
73
|
+
const options = await normalizeOptions(tree, schema, config);
|
|
74
|
+
const tasks = [];
|
|
75
|
+
tasks.push(
|
|
76
|
+
await generator_default(tree, {
|
|
77
|
+
...options,
|
|
78
|
+
skipFormat: true
|
|
79
|
+
})
|
|
80
|
+
);
|
|
81
|
+
tasks.push(
|
|
82
|
+
await nodeApplicationGenerator(tree, {
|
|
83
|
+
...options,
|
|
84
|
+
framework: "none",
|
|
85
|
+
skipFormat: true,
|
|
86
|
+
unitTestRunner: options.unitTestRunner == "vitest" ? "none" : options.unitTestRunner,
|
|
87
|
+
e2eTestRunner: "none",
|
|
88
|
+
name: schema.name
|
|
89
|
+
})
|
|
90
|
+
);
|
|
91
|
+
if (options.unitTestRunner === "vitest") {
|
|
92
|
+
const { vitestGenerator, createOrEditViteConfig } = ensurePackage(
|
|
93
|
+
"@nx/vite",
|
|
94
|
+
nxVersion
|
|
95
|
+
);
|
|
96
|
+
const vitestTask = await vitestGenerator(tree, {
|
|
97
|
+
project: options.name,
|
|
98
|
+
uiFramework: "none",
|
|
99
|
+
coverageProvider: "v8",
|
|
100
|
+
skipFormat: true,
|
|
101
|
+
testEnvironment: "node"
|
|
102
|
+
});
|
|
103
|
+
tasks.push(vitestTask);
|
|
104
|
+
createOrEditViteConfig(
|
|
105
|
+
tree,
|
|
106
|
+
{
|
|
107
|
+
project: options.name,
|
|
108
|
+
includeLib: false,
|
|
109
|
+
includeVitest: true,
|
|
110
|
+
testEnvironment: "node"
|
|
111
|
+
},
|
|
112
|
+
true
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
addCloudflareFiles(tree, options);
|
|
116
|
+
updateTsAppConfig(tree, options);
|
|
117
|
+
addTargets(tree, options);
|
|
118
|
+
if (options.unitTestRunner === "none") {
|
|
119
|
+
removeTestFiles(tree, options);
|
|
120
|
+
}
|
|
121
|
+
if (!options.skipFormat) {
|
|
122
|
+
await formatFiles(tree);
|
|
123
|
+
}
|
|
124
|
+
if (options.template === "hono") {
|
|
125
|
+
tasks.push(() => {
|
|
126
|
+
const packageJsonPath = joinPathFragments(
|
|
127
|
+
options.directory ?? "",
|
|
128
|
+
"package.json"
|
|
129
|
+
);
|
|
130
|
+
if (tree.exists(packageJsonPath)) {
|
|
131
|
+
updateJson(tree, packageJsonPath, (json) => ({
|
|
132
|
+
...json,
|
|
133
|
+
dependencies: {
|
|
134
|
+
hono: "4.4.0",
|
|
135
|
+
...json?.dependencies
|
|
136
|
+
}
|
|
137
|
+
}));
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
return runTasksInSerial(...tasks);
|
|
142
|
+
} catch (error) {
|
|
143
|
+
return () => {
|
|
144
|
+
writeFatal(
|
|
145
|
+
"A fatal error occurred while running the generator - the process was forced to terminate",
|
|
146
|
+
config
|
|
147
|
+
);
|
|
148
|
+
writeError(
|
|
149
|
+
`An exception was thrown in the generator's process
|
|
150
|
+
- Details: ${error.message}
|
|
151
|
+
- Stacktrace: ${error.stack}`,
|
|
152
|
+
config
|
|
153
|
+
);
|
|
154
|
+
};
|
|
155
|
+
} finally {
|
|
156
|
+
stopwatch();
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
function updateTsAppConfig(tree, options) {
|
|
160
|
+
updateJson(tree, join(options.appProjectRoot, "tsconfig.app.json"), (json) => {
|
|
161
|
+
json.compilerOptions = {
|
|
162
|
+
...json.compilerOptions,
|
|
163
|
+
esModuleInterop: true,
|
|
164
|
+
target: "es2021",
|
|
165
|
+
lib: ["es2021"],
|
|
166
|
+
module: "es2022",
|
|
167
|
+
moduleResolution: "node",
|
|
168
|
+
resolveJsonModule: true,
|
|
169
|
+
allowJs: true,
|
|
170
|
+
checkJs: false,
|
|
171
|
+
noEmit: true,
|
|
172
|
+
isolatedModules: true,
|
|
173
|
+
allowSyntheticDefaultImports: true,
|
|
174
|
+
forceConsistentCasingInFileNames: true,
|
|
175
|
+
strict: true,
|
|
176
|
+
skipLibCheck: true
|
|
177
|
+
};
|
|
178
|
+
json.compilerOptions.types = [
|
|
179
|
+
...json.compilerOptions.types,
|
|
180
|
+
"@cloudflare/workers-types"
|
|
181
|
+
];
|
|
182
|
+
return json;
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
function addCloudflareFiles(tree, options) {
|
|
186
|
+
tree.delete(join(options.appProjectRoot, "src/main.ts"));
|
|
187
|
+
generateFiles(
|
|
188
|
+
tree,
|
|
189
|
+
join(__dirname, "./files/common"),
|
|
190
|
+
options.appProjectRoot,
|
|
191
|
+
{
|
|
192
|
+
...options,
|
|
193
|
+
tmpl: "",
|
|
194
|
+
name: options.name,
|
|
195
|
+
accountId: options.accountId ? getAccountId(options.accountId) : "",
|
|
196
|
+
vitestScript: options.unitTestRunner === "vitest" ? vitestScript : ""
|
|
197
|
+
}
|
|
198
|
+
);
|
|
199
|
+
if (options.template && options.template !== "none") {
|
|
200
|
+
generateFiles(
|
|
201
|
+
tree,
|
|
202
|
+
join(__dirname, `./files/${options.template}`),
|
|
203
|
+
join(options.appProjectRoot, "src"),
|
|
204
|
+
{
|
|
205
|
+
...options,
|
|
206
|
+
tmpl: "",
|
|
207
|
+
name: options.name,
|
|
208
|
+
accountId: options.accountId ? getAccountId(options.accountId) : "",
|
|
209
|
+
vitestScript: options.unitTestRunner === "vitest" ? vitestScript : "",
|
|
210
|
+
vitestImports: options.unitTestRunner === "vitest" ? vitestImports : ""
|
|
211
|
+
}
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
function addTargets(tree, options) {
|
|
216
|
+
try {
|
|
217
|
+
const projectConfiguration = readProjectConfiguration(tree, options.name);
|
|
218
|
+
projectConfiguration.targets = {
|
|
219
|
+
...projectConfiguration.targets ?? {},
|
|
220
|
+
serve: {
|
|
221
|
+
executor: "@storm-software/cloudflare-tools:serve",
|
|
222
|
+
options: {
|
|
223
|
+
port: options.port
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"nx-release-publish": {
|
|
227
|
+
executor: "@storm-software/cloudflare-tools:cloudflare-publish"
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
if (projectConfiguration.targets.build) {
|
|
231
|
+
delete projectConfiguration.targets.build;
|
|
232
|
+
}
|
|
233
|
+
updateProjectConfiguration(tree, options.name, projectConfiguration);
|
|
234
|
+
} catch (e) {
|
|
235
|
+
console.error(e);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
function removeTestFiles(tree, options) {
|
|
239
|
+
tree.delete(join(options.appProjectRoot, "src", "index.test.ts"));
|
|
240
|
+
}
|
|
241
|
+
async function normalizeOptions(host, options, config) {
|
|
242
|
+
const { projectName: appProjectName, projectRoot: appProjectRoot } = await determineProjectNameAndRootOptions(host, {
|
|
243
|
+
name: options.name,
|
|
244
|
+
projectType: "application",
|
|
245
|
+
directory: options.directory,
|
|
246
|
+
rootProject: options.rootProject
|
|
247
|
+
});
|
|
248
|
+
options.rootProject = appProjectRoot === ".";
|
|
249
|
+
return {
|
|
250
|
+
addPlugin: process.env.NX_ADD_PLUGINS !== "false",
|
|
251
|
+
accountId: process.env.STORM_BOT_CLOUDFLARE_ACCOUNT,
|
|
252
|
+
...options,
|
|
253
|
+
name: names(appProjectName).fileName,
|
|
254
|
+
frontendProject: options.frontendProject ? names(options.frontendProject).fileName : void 0,
|
|
255
|
+
appProjectRoot,
|
|
256
|
+
unitTestRunner: options.unitTestRunner ?? "vitest",
|
|
257
|
+
rootProject: options.rootProject ?? false,
|
|
258
|
+
template: options.template ?? "fetch-handler",
|
|
259
|
+
port: options.port ?? 3e3
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
var generator_default2 = applicationGenerator;
|
|
263
|
+
var applicationSchematic = convertNxGenerator(applicationGenerator);
|
|
264
|
+
|
|
265
|
+
export {
|
|
266
|
+
applicationGenerator,
|
|
267
|
+
generator_default2 as generator_default,
|
|
268
|
+
applicationSchematic
|
|
269
|
+
};
|
|
@@ -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.71.
|
|
10
|
+
version: "0.71.96",
|
|
11
11
|
private: false,
|
|
12
12
|
description: "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
|
|
13
13
|
keywords: [
|
|
@@ -132,8 +132,8 @@ var require_package = _chunkMCKGQKYUjs.__commonJS.call(void 0, {
|
|
|
132
132
|
module: "dist/index.mjs",
|
|
133
133
|
typings: "dist/index.d.ts",
|
|
134
134
|
dependencies: {
|
|
135
|
-
"@aws-sdk/client-s3": "^3.
|
|
136
|
-
"@aws-sdk/lib-storage": "^3.
|
|
135
|
+
"@aws-sdk/client-s3": "^3.1016.0",
|
|
136
|
+
"@aws-sdk/lib-storage": "^3.1016.0",
|
|
137
137
|
"@smithy/node-http-handler": "^4.5.0",
|
|
138
138
|
defu: "catalog:",
|
|
139
139
|
glob: "catalog:",
|
|
@@ -149,16 +149,16 @@ var require_package = _chunkMCKGQKYUjs.__commonJS.call(void 0, {
|
|
|
149
149
|
nx: "catalog:",
|
|
150
150
|
tsup: "catalog:",
|
|
151
151
|
untyped: "catalog:",
|
|
152
|
-
wrangler: "^4.
|
|
152
|
+
wrangler: "^4.77.0"
|
|
153
153
|
},
|
|
154
154
|
peerDependencies: {
|
|
155
155
|
"@nx/devkit": "catalog:",
|
|
156
156
|
"@nx/js": "catalog:",
|
|
157
157
|
"@nx/node": "catalog:",
|
|
158
158
|
"@nx/web": "catalog:",
|
|
159
|
-
"@storm-software/config": "1.
|
|
160
|
-
"@storm-software/config-tools": "1.189.
|
|
161
|
-
"@storm-software/workspace-tools": "1.295.
|
|
159
|
+
"@storm-software/config": "1.137.0",
|
|
160
|
+
"@storm-software/config-tools": "1.189.46",
|
|
161
|
+
"@storm-software/workspace-tools": "1.295.22",
|
|
162
162
|
nx: "catalog:",
|
|
163
163
|
tsup: "catalog:",
|
|
164
164
|
wrangler: ">=3.58.0"
|