Comparing version 0.0.3 to 0.0.4
@@ -46,2 +46,4 @@ 'use strict'; | ||
var ApiClient = function () { | ||
// io = io | ||
function ApiClient(params) { | ||
@@ -51,2 +53,3 @@ _classCallCheck(this, ApiClient); | ||
// console.log('ApiClient', params); | ||
this.io = _socketIoUniversal2.default; | ||
this.log = params.log; | ||
@@ -313,3 +316,4 @@ this.root = params.root; | ||
if (this.log && this.log.trace) { | ||
this.log.trace('[api]', req.method, req.url, req._body, req); | ||
this.log.trace('[api]', req.method, req.url, req._body); | ||
// this.log.trace('[api]', req.method, req.url, req._body, req); | ||
} | ||
@@ -352,3 +356,2 @@ | ||
// console.log('ws !@#!@#!#!!@#', this.wsConfig); | ||
if (!this.wsConfig) { | ||
@@ -360,12 +363,7 @@ console.error('Вы не можете использовать api.ws без сокет конфигов'); | ||
// console.log(opts.query, opts.query.token, this.authToken); | ||
// console.log({opts}); | ||
if (!this.wsConfig.tokenInCookie) { | ||
if (opts.query && !opts.query.token && this.authToken) opts.query.token = this.authToken; | ||
} | ||
// console.log('wsConfig', opts.query, this.authToken); | ||
return (0, _socketIoUniversal2.default)( | ||
// this.createUrl(path, this.wsConfig), | ||
this.createUrl(path, opts), opts); | ||
return this.io(this.createUrl(path, opts), opts); | ||
} | ||
@@ -395,2 +393,2 @@ }], [{ | ||
exports.default = ApiClient; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9BcGlDbGllbnQuanMiXSwibmFtZXMiOlsiRkVUQ0hfUEFSQU1TIiwiREVCVUciLCJfX0RFVl9fIiwiQXBpQ2xpZW50IiwicGFyYW1zIiwibG9nIiwicm9vdCIsImJhc2UiLCJ1cmwiLCJ3c0NvbmZpZyIsIndzIiwiYXV0aFRva2VuIiwiZXJyIiwicmVzIiwicmVxIiwic3RyIiwiSlNPTiIsInN0cmluZ2lmeSIsImpzb24iLCJlcnJvciIsIm1lc3NhZ2UiLCJlcnIyIiwiRXJ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Y3QobWVzc2FnZSkgPyBKU09OLnN0cmluZ2lmeShtZXNzYWdlKSA6IG1lc3NhZ2UpO1xuICAgIGVycjIucmVzID0gcmVzO1xuICAgIGVycjIucmVxID0gcmVxO1xuICAgIHRocm93IGVycjI7XG4gIH1cblxuICBhc3luYyBhZnRlckZldGNoKGN0eCkge1xuICAgIGNvbnN0IHsgcmVzLCB0aHJvd0Vycm9yIH0gPSBjdHg7XG4gICAgaWYgKHJlcy5zdGF0dXMgPj0gNDAwKSB7XG4gICAgICBjb25zdCB0eXBlID0gJ1JFU19TVEFUVVNfRVJST1InO1xuICAgICAgYXdhaXQgdGhyb3dFcnJvcih7XG4gICAgICAgIC4uLmN0eCxcbiAgICAgICAgZXJyOiB7XG4gICAgICAgICAgdHlwZSxcbiAgICAgICAgICBzdGF0dXM6IHJlcy5zdGF0dXMsXG4gICAgICAgICAgc3RhdHVzVGV4dDogcmVzLnN0YXR1c1RleHQsXG4gICAgICAgICAgbWVzc2FnZTogYCR7dHlwZX06ICR7cmVzLnN0YXR1c30gJHtyZXMuc3RhdHVzVGV4dH1gLFxuICAgICAgICB9LFxuICAgICAgfSk7XG4gICAgfVxuICAgIGlmIChyZXMuanNvbiAmJiByZXMuanNvbi5lcnIpIHtcbiAgICAgIGF3YWl0IHRocm93RXJyb3Ioe1xuICAgICAgICAuLi5jdHgsXG4gICAgICAgIGVycjoge1xuICAgICAgICAgIHR5cGU6ICdDVVNUT01fRVJST1InLFxuICAgICAgICAgIC4uLnJlcy5qc29uLmVycixcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfVxuICAgIHJldHVybiByZXMuanNvbjtcbiAgfVxuXG4gIGNyZWF0ZVVybChwYXRoLCBvcHRpb25zID0ge30pIHtcbiAgICBpZiAocGF0aC5zdWJzdHIoMCwgNSkgPT09ICdodHRwOicgfHwgcGF0aC5zdWJzdHIoMCwgNikgPT09ICdodHRwczonKSB7XG4gICAgICByZXR1cm4gcGF0aDtcbiAgICB9XG4gICAgY29uc3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AgICAgb3B0cyxcbiAgICApO1xuICB9XG5cbn1cbiJdfQ== |
{ | ||
"name": "apiq", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "http + websockets api client for Web, Node.js and React Native", | ||
@@ -5,0 +5,0 @@ "repository": { |
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
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
138472
395