fng-audit 0.12.0-beta.177 → 0.12.0-beta.178

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.
@@ -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(r,n){var i,a,o,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,a&&(o=2&t[0]?a.return:t[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,t[1])).done)return o;switch(a=0,(t=o?[2&t[0],o.value]:t)[0]){case 0:case 1:o=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,a=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(o=0<(o=s.trys).length&&o[o.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!o||t[1]>o[0]&&t[1]<o[3])){s.label=t[1];break}if(6===t[0]&&s.label<o[1]){s.label=o[1],o=t;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(t);break}o[2]&&s.ops.pop(),s.trys.pop();continue}t=n.call(r,s)}catch(e){t=[6,e],a=0}finally{i=o=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}};!function(){"use strict";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","fngAuditServ",function(n,i,e,t,a){i.changes=[];e=e.path();angular.extend(i,t.parsePathFunc()(e));var r="".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!=n&&n.describeUsers(r).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","fngAuditServ",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("fngAuditServ",["$http",function(i){return{getHist:function(t,r,n){return void 0===n&&(n="history"),__awaiter(this,void 0,void 0,function(){return __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){"use strict";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' }} UTC <span ng-if=change.chg title=\"{{ change.chg | json}}\">&lt;changes&gt; </span>&nbsp; {{ change.comment }} &nbsp;{{ 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' }} UTC 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>')}]);
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:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;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];break}if(6===t[0]&&l.label<s[1]){l.label=s[1],s=t;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(t);break}s[2]&&l.ops.pop(),l.trys.pop();continue}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}}}};!function(){"use strict";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","fngAuditServ",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!=n&&n.describeUsers(r).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","fngAuditServ",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("fngAuditServ",["$http",function(i){return{getHist:function(t,r,n){return void 0===n&&(n="history"),__awaiter(this,void 0,void 0,function(){return __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){"use strict";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' }} UTC <span ng-if=change.chg title=\"{{ change.chg | json}}\">&lt;changes&gt; </span>&nbsp; {{ change.comment }} &nbsp;{{ 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' }} UTC 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,13 +1,13 @@
1
1
  {
2
2
  "name": "fng-audit",
3
- "version": "0.12.0-beta.177",
3
+ "version": "0.12.0-beta.178",
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": "3.2.1",
10
+ "async": "3.2.3",
11
11
  "colors": "1.4.0",
12
12
  "jsondiffpatch": "0.4.1",
13
13
  "lodash": "4.17.21",
@@ -19,22 +19,22 @@
19
19
  },
20
20
  "main": "./dist/server/fng-audit.js",
21
21
  "devDependencies": {
22
- "@types/angular": "1.8.3",
23
- "@types/async": "3.2.9",
24
- "@types/chai": "4.2.22",
22
+ "@types/angular": "1.8.4",
23
+ "@types/async": "3.2.12",
24
+ "@types/chai": "4.3.0",
25
25
  "@types/express": "4.17.13",
26
- "@types/mocha": "9.0.0",
26
+ "@types/mocha": "9.1.0",
27
27
  "angular": "^1.8.2",
28
- "chai": "4.3.4",
29
- "forms-angular": "0.12.0-beta.177",
28
+ "chai": "4.3.6",
29
+ "forms-angular": "0.12.0-beta.178",
30
30
  "grunt": "^1.4.1",
31
31
  "grunt-angular-templates": "^1.2.0",
32
32
  "grunt-contrib-concat": "2.0.0",
33
33
  "grunt-contrib-copy": "1.0.0",
34
- "grunt-contrib-uglify": "5.0.1",
34
+ "grunt-contrib-uglify": "5.1.0",
35
35
  "grunt-legacy-log": "3.0.0",
36
- "mocha": "^9.1.3",
37
- "mongoose": "6.1.10"
36
+ "mocha": "^9.2.2",
37
+ "mongoose": "6.2.9"
38
38
  },
39
39
  "license": "MIT",
40
40
  "authors": [