@storm-software/config-tools 1.162.16 → 1.162.18
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/README.md +1 -1
- package/bin/config.cjs +25 -14
- package/bin/config.js +25 -14
- package/dist/{chunk-YXYH4ZRB.cjs → chunk-2LQBYJT5.cjs} +6 -0
- package/dist/{chunk-BRZ2YPOB.cjs → chunk-4AM2CTWO.cjs} +1 -1
- package/dist/{chunk-S4N5SQKH.js → chunk-BC2QD5QZ.js} +38 -11
- package/dist/{chunk-C5HVNEWC.js → chunk-ETZGNPAA.js} +6 -0
- package/dist/{chunk-WAOF47SA.cjs → chunk-GBY7M6XX.cjs} +6 -6
- package/dist/{chunk-BDMLGH55.js → chunk-GYFE7GKG.js} +1 -1
- package/dist/{chunk-TTKMRWZQ.cjs → chunk-HFKBN5GE.cjs} +42 -15
- package/dist/{chunk-CGL2FZ3Z.js → chunk-JT77N7TT.js} +16 -3
- package/dist/{chunk-XECGVR7L.js → chunk-QRKAMMHF.js} +6 -6
- package/dist/{chunk-WV2WN4MO.cjs → chunk-VKTQOXWO.cjs} +16 -3
- package/dist/config-file/get-config-file.cjs +2 -2
- package/dist/config-file/get-config-file.js +1 -1
- package/dist/config-file/index.cjs +2 -2
- package/dist/config-file/index.js +1 -1
- package/dist/create-storm-config.cjs +7 -5
- package/dist/create-storm-config.d.cts +20 -2
- package/dist/create-storm-config.d.ts +20 -2
- package/dist/create-storm-config.js +8 -6
- package/dist/env/get-env.cjs +2 -2
- package/dist/env/get-env.js +1 -1
- package/dist/env/index.cjs +3 -3
- package/dist/env/index.js +2 -2
- package/dist/env/set-env.cjs +2 -2
- package/dist/env/set-env.js +1 -1
- package/dist/get-config.cjs +8 -6
- package/dist/get-config.d.cts +16 -2
- package/dist/get-config.d.ts +16 -2
- package/dist/get-config.js +9 -7
- package/dist/index.cjs +10 -6
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +11 -7
- package/package.json +1 -1
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 -->
|
package/bin/config.cjs
CHANGED
|
@@ -651,7 +651,7 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
|
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
653
|
}
|
|
654
|
-
if (!config) {
|
|
654
|
+
if (!config || Object.keys(config).length === 0) {
|
|
655
655
|
return void 0;
|
|
656
656
|
}
|
|
657
657
|
config.configFile = configFile;
|
|
@@ -710,12 +710,12 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
|
710
710
|
configFile: process.env[`${prefix}CONFIG_FILE`] ? correctPaths(process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
711
711
|
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? correctPaths(process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
712
712
|
directories: {
|
|
713
|
-
cache: process.env[`${prefix}CACHE_DIR`] ? correctPaths(process.env[`${prefix}CACHE_DIR`]) : void 0,
|
|
714
|
-
data: process.env[`${prefix}DATA_DIR`] ? correctPaths(process.env[`${prefix}DATA_DIR`]) : void 0,
|
|
715
|
-
config: process.env[`${prefix}CONFIG_DIR`] ? correctPaths(process.env[`${prefix}CONFIG_DIR`]) : void 0,
|
|
716
|
-
temp: process.env[`${prefix}TEMP_DIR`] ? correctPaths(process.env[`${prefix}TEMP_DIR`]) : void 0,
|
|
717
|
-
log: process.env[`${prefix}LOG_DIR`] ? correctPaths(process.env[`${prefix}LOG_DIR`]) : void 0,
|
|
718
|
-
build: process.env[`${prefix}BUILD_DIR`] ? correctPaths(process.env[`${prefix}BUILD_DIR`]) : void 0
|
|
713
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? correctPaths(process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? correctPaths(process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
|
|
714
|
+
data: process.env[`${prefix}DATA_DIR`] ? correctPaths(process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? correctPaths(process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
|
|
715
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? correctPaths(process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? correctPaths(process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
|
|
716
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? correctPaths(process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? correctPaths(process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
|
|
717
|
+
log: process.env[`${prefix}LOG_DIR`] ? correctPaths(process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? correctPaths(process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
|
|
718
|
+
build: process.env[`${prefix}BUILD_DIR`] ? correctPaths(process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? correctPaths(process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
|
|
719
719
|
},
|
|
720
720
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
721
721
|
mode: (process.env[`${prefix}MODE`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT) || void 0,
|
|
@@ -935,21 +935,27 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
935
935
|
if (config.directories) {
|
|
936
936
|
if (!config.skipCache && config.directories.cache) {
|
|
937
937
|
process.env[`${prefix}CACHE_DIR`] = correctPaths(config.directories.cache);
|
|
938
|
+
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
938
939
|
}
|
|
939
940
|
if (config.directories.data) {
|
|
940
941
|
process.env[`${prefix}DATA_DIR`] = correctPaths(config.directories.data);
|
|
942
|
+
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
941
943
|
}
|
|
942
944
|
if (config.directories.config) {
|
|
943
945
|
process.env[`${prefix}CONFIG_DIR`] = correctPaths(config.directories.config);
|
|
946
|
+
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
944
947
|
}
|
|
945
948
|
if (config.directories.temp) {
|
|
946
949
|
process.env[`${prefix}TEMP_DIR`] = correctPaths(config.directories.temp);
|
|
950
|
+
process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
|
|
947
951
|
}
|
|
948
952
|
if (config.directories.log) {
|
|
949
953
|
process.env[`${prefix}LOG_DIR`] = correctPaths(config.directories.log);
|
|
954
|
+
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
950
955
|
}
|
|
951
956
|
if (config.directories.build) {
|
|
952
957
|
process.env[`${prefix}BUILD_DIR`] = correctPaths(config.directories.build);
|
|
958
|
+
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
953
959
|
}
|
|
954
960
|
}
|
|
955
961
|
if (config.skipCache !== void 0) {
|
|
@@ -1117,7 +1123,7 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
|
|
|
1117
1123
|
// src/create-storm-config.ts
|
|
1118
1124
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
1119
1125
|
var _static_cache = void 0;
|
|
1120
|
-
var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
1126
|
+
var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
|
|
1121
1127
|
let result;
|
|
1122
1128
|
if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
|
|
1123
1129
|
let _workspaceRoot = workspaceRoot;
|
|
@@ -1125,13 +1131,18 @@ var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, sc
|
|
|
1125
1131
|
_workspaceRoot = findWorkspaceRoot();
|
|
1126
1132
|
}
|
|
1127
1133
|
const configEnv = getConfigEnv();
|
|
1128
|
-
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
1129
1134
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
1130
|
-
if (!configFile
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1135
|
+
if (!configFile) {
|
|
1136
|
+
if (!skipLogs) {
|
|
1137
|
+
writeWarning("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", {
|
|
1138
|
+
logLevel: "all"
|
|
1139
|
+
});
|
|
1140
|
+
}
|
|
1141
|
+
if (useDefault === false) {
|
|
1142
|
+
return void 0;
|
|
1143
|
+
}
|
|
1134
1144
|
}
|
|
1145
|
+
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
1135
1146
|
result = await import_schema.stormWorkspaceConfigSchema.parseAsync((0, import_defu2.default)(configEnv, configFile, defaultConfig));
|
|
1136
1147
|
result.workspaceRoot ??= _workspaceRoot;
|
|
1137
1148
|
} else {
|
|
@@ -1164,7 +1175,7 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
|
1164
1175
|
return extension;
|
|
1165
1176
|
}, "createConfigExtension");
|
|
1166
1177
|
var loadStormWorkspaceConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
|
|
1167
|
-
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
1178
|
+
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs, true);
|
|
1168
1179
|
setConfigEnv(config);
|
|
1169
1180
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
1170
1181
|
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
package/bin/config.js
CHANGED
|
@@ -619,7 +619,7 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
|
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
|
-
if (!config) {
|
|
622
|
+
if (!config || Object.keys(config).length === 0) {
|
|
623
623
|
return void 0;
|
|
624
624
|
}
|
|
625
625
|
config.configFile = configFile;
|
|
@@ -678,12 +678,12 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
|
678
678
|
configFile: process.env[`${prefix}CONFIG_FILE`] ? correctPaths(process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
679
679
|
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? correctPaths(process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
680
680
|
directories: {
|
|
681
|
-
cache: process.env[`${prefix}CACHE_DIR`] ? correctPaths(process.env[`${prefix}CACHE_DIR`]) : void 0,
|
|
682
|
-
data: process.env[`${prefix}DATA_DIR`] ? correctPaths(process.env[`${prefix}DATA_DIR`]) : void 0,
|
|
683
|
-
config: process.env[`${prefix}CONFIG_DIR`] ? correctPaths(process.env[`${prefix}CONFIG_DIR`]) : void 0,
|
|
684
|
-
temp: process.env[`${prefix}TEMP_DIR`] ? correctPaths(process.env[`${prefix}TEMP_DIR`]) : void 0,
|
|
685
|
-
log: process.env[`${prefix}LOG_DIR`] ? correctPaths(process.env[`${prefix}LOG_DIR`]) : void 0,
|
|
686
|
-
build: process.env[`${prefix}BUILD_DIR`] ? correctPaths(process.env[`${prefix}BUILD_DIR`]) : void 0
|
|
681
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? correctPaths(process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? correctPaths(process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
|
|
682
|
+
data: process.env[`${prefix}DATA_DIR`] ? correctPaths(process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? correctPaths(process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
|
|
683
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? correctPaths(process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? correctPaths(process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
|
|
684
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? correctPaths(process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? correctPaths(process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
|
|
685
|
+
log: process.env[`${prefix}LOG_DIR`] ? correctPaths(process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? correctPaths(process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
|
|
686
|
+
build: process.env[`${prefix}BUILD_DIR`] ? correctPaths(process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? correctPaths(process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
|
|
687
687
|
},
|
|
688
688
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
689
689
|
mode: (process.env[`${prefix}MODE`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT) || void 0,
|
|
@@ -903,21 +903,27 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
903
903
|
if (config.directories) {
|
|
904
904
|
if (!config.skipCache && config.directories.cache) {
|
|
905
905
|
process.env[`${prefix}CACHE_DIR`] = correctPaths(config.directories.cache);
|
|
906
|
+
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
906
907
|
}
|
|
907
908
|
if (config.directories.data) {
|
|
908
909
|
process.env[`${prefix}DATA_DIR`] = correctPaths(config.directories.data);
|
|
910
|
+
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
909
911
|
}
|
|
910
912
|
if (config.directories.config) {
|
|
911
913
|
process.env[`${prefix}CONFIG_DIR`] = correctPaths(config.directories.config);
|
|
914
|
+
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
912
915
|
}
|
|
913
916
|
if (config.directories.temp) {
|
|
914
917
|
process.env[`${prefix}TEMP_DIR`] = correctPaths(config.directories.temp);
|
|
918
|
+
process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
|
|
915
919
|
}
|
|
916
920
|
if (config.directories.log) {
|
|
917
921
|
process.env[`${prefix}LOG_DIR`] = correctPaths(config.directories.log);
|
|
922
|
+
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
918
923
|
}
|
|
919
924
|
if (config.directories.build) {
|
|
920
925
|
process.env[`${prefix}BUILD_DIR`] = correctPaths(config.directories.build);
|
|
926
|
+
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
921
927
|
}
|
|
922
928
|
}
|
|
923
929
|
if (config.skipCache !== void 0) {
|
|
@@ -1085,7 +1091,7 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
|
|
|
1085
1091
|
// src/create-storm-config.ts
|
|
1086
1092
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
1087
1093
|
var _static_cache = void 0;
|
|
1088
|
-
var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
1094
|
+
var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
|
|
1089
1095
|
let result;
|
|
1090
1096
|
if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
|
|
1091
1097
|
let _workspaceRoot = workspaceRoot;
|
|
@@ -1093,13 +1099,18 @@ var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, sc
|
|
|
1093
1099
|
_workspaceRoot = findWorkspaceRoot();
|
|
1094
1100
|
}
|
|
1095
1101
|
const configEnv = getConfigEnv();
|
|
1096
|
-
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
1097
1102
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
1098
|
-
if (!configFile
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1103
|
+
if (!configFile) {
|
|
1104
|
+
if (!skipLogs) {
|
|
1105
|
+
writeWarning("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", {
|
|
1106
|
+
logLevel: "all"
|
|
1107
|
+
});
|
|
1108
|
+
}
|
|
1109
|
+
if (useDefault === false) {
|
|
1110
|
+
return void 0;
|
|
1111
|
+
}
|
|
1102
1112
|
}
|
|
1113
|
+
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
1103
1114
|
result = await stormWorkspaceConfigSchema.parseAsync(defu2(configEnv, configFile, defaultConfig));
|
|
1104
1115
|
result.workspaceRoot ??= _workspaceRoot;
|
|
1105
1116
|
} else {
|
|
@@ -1132,7 +1143,7 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
|
1132
1143
|
return extension;
|
|
1133
1144
|
}, "createConfigExtension");
|
|
1134
1145
|
var loadStormWorkspaceConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
|
|
1135
|
-
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
1146
|
+
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs, true);
|
|
1136
1147
|
setConfigEnv(config);
|
|
1137
1148
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
1138
1149
|
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
@@ -121,21 +121,27 @@ var setConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config
|
|
|
121
121
|
if (config.directories) {
|
|
122
122
|
if (!config.skipCache && config.directories.cache) {
|
|
123
123
|
process.env[`${prefix}CACHE_DIR`] = _chunkE5AUC34Gcjs.correctPaths.call(void 0, config.directories.cache);
|
|
124
|
+
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
124
125
|
}
|
|
125
126
|
if (config.directories.data) {
|
|
126
127
|
process.env[`${prefix}DATA_DIR`] = _chunkE5AUC34Gcjs.correctPaths.call(void 0, config.directories.data);
|
|
128
|
+
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
127
129
|
}
|
|
128
130
|
if (config.directories.config) {
|
|
129
131
|
process.env[`${prefix}CONFIG_DIR`] = _chunkE5AUC34Gcjs.correctPaths.call(void 0, config.directories.config);
|
|
132
|
+
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
130
133
|
}
|
|
131
134
|
if (config.directories.temp) {
|
|
132
135
|
process.env[`${prefix}TEMP_DIR`] = _chunkE5AUC34Gcjs.correctPaths.call(void 0, config.directories.temp);
|
|
136
|
+
process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
|
|
133
137
|
}
|
|
134
138
|
if (config.directories.log) {
|
|
135
139
|
process.env[`${prefix}LOG_DIR`] = _chunkE5AUC34Gcjs.correctPaths.call(void 0, config.directories.log);
|
|
140
|
+
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
136
141
|
}
|
|
137
142
|
if (config.directories.build) {
|
|
138
143
|
process.env[`${prefix}BUILD_DIR`] = _chunkE5AUC34Gcjs.correctPaths.call(void 0, config.directories.build);
|
|
144
|
+
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
139
145
|
}
|
|
140
146
|
}
|
|
141
147
|
if (config.skipCache !== void 0) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getConfigFile
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GYFE7GKG.js";
|
|
4
4
|
import {
|
|
5
5
|
formatLogMessage,
|
|
6
6
|
writeTrace,
|
|
@@ -14,11 +14,11 @@ import {
|
|
|
14
14
|
} from "./chunk-K6PUXRK3.js";
|
|
15
15
|
import {
|
|
16
16
|
setConfigEnv
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ETZGNPAA.js";
|
|
18
18
|
import {
|
|
19
19
|
getConfigEnv,
|
|
20
20
|
getExtensionEnv
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-QRKAMMHF.js";
|
|
22
22
|
import {
|
|
23
23
|
__name
|
|
24
24
|
} from "./chunk-SHUYVCID.js";
|
|
@@ -28,7 +28,7 @@ import { stormWorkspaceConfigSchema } from "@storm-software/config/schema";
|
|
|
28
28
|
import defu from "defu";
|
|
29
29
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
30
30
|
var _static_cache = void 0;
|
|
31
|
-
var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
31
|
+
var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
|
|
32
32
|
let result;
|
|
33
33
|
if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
|
|
34
34
|
let _workspaceRoot = workspaceRoot;
|
|
@@ -36,13 +36,18 @@ var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, sc
|
|
|
36
36
|
_workspaceRoot = findWorkspaceRoot();
|
|
37
37
|
}
|
|
38
38
|
const configEnv = getConfigEnv();
|
|
39
|
-
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
40
39
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
41
|
-
if (!configFile
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
if (!configFile) {
|
|
41
|
+
if (!skipLogs) {
|
|
42
|
+
writeWarning("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", {
|
|
43
|
+
logLevel: "all"
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
if (useDefault === false) {
|
|
47
|
+
return void 0;
|
|
48
|
+
}
|
|
45
49
|
}
|
|
50
|
+
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
46
51
|
result = await stormWorkspaceConfigSchema.parseAsync(defu(configEnv, configFile, defaultConfig));
|
|
47
52
|
result.workspaceRoot ??= _workspaceRoot;
|
|
48
53
|
} else {
|
|
@@ -75,7 +80,7 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
|
75
80
|
return extension;
|
|
76
81
|
}, "createConfigExtension");
|
|
77
82
|
var loadStormWorkspaceConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
|
|
78
|
-
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
83
|
+
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs, true);
|
|
79
84
|
setConfigEnv(config);
|
|
80
85
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
81
86
|
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
@@ -83,9 +88,31 @@ ${formatLogMessage(config)}`, config);
|
|
|
83
88
|
}
|
|
84
89
|
return config;
|
|
85
90
|
}, "loadStormWorkspaceConfig");
|
|
91
|
+
var tryLoadStormWorkspaceConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = true, useDefault = false) => {
|
|
92
|
+
try {
|
|
93
|
+
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs, useDefault);
|
|
94
|
+
if (!config) {
|
|
95
|
+
return void 0;
|
|
96
|
+
}
|
|
97
|
+
setConfigEnv(config);
|
|
98
|
+
if (!skipLogs && !config.skipConfigLogging) {
|
|
99
|
+
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
100
|
+
${formatLogMessage(config)}`, config);
|
|
101
|
+
}
|
|
102
|
+
return config;
|
|
103
|
+
} catch (error) {
|
|
104
|
+
if (!skipLogs) {
|
|
105
|
+
writeWarning(`\u26A0\uFE0F Failed to load Storm Workspace configuration: ${error}`, {
|
|
106
|
+
logLevel: "all"
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
return void 0;
|
|
110
|
+
}
|
|
111
|
+
}, "tryLoadStormWorkspaceConfig");
|
|
86
112
|
|
|
87
113
|
export {
|
|
88
114
|
createStormWorkspaceConfig,
|
|
89
115
|
createConfigExtension,
|
|
90
|
-
loadStormWorkspaceConfig
|
|
116
|
+
loadStormWorkspaceConfig,
|
|
117
|
+
tryLoadStormWorkspaceConfig
|
|
91
118
|
};
|
|
@@ -121,21 +121,27 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
121
121
|
if (config.directories) {
|
|
122
122
|
if (!config.skipCache && config.directories.cache) {
|
|
123
123
|
process.env[`${prefix}CACHE_DIR`] = correctPaths(config.directories.cache);
|
|
124
|
+
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
124
125
|
}
|
|
125
126
|
if (config.directories.data) {
|
|
126
127
|
process.env[`${prefix}DATA_DIR`] = correctPaths(config.directories.data);
|
|
128
|
+
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
127
129
|
}
|
|
128
130
|
if (config.directories.config) {
|
|
129
131
|
process.env[`${prefix}CONFIG_DIR`] = correctPaths(config.directories.config);
|
|
132
|
+
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
130
133
|
}
|
|
131
134
|
if (config.directories.temp) {
|
|
132
135
|
process.env[`${prefix}TEMP_DIR`] = correctPaths(config.directories.temp);
|
|
136
|
+
process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
|
|
133
137
|
}
|
|
134
138
|
if (config.directories.log) {
|
|
135
139
|
process.env[`${prefix}LOG_DIR`] = correctPaths(config.directories.log);
|
|
140
|
+
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
136
141
|
}
|
|
137
142
|
if (config.directories.build) {
|
|
138
143
|
process.env[`${prefix}BUILD_DIR`] = correctPaths(config.directories.build);
|
|
144
|
+
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
139
145
|
}
|
|
140
146
|
}
|
|
141
147
|
if (config.skipCache !== void 0) {
|
|
@@ -60,12 +60,12 @@ var getConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, () => {
|
|
|
60
60
|
configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunkE5AUC34Gcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
61
61
|
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkE5AUC34Gcjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
62
62
|
directories: {
|
|
63
|
-
cache: process.env[`${prefix}CACHE_DIR`] ? _chunkE5AUC34Gcjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
|
|
64
|
-
data: process.env[`${prefix}DATA_DIR`] ? _chunkE5AUC34Gcjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
|
|
65
|
-
config: process.env[`${prefix}CONFIG_DIR`] ? _chunkE5AUC34Gcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
|
|
66
|
-
temp: process.env[`${prefix}TEMP_DIR`] ? _chunkE5AUC34Gcjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
|
|
67
|
-
log: process.env[`${prefix}LOG_DIR`] ? _chunkE5AUC34Gcjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
|
|
68
|
-
build: process.env[`${prefix}BUILD_DIR`] ? _chunkE5AUC34Gcjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : void 0
|
|
63
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? _chunkE5AUC34Gcjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? _chunkE5AUC34Gcjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
|
|
64
|
+
data: process.env[`${prefix}DATA_DIR`] ? _chunkE5AUC34Gcjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? _chunkE5AUC34Gcjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
|
|
65
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _chunkE5AUC34Gcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? _chunkE5AUC34Gcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
|
|
66
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _chunkE5AUC34Gcjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? _chunkE5AUC34Gcjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
|
|
67
|
+
log: process.env[`${prefix}LOG_DIR`] ? _chunkE5AUC34Gcjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? _chunkE5AUC34Gcjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
|
|
68
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _chunkE5AUC34Gcjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? _chunkE5AUC34Gcjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
|
|
69
69
|
},
|
|
70
70
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
71
71
|
mode: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}MODE`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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 _chunk4AM2CTWOcjs = require('./chunk-4AM2CTWO.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -14,11 +14,11 @@ var _chunkYSSMM2WQcjs = require('./chunk-YSSMM2WQ.cjs');
|
|
|
14
14
|
var _chunk6LIPH2JWcjs = require('./chunk-6LIPH2JW.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunk2LQBYJT5cjs = require('./chunk-2LQBYJT5.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkGBY7M6XXcjs = require('./chunk-GBY7M6XX.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
|
|
@@ -28,21 +28,26 @@ var _schema = require('@storm-software/config/schema');
|
|
|
28
28
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
29
29
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
30
30
|
var _static_cache = void 0;
|
|
31
|
-
var createStormWorkspaceConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
31
|
+
var createStormWorkspaceConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
|
|
32
32
|
let result;
|
|
33
33
|
if (!_optionalChain([_static_cache, 'optionalAccess', _ => _.data]) || !_optionalChain([_static_cache, 'optionalAccess', _2 => _2.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
34
34
|
let _workspaceRoot = workspaceRoot;
|
|
35
35
|
if (!_workspaceRoot) {
|
|
36
36
|
_workspaceRoot = _chunk6LIPH2JWcjs.findWorkspaceRoot.call(void 0, );
|
|
37
37
|
}
|
|
38
|
-
const configEnv =
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
const configEnv = _chunkGBY7M6XXcjs.getConfigEnv.call(void 0, );
|
|
39
|
+
const configFile = await _chunk4AM2CTWOcjs.getConfigFile.call(void 0, _workspaceRoot);
|
|
40
|
+
if (!configFile) {
|
|
41
|
+
if (!skipLogs) {
|
|
42
|
+
_chunkDLO4KL2Zcjs.writeWarning.call(void 0, "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", {
|
|
43
|
+
logLevel: "all"
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
if (useDefault === false) {
|
|
47
|
+
return void 0;
|
|
48
|
+
}
|
|
45
49
|
}
|
|
50
|
+
const defaultConfig = await _chunkYSSMM2WQcjs.getDefaultConfig.call(void 0, _workspaceRoot);
|
|
46
51
|
result = await _schema.stormWorkspaceConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
|
|
47
52
|
result.workspaceRoot ??= _workspaceRoot;
|
|
48
53
|
} else {
|
|
@@ -67,7 +72,7 @@ var createConfigExtension = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0
|
|
|
67
72
|
if (_extension_cache.has(extension_cache_key)) {
|
|
68
73
|
return _extension_cache.get(extension_cache_key);
|
|
69
74
|
}
|
|
70
|
-
let extension =
|
|
75
|
+
let extension = _chunkGBY7M6XXcjs.getExtensionEnv.call(void 0, extensionName);
|
|
71
76
|
if (schema) {
|
|
72
77
|
extension = schema.parse(extension);
|
|
73
78
|
}
|
|
@@ -75,17 +80,39 @@ var createConfigExtension = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0
|
|
|
75
80
|
return extension;
|
|
76
81
|
}, "createConfigExtension");
|
|
77
82
|
var loadStormWorkspaceConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (workspaceRoot, skipLogs = false) => {
|
|
78
|
-
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
79
|
-
|
|
83
|
+
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs, true);
|
|
84
|
+
_chunk2LQBYJT5cjs.setConfigEnv.call(void 0, config);
|
|
80
85
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
81
86
|
_chunkDLO4KL2Zcjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm Workspace configuration:
|
|
82
87
|
${_chunkDLO4KL2Zcjs.formatLogMessage.call(void 0, config)}`, config);
|
|
83
88
|
}
|
|
84
89
|
return config;
|
|
85
90
|
}, "loadStormWorkspaceConfig");
|
|
91
|
+
var tryLoadStormWorkspaceConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (workspaceRoot, skipLogs = true, useDefault = false) => {
|
|
92
|
+
try {
|
|
93
|
+
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs, useDefault);
|
|
94
|
+
if (!config) {
|
|
95
|
+
return void 0;
|
|
96
|
+
}
|
|
97
|
+
_chunk2LQBYJT5cjs.setConfigEnv.call(void 0, config);
|
|
98
|
+
if (!skipLogs && !config.skipConfigLogging) {
|
|
99
|
+
_chunkDLO4KL2Zcjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm Workspace configuration:
|
|
100
|
+
${_chunkDLO4KL2Zcjs.formatLogMessage.call(void 0, config)}`, config);
|
|
101
|
+
}
|
|
102
|
+
return config;
|
|
103
|
+
} catch (error) {
|
|
104
|
+
if (!skipLogs) {
|
|
105
|
+
_chunkDLO4KL2Zcjs.writeWarning.call(void 0, `\u26A0\uFE0F Failed to load Storm Workspace configuration: ${error}`, {
|
|
106
|
+
logLevel: "all"
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
return void 0;
|
|
110
|
+
}
|
|
111
|
+
}, "tryLoadStormWorkspaceConfig");
|
|
112
|
+
|
|
86
113
|
|
|
87
114
|
|
|
88
115
|
|
|
89
116
|
|
|
90
117
|
|
|
91
|
-
exports.createStormWorkspaceConfig = createStormWorkspaceConfig; exports.createConfigExtension = createConfigExtension; exports.loadStormWorkspaceConfig = loadStormWorkspaceConfig;
|
|
118
|
+
exports.createStormWorkspaceConfig = createStormWorkspaceConfig; exports.createConfigExtension = createConfigExtension; exports.loadStormWorkspaceConfig = loadStormWorkspaceConfig; exports.tryLoadStormWorkspaceConfig = tryLoadStormWorkspaceConfig;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
loadStormWorkspaceConfig
|
|
3
|
-
|
|
2
|
+
loadStormWorkspaceConfig,
|
|
3
|
+
tryLoadStormWorkspaceConfig
|
|
4
|
+
} from "./chunk-BC2QD5QZ.js";
|
|
4
5
|
import {
|
|
5
6
|
findWorkspaceRoot
|
|
6
7
|
} from "./chunk-K6PUXRK3.js";
|
|
@@ -19,8 +20,20 @@ var getWorkspaceConfig = /* @__PURE__ */ __name((skipLogs = false, options = {})
|
|
|
19
20
|
}
|
|
20
21
|
return getConfig(workspaceRoot, skipLogs);
|
|
21
22
|
}, "getWorkspaceConfig");
|
|
23
|
+
var tryGetWorkspaceConfig = /* @__PURE__ */ __name(async (skipLogs = false, options = {}) => {
|
|
24
|
+
try {
|
|
25
|
+
let workspaceRoot = options.workspaceRoot;
|
|
26
|
+
if (!workspaceRoot) {
|
|
27
|
+
workspaceRoot = findWorkspaceRoot(options.cwd);
|
|
28
|
+
}
|
|
29
|
+
return tryLoadStormWorkspaceConfig(workspaceRoot, skipLogs, options.useDefault);
|
|
30
|
+
} catch {
|
|
31
|
+
return void 0;
|
|
32
|
+
}
|
|
33
|
+
}, "tryGetWorkspaceConfig");
|
|
22
34
|
|
|
23
35
|
export {
|
|
24
36
|
getConfig,
|
|
25
|
-
getWorkspaceConfig
|
|
37
|
+
getWorkspaceConfig,
|
|
38
|
+
tryGetWorkspaceConfig
|
|
26
39
|
};
|
|
@@ -60,12 +60,12 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
|
60
60
|
configFile: process.env[`${prefix}CONFIG_FILE`] ? correctPaths(process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
61
61
|
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? correctPaths(process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
62
62
|
directories: {
|
|
63
|
-
cache: process.env[`${prefix}CACHE_DIR`] ? correctPaths(process.env[`${prefix}CACHE_DIR`]) : void 0,
|
|
64
|
-
data: process.env[`${prefix}DATA_DIR`] ? correctPaths(process.env[`${prefix}DATA_DIR`]) : void 0,
|
|
65
|
-
config: process.env[`${prefix}CONFIG_DIR`] ? correctPaths(process.env[`${prefix}CONFIG_DIR`]) : void 0,
|
|
66
|
-
temp: process.env[`${prefix}TEMP_DIR`] ? correctPaths(process.env[`${prefix}TEMP_DIR`]) : void 0,
|
|
67
|
-
log: process.env[`${prefix}LOG_DIR`] ? correctPaths(process.env[`${prefix}LOG_DIR`]) : void 0,
|
|
68
|
-
build: process.env[`${prefix}BUILD_DIR`] ? correctPaths(process.env[`${prefix}BUILD_DIR`]) : void 0
|
|
63
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? correctPaths(process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? correctPaths(process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
|
|
64
|
+
data: process.env[`${prefix}DATA_DIR`] ? correctPaths(process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? correctPaths(process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
|
|
65
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? correctPaths(process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? correctPaths(process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
|
|
66
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? correctPaths(process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? correctPaths(process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
|
|
67
|
+
log: process.env[`${prefix}LOG_DIR`] ? correctPaths(process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? correctPaths(process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
|
|
68
|
+
build: process.env[`${prefix}BUILD_DIR`] ? correctPaths(process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? correctPaths(process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
|
|
69
69
|
},
|
|
70
70
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
71
71
|
mode: (process.env[`${prefix}MODE`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT) || void 0,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
var _chunkHFKBN5GEcjs = require('./chunk-HFKBN5GE.cjs');
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
var _chunk6LIPH2JWcjs = require('./chunk-6LIPH2JW.cjs');
|
|
@@ -10,7 +11,7 @@ var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
|
|
|
10
11
|
|
|
11
12
|
// src/get-config.ts
|
|
12
13
|
var getConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (workspaceRoot, skipLogs = false) => {
|
|
13
|
-
return
|
|
14
|
+
return _chunkHFKBN5GEcjs.loadStormWorkspaceConfig.call(void 0, workspaceRoot, skipLogs);
|
|
14
15
|
}, "getConfig");
|
|
15
16
|
var getWorkspaceConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (skipLogs = false, options = {}) => {
|
|
16
17
|
let workspaceRoot = options.workspaceRoot;
|
|
@@ -19,8 +20,20 @@ var getWorkspaceConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (
|
|
|
19
20
|
}
|
|
20
21
|
return getConfig(workspaceRoot, skipLogs);
|
|
21
22
|
}, "getWorkspaceConfig");
|
|
23
|
+
var tryGetWorkspaceConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (skipLogs = false, options = {}) => {
|
|
24
|
+
try {
|
|
25
|
+
let workspaceRoot = options.workspaceRoot;
|
|
26
|
+
if (!workspaceRoot) {
|
|
27
|
+
workspaceRoot = _chunk6LIPH2JWcjs.findWorkspaceRoot.call(void 0, options.cwd);
|
|
28
|
+
}
|
|
29
|
+
return _chunkHFKBN5GEcjs.tryLoadStormWorkspaceConfig.call(void 0, workspaceRoot, skipLogs, options.useDefault);
|
|
30
|
+
} catch (e) {
|
|
31
|
+
return void 0;
|
|
32
|
+
}
|
|
33
|
+
}, "tryGetWorkspaceConfig");
|
|
34
|
+
|
|
22
35
|
|
|
23
36
|
|
|
24
37
|
|
|
25
38
|
|
|
26
|
-
exports.getConfig = getConfig; exports.getWorkspaceConfig = getWorkspaceConfig;
|
|
39
|
+
exports.getConfig = getConfig; exports.getWorkspaceConfig = getWorkspaceConfig; exports.tryGetWorkspaceConfig = tryGetWorkspaceConfig;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk4AM2CTWOcjs = require('../chunk-4AM2CTWO.cjs');
|
|
5
5
|
require('../chunk-UNXQ2AR4.cjs');
|
|
6
6
|
require('../chunk-SIU3CSEY.cjs');
|
|
7
7
|
require('../chunk-CHA6766N.cjs');
|
|
@@ -22,4 +22,4 @@ require('../chunk-USNT2KNT.cjs');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
exports.getConfigFile =
|
|
25
|
+
exports.getConfigFile = _chunk4AM2CTWOcjs.getConfigFile; exports.getConfigFileByName = _chunk4AM2CTWOcjs.getConfigFileByName;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk4AM2CTWOcjs = require('../chunk-4AM2CTWO.cjs');
|
|
6
6
|
require('../chunk-UNXQ2AR4.cjs');
|
|
7
7
|
require('../chunk-SIU3CSEY.cjs');
|
|
8
8
|
require('../chunk-CHA6766N.cjs');
|
|
@@ -23,4 +23,4 @@ require('../chunk-USNT2KNT.cjs');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
exports.getConfigFile =
|
|
26
|
+
exports.getConfigFile = _chunk4AM2CTWOcjs.getConfigFile; exports.getConfigFileByName = _chunk4AM2CTWOcjs.getConfigFileByName;
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
require('./chunk-
|
|
5
|
+
|
|
6
|
+
var _chunkHFKBN5GEcjs = require('./chunk-HFKBN5GE.cjs');
|
|
7
|
+
require('./chunk-4AM2CTWO.cjs');
|
|
7
8
|
require('./chunk-UNXQ2AR4.cjs');
|
|
8
9
|
require('./chunk-SIU3CSEY.cjs');
|
|
9
10
|
require('./chunk-CHA6766N.cjs');
|
|
@@ -17,8 +18,8 @@ require('./chunk-VICC23NV.cjs');
|
|
|
17
18
|
require('./chunk-KBPYCUVG.cjs');
|
|
18
19
|
require('./chunk-OSY5X2AI.cjs');
|
|
19
20
|
require('./chunk-IGUYFX5B.cjs');
|
|
20
|
-
require('./chunk-
|
|
21
|
-
require('./chunk-
|
|
21
|
+
require('./chunk-2LQBYJT5.cjs');
|
|
22
|
+
require('./chunk-GBY7M6XX.cjs');
|
|
22
23
|
require('./chunk-E5AUC34G.cjs');
|
|
23
24
|
require('./chunk-7HCO3WBN.cjs');
|
|
24
25
|
require('./chunk-C5OTFOQB.cjs');
|
|
@@ -27,4 +28,5 @@ require('./chunk-USNT2KNT.cjs');
|
|
|
27
28
|
|
|
28
29
|
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
|
|
32
|
+
exports.createConfigExtension = _chunkHFKBN5GEcjs.createConfigExtension; exports.createStormWorkspaceConfig = _chunkHFKBN5GEcjs.createStormWorkspaceConfig; exports.loadStormWorkspaceConfig = _chunkHFKBN5GEcjs.loadStormWorkspaceConfig; exports.tryLoadStormWorkspaceConfig = _chunkHFKBN5GEcjs.tryLoadStormWorkspaceConfig;
|
|
@@ -4,9 +4,14 @@ import { ZodTypeAny } from 'zod';
|
|
|
4
4
|
/**
|
|
5
5
|
* Get the config for the current Storm workspace
|
|
6
6
|
*
|
|
7
|
+
* @param extensionName - The name of the config extension
|
|
8
|
+
* @param schema - The schema for the config extension
|
|
9
|
+
* @param workspaceRoot - The root directory of the workspace
|
|
10
|
+
* @param skipLogs - Skip writing logs to the console
|
|
11
|
+
* @param useDefault - Whether to use the default config if no config file is found
|
|
7
12
|
* @returns The config for the current Storm workspace
|
|
8
13
|
*/
|
|
9
|
-
declare const createStormWorkspaceConfig: <TExtensionName extends keyof StormWorkspaceConfig["extensions"] = keyof StormWorkspaceConfig["extensions"], TExtensionConfig = any, TExtensionSchema extends ZodTypeAny = ZodTypeAny>(extensionName?: TExtensionName, schema?: TExtensionSchema, workspaceRoot?: string, skipLogs?: boolean) => Promise<
|
|
14
|
+
declare const createStormWorkspaceConfig: <TExtensionName extends keyof StormWorkspaceConfig["extensions"] = keyof StormWorkspaceConfig["extensions"], TExtensionConfig = any, TExtensionSchema extends ZodTypeAny = ZodTypeAny, TUseDefault extends boolean | undefined = boolean | undefined, TResult = TUseDefault extends true ? StormWorkspaceConfig<TExtensionName, TExtensionConfig> : StormWorkspaceConfig<TExtensionName, TExtensionConfig> | undefined>(extensionName?: TExtensionName, schema?: TExtensionSchema, workspaceRoot?: string, skipLogs?: boolean, useDefault?: TUseDefault) => Promise<TResult>;
|
|
10
15
|
/**
|
|
11
16
|
* Get the config for a specific Storm config Extension
|
|
12
17
|
*
|
|
@@ -17,7 +22,20 @@ declare const createStormWorkspaceConfig: <TExtensionName extends keyof StormWor
|
|
|
17
22
|
declare const createConfigExtension: <TExtensionName extends keyof StormWorkspaceConfig["extensions"] = keyof StormWorkspaceConfig["extensions"], TExtensionConfig = any, TExtensionSchema extends ZodTypeAny = ZodTypeAny>(extensionName: TExtensionName, schema: TExtensionSchema) => TExtensionConfig;
|
|
18
23
|
/**
|
|
19
24
|
* Load the config file values for the current Storm workspace into environment variables
|
|
25
|
+
*
|
|
26
|
+
* @param workspaceRoot - The root directory of the workspace
|
|
27
|
+
* @param skipLogs - Skip writing logs to the console
|
|
28
|
+
* @returns The config for the current Storm workspace, throws an error if the config file could not be loaded
|
|
20
29
|
*/
|
|
21
30
|
declare const loadStormWorkspaceConfig: (workspaceRoot?: string, skipLogs?: boolean) => Promise<StormWorkspaceConfig>;
|
|
31
|
+
/**
|
|
32
|
+
* Try to load the config file values for the current Storm workspace into environment variables
|
|
33
|
+
*
|
|
34
|
+
* @param workspaceRoot - The root directory of the workspace
|
|
35
|
+
* @param skipLogs - Skip writing logs to the console
|
|
36
|
+
* @param useDefault - Whether to use the default config if no config file is found
|
|
37
|
+
* @returns The config for the current Storm workspace, or undefined if the config file could not be loaded
|
|
38
|
+
*/
|
|
39
|
+
declare const tryLoadStormWorkspaceConfig: (workspaceRoot?: string, skipLogs?: boolean, useDefault?: boolean) => Promise<StormWorkspaceConfig | undefined>;
|
|
22
40
|
|
|
23
|
-
export { createConfigExtension, createStormWorkspaceConfig, loadStormWorkspaceConfig };
|
|
41
|
+
export { createConfigExtension, createStormWorkspaceConfig, loadStormWorkspaceConfig, tryLoadStormWorkspaceConfig };
|
|
@@ -4,9 +4,14 @@ import { ZodTypeAny } from 'zod';
|
|
|
4
4
|
/**
|
|
5
5
|
* Get the config for the current Storm workspace
|
|
6
6
|
*
|
|
7
|
+
* @param extensionName - The name of the config extension
|
|
8
|
+
* @param schema - The schema for the config extension
|
|
9
|
+
* @param workspaceRoot - The root directory of the workspace
|
|
10
|
+
* @param skipLogs - Skip writing logs to the console
|
|
11
|
+
* @param useDefault - Whether to use the default config if no config file is found
|
|
7
12
|
* @returns The config for the current Storm workspace
|
|
8
13
|
*/
|
|
9
|
-
declare const createStormWorkspaceConfig: <TExtensionName extends keyof StormWorkspaceConfig["extensions"] = keyof StormWorkspaceConfig["extensions"], TExtensionConfig = any, TExtensionSchema extends ZodTypeAny = ZodTypeAny>(extensionName?: TExtensionName, schema?: TExtensionSchema, workspaceRoot?: string, skipLogs?: boolean) => Promise<
|
|
14
|
+
declare const createStormWorkspaceConfig: <TExtensionName extends keyof StormWorkspaceConfig["extensions"] = keyof StormWorkspaceConfig["extensions"], TExtensionConfig = any, TExtensionSchema extends ZodTypeAny = ZodTypeAny, TUseDefault extends boolean | undefined = boolean | undefined, TResult = TUseDefault extends true ? StormWorkspaceConfig<TExtensionName, TExtensionConfig> : StormWorkspaceConfig<TExtensionName, TExtensionConfig> | undefined>(extensionName?: TExtensionName, schema?: TExtensionSchema, workspaceRoot?: string, skipLogs?: boolean, useDefault?: TUseDefault) => Promise<TResult>;
|
|
10
15
|
/**
|
|
11
16
|
* Get the config for a specific Storm config Extension
|
|
12
17
|
*
|
|
@@ -17,7 +22,20 @@ declare const createStormWorkspaceConfig: <TExtensionName extends keyof StormWor
|
|
|
17
22
|
declare const createConfigExtension: <TExtensionName extends keyof StormWorkspaceConfig["extensions"] = keyof StormWorkspaceConfig["extensions"], TExtensionConfig = any, TExtensionSchema extends ZodTypeAny = ZodTypeAny>(extensionName: TExtensionName, schema: TExtensionSchema) => TExtensionConfig;
|
|
18
23
|
/**
|
|
19
24
|
* Load the config file values for the current Storm workspace into environment variables
|
|
25
|
+
*
|
|
26
|
+
* @param workspaceRoot - The root directory of the workspace
|
|
27
|
+
* @param skipLogs - Skip writing logs to the console
|
|
28
|
+
* @returns The config for the current Storm workspace, throws an error if the config file could not be loaded
|
|
20
29
|
*/
|
|
21
30
|
declare const loadStormWorkspaceConfig: (workspaceRoot?: string, skipLogs?: boolean) => Promise<StormWorkspaceConfig>;
|
|
31
|
+
/**
|
|
32
|
+
* Try to load the config file values for the current Storm workspace into environment variables
|
|
33
|
+
*
|
|
34
|
+
* @param workspaceRoot - The root directory of the workspace
|
|
35
|
+
* @param skipLogs - Skip writing logs to the console
|
|
36
|
+
* @param useDefault - Whether to use the default config if no config file is found
|
|
37
|
+
* @returns The config for the current Storm workspace, or undefined if the config file could not be loaded
|
|
38
|
+
*/
|
|
39
|
+
declare const tryLoadStormWorkspaceConfig: (workspaceRoot?: string, skipLogs?: boolean, useDefault?: boolean) => Promise<StormWorkspaceConfig | undefined>;
|
|
22
40
|
|
|
23
|
-
export { createConfigExtension, createStormWorkspaceConfig, loadStormWorkspaceConfig };
|
|
41
|
+
export { createConfigExtension, createStormWorkspaceConfig, loadStormWorkspaceConfig, tryLoadStormWorkspaceConfig };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createConfigExtension,
|
|
3
3
|
createStormWorkspaceConfig,
|
|
4
|
-
loadStormWorkspaceConfig
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
loadStormWorkspaceConfig,
|
|
5
|
+
tryLoadStormWorkspaceConfig
|
|
6
|
+
} from "./chunk-BC2QD5QZ.js";
|
|
7
|
+
import "./chunk-GYFE7GKG.js";
|
|
7
8
|
import "./chunk-I6MMCLIA.js";
|
|
8
9
|
import "./chunk-SFDIRWJY.js";
|
|
9
10
|
import "./chunk-2HSUVM5I.js";
|
|
@@ -17,8 +18,8 @@ import "./chunk-7DEX73IB.js";
|
|
|
17
18
|
import "./chunk-FVYBJYYR.js";
|
|
18
19
|
import "./chunk-AWCU6JTS.js";
|
|
19
20
|
import "./chunk-TKQCRNGC.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-ETZGNPAA.js";
|
|
22
|
+
import "./chunk-QRKAMMHF.js";
|
|
22
23
|
import "./chunk-D6E6GZD2.js";
|
|
23
24
|
import "./chunk-NKHVLY3K.js";
|
|
24
25
|
import "./chunk-3QAWRU2B.js";
|
|
@@ -26,5 +27,6 @@ import "./chunk-SHUYVCID.js";
|
|
|
26
27
|
export {
|
|
27
28
|
createConfigExtension,
|
|
28
29
|
createStormWorkspaceConfig,
|
|
29
|
-
loadStormWorkspaceConfig
|
|
30
|
+
loadStormWorkspaceConfig,
|
|
31
|
+
tryLoadStormWorkspaceConfig
|
|
30
32
|
};
|
package/dist/env/get-env.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkGBY7M6XXcjs = require('../chunk-GBY7M6XX.cjs');
|
|
5
5
|
require('../chunk-E5AUC34G.cjs');
|
|
6
6
|
require('../chunk-7HCO3WBN.cjs');
|
|
7
7
|
require('../chunk-C5OTFOQB.cjs');
|
|
@@ -9,4 +9,4 @@ require('../chunk-USNT2KNT.cjs');
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
exports.getConfigEnv =
|
|
12
|
+
exports.getConfigEnv = _chunkGBY7M6XXcjs.getConfigEnv; exports.getExtensionEnv = _chunkGBY7M6XXcjs.getExtensionEnv;
|
package/dist/env/get-env.js
CHANGED
package/dist/env/index.cjs
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk2LQBYJT5cjs = require('../chunk-2LQBYJT5.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkGBY7M6XXcjs = require('../chunk-GBY7M6XX.cjs');
|
|
10
10
|
require('../chunk-E5AUC34G.cjs');
|
|
11
11
|
require('../chunk-7HCO3WBN.cjs');
|
|
12
12
|
require('../chunk-C5OTFOQB.cjs');
|
|
@@ -16,4 +16,4 @@ require('../chunk-USNT2KNT.cjs');
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
exports.getConfigEnv =
|
|
19
|
+
exports.getConfigEnv = _chunkGBY7M6XXcjs.getConfigEnv; exports.getExtensionEnv = _chunkGBY7M6XXcjs.getExtensionEnv; exports.setConfigEnv = _chunk2LQBYJT5cjs.setConfigEnv; exports.setExtensionEnv = _chunk2LQBYJT5cjs.setExtensionEnv;
|
package/dist/env/index.js
CHANGED
|
@@ -2,11 +2,11 @@ import "../chunk-GSK6EGCB.js";
|
|
|
2
2
|
import {
|
|
3
3
|
setConfigEnv,
|
|
4
4
|
setExtensionEnv
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-ETZGNPAA.js";
|
|
6
6
|
import {
|
|
7
7
|
getConfigEnv,
|
|
8
8
|
getExtensionEnv
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-QRKAMMHF.js";
|
|
10
10
|
import "../chunk-D6E6GZD2.js";
|
|
11
11
|
import "../chunk-NKHVLY3K.js";
|
|
12
12
|
import "../chunk-3QAWRU2B.js";
|
package/dist/env/set-env.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk2LQBYJT5cjs = require('../chunk-2LQBYJT5.cjs');
|
|
5
5
|
require('../chunk-E5AUC34G.cjs');
|
|
6
6
|
require('../chunk-7HCO3WBN.cjs');
|
|
7
7
|
require('../chunk-C5OTFOQB.cjs');
|
|
@@ -9,4 +9,4 @@ require('../chunk-USNT2KNT.cjs');
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
exports.setConfigEnv =
|
|
12
|
+
exports.setConfigEnv = _chunk2LQBYJT5cjs.setConfigEnv; exports.setExtensionEnv = _chunk2LQBYJT5cjs.setExtensionEnv;
|
package/dist/env/set-env.js
CHANGED
package/dist/get-config.cjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
4
|
+
|
|
5
|
+
var _chunkVKTQOXWOcjs = require('./chunk-VKTQOXWO.cjs');
|
|
6
|
+
require('./chunk-HFKBN5GE.cjs');
|
|
7
|
+
require('./chunk-4AM2CTWO.cjs');
|
|
7
8
|
require('./chunk-UNXQ2AR4.cjs');
|
|
8
9
|
require('./chunk-SIU3CSEY.cjs');
|
|
9
10
|
require('./chunk-CHA6766N.cjs');
|
|
@@ -17,8 +18,8 @@ require('./chunk-VICC23NV.cjs');
|
|
|
17
18
|
require('./chunk-KBPYCUVG.cjs');
|
|
18
19
|
require('./chunk-OSY5X2AI.cjs');
|
|
19
20
|
require('./chunk-IGUYFX5B.cjs');
|
|
20
|
-
require('./chunk-
|
|
21
|
-
require('./chunk-
|
|
21
|
+
require('./chunk-2LQBYJT5.cjs');
|
|
22
|
+
require('./chunk-GBY7M6XX.cjs');
|
|
22
23
|
require('./chunk-E5AUC34G.cjs');
|
|
23
24
|
require('./chunk-7HCO3WBN.cjs');
|
|
24
25
|
require('./chunk-C5OTFOQB.cjs');
|
|
@@ -26,4 +27,5 @@ require('./chunk-USNT2KNT.cjs');
|
|
|
26
27
|
|
|
27
28
|
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
|
|
31
|
+
exports.getConfig = _chunkVKTQOXWOcjs.getConfig; exports.getWorkspaceConfig = _chunkVKTQOXWOcjs.getWorkspaceConfig; exports.tryGetWorkspaceConfig = _chunkVKTQOXWOcjs.tryGetWorkspaceConfig;
|
package/dist/get-config.d.cts
CHANGED
|
@@ -17,14 +17,28 @@ type GetWorkspaceConfigOptions = {
|
|
|
17
17
|
* A directory inside the monorepo to start searching from
|
|
18
18
|
*/
|
|
19
19
|
cwd?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Use the default config if no config file is found
|
|
22
|
+
*
|
|
23
|
+
* @defaultValue true
|
|
24
|
+
*/
|
|
25
|
+
useDefault?: boolean;
|
|
20
26
|
};
|
|
21
27
|
/**
|
|
22
28
|
* Get the config for the current Storm workspace
|
|
23
29
|
*
|
|
24
30
|
* @param skipLogs - Skip writing logs to the console
|
|
25
31
|
* @param options - Options for getting the workspace config
|
|
26
|
-
* @returns The config for the current Storm workspace
|
|
32
|
+
* @returns The config for the current Storm workspace, or throws an error if the config file could not be loaded
|
|
27
33
|
*/
|
|
28
34
|
declare const getWorkspaceConfig: (skipLogs?: boolean, options?: GetWorkspaceConfigOptions) => Promise<StormWorkspaceConfig>;
|
|
35
|
+
/**
|
|
36
|
+
* Try to get the config for the current Storm workspace
|
|
37
|
+
*
|
|
38
|
+
* @param skipLogs - Skip writing logs to the console
|
|
39
|
+
* @param options - Options for getting the workspace config
|
|
40
|
+
* @returns The config for the current Storm workspace, or undefined if the config file could not be loaded
|
|
41
|
+
*/
|
|
42
|
+
declare const tryGetWorkspaceConfig: (skipLogs?: boolean, options?: GetWorkspaceConfigOptions) => Promise<StormWorkspaceConfig | undefined>;
|
|
29
43
|
|
|
30
|
-
export { type GetWorkspaceConfigOptions, getConfig, getWorkspaceConfig };
|
|
44
|
+
export { type GetWorkspaceConfigOptions, getConfig, getWorkspaceConfig, tryGetWorkspaceConfig };
|
package/dist/get-config.d.ts
CHANGED
|
@@ -17,14 +17,28 @@ type GetWorkspaceConfigOptions = {
|
|
|
17
17
|
* A directory inside the monorepo to start searching from
|
|
18
18
|
*/
|
|
19
19
|
cwd?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Use the default config if no config file is found
|
|
22
|
+
*
|
|
23
|
+
* @defaultValue true
|
|
24
|
+
*/
|
|
25
|
+
useDefault?: boolean;
|
|
20
26
|
};
|
|
21
27
|
/**
|
|
22
28
|
* Get the config for the current Storm workspace
|
|
23
29
|
*
|
|
24
30
|
* @param skipLogs - Skip writing logs to the console
|
|
25
31
|
* @param options - Options for getting the workspace config
|
|
26
|
-
* @returns The config for the current Storm workspace
|
|
32
|
+
* @returns The config for the current Storm workspace, or throws an error if the config file could not be loaded
|
|
27
33
|
*/
|
|
28
34
|
declare const getWorkspaceConfig: (skipLogs?: boolean, options?: GetWorkspaceConfigOptions) => Promise<StormWorkspaceConfig>;
|
|
35
|
+
/**
|
|
36
|
+
* Try to get the config for the current Storm workspace
|
|
37
|
+
*
|
|
38
|
+
* @param skipLogs - Skip writing logs to the console
|
|
39
|
+
* @param options - Options for getting the workspace config
|
|
40
|
+
* @returns The config for the current Storm workspace, or undefined if the config file could not be loaded
|
|
41
|
+
*/
|
|
42
|
+
declare const tryGetWorkspaceConfig: (skipLogs?: boolean, options?: GetWorkspaceConfigOptions) => Promise<StormWorkspaceConfig | undefined>;
|
|
29
43
|
|
|
30
|
-
export { type GetWorkspaceConfigOptions, getConfig, getWorkspaceConfig };
|
|
44
|
+
export { type GetWorkspaceConfigOptions, getConfig, getWorkspaceConfig, tryGetWorkspaceConfig };
|
package/dist/get-config.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getConfig,
|
|
3
|
-
getWorkspaceConfig
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import "./chunk-
|
|
3
|
+
getWorkspaceConfig,
|
|
4
|
+
tryGetWorkspaceConfig
|
|
5
|
+
} from "./chunk-JT77N7TT.js";
|
|
6
|
+
import "./chunk-BC2QD5QZ.js";
|
|
7
|
+
import "./chunk-GYFE7GKG.js";
|
|
7
8
|
import "./chunk-I6MMCLIA.js";
|
|
8
9
|
import "./chunk-SFDIRWJY.js";
|
|
9
10
|
import "./chunk-2HSUVM5I.js";
|
|
@@ -17,13 +18,14 @@ import "./chunk-7DEX73IB.js";
|
|
|
17
18
|
import "./chunk-FVYBJYYR.js";
|
|
18
19
|
import "./chunk-AWCU6JTS.js";
|
|
19
20
|
import "./chunk-TKQCRNGC.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-ETZGNPAA.js";
|
|
22
|
+
import "./chunk-QRKAMMHF.js";
|
|
22
23
|
import "./chunk-D6E6GZD2.js";
|
|
23
24
|
import "./chunk-NKHVLY3K.js";
|
|
24
25
|
import "./chunk-3QAWRU2B.js";
|
|
25
26
|
import "./chunk-SHUYVCID.js";
|
|
26
27
|
export {
|
|
27
28
|
getConfig,
|
|
28
|
-
getWorkspaceConfig
|
|
29
|
+
getWorkspaceConfig,
|
|
30
|
+
tryGetWorkspaceConfig
|
|
29
31
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -5,17 +5,19 @@ var _chunkZFRJR2OYcjs = require('./chunk-ZFRJR2OY.cjs');
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _chunkWV2WN4MOcjs = require('./chunk-WV2WN4MO.cjs');
|
|
9
8
|
|
|
9
|
+
var _chunkVKTQOXWOcjs = require('./chunk-VKTQOXWO.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
var _chunkHFKBN5GEcjs = require('./chunk-HFKBN5GE.cjs');
|
|
14
16
|
require('./chunk-E4R6RI5D.cjs');
|
|
15
17
|
|
|
16
18
|
|
|
17
19
|
|
|
18
|
-
var
|
|
20
|
+
var _chunk4AM2CTWOcjs = require('./chunk-4AM2CTWO.cjs');
|
|
19
21
|
require('./chunk-UNXQ2AR4.cjs');
|
|
20
22
|
|
|
21
23
|
|
|
@@ -74,11 +76,11 @@ require('./chunk-6DTRKFZD.cjs');
|
|
|
74
76
|
|
|
75
77
|
|
|
76
78
|
|
|
77
|
-
var
|
|
79
|
+
var _chunk2LQBYJT5cjs = require('./chunk-2LQBYJT5.cjs');
|
|
78
80
|
|
|
79
81
|
|
|
80
82
|
|
|
81
|
-
var
|
|
83
|
+
var _chunkGBY7M6XXcjs = require('./chunk-GBY7M6XX.cjs');
|
|
82
84
|
|
|
83
85
|
|
|
84
86
|
|
|
@@ -167,4 +169,6 @@ require('./chunk-USNT2KNT.cjs');
|
|
|
167
169
|
|
|
168
170
|
|
|
169
171
|
|
|
170
|
-
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
exports.CONSOLE_ICONS = _chunkKBPYCUVGcjs.CONSOLE_ICONS; exports.DEFAULT_COLOR_CONFIG = _chunkYSSMM2WQcjs.DEFAULT_COLOR_CONFIG; exports.LARGE_BUFFER = _chunkCHA6766Ncjs.LARGE_BUFFER; exports.LogLevel = _chunkC5OTFOQBcjs.LogLevel; exports.LogLevelLabel = _chunkC5OTFOQBcjs.LogLevelLabel; exports.applyWorkspaceBaseTokens = _chunkWZSBZDAUcjs.applyWorkspaceBaseTokens; exports.applyWorkspaceProjectTokens = _chunkWZSBZDAUcjs.applyWorkspaceProjectTokens; exports.applyWorkspaceTokens = _chunkWZSBZDAUcjs.applyWorkspaceTokens; exports.basename = _chunkE5AUC34Gcjs.basename; exports.correctPaths = _chunkE5AUC34Gcjs.correctPaths; exports.createConfigExtension = _chunkHFKBN5GEcjs.createConfigExtension; exports.createLogger = _chunkZFRJR2OYcjs.createLogger; exports.createStormWorkspaceConfig = _chunkHFKBN5GEcjs.createStormWorkspaceConfig; exports.dirname = _chunkE5AUC34Gcjs.dirname; exports.exitWithError = _chunkSIU3CSEYcjs.exitWithError; exports.exitWithSuccess = _chunkSIU3CSEYcjs.exitWithSuccess; exports.extname = _chunkE5AUC34Gcjs.extname; exports.findFileName = _chunkVULQ4N4Zcjs.findFileName; exports.findWorkspaceRoot = _chunk6LIPH2JWcjs.findWorkspaceRoot; exports.findWorkspaceRootSafe = _chunk6LIPH2JWcjs.findWorkspaceRootSafe; exports.format = _chunkE5AUC34Gcjs.format; exports.formatLogMessage = _chunkDLO4KL2Zcjs.formatLogMessage; exports.formatTimestamp = _chunkIGUYFX5Bcjs.formatTimestamp; exports.getChalk = _chunkVICC23NVcjs.getChalk; exports.getConfig = _chunkVKTQOXWOcjs.getConfig; exports.getConfigEnv = _chunkGBY7M6XXcjs.getConfigEnv; exports.getConfigFile = _chunk4AM2CTWOcjs.getConfigFile; exports.getConfigFileByName = _chunk4AM2CTWOcjs.getConfigFileByName; exports.getDefaultConfig = _chunkYSSMM2WQcjs.getDefaultConfig; exports.getExtensionEnv = _chunkGBY7M6XXcjs.getExtensionEnv; exports.getLogFn = _chunkDLO4KL2Zcjs.getLogFn; exports.getLogLevel = _chunk7HCO3WBNcjs.getLogLevel; exports.getLogLevelLabel = _chunk7HCO3WBNcjs.getLogLevelLabel; exports.getStopwatch = _chunkDLO4KL2Zcjs.getStopwatch; exports.getWorkspaceConfig = _chunkVKTQOXWOcjs.getWorkspaceConfig; exports.handleProcess = _chunkSIU3CSEYcjs.handleProcess; exports.isAbsolute = _chunkE5AUC34Gcjs.isAbsolute; exports.isUnicodeSupported = _chunkOSY5X2AIcjs.isUnicodeSupported; exports.isVerbose = _chunk7HCO3WBNcjs.isVerbose; exports.joinPaths = _chunkE5AUC34Gcjs.joinPaths; exports.loadStormWorkspaceConfig = _chunkHFKBN5GEcjs.loadStormWorkspaceConfig; exports.normalizeString = _chunkE5AUC34Gcjs.normalizeString; exports.normalizeWindowsPath = _chunkE5AUC34Gcjs.normalizeWindowsPath; exports.parse = _chunkE5AUC34Gcjs.parse; exports.relative = _chunkE5AUC34Gcjs.relative; exports.removeExtension = _chunkVULQ4N4Zcjs.removeExtension; exports.resolve = _chunkE5AUC34Gcjs.resolve; exports.run = _chunkCHA6766Ncjs.run; exports.runAsync = _chunkCHA6766Ncjs.runAsync; exports.sep = _chunkE5AUC34Gcjs.sep; exports.setConfigEnv = _chunk2LQBYJT5cjs.setConfigEnv; exports.setExtensionEnv = _chunk2LQBYJT5cjs.setExtensionEnv; exports.toNamespacedPath = _chunkE5AUC34Gcjs.toNamespacedPath; exports.tryGetWorkspaceConfig = _chunkVKTQOXWOcjs.tryGetWorkspaceConfig; exports.tryLoadStormWorkspaceConfig = _chunkHFKBN5GEcjs.tryLoadStormWorkspaceConfig; exports.writeDebug = _chunkDLO4KL2Zcjs.writeDebug; exports.writeError = _chunkDLO4KL2Zcjs.writeError; exports.writeFatal = _chunkDLO4KL2Zcjs.writeFatal; exports.writeInfo = _chunkDLO4KL2Zcjs.writeInfo; exports.writeSuccess = _chunkDLO4KL2Zcjs.writeSuccess; exports.writeSystem = _chunkDLO4KL2Zcjs.writeSystem; exports.writeTrace = _chunkDLO4KL2Zcjs.writeTrace; exports.writeWarning = _chunkDLO4KL2Zcjs.writeWarning;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { getConfigFile, getConfigFileByName } from './config-file/get-config-file.cjs';
|
|
2
|
-
export { createConfigExtension, createStormWorkspaceConfig, loadStormWorkspaceConfig } from './create-storm-config.cjs';
|
|
2
|
+
export { createConfigExtension, createStormWorkspaceConfig, loadStormWorkspaceConfig, tryLoadStormWorkspaceConfig } from './create-storm-config.cjs';
|
|
3
3
|
export { getConfigEnv, getExtensionEnv } from './env/get-env.cjs';
|
|
4
4
|
export { setConfigEnv, setExtensionEnv } from './env/set-env.cjs';
|
|
5
|
-
export { GetWorkspaceConfigOptions, getConfig, getWorkspaceConfig } from './get-config.cjs';
|
|
5
|
+
export { GetWorkspaceConfigOptions, getConfig, getWorkspaceConfig, tryGetWorkspaceConfig } from './get-config.cjs';
|
|
6
6
|
export { GetChalkReturn, getChalk } from './logger/chalk.cjs';
|
|
7
7
|
export { FormatLogMessageOptions, formatLogMessage, getLogFn, getStopwatch, writeDebug, writeError, writeFatal, writeInfo, writeSuccess, writeSystem, writeTrace, writeWarning } from './logger/console.cjs';
|
|
8
8
|
export { CONSOLE_ICONS } from './logger/console-icons.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { getConfigFile, getConfigFileByName } from './config-file/get-config-file.js';
|
|
2
|
-
export { createConfigExtension, createStormWorkspaceConfig, loadStormWorkspaceConfig } from './create-storm-config.js';
|
|
2
|
+
export { createConfigExtension, createStormWorkspaceConfig, loadStormWorkspaceConfig, tryLoadStormWorkspaceConfig } from './create-storm-config.js';
|
|
3
3
|
export { getConfigEnv, getExtensionEnv } from './env/get-env.js';
|
|
4
4
|
export { setConfigEnv, setExtensionEnv } from './env/set-env.js';
|
|
5
|
-
export { GetWorkspaceConfigOptions, getConfig, getWorkspaceConfig } from './get-config.js';
|
|
5
|
+
export { GetWorkspaceConfigOptions, getConfig, getWorkspaceConfig, tryGetWorkspaceConfig } from './get-config.js';
|
|
6
6
|
export { GetChalkReturn, getChalk } from './logger/chalk.js';
|
|
7
7
|
export { FormatLogMessageOptions, formatLogMessage, getLogFn, getStopwatch, writeDebug, writeError, writeFatal, writeInfo, writeSuccess, writeSystem, writeTrace, writeWarning } from './logger/console.js';
|
|
8
8
|
export { CONSOLE_ICONS } from './logger/console-icons.js';
|
package/dist/index.js
CHANGED
|
@@ -4,18 +4,20 @@ import {
|
|
|
4
4
|
} from "./chunk-OB4WNEXN.js";
|
|
5
5
|
import {
|
|
6
6
|
getConfig,
|
|
7
|
-
getWorkspaceConfig
|
|
8
|
-
|
|
7
|
+
getWorkspaceConfig,
|
|
8
|
+
tryGetWorkspaceConfig
|
|
9
|
+
} from "./chunk-JT77N7TT.js";
|
|
9
10
|
import {
|
|
10
11
|
createConfigExtension,
|
|
11
12
|
createStormWorkspaceConfig,
|
|
12
|
-
loadStormWorkspaceConfig
|
|
13
|
-
|
|
13
|
+
loadStormWorkspaceConfig,
|
|
14
|
+
tryLoadStormWorkspaceConfig
|
|
15
|
+
} from "./chunk-BC2QD5QZ.js";
|
|
14
16
|
import "./chunk-SABD7NYM.js";
|
|
15
17
|
import {
|
|
16
18
|
getConfigFile,
|
|
17
19
|
getConfigFileByName
|
|
18
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-GYFE7GKG.js";
|
|
19
21
|
import "./chunk-I6MMCLIA.js";
|
|
20
22
|
import {
|
|
21
23
|
exitWithError,
|
|
@@ -74,11 +76,11 @@ import "./chunk-GSK6EGCB.js";
|
|
|
74
76
|
import {
|
|
75
77
|
setConfigEnv,
|
|
76
78
|
setExtensionEnv
|
|
77
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-ETZGNPAA.js";
|
|
78
80
|
import {
|
|
79
81
|
getConfigEnv,
|
|
80
82
|
getExtensionEnv
|
|
81
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-QRKAMMHF.js";
|
|
82
84
|
import {
|
|
83
85
|
basename,
|
|
84
86
|
correctPaths,
|
|
@@ -159,6 +161,8 @@ export {
|
|
|
159
161
|
setConfigEnv,
|
|
160
162
|
setExtensionEnv,
|
|
161
163
|
toNamespacedPath,
|
|
164
|
+
tryGetWorkspaceConfig,
|
|
165
|
+
tryLoadStormWorkspaceConfig,
|
|
162
166
|
writeDebug,
|
|
163
167
|
writeError,
|
|
164
168
|
writeFatal,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/config-tools",
|
|
3
|
-
"version": "1.162.
|
|
3
|
+
"version": "1.162.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "⚡The Storm-Ops monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.",
|
|
6
6
|
"repository": {
|