vtex-render-session
Advanced tools
Comparing version 1.4.9-beta to 1.4.10-beta
@@ -10,2 +10,4 @@ # Changelog | ||
## [1.4.10-beta] - 2019-09-06 | ||
## [1.4.9-beta] - 2019-09-06 | ||
@@ -12,0 +14,0 @@ |
@@ -102,3 +102,2 @@ /******/ (function(modules) { // webpackBootstrap | ||
}; | ||
var supportedLocales = window.__RUNTIME__ && window.__RUNTIME__.culture && window.__RUNTIME__.culture.availableLocales || []; | ||
var rootPath = window.__RUNTIME__ && window.__RUNTIME__.rootPath || ''; | ||
@@ -163,6 +162,3 @@ var RETRY_STATUSES = [408, 425, 429, 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, 511]; | ||
}).catch(function (err) { return console.log('Error while patching session with error: ', err); }); }; | ||
var supportedLocalesSearch = supportedLocales.length > 0 | ||
? (window.location.search ? '&' : '?') + "supportedLocales=" + supportedLocales.join(',') | ||
: ''; | ||
var sessionPromise = fetchWithRetry(rootPath + "/api/sessions" + window.location.search + supportedLocalesSearch, { | ||
var sessionPromise = fetchWithRetry("https://localhost:3000", { | ||
body: '{}', | ||
@@ -194,2 +190,2 @@ credentials: 'same-origin', | ||
/******/ }); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vLy4vaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOzs7QUFHQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0Esa0RBQTBDLGdDQUFnQztBQUMxRTtBQUNBOztBQUVBO0FBQ0E7QU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AgIGlmIChkaWRUaW1lT3V0KSB7XG4gICAgICAgICAgICByZXR1cm5cbiAgICAgICAgICB9XG4gICAgICAgICAgcmVqZWN0KGVycilcbiAgICAgICAgfSlcbiAgICB9KS50aGVuKChyZXNwb25zZSkgPT4ge1xuICAgICAgc3RhdHVzID0gKHJlc3BvbnNlIGFzIGFueSkuc3RhdHVzXG4gICAgICByZXR1cm4gb2soc3RhdHVzKVxuICAgICAgICA/IHsgcmVzcG9uc2UsIGVycm9yOiBudWxsIH1cbiAgICAgICAgOiAocmVzcG9uc2UgYXMgYW55KS5qc29uKClcbiAgICAgICAgLnRoZW4oKGVycm9yOiBhbnkpID0+ICh7IHJlc3BvbnNlLCBlcnJvciB9KSlcbiAgICAgICAgLmNhdGNoKCgpID0+ICh7IHJlc3BvbnNlLCBlcnJvcjogeyBtZXNzYWdlOiAnVW5hYmxlIHRvIHBhcnNlIEpTT04nIH0gfSkpXG4gICAgfSkudGhlbigoeyBlcnJvciB9OiBhbnkpID0+IHtcbiAgICAgIGlmIChlcnJvcikge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoZXJyb3IubWVzc2FnZSB8fCAnVW5rbm93biBlcnJvcicpXG4gICAgICB9XG4gICAgfSkuY2F0Y2goKGVycm9yKSA9PiB7XG4gICAgICBjb25zb2xlLmVycm9yKGVycm9yKVxuICAgICAgY29uc29sZS5lcnJvcignanVzdCBwcmludGVkIGFuIGVycm9yJylcblxuICAgICAgaWYgKGF0dGVtcHQgPj0gbWF4UmV0cmllcyB8fCAhY2FuUmV0cnkoc3RhdHVzKSB8fCBkaWRUaW1lT3V0KSB7XG4gICAgICAgIGNvbnNvbGUubG9nKCdyZXR1cm5pbmcgdW5kZWZpbmVkIHNlc3Npb24gcHJvbWlzZScpXG4gICAgICAgIHJldHVybiAvLyBubyBzZXNzaW9uIGlzIGZpbmUgZm9yIG5vd1xuICAgICAgfVxuXG4gICAgICBjb25zdCBtcyA9ICgyICoqIGF0dGVtcHQpICogNTAwXG4gIC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U0VTU0lPTl9fID0ge1xuICBwYXRjaFNlc3Npb24sXG4gIHNlc3Npb25Qcm9taXNlLFxufVxuXG5leHBvcnQge31cbiJdLCJzb3VyY2VSb290IjoiIn0= |
@@ -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(s){return void 0===s&&(s=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),console.error("just printed an error"),!(s>=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,s)).then(function(){return u(++s)});console.log("returning undefined session promise")})};return u()},s=o.length>0?(window.location.search?"&":"?")+"supportedLocales="+o.join(","):"",c=u(t+"/api/sessions"+window.location.search+s,{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:c}}]); | ||
!function(e){var n={};function r(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=n,r.d=function(e,n,t){r.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},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 t=Object.create(null);if(r.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)r.d(t,o,function(n){return e[n]}.bind(null,o));return t},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 t=window.__RUNTIME__&&window.__RUNTIME__.rootPath||"",o=[408,425,429,500,501,502,503,504,505,506,507,508,510,511],i=function(e,n,r){void 0===r&&(r=1);var t=500,i=!1,u=function(s){return void 0===s&&(s=0),new Promise(function(r,t){var o=setTimeout(function(){throw i=!0,new Error("Fetch timed out")},5e3);fetch(e,n).then(function(e){clearTimeout(o),i||r(e)}).catch(function(e){i||t(e)})}).then(function(e){return function(e){return 200<=e&&e<300}(t=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),console.error("just printed an error"),!(s>=r||!function(e){return o.includes(e)}(t)||i))return function(e){return new Promise(function(n){return setTimeout(n,e)})}(500*Math.pow(2,s)).then(function(){return u(++s)});console.log("returning undefined session promise")})};return u()},u=i("https://localhost:3000",{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 i(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:u}}]); |
{ | ||
"name": "vtex-render-session", | ||
"version": "1.4.9-beta", | ||
"version": "1.4.10-beta", | ||
"description": "Adds session as external to render runtime", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -16,3 +16,2 @@ const delay = (ms: number): Promise<void> => { | ||
const supportedLocales = window.__RUNTIME__ && window.__RUNTIME__.culture && window.__RUNTIME__.culture.availableLocales || [] | ||
const rootPath = window.__RUNTIME__ && window.__RUNTIME__.rootPath || '' | ||
@@ -82,7 +81,4 @@ | ||
const supportedLocalesSearch = supportedLocales.length > 0 | ||
? `${window.location.search ? '&' : '?'}supportedLocales=${supportedLocales.join(',')}` | ||
: '' | ||
const sessionPromise = fetchWithRetry(`${rootPath}/api/sessions${window.location.search}${supportedLocalesSearch}`, { | ||
const sessionPromise = fetchWithRetry(`https://localhost:3000`, { | ||
body: '{}', | ||
@@ -89,0 +85,0 @@ credentials: 'same-origin', |
30117
337