@storm-software/cloudflare-tools 0.53.0 → 0.53.1
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-ISVNV2UX.mjs → chunk-3D3WO4IH.mjs} +15 -8
- package/dist/{chunk-TOEMUWVP.mjs → chunk-6H63LE3D.mjs} +1 -1
- package/dist/{chunk-42I5F5WI.mjs → chunk-BGWUN6JU.mjs} +3 -3
- package/dist/{chunk-TYN4EHRJ.js → chunk-CCD6A6BN.js} +1 -1
- package/dist/{chunk-76BYR6TF.js → chunk-FBY3RXBP.js} +12 -12
- package/dist/{chunk-YG677AGI.js → chunk-GY2PQXHH.js} +217 -222
- package/dist/{chunk-AZ4TIZKT.js → chunk-H63GI4CR.js} +3 -3
- package/dist/{chunk-IU4KGUV4.mjs → chunk-KVL4WOIH.mjs} +1 -1
- package/dist/{chunk-M5TEDDIW.mjs → chunk-L6Z7B2FZ.mjs} +1 -1
- package/dist/{chunk-7PSAJH4G.mjs → chunk-O4TNQIAD.mjs} +3 -3
- package/dist/{chunk-AYOTXPQJ.mjs → chunk-RA7URPJI.mjs} +20 -25
- package/dist/{chunk-OQPC7VB6.js → chunk-THKJZT32.js} +41 -41
- package/dist/{chunk-YVLGBYMR.js → chunk-U6QKP7CG.js} +16 -16
- package/dist/{chunk-343PZDII.js → chunk-W6YNIJQD.js} +15 -8
- 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 -->
|
|
@@ -479,49 +479,56 @@ var isVerbose = /* @__PURE__ */ __name((label = LogLevelLabel.SILENT) => {
|
|
|
479
479
|
var getLogFn = /* @__PURE__ */ __name((logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
|
|
480
480
|
const colors = !config.colors?.dark && !config.colors?.["base"] && !config.colors?.["base"]?.dark ? DEFAULT_COLOR_CONFIG : config.colors?.dark && typeof config.colors.dark === "string" ? config.colors : config.colors?.["base"]?.dark && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : config.colors?.["base"] ? config.colors?.["base"] : DEFAULT_COLOR_CONFIG;
|
|
481
481
|
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
482
|
-
if (
|
|
482
|
+
if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
|
|
483
483
|
return (_) => {
|
|
484
484
|
};
|
|
485
485
|
}
|
|
486
|
-
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel
|
|
486
|
+
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel) {
|
|
487
487
|
return (message) => {
|
|
488
488
|
console.error(`
|
|
489
489
|
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
490
490
|
`);
|
|
491
491
|
};
|
|
492
492
|
}
|
|
493
|
-
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel
|
|
493
|
+
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel) {
|
|
494
494
|
return (message) => {
|
|
495
495
|
console.error(`
|
|
496
496
|
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.danger ?? "#f85149")(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
497
497
|
`);
|
|
498
498
|
};
|
|
499
499
|
}
|
|
500
|
-
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel
|
|
500
|
+
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel) {
|
|
501
501
|
return (message) => {
|
|
502
502
|
console.warn(`
|
|
503
503
|
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.warning ?? "#e3b341")(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
504
504
|
`);
|
|
505
505
|
};
|
|
506
506
|
}
|
|
507
|
-
if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel
|
|
507
|
+
if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel) {
|
|
508
508
|
return (message) => {
|
|
509
509
|
console.info(`
|
|
510
510
|
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.success ?? "#56d364")(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
511
511
|
`);
|
|
512
512
|
};
|
|
513
513
|
}
|
|
514
|
-
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel
|
|
514
|
+
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel) {
|
|
515
515
|
return (message) => {
|
|
516
516
|
console.info(`
|
|
517
517
|
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? "#58a6ff")(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
518
518
|
`);
|
|
519
519
|
};
|
|
520
520
|
}
|
|
521
|
-
if (typeof logLevel === "number" && LogLevel.
|
|
521
|
+
if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel) {
|
|
522
522
|
return (message) => {
|
|
523
523
|
console.debug(`
|
|
524
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]}
|
|
524
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
525
|
+
`);
|
|
526
|
+
};
|
|
527
|
+
}
|
|
528
|
+
if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel) {
|
|
529
|
+
return (message) => {
|
|
530
|
+
console.debug(`
|
|
531
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
525
532
|
`);
|
|
526
533
|
};
|
|
527
534
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getInternalDependencies,
|
|
3
3
|
r2UploadFile
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KVL4WOIH.mjs";
|
|
5
5
|
import {
|
|
6
6
|
createCliOptions,
|
|
7
7
|
getPackageInfo
|
|
8
8
|
} from "./chunk-XU6MTFCV.mjs";
|
|
9
9
|
import {
|
|
10
10
|
loadStormConfig
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-6H63LE3D.mjs";
|
|
12
12
|
import {
|
|
13
13
|
findWorkspaceRoot,
|
|
14
14
|
writeDebug,
|
|
15
15
|
writeInfo,
|
|
16
16
|
writeSuccess,
|
|
17
17
|
writeWarning
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-3D3WO4IH.mjs";
|
|
19
19
|
import {
|
|
20
20
|
__name
|
|
21
21
|
} from "./chunk-A7FFSBE6.mjs";
|
|
@@ -8,7 +8,7 @@ var require_package = _chunkJ5SB6L2Ljs.__commonJS.call(void 0, {
|
|
|
8
8
|
"package.json"(exports, module) {
|
|
9
9
|
module.exports = {
|
|
10
10
|
name: "@storm-software/cloudflare-tools",
|
|
11
|
-
version: "0.53.
|
|
11
|
+
version: "0.53.1",
|
|
12
12
|
description: "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
|
|
13
13
|
repository: {
|
|
14
14
|
type: "github",
|
|
@@ -1,9 +1,9 @@
|
|
|
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 _chunkCCD6A6BNjs = require('./chunk-CCD6A6BN.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkTHKJZT32js = require('./chunk-THKJZT32.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -12,7 +12,7 @@ var _chunkOQPC7VB6js = require('./chunk-OQPC7VB6.js');
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkW6YNIJQDjs = require('./chunk-W6YNIJQD.js');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
var _chunkJ5SB6L2Ljs = require('./chunk-J5SB6L2L.js');
|
|
@@ -38,21 +38,21 @@ var vitestScript = `"test": "vitest run"`;
|
|
|
38
38
|
|
|
39
39
|
// src/generators/worker/generator.ts
|
|
40
40
|
async function applicationGenerator(tree, schema) {
|
|
41
|
-
const stopwatch =
|
|
41
|
+
const stopwatch = _chunkW6YNIJQDjs.getStopwatch.call(void 0, "Storm Worker generator");
|
|
42
42
|
let config;
|
|
43
43
|
try {
|
|
44
|
-
|
|
44
|
+
_chunkW6YNIJQDjs.writeInfo.call(void 0, `\u26A1 Running the Storm Worker generator...
|
|
45
45
|
|
|
46
46
|
`, config);
|
|
47
|
-
const workspaceRoot =
|
|
48
|
-
|
|
47
|
+
const workspaceRoot = _chunkW6YNIJQDjs.findWorkspaceRoot.call(void 0, );
|
|
48
|
+
_chunkW6YNIJQDjs.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.json file...
|
|
49
49
|
- workspaceRoot: ${workspaceRoot}`, config);
|
|
50
|
-
config = await
|
|
51
|
-
|
|
50
|
+
config = await _chunkTHKJZT32js.loadStormConfig.call(void 0, workspaceRoot);
|
|
51
|
+
_chunkW6YNIJQDjs.writeTrace.call(void 0, `Loaded Storm config into env:
|
|
52
52
|
${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`, config);
|
|
53
53
|
const options = await normalizeOptions(tree, schema, config);
|
|
54
54
|
const tasks = [];
|
|
55
|
-
tasks.push(await
|
|
55
|
+
tasks.push(await _chunkCCD6A6BNjs.generator_default.call(void 0, tree, {
|
|
56
56
|
...options,
|
|
57
57
|
skipFormat: true
|
|
58
58
|
}));
|
|
@@ -107,8 +107,8 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[
|
|
|
107
107
|
return _devkit.runTasksInSerial.call(void 0, ...tasks);
|
|
108
108
|
} catch (error) {
|
|
109
109
|
return () => {
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
_chunkW6YNIJQDjs.writeFatal.call(void 0, "A fatal error occurred while running the generator - the process was forced to terminate", config);
|
|
111
|
+
_chunkW6YNIJQDjs.writeError.call(void 0, `An exception was thrown in the generator's process
|
|
112
112
|
- Details: ${error.message}
|
|
113
113
|
- Stacktrace: ${error.stack}`, config);
|
|
114
114
|
};
|