
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
ablyd-client
Advanced tools
A JavaScript library for interacting with AblyD, a program which allows for simple creation and control of command-line interace processes via Ably Realtime, a realtime data delivery platform.
npm install ablyd-client --save
and require as:
var AblyDClient = require('ablyd-client');
All examples assume a client has been created as follows:
// basic auth with an API key
var ablydClient = new AblyDClient("API_KEY");
// using a Client Options object, see https://www.ably.com/documentation/realtime/usage#client-options
// which must contain at least one auth option, i.e. at least
// one of: key, token, tokenDetails, authUrl, or authCallback
var ablydClient = new AblyDClient(clientOptionsObject);
Assuming you have an AblyD instance running on the same app as the auth details provided, you can start a process on it with:
ablydClient.startNewProcess(serverID, args, function(err, ablydProcess) {
if (err) console.log(err);
});
An error is returned if no active AblyD instances exist which are listening for commands.
Alternatively if there's an already active process you'd like to interact with, you can get it with:
ablydClient.getProcess("process:namespace", function(ablydProcess) {
...
});
You can get a list of active processes with:
// Get all active processes
ablydClient.getProcesses(function(ablydProcesses) {
ablydProcesses // [ '382448', '372849', '232498' ]
});
You can also get the channel names for processes, which is useful for using getProcess:
ablydClient.getProcessChannels(function(processChannels) {
processChannels // [ 'ablyd:c41svahe008bcgv37el0:48506', 'ablyd:c41svahe008bcgv37el0:48518' ]
});
You can subscribe to the output of a process with:
err = ablydClient.subscribe(function (message) {
message.name; // 'greeting'
message.data; // 'Hello World from process!'
});
// Publish a single message with name and data
ablydProcess.publish('greeting', 'Hello World from client to process!');
// Optionally, you can use a callback to be notified of success or failure
ablyDProcess.publish('greeting', 'Hello World from client to process!', function(err) {
if(err) {
console.log('publish failed with error ' + err);
} else {
console.log('publish succeeded');
}
});
You can see what the state of currently active AblyD servers are with:
ablydClient.getServerStatuses((err, serverStatuses) {
serverStatuses[0] // {
// action: 'present',
// id: 'TV8-xpttP-:4:0',
// timestamp: 1627643396934,
// clientId: 'c41trvpe008d13aqm8tg',
// connectionId: 'TV8-xpttP-',
// data: {
// ServerID: 'c41trvpe008d13aqm8tg',
// Namespace: 'ablyd',
// MaxProcesses: 20,
// Processes: { '53392': 'Running' }
// },
// encoding: null,
// size: undefined
// }
});
You can listen for whenever servers start with:
ablydClient.subscribeToServerStarted((serverStartedMessage) => {
});
You can listen for whenever servers stops with:
ablydClient.subscribeToServerStopped((serverStartedMessage) => {
});
You can listen for whenever server's state changes (such as a new process starting on it):
ablydClient.subscribeToServerChanged((serverStartedMessage) => {
});
Please view or report issues to the Github issues.
FAQs
A client to simplify interacting with an AblyD instance
We found that ablyd-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.