Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
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 7,049 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.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.