@hyperframes/core 0.8.225 → 0.8.226

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,6 +28,7 @@ import { readDeclaredDefaults } from "../runtime/getVariables.js";
28
28
  import { ensureExternalLinkTag, inlineSubCompositions, isLibraryCopy, refuseSwapsReachedByRootScripts, } from "./inlineSubCompositions.js";
29
29
  import { isSafePath, resolveWithinProject } from "../safePath.js";
30
30
  import { ensureHfIds } from "@hyperframes/parsers/hf-ids";
31
+ import { readTextFile } from "@hyperframes/parsers/asset-resolution";
31
32
  import { HF_COLOR_GRADING_ATTR } from "../colorGrading.js";
32
33
  import { assignMediaRenderIds } from "./mediaRenderIds.js";
33
34
  const DEFAULT_RUNTIME_SCRIPT_URL = "";
@@ -71,7 +72,7 @@ function safeReadFile(filePath) {
71
72
  if (!existsSync(filePath))
72
73
  return null;
73
74
  try {
74
- return readFileSync(filePath, "utf-8");
75
+ return readTextFile(filePath);
75
76
  }
76
77
  catch {
77
78
  return null;
@@ -856,7 +857,7 @@ async function bundleProject(projectDir, options) {
856
857
  throw new Error(`${entryFile} not found in project directory`);
857
858
  }
858
859
  noteRead(indexPath);
859
- const entryHtml = readFileSync(indexPath, "utf-8");
860
+ const entryHtml = readTextFile(indexPath);
860
861
  const mountedShell = readMountedSceneShell(projectDir, entryFile, entryHtml);
861
862
  const sourceDir = mountedShell ? projectDir : dirname(indexPath);
862
863
  // Every mount of a sub-composition asks again for each of its url()s; isSafePath realpaths the whole chain.