fng-audit 0.12.0-beta.218 → 0.12.0-beta.219
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/server/fng-audit.js +17 -1
- package/package.json +2 -2
package/dist/server/fng-audit.js
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/// <reference path="../index.d.ts" />
|
|
3
|
+
var __assign = (this && this.__assign) || function () {
|
|
4
|
+
__assign = Object.assign || function(t) {
|
|
5
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
+
s = arguments[i];
|
|
7
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
8
|
+
t[p] = s[p];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
return __assign.apply(this, arguments);
|
|
13
|
+
};
|
|
3
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
15
|
exports.plugin = exports.auditAdHocEvent = exports.getSnapshot = exports.getVersion = exports.getAuditTrail = exports.clean = exports.controller = exports.Audit = void 0;
|
|
5
16
|
var jsondiffpatch = require("jsondiffpatch");
|
|
@@ -21,7 +32,8 @@ function controller(fng, processArgs, options) {
|
|
|
21
32
|
user: {},
|
|
22
33
|
op: String,
|
|
23
34
|
dets: {},
|
|
24
|
-
ver: Number
|
|
35
|
+
ver: Number,
|
|
36
|
+
xtra: { type: Mongoose.Schema.Types.Mixed },
|
|
25
37
|
});
|
|
26
38
|
var modelName = 'audit';
|
|
27
39
|
try {
|
|
@@ -309,6 +321,10 @@ function auditFromObject(doc, orig, updated, options, next) {
|
|
|
309
321
|
if (op_1) {
|
|
310
322
|
auditRec.op = op_1;
|
|
311
323
|
}
|
|
324
|
+
if (auditOptions.addPropFunc) {
|
|
325
|
+
var invariantAuditRec = __assign({}, auditRec);
|
|
326
|
+
auditRec = Object.assign(auditRec, auditOptions.addPropFunc(invariantAuditRec, doc, orig, updated, options));
|
|
327
|
+
}
|
|
312
328
|
exports.Audit.create(auditRec)
|
|
313
329
|
.then(function () {
|
|
314
330
|
// nothing to do
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fng-audit",
|
|
3
|
-
"version": "0.12.0-beta.
|
|
3
|
+
"version": "0.12.0-beta.219",
|
|
4
4
|
"description": "Client part of forms-angular audit plugin",
|
|
5
5
|
"homepage": "https://www.forms-angular.org/#/plugins",
|
|
6
6
|
"files": [
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@types/mocha": "10.0.1",
|
|
27
27
|
"angular": "^1.8.3",
|
|
28
28
|
"chai": "4.3.7",
|
|
29
|
-
"forms-angular": "0.12.0-beta.
|
|
29
|
+
"forms-angular": "0.12.0-beta.219",
|
|
30
30
|
"grunt": "^1.5.3",
|
|
31
31
|
"grunt-angular-templates": "^1.2.0",
|
|
32
32
|
"grunt-contrib-concat": "2.1.0",
|