nsarrazin commited on
Commit
d678639
·
1 Parent(s): 39db86d

fix: populate script

Browse files
Files changed (1) hide show
  1. scripts/populate.ts +4 -1
scripts/populate.ts CHANGED
@@ -8,7 +8,8 @@ import { faker } from "@faker-js/faker";
8
  import { ObjectId } from "mongodb";
9
 
10
  // @ts-expect-error: vite-node makes the var available but the typescript compiler doesn't see them
11
- import { collections } from "$lib/server/database";
 
12
  import { models } from "../src/lib/server/models.ts";
13
  import type { User } from "../src/lib/types/User";
14
  import type { Assistant } from "../src/lib/types/Assistant";
@@ -31,6 +32,8 @@ const rl = readline.createInterface({
31
  output: process.stdout,
32
  });
33
 
 
 
34
  rl.on("close", function () {
35
  process.exit(0);
36
  });
 
8
  import { ObjectId } from "mongodb";
9
 
10
  // @ts-expect-error: vite-node makes the var available but the typescript compiler doesn't see them
11
+ import { ready } from "$lib/server/config";
12
+ import { collections } from "$lib/server/database.ts";
13
  import { models } from "../src/lib/server/models.ts";
14
  import type { User } from "../src/lib/types/User";
15
  import type { Assistant } from "../src/lib/types/Assistant";
 
32
  output: process.stdout,
33
  });
34
 
35
+ await ready;
36
+
37
  rl.on("close", function () {
38
  process.exit(0);
39
  });