Skip to content
This repository has been archived by the owner on Apr 13, 2021. It is now read-only.

Commit

Permalink
chore: update for go-threads 0.1.14-rc1 + nits
Browse files Browse the repository at this point in the history
Signed-off-by: Carson Farmer <[email protected]>
  • Loading branch information
carsonfarmer committed Apr 13, 2020
1 parent 88c3837 commit 3509138
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@textile/threads",
"version": "0.0.1",
"version": "0.1.14-rc1",
"description": "Typescript implementation of Textile's Threads Protocol",
"main": "dist/index",
"types": "dist/index",
Expand Down
1 change: 1 addition & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"publishConfig": {
"access": "public"
},
"license": "MIT",
"scripts": {
"prepublish": "npm run build",
"prebuild": "npm run clean",
Expand Down
1 change: 1 addition & 0 deletions packages/database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"publishConfig": {
"access": "public"
},
"license": "MIT",
"references": [
{
"path": "../core"
Expand Down
1 change: 1 addition & 0 deletions packages/encoding/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"publishConfig": {
"access": "public"
},
"license": "MIT",
"scripts": {
"prepublish": "npm run build",
"prebuild": "npm run clean",
Expand Down
17 changes: 14 additions & 3 deletions packages/network-client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions packages/network-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"publishConfig": {
"access": "public"
},
"license": "MIT",
"scripts": {
"prepublish": "npm run build",
"prebuild": "npm run clean",
Expand All @@ -22,11 +23,11 @@
"@improbable-eng/grpc-web": "^0.12.0",
"@textile/threads-core": "^0.1.0",
"@textile/threads-encoding": "^0.1.0",
"@textile/threads-net-grpc": "0.1.13",
"@types/node": "^13.9.2",
"@textile/threads-net-grpc": "^0.1.14-rc1",
"cids": "^0.7.3",
"libp2p-crypto": "^0.17.2",
"loglevel": "^1.6.6",
"next-tick": "^1.1.0",
"peer-id": "^0.13.9"
},
"references": [
Expand All @@ -38,6 +39,8 @@
}
],
"devDependencies": {
"@types/node": "^13.9.2",
"@types/next-tick": "^1.0.0",
"isomorphic-ws": "^4.0.1",
"rimraf": "^3.0.0",
"typescript": "^3.7.2",
Expand Down
7 changes: 4 additions & 3 deletions packages/network-client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
import * as pb from '@textile/threads-net-grpc/api_pb'
import { API, APIGetToken } from '@textile/threads-net-grpc/api_pb_service'
import { recordFromProto, recordToProto } from '@textile/threads-encoding'
import nextTick from 'next-tick'
import { Config, BaseConfig } from './config'

export { Config, BaseConfig }
Expand Down Expand Up @@ -344,12 +345,12 @@ export class Client implements Network {
host: this.config.host,
metadata: this.config._wrapMetadata({ Authorization: `Bearer ${token}` }),
request,
onMessage: (rec: pb.NewRecordReply) => callback(rec),
onMessage: (rec: pb.NewRecordReply) => nextTick(() => callback(rec)),
onEnd: (status: grpc.Code, message: string, _trailers: grpc.Metadata) => {
if (status !== grpc.Code.OK) {
return callback(undefined, new Error(message))
return nextTick(() => callback(undefined, new Error(message)))
}
return callback()
return nextTick(() => callback())
},
})
}
Expand Down
1 change: 1 addition & 0 deletions packages/network/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"publishConfig": {
"access": "public"
},
"license": "MIT",
"scripts": {
"prepublish": "npm run build",
"prebuild": "npm run clean",
Expand Down
1 change: 1 addition & 0 deletions packages/store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"publishConfig": {
"access": "public"
},
"license": "MIT",
"scripts": {
"prepublish": "npm run build",
"prebuild": "npm run clean",
Expand Down

0 comments on commit 3509138

Please sign in to comment.