Files
hyperframes/packages/parsers/package-subpaths.json
T
Michael Wang fe93f9cd47 fix: refuse media paths that ffmpeg's image2 demuxer would read as a pattern (#8047)
* fix: refuse media paths that ffmpeg's image2 demuxer would read as a pattern

ffmpeg's image2 demuxer reads %d, %03d, %% and a % before a wildcard in an
input path as a pattern of other files, folders included. Every project,
private-file and received-file check approves the literal path, so a
composition could name a placeholder whose pattern reaches images outside
the project and get them back as video frames.

Every ffmpeg and ffprobe input built from a project file now goes through
assertLiteralMediaInput, which refuses such a local path before ffmpeg runs.
The engine's urlInputArgs, the parsers' mediaInputFormatArgs and the
studio-server's new mediaInputArgs all take the input path, so the CLI
snapshot and cloud offload, lint, core grade analysis and studio-server
callers are covered too. URLs and other percent signs, such as %20, are
read as before.

* build(parsers): declare the literal-media-input subpath

* build: raise the parsers packed-size budget for the literal-media-input subpath

The new subpath adds its own built entry, type file and export map rows,
about 2.7 KB packed. It is a separate module so test suites that mock
ff-binaries still run the real path check.

* test(parsers): a harmless name shaped like a pattern is refused too
2026-11-17 07:28:09 +00:00

187 lines
6.3 KiB
JSON

{
"package": "@hyperframes/parsers",
"localNodeRuntime": true,
"subpaths": {
".": {
"source": "./src/index.ts",
"runtime": "./dist/index.js",
"types": "./dist/index.d.ts",
"environments": ["browser", "bun", "node"]
},
"./package.json": {
"source": "./package.json",
"runtime": "./package.json",
"types": null,
"environments": ["browser", "bun", "node"]
},
"./gsap-parser": {
"source": "./src/gsapParserExports.ts",
"runtime": "./dist/gsapParserExports.js",
"types": "./dist/gsapParserExports.d.ts",
"environments": ["browser", "bun", "node"]
},
"./gsap-parser-acorn": {
"source": "./src/gsapParserAcorn.ts",
"runtime": "./dist/gsapParserAcorn.js",
"types": "./dist/gsapParserAcorn.d.ts",
"environments": ["browser", "bun", "node"]
},
"./gsap-writer-acorn": {
"source": "./src/gsapWriterAcorn.ts",
"runtime": "./dist/gsapWriterAcorn.js",
"types": "./dist/gsapWriterAcorn.d.ts",
"environments": ["browser", "bun", "node"]
},
"./gsap-constants": {
"source": "./src/gsapConstants.ts",
"runtime": "./dist/gsapConstants.js",
"types": "./dist/gsapConstants.d.ts",
"environments": ["browser", "bun", "node"]
},
"./spring-ease": {
"source": "./src/springEase.ts",
"runtime": "./dist/springEase.js",
"types": "./dist/springEase.d.ts",
"environments": ["browser", "bun", "node"]
},
"./hf-ids": {
"source": "./src/hfIds.ts",
"runtime": "./dist/hfIds.js",
"types": "./dist/hfIds.d.ts",
"environments": ["browser", "bun", "node"]
},
"./gsap-parser-recast": {
"source": "./src/gsapParser.ts",
"runtime": "./dist/gsapParser.js",
"types": "./dist/gsapParser.d.ts",
"environments": ["browser", "bun", "node"]
},
"./slideshow": {
"source": "./src/slideshow/index.ts",
"runtime": "./dist/slideshow.js",
"types": "./dist/slideshow.d.ts",
"environments": ["browser", "bun", "node"]
},
"./asset-paths": {
"source": "./src/assets.ts",
"runtime": "./dist/assets.js",
"types": "./dist/assets.d.ts",
"environments": ["bun", "node"]
},
"./css-url-scans": {
"source": "./src/cssUrlScans.ts",
"runtime": "./dist/cssUrlScans.js",
"types": "./dist/cssUrlScans.d.ts",
"environments": ["browser", "bun", "node"]
},
"./composition": {
"source": "./src/composition.ts",
"runtime": "./dist/composition.js",
"types": "./dist/composition.d.ts",
"environments": ["browser", "bun", "node"]
},
"./composition-contract": {
"source": "./src/compositionContract.ts",
"runtime": "./dist/compositionContract.js",
"types": "./dist/compositionContract.d.ts",
"environments": ["browser", "bun", "node"]
},
"./media-duration": {
"source": "./src/mediaDuration.ts",
"runtime": "./dist/mediaDuration.js",
"types": "./dist/mediaDuration.d.ts",
"environments": ["browser", "bun", "node"]
},
"./media-duration-fixtures": {
"source": "./src/mediaDurationFixtures.ts",
"runtime": "./dist/mediaDurationFixtures.js",
"types": "./dist/mediaDurationFixtures.d.ts",
"environments": ["browser", "bun", "node"]
},
"./top-level-elements": {
"source": "./src/topLevelElements.ts",
"runtime": "./dist/topLevelElements.js",
"types": "./dist/topLevelElements.d.ts",
"environments": ["browser", "bun", "node"]
},
"./color-grading-contract": {
"source": "./src/colorGradingContract.ts",
"runtime": "./dist/colorGradingContract.js",
"types": "./dist/colorGradingContract.d.ts",
"environments": ["browser", "bun", "node"]
},
"./sub-composition-validity": {
"source": "./src/subCompositionValidity.ts",
"runtime": "./dist/subCompositionValidity.js",
"types": "./dist/subCompositionValidity.d.ts",
"environments": ["browser", "bun", "node"]
},
"./ff-binaries": {
"source": "./src/ffBinaries.ts",
"runtime": "./dist/ffBinaries.js",
"types": "./dist/ffBinaries.d.ts",
"environments": ["bun", "node"]
},
"./literal-media-input": {
"source": "./src/literalMediaInput.ts",
"runtime": "./dist/literalMediaInput.js",
"types": "./dist/literalMediaInput.d.ts",
"environments": ["bun", "node"]
},
"./media-alpha": {
"source": "./src/mediaAlpha.ts",
"runtime": "./dist/mediaAlpha.js",
"types": "./dist/mediaAlpha.d.ts",
"environments": ["browser", "bun", "node"]
},
"./media-streams": {
"source": "./src/mediaStreams.ts",
"runtime": "./dist/mediaStreams.js",
"types": "./dist/mediaStreams.d.ts",
"environments": ["browser", "bun", "node"]
},
"./asset-resolution": {
"source": "./src/assetResolution.ts",
"runtime": "./dist/assetResolution.js",
"types": "./dist/assetResolution.d.ts",
"environments": ["bun", "node"]
},
"./private-path": {
"source": "./src/privatePath.ts",
"runtime": "./dist/privatePath.js",
"types": "./dist/privatePath.d.ts",
"environments": ["bun", "node"]
},
"./html-attribute-spans": {
"source": "./src/htmlAttributeSpans.ts",
"runtime": "./dist/htmlAttributeSpans.js",
"types": "./dist/htmlAttributeSpans.d.ts",
"environments": ["browser", "bun", "node"]
},
"./time-spans": {
"source": "./src/timeSpans.ts",
"runtime": "./dist/timeSpans.js",
"types": "./dist/timeSpans.d.ts",
"environments": ["browser", "bun", "node"]
},
"./media-timing": {
"source": "./src/mediaTiming.ts",
"runtime": "./dist/mediaTiming.js",
"types": "./dist/mediaTiming.d.ts",
"environments": ["browser", "bun", "node"]
},
"./reference-resolver": {
"source": "./src/referenceResolver.ts",
"runtime": "./dist/referenceResolver.js",
"types": "./dist/referenceResolver.d.ts",
"environments": ["browser", "bun", "node"]
},
"./composition-duration": {
"source": "./src/compositionDuration.ts",
"runtime": "./dist/compositionDuration.js",
"types": "./dist/compositionDuration.d.ts",
"environments": ["browser", "bun", "node"]
}
}
}