fng-audit 0.12.0-beta.314 → 0.12.0-beta.316
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/client/fng-audit.js +1 -1
- package/dist/client/fng-audit.min.js +1 -1
- package/package.json +42 -16
package/dist/client/fng-audit.js
CHANGED
|
@@ -159,7 +159,7 @@ angular.module('fngAuditModule').run(['$templateCache', function($templateCache)
|
|
|
159
159
|
'use strict';
|
|
160
160
|
|
|
161
161
|
$templateCache.put('templates/base-history.html',
|
|
162
|
-
"<div ng-controller=FngAuditHistCtrl><div ng-class=\"css('rowFluid')\" class=\"page-header list-header\"><div class=header-lhs><h1>History for {{modelName}} {{id}}</h1></div></div><div class=\"page-body list-body\"><error-display></error-display><div ng-class=\"css('rowFluid')\"><a ng-repeat=\"change in changes\" ng-href={{buildHistUrl(change.url)}}><div class=list-item><div ng-class=\"css('span',12)\">{{ change.changedAt | date : 'yy-MM-dd HH:mm:ss' }}
|
|
162
|
+
"<div ng-controller=FngAuditHistCtrl><div ng-class=\"css('rowFluid')\" class=\"page-header list-header\"><div class=header-lhs><h1>History for {{modelName}} {{id}}</h1></div></div><div class=\"page-body list-body\"><error-display></error-display><div ng-class=\"css('rowFluid')\"><a ng-repeat=\"change in changes\" ng-href={{buildHistUrl(change.url)}}><div class=list-item><div ng-class=\"css('span',12)\">{{ change.changedAt | date : 'yy-MM-dd HH:mm:ss' }} <span ng-if=change.chg title=\"{{ change.chg | json}}\"><changes> </span> {{ change.comment }} {{ change.userDesc || (change.user ? (' User: ' + change.user) : '' ) }}</div></div></a></div><div ng-class=\"css('rowFluid')\" ng-show=inferCreate><a ng-href=\"{{buildHistUrl('version/0')}}\"><div class=list-item><div ng-class=\"css('span',12)\">{{ createDate | date : 'yy-MM-dd HH:mm:ss' }} created</div></div></a></div></div></div>"
|
|
163
163
|
);
|
|
164
164
|
|
|
165
165
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,o,s,l){return new(s=s||Promise)(function(r,t){function n(e){try{a(l.next(e))}catch(e){t(e)}}function i(e){try{a(l.throw(e))}catch(e){t(e)}}function a(e){var t;e.done?r(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(n,i)}a((l=l.apply(e,o||[])).next())})},__generator=this&&this.__generator||function(n,i){var a,o,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l=c&&t[c=0]?0:l;)try{if(a=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,o=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=i.call(n,l)}catch(e){t=[6,e],o=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,o,s,l){return new(s=s||Promise)(function(r,t){function n(e){try{a(l.next(e))}catch(e){t(e)}}function i(e){try{a(l.throw(e))}catch(e){t(e)}}function a(e){var t;e.done?r(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(n,i)}a((l=l.apply(e,o||[])).next())})},__generator=this&&this.__generator||function(n,i){var a,o,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=e(0),c.throw=e(1),c.return=e(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l=c&&t[c=0]?0:l;)try{if(a=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,o=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=i.call(n,l)}catch(e){t=[6,e],o=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}};angular.module("fngAuditModule",["formsAngular"]).config(["RoutingServiceProvider",function(e){e.addRoutes(null,[{route:"/:model/:id/history",state:"model::history",templateUrl:"templates/base-history.html"},{route:"/:model/:form/:id/history",state:"model::history",templateUrl:"templates/base-history.html"},{route:"/:model/:id/changes",state:"model::history",templateUrl:"templates/base-history.html"},{route:"/:model/:form/:id/changes",state:"model::history",templateUrl:"templates/base-history.html"},{route:"/:model/:id/version/:version",state:"model::version",templateUrl:"templates/base-version.html"},{route:"/:model/:form/:id/version/:version",state:"model::version",templateUrl:"templates/base-version.html"}]),e.registerAction("history"),e.registerAction("changes"),e.registerAction("version")}]).controller("FngAuditHistCtrl",["$rootScope","$scope","$location","RoutingService","FngAuditService",function(n,i,e,t,a){i.changes=[];var e=e.path(),r=(angular.extend(i,t.parsePathFunc()(e)),"".concat(i.modelName).concat(i.formName?"/".concat(i.formName):""));i.createDate=new Date(1e3*parseInt(i.id.toString().substring(0,8),16)),a.getHist(i.modelName,i.id,e.split("/").slice(-1)[0]).then(function(e){i.changes=e.data;var t,r={};i.changes.forEach(function(e){e.user&&(r[e.user]=null)}),null!=(e=null==n?void 0:n.describeUsers(r))&&e.then(function(t){i.changes.forEach(function(e){e.user&&(e.userDesc=t[e.user])})}),0<i.changes.length?("create"!==i.changes[i.changes.length-1].operation&&(i.inferCreate=!0),t="view",i.changes.forEach(function(e){e.url=t,void 0!==e.oldVersion&&(t="version/"+e.oldVersion)})):a.checkValidItem(i.modelName,i.id).then(function(){i.inferCreate=!0})},function(e){i.errorVisible=!0,i.alertTitle=e.statusText,i.errorMessage=e.data}),i.buildHistUrl=function(e){return t.buildUrl("".concat(r,"/").concat(i.id,"/").concat(e))}}]).controller("FngAuditVerCtrl",["$scope","$location","RoutingService","FngAuditService",function(t,e,r,n){t.record=[],angular.extend(t,r.parsePathFunc()(e.$$path)),n.getVersion(t.modelName,t.id,t.tab).then(function(e){"0"===t.tab&&1===Object.keys(e.data).length?(t.errorVisible=!0,t.alertTitle="Error",t.errorMessage="No such ".concat(t.modelName," as ").concat(t.id)):t.version=e.data},function(e){t.errorVisible=!0,t.alertTitle=e.statusText,t.errorMessage=e.data}),t.buildHistUrl=function(e){return r.buildUrl(t.modelName+"/"+t.id+"/version/"+e.oldVersion)}}]).service("FngAuditService",["$http",function(i){return{getHist:function(e,t){return __awaiter(this,arguments,void 0,function(t,r,n){return void 0===n&&(n="history"),__generator(this,function(e){return[2,i.get("/api/".concat(t,"/").concat(r,"/").concat(n))]})})},getVersion:function(e,t,r){return i.get("/api/".concat(e,"/").concat(t,"/version/").concat(r))},checkValidItem:function(e,t){return i.get("/api/".concat(e,"/").concat(t))}}}]),angular.module("fngAuditModule").run(["$templateCache",function(e){e.put("templates/base-history.html","<div ng-controller=FngAuditHistCtrl><div ng-class=\"css('rowFluid')\" class=\"page-header list-header\"><div class=header-lhs><h1>History for {{modelName}} {{id}}</h1></div></div><div class=\"page-body list-body\"><error-display></error-display><div ng-class=\"css('rowFluid')\"><a ng-repeat=\"change in changes\" ng-href={{buildHistUrl(change.url)}}><div class=list-item><div ng-class=\"css('span',12)\">{{ change.changedAt | date : 'yy-MM-dd HH:mm:ss' }} <span ng-if=change.chg title=\"{{ change.chg | json}}\"><changes> </span> {{ change.comment }} {{ change.userDesc || (change.user ? (' User: ' + change.user) : '' ) }}</div></div></a></div><div ng-class=\"css('rowFluid')\" ng-show=inferCreate><a ng-href=\"{{buildHistUrl('version/0')}}\"><div class=list-item><div ng-class=\"css('span',12)\">{{ createDate | date : 'yy-MM-dd HH:mm:ss' }} created</div></div></a></div></div></div>"),e.put("templates/base-version.html",'<div ng-controller=FngAuditVerCtrl><div ng-class="css(\'rowFluid\')" class="page-header list-header"><div class=header-lhs><h1>Version {{ tab }} for {{modelName}} {{id}}</h1></div></div><div class="page-body list-body"><error-display></error-display><div ng-class="css(\'rowFluid\')"><pre>\n{{ version | json }}\n</pre></div></div></div>')}]);
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fng-audit",
|
|
3
|
-
"version": "0.12.0-beta.
|
|
3
|
+
"version": "0.12.0-beta.316",
|
|
4
4
|
"description": "Client part of forms-angular audit plugin",
|
|
5
5
|
"homepage": "https://www.forms-angular.org/#/plugins",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
8
8
|
],
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"async":
|
|
11
|
-
"colors":
|
|
10
|
+
"async":"^3.2.5",
|
|
11
|
+
"colors":"^1.4.0",
|
|
12
12
|
"jsondiffpatch": "=0.5.0",
|
|
13
|
-
"lodash":
|
|
13
|
+
"lodash":"^4.17.21",
|
|
14
14
|
"lodash.clonedeep": "^4.5.0"
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
@@ -19,23 +19,49 @@
|
|
|
19
19
|
},
|
|
20
20
|
"main": "./dist/server/fng-audit.js",
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@types/angular": "1.8.9",
|
|
23
|
-
"@types/async": "3.2.24",
|
|
24
|
-
"@types/chai": "4.3.16",
|
|
25
|
-
"@types/express": "4.17.21",
|
|
26
|
-
"@types/mocha": "10.0.7",
|
|
22
|
+
"@types/angular": "^1.8.9",
|
|
23
|
+
"@types/async": "^3.2.24",
|
|
24
|
+
"@types/chai": "^4.3.16",
|
|
25
|
+
"@types/express": "^4.17.21",
|
|
26
|
+
"@types/mocha": "^10.0.7",
|
|
27
27
|
"angular": "^1.8.3",
|
|
28
28
|
"chai": "=4.3.10",
|
|
29
|
-
"forms-angular": "0.12.0-beta.
|
|
29
|
+
"forms-angular": "0.12.0-beta.316",
|
|
30
30
|
"grunt": "^1.6.1",
|
|
31
31
|
"grunt-angular-templates": "^1.2.0",
|
|
32
|
-
"grunt-contrib-concat":
|
|
33
|
-
"grunt-contrib-copy":
|
|
34
|
-
"grunt-contrib-uglify":
|
|
35
|
-
"grunt-legacy-log":
|
|
32
|
+
"grunt-contrib-concat":"^2.1.0",
|
|
33
|
+
"grunt-contrib-copy":"^1.0.0",
|
|
34
|
+
"grunt-contrib-uglify":"^5.2.2",
|
|
35
|
+
"grunt-legacy-log":"^3.0.0",
|
|
36
36
|
"mocha": "^10.4.0",
|
|
37
|
-
"
|
|
38
|
-
"
|
|
37
|
+
"mongodb": "=5.9.1",
|
|
38
|
+
"mongoose": "=7.6.8"
|
|
39
|
+
},
|
|
40
|
+
"overrides": {
|
|
41
|
+
"array-flatten": "npm:@socketregistry/array-flatten@^1",
|
|
42
|
+
"function-bind": "npm:@socketregistry/function-bind@^1",
|
|
43
|
+
"has": "npm:@socketregistry/has@^1",
|
|
44
|
+
"has-symbols": "npm:@socketregistry/has-symbols@^1",
|
|
45
|
+
"hasown": "npm:@socketregistry/hasown@^1",
|
|
46
|
+
"is-core-module": "npm:@socketregistry/is-core-module@^1",
|
|
47
|
+
"is-unicode-supported": "npm:@socketregistry/is-unicode-supported@^1",
|
|
48
|
+
"path-parse": "npm:@socketregistry/path-parse@^1",
|
|
49
|
+
"safe-buffer": "npm:@socketregistry/safe-buffer@^1",
|
|
50
|
+
"safer-buffer": "npm:@socketregistry/safer-buffer@^1",
|
|
51
|
+
"side-channel": "npm:@socketregistry/side-channel@^1"
|
|
52
|
+
},
|
|
53
|
+
"resolutions": {
|
|
54
|
+
"array-flatten": "npm:@socketregistry/array-flatten@^1",
|
|
55
|
+
"function-bind": "npm:@socketregistry/function-bind@^1",
|
|
56
|
+
"has": "npm:@socketregistry/has@^1",
|
|
57
|
+
"has-symbols": "npm:@socketregistry/has-symbols@^1",
|
|
58
|
+
"hasown": "npm:@socketregistry/hasown@^1",
|
|
59
|
+
"is-core-module": "npm:@socketregistry/is-core-module@^1",
|
|
60
|
+
"is-unicode-supported": "npm:@socketregistry/is-unicode-supported@^1",
|
|
61
|
+
"path-parse": "npm:@socketregistry/path-parse@^1",
|
|
62
|
+
"safe-buffer": "npm:@socketregistry/safe-buffer@^1",
|
|
63
|
+
"safer-buffer": "npm:@socketregistry/safer-buffer@^1",
|
|
64
|
+
"side-channel": "npm:@socketregistry/side-channel@^1"
|
|
39
65
|
},
|
|
40
66
|
"license": "MIT",
|
|
41
67
|
"authors": [
|