@mostajs/audit 1.0.1 → 1.0.3

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/dist/index.d.ts CHANGED
@@ -2,4 +2,5 @@ export { logAudit, getAuditUser } from './lib/audit';
2
2
  export { AuditLogRepository } from './repositories/audit-log.repository';
3
3
  export { AuditLogSchema } from './schemas/audit-log.schema';
4
4
  export { createAuditHandlers } from './api/route';
5
+ export { auditMenuContribution } from './lib/menu';
5
6
  export type { MostaAuditConfig, AuditParams, AuditFilters, AuditLogDTO, } from './types/index';
package/dist/index.js CHANGED
@@ -7,3 +7,5 @@ export { AuditLogRepository } from './repositories/audit-log.repository';
7
7
  export { AuditLogSchema } from './schemas/audit-log.schema';
8
8
  // API helpers
9
9
  export { createAuditHandlers } from './api/route';
10
+ // Menu contribution
11
+ export { auditMenuContribution } from './lib/menu';
@@ -0,0 +1,2 @@
1
+ import type { ModuleMenuContribution } from '@mostajs/menu';
2
+ export declare const auditMenuContribution: ModuleMenuContribution;
@@ -0,0 +1,16 @@
1
+ // @mostajs/audit — Menu contribution
2
+ // Author: Dr Hamid MADANI drmdh@msn.com
3
+ import { FileText } from 'lucide-react';
4
+ export const auditMenuContribution = {
5
+ moduleKey: 'audit',
6
+ mergeIntoGroup: 'Administration',
7
+ order: 80,
8
+ items: [
9
+ {
10
+ label: 'audit.title',
11
+ href: '/dashboard/audit',
12
+ icon: FileText,
13
+ permission: 'audit:view',
14
+ },
15
+ ],
16
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mostajs/audit",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
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",
@@ -27,6 +27,11 @@
27
27
  "types": "./dist/types/index.d.ts",
28
28
  "import": "./dist/types/index.js",
29
29
  "default": "./dist/types/index.js"
30
+ },
31
+ "./lib/menu": {
32
+ "types": "./dist/lib/menu.d.ts",
33
+ "import": "./dist/lib/menu.js",
34
+ "default": "./dist/lib/menu.js"
30
35
  }
31
36
  },
32
37
  "files": [
@@ -57,6 +62,7 @@
57
62
  "@mostajs/orm": "^1.0.0"
58
63
  },
59
64
  "peerDependencies": {
65
+ "@mostajs/menu": ">=1.0.2",
60
66
  "next": ">=14",
61
67
  "react": ">=18"
62
68
  },
@@ -66,9 +72,13 @@
66
72
  },
67
73
  "react": {
68
74
  "optional": true
75
+ },
76
+ "@mostajs/menu": {
77
+ "optional": true
69
78
  }
70
79
  },
71
80
  "devDependencies": {
81
+ "@mostajs/menu": "^1.0.2",
72
82
  "@types/react": "^19.0.0",
73
83
  "next": "^16.1.6",
74
84
  "react": "^19.0.0",