(opts: { id: SessionID; dir: string; project: ProjectV2.ID })
| 22 | } |
| 23 | |
| 24 | function seed(opts: { id: SessionID; dir: string; project: ProjectV2.ID }) { |
| 25 | const now = Date.now() |
| 26 | return Database.Service.use(({ db }) => |
| 27 | db |
| 28 | .insert(SessionTable) |
| 29 | .values({ |
| 30 | id: opts.id, |
| 31 | project_id: opts.project, |
| 32 | slug: opts.id, |
| 33 | directory: opts.dir, |
| 34 | title: "test", |
| 35 | version: "0.0.0-test", |
| 36 | time_created: now, |
| 37 | time_updated: now, |
| 38 | }) |
| 39 | .run() |
| 40 | .pipe(Effect.orDie), |
| 41 | ) |
| 42 | } |
| 43 | |
| 44 | function ensureGlobal() { |
| 45 | return Database.Service.use(({ db }) => |
no test coverage detected