@holochain/hc-spin 0.300.2-dev.2 → 0.300.2-dev.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/main/index.js +8 -10
- package/package.json +2 -2
package/dist/main/index.js
CHANGED
|
@@ -10642,16 +10642,14 @@ const catchError = (res) => {
|
|
|
10642
10642
|
const promiseTimeout = (promise2, tag, ms) => {
|
|
10643
10643
|
let id;
|
|
10644
10644
|
const timeout2 = new Promise((_, reject) => {
|
|
10645
|
-
id = setTimeout(() => reject(new Error(`
|
|
10646
|
-
});
|
|
10647
|
-
return new Promise((res, rej) => {
|
|
10648
|
-
Promise.race([promise2, timeout2]).then((a) => {
|
|
10649
|
-
clearTimeout(id);
|
|
10650
|
-
return res(a);
|
|
10651
|
-
}).catch((e) => {
|
|
10652
|
-
return rej(e);
|
|
10653
|
-
});
|
|
10645
|
+
id = setTimeout(() => reject(new Error(`Request timed out in ${ms} ms: ${tag}`)), ms);
|
|
10654
10646
|
});
|
|
10647
|
+
return new Promise((res, rej) => Promise.race([promise2, timeout2]).then((a) => {
|
|
10648
|
+
clearTimeout(id);
|
|
10649
|
+
return res(a);
|
|
10650
|
+
}).catch((e) => {
|
|
10651
|
+
return rej(e);
|
|
10652
|
+
}));
|
|
10655
10653
|
};
|
|
10656
10654
|
class WsClient extends Emittery {
|
|
10657
10655
|
socket;
|
|
@@ -10853,7 +10851,7 @@ class AppWebsocket extends Emittery {
|
|
|
10853
10851
|
static async connect(options = {}) {
|
|
10854
10852
|
const env = getLauncherEnvironment();
|
|
10855
10853
|
if (env?.APP_INTERFACE_PORT) {
|
|
10856
|
-
options.url = new URL(`ws://
|
|
10854
|
+
options.url = new URL(`ws://localhost:${env.APP_INTERFACE_PORT}`);
|
|
10857
10855
|
}
|
|
10858
10856
|
if (!options.url) {
|
|
10859
10857
|
throw new HolochainError("ConnectionUrlMissing", `unable to connect to Conductor API - no url provided and not in a launcher environment.`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holochain/hc-spin",
|
|
3
|
-
"version": "0.300.2-dev.
|
|
3
|
+
"version": "0.300.2-dev.3",
|
|
4
4
|
"holochainVersion": "0.3.0-beta-dev.44",
|
|
5
5
|
"description": "CLI to run Holochain aps during development.",
|
|
6
6
|
"author": "matthme",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@electron-toolkit/preload": "^3.0.0",
|
|
37
37
|
"@electron-toolkit/utils": "^3.0.0",
|
|
38
|
-
"@holochain/client": "^0.17.0-dev.
|
|
38
|
+
"@holochain/client": "^0.17.0-dev.9",
|
|
39
39
|
"@holochain/hc-spin-rust-utils": "^0.300.1",
|
|
40
40
|
"@msgpack/msgpack": "^2.8.0",
|
|
41
41
|
"commander": "11.1.0",
|