Releases: KB1RD/rpcchannel
Releases · KB1RD/rpcchannel
Bugfixes
Breaking Changes: New access control system & stateful channels
- The old access control system has been largely replaced. This removes the
setPolicy
methods only. Legacy support can be obtained by setting theaccess_controller
property on theRpcChannel
to an instance ofLegacyAccessController
- The new access system is much more flexible. See
accesscontrol.ts
for optional controllers. Controllers will be inherited from the parentRpcHandlerRegistry
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 alsoclose
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
Bugfixes
Bugfixes
Bugfixes
Add generator support and a `RemapArguments` decorator
Added support for generators. Note that these are...
- Work in progress. They do not yet support
return
ing values (onlyyield
ing) mostly since I don't needreturn
for how I'm using this and they don't supportyield
ed arguments. - 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
yield
ing it's queue of received values forever and the sending side will keep sending forever unless you callreturn
orthrow
.
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 throughdrop
- Drop the argument, don't passexpand
- Iterate over the first element in theIterable
argument and pass it through. If multiple are in sequence, then the next element in that sameIterable
is used, and so on. If the argument is not anIterable
, aTypeError
will be thrown. One limitation of this is that consecutive iterables cannot be expanded since the nextexpand
will pull the next value out of its successor.
Hopefully the final fix of `.d.ts`
v0.1.4 Maybe fix .d.ts
Fix building of `.d.ts`
v0.1.3 Bump version
Initial Release
Other versions (v0.1.0
and v0.1.1
) were to re-run GitHub Actions in attempt to fix Actions.