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