@rpcbase/cli 0.189.0 → 0.191.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.189.0",
3
+ "version": "0.191.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src"
@@ -283,9 +283,10 @@ export const deploy = async (argv) => {
283
283
  if (!Number.isFinite(port) || port <= 0) throw new Error(`Cannot healthcheck instance ${instance}: invalid port`)
284
284
 
285
285
  const url = `http://127.0.0.1:${port}/`
286
+ const healthcheckScript = `fetch(${JSON.stringify(url)}).then((res) => process.exit(res.status < 500 ? 0 : 1)).catch(() => process.exit(1))`
286
287
  for (let attempt = 1; attempt <= 60; attempt += 1) {
287
288
  try {
288
- await ssh(`node -e "fetch('${url}').then((res)=>process.exit(res.status < 500 ? 0 : 1)).catch(()=>process.exit(1))"`)
289
+ await ssh(`node -e ${shellQuote(healthcheckScript)}`)
289
290
  console.log(`Instance ${instance} is healthy at ${url}`)
290
291
  return
291
292
  } catch {
@@ -432,7 +433,7 @@ export const deploy = async (argv) => {
432
433
  }
433
434
 
434
435
  const excludeList = baseExcludeList
435
- .concat(useBlueGreen ? ["infrastructure/"] : [])
436
+ .concat(useBlueGreen ? ["/infrastructure/"] : [])
436
437
  .concat(useBlueGreen ? preparedDeploy.sharedEnvFileNames : [])
437
438
  .concat(deployExcludePatterns)
438
439