Skip to content

Releases: KB1RD/rpcchannel

Bugfixes

15 Oct 01:42
Compare
Choose a tag to compare
  1. The can-call opts should've contained wildcard matches. They now do under wc.
  2. Open generators and promises are now closed and resolved when a channel is closed. Receive will also no longer work when a channel is closed.

Breaking Changes: New access control system & stateful channels

01 Oct 01:46
Compare
Choose a tag to compare
  • The old access control system has been largely replaced. This removes the setPolicy methods only. Legacy support can be obtained by setting the access_controller property on the RpcChannel to an instance of LegacyAccessController
  • The new access system is much more flexible. See accesscontrol.ts for optional controllers. Controllers will be inherited from the parent RpcHandlerRegistry for a global registry, if desired.
  • You must now call start on a channel before using it. Not doing this leads to undefined behavior and may error out in future versions. You should also close a channel when you're done to send an alert to the other side.
  • Keep alives and inactivity timeouts can be set on channels to help with memory management
  • Channel start can wait for remote messages to start. This is useful when waiting for another context, such as a tab, to launch
  • The bundle builds properly for Node.JS/browser bundlers instead of making a minified bundle. There are no browser bundles, so this means it's up to you to ensure that your output code is minified

Bugfixes

11 Aug 14:44
Compare
Choose a tag to compare
  • Fixes crash on null
  • Fixes issue where, when using a shared RpcHandlerRegistry, stopping a generator could stop other channels' generators.

Bugfixes

22 Jul 01:04
Compare
Choose a tag to compare
v0.2.3

Bugfixes

Bugfixes

22 Jul 00:14
Compare
Choose a tag to compare

There was an extra space in the last release

Bugfixes

21 Jul 23:30
Compare
Choose a tag to compare

Fixed bugs with undefined returned values and improved error reporting

Add generator support and a `RemapArguments` decorator

21 Jul 19:24
Compare
Choose a tag to compare

Added support for generators. Note that these are...

  1. Work in progress. They do not yet support returning values (only yielding) mostly since I don't need return for how I'm using this and they don't support yielded arguments.
  2. Manual memory management is required. There's no way for the library to find out when the generator has gone out of scope, so the generator will continue yielding it's queue of received values forever and the sending side will keep sending forever unless you call return or throw.

Also added a RemapArguments decorator. This used to eliminate mandatory arguments or expand out the wildcard array. The first argument is an array (I'll get to that in a minute) and the second argument is the key to assign the function to. This key will be assigned to the function itself. This defaults to the RpcRemappedFunction key on the function-object, which is picked up by the RPC system in place of the normal function. The array is an array of one of the following:

  • pass - Pass the argument through
  • drop - Drop the argument, don't pass
  • expand - Iterate over the first element in the Iterable argument and pass it through. If multiple are in sequence, then the next element in that same Iterable is used, and so on. If the argument is not an Iterable, a TypeError will be thrown. One limitation of this is that consecutive iterables cannot be expanded since the next expand will pull the next value out of its successor.

Hopefully the final fix of `.d.ts`

11 Jul 15:23
Compare
Choose a tag to compare
v0.1.4

Maybe fix .d.ts

Fix building of `.d.ts`

11 Jul 14:39
Compare
Choose a tag to compare
v0.1.3

Bump version

Initial Release

11 Jul 02:29
Compare
Choose a tag to compare

Other versions (v0.1.0 and v0.1.1) were to re-run GitHub Actions in attempt to fix Actions.