@10stars/config 15.1.0 → 15.1.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/package.json +1 -1
- package/src/runner.ts +9 -2
package/package.json
CHANGED
package/src/runner.ts
CHANGED
|
@@ -15,9 +15,12 @@ interface RunningProcess {
|
|
|
15
15
|
prefix: string
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
async function pipeOutput(
|
|
18
|
+
async function pipeOutput(
|
|
19
|
+
stream: ReadableStream<Uint8Array> | AsyncIterable<Uint8Array>,
|
|
20
|
+
prefix: string,
|
|
21
|
+
): Promise<void> {
|
|
19
22
|
const decoder = new TextDecoder()
|
|
20
|
-
for await (const chunk of stream) {
|
|
23
|
+
for await (const chunk of stream as AsyncIterable<Uint8Array>) {
|
|
21
24
|
const text = decoder.decode(chunk).trimEnd()
|
|
22
25
|
if (text) {
|
|
23
26
|
for (const line of text.split("\n")) {
|
|
@@ -45,6 +48,10 @@ export async function runConcurrently(commands: CommandConfig[]): Promise<void>
|
|
|
45
48
|
const proc = Bun.spawn(args, {
|
|
46
49
|
stdout: "pipe",
|
|
47
50
|
stderr: "pipe",
|
|
51
|
+
env: {
|
|
52
|
+
...process.env, // Inherit existing env
|
|
53
|
+
FORCE_COLOR: "1", // Force color output despite pipe
|
|
54
|
+
},
|
|
48
55
|
})
|
|
49
56
|
|
|
50
57
|
processes.push({ label: config.label, proc, prefix })
|