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

apiq

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apiq - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

34

ApiClient.js

@@ -355,2 +355,27 @@ 'use strict';

var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
if (!this.wsConfig) {
console.error('Вы не можете использовать api.ws без сокет конфигов');
return null;
}
var opts = Object.assign({}, this.wsConfig && this.wsConfig.options, options);
// console.log(opts.query, opts.query.token, this.authToken);
if (!(this.wsConfig && this.wsConfig.tokenInCookie)) {
if (opts.query && !opts.query.token && this.authToken) opts.query.token = this.authToken;
}
var params2 = {};
if (!this.wsConfig.tokenInCookie) {
if (!params2.qs) params2.qs = {};
if (params2.qs && !params2.qs.token && this.authToken) params2.qs.token = this.authToken;
}
// console.log(opts.query, opts.query.token, this.authToken);
console.log({ opts: opts }, this.createUrl(path, this.wsConfig), _socketIoUniversal2.default);
return (0, _socketIoUniversal2.default)(this.createUrl(path, _extends({}, this.wsConfig, params2)), opts);
}
}, {
key: 'ws2',
value: function ws2() {
var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

@@ -362,3 +387,3 @@

}
var params2 = Object.assign({}, this.wsConfig, params2);
var params2 = Object.assign({}, this.wsConfig, params);

@@ -370,6 +395,3 @@ if (!this.wsConfig.tokenInCookie) {

console.log('this.io = io', this.io, params2, this.createUrl(path, params2));
var res = this.io(this.createUrl(path, params2), this.wsConfig.options);
console.log({ res: res });
var res = this.io(this.createUrl(path, params2), _extends({}, this.wsConfig.options, params));
return res;

@@ -400,2 +422,2 @@ }

exports.default = ApiClient;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJ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DtcblxuICAgIHJldHVybiB7XG4gICAgICByZXEsXG4gICAgICBhdXRoVG9rZW4sXG4gICAgICB0aHJvd0Vycm9yLFxuICAgICAgYWZ0ZXJGZXRjaCxcbiAgICAgIHBhcnNlUmVzdWx0LFxuICAgIH07XG4gIH1cblxuICBhc3luYyBwYXJzZVJlc3VsdChjdHgsIHJlc3VsdCkge1xuICAgIGNvbnN0IHJlcyA9IHtcbiAgICAgIHJlc3VsdCxcbiAgICAgIHN0YXR1czogcmVzdWx0LnN0YXR1cyxcbiAgICAgIHN0YXR1c1RleHQ6IHJlc3VsdC5zdGF0dXNUZXh0LFxuICAgIH07XG4gICAgdHJ5IHtcbiAgICAgIHJlcy50ZXh0ID0gYXdhaXQgcmVzdWx0LnRleHQoKTtcbiAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgIGNvbnN0IHR5cGUgPSAnVEVYVF9QQVJTRV9FUlJPUic7XG4gICAgICBhd2FpdCBjdHgudGhyb3dFcnJvcih7XG4gICAgICAgIC4uLmN0eCxcbiAgICAgICAgcmVzLFxuICAgICAgICBlcnI6IHtcbiAgICAgICAgICB0eXBlLFxuICAgICAgICAgIG1lc3NhZ2U6IHR5cGUsXG4gICAgICAgICAgZXJyLFxuICAgICAgICB9LFxuICAgICAgfSk7XG4gICAgfVxuICAgIHRyeSB7XG4gICAgICByZXMuanNvbiA9IEpTT04ucGFyc2UocmVzLnRleHQpO1xuICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgY29uc3QgdHlwZSA9ICdKU09OX1BBUlNFX0VSUk9SJztcbiAgICAgIGF3YWl0IGN0eC50aHJvd0Vycm9yKHtcbiAgICAgICAgLi4uY3R4LFxuICAgICAgICByZXMsXG4gICAgICAgIGVycjoge1xuICAgICAgICAgIHR5cGUsXG4gICAgICAgICAgbWVzc2FnZTogdHlwZSxcbiAgICAgICAgICBlcnIsXG4gICAgICAgIH0sXG4gICAgICB9KTtcbiAgICB9XG4gICAgcmV0dXJuIHJlcztcbiAgfVxu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aW8oXG4gICAgICB0aGlzLmNyZWF0ZVVybChwYXRoLCBwYXJhbXMyKSxcbiAgICAgIHtcbiAgICAgICAgLi4udGhpcy53c0NvbmZpZy5vcHRpb25zLFxuICAgICAgICAuLi5wYXJhbXMsXG4gICAgICB9LFxuICAgICk7XG4gICAgcmV0dXJuIHJlcztcbiAgfVxuXG59XG4iXX0=

2

package.json
{
"name": "apiq",
"version": "0.0.5",
"version": "0.0.6",
"description": "http + websockets api client for Web, Node.js and React Native",

@@ -5,0 +5,0 @@ "repository": {

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