Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
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.
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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.