@agentproto/catalog-sync 0.6.1 → 0.6.3

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/dist/bin.mjs CHANGED
@@ -1454,6 +1454,13 @@ async function runGenerators(gens, opts) {
1454
1454
  ...src.body !== void 0 ? { body: JSON.stringify(src.body) } : {}
1455
1455
  });
1456
1456
  if (!res.ok) {
1457
+ if (existing !== void 0) {
1458
+ process.stderr.write(
1459
+ `catalog-sync: skipping refresh of "${src.id}" \u2014 fetch ${src.url} failed: ${res.status} ${res.statusText}; reusing committed snapshot.
1460
+ `
1461
+ );
1462
+ return JSON.parse(existing);
1463
+ }
1457
1464
  throw new Error(
1458
1465
  `catalog-sync: fetch ${src.url} failed: ${res.status} ${res.statusText}`
1459
1466
  );