@holochain/hc-spin 0.300.2-dev.1 → 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/cli.js CHANGED
File without changes
@@ -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(`Timed out in ${ms}ms: ${tag}`)), ms);
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://127.0.0.1:${env.APP_INTERFACE_PORT}`);
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.`);
@@ -12025,7 +12023,7 @@ electron.app.whenReady().then(async () => {
12025
12023
  const zomeCallSigner = await rustUtils.ZomeCallSigner.connect(lairUrls[i], "pass");
12026
12024
  const appPort = portsInfo[i].app_ports[0];
12027
12025
  const appWs = await AppWebsocket.connect({
12028
- url: new URL(`ws://127.0.0.1:${appPort}`),
12026
+ url: new URL(`ws://localhost:${appPort}`),
12029
12027
  wsClientOptions: {
12030
12028
  origin: "hc-spin"
12031
12029
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@holochain/hc-spin",
3
- "version": "0.300.2-dev.1",
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.8",
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",
package/src/main/index.ts CHANGED
@@ -331,7 +331,7 @@ app.whenReady().then(async () => {
331
331
 
332
332
  const appPort = portsInfo[i].app_ports[0];
333
333
  const appWs = await AppWebsocket.connect({
334
- url: new URL(`ws://127.0.0.1:${appPort}`),
334
+ url: new URL(`ws://localhost:${appPort}`),
335
335
  wsClientOptions: {
336
336
  origin: 'hc-spin',
337
337
  },