@hyperframes/producer 0.9.56 → 0.9.58
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/distributed.js +77 -34
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +67 -67
- package/dist/index.js +75 -28
- package/dist/logger.d.ts +1 -1
- package/dist/public-server.js +68 -25
- package/dist/services/assetMediaType.d.ts +1 -1
- package/package.json +7 -7
package/dist/public-server.js
CHANGED
|
@@ -401,7 +401,7 @@ import { join as join2, extname, resolve as resolve2, sep as sep2 } from "node:p
|
|
|
401
401
|
import { injectScriptsAtHeadStart, injectScriptsIntoHtml } from "@hyperframes/core/compiler";
|
|
402
402
|
import { injectTagsAtHeadStart } from "@hyperframes/core/compiler/html-document";
|
|
403
403
|
import { PREVIEW_FOR_ANOTHER_SITE_META } from "@hyperframes/core/studio-preview-mark";
|
|
404
|
-
import { fpsToNumber } from "@hyperframes/core";
|
|
404
|
+
import { fpsToNumber, terminalText as terminalText2 } from "@hyperframes/core";
|
|
405
405
|
import { isPrivateFileUnder, isStudioPrivatePath } from "@hyperframes/core/safe-path";
|
|
406
406
|
import { stripSdrPngColourTags } from "@hyperframes/core/compiler/png-colour-tags";
|
|
407
407
|
import { openRangeEnd } from "@hyperframes/studio-server/media-range";
|
|
@@ -492,6 +492,7 @@ function getHfEarlyStub() {
|
|
|
492
492
|
}
|
|
493
493
|
|
|
494
494
|
// src/logger.ts
|
|
495
|
+
import { terminalText } from "@hyperframes/core";
|
|
495
496
|
var LOG_LEVEL_PRIORITY = {
|
|
496
497
|
error: 0,
|
|
497
498
|
warn: 1,
|
|
@@ -501,26 +502,26 @@ var LOG_LEVEL_PRIORITY = {
|
|
|
501
502
|
function createConsoleLogger(level = "info") {
|
|
502
503
|
const threshold = LOG_LEVEL_PRIORITY[level];
|
|
503
504
|
const shouldLog = (msgLevel) => LOG_LEVEL_PRIORITY[msgLevel] <= threshold;
|
|
504
|
-
const formatMeta = (meta) => meta ? ` ${JSON.stringify(meta)}` : "";
|
|
505
|
+
const formatMeta = (meta) => meta ? ` ${terminalText(JSON.stringify(meta))}` : "";
|
|
505
506
|
return {
|
|
506
507
|
error(message, meta) {
|
|
507
508
|
if (shouldLog("error")) {
|
|
508
|
-
console.error(`[ERROR] ${message}${formatMeta(meta)}`);
|
|
509
|
+
console.error(`[ERROR] ${terminalText(message)}${formatMeta(meta)}`);
|
|
509
510
|
}
|
|
510
511
|
},
|
|
511
512
|
warn(message, meta) {
|
|
512
513
|
if (shouldLog("warn")) {
|
|
513
|
-
console.warn(`[WARN] ${message}${formatMeta(meta)}`);
|
|
514
|
+
console.warn(`[WARN] ${terminalText(message)}${formatMeta(meta)}`);
|
|
514
515
|
}
|
|
515
516
|
},
|
|
516
517
|
info(message, meta) {
|
|
517
518
|
if (shouldLog("info")) {
|
|
518
|
-
console.error(`[INFO] ${message}${formatMeta(meta)}`);
|
|
519
|
+
console.error(`[INFO] ${terminalText(message)}${formatMeta(meta)}`);
|
|
519
520
|
}
|
|
520
521
|
},
|
|
521
522
|
debug(message, meta) {
|
|
522
523
|
if (shouldLog("debug")) {
|
|
523
|
-
console.error(`[DEBUG] ${message}${formatMeta(meta)}`);
|
|
524
|
+
console.error(`[DEBUG] ${terminalText(message)}${formatMeta(meta)}`);
|
|
524
525
|
}
|
|
525
526
|
},
|
|
526
527
|
isLevelEnabled(msgLevel) {
|
|
@@ -1169,7 +1170,7 @@ function createFileServer(options) {
|
|
|
1169
1170
|
const headScripts = options.headScripts ?? [getVerifiedHyperframeRuntimeSource()];
|
|
1170
1171
|
const bodyScripts = options.bodyScripts ?? [buildRenderModeScript(options.fps), HF_BRIDGE_SCRIPT];
|
|
1171
1172
|
const app = new Hono();
|
|
1172
|
-
const warnLeftOut = (line) => console.warn(`[FileServer] ${line}`);
|
|
1173
|
+
const warnLeftOut = (line) => console.warn(`[FileServer] ${terminalText2(line)}`);
|
|
1173
1174
|
let listeningPort = -1;
|
|
1174
1175
|
app.use(async function loadEachFileOnlyAsItsNamedType(c, next) {
|
|
1175
1176
|
await next();
|
|
@@ -1193,7 +1194,7 @@ function createFileServer(options) {
|
|
|
1193
1194
|
}
|
|
1194
1195
|
if (!file) {
|
|
1195
1196
|
if (!/favicon\.ico$/i.test(requestPath)) {
|
|
1196
|
-
console.warn(`[FileServer] 404 Not Found: ${requestPath}`);
|
|
1197
|
+
console.warn(`[FileServer] 404 Not Found: ${terminalText2(requestPath)}`);
|
|
1197
1198
|
}
|
|
1198
1199
|
return c.text("Not found", 404);
|
|
1199
1200
|
}
|
|
@@ -1431,7 +1432,8 @@ import {
|
|
|
1431
1432
|
import { basename as basename2, dirname as dirname2, isAbsolute, join as join3, relative, resolve as resolve3 } from "node:path";
|
|
1432
1433
|
import {
|
|
1433
1434
|
CANVAS_DIMENSIONS,
|
|
1434
|
-
checkOutputResolutionCompatibility
|
|
1435
|
+
checkOutputResolutionCompatibility,
|
|
1436
|
+
terminalText as terminalText3
|
|
1435
1437
|
} from "@hyperframes/core";
|
|
1436
1438
|
import {
|
|
1437
1439
|
mediaIdPathSegment
|
|
@@ -1476,7 +1478,7 @@ function writeCompiledArtifacts(compiled, workDir, includeSummary) {
|
|
|
1476
1478
|
for (const [srcPath, html] of compiled.subCompositions) {
|
|
1477
1479
|
const outPath = join3(compileDir, srcPath);
|
|
1478
1480
|
if (!isPathInside(outPath, compileDir)) {
|
|
1479
|
-
console.warn(`[Render] Skipping sub-composition with unsafe path: ${srcPath}`);
|
|
1481
|
+
console.warn(`[Render] Skipping sub-composition with unsafe path: ${terminalText3(srcPath)}`);
|
|
1480
1482
|
continue;
|
|
1481
1483
|
}
|
|
1482
1484
|
mkdirSync(dirname2(outPath), { recursive: true });
|
|
@@ -1485,7 +1487,9 @@ function writeCompiledArtifacts(compiled, workDir, includeSummary) {
|
|
|
1485
1487
|
for (const [relativePath, absolutePath] of compiled.externalAssets) {
|
|
1486
1488
|
const outPath = resolve3(join3(compileDir, relativePath));
|
|
1487
1489
|
if (!isPathInside(outPath, compileDir)) {
|
|
1488
|
-
console.warn(
|
|
1490
|
+
console.warn(
|
|
1491
|
+
`[Render] Skipping external asset with unsafe path: ${terminalText3(relativePath)}`
|
|
1492
|
+
);
|
|
1489
1493
|
continue;
|
|
1490
1494
|
}
|
|
1491
1495
|
mkdirSync(dirname2(outPath), { recursive: true });
|
|
@@ -3384,6 +3388,7 @@ import {
|
|
|
3384
3388
|
resolveProjectRelativeSrc,
|
|
3385
3389
|
resolveVideoExtractionWindow,
|
|
3386
3390
|
runFfmpeg,
|
|
3391
|
+
urlInputArgs,
|
|
3387
3392
|
videoStartOnMediaTimeline
|
|
3388
3393
|
} from "@hyperframes/engine";
|
|
3389
3394
|
import { fpsToFfmpegArg, fpsToNumber as fpsToNumber3 } from "@hyperframes/core";
|
|
@@ -3676,7 +3681,15 @@ function hdrWindowFrames(frameSize, windowBytes) {
|
|
|
3676
3681
|
return Math.max(8, Math.floor(windowBytes / frameSize));
|
|
3677
3682
|
}
|
|
3678
3683
|
async function probeFirstTick(srcPath, mediaStart, fps, runFfmpegImpl, abortSignal) {
|
|
3679
|
-
const args = [
|
|
3684
|
+
const args = [
|
|
3685
|
+
...urlInputArgs(srcPath),
|
|
3686
|
+
"-ss",
|
|
3687
|
+
String(mediaStart),
|
|
3688
|
+
"-i",
|
|
3689
|
+
srcPath,
|
|
3690
|
+
"-frames:v",
|
|
3691
|
+
"1"
|
|
3692
|
+
];
|
|
3680
3693
|
const result = await runFfmpegImpl([...args, ...["-vf", "showinfo", "-f", "null", "-"]], {
|
|
3681
3694
|
signal: abortSignal
|
|
3682
3695
|
});
|
|
@@ -3750,6 +3763,7 @@ async function extractHdrVideoFrames(args) {
|
|
|
3750
3763
|
// Decode before seeking for the one-frame path. Input-side seeking can
|
|
3751
3764
|
// return zero frames for valid unindexed/negative-base transports.
|
|
3752
3765
|
[
|
|
3766
|
+
...urlInputArgs(srcPath),
|
|
3753
3767
|
"-i",
|
|
3754
3768
|
srcPath,
|
|
3755
3769
|
"-ss",
|
|
@@ -3834,6 +3848,7 @@ function hdrWindowFfmpegArgs(a) {
|
|
|
3834
3848
|
const filters = [`fps=${a.fpsArg}:start_time=${(a.firstTick / a.fps).toFixed(6)}`, a.scale];
|
|
3835
3849
|
if (trim > 0) filters.push(`trim=start_frame=${trim}`);
|
|
3836
3850
|
return [
|
|
3851
|
+
...urlInputArgs(a.srcPath),
|
|
3837
3852
|
...["-ss", (a.ffmpegSeek + seekFrame / a.fps).toFixed(6), "-i", a.srcPath],
|
|
3838
3853
|
...["-vf", filters.join(","), "-frames:v", String(a.frames), "-fps_mode", "passthrough"]
|
|
3839
3854
|
];
|
|
@@ -6909,7 +6924,8 @@ import {
|
|
|
6909
6924
|
rewriteAssetPath,
|
|
6910
6925
|
rewriteAssetPaths,
|
|
6911
6926
|
rewriteCssAssetUrls,
|
|
6912
|
-
rewriteInlineStyleAssetUrls
|
|
6927
|
+
rewriteInlineStyleAssetUrls,
|
|
6928
|
+
terminalText as terminalText4
|
|
6913
6929
|
} from "@hyperframes/core";
|
|
6914
6930
|
import { MAX_AUDIO_GAIN } from "@hyperframes/core/audio-gain";
|
|
6915
6931
|
import { CAPTURE_CANVAS_SELECTOR } from "@hyperframes/core/html-in-canvas";
|
|
@@ -7120,6 +7136,7 @@ function placeAudio(audio, window2) {
|
|
|
7120
7136
|
import {
|
|
7121
7137
|
analyzeKeyframeIntervals,
|
|
7122
7138
|
assertMediaPayload,
|
|
7139
|
+
isPrivateUnderAssetRoots as isPrivateUnderAssetRoots3,
|
|
7123
7140
|
NotMediaPayloadError as NotMediaPayloadError2,
|
|
7124
7141
|
parseMasterFxChain,
|
|
7125
7142
|
probeMediaProfile as probeMediaProfile2
|
|
@@ -7147,7 +7164,13 @@ import { copyFileSync as copyFileSync2, existsSync as existsSync9, mkdirSync as
|
|
|
7147
7164
|
import { dirname as dirname6, isAbsolute as isAbsolute2, join as join16, resolve as resolve5 } from "node:path";
|
|
7148
7165
|
import { parseHTML as parseHTML3 } from "linkedom";
|
|
7149
7166
|
import { parseAnimatedGifMetadata } from "@hyperframes/core";
|
|
7150
|
-
import {
|
|
7167
|
+
import {
|
|
7168
|
+
DEFAULT_VP9_CPU_USED,
|
|
7169
|
+
isPrivateUnderAssetRoots,
|
|
7170
|
+
runFfmpeg as runFfmpeg2,
|
|
7171
|
+
renameWithRetry as renameWithRetry3,
|
|
7172
|
+
urlInputArgs as urlInputArgs2
|
|
7173
|
+
} from "@hyperframes/engine";
|
|
7151
7174
|
import { namesAnotherNetworkRoot } from "@hyperframes/parsers/asset-resolution";
|
|
7152
7175
|
var PREPARED_GIF_SUBDIR = "_animated_gif";
|
|
7153
7176
|
var CACHE_SCHEMA = "hfgif-v1";
|
|
@@ -7190,7 +7213,7 @@ function resolveLocalImageSourcePath(src, options) {
|
|
|
7190
7213
|
isAbsolute2(basePath) ? basePath : resolve5(options.projectDir, projectRelative),
|
|
7191
7214
|
resolve5(options.downloadDir, normalizedBase)
|
|
7192
7215
|
];
|
|
7193
|
-
const allowed = (candidate) => !namesAnotherNetworkRoot(options.projectDir, candidate) && (!escapesAssetRoot(candidate, options.assetRoot) && outsideAssetRefusal(options.projectDir, candidate) !== "blocklisted" || !escapesAssetRoot(candidate, options.downloadDir));
|
|
7216
|
+
const allowed = (candidate) => !namesAnotherNetworkRoot(options.projectDir, candidate) && !isPrivateUnderAssetRoots(candidate, [options.projectDir, options.downloadDir]) && (!escapesAssetRoot(candidate, options.assetRoot) && outsideAssetRefusal(options.projectDir, candidate) !== "blocklisted" || !escapesAssetRoot(candidate, options.downloadDir));
|
|
7194
7217
|
return candidates.find((candidate) => allowed(candidate) && existsSync9(candidate)) ?? null;
|
|
7195
7218
|
}
|
|
7196
7219
|
function isUsableFile(path) {
|
|
@@ -7259,6 +7282,7 @@ function buildAnimatedGifTranscodeArgs(input) {
|
|
|
7259
7282
|
args.push(
|
|
7260
7283
|
"-ignore_loop",
|
|
7261
7284
|
"1",
|
|
7285
|
+
...urlInputArgs2(input.inputPath),
|
|
7262
7286
|
"-i",
|
|
7263
7287
|
input.inputPath,
|
|
7264
7288
|
"-an",
|
|
@@ -7464,7 +7488,7 @@ import {
|
|
|
7464
7488
|
} from "node:fs";
|
|
7465
7489
|
import { dirname as dirname7, join as join17, resolve as resolve6 } from "node:path";
|
|
7466
7490
|
import { parseHTML as parseHTML4 } from "linkedom";
|
|
7467
|
-
import { renameWithRetry as renameWithRetry4, runFfmpeg as runFfmpeg3, runFfprobe } from "@hyperframes/engine";
|
|
7491
|
+
import { renameWithRetry as renameWithRetry4, runFfmpeg as runFfmpeg3, runFfprobe, urlInputArgs as urlInputArgs3 } from "@hyperframes/engine";
|
|
7468
7492
|
|
|
7469
7493
|
// src/services/heifRotation.ts
|
|
7470
7494
|
function* boxes(buf, start, end) {
|
|
@@ -7663,6 +7687,7 @@ async function convertHeifToJpeg(request) {
|
|
|
7663
7687
|
"-hide_banner",
|
|
7664
7688
|
"-loglevel",
|
|
7665
7689
|
"error",
|
|
7690
|
+
...urlInputArgs3(request.inputPath),
|
|
7666
7691
|
"-i",
|
|
7667
7692
|
request.inputPath,
|
|
7668
7693
|
...mapArgs,
|
|
@@ -7786,7 +7811,9 @@ import {
|
|
|
7786
7811
|
fingerprintElementId,
|
|
7787
7812
|
isHttpUrl as isHttpUrl2,
|
|
7788
7813
|
isInsideAssetRoots,
|
|
7814
|
+
isNotImagePayload,
|
|
7789
7815
|
isNotMediaPayload,
|
|
7816
|
+
isPrivateUnderAssetRoots as isPrivateUnderAssetRoots2,
|
|
7790
7817
|
playlistLeavesItsFolder,
|
|
7791
7818
|
NotMediaPayloadError,
|
|
7792
7819
|
probeMediaProfile,
|
|
@@ -7841,6 +7868,10 @@ function dropMediaOutsideProject(input) {
|
|
|
7841
7868
|
const staysInside = ({ id, src }) => {
|
|
7842
7869
|
if (!src || isHttpUrl2(src)) return true;
|
|
7843
7870
|
const path = resolveProjectRelativeSrc3(src, projectDir, compiledDir);
|
|
7871
|
+
if (isPrivateUnderAssetRoots2(path, roots)) {
|
|
7872
|
+
log.warn(`[Render] Media "${id}" source is missing: it is a private project file`, { src });
|
|
7873
|
+
return false;
|
|
7874
|
+
}
|
|
7844
7875
|
if (isInsideAssetRoots(path, roots)) return true;
|
|
7845
7876
|
if (input.allowOutsideProjectAssets) {
|
|
7846
7877
|
const refusal = outsideAssetRefusal(projectDir, path);
|
|
@@ -7857,6 +7888,8 @@ function dropMediaOutsideProject(input) {
|
|
|
7857
7888
|
async function notMediaReferences(path, references) {
|
|
7858
7889
|
const videos = references.filter((ref) => ref.expected === "video");
|
|
7859
7890
|
if (videos.length > 0 && await isNotMediaPayload(path)) return videos;
|
|
7891
|
+
const images = references.filter((ref) => ref.expected === "image");
|
|
7892
|
+
if (images.length > 0 && await isNotImagePayload(path)) return images;
|
|
7860
7893
|
return await playlistLeavesItsFolder(path) ? references : [];
|
|
7861
7894
|
}
|
|
7862
7895
|
async function preflightCompositionAssetMediaTypes(input) {
|
|
@@ -8145,7 +8178,7 @@ function detectShaderTransitionUsage(html) {
|
|
|
8145
8178
|
}
|
|
8146
8179
|
return false;
|
|
8147
8180
|
}
|
|
8148
|
-
async function resolveMediaDuration(src, mediaStart, playbackRate, baseDir, downloadDir, tagName, elementIdentity, log, urlByAbsentLocalPath, probes, assetRoot) {
|
|
8181
|
+
async function resolveMediaDuration(src, mediaStart, playbackRate, projectDir, baseDir, downloadDir, tagName, elementIdentity, log, urlByAbsentLocalPath, probes, assetRoot) {
|
|
8149
8182
|
let filePath = src;
|
|
8150
8183
|
if (isHttpUrl(src)) {
|
|
8151
8184
|
const remoteDir = join19(downloadDir, REMOTE_MEDIA_SUBDIR);
|
|
@@ -8160,7 +8193,9 @@ async function resolveMediaDuration(src, mediaStart, playbackRate, baseDir, down
|
|
|
8160
8193
|
} else {
|
|
8161
8194
|
filePath = decodedUrlPath(src);
|
|
8162
8195
|
if (!filePath.startsWith("/")) filePath = join19(baseDir, filePath);
|
|
8163
|
-
if (escapesAssetRoot(filePath, assetRoot)
|
|
8196
|
+
if (escapesAssetRoot(filePath, assetRoot) || isPrivateUnderAssetRoots3(filePath, [projectDir, downloadDir])) {
|
|
8197
|
+
return { duration: null, resolvedPath: filePath };
|
|
8198
|
+
}
|
|
8164
8199
|
filePath = urlByAbsentLocalPath?.get(filePath) ?? filePath;
|
|
8165
8200
|
if (!isHttpUrl(filePath) && namesAnotherNetworkRoot2(baseDir, filePath)) {
|
|
8166
8201
|
return { duration: null, resolvedPath: filePath };
|
|
@@ -8236,7 +8271,7 @@ function markInferredVariableMediaDurations(html, unresolvedMedia) {
|
|
|
8236
8271
|
}
|
|
8237
8272
|
return changed ? document2.toString() : html;
|
|
8238
8273
|
}
|
|
8239
|
-
async function compileHtmlFile(html, baseDir, downloadDir, log, urlByAbsentLocalPath, probes, assetRoot) {
|
|
8274
|
+
async function compileHtmlFile(html, projectDir, baseDir, downloadDir, log, urlByAbsentLocalPath, probes, assetRoot) {
|
|
8240
8275
|
const { html: staticCompiled, unresolved } = compileTimingAttrs(html);
|
|
8241
8276
|
const mediaUnresolved = unresolved.filter(
|
|
8242
8277
|
(el) => (el.tagName === "video" || el.tagName === "audio") && el.src
|
|
@@ -8248,6 +8283,7 @@ async function compileHtmlFile(html, baseDir, downloadDir, log, urlByAbsentLocal
|
|
|
8248
8283
|
el.src,
|
|
8249
8284
|
el.mediaStart,
|
|
8250
8285
|
el.playbackRate,
|
|
8286
|
+
projectDir,
|
|
8251
8287
|
baseDir,
|
|
8252
8288
|
downloadDir,
|
|
8253
8289
|
el.tagName,
|
|
@@ -8272,6 +8308,7 @@ async function compileHtmlFile(html, baseDir, downloadDir, log, urlByAbsentLocal
|
|
|
8272
8308
|
el.src,
|
|
8273
8309
|
el.mediaStart,
|
|
8274
8310
|
el.playbackRate,
|
|
8311
|
+
projectDir,
|
|
8275
8312
|
baseDir,
|
|
8276
8313
|
downloadDir,
|
|
8277
8314
|
el.tagName,
|
|
@@ -8327,6 +8364,7 @@ async function parseSubCompositions(html, projectDir, downloadDir, visited = /*
|
|
|
8327
8364
|
workItems.map(async (item) => {
|
|
8328
8365
|
const { html: compiledSub } = await compileHtmlFile(
|
|
8329
8366
|
rewriteUnresolvableGsapToCdn(item.rawSubHtml, projectDir, item.srcPath),
|
|
8367
|
+
projectDir,
|
|
8330
8368
|
dirname9(item.filePath),
|
|
8331
8369
|
downloadDir,
|
|
8332
8370
|
void 0,
|
|
@@ -8529,7 +8567,9 @@ function inlineSubCompositions(html, subCompositions, projectDir, variableOverri
|
|
|
8529
8567
|
flattenInnerRoot: prepareFlattenedInnerRoot,
|
|
8530
8568
|
onMissingComposition: (srcPath, reason) => {
|
|
8531
8569
|
console.warn(
|
|
8532
|
-
|
|
8570
|
+
terminalText4(
|
|
8571
|
+
`[Compiler] Skipping sub-composition "${srcPath}": ${reason ?? "the file is missing or empty"}.`
|
|
8572
|
+
)
|
|
8533
8573
|
);
|
|
8534
8574
|
}
|
|
8535
8575
|
}
|
|
@@ -9055,6 +9095,7 @@ async function embedLocalFontFaces(html, projectDir, assetRoot, log = defaultLog
|
|
|
9055
9095
|
embeddedPaths.add(localPath);
|
|
9056
9096
|
continue;
|
|
9057
9097
|
}
|
|
9098
|
+
if (isPrivateCompositionFile(projectDir, absPath)) continue;
|
|
9058
9099
|
const ext = absPath.match(/\.(woff2?|ttf|otf|ttc)$/i)?.[1]?.toLowerCase() ?? "ttf";
|
|
9059
9100
|
try {
|
|
9060
9101
|
if (fileBackedAbsolutePaths.has(absPath)) {
|
|
@@ -9176,6 +9217,7 @@ async function compileForRender(projectDir, htmlPath, downloadDir, options = {})
|
|
|
9176
9217
|
const { html: compiledHtml, unresolvedCompositions } = await compileHtmlFile(
|
|
9177
9218
|
rawHtml,
|
|
9178
9219
|
projectDir,
|
|
9220
|
+
projectDir,
|
|
9179
9221
|
downloadDir,
|
|
9180
9222
|
options.log,
|
|
9181
9223
|
options.urlByAbsentLocalPath,
|
|
@@ -9308,7 +9350,7 @@ async function compileForRender(projectDir, htmlPath, downloadDir, options = {})
|
|
|
9308
9350
|
for (const video of videos) {
|
|
9309
9351
|
if (isHttpUrl(video.src)) continue;
|
|
9310
9352
|
const videoPath = resolve7(projectDir, video.src);
|
|
9311
|
-
if (advised.has(videoPath) || namesAnotherNetworkRoot2(projectDir, videoPath) || !existsSync11(videoPath) || escapesAssetRoot(videoPath, assetRoot))
|
|
9353
|
+
if (advised.has(videoPath) || namesAnotherNetworkRoot2(projectDir, videoPath) || !existsSync11(videoPath) || escapesAssetRoot(videoPath, assetRoot) || isPrivateUnderAssetRoots3(videoPath, [projectDir, downloadDir]))
|
|
9312
9354
|
continue;
|
|
9313
9355
|
advised.add(videoPath);
|
|
9314
9356
|
const reencode = `ffmpeg -i "${video.src}" -c:v libx264 -r 30 -g 30 -keyint_min 30 -movflags +faststart -c:a copy output.mp4`;
|
|
@@ -9938,7 +9980,8 @@ import {
|
|
|
9938
9980
|
readMediaStart as readMediaStart2,
|
|
9939
9981
|
shiftRateLane as shiftRateLane2,
|
|
9940
9982
|
sourceTimeAt as sourceTimeAt3,
|
|
9941
|
-
timeAtSourceTime
|
|
9983
|
+
timeAtSourceTime,
|
|
9984
|
+
terminalText as terminalText5
|
|
9942
9985
|
} from "@hyperframes/core";
|
|
9943
9986
|
import { parseHostVariableValues as parseHostVariableValues2, readDeclaredDefaults as readDeclaredDefaults2 } from "@hyperframes/core/compiler";
|
|
9944
9987
|
import { extractMediaSrcMutations } from "@hyperframes/parsers";
|
|
@@ -10571,7 +10614,7 @@ async function runProbeStage(input) {
|
|
|
10571
10614
|
failures: failedRequests.slice(0, 10)
|
|
10572
10615
|
});
|
|
10573
10616
|
for (const line of failedRequests.slice(0, 5)) {
|
|
10574
|
-
console.warn(`[Render] Asset load failure: ${line}`);
|
|
10617
|
+
console.warn(`[Render] Asset load failure: ${terminalText5(line)}`);
|
|
10575
10618
|
}
|
|
10576
10619
|
}
|
|
10577
10620
|
}
|
|
@@ -10652,7 +10695,7 @@ import {
|
|
|
10652
10695
|
resolveFinalFrameExtractionWindow as resolveFinalFrameExtractionWindow2,
|
|
10653
10696
|
resolveVideoExtractionWindow as resolveVideoExtractionWindow2,
|
|
10654
10697
|
isHttpUrl as isHttpUrl3,
|
|
10655
|
-
|
|
10698
|
+
assetRootsRefusal,
|
|
10656
10699
|
assertPublicHttpsUrl,
|
|
10657
10700
|
downloadToTemp as downloadToTemp2,
|
|
10658
10701
|
resolveRestrictPageNetwork,
|
|
@@ -11085,7 +11128,7 @@ function isPublicHttpsUrl(url) {
|
|
|
11085
11128
|
}
|
|
11086
11129
|
}
|
|
11087
11130
|
function opensLocally(path, assetRoots) {
|
|
11088
|
-
return existsSync13(path) && (!assetRoots ||
|
|
11131
|
+
return existsSync13(path) && (!assetRoots || assetRootsRefusal(path, assetRoots) === null);
|
|
11089
11132
|
}
|
|
11090
11133
|
function localProbeSource(src, input) {
|
|
11091
11134
|
const path = resolveProjectRelativeSrc4(src, input.projectDir, input.compiledDir);
|
|
@@ -24,7 +24,7 @@ interface CompositionMediaAssets {
|
|
|
24
24
|
images: readonly ImageElement[];
|
|
25
25
|
}
|
|
26
26
|
export declare function mediaAssetRoots(projectDir: string, compiledDir: string): string[];
|
|
27
|
-
/** Treats local media outside the project, compiled and download dirs as missing:
|
|
27
|
+
/** Treats local media outside the project, compiled and download dirs, or private there, as missing: none is opened. */
|
|
28
28
|
export declare function dropMediaOutsideProject(input: {
|
|
29
29
|
projectDir: string;
|
|
30
30
|
workDir: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/producer",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.58",
|
|
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/
|
|
39
|
-
"@hyperframes/
|
|
40
|
-
"@hyperframes/
|
|
41
|
-
"@hyperframes/
|
|
42
|
-
"@hyperframes/
|
|
38
|
+
"@hyperframes/core": "0.9.58",
|
|
39
|
+
"@hyperframes/engine": "0.9.58",
|
|
40
|
+
"@hyperframes/lint": "0.9.58",
|
|
41
|
+
"@hyperframes/parsers": "0.9.58",
|
|
42
|
+
"@hyperframes/studio-server": "0.9.58"
|
|
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.58"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|
|
54
54
|
"node": ">=22"
|