@storm-software/cloudflare-tools 0.55.15 → 0.55.17
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/README.md +1 -1
- package/dist/{chunk-GCD4ACJC.js → chunk-23PVXPM6.js} +16 -16
- package/dist/{chunk-ADRS43PR.js → chunk-57JETFC4.js} +3 -3
- package/dist/{chunk-NP7DE7UM.mjs → chunk-7GVMKVE6.mjs} +1 -1
- package/dist/{chunk-BKBJDKMA.mjs → chunk-CH4HU3UC.mjs} +1 -1
- package/dist/{chunk-PKT2CDJF.js → chunk-ECM7NILS.js} +1 -1
- package/dist/{chunk-GMLMIRU7.mjs → chunk-EY654AX3.mjs} +125 -22
- package/dist/{chunk-43HWVEIC.js → chunk-FNE7DP2D.js} +121 -18
- package/dist/{chunk-XSVPXWSA.mjs → chunk-JYGVCUHY.mjs} +3 -3
- package/dist/{chunk-EORYLA5L.mjs → chunk-LFOKGJV3.mjs} +1 -1
- package/dist/{chunk-6Q4S7VSU.js → chunk-OO2KFXL5.js} +41 -41
- package/dist/{chunk-P5LCBPJC.mjs → chunk-SI2PJVZV.mjs} +3 -3
- package/dist/{chunk-J7EAOMOM.js → chunk-TWSVFCGJ.js} +159 -159
- package/dist/{chunk-IXEVMGVN.mjs → chunk-UYVVVI5O.mjs} +3 -3
- package/dist/{chunk-LYIKXP45.js → chunk-YIVJLSPZ.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
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkFNE7DP2Djs = require('./chunk-FNE7DP2D.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 || _chunkFNE7DP2Djs.findWorkspaceRoot.call(void 0, filePath);
|
|
30
30
|
const configs = await Promise.all([
|
|
31
31
|
_c12.loadConfig.call(void 0, {
|
|
32
32
|
cwd: workspacePath,
|
|
@@ -35,7 +35,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, a
|
|
|
35
35
|
envName: _optionalChain([fileName, 'optionalAccess', _ => _.toUpperCase, 'call', _2 => _2()]),
|
|
36
36
|
jitiOptions: {
|
|
37
37
|
debug: false,
|
|
38
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
38
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkFNE7DP2Djs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
39
39
|
},
|
|
40
40
|
...options
|
|
41
41
|
}),
|
|
@@ -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 : _chunkFNE7DP2Djs.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 _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
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 : _chunkFNE7DP2Djs.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
|
+
_chunkFNE7DP2Djs.writeTrace.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
|
+
_chunkFNE7DP2Djs.writeTrace.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, () => ( {})));
|
|
@@ -112,15 +112,15 @@ var getConfigEnv = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, () => {
|
|
|
112
112
|
licensing: process.env[`${prefix}LICENSING`] || void 0,
|
|
113
113
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
114
114
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
115
|
-
configFile: process.env[`${prefix}CONFIG_FILE`] ?
|
|
116
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ?
|
|
115
|
+
configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunkFNE7DP2Djs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
116
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkFNE7DP2Djs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
117
117
|
directories: {
|
|
118
|
-
cache: process.env[`${prefix}CACHE_DIR`] ?
|
|
119
|
-
data: process.env[`${prefix}DATA_DIR`] ?
|
|
120
|
-
config: process.env[`${prefix}CONFIG_DIR`] ?
|
|
121
|
-
temp: process.env[`${prefix}TEMP_DIR`] ?
|
|
122
|
-
log: process.env[`${prefix}LOG_DIR`] ?
|
|
123
|
-
build: process.env[`${prefix}BUILD_DIR`] ?
|
|
118
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? _chunkFNE7DP2Djs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
|
|
119
|
+
data: process.env[`${prefix}DATA_DIR`] ? _chunkFNE7DP2Djs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
|
|
120
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _chunkFNE7DP2Djs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
|
|
121
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _chunkFNE7DP2Djs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
|
|
122
|
+
log: process.env[`${prefix}LOG_DIR`] ? _chunkFNE7DP2Djs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
|
|
123
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _chunkFNE7DP2Djs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : void 0
|
|
124
124
|
},
|
|
125
125
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
126
126
|
env: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}ENV`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
@@ -143,23 +143,23 @@ var getConfigEnv = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, () => {
|
|
|
143
143
|
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
144
144
|
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
145
145
|
},
|
|
146
|
-
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`])) ?
|
|
146
|
+
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`])) ? _chunkFNE7DP2Djs.getLogLevelLabel.call(void 0, Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0
|
|
147
147
|
};
|
|
148
|
-
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) &&
|
|
148
|
+
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunkFNE7DP2Djs.COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
|
|
149
149
|
config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
|
|
150
150
|
ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
|
|
151
151
|
return ret;
|
|
152
152
|
}, {}) : getThemeColorConfigEnv(prefix);
|
|
153
|
-
if (config.docs ===
|
|
154
|
-
if (config.homepage ===
|
|
155
|
-
config.docs = `${
|
|
153
|
+
if (config.docs === _chunkFNE7DP2Djs.STORM_DEFAULT_DOCS) {
|
|
154
|
+
if (config.homepage === _chunkFNE7DP2Djs.STORM_DEFAULT_HOMEPAGE) {
|
|
155
|
+
config.docs = `${_chunkFNE7DP2Djs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
156
156
|
} else {
|
|
157
157
|
config.docs = `${config.homepage}/docs`;
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
|
-
if (config.licensing ===
|
|
161
|
-
if (config.homepage ===
|
|
162
|
-
config.licensing = `${
|
|
160
|
+
if (config.licensing === _chunkFNE7DP2Djs.STORM_DEFAULT_LICENSING) {
|
|
161
|
+
if (config.homepage === _chunkFNE7DP2Djs.STORM_DEFAULT_HOMEPAGE) {
|
|
162
|
+
config.licensing = `${_chunkFNE7DP2Djs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
|
|
163
163
|
} else {
|
|
164
164
|
config.licensing = `${config.homepage}/docs`;
|
|
165
165
|
}
|
|
@@ -297,31 +297,31 @@ var setConfigEnv = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (config)
|
|
|
297
297
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
298
298
|
}
|
|
299
299
|
if (config.configFile) {
|
|
300
|
-
process.env[`${prefix}CONFIG_FILE`] =
|
|
300
|
+
process.env[`${prefix}CONFIG_FILE`] = _chunkFNE7DP2Djs.correctPaths.call(void 0, config.configFile);
|
|
301
301
|
}
|
|
302
302
|
if (config.workspaceRoot) {
|
|
303
|
-
process.env[`${prefix}WORKSPACE_ROOT`] =
|
|
304
|
-
process.env.NX_WORKSPACE_ROOT =
|
|
305
|
-
process.env.NX_WORKSPACE_ROOT_PATH =
|
|
303
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = _chunkFNE7DP2Djs.correctPaths.call(void 0, config.workspaceRoot);
|
|
304
|
+
process.env.NX_WORKSPACE_ROOT = _chunkFNE7DP2Djs.correctPaths.call(void 0, config.workspaceRoot);
|
|
305
|
+
process.env.NX_WORKSPACE_ROOT_PATH = _chunkFNE7DP2Djs.correctPaths.call(void 0, config.workspaceRoot);
|
|
306
306
|
}
|
|
307
307
|
if (config.directories) {
|
|
308
308
|
if (!config.skipCache && config.directories.cache) {
|
|
309
|
-
process.env[`${prefix}CACHE_DIR`] =
|
|
309
|
+
process.env[`${prefix}CACHE_DIR`] = _chunkFNE7DP2Djs.correctPaths.call(void 0, config.directories.cache);
|
|
310
310
|
}
|
|
311
311
|
if (config.directories.data) {
|
|
312
|
-
process.env[`${prefix}DATA_DIR`] =
|
|
312
|
+
process.env[`${prefix}DATA_DIR`] = _chunkFNE7DP2Djs.correctPaths.call(void 0, config.directories.data);
|
|
313
313
|
}
|
|
314
314
|
if (config.directories.config) {
|
|
315
|
-
process.env[`${prefix}CONFIG_DIR`] =
|
|
315
|
+
process.env[`${prefix}CONFIG_DIR`] = _chunkFNE7DP2Djs.correctPaths.call(void 0, config.directories.config);
|
|
316
316
|
}
|
|
317
317
|
if (config.directories.temp) {
|
|
318
|
-
process.env[`${prefix}TEMP_DIR`] =
|
|
318
|
+
process.env[`${prefix}TEMP_DIR`] = _chunkFNE7DP2Djs.correctPaths.call(void 0, config.directories.temp);
|
|
319
319
|
}
|
|
320
320
|
if (config.directories.log) {
|
|
321
|
-
process.env[`${prefix}LOG_DIR`] =
|
|
321
|
+
process.env[`${prefix}LOG_DIR`] = _chunkFNE7DP2Djs.correctPaths.call(void 0, config.directories.log);
|
|
322
322
|
}
|
|
323
323
|
if (config.directories.build) {
|
|
324
|
-
process.env[`${prefix}BUILD_DIR`] =
|
|
324
|
+
process.env[`${prefix}BUILD_DIR`] = _chunkFNE7DP2Djs.correctPaths.call(void 0, config.directories.build);
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
327
|
if (config.skipCache !== void 0) {
|
|
@@ -375,8 +375,8 @@ var setConfigEnv = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (config)
|
|
|
375
375
|
if (config.logLevel) {
|
|
376
376
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
377
377
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
378
|
-
process.env.NX_VERBOSE_LOGGING = String(
|
|
379
|
-
process.env.RUST_BACKTRACE =
|
|
378
|
+
process.env.NX_VERBOSE_LOGGING = String(_chunkFNE7DP2Djs.getLogLevel.call(void 0, config.logLevel) >= _chunkFNE7DP2Djs.LogLevel.DEBUG ? true : false);
|
|
379
|
+
process.env.RUST_BACKTRACE = _chunkFNE7DP2Djs.getLogLevel.call(void 0, config.logLevel) >= _chunkFNE7DP2Djs.LogLevel.DEBUG ? "full" : "none";
|
|
380
380
|
}
|
|
381
381
|
process.env[`${prefix}CONFIG`] = JSON.stringify(config);
|
|
382
382
|
for (const key of Object.keys(_nullishCoalesce(config.extensions, () => ( {})))) {
|
|
@@ -489,17 +489,17 @@ var createStormConfig = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, asy
|
|
|
489
489
|
if (!_optionalChain([_static_cache, 'optionalAccess', _29 => _29.data]) || !_optionalChain([_static_cache, 'optionalAccess', _30 => _30.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
490
490
|
let _workspaceRoot = workspaceRoot;
|
|
491
491
|
if (!_workspaceRoot) {
|
|
492
|
-
_workspaceRoot =
|
|
492
|
+
_workspaceRoot = _chunkFNE7DP2Djs.findWorkspaceRoot.call(void 0, );
|
|
493
493
|
}
|
|
494
494
|
const configEnv = getConfigEnv();
|
|
495
|
-
const defaultConfig = await
|
|
495
|
+
const defaultConfig = await _chunkFNE7DP2Djs.getDefaultConfig.call(void 0, _workspaceRoot);
|
|
496
496
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
497
497
|
if (!configFile && !skipLogs) {
|
|
498
|
-
|
|
498
|
+
_chunkFNE7DP2Djs.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", {
|
|
499
499
|
logLevel: "all"
|
|
500
500
|
});
|
|
501
501
|
}
|
|
502
|
-
result = await
|
|
502
|
+
result = await _chunkFNE7DP2Djs.StormConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
|
|
503
503
|
result.workspaceRoot ??= _workspaceRoot;
|
|
504
504
|
} else {
|
|
505
505
|
result = _static_cache.data;
|
|
@@ -534,8 +534,8 @@ var loadStormConfig = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
534
534
|
const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
535
535
|
setConfigEnv(config);
|
|
536
536
|
if (!skipLogs) {
|
|
537
|
-
|
|
538
|
-
${
|
|
537
|
+
_chunkFNE7DP2Djs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm configuration:
|
|
538
|
+
${_chunkFNE7DP2Djs.formatLogMessage.call(void 0, config)}`, config);
|
|
539
539
|
}
|
|
540
540
|
return config;
|
|
541
541
|
}, "loadStormConfig");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generator_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LFOKGJV3.mjs";
|
|
4
4
|
import {
|
|
5
5
|
getConfig
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CH4HU3UC.mjs";
|
|
7
7
|
import {
|
|
8
8
|
findWorkspaceRoot,
|
|
9
9
|
getStopwatch,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
writeFatal,
|
|
13
13
|
writeInfo,
|
|
14
14
|
writeTrace
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-EY654AX3.mjs";
|
|
16
16
|
import {
|
|
17
17
|
__dirname,
|
|
18
18
|
__name
|