nuxt-og-image 1.4.6 → 1.4.7

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/module.json CHANGED
@@ -5,5 +5,5 @@
5
5
  "bridge": false
6
6
  },
7
7
  "configKey": "ogImage",
8
- "version": "1.4.6"
8
+ "version": "1.4.7"
9
9
  }
package/dist/module.mjs CHANGED
@@ -10,13 +10,13 @@ import { tinyws } from 'tinyws';
10
10
  import sirv from 'sirv';
11
11
  import { pathExists, copy, mkdirp } from 'fs-extra';
12
12
  import { isCI, provider } from 'std-env';
13
+ import playwrightCore from 'playwright-core';
13
14
  import { existsSync } from 'fs';
14
15
  import { createBirpcGroup } from 'birpc';
15
16
  import { stringify, parse } from 'flatted';
16
17
 
17
18
  async function createBrowser() {
18
19
  try {
19
- const playwrightCore = await import(String("playwright-core"));
20
20
  const { Launcher } = await import(String("chrome-launcher"));
21
21
  const chromePath = Launcher.getFirstInstallation();
22
22
  return await playwrightCore.chromium.launch({
@@ -25,6 +25,12 @@ async function createBrowser() {
25
25
  });
26
26
  } catch (e) {
27
27
  }
28
+ try {
29
+ return await playwrightCore.chromium.launch({
30
+ headless: true
31
+ });
32
+ } catch (e) {
33
+ }
28
34
  try {
29
35
  const playwright = await import(String("playwright"));
30
36
  return await playwright.chromium.launch({
@@ -1,7 +1,7 @@
1
1
  import { isCI } from "std-env";
2
+ import playwrightCore from "playwright-core";
2
3
  export default async function createBrowser() {
3
4
  try {
4
- const playwrightCore = await import(String("playwright-core"));
5
5
  const { Launcher } = await import(String("chrome-launcher"));
6
6
  const chromePath = Launcher.getFirstInstallation();
7
7
  return await playwrightCore.chromium.launch({
@@ -10,6 +10,12 @@ export default async function createBrowser() {
10
10
  });
11
11
  } catch (e) {
12
12
  }
13
+ try {
14
+ return await playwrightCore.chromium.launch({
15
+ headless: true
16
+ });
17
+ } catch (e) {
18
+ }
13
19
  try {
14
20
  const playwright = await import(String("playwright"));
15
21
  return await playwright.chromium.launch({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-og-image",
3
3
  "type": "module",
4
- "version": "1.4.6",
4
+ "version": "1.4.7",
5
5
  "packageManager": "pnpm@7.8.0",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/harlan-zw",