@hyperframes/producer 0.9.89 → 0.9.91
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/compileWorker.js +12 -3
- package/dist/distributed.js +12 -3
- package/dist/index.js +12 -3
- package/dist/public-server.js +12 -3
- package/package.json +7 -7
package/dist/compileWorker.js
CHANGED
|
@@ -2769,7 +2769,16 @@ function localizeFontFaceUrls(html, downloadDir2, assets) {
|
|
|
2769
2769
|
"Remote font download failed",
|
|
2770
2770
|
"Localized remote font face(s)",
|
|
2771
2771
|
assets,
|
|
2772
|
-
(h, url, relPath) =>
|
|
2772
|
+
(h, url, relPath) => replaceMatches(
|
|
2773
|
+
h,
|
|
2774
|
+
styleBlockMatches(h),
|
|
2775
|
+
(style, css) => replaceInner(
|
|
2776
|
+
style,
|
|
2777
|
+
css,
|
|
2778
|
+
"</style>".length,
|
|
2779
|
+
css.replaceAll(`url(${url})`, `url("${relPath}")`)
|
|
2780
|
+
)
|
|
2781
|
+
)
|
|
2773
2782
|
);
|
|
2774
2783
|
}
|
|
2775
2784
|
var MAX_LOCAL_FONT_DATA_URI_BYTES = 5 * 1024 * 1024;
|
|
@@ -2949,7 +2958,7 @@ function rebaseDirectEntryAssetPaths(html, projectDir2, htmlPath2, budget) {
|
|
|
2949
2958
|
return document2.toString();
|
|
2950
2959
|
}
|
|
2951
2960
|
var MAX_VARIABLE_MEDIA_SRC_BYTES = 8 * 1024;
|
|
2952
|
-
var
|
|
2961
|
+
var MEDIA_SRC_NON_URL_CHARS = /[\u0000-\u001f\u007f<>]/;
|
|
2953
2962
|
function bindVariableMediaSources(html, variables, budget, log2) {
|
|
2954
2963
|
if (!html.includes("data-var-src")) return html;
|
|
2955
2964
|
const { document: document2 } = parseHTML4(html);
|
|
@@ -2964,7 +2973,7 @@ function bindVariableMediaSources(html, variables, budget, log2) {
|
|
|
2964
2973
|
const bound = boundMediaSrc(el, values);
|
|
2965
2974
|
if (bound === null) continue;
|
|
2966
2975
|
const src = bound.trim();
|
|
2967
|
-
if (src.length > MAX_VARIABLE_MEDIA_SRC_BYTES ||
|
|
2976
|
+
if (src.length > MAX_VARIABLE_MEDIA_SRC_BYTES || MEDIA_SRC_NON_URL_CHARS.test(src)) {
|
|
2968
2977
|
log2?.warn("[Compiler] Refused a variable media source that cannot be a URL", {
|
|
2969
2978
|
length: src.length
|
|
2970
2979
|
});
|
package/dist/distributed.js
CHANGED
|
@@ -5027,7 +5027,16 @@ function localizeFontFaceUrls(html, downloadDir, assets) {
|
|
|
5027
5027
|
"Remote font download failed",
|
|
5028
5028
|
"Localized remote font face(s)",
|
|
5029
5029
|
assets,
|
|
5030
|
-
(h, url, relPath) =>
|
|
5030
|
+
(h, url, relPath) => replaceMatches(
|
|
5031
|
+
h,
|
|
5032
|
+
styleBlockMatches(h),
|
|
5033
|
+
(style, css) => replaceInner(
|
|
5034
|
+
style,
|
|
5035
|
+
css,
|
|
5036
|
+
"</style>".length,
|
|
5037
|
+
css.replaceAll(`url(${url})`, `url("${relPath}")`)
|
|
5038
|
+
)
|
|
5039
|
+
)
|
|
5031
5040
|
);
|
|
5032
5041
|
}
|
|
5033
5042
|
var MAX_LOCAL_FONT_DATA_URI_BYTES = 5 * 1024 * 1024;
|
|
@@ -5207,7 +5216,7 @@ function rebaseDirectEntryAssetPaths(html, projectDir, htmlPath, budget) {
|
|
|
5207
5216
|
return document2.toString();
|
|
5208
5217
|
}
|
|
5209
5218
|
var MAX_VARIABLE_MEDIA_SRC_BYTES = 8 * 1024;
|
|
5210
|
-
var
|
|
5219
|
+
var MEDIA_SRC_NON_URL_CHARS = /[\u0000-\u001f\u007f<>]/;
|
|
5211
5220
|
function bindVariableMediaSources(html, variables, budget, log) {
|
|
5212
5221
|
if (!html.includes("data-var-src")) return html;
|
|
5213
5222
|
const { document: document2 } = parseHTML5(html);
|
|
@@ -5222,7 +5231,7 @@ function bindVariableMediaSources(html, variables, budget, log) {
|
|
|
5222
5231
|
const bound = boundMediaSrc(el, values);
|
|
5223
5232
|
if (bound === null) continue;
|
|
5224
5233
|
const src = bound.trim();
|
|
5225
|
-
if (src.length > MAX_VARIABLE_MEDIA_SRC_BYTES ||
|
|
5234
|
+
if (src.length > MAX_VARIABLE_MEDIA_SRC_BYTES || MEDIA_SRC_NON_URL_CHARS.test(src)) {
|
|
5226
5235
|
log?.warn("[Compiler] Refused a variable media source that cannot be a URL", {
|
|
5227
5236
|
length: src.length
|
|
5228
5237
|
});
|
package/dist/index.js
CHANGED
|
@@ -9709,7 +9709,16 @@ function localizeFontFaceUrls(html, downloadDir, assets) {
|
|
|
9709
9709
|
"Remote font download failed",
|
|
9710
9710
|
"Localized remote font face(s)",
|
|
9711
9711
|
assets,
|
|
9712
|
-
(h, url, relPath) =>
|
|
9712
|
+
(h, url, relPath) => replaceMatches(
|
|
9713
|
+
h,
|
|
9714
|
+
styleBlockMatches(h),
|
|
9715
|
+
(style, css) => replaceInner(
|
|
9716
|
+
style,
|
|
9717
|
+
css,
|
|
9718
|
+
"</style>".length,
|
|
9719
|
+
css.replaceAll(`url(${url})`, `url("${relPath}")`)
|
|
9720
|
+
)
|
|
9721
|
+
)
|
|
9713
9722
|
);
|
|
9714
9723
|
}
|
|
9715
9724
|
var MAX_LOCAL_FONT_DATA_URI_BYTES = 5 * 1024 * 1024;
|
|
@@ -9889,7 +9898,7 @@ function rebaseDirectEntryAssetPaths(html, projectDir, htmlPath, budget) {
|
|
|
9889
9898
|
return document2.toString();
|
|
9890
9899
|
}
|
|
9891
9900
|
var MAX_VARIABLE_MEDIA_SRC_BYTES = 8 * 1024;
|
|
9892
|
-
var
|
|
9901
|
+
var MEDIA_SRC_NON_URL_CHARS = /[\u0000-\u001f\u007f<>]/;
|
|
9893
9902
|
function bindVariableMediaSources(html, variables, budget, log) {
|
|
9894
9903
|
if (!html.includes("data-var-src")) return html;
|
|
9895
9904
|
const { document: document2 } = parseHTML5(html);
|
|
@@ -9904,7 +9913,7 @@ function bindVariableMediaSources(html, variables, budget, log) {
|
|
|
9904
9913
|
const bound = boundMediaSrc(el, values);
|
|
9905
9914
|
if (bound === null) continue;
|
|
9906
9915
|
const src = bound.trim();
|
|
9907
|
-
if (src.length > MAX_VARIABLE_MEDIA_SRC_BYTES ||
|
|
9916
|
+
if (src.length > MAX_VARIABLE_MEDIA_SRC_BYTES || MEDIA_SRC_NON_URL_CHARS.test(src)) {
|
|
9908
9917
|
log?.warn("[Compiler] Refused a variable media source that cannot be a URL", {
|
|
9909
9918
|
length: src.length
|
|
9910
9919
|
});
|
package/dist/public-server.js
CHANGED
|
@@ -9727,7 +9727,16 @@ function localizeFontFaceUrls(html, downloadDir, assets) {
|
|
|
9727
9727
|
"Remote font download failed",
|
|
9728
9728
|
"Localized remote font face(s)",
|
|
9729
9729
|
assets,
|
|
9730
|
-
(h, url, relPath) =>
|
|
9730
|
+
(h, url, relPath) => replaceMatches(
|
|
9731
|
+
h,
|
|
9732
|
+
styleBlockMatches(h),
|
|
9733
|
+
(style, css) => replaceInner(
|
|
9734
|
+
style,
|
|
9735
|
+
css,
|
|
9736
|
+
"</style>".length,
|
|
9737
|
+
css.replaceAll(`url(${url})`, `url("${relPath}")`)
|
|
9738
|
+
)
|
|
9739
|
+
)
|
|
9731
9740
|
);
|
|
9732
9741
|
}
|
|
9733
9742
|
var MAX_LOCAL_FONT_DATA_URI_BYTES = 5 * 1024 * 1024;
|
|
@@ -9907,7 +9916,7 @@ function rebaseDirectEntryAssetPaths(html, projectDir, htmlPath, budget) {
|
|
|
9907
9916
|
return document2.toString();
|
|
9908
9917
|
}
|
|
9909
9918
|
var MAX_VARIABLE_MEDIA_SRC_BYTES = 8 * 1024;
|
|
9910
|
-
var
|
|
9919
|
+
var MEDIA_SRC_NON_URL_CHARS = /[\u0000-\u001f\u007f<>]/;
|
|
9911
9920
|
function bindVariableMediaSources(html, variables, budget, log) {
|
|
9912
9921
|
if (!html.includes("data-var-src")) return html;
|
|
9913
9922
|
const { document: document2 } = parseHTML5(html);
|
|
@@ -9922,7 +9931,7 @@ function bindVariableMediaSources(html, variables, budget, log) {
|
|
|
9922
9931
|
const bound = boundMediaSrc(el, values);
|
|
9923
9932
|
if (bound === null) continue;
|
|
9924
9933
|
const src = bound.trim();
|
|
9925
|
-
if (src.length > MAX_VARIABLE_MEDIA_SRC_BYTES ||
|
|
9934
|
+
if (src.length > MAX_VARIABLE_MEDIA_SRC_BYTES || MEDIA_SRC_NON_URL_CHARS.test(src)) {
|
|
9926
9935
|
log?.warn("[Compiler] Refused a variable media source that cannot be a URL", {
|
|
9927
9936
|
length: src.length
|
|
9928
9937
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/producer",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.91",
|
|
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.13.0",
|
|
37
37
|
"puppeteer-core": "^25.13.0",
|
|
38
|
-
"@hyperframes/core": "0.9.
|
|
39
|
-
"@hyperframes/
|
|
40
|
-
"@hyperframes/
|
|
41
|
-
"@hyperframes/
|
|
42
|
-
"@hyperframes/parsers": "0.9.
|
|
38
|
+
"@hyperframes/core": "0.9.91",
|
|
39
|
+
"@hyperframes/engine": "0.9.91",
|
|
40
|
+
"@hyperframes/lint": "0.9.91",
|
|
41
|
+
"@hyperframes/studio-server": "0.9.91",
|
|
42
|
+
"@hyperframes/parsers": "0.9.91"
|
|
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.12",
|
|
51
|
-
"@hyperframes/aws-lambda": "0.9.
|
|
51
|
+
"@hyperframes/aws-lambda": "0.9.91"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|
|
54
54
|
"node": ">=22"
|