mogobase 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/db/index.js CHANGED
@@ -1,10 +1,6 @@
1
1
  import { MongoClient, ObjectId } from "mongodb";
2
2
  import DataLoader from "dataloader";
3
3
  import buildMongoFilters from "./buildMongoFilters.js";
4
- const MONGO_URI = process.env.MONGO_URI || "mongodb://localhost:27017";
5
- const MONGO_DB = process.env.MONGO_DB || "mogobase";
6
- console.log("MONGO_URI", MONGO_URI);
7
- console.log("MONGO_DB", MONGO_DB);
8
4
  class MogobaseDB {
9
5
  static _instance;
10
6
  _mongoClient;
@@ -17,6 +13,8 @@ class MogobaseDB {
17
13
  return MogobaseDB._instance;
18
14
  }
19
15
  async connect() {
16
+ const MONGO_URI = process.env.MONGO_URI || "mongodb://localhost:27017";
17
+ const MONGO_DB = process.env.MONGO_DB || "mogobase";
20
18
  // Connect to MongoDB
21
19
  if (this._mongoClient && this._db) {
22
20
  return this._db;
package/lib/dev/start.js CHANGED
@@ -16,7 +16,7 @@ for (const file of files) {
16
16
  const filePath = path.join(mogobaseFolder, file);
17
17
  const module = (await import(filePath));
18
18
  if (typeof module.default === "function") {
19
- module.default(app);
19
+ await module.default(app);
20
20
  }
21
21
  }
22
22
  server = serve({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mogobase",
3
3
  "type": "module",
4
- "version": "1.0.4",
4
+ "version": "1.0.6",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "types": "types/index.d.ts",