@sickr/cli 0.9.4 → 0.9.5
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/dist/cli.js +10 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1012,7 +1012,16 @@ export async function readStreamWithIdle(input, idleMs = 250, emptyMs = 1500) {
|
|
|
1012
1012
|
return Buffer.concat(chunks).toString('utf8');
|
|
1013
1013
|
}
|
|
1014
1014
|
async function readStdin() {
|
|
1015
|
-
|
|
1015
|
+
try {
|
|
1016
|
+
return await readStreamWithIdle(process.stdin);
|
|
1017
|
+
}
|
|
1018
|
+
finally {
|
|
1019
|
+
process.stdin.pause();
|
|
1020
|
+
process.stdin.removeAllListeners('data');
|
|
1021
|
+
process.stdin.removeAllListeners('readable');
|
|
1022
|
+
process.stdin.removeAllListeners('end');
|
|
1023
|
+
process.stdin.unref?.();
|
|
1024
|
+
}
|
|
1016
1025
|
}
|
|
1017
1026
|
async function main() {
|
|
1018
1027
|
const argv = process.argv.slice(2);
|
package/package.json
CHANGED