Git Product home page Git Product logo

json-rpc-peer's People

Contributors

greenkeeper[bot] avatar greenkeeperio-bot avatar huan avatar julien-f avatar maxhawkins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

json-rpc-peer's Issues

An in-range update of cross-env is breaking the build 🚨

Version 3.2.1 of cross-env just got published.

Branch Build failing 🚨
Dependency cross-env
Current Version 3.2.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As cross-env is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details
Release Notes v3.2.1

<a name"3.2.1">

3.2.1 (2017-03-04)

Bug Fixes

Commits

The new version differs by 1 commits .

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Need to let pass more context with exec(message)

When calling exec(message) I need to pass user information that was extracted from the ws header when it was connected. I think there should be a way to pass an optional object as a second parameter to exec() which will be added as a sub-object to the message object passed to onMessage(message)

An in-range update of json-rpc-protocol is breaking the build 🚨

Version 0.11.1 of json-rpc-protocol just got published.

Branch Build failing 🚨
Dependency json-rpc-protocol
Current Version 0.11.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

As json-rpc-protocol is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details
Commits

The new version differs by 4 commits .

  • 3a01938 0.11.1
  • fa91780 chore(package): update all dependencies
  • 3615354 feat(format/error): support errors with toJsonRpcError() method (#20)
  • 504b9d9 chore(package): update babel-eslint to version 7.0.0 (#19)

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Suggestion: generate rpc id from cuid instead of a int number

Currently, we are using a very large negative number as the rpc id, and each time increase by one.

There's another way to generate unique id by using cuid: http://npmjs.com/package/cuid

Personally, I'm using cuid a lot, so I'd like to suggest we use cuid to generate our Peer rpc id too.

  • The good part of using cuid is that we will never get a conflict id of every rpc call.
  • The bad part of using cuid might be that we need to increase the size of the network package a bit(from a number to a string) for every rpc call.

If you agree to use cuid, I'll make it in my pull request.

Error: Cannot find module '@babel/runtime/core-js/object/create'

I meet this error today, it seems might relate to a version breaking change of Babel runtime.

This problem will not exist any more after we converted to TypeScript.

11:21:27 INFO PuppetManager install(wechaty-puppet-padchat@^0.8.1) done
{ Error: Cannot find module '@babel/runtime/core-js/object/create'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/ubuntu/workspace/node_modules/json-rpc-peer/dist/index.js:12:38)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/ubuntu/workspace/node_modules/wechaty-puppet-padchat/src/padchat-rpc.ts:4:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/ubuntu/workspace/node_modules/wechaty-puppet-padchat/src/padchat-manager.ts:28:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/ubuntu/workspace/node_modules/wechaty-puppet-padchat/src/puppet-padchat.ts:80:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/ubuntu/workspace/node_modules/wechaty-puppet-padchat/src/index.ts:19:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Promise.resolve.then (/home/ubuntu/workspace/src/puppet-manager.ts:79:26) code: 'MODULE_NOT_FOUND' }
11:21:27 ERR Wechaty start() exception: Cannot find module '@babel/runtime/core-js/object/create'
Bot error: { Error: Cannot find module '@babel/runtime/core-js/object/create'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/ubuntu/workspace/node_modules/json-rpc-peer/dist/index.js:12:38)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/ubuntu/workspace/node_modules/wechaty-puppet-padchat/src/padchat-rpc.ts:4:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/ubuntu/workspace/node_modules/wechaty-puppet-padchat/src/padchat-manager.ts:28:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/ubuntu/workspace/node_modules/wechaty-puppet-padchat/src/puppet-padchat.ts:80:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/ubuntu/workspace/node_modules/wechaty-puppet-padchat/src/index.ts:19:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Promise.resolve.then (/home/ubuntu/workspace/src/puppet-manager.ts:79:26) code: 'MODULE_NOT_FOUND' }
11:21:27 INFO Wechaty <padchat> stop() v#git[1668086] is stoping ...
11:21:27 SILL StateSwitch <Wechaty> off() is false
11:21:27 SILL StateSwitch <WechatyReady> off() is true
11:21:27 VERB StateSwitch <WechatyReady> off(true) <- (true)
11:21:27 SILL StateSwitch <Wechaty> off() is false
11:21:27 VERB StateSwitch <Wechaty> off(pending) <- (false)
11:21:27 VERB MemoryCard <> save() file: /home/ubuntu/workspace/default.memory-card.json
11:21:27 WARN Wechaty stop() puppet.stop() exception: static puppet not found for Wechaty, please see issue #1217: https://github.com/Chatie/wechaty/issues/1217
11:21:27 SILL StateSwitch <Wechaty> off() is pending
11:21:27 VERB StateSwitch <Wechaty> off(true) <- (pending)
zixia:~/workspace (master) $ ^C
zixia:~/workspace (master) $ vi src/npm ls ^C
zixia:~/workspace (master) $ npm ls @babel/runtime
[email protected] /home/ubuntu/workspace
└─┬ [email protected]
  └─┬ [email protected]
    └── @babel/[email protected] 

See: wechaty/wechaty-puppet-padchat#126

Feat: add a timeout option to Peer

Currently, we can only call failPendingRequests() to make all the pending requests fail.

Sometimes it's better to set a timeout value and let the request failed automatically when it runs time out.

The simplest modification should be to add a timeout argument to failPendingRequests(timeout: number), which can be called period and clean the timeout-ed requests.

A better way to implement it might integrate the timeout with the Peer class.
For example:

interface PeerOptions {
  timeout: number
}

class Peer {
  constructor(public options: PeerOptions) {
  }

  // request will be rejected if it did not get any response from the server after timeout milliseconds.
}

An in-range update of cross-env is breaking the build 🚨

Version 3.2.0 of cross-env just got published.

Branch Build failing 🚨
Dependency cross-env
Current Version 3.1.4
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As cross-env is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details
Release Notes v3.2.0

<a name"3.2.0">

3.2.0 (2017-03-04)

Features

  • revamp: revamp the entire lib (backward compatible) (#63) (dad00c46)
Commits

The new version differs by 4 commits .

  • dad00c4 feat(revamp): revamp the entire lib (backward compatible) (#63)
  • e33a85c docs(README): Add doc for cross-var. (#58)
  • 5e590ec docs(README): added how to use cross-env to run npm sub-scripts (#53)
  • afdb2de docs(README): mention BashΒ onΒ Windows (#49)

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.