@holochain/client
Advanced tools
Comparing version 0.17.0-dev.8 to 0.17.0-dev.9
@@ -36,3 +36,3 @@ import { getLauncherEnvironment } from "../../environments/launcher.js"; | ||
if (env?.ADMIN_INTERFACE_PORT) { | ||
options.url = new URL(`ws://127.0.0.1:${env.ADMIN_INTERFACE_PORT}`); | ||
options.url = new URL(`ws://localhost:${env.ADMIN_INTERFACE_PORT}`); | ||
} | ||
@@ -39,0 +39,0 @@ if (!options.url) { |
@@ -46,3 +46,3 @@ import { hashZomeCall } from "@holochain/serialization"; | ||
if (env?.APP_INTERFACE_PORT) { | ||
options.url = new URL(`ws://127.0.0.1:${env.APP_INTERFACE_PORT}`); | ||
options.url = new URL(`ws://localhost:${env.APP_INTERFACE_PORT}`); | ||
} | ||
@@ -49,0 +49,0 @@ if (!options.url) { |
@@ -48,14 +48,12 @@ const ERROR_TYPE = "error"; | ||
const timeout = new Promise((_, reject) => { | ||
id = setTimeout(() => reject(new Error(`Timed out in ${ms}ms: ${tag}`)), ms); | ||
id = setTimeout(() => reject(new Error(`Request timed out in ${ms} ms: ${tag}`)), ms); | ||
}); | ||
return new Promise((res, rej) => { | ||
Promise.race([promise, timeout]) | ||
.then((a) => { | ||
clearTimeout(id); | ||
return res(a); | ||
}) | ||
.catch((e) => { | ||
return rej(e); | ||
}); | ||
}); | ||
return new Promise((res, rej) => Promise.race([promise, timeout]) | ||
.then((a) => { | ||
clearTimeout(id); | ||
return res(a); | ||
}) | ||
.catch((e) => { | ||
return rej(e); | ||
})); | ||
}; | ||
@@ -62,0 +60,0 @@ const CLONE_ID_DELIMITER = "."; |
@@ -6,3 +6,3 @@ export { hashZomeCall } from "@holochain/serialization"; | ||
export { IsoWebSocket, WsClient } from "./client.js"; | ||
export { CloneId, HolochainError, Requester, Transformer, WebsocketConnectionOptions, WsClientOptions, getBaseRoleNameFromCloneId, isCloneId, } from "./common.js"; | ||
export { CloneId, HolochainError, getBaseRoleNameFromCloneId, isCloneId, type Requester, type Transformer, type WebsocketConnectionOptions, type WsClientOptions, } from "./common.js"; | ||
export * from "./zome-call-signing.js"; |
@@ -8,5 +8,5 @@ // This file is read by tools that parse documentation comments conforming to the TSDoc standard. | ||
"packageName": "@microsoft/api-extractor", | ||
"packageVersion": "7.43.0" | ||
"packageVersion": "7.43.1" | ||
} | ||
] | ||
} |
{ | ||
"name": "@holochain/client", | ||
"version": "0.17.0-dev.8", | ||
"version": "0.17.0-dev.9", | ||
"description": "A JavaScript client for the Holochain Conductor API", | ||
@@ -35,5 +35,5 @@ "author": "Holochain Foundation <info@holochain.org> (http://holochain.org)", | ||
"lint": "eslint --fix --ext .ts src test .eslintrc.cjs", | ||
"test:app-agent": "RUST_LOG=error RUST_BACKTRACE=1 node --loader ts-node/esm test/e2e/app-agent-websocket.ts", | ||
"test:utils": "RUST_LOG=error RUST_BACKTRACE=1 node --loader ts-node/esm test/e2e/utils.ts", | ||
"test": "RUST_LOG=error RUST_BACKTRACE=1 node --loader ts-node/esm test/index.ts", | ||
"test:app-agent": "RUST_LOG=error RUST_BACKTRACE=1 tsx test/e2e/app-agent-websocket.ts", | ||
"test:utils": "RUST_LOG=error RUST_BACKTRACE=1 tsx test/e2e/utils.ts", | ||
"test": "RUST_LOG=error RUST_BACKTRACE=1 tsx test/index.ts", | ||
"build:lib": "rimraf ./lib && tsc -p tsconfig.build.json", | ||
@@ -73,5 +73,5 @@ "build:docs": "api-extractor run --local && api-documenter markdown -i docs/temp -o docs", | ||
"tape": "^5.6.6", | ||
"ts-node": "^10.9.1", | ||
"tsx": "^4.7.2", | ||
"typescript": "^4.9.5" | ||
} | ||
} | ||
} |
133498
3703