nuxt-og-image 7.0.2 → 7.0.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.
- package/dist/chunks/tw4.mjs +1 -1
- package/dist/chunks/uno.mjs +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/app/client-utils.js +3 -3
- package/dist/runtime/app/utils.js +2 -3
- package/dist/runtime/shared.js +3 -1
- package/dist/shared/{nuxt-og-image.CSPRgfu6.mjs → nuxt-og-image.B5ZhjIiR.mjs} +1 -2
- package/package.json +1 -1
package/dist/chunks/tw4.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { readFile } from 'node:fs/promises';
|
|
|
2
2
|
import { pathToFileURL } from 'node:url';
|
|
3
3
|
import { resolveModulePath } from 'exsolve';
|
|
4
4
|
import { dirname, join } from 'pathe';
|
|
5
|
-
import { e as extractVariantBaseClasses, r as resolveVariantPrefixes, h as resolveExtractedVars, l as resolveVarsDeep, s as simplifyCss, p as postProcessStyles, m as loadLightningCss, a as extractCssVars, c as extractUniversalVars, d as extractPerClassVars, g as extractVarsFromCss, f as extractClassStyles } from '../shared/nuxt-og-image.
|
|
5
|
+
import { e as extractVariantBaseClasses, r as resolveVariantPrefixes, h as resolveExtractedVars, l as resolveVarsDeep, s as simplifyCss, p as postProcessStyles, m as loadLightningCss, a as extractCssVars, c as extractUniversalVars, d as extractPerClassVars, g as extractVarsFromCss, f as extractClassStyles } from '../shared/nuxt-og-image.B5ZhjIiR.mjs';
|
|
6
6
|
import 'node:fs';
|
|
7
7
|
import 'node:module';
|
|
8
8
|
import '@nuxt/kit';
|
package/dist/chunks/uno.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
2
|
import { defu } from 'defu';
|
|
3
3
|
import { logger } from '../../dist/runtime/logger.js';
|
|
4
|
-
import { e as extractVariantBaseClasses, s as simplifyCss, a as extractCssVars, b as extractPropertyInitialValues, c as extractUniversalVars, d as extractPerClassVars, f as extractClassStyles, p as postProcessStyles, r as resolveVariantPrefixes, i as importOptionalPeer, g as extractVarsFromCss, h as resolveExtractedVars } from '../shared/nuxt-og-image.
|
|
5
|
-
export { j as importResolvedModule, k as resolveOptionalModulePath } from '../shared/nuxt-og-image.
|
|
4
|
+
import { e as extractVariantBaseClasses, s as simplifyCss, a as extractCssVars, b as extractPropertyInitialValues, c as extractUniversalVars, d as extractPerClassVars, f as extractClassStyles, p as postProcessStyles, r as resolveVariantPrefixes, i as importOptionalPeer, g as extractVarsFromCss, h as resolveExtractedVars } from '../shared/nuxt-og-image.B5ZhjIiR.mjs';
|
|
5
|
+
export { j as importResolvedModule, k as resolveOptionalModulePath } from '../shared/nuxt-og-image.B5ZhjIiR.mjs';
|
|
6
6
|
import 'node:fs';
|
|
7
7
|
import 'node:module';
|
|
8
8
|
import 'node:url';
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import 'defu';
|
|
|
7
7
|
import 'fnv1a-64';
|
|
8
8
|
import 'nuxtseo-shared/kit';
|
|
9
9
|
import 'pathe';
|
|
10
|
-
export { n as default } from './shared/nuxt-og-image.
|
|
10
|
+
export { n as default } from './shared/nuxt-og-image.B5ZhjIiR.mjs';
|
|
11
11
|
import '../dist/runtime/logger.js';
|
|
12
12
|
import '../dist/runtime/shared/publish.js';
|
|
13
13
|
import 'node:crypto';
|
|
@@ -83,13 +83,13 @@ export function clientProcessOgImageOptions(input, route, basePath) {
|
|
|
83
83
|
if (validOptions.url) {
|
|
84
84
|
const url = validOptions.url;
|
|
85
85
|
const absoluteUrl = /^https?:\/\//.test(url) ? url : toValue(resolveImageUrl(url));
|
|
86
|
-
registerClientOgHead(ogKey, { meta: generateMeta(absoluteUrl, validOptions, metaOptions) }
|
|
86
|
+
registerClientOgHead(ogKey, { meta: generateMeta(absoluteUrl, validOptions, metaOptions) });
|
|
87
87
|
paths.push(url);
|
|
88
88
|
continue;
|
|
89
89
|
}
|
|
90
90
|
if (hasServerRuntime) {
|
|
91
91
|
const finalUrl2 = buildResolverUrl(baseURL, basePath, ogKey, route.query);
|
|
92
|
-
registerClientOgHead(ogKey, { meta: generateMeta(toValue(resolveImageUrl(finalUrl2)), validOptions, metaOptions) }
|
|
92
|
+
registerClientOgHead(ogKey, { meta: generateMeta(toValue(resolveImageUrl(finalUrl2)), validOptions, metaOptions) });
|
|
93
93
|
paths.push(finalUrl2);
|
|
94
94
|
continue;
|
|
95
95
|
}
|
|
@@ -105,7 +105,7 @@ export function clientProcessOgImageOptions(input, route, basePath) {
|
|
|
105
105
|
const query = opts._query && Object.keys(opts._query).length ? { _query: opts._query } : {};
|
|
106
106
|
const finalUrl = withQuery(resolvedUrl, query);
|
|
107
107
|
const imageUrl = rc.app.cdnURL ? withQuery(joinURL(rc.app.cdnURL, result.url), query) : toValue(resolveImageUrl(finalUrl));
|
|
108
|
-
registerClientOgHead(ogKey, { meta: generateMeta(imageUrl, opts, metaOptions) }, { processTemplateParams: true
|
|
108
|
+
registerClientOgHead(ogKey, { meta: generateMeta(imageUrl, opts, metaOptions) }, { processTemplateParams: true });
|
|
109
109
|
paths.push(finalUrl);
|
|
110
110
|
}
|
|
111
111
|
return paths;
|
|
@@ -58,7 +58,7 @@ export function setHeadOgImagePrebuilt(input) {
|
|
|
58
58
|
const urlValue = toValue(url);
|
|
59
59
|
const absoluteUrl = /^https?:\/\//.test(urlValue) ? urlValue : toValue(withSiteUrl(urlValue, { withBase: true, canonical: !import.meta.dev }));
|
|
60
60
|
const meta = generateMeta(absoluteUrl, input, { includeTwitter });
|
|
61
|
-
useHead({ meta }
|
|
61
|
+
useHead({ meta });
|
|
62
62
|
}
|
|
63
63
|
export function createOgImageMeta(src, input, ssrContext, pagePath, head) {
|
|
64
64
|
if (import.meta.client) {
|
|
@@ -126,8 +126,7 @@ export function createOgImageMeta(src, input, ssrContext, pagePath, head) {
|
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
}, {
|
|
129
|
-
processTemplateParams: true
|
|
130
|
-
tagPriority: "high"
|
|
129
|
+
processTemplateParams: true
|
|
131
130
|
});
|
|
132
131
|
if (import.meta.dev || import.meta.prerender) {
|
|
133
132
|
ssrContext._ogImageDevtoolsInstance?.dispose();
|
package/dist/runtime/shared.js
CHANGED
|
@@ -9,7 +9,7 @@ export function generateMeta(url, resolvedOptions, metaOptions = {}) {
|
|
|
9
9
|
const includeTwitter = (key === "og" || key === "twitter") && metaOptions.includeTwitter !== false;
|
|
10
10
|
const meta = [];
|
|
11
11
|
if (includeTwitter) {
|
|
12
|
-
meta.push({ name: "twitter:card", content: "summary_large_image" });
|
|
12
|
+
meta.push({ name: "twitter:card", content: "summary_large_image", tagPriority: "low" });
|
|
13
13
|
meta.push({ name: "twitter:image", content: url });
|
|
14
14
|
}
|
|
15
15
|
if (!isTwitterOnly) {
|
|
@@ -30,6 +30,8 @@ export function generateMeta(url, resolvedOptions, metaOptions = {}) {
|
|
|
30
30
|
if (includeTwitter)
|
|
31
31
|
meta.push({ name: "twitter:image:alt", content: resolvedOptions.alt });
|
|
32
32
|
}
|
|
33
|
+
for (const tag of meta)
|
|
34
|
+
tag.tagPriority ??= "high";
|
|
33
35
|
return meta;
|
|
34
36
|
}
|
|
35
37
|
export function isInternalRoute(path) {
|
|
@@ -2912,6 +2912,7 @@ function getMissingSiteUrlWarning(input) {
|
|
|
2912
2912
|
function setupPrerenderHandler(options, resolve, getDetectedRenderers, nuxt = useNuxt()) {
|
|
2913
2913
|
nuxt.hooks.hook("nitro:init", async (nitro) => {
|
|
2914
2914
|
nitro.hooks.hook("prerender:config", async (nitroConfig) => {
|
|
2915
|
+
nitroConfig.plugins = [...nitroConfig.plugins || [], resolve.resolve("./runtime/server/plugins/prerender")];
|
|
2915
2916
|
await applyNitroPresetCompatibility(nitroConfig, { compatibility: options.compatibility?.prerender, resolve, detectedRenderers: getDetectedRenderers() });
|
|
2916
2917
|
nitroConfig.wasm = nitroConfig.wasm || {};
|
|
2917
2918
|
nitroConfig.wasm.esmImport = false;
|
|
@@ -6404,8 +6405,6 @@ export const staticFontCacheDir = ${JSON.stringify(getStaticFontCacheDir(nuxt.op
|
|
|
6404
6405
|
nuxt.options.nitro.virtual["#og-image-virtual/signing.mjs"] = () => `export const rendersImages = ${getDetectedRenderers().size > 0}`;
|
|
6405
6406
|
addServerHandler({ middleware: true, handler: resolve("./runtime/server/middleware/signing") });
|
|
6406
6407
|
}
|
|
6407
|
-
if (nuxt.options.build)
|
|
6408
|
-
addServerPlugin(resolve("./runtime/server/plugins/prerender"));
|
|
6409
6408
|
if (nuxt.options.build && config.publish && !config.zeroRuntime)
|
|
6410
6409
|
addServerPlugin(resolve("./runtime/server/plugins/publish"));
|
|
6411
6410
|
if (nuxt.options.dev)
|