vtex-render-session
Advanced tools
Comparing version 1.4.7-beta to 1.4.8-beta
@@ -10,16 +10,4 @@ # Changelog | ||
## [1.4.7-beta] - 2019-09-05 | ||
## [1.4.8-beta] - 2019-09-06 | ||
## [1.4.6-beta] - 2019-09-05 | ||
## [1.4.5-beta] - 2019-09-05 | ||
## [1.4.4-beta] - 2019-09-05 | ||
## [1.4.3-beta] - 2019-09-05 | ||
## [1.4.2-beta] - 2019-09-05 | ||
## [1.4.1-beta] - 2019-09-04 | ||
## [1.4.0] - 2019-07-11 | ||
@@ -64,2 +52,2 @@ | ||
### Added | ||
- Copy of the code available in the render runtime to a separate bundle to provide session | ||
- Copy of the code available in the render runtime to a separate bundle to provide session |
@@ -105,3 +105,3 @@ /******/ (function(modules) { // webpackBootstrap | ||
var RETRY_STATUSES = [408, 425, 429, 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, 511]; | ||
var FETCH_TIMEOUT = 30000; | ||
var FETCH_TIMEOUT = 5000; | ||
var canRetry = function (status) { return RETRY_STATUSES.includes(status); }; | ||
@@ -191,2 +191,2 @@ var ok = function (status) { return 200 <= status && status < 300; }; | ||
/******/ }); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vLy4vaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOzs7QUFHQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0Esa0RBQTBDLGdDQUFnQztBQUMxRTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNB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G91dCcpXG4gICAgICB9LCBGRVRDSF9USU1FT1VUKVxuICAgICAgZmV0Y2godXJsLCBpbml0KS50aGVuKChyZXNwb25zZSkgPT4ge1xuICAgICAgICBjbGVhclRpbWVvdXQodGltZW91dClcbiAgICAgICAgaWYgKCFkaWRUaW1lT3V0KSB7XG4gICAgICAgICAgcmVzb2x2ZShyZXNwb25zZSlcbiAgICAgICAgfVxuICAgICAgfSkuY2F0Y2goKGVycikgPT4ge1xuICAgICAgICAgIGlmIChkaWRUaW1lT3V0KSB7XG4gICAgICAgICAgICByZXR1cm5cbiAgICAgICAgICB9XG4gICAgICAgICAgcmVqZWN0KGVycilcbiAgICAgICAgfSlcbiAgICB9KS50aGVuKChyZXNwb25zZSkgPT4ge1xuICAgICAgc3RhdHVzID0gKHJlc3BvbnNlIGFzIGFueSkuc3RhdHVzXG4gICAgICByZXR1cm4gb2soc3RhdHVzKVxuICAgICAgICA/IHsgcmVzcG9uc2UsIGVycm9yOiBudWxsIH1cbiAgICAgICAgOiAocmVzcG9uc2UgYXMgYW55KS5qc29uKClcbiAgICAgICAgLnRoZW4oKGVycm9yOiBhbnkpID0+ICh7IHJlc3BvbnNlLCBlcnJvciB9KSlcbiAgICAgICAgLmNhdGNoKCgpID0+ICh7IHJlc3BvbnNlLCBlcnJvcjogeyBtZXNzYWdlOiAnVW5hYmxlIHRvIHBhcnNlIEpTT04nIH0gfSkpXG4gICAgfSkudGhlbigoeyBlcnJvciB9OiBhbnkpID0+IHtcbiAgICAgIGlmIChlcnJvcikge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoZXJyb3IubWVzc2FnZSB8fCAnVW5rbm93biBlcnJvcicpXG4gICAgICB9XG4gICAgfSkuY2F0Y2goKGVycm9yKSA9PiB7XG4gICAgICBjb25zb2xlLmVycm9yKGVycm9yKVxuXG4gICAgICBpZiAoYXR0ZW1wdCA+PSBtYXhSZXRyaWVzIHx8ICFjYW5SZXRyeShzdGF0dXMpIHx8IGRpZFRpbWVPdXQ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ZWRMb2NhbGVzU2VhcmNofWAsIHtcbiAgYm9keTogJ3t9JyxcbiAgY3JlZGVudGlhbHM6ICdzYW1lLW9yaWdpbicsXG4gIGhlYWRlcnM6IG5ldyBIZWFkZXJzKHsgJ0NvbnRlbnQtVHlwZSc6ICdhcHBsaWNhdGlvbi9qc29uJyB9KSxcbiAgbWV0aG9kOiAnUE9TVCcsXG59KS5jYXRjaChlcnIgPT4gY29uc29sZS5sb2coJ0Vycm9yIHdoaWxlIGxvYWRpbmcgc2Vzc2lvbiB3aXRoIGVycm9yOiAnLCBlcnIpKTtcblxuKHdpbmRvdyBhcyBhbnkpLl9fUkVOREVSXzdfU0VTU0lPTl9fID0gKHdpbmRvdyBhcyBhbnkpLl9fUkVOREVSXzhfU0VTU0lPTl9fID0ge1xuICBwYXRjaFNlc3Npb24sXG4gIHNlc3Npb25Qcm9taXNlLFxufVxuXG5leHBvcnQge31cbiJdLCJzb3VyY2VSb290IjoiIn0= |
@@ -1,1 +0,1 @@ | ||
!function(e){var n={};function r(o){if(n[o])return n[o].exports;var t=n[o]={i:o,l:!1,exports:{}};return e[o].call(t.exports,t,t.exports,r),t.l=!0,t.exports}r.m=e,r.c=n,r.d=function(e,n,o){r.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,n){if(1&n&&(e=r(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var t in e)r.d(o,t,function(n){return e[n]}.bind(null,t));return o},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r.p="/",r(r.s=0)}([function(e,n,r){e.exports=r(1)},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=window.__RUNTIME__&&window.__RUNTIME__.culture&&window.__RUNTIME__.culture.availableLocales||[],t=window.__RUNTIME__&&window.__RUNTIME__.rootPath||"",i=[408,425,429,500,501,502,503,504,505,506,507,508,510,511],u=function(e,n,r){void 0===r&&(r=1);var o=500,t=!1,u=function(c){return void 0===c&&(c=0),new Promise(function(r,o){var i=setTimeout(function(){throw t=!0,new Error("Fetch timed out")},3e4);fetch(e,n).then(function(e){clearTimeout(i),t||r(e)}).catch(function(e){t||o(e)})}).then(function(e){return function(e){return 200<=e&&e<300}(o=e.status)?{response:e,error:null}:e.json().then(function(n){return{response:e,error:n}}).catch(function(){return{response:e,error:{message:"Unable to parse JSON"}}})}).then(function(e){var n=e.error;if(n)throw new Error(n.message||"Unknown error")}).catch(function(e){if(console.error(e),!(c>=r||!function(e){return i.includes(e)}(o)||t))return function(e){return new Promise(function(n){return setTimeout(n,e)})}(500*Math.pow(2,c)).then(function(){return u(++c)})})};return u()},c=o.length>0?(window.location.search?"&":"?")+"supportedLocales="+o.join(","):"",s=u(t+"/api/sessions"+window.location.search+c,{body:"{}",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json"}),method:"POST"}).catch(function(e){return console.log("Error while loading session with error: ",e)});window.__RENDER_7_SESSION__=window.__RENDER_8_SESSION__={patchSession:function(e){return u(t+"/api/sessions"+window.location.search,{body:e?JSON.stringify(e):"{}",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json"}),method:"PATCH"}).catch(function(e){return console.log("Error while patching session with error: ",e)})},sessionPromise:s}}]); | ||
!function(e){var n={};function r(o){if(n[o])return n[o].exports;var t=n[o]={i:o,l:!1,exports:{}};return e[o].call(t.exports,t,t.exports,r),t.l=!0,t.exports}r.m=e,r.c=n,r.d=function(e,n,o){r.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,n){if(1&n&&(e=r(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var t in e)r.d(o,t,function(n){return e[n]}.bind(null,t));return o},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r.p="/",r(r.s=0)}([function(e,n,r){e.exports=r(1)},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=window.__RUNTIME__&&window.__RUNTIME__.culture&&window.__RUNTIME__.culture.availableLocales||[],t=window.__RUNTIME__&&window.__RUNTIME__.rootPath||"",i=[408,425,429,500,501,502,503,504,505,506,507,508,510,511],u=function(e,n,r){void 0===r&&(r=1);var o=500,t=!1,u=function(c){return void 0===c&&(c=0),new Promise(function(r,o){var i=setTimeout(function(){throw t=!0,new Error("Fetch timed out")},5e3);fetch(e,n).then(function(e){clearTimeout(i),t||r(e)}).catch(function(e){t||o(e)})}).then(function(e){return function(e){return 200<=e&&e<300}(o=e.status)?{response:e,error:null}:e.json().then(function(n){return{response:e,error:n}}).catch(function(){return{response:e,error:{message:"Unable to parse JSON"}}})}).then(function(e){var n=e.error;if(n)throw new Error(n.message||"Unknown error")}).catch(function(e){if(console.error(e),!(c>=r||!function(e){return i.includes(e)}(o)||t))return function(e){return new Promise(function(n){return setTimeout(n,e)})}(500*Math.pow(2,c)).then(function(){return u(++c)})})};return u()},c=o.length>0?(window.location.search?"&":"?")+"supportedLocales="+o.join(","):"",s=u(t+"/api/sessions"+window.location.search+c,{body:"{}",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json"}),method:"POST"}).catch(function(e){return console.log("Error while loading session with error: ",e)});window.__RENDER_7_SESSION__=window.__RENDER_8_SESSION__={patchSession:function(e){return u(t+"/api/sessions"+window.location.search,{body:e?JSON.stringify(e):"{}",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json"}),method:"PATCH"}).catch(function(e){return console.log("Error while patching session with error: ",e)})},sessionPromise:s}}]); |
{ | ||
"name": "vtex-render-session", | ||
"version": "1.4.7-beta", | ||
"version": "1.4.8-beta", | ||
"description": "Adds session as external to render runtime", | ||
@@ -12,3 +12,4 @@ "scripts": { | ||
"buildDev": "webpack --mode=\"development\" --config ./webpack.config.js", | ||
"prereleasy": "npm run build" | ||
"prereleasy": "npm run build", | ||
"postreleasy": "npm publish" | ||
}, | ||
@@ -15,0 +16,0 @@ "main": "dist/index.min.js", |
@@ -18,4 +18,5 @@ const delay = (ms: number): Promise<void> => { | ||
const rootPath = window.__RUNTIME__ && window.__RUNTIME__.rootPath || '' | ||
const RETRY_STATUSES = [ 408, 425, 429, 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, 511 ] | ||
const FETCH_TIMEOUT = 30000 | ||
const FETCH_TIMEOUT = 5000 | ||
@@ -22,0 +23,0 @@ const canRetry = (status: number) => RETRY_STATUSES.includes(status) |
31296