(sessionSchemaPath?: string, apiSchemaPath?: string)
| 1036 | // ── Main ──────────────────────────────────────────────────────────────────── |
| 1037 | |
| 1038 | async function generate(sessionSchemaPath?: string, apiSchemaPath?: string): Promise<void> { |
| 1039 | await generateSessionEvents(sessionSchemaPath); |
| 1040 | try { |
| 1041 | const resolvedSessionPath = sessionSchemaPath ?? (await getSessionEventsSchemaPath()); |
| 1042 | const sessionSchema = propagateInternalVisibility(postProcessSchema((await loadSchemaJson(resolvedSessionPath)) as JSONSchema7)); |
| 1043 | await generateRpc(apiSchemaPath, sessionSchema); |
| 1044 | } catch (err) { |
| 1045 | if ((err as NodeJS.ErrnoException).code === "ENOENT" && !apiSchemaPath) { |
| 1046 | console.log("TypeScript: skipping RPC (api.schema.json not found)"); |
| 1047 | } else { |
| 1048 | throw err; |
| 1049 | } |
| 1050 | } |
| 1051 | } |
| 1052 | |
| 1053 | const __filename = fileURLToPath(import.meta.url); |
| 1054 |
no test coverage detected
searching dependent graphs…