@storm-software/config-tools 1.22.2 → 1.23.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 +14 -51
- package/declarations.d.ts +16 -0
- package/package.json +6 -6
- package/src/env/get-env.ts +1 -4
- package/src/env/set-env.ts +2 -2
- package/src/schema.ts +1 -4
- package/src/utilities/get-default-config.ts +0 -1
- package/src/utilities/run.ts +23 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## 1.22.0 (2024-01-26)
|
|
3
|
+
## 1.23.0 (2024-01-27)
|
|
6
4
|
|
|
7
5
|
|
|
8
6
|
### 🚀 Features
|
|
9
7
|
|
|
10
|
-
- **
|
|
8
|
+
- **config-tools:** Added the `preid` config option and removed `preMajor` ([0d8756dc](https://github.com/storm-software/storm-ops/commit/0d8756dc))
|
|
11
9
|
|
|
12
10
|
|
|
13
11
|
### ❤️ Thank You
|
|
14
12
|
|
|
15
13
|
- Patrick Sullivan
|
|
16
14
|
|
|
15
|
+
## 1.22.2 (2024-01-27)
|
|
17
16
|
|
|
18
17
|
|
|
18
|
+
### 🩹 Fixes
|
|
19
19
|
|
|
20
|
+
- **config-tools:** Resolved issue with stdio prefernce in `run` function ([81ac8a91](https://github.com/storm-software/storm-ops/commit/81ac8a91))
|
|
20
21
|
|
|
21
22
|
|
|
23
|
+
### ❤️ Thank You
|
|
22
24
|
|
|
25
|
+
- Patrick Sullivan
|
|
23
26
|
|
|
24
27
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
## 1.21.0 (2024-01-26)
|
|
28
|
+
## 1.22.0 (2024-01-26)
|
|
28
29
|
|
|
29
30
|
|
|
30
31
|
### 🚀 Features
|
|
31
32
|
|
|
32
|
-
- **
|
|
33
|
+
- **workspace-tools:** Added custom `npm-publish` executor ([3e6292dd](https://github.com/storm-software/storm-ops/commit/3e6292dd))
|
|
33
34
|
|
|
34
35
|
|
|
35
36
|
### ❤️ Thank You
|
|
@@ -37,23 +38,17 @@
|
|
|
37
38
|
- Patrick Sullivan
|
|
38
39
|
|
|
39
40
|
|
|
41
|
+
## 1.21.0 (2024-01-26)
|
|
40
42
|
|
|
41
43
|
|
|
44
|
+
### 🚀 Features
|
|
42
45
|
|
|
46
|
+
- **config-tools:** Added the `externalPackagePatterns` option to Storm config ([78f5c9d4](https://github.com/storm-software/storm-ops/commit/78f5c9d4))
|
|
43
47
|
|
|
44
48
|
|
|
49
|
+
### ❤️ Thank You
|
|
45
50
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
- Patrick Sullivan
|
|
57
52
|
|
|
58
53
|
|
|
59
54
|
## 1.20.21 (2024-01-25)
|
|
@@ -68,25 +63,6 @@
|
|
|
68
63
|
|
|
69
64
|
- Patrick Sullivan
|
|
70
65
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
66
|
|
|
91
67
|
## 1.20.10 (2024-01-24)
|
|
92
68
|
|
|
@@ -115,19 +91,6 @@
|
|
|
115
91
|
- Patrick Sullivan
|
|
116
92
|
|
|
117
93
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
94
|
## 1.20.0 (2024-01-21)
|
|
132
95
|
|
|
133
96
|
|
package/declarations.d.ts
CHANGED
|
@@ -184,3 +184,19 @@ export { writeSystem };
|
|
|
184
184
|
*/
|
|
185
185
|
declare function getStopwatch(name: string): () => void;
|
|
186
186
|
export { getStopwatch };
|
|
187
|
+
|
|
188
|
+
declare const LARGE_BUFFER: number;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Run a command line process
|
|
192
|
+
*
|
|
193
|
+
* @remarks
|
|
194
|
+
* A wrapper around execa to run our command line processes
|
|
195
|
+
*
|
|
196
|
+
* @param config - The Storm configuration object
|
|
197
|
+
* @param command - The command to run
|
|
198
|
+
* @param cwd - The current working directory
|
|
199
|
+
* @returns The result of the command
|
|
200
|
+
*/
|
|
201
|
+
declare function run(config: StormConfig, command: string, cwd: string = config.workspaceRoot): any;
|
|
202
|
+
export { run };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/config-tools",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.23.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": {
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
"types": "declarations.d.ts",
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"chalk": "4.1.0",
|
|
17
|
-
"cosmiconfig": "
|
|
18
|
-
"execa": "
|
|
19
|
-
"find-up": "
|
|
20
|
-
"locate-path": "
|
|
21
|
-
"zod": "
|
|
17
|
+
"cosmiconfig": "9.0.0",
|
|
18
|
+
"execa": "8.0.1",
|
|
19
|
+
"find-up": "7.0.0",
|
|
20
|
+
"locate-path": "7.2.0",
|
|
21
|
+
"zod": "3.22.4"
|
|
22
22
|
},
|
|
23
23
|
"publishConfig": {
|
|
24
24
|
"access": "public"
|
package/src/env/get-env.ts
CHANGED
|
@@ -72,10 +72,7 @@ export const getConfigEnv = (): Partial<StormConfig> => {
|
|
|
72
72
|
},
|
|
73
73
|
repository: process.env[`${prefix}REPOSITORY`],
|
|
74
74
|
branch: process.env[`${prefix}BRANCH`],
|
|
75
|
-
|
|
76
|
-
process.env[`${prefix}PRE_MAJOR`] !== undefined
|
|
77
|
-
? Boolean(process.env[`${prefix}PRE_MAJOR`])
|
|
78
|
-
: undefined,
|
|
75
|
+
preid: process.env[`${prefix}PRE_ID`],
|
|
79
76
|
logLevel:
|
|
80
77
|
process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== undefined
|
|
81
78
|
? Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`]))
|
package/src/env/set-env.ts
CHANGED
|
@@ -141,8 +141,8 @@ export const setConfigEnv = (config: StormConfig) => {
|
|
|
141
141
|
if (config.branch) {
|
|
142
142
|
process.env[`${prefix}BRANCH`] = config.branch;
|
|
143
143
|
}
|
|
144
|
-
if (config.
|
|
145
|
-
process.env[`${prefix}
|
|
144
|
+
if (config.preid) {
|
|
145
|
+
process.env[`${prefix}PRE_ID`] = String(config.preid);
|
|
146
146
|
}
|
|
147
147
|
if (config.logLevel) {
|
|
148
148
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
package/src/schema.ts
CHANGED
|
@@ -94,10 +94,7 @@ export const StormConfigSchema = z
|
|
|
94
94
|
.default("https://stormsoftware.org")
|
|
95
95
|
.describe("The homepage of the workspace"),
|
|
96
96
|
branch: z.string().trim().default("main").describe("The branch of the workspace"),
|
|
97
|
-
|
|
98
|
-
.boolean()
|
|
99
|
-
.default(false)
|
|
100
|
-
.describe("An indicator specifying if the package is still in it's pre-major version"),
|
|
97
|
+
preid: z.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
101
98
|
owner: z
|
|
102
99
|
.string()
|
|
103
100
|
.trim()
|
|
@@ -25,7 +25,6 @@ export const DEFAULT_STORM_CONFIG: StormConfig = {
|
|
|
25
25
|
namespace: "storm-software",
|
|
26
26
|
license: "Apache License 2.0",
|
|
27
27
|
homepage: "https://stormsoftware.org",
|
|
28
|
-
preMajor: false,
|
|
29
28
|
owner: "@storm-software/development",
|
|
30
29
|
worker: "stormie-bot",
|
|
31
30
|
runtimeDirectory: "node_modules/.storm",
|
package/src/utilities/run.ts
CHANGED
|
@@ -1,10 +1,30 @@
|
|
|
1
1
|
import { execaCommandSync } from "execa";
|
|
2
|
+
import type { StormConfig } from "../types";
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
export const LARGE_BUFFER = 1024 * 1000000;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Run a command line process
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* A wrapper around execa to run our command line processes
|
|
11
|
+
*
|
|
12
|
+
* @param config - The Storm configuration object
|
|
13
|
+
* @param command - The command to run
|
|
14
|
+
* @param cwd - The current working directory
|
|
15
|
+
* @returns The result of the command
|
|
16
|
+
*/
|
|
17
|
+
export const run = (config: StormConfig, command: string, cwd: string = config.workspaceRoot) => {
|
|
5
18
|
return execaCommandSync(command, {
|
|
6
19
|
preferLocal: true,
|
|
7
20
|
shell: true,
|
|
8
|
-
|
|
21
|
+
cwd,
|
|
22
|
+
env: {
|
|
23
|
+
...process.env,
|
|
24
|
+
FORCE_COLOR: "true"
|
|
25
|
+
},
|
|
26
|
+
stdio: "inherit",
|
|
27
|
+
maxBuffer: LARGE_BUFFER,
|
|
28
|
+
killSignal: "SIGTERM"
|
|
9
29
|
});
|
|
10
30
|
};
|