devtopia 1.9.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +111 -140
- package/dist/commands/categories.js +16 -76
- package/dist/commands/compose.d.ts +5 -0
- package/dist/commands/compose.js +129 -0
- package/dist/commands/create.d.ts +7 -0
- package/dist/commands/create.js +302 -0
- package/dist/commands/docs.js +150 -160
- package/dist/commands/idea.d.ts +7 -0
- package/dist/commands/idea.js +83 -0
- package/dist/commands/run-local.d.ts +8 -0
- package/dist/commands/run-local.js +64 -0
- package/dist/commands/run.d.ts +8 -1
- package/dist/commands/run.js +75 -6
- package/dist/commands/search.d.ts +5 -0
- package/dist/commands/search.js +52 -0
- package/dist/commands/start.d.ts +1 -1
- package/dist/commands/start.js +154 -256
- package/dist/commands/submit.d.ts +3 -0
- package/dist/commands/submit.js +340 -197
- package/dist/executor.d.ts +26 -2
- package/dist/executor.js +537 -72
- package/dist/index.js +72 -10
- package/package.json +3 -3
package/dist/executor.d.ts
CHANGED
|
@@ -4,8 +4,32 @@ interface ExecutionResult {
|
|
|
4
4
|
error?: string;
|
|
5
5
|
durationMs: number;
|
|
6
6
|
}
|
|
7
|
+
interface ExecuteOptions {
|
|
8
|
+
strictJson?: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface ValidationResult {
|
|
11
|
+
valid: boolean;
|
|
12
|
+
stdout: string;
|
|
13
|
+
stderr: string;
|
|
14
|
+
exitCode: number | null;
|
|
15
|
+
}
|
|
16
|
+
export declare function getInterpreter(language: string, toolFile?: string): {
|
|
17
|
+
cmd: string;
|
|
18
|
+
args: string[];
|
|
19
|
+
ext: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Detect if source defines a `function main(...)` without calling it,
|
|
23
|
+
* and wrap it with the standard argv boilerplate so it actually executes.
|
|
24
|
+
*/
|
|
25
|
+
export declare function wrapSourceIfNeeded(source: string, language: string): string;
|
|
7
26
|
/**
|
|
8
|
-
*
|
|
27
|
+
* Validate that a tool source actually runs and produces valid JSON output.
|
|
28
|
+
* Runs with {} as input, 10s timeout.
|
|
29
|
+
* Pass: process produces valid JSON stdout (even error JSON like {"error":"..."}).
|
|
30
|
+
* Fail: no stdout, non-JSON stdout with exit 0, or process hangs.
|
|
9
31
|
*/
|
|
10
|
-
export declare function
|
|
32
|
+
export declare function validateExecution(source: string, language: string): Promise<ValidationResult>;
|
|
33
|
+
export declare function executeTool(toolName: string, input: any, options?: ExecuteOptions): Promise<ExecutionResult>;
|
|
34
|
+
export declare function executeLocalFile(filePath: string, input: any, options?: ExecuteOptions): Promise<ExecutionResult>;
|
|
11
35
|
export {};
|