Comparing version 0.7.0 to 0.8.0
@@ -6,2 +6,8 @@ All notable changes to this project will be documented in this file. | ||
## [0.8.0] - 2020-04-14 | ||
### Fixed | ||
- "stream" type | ||
### Added | ||
- download util | ||
## [0.7.0] - 2020-03-14 | ||
@@ -8,0 +14,0 @@ ### Fixed |
@@ -26,2 +26,4 @@ "use strict"; | ||
var _utils = _interopRequireDefault(require("./utils")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -31,2 +33,3 @@ | ||
const stringify = _qs.default.stringify; | ||
const fetch = _lightIsomorphicFetch.default.default || _lightIsomorphicFetch.default; // @todo verify if it's needed for stable v3 of node-fetch when it's released | ||
// Types: | ||
@@ -51,2 +54,3 @@ // text | ||
*/ | ||
const contentTypeMap = { | ||
@@ -454,3 +458,3 @@ json: "application/json; charset=utf-8", | ||
const request = new _index2.default(url, fetchOptions, originalUrl, queryParams); | ||
const result = await (0, _lightIsomorphicFetch.default)(request.url, { ...request.options, | ||
const result = await fetch(request.url, { ...request.options, | ||
signal | ||
@@ -498,3 +502,4 @@ }); | ||
ApiClient.utils = _utils.default; | ||
var _default = ApiClient; | ||
exports.default = _default; |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.ResponseDataTypeMismatchError = exports.AbortedHttpError = exports.TimeoutHttpError = exports.ServerHttpError = exports.ClientHttpError = exports.HttpError = void 0; | ||
exports.DownloadError = exports.ResponseDataTypeMismatchError = exports.AbortedHttpError = exports.TimeoutHttpError = exports.ServerHttpError = exports.ClientHttpError = exports.HttpError = void 0; | ||
@@ -80,2 +80,11 @@ var _betterCustomError = _interopRequireDefault(require("better-custom-error")); | ||
const ResponseDataTypeMismatchError = (0, _betterCustomError.default)("ResponseDataTypeMismatchError"); | ||
exports.ResponseDataTypeMismatchError = ResponseDataTypeMismatchError; | ||
/** | ||
* Downloading failed during stream | ||
* | ||
* @class DownloadError | ||
* @extends Error | ||
*/ | ||
exports.ResponseDataTypeMismatchError = ResponseDataTypeMismatchError; | ||
const DownloadError = (0, _betterCustomError.default)("DownloadError"); | ||
exports.DownloadError = DownloadError; |
@@ -36,3 +36,3 @@ "use strict"; | ||
if (type === "raw") { | ||
if (type === "raw" || type === "binary") { | ||
return { | ||
@@ -46,3 +46,3 @@ body: await response.buffer(), | ||
return { | ||
body: await response.buffer(), | ||
body: response.body, | ||
type: type | ||
@@ -49,0 +49,0 @@ }; |
{ | ||
"name": "api-reach", | ||
"version": "0.7.0", | ||
"version": "0.8.0", | ||
"repository": "https://github.com/dzek69/api-reach.git", | ||
@@ -31,2 +31,3 @@ "author": "Jacek Nowacki @dzek69 <git-public@dzek.eu>", | ||
"@dzek69/eslint-config-base": "^1.0.1", | ||
"babel-plugin-module-extension": "^0.1.1", | ||
"babel-plugin-rewire": "^1.2.0", | ||
@@ -41,4 +42,3 @@ "cross-env": "^7.0.2", | ||
"must": "^0.13.4", | ||
"node-fetch": "^2.3.0", | ||
"babel-plugin-module-extension": "^0.1.1" | ||
"node-fetch": "^2.6.0" | ||
}, | ||
@@ -63,5 +63,5 @@ "dependencies": { | ||
"libraryTemplate": { | ||
"version": "2.0.5", | ||
"version": "2.0.8", | ||
"fixDefaultForCommonJS": true | ||
} | ||
} |
@@ -14,2 +14,3 @@ # api-reach | ||
- add cache support | ||
- methods alternative parameters input (single object instead of sequenced params) | ||
@@ -16,0 +17,0 @@ ### Less important |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
1406271
71
2264
38
18