@remotion/vercel 4.0.515 → 4.0.517
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/esm/index.mjs +28 -4
- package/package.json +4 -4
package/dist/esm/index.mjs
CHANGED
|
@@ -1408,7 +1408,7 @@ var serializeJSONWithSpecialTypes = ({
|
|
|
1408
1408
|
setUsed = true;
|
|
1409
1409
|
return value;
|
|
1410
1410
|
}
|
|
1411
|
-
if (typeof item === "string" && staticBase !== null && item.startsWith(staticBase)) {
|
|
1411
|
+
if (typeof item === "string" && staticBase !== null && staticBase !== "" && item.startsWith(staticBase)) {
|
|
1412
1412
|
customFileUsed = true;
|
|
1413
1413
|
return \`\${FILE_TOKEN}\${item.replace(staticBase + "/", "")}\`;
|
|
1414
1414
|
}
|
|
@@ -1419,13 +1419,25 @@ var serializeJSONWithSpecialTypes = ({
|
|
|
1419
1419
|
throw new Error("Could not serialize the passed input props to JSON: " + err.message);
|
|
1420
1420
|
}
|
|
1421
1421
|
};
|
|
1422
|
+
var resolveFileTokenToUrl = (value) => {
|
|
1423
|
+
const encodedName = value.replace(FILE_TOKEN, "");
|
|
1424
|
+
let name = encodedName;
|
|
1425
|
+
try {
|
|
1426
|
+
name = encodedName.split("/").map(decodeURIComponent).join("/");
|
|
1427
|
+
} catch {}
|
|
1428
|
+
const matchingStaticFile = window.remotion_staticFiles?.find((file) => file.name === name);
|
|
1429
|
+
if (matchingStaticFile) {
|
|
1430
|
+
return matchingStaticFile.src;
|
|
1431
|
+
}
|
|
1432
|
+
return \`\${window.remotion_staticBase}/\${encodedName}\`;
|
|
1433
|
+
};
|
|
1422
1434
|
var deserializeJSONWithSpecialTypes = (data) => {
|
|
1423
1435
|
return JSON.parse(data, (_, value) => {
|
|
1424
1436
|
if (typeof value === "string" && value.startsWith(DATE_TOKEN)) {
|
|
1425
1437
|
return new Date(value.replace(DATE_TOKEN, ""));
|
|
1426
1438
|
}
|
|
1427
1439
|
if (typeof value === "string" && value.startsWith(FILE_TOKEN)) {
|
|
1428
|
-
return
|
|
1440
|
+
return resolveFileTokenToUrl(value);
|
|
1429
1441
|
}
|
|
1430
1442
|
return value;
|
|
1431
1443
|
});
|
|
@@ -3763,7 +3775,7 @@ var serializeJSONWithSpecialTypes = ({
|
|
|
3763
3775
|
setUsed = true;
|
|
3764
3776
|
return value;
|
|
3765
3777
|
}
|
|
3766
|
-
if (typeof item === "string" && staticBase !== null && item.startsWith(staticBase)) {
|
|
3778
|
+
if (typeof item === "string" && staticBase !== null && staticBase !== "" && item.startsWith(staticBase)) {
|
|
3767
3779
|
customFileUsed = true;
|
|
3768
3780
|
return \`\${FILE_TOKEN}\${item.replace(staticBase + "/", "")}\`;
|
|
3769
3781
|
}
|
|
@@ -3774,13 +3786,25 @@ var serializeJSONWithSpecialTypes = ({
|
|
|
3774
3786
|
throw new Error("Could not serialize the passed input props to JSON: " + err.message);
|
|
3775
3787
|
}
|
|
3776
3788
|
};
|
|
3789
|
+
var resolveFileTokenToUrl = (value) => {
|
|
3790
|
+
const encodedName = value.replace(FILE_TOKEN, "");
|
|
3791
|
+
let name = encodedName;
|
|
3792
|
+
try {
|
|
3793
|
+
name = encodedName.split("/").map(decodeURIComponent).join("/");
|
|
3794
|
+
} catch {}
|
|
3795
|
+
const matchingStaticFile = window.remotion_staticFiles?.find((file) => file.name === name);
|
|
3796
|
+
if (matchingStaticFile) {
|
|
3797
|
+
return matchingStaticFile.src;
|
|
3798
|
+
}
|
|
3799
|
+
return \`\${window.remotion_staticBase}/\${encodedName}\`;
|
|
3800
|
+
};
|
|
3777
3801
|
var deserializeJSONWithSpecialTypes = (data) => {
|
|
3778
3802
|
return JSON.parse(data, (_, value) => {
|
|
3779
3803
|
if (typeof value === "string" && value.startsWith(DATE_TOKEN)) {
|
|
3780
3804
|
return new Date(value.replace(DATE_TOKEN, ""));
|
|
3781
3805
|
}
|
|
3782
3806
|
if (typeof value === "string" && value.startsWith(FILE_TOKEN)) {
|
|
3783
|
-
return
|
|
3807
|
+
return resolveFileTokenToUrl(value);
|
|
3784
3808
|
}
|
|
3785
3809
|
return value;
|
|
3786
3810
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/vercel",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.517",
|
|
4
4
|
"description": "Render Remotion videos on Vercel Sandbox",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@remotion/renderer": "4.0.
|
|
27
|
-
"remotion": "4.0.
|
|
26
|
+
"@remotion/renderer": "4.0.517",
|
|
27
|
+
"remotion": "4.0.517"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@vercel/sandbox": ">=1.0.0"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"./package.json": "./package.json"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
41
|
+
"@remotion/eslint-config-internal": "4.0.517",
|
|
42
42
|
"@vercel/blob": "2.3.0",
|
|
43
43
|
"@vercel/sandbox": "1.6.0",
|
|
44
44
|
"eslint": "9.19.0",
|