mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-19 11:26:02 +00:00
* fix: hidden and credential files stay out of Studio, history and lint - The private-file rule now refuses every hidden file or folder in a project, except Studio's own files, the root .media folder, and pictures, video, sound, fonts, stylesheets and scripts a page can load. It also refuses Terraform state and variable files and more key-store types. - Project history never tracks, lists or serves a private file, and the blob route serves only bytes a listed file had, so copies kept by an older version are no longer readable. - Lint reads a linked stylesheet, script, import map or sub-composition only when the private-file rule allows it and the file is the kind its link names, so no finding quotes a private file. - The rule moves to @hyperframes/parsers/private-path so lint can use it; @hyperframes/core/safe-path re-exports it unchanged. * fix(studio-server): a refused history blob reads as not a history blob * fix(core): keep realpath in core, so its file-system callers and tests see one module
8 lines
407 B
TypeScript
8 lines
407 B
TypeScript
import { readProjectFile, type ProjectFileRead } from "@hyperframes/parsers/asset-resolution";
|
|
import { isPrivateFileUnder, isStudioPrivatePath } from "@hyperframes/parsers/private-path";
|
|
|
|
export function readLinkedProjectFile(projectDir: string, path: string): ProjectFileRead {
|
|
if (isPrivateFileUnder(projectDir, path, isStudioPrivatePath)) return { kind: "missing" };
|
|
return readProjectFile(path);
|
|
}
|