@budibase/frontend-core 2.14.3 → 2.14.5
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.
- package/package.json +4 -4
- package/src/api/index.js +2 -0
- package/src/api/migrations.js +10 -0
- package/src/components/Updating.svelte +79 -0
- package/src/components/index.js +1 -0
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/frontend-core",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.5",
|
|
4
4
|
"description": "Budibase frontend core libraries used in builder and client",
|
|
5
5
|
"author": "Budibase",
|
|
6
6
|
"license": "MPL-2.0",
|
|
7
7
|
"svelte": "src/index.js",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@budibase/bbui": "2.14.
|
|
10
|
-
"@budibase/shared-core": "2.14.
|
|
9
|
+
"@budibase/bbui": "2.14.5",
|
|
10
|
+
"@budibase/shared-core": "2.14.5",
|
|
11
11
|
"dayjs": "^1.10.8",
|
|
12
12
|
"lodash": "4.17.21",
|
|
13
13
|
"socket.io-client": "^4.6.1",
|
|
14
14
|
"svelte": "^3.49.0"
|
|
15
15
|
},
|
|
16
|
-
"gitHead": "
|
|
16
|
+
"gitHead": "b2e3c448670e3eb4775365524274a65b3b1c41e4"
|
|
17
17
|
}
|
package/src/api/index.js
CHANGED
|
@@ -33,6 +33,7 @@ import { buildEnvironmentVariableEndpoints } from "./environmentVariables"
|
|
|
33
33
|
import { buildEventEndpoints } from "./events"
|
|
34
34
|
import { buildAuditLogsEndpoints } from "./auditLogs"
|
|
35
35
|
import { buildLogsEndpoints } from "./logs"
|
|
36
|
+
import { buildMigrationEndpoints } from "./migrations"
|
|
36
37
|
|
|
37
38
|
/**
|
|
38
39
|
* Random identifier to uniquely identify a session in a tab. This is
|
|
@@ -298,6 +299,7 @@ export const createAPIClient = config => {
|
|
|
298
299
|
...buildEventEndpoints(API),
|
|
299
300
|
...buildAuditLogsEndpoints(API),
|
|
300
301
|
...buildLogsEndpoints(API),
|
|
302
|
+
...buildMigrationEndpoints(API),
|
|
301
303
|
viewV2: buildViewV2Endpoints(API),
|
|
302
304
|
}
|
|
303
305
|
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
export let isMigrationDone
|
|
3
|
+
export let onMigrationDone
|
|
4
|
+
export let timeoutSeconds = 10 // 3 minutes
|
|
5
|
+
|
|
6
|
+
const loadTime = Date.now()
|
|
7
|
+
let timedOut = false
|
|
8
|
+
|
|
9
|
+
async function checkMigrationsFinished() {
|
|
10
|
+
setTimeout(async () => {
|
|
11
|
+
const isMigrated = await isMigrationDone()
|
|
12
|
+
|
|
13
|
+
const timeoutMs = timeoutSeconds * 1000
|
|
14
|
+
if (!isMigrated) {
|
|
15
|
+
if (loadTime + timeoutMs > Date.now()) {
|
|
16
|
+
return checkMigrationsFinished()
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return migrationTimeout()
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
onMigrationDone()
|
|
23
|
+
}, 1000)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
checkMigrationsFinished()
|
|
27
|
+
|
|
28
|
+
function migrationTimeout() {
|
|
29
|
+
timedOut = true
|
|
30
|
+
}
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<div class="loading" class:timeout={timedOut}>
|
|
34
|
+
<span class="header">
|
|
35
|
+
{#if !timedOut}
|
|
36
|
+
System update
|
|
37
|
+
{:else}
|
|
38
|
+
Something went wrong!
|
|
39
|
+
{/if}
|
|
40
|
+
</span>
|
|
41
|
+
<span class="subtext">
|
|
42
|
+
{#if !timedOut}
|
|
43
|
+
Please wait and we will be back in a second!
|
|
44
|
+
{:else}
|
|
45
|
+
An error occurred, please try again later.
|
|
46
|
+
<br />
|
|
47
|
+
Contact
|
|
48
|
+
<a href="https://budibase.com/support/" target="_blank">support</a> if the
|
|
49
|
+
issue persists.
|
|
50
|
+
{/if}</span
|
|
51
|
+
>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<style>
|
|
55
|
+
.loading {
|
|
56
|
+
display: flex;
|
|
57
|
+
justify-content: center;
|
|
58
|
+
flex-direction: column;
|
|
59
|
+
gap: var(--spacing-l);
|
|
60
|
+
height: 100vh;
|
|
61
|
+
text-align: center;
|
|
62
|
+
font-size: 18px;
|
|
63
|
+
}
|
|
64
|
+
.header {
|
|
65
|
+
font-weight: 700;
|
|
66
|
+
}
|
|
67
|
+
.timeout .header {
|
|
68
|
+
color: rgb(196, 46, 46);
|
|
69
|
+
}
|
|
70
|
+
.subtext {
|
|
71
|
+
font-size: 16px;
|
|
72
|
+
color: var(--grey-7);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.subtext a {
|
|
76
|
+
color: var(--grey-7);
|
|
77
|
+
font-weight: 700;
|
|
78
|
+
}
|
|
79
|
+
</style>
|
package/src/components/index.js
CHANGED
|
@@ -3,4 +3,5 @@ export { default as TestimonialPage } from "./TestimonialPage.svelte"
|
|
|
3
3
|
export { default as Testimonial } from "./Testimonial.svelte"
|
|
4
4
|
export { default as UserAvatar } from "./UserAvatar.svelte"
|
|
5
5
|
export { default as UserAvatars } from "./UserAvatars.svelte"
|
|
6
|
+
export { default as Updating } from "./Updating.svelte"
|
|
6
7
|
export { Grid } from "./grid"
|