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

react-isomorphic-tools

Package Overview
Dependencies
Maintainers
1
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-isomorphic-tools - npm Package Compare versions

Comparing version 3.0.0-alpha.1 to 3.0.0-alpha.2

dist/utils/index.js

8

dist/Data/Fetcher.js

@@ -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

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