fix: register the cache-dir subpath for bun and node, and build inspector from core source

This commit is contained in:
Miguel Angel Simon Sierra
2026-10-29 01:27:43 -04:00
parent dabb0f5b39
commit 51a321f5d2
4 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -1836,7 +1836,7 @@ default 3); `--json` prints the results as JSON.
## Keep the environment healthy
HyperFrames keeps what it downloads and builds (the headless browser, models, optional packages, fonts and project
history) under `~/.cache/hyperframes`. Set `HYPERFRAMES_CACHE_DIR` to keep it somewhere else.
history) under `~/.cache/hyperframes`. Set `HYPERFRAMES_CACHE_DIR` to an absolute path to keep it somewhere else.
### `doctor`
+6
View File
@@ -68,6 +68,12 @@
"types": "./dist/atomicFile.d.ts",
"environments": ["bun", "node"]
},
"./cache-dir": {
"source": "./src/cacheDir.ts",
"runtime": "./dist/cacheDir.js",
"types": "./dist/cacheDir.d.ts",
"environments": ["bun", "node"]
},
"./remove-tree": {
"source": "./src/removeTree.ts",
"runtime": "./dist/removeTree.js",
-2
View File
@@ -1,8 +1,6 @@
import { homedir } from "node:os";
import { join, resolve } from "node:path";
/** Where HyperFrames keeps what it downloads, builds and caches: `HYPERFRAMES_CACHE_DIR` when set, else
* `~/.cache/hyperframes`. Read on each call. */
export function hyperframesCacheDir(...parts: string[]): string {
const named = process.env["HYPERFRAMES_CACHE_DIR"];
return join(named ? resolve(named) : join(homedir(), ".cache", "hyperframes"), ...parts);
+1 -1
View File
@@ -31,7 +31,7 @@ import {
import { closeServer } from "./pageServer";
import { Sources, fingerprint } from "./sources";
import type { InspectRequest, Snippet } from "./types";
import { hyperframesCacheDir } from "@hyperframes/core/cache-dir";
import { hyperframesCacheDir } from "../../core/src/cacheDir";
const pageRunner = (page: Page): PageRunner => ({
run: <A, R>(fn: (arg: A) => R, arg: A) =>