fix: reset stale cache flag, guard gcloud null, validate DO config (#2073)

- manifest.ts: Reset _staleCache on successful fetch/cache load so
  isStaleCache() doesn't falsely report stale data after reconnecting
- gcp.ts: Replace getGcloudCmd()! with requireGcloudCmd() that throws
  a descriptive error instead of crashing with null dereference
- digitalocean.ts: Replace unvalidated JSON.parse return with
  parseJsonObj() + isString()/isNumber() guards for type safety

Agent: code-health

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
A 2026-03-01 14:08:38 -08:00 committed by GitHub
parent b066b3a1ac
commit bb4deaf24c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 42 additions and 23 deletions

View file

@ -1,6 +1,6 @@
{
"name": "@openrouter/spawn",
"version": "0.11.21",
"version": "0.11.22",
"type": "module",
"bin": {
"spawn": "cli.js"