mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-10-30 09:16:55 +00:00
fix: register the cache-dir subpath for bun and node, and build inspector from core source
This commit is contained in:
@@ -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`
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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) =>
|
||||
|
||||
Reference in New Issue
Block a user