(sessionSchemaPath?: string, apiSchemaPath?: string)
| 2591 | // ══════════════════════════════════════════════════════════════════════════════ |
| 2592 | |
| 2593 | async function generate(sessionSchemaPath?: string, apiSchemaPath?: string): Promise<void> { |
| 2594 | await generateSessionEvents(sessionSchemaPath); |
| 2595 | try { |
| 2596 | const resolvedSessionPath = sessionSchemaPath ?? (await getSessionEventsSchemaPath()); |
| 2597 | const sessionSchema = propagateInternalVisibility(postProcessSchema(cloneSchemaForCodegen((await loadSchemaJson(resolvedSessionPath)) as JSONSchema7))); |
| 2598 | await generateRpc(apiSchemaPath, sessionSchema); |
| 2599 | } catch (err) { |
| 2600 | if ((err as NodeJS.ErrnoException).code === "ENOENT" && !apiSchemaPath) { |
| 2601 | console.log("C#: skipping RPC (api.schema.json not found)"); |
| 2602 | } else { |
| 2603 | throw err; |
| 2604 | } |
| 2605 | } |
| 2606 | } |
| 2607 | |
| 2608 | const __filename = fileURLToPath(import.meta.url); |
| 2609 |
no test coverage detected
searching dependent graphs…