@toast-ninja/toast-cli 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/cli.js +4 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toast-ninja/toast-cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Toast CLI for agent CI workflows",
5
5
  "bin": {
6
6
  "toast": "bin/toast.js"
package/src/cli.js CHANGED
@@ -334,9 +334,12 @@ const handleWait = async context => {
334
334
  if (options.interval) parseDurationMs(options.interval)
335
335
  const startedAt = toMillis(context.now())
336
336
 
337
- while (toMillis(context.now()) - startedAt <= timeoutMs) {
337
+ while (true) {
338
338
  const elapsedMs = toMillis(context.now()) - startedAt
339
339
  const remainingMs = timeoutMs - elapsedMs
340
+
341
+ if (remainingMs <= 0) break
342
+
340
343
  const waitTimeoutSeconds = Math.max(
341
344
  1,
342
345
  Math.min(DEFAULT_WAIT_REQUEST_SECONDS, Math.ceil(remainingMs / 1000)),