From d08d9d12488fe4b48822b59cef1626e4f2470bfa Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 1 Apr 2022 12:51:23 +0100 Subject: [PATCH 001/143] Add form block and form block plus components --- .../queryLevelTransformers.spec.js | 1 - .../builder/src/builderStore/dataBinding.js | 36 +-- .../design/AppPreview/componentStructure.json | 31 +-- .../ScreenDropdownMenu.svelte | 1 - .../ButtonActionDrawer.svelte | 2 + .../ButtonActionEditor.svelte | 2 + .../ButtonActionEditor/actions/SaveRow.svelte | 4 +- .../PropertyControls/PropertyControl.svelte | 1 + .../PropertyControls/TableSelect.svelte | 42 +-- packages/client/manifest.json | 250 ++++++++++++++++++ .../components/app/blocks/FormBlock.svelte | 132 +++++++++ .../app/blocks/FormBlockPlus.svelte | 199 ++++++++++++++ .../client/src/components/app/blocks/index.js | 2 + .../src/components/app/charts/BarChart.svelte | 1 - .../src/components/app/forms/Form.svelte | 31 +-- packages/client/src/stores/screens.js | 1 - packages/client/src/utils/schema.js | 14 +- packages/frontend-core/src/api/attachments.js | 1 - 18 files changed, 654 insertions(+), 97 deletions(-) create mode 100644 packages/client/src/components/app/blocks/FormBlock.svelte create mode 100644 packages/client/src/components/app/blocks/FormBlockPlus.svelte diff --git a/packages/builder/cypress/integration/queryLevelTransformers.spec.js b/packages/builder/cypress/integration/queryLevelTransformers.spec.js index 86aea8eafb..f1678655f4 100644 --- a/packages/builder/cypress/integration/queryLevelTransformers.spec.js +++ b/packages/builder/cypress/integration/queryLevelTransformers.spec.js @@ -47,7 +47,6 @@ filterTests(["smoke", "all"], () => { cy.readFile( "cypress/support/queryLevelTransformerFunctionWithData.js" ).then(transformerFunction => { - //console.log(transformerFunction[1]) cy.get(".CodeMirror textarea") // Highlight current text and overwrite with file contents .type(Cypress.platform === "darwin" ? "{cmd}a" : "{ctrl}a", { diff --git a/packages/builder/src/builderStore/dataBinding.js b/packages/builder/src/builderStore/dataBinding.js index c8b4ae8de9..cd4b9d4187 100644 --- a/packages/builder/src/builderStore/dataBinding.js +++ b/packages/builder/src/builderStore/dataBinding.js @@ -65,7 +65,12 @@ export const getComponentBindableProperties = (asset, componentId) => { /** * Gets all data provider components above a component. */ -export const getContextProviderComponents = (asset, componentId, type) => { +export const getContextProviderComponents = ( + asset, + componentId, + type, + options = { includeSelf: false } +) => { if (!asset || !componentId) { return [] } @@ -73,7 +78,9 @@ export const getContextProviderComponents = (asset, componentId, type) => { // Get the component tree leading up to this component, ignoring the component // itself const path = findComponentPath(asset.props, componentId) - path.pop() + if (!options?.includeSelf) { + path.pop() + } // Filter by only data provider components return path.filter(component => { @@ -138,19 +145,7 @@ export const getDatasourceForProvider = (asset, component) => { if (!datasourceSetting) { return null } - - // There are different types of setting which can be a datasource, for - // example an actual datasource object, or a table ID string. - // Convert the datasource setting into a proper datasource object so that - // we can use it properly - if (datasourceSetting.type === "table") { - return { - tableId: component[datasourceSetting?.key], - type: "table", - } - } else { - return component[datasourceSetting?.key] - } + return component[datasourceSetting?.key] } /** @@ -643,6 +638,17 @@ const buildFormSchema = component => { if (!component) { return schema } + + // If this is a form block, simply use the fields setting + if (component._component.endsWith("formblock")) { + let schema = {} + component.fields?.forEach(field => { + schema[field] = { type: "string" } + }) + return schema + } + + // Otherwise find all field component children const settings = getComponentSettings(component._component) const fieldSetting = settings.find( setting => setting.key === "field" && setting.type.startsWith("field/") diff --git a/packages/builder/src/components/design/AppPreview/componentStructure.json b/packages/builder/src/components/design/AppPreview/componentStructure.json index 6873ae547d..b49e546f32 100644 --- a/packages/builder/src/components/design/AppPreview/componentStructure.json +++ b/packages/builder/src/components/design/AppPreview/componentStructure.json @@ -5,26 +5,20 @@ "children": [ "tableblock", "cardsblock", - "repeaterblock" + "repeaterblock", + "formblock", + "formblockplus" ] }, { "name": "Layout", "icon": "ClassicGridView", - "children": [ - "container", - "section" - ] + "children": ["container", "section"] }, { "name": "Data", "icon": "Data", - "children": [ - "dataprovider", - "repeater", - "table", - "dynamicfilter" - ] + "children": ["dataprovider", "repeater", "table", "dynamicfilter"] }, { "name": "Form", @@ -51,22 +45,12 @@ { "name": "Card", "icon": "Card", - "children": [ - "spectrumcard", - "cardstat" - ] + "children": ["spectrumcard", "cardstat"] }, { "name": "Chart", "icon": "GraphBarVertical", - "children": [ - "bar", - "line", - "area", - "pie", - "donut", - "candlestick" - ] + "children": ["bar", "line", "area", "pie", "donut", "candlestick"] }, { "name": "Elements", @@ -87,4 +71,3 @@ ] } ] - diff --git a/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/ScreenDropdownMenu.svelte b/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/ScreenDropdownMenu.svelte index 76bb48a26c..08b9f9996d 100644 --- a/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/ScreenDropdownMenu.svelte +++ b/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/ScreenDropdownMenu.svelte @@ -49,7 +49,6 @@ } } catch (error) { notifications.error("Error duplicating screen") - console.log(error) } } diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ButtonActionEditor/ButtonActionDrawer.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ButtonActionEditor/ButtonActionDrawer.svelte index 5b0ab4a6a3..24283ed2fe 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ButtonActionEditor/ButtonActionDrawer.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ButtonActionEditor/ButtonActionDrawer.svelte @@ -21,6 +21,7 @@ export let key export let actions export let bindings = [] + export let nested let selectedAction = actions?.length ? actions[0] : null @@ -137,6 +138,7 @@ this={selectedActionComponent} parameters={selectedAction.parameters} bindings={allBindings} + {nested} /> {/key} diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ButtonActionEditor/ButtonActionEditor.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ButtonActionEditor/ButtonActionEditor.svelte index 550d982013..af198d169e 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ButtonActionEditor/ButtonActionEditor.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ButtonActionEditor/ButtonActionEditor.svelte @@ -12,6 +12,7 @@ export let value = [] export let name export let bindings + export let nested let drawer let tmpValue @@ -83,5 +84,6 @@ eventType={name} {bindings} {key} + {nested} /> diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ButtonActionEditor/actions/SaveRow.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ButtonActionEditor/actions/SaveRow.svelte index c88b301fc9..bc5e6a7be7 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ButtonActionEditor/actions/SaveRow.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ButtonActionEditor/actions/SaveRow.svelte @@ -10,11 +10,13 @@ export let parameters export let bindings = [] + export let nested $: formComponents = getContextProviderComponents( $currentAsset, $store.selectedComponentId, - "form" + "form", + { includeSelf: nested } ) $: schemaComponents = getContextProviderComponents( $currentAsset, diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/PropertyControl.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/PropertyControl.svelte index 617b1c83ab..e5889fbf23 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/PropertyControl.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/PropertyControl.svelte @@ -79,6 +79,7 @@ bindings={allBindings} name={key} text={label} + {nested} {key} {type} {...props} diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/TableSelect.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/TableSelect.svelte index b41098da2d..384bbe1e3a 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/TableSelect.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/TableSelect.svelte @@ -1,26 +1,28 @@ -
- -
- - + role._id} getOptionLabel={role => role.name} disabled={builtInRoles.includes(selectedRole.name)} @@ -139,7 +140,7 @@ /> {/if}
- {#if !isCreating} + {#if !isCreating && !builtInRoles.includes(selectedRole.name)} {/if}
From 49117d859583edeba9b923ed9a74fd379303a8a1 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Thu, 6 Oct 2022 18:23:02 +0100 Subject: [PATCH 100/143] Fix inherits role options --- .../src/components/backend/DataTable/modals/EditRoles.svelte | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/modals/EditRoles.svelte b/packages/builder/src/components/backend/DataTable/modals/EditRoles.svelte index c2e3db497a..881d9dda7c 100644 --- a/packages/builder/src/components/backend/DataTable/modals/EditRoles.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/EditRoles.svelte @@ -37,7 +37,6 @@ const id = event?.detail const role = $roles.find(role => role._id === id) if (role) { - console.log("INH ", role.inherits) selectedRole = { ...role, inherits: role.inherits ?? "", @@ -125,7 +124,7 @@ x._id} getOptionLabel={x => x.name} - disabled={builtInRoles.includes(selectedRole.name)} + disabled={shouldDisableRoleInput} /> {/if}
From ea029291309b5df1bc4284b6af0c22022a8ab74e Mon Sep 17 00:00:00 2001 From: Pedro Silva Date: Fri, 7 Oct 2022 12:19:00 +0100 Subject: [PATCH 102/143] Add tests for endpoints --- .../TestConfiguration/applications.ts | 8 ++- .../internal-api/applications/create.spec.ts | 67 +++++++++++++++++++ 2 files changed, 74 insertions(+), 1 deletion(-) diff --git a/qa-core/src/config/internal-api/TestConfiguration/applications.ts b/qa-core/src/config/internal-api/TestConfiguration/applications.ts index 82b85372c6..3b577abf5e 100644 --- a/qa-core/src/config/internal-api/TestConfiguration/applications.ts +++ b/qa-core/src/config/internal-api/TestConfiguration/applications.ts @@ -53,7 +53,7 @@ export default class AppApi { return [response, json] } - async update(appId: string, body: any): Promise<[Response, Application]> { + async updateClient(appId: string, body: any): Promise<[Response, Application]> { const response = await this.api.put(`/applications/${appId}/client/update`, { body }) const json = await response.json() return [response, json] @@ -77,5 +77,11 @@ export default class AppApi { return [response, json] } + async update(appId: string, body: any): Promise<[Response, Application]> { + const response = await this.api.put(`/applications/${appId}`, { body }) + const json = await response.json() + return [response, json] + } + } diff --git a/qa-core/src/tests/internal-api/applications/create.spec.ts b/qa-core/src/tests/internal-api/applications/create.spec.ts index 2c934e0bd7..b447a95459 100644 --- a/qa-core/src/tests/internal-api/applications/create.spec.ts +++ b/qa-core/src/tests/internal-api/applications/create.spec.ts @@ -84,4 +84,71 @@ describe("Internal API - /applications endpoints", () => { await config.applications.canRender() expect(publishedAppRenders).toBe(true) }) + + it("POST - Sync application before deployment", async () => { + const [response, app] = await config.applications.create(generateApp()) + expect(response).toHaveStatusCode(200) + expect(app.appId).toBeDefined() + config.applications.api.appId = app.appId + + const [syncResponse, sync] = await config.applications.sync(app.appId ? app.appId : "") + expect(syncResponse).toHaveStatusCode(200) + expect(sync).toEqual({ + message: "App sync not required, app not deployed." + }) + }) + + it("POST - Sync application after deployment", async () => { + const [response, app] = await config.applications.create(generateApp()) + expect(response).toHaveStatusCode(200) + expect(app.appId).toBeDefined() + config.applications.api.appId = app.appId + + // publish app + await config.applications.publish() + + const [syncResponse, sync] = await config.applications.sync(app.appId ? app.appId : "") + expect(syncResponse).toHaveStatusCode(200) + expect(sync).toEqual({ + message: "App sync completed successfully." + }) + }) + + it("PUT - Update an application", async () => { + const [response, app] = await config.applications.create(generateApp()) + expect(response).toHaveStatusCode(200) + expect(app.appId).toBeDefined() + + }) + + + it.skip("POST - Revert Changes", async () => { + const [response, app] = await config.applications.create(generateApp()) + expect(response).toHaveStatusCode(200) + expect(app.appId).toBeDefined() + + // publish app + await config.applications.publish() + + const [updateResponse, updatedApp] = await config.applications.update(app.appId ? app.appId : "", { + name: generator.word(), + }) + expect(updateResponse).toHaveStatusCode(200) + expect(updatedApp.name).not.toEqual(app.name) + + const [revertResponse, revert] = await config.applications.revert(app.appId ? app.appId : "") + expect(revertResponse).toHaveStatusCode(200) + expect(revert).toEqual({ + message: "App reverted successfully." + }) + }) + + it("DELETE - Delete an application", async () => { + const [response, app] = await config.applications.create(generateApp()) + expect(response).toHaveStatusCode(200) + expect(app.appId).toBeDefined() + + const [deleteResponse] = await config.applications.delete(app.appId ? app.appId : "") + expect(deleteResponse).toHaveStatusCode(200) + }) }) From c2eaffcd395fa9502bafac2406152830723f0a0f Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Fri, 7 Oct 2022 11:56:02 +0000 Subject: [PATCH 103/143] v2.0.24-alpha.1 --- 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 a8276de8cc..b1f0e1c5c2 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.0.24-alpha.0", + "version": "2.0.24-alpha.1", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 90b645ff2c..38c8945ba6 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.0.24-alpha.0", + "version": "2.0.24-alpha.1", "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.0.24-alpha.0", + "@budibase/types": "2.0.24-alpha.1", "@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 803396fb35..9e756cab5e 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.0.24-alpha.0", + "version": "2.0.24-alpha.1", "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.0.24-alpha.0", + "@budibase/string-templates": "2.0.24-alpha.1", "@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 687b571b66..93b9ad4e54 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.0.24-alpha.0", + "version": "2.0.24-alpha.1", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.0.24-alpha.0", - "@budibase/client": "2.0.24-alpha.0", - "@budibase/frontend-core": "2.0.24-alpha.0", - "@budibase/string-templates": "2.0.24-alpha.0", + "@budibase/bbui": "2.0.24-alpha.1", + "@budibase/client": "2.0.24-alpha.1", + "@budibase/frontend-core": "2.0.24-alpha.1", + "@budibase/string-templates": "2.0.24-alpha.1", "@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 0d99b165f6..e02d7d93f9 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.0.24-alpha.0", + "version": "2.0.24-alpha.1", "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.0.24-alpha.0", - "@budibase/string-templates": "2.0.24-alpha.0", - "@budibase/types": "2.0.24-alpha.0", + "@budibase/backend-core": "2.0.24-alpha.1", + "@budibase/string-templates": "2.0.24-alpha.1", + "@budibase/types": "2.0.24-alpha.1", "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 7f662c557e..275d12fd02 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.0.24-alpha.0", + "version": "2.0.24-alpha.1", "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.0.24-alpha.0", - "@budibase/frontend-core": "2.0.24-alpha.0", - "@budibase/string-templates": "2.0.24-alpha.0", + "@budibase/bbui": "2.0.24-alpha.1", + "@budibase/frontend-core": "2.0.24-alpha.1", + "@budibase/string-templates": "2.0.24-alpha.1", "@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 4f1d618840..1d02eed1a8 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.0.24-alpha.0", + "version": "2.0.24-alpha.1", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.0.24-alpha.0", + "@budibase/bbui": "2.0.24-alpha.1", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 403fcf7cf5..629d1b36c3 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.0.24-alpha.0", + "version": "2.0.24-alpha.1", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index c55f7a8d60..e8b94831f1 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.0.24-alpha.0", + "version": "2.0.24-alpha.1", "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": "2.0.24-alpha.0", - "@budibase/client": "2.0.24-alpha.0", + "@budibase/backend-core": "2.0.24-alpha.1", + "@budibase/client": "2.0.24-alpha.1", "@budibase/pro": "2.0.24-alpha.0", - "@budibase/string-templates": "2.0.24-alpha.0", - "@budibase/types": "2.0.24-alpha.0", + "@budibase/string-templates": "2.0.24-alpha.1", + "@budibase/types": "2.0.24-alpha.1", "@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 d08b74c36e..b9405226e6 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.0.24-alpha.0", + "version": "2.0.24-alpha.1", "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 4f416ccf6c..671125bfcf 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.0.24-alpha.0", + "version": "2.0.24-alpha.1", "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 61a4379f1b..d824b76f96 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.0.24-alpha.0", + "version": "2.0.24-alpha.1", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.0.24-alpha.0", + "@budibase/backend-core": "2.0.24-alpha.1", "@budibase/pro": "2.0.24-alpha.0", - "@budibase/string-templates": "2.0.24-alpha.0", - "@budibase/types": "2.0.24-alpha.0", + "@budibase/string-templates": "2.0.24-alpha.1", + "@budibase/types": "2.0.24-alpha.1", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 58e5ec9132c17a129eb4b3bf1f56877855814c3e Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Fri, 7 Oct 2022 11:59:11 +0000 Subject: [PATCH 104/143] Update pro version to 2.0.24-alpha.1 --- 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 e8b94831f1..21567407cb 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "2.0.24-alpha.1", "@budibase/client": "2.0.24-alpha.1", - "@budibase/pro": "2.0.24-alpha.0", + "@budibase/pro": "2.0.24-alpha.1", "@budibase/string-templates": "2.0.24-alpha.1", "@budibase/types": "2.0.24-alpha.1", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index b4adc8125d..6373c5817a 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@2.0.24-alpha.0": - version "2.0.24-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.24-alpha.0.tgz#db53e562cd40aa21783f6f4d6eaf880ec8225a8f" - integrity sha512-o8Ooa5Ga3hcbovoO+Fjyp++TcJmt8v83Y7GfurLznjAc5lakdEe8RWKR9JV7xqenXpZ49ZwWYTSOLwxFBiJuvw== +"@budibase/backend-core@2.0.24-alpha.1": + version "2.0.24-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.24-alpha.1.tgz#2addbdcdd4541c6af7cd4c6654c192f1226c94b5" + integrity sha512-ozZjEF3xC24CDHzvmp/m5ItspxNzNV8kyn3pKoChNZ/e24Pcr1swFDetGDTCYlbDT17RSCwBz5JwZNynOPd38A== dependencies: - "@budibase/types" "2.0.24-alpha.0" + "@budibase/types" "2.0.24-alpha.1" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1180,13 +1180,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.0.24-alpha.0": - version "2.0.24-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.24-alpha.0.tgz#c7c70f431d9d17603d965b353dbb7c4956b6f7a0" - integrity sha512-bp+m9mXEonvxiLo4s9Gt4vhHuVrderFB4vfCISMRcIpZTo/CPVkMTOEM7C4liZyXOiLB9hh4Y+vQY1T6ilIr3Q== +"@budibase/pro@2.0.24-alpha.1": + version "2.0.24-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.24-alpha.1.tgz#0a5ecf6f2975093c79b601c337031252bccaa181" + integrity sha512-b8bVgK3fcdkfODYNXXtVzx6CAvvKyf3849uz1KRYtrXBax3QPc4IKXeFLkFgfA3QRA+E2RQqdrvvtVA30QtlUw== dependencies: - "@budibase/backend-core" "2.0.24-alpha.0" - "@budibase/types" "2.0.24-alpha.0" + "@budibase/backend-core" "2.0.24-alpha.1" + "@budibase/types" "2.0.24-alpha.1" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1209,10 +1209,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.0.24-alpha.0": - version "2.0.24-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.24-alpha.0.tgz#d5ff01dc4a6f1d584077b1808c0a6c8cffbd1eea" - integrity sha512-eiTumTQp6d9+bizhImqK+OJ4g4b9IuUTCOdNp7K2rwu0v94xxLuQEtJUA5MKiqClx7Uu27IlybeQmP+oM99gTg== +"@budibase/types@2.0.24-alpha.1": + version "2.0.24-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.24-alpha.1.tgz#a3feac016886c1a7d040800fb0c3de19d16e5e4d" + integrity sha512-ublIyVrdDrOUGybv+H90pf9faq5d8MxFcGDjrwHfWYTogTuQKvBJsXL7IctP2oVy4n3ugVeGHsh/KH+dvcwpDg== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index d824b76f96..c83ab2e038 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "2.0.24-alpha.1", - "@budibase/pro": "2.0.24-alpha.0", + "@budibase/pro": "2.0.24-alpha.1", "@budibase/string-templates": "2.0.24-alpha.1", "@budibase/types": "2.0.24-alpha.1", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 6dbb1e9cd1..5339c1abc3 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@2.0.24-alpha.0": - version "2.0.24-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.24-alpha.0.tgz#db53e562cd40aa21783f6f4d6eaf880ec8225a8f" - integrity sha512-o8Ooa5Ga3hcbovoO+Fjyp++TcJmt8v83Y7GfurLznjAc5lakdEe8RWKR9JV7xqenXpZ49ZwWYTSOLwxFBiJuvw== +"@budibase/backend-core@2.0.24-alpha.1": + version "2.0.24-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.24-alpha.1.tgz#2addbdcdd4541c6af7cd4c6654c192f1226c94b5" + integrity sha512-ozZjEF3xC24CDHzvmp/m5ItspxNzNV8kyn3pKoChNZ/e24Pcr1swFDetGDTCYlbDT17RSCwBz5JwZNynOPd38A== dependencies: - "@budibase/types" "2.0.24-alpha.0" + "@budibase/types" "2.0.24-alpha.1" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -327,21 +327,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.0.24-alpha.0": - version "2.0.24-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.24-alpha.0.tgz#c7c70f431d9d17603d965b353dbb7c4956b6f7a0" - integrity sha512-bp+m9mXEonvxiLo4s9Gt4vhHuVrderFB4vfCISMRcIpZTo/CPVkMTOEM7C4liZyXOiLB9hh4Y+vQY1T6ilIr3Q== +"@budibase/pro@2.0.24-alpha.1": + version "2.0.24-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.24-alpha.1.tgz#0a5ecf6f2975093c79b601c337031252bccaa181" + integrity sha512-b8bVgK3fcdkfODYNXXtVzx6CAvvKyf3849uz1KRYtrXBax3QPc4IKXeFLkFgfA3QRA+E2RQqdrvvtVA30QtlUw== dependencies: - "@budibase/backend-core" "2.0.24-alpha.0" - "@budibase/types" "2.0.24-alpha.0" + "@budibase/backend-core" "2.0.24-alpha.1" + "@budibase/types" "2.0.24-alpha.1" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.0.24-alpha.0": - version "2.0.24-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.24-alpha.0.tgz#d5ff01dc4a6f1d584077b1808c0a6c8cffbd1eea" - integrity sha512-eiTumTQp6d9+bizhImqK+OJ4g4b9IuUTCOdNp7K2rwu0v94xxLuQEtJUA5MKiqClx7Uu27IlybeQmP+oM99gTg== +"@budibase/types@2.0.24-alpha.1": + version "2.0.24-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.24-alpha.1.tgz#a3feac016886c1a7d040800fb0c3de19d16e5e4d" + integrity sha512-ublIyVrdDrOUGybv+H90pf9faq5d8MxFcGDjrwHfWYTogTuQKvBJsXL7IctP2oVy4n3ugVeGHsh/KH+dvcwpDg== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From 52ab10971cf05ec5eb5e75791fb23117c0960442 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Fri, 7 Oct 2022 12:28:52 +0000 Subject: [PATCH 105/143] v2.0.24-alpha.2 --- 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 b1f0e1c5c2..f35cc59762 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.0.24-alpha.1", + "version": "2.0.24-alpha.2", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 38c8945ba6..2d7cfece80 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.0.24-alpha.1", + "version": "2.0.24-alpha.2", "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.0.24-alpha.1", + "@budibase/types": "2.0.24-alpha.2", "@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 9e756cab5e..c178a8c331 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.0.24-alpha.1", + "version": "2.0.24-alpha.2", "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.0.24-alpha.1", + "@budibase/string-templates": "2.0.24-alpha.2", "@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 93b9ad4e54..3f2219482e 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.0.24-alpha.1", + "version": "2.0.24-alpha.2", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.0.24-alpha.1", - "@budibase/client": "2.0.24-alpha.1", - "@budibase/frontend-core": "2.0.24-alpha.1", - "@budibase/string-templates": "2.0.24-alpha.1", + "@budibase/bbui": "2.0.24-alpha.2", + "@budibase/client": "2.0.24-alpha.2", + "@budibase/frontend-core": "2.0.24-alpha.2", + "@budibase/string-templates": "2.0.24-alpha.2", "@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 e02d7d93f9..ebf28a4b40 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.0.24-alpha.1", + "version": "2.0.24-alpha.2", "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.0.24-alpha.1", - "@budibase/string-templates": "2.0.24-alpha.1", - "@budibase/types": "2.0.24-alpha.1", + "@budibase/backend-core": "2.0.24-alpha.2", + "@budibase/string-templates": "2.0.24-alpha.2", + "@budibase/types": "2.0.24-alpha.2", "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 275d12fd02..341479676e 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.0.24-alpha.1", + "version": "2.0.24-alpha.2", "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.0.24-alpha.1", - "@budibase/frontend-core": "2.0.24-alpha.1", - "@budibase/string-templates": "2.0.24-alpha.1", + "@budibase/bbui": "2.0.24-alpha.2", + "@budibase/frontend-core": "2.0.24-alpha.2", + "@budibase/string-templates": "2.0.24-alpha.2", "@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 1d02eed1a8..4c22e3f219 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.0.24-alpha.1", + "version": "2.0.24-alpha.2", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.0.24-alpha.1", + "@budibase/bbui": "2.0.24-alpha.2", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 629d1b36c3..f7f7ab6d6a 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.0.24-alpha.1", + "version": "2.0.24-alpha.2", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index 21567407cb..b2c6e1f2a4 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.0.24-alpha.1", + "version": "2.0.24-alpha.2", "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": "2.0.24-alpha.1", - "@budibase/client": "2.0.24-alpha.1", + "@budibase/backend-core": "2.0.24-alpha.2", + "@budibase/client": "2.0.24-alpha.2", "@budibase/pro": "2.0.24-alpha.1", - "@budibase/string-templates": "2.0.24-alpha.1", - "@budibase/types": "2.0.24-alpha.1", + "@budibase/string-templates": "2.0.24-alpha.2", + "@budibase/types": "2.0.24-alpha.2", "@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 b9405226e6..e8679e5a06 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.0.24-alpha.1", + "version": "2.0.24-alpha.2", "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 671125bfcf..c9c4607407 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.0.24-alpha.1", + "version": "2.0.24-alpha.2", "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 c83ab2e038..f826f9f3ed 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.0.24-alpha.1", + "version": "2.0.24-alpha.2", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.0.24-alpha.1", + "@budibase/backend-core": "2.0.24-alpha.2", "@budibase/pro": "2.0.24-alpha.1", - "@budibase/string-templates": "2.0.24-alpha.1", - "@budibase/types": "2.0.24-alpha.1", + "@budibase/string-templates": "2.0.24-alpha.2", + "@budibase/types": "2.0.24-alpha.2", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 87a1337316d187a5b9c56a8948de03455905c141 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Fri, 7 Oct 2022 12:32:51 +0000 Subject: [PATCH 106/143] Update pro version to 2.0.24-alpha.2 --- 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 b2c6e1f2a4..ec34d9024b 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "2.0.24-alpha.2", "@budibase/client": "2.0.24-alpha.2", - "@budibase/pro": "2.0.24-alpha.1", + "@budibase/pro": "2.0.24-alpha.2", "@budibase/string-templates": "2.0.24-alpha.2", "@budibase/types": "2.0.24-alpha.2", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 6373c5817a..7cfb82a072 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@2.0.24-alpha.1": - version "2.0.24-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.24-alpha.1.tgz#2addbdcdd4541c6af7cd4c6654c192f1226c94b5" - integrity sha512-ozZjEF3xC24CDHzvmp/m5ItspxNzNV8kyn3pKoChNZ/e24Pcr1swFDetGDTCYlbDT17RSCwBz5JwZNynOPd38A== +"@budibase/backend-core@2.0.24-alpha.2": + version "2.0.24-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.24-alpha.2.tgz#8677856bc4230c30c209ca3cf4abd6d72ac1712c" + integrity sha512-TVf6al/KtOdilwWnaU2ijhUZEZ9c2WNEIN03HZDjHTKM3ur8gNg5znma2Vd0YiBLmnA3a+cQqyu0UkJKxezbVg== dependencies: - "@budibase/types" "2.0.24-alpha.1" + "@budibase/types" "2.0.24-alpha.2" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1180,13 +1180,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.0.24-alpha.1": - version "2.0.24-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.24-alpha.1.tgz#0a5ecf6f2975093c79b601c337031252bccaa181" - integrity sha512-b8bVgK3fcdkfODYNXXtVzx6CAvvKyf3849uz1KRYtrXBax3QPc4IKXeFLkFgfA3QRA+E2RQqdrvvtVA30QtlUw== +"@budibase/pro@2.0.24-alpha.2": + version "2.0.24-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.24-alpha.2.tgz#023b943d9b457f363b132e841bb6daa306cc2bbe" + integrity sha512-uAW93A0r2SyUl40gTUJoyAYGu0tgh9CikFFf5EddJytkOd+iAKQJbTjbpUTdBsyivBeZTNIVKCfIf8wxx4XYXQ== dependencies: - "@budibase/backend-core" "2.0.24-alpha.1" - "@budibase/types" "2.0.24-alpha.1" + "@budibase/backend-core" "2.0.24-alpha.2" + "@budibase/types" "2.0.24-alpha.2" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1209,10 +1209,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.0.24-alpha.1": - version "2.0.24-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.24-alpha.1.tgz#a3feac016886c1a7d040800fb0c3de19d16e5e4d" - integrity sha512-ublIyVrdDrOUGybv+H90pf9faq5d8MxFcGDjrwHfWYTogTuQKvBJsXL7IctP2oVy4n3ugVeGHsh/KH+dvcwpDg== +"@budibase/types@2.0.24-alpha.2": + version "2.0.24-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.24-alpha.2.tgz#3945eb9b869ff7a91fe32cf443a0aa7daf6c7a8d" + integrity sha512-Bna7JkI2UTPrWH63xrIjfBjgiD5T09n4ITcxxgPw3W81VZ6BJnqiBLCLP6wM5c5xIhKag3VAHQX9n8OREANYAA== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index f826f9f3ed..f9e4929cde 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "2.0.24-alpha.2", - "@budibase/pro": "2.0.24-alpha.1", + "@budibase/pro": "2.0.24-alpha.2", "@budibase/string-templates": "2.0.24-alpha.2", "@budibase/types": "2.0.24-alpha.2", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 5339c1abc3..e33d793690 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@2.0.24-alpha.1": - version "2.0.24-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.24-alpha.1.tgz#2addbdcdd4541c6af7cd4c6654c192f1226c94b5" - integrity sha512-ozZjEF3xC24CDHzvmp/m5ItspxNzNV8kyn3pKoChNZ/e24Pcr1swFDetGDTCYlbDT17RSCwBz5JwZNynOPd38A== +"@budibase/backend-core@2.0.24-alpha.2": + version "2.0.24-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.24-alpha.2.tgz#8677856bc4230c30c209ca3cf4abd6d72ac1712c" + integrity sha512-TVf6al/KtOdilwWnaU2ijhUZEZ9c2WNEIN03HZDjHTKM3ur8gNg5znma2Vd0YiBLmnA3a+cQqyu0UkJKxezbVg== dependencies: - "@budibase/types" "2.0.24-alpha.1" + "@budibase/types" "2.0.24-alpha.2" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -327,21 +327,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.0.24-alpha.1": - version "2.0.24-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.24-alpha.1.tgz#0a5ecf6f2975093c79b601c337031252bccaa181" - integrity sha512-b8bVgK3fcdkfODYNXXtVzx6CAvvKyf3849uz1KRYtrXBax3QPc4IKXeFLkFgfA3QRA+E2RQqdrvvtVA30QtlUw== +"@budibase/pro@2.0.24-alpha.2": + version "2.0.24-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.24-alpha.2.tgz#023b943d9b457f363b132e841bb6daa306cc2bbe" + integrity sha512-uAW93A0r2SyUl40gTUJoyAYGu0tgh9CikFFf5EddJytkOd+iAKQJbTjbpUTdBsyivBeZTNIVKCfIf8wxx4XYXQ== dependencies: - "@budibase/backend-core" "2.0.24-alpha.1" - "@budibase/types" "2.0.24-alpha.1" + "@budibase/backend-core" "2.0.24-alpha.2" + "@budibase/types" "2.0.24-alpha.2" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.0.24-alpha.1": - version "2.0.24-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.24-alpha.1.tgz#a3feac016886c1a7d040800fb0c3de19d16e5e4d" - integrity sha512-ublIyVrdDrOUGybv+H90pf9faq5d8MxFcGDjrwHfWYTogTuQKvBJsXL7IctP2oVy4n3ugVeGHsh/KH+dvcwpDg== +"@budibase/types@2.0.24-alpha.2": + version "2.0.24-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.24-alpha.2.tgz#3945eb9b869ff7a91fe32cf443a0aa7daf6c7a8d" + integrity sha512-Bna7JkI2UTPrWH63xrIjfBjgiD5T09n4ITcxxgPw3W81VZ6BJnqiBLCLP6wM5c5xIhKag3VAHQX9n8OREANYAA== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From 0c4a40c79582e65efd2cd37e0841d1f2ddc7fbd6 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 7 Oct 2022 16:05:01 +0100 Subject: [PATCH 107/143] Switching from scan for app locks to mget - which is a fast O(N) operation that only retrieves what we need. --- packages/backend-core/src/redis/index.ts | 25 +++++++++++++++++++ .../server/src/api/controllers/application.ts | 17 ++++++------- packages/server/src/utilities/redis.js | 8 ++---- 3 files changed, 35 insertions(+), 15 deletions(-) diff --git a/packages/backend-core/src/redis/index.ts b/packages/backend-core/src/redis/index.ts index 206110366f..62e718d8ad 100644 --- a/packages/backend-core/src/redis/index.ts +++ b/packages/backend-core/src/redis/index.ts @@ -214,6 +214,31 @@ export = class RedisWrapper { } } + async bulkGet(keys: string[]) { + const db = this._db + const prefixedKeys = keys.map(key => addDbPrefix(db, key)) + let response = await this.getClient().mget(prefixedKeys) + if (Array.isArray(response)) { + let final: any = {} + let count = 0 + for (let result of response) { + if (result) { + let parsed + try { + parsed = JSON.parse(result) + } catch (err) { + parsed = result + } + final[keys[count]] = parsed + } + count++ + } + return final + } else { + throw new Error(`Invalid response: ${response}`) + } + } + async store(key: string, value: any, expirySeconds: number | null = null) { const db = this._db if (typeof value === "object") { diff --git a/packages/server/src/api/controllers/application.ts b/packages/server/src/api/controllers/application.ts index b6377a61a2..e8af2f54f8 100644 --- a/packages/server/src/api/controllers/application.ts +++ b/packages/server/src/api/controllers/application.ts @@ -32,7 +32,7 @@ const { import { USERS_TABLE_SCHEMA } from "../../constants" import { removeAppFromUserRoles } from "../../utilities/workerRequests" import { clientLibraryPath, stringToReadStream } from "../../utilities" -import { getAllLocks } from "../../utilities/redis" +import { getLocksById } from "../../utilities/redis" import { updateClientLibrary, backupClientLibrary, @@ -45,11 +45,10 @@ import { cleanupAutomations } from "../../automations/utils" import { context } from "@budibase/backend-core" import { checkAppMetadata } from "../../automations/logging" import { getUniqueRows } from "../../utilities/usageQuota/rows" -import { quotas } from "@budibase/pro" +import { quotas, groups } from "@budibase/pro" import { errors, events, migrations } from "@budibase/backend-core" import { App, Layout, Screen, MigrationType } from "@budibase/types" import { BASE_LAYOUT_PROP_IDS } from "../../constants/layouts" -import { groups } from "@budibase/pro" import { enrichPluginURLs } from "../../utilities/plugins" const URL_REGEX_SLASH = /\/|\\/g @@ -172,16 +171,16 @@ export const fetch = async (ctx: any) => { const all = ctx.query && ctx.query.status === AppStatus.ALL const apps = await getAllApps({ dev, all }) + const appIds = apps + .filter((app: any) => app.status === "development") + .map((app: any) => app.appId) // get the locks for all the dev apps if (dev || all) { - const locks = await getAllLocks() + const locks = await getLocksById(appIds) for (let app of apps) { - if (app.status !== "development") { - continue - } - const lock = locks.find((lock: any) => lock.appId === app.appId) + const lock = locks[app.appId] if (lock) { - app.lockedBy = lock.user + app.lockedBy = lock } else { // make sure its definitely not present delete app.lockedBy diff --git a/packages/server/src/utilities/redis.js b/packages/server/src/utilities/redis.js index 4eddca6e4a..b39b7cae55 100644 --- a/packages/server/src/utilities/redis.js +++ b/packages/server/src/utilities/redis.js @@ -34,12 +34,8 @@ exports.doesUserHaveLock = async (devAppId, user) => { return expected === userId } -exports.getAllLocks = async () => { - const locks = await devAppClient.scan() - return locks.map(lock => ({ - appId: lock.key, - user: lock.value, - })) +exports.getLocksById = async appIds => { + return await devAppClient.bulkGet(appIds) } exports.updateLock = async (devAppId, user) => { From 39410a07af0e959cf7f3776c2caf8260e5f8fedd Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 7 Oct 2022 16:24:04 +0100 Subject: [PATCH 108/143] Fixing test mocks. --- packages/server/src/api/routes/tests/application.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/src/api/routes/tests/application.spec.js b/packages/server/src/api/routes/tests/application.spec.js index dcfc2c6d9b..f62665d184 100644 --- a/packages/server/src/api/routes/tests/application.spec.js +++ b/packages/server/src/api/routes/tests/application.spec.js @@ -1,7 +1,7 @@ jest.mock("../../../utilities/redis", () => ({ init: jest.fn(), - getAllLocks: () => { - return [] + getLocksById: () => { + return {} }, doesUserHaveLock: () => { return true From 3616bfd297d50612189c7608cc6719b431889b40 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Fri, 7 Oct 2022 16:45:27 +0000 Subject: [PATCH 109/143] v2.0.24-alpha.3 --- 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 f35cc59762..a47d8fe604 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.0.24-alpha.2", + "version": "2.0.24-alpha.3", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 2d7cfece80..8df964912e 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.0.24-alpha.2", + "version": "2.0.24-alpha.3", "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.0.24-alpha.2", + "@budibase/types": "2.0.24-alpha.3", "@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 c178a8c331..0583237a45 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.0.24-alpha.2", + "version": "2.0.24-alpha.3", "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.0.24-alpha.2", + "@budibase/string-templates": "2.0.24-alpha.3", "@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 3f2219482e..900b33fb88 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.0.24-alpha.2", + "version": "2.0.24-alpha.3", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.0.24-alpha.2", - "@budibase/client": "2.0.24-alpha.2", - "@budibase/frontend-core": "2.0.24-alpha.2", - "@budibase/string-templates": "2.0.24-alpha.2", + "@budibase/bbui": "2.0.24-alpha.3", + "@budibase/client": "2.0.24-alpha.3", + "@budibase/frontend-core": "2.0.24-alpha.3", + "@budibase/string-templates": "2.0.24-alpha.3", "@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 ebf28a4b40..18eff4ce2a 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.0.24-alpha.2", + "version": "2.0.24-alpha.3", "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.0.24-alpha.2", - "@budibase/string-templates": "2.0.24-alpha.2", - "@budibase/types": "2.0.24-alpha.2", + "@budibase/backend-core": "2.0.24-alpha.3", + "@budibase/string-templates": "2.0.24-alpha.3", + "@budibase/types": "2.0.24-alpha.3", "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 341479676e..1676a722ba 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.0.24-alpha.2", + "version": "2.0.24-alpha.3", "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.0.24-alpha.2", - "@budibase/frontend-core": "2.0.24-alpha.2", - "@budibase/string-templates": "2.0.24-alpha.2", + "@budibase/bbui": "2.0.24-alpha.3", + "@budibase/frontend-core": "2.0.24-alpha.3", + "@budibase/string-templates": "2.0.24-alpha.3", "@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 4c22e3f219..7d3355f34e 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.0.24-alpha.2", + "version": "2.0.24-alpha.3", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.0.24-alpha.2", + "@budibase/bbui": "2.0.24-alpha.3", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index f7f7ab6d6a..53e89077a7 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.0.24-alpha.2", + "version": "2.0.24-alpha.3", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index ec34d9024b..c798551278 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.0.24-alpha.2", + "version": "2.0.24-alpha.3", "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": "2.0.24-alpha.2", - "@budibase/client": "2.0.24-alpha.2", + "@budibase/backend-core": "2.0.24-alpha.3", + "@budibase/client": "2.0.24-alpha.3", "@budibase/pro": "2.0.24-alpha.2", - "@budibase/string-templates": "2.0.24-alpha.2", - "@budibase/types": "2.0.24-alpha.2", + "@budibase/string-templates": "2.0.24-alpha.3", + "@budibase/types": "2.0.24-alpha.3", "@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 e8679e5a06..44c8fc560e 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.0.24-alpha.2", + "version": "2.0.24-alpha.3", "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 c9c4607407..f5a83e2c3b 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.0.24-alpha.2", + "version": "2.0.24-alpha.3", "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 f9e4929cde..39593000d1 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.0.24-alpha.2", + "version": "2.0.24-alpha.3", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.0.24-alpha.2", + "@budibase/backend-core": "2.0.24-alpha.3", "@budibase/pro": "2.0.24-alpha.2", - "@budibase/string-templates": "2.0.24-alpha.2", - "@budibase/types": "2.0.24-alpha.2", + "@budibase/string-templates": "2.0.24-alpha.3", + "@budibase/types": "2.0.24-alpha.3", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From ba50fa56b64faa482bc352ec2602223de02197b5 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Fri, 7 Oct 2022 16:48:36 +0000 Subject: [PATCH 110/143] Update pro version to 2.0.24-alpha.3 --- 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 c798551278..2f2409850e 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "2.0.24-alpha.3", "@budibase/client": "2.0.24-alpha.3", - "@budibase/pro": "2.0.24-alpha.2", + "@budibase/pro": "2.0.24-alpha.3", "@budibase/string-templates": "2.0.24-alpha.3", "@budibase/types": "2.0.24-alpha.3", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 7cfb82a072..18ab07c17f 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@2.0.24-alpha.2": - version "2.0.24-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.24-alpha.2.tgz#8677856bc4230c30c209ca3cf4abd6d72ac1712c" - integrity sha512-TVf6al/KtOdilwWnaU2ijhUZEZ9c2WNEIN03HZDjHTKM3ur8gNg5znma2Vd0YiBLmnA3a+cQqyu0UkJKxezbVg== +"@budibase/backend-core@2.0.24-alpha.3": + version "2.0.24-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.24-alpha.3.tgz#49a92082d1ca6bed0eb82519a6c02d7d14ead751" + integrity sha512-Zm/ddRDMzMuXCoEXZa0CzA/B1SnpQ+yjZCNAPH7Y4yYTIKfeE/DQ6COLlUixQxVMAUN1L5+GXML+px6fRigA5w== dependencies: - "@budibase/types" "2.0.24-alpha.2" + "@budibase/types" "2.0.24-alpha.3" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1180,13 +1180,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.0.24-alpha.2": - version "2.0.24-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.24-alpha.2.tgz#023b943d9b457f363b132e841bb6daa306cc2bbe" - integrity sha512-uAW93A0r2SyUl40gTUJoyAYGu0tgh9CikFFf5EddJytkOd+iAKQJbTjbpUTdBsyivBeZTNIVKCfIf8wxx4XYXQ== +"@budibase/pro@2.0.24-alpha.3": + version "2.0.24-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.24-alpha.3.tgz#16605029663b07d0e3bcf0c08893878b542b6752" + integrity sha512-gBdqJzvtEAMJkhB2YTAyVYKoCANA25F1wT/K7kQtTOy5LrjDmcXah7CZoetfZQGbsKxUYEAZwJzxLSXmIxvWmQ== dependencies: - "@budibase/backend-core" "2.0.24-alpha.2" - "@budibase/types" "2.0.24-alpha.2" + "@budibase/backend-core" "2.0.24-alpha.3" + "@budibase/types" "2.0.24-alpha.3" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1209,10 +1209,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.0.24-alpha.2": - version "2.0.24-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.24-alpha.2.tgz#3945eb9b869ff7a91fe32cf443a0aa7daf6c7a8d" - integrity sha512-Bna7JkI2UTPrWH63xrIjfBjgiD5T09n4ITcxxgPw3W81VZ6BJnqiBLCLP6wM5c5xIhKag3VAHQX9n8OREANYAA== +"@budibase/types@2.0.24-alpha.3": + version "2.0.24-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.24-alpha.3.tgz#84eec5f991a2cfaf48d968b07a075b343f847289" + integrity sha512-f9PhtqzmqPI76ITXttuvxsvqMUJtkrDYf/4MHlI2v5ssNL9r0C/hbQEXllff3L3JqViEHWxkKFmfvfnDTV8rRQ== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 39593000d1..46927f8725 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "2.0.24-alpha.3", - "@budibase/pro": "2.0.24-alpha.2", + "@budibase/pro": "2.0.24-alpha.3", "@budibase/string-templates": "2.0.24-alpha.3", "@budibase/types": "2.0.24-alpha.3", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index e33d793690..12086ae67d 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@2.0.24-alpha.2": - version "2.0.24-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.24-alpha.2.tgz#8677856bc4230c30c209ca3cf4abd6d72ac1712c" - integrity sha512-TVf6al/KtOdilwWnaU2ijhUZEZ9c2WNEIN03HZDjHTKM3ur8gNg5znma2Vd0YiBLmnA3a+cQqyu0UkJKxezbVg== +"@budibase/backend-core@2.0.24-alpha.3": + version "2.0.24-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.24-alpha.3.tgz#49a92082d1ca6bed0eb82519a6c02d7d14ead751" + integrity sha512-Zm/ddRDMzMuXCoEXZa0CzA/B1SnpQ+yjZCNAPH7Y4yYTIKfeE/DQ6COLlUixQxVMAUN1L5+GXML+px6fRigA5w== dependencies: - "@budibase/types" "2.0.24-alpha.2" + "@budibase/types" "2.0.24-alpha.3" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -327,21 +327,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.0.24-alpha.2": - version "2.0.24-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.24-alpha.2.tgz#023b943d9b457f363b132e841bb6daa306cc2bbe" - integrity sha512-uAW93A0r2SyUl40gTUJoyAYGu0tgh9CikFFf5EddJytkOd+iAKQJbTjbpUTdBsyivBeZTNIVKCfIf8wxx4XYXQ== +"@budibase/pro@2.0.24-alpha.3": + version "2.0.24-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.24-alpha.3.tgz#16605029663b07d0e3bcf0c08893878b542b6752" + integrity sha512-gBdqJzvtEAMJkhB2YTAyVYKoCANA25F1wT/K7kQtTOy5LrjDmcXah7CZoetfZQGbsKxUYEAZwJzxLSXmIxvWmQ== dependencies: - "@budibase/backend-core" "2.0.24-alpha.2" - "@budibase/types" "2.0.24-alpha.2" + "@budibase/backend-core" "2.0.24-alpha.3" + "@budibase/types" "2.0.24-alpha.3" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.0.24-alpha.2": - version "2.0.24-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.24-alpha.2.tgz#3945eb9b869ff7a91fe32cf443a0aa7daf6c7a8d" - integrity sha512-Bna7JkI2UTPrWH63xrIjfBjgiD5T09n4ITcxxgPw3W81VZ6BJnqiBLCLP6wM5c5xIhKag3VAHQX9n8OREANYAA== +"@budibase/types@2.0.24-alpha.3": + version "2.0.24-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.24-alpha.3.tgz#84eec5f991a2cfaf48d968b07a075b343f847289" + integrity sha512-f9PhtqzmqPI76ITXttuvxsvqMUJtkrDYf/4MHlI2v5ssNL9r0C/hbQEXllff3L3JqViEHWxkKFmfvfnDTV8rRQ== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From 4e04fc84b2907e6ea03299d88d0c93d80126be2d Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Fri, 7 Oct 2022 18:04:18 +0100 Subject: [PATCH 111/143] only prevent rollback in cypress env --- packages/server/src/api/controllers/dev.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/api/controllers/dev.js b/packages/server/src/api/controllers/dev.js index 8438175ca8..e5582be5b3 100644 --- a/packages/server/src/api/controllers/dev.js +++ b/packages/server/src/api/controllers/dev.js @@ -103,7 +103,7 @@ exports.revert = async ctx => { target: appId, }) try { - if (!env.isTest()) { + if (!env.isCypress()) { // in-memory db stalls on rollback await replication.rollback() } From 197d195cb464ee44f7e515e64a575404262f053b Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 7 Oct 2022 16:05:01 +0100 Subject: [PATCH 112/143] Switching from scan for app locks to mget - which is a fast O(N) operation that only retrieves what we need. --- packages/backend-core/src/redis/index.ts | 25 +++++++++++++++++++ .../server/src/api/controllers/application.ts | 17 ++++++------- packages/server/src/utilities/redis.js | 8 ++---- 3 files changed, 35 insertions(+), 15 deletions(-) diff --git a/packages/backend-core/src/redis/index.ts b/packages/backend-core/src/redis/index.ts index 206110366f..62e718d8ad 100644 --- a/packages/backend-core/src/redis/index.ts +++ b/packages/backend-core/src/redis/index.ts @@ -214,6 +214,31 @@ export = class RedisWrapper { } } + async bulkGet(keys: string[]) { + const db = this._db + const prefixedKeys = keys.map(key => addDbPrefix(db, key)) + let response = await this.getClient().mget(prefixedKeys) + if (Array.isArray(response)) { + let final: any = {} + let count = 0 + for (let result of response) { + if (result) { + let parsed + try { + parsed = JSON.parse(result) + } catch (err) { + parsed = result + } + final[keys[count]] = parsed + } + count++ + } + return final + } else { + throw new Error(`Invalid response: ${response}`) + } + } + async store(key: string, value: any, expirySeconds: number | null = null) { const db = this._db if (typeof value === "object") { diff --git a/packages/server/src/api/controllers/application.ts b/packages/server/src/api/controllers/application.ts index b6377a61a2..e8af2f54f8 100644 --- a/packages/server/src/api/controllers/application.ts +++ b/packages/server/src/api/controllers/application.ts @@ -32,7 +32,7 @@ const { import { USERS_TABLE_SCHEMA } from "../../constants" import { removeAppFromUserRoles } from "../../utilities/workerRequests" import { clientLibraryPath, stringToReadStream } from "../../utilities" -import { getAllLocks } from "../../utilities/redis" +import { getLocksById } from "../../utilities/redis" import { updateClientLibrary, backupClientLibrary, @@ -45,11 +45,10 @@ import { cleanupAutomations } from "../../automations/utils" import { context } from "@budibase/backend-core" import { checkAppMetadata } from "../../automations/logging" import { getUniqueRows } from "../../utilities/usageQuota/rows" -import { quotas } from "@budibase/pro" +import { quotas, groups } from "@budibase/pro" import { errors, events, migrations } from "@budibase/backend-core" import { App, Layout, Screen, MigrationType } from "@budibase/types" import { BASE_LAYOUT_PROP_IDS } from "../../constants/layouts" -import { groups } from "@budibase/pro" import { enrichPluginURLs } from "../../utilities/plugins" const URL_REGEX_SLASH = /\/|\\/g @@ -172,16 +171,16 @@ export const fetch = async (ctx: any) => { const all = ctx.query && ctx.query.status === AppStatus.ALL const apps = await getAllApps({ dev, all }) + const appIds = apps + .filter((app: any) => app.status === "development") + .map((app: any) => app.appId) // get the locks for all the dev apps if (dev || all) { - const locks = await getAllLocks() + const locks = await getLocksById(appIds) for (let app of apps) { - if (app.status !== "development") { - continue - } - const lock = locks.find((lock: any) => lock.appId === app.appId) + const lock = locks[app.appId] if (lock) { - app.lockedBy = lock.user + app.lockedBy = lock } else { // make sure its definitely not present delete app.lockedBy diff --git a/packages/server/src/utilities/redis.js b/packages/server/src/utilities/redis.js index 4eddca6e4a..b39b7cae55 100644 --- a/packages/server/src/utilities/redis.js +++ b/packages/server/src/utilities/redis.js @@ -34,12 +34,8 @@ exports.doesUserHaveLock = async (devAppId, user) => { return expected === userId } -exports.getAllLocks = async () => { - const locks = await devAppClient.scan() - return locks.map(lock => ({ - appId: lock.key, - user: lock.value, - })) +exports.getLocksById = async appIds => { + return await devAppClient.bulkGet(appIds) } exports.updateLock = async (devAppId, user) => { From d80c966cf137a0e6fd5a59c93edeb5d614c61009 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 7 Oct 2022 16:24:04 +0100 Subject: [PATCH 113/143] Fixing test mocks. --- packages/server/src/api/routes/tests/application.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/src/api/routes/tests/application.spec.js b/packages/server/src/api/routes/tests/application.spec.js index dcfc2c6d9b..f62665d184 100644 --- a/packages/server/src/api/routes/tests/application.spec.js +++ b/packages/server/src/api/routes/tests/application.spec.js @@ -1,7 +1,7 @@ jest.mock("../../../utilities/redis", () => ({ init: jest.fn(), - getAllLocks: () => { - return [] + getLocksById: () => { + return {} }, doesUserHaveLock: () => { return true From 970ba0315e5059cf7a934e0542b3584e8167fefe Mon Sep 17 00:00:00 2001 From: Pedro Silva Date: Fri, 7 Oct 2022 18:05:58 +0100 Subject: [PATCH 114/143] Add tests for revert endpoint --- .../TestConfiguration/applications.ts | 13 ++++- .../config/internal-api/fixtures/screens.ts | 34 +++++++++++++ .../internal-api/applications/create.spec.ts | 51 +++++++++++++++---- 3 files changed, 86 insertions(+), 12 deletions(-) create mode 100644 qa-core/src/config/internal-api/fixtures/screens.ts diff --git a/qa-core/src/config/internal-api/TestConfiguration/applications.ts b/qa-core/src/config/internal-api/TestConfiguration/applications.ts index 3b577abf5e..8c88819ef5 100644 --- a/qa-core/src/config/internal-api/TestConfiguration/applications.ts +++ b/qa-core/src/config/internal-api/TestConfiguration/applications.ts @@ -29,7 +29,7 @@ export default class AppApi { return [response, json] } - async publish(): Promise<[Response, string]> { + async publish(): Promise<[Response, any]> { const response = await this.api.post("/deploy") const json = await response.json() return [response, json] @@ -82,6 +82,17 @@ export default class AppApi { const json = await response.json() return [response, json] } + async addScreentoApp(body: any): Promise<[Response, Application]> { + const response = await this.api.post(`/screens`, { body }) + const json = await response.json() + return [response, json] + } + + async getRoutes(): Promise<[Response, any]> { + const response = await this.api.get(`/routing`) + const json = await response.json() + return [response, json] + } } diff --git a/qa-core/src/config/internal-api/fixtures/screens.ts b/qa-core/src/config/internal-api/fixtures/screens.ts new file mode 100644 index 0000000000..2a2cc1eada --- /dev/null +++ b/qa-core/src/config/internal-api/fixtures/screens.ts @@ -0,0 +1,34 @@ +import generator from "../../generator" + +const randomId = generator.guid() + +const generateScreen = (): any => ({ + showNavigation: true, + width: "Large", + props: { + _id: randomId, + _component: + "@budibase/standard-components/container", + _styles: { + normal: {}, + hover: {}, + active: {}, + selected: {} + }, + _children: [], + _instanceName: "New Screen", + direction: "column", + hAlign: "stretch", + vAlign: "top", + size: "grow", + gap: "M" + }, routing: { + route: "/test", + roleId: "BASIC", + homeScreen: false + }, + name: randomId, + template: "createFromScratch" +}) + +export default generateScreen diff --git a/qa-core/src/tests/internal-api/applications/create.spec.ts b/qa-core/src/tests/internal-api/applications/create.spec.ts index b447a95459..4b9a21319d 100644 --- a/qa-core/src/tests/internal-api/applications/create.spec.ts +++ b/qa-core/src/tests/internal-api/applications/create.spec.ts @@ -4,6 +4,7 @@ import { db } from "@budibase/backend-core" import InternalAPIClient from "../../../config/internal-api/TestConfiguration/InternalAPIClient" import generateApp from "../../../config/internal-api/fixtures/applications" import generator from "../../../config/generator" +import generateScreen from "../../../config/internal-api/fixtures/screens" describe("Internal API - /applications endpoints", () => { const api = new InternalAPIClient() @@ -118,29 +119,57 @@ describe("Internal API - /applications endpoints", () => { const [response, app] = await config.applications.create(generateApp()) expect(response).toHaveStatusCode(200) expect(app.appId).toBeDefined() - - }) - - - it.skip("POST - Revert Changes", async () => { - const [response, app] = await config.applications.create(generateApp()) - expect(response).toHaveStatusCode(200) - expect(app.appId).toBeDefined() - - // publish app - await config.applications.publish() + config.applications.api.appId = app.appId const [updateResponse, updatedApp] = await config.applications.update(app.appId ? app.appId : "", { name: generator.word(), }) expect(updateResponse).toHaveStatusCode(200) expect(updatedApp.name).not.toEqual(app.name) + }) + + // Skip this test because of the if line 44 in InternalAPIClient.ts + it.skip("POST - Revert Changes without changes", async () => { + const [response, app] = await config.applications.create(generateApp()) + expect(response).toHaveStatusCode(200) + expect(app.appId).toBeDefined() + config.applications.api.appId = app.appId + + const [revertResponse, revert] = await config.applications.revert(app.appId ? app.appId : "") + expect(revertResponse).toHaveStatusCode(400) + expect(revert).toEqual({ + message: "There is no version to revert to", + }) + }) + + it("POST - Revert Changes", async () => { + const [response, app] = await config.applications.create(generateApp()) + expect(response).toHaveStatusCode(200) + expect(app.appId).toBeDefined() + config.applications.api.appId = app.appId + + // publish app + const [publishResponse, publish] = await config.applications.publish() + expect(publishResponse).toHaveStatusCode(200) + expect(publish.status).toEqual("SUCCESS") + + // Change/add component to the app + const [screenResponse, screen] = await config.applications.addScreentoApp(generateScreen()) + expect(screenResponse).toHaveStatusCode(200) + expect(screen._id).toBeDefined() + const [revertResponse, revert] = await config.applications.revert(app.appId ? app.appId : "") expect(revertResponse).toHaveStatusCode(200) expect(revert).toEqual({ message: "App reverted successfully." }) + + // Check screen is removed + const [routesResponse, routes] = await config.applications.getRoutes() + expect(routesResponse).toHaveStatusCode(200) + expect(routes.routes["/test"]).toBeUndefined() + }) it("DELETE - Delete an application", async () => { From 15723e38d81bca73c04fa9b53ef20195c3e650ae Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Fri, 7 Oct 2022 17:16:16 +0000 Subject: [PATCH 115/143] v2.0.24 --- 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 bc62b3c368..b2ce7d106f 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.0.23", + "version": "2.0.24", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index a9c1e3eb59..163cf61187 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.0.23", + "version": "2.0.24", "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.0.23", + "@budibase/types": "^2.0.24", "@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 3ca5585e34..86b1990e80 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.0.23", + "version": "2.0.24", "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.0.23", + "@budibase/string-templates": "^2.0.24", "@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 6f289d3433..07f53bcd05 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.0.23", + "version": "2.0.24", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "^2.0.23", - "@budibase/client": "^2.0.23", - "@budibase/frontend-core": "^2.0.23", - "@budibase/string-templates": "^2.0.23", + "@budibase/bbui": "^2.0.24", + "@budibase/client": "^2.0.24", + "@budibase/frontend-core": "^2.0.24", + "@budibase/string-templates": "^2.0.24", "@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 e054839f25..a4d98d9daf 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.0.23", + "version": "2.0.24", "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.0.23", - "@budibase/string-templates": "^2.0.23", - "@budibase/types": "^2.0.23", + "@budibase/backend-core": "^2.0.24", + "@budibase/string-templates": "^2.0.24", + "@budibase/types": "^2.0.24", "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 f22039ae4f..9c1222c0c3 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.0.23", + "version": "2.0.24", "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.0.23", - "@budibase/frontend-core": "^2.0.23", - "@budibase/string-templates": "^2.0.23", + "@budibase/bbui": "^2.0.24", + "@budibase/frontend-core": "^2.0.24", + "@budibase/string-templates": "^2.0.24", "@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 3942ad481b..d028ae43c7 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.0.23", + "version": "2.0.24", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "^2.0.23", + "@budibase/bbui": "^2.0.24", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 59bd24e4ca..ebfd81e7b2 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.0.23", + "version": "2.0.24", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index e9eca4136d..8d085e2ab7 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.0.23", + "version": "2.0.24", "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": "^2.0.23", - "@budibase/client": "^2.0.23", + "@budibase/backend-core": "^2.0.24", + "@budibase/client": "^2.0.24", "@budibase/pro": "2.0.23", - "@budibase/string-templates": "^2.0.23", - "@budibase/types": "^2.0.23", + "@budibase/string-templates": "^2.0.24", + "@budibase/types": "^2.0.24", "@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 651034e3fd..23a7109cd4 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.0.23", + "version": "2.0.24", "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 8c1b53a33b..a36cabc46e 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.0.23", + "version": "2.0.24", "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 9763d42abf..c2e690fe01 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.0.23", + "version": "2.0.24", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "^2.0.23", + "@budibase/backend-core": "^2.0.24", "@budibase/pro": "2.0.23", - "@budibase/string-templates": "^2.0.23", - "@budibase/types": "^2.0.23", + "@budibase/string-templates": "^2.0.24", + "@budibase/types": "^2.0.24", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From a0cc4a1b2194c60da44971a568b2e852b6855a12 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Fri, 7 Oct 2022 17:19:31 +0000 Subject: [PATCH 116/143] Update pro version to 2.0.24 --- 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 8d085e2ab7..36e723d0e9 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "^2.0.24", "@budibase/client": "^2.0.24", - "@budibase/pro": "2.0.23", + "@budibase/pro": "2.0.24", "@budibase/string-templates": "^2.0.24", "@budibase/types": "^2.0.24", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index d70aabbcf7..e005d36235 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@2.0.23": - version "2.0.23" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.23.tgz#915d4ea2e78547795894b2aebd81b8a8c9b568db" - integrity sha512-wovJF+kS/vVs+cR6lHieEEs99vmXsOt5qKjMAkkMUVXmWBWPYQaLppz+dxTV9xXd8Ht9yFhnkbOo7QJxFE8+fA== +"@budibase/backend-core@2.0.24": + version "2.0.24" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.24.tgz#305be50481095441aeb663add4271c06b0d98435" + integrity sha512-yq/TwV1GWGeAZgn8FrSVAk0tNXFQLvduoKrwy4f2EsR26R5y6uxp2B0igP0sKMvUJPjTNPBONJM0MdYx9JBSmA== dependencies: - "@budibase/types" "^2.0.23" + "@budibase/types" "^2.0.24" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1180,13 +1180,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.0.23": - version "2.0.23" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.23.tgz#215759f07470d37b6571f54ad80d7fb38a2f902e" - integrity sha512-RP7lS076VP3W+9AI9d/ylM6k1YBotGlqkBrshgzX/pl1e2O9eg0MmG2/dP6X+w4LzGv2ruC7lfwyf3MgWgYFyQ== +"@budibase/pro@2.0.24": + version "2.0.24" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.24.tgz#d678753a28fc44f4f476120c8fb7b01365b5e18b" + integrity sha512-j/wsd1RCvTGodRAvD9GJZ9JDivGxMuFDAmrQlvcq5ffrqX2VDm0dSP/F+8YZFck4hdSmcL5VeqxZCPh2kx74vA== dependencies: - "@budibase/backend-core" "2.0.23" - "@budibase/types" "2.0.23" + "@budibase/backend-core" "2.0.24" + "@budibase/types" "2.0.24" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1209,10 +1209,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.0.23", "@budibase/types@^2.0.23": - version "2.0.23" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.23.tgz#2467342b9c48c965319182ef4cbb7166c8bf1e43" - integrity sha512-Oyq9tVwV+zl38III1or4Cr8VOKemMv3L/o95CBXdyZRDmmVfdzQgJ7AByUMOj9quEe6IjctdkOI4ssE8Fds9Dw== +"@budibase/types@2.0.24", "@budibase/types@^2.0.24": + version "2.0.24" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.24.tgz#8ac0615b17d3f46809b10897b3217a86b6d2a62e" + integrity sha512-Lo1NGnu+4PH0OLjwxRU5dqEAADEBOCkikQtAjapVFIZWcBit0ZC/bXTs6meIaey6JqqEKOlDR5V+VwrzcmdUIA== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index c2e690fe01..ad7db4639b 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "^2.0.24", - "@budibase/pro": "2.0.23", + "@budibase/pro": "2.0.24", "@budibase/string-templates": "^2.0.24", "@budibase/types": "^2.0.24", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index f885ab690e..e0d3c1cb1c 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@2.0.23": - version "2.0.23" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.23.tgz#915d4ea2e78547795894b2aebd81b8a8c9b568db" - integrity sha512-wovJF+kS/vVs+cR6lHieEEs99vmXsOt5qKjMAkkMUVXmWBWPYQaLppz+dxTV9xXd8Ht9yFhnkbOo7QJxFE8+fA== +"@budibase/backend-core@2.0.24": + version "2.0.24" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.24.tgz#305be50481095441aeb663add4271c06b0d98435" + integrity sha512-yq/TwV1GWGeAZgn8FrSVAk0tNXFQLvduoKrwy4f2EsR26R5y6uxp2B0igP0sKMvUJPjTNPBONJM0MdYx9JBSmA== dependencies: - "@budibase/types" "^2.0.23" + "@budibase/types" "^2.0.24" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -327,21 +327,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.0.23": - version "2.0.23" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.23.tgz#215759f07470d37b6571f54ad80d7fb38a2f902e" - integrity sha512-RP7lS076VP3W+9AI9d/ylM6k1YBotGlqkBrshgzX/pl1e2O9eg0MmG2/dP6X+w4LzGv2ruC7lfwyf3MgWgYFyQ== +"@budibase/pro@2.0.24": + version "2.0.24" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.24.tgz#d678753a28fc44f4f476120c8fb7b01365b5e18b" + integrity sha512-j/wsd1RCvTGodRAvD9GJZ9JDivGxMuFDAmrQlvcq5ffrqX2VDm0dSP/F+8YZFck4hdSmcL5VeqxZCPh2kx74vA== dependencies: - "@budibase/backend-core" "2.0.23" - "@budibase/types" "2.0.23" + "@budibase/backend-core" "2.0.24" + "@budibase/types" "2.0.24" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.0.23", "@budibase/types@^2.0.23": - version "2.0.23" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.23.tgz#2467342b9c48c965319182ef4cbb7166c8bf1e43" - integrity sha512-Oyq9tVwV+zl38III1or4Cr8VOKemMv3L/o95CBXdyZRDmmVfdzQgJ7AByUMOj9quEe6IjctdkOI4ssE8Fds9Dw== +"@budibase/types@2.0.24", "@budibase/types@^2.0.24": + version "2.0.24" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.24.tgz#8ac0615b17d3f46809b10897b3217a86b6d2a62e" + integrity sha512-Lo1NGnu+4PH0OLjwxRU5dqEAADEBOCkikQtAjapVFIZWcBit0ZC/bXTs6meIaey6JqqEKOlDR5V+VwrzcmdUIA== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From 052bc0aeedcff577e6cf148c246a34863d9c9ac5 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Sun, 9 Oct 2022 19:31:35 +0100 Subject: [PATCH 117/143] ensure correct revert endpoint being hit, update call to revert --- packages/server/src/api/controllers/dev.js | 2 +- packages/server/src/api/controllers/table/internal.ts | 3 ++- .../config/internal-api/TestConfiguration/applications.ts | 6 +++--- qa-core/src/tests/internal-api/applications/create.spec.ts | 6 +++--- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/server/src/api/controllers/dev.js b/packages/server/src/api/controllers/dev.js index e5582be5b3..c8f134756b 100644 --- a/packages/server/src/api/controllers/dev.js +++ b/packages/server/src/api/controllers/dev.js @@ -103,7 +103,7 @@ exports.revert = async ctx => { target: appId, }) try { - if (!env.isCypress()) { + if (env.COUCH_DB_URL) { // in-memory db stalls on rollback await replication.rollback() } diff --git a/packages/server/src/api/controllers/table/internal.ts b/packages/server/src/api/controllers/table/internal.ts index 22c9b6dc55..7e55c71aea 100644 --- a/packages/server/src/api/controllers/table/internal.ts +++ b/packages/server/src/api/controllers/table/internal.ts @@ -18,6 +18,7 @@ import { Table } from "@budibase/types" import { quotas } from "@budibase/pro" import { isEqual } from "lodash" import { cloneDeep } from "lodash/fp" +import env from "../../../environment" function checkAutoColumns(table: Table, oldTable: Table) { if (!table.schema) { @@ -167,7 +168,7 @@ export async function destroy(ctx: any) { await db.remove(tableToDelete) // remove table search index - if (!isTest()) { + if (!isTest() || env.COUCH_DB_URL) { const currentIndexes = await db.getIndexes() const existingIndex = currentIndexes.indexes.find( (existing: any) => existing.name === `search:${ctx.params.tableId}` diff --git a/qa-core/src/config/internal-api/TestConfiguration/applications.ts b/qa-core/src/config/internal-api/TestConfiguration/applications.ts index 8c88819ef5..0372e50b0b 100644 --- a/qa-core/src/config/internal-api/TestConfiguration/applications.ts +++ b/qa-core/src/config/internal-api/TestConfiguration/applications.ts @@ -59,8 +59,8 @@ export default class AppApi { return [response, json] } - async revert(appId: string): Promise<[Response, Application]> { - const response = await this.api.post(`/applications/${appId}/client/revert`) + async revert(appId: string): Promise<[Response, { message: string }]> { + const response = await this.api.post(`/dev/${appId}/revert`) const json = await response.json() return [response, json] } @@ -82,8 +82,8 @@ export default class AppApi { const json = await response.json() return [response, json] } - async addScreentoApp(body: any): Promise<[Response, Application]> { + async addScreentoApp(body: any): Promise<[Response, Application]> { const response = await this.api.post(`/screens`, { body }) const json = await response.json() return [response, json] diff --git a/qa-core/src/tests/internal-api/applications/create.spec.ts b/qa-core/src/tests/internal-api/applications/create.spec.ts index 4b9a21319d..fc7901cc6f 100644 --- a/qa-core/src/tests/internal-api/applications/create.spec.ts +++ b/qa-core/src/tests/internal-api/applications/create.spec.ts @@ -158,11 +158,11 @@ describe("Internal API - /applications endpoints", () => { expect(screenResponse).toHaveStatusCode(200) expect(screen._id).toBeDefined() - - const [revertResponse, revert] = await config.applications.revert(app.appId ? app.appId : "") + // // Revert the app to published state + const [revertResponse, revert] = await config.applications.revert(app.appId as string) expect(revertResponse).toHaveStatusCode(200) expect(revert).toEqual({ - message: "App reverted successfully." + message: "Reverted changes successfully." }) // Check screen is removed From 5838eb70b4a6bbfacb4b7d3b7fdb3e45e1d69b5c Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 10 Oct 2022 09:02:17 +0100 Subject: [PATCH 118/143] turn on gsheets --- packages/server/src/api/controllers/integration.js | 8 -------- packages/server/src/integrations/index.ts | 5 +---- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/packages/server/src/api/controllers/integration.js b/packages/server/src/api/controllers/integration.js index 3d1643601b..2f11ec19ed 100644 --- a/packages/server/src/api/controllers/integration.js +++ b/packages/server/src/api/controllers/integration.js @@ -1,17 +1,9 @@ const { getDefinitions } = require("../../integrations") -const { SourceName } = require("@budibase/types") -const googlesheets = require("../../integrations/googlesheets") -const { featureFlags } = require("@budibase/backend-core") exports.fetch = async function (ctx) { ctx.status = 200 const defs = await getDefinitions() - // for google sheets integration google verification - if (featureFlags.isEnabled(featureFlags.TenantFeatureFlag.GOOGLE_SHEETS)) { - defs[SourceName.GOOGLE_SHEETS] = googlesheets.schema - } - ctx.body = defs } diff --git a/packages/server/src/integrations/index.ts b/packages/server/src/integrations/index.ts index 240f68ed91..c926aeb992 100644 --- a/packages/server/src/integrations/index.ts +++ b/packages/server/src/integrations/index.ts @@ -33,6 +33,7 @@ const DEFINITIONS: { [key: string]: Integration } = { [SourceName.ARANGODB]: arangodb.schema, [SourceName.REST]: rest.schema, [SourceName.FIRESTORE]: firebase.schema, + [SourceName.GOOGLE_SHEETS]: googlesheets.schema, [SourceName.REDIS]: redis.schema, [SourceName.SNOWFLAKE]: snowflake.schema, } @@ -66,10 +67,6 @@ if ( INTEGRATIONS[SourceName.ORACLE] = oracle.integration } -if (environment.SELF_HOSTED) { - DEFINITIONS[SourceName.GOOGLE_SHEETS] = googlesheets.schema -} - module.exports = { getDefinitions: async () => { const pluginSchemas: { [key: string]: Integration } = {} From 536b7238e93b826af375a5ab83719a04ebce8f4f Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 10 Oct 2022 11:00:45 +0100 Subject: [PATCH 119/143] redis fix for new instances, removing relationship options from google sheets integration --- packages/backend-core/src/redis/index.ts | 3 ++ .../PlusConfigForm.svelte | 44 ++++++++++--------- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/packages/backend-core/src/redis/index.ts b/packages/backend-core/src/redis/index.ts index 62e718d8ad..8a15320ff3 100644 --- a/packages/backend-core/src/redis/index.ts +++ b/packages/backend-core/src/redis/index.ts @@ -216,6 +216,9 @@ export = class RedisWrapper { async bulkGet(keys: string[]) { const db = this._db + if (keys.length === 0) { + return {} + } const prefixedKeys = keys.map(key => addDbPrefix(db, key)) let response = await this.getClient().mget(prefixedKeys) if (Array.isArray(response)) { diff --git a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/PlusConfigForm.svelte b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/PlusConfigForm.svelte index cef49d81a1..ff413094a0 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/PlusConfigForm.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/PlusConfigForm.svelte @@ -209,27 +209,29 @@ {:else} No tables found. {/if} - -
- Relationships - -
- - Tell budibase how your tables are related to get even more smart features. - -{#if relationshipInfo && relationshipInfo.length > 0} - openRelationshipModal(detail.from, detail.to)} - schema={relationshipSchema} - data={relationshipInfo} - allowEditColumns={false} - allowEditRows={false} - allowSelectRows={false} - /> -{:else} - No relationships configured. +{#if integration.relationships !== false} + +
+ Relationships + +
+ + Tell budibase how your tables are related to get even more smart features. + + {#if relationshipInfo && relationshipInfo.length > 0} +
openRelationshipModal(detail.from, detail.to)} + schema={relationshipSchema} + data={relationshipInfo} + allowEditColumns={false} + allowEditRows={false} + allowSelectRows={false} + /> + {:else} + No relationships configured. + {/if} {/if}