@geoql/doctor-core 1.3.1 → 1.3.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/index.js CHANGED
@@ -3000,6 +3000,11 @@ function check$20(ctx) {
3000
3000
  const RULE_ID$3 = "nuxt-doctor/seo/og-image-defined";
3001
3001
  const MESSAGE$3 = "Page uses SEO meta but has no og:image property. Open Graph images improve social sharing previews. Add an og:image value or install @nuxtjs/og-image for automatic OG images.";
3002
3002
  const RECOMMENDATION$3 = "Add ogImage: \"/path/to/image.png\" to useSeoMeta / useHead, or install @nuxtjs/og-image.";
3003
+ const SEO_PRIMITIVES$1 = new Set(["useSeoMeta", "useHead"]);
3004
+ function isSeoWrapperName$1(name) {
3005
+ if (SEO_PRIMITIVES$1.has(name)) return false;
3006
+ return /^use[a-z]*seo/i.test(name);
3007
+ }
3003
3008
  function hasOgImageInCall(program) {
3004
3009
  for (const stmt of program.body) {
3005
3010
  if (stmt.type !== "ExpressionStatement") continue;
@@ -3007,6 +3012,7 @@ function hasOgImageInCall(program) {
3007
3012
  if (call.type !== "CallExpression") continue;
3008
3013
  if (call.callee.type !== "Identifier") continue;
3009
3014
  const name = call.callee.name;
3015
+ if (isSeoWrapperName$1(name)) return true;
3010
3016
  if (name !== "useSeoMeta" && name !== "useHead") continue;
3011
3017
  const firstArg = call.arguments[0];
3012
3018
  if (!firstArg || firstArg.type !== "ObjectExpression") continue;
@@ -3060,6 +3066,15 @@ function check$19(ctx) {
3060
3066
  const RULE_ID$2 = "nuxt-doctor/seo/useSeoMeta-on-public-page";
3061
3067
  const MESSAGE$2 = "Public page component is missing SEO metadata. Add useSeoMeta, useHead, or definePageMeta with a title so search engines can index it properly.";
3062
3068
  const RECOMMENDATION$2 = "Call useSeoMeta({ title: \"...\" }) in<script setup> to define page title and meta tags for search engines and social previews.";
3069
+ const SEO_PRIMITIVES = new Set([
3070
+ "useSeoMeta",
3071
+ "useHead",
3072
+ "definePageMeta"
3073
+ ]);
3074
+ function isSeoWrapperName(name) {
3075
+ if (SEO_PRIMITIVES.has(name)) return false;
3076
+ return /^use[a-z]*seo/i.test(name);
3077
+ }
3063
3078
  function hasTitleInCall(program) {
3064
3079
  for (const stmt of program.body) {
3065
3080
  if (stmt.type !== "ExpressionStatement") continue;
@@ -3067,6 +3082,7 @@ function hasTitleInCall(program) {
3067
3082
  if (call.type !== "CallExpression") continue;
3068
3083
  if (call.callee.type !== "Identifier") continue;
3069
3084
  const name = call.callee.name;
3085
+ if (isSeoWrapperName(name)) return true;
3070
3086
  if (name !== "useSeoMeta" && name !== "useHead" && name !== "definePageMeta") continue;
3071
3087
  const firstArg = call.arguments[0];
3072
3088
  if (!firstArg || firstArg.type !== "ObjectExpression") continue;
@@ -4160,11 +4176,11 @@ const DEFAULT_INCLUDE = [
4160
4176
  "**/*.jsx"
4161
4177
  ];
4162
4178
  const DEFAULT_EXCLUDE = [
4163
- "node_modules",
4164
- "dist",
4165
- ".nuxt",
4166
- ".output",
4167
- "coverage"
4179
+ "**/node_modules/**",
4180
+ "**/dist/**",
4181
+ "**/.nuxt/**",
4182
+ "**/.output/**",
4183
+ "**/coverage/**"
4168
4184
  ];
4169
4185
  function countRuleCounts(diagnostics) {
4170
4186
  const counts = {};
@@ -4336,11 +4352,11 @@ const BUILT_IN_RECOMMENDED = {
4336
4352
  "**/*.jsx"
4337
4353
  ],
4338
4354
  exclude: [
4339
- "node_modules",
4340
- "dist",
4341
- ".nuxt",
4342
- ".output",
4343
- "coverage"
4355
+ "**/node_modules/**",
4356
+ "**/dist/**",
4357
+ "**/.nuxt/**",
4358
+ "**/.output/**",
4359
+ "**/coverage/**"
4344
4360
  ],
4345
4361
  failOn: "error",
4346
4362
  threshold: 0,