@adminforth/audit-log
Advanced tools
Comparing version 1.0.43 to 1.1.0
@@ -102,3 +102,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
} | ||
diffColumn.showIn = ['show']; | ||
diffColumn.showIn = { | ||
show: true, | ||
list: false, | ||
edit: false, | ||
create: false, | ||
filter: false, | ||
}; | ||
diffColumn.components = { | ||
@@ -116,7 +122,13 @@ show: { | ||
} | ||
['edit', 'create', 'delete'].forEach((hook) => { | ||
resource.hooks[hook].afterSave.push((_a) => __awaiter(this, [_a], void 0, function* ({ resource, record, adminUser, oldRecord, extra }) { | ||
return yield this.createLogRecord(resource, hook, record, adminUser, oldRecord, extra); | ||
; | ||
['edit', 'delete'].forEach((hook) => { | ||
resource.hooks[hook].afterSave.push((_a) => __awaiter(this, [_a], void 0, function* ({ resource, updates, adminUser, oldRecord, extra }) { | ||
return yield this.createLogRecord(resource, hook, updates, adminUser, oldRecord, extra); | ||
})); | ||
}); | ||
['create'].forEach((hook) => { | ||
resource.hooks[hook].afterSave.push((_a) => __awaiter(this, [_a], void 0, function* ({ resource, record, adminUser, extra }) { | ||
return yield this.createLogRecord(resource, hook, record, adminUser, undefined, extra); | ||
})); | ||
}); | ||
}); | ||
@@ -123,0 +135,0 @@ } |
25
index.ts
@@ -134,3 +134,9 @@ import type { | ||
diffColumn.showIn = ['show'] | ||
diffColumn.showIn = { | ||
show: true, | ||
list: false, | ||
edit: false, | ||
create: false, | ||
filter: false, | ||
}; | ||
diffColumn.components = { | ||
@@ -150,11 +156,18 @@ show: { | ||
return; | ||
} | ||
}; | ||
['edit', 'create', 'delete'].forEach((hook) => { | ||
resource.hooks[hook].afterSave.push(async ({resource, record, adminUser, oldRecord, extra}) => { | ||
return await this.createLogRecord(resource, hook as AllowedActionsEnum, record, adminUser, oldRecord, extra) | ||
['edit', 'delete'].forEach((hook) => { | ||
resource.hooks[hook].afterSave.push(async ({resource, updates, adminUser, oldRecord, extra}) => { | ||
return await this.createLogRecord(resource, hook as AllowedActionsEnum, updates, adminUser, oldRecord, extra) | ||
}) | ||
}) | ||
}); | ||
['create'].forEach((hook) => { | ||
resource.hooks[hook].afterSave.push(async ({resource, record, adminUser, extra}) => { | ||
return await this.createLogRecord(resource, hook as AllowedActionsEnum, record, adminUser, undefined, extra) | ||
}) | ||
}); | ||
}) | ||
} | ||
} |
{ | ||
"name": "@adminforth/audit-log", | ||
"version": "1.0.43", | ||
"version": "1.1.0", | ||
"description": "AdminForth plugin for logging all actions (who did what and when)", | ||
@@ -9,4 +9,3 @@ "main": "dist/index.js", | ||
"scripts": { | ||
"rollout": "tsc && rsync -av --exclude 'node_modules' custom dist/ && npm version patch && npm publish --access public", | ||
"build": "tsc", | ||
"build": "tsc && rsync -av --exclude 'node_modules' custom dist/", | ||
"prepare": "npm link adminforth" | ||
@@ -18,3 +17,33 @@ }, | ||
"dayjs": "^1.11.11" | ||
}, | ||
"release": { | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/npm", | ||
"@semantic-release/github", | ||
[ | ||
"semantic-release-slack-bot", | ||
{ | ||
"notifyOnSuccess": true, | ||
"notifyOnFail": true, | ||
"slackIcon": ":package:", | ||
"markdownReleaseNotes": true | ||
} | ||
] | ||
], | ||
"branches": [ | ||
"main", | ||
{ | ||
"name": "next", | ||
"prerelease": true | ||
} | ||
] | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^22.10.7", | ||
"semantic-release": "^24.2.1", | ||
"semantic-release-slack-bot": "^4.0.2", | ||
"typescript": "^5.7.3" | ||
} | ||
} |
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
37124
13
425
4
1