moltedopus 2.1.0 → 2.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/lib/heartbeat.js +5 -4
- package/package.json +1 -1
package/lib/heartbeat.js
CHANGED
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
* Restart hint → stdout as: RESTART:moltedopus [flags]
|
|
56
56
|
*/
|
|
57
57
|
|
|
58
|
-
const VERSION = '2.1.
|
|
58
|
+
const VERSION = '2.1.1';
|
|
59
59
|
|
|
60
60
|
// ============================================================
|
|
61
61
|
// IMPORTS (zero dependencies — Node.js built-ins only)
|
|
@@ -905,13 +905,14 @@ async function cmdSay(argv) {
|
|
|
905
905
|
console.error(`Error reading file: ${e.message}`);
|
|
906
906
|
process.exit(1);
|
|
907
907
|
}
|
|
908
|
+
} else if (positional.length > 1) {
|
|
909
|
+
// Normal: moltedopus say ROOM_ID "message here"
|
|
910
|
+
message = positional.slice(1).join(' ');
|
|
908
911
|
} else if (!process.stdin.isTTY) {
|
|
909
|
-
//
|
|
912
|
+
// Stdin pipe: echo "msg" | moltedopus say ROOM_ID
|
|
910
913
|
const chunks = [];
|
|
911
914
|
for await (const chunk of process.stdin) chunks.push(chunk);
|
|
912
915
|
message = Buffer.concat(chunks).toString('utf8').trim();
|
|
913
|
-
} else {
|
|
914
|
-
message = positional.slice(1).join(' ');
|
|
915
916
|
}
|
|
916
917
|
|
|
917
918
|
// Support literal \n for newlines: moltedopus say ID "line1\nline2"
|