@xompass/remoting
v10.0.1
Published
Fork of strong-remoting for LoopBack 3 style remoting
Readme
@xompass/remoting
@xompass/remoting is a fork of strong-remoting focused on keeping LoopBack 3 style remoting working while reducing maintenance overhead.
The goal of this fork is compatibility for the common upstream use cases, not byte-for-byte preservation of the original package. The internals were intentionally simplified and modernized:
- TypeScript source with build output in
dist/ - internal phases implementation instead of the old external
loopback-phasepackage @xompass/error-handlerinstead of the upstream error handler package- legacy i18n and
strong-globalizeusage removed - several old dependencies removed or replaced
- modern tooling with
tsdown,vitest, andoxlint
Installation
npm install @xompass/remotingQuick start
const remoting = require('@xompass/remoting');
const SharedClass = remoting.SharedClass;
const remotes = remoting.create();
function User() {}
User.greet = function (fn) {
fn(null, 'hello, world!');
};
const userSharedClass = new SharedClass('user', User);
userSharedClass.defineMethod('greet', {
isStatic: true,
returns: [{ arg: 'msg', type: 'string' }],
});
require('http').createServer(remotes.handler('rest')).listen(3000);Then:
curl http://localhost:3000/user/greetScope
This package still provides the same main building blocks that existing strong-remoting users expect:
- remote object collections
- REST adapter support
- hooks
- stream support
- transport abstraction
If you are migrating an existing codebase, the intent is that the public API should feel familiar even though the implementation is leaner.
Notes for fork users
- This is a maintained fork, not the upstream package.
- If you are also using the related forks, prefer pairing it with
@xompass/error-handler. - Some legacy internals were removed specifically to keep the codebase smaller and easier to reason about.
Development
npm run build
npm run typecheck
npm run lint
npm testLicense
Artistic-2.0. See LICENSE.md.
