@hyperframes/producer 0.9.34 → 0.9.35

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.
package/dist/index.js CHANGED
@@ -6472,6 +6472,7 @@ import {
6472
6472
  readTextFile,
6473
6473
  resolveCompositionSrc
6474
6474
  } from "@hyperframes/parsers/asset-resolution";
6475
+ import { isPrivateFileUnder, isVcsOrSecretPath } from "@hyperframes/core/safe-path";
6475
6476
 
6476
6477
  // src/services/renderMediaCollector.ts
6477
6478
  import { parseHTML as parseHTML2 } from "linkedom";
@@ -7469,6 +7470,7 @@ function normalizeCompositionSrcs(html, projectDir) {
7469
7470
  return `${name}${quote}${relative2(projectDir, file).split(sep2).join("/")}${quote}`;
7470
7471
  });
7471
7472
  }
7473
+ var isPrivateCompositionFile = (projectDir, filePath) => isPrivateFileUnder(projectDir, filePath, isVcsOrSecretPath);
7472
7474
  function assertSubCompositionsUsable(html, projectDir, visited = /* @__PURE__ */ new Set()) {
7473
7475
  const { document: document2 } = parseHTML5(html);
7474
7476
  const hosts = [...document2.querySelectorAll("[data-composition-src]")];
@@ -7482,6 +7484,10 @@ function assertSubCompositionsUsable(html, projectDir, visited = /* @__PURE__ */
7482
7484
  problems.push({ srcPath, detail: "it is outside the project folder" });
7483
7485
  continue;
7484
7486
  }
7487
+ if (isPrivateCompositionFile(projectDir, filePath)) {
7488
+ problems.push({ srcPath, detail: "it is git metadata or an env file" });
7489
+ continue;
7490
+ }
7485
7491
  if (visited.has(filePath)) continue;
7486
7492
  const read = readProjectFile(filePath);
7487
7493
  if (read.kind === "missing") {
@@ -7785,7 +7791,7 @@ async function parseSubCompositions(html, projectDir, downloadDir, visited = /*
7785
7791
  const srcPath = el.getAttribute("data-composition-src");
7786
7792
  if (!srcPath) continue;
7787
7793
  const filePath = resolveCompositionSrc(projectDir, srcPath);
7788
- if (filePath === null) continue;
7794
+ if (filePath === null || isPrivateCompositionFile(projectDir, filePath)) continue;
7789
7795
  if (visited.has(filePath)) {
7790
7796
  continue;
7791
7797
  }
@@ -7982,7 +7988,7 @@ function inlineSubCompositions(html, subCompositions, projectDir, variableOverri
7982
7988
  let compHtml = subCompositions.get(srcPath) || null;
7983
7989
  if (!compHtml) {
7984
7990
  const filePath = resolveCompositionSrc(projectDir, srcPath);
7985
- const read = filePath ? readProjectFile(filePath) : null;
7991
+ const read = filePath && !isPrivateCompositionFile(projectDir, filePath) ? readProjectFile(filePath) : null;
7986
7992
  if (read?.kind === "file") {
7987
7993
  compHtml = rewriteUnresolvableGsapToCdn(read.text, projectDir, srcPath);
7988
7994
  }
@@ -6485,6 +6485,7 @@ import {
6485
6485
  readTextFile,
6486
6486
  resolveCompositionSrc
6487
6487
  } from "@hyperframes/parsers/asset-resolution";
6488
+ import { isPrivateFileUnder, isVcsOrSecretPath } from "@hyperframes/core/safe-path";
6488
6489
 
6489
6490
  // src/services/renderMediaCollector.ts
6490
6491
  import { parseHTML as parseHTML2 } from "linkedom";
@@ -7482,6 +7483,7 @@ function normalizeCompositionSrcs(html, projectDir) {
7482
7483
  return `${name}${quote}${relative2(projectDir, file).split(sep2).join("/")}${quote}`;
7483
7484
  });
7484
7485
  }
7486
+ var isPrivateCompositionFile = (projectDir, filePath) => isPrivateFileUnder(projectDir, filePath, isVcsOrSecretPath);
7485
7487
  function assertSubCompositionsUsable(html, projectDir, visited = /* @__PURE__ */ new Set()) {
7486
7488
  const { document: document2 } = parseHTML5(html);
7487
7489
  const hosts = [...document2.querySelectorAll("[data-composition-src]")];
@@ -7495,6 +7497,10 @@ function assertSubCompositionsUsable(html, projectDir, visited = /* @__PURE__ */
7495
7497
  problems.push({ srcPath, detail: "it is outside the project folder" });
7496
7498
  continue;
7497
7499
  }
7500
+ if (isPrivateCompositionFile(projectDir, filePath)) {
7501
+ problems.push({ srcPath, detail: "it is git metadata or an env file" });
7502
+ continue;
7503
+ }
7498
7504
  if (visited.has(filePath)) continue;
7499
7505
  const read = readProjectFile(filePath);
7500
7506
  if (read.kind === "missing") {
@@ -7798,7 +7804,7 @@ async function parseSubCompositions(html, projectDir, downloadDir, visited = /*
7798
7804
  const srcPath = el.getAttribute("data-composition-src");
7799
7805
  if (!srcPath) continue;
7800
7806
  const filePath = resolveCompositionSrc(projectDir, srcPath);
7801
- if (filePath === null) continue;
7807
+ if (filePath === null || isPrivateCompositionFile(projectDir, filePath)) continue;
7802
7808
  if (visited.has(filePath)) {
7803
7809
  continue;
7804
7810
  }
@@ -7995,7 +8001,7 @@ function inlineSubCompositions(html, subCompositions, projectDir, variableOverri
7995
8001
  let compHtml = subCompositions.get(srcPath) || null;
7996
8002
  if (!compHtml) {
7997
8003
  const filePath = resolveCompositionSrc(projectDir, srcPath);
7998
- const read = filePath ? readProjectFile(filePath) : null;
8004
+ const read = filePath && !isPrivateCompositionFile(projectDir, filePath) ? readProjectFile(filePath) : null;
7999
8005
  if (read?.kind === "file") {
8000
8006
  compHtml = rewriteUnresolvableGsapToCdn(read.text, projectDir, srcPath);
8001
8007
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperframes/producer",
3
- "version": "0.9.34",
3
+ "version": "0.9.35",
4
4
  "description": "HTML-to-video rendering engine using Chrome's BeginFrame API",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,11 +35,11 @@
35
35
  "postcss": "^8.4.0",
36
36
  "puppeteer": "~25.11.0",
37
37
  "puppeteer-core": "^25.11.0",
38
- "@hyperframes/core": "0.9.34",
39
- "@hyperframes/lint": "0.9.34",
40
- "@hyperframes/parsers": "0.9.34",
41
- "@hyperframes/studio-server": "0.9.34",
42
- "@hyperframes/engine": "0.9.34"
38
+ "@hyperframes/core": "0.9.35",
39
+ "@hyperframes/engine": "0.9.35",
40
+ "@hyperframes/lint": "0.9.35",
41
+ "@hyperframes/parsers": "0.9.35",
42
+ "@hyperframes/studio-server": "0.9.35"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/node": "^25.0.10",
@@ -48,7 +48,7 @@
48
48
  "tsx": "^4.21.0",
49
49
  "typescript": "^5.7.2",
50
50
  "vitest": "^4.1.11",
51
- "@hyperframes/aws-lambda": "0.9.34"
51
+ "@hyperframes/aws-lambda": "0.9.35"
52
52
  },
53
53
  "engines": {
54
54
  "node": ">=22"