diff --git a/scripts/clawhub-sync.mjs b/scripts/clawhub-sync.mjs index 09bbf26ce4e..3a13024a860 100644 --- a/scripts/clawhub-sync.mjs +++ b/scripts/clawhub-sync.mjs @@ -5,8 +5,15 @@ import { spawnSync } from "node:child_process"; import { pathToFileURL } from "node:url"; const TAKEN_VERSION = /Version (\d+)\.(\d+)\.(\d+) already exists/; -// The registry hid this one version; any other taken version still fails the sync. -const SKIPPABLE_TAKEN = new Map([["hyperframes-creative", "1.0.13"]]); +// Versions the registry holds but does not list; any other taken version still fails the sync. +const SKIPPABLE_TAKEN = new Map([ + ["hyperframes-creative", "1.0.13"], + ["hyperframes", "1.0.51"], + ["hyperframes-cli", "1.0.73"], + ["hyperframes-registry", "1.0.15"], + ["media-use", "1.0.87"], + ["remotion-to-hyperframes", "1.0.17"], +]); const OWNER_HANDLE = "heygen-com"; const OWNER = ["--owner", OWNER_HANDLE]; diff --git a/scripts/clawhub-sync.test.mjs b/scripts/clawhub-sync.test.mjs index 04e3aad78eb..31bb598bf62 100644 --- a/scripts/clawhub-sync.test.mjs +++ b/scripts/clawhub-sync.test.mjs @@ -79,6 +79,26 @@ describe("ClawHub skill sync", () => { ]); }); + it("publishes one patch past each acknowledged taken version", () => { + const acknowledged = [ + ["hyperframes", "1.0.51", "1.0.52"], + ["hyperframes-cli", "1.0.73", "1.0.74"], + ["hyperframes-registry", "1.0.15", "1.0.16"], + ["media-use", "1.0.87", "1.0.88"], + ["remotion-to-hyperframes", "1.0.17", "1.0.18"], + ]; + const clawhub = fakeClawhub({ + syncFailed: acknowledged.map(([slug, taken]) => ({ slug, message: TAKEN(taken) })), + }); + + assert.deepEqual(sync(clawhub), []); + const published = clawhub.calls.filter((args) => args[0] === "publish"); + assert.deepEqual( + published.map((args) => [args[3], args[args.indexOf("--version") + 1]]), + acknowledged.map(([slug, , next]) => [slug, next]), + ); + }); + it("fails rather than skipping further when the next patch is taken too", () => { const clawhub = fakeClawhub({ syncFailed: [creativeTaken], takenVersions: ["1.0.14"] });