@rpcbase/cli 0.190.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 +1 -1
- package/src/cmd-deploy/index.js +2 -1
package/package.json
CHANGED
package/src/cmd-deploy/index.js
CHANGED
|
@@ -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
|
|
289
|
+
await ssh(`node -e ${shellQuote(healthcheckScript)}`)
|
|
289
290
|
console.log(`Instance ${instance} is healthy at ${url}`)
|
|
290
291
|
return
|
|
291
292
|
} catch {
|