@mostajs/audit 2.0.3 → 2.0.4

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.
@@ -15,6 +15,10 @@ export async function getAuditRepo() {
15
15
  const { AuditLogRepository } = await import('../repositories/audit-log.repository.js');
16
16
  registerSchemas([AuditLogSchema]);
17
17
  const dialect = await getDialect();
18
+ if (typeof dialect.initSchema === 'function') {
19
+ const { getAllSchemas } = await import('@mostajs/orm');
20
+ await dialect.initSchema(getAllSchemas());
21
+ }
18
22
  _cached = new AuditLogRepository(dialect);
19
23
  return _cached;
20
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mostajs/audit",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "Reusable audit logging module — fire-and-forget logAudit() with paginated consultation",
5
5
  "author": "Dr Hamid MADANI <drmdh@msn.com>",
6
6
  "license": "MIT",