react-isomorphic-tools
Advanced tools
Comparing version 3.0.0-alpha.29 to 3.0.0-alpha.30
@@ -59,3 +59,3 @@ 'use strict'; | ||
if (body) { | ||
console.warn('Warning: GET method doesn`t have request body, you should use `query`'); | ||
console.error('Warning: GET method doesn`t have a request body, you should use `query`'); | ||
} | ||
@@ -62,0 +62,0 @@ } else { |
@@ -8,4 +8,2 @@ 'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _fetchToState = require('./actions/fetchToState'); | ||
@@ -21,4 +19,2 @@ | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
@@ -45,11 +41,6 @@ | ||
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = FetchToState.__proto__ || Object.getPrototypeOf(FetchToState)).call.apply(_ref, [this].concat(args))), _this), _this.fetchToState = function (url, _ref2) { | ||
var _ref2$key = _ref2.key, | ||
key = _ref2$key === undefined ? 'undefinedKey' : _ref2$key, | ||
_ref2$params = _ref2.params, | ||
params = _ref2$params === undefined ? {} : _ref2$params, | ||
rest = _objectWithoutProperties(_ref2, ['key', 'params']); | ||
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = FetchToState.__proto__ || Object.getPrototypeOf(FetchToState)).call.apply(_ref, [this].concat(args))), _this), _this.fetchToState = function (url, options) { | ||
return function () { | ||
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(dispatch) { | ||
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(dispatch) { | ||
var key; | ||
return regeneratorRuntime.wrap(function _callee$(_context) { | ||
@@ -59,8 +50,10 @@ while (1) { | ||
case 0: | ||
_context.prev = 0; | ||
key = options.key || 'undefinedKey'; | ||
_context.prev = 1; | ||
dispatch((0, _fetchToState.request)({ | ||
key: key, | ||
request: _extends({}, rest, { params: params, url: url | ||
}) | ||
request: { | ||
url: url, options: options | ||
} | ||
})); | ||
@@ -70,9 +63,10 @@ _context.t0 = dispatch; | ||
_context.t2 = key; | ||
_context.next = 7; | ||
return _this.fetcher(url, _extends({}, rest, { params: params })); | ||
_context.next = 8; | ||
return _this.fetcher(url, options); | ||
case 7: | ||
case 8: | ||
_context.t3 = _context.sent; | ||
_context.t4 = _extends({}, rest, { params: params, url: url | ||
}); | ||
_context.t4 = { | ||
url: url, options: options | ||
}; | ||
_context.t5 = { | ||
@@ -85,8 +79,8 @@ key: _context.t2, | ||
(0, _context.t0)(_context.t6); | ||
_context.next = 18; | ||
_context.next = 19; | ||
break; | ||
case 14: | ||
_context.prev = 14; | ||
_context.t7 = _context['catch'](0); | ||
case 15: | ||
_context.prev = 15; | ||
_context.t7 = _context['catch'](1); | ||
@@ -96,3 +90,3 @@ dispatch((0, _fetchToState.fail)({ key: key, e: _context.t7 })); | ||
case 18: | ||
case 19: | ||
case 'end': | ||
@@ -102,7 +96,7 @@ return _context.stop(); | ||
} | ||
}, _callee, _this2, [[0, 14]]); | ||
}, _callee, _this2, [[1, 15]]); | ||
})); | ||
return function (_x) { | ||
return _ref3.apply(this, arguments); | ||
return _ref2.apply(this, arguments); | ||
}; | ||
@@ -109,0 +103,0 @@ }(); |
{ | ||
"name": "react-isomorphic-tools", | ||
"version": "3.0.0-alpha.29", | ||
"version": "3.0.0-alpha.30", | ||
"description": "Authorization, Fetcher, Preload. Tools for ServerSide rendering", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
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
137837
1364