polotno-node 0.2.2 → 0.2.3

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.
Files changed (2) hide show
  1. package/index.js +11 -1
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -26,7 +26,12 @@ const getNewPage = async (browser, url) => {
26
26
  return page;
27
27
  };
28
28
 
29
- module.exports.createInstance = async ({ key, url, useParallelPages } = {}) => {
29
+ module.exports.createInstance = async ({
30
+ key,
31
+ url,
32
+ useParallelPages,
33
+ browserArgs = [],
34
+ } = {}) => {
30
35
  const browser = await puppeteer.launch({
31
36
  args: [
32
37
  ...chrome.args,
@@ -34,6 +39,11 @@ module.exports.createInstance = async ({ key, url, useParallelPages } = {}) => {
34
39
  '--hide-scrollbars',
35
40
  '--disable-web-security',
36
41
  '--allow-file-access-from-files',
42
+ // more info about --disable-dev-shm-usage
43
+ // https://github.com/puppeteer/puppeteer/issues/1175#issuecomment-369728215
44
+ // https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#tips
45
+ '--disable-dev-shm-usage',
46
+ ...browserArgs,
37
47
  ],
38
48
  defaultViewport: chrome.defaultViewport,
39
49
  executablePath: await chrome.executablePath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polotno-node",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Polotno workflow from NodeJS",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -22,6 +22,6 @@
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
24
  "chrome-aws-lambda": "^10.1.0",
25
- "puppeteer": "^10.4.0"
25
+ "puppeteer": "^13.1.3"
26
26
  }
27
27
  }