1
0
Fork 0
mirror of synced 2024-07-07 15:25:52 +12:00

Merge pull request #10413 from Budibase/fix/client-versioning

Enrich the upgradable version property when fetching the app package
This commit is contained in:
deanhannigan 2023-04-26 15:50:41 +01:00 committed by GitHub
commit c761bae00e
7 changed files with 17 additions and 20 deletions

View file

@ -59,7 +59,6 @@
},
"dependencies": {
"@budibase/bbui": "2.5.6-alpha.32",
"@budibase/client": "2.5.6-alpha.32",
"@budibase/frontend-core": "2.5.6-alpha.32",
"@budibase/shared-core": "2.5.6-alpha.32",
"@budibase/string-templates": "2.5.6-alpha.32",

View file

@ -134,6 +134,7 @@ export const getFrontendStore = () => {
previousTopNavPath: {},
version: application.version,
revertableVersion: application.revertableVersion,
upgradableVersion: application.upgradableVersion,
navigation: application.navigation || {},
usedPlugins: application.usedPlugins || [],
}))

View file

@ -9,7 +9,6 @@
} from "@budibase/bbui"
import { store } from "builderStore"
import { API } from "api"
import clientPackage from "@budibase/client/package.json"
export function show() {
updateModal.show()
@ -25,9 +24,9 @@
$: appId = $store.appId
$: updateAvailable =
clientPackage.version &&
$store.upgradableVersion &&
$store.version &&
clientPackage.version !== $store.version
$store.upgradableVersion !== $store.version
$: revertAvailable = $store.revertableVersion != null
const refreshAppPackage = async () => {
@ -46,7 +45,7 @@
// Don't wait for the async refresh, since this causes modal flashing
refreshAppPackage()
notifications.success(
`App updated successfully to version ${clientPackage.version}`
`App updated successfully to version ${$store.upgradableVersion}`
)
} catch (err) {
notifications.error(`Error updating app: ${err}`)
@ -91,7 +90,7 @@
{#if updateAvailable}
<Body size="S">
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.
</Body>
{:else}

View file

@ -13,7 +13,6 @@
notifications,
} from "@budibase/bbui"
import { store } from "builderStore"
import clientPackage from "@budibase/client/package.json"
import { processStringSync } from "@budibase/string-templates"
import { users, auth, apps, groups, overview } from "stores/portal"
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
$: appEditorId = !app?.updatedBy ? $auth.user._id : app?.updatedBy
$: appEditorText = appEditor?.firstName || appEditor?.email
@ -172,8 +171,8 @@
<Heading size="XS">{$store.version}</Heading>
{#if updateAvailable}
<div class="version-status">
New version <strong>{clientPackage.version}</strong> is available
-
New version <strong>{$store.upgradableVersion}</strong> is
available -
<Link
on:click={() => {
$goto("./version")

View file

@ -1,12 +1,11 @@
<script>
import { Layout, Heading, Body, Divider, Button } from "@budibase/bbui"
import { store } from "builderStore"
import clientPackage from "@budibase/client/package.json"
import VersionModal from "components/deploy/VersionModal.svelte"
let versionModal
$: updateAvailable = clientPackage.version !== $store.version
$: updateAvailable = $store.upgradableVersion !== $store.version
</script>
<Layout noPadding>
@ -18,7 +17,7 @@
{#if updateAvailable}
<Body>
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 />
Updates can contain new features, performance improvements and bug fixes.
</Body>

View file

@ -223,7 +223,7 @@ export async function fetchAppPackage(ctx: UserCtx) {
)
ctx.body = {
application,
application: { ...application, upgradableVersion: envCore.VERSION },
screens,
layouts,
clientLibPath,

View file

@ -1486,15 +1486,15 @@
pouchdb-promise "^6.0.4"
through2 "^2.0.0"
"@budibase/pro@2.5.6-alpha.31":
version "2.5.6-alpha.31"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.5.6-alpha.31.tgz#e711fed348c64bffac5eb3b4dfed6be15c2253c9"
integrity sha512-gIpq5uICd0tQP+RB1Dv+v9m9EPG//HJJb95qFXv1rjuXT2ANT7rAmhJrOoQpqhTGwB0aPFsz00/wqFQVQVGzPQ==
"@budibase/pro@2.5.6-alpha.32":
version "2.5.6-alpha.32"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.5.6-alpha.32.tgz#6d52da231efcacbb163a5af0cfe8284199ff659e"
integrity sha512-XzM55VcxpxTXCxYhLUOYvYqlCAPRPASJBbNonuRV6qUtXZxE5xSSEDnHQehhD8TrNP3QQ94DlCJ5DQCm/f3yJQ==
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/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"
bull "4.10.1"
joi "17.6.0"