@rpcbase/cli 0.186.0 → 0.187.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/cli",
3
- "version": "0.186.0",
3
+ "version": "0.187.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src"
@@ -58,6 +58,8 @@ const resolveFrom = (baseDir, value) => (
58
58
  path.isAbsolute(value) ? value : path.resolve(baseDir, value)
59
59
  )
60
60
 
61
+ const installCommand = "if [ -f package-lock.json ] || [ -f npm-shrinkwrap.json ]; then npm ci; elif [ -f package.json ]; then npm install --package-lock=false --no-audit --no-fund; fi"
62
+
61
63
  const toRelativePattern = (baseDir, value) => {
62
64
  const resolved = resolveFrom(baseDir, value)
63
65
  const relative = path.relative(baseDir, resolved)
@@ -416,7 +418,7 @@ export const deploy = async (argv) => {
416
418
 
417
419
  log(`Running: ${infrastructureRsyncCmd}`)
418
420
  execSync(infrastructureRsyncCmd, { stdio: argv.verbose ? "inherit" : "ignore" })
419
- await ssh(`cd ~/apps/${baseDeployDir}/infrastructure && [ -f package.json ] && npm ci || true`)
421
+ await ssh(`cd ~/apps/${baseDeployDir}/infrastructure && ${installCommand}`)
420
422
  console.log("Refreshing shared infrastructure before deploying the inactive app instance.")
421
423
  await ssh(`cd ~/apps/${baseDeployDir}/infrastructure && for f in ensure-*.js; do [ -f "$f" ] || continue; node "$f"; done && node ctrl.js up-infra prod`, true)
422
424
  }
@@ -452,7 +454,7 @@ export const deploy = async (argv) => {
452
454
  }
453
455
  await runInstanceAction("down", activeInstance)
454
456
  } else {
455
- await ssh(`cd ~/apps/${deployDir}/infrastructure && [ -f package.json ] && npm ci || true`)
457
+ await ssh(`cd ~/apps/${deployDir}/infrastructure && ${installCommand}`)
456
458
  log("Restarting application...")
457
459
  await ssh(`cd ~/apps/${deployDir}/infrastructure && node ctrl.js down prod`, true)
458
460
  log("Application stopped. Starting it up again...")