@storm-software/cloudflare-tools 0.50.2 → 0.50.3
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 +6 -0
- package/README.md +1 -1
- package/dist/{chunk-IUVV2SM4.js → chunk-3JJSMPBT.js} +41 -41
- package/dist/{chunk-T6VDL633.mjs → chunk-6PVMDNO7.mjs} +44 -482
- package/dist/{chunk-JCB2DTP6.js → chunk-ABCBYQGV.js} +3 -3
- package/dist/{chunk-7VU6EPB4.js → chunk-AXWOHQDN.js} +1 -1
- package/dist/{chunk-ULTJPRDX.js → chunk-MHBXIMZJ.js} +183 -621
- package/dist/{chunk-SUASGTND.js → chunk-O2XVQQLQ.js} +16 -16
- package/dist/{chunk-6RM4MALM.mjs → chunk-O6M6COTZ.mjs} +1 -1
- package/dist/{chunk-VYOULWAK.mjs → chunk-OTQ3T47C.mjs} +1 -1
- package/dist/{chunk-RCE3CC76.js → chunk-TH4KH35P.js} +1 -2
- package/dist/{chunk-HPCGVJ7R.mjs → chunk-TKQA6SOX.mjs} +3 -3
- package/dist/{chunk-4AK2RSE7.mjs → chunk-U7RXDO26.mjs} +3 -3
- package/dist/{chunk-4AMWR76J.mjs → chunk-UOZU7VQX.mjs} +1 -1
- package/dist/{chunk-NSLK6ZDO.mjs → chunk-XBFOA367.mjs} +0 -1
- package/dist/{chunk-MH545KJZ.js → chunk-YYQ6E55Y.js} +12 -12
- 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 +1 -1
package/CHANGELOG.md
CHANGED
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 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkTH4KH35Pjs = require('./chunk-TH4KH35P.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
var _chunkJ5SB6L2Ljs = require('./chunk-J5SB6L2L.js');
|
|
@@ -26,7 +26,7 @@ var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
|
26
26
|
var _c12 = require('c12');
|
|
27
27
|
|
|
28
28
|
var getConfigFileByName = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (fileName, filePath, options = {}) => {
|
|
29
|
-
const workspacePath = filePath ||
|
|
29
|
+
const workspacePath = filePath || _chunkTH4KH35Pjs.findWorkspaceRoot.call(void 0, filePath);
|
|
30
30
|
let config = await _c12.loadConfig.call(void 0, {
|
|
31
31
|
cwd: workspacePath,
|
|
32
32
|
packageJson: true,
|
|
@@ -34,7 +34,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, a
|
|
|
34
34
|
envName: _optionalChain([fileName, 'optionalAccess', _ => _.toUpperCase, 'call', _2 => _2()]),
|
|
35
35
|
jitiOptions: {
|
|
36
36
|
debug: false,
|
|
37
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
37
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkTH4KH35Pjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
38
38
|
},
|
|
39
39
|
...options
|
|
40
40
|
});
|
|
@@ -46,7 +46,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, a
|
|
|
46
46
|
envName: _optionalChain([fileName, 'optionalAccess', _3 => _3.toUpperCase, 'call', _4 => _4()]),
|
|
47
47
|
jitiOptions: {
|
|
48
48
|
debug: false,
|
|
49
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
49
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkTH4KH35Pjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
50
50
|
},
|
|
51
51
|
configFile: fileName,
|
|
52
52
|
...options
|
|
@@ -55,12 +55,12 @@ var getConfigFileByName = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, a
|
|
|
55
55
|
return config;
|
|
56
56
|
}, "getConfigFileByName");
|
|
57
57
|
var getConfigFile = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (filePath, additionalFileNames = []) => {
|
|
58
|
-
const workspacePath = filePath ? filePath :
|
|
58
|
+
const workspacePath = filePath ? filePath : _chunkTH4KH35Pjs.findWorkspaceRoot.call(void 0, filePath);
|
|
59
59
|
const result = await getConfigFileByName("storm", workspacePath);
|
|
60
60
|
let config = result.config;
|
|
61
61
|
const configFile = result.configFile;
|
|
62
62
|
if (config && configFile && Object.keys(config).length > 0) {
|
|
63
|
-
|
|
63
|
+
_chunkTH4KH35Pjs.writeSystem.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
|
|
64
64
|
logLevel: "all"
|
|
65
65
|
});
|
|
66
66
|
}
|
|
@@ -68,7 +68,7 @@ var getConfigFile = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (
|
|
|
68
68
|
const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
|
|
69
69
|
for (const result2 of results) {
|
|
70
70
|
if (_optionalChain([result2, 'optionalAccess', _5 => _5.config]) && _optionalChain([result2, 'optionalAccess', _6 => _6.configFile]) && Object.keys(result2.config).length > 0) {
|
|
71
|
-
|
|
71
|
+
_chunkTH4KH35Pjs.writeSystem.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
|
|
72
72
|
logLevel: "all"
|
|
73
73
|
});
|
|
74
74
|
config = _defu2.default.call(void 0, _nullishCoalesce(result2.config, () => ( {})), _nullishCoalesce(config, () => ( {})));
|
|
@@ -102,15 +102,15 @@ var getConfigEnv = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, () => {
|
|
|
102
102
|
licensing: process.env[`${prefix}LICENSING`] || void 0,
|
|
103
103
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
104
104
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
105
|
-
configFile: process.env[`${prefix}CONFIG_FILE`] ?
|
|
106
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ?
|
|
105
|
+
configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunkTH4KH35Pjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
106
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkTH4KH35Pjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
107
107
|
directories: {
|
|
108
|
-
cache: process.env[`${prefix}CACHE_DIR`] ?
|
|
109
|
-
data: process.env[`${prefix}DATA_DIR`] ?
|
|
110
|
-
config: process.env[`${prefix}CONFIG_DIR`] ?
|
|
111
|
-
temp: process.env[`${prefix}TEMP_DIR`] ?
|
|
112
|
-
log: process.env[`${prefix}LOG_DIR`] ?
|
|
113
|
-
build: process.env[`${prefix}BUILD_DIR`] ?
|
|
108
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? _chunkTH4KH35Pjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
|
|
109
|
+
data: process.env[`${prefix}DATA_DIR`] ? _chunkTH4KH35Pjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
|
|
110
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _chunkTH4KH35Pjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
|
|
111
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _chunkTH4KH35Pjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
|
|
112
|
+
log: process.env[`${prefix}LOG_DIR`] ? _chunkTH4KH35Pjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
|
|
113
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _chunkTH4KH35Pjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : void 0
|
|
114
114
|
},
|
|
115
115
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
116
116
|
env: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}ENV`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
@@ -133,23 +133,23 @@ var getConfigEnv = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, () => {
|
|
|
133
133
|
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
134
134
|
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
135
135
|
},
|
|
136
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ?
|
|
136
|
+
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? _chunkTH4KH35Pjs.getLogLevelLabel.call(void 0, Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0
|
|
137
137
|
};
|
|
138
|
-
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) &&
|
|
138
|
+
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunkTH4KH35Pjs.COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
|
|
139
139
|
config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
|
|
140
140
|
ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
|
|
141
141
|
return ret;
|
|
142
142
|
}, {}) : getThemeColorConfigEnv(prefix);
|
|
143
|
-
if (config.docs ===
|
|
144
|
-
if (config.homepage ===
|
|
145
|
-
config.docs = `${
|
|
143
|
+
if (config.docs === _chunkTH4KH35Pjs.STORM_DEFAULT_DOCS) {
|
|
144
|
+
if (config.homepage === _chunkTH4KH35Pjs.STORM_DEFAULT_HOMEPAGE) {
|
|
145
|
+
config.docs = `${_chunkTH4KH35Pjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
146
146
|
} else {
|
|
147
147
|
config.docs = `${config.homepage}/docs`;
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
if (config.licensing ===
|
|
151
|
-
if (config.homepage ===
|
|
152
|
-
config.licensing = `${
|
|
150
|
+
if (config.licensing === _chunkTH4KH35Pjs.STORM_DEFAULT_LICENSING) {
|
|
151
|
+
if (config.homepage === _chunkTH4KH35Pjs.STORM_DEFAULT_HOMEPAGE) {
|
|
152
|
+
config.licensing = `${_chunkTH4KH35Pjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
|
|
153
153
|
} else {
|
|
154
154
|
config.licensing = `${config.homepage}/docs`;
|
|
155
155
|
}
|
|
@@ -287,31 +287,31 @@ var setConfigEnv = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (config)
|
|
|
287
287
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
288
288
|
}
|
|
289
289
|
if (config.configFile) {
|
|
290
|
-
process.env[`${prefix}CONFIG_FILE`] =
|
|
290
|
+
process.env[`${prefix}CONFIG_FILE`] = _chunkTH4KH35Pjs.correctPaths.call(void 0, config.configFile);
|
|
291
291
|
}
|
|
292
292
|
if (config.workspaceRoot) {
|
|
293
|
-
process.env[`${prefix}WORKSPACE_ROOT`] =
|
|
294
|
-
process.env.NX_WORKSPACE_ROOT =
|
|
295
|
-
process.env.NX_WORKSPACE_ROOT_PATH =
|
|
293
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = _chunkTH4KH35Pjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
294
|
+
process.env.NX_WORKSPACE_ROOT = _chunkTH4KH35Pjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
295
|
+
process.env.NX_WORKSPACE_ROOT_PATH = _chunkTH4KH35Pjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
296
296
|
}
|
|
297
297
|
if (config.directories) {
|
|
298
298
|
if (!config.skipCache && config.directories.cache) {
|
|
299
|
-
process.env[`${prefix}CACHE_DIR`] =
|
|
299
|
+
process.env[`${prefix}CACHE_DIR`] = _chunkTH4KH35Pjs.correctPaths.call(void 0, config.directories.cache);
|
|
300
300
|
}
|
|
301
301
|
if (config.directories.data) {
|
|
302
|
-
process.env[`${prefix}DATA_DIR`] =
|
|
302
|
+
process.env[`${prefix}DATA_DIR`] = _chunkTH4KH35Pjs.correctPaths.call(void 0, config.directories.data);
|
|
303
303
|
}
|
|
304
304
|
if (config.directories.config) {
|
|
305
|
-
process.env[`${prefix}CONFIG_DIR`] =
|
|
305
|
+
process.env[`${prefix}CONFIG_DIR`] = _chunkTH4KH35Pjs.correctPaths.call(void 0, config.directories.config);
|
|
306
306
|
}
|
|
307
307
|
if (config.directories.temp) {
|
|
308
|
-
process.env[`${prefix}TEMP_DIR`] =
|
|
308
|
+
process.env[`${prefix}TEMP_DIR`] = _chunkTH4KH35Pjs.correctPaths.call(void 0, config.directories.temp);
|
|
309
309
|
}
|
|
310
310
|
if (config.directories.log) {
|
|
311
|
-
process.env[`${prefix}LOG_DIR`] =
|
|
311
|
+
process.env[`${prefix}LOG_DIR`] = _chunkTH4KH35Pjs.correctPaths.call(void 0, config.directories.log);
|
|
312
312
|
}
|
|
313
313
|
if (config.directories.build) {
|
|
314
|
-
process.env[`${prefix}BUILD_DIR`] =
|
|
314
|
+
process.env[`${prefix}BUILD_DIR`] = _chunkTH4KH35Pjs.correctPaths.call(void 0, config.directories.build);
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
if (config.skipCache !== void 0) {
|
|
@@ -365,8 +365,8 @@ var setConfigEnv = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (config)
|
|
|
365
365
|
if (config.logLevel) {
|
|
366
366
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
367
367
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
368
|
-
process.env.NX_VERBOSE_LOGGING = String(
|
|
369
|
-
process.env.RUST_BACKTRACE =
|
|
368
|
+
process.env.NX_VERBOSE_LOGGING = String(_chunkTH4KH35Pjs.getLogLevel.call(void 0, config.logLevel) >= _chunkTH4KH35Pjs.LogLevel.DEBUG ? true : false);
|
|
369
|
+
process.env.RUST_BACKTRACE = _chunkTH4KH35Pjs.getLogLevel.call(void 0, config.logLevel) >= _chunkTH4KH35Pjs.LogLevel.DEBUG ? "full" : "none";
|
|
370
370
|
}
|
|
371
371
|
process.env[`${prefix}CONFIG`] = JSON.stringify(config);
|
|
372
372
|
for (const key of Object.keys(_nullishCoalesce(config.extensions, () => ( {})))) {
|
|
@@ -476,23 +476,23 @@ var _static_cache = void 0;
|
|
|
476
476
|
var loadStormConfig = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (workspaceRoot) => {
|
|
477
477
|
let config = {};
|
|
478
478
|
if (_optionalChain([_static_cache, 'optionalAccess', _29 => _29.data]) && _optionalChain([_static_cache, 'optionalAccess', _30 => _30.timestamp]) && _static_cache.timestamp >= Date.now() + 3e4) {
|
|
479
|
-
|
|
479
|
+
_chunkTH4KH35Pjs.writeTrace.call(void 0, `Configuration cache hit - ${_static_cache.timestamp}`, _static_cache.data);
|
|
480
480
|
return _static_cache.data;
|
|
481
481
|
}
|
|
482
482
|
let _workspaceRoot = workspaceRoot;
|
|
483
483
|
if (!_workspaceRoot) {
|
|
484
|
-
_workspaceRoot =
|
|
484
|
+
_workspaceRoot = _chunkTH4KH35Pjs.findWorkspaceRoot.call(void 0, );
|
|
485
485
|
}
|
|
486
486
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
487
487
|
if (!configFile) {
|
|
488
|
-
|
|
488
|
+
_chunkTH4KH35Pjs.writeWarning.call(void 0, "No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.json` file to the root of your workspace if it is not.\n", {
|
|
489
489
|
logLevel: "all"
|
|
490
490
|
});
|
|
491
491
|
}
|
|
492
|
-
config = _defu2.default.call(void 0, getConfigEnv(), configFile,
|
|
492
|
+
config = _defu2.default.call(void 0, getConfigEnv(), configFile, _chunkTH4KH35Pjs.getDefaultConfig.call(void 0, _workspaceRoot));
|
|
493
493
|
setConfigEnv(config);
|
|
494
|
-
|
|
495
|
-
${
|
|
494
|
+
_chunkTH4KH35Pjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm configuration:
|
|
495
|
+
${_chunkTH4KH35Pjs.formatLogMessage.call(void 0, config)}`, config);
|
|
496
496
|
return config;
|
|
497
497
|
}, "loadStormConfig");
|
|
498
498
|
|