@qodfy/core 0.2.4 → 0.2.5

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.
Files changed (2) hide show
  1. package/dist/index.js +36 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -22,11 +22,17 @@ var recommendedScanChecks = [
22
22
  var sourceFilePatterns = ["**/*.{ts,tsx,js,jsx,mts,cts,mjs,cjs}"];
23
23
  var ignoredPaths = [
24
24
  "node_modules/**",
25
+ "**/node_modules/**",
25
26
  ".next/**",
27
+ "**/.next/**",
26
28
  "dist/**",
29
+ "**/dist/**",
27
30
  "build/**",
31
+ "**/build/**",
28
32
  ".turbo/**",
33
+ "**/.turbo/**",
29
34
  ".vercel/**",
35
+ "**/.vercel/**",
30
36
  "coverage/**",
31
37
  "**/coverage/**",
32
38
  ".cache/**",
@@ -578,13 +584,17 @@ async function safeReadJson(filePath) {
578
584
  }
579
585
  async function getSourceFiles(projectPath, addIssue) {
580
586
  try {
581
- const files = await fg(sourceFilePatterns, {
587
+ const rawFiles = await fg(sourceFilePatterns, {
582
588
  cwd: projectPath,
583
589
  ignore: ignoredPaths,
584
590
  absolute: true,
585
591
  onlyFiles: true,
586
592
  dot: false
587
593
  });
594
+ const files = rawFiles.filter((file) => {
595
+ const relativeFile = normalizePath(path.relative(projectPath, file));
596
+ return !shouldIgnoreSourceFile(relativeFile);
597
+ });
588
598
  return files.sort(
589
599
  (leftFile, rightFile) => normalizePath(leftFile).localeCompare(normalizePath(rightFile))
590
600
  );
@@ -602,6 +612,31 @@ async function getSourceFiles(projectPath, addIssue) {
602
612
  return [];
603
613
  }
604
614
  }
615
+ function shouldIgnoreSourceFile(relativeFile) {
616
+ const normalizedFile = normalizePath(relativeFile);
617
+ const pathParts = normalizedFile.split("/");
618
+ const ignoredPathParts = /* @__PURE__ */ new Set([
619
+ "node_modules",
620
+ ".next",
621
+ "dist",
622
+ "build",
623
+ ".turbo",
624
+ ".vercel",
625
+ "coverage",
626
+ ".cache",
627
+ ".output",
628
+ ".open-next",
629
+ "storybook-static",
630
+ "playwright-report",
631
+ "test-results",
632
+ "generated",
633
+ "__generated__"
634
+ ]);
635
+ if (normalizedFile.endsWith(".d.ts") || normalizedFile.endsWith(".map")) {
636
+ return true;
637
+ }
638
+ return pathParts.some((pathPart) => ignoredPathParts.has(pathPart));
639
+ }
605
640
  function getEnvExampleVariables(content) {
606
641
  const variables = /* @__PURE__ */ new Set();
607
642
  for (const line of content.split(/\r?\n/)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qodfy/core",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "Scanner engine for Qodfy, an open-source launch readiness scanner for AI-built apps.",
5
5
  "keywords": [
6
6
  "qodfy",