locadex 0.0.1 → 0.0.2-alpha.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.
Files changed (154) hide show
  1. package/.locadex-mcp-stdio.json +9 -0
  2. package/.locadex-mcp.json +8 -0
  3. package/LICENSE.md +1 -1
  4. package/dist/cli.d.ts +3 -0
  5. package/dist/cli.d.ts.map +1 -0
  6. package/dist/cli.js +59 -0
  7. package/dist/cli.js.map +1 -0
  8. package/dist/commands/i18n.d.ts +2 -0
  9. package/dist/commands/i18n.d.ts.map +1 -0
  10. package/dist/commands/i18n.js +215 -0
  11. package/dist/commands/i18n.js.map +1 -0
  12. package/dist/commands/setup.d.ts +2 -0
  13. package/dist/commands/setup.d.ts.map +1 -0
  14. package/dist/commands/setup.js +89 -0
  15. package/dist/commands/setup.js.map +1 -0
  16. package/dist/index.d.ts +0 -1
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +5 -68
  19. package/dist/index.js.map +1 -1
  20. package/dist/logging/console.d.ts +45 -0
  21. package/dist/logging/console.d.ts.map +1 -0
  22. package/dist/logging/console.js +134 -0
  23. package/dist/logging/console.js.map +1 -0
  24. package/dist/logging/constructInfo.d.ts +3 -0
  25. package/dist/logging/constructInfo.d.ts.map +1 -0
  26. package/dist/logging/constructInfo.js +15 -0
  27. package/dist/logging/constructInfo.js.map +1 -0
  28. package/dist/logging/logger.d.ts +24 -0
  29. package/dist/logging/logger.d.ts.map +1 -0
  30. package/dist/logging/logger.js +70 -0
  31. package/dist/logging/logger.js.map +1 -0
  32. package/dist/mcp/debugger.d.ts +3 -0
  33. package/dist/mcp/debugger.d.ts.map +1 -0
  34. package/dist/mcp/debugger.js +37 -0
  35. package/dist/mcp/debugger.js.map +1 -0
  36. package/dist/mcp/getDocs.d.ts.map +1 -0
  37. package/dist/mcp/getDocs.js +56 -0
  38. package/dist/mcp/getDocs.js.map +1 -0
  39. package/dist/mcp/getGuide.d.ts +5 -0
  40. package/dist/mcp/getGuide.d.ts.map +1 -0
  41. package/dist/mcp/getGuide.js +17 -0
  42. package/dist/mcp/getGuide.js.map +1 -0
  43. package/dist/{tools → mcp/tools}/docs.d.ts +3 -0
  44. package/dist/mcp/tools/docs.d.ts.map +1 -0
  45. package/dist/mcp/tools/docs.js +86 -0
  46. package/dist/mcp/tools/docs.js.map +1 -0
  47. package/dist/mcp/tools/fileManager.d.ts +6 -0
  48. package/dist/mcp/tools/fileManager.d.ts.map +1 -0
  49. package/dist/mcp/tools/fileManager.js +233 -0
  50. package/dist/mcp/tools/fileManager.js.map +1 -0
  51. package/dist/mcp/tools/guides.d.ts +11 -0
  52. package/dist/mcp/tools/guides.d.ts.map +1 -0
  53. package/dist/mcp/tools/guides.js +130 -0
  54. package/dist/mcp/tools/guides.js.map +1 -0
  55. package/dist/mcp-sse.d.ts +3 -0
  56. package/dist/mcp-sse.d.ts.map +1 -0
  57. package/dist/mcp-sse.js +72 -0
  58. package/dist/mcp-sse.js.map +1 -0
  59. package/dist/mcp.d.ts +3 -0
  60. package/dist/mcp.d.ts.map +1 -0
  61. package/dist/mcp.js +36 -0
  62. package/dist/mcp.js.map +1 -0
  63. package/dist/prompts/system.d.ts +4 -0
  64. package/dist/prompts/system.d.ts.map +1 -0
  65. package/dist/prompts/system.js +23 -0
  66. package/dist/prompts/system.js.map +1 -0
  67. package/dist/telemetry.d.ts +11 -0
  68. package/dist/telemetry.d.ts.map +1 -0
  69. package/dist/telemetry.js +104 -0
  70. package/dist/telemetry.js.map +1 -0
  71. package/dist/types/claude-sdk.d.ts +39 -0
  72. package/dist/types/claude-sdk.d.ts.map +1 -0
  73. package/dist/types/claude-sdk.js +5 -0
  74. package/dist/types/claude-sdk.js.map +1 -0
  75. package/dist/types/cli.d.ts +7 -0
  76. package/dist/types/cli.d.ts.map +1 -0
  77. package/dist/types/cli.js +5 -0
  78. package/dist/types/cli.js.map +1 -0
  79. package/dist/utils/agentManager.d.ts +22 -0
  80. package/dist/utils/agentManager.d.ts.map +1 -0
  81. package/dist/utils/agentManager.js +110 -0
  82. package/dist/utils/agentManager.js.map +1 -0
  83. package/dist/utils/claudeCode.d.ts +24 -0
  84. package/dist/utils/claudeCode.d.ts.map +1 -0
  85. package/dist/utils/claudeCode.js +167 -0
  86. package/dist/utils/claudeCode.js.map +1 -0
  87. package/dist/utils/dag/createDag.d.ts +24 -0
  88. package/dist/utils/dag/createDag.d.ts.map +1 -0
  89. package/dist/utils/dag/createDag.js +175 -0
  90. package/dist/utils/dag/createDag.js.map +1 -0
  91. package/dist/utils/debugLogger.d.ts +3 -0
  92. package/dist/utils/debugLogger.d.ts.map +1 -0
  93. package/dist/utils/debugLogger.js +36 -0
  94. package/dist/utils/debugLogger.js.map +1 -0
  95. package/dist/utils/fs/findConfigs.d.ts +11 -0
  96. package/dist/utils/fs/findConfigs.d.ts.map +1 -0
  97. package/dist/utils/fs/findConfigs.js +63 -0
  98. package/dist/utils/fs/findConfigs.js.map +1 -0
  99. package/dist/utils/fs/getFiles.d.ts +2 -0
  100. package/dist/utils/fs/getFiles.d.ts.map +1 -0
  101. package/dist/utils/fs/getFiles.js +8 -0
  102. package/dist/utils/fs/getFiles.js.map +1 -0
  103. package/dist/utils/fs/writeFiles.d.ts +2 -0
  104. package/dist/utils/fs/writeFiles.d.ts.map +1 -0
  105. package/dist/utils/fs/writeFiles.js +19 -0
  106. package/dist/utils/fs/writeFiles.js.map +1 -0
  107. package/dist/utils/getFiles.d.ts +30 -0
  108. package/dist/utils/getFiles.d.ts.map +1 -0
  109. package/dist/utils/getFiles.js +152 -0
  110. package/dist/utils/getFiles.js.map +1 -0
  111. package/dist/utils/getPaths.d.ts +1 -0
  112. package/dist/utils/getPaths.d.ts.map +1 -1
  113. package/dist/utils/getPaths.js +19 -3
  114. package/dist/utils/getPaths.js.map +1 -1
  115. package/dist/utils/mcpConfig.d.ts +10 -0
  116. package/dist/utils/mcpConfig.d.ts.map +1 -0
  117. package/dist/utils/mcpConfig.js +13 -0
  118. package/dist/utils/mcpConfig.js.map +1 -0
  119. package/dist/utils/shared.d.ts +2 -0
  120. package/dist/utils/shared.d.ts.map +1 -0
  121. package/dist/utils/shared.js +15 -0
  122. package/dist/utils/shared.js.map +1 -0
  123. package/dist/utils/validateConfig.d.ts +2 -0
  124. package/dist/utils/validateConfig.d.ts.map +1 -0
  125. package/dist/utils/validateConfig.js +12 -0
  126. package/dist/utils/validateConfig.js.map +1 -0
  127. package/guides/next/advanced/complicated-mapping-expressions.md +200 -0
  128. package/guides/next/advanced/interpolated-strings.md +162 -0
  129. package/guides/next/advanced/migrating.md +86 -0
  130. package/guides/next/advanced/ternary-operators.md +217 -0
  131. package/guides/next/advanced/var-outside-client-component.md +446 -0
  132. package/guides/next/advanced/var-outside-client-server-component.md +550 -0
  133. package/guides/next/advanced/var-outside-server-component.md +545 -0
  134. package/guides/next/basic/branches.md +282 -0
  135. package/guides/next/basic/client-side-components.md +214 -0
  136. package/guides/next/basic/jsx.md +259 -0
  137. package/guides/next/basic/locale-selector.md +5 -0
  138. package/guides/next/basic/server-side-components.md +164 -0
  139. package/guides/next/basic/setup.md +139 -0
  140. package/guides/next/basic/translating-html.md +36 -0
  141. package/guides/next/basic/variables.md +185 -0
  142. package/guides/next/important/functions.md +37 -0
  143. package/package.json +32 -13
  144. package/dist/resources/docs.d.ts +0 -4
  145. package/dist/resources/docs.d.ts.map +0 -1
  146. package/dist/resources/docs.js +0 -176
  147. package/dist/resources/docs.js.map +0 -1
  148. package/dist/tools/docs.d.ts.map +0 -1
  149. package/dist/tools/docs.js +0 -140
  150. package/dist/tools/docs.js.map +0 -1
  151. package/dist/utils/getDocs.d.ts.map +0 -1
  152. package/dist/utils/getDocs.js +0 -113
  153. package/dist/utils/getDocs.js.map +0 -1
  154. /package/dist/{utils → mcp}/getDocs.d.ts +0 -0
@@ -0,0 +1,175 @@
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5fab3336-1142-5756-9d53-54350f075b00")}catch(e){}}();
3
+ import { logger } from '../../logging/logger.js';
4
+ import dependencyTree from 'dependency-tree';
5
+ import * as fs from 'node:fs';
6
+ import * as path from 'node:path';
7
+ export class Dag {
8
+ dag;
9
+ reverseDag;
10
+ dependenciesMap;
11
+ topologicalOrder;
12
+ constructor(dag) {
13
+ this.dag = dag;
14
+ const { reverseDag, dependenciesMap } = this.buildMaps(dag);
15
+ this.reverseDag = reverseDag;
16
+ this.dependenciesMap = dependenciesMap;
17
+ this.topologicalOrder = this.buildTopologicalOrder();
18
+ }
19
+ buildMaps(dag) {
20
+ const reverseDag = {};
21
+ const dependenciesMap = {};
22
+ // Clean the file paths recursively
23
+ const cleanedDag = cleanFilePaths(dag);
24
+ function traverse(node, parent) {
25
+ for (const [filename, subtree] of Object.entries(node)) {
26
+ // Build dependencies map - direct dependencies are the keys of subtree
27
+ if (!dependenciesMap[filename]) {
28
+ dependenciesMap[filename] = Object.keys(subtree);
29
+ }
30
+ // Build reverse DAG - if we have a parent, parent depends on filename
31
+ // So filename has parent as a dependent
32
+ if (parent) {
33
+ if (!reverseDag[filename]) {
34
+ reverseDag[filename] = [];
35
+ }
36
+ reverseDag[filename].push(parent);
37
+ }
38
+ // Recursively traverse the subtree
39
+ if (typeof subtree === 'object' && subtree !== null) {
40
+ traverse(subtree, filename);
41
+ }
42
+ }
43
+ }
44
+ traverse(cleanedDag);
45
+ return { reverseDag, dependenciesMap };
46
+ }
47
+ // No need to worry about cycles since the DAG is a tree
48
+ buildTopologicalOrder() {
49
+ const visited = new Set();
50
+ const result = [];
51
+ const dfs = (file) => {
52
+ if (visited.has(file))
53
+ return;
54
+ visited.add(file);
55
+ const dependencies = this.dependenciesMap[file] || [];
56
+ for (const dep of dependencies) {
57
+ dfs(dep);
58
+ }
59
+ result.push(file);
60
+ };
61
+ // Visit all files in the DAG
62
+ for (const file of Object.keys(this.dependenciesMap)) {
63
+ dfs(file);
64
+ }
65
+ return result;
66
+ }
67
+ // Get all direct dependencies of a file
68
+ getDependencies(filename) {
69
+ // return this.dependenciesMap[filename] || [];
70
+ return this.reverseDag[filename] || [];
71
+ }
72
+ // Get all children of a file
73
+ getDependents(filename) {
74
+ // return this.reverseDag[filename] || [];
75
+ return this.dependenciesMap[filename] || [];
76
+ }
77
+ getDag() {
78
+ return this.dag;
79
+ }
80
+ getReverseDag() {
81
+ return this.reverseDag;
82
+ }
83
+ getTopologicalOrder() {
84
+ return this.topologicalOrder;
85
+ }
86
+ }
87
+ export function createDag(directories, options) {
88
+ const allTrees = [];
89
+ const visited = {};
90
+ const nonExistent = [];
91
+ const files = discoverSourceFiles(directories);
92
+ logger.debugMessage(`Creating combined tree for ${files.length} files and ${directories.length} directories`);
93
+ files.forEach((file) => {
94
+ if (visited[file]) {
95
+ return;
96
+ }
97
+ try {
98
+ const tree = dependencyTree({
99
+ directory: process.cwd(),
100
+ filename: file,
101
+ filter: (path) => !path.includes('node_modules'),
102
+ visited: visited,
103
+ nonExistent: nonExistent,
104
+ tsConfig: options.tsConfig,
105
+ webpackConfig: options.webpackConfig,
106
+ requireConfig: options.requireConfig,
107
+ });
108
+ allTrees.push(tree);
109
+ }
110
+ catch (error) {
111
+ logger.debugMessage(`Failed to create tree for ${file}: ${error}`);
112
+ }
113
+ });
114
+ return new Dag(mergeTrees(allTrees));
115
+ }
116
+ function cleanFilePath(filePath) {
117
+ return path.relative(process.cwd(), filePath);
118
+ }
119
+ function cleanFilePaths(dag) {
120
+ const result = {};
121
+ for (const [filename, subtree] of Object.entries(dag)) {
122
+ const cleanedFilename = cleanFilePath(filename);
123
+ result[cleanedFilename] = cleanFilePaths(subtree);
124
+ }
125
+ return result;
126
+ }
127
+ function mergeTrees(trees) {
128
+ const result = {};
129
+ function mergeTree(tree, target) {
130
+ if (typeof tree === 'object' && tree !== null) {
131
+ for (const [filename, subtree] of Object.entries(tree)) {
132
+ if (!target[filename]) {
133
+ target[filename] = {};
134
+ }
135
+ mergeTree(subtree, target[filename]);
136
+ }
137
+ }
138
+ }
139
+ // Process each tree
140
+ trees.forEach((tree) => {
141
+ mergeTree(tree, result);
142
+ });
143
+ return result;
144
+ }
145
+ function discoverSourceFiles(directories) {
146
+ const files = [];
147
+ const extensions = ['.ts', '.tsx', '.js', '.jsx'];
148
+ function walkDirectory(dir) {
149
+ if (!fs.existsSync(dir))
150
+ return;
151
+ const items = fs.readdirSync(dir);
152
+ for (const item of items) {
153
+ const fullPath = path.join(dir, item);
154
+ const stat = fs.statSync(fullPath);
155
+ if (stat.isDirectory()) {
156
+ // Skip node_modules and common build/cache directories
157
+ if (!['node_modules', '.next', 'dist', 'build', '.git'].includes(item)) {
158
+ walkDirectory(fullPath);
159
+ }
160
+ }
161
+ else if (stat.isFile()) {
162
+ const ext = path.extname(item);
163
+ if (extensions.includes(ext)) {
164
+ files.push(fullPath);
165
+ }
166
+ }
167
+ }
168
+ }
169
+ for (const directory of directories) {
170
+ walkDirectory(directory);
171
+ }
172
+ return files;
173
+ }
174
+ //# sourceMappingURL=createDag.js.map
175
+ //# debugId=5fab3336-1142-5756-9d53-54350f075b00
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createDag.js","sources":["utils/dag/createDag.ts"],"sourceRoot":"/","sourcesContent":["import { logger } from '../../logging/logger.js';\nimport dependencyTree, { Tree } from 'dependency-tree';\nimport * as fs from 'node:fs';\nimport * as path from 'node:path';\n\nexport type DagOptions = {\n tsConfig?: string;\n webpackConfig?: string;\n requireConfig?: string;\n};\n\nexport type DagNode = {\n [filename: string]: DagNode;\n};\n\nexport class Dag {\n private dag: DagNode;\n private reverseDag: Record<string, string[]>;\n private dependenciesMap: Record<string, string[]>;\n private topologicalOrder: string[];\n\n constructor(dag: DagNode) {\n this.dag = dag;\n const { reverseDag, dependenciesMap } = this.buildMaps(dag);\n this.reverseDag = reverseDag;\n this.dependenciesMap = dependenciesMap;\n this.topologicalOrder = this.buildTopologicalOrder();\n }\n\n private buildMaps(dag: DagNode): {\n reverseDag: Record<string, string[]>;\n dependenciesMap: Record<string, string[]>;\n } {\n const reverseDag: Record<string, string[]> = {};\n const dependenciesMap: Record<string, string[]> = {};\n\n // Clean the file paths recursively\n const cleanedDag = cleanFilePaths(dag);\n\n function traverse(node: DagNode, parent?: string): void {\n for (const [filename, subtree] of Object.entries(node)) {\n // Build dependencies map - direct dependencies are the keys of subtree\n if (!dependenciesMap[filename]) {\n dependenciesMap[filename] = Object.keys(subtree);\n }\n\n // Build reverse DAG - if we have a parent, parent depends on filename\n // So filename has parent as a dependent\n if (parent) {\n if (!reverseDag[filename]) {\n reverseDag[filename] = [];\n }\n reverseDag[filename].push(parent);\n }\n\n // Recursively traverse the subtree\n if (typeof subtree === 'object' && subtree !== null) {\n traverse(subtree, filename);\n }\n }\n }\n\n traverse(cleanedDag);\n return { reverseDag, dependenciesMap };\n }\n\n // No need to worry about cycles since the DAG is a tree\n private buildTopologicalOrder(): string[] {\n const visited = new Set<string>();\n const result: string[] = [];\n\n const dfs = (file: string) => {\n if (visited.has(file)) return;\n visited.add(file);\n\n const dependencies = this.dependenciesMap[file] || [];\n for (const dep of dependencies) {\n dfs(dep);\n }\n\n result.push(file);\n };\n\n // Visit all files in the DAG\n for (const file of Object.keys(this.dependenciesMap)) {\n dfs(file);\n }\n\n return result;\n }\n // Get all direct dependencies of a file\n getDependencies(filename: string): string[] {\n // return this.dependenciesMap[filename] || [];\n return this.reverseDag[filename] || [];\n }\n // Get all children of a file\n getDependents(filename: string): string[] {\n // return this.reverseDag[filename] || [];\n return this.dependenciesMap[filename] || [];\n }\n\n getDag(): DagNode {\n return this.dag;\n }\n\n getReverseDag(): Record<string, string[]> {\n return this.reverseDag;\n }\n\n getTopologicalOrder(): string[] {\n return this.topologicalOrder;\n }\n}\n\nexport function createDag(directories: string[], options: DagOptions): Dag {\n const allTrees: Tree[] = [];\n const visited: dependencyTree.Tree = {};\n const nonExistent: string[] = [];\n\n const files = discoverSourceFiles(directories);\n\n logger.debugMessage(\n `Creating combined tree for ${files.length} files and ${directories.length} directories`\n );\n\n files.forEach((file) => {\n if (visited[file]) {\n return;\n }\n\n try {\n const tree = dependencyTree({\n directory: process.cwd(),\n filename: file,\n filter: (path: string) => !path.includes('node_modules'),\n visited: visited,\n nonExistent: nonExistent,\n tsConfig: options.tsConfig,\n webpackConfig: options.webpackConfig,\n requireConfig: options.requireConfig,\n });\n allTrees.push(tree);\n } catch (error) {\n logger.debugMessage(`Failed to create tree for ${file}: ${error}`);\n }\n });\n\n return new Dag(mergeTrees(allTrees));\n}\n\nfunction cleanFilePath(filePath: string): string {\n return path.relative(process.cwd(), filePath);\n}\n\nfunction cleanFilePaths(dag: DagNode): DagNode {\n const result: DagNode = {};\n\n for (const [filename, subtree] of Object.entries(dag)) {\n const cleanedFilename = cleanFilePath(filename);\n result[cleanedFilename] = cleanFilePaths(subtree);\n }\n\n return result;\n}\n\nfunction mergeTrees(trees: Tree[]): DagNode {\n const result: DagNode = {};\n\n function mergeTree(tree: Tree, target: DagNode): void {\n if (typeof tree === 'object' && tree !== null) {\n for (const [filename, subtree] of Object.entries(tree)) {\n if (!target[filename]) {\n target[filename] = {};\n }\n mergeTree(subtree, target[filename]);\n }\n }\n }\n\n // Process each tree\n trees.forEach((tree) => {\n mergeTree(tree, result);\n });\n\n return result;\n}\n\nfunction discoverSourceFiles(directories: string[]): string[] {\n const files: string[] = [];\n const extensions = ['.ts', '.tsx', '.js', '.jsx'];\n\n function walkDirectory(dir: string) {\n if (!fs.existsSync(dir)) return;\n\n const items = fs.readdirSync(dir);\n\n for (const item of items) {\n const fullPath = path.join(dir, item);\n const stat = fs.statSync(fullPath);\n\n if (stat.isDirectory()) {\n // Skip node_modules and common build/cache directories\n if (\n !['node_modules', '.next', 'dist', 'build', '.git'].includes(item)\n ) {\n walkDirectory(fullPath);\n }\n } else if (stat.isFile()) {\n const ext = path.extname(item);\n if (extensions.includes(ext)) {\n files.push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;QACH,CAAC;IACH,CAAC;IAED,KAAK,MAAM,SAAS,IAAI,WAAW,EAAE,CAAC;QACpC,aAAa,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC","debug_id":"5fab3336-1142-5756-9d53-54350f075b00"}
@@ -0,0 +1,3 @@
1
+ export declare function debugLog(...args: any[]): void;
2
+ export declare function getDebugLogLocation(): string;
3
+ //# sourceMappingURL=debugLogger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debugLogger.d.ts","sourceRoot":"/","sources":["utils/debugLogger.ts"],"names":[],"mappings":"AAqBA,wBAAgB,QAAQ,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAgB7C;AAED,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C"}
@@ -0,0 +1,36 @@
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="728d6d1d-2ed7-569b-8a04-bbe65558e2ba")}catch(e){}}();
3
+ import { existsSync, mkdirSync, appendFileSync } from 'node:fs';
4
+ import { join } from 'node:path';
5
+ import { randomBytes } from 'node:crypto';
6
+ let debugLogPath = null;
7
+ function getDebugLogPath() {
8
+ if (!debugLogPath) {
9
+ const uniqueId = randomBytes(8).toString('hex');
10
+ const debugDir = join(process.cwd(), '.tmp', uniqueId);
11
+ if (!existsSync(debugDir)) {
12
+ mkdirSync(debugDir, { recursive: true });
13
+ }
14
+ debugLogPath = join(debugDir, 'out.txt');
15
+ }
16
+ return debugLogPath;
17
+ }
18
+ export function debugLog(...args) {
19
+ const logPath = getDebugLogPath();
20
+ const timestamp = new Date().toISOString();
21
+ const message = args.map(arg => typeof arg === 'object' ? JSON.stringify(arg, null, 2) : String(arg)).join(' ');
22
+ const logEntry = `[${timestamp}] ${message}\n`;
23
+ try {
24
+ appendFileSync(logPath, logEntry);
25
+ }
26
+ catch (error) {
27
+ // Fallback to console if file writing fails
28
+ console.error('Debug log write failed:', error);
29
+ console.log(...args);
30
+ }
31
+ }
32
+ export function getDebugLogLocation() {
33
+ return getDebugLogPath();
34
+ }
35
+ //# sourceMappingURL=debugLogger.js.map
36
+ //# debugId=728d6d1d-2ed7-569b-8a04-bbe65558e2ba
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debugLogger.js","sources":["utils/debugLogger.ts"],"sourceRoot":"/","sourcesContent":["import { writeFileSync, existsSync, mkdirSync, appendFileSync } from 'node:fs';\nimport { join, dirname } from 'node:path';\nimport { randomBytes } from 'node:crypto';\n\nlet debugLogPath: string | null = null;\n\nfunction getDebugLogPath(): string {\n if (!debugLogPath) {\n const uniqueId = randomBytes(8).toString('hex');\n const debugDir = join(process.cwd(), '.tmp', uniqueId);\n \n if (!existsSync(debugDir)) {\n mkdirSync(debugDir, { recursive: true });\n }\n \n debugLogPath = join(debugDir, 'out.txt');\n }\n \n return debugLogPath;\n}\n\nexport function debugLog(...args: any[]): void {\n const logPath = getDebugLogPath();\n const timestamp = new Date().toISOString();\n const message = args.map(arg => \n typeof arg === 'object' ? JSON.stringify(arg, null, 2) : String(arg)\n ).join(' ');\n \n const logEntry = `[${timestamp}] ${message}\\n`;\n \n try {\n appendFileSync(logPath, logEntry);\n } catch (error) {\n // Fallback to console if file writing fails\n console.error('Debug log write failed:', error);\n console.log(...args);\n }\n}\n\nexport function getDebugLogLocation(): string {\n return getDebugLogPath();\n}"],"names":[],"mappings":";;AAAA,OAAO,EAAiB,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC/E,OAAO,EAAE,IAAI,EAAW,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,IAAI,YAAY,GAAkB,IAAI,CAAC;AAEvC,SAAS,eAAe;IACtB,IAAI,CAA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O,eAAe,EAAE,CAAC;AAC3B,CAAC","debug_id":"728d6d1d-2ed7-569b-8a04-bbe65558e2ba"}
@@ -0,0 +1,11 @@
1
+ export declare function findTsConfig(): string | undefined;
2
+ export declare function findWebpackConfig(): string | undefined;
3
+ /**
4
+ * Resolve the file paths from the given file paths or default paths.
5
+ * @param {string[]} paths - The file paths to resolve.
6
+ * @param {string} errorMessage - The error message to throw if no paths are found.
7
+ * @returns {string[]} - The resolved file paths.
8
+ */
9
+ export declare function findRequireConfig(): string | undefined;
10
+ export declare function findFilepaths(paths: string[]): string[];
11
+ //# sourceMappingURL=findConfigs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"findConfigs.d.ts","sourceRoot":"/","sources":["utils/fs/findConfigs.ts"],"names":[],"mappings":"AAGA,wBAAgB,YAAY,IAAI,MAAM,GAAG,SAAS,CAejD;AAED,wBAAgB,iBAAiB,IAAI,MAAM,GAAG,SAAS,CAgBtD;AACD;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,GAAG,SAAS,CActD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAQvD"}
@@ -0,0 +1,63 @@
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c5944047-538f-5ac2-a4c8-a3dbe5e4ba6b")}catch(e){}}();
3
+ import path from 'node:path';
4
+ import fs from 'node:fs';
5
+ export function findTsConfig() {
6
+ const cwd = process.cwd();
7
+ const possiblePaths = [
8
+ path.join(cwd, 'tsconfig.json'),
9
+ path.join(cwd, 'tsconfig.app.json'),
10
+ path.join(cwd, 'jsconfig.json'),
11
+ ];
12
+ for (const configPath of possiblePaths) {
13
+ if (fs.existsSync(configPath)) {
14
+ return configPath;
15
+ }
16
+ }
17
+ return undefined;
18
+ }
19
+ export function findWebpackConfig() {
20
+ const cwd = process.cwd();
21
+ const possiblePaths = [
22
+ path.join(cwd, 'webpack.config.js'),
23
+ path.join(cwd, 'webpack.config.ts'),
24
+ path.join(cwd, 'next.config.js'),
25
+ path.join(cwd, 'next.config.ts'),
26
+ ];
27
+ for (const configPath of possiblePaths) {
28
+ if (fs.existsSync(configPath)) {
29
+ return configPath;
30
+ }
31
+ }
32
+ return undefined;
33
+ }
34
+ /**
35
+ * Resolve the file paths from the given file paths or default paths.
36
+ * @param {string[]} paths - The file paths to resolve.
37
+ * @param {string} errorMessage - The error message to throw if no paths are found.
38
+ * @returns {string[]} - The resolved file paths.
39
+ */
40
+ export function findRequireConfig() {
41
+ const cwd = process.cwd();
42
+ const possiblePaths = [
43
+ path.join(cwd, 'require.config.js'),
44
+ path.join(cwd, 'requirejs.config.js'),
45
+ ];
46
+ for (const configPath of possiblePaths) {
47
+ if (fs.existsSync(configPath)) {
48
+ return configPath;
49
+ }
50
+ }
51
+ return undefined;
52
+ }
53
+ export function findFilepaths(paths) {
54
+ const resolvedPaths = [];
55
+ for (const possiblePath of paths) {
56
+ if (fs.existsSync(possiblePath)) {
57
+ resolvedPaths.push(possiblePath);
58
+ }
59
+ }
60
+ return resolvedPaths;
61
+ }
62
+ //# sourceMappingURL=findConfigs.js.map
63
+ //# debugId=c5944047-538f-5ac2-a4c8-a3dbe5e4ba6b
@@ -0,0 +1 @@
1
+ {"version":3,"file":"findConfigs.js","sources":["utils/fs/findConfigs.ts"],"sourceRoot":"/","sourcesContent":["import path from 'node:path';\nimport fs from 'node:fs';\n\nexport function findTsConfig(): string | undefined {\n const cwd = process.cwd();\n const possiblePaths = [\n path.join(cwd, 'tsconfig.json'),\n path.join(cwd, 'tsconfig.app.json'),\n path.join(cwd, 'jsconfig.json'),\n ];\n\n for (const configPath of possiblePaths) {\n if (fs.existsSync(configPath)) {\n return configPath;\n }\n }\n\n return undefined;\n}\n\nexport function findWebpackConfig(): string | undefined {\n const cwd = process.cwd();\n const possiblePaths = [\n path.join(cwd, 'webpack.config.js'),\n path.join(cwd, 'webpack.config.ts'),\n path.join(cwd, 'next.config.js'),\n path.join(cwd, 'next.config.ts'),\n ];\n\n for (const configPath of possiblePaths) {\n if (fs.existsSync(configPath)) {\n return configPath;\n }\n }\n\n return undefined;\n}\n/**\n * Resolve the file paths from the given file paths or default paths.\n * @param {string[]} paths - The file paths to resolve.\n * @param {string} errorMessage - The error message to throw if no paths are found.\n * @returns {string[]} - The resolved file paths.\n */\nexport function findRequireConfig(): string | undefined {\n const cwd = process.cwd();\n const possiblePaths = [\n path.join(cwd, 'require.config.js'),\n path.join(cwd, 'requirejs.config.js'),\n ];\n\n for (const configPath of possiblePaths) {\n if (fs.existsSync(configPath)) {\n return configPath;\n }\n }\n\n return undefined;\n}\n\nexport function findFilepaths(paths: string[]): string[] {\n const resolvedPaths: string[] = [];\n for (const possiblePath of paths) {\n if (fs.existsSync(possiblePath)) {\n resolvedPaths.push(possiblePath);\n }\n }\n return resolvedPaths;\n}\n"],"names":[],"mappings":";;AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzB,MAAM,UAAU,YAAY;IAC1B,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAC1B,MAAM,aAAa,GAAG;QACpB,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,eAAe,CAAC;QAC/B,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,mBAAmB,CAAC;QACnC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,eAAe,CAAC;KAChC,CAAC;IAEF,KAAK,MAAM,UAAU,IAAI,aAAa,EAAE,CAAC;QACvC,IAAI,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YAC9B,OAAO,UAAU,CAAC;QACpB,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,iB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B,CAAC","debug_id":"c5944047-538f-5ac2-a4c8-a3dbe5e4ba6b"}
@@ -0,0 +1,2 @@
1
+ export declare function getNextDirectories(): string[];
2
+ //# sourceMappingURL=getFiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFiles.d.ts","sourceRoot":"/","sources":["utils/fs/getFiles.ts"],"names":[],"mappings":"AAEA,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAE7C"}
@@ -0,0 +1,8 @@
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5880a845-edd4-5978-b1b6-c3042850b994")}catch(e){}}();
3
+ import { findFilepaths } from './findConfigs.js';
4
+ export function getNextDirectories() {
5
+ return findFilepaths(['./src', './app', './pages']);
6
+ }
7
+ //# sourceMappingURL=getFiles.js.map
8
+ //# debugId=5880a845-edd4-5978-b1b6-c3042850b994
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFiles.js","sources":["utils/fs/getFiles.ts"],"sourceRoot":"/","sourcesContent":["import { findFilepaths } from './findConfigs.js';\n\nexport function getNextDirectories(): string[] {\n return findFilepaths(['./src', './app', './pages']);\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,UAAU,kBAAkB;IAChC,OAAO,aAAa,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;AACtD,CAAC","debug_id":"5880a845-edd4-5978-b1b6-c3042850b994"}
@@ -0,0 +1,2 @@
1
+ export declare function addToGitIgnore(relativeDirPath: string, fileName: string): Promise<void>;
2
+ //# sourceMappingURL=writeFiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"writeFiles.d.ts","sourceRoot":"/","sources":["utils/fs/writeFiles.ts"],"names":[],"mappings":"AAIA,wBAAsB,cAAc,CAClC,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,MAAM,iBAmBjB"}
@@ -0,0 +1,19 @@
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2167fd1f-2d12-53df-8e71-446f613756d0")}catch(e){}}();
3
+ import path from 'node:path';
4
+ import fs from 'node:fs';
5
+ // Add a file to the .gitignore file
6
+ export async function addToGitIgnore(relativeDirPath, fileName) {
7
+ const gitignoreFile = path.join(relativeDirPath, '.gitignore');
8
+ if (fs.existsSync(gitignoreFile)) {
9
+ const gitignoreContent = await fs.promises.readFile(gitignoreFile, 'utf8');
10
+ if (!gitignoreContent.includes(fileName)) {
11
+ await fs.promises.appendFile(gitignoreFile, `\n# Locadex\n${fileName}\n`, 'utf8');
12
+ }
13
+ }
14
+ else {
15
+ await fs.promises.writeFile(gitignoreFile, `# Locadex\n${fileName}\n`, 'utf8');
16
+ }
17
+ }
18
+ //# sourceMappingURL=writeFiles.js.map
19
+ //# debugId=2167fd1f-2d12-53df-8e71-446f613756d0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"writeFiles.js","sources":["utils/fs/writeFiles.ts"],"sourceRoot":"/","sourcesContent":["import path from 'node:path';\nimport fs from 'node:fs';\n\n// Add a file to the .gitignore file\nexport async function addToGitIgnore(\n relativeDirPath: string,\n fileName: string\n) {\n const gitignoreFile = path.join(relativeDirPath, '.gitignore');\n if (fs.existsSync(gitignoreFile)) {\n const gitignoreContent = await fs.promises.readFile(gitignoreFile, 'utf8');\n if (!gitignoreContent.includes(fileName)) {\n await fs.promises.appendFile(\n gitignoreFile,\n `\\n# Locadex\\n${fileName}\\n`,\n 'utf8'\n );\n }\n } else {\n await fs.promises.writeFile(\n gitignoreFile,\n `# Locadex\\n${fileName}\\n`,\n 'utf8'\n );\n }\n}\n"],"names":[],"mappings":";;AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzB,oCAAoC;AACpC,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,eAAuB,EACvB,QAAgB;IAEhB,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;IAC/D,IAAI,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;QACjC,MAAM,gBAAgB,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;QAC3E,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;YACzC,MAAM,EAAE,CAAC,QAAQ,CAAC,UAAU,CAC1B,aAAa,EACb,gBAAgB,QAAQ,IAAI,EAC5B,MAAM,CACP,CAAC;QACJ,CAAC;IACH,CAAC;SAAM,CAAC;QACN,MAAM,EAAE,CAAC,QAAQ,CAAC,SAAS,CACzB,aAAa,EACb,cAAc,QAAQ,IAAI,EAC1B,MAAM,CACP,CAAC;IACJ,CAAC;AACH,CAAC","debug_id":"2167fd1f-2d12-53df-8e71-446f613756d0"}
@@ -0,0 +1,30 @@
1
+ export interface FileEntry {
2
+ path: string;
3
+ addedAt: string;
4
+ setToInProgressAt: string | null;
5
+ setToEditedAt: string | null;
6
+ status: 'pending' | 'in_progress' | 'edited';
7
+ }
8
+ export declare function scanNextJsAppFiles(projectPath?: string): string[];
9
+ export declare function addFilesToManager(projectPath?: string, files?: string[]): string;
10
+ export declare function cleanUp(stateFilePath: string): void;
11
+ export declare function markFileAsInProgress(filePath: string, stateFilePath: string): void;
12
+ export declare function markFileAsEdited(filePath: string, stateFilePath: string): void;
13
+ export declare function addNextJsFilesToManager(stateFilePath: string, projectPath?: string): {
14
+ added: string[];
15
+ existing: string[];
16
+ };
17
+ export declare function getCurrentFileList(stateFilePath: string): {
18
+ path: string;
19
+ addedAt: string;
20
+ setToInProgressAt: string | null;
21
+ setToEditedAt: string | null;
22
+ status: 'pending' | 'in_progress' | 'edited';
23
+ }[];
24
+ export declare function getNextJsAppRouterStats(projectPath?: string): {
25
+ totalFiles: number;
26
+ tsFiles: number;
27
+ tsxFiles: number;
28
+ directories: Set<string>;
29
+ };
30
+ //# sourceMappingURL=getFiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFiles.d.ts","sourceRoot":"/","sources":["utils/getFiles.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,SAAS,GAAG,aAAa,GAAG,QAAQ,CAAC;CAC9C;AA2FD,wBAAgB,kBAAkB,CAChC,WAAW,GAAE,MAAsB,GAClC,MAAM,EAAE,CAEV;AAGD,wBAAgB,iBAAiB,CAC/B,WAAW,GAAE,MAAsB,EACnC,KAAK,GAAE,MAAM,EAAO,GACnB,MAAM,CAQR;AAGD,wBAAgB,OAAO,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAKnD;AAGD,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,GACpB,IAAI,CAEN;AAGD,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,GACpB,IAAI,CAEN;AAED,wBAAgB,uBAAuB,CACrC,aAAa,EAAE,MAAM,EACrB,WAAW,GAAE,MAAsB,GAClC;IACD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAkBA;AAED,wBAAgB,kBAAkB,CAAC,aAAa,EAAE,MAAM,GAAG;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,SAAS,GAAG,aAAa,GAAG,QAAQ,CAAC;CAC9C,EAAE,CAEF;AAED,wBAAgB,uBAAuB,CAAC,WAAW,GAAE,MAAsB,GAAG;IAC5E,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC1B,CA4BA"}
@@ -0,0 +1,152 @@
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="11b35163-7099-5536-9e87-cedb97d678ca")}catch(e){}}();
3
+ import { readdirSync, statSync, existsSync, rmSync, } from 'node:fs';
4
+ import { join, relative } from 'node:path';
5
+ import { readFileSync, writeFileSync } from 'node:fs';
6
+ import { logger } from '../logging/logger.js';
7
+ function getFileList(filePath) {
8
+ if (!existsSync(filePath)) {
9
+ return [];
10
+ }
11
+ try {
12
+ return JSON.parse(readFileSync(filePath, 'utf8'));
13
+ }
14
+ catch {
15
+ return [];
16
+ }
17
+ }
18
+ function saveFileList(files, filePath) {
19
+ writeFileSync(filePath, JSON.stringify(files, null, 2));
20
+ }
21
+ function addFileToList(filePath, stateFilePath, status = 'pending') {
22
+ const files = getFileList(stateFilePath);
23
+ const existingIndex = files.findIndex((f) => f.path === filePath);
24
+ const now = new Date().toISOString();
25
+ if (existingIndex >= 0) {
26
+ const file = files[existingIndex];
27
+ const previousStatus = file.status;
28
+ file.status = status;
29
+ if (status === 'in_progress' && previousStatus !== 'in_progress') {
30
+ file.setToInProgressAt = now;
31
+ }
32
+ else if (status === 'edited' && previousStatus !== 'edited') {
33
+ file.setToEditedAt = now;
34
+ }
35
+ }
36
+ else {
37
+ files.push({
38
+ path: filePath,
39
+ addedAt: now,
40
+ setToInProgressAt: status === 'in_progress' ? now : null,
41
+ setToEditedAt: status === 'edited' ? now : null,
42
+ status,
43
+ });
44
+ }
45
+ saveFileList(files, stateFilePath);
46
+ }
47
+ function isTypeScriptFile(filePath) {
48
+ const fileName = filePath.split('/').pop() || '';
49
+ return fileName.endsWith('.ts') || fileName.endsWith('.tsx');
50
+ }
51
+ function scanDirectory(dirPath, basePath) {
52
+ const files = [];
53
+ if (!existsSync(dirPath)) {
54
+ return files;
55
+ }
56
+ try {
57
+ const items = readdirSync(dirPath);
58
+ for (const item of items) {
59
+ const fullPath = join(dirPath, item);
60
+ const stat = statSync(fullPath);
61
+ if (stat.isDirectory()) {
62
+ // Skip node_modules, .next, and other common directories to ignore
63
+ if (!['node_modules', '.next', '.git', 'dist', 'build', 'out'].includes(item)) {
64
+ files.push(...scanDirectory(fullPath, basePath));
65
+ }
66
+ }
67
+ else if (stat.isFile()) {
68
+ const relativePath = relative(basePath, fullPath);
69
+ if (isTypeScriptFile(relativePath)) {
70
+ files.push(relativePath);
71
+ }
72
+ }
73
+ }
74
+ }
75
+ catch (error) {
76
+ logger.warning(`Warning: Could not read directory ${dirPath}: ${error}`);
77
+ }
78
+ return files;
79
+ }
80
+ export function scanNextJsAppFiles(projectPath = process.cwd()) {
81
+ return scanDirectory(projectPath, projectPath);
82
+ }
83
+ // Used by dag command
84
+ export function addFilesToManager(projectPath = process.cwd(), files = []) {
85
+ const existingFiles = getFileList(projectPath);
86
+ const existingPaths = new Set(existingFiles.map((f) => f.path));
87
+ files = files.filter((f) => !existingPaths.has(f));
88
+ files.forEach((filePath) => addFileToList(filePath, projectPath, 'pending'));
89
+ return projectPath;
90
+ }
91
+ // Used by dag command
92
+ export function cleanUp(stateFilePath) {
93
+ const locadexDir = '.locadex';
94
+ if (existsSync(locadexDir)) {
95
+ rmSync(locadexDir, { recursive: true, force: true });
96
+ }
97
+ }
98
+ // Used by dag command
99
+ export function markFileAsInProgress(filePath, stateFilePath) {
100
+ addFileToList(filePath, stateFilePath, 'in_progress');
101
+ }
102
+ // Used by dag command
103
+ export function markFileAsEdited(filePath, stateFilePath) {
104
+ addFileToList(filePath, stateFilePath, 'edited');
105
+ }
106
+ export function addNextJsFilesToManager(stateFilePath, projectPath = process.cwd()) {
107
+ const discoveredFiles = scanNextJsAppFiles(projectPath);
108
+ const existingFiles = getFileList(stateFilePath);
109
+ const existingPaths = new Set(existingFiles.map((f) => f.path));
110
+ const added = [];
111
+ const existing = [];
112
+ for (const filePath of discoveredFiles) {
113
+ if (existingPaths.has(filePath)) {
114
+ existing.push(filePath);
115
+ }
116
+ else {
117
+ addFileToList(filePath, stateFilePath, 'pending');
118
+ added.push(filePath);
119
+ }
120
+ }
121
+ return { added, existing };
122
+ }
123
+ export function getCurrentFileList(stateFilePath) {
124
+ return getFileList(stateFilePath);
125
+ }
126
+ export function getNextJsAppRouterStats(projectPath = process.cwd()) {
127
+ const files = scanNextJsAppFiles(projectPath);
128
+ let tsFiles = 0;
129
+ let tsxFiles = 0;
130
+ const directories = new Set();
131
+ for (const filePath of files) {
132
+ const fileName = filePath.split('/').pop() || '';
133
+ const dirPath = filePath.split('/').slice(0, -1).join('/');
134
+ if (dirPath) {
135
+ directories.add(dirPath);
136
+ }
137
+ if (fileName.endsWith('.ts')) {
138
+ tsFiles++;
139
+ }
140
+ else if (fileName.endsWith('.tsx')) {
141
+ tsxFiles++;
142
+ }
143
+ }
144
+ return {
145
+ totalFiles: files.length,
146
+ tsFiles,
147
+ tsxFiles,
148
+ directories,
149
+ };
150
+ }
151
+ //# sourceMappingURL=getFiles.js.map
152
+ //# debugId=11b35163-7099-5536-9e87-cedb97d678ca
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFiles.js","sources":["utils/getFiles.ts"],"sourceRoot":"/","sourcesContent":["import {\n readdirSync,\n statSync,\n existsSync,\n mkdirSync,\n unlinkSync,\n rmSync,\n} from 'node:fs';\nimport { join, relative, dirname } from 'node:path';\nimport { readFileSync, writeFileSync } from 'node:fs';\nimport { logger } from '../logging/logger.js';\n\nexport interface FileEntry {\n path: string;\n addedAt: string;\n setToInProgressAt: string | null;\n setToEditedAt: string | null;\n status: 'pending' | 'in_progress' | 'edited';\n}\n\nfunction getFileList(filePath: string): FileEntry[] {\n if (!existsSync(filePath)) {\n return [];\n }\n try {\n return JSON.parse(readFileSync(filePath, 'utf8'));\n } catch {\n return [];\n }\n}\n\nfunction saveFileList(files: FileEntry[], filePath: string): void {\n writeFileSync(filePath, JSON.stringify(files, null, 2));\n}\n\nfunction addFileToList(\n filePath: string,\n stateFilePath: string,\n status: 'pending' | 'in_progress' | 'edited' = 'pending'\n): void {\n const files = getFileList(stateFilePath);\n const existingIndex = files.findIndex((f) => f.path === filePath);\n const now = new Date().toISOString();\n\n if (existingIndex >= 0) {\n const file = files[existingIndex];\n const previousStatus = file.status;\n file.status = status;\n\n if (status === 'in_progress' && previousStatus !== 'in_progress') {\n file.setToInProgressAt = now;\n } else if (status === 'edited' && previousStatus !== 'edited') {\n file.setToEditedAt = now;\n }\n } else {\n files.push({\n path: filePath,\n addedAt: now,\n setToInProgressAt: status === 'in_progress' ? now : null,\n setToEditedAt: status === 'edited' ? now : null,\n status,\n });\n }\n\n saveFileList(files, stateFilePath);\n}\n\nfunction isTypeScriptFile(filePath: string): boolean {\n const fileName = filePath.split('/').pop() || '';\n return fileName.endsWith('.ts') || fileName.endsWith('.tsx');\n}\n\nfunction scanDirectory(dirPath: string, basePath: string): string[] {\n const files: string[] = [];\n\n if (!existsSync(dirPath)) {\n return files;\n }\n\n try {\n const items = readdirSync(dirPath);\n\n for (const item of items) {\n const fullPath = join(dirPath, item);\n const stat = statSync(fullPath);\n\n if (stat.isDirectory()) {\n // Skip node_modules, .next, and other common directories to ignore\n if (\n !['node_modules', '.next', '.git', 'dist', 'build', 'out'].includes(\n item\n )\n ) {\n files.push(...scanDirectory(fullPath, basePath));\n }\n } else if (stat.isFile()) {\n const relativePath = relative(basePath, fullPath);\n if (isTypeScriptFile(relativePath)) {\n files.push(relativePath);\n }\n }\n }\n } catch (error) {\n logger.warning(`Warning: Could not read directory ${dirPath}: ${error}`);\n }\n\n return files;\n}\n\nexport function scanNextJsAppFiles(\n projectPath: string = process.cwd()\n): string[] {\n return scanDirectory(projectPath, projectPath);\n}\n\n// Used by dag command\nexport function addFilesToManager(\n projectPath: string = process.cwd(),\n files: string[] = []\n): string {\n const existingFiles = getFileList(projectPath);\n const existingPaths = new Set(existingFiles.map((f) => f.path));\n files = files.filter((f) => !existingPaths.has(f));\n\n files.forEach((filePath) => addFileToList(filePath, projectPath, 'pending'));\n\n return projectPath;\n}\n\n// Used by dag command\nexport function cleanUp(stateFilePath: string): void {\n const locadexDir = '.locadex';\n if (existsSync(locadexDir)) {\n rmSync(locadexDir, { recursive: true, force: true });\n }\n}\n\n// Used by dag command\nexport function markFileAsInProgress(\n filePath: string,\n stateFilePath: string\n): void {\n addFileToList(filePath, stateFilePath, 'in_progress');\n}\n\n// Used by dag command\nexport function markFileAsEdited(\n filePath: string,\n stateFilePath: string\n): void {\n addFileToList(filePath, stateFilePath, 'edited');\n}\n\nexport function addNextJsFilesToManager(\n stateFilePath: string,\n projectPath: string = process.cwd()\n): {\n added: string[];\n existing: string[];\n} {\n const discoveredFiles = scanNextJsAppFiles(projectPath);\n const existingFiles = getFileList(stateFilePath);\n const existingPaths = new Set(existingFiles.map((f) => f.path));\n\n const added: string[] = [];\n const existing: string[] = [];\n\n for (const filePath of discoveredFiles) {\n if (existingPaths.has(filePath)) {\n existing.push(filePath);\n } else {\n addFileToList(filePath, stateFilePath, 'pending');\n added.push(filePath);\n }\n }\n\n return { added, existing };\n}\n\nexport function getCurrentFileList(stateFilePath: string): {\n path: string;\n addedAt: string;\n setToInProgressAt: string | null;\n setToEditedAt: string | null;\n status: 'pending' | 'in_progress' | 'edited';\n}[] {\n return getFileList(stateFilePath);\n}\n\nexport function getNextJsAppRouterStats(projectPath: string = process.cwd()): {\n totalFiles: number;\n tsFiles: number;\n tsxFiles: number;\n directories: Set<string>;\n} {\n const files = scanNextJsAppFiles(projectPath);\n\n let tsFiles = 0;\n let tsxFiles = 0;\n const directories = new Set<string>();\n\n for (const filePath of files) {\n const fileName = filePath.split('/').pop() || '';\n const dirPath = filePath.split('/').slice(0, -1).join('/');\n\n if (dirPath) {\n directories.add(dirPath);\n }\n\n if (fileName.endsWith('.ts')) {\n tsFiles++;\n } else if (fileName.endsWith('.tsx')) {\n tsxFiles++;\n }\n }\n\n return {\n totalFiles: files.length,\n tsFiles,\n tsxFiles,\n directories,\n };\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EACL,WAAW,EACX,QAAQ,EACR,UAAU,EAGV,MAAM,GACP,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAW,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAU9C,SAAS,WAAW,CAAC,QAAgB;IACnC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC1B,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;IACpD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC;AAED,SAAS,YAAY,CAAC,KAAkB,EAAE,QAAgB;IACxD,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED,SAAS,aAAa,CACpB,QA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AAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC;QACjD,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAE3D,IAAI,OAAO,EAAE,CAAC;YACZ,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC3B,CAAC;QAED,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YAC7B,OAAO,EAAE,CAAC;QACZ,CAAC;aAAM,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YACrC,QAAQ,EAAE,CAAC;QACb,CAAC;IACH,CAAC;IAED,OAAO;QACL,UAAU,EAAE,KAAK,CAAC,MAAM;QACxB,OAAO;QACP,QAAQ;QACR,WAAW;KACZ,CAAC;AACJ,CAAC","debug_id":"11b35163-7099-5536-9e87-cedb97d678ca"}
@@ -1,2 +1,3 @@
1
1
  export declare function fromPackageRoot(relative: string): string;
2
+ export declare function getLocadexVersion(): string;
2
3
  //# sourceMappingURL=getPaths.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getPaths.d.ts","sourceRoot":"","sources":["../../src/utils/getPaths.ts"],"names":[],"mappings":"AAKA,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,UAE/C"}
1
+ {"version":3,"file":"getPaths.d.ts","sourceRoot":"/","sources":["utils/getPaths.ts"],"names":[],"mappings":"AAMA,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,UAE/C;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAW1C"}