Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
shipit-cli
Advanced tools
Shipit command line interface.
npm install --save-dev shipit-cli
Usage: shipit <environment> <tasks...>
Options:
-V, --version output the version number
--shipitfile <file> Specify a custom shipitfile to use
--require <files...> Script required before launching Shipit
--tasks List available tasks
--environments List available environments
-h, --help output usage information
shipitfile.js
module.exports = shipit => {
shipit.initConfig({
staging: {
servers: 'myproject.com',
},
})
shipit.task('pwd', async () => {
await shipit.remote('pwd')
})
}
Create a new Shipit task. If a promise is returned task will wait for completion.
shipit.task('hello', async () => {
await shipit.remote('echo "hello on remote"')
await shipit.local('echo "hello from local"')
})
Create a new Shipit task that will block other tasks during its execution. If a promise is returned other task will wait before start.
shipit.blTask('hello', async () => {
await shipit.remote('echo "hello on remote"')
await shipit.local('echo "hello from local"')
})
Run Shipit tasks.
shipit.start('task')
shipit.start('task1', 'task2')
shipit.start(['task1', 'task2'])
Run a command locally and streams the result. See ssh-pool#exec.
shipit
.local('ls -lah', {
cwd: '/tmp/deploy/workspace',
})
.then(({ stdout }) => console.log(stdout))
.catch(({ stderr }) => console.error(stderr))
Run a command remotely and streams the result. Run a command locally and streams the result. See ssh-pool#connection.run.
shipit
.remote('ls -lah')
.then(([server1Result, server2Result]) => {
console.log(server1Result.stdout)
console.log(server2Result.stdout)
})
.catch(error => {
console.error(error.stderr)
})
Make a remote copy from a local path to a remote path. See ssh-pool#connection.copyToRemote.
shipit.copyToRemote('/tmp/workspace', '/opt/web/myapp')
Make a remote copy from a remote path to a local path. See ssh-pool#connection.copyFromRemote.
shipit.copyFromRemote('/opt/web/myapp', '/tmp/workspace')
Log using Shipit, same API as console.log
.
shipit.log('hello %s', 'world')
When the system initializes it automatically emits events:
Each shipit task also generates events:
Inside the task events, you can test for the task name.
shipit.on('task_start', event => {
if (event.task == 'first_task') {
shipit.log("I'm the first task")
}
})
MIT
FAQs
Universal automation and deployment tool written in JavaScript.
The npm package shipit-cli receives a total of 2,848 weekly downloads. As such, shipit-cli popularity was classified as popular.
We found that shipit-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.