From a6bf8084e7cbd7481e40960b9a4a2aac1a4f70e9 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 24 Aug 2022 21:35:24 +0100 Subject: [PATCH 1/6] Automatically migrate old apps server-side when importing or using templates --- .../src/builderStore/store/frontend.js | 30 ----- .../server/src/api/controllers/application.ts | 113 +++++++++++++++--- packages/server/src/app.ts | 2 +- packages/types/src/documents/app/app.ts | 16 ++- packages/types/src/documents/app/screen.ts | 2 +- packages/types/src/sdk/events/screen.ts | 4 +- 6 files changed, 114 insertions(+), 53 deletions(-) diff --git a/packages/builder/src/builderStore/store/frontend.js b/packages/builder/src/builderStore/store/frontend.js index 58d803aa03..9ad24e2124 100644 --- a/packages/builder/src/builderStore/store/frontend.js +++ b/packages/builder/src/builderStore/store/frontend.js @@ -19,7 +19,6 @@ import { makeComponentUnique, } from "../componentUtils" import { Helpers } from "@budibase/bbui" -import { DefaultAppTheme, LAYOUT_NAMES } from "../../constants" import { Utils } from "@budibase/frontend-core" const INITIAL_FRONTEND_STATE = { @@ -124,35 +123,6 @@ export const getFrontendStore = () => { await integrations.init() await queries.init() await tables.init() - - // Add navigation settings to old apps - if (!application.navigation) { - const layout = layouts.find(x => x._id === LAYOUT_NAMES.MASTER.PRIVATE) - const customTheme = application.customTheme - let navigationSettings = { - navigation: "Top", - title: application.name, - navWidth: "Large", - navBackground: - customTheme?.navBackground || DefaultAppTheme.navBackground, - navTextColor: - customTheme?.navTextColor || DefaultAppTheme.navTextColor, - } - if (layout) { - navigationSettings.hideLogo = layout.props.hideLogo - navigationSettings.hideTitle = layout.props.hideTitle - navigationSettings.title = layout.props.title || application.name - navigationSettings.logoUrl = layout.props.logoUrl - navigationSettings.links = layout.props.links - navigationSettings.navigation = layout.props.navigation || "Top" - navigationSettings.sticky = layout.props.sticky - navigationSettings.navWidth = layout.props.width || "Large" - if (navigationSettings.navigation === "None") { - navigationSettings.navigation = "Top" - } - } - await store.actions.navigation.save(navigationSettings) - } }, theme: { save: async theme => { diff --git a/packages/server/src/api/controllers/application.ts b/packages/server/src/api/controllers/application.ts index ae4a60d78d..0636eded84 100644 --- a/packages/server/src/api/controllers/application.ts +++ b/packages/server/src/api/controllers/application.ts @@ -47,7 +47,14 @@ import { checkAppMetadata } from "../../automations/logging" import { getUniqueRows } from "../../utilities/usageQuota/rows" import { quotas } from "@budibase/pro" import { errors, events, migrations } from "@budibase/backend-core" -import { App, MigrationType } from "@budibase/types" +import { + App, + Layout, + Screen, + MigrationType, + AppNavigation, +} from "@budibase/types" +import { BASE_LAYOUT_PROP_IDS } from "../../constants/layouts" const URL_REGEX_SLASH = /\/|\\/g @@ -243,26 +250,19 @@ const performAppCreate = async (ctx: any) => { } const instance = await createInstance(instanceConfig) const appId = instance._id - const db = context.getAppDB() - let _rev - try { - // if template there will be an existing doc - const existing = await db.get(DocumentType.APP_METADATA) - _rev = existing._rev - } catch (err) { - // nothing to do - } - const newApplication: App = { + + // Create new app doc + let newApplication: App = { _id: DocumentType.APP_METADATA, - _rev, - appId: instance._id, + _rev: undefined, + appId, type: "app", version: packageJson.version, componentLibraries: ["@budibase/standard-components"], name: name, url: url, - template: ctx.request.body.template, + template: templateKey, instance: instance, tenantId: getTenantId(), updatedAt: new Date().toISOString(), @@ -285,6 +285,37 @@ const performAppCreate = async (ctx: any) => { buttonBorderRadius: "16px", }, } + + // If we used a template or imported an app there will be an existing doc. + // Fetch and migrate some metadata from the existing app. + try { + const existing: App = await db.get(DocumentType.APP_METADATA) + const keys: string[] = [ + "_rev", + "navigation", + "theme", + "customTheme", + "icon", + ] + keys.forEach((key: string) => { + // @ts-ignore + if (existing[key]) { + // @ts-ignore + newApplication[key] = existing[key] + } + }) + + // Migrate navigation settings and screens if required + if (existing && !existing.navigation) { + const navigation = await migrateAppNavigation() + if (navigation) { + newApplication.navigation = navigation + } + } + } catch (err) { + // Nothing to do + } + const response = await db.put(newApplication, { force: true }) newApplication._rev = response.rev @@ -567,3 +598,57 @@ const updateAppPackage = async (appPackage: any, appId: any) => { return newAppPackage }) } + +const migrateAppNavigation = async () => { + const db = context.getAppDB() + const existing: App = await db.get(DocumentType.APP_METADATA) + const layouts = await getLayouts() + const screens = await getScreens() + + // Migrate all screens, removing custom layouts + for (let screen of screens) { + if (!screen.layoutId) { + return + } + const layout = layouts.find( + (layout: Layout) => layout._id === screen.layoutId + ) + screen.layoutId = undefined + screen.showNavigation = layout?.props.navigation !== "None" + screen.width = layout?.props.width || "Large" + await db.put(screen) + } + + // Migrate layout navigation settings + const { name, customTheme } = existing + const layout = layouts?.find( + (layout: Layout) => layout._id === BASE_LAYOUT_PROP_IDS.PRIVATE + ) + if (layout) { + let navigationSettings: any = { + navigation: "Top", + title: name, + navWidth: "Large", + navBackground: + customTheme?.navBackground || "var(--spectrum-global-color-gray-50)", + navTextColor: + customTheme?.navTextColor || "var(--spectrum-global-color-gray-800)", + } + if (layout) { + navigationSettings.hideLogo = layout.props.hideLogo + navigationSettings.hideTitle = layout.props.hideTitle + navigationSettings.title = layout.props.title || name + navigationSettings.logoUrl = layout.props.logoUrl + navigationSettings.links = layout.props.links + navigationSettings.navigation = layout.props.navigation || "Top" + navigationSettings.sticky = layout.props.sticky + navigationSettings.navWidth = layout.props.width || "Large" + if (navigationSettings.navigation === "None") { + navigationSettings.navigation = "Top" + } + } + return navigationSettings + } else { + return null + } +} diff --git a/packages/server/src/app.ts b/packages/server/src/app.ts index 62301d57ca..461495ff8c 100644 --- a/packages/server/src/app.ts +++ b/packages/server/src/app.ts @@ -98,7 +98,7 @@ module.exports = server.listen(env.PORT || 0, async () => { // not recommended in a clustered environment if (!env.HTTP_MIGRATIONS && !env.isTest()) { try { - await migrations.migrate() + // await migrations.migrate() } catch (e) { logAlert("Error performing migrations. Exiting.", e) shutdown() diff --git a/packages/types/src/documents/app/app.ts b/packages/types/src/documents/app/app.ts index 1def994697..55eebe389d 100644 --- a/packages/types/src/documents/app/app.ts +++ b/packages/types/src/documents/app/app.ts @@ -14,11 +14,7 @@ export interface App extends Document { tenantId: string status: string theme?: string - customTheme?: { - buttonBorderRadius?: string - primaryColor?: string - primaryColorHover?: string - } + customTheme?: AppCustomTheme revertableVersion?: string navigation?: AppNavigation automationErrors?: AppMetadataErrors @@ -47,3 +43,13 @@ export interface AppNavigationLink { id?: string roleId?: string } + +export interface AppCustomTheme { + buttonBorderRadius?: string + primaryColor?: string + primaryColorHover?: string + + // Used to exist before new design UI + navTextColor?: string + navBackground?: string +} diff --git a/packages/types/src/documents/app/screen.ts b/packages/types/src/documents/app/screen.ts index 1eead16aa0..98db658aa6 100644 --- a/packages/types/src/documents/app/screen.ts +++ b/packages/types/src/documents/app/screen.ts @@ -1,7 +1,7 @@ import { Document } from "../document" export interface Screen extends Document { - layoutId: string + layoutId?: string showNavigation?: boolean width?: string routing: { diff --git a/packages/types/src/sdk/events/screen.ts b/packages/types/src/sdk/events/screen.ts index 0d9f8cb32c..23c468b7ad 100644 --- a/packages/types/src/sdk/events/screen.ts +++ b/packages/types/src/sdk/events/screen.ts @@ -2,12 +2,12 @@ import { BaseEvent } from "./event" export interface ScreenCreatedEvent extends BaseEvent { screenId: string - layoutId: string + layoutId?: string roleId: string } export interface ScreenDeletedEvent extends BaseEvent { screenId: string - layoutId: string + layoutId?: string roleId: string } From 44a191d00d3cd24f3acd5ed780a5168b40b1cbfc Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 25 Aug 2022 08:10:11 +0100 Subject: [PATCH 2/6] Update types --- .../server/src/api/controllers/application.ts | 16 ++++++---------- packages/types/src/documents/app/app.ts | 6 ++++++ packages/types/src/documents/app/layout.ts | 4 +++- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/packages/server/src/api/controllers/application.ts b/packages/server/src/api/controllers/application.ts index 0636eded84..926fe0ec52 100644 --- a/packages/server/src/api/controllers/application.ts +++ b/packages/server/src/api/controllers/application.ts @@ -252,7 +252,6 @@ const performAppCreate = async (ctx: any) => { const appId = instance._id const db = context.getAppDB() - // Create new app doc let newApplication: App = { _id: DocumentType.APP_METADATA, _rev: undefined, @@ -263,7 +262,7 @@ const performAppCreate = async (ctx: any) => { name: name, url: url, template: templateKey, - instance: instance, + instance, tenantId: getTenantId(), updatedAt: new Date().toISOString(), createdAt: new Date().toISOString(), @@ -290,15 +289,14 @@ const performAppCreate = async (ctx: any) => { // Fetch and migrate some metadata from the existing app. try { const existing: App = await db.get(DocumentType.APP_METADATA) - const keys: string[] = [ + const keys: (keyof App)[] = [ "_rev", "navigation", "theme", "customTheme", "icon", ] - keys.forEach((key: string) => { - // @ts-ignore + keys.forEach(key => { if (existing[key]) { // @ts-ignore newApplication[key] = existing[key] @@ -602,17 +600,15 @@ const updateAppPackage = async (appPackage: any, appId: any) => { const migrateAppNavigation = async () => { const db = context.getAppDB() const existing: App = await db.get(DocumentType.APP_METADATA) - const layouts = await getLayouts() - const screens = await getScreens() + const layouts: Layout[] = await getLayouts() + const screens: Screen[] = await getScreens() // Migrate all screens, removing custom layouts for (let screen of screens) { if (!screen.layoutId) { return } - const layout = layouts.find( - (layout: Layout) => layout._id === screen.layoutId - ) + const layout = layouts.find(layout => layout._id === screen.layoutId) screen.layoutId = undefined screen.showNavigation = layout?.props.navigation !== "None" screen.width = layout?.props.width || "Large" diff --git a/packages/types/src/documents/app/app.ts b/packages/types/src/documents/app/app.ts index 55eebe389d..a03875aa50 100644 --- a/packages/types/src/documents/app/app.ts +++ b/packages/types/src/documents/app/app.ts @@ -18,6 +18,7 @@ export interface App extends Document { revertableVersion?: string navigation?: AppNavigation automationErrors?: AppMetadataErrors + icon?: AppIcon } export interface AppInstance { @@ -53,3 +54,8 @@ export interface AppCustomTheme { navTextColor?: string navBackground?: string } + +export interface AppIcon { + name: string + color: string +} diff --git a/packages/types/src/documents/app/layout.ts b/packages/types/src/documents/app/layout.ts index 85ca4b7e94..db046e3d92 100644 --- a/packages/types/src/documents/app/layout.ts +++ b/packages/types/src/documents/app/layout.ts @@ -1,3 +1,5 @@ import { Document } from "../document" -export interface Layout extends Document {} +export interface Layout extends Document { + props: any +} From 5e15922ca40d0ebd1ad10f6f20533ac75c384fc5 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 25 Aug 2022 08:37:52 +0100 Subject: [PATCH 3/6] Remove commented out migrations --- packages/server/src/app.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/app.ts b/packages/server/src/app.ts index 461495ff8c..62301d57ca 100644 --- a/packages/server/src/app.ts +++ b/packages/server/src/app.ts @@ -98,7 +98,7 @@ module.exports = server.listen(env.PORT || 0, async () => { // not recommended in a clustered environment if (!env.HTTP_MIGRATIONS && !env.isTest()) { try { - // await migrations.migrate() + await migrations.migrate() } catch (e) { logAlert("Error performing migrations. Exiting.", e) shutdown() From e6e0fedd7b5bee3877c7fd002518b528f612b362 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 31 Aug 2022 14:27:22 +0100 Subject: [PATCH 4/6] Add test case for migrating navigation settings from old apps --- .../src/api/routes/tests/application.spec.js | 26 +++++++++++++++++++ .../src/api/routes/tests/data/old-app.txt | 3 +++ 2 files changed, 29 insertions(+) create mode 100644 packages/server/src/api/routes/tests/data/old-app.txt diff --git a/packages/server/src/api/routes/tests/application.spec.js b/packages/server/src/api/routes/tests/application.spec.js index 2620547298..dcfc2c6d9b 100644 --- a/packages/server/src/api/routes/tests/application.spec.js +++ b/packages/server/src/api/routes/tests/application.spec.js @@ -17,6 +17,7 @@ const { checkBuilderEndpoint, } = require("./utilities/TestFunctions") const setup = require("./utilities") +const { basicScreen, basicLayout } = setup.structures const { AppStatus } = require("../../../db/utils") const { events } = require("@budibase/backend-core") @@ -81,6 +82,31 @@ describe("/applications", () => { body: { name: "My App" }, }) }) + + it("migrates navigation settings from old apps", async () => { + const res = await request + .post("/api/applications") + .field("name", "Old App") + .field("useTemplate", "true") + .set(config.defaultHeaders()) + .attach("templateFile", "src/api/routes/tests/data/old-app.txt") + .expect("Content-Type", /json/) + .expect(200) + expect(res.body._id).toBeDefined() + expect(res.body.navigation).toBeDefined() + expect(res.body.navigation.hideLogo).toBe(true) + expect(res.body.navigation.title).toBe("Custom Title") + expect(res.body.navigation.hideLogo).toBe(true) + expect(res.body.navigation.navigation).toBe("Left") + expect(res.body.navigation.navBackground).toBe( + "var(--spectrum-global-color-blue-600)" + ) + expect(res.body.navigation.navTextColor).toBe( + "var(--spectrum-global-color-gray-50)" + ) + expect(events.app.created).toBeCalledTimes(1) + expect(events.app.fileImported).toBeCalledTimes(1) + }) }) describe("fetch", () => { diff --git a/packages/server/src/api/routes/tests/data/old-app.txt b/packages/server/src/api/routes/tests/data/old-app.txt new file mode 100644 index 0000000000..42732092e5 --- /dev/null +++ b/packages/server/src/api/routes/tests/data/old-app.txt @@ -0,0 +1,3 @@ +{"version":"1.2.9","db_type":"http","start_time":"2022-08-31T13:18:50.740Z","db_info":{"db_name":"app_dev_default_c45f987cfa274060840878557ff2f547","purge_seq":"0-g1AAAABXeJzLYWBgYMpgTmEQTM4vTc5ISXIwNDLXMwBCwxyQVB4LkGRoAFL_gSArkQGP2kSGpHqIoiwAtOgYRA","update_seq":"28-g1AAAABXeJzLYWBgYMpgTmEQTM4vTc5ISXIwNDLXMwBCwxyQVB4LkGRoAFL_gSArkQ2P2kSGpHqwIrEsALX-GGA","sizes":{"file":233890,"external":5856,"active":19326},"props":{},"doc_del_count":0,"doc_count":7,"disk_format_version":8,"compact_running":false,"cluster":{"q":2,"n":1,"w":1,"r":1},"instance_start_time":"0","host":"http://localhost:10000/db/app_dev_default_c45f987cfa274060840878557ff2f547/","auto_compaction":false,"adapter":"http"}} +{"docs":[{"_id":"_design/database","_rev":"4-afb0361e5ebb6b7e464c6c146ac3f559","views":{"by_link":{"map":"function (doc) {\n // everything in this must remain constant as its going to Pouch, no external variables\n if (doc.type === \"link\") {\n let doc1 = doc.doc1;\n let doc2 = doc.doc2;\n emit([doc1.tableId, doc1.rowId], {\n id: doc2.rowId,\n thisId: doc1.rowId,\n fieldName: doc1.fieldName,\n });\n // if linking to same table can't emit twice\n if (doc1.tableId !== doc2.tableId) {\n emit([doc2.tableId, doc2.rowId], {\n id: doc1.rowId,\n thisId: doc2.rowId,\n fieldName: doc2.fieldName,\n });\n }\n }\n }"},"screen_routes":{"map":"function(doc) {\n if (doc._id.startsWith(\"screen_\")) {\n emit(doc._id, {\n id: doc._id,\n routing: doc.routing,\n })\n }\n }"}},"indexes":{"rows":{"index":"function (doc) {\n function idx(input, prev) {\n for (let key of Object.keys(input)) {\n let idxKey = prev != null ? `${prev}.${key}` : key;\n idxKey = idxKey.replace(/ /g, \"_\");\n if (Array.isArray(input[key])) {\n for (let val of input[key]) {\n if (typeof val !== \"object\") {\n // eslint-disable-next-line no-undef\n index(idxKey, val, { store: true });\n }\n }\n }\n else if (key === \"_id\" || key === \"_rev\" || input[key] == null) {\n continue;\n }\n if (typeof input[key] === \"string\") {\n // eslint-disable-next-line no-undef\n index(idxKey, input[key].toLowerCase(), { store: true });\n }\n else if (typeof input[key] !== \"object\") {\n // eslint-disable-next-line no-undef\n index(idxKey, input[key], { store: true });\n }\n else {\n idx(input[key], idxKey);\n }\n }\n }\n if (doc._id.startsWith(\"ro_\")) {\n // eslint-disable-next-line no-undef\n index(\"default\", doc._id);\n idx(doc);\n }\n }","analyzer":"keyword"}},"_revisions":{"start":4,"ids":["afb0361e5ebb6b7e464c6c146ac3f559","d1eafe2832e6554b5d348e16d6a1b0d3","6e20795c5ba67179b478f0337a585b56","0b24e44a44af45e51e562fd124ce3007"]}},{"_id":"app_metadata","_rev":"8-9c8540f72e647e3ca7108978e862ff17","appId":"app_dev_default_c45f987cfa274060840878557ff2f547","type":"app","version":"1.0.79-alpha.7","componentLibraries":["@budibase/standard-components"],"name":"Old App","url":"/old%20app","instance":{"_id":"app_dev_default_c45f987cfa274060840878557ff2f547"},"tenantId":"default","updatedAt":"2022-08-31T13:18:05.273Z","createdAt":"2022-08-31T13:16:36.639Z","status":"development","customTheme":{"navBackground":"var(--spectrum-global-color-blue-600)","navTextColor":"var(--spectrum-global-color-gray-50)","buttonBorderRadius":"4px","primaryColor":"var(--spectrum-global-color-red-600)"},"_revisions":{"start":8,"ids":["9c8540f72e647e3ca7108978e862ff17","5c86ff8a96e1f3b4505e205f25a92656","75473d58cf92b61dbcdcd74157f9e2e1","ebc34a96a7ad678bae76d7d70880f4de","1c7397be4ef470d66bd0fd4b3fe4a002","89222c47e9d254b4885e1818cd0aac79","66bed1c391eabcea6ad3557d8ede5f27","0f1136445fd7c2cf73bb5cf41aaa19d2"]}},{"_id":"layout_private_master","_rev":"12-fa664c0538f1478b2a3695c8909a04e9","componentLibraries":["@budibase/standard-components"],"title":"Old App","favicon":"./_shared/favicon.png","stylesheets":[],"name":"Navigation Layout","props":{"_id":"4f569166-a4f3-47ea-a09e-6d218c75586f","_instanceName":"Navigation Layout","_component":"@budibase/standard-components/layout","_children":[{"_id":"7fcf11e4-6f5b-4085-8e0d-9f3d44c98967","_component":"@budibase/standard-components/screenslot","_instanceName":"Screen slot","_styles":{"normal":{"flex":"1 1 auto","display":"flex","flex-direction":"column","justify-content":"flex-start","align-items":"stretch"},"hover":{},"active":{},"selected":{}},"_children":[]}],"_styles":{"active":{},"hover":{},"normal":{},"selected":{}},"title":"Custom Title","navigation":"Left","width":"Small","links":[{"text":"Home","url":"/"}],"hideLogo":true,"hideTitle":false},"_revisions":{"start":12,"ids":["fa664c0538f1478b2a3695c8909a04e9","54b4084d5c10369ecd7a3b33d4cb7775","61e5d376e9f00d20d9905bf011680943","f222416fe5bcf0085ceb72bdc94327c1","b6d9abe1caa1a8ffec0b1e8cb7324c4b","85a347b8c8acb5ad4e31929384062e05","a7ce68d677f2fa7e9a0d54b2fb4275bb","83811e8befcdac752cdbe16cd8b33fa0","362cb9ad2c87ef9c92c58c0a41ed69d4","0a3bba6cdc98539abb3a4e98e13ef98a","d964020cc8907b37047bcd2bd1387735","156b45a34bbee17b6a4a97bfaaeb6f90"]}},{"_id":"layout_public_master","_rev":"1-c7d57c9c42e9e8f988d82f0e6cc7d32c","componentLibraries":["@budibase/standard-components"],"title":"Old App","favicon":"./_shared/favicon.png","stylesheets":[],"name":"Empty Layout","props":{"_id":"3723ffa1-f9e0-4c05-8013-98195c788ed6","_instanceName":"Empty Layout","_component":"@budibase/standard-components/layout","_children":[{"_id":"7fcf11e4-6f5b-4085-8e0d-9f3d44c98967","_component":"@budibase/standard-components/screenslot","_instanceName":"Screen slot","_styles":{"normal":{"flex":"1 1 auto","display":"flex","flex-direction":"column","justify-content":"flex-start","align-items":"stretch"},"hover":{},"active":{},"selected":{}},"_children":[]}],"_styles":{"active":{},"hover":{},"normal":{},"selected":{}},"navigation":"None","width":"Large","links":[{"text":"Home","url":"/"}]}},{"_id":"screen_c483ef802772479196a28c8a6eafe6a5","_rev":"1-db29ceb02c9c6c1ade847c8086d28a70","layoutId":"layout_private_master","props":{"_id":"cafd93b74e18b45a49a58c894d7ef29b4","_component":"@budibase/standard-components/container","_styles":{"normal":{},"hover":{},"active":{},"selected":{}},"_children":[],"_instanceName":"Home","direction":"column","hAlign":"stretch","vAlign":"top","size":"grow","gap":"M"},"routing":{"route":"/home","roleId":"BASIC"},"name":"cafd93b74e18b45a49a58c894d7ef29b4","template":"createFromScratch"},{"_id":"ta_users","_rev":"1-30a4344f056c24cf776d5736eb3c7ed5","type":"table","views":{},"name":"Users","schema":{"email":{"type":"string","constraints":{"type":"string","email":true,"length":{"maximum":""},"presence":true},"fieldName":"email","name":"email"},"firstName":{"name":"firstName","fieldName":"firstName","type":"string","constraints":{"type":"string","presence":false}},"lastName":{"name":"lastName","fieldName":"lastName","type":"string","constraints":{"type":"string","presence":false}},"roleId":{"fieldName":"roleId","name":"roleId","type":"options","constraints":{"type":"string","presence":false,"inclusion":["ADMIN","POWER","BASIC","PUBLIC"]}},"status":{"fieldName":"status","name":"status","type":"options","constraints":{"type":"string","presence":false,"inclusion":["active","inactive"]}}},"primaryDisplay":"email"}]} +{"seq":"28-g1AAAACbeJzLYWBgYMpgTmEQTM4vTc5ISXIwNDLXMwBCwxyQVCJDUv3___-zMpgTxXKBAuxJiZYGxgZG2DTgMSaPBUgyNACp_1DT2MCmGRmZWBglG2PTlwUAEaUn-w"} From e3d53981131485caab5652565b335a445f0b33c2 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 31 Aug 2022 14:39:18 +0000 Subject: [PATCH 5/6] v1.2.58-alpha.4 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 4 ++-- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 11 files changed, 29 insertions(+), 29 deletions(-) diff --git a/lerna.json b/lerna.json index 9a15d5c726..1488c8a8d0 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.2.58-alpha.3", + "version": "1.2.58-alpha.4", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index fab8358321..fd12de23f1 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.2.58-alpha.3", + "version": "1.2.58-alpha.4", "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": "1.2.58-alpha.3", + "@budibase/types": "1.2.58-alpha.4", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", "bcrypt": "5.0.1", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index cb3d78c36f..e8636699c2 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": "1.2.58-alpha.3", + "version": "1.2.58-alpha.4", "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": "1.2.58-alpha.3", + "@budibase/string-templates": "1.2.58-alpha.4", "@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 21a63d4bbc..3f327d4703 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.2.58-alpha.3", + "version": "1.2.58-alpha.4", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "1.2.58-alpha.3", - "@budibase/client": "1.2.58-alpha.3", - "@budibase/frontend-core": "1.2.58-alpha.3", - "@budibase/string-templates": "1.2.58-alpha.3", + "@budibase/bbui": "1.2.58-alpha.4", + "@budibase/client": "1.2.58-alpha.4", + "@budibase/frontend-core": "1.2.58-alpha.4", + "@budibase/string-templates": "1.2.58-alpha.4", "@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 e6b68483be..81adbe2a92 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.2.58-alpha.3", + "version": "1.2.58-alpha.4", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,7 +26,7 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "1.2.58-alpha.3", + "@budibase/backend-core": "1.2.58-alpha.4", "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 e436268944..b66d0b3dac 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.2.58-alpha.3", + "version": "1.2.58-alpha.4", "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": "1.2.58-alpha.3", - "@budibase/frontend-core": "1.2.58-alpha.3", - "@budibase/string-templates": "1.2.58-alpha.3", + "@budibase/bbui": "1.2.58-alpha.4", + "@budibase/frontend-core": "1.2.58-alpha.4", + "@budibase/string-templates": "1.2.58-alpha.4", "@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 9843f16bd3..1ccc947edf 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.2.58-alpha.3", + "version": "1.2.58-alpha.4", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "1.2.58-alpha.3", + "@budibase/bbui": "1.2.58-alpha.4", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 784637d241..4f02fd9ef8 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "1.2.58-alpha.3", + "version": "1.2.58-alpha.4", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -77,11 +77,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "1.2.58-alpha.3", - "@budibase/client": "1.2.58-alpha.3", + "@budibase/backend-core": "1.2.58-alpha.4", + "@budibase/client": "1.2.58-alpha.4", "@budibase/pro": "1.2.58-alpha.3", - "@budibase/string-templates": "1.2.58-alpha.3", - "@budibase/types": "1.2.58-alpha.3", + "@budibase/string-templates": "1.2.58-alpha.4", + "@budibase/types": "1.2.58-alpha.4", "@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 4c7b096c40..a893918e99 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.2.58-alpha.3", + "version": "1.2.58-alpha.4", "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 7e5e88bd20..7452b30a14 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.2.58-alpha.3", + "version": "1.2.58-alpha.4", "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 0b760fc4e2..c1b6faea0c 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "1.2.58-alpha.3", + "version": "1.2.58-alpha.4", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -35,10 +35,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "1.2.58-alpha.3", + "@budibase/backend-core": "1.2.58-alpha.4", "@budibase/pro": "1.2.58-alpha.3", - "@budibase/string-templates": "1.2.58-alpha.3", - "@budibase/types": "1.2.58-alpha.3", + "@budibase/string-templates": "1.2.58-alpha.4", + "@budibase/types": "1.2.58-alpha.4", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 186015ca7c9d8f8e0edd4943f989ddbe67003848 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 31 Aug 2022 14:42:54 +0000 Subject: [PATCH 6/6] Update pro version to 1.2.58-alpha.4 --- 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 4f02fd9ef8..72c6641a51 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "1.2.58-alpha.4", "@budibase/client": "1.2.58-alpha.4", - "@budibase/pro": "1.2.58-alpha.3", + "@budibase/pro": "1.2.58-alpha.4", "@budibase/string-templates": "1.2.58-alpha.4", "@budibase/types": "1.2.58-alpha.4", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index c84d3e3929..d98f3c4cff 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1094,12 +1094,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.2.58-alpha.3": - version "1.2.58-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.58-alpha.3.tgz#705986aaf2d97d15fab64ded044d30530773b541" - integrity sha512-yliV7eLHgjprjYdLhB2Tk/0ibEk5O17Mez5Nn5AqySAwsz+LwfHquaJZ8gT6uoRmgdMVLiEipBmO7cd+XQpR5A== +"@budibase/backend-core@1.2.58-alpha.4": + version "1.2.58-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.58-alpha.4.tgz#3c45ab2161b8da445edcbee009b4a80ee4da9dad" + integrity sha512-gLNxqy44PoSZWxsuJeOYxkwsDPKO0Xz5Iuz0ZNiKRDgIw0A5AavqregwmuVUHIRiWes08RY4lFjOSdozQtI15A== dependencies: - "@budibase/types" "1.2.58-alpha.3" + "@budibase/types" "1.2.58-alpha.4" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -1178,13 +1178,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.2.58-alpha.3": - version "1.2.58-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.58-alpha.3.tgz#ae905b19db0284265a6089c4a420f89e8e5e352e" - integrity sha512-jyhv5LdP28nnuKkjoHCAfowo/gYM2Bs9gRHXVpaH2+dfZP0+0jsSHekUoE/gBDpsslCcDoh/XuqriCyvIfG7Dw== +"@budibase/pro@1.2.58-alpha.4": + version "1.2.58-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.58-alpha.4.tgz#08c1d7c08522986c7a94f8e532374d7c39a83297" + integrity sha512-Byvg/sXW9ZwAxd31Ps1ObG/D3vwtttPWr4e55O5ci7XBHDF0soenjwQlNT5FeW8T3RqMORCDUA4jqX6OMpzF0w== dependencies: - "@budibase/backend-core" "1.2.58-alpha.3" - "@budibase/types" "1.2.58-alpha.3" + "@budibase/backend-core" "1.2.58-alpha.4" + "@budibase/types" "1.2.58-alpha.4" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1207,10 +1207,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.2.58-alpha.3": - version "1.2.58-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.58-alpha.3.tgz#0a96a949b8b989723abf768e3494fe2040d3b543" - integrity sha512-jRC1zTxLi4ozEIlzRMyo1+L+WkKyU2r8m1W7FRhvUQn4+Alk4ynB6TUaSfWavDOvtg4hWg5TVzJfpVOfVjeg5w== +"@budibase/types@1.2.58-alpha.4": + version "1.2.58-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.58-alpha.4.tgz#21695d674f23f032311fb441d6a4e156b5008e0f" + integrity sha512-OsJ6neUWhjok5480M2usOoYX1s3VyAnB+5N0E0Enb4N4XG/oVRbQQbxSlPFwrmTRpIXxgW/DufL52rVGCw8wcg== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index c1b6faea0c..fcb452dd0e 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -36,7 +36,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "1.2.58-alpha.4", - "@budibase/pro": "1.2.58-alpha.3", + "@budibase/pro": "1.2.58-alpha.4", "@budibase/string-templates": "1.2.58-alpha.4", "@budibase/types": "1.2.58-alpha.4", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index cde14ca3a2..78004ddb63 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -291,12 +291,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.2.58-alpha.3": - version "1.2.58-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.58-alpha.3.tgz#705986aaf2d97d15fab64ded044d30530773b541" - integrity sha512-yliV7eLHgjprjYdLhB2Tk/0ibEk5O17Mez5Nn5AqySAwsz+LwfHquaJZ8gT6uoRmgdMVLiEipBmO7cd+XQpR5A== +"@budibase/backend-core@1.2.58-alpha.4": + version "1.2.58-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.58-alpha.4.tgz#3c45ab2161b8da445edcbee009b4a80ee4da9dad" + integrity sha512-gLNxqy44PoSZWxsuJeOYxkwsDPKO0Xz5Iuz0ZNiKRDgIw0A5AavqregwmuVUHIRiWes08RY4lFjOSdozQtI15A== dependencies: - "@budibase/types" "1.2.58-alpha.3" + "@budibase/types" "1.2.58-alpha.4" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -325,21 +325,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.2.58-alpha.3": - version "1.2.58-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.58-alpha.3.tgz#ae905b19db0284265a6089c4a420f89e8e5e352e" - integrity sha512-jyhv5LdP28nnuKkjoHCAfowo/gYM2Bs9gRHXVpaH2+dfZP0+0jsSHekUoE/gBDpsslCcDoh/XuqriCyvIfG7Dw== +"@budibase/pro@1.2.58-alpha.4": + version "1.2.58-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.58-alpha.4.tgz#08c1d7c08522986c7a94f8e532374d7c39a83297" + integrity sha512-Byvg/sXW9ZwAxd31Ps1ObG/D3vwtttPWr4e55O5ci7XBHDF0soenjwQlNT5FeW8T3RqMORCDUA4jqX6OMpzF0w== dependencies: - "@budibase/backend-core" "1.2.58-alpha.3" - "@budibase/types" "1.2.58-alpha.3" + "@budibase/backend-core" "1.2.58-alpha.4" + "@budibase/types" "1.2.58-alpha.4" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.2.58-alpha.3": - version "1.2.58-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.58-alpha.3.tgz#0a96a949b8b989723abf768e3494fe2040d3b543" - integrity sha512-jRC1zTxLi4ozEIlzRMyo1+L+WkKyU2r8m1W7FRhvUQn4+Alk4ynB6TUaSfWavDOvtg4hWg5TVzJfpVOfVjeg5w== +"@budibase/types@1.2.58-alpha.4": + version "1.2.58-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.58-alpha.4.tgz#21695d674f23f032311fb441d6a4e156b5008e0f" + integrity sha512-OsJ6neUWhjok5480M2usOoYX1s3VyAnB+5N0E0Enb4N4XG/oVRbQQbxSlPFwrmTRpIXxgW/DufL52rVGCw8wcg== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0"