@budibase/frontend-core 3.31.9 → 3.32.0

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@budibase/frontend-core",
3
- "version": "3.31.9",
3
+ "version": "3.32.0",
4
4
  "description": "Budibase frontend core libraries used in builder and client",
5
5
  "author": "Budibase",
6
6
  "license": "MPL-2.0",
@@ -24,5 +24,5 @@
24
24
  "devDependencies": {
25
25
  "vitest": "^3.2.4"
26
26
  },
27
- "gitHead": "fd3896fb9777306c4a0f32479094782ab428081b"
27
+ "gitHead": "53fe38782b652197983a8ec2da7761f3135047b6"
28
28
  }
package/src/api/index.ts CHANGED
@@ -209,8 +209,9 @@ export const createAPIClient = (config: APIClientConfig = {}): APIClient => {
209
209
  return
210
210
  }
211
211
  const migration = response.headers.get(Header.MIGRATING_APP)
212
+ const shouldSkipWait = response.headers.get(Header.SKIP_MIGRATING_WAIT)
212
213
 
213
- if (migration) {
214
+ if (migration && !shouldSkipWait) {
214
215
  config.onMigrationDetected(migration)
215
216
  }
216
217
  }
@@ -1,6 +1,6 @@
1
- <script>
2
- export let isMigrationDone
3
- export let onMigrationDone
1
+ <script lang="ts">
2
+ export let isMigrationDone: () => Promise<boolean>
3
+ export let onMigrationDone: () => void
4
4
  export let timeoutSeconds = 60 // 1 minute
5
5
 
6
6
  let timedOut = false
@@ -8,7 +8,7 @@
8
8
  async function checkMigrationsFinished() {
9
9
  let totalWaitMs = 0
10
10
  while (true) {
11
- const waitForMs = 5000 + Math.random() * 5000
11
+ const waitForMs = 500 + Math.random() * 200
12
12
  await new Promise(resolve => setTimeout(resolve, waitForMs))
13
13
  totalWaitMs += waitForMs
14
14