From 81c662f0cac846aa36149e5b5701706299a994ef Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Thu, 31 Mar 2022 10:56:16 +0100 Subject: [PATCH 01/43] redis integration --- .../DatasourceNavigator/icons/Redis.svelte | 49 +++++++++++++++ .../DatasourceNavigator/icons/index.js | 2 + .../builder/src/constants/backend/index.js | 2 + packages/server/src/definitions/datasource.ts | 1 + packages/server/src/integrations/index.ts | 3 + packages/server/src/integrations/redis.ts | 61 +++++++++++++++++++ 6 files changed, 118 insertions(+) create mode 100644 packages/builder/src/components/backend/DatasourceNavigator/icons/Redis.svelte create mode 100644 packages/server/src/integrations/redis.ts diff --git a/packages/builder/src/components/backend/DatasourceNavigator/icons/Redis.svelte b/packages/builder/src/components/backend/DatasourceNavigator/icons/Redis.svelte new file mode 100644 index 0000000000..d325782fd5 --- /dev/null +++ b/packages/builder/src/components/backend/DatasourceNavigator/icons/Redis.svelte @@ -0,0 +1,49 @@ + + + + + + + + + + + + + diff --git a/packages/builder/src/components/backend/DatasourceNavigator/icons/index.js b/packages/builder/src/components/backend/DatasourceNavigator/icons/index.js index 515f20a93b..1a8df2507e 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/icons/index.js +++ b/packages/builder/src/components/backend/DatasourceNavigator/icons/index.js @@ -13,6 +13,7 @@ import Budibase from "./Budibase.svelte" import Oracle from "./Oracle.svelte" import GoogleSheets from "./GoogleSheets.svelte" import Firebase from "./Firebase.svelte" +import Redis from "./Redis.svelte" export default { BUDIBASE: Budibase, @@ -30,4 +31,5 @@ export default { ORACLE: Oracle, GOOGLE_SHEETS: GoogleSheets, FIREBASE: Firebase, + REDIS: Redis, } diff --git a/packages/builder/src/constants/backend/index.js b/packages/builder/src/constants/backend/index.js index 9a623241ca..2f5f26e476 100644 --- a/packages/builder/src/constants/backend/index.js +++ b/packages/builder/src/constants/backend/index.js @@ -179,6 +179,7 @@ export const IntegrationTypes = { INTERNAL: "INTERNAL", GOOGLE_SHEETS: "GOOGLE_SHEETS", FIREBASE: "FIREBASE", + REDIS: "REDIS", } export const IntegrationNames = { @@ -197,6 +198,7 @@ export const IntegrationNames = { [IntegrationTypes.INTERNAL]: "Internal", [IntegrationTypes.GOOGLE_SHEETS]: "Google Sheets", [IntegrationTypes.FIREBASE]: "Firebase", + [IntegrationTypes.REDIS]: "Redis", } export const SchemaTypeOptions = [ diff --git a/packages/server/src/definitions/datasource.ts b/packages/server/src/definitions/datasource.ts index 4df08683f0..23266991ee 100644 --- a/packages/server/src/definitions/datasource.ts +++ b/packages/server/src/definitions/datasource.ts @@ -49,6 +49,7 @@ export enum SourceNames { ORACLE = "ORACLE", GOOGLE_SHEETS = "GOOGLE_SHEETS", FIREBASE = "FIREBASE", + REDIS = "REDIS", } export enum IncludeRelationships { diff --git a/packages/server/src/integrations/index.ts b/packages/server/src/integrations/index.ts index 0a892d7317..711e9d2262 100644 --- a/packages/server/src/integrations/index.ts +++ b/packages/server/src/integrations/index.ts @@ -11,6 +11,7 @@ const arangodb = require("./arangodb") const rest = require("./rest") const googlesheets = require("./googlesheets") const firebase = require("./firebase") +const redis = require("./redis") const { SourceNames } = require("../definitions/datasource") const environment = require("../environment") @@ -27,6 +28,7 @@ const DEFINITIONS = { [SourceNames.ARANGODB]: arangodb.schema, [SourceNames.REST]: rest.schema, [SourceNames.FIREBASE]: firebase.schema, + [SourceNames.REDIS]: redis.schema, } const INTEGRATIONS = { @@ -43,6 +45,7 @@ const INTEGRATIONS = { [SourceNames.REST]: rest.integration, [SourceNames.FIREBASE]: firebase.integration, [SourceNames.GOOGLE_SHEETS]: googlesheets.integration, + [SourceNames.REDIS]: redis.integration, } // optionally add oracle integration if the oracle binary can be installed diff --git a/packages/server/src/integrations/redis.ts b/packages/server/src/integrations/redis.ts new file mode 100644 index 0000000000..1ec0179b15 --- /dev/null +++ b/packages/server/src/integrations/redis.ts @@ -0,0 +1,61 @@ +import { Integration, QueryTypes } from "../definitions/datasource" +import { IntegrationBase } from "./base/IntegrationBase" + +module RedisModule { + const redis = require("ioredis") + + interface RedisConfig { + host: string + port: number + username: string + password?: string + } + + const SCHEMA: Integration = { + docs: "https://redis.io/docs/", + description: "", + friendlyName: "Redis", + datasource: { + host: { + type: "string", + required: true, + default: "localhost", + }, + port: { + type: "number", + required: true, + default: 6379, + }, + username: { + type: "string", + required: false, + }, + password: { + type: "password", + required: false, + }, + }, + query: { + read: { + type: QueryTypes.JSON, + }, + }, + } + + class RedisIntegration implements IntegrationBase { + private readonly config: RedisConfig + private client: any + + constructor(config: RedisConfig) { + this.config = config + this.client = {} + } + + async read(query: { bucket: string }) {} + } + + module.exports = { + schema: SCHEMA, + integration: RedisIntegration, + } +} From 6d8254d5f02d11aafcdec00029d8f577c913b20b Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Thu, 31 Mar 2022 15:44:06 +0100 Subject: [PATCH 02/43] redis integration complete --- .../components/integration/QueryViewer.svelte | 2 +- packages/server/__mocks__/ioredis.ts | 15 ++ .../server/src/api/controllers/integration.js | 4 + packages/server/src/integrations/redis.ts | 99 ++++++++++- .../src/integrations/tests/redis.spec.js | 55 +++++++ packages/server/src/threads/utils.js | 2 + packages/server/yarn.lock | 154 +++++++++++++++--- 7 files changed, 298 insertions(+), 33 deletions(-) create mode 100644 packages/server/__mocks__/ioredis.ts create mode 100644 packages/server/src/integrations/tests/redis.spec.js diff --git a/packages/builder/src/components/integration/QueryViewer.svelte b/packages/builder/src/components/integration/QueryViewer.svelte index 19c1165d9e..8f6f9eeb53 100644 --- a/packages/builder/src/components/integration/QueryViewer.svelte +++ b/packages/builder/src/components/integration/QueryViewer.svelte @@ -72,7 +72,7 @@ fields = response.schema notifications.success("Query executed successfully") } catch (error) { - notifications.error("Error previewing query") + notifications.error(`Query Error: ${error.message}`) } } diff --git a/packages/server/__mocks__/ioredis.ts b/packages/server/__mocks__/ioredis.ts new file mode 100644 index 0000000000..889f4355c4 --- /dev/null +++ b/packages/server/__mocks__/ioredis.ts @@ -0,0 +1,15 @@ +// @ts-nocheck + +const Redis = function () { + this.get = jest.fn().mockResolvedValue({ response: "value" }) + this.set = jest.fn().mockResolvedValue({ response: "OK" }) + this.del = jest.fn().mockResolvedValue({ value: 1 }) + this.disconnect = jest.fn() + this.pipeline = jest.fn(() => ({ + exec: jest.fn().mockResolvedValue([[null, ["result"]]]), + })) + + this.close = jest.fn() +} + +module.exports = Redis diff --git a/packages/server/src/api/controllers/integration.js b/packages/server/src/api/controllers/integration.js index f3f3309c02..136db49091 100644 --- a/packages/server/src/api/controllers/integration.js +++ b/packages/server/src/api/controllers/integration.js @@ -5,6 +5,10 @@ const { SourceNames } = require("../../definitions/datasource") const googlesheets = require("../../integrations/googlesheets") const env = require("../../environment") +// const homedir = require("os").homedir(); +// const path = require("path") +// const customDatasources = path.resolve(homedir, ".budibase") + exports.fetch = async function (ctx) { ctx.status = 200 const defs = cloneDeep(definitions) diff --git a/packages/server/src/integrations/redis.ts b/packages/server/src/integrations/redis.ts index 1ec0179b15..b80158d464 100644 --- a/packages/server/src/integrations/redis.ts +++ b/packages/server/src/integrations/redis.ts @@ -1,9 +1,11 @@ -import { Integration, QueryTypes } from "../definitions/datasource" -import { IntegrationBase } from "./base/IntegrationBase" +import { + DatasourceFieldTypes, + Integration, + QueryTypes, +} from "../definitions/datasource" +import Redis from "ioredis" module RedisModule { - const redis = require("ioredis") - interface RedisConfig { host: string port: number @@ -36,22 +38,105 @@ module RedisModule { }, }, query: { + create: { + type: QueryTypes.FIELDS, + fields: { + key: { + type: DatasourceFieldTypes.STRING, + required: true, + }, + value: { + type: DatasourceFieldTypes.STRING, + required: true, + }, + }, + }, read: { + readable: true, + type: QueryTypes.FIELDS, + fields: { + key: { + type: DatasourceFieldTypes.STRING, + required: true, + }, + }, + }, + delete: { + type: QueryTypes.FIELDS, + fields: { + key: { + type: DatasourceFieldTypes.STRING, + required: true, + }, + }, + }, + command: { + readable: true, + displayName: "Redis Command", type: QueryTypes.JSON, }, }, } - class RedisIntegration implements IntegrationBase { + class RedisIntegration { private readonly config: RedisConfig private client: any constructor(config: RedisConfig) { this.config = config - this.client = {} + this.client = new Redis({ + host: this.config.host, + port: this.config.port, + username: this.config.username, + password: this.config.password, + }) } - async read(query: { bucket: string }) {} + async disconnect() { + this.client.disconnect() + } + + async redisContext(query: Function) { + try { + return await query() + } catch (err) { + throw new Error(`Redis error: ${err}`) + } finally { + this.disconnect() + } + } + + async create(query: { key: string; value: string }) { + return this.redisContext(async () => { + const response = await this.client.set(query.key, query.value) + return response + }) + } + + async read(query: { key: string }) { + return this.redisContext(async () => { + const response = await this.client.get(query.key) + return response + }) + } + + async delete(query: { key: string }) { + return this.redisContext(async () => { + const response = await this.client.del(query.key) + return response + }) + } + + async command(query: { json: string }) { + return this.redisContext(async () => { + const commands = query.json.trim().split(" ") + const pipeline = this.client.pipeline([commands]) + const result = await pipeline.exec() + return { + response: result[0][1], + } + }) + } } module.exports = { diff --git a/packages/server/src/integrations/tests/redis.spec.js b/packages/server/src/integrations/tests/redis.spec.js new file mode 100644 index 0000000000..f68bc03fc2 --- /dev/null +++ b/packages/server/src/integrations/tests/redis.spec.js @@ -0,0 +1,55 @@ +const redis = require("ioredis") +const RedisIntegration = require("../redis") +jest.mock("ioredis") + +class TestConfiguration { + constructor(config = {}) { + this.integration = new RedisIntegration.integration(config) + } +} + +describe("Redis Integration", () => { + let config + + beforeEach(() => { + config = new TestConfiguration() + }) + + it("calls the create method with the correct params", async () => { + const body = { + key: "key", + value: "value" + } + const response = await config.integration.create(body) + expect(config.integration.client.set).toHaveBeenCalledWith(body.key, body.value) + }) + + it("calls the read method with the correct params", async () => { + const body = { + key: "test" + } + const response = await config.integration.read(body) + expect(config.integration.client.get).toHaveBeenCalledWith(body.key) + expect(response).toEqual(expect.any(Object)) + }) + + it("calls the delete method with the correct params", async () => { + const body = { + key: "test" + } + const response = await config.integration.delete(body) + expect(config.integration.client.del).toHaveBeenCalledWith(body.key) + expect(response).toEqual(expect.any(Object)) + }) + + it("calls the command method with the correct params", async () => { + const body = { + json: "KEYS *" + } + + const response = await config.integration.command(body) + + expect(config.integration.client.pipeline).toHaveBeenCalledWith([["KEYS", "*"]]) + expect(response).toEqual(expect.any(Array)) + }) +}) \ No newline at end of file diff --git a/packages/server/src/threads/utils.js b/packages/server/src/threads/utils.js index bf89791874..f15579bb43 100644 --- a/packages/server/src/threads/utils.js +++ b/packages/server/src/threads/utils.js @@ -72,7 +72,9 @@ exports.hasExtraData = response => { return ( typeof response === "object" && !Array.isArray(response) && + response && response.data != null && + response && response.info != null ) } diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 0ad1593a13..845185f12c 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -995,10 +995,10 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@^1.0.97": - version "1.0.97" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.0.97.tgz#32bd09324437256bcfedda11d34fc4c4cb1a5b9b" - integrity sha512-NLH6fbWpU0Ej0dTL37PoEAMRMI8zYVwnJI1b74VqWFmyR/moOmyPcptfLnysY1aD5hizHgz+P8sFYsSGKiMozg== +"@budibase/backend-core@^1.0.98-alpha.9": + version "1.0.103" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.0.103.tgz#283f2ccf14fd32962c6abe1f653796fb315b2c06" + integrity sha512-swnmPWQwgjQoNinl2G8rGZHts/fZ9mYI5zzzZpLMHVElrxp7Y7FueNNXX1x6wYlfSlNH4eVhbkWkyh/5Q07j9Q== dependencies: "@techpass/passport-openidconnect" "^0.3.0" aws-sdk "^2.901.0" @@ -1068,13 +1068,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/bbui@^1.0.97": - version "1.0.97" - resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-1.0.97.tgz#6d36cdbeeaaf3a7b299a8a677f0739b682b49bf3" - integrity sha512-AMwDCz0qm4rZp50TY83JJTjqOAlZPdirzsLM4Iydn2dWlaqpcwnB3VZOzgb+mC72uH5eKeqI74Nu7hh3CvtXBw== +"@budibase/bbui@^1.0.103": + version "1.0.103" + resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-1.0.103.tgz#c600821766a7fe4e9fc21f223fd870326d275cdf" + integrity sha512-F15dxHTD95WAlql7lxL+tw8+uAzYmjArOAOzEhS8DjWU1QPkJsAi+OnGnarz00OrxbXvFLJeh6E+ez3TknkxJA== dependencies: "@adobe/spectrum-css-workflow-icons" "^1.2.1" - "@budibase/string-templates" "^1.0.97" + "@budibase/string-templates" "^1.0.103" "@spectrum-css/actionbutton" "^1.0.1" "@spectrum-css/actiongroup" "^1.0.1" "@spectrum-css/avatar" "^3.0.2" @@ -1120,14 +1120,14 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/client@^1.0.97": - version "1.0.97" - resolved "https://registry.yarnpkg.com/@budibase/client/-/client-1.0.97.tgz#e110737c98fb0f7145cf1f5ec41912ff46fc0c3f" - integrity sha512-bdXVVZe6m+P4azdGvU2AoVMDC+bQ2MUkot5hTcRTfyCAwqCQABlkL/t+iA4Zv8feFc5ZUtfrsCIm+jOKGEUUow== +"@budibase/client@^1.0.98-alpha.9": + version "1.0.103" + resolved "https://registry.yarnpkg.com/@budibase/client/-/client-1.0.103.tgz#041b15476c7aa284cbabf1b429aa00d2bf4b9367" + integrity sha512-6R2Z89Mm8mjlTavIW+LfvnIIt+gJ4AJPLygm2QHpl4FfjgwHq3Kp7tuyjs7Fgwz54YwPS2GeAoOGWZFkHn5usA== dependencies: - "@budibase/bbui" "^1.0.97" - "@budibase/frontend-core" "^1.0.97" - "@budibase/string-templates" "^1.0.97" + "@budibase/bbui" "^1.0.103" + "@budibase/frontend-core" "^1.0.103" + "@budibase/string-templates" "^1.0.103" "@spectrum-css/button" "^3.0.3" "@spectrum-css/card" "^3.0.3" "@spectrum-css/divider" "^1.0.3" @@ -1139,20 +1139,23 @@ apexcharts "^3.22.1" dayjs "^1.10.5" downloadjs "1.4.7" + leaflet "^1.7.1" regexparam "^1.3.0" rollup-plugin-polyfill-node "^0.8.0" + sanitize-html "^2.7.0" + screenfull "^6.0.1" shortid "^2.2.15" svelte "^3.38.2" svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" svelte-spa-router "^3.0.5" -"@budibase/frontend-core@^1.0.97": - version "1.0.97" - resolved "https://registry.yarnpkg.com/@budibase/frontend-core/-/frontend-core-1.0.97.tgz#530a0c716fbc93dd38d7abcc22b3131030f9cd16" - integrity sha512-B2LG9UIEKSLE0NBhPlVLYXAypjBZgiPdqGwoNm7xcWZHG12YzYWqflV3NLwaDx9Qt3UTIaRzXqBGoNNQCGdUdQ== +"@budibase/frontend-core@^1.0.103": + version "1.0.103" + resolved "https://registry.yarnpkg.com/@budibase/frontend-core/-/frontend-core-1.0.103.tgz#68f6b903dd71188bd4ed181853ceccbf3cb2e99e" + integrity sha512-A+nC1H2MyH486qvAT5AkKIW3kwaf6EvsiWez0wXqGJsF4ujQrjytYZm1sIArj+Js/71cgJBFSd+tX5jALzEbUA== dependencies: - "@budibase/bbui" "^1.0.97" + "@budibase/bbui" "^1.0.103" lodash "^4.17.21" svelte "^3.46.2" @@ -1199,10 +1202,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/string-templates@^1.0.97": - version "1.0.97" - resolved "https://registry.yarnpkg.com/@budibase/string-templates/-/string-templates-1.0.97.tgz#b7485cb8774d6dff8280fbf411c6383b82add72d" - integrity sha512-8NfpYzDJgSkic3E0ARfNsPsFEMmOcH+kEeTioLkNnkKrviIRhSQ9Oa3S87QIYo5WGYxpEFEfhYutXsbp3GTLbg== +"@budibase/string-templates@^1.0.103", "@budibase/string-templates@^1.0.98-alpha.9": + version "1.0.103" + resolved "https://registry.yarnpkg.com/@budibase/string-templates/-/string-templates-1.0.103.tgz#7d9eb5e066af29fa488c9eeb88bf470838b7bb51" + integrity sha512-CpPP4kBrvWtXYatMz1uROuLPN5VYqcvNmMcfal3pw2kCimGycFGYz/A2wkQ0UTt5ZSmNGAAGDSqgIH2PwCaTzg== dependencies: "@budibase/handlebars-helpers" "^0.11.8" dayjs "^1.10.4" @@ -4985,11 +4988,25 @@ doctrine@3.0.0, doctrine@^3.0.0: dependencies: esutils "^2.0.2" +dom-serializer@^1.0.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.3.2.tgz#6206437d32ceefaec7161803230c7a20bc1b4d91" + integrity sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig== + dependencies: + domelementtype "^2.0.1" + domhandler "^4.2.0" + entities "^2.0.0" + dom-walk@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== +domelementtype@^2.0.1, domelementtype@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.2.0.tgz#9a0b6c2782ed6a1c7323d42267183df9bd8b1d57" + integrity sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A== + domexception@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" @@ -5004,6 +5021,22 @@ domexception@^2.0.1: dependencies: webidl-conversions "^5.0.0" +domhandler@^4.0.0, domhandler@^4.2.0: + version "4.3.1" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.1.tgz#8d792033416f59d68bc03a5aa7b018c1ca89279c" + integrity sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ== + dependencies: + domelementtype "^2.2.0" + +domutils@^2.5.2: + version "2.8.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" + integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== + dependencies: + dom-serializer "^1.0.1" + domelementtype "^2.2.0" + domhandler "^4.2.0" + dot-prop@^5.2.0: version "5.3.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" @@ -5190,6 +5223,11 @@ ent@^2.2.0: resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" integrity sha1-6WQhkyWiHQX0RGai9obtbOX13R0= +entities@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" + integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== + entities@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" @@ -5433,6 +5471,11 @@ escape-string-regexp@^2.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + escodegen@^1.9.1: version "1.14.3" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" @@ -6764,6 +6807,16 @@ html-tag@^2.0.0: is-self-closing "^1.0.1" kind-of "^6.0.0" +htmlparser2@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7" + integrity sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A== + dependencies: + domelementtype "^2.0.1" + domhandler "^4.0.0" + domutils "^2.5.2" + entities "^2.0.0" + http-assert@^1.3.0: version "1.5.0" resolved "https://registry.yarnpkg.com/http-assert/-/http-assert-1.5.0.tgz#c389ccd87ac16ed2dfa6246fd73b926aa00e6b8f" @@ -7312,6 +7365,11 @@ is-plain-object@^2.0.3, is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" +is-plain-object@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" + integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== + is-potential-custom-element-name@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" @@ -8904,6 +8962,11 @@ lcid@^2.0.0: dependencies: invert-kv "^2.0.0" +leaflet@^1.7.1: + version "1.7.1" + resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.7.1.tgz#10d684916edfe1bf41d688a3b97127c0322a2a19" + integrity sha512-/xwPEBidtg69Q3HlqPdU3DnrXQOvQU/CCHA1tcDQVzOwm91YMYaILjNp7L4Eaw5Z4sOYdbBz6koWyibppd8Zqw== + left-pad@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" @@ -9688,6 +9751,11 @@ nanoid@^2.1.0: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-2.1.11.tgz#ec24b8a758d591561531b4176a01e3ab4f0f0280" integrity sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA== +nanoid@^3.3.1: + version "3.3.2" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.2.tgz#c89622fafb4381cd221421c69ec58547a1eec557" + integrity sha512-CuHBogktKwpm5g2sRgv83jEy2ijFzBwMoYA60orPDR7ynsLijJDqgsi4RDGj3OJpy3Ieb+LYwiRmIOGyytgITA== + nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -10245,6 +10313,11 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" +parse-srcset@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/parse-srcset/-/parse-srcset-1.0.2.tgz#f2bd221f6cc970a938d88556abc589caaaa2bde1" + integrity sha1-8r0iH2zJcKk42IVWq8WJyqqiveE= + parse5@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" @@ -10598,6 +10671,15 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= +postcss@^8.3.11: + version "8.4.12" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.12.tgz#1e7de78733b28970fa4743f7da6f3763648b1905" + integrity sha512-lg6eITwYe9v6Hr5CncVbK70SoioNQIq81nsaG86ev5hAidQvmOeETBqs7jm43K2F5/Ley3ytDtriImV6TpNiSg== + dependencies: + nanoid "^3.3.1" + picocolors "^1.0.0" + source-map-js "^1.0.2" + postgres-array@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/postgres-array/-/postgres-array-2.0.0.tgz#48f8fce054fbc69671999329b8834b772652d82e" @@ -11636,6 +11718,18 @@ sane@^4.0.3: minimist "^1.1.1" walker "~1.0.5" +sanitize-html@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/sanitize-html/-/sanitize-html-2.7.0.tgz#e106205b468aca932e2f9baf241f24660d34e279" + integrity sha512-jfQelabOn5voO7FAfnQF7v+jsA6z9zC/O4ec0z3E35XPEtHYJT/OdUziVWlKW4irCr2kXaQAyXTXDHWAibg1tA== + dependencies: + deepmerge "^4.2.2" + escape-string-regexp "^4.0.0" + htmlparser2 "^6.0.0" + is-plain-object "^5.0.0" + parse-srcset "^1.0.2" + postcss "^8.3.11" + sanitize-s3-objectkey@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/sanitize-s3-objectkey/-/sanitize-s3-objectkey-0.0.1.tgz#efa9887cd45275b40234fb4bb12fc5754fe64e7e" @@ -11674,6 +11768,11 @@ schema-utils@^3.1.0, schema-utils@^3.1.1: ajv "^6.12.5" ajv-keywords "^3.5.2" +screenfull@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/screenfull/-/screenfull-6.0.1.tgz#3b71e6f06b72d817a8d3be73c45ebe71fa8da1ce" + integrity sha512-yzQW+j4zMUBQC51xxWaoDYjxOtl8Kn+xvue3p6v/fv2pIi1jH4AldgVLU8TBfFVgH2x3VXlf3+YiA/AYIPlaew== + search-params@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/search-params/-/search-params-3.0.0.tgz#dbc7c243058e5a33ae1e9870be91f5aced4100d8" @@ -11940,6 +12039,11 @@ source-list-map@^2.0.1: resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== +source-map-js@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== + source-map-resolve@^0.5.0: version "0.5.3" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" From af9a2cfd2fb0b3d80d4da2a95227cde67895e7ed Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Thu, 31 Mar 2022 15:58:45 +0100 Subject: [PATCH 03/43] Add static html error page to nginx for 502, 503, 504 --- hosting/docker-compose.dev.yaml | 1 + hosting/nginx.dev.conf.hbs | 6 ++ hosting/nginx.prod.conf.hbs | 8 +- hosting/proxy/Dockerfile | 3 +- hosting/proxy/error.html | 141 ++++++++++++++++++++++++++++++++ 5 files changed, 157 insertions(+), 2 deletions(-) create mode 100644 hosting/proxy/error.html diff --git a/hosting/docker-compose.dev.yaml b/hosting/docker-compose.dev.yaml index 43b8526e9e..be0bc74a26 100644 --- a/hosting/docker-compose.dev.yaml +++ b/hosting/docker-compose.dev.yaml @@ -27,6 +27,7 @@ services: image: nginx:latest volumes: - ./.generated-nginx.dev.conf:/etc/nginx/nginx.conf + - ./proxy/error.html:/usr/share/nginx/html/error.html ports: - "${MAIN_PORT}:10000" depends_on: diff --git a/hosting/nginx.dev.conf.hbs b/hosting/nginx.dev.conf.hbs index 9fc2345fb2..9398b7e719 100644 --- a/hosting/nginx.dev.conf.hbs +++ b/hosting/nginx.dev.conf.hbs @@ -28,6 +28,12 @@ http { ignore_invalid_headers off; proxy_buffering off; + error_page 502 503 504 /error.html; + location = /error.html { + root /usr/share/nginx/html; + internal; + } + location /db/ { proxy_pass http://couchdb-service:5984; rewrite ^/db/(.*)$ /$1 break; diff --git a/hosting/nginx.prod.conf.hbs b/hosting/nginx.prod.conf.hbs index 8560ad0198..ad6ffb42cb 100644 --- a/hosting/nginx.prod.conf.hbs +++ b/hosting/nginx.prod.conf.hbs @@ -44,11 +44,17 @@ http { proxy_buffering off; # port_in_redirect off; + error_page 502 503 504 /error.html; + location = /error.html { + root /usr/share/nginx/html; + internal; + } + # Security Headers add_header X-Frame-Options SAMEORIGIN always; add_header X-Content-Type-Options nosniff always; add_header X-XSS-Protection "1; mode=block" always; - add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdn.budi.live https://js.intercomcdn.com https://widget.intercom.io; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://fonts.googleapis.com https://rsms.me https://maxcdn.bootstrapcdn.com; object-src 'none'; base-uri 'self'; connect-src 'self' https://api-iam.intercom.io https://app.posthog.com wss://nexus-websocket-a.intercom.io ; font-src 'self' data: https://cdn.jsdelivr.net https://fonts.gstatic.com https://rsms.me https://maxcdn.bootstrapcdn.com; frame-src 'self' https:; img-src http: https: data:; manifest-src 'self'; media-src 'self'; worker-src 'none';" always; + add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdn.budi.live https://js.intercomcdn.com https://widget.intercom.io https://jspm.dev; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://fonts.googleapis.com https://rsms.me https://maxcdn.bootstrapcdn.com; object-src 'none'; base-uri 'self'; connect-src 'self' https://api-iam.intercom.io https://app.posthog.com wss://nexus-websocket-a.intercom.io ; font-src 'self' data: https://cdn.jsdelivr.net https://fonts.gstatic.com https://rsms.me https://maxcdn.bootstrapcdn.com; frame-src 'self' https:; img-src http: https: data:; manifest-src 'self'; media-src 'self'; worker-src 'none';" always; # upstreams set $apps {{ apps }}; diff --git a/hosting/proxy/Dockerfile b/hosting/proxy/Dockerfile index b577e3e40f..a2b17d3333 100644 --- a/hosting/proxy/Dockerfile +++ b/hosting/proxy/Dockerfile @@ -1,2 +1,3 @@ FROM nginx:latest -COPY .generated-nginx.prod.conf /etc/nginx/nginx.conf \ No newline at end of file +COPY .generated-nginx.prod.conf /etc/nginx/nginx.conf +COPY error.html /usr/share/nginx/html/error.html \ No newline at end of file diff --git a/hosting/proxy/error.html b/hosting/proxy/error.html new file mode 100644 index 0000000000..f1c7647e0a --- /dev/null +++ b/hosting/proxy/error.html @@ -0,0 +1,141 @@ + + + + + Budibase + + + + + + + + + + + + + +
+
+
+ Budibase Logo +
+
+
+

+

+ Houston we have a problem! +

+

+

+
+
+ Return home + Check out status +
+
+
+ +
+
+ + + \ No newline at end of file From 6e9ddfd696a06520bffdb80d68d25ace1cc50d08 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Fri, 1 Apr 2022 10:48:17 +0100 Subject: [PATCH 04/43] tidy up --- packages/server/src/api/controllers/integration.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/server/src/api/controllers/integration.js b/packages/server/src/api/controllers/integration.js index 136db49091..f3f3309c02 100644 --- a/packages/server/src/api/controllers/integration.js +++ b/packages/server/src/api/controllers/integration.js @@ -5,10 +5,6 @@ const { SourceNames } = require("../../definitions/datasource") const googlesheets = require("../../integrations/googlesheets") const env = require("../../environment") -// const homedir = require("os").homedir(); -// const path = require("path") -// const customDatasources = path.resolve(homedir, ".budibase") - exports.fetch = async function (ctx) { ctx.status = 200 const defs = cloneDeep(definitions) From 5801eb886c3b99e02679277863a58201a4acab6c Mon Sep 17 00:00:00 2001 From: Dean Date: Wed, 6 Apr 2022 10:10:53 +0100 Subject: [PATCH 05/43] Initial commit of screen workflow updates --- .../NavigationPanel/DatasourceModal.svelte | 153 ++++++++++++++++++ .../NavigationPanel/NewScreenModal.svelte | 134 ++++++--------- .../NavigationPanel/ScreenDetailsModal.svelte | 28 ++-- .../NavigationPanel/ScreenWizard.svelte | 53 ++++-- 4 files changed, 257 insertions(+), 111 deletions(-) create mode 100644 packages/builder/src/components/design/NavigationPanel/DatasourceModal.svelte diff --git a/packages/builder/src/components/design/NavigationPanel/DatasourceModal.svelte b/packages/builder/src/components/design/NavigationPanel/DatasourceModal.svelte new file mode 100644 index 0000000000..45b721ee49 --- /dev/null +++ b/packages/builder/src/components/design/NavigationPanel/DatasourceModal.svelte @@ -0,0 +1,153 @@ + + + + + {#each filteredSources.otherSources as datasource} +
+
+ +
+
+
{datasource.name}
+
+
+ {#if Array.isArray(datasource.entities)} + {#each datasource.entities.filter(table => table._id !== "ta_users") as table} +
x.table === table.name)} + on:click={() => toggleScreenSelection(table)} + > + + + + {table.name} +
+ {/each} + {/if} + {#if datasource["entities"] && !Array.isArray(datasource.entities)} + {#each Object.keys(datasource.entities).filter(table => table._id !== "ta_users") as table_key} +
x.table === datasource.entities[table_key].name + )} + on:click={() => + toggleScreenSelection(datasource.entities[table_key])} + > + + + + {datasource.entities[table_key].name} +
+ {/each} + {/if} + {/each} + + -
- {#if showProgressCircle} - - {/if} -
+ { + analytics.captureEvent(Events.SCREEN.CREATE_ROLE_UPDATED, { + screenAccessRole, + }) + }} label="Screen access" getOptionLabel={role => role.name} getOptionValue={role => role._id} diff --git a/packages/builder/src/components/design/NavigationPanel/ScreenDetailsModal.svelte b/packages/builder/src/components/design/NavigationPanel/ScreenDetailsModal.svelte index c5e76e9948..26d73949d2 100644 --- a/packages/builder/src/components/design/NavigationPanel/ScreenDetailsModal.svelte +++ b/packages/builder/src/components/design/NavigationPanel/ScreenDetailsModal.svelte @@ -4,6 +4,7 @@ import { selectedAccessRole, allScreens } from "builderStore" import { get } from "svelte/store" import { roles } from "stores/backend" + import analytics, { Events } from "analytics" export let onConfirm export let onCancel @@ -53,7 +54,6 @@ cancelText={"Back"} disabled={!screenAccessRole || !screenUrl || routeError || !touched} > - - { + analytics.captureEvent(Events.SCREEN.CREATE_ROLE_UPDATED, { + screenAccessRole, + }) + }} + label="Access" + getOptionLabel={role => role.name} + getOptionValue={role => role._id} + getOptionColor={role => role.color} + options={$roles} + /> +
+ + newScreenModal.show()} + initialUrl={blankScreenUrl} /> From cf15ed25115c2da8fb289ff6e0e615b449416538 Mon Sep 17 00:00:00 2001 From: Dean Date: Fri, 22 Apr 2022 14:57:13 +0100 Subject: [PATCH 15/43] Minor modal refactor for testing. Updates to the cypress tests around creating screens --- .../cypress/integration/createBinding.spec.js | 2 +- .../cypress/integration/createScreen.js | 14 +- packages/builder/cypress/support/commands.js | 43 ++++- .../NavigationPanel/DatasourceModal.svelte | 164 +++++++++--------- .../NavigationPanel/NewScreenModal.svelte | 2 +- .../NavigationPanel/ScreenWizard.svelte | 2 +- 6 files changed, 134 insertions(+), 93 deletions(-) diff --git a/packages/builder/cypress/integration/createBinding.spec.js b/packages/builder/cypress/integration/createBinding.spec.js index 8bf1ec8ea4..57cd0cc5fc 100644 --- a/packages/builder/cypress/integration/createBinding.spec.js +++ b/packages/builder/cypress/integration/createBinding.spec.js @@ -26,7 +26,7 @@ filterTests(['smoke', 'all'], () => { it("should add a URL param binding", () => { const paramName = "foo" - cy.createScreen("Test Param", `/test/:${paramName}`) + cy.createScreen(`/test/:${paramName}`) cy.addComponent("Elements", "Paragraph").then(componentId => { addSettingBinding("text", `URL.${paramName}`) // The builder preview pages don't have a real URL, so all we can do diff --git a/packages/builder/cypress/integration/createScreen.js b/packages/builder/cypress/integration/createScreen.js index 75132a22ba..f83de22df8 100644 --- a/packages/builder/cypress/integration/createScreen.js +++ b/packages/builder/cypress/integration/createScreen.js @@ -9,27 +9,27 @@ filterTests(["smoke", "all"], () => { }) it("Should successfully create a screen", () => { - cy.createScreen("Test Screen", "/test") + cy.createScreen("/test") cy.get(".nav-items-container").within(() => { cy.contains("/test").should("exist") }) }) it("Should update the url", () => { - cy.createScreen("Test Screen", "test with spaces") + cy.createScreen("test with spaces") cy.get(".nav-items-container").within(() => { cy.contains("/test-with-spaces").should("exist") }) }) it("Should create a blank screen with the selected access level", () => { - cy.createScreen("Test Screen Admin", "admin only", "Admin") + cy.createScreen("admin only", "Admin") cy.get(".nav-items-container").within(() => { cy.contains("/admin-only").should("exist") }) - cy.createScreen("Test Screen Public", "open to all", "Public") + cy.createScreen("open to all", "Public") cy.get(".nav-items-container").within(() => { cy.contains("/open-to-all").should("exist") @@ -37,5 +37,11 @@ filterTests(["smoke", "all"], () => { cy.get(".nav-item").contains("/test-screen").should("not.exist") }) }) + + it("Should create a set of datasource screens with the selected access level", () => { + + cy.createDatasourceScreen("Cypress Tests", "Public") + + }) }) }) diff --git a/packages/builder/cypress/support/commands.js b/packages/builder/cypress/support/commands.js index 7549270af4..1966957edb 100644 --- a/packages/builder/cypress/support/commands.js +++ b/packages/builder/cypress/support/commands.js @@ -142,7 +142,7 @@ Cypress.Commands.add("createTestApp", () => { const appName = "Cypress Tests" cy.deleteApp(appName) cy.createApp(appName, "This app is used for Cypress testing.") - cy.createScreen("home", "home") + cy.createScreen("home") }) Cypress.Commands.add("createTestTableWithData", () => { @@ -283,28 +283,59 @@ Cypress.Commands.add("navigateToDataSection", () => { }) //Blank -Cypress.Commands.add("createScreen", (screenName, route, accessLevelLabel) => { +Cypress.Commands.add("createScreen", (route, accessLevelLabel) => { cy.contains("Design").click() cy.get("[aria-label=AddCircle]").click() cy.get(".spectrum-Modal").within(() => { - cy.get(".item").contains("Blank").click() + cy.get(".item").contains("Blank screen").click() cy.get(".spectrum-Button").contains("Continue").click({ force: true }) cy.wait(500) }) cy.get(".spectrum-Dialog-grid").within(() => { cy.get(".spectrum-Form-itemField").eq(0).type(route) + cy.get(".spectrum-Button").contains("Continue").click({ force: true }) + cy.wait(1000) + }) + cy.get(".spectrum-Modal").within(() => { if (accessLevelLabel) { cy.get(".spectrum-Picker-label").click() cy.wait(500) cy.contains(accessLevelLabel).click() } - - cy.get(".spectrum-Button").contains("Continue").click({ force: true }) - cy.wait(1000) + cy.get(".spectrum-Button").contains("Done").click({ force: true }) }) }) +Cypress.Commands.add("createDatasourceScreen", (datasourceName, accessLevelLabel) => { + cy.contains("Design").click() + cy.get("[aria-label=AddCircle]").click() + cy.get(".spectrum-Modal").within(() => { + cy.get(".item").contains("Autogenerated screens").click() + cy.get(".spectrum-Button").contains("Continue").click({ force: true }) + cy.wait(500) + }) + cy.get(".spectrum-Modal [data-cy='data-source-modal']").within(() => { + cy.get(".data-source-entry").contains(datasourceName).should("exist") + cy.get(".data-source-entry").contains(datasourceName).click({ force: true }) + + cy.get(".data-source-entry").contains(datasourceName).get(".data-source-check").should("exist") + cy.get(".spectrum-Button").contains("Confirm").click({ force: true }) + }) + + cy.get(".spectrum-Modal").within(() => { + if (accessLevelLabel) { + cy.get(".spectrum-Picker-label").click() + cy.wait(500) + cy.contains(accessLevelLabel).click() + } + cy.get(".spectrum-Button").contains("Done").click({ force: true }) + }) + + cy.contains("Design").click() +}) + + Cypress.Commands.add("navigateToAutogeneratedModal", () => { // Screen name must already exist within data source cy.contains("Design").click() diff --git a/packages/builder/src/components/design/NavigationPanel/DatasourceModal.svelte b/packages/builder/src/components/design/NavigationPanel/DatasourceModal.svelte index 17a8556831..1cb3856165 100644 --- a/packages/builder/src/components/design/NavigationPanel/DatasourceModal.svelte +++ b/packages/builder/src/components/design/NavigationPanel/DatasourceModal.svelte @@ -60,90 +60,94 @@ }) - - - {#each filteredSources as datasource} -
-
-
- + + + + {#each filteredSources as datasource} +
+
+
+ +
+
{datasource.name}
-
{datasource.name}
-
- {#if Array.isArray(datasource.entities)} - {#each datasource.entities.filter(table => table._id !== "ta_users") as table} -
x.table === table.name)} - on:click={() => toggleScreenSelection(table, datasource)} - > - - - - {table.name} - - {#if selectedScreens.find(x => x.table === table.name)} - - - - {/if} -
- {/each} - {/if} - {#if datasource["entities"] && !Array.isArray(datasource.entities)} - {#each Object.keys(datasource.entities).filter(table => table._id !== "ta_users") as table_key} -
x.table === datasource.entities[table_key].name - )} - on:click={() => - toggleScreenSelection( - datasource.entities[table_key], - datasource + {#if Array.isArray(datasource.entities)} + {#each datasource.entities.filter(table => table._id !== "ta_users") as table} +
x.table === table.name )} - > - toggleScreenSelection(table, datasource)} > - - - {datasource.entities[table_key].name} + + + + {table.name} - {#if selectedScreens.find(x => x.table === datasource.entities[table_key].name)} - - - - {/if} -
- {/each} - {/if} -
- {/each} -
-
+ {#if selectedScreens.find(x => x.table === table.name)} + + + + {/if} +
+ {/each} + {/if} + {#if datasource["entities"] && !Array.isArray(datasource.entities)} + {#each Object.keys(datasource.entities).filter(table => table._id !== "ta_users") as table_key} +
x.table === datasource.entities[table_key].name + )} + on:click={() => + toggleScreenSelection( + datasource.entities[table_key], + datasource + )} + > + + + + {datasource.entities[table_key].name} + + {#if selectedScreens.find(x => x.table === datasource.entities[table_key].name)} + + + + {/if} +
+ {/each} + {/if} +
+ {/each} + + + From b05d1d9708fe8140f137630864ec7a6d80ac894c Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 25 Apr 2022 10:24:49 +0100 Subject: [PATCH 18/43] merge --- packages/server/src/integrations/redis.ts | 8 +- packages/server/yarn.lock | 183 ++++++++++++++++------ 2 files changed, 138 insertions(+), 53 deletions(-) diff --git a/packages/server/src/integrations/redis.ts b/packages/server/src/integrations/redis.ts index b80158d464..29971c4b62 100644 --- a/packages/server/src/integrations/redis.ts +++ b/packages/server/src/integrations/redis.ts @@ -49,6 +49,9 @@ module RedisModule { type: DatasourceFieldTypes.STRING, required: true, }, + ttl: { + type: DatasourceFieldTypes.NUMBER, + }, }, }, read: { @@ -106,9 +109,12 @@ module RedisModule { } } - async create(query: { key: string; value: string }) { + async create(query: { key: string; value: string; ttl: number }) { return this.redisContext(async () => { const response = await this.client.set(query.key, query.value) + if (query.ttl) { + await this.client.expire(query.key, query.ttl) + } return response }) } diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index ec2bbc9398..3bf3f25d9c 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -996,9 +996,9 @@ integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== "@budibase/backend-core@^1.0.105-alpha.0": - version "1.0.113" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.0.113.tgz#4ae128eea13126227e9147a1f1703ad12a25c1c6" - integrity sha512-lYV8AYGxj1ggbhEmE1IPLgguEJa8lkCbilmDGLCSttXwz4teXGlxmWl1Wrssheh2StJTvD7AJth414DUHvNmNw== + version "1.0.119" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.0.119.tgz#2c5b6d9f3d0eb66f26974adee92731ee34b1a14e" + integrity sha512-xgxBS5ur88q3PUiFUFpvP0CM2y925Fe9RCxbq8OMKCoB6VJHQaTv3KIiRp0BkFklUe/1uJjPyMCZq/dJo1BWUQ== dependencies: "@techpass/passport-openidconnect" "^0.3.0" aws-sdk "^2.901.0" @@ -1014,6 +1014,10 @@ passport-google-oauth "^2.0.0" passport-jwt "^4.0.0" passport-local "^1.0.0" + posthog-node "^1.3.0" + pouchdb "7.3.0" + pouchdb-find "^7.2.2" + pouchdb-replication-stream "^1.2.9" sanitize-s3-objectkey "^0.0.1" tar-fs "^2.1.1" uuid "^8.3.2" @@ -1068,13 +1072,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/bbui@^1.0.113": - version "1.0.113" - resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-1.0.113.tgz#8d1823d5b0bda4319232643456dc9ca9d14ebbd4" - integrity sha512-PCMwwmeapT6Ec/a+oZtasBwIzozSJPW9bM/fJvusm197M8jp7Qm77Ywk28NU2yE/KsTQ8So7aDgH60S/F5cPoQ== +"@budibase/bbui@^1.0.119": + version "1.0.119" + resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-1.0.119.tgz#253d6bafdec943fdf94ec93f8931d12ba6f96a02" + integrity sha512-yGKK4y/k0K6nxH+vcDRFrjOWTFOxRHdvwyb9sEKSgg/QP2+xdlwEFexe+943N6tyD+uxz5APgYYn7/32/iBZ6A== dependencies: "@adobe/spectrum-css-workflow-icons" "^1.2.1" - "@budibase/string-templates" "^1.0.113" + "@budibase/string-templates" "^1.0.119" "@spectrum-css/actionbutton" "^1.0.1" "@spectrum-css/actiongroup" "^1.0.1" "@spectrum-css/avatar" "^3.0.2" @@ -1121,13 +1125,13 @@ svelte-portal "^1.0.0" "@budibase/client@^1.0.105-alpha.0": - version "1.0.113" - resolved "https://registry.yarnpkg.com/@budibase/client/-/client-1.0.113.tgz#1da61320d487991aca562dd316641b81ae7fcd4f" - integrity sha512-kv529O0z/ZeSeseqkEf87Lq7U4tZ1Vo3cyDi+QDvYhzwANJsDcOVks9Egy7bfeJuoN/KzvO8nNsih8A7ac/v9A== + version "1.0.119" + resolved "https://registry.yarnpkg.com/@budibase/client/-/client-1.0.119.tgz#22f28d09e53c956061b66efa4e641ca4108ad118" + integrity sha512-0+ZWjHIa9ezgmpD1wy6ccDl15reKUnFufhcDQQvByDP7p67H3aqpaxiCRkMU+hz4ut4XeGDfRS6KLAqiGGmwsg== dependencies: - "@budibase/bbui" "^1.0.113" - "@budibase/frontend-core" "^1.0.113" - "@budibase/string-templates" "^1.0.113" + "@budibase/bbui" "^1.0.119" + "@budibase/frontend-core" "^1.0.119" + "@budibase/string-templates" "^1.0.119" "@spectrum-css/button" "^3.0.3" "@spectrum-css/card" "^3.0.3" "@spectrum-css/divider" "^1.0.3" @@ -1150,12 +1154,12 @@ svelte-flatpickr "^3.1.0" svelte-spa-router "^3.0.5" -"@budibase/frontend-core@^1.0.113": - version "1.0.113" - resolved "https://registry.yarnpkg.com/@budibase/frontend-core/-/frontend-core-1.0.113.tgz#833909617a96f752ce16beb9b4005b825ebd1930" - integrity sha512-5abbJJ9ZUETNtELda559mkEDHtUD68zgo3gEaixJx6pq0A2Uni6KUAsRlkBJN1ucR8fXf5RJ3RexeoeQTXQ/MA== +"@budibase/frontend-core@^1.0.119": + version "1.0.119" + resolved "https://registry.yarnpkg.com/@budibase/frontend-core/-/frontend-core-1.0.119.tgz#842319f8c5289a546414e2f1f481fd0fdec00626" + integrity sha512-kgLdae0hmnMt3m4QbPpvX2de/5FOcbmVMVz1TfJOMTxUfaySe44Powkbarx4bOQxS0SBw9mrLlzV0F1ZXjYTWA== dependencies: - "@budibase/bbui" "^1.0.113" + "@budibase/bbui" "^1.0.119" lodash "^4.17.21" svelte "^3.46.2" @@ -1202,10 +1206,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/string-templates@^1.0.105-alpha.0", "@budibase/string-templates@^1.0.113": - version "1.0.113" - resolved "https://registry.yarnpkg.com/@budibase/string-templates/-/string-templates-1.0.113.tgz#96c1d578d40795495c634f9d0fe021188c0dc410" - integrity sha512-Dr3YMAc6nF/THiakPCxUPOiAVn/cApkdYXomnPvYrmmfMxOMz3s4GJCXHIpoSY/tbhkM+MFNW0foHn6HMAubYw== +"@budibase/string-templates@^1.0.105-alpha.0", "@budibase/string-templates@^1.0.119": + version "1.0.119" + resolved "https://registry.yarnpkg.com/@budibase/string-templates/-/string-templates-1.0.119.tgz#80273fd7b7848be1e1055b8e190438033f746392" + integrity sha512-W9K3217f4HX9A/tUBMCDE5NgWBI1ESH4w73fzQmVoK+3hMWOEFg4ESYKw3P62LyrXMc1TfayuLXa4Q1e6fvHVA== dependencies: "@budibase/handlebars-helpers" "^0.11.8" dayjs "^1.10.4" @@ -2354,9 +2358,9 @@ integrity sha512-UtfW8bA1quYnJM6v/lp6AVYGnQFkiUix2FHAf/4VHVrk4mh7ydtLiXS0IR3Kx+t/S8FWdSdSQHDZ8tHbY1ZLZg== "@spectrum-css/tag@^3.1.4": - version "3.3.7" - resolved "https://registry.yarnpkg.com/@spectrum-css/tag/-/tag-3.3.7.tgz#4d7ade045697c2f9f1dec9d8664d73ddb35ec047" - integrity sha512-7Mgssli+z8vhb42SzdFQhI3v1y3RYn1B/QrVSguPjNc/18/EW+tupS6JTmh0afkXrJOdJO3BCJVoDCmAozZwog== + version "3.3.10" + resolved "https://registry.yarnpkg.com/@spectrum-css/tag/-/tag-3.3.10.tgz#3710a29767315332078956b93e99408b781eb160" + integrity sha512-cwKgpEx4OYyS/WqyNDCvQhSVQUYdHhbjz3nRdg4jABaI96T8UBHcAvK07TR1/OfD5rBo+xBO+rsGqd4aH21zdA== "@spectrum-css/tags@^3.0.2": version "3.0.3" @@ -3524,9 +3528,9 @@ aws-sdk@^2.767.0: xml2js "0.4.19" aws-sdk@^2.901.0: - version "2.1100.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1100.0.tgz#20bbabc12fbc316067ba02af66bf371a455af9e3" - integrity sha512-StLSQCYFmFPxjoMntIb+8jUZ0vzmq3xkrwG5e/4qU1bSGWCmhhjvz6c+4j38AnIy8MFV1+tV8RArbhLUEV2dGw== + version "2.1120.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1120.0.tgz#a299f595448019c4b4b69fa9aa57fd58658497a6" + integrity sha512-3cKXUFxC3CDBbJ/JlXEKmJZKFZhqGii7idGaLxvV5/OzqEDUstYkHGX3TCJdQRHrRwpFvRVOekXSwLxBltqXuQ== dependencies: buffer "4.9.2" events "1.1.1" @@ -3949,6 +3953,11 @@ buffer-from@1.1.1: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== +buffer-from@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + buffer-writer@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/buffer-writer/-/buffer-writer-2.0.0.tgz#ce7eb81a38f7829db09c873f2fbb792c0c98ec04" @@ -4279,9 +4288,9 @@ codemirror-spell-checker@1.1.2: typo-js "*" codemirror@^5.63.1: - version "5.65.2" - resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.65.2.tgz#5799a70cb3d706e10f60e267245e3a75205d3dd9" - integrity sha512-SZM4Zq7XEC8Fhroqe3LxbEEX1zUPWH1wMr5zxiBuiUF64iYOUH/JI88v4tBag8MiBS8B8gRv8O1pPXGYXQ4ErA== + version "5.65.3" + resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.65.3.tgz#2d029930d5a293bc5fb96ceea64654803c0d4ac7" + integrity sha512-kCC0iwGZOVZXHEKW3NDTObvM7pTIyowjty4BUqeREROc/3I6bWbgZDA3fGDwlA+rbgRjvnRnfqs9SfXynel1AQ== collect-v8-coverage@^1.0.0: version "1.0.1" @@ -4989,9 +4998,9 @@ doctrine@3.0.0, doctrine@^3.0.0: esutils "^2.0.2" dom-serializer@^1.0.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.3.2.tgz#6206437d32ceefaec7161803230c7a20bc1b4d91" - integrity sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig== + version "1.4.1" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.4.1.tgz#de5d41b1aea290215dc45a6dae8adcf1d32e2d30" + integrity sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag== dependencies: domelementtype "^2.0.1" domhandler "^4.2.0" @@ -5003,9 +5012,9 @@ dom-walk@^0.1.0: integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== domelementtype@^2.0.1, domelementtype@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.2.0.tgz#9a0b6c2782ed6a1c7323d42267183df9bd8b1d57" - integrity sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A== + version "2.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" + integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== domexception@^1.0.1: version "1.0.1" @@ -5924,6 +5933,13 @@ fetch-cookie@0.10.1: dependencies: tough-cookie "^2.3.3 || ^3.0.1 || ^4.0.0" +fetch-cookie@0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/fetch-cookie/-/fetch-cookie-0.11.0.tgz#e046d2abadd0ded5804ce7e2cae06d4331c15407" + integrity sha512-BQm7iZLFhMWFy5CZ/162sAGjBfdNWb7a8LEqqnzsHFhxT/X/SVj/z2t2nu3aJvjlbQkrAlTUApplPRjWyH4mhA== + dependencies: + tough-cookie "^2.3.3 || ^3.0.1 || ^4.0.0" + fetch-cookie@0.7.3: version "0.7.3" resolved "https://registry.yarnpkg.com/fetch-cookie/-/fetch-cookie-0.7.3.tgz#b8d023f421dd2b2f4a0eca9cd7318a967ed4eed8" @@ -8987,9 +9003,9 @@ lcid@^2.0.0: invert-kv "^2.0.0" leaflet@^1.7.1: - version "1.7.1" - resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.7.1.tgz#10d684916edfe1bf41d688a3b97127c0322a2a19" - integrity sha512-/xwPEBidtg69Q3HlqPdU3DnrXQOvQU/CCHA1tcDQVzOwm91YMYaILjNp7L4Eaw5Z4sOYdbBz6koWyibppd8Zqw== + version "1.8.0" + resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.8.0.tgz#4615db4a22a304e8e692cae9270b983b38a2055e" + integrity sha512-gwhMjFCQiYs3x/Sf+d49f10ERXaEFCPr+nVTryhAW8DWbMGqJqt9G4XuIaHmFW08zYvhgdzqXGr8AlW8v8dQkA== left-pad@^1.3.0: version "1.3.0" @@ -9071,6 +9087,15 @@ level@6.0.0: leveldown "^5.4.0" opencollective-postinstall "^2.0.0" +level@6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/level/-/level-6.0.1.tgz#dc34c5edb81846a6de5079eac15706334b0d7cd6" + integrity sha512-psRSqJZCsC/irNhfHzrVZbmPYXDcEYhA5TVNwr+V92jF44rbf86hqGp8fiT702FyiArScYIlPSBTDUASCVNSpw== + dependencies: + level-js "^5.0.0" + level-packager "^5.1.0" + leveldown "^5.4.0" + leveldown@5.4.1, leveldown@^5.4.0: version "5.4.1" resolved "https://registry.yarnpkg.com/leveldown/-/leveldown-5.4.1.tgz#83a8fdd9bb52b1ed69be2ef59822b6cdfcdb51ec" @@ -9080,6 +9105,15 @@ leveldown@5.4.1, leveldown@^5.4.0: napi-macros "~2.0.0" node-gyp-build "~4.1.0" +leveldown@5.6.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/leveldown/-/leveldown-5.6.0.tgz#16ba937bb2991c6094e13ac5a6898ee66d3eee98" + integrity sha512-iB8O/7Db9lPaITU1aA2txU/cBEXAt4vWwKQRrrWuS6XDgbP4QZGj9BL2aNbwb002atoQ/lIotJkfyzz+ygQnUQ== + dependencies: + abstract-leveldown "~6.2.1" + napi-macros "~2.0.0" + node-gyp-build "~4.1.0" + levelup@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/levelup/-/levelup-4.1.0.tgz#49ab5d3a341731cd102f91c6bc17a1acb1969a17" @@ -9476,9 +9510,9 @@ markdown-it@^12.2.0: uc.micro "^1.0.5" marked@^4.0.10: - version "4.0.12" - resolved "https://registry.yarnpkg.com/marked/-/marked-4.0.12.tgz#2262a4e6fd1afd2f13557726238b69a48b982f7d" - integrity sha512-hgibXWrEDNBWgGiK18j/4lkS6ihTe9sxtV4Q1OQppb/0zzyPSzoFANBa5MfsG/zgsWklmNnhm0XACZOH/0HBiQ== + version "4.0.14" + resolved "https://registry.yarnpkg.com/marked/-/marked-4.0.14.tgz#7a3a5fa5c80580bac78c1ed2e3b84d7bd6fc3870" + integrity sha512-HL5sSPE/LP6U9qKgngIIPTthuxC0jrfxpYMZ3LdGDD3vTnLs59m2Z7r6+LNDR3ToqEQdkKd6YaaEfJhodJmijQ== md5@^2.3.0: version "2.3.0" @@ -9776,9 +9810,9 @@ nanoid@^2.1.0: integrity sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA== nanoid@^3.3.1: - version "3.3.2" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.2.tgz#c89622fafb4381cd221421c69ec58547a1eec557" - integrity sha512-CuHBogktKwpm5g2sRgv83jEy2ijFzBwMoYA60orPDR7ynsLijJDqgsi4RDGj3OJpy3Ieb+LYwiRmIOGyytgITA== + version "3.3.3" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" + integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== nanomatch@^1.2.9: version "1.2.13" @@ -10740,6 +10774,20 @@ posthog-node@^1.1.4: remove-trailing-slash "^0.1.1" uuid "^8.3.2" +posthog-node@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/posthog-node/-/posthog-node-1.3.0.tgz#804ed2f213a2f05253f798bf9569d55a9cad94f7" + integrity sha512-2+VhqiY/rKIqKIXyvemBFHbeijHE25sP7eKltnqcFqAssUE6+sX6vusN9A4luzToOqHQkUZexiCKxvuGagh7JA== + dependencies: + axios "0.24.0" + axios-retry "^3.1.9" + component-type "^1.2.1" + join-component "^1.1.0" + md5 "^2.3.0" + ms "^2.1.3" + remove-trailing-slash "^0.1.1" + uuid "^8.3.2" + pouch-stream@^0.4.0: version "0.4.1" resolved "https://registry.yarnpkg.com/pouch-stream/-/pouch-stream-0.4.1.tgz#0c6d8475c9307677627991a2f079b301c3b89bdd" @@ -10904,7 +10952,7 @@ pouchdb-promise@^6.0.4: dependencies: lie "3.1.1" -pouchdb-replication-stream@1.2.9: +pouchdb-replication-stream@1.2.9, pouchdb-replication-stream@^1.2.9: version "1.2.9" resolved "https://registry.yarnpkg.com/pouchdb-replication-stream/-/pouchdb-replication-stream-1.2.9.tgz#aa4fa5d8f52df4825392f18e07c7e11acffc650a" integrity sha1-qk+l2PUt9IJTkvGOB8fhGs/8ZQo= @@ -10965,6 +11013,32 @@ pouchdb@7.2.1: uuid "3.3.3" vuvuzela "1.0.3" +pouchdb@7.3.0: + version "7.3.0" + resolved "https://registry.yarnpkg.com/pouchdb/-/pouchdb-7.3.0.tgz#440fbef12dfd8f9002320802528665e883a3b7f8" + integrity sha512-OwsIQGXsfx3TrU1pLruj6PGSwFH+h5k4hGNxFkZ76Um7/ZI8F5TzUHFrpldVVIhfXYi2vP31q0q7ot1FSLFYOw== + dependencies: + abort-controller "3.0.0" + argsarray "0.0.1" + buffer-from "1.1.2" + clone-buffer "1.0.0" + double-ended-queue "2.1.0-0" + fetch-cookie "0.11.0" + immediate "3.3.0" + inherits "2.0.4" + level "6.0.1" + level-codec "9.0.2" + level-write-stream "1.0.0" + leveldown "5.6.0" + levelup "4.4.0" + ltgt "2.2.1" + node-fetch "2.6.7" + readable-stream "1.1.14" + spark-md5 "3.0.2" + through2 "3.0.2" + uuid "8.3.2" + vuvuzela "1.0.3" + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -12149,6 +12223,11 @@ spark-md5@3.0.1: resolved "https://registry.yarnpkg.com/spark-md5/-/spark-md5-3.0.1.tgz#83a0e255734f2ab4e5c466e5a2cfc9ba2aa2124d" integrity sha512-0tF3AGSD1ppQeuffsLDIOWlKUd3lS92tFxcsrh5Pe3ZphhnoK+oXIBTzOAThZCiuINZLvpiLH/1VS1/ANEJVig== +spark-md5@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/spark-md5/-/spark-md5-3.0.2.tgz#7952c4a30784347abcee73268e473b9c0167e3fc" + integrity sha512-wcFzz9cDfbuqe0FZzfi2or1sgyIrsDwmPwfZC4hiNidPdPINjeUwNfv5kldczoEAcjl9Y1L3SM7Uz2PUEQzxQw== + sparse-bitfield@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz#ff4ae6e68656056ba4b3e792ab3334d38273ca11" @@ -12568,9 +12647,9 @@ svelte@^3.38.2: integrity sha512-4DrCEJoBvdR689efHNSxIQn2pnFwB7E7j2yLEJtHE/P8hxwZWIphCtJ8are7bjl/iVMlcEf5uh5pJ68IwR09vQ== svelte@^3.46.2: - version "3.46.4" - resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.46.4.tgz#0c46bc4a3e20a2617a1b7dc43a722f9d6c084a38" - integrity sha512-qKJzw6DpA33CIa+C/rGp4AUdSfii0DOTCzj/2YpSKKayw5WGSS624Et9L1nU1k2OVRS9vaENQXp2CVZNU+xvIg== + version "3.47.0" + resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.47.0.tgz#ba46fe4aea99fc650d6939c215cd4694f5325a19" + integrity sha512-4JaJp3HEoTCGARRWZQIZDUanhYv0iyoHikklVHVLH9xFE9db22g4TDv7CPeNA8HD1JgjXI1vlhR1JZvvhaTu2Q== svg.draggable.js@^2.2.2: version "2.2.2" @@ -13405,7 +13484,7 @@ uuid@8.1.0: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.1.0.tgz#6f1536eb43249f473abc6bd58ff983da1ca30d8d" integrity sha512-CI18flHDznR0lq54xBycOVmphdCYnQLKn8abKn7PXUiKUGdEd+/l9LWNJmugXel4hXq7S+RMNl34ecyC9TntWg== -uuid@^8.3.0, uuid@^8.3.2: +uuid@8.3.2, uuid@^8.3.0, uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== From fa136ba4caf8830c411e5a799b89b19eed7a6a86 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Mon, 25 Apr 2022 12:19:36 +0100 Subject: [PATCH 19/43] Sync versions of pro and backend-core --- .github/stale.yml | 3 +- packages/backend-core/src/environment.js | 3 +- scripts/pro/release.sh | 75 ++++++++++++++++++------ 3 files changed, 60 insertions(+), 21 deletions(-) diff --git a/.github/stale.yml b/.github/stale.yml index 5875ed1282..2a2c10cb7d 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -14,7 +14,6 @@ staleLabel: stale # Comment to post when marking an issue as stale. Set to `false` to disable markComment: > This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. + recent activity. # Comment to post when closing a stale issue. Set to `false` to disable closeComment: false diff --git a/packages/backend-core/src/environment.js b/packages/backend-core/src/environment.js index 856ab1b97c..527760c1ca 100644 --- a/packages/backend-core/src/environment.js +++ b/packages/backend-core/src/environment.js @@ -22,7 +22,8 @@ module.exports = { MINIO_URL: process.env.MINIO_URL, INTERNAL_API_KEY: process.env.INTERNAL_API_KEY, MULTI_TENANCY: process.env.MULTI_TENANCY, - ACCOUNT_PORTAL_URL: process.env.ACCOUNT_PORTAL_URL, + ACCOUNT_PORTAL_URL: + process.env.ACCOUNT_PORTAL_URL || "https://account.budibase.app", ACCOUNT_PORTAL_API_KEY: process.env.ACCOUNT_PORTAL_API_KEY, DISABLE_ACCOUNT_PORTAL: process.env.DISABLE_ACCOUNT_PORTAL, SELF_HOSTED: !!parseInt(process.env.SELF_HOSTED), diff --git a/scripts/pro/release.sh b/scripts/pro/release.sh index 4b30fa4b1d..fdf4c19b68 100755 --- a/scripts/pro/release.sh +++ b/scripts/pro/release.sh @@ -5,18 +5,16 @@ if [[ -z "${CI}" ]]; then exit 0 fi -# Release pro as same version as budibase +############################################# +# SETUP # +############################################# + +# Release pro with same version as budibase VERSION=$(jq -r .version lerna.json) echo "Version: $VERSION" COMMAND=$1 echo "Command: $COMMAND" -# Go to pro package -cd ../budibase-pro - -# Install NPM credentials -echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} >> .npmrc - # Determine tag to use TAG="" if [[ $COMMAND == "develop" ]]; then @@ -27,24 +25,65 @@ fi echo "Releasing version $VERSION" echo "Releasing tag $TAG" + +############################################# +# PRE-PUBLISH # +############################################# + +# Go to pro repo root +cd ../budibase-pro + +# Install NPM credentials +echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} >> .npmrc + +# Sync backend-core version in packages/pro/package.json +# Ensures pro does not use out of date dependency +cd packages/pro +jq '.dependencies."@budibase/backend-core"="'$VERSION'"' package.json > package.json.tmp && mv package.json.tmp package.json + +# Go back to pro repo root +cd - + +############################################# +# PUBLISH # +############################################# + lerna publish $VERSION --yes --force-publish --dist-tag $TAG -# reset main and types to point to src for dev +############################################# +# POST-PUBLISH - PRO # +############################################# + +# Revert build changes on packages/pro/package.json cd packages/pro jq '.main = "src/index.ts" | .types = "src/index.ts"' package.json > package.json.tmp && mv package.json.tmp package.json + +# Go back to pro repo root cd - + +# Commit and push changes git add packages/pro/package.json -git commit -m 'Prep dev' +git commit -m "Prep next development iteration" git push +############################################# +# POST-PUBLISH - BUDIBASE # +############################################# + +# Go to budibase repo root cd ../budibase -if [[ $COMMAND == "develop" ]]; then - # Pin pro version for develop container build - echo "Pinning pro version" - cd packages/server - jq '.dependencies."@budibase/pro"="'$VERSION'"' package.json > package.json.tmp && mv package.json.tmp package.json - cd - - cd packages/worker - jq '.dependencies."@budibase/pro"="'$VERSION'"' package.json > package.json.tmp && mv package.json.tmp package.json -fi +# Update pro version in packages/server/package.json +cd packages/server +jq '.dependencies."@budibase/pro"="'$VERSION'"' package.json > package.json.tmp && mv package.json.tmp package.json + +# Go back to budibase repo root +cd - + +# Update pro version in packages/worker/package.json +cd packages/worker +jq '.dependencies."@budibase/pro"="'$VERSION'"' package.json > package.json.tmp && mv package.json.tmp package.json + +# Commit and push changes +git commit -m "Update pro version to $VERSION" +git push \ No newline at end of file From bdeb4c4b4226479c2c51eaf1518474811738bb9d Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 25 Apr 2022 11:19:53 +0000 Subject: [PATCH 20/43] v1.0.105-alpha.36 --- lerna.json | 2 +- packages/backend-core/package.json | 2 +- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 8 ++++---- packages/string-templates/package.json | 2 +- packages/worker/package.json | 6 +++--- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/lerna.json b/lerna.json index ec8a84538c..61cd57784b 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.0.105-alpha.35", + "version": "1.0.105-alpha.36", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index f286389c22..e5a68a8247 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.0.105-alpha.35", + "version": "1.0.105-alpha.36", "description": "Budibase backend core libraries used in server and worker", "main": "src/index.js", "author": "Budibase", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index a9d8fc249a..3425b81240 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "1.0.105-alpha.35", + "version": "1.0.105-alpha.36", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "^1.0.105-alpha.35", + "@budibase/string-templates": "^1.0.105-alpha.36", "@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 44bfb215c5..a0f8478e91 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.0.105-alpha.35", + "version": "1.0.105-alpha.36", "license": "GPL-3.0", "private": true, "scripts": { @@ -65,10 +65,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.0.105-alpha.35", - "@budibase/client": "^1.0.105-alpha.35", - "@budibase/frontend-core": "^1.0.105-alpha.35", - "@budibase/string-templates": "^1.0.105-alpha.35", + "@budibase/bbui": "^1.0.105-alpha.36", + "@budibase/client": "^1.0.105-alpha.36", + "@budibase/frontend-core": "^1.0.105-alpha.36", + "@budibase/string-templates": "^1.0.105-alpha.36", "@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 03b27b289b..2c970ed027 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.0.105-alpha.35", + "version": "1.0.105-alpha.36", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index c25cc0932f..fde059c5a1 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.0.105-alpha.35", + "version": "1.0.105-alpha.36", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "^1.0.105-alpha.35", - "@budibase/frontend-core": "^1.0.105-alpha.35", - "@budibase/string-templates": "^1.0.105-alpha.35", + "@budibase/bbui": "^1.0.105-alpha.36", + "@budibase/frontend-core": "^1.0.105-alpha.36", + "@budibase/string-templates": "^1.0.105-alpha.36", "@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 7e482e0878..5baedb170e 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.0.105-alpha.35", + "version": "1.0.105-alpha.36", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "^1.0.105-alpha.35", + "@budibase/bbui": "^1.0.105-alpha.36", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 8b905533cd..8615e48f28 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "1.0.105-alpha.35", + "version": "1.0.105-alpha.36", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -68,10 +68,10 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "^10.0.3", - "@budibase/backend-core": "^1.0.105-alpha.35", - "@budibase/client": "^1.0.105-alpha.35", + "@budibase/backend-core": "^1.0.105-alpha.36", + "@budibase/client": "^1.0.105-alpha.36", "@budibase/pro": "1.0.105-alpha.34", - "@budibase/string-templates": "^1.0.105-alpha.35", + "@budibase/string-templates": "^1.0.105-alpha.36", "@bull-board/api": "^3.7.0", "@bull-board/koa": "^3.7.0", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 1b352bb9fe..fbc13dc4a4 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.0.105-alpha.35", + "version": "1.0.105-alpha.36", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/worker/package.json b/packages/worker/package.json index 14f9fe48c4..e2b1f71c62 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "1.0.105-alpha.35", + "version": "1.0.105-alpha.36", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -31,9 +31,9 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "^1.0.105-alpha.35", + "@budibase/backend-core": "^1.0.105-alpha.36", "@budibase/pro": "1.0.105-alpha.34", - "@budibase/string-templates": "^1.0.105-alpha.35", + "@budibase/string-templates": "^1.0.105-alpha.36", "@koa/router": "^8.0.0", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "^0.3.0", From 8a4ad5e128a4683379c91206dc0dc73f9408abf7 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 25 Apr 2022 11:34:54 +0000 Subject: [PATCH 21/43] v1.0.105-alpha.37 --- lerna.json | 2 +- packages/backend-core/package.json | 2 +- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 8 ++++---- packages/string-templates/package.json | 2 +- packages/worker/package.json | 6 +++--- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/lerna.json b/lerna.json index 61cd57784b..9d768a91f1 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.0.105-alpha.36", + "version": "1.0.105-alpha.37", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index e5a68a8247..2d0e7ba9f8 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.0.105-alpha.36", + "version": "1.0.105-alpha.37", "description": "Budibase backend core libraries used in server and worker", "main": "src/index.js", "author": "Budibase", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 3425b81240..e23aee1e7a 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "1.0.105-alpha.36", + "version": "1.0.105-alpha.37", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "^1.0.105-alpha.36", + "@budibase/string-templates": "^1.0.105-alpha.37", "@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 a0f8478e91..02dcc5de05 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.0.105-alpha.36", + "version": "1.0.105-alpha.37", "license": "GPL-3.0", "private": true, "scripts": { @@ -65,10 +65,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.0.105-alpha.36", - "@budibase/client": "^1.0.105-alpha.36", - "@budibase/frontend-core": "^1.0.105-alpha.36", - "@budibase/string-templates": "^1.0.105-alpha.36", + "@budibase/bbui": "^1.0.105-alpha.37", + "@budibase/client": "^1.0.105-alpha.37", + "@budibase/frontend-core": "^1.0.105-alpha.37", + "@budibase/string-templates": "^1.0.105-alpha.37", "@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 2c970ed027..36a332c744 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.0.105-alpha.36", + "version": "1.0.105-alpha.37", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index fde059c5a1..03dcc1105d 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.0.105-alpha.36", + "version": "1.0.105-alpha.37", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "^1.0.105-alpha.36", - "@budibase/frontend-core": "^1.0.105-alpha.36", - "@budibase/string-templates": "^1.0.105-alpha.36", + "@budibase/bbui": "^1.0.105-alpha.37", + "@budibase/frontend-core": "^1.0.105-alpha.37", + "@budibase/string-templates": "^1.0.105-alpha.37", "@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 5baedb170e..d1b2665b2c 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.0.105-alpha.36", + "version": "1.0.105-alpha.37", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "^1.0.105-alpha.36", + "@budibase/bbui": "^1.0.105-alpha.37", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 8615e48f28..0a37a1f3f2 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "1.0.105-alpha.36", + "version": "1.0.105-alpha.37", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -68,10 +68,10 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "^10.0.3", - "@budibase/backend-core": "^1.0.105-alpha.36", - "@budibase/client": "^1.0.105-alpha.36", + "@budibase/backend-core": "^1.0.105-alpha.37", + "@budibase/client": "^1.0.105-alpha.37", "@budibase/pro": "1.0.105-alpha.34", - "@budibase/string-templates": "^1.0.105-alpha.36", + "@budibase/string-templates": "^1.0.105-alpha.37", "@bull-board/api": "^3.7.0", "@bull-board/koa": "^3.7.0", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index fbc13dc4a4..011e1e306f 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.0.105-alpha.36", + "version": "1.0.105-alpha.37", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/worker/package.json b/packages/worker/package.json index e2b1f71c62..40fe75941c 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "1.0.105-alpha.36", + "version": "1.0.105-alpha.37", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -31,9 +31,9 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "^1.0.105-alpha.36", + "@budibase/backend-core": "^1.0.105-alpha.37", "@budibase/pro": "1.0.105-alpha.34", - "@budibase/string-templates": "^1.0.105-alpha.36", + "@budibase/string-templates": "^1.0.105-alpha.37", "@koa/router": "^8.0.0", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "^0.3.0", From 4f41571dd3548abb4fa3dc74ae9098f158f9f1d0 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Mon, 25 Apr 2022 12:58:34 +0100 Subject: [PATCH 22/43] git add changed package.json files --- scripts/pro/release.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/pro/release.sh b/scripts/pro/release.sh index fdf4c19b68..c505c45c28 100755 --- a/scripts/pro/release.sh +++ b/scripts/pro/release.sh @@ -84,6 +84,11 @@ cd - cd packages/worker jq '.dependencies."@budibase/pro"="'$VERSION'"' package.json > package.json.tmp && mv package.json.tmp package.json +# Go back to budibase repo root +cd - + # Commit and push changes +git add packages/server/package.json +git add packages/worker/package.json git commit -m "Update pro version to $VERSION" git push \ No newline at end of file From 855a99084ae27f509e7e5e3ab097b3a98b6f9aab Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 25 Apr 2022 12:06:32 +0000 Subject: [PATCH 23/43] v1.0.105-alpha.38 --- lerna.json | 2 +- packages/backend-core/package.json | 2 +- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 8 ++++---- packages/string-templates/package.json | 2 +- packages/worker/package.json | 6 +++--- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/lerna.json b/lerna.json index 9d768a91f1..25e75c38e5 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.0.105-alpha.37", + "version": "1.0.105-alpha.38", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 2d0e7ba9f8..fce19fb395 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.0.105-alpha.37", + "version": "1.0.105-alpha.38", "description": "Budibase backend core libraries used in server and worker", "main": "src/index.js", "author": "Budibase", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index e23aee1e7a..9d42e8e70d 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "1.0.105-alpha.37", + "version": "1.0.105-alpha.38", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "^1.0.105-alpha.37", + "@budibase/string-templates": "^1.0.105-alpha.38", "@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 02dcc5de05..0b487f5b44 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.0.105-alpha.37", + "version": "1.0.105-alpha.38", "license": "GPL-3.0", "private": true, "scripts": { @@ -65,10 +65,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.0.105-alpha.37", - "@budibase/client": "^1.0.105-alpha.37", - "@budibase/frontend-core": "^1.0.105-alpha.37", - "@budibase/string-templates": "^1.0.105-alpha.37", + "@budibase/bbui": "^1.0.105-alpha.38", + "@budibase/client": "^1.0.105-alpha.38", + "@budibase/frontend-core": "^1.0.105-alpha.38", + "@budibase/string-templates": "^1.0.105-alpha.38", "@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 36a332c744..039f0953ba 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.0.105-alpha.37", + "version": "1.0.105-alpha.38", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index 03dcc1105d..fe5b8c2a9d 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.0.105-alpha.37", + "version": "1.0.105-alpha.38", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "^1.0.105-alpha.37", - "@budibase/frontend-core": "^1.0.105-alpha.37", - "@budibase/string-templates": "^1.0.105-alpha.37", + "@budibase/bbui": "^1.0.105-alpha.38", + "@budibase/frontend-core": "^1.0.105-alpha.38", + "@budibase/string-templates": "^1.0.105-alpha.38", "@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 d1b2665b2c..0ef8e5947e 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.0.105-alpha.37", + "version": "1.0.105-alpha.38", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "^1.0.105-alpha.37", + "@budibase/bbui": "^1.0.105-alpha.38", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 0a37a1f3f2..f16d5b0b54 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "1.0.105-alpha.37", + "version": "1.0.105-alpha.38", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -68,10 +68,10 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "^10.0.3", - "@budibase/backend-core": "^1.0.105-alpha.37", - "@budibase/client": "^1.0.105-alpha.37", + "@budibase/backend-core": "^1.0.105-alpha.38", + "@budibase/client": "^1.0.105-alpha.38", "@budibase/pro": "1.0.105-alpha.34", - "@budibase/string-templates": "^1.0.105-alpha.37", + "@budibase/string-templates": "^1.0.105-alpha.38", "@bull-board/api": "^3.7.0", "@bull-board/koa": "^3.7.0", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 011e1e306f..367b1e5286 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.0.105-alpha.37", + "version": "1.0.105-alpha.38", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/worker/package.json b/packages/worker/package.json index 40fe75941c..d7578c163a 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "1.0.105-alpha.37", + "version": "1.0.105-alpha.38", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -31,9 +31,9 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "^1.0.105-alpha.37", + "@budibase/backend-core": "^1.0.105-alpha.38", "@budibase/pro": "1.0.105-alpha.34", - "@budibase/string-templates": "^1.0.105-alpha.37", + "@budibase/string-templates": "^1.0.105-alpha.38", "@koa/router": "^8.0.0", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "^0.3.0", From 6682e428d063feb40ec4fd926f2fc8af0b0970b9 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 25 Apr 2022 12:07:51 +0000 Subject: [PATCH 24/43] Update pro version to 1.0.105-alpha.38 --- packages/server/package.json | 2 +- packages/worker/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index f16d5b0b54..7dd05f9029 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -70,7 +70,7 @@ "@apidevtools/swagger-parser": "^10.0.3", "@budibase/backend-core": "^1.0.105-alpha.38", "@budibase/client": "^1.0.105-alpha.38", - "@budibase/pro": "1.0.105-alpha.34", + "@budibase/pro": "1.0.105-alpha.38", "@budibase/string-templates": "^1.0.105-alpha.38", "@bull-board/api": "^3.7.0", "@bull-board/koa": "^3.7.0", diff --git a/packages/worker/package.json b/packages/worker/package.json index d7578c163a..c0e44efce1 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -32,7 +32,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "^1.0.105-alpha.38", - "@budibase/pro": "1.0.105-alpha.34", + "@budibase/pro": "1.0.105-alpha.38", "@budibase/string-templates": "^1.0.105-alpha.38", "@koa/router": "^8.0.0", "@sentry/node": "6.17.7", From 93a4a149060d53cea43db5294ac67bb020d7ac05 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Mon, 25 Apr 2022 14:31:15 +0100 Subject: [PATCH 25/43] add array to app action types --- .../src/components/automation/SetupPanel/SchemaSetup.svelte | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/builder/src/components/automation/SetupPanel/SchemaSetup.svelte b/packages/builder/src/components/automation/SetupPanel/SchemaSetup.svelte index 71b10a3569..cb80072694 100644 --- a/packages/builder/src/components/automation/SetupPanel/SchemaSetup.svelte +++ b/packages/builder/src/components/automation/SetupPanel/SchemaSetup.svelte @@ -30,6 +30,10 @@ label: "DateTime", value: "datetime", }, + { + label: "Array", + value: "array", + }, ] function addField() { @@ -70,6 +74,7 @@ secondary placeholder="Enter field name" on:change={fieldNameChanged(field.name)} + updateOnChange={false} />