Comparing version 0.0.1 to 0.0.3
@@ -183,6 +183,7 @@ 'use strict'; | ||
var body = params.body || params.data; | ||
if ((0, _lodash2.default)(body)) { | ||
req._body = body; | ||
req.body = JSON.stringify(body); | ||
} else if (typeof body === 'string') { | ||
} else { | ||
req._body = body; | ||
@@ -311,3 +312,3 @@ req.body = body; | ||
if (this.log && this.log.trace) { | ||
this.log.trace('[api]', req.method, req.url, req._body); | ||
this.log.trace('[api]', req.method, req.url, req._body, req); | ||
} | ||
@@ -350,2 +351,3 @@ | ||
// console.log('ws !@#!@#!#!!@#', this.wsConfig); | ||
if (!this.wsConfig) { | ||
@@ -358,8 +360,11 @@ console.error('Вы не можете использовать api.ws без сокет конфигов'); | ||
// console.log(opts.query, opts.query.token, this.authToken); | ||
if (!(this.wsConfig && this.wsConfig.tokenInCookie)) { | ||
// console.log({opts}); | ||
if (!this.wsConfig.tokenInCookie) { | ||
if (opts.query && !opts.query.token && this.authToken) opts.query.token = this.authToken; | ||
} | ||
// console.log(opts.query, opts.query.token, this.authToken); | ||
// console.log('wsConfig', opts.query, this.authToken); | ||
return (0, _socketIoUniversal2.default)(this.createUrl(path, this.wsConfig), opts); | ||
return (0, _socketIoUniversal2.default)( | ||
// this.createUrl(path, this.wsConfig), | ||
this.createUrl(path, opts), opts); | ||
} | ||
@@ -389,2 +394,2 @@ }], [{ | ||
exports.default = ApiClient; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9BcGlDbGllbnQuanMiXSwibmFtZXMiOlsiRkVUQ0hfUEFSQU1TIiwiREVCVUciLCJfX0RFVl9fIiwiQXBpQ2xpZW50IiwicGFyYW1zIiwibG9nIiwicm9vdCIsImJhc2UiLCJ1cmwiLCJ3c0NvbmZpZyIsIndzIiwiYXV0aFRva2VuIiwiZXJyIiwicmVzIiwicmVxIiwic3RyIiwiSlNPTiIsInN0cmluZ2lmeSIsImpzb24iLCJlcnJvciIsIm1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0Vycm9yIH0gPSBjdHg7XG4gICAgaWYgKHJlcy5zdGF0dXMgPj0gNDAwKSB7XG4gICAgICBjb25zdCB0eXBlID0gJ1JFU19TVEFUVVNfRVJST1InO1xuICAgICAgYXdhaXQgdGhyb3dFcnJvcih7XG4gICAgICAgIC4uLmN0eCxcbiAgICAgICAgZXJyOiB7XG4gICAgICAgICAgdHlwZSxcbiAgICAgICAgICBzdGF0dXM6IHJlcy5zdGF0dXMsXG4gICAgICAgICAgc3RhdHVzVGV4dDogcmVzLnN0YXR1c1RleHQsXG4gICAgICAgICAgbWVzc2FnZTogYCR7dHlwZX06ICR7cmVzLnN0YXR1c30gJHtyZXMuc3RhdHVzVGV4dH1gLFxuICAgICAgICB9LFxuICAgICAgfSk7XG4gICAgfVxuICAgIGlmIChyZXMuanNvbiAmJiByZXMuanNvbi5lcnIpIHtcbiAgICAgIGF3YWl0IHRocm93RXJyb3Ioe1xuICAgICAgICAuLi5jdHgsXG4gICAgICAgIGVycjoge1xuICAgICAgICAgIHR5cGU6ICdDVVNUT01fRVJST1InLFxuICAgICAgICAgIC4uLnJlcy5qc29uLmVycixcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfVxuICAgIHJldHVybiByZXMuanNvbjtcbiAgfVxuXG4gIGNyZWF0ZVVybChwYXRoLCBvcHRpb25zID0ge30pIHtcbiAgICBpZiAocGF0aC5zdWJzdHIoMCwgNSkgPT09ICdodHRwOicgfHwgcGF0aC5zdWJzdHIoMCwgNikgPT09ICdodHRwczonKSB7XG4gICAgICByZXR1cm4gcGF0aDtcbiAgICB9XG4gICAgY29uc3QgdXJsID0gb3B0aW9ucy51cmwgfHwgdGhpcy51cmwgfHwgJy8nO1xuICAgIGNvbnN0IGJhc2UgPSBvcHRpb25zLmJhc2UgfHwgdGhpcy5iYXNlO1xuICAgIGNvbnN0IGFycmF5ID0gW3VybCwgcGF0aFswXSA9PT0gJy8nID8gbnVsbCA6IHRyaW0oYmFzZSksIHRyaW0ocGF0aCldO1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3dzQ29uZmlnJywgb3B0cy5xdWVyeSwgdGhpcy5hdXRoVG9rZW4pO1xuXG4gICAgcmV0dXJuIGlvKFxuICAgICAgLy8gdGhpcy5jcmVhdGVVcmwocGF0aCwgdGhpcy53c0NvbmZpZyksXG4gICAgICB0aGlzLmNyZWF0ZVVybChwYXRoLCBvcHRzKSxcbiAgICAgIG9wdHMsXG4gICAgKTtcbiAgfVxuXG59XG4iXX0= |
{ | ||
"name": "apiq", | ||
"version": "0.0.1", | ||
"version": "0.0.3", | ||
"description": "http + websockets api client for Web, Node.js and React Native", | ||
@@ -24,18 +24,18 @@ "repository": { | ||
"dependencies": { | ||
"lodash.isplainobject": "^4.0.6", | ||
"lodash.pick": "^4.4.0", | ||
"qs": "^6.4.0", | ||
"socket.io-client": "^2.0.3" | ||
"lodash.isplainobject": "4.0.6", | ||
"lodash.pick": "4.4.0", | ||
"qs": "6.4.0", | ||
"socket.io-client": "2.0.3" | ||
}, | ||
"devDependencies": { | ||
"babel-cli": "^6.24.0", | ||
"babel-core": "^6.24.0", | ||
"babel-cli": "6.24.0", | ||
"babel-core": "6.24.0", | ||
"babel-eslint": "7.1.1", | ||
"babel-plugin-transform-inline-environment-variables": "^0.0.2", | ||
"babel-preset-es2015": "^6.24.0", | ||
"babel-preset-stage-2": "^6.22.0", | ||
"babel-plugin-transform-inline-environment-variables": "0.0.2", | ||
"babel-preset-es2015": "6.24.0", | ||
"babel-preset-stage-2": "6.22.0", | ||
"eslint": "3.14.0", | ||
"eslint-config-airbnb": "14.0.0", | ||
"eslint-config-airbnb-base": "11.1.0", | ||
"eslint-loader": "^1.6.3", | ||
"eslint-loader": "1.6.3", | ||
"eslint-plugin-import": "2.2.0", | ||
@@ -42,0 +42,0 @@ "eslint-plugin-jsx-a11y": "3.0.2", |
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
138837
398
+ Addedasync-limiter@1.0.1(transitive)
+ Addedbase64-arraybuffer@0.1.5(transitive)
+ Addedbetter-assert@1.0.2(transitive)
+ Addedcallsite@1.0.0(transitive)
+ Addedcomponent-emitter@1.2.1(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addedengine.io-client@3.1.6(transitive)
+ Addedengine.io-parser@2.1.3(transitive)
+ Addedobject-component@0.0.3(transitive)
+ Addedparseqs@0.0.5(transitive)
+ Addedparseuri@0.0.5(transitive)
+ Addedqs@6.4.0(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedsocket.io-client@2.0.3(transitive)
+ Addedsocket.io-parser@3.1.3(transitive)
+ Addedultron@1.1.1(transitive)
+ Addedws@3.3.3(transitive)
+ Addedxmlhttprequest-ssl@1.5.5(transitive)
- Removedbase64-arraybuffer@0.1.4(transitive)
- Removedcall-bind-apply-helpers@1.0.1(transitive)
- Removedcall-bound@1.0.3(transitive)
- Removedcomponent-emitter@1.3.1(transitive)
- Removeddunder-proto@1.0.1(transitive)
- Removedengine.io-client@3.5.4(transitive)
- Removedengine.io-parser@2.2.1(transitive)
- Removedes-define-property@1.0.1(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedes-object-atoms@1.0.0(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-intrinsic@1.2.6(transitive)
- Removedgopd@1.2.0(transitive)
- Removedhas-symbols@1.1.0(transitive)
- Removedhasown@2.0.2(transitive)
- Removedmath-intrinsics@1.1.0(transitive)
- Removedobject-inspect@1.13.3(transitive)
- Removedparseqs@0.0.6(transitive)
- Removedparseuri@0.0.6(transitive)
- Removedqs@6.13.1(transitive)
- Removedside-channel@1.1.0(transitive)
- Removedside-channel-list@1.0.0(transitive)
- Removedside-channel-map@1.0.1(transitive)
- Removedside-channel-weakmap@1.0.2(transitive)
- Removedsocket.io-client@2.5.0(transitive)
- Removedsocket.io-parser@3.3.4(transitive)
- Removedws@7.5.10(transitive)
- Removedxmlhttprequest-ssl@1.6.3(transitive)
Updatedlodash.isplainobject@4.0.6
Updatedlodash.pick@4.4.0
Updatedqs@6.4.0
Updatedsocket.io-client@2.0.3