@zengenti/contensis-react-base 3.0.2-beta.22 → 3.0.2-beta.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/cjs/{App-21a7d836.js → App-a9f4effe.js} +48 -21
  2. package/cjs/App-a9f4effe.js.map +1 -0
  3. package/cjs/{ContensisDeliveryApi-c079b03a.js → ContensisDeliveryApi-76de5ca9.js} +55 -34
  4. package/cjs/ContensisDeliveryApi-76de5ca9.js.map +1 -0
  5. package/cjs/CookieConstants-000427db.js +10 -0
  6. package/cjs/CookieConstants-000427db.js.map +1 -0
  7. package/cjs/CookieHelper.class-daeb09dd.js +52 -0
  8. package/cjs/CookieHelper.class-daeb09dd.js.map +1 -0
  9. package/cjs/{RouteLoader-7f0d107a.js → RouteLoader-005d7f4e.js} +9 -5
  10. package/cjs/RouteLoader-005d7f4e.js.map +1 -0
  11. package/cjs/{ToJs-6e9cfa69.js → ToJs-5169fe56.js} +2 -2
  12. package/cjs/ToJs-5169fe56.js.map +1 -0
  13. package/cjs/client.js +15 -11
  14. package/cjs/client.js.map +1 -1
  15. package/cjs/contensis-react-base.js +18 -343
  16. package/cjs/contensis-react-base.js.map +1 -1
  17. package/cjs/{login-2a6b5be0.js → login-c94a3369.js} +86 -80
  18. package/cjs/login-c94a3369.js.map +1 -0
  19. package/cjs/redux.js +3 -3
  20. package/cjs/routing.js +5 -3
  21. package/cjs/routing.js.map +1 -1
  22. package/cjs/{selectors-bcca60f4.js → selectors-bb991331.js} +4 -9
  23. package/cjs/selectors-bb991331.js.map +1 -0
  24. package/cjs/user.js +30 -15
  25. package/cjs/user.js.map +1 -1
  26. package/cjs/util.js +5 -3
  27. package/cjs/util.js.map +1 -1
  28. package/cjs/{version-4077e706.js → version-153ec9ef.js} +2 -2
  29. package/cjs/{version-4077e706.js.map → version-153ec9ef.js.map} +1 -1
  30. package/cjs/{version-fe28099e.js → version-963a7634.js} +3 -3
  31. package/cjs/{version-fe28099e.js.map → version-963a7634.js.map} +1 -1
  32. package/esm/{App-2af18a99.js → App-cdcedf62.js} +47 -21
  33. package/esm/App-cdcedf62.js.map +1 -0
  34. package/esm/{ContensisDeliveryApi-5660ee0e.js → ContensisDeliveryApi-91398551.js} +55 -35
  35. package/esm/ContensisDeliveryApi-91398551.js.map +1 -0
  36. package/esm/CookieConstants-3d3b6531.js +6 -0
  37. package/esm/CookieConstants-3d3b6531.js.map +1 -0
  38. package/esm/CookieHelper.class-4d6ee27b.js +49 -0
  39. package/esm/CookieHelper.class-4d6ee27b.js.map +1 -0
  40. package/esm/{RouteLoader-6eac364e.js → RouteLoader-d36840dd.js} +9 -5
  41. package/esm/RouteLoader-d36840dd.js.map +1 -0
  42. package/esm/{ToJs-9b30636a.js → ToJs-e1af7030.js} +2 -2
  43. package/esm/ToJs-e1af7030.js.map +1 -0
  44. package/esm/client.js +16 -12
  45. package/esm/client.js.map +1 -1
  46. package/esm/contensis-react-base.js +18 -344
  47. package/esm/contensis-react-base.js.map +1 -1
  48. package/esm/{login-71ff3fcb.js → login-950e0b92.js} +79 -72
  49. package/esm/login-950e0b92.js.map +1 -0
  50. package/esm/redux.js +6 -6
  51. package/esm/routing.js +5 -3
  52. package/esm/routing.js.map +1 -1
  53. package/esm/{selectors-74de49a3.js → selectors-1a3c1725.js} +4 -9
  54. package/esm/selectors-1a3c1725.js.map +1 -0
  55. package/esm/user.js +27 -16
  56. package/esm/user.js.map +1 -1
  57. package/esm/util.js +5 -3
  58. package/esm/util.js.map +1 -1
  59. package/esm/{version-ef107106.js → version-6cc0418c.js} +2 -2
  60. package/esm/{version-ef107106.js.map → version-6cc0418c.js.map} +1 -1
  61. package/esm/{version-b15807c5.js → version-ec722079.js} +3 -3
  62. package/esm/{version-b15807c5.js.map → version-ec722079.js.map} +1 -1
  63. package/models/client/client.d.ts +2 -2
  64. package/models/client/index.d.ts +1 -1
  65. package/models/config.d.ts +3 -3
  66. package/models/index.d.ts +5 -5
  67. package/models/redux/actions/index.d.ts +1 -1
  68. package/models/redux/appstate.d.ts +2 -2
  69. package/models/redux/selectors/index.d.ts +1 -1
  70. package/models/redux/store/store.d.ts +1 -1
  71. package/models/redux/types/index.d.ts +1 -1
  72. package/models/routing/redux/actions.d.ts +10 -6
  73. package/models/routing/redux/selectors.d.ts +5 -5
  74. package/models/routing/redux/types.d.ts +0 -1
  75. package/models/routing/routes.d.ts +21 -18
  76. package/models/routing/util/queries.d.ts +1 -1
  77. package/models/search/models/Queries.d.ts +8 -10
  78. package/models/search/models/Search.d.ts +24 -24
  79. package/models/search/models/SearchActions.d.ts +33 -33
  80. package/models/search/models/SearchState.d.ts +11 -11
  81. package/models/search/models/SearchUtil.d.ts +1 -1
  82. package/models/search/models/WithSearch.d.ts +1 -1
  83. package/models/search/redux/actions.d.ts +4 -4
  84. package/models/search/redux/selectors.d.ts +27 -27
  85. package/models/search/redux/util.d.ts +1 -1
  86. package/models/search/search/expressions.d.ts +4 -4
  87. package/models/search/search/util.d.ts +2 -2
  88. package/models/search/transformations/state-to-queryparams.mapper.d.ts +1 -1
  89. package/models/server/features/linkdepth-api/LinkDepthSearchService.d.ts +1 -1
  90. package/models/server/features/linkdepth-api/search.d.ts +3 -3
  91. package/models/server/internalServer.d.ts +8 -6
  92. package/models/server/util/bundles.d.ts +3 -3
  93. package/models/server/util/headers.d.ts +1 -1
  94. package/models/server/webApp.d.ts +1 -1
  95. package/models/testImmer/redux/reducer.d.ts +1 -1
  96. package/models/user/components/Login.d.ts +2 -3
  97. package/models/user/containers/ChangePassword.container.d.ts +2 -2
  98. package/models/user/containers/ForgotPassword.container.d.ts +2 -2
  99. package/models/user/containers/Login.container.d.ts +2 -2
  100. package/models/user/containers/Registration.container.d.ts +2 -2
  101. package/models/user/hocs/withLogin.d.ts +5 -11
  102. package/models/user/hocs/withRegistration.d.ts +2 -8
  103. package/models/user/redux/actions.d.ts +2 -2
  104. package/models/user/redux/sagas/login.d.ts +9 -8
  105. package/models/user/redux/selectors.d.ts +6 -6
  106. package/models/user/util/CookieConstants.d.ts +7 -0
  107. package/models/user/util/CookieHelper.class.d.ts +15 -3
  108. package/models/user/util/LoginHelper.class.d.ts +26 -23
  109. package/models/user/util/matchGroups.d.ts +1 -1
  110. package/models/util/ContensisDeliveryApi.d.ts +21 -14
  111. package/models/util/ToJs.d.ts +1 -1
  112. package/models/util/index.d.ts +2 -2
  113. package/models/util/json-mapper.d.ts +3 -3
  114. package/package.json +8 -8
  115. package/cjs/App-21a7d836.js.map +0 -1
  116. package/cjs/ContensisDeliveryApi-c079b03a.js.map +0 -1
  117. package/cjs/RouteLoader-7f0d107a.js.map +0 -1
  118. package/cjs/ToJs-6e9cfa69.js.map +0 -1
  119. package/cjs/login-2a6b5be0.js.map +0 -1
  120. package/cjs/selectors-bcca60f4.js.map +0 -1
  121. package/esm/App-2af18a99.js.map +0 -1
  122. package/esm/ContensisDeliveryApi-5660ee0e.js.map +0 -1
  123. package/esm/RouteLoader-6eac364e.js.map +0 -1
  124. package/esm/ToJs-9b30636a.js.map +0 -1
  125. package/esm/login-71ff3fcb.js.map +0 -1
  126. package/esm/selectors-74de49a3.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { c as cachedSearch, d as deliveryApi } from './ContensisDeliveryApi-5660ee0e.js';
1
+ import { c as cachedSearch, d as deliveryApi } from './ContensisDeliveryApi-91398551.js';
2
2
  import { Query as Query$1 } from 'contensis-delivery-api';
3
3
  import React from 'react';
4
4
  import { Provider } from 'react-redux';
@@ -23,18 +23,21 @@ import { StaticRouter } from 'react-router-dom';
23
23
  import { matchRoutes } from 'react-router-config';
24
24
  import { Helmet } from 'react-helmet';
25
25
  import { ServerStyleSheet } from 'styled-components';
26
- import serialize$1 from 'serialize-javascript';
26
+ import serialize from 'serialize-javascript';
27
27
  import minifyCssString from 'minify-css-string';
28
28
  import { ChunkExtractor, ChunkExtractorManager } from '@loadable/server';
29
29
  import { identity, noop } from 'lodash';
30
30
  import { buildCleaner } from 'lodash-clean';
31
31
  import { CookiesProvider } from 'react-cookie';
32
- import { c as createStore } from './version-ef107106.js';
33
- import { h as history, p as pickProject, r as rootSaga } from './App-2af18a99.js';
34
- export { A as ReactApp } from './App-2af18a99.js';
35
- import { s as setVersionStatus, a as setVersion } from './version-b15807c5.js';
36
- import { s as selectSurrogateKeys, a as selectRouteEntry, b as selectCurrentProject, g as getImmutableOrJS, c as setCurrentProject } from './selectors-74de49a3.js';
32
+ import cookiesMiddleware from 'universal-cookie-express';
33
+ import { c as createStore } from './version-6cc0418c.js';
34
+ import { h as history, p as pickProject, r as rootSaga } from './App-cdcedf62.js';
35
+ export { A as ReactApp } from './App-cdcedf62.js';
36
+ import { s as setVersionStatus, a as setVersion } from './version-ec722079.js';
37
+ import { s as selectSurrogateKeys, a as selectRouteEntry, b as selectCurrentProject, g as getImmutableOrJS, c as setCurrentProject } from './selectors-1a3c1725.js';
37
38
  import chalk from 'chalk';
39
+ import './CookieConstants-3d3b6531.js';
40
+ import './CookieHelper.class-4d6ee27b.js';
38
41
  import 'loglevel';
39
42
  import '@redux-saga/core/effects';
40
43
  import 'redux';
@@ -43,12 +46,11 @@ import 'redux-saga';
43
46
  import 'redux-injectors';
44
47
  import './reducers-3d5c37d1.js';
45
48
  import 'history';
46
- import './login-71ff3fcb.js';
47
- import './ToJs-9b30636a.js';
48
49
  import 'await-to-js';
49
- import 'js-cookie';
50
+ import './login-950e0b92.js';
51
+ import './ToJs-e1af7030.js';
50
52
  import 'react-hot-loader';
51
- import './RouteLoader-6eac364e.js';
53
+ import './RouteLoader-d36840dd.js';
52
54
 
53
55
  /**
54
56
  * Util class holds our search results helper boilerplate methods
@@ -3579,332 +3581,6 @@ function cloneDeep(value) {
3579
3581
 
3580
3582
  var cloneDeep_1 = cloneDeep;
3581
3583
 
3582
- /*!
3583
- * cookie
3584
- * Copyright(c) 2012-2014 Roman Shtylman
3585
- * Copyright(c) 2015 Douglas Christopher Wilson
3586
- * MIT Licensed
3587
- */
3588
-
3589
- /**
3590
- * Module exports.
3591
- * @public
3592
- */
3593
-
3594
- var parse_1 = parse;
3595
- var serialize_1 = serialize;
3596
-
3597
- /**
3598
- * Module variables.
3599
- * @private
3600
- */
3601
-
3602
- var decode = decodeURIComponent;
3603
- var encode = encodeURIComponent;
3604
-
3605
- /**
3606
- * RegExp to match field-content in RFC 7230 sec 3.2
3607
- *
3608
- * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
3609
- * field-vchar = VCHAR / obs-text
3610
- * obs-text = %x80-FF
3611
- */
3612
-
3613
- var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
3614
-
3615
- /**
3616
- * Parse a cookie header.
3617
- *
3618
- * Parse the given cookie header string into an object
3619
- * The object has the various cookies as keys(names) => values
3620
- *
3621
- * @param {string} str
3622
- * @param {object} [options]
3623
- * @return {object}
3624
- * @public
3625
- */
3626
-
3627
- function parse(str, options) {
3628
- if (typeof str !== 'string') {
3629
- throw new TypeError('argument str must be a string');
3630
- }
3631
-
3632
- var obj = {};
3633
- var opt = options || {};
3634
- var pairs = str.split(';');
3635
- var dec = opt.decode || decode;
3636
-
3637
- for (var i = 0; i < pairs.length; i++) {
3638
- var pair = pairs[i];
3639
- var index = pair.indexOf('=');
3640
-
3641
- // skip things that don't look like key=value
3642
- if (index < 0) {
3643
- continue;
3644
- }
3645
-
3646
- var key = pair.substring(0, index).trim();
3647
-
3648
- // only assign once
3649
- if (undefined == obj[key]) {
3650
- var val = pair.substring(index + 1, pair.length).trim();
3651
-
3652
- // quoted values
3653
- if (val[0] === '"') {
3654
- val = val.slice(1, -1);
3655
- }
3656
-
3657
- obj[key] = tryDecode(val, dec);
3658
- }
3659
- }
3660
-
3661
- return obj;
3662
- }
3663
-
3664
- /**
3665
- * Serialize data into a cookie header.
3666
- *
3667
- * Serialize the a name value pair into a cookie string suitable for
3668
- * http headers. An optional options object specified cookie parameters.
3669
- *
3670
- * serialize('foo', 'bar', { httpOnly: true })
3671
- * => "foo=bar; httpOnly"
3672
- *
3673
- * @param {string} name
3674
- * @param {string} val
3675
- * @param {object} [options]
3676
- * @return {string}
3677
- * @public
3678
- */
3679
-
3680
- function serialize(name, val, options) {
3681
- var opt = options || {};
3682
- var enc = opt.encode || encode;
3683
-
3684
- if (typeof enc !== 'function') {
3685
- throw new TypeError('option encode is invalid');
3686
- }
3687
-
3688
- if (!fieldContentRegExp.test(name)) {
3689
- throw new TypeError('argument name is invalid');
3690
- }
3691
-
3692
- var value = enc(val);
3693
-
3694
- if (value && !fieldContentRegExp.test(value)) {
3695
- throw new TypeError('argument val is invalid');
3696
- }
3697
-
3698
- var str = name + '=' + value;
3699
-
3700
- if (null != opt.maxAge) {
3701
- var maxAge = opt.maxAge - 0;
3702
-
3703
- if (isNaN(maxAge) || !isFinite(maxAge)) {
3704
- throw new TypeError('option maxAge is invalid')
3705
- }
3706
-
3707
- str += '; Max-Age=' + Math.floor(maxAge);
3708
- }
3709
-
3710
- if (opt.domain) {
3711
- if (!fieldContentRegExp.test(opt.domain)) {
3712
- throw new TypeError('option domain is invalid');
3713
- }
3714
-
3715
- str += '; Domain=' + opt.domain;
3716
- }
3717
-
3718
- if (opt.path) {
3719
- if (!fieldContentRegExp.test(opt.path)) {
3720
- throw new TypeError('option path is invalid');
3721
- }
3722
-
3723
- str += '; Path=' + opt.path;
3724
- }
3725
-
3726
- if (opt.expires) {
3727
- if (typeof opt.expires.toUTCString !== 'function') {
3728
- throw new TypeError('option expires is invalid');
3729
- }
3730
-
3731
- str += '; Expires=' + opt.expires.toUTCString();
3732
- }
3733
-
3734
- if (opt.httpOnly) {
3735
- str += '; HttpOnly';
3736
- }
3737
-
3738
- if (opt.secure) {
3739
- str += '; Secure';
3740
- }
3741
-
3742
- if (opt.sameSite) {
3743
- var sameSite = typeof opt.sameSite === 'string'
3744
- ? opt.sameSite.toLowerCase() : opt.sameSite;
3745
-
3746
- switch (sameSite) {
3747
- case true:
3748
- str += '; SameSite=Strict';
3749
- break;
3750
- case 'lax':
3751
- str += '; SameSite=Lax';
3752
- break;
3753
- case 'strict':
3754
- str += '; SameSite=Strict';
3755
- break;
3756
- case 'none':
3757
- str += '; SameSite=None';
3758
- break;
3759
- default:
3760
- throw new TypeError('option sameSite is invalid');
3761
- }
3762
- }
3763
-
3764
- return str;
3765
- }
3766
-
3767
- /**
3768
- * Try decoding a string using a decoding function.
3769
- *
3770
- * @param {string} str
3771
- * @param {function} decode
3772
- * @private
3773
- */
3774
-
3775
- function tryDecode(str, decode) {
3776
- try {
3777
- return decode(str);
3778
- } catch (e) {
3779
- return str;
3780
- }
3781
- }
3782
-
3783
- function hasDocumentCookie() {
3784
- // Can we get/set cookies on document.cookie?
3785
- return typeof document === 'object' && typeof document.cookie === 'string';
3786
- }
3787
- function parseCookies(cookies, options) {
3788
- if (typeof cookies === 'string') {
3789
- return parse_1(cookies, options);
3790
- }
3791
- else if (typeof cookies === 'object' && cookies !== null) {
3792
- return cookies;
3793
- }
3794
- else {
3795
- return {};
3796
- }
3797
- }
3798
- function isParsingCookie(value, doNotParse) {
3799
- if (typeof doNotParse === 'undefined') {
3800
- // We guess if the cookie start with { or [, it has been serialized
3801
- doNotParse =
3802
- !value || (value[0] !== '{' && value[0] !== '[' && value[0] !== '"');
3803
- }
3804
- return !doNotParse;
3805
- }
3806
- function readCookie(value, options) {
3807
- if (options === void 0) { options = {}; }
3808
- var cleanValue = cleanupCookieValue(value);
3809
- if (isParsingCookie(cleanValue, options.doNotParse)) {
3810
- try {
3811
- return JSON.parse(cleanValue);
3812
- }
3813
- catch (e) {
3814
- // At least we tried
3815
- }
3816
- }
3817
- // Ignore clean value if we failed the deserialization
3818
- // It is not relevant anymore to trim those values
3819
- return value;
3820
- }
3821
- function cleanupCookieValue(value) {
3822
- // express prepend j: before serializing a cookie
3823
- if (value && value[0] === 'j' && value[1] === ':') {
3824
- return value.substr(2);
3825
- }
3826
- return value;
3827
- }
3828
-
3829
- var __assign = (undefined && undefined.__assign) || function () {
3830
- __assign = Object.assign || function(t) {
3831
- for (var s, i = 1, n = arguments.length; i < n; i++) {
3832
- s = arguments[i];
3833
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
3834
- t[p] = s[p];
3835
- }
3836
- return t;
3837
- };
3838
- return __assign.apply(this, arguments);
3839
- };
3840
- var Cookies = /** @class */ (function () {
3841
- function Cookies(cookies, options) {
3842
- var _this = this;
3843
- this.changeListeners = [];
3844
- this.HAS_DOCUMENT_COOKIE = false;
3845
- this.cookies = parseCookies(cookies, options);
3846
- new Promise(function () {
3847
- _this.HAS_DOCUMENT_COOKIE = hasDocumentCookie();
3848
- }).catch(function () { });
3849
- }
3850
- Cookies.prototype._updateBrowserValues = function (parseOptions) {
3851
- if (!this.HAS_DOCUMENT_COOKIE) {
3852
- return;
3853
- }
3854
- this.cookies = parse_1(document.cookie, parseOptions);
3855
- };
3856
- Cookies.prototype._emitChange = function (params) {
3857
- for (var i = 0; i < this.changeListeners.length; ++i) {
3858
- this.changeListeners[i](params);
3859
- }
3860
- };
3861
- Cookies.prototype.get = function (name, options, parseOptions) {
3862
- if (options === void 0) { options = {}; }
3863
- this._updateBrowserValues(parseOptions);
3864
- return readCookie(this.cookies[name], options);
3865
- };
3866
- Cookies.prototype.getAll = function (options, parseOptions) {
3867
- if (options === void 0) { options = {}; }
3868
- this._updateBrowserValues(parseOptions);
3869
- var result = {};
3870
- for (var name_1 in this.cookies) {
3871
- result[name_1] = readCookie(this.cookies[name_1], options);
3872
- }
3873
- return result;
3874
- };
3875
- Cookies.prototype.set = function (name, value, options) {
3876
- var _a;
3877
- if (typeof value === 'object') {
3878
- value = JSON.stringify(value);
3879
- }
3880
- this.cookies = __assign(__assign({}, this.cookies), (_a = {}, _a[name] = value, _a));
3881
- if (this.HAS_DOCUMENT_COOKIE) {
3882
- document.cookie = serialize_1(name, value, options);
3883
- }
3884
- this._emitChange({ name: name, value: value, options: options });
3885
- };
3886
- Cookies.prototype.remove = function (name, options) {
3887
- var finalOptions = (options = __assign(__assign({}, options), { expires: new Date(1970, 1, 1, 0, 0, 1), maxAge: 0 }));
3888
- this.cookies = __assign({}, this.cookies);
3889
- delete this.cookies[name];
3890
- if (this.HAS_DOCUMENT_COOKIE) {
3891
- document.cookie = serialize_1(name, '', finalOptions);
3892
- }
3893
- this._emitChange({ name: name, value: undefined, options: options });
3894
- };
3895
- Cookies.prototype.addChangeListener = function (callback) {
3896
- this.changeListeners.push(callback);
3897
- };
3898
- Cookies.prototype.removeChangeListener = function (callback) {
3899
- var idx = this.changeListeners.indexOf(callback);
3900
- if (idx >= 0) {
3901
- this.changeListeners.splice(idx, 1);
3902
- }
3903
- };
3904
- return Cookies;
3905
- }());
3906
- var Cookies$1 = Cookies;
3907
-
3908
3584
  var stringifyAttributes = ((attributes = {}) => Object.entries(attributes).map(([key, value], idx) => `${idx !== 0 ? ' ' : ''}${key}${value ? `="${value}"` : ''}`).join(' '));
3909
3585
 
3910
3586
  /* eslint-disable no-console */
@@ -3994,7 +3670,7 @@ const getBundleData = (config, staticRoutePath) => {
3994
3670
  legacy: loadableBundleData(config, staticRoutePath, 'legacy'),
3995
3671
  modern: loadableBundleData(config, staticRoutePath, 'modern')
3996
3672
  };
3997
- if (!bundleData.default || bundleData.default === {}) bundleData.default = bundleData.legacy || bundleData.modern;
3673
+ if (!bundleData.default || Object.keys(bundleData.default || {}).length === 0) bundleData.default = bundleData.legacy || bundleData.modern;
3998
3674
  return bundleData;
3999
3675
  };
4000
3676
 
@@ -4136,11 +3812,10 @@ const webApp = (app, ReactApp, config) => {
4136
3812
  if (handleExceptions !== false) unhandledExceptionHandler(); // Create `process.on` event handlers for unhandled exceptions (Node v15+)
4137
3813
 
4138
3814
  const versionInfo = getVersionInfo(staticFolderPath);
4139
- app.get('/*', async (request, response) => {
3815
+ app.get('/*', cookiesMiddleware(), async (request, response) => {
4140
3816
  const {
4141
3817
  url
4142
3818
  } = request;
4143
- const cookies = new Cookies$1(request.headers.cookie);
4144
3819
  const matchedStaticRoute = () => matchRoutes(routes.StaticRoutes, request.path);
4145
3820
  const isStaticRoute = () => matchedStaticRoute().length > 0;
4146
3821
  const staticRoute = isStaticRoute() && matchedStaticRoute()[0];
@@ -4190,7 +3865,7 @@ const webApp = (app, ReactApp, config) => {
4190
3865
  const jsx = /*#__PURE__*/React.createElement(ChunkExtractorManager, {
4191
3866
  extractor: loadableExtractor.commonLoadableExtractor
4192
3867
  }, /*#__PURE__*/React.createElement(CookiesProvider, {
4193
- cookies: cookies
3868
+ cookies: request.universalCookies
4194
3869
  }, /*#__PURE__*/React.createElement(Provider, {
4195
3870
  store: store
4196
3871
  }, /*#__PURE__*/React.createElement(StaticRouter, {
@@ -4241,7 +3916,7 @@ const webApp = (app, ReactApp, config) => {
4241
3916
  // After running rootSaga there should be an additional react-loadable
4242
3917
  // code-split bundles for any page components as well as core app bundles
4243
3918
  const bundleTags = getBundleTags(loadableExtractor, scripts, staticRoutePath);
4244
- let serialisedReduxData = serialize$1(buildCleaner({
3919
+ let serialisedReduxData = serialize(buildCleaner({
4245
3920
  isArray: identity,
4246
3921
  isBoolean: identity,
4247
3922
  isDate: identity,
@@ -4268,7 +3943,7 @@ const webApp = (app, ReactApp, config) => {
4268
3943
  serialisedReduxData = `<script ${attributes}>window.versionStatus = "${versionStatus}"; window.REDUX_DATA = ${serialisedReduxData}</script>`;
4269
3944
  }
4270
3945
  }
4271
- if ((context.statusCode || 200) > 400) {
3946
+ if ((context.statusCode || 200) >= 404) {
4272
3947
  accessMethod.STATIC = true;
4273
3948
  }
4274
3949
 
@@ -4334,7 +4009,6 @@ const start = (ReactApp, config, ServerFeatures) => {
4334
4009
  global.PROXY_DELIVERY_API = config.proxyDeliveryApi;
4335
4010
  global.REVERSE_PROXY_PATHS = Object(config.reverseProxyPaths);
4336
4011
  app.disable('x-powered-by');
4337
-
4338
4012
  // Output some information about the used build/startup configuration
4339
4013
  DisplayStartupConfiguration(config);
4340
4014
  ServerFeatures(app);