react-isomorphic-tools
Advanced tools
Comparing version 3.0.0-alpha.1 to 3.0.0-alpha.2
@@ -18,3 +18,3 @@ 'use strict'; | ||
var _ = require('../'); | ||
var _utils = require('../utils'); | ||
@@ -42,3 +42,3 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
case 0: | ||
_options$params = options.params, params = _options$params === undefined ? {} : _options$params, _options$queryParams = options.queryParams, queryParams = _options$queryParams === undefined ? {} : _options$queryParams, _options$type = options.type, type = _options$type === undefined ? 'json' : _options$type, _options$baseUrl = options.baseUrl, baseUrl = _options$baseUrl === undefined ? (0, _.getBaseUrl)() : _options$baseUrl, _options$method = options.method, method = _options$method === undefined ? 'GET' : _options$method, _options$customHeader = options.customHeaders, customHeaders = _options$customHeader === undefined ? false : _options$customHeader; | ||
_options$params = options.params, params = _options$params === undefined ? {} : _options$params, _options$queryParams = options.queryParams, queryParams = _options$queryParams === undefined ? {} : _options$queryParams, _options$type = options.type, type = _options$type === undefined ? 'json' : _options$type, _options$baseUrl = options.baseUrl, baseUrl = _options$baseUrl === undefined ? (0, _utils.getBaseUrl)() : _options$baseUrl, _options$method = options.method, method = _options$method === undefined ? 'GET' : _options$method, _options$customHeader = options.customHeaders, customHeaders = _options$customHeader === undefined ? false : _options$customHeader; | ||
args = { | ||
@@ -75,4 +75,4 @@ mode: 'cors', | ||
if ((0, _.isAuthenticated)()) { | ||
args.headers.set('Authorization', (0, _.getTokenPrefix)() + (0, _.getToken)()); | ||
if ((0, _utils.isAuthenticated)()) { | ||
args.headers.set('Authorization', (0, _utils.getTokenPrefix)() + (0, _utils.getToken)()); | ||
} | ||
@@ -79,0 +79,0 @@ |
@@ -1,29 +0,51 @@ | ||
import Settings from './Settings' | ||
import Fetcher from './Data/Fetcher' | ||
import ReduxResolver from './Resolver/ReduxResolver' | ||
import Resolver from './Resolver/Provider' | ||
import {fetchToState} from './redux' | ||
import page from './server/page' | ||
import Link from './Link' | ||
import NavLink from './NavLink' | ||
import { | ||
isAuthenticated, | ||
logout, | ||
setToken, | ||
getToken, | ||
setRefreshToken, | ||
getRefreshToken, | ||
setTokenName, | ||
setRefreshTokenName, | ||
setTokenPrefix, | ||
getTokenPrefix, | ||
setBaseUrl, | ||
getBaseUrl, | ||
getCookiesData, | ||
stringifyQuery, | ||
parseQuery, | ||
fetcher | ||
} from './utils' | ||
export ReduxResolver from './Resolver/ReduxResolver' | ||
export Resolver from './Resolver/Provider' | ||
export {fetchToState} from './redux' | ||
export page from './server/page' | ||
export const { | ||
isAuthenticated, | ||
logout, | ||
setToken, | ||
getToken, | ||
setRefreshToken, | ||
getRefreshToken, | ||
setTokenName, | ||
setRefreshTokenName, | ||
setTokenPrefix, | ||
getTokenPrefix, | ||
setBaseUrl, | ||
getBaseUrl | ||
} = new Settings() | ||
export const { | ||
getCookiesData, | ||
stringifyQuery, | ||
parseQuery, | ||
fetcher | ||
} = new Fetcher() | ||
export { | ||
ReduxResolver, | ||
Resolver, | ||
fetchToState, | ||
page, | ||
Link, | ||
NavLink, | ||
isAuthenticated, | ||
logout, | ||
setToken, | ||
getToken, | ||
setRefreshToken, | ||
getRefreshToken, | ||
setTokenName, | ||
setRefreshTokenName, | ||
setTokenPrefix, | ||
getTokenPrefix, | ||
setBaseUrl, | ||
getBaseUrl, | ||
getCookiesData, | ||
stringifyQuery, | ||
parseQuery, | ||
fetcher | ||
} |
@@ -6,12 +6,4 @@ 'use strict'; | ||
}); | ||
exports.fetcher = exports.parseQuery = exports.stringifyQuery = exports.getCookiesData = exports.getBaseUrl = exports.setBaseUrl = exports.getTokenPrefix = exports.setTokenPrefix = exports.setRefreshTokenName = exports.setTokenName = exports.getRefreshToken = exports.setRefreshToken = exports.getToken = exports.setToken = exports.logout = exports.isAuthenticated = exports.page = exports.fetchToState = exports.Resolver = exports.ReduxResolver = undefined; | ||
exports.fetcher = exports.parseQuery = exports.stringifyQuery = exports.getCookiesData = exports.getBaseUrl = exports.setBaseUrl = exports.getTokenPrefix = exports.setTokenPrefix = exports.setRefreshTokenName = exports.setTokenName = exports.getRefreshToken = exports.setRefreshToken = exports.getToken = exports.setToken = exports.logout = exports.isAuthenticated = exports.NavLink = exports.Link = exports.page = exports.fetchToState = exports.Resolver = exports.ReduxResolver = undefined; | ||
var _Settings = require('./Settings'); | ||
var _Settings2 = _interopRequireDefault(_Settings); | ||
var _Fetcher = require('./Data/Fetcher'); | ||
var _Fetcher2 = _interopRequireDefault(_Fetcher); | ||
var _ReduxResolver = require('./Resolver/ReduxResolver'); | ||
@@ -31,2 +23,12 @@ | ||
var _Link = require('./Link'); | ||
var _Link2 = _interopRequireDefault(_Link); | ||
var _NavLink = require('./NavLink'); | ||
var _NavLink2 = _interopRequireDefault(_NavLink); | ||
var _utils = require('./utils'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -38,39 +40,19 @@ | ||
exports.page = _page2.default; | ||
var _ref = new _Settings2.default(), | ||
isAuthenticated = _ref.isAuthenticated, | ||
logout = _ref.logout, | ||
setToken = _ref.setToken, | ||
getToken = _ref.getToken, | ||
setRefreshToken = _ref.setRefreshToken, | ||
getRefreshToken = _ref.getRefreshToken, | ||
setTokenName = _ref.setTokenName, | ||
setRefreshTokenName = _ref.setRefreshTokenName, | ||
setTokenPrefix = _ref.setTokenPrefix, | ||
getTokenPrefix = _ref.getTokenPrefix, | ||
setBaseUrl = _ref.setBaseUrl, | ||
getBaseUrl = _ref.getBaseUrl; | ||
exports.isAuthenticated = isAuthenticated; | ||
exports.logout = logout; | ||
exports.setToken = setToken; | ||
exports.getToken = getToken; | ||
exports.setRefreshToken = setRefreshToken; | ||
exports.getRefreshToken = getRefreshToken; | ||
exports.setTokenName = setTokenName; | ||
exports.setRefreshTokenName = setRefreshTokenName; | ||
exports.setTokenPrefix = setTokenPrefix; | ||
exports.getTokenPrefix = getTokenPrefix; | ||
exports.setBaseUrl = setBaseUrl; | ||
exports.getBaseUrl = getBaseUrl; | ||
var _ref2 = new _Fetcher2.default(), | ||
getCookiesData = _ref2.getCookiesData, | ||
stringifyQuery = _ref2.stringifyQuery, | ||
parseQuery = _ref2.parseQuery, | ||
fetcher = _ref2.fetcher; | ||
exports.getCookiesData = getCookiesData; | ||
exports.stringifyQuery = stringifyQuery; | ||
exports.parseQuery = parseQuery; | ||
exports.fetcher = fetcher; | ||
exports.Link = _Link2.default; | ||
exports.NavLink = _NavLink2.default; | ||
exports.isAuthenticated = _utils.isAuthenticated; | ||
exports.logout = _utils.logout; | ||
exports.setToken = _utils.setToken; | ||
exports.getToken = _utils.getToken; | ||
exports.setRefreshToken = _utils.setRefreshToken; | ||
exports.getRefreshToken = _utils.getRefreshToken; | ||
exports.setTokenName = _utils.setTokenName; | ||
exports.setRefreshTokenName = _utils.setRefreshTokenName; | ||
exports.setTokenPrefix = _utils.setTokenPrefix; | ||
exports.getTokenPrefix = _utils.getTokenPrefix; | ||
exports.setBaseUrl = _utils.setBaseUrl; | ||
exports.getBaseUrl = _utils.getBaseUrl; | ||
exports.getCookiesData = _utils.getCookiesData; | ||
exports.stringifyQuery = _utils.stringifyQuery; | ||
exports.parseQuery = _utils.parseQuery; | ||
exports.fetcher = _utils.fetcher; |
@@ -50,3 +50,2 @@ 'use strict'; | ||
} else { | ||
console.log('resolving by middleware'); | ||
resolver.resolve(history.location).then(function () { | ||
@@ -53,0 +52,0 @@ next(action); |
{ | ||
"name": "react-isomorphic-tools", | ||
"version": "3.0.0-alpha.1", | ||
"version": "3.0.0-alpha.2", | ||
"description": "Authorization, Fetcher, Preload. Tools for ServerSide rendering", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
137867
33
1315
1