mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-18 07:50:13 +00:00
fix(cli): add --dir names the exact init command for a missing folder (#7615)
This commit is contained in:
+1
-1
@@ -142,7 +142,7 @@ before merge, listed at the end.
|
||||
1. Create `registry/<blocks|components>/<name>/registry-item.json` following the [schema](packages/core/schemas/registry-item.json)
|
||||
2. For components: include a `demo.html`
|
||||
3. Run `npx hyperframes lint` and `npx hyperframes validate` on your HTML
|
||||
4. Test the install flow: `hyperframes add <name> --dir /tmp/test-project`
|
||||
4. Test the install flow: `hyperframes init /tmp/test-project`, then `hyperframes add <name> --dir /tmp/test-project`
|
||||
5. Generate and validate the catalog: `bun run check:catalog-drift`
|
||||
|
||||
### Generated catalog files
|
||||
|
||||
@@ -606,7 +606,9 @@ describe("add command run() — several names", () => {
|
||||
const out = JSON.parse(String(log.mock.calls[0]?.[0]));
|
||||
expect(out.error.message).toContain(`Project folder not found: ${missing}`);
|
||||
expect(out.error.message).toContain("--dir is the project root");
|
||||
expect(out.error.message).toContain("hyperframes init");
|
||||
expect(out.error.message).toContain(
|
||||
`Create one with \`hyperframes init ${JSON.stringify(missing)}\``,
|
||||
);
|
||||
expect(existsSync(missing)).toBe(false);
|
||||
});
|
||||
|
||||
|
||||
@@ -566,7 +566,7 @@ export default defineCommand({
|
||||
if (!existsSync(projectDir)) {
|
||||
failCaught(
|
||||
new Error(
|
||||
`Project folder not found: ${projectDir}. --dir is the project root, not where the block lands (that is its compositions/ folder), and it must already exist. Create one with \`hyperframes init <dir>\`.`,
|
||||
`Project folder not found: ${projectDir}. --dir is the project root, not where the block lands (that is its compositions/ folder), and it must already exist. Create one with \`hyperframes init ${JSON.stringify(args.dir)}\`.`,
|
||||
),
|
||||
json,
|
||||
c.error,
|
||||
|
||||
Reference in New Issue
Block a user