nuxt-og-image 2.0.0-beta.36 → 2.0.0-beta.38
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
package/dist/module.mjs
CHANGED
|
@@ -305,8 +305,10 @@ function getNitroProviderCompatibility(nuxt) {
|
|
|
305
305
|
return false;
|
|
306
306
|
return defu(compatibility || {}, DefaultRuntimeCompatibility);
|
|
307
307
|
}
|
|
308
|
-
function
|
|
309
|
-
return
|
|
308
|
+
function ensureDependencies(nuxt, dep) {
|
|
309
|
+
return Promise.all(dep.map((d) => {
|
|
310
|
+
return addDependency(d, { cwd: nuxt.options.rootDir });
|
|
311
|
+
}));
|
|
310
312
|
}
|
|
311
313
|
|
|
312
314
|
const PATH = "/__nuxt_og_image__";
|
|
@@ -358,8 +360,8 @@ const module = defineNuxtModule({
|
|
|
358
360
|
logger.warn("It looks like you're using a nitro target that does not support the browser provider, disabling `runtimeBrowser`.");
|
|
359
361
|
}
|
|
360
362
|
if (config.runtimeBrowser && nitroCompatibility.browser === "lambda") {
|
|
361
|
-
logger.info("It looks like you're deploying to an environment
|
|
362
|
-
await
|
|
363
|
+
logger.info("It looks like you're deploying to an environment that has extra requirements, checking for dependencies...");
|
|
364
|
+
await ensureDependencies(nuxt, ["puppeteer-core@14.1.1", "@sparticuz/chrome-aws-lambda@14.1.1"]);
|
|
363
365
|
}
|
|
364
366
|
config.siteUrl = config.siteUrl || config.host;
|
|
365
367
|
if (!nuxt.options.dev && nuxt.options._generate && !config.siteUrl)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function createBrowser(): Promise<
|
|
1
|
+
export default function createBrowser(): Promise<any>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import edgeChromium from "@sparticuz/chrome-aws-lambda";
|
|
2
|
+
import puppeteer from "puppeteer-core";
|
|
3
3
|
export default async function createBrowser() {
|
|
4
|
-
return await
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
return await puppeteer.launch({
|
|
5
|
+
executablePath: await edgeChromium.executablePath,
|
|
6
|
+
args: edgeChromium.args,
|
|
7
7
|
headless: true
|
|
8
8
|
});
|
|
9
9
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-og-image",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.38",
|
|
5
5
|
"packageManager": "pnpm@8.1.0",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": "https://github.com/sponsors/harlan-zw",
|
|
@@ -84,6 +84,6 @@
|
|
|
84
84
|
"dev:build": "nuxi build .playground",
|
|
85
85
|
"dev:prepare": "nuxt-module-build --stub && nuxi prepare .playground",
|
|
86
86
|
"release": "bumpp package.json --commit --push --tag",
|
|
87
|
-
"test": "
|
|
87
|
+
"test": "vitest"
|
|
88
88
|
}
|
|
89
89
|
}
|