@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/index.js
CHANGED
|
@@ -382,7 +382,7 @@ import { join as join2, extname, resolve as resolve2, sep as sep2 } from "node:p
|
|
|
382
382
|
import { injectScriptsAtHeadStart, injectScriptsIntoHtml } from "@hyperframes/core/compiler";
|
|
383
383
|
import { injectTagsAtHeadStart } from "@hyperframes/core/compiler/html-document";
|
|
384
384
|
import { PREVIEW_FOR_ANOTHER_SITE_META } from "@hyperframes/core/studio-preview-mark";
|
|
385
|
-
import { fpsToNumber } from "@hyperframes/core";
|
|
385
|
+
import { fpsToNumber, terminalText as terminalText2 } from "@hyperframes/core";
|
|
386
386
|
import { isPrivateFileUnder, isStudioPrivatePath } from "@hyperframes/core/safe-path";
|
|
387
387
|
import { stripSdrPngColourTags } from "@hyperframes/core/compiler/png-colour-tags";
|
|
388
388
|
import { openRangeEnd } from "@hyperframes/studio-server/media-range";
|
|
@@ -473,6 +473,7 @@ function getHfEarlyStub() {
|
|
|
473
473
|
}
|
|
474
474
|
|
|
475
475
|
// src/logger.ts
|
|
476
|
+
import { terminalText } from "@hyperframes/core";
|
|
476
477
|
var LOG_LEVEL_PRIORITY = {
|
|
477
478
|
error: 0,
|
|
478
479
|
warn: 1,
|
|
@@ -482,26 +483,26 @@ var LOG_LEVEL_PRIORITY = {
|
|
|
482
483
|
function createConsoleLogger(level = "info") {
|
|
483
484
|
const threshold = LOG_LEVEL_PRIORITY[level];
|
|
484
485
|
const shouldLog = (msgLevel) => LOG_LEVEL_PRIORITY[msgLevel] <= threshold;
|
|
485
|
-
const formatMeta = (meta) => meta ? ` ${JSON.stringify(meta)}` : "";
|
|
486
|
+
const formatMeta = (meta) => meta ? ` ${terminalText(JSON.stringify(meta))}` : "";
|
|
486
487
|
return {
|
|
487
488
|
error(message, meta) {
|
|
488
489
|
if (shouldLog("error")) {
|
|
489
|
-
console.error(`[ERROR] ${message}${formatMeta(meta)}`);
|
|
490
|
+
console.error(`[ERROR] ${terminalText(message)}${formatMeta(meta)}`);
|
|
490
491
|
}
|
|
491
492
|
},
|
|
492
493
|
warn(message, meta) {
|
|
493
494
|
if (shouldLog("warn")) {
|
|
494
|
-
console.warn(`[WARN] ${message}${formatMeta(meta)}`);
|
|
495
|
+
console.warn(`[WARN] ${terminalText(message)}${formatMeta(meta)}`);
|
|
495
496
|
}
|
|
496
497
|
},
|
|
497
498
|
info(message, meta) {
|
|
498
499
|
if (shouldLog("info")) {
|
|
499
|
-
console.error(`[INFO] ${message}${formatMeta(meta)}`);
|
|
500
|
+
console.error(`[INFO] ${terminalText(message)}${formatMeta(meta)}`);
|
|
500
501
|
}
|
|
501
502
|
},
|
|
502
503
|
debug(message, meta) {
|
|
503
504
|
if (shouldLog("debug")) {
|
|
504
|
-
console.error(`[DEBUG] ${message}${formatMeta(meta)}`);
|
|
505
|
+
console.error(`[DEBUG] ${terminalText(message)}${formatMeta(meta)}`);
|
|
505
506
|
}
|
|
506
507
|
},
|
|
507
508
|
isLevelEnabled(msgLevel) {
|
|
@@ -1150,7 +1151,7 @@ function createFileServer(options) {
|
|
|
1150
1151
|
const headScripts = options.headScripts ?? [getVerifiedHyperframeRuntimeSource()];
|
|
1151
1152
|
const bodyScripts = options.bodyScripts ?? [buildRenderModeScript(options.fps), HF_BRIDGE_SCRIPT];
|
|
1152
1153
|
const app = new Hono();
|
|
1153
|
-
const warnLeftOut = (line) => console.warn(`[FileServer] ${line}`);
|
|
1154
|
+
const warnLeftOut = (line) => console.warn(`[FileServer] ${terminalText2(line)}`);
|
|
1154
1155
|
let listeningPort = -1;
|
|
1155
1156
|
app.use(async function loadEachFileOnlyAsItsNamedType(c, next) {
|
|
1156
1157
|
await next();
|
|
@@ -1174,7 +1175,7 @@ function createFileServer(options) {
|
|
|
1174
1175
|
}
|
|
1175
1176
|
if (!file) {
|
|
1176
1177
|
if (!/favicon\.ico$/i.test(requestPath)) {
|
|
1177
|
-
console.warn(`[FileServer] 404 Not Found: ${requestPath}`);
|
|
1178
|
+
console.warn(`[FileServer] 404 Not Found: ${terminalText2(requestPath)}`);
|
|
1178
1179
|
}
|
|
1179
1180
|
return c.text("Not found", 404);
|
|
1180
1181
|
}
|
|
@@ -1415,7 +1416,8 @@ import {
|
|
|
1415
1416
|
import { basename as basename2, dirname as dirname2, isAbsolute, join as join3, relative, resolve as resolve3 } from "node:path";
|
|
1416
1417
|
import {
|
|
1417
1418
|
CANVAS_DIMENSIONS,
|
|
1418
|
-
checkOutputResolutionCompatibility
|
|
1419
|
+
checkOutputResolutionCompatibility,
|
|
1420
|
+
terminalText as terminalText3
|
|
1419
1421
|
} from "@hyperframes/core";
|
|
1420
1422
|
import {
|
|
1421
1423
|
mediaIdPathSegment
|
|
@@ -1460,7 +1462,7 @@ function writeCompiledArtifacts(compiled, workDir, includeSummary) {
|
|
|
1460
1462
|
for (const [srcPath, html] of compiled.subCompositions) {
|
|
1461
1463
|
const outPath = join3(compileDir, srcPath);
|
|
1462
1464
|
if (!isPathInside(outPath, compileDir)) {
|
|
1463
|
-
console.warn(`[Render] Skipping sub-composition with unsafe path: ${srcPath}`);
|
|
1465
|
+
console.warn(`[Render] Skipping sub-composition with unsafe path: ${terminalText3(srcPath)}`);
|
|
1464
1466
|
continue;
|
|
1465
1467
|
}
|
|
1466
1468
|
mkdirSync(dirname2(outPath), { recursive: true });
|
|
@@ -1469,7 +1471,9 @@ function writeCompiledArtifacts(compiled, workDir, includeSummary) {
|
|
|
1469
1471
|
for (const [relativePath, absolutePath] of compiled.externalAssets) {
|
|
1470
1472
|
const outPath = resolve3(join3(compileDir, relativePath));
|
|
1471
1473
|
if (!isPathInside(outPath, compileDir)) {
|
|
1472
|
-
console.warn(
|
|
1474
|
+
console.warn(
|
|
1475
|
+
`[Render] Skipping external asset with unsafe path: ${terminalText3(relativePath)}`
|
|
1476
|
+
);
|
|
1473
1477
|
continue;
|
|
1474
1478
|
}
|
|
1475
1479
|
mkdirSync(dirname2(outPath), { recursive: true });
|
|
@@ -3369,6 +3373,7 @@ import {
|
|
|
3369
3373
|
resolveProjectRelativeSrc,
|
|
3370
3374
|
resolveVideoExtractionWindow,
|
|
3371
3375
|
runFfmpeg,
|
|
3376
|
+
urlInputArgs,
|
|
3372
3377
|
videoStartOnMediaTimeline
|
|
3373
3378
|
} from "@hyperframes/engine";
|
|
3374
3379
|
import { fpsToFfmpegArg, fpsToNumber as fpsToNumber3 } from "@hyperframes/core";
|
|
@@ -3661,7 +3666,15 @@ function hdrWindowFrames(frameSize, windowBytes) {
|
|
|
3661
3666
|
return Math.max(8, Math.floor(windowBytes / frameSize));
|
|
3662
3667
|
}
|
|
3663
3668
|
async function probeFirstTick(srcPath, mediaStart, fps, runFfmpegImpl, abortSignal) {
|
|
3664
|
-
const args = [
|
|
3669
|
+
const args = [
|
|
3670
|
+
...urlInputArgs(srcPath),
|
|
3671
|
+
"-ss",
|
|
3672
|
+
String(mediaStart),
|
|
3673
|
+
"-i",
|
|
3674
|
+
srcPath,
|
|
3675
|
+
"-frames:v",
|
|
3676
|
+
"1"
|
|
3677
|
+
];
|
|
3665
3678
|
const result = await runFfmpegImpl([...args, ...["-vf", "showinfo", "-f", "null", "-"]], {
|
|
3666
3679
|
signal: abortSignal
|
|
3667
3680
|
});
|
|
@@ -3735,6 +3748,7 @@ async function extractHdrVideoFrames(args) {
|
|
|
3735
3748
|
// Decode before seeking for the one-frame path. Input-side seeking can
|
|
3736
3749
|
// return zero frames for valid unindexed/negative-base transports.
|
|
3737
3750
|
[
|
|
3751
|
+
...urlInputArgs(srcPath),
|
|
3738
3752
|
"-i",
|
|
3739
3753
|
srcPath,
|
|
3740
3754
|
"-ss",
|
|
@@ -3819,6 +3833,7 @@ function hdrWindowFfmpegArgs(a) {
|
|
|
3819
3833
|
const filters = [`fps=${a.fpsArg}:start_time=${(a.firstTick / a.fps).toFixed(6)}`, a.scale];
|
|
3820
3834
|
if (trim > 0) filters.push(`trim=start_frame=${trim}`);
|
|
3821
3835
|
return [
|
|
3836
|
+
...urlInputArgs(a.srcPath),
|
|
3822
3837
|
...["-ss", (a.ffmpegSeek + seekFrame / a.fps).toFixed(6), "-i", a.srcPath],
|
|
3823
3838
|
...["-vf", filters.join(","), "-frames:v", String(a.frames), "-fps_mode", "passthrough"]
|
|
3824
3839
|
];
|
|
@@ -6894,7 +6909,8 @@ import {
|
|
|
6894
6909
|
rewriteAssetPath,
|
|
6895
6910
|
rewriteAssetPaths,
|
|
6896
6911
|
rewriteCssAssetUrls,
|
|
6897
|
-
rewriteInlineStyleAssetUrls
|
|
6912
|
+
rewriteInlineStyleAssetUrls,
|
|
6913
|
+
terminalText as terminalText4
|
|
6898
6914
|
} from "@hyperframes/core";
|
|
6899
6915
|
import { MAX_AUDIO_GAIN } from "@hyperframes/core/audio-gain";
|
|
6900
6916
|
import { CAPTURE_CANVAS_SELECTOR } from "@hyperframes/core/html-in-canvas";
|
|
@@ -7105,6 +7121,7 @@ function placeAudio(audio, window2) {
|
|
|
7105
7121
|
import {
|
|
7106
7122
|
analyzeKeyframeIntervals,
|
|
7107
7123
|
assertMediaPayload,
|
|
7124
|
+
isPrivateUnderAssetRoots as isPrivateUnderAssetRoots3,
|
|
7108
7125
|
NotMediaPayloadError as NotMediaPayloadError2,
|
|
7109
7126
|
parseMasterFxChain,
|
|
7110
7127
|
probeMediaProfile as probeMediaProfile2
|
|
@@ -7132,7 +7149,13 @@ import { copyFileSync as copyFileSync2, existsSync as existsSync9, mkdirSync as
|
|
|
7132
7149
|
import { dirname as dirname6, isAbsolute as isAbsolute2, join as join16, resolve as resolve5 } from "node:path";
|
|
7133
7150
|
import { parseHTML as parseHTML3 } from "linkedom";
|
|
7134
7151
|
import { parseAnimatedGifMetadata } from "@hyperframes/core";
|
|
7135
|
-
import {
|
|
7152
|
+
import {
|
|
7153
|
+
DEFAULT_VP9_CPU_USED,
|
|
7154
|
+
isPrivateUnderAssetRoots,
|
|
7155
|
+
runFfmpeg as runFfmpeg2,
|
|
7156
|
+
renameWithRetry as renameWithRetry3,
|
|
7157
|
+
urlInputArgs as urlInputArgs2
|
|
7158
|
+
} from "@hyperframes/engine";
|
|
7136
7159
|
import { namesAnotherNetworkRoot } from "@hyperframes/parsers/asset-resolution";
|
|
7137
7160
|
var PREPARED_GIF_SUBDIR = "_animated_gif";
|
|
7138
7161
|
var CACHE_SCHEMA = "hfgif-v1";
|
|
@@ -7175,7 +7198,7 @@ function resolveLocalImageSourcePath(src, options) {
|
|
|
7175
7198
|
isAbsolute2(basePath) ? basePath : resolve5(options.projectDir, projectRelative),
|
|
7176
7199
|
resolve5(options.downloadDir, normalizedBase)
|
|
7177
7200
|
];
|
|
7178
|
-
const allowed = (candidate) => !namesAnotherNetworkRoot(options.projectDir, candidate) && (!escapesAssetRoot(candidate, options.assetRoot) && outsideAssetRefusal(options.projectDir, candidate) !== "blocklisted" || !escapesAssetRoot(candidate, options.downloadDir));
|
|
7201
|
+
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));
|
|
7179
7202
|
return candidates.find((candidate) => allowed(candidate) && existsSync9(candidate)) ?? null;
|
|
7180
7203
|
}
|
|
7181
7204
|
function isUsableFile(path) {
|
|
@@ -7244,6 +7267,7 @@ function buildAnimatedGifTranscodeArgs(input) {
|
|
|
7244
7267
|
args.push(
|
|
7245
7268
|
"-ignore_loop",
|
|
7246
7269
|
"1",
|
|
7270
|
+
...urlInputArgs2(input.inputPath),
|
|
7247
7271
|
"-i",
|
|
7248
7272
|
input.inputPath,
|
|
7249
7273
|
"-an",
|
|
@@ -7449,7 +7473,7 @@ import {
|
|
|
7449
7473
|
} from "node:fs";
|
|
7450
7474
|
import { dirname as dirname7, join as join17, resolve as resolve6 } from "node:path";
|
|
7451
7475
|
import { parseHTML as parseHTML4 } from "linkedom";
|
|
7452
|
-
import { renameWithRetry as renameWithRetry4, runFfmpeg as runFfmpeg3, runFfprobe } from "@hyperframes/engine";
|
|
7476
|
+
import { renameWithRetry as renameWithRetry4, runFfmpeg as runFfmpeg3, runFfprobe, urlInputArgs as urlInputArgs3 } from "@hyperframes/engine";
|
|
7453
7477
|
|
|
7454
7478
|
// src/services/heifRotation.ts
|
|
7455
7479
|
function* boxes(buf, start, end) {
|
|
@@ -7648,6 +7672,7 @@ async function convertHeifToJpeg(request) {
|
|
|
7648
7672
|
"-hide_banner",
|
|
7649
7673
|
"-loglevel",
|
|
7650
7674
|
"error",
|
|
7675
|
+
...urlInputArgs3(request.inputPath),
|
|
7651
7676
|
"-i",
|
|
7652
7677
|
request.inputPath,
|
|
7653
7678
|
...mapArgs,
|
|
@@ -7771,7 +7796,9 @@ import {
|
|
|
7771
7796
|
fingerprintElementId,
|
|
7772
7797
|
isHttpUrl as isHttpUrl2,
|
|
7773
7798
|
isInsideAssetRoots,
|
|
7799
|
+
isNotImagePayload,
|
|
7774
7800
|
isNotMediaPayload,
|
|
7801
|
+
isPrivateUnderAssetRoots as isPrivateUnderAssetRoots2,
|
|
7775
7802
|
playlistLeavesItsFolder,
|
|
7776
7803
|
NotMediaPayloadError,
|
|
7777
7804
|
probeMediaProfile,
|
|
@@ -7826,6 +7853,10 @@ function dropMediaOutsideProject(input) {
|
|
|
7826
7853
|
const staysInside = ({ id, src }) => {
|
|
7827
7854
|
if (!src || isHttpUrl2(src)) return true;
|
|
7828
7855
|
const path = resolveProjectRelativeSrc3(src, projectDir, compiledDir);
|
|
7856
|
+
if (isPrivateUnderAssetRoots2(path, roots)) {
|
|
7857
|
+
log.warn(`[Render] Media "${id}" source is missing: it is a private project file`, { src });
|
|
7858
|
+
return false;
|
|
7859
|
+
}
|
|
7829
7860
|
if (isInsideAssetRoots(path, roots)) return true;
|
|
7830
7861
|
if (input.allowOutsideProjectAssets) {
|
|
7831
7862
|
const refusal = outsideAssetRefusal(projectDir, path);
|
|
@@ -7842,6 +7873,8 @@ function dropMediaOutsideProject(input) {
|
|
|
7842
7873
|
async function notMediaReferences(path, references) {
|
|
7843
7874
|
const videos = references.filter((ref) => ref.expected === "video");
|
|
7844
7875
|
if (videos.length > 0 && await isNotMediaPayload(path)) return videos;
|
|
7876
|
+
const images = references.filter((ref) => ref.expected === "image");
|
|
7877
|
+
if (images.length > 0 && await isNotImagePayload(path)) return images;
|
|
7845
7878
|
return await playlistLeavesItsFolder(path) ? references : [];
|
|
7846
7879
|
}
|
|
7847
7880
|
async function preflightCompositionAssetMediaTypes(input) {
|
|
@@ -8130,7 +8163,7 @@ function detectShaderTransitionUsage(html) {
|
|
|
8130
8163
|
}
|
|
8131
8164
|
return false;
|
|
8132
8165
|
}
|
|
8133
|
-
async function resolveMediaDuration(src, mediaStart, playbackRate, baseDir, downloadDir, tagName, elementIdentity, log, urlByAbsentLocalPath, probes, assetRoot) {
|
|
8166
|
+
async function resolveMediaDuration(src, mediaStart, playbackRate, projectDir, baseDir, downloadDir, tagName, elementIdentity, log, urlByAbsentLocalPath, probes, assetRoot) {
|
|
8134
8167
|
let filePath = src;
|
|
8135
8168
|
if (isHttpUrl(src)) {
|
|
8136
8169
|
const remoteDir = join19(downloadDir, REMOTE_MEDIA_SUBDIR);
|
|
@@ -8145,7 +8178,9 @@ async function resolveMediaDuration(src, mediaStart, playbackRate, baseDir, down
|
|
|
8145
8178
|
} else {
|
|
8146
8179
|
filePath = decodedUrlPath(src);
|
|
8147
8180
|
if (!filePath.startsWith("/")) filePath = join19(baseDir, filePath);
|
|
8148
|
-
if (escapesAssetRoot(filePath, assetRoot)
|
|
8181
|
+
if (escapesAssetRoot(filePath, assetRoot) || isPrivateUnderAssetRoots3(filePath, [projectDir, downloadDir])) {
|
|
8182
|
+
return { duration: null, resolvedPath: filePath };
|
|
8183
|
+
}
|
|
8149
8184
|
filePath = urlByAbsentLocalPath?.get(filePath) ?? filePath;
|
|
8150
8185
|
if (!isHttpUrl(filePath) && namesAnotherNetworkRoot2(baseDir, filePath)) {
|
|
8151
8186
|
return { duration: null, resolvedPath: filePath };
|
|
@@ -8221,7 +8256,7 @@ function markInferredVariableMediaDurations(html, unresolvedMedia) {
|
|
|
8221
8256
|
}
|
|
8222
8257
|
return changed ? document2.toString() : html;
|
|
8223
8258
|
}
|
|
8224
|
-
async function compileHtmlFile(html, baseDir, downloadDir, log, urlByAbsentLocalPath, probes, assetRoot) {
|
|
8259
|
+
async function compileHtmlFile(html, projectDir, baseDir, downloadDir, log, urlByAbsentLocalPath, probes, assetRoot) {
|
|
8225
8260
|
const { html: staticCompiled, unresolved } = compileTimingAttrs(html);
|
|
8226
8261
|
const mediaUnresolved = unresolved.filter(
|
|
8227
8262
|
(el) => (el.tagName === "video" || el.tagName === "audio") && el.src
|
|
@@ -8233,6 +8268,7 @@ async function compileHtmlFile(html, baseDir, downloadDir, log, urlByAbsentLocal
|
|
|
8233
8268
|
el.src,
|
|
8234
8269
|
el.mediaStart,
|
|
8235
8270
|
el.playbackRate,
|
|
8271
|
+
projectDir,
|
|
8236
8272
|
baseDir,
|
|
8237
8273
|
downloadDir,
|
|
8238
8274
|
el.tagName,
|
|
@@ -8257,6 +8293,7 @@ async function compileHtmlFile(html, baseDir, downloadDir, log, urlByAbsentLocal
|
|
|
8257
8293
|
el.src,
|
|
8258
8294
|
el.mediaStart,
|
|
8259
8295
|
el.playbackRate,
|
|
8296
|
+
projectDir,
|
|
8260
8297
|
baseDir,
|
|
8261
8298
|
downloadDir,
|
|
8262
8299
|
el.tagName,
|
|
@@ -8312,6 +8349,7 @@ async function parseSubCompositions(html, projectDir, downloadDir, visited = /*
|
|
|
8312
8349
|
workItems.map(async (item) => {
|
|
8313
8350
|
const { html: compiledSub } = await compileHtmlFile(
|
|
8314
8351
|
rewriteUnresolvableGsapToCdn(item.rawSubHtml, projectDir, item.srcPath),
|
|
8352
|
+
projectDir,
|
|
8315
8353
|
dirname9(item.filePath),
|
|
8316
8354
|
downloadDir,
|
|
8317
8355
|
void 0,
|
|
@@ -8514,7 +8552,9 @@ function inlineSubCompositions(html, subCompositions, projectDir, variableOverri
|
|
|
8514
8552
|
flattenInnerRoot: prepareFlattenedInnerRoot,
|
|
8515
8553
|
onMissingComposition: (srcPath, reason) => {
|
|
8516
8554
|
console.warn(
|
|
8517
|
-
|
|
8555
|
+
terminalText4(
|
|
8556
|
+
`[Compiler] Skipping sub-composition "${srcPath}": ${reason ?? "the file is missing or empty"}.`
|
|
8557
|
+
)
|
|
8518
8558
|
);
|
|
8519
8559
|
}
|
|
8520
8560
|
}
|
|
@@ -9043,6 +9083,7 @@ async function embedLocalFontFaces(html, projectDir, assetRoot, log = defaultLog
|
|
|
9043
9083
|
embeddedPaths.add(localPath);
|
|
9044
9084
|
continue;
|
|
9045
9085
|
}
|
|
9086
|
+
if (isPrivateCompositionFile(projectDir, absPath)) continue;
|
|
9046
9087
|
const ext = absPath.match(/\.(woff2?|ttf|otf|ttc)$/i)?.[1]?.toLowerCase() ?? "ttf";
|
|
9047
9088
|
try {
|
|
9048
9089
|
if (fileBackedAbsolutePaths.has(absPath)) {
|
|
@@ -9164,6 +9205,7 @@ async function compileForRender(projectDir, htmlPath, downloadDir, options = {})
|
|
|
9164
9205
|
const { html: compiledHtml, unresolvedCompositions } = await compileHtmlFile(
|
|
9165
9206
|
rawHtml,
|
|
9166
9207
|
projectDir,
|
|
9208
|
+
projectDir,
|
|
9167
9209
|
downloadDir,
|
|
9168
9210
|
options.log,
|
|
9169
9211
|
options.urlByAbsentLocalPath,
|
|
@@ -9296,7 +9338,7 @@ async function compileForRender(projectDir, htmlPath, downloadDir, options = {})
|
|
|
9296
9338
|
for (const video of videos) {
|
|
9297
9339
|
if (isHttpUrl(video.src)) continue;
|
|
9298
9340
|
const videoPath = resolve7(projectDir, video.src);
|
|
9299
|
-
if (advised.has(videoPath) || namesAnotherNetworkRoot2(projectDir, videoPath) || !existsSync11(videoPath) || escapesAssetRoot(videoPath, assetRoot))
|
|
9341
|
+
if (advised.has(videoPath) || namesAnotherNetworkRoot2(projectDir, videoPath) || !existsSync11(videoPath) || escapesAssetRoot(videoPath, assetRoot) || isPrivateUnderAssetRoots3(videoPath, [projectDir, downloadDir]))
|
|
9300
9342
|
continue;
|
|
9301
9343
|
advised.add(videoPath);
|
|
9302
9344
|
const reencode = `ffmpeg -i "${video.src}" -c:v libx264 -r 30 -g 30 -keyint_min 30 -movflags +faststart -c:a copy output.mp4`;
|
|
@@ -9926,7 +9968,8 @@ import {
|
|
|
9926
9968
|
readMediaStart as readMediaStart2,
|
|
9927
9969
|
shiftRateLane as shiftRateLane2,
|
|
9928
9970
|
sourceTimeAt as sourceTimeAt3,
|
|
9929
|
-
timeAtSourceTime
|
|
9971
|
+
timeAtSourceTime,
|
|
9972
|
+
terminalText as terminalText5
|
|
9930
9973
|
} from "@hyperframes/core";
|
|
9931
9974
|
import { parseHostVariableValues as parseHostVariableValues2, readDeclaredDefaults as readDeclaredDefaults2 } from "@hyperframes/core/compiler";
|
|
9932
9975
|
import { extractMediaSrcMutations } from "@hyperframes/parsers";
|
|
@@ -10559,7 +10602,7 @@ async function runProbeStage(input) {
|
|
|
10559
10602
|
failures: failedRequests.slice(0, 10)
|
|
10560
10603
|
});
|
|
10561
10604
|
for (const line of failedRequests.slice(0, 5)) {
|
|
10562
|
-
console.warn(`[Render] Asset load failure: ${line}`);
|
|
10605
|
+
console.warn(`[Render] Asset load failure: ${terminalText5(line)}`);
|
|
10563
10606
|
}
|
|
10564
10607
|
}
|
|
10565
10608
|
}
|
|
@@ -10672,7 +10715,7 @@ import {
|
|
|
10672
10715
|
resolveFinalFrameExtractionWindow as resolveFinalFrameExtractionWindow2,
|
|
10673
10716
|
resolveVideoExtractionWindow as resolveVideoExtractionWindow2,
|
|
10674
10717
|
isHttpUrl as isHttpUrl3,
|
|
10675
|
-
|
|
10718
|
+
assetRootsRefusal,
|
|
10676
10719
|
assertPublicHttpsUrl,
|
|
10677
10720
|
downloadToTemp as downloadToTemp2,
|
|
10678
10721
|
resolveRestrictPageNetwork,
|
|
@@ -11110,7 +11153,7 @@ function isPublicHttpsUrl(url) {
|
|
|
11110
11153
|
}
|
|
11111
11154
|
}
|
|
11112
11155
|
function opensLocally(path, assetRoots) {
|
|
11113
|
-
return existsSync13(path) && (!assetRoots ||
|
|
11156
|
+
return existsSync13(path) && (!assetRoots || assetRootsRefusal(path, assetRoots) === null);
|
|
11114
11157
|
}
|
|
11115
11158
|
function localProbeSource(src, input) {
|
|
11116
11159
|
const path = resolveProjectRelativeSrc4(src, input.projectDir, input.compiledDir);
|
|
@@ -19130,9 +19173,12 @@ function resolveDistributedEngineConfig(config) {
|
|
|
19130
19173
|
forceScreenshotExplicitlyOptedOut: true
|
|
19131
19174
|
};
|
|
19132
19175
|
}
|
|
19176
|
+
function leavesRoot(rel) {
|
|
19177
|
+
return rel === ".." || rel.startsWith(`..${sep4}`) || isAbsolute3(rel);
|
|
19178
|
+
}
|
|
19133
19179
|
function pathInside(root, path) {
|
|
19134
19180
|
const rel = relative6(root, path);
|
|
19135
|
-
return rel === "" ||
|
|
19181
|
+
return rel === "" || leavesRoot(rel) ? null : rel;
|
|
19136
19182
|
}
|
|
19137
19183
|
function stableSourcePath(roots, srcPath) {
|
|
19138
19184
|
for (const [root, prefix] of roots) {
|
|
@@ -19226,7 +19272,8 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
|
|
|
19226
19272
|
dereference: true,
|
|
19227
19273
|
filter: (src) => {
|
|
19228
19274
|
const rel = relative6(projectDir, src);
|
|
19229
|
-
if (rel === ""
|
|
19275
|
+
if (rel === "") return true;
|
|
19276
|
+
if (leavesRoot(rel)) return false;
|
|
19230
19277
|
if (job.config.allowOutsideProjectAssets) {
|
|
19231
19278
|
if (refusesOutsideLink(projectDir, src, (line) => log.warn(`[Plan] ${line}`))) return false;
|
|
19232
19279
|
} else if (!isSafePath2(projectDir, src)) return false;
|
|
@@ -23469,7 +23516,7 @@ import { isPrivateFileUnder as isPrivateFileUnder3, isStudioPrivatePath as isStu
|
|
|
23469
23516
|
var READ_CHUNK_BYTES = 256 * 1024;
|
|
23470
23517
|
|
|
23471
23518
|
// src/services/distributed/audioSidecar.ts
|
|
23472
|
-
import { extractAudioMetadata as extractAudioMetadata4, runFfmpeg as runFfmpeg9 } from "@hyperframes/engine";
|
|
23519
|
+
import { extractAudioMetadata as extractAudioMetadata4, runFfmpeg as runFfmpeg9, urlInputArgs as urlInputArgs4 } from "@hyperframes/engine";
|
|
23473
23520
|
var AUDIO_SIDECAR_MIN_BYTES = 32 * 1024 * 1024;
|
|
23474
23521
|
|
|
23475
23522
|
// src/services/distributed/probeFacts.ts
|
package/dist/logger.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Pluggable Producer Logger
|
|
3
3
|
*
|
|
4
|
-
* Lightweight pluggable logger
|
|
4
|
+
* Lightweight pluggable logger.
|
|
5
5
|
* Default implementation writes to console with level filtering.
|
|
6
6
|
*
|
|
7
7
|
* All levels write to stderr (console.error/console.warn), never stdout —
|