polotno-node 2.10.2 → 2.10.4

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-D56TTNQ-.js"></script>
11
+ <script type="module" crossorigin src="./assets/index-D88dPP8F.js"></script>
12
12
  </head>
13
13
  <body>
14
14
  <div id="root"></div>
package/instance.js CHANGED
@@ -192,7 +192,7 @@ module.exports.createInstance = async ({
192
192
  const skipImageError = isImageError && args[1]?.skipImageError;
193
193
 
194
194
  if (!skipError && !skipImageError) {
195
- throw new Error(error);
195
+ throw new Error('Asset loading error: ' + error);
196
196
  }
197
197
  }
198
198
  // remove busy page
@@ -301,23 +301,9 @@ const closeAllInstances = async () => {
301
301
  await Promise.all(createdInstances.map((instance) => instance.close()));
302
302
  };
303
303
 
304
- // Register the function to be called on process exit
305
- process.on('beforeExit', () => {
306
- closeAllInstances().catch((error) => {
307
- console.error('Error closing instances:', error);
308
- });
309
- });
310
-
311
304
  // Also handle other termination signals
312
- ['SIGINT', 'SIGTERM', 'SIGQUIT', 'exit', 'beforeExit'].forEach((signal) => {
305
+ ['SIGINT', 'SIGTERM', 'SIGQUIT', 'exit', 'exit'].forEach((signal) => {
313
306
  process.on(signal, () => {
314
- closeAllInstances()
315
- .then(() => {
316
- process.exit(0);
317
- })
318
- .catch((error) => {
319
- console.error('Error closing instances:', error);
320
- process.exit(1);
321
- });
307
+ closeAllInstances();
322
308
  });
323
309
  });
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "polotno-node",
3
- "version": "2.10.2",
3
+ "version": "2.10.4",
4
4
  "description": "Polotno workflow from NodeJS",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
- "test": "ava --timeout=30s --concurrency 3",
7
+ "test": "ava --timeout=30s --concurrency=2 --serial",
8
8
  "build": "rm -rf ./dist && npx vite build ./client/ --base=./ --outDir ../dist",
9
9
  "dev": "vite ./client.html"
10
10
  },
@@ -18,24 +18,24 @@
18
18
  "browserslist": "> 0.5%, last 2 versions, not dead",
19
19
  "devDependencies": {
20
20
  "ava": "^6.1.3",
21
- "axios": "^1.7.5",
21
+ "axios": "^1.7.7",
22
22
  "canvas": "^2.11.2",
23
23
  "dotenv": "^16.4.5",
24
24
  "fluent-ffmpeg": "^2.1.3",
25
25
  "gifencoder": "^2.0.1",
26
26
  "pixelmatch": "^6.0.0",
27
27
  "pngjs": "^7.0.0",
28
- "polotno": "^2.12.2",
28
+ "polotno": "^2.13.9",
29
29
  "react": "^18.3.1",
30
30
  "react-dom": "^18.3.1",
31
- "vite": "^5.4.2"
31
+ "vite": "^5.4.6"
32
32
  },
33
33
  "author": "Anton Lavrenov",
34
34
  "license": "MIT",
35
35
  "dependencies": {
36
36
  "@sparticuz/chromium": "127.0.0",
37
- "puppeteer": "23.1.1",
38
- "puppeteer-core": "23.1.1",
37
+ "puppeteer": "23.3.1",
38
+ "puppeteer-core": "23.3.1",
39
39
  "tmp": "^0.2.3"
40
40
  },
41
41
  "bugs": {