prodex 1.4.0 → 1.4.1

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 (113) hide show
  1. package/dist/cli/cli-input.js +0 -1
  2. package/dist/cli/init.js +0 -1
  3. package/dist/cli/picker.js +0 -1
  4. package/dist/cli/summary.js +0 -1
  5. package/dist/constants/cache-keys.js +0 -1
  6. package/dist/constants/config.js +0 -1
  7. package/dist/constants/default-config.js +0 -1
  8. package/dist/constants/flags.js +0 -1
  9. package/dist/constants/index.js +0 -1
  10. package/dist/constants/render-constants.js +0 -1
  11. package/dist/core/combine.js +0 -1
  12. package/dist/core/dependency.js +0 -1
  13. package/dist/core/helpers.js +0 -1
  14. package/dist/core/managers/cache.js +0 -1
  15. package/dist/core/managers/config.js +0 -1
  16. package/dist/core/output.js +0 -1
  17. package/dist/core/renderers.js +0 -1
  18. package/dist/debug.js +0 -1
  19. package/dist/index.js +0 -1
  20. package/dist/lib/logger.js +0 -1
  21. package/dist/lib/polyfills.js +0 -1
  22. package/dist/lib/prompt.js +0 -1
  23. package/dist/lib/questions.js +0 -1
  24. package/dist/lib/utils.js +0 -1
  25. package/dist/resolvers/js/extract-imports.js +0 -1
  26. package/dist/resolvers/js/js-resolver.js +0 -1
  27. package/dist/resolvers/js/resolve-alias.js +0 -1
  28. package/dist/resolvers/php/bindings.js +0 -1
  29. package/dist/resolvers/php/extract-imports.js +0 -1
  30. package/dist/resolvers/php/php-resolver.js +0 -1
  31. package/dist/resolvers/php/psr4.js +0 -1
  32. package/dist/shared/collections.js +0 -1
  33. package/dist/shared/index.js +0 -1
  34. package/dist/shared/io.js +0 -1
  35. package/dist/shared/patterns.js +0 -1
  36. package/dist/store.js +0 -1
  37. package/dist/types/cli.types.js +0 -1
  38. package/dist/types/config.types.js +0 -1
  39. package/dist/types/core.types.js +0 -1
  40. package/dist/types/index.js +0 -1
  41. package/dist/types/resolver.types.js +0 -1
  42. package/dist/types/utils.types.js +0 -1
  43. package/package.json +1 -1
  44. package/dist/cli/cli-input.js.map +0 -1
  45. package/dist/cli/flags.js +0 -43
  46. package/dist/cli/flags.js.map +0 -1
  47. package/dist/cli/init.js.map +0 -1
  48. package/dist/cli/picker.js.map +0 -1
  49. package/dist/cli/summary.js.map +0 -1
  50. package/dist/constants/cache-keys.js.map +0 -1
  51. package/dist/constants/config-loader.js +0 -95
  52. package/dist/constants/config-loader.js.map +0 -1
  53. package/dist/constants/config.js.map +0 -1
  54. package/dist/constants/default-config.js.map +0 -1
  55. package/dist/constants/flags.js.map +0 -1
  56. package/dist/constants/index.js.map +0 -1
  57. package/dist/constants/render-constants.js.map +0 -1
  58. package/dist/core/cache.js +0 -54
  59. package/dist/core/cache.js.map +0 -1
  60. package/dist/core/combine.js.map +0 -1
  61. package/dist/core/config-manager.js +0 -104
  62. package/dist/core/config-manager.js.map +0 -1
  63. package/dist/core/dependency.js.map +0 -1
  64. package/dist/core/file-utils.js +0 -1
  65. package/dist/core/file-utils.js.map +0 -1
  66. package/dist/core/helpers.js.map +0 -1
  67. package/dist/core/managers/cache.js.map +0 -1
  68. package/dist/core/managers/config-manager.js +0 -104
  69. package/dist/core/managers/config-manager.js.map +0 -1
  70. package/dist/core/managers/config.js.map +0 -1
  71. package/dist/core/output.js.map +0 -1
  72. package/dist/core/parsers/extract-imports.js +0 -46
  73. package/dist/core/parsers/extract-imports.js.map +0 -1
  74. package/dist/core/renderers.js.map +0 -1
  75. package/dist/debug.js.map +0 -1
  76. package/dist/index.js.map +0 -1
  77. package/dist/lib/logger.js.map +0 -1
  78. package/dist/lib/polyfills.js.map +0 -1
  79. package/dist/lib/prompt.js.map +0 -1
  80. package/dist/lib/questions.js.map +0 -1
  81. package/dist/lib/utils.js.map +0 -1
  82. package/dist/resolvers/js/alias-loader.js +0 -53
  83. package/dist/resolvers/js/alias-loader.js.map +0 -1
  84. package/dist/resolvers/js/extract-imports.js.map +0 -1
  85. package/dist/resolvers/js/js-resolver.js.map +0 -1
  86. package/dist/resolvers/js/resolve-alias.js.map +0 -1
  87. package/dist/resolvers/php/bindings.js.map +0 -1
  88. package/dist/resolvers/php/extract-imports.js.map +0 -1
  89. package/dist/resolvers/php/patterns.js +0 -50
  90. package/dist/resolvers/php/patterns.js.map +0 -1
  91. package/dist/resolvers/php/php-resolver.js.map +0 -1
  92. package/dist/resolvers/php/psr4.js.map +0 -1
  93. package/dist/resolvers/shared/excludes.js +0 -12
  94. package/dist/resolvers/shared/excludes.js.map +0 -1
  95. package/dist/resolvers/shared/file-cache.js +0 -1
  96. package/dist/resolvers/shared/file-cache.js.map +0 -1
  97. package/dist/resolvers/shared/resolve-alias.js +0 -62
  98. package/dist/resolvers/shared/resolve-alias.js.map +0 -1
  99. package/dist/resolvers/shared/stats.js +0 -17
  100. package/dist/resolvers/shared/stats.js.map +0 -1
  101. package/dist/shared/collections.js.map +0 -1
  102. package/dist/shared/index.js.map +0 -1
  103. package/dist/shared/io.js.map +0 -1
  104. package/dist/shared/patterns.js.map +0 -1
  105. package/dist/shared/stats.js +0 -32
  106. package/dist/shared/stats.js.map +0 -1
  107. package/dist/store.js.map +0 -1
  108. package/dist/types/cli.types.js.map +0 -1
  109. package/dist/types/config.types.js.map +0 -1
  110. package/dist/types/core.types.js.map +0 -1
  111. package/dist/types/index.js.map +0 -1
  112. package/dist/types/resolver.types.js.map +0 -1
  113. package/dist/types/utils.types.js.map +0 -1
@@ -1,50 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.extractPhpImports = extractPhpImports;
4
- exports.expandGroupedUses = expandGroupedUses;
5
- /**
6
- * Extracts import-like references from PHP code.
7
- * Supports:
8
- * - require/include/require_once/include_once
9
- * - use statements (including grouped imports like `use App\Models\{User, Team};`)
10
- */
11
- function extractPhpImports(code) {
12
- const out = new Set();
13
- const patterns = [
14
- /\b(?:require|include|require_once|include_once)\s*\(?['"]([^'"]+)['"]\)?/g,
15
- /\buse\s+([A-Z][\w\\]+(?:\s*{[^}]+})?)/g,
16
- ];
17
- for (const r of patterns) {
18
- let m;
19
- while ((m = r.exec(code))) {
20
- const val = m[1];
21
- if (val)
22
- out.add(val);
23
- }
24
- }
25
- return out;
26
- }
27
- /**
28
- * Expands grouped `use` imports into individual fully qualified names.
29
- * Example:
30
- * "App\\Models\\{User, Team}" → ["App\\Models\\User", "App\\Models\\Team"]
31
- */
32
- function expandGroupedUses(raw) {
33
- const out = new Set();
34
- for (const imp of raw) {
35
- const g = imp.match(/^(.+?)\s*{([^}]+)}/);
36
- if (g) {
37
- const base = g[1].trim().replace(/\\+$/, "");
38
- g[2]
39
- .split(",")
40
- .map((x) => x.trim())
41
- .filter(Boolean)
42
- .forEach((p) => out.add(`${base}\\${p}`));
43
- }
44
- else {
45
- out.add(imp.trim());
46
- }
47
- }
48
- return out;
49
- }
50
- //# sourceMappingURL=patterns.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"patterns.js","sourceRoot":"","sources":["../../../src/resolvers/php/patterns.ts"],"names":[],"mappings":";;AAQA,8CAgBC;AAOD,8CAgBC;AA7CD;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAC,IAAY;IAC5C,MAAM,GAAG,GAAG,IAAI,GAAG,EAAU,CAAC;IAE9B,MAAM,QAAQ,GAAa;QACzB,2EAA2E;QAC3E,wCAAwC;KACzC,CAAC;IAEF,KAAK,MAAM,CAAC,IAAI,QAAQ,EAAE,CAAC;QACzB,IAAI,CAAyB,CAAC;QAC9B,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;YAC1B,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YACjB,IAAI,GAAG;gBAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,GAAgB;IAChD,MAAM,GAAG,GAAG,IAAI,GAAG,EAAU,CAAC;IAC9B,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;QACtB,MAAM,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAC1C,IAAI,CAAC,EAAE,CAAC;YACN,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;YAC7C,CAAC,CAAC,CAAC,CAAC;iBACD,KAAK,CAAC,GAAG,CAAC;iBACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;iBACpB,MAAM,CAAC,OAAO,CAAC;iBACf,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;QAC9C,CAAC;aAAM,CAAC;YACN,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import type { PhpResolverCtx } from \"../../types\";\r\n\r\n/**\r\n * Extracts import-like references from PHP code.\r\n * Supports:\r\n * - require/include/require_once/include_once\r\n * - use statements (including grouped imports like `use App\\Models\\{User, Team};`)\r\n */\r\nexport function extractPhpImports(code: string): Set<string> {\r\n const out = new Set<string>();\r\n\r\n const patterns: RegExp[] = [\r\n /\\b(?:require|include|require_once|include_once)\\s*\\(?['\"]([^'\"]+)['\"]\\)?/g,\r\n /\\buse\\s+([A-Z][\\w\\\\]+(?:\\s*{[^}]+})?)/g,\r\n ];\r\n\r\n for (const r of patterns) {\r\n let m: RegExpExecArray | null;\r\n while ((m = r.exec(code))) {\r\n const val = m[1];\r\n if (val) out.add(val);\r\n }\r\n }\r\n return out;\r\n}\r\n\r\n/**\r\n * Expands grouped `use` imports into individual fully qualified names.\r\n * Example:\r\n * \"App\\\\Models\\\\{User, Team}\" → [\"App\\\\Models\\\\User\", \"App\\\\Models\\\\Team\"]\r\n */\r\nexport function expandGroupedUses(raw: Set<string>): Set<string> {\r\n const out = new Set<string>();\r\n for (const imp of raw) {\r\n const g = imp.match(/^(.+?)\\s*{([^}]+)}/);\r\n if (g) {\r\n const base = g[1].trim().replace(/\\\\+$/, \"\");\r\n g[2]\r\n .split(\",\")\r\n .map((x) => x.trim())\r\n .filter(Boolean)\r\n .forEach((p) => out.add(`${base}\\\\${p}`));\r\n } else {\r\n out.add(imp.trim());\r\n }\r\n }\r\n return out;\r\n}\r\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"php-resolver.js","sourceRoot":"","sources":["../../../src/resolvers/php/php-resolver.ts"],"names":[],"mappings":";;;;;AAkCA,8CAsEC;AAxGD,4CAAoB;AACpB,gDAAwB;AACxB,uDAAyE;AACzE,yCAAiD;AACjD,iCAAqC;AACrC,6CAA0C;AAC1C,yCAAuG;AACvG,uCAAwC;AAExC,+CAA6C;AAC7C,qDAAyD;AACzD,0DAAuD;AAEvD,iEAAiE;AACjE,SAAS,WAAW,CAAC,IAAY,EAAE,IAAqB;IACvD,IAAI,IAAI,EAAE,IAAI,KAAK,KAAK;QAAE,OAAO,IAAI,CAAC;IACtC,MAAM,IAAI,GAAG,IAAA,kBAAW,EAAC,IAAI,CAAC,CAAC;IAC/B,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC;IACrE,MAAM,QAAQ,GAAG,IAAA,8BAAmB,EAAC,IAAI,CAAC,CAAC;IAC3C,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AAChD,CAAC;AAED,6BAA6B;A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Uses } from \"./extract-imports\";\r\nimport { loadLaravelBindings } from \"./bindings\";\r\nimport { resolvePsr4 } from \"./psr4\";\r\nimport { logger } from \"../../lib/logger\";\r\nimport { newStats, mergeStats, unique, readFileSafe, makeExcludeMatcher, setDiff } from \"../../shared\";\r\nimport { getConfig } from \"../../store\";\r\nimport type { ResolverParams, ResolverResult, PhpResolverCtx } from \"../../types\";\r\nimport { CACHE_KEYS } from \"../../constants\";\r\nimport { CacheManager } from \"../../core/managers/cache\";\r\nimport { emptyResult } from \"../../shared/collections\";\r\n\r\n/** Ensure we have a PHP resolver context for the current root */\r\nfunction buildPhpCtx(root: string, prev?: PhpResolverCtx): PhpResolverCtx {\r\n\tif (prev?.kind === \"php\") return prev;\r\n\tconst psr4 = resolvePsr4(root);\r\n\tconst nsKeys = Object.keys(psr4).sort((a, b) => b.length - a.length);\r\n\tconst bindings = loadLaravelBindings(root);\r\n\treturn { kind: \"php\", psr4, nsKeys, bindings };\r\n}\r\n\r\n/** Namespace prefix check */\r\nfunction startsWithAnyNamespace(imp: string, nsKeys: string[]): boolean {\r\n\tfor (const k of nsKeys) if (imp.startsWith(k)) return true;\r\n\treturn false;\r\n}\r\n\r\n/**\r\n * Typed PHP resolver (aligned with JS resolver signature).\r\n * - Uses global config via getConfig()\r\n * - Returns ResolverResult (files + stats)\r\n * - Depth/visited guarded recursion\r\n */\r\nexport async function resolvePhpImports({ filePath, visited = new Set<string>(), depth = 0, maxDepth, ctx }: ResolverParams): Promise<ResolverResult> {\r\n\tconst {\r\n\t\troot: ROOT,\r\n\t\tresolve: { exclude: excludePatterns = [], depth: defaultDepth = 10 },\r\n\t} = getConfig();\r\n\r\n\tconst limitDepth = maxDepth ?? defaultDepth;\r\n\r\n\tif (depth >= limitDepth) return emptyResult(visited);\r\n\tif (visited.has(filePath)) return emptyResult(visited);\r\n\tvisited.add(filePath);\r\n\r\n\t// Fast existence / read\r\n\tif (!fs.existsSync(filePath)) return emptyResult(visited);\r\n\tconst code = readFileSafe(filePath);\r\n\tif (!code) return emptyResult(visited);\r\n\r\n\t// Context + exclusions\r\n\tconst phpCtx = buildPhpCtx(ROOT, ctx as PhpResolverCtx | undefined);\r\n\tconst isExcluded = makeExcludeMatcher(excludePatterns);\r\n\r\n\t// Parse imports (expand grouped `use` syntax)\r\n\tconst raw = extractPhpImports(code);\r\n\tconst imports = expandGroupedUses(raw);\r\n\r\n\t// Accumulators\r\n\tconst stats = newStats();\r\n\tconst filesOut: string[] = [];\r\n\r\n\tfor (const imp0 of imports) {\r\n\t\tlet imp = imp0;\r\n\r\n\t\t// Respect Laravel container bindings (Interface → Implementation)\r\n\t\tif (phpCtx.bindings[imp]) {\r\n\t\t\tlogger.debug(\"[php-resolver] binding:\", imp, \"→\", phpCtx.bindings[imp]);\r\n\t\t\timp = phpCtx.bindings[imp];\r\n\t\t}\r\n\r\n\t\t// Only resolve PSR-4 mapped namespaces\r\n\t\tif (!startsWithAnyNamespace(imp, phpCtx.nsKeys)) continue;\r\n\t\tif (isExcluded(imp)) continue;\r\n\r\n\t\tstats.expected.add(imp);\r\n\r\n\t\t// Resolve namespace → file path (sync helper retained)\r\n\t\tconst resolvedPath = await tryResolvePhpFile(imp, filePath, phpCtx.psr4);\r\n\t\tif (!resolvedPath) continue;\r\n\r\n\t\tstats.resolved.add(imp);\r\n\t\tfilesOut.push(resolvedPath);\r\n\r\n\t\t// Recurse\r\n\t\tconst sub = await resolvePhpImports({\r\n\t\t\tfilePath: resolvedPath,\r\n\t\t\tvisited,\r\n\t\t\tdepth: depth + 1,\r\n\t\t\tmaxDepth: limitDepth,\r\n\t\t\tctx: phpCtx,\r\n\t\t});\r\n\r\n\t\tfilesOut.push(...sub.files);\r\n\t\tmergeStats(stats, sub.stats);\r\n\t}\r\n\r\n\tconst out = unique(filesOut);\r\n\tconst unresolved = setDiff(stats.expected, stats.resolved);\r\n\tlogger.debug(`🪶 [php-resolver] ${path.basename(filePath)} → expected: ${stats.expected.size}, resolved: ${stats.resolved.size}`);\r\n\tif (unresolved.size) logger.debug(\"[php-resolver] unresolved:\", [...unresolved]);\r\n\r\n\treturn { files: out, visited, stats };\r\n}\r\n\r\nimport fsp from \"fs/promises\"; // (add near the top if not present)\r\n\r\nasync function tryResolvePhpFile(imp: string, fromFile: string, psr4: Record<string, string>): Promise<string | null> {\r\n\tconst key = `php:${imp}:${fromFile}`;\r\n\tconst cached = CacheManager.get(CACHE_KEYS.PHP_FILECACHE, key);\r\n\tif (cached !== undefined) return cached;\r\n\r\n\tconst nsKey = Object.keys(psr4).find((k) => imp.startsWith(k));\r\n\tif (!nsKey) {\r\n\t\tCacheManager.set(CACHE_KEYS.PHP_FILECACHE, key, null);\r\n\t\treturn null;\r\n\t}\r\n\r\n\tconst rel = imp.slice(nsKey.length).norm();\r\n\tconst tries = [path.join(psr4[nsKey], rel), path.join(psr4[nsKey], rel + \".php\"), path.join(psr4[nsKey], rel, \"index.php\")];\r\n\r\n\t// 🔹 Run all stats concurrently\r\n\tconst results = await Promise.allSettled(\r\n\t\ttries.map(async (p) => {\r\n\t\t\ttry {\r\n\t\t\t\tconst st = await fsp.stat(p);\r\n\t\t\t\treturn st.isFile() ? path.resolve(p) : null;\r\n\t\t\t} catch {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t})\r\n\t);\r\n\r\n\t//@ts-ignore\r\n\tconst resolved = results.find((r) => r.status === \"fulfilled\" && r.value)?.value ?? null;\r\n\tCacheManager.set(CACHE_KEYS.PHP_FILECACHE, key, resolved);\r\n\treturn resolved;\r\n}\r\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"psr4.js","sourceRoot":"","sources":["../../../src/resolvers/php/psr4.ts"],"names":[],"mappings":";;;;;AASA,kCA4BC;AArCD,4CAAoB;AACpB,gDAAwB;AACxB,qDAAyD;AACzD,2DAAwD;AAExD;;;GAGG;AACH,SAAgB,WAAW,CAAC,IAAY;IACvC,MAAM,MAAM,GAAG,oBAAY,CAAC,GAAG,CAAC,uBAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC3D,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC;IAE1B,MAAM,QAAQ,GAAG,cAAI,CAAC,IAAI,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;IAClD,IAAI,CAAC,YAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC9B,oBAAY,CAAC,GAAG,CAAC,uBAAU,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QAChD,OAAO,EAAE,CAAC;IACX,CAAC;IAED,IAAI,CAAC;QACJ,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,YAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAExD,CAAC;QACF,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QAC3C,MAAM,GAAG,GAA2B,EAAE,CAAC;QAEvC,KAAK,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC;YACtB,MAAM,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;YACvC,GAAG,CAAC,OAAO,CAAC,GAAG,cAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QAC5C,CAAC;QAED,oBAAY,CAAC,GAAG,CAAC,uBAAU,CAAC,QAAQ,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;QACjD,OAAO,GAAG,CAAC;IACZ,CAAC;IAAC,MAAM,CAAC;QACR,oBAAY,CAAC,GAAG,CAAC,uBAAU,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QAChD,OAAO,EAAE,CAAC;IACX,CAAC;AACF,CAAC","sourcesContent":["import fs from \"fs\";\r\nimport path from \"path\";\r\nimport { CacheManager } from \"../../core/managers/cache\";\r\nimport { CACHE_KEYS } from \"../../constants/cache-keys\";\r\n\r\n/**\r\n * Builds a PSR-4 namespace → directory map from composer.json.\r\n * Returns absolute paths in the map values.\r\n */\r\nexport function resolvePsr4(root: string): Record<string, string> {\r\n\tconst cached = CacheManager.get(CACHE_KEYS.PHP_PSR4, root);\r\n\tif (cached) return cached;\r\n\r\n\tconst composer = path.join(root, \"composer.json\");\r\n\tif (!fs.existsSync(composer)) {\r\n\t\tCacheManager.set(CACHE_KEYS.PHP_PSR4, root, {});\r\n\t\treturn {};\r\n\t}\r\n\r\n\ttry {\r\n\t\tconst data = JSON.parse(fs.readFileSync(composer, \"utf8\")) as {\r\n\t\t\tautoload?: { [\"psr-4\"]?: Record<string, string> };\r\n\t\t};\r\n\t\tconst src = data.autoload?.[\"psr-4\"] || {};\r\n\t\tconst map: Record<string, string> = {};\r\n\r\n\t\tfor (const ns in src) {\r\n\t\t\tconst cleanNs = ns.replace(/\\\\+$/, \"\");\r\n\t\t\tmap[cleanNs] = path.resolve(root, src[ns]);\r\n\t\t}\r\n\r\n\t\tCacheManager.set(CACHE_KEYS.PHP_PSR4, root, map);\r\n\t\treturn map;\r\n\t} catch {\r\n\t\tCacheManager.set(CACHE_KEYS.PHP_PSR4, root, {});\r\n\t\treturn {};\r\n\t}\r\n}\r\n"]}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- // @ts-nocheck
3
- var __importDefault = (this && this.__importDefault) || function (mod) {
4
- return (mod && mod.__esModule) ? mod : { "default": mod };
5
- };
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.isExcluded = isExcluded;
8
- const micromatch_1 = __importDefault(require("micromatch"));
9
- function isExcluded(imp, exclude = []) {
10
- return micromatch_1.default.isMatch(imp.replaceAll("\\", "/"), exclude);
11
- }
12
- //# sourceMappingURL=excludes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"excludes.js","sourceRoot":"","sources":["../../../src/resolvers/shared/excludes.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;AAId,gCAEC;AAJD,4DAAoC;AAEpC,SAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,EAAE;IAC1C,OAAO,oBAAU,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;AAChE,CAAC","sourcesContent":["// @ts-nocheck\r\n\r\nimport micromatch from \"micromatch\";\r\n\r\nexport function isExcluded(imp, exclude = []) {\r\n return micromatch.isMatch(imp.replaceAll(\"\\\\\", \"/\"), exclude);\r\n}\r\n"]}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=file-cache.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file-cache.js","sourceRoot":"","sources":["../../../src/resolvers/shared/file-cache.ts"],"names":[],"mappings":"","sourcesContent":["\r\n\r\n"]}
@@ -1,62 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.resolveAliasPath = resolveAliasPath;
7
- const fast_glob_1 = __importDefault(require("fast-glob"));
8
- const path_1 = __importDefault(require("path"));
9
- const config_1 = require("../../constants/config");
10
- const cache_1 = require("../../core/cache");
11
- /**
12
- * 🧩 resolveAliasPath()
13
- * Unifies alias lookup across config, cache, and fallback discovery.
14
- *
15
- * - Checks cfg.resolve.aliases first.
16
- * - Then cached aliases (from Cache Manager).
17
- * - If still unresolved, runs Fast-Glob to discover and cache new alias root.
18
- */
19
- async function resolveAliasPath(specifier, root, cfg) {
20
- if (!specifier.includes("/"))
21
- return null;
22
- const [aliasName, ...rest] = specifier.split("/");
23
- const remainder = rest.join("/");
24
- const knownAliases = cfg.resolve.aliases || {};
25
- const aliasKey = aliasName.startsWith("@") ? aliasName : `@${aliasName}`;
26
- // 1️⃣ Check config-defined aliases
27
- if (knownAliases[aliasKey]) {
28
- const relPart = remainder.replace(/^\/+/, "");
29
- return path_1.default.resolve(root, knownAliases[aliasKey], relPart);
30
- }
31
- // 2️⃣ Check cached aliases
32
- const cached = cache_1.CacheManager.get("aliases", aliasKey);
33
- if (cached) {
34
- const relPart = remainder.replace(/^\/+/, "");
35
- return path_1.default.resolve(root, cached, relPart);
36
- }
37
- // 3️⃣ Fallback discovery with Fast-Glob
38
- const stripped = remainder; // remove prefix before first '/'
39
- const hasExt = /\.[a-z0-9]+$/i.test(stripped);
40
- const patterns = hasExt ? [`**/${stripped}`] : [`**/${stripped}.*`, `**/${stripped}/index.*`];
41
- const matches = await (0, fast_glob_1.default)(patterns, {
42
- cwd: root,
43
- absolute: true,
44
- ignore: config_1.GLOBAL_IGNORE,
45
- });
46
- if (matches.length === 1) {
47
- return resolveMatches(matches, remainder, aliasKey);
48
- }
49
- //There are multiple matches, Assuming they match the target approximate folder.
50
- if (matches.length > 1) {
51
- const resolvedMatch = resolveMatches(matches, remainder, aliasKey);
52
- return resolvedMatch.replace(/\.[^/.]+$/, "");
53
- }
54
- return null;
55
- }
56
- function resolveMatches(matches, remainder, aliasKey) {
57
- const foundFile = matches[0];
58
- const aliasRoot = foundFile.split(remainder)[0].replace(/\\/g, "/");
59
- cache_1.CacheManager.set("aliases", aliasKey, aliasRoot);
60
- return foundFile;
61
- }
62
- //# sourceMappingURL=resolve-alias.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolve-alias.js","sourceRoot":"","sources":["../../../src/resolvers/shared/resolve-alias.ts"],"names":[],"mappings":";;;;;AAcA,4CA4CC;AA1DD,0DAA2B;AAC3B,gDAAwB;AACxB,mDAAuD;AACvD,4CAAgD;AAGhD;;;;;;;GAOG;AACI,KAAK,UAAU,gBAAgB,CAAC,SAAiB,EAAE,IAAY,EAAE,GAAiB;IACxF,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IAE1C,MAAM,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAClD,MAAM,SA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AAa;KACrB,CAAC,CAAC;IAEH,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO,cAAc,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IACrD,CAAC;IAED,gFAAgF;IAChF,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,MAAM,aAAa,GAAG,cAAc,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;QACnE,OAAO,aAAa,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IAC/C,CAAC;IAED,OAAO,IAAI,CAAC;AACb,CAAC;AAED,SAAS,cAAc,CAAC,OAAiB,EAAE,SAAiB,EAAE,QAAgB;IAC7E,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAC7B,MAAM,SAAS,GAAG,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACpE,oBAAY,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;IACjD,OAAO,SAAS,CAAC;AAClB,CAAC","sourcesContent":["import fg from \"fast-glob\";\r\nimport path from \"path\";\r\nimport { GLOBAL_IGNORE } from \"../../constants/config\";\r\nimport { CacheManager } from \"../../core/cache\";\r\nimport type { ProdexConfig } from \"../../types\";\r\n\r\n/**\r\n * 🧩 resolveAliasPath()\r\n * Unifies alias lookup across config, cache, and fallback discovery.\r\n *\r\n * - Checks cfg.resolve.aliases first.\r\n * - Then cached aliases (from Cache Manager).\r\n * - If still unresolved, runs Fast-Glob to discover and cache new alias root.\r\n */\r\nexport async function resolveAliasPath(specifier: string, root: string, cfg: ProdexConfig): Promise<string | null> {\r\n\tif (!specifier.includes(\"/\")) return null;\r\n\r\n\tconst [aliasName, ...rest] = specifier.split(\"/\");\r\n\tconst remainder = rest.join(\"/\");\r\n\tconst knownAliases = cfg.resolve.aliases || {};\r\n\tconst aliasKey = aliasName.startsWith(\"@\") ? aliasName : `@${aliasName}`;\r\n\r\n\t// 1️⃣ Check config-defined aliases\r\n\tif (knownAliases[aliasKey]) {\r\n\t\tconst relPart = remainder.replace(/^\\/+/, \"\");\r\n\t\treturn path.resolve(root, knownAliases[aliasKey], relPart);\r\n\t}\r\n\r\n\t// 2️⃣ Check cached aliases\r\n\tconst cached = CacheManager.get(\"aliases\", aliasKey);\r\n\r\n\tif (cached) {\r\n\t\tconst relPart = remainder.replace(/^\\/+/, \"\");\r\n\t\treturn path.resolve(root, cached, relPart);\r\n\t}\r\n\r\n\t// 3️⃣ Fallback discovery with Fast-Glob\r\n\tconst stripped = remainder; // remove prefix before first '/'\r\n\tconst hasExt = /\\.[a-z0-9]+$/i.test(stripped);\r\n\tconst patterns = hasExt ? [`**/${stripped}`] : [`**/${stripped}.*`, `**/${stripped}/index.*`];\r\n\r\n\tconst matches = await fg(patterns, {\r\n\t\tcwd: root,\r\n\t\tabsolute: true,\r\n\t\tignore: GLOBAL_IGNORE,\r\n\t});\r\n\r\n\tif (matches.length === 1) {\r\n\t\treturn resolveMatches(matches, remainder, aliasKey);\r\n\t}\r\n\r\n\t//There are multiple matches, Assuming they match the target approximate folder.\r\n\tif (matches.length > 1) {\r\n\t\tconst resolvedMatch = resolveMatches(matches, remainder, aliasKey);\r\n\t\treturn resolvedMatch.replace(/\\.[^/.]+$/, \"\");\r\n\t}\r\n\r\n\treturn null;\r\n}\r\n\r\nfunction resolveMatches(matches: string[], remainder: string, aliasKey: string) {\r\n\tconst foundFile = matches[0];\r\n\tconst aliasRoot = foundFile.split(remainder)[0].replace(/\\\\/g, \"/\");\r\n\tCacheManager.set(\"aliases\", aliasKey, aliasRoot);\r\n\treturn foundFile;\r\n}\r\n"]}
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.newStats = newStats;
4
- exports.mergeStats = mergeStats;
5
- exports.emptyStats = emptyStats;
6
- function newStats() {
7
- return { expected: new Set(), resolved: new Set() };
8
- }
9
- function mergeStats(target, src) {
10
- src.expected.forEach((i) => target.expected.add(i));
11
- src.resolved.forEach((i) => target.resolved.add(i));
12
- return target;
13
- }
14
- function emptyStats() {
15
- return { expected: new Set(), resolved: new Set() };
16
- }
17
- //# sourceMappingURL=stats.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stats.js","sourceRoot":"","sources":["../../../src/resolvers/shared/stats.ts"],"names":[],"mappings":";;AAEA,4BAEC;AAED,gCAIC;AAED,gCAEC;AAZD,SAAgB,QAAQ;IACvB,OAAO,EAAE,QAAQ,EAAE,IAAI,GAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,GAAG,EAAE,EAAE,CAAC;AACrD,CAAC;AAED,SAAgB,UAAU,CAAC,MAAM,EAAE,GAAG;IACrC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,OAAO,MAAM,CAAC;AACf,CAAC;AAED,SAAgB,UAAU;IACzB,OAAO,EAAE,QAAQ,EAAE,IAAI,GAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,GAAG,EAAE,EAAE,CAAC;AACrD,CAAC","sourcesContent":["import { ResolverResult } from \"../../types\";\r\n\r\nexport function newStats(): ResolverResult[\"stats\"] {\r\n\treturn { expected: new Set(), resolved: new Set() };\r\n}\r\n\r\nexport function mergeStats(target, src) {\r\n\tsrc.expected.forEach((i) => target.expected.add(i));\r\n\tsrc.resolved.forEach((i) => target.resolved.add(i));\r\n\treturn target;\r\n}\r\n\r\nexport function emptyStats(): ResolverResult[\"stats\"] {\r\n\treturn { expected: new Set(), resolved: new Set() };\r\n}\r\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"collections.js","sourceRoot":"","sources":["../../src/shared/collections.ts"],"names":[],"mappings":";;AAEA,4BAEC;AAED,gCAIC;AAMD,0BAEC;AAMD,wBAEC;AAED,kCAEC;AA5BD,SAAgB,QAAQ;IACvB,OAAO,EAAE,QAAQ,EAAE,IAAI,GAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,GAAG,EAAE,EAAE,CAAC;AACrD,CAAC;AAED,SAAgB,UAAU,CAAC,MAAM,EAAE,GAAG;IACrC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,OAAO,MAAM,CAAC;AACf,CAAC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAI,CAAS,EAAE,CAAS;IAC9C,OAAO,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACjD,CAAC;AACD;;;GAGG;AAEH,SAAgB,MAAM,CAAI,GAAQ;IACjC,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1B,CAAC;AACD,0BAA0B;AAC1B,SAAgB,WAAW,CAAC,OAAoB;IAC/C,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,GAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,GAAG,EAAE,EAAE,EAAE,CAAC;AACpF,CAAC,CAAC,4DAA4D","sourcesContent":["import { ResolverResult } from \"../types\";\r\n\r\nexport function newStats(): ResolverResult[\"stats\"] {\r\n\treturn { expected: new Set(), resolved: new Set() };\r\n}\r\n\r\nexport function mergeStats(target, src) {\r\n\tsrc.expected.forEach((i) => target.expected.add(i));\r\n\tsrc.resolved.forEach((i) => target.resolved.add(i));\r\n\treturn target;\r\n}\r\n\r\n/**\r\n * Returns a new Set of elements present in A but not in B.\r\n * Used to detect unresolved imports in JS and PHP resolvers.\r\n */\r\nexport function setDiff<A>(A: Set<A>, B: Set<A>): Set<A> {\r\n\treturn new Set([...A].filter((x) => !B.has(x)));\r\n}\r\n/**\r\n * Removes duplicates from an array.\r\n * Stateless helper used across resolvers and dependency chain.\r\n */\r\n\r\nexport function unique<T>(arr: T[]): T[] {\r\n\treturn [...new Set(arr)];\r\n}\r\n/** Empty result helper */\r\nexport function emptyResult(visited: Set<string>): ResolverResult {\r\n\treturn { files: [], visited, stats: { expected: new Set(), resolved: new Set() } };\r\n} // ---------------------------------------------------------\r\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uCAAqB;AACrB,6CAA2B;AAC3B,gDAA8B","sourcesContent":["export * from \"./io\";\r\nexport * from \"./patterns\";\r\nexport * from \"./collections\"\r\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"io.js","sourceRoot":"","sources":["../../src/shared/io.ts"],"names":[],"mappings":";AAAA,yBAAyB;;;;;AAUzB,oCAMC;AAMD,wCAWC;AAKD,kBAEC;AAtCD,kDAAsD;AACtD,gDAAwB;AACxB,4CAAoB;AACpB,2DAA8B;AAE9B;;GAEG;AACH,SAAgB,YAAY,CAAC,CAAS;IACrC,IAAI,CAAC;QACJ,OAAO,YAAE,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IACnC,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,EAAE,CAAC;IACX,CAAC;AACF,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,cAAc,CAAC,EAAU,EAAE,CAAS;IACzD,MAAM,MAAM,GAAG,oBAAY,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACvC,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC;IACxC,IAAI,CAAC;QACJ,MAAM,EAAE,GAAG,MAAM,kBAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC7B,oBAAY,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QAC5B,OAAO,EAAE,CAAC;IACX,CAAC;IAAC,MAAM,CAAC;QACR,oBAAY,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;QAC9B,OAAO,IAAI,CAAC;IACb,CAAC;AACF,CAAC;AAED;;GAEG;AACH,SAAgB,GAAG,CAAC,CAAS,EAAE,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE;IAClD,OAAO,cAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AACrD,CAAC;AACD;;GAEG","sourcesContent":["// File: src/shared/io.ts\r\n\r\nimport { CacheManager } from \"../core/managers/cache\";\r\nimport path from \"path\";\r\nimport fs from \"fs\";\r\nimport fsp from \"fs/promises\";\r\n\r\n/**\r\n * Read a file safely. Returns \"\" if the file cannot be read.\r\n */\r\nexport function readFileSafe(p: string): string {\r\n\ttry {\r\n\t\treturn fs.readFileSync(p, \"utf8\");\r\n\t} catch {\r\n\t\treturn \"\";\r\n\t}\r\n}\r\n\r\n/**\r\n * Cached version of fs.stat().\r\n * Takes a cache namespace to preserve behavior across resolvers.\r\n */\r\nexport async function safeStatCached(ns: string, p: string): Promise<import(\"fs\").Stats | null> {\r\n\tconst cached = CacheManager.get(ns, p);\r\n\tif (cached !== undefined) return cached;\r\n\ttry {\r\n\t\tconst st = await fsp.stat(p);\r\n\t\tCacheManager.set(ns, p, st);\r\n\t\treturn st;\r\n\t} catch {\r\n\t\tCacheManager.set(ns, p, null);\r\n\t\treturn null;\r\n\t}\r\n}\r\n\r\n/**\r\n * Return a path relative to a root, normalized for forward slashes.\r\n */\r\nexport function rel(p: string, root = process.cwd()): string {\r\n\treturn path.relative(root, p).replaceAll(\"\\\\\", \"/\");\r\n}\r\n/**\r\n * Get a root-relative version of a path.\r\n */\r\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"patterns.js","sourceRoot":"","sources":["../../src/shared/patterns.ts"],"names":[],"mappings":";;;;;AAOA,gCAIC;AAMD,gDAIC;AArBD,+BAA+B;AAC/B,4DAAoC;AAEpC;;;GAGG;AACH,SAAgB,UAAU,CAAC,CAAS,EAAE,WAAqB,EAAE,EAAE,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE;IACjF,IAAI,CAAC,QAAQ,EAAE,MAAM;QAAE,OAAO,KAAK,CAAC;IACpC,MAAM,OAAO,GAAG,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACxC,OAAO,oBAAU,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC/C,CAAC;AAED;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,WAAqB,EAAE;IACxD,IAAI,CAAC,QAAQ,EAAE,MAAM;QAAE,OAAO,GAAG,EAAE,CAAC,KAAK,CAAC;IAC1C,MAAM,EAAE,GAAG,oBAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACxC,OAAO,CAAC,CAAS,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;AAC1D,CAAC","sourcesContent":["// File: src/shared/patterns.ts\r\nimport micromatch from \"micromatch\";\r\n\r\n/**\r\n * Returns true if a given path matches any of the provided glob patterns.\r\n * Equivalent to core/helpers.isExcluded().\r\n */\r\nexport function isExcluded(p: string, patterns: string[] = [], root = process.cwd()): boolean {\r\n if (!patterns?.length) return false;\r\n const relPath = p.replaceAll(\"\\\\\", \"/\");\r\n return micromatch.isMatch(relPath, patterns);\r\n}\r\n\r\n/**\r\n * Builds a reusable micromatch matcher for efficiency.\r\n * Equivalent to php-resolver.makeExcludeMatcher().\r\n */\r\nexport function makeExcludeMatcher(patterns: string[] = []): (s: string) => boolean {\r\n if (!patterns?.length) return () => false;\r\n const mm = micromatch.matcher(patterns);\r\n return (s: string) => mm(String(s).replace(/\\\\/g, \"/\"));\r\n}\r\n"]}
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.newStats = newStats;
4
- exports.mergeStats = mergeStats;
5
- exports.emptyStats = emptyStats;
6
- exports.setDiff = setDiff;
7
- exports.unique = unique;
8
- function newStats() {
9
- return { expected: new Set(), resolved: new Set() };
10
- }
11
- function mergeStats(target, src) {
12
- src.expected.forEach((i) => target.expected.add(i));
13
- src.resolved.forEach((i) => target.resolved.add(i));
14
- return target;
15
- }
16
- function emptyStats() {
17
- return { expected: new Set(), resolved: new Set() };
18
- }
19
- /**
20
- * Returns a new Set of elements present in A but not in B.
21
- * Used to detect unresolved imports in JS and PHP resolvers.
22
- */
23
- function setDiff(A, B) {
24
- return new Set([...A].filter((x) => !B.has(x)));
25
- } /**
26
- * Removes duplicates from an array.
27
- * Stateless helper used across resolvers and dependency chain.
28
- */
29
- function unique(arr) {
30
- return [...new Set(arr)];
31
- }
32
- //# sourceMappingURL=stats.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stats.js","sourceRoot":"","sources":["../../src/shared/stats.ts"],"names":[],"mappings":";;AAEA,4BAEC;AAED,gCAIC;AAED,gCAEC;AAMD,0BAEC;AAKD,wBAEC;AA3BD,SAAgB,QAAQ;IACvB,OAAO,EAAE,QAAQ,EAAE,IAAI,GAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,GAAG,EAAE,EAAE,CAAC;AACrD,CAAC;AAED,SAAgB,UAAU,CAAC,MAAM,EAAE,GAAG;IACrC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,OAAO,MAAM,CAAC;AACf,CAAC;AAED,SAAgB,UAAU;IACzB,OAAO,EAAE,QAAQ,EAAE,IAAI,GAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,GAAG,EAAE,EAAE,CAAC;AACrD,CAAC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAI,CAAS,EAAE,CAAS;IAC9C,OAAO,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACjD,CAAC,CAAA;;;GAGE;AAEH,SAAgB,MAAM,CAAI,GAAQ;IACjC,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1B,CAAC","sourcesContent":["import { ResolverResult } from \"../types\";\r\n\r\nexport function newStats(): ResolverResult[\"stats\"] {\r\n\treturn { expected: new Set(), resolved: new Set() };\r\n}\r\n\r\nexport function mergeStats(target, src) {\r\n\tsrc.expected.forEach((i) => target.expected.add(i));\r\n\tsrc.resolved.forEach((i) => target.resolved.add(i));\r\n\treturn target;\r\n}\r\n\r\nexport function emptyStats(): ResolverResult[\"stats\"] {\r\n\treturn { expected: new Set(), resolved: new Set() };\r\n}\r\n\r\n/**\r\n * Returns a new Set of elements present in A but not in B.\r\n * Used to detect unresolved imports in JS and PHP resolvers.\r\n */\r\nexport function setDiff<A>(A: Set<A>, B: Set<A>): Set<A> {\r\n\treturn new Set([...A].filter((x) => !B.has(x)));\r\n}/**\r\n * Removes duplicates from an array.\r\n * Stateless helper used across resolvers and dependency chain.\r\n */\r\n\r\nexport function unique<T>(arr: T[]): T[] {\r\n\treturn [...new Set(arr)];\r\n}\r\n\r\n"]}
package/dist/store.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"store.js","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":";;;AAKA,gCAIC;AAPD,IAAI,YAAY,GAAG,IAAI,CAAC;AACxB,IAAI,WAAW,GAAG,IAAI,CAAC;AAEvB,SAAgB,UAAU,CAAC,GAAG,EAAE,KAA2B;IAC1D,YAAY,GAAG,GAAG,CAAC;IACnB,WAAW,GAAG,KAAK,CAAC;IACpB,UAAU,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC;AAC/D,CAAC;AAEM,MAAM,SAAS,GAAG,GAAiB,EAAE,CAAC,YAAY,IAAI,UAAU,CAAC,UAAU,EAAE,MAAM,CAAC;AAA9E,QAAA,SAAS,aAAqE;AACpF,MAAM,QAAQ,GAAG,GAAgB,EAAE,CAAC,WAAW,IAAI,UAAU,CAAC,UAAU,EAAE,KAAK,CAAC;AAA1E,QAAA,QAAQ,YAAkE","sourcesContent":["import { ProdexConfig, ProdexFlags } from \"./types\";\r\n\r\nlet globalConfig = null;\r\nlet globalFlags = null;\r\n\r\nexport function setGlobals(cfg, flags: Partial<ProdexFlags>) {\r\n\tglobalConfig = cfg;\r\n\tglobalFlags = flags;\r\n\tglobalThis.__PRODEX__ = Object.freeze({ config: cfg, flags });\r\n}\r\n\r\nexport const getConfig = (): ProdexConfig => globalConfig || globalThis.__PRODEX__?.config;\r\nexport const getFlags = (): ProdexFlags => globalFlags || globalThis.__PRODEX__?.flags;\r\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.types.js","sourceRoot":"","sources":["../../src/types/cli.types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG","sourcesContent":["/**\n * CLI flag schema for Prodex.\n * Mirrors the current CLI synopsis:\n *\n * prodex [entries...] [-tcdv]\n * [--txt] [--ci] [--debug] [--verbose]\n * [--name=<string>|-n=<string>]\n * [--limit=<int>|-l=<int>]\n * [--inc=<globs>] [--exc=<globs>]\n */\n\nexport interface ProdexFlags {\n\t_: string[];\n\t/** Output as .txt instead of .md (-t / --txt) */\n\ttxt?: boolean;\n\n\t/** Headless / non-interactive mode (-c / --ci) */\n\tci?: boolean;\n\n\t/** Enable debug logs (-d / --debug) */\n\tdebug?: boolean;\n\n\t/** Verbose logs (-v / --verbose) */\n\tverbose?: boolean;\n\n\tsilent?: boolean;\n\n\t/** Custom output filename (without extension) (--name / -n) */\n\tname?: string | null;\n\n\t/** Traversal limit override (--limit / -l) */\n\tlimit?: number | null;\n\n\t/** Comma-separated glob list overriding resolve.include (--inc) */\n\tinclude?: string[];\n\n\t/** Comma-separated glob list overriding resolve.exclude (--exc) */\n\texclude?: string[];\n\tfiles?: string[];\n\n\t/** Optional short alias reference mapping */\n\tshort?: {\n\t\tt?: boolean;\n\t\tc?: boolean;\n\t\td?: boolean;\n\t\tv?: boolean;\n\t\tn?: string;\n\t\tl?: number;\n\t};\n}\n\n/** Minimal run summary for logging and UX display. */\nexport interface CliSummary {\n\toutDir: string;\n\tfileName: string;\n\tentries: string[];\n}\n\nexport interface ParsedInput {\n\trootArg: string;\n\troot?: string;\n\tflags: Partial<ProdexFlags>;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.types.js","sourceRoot":"","sources":["../../src/types/config.types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Canonical configuration interface for Prodex.\n * Defines the accepted and guaranteed structure at runtime.\n */\nexport interface ProdexConfig {\n\tversion: number;\n\tname: string;\n\troot: string;\n\toutput: {\n\t\tdir: string;\n\t\tversioned: boolean;\n\t\tprefix: string;\n\t\tformat: \"md\" | \"txt\";\n\t};\n\n\tentry: {\n\t\tfiles: string[];\n\t\tui: {\n\t\t\troots: string[];\n\t\t\tscanDepth: number;\n\t\t\tpriority: string[];\n\t\t\tenablePicker?: boolean;\n\t\t};\n\t};\n\n\tresolve: {\n\t\tinclude: string[];\n\t\taliases: Record<string, string>;\n\t\texclude: string[];\n\t\tdepth: number;\n\t\tlimit: number;\n\t};\n}\n\n/** Optional helper for typed schema versions. */\nexport interface Versioned {\n\tversion: ProdexConfig[\"version\"];\n}\n\n/** Represents the user-saved config file (without runtime fields). */\nexport type ProdexConfigFile = Omit<ProdexConfig, \"root\" | \"name\">;\n\nexport type DeepPartial<T> = {\n\t[K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"core.types.js","sourceRoot":"","sources":["../../src/types/core.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ProdexConfig } from \".\";\n\n/** Shared stats type across resolvers and chain results. */\nexport interface Stats {\n\texpected: Set<string>;\n\tresolved: Set<string>;\n}\n\n/** Followed dependency chain result. */\nexport interface ChainResult {\n\tfiles: string[];\n\tstats: Stats;\n}\n\n/** Parameters for producing the final output trace file. */\nexport interface OutputParams {\n\t/** Fully resolved + included file list (already dependency-expanded). */\n\tfiles: string[];\n\n\tname: string;\n\n\t/** Active Prodex configuration (merged + flag-overridden). */\n\tcfg: ProdexConfig;\n\n\t/** Whether to show interactive prompts for filename override. */\n\tshowUi: boolean;\n}\n\n/** Options accepted by runCombine (keep lean). */\nexport interface CombineOptions {\n\tshowUi: boolean;\n\tcliName: string;\n}\n\nexport interface CombineParams {\n\tcfg: ProdexConfig;\n\topts: CombineOptions;\n}\n\n/**\n * 🧠 Cache Type Definitions for Prodex\n * Central store for runtime-discovered aliases and other ephemeral data.\n */\n\nexport interface AliasCache {\n\t[alias: string]: string;\n}\n\n/**\n * Core cache registry shape.\n * Extend this interface to include other cache namespaces (fileCache, statsCache, etc.)\n */\nexport interface CacheRegistry {\n\taliases: Map<string, string>;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,8CAA4B;AAC5B,+CAA6B;AAC7B,mDAAiC;AACjC,gDAA8B","sourcesContent":["export * from \"./config.types\";\nexport * from \"./cli.types\";\nexport * from \"./core.types\";\nexport * from \"./resolver.types\";\nexport * from \"./utils.types\";\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolver.types.js","sourceRoot":"","sources":["../../src/types/resolver.types.ts"],"names":[],"mappings":"","sourcesContent":["/** Context for JS resolver (aliases precomputed). */\nexport interface JsResolverCtx {\n kind: \"js\";\n aliases: Record<string, string>;\n}\n\n/** Context for PHP resolver (PSR-4 map, bindings, etc.). */\nexport interface PhpResolverCtx {\n kind: \"php\";\n psr4: Record<string, string>;\n nsKeys: string[];\n bindings: Record<string, string>;\n}\n\n/** Shared parameter contract for all resolvers */\nexport interface ResolverParams {\n /** Absolute path of the file being resolved */\n filePath: string;\n\n /** Set of files already visited (to prevent recursion loops) */\n visited?: Set<string>;\n\n /** Current recursion depth */\n depth?: number;\n\n /** Maximum recursion depth allowed */\n maxDepth?: number;\n\n /** Shared context cache (aliases, bindings, psr4, etc.) */\n ctx?: JsResolverCtx | PhpResolverCtx;\n}\n\n/** Standard resolver result shape for both JS and PHP. */\nexport interface ResolverResult {\n files: string[];\n visited: Set<string>;\n stats: {\n expected: Set<string>;\n resolved: Set<string>;\n };\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.types.js","sourceRoot":"","sources":["../../src/types/utils.types.ts"],"names":[],"mappings":"","sourcesContent":["type LogFn = (...args: any[]) => void;\r\nexport interface Logger {\r\n\tdebug: LogFn;\r\n\tinfo: LogFn;\r\n\twarn: LogFn;\r\n\terror: LogFn;\r\n\tlog: LogFn;\r\n\tclear: LogFn;\r\n}\r\n\r\nexport type QuestionSet<T = any> = ReadonlyArray<Record<string, any>> | Record<string, any>;\r\n"]}