@pdc-test/chat-io 1.1.2 → 1.1.4
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/bin/cli.js +4 -3
- package/package.json +2 -2
package/bin/cli.js
CHANGED
|
@@ -9,10 +9,11 @@ let soundsEnabled = true;
|
|
|
9
9
|
|
|
10
10
|
function playSound(type) {
|
|
11
11
|
if (!soundsEnabled) return;
|
|
12
|
+
const opts = { windowsHide: true, stdio: 'ignore' };
|
|
12
13
|
if (type === 'ding') {
|
|
13
|
-
exec(`powershell -c (New-Object Media.SoundPlayer 'C:\\Windows\\Media\\Windows Notify Email.wav').PlaySync()
|
|
14
|
+
exec(`powershell -WindowStyle Hidden -c (New-Object Media.SoundPlayer 'C:\\Windows\\Media\\Windows Notify Email.wav').PlaySync();`, opts);
|
|
14
15
|
} else if (type === 'msg') {
|
|
15
|
-
exec(`powershell -c (New-Object Media.SoundPlayer 'C:\\Windows\\Media\\Windows Proximity Notification.wav').PlaySync()
|
|
16
|
+
exec(`powershell -WindowStyle Hidden -c (New-Object Media.SoundPlayer 'C:\\Windows\\Media\\Windows Proximity Notification.wav').PlaySync();`, opts);
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
|
|
@@ -318,7 +319,7 @@ rl.on('line', (input) => {
|
|
|
318
319
|
ws.send(JSON.stringify({ type: "chat", msg: line }));
|
|
319
320
|
}
|
|
320
321
|
|
|
321
|
-
|
|
322
|
+
currentIsTyping = false;
|
|
322
323
|
ws.send(JSON.stringify({ type: "typing_stop" }));
|
|
323
324
|
});
|
|
324
325
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pdc-test/chat-io",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"bin": {
|
|
6
6
|
"chat-io": "bin/cli.js"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"start": "node src/server/index.js"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@pdc-test/chat-io": "^1.1.
|
|
12
|
+
"@pdc-test/chat-io": "^1.1.4",
|
|
13
13
|
"crypto-js": "^4.2.0",
|
|
14
14
|
"ws": "^8.0.0"
|
|
15
15
|
}
|