locadex 0.0.2-alpha.1 → 0.0.2-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.locadex-mcp-stdio.json +9 -0
- package/.locadex-mcp.json +2 -3
- package/LICENSE.md +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +44 -9
- package/dist/cli.js.map +1 -1
- package/dist/commands/i18n.d.ts +2 -1
- package/dist/commands/i18n.d.ts.map +1 -1
- package/dist/commands/i18n.js +255 -140
- package/dist/commands/i18n.js.map +1 -1
- package/dist/commands/setup.d.ts +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +141 -86
- package/dist/commands/setup.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -68
- package/dist/index.js.map +1 -1
- package/dist/{utils/logging.d.ts → logging/console.d.ts} +9 -12
- package/dist/logging/console.d.ts.map +1 -0
- package/dist/logging/console.js +137 -0
- package/dist/logging/console.js.map +1 -0
- package/dist/logging/logger.d.ts +44 -0
- package/dist/logging/logger.d.ts.map +1 -0
- package/dist/logging/logger.js +142 -0
- package/dist/logging/logger.js.map +1 -0
- package/dist/mcp/debugger.d.ts +3 -0
- package/dist/mcp/debugger.d.ts.map +1 -0
- package/dist/mcp/debugger.js +37 -0
- package/dist/mcp/debugger.js.map +1 -0
- package/dist/mcp/getDocs.d.ts.map +1 -0
- package/dist/mcp/getDocs.js +56 -0
- package/dist/mcp/getDocs.js.map +1 -0
- package/dist/mcp/getGuide.d.ts +5 -0
- package/dist/mcp/getGuide.d.ts.map +1 -0
- package/dist/mcp/getGuide.js +17 -0
- package/dist/mcp/getGuide.js.map +1 -0
- package/dist/{tools → mcp/tools}/docs.d.ts +3 -0
- package/dist/mcp/tools/docs.d.ts.map +1 -0
- package/dist/mcp/tools/docs.js +86 -0
- package/dist/mcp/tools/docs.js.map +1 -0
- package/dist/mcp/tools/guides.d.ts +11 -0
- package/dist/mcp/tools/guides.d.ts.map +1 -0
- package/dist/mcp/tools/guides.js +118 -0
- package/dist/mcp/tools/guides.js.map +1 -0
- package/dist/mcp-sse.d.ts +3 -0
- package/dist/mcp-sse.d.ts.map +1 -0
- package/dist/mcp-sse.js +95 -0
- package/dist/mcp-sse.js.map +1 -0
- package/dist/mcp.d.ts +3 -0
- package/dist/mcp.d.ts.map +1 -0
- package/dist/mcp.js +34 -0
- package/dist/mcp.js.map +1 -0
- package/dist/prompts/system.d.ts +4 -0
- package/dist/prompts/system.d.ts.map +1 -0
- package/dist/prompts/system.js +17 -0
- package/dist/prompts/system.js.map +1 -0
- package/dist/telemetry.d.ts +11 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +104 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/types/claude-sdk.d.ts +39 -0
- package/dist/types/claude-sdk.d.ts.map +1 -0
- package/dist/types/claude-sdk.js +5 -0
- package/dist/types/claude-sdk.js.map +1 -0
- package/dist/types/cli.d.ts +7 -0
- package/dist/types/cli.d.ts.map +1 -0
- package/dist/types/cli.js +5 -0
- package/dist/types/cli.js.map +1 -0
- package/dist/utils/agentManager.d.ts +34 -0
- package/dist/utils/agentManager.d.ts.map +1 -0
- package/dist/utils/agentManager.js +123 -0
- package/dist/utils/agentManager.js.map +1 -0
- package/dist/utils/claudeCode.d.ts +14 -6
- package/dist/utils/claudeCode.d.ts.map +1 -1
- package/dist/utils/claudeCode.js +170 -102
- package/dist/utils/claudeCode.js.map +1 -1
- package/dist/utils/dag/createDag.d.ts +24 -0
- package/dist/utils/dag/createDag.d.ts.map +1 -0
- package/dist/utils/dag/createDag.js +181 -0
- package/dist/utils/dag/createDag.js.map +1 -0
- package/dist/utils/debugLogger.d.ts +3 -0
- package/dist/utils/debugLogger.d.ts.map +1 -0
- package/dist/utils/debugLogger.js +36 -0
- package/dist/utils/debugLogger.js.map +1 -0
- package/dist/utils/fs/findConfigs.d.ts +11 -0
- package/dist/utils/fs/findConfigs.d.ts.map +1 -0
- package/dist/utils/fs/findConfigs.js +63 -0
- package/dist/utils/fs/findConfigs.js.map +1 -0
- package/dist/utils/fs/getFiles.d.ts +2 -0
- package/dist/utils/fs/getFiles.d.ts.map +1 -0
- package/dist/utils/fs/getFiles.js +8 -0
- package/dist/utils/fs/getFiles.js.map +1 -0
- package/dist/utils/fs/writeFiles.d.ts +2 -0
- package/dist/utils/fs/writeFiles.d.ts.map +1 -0
- package/dist/utils/fs/writeFiles.js +19 -0
- package/dist/utils/fs/writeFiles.js.map +1 -0
- package/dist/utils/getFiles.d.ts +30 -0
- package/dist/utils/getFiles.d.ts.map +1 -0
- package/dist/utils/getFiles.js +152 -0
- package/dist/utils/getFiles.js.map +1 -0
- package/dist/utils/getPaths.d.ts +1 -0
- package/dist/utils/getPaths.d.ts.map +1 -1
- package/dist/utils/getPaths.js +19 -3
- package/dist/utils/getPaths.js.map +1 -1
- package/dist/utils/mcpConfig.d.ts.map +1 -1
- package/dist/utils/mcpConfig.js +5 -2
- package/dist/utils/mcpConfig.js.map +1 -1
- package/dist/utils/shared.d.ts +4 -0
- package/dist/utils/shared.d.ts.map +1 -0
- package/dist/utils/shared.js +26 -0
- package/dist/utils/shared.js.map +1 -0
- package/dist/utils/stats.d.ts +25 -0
- package/dist/utils/stats.d.ts.map +1 -0
- package/dist/utils/stats.js +40 -0
- package/dist/utils/stats.js.map +1 -0
- package/dist/utils/validateConfig.d.ts +2 -0
- package/dist/utils/validateConfig.d.ts.map +1 -0
- package/dist/utils/validateConfig.js +12 -0
- package/dist/utils/validateConfig.js.map +1 -0
- package/guides/next/advanced/complicated-mapping-expressions.md +200 -0
- package/guides/next/advanced/interpolated-strings.md +162 -0
- package/guides/next/advanced/migrating.md +86 -0
- package/guides/next/advanced/ternary-operators.md +217 -0
- package/guides/next/advanced/var-outside-client-component.md +446 -0
- package/guides/next/advanced/var-outside-client-server-component.md +550 -0
- package/guides/next/advanced/var-outside-server-component.md +545 -0
- package/guides/next/basic/branches.md +310 -0
- package/guides/next/basic/client-side-components.md +221 -0
- package/guides/next/basic/jsx.md +268 -0
- package/guides/next/basic/server-side-components.md +165 -0
- package/guides/next/basic/strings.md +144 -0
- package/guides/next/basic/variables.md +161 -0
- package/guides/next/important/functions.md +37 -0
- package/package.json +27 -13
- package/dist/resources/docs.d.ts +0 -4
- package/dist/resources/docs.d.ts.map +0 -1
- package/dist/resources/docs.js +0 -176
- package/dist/resources/docs.js.map +0 -1
- package/dist/tools/docs.d.ts.map +0 -1
- package/dist/tools/docs.js +0 -140
- package/dist/tools/docs.js.map +0 -1
- package/dist/utils/getDocs.d.ts.map +0 -1
- package/dist/utils/getDocs.js +0 -113
- package/dist/utils/getDocs.js.map +0 -1
- package/dist/utils/logging.d.ts.map +0 -1
- package/dist/utils/logging.js +0 -226
- package/dist/utils/logging.js.map +0 -1
- /package/dist/{utils → mcp}/getDocs.d.ts +0 -0
|
@@ -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,iBAAiB;IAC/B,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAC1B,MAAM,aAAa,GAAG;QACpB,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,mBAAmB,CAAC;QACnC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,mBAAmB,CAAC;QACnC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,gBAAgB,CAAC;QAChC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,gBAAgB,CAAC;KACjC,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;AACD;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB;IAC/B,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAC1B,MAAM,aAAa,GAAG;QACpB,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,mBAAmB,CAAC;QACnC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,qBAAqB,CAAC;KACtC,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,aAAa,CAAC,KAAe;IAC3C,MAAM,aAAa,GAAa,EAAE,CAAC;IACnC,KAAK,MAAM,YAAY,IAAI,KAAK,EAAE,CAAC;QACjC,IAAI,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;YAChC,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACnC,CAAC;IACH,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC","debug_id":"c5944047-538f-5ac2-a4c8-a3dbe5e4ba6b"}
|
|
@@ -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 @@
|
|
|
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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C;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,QAAgB,EAChB,aAAqB,EACrB,SAA+C,SAAS;IAExD,MAAM,KAAK,GAAG,WAAW,CAAC,aAAa,CAAC,CAAC;IACzC,MAAM,aAAa,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC;IAClE,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAErC,IAAI,aAAa,IAAI,CAAC,EAAE,CAA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Q,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"}
|
package/dist/utils/getPaths.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPaths.d.ts","sourceRoot":"","sources":["
|
|
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"}
|
package/dist/utils/getPaths.js
CHANGED
|
@@ -1,7 +1,23 @@
|
|
|
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]="753d767d-b755-5567-ae1a-f45989169bc4")}catch(e){}}();
|
|
1
3
|
import path, { dirname } from 'node:path';
|
|
2
4
|
import { fileURLToPath } from 'node:url';
|
|
3
|
-
|
|
5
|
+
import fs from 'node:fs';
|
|
6
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
4
7
|
export function fromPackageRoot(relative) {
|
|
5
|
-
return path.resolve(__dirname,
|
|
8
|
+
return path.resolve(__dirname, `../../`, relative);
|
|
6
9
|
}
|
|
7
|
-
|
|
10
|
+
export function getLocadexVersion() {
|
|
11
|
+
const packageJsonPath = fromPackageRoot('package.json');
|
|
12
|
+
if (!fs.existsSync(packageJsonPath)) {
|
|
13
|
+
return 'unknown';
|
|
14
|
+
}
|
|
15
|
+
try {
|
|
16
|
+
return JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')).version;
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
return 'unknown';
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=getPaths.js.map
|
|
23
|
+
//# debugId=753d767d-b755-5567-ae1a-f45989169bc4
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPaths.js","sourceRoot":"","
|
|
1
|
+
{"version":3,"file":"getPaths.js","sources":["utils/getPaths.ts"],"sourceRoot":"/","sourcesContent":["import path, { dirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport fs from 'node:fs';\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\n\nexport function fromPackageRoot(relative: string) {\n return path.resolve(__dirname, `../../`, relative);\n}\n\nexport function getLocadexVersion(): string {\n const packageJsonPath = fromPackageRoot('package.json');\n\n if (!fs.existsSync(packageJsonPath)) {\n return 'unknown';\n }\n try {\n return JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')).version;\n } catch (error) {\n return 'unknown';\n }\n}\n"],"names":[],"mappings":";;AAAA,OAAO,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzB,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE1D,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACrD,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC/B,MAAM,eAAe,GAAG,eAAe,CAAC,cAAc,CAAC,CAAC;IAExD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,CAAC;QACpC,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;IACtE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC","debug_id":"753d767d-b755-5567-ae1a-f45989169bc4"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcpConfig.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"mcpConfig.d.ts","sourceRoot":"/","sources":["utils/mcpConfig.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;;CAQrB,CAAC"}
|
package/dist/utils/mcpConfig.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
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]="7f14296e-5624-5b6f-8a78-0532dfec7bd1")}catch(e){}}();
|
|
3
|
+
export const mcpConfig = {
|
|
2
4
|
mcpServers: {
|
|
3
5
|
locadex: {
|
|
4
6
|
command: 'npx',
|
|
@@ -7,4 +9,5 @@ export var mcpConfig = {
|
|
|
7
9
|
},
|
|
8
10
|
},
|
|
9
11
|
};
|
|
10
|
-
//# sourceMappingURL=mcpConfig.js.map
|
|
12
|
+
//# sourceMappingURL=mcpConfig.js.map
|
|
13
|
+
//# debugId=7f14296e-5624-5b6f-8a78-0532dfec7bd1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcpConfig.js","sourceRoot":"","
|
|
1
|
+
{"version":3,"file":"mcpConfig.js","sources":["utils/mcpConfig.ts"],"sourceRoot":"/","sourcesContent":["export const mcpConfig = {\n mcpServers: {\n locadex: {\n command: 'npx',\n args: ['-y', 'locadex-mcp'],\n env: {},\n },\n },\n};\n"],"names":[],"mappings":";;AAAA,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,UAAU,EAAE;QACV,OAAO,EAAE;YACP,OAAO,EAAE,KAAK;YACd,IAAI,EAAE,CAAC,IAAI,EAAE,aAAa,CAAC;YAC3B,GAAG,EAAE,EAAE;SACR;KACF;CACF,CAAC","debug_id":"7f14296e-5624-5b6f-8a78-0532dfec7bd1"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"/","sources":["utils/shared.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,UAUzB,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAS7B,CAAC;AAEF,eAAO,MAAM,sBAAsB,UAAsC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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]="e64248b3-3c52-5b87-ba9e-041cc1ee9f8e")}catch(e){}}();
|
|
3
|
+
export const EXCLUDED_DIRS = [
|
|
4
|
+
'./node_modules',
|
|
5
|
+
'./.git',
|
|
6
|
+
'./.locadex',
|
|
7
|
+
'./.next',
|
|
8
|
+
'./dist',
|
|
9
|
+
'./build',
|
|
10
|
+
'./out',
|
|
11
|
+
'./public',
|
|
12
|
+
'./static',
|
|
13
|
+
];
|
|
14
|
+
export const DAG_IGNORED_FILES = [
|
|
15
|
+
'next.config.js',
|
|
16
|
+
'next.config.ts',
|
|
17
|
+
'next.config.mjs',
|
|
18
|
+
'next.config.mts',
|
|
19
|
+
'next.config.cjs',
|
|
20
|
+
'next.config.cts',
|
|
21
|
+
'tailwind.config.js',
|
|
22
|
+
'webpack.config.js',
|
|
23
|
+
];
|
|
24
|
+
export const DAG_IGNORED_EXTENSIONS = ['.css', '.scss', '.sass', '.less'];
|
|
25
|
+
//# sourceMappingURL=shared.js.map
|
|
26
|
+
//# debugId=e64248b3-3c52-5b87-ba9e-041cc1ee9f8e
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sources":["utils/shared.ts"],"sourceRoot":"/","sourcesContent":["export const EXCLUDED_DIRS = [\n './node_modules',\n './.git',\n './.locadex',\n './.next',\n './dist',\n './build',\n './out',\n './public',\n './static',\n];\n\nexport const DAG_IGNORED_FILES = [\n 'next.config.js',\n 'next.config.ts',\n 'next.config.mjs',\n 'next.config.mts',\n 'next.config.cjs',\n 'next.config.cts',\n 'tailwind.config.js',\n 'webpack.config.js',\n];\n\nexport const DAG_IGNORED_EXTENSIONS = ['.css', '.scss', '.sass', '.less'];\n"],"names":[],"mappings":";;AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,gBAAgB;IAChB,QAAQ;IACR,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,SAAS;IACT,OAAO;IACP,UAAU;IACV,UAAU;CACX,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,gBAAgB;IAChB,gBAAgB;IAChB,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,oBAAoB;IACpB,mBAAmB;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC","debug_id":"e64248b3-3c52-5b87-ba9e-041cc1ee9f8e"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare class AgentStats {
|
|
2
|
+
private totalFiles;
|
|
3
|
+
private processedFiles;
|
|
4
|
+
private totalCost;
|
|
5
|
+
private totalToolCalls;
|
|
6
|
+
private totalApiDuration;
|
|
7
|
+
private totalWallDuration;
|
|
8
|
+
constructor();
|
|
9
|
+
updateStats(stats: {
|
|
10
|
+
newProcessedFiles?: number;
|
|
11
|
+
newCost?: number;
|
|
12
|
+
newToolCalls?: number;
|
|
13
|
+
newApiDuration?: number;
|
|
14
|
+
newWallDuration?: number;
|
|
15
|
+
}): void;
|
|
16
|
+
getStats(): {
|
|
17
|
+
totalFiles: number;
|
|
18
|
+
processedFiles: number;
|
|
19
|
+
totalCost: number;
|
|
20
|
+
totalToolCalls: number;
|
|
21
|
+
totalApiDuration: number;
|
|
22
|
+
totalWallDuration: number;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=stats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats.d.ts","sourceRoot":"/","sources":["utils/stats.ts"],"names":[],"mappings":"AAAA,qBAAa,UAAU;IACrB,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,cAAc,CAAa;IACnC,OAAO,CAAC,SAAS,CAAa;IAC9B,OAAO,CAAC,cAAc,CAAa;IACnC,OAAO,CAAC,gBAAgB,CAAa;IACrC,OAAO,CAAC,iBAAiB,CAAa;;IAItC,WAAW,CAAC,KAAK,EAAE;QACjB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B;IAkBD,QAAQ,IAAI;QACV,UAAU,EAAE,MAAM,CAAC;QACnB,cAAc,EAAE,MAAM,CAAC;QACvB,SAAS,EAAE,MAAM,CAAC;QAClB,cAAc,EAAE,MAAM,CAAC;QACvB,gBAAgB,EAAE,MAAM,CAAC;QACzB,iBAAiB,EAAE,MAAM,CAAC;KAC3B;CAUF"}
|
|
@@ -0,0 +1,40 @@
|
|
|
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]="f4ae1a46-30f3-5eeb-9733-0407efdaf7f3")}catch(e){}}();
|
|
3
|
+
export class AgentStats {
|
|
4
|
+
totalFiles = 0;
|
|
5
|
+
processedFiles = 0;
|
|
6
|
+
totalCost = 0;
|
|
7
|
+
totalToolCalls = 0;
|
|
8
|
+
totalApiDuration = 0;
|
|
9
|
+
totalWallDuration = 0;
|
|
10
|
+
constructor() { }
|
|
11
|
+
updateStats(stats) {
|
|
12
|
+
if (stats.newProcessedFiles) {
|
|
13
|
+
this.processedFiles += stats.newProcessedFiles;
|
|
14
|
+
}
|
|
15
|
+
if (stats.newCost) {
|
|
16
|
+
this.totalCost += stats.newCost;
|
|
17
|
+
}
|
|
18
|
+
if (stats.newToolCalls) {
|
|
19
|
+
this.totalToolCalls += stats.newToolCalls;
|
|
20
|
+
}
|
|
21
|
+
if (stats.newApiDuration) {
|
|
22
|
+
this.totalApiDuration += stats.newApiDuration;
|
|
23
|
+
}
|
|
24
|
+
if (stats.newWallDuration) {
|
|
25
|
+
this.totalWallDuration += stats.newWallDuration;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
getStats() {
|
|
29
|
+
return {
|
|
30
|
+
totalFiles: this.totalFiles,
|
|
31
|
+
processedFiles: this.processedFiles,
|
|
32
|
+
totalCost: this.totalCost,
|
|
33
|
+
totalToolCalls: this.totalToolCalls,
|
|
34
|
+
totalApiDuration: this.totalApiDuration,
|
|
35
|
+
totalWallDuration: this.totalWallDuration,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=stats.js.map
|
|
40
|
+
//# debugId=f4ae1a46-30f3-5eeb-9733-0407efdaf7f3
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats.js","sources":["utils/stats.ts"],"sourceRoot":"/","sourcesContent":["export class AgentStats {\n private totalFiles: number = 0;\n private processedFiles: number = 0;\n private totalCost: number = 0;\n private totalToolCalls: number = 0;\n private totalApiDuration: number = 0;\n private totalWallDuration: number = 0;\n\n constructor() {}\n\n updateStats(stats: {\n newProcessedFiles?: number;\n newCost?: number;\n newToolCalls?: number;\n newApiDuration?: number;\n newWallDuration?: number;\n }) {\n if (stats.newProcessedFiles) {\n this.processedFiles += stats.newProcessedFiles;\n }\n if (stats.newCost) {\n this.totalCost += stats.newCost;\n }\n if (stats.newToolCalls) {\n this.totalToolCalls += stats.newToolCalls;\n }\n if (stats.newApiDuration) {\n this.totalApiDuration += stats.newApiDuration;\n }\n if (stats.newWallDuration) {\n this.totalWallDuration += stats.newWallDuration;\n }\n }\n\n getStats(): {\n totalFiles: number;\n processedFiles: number;\n totalCost: number;\n totalToolCalls: number;\n totalApiDuration: number;\n totalWallDuration: number;\n } {\n return {\n totalFiles: this.totalFiles,\n processedFiles: this.processedFiles,\n totalCost: this.totalCost,\n totalToolCalls: this.totalToolCalls,\n totalApiDuration: this.totalApiDuration,\n totalWallDuration: this.totalWallDuration,\n };\n }\n}\n"],"names":[],"mappings":";;AAAA,MAAM,OAAO,UAAU;IACb,UAAU,GAAW,CAAC,CAAC;IACvB,cAAc,GAAW,CAAC,CAAC;IAC3B,SAAS,GAAW,CAAC,CAAC;IACtB,cAAc,GAAW,CAAC,CAAC;IAC3B,gBAAgB,GAAW,CAAC,CAAC;IAC7B,iBAAiB,GAAW,CAAC,CAAC;IAEtC,gBAAe,CAAC;IAEhB,WAAW,CAAC,KAMX;QACC,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC5B,IAAI,CAAC,cAAc,IAAI,KAAK,CAAC,iBAAiB,CAAC;QACjD,CAAC;QACD,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;YAClB,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC,OAAO,CAAC;QAClC,CAAC;QACD,IAAI,KAAK,CAAC,YAAY,EAAE,CAAC;YACvB,IAAI,CAAC,cAAc,IAAI,KAAK,CAAC,YAAY,CAAC;QAC5C,CAAC;QACD,IAAI,KAAK,CAAC,cAAc,EAAE,CAAC;YACzB,IAAI,CAAC,gBAAgB,IAAI,KAAK,CAAC,cAAc,CAAC;QAChD,CAAC;QACD,IAAI,KAAK,CAAC,eAAe,EAAE,CAAC;YAC1B,IAAI,CAAC,iBAAiB,IAAI,KAAK,CAAC,eAAe,CAAC;QAClD,CAAC;IACH,CAAC;IAED,QAAQ;QAQN,OAAO;YACL,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;YACvC,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;SAC1C,CAAC;IACJ,CAAC;CACF","debug_id":"f4ae1a46-30f3-5eeb-9733-0407efdaf7f3"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateConfig.d.ts","sourceRoot":"/","sources":["utils/validateConfig.ts"],"names":[],"mappings":"AAEA,wBAAgB,qBAAqB,SAQpC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
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]="58e02bc2-5220-52f6-873e-12b0d3b04571")}catch(e){}}();
|
|
3
|
+
import { logger } from '../logging/logger.js';
|
|
4
|
+
export function validateInitialConfig() {
|
|
5
|
+
// Validate ANTHROPIC_API_KEY
|
|
6
|
+
if (!process.env.ANTHROPIC_API_KEY) {
|
|
7
|
+
logger.error('ANTHROPIC_API_KEY is not set! Please set it as an environment variable or in a .env | .env.local file.');
|
|
8
|
+
process.exit(1);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=validateConfig.js.map
|
|
12
|
+
//# debugId=58e02bc2-5220-52f6-873e-12b0d3b04571
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateConfig.js","sources":["utils/validateConfig.ts"],"sourceRoot":"/","sourcesContent":["import { logger } from '../logging/logger.js';\n\nexport function validateInitialConfig() {\n // Validate ANTHROPIC_API_KEY\n if (!process.env.ANTHROPIC_API_KEY) {\n logger.error(\n 'ANTHROPIC_API_KEY is not set! Please set it as an environment variable or in a .env | .env.local file.'\n );\n process.exit(1);\n }\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,MAAM,UAAU,qBAAqB;IACnC,6BAA6B;IAC7B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,CAAC;QACnC,MAAM,CAAC,KAAK,CACV,wGAAwG,CACzG,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC","debug_id":"58e02bc2-5220-52f6-873e-12b0d3b04571"}
|