@hyperframes/parsers 0.9.89 → 0.9.90
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/ffBinaries.js +4 -2
- package/dist/literalMediaInput.js +4 -2
- package/package.json +2 -2
package/dist/ffBinaries.js
CHANGED
|
@@ -141,12 +141,14 @@ function findTrustedExecutable(name) {
|
|
|
141
141
|
|
|
142
142
|
// src/literalMediaInput.ts
|
|
143
143
|
var PATTERN_IMAGE2_EXPANDS = /%\d*[d%*?[\]{}]/;
|
|
144
|
+
var WILDCARD_MAKES_ANY_PERCENT_A_PATTERN = /[*?[{]/;
|
|
144
145
|
var URL_SCHEME = /^[a-z][a-z0-9+.-]+:/i;
|
|
145
146
|
function refusePattern(path, use) {
|
|
146
147
|
const local = !URL_SCHEME.test(path) || /^file:/i.test(path);
|
|
147
|
-
|
|
148
|
+
const pattern = PATTERN_IMAGE2_EXPANDS.test(path) || path.includes("%") && WILDCARD_MAKES_ANY_PERCENT_A_PATTERN.test(path);
|
|
149
|
+
if (!local || !pattern) return;
|
|
148
150
|
throw new Error(
|
|
149
|
-
`[FFmpeg] refused media path "${path.split(/[\\/]/).pop()}": a "%" followed by "d", another "%" or a wildcard, with or without digits between, would make ffmpeg ${use} it as a pattern of other files. Rename the file or folder.`
|
|
151
|
+
`[FFmpeg] refused media path "${path.split(/[\\/]/).pop()}": a "%" followed by "d", another "%" or a wildcard, with or without digits between, or a "%" and a wildcard (*, ?, [ or {) anywhere in the path, would make ffmpeg ${use} it as a pattern of other files. Rename the file or folder.`
|
|
150
152
|
);
|
|
151
153
|
}
|
|
152
154
|
function assertLiteralMediaInput(input) {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
// src/literalMediaInput.ts
|
|
2
2
|
var PATTERN_IMAGE2_EXPANDS = /%\d*[d%*?[\]{}]/;
|
|
3
|
+
var WILDCARD_MAKES_ANY_PERCENT_A_PATTERN = /[*?[{]/;
|
|
3
4
|
var URL_SCHEME = /^[a-z][a-z0-9+.-]+:/i;
|
|
4
5
|
function refusePattern(path, use) {
|
|
5
6
|
const local = !URL_SCHEME.test(path) || /^file:/i.test(path);
|
|
6
|
-
|
|
7
|
+
const pattern = PATTERN_IMAGE2_EXPANDS.test(path) || path.includes("%") && WILDCARD_MAKES_ANY_PERCENT_A_PATTERN.test(path);
|
|
8
|
+
if (!local || !pattern) return;
|
|
7
9
|
throw new Error(
|
|
8
|
-
`[FFmpeg] refused media path "${path.split(/[\\/]/).pop()}": a "%" followed by "d", another "%" or a wildcard, with or without digits between, would make ffmpeg ${use} it as a pattern of other files. Rename the file or folder.`
|
|
10
|
+
`[FFmpeg] refused media path "${path.split(/[\\/]/).pop()}": a "%" followed by "d", another "%" or a wildcard, with or without digits between, or a "%" and a wildcard (*, ?, [ or {) anywhere in the path, would make ffmpeg ${use} it as a pattern of other files. Rename the file or folder.`
|
|
9
11
|
);
|
|
10
12
|
}
|
|
11
13
|
function assertLiteralMediaInput(input) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/parsers",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.90",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/heygen-com/hyperframes",
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"tsx": "^4.21.0",
|
|
152
152
|
"typescript": "^5.0.0",
|
|
153
153
|
"vitest": "^4.1.12",
|
|
154
|
-
"@hyperframes/core": "0.9.
|
|
154
|
+
"@hyperframes/core": "0.9.90"
|
|
155
155
|
},
|
|
156
156
|
"scripts": {
|
|
157
157
|
"build": "tsup",
|