@timo9378/flow2code 0.1.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 +56 -0
- package/LICENSE +21 -0
- package/README.md +223 -0
- package/dist/cli.js +5211 -0
- package/dist/compiler.cjs +4177 -0
- package/dist/compiler.d.cts +1230 -0
- package/dist/compiler.d.ts +1230 -0
- package/dist/compiler.js +4112 -0
- package/dist/server.d.ts +27 -0
- package/dist/server.js +3042 -0
- package/package.json +120 -0
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { FlowIR } from "./compiler.js";
|
|
2
|
+
import type { Server } from "node:http";
|
|
3
|
+
|
|
4
|
+
export interface ApiResponse {
|
|
5
|
+
status: number;
|
|
6
|
+
body: Record<string, unknown>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface CompileRequest {
|
|
10
|
+
ir?: FlowIR;
|
|
11
|
+
write?: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface ServerOptions {
|
|
15
|
+
port?: number;
|
|
16
|
+
host?: string;
|
|
17
|
+
staticDir?: string;
|
|
18
|
+
/** User project root directory (defaults to process.cwd()) */
|
|
19
|
+
projectRoot?: string;
|
|
20
|
+
/** Callback after server starts */
|
|
21
|
+
onReady?: (url: string) => void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export declare function handleCompile(body: CompileRequest, projectRoot: string): ApiResponse;
|
|
25
|
+
export declare function handleGenerate(body: { prompt?: string }): Promise<ApiResponse>;
|
|
26
|
+
export declare function handleImportOpenAPI(body: { spec?: unknown; filter?: { tags?: string[]; paths?: string[] } }): ApiResponse;
|
|
27
|
+
export declare function startServer(options?: ServerOptions): Server;
|