polotno-node 3.1.3 → 3.2.0

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/README.md CHANGED
@@ -138,7 +138,7 @@ res.json({ url });
138
138
  for (const page of json.pages) {
139
139
  const url = await instance.jsonToDataURL(
140
140
  { ...json, pages: [page] }, // for optimization, we can modify JSON to include only one page
141
- { pageId: page.id }
141
+ { pageId: page.id },
142
142
  );
143
143
  // do something with url
144
144
  }
@@ -161,7 +161,7 @@ fs.writeFileSync('out.png', imageBase64, 'base64');
161
161
  for (const page of json.pages) {
162
162
  const imageBase64 = await instance.jsonToImageBase64(
163
163
  { ...json, pages: [page] }, // for optimization, we can modify JSON to include only one page
164
- { pageId: page.id }
164
+ { pageId: page.id },
165
165
  );
166
166
  // do something with base64
167
167
  }
@@ -463,7 +463,7 @@ const browser2 = await puppeteer.launch({
463
463
 
464
464
  // Replace specific arguments in polotno args
465
465
  const customArgs = args.map((arg) =>
466
- arg === '--disable-web-security' ? '--enable-web-security' : arg
466
+ arg === '--disable-web-security' ? '--enable-web-security' : arg,
467
467
  );
468
468
  const browser3 = await puppeteer.launch({
469
469
  args: [...chromium.args, ...customArgs],
@@ -716,7 +716,7 @@ const makeInstance = async () => {
716
716
  args: [...chromium.args, ...args],
717
717
  defaultViewport: chromium.defaultViewport,
718
718
  executablePath: await chromium.executablePath(
719
- 'https://github.com/Sparticuz/chromium/releases/download/v110.0.1/chromium-v110.0.1-pack.tar'
719
+ 'https://github.com/Sparticuz/chromium/releases/download/v110.0.1/chromium-v110.0.1-pack.tar',
720
720
  ),
721
721
  headless: chromium.headless,
722
722
  ignoreHTTPSErrors: true,