@intuned/runtime 1.3.23 → 1.3.24
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.
|
@@ -72,7 +72,7 @@ function runAutomationCLI(importFunction) {
|
|
|
72
72
|
extendTimeoutCallback: async () => {
|
|
73
73
|
if (Date.now() - timeoutTimestamp < throttleTime) return;
|
|
74
74
|
timeoutTimestamp = Date.now();
|
|
75
|
-
client.sendJSON({
|
|
75
|
+
await client.sendJSON({
|
|
76
76
|
type: "extend"
|
|
77
77
|
});
|
|
78
78
|
}
|
|
@@ -109,7 +109,7 @@ function runAutomationCLI(importFunction) {
|
|
|
109
109
|
break;
|
|
110
110
|
}
|
|
111
111
|
if (message.type === "error") {
|
|
112
|
-
client.sendJSON({
|
|
112
|
+
await client.sendJSON({
|
|
113
113
|
type: "done",
|
|
114
114
|
result: message.error.json,
|
|
115
115
|
success: false
|
|
@@ -117,7 +117,7 @@ function runAutomationCLI(importFunction) {
|
|
|
117
117
|
break;
|
|
118
118
|
}
|
|
119
119
|
if (message.type === "ping") {
|
|
120
|
-
client.sendJSON({
|
|
120
|
+
await client.sendJSON({
|
|
121
121
|
type: "pong"
|
|
122
122
|
});
|
|
123
123
|
break;
|
|
@@ -131,7 +131,7 @@ function runAutomationCLI(importFunction) {
|
|
|
131
131
|
} = messageOrResult;
|
|
132
132
|
const success = result.isOk();
|
|
133
133
|
const resultToSend = success ? result.value : result.error.json;
|
|
134
|
-
client.sendJSON({
|
|
134
|
+
await client.sendJSON({
|
|
135
135
|
type: "done",
|
|
136
136
|
result: resultToSend,
|
|
137
137
|
success
|
|
@@ -354,17 +354,18 @@ var require_interfaceClient = __commonJS({
|
|
|
354
354
|
var net = __importStar(require("net"));
|
|
355
355
|
var readline_1 = require("readline");
|
|
356
356
|
var promises_1 = require("timers/promises");
|
|
357
|
+
var util_1 = require("util");
|
|
357
358
|
var SocketClient = class _SocketClient {
|
|
358
359
|
constructor(socket) {
|
|
359
360
|
this.socket = socket;
|
|
360
361
|
}
|
|
361
|
-
sendJSON(data) {
|
|
362
|
+
async sendJSON(data) {
|
|
362
363
|
const dataToSend = JSON.stringify(data);
|
|
363
364
|
const length = Buffer.byteLength(dataToSend);
|
|
364
365
|
const buffer = Buffer.alloc(_SocketClient.LENGTH_HEADER_LENGTH + length);
|
|
365
366
|
buffer.writeUInt32BE(length, 0);
|
|
366
367
|
buffer.write(dataToSend, _SocketClient.LENGTH_HEADER_LENGTH);
|
|
367
|
-
this.socket.write(buffer);
|
|
368
|
+
await (0, util_1.promisify)((cb) => this.socket.write(buffer, cb))();
|
|
368
369
|
}
|
|
369
370
|
async *receiveJSON() {
|
|
370
371
|
let buffer = Buffer.alloc(0);
|
|
@@ -429,7 +430,7 @@ var require_interfaceClient = __commonJS({
|
|
|
429
430
|
constructor(filePath) {
|
|
430
431
|
this.fileStream = fs.createReadStream(filePath, { encoding: "utf-8" });
|
|
431
432
|
}
|
|
432
|
-
sendJSON(data) {
|
|
433
|
+
async sendJSON(data) {
|
|
433
434
|
console.log("Sending message", data);
|
|
434
435
|
}
|
|
435
436
|
async *receiveJSON() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intuned/runtime",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.24",
|
|
4
4
|
"description": "Intuned runtime",
|
|
5
5
|
"packageManager": "yarn@4.12.0",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"image-size": "^1.1.1",
|
|
81
81
|
"jsonc-parser": "^3.3.1",
|
|
82
82
|
"jsonwebtoken": "9.0.2",
|
|
83
|
-
"lodash": "4.
|
|
83
|
+
"lodash": "4.18.1",
|
|
84
84
|
"milliparsec": "2.3.0",
|
|
85
85
|
"nanoid": "3",
|
|
86
86
|
"neverthrow": "6.1.0",
|