locadex 0.1.17 → 1.0.0
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/CHANGELOG.md +6 -0
- package/LICENSE.md +3 -101
- package/dist/cli.d.ts +0 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +13 -52
- package/dist/cli.js.map +1 -1
- package/dist/index.js +1 -4
- package/dist/index.js.map +1 -1
- package/dist/logging/console.d.ts +1 -1
- package/dist/logging/console.d.ts.map +1 -1
- package/dist/logging/console.js +5 -9
- package/dist/logging/console.js.map +1 -1
- package/dist/logging/logger.js +1 -4
- package/dist/logging/logger.js.map +1 -1
- package/dist/utils/getPaths.js +1 -4
- package/dist/utils/getPaths.js.map +1 -1
- package/dist/utils/shutdown.js +1 -4
- package/dist/utils/shutdown.js.map +1 -1
- package/package.json +6 -20
- package/dist/commands/fixErrors.d.ts +0 -4
- package/dist/commands/fixErrors.d.ts.map +0 -1
- package/dist/commands/fixErrors.js +0 -42
- package/dist/commands/fixErrors.js.map +0 -1
- package/dist/commands/i18n.d.ts +0 -4
- package/dist/commands/i18n.d.ts.map +0 -1
- package/dist/commands/i18n.js +0 -42
- package/dist/commands/i18n.js.map +0 -1
- package/dist/commands/setup.d.ts +0 -11
- package/dist/commands/setup.d.ts.map +0 -1
- package/dist/commands/setup.js +0 -74
- package/dist/commands/setup.js.map +0 -1
- package/dist/mcp/getDocs.d.ts +0 -10
- package/dist/mcp/getDocs.d.ts.map +0 -1
- package/dist/mcp/getDocs.js +0 -55
- package/dist/mcp/getDocs.js.map +0 -1
- package/dist/mcp/getGuide.d.ts +0 -5
- package/dist/mcp/getGuide.d.ts.map +0 -1
- package/dist/mcp/getGuide.js +0 -18
- package/dist/mcp/getGuide.js.map +0 -1
- package/dist/mcp/getPort.d.ts +0 -2
- package/dist/mcp/getPort.d.ts.map +0 -1
- package/dist/mcp/getPort.js +0 -25
- package/dist/mcp/getPort.js.map +0 -1
- package/dist/mcp/tools/docs.d.ts +0 -6
- package/dist/mcp/tools/docs.d.ts.map +0 -1
- package/dist/mcp/tools/docs.js +0 -93
- package/dist/mcp/tools/docs.js.map +0 -1
- package/dist/mcp/tools/guides.d.ts +0 -11
- package/dist/mcp/tools/guides.d.ts.map +0 -1
- package/dist/mcp/tools/guides.js +0 -91
- package/dist/mcp/tools/guides.js.map +0 -1
- package/dist/mcp/tools/validate.d.ts +0 -3
- package/dist/mcp/tools/validate.d.ts.map +0 -1
- package/dist/mcp/tools/validate.js +0 -37
- package/dist/mcp/tools/validate.js.map +0 -1
- package/dist/mcp/validateEnv.d.ts +0 -9
- package/dist/mcp/validateEnv.d.ts.map +0 -1
- package/dist/mcp/validateEnv.js +0 -27
- package/dist/mcp/validateEnv.js.map +0 -1
- package/dist/mcp-sse.d.ts +0 -3
- package/dist/mcp-sse.d.ts.map +0 -1
- package/dist/mcp-sse.js +0 -79
- package/dist/mcp-sse.js.map +0 -1
- package/dist/mcp-stdio.d.ts +0 -3
- package/dist/mcp-stdio.d.ts.map +0 -1
- package/dist/mcp-stdio.js +0 -39
- package/dist/mcp-stdio.js.map +0 -1
- package/dist/prompts/system.d.ts +0 -5
- package/dist/prompts/system.d.ts.map +0 -1
- package/dist/prompts/system.js +0 -29
- package/dist/prompts/system.js.map +0 -1
- package/dist/resources/getResource.d.ts +0 -5
- package/dist/resources/getResource.d.ts.map +0 -1
- package/dist/resources/getResource.js +0 -19
- package/dist/resources/getResource.js.map +0 -1
- package/dist/tasks/concurrency.d.ts +0 -72
- package/dist/tasks/concurrency.d.ts.map +0 -1
- package/dist/tasks/concurrency.js +0 -130
- package/dist/tasks/concurrency.js.map +0 -1
- package/dist/tasks/fixErrors.d.ts +0 -2
- package/dist/tasks/fixErrors.d.ts.map +0 -1
- package/dist/tasks/fixErrors.js +0 -82
- package/dist/tasks/fixErrors.js.map +0 -1
- package/dist/tasks/i18n.d.ts +0 -7
- package/dist/tasks/i18n.d.ts.map +0 -1
- package/dist/tasks/i18n.js +0 -246
- package/dist/tasks/i18n.js.map +0 -1
- package/dist/tasks/setup.d.ts +0 -8
- package/dist/tasks/setup.d.ts.map +0 -1
- package/dist/tasks/setup.js +0 -272
- package/dist/tasks/setup.js.map +0 -1
- package/dist/telemetry.d.ts +0 -9
- package/dist/telemetry.d.ts.map +0 -1
- package/dist/telemetry.js +0 -105
- package/dist/telemetry.js.map +0 -1
- package/dist/types/cli.d.ts +0 -20
- package/dist/types/cli.d.ts.map +0 -1
- package/dist/types/cli.js +0 -5
- package/dist/types/cli.js.map +0 -1
- package/dist/utils/claudeCode.d.ts +0 -49
- package/dist/utils/claudeCode.d.ts.map +0 -1
- package/dist/utils/claudeCode.js +0 -290
- package/dist/utils/claudeCode.js.map +0 -1
- package/dist/utils/config.d.ts +0 -11
- package/dist/utils/config.d.ts.map +0 -1
- package/dist/utils/config.js +0 -84
- package/dist/utils/config.js.map +0 -1
- package/dist/utils/dag/createDag.d.ts +0 -24
- package/dist/utils/dag/createDag.d.ts.map +0 -1
- package/dist/utils/dag/createDag.js +0 -146
- package/dist/utils/dag/createDag.js.map +0 -1
- package/dist/utils/dag/extractFiles.d.ts +0 -7
- package/dist/utils/dag/extractFiles.d.ts.map +0 -1
- package/dist/utils/dag/extractFiles.js +0 -32
- package/dist/utils/dag/extractFiles.js.map +0 -1
- package/dist/utils/dag/getFiles.d.ts +0 -18
- package/dist/utils/dag/getFiles.d.ts.map +0 -1
- package/dist/utils/dag/getFiles.js +0 -116
- package/dist/utils/dag/getFiles.js.map +0 -1
- package/dist/utils/dag/matchFiles.d.ts +0 -3
- package/dist/utils/dag/matchFiles.d.ts.map +0 -1
- package/dist/utils/dag/matchFiles.js +0 -61
- package/dist/utils/dag/matchFiles.js.map +0 -1
- package/dist/utils/errors.d.ts +0 -20
- package/dist/utils/errors.d.ts.map +0 -1
- package/dist/utils/errors.js +0 -42
- package/dist/utils/errors.js.map +0 -1
- package/dist/utils/exec.d.ts +0 -6
- package/dist/utils/exec.d.ts.map +0 -1
- package/dist/utils/exec.js +0 -68
- package/dist/utils/exec.js.map +0 -1
- package/dist/utils/fs/findConfigs.d.ts +0 -11
- package/dist/utils/fs/findConfigs.d.ts.map +0 -1
- package/dist/utils/fs/findConfigs.js +0 -60
- package/dist/utils/fs/findConfigs.js.map +0 -1
- package/dist/utils/fs/formatFiles.d.ts +0 -3
- package/dist/utils/fs/formatFiles.d.ts.map +0 -1
- package/dist/utils/fs/formatFiles.js +0 -16
- package/dist/utils/fs/formatFiles.js.map +0 -1
- package/dist/utils/fs/getFiles.d.ts +0 -2
- package/dist/utils/fs/getFiles.d.ts.map +0 -1
- package/dist/utils/fs/getFiles.js +0 -8
- package/dist/utils/fs/getFiles.js.map +0 -1
- package/dist/utils/fs/git.d.ts +0 -7
- package/dist/utils/fs/git.d.ts.map +0 -1
- package/dist/utils/fs/git.js +0 -38
- package/dist/utils/fs/git.js.map +0 -1
- package/dist/utils/fs/writeFiles.d.ts +0 -2
- package/dist/utils/fs/writeFiles.d.ts.map +0 -1
- package/dist/utils/fs/writeFiles.js +0 -19
- package/dist/utils/fs/writeFiles.js.map +0 -1
- package/dist/utils/locadexManager.d.ts +0 -86
- package/dist/utils/locadexManager.d.ts.map +0 -1
- package/dist/utils/locadexManager.js +0 -305
- package/dist/utils/locadexManager.js.map +0 -1
- package/dist/utils/lockfile.d.ts +0 -16
- package/dist/utils/lockfile.d.ts.map +0 -1
- package/dist/utils/lockfile.js +0 -109
- package/dist/utils/lockfile.js.map +0 -1
- package/dist/utils/packages/installPackage.d.ts +0 -5
- package/dist/utils/packages/installPackage.d.ts.map +0 -1
- package/dist/utils/packages/installPackage.js +0 -60
- package/dist/utils/packages/installPackage.js.map +0 -1
- package/dist/utils/session.d.ts +0 -2
- package/dist/utils/session.d.ts.map +0 -1
- package/dist/utils/session.js +0 -12
- package/dist/utils/session.js.map +0 -1
- package/dist/utils/shared.d.ts +0 -5
- package/dist/utils/shared.d.ts.map +0 -1
- package/dist/utils/shared.js +0 -54
- package/dist/utils/shared.js.map +0 -1
- package/dist/utils/stats.d.ts +0 -40
- package/dist/utils/stats.d.ts.map +0 -1
- package/dist/utils/stats.js +0 -97
- package/dist/utils/stats.js.map +0 -1
- package/guides/next/advanced/conditional-rendering.md +0 -275
- package/guides/next/advanced/external-strings.md +0 -346
- package/guides/next/advanced/interpolated-strings.md +0 -82
- package/guides/next/advanced/mapping-expressions.md +0 -208
- package/guides/next/basic/branches.md +0 -327
- package/guides/next/basic/jsx.md +0 -270
- package/guides/next/basic/strings.md +0 -162
- package/guides/next/basic/variables.md +0 -161
- package/guides/next/important/functions.md +0 -39
- package/guides/next/migration/migrating.md +0 -85
- package/resources/ghaYaml.yml +0 -24
package/dist/utils/errors.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
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]="7d93cd57-f940-503e-afc8-039ef9ce7221")}catch(e){}}();
|
|
3
|
-
export class AgentError extends Error {
|
|
4
|
-
code;
|
|
5
|
-
constructor(message, code) {
|
|
6
|
-
super(message);
|
|
7
|
-
this.code = code;
|
|
8
|
-
this.name = 'AgentError';
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
export class TimeoutError extends AgentError {
|
|
12
|
-
timeoutSec;
|
|
13
|
-
constructor(message, timeoutSec) {
|
|
14
|
-
super(message, 'TIMEOUT');
|
|
15
|
-
this.timeoutSec = timeoutSec;
|
|
16
|
-
this.name = 'TimeoutError';
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
export class UserAbortError extends AgentError {
|
|
20
|
-
constructor(message = 'Operation was aborted by user') {
|
|
21
|
-
super(message, 'USER_ABORT');
|
|
22
|
-
this.name = 'UserAbortError';
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
export class AgentProcessError extends AgentError {
|
|
26
|
-
exitCode;
|
|
27
|
-
constructor(message, exitCode) {
|
|
28
|
-
super(message, 'PROCESS_ERROR');
|
|
29
|
-
this.exitCode = exitCode;
|
|
30
|
-
this.name = 'AgentProcessError';
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
export class AgentSpawnError extends AgentError {
|
|
34
|
-
originalError;
|
|
35
|
-
constructor(message, originalError) {
|
|
36
|
-
super(message, 'SPAWN_ERROR');
|
|
37
|
-
this.originalError = originalError;
|
|
38
|
-
this.name = 'AgentSpawnError';
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=errors.js.map
|
|
42
|
-
//# debugId=7d93cd57-f940-503e-afc8-039ef9ce7221
|
package/dist/utils/errors.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sources":["utils/errors.ts"],"sourceRoot":"/","sourcesContent":["export class AgentError extends Error {\n constructor(\n message: string,\n public readonly code?: string\n ) {\n super(message);\n this.name = 'AgentError';\n }\n}\n\nexport class TimeoutError extends AgentError {\n constructor(\n message: string,\n public readonly timeoutSec: number\n ) {\n super(message, 'TIMEOUT');\n this.name = 'TimeoutError';\n }\n}\n\nexport class UserAbortError extends AgentError {\n constructor(message: string = 'Operation was aborted by user') {\n super(message, 'USER_ABORT');\n this.name = 'UserAbortError';\n }\n}\n\nexport class AgentProcessError extends AgentError {\n constructor(\n message: string,\n public readonly exitCode?: number\n ) {\n super(message, 'PROCESS_ERROR');\n this.name = 'AgentProcessError';\n }\n}\n\nexport class AgentSpawnError extends AgentError {\n constructor(\n message: string,\n public readonly originalError: Error\n ) {\n super(message, 'SPAWN_ERROR');\n this.name = 'AgentSpawnError';\n }\n}\n"],"names":[],"mappings":";;AAAA,MAAM,OAAO,UAAW,SAAQ,KAAK;IAGjB;IAFlB,YACE,OAAe,EACC,IAAa;QAE7B,KAAK,CAAC,OAAO,CAAC,CAAC;QAFC,SAAI,GAAJ,IAAI,CAAS;QAG7B,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC3B,CAAC;CACF;AAED,MAAM,OAAO,YAAa,SAAQ,UAAU;IAGxB;IAFlB,YACE,OAAe,EACC,UAAkB;QAElC,KAAK,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAFV,eAAU,GAAV,UAAU,CAAQ;QAGlC,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC7B,CAAC;CACF;AAED,MAAM,OAAO,cAAe,SAAQ,UAAU;IAC5C,YAAY,UAAkB,+BAA+B;QAC3D,KAAK,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QAC7B,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC/B,CAAC;CACF;AAED,MAAM,OAAO,iBAAkB,SAAQ,UAAU;IAG7B;IAFlB,YACE,OAAe,EACC,QAAiB;QAEjC,KAAK,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;QAFhB,aAAQ,GAAR,QAAQ,CAAS;QAGjC,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AAED,MAAM,OAAO,eAAgB,SAAQ,UAAU;IAG3B;IAFlB,YACE,OAAe,EACC,aAAoB;QAEpC,KAAK,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;QAFd,kBAAa,GAAb,aAAa,CAAO;QAGpC,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF","debug_id":"7d93cd57-f940-503e-afc8-039ef9ce7221"}
|
package/dist/utils/exec.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare function execFunction(command: string, args: string[], pipeStdout?: boolean, cwd?: string, parentAbortController?: AbortController, timeoutMs?: number): Promise<{
|
|
2
|
-
stdout: string;
|
|
3
|
-
stderr: string;
|
|
4
|
-
code: number;
|
|
5
|
-
}>;
|
|
6
|
-
//# sourceMappingURL=exec.d.ts.map
|
package/dist/utils/exec.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exec.d.ts","sourceRoot":"/","sources":["utils/exec.ts"],"names":[],"mappings":"AAMA,wBAAsB,YAAY,CAChC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,UAAU,GAAE,OAAc,EAC1B,GAAG,GAAE,MAAsB,EAC3B,qBAAqB,CAAC,EAAE,eAAe,EACvC,SAAS,GAAE,MAAsB,GAChC,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAsE3D"}
|
package/dist/utils/exec.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
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]="0051b367-ed4a-5b80-bc98-b49b64a0f46e")}catch(e){}}();
|
|
3
|
-
import chalk from 'chalk';
|
|
4
|
-
import { spawn } from 'node:child_process';
|
|
5
|
-
import { logger } from '../logging/logger.js';
|
|
6
|
-
// Utility function for executing a command and returning the output (and error)
|
|
7
|
-
// If pipeStdout is true, the output will be logged to the console
|
|
8
|
-
export async function execFunction(command, args, pipeStdout = true, cwd = process.cwd(), parentAbortController, timeoutMs = 5 * 60 * 1000) {
|
|
9
|
-
return new Promise((resolve, reject) => {
|
|
10
|
-
const abortController = new AbortController();
|
|
11
|
-
// Listen for parent abort signal
|
|
12
|
-
if (parentAbortController) {
|
|
13
|
-
parentAbortController.signal.addEventListener('abort', () => {
|
|
14
|
-
abortController.abort();
|
|
15
|
-
reject(new Error('Process aborted by parent'));
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
const childProcess = spawn(command, args, {
|
|
19
|
-
stdio: ['ignore', 'pipe', 'pipe'],
|
|
20
|
-
cwd,
|
|
21
|
-
signal: abortController.signal,
|
|
22
|
-
});
|
|
23
|
-
let stdOutOutput = '';
|
|
24
|
-
let stdErrOutput = '';
|
|
25
|
-
const timeout = global.setTimeout(() => {
|
|
26
|
-
abortController.abort();
|
|
27
|
-
reject(new Error(`Process timed out after ${timeoutMs / 1000}s`));
|
|
28
|
-
}, timeoutMs);
|
|
29
|
-
childProcess.stderr.on('data', (data) => {
|
|
30
|
-
stdErrOutput += data.toString();
|
|
31
|
-
});
|
|
32
|
-
childProcess.stdout.on('data', (data) => {
|
|
33
|
-
const output = data.toString();
|
|
34
|
-
stdOutOutput += output;
|
|
35
|
-
if (!pipeStdout) {
|
|
36
|
-
logger.log(output);
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
// eslint-disable-next-line no-console
|
|
40
|
-
console.log(output);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
childProcess.on('error', (error) => {
|
|
44
|
-
global.clearTimeout(timeout);
|
|
45
|
-
reject(error);
|
|
46
|
-
});
|
|
47
|
-
childProcess.on('close', (code) => {
|
|
48
|
-
global.clearTimeout(timeout);
|
|
49
|
-
if (code === 0) {
|
|
50
|
-
resolve({ stdout: stdOutOutput, stderr: stdErrOutput, code });
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
logger.log(chalk.red(`${command} ${args.join(' ')} failed with exit code ${code} in ${cwd}`));
|
|
54
|
-
if (stdErrOutput) {
|
|
55
|
-
logger.log(chalk.red(`Error details: ${stdErrOutput}`));
|
|
56
|
-
}
|
|
57
|
-
// reject with the most recent output
|
|
58
|
-
resolve({
|
|
59
|
-
stdout: stdOutOutput,
|
|
60
|
-
stderr: stdErrOutput,
|
|
61
|
-
code: code ?? 1,
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
//# sourceMappingURL=exec.js.map
|
|
68
|
-
//# debugId=0051b367-ed4a-5b80-bc98-b49b64a0f46e
|
package/dist/utils/exec.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exec.js","sources":["utils/exec.ts"],"sourceRoot":"/","sourcesContent":["import chalk from 'chalk';\nimport { spawn } from 'node:child_process';\nimport { logger } from '../logging/logger.js';\n\n// Utility function for executing a command and returning the output (and error)\n// If pipeStdout is true, the output will be logged to the console\nexport async function execFunction(\n command: string,\n args: string[],\n pipeStdout: boolean = true,\n cwd: string = process.cwd(),\n parentAbortController?: AbortController,\n timeoutMs: number = 5 * 60 * 1000\n): Promise<{ stdout: string; stderr: string; code: number }> {\n return new Promise<{ stdout: string; stderr: string; code: number }>(\n (resolve, reject) => {\n const abortController = new AbortController();\n\n // Listen for parent abort signal\n if (parentAbortController) {\n parentAbortController.signal.addEventListener('abort', () => {\n abortController.abort();\n reject(new Error('Process aborted by parent'));\n });\n }\n\n const childProcess = spawn(command, args, {\n stdio: ['ignore', 'pipe', 'pipe'],\n cwd,\n signal: abortController.signal,\n });\n\n let stdOutOutput = '';\n let stdErrOutput = '';\n\n const timeout = global.setTimeout(() => {\n abortController.abort();\n reject(new Error(`Process timed out after ${timeoutMs / 1000}s`));\n }, timeoutMs);\n\n childProcess.stderr.on('data', (data) => {\n stdErrOutput += data.toString();\n });\n\n childProcess.stdout.on('data', (data) => {\n const output = data.toString();\n stdOutOutput += output;\n if (!pipeStdout) {\n logger.log(output);\n } else {\n // eslint-disable-next-line no-console\n console.log(output);\n }\n });\n\n childProcess.on('error', (error) => {\n global.clearTimeout(timeout);\n reject(error);\n });\n\n childProcess.on('close', (code) => {\n global.clearTimeout(timeout);\n if (code === 0) {\n resolve({ stdout: stdOutOutput, stderr: stdErrOutput, code });\n } else {\n logger.log(\n chalk.red(\n `${command} ${args.join(' ')} failed with exit code ${code} in ${cwd}`\n )\n );\n if (stdErrOutput) {\n logger.log(chalk.red(`Error details: ${stdErrOutput}`));\n }\n // reject with the most recent output\n resolve({\n stdout: stdOutOutput,\n stderr: stdErrOutput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,CAAC,kBAAkB,YAAY,EAAE,CAAC,CAAC,CAAC;gBAC1D,CAAC;gBACD,qCAAqC;gBACrC,OAAO,CAAC;oBACN,MAAM,EAAE,YAAY;oBACpB,MAAM,EAAE,YAAY;oBACpB,IAAI,EAAE,IAAI,IAAI,CAAC;iBAChB,CAAC,CAAC;YACL,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CACF,CAAC;AACJ,CAAC","debug_id":"0051b367-ed4a-5b80-bc98-b49b64a0f46e"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare function findTsConfig(cwd: string): string | undefined;
|
|
2
|
-
export declare function findWebpackConfig(cwd: string): 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(cwd: string): string | undefined;
|
|
10
|
-
export declare function findFilepaths(paths: string[], cwd: string): string[];
|
|
11
|
-
//# sourceMappingURL=findConfigs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"findConfigs.d.ts","sourceRoot":"/","sources":["utils/fs/findConfigs.ts"],"names":[],"mappings":"AAGA,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAc5D;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAejE;AACD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAajE;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAQpE"}
|
|
@@ -1,60 +0,0 @@
|
|
|
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]="09f8aaac-8544-5225-91c7-82ee27407983")}catch(e){}}();
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
import fs from 'node:fs';
|
|
5
|
-
export function findTsConfig(cwd) {
|
|
6
|
-
const possiblePaths = [
|
|
7
|
-
path.join(cwd, 'tsconfig.json'),
|
|
8
|
-
path.join(cwd, 'tsconfig.app.json'),
|
|
9
|
-
path.join(cwd, 'jsconfig.json'),
|
|
10
|
-
];
|
|
11
|
-
for (const configPath of possiblePaths) {
|
|
12
|
-
if (fs.existsSync(configPath)) {
|
|
13
|
-
return configPath;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return undefined;
|
|
17
|
-
}
|
|
18
|
-
export function findWebpackConfig(cwd) {
|
|
19
|
-
const possiblePaths = [
|
|
20
|
-
path.join(cwd, 'webpack.config.js'),
|
|
21
|
-
path.join(cwd, 'webpack.config.ts'),
|
|
22
|
-
path.join(cwd, 'next.config.js'),
|
|
23
|
-
path.join(cwd, 'next.config.ts'),
|
|
24
|
-
];
|
|
25
|
-
for (const configPath of possiblePaths) {
|
|
26
|
-
if (fs.existsSync(configPath)) {
|
|
27
|
-
return configPath;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return undefined;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Resolve the file paths from the given file paths or default paths.
|
|
34
|
-
* @param {string[]} paths - The file paths to resolve.
|
|
35
|
-
* @param {string} errorMessage - The error message to throw if no paths are found.
|
|
36
|
-
* @returns {string[]} - The resolved file paths.
|
|
37
|
-
*/
|
|
38
|
-
export function findRequireConfig(cwd) {
|
|
39
|
-
const possiblePaths = [
|
|
40
|
-
path.join(cwd, 'require.config.js'),
|
|
41
|
-
path.join(cwd, 'requirejs.config.js'),
|
|
42
|
-
];
|
|
43
|
-
for (const configPath of possiblePaths) {
|
|
44
|
-
if (fs.existsSync(configPath)) {
|
|
45
|
-
return configPath;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return undefined;
|
|
49
|
-
}
|
|
50
|
-
export function findFilepaths(paths, cwd) {
|
|
51
|
-
const resolvedPaths = [];
|
|
52
|
-
for (const possiblePath of paths) {
|
|
53
|
-
if (fs.existsSync(path.resolve(cwd, possiblePath))) {
|
|
54
|
-
resolvedPaths.push(path.resolve(cwd, possiblePath));
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return resolvedPaths;
|
|
58
|
-
}
|
|
59
|
-
//# sourceMappingURL=findConfigs.js.map
|
|
60
|
-
//# debugId=09f8aaac-8544-5225-91c7-82ee27407983
|
|
@@ -1 +0,0 @@
|
|
|
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(cwd: string): string | undefined {\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(cwd: string): string | undefined {\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(cwd: string): string | undefined {\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[], cwd: string): string[] {\n const resolvedPaths: string[] = [];\n for (const possiblePath of paths) {\n if (fs.existsSync(path.resolve(cwd, possiblePath))) {\n resolvedPaths.push(path.resolve(cwd, 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,CAAC,GAAW;IACtC,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,CAAC,GAAW;IAC3C,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,CAAC,GAAW;IAC3C,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,EAAE,GAAW;IACxD,MAAM,aAAa,GAAa,EAAE,CAAC;IACnC,KAAK,MAAM,YAAY,IAAI,KAAK,EAAE,CAAC;QACjC,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC;YACnD,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC","debug_id":"09f8aaac-8544-5225-91c7-82ee27407983"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatFiles.d.ts","sourceRoot":"/","sources":["utils/fs/formatFiles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAItD,wBAAsB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,iBAcrE"}
|
|
@@ -1,16 +0,0 @@
|
|
|
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]="87ca1c99-0d4b-5c78-9b56-72b66d0cecfb")}catch(e){}}();
|
|
3
|
-
import { logger } from '../../logging/logger.js';
|
|
4
|
-
import { execFunction } from '../exec.js';
|
|
5
|
-
export async function formatFiles(cmd, manager) {
|
|
6
|
-
logger.verboseMessage(`Running ${cmd}... in ${manager.appDirectory}`);
|
|
7
|
-
const { stderr, code } = await execFunction('sh', ['-c', cmd], false, manager.appDirectory, manager.getAgentAbortController());
|
|
8
|
-
if (code !== 0) {
|
|
9
|
-
logger.error(`Error running ${cmd} in ${manager.appDirectory}: ${stderr}`);
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
logger.step(`Formatted files with ${cmd}`);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=formatFiles.js.map
|
|
16
|
-
//# debugId=87ca1c99-0d4b-5c78-9b56-72b66d0cecfb
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatFiles.js","sources":["utils/fs/formatFiles.ts"],"sourceRoot":"/","sourcesContent":["import { LocadexManager } from '../locadexManager.js';\nimport { logger } from '../../logging/logger.js';\nimport { execFunction } from '../exec.js';\n\nexport async function formatFiles(cmd: string, manager: LocadexManager) {\n logger.verboseMessage(`Running ${cmd}... in ${manager.appDirectory}`);\n const { stderr, code } = await execFunction(\n 'sh',\n ['-c', cmd],\n false,\n manager.appDirectory,\n manager.getAgentAbortController()\n );\n if (code !== 0) {\n logger.error(`Error running ${cmd} in ${manager.appDirectory}: ${stderr}`);\n } else {\n logger.step(`Formatted files with ${cmd}`);\n }\n}\n"],"names":[],"mappings":";;AACA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,GAAW,EAAE,OAAuB;IACpE,MAAM,CAAC,cAAc,CAAC,WAAW,GAAG,UAAU,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IACtE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,YAAY,CACzC,IAAI,EACJ,CAAC,IAAI,EAAE,GAAG,CAAC,EACX,KAAK,EACL,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,uBAAuB,EAAE,CAClC,CAAC;IACF,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;QACf,MAAM,CAAC,KAAK,CAAC,iBAAiB,GAAG,OAAO,OAAO,CAAC,YAAY,KAAK,MAAM,EAAE,CAAC,CAAC;IAC7E,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,IAAI,CAAC,wBAAwB,GAAG,EAAE,CAAC,CAAC;IAC7C,CAAC;AACH,CAAC","debug_id":"87ca1c99-0d4b-5c78-9b56-72b66d0cecfb"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getFiles.d.ts","sourceRoot":"/","sources":["utils/fs/getFiles.ts"],"names":[],"mappings":"AAEA,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAExD"}
|
|
@@ -1,8 +0,0 @@
|
|
|
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]="af13a5a4-10ec-5ee2-a2f0-544dad4cacb7")}catch(e){}}();
|
|
3
|
-
import { findFilepaths } from './findConfigs.js';
|
|
4
|
-
export function getNextDirectories(cwd) {
|
|
5
|
-
return findFilepaths(['./src', './app', './pages'], cwd);
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=getFiles.js.map
|
|
8
|
-
//# debugId=af13a5a4-10ec-5ee2-a2f0-544dad4cacb7
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getFiles.js","sources":["utils/fs/getFiles.ts"],"sourceRoot":"/","sourcesContent":["import { findFilepaths } from './findConfigs.js';\n\nexport function getNextDirectories(cwd: string): string[] {\n return findFilepaths(['./src', './app', './pages'], cwd);\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,UAAU,kBAAkB,CAAC,GAAW;IAC5C,OAAO,aAAa,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,GAAG,CAAC,CAAC;AAC3D,CAAC","debug_id":"af13a5a4-10ec-5ee2-a2f0-544dad4cacb7"}
|
package/dist/utils/fs/git.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Deletes any newly created (untracked) files, except those in ignoreDirectories and ignoreFiles.
|
|
3
|
-
* @param ignoreDirectories - Array of directory names to ignore (relative to repo root).
|
|
4
|
-
* @param ignoreFiles - Array of file names to ignore (relative to repo root).
|
|
5
|
-
*/
|
|
6
|
-
export declare function deleteAddedFiles(ignoreDirectories?: string[], ignoreFiles?: string[]): void;
|
|
7
|
-
//# sourceMappingURL=git.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"git.d.ts","sourceRoot":"/","sources":["utils/fs/git.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,iBAAiB,GAAE,MAAM,EAAO,EAChC,WAAW,GAAE,MAAM,EAAO,QAiC3B"}
|
package/dist/utils/fs/git.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
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]="ad25eee6-d20b-5bb0-9fcf-10cac6e031c2")}catch(e){}}();
|
|
3
|
-
import { execSync } from 'child_process';
|
|
4
|
-
import { unlinkSync } from 'fs';
|
|
5
|
-
import { logger } from '../../logging/logger.js';
|
|
6
|
-
/**
|
|
7
|
-
* Deletes any newly created (untracked) files, except those in ignoreDirectories and ignoreFiles.
|
|
8
|
-
* @param ignoreDirectories - Array of directory names to ignore (relative to repo root).
|
|
9
|
-
* @param ignoreFiles - Array of file names to ignore (relative to repo root).
|
|
10
|
-
*/
|
|
11
|
-
export function deleteAddedFiles(ignoreDirectories = [], ignoreFiles = []) {
|
|
12
|
-
logger.debugMessage(`Deleting untracked files, ignoring directories: ${ignoreDirectories.join(', ')}${ignoreFiles.length > 0 ? `, ignoring files: ${ignoreFiles.join(', ')}` : ''}`);
|
|
13
|
-
// Get list of untracked files from git
|
|
14
|
-
const output = execSync('git status --porcelain', { encoding: 'utf-8' });
|
|
15
|
-
const untrackedFiles = output
|
|
16
|
-
.split('\n')
|
|
17
|
-
.filter((line) => line.startsWith('?? '))
|
|
18
|
-
.map((line) => line.slice(3).trim())
|
|
19
|
-
.filter((file) => file.length > 0);
|
|
20
|
-
// Filter out files in ignored directories and specific files
|
|
21
|
-
const filesToDelete = untrackedFiles.filter((file) => {
|
|
22
|
-
const isInIgnoredDirectory = ignoreDirectories.some((dir) => file === dir || file.startsWith(dir + '/'));
|
|
23
|
-
const isIgnoredFile = ignoreFiles.some((pattern) => file.includes(pattern));
|
|
24
|
-
return !isInIgnoredDirectory && !isIgnoredFile;
|
|
25
|
-
});
|
|
26
|
-
// Delete each file
|
|
27
|
-
for (const file of filesToDelete) {
|
|
28
|
-
try {
|
|
29
|
-
unlinkSync(file);
|
|
30
|
-
}
|
|
31
|
-
catch (err) {
|
|
32
|
-
// Optionally log or handle errors
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
logger.verboseMessage(`Deleted ${filesToDelete.length} untracked files`);
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=git.js.map
|
|
38
|
-
//# debugId=ad25eee6-d20b-5bb0-9fcf-10cac6e031c2
|
package/dist/utils/fs/git.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"git.js","sources":["utils/fs/git.ts"],"sourceRoot":"/","sourcesContent":["import { execSync } from 'child_process';\nimport { unlinkSync } from 'fs';\nimport { logger } from '../../logging/logger.js';\n\n/**\n * Deletes any newly created (untracked) files, except those in ignoreDirectories and ignoreFiles.\n * @param ignoreDirectories - Array of directory names to ignore (relative to repo root).\n * @param ignoreFiles - Array of file names to ignore (relative to repo root).\n */\nexport function deleteAddedFiles(\n ignoreDirectories: string[] = [],\n ignoreFiles: string[] = []\n) {\n logger.debugMessage(\n `Deleting untracked files, ignoring directories: ${ignoreDirectories.join(\n ', '\n )}${ignoreFiles.length > 0 ? `, ignoring files: ${ignoreFiles.join(', ')}` : ''}`\n );\n // Get list of untracked files from git\n const output = execSync('git status --porcelain', { encoding: 'utf-8' });\n const untrackedFiles = output\n .split('\\n')\n .filter((line) => line.startsWith('?? '))\n .map((line) => line.slice(3).trim())\n .filter((file) => file.length > 0);\n\n // Filter out files in ignored directories and specific files\n const filesToDelete = untrackedFiles.filter((file) => {\n const isInIgnoredDirectory = ignoreDirectories.some(\n (dir) => file === dir || file.startsWith(dir + '/')\n );\n const isIgnoredFile = ignoreFiles.some((pattern) => file.includes(pattern));\n return !isInIgnoredDirectory && !isIgnoredFile;\n });\n\n // Delete each file\n for (const file of filesToDelete) {\n try {\n unlinkSync(file);\n } catch (err) {\n // Optionally log or handle errors\n }\n }\n logger.verboseMessage(`Deleted ${filesToDelete.length} untracked files`);\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD;;;;GAIG;AACH,MAAM,U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AAI,aAAa,EAAE,CAAC;QACjC,IAAI,CAAC;YACH,UAAU,CAAC,IAAI,CAAC,CAAC;QACnB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,kCAAkC;QACpC,CAAC;IACH,CAAC;IACD,MAAM,CAAC,cAAc,CAAC,WAAW,aAAa,CAAC,MAAM,kBAAkB,CAAC,CAAC;AAC3E,CAAC","debug_id":"ad25eee6-d20b-5bb0-9fcf-10cac6e031c2"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,19 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { ClaudeCodeRunner, ClaudeRunnerOptions } from './claudeCode.js';
|
|
2
|
-
import { AgentStats } from './stats.js';
|
|
3
|
-
import { CliOptions, LocadexConfig } from '../types/cli.js';
|
|
4
|
-
export interface LocadexRunMetadata {
|
|
5
|
-
createdAt: string;
|
|
6
|
-
locadexVersion: string;
|
|
7
|
-
workingDirectory: string;
|
|
8
|
-
projectName: string;
|
|
9
|
-
transport: 'sse' | 'stdio';
|
|
10
|
-
tempDirectory: string;
|
|
11
|
-
nodeVersion: string;
|
|
12
|
-
platform: string;
|
|
13
|
-
arch: string;
|
|
14
|
-
logFile: string;
|
|
15
|
-
batchSize: number;
|
|
16
|
-
maxConcurrency: number;
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
}
|
|
19
|
-
export declare class LocadexManager {
|
|
20
|
-
private static instance;
|
|
21
|
-
private mcpProcess;
|
|
22
|
-
private mcpTransport;
|
|
23
|
-
private mcpConfig;
|
|
24
|
-
private filesStateFilePath;
|
|
25
|
-
private metadataFilePath;
|
|
26
|
-
private lockFilePath;
|
|
27
|
-
private currentRunDir;
|
|
28
|
-
locadexDirectory: string;
|
|
29
|
-
appDirectory: string;
|
|
30
|
-
rootDirectory: string;
|
|
31
|
-
private apiKey;
|
|
32
|
-
private maxConcurrency;
|
|
33
|
-
private batchSize;
|
|
34
|
-
private timeout;
|
|
35
|
-
private defaultSoftTurnLimit;
|
|
36
|
-
verbose: boolean;
|
|
37
|
-
debug: boolean;
|
|
38
|
-
private agentPool;
|
|
39
|
-
private agentAbortController;
|
|
40
|
-
private mcpAbortController;
|
|
41
|
-
private aborted;
|
|
42
|
-
private agentMutex;
|
|
43
|
-
private config;
|
|
44
|
-
private cliOptions;
|
|
45
|
-
stats: AgentStats;
|
|
46
|
-
logFile: string;
|
|
47
|
-
private constructor();
|
|
48
|
-
startMcpServer(): Promise<void>;
|
|
49
|
-
static getInstance(): LocadexManager;
|
|
50
|
-
static initialize(params: {
|
|
51
|
-
rootDirectory: string;
|
|
52
|
-
appDirectory: string;
|
|
53
|
-
mcpTransport: 'sse' | 'stdio';
|
|
54
|
-
apiKey: string;
|
|
55
|
-
metadata: Partial<LocadexRunMetadata>;
|
|
56
|
-
cliOptions: CliOptions;
|
|
57
|
-
options: Partial<LocadexConfig>;
|
|
58
|
-
}): void;
|
|
59
|
-
static reset(): void;
|
|
60
|
-
createSingleAgent(id: string, options: ClaudeRunnerOptions): ClaudeCodeRunner;
|
|
61
|
-
createAgentPool(options: ClaudeRunnerOptions): void;
|
|
62
|
-
getAvailableAgent(): Promise<{
|
|
63
|
-
id: string;
|
|
64
|
-
agent: ClaudeCodeRunner;
|
|
65
|
-
} | null>;
|
|
66
|
-
markAgentFree(agentId: string): void;
|
|
67
|
-
getAgentPool(): Map<string, {
|
|
68
|
-
agent: ClaudeCodeRunner;
|
|
69
|
-
sessionId?: string;
|
|
70
|
-
busy: boolean;
|
|
71
|
-
}>;
|
|
72
|
-
cleanupAgents(): void;
|
|
73
|
-
getFilesStateFilePath(): string;
|
|
74
|
-
getMetadataFilePath(): string;
|
|
75
|
-
getMaxConcurrency(): number;
|
|
76
|
-
getBatchSize(): number;
|
|
77
|
-
getTimeoutFactor(): number;
|
|
78
|
-
getConfig(): LocadexConfig;
|
|
79
|
-
getCliOptions(): CliOptions;
|
|
80
|
-
getLockFilePath(): string;
|
|
81
|
-
cleanup(): void;
|
|
82
|
-
getLogDirectory(): string;
|
|
83
|
-
getAgentAbortController(): AbortController;
|
|
84
|
-
isAborted(): boolean;
|
|
85
|
-
}
|
|
86
|
-
//# sourceMappingURL=locadexManager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"locadexManager.d.ts","sourceRoot":"/","sources":["utils/locadex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