polotno-node 2.9.21 → 2.9.23
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/assets/index-D8_EcWBM.js +277 -0
- package/dist/index.html +1 -1
- package/index.js +2 -0
- package/package.json +6 -6
- package/video-parallel.js +8 -6
- package/dist/assets/index-CYctL5I1.js +0 -282
package/dist/index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
}
|
|
9
9
|
</style>
|
|
10
10
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
11
|
-
<script type="module" crossorigin src="./assets/index-
|
|
11
|
+
<script type="module" crossorigin src="./assets/index-D8_EcWBM.js"></script>
|
|
12
12
|
</head>
|
|
13
13
|
<body>
|
|
14
14
|
<div id="root"></div>
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "polotno-node",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.23",
|
|
4
4
|
"description": "Polotno workflow from NodeJS",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
"browserslist": "> 0.5%, last 2 versions, not dead",
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"ava": "^6.1.3",
|
|
22
|
-
"axios": "^1.
|
|
22
|
+
"axios": "^1.7.2",
|
|
23
23
|
"canvas": "^2.11.2",
|
|
24
24
|
"dotenv": "^16.4.5",
|
|
25
|
-
"fluent-ffmpeg": "^2.1.
|
|
25
|
+
"fluent-ffmpeg": "^2.1.3",
|
|
26
26
|
"gifencoder": "^2.0.1",
|
|
27
27
|
"pixelmatch": "^5.3.0",
|
|
28
28
|
"pngjs": "^7.0.0",
|
|
29
|
-
"polotno": "^2.5
|
|
29
|
+
"polotno": "^2.6.5",
|
|
30
30
|
"react": "^18.3.1",
|
|
31
31
|
"react-dom": "^18.3.1",
|
|
32
32
|
"vite": "^5.2.11"
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"license": "MIT",
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@sparticuz/chromium": "123.0.1",
|
|
38
|
-
"puppeteer": "22.
|
|
39
|
-
"puppeteer-core": "22.
|
|
38
|
+
"puppeteer": "22.10.0",
|
|
39
|
+
"puppeteer-core": "22.10.0",
|
|
40
40
|
"tmp": "^0.2.3"
|
|
41
41
|
},
|
|
42
42
|
"bugs": {
|
package/video-parallel.js
CHANGED
|
@@ -83,8 +83,14 @@ const cachedVideoToDataURL = async (url, tempFolder) => {
|
|
|
83
83
|
return urlCache[url];
|
|
84
84
|
};
|
|
85
85
|
|
|
86
|
-
module.exports.jsonToVideo = async function jsonToVideo(
|
|
87
|
-
|
|
86
|
+
module.exports.jsonToVideo = async function jsonToVideo(
|
|
87
|
+
inst,
|
|
88
|
+
json,
|
|
89
|
+
attrs = {}
|
|
90
|
+
) {
|
|
91
|
+
const tempFolder = tmp.dirSync({
|
|
92
|
+
tmpdir: attrs.tmpdir,
|
|
93
|
+
});
|
|
88
94
|
// const tempFolder = {
|
|
89
95
|
// name: './temp',
|
|
90
96
|
// };
|
|
@@ -254,10 +260,6 @@ module.exports.jsonToVideo = async function jsonToVideo(inst, json, attrs) {
|
|
|
254
260
|
|
|
255
261
|
const format = attrs.out.split('.').pop() || 'mp4';
|
|
256
262
|
|
|
257
|
-
// print all files in temp folder
|
|
258
|
-
fs.readdirSync(tempFolder.name).forEach((file) => {
|
|
259
|
-
console.log(file);
|
|
260
|
-
});
|
|
261
263
|
console.time('ffmpeg');
|
|
262
264
|
await new Promise((resolve, reject) => {
|
|
263
265
|
const ffmpegCmd = ffmpeg()
|