Merge pull request #10413 from Budibase/fix/client-versioning
Enrich the upgradable version property when fetching the app package
This commit is contained in:
commit
c761bae00e
|
@ -59,7 +59,6 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "2.5.6-alpha.32",
|
"@budibase/bbui": "2.5.6-alpha.32",
|
||||||
"@budibase/client": "2.5.6-alpha.32",
|
|
||||||
"@budibase/frontend-core": "2.5.6-alpha.32",
|
"@budibase/frontend-core": "2.5.6-alpha.32",
|
||||||
"@budibase/shared-core": "2.5.6-alpha.32",
|
"@budibase/shared-core": "2.5.6-alpha.32",
|
||||||
"@budibase/string-templates": "2.5.6-alpha.32",
|
"@budibase/string-templates": "2.5.6-alpha.32",
|
||||||
|
|
|
@ -134,6 +134,7 @@ export const getFrontendStore = () => {
|
||||||
previousTopNavPath: {},
|
previousTopNavPath: {},
|
||||||
version: application.version,
|
version: application.version,
|
||||||
revertableVersion: application.revertableVersion,
|
revertableVersion: application.revertableVersion,
|
||||||
|
upgradableVersion: application.upgradableVersion,
|
||||||
navigation: application.navigation || {},
|
navigation: application.navigation || {},
|
||||||
usedPlugins: application.usedPlugins || [],
|
usedPlugins: application.usedPlugins || [],
|
||||||
}))
|
}))
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
} from "@budibase/bbui"
|
} from "@budibase/bbui"
|
||||||
import { store } from "builderStore"
|
import { store } from "builderStore"
|
||||||
import { API } from "api"
|
import { API } from "api"
|
||||||
import clientPackage from "@budibase/client/package.json"
|
|
||||||
|
|
||||||
export function show() {
|
export function show() {
|
||||||
updateModal.show()
|
updateModal.show()
|
||||||
|
@ -25,9 +24,9 @@
|
||||||
|
|
||||||
$: appId = $store.appId
|
$: appId = $store.appId
|
||||||
$: updateAvailable =
|
$: updateAvailable =
|
||||||
clientPackage.version &&
|
$store.upgradableVersion &&
|
||||||
$store.version &&
|
$store.version &&
|
||||||
clientPackage.version !== $store.version
|
$store.upgradableVersion !== $store.version
|
||||||
$: revertAvailable = $store.revertableVersion != null
|
$: revertAvailable = $store.revertableVersion != null
|
||||||
|
|
||||||
const refreshAppPackage = async () => {
|
const refreshAppPackage = async () => {
|
||||||
|
@ -46,7 +45,7 @@
|
||||||
// Don't wait for the async refresh, since this causes modal flashing
|
// Don't wait for the async refresh, since this causes modal flashing
|
||||||
refreshAppPackage()
|
refreshAppPackage()
|
||||||
notifications.success(
|
notifications.success(
|
||||||
`App updated successfully to version ${clientPackage.version}`
|
`App updated successfully to version ${$store.upgradableVersion}`
|
||||||
)
|
)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
notifications.error(`Error updating app: ${err}`)
|
notifications.error(`Error updating app: ${err}`)
|
||||||
|
@ -91,7 +90,7 @@
|
||||||
{#if updateAvailable}
|
{#if updateAvailable}
|
||||||
<Body size="S">
|
<Body size="S">
|
||||||
This app is currently using version <b>{$store.version}</b>, but version
|
This app is currently using version <b>{$store.version}</b>, but version
|
||||||
<b>{clientPackage.version}</b> is available. Updates can contain new features,
|
<b>{$store.upgradableVersion}</b> is available. Updates can contain new features,
|
||||||
performance improvements and bug fixes.
|
performance improvements and bug fixes.
|
||||||
</Body>
|
</Body>
|
||||||
{:else}
|
{:else}
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
notifications,
|
notifications,
|
||||||
} from "@budibase/bbui"
|
} from "@budibase/bbui"
|
||||||
import { store } from "builderStore"
|
import { store } from "builderStore"
|
||||||
import clientPackage from "@budibase/client/package.json"
|
|
||||||
import { processStringSync } from "@budibase/string-templates"
|
import { processStringSync } from "@budibase/string-templates"
|
||||||
import { users, auth, apps, groups, overview } from "stores/portal"
|
import { users, auth, apps, groups, overview } from "stores/portal"
|
||||||
import { fetchData } from "@budibase/frontend-core"
|
import { fetchData } from "@budibase/frontend-core"
|
||||||
|
@ -40,7 +39,7 @@
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
$: updateAvailable = clientPackage.version !== $store.version
|
$: updateAvailable = $store.upgradableVersion !== $store.version
|
||||||
$: isPublished = app?.status === AppStatus.DEPLOYED
|
$: isPublished = app?.status === AppStatus.DEPLOYED
|
||||||
$: appEditorId = !app?.updatedBy ? $auth.user._id : app?.updatedBy
|
$: appEditorId = !app?.updatedBy ? $auth.user._id : app?.updatedBy
|
||||||
$: appEditorText = appEditor?.firstName || appEditor?.email
|
$: appEditorText = appEditor?.firstName || appEditor?.email
|
||||||
|
@ -172,8 +171,8 @@
|
||||||
<Heading size="XS">{$store.version}</Heading>
|
<Heading size="XS">{$store.version}</Heading>
|
||||||
{#if updateAvailable}
|
{#if updateAvailable}
|
||||||
<div class="version-status">
|
<div class="version-status">
|
||||||
New version <strong>{clientPackage.version}</strong> is available
|
New version <strong>{$store.upgradableVersion}</strong> is
|
||||||
-
|
available -
|
||||||
<Link
|
<Link
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$goto("./version")
|
$goto("./version")
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
<script>
|
<script>
|
||||||
import { Layout, Heading, Body, Divider, Button } from "@budibase/bbui"
|
import { Layout, Heading, Body, Divider, Button } from "@budibase/bbui"
|
||||||
import { store } from "builderStore"
|
import { store } from "builderStore"
|
||||||
import clientPackage from "@budibase/client/package.json"
|
|
||||||
import VersionModal from "components/deploy/VersionModal.svelte"
|
import VersionModal from "components/deploy/VersionModal.svelte"
|
||||||
|
|
||||||
let versionModal
|
let versionModal
|
||||||
|
|
||||||
$: updateAvailable = clientPackage.version !== $store.version
|
$: updateAvailable = $store.upgradableVersion !== $store.version
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Layout noPadding>
|
<Layout noPadding>
|
||||||
|
@ -18,7 +17,7 @@
|
||||||
{#if updateAvailable}
|
{#if updateAvailable}
|
||||||
<Body>
|
<Body>
|
||||||
The app is currently using version <strong>{$store.version}</strong>
|
The app is currently using version <strong>{$store.version}</strong>
|
||||||
but version <strong>{clientPackage.version}</strong> is available.
|
but version <strong>{$store.upgradableVersion}</strong> is available.
|
||||||
<br />
|
<br />
|
||||||
Updates can contain new features, performance improvements and bug fixes.
|
Updates can contain new features, performance improvements and bug fixes.
|
||||||
</Body>
|
</Body>
|
||||||
|
|
|
@ -223,7 +223,7 @@ export async function fetchAppPackage(ctx: UserCtx) {
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx.body = {
|
ctx.body = {
|
||||||
application,
|
application: { ...application, upgradableVersion: envCore.VERSION },
|
||||||
screens,
|
screens,
|
||||||
layouts,
|
layouts,
|
||||||
clientLibPath,
|
clientLibPath,
|
||||||
|
|
12
yarn.lock
12
yarn.lock
|
@ -1486,15 +1486,15 @@
|
||||||
pouchdb-promise "^6.0.4"
|
pouchdb-promise "^6.0.4"
|
||||||
through2 "^2.0.0"
|
through2 "^2.0.0"
|
||||||
|
|
||||||
"@budibase/pro@2.5.6-alpha.31":
|
"@budibase/pro@2.5.6-alpha.32":
|
||||||
version "2.5.6-alpha.31"
|
version "2.5.6-alpha.32"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.5.6-alpha.31.tgz#e711fed348c64bffac5eb3b4dfed6be15c2253c9"
|
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.5.6-alpha.32.tgz#6d52da231efcacbb163a5af0cfe8284199ff659e"
|
||||||
integrity sha512-gIpq5uICd0tQP+RB1Dv+v9m9EPG//HJJb95qFXv1rjuXT2ANT7rAmhJrOoQpqhTGwB0aPFsz00/wqFQVQVGzPQ==
|
integrity sha512-XzM55VcxpxTXCxYhLUOYvYqlCAPRPASJBbNonuRV6qUtXZxE5xSSEDnHQehhD8TrNP3QQ94DlCJ5DQCm/f3yJQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@budibase/backend-core" "2.5.6-alpha.31"
|
"@budibase/backend-core" "2.5.6-alpha.32"
|
||||||
"@budibase/shared-core" "2.4.44-alpha.1"
|
"@budibase/shared-core" "2.4.44-alpha.1"
|
||||||
"@budibase/string-templates" "2.4.44-alpha.1"
|
"@budibase/string-templates" "2.4.44-alpha.1"
|
||||||
"@budibase/types" "2.5.6-alpha.31"
|
"@budibase/types" "2.5.6-alpha.32"
|
||||||
"@koa/router" "8.0.8"
|
"@koa/router" "8.0.8"
|
||||||
bull "4.10.1"
|
bull "4.10.1"
|
||||||
joi "17.6.0"
|
joi "17.6.0"
|
||||||
|
|
Loading…
Reference in New Issue