From ef268014c1bbad6203c5b7215c571c1ed7f0ef37 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 19 Apr 2021 10:39:27 +0100 Subject: [PATCH 01/19] v0.8.17 --- lerna.json | 2 +- packages/builder/package.json | 6 +++--- packages/client/package.json | 6 +++--- packages/server/package.json | 8 ++++---- packages/standard-components/package.json | 2 +- packages/string-templates/package.json | 2 +- packages/worker/package.json | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lerna.json b/lerna.json index bf193f9a81..76a41df08c 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.8.16", + "version": "0.8.17", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/builder/package.json b/packages/builder/package.json index df83d69095..3c1afc1bb6 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "0.8.16", + "version": "0.8.17", "license": "AGPL-3.0", "private": true, "scripts": { @@ -64,9 +64,9 @@ }, "dependencies": { "@budibase/bbui": "^1.58.13", - "@budibase/client": "^0.8.16", + "@budibase/client": "^0.8.17", "@budibase/colorpicker": "1.1.2", - "@budibase/string-templates": "^0.8.16", + "@budibase/string-templates": "^0.8.17", "@budibase/svelte-ag-grid": "^1.0.4", "@sentry/browser": "5.19.1", "@svelteschool/svelte-forms": "0.7.0", diff --git a/packages/client/package.json b/packages/client/package.json index fc68546dea..f4a535d72e 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "0.8.16", + "version": "0.8.17", "license": "MPL-2.0", "main": "dist/budibase-client.js", "module": "dist/budibase-client.js", @@ -9,13 +9,13 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/string-templates": "^0.8.16", + "@budibase/string-templates": "^0.8.17", "regexparam": "^1.3.0", "shortid": "^2.2.15", "svelte-spa-router": "^3.0.5" }, "devDependencies": { - "@budibase/standard-components": "^0.8.16", + "@budibase/standard-components": "^0.8.17", "@rollup/plugin-commonjs": "^16.0.0", "@rollup/plugin-node-resolve": "^10.0.0", "fs-extra": "^8.1.0", diff --git a/packages/server/package.json b/packages/server/package.json index 245bb01fbf..fae63a97e0 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "0.8.16", + "version": "0.8.17", "description": "Budibase Web Server", "main": "src/electron.js", "repository": { @@ -71,8 +71,8 @@ "author": "Budibase", "license": "AGPL-3.0-or-later", "dependencies": { - "@budibase/client": "^0.8.16", - "@budibase/string-templates": "^0.8.16", + "@budibase/client": "^0.8.17", + "@budibase/string-templates": "^0.8.17", "@elastic/elasticsearch": "7.10.0", "@koa/router": "8.0.0", "@sendgrid/mail": "7.1.1", @@ -126,7 +126,7 @@ "zlib": "1.0.5" }, "devDependencies": { - "@budibase/standard-components": "^0.8.16", + "@budibase/standard-components": "^0.8.17", "@jest/test-sequencer": "^24.8.0", "cross-env": "^7.0.3", "electron": "10.1.3", diff --git a/packages/standard-components/package.json b/packages/standard-components/package.json index b5d013943e..c7d765422f 100644 --- a/packages/standard-components/package.json +++ b/packages/standard-components/package.json @@ -35,7 +35,7 @@ "keywords": [ "svelte" ], - "version": "0.8.16", + "version": "0.8.17", "license": "MIT", "gitHead": "4b6efc42ed3273595c7a129411f4d883733d3321", "dependencies": { diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 53d5ab27fa..d7c053c570 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "0.8.16", + "version": "0.8.17", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.js", "module": "src/index.js", diff --git a/packages/worker/package.json b/packages/worker/package.json index 5576da31fe..3c8179d629 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/deployment", "email": "hi@budibase.com", - "version": "0.8.16", + "version": "0.8.17", "description": "Budibase Deployment Server", "main": "src/index.js", "repository": { From 806bd4e06b5c6333ba5c2a0bfa3967e0353df710 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 19 Apr 2021 22:24:13 +0100 Subject: [PATCH 02/19] Fixing an issue with the DynamoDB integration, didn't specify the correct terms for the AWS credentials. --- packages/server/src/integrations/dynamodb.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/src/integrations/dynamodb.js b/packages/server/src/integrations/dynamodb.js index 668e11e263..da95411b2b 100644 --- a/packages/server/src/integrations/dynamodb.js +++ b/packages/server/src/integrations/dynamodb.js @@ -16,7 +16,7 @@ const SCHEMA = { type: FIELD_TYPES.PASSWORD, required: true, }, - secretKey: { + secretAccessKey: { type: FIELD_TYPES.PASSWORD, required: true, }, @@ -114,7 +114,7 @@ class DynamoDBIntegration { }) } - async connect() { + connect() { AWS.config.update(this.config) } From 2ef1586d4d520d8edc01527686045b7ce5249ce8 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 19 Apr 2021 22:36:14 +0100 Subject: [PATCH 03/19] Adding cleanup operation to dynamo client. --- packages/server/src/api/controllers/query.js | 18 ++++++++++++------ packages/server/src/db/dynamoClient.js | 1 + packages/server/src/integrations/dynamodb.js | 13 +++++++++++++ 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/packages/server/src/api/controllers/query.js b/packages/server/src/api/controllers/query.js index a2badb0d0d..45dc4e0d86 100644 --- a/packages/server/src/api/controllers/query.js +++ b/packages/server/src/api/controllers/query.js @@ -116,9 +116,8 @@ exports.preview = async function(ctx) { const enrichedQuery = await enrichQueryFields(fields, parameters) - const rows = formatResponse( - await new Integration(datasource.config)[queryVerb](enrichedQuery) - ) + const integration = new Integration(datasource.config) + const rows = formatResponse(await integration[queryVerb](enrichedQuery)) // get all the potential fields in the schema const keys = rows.flatMap(Object.keys) @@ -127,6 +126,10 @@ exports.preview = async function(ctx) { rows, schemaFields: [...new Set(keys)], } + // cleanup + if (integration.end) { + integration.end() + } } exports.execute = async function(ctx) { @@ -146,10 +149,13 @@ exports.execute = async function(ctx) { ctx.request.body.parameters ) + const integration = new Integration(datasource.config) // call the relevant CRUD method on the integration class - ctx.body = formatResponse( - await new Integration(datasource.config)[query.queryVerb](enrichedQuery) - ) + ctx.body = formatResponse(await integration[query.queryVerb](enrichedQuery)) + // cleanup + if (integration.end) { + integration.end() + } } exports.destroy = async function(ctx) { diff --git a/packages/server/src/db/dynamoClient.js b/packages/server/src/db/dynamoClient.js index fcba726f84..3e9c8ced14 100644 --- a/packages/server/src/db/dynamoClient.js +++ b/packages/server/src/db/dynamoClient.js @@ -2,6 +2,7 @@ let _ = require("lodash") let env = require("../environment") const AWS_REGION = env.AWS_REGION ? env.AWS_REGION : "eu-west-1" +exports.AWS_REGION = AWS_REGION const TableInfo = { API_KEYS: { diff --git a/packages/server/src/integrations/dynamodb.js b/packages/server/src/integrations/dynamodb.js index da95411b2b..aa77d6d4f0 100644 --- a/packages/server/src/integrations/dynamodb.js +++ b/packages/server/src/integrations/dynamodb.js @@ -1,5 +1,6 @@ const AWS = require("aws-sdk") const { FIELD_TYPES, QUERY_TYPES } = require("./Integration") +const { AWS_REGION } = require("../db/dynamoClient") const SCHEMA = { docs: "https://github.com/dabit3/dynamodb-documentclient-cheat-sheet", @@ -114,10 +115,22 @@ class DynamoDBIntegration { }) } + end() { + this.disconnect() + } + connect() { AWS.config.update(this.config) } + disconnect() { + AWS.config.update({ + secretAccessKey: undefined, + accessKeyId: undefined, + region: AWS_REGION, + }) + } + async create(query) { const params = { TableName: query.table, From 93596311bb5d4a1bc60d05fc892d957fdd6b5f21 Mon Sep 17 00:00:00 2001 From: Mike Shanks Date: Wed, 12 May 2021 10:17:47 +0100 Subject: [PATCH 04/19] fix - rest api datasource not accepting parameters --- .../PropertyControls/EventsEditor/actions/ExecuteQuery.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/ExecuteQuery.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/ExecuteQuery.svelte index e18336fab5..d760d65d1e 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/ExecuteQuery.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/ExecuteQuery.svelte @@ -55,5 +55,6 @@ height={200} {query} schema={fetchQueryDefinition(query)} - editable={false} /> + editable={false} + {datasource} /> {/if} From 787d39759328187af4befea042173ba02843be47 Mon Sep 17 00:00:00 2001 From: Mike Shanks Date: Wed, 12 May 2021 17:17:08 +0100 Subject: [PATCH 05/19] desktop deprecation banner --- packages/builder/src/pages/_layout.svelte | 52 ++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/pages/_layout.svelte b/packages/builder/src/pages/_layout.svelte index ac45ff8372..169675ae98 100644 --- a/packages/builder/src/pages/_layout.svelte +++ b/packages/builder/src/pages/_layout.svelte @@ -1,5 +1,5 @@ +{#if deprecationWarning} +
+ +
+
+ From the 25th of May, Budibase is moving to a self-hosted web experience in the browser. We will cease development on the current Electron based desktop builder. +
+ +
+ read more + +
+
+ +
+{/if} +