@justair/justair-library 3.2.0 → 3.2.1
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/package.json +1 -1
- package/src/config/db.js +0 -1
- package/src/index.js +3 -6
package/package.json
CHANGED
package/src/config/db.js
CHANGED
package/src/index.js
CHANGED
|
@@ -31,18 +31,15 @@ import { announcementSchema, Announcements } from "./models/announcements.js";
|
|
|
31
31
|
import { jobsSchema, Jobs } from "./models/jobs.js";
|
|
32
32
|
import { apiKeySchema, ApiKey } from "./models/apiKey.js";
|
|
33
33
|
import { UsageMetrics, usageMetricsSchema } from "./models/usageMetrics.js";
|
|
34
|
-
import
|
|
34
|
+
import Database from "./config/db.js"; // Import the new Database class
|
|
35
35
|
import CustomLogger from "./config/logger.js";
|
|
36
36
|
|
|
37
|
-
export function createDatabaseInstance({ CONNECTION_URL, database }) {
|
|
38
|
-
return new dbConfig({ CONNECTION_URL, database });
|
|
39
|
-
}
|
|
40
|
-
|
|
41
37
|
export function createLoggerInstance({ DATADOG_API_KEY, APPLICATION_NAME }) {
|
|
42
38
|
return new CustomLogger({ DATADOG_API_KEY, APPLICATION_NAME });
|
|
43
39
|
}
|
|
44
40
|
|
|
45
41
|
export {
|
|
42
|
+
Database, // Export the Database class
|
|
46
43
|
adminSchema,
|
|
47
44
|
Admin,
|
|
48
45
|
configurationsSchema,
|
|
@@ -79,4 +76,4 @@ export {
|
|
|
79
76
|
ApiKey,
|
|
80
77
|
UsageMetrics,
|
|
81
78
|
usageMetricsSchema,
|
|
82
|
-
};
|
|
79
|
+
};
|