@storm-software/config-tools 1.36.0 → 1.36.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/src/create-storm-config.ts +12 -7
- package/src/utilities/logger.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## 1.36.1 (2024-04-13)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### 🩹 Fixes
|
|
5
|
+
|
|
6
|
+
- **build-tools:** Update the path provided to include TypeScript declarations ([a1a74b21](https://github.com/storm-software/storm-ops/commit/a1a74b21))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### ❤️ Thank You
|
|
10
|
+
|
|
11
|
+
- Patrick Sullivan
|
|
12
|
+
|
|
1
13
|
## 1.36.0 (2024-04-09)
|
|
2
14
|
|
|
3
15
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/config-tools",
|
|
3
|
-
"version": "1.36.
|
|
3
|
+
"version": "1.36.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "⚡The Storm-Ops monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.",
|
|
6
6
|
"repository": {
|
|
@@ -25,7 +25,8 @@ export const createConfig = (workspaceRoot?: string): StormConfig => {
|
|
|
25
25
|
* @returns The config for the current Storm workspace
|
|
26
26
|
*/
|
|
27
27
|
export const createStormConfig = <
|
|
28
|
-
TExtensionName extends
|
|
28
|
+
TExtensionName extends
|
|
29
|
+
keyof StormConfig["extensions"] = keyof StormConfig["extensions"],
|
|
29
30
|
TExtensionConfig = any,
|
|
30
31
|
TExtensionSchema extends ZodTypeAny = ZodTypeAny
|
|
31
32
|
>(
|
|
@@ -55,10 +56,11 @@ export const createStormConfig = <
|
|
|
55
56
|
if (schema && extensionName) {
|
|
56
57
|
result.extensions = {
|
|
57
58
|
...result.extensions,
|
|
58
|
-
[extensionName]: createConfigExtension<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
[extensionName]: createConfigExtension<
|
|
60
|
+
TExtensionName,
|
|
61
|
+
TExtensionConfig,
|
|
62
|
+
TExtensionSchema
|
|
63
|
+
>(extensionName, schema)
|
|
62
64
|
};
|
|
63
65
|
}
|
|
64
66
|
|
|
@@ -74,7 +76,8 @@ export const createStormConfig = <
|
|
|
74
76
|
* @returns The config for the specified Storm config extension. If the extension does not exist, `undefined` is returned.
|
|
75
77
|
*/
|
|
76
78
|
export const createConfigExtension = <
|
|
77
|
-
TExtensionName extends
|
|
79
|
+
TExtensionName extends
|
|
80
|
+
keyof StormConfig["extensions"] = keyof StormConfig["extensions"],
|
|
78
81
|
TExtensionConfig = any,
|
|
79
82
|
TExtensionSchema extends ZodTypeAny = ZodTypeAny
|
|
80
83
|
>(
|
|
@@ -98,7 +101,9 @@ export const createConfigExtension = <
|
|
|
98
101
|
/**
|
|
99
102
|
* Load the config file values for the current Storm workspace into environment variables
|
|
100
103
|
*/
|
|
101
|
-
export const loadStormConfig = async (
|
|
104
|
+
export const loadStormConfig = async (
|
|
105
|
+
workspaceRoot?: string
|
|
106
|
+
): Promise<StormConfig> => {
|
|
102
107
|
let config = {} as StormConfig;
|
|
103
108
|
|
|
104
109
|
let _workspaceRoot = workspaceRoot;
|
package/src/utilities/logger.ts
CHANGED
|
@@ -76,7 +76,7 @@ ${_chalk.bold.hex(config?.colors?.error ? config.colors.error : "#7d1a1a")(">")}
|
|
|
76
76
|
`
|
|
77
77
|
${_chalk.bold.hex(config?.colors?.warning ? config.colors.warning : "#fcc419")("> ")} ${_chalk.bold
|
|
78
78
|
.bgHex(config?.colors?.warning ? config.colors.warning : "#fcc419")
|
|
79
|
-
.whiteBright("
|
|
79
|
+
.whiteBright(" ⚠ Warn ")} ${_chalk.hex(
|
|
80
80
|
config?.colors?.warning ? config.colors.warning : "#fcc419"
|
|
81
81
|
)(message)}
|
|
82
82
|
`
|