@unbound-app/debugger 0.4.0 → 0.6.0
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.mjs +4 -3
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -37,6 +37,7 @@ const resultListeners = /* @__PURE__ */ new Set();
|
|
|
37
37
|
const controllerListeners = /* @__PURE__ */ new Set();
|
|
38
38
|
/** How long to wait for a device to answer an eval before failing it. */
|
|
39
39
|
const EVAL_TIMEOUT_MS = 1e4;
|
|
40
|
+
const PLUGIN_PUSH_TIMEOUT_MS = 6e4;
|
|
40
41
|
/**
|
|
41
42
|
* @description Registers the connected device, rejecting a second one so eval routing stays
|
|
42
43
|
* unambiguous.
|
|
@@ -123,7 +124,7 @@ function evaluateForController(socket, id, code) {
|
|
|
123
124
|
/**
|
|
124
125
|
* @description Forwards a controller's {@link PluginPushRequest} to the device and delivers the
|
|
125
126
|
* id-correlated {@link PluginPushResult} back over that same controller's socket. Replies with an
|
|
126
|
-
* error frame instead if no device is connected or it doesn't answer within {@link
|
|
127
|
+
* error frame instead if no device is connected or it doesn't answer within {@link PLUGIN_PUSH_TIMEOUT_MS}.
|
|
127
128
|
* @param socket The controller that issued the push.
|
|
128
129
|
* @param request The push to forward verbatim; its `id` correlates the result.
|
|
129
130
|
*/
|
|
@@ -144,9 +145,9 @@ function pushPluginForController(socket, request) {
|
|
|
144
145
|
type: "plugin-push-result",
|
|
145
146
|
id: request.id,
|
|
146
147
|
ok: false,
|
|
147
|
-
error: `Plugin push timed out after ${
|
|
148
|
+
error: `Plugin push timed out after ${PLUGIN_PUSH_TIMEOUT_MS}ms.`
|
|
148
149
|
});
|
|
149
|
-
},
|
|
150
|
+
}, PLUGIN_PUSH_TIMEOUT_MS);
|
|
150
151
|
pendingPushes.set(request.id, {
|
|
151
152
|
deliver,
|
|
152
153
|
timer,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unbound-app/debugger",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "A REPL debugger for @unbound-app/client runtime instances.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Mario P.",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"build": "tsdown"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@unbound-app/debugger-protocol": "0.
|
|
27
|
+
"@unbound-app/debugger-protocol": "0.6.0",
|
|
28
28
|
"cleye": "^1.3.4",
|
|
29
29
|
"terminal-kit": "^3.1.2"
|
|
30
30
|
},
|