polotno-node 2.15.8 → 2.15.9

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/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-A296L9Ae.js"></script>
11
+ <script type="module" crossorigin src="./assets/index-DAfiosIl.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
- `ffmpeg -y -i "${inputPath}" -c:v copy -c:a aac "${outputPath}"`,
631
- { stdio: 'ignore' }
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.loadVideoExportModule) {
671
+ if (!window.__polotnoLoadVideoExport) {
673
672
  throw new Error(
674
- 'Video export module loader is not defined in the client. Expected window.loadVideoExportModule().'
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.loadVideoExportModule();
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('base64')}`;
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,6 +1,6 @@
1
1
  {
2
2
  "name": "polotno-node",
3
- "version": "2.15.8",
3
+ "version": "2.15.9",
4
4
  "description": "Polotno workflow from NodeJS",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -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.2",
27
- "dotenv": "^17.2.3",
26
+ "axios": "^1.13.4",
27
+ "dotenv": "^17.2.4",
28
28
  "fluent-ffmpeg": "^2.1.3",
29
- "jspdf": "^4.0.0",
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.35.2",
33
+ "polotno": "^2.36.0",
34
34
  "react": "^18.3.1",
35
35
  "react-dom": "^18.3.1",
36
36
  "vite": "^7.3.1",
37
- "vitest": "^4.0.17",
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.36.0",
45
- "puppeteer-core": "24.36.0",
44
+ "puppeteer": "24.37.2",
45
+ "puppeteer-core": "24.37.2",
46
46
  "tmp": "^0.2.5"
47
47
  },
48
48
  "bugs": {