
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
docker-exec-websocket-client
Advanced tools
## Purpose Client for [docker-exec-websocket-server](https://github.com/taskcluster/docker-exec-websocket-server).
Client for docker-exec-websocket-server.
Client:
var DockerClient = require('../lib/client.js');
var client = new DockerClient({
url: 'ws://localhost:8081/a' //whole url of websocket, preface with wss if secure
tty: 'true', //Whether or not we expect VT100 style output, also enables exit codes
command: '/bin/bash', //Command to be run, can be an array with options such as ['cat', '-E']
wsopts: {}, //Pass in websocket options for the underlying websocket
});
await client.execute();
process.stdin.pipe(client.stdin);
client.stdout.pipe(process.stdout);
client.stderr.pipe(process.stderr);
client.on('exit', (exitCode) => {
//exitCode is a number between 0 and 255
process.exit(exitCode);
});
There are also other client events:
open
signifies the opening of the websocketpause
and resume
signify when the server has paused/resumed sending datashutdown
signifies the server was shut downerror
signifies that some sort of internal error occured, and may carry a utf-8 payloadEnsure Docker is installed.
To test locally:
yarn install
to install the dependencies, including developer dependenciesyarn test
DEBUG=* yarn test -f 'docker exec wc'
To test with docker-compose
, similar to CI:
docker-compose build --build-arg NODE_VERSION=16-bullseye
, or change to the desired
Node.js image tagdocker-compose run --rm test
docker-compose build ...
when the code changes or you want to try a different Node.js image.FAQs
## Purpose Client for [docker-exec-websocket-server](https://github.com/taskcluster/docker-exec-websocket-server).
We found that docker-exec-websocket-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.