From 5eabc3ef0007ee21b9509b30745a5516b52d4dac Mon Sep 17 00:00:00 2001 From: Jonny Date: Thu, 1 Dec 2022 14:39:35 +0000 Subject: [PATCH 01/22] add optional annotations to pods for logging format --- charts/budibase/templates/app-service-deployment.yaml | 3 +++ charts/budibase/templates/proxy-service-deployment.yaml | 3 +++ charts/budibase/templates/worker-service-deployment.yaml | 3 +++ charts/budibase/values.yaml | 6 ++++++ 4 files changed, 15 insertions(+) diff --git a/charts/budibase/templates/app-service-deployment.yaml b/charts/budibase/templates/app-service-deployment.yaml index 72d9fc93a9..d0da688edc 100644 --- a/charts/budibase/templates/app-service-deployment.yaml +++ b/charts/budibase/templates/app-service-deployment.yaml @@ -4,6 +4,9 @@ metadata: annotations: kompose.cmd: kompose convert kompose.version: 1.21.0 (992df58d8) +{{ if .Values.globals.logAnnotations }} +{{ toYaml .Values.globals.logAnnotations | indent 4 }} +{{ end }} creationTimestamp: null labels: io.kompose.service: app-service diff --git a/charts/budibase/templates/proxy-service-deployment.yaml b/charts/budibase/templates/proxy-service-deployment.yaml index 5588022032..3cde7a2388 100644 --- a/charts/budibase/templates/proxy-service-deployment.yaml +++ b/charts/budibase/templates/proxy-service-deployment.yaml @@ -4,6 +4,9 @@ metadata: annotations: kompose.cmd: kompose convert kompose.version: 1.21.0 (992df58d8) +{{ if .Values.globals.logAnnotations }} +{{ toYaml .Values.globals.logAnnotations | indent 4 }} +{{ end }} creationTimestamp: null labels: app.kubernetes.io/name: budibase-proxy diff --git a/charts/budibase/templates/worker-service-deployment.yaml b/charts/budibase/templates/worker-service-deployment.yaml index df692a0723..fc443f25f8 100644 --- a/charts/budibase/templates/worker-service-deployment.yaml +++ b/charts/budibase/templates/worker-service-deployment.yaml @@ -4,6 +4,9 @@ metadata: annotations: kompose.cmd: kompose convert kompose.version: 1.21.0 (992df58d8) +{{ if .Values.globals.logAnnotations }} +{{ toYaml .Values.globals.logAnnotations | indent 4 }} +{{ end }} creationTimestamp: null labels: io.kompose.service: worker-service diff --git a/charts/budibase/values.yaml b/charts/budibase/values.yaml index a2a761aa86..a8b28084f4 100644 --- a/charts/budibase/values.yaml +++ b/charts/budibase/values.yaml @@ -22,6 +22,12 @@ serviceAccount: podAnnotations: {} +# logAnnotations: +# co.elastic.logs/multiline.type: pattern +# co.elastic.logs/multiline.pattern: '^[[:space:]]' +# co.elastic.logs/multiline.negate: false +# co.elastic.logs/multiline.match: after + podSecurityContext: {} # fsGroup: 2000 From a75ec0d7aeb448791f46556859d8c0dd96892281 Mon Sep 17 00:00:00 2001 From: Gerard Burns Date: Mon, 5 Dec 2022 14:24:53 +0000 Subject: [PATCH 02/22] Fix Skeleton Loader Jumping --- packages/client/manifest.json | 2 + .../src/components/app/forms/Form.svelte | 43 +++++++++---------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/packages/client/manifest.json b/packages/client/manifest.json index dbbb7726be..37b8cc5c8b 100644 --- a/packages/client/manifest.json +++ b/packages/client/manifest.json @@ -2598,6 +2598,7 @@ ] }, "passwordfield": { + "skeleton": false, "name": "Password Field", "icon": "LockClosed", "styles": [ @@ -3066,6 +3067,7 @@ ] }, "longformfield": { + "skeleton": false, "name": "Long Form Field", "icon": "TextAlignLeft", "styles": [ diff --git a/packages/client/src/components/app/forms/Form.svelte b/packages/client/src/components/app/forms/Form.svelte index 717bf00064..840c65f6bf 100644 --- a/packages/client/src/components/app/forms/Form.svelte +++ b/packages/client/src/components/app/forms/Form.svelte @@ -20,7 +20,6 @@ const context = getContext("context") const { API, fetchDatasourceSchema } = getContext("sdk") - let loaded = false let schema let table @@ -56,32 +55,30 @@ } const res = await fetchDatasourceSchema(dataSource) schema = res || {} - if (!loaded) { - loaded = true - } } $: initialValues = getInitialValues(actionType, dataSource, $context) $: resetKey = Helpers.hashString( - JSON.stringify(initialValues) + JSON.stringify(dataSource) + disabled + JSON.stringify(schema) + + JSON.stringify(initialValues) + + JSON.stringify(dataSource) + + disabled ) -{#if loaded} - {#key resetKey} - - - - {/key} -{/if} +{#key resetKey} + + + +{/key} From 12fdbfafb662a241439eb27faeb78a95b75f33f7 Mon Sep 17 00:00:00 2001 From: Gerard Burns Date: Mon, 5 Dec 2022 14:38:43 +0000 Subject: [PATCH 03/22] pr feedback --- packages/client/src/components/app/forms/Form.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/components/app/forms/Form.svelte b/packages/client/src/components/app/forms/Form.svelte index 840c65f6bf..977b940d1f 100644 --- a/packages/client/src/components/app/forms/Form.svelte +++ b/packages/client/src/components/app/forms/Form.svelte @@ -59,7 +59,7 @@ $: initialValues = getInitialValues(actionType, dataSource, $context) $: resetKey = Helpers.hashString( - JSON.stringify(schema) + + !!schema + JSON.stringify(initialValues) + JSON.stringify(dataSource) + disabled From 95a515ec3d4d418ae2b5209dc974d071c45e14c9 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 5 Dec 2022 18:24:25 +0000 Subject: [PATCH 04/22] Fix for #8896 - the automation logs were already being sync'd to the dev database, but when unpublished they are in-accessible. Some minor updates to make sure that before unpublishing there is a sync, and then most of the changes are in pro. --- .../server/src/api/controllers/application.ts | 152 ++++++------------ packages/server/src/api/controllers/cloud.ts | 1 + .../src/migrations/functions/appUrls.ts | 4 +- .../src/sdk/app/applications/general.ts | 19 +++ .../server/src/sdk/app/applications/index.ts | 7 + .../server/src/sdk/app/applications/sync.ts | 53 ++++++ packages/server/src/sdk/index.ts | 5 +- 7 files changed, 134 insertions(+), 107 deletions(-) create mode 100644 packages/server/src/sdk/app/applications/general.ts create mode 100644 packages/server/src/sdk/app/applications/index.ts create mode 100644 packages/server/src/sdk/app/applications/sync.ts diff --git a/packages/server/src/api/controllers/application.ts b/packages/server/src/api/controllers/application.ts index 752353893f..f2f065476e 100644 --- a/packages/server/src/api/controllers/application.ts +++ b/packages/server/src/api/controllers/application.ts @@ -26,7 +26,6 @@ import { } from "@budibase/backend-core" import { USERS_TABLE_SCHEMA } from "../../constants" import { buildDefaultDocs } from "../../db/defaultData/datasource_bb_default" - import { removeAppFromUserRoles } from "../../utilities/workerRequests" import { clientLibraryPath, @@ -39,18 +38,22 @@ import { backupClientLibrary, revertClientLibrary, } from "../../utilities/fileSystem/clientLibrary" -import { syncGlobalUsers } from "./user" import { cleanupAutomations } from "../../automations/utils" import { checkAppMetadata } from "../../automations/logging" import { getUniqueRows } from "../../utilities/usageQuota/rows" import { quotas, groups } from "@budibase/pro" -import { App, Layout, Screen, MigrationType } from "@budibase/types" +import { + App, + Layout, + Screen, + MigrationType, + BBContext, + Database, +} from "@budibase/types" import { BASE_LAYOUT_PROP_IDS } from "../../constants/layouts" import { enrichPluginURLs } from "../../utilities/plugins" import sdk from "../../sdk" -const URL_REGEX_SLASH = /\/|\\/g - // utility function, need to do away with this async function getLayouts() { const db = context.getAppDB() @@ -74,29 +77,18 @@ async function getScreens() { ).rows.map((row: any) => row.doc) } -function getUserRoleId(ctx: any) { - return !ctx.user.role || !ctx.user.role._id +function getUserRoleId(ctx: BBContext) { + return !ctx.user?.role || !ctx.user.role._id ? roles.BUILTIN_ROLE_IDS.PUBLIC : ctx.user.role._id } -export const getAppUrl = (ctx: any) => { - // construct the url - let url - if (ctx.request.body.url) { - // if the url is provided, use that - url = encodeURI(ctx.request.body.url) - } else if (ctx.request.body.name) { - // otherwise use the name - url = encodeURI(`${ctx.request.body.name}`) - } - if (url) { - url = `/${url.replace(URL_REGEX_SLASH, "")}`.toLowerCase() - } - return url -} - -const checkAppUrl = (ctx: any, apps: any, url: any, currentAppId?: string) => { +function checkAppUrl( + ctx: BBContext, + apps: App[], + url: string, + currentAppId?: string +) { if (currentAppId) { apps = apps.filter((app: any) => app.appId !== currentAppId) } @@ -105,12 +97,12 @@ const checkAppUrl = (ctx: any, apps: any, url: any, currentAppId?: string) => { } } -const checkAppName = ( - ctx: any, - apps: any, - name: any, +function checkAppName( + ctx: BBContext, + apps: App[], + name: string, currentAppId?: string -) => { +) { // TODO: Replace with Joi if (!name) { ctx.throw(400, "Name is required") @@ -165,14 +157,14 @@ async function createInstance(template: any, includeSampleData: boolean) { return { _id: appId } } -const addDefaultTables = async (db: any) => { +async function addDefaultTables(db: Database) { const defaultDbDocs = buildDefaultDocs() // add in the default db data docs - tables, datasource, rows and links await db.bulkDocs([...defaultDbDocs]) } -export const fetch = async (ctx: any) => { +export async function fetch(ctx: BBContext) { const dev = ctx.query && ctx.query.status === AppStatus.DEV const all = ctx.query && ctx.query.status === AppStatus.ALL const apps = (await dbCore.getAllApps({ dev, all })) as App[] @@ -197,7 +189,7 @@ export const fetch = async (ctx: any) => { ctx.body = await checkAppMetadata(apps) } -export const fetchAppDefinition = async (ctx: any) => { +export async function fetchAppDefinition(ctx: BBContext) { const layouts = await getLayouts() const userRoleId = getUserRoleId(ctx) const accessController = new roles.AccessController() @@ -212,7 +204,7 @@ export const fetchAppDefinition = async (ctx: any) => { } } -export const fetchAppPackage = async (ctx: any) => { +export async function fetchAppPackage(ctx: BBContext) { const db = context.getAppDB() let application = await db.get(DocumentType.APP_METADATA) const layouts = await getLayouts() @@ -222,7 +214,7 @@ export const fetchAppPackage = async (ctx: any) => { application.usedPlugins = enrichPluginURLs(application.usedPlugins) // Only filter screens if the user is not a builder - if (!(ctx.user.builder && ctx.user.builder.global)) { + if (!(ctx.user?.builder && ctx.user.builder.global)) { const userRoleId = getUserRoleId(ctx) const accessController = new roles.AccessController() screens = await accessController.checkScreensAccess(screens, userRoleId) @@ -236,11 +228,11 @@ export const fetchAppPackage = async (ctx: any) => { } } -const performAppCreate = async (ctx: any) => { - const apps = await dbCore.getAllApps({ dev: true }) +async function performAppCreate(ctx: BBContext) { + const apps = (await dbCore.getAllApps({ dev: true })) as App[] const name = ctx.request.body.name checkAppName(ctx, apps, name) - const url = getAppUrl(ctx) + const url = sdk.applications.getAppUrl(ctx) checkAppUrl(ctx, apps, url) const { useTemplate, templateKey, templateString } = ctx.request.body @@ -331,7 +323,7 @@ const performAppCreate = async (ctx: any) => { return newApplication } -const creationEvents = async (request: any, app: App) => { +async function creationEvents(request: any, app: App) { let creationFns: ((app: App) => Promise)[] = [] const body = request.body @@ -356,7 +348,7 @@ const creationEvents = async (request: any, app: App) => { } } -const appPostCreate = async (ctx: any, app: App) => { +async function appPostCreate(ctx: BBContext, app: App) { const tenantId = tenancy.getTenantId() await migrations.backPopulateMigrations({ type: MigrationType.APP, @@ -377,7 +369,7 @@ const appPostCreate = async (ctx: any, app: App) => { if (err.code && err.code === errors.codes.USAGE_LIMIT_EXCEEDED) { // this import resulted in row usage exceeding the quota // delete the app - // skip pre and post steps as no rows have been added to quotas yet + // skip pre- and post-steps as no rows have been added to quotas yet ctx.params.appId = app.appId await destroyApp(ctx) } @@ -387,7 +379,7 @@ const appPostCreate = async (ctx: any, app: App) => { } } -export const create = async (ctx: any) => { +export async function create(ctx: BBContext) { const newApplication = await quotas.addApp(() => performAppCreate(ctx)) await appPostCreate(ctx, newApplication) await cache.bustCache(cache.CacheKey.CHECKLIST) @@ -397,14 +389,14 @@ export const create = async (ctx: any) => { // This endpoint currently operates as a PATCH rather than a PUT // Thus name and url fields are handled only if present -export const update = async (ctx: any) => { - const apps = await dbCore.getAllApps({ dev: true }) +export async function update(ctx: BBContext) { + const apps = (await dbCore.getAllApps({ dev: true })) as App[] // validation const name = ctx.request.body.name if (name) { checkAppName(ctx, apps, name, ctx.params.appId) } - const url = getAppUrl(ctx) + const url = sdk.applications.getAppUrl(ctx) if (url) { checkAppUrl(ctx, apps, url, ctx.params.appId) ctx.request.body.url = url @@ -416,7 +408,7 @@ export const update = async (ctx: any) => { ctx.body = app } -export const updateClient = async (ctx: any) => { +export async function updateClient(ctx: BBContext) { // Get current app version const db = context.getAppDB() const application = await db.get(DocumentType.APP_METADATA) @@ -440,7 +432,7 @@ export const updateClient = async (ctx: any) => { ctx.body = app } -export const revertClient = async (ctx: any) => { +export async function revertClient(ctx: BBContext) { // Check app can be reverted const db = context.getAppDB() const application = await db.get(DocumentType.APP_METADATA) @@ -466,12 +458,14 @@ export const revertClient = async (ctx: any) => { ctx.body = app } -const destroyApp = async (ctx: any) => { +async function destroyApp(ctx: BBContext) { let appId = ctx.params.appId let isUnpublish = ctx.query && ctx.query.unpublish if (isUnpublish) { appId = dbCore.getProdAppID(appId) + // sync before removing the published app + await sdk.applications.syncApp(appId) } const db = isUnpublish ? context.getProdAppDB() : context.getAppDB() @@ -501,12 +495,12 @@ const destroyApp = async (ctx: any) => { return result } -const preDestroyApp = async (ctx: any) => { +async function preDestroyApp(ctx: BBContext) { const { rows } = await getUniqueRows([ctx.params.appId]) ctx.rowCount = rows.length } -const postDestroyApp = async (ctx: any) => { +async function postDestroyApp(ctx: BBContext) { const rowCount = ctx.rowCount await groups.cleanupApp(ctx.params.appId) if (rowCount) { @@ -514,7 +508,7 @@ const postDestroyApp = async (ctx: any) => { } } -export const destroy = async (ctx: any) => { +export async function destroy(ctx: BBContext) { await preDestroyApp(ctx) const result = await destroyApp(ctx) await postDestroyApp(ctx) @@ -522,62 +516,16 @@ export const destroy = async (ctx: any) => { ctx.body = result } -export const sync = async (ctx: any, next: any) => { - if (env.DISABLE_AUTO_PROD_APP_SYNC) { - ctx.status = 200 - ctx.body = { - message: - "App sync disabled. You can reenable with the DISABLE_AUTO_PROD_APP_SYNC environment variable.", - } - return next() - } - +export async function sync(ctx: BBContext) { const appId = ctx.params.appId - if (!dbCore.isDevAppID(appId)) { - ctx.throw(400, "This action cannot be performed for production apps") - } - - // replicate prod to dev - const prodAppId = dbCore.getProdAppID(appId) - - // specific case, want to make sure setup is skipped - const prodDb = context.getProdAppDB({ skip_setup: true }) - const exists = await prodDb.exists() - if (!exists) { - // the database doesn't exist. Don't replicate - ctx.status = 200 - ctx.body = { - message: "App sync not required, app not deployed.", - } - return next() - } - - const replication = new dbCore.Replication({ - source: prodAppId, - target: appId, - }) - let error try { - await replication.replicate(replication.appReplicateOpts()) - } catch (err) { - error = err - } finally { - await replication.close() - } - - // sync the users - await syncGlobalUsers() - - if (error) { - ctx.throw(400, error) - } else { - ctx.body = { - message: "App sync completed successfully.", - } + ctx.body = await sdk.applications.syncApp(appId) + } catch (err: any) { + ctx.throw(err.status || 400, err.message) } } -export const updateAppPackage = async (appPackage: any, appId: any) => { +export async function updateAppPackage(appPackage: any, appId: any) { return context.doInAppContext(appId, async () => { const db = context.getAppDB() const application = await db.get(DocumentType.APP_METADATA) @@ -598,7 +546,7 @@ export const updateAppPackage = async (appPackage: any, appId: any) => { }) } -const migrateAppNavigation = async () => { +async function migrateAppNavigation() { const db = context.getAppDB() const existing: App = await db.get(DocumentType.APP_METADATA) const layouts: Layout[] = await getLayouts() diff --git a/packages/server/src/api/controllers/cloud.ts b/packages/server/src/api/controllers/cloud.ts index 41c21d534a..f8f7a27d00 100644 --- a/packages/server/src/api/controllers/cloud.ts +++ b/packages/server/src/api/controllers/cloud.ts @@ -22,6 +22,7 @@ async function createApp(appName: string, appDirectory: string) { }, }, } + // @ts-ignore return create(ctx) } diff --git a/packages/server/src/migrations/functions/appUrls.ts b/packages/server/src/migrations/functions/appUrls.ts index 4d5ce6c30c..30ce09e188 100644 --- a/packages/server/src/migrations/functions/appUrls.ts +++ b/packages/server/src/migrations/functions/appUrls.ts @@ -1,5 +1,5 @@ import { db as dbCore } from "@budibase/backend-core" -import { getAppUrl } from "../../api/controllers/application" +import sdk from "../../sdk" /** * Date: @@ -27,7 +27,7 @@ export const run = async (appDb: any) => { }, }, } - metadata.url = getAppUrl(context) + metadata.url = sdk.applications.getAppUrl(context) console.log(`Adding url to app: ${metadata.url}`) await appDb.put(metadata) } diff --git a/packages/server/src/sdk/app/applications/general.ts b/packages/server/src/sdk/app/applications/general.ts new file mode 100644 index 0000000000..4de94c1b92 --- /dev/null +++ b/packages/server/src/sdk/app/applications/general.ts @@ -0,0 +1,19 @@ +const URL_REGEX_SLASH = /\/|\\/g + +export function getAppUrl(ctx: { + request: { body: { name?: string; url?: string } } +}) { + // construct the url + let url + if (ctx.request.body.url) { + // if the url is provided, use that + url = encodeURI(ctx.request.body.url) + } else if (ctx.request.body.name) { + // otherwise use the name + url = encodeURI(`${ctx.request.body.name}`) + } + if (url) { + url = `/${url.replace(URL_REGEX_SLASH, "")}`.toLowerCase() + } + return url as string +} diff --git a/packages/server/src/sdk/app/applications/index.ts b/packages/server/src/sdk/app/applications/index.ts new file mode 100644 index 0000000000..17100a08ff --- /dev/null +++ b/packages/server/src/sdk/app/applications/index.ts @@ -0,0 +1,7 @@ +import * as sync from "./sync" +import * as general from "./general" + +export default { + ...sync, + ...general, +} diff --git a/packages/server/src/sdk/app/applications/sync.ts b/packages/server/src/sdk/app/applications/sync.ts new file mode 100644 index 0000000000..71931dde21 --- /dev/null +++ b/packages/server/src/sdk/app/applications/sync.ts @@ -0,0 +1,53 @@ +import env from "../../../environment" +import { syncGlobalUsers } from "../../../api/controllers/user" +import { db as dbCore, context } from "@budibase/backend-core" + +export async function syncApp(appId: string) { + if (env.DISABLE_AUTO_PROD_APP_SYNC) { + return { + message: + "App sync disabled. You can reenable with the DISABLE_AUTO_PROD_APP_SYNC environment variable.", + } + } + + if (!dbCore.isDevAppID(appId)) { + throw new Error("This action cannot be performed for production apps") + } + + // replicate prod to dev + const prodAppId = dbCore.getProdAppID(appId) + + // specific case, want to make sure setup is skipped + const prodDb = context.getProdAppDB({ skip_setup: true }) + const exists = await prodDb.exists() + if (!exists) { + // the database doesn't exist. Don't replicate + return { + message: "App sync not required, app not deployed.", + } + } + + const replication = new dbCore.Replication({ + source: prodAppId, + target: appId, + }) + let error + try { + await replication.replicate(replication.appReplicateOpts()) + } catch (err) { + error = err + } finally { + await replication.close() + } + + // sync the users + await syncGlobalUsers() + + if (error) { + throw error + } else { + return { + message: "App sync completed successfully.", + } + } +} diff --git a/packages/server/src/sdk/index.ts b/packages/server/src/sdk/index.ts index 1f7a365e90..b80ded90fa 100644 --- a/packages/server/src/sdk/index.ts +++ b/packages/server/src/sdk/index.ts @@ -1,15 +1,14 @@ import { default as backups } from "./app/backups" import { default as tables } from "./app/tables" import { default as automations } from "./app/automations" +import { default as applications } from "./app/applications" const sdk = { backups, tables, automations, + applications, } // default export for TS export default sdk - -// default export for JS -module.exports = sdk From 4eadbd1e1d5813e767c1bdb66772f99dfc793f3b Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 5 Dec 2022 18:25:31 +0000 Subject: [PATCH 05/22] v2.1.43-alpha.6 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 8 ++++---- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/sdk/package.json | 2 +- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lerna.json b/lerna.json index 1d8589b8f4..d9de893102 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.1.43-alpha.5", + "version": "2.1.43-alpha.6", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 9544034e8f..f6aa340d0c 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.1.43-alpha.5", + "version": "2.1.43-alpha.6", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "2.1.43-alpha.5", + "@budibase/types": "2.1.43-alpha.6", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 0568fb3085..41304f09d7 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "2.1.43-alpha.5", + "version": "2.1.43-alpha.6", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "2.1.43-alpha.5", + "@budibase/string-templates": "2.1.43-alpha.6", "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/avatar": "^3.0.2", diff --git a/packages/builder/package.json b/packages/builder/package.json index e7cd8f7847..eba71538d8 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.1.43-alpha.5", + "version": "2.1.43-alpha.6", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.1.43-alpha.5", - "@budibase/client": "2.1.43-alpha.5", - "@budibase/frontend-core": "2.1.43-alpha.5", - "@budibase/string-templates": "2.1.43-alpha.5", + "@budibase/bbui": "2.1.43-alpha.6", + "@budibase/client": "2.1.43-alpha.6", + "@budibase/frontend-core": "2.1.43-alpha.6", + "@budibase/string-templates": "2.1.43-alpha.6", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index 8de4028ef5..dbb8747a6b 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.1.43-alpha.5", + "version": "2.1.43-alpha.6", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "2.1.43-alpha.5", - "@budibase/string-templates": "2.1.43-alpha.5", - "@budibase/types": "2.1.43-alpha.5", + "@budibase/backend-core": "2.1.43-alpha.6", + "@budibase/string-templates": "2.1.43-alpha.6", + "@budibase/types": "2.1.43-alpha.6", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index 684cc10653..2aa3c598f1 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.1.43-alpha.5", + "version": "2.1.43-alpha.6", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "2.1.43-alpha.5", - "@budibase/frontend-core": "2.1.43-alpha.5", - "@budibase/string-templates": "2.1.43-alpha.5", + "@budibase/bbui": "2.1.43-alpha.6", + "@budibase/frontend-core": "2.1.43-alpha.6", + "@budibase/string-templates": "2.1.43-alpha.6", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index 80a6d62d8c..18114b3066 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.1.43-alpha.5", + "version": "2.1.43-alpha.6", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.1.43-alpha.5", + "@budibase/bbui": "2.1.43-alpha.6", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 1b8ae72afb..8250399f5c 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.1.43-alpha.5", + "version": "2.1.43-alpha.6", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index 743670ca20..60e5bbbd4e 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.1.43-alpha.5", + "version": "2.1.43-alpha.6", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -43,11 +43,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "2.1.43-alpha.5", - "@budibase/client": "2.1.43-alpha.5", + "@budibase/backend-core": "2.1.43-alpha.6", + "@budibase/client": "2.1.43-alpha.6", "@budibase/pro": "2.1.43-alpha.5", - "@budibase/string-templates": "2.1.43-alpha.5", - "@budibase/types": "2.1.43-alpha.5", + "@budibase/string-templates": "2.1.43-alpha.6", + "@budibase/types": "2.1.43-alpha.6", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index fab30a939c..eba89d57a6 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.1.43-alpha.5", + "version": "2.1.43-alpha.6", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index 13eefee6f6..d07421e840 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.1.43-alpha.5", + "version": "2.1.43-alpha.6", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index 33c1099525..53bdd0c740 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.1.43-alpha.5", + "version": "2.1.43-alpha.6", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.1.43-alpha.5", + "@budibase/backend-core": "2.1.43-alpha.6", "@budibase/pro": "2.1.43-alpha.5", - "@budibase/string-templates": "2.1.43-alpha.5", - "@budibase/types": "2.1.43-alpha.5", + "@budibase/string-templates": "2.1.43-alpha.6", + "@budibase/types": "2.1.43-alpha.6", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 95b332a351854ef8d95cbd20d25677c23df8756e Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 5 Dec 2022 18:29:19 +0000 Subject: [PATCH 06/22] Update pro version to 2.1.43-alpha.6 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index 60e5bbbd4e..8f8d864465 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -45,7 +45,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "2.1.43-alpha.6", "@budibase/client": "2.1.43-alpha.6", - "@budibase/pro": "2.1.43-alpha.5", + "@budibase/pro": "2.1.43-alpha.6", "@budibase/string-templates": "2.1.43-alpha.6", "@budibase/types": "2.1.43-alpha.6", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 02dcaa0b48..3ef6255935 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1273,12 +1273,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.43-alpha.5": - version "2.1.43-alpha.5" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.5.tgz#111b460861f41a16b0003c9fe26837fc34e31851" - integrity sha512-JIP2LQZeqOVtcLWxSdEVIsLX6DwWGxIbHiM6fQFuzjnwY79SRUyKKcT2AJZBkjktvNQpFTReM9vxHJbVwvTSqg== +"@budibase/backend-core@2.1.43-alpha.6": + version "2.1.43-alpha.6" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.6.tgz#26edec27b410061c7c75e77704e3c6d8d2ab0376" + integrity sha512-hYHRky4ByX+y1TJbdZ1dup/eU0/MDRNc5v84GHZFzDBG5ZLafm88xUBkX6hPIV+vgowEq18d/AXPgVJlZYBGRw== dependencies: - "@budibase/types" "2.1.43-alpha.5" + "@budibase/types" "2.1.43-alpha.6" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1360,13 +1360,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.1.43-alpha.5": - version "2.1.43-alpha.5" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.5.tgz#7ba1b2002f701dab665877a9481e51af28efe05e" - integrity sha512-lKcWWquxLkJ+BhWah6zn/OnmstZvwr73HiNkJkUkd5f8plw8by6KMfyfPoyAAivjDuNzF+oOlXVZnX/IbTfCIg== +"@budibase/pro@2.1.43-alpha.6": + version "2.1.43-alpha.6" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.6.tgz#1f178e44e730920eade432db2e5c2a5f04d13331" + integrity sha512-jCCCMnlUbM/A1W/8usO0PDeUHfWMwiT00Jfjaa61gYawGJnCVRE+H+MulbZTIBRwDGnFEh1OwNBT4bc9qIyHhA== dependencies: - "@budibase/backend-core" "2.1.43-alpha.5" - "@budibase/types" "2.1.43-alpha.5" + "@budibase/backend-core" "2.1.43-alpha.6" + "@budibase/types" "2.1.43-alpha.6" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -1390,10 +1390,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.1.43-alpha.5": - version "2.1.43-alpha.5" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.5.tgz#b713dc5b8c9023ba5a0eeb5c781f972444a98a9e" - integrity sha512-7KYhAliJb9lLcFuYA26h2nb2z6WmBEI5d2W5mAwlCD78mtL9G1ofxabbZ/egc+OGMDDa6AAS/7R5zpEgueKyyw== +"@budibase/types@2.1.43-alpha.6": + version "2.1.43-alpha.6" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.6.tgz#27312006021705a07b4e4ef8971f9c6c6689f628" + integrity sha512-XqHZevC7yUBAQcOhWbbr1YG084jX/WMo7b06eeL4bRHrGL815rlVGNTp4ksFi0+K3AZDuIyVrVaU4FLM9UgFUA== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 53bdd0c740..ecbca53a93 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "2.1.43-alpha.6", - "@budibase/pro": "2.1.43-alpha.5", + "@budibase/pro": "2.1.43-alpha.6", "@budibase/string-templates": "2.1.43-alpha.6", "@budibase/types": "2.1.43-alpha.6", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 7a38c64bf9..1d17fb31e8 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -470,12 +470,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.43-alpha.5": - version "2.1.43-alpha.5" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.5.tgz#111b460861f41a16b0003c9fe26837fc34e31851" - integrity sha512-JIP2LQZeqOVtcLWxSdEVIsLX6DwWGxIbHiM6fQFuzjnwY79SRUyKKcT2AJZBkjktvNQpFTReM9vxHJbVwvTSqg== +"@budibase/backend-core@2.1.43-alpha.6": + version "2.1.43-alpha.6" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.6.tgz#26edec27b410061c7c75e77704e3c6d8d2ab0376" + integrity sha512-hYHRky4ByX+y1TJbdZ1dup/eU0/MDRNc5v84GHZFzDBG5ZLafm88xUBkX6hPIV+vgowEq18d/AXPgVJlZYBGRw== dependencies: - "@budibase/types" "2.1.43-alpha.5" + "@budibase/types" "2.1.43-alpha.6" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -507,22 +507,22 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.1.43-alpha.5": - version "2.1.43-alpha.5" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.5.tgz#7ba1b2002f701dab665877a9481e51af28efe05e" - integrity sha512-lKcWWquxLkJ+BhWah6zn/OnmstZvwr73HiNkJkUkd5f8plw8by6KMfyfPoyAAivjDuNzF+oOlXVZnX/IbTfCIg== +"@budibase/pro@2.1.43-alpha.6": + version "2.1.43-alpha.6" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.6.tgz#1f178e44e730920eade432db2e5c2a5f04d13331" + integrity sha512-jCCCMnlUbM/A1W/8usO0PDeUHfWMwiT00Jfjaa61gYawGJnCVRE+H+MulbZTIBRwDGnFEh1OwNBT4bc9qIyHhA== dependencies: - "@budibase/backend-core" "2.1.43-alpha.5" - "@budibase/types" "2.1.43-alpha.5" + "@budibase/backend-core" "2.1.43-alpha.6" + "@budibase/types" "2.1.43-alpha.6" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.1.43-alpha.5": - version "2.1.43-alpha.5" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.5.tgz#b713dc5b8c9023ba5a0eeb5c781f972444a98a9e" - integrity sha512-7KYhAliJb9lLcFuYA26h2nb2z6WmBEI5d2W5mAwlCD78mtL9G1ofxabbZ/egc+OGMDDa6AAS/7R5zpEgueKyyw== +"@budibase/types@2.1.43-alpha.6": + version "2.1.43-alpha.6" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.6.tgz#27312006021705a07b4e4ef8971f9c6c6689f628" + integrity sha512-XqHZevC7yUBAQcOhWbbr1YG084jX/WMo7b06eeL4bRHrGL815rlVGNTp4ksFi0+K3AZDuIyVrVaU4FLM9UgFUA== "@cspotcode/source-map-support@^0.8.0": version "0.8.1" From e56b5cde90392526bb655387025d62d1560fbb1f Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 6 Dec 2022 09:55:25 +0000 Subject: [PATCH 07/22] Hide content when side panel is hidden to avoid stale data being shown when re-revealing side panel --- packages/client/src/components/app/SidePanel.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/client/src/components/app/SidePanel.svelte b/packages/client/src/components/app/SidePanel.svelte index ed4216fa93..8731c7191e 100644 --- a/packages/client/src/components/app/SidePanel.svelte +++ b/packages/client/src/components/app/SidePanel.svelte @@ -57,7 +57,9 @@ class="side-panel" class:open > - + {#if $sidePanelStore.open} + + {/if}