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

ackee-http-client

Package Overview
Dependencies
Maintainers
3
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ackee-http-client - npm Package Compare versions

Comparing version 2.1.2 to 2.2.1

es/core/createApiWithAxios.js

19

es/errors.js

@@ -22,2 +22,21 @@ export var authRequestProxy = {

}
};
export var requestInterceptors = {
undefinedUriParamProp: function undefinedUriParamProp(_ref) {
var uriParamKey = _ref.uriParamKey,
_ref$config = _ref.config,
method = _ref$config.method,
baseURL = _ref$config.baseURL,
uriParams = _ref$config.uriParams,
url = _ref$config.url;
return {
name: 'uriParams/undefined-property',
message: "uriParams object must include '".concat(uriParamKey, "' property. Check request config with: ").concat(JSON.stringify({
method: method,
baseURL: baseURL,
uriParams: uriParams,
url: url
}, null, 6))
};
}
};

2

es/index.js

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

export { default as create } from './create';
export { create } from './core';
import * as _sagaEffects from './saga-effects';
export { _sagaEffects as sagaEffects };

@@ -6,3 +6,3 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";

import defaultConfig from './defaultConfig';
import * as errors from './errors';
import * as Errors from './errors';
import { enhancedError } from './utilities';

@@ -25,3 +25,3 @@ var keys = {

if (value === undefined) {
throw enhancedError(errors.store.undefinedValue, TypeError);
throw enhancedError(Errors.store.undefinedValue, TypeError);
}

@@ -28,0 +28,0 @@

@@ -6,3 +6,3 @@ "use strict";

});
exports.store = exports.create = exports.authRequestProxy = void 0;
exports.requestInterceptors = exports.store = exports.create = exports.authRequestProxy = void 0;
var authRequestProxy = {

@@ -32,2 +32,22 @@ unconnectedSaga: {

};
exports.store = store;
exports.store = store;
var requestInterceptors = {
undefinedUriParamProp: function undefinedUriParamProp(_ref) {
var uriParamKey = _ref.uriParamKey,
_ref$config = _ref.config,
method = _ref$config.method,
baseURL = _ref$config.baseURL,
uriParams = _ref$config.uriParams,
url = _ref$config.url;
return {
name: 'uriParams/undefined-property',
message: "uriParams object must include '".concat(uriParamKey, "' property. Check request config with: ").concat(JSON.stringify({
method: method,
baseURL: baseURL,
uriParams: uriParams,
url: url
}, null, 6))
};
}
};
exports.requestInterceptors = requestInterceptors;

@@ -5,4 +5,2 @@ "use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {

@@ -14,3 +12,3 @@ value: true

get: function get() {
return _create.default;
return _core.create;
}

@@ -20,3 +18,3 @@ });

var _create = _interopRequireDefault(require("./create"));
var _core = require("./core");

@@ -23,0 +21,0 @@ var _sagaEffects = _interopRequireWildcard(require("./saga-effects"));

@@ -16,3 +16,3 @@ "use strict";

var errors = _interopRequireWildcard(require("./errors"));
var Errors = _interopRequireWildcard(require("./errors"));

@@ -40,3 +40,3 @@ var _utilities = require("./utilities");

if (value === undefined) {
throw (0, _utilities.enhancedError)(errors.store.undefinedValue, TypeError);
throw (0, _utilities.enhancedError)(Errors.store.undefinedValue, TypeError);
}

@@ -43,0 +43,0 @@

{
"name": "ackee-http-client",
"version": "2.1.2",
"version": "2.2.1",
"description": "",

@@ -35,3 +35,4 @@ "main": "lib/index.js",

"prettier": "^1.15.2",
"prettier-config-ackee": "^0.0.4"
"prettier-config-ackee": "^0.0.4",
"redux-saga": "0.16.x"
},

@@ -41,3 +42,5 @@ "dependencies": {

"ackee-redux-token-auth": "2.x.x",
"axios": "0.18.x",
"axios": "0.18.x"
},
"peerDependencies": {
"redux-saga": "0.16.x"

@@ -44,0 +47,0 @@ },

@@ -156,2 +156,4 @@ # ackee-http-client

#### And returns:
- <a name="api-create-http-client"></a>`httpClient: Object`

@@ -175,3 +177,21 @@

##### `config`
- `uriParams: Object` - Key-value object containing request uri params. Params that are found in url are replaced, rest is ignored.
```js
yield api.get('/todos/:todoId', {
baseURL: 'https://jsonplaceholder.typicode.com',
uriParams: {
// ':todoId' will be replaced with '1'
todoId: '1',
// 'foo' will be ignored and won't be added as a query parameter
foo: '2,
},
});
```
See rest of available options - [axios/request-config](https://github.com/axios/axios#request-config)
#### `saga`

@@ -178,0 +198,0 @@ Internal saga primarily for communication with `ackee-redux-token-auth`.

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