(sessionSchemaPath?: string, apiSchemaPath?: string)
| 3818 | } |
| 3819 | |
| 3820 | async function generate(sessionSchemaPath?: string, apiSchemaPath?: string): Promise<void> { |
| 3821 | await generateSessionEvents(sessionSchemaPath); |
| 3822 | try { |
| 3823 | const resolvedSessionPath = sessionSchemaPath ?? (await getSessionEventsSchemaPath()); |
| 3824 | const sessionSchema = postProcessSchema(cloneSchemaForCodegen((await loadSchemaJson(resolvedSessionPath)) as JSONSchema7)); |
| 3825 | await generateRpc(apiSchemaPath, sessionSchema); |
| 3826 | } catch (err) { |
| 3827 | if ((err as NodeJS.ErrnoException).code === "ENOENT" && !apiSchemaPath) { |
| 3828 | console.log("Python: skipping RPC (api.schema.json not found)"); |
| 3829 | } else { |
| 3830 | throw err; |
| 3831 | } |
| 3832 | } |
| 3833 | } |
| 3834 | |
| 3835 | const __filename = fileURLToPath(import.meta.url); |
| 3836 |
no test coverage detected
searching dependent graphs…