Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions docs/contributing/testing-local-changes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@ pnpm build
`pnpm link --global` makes the `hyperframes` binary in your `$PATH` point at your local build. It survives across terminal sessions and auto-picks up new builds without re-linking.

```bash
# One-time setup
# If you previously installed hyperframes globally, remove it first —
# a global install takes priority over pnpm link and shadows your local build.
pnpm remove -g hyperframes 2>/dev/null || npm uninstall -g hyperframes 2>/dev/null

# Link your local build
cd packages/cli
pnpm link --global

# Verify — should print your local version
# Verify — should print your local version AND point to the monorepo
hyperframes --version
which hyperframes
# The path should contain your monorepo, NOT pnpm/global/.pnpm/hyperframes@...
```

Now use `hyperframes` normally in any directory:
Expand Down Expand Up @@ -103,19 +109,21 @@ Common test scenarios:

The CLI binary is a single bundled file at `packages/cli/dist/cli.js`. If your change is in `@hyperframes/core` or another workspace package, make sure `pnpm build` rebuilt _all_ packages — the CLI bundles its dependencies at build time.

**`hyperframes` still shows the old version**
**`hyperframes` still shows the old version / old UI**

Check which binary is active:
A globally installed `hyperframes` package shadows `pnpm link`. Check which binary is active:

```bash
which hyperframes
hyperframes --version
# BAD: /Users/you/Library/pnpm/hyperframes → pnpm/global/.pnpm/hyperframes@0.x.x/...
# GOOD: /Users/you/Library/pnpm/hyperframes → your-monorepo/packages/cli/dist/cli.js
```

If it points to a global npm installation rather than your link, uninstall the npm version first:
If it points to the global store, remove the global install and re-link:

```bash
npm uninstall -g hyperframes
pnpm remove -g hyperframes
npm uninstall -g hyperframes # in case it was installed via npm
cd packages/cli && pnpm link --global
```

Expand Down
22 changes: 22 additions & 0 deletions packages/core/src/studio-api/routes/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,28 @@ export function registerRenderRoutes(api: Hono, adapter: StudioApiAdapter): void
return c.json({ deleted: true });
});

// Serve render file directly from disk (no in-memory map dependency)
api.get("/projects/:id/renders/file/*", async (c) => {
const project = await adapter.resolveProject(c.req.param("id"));
if (!project) return c.json({ error: "not found" }, 404);
const filename = c.req.path.split("/renders/file/")[1];
if (!filename) return c.json({ error: "missing filename" }, 400);
const rendersDir = adapter.rendersDir(project);
const fp = join(rendersDir, filename);
if (!existsSync(fp)) return c.json({ error: "not found" }, 404);
const isWebm = fp.endsWith(".webm");
const contentType = isWebm ? "video/webm" : "video/mp4";
const content = readFileSync(fp);
return new Response(content, {
headers: {
"Content-Type": contentType,
"Content-Disposition": `inline; filename="${filename}"`,
"Accept-Ranges": "bytes",
"Content-Length": String(content.length),
},
});
});

// List renders
api.get("/projects/:id/renders", async (c) => {
const project = await adapter.resolveProject(c.req.param("id"));
Expand Down
Loading
Loading