create-rca-client
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -17,2 +17,3 @@ 'use strict'; | ||
var props = document.getElementById('app-props').textContent; | ||
// eslint-disable-next-line | ||
props = props.replace("<![CDATA[", "").replace("]]>", ""); | ||
@@ -19,0 +20,0 @@ var serverProps = JSON.parse(props); |
@@ -6,3 +6,3 @@ 'use strict'; | ||
}); | ||
exports.RouteHandler = exports.createRcaClient = undefined; | ||
exports.PreloadRouteHandler = exports.createRcaClient = undefined; | ||
@@ -13,5 +13,5 @@ var _clientWrapper = require('./clientWrapper/clientWrapper'); | ||
var _RouteHandler2 = require('./RouteHandler/RouteHandler'); | ||
var _PreloadRouteHandler2 = require('./PreloadRouteHandler/PreloadRouteHandler'); | ||
var _RouteHandler3 = _interopRequireDefault(_RouteHandler2); | ||
var _PreloadRouteHandler3 = _interopRequireDefault(_PreloadRouteHandler2); | ||
@@ -21,2 +21,2 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
exports.createRcaClient = _clientWrapper2.default; | ||
exports.RouteHandler = _RouteHandler3.default; | ||
exports.PreloadRouteHandler = _PreloadRouteHandler3.default; |
@@ -15,9 +15,5 @@ "use strict"; | ||
case 0: | ||
_context.next = 2; | ||
return component.getInitialProps(params); | ||
return _context.abrupt("return", Promise.resolve(component.getInitialProps(params))); | ||
case 2: | ||
return _context.abrupt("return", _context.sent); | ||
case 3: | ||
case 1: | ||
case "end": | ||
@@ -24,0 +20,0 @@ return _context.stop(); |
@@ -14,2 +14,3 @@ 'use strict'; | ||
} | ||
return routePath.split('/').reduce(function (acc, part, i, arr) { | ||
@@ -16,0 +17,0 @@ if (hasParam(part)) { |
{ | ||
"name": "create-rca-client", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"main": "es/index.js", | ||
@@ -5,0 +5,0 @@ "repository": "git@git.realestate.com.au:craig-collie/create-rca-app.git", |
@@ -6,2 +6,3 @@ import React from 'react'; | ||
let props = document.getElementById('app-props').textContent; | ||
// eslint-disable-next-line | ||
props = props.replace("<![CDATA[", "").replace("]]>", ""); | ||
@@ -8,0 +9,0 @@ const serverProps = JSON.parse(props); |
export createRcaClient from './clientWrapper/clientWrapper'; | ||
export RouteHandler from './RouteHandler/RouteHandler'; | ||
export PreloadRouteHandler from './PreloadRouteHandler/PreloadRouteHandler'; |
const fetchInitialProps = async (component, params) => ( | ||
await component.getInitialProps(params) | ||
Promise.resolve(component.getInitialProps(params)) | ||
); | ||
export default fetchInitialProps; | ||
export default fetchInitialProps; |
@@ -1,5 +0,8 @@ | ||
const hasParam = (str) => (str.indexOf(':') !== -1); | ||
const hasParam = str => (str.indexOf(':') !== -1); | ||
const getParamsFromUrl = (routePath, urlPath) => { | ||
if (!routePath) { return null } | ||
if (!routePath) { | ||
return null; | ||
} | ||
return routePath.split('/').reduce((acc, part, i, arr) => { | ||
@@ -14,2 +17,2 @@ if (hasParam(part)) { | ||
export default getParamsFromUrl; | ||
export default getParamsFromUrl; |
@@ -1,5 +0,5 @@ | ||
const requiresPrefetch = (component) => ( | ||
const requiresPrefetch = component => ( | ||
(typeof component.getInitialProps === 'function') | ||
); | ||
export default requiresPrefetch; | ||
export default requiresPrefetch; |
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
103692
18
449
0