electron-rpc-common
Advanced tools
Comparing version 1.1.0 to 1.2.0
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
tslib_1.__exportStar(require("electron-rpc-types"), exports); | ||
tslib_1.__exportStar(require("electron-rpc-client"), exports); | ||
tslib_1.__exportStar(require("electron-rpc-server"), exports); | ||
tslib_1.__exportStar(require("electron-rpc-utils"), exports); | ||
__export(require("electron-rpc-types")); | ||
__export(require("electron-rpc-client")); | ||
__export(require("electron-rpc-server")); | ||
__export(require("electron-rpc-utils")); | ||
__export(require("electron-rpc-async-queue")); | ||
__export(require("electron-rpc-client-services")); | ||
__export(require("electron-rpc-server-controllers")); |
@@ -1,16 +0,1 @@ | ||
window.ElectronRPC=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=7)}([function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",function(){return o}),n.d(t,"__assign",function(){return i}),n.d(t,"__rest",function(){return s}),n.d(t,"__decorate",function(){return u}),n.d(t,"__param",function(){return c}),n.d(t,"__metadata",function(){return a}),n.d(t,"__awaiter",function(){return l}),n.d(t,"__generator",function(){return f}),n.d(t,"__exportStar",function(){return p}),n.d(t,"__values",function(){return h}),n.d(t,"__read",function(){return v}),n.d(t,"__spread",function(){return y}),n.d(t,"__await",function(){return d}),n.d(t,"__asyncGenerator",function(){return _}),n.d(t,"__asyncDelegator",function(){return g}),n.d(t,"__asyncValues",function(){return m}),n.d(t,"__makeTemplateObject",function(){return b}),n.d(t,"__importStar",function(){return w}),n.d(t,"__importDefault",function(){return R}); | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */ | ||
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}function c(e,t){return function(n,r){t(n,r,e)}}function a(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function u(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,u)}c((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function p(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function h(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function d(e){return this instanceof d?(this.v=e,this):new d(e)}function _(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){o[e]&&(r[e]=function(t){return new Promise(function(n,r){i.push([e,t,n,r])>1||u(e,t)})})}function u(e,t){try{!function(e){e.value instanceof d?Promise.resolve(e.value.v).then(c,a):l(i[0][2],e)}(o[e](t))}catch(e){l(i[0][3],e)}}function c(e){u("next",e)}function a(e){u("throw",e)}function l(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function g(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:d(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function m(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){(function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)})(r,o,(t=e[n](t)).done,t.value)})}}}function b(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function w(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function R(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10);t.Loggable=r.Loggable;var o=n(2);t.isNil=o.isNil;var i=n(11);t.resolve=i.resolve},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNil=function(e){return null===e||void 0===e}},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function o(e,t,n){var o=n.value;if("function"!=typeof o)throw new Error("@autobind decorator can only be applied to methods not: "+(void 0===o?"undefined":r(o)));var i=!1;return{configurable:!0,get:function(){if(i||this===e.prototype||this.hasOwnProperty(t)||"function"!=typeof o)return o;var n=o.bind(this);return i=!0,Object.defineProperty(this,t,{configurable:!0,get:function(){return n},set:function(e){o=e,delete this[t]}}),i=!1,n},set:function(e){o=e}}}t.default=function(){return 1===arguments.length?function(e){var t=void 0;"undefined"!=typeof Reflect&&"function"==typeof Reflect.ownKeys?t=Reflect.ownKeys(e.prototype):(t=Object.getOwnPropertyNames(e.prototype),"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e.prototype))));return t.forEach(function(t){if("constructor"!==t){var n=Object.getOwnPropertyDescriptor(e.prototype,t);"function"==typeof n.value&&Object.defineProperty(e.prototype,t,o(e,t,n))}}),e}.apply(void 0,arguments):o.apply(void 0,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.START="TaskEventType.START",e.SUCCESS="TaskEventType.SUCCESS",e.ERROR="TaskEventType.ERROR",e.END="TaskEventType.END"}(t.TaskEventType||(t.TaskEventType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);r.__exportStar(n(8),t),r.__exportStar(n(9),t),r.__exportStar(n(15),t),r.__exportStar(n(1),t)},function(e,t){t.EnvelopeType={NONBLOCKING:"read",BLOCKING:"write"},t.RpcChannelDefaultNames={REQUEST:"RpcChannelDefaultNames.REQUEST",RESPONSE:"RpcChannelDefaultNames.RESPONSE"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(1),i=n(12),s=n(5),u=function(e){function t(t){var n=t.receiver,i=t.sender,s=r.__rest(t,["receiver","sender"]),u=e.call(this)||this,c=o.resolve(s),a=c.rpcRequestChannelName,l=c.rpcResponseChannelName;return u.rpcRequestChannelName=a,u.rpcResponseChannelName=l,u.receiver=n,u.sender=i,u.listeners={},u.receiver.on(u.rpcResponseChannelName,u.onResponse),u}return r.__extends(t,e),t.prototype.request=function(e){var t=this,n=e.procedure,s=r.__rest(e,["procedure"]),u=i.v4(),c=o.isNil(s.type)?"EnvelopeType.BLOCKING":s.type,a=o.isNil(s.args)?[]:s.args,l={type:c,procedure:n,uuid:u},f=r.__assign({},l,{args:a});return this.logRequest(l,a),new Promise(function(e,n){t.listeners[u]=function(r){var i=r.result,s=r.error;o.isNil(s)?(t.logSuccess(l,a,i),e(i)):(t.logError(l,a,s),n(s))},t.sender.send(t.rpcRequestChannelName,f)})},t.prototype.nonblocking=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return this.request({procedure:e,args:t,type:"EnvelopeType.NONBLOCKING"})},t.prototype.blocking=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return this.request({procedure:e,args:t,type:"EnvelopeType.BLOCKING"})},t.prototype.onResponse=function(e,t){o.isNil(this.listeners[t.uuid])||(this.listeners[t.uuid](t),delete this.listeners[t.uuid])},r.__decorate([s.default],t.prototype,"onResponse",null),t}(o.Loggable);t.Client=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=function(){function e(){this.requestLogger=null,this.successLogger=null,this.errorLogger=null}return e.prototype.setRequestLogger=function(e){this.requestLogger=e},e.prototype.setSuccessLogger=function(e){this.successLogger=e},e.prototype.setErrorLogger=function(e){this.errorLogger=e},e.prototype.logRequest=function(e,t){r.isNil(this.requestLogger)||this.requestLogger(e,t)},e.prototype.logSuccess=function(e,t,n){r.isNil(this.successLogger)||this.successLogger(e,t,n)},e.prototype.logError=function(e,t,n){r.isNil(this.errorLogger)||this.errorLogger(e,t,n)},e}();t.Loggable=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);t.resolve=function(e){return{rpcRequestChannelName:r.isNil(e)||r.isNil(e.rpcRequestChannelName)?"RpcChannelDefaultNames.REQUEST":e.rpcRequestChannelName,rpcResponseChannelName:r.isNil(e)||r.isNil(e.rpcResponseChannelName)?"RpcChannelDefaultNames.RESPONSE":e.rpcResponseChannelName}}},function(e,t,n){var r=n(13),o=n(14),i=o;i.v1=r,i.v4=o,e.exports=i},function(e,t,n){var r,o,i=n(3),s=n(4),u=0,c=0;e.exports=function(e,t,n){var a=t&&n||0,l=t||[],f=(e=e||{}).node||r,p=void 0!==e.clockseq?e.clockseq:o;if(null==f||null==p){var h=i();null==f&&(f=r=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==p&&(p=o=16383&(h[6]<<8|h[7]))}var v=void 0!==e.msecs?e.msecs:(new Date).getTime(),y=void 0!==e.nsecs?e.nsecs:c+1,d=v-u+(y-c)/1e4;if(d<0&&void 0===e.clockseq&&(p=p+1&16383),(d<0||v>u)&&void 0===e.nsecs&&(y=0),y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=v,c=y,o=p;var _=(1e4*(268435455&(v+=122192928e5))+y)%4294967296;l[a++]=_>>>24&255,l[a++]=_>>>16&255,l[a++]=_>>>8&255,l[a++]=255&_;var g=v/4294967296*1e4&268435455;l[a++]=g>>>8&255,l[a++]=255&g,l[a++]=g>>>24&15|16,l[a++]=g>>>16&255,l[a++]=p>>>8|128,l[a++]=255&p;for(var m=0;m<6;++m)l[a+m]=f[m];return t||s(l)}},function(e,t,n){var r=n(3),o=n(4);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var u=0;u<16;++u)t[i+u]=s[u];return t||o(s)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(16);t.Server=r.Server},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(5),i=n(1),s=n(17),u=function(e){function t(t,n,r){var o=e.call(this)||this,u=i.resolve(r),c=u.rpcRequestChannelName,a=u.rpcResponseChannelName;return o.rpcRequestChannelName=c,o.rpcResponseChannelName=a,o.resolver=n,o.bus=t,o.queue=new s.TaskQueue,o}return r.__extends(t,e),t.prototype.start=function(){this.bus.on(this.rpcRequestChannelName,this.onRequest)},t.prototype.stop=function(){this.bus.removeListener(this.rpcRequestChannelName,this.onRequest)},t.prototype.onRequest=function(e,t){var n=t.type,o=t.procedure,i=t.uuid,s=r.__rest(t,["type","procedure","uuid"]);return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(t){switch(t.label){case 0:switch(this.logRequest({type:n,procedure:o,uuid:i},s.args),n){case"EnvelopeType.NONBLOCKING":return[3,1];case"EnvelopeType.BLOCKING":return[3,3]}return[3,3];case 1:return[4,this.onNonblockingRequest(e,r.__assign({type:n,procedure:o,uuid:i},s))];case 2:return t.sent(),[3,5];case 3:return[4,this.onBlockingRequest(e,r.__assign({type:n,procedure:o,uuid:i},s))];case 4:return t.sent(),[3,5];case 5:return[2]}})})},t.prototype.onNonblockingRequest=function(e,t){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(n){switch(n.label){case 0:return[4,this.processRequest(e,t)];case 1:return n.sent(),[2]}})})},t.prototype.onBlockingRequest=function(e,t){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(n){return this.queue.push(this.processRequest,e,t),[2]})})},t.prototype.processRequest=function(e,t){var n=e.sender,o=t.uuid,s=t.type,u=t.procedure,c=t.args;return r.__awaiter(this,void 0,void 0,function(){var e,t,a,l;return r.__generator(this,function(r){switch(r.label){case 0:return t={uuid:o,type:s,procedure:u,error:null,result:null},i.isNil(this.resolver[u])?(t.error='Procedure "'+u+'" not found',[3,5]):[3,1];case 1:return r.trys.push([1,3,,4]),a=t,[4,(e=this.resolver)[u].apply(e,c)];case 2:return a.result=r.sent(),this.logSuccess({uuid:o,type:s,procedure:u},c,t.result),[3,4];case 3:return l=r.sent(),t.error=String(l),this.logError({uuid:o,type:s,procedure:u},c,t.error),[3,4];case 4:n.send(this.rpcResponseChannelName,t),r.label=5;case 5:return[2]}})})},r.__decorate([o.default],t.prototype,"onRequest",null),r.__decorate([o.default],t.prototype,"processRequest",null),t}(i.Loggable);t.Server=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(18),i=n(6),s=function(){function e(){this.queue=[]}return e.prototype.push=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return r.__awaiter(this,void 0,void 0,function(){var n,s,u,c,a=this;return r.__generator(this,function(r){switch(r.label){case 0:return n=new(o.Task.bind.apply(o.Task,[void 0,e].concat(t))),s=new Promise(function(e){return n.once(i.TaskEventType.END,function(n,r){a.queue.shift(),e({error:n,result:r,args:t})})}),this.queue.push(n),this.queue.length>1?(u=this.queue.length-1,c=u-1,this.queue[c].once(i.TaskEventType.END,function(){n.run()})):n.run(),[4,s];case 1:return[2,r.sent()]}})})},e}();t.TaskQueue=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(19),i=n(6),s=function(e){function t(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=e.call(this)||this;return o.body=t,o.args=n,o}return r.__extends(t,e),t.prototype.run=function(){return r.__awaiter(this,void 0,void 0,function(){var e,t,n;return r.__generator(this,function(r){switch(r.label){case 0:e=null,t=null,this.emit(i.TaskEventType.START),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.body.apply(this,this.args)];case 2:return e=r.sent(),this.emit(i.TaskEventType.SUCCESS,e),[3,4];case 3:return n=r.sent(),t=String(n),this.emit(i.TaskEventType.ERROR,t),[3,4];case 4:return this.emit(i.TaskEventType.END,t,e),[2]}})})},t}(o.EventEmitter);t.Task=s},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function o(e){return"object"==typeof e&&null!==e}function i(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!function(e){return"number"==typeof e}(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,s,u,c,a;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(i(n=this._events[e]))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:u=Array.prototype.slice.call(arguments,1),n.apply(this,u)}else if(o(n))for(u=Array.prototype.slice.call(arguments,1),s=(a=n.slice()).length,c=0;c<s;c++)a[c].apply(this,u);return!0},n.prototype.addListener=function(e,t){var s;if(!r(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned&&(s=i(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&s>0&&this._events[e].length>s&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function o(){this.removeListener(e,o),n||(n=!0,t.apply(this,arguments))}return o.listener=t,this.on(e,o),this},n.prototype.removeListener=function(e,t){var n,i,s,u;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(n=this._events[e]).length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(u=s;u-- >0;)if(n[u]===t||n[u].listener&&n[u].listener===t){i=u;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}}]); | ||
window.ElectronRPC=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=14)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15);t.Loggable=n.Loggable;var o=r(1);t.isNil=o.isNil;var s=r(16);t.resolve=s.resolve;var i=r(17);t.getControllerMethodName=i.getControllerMethodName},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNil=(e=>null===e||void 0===e)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(22);t.AsyncQueue=n.AsyncQueue},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPC_SERVICE_NAME=Symbol("RPC_SERVICE_NAME"),t.RPC_SERVICE_METHODS_NAMES=Symbol("RPC_SERVICE_METHODS_NAMES")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPC_CONTROLLER_NAME="RPC_CONTROLLER_NAME",t.RPC_CONTROLLER_ACTION_NAME="RPC_CONTROLLER_ACTION_NAME"},function(e,t){t.EnvelopeType={NONBLOCKING:"EnvelopeType.NONBLOCKING",BLOCKING:"EnvelopeType.BLOCKING"},t.RpcChannelDefaultNames={REQUEST:"RpcChannelDefaultNames.REQUEST",RESPONSE:"RpcChannelDefaultNames.RESPONSE"}},function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,s=arguments.length,i=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(0),u=r(18),c=s(r(9));class a extends i.Loggable{constructor({receiver:e,sender:t,...r}){super();const{rpcRequestChannelName:n,rpcResponseChannelName:o}=i.resolve(r);this.rpcRequestChannelName=n,this.rpcResponseChannelName=o,this.receiver=e,this.sender=t,this.listeners={},this.receiver.on(this.rpcResponseChannelName,this.onResponse)}request({procedure:e,...t}){const r=u.v4(),n=i.isNil(t.type)?"EnvelopeType.BLOCKING":t.type,o=i.isNil(t.args)?[]:t.args,s={type:n,procedure:e,uuid:r},c={...s,args:o};return this.logRequest(s,o),new Promise((e,t)=>{this.listeners[r]=(({result:r,error:n})=>{i.isNil(n)?(this.logSuccess(s,o,r),e(r)):(this.logError(s,o,n),t(n))}),this.sender.send(this.rpcRequestChannelName,c)})}nonblocking(e,...t){return this.request({procedure:e,args:t,type:"EnvelopeType.NONBLOCKING"})}blocking(e,...t){return this.request({procedure:e,args:t,type:"EnvelopeType.BLOCKING"})}onResponse(e,t){i.isNil(this.listeners[t.uuid])||(this.listeners[t.uuid](t),delete this.listeners[t.uuid])}}n([c.default,o("design:type",Function),o("design:paramtypes",[Object,Object]),o("design:returntype",void 0)],a.prototype,"onResponse",null),t.Client=a},function(e,t){var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(r){var n=new Uint8Array(16);e.exports=function(){return r(n),n}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,o=r;return[o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]]].join("")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function o(e,t,r){var o=r.value;if("function"!=typeof o)throw new Error("@autobind decorator can only be applied to methods not: "+(void 0===o?"undefined":n(o)));var s=!1;return{configurable:!0,get:function(){if(s||this===e.prototype||this.hasOwnProperty(t)||"function"!=typeof o)return o;var r=o.bind(this);return s=!0,Object.defineProperty(this,t,{configurable:!0,get:function(){return r},set:function(e){o=e,delete this[t]}}),s=!1,r},set:function(e){o=e}}}t.default=function(){return 1===arguments.length?function(e){var t=void 0;"undefined"!=typeof Reflect&&"function"==typeof Reflect.ownKeys?t=Reflect.ownKeys(e.prototype):(t=Object.getOwnPropertyNames(e.prototype),"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e.prototype))));return t.forEach(function(t){if("constructor"!==t){var r=Object.getOwnPropertyDescriptor(e.prototype,t);"function"==typeof r.value&&Object.defineProperty(e.prototype,t,o(e,t,r))}}),e}.apply(void 0,arguments):o.apply(void 0,arguments)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(21);t.Server=n.Server},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.START="TaskEventType.START",e.SUCCESS="TaskEventType.SUCCESS",e.ERROR="TaskEventType.ERROR",e.END="TaskEventType.END"}(t.TaskEventType||(t.TaskEventType={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(25);t.Factory=n.Factory;var o=r(26);t.Procedure=o.Procedure;var s=r(27);t.Service=s.Service},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(28);t.bindControllersToServer=n.bindControllersToServer;var o=r(29);t.Controller=o.Controller;var s=r(30);t.Action=s.Action},function(e,t,r){"use strict";r.r(t);var n=r(5);for(var o in n)"default"!==o&&function(e){r.d(t,e,function(){return n[e]})}(o);var s=r(6);for(var o in s)"default"!==o&&function(e){r.d(t,e,function(){return s[e]})}(o);var i=r(10);for(var o in i)"default"!==o&&function(e){r.d(t,e,function(){return i[e]})}(o);var u=r(0);for(var o in u)"default"!==o&&function(e){r.d(t,e,function(){return u[e]})}(o);var c=r(2);for(var o in c)"default"!==o&&function(e){r.d(t,e,function(){return c[e]})}(o);var a=r(12);for(var o in a)"default"!==o&&function(e){r.d(t,e,function(){return a[e]})}(o);var l=r(13);for(var o in l)"default"!==o&&function(e){r.d(t,e,function(){return l[e]})}(o)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1);t.Loggable=class{constructor(){this.requestLogger=null,this.successLogger=null,this.errorLogger=null}setRequestLogger(e){this.requestLogger=e}setSuccessLogger(e){this.successLogger=e}setErrorLogger(e){this.errorLogger=e}logRequest(e,t){n.isNil(this.requestLogger)||this.requestLogger(e,t)}logSuccess(e,t,r){n.isNil(this.successLogger)||this.successLogger(e,t,r)}logError(e,t,r){n.isNil(this.errorLogger)||this.errorLogger(e,t,r)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1);t.resolve=(e=>({rpcRequestChannelName:n.isNil(e)||n.isNil(e.rpcRequestChannelName)?"RpcChannelDefaultNames.REQUEST":e.rpcRequestChannelName,rpcResponseChannelName:n.isNil(e)||n.isNil(e.rpcResponseChannelName)?"RpcChannelDefaultNames.RESPONSE":e.rpcResponseChannelName}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getControllerMethodName=((e,t)=>`${e}.${t}`)},function(e,t,r){var n=r(19),o=r(20),s=o;s.v1=n,s.v4=o,e.exports=s},function(e,t,r){var n,o,s=r(7),i=r(8),u=0,c=0;e.exports=function(e,t,r){var a=t&&r||0,l=t||[],p=(e=e||{}).node||n,f=void 0!==e.clockseq?e.clockseq:o;if(null==p||null==f){var d=s();null==p&&(p=n=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==f&&(f=o=16383&(d[6]<<8|d[7]))}var y=void 0!==e.msecs?e.msecs:(new Date).getTime(),h=void 0!==e.nsecs?e.nsecs:c+1,v=y-u+(h-c)/1e4;if(v<0&&void 0===e.clockseq&&(f=f+1&16383),(v<0||y>u)&&void 0===e.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=y,c=h,o=f;var R=(1e4*(268435455&(y+=122192928e5))+h)%4294967296;l[a++]=R>>>24&255,l[a++]=R>>>16&255,l[a++]=R>>>8&255,l[a++]=255&R;var _=y/4294967296*1e4&268435455;l[a++]=_>>>8&255,l[a++]=255&_,l[a++]=_>>>24&15|16,l[a++]=_>>>16&255,l[a++]=f>>>8|128,l[a++]=255&f;for(var g=0;g<6;++g)l[a+g]=p[g];return t||i(l)}},function(e,t,r){var n=r(7),o=r(8);e.exports=function(e,t,r){var s=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var i=(e=e||{}).random||(e.rng||n)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t)for(var u=0;u<16;++u)t[s+u]=i[u];return t||o(i)}},function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,s=arguments.length,i=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=s(r(9)),u=r(0),c=r(2);class a extends u.Loggable{constructor(e,t={},r){super();const{rpcRequestChannelName:n,rpcResponseChannelName:o}=u.resolve(r);this.rpcRequestChannelName=n,this.rpcResponseChannelName=o,this.resolver=t,this.bus=e,this.queue=new c.AsyncQueue}start(){this.bus.on(this.rpcRequestChannelName,this.onRequest)}stop(){this.bus.removeListener(this.rpcRequestChannelName,this.onRequest)}extendResolver(e={}){this.resolver={...this.resolver,...e}}async onRequest(e,{type:t,procedure:r,uuid:n,...o}){switch(this.logRequest({type:t,procedure:r,uuid:n},o.args),t){case"EnvelopeType.NONBLOCKING":await this.onNonblockingRequest(e,{type:t,procedure:r,uuid:n,...o});break;case"EnvelopeType.BLOCKING":default:await this.onBlockingRequest(e,{type:t,procedure:r,uuid:n,...o})}}async onNonblockingRequest(e,t){await this.processRequest(e,t)}async onBlockingRequest(e,t){this.queue.push(this.processRequest,e,t)}async processRequest({sender:e},{uuid:t,type:r,procedure:n,args:o}){const s={uuid:t,type:r,procedure:n,error:null,result:null};if(u.isNil(this.resolver[n]))s.error=`Procedure "${n}" not found`;else{try{s.result=await this.resolver[n](...o),this.logSuccess({uuid:t,type:r,procedure:n},o,s.result)}catch(e){s.error=String(e),this.logError({uuid:t,type:r,procedure:n},o,s.error)}e.send(this.rpcResponseChannelName,s)}}}n([i.default,o("design:type",Function),o("design:paramtypes",[Object,Object]),o("design:returntype",Promise)],a.prototype,"onRequest",null),n([i.default,o("design:type",Function),o("design:paramtypes",[Object,Object]),o("design:returntype",Promise)],a.prototype,"processRequest",null),t.Server=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(23),o=r(11);t.AsyncQueue=class{constructor(){this.queue=[]}async push(e,...t){const r=new n.Task(e,...t),s=new Promise(e=>r.on(o.TaskEventType.END,(r,n)=>{this.queue.shift(),e({error:r,result:n,args:t})}));if(this.queue.push(r),this.queue.length>1){const e=this.queue.length-1-1;this.queue[e].on(o.TaskEventType.END,()=>{r.run()})}else r.run();return await s}}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(24)),s=r(11);t.Task=class extends o.default{constructor(e,...t){super(),this.body=e,this.args=t}async run(){let e=null,t=null;this.emit(s.TaskEventType.START);try{e=await this.body(...this.args),this.emit(s.TaskEventType.SUCCESS,e)}catch(e){t=String(e),this.emit(s.TaskEventType.ERROR,t)}this.emit(s.TaskEventType.END,t,e)}}},function(e,t){function r(){this.listeners={}}function n(e){if("string"!=typeof e)throw"eventName is not a string"}function o(e){if("function"!=typeof e)throw"listener is not a function"}r.prototype.maxListeners=10,r.prototype.on=function(e,t){if(n(e),o(t),this.listeners[e]=this.listeners[e]||[],this.listeners[e].length>this.maxListeners)throw"Exceeded maxListeners - You might have a memory leak";return function(e,t){return-1!==e.indexOf(t)}(this.listeners[e],t)||(this.listeners[e].push(t),this.emit("on",{eventName:e,listener:t})),this},r.prototype.emit=function(e,t){n(e);var r=Array.prototype.slice.call(arguments,1);return function(e,t,r){for(var n=0;n<e.length;n++)t.call(r,e[n])}(this.listeners[e]||[],function(e){e.apply(this,r)},this),this},r.prototype.off=function(e,t){return n(e),o(t),function(e,t){var r=e.indexOf(t);-1!==r&&e.splice(r,1)}(this.listeners[e]||[],t),this.emit("off",{eventName:e,listener:t}),this},r.prototype.clearListeners=function(e){return n(e),this.listeners[e]=null,this},e.exports=r},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(0),o=r(3);t.Factory=class{constructor(e){this.client=e}createService(e,...t){if(!Reflect.hasOwnMetadata(o.RPC_SERVICE_NAME,e.prototype))throw new Error("@Service decorator is not applied");const r=Reflect.getMetadata(o.RPC_SERVICE_NAME,e.prototype),s=Reflect.getMetadata(o.RPC_SERVICE_METHODS_NAMES,e.prototype),i=new e(...t);for(const[e,{type:t,rpcName:o}]of s)i[e]=((...e)=>this.client.request({type:t,args:e,procedure:n.getControllerMethodName(r,o)}));return i}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3);t.Procedure=((e,t="EnvelopeType.BLOCKING")=>(r,o)=>{Reflect.hasOwnMetadata(n.RPC_SERVICE_METHODS_NAMES,r)||Reflect.defineMetadata(n.RPC_SERVICE_METHODS_NAMES,new Map,r);const s=Reflect.getMetadata(n.RPC_SERVICE_METHODS_NAMES,r);if(s.has(o))throw new Error("\"@Procedure() decorator can't be applied twice");let i;i=e||String(o),s.set(o,{rpcName:i,type:t})})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3);t.Service=(e=>t=>{if(Reflect.hasOwnMetadata(n.RPC_SERVICE_NAME,t.prototype))throw new Error("\"@Service() decorator can't be applied twice");let r;if(e)r=e;else if(t.displayName)r=t.displayName;else{if(!t.name)throw new Error('Service name must be defined (via argument, via "displayName" static property or via class name)');r=t.name}Reflect.defineMetadata(n.RPC_SERVICE_NAME,r,t.prototype)})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(0),o=r(4);t.bindControllersToServer=function(e,t){const r={};for(const e of t){const t=Array.isArray(e)?e[0]:e,s=Array.isArray(e)?e.slice(1):[];if(Reflect.hasOwnMetadata(o.RPC_CONTROLLER_NAME,t.prototype)){const e=Reflect.getMetadata(o.RPC_CONTROLLER_NAME,t.prototype),i=[...Object.getOwnPropertyNames(t.prototype),...Object.getOwnPropertySymbols(t.prototype)].filter(e=>Reflect.hasOwnMetadata(o.RPC_CONTROLLER_ACTION_NAME,t.prototype[e])).map(e=>[Reflect.getMetadata(o.RPC_CONTROLLER_ACTION_NAME,t.prototype[e]),e]),u=new t(...s);for(const[t,o]of i)r[n.getControllerMethodName(e,t)]=((...e)=>u[o](...e))}}e.extendResolver(r)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4);t.Controller=(e=>t=>{if(Reflect.hasOwnMetadata(n.RPC_CONTROLLER_NAME,t.prototype))throw new Error("@Controller() decorator can not be applied twice");let r;if(e)r=e;else if(t.displayName)r=t.displayName;else{if(!t.name)throw new Error('Controller name must be defined via argument, via "displayName" static property or via class name');r=t.name}Reflect.defineMetadata(n.RPC_CONTROLLER_NAME,r,t.prototype)})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4);t.Action=(e=>(t,r,o)=>{const s=o.value;let i;if("function"!=typeof s)throw new Error(`@Action() decorator can be applied only to methods, not "${typeof s}"`);if(Reflect.hasOwnMetadata(n.RPC_CONTROLLER_ACTION_NAME,s))throw new Error("@Action() decorator can not be applied twice");return i=e||String(r),Reflect.defineMetadata(n.RPC_CONTROLLER_ACTION_NAME,i,s),o})}]); |
{ | ||
"name": "electron-rpc-common", | ||
"author": "Alexander Sychev", | ||
"description": "Electron RPC implementation", | ||
"keywords": [ | ||
"electron", | ||
"electron-rpc", | ||
"rpc", | ||
"electron-ipc", | ||
"ipc", | ||
"electron-rpc-types", | ||
"rpc-types", | ||
"ipc-types", | ||
"types", | ||
"typings", | ||
"typescript", | ||
"electron-rpc-utils", | ||
"rpc-utils", | ||
"ipc-utils", | ||
"utils", | ||
"electron-rpc-server", | ||
"rpc-server", | ||
"ipc-server", | ||
"server", | ||
"electron-rpc-client", | ||
"rpc-client", | ||
"ipc-client", | ||
"client" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git@github.com:AlexanderSychev/electron-rpc.git" | ||
}, | ||
"version": "1.1.0", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"license": "MIT", | ||
"dependencies": { | ||
"autobind-decorator": "2.1.0", | ||
"electron-rpc-client": "^1.1.0", | ||
"electron-rpc-server": "^1.1.0", | ||
"electron-rpc-types": "^1.1.0", | ||
"electron-rpc-utils": "^1.1.0", | ||
"tslib": "1.9.3" | ||
}, | ||
"gitHead": "7835360ae4bf43137aa92624c1673ea0d5682f90" | ||
"name": "electron-rpc-common", | ||
"author": "Alexander Sychev", | ||
"description": "Electron RPC implementation", | ||
"homepage": "https://alexandersychev.github.io/electron-rpc-wiki/#/api/electron-rpc-common", | ||
"keywords": [ | ||
"electron", | ||
"electron-rpc", | ||
"rpc", | ||
"electron-ipc", | ||
"ipc", | ||
"electron-rpc-types", | ||
"rpc-types", | ||
"ipc-types", | ||
"types", | ||
"typings", | ||
"typescript", | ||
"electron-rpc-utils", | ||
"rpc-utils", | ||
"ipc-utils", | ||
"utils", | ||
"electron-rpc-server", | ||
"rpc-server", | ||
"ipc-server", | ||
"server", | ||
"electron-rpc-client", | ||
"rpc-client", | ||
"ipc-client", | ||
"client" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git@github.com:AlexanderSychev/electron-rpc.git" | ||
}, | ||
"version": "1.2.0", | ||
"main": "dist/index.js", | ||
"types": "src/index.ts", | ||
"license": "MIT", | ||
"dependencies": { | ||
"electron-rpc-async-queue": "^1.2.0", | ||
"electron-rpc-client": "^1.2.0", | ||
"electron-rpc-client-services": "^1.2.0", | ||
"electron-rpc-server": "^1.2.0", | ||
"electron-rpc-server-controllers": "^1.2.0", | ||
"electron-rpc-types": "^1.2.0", | ||
"electron-rpc-utils": "^1.2.0" | ||
}, | ||
"gitHead": "62ed6bf785813211110f0573c64bd987514fd6fb" | ||
} |
@@ -5,2 +5,2 @@ # electron-rpc-common | ||
See project [wiki](https://github.com/AlexanderSychev/electron-rpc/wiki/Electron-RPC-Common) for details | ||
See project [wiki](https://alexandersychev.github.io/electron-rpc-wiki/#/api/electron-rpc-common) for details |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
9
79
0
22655
7
1
+ Addedelectron-rpc-client-services@1.2.0(transitive)
+ Addedelectron-rpc-server-controllers@1.2.0(transitive)
- Removedautobind-decorator@2.1.0
- Removedtslib@1.9.3
Updatedelectron-rpc-client@^1.2.0
Updatedelectron-rpc-server@^1.2.0
Updatedelectron-rpc-types@^1.2.0
Updatedelectron-rpc-utils@^1.2.0