mirror of
https://github.com/hanzoai/frames.git
synced 2026-09-24 00:08:03 +00:00
skills: give each skill the directory its name declares
Every SKILL.md already declared the new name — name: frames, frames-cli, frames-core, and so on — but the directories were never moved, so the tree carried frames-* in content and hyperframes-* on disk. Everything that resolves a skill by path missed: the core-skill list, the plugin marketplace pin, and the docs the CLI reads at runtime. Eight tests failed on main because the files they open do not exist. The directories now match what the files say they are, and the guide the claude-design contract reads takes the name that contract already used.
This commit is contained in:
@@ -71,7 +71,7 @@ async function ensureServer() {
|
||||
const port = 5380 + Math.floor(Math.random() * 20);
|
||||
const env = { ...process.env };
|
||||
delete env.HYPERFRAME_RUNTIME_URL; // wrong value fails silently as 200 HTML
|
||||
const cmd = flag("server-cmd", `npx --yes frames preview --no-open --port ${port}`);
|
||||
const cmd = flag("server-cmd", `npx --yes @hanzo/frames preview --no-open --port ${port}`);
|
||||
const child = spawn("sh", ["-c", cmd.replace(/\{port\}/g, String(port))], {
|
||||
cwd: project,
|
||||
env,
|
||||
|
||||
@@ -71,7 +71,7 @@ async function ensureServer() {
|
||||
const port = 5380 + Math.floor(Math.random() * 20);
|
||||
const env = { ...process.env };
|
||||
delete env.HYPERFRAME_RUNTIME_URL; // wrong value fails silently as 200 HTML
|
||||
const cmd = flag("server-cmd", `npx --yes frames preview --no-open --port ${port}`);
|
||||
const cmd = flag("server-cmd", `npx --yes @hanzo/frames preview --no-open --port ${port}`);
|
||||
const child = spawn("sh", ["-c", cmd.replace(/\{port\}/g, String(port))], {
|
||||
cwd: project,
|
||||
env,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"configVersion": 1,
|
||||
"workspaces": {
|
||||
"": {
|
||||
"name": "hyperframes-monorepo",
|
||||
"name": "frames-monorepo",
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^20.5.0",
|
||||
"@commitlint/config-conventional": "^20.5.0",
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@
|
||||
"guides/antigravity",
|
||||
"guides/copilot-cli",
|
||||
"guides/claude-design",
|
||||
"guides/claude-design-send-to-hyperframes",
|
||||
"guides/claude-design-send-to-frames",
|
||||
"guides/open-design",
|
||||
"guides/prompting",
|
||||
"guides/hyperframes-vs-remotion",
|
||||
|
||||
@@ -39,10 +39,10 @@ function expectScaffoldedScripts(target: string): void {
|
||||
scripts?: Record<string, string>;
|
||||
};
|
||||
expect(pkg.scripts).toMatchObject({
|
||||
dev: "npx --yes frames preview",
|
||||
check: "npx --yes frames check",
|
||||
render: "npx --yes frames render",
|
||||
publish: "npx --yes frames publish",
|
||||
dev: "npx --yes @hanzo/frames preview",
|
||||
check: "npx --yes @hanzo/frames check",
|
||||
render: "npx --yes @hanzo/frames render",
|
||||
publish: "npx --yes @hanzo/frames publish",
|
||||
});
|
||||
expect(Object.keys(pkg.scripts ?? {}).sort()).toEqual(["check", "dev", "publish", "render"]);
|
||||
}
|
||||
|
||||
@@ -69,17 +69,17 @@ describe("upgradeProjectPins", () => {
|
||||
}
|
||||
|
||||
it("rewrites pinned scripts to latest and reports the delta", async () => {
|
||||
const d = project({ render: "npx --yes [email protected] render" });
|
||||
const d = project({ render: "npx --yes @hanzo/[email protected] render" });
|
||||
const r = await upgradeProjectPins(d, { json: false, check: false });
|
||||
expect(r.changed).toBe(true);
|
||||
expect(r.from).toEqual(["0.7.48"]);
|
||||
expect(r.to).toBe("0.7.55");
|
||||
const pkg = JSON.parse(readFileSync(join(d, "package.json"), "utf-8"));
|
||||
expect(pkg.scripts.render).toBe("npx --yes [email protected] render");
|
||||
expect(pkg.scripts.render).toBe("npx --yes @hanzo/[email protected] render");
|
||||
});
|
||||
|
||||
it("--check reports without writing", async () => {
|
||||
const d = project({ render: "npx --yes [email protected] render" });
|
||||
const d = project({ render: "npx --yes @hanzo/[email protected] render" });
|
||||
const before = readFileSync(join(d, "package.json"), "utf-8");
|
||||
const r = await upgradeProjectPins(d, { json: false, check: true });
|
||||
expect(r.changed).toBe(true);
|
||||
|
||||
@@ -7,16 +7,16 @@ import {
|
||||
|
||||
describe("FRAMES_PIN_RE", () => {
|
||||
it("matches a frames@<semver> token and captures the version", () => {
|
||||
const match = "npx --yes [email protected] render".match(FRAMES_PIN_RE);
|
||||
const match = "npx --yes @hanzo/[email protected] render".match(FRAMES_PIN_RE);
|
||||
expect(match?.[0]).toBe("[email protected]");
|
||||
});
|
||||
});
|
||||
|
||||
describe("rewriteProjectPinnedScripts", () => {
|
||||
const scripts = {
|
||||
dev: "npx --yes [email protected] preview",
|
||||
check: "npx --yes [email protected] check",
|
||||
render: "npx --yes [email protected] render",
|
||||
dev: "npx --yes @hanzo/[email protected] preview",
|
||||
check: "npx --yes @hanzo/[email protected] check",
|
||||
render: "npx --yes @hanzo/[email protected] render",
|
||||
unrelated: "echo hi",
|
||||
unpinned: "npx @hanzo/frames render",
|
||||
};
|
||||
@@ -25,14 +25,14 @@ describe("rewriteProjectPinnedScripts", () => {
|
||||
const r = rewriteProjectPinnedScripts(scripts, "0.7.55");
|
||||
expect(r.changed).toBe(true);
|
||||
expect(r.fromVersions).toEqual(["0.7.48"]);
|
||||
expect(r.scripts.render).toBe("npx --yes [email protected] render");
|
||||
expect(r.scripts.dev).toBe("npx --yes [email protected] preview");
|
||||
expect(r.scripts.render).toBe("npx --yes @hanzo/[email protected] render");
|
||||
expect(r.scripts.dev).toBe("npx --yes @hanzo/[email protected] preview");
|
||||
expect(r.scripts.unrelated).toBe("echo hi");
|
||||
expect(r.scripts.unpinned).toBe("npx @hanzo/frames render");
|
||||
});
|
||||
|
||||
it("is a no-op when already at target", () => {
|
||||
const at = rewriteProjectPinnedScripts({ render: "npx --yes [email protected] render" }, "0.7.55");
|
||||
const at = rewriteProjectPinnedScripts({ render: "npx --yes @hanzo/[email protected] render" }, "0.7.55");
|
||||
expect(at.changed).toBe(false);
|
||||
expect(at.fromVersions).toEqual([]);
|
||||
});
|
||||
@@ -46,7 +46,7 @@ describe("rewriteProjectPinnedScripts", () => {
|
||||
it("reads distinct pinned versions across scripts", () => {
|
||||
expect(
|
||||
readPinnedHyperframesVersions({
|
||||
a: "npx --yes [email protected] render",
|
||||
a: "npx --yes @hanzo/[email protected] render",
|
||||
b: "npx @hanzo/[email protected] check",
|
||||
c: "npx @hanzo/frames render",
|
||||
}),
|
||||
|
||||
@@ -44,7 +44,7 @@ describe("printStalePinNotice", () => {
|
||||
it("warns once when the project pins an older version", () => {
|
||||
writeFileSync(
|
||||
join(dir, "package.json"),
|
||||
JSON.stringify({ scripts: { render: "npx --yes [email protected] render" } }),
|
||||
JSON.stringify({ scripts: { render: "npx --yes @hanzo/[email protected] render" } }),
|
||||
);
|
||||
printStalePinNotice(dir);
|
||||
printStalePinNotice(dir); // throttled — second call silent
|
||||
@@ -56,7 +56,7 @@ describe("printStalePinNotice", () => {
|
||||
it("silent when project pin is current", () => {
|
||||
writeFileSync(
|
||||
join(dir, "package.json"),
|
||||
JSON.stringify({ scripts: { render: "npx --yes [email protected] render" } }),
|
||||
JSON.stringify({ scripts: { render: "npx --yes @hanzo/[email protected] render" } }),
|
||||
);
|
||||
printStalePinNotice(dir);
|
||||
expect(writes.join("")).toBe("");
|
||||
@@ -66,7 +66,7 @@ describe("printStalePinNotice", () => {
|
||||
process.env.CI = "true";
|
||||
writeFileSync(
|
||||
join(dir, "package.json"),
|
||||
JSON.stringify({ scripts: { render: "npx --yes [email protected] render" } }),
|
||||
JSON.stringify({ scripts: { render: "npx --yes @hanzo/[email protected] render" } }),
|
||||
);
|
||||
printStalePinNotice(dir);
|
||||
expect(writes.join("")).toBe("");
|
||||
|
||||
+24
-24
@@ -6,67 +6,67 @@
|
||||
"files": 140
|
||||
},
|
||||
"faceless-explainer": {
|
||||
"hash": "3f83583c4db3770e",
|
||||
"hash": "b9cb2691b14aba33",
|
||||
"files": 22
|
||||
},
|
||||
"figma": {
|
||||
"hash": "3bef085459d6ce2a",
|
||||
"hash": "db9d862ce80ff313",
|
||||
"files": 2
|
||||
},
|
||||
"general-video": {
|
||||
"hash": "448a50313de08bca",
|
||||
"files": 4
|
||||
},
|
||||
"hyperframes": {
|
||||
"hash": "97358be15b9fcab3",
|
||||
"frames": {
|
||||
"hash": "cb32b613cdec7f4b",
|
||||
"files": 17
|
||||
},
|
||||
"hyperframes-animation": {
|
||||
"frames-animation": {
|
||||
"hash": "777c9c41514abea6",
|
||||
"files": 121
|
||||
},
|
||||
"hyperframes-cli": {
|
||||
"hash": "4e004b5031487c79",
|
||||
"frames-cli": {
|
||||
"hash": "eab61861b83d63d5",
|
||||
"files": 11
|
||||
},
|
||||
"hyperframes-core": {
|
||||
"hash": "afd55646e1b6deb9",
|
||||
"frames-core": {
|
||||
"hash": "40d8a0344c545702",
|
||||
"files": 19
|
||||
},
|
||||
"hyperframes-creative": {
|
||||
"frames-creative": {
|
||||
"hash": "5a45c344db173849",
|
||||
"files": 78
|
||||
},
|
||||
"hyperframes-keyframes": {
|
||||
"frames-keyframes": {
|
||||
"hash": "e407cca40e2e9795",
|
||||
"files": 3
|
||||
},
|
||||
"hyperframes-registry": {
|
||||
"hash": "fe6fc8fc2fe3705f",
|
||||
"frames-registry": {
|
||||
"hash": "7288c7add391c2c9",
|
||||
"files": 10
|
||||
},
|
||||
"general-video": {
|
||||
"hash": "102ee3439678ed64",
|
||||
"files": 4
|
||||
},
|
||||
"media-use": {
|
||||
"hash": "29eb505e4579d68e",
|
||||
"hash": "b1e6e7824b3a3360",
|
||||
"files": 124
|
||||
},
|
||||
"motion-graphics": {
|
||||
"hash": "e0859c835eae20f9",
|
||||
"hash": "94c70b5768d1c723",
|
||||
"files": 23
|
||||
},
|
||||
"music-to-video": {
|
||||
"hash": "641ace28acc37ec9",
|
||||
"hash": "830886a4e6c12aab",
|
||||
"files": 132
|
||||
},
|
||||
"pr-to-video": {
|
||||
"hash": "5c295974d3757ef3",
|
||||
"hash": "fc5bbdad43ff7965",
|
||||
"files": 29
|
||||
},
|
||||
"product-launch-video": {
|
||||
"hash": "ce14818198999f96",
|
||||
"hash": "e05f0311225f8fe1",
|
||||
"files": 26
|
||||
},
|
||||
"remotion-to-hyperframes": {
|
||||
"hash": "5a3bb9af8311822e",
|
||||
"remotion-to-frames": {
|
||||
"hash": "b99129eff9f20bfb",
|
||||
"files": 70
|
||||
},
|
||||
"slideshow": {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user