@goldstack/template-ssr 0.3.54 → 0.3.55
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,CAyFzC"}
|
package/dist/src/localHelper.js
CHANGED
|
@@ -38,15 +38,16 @@ async function checkVersionTimestamp() {
|
|
|
38
38
|
const response = await fetchWithTimeout('_goldstack/local/versionTimestamp', { cache: 'no-store' });
|
|
39
39
|
if (!response.ok) throw new Error('Failed to fetch');
|
|
40
40
|
const newTimestamp = await response.text();
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
if (versionTimestamp === null) {
|
|
42
|
+
showMessage('✅', 'Connected to server', 3000);
|
|
43
43
|
} else if (newTimestamp !== versionTimestamp) {
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
location.reload();
|
|
45
|
+
}
|
|
46
46
|
|
|
47
47
|
versionTimestamp = newTimestamp;
|
|
48
48
|
} catch (error) {
|
|
49
49
|
showMessage('❌', 'Connection to server lost. Waiting for restart ...');
|
|
50
|
+
versionTimestamp = null;
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
|
|
@@ -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,4CAyFC;AAzFD,SAAgB,gBAAgB;IAC9B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuFR,CAAC;AACF,CAAC"}
|