From 6e5bcb224cbc922b3269b117270872e0f34efbf1 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Thu, 31 Mar 2022 10:56:16 +0100 Subject: [PATCH 1/5] 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 417ba977faeea9085198fbae10f0af3fc56d5f30 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Thu, 31 Mar 2022 15:44:06 +0100 Subject: [PATCH 2/5] 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 5cd3a1b89363903fa7904124152e68e33f55452d Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Fri, 1 Apr 2022 10:48:17 +0100 Subject: [PATCH 3/5] 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 79a8a63ede437e594d7980619596a88ef655aaaf Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Thu, 21 Apr 2022 20:24:43 +0100 Subject: [PATCH 4/5] use ioredis mock for in memory redis tests --- packages/server/__mocks__/ioredis.ts | 15 ---- packages/server/package.json | 1 + .../src/integrations/tests/redis.spec.js | 25 +++--- packages/server/yarn.lock | 83 +++++++++++++------ 4 files changed, 72 insertions(+), 52 deletions(-) delete mode 100644 packages/server/__mocks__/ioredis.ts diff --git a/packages/server/__mocks__/ioredis.ts b/packages/server/__mocks__/ioredis.ts deleted file mode 100644 index 889f4355c4..0000000000 --- a/packages/server/__mocks__/ioredis.ts +++ /dev/null @@ -1,15 +0,0 @@ -// @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/package.json b/packages/server/package.json index cfcba8059c..8fcc56cb80 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -155,6 +155,7 @@ "copyfiles": "^2.4.1", "docker-compose": "^0.23.6", "eslint": "^6.8.0", + "ioredis-mock": "^7.2.0", "is-wsl": "^2.2.0", "jest": "^27.0.5", "jest-openapi": "^0.14.2", diff --git a/packages/server/src/integrations/tests/redis.spec.js b/packages/server/src/integrations/tests/redis.spec.js index f68bc03fc2..219584bdb2 100644 --- a/packages/server/src/integrations/tests/redis.spec.js +++ b/packages/server/src/integrations/tests/redis.spec.js @@ -1,10 +1,16 @@ -const redis = require("ioredis") +const Redis = require("ioredis-mock") const RedisIntegration = require("../redis") -jest.mock("ioredis") class TestConfiguration { constructor(config = {}) { this.integration = new RedisIntegration.integration(config) + this.redis = new Redis({ + data: { + test: 'test', + result: "1" + }, + }) + this.integration.client = this.redis } } @@ -21,7 +27,7 @@ describe("Redis Integration", () => { value: "value" } const response = await config.integration.create(body) - expect(config.integration.client.set).toHaveBeenCalledWith(body.key, body.value) + expect(await config.redis.get("key")).toEqual("value") }) it("calls the read method with the correct params", async () => { @@ -29,17 +35,15 @@ describe("Redis Integration", () => { key: "test" } const response = await config.integration.read(body) - expect(config.integration.client.get).toHaveBeenCalledWith(body.key) - expect(response).toEqual(expect.any(Object)) + expect(response).toEqual("test") }) 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)) + await config.integration.delete(body) + expect(await config.redis.get(body.key)).toEqual(null) }) it("calls the command method with the correct params", async () => { @@ -47,9 +51,10 @@ describe("Redis Integration", () => { json: "KEYS *" } - const response = await config.integration.command(body) + // ioredis-mock doesn't support pipelines + config.integration.client.pipeline = jest.fn(() => ({ exec: jest.fn(() => [[]]) })) + 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/yarn.lock b/packages/server/yarn.lock index 845185f12c..ec2bbc9398 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.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== +"@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== 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.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== +"@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== dependencies: "@adobe/spectrum-css-workflow-icons" "^1.2.1" - "@budibase/string-templates" "^1.0.103" + "@budibase/string-templates" "^1.0.113" "@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.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== +"@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== dependencies: - "@budibase/bbui" "^1.0.103" - "@budibase/frontend-core" "^1.0.103" - "@budibase/string-templates" "^1.0.103" + "@budibase/bbui" "^1.0.113" + "@budibase/frontend-core" "^1.0.113" + "@budibase/string-templates" "^1.0.113" "@spectrum-css/button" "^3.0.3" "@spectrum-css/card" "^3.0.3" "@spectrum-css/divider" "^1.0.3" @@ -1150,12 +1150,12 @@ svelte-flatpickr "^3.1.0" svelte-spa-router "^3.0.5" -"@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== +"@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== dependencies: - "@budibase/bbui" "^1.0.103" + "@budibase/bbui" "^1.0.113" lodash "^4.17.21" svelte "^3.46.2" @@ -1202,10 +1202,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@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== +"@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== dependencies: "@budibase/handlebars-helpers" "^0.11.8" dayjs "^1.10.4" @@ -5903,6 +5903,20 @@ fecha@^4.2.0: resolved "https://registry.yarnpkg.com/fecha/-/fecha-4.2.1.tgz#0a83ad8f86ef62a091e22bb5a039cd03d23eecce" integrity sha512-MMMQ0ludy/nBs1/o0zVOiKTpG7qMbonKUzjJgQFEuvq6INZ1OraKPRAWkBq5vlKLOUMpmNYG1JoN3oDPUQ9m3Q== +fengari-interop@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/fengari-interop/-/fengari-interop-0.1.3.tgz#3ad37a90e7430b69b365441e9fc0ba168942a146" + integrity sha512-EtZ+oTu3kEwVJnoymFPBVLIbQcCoy9uWCVnMA6h3M/RqHkUBsLYp29+RRHf9rKr6GwjubWREU1O7RretFIXjHw== + +fengari@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/fengari/-/fengari-0.1.4.tgz#72416693cd9e43bd7d809d7829ddc0578b78b0bb" + integrity sha512-6ujqUuiIYmcgkGz8MGAdERU57EIluGGPSUgGPTsco657EHa+srq0S3/YUl/r9kx1+D+d4rGfYObd+m8K22gB1g== + dependencies: + readline-sync "^1.4.9" + sprintf-js "^1.1.1" + tmp "^0.0.33" + fetch-cookie@0.10.1: version "0.10.1" resolved "https://registry.yarnpkg.com/fetch-cookie/-/fetch-cookie-0.10.1.tgz#5ea88f3d36950543c87997c27ae2aeafb4b5c4d4" @@ -7058,6 +7072,16 @@ invert-kv@^2.0.0: resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== +ioredis-mock@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/ioredis-mock/-/ioredis-mock-7.2.0.tgz#48f006c07ef7f1f93f75e60d8f9035fa46c4ef0a" + integrity sha512-xzABBG3NhfDBGxH1KX9n6vs7WGNn9lhcxMT3b+vjynVImxlUV+vOXU+tjGzSUnGmx4IYllA8RqbXN8z6ROMPVA== + dependencies: + fengari "^0.1.4" + fengari-interop "^0.1.3" + redis-commands "^1.7.0" + standard-as-callback "^2.1.0" + ioredis@^4.27.0: version "4.28.0" resolved "https://registry.yarnpkg.com/ioredis/-/ioredis-4.28.0.tgz#5a2be3f37ff2075e2332f280eaeb02ab4d9ff0d3" @@ -11285,6 +11309,11 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" +readline-sync@^1.4.9: + version "1.4.10" + resolved "https://registry.yarnpkg.com/readline-sync/-/readline-sync-1.4.10.tgz#41df7fbb4b6312d673011594145705bf56d8873b" + integrity sha512-gNva8/6UAe8QYepIQH/jQ2qn91Qj0B9sYjMBBs3QOB8F2CXcKgLxQaJRP76sWVRQt+QU+8fAkCbCvjjMFu7Ycw== + realpath-native@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.1.0.tgz#2003294fea23fb0672f2476ebe22fcf498a2d65c" @@ -11326,7 +11355,7 @@ rechoir@^0.7.0: dependencies: resolve "^1.9.0" -redis-commands@1.7.0: +redis-commands@1.7.0, redis-commands@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/redis-commands/-/redis-commands-1.7.0.tgz#15a6fea2d58281e27b1cd1acfb4b293e278c3a89" integrity sha512-nJWqw3bTFy21hX/CPKHth6sfhZbdiHP6bTawSgQBlKOVRG7EZkfHbbHwQJnrE4vsQf0CMNE+3gJ4Fmm16vdVlQ== @@ -12179,7 +12208,7 @@ split2@^3.1.1: dependencies: readable-stream "^3.0.0" -sprintf-js@^1.1.2: +sprintf-js@^1.1.1, sprintf-js@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz#da1765262bf8c0f571749f2ad6c26300207ae673" integrity sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug== From 25703889a3dc3ffa0fc27caaef2d10d5e3ead557 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 25 Apr 2022 10:24:49 +0100 Subject: [PATCH 5/5] 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==