@goldstack/template-ssr 0.3.55 → 0.3.57
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localHelper.d.ts","sourceRoot":"","sources":["../../src/localHelper.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"localHelper.d.ts","sourceRoot":"","sources":["../../src/localHelper.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,IAAI,MAAM,CA6FzC"}
|
package/dist/src/localHelper.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.getLocalHelperJs = getLocalHelperJs;
|
|
|
4
4
|
function getLocalHelperJs() {
|
|
5
5
|
return `
|
|
6
6
|
let versionTimestamp = null;
|
|
7
|
+
let isInErrorState = false;
|
|
7
8
|
let initialLoad = true;
|
|
8
9
|
|
|
9
10
|
const messageContainer = document.createElement('div');
|
|
@@ -38,16 +39,19 @@ async function checkVersionTimestamp() {
|
|
|
38
39
|
const response = await fetchWithTimeout('_goldstack/local/versionTimestamp', { cache: 'no-store' });
|
|
39
40
|
if (!response.ok) throw new Error('Failed to fetch');
|
|
40
41
|
const newTimestamp = await response.text();
|
|
41
|
-
if (versionTimestamp === null) {
|
|
42
|
+
if (versionTimestamp === null || isInErrorState) {
|
|
42
43
|
showMessage('✅', 'Connected to server', 3000);
|
|
43
|
-
|
|
44
|
+
isInErrorState = false;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (versionTimestamp !== null && newTimestamp !== versionTimestamp) {
|
|
44
48
|
location.reload();
|
|
45
49
|
}
|
|
46
50
|
|
|
47
51
|
versionTimestamp = newTimestamp;
|
|
48
52
|
} catch (error) {
|
|
49
53
|
showMessage('❌', 'Connection to server lost. Waiting for restart ...');
|
|
50
|
-
|
|
54
|
+
isInErrorState = true;
|
|
51
55
|
}
|
|
52
56
|
}
|
|
53
57
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localHelper.js","sourceRoot":"","sources":["../../src/localHelper.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"localHelper.js","sourceRoot":"","sources":["../../src/localHelper.ts"],"names":[],"mappings":";;AAAA,4CA6FC;AA7FD,SAAgB,gBAAgB;IAC9B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2FR,CAAC;AACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goldstack/template-ssr",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.57",
|
|
4
4
|
"description": "Building blocks for implementing server-side rendered pages.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"goldstack",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@goldstack/infra": "0.4.21",
|
|
43
|
-
"@goldstack/infra-aws": "0.4.
|
|
44
|
-
"@goldstack/template-ssr-server": "0.3.
|
|
45
|
-
"@goldstack/utils-aws-lambda": "0.3.
|
|
43
|
+
"@goldstack/infra-aws": "0.4.31",
|
|
44
|
+
"@goldstack/template-ssr-server": "0.3.55",
|
|
45
|
+
"@goldstack/utils-aws-lambda": "0.3.39",
|
|
46
46
|
"@goldstack/utils-esbuild": "0.5.12",
|
|
47
47
|
"@goldstack/utils-package": "0.4.21",
|
|
48
48
|
"@goldstack/utils-package-config-embedded": "0.5.22",
|
|
49
49
|
"@goldstack/utils-template": "0.4.21",
|
|
50
|
-
"@goldstack/utils-terraform": "0.4.
|
|
50
|
+
"@goldstack/utils-terraform": "0.4.41",
|
|
51
51
|
"@types/aws-lambda": "^8.10.146",
|
|
52
52
|
"react": "18.2.0",
|
|
53
53
|
"react-dom": "18.2.0",
|