aeo.js 0.0.8 → 0.0.9

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.mjs CHANGED
@@ -298,7 +298,8 @@ function collectMarkdownFiles(dir, base = dir) {
298
298
  for (const entry of entries) {
299
299
  const fullPath = join(dir, entry);
300
300
  const stat = statSync(fullPath);
301
- if (stat.isDirectory() && !entry.startsWith(".") && entry !== "node_modules") {
301
+ const SKIP_DIRS = /* @__PURE__ */ new Set(["node_modules", "public", "dist", ".next", ".nuxt", ".output", ".open-next", "coverage", "__tests__", "__mocks__"]);
302
+ if (stat.isDirectory() && !entry.startsWith(".") && !SKIP_DIRS.has(entry)) {
302
303
  files.push(...collectMarkdownFiles(fullPath, base));
303
304
  } else if (stat.isFile() && (extname(entry) === ".md" || extname(entry) === ".mdx")) {
304
305
  const content = readFileSync(fullPath, "utf-8");
@@ -641,7 +642,8 @@ function collectUrls(dir, config, base = dir) {
641
642
  for (const entry of entries) {
642
643
  const fullPath = join(dir, entry);
643
644
  const stat = statSync(fullPath);
644
- if (stat.isDirectory() && !entry.startsWith(".") && entry !== "node_modules") {
645
+ const SKIP_DIRS = /* @__PURE__ */ new Set(["node_modules", "public", "dist", ".next", ".nuxt", ".output", ".open-next", "coverage", "__tests__", "__mocks__"]);
646
+ if (stat.isDirectory() && !entry.startsWith(".") && !SKIP_DIRS.has(entry)) {
645
647
  urls.push(...collectUrls(fullPath, config, base));
646
648
  } else if (stat.isFile() && (extname(entry) === ".md" || extname(entry) === ".mdx" || extname(entry) === ".html")) {
647
649
  const relativePath = relative(base, fullPath);