@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, MetaPackingSchema, fixKeyCase, resolvePackedMetaObjectValue } from 'unhead';
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 = MetaPackingSchema[property.key.name]?.keyValue || fixKeyCase(property.key.name);
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.MetaPackingSchema[property.key.name]?.keyValue || unhead.fixKeyCase(property.key.name);
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
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const UseSeoMetaTransform = require('./shared/addons.6abdcfe6.cjs');
3
+ const UseSeoMetaTransform = require('./shared/addons.a42db7c8.cjs');
4
4
  require('node:url');
5
5
  require('unplugin');
6
6
  require('unplugin-ast');
package/dist/vite.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { T as TreeshakeServerComposables, U as UseSeoMetaTransform } from './shared/addons.dc495f65.mjs';
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
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const UseSeoMetaTransform = require('./shared/addons.6abdcfe6.cjs');
3
+ const UseSeoMetaTransform = require('./shared/addons.a42db7c8.cjs');
4
4
  require('node:url');
5
5
  require('unplugin');
6
6
  require('unplugin-ast');
package/dist/webpack.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { T as TreeshakeServerComposables, U as UseSeoMetaTransform } from './shared/addons.dc495f65.mjs';
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.9",
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/schema": "1.1.9",
60
- "@unhead/shared": "1.1.9",
61
- "unhead": "1.1.9"
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",