polotno-node 2.9.34 → 2.9.36

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-DcPAu4G1.js"></script>
11
+ <script type="module" crossorigin src="./assets/index-Q-NKf7Mv.js"></script>
12
12
  </head>
13
13
  <body>
14
14
  <div id="root"></div>
package/index.js CHANGED
@@ -73,6 +73,14 @@ const minimal_args = [
73
73
  '--text-rendering=geometricprecision',
74
74
  ].filter(Boolean);
75
75
 
76
+ const browserProps = {
77
+ headless: 'new',
78
+ // make large timeout, because some renders may take a lot of time
79
+ // like large PDF or video render
80
+ protocolTimeout: 60 * 60 * 1000,
81
+ ignoreHTTPSErrors: true,
82
+ };
83
+
76
84
  async function createBrowser({ browserArgs = [], ...rest } = {}) {
77
85
  return puppeteer.launch({
78
86
  args: [
@@ -83,13 +91,10 @@ async function createBrowser({ browserArgs = [], ...rest } = {}) {
83
91
  ...browserArgs,
84
92
  ],
85
93
  defaultViewport: chrome.defaultViewport,
86
- headless: 'new',
87
- // make default protocol timeout bigger
88
- // because some clients had issues with it
89
- protocolTimeout: 10 * 60 * 1000,
94
+
90
95
  executablePath:
91
96
  isMacOs || isWindows ? undefined : await chrome.executablePath(),
92
- ignoreHTTPSErrors: true,
97
+ ...browserProps,
93
98
  ...rest,
94
99
  });
95
100
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polotno-node",
3
- "version": "2.9.34",
3
+ "version": "2.9.36",
4
4
  "description": "Polotno workflow from NodeJS",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -26,7 +26,7 @@
26
26
  "gifencoder": "^2.0.1",
27
27
  "pixelmatch": "^6.0.0",
28
28
  "pngjs": "^7.0.0",
29
- "polotno": "^2.11.1",
29
+ "polotno": "^2.11.4",
30
30
  "react": "^18.3.1",
31
31
  "react-dom": "^18.3.1",
32
32
  "vite": "^5.3.4"