| 1 | /** |
| 2 | * Registers gh as a built-in OAuth app in a database migrated with `drizzle-kit migrate`, which seeds nothing. Deploys get it from packages/db's migrate.js. Safe to rerun. |
| 3 | * node dist/scripts/seed-github-cli-app.js, after `nest build` |
| 4 | */ |
| 5 | import { type Database, |
| 6 | import { Module } |
| 7 | import { ConfigModule } |
| 8 | import { NestFactory } |
| 9 | |
| 10 | import { DATABASE, DatabaseModule |
| 11 | |
| 12 | @Module({ |
| 13 | imports: [ConfigModule.forRoot |
| 14 | }) |
| 15 | class SeedModule {} |
| 16 | |
| 17 | const app = await |
| 18 | logger: ['warn', |
| 19 | }); |
| 20 | await seedBuiltInRows(app. |
| 21 | await app.close() |
| 22 | console.log('Built-in OAuth apps are registered' |