pty-manager 1.7.2 → 1.7.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/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -0
- package/dist/index.mjs.map +1 -1
- package/dist/pty-worker.js +20 -0
- package/package.json +1 -1
package/dist/pty-worker.js
CHANGED
|
@@ -1892,6 +1892,19 @@ function handleSendKeys(id, keys) {
|
|
|
1892
1892
|
ack("sendKeys", id, false, err instanceof Error ? err.message : String(err));
|
|
1893
1893
|
}
|
|
1894
1894
|
}
|
|
1895
|
+
function handleWriteRaw(id, data) {
|
|
1896
|
+
try {
|
|
1897
|
+
const session = manager.getSession(id);
|
|
1898
|
+
if (!session) {
|
|
1899
|
+
ack("writeRaw", id, false, `Session ${id} not found`);
|
|
1900
|
+
return;
|
|
1901
|
+
}
|
|
1902
|
+
session.writeRaw(data);
|
|
1903
|
+
ack("writeRaw", id, true);
|
|
1904
|
+
} catch (err) {
|
|
1905
|
+
ack("writeRaw", id, false, err instanceof Error ? err.message : String(err));
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1895
1908
|
function handlePaste(id, text, bracketed = true) {
|
|
1896
1909
|
try {
|
|
1897
1910
|
const session = manager.getSession(id);
|
|
@@ -2104,6 +2117,13 @@ function processCommand(line) {
|
|
|
2104
2117
|
}
|
|
2105
2118
|
handleSendKeys(command.id, command.keys);
|
|
2106
2119
|
break;
|
|
2120
|
+
case "writeRaw":
|
|
2121
|
+
if (!command.id || command.data === void 0) {
|
|
2122
|
+
ack("writeRaw", command.id, false, "Missing id or data");
|
|
2123
|
+
return;
|
|
2124
|
+
}
|
|
2125
|
+
handleWriteRaw(command.id, command.data);
|
|
2126
|
+
break;
|
|
2107
2127
|
case "paste":
|
|
2108
2128
|
if (!command.id || command.text === void 0) {
|
|
2109
2129
|
ack("paste", command.id, false, "Missing id or text");
|
package/package.json
CHANGED