@storm-software/cloudflare-tools 0.71.90 → 0.71.92
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 +24 -0
- package/README.md +1 -1
- package/dist/{chunk-P42MQNVF.mjs → chunk-536H3WK5.mjs} +18 -1
- package/dist/{chunk-YQIWTBN7.mjs → chunk-54ORU46C.mjs} +3 -3
- package/dist/{chunk-IH7USDLX.js → chunk-COUZEHRU.js} +18 -18
- package/dist/{chunk-52X4GPEN.mjs → chunk-EXZP5MWY.mjs} +28 -7
- package/dist/{chunk-MDOQR5IS.js → chunk-FPW225FM.js} +4 -4
- package/dist/{chunk-QWSTQIUA.js → chunk-GBAVURC4.js} +51 -34
- package/dist/{chunk-6JVDTXHT.js → chunk-JCQYTCUM.js} +5 -5
- package/dist/{chunk-2KWRE5Y5.js → chunk-PVCPJUY2.js} +28 -7
- package/dist/{chunk-E7SXH3BE.js → chunk-QY2K3DFK.js} +168 -168
- package/dist/{chunk-S2GBNGKD.js → chunk-RJCPRCNG.js} +13 -13
- package/dist/{chunk-3SX7VAO7.mjs → chunk-XVKPJL76.mjs} +3 -3
- package/dist/{chunk-C6CPSE5U.mjs → chunk-YQSDJFL7.mjs} +3 -3
- package/dist/{chunk-YIXC7QU5.mjs → chunk-Z6NBDGWC.mjs} +4 -4
- package/dist/{chunk-OPXJUL5V.mjs → chunk-Z7TZ4UY6.mjs} +1 -1
- 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 +5 -5
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkPVCPJUY2js = require('./chunk-PVCPJUY2.js');
|
|
11
11
|
|
|
12
12
|
// ../config-tools/src/utilities/find-up.ts
|
|
13
13
|
var _fs = require('fs');
|
|
@@ -76,11 +76,11 @@ var rootDirectories = [
|
|
|
76
76
|
];
|
|
77
77
|
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
78
78
|
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
79
|
-
return
|
|
79
|
+
return _chunkPVCPJUY2js.correctPaths.call(void 0,
|
|
80
80
|
_nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH))
|
|
81
81
|
);
|
|
82
82
|
}
|
|
83
|
-
return
|
|
83
|
+
return _chunkPVCPJUY2js.correctPaths.call(void 0,
|
|
84
84
|
findFolderUp(
|
|
85
85
|
_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())),
|
|
86
86
|
rootFiles,
|
|
@@ -186,6 +186,10 @@ var fatalColorSchema = z.optional(colorSchema);
|
|
|
186
186
|
schemaRegistry.add(fatalColorSchema, {
|
|
187
187
|
description: "The fatal color of the workspace"
|
|
188
188
|
});
|
|
189
|
+
var performanceColorSchema = z._default(colorSchema, "#00ff00");
|
|
190
|
+
schemaRegistry.add(performanceColorSchema, {
|
|
191
|
+
description: "The performance color of the workspace"
|
|
192
|
+
});
|
|
189
193
|
var positiveColorSchema = z._default(colorSchema, "#4ade80");
|
|
190
194
|
schemaRegistry.add(positiveColorSchema, {
|
|
191
195
|
description: "The positive number color of the workspace"
|
|
@@ -212,6 +216,7 @@ var darkColorsSchema = z.object({
|
|
|
212
216
|
warning: warningColorSchema,
|
|
213
217
|
danger: dangerColorSchema,
|
|
214
218
|
fatal: fatalColorSchema,
|
|
219
|
+
performance: performanceColorSchema,
|
|
215
220
|
positive: positiveColorSchema,
|
|
216
221
|
negative: negativeColorSchema,
|
|
217
222
|
gradient: gradientStopsSchema
|
|
@@ -230,6 +235,7 @@ var lightColorsSchema = z.object({
|
|
|
230
235
|
warning: warningColorSchema,
|
|
231
236
|
danger: dangerColorSchema,
|
|
232
237
|
fatal: fatalColorSchema,
|
|
238
|
+
performance: performanceColorSchema,
|
|
233
239
|
positive: positiveColorSchema,
|
|
234
240
|
negative: negativeColorSchema,
|
|
235
241
|
gradient: gradientStopsSchema
|
|
@@ -252,6 +258,7 @@ var singleColorsSchema = z.object({
|
|
|
252
258
|
warning: warningColorSchema,
|
|
253
259
|
danger: dangerColorSchema,
|
|
254
260
|
fatal: fatalColorSchema,
|
|
261
|
+
performance: performanceColorSchema,
|
|
255
262
|
positive: positiveColorSchema,
|
|
256
263
|
negative: negativeColorSchema,
|
|
257
264
|
gradient: gradientStopsSchema
|
|
@@ -619,6 +626,7 @@ var logLevelSchema = z._default(
|
|
|
619
626
|
"warn",
|
|
620
627
|
"success",
|
|
621
628
|
"info",
|
|
629
|
+
"performance",
|
|
622
630
|
"debug",
|
|
623
631
|
"trace",
|
|
624
632
|
"all"
|
|
@@ -706,6 +714,7 @@ var COLOR_KEYS = [
|
|
|
706
714
|
"warning",
|
|
707
715
|
"danger",
|
|
708
716
|
"fatal",
|
|
717
|
+
"performance",
|
|
709
718
|
"positive",
|
|
710
719
|
"negative"
|
|
711
720
|
];
|
|
@@ -724,7 +733,7 @@ async function getPackageJsonConfig(root) {
|
|
|
724
733
|
const workspaceRoot = findWorkspaceRoot(root);
|
|
725
734
|
if (_fs.existsSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"))) {
|
|
726
735
|
const file = await _promises.readFile.call(void 0,
|
|
727
|
-
|
|
736
|
+
_chunkPVCPJUY2js.joinPaths.call(void 0, workspaceRoot, "package.json"),
|
|
728
737
|
"utf8"
|
|
729
738
|
);
|
|
730
739
|
if (file) {
|
|
@@ -808,7 +817,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
808
817
|
envName: _optionalChain([fileName, 'optionalAccess', _5 => _5.toUpperCase, 'call', _6 => _6()]),
|
|
809
818
|
jitiOptions: {
|
|
810
819
|
debug: false,
|
|
811
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
820
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkPVCPJUY2js.joinPaths.call(void 0,
|
|
812
821
|
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
813
822
|
"jiti"
|
|
814
823
|
)
|
|
@@ -822,7 +831,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
822
831
|
envName: _optionalChain([fileName, 'optionalAccess', _7 => _7.toUpperCase, 'call', _8 => _8()]),
|
|
823
832
|
jitiOptions: {
|
|
824
833
|
debug: false,
|
|
825
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
834
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkPVCPJUY2js.joinPaths.call(void 0,
|
|
826
835
|
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
827
836
|
"jiti"
|
|
828
837
|
)
|
|
@@ -839,7 +848,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
839
848
|
let config = result.config;
|
|
840
849
|
const configFile = result.configFile;
|
|
841
850
|
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
842
|
-
|
|
851
|
+
_chunkPVCPJUY2js.writeTrace.call(void 0,
|
|
843
852
|
`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
|
|
844
853
|
{
|
|
845
854
|
logLevel: "all"
|
|
@@ -855,7 +864,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
855
864
|
for (const result2 of results) {
|
|
856
865
|
if (_optionalChain([result2, 'optionalAccess', _9 => _9.config]) && _optionalChain([result2, 'optionalAccess', _10 => _10.configFile]) && Object.keys(result2.config).length > 0) {
|
|
857
866
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
858
|
-
|
|
867
|
+
_chunkPVCPJUY2js.writeTrace.call(void 0,
|
|
859
868
|
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
860
869
|
{
|
|
861
870
|
logLevel: "all"
|
|
@@ -935,15 +944,15 @@ var getConfigEnv = () => {
|
|
|
935
944
|
support: process.env[`${prefix}SUPPORT`] || void 0,
|
|
936
945
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
937
946
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
938
|
-
configFile: process.env[`${prefix}WORKSPACE_CONFIG_FILE`] ?
|
|
939
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ?
|
|
947
|
+
configFile: process.env[`${prefix}WORKSPACE_CONFIG_FILE`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_CONFIG_FILE`]) : void 0,
|
|
948
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
940
949
|
directories: {
|
|
941
|
-
cache: process.env[`${prefix}CACHE_DIR`] ?
|
|
942
|
-
data: process.env[`${prefix}DATA_DIR`] ?
|
|
943
|
-
config: process.env[`${prefix}CONFIG_DIR`] ?
|
|
944
|
-
temp: process.env[`${prefix}TEMP_DIR`] ?
|
|
945
|
-
log: process.env[`${prefix}LOG_DIR`] ?
|
|
946
|
-
build: process.env[`${prefix}BUILD_DIR`] ?
|
|
950
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
|
|
951
|
+
data: process.env[`${prefix}DATA_DIR`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
|
|
952
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
|
|
953
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
|
|
954
|
+
log: process.env[`${prefix}LOG_DIR`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
|
|
955
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? _chunkPVCPJUY2js.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
|
|
947
956
|
},
|
|
948
957
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
949
958
|
mode: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}MODE`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
@@ -967,7 +976,7 @@ var getConfigEnv = () => {
|
|
|
967
976
|
},
|
|
968
977
|
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
|
|
969
978
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
970
|
-
) ?
|
|
979
|
+
) ? _chunkPVCPJUY2js.getLogLevelLabel.call(void 0,
|
|
971
980
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
972
981
|
) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
973
982
|
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
@@ -1042,6 +1051,7 @@ var getSingleThemeColorsEnv = (prefix) => {
|
|
|
1042
1051
|
warning: process.env[`${prefix}WARNING`],
|
|
1043
1052
|
danger: process.env[`${prefix}DANGER`],
|
|
1044
1053
|
fatal: process.env[`${prefix}FATAL`],
|
|
1054
|
+
performance: process.env[`${prefix}PERFORMANCE`],
|
|
1045
1055
|
positive: process.env[`${prefix}POSITIVE`],
|
|
1046
1056
|
negative: process.env[`${prefix}NEGATIVE`],
|
|
1047
1057
|
gradient
|
|
@@ -1081,6 +1091,7 @@ var getBaseThemeColorsEnv = (prefix) => {
|
|
|
1081
1091
|
warning: process.env[`${prefix}WARNING`],
|
|
1082
1092
|
danger: process.env[`${prefix}DANGER`],
|
|
1083
1093
|
fatal: process.env[`${prefix}FATAL`],
|
|
1094
|
+
performance: process.env[`${prefix}PERFORMANCE`],
|
|
1084
1095
|
positive: process.env[`${prefix}POSITIVE`],
|
|
1085
1096
|
negative: process.env[`${prefix}NEGATIVE`],
|
|
1086
1097
|
gradient
|
|
@@ -1235,42 +1246,42 @@ var setConfigEnv = (config) => {
|
|
|
1235
1246
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
1236
1247
|
}
|
|
1237
1248
|
if (config.configFile) {
|
|
1238
|
-
process.env[`${prefix}WORKSPACE_CONFIG_FILE`] =
|
|
1249
|
+
process.env[`${prefix}WORKSPACE_CONFIG_FILE`] = _chunkPVCPJUY2js.correctPaths.call(void 0,
|
|
1239
1250
|
config.configFile
|
|
1240
1251
|
);
|
|
1241
1252
|
}
|
|
1242
1253
|
if (config.workspaceRoot) {
|
|
1243
|
-
process.env[`${prefix}WORKSPACE_ROOT`] =
|
|
1244
|
-
process.env.NX_WORKSPACE_ROOT =
|
|
1245
|
-
process.env.NX_WORKSPACE_ROOT_PATH =
|
|
1254
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = _chunkPVCPJUY2js.correctPaths.call(void 0, config.workspaceRoot);
|
|
1255
|
+
process.env.NX_WORKSPACE_ROOT = _chunkPVCPJUY2js.correctPaths.call(void 0, config.workspaceRoot);
|
|
1256
|
+
process.env.NX_WORKSPACE_ROOT_PATH = _chunkPVCPJUY2js.correctPaths.call(void 0, config.workspaceRoot);
|
|
1246
1257
|
}
|
|
1247
1258
|
if (config.directories) {
|
|
1248
1259
|
if (!config.skipCache && config.directories.cache) {
|
|
1249
|
-
process.env[`${prefix}CACHE_DIR`] =
|
|
1260
|
+
process.env[`${prefix}CACHE_DIR`] = _chunkPVCPJUY2js.correctPaths.call(void 0,
|
|
1250
1261
|
config.directories.cache
|
|
1251
1262
|
);
|
|
1252
1263
|
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
1253
1264
|
}
|
|
1254
1265
|
if (config.directories.data) {
|
|
1255
|
-
process.env[`${prefix}DATA_DIR`] =
|
|
1266
|
+
process.env[`${prefix}DATA_DIR`] = _chunkPVCPJUY2js.correctPaths.call(void 0, config.directories.data);
|
|
1256
1267
|
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
1257
1268
|
}
|
|
1258
1269
|
if (config.directories.config) {
|
|
1259
|
-
process.env[`${prefix}CONFIG_DIR`] =
|
|
1270
|
+
process.env[`${prefix}CONFIG_DIR`] = _chunkPVCPJUY2js.correctPaths.call(void 0,
|
|
1260
1271
|
config.directories.config
|
|
1261
1272
|
);
|
|
1262
1273
|
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
1263
1274
|
}
|
|
1264
1275
|
if (config.directories.temp) {
|
|
1265
|
-
process.env[`${prefix}TEMP_DIR`] =
|
|
1276
|
+
process.env[`${prefix}TEMP_DIR`] = _chunkPVCPJUY2js.correctPaths.call(void 0, config.directories.temp);
|
|
1266
1277
|
process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
|
|
1267
1278
|
}
|
|
1268
1279
|
if (config.directories.log) {
|
|
1269
|
-
process.env[`${prefix}LOG_DIR`] =
|
|
1280
|
+
process.env[`${prefix}LOG_DIR`] = _chunkPVCPJUY2js.correctPaths.call(void 0, config.directories.log);
|
|
1270
1281
|
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
1271
1282
|
}
|
|
1272
1283
|
if (config.directories.build) {
|
|
1273
|
-
process.env[`${prefix}BUILD_DIR`] =
|
|
1284
|
+
process.env[`${prefix}BUILD_DIR`] = _chunkPVCPJUY2js.correctPaths.call(void 0,
|
|
1274
1285
|
config.directories.build
|
|
1275
1286
|
);
|
|
1276
1287
|
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
@@ -1332,9 +1343,9 @@ var setConfigEnv = (config) => {
|
|
|
1332
1343
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
1333
1344
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
1334
1345
|
process.env.NX_VERBOSE_LOGGING = String(
|
|
1335
|
-
|
|
1346
|
+
_chunkPVCPJUY2js.getLogLevel.call(void 0, config.logLevel) >= _chunkPVCPJUY2js.LogLevel.DEBUG ? true : false
|
|
1336
1347
|
);
|
|
1337
|
-
process.env.RUST_BACKTRACE =
|
|
1348
|
+
process.env.RUST_BACKTRACE = _chunkPVCPJUY2js.getLogLevel.call(void 0, config.logLevel) >= _chunkPVCPJUY2js.LogLevel.DEBUG ? "full" : "none";
|
|
1338
1349
|
}
|
|
1339
1350
|
if (config.skipConfigLogging !== void 0) {
|
|
1340
1351
|
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
|
|
@@ -1391,6 +1402,9 @@ var setSingleThemeColorsEnv = (prefix, config) => {
|
|
|
1391
1402
|
if (config.fatal) {
|
|
1392
1403
|
process.env[`${prefix}FATAL`] = config.fatal;
|
|
1393
1404
|
}
|
|
1405
|
+
if (config.performance) {
|
|
1406
|
+
process.env[`${prefix}PERFORMANCE`] = config.performance;
|
|
1407
|
+
}
|
|
1394
1408
|
if (config.positive) {
|
|
1395
1409
|
process.env[`${prefix}POSITIVE`] = config.positive;
|
|
1396
1410
|
}
|
|
@@ -1449,6 +1463,9 @@ var setBaseThemeColorsEnv = (prefix, config) => {
|
|
|
1449
1463
|
if (config.fatal) {
|
|
1450
1464
|
process.env[`${prefix}FATAL`] = config.fatal;
|
|
1451
1465
|
}
|
|
1466
|
+
if (config.performance) {
|
|
1467
|
+
process.env[`${prefix}PERFORMANCE`] = config.performance;
|
|
1468
|
+
}
|
|
1452
1469
|
if (config.positive) {
|
|
1453
1470
|
process.env[`${prefix}POSITIVE`] = config.positive;
|
|
1454
1471
|
}
|
|
@@ -1476,7 +1493,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
1476
1493
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
1477
1494
|
if (!configFile) {
|
|
1478
1495
|
if (!skipLogs) {
|
|
1479
|
-
|
|
1496
|
+
_chunkPVCPJUY2js.writeWarning.call(void 0,
|
|
1480
1497
|
"No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n",
|
|
1481
1498
|
{ logLevel: "all" }
|
|
1482
1499
|
);
|
|
@@ -1492,7 +1509,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
1492
1509
|
defaultConfig
|
|
1493
1510
|
);
|
|
1494
1511
|
if (!configInput.variant) {
|
|
1495
|
-
configInput.variant = _fs.existsSync.call(void 0,
|
|
1512
|
+
configInput.variant = _fs.existsSync.call(void 0, _chunkPVCPJUY2js.joinPaths.call(void 0, _workspaceRoot, "nx.json")) || _fs.existsSync.call(void 0, _chunkPVCPJUY2js.joinPaths.call(void 0, _workspaceRoot, ".nx")) || _fs.existsSync.call(void 0, _chunkPVCPJUY2js.joinPaths.call(void 0, _workspaceRoot, "lerna.json")) || _fs.existsSync.call(void 0, _chunkPVCPJUY2js.joinPaths.call(void 0, _workspaceRoot, "turbo.json")) ? "monorepo" : "minimal";
|
|
1496
1513
|
}
|
|
1497
1514
|
try {
|
|
1498
1515
|
result = applyDefaultConfig(
|
|
@@ -1503,7 +1520,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
1503
1520
|
throw new Error(
|
|
1504
1521
|
`Failed to parse Storm Workspace configuration${_optionalChain([error, 'optionalAccess', _35 => _35.message]) ? `: ${error.message}` : ""}
|
|
1505
1522
|
|
|
1506
|
-
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${
|
|
1523
|
+
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${_chunkPVCPJUY2js.formatLogMessage.call(void 0,
|
|
1507
1524
|
configInput
|
|
1508
1525
|
)}`,
|
|
1509
1526
|
{
|
|
@@ -1548,9 +1565,9 @@ var loadStormWorkspaceConfig = async (workspaceRoot, skipLogs = false) => {
|
|
|
1548
1565
|
);
|
|
1549
1566
|
setConfigEnv(config);
|
|
1550
1567
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
1551
|
-
|
|
1568
|
+
_chunkPVCPJUY2js.writeTrace.call(void 0,
|
|
1552
1569
|
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
1553
|
-
${
|
|
1570
|
+
${_chunkPVCPJUY2js.formatLogMessage.call(void 0, config)}`,
|
|
1554
1571
|
config
|
|
1555
1572
|
);
|
|
1556
1573
|
}
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkPVCPJUY2js = require('./chunk-PVCPJUY2.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 : _chunkPVCPJUY2js.joinPaths.call(void 0, bucketPath.trim(), fileName)), 'optionalAccess', _5 => _5.replace, 'call', _6 => _6(/^\/+/g, "")]) || "";
|
|
14
|
+
_chunkPVCPJUY2js.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
|
+
_chunkPVCPJUY2js.writeWarning.call(void 0, "[Dry run]: Skipping upload to the R2 bucket.");
|
|
37
37
|
}
|
|
38
38
|
} catch (error) {
|
|
39
|
-
|
|
39
|
+
_chunkPVCPJUY2js.writeError.call(void 0, `Failed to upload ${key} to the ${bucketName} R2 bucket.`);
|
|
40
40
|
throw error;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -9,6 +9,7 @@ var LogLevel = {
|
|
|
9
9
|
WARN: 30,
|
|
10
10
|
SUCCESS: 35,
|
|
11
11
|
INFO: 40,
|
|
12
|
+
PERFORMANCE: 50,
|
|
12
13
|
DEBUG: 60,
|
|
13
14
|
TRACE: 70,
|
|
14
15
|
ALL: 100
|
|
@@ -20,6 +21,7 @@ var LogLevelLabel = {
|
|
|
20
21
|
WARN: "warn",
|
|
21
22
|
SUCCESS: "success",
|
|
22
23
|
INFO: "info",
|
|
24
|
+
PERFORMANCE: "performance",
|
|
23
25
|
DEBUG: "debug",
|
|
24
26
|
TRACE: "trace",
|
|
25
27
|
ALL: "all"
|
|
@@ -39,6 +41,7 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
39
41
|
warning: "#e3b341",
|
|
40
42
|
danger: "#D8314A",
|
|
41
43
|
fatal: "#51070f",
|
|
44
|
+
performance: "#83ff83",
|
|
42
45
|
link: "#3fa6ff",
|
|
43
46
|
positive: "#22c55e",
|
|
44
47
|
negative: "#dc2626",
|
|
@@ -56,6 +59,7 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
56
59
|
warning: "#f3d371",
|
|
57
60
|
danger: "#D8314A",
|
|
58
61
|
fatal: "#a40e26",
|
|
62
|
+
performance: "#00ff00",
|
|
59
63
|
link: "#3fa6ff",
|
|
60
64
|
positive: "#22c55e",
|
|
61
65
|
negative: "#dc2626",
|
|
@@ -143,6 +147,7 @@ var CONSOLE_ICONS = {
|
|
|
143
147
|
[LogLevelLabel.FATAL]: useIcon("\u{1F571}", "\xD7"),
|
|
144
148
|
[LogLevelLabel.WARN]: useIcon("\u26A0", "\u203C"),
|
|
145
149
|
[LogLevelLabel.INFO]: useIcon("\u2139", "i"),
|
|
150
|
+
[LogLevelLabel.PERFORMANCE]: useIcon("\u23F1", "\u23F1"),
|
|
146
151
|
[LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
|
|
147
152
|
[LogLevelLabel.DEBUG]: useIcon("\u{1F6E0}", "D"),
|
|
148
153
|
[LogLevelLabel.TRACE]: useIcon("\u2699", "T"),
|
|
@@ -163,6 +168,8 @@ var getLogLevel = (label) => {
|
|
|
163
168
|
return LogLevel.TRACE;
|
|
164
169
|
case "debug":
|
|
165
170
|
return LogLevel.DEBUG;
|
|
171
|
+
case "performance":
|
|
172
|
+
return LogLevel.PERFORMANCE;
|
|
166
173
|
case "info":
|
|
167
174
|
return LogLevel.INFO;
|
|
168
175
|
case "warn":
|
|
@@ -187,6 +194,9 @@ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
|
|
|
187
194
|
if (logLevel >= LogLevel.DEBUG) {
|
|
188
195
|
return LogLevelLabel.DEBUG;
|
|
189
196
|
}
|
|
197
|
+
if (logLevel >= LogLevel.PERFORMANCE) {
|
|
198
|
+
return LogLevelLabel.PERFORMANCE;
|
|
199
|
+
}
|
|
190
200
|
if (logLevel >= LogLevel.INFO) {
|
|
191
201
|
return LogLevelLabel.INFO;
|
|
192
202
|
}
|
|
@@ -274,6 +284,19 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
|
274
284
|
)(
|
|
275
285
|
`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info] `
|
|
276
286
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
287
|
+
`
|
|
288
|
+
);
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
if (typeof logLevel === "number" && LogLevel.PERFORMANCE >= logLevel) {
|
|
292
|
+
return (message) => {
|
|
293
|
+
console.debug(
|
|
294
|
+
`
|
|
295
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
296
|
+
_nullishCoalesce(colors.performance, () => ( DEFAULT_COLOR_CONFIG.dark.performance))
|
|
297
|
+
)(
|
|
298
|
+
`[${CONSOLE_ICONS[LogLevelLabel.PERFORMANCE]} Performance] `
|
|
299
|
+
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
277
300
|
`
|
|
278
301
|
);
|
|
279
302
|
};
|
|
@@ -319,18 +342,16 @@ var writeError = (message, config) => getLogFn(LogLevel.ERROR, config)(message);
|
|
|
319
342
|
var writeWarning = (message, config) => getLogFn(LogLevel.WARN, config)(message);
|
|
320
343
|
var writeInfo = (message, config) => getLogFn(LogLevel.INFO, config)(message);
|
|
321
344
|
var writeSuccess = (message, config) => getLogFn(LogLevel.SUCCESS, config)(message);
|
|
345
|
+
var writePerformance = (message, config) => getLogFn(LogLevel.PERFORMANCE, config)(message);
|
|
322
346
|
var writeDebug = (message, config) => getLogFn(LogLevel.DEBUG, config)(message);
|
|
323
347
|
var writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);
|
|
324
348
|
var getStopwatch = (name) => {
|
|
325
349
|
const start = /* @__PURE__ */ new Date();
|
|
326
350
|
return () => {
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
includeSeconds: true
|
|
332
|
-
}
|
|
333
|
-
)} to complete`
|
|
351
|
+
writePerformance(
|
|
352
|
+
`The${name ? ` ${name}` : ""} process took ${_formatDistanceToNow.formatDistanceToNow.call(void 0, start, {
|
|
353
|
+
includeSeconds: true
|
|
354
|
+
})} to complete`
|
|
334
355
|
);
|
|
335
356
|
};
|
|
336
357
|
};
|