@unhead/addons 1.1.9 → 1.1.11
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.
|
@@ -3,7 +3,7 @@ import { createUnplugin } from 'unplugin';
|
|
|
3
3
|
import { transform } from 'unplugin-ast';
|
|
4
4
|
import { parseURL, parseQuery } from 'ufo';
|
|
5
5
|
import { createContext, runInContext } from 'node:vm';
|
|
6
|
-
import { resolveMetaKeyType,
|
|
6
|
+
import { resolveMetaKeyType, resolveMetaKeyValue, resolvePackedMetaObjectValue } from 'unhead';
|
|
7
7
|
import MagicString from 'magic-string';
|
|
8
8
|
import { findStaticImports, parseStaticImport } from 'mlly';
|
|
9
9
|
|
|
@@ -366,14 +366,13 @@ const UseSeoMetaTransform = createUnplugin(() => {
|
|
|
366
366
|
output.push("});");
|
|
367
367
|
output.push("useServerHead({");
|
|
368
368
|
}
|
|
369
|
-
if (meta.length)
|
|
369
|
+
if (meta.length)
|
|
370
370
|
output.push(" meta: [");
|
|
371
|
-
}
|
|
372
371
|
meta.forEach((property) => {
|
|
373
372
|
if (output === false)
|
|
374
373
|
return;
|
|
375
374
|
const key = resolveMetaKeyType(property.key.name);
|
|
376
|
-
const keyValue =
|
|
375
|
+
const keyValue = resolveMetaKeyValue(property.key.name);
|
|
377
376
|
const valueKey = key === "charset" ? "charset" : "content";
|
|
378
377
|
let value = code.substring(property.value.start, property.value.end);
|
|
379
378
|
if (property.value.type === "ArrayExpression") {
|
|
@@ -368,14 +368,13 @@ const UseSeoMetaTransform = unplugin.createUnplugin(() => {
|
|
|
368
368
|
output.push("});");
|
|
369
369
|
output.push("useServerHead({");
|
|
370
370
|
}
|
|
371
|
-
if (meta.length)
|
|
371
|
+
if (meta.length)
|
|
372
372
|
output.push(" meta: [");
|
|
373
|
-
}
|
|
374
373
|
meta.forEach((property) => {
|
|
375
374
|
if (output === false)
|
|
376
375
|
return;
|
|
377
376
|
const key = unhead.resolveMetaKeyType(property.key.name);
|
|
378
|
-
const keyValue = unhead.
|
|
377
|
+
const keyValue = unhead.resolveMetaKeyValue(property.key.name);
|
|
379
378
|
const valueKey = key === "charset" ? "charset" : "content";
|
|
380
379
|
let value = code.substring(property.value.start, property.value.end);
|
|
381
380
|
if (property.value.type === "ArrayExpression") {
|
package/dist/vite.cjs
CHANGED
package/dist/vite.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TreeshakeServerComposables, U as UseSeoMetaTransform } from './shared/addons.
|
|
1
|
+
import { T as TreeshakeServerComposables, U as UseSeoMetaTransform } from './shared/addons.0de86982.mjs';
|
|
2
2
|
import 'node:url';
|
|
3
3
|
import 'unplugin';
|
|
4
4
|
import 'unplugin-ast';
|
package/dist/webpack.cjs
CHANGED
package/dist/webpack.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TreeshakeServerComposables, U as UseSeoMetaTransform } from './shared/addons.
|
|
1
|
+
import { T as TreeshakeServerComposables, U as UseSeoMetaTransform } from './shared/addons.0de86982.mjs';
|
|
2
2
|
import 'node:url';
|
|
3
3
|
import 'unplugin';
|
|
4
4
|
import 'unplugin-ast';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unhead/addons",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.11",
|
|
5
5
|
"packageManager": "pnpm@7.27.1",
|
|
6
6
|
"author": "Harlan Wilton <harlan@harlanzw.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"ufo": "^1.1.0",
|
|
57
57
|
"unplugin": "^1.1.0",
|
|
58
58
|
"unplugin-ast": "^0.7.0",
|
|
59
|
-
"@unhead/
|
|
60
|
-
"
|
|
61
|
-
"unhead": "1.1.
|
|
59
|
+
"@unhead/shared": "1.1.11",
|
|
60
|
+
"unhead": "1.1.11",
|
|
61
|
+
"@unhead/schema": "1.1.11"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@babel/types": "^7.21.2",
|