@steve02081504/virtual-console 0.0.2 → 0.0.3
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/main.mjs +5 -4
- package/package.json +1 -1
package/main.mjs
CHANGED
|
@@ -90,8 +90,9 @@ export class VirtualConsole extends Console {
|
|
|
90
90
|
if (this.options.recordOutput)
|
|
91
91
|
this.outputs += chunk.toString()
|
|
92
92
|
if (this.options.realConsoleOutput)
|
|
93
|
-
targetStream.write(chunk, encoding)
|
|
94
|
-
|
|
93
|
+
targetStream.write(chunk, encoding, callback)
|
|
94
|
+
else
|
|
95
|
+
callback()
|
|
95
96
|
},
|
|
96
97
|
})
|
|
97
98
|
|
|
@@ -121,8 +122,8 @@ export class VirtualConsole extends Console {
|
|
|
121
122
|
return virtualStream
|
|
122
123
|
}
|
|
123
124
|
|
|
124
|
-
this._stdout = createVirtualStream(this.#base_console
|
|
125
|
-
this._stderr = createVirtualStream(this.#base_console
|
|
125
|
+
this._stdout = createVirtualStream(this.#base_console?._stdout || process.stdout)
|
|
126
|
+
this._stderr = createVirtualStream(this.#base_console?._stderr || process.stderr)
|
|
126
127
|
}
|
|
127
128
|
|
|
128
129
|
/**
|