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

vkontakte-api

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vkontakte-api - npm Package Compare versions

Comparing version 1.16.2 to 1.17.0

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

## [1.17.0](https://github.com/wolframdeus/vk-api/compare/v1.16.2...v1.17.0) (2020-12-07)
### Features
* **maxprocesseventlistenerscount:** add maxProcessEventListenersCount constructor param ([09e9ba3](https://github.com/wolframdeus/vk-api/commit/09e9ba320475c45857d3ab004091b98720372517))
### [1.16.2](https://github.com/wolframdeus/vk-api/compare/v1.16.1...v1.16.2) (2020-12-06)

@@ -7,0 +14,0 @@

@@ -20,2 +20,7 @@ /// <reference types="node" />

tunnelName?: string;
/**
* Max process event listeners count. Required in case, you are getting
* warning about possible memory leak.
*/
maxProcessEventListenersCount?: number;
}

5

dist/multithreading/VKAPIProvider/VKAPIProvider-[source].js

@@ -46,6 +46,9 @@ "use strict";

function VKAPIProvider(props) {
var instance = props.instance, workers = props.workers, _a = props.tunnelName, tunnelName = _a === void 0 ? '' : _a;
var instance = props.instance, workers = props.workers, _a = props.tunnelName, tunnelName = _a === void 0 ? '' : _a, maxProcessEventListenersCount = props.maxProcessEventListenersCount;
this.instance = instance;
this.workers = workers;
this.tunnelName = tunnelName;
if (typeof maxProcessEventListenersCount === 'number') {
process.setMaxListeners(maxProcessEventListenersCount);
}
}

@@ -52,0 +55,0 @@ /**

2

dist/multithreading/VKAPIProvider/VKAPIProvider.js

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

"use strict";var __awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,s){function i(e){try{u(n.next(e))}catch(e){s(e)}}function a(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,a)}u((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){var r,n,o,s,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.VKAPIMaster=exports.VKAPIProvider=void 0;var utils_1=require("./utils"),VKAPIProvider=function(){function e(e){var t=e.instance,r=e.workers,n=e.tunnelName,o=void 0===n?"":n;this.instance=t,this.workers=r,this.tunnelName=o}return e.prototype.init=function(){var e=this;this.workers.forEach(function(t){t.on("message",function(r){return __awaiter(e,void 0,void 0,function(){var e,n,o,s,i,a,u;return __generator(this,function(c){switch(c.label){case 0:if(!utils_1.isVKAPIProcessRequestMessage(r)||this.tunnelName!==r.tunnelName)return[3,5];e=r.requestId,n=r.processId,o=r.config,s=null,i=null,c.label=1;case 1:return c.trys.push([1,3,,4]),[4,this.instance.addRequestToQueue(o)];case 2:return i=c.sent(),[3,4];case 3:return a=c.sent(),s=a,[3,4];case 4:u={tunnelName:this.tunnelName,processId:n,requestId:e,isVKAPIMessage:!0,type:"request-processed",error:s,data:i},t.send(u),c.label=5;case 5:return[2]}})})})})},e}();exports.VKAPIProvider=VKAPIProvider,exports.VKAPIMaster=VKAPIProvider;
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(s,o){function i(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,a)}u((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){var r,n,s,o,i={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(s=2&o[0]?n.return:o[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,o[1])).done)return s;switch(n=0,s&&(o=[2&o[0],s.value]),o[0]){case 0:case 1:s=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,n=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(s=(s=i.trys).length>0&&s[s.length-1])&&(6===o[0]||2===o[0])){i=0;continue}if(3===o[0]&&(!s||o[1]>s[0]&&o[1]<s[3])){i.label=o[1];break}if(6===o[0]&&i.label<s[1]){i.label=s[1],s=o;break}if(s&&i.label<s[2]){i.label=s[2],i.ops.push(o);break}s[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e],n=0}finally{r=s=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.VKAPIMaster=exports.VKAPIProvider=void 0;var utils_1=require("./utils"),VKAPIProvider=function(){function e(e){var t=e.instance,r=e.workers,n=e.tunnelName,s=void 0===n?"":n,o=e.maxProcessEventListenersCount;this.instance=t,this.workers=r,this.tunnelName=s,"number"==typeof o&&process.setMaxListeners(o)}return e.prototype.init=function(){var e=this;this.workers.forEach(function(t){t.on("message",function(r){return __awaiter(e,void 0,void 0,function(){var e,n,s,o,i,a,u;return __generator(this,function(c){switch(c.label){case 0:if(!utils_1.isVKAPIProcessRequestMessage(r)||this.tunnelName!==r.tunnelName)return[3,5];e=r.requestId,n=r.processId,s=r.config,o=null,i=null,c.label=1;case 1:return c.trys.push([1,3,,4]),[4,this.instance.addRequestToQueue(s)];case 2:return i=c.sent(),[3,4];case 3:return a=c.sent(),o=a,[3,4];case 4:u={tunnelName:this.tunnelName,processId:n,requestId:e,isVKAPIMessage:!0,type:"request-processed",error:o,data:i},t.send(u),c.label=5;case 5:return[2]}})})})})},e}();exports.VKAPIProvider=VKAPIProvider,exports.VKAPIMaster=VKAPIProvider;
{
"name": "vkontakte-api",
"version": "1.16.2",
"version": "1.17.0",
"description": "TypeScript library to make requests performing to VK API simple",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/wolframdeus/vk-api",

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