@storm-software/cloudflare-tools 0.3.0 → 0.5.0
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 +19 -0
- package/index.js +7 -3
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/cloudflare-publish/executor.js +8 -2
- package/src/executors/serve/executor.js +6 -2
- package/src/generators/init/generator.js +1 -1
- package/src/generators/worker/generator.js +7 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/cloudflare-tools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "⚡The Storm-Ops monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.",
|
|
6
6
|
"keywords": [
|
|
@@ -66706,7 +66706,7 @@ var init_schema = __esm({
|
|
|
66706
66706
|
]).default("debug").describe(
|
|
66707
66707
|
"The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."
|
|
66708
66708
|
),
|
|
66709
|
-
cloudflareAccountId: z2.string().trim().nullable().default(null).describe("The default Cloudflare account ID of the workspace"),
|
|
66709
|
+
cloudflareAccountId: z2.string().trim().toLowerCase().length(32).regex(/^([0-9a-fA-F]{32})$/i).nullable().default(null).describe("The default Cloudflare account ID of the workspace"),
|
|
66710
66710
|
configFile: z2.string().trim().nullable().default(null).describe(
|
|
66711
66711
|
"The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
|
|
66712
66712
|
),
|
|
@@ -68962,7 +68962,7 @@ var init_get_env = __esm({
|
|
|
68962
68962
|
branch: process.env[`${prefix}BRANCH`],
|
|
68963
68963
|
preid: process.env[`${prefix}PRE_ID`],
|
|
68964
68964
|
externalPackagePatterns: process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`] ? JSON.parse(process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`]) : [],
|
|
68965
|
-
cloudflareAccountId: process.env[`${prefix}CLOUDFLARE_ACCOUNT_ID`],
|
|
68965
|
+
cloudflareAccountId: process.env[`${prefix}CLOUDFLARE_ACCOUNT_ID`] ? process.env[`${prefix}CLOUDFLARE_ACCOUNT_ID`] : process.env.CLOUDFLARE_ACCOUNT_ID ? process.env.CLOUDFLARE_ACCOUNT_ID : process.env.STORM_BOT_CLOUDFLARE_ACCOUNT,
|
|
68966
68966
|
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
|
|
68967
68967
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
68968
68968
|
) ? getLogLevelLabel(
|
|
@@ -69178,6 +69178,10 @@ var init_set_env = __esm({
|
|
|
69178
69178
|
);
|
|
69179
69179
|
}
|
|
69180
69180
|
if (config.cloudflareAccountId) {
|
|
69181
|
+
process.env.STORM_BOT_CLOUDFLARE_ACCOUNT ??= String(
|
|
69182
|
+
config.cloudflareAccountId
|
|
69183
|
+
);
|
|
69184
|
+
process.env.CLOUDFLARE_ACCOUNT_ID ??= String(config.cloudflareAccountId);
|
|
69181
69185
|
process.env[`${prefix}CLOUDFLARE_ACCOUNT_ID`] = String(
|
|
69182
69186
|
config.cloudflareAccountId
|
|
69183
69187
|
);
|
|
@@ -406743,6 +406747,8 @@ async function runExecutor(options, context) {
|
|
|
406743
406747
|
try {
|
|
406744
406748
|
(0, import_node_child_process7.fork)(require.resolve("wrangler/bin/wrangler"), ["deploy", ...args], {
|
|
406745
406749
|
env: {
|
|
406750
|
+
CLOUDFLARE_API_TOKEN: process.env.STORM_BOT_CLOUDFLARE_TOKEN,
|
|
406751
|
+
WRANGLER_LOG: "debug",
|
|
406746
406752
|
...process.env,
|
|
406747
406753
|
FORCE_COLOR: "true"
|
|
406748
406754
|
},
|
|
@@ -66754,7 +66754,7 @@ var init_schema = __esm({
|
|
|
66754
66754
|
]).default("debug").describe(
|
|
66755
66755
|
"The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."
|
|
66756
66756
|
),
|
|
66757
|
-
cloudflareAccountId: z2.string().trim().nullable().default(null).describe("The default Cloudflare account ID of the workspace"),
|
|
66757
|
+
cloudflareAccountId: z2.string().trim().toLowerCase().length(32).regex(/^([0-9a-fA-F]{32})$/i).nullable().default(null).describe("The default Cloudflare account ID of the workspace"),
|
|
66758
66758
|
configFile: z2.string().trim().nullable().default(null).describe(
|
|
66759
66759
|
"The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
|
|
66760
66760
|
),
|
|
@@ -69010,7 +69010,7 @@ var init_get_env = __esm({
|
|
|
69010
69010
|
branch: process.env[`${prefix}BRANCH`],
|
|
69011
69011
|
preid: process.env[`${prefix}PRE_ID`],
|
|
69012
69012
|
externalPackagePatterns: process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`] ? JSON.parse(process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`]) : [],
|
|
69013
|
-
cloudflareAccountId: process.env[`${prefix}CLOUDFLARE_ACCOUNT_ID`],
|
|
69013
|
+
cloudflareAccountId: process.env[`${prefix}CLOUDFLARE_ACCOUNT_ID`] ? process.env[`${prefix}CLOUDFLARE_ACCOUNT_ID`] : process.env.CLOUDFLARE_ACCOUNT_ID ? process.env.CLOUDFLARE_ACCOUNT_ID : process.env.STORM_BOT_CLOUDFLARE_ACCOUNT,
|
|
69014
69014
|
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
|
|
69015
69015
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
69016
69016
|
) ? getLogLevelLabel(
|
|
@@ -69226,6 +69226,10 @@ var init_set_env = __esm({
|
|
|
69226
69226
|
);
|
|
69227
69227
|
}
|
|
69228
69228
|
if (config.cloudflareAccountId) {
|
|
69229
|
+
process.env.STORM_BOT_CLOUDFLARE_ACCOUNT ??= String(
|
|
69230
|
+
config.cloudflareAccountId
|
|
69231
|
+
);
|
|
69232
|
+
process.env.CLOUDFLARE_ACCOUNT_ID ??= String(config.cloudflareAccountId);
|
|
69229
69233
|
process.env[`${prefix}CLOUDFLARE_ACCOUNT_ID`] = String(
|
|
69230
69234
|
config.cloudflareAccountId
|
|
69231
69235
|
);
|
|
@@ -222214,7 +222214,7 @@ var require_package3 = __commonJS({
|
|
|
222214
222214
|
"packages/cloudflare-tools/package.json"(exports2, module2) {
|
|
222215
222215
|
module2.exports = {
|
|
222216
222216
|
name: "@storm-software/cloudflare-tools",
|
|
222217
|
-
version: "0.
|
|
222217
|
+
version: "0.5.0",
|
|
222218
222218
|
private: false,
|
|
222219
222219
|
description: "\u26A1The Storm-Ops monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.",
|
|
222220
222220
|
keywords: [
|
|
@@ -453627,7 +453627,7 @@ var require_package13 = __commonJS({
|
|
|
453627
453627
|
"packages/cloudflare-tools/package.json"(exports2, module2) {
|
|
453628
453628
|
module2.exports = {
|
|
453629
453629
|
name: "@storm-software/cloudflare-tools",
|
|
453630
|
-
version: "0.
|
|
453630
|
+
version: "0.5.0",
|
|
453631
453631
|
private: false,
|
|
453632
453632
|
description: "\u26A1The Storm-Ops monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.",
|
|
453633
453633
|
keywords: [
|
|
@@ -520256,7 +520256,7 @@ var init_schema = __esm({
|
|
|
520256
520256
|
]).default("debug").describe(
|
|
520257
520257
|
"The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."
|
|
520258
520258
|
),
|
|
520259
|
-
cloudflareAccountId: z2.string().trim().nullable().default(null).describe("The default Cloudflare account ID of the workspace"),
|
|
520259
|
+
cloudflareAccountId: z2.string().trim().toLowerCase().length(32).regex(/^([0-9a-fA-F]{32})$/i).nullable().default(null).describe("The default Cloudflare account ID of the workspace"),
|
|
520260
520260
|
configFile: z2.string().trim().nullable().default(null).describe(
|
|
520261
520261
|
"The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
|
|
520262
520262
|
),
|
|
@@ -520965,7 +520965,7 @@ var init_get_env = __esm({
|
|
|
520965
520965
|
branch: process.env[`${prefix}BRANCH`],
|
|
520966
520966
|
preid: process.env[`${prefix}PRE_ID`],
|
|
520967
520967
|
externalPackagePatterns: process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`] ? JSON.parse(process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`]) : [],
|
|
520968
|
-
cloudflareAccountId: process.env[`${prefix}CLOUDFLARE_ACCOUNT_ID`],
|
|
520968
|
+
cloudflareAccountId: process.env[`${prefix}CLOUDFLARE_ACCOUNT_ID`] ? process.env[`${prefix}CLOUDFLARE_ACCOUNT_ID`] : process.env.CLOUDFLARE_ACCOUNT_ID ? process.env.CLOUDFLARE_ACCOUNT_ID : process.env.STORM_BOT_CLOUDFLARE_ACCOUNT,
|
|
520969
520969
|
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
|
|
520970
520970
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
520971
520971
|
) ? getLogLevelLabel(
|
|
@@ -521181,6 +521181,10 @@ var init_set_env = __esm({
|
|
|
521181
521181
|
);
|
|
521182
521182
|
}
|
|
521183
521183
|
if (config.cloudflareAccountId) {
|
|
521184
|
+
process.env.STORM_BOT_CLOUDFLARE_ACCOUNT ??= String(
|
|
521185
|
+
config.cloudflareAccountId
|
|
521186
|
+
);
|
|
521187
|
+
process.env.CLOUDFLARE_ACCOUNT_ID ??= String(config.cloudflareAccountId);
|
|
521184
521188
|
process.env[`${prefix}CLOUDFLARE_ACCOUNT_ID`] = String(
|
|
521185
521189
|
config.cloudflareAccountId
|
|
521186
521190
|
);
|