polotno-node 2.15.8 → 2.15.11
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-9Tuh7mWU.js +65 -0
- package/dist/assets/index-zk6jORf_.js +444 -0
- package/dist/assets/{index.es-DhuWYA8x.js → index.es-6USixNFT.js} +2 -2
- package/dist/assets/jspdf.es.min-CvVM72Fp.js +79 -0
- package/dist/index.html +1 -1
- package/instance.js +9 -8
- package/package.json +9 -9
- package/dist/assets/index-A296L9Ae.js +0 -521
- package/dist/assets/index-DUf3mRG9.js +0 -65
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-zk6jORf_.js"></script>
|
|
12
12
|
</head>
|
|
13
13
|
<body>
|
|
14
14
|
<div id="root"></div>
|
package/instance.js
CHANGED
|
@@ -626,10 +626,9 @@ module.exports.createInstance = async ({
|
|
|
626
626
|
};
|
|
627
627
|
|
|
628
628
|
const convertAudioToAac = (inputPath, outputPath) => {
|
|
629
|
-
execSync(
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
);
|
|
629
|
+
execSync(`ffmpeg -y -i "${inputPath}" -c:v copy -c:a aac "${outputPath}"`, {
|
|
630
|
+
stdio: 'ignore',
|
|
631
|
+
});
|
|
633
632
|
};
|
|
634
633
|
|
|
635
634
|
const jsonToVideoFile = async (json, outputPath, attrs = {}) => {
|
|
@@ -669,13 +668,13 @@ module.exports.createInstance = async ({
|
|
|
669
668
|
// to ensure text fits properly in animations. User preferences are ignored for now.
|
|
670
669
|
window.config.setTextOverflow('resize');
|
|
671
670
|
|
|
672
|
-
if (!window.
|
|
671
|
+
if (!window.__polotnoLoadVideoExport) {
|
|
673
672
|
throw new Error(
|
|
674
|
-
'Video export module loader is not defined in the client. Expected window.
|
|
673
|
+
'Video export module loader is not defined in the client. Expected window.__polotnoLoadVideoExport().'
|
|
675
674
|
);
|
|
676
675
|
}
|
|
677
676
|
|
|
678
|
-
const { storeToVideo } = await window.
|
|
677
|
+
const { storeToVideo } = await window.__polotnoLoadVideoExport();
|
|
679
678
|
|
|
680
679
|
// Create abort controller to cancel video render on error
|
|
681
680
|
const abortController = new AbortController();
|
|
@@ -782,7 +781,9 @@ module.exports.createInstance = async ({
|
|
|
782
781
|
try {
|
|
783
782
|
const mimeType = await jsonToVideoFile(json, tempPath, attrs);
|
|
784
783
|
const buffer = await fs.promises.readFile(tempPath);
|
|
785
|
-
return `data:${mimeType || 'video/mp4'};base64,${buffer.toString(
|
|
784
|
+
return `data:${mimeType || 'video/mp4'};base64,${buffer.toString(
|
|
785
|
+
'base64'
|
|
786
|
+
)}`;
|
|
786
787
|
} finally {
|
|
787
788
|
await fs.promises.rm(tempPath, { force: true });
|
|
788
789
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "polotno-node",
|
|
3
|
-
"version": "2.15.
|
|
3
|
+
"version": "2.15.11",
|
|
4
4
|
"description": "Polotno workflow from NodeJS",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"postinstall": "patch-package",
|
|
8
|
+
"postinstall": "test -d .git && patch-package || true",
|
|
9
9
|
"test": "npm run build && vitest run test/static/static.test.mjs",
|
|
10
10
|
"test:video": "npm run build && vitest run test/video/video.test.mjs",
|
|
11
11
|
"test:all": "npm run build && vitest run test/static/static.test.mjs test/video/video.test.mjs",
|
|
@@ -23,26 +23,26 @@
|
|
|
23
23
|
"browserslist": "> 0.5%, last 2 versions, not dead",
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@polotno/video-export": "^0.0.11",
|
|
26
|
-
"axios": "^1.13.
|
|
27
|
-
"dotenv": "^17.2.
|
|
26
|
+
"axios": "^1.13.5",
|
|
27
|
+
"dotenv": "^17.2.4",
|
|
28
28
|
"fluent-ffmpeg": "^2.1.3",
|
|
29
|
-
"jspdf": "^4.
|
|
29
|
+
"jspdf": "^4.1.0",
|
|
30
30
|
"patch-package": "^8.0.1",
|
|
31
31
|
"pixelmatch": "^7.1.0",
|
|
32
32
|
"pngjs": "^7.0.0",
|
|
33
|
-
"polotno": "^2.
|
|
33
|
+
"polotno": "^2.36.1",
|
|
34
34
|
"react": "^18.3.1",
|
|
35
35
|
"react-dom": "^18.3.1",
|
|
36
36
|
"vite": "^7.3.1",
|
|
37
|
-
"vitest": "^4.0.
|
|
37
|
+
"vitest": "^4.0.18",
|
|
38
38
|
"web-audio-api": "^0.2.2"
|
|
39
39
|
},
|
|
40
40
|
"author": "Anton Lavrenov",
|
|
41
41
|
"license": "MIT",
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@sparticuz/chromium": "^143.0.4",
|
|
44
|
-
"puppeteer": "24.
|
|
45
|
-
"puppeteer-core": "24.
|
|
44
|
+
"puppeteer": "24.37.2",
|
|
45
|
+
"puppeteer-core": "24.37.2",
|
|
46
46
|
"tmp": "^0.2.5"
|
|
47
47
|
},
|
|
48
48
|
"bugs": {
|