Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mkm-actions-diagnosticmanager

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mkm-actions-diagnosticmanager - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

.vs/slnx.sqlite-journal

2

lib/index.js

@@ -1,2 +0,2 @@

module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=11)}([function(e,t,n){"use strict";var r=n(2),o=n(16),i=Object.prototype.toString;function s(e){return"[object Array]"===i.call(e)}function a(e){return null!==e&&"object"==typeof e}function u(e){return"[object Function]"===i.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),s(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:s,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:o,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:u,isStream:function(e){return a(e)&&u(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:c,merge:function e(){var t={};function n(n,r){"object"==typeof t[r]&&"object"==typeof n?t[r]=e(t[r],n):t[r]=n}for(var r=0,o=arguments.length;r<o;r++)c(arguments[r],n);return t},extend:function(e,t,n){return c(t,(function(t,o){e[o]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t,n){"use strict";var r=n(0),o=n(18),i={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var a,u={adapter:("undefined"!=typeof XMLHttpRequest?a=n(3):"undefined"!=typeof process&&(a=n(3)),a),transformRequest:[function(e,t){return o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)?(s(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(i)})),e.exports=u},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(0),o=n(19),i=n(21),s=n(22),a=n(23),u=n(4);e.exports=function(e){return new Promise((function(t,c){var f=e.data,d=e.headers;r.isFormData(f)&&delete d["Content-Type"];var l=new XMLHttpRequest;if(e.auth){var p=e.auth.username||"",g=e.auth.password||"";d.Authorization="Basic "+btoa(p+":"+g)}if(l.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,l.onreadystatechange=function(){if(l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in l?s(l.getAllResponseHeaders()):null,r={data:e.responseType&&"text"!==e.responseType?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:n,config:e,request:l};o(t,c,r),l=null}},l.onerror=function(){c(u("Network Error",e,null,l)),l=null},l.ontimeout=function(){c(u("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",l)),l=null},r.isStandardBrowserEnv()){var m=n(24),h=(e.withCredentials||a(e.url))&&e.xsrfCookieName?m.read(e.xsrfCookieName):void 0;h&&(d[e.xsrfHeaderName]=h)}if("setRequestHeader"in l&&r.forEach(d,(function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete d[t]:l.setRequestHeader(t,e)})),e.withCredentials&&(l.withCredentials=!0),e.responseType)try{l.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){l&&(l.abort(),c(e),l=null)})),void 0===f&&(f=null),l.send(f)}))}},function(e,t,n){"use strict";var r=n(20);e.exports=function(e,t,n,o,i){var s=new Error(e);return r(s,t,n,o,i)}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.success=t.message=t.info=t.warning=t.error=t.update=t.dismiss=t.toastActionCreator=void 0;var r,o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(8)),i=n(9),s=n(33),a=(r=s)&&r.__esModule?r:{default:r};var u=t.toastActionCreator=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:o.TOAST_MESSAGE,payload:Object.assign({id:n.id||(0,a.default)("toast")},n,{message:t,type:e})}}};t.dismiss=function(e){return{type:o.TOAST_DISMISS,payload:{id:e}}},t.update=function(e,t){return{type:o.TOAST_UPDATE,payload:{id:e,options:t}}},t.error=u(i.toast.TYPE.ERROR),t.warning=u(i.toast.TYPE.WARNING),t.info=u(i.toast.TYPE.INFO),t.message=u(i.toast.TYPE.DEFAULT),t.success=u(i.toast.TYPE.SUCCESS)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.TOAST_DISMISS="TOAST_DISMISS",t.TOAST_MESSAGE="TOAST_MESSAGE",t.TOAST_UPDATE="TOAST_UPDATE"},function(e,t){e.exports=require("react-toastify")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ADD_DIAGNOSTIC="ADD_DIAGNOSTIC",t.UPDATE_DIAGNOSTIC="UPDATE_DIAGNOSTIC",t.DELETE_DIAGNOSTIC="DELETE_DIAGNOSTIC",t.SET_EDITING_DIAGNOSTIC="SET_EDITING_DIAGNOSTIC",t.SET_DIAGNOSTICS="SET_DIAGNOSTICS",t.SET_DIAGNOSTIC_VERSION="SET_DIAGNOSTIC_VERSION",t.ADD_DIAGNOSTIC_VERSION="ADD_DIAGNOSTIC_VERSION",t.UPDATE_DIAGNOSTIC_VERSION="UPDATE_DIAGNOSTIC_VERSION",t.DELETE_DIAGNOSTIC_VERSION="DELETE_DIAGNOSTIC_VERSION",t.SET_EDITING_DIAGNOSTIC_VERSION="SET_EDITING_DIAGNOSTIC_VERSION"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setEditingDiagnosticVersion=t.setEditingDiagnostic=t.deleteDiagnosticVersion=t.publishDiagnosticVersion=t.saveDiagnosticVersion=t.createDiagnosticVersion=t.getDiagnosticVersionHistory=t.getDiagnosticVersion=t.deleteDiagnostic=t.saveOrCreateDiagnostic=t.loadDiagnostics=t.getDiagnostic=void 0;var r,o=n(12),i=n(39),s=(r=i)&&r.__esModule?r:{default:r};t.default=s.default,t.getDiagnostic=o.getDiagnostic,t.loadDiagnostics=o.loadDiagnostics,t.saveOrCreateDiagnostic=o.saveOrCreateDiagnostic,t.deleteDiagnostic=o.deleteDiagnostic,t.getDiagnosticVersion=o.getDiagnosticVersion,t.getDiagnosticVersionHistory=o.getDiagnosticVersionHistory,t.createDiagnosticVersion=o.createDiagnosticVersion,t.saveDiagnosticVersion=o.saveDiagnosticVersion,t.publishDiagnosticVersion=o.publishDiagnosticVersion,t.deleteDiagnosticVersion=o.deleteDiagnosticVersion,t.setEditingDiagnostic=o.setEditingDiagnostic,t.setEditingDiagnosticVersion=o.setEditingDiagnosticVersion},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDiagnostic=function(e){return function(t){return a.getFramework(e).then((function(e){return t(function(e){return function(t){t({type:i.SET_EDITING_DIAGNOSTIC,payload:e})}}(e)),e})).catch((function(e){throw e}))}},t.loadDiagnostics=function(){return function(e){return a.getFrameworks().then((function(t){t=t.sort((function(e,t){return new Date(e.createdOn).getTime()-new Date(t.createdOn).getTime()})).reverse(),e(function(e){return{type:i.SET_DIAGNOSTICS,payload:e}}(t))})).catch((function(e){throw e}))}},t.saveOrCreateDiagnostic=function(e){return function(t){return e.id?a.updateFramework(e).then((function(){t((0,o.success)("Updated diagnostic")),t(function(e){return{type:i.UPDATE_DIAGNOSTIC,payload:e}}(e))})):a.createFramework(e).then((function(e){t(u(e.id)),t((0,o.success)("Created diagnostic")),t(function(e){return{type:i.ADD_DIAGNOSTIC,payload:e}}(e))}))}},t.deleteDiagnostic=function(e){return function(t){return a.deleteFramework(e.id).then((function(n){t((0,o.success)("Deleted diagnostic")),t(function(e){return{type:i.DELETE_DIAGNOSTIC,payload:e}}(e))}))}},t.getDiagnosticVersion=function(e,t){return function(n){return a.getFrameworkVersion(e,t).then((function(e){return n(function(e){return{type:i.SET_DIAGNOSTIC_VERSION,payload:e}}(e)),e}))}},t.getDiagnosticVersionHistory=function(e,t){return function(n){return a.getFrameworkVersionWithHistory(e,t).then((function(e){return n(function(e){return{type:i.SET_DIAGNOSTIC_VERSION,payload:e}}(e)),e}))}},t.createDiagnosticVersion=u,t.saveDiagnosticVersion=function(e){return function(t){return e.id?a.updateFrameworkVersion(e).then((function(e){return t((0,o.dismiss)()),t((0,o.success)("Updated diagnostic version")),t(c(e)),e})):a.getFrameworkVersion(e.diagnosticId,e.versionId).then((function(n){return n.name=e.name,a.updateFrameworkVersion(n).then((function(e){return t((0,o.dismiss)()),t(c(e)),t((0,o.success)("Updated diagnostic version")),e}))}))}},t.publishDiagnosticVersion=function(e){return function(t){return a.publishFrameworkVersion(e).then((function(){e.status="published",t((0,o.success)("Published diagnostic version")),t(function(e){return{type:i.UPDATE_DIAGNOSTIC_VERSION,payload:e}}(e))}))}},t.deleteDiagnosticVersion=function(e){return function(t){return a.deleteFrameworkVersion(e).then((function(n){t(function(e){return{type:i.DELETE_DIAGNOSTIC_VERSION,payload:e}}(e))}))}},t.setEditingDiagnostic=function(e){return function(t){t({type:i.SET_EDITING_DIAGNOSTIC,payload:e})}},t.setEditingDiagnosticVersion=function(e){return function(t){t({type:i.SET_EDITING_DIAGNOSTIC_VERSION,payload:e})}};var r=n(13),o=n(32),i=n(10),s={apiUri:process?process.env.REACT_APP_API_GATEWAY_URL:"http://localhost:59400/",upstreamPath:"frameworkmanagement/api/"},a=new r.FrameworksManagementService(s);function u(e){return function(t){return a.createFrameworkVersion(e).then((function(n){t(function(e){return{type:i.ADD_DIAGNOSTIC_VERSION,payload:e}}(n)),t((0,o.success)("Created diagnostic version")),window.location.href="/#/manage/diagnostics/"+e+"/versions/"+n.id}))}}function c(e){return{type:i.UPDATE_DIAGNOSTIC_VERSION,payload:e}}},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.instance=t.FrameworksManagementService=void 0;var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=((r=n(1))&&r.__esModule?r:{default:r}).default.create({timeout:3e4,params:{}});i.interceptors.request.use((function(e){var t=localStorage.getItem("authToken"),n=localStorage.getItem("roleToken");return t&&(e.headers.Authorization="Bearer "+t),n&&(e.headers["x-current-role-token"]="Bearer "+n),e}));var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.apiUrl=t.apiUri+t.upstreamPath}return o(e,[{key:"getFramework",value:function(e){var t=this;return new Promise((function(n,r){i.get(t.apiUrl+"frameworks/"+e).then((function(e){e.data&&n(e.data)})).catch((function(e){return r(e.message)}))}))}},{key:"getFrameworks",value:function(){var e=this;return new Promise((function(t,n){i.get(e.apiUrl+"frameworks").then((function(e){e.data?t(e.data):n("No Frameworks available")}))}))}},{key:"createFramework",value:function(e){var t=this;return new Promise((function(n,r){i.post(t.apiUrl+"createFramework",e).then((function(e){n(e.data)})).catch((function(e){return console.log(e)}))}))}},{key:"updateFramework",value:function(e){var t=this;return new Promise((function(n,r){i.put(t.apiUrl+"editFramework/"+e.id,e).then((function(e){n(e.data)})).catch((function(e){return console.log(e)}))}))}},{key:"deleteFramework",value:function(e){var t=this;return new Promise((function(n,r){i.delete(t.apiUrl+"deleteFramework/"+e).then((function(e){n(e.data)})).catch((function(e){return console.log(e)}))}))}},{key:"getFrameworkVersionWithHistory",value:function(e,t){var n=this;return new Promise((function(r,o){i.get(n.apiUrl+"frameworks/"+e+"/versionswithhistory/"+t).then((function(e){e.data&&r(e.data)})).catch((function(e){return o(e.message)}))}))}},{key:"getFrameworkVersion",value:function(e,t){var n=this;return new Promise((function(r,o){i.get(n.apiUrl+"frameworks/"+e+"/versions/"+t).then((function(e){e.data&&r(e.data)})).catch((function(e){return o(e.message)}))}))}},{key:"createFrameworkVersion",value:function(e){var t=this;return new Promise((function(n,r){i.post(t.apiUrl+"createFramework/"+e+"/version",{}).then((function(e){n(e.data)})).catch((function(e){return console.log(e)}))}))}},{key:"updateFrameworkVersion",value:function(e){var t=this;return new Promise((function(n,r){i.put(t.apiUrl+"editFramework/"+e.frameworkId+"/versions/"+e.id,e).then((function(e){n(e.data)})).catch((function(e){return console.log(e)}))}))}},{key:"deleteFrameworkVersion",value:function(e){var t=this;return new Promise((function(n,r){i.delete(t.apiUrl+"deleteFramework/"+e.frameworkId+"/versions/"+e.versionId).then((function(e){n(e.data)})).catch((function(e){return console.log(e)}))}))}},{key:"publishFrameworkVersion",value:function(e){var t=this;return new Promise((function(n,r){i.put(t.apiUrl+"publishFramework/"+e.frameworkId+"/versions/"+e.id).then((function(e){n(e.data)})).catch((function(e){return console.log(e)}))}))}}]),e}();t.FrameworksManagementService=s,t.instance=i},function(e,t){e.exports=n(14)}])},function(e,t,n){e.exports=n(15)},function(e,t,n){"use strict";var r=n(0),o=n(2),i=n(17),s=n(1);function a(e){var t=new i(e),n=o(i.prototype.request,t);return r.extend(n,i.prototype,t),r.extend(n,t),n}var u=a(s);u.Axios=i,u.create=function(e){return a(r.merge(s,e))},u.Cancel=n(6),u.CancelToken=n(30),u.isCancel=n(5),u.all=function(e){return Promise.all(e)},u.spread=n(31),e.exports=u,e.exports.default=u},function(e,t){
module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=11)}([function(e,t,n){"use strict";var r=n(2),o=n(16),i=Object.prototype.toString;function s(e){return"[object Array]"===i.call(e)}function a(e){return null!==e&&"object"==typeof e}function u(e){return"[object Function]"===i.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),s(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:s,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:o,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:u,isStream:function(e){return a(e)&&u(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:c,merge:function e(){var t={};function n(n,r){"object"==typeof t[r]&&"object"==typeof n?t[r]=e(t[r],n):t[r]=n}for(var r=0,o=arguments.length;r<o;r++)c(arguments[r],n);return t},extend:function(e,t,n){return c(t,(function(t,o){e[o]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t,n){"use strict";var r=n(0),o=n(18),i={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var a,u={adapter:("undefined"!=typeof XMLHttpRequest?a=n(3):"undefined"!=typeof process&&(a=n(3)),a),transformRequest:[function(e,t){return o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)?(s(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(i)})),e.exports=u},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(0),o=n(19),i=n(21),s=n(22),a=n(23),u=n(4);e.exports=function(e){return new Promise((function(t,c){var f=e.data,d=e.headers;r.isFormData(f)&&delete d["Content-Type"];var l=new XMLHttpRequest;if(e.auth){var p=e.auth.username||"",g=e.auth.password||"";d.Authorization="Basic "+btoa(p+":"+g)}if(l.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,l.onreadystatechange=function(){if(l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in l?s(l.getAllResponseHeaders()):null,r={data:e.responseType&&"text"!==e.responseType?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:n,config:e,request:l};o(t,c,r),l=null}},l.onerror=function(){c(u("Network Error",e,null,l)),l=null},l.ontimeout=function(){c(u("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",l)),l=null},r.isStandardBrowserEnv()){var m=n(24),h=(e.withCredentials||a(e.url))&&e.xsrfCookieName?m.read(e.xsrfCookieName):void 0;h&&(d[e.xsrfHeaderName]=h)}if("setRequestHeader"in l&&r.forEach(d,(function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete d[t]:l.setRequestHeader(t,e)})),e.withCredentials&&(l.withCredentials=!0),e.responseType)try{l.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){l&&(l.abort(),c(e),l=null)})),void 0===f&&(f=null),l.send(f)}))}},function(e,t,n){"use strict";var r=n(20);e.exports=function(e,t,n,o,i){var s=new Error(e);return r(s,t,n,o,i)}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.success=t.message=t.info=t.warning=t.error=t.update=t.dismiss=t.toastActionCreator=void 0;var r,o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(8)),i=n(9),s=n(33),a=(r=s)&&r.__esModule?r:{default:r};var u=t.toastActionCreator=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:o.TOAST_MESSAGE,payload:Object.assign({id:n.id||(0,a.default)("toast")},n,{message:t,type:e})}}};t.dismiss=function(e){return{type:o.TOAST_DISMISS,payload:{id:e}}},t.update=function(e,t){return{type:o.TOAST_UPDATE,payload:{id:e,options:t}}},t.error=u(i.toast.TYPE.ERROR),t.warning=u(i.toast.TYPE.WARNING),t.info=u(i.toast.TYPE.INFO),t.message=u(i.toast.TYPE.DEFAULT),t.success=u(i.toast.TYPE.SUCCESS)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.TOAST_DISMISS="TOAST_DISMISS",t.TOAST_MESSAGE="TOAST_MESSAGE",t.TOAST_UPDATE="TOAST_UPDATE"},function(e,t){e.exports=require("react-toastify")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ADD_DIAGNOSTIC="ADD_DIAGNOSTIC",t.UPDATE_DIAGNOSTIC="UPDATE_DIAGNOSTIC",t.DELETE_DIAGNOSTIC="DELETE_DIAGNOSTIC",t.SET_EDITING_DIAGNOSTIC="SET_EDITING_DIAGNOSTIC",t.SET_DIAGNOSTICS="SET_DIAGNOSTICS",t.SET_DIAGNOSTIC_VERSION="SET_DIAGNOSTIC_VERSION",t.ADD_DIAGNOSTIC_VERSION="ADD_DIAGNOSTIC_VERSION",t.UPDATE_DIAGNOSTIC_VERSION="UPDATE_DIAGNOSTIC_VERSION",t.DELETE_DIAGNOSTIC_VERSION="DELETE_DIAGNOSTIC_VERSION",t.SET_EDITING_DIAGNOSTIC_VERSION="SET_EDITING_DIAGNOSTIC_VERSION"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setEditingDiagnosticVersion=t.setEditingDiagnostic=t.deleteDiagnosticVersion=t.publishDiagnosticVersion=t.saveDiagnosticVersion=t.createDiagnosticVersion=t.getDiagnosticVersionHistory=t.getDiagnosticVersion=t.deleteDiagnostic=t.saveOrCreateDiagnostic=t.loadDiagnostics=t.getDiagnostic=void 0;var r,o=n(12),i=n(39),s=(r=i)&&r.__esModule?r:{default:r};t.default=s.default,t.getDiagnostic=o.getDiagnostic,t.loadDiagnostics=o.loadDiagnostics,t.saveOrCreateDiagnostic=o.saveOrCreateDiagnostic,t.deleteDiagnostic=o.deleteDiagnostic,t.getDiagnosticVersion=o.getDiagnosticVersion,t.getDiagnosticVersionHistory=o.getDiagnosticVersionHistory,t.createDiagnosticVersion=o.createDiagnosticVersion,t.saveDiagnosticVersion=o.saveDiagnosticVersion,t.publishDiagnosticVersion=o.publishDiagnosticVersion,t.deleteDiagnosticVersion=o.deleteDiagnosticVersion,t.setEditingDiagnostic=o.setEditingDiagnostic,t.setEditingDiagnosticVersion=o.setEditingDiagnosticVersion},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDiagnostic=function(e){return function(t){return a.getFramework(e).then((function(e){return t(function(e){return function(t){t({type:i.SET_EDITING_DIAGNOSTIC,payload:e})}}(e)),e})).catch((function(e){throw e}))}},t.loadDiagnostics=function(e){e||(e="diagnostic");return function(t){return a.getFrameworks(e).then((function(e){e=e.sort((function(e,t){return new Date(e.createdOn).getTime()-new Date(t.createdOn).getTime()})).reverse(),t(function(e){return{type:i.SET_DIAGNOSTICS,payload:e}}(e))})).catch((function(e){throw e}))}},t.saveOrCreateDiagnostic=function(e){return function(t){return e.id?a.updateFramework(e).then((function(){t((0,o.success)("Updated diagnostic")),t(function(e){return{type:i.UPDATE_DIAGNOSTIC,payload:e}}(e))})):a.createFramework(e).then((function(e){t(u(e.id)),t((0,o.success)("Created diagnostic")),t(function(e){return{type:i.ADD_DIAGNOSTIC,payload:e}}(e))}))}},t.deleteDiagnostic=function(e){return function(t){return a.deleteFramework(e.id).then((function(n){t((0,o.success)("Deleted diagnostic")),t(function(e){return{type:i.DELETE_DIAGNOSTIC,payload:e}}(e))}))}},t.getDiagnosticVersion=function(e,t){return function(n){return a.getFrameworkVersion(e,t).then((function(e){return n(function(e){return{type:i.SET_DIAGNOSTIC_VERSION,payload:e}}(e)),e}))}},t.getDiagnosticVersionHistory=function(e,t){return function(n){return a.getFrameworkVersionWithHistory(e,t).then((function(e){return n(function(e){return{type:i.SET_DIAGNOSTIC_VERSION,payload:e}}(e)),e}))}},t.createDiagnosticVersion=u,t.saveDiagnosticVersion=function(e){return function(t){return e.id?a.updateFrameworkVersion(e).then((function(e){return t((0,o.dismiss)()),t((0,o.success)("Updated diagnostic version")),t(c(e)),e})):a.getFrameworkVersion(e.diagnosticId,e.versionId).then((function(n){return n.name=e.name,a.updateFrameworkVersion(n).then((function(e){return t((0,o.dismiss)()),t(c(e)),t((0,o.success)("Updated diagnostic version")),e}))}))}},t.publishDiagnosticVersion=function(e){return function(t){return a.publishFrameworkVersion(e).then((function(){e.status="published",t((0,o.success)("Published diagnostic version")),t(function(e){return{type:i.UPDATE_DIAGNOSTIC_VERSION,payload:e}}(e))}))}},t.deleteDiagnosticVersion=function(e){return function(t){return a.deleteFrameworkVersion(e).then((function(n){t(function(e){return{type:i.DELETE_DIAGNOSTIC_VERSION,payload:e}}(e))}))}},t.setEditingDiagnostic=function(e){return function(t){t({type:i.SET_EDITING_DIAGNOSTIC,payload:e})}},t.setEditingDiagnosticVersion=function(e){return function(t){t({type:i.SET_EDITING_DIAGNOSTIC_VERSION,payload:e})}};var r=n(13),o=n(32),i=n(10),s={apiUri:process?process.env.REACT_APP_API_GATEWAY_URL:"http://localhost:59400/",upstreamPath:"frameworkmanagement/api/"},a=new r.FrameworksManagementService(s);function u(e){return function(t){return a.createFrameworkVersion(e).then((function(n){t(function(e){return{type:i.ADD_DIAGNOSTIC_VERSION,payload:e}}(n)),t((0,o.success)("Created diagnostic version")),window.location.href="/#/manage/diagnostics/"+e+"/versions/"+n.id}))}}function c(e){return{type:i.UPDATE_DIAGNOSTIC_VERSION,payload:e}}},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.instance=t.FrameworksManagementService=void 0;var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=((r=n(1))&&r.__esModule?r:{default:r}).default.create({timeout:3e4,params:{}});i.interceptors.request.use((function(e){var t=localStorage.getItem("authToken"),n=localStorage.getItem("roleToken");return t&&(e.headers.Authorization="Bearer "+t),n&&(e.headers["x-current-role-token"]="Bearer "+n),e}));var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.apiUrl=t.apiUri+t.upstreamPath}return o(e,[{key:"getFramework",value:function(e){var t=this;return new Promise((function(n,r){i.get(t.apiUrl+"frameworks/"+e).then((function(e){e.data&&n(e.data)})).catch((function(e){return r(e.message)}))}))}},{key:"getFrameworks",value:function(e){var t=this;return new Promise((function(n,r){i.get(t.apiUrl+"frameworks/type/"+e).then((function(e){e.data?n(e.data):r("No Frameworks available")}))}))}},{key:"createFramework",value:function(e){var t=this;return new Promise((function(n,r){i.post(t.apiUrl+"createFramework",e).then((function(e){n(e.data)})).catch((function(e){return console.log(e)}))}))}},{key:"updateFramework",value:function(e){var t=this;return new Promise((function(n,r){i.put(t.apiUrl+"editFramework/"+e.id,e).then((function(e){n(e.data)})).catch((function(e){return console.log(e)}))}))}},{key:"deleteFramework",value:function(e){var t=this;return new Promise((function(n,r){i.delete(t.apiUrl+"deleteFramework/"+e).then((function(e){n(e.data)})).catch((function(e){return console.log(e)}))}))}},{key:"getFrameworkVersionWithHistory",value:function(e,t){var n=this;return new Promise((function(r,o){i.get(n.apiUrl+"frameworks/"+e+"/versionswithhistory/"+t).then((function(e){e.data&&r(e.data)})).catch((function(e){return o(e.message)}))}))}},{key:"getFrameworkVersion",value:function(e,t){var n=this;return new Promise((function(r,o){i.get(n.apiUrl+"frameworks/"+e+"/versions/"+t).then((function(e){e.data&&r(e.data)})).catch((function(e){return o(e.message)}))}))}},{key:"createFrameworkVersion",value:function(e){var t=this;return new Promise((function(n,r){i.post(t.apiUrl+"createFramework/"+e+"/version",{}).then((function(e){n(e.data)})).catch((function(e){return console.log(e)}))}))}},{key:"updateFrameworkVersion",value:function(e){var t=this;return new Promise((function(n,r){i.put(t.apiUrl+"editFramework/"+e.frameworkId+"/versions/"+e.id,e).then((function(e){n(e.data)})).catch((function(e){return console.log(e)}))}))}},{key:"deleteFrameworkVersion",value:function(e){var t=this;return new Promise((function(n,r){i.delete(t.apiUrl+"deleteFramework/"+e.frameworkId+"/versions/"+e.versionId).then((function(e){n(e.data)})).catch((function(e){return console.log(e)}))}))}},{key:"publishFrameworkVersion",value:function(e){var t=this;return new Promise((function(n,r){i.put(t.apiUrl+"publishFramework/"+e.frameworkId+"/versions/"+e.id).then((function(e){n(e.data)})).catch((function(e){return console.log(e)}))}))}}]),e}();t.FrameworksManagementService=s,t.instance=i},function(e,t){e.exports=n(14)}])},function(e,t,n){e.exports=n(15)},function(e,t,n){"use strict";var r=n(0),o=n(2),i=n(17),s=n(1);function a(e){var t=new i(e),n=o(i.prototype.request,t);return r.extend(n,i.prototype,t),r.extend(n,t),n}var u=a(s);u.Axios=i,u.create=function(e){return a(r.merge(s,e))},u.Cancel=n(6),u.CancelToken=n(30),u.isCancel=n(5),u.all=function(e){return Promise.all(e)},u.spread=n(31),e.exports=u,e.exports.default=u},function(e,t){
/*!

@@ -3,0 +3,0 @@ * Determine if an object is a Buffer

{
"name": "mkm-actions-diagnosticmanager",
"version": "1.0.0",
"version": "1.0.1",
"description": "Redux actions to support diagnostic manager",

@@ -50,4 +50,4 @@ "main": "./lib/index.js",

"dependencies": {
"mkm-service-frameworkmanager": "^1.0.0"
"mkm-service-frameworkmanager": "^1.0.21"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc