From 1ed32f0ce4a983574b04cb0476343ec31409985e Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 8 Aug 2022 13:51:02 +0100 Subject: [PATCH 001/396] charset encoding --- packages/server/src/utilities/fileSystem/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/server/src/utilities/fileSystem/index.js b/packages/server/src/utilities/fileSystem/index.js index f4aebd11a8..e421d19275 100644 --- a/packages/server/src/utilities/fileSystem/index.js +++ b/packages/server/src/utilities/fileSystem/index.js @@ -106,8 +106,10 @@ exports.loadHandlebarsFile = path => { */ exports.apiFileReturn = contents => { const path = join(budibaseTempDir(), uuid()) - fs.writeFileSync(path, contents) - return fs.createReadStream(path) + fs.writeFileSync(path, "\ufeff" + contents) + let readerStream = fs.createReadStream(path) + readerStream.setEncoding("binary") + return readerStream } exports.defineFilter = excludeRows => { From 9a4eebcc3753e56866a84d315dec7006688d432e Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 8 Aug 2022 13:54:11 +0100 Subject: [PATCH 002/396] changing readstream let to const --- packages/server/src/utilities/fileSystem/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/utilities/fileSystem/index.js b/packages/server/src/utilities/fileSystem/index.js index e421d19275..8e93d33ed9 100644 --- a/packages/server/src/utilities/fileSystem/index.js +++ b/packages/server/src/utilities/fileSystem/index.js @@ -107,7 +107,7 @@ exports.loadHandlebarsFile = path => { exports.apiFileReturn = contents => { const path = join(budibaseTempDir(), uuid()) fs.writeFileSync(path, "\ufeff" + contents) - let readerStream = fs.createReadStream(path) + const readerStream = fs.createReadStream(path) readerStream.setEncoding("binary") return readerStream } From 3c50b241066de3c7f3fc4664c642b3149a98732f Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Tue, 30 Aug 2022 11:17:11 +0100 Subject: [PATCH 003/396] Add additional params to listObjects --- packages/server/src/integrations/s3.ts | 34 ++++++++++++++++--- .../server/src/integrations/tests/s3.spec.js | 12 +++++-- 2 files changed, 39 insertions(+), 7 deletions(-) diff --git a/packages/server/src/integrations/s3.ts b/packages/server/src/integrations/s3.ts index e8da696424..fabb6daa3d 100644 --- a/packages/server/src/integrations/s3.ts +++ b/packages/server/src/integrations/s3.ts @@ -1,4 +1,4 @@ -import { Integration, QueryType, IntegrationBase } from "@budibase/types" +import { Integration, QueryType, IntegrationBase, DatasourceFieldType } from "@budibase/types" module S3Module { const AWS = require("aws-sdk") @@ -46,12 +46,25 @@ module S3Module { type: QueryType.FIELDS, fields: { bucket: { - type: "string", + type: DatasourceFieldType.STRING, required: true, }, + delimiter: { + type: DatasourceFieldType.STRING, + }, + marker: { + type: DatasourceFieldType.STRING, + }, + maxKeys: { + type: DatasourceFieldType.NUMBER, + display: "Max Keys", + }, + prefix: { + type: DatasourceFieldType.STRING, + }, }, - }, - }, + } + } } class S3Integration implements IntegrationBase { @@ -69,10 +82,21 @@ module S3Module { this.client = new AWS.S3(this.config) } - async read(query: { bucket: string }) { + async read(query: { + bucket: string, + delimiter: string, + expectedBucketOwner: string, + marker: string, + maxKeys: number, + prefix: string, + }) { const response = await this.client .listObjects({ Bucket: query.bucket, + Delimiter: query.delimiter, + Marker: query.marker, + MaxKeys: query.maxKeys, + Prefix: query.prefix, }) .promise() return response.Contents diff --git a/packages/server/src/integrations/tests/s3.spec.js b/packages/server/src/integrations/tests/s3.spec.js index 7ac403dbd4..a655112973 100644 --- a/packages/server/src/integrations/tests/s3.spec.js +++ b/packages/server/src/integrations/tests/s3.spec.js @@ -17,10 +17,18 @@ describe("S3 Integration", () => { it("calls the read method with the correct params", async () => { const response = await config.integration.read({ - bucket: "test" + bucket: "test", + delimiter: "/", + marker: "file.txt", + maxKeys: 999, + prefix: "directory/", }) expect(config.integration.client.listObjects).toHaveBeenCalledWith({ - Bucket: "test" + Bucket: "test", + Delimiter: "/", + Marker: "file.txt", + MaxKeys: 999, + Prefix: "directory/" }) }) }) \ No newline at end of file From 36ebb30825c151571cfbae026eb4d08f389ff871 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Tue, 30 Aug 2022 13:42:49 +0100 Subject: [PATCH 004/396] WIP --- packages/server/package.json | 2 +- packages/server/src/integrations/s3.ts | 66 ++++++++++++++++++++++---- packages/server/yarn.lock | 2 +- 3 files changed, 58 insertions(+), 12 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index 4ef6a5bd18..4d4c580709 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -95,7 +95,7 @@ "bcryptjs": "2.4.3", "bull": "4.8.5", "chmodr": "1.2.0", - "csvtojson": "2.0.10", + "csvtojson": "^2.0.10", "curlconverter": "3.21.0", "dotenv": "8.2.0", "download": "8.0.0", diff --git a/packages/server/src/integrations/s3.ts b/packages/server/src/integrations/s3.ts index fabb6daa3d..ddae25eee8 100644 --- a/packages/server/src/integrations/s3.ts +++ b/packages/server/src/integrations/s3.ts @@ -1,7 +1,13 @@ -import { Integration, QueryType, IntegrationBase, DatasourceFieldType } from "@budibase/types" +import { + Integration, + QueryType, + IntegrationBase, + DatasourceFieldType, +} from "@budibase/types" module S3Module { const AWS = require("aws-sdk") + const csv = require("csvtojson") interface S3Config { region: string @@ -63,8 +69,22 @@ module S3Module { type: DatasourceFieldType.STRING, }, }, - } - } + }, + readCsv: { + displayName: "Read CSV", + type: QueryType.FIELDS, + fields: { + bucket: { + type: DatasourceFieldType.STRING, + required: true, + }, + key: { + type: DatasourceFieldType.STRING, + required: true, + }, + }, + }, + }, } class S3Integration implements IntegrationBase { @@ -82,13 +102,13 @@ module S3Module { this.client = new AWS.S3(this.config) } - async read(query: { - bucket: string, - delimiter: string, - expectedBucketOwner: string, - marker: string, - maxKeys: number, - prefix: string, + async read(query: { + bucket: string + delimiter: string + expectedBucketOwner: string + marker: string + maxKeys: number + prefix: string }) { const response = await this.client .listObjects({ @@ -101,6 +121,32 @@ module S3Module { .promise() return response.Contents } + + async readCsv(query: { bucket: string; key: string }) { + let streamErr: string | undefined = undefined + const stream = this.client + .getObject({ + Bucket: query.bucket, + Key: query.key, + }) + .createReadStream() + .on("error", (err: string) => { + //stream.destroy() + // + console.log("err ", err) + streamErr = "ERROR" + }) + + if (streamErr) { + throw new Error("ERROR") + } + + try { + return await csv().fromStream(stream) + } catch (err) { + throw new Error("Failed to read CSV") + } + } } module.exports = { diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 0e6b40cc30..64239ce820 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -4924,7 +4924,7 @@ cssstyle@^2.3.0: dependencies: cssom "~0.3.6" -csvtojson@2.0.10: +csvtojson@^2.0.10: version "2.0.10" resolved "https://registry.yarnpkg.com/csvtojson/-/csvtojson-2.0.10.tgz#11e7242cc630da54efce7958a45f443210357574" integrity sha512-lUWFxGKyhraKCW8Qghz6Z0f2l/PqB1W3AO0HKJzGIQ5JRSlR651ekJDiGJbBT4sRNNv5ddnSGVEnsxP9XRCVpQ== From 33fa0b50b7acb18759297707b2e0d434b7d6ed33 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Tue, 30 Aug 2022 13:55:55 +0100 Subject: [PATCH 005/396] Promisify stream --- packages/server/src/integrations/s3.ts | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/packages/server/src/integrations/s3.ts b/packages/server/src/integrations/s3.ts index ddae25eee8..43aa04de6a 100644 --- a/packages/server/src/integrations/s3.ts +++ b/packages/server/src/integrations/s3.ts @@ -123,29 +123,22 @@ module S3Module { } async readCsv(query: { bucket: string; key: string }) { - let streamErr: string | undefined = undefined const stream = this.client .getObject({ Bucket: query.bucket, Key: query.key, }) .createReadStream() - .on("error", (err: string) => { - //stream.destroy() - // - console.log("err ", err) - streamErr = "ERROR" - }) - if (streamErr) { - throw new Error("ERROR") - } - - try { - return await csv().fromStream(stream) - } catch (err) { - throw new Error("Failed to read CSV") - } + return new Promise((resolve, reject) => { + stream + .on("error", (err: Error) => { + reject(err) + }) + .on("finish", async () => { + resolve(csv().fromStream(stream)) + }) + }) } } From 15d0d178d6d69aaa9d7b49ff26bc221482e6313a Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Tue, 30 Aug 2022 15:18:44 +0100 Subject: [PATCH 006/396] Handle non-csv file error --- packages/server/src/integrations/s3.ts | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/packages/server/src/integrations/s3.ts b/packages/server/src/integrations/s3.ts index 43aa04de6a..eb3605af8f 100644 --- a/packages/server/src/integrations/s3.ts +++ b/packages/server/src/integrations/s3.ts @@ -130,14 +130,25 @@ module S3Module { }) .createReadStream() - return new Promise((resolve, reject) => { - stream - .on("error", (err: Error) => { - reject(err) - }) - .on("finish", async () => { - resolve(csv().fromStream(stream)) + let csvError = false + return new Promise(async (resolve, reject) => { + stream.on("error", (err: Error) => { + reject(err) + }) + const response = csv() + .fromStream(stream) + .on("error", () => { + csvError = true }) + stream.on("finish", () => { + resolve(response) + }) + }).catch(err => { + if (csvError) { + throw new Error("Could not read CSV") + } else { + throw err + } }) } } From f6d4a97cdd1a274cac950f634c2d74fba0aa7dbe Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Tue, 30 Aug 2022 15:19:18 +0100 Subject: [PATCH 007/396] remove async --- packages/server/src/integrations/s3.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/integrations/s3.ts b/packages/server/src/integrations/s3.ts index eb3605af8f..f24fe92f6b 100644 --- a/packages/server/src/integrations/s3.ts +++ b/packages/server/src/integrations/s3.ts @@ -131,7 +131,7 @@ module S3Module { .createReadStream() let csvError = false - return new Promise(async (resolve, reject) => { + return new Promise((resolve, reject) => { stream.on("error", (err: Error) => { reject(err) }) From 6a1dd4b0aa3fca508512302c7006821d547be4fc Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Tue, 30 Aug 2022 16:56:56 +0100 Subject: [PATCH 008/396] Create WIP --- packages/server/src/integrations/s3.ts | 92 +++++++++++++++++++ .../server/src/integrations/tests/s3.spec.js | 32 ++++++- 2 files changed, 123 insertions(+), 1 deletion(-) diff --git a/packages/server/src/integrations/s3.ts b/packages/server/src/integrations/s3.ts index f24fe92f6b..67568436c3 100644 --- a/packages/server/src/integrations/s3.ts +++ b/packages/server/src/integrations/s3.ts @@ -48,6 +48,41 @@ module S3Module { }, }, query: { + create: { + type: QueryType.FIELDS, + fields: { + bucket: { + display: "New Bucket", + type: DatasourceFieldType.STRING, + required: true, + }, + location: { + required: true, + default: "us-east-1", + type: DatasourceFieldType.STRING, + }, + grantFullControl: { + display: "Grant full control", + type: DatasourceFieldType.STRING, + }, + grantRead: { + display: "Grant read", + type: DatasourceFieldType.STRING, + }, + grantReadAcp: { + display: "Grant read ACP", + type: DatasourceFieldType.STRING, + }, + grantWrite: { + display: "Grant write", + type: DatasourceFieldType.STRING, + }, + grantWriteAcp: { + display: "Grant write ACP", + type: DatasourceFieldType.STRING, + }, + }, + }, read: { type: QueryType.FIELDS, fields: { @@ -85,6 +120,33 @@ module S3Module { }, }, }, + extra: { + acl: { + required: false, + displayName: "ACL", + type: DatasourceFieldType.LIST, + data: { + create: [ + "private", + "public-read", + "public-read-write", + "authenticated-read", + ] + } + }, + objectOwnership: { + required: false, + displayName: "Object ownership", + type: DatasourceFieldType.LIST, + data: { + create: [ + "BucketOwnerPreferred", + "ObjectWriter", + "BucketOwnerEnforced", + ], + }, + }, + } } class S3Integration implements IntegrationBase { @@ -102,6 +164,36 @@ module S3Module { this.client = new AWS.S3(this.config) } + async create(query: { + bucket: string, + location: string, + grantFullControl: string, + grantRead: string, + grantReadAcp: string, + grantWrite: string, + grantWriteAcp: string, + extra: { + acl: string, + objectOwnership: string, + }}) { + const response = await this.client.createBucket({ + Bucket: query.bucket, + // ACL: query.extra?.acl, + CreateBucketConfiguration: { + LocationConstraint: query.location + }, + GrantFullControl: query.grantFullControl, + GrantRead: query.grantRead, + GrantReadACP: query.grantReadAcp, + GrantWrite: query.grantWrite, + GrantWriteACP: query.grantWriteAcp, + }, (err: any) => { + console.log("ERR ", err) + }) + .promise() + return response.Contents + } + async read(query: { bucket: string delimiter: string diff --git a/packages/server/src/integrations/tests/s3.spec.js b/packages/server/src/integrations/tests/s3.spec.js index a655112973..48e7221ef8 100644 --- a/packages/server/src/integrations/tests/s3.spec.js +++ b/packages/server/src/integrations/tests/s3.spec.js @@ -16,7 +16,7 @@ describe("S3 Integration", () => { }) it("calls the read method with the correct params", async () => { - const response = await config.integration.read({ + await config.integration.read({ bucket: "test", delimiter: "/", marker: "file.txt", @@ -31,4 +31,34 @@ describe("S3 Integration", () => { Prefix: "directory/" }) }) + + it("calls the create method with the correct params", async () => { + await config.integration.create({ + bucket: "test", + location: "af-south-1", + grantFullControl: "me", + grantRead: "him", + grantReadAcp: "her", + grantWrite: "she", + grantWriteAcp: "he", + objectLockEnabledForBucket: true + }, { + acl: "private", + objectOwnership: "BucketOwnerPreferred" + }) + expect(config.integration.client.createBucket).toHaveBeenCalledWith({ + Bucket: "test", + CreateBucketConfiguration: { + LocationConstraint: "af-south-1" + }, + GrantFullControl: "me", + GrantRead: "him", + GrantReadAcp: "her", + GrantWrite: "she", + GrantWriteAcp: "he", + ObjectLockEnabledForBucket: true, + ACL: "private", + ObjectOwnership: "BucketOwnerPreferred" + }) + }) }) \ No newline at end of file From 18e9f0151cb1967186666033144c36a97127af7d Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Tue, 30 Aug 2022 19:17:10 +0100 Subject: [PATCH 009/396] Create Bucket --- packages/server/__mocks__/aws-sdk.ts | 7 +++ packages/server/src/integrations/s3.ts | 54 ++++++++----------- .../server/src/integrations/tests/s3.spec.js | 29 +++++++--- 3 files changed, 49 insertions(+), 41 deletions(-) diff --git a/packages/server/__mocks__/aws-sdk.ts b/packages/server/__mocks__/aws-sdk.ts index 75353db7e6..24873ac174 100644 --- a/packages/server/__mocks__/aws-sdk.ts +++ b/packages/server/__mocks__/aws-sdk.ts @@ -37,6 +37,13 @@ module AwsMock { Contents: {}, }) ) + + // @ts-ignore + this.createBucket = jest.fn( + response({ + Contents: {}, + }) + ) } aws.DynamoDB = { DocumentClient } diff --git a/packages/server/src/integrations/s3.ts b/packages/server/src/integrations/s3.ts index 67568436c3..b717ece222 100644 --- a/packages/server/src/integrations/s3.ts +++ b/packages/server/src/integrations/s3.ts @@ -131,22 +131,10 @@ module S3Module { "public-read", "public-read-write", "authenticated-read", - ] - } - }, - objectOwnership: { - required: false, - displayName: "Object ownership", - type: DatasourceFieldType.LIST, - data: { - create: [ - "BucketOwnerPreferred", - "ObjectWriter", - "BucketOwnerEnforced", ], }, }, - } + }, } class S3Integration implements IntegrationBase { @@ -165,33 +153,33 @@ module S3Module { } async create(query: { - bucket: string, - location: string, - grantFullControl: string, - grantRead: string, - grantReadAcp: string, - grantWrite: string, - grantWriteAcp: string, + bucket: string + location: string + grantFullControl: string + grantRead: string + grantReadAcp: string + grantWrite: string + grantWriteAcp: string extra: { - acl: string, - objectOwnership: string, - }}) { - const response = await this.client.createBucket({ + acl: string + } + }) { + let params: any = { Bucket: query.bucket, - // ACL: query.extra?.acl, - CreateBucketConfiguration: { - LocationConstraint: query.location - }, + ACL: query.extra?.acl, GrantFullControl: query.grantFullControl, GrantRead: query.grantRead, GrantReadACP: query.grantReadAcp, GrantWrite: query.grantWrite, GrantWriteACP: query.grantWriteAcp, - }, (err: any) => { - console.log("ERR ", err) - }) - .promise() - return response.Contents + } + if (query.location) { + params["CreateBucketConfiguration"] = { + LocationConstraint: query.location, + } + } + const response = await this.client.createBucket(params).promise() + return response } async read(query: { diff --git a/packages/server/src/integrations/tests/s3.spec.js b/packages/server/src/integrations/tests/s3.spec.js index 48e7221ef8..26a87fa99f 100644 --- a/packages/server/src/integrations/tests/s3.spec.js +++ b/packages/server/src/integrations/tests/s3.spec.js @@ -41,10 +41,10 @@ describe("S3 Integration", () => { grantReadAcp: "her", grantWrite: "she", grantWriteAcp: "he", - objectLockEnabledForBucket: true - }, { - acl: "private", - objectOwnership: "BucketOwnerPreferred" + objectLockEnabledForBucket: true, + extra: { + acl: "private" + } }) expect(config.integration.client.createBucket).toHaveBeenCalledWith({ Bucket: "test", @@ -53,12 +53,25 @@ describe("S3 Integration", () => { }, GrantFullControl: "me", GrantRead: "him", - GrantReadAcp: "her", + GrantReadACP: "her", GrantWrite: "she", - GrantWriteAcp: "he", - ObjectLockEnabledForBucket: true, + GrantWriteACP: "he", ACL: "private", - ObjectOwnership: "BucketOwnerPreferred" + }) + }) + + it("does not add undefined location constraint when calling the create method", async () => { + await config.integration.create({ + bucket: "test" + }) + expect(config.integration.client.createBucket).toHaveBeenCalledWith({ + Bucket: "test", + GrantFullControl: undefined, + GrantRead: undefined, + GrantReadACP: undefined, + GrantWrite: undefined, + GrantWriteACP: undefined, + ACL: undefined, }) }) }) \ No newline at end of file From ff5113f916c17cd31498a9b23fb95c5f1ae2cd74 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Tue, 30 Aug 2022 19:56:08 +0100 Subject: [PATCH 010/396] Delete method S3 Bucket --- packages/server/__mocks__/aws-sdk.ts | 7 ++++ packages/server/src/integrations/s3.ts | 25 ++++++++++++-- .../server/src/integrations/tests/s3.spec.js | 33 +++++++++++++++++++ 3 files changed, 63 insertions(+), 2 deletions(-) diff --git a/packages/server/__mocks__/aws-sdk.ts b/packages/server/__mocks__/aws-sdk.ts index 24873ac174..b0da0e97b6 100644 --- a/packages/server/__mocks__/aws-sdk.ts +++ b/packages/server/__mocks__/aws-sdk.ts @@ -44,6 +44,13 @@ module AwsMock { Contents: {}, }) ) + + // @ts-ignore + this.deleteObjects = jest.fn( + response({ + Contents: {}, + }) + ) } aws.DynamoDB = { DocumentClient } diff --git a/packages/server/src/integrations/s3.ts b/packages/server/src/integrations/s3.ts index b717ece222..72e664fe16 100644 --- a/packages/server/src/integrations/s3.ts +++ b/packages/server/src/integrations/s3.ts @@ -119,6 +119,19 @@ module S3Module { }, }, }, + delete: { + type: QueryType.FIELDS, + fields: { + bucket: { + type: DatasourceFieldType.STRING, + required: true, + }, + delete: { + type: DatasourceFieldType.JSON, + required: true, + }, + }, + } }, extra: { acl: { @@ -178,8 +191,7 @@ module S3Module { LocationConstraint: query.location, } } - const response = await this.client.createBucket(params).promise() - return response + return await this.client.createBucket(params).promise() } async read(query: { @@ -231,6 +243,15 @@ module S3Module { } }) } + + async delete(query: { bucket: string, delete: string }) { + return await this.client + .deleteObjects({ + Bucket: query.bucket, + Delete: JSON.parse(query.delete), + }) + .promise() + } } module.exports = { diff --git a/packages/server/src/integrations/tests/s3.spec.js b/packages/server/src/integrations/tests/s3.spec.js index 26a87fa99f..fc2477a225 100644 --- a/packages/server/src/integrations/tests/s3.spec.js +++ b/packages/server/src/integrations/tests/s3.spec.js @@ -74,4 +74,37 @@ describe("S3 Integration", () => { ACL: undefined, }) }) + + it("calls the delete method with the correct params ", async () => { + await config.integration.delete({ + bucket: "test", + delete: `{ + "Objects": [ + { + "Key": "HappyFace.jpg", + "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b" + }, + { + "Key": "HappyFace.jpg", + "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd" + } + ] + }` + }) + expect(config.integration.client.deleteObjects).toHaveBeenCalledWith({ + Bucket: "test", + Delete: { + Objects: [ + { + Key: "HappyFace.jpg", + VersionId: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b" + }, + { + Key: "HappyFace.jpg", + VersionId: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd" + } + ] + } + }) + }) }) \ No newline at end of file From 00c76d7960e63262889ae2c2876a131c6970a8ec Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Tue, 30 Aug 2022 19:56:38 +0100 Subject: [PATCH 011/396] lint --- packages/server/src/integrations/s3.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/server/src/integrations/s3.ts b/packages/server/src/integrations/s3.ts index 72e664fe16..2ff594495d 100644 --- a/packages/server/src/integrations/s3.ts +++ b/packages/server/src/integrations/s3.ts @@ -131,7 +131,7 @@ module S3Module { required: true, }, }, - } + }, }, extra: { acl: { @@ -244,13 +244,13 @@ module S3Module { }) } - async delete(query: { bucket: string, delete: string }) { + async delete(query: { bucket: string; delete: string }) { return await this.client - .deleteObjects({ - Bucket: query.bucket, - Delete: JSON.parse(query.delete), - }) - .promise() + .deleteObjects({ + Bucket: query.bucket, + Delete: JSON.parse(query.delete), + }) + .promise() } } From b638324ce225beaf9696af6273ec650b74458248 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Sat, 15 Oct 2022 12:58:32 +0100 Subject: [PATCH 012/396] Prevent crash when determining datasource schema for non string type values --- packages/builder/src/builderStore/dataBinding.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/builderStore/dataBinding.js b/packages/builder/src/builderStore/dataBinding.js index 536692eecc..0a70150949 100644 --- a/packages/builder/src/builderStore/dataBinding.js +++ b/packages/builder/src/builderStore/dataBinding.js @@ -1004,7 +1004,10 @@ const bindingReplacement = ( * {{ literal [componentId] }} */ const extractLiteralHandlebarsID = value => { - return value?.match(/{{\s*literal\s*\[+([^\]]+)].*}}/)?.[1] + if (!value || typeof value !== "string") { + return null + } + return value.match(/{{\s*literal\s*\[+([^\]]+)].*}}/)?.[1] } /** From 7bf5cad453dcd6fd80d789b82279516c58de0922 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Sat, 15 Oct 2022 13:06:34 +0100 Subject: [PATCH 013/396] Fix selected rows bindings for table blocks not having a category --- packages/builder/src/builderStore/dataBinding.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/builder/src/builderStore/dataBinding.js b/packages/builder/src/builderStore/dataBinding.js index 0a70150949..d188073b95 100644 --- a/packages/builder/src/builderStore/dataBinding.js +++ b/packages/builder/src/builderStore/dataBinding.js @@ -481,6 +481,7 @@ const getSelectedRowsBindings = asset => { block._id + "-table" )}.${makePropSafe("selectedRows")}`, readableBinding: `${block._instanceName}.Selected rows`, + category: "Selected rows", })) ) } From d1e011814ef3f421a1444f5bc8efcd4f44b9dfbe Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Sat, 15 Oct 2022 13:17:40 +0100 Subject: [PATCH 014/396] Add sensible min widths to settings in the conditional UI drawer so that it's usable on any res --- .../_components/settings/ConditionalUIDrawer.svelte | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ConditionalUIDrawer.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ConditionalUIDrawer.svelte index 74f0c930cd..855c42173b 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ConditionalUIDrawer.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ConditionalUIDrawer.svelte @@ -282,12 +282,16 @@ gap: var(--spacing-l); display: grid; align-items: center; - grid-template-columns: auto 160px auto 1fr 130px 130px 1fr auto auto; + grid-template-columns: + auto 150px auto minmax(140px, 1fr) 120px 100px minmax(140px, 1fr) + auto auto; border-radius: var(--border-radius-s); transition: background-color ease-in-out 130ms; } .condition.update { - grid-template-columns: auto 160px 1fr auto 1fr auto 1fr 130px 130px 1fr auto auto; + grid-template-columns: + auto 150px minmax(140px, 1fr) auto minmax(140px, 1fr) auto + minmax(140px, 1fr) 120px 100px minmax(140px, 1fr) auto auto; } .condition:hover { background-color: var(--spectrum-global-color-gray-100); From 267095f235c923701b9b2018874a6ef9bcb575bc Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Sat, 15 Oct 2022 13:23:20 +0100 Subject: [PATCH 015/396] Add sensible min widths to settings in the filter drawer --- .../controls/FilterEditor/FilterDrawer.svelte | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte b/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte index a419f5ad46..214db0f814 100644 --- a/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte +++ b/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte @@ -38,8 +38,8 @@ let behaviourValue const behaviourOptions = [ - { value: "and", label: "Match all of the following filters" }, - { value: "or", label: "Match any of the following filters" }, + { value: "and", label: "Match all filters" }, + { value: "or", label: "Match any filter" }, ] const addFilter = () => { filters = [ @@ -137,14 +137,9 @@
- - {#if !filters?.length} - Add your first filter expression. - {:else} - Results are filtered to only those which match all of the following - constraints. - {/if} - + {#if !filters?.length} + Add your first filter expression. + {/if} {#if filters?.length}
+ {#if parameters.type === "show"} + + - {#if parameters.type === "show"} - -
diff --git a/packages/types/src/sdk/auth.ts b/packages/types/src/sdk/auth.ts index d61b679c62..766d18a606 100644 --- a/packages/types/src/sdk/auth.ts +++ b/packages/types/src/sdk/auth.ts @@ -31,5 +31,5 @@ export interface ScannedSession { export interface PlatformLogoutOpts { ctx: BBContext userId: string - keepActiveSession: boolean + keepActiveSession?: boolean } diff --git a/packages/worker/__mocks__/node-fetch.ts b/packages/worker/__mocks__/node-fetch.ts deleted file mode 100644 index 4c7127ee48..0000000000 --- a/packages/worker/__mocks__/node-fetch.ts +++ /dev/null @@ -1 +0,0 @@ -jest.mock("node-fetch", () => jest.fn()) diff --git a/packages/worker/__mocks__/oauth.ts b/packages/worker/__mocks__/oauth.ts new file mode 100644 index 0000000000..8e8122a9e0 --- /dev/null +++ b/packages/worker/__mocks__/oauth.ts @@ -0,0 +1,57 @@ +import * as jwt from "jsonwebtoken" + +const mockOAuth2 = { + getOAuthAccessToken: (code: string, p: any, cb: any) => { + const err = null + const accessToken = "access_token" + const refreshToken = "refresh_token" + + const exp = new Date() + exp.setDate(exp.getDate() + 1) + + const iat = new Date() + iat.setDate(iat.getDate() - 1) + + const claims = { + iss: "test", + sub: "sub", + aud: "clientId", + exp: exp.getTime() / 1000, + iat: iat.getTime() / 1000, + email: "oauth@example.com", + } + + const idToken = jwt.sign(claims, "secret") + + const params = { + id_token: idToken, + } + return cb(err, accessToken, refreshToken, params) + }, + _request: ( + method: string, + url: string, + headers: any, + postBody: any, + accessToken: string, + cb: any + ) => { + const err = null + const body = { + sub: "sub", + user_id: "userId", + name: "OAuth", + family_name: "2", + given_name: "OAuth", + middle_name: "", + } + const res = {} + return cb(err, JSON.stringify(body), res) + }, +} + +const oauth = { + OAuth2: jest.fn(() => mockOAuth2), +} + +export = oauth diff --git a/packages/worker/package.json b/packages/worker/package.json index a9a093e753..c925b9d5d6 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -71,9 +71,11 @@ }, "devDependencies": { "@types/jest": "26.0.23", + "@types/jsonwebtoken": "8.5.1", "@types/koa": "2.13.4", "@types/koa__router": "8.0.11", "@types/node": "14.18.20", + "@types/node-fetch": "2.6.1", "@types/pouchdb": "6.4.0", "@types/uuid": "8.3.4", "@typescript-eslint/parser": "5.12.0", diff --git a/packages/worker/src/api/controllers/global/auth.ts b/packages/worker/src/api/controllers/global/auth.ts index c27fe17ee7..9065267658 100644 --- a/packages/worker/src/api/controllers/global/auth.ts +++ b/packages/worker/src/api/controllers/global/auth.ts @@ -1,4 +1,4 @@ -const core = require("@budibase/backend-core") +import core from "@budibase/backend-core" const { Configs, EmailTemplatePurpose } = require("../../../constants") const { sendEmail, isEmailConfigured } = require("../../../utilities/email") const { setCookie, getCookie, clearCookie, hash, platformLogout } = core.utils diff --git a/packages/worker/src/api/routes/global/auth.js b/packages/worker/src/api/routes/global/auth.js index 674279a6f4..2bf6bb68bf 100644 --- a/packages/worker/src/api/routes/global/auth.js +++ b/packages/worker/src/api/routes/global/auth.js @@ -29,11 +29,13 @@ function buildResetUpdateValidation() { } router + // PASSWORD .post( "/api/global/auth/:tenantId/login", buildAuthValidation(), authController.authenticate ) + .post("/api/global/auth/logout", authController.logout) .post( "/api/global/auth/:tenantId/reset", buildResetValidation(), @@ -44,36 +46,43 @@ router buildResetUpdateValidation(), authController.resetUpdate ) - .post("/api/global/auth/logout", authController.logout) + // INIT .post("/api/global/auth/init", authController.setInitInfo) .get("/api/global/auth/init", authController.getInitInfo) - .get("/api/global/auth/:tenantId/google", authController.googlePreAuth) + + // DATASOURCE - MULTI TENANT .get( "/api/global/auth/:tenantId/datasource/:provider", authController.datasourcePreAuth ) - // single tenancy endpoint - .get("/api/global/auth/google/callback", authController.googleAuth) - .get( - "/api/global/auth/datasource/:provider/callback", - authController.datasourceAuth - ) - // multi-tenancy endpoint - .get("/api/global/auth/:tenantId/google/callback", authController.googleAuth) .get( "/api/global/auth/:tenantId/datasource/:provider/callback", authController.datasourceAuth ) + + // DATASOURCE - SINGLE TENANT - DEPRECATED + .get( + "/api/global/auth/datasource/:provider/callback", + authController.datasourceAuth + ) + + // GOOGLE - MULTI TENANT + .get("/api/global/auth/:tenantId/google", authController.googlePreAuth) + .get("/api/global/auth/:tenantId/google/callback", authController.googleAuth) + + // GOOGLE - SINGLE TENANT - DEPRECATED + .get("/api/global/auth/google/callback", authController.googleAuth) + .get("/api/admin/auth/google/callback", authController.googleAuth) + + // OIDC - MULTI TENANT .get( "/api/global/auth/:tenantId/oidc/configs/:configId", authController.oidcPreAuth ) - // single tenancy endpoint - .get("/api/global/auth/oidc/callback", authController.oidcAuth) - // multi-tenancy endpoint .get("/api/global/auth/:tenantId/oidc/callback", authController.oidcAuth) - // deprecated - used by the default system before tenancy - .get("/api/admin/auth/google/callback", authController.googleAuth) + + // OIDC - SINGLE TENANT - DEPRECATED + .get("/api/global/auth/oidc/callback", authController.oidcAuth) .get("/api/admin/auth/oidc/callback", authController.oidcAuth) module.exports = router diff --git a/packages/worker/src/api/routes/global/tests/auth.spec.ts b/packages/worker/src/api/routes/global/tests/auth.spec.ts index 45c8a62cc7..0d47857ac1 100644 --- a/packages/worker/src/api/routes/global/tests/auth.spec.ts +++ b/packages/worker/src/api/routes/global/tests/auth.spec.ts @@ -3,6 +3,12 @@ import { TestConfiguration, mocks } from "../../../../tests" const sendMailMock = mocks.email.mock() import { events } from "@budibase/backend-core" +const expectSetAuthCookie = (res: any) => { + expect( + res.get("Set-Cookie").find((c: string) => c.startsWith("budibase:auth")) + ).toBeDefined() +} + describe("/api/global/auth", () => { const config = new TestConfiguration() @@ -18,92 +24,155 @@ describe("/api/global/auth", () => { jest.clearAllMocks() }) - it("should logout", async () => { - await config.api.auth.logout() - expect(events.auth.logout).toBeCalledTimes(1) - }) - - it("should be able to generate password reset email", async () => { - const { res, code } = await config.api.auth.requestPasswordReset( - sendMailMock - ) - const user = await config.getUser("test@test.com") - - expect(res.body).toEqual({ - message: "Please check your email for a reset link.", + describe("password", () => { + describe("POST /api/global/auth/:tenantId/login", () => { + it("should login", () => {}) }) - expect(sendMailMock).toHaveBeenCalled() - expect(code).toBeDefined() - expect(events.user.passwordResetRequested).toBeCalledTimes(1) - expect(events.user.passwordResetRequested).toBeCalledWith(user) + describe("POST /api/global/auth/logout", () => { + it("should logout", async () => { + await config.api.auth.logout() + expect(events.auth.logout).toBeCalledTimes(1) + + // TODO: Verify sessions deleted + }) + }) + + describe("POST /api/global/auth/:tenantId/reset", () => { + it("should generate password reset email", async () => { + const { res, code } = await config.api.auth.requestPasswordReset( + sendMailMock + ) + const user = await config.getUser("test@test.com") + + expect(res.body).toEqual({ + message: "Please check your email for a reset link.", + }) + expect(sendMailMock).toHaveBeenCalled() + + expect(code).toBeDefined() + expect(events.user.passwordResetRequested).toBeCalledTimes(1) + expect(events.user.passwordResetRequested).toBeCalledWith(user) + }) + }) + + describe("POST /api/global/auth/:tenantId/reset/update", () => { + it("should reset password", async () => { + const { code } = await config.api.auth.requestPasswordReset( + sendMailMock + ) + const user = await config.getUser("test@test.com") + delete user.password + + const res = await config.api.auth.updatePassword(code) + + expect(res.body).toEqual({ message: "password reset successfully." }) + expect(events.user.passwordReset).toBeCalledTimes(1) + expect(events.user.passwordReset).toBeCalledWith(user) + + // TODO: Login using new password + }) + }) }) - it("should allow resetting user password with code", async () => { - const { code } = await config.api.auth.requestPasswordReset(sendMailMock) - const user = await config.getUser("test@test.com") - delete user.password + describe("init", () => { + describe("POST /api/global/auth/init", () => {}) - const res = await config.api.auth.updatePassword(code) + describe("GET /api/global/auth/init", () => {}) + }) - expect(res.body).toEqual({ message: "password reset successfully." }) - expect(events.user.passwordReset).toBeCalledTimes(1) - expect(events.user.passwordReset).toBeCalledWith(user) + describe("datasource", () => { + // MULTI TENANT + + describe("GET /api/global/auth/:tenantId/datasource/:provider", () => {}) + + describe("GET /api/global/auth/:tenantId/datasource/:provider/callback", () => {}) + + // SINGLE TENANT + + describe("GET /api/global/auth/datasource/:provider/callback", () => {}) + }) + + describe("google", () => { + // MULTI TENANT + + describe("GET /api/global/auth/:tenantId/google", () => {}) + + describe("GET /api/global/auth/:tenantId/google/callback", () => {}) + + // SINGLE TENANT + + describe("GET /api/global/auth/google/callback", () => {}) + + describe("GET /api/admin/auth/google/callback", () => {}) }) describe("oidc", () => { - const auth = require("@budibase/backend-core/auth") - - const passportSpy = jest.spyOn(auth.passport, "authenticate") - let oidcConf - let chosenConfig: any - let configId: string - - // mock the oidc strategy implementation and return value - let strategyFactory = jest.fn() - let mockStrategyReturn = jest.fn() - let mockStrategyConfig = jest.fn() - auth.oidc.fetchStrategyConfig = mockStrategyConfig - - strategyFactory.mockReturnValue(mockStrategyReturn) - auth.oidc.strategyFactory = strategyFactory - beforeEach(async () => { - oidcConf = await config.saveOIDCConfig() - chosenConfig = oidcConf.config.configs[0] - configId = chosenConfig.uuid - mockStrategyConfig.mockReturnValue(chosenConfig) + jest.clearAllMocks() + mockGetWellKnownConfig() + + // see: __mocks__/oauth + // for associated mocking inside passport }) - afterEach(() => { - expect(strategyFactory).toBeCalledWith(chosenConfig, expect.any(Function)) - }) + const generateOidcConfig = async () => { + const oidcConf = await config.saveOIDCConfig() + const chosenConfig = oidcConf.config.configs[0] + return chosenConfig.uuid + } - describe("oidc configs", () => { - it("should load strategy and delegate to passport", async () => { - await config.api.configs.getOIDCConfig(configId) + const mockGetWellKnownConfig = () => { + mocks.fetch.mockReturnValue({ + ok: true, + json: () => ({ + issuer: "test", + authorization_endpoint: "http://localhost/auth", + token_endpoint: "http://localhost/token", + userinfo_endpoint: "http://localhost/userinfo", + }), + }) + } - expect(passportSpy).toBeCalledWith(mockStrategyReturn, { - scope: ["profile", "email", "offline_access"], - }) - expect(passportSpy.mock.calls.length).toBe(1) + // MULTI TENANT + describe("GET /api/global/auth/:tenantId/oidc/configs/:configId", () => { + it("redirects to auth provider", async () => { + const configId = await generateOidcConfig() + + const res = await config.api.configs.getOIDCConfig(configId) + + expect(res.status).toBe(302) + const location: string = res.get("location") + expect( + location.startsWith( + "http://localhost/auth?response_type=code&client_id=clientId&redirect_uri=http%3A%2F%2Flocalhost%3A10000%2Fapi%2Fglobal%2Fauth%2Fdefault%2Foidc%2Fcallback&scope=openid%20profile%20email%20offline_access" + ) + ).toBe(true) }) }) - describe("oidc callback", () => { - it("should load strategy and delegate to passport", async () => { - await config.api.configs.OIDCCallback(configId) + describe("GET /api/global/auth/:tenantId/oidc/callback", () => { + it("logs in", async () => { + const configId = await generateOidcConfig() + const preAuthRes = await config.api.configs.getOIDCConfig(configId) - expect(passportSpy).toBeCalledWith( - mockStrategyReturn, - { - successRedirect: "/", - failureRedirect: "/error", - }, - expect.anything() - ) - expect(passportSpy.mock.calls.length).toBe(1) + const res = await config.api.configs.OIDCCallback(configId, preAuthRes) + + expect(events.auth.login).toBeCalledWith("oidc") + expect(events.auth.login).toBeCalledTimes(1) + expect(res.status).toBe(302) + const location: string = res.get("location") + expect(location).toBe("/") + expectSetAuthCookie(res) }) }) + + // SINGLE TENANT + + describe("GET /api/global/auth/oidc/callback", () => {}) + + describe("GET /api/global/auth/oidc/callback", () => {}) + + describe("GET /api/admin/auth/oidc/callback", () => {}) }) }) diff --git a/packages/worker/src/api/routes/system/tests/tenants.spec.ts b/packages/worker/src/api/routes/system/tests/tenants.spec.ts index 8b3bcc99f5..af509b402e 100644 --- a/packages/worker/src/api/routes/system/tests/tenants.spec.ts +++ b/packages/worker/src/api/routes/system/tests/tenants.spec.ts @@ -1,7 +1,7 @@ import { TestConfiguration } from "../../../../tests" import { tenancy } from "@budibase/backend-core" -describe("/api/global/workspaces", () => { +describe("/api/global/tenants", () => { const config = new TestConfiguration() beforeAll(async () => { diff --git a/packages/worker/src/tests/TestConfiguration.ts b/packages/worker/src/tests/TestConfiguration.ts index 2927915284..11da7c2b03 100644 --- a/packages/worker/src/tests/TestConfiguration.ts +++ b/packages/worker/src/tests/TestConfiguration.ts @@ -171,8 +171,11 @@ class TestConfiguration { } cookieHeader(cookies: any) { + if (!Array.isArray(cookies)) { + cookies = [cookies] + } return { - Cookie: [cookies], + Cookie: cookies, } } @@ -288,11 +291,6 @@ class TestConfiguration { // CONFIGS - OIDC - getOIDConfigCookie(configId: string) { - const token = auth.jwt.sign(configId, env.JWT_SECRET) - return this.cookieHeader([[`${Cookies.OIDC_CONFIG}=${token}`]]) - } - async saveOIDCConfig() { await this.deleteConfig(Configs.OIDC) const config = structures.configs.oidc() diff --git a/packages/worker/src/tests/api/configs.ts b/packages/worker/src/tests/api/configs.ts index 6799229f58..10413dfdd6 100644 --- a/packages/worker/src/tests/api/configs.ts +++ b/packages/worker/src/tests/api/configs.ts @@ -23,10 +23,20 @@ export class ConfigAPI extends TestAPI { .expect(200) } - OIDCCallback = (configId: string) => { + OIDCCallback = (configId: string, preAuthRes: any) => { + const cookie = this.config.cookieHeader(preAuthRes.get("set-cookie")) + const setKoaSession = cookie.Cookie.find((c: string) => + c.includes("koa:sess") + ) + const koaSession = setKoaSession.split("=")[1] + "==" + const sessionContent = JSON.parse( + Buffer.from(koaSession, "base64").toString("utf-8") + ) + const handle = sessionContent["openidconnect:localhost"].state.handle return this.request .get(`/api/global/auth/${this.config.getTenantId()}/oidc/callback`) - .set(this.config.getOIDConfigCookie(configId)) + .query({ code: "test", state: handle }) + .set(cookie) } getOIDCConfig = (configId: string) => { diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index cfdba32e7a..23f54ae770 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -1284,6 +1284,13 @@ resolved "https://registry.yarnpkg.com/@types/json-buffer/-/json-buffer-3.0.0.tgz#85c1ff0f0948fc159810d4b5be35bf8c20875f64" integrity sha512-3YP80IxxFJB4b5tYC2SUPwkg0XQLiu0nWvhRgEatgjf+29IcWO9X1k8xRv5DGssJ/lCrjYTjQPcobJr2yWIVuQ== +"@types/jsonwebtoken@8.5.1": + version "8.5.1" + resolved "https://registry.yarnpkg.com/@types/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz#56958cb2d80f6d74352bd2e501a018e2506a8a84" + integrity sha512-rNAPdomlIUX0i0cg2+I+Q1wOUr531zHBQ+cV/28PJ39bSPKjahatZZ2LMuhiguETkCgLVzfruw/ZvNMNkKoSzw== + dependencies: + "@types/node" "*" + "@types/keygrip@*": version "1.0.2" resolved "https://registry.yarnpkg.com/@types/keygrip/-/keygrip-1.0.2.tgz#513abfd256d7ad0bf1ee1873606317b33b1b2a72" @@ -1334,6 +1341,14 @@ resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197" integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA== +"@types/node-fetch@2.6.1": + version "2.6.1" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.1.tgz#8f127c50481db65886800ef496f20bbf15518975" + integrity sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA== + dependencies: + "@types/node" "*" + form-data "^3.0.0" + "@types/node@*": version "17.0.41" resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.41.tgz#1607b2fd3da014ae5d4d1b31bc792a39348dfb9b" @@ -3412,6 +3427,15 @@ forever-agent@~0.6.1: resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== +form-data@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" + integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + form-data@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" diff --git a/qa-core/src/config/internal-api/TestConfiguration/applications.ts b/qa-core/src/config/internal-api/TestConfiguration/applications.ts index cb0558222e..13d0969854 100644 --- a/qa-core/src/config/internal-api/TestConfiguration/applications.ts +++ b/qa-core/src/config/internal-api/TestConfiguration/applications.ts @@ -114,8 +114,6 @@ export default class AppApi { return [response, json] } - - async delete(appId: string): Promise<[Response, any]> { const response = await this.api.del(`/applications/${appId}`) const json = await response.json() @@ -123,7 +121,11 @@ export default class AppApi { return [response, json] } - async update(appId: string, oldName: string, body: any): Promise<[Response, Application]> { + async update( + appId: string, + oldName: string, + body: any + ): Promise<[Response, Application]> { const response = await this.api.put(`/applications/${appId}`, { body }) const json = await response.json() expect(response).toHaveStatusCode(200) @@ -142,7 +144,6 @@ export default class AppApi { const json = await response.json() expect(response).toHaveStatusCode(200) if (screenExists) { - expect(json.routes["/test"]).toBeTruthy() } else { expect(json.routes["/test"]).toBeUndefined() diff --git a/qa-core/src/config/internal-api/TestConfiguration/tables.ts b/qa-core/src/config/internal-api/TestConfiguration/tables.ts index ed0ab78cad..5b7e1648a0 100644 --- a/qa-core/src/config/internal-api/TestConfiguration/tables.ts +++ b/qa-core/src/config/internal-api/TestConfiguration/tables.ts @@ -46,9 +46,7 @@ export default class TablesApi { const response = await this.api.del(`/tables/${id}/${revId}`) const json = await response.json() expect(response).toHaveStatusCode(200) - expect(json.message).toEqual( - `Table ${id} deleted.` - ) + expect(json.message).toEqual(`Table ${id} deleted.`) return [response, json] } } diff --git a/qa-core/src/config/internal-api/fixtures/applications.ts b/qa-core/src/config/internal-api/fixtures/applications.ts index abdd674577..200aa9abff 100644 --- a/qa-core/src/config/internal-api/fixtures/applications.ts +++ b/qa-core/src/config/internal-api/fixtures/applications.ts @@ -1,7 +1,6 @@ import generator from "../../generator" import { Application } from "@budibase/server/api/controllers/public/mapping/types" - const generate = ( overrides: Partial = {} ): Partial => ({ diff --git a/qa-core/src/tests/internal-api/applications/applications.spec.ts b/qa-core/src/tests/internal-api/applications/applications.spec.ts index 4b9b66ec65..4b3208ee10 100644 --- a/qa-core/src/tests/internal-api/applications/applications.spec.ts +++ b/qa-core/src/tests/internal-api/applications/applications.spec.ts @@ -48,7 +48,8 @@ describe("Internal API - Application creation, update, publish and delete", () = }) config.applications.api.appId = app.appId - const [appPackageResponse, appPackageJson] = await config.applications.getAppPackage(app.appId) + const [appPackageResponse, appPackageJson] = + await config.applications.getAppPackage(app.appId) expect(appPackageJson.application.name).toEqual(app.name) expect(appPackageJson.application.version).toEqual(app.version) expect(appPackageJson.application.url).toEqual(app.url) @@ -72,7 +73,6 @@ describe("Internal API - Application creation, update, publish and delete", () = config.applications.api.appId = db.getProdAppID(app.appId) await config.applications.canRender() - // unpublish app await config.applications.unpublish(app.appId) }) @@ -109,22 +109,16 @@ describe("Internal API - Application creation, update, publish and delete", () = config.applications.api.appId = app.appId - await config.applications.update( - app.appId, - app.name, - { - name: generator.word(), - } - ) + await config.applications.update(app.appId, app.name, { + name: generator.word(), + }) }) it("POST - Revert Changes without changes", async () => { const app = await config.applications.create(generateApp()) config.applications.api.appId = app.appId - await config.applications.revertUnpublished( - app.appId - ) + await config.applications.revertUnpublished(app.appId) }) it("POST - Revert Changes", async () => { @@ -134,20 +128,14 @@ describe("Internal API - Application creation, update, publish and delete", () = // publish app await config.applications.publish(app.url) - // Change/add component to the app - await config.screen.create( - generateScreen("BASIC") - ) + await config.screen.create(generateScreen("BASIC")) // // Revert the app to published state - await config.applications.revertPublished( - app.appId - ) + await config.applications.revertPublished(app.appId) // Check screen is removed await config.applications.getRoutes() - }) it("DELETE - Delete an application", async () => { @@ -155,5 +143,4 @@ describe("Internal API - Application creation, update, publish and delete", () = await config.applications.delete(app.appId) }) - }) diff --git a/qa-core/src/tests/internal-api/screens/screens.spec.ts b/qa-core/src/tests/internal-api/screens/screens.spec.ts index 2dc7962914..218d71cb0d 100644 --- a/qa-core/src/tests/internal-api/screens/screens.spec.ts +++ b/qa-core/src/tests/internal-api/screens/screens.spec.ts @@ -38,9 +38,7 @@ describe("Internal API - /screens endpoints", () => { // Create Screen appConfig.applications.api.appId = app.appId - await config.screen.create( - generateScreen("BASIC") - ) + await config.screen.create(generateScreen("BASIC")) // Check screen exists await appConfig.applications.getRoutes(true) @@ -58,6 +56,5 @@ describe("Internal API - /screens endpoints", () => { // Delete Screen await config.screen.delete(screen._id!, screen._rev!) - }) }) diff --git a/qa-core/src/tests/internal-api/tables/tables.spec.ts b/qa-core/src/tests/internal-api/tables/tables.spec.ts index 69ad0fed7b..4f9e4299cf 100644 --- a/qa-core/src/tests/internal-api/tables/tables.spec.ts +++ b/qa-core/src/tests/internal-api/tables/tables.spec.ts @@ -3,93 +3,87 @@ import { Application } from "@budibase/server/api/controllers/public/mapping/typ import InternalAPIClient from "../../../config/internal-api/TestConfiguration/InternalAPIClient" import generator from "../../../config/generator" import { - generateTable, - generateNewColumnForTable, + generateTable, + generateNewColumnForTable, } from "../../../config/internal-api/fixtures/table" import { generateNewRowForTable } from "../../../config/internal-api/fixtures/rows" describe("Internal API - Application creation, update, publish and delete", () => { - const api = new InternalAPIClient() - const config = new TestConfiguration(api) + const api = new InternalAPIClient() + const config = new TestConfiguration(api) - beforeAll(async () => { - await config.beforeAll() + beforeAll(async () => { + await config.beforeAll() + }) + + afterAll(async () => { + await config.afterAll() + }) + + async function createAppFromTemplate() { + return config.applications.create({ + name: generator.word(), + url: `/${generator.word()}`, + useTemplate: "true", + templateName: "Near Miss Register", + templateKey: "app/near-miss-register", + templateFile: undefined, }) + } - afterAll(async () => { - await config.afterAll() - }) + it("Operations on Tables", async () => { + // create the app + const appName = generator.word() + const app = await createAppFromTemplate() + config.applications.api.appId = app.appId - async function createAppFromTemplate() { - return config.applications.create({ - name: generator.word(), - url: `/${generator.word()}`, - useTemplate: "true", - templateName: "Near Miss Register", - templateKey: "app/near-miss-register", - templateFile: undefined, - }) + // Get current tables: expect 2 in this template + await config.tables.getAll(2) + + // Add new table + const [createdTableResponse, createdTableData] = await config.tables.save( + generateTable() + ) + + //Table was added + await config.tables.getAll(3) + + //Get information about the table + await config.tables.getTableById(createdTableData._id) + + //Add Column to table + const newColumn = generateNewColumnForTable(createdTableData) + const [addColumnResponse, addColumnData] = await config.tables.save( + newColumn, + true + ) + + //Add Row to table + const newRow = generateNewRowForTable(addColumnData._id) + await config.rows.add(addColumnData._id, newRow) + + //Get Row from table + const [getRowResponse, getRowData] = await config.rows.getAll( + addColumnData._id + ) + + //Delete Row from table + const rowToDelete = { + rows: [getRowData[0]], } + const [deleteRowResponse, deleteRowData] = await config.rows.delete( + addColumnData._id, + rowToDelete + ) + expect(deleteRowData[0]._id).toEqual(getRowData[0]._id) - it("Operations on Tables", async () => { - // create the app - const appName = generator.word() - const app = await createAppFromTemplate() - config.applications.api.appId = app.appId + //Delete the table + const [deleteTableResponse, deleteTable] = await config.tables.delete( + addColumnData._id, + addColumnData._rev + ) - // Get current tables: expect 2 in this template - await config.tables.getAll(2) - - // Add new table - const [createdTableResponse, createdTableData] = await config.tables.save( - generateTable() - ) - - //Table was added - await config.tables.getAll(3) - - //Get information about the table - await config.tables.getTableById( - createdTableData._id - ) - - //Add Column to table - const newColumn = generateNewColumnForTable(createdTableData) - const [addColumnResponse, addColumnData] = await config.tables.save( - newColumn, - true - ) - - //Add Row to table - const newRow = generateNewRowForTable(addColumnData._id) - await config.rows.add( - addColumnData._id, - newRow - ) - - //Get Row from table - const [getRowResponse, getRowData] = await config.rows.getAll( - addColumnData._id - ) - - //Delete Row from table - const rowToDelete = { - rows: [getRowData[0]], - } - const [deleteRowResponse, deleteRowData] = await config.rows.delete( - addColumnData._id, - rowToDelete - ) - expect(deleteRowData[0]._id).toEqual(getRowData[0]._id) - - //Delete the table - const [deleteTableResponse, deleteTable] = await config.tables.delete( - addColumnData._id, - addColumnData._rev - ) - - - //Table was deleted - await config.tables.getAll(2) - }) + //Table was deleted + await config.tables.getAll(2) + }) }) From 0367d466c3c566be54d45d040654929966c836ff Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 16 Nov 2022 12:04:59 +0000 Subject: [PATCH 123/396] v2.1.22-alpha.5 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 8 ++++---- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/sdk/package.json | 2 +- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lerna.json b/lerna.json index b130e9cf1f..80ba94078e 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.1.22-alpha.4", + "version": "2.1.22-alpha.5", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index ac1d68c6a1..e695b65303 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.1.22-alpha.4", + "version": "2.1.22-alpha.5", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "2.1.22-alpha.4", + "@budibase/types": "2.1.22-alpha.5", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 827ff1a325..5746d369cd 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "2.1.22-alpha.4", + "version": "2.1.22-alpha.5", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "2.1.22-alpha.4", + "@budibase/string-templates": "2.1.22-alpha.5", "@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 168016d080..48b92a2f1a 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.1.22-alpha.4", + "version": "2.1.22-alpha.5", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.1.22-alpha.4", - "@budibase/client": "2.1.22-alpha.4", - "@budibase/frontend-core": "2.1.22-alpha.4", - "@budibase/string-templates": "2.1.22-alpha.4", + "@budibase/bbui": "2.1.22-alpha.5", + "@budibase/client": "2.1.22-alpha.5", + "@budibase/frontend-core": "2.1.22-alpha.5", + "@budibase/string-templates": "2.1.22-alpha.5", "@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 cfe7f7cd2a..3ef135ce0d 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.1.22-alpha.4", + "version": "2.1.22-alpha.5", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "2.1.22-alpha.4", - "@budibase/string-templates": "2.1.22-alpha.4", - "@budibase/types": "2.1.22-alpha.4", + "@budibase/backend-core": "2.1.22-alpha.5", + "@budibase/string-templates": "2.1.22-alpha.5", + "@budibase/types": "2.1.22-alpha.5", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index 143ff6b27b..09299de447 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.1.22-alpha.4", + "version": "2.1.22-alpha.5", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "2.1.22-alpha.4", - "@budibase/frontend-core": "2.1.22-alpha.4", - "@budibase/string-templates": "2.1.22-alpha.4", + "@budibase/bbui": "2.1.22-alpha.5", + "@budibase/frontend-core": "2.1.22-alpha.5", + "@budibase/string-templates": "2.1.22-alpha.5", "@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 e60f3d3a29..f1f56fa5a1 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.1.22-alpha.4", + "version": "2.1.22-alpha.5", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.1.22-alpha.4", + "@budibase/bbui": "2.1.22-alpha.5", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 22e5f7e65d..805d8c7493 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.1.22-alpha.4", + "version": "2.1.22-alpha.5", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index 0d43aee1e5..12d8c2bc56 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.1.22-alpha.4", + "version": "2.1.22-alpha.5", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -43,11 +43,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "2.1.22-alpha.4", - "@budibase/client": "2.1.22-alpha.4", + "@budibase/backend-core": "2.1.22-alpha.5", + "@budibase/client": "2.1.22-alpha.5", "@budibase/pro": "2.1.22-alpha.4", - "@budibase/string-templates": "2.1.22-alpha.4", - "@budibase/types": "2.1.22-alpha.4", + "@budibase/string-templates": "2.1.22-alpha.5", + "@budibase/types": "2.1.22-alpha.5", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 2fa6082232..f644de4da3 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.1.22-alpha.4", + "version": "2.1.22-alpha.5", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index 55ac72c7d7..9653472795 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.1.22-alpha.4", + "version": "2.1.22-alpha.5", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index fdadff86a6..6d3cfefdba 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.1.22-alpha.4", + "version": "2.1.22-alpha.5", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.1.22-alpha.4", + "@budibase/backend-core": "2.1.22-alpha.5", "@budibase/pro": "2.1.22-alpha.4", - "@budibase/string-templates": "2.1.22-alpha.4", - "@budibase/types": "2.1.22-alpha.4", + "@budibase/string-templates": "2.1.22-alpha.5", + "@budibase/types": "2.1.22-alpha.5", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From ec178a95d18048388dc38de5fd3f386cff208911 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 16 Nov 2022 12:08:51 +0000 Subject: [PATCH 124/396] Update pro version to 2.1.22-alpha.5 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index 12d8c2bc56..edce54787c 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -45,7 +45,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "2.1.22-alpha.5", "@budibase/client": "2.1.22-alpha.5", - "@budibase/pro": "2.1.22-alpha.4", + "@budibase/pro": "2.1.22-alpha.5", "@budibase/string-templates": "2.1.22-alpha.5", "@budibase/types": "2.1.22-alpha.5", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 905af68259..33fe32d3c5 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1273,12 +1273,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.22-alpha.4": - version "2.1.22-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.22-alpha.4.tgz#25e186273d2416f1fe8ed639146d3d8e977c8bc8" - integrity sha512-uii4hL/KvgMH8o713x54B2bGdtgYWE4AUxkzPs/2LCEa6Z3eeahziaElsRyc8oELqh0f71PYDdRC6gSJZZ1hdQ== +"@budibase/backend-core@2.1.22-alpha.5": + version "2.1.22-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.22-alpha.5.tgz#171bff9affca8a372c08aa5007f6e55bfb202f9c" + integrity sha512-N/+w/nsUgYXUE9zSMJsKb3lrV3gWhXfyMgl+5cKMEi9o9wT/Zvi20nBtkBb2kxQE8RrL8C37+5531tdj0adJZA== dependencies: - "@budibase/types" "2.1.22-alpha.4" + "@budibase/types" "2.1.22-alpha.5" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1360,13 +1360,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.1.22-alpha.4": - version "2.1.22-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.22-alpha.4.tgz#860edf8e6f022ea4bf33440d1c3173cc3f0ee9a1" - integrity sha512-L1EezM8ZdUWb+XlBgrslwCZ67wxUBRgTH3S/uGTZqGL1jGvEm7w4IQTyH55AqTABx5ZyNyAlOYKCipGjb5fplw== +"@budibase/pro@2.1.22-alpha.5": + version "2.1.22-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.22-alpha.5.tgz#d86f850bc35d81b5f41807b995d5896acca36aaa" + integrity sha512-Mv3uIq3kJYuUdj0Hdz6toTShgWdGpf1k7962cGds5vrTtzESbXpB8HkL7WhgDnbOCH92AP3mKmuhkxe9T1On7A== dependencies: - "@budibase/backend-core" "2.1.22-alpha.4" - "@budibase/types" "2.1.22-alpha.4" + "@budibase/backend-core" "2.1.22-alpha.5" + "@budibase/types" "2.1.22-alpha.5" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -1390,10 +1390,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.1.22-alpha.4": - version "2.1.22-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.22-alpha.4.tgz#cadcafae414610e0bec101380dc0300ad6ad0702" - integrity sha512-xkrgqzkd4a9xb94Z05yh91fD7/2LSzrvvkS7eNV5rL7+9ddMWHUFVCCm/ggK+qnXKPhqIMq5TmGeLu28HjcJJQ== +"@budibase/types@2.1.22-alpha.5": + version "2.1.22-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.22-alpha.5.tgz#b90116da2fbccbd5f20acfe5189c1fb970cb5d3b" + integrity sha512-VRkjc5rtpZlj6iBDgQx/L4EGqSRupcqG/tu+tGZNJjEV92T/yiRt6+7UC+uIQjEUawcK1RDSqXLdk3g7+kFv0g== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 6d3cfefdba..c87dfd4e3c 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "2.1.22-alpha.5", - "@budibase/pro": "2.1.22-alpha.4", + "@budibase/pro": "2.1.22-alpha.5", "@budibase/string-templates": "2.1.22-alpha.5", "@budibase/types": "2.1.22-alpha.5", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 3dae0b88ea..ba04eb0cca 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -470,12 +470,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.22-alpha.4": - version "2.1.22-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.22-alpha.4.tgz#25e186273d2416f1fe8ed639146d3d8e977c8bc8" - integrity sha512-uii4hL/KvgMH8o713x54B2bGdtgYWE4AUxkzPs/2LCEa6Z3eeahziaElsRyc8oELqh0f71PYDdRC6gSJZZ1hdQ== +"@budibase/backend-core@2.1.22-alpha.5": + version "2.1.22-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.22-alpha.5.tgz#171bff9affca8a372c08aa5007f6e55bfb202f9c" + integrity sha512-N/+w/nsUgYXUE9zSMJsKb3lrV3gWhXfyMgl+5cKMEi9o9wT/Zvi20nBtkBb2kxQE8RrL8C37+5531tdj0adJZA== dependencies: - "@budibase/types" "2.1.22-alpha.4" + "@budibase/types" "2.1.22-alpha.5" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -507,22 +507,22 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.1.22-alpha.4": - version "2.1.22-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.22-alpha.4.tgz#860edf8e6f022ea4bf33440d1c3173cc3f0ee9a1" - integrity sha512-L1EezM8ZdUWb+XlBgrslwCZ67wxUBRgTH3S/uGTZqGL1jGvEm7w4IQTyH55AqTABx5ZyNyAlOYKCipGjb5fplw== +"@budibase/pro@2.1.22-alpha.5": + version "2.1.22-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.22-alpha.5.tgz#d86f850bc35d81b5f41807b995d5896acca36aaa" + integrity sha512-Mv3uIq3kJYuUdj0Hdz6toTShgWdGpf1k7962cGds5vrTtzESbXpB8HkL7WhgDnbOCH92AP3mKmuhkxe9T1On7A== dependencies: - "@budibase/backend-core" "2.1.22-alpha.4" - "@budibase/types" "2.1.22-alpha.4" + "@budibase/backend-core" "2.1.22-alpha.5" + "@budibase/types" "2.1.22-alpha.5" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.1.22-alpha.4": - version "2.1.22-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.22-alpha.4.tgz#cadcafae414610e0bec101380dc0300ad6ad0702" - integrity sha512-xkrgqzkd4a9xb94Z05yh91fD7/2LSzrvvkS7eNV5rL7+9ddMWHUFVCCm/ggK+qnXKPhqIMq5TmGeLu28HjcJJQ== +"@budibase/types@2.1.22-alpha.5": + version "2.1.22-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.22-alpha.5.tgz#b90116da2fbccbd5f20acfe5189c1fb970cb5d3b" + integrity sha512-VRkjc5rtpZlj6iBDgQx/L4EGqSRupcqG/tu+tGZNJjEV92T/yiRt6+7UC+uIQjEUawcK1RDSqXLdk3g7+kFv0g== "@cspotcode/source-map-support@^0.8.0": version "0.8.1" From 29a402d72b510f8a5965370bc62c750fe2618dac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Nov 2022 12:15:18 +0000 Subject: [PATCH 125/396] Bump loader-utils from 1.4.1 to 1.4.2 in /packages/bbui Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.1 to 1.4.2. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md) - [Commits](https://github.com/webpack/loader-utils/compare/v1.4.1...v1.4.2) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] --- packages/bbui/yarn.lock | 941 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 932 insertions(+), 9 deletions(-) diff --git a/packages/bbui/yarn.lock b/packages/bbui/yarn.lock index 6c212855b4..f148ca201e 100644 --- a/packages/bbui/yarn.lock +++ b/packages/bbui/yarn.lock @@ -28,6 +28,43 @@ chalk "^2.0.0" js-tokens "^4.0.0" +"@budibase/handlebars-helpers@^0.11.8": + version "0.11.8" + resolved "https://registry.yarnpkg.com/@budibase/handlebars-helpers/-/handlebars-helpers-0.11.8.tgz#6953d29673a8c5c407e096c0a84890465c7ce841" + integrity sha512-ggWJUt0GqsHFAEup5tlWlcrmYML57nKhpNGGLzVsqXVYN8eVmf3xluYmmMe7fDYhQH0leSprrdEXmsdFQF3HAQ== + dependencies: + array-sort "^1.0.0" + define-property "^2.0.2" + extend-shallow "^3.0.2" + for-in "^1.0.2" + get-object "^0.2.0" + get-value "^3.0.1" + handlebars "^4.7.7" + handlebars-utils "^1.0.6" + has-value "^2.0.2" + helper-md "^0.2.2" + html-tag "^2.0.0" + is-even "^1.0.0" + is-glob "^4.0.1" + kind-of "^6.0.3" + micromatch "^3.1.5" + relative "^3.0.2" + striptags "^3.1.1" + to-gfm-code-block "^0.1.1" + year "^0.2.1" + +"@budibase/string-templates@2.1.22-alpha.5": + version "2.1.22-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/string-templates/-/string-templates-2.1.22-alpha.5.tgz#3493be2ec8a3799ad1f7e470c308d9cdcd36abf6" + integrity sha512-iFN4nccB8eIjsaU0ki7DyC+zznJaGC+cUQiAiwgO+aDm3SD6vkF443IjwL/fcmpK81/4WpEWmJPDjVuQ+vjlKQ== + dependencies: + "@budibase/handlebars-helpers" "^0.11.8" + dayjs "^1.10.4" + handlebars "^4.7.6" + handlebars-utils "^1.0.6" + lodash "^4.17.20" + vm2 "^3.9.4" + "@jridgewell/gen-mapping@^0.3.0": version "0.3.2" resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" @@ -375,6 +412,11 @@ accepts@~1.3.7: mime-types "~2.1.24" negotiator "0.6.2" +acorn-walk@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== + acorn@^7.3.1: version "7.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" @@ -385,6 +427,11 @@ acorn@^8.5.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30" integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A== +acorn@^8.7.0: + version "8.8.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.1.tgz#0a3f9cbecc4ec3bea6f0a80b66ae8dd2da250b73" + integrity sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA== + alphanum-sort@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" @@ -412,28 +459,87 @@ anymatch@~3.1.1: normalize-path "^3.0.0" picomatch "^2.0.4" -argparse@^1.0.7: +argparse@^1.0.10, argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== dependencies: sprintf-js "~1.0.2" +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA== + +arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q== + array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= +array-sort@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-sort/-/array-sort-1.0.0.tgz#e4c05356453f56f53512a7d1d6123f2c54c0a88a" + integrity sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg== + dependencies: + default-compare "^1.0.0" + get-value "^2.0.6" + kind-of "^5.0.2" + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ== + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw== + async-limiter@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== +atob@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== + +autolinker@~0.28.0: + version "0.28.1" + resolved "https://registry.yarnpkg.com/autolinker/-/autolinker-0.28.1.tgz#0652b491881879f0775dace0cdca3233942a4e47" + integrity sha512-zQAFO1Dlsn69eXaO6+7YZc+v84aquQKbwpzCE3L0stj56ERn9hutFxPopViLjo9G+rWwjozRhgS5KJ25Xy19cQ== + dependencies: + gulp-header "^1.7.1" + balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + big.js@^5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" @@ -473,6 +579,22 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" +braces@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" @@ -506,6 +628,21 @@ bytes@3.1.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + call-bind@^1.0.0, call-bind@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" @@ -585,6 +722,16 @@ chokidar@^3.0.0: optionalDependencies: fsevents "~2.3.1" +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + coa@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/coa/-/coa-2.0.2.tgz#43f6c21151b4ef2bf57187db0d73de229e3e7ec3" @@ -606,6 +753,14 @@ codemirror@^5.63.1: resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.65.1.tgz#5988a812c974c467f964bcc1a00c944e373de502" integrity sha512-s6aac+DD+4O2u1aBmdxhB7yz2XU7tG3snOyQ05Kxifahz7hoxnfxIRHxiCSEv3TUC38dIVH8G+lZH9UWSfGQxA== +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw== + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + color-convert@^1.9.0, color-convert@^1.9.1: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -661,12 +816,17 @@ commondir@^1.0.1: resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= +component-emitter@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" + integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -concat-with-sourcemaps@^1.1.0: +concat-with-sourcemaps@*, concat-with-sourcemaps@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz#d4ea93f05ae25790951b99e7b3b09e3908a4082e" integrity sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg== @@ -702,6 +862,16 @@ cookie@0.4.0: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw== + +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + cosmiconfig@^5.0.0: version "5.2.1" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" @@ -873,7 +1043,7 @@ dayjs@^1.10.4: resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.10.4.tgz#8e544a9b8683f61783f570980a8a80eaf54ab1e2" integrity sha512-RI/Hh4kqRc1UKLOAf/T5zdMMX5DQIlDxwUe3wSyMMnEbGunnpENCdbUgM+dW7kXidZqCttBrmw7BhN4TMddkCw== -debug@2.6.9: +debug@2.6.9, debug@^2.2.0, debug@^2.3.3: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -887,11 +1057,23 @@ debug@^3.0.1: dependencies: ms "^2.1.1" +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og== + deepmerge@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== +default-compare@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/default-compare/-/default-compare-1.0.0.tgz#cb61131844ad84d84788fb68fd01681ca7781a2f" + integrity sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ== + dependencies: + kind-of "^5.0.2" + define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" @@ -899,6 +1081,28 @@ define-properties@^1.1.3: dependencies: object-keys "^1.0.12" +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA== + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA== + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + depd@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" @@ -973,6 +1177,11 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= +ent@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" + integrity sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA== + entities@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" @@ -1066,6 +1275,19 @@ eventemitter3@^4.0.4: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA== + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + express-history-api-fallback@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/express-history-api-fallback/-/express-history-api-fallback-2.2.1.tgz#3a2ad27f7bebc90fc533d110d7c6d83097bcd057" @@ -1123,6 +1345,45 @@ express@^4.16.3: utils-merge "1.0.1" vary "~1.1.2" +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug== + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q== + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ== + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + fill-range@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" @@ -1148,16 +1409,33 @@ flatpickr@^4.5.2: resolved "https://registry.yarnpkg.com/flatpickr/-/flatpickr-4.6.9.tgz#9a13383e8a6814bda5d232eae3fcdccb97dc1499" integrity sha512-F0azNNi8foVWKSF+8X+ZJzz8r9sE1G4hl06RyceIaLvyltKvDl6vqk9Lm/6AUUCi5HWaIjiUbk7UpeE/fOXOpw== +for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ== + forwarded@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA== + dependencies: + map-cache "^0.2.2" + fresh@0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= +fs-exists-sync@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" + integrity sha512-cR/vflFyPZtrN6b38ZyWxpWdhlXrzZEBawlpBQMq7033xVY7/kg0GDMBK5jg8lDYQckdJ5x/YC88lM3C7VMsLg== + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -1189,6 +1467,26 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1: has "^1.0.3" has-symbols "^1.0.1" +get-object@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/get-object/-/get-object-0.2.0.tgz#d92ff7d5190c64530cda0543dac63a3d47fe8c0c" + integrity sha512-7P6y6k6EzEFmO/XyUyFlXm1YLJy9xeA1x/grNV8276abX5GuwUtYgKFkRFkLixw4hf4Pz9q2vgv/8Ar42R0HuQ== + dependencies: + is-number "^2.0.2" + isobject "^0.2.0" + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA== + +get-value@^3.0.0, get-value@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-3.0.1.tgz#5efd2a157f1d6a516d7524e124ac52d0a39ef5a8" + integrity sha512-mKZj9JLQrwMBtj5wxi6MH8Z5eSKaERpAwjg43dPtlGI1ZVEgH/qC7T8/6R2OBSUA+zzHBZgICsVJaEIV2tKTDA== + dependencies: + isobject "^3.0.1" + glob-parent@~5.1.0: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -1208,6 +1506,35 @@ glob@^7.1.6: once "^1.3.0" path-is-absolute "^1.0.0" +gulp-header@^1.7.1: + version "1.8.12" + resolved "https://registry.yarnpkg.com/gulp-header/-/gulp-header-1.8.12.tgz#ad306be0066599127281c4f8786660e705080a84" + integrity sha512-lh9HLdb53sC7XIZOYzTXM4lFuXElv3EVkSDhsd7DoJBj7hm+Ni7D3qYbb+Rr8DuM8nRanBvkVO9d7askreXGnQ== + dependencies: + concat-with-sourcemaps "*" + lodash.template "^4.4.0" + through2 "^2.0.0" + +handlebars-utils@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/handlebars-utils/-/handlebars-utils-1.0.6.tgz#cb9db43362479054782d86ffe10f47abc76357f9" + integrity sha512-d5mmoQXdeEqSKMtQQZ9WkiUcO1E3tPbWxluCK9hVgIDPzQa9WsKo3Lbe/sGflTe7TomHEeZaOgwIkyIr1kfzkw== + dependencies: + kind-of "^6.0.0" + typeof-article "^0.1.1" + +handlebars@^4.7.6, handlebars@^4.7.7: + version "4.7.7" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" + integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== + dependencies: + minimist "^1.2.5" + neo-async "^2.6.0" + source-map "^0.6.1" + wordwrap "^1.0.0" + optionalDependencies: + uglify-js "^3.1.4" + has-bigints@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" @@ -1228,6 +1555,52 @@ has-symbols@^1.0.1, has-symbols@^1.0.2: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q== + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw== + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-value@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-2.0.2.tgz#d0f12e8780ba8e90e66ad1a21c707fdb67c25658" + integrity sha512-ybKOlcRsK2MqrM3Hmz/lQxXHZ6ejzSPzpNabKB45jb5qDgJvKPa3SdapTsTLwEb9WltgWpOmNax7i+DzNOk4TA== + dependencies: + get-value "^3.0.0" + has-values "^2.0.1" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ== + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ== + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +has-values@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-2.0.1.tgz#3876200ff86d8a8546a9264a952c17d5fc17579d" + integrity sha512-+QdH3jOmq9P8GfdjFg0eJudqx1FqU62NQJ4P16rOEHeRdl7ckgwn6uqQjzYE0ZoHVV/e5E2esuJ5Gl5+HUW19w== + dependencies: + kind-of "^6.0.2" + has@^1.0.0, has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" @@ -1235,6 +1608,16 @@ has@^1.0.0, has@^1.0.3: dependencies: function-bind "^1.1.1" +helper-md@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/helper-md/-/helper-md-0.2.2.tgz#c1f59d7e55bbae23362fd8a0e971607aec69d41f" + integrity sha512-49TaQzK+Ic7ZVTq4i1UZxRUJEmAilTk8hz7q4I0WNUaTclLR8ArJV5B3A1fe1xF2HtsDTr2gYKLaVTof/Lt84Q== + dependencies: + ent "^2.2.0" + extend-shallow "^2.0.1" + fs-exists-sync "^0.1.0" + remarkable "^1.6.2" + hex-color-regex@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e" @@ -1250,6 +1633,14 @@ hsla-regex@^1.0.0: resolved "https://registry.yarnpkg.com/hsla-regex/-/hsla-regex-1.0.0.tgz#c1ce7a3168c8c6614033a4b5f7877f3b225f9c38" integrity sha1-wc56MWjIxmFAM6S194d/OyJfnDg= +html-tag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/html-tag/-/html-tag-2.0.0.tgz#36c3bc8d816fd30b570d5764a497a641640c2fed" + integrity sha512-XxzooSo6oBoxBEUazgjdXj7VwTn/iSTSZzTYKzYY6I916tkaYzypHxy+pbVU1h+0UQ9JlVf5XkNQyxOAiiQO1g== + dependencies: + is-self-closing "^1.0.1" + kind-of "^6.0.0" + http-errors@1.7.2: version "1.7.2" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" @@ -1332,7 +1723,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4: +inherits@2, inherits@2.0.4, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -1352,6 +1743,20 @@ is-absolute-url@^2.0.0: resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" integrity sha1-UFMN+4T8yap9vnhS6Do3uTufKqY= +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A== + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== + dependencies: + kind-of "^6.0.0" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" @@ -1381,6 +1786,11 @@ is-boolean-object@^1.1.0: dependencies: call-bind "^1.0.0" +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + is-callable@^1.1.4, is-callable@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e" @@ -1405,16 +1815,67 @@ is-core-module@^2.2.0: dependencies: has "^1.0.3" +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg== + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== + dependencies: + kind-of "^6.0.0" + is-date-object@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + is-directory@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= +is-even@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-even/-/is-even-1.0.0.tgz#76b5055fbad8d294a86b6a949015e1c97b717c06" + integrity sha512-LEhnkAdJqic4Dbqn58A0y52IXoHWlsueqQkKfMfdEnIYG8A1sm/GHidKkS6yvXlMoRrkM34csHnXQtOqcb+Jzg== + dependencies: + is-odd "^0.1.2" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw== + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== + dependencies: + is-plain-object "^2.0.4" + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -1442,6 +1903,20 @@ is-number-object@^1.0.4: resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.4.tgz#36ac95e741cf18b283fc1ddf5e83da798e3ec197" integrity sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw== +is-number@^2.0.2: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + integrity sha512-QUzH43Gfb9+5yckcrSA0VBDwEtDUchrk4F6tfJZQuNzDJbEDB9cZNzSfXGQ1jqmdDY/kl41lUOWM9syA8z8jlg== + dependencies: + kind-of "^3.0.2" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg== + dependencies: + kind-of "^3.0.2" + is-number@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" @@ -1452,6 +1927,20 @@ is-obj@^2.0.0: resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== +is-odd@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-0.1.2.tgz#bc573b5ce371ef2aad6e6f49799b72bef13978a7" + integrity sha512-Ri7C2K7o5IrUU9UEI8losXJCCD/UtsaIrkR5sxIcFg4xQ9cRJXlWA5DQvTE0yDc0krvSNLsRGXN11UPS6KyfBw== + dependencies: + is-number "^3.0.0" + +is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + is-reference@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7" @@ -1472,6 +1961,13 @@ is-resolvable@^1.0.0: resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg== +is-self-closing@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-self-closing/-/is-self-closing-1.0.1.tgz#5f406b527c7b12610176320338af0fa3896416e4" + integrity sha512-E+60FomW7Blv5GXTlYee2KDrnG6srxF7Xt1SjrhWUGUEsTFIqY/nq2y3DaftCsgUMdh89V07IVfhY9KIJhLezg== + dependencies: + self-closing-tags "^1.0.1" + is-string@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" @@ -1484,11 +1980,38 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.1" +is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== + +isarray@1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== + isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= +isobject@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-0.2.0.tgz#a3432192f39b910b5f02cc989487836ec70aa85e" + integrity sha512-VaWq6XYAsbvM0wf4dyBO7WH9D7GosB7ZZlqrawI9BBiTMINBeCyqSKBa35m870MY3O4aM31pYyZi9DfGrYMJrQ== + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA== + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== + jest-worker@^26.2.1: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" @@ -1528,20 +2051,49 @@ json5@^1.0.1: dependencies: minimist "^1.2.0" +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.1.0, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ== + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw== + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0, kind-of@^5.0.2: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== + +kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + lines-and-columns@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= loader-utils@^1.1.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.1.tgz#278ad7006660bccc4d2c0c1578e17c5c78d5c0e0" - integrity sha512-1Qo97Y2oKaU+Ro2xnDMR26g1BwMT29jNbem1EvcujW2jqt+j5COXyscjM7bLQkM9HaxI7pkWeW7gnI072yMI9Q== + version "1.4.2" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.2.tgz#29a957f3a63973883eb684f10ffd3d151fec01a3" + integrity sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg== dependencies: big.js "^5.2.2" emojis-list "^3.0.0" json5 "^1.0.1" +lodash._reinterpolate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + integrity sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA== + lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" @@ -1552,11 +2104,31 @@ lodash.memoize@^4.1.2: resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= +lodash.template@^4.4.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" + integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.templatesettings "^4.0.0" + +lodash.templatesettings@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" + integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= +lodash@^4.17.20: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + magic-string@^0.25.7: version "0.25.7" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051" @@ -1564,6 +2136,18 @@ magic-string@^0.25.7: dependencies: sourcemap-codec "^1.4.4" +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg== + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w== + dependencies: + object-visit "^1.0.0" + marked@^4.0.10: version "4.0.12" resolved "https://registry.yarnpkg.com/marked/-/marked-4.0.12.tgz#2262a4e6fd1afd2f13557726238b69a48b982f7d" @@ -1599,6 +2183,25 @@ methods@~1.1.2: resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= +micromatch@^3.1.5: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + mime-db@1.47.0: version "1.47.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.47.0.tgz#8cb313e59965d3c05cfbf898915a267af46a335c" @@ -1633,6 +2236,14 @@ minimist@^1.2.5: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== +mixin-deep@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + mkdirp@~0.5.1: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" @@ -1660,11 +2271,33 @@ nanoid@^3.1.22: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.0.tgz#5906f776fd886c66c24f3653e0c46fcb1d4ad6b0" integrity sha512-JzxqqT5u/x+/KOFSd7JP15DOo9nOoHpx6DYatqIHUW2+flybkm+mdcraotSQR5WcnZr+qhGVh8Ted0KdfSMxlg== +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + negotiator@0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== +neo-async@^2.6.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== + node-releases@^1.1.71: version "1.1.73" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.73.tgz#dd4e81ddd5277ff846b80b52bb40c49edf7a7b20" @@ -1705,6 +2338,15 @@ nth-check@^1.0.2: dependencies: boolbase "~1.0.0" +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ== + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + object-inspect@^1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.9.0.tgz#c90521d74e1127b67266ded3394ad6116986533a" @@ -1715,6 +2357,13 @@ object-keys@^1.0.12, object-keys@^1.1.1: resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA== + dependencies: + isobject "^3.0.0" + object.assign@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" @@ -1734,6 +2383,13 @@ object.getownpropertydescriptors@^2.1.0: define-properties "^1.1.3" es-abstract "^1.18.0-next.2" +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ== + dependencies: + isobject "^3.0.1" + object.values@^1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.3.tgz#eaa8b1e17589f02f698db093f7c62ee1699742ee" @@ -1808,6 +2464,11 @@ parseurl@~1.3.3: resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw== + path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" @@ -1843,6 +2504,11 @@ pify@^5.0.0: resolved "https://registry.yarnpkg.com/pify/-/pify-5.0.0.tgz#1f5eca3f5e87ebec28cc6d54a0e4aaf00acc127f" integrity sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA== +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg== + postcss-calc@^7.0.1: version "7.0.5" resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-7.0.5.tgz#f8a6e99f12e619c2ebc23cf6c486fdc15860933e" @@ -2186,6 +2852,11 @@ postcss@^8.2.9: nanoid "^3.1.22" source-map "^0.6.1" +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + promise.series@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/promise.series/-/promise.series-0.2.0.tgz#2cc7ebe959fc3a6619c04ab4dbdc9e452d864bbd" @@ -2241,6 +2912,19 @@ raw-body@^2.3.0: iconv-lite "0.4.24" unpipe "1.0.0" +readable-stream@~2.3.6: + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + readdirp@~3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" @@ -2248,6 +2932,39 @@ readdirp@~3.5.0: dependencies: picomatch "^2.2.1" +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + +relative@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/relative/-/relative-3.0.2.tgz#0dcd8ec54a5d35a3c15e104503d65375b5a5367f" + integrity sha512-Q5W2qeYtY9GbiR8z1yHNZ1DGhyjb4AnLEjt8iE6XfcC1QIu+FAtj3HQaO0wH28H1mX6cqNLvAqWhP402dxJGyA== + dependencies: + isobject "^2.0.0" + +remarkable@^1.6.2: + version "1.7.4" + resolved "https://registry.yarnpkg.com/remarkable/-/remarkable-1.7.4.tgz#19073cb960398c87a7d6546eaa5e50d2022fcd00" + integrity sha512-e6NKUXgX95whv7IgddywbeN/ItCkWbISmc2DiqHJb0wTrqZIexqdco5b8Z3XZoo/48IdNVKM9ZCvTPJ4F5uvhg== + dependencies: + argparse "^1.0.10" + autolinker "~0.28.0" + +repeat-element@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.4.tgz#be681520847ab58c7568ac75fbfad28ed42d39e9" + integrity sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ== + +repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w== + require-relative@^0.8.7: version "0.8.7" resolved "https://registry.yarnpkg.com/require-relative/-/require-relative-0.8.7.tgz#7999539fc9e047a37928fa196f8e1563dabd36de" @@ -2268,6 +2985,11 @@ resolve-from@^5.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg== + resolve@^1.17.0, resolve@^1.19.0: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" @@ -2276,6 +2998,11 @@ resolve@^1.17.0, resolve@^1.19.0: is-core-module "^2.2.0" path-parse "^1.0.6" +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== + rgb-regex@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/rgb-regex/-/rgb-regex-1.0.1.tgz#c0e0d6882df0e23be254a475e8edd41915feaeb1" @@ -2337,7 +3064,7 @@ rollup@^2.45.2: optionalDependencies: fsevents "~2.3.1" -safe-buffer@5.1.2, safe-buffer@~5.1.1: +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== @@ -2352,6 +3079,13 @@ safe-identifier@^0.4.2: resolved "https://registry.yarnpkg.com/safe-identifier/-/safe-identifier-0.4.2.tgz#cf6bfca31c2897c588092d1750d30ef501d59fcb" integrity sha512-6pNbSMW6OhAi9j+N8V+U715yBQsaWJ7eyEUaOrawX+isg5ZxhUlV1NipNtgaKHmFGiABwt+ZF04Ii+3Xjkg+8w== +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg== + dependencies: + ret "~0.1.10" + "safer-buffer@>= 2.1.2 < 3": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -2362,6 +3096,11 @@ sax@~1.2.4: resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== +self-closing-tags@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/self-closing-tags/-/self-closing-tags-1.0.1.tgz#6c5fa497994bb826b484216916371accee490a5d" + integrity sha512-7t6hNbYMxM+VHXTgJmxwgZgLGktuXtVVD5AivWzNTdJBM4DBjnDKDzkf2SrNjihaArpeJYNjxkELBu1evI4lQA== + send@0.17.1: version "0.17.1" resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" @@ -2398,6 +3137,16 @@ serve-static@1.14.1: parseurl "~1.3.3" send "0.17.1" +set-value@^2.0.0, set-value@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" + integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + setprototypeof@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" @@ -2422,11 +3171,52 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + "source-map-fast@npm:source-map@0.7.3": version "0.7.3" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== +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" + integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== + dependencies: + atob "^2.1.2" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + source-map-support@~0.5.20: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" @@ -2435,6 +3225,11 @@ source-map-support@~0.5.20: buffer-from "^1.0.0" source-map "^0.6.0" +source-map-url@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" + integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== + source-map@^0.5.6: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" @@ -2450,6 +3245,13 @@ sourcemap-codec@^1.4.4: resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== + dependencies: + extend-shallow "^3.0.0" + sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" @@ -2460,6 +3262,14 @@ stable@^0.1.8: resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g== + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + "statuses@>= 1.5.0 < 2", statuses@~1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" @@ -2486,6 +3296,18 @@ string.prototype.trimstart@^1.0.4: call-bind "^1.0.2" define-properties "^1.1.3" +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +striptags@^3.1.1: + version "3.2.0" + resolved "https://registry.yarnpkg.com/striptags/-/striptags-3.2.0.tgz#cc74a137db2de8b0b9a370006334161f7dd67052" + integrity sha512-g45ZOGzHDMe2bdYMdIvdAfCQkCTDMGBazSw1ypMowwGIee7ZQ5dU0rBJ8Jqgl+jAKIv4dbeE1jscZq9wid1Tkw== + style-inject@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/style-inject/-/style-inject-0.3.0.tgz#d21c477affec91811cc82355832a700d22bf8dd3" @@ -2567,11 +3389,39 @@ terser@^5.0.0: commander "^2.20.0" source-map-support "~0.5.20" +through2@^2.0.0: + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + dependencies: + readable-stream "~2.3.6" + xtend "~4.0.1" + timsort@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= +to-gfm-code-block@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/to-gfm-code-block/-/to-gfm-code-block-0.1.1.tgz#25d045a5fae553189e9637b590900da732d8aa82" + integrity sha512-LQRZWyn8d5amUKnfR9A9Uu7x9ss7Re8peuWR2gkh1E+ildOfv2aF26JpuDg8JtvCduu5+hOrMIH+XstZtnagqg== + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg== + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg== + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" @@ -2579,6 +3429,16 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + toidentifier@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" @@ -2592,11 +3452,23 @@ type-is@~1.6.17, type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" +typeof-article@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/typeof-article/-/typeof-article-0.1.1.tgz#9f07e733c3fbb646ffa9e61c08debacd460e06af" + integrity sha512-Vn42zdX3FhmUrzEmitX3iYyLb+Umwpmv8fkZRIknYh84lmdrwqZA5xYaoKiIj2Rc5i/5wcDrpUmZcbk1U51vTw== + dependencies: + kind-of "^3.1.0" + typo-js@*: version "1.2.1" resolved "https://registry.yarnpkg.com/typo-js/-/typo-js-1.2.1.tgz#334a0d8c3f6c56f2f1e15fdf6c31677793cbbe9b" integrity sha512-bTGLjbD3WqZDR3CgEFkyi9Q/SS2oM29ipXrWfDb4M74ea69QwKAECVceYpaBu0GfdnASMg9Qfl67ttB23nePHg== +uglify-js@^3.1.4: + version "3.17.4" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" + integrity sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g== + unbox-primitive@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471" @@ -2607,6 +3479,16 @@ unbox-primitive@^1.0.0: has-symbols "^1.0.2" which-boxed-primitive "^1.0.2" +union-value@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" + integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^2.0.1" + uniq@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" @@ -2627,7 +3509,25 @@ unquote@~1.1.1: resolved "https://registry.yarnpkg.com/unquote/-/unquote-1.1.1.tgz#8fded7324ec6e88a0ff8b905e7c098cdc086d544" integrity sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ= -util-deprecate@^1.0.2: +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ== + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg== + +use@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== + +util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== @@ -2657,6 +3557,14 @@ vendors@^1.0.0: resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.4.tgz#e2b800a53e7a29b93506c3cf41100d16c4c4ad8e" integrity sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w== +vm2@^3.9.4: + version "3.9.11" + resolved "https://registry.yarnpkg.com/vm2/-/vm2-3.9.11.tgz#a880f510a606481719ec3f9803b940c5805a06fe" + integrity sha512-PFG8iJRSjvvBdisowQ7iVF580DXb1uCIiGaXgm7tynMR1uTBlv7UJlB1zdv5KJ+Tmq1f0Upnj3fayoEOPpCBKg== + dependencies: + acorn "^8.7.0" + acorn-walk "^8.2.0" + which-boxed-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" @@ -2675,6 +3583,11 @@ which@^2.0.1: dependencies: isexe "^2.0.0" +wordwrap@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -2687,7 +3600,17 @@ ws@^5.2.0: dependencies: async-limiter "~1.0.0" +xtend@~4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + yaml@^1.10.0: version "1.10.2" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== + +year@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/year/-/year-0.2.1.tgz#4083ae520a318b23ec86037f3000cb892bdf9bb0" + integrity sha512-9GnJUZ0QM4OgXuOzsKNzTJ5EOkums1Xc+3YQXp+Q+UxFjf7zLucp9dQ8QMIft0Szs1E1hUiXFim1OYfEKFq97w== From dc7002270874327719384e05684a554c2d2e918f Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Wed, 16 Nov 2022 13:06:30 +0000 Subject: [PATCH 126/396] Test fixes --- packages/backend-core/tests/jestSetup.ts | 3 +++ packages/backend-core/tests/utilities/mocks/fetch.ts | 10 ++++++++-- .../backend-core/tests/utilities/structures/koa.ts | 3 ++- packages/worker/src/api/index.ts | 4 ++-- packages/worker/src/tests/jestSetup.ts | 3 +++ 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/packages/backend-core/tests/jestSetup.ts b/packages/backend-core/tests/jestSetup.ts index 30b645d0e5..7870a721aa 100644 --- a/packages/backend-core/tests/jestSetup.ts +++ b/packages/backend-core/tests/jestSetup.ts @@ -1,6 +1,9 @@ import env from "../src/environment" import { mocks } from "./utilities" +// must explicitly enable fetch mock +mocks.fetch.enable() + // mock all dates to 2020-01-01T00:00:00.000Z // use tk.reset() to use real dates in individual tests import tk from "timekeeper" diff --git a/packages/backend-core/tests/utilities/mocks/fetch.ts b/packages/backend-core/tests/utilities/mocks/fetch.ts index 573b47db9f..eeb0ccda45 100644 --- a/packages/backend-core/tests/utilities/mocks/fetch.ts +++ b/packages/backend-core/tests/utilities/mocks/fetch.ts @@ -1,4 +1,10 @@ const mockFetch = jest.fn() -jest.mock("node-fetch", () => mockFetch) -export default mockFetch +const enable = () => { + jest.mock("node-fetch", () => mockFetch) +} + +export default { + ...mockFetch, + enable, +} diff --git a/packages/backend-core/tests/utilities/structures/koa.ts b/packages/backend-core/tests/utilities/structures/koa.ts index 7084c90360..a33dca1546 100644 --- a/packages/backend-core/tests/utilities/structures/koa.ts +++ b/packages/backend-core/tests/utilities/structures/koa.ts @@ -1,10 +1,11 @@ -import { createMockContext } from "@shopify/jest-koa-mocks" +import { createMockContext, createMockCookies } from "@shopify/jest-koa-mocks" import { BBContext } from "@budibase/types" export const newContext = (): BBContext => { const ctx = createMockContext() return { ...ctx, + cookies: createMockCookies(), request: { ...ctx.request, body: {}, diff --git a/packages/worker/src/api/index.ts b/packages/worker/src/api/index.ts index 28fbbdb4b5..9a32792691 100644 --- a/packages/worker/src/api/index.ts +++ b/packages/worker/src/api/index.ts @@ -45,11 +45,11 @@ const PUBLIC_ENDPOINTS = [ method: "POST", }, { - route: "api/system/environment", + route: "/api/system/environment", method: "GET", }, { - route: "api/system/status", + route: "/api/system/status", method: "GET", }, // TODO: This should be an internal api diff --git a/packages/worker/src/tests/jestSetup.ts b/packages/worker/src/tests/jestSetup.ts index 4cbc91eaf8..fee704ae45 100644 --- a/packages/worker/src/tests/jestSetup.ts +++ b/packages/worker/src/tests/jestSetup.ts @@ -14,6 +14,9 @@ env._set("DISABLE_ACCOUNT_PORTAL", false) import { mocks } from "@budibase/backend-core/tests" +// must explicitly enable fetch mock +mocks.fetch.enable() + // mock all dates to 2020-01-01T00:00:00.000Z // use tk.reset() to use real dates in individual tests const tk = require("timekeeper") From 395a9a21c27c534fd2b4297f5d0d19a341089993 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 16 Nov 2022 13:33:51 +0000 Subject: [PATCH 127/396] v2.1.22-alpha.6 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 8 ++++---- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/sdk/package.json | 2 +- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lerna.json b/lerna.json index 80ba94078e..55f768ac0c 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.1.22-alpha.5", + "version": "2.1.22-alpha.6", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 48f7b10020..fa1d1e92e9 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.1.22-alpha.5", + "version": "2.1.22-alpha.6", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "2.1.22-alpha.5", + "@budibase/types": "2.1.22-alpha.6", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 5746d369cd..169d51a6ca 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "2.1.22-alpha.5", + "version": "2.1.22-alpha.6", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "2.1.22-alpha.5", + "@budibase/string-templates": "2.1.22-alpha.6", "@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 48b92a2f1a..bcda888beb 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.1.22-alpha.5", + "version": "2.1.22-alpha.6", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.1.22-alpha.5", - "@budibase/client": "2.1.22-alpha.5", - "@budibase/frontend-core": "2.1.22-alpha.5", - "@budibase/string-templates": "2.1.22-alpha.5", + "@budibase/bbui": "2.1.22-alpha.6", + "@budibase/client": "2.1.22-alpha.6", + "@budibase/frontend-core": "2.1.22-alpha.6", + "@budibase/string-templates": "2.1.22-alpha.6", "@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 3ef135ce0d..b63744ac38 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.1.22-alpha.5", + "version": "2.1.22-alpha.6", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "2.1.22-alpha.5", - "@budibase/string-templates": "2.1.22-alpha.5", - "@budibase/types": "2.1.22-alpha.5", + "@budibase/backend-core": "2.1.22-alpha.6", + "@budibase/string-templates": "2.1.22-alpha.6", + "@budibase/types": "2.1.22-alpha.6", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index 09299de447..eaa2eaac67 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.1.22-alpha.5", + "version": "2.1.22-alpha.6", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "2.1.22-alpha.5", - "@budibase/frontend-core": "2.1.22-alpha.5", - "@budibase/string-templates": "2.1.22-alpha.5", + "@budibase/bbui": "2.1.22-alpha.6", + "@budibase/frontend-core": "2.1.22-alpha.6", + "@budibase/string-templates": "2.1.22-alpha.6", "@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 f1f56fa5a1..21d0e27230 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.1.22-alpha.5", + "version": "2.1.22-alpha.6", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.1.22-alpha.5", + "@budibase/bbui": "2.1.22-alpha.6", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 805d8c7493..56c609c303 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.1.22-alpha.5", + "version": "2.1.22-alpha.6", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index edce54787c..dcae3d7002 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.1.22-alpha.5", + "version": "2.1.22-alpha.6", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -43,11 +43,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "2.1.22-alpha.5", - "@budibase/client": "2.1.22-alpha.5", + "@budibase/backend-core": "2.1.22-alpha.6", + "@budibase/client": "2.1.22-alpha.6", "@budibase/pro": "2.1.22-alpha.5", - "@budibase/string-templates": "2.1.22-alpha.5", - "@budibase/types": "2.1.22-alpha.5", + "@budibase/string-templates": "2.1.22-alpha.6", + "@budibase/types": "2.1.22-alpha.6", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index f644de4da3..7655fe4417 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.1.22-alpha.5", + "version": "2.1.22-alpha.6", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index 9653472795..2978e8b6c1 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.1.22-alpha.5", + "version": "2.1.22-alpha.6", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index 7bec499494..dfb09c2750 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.1.22-alpha.5", + "version": "2.1.22-alpha.6", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.1.22-alpha.5", + "@budibase/backend-core": "2.1.22-alpha.6", "@budibase/pro": "2.1.22-alpha.5", - "@budibase/string-templates": "2.1.22-alpha.5", - "@budibase/types": "2.1.22-alpha.5", + "@budibase/string-templates": "2.1.22-alpha.6", + "@budibase/types": "2.1.22-alpha.6", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From f81c20811a96eb04393dd34c7b3499a8d8ab7ed5 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 16 Nov 2022 13:37:23 +0000 Subject: [PATCH 128/396] Update pro version to 2.1.22-alpha.6 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index dcae3d7002..188811523a 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -45,7 +45,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "2.1.22-alpha.6", "@budibase/client": "2.1.22-alpha.6", - "@budibase/pro": "2.1.22-alpha.5", + "@budibase/pro": "2.1.22-alpha.6", "@budibase/string-templates": "2.1.22-alpha.6", "@budibase/types": "2.1.22-alpha.6", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 33fe32d3c5..2e54c41cf5 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1273,12 +1273,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.22-alpha.5": - version "2.1.22-alpha.5" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.22-alpha.5.tgz#171bff9affca8a372c08aa5007f6e55bfb202f9c" - integrity sha512-N/+w/nsUgYXUE9zSMJsKb3lrV3gWhXfyMgl+5cKMEi9o9wT/Zvi20nBtkBb2kxQE8RrL8C37+5531tdj0adJZA== +"@budibase/backend-core@2.1.22-alpha.6": + version "2.1.22-alpha.6" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.22-alpha.6.tgz#e9886620fcbee6fe0348365cb96ac6484fc5f8fd" + integrity sha512-P3NSgNuQXKmdeT8MLfeCji3ibRSeIIMSOQeNSQBWpaOTA69rpXQk753lHRwUWMpqil/ybsOuE/h1/Y3eTa+/UA== dependencies: - "@budibase/types" "2.1.22-alpha.5" + "@budibase/types" "2.1.22-alpha.6" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1360,13 +1360,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.1.22-alpha.5": - version "2.1.22-alpha.5" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.22-alpha.5.tgz#d86f850bc35d81b5f41807b995d5896acca36aaa" - integrity sha512-Mv3uIq3kJYuUdj0Hdz6toTShgWdGpf1k7962cGds5vrTtzESbXpB8HkL7WhgDnbOCH92AP3mKmuhkxe9T1On7A== +"@budibase/pro@2.1.22-alpha.6": + version "2.1.22-alpha.6" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.22-alpha.6.tgz#e4d8238f1727eab85ac72b3ce2fcaec2a5c18456" + integrity sha512-1CKqQ2HMX+/5p24aHpPlUgxoMjKRZxRoyK5fPD/X35Z0mDj+9Ohny3oqbF1fC20pl/20bmcaE4J+q2ph/pbxdQ== dependencies: - "@budibase/backend-core" "2.1.22-alpha.5" - "@budibase/types" "2.1.22-alpha.5" + "@budibase/backend-core" "2.1.22-alpha.6" + "@budibase/types" "2.1.22-alpha.6" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -1390,10 +1390,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.1.22-alpha.5": - version "2.1.22-alpha.5" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.22-alpha.5.tgz#b90116da2fbccbd5f20acfe5189c1fb970cb5d3b" - integrity sha512-VRkjc5rtpZlj6iBDgQx/L4EGqSRupcqG/tu+tGZNJjEV92T/yiRt6+7UC+uIQjEUawcK1RDSqXLdk3g7+kFv0g== +"@budibase/types@2.1.22-alpha.6": + version "2.1.22-alpha.6" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.22-alpha.6.tgz#a280321373c26a5bf1a52ed119de9178292893c0" + integrity sha512-rVrhs9u7OTzlCxgUFqBu5H6jsMHhwH8uduPhT8Eo7J+Wr4J/0Io7WeuAt1egK6t83JiEPxDBH3WLzAH+04hPVA== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index dfb09c2750..0ad9fd6758 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "2.1.22-alpha.6", - "@budibase/pro": "2.1.22-alpha.5", + "@budibase/pro": "2.1.22-alpha.6", "@budibase/string-templates": "2.1.22-alpha.6", "@budibase/types": "2.1.22-alpha.6", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index a44960276f..1bcc1f0534 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -470,12 +470,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.22-alpha.5": - version "2.1.22-alpha.5" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.22-alpha.5.tgz#171bff9affca8a372c08aa5007f6e55bfb202f9c" - integrity sha512-N/+w/nsUgYXUE9zSMJsKb3lrV3gWhXfyMgl+5cKMEi9o9wT/Zvi20nBtkBb2kxQE8RrL8C37+5531tdj0adJZA== +"@budibase/backend-core@2.1.22-alpha.6": + version "2.1.22-alpha.6" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.22-alpha.6.tgz#e9886620fcbee6fe0348365cb96ac6484fc5f8fd" + integrity sha512-P3NSgNuQXKmdeT8MLfeCji3ibRSeIIMSOQeNSQBWpaOTA69rpXQk753lHRwUWMpqil/ybsOuE/h1/Y3eTa+/UA== dependencies: - "@budibase/types" "2.1.22-alpha.5" + "@budibase/types" "2.1.22-alpha.6" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -507,22 +507,22 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.1.22-alpha.5": - version "2.1.22-alpha.5" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.22-alpha.5.tgz#d86f850bc35d81b5f41807b995d5896acca36aaa" - integrity sha512-Mv3uIq3kJYuUdj0Hdz6toTShgWdGpf1k7962cGds5vrTtzESbXpB8HkL7WhgDnbOCH92AP3mKmuhkxe9T1On7A== +"@budibase/pro@2.1.22-alpha.6": + version "2.1.22-alpha.6" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.22-alpha.6.tgz#e4d8238f1727eab85ac72b3ce2fcaec2a5c18456" + integrity sha512-1CKqQ2HMX+/5p24aHpPlUgxoMjKRZxRoyK5fPD/X35Z0mDj+9Ohny3oqbF1fC20pl/20bmcaE4J+q2ph/pbxdQ== dependencies: - "@budibase/backend-core" "2.1.22-alpha.5" - "@budibase/types" "2.1.22-alpha.5" + "@budibase/backend-core" "2.1.22-alpha.6" + "@budibase/types" "2.1.22-alpha.6" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.1.22-alpha.5": - version "2.1.22-alpha.5" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.22-alpha.5.tgz#b90116da2fbccbd5f20acfe5189c1fb970cb5d3b" - integrity sha512-VRkjc5rtpZlj6iBDgQx/L4EGqSRupcqG/tu+tGZNJjEV92T/yiRt6+7UC+uIQjEUawcK1RDSqXLdk3g7+kFv0g== +"@budibase/types@2.1.22-alpha.6": + version "2.1.22-alpha.6" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.22-alpha.6.tgz#a280321373c26a5bf1a52ed119de9178292893c0" + integrity sha512-rVrhs9u7OTzlCxgUFqBu5H6jsMHhwH8uduPhT8Eo7J+Wr4J/0Io7WeuAt1egK6t83JiEPxDBH3WLzAH+04hPVA== "@cspotcode/source-map-support@^0.8.0": version "0.8.1" From b616378519e27fb427cc9bdad22552bbb5dd0a29 Mon Sep 17 00:00:00 2001 From: Dean Date: Wed, 16 Nov 2022 15:03:45 +0000 Subject: [PATCH 129/396] Ensure 'table' type sources are updated with a default datasource. Search visible settings sections for other elements IF a source is not already set. --- .../src/builderStore/store/frontend.js | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/builderStore/store/frontend.js b/packages/builder/src/builderStore/store/frontend.js index 9814bcfc74..6c375b871b 100644 --- a/packages/builder/src/builderStore/store/frontend.js +++ b/packages/builder/src/builderStore/store/frontend.js @@ -481,10 +481,27 @@ export const getFrontendStore = () => { return null } - const dataSourceField = definition.settings.find( - setting => setting.type == "dataSource" + let dataSourceField = definition.settings.find( + setting => setting.type == "dataSource" || setting.type == "table" ) + if (!dataSourceField) { + // Check other visible sections for datasource/table elements. + const sections = definition.settings.filter( + item => item?.section && item.visible + ) + + for (let section of sections) { + let sectionSourceField = section.settings.find( + setting => setting.type == "dataSource" || setting.type == "table" + ) + if (sectionSourceField) { + dataSourceField = sectionSourceField + break + } + } + } + let defaultDatasource if (dataSourceField) { const _tables = get(tables) From b0f6224c181504c50df69420ac3af05d52730c41 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 16 Nov 2022 17:23:12 +0000 Subject: [PATCH 130/396] Some major reworks towards higher levels of typescript. --- packages/backend-core/src/auth.ts | 8 +-- packages/backend-core/src/cloud/accounts.ts | 8 +-- packages/backend-core/src/constants.js | 44 -------------- packages/backend-core/src/constants.ts | 44 ++++++++++++++ packages/backend-core/src/context/index.ts | 9 +-- .../src/context/tests/index.spec.js | 3 +- .../backend-core/src/db/tests/utils.spec.js | 8 +-- packages/backend-core/src/db/utils.ts | 6 +- packages/backend-core/src/events/analytics.ts | 4 +- .../backend-core/src/events/identification.ts | 4 +- packages/backend-core/src/index.ts | 2 +- .../src/middleware/authenticated.ts | 22 ++++--- packages/backend-core/src/middleware/csrf.js | 4 +- .../src/middleware/internalApi.js | 4 +- .../middleware/passport/datasource/google.js | 8 +-- .../src/middleware/passport/google.js | 4 +- .../src/middleware/passport/jwt.js | 4 +- .../src/middleware/passport/oidc.js | 4 +- .../src/middleware/passport/utils.js | 4 +- .../backend-core/src/middleware/tenancy.js | 4 +- packages/backend-core/src/pkg/cache.ts | 2 + packages/backend-core/src/utils.js | 12 ++-- .../server/src/api/controllers/query/index.ts | 6 +- .../src/api/routes/tests/analytics.spec.js | 2 +- .../src/api/routes/tests/static.spec.js | 4 +- .../server/src/integrations/googlesheets.ts | 11 ++-- .../src/middleware/{appInfo.js => appInfo.ts} | 0 .../src/middleware/{builder.js => builder.ts} | 0 packages/server/src/middleware/currentapp.ts | 12 ++-- .../{joi-validator.js => joi-validator.ts} | 0 .../middleware/{publicApi.js => publicApi.ts} | 8 +-- .../{resourceId.js => resourceId.ts} | 0 .../middleware/{selfhost.js => selfhost.ts} | 0 .../src/middleware/{utils.js => utils.ts} | 0 .../src/tests/utilities/TestConfiguration.js | 18 +++--- .../server/src/utilities/workerRequests.js | 4 +- .../worker/src/api/controllers/global/auth.ts | 32 +++++----- .../src/api/controllers/global/configs.js | 34 +++++------ .../worker/src/api/controllers/global/self.ts | 4 +- .../worker/src/api/routes/global/configs.js | 18 +++--- .../api/routes/global/tests/configs.spec.ts | 58 +++++++++---------- packages/worker/src/constants/index.js | 4 +- .../worker/src/middleware/cloudRestricted.js | 2 +- .../worker/src/tests/TestConfiguration.ts | 22 +++---- .../worker/src/tests/structures/configs.js | 12 ++-- packages/worker/src/utilities/appService.js | 4 +- packages/worker/src/utilities/email.js | 4 +- packages/worker/src/utilities/templates.js | 4 +- 48 files changed, 236 insertions(+), 239 deletions(-) delete mode 100644 packages/backend-core/src/constants.js create mode 100644 packages/backend-core/src/constants.ts rename packages/server/src/middleware/{appInfo.js => appInfo.ts} (100%) rename packages/server/src/middleware/{builder.js => builder.ts} (100%) rename packages/server/src/middleware/{joi-validator.js => joi-validator.ts} (100%) rename packages/server/src/middleware/{publicApi.js => publicApi.ts} (56%) rename packages/server/src/middleware/{resourceId.js => resourceId.ts} (100%) rename packages/server/src/middleware/{selfhost.js => selfhost.ts} (100%) rename packages/server/src/middleware/{utils.js => utils.ts} (100%) diff --git a/packages/backend-core/src/auth.ts b/packages/backend-core/src/auth.ts index 98bf17beef..5e1959e0c8 100644 --- a/packages/backend-core/src/auth.ts +++ b/packages/backend-core/src/auth.ts @@ -3,7 +3,7 @@ const LocalStrategy = require("passport-local").Strategy const JwtStrategy = require("passport-jwt").Strategy import { getGlobalDB } from "./tenancy" const refresh = require("passport-oauth2-refresh") -import { Configs } from "./constants" +import { Config } from "./constants" import { getScopedConfig } from "./db/utils" import { jwt, @@ -76,7 +76,7 @@ async function refreshOIDCAccessToken( return new Promise(resolve => { refresh.requestNewAccessToken( - Configs.OIDC, + Config.OIDC, refreshToken, (err: any, accessToken: string, refreshToken: any, params: any) => { resolve({ err, accessToken, refreshToken, params }) @@ -106,7 +106,7 @@ async function refreshGoogleAccessToken( return new Promise(resolve => { refresh.requestNewAccessToken( - Configs.GOOGLE, + Config.GOOGLE, refreshToken, (err: any, accessToken: string, refreshToken: string, params: any) => { resolve({ err, accessToken, refreshToken, params }) @@ -129,7 +129,7 @@ async function refreshOAuthToken( let chosenConfig = {} let refreshResponse - if (configType === Configs.OIDC) { + if (configType === Config.OIDC) { // configId - retrieved from cookie. chosenConfig = config.configs.filter((c: any) => c.uuid === configId)[0] if (!chosenConfig) { diff --git a/packages/backend-core/src/cloud/accounts.ts b/packages/backend-core/src/cloud/accounts.ts index cca7469060..90fa7ab824 100644 --- a/packages/backend-core/src/cloud/accounts.ts +++ b/packages/backend-core/src/cloud/accounts.ts @@ -1,6 +1,6 @@ import API from "./api" import env from "../environment" -import { Headers } from "../constants" +import { Header } from "../constants" import { CloudAccount } from "@budibase/types" const api = new API(env.ACCOUNT_PORTAL_URL) @@ -14,7 +14,7 @@ export const getAccount = async ( const response = await api.post(`/api/accounts/search`, { body: payload, headers: { - [Headers.API_KEY]: env.ACCOUNT_PORTAL_API_KEY, + [Header.API_KEY]: env.ACCOUNT_PORTAL_API_KEY, }, }) @@ -35,7 +35,7 @@ export const getAccountByTenantId = async ( const response = await api.post(`/api/accounts/search`, { body: payload, headers: { - [Headers.API_KEY]: env.ACCOUNT_PORTAL_API_KEY, + [Header.API_KEY]: env.ACCOUNT_PORTAL_API_KEY, }, }) @@ -50,7 +50,7 @@ export const getAccountByTenantId = async ( export const getStatus = async () => { const response = await api.get(`/api/status`, { headers: { - [Headers.API_KEY]: env.ACCOUNT_PORTAL_API_KEY, + [Header.API_KEY]: env.ACCOUNT_PORTAL_API_KEY, }, }) const json = await response.json() diff --git a/packages/backend-core/src/constants.js b/packages/backend-core/src/constants.js deleted file mode 100644 index 44c271a4f8..0000000000 --- a/packages/backend-core/src/constants.js +++ /dev/null @@ -1,44 +0,0 @@ -exports.UserStatus = { - ACTIVE: "active", - INACTIVE: "inactive", -} - -exports.Cookies = { - CurrentApp: "budibase:currentapp", - Auth: "budibase:auth", - Init: "budibase:init", - ACCOUNT_RETURN_URL: "budibase:account:returnurl", - DatasourceAuth: "budibase:datasourceauth", - OIDC_CONFIG: "budibase:oidc:config", -} - -exports.Headers = { - API_KEY: "x-budibase-api-key", - LICENSE_KEY: "x-budibase-license-key", - API_VER: "x-budibase-api-version", - APP_ID: "x-budibase-app-id", - TYPE: "x-budibase-type", - PREVIEW_ROLE: "x-budibase-role", - TENANT_ID: "x-budibase-tenant-id", - TOKEN: "x-budibase-token", - CSRF_TOKEN: "x-csrf-token", -} - -exports.GlobalRoles = { - OWNER: "owner", - ADMIN: "admin", - BUILDER: "builder", - WORKSPACE_MANAGER: "workspace_manager", -} - -exports.Configs = { - SETTINGS: "settings", - ACCOUNT: "account", - SMTP: "smtp", - GOOGLE: "google", - OIDC: "oidc", - OIDC_LOGOS: "logos_oidc", -} - -exports.MAX_VALID_DATE = new Date(2147483647000) -exports.DEFAULT_TENANT_ID = "default" diff --git a/packages/backend-core/src/constants.ts b/packages/backend-core/src/constants.ts new file mode 100644 index 0000000000..61b3cea1f6 --- /dev/null +++ b/packages/backend-core/src/constants.ts @@ -0,0 +1,44 @@ +export enum UserStatus { + ACTIVE = "active", + INACTIVE = "inactive", +} + +export enum Cookie { + CurrentApp = "budibase:currentapp", + Auth = "budibase:auth", + Init = "budibase:init", + ACCOUNT_RETURN_URL = "budibase:account:returnurl", + DatasourceAuth = "budibase:datasourceauth", + OIDC_CONFIG = "budibase:oidc:config", +} + +export enum Header { + API_KEY = "x-budibase-api-key", + LICENSE_KEY = "x-budibase-license-key", + API_VER = "x-budibase-api-version", + APP_ID = "x-budibase-app-id", + TYPE = "x-budibase-type", + PREVIEW_ROLE = "x-budibase-role", + TENANT_ID = "x-budibase-tenant-id", + TOKEN = "x-budibase-token", + CSRF_TOKEN = "x-csrf-token", +} + +export enum GlobalRole { + OWNER = "owner", + ADMIN = "admin", + BUILDER = "builder", + WORKSPACE_MANAGER = "workspace_manager", +} + +export enum Config { + SETTINGS = "settings", + ACCOUNT = "account", + SMTP = "smtp", + GOOGLE = "google", + OIDC = "oidc", + OIDC_LOGOS = "logos_oidc", +} + +export const MAX_VALID_DATE = new Date(2147483647000) +export const DEFAULT_TENANT_ID = "default" diff --git a/packages/backend-core/src/context/index.ts b/packages/backend-core/src/context/index.ts index 15eed8d0ba..aabc5059d1 100644 --- a/packages/backend-core/src/context/index.ts +++ b/packages/backend-core/src/context/index.ts @@ -105,11 +105,12 @@ export async function doInAppContext(appId: string, task: any): Promise { } const tenantId = getTenantIDFromAppID(appId) + const updates: ContextMap = { appId } + if (tenantId) { + updates.tenantId = tenantId + } return newContext( - { - tenantId, - appId, - }, + updates, task ) } diff --git a/packages/backend-core/src/context/tests/index.spec.js b/packages/backend-core/src/context/tests/index.spec.js index 6d09446059..ea60806d21 100644 --- a/packages/backend-core/src/context/tests/index.spec.js +++ b/packages/backend-core/src/context/tests/index.spec.js @@ -1,8 +1,7 @@ -require("../../../tests/utilities/TestConfiguration") +require("../../../tests") const context = require("../") const { DEFAULT_TENANT_ID } = require("../../constants") const env = require("../../environment") -const dbCore = require("../../db") describe("context", () => { describe("doInTenant", () => { diff --git a/packages/backend-core/src/db/tests/utils.spec.js b/packages/backend-core/src/db/tests/utils.spec.js index ff6737627d..0d16e2dec2 100644 --- a/packages/backend-core/src/db/tests/utils.spec.js +++ b/packages/backend-core/src/db/tests/utils.spec.js @@ -9,7 +9,7 @@ const { getScopedConfig } = require("../utils") const tenancy = require("../../tenancy") -const { Configs, DEFAULT_TENANT_ID } = require("../../constants") +const { Config, DEFAULT_TENANT_ID } = require("../../constants") const env = require("../../environment") describe("utils", () => { @@ -77,7 +77,7 @@ const setDbPlatformUrl = async () => { const db = tenancy.getGlobalDB() db.put({ _id: "config_settings", - type: Configs.SETTINGS, + type: Config.SETTINGS, config: { platformUrl: DB_URL } @@ -178,7 +178,7 @@ describe("getScopedConfig", () => { await tenancy.doInTenant(DEFAULT_TENANT_ID, async () => { await setDbPlatformUrl() const db = tenancy.getGlobalDB() - const config = await getScopedConfig(db, { type: Configs.SETTINGS }) + const config = await getScopedConfig(db, { type: Config.SETTINGS }) expect(config.platformUrl).toBe(DB_URL) }) }) @@ -186,7 +186,7 @@ describe("getScopedConfig", () => { it("returns the platform url without an existing config", async () => { await tenancy.doInTenant(DEFAULT_TENANT_ID, async () => { const db = tenancy.getGlobalDB() - const config = await getScopedConfig(db, { type: Configs.SETTINGS }) + const config = await getScopedConfig(db, { type: Config.SETTINGS }) expect(config.platformUrl).toBe(DEFAULT_URL) }) }) diff --git a/packages/backend-core/src/db/utils.ts b/packages/backend-core/src/db/utils.ts index fc67a2c49b..61997901d7 100644 --- a/packages/backend-core/src/db/utils.ts +++ b/packages/backend-core/src/db/utils.ts @@ -1,5 +1,5 @@ import { newid } from "../hashing" -import { DEFAULT_TENANT_ID, Configs } from "../constants" +import { DEFAULT_TENANT_ID, Config } from "../constants" import env from "../environment" import { SEPARATOR, @@ -491,7 +491,7 @@ export const getScopedFullConfig = async function ( )[0] // custom logic for settings doc - if (type === Configs.SETTINGS) { + if (type === Config.SETTINGS) { if (scopedConfig && scopedConfig.doc) { // overrides affected by environment variables scopedConfig.doc.config.platformUrl = await getPlatformUrl({ @@ -530,7 +530,7 @@ export const getPlatformUrl = async (opts = { tenantAware: true }) => { // get the doc directly instead of with getScopedConfig to prevent loop let settings try { - settings = await db.get(generateConfigID({ type: Configs.SETTINGS })) + settings = await db.get(generateConfigID({ type: Config.SETTINGS })) } catch (e: any) { if (e.status !== 404) { throw e diff --git a/packages/backend-core/src/events/analytics.ts b/packages/backend-core/src/events/analytics.ts index 802b6d6314..eb121bdeec 100644 --- a/packages/backend-core/src/events/analytics.ts +++ b/packages/backend-core/src/events/analytics.ts @@ -1,7 +1,7 @@ import env from "../environment" import tenancy from "../tenancy" import * as dbUtils from "../db/utils" -import { Configs } from "../constants" +import { Config } from "../constants" import { withCache, TTL, CacheKeys } from "../cache/generic" export const enabled = async () => { @@ -46,7 +46,7 @@ const getSettingsDoc = async () => { let settings try { settings = await db.get( - dbUtils.generateConfigID({ type: Configs.SETTINGS }) + dbUtils.generateConfigID({ type: Config.SETTINGS }) ) } catch (e: any) { if (e.status !== 404) { diff --git a/packages/backend-core/src/events/identification.ts b/packages/backend-core/src/events/identification.ts index a29a6821cd..0b4b043837 100644 --- a/packages/backend-core/src/events/identification.ts +++ b/packages/backend-core/src/events/identification.ts @@ -19,7 +19,7 @@ import { } from "@budibase/types" import { processors } from "./processors" import * as dbUtils from "../db/utils" -import { Configs } from "../constants" +import { Config } from "../constants" import * as hashing from "../hashing" import * as installation from "../installation" import { withCache, TTL, CacheKeys } from "../cache/generic" @@ -273,7 +273,7 @@ const getUniqueTenantId = async (tenantId: string): Promise => { return withCache(CacheKeys.UNIQUE_TENANT_ID, TTL.ONE_DAY, async () => { const db = context.getGlobalDB() const config: SettingsConfig = await dbUtils.getScopedFullConfig(db, { - type: Configs.SETTINGS, + type: Config.SETTINGS, }) let uniqueTenantId: string diff --git a/packages/backend-core/src/index.ts b/packages/backend-core/src/index.ts index a2cfaaa9c6..24207a7a91 100644 --- a/packages/backend-core/src/index.ts +++ b/packages/backend-core/src/index.ts @@ -13,7 +13,7 @@ import featureFlags from "./featureFlags" import * as sessions from "./security/sessions" import * as deprovisioning from "./context/deprovision" import auth from "./auth" -import constants from "./constants" +import * as constants from "./constants" import * as dbConstants from "./db/constants" import * as logging from "./logging" import pino from "./pino" diff --git a/packages/backend-core/src/middleware/authenticated.ts b/packages/backend-core/src/middleware/authenticated.ts index d8f2b33399..8a1e52f414 100644 --- a/packages/backend-core/src/middleware/authenticated.ts +++ b/packages/backend-core/src/middleware/authenticated.ts @@ -1,11 +1,9 @@ -import { Cookies, Headers } from "../constants" +import { Cookie, Header } from "../constants" import { getCookie, clearCookie, openJwt } from "../utils" import { getUser } from "../cache/user" import { getSession, updateSessionTTL } from "../security/sessions" import { buildMatcherRegex, matches } from "./matchers" -import { SEPARATOR } from "../db/constants" -import { ViewName } from "../db/utils" -import { queryGlobalView } from "../db/views" +import { SEPARATOR, queryGlobalView, ViewName } from "../db" import { getGlobalDB, doInTenant } from "../tenancy" import { decrypt } from "../security/encryption" const identity = require("../context/identity") @@ -74,7 +72,7 @@ export = ( const noAuthOptions = noAuthPatterns ? buildMatcherRegex(noAuthPatterns) : [] return async (ctx: any, next: any) => { let publicEndpoint = false - const version = ctx.request.headers[Headers.API_VER] + const version = ctx.request.headers[Header.API_VER] // the path is not authenticated const found = matches(ctx, noAuthOptions) if (found) { @@ -82,10 +80,10 @@ export = ( } try { // check the actual user is authenticated first, try header or cookie - const headerToken = ctx.request.headers[Headers.TOKEN] - const authCookie = getCookie(ctx, Cookies.Auth) || openJwt(headerToken) - const apiKey = ctx.request.headers[Headers.API_KEY] - const tenantId = ctx.request.headers[Headers.TENANT_ID] + const headerToken = ctx.request.headers[Header.TOKEN] + const authCookie = getCookie(ctx, Cookie.Auth) || openJwt(headerToken) + const apiKey = ctx.request.headers[Header.API_KEY] + const tenantId = ctx.request.headers[Header.TENANT_ID] let authenticated = false, user = null, internal = false @@ -116,7 +114,7 @@ export = ( authenticated = false console.error("Auth Error", err?.message || err) // remove the cookie as the user does not exist anymore - clearCookie(ctx, Cookies.Auth) + clearCookie(ctx, Cookie.Auth) } } // this is an internal request, no user made it @@ -140,7 +138,7 @@ export = ( delete user.password } // be explicit - if (authenticated !== true) { + if (!authenticated) { authenticated = false } // isAuthenticated is a function, so use a variable to be able to check authed state @@ -155,7 +153,7 @@ export = ( console.error("Auth Error", err?.message || err) // invalid token, clear the cookie if (err && err.name === "JsonWebTokenError") { - clearCookie(ctx, Cookies.Auth) + clearCookie(ctx, Cookie.Auth) } // allow configuring for public access if ((opts && opts.publicAllowed) || publicEndpoint) { diff --git a/packages/backend-core/src/middleware/csrf.js b/packages/backend-core/src/middleware/csrf.js index 12bd9473e6..1557740cd6 100644 --- a/packages/backend-core/src/middleware/csrf.js +++ b/packages/backend-core/src/middleware/csrf.js @@ -1,4 +1,4 @@ -const { Headers } = require("../constants") +const { Header } = require("../constants") const { buildMatcherRegex, matches } = require("./matchers") /** @@ -68,7 +68,7 @@ module.exports = (opts = { noCsrfPatterns: [] }) => { } // reject if no token in request or mismatch - const requestToken = ctx.get(Headers.CSRF_TOKEN) + const requestToken = ctx.get(Header.CSRF_TOKEN) if (!requestToken || requestToken !== userToken) { ctx.throw(403, "Invalid CSRF token") } diff --git a/packages/backend-core/src/middleware/internalApi.js b/packages/backend-core/src/middleware/internalApi.js index 275d559a9e..05833842ce 100644 --- a/packages/backend-core/src/middleware/internalApi.js +++ b/packages/backend-core/src/middleware/internalApi.js @@ -1,11 +1,11 @@ const env = require("../environment") -const { Headers } = require("../constants") +const { Header } = require("../constants") /** * API Key only endpoint. */ module.exports = async (ctx, next) => { - const apiKey = ctx.request.headers[Headers.API_KEY] + const apiKey = ctx.request.headers[Header.API_KEY] if (apiKey !== env.INTERNAL_API_KEY) { ctx.throw(403, "Unauthorized") } diff --git a/packages/backend-core/src/middleware/passport/datasource/google.js b/packages/backend-core/src/middleware/passport/datasource/google.js index 8f2022c2d7..7cfd7f55f6 100644 --- a/packages/backend-core/src/middleware/passport/datasource/google.js +++ b/packages/backend-core/src/middleware/passport/datasource/google.js @@ -1,6 +1,6 @@ const google = require("../google") const GoogleStrategy = require("passport-google-oauth").OAuth2Strategy -const { Cookies, Configs } = require("../../../constants") +const { Cookie, Config } = require("../../../constants") const { clearCookie, getCookie } = require("../../../utils") const { getScopedConfig, getPlatformUrl } = require("../../../db/utils") const { doWithDB } = require("../../../db") @@ -11,7 +11,7 @@ async function fetchGoogleCreds() { // try and get the config from the tenant const db = getGlobalDB() const googleConfig = await getScopedConfig(db, { - type: Configs.GOOGLE, + type: Config.GOOGLE, }) // or fall back to env variables return ( @@ -47,7 +47,7 @@ async function postAuth(passport, ctx, next) { const platformUrl = await getPlatformUrl({ tenantAware: false }) let callbackUrl = `${platformUrl}/api/global/auth/datasource/google/callback` - const authStateCookie = getCookie(ctx, Cookies.DatasourceAuth) + const authStateCookie = getCookie(ctx, Cookie.DatasourceAuth) return passport.authenticate( new GoogleStrategy( @@ -57,7 +57,7 @@ async function postAuth(passport, ctx, next) { callbackURL: callbackUrl, }, (accessToken, refreshToken, profile, done) => { - clearCookie(ctx, Cookies.DatasourceAuth) + clearCookie(ctx, Cookie.DatasourceAuth) done(null, { accessToken, refreshToken }) } ), diff --git a/packages/backend-core/src/middleware/passport/google.js b/packages/backend-core/src/middleware/passport/google.js index 7419974cd7..7eb1215c1f 100644 --- a/packages/backend-core/src/middleware/passport/google.js +++ b/packages/backend-core/src/middleware/passport/google.js @@ -1,7 +1,7 @@ const GoogleStrategy = require("passport-google-oauth").OAuth2Strategy const { ssoCallbackUrl } = require("./utils") const { authenticateThirdParty } = require("./third-party-common") -const { Configs } = require("../../../constants") +const { Config } = require("../../../constants") const buildVerifyFn = saveUserFn => { return (accessToken, refreshToken, profile, done) => { @@ -60,7 +60,7 @@ exports.strategyFactory = async function (config, callbackUrl, saveUserFn) { } exports.getCallbackUrl = async function (db, config) { - return ssoCallbackUrl(db, config, Configs.GOOGLE) + return ssoCallbackUrl(db, config, Config.GOOGLE) } // expose for testing diff --git a/packages/backend-core/src/middleware/passport/jwt.js b/packages/backend-core/src/middleware/passport/jwt.js index 690c2ac8a1..36316264b0 100644 --- a/packages/backend-core/src/middleware/passport/jwt.js +++ b/packages/backend-core/src/middleware/passport/jwt.js @@ -1,11 +1,11 @@ -const { Cookies } = require("../../constants") +const { Cookie } = require("../../constants") const env = require("../../environment") const { authError } = require("./utils") exports.options = { secretOrKey: env.JWT_SECRET, jwtFromRequest: function (ctx) { - return ctx.cookies.get(Cookies.Auth) + return ctx.cookies.get(Cookie.Auth) }, } diff --git a/packages/backend-core/src/middleware/passport/oidc.js b/packages/backend-core/src/middleware/passport/oidc.js index 20dbd4669b..55a7033e40 100644 --- a/packages/backend-core/src/middleware/passport/oidc.js +++ b/packages/backend-core/src/middleware/passport/oidc.js @@ -2,7 +2,7 @@ const fetch = require("node-fetch") const OIDCStrategy = require("@techpass/passport-openidconnect").Strategy const { authenticateThirdParty } = require("./third-party-common") const { ssoCallbackUrl } = require("./utils") -const { Configs } = require("../../../constants") +const { Config } = require("../../../constants") const buildVerifyFn = saveUserFn => { /** @@ -140,7 +140,7 @@ exports.fetchStrategyConfig = async function (enrichedConfig, callbackUrl) { } exports.getCallbackUrl = async function (db, config) { - return ssoCallbackUrl(db, config, Configs.OIDC) + return ssoCallbackUrl(db, config, Config.OIDC) } // expose for testing diff --git a/packages/backend-core/src/middleware/passport/utils.js b/packages/backend-core/src/middleware/passport/utils.js index 217130cd6d..ab199b9f2f 100644 --- a/packages/backend-core/src/middleware/passport/utils.js +++ b/packages/backend-core/src/middleware/passport/utils.js @@ -1,6 +1,6 @@ const { isMultiTenant, getTenantId } = require("../../tenancy") const { getScopedConfig } = require("../../db/utils") -const { Configs } = require("../../constants") +const { Config } = require("../../constants") /** * Utility to handle authentication errors. @@ -24,7 +24,7 @@ exports.ssoCallbackUrl = async (db, config, type) => { return config.callbackURL } const publicConfig = await getScopedConfig(db, { - type: Configs.SETTINGS, + type: Config.SETTINGS, }) let callbackUrl = `/api/global/auth` diff --git a/packages/backend-core/src/middleware/tenancy.js b/packages/backend-core/src/middleware/tenancy.js index 8083322b29..b2a96cd5e2 100644 --- a/packages/backend-core/src/middleware/tenancy.js +++ b/packages/backend-core/src/middleware/tenancy.js @@ -1,6 +1,6 @@ const { doInTenant, isMultiTenant, DEFAULT_TENANT_ID } = require("../tenancy") const { buildMatcherRegex, matches } = require("./matchers") -const { Headers } = require("../constants") +const { Header } = require("../constants") const getTenantID = (ctx, opts = { allowQs: false, allowNoTenant: false }) => { // exit early if not multi-tenant @@ -11,7 +11,7 @@ const getTenantID = (ctx, opts = { allowQs: false, allowNoTenant: false }) => { let tenantId const allowQs = opts && opts.allowQs const allowNoTenant = opts && opts.allowNoTenant - const header = ctx.request.headers[Headers.TENANT_ID] + const header = ctx.request.headers[Header.TENANT_ID] const user = ctx.user || {} if (allowQs) { const query = ctx.request.query || {} diff --git a/packages/backend-core/src/pkg/cache.ts b/packages/backend-core/src/pkg/cache.ts index 1aaa40370d..c40a686260 100644 --- a/packages/backend-core/src/pkg/cache.ts +++ b/packages/backend-core/src/pkg/cache.ts @@ -3,9 +3,11 @@ import * as generic from "../cache/generic" import * as user from "../cache/user" import * as app from "../cache/appMetadata" +import * as writethrough from "../cache/writethrough" export = { app, user, + writethrough, ...generic, } diff --git a/packages/backend-core/src/utils.js b/packages/backend-core/src/utils.js index 6b59c7cb72..ed8f21d5c2 100644 --- a/packages/backend-core/src/utils.js +++ b/packages/backend-core/src/utils.js @@ -2,7 +2,7 @@ const { DocumentType, SEPARATOR, ViewName, getAllApps } = require("./db/utils") const jwt = require("jsonwebtoken") const { options } = require("./middleware/passport/jwt") const { queryGlobalView } = require("./db/views") -const { Headers, Cookies, MAX_VALID_DATE } = require("./constants") +const { Header, Cookie, MAX_VALID_DATE } = require("./constants") const env = require("./environment") const userCache = require("./cache/user") const { @@ -61,7 +61,7 @@ exports.isServingApp = ctx => { */ exports.getAppIdFromCtx = async ctx => { // look in headers - const options = [ctx.headers[Headers.APP_ID]] + const options = [ctx.headers[Header.APP_ID]] let appId for (let option of options) { appId = confirmAppId(option) @@ -157,7 +157,7 @@ exports.clearCookie = (ctx, name) => { * @return {boolean} returns true if the call is from the client lib (a built app rather than the builder). */ exports.isClient = ctx => { - return ctx.headers[Headers.TYPE] === "client" + return ctx.headers[Header.TYPE] === "client" } const getBuilders = async () => { @@ -187,7 +187,7 @@ exports.getBuildersCount = async () => { exports.platformLogout = async ({ ctx, userId, keepActiveSession }) => { if (!ctx) throw new Error("Koa context must be supplied to logout.") - const currentSession = exports.getCookie(ctx, Cookies.Auth) + const currentSession = exports.getCookie(ctx, Cookie.Auth) let sessions = await getSessionsForUser(userId) if (keepActiveSession) { @@ -196,8 +196,8 @@ exports.platformLogout = async ({ ctx, userId, keepActiveSession }) => { ) } else { // clear cookies - exports.clearCookie(ctx, Cookies.Auth) - exports.clearCookie(ctx, Cookies.CurrentApp) + exports.clearCookie(ctx, Cookie.Auth) + exports.clearCookie(ctx, Cookie.CurrentApp) } const sessionIds = sessions.map(({ sessionId }) => sessionId) diff --git a/packages/server/src/api/controllers/query/index.ts b/packages/server/src/api/controllers/query/index.ts index fa40320e91..eade7ddab6 100644 --- a/packages/server/src/api/controllers/query/index.ts +++ b/packages/server/src/api/controllers/query/index.ts @@ -112,13 +112,13 @@ export async function find(ctx: any) { //Required to discern between OIDC OAuth config entries function getOAuthConfigCookieId(ctx: any) { - if (ctx.user.providerType === constants.Configs.OIDC) { - return utils.getCookie(ctx, constants.Cookies.OIDC_CONFIG) + if (ctx.user.providerType === constants.Config.OIDC) { + return utils.getCookie(ctx, constants.Cookie.OIDC_CONFIG) } } function getAuthConfig(ctx: any) { - const authCookie = utils.getCookie(ctx, constants.Cookies.Auth) + const authCookie = utils.getCookie(ctx, constants.Cookie.Auth) let authConfigCtx: any = {} authConfigCtx["configId"] = getOAuthConfigCookieId(ctx) authConfigCtx["sessionId"] = authCookie ? authCookie.sessionId : null diff --git a/packages/server/src/api/routes/tests/analytics.spec.js b/packages/server/src/api/routes/tests/analytics.spec.js index 73d5810d7f..51196943e1 100644 --- a/packages/server/src/api/routes/tests/analytics.spec.js +++ b/packages/server/src/api/routes/tests/analytics.spec.js @@ -43,7 +43,7 @@ describe("/static", () => { it("should ping from app", async () => { const headers = config.defaultHeaders() - headers[constants.Headers.APP_ID] = config.prodAppId + headers[constants.Header.APP_ID] = config.prodAppId await request .post("/api/bbtel/ping") diff --git a/packages/server/src/api/routes/tests/static.spec.js b/packages/server/src/api/routes/tests/static.spec.js index 205f0beabe..dba8cd76f9 100644 --- a/packages/server/src/api/routes/tests/static.spec.js +++ b/packages/server/src/api/routes/tests/static.spec.js @@ -46,7 +46,7 @@ describe("/static", () => { it("should serve the app by id", async () => { const headers = config.defaultHeaders() - delete headers[constants.Headers.APP_ID] + delete headers[constants.Header.APP_ID] const res = await request .get(`/${config.prodAppId}`) @@ -58,7 +58,7 @@ describe("/static", () => { it("should serve the app by url", async () => { const headers = config.defaultHeaders() - delete headers[constants.Headers.APP_ID] + delete headers[constants.Header.APP_ID] const res = await request .get(`/app${config.prodApp.url}`) diff --git a/packages/server/src/integrations/googlesheets.ts b/packages/server/src/integrations/googlesheets.ts index 2e25d9683d..3e17df4076 100644 --- a/packages/server/src/integrations/googlesheets.ts +++ b/packages/server/src/integrations/googlesheets.ts @@ -12,10 +12,7 @@ import { buildExternalTableId } from "./utils" import { DataSourceOperation, FieldTypes } from "../constants" import { GoogleSpreadsheet } from "google-spreadsheet" import env from "../environment" - -const { getGlobalDB } = require("@budibase/backend-core/tenancy") -const { getScopedConfig } = require("@budibase/backend-core/db") -const { Configs } = require("@budibase/backend-core/constants") +import { tenancy, db as dbCore, constants } from "@budibase/backend-core" const fetch = require("node-fetch") interface GoogleSheetsConfig { @@ -176,9 +173,9 @@ class GoogleSheetsIntegration implements DatasourcePlus { async connect() { try { // Initialise oAuth client - const db = getGlobalDB() - let googleConfig = await getScopedConfig(db, { - type: Configs.GOOGLE, + const db = tenancy.getGlobalDB() + let googleConfig = await dbCore.getScopedConfig(db, { + type: constants.Config.GOOGLE, }) if (!googleConfig) { diff --git a/packages/server/src/middleware/appInfo.js b/packages/server/src/middleware/appInfo.ts similarity index 100% rename from packages/server/src/middleware/appInfo.js rename to packages/server/src/middleware/appInfo.ts diff --git a/packages/server/src/middleware/builder.js b/packages/server/src/middleware/builder.ts similarity index 100% rename from packages/server/src/middleware/builder.js rename to packages/server/src/middleware/builder.ts diff --git a/packages/server/src/middleware/currentapp.ts b/packages/server/src/middleware/currentapp.ts index 9496ddd0a0..3b50d62405 100644 --- a/packages/server/src/middleware/currentapp.ts +++ b/packages/server/src/middleware/currentapp.ts @@ -18,9 +18,9 @@ export = async (ctx: BBContext, next: any) => { // get app cookie if it exists let appCookie: { appId?: string } | undefined try { - appCookie = utils.getCookie(ctx, constants.Cookies.CurrentApp) + appCookie = utils.getCookie(ctx, constants.Cookie.CurrentApp) } catch (err) { - utils.clearCookie(ctx, constants.Cookies.CurrentApp) + utils.clearCookie(ctx, constants.Cookie.CurrentApp) } if (!appCookie && !requestAppId) { return next() @@ -30,7 +30,7 @@ export = async (ctx: BBContext, next: any) => { const appId = appCookie.appId const exists = await dbCore.dbExists(appId) if (!exists) { - utils.clearCookie(ctx, constants.Cookies.CurrentApp) + utils.clearCookie(ctx, constants.Cookie.CurrentApp) return next() } // if the request app ID wasn't set, update it with the cookie @@ -44,7 +44,7 @@ export = async (ctx: BBContext, next: any) => { !isWebhookEndpoint(ctx) && (!ctx.user || !ctx.user.builder || !ctx.user.builder.global) ) { - utils.clearCookie(ctx, constants.Cookies.CurrentApp) + utils.clearCookie(ctx, constants.Cookie.CurrentApp) return ctx.redirect("/") } } @@ -67,7 +67,7 @@ export = async (ctx: BBContext, next: any) => { const isDevApp = appId && isDevAppID(appId) const roleHeader = ctx.request && - (ctx.request.headers[constants.Headers.PREVIEW_ROLE] as string) + (ctx.request.headers[constants.Header.PREVIEW_ROLE] as string) if (isBuilder && isDevApp && roleHeader) { // Ensure the role is valid by ensuring a definition exists try { @@ -132,7 +132,7 @@ export = async (ctx: BBContext, next: any) => { appCookie.appId !== requestAppId) && !skipCookie ) { - utils.setCookie(ctx, { appId }, constants.Cookies.CurrentApp) + utils.setCookie(ctx, { appId }, constants.Cookie.CurrentApp) } return next() diff --git a/packages/server/src/middleware/joi-validator.js b/packages/server/src/middleware/joi-validator.ts similarity index 100% rename from packages/server/src/middleware/joi-validator.js rename to packages/server/src/middleware/joi-validator.ts diff --git a/packages/server/src/middleware/publicApi.js b/packages/server/src/middleware/publicApi.ts similarity index 56% rename from packages/server/src/middleware/publicApi.js rename to packages/server/src/middleware/publicApi.ts index 241873f5f9..76dbfe8214 100644 --- a/packages/server/src/middleware/publicApi.js +++ b/packages/server/src/middleware/publicApi.ts @@ -1,4 +1,4 @@ -const { Headers } = require("@budibase/backend-core/constants") +const { Header } = require("@budibase/backend-core/constants") const { getAppIdFromCtx } = require("@budibase/backend-core/utils") module.exports = function ({ requiresAppId } = {}) { @@ -7,13 +7,13 @@ module.exports = function ({ requiresAppId } = {}) { if (requiresAppId && !appId) { ctx.throw( 400, - `Invalid app ID provided, please check the ${Headers.APP_ID} header.` + `Invalid app ID provided, please check the ${Header.APP_ID} header.` ) } - if (!ctx.headers[Headers.API_KEY]) { + if (!ctx.headers[Header.API_KEY]) { ctx.throw( 400, - `Invalid API key provided, please check the ${Headers.API_KEY} header.` + `Invalid API key provided, please check the ${Header.API_KEY} header.` ) } return next() diff --git a/packages/server/src/middleware/resourceId.js b/packages/server/src/middleware/resourceId.ts similarity index 100% rename from packages/server/src/middleware/resourceId.js rename to packages/server/src/middleware/resourceId.ts diff --git a/packages/server/src/middleware/selfhost.js b/packages/server/src/middleware/selfhost.ts similarity index 100% rename from packages/server/src/middleware/selfhost.js rename to packages/server/src/middleware/selfhost.ts diff --git a/packages/server/src/middleware/utils.js b/packages/server/src/middleware/utils.ts similarity index 100% rename from packages/server/src/middleware/utils.js rename to packages/server/src/middleware/utils.ts diff --git a/packages/server/src/tests/utilities/TestConfiguration.js b/packages/server/src/tests/utilities/TestConfiguration.js index 1a5cf8ca85..40722513a0 100644 --- a/packages/server/src/tests/utilities/TestConfiguration.js +++ b/packages/server/src/tests/utilities/TestConfiguration.js @@ -16,7 +16,7 @@ const { const controllers = require("./controllers") const supertest = require("supertest") const { cleanup } = require("../../utilities/fileSystem") -const { Cookies, Headers } = require("@budibase/backend-core/constants") +const { Cookie, Headers } = require("@budibase/backend-core/constants") const { jwt } = require("@budibase/backend-core/auth") const { doInTenant, doWithGlobalDB } = require("@budibase/backend-core/tenancy") const { createASession } = require("@budibase/backend-core/sessions") @@ -256,10 +256,10 @@ class TestConfiguration { return { Accept: "application/json", Cookie: [ - `${Cookies.Auth}=${authToken}`, - `${Cookies.CurrentApp}=${appToken}`, + `${Cookie.Auth}=${authToken}`, + `${Cookie.CurrentApp}=${appToken}`, ], - [Headers.APP_ID]: appId, + [Header.APP_ID]: appId, } }) } @@ -279,14 +279,14 @@ class TestConfiguration { const headers = { Accept: "application/json", Cookie: [ - `${Cookies.Auth}=${authToken}`, - `${Cookies.CurrentApp}=${appToken}`, + `${Cookie.Auth}=${authToken}`, + `${Cookie.CurrentApp}=${appToken}`, ], - [Headers.CSRF_TOKEN]: CSRF_TOKEN, + [Header.CSRF_TOKEN]: CSRF_TOKEN, ...extras, } if (this.appId) { - headers[Headers.APP_ID] = this.appId + headers[Header.APP_ID] = this.appId } return headers } @@ -298,7 +298,7 @@ class TestConfiguration { Accept: "application/json", } if (appId) { - headers[Headers.APP_ID] = appId + headers[Header.APP_ID] = appId } return headers } diff --git a/packages/server/src/utilities/workerRequests.js b/packages/server/src/utilities/workerRequests.js index 53f13b6e02..89fb886033 100644 --- a/packages/server/src/utilities/workerRequests.js +++ b/packages/server/src/utilities/workerRequests.js @@ -11,9 +11,9 @@ function request(ctx, request) { request.headers = {} } if (!ctx) { - request.headers[Headers.API_KEY] = env.INTERNAL_API_KEY + request.headers[Header.API_KEY] = env.INTERNAL_API_KEY if (isTenantIdSet()) { - request.headers[Headers.TENANT_ID] = getTenantId() + request.headers[Header.TENANT_ID] = getTenantId() } } if (request.body && Object.keys(request.body).length > 0) { diff --git a/packages/worker/src/api/controllers/global/auth.ts b/packages/worker/src/api/controllers/global/auth.ts index c27fe17ee7..2e97ea6be8 100644 --- a/packages/worker/src/api/controllers/global/auth.ts +++ b/packages/worker/src/api/controllers/global/auth.ts @@ -1,8 +1,8 @@ const core = require("@budibase/backend-core") -const { Configs, EmailTemplatePurpose } = require("../../../constants") +const { Config, EmailTemplatePurpose } = require("../../../constants") const { sendEmail, isEmailConfigured } = require("../../../utilities/email") const { setCookie, getCookie, clearCookie, hash, platformLogout } = core.utils -const { Cookies, Headers } = core.constants +const { Cookie, Headers } = core.constants const { passport, ssoCallbackUrl, google, oidc } = core.auth const { checkResetPasswordCode } = require("../../../utilities/redis") const { getGlobalDB } = require("@budibase/backend-core/tenancy") @@ -30,13 +30,13 @@ async function authInternal(ctx: any, user: any, err = null, info = null) { } // set a cookie for browser access - setCookie(ctx, user.token, Cookies.Auth, { sign: false }) + setCookie(ctx, user.token, Cookie.Auth, { sign: false }) // set the token in a header as well for APIs - ctx.set(Headers.TOKEN, user.token) + ctx.set(Header.TOKEN, user.token) // get rid of any app cookies on login // have to check test because this breaks cypress if (!env.isTest()) { - clearCookie(ctx, Cookies.CurrentApp) + clearCookie(ctx, Cookie.CurrentApp) } } @@ -55,15 +55,15 @@ export const authenticate = async (ctx: any, next: any) => { export const setInitInfo = (ctx: any) => { const initInfo = ctx.request.body - setCookie(ctx, initInfo, Cookies.Init) + setCookie(ctx, initInfo, Cookie.Init) ctx.status = 200 } export const getInitInfo = (ctx: any) => { try { - ctx.body = getCookie(ctx, Cookies.Init) || {} + ctx.body = getCookie(ctx, Cookie.Init) || {} } catch (err) { - clearCookie(ctx, Cookies.Init) + clearCookie(ctx, Cookie.Init) ctx.body = {} } } @@ -141,14 +141,14 @@ export const datasourcePreAuth = async (ctx: any, next: any) => { appId: ctx.query.appId, datasourceId: ctx.query.datasourceId, }, - Cookies.DatasourceAuth + Cookie.DatasourceAuth ) return handler.preAuth(passport, ctx, next) } export const datasourceAuth = async (ctx: any, next: any) => { - const authStateCookie = getCookie(ctx, Cookies.DatasourceAuth) + const authStateCookie = getCookie(ctx, Cookie.DatasourceAuth) const provider = authStateCookie.provider const middleware = require(`@budibase/backend-core/middleware`) const handler = middleware.datasource[provider] @@ -163,7 +163,7 @@ export const googlePreAuth = async (ctx: any, next: any) => { const db = getGlobalDB() const config = await core.db.getScopedConfig(db, { - type: Configs.GOOGLE, + type: Config.GOOGLE, workspace: ctx.query.workspace, }) let callbackUrl = await exports.googleCallbackUrl(config) @@ -184,7 +184,7 @@ export const googleAuth = async (ctx: any, next: any) => { const db = getGlobalDB() const config = await core.db.getScopedConfig(db, { - type: Configs.GOOGLE, + type: Config.GOOGLE, workspace: ctx.query.workspace, }) const callbackUrl = await exports.googleCallbackUrl(config) @@ -210,7 +210,7 @@ export const googleAuth = async (ctx: any, next: any) => { export const oidcStrategyFactory = async (ctx: any, configId: any) => { const db = getGlobalDB() const config = await core.db.getScopedConfig(db, { - type: Configs.OIDC, + type: Config.OIDC, group: ctx.query.group, }) @@ -233,11 +233,11 @@ export const oidcPreAuth = async (ctx: any, next: any) => { const { configId } = ctx.params const strategy = await oidcStrategyFactory(ctx, configId) - setCookie(ctx, configId, Cookies.OIDC_CONFIG) + setCookie(ctx, configId, Cookie.OIDC_CONFIG) const db = getGlobalDB() const config = await core.db.getScopedConfig(db, { - type: Configs.OIDC, + type: Config.OIDC, group: ctx.query.group, }) @@ -255,7 +255,7 @@ export const oidcPreAuth = async (ctx: any, next: any) => { } export const oidcAuth = async (ctx: any, next: any) => { - const configId = getCookie(ctx, Cookies.OIDC_CONFIG) + const configId = getCookie(ctx, Cookie.OIDC_CONFIG) const strategy = await oidcStrategyFactory(ctx, configId) return passport.authenticate( diff --git a/packages/worker/src/api/controllers/global/configs.js b/packages/worker/src/api/controllers/global/configs.js index 5be6141c3f..cb8dc48c25 100644 --- a/packages/worker/src/api/controllers/global/configs.js +++ b/packages/worker/src/api/controllers/global/configs.js @@ -4,7 +4,7 @@ const { getScopedFullConfig, getAllApps, } = require("@budibase/backend-core/db") -const { Configs } = require("../../../constants") +const { Config } = require("../../../constants") const email = require("../../../utilities/email") const { upload, @@ -33,25 +33,25 @@ const getEventFns = async (db, config) => { if (!existing) { switch (config.type) { - case Configs.SMTP: { + case Config.SMTP: { fns.push(events.email.SMTPCreated) break } - case Configs.GOOGLE: { + case Config.GOOGLE: { fns.push(() => events.auth.SSOCreated(type)) if (config.config.activated) { fns.push(() => events.auth.SSOActivated(type)) } break } - case Configs.OIDC: { + case Config.OIDC: { fns.push(() => events.auth.SSOCreated(type)) if (config.config.configs[0].activated) { fns.push(() => events.auth.SSOActivated(type)) } break } - case Configs.SETTINGS: { + case Config.SETTINGS: { // company const company = config.config.company if (company && company !== "Budibase") { @@ -78,11 +78,11 @@ const getEventFns = async (db, config) => { } } else { switch (config.type) { - case Configs.SMTP: { + case Config.SMTP: { fns.push(events.email.SMTPUpdated) break } - case Configs.GOOGLE: { + case Config.GOOGLE: { fns.push(() => events.auth.SSOUpdated(type)) if (!existing.config.activated && config.config.activated) { fns.push(() => events.auth.SSOActivated(type)) @@ -91,7 +91,7 @@ const getEventFns = async (db, config) => { } break } - case Configs.OIDC: { + case Config.OIDC: { fns.push(() => events.auth.SSOUpdated(type)) if ( !existing.config.configs[0].activated && @@ -106,7 +106,7 @@ const getEventFns = async (db, config) => { } break } - case Configs.SETTINGS: { + case Config.SETTINGS: { // company const existingCompany = existing.config.company const company = config.config.company @@ -155,7 +155,7 @@ exports.save = async function (ctx) { try { // verify the configuration switch (type) { - case Configs.SMTP: + case Config.SMTP: await email.verifyConfig(config) break } @@ -237,7 +237,7 @@ exports.publicOidc = async function (ctx) { try { // Find the config with the most granular scope based on context const oidcConfig = await getScopedFullConfig(db, { - type: Configs.OIDC, + type: Config.OIDC, }) if (!oidcConfig) { @@ -260,15 +260,15 @@ exports.publicSettings = async function (ctx) { try { // Find the config with the most granular scope based on context const publicConfig = await getScopedFullConfig(db, { - type: Configs.SETTINGS, + type: Config.SETTINGS, }) const googleConfig = await getScopedFullConfig(db, { - type: Configs.GOOGLE, + type: Config.GOOGLE, }) const oidcConfig = await getScopedFullConfig(db, { - type: Configs.OIDC, + type: Config.OIDC, }) let config @@ -390,17 +390,17 @@ exports.configChecklist = async function (ctx) { // They have set up SMTP const smtpConfig = await getScopedFullConfig(db, { - type: Configs.SMTP, + type: Config.SMTP, }) // They have set up Google Auth const googleConfig = await getScopedFullConfig(db, { - type: Configs.GOOGLE, + type: Config.GOOGLE, }) // They have set up OIDC const oidcConfig = await getScopedFullConfig(db, { - type: Configs.OIDC, + type: Config.OIDC, }) // They have set up an global user diff --git a/packages/worker/src/api/controllers/global/self.ts b/packages/worker/src/api/controllers/global/self.ts index 685e2c8243..06906f1e8e 100644 --- a/packages/worker/src/api/controllers/global/self.ts +++ b/packages/worker/src/api/controllers/global/self.ts @@ -73,12 +73,12 @@ export async function fetchAPIKey(ctx: any) { } const checkCurrentApp = (ctx: any) => { - const appCookie = getCookie(ctx, constants.Cookies.CurrentApp) + const appCookie = getCookie(ctx, constants.Cookie.CurrentApp) if (appCookie && !tenancy.isUserInAppTenant(appCookie.appId)) { // there is a currentapp cookie from another tenant // remove the cookie as this is incompatible with the builder // due to builder and admin permissions being removed - clearCookie(ctx, constants.Cookies.CurrentApp) + clearCookie(ctx, constants.Cookie.CurrentApp) } } diff --git a/packages/worker/src/api/routes/global/configs.js b/packages/worker/src/api/routes/global/configs.js index a7cd1a38e8..bcbaa5caa2 100644 --- a/packages/worker/src/api/routes/global/configs.js +++ b/packages/worker/src/api/routes/global/configs.js @@ -3,7 +3,7 @@ const controller = require("../../controllers/global/configs") const { joiValidator } = require("@budibase/backend-core/auth") const { adminOnly } = require("@budibase/backend-core/auth") const Joi = require("joi") -const { Configs } = require("../../../constants") +const { Config } = require("../../../constants") const router = new Router() @@ -65,17 +65,17 @@ function buildConfigSaveValidation() { _id: Joi.string().optional(), _rev: Joi.string().optional(), workspace: Joi.string().optional(), - type: Joi.string().valid(...Object.values(Configs)).required(), + type: Joi.string().valid(...Object.values(Config)).required(), createdAt: Joi.string().optional(), updatedAt: Joi.string().optional(), config: Joi.alternatives() .conditional("type", { switch: [ - { is: Configs.SMTP, then: smtpValidation() }, - { is: Configs.SETTINGS, then: settingValidation() }, - { is: Configs.ACCOUNT, then: Joi.object().unknown(true) }, - { is: Configs.GOOGLE, then: googleValidation() }, - { is: Configs.OIDC, then: oidcValidation() } + { is: Config.SMTP, then: smtpValidation() }, + { is: Config.SETTINGS, then: settingValidation() }, + { is: Config.ACCOUNT, then: Joi.object().unknown(true) }, + { is: Config.GOOGLE, then: googleValidation() }, + { is: Config.OIDC, then: oidcValidation() } ], }), }).required().unknown(true), @@ -85,7 +85,7 @@ function buildConfigSaveValidation() { function buildUploadValidation() { // prettier-ignore return joiValidator.params(Joi.object({ - type: Joi.string().valid(...Object.values(Configs)).required(), + type: Joi.string().valid(...Object.values(Config)).required(), name: Joi.string().required(), }).required().unknown(true)) } @@ -93,7 +93,7 @@ function buildUploadValidation() { function buildConfigGetValidation() { // prettier-ignore return joiValidator.params(Joi.object({ - type: Joi.string().valid(...Object.values(Configs)).required() + type: Joi.string().valid(...Object.values(Config)).required() }).required().unknown(true)) } diff --git a/packages/worker/src/api/routes/global/tests/configs.spec.ts b/packages/worker/src/api/routes/global/tests/configs.spec.ts index 31510c03dd..82e80f4c90 100644 --- a/packages/worker/src/api/routes/global/tests/configs.spec.ts +++ b/packages/worker/src/api/routes/global/tests/configs.spec.ts @@ -2,7 +2,7 @@ jest.mock("nodemailer") import { TestConfiguration, structures, mocks, API } from "../../../../tests" mocks.email.mock() -import { Configs, events } from "@budibase/backend-core" +import { Config, events } from "@budibase/backend-core" describe("configs", () => { const config = new TestConfiguration() @@ -50,20 +50,20 @@ describe("configs", () => { it("should create activated google config", async () => { await saveGoogleConfig() expect(events.auth.SSOCreated).toBeCalledTimes(1) - expect(events.auth.SSOCreated).toBeCalledWith(Configs.GOOGLE) + expect(events.auth.SSOCreated).toBeCalledWith(Config.GOOGLE) expect(events.auth.SSODeactivated).not.toBeCalled() expect(events.auth.SSOActivated).toBeCalledTimes(1) - expect(events.auth.SSOActivated).toBeCalledWith(Configs.GOOGLE) - await config.deleteConfig(Configs.GOOGLE) + expect(events.auth.SSOActivated).toBeCalledWith(Config.GOOGLE) + await config.deleteConfig(Config.GOOGLE) }) it("should create deactivated google config", async () => { await saveGoogleConfig({ activated: false }) expect(events.auth.SSOCreated).toBeCalledTimes(1) - expect(events.auth.SSOCreated).toBeCalledWith(Configs.GOOGLE) + expect(events.auth.SSOCreated).toBeCalledWith(Config.GOOGLE) expect(events.auth.SSOActivated).not.toBeCalled() expect(events.auth.SSODeactivated).not.toBeCalled() - await config.deleteConfig(Configs.GOOGLE) + await config.deleteConfig(Config.GOOGLE) }) }) @@ -77,11 +77,11 @@ describe("configs", () => { googleConf._rev ) expect(events.auth.SSOUpdated).toBeCalledTimes(1) - expect(events.auth.SSOUpdated).toBeCalledWith(Configs.GOOGLE) + expect(events.auth.SSOUpdated).toBeCalledWith(Config.GOOGLE) expect(events.auth.SSOActivated).not.toBeCalled() expect(events.auth.SSODeactivated).toBeCalledTimes(1) - expect(events.auth.SSODeactivated).toBeCalledWith(Configs.GOOGLE) - await config.deleteConfig(Configs.GOOGLE) + expect(events.auth.SSODeactivated).toBeCalledWith(Config.GOOGLE) + await config.deleteConfig(Config.GOOGLE) }) it("should update google config to activated", async () => { @@ -93,11 +93,11 @@ describe("configs", () => { googleConf._rev ) expect(events.auth.SSOUpdated).toBeCalledTimes(1) - expect(events.auth.SSOUpdated).toBeCalledWith(Configs.GOOGLE) + expect(events.auth.SSOUpdated).toBeCalledWith(Config.GOOGLE) expect(events.auth.SSODeactivated).not.toBeCalled() expect(events.auth.SSOActivated).toBeCalledTimes(1) - expect(events.auth.SSOActivated).toBeCalledWith(Configs.GOOGLE) - await config.deleteConfig(Configs.GOOGLE) + expect(events.auth.SSOActivated).toBeCalledWith(Config.GOOGLE) + await config.deleteConfig(Config.GOOGLE) }) }) }) @@ -116,20 +116,20 @@ describe("configs", () => { it("should create activated OIDC config", async () => { await saveOIDCConfig() expect(events.auth.SSOCreated).toBeCalledTimes(1) - expect(events.auth.SSOCreated).toBeCalledWith(Configs.OIDC) + expect(events.auth.SSOCreated).toBeCalledWith(Config.OIDC) expect(events.auth.SSODeactivated).not.toBeCalled() expect(events.auth.SSOActivated).toBeCalledTimes(1) - expect(events.auth.SSOActivated).toBeCalledWith(Configs.OIDC) - await config.deleteConfig(Configs.OIDC) + expect(events.auth.SSOActivated).toBeCalledWith(Config.OIDC) + await config.deleteConfig(Config.OIDC) }) it("should create deactivated OIDC config", async () => { await saveOIDCConfig({ activated: false }) expect(events.auth.SSOCreated).toBeCalledTimes(1) - expect(events.auth.SSOCreated).toBeCalledWith(Configs.OIDC) + expect(events.auth.SSOCreated).toBeCalledWith(Config.OIDC) expect(events.auth.SSOActivated).not.toBeCalled() expect(events.auth.SSODeactivated).not.toBeCalled() - await config.deleteConfig(Configs.OIDC) + await config.deleteConfig(Config.OIDC) }) }) @@ -143,11 +143,11 @@ describe("configs", () => { oidcConf._rev ) expect(events.auth.SSOUpdated).toBeCalledTimes(1) - expect(events.auth.SSOUpdated).toBeCalledWith(Configs.OIDC) + expect(events.auth.SSOUpdated).toBeCalledWith(Config.OIDC) expect(events.auth.SSOActivated).not.toBeCalled() expect(events.auth.SSODeactivated).toBeCalledTimes(1) - expect(events.auth.SSODeactivated).toBeCalledWith(Configs.OIDC) - await config.deleteConfig(Configs.OIDC) + expect(events.auth.SSODeactivated).toBeCalledWith(Config.OIDC) + await config.deleteConfig(Config.OIDC) }) it("should update OIDC config to activated", async () => { @@ -159,11 +159,11 @@ describe("configs", () => { oidcConf._rev ) expect(events.auth.SSOUpdated).toBeCalledTimes(1) - expect(events.auth.SSOUpdated).toBeCalledWith(Configs.OIDC) + expect(events.auth.SSOUpdated).toBeCalledWith(Config.OIDC) expect(events.auth.SSODeactivated).not.toBeCalled() expect(events.auth.SSOActivated).toBeCalledTimes(1) - expect(events.auth.SSOActivated).toBeCalledWith(Configs.OIDC) - await config.deleteConfig(Configs.OIDC) + expect(events.auth.SSOActivated).toBeCalledWith(Config.OIDC) + await config.deleteConfig(Config.OIDC) }) }) }) @@ -180,11 +180,11 @@ describe("configs", () => { describe("create", () => { it("should create SMTP config", async () => { - await config.deleteConfig(Configs.SMTP) + await config.deleteConfig(Config.SMTP) await saveSMTPConfig() expect(events.email.SMTPUpdated).not.toBeCalled() expect(events.email.SMTPCreated).toBeCalledTimes(1) - await config.deleteConfig(Configs.SMTP) + await config.deleteConfig(Config.SMTP) }) }) @@ -195,7 +195,7 @@ describe("configs", () => { await saveSMTPConfig(smtpConf.config, smtpConf._id, smtpConf._rev) expect(events.email.SMTPCreated).not.toBeCalled() expect(events.email.SMTPUpdated).toBeCalledTimes(1) - await config.deleteConfig(Configs.SMTP) + await config.deleteConfig(Config.SMTP) }) }) }) @@ -212,7 +212,7 @@ describe("configs", () => { describe("create", () => { it("should create settings config with default settings", async () => { - await config.deleteConfig(Configs.SETTINGS) + await config.deleteConfig(Config.SETTINGS) await saveSettingsConfig() @@ -223,7 +223,7 @@ describe("configs", () => { it("should create settings config with non-default settings", async () => { config.modeSelf() - await config.deleteConfig(Configs.SETTINGS) + await config.deleteConfig(Config.SETTINGS) const conf = { company: "acme", logoUrl: "http://example.com", @@ -242,7 +242,7 @@ describe("configs", () => { describe("update", () => { it("should update settings config", async () => { config.modeSelf() - await config.deleteConfig(Configs.SETTINGS) + await config.deleteConfig(Config.SETTINGS) const settingsConfig = await saveSettingsConfig() settingsConfig.config.company = "acme" settingsConfig.config.logoUrl = "http://example.com" diff --git a/packages/worker/src/constants/index.js b/packages/worker/src/constants/index.js index 5affaaccb3..822864350e 100644 --- a/packages/worker/src/constants/index.js +++ b/packages/worker/src/constants/index.js @@ -1,4 +1,4 @@ -const { Configs } = require("@budibase/backend-core/constants") +const { Config } = require("@budibase/backend-core/constants") exports.LOGO_URL = "https://d33wubrfki0l68.cloudfront.net/aac32159d7207b5085e74a7ef67afbb7027786c5/2b1fd/img/logo/bb-emblem.svg" @@ -8,7 +8,7 @@ exports.UserStatus = { INACTIVE: "inactive", } -exports.Configs = Configs +exports.Config = Config exports.ConfigUploads = { LOGO: "logo", diff --git a/packages/worker/src/middleware/cloudRestricted.js b/packages/worker/src/middleware/cloudRestricted.js index b42ce4f3a4..29aa40662b 100644 --- a/packages/worker/src/middleware/cloudRestricted.js +++ b/packages/worker/src/middleware/cloudRestricted.js @@ -7,7 +7,7 @@ const { Headers } = require("@budibase/backend-core/constants") */ module.exports = async (ctx, next) => { if (!env.SELF_HOSTED && !env.DISABLE_ACCOUNT_PORTAL) { - const apiKey = ctx.request.headers[Headers.API_KEY] + const apiKey = ctx.request.headers[Header.API_KEY] if (apiKey !== env.INTERNAL_API_KEY) { ctx.throw(403, "Unauthorized") } diff --git a/packages/worker/src/tests/TestConfiguration.ts b/packages/worker/src/tests/TestConfiguration.ts index 1becb7d5c8..f52a852ebf 100644 --- a/packages/worker/src/tests/TestConfiguration.ts +++ b/packages/worker/src/tests/TestConfiguration.ts @@ -4,12 +4,12 @@ dbConfig.init() import env from "../environment" import controllers from "./controllers" const supertest = require("supertest") -import { Configs } from "../constants" +import { Config } from "../constants" import { users, tenancy, - Cookies, - Headers, + Cookie, + Header, sessions, auth, } from "@budibase/backend-core" @@ -163,8 +163,8 @@ class TestConfiguration { const authCookie = auth.jwt.sign(authToken, env.JWT_SECRET) return { Accept: "application/json", - ...this.cookieHeader([`${Cookies.Auth}=${authCookie}`]), - [Headers.CSRF_TOKEN]: CSRF_TOKEN, + ...this.cookieHeader([`${Cookie.Auth}=${authCookie}`]), + [Header.CSRF_TOKEN]: CSRF_TOKEN, } } @@ -223,7 +223,7 @@ class TestConfiguration { // CONFIGS - SETTINGS async saveSettingsConfig() { - await this.deleteConfig(Configs.SETTINGS) + await this.deleteConfig(Config.SETTINGS) await this._req( structures.configs.settings(), null, @@ -234,7 +234,7 @@ class TestConfiguration { // CONFIGS - GOOGLE async saveGoogleConfig() { - await this.deleteConfig(Configs.GOOGLE) + await this.deleteConfig(Config.GOOGLE) await this._req(structures.configs.google(), null, controllers.config.save) } @@ -242,11 +242,11 @@ class TestConfiguration { getOIDConfigCookie(configId: string) { const token = auth.jwt.sign(configId, env.JWT_SECRET) - return this.cookieHeader([[`${Cookies.OIDC_CONFIG}=${token}`]]) + return this.cookieHeader([[`${Cookie.OIDC_CONFIG}=${token}`]]) } async saveOIDCConfig() { - await this.deleteConfig(Configs.OIDC) + await this.deleteConfig(Config.OIDC) const config = structures.configs.oidc() await this._req(config, null, controllers.config.save) @@ -256,12 +256,12 @@ class TestConfiguration { // CONFIGS - SMTP async saveSmtpConfig() { - await this.deleteConfig(Configs.SMTP) + await this.deleteConfig(Config.SMTP) await this._req(structures.configs.smtp(), null, controllers.config.save) } async saveEtherealSmtpConfig() { - await this.deleteConfig(Configs.SMTP) + await this.deleteConfig(Config.SMTP) await this._req( structures.configs.smtpEthereal(), null, diff --git a/packages/worker/src/tests/structures/configs.js b/packages/worker/src/tests/structures/configs.js index 41ba283eaf..fbd82de0a7 100644 --- a/packages/worker/src/tests/structures/configs.js +++ b/packages/worker/src/tests/structures/configs.js @@ -1,9 +1,9 @@ -const { Configs } = require("../../constants") +const { Config } = require("../../constants") const { utils } = require("@budibase/backend-core") exports.oidc = conf => { return { - type: Configs.OIDC, + type: Config.OIDC, config: { configs: [ { @@ -23,7 +23,7 @@ exports.oidc = conf => { exports.google = conf => { return { - type: Configs.GOOGLE, + type: Config.GOOGLE, config: { clientID: "clientId", clientSecret: "clientSecret", @@ -35,7 +35,7 @@ exports.google = conf => { exports.smtp = conf => { return { - type: Configs.SMTP, + type: Config.SMTP, config: { port: 12345, host: "smtptesthost.com", @@ -49,7 +49,7 @@ exports.smtp = conf => { exports.smtpEthereal = () => { return { - type: Configs.SMTP, + type: Config.SMTP, config: { port: 587, host: "smtp.ethereal.email", @@ -65,7 +65,7 @@ exports.smtpEthereal = () => { exports.settings = conf => { return { - type: Configs.SETTINGS, + type: Config.SETTINGS, config: { platformUrl: "http://localhost:10000", logoUrl: "", diff --git a/packages/worker/src/utilities/appService.js b/packages/worker/src/utilities/appService.js index 36785198d7..acf0c359a0 100644 --- a/packages/worker/src/utilities/appService.js +++ b/packages/worker/src/utilities/appService.js @@ -9,9 +9,9 @@ async function makeAppRequest(url, method, body) { return } const request = { headers: {} } - request.headers[Headers.API_KEY] = env.INTERNAL_API_KEY + request.headers[Header.API_KEY] = env.INTERNAL_API_KEY if (isTenantIdSet()) { - request.headers[Headers.TENANT_ID] = getTenantId() + request.headers[Header.TENANT_ID] = getTenantId() } if (body) { request.headers["Content-Type"] = "application/json" diff --git a/packages/worker/src/utilities/email.js b/packages/worker/src/utilities/email.js index 66f78bb543..dbf5abea93 100644 --- a/packages/worker/src/utilities/email.js +++ b/packages/worker/src/utilities/email.js @@ -1,7 +1,7 @@ const nodemailer = require("nodemailer") const env = require("../environment") const { getScopedConfig } = require("@budibase/backend-core/db") -const { EmailTemplatePurpose, TemplateTypes, Configs } = require("../constants") +const { EmailTemplatePurpose, TemplateTypes, Config } = require("../constants") const { getTemplateByPurpose } = require("../constants/templates") const { getSettingsTemplateContext } = require("./templates") const { processString } = require("@budibase/string-templates") @@ -115,7 +115,7 @@ async function buildEmail(purpose, email, context, { user, contents } = {}) { */ async function getSmtpConfiguration(db, workspaceId = null, automation) { const params = { - type: Configs.SMTP, + type: Config.SMTP, } if (workspaceId) { params.workspace = workspaceId diff --git a/packages/worker/src/utilities/templates.js b/packages/worker/src/utilities/templates.js index 6e559dec65..935495d428 100644 --- a/packages/worker/src/utilities/templates.js +++ b/packages/worker/src/utilities/templates.js @@ -1,6 +1,6 @@ const { getScopedConfig } = require("@budibase/backend-core/db") const { - Configs, + Config, InternalTemplateBindings, LOGO_URL, EmailTemplatePurpose, @@ -15,7 +15,7 @@ const BASE_COMPANY = "Budibase" exports.getSettingsTemplateContext = async (purpose, code = null) => { const db = getGlobalDB() // TODO: use more granular settings in the future if required - let settings = (await getScopedConfig(db, { type: Configs.SETTINGS })) || {} + let settings = (await getScopedConfig(db, { type: Config.SETTINGS })) || {} const URL = settings.platformUrl const context = { [InternalTemplateBindings.LOGO_URL]: From 4f64798ada93afb9fca317b2fd71ed44c1b28ce4 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 16 Nov 2022 17:24:13 +0000 Subject: [PATCH 131/396] Updating middlewares to Typescript, as well as some fixes based on running tests. --- packages/backend-core/src/context/index.ts | 5 +-- packages/backend-core/src/events/analytics.ts | 4 +-- .../api/routes/public/tests/compare.spec.js | 2 +- packages/server/src/middleware/appInfo.ts | 19 ++++++----- packages/server/src/middleware/builder.ts | 33 ++++++++++--------- .../server/src/middleware/joi-validator.ts | 17 +++++----- packages/server/src/middleware/publicApi.ts | 16 ++++----- packages/server/src/middleware/resourceId.ts | 27 ++++++++------- packages/server/src/middleware/selfhost.ts | 6 ++-- packages/server/src/middleware/utils.ts | 4 ++- .../src/tests/utilities/TestConfiguration.js | 2 +- .../server/src/utilities/workerRequests.js | 2 +- .../worker/src/api/controllers/global/auth.ts | 2 +- .../worker/src/middleware/cloudRestricted.js | 2 +- packages/worker/src/utilities/appService.js | 2 +- 15 files changed, 76 insertions(+), 67 deletions(-) diff --git a/packages/backend-core/src/context/index.ts b/packages/backend-core/src/context/index.ts index aabc5059d1..076d9af65a 100644 --- a/packages/backend-core/src/context/index.ts +++ b/packages/backend-core/src/context/index.ts @@ -109,10 +109,7 @@ export async function doInAppContext(appId: string, task: any): Promise { if (tenantId) { updates.tenantId = tenantId } - return newContext( - updates, - task - ) + return newContext(updates, task) } export async function doInIdentityContext( diff --git a/packages/backend-core/src/events/analytics.ts b/packages/backend-core/src/events/analytics.ts index eb121bdeec..228805ef82 100644 --- a/packages/backend-core/src/events/analytics.ts +++ b/packages/backend-core/src/events/analytics.ts @@ -45,9 +45,7 @@ const getSettingsDoc = async () => { const db = tenancy.getGlobalDB() let settings try { - settings = await db.get( - dbUtils.generateConfigID({ type: Config.SETTINGS }) - ) + settings = await db.get(dbUtils.generateConfigID({ type: Config.SETTINGS })) } catch (e: any) { if (e.status !== 404) { throw e diff --git a/packages/server/src/api/routes/public/tests/compare.spec.js b/packages/server/src/api/routes/public/tests/compare.spec.js index c42898fe40..860907b69d 100644 --- a/packages/server/src/api/routes/public/tests/compare.spec.js +++ b/packages/server/src/api/routes/public/tests/compare.spec.js @@ -31,7 +31,7 @@ async function makeRequest(method, endpoint, body, appId = config.getAppId()) { if (body) { req.send(body) } - const res = await req.expect("Content-Type", /json/).expect(200) + const res = await req expect(res.body).toBeDefined() return res } diff --git a/packages/server/src/middleware/appInfo.ts b/packages/server/src/middleware/appInfo.ts index ee3655c6cc..75e40ed473 100644 --- a/packages/server/src/middleware/appInfo.ts +++ b/packages/server/src/middleware/appInfo.ts @@ -1,19 +1,20 @@ -const { isDevAppID, isProdAppID } = require("../db/utils") +import { isDevAppID, isProdAppID } from "../db/utils" +import { BBContext } from "@budibase/types" -exports.AppType = { - DEV: "dev", - PROD: "prod", +export enum AppType { + DEV = "dev", + PROD = "prod", } -exports.middleware = - ({ appType } = {}) => - (ctx, next) => { +export function middleware({ appType }: { appType?: AppType } = {}) { + return (ctx: BBContext, next: any) => { const appId = ctx.appId - if (appType === exports.AppType.DEV && appId && !isDevAppID(appId)) { + if (appType === AppType.DEV && appId && !isDevAppID(appId)) { ctx.throw(400, "Only apps in development support this endpoint") } - if (appType === exports.AppType.PROD && appId && !isProdAppID(appId)) { + if (appType === AppType.PROD && appId && !isProdAppID(appId)) { ctx.throw(400, "Only apps in production support this endpoint") } return next() } +} diff --git a/packages/server/src/middleware/builder.ts b/packages/server/src/middleware/builder.ts index 12c4b93c75..403597ff1a 100644 --- a/packages/server/src/middleware/builder.ts +++ b/packages/server/src/middleware/builder.ts @@ -1,14 +1,17 @@ -const { APP_DEV_PREFIX } = require("../db/utils") -const { +import { + APP_DEV_PREFIX, + DocumentType, + getGlobalIDFromUserMetadataID, +} from "../db/utils" +import { doesUserHaveLock, updateLock, checkDebounce, setDebounce, -} = require("../utilities/redis") -const { doWithDB } = require("@budibase/backend-core/db") -const { DocumentType, getGlobalIDFromUserMetadataID } = require("../db/utils") -const { PermissionTypes } = require("@budibase/backend-core/permissions") -const { app: appCache } = require("@budibase/backend-core/cache") +} from "../utilities/redis" +import { db as dbCore, cache, permissions } from "@budibase/backend-core" +import { BBContext } from "@budibase/types" +import { PouchLike } from "@budibase/backend-core/src/db" const DEBOUNCE_TIME_SEC = 30 @@ -21,11 +24,11 @@ const DEBOUNCE_TIME_SEC = 30 * through the authorized middleware * ****************************************************/ -async function checkDevAppLocks(ctx) { +async function checkDevAppLocks(ctx: BBContext) { const appId = ctx.appId // if any public usage, don't proceed - if (!ctx.user._id && !ctx.user.userId) { + if (!ctx.user?._id && !ctx.user?.userId) { return } @@ -41,34 +44,34 @@ async function checkDevAppLocks(ctx) { await updateLock(appId, ctx.user) } -async function updateAppUpdatedAt(ctx) { +async function updateAppUpdatedAt(ctx: BBContext) { const appId = ctx.appId // if debouncing skip this update // get methods also aren't updating if (ctx.method === "GET" || (await checkDebounce(appId))) { return } - await doWithDB(appId, async db => { + await dbCore.doWithDB(appId, async (db: PouchLike) => { const metadata = await db.get(DocumentType.APP_METADATA) metadata.updatedAt = new Date().toISOString() - metadata.updatedBy = getGlobalIDFromUserMetadataID(ctx.user.userId) + metadata.updatedBy = getGlobalIDFromUserMetadataID(ctx.user?.userId!) const response = await db.put(metadata) metadata._rev = response.rev - await appCache.invalidateAppMetadata(appId, metadata) + await cache.app.invalidateAppMetadata(appId, metadata) // set a new debounce record with a short TTL await setDebounce(appId, DEBOUNCE_TIME_SEC) }) } -module.exports = async (ctx, permType) => { +export = async function builder(ctx: BBContext, permType: string) { const appId = ctx.appId // this only functions within an app context if (!appId) { return } - const isBuilderApi = permType === PermissionTypes.BUILDER + const isBuilderApi = permType === permissions.PermissionTypes.BUILDER const referer = ctx.headers["referer"] const overviewPath = "/builder/portal/overview/" diff --git a/packages/server/src/middleware/joi-validator.ts b/packages/server/src/middleware/joi-validator.ts index 6812dbdd54..5d783acc80 100644 --- a/packages/server/src/middleware/joi-validator.ts +++ b/packages/server/src/middleware/joi-validator.ts @@ -1,20 +1,21 @@ -const Joi = require("joi") +import Joi from "joi" +import { BBContext } from "@budibase/types" -function validate(schema, property) { +function validate(schema: Joi.Schema, property: string) { // Return a Koa middleware function - return (ctx, next) => { + return (ctx: BBContext, next: any) => { if (!schema) { return next() } let params = null if (ctx[property] != null) { params = ctx[property] - } else if (ctx.request[property] != null) { - params = ctx.request[property] + } else if (ctx.request.get(property) != null) { + params = ctx.request.get(property) } // not all schemas have the append property e.g. array schemas - if (schema.append) { + if ("append" in schema && schema.append) { schema = schema.append({ createdAt: Joi.any().optional(), updatedAt: Joi.any().optional(), @@ -30,10 +31,10 @@ function validate(schema, property) { } } -module.exports.body = schema => { +export function body(schema: Joi.Schema) { return validate(schema, "body") } -module.exports.params = schema => { +export function params(schema: Joi.Schema) { return validate(schema, "params") } diff --git a/packages/server/src/middleware/publicApi.ts b/packages/server/src/middleware/publicApi.ts index 76dbfe8214..9b9a34df46 100644 --- a/packages/server/src/middleware/publicApi.ts +++ b/packages/server/src/middleware/publicApi.ts @@ -1,19 +1,19 @@ -const { Header } = require("@budibase/backend-core/constants") -const { getAppIdFromCtx } = require("@budibase/backend-core/utils") +import { constants, utils } from "@budibase/backend-core" +import { BBContext } from "@budibase/types" -module.exports = function ({ requiresAppId } = {}) { - return async (ctx, next) => { - const appId = await getAppIdFromCtx(ctx) +export = function ({ requiresAppId }: { requiresAppId?: boolean } = {}) { + return async (ctx: BBContext, next: any) => { + const appId = await utils.getAppIdFromCtx(ctx) if (requiresAppId && !appId) { ctx.throw( 400, - `Invalid app ID provided, please check the ${Header.APP_ID} header.` + `Invalid app ID provided, please check the ${constants.Header.APP_ID} header.` ) } - if (!ctx.headers[Header.API_KEY]) { + if (!ctx.headers[constants.Header.API_KEY]) { ctx.throw( 400, - `Invalid API key provided, please check the ${Header.API_KEY} header.` + `Invalid API key provided, please check the ${constants.Header.API_KEY} header.` ) } return next() diff --git a/packages/server/src/middleware/resourceId.ts b/packages/server/src/middleware/resourceId.ts index 4216131119..0917941061 100644 --- a/packages/server/src/middleware/resourceId.ts +++ b/packages/server/src/middleware/resourceId.ts @@ -1,17 +1,23 @@ -class ResourceIdGetter { - constructor(ctxProperty) { +import { BBContext } from "@budibase/types" + +export class ResourceIdGetter { + parameter: string + main: string | null + sub: string | null + + constructor(ctxProperty: string) { this.parameter = ctxProperty this.main = null this.sub = null return this } - mainResource(field) { + mainResource(field: string) { this.main = field return this } - subResource(field) { + subResource(field: string) { this.sub = field return this } @@ -20,7 +26,8 @@ class ResourceIdGetter { const parameter = this.parameter, main = this.main, sub = this.sub - return (ctx, next) => { + return (ctx: BBContext, next: any) => { + // @ts-ignore const request = ctx.request[parameter] || ctx[parameter] if (request == null) { return next() @@ -36,24 +43,22 @@ class ResourceIdGetter { } } -module.exports.ResourceIdGetter = ResourceIdGetter - -module.exports.paramResource = main => { +export function paramResource(main: string) { return new ResourceIdGetter("params").mainResource(main).build() } -module.exports.paramSubResource = (main, sub) => { +export function paramSubResource(main: string, sub: string) { return new ResourceIdGetter("params") .mainResource(main) .subResource(sub) .build() } -module.exports.bodyResource = main => { +export function bodyResource(main: string) { return new ResourceIdGetter("body").mainResource(main).build() } -module.exports.bodySubResource = (main, sub) => { +export function bodySubResource(main: string, sub: string) { return new ResourceIdGetter("body") .mainResource(main) .subResource(sub) diff --git a/packages/server/src/middleware/selfhost.ts b/packages/server/src/middleware/selfhost.ts index 1e7117c83d..180d80c8ea 100644 --- a/packages/server/src/middleware/selfhost.ts +++ b/packages/server/src/middleware/selfhost.ts @@ -1,7 +1,9 @@ -const env = require("../environment") +import env from "../environment" +import { BBContext } from "@budibase/types" + // if added as a middleware will stop requests unless builder is in self host mode // or cloud is in self host -module.exports = async (ctx, next) => { +module.exports = async (ctx: BBContext, next: any) => { if (env.SELF_HOSTED) { await next() return diff --git a/packages/server/src/middleware/utils.ts b/packages/server/src/middleware/utils.ts index b1eea8cd66..714df12f38 100644 --- a/packages/server/src/middleware/utils.ts +++ b/packages/server/src/middleware/utils.ts @@ -1,7 +1,9 @@ +import { BBContext } from "@budibase/types" + const WEBHOOK_ENDPOINTS = new RegExp( ["webhooks/trigger", "webhooks/schema"].join("|") ) -exports.isWebhookEndpoint = ctx => { +export function isWebhookEndpoint(ctx: BBContext) { return WEBHOOK_ENDPOINTS.test(ctx.request.url) } diff --git a/packages/server/src/tests/utilities/TestConfiguration.js b/packages/server/src/tests/utilities/TestConfiguration.js index 40722513a0..044ad4bbf7 100644 --- a/packages/server/src/tests/utilities/TestConfiguration.js +++ b/packages/server/src/tests/utilities/TestConfiguration.js @@ -16,7 +16,7 @@ const { const controllers = require("./controllers") const supertest = require("supertest") const { cleanup } = require("../../utilities/fileSystem") -const { Cookie, Headers } = require("@budibase/backend-core/constants") +const { Cookie, Header } = require("@budibase/backend-core/constants") const { jwt } = require("@budibase/backend-core/auth") const { doInTenant, doWithGlobalDB } = require("@budibase/backend-core/tenancy") const { createASession } = require("@budibase/backend-core/sessions") diff --git a/packages/server/src/utilities/workerRequests.js b/packages/server/src/utilities/workerRequests.js index 89fb886033..e606ba9fa6 100644 --- a/packages/server/src/utilities/workerRequests.js +++ b/packages/server/src/utilities/workerRequests.js @@ -3,7 +3,7 @@ const env = require("../environment") const { checkSlashesInUrl } = require("./index") const { getProdAppID } = require("@budibase/backend-core/db") const { updateAppRole } = require("./global") -const { Headers } = require("@budibase/backend-core/constants") +const { Header } = require("@budibase/backend-core/constants") const { getTenantId, isTenantIdSet } = require("@budibase/backend-core/tenancy") function request(ctx, request) { diff --git a/packages/worker/src/api/controllers/global/auth.ts b/packages/worker/src/api/controllers/global/auth.ts index 2e97ea6be8..3df77f024d 100644 --- a/packages/worker/src/api/controllers/global/auth.ts +++ b/packages/worker/src/api/controllers/global/auth.ts @@ -2,7 +2,7 @@ const core = require("@budibase/backend-core") const { Config, EmailTemplatePurpose } = require("../../../constants") const { sendEmail, isEmailConfigured } = require("../../../utilities/email") const { setCookie, getCookie, clearCookie, hash, platformLogout } = core.utils -const { Cookie, Headers } = core.constants +const { Cookie, Header } = core.constants const { passport, ssoCallbackUrl, google, oidc } = core.auth const { checkResetPasswordCode } = require("../../../utilities/redis") const { getGlobalDB } = require("@budibase/backend-core/tenancy") diff --git a/packages/worker/src/middleware/cloudRestricted.js b/packages/worker/src/middleware/cloudRestricted.js index 29aa40662b..5b9d64b92f 100644 --- a/packages/worker/src/middleware/cloudRestricted.js +++ b/packages/worker/src/middleware/cloudRestricted.js @@ -1,5 +1,5 @@ const env = require("../environment") -const { Headers } = require("@budibase/backend-core/constants") +const { Header } = require("@budibase/backend-core/constants") /** * This is a restricted endpoint in the cloud. diff --git a/packages/worker/src/utilities/appService.js b/packages/worker/src/utilities/appService.js index acf0c359a0..ae895b831c 100644 --- a/packages/worker/src/utilities/appService.js +++ b/packages/worker/src/utilities/appService.js @@ -1,5 +1,5 @@ const fetch = require("node-fetch") -const { Headers } = require("@budibase/backend-core/constants") +const { Header } = require("@budibase/backend-core/constants") const { getTenantId, isTenantIdSet } = require("@budibase/backend-core/tenancy") const { checkSlashesInUrl } = require("../utilities") const env = require("../environment") From 0357d1c8e4be44bd5bdf8375a3278d37ad879f73 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 16 Nov 2022 18:13:34 +0000 Subject: [PATCH 132/396] Some worker typescript conversions. --- packages/worker/src/constants/index.ts | 121 +++++++++--------- .../worker/src/constants/templates/index.js | 4 +- packages/worker/src/utilities/email.ts | 121 +++++++++++------- packages/worker/src/utilities/redis.ts | 53 ++++---- packages/worker/src/utilities/templates.ts | 54 ++++---- 5 files changed, 192 insertions(+), 161 deletions(-) diff --git a/packages/worker/src/constants/index.ts b/packages/worker/src/constants/index.ts index 822864350e..4ed2c99714 100644 --- a/packages/worker/src/constants/index.ts +++ b/packages/worker/src/constants/index.ts @@ -1,97 +1,97 @@ -const { Config } = require("@budibase/backend-core/constants") +import { constants } from "@budibase/backend-core" -exports.LOGO_URL = +export const LOGO_URL = "https://d33wubrfki0l68.cloudfront.net/aac32159d7207b5085e74a7ef67afbb7027786c5/2b1fd/img/logo/bb-emblem.svg" -exports.UserStatus = { - ACTIVE: "active", - INACTIVE: "inactive", +export enum UserStatus { + ACTIVE = "active", + INACTIVE = "inactive", } -exports.Config = Config +export const Config = constants.Config -exports.ConfigUploads = { - LOGO: "logo", - OIDC_LOGO: "oidc_logo", +export enum ConfigUpload { + LOGO = "logo", + OIDC_LOGO = "oidc_logo", } -const TemplateTypes = { - EMAIL: "email", +export enum TemplateType { + EMAIL = "email", } -const EmailTemplatePurpose = { - BASE: "base", - PASSWORD_RECOVERY: "password_recovery", - INVITATION: "invitation", - WELCOME: "welcome", - CUSTOM: "custom", +export enum EmailTemplatePurpose { + BASE = "base", + PASSWORD_RECOVERY = "password_recovery", + INVITATION = "invitation", + WELCOME = "welcome", + CUSTOM = "custom", } -const InternalTemplateBindings = { - PLATFORM_URL: "platformUrl", - COMPANY: "company", - LOGO_URL: "logoUrl", - EMAIL: "email", - USER: "user", - REQUEST: "request", - DOCS_URL: "docsUrl", - LOGIN_URL: "loginUrl", - CURRENT_YEAR: "currentYear", - CURRENT_DATE: "currentDate", - BODY: "body", - STYLES: "styles", - RESET_URL: "resetUrl", - RESET_CODE: "resetCode", - INVITE_URL: "inviteUrl", - INVITE_CODE: "inviteUrl", - CONTENTS: "contents", +export enum InternalTemplateBinding { + PLATFORM_URL = "platformUrl", + COMPANY = "company", + LOGO_URL = "logoUrl", + EMAIL = "email", + USER = "user", + REQUEST = "request", + DOCS_URL = "docsUrl", + LOGIN_URL = "loginUrl", + CURRENT_YEAR = "currentYear", + CURRENT_DATE = "currentDate", + BODY = "body", + STYLES = "styles", + RESET_URL = "resetUrl", + RESET_CODE = "resetCode", + INVITE_URL = "inviteUrl", + INVITE_CODE = "inviteUrl", + CONTENTS = "contents", } -const TemplateBindings = { +export const TemplateBindings = { PLATFORM_URL: { - name: InternalTemplateBindings.PLATFORM_URL, + name: InternalTemplateBinding.PLATFORM_URL, description: "The URL used to access the budibase platform", }, COMPANY: { - name: InternalTemplateBindings.COMPANY, + name: InternalTemplateBinding.COMPANY, description: "The name of your organization", }, LOGO_URL: { - name: InternalTemplateBindings.LOGO_URL, + name: InternalTemplateBinding.LOGO_URL, description: "The URL of your organizations logo.", }, EMAIL: { - name: InternalTemplateBindings.EMAIL, + name: InternalTemplateBinding.EMAIL, description: "The recipients email address.", }, USER: { - name: InternalTemplateBindings.USER, + name: InternalTemplateBinding.USER, description: "The recipients user object.", }, REQUEST: { - name: InternalTemplateBindings.REQUEST, + name: InternalTemplateBinding.REQUEST, description: "Additional request metadata.", }, DOCS_URL: { - name: InternalTemplateBindings.DOCS_URL, + name: InternalTemplateBinding.DOCS_URL, description: "Organization documentation URL.", }, LOGIN_URL: { - name: InternalTemplateBindings.LOGIN_URL, + name: InternalTemplateBinding.LOGIN_URL, description: "The URL used to log into the organization budibase instance.", }, CURRENT_YEAR: { - name: InternalTemplateBindings.CURRENT_YEAR, + name: InternalTemplateBinding.CURRENT_YEAR, description: "The current year.", }, CURRENT_DATE: { - name: InternalTemplateBindings.CURRENT_DATE, + name: InternalTemplateBinding.CURRENT_DATE, description: "The current date.", }, } -const TemplateMetadata = { - [TemplateTypes.EMAIL]: [ +export const TemplateMetadata = { + [TemplateType.EMAIL]: [ { name: "Base format", description: @@ -100,11 +100,11 @@ const TemplateMetadata = { purpose: EmailTemplatePurpose.BASE, bindings: [ { - name: InternalTemplateBindings.BODY, + name: InternalTemplateBinding.BODY, description: "The main body of another email template.", }, { - name: InternalTemplateBindings.STYLES, + name: InternalTemplateBinding.STYLES, description: "The contents of the Styling email template.", }, ], @@ -117,12 +117,12 @@ const TemplateMetadata = { purpose: EmailTemplatePurpose.PASSWORD_RECOVERY, bindings: [ { - name: InternalTemplateBindings.RESET_URL, + name: InternalTemplateBinding.RESET_URL, description: "The URL the recipient must click to reset their password.", }, { - name: InternalTemplateBindings.RESET_CODE, + name: InternalTemplateBinding.RESET_CODE, description: "The temporary password reset code used in the recipients password reset URL.", }, @@ -144,12 +144,12 @@ const TemplateMetadata = { purpose: EmailTemplatePurpose.INVITATION, bindings: [ { - name: InternalTemplateBindings.INVITE_URL, + name: InternalTemplateBinding.INVITE_URL, description: "The URL the recipient must click to accept the invitation and activate their account.", }, { - name: InternalTemplateBindings.INVITE_CODE, + name: InternalTemplateBinding.INVITE_CODE, description: "The temporary invite code used in the recipients invitation URL.", }, @@ -163,7 +163,7 @@ const TemplateMetadata = { purpose: EmailTemplatePurpose.CUSTOM, bindings: [ { - name: InternalTemplateBindings.CONTENTS, + name: InternalTemplateBinding.CONTENTS, description: "Custom content body.", }, ], @@ -172,12 +172,5 @@ const TemplateMetadata = { } // all purpose combined -exports.TemplatePurpose = { - ...EmailTemplatePurpose, -} -exports.TemplateTypes = TemplateTypes -exports.EmailTemplatePurpose = EmailTemplatePurpose -exports.TemplateMetadata = TemplateMetadata -exports.TemplateBindings = TemplateBindings -exports.InternalTemplateBindings = InternalTemplateBindings -exports.GLOBAL_OWNER = "global" +export { EmailTemplatePurpose as TemplatePurpose } +export const GLOBAL_OWNER = "global" diff --git a/packages/worker/src/constants/templates/index.js b/packages/worker/src/constants/templates/index.js index cfca00f471..0631df7011 100644 --- a/packages/worker/src/constants/templates/index.js +++ b/packages/worker/src/constants/templates/index.js @@ -1,7 +1,7 @@ const { readStaticFile } = require("../../utilities/fileSystem") const { EmailTemplatePurpose, - TemplateTypes, + TemplateType, TemplatePurpose, GLOBAL_OWNER, } = require("../index") @@ -26,7 +26,7 @@ exports.EmailTemplates = { exports.addBaseTemplates = (templates, type = null) => { let purposeList switch (type) { - case TemplateTypes.EMAIL: + case TemplateType.EMAIL: purposeList = Object.values(EmailTemplatePurpose) break default: diff --git a/packages/worker/src/utilities/email.ts b/packages/worker/src/utilities/email.ts index dbf5abea93..c07604827d 100644 --- a/packages/worker/src/utilities/email.ts +++ b/packages/worker/src/utilities/email.ts @@ -1,15 +1,33 @@ +import env from "../environment" +import { EmailTemplatePurpose, TemplateType, Config } from "../constants" +import { getTemplateByPurpose } from "../constants/templates" +import { getSettingsTemplateContext } from "./templates" +import { processString } from "@budibase/string-templates" +import { getResetPasswordCode, getInviteCode } from "./redis" +import { User } from "@budibase/types" +import { tenancy, db as dbCore, PouchLike } from "@budibase/backend-core" const nodemailer = require("nodemailer") -const env = require("../environment") -const { getScopedConfig } = require("@budibase/backend-core/db") -const { EmailTemplatePurpose, TemplateTypes, Config } = require("../constants") -const { getTemplateByPurpose } = require("../constants/templates") -const { getSettingsTemplateContext } = require("./templates") -const { processString } = require("@budibase/string-templates") -const { getResetPasswordCode, getInviteCode } = require("../utilities/redis") -const { getGlobalDB } = require("@budibase/backend-core/tenancy") + +type SendEmailOpts = { + // workspaceId If finer grain controls being used then this will lookup config for workspace. + workspaceId?: string + // user If sending to an existing user the object can be provided, this is used in the context. + user: User + // from If sending from an address that is not what is configured in the SMTP config. + from?: string + // contents If sending a custom email then can supply contents which will be added to it. + contents?: string + // subject A custom subject can be specified if the config one is not desired. + subject?: string + // info Pass in a structure of information to be stored alongside the invitation. + info?: any + cc?: boolean + bcc?: boolean + automation?: boolean +} const TEST_MODE = false -const TYPE = TemplateTypes.EMAIL +const TYPE = TemplateType.EMAIL const FULL_EMAIL_PURPOSES = [ EmailTemplatePurpose.INVITATION, @@ -18,8 +36,8 @@ const FULL_EMAIL_PURPOSES = [ EmailTemplatePurpose.CUSTOM, ] -function createSMTPTransport(config) { - let options +function createSMTPTransport(config: any) { + let options: any let secure = config.secure // default it if not specified if (secure == null) { @@ -52,10 +70,15 @@ function createSMTPTransport(config) { return nodemailer.createTransport(options) } -async function getLinkCode(purpose, email, user, info = null) { +async function getLinkCode( + purpose: EmailTemplatePurpose, + email: string, + user: User, + info: any = null +) { switch (purpose) { case EmailTemplatePurpose.PASSWORD_RECOVERY: - return getResetPasswordCode(user._id, info) + return getResetPasswordCode(user._id!, info) case EmailTemplatePurpose.INVITATION: return getInviteCode(email, info) default: @@ -72,7 +95,12 @@ async function getLinkCode(purpose, email, user, info = null) { * @param {string|null} contents if using a custom template can supply contents for context. * @return {Promise} returns the built email HTML if all provided parameters were valid. */ -async function buildEmail(purpose, email, context, { user, contents } = {}) { +async function buildEmail( + purpose: EmailTemplatePurpose, + email: string, + context: any, + { user, contents }: any = {} +) { // this isn't a full email if (FULL_EMAIL_PURPOSES.indexOf(purpose) === -1) { throw `Unable to build an email of type ${purpose}` @@ -113,15 +141,19 @@ async function buildEmail(purpose, email, context, { user, contents } = {}) { * @param {boolean|null} automation Whether or not the configuration is being fetched for an email automation. * @return {Promise} returns the SMTP configuration if it exists */ -async function getSmtpConfiguration(db, workspaceId = null, automation) { - const params = { +async function getSmtpConfiguration( + db: PouchLike, + workspaceId?: string, + automation?: boolean +) { + const params: any = { type: Config.SMTP, } if (workspaceId) { params.workspace = workspaceId } - const customConfig = await getScopedConfig(db, params) + const customConfig = await dbCore.getScopedConfig(db, params) if (customConfig) { return customConfig @@ -146,12 +178,12 @@ async function getSmtpConfiguration(db, workspaceId = null, automation) { * Checks if a SMTP config exists based on passed in parameters. * @return {Promise} returns true if there is a configuration that can be used. */ -exports.isEmailConfigured = async (workspaceId = null) => { +export async function isEmailConfigured(workspaceId?: string) { // when "testing" or smtp fallback is enabled simply return true if (TEST_MODE || env.SMTP_FALLBACK_ENABLED) { return true } - const db = getGlobalDB() + const db = tenancy.getGlobalDB() const config = await getSmtpConfiguration(db, workspaceId) return config != null } @@ -161,48 +193,49 @@ exports.isEmailConfigured = async (workspaceId = null) => { * send an email using it. * @param {string} email The email address to send to. * @param {string} purpose The purpose of the email being sent (e.g. reset password). - * @param {string|undefined} workspaceId If finer grain controls being used then this will lookup config for workspace. - * @param {object|undefined} user If sending to an existing user the object can be provided, this is used in the context. - * @param {string|undefined} from If sending from an address that is not what is configured in the SMTP config. - * @param {string|undefined} contents If sending a custom email then can supply contents which will be added to it. - * @param {string|undefined} subject A custom subject can be specified if the config one is not desired. - * @param {object|undefined} info Pass in a structure of information to be stored alongside the invitation. - * @param {boolean|undefined} disableFallback Prevent email being sent from SMTP fallback to avoid spam. + * @param {object} opts The options for sending the email. * @return {Promise} returns details about the attempt to send email, e.g. if it is successful; based on * nodemailer response. */ -exports.sendEmail = async ( - email, - purpose, - { workspaceId, user, from, contents, subject, info, cc, bcc, automation } = {} -) => { - const db = getGlobalDB() - let config = (await getSmtpConfiguration(db, workspaceId, automation)) || {} +export async function sendEmail( + email: string, + purpose: EmailTemplatePurpose, + opts: SendEmailOpts +) { + const db = tenancy.getGlobalDB() + let config = + (await getSmtpConfiguration(db, opts?.workspaceId, opts?.automation)) || {} if (Object.keys(config).length === 0 && !TEST_MODE) { throw "Unable to find SMTP configuration." } const transport = createSMTPTransport(config) // if there is a link code needed this will retrieve it - const code = await getLinkCode(purpose, email, user, info) - const context = await getSettingsTemplateContext(purpose, code) + const code = await getLinkCode(purpose, email, opts.user, opts?.info) + let context + if (code) { + context = await getSettingsTemplateContext(purpose, code) + } - let message = { - from: from || config.from, + let message: any = { + from: opts?.from || config.from, html: await buildEmail(purpose, email, context, { - user, - contents, + user: opts?.user, + contents: opts?.contents, }), } message = { ...message, to: email, - cc: cc, - bcc: bcc, + cc: opts?.cc, + bcc: opts?.bcc, } - if (subject || config.subject) { - message.subject = await processString(subject || config.subject, context) + if (opts?.subject || config.subject) { + message.subject = await processString( + opts?.subject || config.subject, + context + ) } const response = await transport.sendMail(message) if (TEST_MODE) { @@ -216,7 +249,7 @@ exports.sendEmail = async ( * @param {object} config an SMTP configuration - this is based on the nodemailer API. * @return {Promise} returns true if the configuration is valid. */ -exports.verifyConfig = async config => { +export async function verifyConfig(config: any) { const transport = createSMTPTransport(config) await transport.verify() } diff --git a/packages/worker/src/utilities/redis.ts b/packages/worker/src/utilities/redis.ts index 7e474b2c28..893ec9f0a8 100644 --- a/packages/worker/src/utilities/redis.ts +++ b/packages/worker/src/utilities/redis.ts @@ -1,36 +1,35 @@ -const { Client, utils } = require("@budibase/backend-core/redis") -const { newid } = require("@budibase/backend-core/utils") +import { redis, utils } from "@budibase/backend-core" -function getExpirySecondsForDB(db) { +function getExpirySecondsForDB(db: string) { switch (db) { - case utils.Databases.PW_RESETS: + case redis.utils.Databases.PW_RESETS: // a hour return 3600 - case utils.Databases.INVITATIONS: + case redis.utils.Databases.INVITATIONS: // a day return 86400 } } -let pwResetClient, invitationClient +let pwResetClient: any, invitationClient: any -function getClient(db) { +function getClient(db: string) { switch (db) { - case utils.Databases.PW_RESETS: + case redis.utils.Databases.PW_RESETS: return pwResetClient - case utils.Databases.INVITATIONS: + case redis.utils.Databases.INVITATIONS: return invitationClient } } -async function writeACode(db, value) { +async function writeACode(db: string, value: any) { const client = await getClient(db) - const code = newid() + const code = utils.newid() await client.store(code, value, getExpirySecondsForDB(db)) return code } -async function getACode(db, code, deleteCode = true) { +async function getACode(db: string, code: string, deleteCode = true) { const client = await getClient(db) const value = await client.get(code) if (!value) { @@ -42,9 +41,9 @@ async function getACode(db, code, deleteCode = true) { return value } -exports.init = async () => { - pwResetClient = new Client(utils.Databases.PW_RESETS) - invitationClient = new Client(utils.Databases.INVITATIONS) +export async function init() { + pwResetClient = new redis.Client(redis.utils.Databases.PW_RESETS) + invitationClient = new redis.Client(redis.utils.Databases.INVITATIONS) await pwResetClient.init() await invitationClient.init() } @@ -52,7 +51,7 @@ exports.init = async () => { /** * make sure redis connection is closed. */ -exports.shutdown = async () => { +export async function shutdown() { if (pwResetClient) await pwResetClient.finish() if (invitationClient) await invitationClient.finish() console.log("Redis shutdown") @@ -65,8 +64,8 @@ exports.shutdown = async () => { * @param {object} info Info about the user/the reset process. * @return {Promise} returns the code that was stored to redis. */ -exports.getResetPasswordCode = async (userId, info) => { - return writeACode(utils.Databases.PW_RESETS, { userId, info }) +export async function getResetPasswordCode(userId: string, info: any) { + return writeACode(redis.utils.Databases.PW_RESETS, { userId, info }) } /** @@ -75,9 +74,12 @@ exports.getResetPasswordCode = async (userId, info) => { * @param {boolean} deleteCode If the code is used/finished with this will delete it - defaults to true. * @return {Promise} returns the user ID if it is found */ -exports.checkResetPasswordCode = async (resetCode, deleteCode = true) => { +export async function checkResetPasswordCode( + resetCode: string, + deleteCode = true +) { try { - return getACode(utils.Databases.PW_RESETS, resetCode, deleteCode) + return getACode(redis.utils.Databases.PW_RESETS, resetCode, deleteCode) } catch (err) { throw "Provided information is not valid, cannot reset password - please try again." } @@ -89,8 +91,8 @@ exports.checkResetPasswordCode = async (resetCode, deleteCode = true) => { * @param {object|null} info Information to be carried along with the invitation. * @return {Promise} returns the code that was stored to redis. */ -exports.getInviteCode = async (email, info) => { - return writeACode(utils.Databases.INVITATIONS, { email, info }) +export async function getInviteCode(email: string, info: any) { + return writeACode(redis.utils.Databases.INVITATIONS, { email, info }) } /** @@ -99,9 +101,12 @@ exports.getInviteCode = async (email, info) => { * @param {boolean} deleteCode whether or not the code should be deleted after retrieval - defaults to true. * @return {Promise} If the code is valid then an email address will be returned. */ -exports.checkInviteCode = async (inviteCode, deleteCode = true) => { +export async function checkInviteCode( + inviteCode: string, + deleteCode: boolean = true +) { try { - return getACode(utils.Databases.INVITATIONS, inviteCode, deleteCode) + return getACode(redis.utils.Databases.INVITATIONS, inviteCode, deleteCode) } catch (err) { throw "Invitation is not valid or has expired, please request a new one." } diff --git a/packages/worker/src/utilities/templates.ts b/packages/worker/src/utilities/templates.ts index 935495d428..ede95dbe4a 100644 --- a/packages/worker/src/utilities/templates.ts +++ b/packages/worker/src/utilities/templates.ts @@ -1,47 +1,47 @@ -const { getScopedConfig } = require("@budibase/backend-core/db") -const { +import { db as dbCore, tenancy } from "@budibase/backend-core" +import { Config, - InternalTemplateBindings, + InternalTemplateBinding, LOGO_URL, EmailTemplatePurpose, -} = require("../constants") -const { checkSlashesInUrl } = require("./index") -const { - getGlobalDB, - addTenantToUrl, -} = require("@budibase/backend-core/tenancy") +} from "../constants" +import { checkSlashesInUrl } from "./index" const BASE_COMPANY = "Budibase" -exports.getSettingsTemplateContext = async (purpose, code = null) => { - const db = getGlobalDB() +export async function getSettingsTemplateContext( + purpose: EmailTemplatePurpose, + code?: string +) { + const db = tenancy.getGlobalDB() // TODO: use more granular settings in the future if required - let settings = (await getScopedConfig(db, { type: Config.SETTINGS })) || {} + let settings = + (await dbCore.getScopedConfig(db, { type: Config.SETTINGS })) || {} const URL = settings.platformUrl - const context = { - [InternalTemplateBindings.LOGO_URL]: + const context: any = { + [InternalTemplateBinding.LOGO_URL]: checkSlashesInUrl(`${URL}/${settings.logoUrl}`) || LOGO_URL, - [InternalTemplateBindings.PLATFORM_URL]: URL, - [InternalTemplateBindings.COMPANY]: settings.company || BASE_COMPANY, - [InternalTemplateBindings.DOCS_URL]: + [InternalTemplateBinding.PLATFORM_URL]: URL, + [InternalTemplateBinding.COMPANY]: settings.company || BASE_COMPANY, + [InternalTemplateBinding.DOCS_URL]: settings.docsUrl || "https://docs.budibase.com/", - [InternalTemplateBindings.LOGIN_URL]: checkSlashesInUrl( - addTenantToUrl(`${URL}/login`) + [InternalTemplateBinding.LOGIN_URL]: checkSlashesInUrl( + tenancy.addTenantToUrl(`${URL}/login`) ), - [InternalTemplateBindings.CURRENT_DATE]: new Date().toISOString(), - [InternalTemplateBindings.CURRENT_YEAR]: new Date().getFullYear(), + [InternalTemplateBinding.CURRENT_DATE]: new Date().toISOString(), + [InternalTemplateBinding.CURRENT_YEAR]: new Date().getFullYear(), } // attach purpose specific context switch (purpose) { case EmailTemplatePurpose.PASSWORD_RECOVERY: - context[InternalTemplateBindings.RESET_CODE] = code - context[InternalTemplateBindings.RESET_URL] = checkSlashesInUrl( - addTenantToUrl(`${URL}/builder/auth/reset?code=${code}`) + context[InternalTemplateBinding.RESET_CODE] = code + context[InternalTemplateBinding.RESET_URL] = checkSlashesInUrl( + tenancy.addTenantToUrl(`${URL}/builder/auth/reset?code=${code}`) ) break case EmailTemplatePurpose.INVITATION: - context[InternalTemplateBindings.INVITE_CODE] = code - context[InternalTemplateBindings.INVITE_URL] = checkSlashesInUrl( - addTenantToUrl(`${URL}/builder/invite?code=${code}`) + context[InternalTemplateBinding.INVITE_CODE] = code + context[InternalTemplateBinding.INVITE_URL] = checkSlashesInUrl( + tenancy.addTenantToUrl(`${URL}/builder/invite?code=${code}`) ) break } From 242a529b2ed5a9bdf91fd0556139a31b6522055a Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 16 Nov 2022 18:28:45 +0000 Subject: [PATCH 133/396] Fixes post merge. --- packages/backend-core/src/middleware/tenancy.ts | 4 ++-- packages/backend-core/src/tenancy/tenancy.ts | 15 +++++++++------ .../worker/src/middleware/tests/tenancy.spec.ts | 14 +++++++------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/packages/backend-core/src/middleware/tenancy.ts b/packages/backend-core/src/middleware/tenancy.ts index 03dd9d11e6..0aaacef139 100644 --- a/packages/backend-core/src/middleware/tenancy.ts +++ b/packages/backend-core/src/middleware/tenancy.ts @@ -1,6 +1,6 @@ import { doInTenant, getTenantIDFromCtx } from "../tenancy" import { buildMatcherRegex, matches } from "./matchers" -import { Headers } from "../constants" +import { Header } from "../constants" import { BBContext, EndpointMatcher, @@ -29,7 +29,7 @@ const tenancy = ( } const tenantId = getTenantIDFromCtx(ctx, tenantOpts) - ctx.set(Headers.TENANT_ID, tenantId as string) + ctx.set(Header.TENANT_ID, tenantId as string) return doInTenant(tenantId, next) } } diff --git a/packages/backend-core/src/tenancy/tenancy.ts b/packages/backend-core/src/tenancy/tenancy.ts index 0bbd423fe5..cc1088ab08 100644 --- a/packages/backend-core/src/tenancy/tenancy.ts +++ b/packages/backend-core/src/tenancy/tenancy.ts @@ -1,7 +1,10 @@ -import { doWithDB } from "../db" -import { queryPlatformView } from "../db/views" -import { StaticDatabases, ViewName } from "../db/constants" -import { getGlobalDBName } from "../db/tenancy" +import { + doWithDB, + queryPlatformView, + StaticDatabases, + getGlobalDBName, + ViewName, +} from "../db" import { DEFAULT_TENANT_ID, getTenantId, @@ -15,7 +18,7 @@ import { TenantResolutionStrategy, GetTenantIdOptions, } from "@budibase/types" -import { Headers } from "../constants" +import { Header } from "../constants" const TENANT_DOC = StaticDatabases.PLATFORM_INFO.docs.tenants const PLATFORM_INFO_DB = StaticDatabases.PLATFORM_INFO.name @@ -200,7 +203,7 @@ export const getTenantIDFromCtx = ( // header if (isAllowed(TenantResolutionStrategy.HEADER)) { - const headerTenantId = ctx.request.headers[Headers.TENANT_ID] + const headerTenantId = ctx.request.headers[Header.TENANT_ID] if (headerTenantId) { return headerTenantId as string } diff --git a/packages/worker/src/middleware/tests/tenancy.spec.ts b/packages/worker/src/middleware/tests/tenancy.spec.ts index 72c00fb6fb..a8b7a50e55 100644 --- a/packages/worker/src/middleware/tests/tenancy.spec.ts +++ b/packages/worker/src/middleware/tests/tenancy.spec.ts @@ -20,18 +20,18 @@ describe("tenancy middleware", () => { const user = await config.createTenant() await config.createSession(user) const res = await config.api.self.getSelf(user) - expect(res.headers[constants.Headers.TENANT_ID]).toBe(user.tenantId) + expect(res.headers[constants.Header.TENANT_ID]).toBe(user.tenantId) }) it("should get tenant id from header", async () => { const tenantId = structures.uuid() const headers = { - [constants.Headers.TENANT_ID]: tenantId, + [constants.Header.TENANT_ID]: tenantId, } const res = await config.request .get(`/api/global/configs/checklist`) .set(headers) - expect(res.headers[constants.Headers.TENANT_ID]).toBe(tenantId) + expect(res.headers[constants.Header.TENANT_ID]).toBe(tenantId) }) it("should get tenant id from query param", async () => { @@ -39,7 +39,7 @@ describe("tenancy middleware", () => { const res = await config.request.get( `/api/global/configs/checklist?tenantId=${tenantId}` ) - expect(res.headers[constants.Headers.TENANT_ID]).toBe(tenantId) + expect(res.headers[constants.Header.TENANT_ID]).toBe(tenantId) }) it("should get tenant id from subdomain", async () => { @@ -50,7 +50,7 @@ describe("tenancy middleware", () => { const res = await config.request .get(`/api/global/configs/checklist`) .set(headers) - expect(res.headers[constants.Headers.TENANT_ID]).toBe(tenantId) + expect(res.headers[constants.Header.TENANT_ID]).toBe(tenantId) }) it("should get tenant id from path variable", async () => { @@ -61,13 +61,13 @@ describe("tenancy middleware", () => { username: user.email, password: user.password, }) - expect(res.headers[constants.Headers.TENANT_ID]).toBe(user.tenantId) + expect(res.headers[constants.Header.TENANT_ID]).toBe(user.tenantId) }) it("should throw when no tenant id is found", async () => { const res = await config.request.get(`/api/global/configs/checklist`) expect(res.status).toBe(403) expect(res.text).toBe("Tenant id not set") - expect(res.headers[constants.Headers.TENANT_ID]).toBe(undefined) + expect(res.headers[constants.Header.TENANT_ID]).toBe(undefined) }) }) From f47ae91ce1c98f25e59c16be4df2eb67b90a5203 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 17 Nov 2022 10:11:25 +0000 Subject: [PATCH 134/396] Update table settings migration to handle new behaviour settings for table blocks --- .../src/migrations/functions/tableSettings.ts | 76 ++++++++++++++----- 1 file changed, 59 insertions(+), 17 deletions(-) diff --git a/packages/server/src/migrations/functions/tableSettings.ts b/packages/server/src/migrations/functions/tableSettings.ts index 1904fa01e7..40baf48e6a 100644 --- a/packages/server/src/migrations/functions/tableSettings.ts +++ b/packages/server/src/migrations/functions/tableSettings.ts @@ -6,14 +6,23 @@ import { makePropSafe as safe } from "@budibase/string-templates" * November 2022 * * Description: - * Update table settings to use actions instead of links. + * Update table settings to use actions instead of links. We do not remove the + * legacy values here as we cannot guarantee that their apps are up-t-date. + * It is safe to simply save both the new and old structure in the definition. + * + * Migration 1: * Legacy "linkRows", "linkURL", "linkPeek" and "linkColumn" settings on tables * and table blocks are migrated into a "Navigate To" action under the new * "onClick" setting. + * + * Migration 2: + * Legacy "titleButtonURL" and "titleButtonPeek" settings on table blocks are + * migrated into a "Navigate To" action under the new "onClickTitleButton" + * setting. */ export const run = async (appDb: any) => { + // Get all app screens let screens: Screen[] - try { screens = ( await appDb.allDocs( @@ -38,7 +47,7 @@ export const run = async (appDb: any) => { delete screen.touched appDb.put(screen) console.log( - `Screen ${screen.routing?.route} contained tables which were migrated` + `Screen ${screen.routing?.route} contained table settings which were migrated` ) } }) @@ -50,24 +59,49 @@ const migrateTableSettings = (component: any, screen: any) => { if (!component) { return } - // Migrate table setting + + // Migration 1: migrate table row click settings if ( component._component.endsWith("/table") || component._component.endsWith("/tableblock") ) { const { linkRows, linkURL, linkPeek, linkColumn, onClick } = component if (linkRows && !onClick) { - const action = convertLinkSettingToAction(linkURL, linkPeek, linkColumn) + const column = linkColumn || "_id" + const action = convertLinkSettingToAction(linkURL, !!linkPeek, column) if (action) { screen.touched = true component.onClick = action + if (component._component.endsWith("/tableblock")) { + component.clickBehaviour = "actions" + } } } } - if (!component._children?.length) { - return + + // Migration 2: migrate table block title button settings + if (component._component.endsWith("/tableblock")) { + const { + showTitleButton, + titleButtonURL, + titleButtonPeek, + onClickTitleButton, + } = component + if (showTitleButton && !onClickTitleButton) { + const action = convertLinkSettingToAction( + titleButtonURL, + !!titleButtonPeek + ) + if (action) { + screen.touched = true + component.onClickTitleButton = action + component.titleButtonClickBehaviour = "actions" + } + } } - component._children.forEach((child: any) => { + + // Recurse down the tree as needed + component._children?.forEach((child: any) => { migrateTableSettings(child, screen) }) } @@ -75,26 +109,34 @@ const migrateTableSettings = (component: any, screen: any) => { // Util ti convert the legacy settings into a navigation action structure const convertLinkSettingToAction = ( linkURL: string, - linkPeek?: boolean, + linkPeek: boolean, linkColumn?: string ) => { - if (!linkURL?.includes("/:")) { + // Sanity check we have a URL + if (!linkURL) { return null } - // Convert old link URL setting, which is a screen URL, into a valid - // binding using the new clicked row binding - const split = linkURL.split("/:") - const col = linkColumn || "_id" - const binding = `{{ ${safe("eventContext")}.${safe("row")}.${safe(col)} }}` - const url = `${split[0]}/${binding}` + // Default URL to the old URL setting + let url = linkURL + // If we enriched the old URL with a column, update the url + if (linkColumn && linkURL.includes("/:")) { + // Convert old link URL setting, which is a screen URL, into a valid + // binding using the new clicked row binding + const split = linkURL.split("/:") + const col = linkColumn || "_id" + const binding = `{{ ${safe("eventContext")}.${safe("row")}.${safe(col)} }}` + url = `${split[0]}/${binding}` + } + + // Create action structure return [ { "##eventHandlerType": "Navigate To", parameters: { url, - peek: !!linkPeek, + peek: linkPeek, }, }, ] From e85cc096115db86f566ab802abb464320a707091 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 17 Nov 2022 10:16:27 +0000 Subject: [PATCH 135/396] Fix flatpickr random error --- packages/bbui/src/Form/Core/DatePicker.svelte | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/bbui/src/Form/Core/DatePicker.svelte b/packages/bbui/src/Form/Core/DatePicker.svelte index 379f41b284..5510d2d25b 100644 --- a/packages/bbui/src/Form/Core/DatePicker.svelte +++ b/packages/bbui/src/Form/Core/DatePicker.svelte @@ -23,6 +23,15 @@ let open = false let flatpickr, flatpickrOptions + // Another classic flatpickr issue. Errors were randomly being thrown due to + // flatpickr internal code. Making sure that "destroy" is a valid function + // fixes it. The sooner we remove flatpickr the better. + $: { + if (flatpickr && !flatpickr.destroy) { + flatpickr.destroy = () => {} + } + } + const resolveTimeStamp = timestamp => { let maskedDate = new Date(`0-${timestamp}`) From bc6a0b2f22e1df1924848be004d9cda022a3c654 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 17 Nov 2022 10:16:45 +0000 Subject: [PATCH 136/396] Add working side panels to table blocks --- .../store/screenTemplates/rowListScreen.js | 2 +- .../design/settings/componentSettings.js | 3 +- .../settings/ComponentSettingsSection.svelte | 4 +- packages/client/manifest.json | 230 ++++++++++-------- .../src/components/app/SidePanel.svelte | 8 +- .../components/app/blocks/TableBlock.svelte | 112 +++++++-- .../src/components/app/forms/Form.svelte | 2 +- .../src/components/app/table/Table.svelte | 3 +- 8 files changed, 242 insertions(+), 122 deletions(-) diff --git a/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js b/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js index b04d588ded..8231133bdf 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js +++ b/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js @@ -25,7 +25,7 @@ const generateTableBlock = table => { linkURL: `${rowListUrl(table)}/:id`, showAutoColumns: false, showTitleButton: true, - titleButtonText: "Create new", + titleButtonText: "Create row", titleButtonURL: newRowUrl(table), title: table.name, dataSource: { diff --git a/packages/builder/src/components/design/settings/componentSettings.js b/packages/builder/src/components/design/settings/componentSettings.js index 441993fe1c..641f506332 100644 --- a/packages/builder/src/components/design/settings/componentSettings.js +++ b/packages/builder/src/components/design/settings/componentSettings.js @@ -1,4 +1,4 @@ -import { Checkbox, Select, Stepper } from "@budibase/bbui" +import { Checkbox, Select, RadioGroup, Stepper } from "@budibase/bbui" import DataSourceSelect from "./controls/DataSourceSelect.svelte" import S3DataSourceSelect from "./controls/S3DataSourceSelect.svelte" import DataProviderSelect from "./controls/DataProviderSelect.svelte" @@ -24,6 +24,7 @@ import BarButtonList from "./controls/BarButtonList.svelte" const componentMap = { text: DrawerBindableCombobox, select: Select, + radio: RadioGroup, dataSource: DataSourceSelect, "dataSource/s3": S3DataSourceSelect, dataProvider: DataProviderSelect, diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsSection.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsSection.svelte index 12a7eea87d..d91f435f08 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsSection.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsSection.svelte @@ -36,7 +36,9 @@ section.settings.forEach(setting => { setting.visible = canRenderControl(instance, setting, isScreen) }) - section.visible = section.settings.some(setting => setting.visible) + section.visible = + section.name === "General" || + section.settings.some(setting => setting.visible) }) return sections diff --git a/packages/client/manifest.json b/packages/client/manifest.json index 34ca6baa0e..eae7cf4b55 100644 --- a/packages/client/manifest.json +++ b/packages/client/manifest.json @@ -3733,12 +3733,6 @@ "key": "dataProvider", "required": true }, - { - "type": "number", - "label": "Row count", - "key": "rowCount", - "defaultValue": 8 - }, { "type": "columns", "label": "Columns", @@ -3762,6 +3756,12 @@ } ] }, + { + "type": "number", + "label": "Row count", + "key": "rowCount", + "defaultValue": 8 + }, { "type": "boolean", "label": "Quiet", @@ -3772,12 +3772,6 @@ "label": "Compact", "key": "compact" }, - { - "type": "boolean", - "label": "Show auto columns", - "key": "showAutoColumns", - "defaultValue": false - }, { "type": "boolean", "label": "Allow row selection", @@ -3785,14 +3779,20 @@ "defaultValue": false, "info": "Row selection is only compatible with internal or SQL tables" }, + { - "type": "event", - "label": "On row click", - "key": "onClick", - "context": [ + "section": true, + "name": "On Row Click", + "settings": [ { - "label": "Clicked row", - "key": "row" + "type": "event", + "key": "onClick", + "context": [ + { + "label": "Clicked row", + "key": "row" + } + ] } ] } @@ -4445,70 +4445,15 @@ "label": "Title", "key": "title" }, - { - "type": "dataSource", - "label": "Data", - "key": "dataSource", - "required": true - }, - { - "type": "searchfield", - "label": "Search Columns", - "key": "searchColumns", - "placeholder": "Choose search columns", - "info": "Only the first 5 search columns will be used" - }, - { - "type": "filter", - "label": "Filtering", - "key": "filter" - }, - { - "type": "field/sortable", - "label": "Sort Column", - "key": "sortColumn" - }, - { - "type": "select", - "label": "Sort Order", - "key": "sortOrder", - "options": [ - "Ascending", - "Descending" - ], - "defaultValue": "Descending" - }, - { - "type": "select", - "label": "Size", - "key": "size", - "defaultValue": "spectrum--medium", - "options": [ - { - "label": "Medium", - "value": "spectrum--medium" - }, - { - "label": "Large", - "value": "spectrum--large" - } - ] - }, - { - "type": "boolean", - "label": "Paginate", - "key": "paginate", - "defaultValue": true - }, { "section": true, "name": "Table", "settings": [ { - "type": "number", - "label": "Scroll Limit", - "key": "rowCount", - "defaultValue": 8 + "type": "dataSource", + "label": "Data", + "key": "dataSource", + "required": true }, { "type": "columns", @@ -4518,9 +4463,52 @@ "placeholder": "All columns", "nested": true }, + { + "type": "field/sortable", + "label": "Sort By", + "key": "sortColumn" + }, + { + "type": "select", + "label": "Sort Order", + "key": "sortOrder", + "options": [ + "Ascending", + "Descending" + ], + "defaultValue": "Descending" + }, + { + "type": "select", + "label": "Size", + "key": "size", + "defaultValue": "spectrum--medium", + "options": [ + { + "label": "Medium", + "value": "spectrum--medium" + }, + { + "label": "Large", + "value": "spectrum--large" + } + ] + }, + { + "type": "number", + "label": "Scroll Limit", + "key": "rowCount", + "defaultValue": 8 + }, { "type": "boolean", - "label": "Quiet table variant", + "label": "Paginate", + "key": "paginate", + "defaultValue": true + }, + { + "type": "boolean", + "label": "Quiet", "key": "quiet" }, { @@ -4528,21 +4516,53 @@ "label": "Compact", "key": "compact" }, - { - "type": "boolean", - "label": "Show auto columns", - "key": "showAutoColumns" - }, { "type": "boolean", "label": "Allow row selection", "key": "allowSelectRows", "info": "Row selection is only compatible with internal or SQL tables" }, + { + "type": "filter", + "label": "Filtering", + "key": "filter" + }, + { + "type": "searchfield", + "label": "Search Fields", + "key": "searchColumns", + "placeholder": "Choose search fields", + "info": "Only the first 5 search fields will be used" + } + ] + }, + { + "section": true, + "name": "On row click", + "settings": [ + { + "type": "radio", + "key": "clickBehaviour", + "defaultValue": "details", + "options": [ + { + "label": "Show details side panel", + "value": "details" + }, + { + "label": "Run actions", + "value": "actions" + } + ] + }, { "type": "event", - "label": "On row click", "key": "onClick", + "nested": true, + "dependsOn": { + "setting": "clickBehaviour", + "value": "actions" + }, "context": [{ "label": "Clicked row", "key": "row" @@ -4552,28 +4572,46 @@ }, { "section": true, - "name": "Title button", + "name": "Button", "settings": [ { "type": "boolean", "key": "showTitleButton", - "label": "Show link button", - "defaultValue": false - }, - { - "type": "boolean", - "label": "Open link in modal", - "key": "titleButtonPeek" + "label": "Show button above table", + "defaultValue": true }, { "type": "text", "key": "titleButtonText", - "label": "Button text" + "label": "Text", + "defaultValue": "Create row", + "dependsOn": "showTitleButton" }, { - "type": "url", - "label": "Button link", - "key": "titleButtonURL" + "type": "radio", + "key": "titleButtonClickBehaviour", + "label": "On Click", + "dependsOn": "showTitleButton", + "defaultValue": "new", + "options": [ + { + "label": "Show new row side panel", + "value": "new" + }, + { + "label": "Run actions", + "value": "actions" + } + ] + }, + { + "type": "event", + "key": "onClickTitleButton", + "nested": true, + "dependsOn": { + "setting": "titleButtonClickBehaviour", + "value": "actions" + } } ] } diff --git a/packages/client/src/components/app/SidePanel.svelte b/packages/client/src/components/app/SidePanel.svelte index 77e853725f..39579bdabb 100644 --- a/packages/client/src/components/app/SidePanel.svelte +++ b/packages/client/src/components/app/SidePanel.svelte @@ -1,5 +1,5 @@ {#if schemaLoaded} @@ -126,7 +168,7 @@ + + + + + + diff --git a/packages/client/src/components/app/forms/Form.svelte b/packages/client/src/components/app/forms/Form.svelte index 8eddc11fa5..8950661bd8 100644 --- a/packages/client/src/components/app/forms/Form.svelte +++ b/packages/client/src/components/app/forms/Form.svelte @@ -66,7 +66,7 @@ $: initialValues = getInitialValues(actionType, dataSource, $context) $: resetKey = Helpers.hashString( - JSON.stringify(initialValues) + JSON.stringify(schema) + disabled + JSON.stringify(initialValues) + JSON.stringify(dataSource) + disabled ) diff --git a/packages/client/src/components/app/table/Table.svelte b/packages/client/src/components/app/table/Table.svelte index eabbdcdfdb..8cedfb2323 100644 --- a/packages/client/src/components/app/table/Table.svelte +++ b/packages/client/src/components/app/table/Table.svelte @@ -7,7 +7,6 @@ export let dataProvider export let columns - export let showAutoColumns export let rowCount export let quiet export let size @@ -32,7 +31,7 @@ $: loading = dataProvider?.loading ?? false $: data = dataProvider?.rows || [] $: fullSchema = dataProvider?.schema ?? {} - $: fields = getFields(fullSchema, columns, showAutoColumns) + $: fields = getFields(fullSchema, columns, false) $: schema = getFilteredSchema(fullSchema, fields, hasChildren) $: setSorting = getAction( dataProvider?.id, From 2a7b90e46f65b865cf32a452375f1db29901b13d Mon Sep 17 00:00:00 2001 From: Dean Date: Thu, 17 Nov 2022 11:08:23 +0000 Subject: [PATCH 137/396] Component settings bar now on by default. Manifest config cleared of showSettingsBar properties --- packages/client/manifest.json | 11 +---------- .../client/src/components/preview/SettingsBar.svelte | 2 +- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/packages/client/manifest.json b/packages/client/manifest.json index 45bb38439a..980bd4585e 100644 --- a/packages/client/manifest.json +++ b/packages/client/manifest.json @@ -84,7 +84,6 @@ "description": "This component contains things within itself", "icon": "Selection", "hasChildren": true, - "showSettingsBar": true, "size": { "width": 400, "height": 200 @@ -283,7 +282,6 @@ "description": "A basic html button that is ready for styling", "icon": "Button", "editable": true, - "showSettingsBar": true, "size": { "width": 105, "height": 35 @@ -420,7 +418,6 @@ "section" ], "hasChildren": true, - "showSettingsBar": true, "size": { "width": 400, "height": 100 @@ -683,7 +680,6 @@ "illegalChildren": [ "section" ], - "showSettingsBar": true, "editable": true, "size": { "width": 400, @@ -809,7 +805,6 @@ "illegalChildren": [ "section" ], - "showSettingsBar": true, "editable": true, "size": { "width": 400, @@ -931,7 +926,6 @@ "tag": { "name": "Tag", "icon": "Label", - "showSettingsBar": true, "size": { "width": 100, "height": 25 @@ -1189,7 +1183,6 @@ "name": "Link", "description": "A basic link component for internal and external links", "icon": "Link", - "showSettingsBar": true, "editable": true, "size": { "width": 200, @@ -3927,7 +3920,6 @@ "dynamicfilter": { "name": "Dynamic Filter", "icon": "Filter", - "showSettingsBar": true, "size": { "width": 100, "height": 35 @@ -4797,7 +4789,6 @@ "section" ], "hasChildren": true, - "showSettingsBar": true, "size": { "width": 400, "height": 100 @@ -5270,4 +5261,4 @@ "suffix": "repeater" } } -} +} \ No newline at end of file diff --git a/packages/client/src/components/preview/SettingsBar.svelte b/packages/client/src/components/preview/SettingsBar.svelte index 332409986a..f72994e496 100644 --- a/packages/client/src/components/preview/SettingsBar.svelte +++ b/packages/client/src/components/preview/SettingsBar.svelte @@ -16,7 +16,7 @@ let measured = false $: definition = $componentStore.selectedComponentDefinition - $: showBar = definition?.showSettingsBar && !$dndIsDragging + $: showBar = definition?.showSettingsBar !== false && !$dndIsDragging $: { if (!showBar) { measured = false From 4c44b7a22459e4360c4b10f7ab0f71720bd3c599 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 17 Nov 2022 13:31:54 +0000 Subject: [PATCH 138/396] PR comments - still experiencing build issues. --- .../src/context/{localStorage.ts => Context.ts} | 2 +- packages/backend-core/src/context/index.ts | 2 +- .../src/db/couch/{pouchLike.ts => PouchLike.ts} | 0 packages/backend-core/src/db/couch/index.ts | 2 +- packages/backend-core/src/db/index.ts | 1 + packages/backend-core/src/index.ts | 4 +--- packages/backend-core/src/types.ts | 1 - packages/backend-core/src/users.ts | 6 +++--- packages/backend-core/tsconfig.build.json | 2 +- packages/server/src/middleware/builder.ts | 8 ++++++-- packages/server/src/middleware/selfhost.ts | 2 +- packages/worker/src/sdk/users/users.ts | 2 +- packages/worker/src/utilities/email.ts | 2 +- packages/worker/tsconfig.build.json | 6 +++--- 14 files changed, 21 insertions(+), 19 deletions(-) rename packages/backend-core/src/context/{localStorage.ts => Context.ts} (93%) rename packages/backend-core/src/db/couch/{pouchLike.ts => PouchLike.ts} (100%) delete mode 100644 packages/backend-core/src/types.ts diff --git a/packages/backend-core/src/context/localStorage.ts b/packages/backend-core/src/context/Context.ts similarity index 93% rename from packages/backend-core/src/context/localStorage.ts rename to packages/backend-core/src/context/Context.ts index fd761d10bc..6ffb57e44e 100644 --- a/packages/backend-core/src/context/localStorage.ts +++ b/packages/backend-core/src/context/Context.ts @@ -1,7 +1,7 @@ import { AsyncLocalStorage } from "async_hooks" import { ContextMap } from "./constants" -export class Context { +export default class Context { static storage = new AsyncLocalStorage() static run(context: ContextMap, func: any) { diff --git a/packages/backend-core/src/context/index.ts b/packages/backend-core/src/context/index.ts index 076d9af65a..3499082f6a 100644 --- a/packages/backend-core/src/context/index.ts +++ b/packages/backend-core/src/context/index.ts @@ -8,7 +8,7 @@ import { getDB, PouchLike, } from "../db" -import { Context } from "./localStorage" +import Context from "./Context" import { IdentityContext } from "@budibase/types" import { DEFAULT_TENANT_ID as _DEFAULT_TENANT_ID } from "../constants" import { ContextMap } from "./constants" diff --git a/packages/backend-core/src/db/couch/pouchLike.ts b/packages/backend-core/src/db/couch/PouchLike.ts similarity index 100% rename from packages/backend-core/src/db/couch/pouchLike.ts rename to packages/backend-core/src/db/couch/PouchLike.ts diff --git a/packages/backend-core/src/db/couch/index.ts b/packages/backend-core/src/db/couch/index.ts index b8cb0ab79f..ea47022c35 100644 --- a/packages/backend-core/src/db/couch/index.ts +++ b/packages/backend-core/src/db/couch/index.ts @@ -1,4 +1,4 @@ export * from "./connections" -export * from "./pouchLike" +export * from "./PouchLike" export * from "./utils" export { init, getPouch, getPouchDB, closePouchDB } from "./pouchDB" diff --git a/packages/backend-core/src/db/index.ts b/packages/backend-core/src/db/index.ts index 7269aa8f92..3db29a905f 100644 --- a/packages/backend-core/src/db/index.ts +++ b/packages/backend-core/src/db/index.ts @@ -5,3 +5,4 @@ export * from "./views" export * from "./constants" export * from "./conversions" export * from "./tenancy" +export { PouchLike } from "./couch" diff --git a/packages/backend-core/src/index.ts b/packages/backend-core/src/index.ts index 24207a7a91..c68c8f0927 100644 --- a/packages/backend-core/src/index.ts +++ b/packages/backend-core/src/index.ts @@ -21,10 +21,9 @@ import * as middleware from "./middleware" import plugins from "./plugin" import encryption from "./security/encryption" import * as queue from "./queue" -import * as types from "./types" +import * as db from "./db" // mimic the outer package exports -import * as db from "./db" import * as objectStore from "./pkg/objectStore" import * as utils from "./pkg/utils" import redis from "./pkg/redis" @@ -68,7 +67,6 @@ const core = { encryption, queue, permissions, - ...types, } export = core diff --git a/packages/backend-core/src/types.ts b/packages/backend-core/src/types.ts deleted file mode 100644 index eeb784b0c1..0000000000 --- a/packages/backend-core/src/types.ts +++ /dev/null @@ -1 +0,0 @@ -export { PouchLike } from "./db" diff --git a/packages/backend-core/src/users.ts b/packages/backend-core/src/users.ts index 13e8f8d36e..1720a79a83 100644 --- a/packages/backend-core/src/users.ts +++ b/packages/backend-core/src/users.ts @@ -3,9 +3,9 @@ import { getUsersByAppParams, getProdAppID, generateAppUserID, -} from "./db/utils" -import { queryGlobalView } from "./db/views" -import { UNICODE_MAX } from "./db/constants" + queryGlobalView, + UNICODE_MAX, +} from "./db" import { BulkDocsResponse, User } from "@budibase/types" import { getGlobalDB } from "./context" diff --git a/packages/backend-core/tsconfig.build.json b/packages/backend-core/tsconfig.build.json index 40ffe6b827..f5b16eda1a 100644 --- a/packages/backend-core/tsconfig.build.json +++ b/packages/backend-core/tsconfig.build.json @@ -12,7 +12,7 @@ "sourceMap": true, "declaration": true, "types": [ "node", "jest" ], - "outDir": "dist" + "outDir": "dist", }, "include": [ "**/*.js", diff --git a/packages/server/src/middleware/builder.ts b/packages/server/src/middleware/builder.ts index 403597ff1a..719a4dc060 100644 --- a/packages/server/src/middleware/builder.ts +++ b/packages/server/src/middleware/builder.ts @@ -9,9 +9,13 @@ import { checkDebounce, setDebounce, } from "../utilities/redis" -import { db as dbCore, cache, permissions } from "@budibase/backend-core" +import { + db as dbCore, + cache, + permissions, + PouchLike, +} from "@budibase/backend-core" import { BBContext } from "@budibase/types" -import { PouchLike } from "@budibase/backend-core/src/db" const DEBOUNCE_TIME_SEC = 30 diff --git a/packages/server/src/middleware/selfhost.ts b/packages/server/src/middleware/selfhost.ts index 180d80c8ea..54b757d29c 100644 --- a/packages/server/src/middleware/selfhost.ts +++ b/packages/server/src/middleware/selfhost.ts @@ -3,7 +3,7 @@ import { BBContext } from "@budibase/types" // if added as a middleware will stop requests unless builder is in self host mode // or cloud is in self host -module.exports = async (ctx: BBContext, next: any) => { +export = async (ctx: BBContext, next: any) => { if (env.SELF_HOSTED) { await next() return diff --git a/packages/worker/src/sdk/users/users.ts b/packages/worker/src/sdk/users/users.ts index e2215cee80..539ac21300 100644 --- a/packages/worker/src/sdk/users/users.ts +++ b/packages/worker/src/sdk/users/users.ts @@ -479,7 +479,7 @@ export const bulkDelete = async ( (user: RowResponse) => { return user.doc } - ) as User[] + ) // Delete from DB const toDelete = usersToDelete.map(user => ({ diff --git a/packages/worker/src/utilities/email.ts b/packages/worker/src/utilities/email.ts index c07604827d..e71109c0b8 100644 --- a/packages/worker/src/utilities/email.ts +++ b/packages/worker/src/utilities/email.ts @@ -142,7 +142,7 @@ async function buildEmail( * @return {Promise} returns the SMTP configuration if it exists */ async function getSmtpConfiguration( - db: PouchLike, + db: dbCore.PouchLike, workspaceId?: string, automation?: boolean ) { diff --git a/packages/worker/tsconfig.build.json b/packages/worker/tsconfig.build.json index 36622d33eb..8071b4ad00 100644 --- a/packages/worker/tsconfig.build.json +++ b/packages/worker/tsconfig.build.json @@ -1,17 +1,17 @@ { "compilerOptions": { "target": "es6", - "skipLibCheck": true, "module": "commonjs", "lib": ["es2020"], "allowJs": true, - "outDir": "dist", "strict": true, "noImplicitAny": true, "esModuleInterop": true, "resolveJsonModule": true, "incremental": true, - "types": [ "node", "jest"], + "types": [ "node", "jest" ], + "outDir": "dist", + "skipLibCheck": true }, "include": [ "src/**/*" From 312bc967701f69f0cb9d5756a45d4dae3f018e18 Mon Sep 17 00:00:00 2001 From: Dean Date: Thu, 17 Nov 2022 14:10:55 +0000 Subject: [PATCH 139/396] Don't show delete or duplicate actions in the component settings bar --- .../src/components/preview/SettingsBar.svelte | 41 +++++++++++-------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/packages/client/src/components/preview/SettingsBar.svelte b/packages/client/src/components/preview/SettingsBar.svelte index f72994e496..7f9b92c01d 100644 --- a/packages/client/src/components/preview/SettingsBar.svelte +++ b/packages/client/src/components/preview/SettingsBar.svelte @@ -24,6 +24,9 @@ } $: settings = getBarSettings(definition) + $: isScreen = + $builderStore.selectedComponentId === $builderStore.screen?.props?._id + const getBarSettings = definition => { let allSettings = [] definition?.settings?.forEach(setting => { @@ -152,26 +155,30 @@ {:else if setting.type === "color"} {/if} - {#if setting.barSeparator !== false} + {#if setting.barSeparator !== false && (settings.length != idx + 1 || !isScreen)}
{/if} {/each} - { - builderStore.actions.duplicateComponent( - $builderStore.selectedComponentId - ) - }} - title="Duplicate component" - /> - { - builderStore.actions.deleteComponent($builderStore.selectedComponentId) - }} - title="Delete component" - /> + {#if !isScreen} + { + builderStore.actions.duplicateComponent( + $builderStore.selectedComponentId + ) + }} + title="Duplicate component" + /> + { + builderStore.actions.deleteComponent( + $builderStore.selectedComponentId + ) + }} + title="Delete component" + /> + {/if}
{/if} From d79016945ac70357c4c03fcd84f0a806b85fa547 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 17 Nov 2022 14:15:24 +0000 Subject: [PATCH 140/396] Ensure all search requests specify a sort field to avoid random sorting --- packages/frontend-core/src/fetch/DataFetch.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/frontend-core/src/fetch/DataFetch.js b/packages/frontend-core/src/fetch/DataFetch.js index 31007121f1..37e300e354 100644 --- a/packages/frontend-core/src/fetch/DataFetch.js +++ b/packages/frontend-core/src/fetch/DataFetch.js @@ -117,7 +117,7 @@ export default class DataFetch { * Fetches a fresh set of data from the server, resetting pagination */ async getInitialData() { - const { datasource, filter, sortColumn, paginate } = this.options + const { datasource, filter, paginate } = this.options // Fetch datasource definition and determine feature flags const definition = await this.getDefinition(datasource) @@ -135,6 +135,17 @@ export default class DataFetch { return } + // If no sort order, default to descending + if (!this.options.sortOrder) { + this.options.sortOrder = "ascending" + } + + // If no sort column, use the first field in the schema + if (!this.options.sortColumn) { + this.options.sortColumn = Object.keys(schema)[0] + } + const { sortColumn } = this.options + // Determine what sort type to use let sortType = "string" if (sortColumn) { From 29188145a75362fbba2b303ddab4a208c03686ee Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 17 Nov 2022 14:18:17 +0000 Subject: [PATCH 141/396] Close side panel whenever screen changes --- packages/client/src/stores/sidePanel.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/client/src/stores/sidePanel.js b/packages/client/src/stores/sidePanel.js index 327fcfae82..5de2b679a1 100644 --- a/packages/client/src/stores/sidePanel.js +++ b/packages/client/src/stores/sidePanel.js @@ -1,4 +1,5 @@ import { writable, derived } from "svelte/store" +import { screenStore } from "./screens.js" export const createSidePanelStore = () => { const initialState = { @@ -35,3 +36,11 @@ export const createSidePanelStore = () => { } export const sidePanelStore = createSidePanelStore() + +// Close side panel every time we change screen +const activeScreenId = derived(screenStore, $screenStore => { + return $screenStore?.activeScreen?._id +}) +activeScreenId.subscribe(() => { + sidePanelStore.actions.close() +}) From 2451ba2e9f7ff39ece8a52a41bc349f28dde6cf0 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 17 Nov 2022 14:18:55 +0000 Subject: [PATCH 142/396] Ensure side panel ejection works properly and tidy up table block structure --- packages/client/manifest.json | 4 +- .../src/components/app/SidePanel.svelte | 4 +- .../components/app/blocks/TableBlock.svelte | 80 ++++++++++--------- 3 files changed, 45 insertions(+), 43 deletions(-) diff --git a/packages/client/manifest.json b/packages/client/manifest.json index eae7cf4b55..806590f92a 100644 --- a/packages/client/manifest.json +++ b/packages/client/manifest.json @@ -3667,7 +3667,7 @@ "Ascending", "Descending" ], - "defaultValue": "Descending" + "defaultValue": "Ascending" }, { "type": "number", @@ -4578,7 +4578,7 @@ "type": "boolean", "key": "showTitleButton", "label": "Show button above table", - "defaultValue": true + "defaultValue": false }, { "type": "text", diff --git a/packages/client/src/components/app/SidePanel.svelte b/packages/client/src/components/app/SidePanel.svelte index 39579bdabb..ffe39a24e3 100644 --- a/packages/client/src/components/app/SidePanel.svelte +++ b/packages/client/src/components/app/SidePanel.svelte @@ -39,9 +39,7 @@ hidden class="side-panel" > - {#if open} - - {/if} + From a620791d130084ff9f52d1021d4402f707eb0b28 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 22 Nov 2022 16:52:25 +0000 Subject: [PATCH 197/396] More controller typescript conversions. --- packages/backend-core/src/db/utils.ts | 4 +- packages/backend-core/src/security/roles.ts | 1 + .../controllers/{apikeys.js => apikeys.ts} | 20 ++-- .../{automation.js => automation.ts} | 96 +++++++++---------- .../api/controllers/{cloud.js => cloud.ts} | 47 ++++----- .../controllers/{metadata.js => metadata.ts} | 21 ++-- .../{permission.js => permission.ts} | 95 +++++++++--------- .../src/api/controllers/query/import/index.ts | 5 +- .../query/{validation.js => validation.ts} | 14 +-- .../src/api/controllers/{role.js => role.ts} | 46 ++++----- .../controllers/{routing.js => routing.ts} | 75 ++++++++------- .../view/{exporters.js => exporters.ts} | 8 +- .../controllers/view/{index.js => index.ts} | 65 +++++++------ .../controllers/view/{utils.js => utils.ts} | 46 +++++---- .../types/src/documents/app/automation.ts | 1 + packages/types/src/sdk/koa.ts | 1 + 16 files changed, 284 insertions(+), 261 deletions(-) rename packages/server/src/api/controllers/{apikeys.js => apikeys.ts} (65%) rename packages/server/src/api/controllers/{automation.js => automation.ts} (75%) rename packages/server/src/api/controllers/{cloud.js => cloud.ts} (64%) rename packages/server/src/api/controllers/{metadata.js => metadata.ts} (55%) rename packages/server/src/api/controllers/{permission.js => permission.ts} (64%) rename packages/server/src/api/controllers/query/{validation.js => validation.ts} (79%) rename packages/server/src/api/controllers/{role.js => role.ts} (72%) rename packages/server/src/api/controllers/{routing.js => routing.ts} (52%) rename packages/server/src/api/controllers/view/{exporters.js => exporters.ts} (72%) rename packages/server/src/api/controllers/view/{index.js => index.ts} (73%) rename packages/server/src/api/controllers/view/{utils.js => utils.ts} (76%) diff --git a/packages/backend-core/src/db/utils.ts b/packages/backend-core/src/db/utils.ts index 9920be7e55..04feafa008 100644 --- a/packages/backend-core/src/db/utils.ts +++ b/packages/backend-core/src/db/utils.ts @@ -171,7 +171,7 @@ export function getGlobalUserParams(globalId: any, otherProps: any = {}) { /** * Gets parameters for retrieving users, this is a utility function for the getDocParams function. */ -export function getUserMetadataParams(userId?: string, otherProps = {}) { +export function getUserMetadataParams(userId?: string | null, otherProps = {}) { return getRowParams(InternalTable.USER_METADATA, userId, otherProps) } @@ -244,7 +244,7 @@ export function getTemplateParams( * Generates a new role ID. * @returns {string} The new role ID which the role doc can be stored under. */ -export function generateRoleID(id: any) { +export function generateRoleID(id?: any) { return `${DocumentType.ROLE}${SEPARATOR}${id || newid()}` } diff --git a/packages/backend-core/src/security/roles.ts b/packages/backend-core/src/security/roles.ts index 8e8b21a887..bdf7a38726 100644 --- a/packages/backend-core/src/security/roles.ts +++ b/packages/backend-core/src/security/roles.ts @@ -27,6 +27,7 @@ const EXTERNAL_BUILTIN_ROLE_IDS = [ export class Role implements RoleDoc { _id: string + _rev?: string name: string permissionId: string inherits?: string diff --git a/packages/server/src/api/controllers/apikeys.js b/packages/server/src/api/controllers/apikeys.ts similarity index 65% rename from packages/server/src/api/controllers/apikeys.js rename to packages/server/src/api/controllers/apikeys.ts index f5e36e7435..02b61954c3 100644 --- a/packages/server/src/api/controllers/apikeys.js +++ b/packages/server/src/api/controllers/apikeys.ts @@ -1,10 +1,10 @@ -const { StaticDatabases } = require("@budibase/backend-core/db") -const { getGlobalDB } = require("@budibase/backend-core/tenancy") +import { db as dbCore, tenancy } from "@budibase/backend-core" +import { BBContext, Document } from "@budibase/types" -const KEYS_DOC = StaticDatabases.GLOBAL.docs.apiKeys +const KEYS_DOC = dbCore.StaticDatabases.GLOBAL.docs.apiKeys async function getBuilderMainDoc() { - const db = getGlobalDB() + const db = tenancy.getGlobalDB() try { return await db.get(KEYS_DOC) } catch (err) { @@ -15,24 +15,24 @@ async function getBuilderMainDoc() { } } -async function setBuilderMainDoc(doc) { +async function setBuilderMainDoc(doc: Document) { // make sure to override the ID doc._id = KEYS_DOC - const db = getGlobalDB() + const db = tenancy.getGlobalDB() return db.put(doc) } -exports.fetch = async function (ctx) { +export async function fetch(ctx: BBContext) { try { const mainDoc = await getBuilderMainDoc() ctx.body = mainDoc.apiKeys ? mainDoc.apiKeys : {} - } catch (err) { + } catch (err: any) { /* istanbul ignore next */ ctx.throw(400, err) } } -exports.update = async function (ctx) { +export async function update(ctx: BBContext) { const key = ctx.params.key const value = ctx.request.body.value @@ -47,7 +47,7 @@ exports.update = async function (ctx) { _id: resp.id, _rev: resp.rev, } - } catch (err) { + } catch (err: any) { /* istanbul ignore next */ ctx.throw(400, err) } diff --git a/packages/server/src/api/controllers/automation.js b/packages/server/src/api/controllers/automation.ts similarity index 75% rename from packages/server/src/api/controllers/automation.js rename to packages/server/src/api/controllers/automation.ts index 2190adc3b9..185da80216 100644 --- a/packages/server/src/api/controllers/automation.js +++ b/packages/server/src/api/controllers/automation.ts @@ -1,26 +1,21 @@ -const actions = require("../../automations/actions") -const triggers = require("../../automations/triggers") -const { +import actions from "../../automations/actions" +import triggers from "../../automations/triggers" +import { getAutomationParams, generateAutomationID, DocumentType, -} = require("../../db/utils") -const { +} from "../../db/utils" +import { checkForWebhooks, updateTestHistory, removeDeprecated, -} = require("../../automations/utils") -const { deleteEntityMetadata } = require("../../utilities") -const { MetadataTypes } = require("../../constants") -const { setTestFlag, clearTestFlag } = require("../../utilities/redis") -const { - getAppDB, - getProdAppDB, - doInAppContext, -} = require("@budibase/backend-core/context") -const { events } = require("@budibase/backend-core") -const { app } = require("@budibase/backend-core/cache") -const { automations } = require("@budibase/pro") +} from "../../automations/utils" +import { deleteEntityMetadata } from "../../utilities" +import { MetadataTypes } from "../../constants" +import { setTestFlag, clearTestFlag } from "../../utilities/redis" +import { context, cache, events } from "@budibase/backend-core" +import { automations } from "@budibase/pro" +import { Automation, BBContext } from "@budibase/types" const ACTION_DEFS = removeDeprecated(actions.ACTION_DEFINITIONS) const TRIGGER_DEFS = removeDeprecated(triggers.TRIGGER_DEFINITIONS) @@ -31,7 +26,7 @@ const TRIGGER_DEFS = removeDeprecated(triggers.TRIGGER_DEFINITIONS) * * *************************/ -async function cleanupAutomationMetadata(automationId) { +async function cleanupAutomationMetadata(automationId: string) { await deleteEntityMetadata(MetadataTypes.AUTOMATION_TEST_INPUT, automationId) await deleteEntityMetadata( MetadataTypes.AUTOMATION_TEST_HISTORY, @@ -39,7 +34,7 @@ async function cleanupAutomationMetadata(automationId) { ) } -function cleanAutomationInputs(automation) { +function cleanAutomationInputs(automation: Automation) { if (automation == null) { return automation } @@ -63,14 +58,14 @@ function cleanAutomationInputs(automation) { return automation } -exports.create = async function (ctx) { - const db = getAppDB() +export async function create(ctx: BBContext) { + const db = context.getAppDB() let automation = ctx.request.body automation.appId = ctx.appId // call through to update if already exists if (automation._id && automation._rev) { - return exports.update(ctx) + return update(ctx) } automation._id = generateAutomationID() @@ -97,17 +92,23 @@ exports.create = async function (ctx) { } } -const getNewSteps = (oldAutomation, automation) => { +export function getNewSteps(oldAutomation: Automation, automation: Automation) { const oldStepIds = oldAutomation.definition.steps.map(s => s.id) return automation.definition.steps.filter(s => !oldStepIds.includes(s.id)) } -const getDeletedSteps = (oldAutomation, automation) => { +export function getDeletedSteps( + oldAutomation: Automation, + automation: Automation +) { const stepIds = automation.definition.steps.map(s => s.id) return oldAutomation.definition.steps.filter(s => !stepIds.includes(s.id)) } -const handleStepEvents = async (oldAutomation, automation) => { +export async function handleStepEvents( + oldAutomation: Automation, + automation: Automation +) { // new steps const newSteps = getNewSteps(oldAutomation, automation) for (let step of newSteps) { @@ -121,8 +122,8 @@ const handleStepEvents = async (oldAutomation, automation) => { } } -exports.update = async function (ctx) { - const db = getAppDB() +export async function update(ctx: BBContext) { + const db = context.getAppDB() let automation = ctx.request.body automation.appId = ctx.appId const oldAutomation = await db.get(automation._id) @@ -146,9 +147,8 @@ exports.update = async function (ctx) { if (oldAutoTrigger && oldAutoTrigger.id !== newAutoTrigger.id) { await events.automation.triggerUpdated(automation) await deleteEntityMetadata( - ctx.appId, MetadataTypes.AUTOMATION_TEST_INPUT, - automation._id + automation._id! ) } @@ -165,8 +165,8 @@ exports.update = async function (ctx) { } } -exports.fetch = async function (ctx) { - const db = getAppDB() +export async function fetch(ctx: BBContext) { + const db = context.getAppDB() const response = await db.allDocs( getAutomationParams(null, { include_docs: true, @@ -175,13 +175,13 @@ exports.fetch = async function (ctx) { ctx.body = response.rows.map(row => row.doc) } -exports.find = async function (ctx) { - const db = getAppDB() +export async function find(ctx: BBContext) { + const db = context.getAppDB() ctx.body = await db.get(ctx.params.id) } -exports.destroy = async function (ctx) { - const db = getAppDB() +export async function destroy(ctx: BBContext) { + const db = context.getAppDB() const automationId = ctx.params.id const oldAutomation = await db.get(automationId) await checkForWebhooks({ @@ -193,14 +193,14 @@ exports.destroy = async function (ctx) { await events.automation.deleted(oldAutomation) } -exports.logSearch = async function (ctx) { +export async function logSearch(ctx: BBContext) { ctx.body = await automations.logs.logSearch(ctx.request.body) } -exports.clearLogError = async function (ctx) { +export async function clearLogError(ctx: BBContext) { const { automationId, appId } = ctx.request.body - await doInAppContext(appId, async () => { - const db = getProdAppDB() + await context.doInAppContext(appId, async () => { + const db = context.getProdAppDB() const metadata = await db.get(DocumentType.APP_METADATA) if (!automationId) { delete metadata.automationErrors @@ -211,20 +211,20 @@ exports.clearLogError = async function (ctx) { delete metadata.automationErrors[automationId] } await db.put(metadata) - await app.invalidateAppMetadata(metadata.appId, metadata) + await cache.app.invalidateAppMetadata(metadata.appId, metadata) ctx.body = { message: `Error logs cleared.` } }) } -exports.getActionList = async function (ctx) { +export async function getActionList(ctx: BBContext) { ctx.body = ACTION_DEFS } -exports.getTriggerList = async function (ctx) { +export async function getTriggerList(ctx: BBContext) { ctx.body = TRIGGER_DEFS } -module.exports.getDefinitionList = async function (ctx) { +export async function getDefinitionList(ctx: BBContext) { ctx.body = { trigger: TRIGGER_DEFS, action: ACTION_DEFS, @@ -237,8 +237,8 @@ module.exports.getDefinitionList = async function (ctx) { * * *********************/ -exports.trigger = async function (ctx) { - const db = getAppDB() +export async function trigger(ctx: BBContext) { + const db = context.getAppDB() let automation = await db.get(ctx.params.id) await triggers.externalTrigger(automation, { ...ctx.request.body, @@ -250,7 +250,7 @@ exports.trigger = async function (ctx) { } } -function prepareTestInput(input) { +function prepareTestInput(input: any) { // prepare the test parameters if (input.id && input.row) { input.row._id = input.id @@ -261,8 +261,8 @@ function prepareTestInput(input) { return input } -exports.test = async function (ctx) { - const db = getAppDB() +export async function test(ctx: BBContext) { + const db = context.getAppDB() let automation = await db.get(ctx.params.id) await setTestFlag(automation._id) const testInput = prepareTestInput(ctx.request.body) diff --git a/packages/server/src/api/controllers/cloud.js b/packages/server/src/api/controllers/cloud.ts similarity index 64% rename from packages/server/src/api/controllers/cloud.js rename to packages/server/src/api/controllers/cloud.ts index 0a111eae83..7f29369bf2 100644 --- a/packages/server/src/api/controllers/cloud.js +++ b/packages/server/src/api/controllers/cloud.ts @@ -1,14 +1,15 @@ -const env = require("../../environment") -const { getAllApps, getGlobalDBName } = require("@budibase/backend-core/db") -const { getGlobalDB } = require("@budibase/backend-core/tenancy") -const { streamFile } = require("../../utilities/fileSystem") -const { stringToReadStream } = require("../../utilities") -const { getDocParams, DocumentType, isDevAppID } = require("../../db/utils") -const { create } = require("./application") -const { join } = require("path") -const sdk = require("../../sdk") +import env from "../../environment" +import { db as dbCore, tenancy } from "@budibase/backend-core" +import { streamFile } from "../../utilities/fileSystem" +import { stringToReadStream } from "../../utilities" +import { getDocParams, DocumentType, isDevAppID } from "../../db/utils" +import { create } from "./application" +import { join } from "path" +import { App, BBContext, Database } from "@budibase/types" +import sdk from "../../sdk" +import { getAllApps } from "@budibase/backend-core/src/db" -async function createApp(appName, appDirectory) { +async function createApp(appName: string, appDirectory: string) { const ctx = { request: { body: { @@ -25,7 +26,7 @@ async function createApp(appName, appDirectory) { return create(ctx) } -async function getAllDocType(db, docType) { +async function getAllDocType(db: Database, docType: string) { const response = await db.allDocs( getDocParams(docType, null, { include_docs: true, @@ -34,19 +35,19 @@ async function getAllDocType(db, docType) { return response.rows.map(row => row.doc) } -exports.exportApps = async ctx => { +export async function exportApps(ctx: BBContext) { if (env.SELF_HOSTED || !env.MULTI_TENANCY) { ctx.throw(400, "Exporting only allowed in multi-tenant cloud environments.") } - const apps = await getAllApps({ all: true }) - const globalDBString = await sdk.backups.exportDB(getGlobalDBName(), { - filter: doc => !doc._id.startsWith(DocumentType.USER), + const apps = (await getAllApps({ all: true })) as App[] + const globalDBString = await sdk.backups.exportDB(dbCore.getGlobalDBName(), { + filter: (doc: any) => !doc._id.startsWith(DocumentType.USER), }) // only export the dev apps as they will be the latest, the user can republish the apps // in their self-hosted environment let appMetadata = apps - .filter(app => isDevAppID(app.appId || app._id)) - .map(app => ({ appId: app.appId || app._id, name: app.name })) + .filter((app: App) => isDevAppID(app.appId || app._id)) + .map((app: App) => ({ appId: (app.appId || app._id)!, name: app.name })) const tmpPath = await sdk.backups.exportMultipleApps( appMetadata, globalDBString @@ -56,7 +57,7 @@ exports.exportApps = async ctx => { ctx.body = streamFile(tmpPath) } -async function hasBeenImported() { +async function checkHasBeenImported() { if (!env.SELF_HOSTED || env.MULTI_TENANCY) { return true } @@ -64,17 +65,17 @@ async function hasBeenImported() { return apps.length !== 0 } -exports.hasBeenImported = async ctx => { +export async function hasBeenImported(ctx: BBContext) { ctx.body = { - imported: await hasBeenImported(), + imported: await checkHasBeenImported(), } } -exports.importApps = async ctx => { +export async function importApps(ctx: BBContext) { if (!env.SELF_HOSTED || env.MULTI_TENANCY) { ctx.throw(400, "Importing only allowed in self hosted environments.") } - const beenImported = await hasBeenImported() + const beenImported = await checkHasBeenImported() if (beenImported || !ctx.request.files || !ctx.request.files.importFile) { ctx.throw( 400, @@ -90,7 +91,7 @@ exports.importApps = async ctx => { const globalDbImport = sdk.backups.getGlobalDBFile(tmpPath) const appNames = sdk.backups.getListOfAppsInMulti(tmpPath) - const globalDb = getGlobalDB() + const globalDb = tenancy.getGlobalDB() // load the global db first await globalDb.load(stringToReadStream(globalDbImport)) for (let appName of appNames) { diff --git a/packages/server/src/api/controllers/metadata.js b/packages/server/src/api/controllers/metadata.ts similarity index 55% rename from packages/server/src/api/controllers/metadata.js rename to packages/server/src/api/controllers/metadata.ts index e68db9b003..f579b14499 100644 --- a/packages/server/src/api/controllers/metadata.js +++ b/packages/server/src/api/controllers/metadata.ts @@ -1,15 +1,16 @@ -const { MetadataTypes } = require("../../constants") -const { generateMetadataID } = require("../../db/utils") -const { saveEntityMetadata, deleteEntityMetadata } = require("../../utilities") -const { getAppDB } = require("@budibase/backend-core/context") +import { MetadataTypes } from "../../constants" +import { generateMetadataID } from "../../db/utils" +import { saveEntityMetadata, deleteEntityMetadata } from "../../utilities" +import { context } from "@budibase/backend-core" +import { BBContext } from "@budibase/types" -exports.getTypes = async ctx => { +export async function getTypes(ctx: BBContext) { ctx.body = { types: MetadataTypes, } } -exports.saveMetadata = async ctx => { +export async function saveMetadata(ctx: BBContext) { const { type, entityId } = ctx.params if (type === MetadataTypes.AUTOMATION_TEST_HISTORY) { ctx.throw(400, "Cannot save automation history type") @@ -17,7 +18,7 @@ exports.saveMetadata = async ctx => { ctx.body = await saveEntityMetadata(type, entityId, ctx.request.body) } -exports.deleteMetadata = async ctx => { +export async function deleteMetadata(ctx: BBContext) { const { type, entityId } = ctx.params await deleteEntityMetadata(type, entityId) ctx.body = { @@ -25,13 +26,13 @@ exports.deleteMetadata = async ctx => { } } -exports.getMetadata = async ctx => { +export async function getMetadata(ctx: BBContext) { const { type, entityId } = ctx.params - const db = getAppDB() + const db = context.getAppDB() const id = generateMetadataID(type, entityId) try { ctx.body = await db.get(id) - } catch (err) { + } catch (err: any) { if (err.status === 404) { ctx.body = {} } else { diff --git a/packages/server/src/api/controllers/permission.js b/packages/server/src/api/controllers/permission.ts similarity index 64% rename from packages/server/src/api/controllers/permission.js rename to packages/server/src/api/controllers/permission.ts index e1547eb597..bf2a905b51 100644 --- a/packages/server/src/api/controllers/permission.js +++ b/packages/server/src/api/controllers/permission.ts @@ -1,18 +1,11 @@ -const { getBuiltinPermissions } = require("@budibase/backend-core/permissions") -const { - isBuiltin, - getDBRoleID, - getExternalRoleID, - getBuiltinRoles, - checkForRoleResourceArray, -} = require("@budibase/backend-core/roles") -const { getRoleParams } = require("../../db/utils") -const { +import { permissions, roles, context } from "@budibase/backend-core" +import { getRoleParams } from "../../db/utils" +import { CURRENTLY_SUPPORTED_LEVELS, getBasePermissions, -} = require("../../utilities/security") -const { removeFromArray } = require("../../utilities") -const { getAppDB } = require("@budibase/backend-core/context") +} from "../../utilities/security" +import { removeFromArray } from "../../utilities" +import { BBContext, Database, Role } from "@budibase/types" const PermissionUpdateType = { REMOVE: "remove", @@ -22,7 +15,7 @@ const PermissionUpdateType = { const SUPPORTED_LEVELS = CURRENTLY_SUPPORTED_LEVELS // utility function to stop this repetition - permissions always stored under roles -async function getAllDBRoles(db) { +async function getAllDBRoles(db: Database) { const body = await db.allDocs( getRoleParams(null, { include_docs: true, @@ -32,21 +25,25 @@ async function getAllDBRoles(db) { } async function updatePermissionOnRole( - appId, - { roleId, resourceId, level }, - updateType + appId: string, + { + roleId, + resourceId, + level, + }: { roleId: string; resourceId: string; level: string }, + updateType: string ) { - const db = getAppDB() + const db = context.getAppDB() const remove = updateType === PermissionUpdateType.REMOVE - const isABuiltin = isBuiltin(roleId) - const dbRoleId = getDBRoleID(roleId) + const isABuiltin = roles.isBuiltin(roleId) + const dbRoleId = roles.getDBRoleID(roleId) const dbRoles = await getAllDBRoles(db) const docUpdates = [] // the permission is for a built in, make sure it exists if (isABuiltin && !dbRoles.some(role => role._id === dbRoleId)) { - const builtin = getBuiltinRoles()[roleId] - builtin._id = getDBRoleID(builtin._id) + const builtin = roles.getBuiltinRoles()[roleId] + builtin._id = roles.getDBRoleID(builtin._id) dbRoles.push(builtin) } @@ -90,41 +87,44 @@ async function updatePermissionOnRole( } const response = await db.bulkDocs(docUpdates) - return response.map(resp => { - resp._id = getExternalRoleID(resp.id) + return response.map((resp: any) => { + resp._id = roles.getExternalRoleID(resp.id) delete resp.id return resp }) } -exports.fetchBuiltin = function (ctx) { - ctx.body = Object.values(getBuiltinPermissions()) +export function fetchBuiltin(ctx: BBContext) { + ctx.body = Object.values(permissions.getBuiltinPermissions()) } -exports.fetchLevels = function (ctx) { +export function fetchLevels(ctx: BBContext) { // for now only provide the read/write perms externally ctx.body = SUPPORTED_LEVELS } -exports.fetch = async function (ctx) { - const db = getAppDB() - const roles = await getAllDBRoles(db) - let permissions = {} +export async function fetch(ctx: BBContext) { + const db = context.getAppDB() + const dbRoles: Role[] = await getAllDBRoles(db) + let permissions: any = {} // create an object with structure role ID -> resource ID -> level - for (let role of roles) { + for (let role of dbRoles) { if (!role.permissions) { continue } - const roleId = getExternalRoleID(role._id) + const roleId = roles.getExternalRoleID(role._id) + if (!roleId) { + ctx.throw(400, "Unable to retrieve role") + } for (let [resource, levelArr] of Object.entries(role.permissions)) { - const levels = Array.isArray(levelArr) ? [levelArr] : levelArr - const perms = {} - levels.forEach(level => (perms[level] = roleId)) + const levels: string[] = Array.isArray(levelArr) ? levelArr : [levelArr] + const perms: Record = {} + levels.forEach(level => (perms[level] = roleId!)) permissions[resource] = perms } } // apply the base permissions - const finalPermissions = {} + const finalPermissions: Record> = {} for (let [resource, permission] of Object.entries(permissions)) { const basePerms = getBasePermissions(resource) finalPermissions[resource] = Object.assign(basePerms, permission) @@ -132,33 +132,36 @@ exports.fetch = async function (ctx) { ctx.body = finalPermissions } -exports.getResourcePerms = async function (ctx) { +export async function getResourcePerms(ctx: BBContext) { const resourceId = ctx.params.resourceId - const db = getAppDB() + const db = context.getAppDB() const body = await db.allDocs( getRoleParams(null, { include_docs: true, }) ) - const roles = body.rows.map(row => row.doc) - let permissions = {} + const rolesList = body.rows.map(row => row.doc) + let permissions: Record = {} for (let level of SUPPORTED_LEVELS) { // update the various roleIds in the resource permissions - for (let role of roles) { - const rolePerms = checkForRoleResourceArray(role.permissions, resourceId) + for (let role of rolesList) { + const rolePerms = roles.checkForRoleResourceArray( + role.permissions, + resourceId + ) if ( rolePerms && rolePerms[resourceId] && rolePerms[resourceId].indexOf(level) !== -1 ) { - permissions[level] = getExternalRoleID(role._id) + permissions[level] = roles.getExternalRoleID(role._id)! } } } ctx.body = Object.assign(getBasePermissions(resourceId), permissions) } -exports.addPermission = async function (ctx) { +export async function addPermission(ctx: BBContext) { ctx.body = await updatePermissionOnRole( ctx.appId, ctx.params, @@ -166,7 +169,7 @@ exports.addPermission = async function (ctx) { ) } -exports.removePermission = async function (ctx) { +export async function removePermission(ctx: BBContext) { ctx.body = await updatePermissionOnRole( ctx.appId, ctx.params, diff --git a/packages/server/src/api/controllers/query/import/index.ts b/packages/server/src/api/controllers/query/import/index.ts index 339775cbdc..4d62765974 100644 --- a/packages/server/src/api/controllers/query/import/index.ts +++ b/packages/server/src/api/controllers/query/import/index.ts @@ -5,8 +5,7 @@ import { OpenAPI2 } from "./sources/openapi2" import { OpenAPI3 } from "./sources/openapi3" import { Curl } from "./sources/curl" // @ts-ignore -import { getAppDB } from "@budibase/backend-core/context" -import { events } from "@budibase/backend-core" +import { events, context } from "@budibase/backend-core" import { Datasource, Query } from "@budibase/types" interface ImportResult { @@ -59,7 +58,7 @@ export class RestImporter { }) // persist queries - const db = getAppDB() + const db = context.getAppDB() const response = await db.bulkDocs(queries) // create index to seperate queries and errors diff --git a/packages/server/src/api/controllers/query/validation.js b/packages/server/src/api/controllers/query/validation.ts similarity index 79% rename from packages/server/src/api/controllers/query/validation.js rename to packages/server/src/api/controllers/query/validation.ts index 1279ebbe48..339035c945 100644 --- a/packages/server/src/api/controllers/query/validation.js +++ b/packages/server/src/api/controllers/query/validation.ts @@ -1,9 +1,9 @@ -const { joiValidator } = require("@budibase/backend-core/auth") -const Joi = require("joi") +import { auth } from "@budibase/backend-core" +import Joi from "joi" const OPTIONAL_STRING = Joi.string().optional().allow(null).allow("") -exports.queryValidation = () => { +export function queryValidation() { return Joi.object({ _id: Joi.string(), _rev: Joi.string(), @@ -25,14 +25,14 @@ exports.queryValidation = () => { }).unknown(true) } -exports.generateQueryValidation = () => { +export function generateQueryValidation() { // prettier-ignore - return joiValidator.body(exports.queryValidation()) + return auth.joiValidator.body(queryValidation()) } -exports.generateQueryPreviewValidation = () => { +export function generateQueryPreviewValidation() { // prettier-ignore - return joiValidator.body(Joi.object({ + return auth.joiValidator.body(Joi.object({ _id: OPTIONAL_STRING, _rev: OPTIONAL_STRING, readable: Joi.boolean().optional(), diff --git a/packages/server/src/api/controllers/role.js b/packages/server/src/api/controllers/role.ts similarity index 72% rename from packages/server/src/api/controllers/role.js rename to packages/server/src/api/controllers/role.ts index 9a406ad63f..77c8f8842b 100644 --- a/packages/server/src/api/controllers/role.js +++ b/packages/server/src/api/controllers/role.ts @@ -1,23 +1,21 @@ -const { - Role, - getRole, - isBuiltin, - getAllRoles, -} = require("@budibase/backend-core/roles") -const { +import { roles, context, events } from "@budibase/backend-core" +import { generateRoleID, getUserMetadataParams, InternalTables, -} = require("../../db/utils") -const { getAppDB } = require("@budibase/backend-core/context") -const { events } = require("@budibase/backend-core") +} from "../../db/utils" +import { BBContext, Database } from "@budibase/types" const UpdateRolesOptions = { CREATED: "created", REMOVED: "removed", } -async function updateRolesOnUserTable(db, roleId, updateOption) { +async function updateRolesOnUserTable( + db: Database, + roleId: string, + updateOption: string +) { const table = await db.get(InternalTables.USER_METADATA) const schema = table.schema const remove = updateOption === UpdateRolesOptions.REMOVED @@ -40,27 +38,25 @@ async function updateRolesOnUserTable(db, roleId, updateOption) { } } -exports.fetch = async function (ctx) { - ctx.body = await getAllRoles() +export async function fetch(ctx: BBContext) { + ctx.body = await roles.getAllRoles() } -exports.find = async function (ctx) { - ctx.body = await getRole(ctx.params.roleId) +export async function find(ctx: BBContext) { + ctx.body = await roles.getRole(ctx.params.roleId) } -exports.save = async function (ctx) { - const db = getAppDB() +export async function save(ctx: BBContext) { + const db = context.getAppDB() let { _id, name, inherits, permissionId } = ctx.request.body let isCreate = false if (!_id) { _id = generateRoleID() isCreate = true - } else if (isBuiltin(_id)) { + } else if (roles.isBuiltin(_id)) { ctx.throw(400, "Cannot update builtin roles.") } - const role = new Role(_id, name) - .addPermission(permissionId) - .addInheritance(inherits) + const role = new roles.Role(_id, name, permissionId).addInheritance(inherits) if (ctx.request.body._rev) { role._rev = ctx.request.body._rev } @@ -76,17 +72,17 @@ exports.save = async function (ctx) { ctx.message = `Role '${role.name}' created successfully.` } -exports.destroy = async function (ctx) { - const db = getAppDB() +export async function destroy(ctx: BBContext) { + const db = context.getAppDB() const roleId = ctx.params.roleId const role = await db.get(roleId) - if (isBuiltin(roleId)) { + if (roles.isBuiltin(roleId)) { ctx.throw(400, "Cannot delete builtin role.") } // first check no users actively attached to role const users = ( await db.allDocs( - getUserMetadataParams(null, { + getUserMetadataParams(undefined, { include_docs: true, }) ) diff --git a/packages/server/src/api/controllers/routing.js b/packages/server/src/api/controllers/routing.ts similarity index 52% rename from packages/server/src/api/controllers/routing.js rename to packages/server/src/api/controllers/routing.ts index d6ba9d6ac2..05ab35aea2 100644 --- a/packages/server/src/api/controllers/routing.js +++ b/packages/server/src/api/controllers/routing.ts @@ -1,40 +1,41 @@ -const { getRoutingInfo } = require("../../utilities/routing") -const { - getUserRoleHierarchy, - BUILTIN_ROLE_IDS, -} = require("@budibase/backend-core/roles") +import { getRoutingInfo } from "../../utilities/routing" +import { roles } from "@budibase/backend-core" +import { BBContext } from "@budibase/types" const URL_SEPARATOR = "/" -function Routing() { - this.json = {} -} - -Routing.prototype.getTopLevel = function (fullpath) { - if (fullpath.charAt(0) !== URL_SEPARATOR) { - fullpath = URL_SEPARATOR + fullpath +class Routing { + json: any + constructor() { + this.json = {} } - // replace the first value with the home route - return URL_SEPARATOR + fullpath.split(URL_SEPARATOR)[1] -} -Routing.prototype.getScreensProp = function (fullpath) { - const topLevel = this.getTopLevel(fullpath) - if (!this.json[topLevel]) { - this.json[topLevel] = { - subpaths: {}, + getTopLevel(fullpath: string) { + if (fullpath.charAt(0) !== URL_SEPARATOR) { + fullpath = URL_SEPARATOR + fullpath } + // replace the first value with the home route + return URL_SEPARATOR + fullpath.split(URL_SEPARATOR)[1] } - if (!this.json[topLevel].subpaths[fullpath]) { - this.json[topLevel].subpaths[fullpath] = { - screens: {}, - } - } - return this.json[topLevel].subpaths[fullpath].screens -} -Routing.prototype.addScreenId = function (fullpath, roleId, screenId) { - this.getScreensProp(fullpath)[roleId] = screenId + getScreensProp(fullpath: string) { + const topLevel = this.getTopLevel(fullpath) + if (!this.json[topLevel]) { + this.json[topLevel] = { + subpaths: {}, + } + } + if (!this.json[topLevel].subpaths[fullpath]) { + this.json[topLevel].subpaths[fullpath] = { + screens: {}, + } + } + return this.json[topLevel].subpaths[fullpath].screens + } + + addScreenId(fullpath: string, roleId: string, screenId: string) { + this.getScreensProp(fullpath)[roleId] = screenId + } } /** @@ -55,26 +56,28 @@ async function getRoutingStructure() { return { routes: routing.json } } -exports.fetch = async ctx => { +export async function fetch(ctx: BBContext) { ctx.body = await getRoutingStructure() } -exports.clientFetch = async ctx => { +export async function clientFetch(ctx: BBContext) { const routing = await getRoutingStructure() - let roleId = ctx.user.role._id - const roleIds = await getUserRoleHierarchy(roleId) - for (let topLevel of Object.values(routing.routes)) { + let roleId = ctx.user?.role?._id + const roleIds = (await roles.getUserRoleHierarchy(roleId, { + idOnly: true, + })) as string[] + for (let topLevel of Object.values(routing.routes) as any) { for (let subpathKey of Object.keys(topLevel.subpaths)) { let found = false const subpath = topLevel.subpaths[subpathKey] const roleOptions = Object.keys(subpath.screens) if (roleOptions.length === 1 && !roleOptions[0]) { subpath.screenId = subpath.screens[roleOptions[0]] - subpath.roleId = BUILTIN_ROLE_IDS.BASIC + subpath.roleId = roles.BUILTIN_ROLE_IDS.BASIC found = true } else { for (let roleId of roleIds) { - if (roleOptions.indexOf(roleId) !== -1) { + if (roleId && roleOptions.indexOf(roleId) !== -1) { subpath.screenId = subpath.screens[roleId] subpath.roleId = roleId found = true diff --git a/packages/server/src/api/controllers/view/exporters.js b/packages/server/src/api/controllers/view/exporters.ts similarity index 72% rename from packages/server/src/api/controllers/view/exporters.js rename to packages/server/src/api/controllers/view/exporters.ts index ec366753a5..eec6e69641 100644 --- a/packages/server/src/api/controllers/view/exporters.js +++ b/packages/server/src/api/controllers/view/exporters.ts @@ -1,4 +1,6 @@ -exports.csv = function (headers, rows) { +import { Row } from "@budibase/types" + +export function csv(headers: string[], rows: Row[]) { let csv = headers.map(key => `"${key}"`).join(",") for (let row of rows) { @@ -16,11 +18,11 @@ exports.csv = function (headers, rows) { return csv } -exports.json = function (headers, rows) { +export function json(headers: string[], rows: Row[]) { return JSON.stringify(rows, undefined, 2) } -exports.ExportFormats = { +export const ExportFormats = { CSV: "csv", JSON: "json", } diff --git a/packages/server/src/api/controllers/view/index.js b/packages/server/src/api/controllers/view/index.ts similarity index 73% rename from packages/server/src/api/controllers/view/index.js rename to packages/server/src/api/controllers/view/index.ts index 91657cfc21..17c3ee301d 100644 --- a/packages/server/src/api/controllers/view/index.js +++ b/packages/server/src/api/controllers/view/index.ts @@ -1,21 +1,29 @@ -const viewTemplate = require("./viewBuilder") -const { apiFileReturn } = require("../../../utilities/fileSystem") -const exporters = require("./exporters") -const { saveView, getView, getViews, deleteView } = require("./utils") -const { fetchView } = require("../row") -const { FieldTypes } = require("../../../constants") -const { getAppDB } = require("@budibase/backend-core/context") -const { events } = require("@budibase/backend-core") -const { DocumentType } = require("../../../db/utils") -const { cloneDeep, isEqual } = require("lodash") -const sdk = require("../../../sdk") +import viewTemplate from "./viewBuilder" +import { apiFileReturn } from "../../../utilities/fileSystem" +import * as exporters from "./exporters" +import { deleteView, getView, getViews, saveView } from "./utils" +import { fetchView } from "../row" +import { FieldTypes } from "../../../constants" +import { context, events } from "@budibase/backend-core" +import { DocumentType } from "../../../db/utils" +import sdk from "../../../sdk" +import { + BBContext, + Row, + Table, + TableExportFormat, + TableSchema, + View, +} from "@budibase/types" -exports.fetch = async ctx => { +const { cloneDeep, isEqual } = require("lodash") + +export async function fetch(ctx: BBContext) { ctx.body = await getViews() } -exports.save = async ctx => { - const db = getAppDB() +export async function save(ctx: BBContext) { + const db = context.getAppDB() const { originalName, ...viewToSave } = ctx.request.body const view = viewTemplate(viewToSave) const viewName = viewToSave.name @@ -47,7 +55,7 @@ exports.save = async ctx => { } } -const calculationEvents = async (existingView, newView) => { +export async function calculationEvents(existingView: View, newView: View) { const existingCalculation = existingView && existingView.calculation const newCalculation = newView && newView.calculation @@ -68,7 +76,7 @@ const calculationEvents = async (existingView, newView) => { } } -const filterEvents = async (existingView, newView) => { +export async function filterEvents(existingView: View, newView: View) { const hasExistingFilters = !!( existingView && existingView.filters && @@ -93,7 +101,7 @@ const filterEvents = async (existingView, newView) => { } } -const handleViewEvents = async (existingView, newView) => { +async function handleViewEvents(existingView: View, newView: View) { if (!existingView) { await events.view.created(newView) } else { @@ -103,8 +111,8 @@ const handleViewEvents = async (existingView, newView) => { await filterEvents(existingView, newView) } -exports.destroy = async ctx => { - const db = getAppDB() +export async function destroy(ctx: BBContext) { + const db = context.getAppDB() const viewName = decodeURI(ctx.params.viewName) const view = await deleteView(viewName) const table = await db.get(view.meta.tableId) @@ -115,11 +123,11 @@ exports.destroy = async ctx => { ctx.body = view } -exports.exportView = async ctx => { - const viewName = decodeURI(ctx.query.view) +export async function exportView(ctx: BBContext) { + const viewName = decodeURI(ctx.query.view as string) const view = await getView(viewName) - const format = ctx.query.format + const format = ctx.query.format as string if (!format || !Object.values(exporters.ExportFormats).includes(format)) { ctx.throw(400, "Format must be specified, either csv or json") } @@ -130,6 +138,7 @@ exports.exportView = async ctx => { ctx.query = { group: view.meta.groupBy, calculation: view.meta.calculation, + // @ts-ignore stats: !!view.meta.field, field: view.meta.field, } @@ -140,11 +149,11 @@ exports.exportView = async ctx => { } await fetchView(ctx) - let rows = ctx.body + let rows = ctx.body as Row[] - let schema = view && view.meta && view.meta.schema + let schema: TableSchema = view && view.meta && view.meta.schema const tableId = ctx.params.tableId || view.meta.tableId - const table = await sdk.tables.getTable(tableId) + const table: Table = await sdk.tables.getTable(tableId) if (!schema) { schema = table.schema } @@ -175,15 +184,15 @@ exports.exportView = async ctx => { // Export part let headers = Object.keys(schema) - const exporter = exporters[format] + const exporter = format === "csv" ? exporters.csv : exporters.json const filename = `${viewName}.${format}` // send down the file ctx.attachment(filename) ctx.body = apiFileReturn(exporter(headers, rows)) if (viewName.startsWith(DocumentType.TABLE)) { - await events.table.exported(table, format) + await events.table.exported(table, format as TableExportFormat) } else { - await events.view.exported(table, format) + await events.view.exported(table, format as TableExportFormat) } } diff --git a/packages/server/src/api/controllers/view/utils.js b/packages/server/src/api/controllers/view/utils.ts similarity index 76% rename from packages/server/src/api/controllers/view/utils.js rename to packages/server/src/api/controllers/view/utils.ts index 7ce7d324e4..7fa37e6c5d 100644 --- a/packages/server/src/api/controllers/view/utils.js +++ b/packages/server/src/api/controllers/view/utils.ts @@ -1,16 +1,17 @@ -const { +import { ViewName, generateMemoryViewID, getMemoryViewParams, DocumentType, SEPARATOR, -} = require("../../../db/utils") -const env = require("../../../environment") -const { getAppDB } = require("@budibase/backend-core/context") -const viewBuilder = require("./viewBuilder") +} from "../../../db/utils" +import env from "../../../environment" +import { context } from "@budibase/backend-core" +import viewBuilder from "./viewBuilder" +import { Database } from "@budibase/types" -exports.getView = async viewName => { - const db = getAppDB() +export async function getView(viewName: string) { + const db = context.getAppDB() if (env.SELF_HOSTED) { const designDoc = await db.get("_design/database") return designDoc.views[viewName] @@ -23,7 +24,7 @@ exports.getView = async viewName => { try { const viewDoc = await db.get(generateMemoryViewID(viewName)) return viewDoc.view - } catch (err) { + } catch (err: any) { // Return null when PouchDB doesn't found the view if (err.status === 404) { return null @@ -34,14 +35,15 @@ exports.getView = async viewName => { } } -exports.getViews = async () => { - const db = getAppDB() +export async function getViews() { + const db = context.getAppDB() const response = [] if (env.SELF_HOSTED) { const designDoc = await db.get("_design/database") for (let name of Object.keys(designDoc.views)) { // Only return custom views, not built ins - if (Object.values(ViewName).indexOf(name) !== -1) { + const viewNames = Object.values(ViewName) as string[] + if (viewNames.indexOf(name) !== -1) { continue } response.push({ @@ -67,8 +69,12 @@ exports.getViews = async () => { return response } -exports.saveView = async (originalName, viewName, viewTemplate) => { - const db = getAppDB() +export async function saveView( + originalName: string, + viewName: string, + viewTemplate: any +) { + const db = context.getAppDB() if (env.SELF_HOSTED) { const designDoc = await db.get("_design/database") designDoc.views = { @@ -83,7 +89,7 @@ exports.saveView = async (originalName, viewName, viewTemplate) => { } else { const id = generateMemoryViewID(viewName) const originalId = originalName ? generateMemoryViewID(originalName) : null - const viewDoc = { + const viewDoc: any = { _id: id, view: viewTemplate, name: viewName, @@ -105,8 +111,8 @@ exports.saveView = async (originalName, viewName, viewTemplate) => { } } -exports.deleteView = async viewName => { - const db = getAppDB() +export async function deleteView(viewName: string) { + const db = context.getAppDB() if (env.SELF_HOSTED) { const designDoc = await db.get("_design/database") const view = designDoc.views[viewName] @@ -121,7 +127,7 @@ exports.deleteView = async viewName => { } } -exports.migrateToInMemoryView = async (db, viewName) => { +export async function migrateToInMemoryView(db: Database, viewName: string) { // delete the view initially const designDoc = await db.get("_design/database") // run the view back through the view builder to update it @@ -131,7 +137,7 @@ exports.migrateToInMemoryView = async (db, viewName) => { await exports.saveView(db, null, viewName, view) } -exports.migrateToDesignView = async (db, viewName) => { +export async function migrateToDesignView(db: Database, viewName: string) { let view = await db.get(generateMemoryViewID(viewName)) const designDoc = await db.get("_design/database") designDoc.views[viewName] = viewBuilder(view.view.meta) @@ -139,7 +145,7 @@ exports.migrateToDesignView = async (db, viewName) => { await db.remove(view._id, view._rev) } -exports.getFromDesignDoc = async (db, viewName) => { +export async function getFromDesignDoc(db: Database, viewName: string) { const designDoc = await db.get("_design/database") let view = designDoc.views[viewName] if (view == null) { @@ -148,7 +154,7 @@ exports.getFromDesignDoc = async (db, viewName) => { return view } -exports.getFromMemoryDoc = async (db, viewName) => { +export async function getFromMemoryDoc(db: Database, viewName: string) { let view = await db.get(generateMemoryViewID(viewName)) if (view) { view = view.view diff --git a/packages/types/src/documents/app/automation.ts b/packages/types/src/documents/app/automation.ts index b53da956d4..d7450e4b0d 100644 --- a/packages/types/src/documents/app/automation.ts +++ b/packages/types/src/documents/app/automation.ts @@ -35,6 +35,7 @@ export interface Automation extends Document { trigger: AutomationTrigger } appId: string + live?: boolean name: string } diff --git a/packages/types/src/sdk/koa.ts b/packages/types/src/sdk/koa.ts index ffbb1cf053..3fe66b0786 100644 --- a/packages/types/src/sdk/koa.ts +++ b/packages/types/src/sdk/koa.ts @@ -14,6 +14,7 @@ export interface ContextUser extends Omit { export interface BBRequest extends Request { body: any + files?: any } export interface BBContext extends Context { From e8ebef0a915f25d6e9908a38c2b141196d53613f Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 22 Nov 2022 17:00:36 +0000 Subject: [PATCH 198/396] v2.1.32-alpha.4 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 8 ++++---- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/sdk/package.json | 2 +- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lerna.json b/lerna.json index 24172a05b0..48b80e9e6c 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.1.32-alpha.3", + "version": "2.1.32-alpha.4", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 6a54c16c89..4cfc5de3dc 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.1.32-alpha.3", + "version": "2.1.32-alpha.4", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "2.1.32-alpha.3", + "@budibase/types": "2.1.32-alpha.4", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index b619e85651..cafb9eb86b 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "2.1.32-alpha.3", + "version": "2.1.32-alpha.4", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "2.1.32-alpha.3", + "@budibase/string-templates": "2.1.32-alpha.4", "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/avatar": "^3.0.2", diff --git a/packages/builder/package.json b/packages/builder/package.json index 2e8367db1f..a87c871f76 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.1.32-alpha.3", + "version": "2.1.32-alpha.4", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.1.32-alpha.3", - "@budibase/client": "2.1.32-alpha.3", - "@budibase/frontend-core": "2.1.32-alpha.3", - "@budibase/string-templates": "2.1.32-alpha.3", + "@budibase/bbui": "2.1.32-alpha.4", + "@budibase/client": "2.1.32-alpha.4", + "@budibase/frontend-core": "2.1.32-alpha.4", + "@budibase/string-templates": "2.1.32-alpha.4", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index 45f269b1a3..3d3b615b90 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.1.32-alpha.3", + "version": "2.1.32-alpha.4", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "2.1.32-alpha.3", - "@budibase/string-templates": "2.1.32-alpha.3", - "@budibase/types": "2.1.32-alpha.3", + "@budibase/backend-core": "2.1.32-alpha.4", + "@budibase/string-templates": "2.1.32-alpha.4", + "@budibase/types": "2.1.32-alpha.4", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index 14ecbbf5d8..537709132d 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.1.32-alpha.3", + "version": "2.1.32-alpha.4", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "2.1.32-alpha.3", - "@budibase/frontend-core": "2.1.32-alpha.3", - "@budibase/string-templates": "2.1.32-alpha.3", + "@budibase/bbui": "2.1.32-alpha.4", + "@budibase/frontend-core": "2.1.32-alpha.4", + "@budibase/string-templates": "2.1.32-alpha.4", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index 5fa508f8c1..fe095fb45c 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.1.32-alpha.3", + "version": "2.1.32-alpha.4", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.1.32-alpha.3", + "@budibase/bbui": "2.1.32-alpha.4", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 9c1efd78f3..d4a54007e5 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.1.32-alpha.3", + "version": "2.1.32-alpha.4", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index 62b2395ad5..ce4470260a 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.1.32-alpha.3", + "version": "2.1.32-alpha.4", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -43,11 +43,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "2.1.32-alpha.3", - "@budibase/client": "2.1.32-alpha.3", + "@budibase/backend-core": "2.1.32-alpha.4", + "@budibase/client": "2.1.32-alpha.4", "@budibase/pro": "2.1.32-alpha.3", - "@budibase/string-templates": "2.1.32-alpha.3", - "@budibase/types": "2.1.32-alpha.3", + "@budibase/string-templates": "2.1.32-alpha.4", + "@budibase/types": "2.1.32-alpha.4", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index fd8fbbbeb1..6153b04363 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.1.32-alpha.3", + "version": "2.1.32-alpha.4", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index 2d689c56b7..7c9c389af8 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.1.32-alpha.3", + "version": "2.1.32-alpha.4", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index 3e41075cb8..11d8f63dc0 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.1.32-alpha.3", + "version": "2.1.32-alpha.4", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.1.32-alpha.3", + "@budibase/backend-core": "2.1.32-alpha.4", "@budibase/pro": "2.1.32-alpha.3", - "@budibase/string-templates": "2.1.32-alpha.3", - "@budibase/types": "2.1.32-alpha.3", + "@budibase/string-templates": "2.1.32-alpha.4", + "@budibase/types": "2.1.32-alpha.4", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From e7ce1660754c599c9565252a6eceabd42b145d56 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 22 Nov 2022 17:04:40 +0000 Subject: [PATCH 199/396] Update pro version to 2.1.32-alpha.4 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index ce4470260a..60af02db61 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -45,7 +45,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "2.1.32-alpha.4", "@budibase/client": "2.1.32-alpha.4", - "@budibase/pro": "2.1.32-alpha.3", + "@budibase/pro": "2.1.32-alpha.4", "@budibase/string-templates": "2.1.32-alpha.4", "@budibase/types": "2.1.32-alpha.4", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 9dddbe8ea3..ca7e080694 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1273,12 +1273,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.32-alpha.3": - version "2.1.32-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.32-alpha.3.tgz#d65f97f6c147e75aa83cfb4c22a5b3bd568bf62d" - integrity sha512-CSRn29z64bLEW3GLo6cTwpGjvTgIsfDOBwAiStEOlezzMNlDslvcOBCW0pQUo/0rf5C4zsTy4U1oHDElz7JJ2w== +"@budibase/backend-core@2.1.32-alpha.4": + version "2.1.32-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.32-alpha.4.tgz#f5ecc6a5348b61a4f8ebd3f6cd541d7892bc38bd" + integrity sha512-CbjK7fLWXjdHaFlLnmrUE+zEpltgdWzA+sfT9WrKAWlyrI18/0Hs5E5Q3s8NUk3slixktvs2Bs3nYDbTZj7coA== dependencies: - "@budibase/types" "2.1.32-alpha.3" + "@budibase/types" "2.1.32-alpha.4" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1361,13 +1361,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.1.32-alpha.3": - version "2.1.32-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.32-alpha.3.tgz#32d67f5fe3aa6a993022e685f55a298b4fc364b5" - integrity sha512-FwaWZLI8NVSH3Y4RcSvD1ySJXa5yWFgfGha5Zz5rvy3Tw3oSr/AfH91VW4ZLyzpuBQrMJHxLtDmaz3Ywd/jSkQ== +"@budibase/pro@2.1.32-alpha.4": + version "2.1.32-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.32-alpha.4.tgz#b760fe8e1cc2db64564d61c84b749a3555861be2" + integrity sha512-+D0YeIlylRu5VkBsEDhkNYLlsDGfEOZJ7c67liPPRSBfHNh8oyTMTptyqcyFYhemFNPjoyxBCzi1RIFCk8Eg2w== dependencies: - "@budibase/backend-core" "2.1.32-alpha.3" - "@budibase/types" "2.1.32-alpha.3" + "@budibase/backend-core" "2.1.32-alpha.4" + "@budibase/types" "2.1.32-alpha.4" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -1391,10 +1391,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.1.32-alpha.3": - version "2.1.32-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.32-alpha.3.tgz#87d53d7b5730f0067c1526a62f85afb13db82a51" - integrity sha512-4MGPfe63IKJMSS+4HdznyjEnExKGk1rMa2sfVOvRAZWzdVhgo5m0UarwoKf49lDF3NPiqTLdXQnB4p7AmwQbbg== +"@budibase/types@2.1.32-alpha.4": + version "2.1.32-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.32-alpha.4.tgz#47d25d028b4e9e5295e311a06bf801fbb14c98d7" + integrity sha512-ZwaPQVcOdoqaO7fr8mQ0hIfsjBFhsowu3Sv3/o3Z4qCdth6EZ8LnbeW1dQeQRRbqe3gNhaotfzgxwqbFxmtqzg== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 11d8f63dc0..f6d8d45c21 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "2.1.32-alpha.4", - "@budibase/pro": "2.1.32-alpha.3", + "@budibase/pro": "2.1.32-alpha.4", "@budibase/string-templates": "2.1.32-alpha.4", "@budibase/types": "2.1.32-alpha.4", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index ecc432d8e6..a1aa2dfcfc 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -470,12 +470,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.32-alpha.3": - version "2.1.32-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.32-alpha.3.tgz#d65f97f6c147e75aa83cfb4c22a5b3bd568bf62d" - integrity sha512-CSRn29z64bLEW3GLo6cTwpGjvTgIsfDOBwAiStEOlezzMNlDslvcOBCW0pQUo/0rf5C4zsTy4U1oHDElz7JJ2w== +"@budibase/backend-core@2.1.32-alpha.4": + version "2.1.32-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.32-alpha.4.tgz#f5ecc6a5348b61a4f8ebd3f6cd541d7892bc38bd" + integrity sha512-CbjK7fLWXjdHaFlLnmrUE+zEpltgdWzA+sfT9WrKAWlyrI18/0Hs5E5Q3s8NUk3slixktvs2Bs3nYDbTZj7coA== dependencies: - "@budibase/types" "2.1.32-alpha.3" + "@budibase/types" "2.1.32-alpha.4" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -508,22 +508,22 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.1.32-alpha.3": - version "2.1.32-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.32-alpha.3.tgz#32d67f5fe3aa6a993022e685f55a298b4fc364b5" - integrity sha512-FwaWZLI8NVSH3Y4RcSvD1ySJXa5yWFgfGha5Zz5rvy3Tw3oSr/AfH91VW4ZLyzpuBQrMJHxLtDmaz3Ywd/jSkQ== +"@budibase/pro@2.1.32-alpha.4": + version "2.1.32-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.32-alpha.4.tgz#b760fe8e1cc2db64564d61c84b749a3555861be2" + integrity sha512-+D0YeIlylRu5VkBsEDhkNYLlsDGfEOZJ7c67liPPRSBfHNh8oyTMTptyqcyFYhemFNPjoyxBCzi1RIFCk8Eg2w== dependencies: - "@budibase/backend-core" "2.1.32-alpha.3" - "@budibase/types" "2.1.32-alpha.3" + "@budibase/backend-core" "2.1.32-alpha.4" + "@budibase/types" "2.1.32-alpha.4" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.1.32-alpha.3": - version "2.1.32-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.32-alpha.3.tgz#87d53d7b5730f0067c1526a62f85afb13db82a51" - integrity sha512-4MGPfe63IKJMSS+4HdznyjEnExKGk1rMa2sfVOvRAZWzdVhgo5m0UarwoKf49lDF3NPiqTLdXQnB4p7AmwQbbg== +"@budibase/types@2.1.32-alpha.4": + version "2.1.32-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.32-alpha.4.tgz#47d25d028b4e9e5295e311a06bf801fbb14c98d7" + integrity sha512-ZwaPQVcOdoqaO7fr8mQ0hIfsjBFhsowu3Sv3/o3Z4qCdth6EZ8LnbeW1dQeQRRbqe3gNhaotfzgxwqbFxmtqzg== "@cspotcode/source-map-support@^0.8.0": version "0.8.1" From ed6a6ab8ce8643a05c3233300351f263262cb4a1 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 22 Nov 2022 18:49:19 +0000 Subject: [PATCH 200/396] Updating all of the route files to typescript, as well as some controllers. --- .../server/src/api/controllers/component.ts | 3 +- .../deploy/{Deployment.js => Deployment.ts} | 23 +-- .../src/api/controllers/plugin/index.ts | 9 +- .../api/controllers/row/ExternalRequest.ts | 12 +- .../{internalSearch.js => internalSearch.ts} | 160 ++++++++++-------- .../{staticFormula.js => staticFormula.ts} | 51 +++--- .../controllers/row/{utils.js => utils.ts} | 43 +++-- packages/server/src/api/controllers/screen.ts | 16 +- packages/server/src/api/controllers/script.js | 11 -- packages/server/src/api/controllers/script.ts | 12 ++ .../{templates.js => templates.ts} | 17 +- packages/server/src/api/routes/analytics.js | 9 - packages/server/src/api/routes/analytics.ts | 9 + packages/server/src/api/routes/apikeys.js | 12 -- packages/server/src/api/routes/apikeys.ts | 12 ++ packages/server/src/api/routes/application.ts | 24 ++- packages/server/src/api/routes/auth.ts | 2 +- packages/server/src/api/routes/automation.js | 85 ---------- packages/server/src/api/routes/automation.ts | 87 ++++++++++ packages/server/src/api/routes/backup.ts | 10 +- packages/server/src/api/routes/cloud.js | 14 -- packages/server/src/api/routes/cloud.ts | 18 ++ packages/server/src/api/routes/component.js | 14 -- packages/server/src/api/routes/component.ts | 14 ++ packages/server/src/api/routes/datasource.js | 51 ------ packages/server/src/api/routes/datasource.ts | 60 +++++++ packages/server/src/api/routes/deploy.ts | 2 +- packages/server/src/api/routes/dev.js | 26 --- packages/server/src/api/routes/dev.ts | 38 +++++ packages/server/src/api/routes/integration.js | 12 -- packages/server/src/api/routes/integration.ts | 16 ++ packages/server/src/api/routes/layout.js | 16 -- packages/server/src/api/routes/layout.ts | 16 ++ .../api/routes/{metadata.js => metadata.ts} | 26 +-- packages/server/src/api/routes/migrations.js | 14 -- packages/server/src/api/routes/migrations.ts | 14 ++ packages/server/src/api/routes/permission.js | 33 ---- packages/server/src/api/routes/permission.ts | 41 +++++ packages/server/src/api/routes/plugin.ts | 18 +- .../src/api/routes/{query.js => query.ts} | 37 ++-- packages/server/src/api/routes/role.js | 15 -- packages/server/src/api/routes/role.ts | 24 +++ packages/server/src/api/routes/routing.js | 14 -- packages/server/src/api/routes/routing.ts | 14 ++ packages/server/src/api/routes/row.ts | 6 +- packages/server/src/api/routes/screen.js | 18 -- packages/server/src/api/routes/screen.ts | 23 +++ packages/server/src/api/routes/script.js | 10 -- packages/server/src/api/routes/script.ts | 10 ++ packages/server/src/api/routes/static.ts | 9 +- .../src/api/routes/{table.js => table.ts} | 21 +-- packages/server/src/api/routes/templates.js | 16 -- packages/server/src/api/routes/templates.ts | 16 ++ .../src/api/routes/{user.js => user.ts} | 16 +- packages/server/src/api/routes/view.js | 31 ---- packages/server/src/api/routes/view.ts | 34 ++++ packages/server/src/api/routes/webhook.ts | 2 +- .../src/utilities/rowProcessor/index.ts | 6 +- .../src/utilities/rowProcessor/utils.ts | 15 +- 59 files changed, 748 insertions(+), 639 deletions(-) rename packages/server/src/api/controllers/deploy/{Deployment.js => Deployment.ts} (70%) rename packages/server/src/api/controllers/row/{internalSearch.js => internalSearch.ts} (76%) rename packages/server/src/api/controllers/row/{staticFormula.js => staticFormula.ts} (80%) rename packages/server/src/api/controllers/row/{utils.js => utils.ts} (75%) delete mode 100644 packages/server/src/api/controllers/script.js create mode 100644 packages/server/src/api/controllers/script.ts rename packages/server/src/api/controllers/{templates.js => templates.ts} (64%) delete mode 100644 packages/server/src/api/routes/analytics.js create mode 100644 packages/server/src/api/routes/analytics.ts delete mode 100644 packages/server/src/api/routes/apikeys.js create mode 100644 packages/server/src/api/routes/apikeys.ts delete mode 100644 packages/server/src/api/routes/automation.js create mode 100644 packages/server/src/api/routes/automation.ts delete mode 100644 packages/server/src/api/routes/cloud.js create mode 100644 packages/server/src/api/routes/cloud.ts delete mode 100644 packages/server/src/api/routes/component.js create mode 100644 packages/server/src/api/routes/component.ts delete mode 100644 packages/server/src/api/routes/datasource.js create mode 100644 packages/server/src/api/routes/datasource.ts delete mode 100644 packages/server/src/api/routes/dev.js create mode 100644 packages/server/src/api/routes/dev.ts delete mode 100644 packages/server/src/api/routes/integration.js create mode 100644 packages/server/src/api/routes/integration.ts delete mode 100644 packages/server/src/api/routes/layout.js create mode 100644 packages/server/src/api/routes/layout.ts rename packages/server/src/api/routes/{metadata.js => metadata.ts} (52%) delete mode 100644 packages/server/src/api/routes/migrations.js create mode 100644 packages/server/src/api/routes/migrations.ts delete mode 100644 packages/server/src/api/routes/permission.js create mode 100644 packages/server/src/api/routes/permission.ts rename packages/server/src/api/routes/{query.js => query.ts} (73%) delete mode 100644 packages/server/src/api/routes/role.js create mode 100644 packages/server/src/api/routes/role.ts delete mode 100644 packages/server/src/api/routes/routing.js create mode 100644 packages/server/src/api/routes/routing.ts delete mode 100644 packages/server/src/api/routes/screen.js create mode 100644 packages/server/src/api/routes/screen.ts delete mode 100644 packages/server/src/api/routes/script.js create mode 100644 packages/server/src/api/routes/script.ts rename packages/server/src/api/routes/{table.js => table.ts} (95%) delete mode 100644 packages/server/src/api/routes/templates.js create mode 100644 packages/server/src/api/routes/templates.ts rename packages/server/src/api/routes/{user.js => user.ts} (78%) delete mode 100644 packages/server/src/api/routes/view.js create mode 100644 packages/server/src/api/routes/view.ts diff --git a/packages/server/src/api/controllers/component.ts b/packages/server/src/api/controllers/component.ts index 6d65d43db6..9b196ca289 100644 --- a/packages/server/src/api/controllers/component.ts +++ b/packages/server/src/api/controllers/component.ts @@ -2,8 +2,9 @@ import { DocumentType } from "../../db/utils" import { Plugin } from "@budibase/types" import { db as dbCore, context, tenancy } from "@budibase/backend-core" import { getComponentLibraryManifest } from "../../utilities/fileSystem" +import { BBContext } from "@budibase/types" -exports.fetchAppComponentDefinitions = async function (ctx: any) { +export async function fetchAppComponentDefinitions(ctx: BBContext) { try { const db = context.getAppDB() const app = await db.get(DocumentType.APP_METADATA) diff --git a/packages/server/src/api/controllers/deploy/Deployment.js b/packages/server/src/api/controllers/deploy/Deployment.ts similarity index 70% rename from packages/server/src/api/controllers/deploy/Deployment.js rename to packages/server/src/api/controllers/deploy/Deployment.ts index 65cca97d07..765f22acc1 100644 --- a/packages/server/src/api/controllers/deploy/Deployment.js +++ b/packages/server/src/api/controllers/deploy/Deployment.ts @@ -1,15 +1,20 @@ -const newid = require("../../../db/newid") -const { getAppId } = require("@budibase/backend-core/context") +import newid from "../../../db/newid" +import { context } from "@budibase/backend-core" /** * This is used to pass around information about the deployment that is occurring */ -class Deployment { +export class Deployment { + _id: string + verification: any + status?: string + err?: any + constructor(id = null) { this._id = id || newid() } - setVerification(verification) { + setVerification(verification: any) { if (!verification) { return } @@ -20,14 +25,14 @@ class Deployment { return this.verification } - setStatus(status, err = null) { + setStatus(status: string, err?: any) { this.status = status if (err) { this.err = err } } - fromJSON(json) { + fromJSON(json: any) { if (json.verification) { this.setVerification(json.verification) } @@ -37,9 +42,9 @@ class Deployment { } getJSON() { - const obj = { + const obj: any = { _id: this._id, - appId: getAppId(), + appId: context.getAppId(), status: this.status, } if (this.err) { @@ -51,5 +56,3 @@ class Deployment { return obj } } - -module.exports = Deployment diff --git a/packages/server/src/api/controllers/plugin/index.ts b/packages/server/src/api/controllers/plugin/index.ts index 7d1b1291ab..907fcf65a6 100644 --- a/packages/server/src/api/controllers/plugin/index.ts +++ b/packages/server/src/api/controllers/plugin/index.ts @@ -1,6 +1,5 @@ import { npmUpload, urlUpload, githubUpload, fileUpload } from "./uploaders" -import { getGlobalDB } from "@budibase/backend-core/tenancy" -import { validate } from "@budibase/backend-core/plugins" +import { plugins as pluginCore, tenancy } from "@budibase/backend-core" import { PluginType, FileType, PluginSource } from "@budibase/types" import env from "../../../environment" import { ClientAppSocket } from "../../../websocket" @@ -8,7 +7,7 @@ import { db as dbCore } from "@budibase/backend-core" import { plugins } from "@budibase/pro" export async function getPlugins(type?: PluginType) { - const db = getGlobalDB() + const db = tenancy.getGlobalDB() const response = await db.allDocs( dbCore.getPluginParams(null, { include_docs: true, @@ -76,7 +75,7 @@ export async function create(ctx: any) { break } - validate(metadata?.schema) + pluginCore.validate(metadata?.schema) // Only allow components in cloud if (!env.SELF_HOSTED && metadata?.schema?.type !== PluginType.COMPONENT) { @@ -121,7 +120,7 @@ export async function processUploadedPlugin( source?: PluginSource ) { const { metadata, directory } = await fileUpload(plugin) - validate(metadata?.schema) + pluginCore.validate(metadata?.schema) // Only allow components in cloud if (!env.SELF_HOSTED && metadata?.schema?.type !== PluginType.COMPONENT) { diff --git a/packages/server/src/api/controllers/row/ExternalRequest.ts b/packages/server/src/api/controllers/row/ExternalRequest.ts index 852f124ee5..2ef7953437 100644 --- a/packages/server/src/api/controllers/row/ExternalRequest.ts +++ b/packages/server/src/api/controllers/row/ExternalRequest.ts @@ -27,12 +27,8 @@ import { breakExternalTableId, isSQL } from "../../../integrations/utils" import { processObjectSync } from "@budibase/string-templates" // @ts-ignore import { cloneDeep } from "lodash/fp" -import { - processFormulas, - processDates, -} from "../../../utilities/rowProcessor/utils" -// @ts-ignore -import { getAppDB } from "@budibase/backend-core/context" +import { processFormulas, processDates } from "../../../utilities/rowProcessor" +import { context } from "@budibase/backend-core" interface ManyRelationship { tableId?: string @@ -444,7 +440,7 @@ module External { // Process some additional data types let finalRowArray = Object.values(finalRows) finalRowArray = processDates(table, finalRowArray) - finalRowArray = processFormulas(table, finalRowArray) + finalRowArray = processFormulas(table, finalRowArray) as Row[] return finalRowArray.map((row: Row) => this.squashRelationshipColumns(table, row, relationships) @@ -673,7 +669,7 @@ module External { throw "Unable to run without a table name" } if (!this.datasource) { - const db = getAppDB() + const db = context.getAppDB() this.datasource = await db.get(datasourceId) if (!this.datasource || !this.datasource.entities) { throw "No tables found, fetch tables before query." diff --git a/packages/server/src/api/controllers/row/internalSearch.js b/packages/server/src/api/controllers/row/internalSearch.ts similarity index 76% rename from packages/server/src/api/controllers/row/internalSearch.js rename to packages/server/src/api/controllers/row/internalSearch.ts index 051a55aa9f..7068aabc5a 100644 --- a/packages/server/src/api/controllers/row/internalSearch.js +++ b/packages/server/src/api/controllers/row/internalSearch.ts @@ -1,15 +1,35 @@ -const { SearchIndexes } = require("../../../db/utils") -const { removeKeyNumbering } = require("./utils") -const fetch = require("node-fetch") -const { getCouchInfo } = require("@budibase/backend-core/db") -const { getAppId } = require("@budibase/backend-core/context") +import { SearchIndexes } from "../../../db/utils" +import { removeKeyNumbering } from "./utils" +import fetch from "node-fetch" +import { db as dbCore, context } from "@budibase/backend-core" +import { SearchFilters, Row } from "@budibase/types" + +type SearchParams = { + tableId: string + sort?: string + sortOrder?: string + sortType?: string + limit?: number + bookmark?: string + version?: string + rows?: Row[] +} /** * Class to build lucene query URLs. * Optionally takes a base lucene query object. */ -class QueryBuilder { - constructor(base) { +export class QueryBuilder { + query: SearchFilters + limit: number + sort?: string + bookmark?: string + sortOrder: string + sortType: string + includeDocs: boolean + version?: string + + constructor(base?: SearchFilters) { this.query = { allOr: false, string: {}, @@ -29,49 +49,52 @@ class QueryBuilder { this.sortOrder = "ascending" this.sortType = "string" this.includeDocs = true - this.version = null } - setVersion(version) { - this.version = version + setVersion(version?: string) { + if (version != null) { + this.version = version + } return this } - setTable(tableId) { - this.query.equal.tableId = tableId + setTable(tableId: string) { + this.query.equal!.tableId = tableId return this } - setLimit(limit) { + setLimit(limit?: number) { if (limit != null) { this.limit = limit } return this } - setSort(sort) { + setSort(sort?: string) { if (sort != null) { this.sort = sort } return this } - setSortOrder(sortOrder) { + setSortOrder(sortOrder?: string) { if (sortOrder != null) { this.sortOrder = sortOrder } return this } - setSortType(sortType) { + setSortType(sortType?: string) { if (sortType != null) { this.sortType = sortType } return this } - setBookmark(bookmark) { - this.bookmark = bookmark + setBookmark(bookmark?: string) { + if (bookmark != null) { + this.bookmark = bookmark + } return this } @@ -80,61 +103,61 @@ class QueryBuilder { return this } - addString(key, partial) { - this.query.string[key] = partial + addString(key: string, partial: string) { + this.query.string![key] = partial return this } - addFuzzy(key, fuzzy) { - this.query.fuzzy[key] = fuzzy + addFuzzy(key: string, fuzzy: string) { + this.query.fuzzy![key] = fuzzy return this } - addRange(key, low, high) { - this.query.range = { + addRange(key: string, low: string | number, high: string | number) { + this.query.range![key] = { low, high, } return this } - addEqual(key, value) { - this.query.equal[key] = value + addEqual(key: string, value: any) { + this.query.equal![key] = value return this } - addNotEqual(key, value) { - this.query.notEqual[key] = value + addNotEqual(key: string, value: any) { + this.query.notEqual![key] = value return this } - addEmpty(key, value) { - this.query.empty[key] = value + addEmpty(key: string, value: any) { + this.query.empty![key] = value return this } - addNotEmpty(key, value) { - this.query.notEmpty[key] = value + addNotEmpty(key: string, value: any) { + this.query.notEmpty![key] = value return this } - addOneOf(key, value) { - this.query.oneOf[key] = value + addOneOf(key: string, value: any) { + this.query.oneOf![key] = value return this } - addContains(key, value) { - this.query.contains[key] = value + addContains(key: string, value: any) { + this.query.contains![key] = value return this } - addNotContains(key, value) { - this.query.notContains[key] = value + addNotContains(key: string, value: any) { + this.query.notContains![key] = value return this } - addContainsAny(key, value) { - this.query.containsAny[key] = value + addContainsAny(key: string, value: any) { + this.query.containsAny![key] = value return this } @@ -145,7 +168,7 @@ class QueryBuilder { * @param options The preprocess options * @returns {string|*} */ - preprocess(value, { escape, lowercase, wrap, type } = {}) { + preprocess(value: any, { escape, lowercase, wrap, type }: any = {}) { const hasVersion = !!this.version // Determine if type needs wrapped const originalType = typeof value @@ -173,12 +196,12 @@ class QueryBuilder { let query = allOr ? "" : "*:*" const allPreProcessingOpts = { escape: true, lowercase: true, wrap: true } let tableId - if (this.query.equal.tableId) { - tableId = this.query.equal.tableId - delete this.query.equal.tableId + if (this.query.equal!.tableId) { + tableId = this.query.equal!.tableId + delete this.query.equal!.tableId } - const equal = (key, value) => { + const equal = (key: string, value: any) => { // 0 evaluates to false, which means we would return all rows if we don't check it if (!value && value !== 0) { return null @@ -186,7 +209,7 @@ class QueryBuilder { return `${key}:${builder.preprocess(value, allPreProcessingOpts)}` } - const contains = (key, value, mode = "AND") => { + const contains = (key: string, value: any, mode = "AND") => { if (Array.isArray(value) && value.length === 0) { return null } @@ -202,16 +225,17 @@ class QueryBuilder { return `${key}:(${statement})` } - const notContains = (key, value) => { + const notContains = (key: string, value: any) => { + // @ts-ignore const allPrefix = allOr === "" ? "*:* AND" : "" return allPrefix + "NOT " + contains(key, value) } - const containsAny = (key, value) => { + const containsAny = (key: string, value: any) => { return contains(key, value, "OR") } - const oneOf = (key, value) => { + const oneOf = (key: string, value: any) => { if (!Array.isArray(value)) { if (typeof value === "string") { value = value.split(",") @@ -229,7 +253,7 @@ class QueryBuilder { return `${key}:(${orStatement})` } - function build(structure, queryFn) { + function build(structure: any, queryFn: any) { for (let [key, value] of Object.entries(structure)) { // check for new format - remove numbering if needed key = removeKeyNumbering(key) @@ -249,7 +273,7 @@ class QueryBuilder { // Construct the actual lucene search query string from JSON structure if (this.query.string) { - build(this.query.string, (key, value) => { + build(this.query.string, (key: string, value: any) => { if (!value) { return null } @@ -262,7 +286,7 @@ class QueryBuilder { }) } if (this.query.range) { - build(this.query.range, (key, value) => { + build(this.query.range, (key: string, value: any) => { if (!value) { return null } @@ -278,7 +302,7 @@ class QueryBuilder { }) } if (this.query.fuzzy) { - build(this.query.fuzzy, (key, value) => { + build(this.query.fuzzy, (key: string, value: any) => { if (!value) { return null } @@ -294,7 +318,7 @@ class QueryBuilder { build(this.query.equal, equal) } if (this.query.notEqual) { - build(this.query.notEqual, (key, value) => { + build(this.query.notEqual, (key: string, value: any) => { if (!value) { return null } @@ -302,10 +326,10 @@ class QueryBuilder { }) } if (this.query.empty) { - build(this.query.empty, key => `!${key}:["" TO *]`) + build(this.query.empty, (key: string) => `!${key}:["" TO *]`) } if (this.query.notEmpty) { - build(this.query.notEmpty, key => `${key}:["" TO *]`) + build(this.query.notEmpty, (key: string) => `${key}:["" TO *]`) } if (this.query.oneOf) { build(this.query.oneOf, oneOf) @@ -329,7 +353,7 @@ class QueryBuilder { } buildSearchBody() { - let body = { + let body: any = { q: this.buildSearchQuery(), limit: Math.min(this.limit, 200), include_docs: this.includeDocs, @@ -346,17 +370,14 @@ class QueryBuilder { } async run() { - const appId = getAppId() - const { url, cookie } = getCouchInfo() + const appId = context.getAppId() + const { url, cookie } = dbCore.getCouchInfo() const fullPath = `${url}/${appId}/_design/database/_search/${SearchIndexes.ROWS}` const body = this.buildSearchBody() return await runQuery(fullPath, body, cookie) } } -// exported for unit testing -exports.QueryBuilder = QueryBuilder - /** * Executes a lucene search query. * @param url The query URL @@ -364,7 +385,7 @@ exports.QueryBuilder = QueryBuilder * @param cookie The auth cookie for CouchDB * @returns {Promise<{rows: []}>} */ -const runQuery = async (url, body, cookie) => { +const runQuery = async (url: string, body: any, cookie: string) => { const response = await fetch(url, { body: JSON.stringify(body), method: "POST", @@ -374,11 +395,11 @@ const runQuery = async (url, body, cookie) => { }) const json = await response.json() - let output = { + let output: any = { rows: [], } if (json.rows != null && json.rows.length > 0) { - output.rows = json.rows.map(row => row.doc) + output.rows = json.rows.map((row: any) => row.doc) } if (json.bookmark) { output.bookmark = json.bookmark @@ -402,7 +423,7 @@ const runQuery = async (url, body, cookie) => { * rows {array|null} Current results in the recursive search * @returns {Promise<*[]|*>} */ -const recursiveSearch = async (query, params) => { +async function recursiveSearch(query: any, params: any): Promise { const bookmark = params.bookmark const rows = params.rows || [] if (rows.length >= params.limit) { @@ -450,7 +471,10 @@ const recursiveSearch = async (query, params) => { * bookmark {string} The bookmark to resume from * @returns {Promise<{hasNextPage: boolean, rows: *[]}>} */ -exports.paginatedSearch = async (query, params) => { +export async function paginatedSearch( + query: SearchFilters, + params: SearchParams +) { let limit = params.limit if (limit == null || isNaN(limit) || limit < 0) { limit = 50 @@ -496,7 +520,7 @@ exports.paginatedSearch = async (query, params) => { * limit {number} The desired number of results * @returns {Promise<{rows: *}>} */ -exports.fullSearch = async (query, params) => { +export async function fullSearch(query: SearchFilters, params: SearchParams) { let limit = params.limit if (limit == null || isNaN(limit) || limit < 0) { limit = 1000 diff --git a/packages/server/src/api/controllers/row/staticFormula.js b/packages/server/src/api/controllers/row/staticFormula.ts similarity index 80% rename from packages/server/src/api/controllers/row/staticFormula.js rename to packages/server/src/api/controllers/row/staticFormula.ts index 2de3ae0e4f..ee09264af1 100644 --- a/packages/server/src/api/controllers/row/staticFormula.js +++ b/packages/server/src/api/controllers/row/staticFormula.ts @@ -1,13 +1,14 @@ -const { getRowParams } = require("../../../db/utils") -const { +import { getRowParams } from "../../../db/utils" +import { outputProcessing, processAutoColumn, processFormulas, -} = require("../../../utilities/rowProcessor") -const { FieldTypes, FormulaTypes } = require("../../../constants") +} from "../../../utilities/rowProcessor" +import { FieldTypes, FormulaTypes } from "../../../constants" +import { context } from "@budibase/backend-core" +import { Table, Row } from "@budibase/types" const { isEqual } = require("lodash") const { cloneDeep } = require("lodash/fp") -const { getAppDB } = require("@budibase/backend-core/context") /** * This function runs through a list of enriched rows, looks at the rows which @@ -15,22 +16,22 @@ const { getAppDB } = require("@budibase/backend-core/context") * updated. * NOTE: this will only for affect static formulas. */ -exports.updateRelatedFormula = async (table, enrichedRows) => { - const db = getAppDB() +exports.updateRelatedFormula = async (table: Table, enrichedRows: Row[]) => { + const db = context.getAppDB() // no formula to update, we're done if (!table.relatedFormula) { return } - let promises = [] + let promises: Promise[] = [] for (let enrichedRow of Array.isArray(enrichedRows) ? enrichedRows : [enrichedRows]) { // the related rows by tableId - let relatedRows = {} + let relatedRows: Record = {} for (let [key, field] of Object.entries(enrichedRow)) { const columnDefinition = table.schema[key] if (columnDefinition && columnDefinition.type === FieldTypes.LINK) { - const relatedTableId = columnDefinition.tableId + const relatedTableId = columnDefinition.tableId! if (!relatedRows[relatedTableId]) { relatedRows[relatedTableId] = [] } @@ -38,7 +39,7 @@ exports.updateRelatedFormula = async (table, enrichedRows) => { } } for (let tableId of table.relatedFormula) { - let relatedTable + let relatedTable: Table try { // no rows to update, skip if (!relatedRows[tableId] || relatedRows[tableId].length === 0) { @@ -48,7 +49,7 @@ exports.updateRelatedFormula = async (table, enrichedRows) => { } catch (err) { // no error scenario, table doesn't seem to exist anymore, ignore } - for (let column of Object.values(relatedTable.schema)) { + for (let column of Object.values(relatedTable!.schema)) { // needs updated in related rows if ( column.type === FieldTypes.FORMULA && @@ -57,7 +58,7 @@ exports.updateRelatedFormula = async (table, enrichedRows) => { // re-enrich rows for all the related, don't update the related formula for them promises = promises.concat( relatedRows[tableId].map(related => - exports.finaliseRow(relatedTable, related, { + finaliseRow(relatedTable, related, { updateFormula: false, }) ) @@ -70,8 +71,8 @@ exports.updateRelatedFormula = async (table, enrichedRows) => { await Promise.all(promises) } -exports.updateAllFormulasInTable = async table => { - const db = getAppDB() +export async function updateAllFormulasInTable(table: Table) { + const db = context.getAppDB() // start by getting the raw rows (which will be written back to DB after update) let rows = ( await db.allDocs( @@ -88,7 +89,9 @@ exports.updateAllFormulasInTable = async table => { const updatedRows = [] for (let row of rows) { // find the enriched row, if found process the formulas - const enrichedRow = enrichedRows.find(enriched => enriched._id === row._id) + const enrichedRow = enrichedRows.find( + (enriched: any) => enriched._id === row._id + ) if (enrichedRow) { const processed = processFormulas(table, cloneDeep(row), { dynamic: false, @@ -109,12 +112,14 @@ exports.updateAllFormulasInTable = async table => { * row. The reason we need to return the enriched row is that the automation row created trigger * expects the row to be totally enriched/contain all relationships. */ -exports.finaliseRow = async ( - table, - row, - { oldTable, updateFormula } = { updateFormula: true } -) => { - const db = getAppDB() +export async function finaliseRow( + table: Table, + row: Row, + { oldTable, updateFormula }: { oldTable?: Table; updateFormula: boolean } = { + updateFormula: true, + } +) { + const db = context.getAppDB() row.type = "row" // process the row before return, to include relationships let enrichedRow = await outputProcessing(table, cloneDeep(row), { @@ -131,7 +136,7 @@ exports.finaliseRow = async ( if (oldTable && !isEqual(oldTable, table)) { try { await db.put(table) - } catch (err) { + } catch (err: any) { if (err.status === 409) { const updatedTable = await db.get(table._id) let response = processAutoColumn(null, updatedTable, row, { diff --git a/packages/server/src/api/controllers/row/utils.js b/packages/server/src/api/controllers/row/utils.ts similarity index 75% rename from packages/server/src/api/controllers/row/utils.js rename to packages/server/src/api/controllers/row/utils.ts index ca2ad02a30..eea80a3cd8 100644 --- a/packages/server/src/api/controllers/row/utils.js +++ b/packages/server/src/api/controllers/row/utils.ts @@ -1,33 +1,32 @@ +import { InternalTables } from "../../../db/utils" +import userController from "../user" +import { FieldTypes } from "../../../constants" +import { context } from "@budibase/backend-core" +import { makeExternalQuery } from "../../../integrations/base/query" +import { BBContext, Row, Table } from "@budibase/types" +export { removeKeyNumbering } from "../../../integrations/base/utils" const validateJs = require("validate.js") const { cloneDeep } = require("lodash/fp") -const { InternalTables } = require("../../../db/utils") -const userController = require("../user") -const { FieldTypes } = require("../../../constants") -const { getAppDB } = require("@budibase/backend-core/context") -const { makeExternalQuery } = require("../../../integrations/base/query") -const { removeKeyNumbering } = require("../../../integrations/base/utils") validateJs.extend(validateJs.validators.datetime, { - parse: function (value) { + parse: function (value: string) { return new Date(value).getTime() }, // Input is a unix timestamp - format: function (value) { + format: function (value: string) { return new Date(value).toISOString() }, }) -exports.removeKeyNumbering = removeKeyNumbering - -exports.getDatasourceAndQuery = async json => { +export async function getDatasourceAndQuery(json: any) { const datasourceId = json.endpoint.datasourceId - const db = getAppDB() + const db = context.getAppDB() const datasource = await db.get(datasourceId) return makeExternalQuery(datasource, json) } -exports.findRow = async (ctx, tableId, rowId) => { - const db = getAppDB() +export async function findRow(ctx: BBContext, tableId: string, rowId: string) { + const db = context.getAppDB() let row // TODO remove special user case in future if (tableId === InternalTables.USER_METADATA) { @@ -45,12 +44,20 @@ exports.findRow = async (ctx, tableId, rowId) => { return row } -exports.validate = async ({ tableId, row, table }) => { +export async function validate({ + tableId, + row, + table, +}: { + tableId?: string + row: Row + table: Table +}) { if (!table) { - const db = getAppDB() + const db = context.getAppDB() table = await db.get(tableId) } - const errors = {} + const errors: any = {} for (let fieldName of Object.keys(table.schema)) { const constraints = cloneDeep(table.schema[fieldName].constraints) const type = table.schema[fieldName].type @@ -70,7 +77,7 @@ exports.validate = async ({ tableId, row, table }) => { if (!Array.isArray(row[fieldName])) { row[fieldName] = row[fieldName].split(",") } - row[fieldName].map(val => { + row[fieldName].map((val: any) => { if ( !constraints.inclusion.includes(val) && constraints.inclusion.length !== 0 diff --git a/packages/server/src/api/controllers/screen.ts b/packages/server/src/api/controllers/screen.ts index 08040351dd..9cbd019d6e 100644 --- a/packages/server/src/api/controllers/screen.ts +++ b/packages/server/src/api/controllers/screen.ts @@ -7,9 +7,9 @@ import { roles, } from "@budibase/backend-core" import { updateAppPackage } from "./application" -import { Plugin, ScreenProps } from "@budibase/types" +import { Plugin, ScreenProps, BBContext } from "@budibase/types" -exports.fetch = async (ctx: any) => { +export async function fetch(ctx: BBContext) { const db = context.getAppDB() const screens = ( @@ -20,13 +20,17 @@ exports.fetch = async (ctx: any) => { ) ).rows.map((el: any) => el.doc) + const roleId = ctx.user?.role?._id as string + if (!roleId) { + ctx.throw("Unable to retrieve users role ID.") + } ctx.body = await new roles.AccessController().checkScreensAccess( screens, - ctx.user.role._id + roleId ) } -exports.save = async (ctx: any) => { +export async function save(ctx: BBContext) { const db = context.getAppDB() let screen = ctx.request.body @@ -92,7 +96,7 @@ exports.save = async (ctx: any) => { } } -exports.destroy = async (ctx: any) => { +export async function destroy(ctx: BBContext) { const db = context.getAppDB() const id = ctx.params.screenId const screen = await db.get(id) @@ -106,7 +110,7 @@ exports.destroy = async (ctx: any) => { ctx.status = 200 } -const findPlugins = (component: ScreenProps, foundPlugins: string[]) => { +function findPlugins(component: ScreenProps, foundPlugins: string[]) { if (!component) { return } diff --git a/packages/server/src/api/controllers/script.js b/packages/server/src/api/controllers/script.js deleted file mode 100644 index 38211ebee7..0000000000 --- a/packages/server/src/api/controllers/script.js +++ /dev/null @@ -1,11 +0,0 @@ -const ScriptRunner = require("../../utilities/scriptRunner") - -exports.execute = async function (ctx) { - const { script, context } = ctx.request.body - const runner = new ScriptRunner(script, context) - ctx.body = runner.execute() -} - -exports.save = async function (ctx) { - ctx.throw(501, "Not currently implemented") -} diff --git a/packages/server/src/api/controllers/script.ts b/packages/server/src/api/controllers/script.ts new file mode 100644 index 0000000000..8af339b0b5 --- /dev/null +++ b/packages/server/src/api/controllers/script.ts @@ -0,0 +1,12 @@ +import ScriptRunner from "../../utilities/scriptRunner" +import { BBContext } from "@budibase/types" + +export async function execute(ctx: BBContext) { + const { script, context } = ctx.request.body + const runner = new ScriptRunner(script, context) + ctx.body = runner.execute() +} + +export async function save(ctx: BBContext) { + ctx.throw(501, "Not currently implemented") +} diff --git a/packages/server/src/api/controllers/templates.js b/packages/server/src/api/controllers/templates.ts similarity index 64% rename from packages/server/src/api/controllers/templates.js rename to packages/server/src/api/controllers/templates.ts index 3a1cafdf5a..6774fa2766 100644 --- a/packages/server/src/api/controllers/templates.js +++ b/packages/server/src/api/controllers/templates.ts @@ -1,17 +1,20 @@ -const fetch = require("node-fetch") -const { downloadTemplate } = require("../../utilities/fileSystem") -const env = require("../../environment") +import nodeFetch from "node-fetch" +import { downloadTemplate as dlTemplate } from "../../utilities/fileSystem" +import env from "../../environment" +import { BBContext } from "@budibase/types" // development flag, can be used to test against templates exported locally const DEFAULT_TEMPLATES_BUCKET = "prod-budi-templates.s3-eu-west-1.amazonaws.com" -exports.fetch = async function (ctx) { +export async function fetch(ctx: BBContext) { let type = env.TEMPLATE_REPOSITORY let response, error = false try { - response = await fetch(`https://${DEFAULT_TEMPLATES_BUCKET}/manifest.json`) + response = await nodeFetch( + `https://${DEFAULT_TEMPLATES_BUCKET}/manifest.json` + ) if (response.status !== 200) { error = true } @@ -29,10 +32,10 @@ exports.fetch = async function (ctx) { // can't currently test this, have to ignore from coverage /* istanbul ignore next */ -exports.downloadTemplate = async function (ctx) { +export async function downloadTemplate(ctx: BBContext) { const { type, name } = ctx.params - await downloadTemplate(type, name) + await dlTemplate(type, name) ctx.body = { message: `template ${type}:${name} downloaded successfully.`, diff --git a/packages/server/src/api/routes/analytics.js b/packages/server/src/api/routes/analytics.js deleted file mode 100644 index 610d6d0c7f..0000000000 --- a/packages/server/src/api/routes/analytics.js +++ /dev/null @@ -1,9 +0,0 @@ -const Router = require("@koa/router") -const controller = require("../controllers/analytics") - -const router = new Router() - -router.get("/api/bbtel", controller.isEnabled) -router.post("/api/bbtel/ping", controller.ping) - -module.exports = router diff --git a/packages/server/src/api/routes/analytics.ts b/packages/server/src/api/routes/analytics.ts new file mode 100644 index 0000000000..87dcb73eab --- /dev/null +++ b/packages/server/src/api/routes/analytics.ts @@ -0,0 +1,9 @@ +import Router from "@koa/router" +import * as controller from "../controllers/analytics" + +const router: Router = new Router() + +router.get("/api/bbtel", controller.isEnabled) +router.post("/api/bbtel/ping", controller.ping) + +export = router diff --git a/packages/server/src/api/routes/apikeys.js b/packages/server/src/api/routes/apikeys.js deleted file mode 100644 index ddbd35c23c..0000000000 --- a/packages/server/src/api/routes/apikeys.js +++ /dev/null @@ -1,12 +0,0 @@ -const Router = require("@koa/router") -const controller = require("../controllers/apikeys") -const authorized = require("../../middleware/authorized") -const { BUILDER } = require("@budibase/backend-core/permissions") - -const router = new Router() - -router - .get("/api/keys", authorized(BUILDER), controller.fetch) - .put("/api/keys/:key", authorized(BUILDER), controller.update) - -module.exports = router diff --git a/packages/server/src/api/routes/apikeys.ts b/packages/server/src/api/routes/apikeys.ts new file mode 100644 index 0000000000..3afa1a0950 --- /dev/null +++ b/packages/server/src/api/routes/apikeys.ts @@ -0,0 +1,12 @@ +import Router from "@koa/router" +import * as controller from "../controllers/apikeys" +import authorized from "../../middleware/authorized" +import { permissions } from "@budibase/backend-core" + +const router: Router = new Router() + +router + .get("/api/keys", authorized(permissions.BUILDER), controller.fetch) + .put("/api/keys/:key", authorized(permissions.BUILDER), controller.update) + +export = router diff --git a/packages/server/src/api/routes/application.ts b/packages/server/src/api/routes/application.ts index 38d857ac8d..486953ea8b 100644 --- a/packages/server/src/api/routes/application.ts +++ b/packages/server/src/api/routes/application.ts @@ -1,16 +1,20 @@ import Router from "@koa/router" import * as controller from "../controllers/application" import authorized from "../../middleware/authorized" -import { BUILDER } from "@budibase/backend-core/permissions" +import { permissions } from "@budibase/backend-core" import { applicationValidator } from "./utils/validators" const router: Router = new Router() router - .post("/api/applications/:appId/sync", authorized(BUILDER), controller.sync) + .post( + "/api/applications/:appId/sync", + authorized(permissions.BUILDER), + controller.sync + ) .post( "/api/applications", - authorized(BUILDER), + authorized(permissions.BUILDER), applicationValidator(), controller.create ) @@ -19,20 +23,24 @@ router .get("/api/applications/:appId/appPackage", controller.fetchAppPackage) .put( "/api/applications/:appId", - authorized(BUILDER), + authorized(permissions.BUILDER), applicationValidator({ isCreate: false }), controller.update ) .post( "/api/applications/:appId/client/update", - authorized(BUILDER), + authorized(permissions.BUILDER), controller.updateClient ) .post( "/api/applications/:appId/client/revert", - authorized(BUILDER), + authorized(permissions.BUILDER), controller.revertClient ) - .delete("/api/applications/:appId", authorized(BUILDER), controller.destroy) + .delete( + "/api/applications/:appId", + authorized(permissions.BUILDER), + controller.destroy + ) -export default router +export = router diff --git a/packages/server/src/api/routes/auth.ts b/packages/server/src/api/routes/auth.ts index c4e65a4c25..3b2aaca79e 100644 --- a/packages/server/src/api/routes/auth.ts +++ b/packages/server/src/api/routes/auth.ts @@ -5,4 +5,4 @@ const router: Router = new Router() router.get("/api/self", controller.fetchSelf) -export default router +export = router diff --git a/packages/server/src/api/routes/automation.js b/packages/server/src/api/routes/automation.js deleted file mode 100644 index 544d94abb2..0000000000 --- a/packages/server/src/api/routes/automation.js +++ /dev/null @@ -1,85 +0,0 @@ -const Router = require("@koa/router") -const controller = require("../controllers/automation") -const authorized = require("../../middleware/authorized") -const { - BUILDER, - PermissionLevel, - PermissionType, -} = require("@budibase/backend-core/permissions") -const { bodyResource, paramResource } = require("../../middleware/resourceId") -const { - middleware: appInfoMiddleware, - AppType, -} = require("../../middleware/appInfo") -const { automationValidator } = require("./utils/validators") - -const router = new Router() - -router - .get( - "/api/automations/trigger/list", - authorized(BUILDER), - controller.getTriggerList - ) - .get( - "/api/automations/action/list", - authorized(BUILDER), - controller.getActionList - ) - .get( - "/api/automations/definitions/list", - authorized(BUILDER), - controller.getDefinitionList - ) - .get("/api/automations", authorized(BUILDER), controller.fetch) - .get( - "/api/automations/:id", - paramResource("id"), - authorized(BUILDER), - controller.find - ) - .put( - "/api/automations", - bodyResource("_id"), - authorized(BUILDER), - automationValidator(true), - controller.update - ) - .post( - "/api/automations", - authorized(BUILDER), - automationValidator(false), - controller.create - ) - .post( - "/api/automations/logs/search", - authorized(BUILDER), - controller.logSearch - ) - .delete( - "/api/automations/logs", - authorized(BUILDER), - controller.clearLogError - ) - .delete( - "/api/automations/:id/:rev", - paramResource("id"), - authorized(BUILDER), - controller.destroy - ) - .post( - "/api/automations/:id/trigger", - appInfoMiddleware({ appType: AppType.PROD }), - paramResource("id"), - authorized(PermissionType.AUTOMATION, PermissionLevel.EXECUTE), - controller.trigger - ) - .post( - "/api/automations/:id/test", - appInfoMiddleware({ appType: AppType.DEV }), - paramResource("id"), - authorized(PermissionType.AUTOMATION, PermissionLevel.EXECUTE), - controller.test - ) - -module.exports = router diff --git a/packages/server/src/api/routes/automation.ts b/packages/server/src/api/routes/automation.ts new file mode 100644 index 0000000000..1beb8e7d76 --- /dev/null +++ b/packages/server/src/api/routes/automation.ts @@ -0,0 +1,87 @@ +import Router from "@koa/router" +import * as controller from "../controllers/automation" +import authorized from "../../middleware/authorized" +import { permissions } from "@budibase/backend-core" +import { bodyResource, paramResource } from "../../middleware/resourceId" +import { + middleware as appInfoMiddleware, + AppType, +} from "../../middleware/appInfo" +import { automationValidator } from "./utils/validators" + +const router: Router = new Router() + +router + .get( + "/api/automations/trigger/list", + authorized(permissions.BUILDER), + controller.getTriggerList + ) + .get( + "/api/automations/action/list", + authorized(permissions.BUILDER), + controller.getActionList + ) + .get( + "/api/automations/definitions/list", + authorized(permissions.BUILDER), + controller.getDefinitionList + ) + .get("/api/automations", authorized(permissions.BUILDER), controller.fetch) + .get( + "/api/automations/:id", + paramResource("id"), + authorized(permissions.BUILDER), + controller.find + ) + .put( + "/api/automations", + bodyResource("_id"), + authorized(permissions.BUILDER), + automationValidator(true), + controller.update + ) + .post( + "/api/automations", + authorized(permissions.BUILDER), + automationValidator(false), + controller.create + ) + .post( + "/api/automations/logs/search", + authorized(permissions.BUILDER), + controller.logSearch + ) + .delete( + "/api/automations/logs", + authorized(permissions.BUILDER), + controller.clearLogError + ) + .delete( + "/api/automations/:id/:rev", + paramResource("id"), + authorized(permissions.BUILDER), + controller.destroy + ) + .post( + "/api/automations/:id/trigger", + appInfoMiddleware({ appType: AppType.PROD }), + paramResource("id"), + authorized( + permissions.PermissionType.AUTOMATION, + permissions.PermissionLevel.EXECUTE + ), + controller.trigger + ) + .post( + "/api/automations/:id/test", + appInfoMiddleware({ appType: AppType.DEV }), + paramResource("id"), + authorized( + permissions.PermissionType.AUTOMATION, + permissions.PermissionLevel.EXECUTE + ), + controller.test + ) + +export = router diff --git a/packages/server/src/api/routes/backup.ts b/packages/server/src/api/routes/backup.ts index cc7eb25c8b..63e9fee5b6 100644 --- a/packages/server/src/api/routes/backup.ts +++ b/packages/server/src/api/routes/backup.ts @@ -1,10 +1,14 @@ import Router from "@koa/router" import * as controller from "../controllers/backup" import authorized from "../../middleware/authorized" -import { BUILDER } from "@budibase/backend-core/permissions" +import { permissions } from "@budibase/backend-core" const router: Router = new Router() -router.get("/api/backups/export", authorized(BUILDER), controller.exportAppDump) +router.get( + "/api/backups/export", + authorized(permissions.BUILDER), + controller.exportAppDump +) -export default router +export = router diff --git a/packages/server/src/api/routes/cloud.js b/packages/server/src/api/routes/cloud.js deleted file mode 100644 index c183ffb5ba..0000000000 --- a/packages/server/src/api/routes/cloud.js +++ /dev/null @@ -1,14 +0,0 @@ -const Router = require("@koa/router") -const controller = require("../controllers/cloud") -const authorized = require("../../middleware/authorized") -const { BUILDER } = require("@budibase/backend-core/permissions") - -const router = new Router() - -router - .get("/api/cloud/export", authorized(BUILDER), controller.exportApps) - // has to be public, only run if apps don't exist - .post("/api/cloud/import", controller.importApps) - .get("/api/cloud/import/complete", controller.hasBeenImported) - -module.exports = router diff --git a/packages/server/src/api/routes/cloud.ts b/packages/server/src/api/routes/cloud.ts new file mode 100644 index 0000000000..acc6b9e9c9 --- /dev/null +++ b/packages/server/src/api/routes/cloud.ts @@ -0,0 +1,18 @@ +import Router from "@koa/router" +import * as controller from "../controllers/cloud" +import authorized from "../../middleware/authorized" +import { permissions } from "@budibase/backend-core" + +const router: Router = new Router() + +router + .get( + "/api/cloud/export", + authorized(permissions.BUILDER), + controller.exportApps + ) + // has to be public, only run if apps don't exist + .post("/api/cloud/import", controller.importApps) + .get("/api/cloud/import/complete", controller.hasBeenImported) + +export = router diff --git a/packages/server/src/api/routes/component.js b/packages/server/src/api/routes/component.js deleted file mode 100644 index 275f58bd6c..0000000000 --- a/packages/server/src/api/routes/component.js +++ /dev/null @@ -1,14 +0,0 @@ -const Router = require("@koa/router") -const controller = require("../controllers/component") -const authorized = require("../../middleware/authorized") -const { BUILDER } = require("@budibase/backend-core/permissions") - -const router = new Router() - -router.get( - "/api/:appId/components/definitions", - authorized(BUILDER), - controller.fetchAppComponentDefinitions -) - -module.exports = router diff --git a/packages/server/src/api/routes/component.ts b/packages/server/src/api/routes/component.ts new file mode 100644 index 0000000000..20b3e54c81 --- /dev/null +++ b/packages/server/src/api/routes/component.ts @@ -0,0 +1,14 @@ +import Router from "@koa/router" +import * as controller from "../controllers/component" +import authorized from "../../middleware/authorized" +import { permissions } from "@budibase/backend-core" + +const router: Router = new Router() + +router.get( + "/api/:appId/components/definitions", + authorized(permissions.BUILDER), + controller.fetchAppComponentDefinitions +) + +export = router diff --git a/packages/server/src/api/routes/datasource.js b/packages/server/src/api/routes/datasource.js deleted file mode 100644 index 402e464e16..0000000000 --- a/packages/server/src/api/routes/datasource.js +++ /dev/null @@ -1,51 +0,0 @@ -const Router = require("@koa/router") -const datasourceController = require("../controllers/datasource") -const authorized = require("../../middleware/authorized") -const { - BUILDER, - PermissionLevel, - PermissionType, -} = require("@budibase/backend-core/permissions") -const { - datasourceValidator, - datasourceQueryValidator, -} = require("./utils/validators") - -const router = new Router() - -router - .get("/api/datasources", authorized(BUILDER), datasourceController.fetch) - .get( - "/api/datasources/:datasourceId", - authorized(PermissionType.TABLE, PermissionLevel.READ), - datasourceController.find - ) - .put( - "/api/datasources/:datasourceId", - authorized(PermissionType.TABLE, PermissionLevel.READ), - datasourceController.update - ) - .post( - "/api/datasources/query", - authorized(PermissionType.TABLE, PermissionLevel.READ), - datasourceQueryValidator(), - datasourceController.query - ) - .post( - "/api/datasources/:datasourceId/schema", - authorized(BUILDER), - datasourceController.buildSchemaFromDb - ) - .post( - "/api/datasources", - authorized(BUILDER), - datasourceValidator(), - datasourceController.save - ) - .delete( - "/api/datasources/:datasourceId/:revId", - authorized(BUILDER), - datasourceController.destroy - ) - -module.exports = router diff --git a/packages/server/src/api/routes/datasource.ts b/packages/server/src/api/routes/datasource.ts new file mode 100644 index 0000000000..c9de7f51fb --- /dev/null +++ b/packages/server/src/api/routes/datasource.ts @@ -0,0 +1,60 @@ +import Router from "@koa/router" +import * as datasourceController from "../controllers/datasource" +import authorized from "../../middleware/authorized" +import { permissions } from "@budibase/backend-core" +import { + datasourceValidator, + datasourceQueryValidator, +} from "./utils/validators" + +const router: Router = new Router() + +router + .get( + "/api/datasources", + authorized(permissions.BUILDER), + datasourceController.fetch + ) + .get( + "/api/datasources/:datasourceId", + authorized( + permissions.PermissionType.TABLE, + permissions.PermissionLevel.READ + ), + datasourceController.find + ) + .put( + "/api/datasources/:datasourceId", + authorized( + permissions.PermissionType.TABLE, + permissions.PermissionLevel.READ + ), + datasourceController.update + ) + .post( + "/api/datasources/query", + authorized( + permissions.PermissionType.TABLE, + permissions.PermissionLevel.READ + ), + datasourceQueryValidator(), + datasourceController.query + ) + .post( + "/api/datasources/:datasourceId/schema", + authorized(permissions.BUILDER), + datasourceController.buildSchemaFromDb + ) + .post( + "/api/datasources", + authorized(permissions.BUILDER), + datasourceValidator(), + datasourceController.save + ) + .delete( + "/api/datasources/:datasourceId/:revId", + authorized(permissions.BUILDER), + datasourceController.destroy + ) + +export = router diff --git a/packages/server/src/api/routes/deploy.ts b/packages/server/src/api/routes/deploy.ts index d091581ec1..b0e4960acb 100644 --- a/packages/server/src/api/routes/deploy.ts +++ b/packages/server/src/api/routes/deploy.ts @@ -18,4 +18,4 @@ router ) .post("/api/deploy", authorized(permissions.BUILDER), controller.deployApp) -export default router +export = router diff --git a/packages/server/src/api/routes/dev.js b/packages/server/src/api/routes/dev.js deleted file mode 100644 index 0103219246..0000000000 --- a/packages/server/src/api/routes/dev.js +++ /dev/null @@ -1,26 +0,0 @@ -const Router = require("@koa/router") -const controller = require("../controllers/dev") -const env = require("../../environment") -const authorized = require("../../middleware/authorized") -const { BUILDER } = require("@budibase/backend-core/permissions") - -const router = new Router() - -function redirectPath(path) { - router - .get(`/api/${path}/:devPath(.*)`, controller.buildRedirectGet(path)) - .post(`/api/${path}/:devPath(.*)`, controller.buildRedirectPost(path)) - .delete(`/api/${path}/:devPath(.*)`, controller.buildRedirectDelete(path)) -} - -if (env.isDev() || env.isTest()) { - redirectPath("global") - redirectPath("system") -} - -router - .get("/api/dev/version", authorized(BUILDER), controller.getBudibaseVersion) - .delete("/api/dev/:appId/lock", authorized(BUILDER), controller.clearLock) - .post("/api/dev/:appId/revert", authorized(BUILDER), controller.revert) - -module.exports = router diff --git a/packages/server/src/api/routes/dev.ts b/packages/server/src/api/routes/dev.ts new file mode 100644 index 0000000000..d61c56d5ee --- /dev/null +++ b/packages/server/src/api/routes/dev.ts @@ -0,0 +1,38 @@ +import Router from "@koa/router" +import * as controller from "../controllers/dev" +import env from "../../environment" +import authorized from "../../middleware/authorized" +import { permissions } from "@budibase/backend-core" + +const router: Router = new Router() + +function redirectPath(path: string) { + router + .get(`/api/${path}/:devPath(.*)`, controller.buildRedirectGet(path)) + .post(`/api/${path}/:devPath(.*)`, controller.buildRedirectPost(path)) + .delete(`/api/${path}/:devPath(.*)`, controller.buildRedirectDelete(path)) +} + +if (env.isDev() || env.isTest()) { + redirectPath("global") + redirectPath("system") +} + +router + .get( + "/api/dev/version", + authorized(permissions.BUILDER), + controller.getBudibaseVersion + ) + .delete( + "/api/dev/:appId/lock", + authorized(permissions.BUILDER), + controller.clearLock + ) + .post( + "/api/dev/:appId/revert", + authorized(permissions.BUILDER), + controller.revert + ) + +export = router diff --git a/packages/server/src/api/routes/integration.js b/packages/server/src/api/routes/integration.js deleted file mode 100644 index 5469aaa27d..0000000000 --- a/packages/server/src/api/routes/integration.js +++ /dev/null @@ -1,12 +0,0 @@ -const Router = require("@koa/router") -const controller = require("../controllers/integration") -const authorized = require("../../middleware/authorized") -const { BUILDER } = require("@budibase/backend-core/permissions") - -const router = new Router() - -router - .get("/api/integrations", authorized(BUILDER), controller.fetch) - .get("/api/integrations/:type", authorized(BUILDER), controller.find) - -module.exports = router diff --git a/packages/server/src/api/routes/integration.ts b/packages/server/src/api/routes/integration.ts new file mode 100644 index 0000000000..835cc5a896 --- /dev/null +++ b/packages/server/src/api/routes/integration.ts @@ -0,0 +1,16 @@ +import Router from "@koa/router" +import controller from "../controllers/integration" +import authorized from "../../middleware/authorized" +import { permissions } from "@budibase/backend-core" + +const router: Router = new Router() + +router + .get("/api/integrations", authorized(permissions.BUILDER), controller.fetch) + .get( + "/api/integrations/:type", + authorized(permissions.BUILDER), + controller.find + ) + +export = router diff --git a/packages/server/src/api/routes/layout.js b/packages/server/src/api/routes/layout.js deleted file mode 100644 index 76103f9cfc..0000000000 --- a/packages/server/src/api/routes/layout.js +++ /dev/null @@ -1,16 +0,0 @@ -const Router = require("@koa/router") -const authorized = require("../../middleware/authorized") -const { BUILDER } = require("@budibase/backend-core/permissions") -const controller = require("../controllers/layout") - -const router = new Router() - -router - .post("/api/layouts", authorized(BUILDER), controller.save) - .delete( - "/api/layouts/:layoutId/:layoutRev", - authorized(BUILDER), - controller.destroy - ) - -module.exports = router diff --git a/packages/server/src/api/routes/layout.ts b/packages/server/src/api/routes/layout.ts new file mode 100644 index 0000000000..6ec48b9263 --- /dev/null +++ b/packages/server/src/api/routes/layout.ts @@ -0,0 +1,16 @@ +import Router from "@koa/router" +import authorized from "../../middleware/authorized" +import { permissions } from "@budibase/backend-core" +import controller from "../controllers/layout" + +const router: Router = new Router() + +router + .post("/api/layouts", authorized(permissions.BUILDER), controller.save) + .delete( + "/api/layouts/:layoutId/:layoutRev", + authorized(permissions.BUILDER), + controller.destroy + ) + +export = router diff --git a/packages/server/src/api/routes/metadata.js b/packages/server/src/api/routes/metadata.ts similarity index 52% rename from packages/server/src/api/routes/metadata.js rename to packages/server/src/api/routes/metadata.ts index 0c2867c45a..e46e0eeb01 100644 --- a/packages/server/src/api/routes/metadata.js +++ b/packages/server/src/api/routes/metadata.ts @@ -1,38 +1,38 @@ -const Router = require("@koa/router") -const controller = require("../controllers/metadata") -const { - middleware: appInfoMiddleware, +import Router from "@koa/router" +import * as controller from "../controllers/metadata" +import { + middleware as appInfoMiddleware, AppType, -} = require("../../middleware/appInfo") -const authorized = require("../../middleware/authorized") -const { BUILDER } = require("@budibase/backend-core/permissions") +} from "../../middleware/appInfo" +import authorized from "../../middleware/authorized" +import { permissions } from "@budibase/backend-core" -const router = new Router() +const router: Router = new Router() router .post( "/api/metadata/:type/:entityId", - authorized(BUILDER), + authorized(permissions.BUILDER), appInfoMiddleware({ appType: AppType.DEV }), controller.saveMetadata ) .delete( "/api/metadata/:type/:entityId", - authorized(BUILDER), + authorized(permissions.BUILDER), appInfoMiddleware({ appType: AppType.DEV }), controller.deleteMetadata ) .get( "/api/metadata/type", - authorized(BUILDER), + authorized(permissions.BUILDER), appInfoMiddleware({ appType: AppType.DEV }), controller.getTypes ) .get( "/api/metadata/:type/:entityId", - authorized(BUILDER), + authorized(permissions.BUILDER), appInfoMiddleware({ appType: AppType.DEV }), controller.getMetadata ) -module.exports = router +export = router diff --git a/packages/server/src/api/routes/migrations.js b/packages/server/src/api/routes/migrations.js deleted file mode 100644 index a40111cf25..0000000000 --- a/packages/server/src/api/routes/migrations.js +++ /dev/null @@ -1,14 +0,0 @@ -const Router = require("@koa/router") -const migrationsController = require("../controllers/migrations") -const router = new Router() -const { internalApi } = require("@budibase/backend-core/auth") - -router - .post("/api/migrations/run", internalApi, migrationsController.migrate) - .get( - "/api/migrations/definitions", - internalApi, - migrationsController.fetchDefinitions - ) - -module.exports = router diff --git a/packages/server/src/api/routes/migrations.ts b/packages/server/src/api/routes/migrations.ts new file mode 100644 index 0000000000..689373cf75 --- /dev/null +++ b/packages/server/src/api/routes/migrations.ts @@ -0,0 +1,14 @@ +import Router from "@koa/router" +import * as migrationsController from "../controllers/migrations" +import { auth } from "@budibase/backend-core" + +const router: Router = new Router() + +router + .post("/api/migrations/run", auth.internalApi, migrationsController.migrate) + .get( + "/api/migrations/definitions", + auth.internalApi, + migrationsController.fetchDefinitions + ) +export = router diff --git a/packages/server/src/api/routes/permission.js b/packages/server/src/api/routes/permission.js deleted file mode 100644 index 4736769f61..0000000000 --- a/packages/server/src/api/routes/permission.js +++ /dev/null @@ -1,33 +0,0 @@ -const Router = require("@koa/router") -const controller = require("../controllers/permission") -const authorized = require("../../middleware/authorized") -const { BUILDER } = require("@budibase/backend-core/permissions") -const { permissionValidator } = require("./utils/validators") - -const router = new Router() - -router - .get("/api/permission/builtin", authorized(BUILDER), controller.fetchBuiltin) - .get("/api/permission/levels", authorized(BUILDER), controller.fetchLevels) - .get("/api/permission", authorized(BUILDER), controller.fetch) - .get( - "/api/permission/:resourceId", - authorized(BUILDER), - controller.getResourcePerms - ) - // adding a specific role/level for the resource overrides the underlying access control - .post( - "/api/permission/:roleId/:resourceId/:level", - authorized(BUILDER), - permissionValidator(), - controller.addPermission - ) - // deleting the level defaults it back the underlying access control for the resource - .delete( - "/api/permission/:roleId/:resourceId/:level", - authorized(BUILDER), - permissionValidator(), - controller.removePermission - ) - -module.exports = router diff --git a/packages/server/src/api/routes/permission.ts b/packages/server/src/api/routes/permission.ts new file mode 100644 index 0000000000..8a26deb9ba --- /dev/null +++ b/packages/server/src/api/routes/permission.ts @@ -0,0 +1,41 @@ +import Router from "@koa/router" +import * as controller from "../controllers/permission" +import authorized from "../../middleware/authorized" +import { permissions } from "@budibase/backend-core" +import { permissionValidator } from "./utils/validators" + +const router: Router = new Router() + +router + .get( + "/api/permission/builtin", + authorized(permissions.BUILDER), + controller.fetchBuiltin + ) + .get( + "/api/permission/levels", + authorized(permissions.BUILDER), + controller.fetchLevels + ) + .get("/api/permission", authorized(permissions.BUILDER), controller.fetch) + .get( + "/api/permission/:resourceId", + authorized(permissions.BUILDER), + controller.getResourcePerms + ) + // adding a specific role/level for the resource overrides the underlying access control + .post( + "/api/permission/:roleId/:resourceId/:level", + authorized(permissions.BUILDER), + permissionValidator(), + controller.addPermission + ) + // deleting the level defaults it back the underlying access control for the resource + .delete( + "/api/permission/:roleId/:resourceId/:level", + authorized(permissions.BUILDER), + permissionValidator(), + controller.removePermission + ) + +export = router diff --git a/packages/server/src/api/routes/plugin.ts b/packages/server/src/api/routes/plugin.ts index d5bd7607f7..70838c499e 100644 --- a/packages/server/src/api/routes/plugin.ts +++ b/packages/server/src/api/routes/plugin.ts @@ -1,14 +1,22 @@ import Router from "@koa/router" import * as controller from "../controllers/plugin" import authorized from "../../middleware/authorized" -import { BUILDER } from "@budibase/backend-core/permissions" +import { permissions } from "@budibase/backend-core" const router: Router = new Router() router - .post("/api/plugin/upload", authorized(BUILDER), controller.upload) - .post("/api/plugin", authorized(BUILDER), controller.create) - .get("/api/plugin", authorized(BUILDER), controller.fetch) - .delete("/api/plugin/:pluginId", authorized(BUILDER), controller.destroy) + .post( + "/api/plugin/upload", + authorized(permissions.BUILDER), + controller.upload + ) + .post("/api/plugin", authorized(permissions.BUILDER), controller.create) + .get("/api/plugin", authorized(permissions.BUILDER), controller.fetch) + .delete( + "/api/plugin/:pluginId", + authorized(permissions.BUILDER), + controller.destroy + ) export default router diff --git a/packages/server/src/api/routes/query.js b/packages/server/src/api/routes/query.ts similarity index 73% rename from packages/server/src/api/routes/query.js rename to packages/server/src/api/routes/query.ts index 1195e55113..439e3a6ec8 100644 --- a/packages/server/src/api/routes/query.js +++ b/packages/server/src/api/routes/query.ts @@ -1,22 +1,19 @@ -const Router = require("@koa/router") -const queryController = require("../controllers/query") -const authorized = require("../../middleware/authorized") -const { - PermissionLevel, - PermissionType, - BUILDER, -} = require("@budibase/backend-core/permissions") -const { +import Router from "@koa/router" +import * as queryController from "../controllers/query" +import authorized from "../../middleware/authorized" +import { permissions } from "@budibase/backend-core" +import { bodyResource, bodySubResource, paramResource, -} = require("../../middleware/resourceId") -const { +} from "../../middleware/resourceId" +import { generateQueryPreviewValidation, generateQueryValidation, -} = require("../controllers/query/validation") +} from "../controllers/query/validation" +const { BUILDER, PermissionType, PermissionLevel } = permissions -const router = new Router() +const router: Router = new Router() router .get("/api/queries", authorized(BUILDER), queryController.fetch) @@ -48,17 +45,17 @@ router authorized(PermissionType.QUERY, PermissionLevel.WRITE), queryController.executeV1 ) - .post( - "/api/v2/queries/:queryId", - paramResource("queryId"), - authorized(PermissionType.QUERY, PermissionLevel.WRITE), - queryController.executeV2 - ) .delete( "/api/queries/:queryId/:revId", paramResource("queryId"), authorized(BUILDER), queryController.destroy ) + .post( + "/api/v2/queries/:queryId", + paramResource("queryId"), + authorized(PermissionType.QUERY, PermissionLevel.WRITE), + queryController.executeV2 as any + ) -module.exports = router +export = router diff --git a/packages/server/src/api/routes/role.js b/packages/server/src/api/routes/role.js deleted file mode 100644 index a6e04e81fa..0000000000 --- a/packages/server/src/api/routes/role.js +++ /dev/null @@ -1,15 +0,0 @@ -const Router = require("@koa/router") -const controller = require("../controllers/role") -const authorized = require("../../middleware/authorized") -const { BUILDER } = require("@budibase/backend-core/permissions") -const { roleValidator } = require("./utils/validators") - -const router = new Router() - -router - .post("/api/roles", authorized(BUILDER), roleValidator(), controller.save) - .get("/api/roles", authorized(BUILDER), controller.fetch) - .get("/api/roles/:roleId", authorized(BUILDER), controller.find) - .delete("/api/roles/:roleId/:rev", authorized(BUILDER), controller.destroy) - -module.exports = router diff --git a/packages/server/src/api/routes/role.ts b/packages/server/src/api/routes/role.ts new file mode 100644 index 0000000000..48933a505b --- /dev/null +++ b/packages/server/src/api/routes/role.ts @@ -0,0 +1,24 @@ +import Router from "@koa/router" +import * as controller from "../controllers/role" +import authorized from "../../middleware/authorized" +import { permissions } from "@budibase/backend-core" +import { roleValidator } from "./utils/validators" + +const router: Router = new Router() + +router + .post( + "/api/roles", + authorized(permissions.BUILDER), + roleValidator(), + controller.save + ) + .get("/api/roles", authorized(permissions.BUILDER), controller.fetch) + .get("/api/roles/:roleId", authorized(permissions.BUILDER), controller.find) + .delete( + "/api/roles/:roleId/:rev", + authorized(permissions.BUILDER), + controller.destroy + ) + +export = router diff --git a/packages/server/src/api/routes/routing.js b/packages/server/src/api/routes/routing.js deleted file mode 100644 index d7e971d507..0000000000 --- a/packages/server/src/api/routes/routing.js +++ /dev/null @@ -1,14 +0,0 @@ -const Router = require("@koa/router") -const authorized = require("../../middleware/authorized") -const { BUILDER } = require("@budibase/backend-core/permissions") -const controller = require("../controllers/routing") - -const router = new Router() - -router - // gets correct structure for user role - .get("/api/routing/client", controller.clientFetch) - // gets the full structure, not just the correct screen ID for user role - .get("/api/routing", authorized(BUILDER), controller.fetch) - -module.exports = router diff --git a/packages/server/src/api/routes/routing.ts b/packages/server/src/api/routes/routing.ts new file mode 100644 index 0000000000..56f2b40192 --- /dev/null +++ b/packages/server/src/api/routes/routing.ts @@ -0,0 +1,14 @@ +import Router from "@koa/router" +import authorized from "../../middleware/authorized" +import { permissions } from "@budibase/backend-core" +import * as controller from "../controllers/routing" + +const router: Router = new Router() + +router + // gets correct structure for user role + .get("/api/routing/client", controller.clientFetch) + // gets the full structure, not just the correct screen ID for user role + .get("/api/routing", authorized(permissions.BUILDER), controller.fetch) + +export = router diff --git a/packages/server/src/api/routes/row.ts b/packages/server/src/api/routes/row.ts index e75b7d6e20..f4462b3595 100644 --- a/packages/server/src/api/routes/row.ts +++ b/packages/server/src/api/routes/row.ts @@ -2,11 +2,9 @@ import Router from "@koa/router" import * as rowController from "../controllers/row" import authorized from "../../middleware/authorized" import { paramResource, paramSubResource } from "../../middleware/resourceId" -const { - PermissionLevel, - PermissionType, -} = require("@budibase/backend-core/permissions") +import { permissions } from "@budibase/backend-core" const { internalSearchValidator } = require("./utils/validators") +const { PermissionType, PermissionLevel } = permissions const router: Router = new Router() diff --git a/packages/server/src/api/routes/screen.js b/packages/server/src/api/routes/screen.js deleted file mode 100644 index 426b89fd0f..0000000000 --- a/packages/server/src/api/routes/screen.js +++ /dev/null @@ -1,18 +0,0 @@ -const Router = require("@koa/router") -const controller = require("../controllers/screen") -const authorized = require("../../middleware/authorized") -const { BUILDER } = require("@budibase/backend-core/permissions") -const { screenValidator } = require("./utils/validators") - -const router = new Router() - -router - .get("/api/screens", authorized(BUILDER), controller.fetch) - .post("/api/screens", authorized(BUILDER), screenValidator(), controller.save) - .delete( - "/api/screens/:screenId/:screenRev", - authorized(BUILDER), - controller.destroy - ) - -module.exports = router diff --git a/packages/server/src/api/routes/screen.ts b/packages/server/src/api/routes/screen.ts new file mode 100644 index 0000000000..c8bab17b31 --- /dev/null +++ b/packages/server/src/api/routes/screen.ts @@ -0,0 +1,23 @@ +import Router from "@koa/router" +import * as controller from "../controllers/screen" +import authorized from "../../middleware/authorized" +import { permissions } from "@budibase/backend-core" +import { screenValidator } from "./utils/validators" + +const router: Router = new Router() + +router + .get("/api/screens", authorized(permissions.BUILDER), controller.fetch) + .post( + "/api/screens", + authorized(permissions.BUILDER), + screenValidator(), + controller.save + ) + .delete( + "/api/screens/:screenId/:screenRev", + authorized(permissions.BUILDER), + controller.destroy + ) + +export = router diff --git a/packages/server/src/api/routes/script.js b/packages/server/src/api/routes/script.js deleted file mode 100644 index a4b4e4a7f5..0000000000 --- a/packages/server/src/api/routes/script.js +++ /dev/null @@ -1,10 +0,0 @@ -const Router = require("@koa/router") -const controller = require("../controllers/script") -const authorized = require("../../middleware/authorized") -const { BUILDER } = require("@budibase/backend-core/permissions") - -const router = new Router() - -router.post("/api/script", authorized(BUILDER), controller.save) - -module.exports = router diff --git a/packages/server/src/api/routes/script.ts b/packages/server/src/api/routes/script.ts new file mode 100644 index 0000000000..44f1069c9e --- /dev/null +++ b/packages/server/src/api/routes/script.ts @@ -0,0 +1,10 @@ +import Router from "@koa/router" +import * as controller from "../controllers/script" +import authorized from "../../middleware/authorized" +import { permissions } from "@budibase/backend-core/permissions" + +const router: Router = new Router() + +router.post("/api/script", authorized(permissions.BUILDER), controller.save) + +export = router diff --git a/packages/server/src/api/routes/static.ts b/packages/server/src/api/routes/static.ts index 7dbd998583..992575fb74 100644 --- a/packages/server/src/api/routes/static.ts +++ b/packages/server/src/api/routes/static.ts @@ -2,13 +2,10 @@ import Router from "@koa/router" import * as controller from "../controllers/static" import { budibaseTempDir } from "../../utilities/budibaseDir" import authorized from "../../middleware/authorized" -import { - BUILDER, - PermissionType, - PermissionLevel, -} from "@budibase/backend-core/permissions" +import { permissions } from "@budibase/backend-core" import * as env from "../../environment" import { paramResource } from "../../middleware/resourceId" +const { BUILDER, PermissionType, PermissionLevel } = permissions const router: Router = new Router() @@ -65,4 +62,4 @@ router controller.getSignedUploadURL ) -export default router +export = router diff --git a/packages/server/src/api/routes/table.js b/packages/server/src/api/routes/table.ts similarity index 95% rename from packages/server/src/api/routes/table.js rename to packages/server/src/api/routes/table.ts index 8d280e06d3..0b6d80cdaf 100644 --- a/packages/server/src/api/routes/table.js +++ b/packages/server/src/api/routes/table.ts @@ -1,15 +1,12 @@ -const Router = require("@koa/router") -const tableController = require("../controllers/table") -const authorized = require("../../middleware/authorized") -const { paramResource, bodyResource } = require("../../middleware/resourceId") -const { - BUILDER, - PermissionLevel, - PermissionType, -} = require("@budibase/backend-core/permissions") -const { tableValidator } = require("./utils/validators") +import Router from "@koa/router" +import * as tableController from "../controllers/table" +import authorized from "../../middleware/authorized" +import { paramResource, bodyResource } from "../../middleware/resourceId" +import { permissions } from "@budibase/backend-core" +import { tableValidator } from "./utils/validators" +const { BUILDER, PermissionLevel, PermissionType } = permissions -const router = new Router() +const router: Router = new Router() router /** @@ -193,4 +190,4 @@ router tableController.bulkImport ) -module.exports = router +export = router diff --git a/packages/server/src/api/routes/templates.js b/packages/server/src/api/routes/templates.js deleted file mode 100644 index 61a185b5c8..0000000000 --- a/packages/server/src/api/routes/templates.js +++ /dev/null @@ -1,16 +0,0 @@ -const Router = require("@koa/router") -const controller = require("../controllers/templates") -const authorized = require("../../middleware/authorized") -const { BUILDER } = require("@budibase/backend-core/permissions") - -const router = new Router() - -router - .get("/api/templates", authorized(BUILDER), controller.fetch) - .get( - "/api/templates/:type/:name", - authorized(BUILDER), - controller.downloadTemplate - ) - -module.exports = router diff --git a/packages/server/src/api/routes/templates.ts b/packages/server/src/api/routes/templates.ts new file mode 100644 index 0000000000..a05e1f12ac --- /dev/null +++ b/packages/server/src/api/routes/templates.ts @@ -0,0 +1,16 @@ +import Router from "@koa/router" +import * as controller from "../controllers/templates" +import authorized from "../../middleware/authorized" +import { permissions } from "@budibase/backend-core" + +const router: Router = new Router() + +router + .get("/api/templates", authorized(permissions.BUILDER), controller.fetch) + .get( + "/api/templates/:type/:name", + authorized(permissions.BUILDER), + controller.downloadTemplate + ) + +export = router diff --git a/packages/server/src/api/routes/user.js b/packages/server/src/api/routes/user.ts similarity index 78% rename from packages/server/src/api/routes/user.js rename to packages/server/src/api/routes/user.ts index a290ced829..95010bf8f2 100644 --- a/packages/server/src/api/routes/user.js +++ b/packages/server/src/api/routes/user.ts @@ -1,12 +1,10 @@ -const Router = require("@koa/router") -const controller = require("../controllers/user") -const authorized = require("../../middleware/authorized") -const { - PermissionLevel, - PermissionType, -} = require("@budibase/backend-core/permissions") +import Router from "@koa/router" +import controller from "../controllers/user" +import authorized from "../../middleware/authorized" +import { permissions } from "@budibase/backend-core" +const { PermissionType, PermissionLevel } = permissions -const router = new Router() +const router: Router = new Router() router .get( @@ -50,4 +48,4 @@ router controller.getFlags ) -module.exports = router +export = router diff --git a/packages/server/src/api/routes/view.js b/packages/server/src/api/routes/view.js deleted file mode 100644 index 0a8bd7d4ce..0000000000 --- a/packages/server/src/api/routes/view.js +++ /dev/null @@ -1,31 +0,0 @@ -const Router = require("@koa/router") -const viewController = require("../controllers/view") -const rowController = require("../controllers/row") -const authorized = require("../../middleware/authorized") -const { paramResource } = require("../../middleware/resourceId") -const { - BUILDER, - PermissionType, - PermissionLevel, -} = require("@budibase/backend-core/permissions") - -const router = new Router() - -router - .get("/api/views/export", authorized(BUILDER), viewController.exportView) - .get( - "/api/views/:viewName", - paramResource("viewName"), - authorized(PermissionType.VIEW, PermissionLevel.READ), - rowController.fetchView - ) - .get("/api/views", authorized(BUILDER), viewController.fetch) - .delete( - "/api/views/:viewName", - paramResource("viewName"), - authorized(BUILDER), - viewController.destroy - ) - .post("/api/views", authorized(BUILDER), viewController.save) - -module.exports = router diff --git a/packages/server/src/api/routes/view.ts b/packages/server/src/api/routes/view.ts new file mode 100644 index 0000000000..3705e74984 --- /dev/null +++ b/packages/server/src/api/routes/view.ts @@ -0,0 +1,34 @@ +import Router from "@koa/router" +import * as viewController from "../controllers/view" +import * as rowController from "../controllers/row" +import authorized from "../../middleware/authorized" +import { paramResource } from "../../middleware/resourceId" +import { permissions } from "@budibase/backend-core" + +const router: Router = new Router() + +router + .get( + "/api/views/export", + authorized(permissions.BUILDER), + viewController.exportView + ) + .get( + "/api/views/:viewName", + paramResource("viewName"), + authorized( + permissions.PermissionType.VIEW, + permissions.PermissionLevel.READ + ), + rowController.fetchView + ) + .get("/api/views", authorized(permissions.BUILDER), viewController.fetch) + .delete( + "/api/views/:viewName", + paramResource("viewName"), + authorized(permissions.BUILDER), + viewController.destroy + ) + .post("/api/views", authorized(permissions.BUILDER), viewController.save) + +export = router diff --git a/packages/server/src/api/routes/webhook.ts b/packages/server/src/api/routes/webhook.ts index 3aa9525ed5..8067ecac7c 100644 --- a/packages/server/src/api/routes/webhook.ts +++ b/packages/server/src/api/routes/webhook.ts @@ -24,4 +24,4 @@ router // this shouldn't have authorisation, right now its always public .post("/api/webhooks/trigger/:instance/:id", controller.trigger) -export default router +export = router diff --git a/packages/server/src/utilities/rowProcessor/index.ts b/packages/server/src/utilities/rowProcessor/index.ts index 9c91ea070b..2b4f4e05a6 100644 --- a/packages/server/src/utilities/rowProcessor/index.ts +++ b/packages/server/src/utilities/rowProcessor/index.ts @@ -49,7 +49,7 @@ function getRemovedAttachmentKeys( * for automatic ID purposes. */ export function processAutoColumn( - user: User, + user: User | null, table: Table, row: Row, opts: AutoColumnProcessingOpts @@ -71,7 +71,7 @@ export function processAutoColumn( } switch (schema.subtype) { case AutoFieldSubTypes.CREATED_BY: - if (creating && shouldUpdateUserFields) { + if (creating && shouldUpdateUserFields && user) { row[key] = [user.userId] } break @@ -81,7 +81,7 @@ export function processAutoColumn( } break case AutoFieldSubTypes.UPDATED_BY: - if (shouldUpdateUserFields) { + if (shouldUpdateUserFields && user) { row[key] = [user.userId] } break diff --git a/packages/server/src/utilities/rowProcessor/utils.ts b/packages/server/src/utilities/rowProcessor/utils.ts index 7853775f19..c22bc59419 100644 --- a/packages/server/src/utilities/rowProcessor/utils.ts +++ b/packages/server/src/utilities/rowProcessor/utils.ts @@ -35,13 +35,16 @@ export function fixAutoColumnSubType(column: FieldSchema) { */ export function processFormulas( table: Table, - rows: Row[], + rows: Row[] | Row, { dynamic, contextRows }: any = { dynamic: true } ) { const single = !Array.isArray(rows) + let rowArray: Row[] if (single) { - rows = [rows] + rowArray = [rows] contextRows = contextRows ? [contextRows] : contextRows + } else { + rowArray = rows } for (let [column, schema] of Object.entries(table.schema)) { const isStatic = schema.formulaType === FormulaTypes.STATIC @@ -53,18 +56,18 @@ export function processFormulas( continue } // iterate through rows and process formula - for (let i = 0; i < rows.length; i++) { + for (let i = 0; i < rowArray.length; i++) { if (schema.formula) { - let row = rows[i] + let row = rowArray[i] let context = contextRows ? contextRows[i] : row - rows[i] = { + rowArray[i] = { ...row, [column]: processStringSync(schema.formula, context), } } } } - return single ? rows[0] : rows + return single ? rowArray[0] : rowArray } /** From 6f6d000cb83629346e15bd287cc72cca0db22f96 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 22 Nov 2022 19:49:59 +0000 Subject: [PATCH 201/396] Finally removing all usages of backend-core/ type imports from server, including some further typescript conversions. --- .../backend-core/src/migrations/migrations.ts | 11 +- packages/server/scripts/exportAppTemplate.js | 4 +- packages/server/src/api/controllers/auth.ts | 4 +- packages/server/src/api/controllers/cloud.ts | 5 +- .../{datasource.js => datasource.ts} | 101 ++++++++++-------- .../src/api/controllers/deploy/Deployment.ts | 2 +- .../api/controllers/{layout.js => layout.ts} | 16 +-- .../src/api/controllers/public/tables.ts | 4 +- .../src/api/controllers/row/external.js | 6 +- .../src/api/controllers/row/internal.js | 23 ++-- .../server/src/api/controllers/row/utils.ts | 2 +- .../src/api/controllers/table/internal.ts | 3 +- .../src/api/controllers/{user.js => user.ts} | 96 ++++++++--------- .../server/src/api/controllers/view/utils.ts | 2 +- .../server/src/api/{index.js => index.ts} | 37 +++---- packages/server/src/api/routes/layout.ts | 2 +- packages/server/src/api/routes/script.ts | 2 +- .../src/api/routes/tests/permissions.spec.js | 3 +- .../server/src/api/routes/tests/role.spec.js | 8 +- .../src/api/routes/tests/routing.spec.js | 3 +- .../server/src/api/routes/tests/row.spec.js | 7 +- .../server/src/api/routes/tests/user.spec.js | 3 +- .../routes/tests/utilities/TestFunctions.ts | 14 ++- packages/server/src/api/routes/user.ts | 2 +- packages/server/src/app.ts | 7 +- packages/server/src/automations/triggers.js | 11 +- packages/server/src/constants/index.js | 8 +- packages/server/src/constants/screens.js | 4 +- packages/server/src/db/inMemoryView.js | 6 +- .../src/db/linkedRows/LinkController.js | 4 +- packages/server/src/db/linkedRows/index.js | 4 +- .../server/src/db/linkedRows/linkUtils.js | 6 +- packages/server/src/db/utils.ts | 2 +- packages/server/src/db/views/staticViews.js | 8 +- packages/server/src/integrations/base/sql.ts | 2 +- .../server/src/integrations/base/sqlTable.ts | 2 +- packages/server/src/integrations/index.ts | 92 ++++++++-------- .../src/migrations/functions/appUrls.ts | 4 +- .../functions/tests/appUrls.spec.js | 8 +- .../tests/userEmailViewCasing.spec.js | 23 ++-- .../functions/usageQuotas/syncApps.ts | 7 +- .../functions/usageQuotas/syncRows.ts | 7 +- .../usageQuotas/tests/syncRows.spec.ts | 14 +-- .../functions/userEmailViewCasing.ts | 6 +- packages/server/src/module.d.ts | 14 --- packages/server/src/startup.ts | 4 +- packages/server/src/threads/automation.ts | 29 +++-- packages/server/src/threads/query.ts | 27 ++--- packages/server/src/threads/utils.ts | 9 +- packages/server/src/utilities/redis.ts | 8 +- .../src/utilities/rowProcessor/index.ts | 2 +- packages/server/src/watch.ts | 5 +- packages/types/src/sdk/events/role.ts | 6 +- 53 files changed, 333 insertions(+), 356 deletions(-) rename packages/server/src/api/controllers/{datasource.js => datasource.ts} (74%) rename packages/server/src/api/controllers/{layout.js => layout.ts} (70%) rename packages/server/src/api/controllers/{user.js => user.ts} (69%) rename packages/server/src/api/{index.js => index.ts} (70%) delete mode 100644 packages/server/src/module.d.ts diff --git a/packages/backend-core/src/migrations/migrations.ts b/packages/backend-core/src/migrations/migrations.ts index 60c17f4020..7bc2dec290 100644 --- a/packages/backend-core/src/migrations/migrations.ts +++ b/packages/backend-core/src/migrations/migrations.ts @@ -1,10 +1,13 @@ import { DEFAULT_TENANT_ID } from "../constants" -import { doWithDB } from "../db" -import { DocumentType, StaticDatabases } from "../db/constants" -import { getAllApps } from "../db/utils" +import { + DocumentType, + StaticDatabases, + getAllApps, + getGlobalDBName, + doWithDB, +} from "../db" import environment from "../environment" import { doInTenant, getTenantIds, getTenantId } from "../tenancy" -import { getGlobalDBName } from "../db/tenancy" import * as context from "../context" import { DEFINITIONS } from "." import { diff --git a/packages/server/scripts/exportAppTemplate.js b/packages/server/scripts/exportAppTemplate.js index bb1de425ba..04688b071f 100755 --- a/packages/server/scripts/exportAppTemplate.js +++ b/packages/server/scripts/exportAppTemplate.js @@ -3,7 +3,7 @@ const yargs = require("yargs") const fs = require("fs") const { join } = require("path") require("../src/db").init() -const { doWithDB } = require("@budibase/backend-core/db") +const { db: dbCore } = require("@budibase/backend-core") // load environment const env = require("../src/environment") const { @@ -48,7 +48,7 @@ yargs const writeStream = fs.createWriteStream(join(exportPath, "dump.text")) // perform couch dump - await doWithDB(appId, async db => { + await dbCore.doWithDB(appId, async db => { return db.dump(writeStream, { filter: doc => !( diff --git a/packages/server/src/api/controllers/auth.ts b/packages/server/src/api/controllers/auth.ts index 88dc581020..c28b99529b 100644 --- a/packages/server/src/api/controllers/auth.ts +++ b/packages/server/src/api/controllers/auth.ts @@ -3,7 +3,7 @@ import { InternalTables } from "../../db/utils" import { getFullUser } from "../../utilities/users" import { roles, context } from "@budibase/backend-core" import { groups } from "@budibase/pro" -import { ContextUser, User } from "@budibase/types" +import { ContextUser, User, Row } from "@budibase/types" const PUBLIC_ROLE = roles.BUILTIN_ROLE_IDS.PUBLIC @@ -43,7 +43,7 @@ export async function fetchSelf(ctx: any) { try { const userTable = await db.get(InternalTables.USER_METADATA) // specifically needs to make sure is enriched - ctx.body = await outputProcessing(userTable, user) + ctx.body = await outputProcessing(userTable, user as Row) } catch (err: any) { let response // user didn't exist in app, don't pretend they do diff --git a/packages/server/src/api/controllers/cloud.ts b/packages/server/src/api/controllers/cloud.ts index 7f29369bf2..41c21d534a 100644 --- a/packages/server/src/api/controllers/cloud.ts +++ b/packages/server/src/api/controllers/cloud.ts @@ -7,7 +7,6 @@ import { create } from "./application" import { join } from "path" import { App, BBContext, Database } from "@budibase/types" import sdk from "../../sdk" -import { getAllApps } from "@budibase/backend-core/src/db" async function createApp(appName: string, appDirectory: string) { const ctx = { @@ -39,7 +38,7 @@ export async function exportApps(ctx: BBContext) { if (env.SELF_HOSTED || !env.MULTI_TENANCY) { ctx.throw(400, "Exporting only allowed in multi-tenant cloud environments.") } - const apps = (await getAllApps({ all: true })) as App[] + const apps = (await dbCore.getAllApps({ all: true })) as App[] const globalDBString = await sdk.backups.exportDB(dbCore.getGlobalDBName(), { filter: (doc: any) => !doc._id.startsWith(DocumentType.USER), }) @@ -61,7 +60,7 @@ async function checkHasBeenImported() { if (!env.SELF_HOSTED || env.MULTI_TENANCY) { return true } - const apps = await getAllApps({ all: true }) + const apps = await dbCore.getAllApps({ all: true }) return apps.length !== 0 } diff --git a/packages/server/src/api/controllers/datasource.js b/packages/server/src/api/controllers/datasource.ts similarity index 74% rename from packages/server/src/api/controllers/datasource.js rename to packages/server/src/api/controllers/datasource.ts index 80bd263d87..511eb8ab74 100644 --- a/packages/server/src/api/controllers/datasource.js +++ b/packages/server/src/api/controllers/datasource.ts @@ -1,30 +1,29 @@ -const { +import { generateDatasourceID, getDatasourceParams, getQueryParams, DocumentType, BudibaseInternalDB, getTableParams, -} = require("../../db/utils") -const { destroy: tableDestroy } = require("./table/internal") -const { BuildSchemaErrors, InvalidColumns } = require("../../constants") -const { getIntegration } = require("../../integrations") -const { getDatasourceAndQuery } = require("./row/utils") -const { invalidateDynamicVariables } = require("../../threads/utils") -const { getAppDB } = require("@budibase/backend-core/context") -const { events } = require("@budibase/backend-core") -const { db: dbCore } = require("@budibase/backend-core") +} from "../../db/utils" +import { destroy as tableDestroy } from "./table/internal" +import { BuildSchemaErrors, InvalidColumns } from "../../constants" +import { getIntegration } from "../../integrations" +import { getDatasourceAndQuery } from "./row/utils" +import { invalidateDynamicVariables } from "../../threads/utils" +import { db as dbCore, context, events } from "@budibase/backend-core" +import { BBContext, Datasource, Row } from "@budibase/types" -exports.fetch = async function (ctx) { +export async function fetch(ctx: BBContext) { // Get internal tables - const db = getAppDB() + const db = context.getAppDB() const internalTables = await db.allDocs( getTableParams(null, { include_docs: true, }) ) - const internal = internalTables.rows.reduce((acc, row) => { + const internal = internalTables.rows.reduce((acc: any, row: Row) => { const sourceId = row.doc.sourceId || "bb_internal" acc[sourceId] = acc[sourceId] || [] acc[sourceId].push(row.doc) @@ -60,8 +59,8 @@ exports.fetch = async function (ctx) { ctx.body = [bbInternalDb, ...datasources] } -exports.buildSchemaFromDb = async function (ctx) { - const db = getAppDB() +export async function buildSchemaFromDb(ctx: BBContext) { + const db = context.getAppDB() const datasource = await db.get(ctx.params.datasourceId) const tablesFilter = ctx.request.body.tablesFilter @@ -72,7 +71,9 @@ exports.buildSchemaFromDb = async function (ctx) { } for (let key in tables) { if ( - tablesFilter.some(filter => filter.toLowerCase() === key.toLowerCase()) + tablesFilter.some( + (filter: any) => filter.toLowerCase() === key.toLowerCase() + ) ) { datasource.entities[key] = tables[key] } @@ -85,7 +86,7 @@ exports.buildSchemaFromDb = async function (ctx) { const dbResp = await db.put(datasource) datasource._rev = dbResp.rev - const response = { datasource } + const response: any = { datasource } if (error) { response.error = error } @@ -95,9 +96,9 @@ exports.buildSchemaFromDb = async function (ctx) { /** * Make sure all datasource entities have a display name selected */ -const setDefaultDisplayColumns = datasource => { +function setDefaultDisplayColumns(datasource: Datasource) { // - for (let entity of Object.values(datasource.entities)) { + for (let entity of Object.values(datasource.entities || {})) { if (entity.primaryDisplay) { continue } @@ -113,9 +114,12 @@ const setDefaultDisplayColumns = datasource => { /** * Check for variables that have been updated or removed and invalidate them. */ -const invalidateVariables = async (existingDatasource, updatedDatasource) => { - const existingVariables = existingDatasource.config.dynamicVariables - const updatedVariables = updatedDatasource.config.dynamicVariables +async function invalidateVariables( + existingDatasource: Datasource, + updatedDatasource: Datasource +) { + const existingVariables: any = existingDatasource.config?.dynamicVariables + const updatedVariables: any = updatedDatasource.config?.dynamicVariables const toInvalidate = [] if (!existingVariables) { @@ -127,9 +131,9 @@ const invalidateVariables = async (existingDatasource, updatedDatasource) => { toInvalidate.push(...existingVariables) } else { // invaldate changed / removed - existingVariables.forEach(existing => { + existingVariables.forEach((existing: any) => { const unchanged = updatedVariables.find( - updated => + (updated: any) => existing.name === updated.name && existing.queryId === updated.queryId && existing.value === updated.value @@ -142,8 +146,8 @@ const invalidateVariables = async (existingDatasource, updatedDatasource) => { await invalidateDynamicVariables(toInvalidate) } -exports.update = async function (ctx) { - const db = getAppDB() +export async function update(ctx: BBContext) { + const db = context.getAppDB() const datasourceId = ctx.params.datasourceId let datasource = await db.get(datasourceId) const auth = datasource.config.auth @@ -171,8 +175,8 @@ exports.update = async function (ctx) { ctx.body = { datasource } } -exports.save = async function (ctx) { - const db = getAppDB() +export async function save(ctx: BBContext) { + const db = context.getAppDB() const plus = ctx.request.body.datasource.plus const fetchSchema = ctx.request.body.fetchSchema @@ -202,15 +206,15 @@ exports.save = async function (ctx) { } } - const response = { datasource } + const response: any = { datasource } if (schemaError) { response.error = schemaError } ctx.body = response } -const destroyInternalTablesBySourceId = async datasourceId => { - const db = getAppDB() +async function destroyInternalTablesBySourceId(datasourceId: string) { + const db = context.getAppDB() // Get all internal tables const internalTables = await db.allDocs( @@ -220,12 +224,15 @@ const destroyInternalTablesBySourceId = async datasourceId => { ) // Filter by datasource and return the docs. - const datasourceTableDocs = internalTables.rows.reduce((acc, table) => { - if (table.doc.sourceId == datasourceId) { - acc.push(table.doc) - } - return acc - }, []) + const datasourceTableDocs = internalTables.rows.reduce( + (acc: any, table: any) => { + if (table.doc.sourceId == datasourceId) { + acc.push(table.doc) + } + return acc + }, + [] + ) // Destroy the tables. for (const table of datasourceTableDocs) { @@ -237,8 +244,8 @@ const destroyInternalTablesBySourceId = async datasourceId => { } } -exports.destroy = async function (ctx) { - const db = getAppDB() +export async function destroy(ctx: BBContext) { + const db = context.getAppDB() const datasourceId = ctx.params.datasourceId const datasource = await db.get(datasourceId) @@ -249,7 +256,7 @@ exports.destroy = async function (ctx) { } else { const queries = await db.allDocs(getQueryParams(datasourceId, null)) await db.bulkDocs( - queries.rows.map(row => ({ + queries.rows.map((row: any) => ({ _id: row.id, _rev: row.value.rev, _deleted: true, @@ -265,28 +272,28 @@ exports.destroy = async function (ctx) { ctx.status = 200 } -exports.find = async function (ctx) { - const database = getAppDB() +export async function find(ctx: BBContext) { + const database = context.getAppDB() ctx.body = await database.get(ctx.params.datasourceId) } // dynamic query functionality -exports.query = async function (ctx) { +export async function query(ctx: BBContext) { const queryJson = ctx.request.body try { ctx.body = await getDatasourceAndQuery(queryJson) - } catch (err) { + } catch (err: any) { ctx.throw(400, err) } } -function getErrorTables(errors, errorType) { +function getErrorTables(errors: any, errorType: string) { return Object.entries(errors) .filter(entry => entry[1] === errorType) .map(([name]) => name) } -function updateError(error, newError, tables) { +function updateError(error: any, newError: any, tables: string[]) { if (!error) { error = "" } @@ -297,7 +304,7 @@ function updateError(error, newError, tables) { return error } -const buildSchemaHelper = async datasource => { +async function buildSchemaHelper(datasource: Datasource) { const Connector = await getIntegration(datasource.source) // Connect to the DB and build the schema diff --git a/packages/server/src/api/controllers/deploy/Deployment.ts b/packages/server/src/api/controllers/deploy/Deployment.ts index 765f22acc1..c15cffbcd8 100644 --- a/packages/server/src/api/controllers/deploy/Deployment.ts +++ b/packages/server/src/api/controllers/deploy/Deployment.ts @@ -4,7 +4,7 @@ import { context } from "@budibase/backend-core" /** * This is used to pass around information about the deployment that is occurring */ -export class Deployment { +export default class Deployment { _id: string verification: any status?: string diff --git a/packages/server/src/api/controllers/layout.js b/packages/server/src/api/controllers/layout.ts similarity index 70% rename from packages/server/src/api/controllers/layout.js rename to packages/server/src/api/controllers/layout.ts index f3f52d4ef0..c00252d643 100644 --- a/packages/server/src/api/controllers/layout.js +++ b/packages/server/src/api/controllers/layout.ts @@ -1,10 +1,10 @@ -const { EMPTY_LAYOUT } = require("../../constants/layouts") -const { generateLayoutID, getScreenParams } = require("../../db/utils") -const { getAppDB } = require("@budibase/backend-core/context") -const { events } = require("@budibase/backend-core") +import { EMPTY_LAYOUT } from "../../constants/layouts" +import { generateLayoutID, getScreenParams } from "../../db/utils" +import { events, context } from "@budibase/backend-core" +import { BBContext } from "@budibase/types" -exports.save = async function (ctx) { - const db = getAppDB() +export async function save(ctx: BBContext) { + const db = context.getAppDB() let layout = ctx.request.body if (!layout.props) { @@ -24,8 +24,8 @@ exports.save = async function (ctx) { ctx.status = 200 } -exports.destroy = async function (ctx) { - const db = getAppDB() +export async function destroy(ctx: BBContext) { + const db = context.getAppDB() const layoutId = ctx.params.layoutId, layoutRev = ctx.params.layoutRev diff --git a/packages/server/src/api/controllers/public/tables.ts b/packages/server/src/api/controllers/public/tables.ts index 3ee94bddb3..a346a750da 100644 --- a/packages/server/src/api/controllers/public/tables.ts +++ b/packages/server/src/api/controllers/public/tables.ts @@ -1,6 +1,6 @@ import { search as stringSearch, addRev } from "./utils" -import { default as controller } from "../table" -import { Table } from "../../../definitions/common" +import * as controller from "../table" +import { Table } from "@budibase/types" function fixTable(table: Table, params: any) { if (!params || !table) { diff --git a/packages/server/src/api/controllers/row/external.js b/packages/server/src/api/controllers/row/external.js index fa48106d26..e0c3a9ee4d 100644 --- a/packages/server/src/api/controllers/row/external.js +++ b/packages/server/src/api/controllers/row/external.js @@ -9,7 +9,7 @@ const { breakRowIdField, } = require("../../../integrations/utils") const ExternalRequest = require("./ExternalRequest") -const { getAppDB } = require("@budibase/backend-core/context") +const { context } = require("@budibase/backend-core") const exporters = require("../view/exporters") const { apiFileReturn } = require("../../../utilities/fileSystem") @@ -166,7 +166,7 @@ exports.validate = async () => { exports.exportRows = async ctx => { const { datasourceId } = breakExternalTableId(ctx.params.tableId) - const db = getAppDB() + const db = context.getAppDB() const format = ctx.query.format const { columns } = ctx.request.body const datasource = await db.get(datasourceId) @@ -209,7 +209,7 @@ exports.fetchEnrichedRow = async ctx => { const id = ctx.params.rowId const tableId = ctx.params.tableId const { datasourceId, tableName } = breakExternalTableId(tableId) - const db = getAppDB() + const db = context.getAppDB() const datasource = await db.get(datasourceId) if (!datasource || !datasource.entities) { ctx.throw(400, "Datasource has not been configured for plus API.") diff --git a/packages/server/src/api/controllers/row/internal.js b/packages/server/src/api/controllers/row/internal.js index 0f1324f10e..9b105fd3ae 100644 --- a/packages/server/src/api/controllers/row/internal.js +++ b/packages/server/src/api/controllers/row/internal.js @@ -6,7 +6,6 @@ const { DocumentType, InternalTables, } = require("../../../db/utils") -const { getDB } = require("@budibase/backend-core/db") const userController = require("../user") const { inputProcessing, @@ -26,7 +25,7 @@ const { getFromMemoryDoc, } = require("../view/utils") const { cloneDeep } = require("lodash/fp") -const { getAppDB } = require("@budibase/backend-core/context") +const { context, db: dbCore } = require("@budibase/backend-core") const { finaliseRow, updateRelatedFormula } = require("./staticFormula") const exporters = require("../view/exporters") const { apiFileReturn } = require("../../../utilities/fileSystem") @@ -80,7 +79,7 @@ async function getRawTableData(ctx, db, tableId) { } exports.patch = async ctx => { - const db = getAppDB() + const db = context.getAppDB() const inputs = ctx.request.body const tableId = inputs.tableId const isUserTable = tableId === InternalTables.USER_METADATA @@ -145,7 +144,7 @@ exports.patch = async ctx => { } exports.save = async function (ctx) { - const db = getAppDB() + const db = context.getAppDB() let inputs = ctx.request.body inputs.tableId = ctx.params.tableId @@ -188,7 +187,7 @@ exports.fetchView = async ctx => { return exports.fetch(ctx) } - const db = getAppDB() + const db = context.getAppDB() const { calculation, group, field } = ctx.query const viewInfo = await getView(db, viewName) let response @@ -242,7 +241,7 @@ exports.fetchView = async ctx => { } exports.fetch = async ctx => { - const db = getAppDB() + const db = context.getAppDB() const tableId = ctx.params.tableId let table = await db.get(tableId) @@ -251,7 +250,7 @@ exports.fetch = async ctx => { } exports.find = async ctx => { - const db = getDB(ctx.appId) + const db = dbCore.getDB(ctx.appId) const table = await db.get(ctx.params.tableId) let row = await findRow(ctx, ctx.params.tableId, ctx.params.rowId) row = await outputProcessing(table, row) @@ -259,7 +258,7 @@ exports.find = async ctx => { } exports.destroy = async function (ctx) { - const db = getAppDB() + const db = context.getAppDB() const { _id } = ctx.request.body let row = await db.get(_id) let _rev = ctx.request.body._rev || row._rev @@ -295,7 +294,7 @@ exports.destroy = async function (ctx) { } exports.bulkDestroy = async ctx => { - const db = getAppDB() + const db = context.getAppDB() const tableId = ctx.params.tableId const table = await db.get(tableId) let { rows } = ctx.request.body @@ -338,7 +337,7 @@ exports.search = async ctx => { } const { tableId } = ctx.params - const db = getAppDB() + const db = context.getAppDB() const { paginate, query, ...params } = ctx.request.body params.version = ctx.version params.tableId = tableId @@ -371,7 +370,7 @@ exports.validate = async ctx => { } exports.exportRows = async ctx => { - const db = getAppDB() + const db = context.getAppDB() const table = await db.get(ctx.params.tableId) const rowIds = ctx.request.body.rows let format = ctx.query.format @@ -408,7 +407,7 @@ exports.exportRows = async ctx => { } exports.fetchEnrichedRow = async ctx => { - const db = getAppDB() + const db = context.getAppDB() const tableId = ctx.params.tableId const rowId = ctx.params.rowId // need table to work out where links go in row diff --git a/packages/server/src/api/controllers/row/utils.ts b/packages/server/src/api/controllers/row/utils.ts index eea80a3cd8..3719c206e2 100644 --- a/packages/server/src/api/controllers/row/utils.ts +++ b/packages/server/src/api/controllers/row/utils.ts @@ -1,5 +1,5 @@ import { InternalTables } from "../../../db/utils" -import userController from "../user" +import * as userController from "../user" import { FieldTypes } from "../../../constants" import { context } from "@budibase/backend-core" import { makeExternalQuery } from "../../../integrations/base/query" diff --git a/packages/server/src/api/controllers/table/internal.ts b/packages/server/src/api/controllers/table/internal.ts index 9b2f20497b..a70ba4dcba 100644 --- a/packages/server/src/api/controllers/table/internal.ts +++ b/packages/server/src/api/controllers/table/internal.ts @@ -133,7 +133,7 @@ export async function save(ctx: any) { tableToSave._rev = result.rev } // has to run after, make sure it has _id - await runStaticFormulaChecks(tableToSave, { oldTable, deletion: null }) + await runStaticFormulaChecks(tableToSave, { oldTable, deletion: false }) return tableToSave } @@ -176,7 +176,6 @@ export async function destroy(ctx: any) { // has to run after, make sure it has _id await runStaticFormulaChecks(tableToDelete, { - oldTable: null, deletion: true, }) await cleanupAttachments(tableToDelete, { diff --git a/packages/server/src/api/controllers/user.js b/packages/server/src/api/controllers/user.ts similarity index 69% rename from packages/server/src/api/controllers/user.js rename to packages/server/src/api/controllers/user.ts index 7d4ef65994..f1a66f2c19 100644 --- a/packages/server/src/api/controllers/user.js +++ b/packages/server/src/api/controllers/user.ts @@ -1,23 +1,22 @@ -const { +import { generateUserMetadataID, getUserMetadataParams, generateUserFlagID, -} = require("../../db/utils") -const { InternalTables } = require("../../db/utils") -const { getGlobalUsers, getRawGlobalUser } = require("../../utilities/global") -const { getFullUser } = require("../../utilities/users") -const { isEqual } = require("lodash") -const { BUILTIN_ROLE_IDS } = require("@budibase/backend-core/roles") -const { - getDevelopmentAppID, - getProdAppIDs, - dbExists, -} = require("@budibase/backend-core/db") -const { UserStatus } = require("@budibase/backend-core/constants") -const { getAppDB, doInAppContext } = require("@budibase/backend-core/context") +} from "../../db/utils" +import { InternalTables } from "../../db/utils" +import { getGlobalUsers, getRawGlobalUser } from "../../utilities/global" +import { getFullUser } from "../../utilities/users" +import { isEqual } from "lodash" +import { + context, + constants, + roles as rolesCore, + db as dbCore, +} from "@budibase/backend-core" +import { BBContext, User } from "@budibase/types" async function rawMetadata() { - const db = getAppDB() + const db = context.getAppDB() return ( await db.allDocs( getUserMetadataParams(null, { @@ -27,9 +26,9 @@ async function rawMetadata() { ).rows.map(row => row.doc) } -function combineMetadataAndUser(user, metadata) { +function combineMetadataAndUser(user: any, metadata: any) { // skip users with no access - if (user.roleId === BUILTIN_ROLE_IDS.PUBLIC) { + if (user.roleId === rolesCore.BUILTIN_ROLE_IDS.PUBLIC) { return null } delete user._rev @@ -55,9 +54,9 @@ function combineMetadataAndUser(user, metadata) { return null } -exports.syncGlobalUsers = async () => { +export async function syncGlobalUsers() { // sync user metadata - const db = getAppDB() + const db = context.getAppDB() const [users, metadata] = await Promise.all([getGlobalUsers(), rawMetadata()]) const toWrite = [] for (let user of users) { @@ -69,13 +68,13 @@ exports.syncGlobalUsers = async () => { await db.bulkDocs(toWrite) } -exports.syncUser = async function (ctx) { +export async function syncUser(ctx: BBContext) { let deleting = false, - user + user: User | any const userId = ctx.params.id try { user = await getRawGlobalUser(userId) - } catch (err) { + } catch (err: any) { if (err && err.status === 404) { user = {} deleting = true @@ -92,21 +91,21 @@ exports.syncUser = async function (ctx) { let prodAppIds // if they are a builder then get all production app IDs if ((user.builder && user.builder.global) || deleting) { - prodAppIds = await getProdAppIDs() + prodAppIds = await dbCore.getProdAppIDs() } else { prodAppIds = Object.entries(roles) - .filter(entry => entry[1] !== BUILTIN_ROLE_IDS.PUBLIC) + .filter(entry => entry[1] !== rolesCore.BUILTIN_ROLE_IDS.PUBLIC) .map(([appId]) => appId) } for (let prodAppId of prodAppIds) { const roleId = roles[prodAppId] - const devAppId = getDevelopmentAppID(prodAppId) + const devAppId = dbCore.getDevelopmentAppID(prodAppId) for (let appId of [prodAppId, devAppId]) { - if (!(await dbExists(appId))) { + if (!(await dbCore.dbExists(appId))) { continue } - await doInAppContext(appId, async () => { - const db = getAppDB() + await context.doInAppContext(appId, async () => { + const db = context.getAppDB() const metadataId = generateUserMetadataID(userId) let metadata try { @@ -127,8 +126,8 @@ exports.syncUser = async function (ctx) { ? combineMetadataAndUser(user, metadata) : { ...metadata, - status: UserStatus.INACTIVE, - metadata: BUILTIN_ROLE_IDS.PUBLIC, + status: constants.UserStatus.INACTIVE, + metadata: rolesCore.BUILTIN_ROLE_IDS.PUBLIC, } // if its null then there was no updates required if (combined) { @@ -142,10 +141,9 @@ exports.syncUser = async function (ctx) { } } -exports.fetchMetadata = async function (ctx) { - const database = getAppDB() +export async function fetchMetadata(ctx: BBContext) { const global = await getGlobalUsers() - const metadata = await rawMetadata(database) + const metadata = await rawMetadata() const users = [] for (let user of global) { // find the metadata that matches up to the global ID @@ -162,18 +160,18 @@ exports.fetchMetadata = async function (ctx) { ctx.body = users } -exports.updateSelfMetadata = async function (ctx) { +export async function updateSelfMetadata(ctx: BBContext) { // overwrite the ID with current users - ctx.request.body._id = ctx.user._id + ctx.request.body._id = ctx.user?._id // make sure no stale rev delete ctx.request.body._rev // make sure no csrf token delete ctx.request.body.csrfToken - await exports.updateMetadata(ctx) + await updateMetadata(ctx) } -exports.updateMetadata = async function (ctx) { - const db = getAppDB() +export async function updateMetadata(ctx: BBContext) { + const db = context.getAppDB() const user = ctx.request.body // this isn't applicable to the user delete user.roles @@ -184,8 +182,8 @@ exports.updateMetadata = async function (ctx) { ctx.body = await db.put(metadata) } -exports.destroyMetadata = async function (ctx) { - const db = getAppDB() +export async function destroyMetadata(ctx: BBContext) { + const db = context.getAppDB() try { const dbUser = await db.get(ctx.params.id) await db.remove(dbUser._id, dbUser._rev) @@ -197,18 +195,18 @@ exports.destroyMetadata = async function (ctx) { } } -exports.findMetadata = async function (ctx) { +export async function findMetadata(ctx: BBContext) { ctx.body = await getFullUser(ctx, ctx.params.id) } -exports.setFlag = async function (ctx) { - const userId = ctx.user._id +export async function setFlag(ctx: BBContext) { + const userId = ctx.user?._id const { flag, value } = ctx.request.body if (!flag) { ctx.throw(400, "Must supply a 'flag' field in request body.") } - const flagDocId = generateUserFlagID(userId) - const db = getAppDB() + const flagDocId = generateUserFlagID(userId!) + const db = context.getAppDB() let doc try { doc = await db.get(flagDocId) @@ -220,10 +218,10 @@ exports.setFlag = async function (ctx) { ctx.body = { message: "Flag set successfully" } } -exports.getFlags = async function (ctx) { - const userId = ctx.user._id - const docId = generateUserFlagID(userId) - const db = getAppDB() +export async function getFlags(ctx: BBContext) { + const userId = ctx.user?._id + const docId = generateUserFlagID(userId!) + const db = context.getAppDB() let doc try { doc = await db.get(docId) diff --git a/packages/server/src/api/controllers/view/utils.ts b/packages/server/src/api/controllers/view/utils.ts index 7fa37e6c5d..ef7ce772f9 100644 --- a/packages/server/src/api/controllers/view/utils.ts +++ b/packages/server/src/api/controllers/view/utils.ts @@ -70,7 +70,7 @@ export async function getViews() { } export async function saveView( - originalName: string, + originalName: string | null, viewName: string, viewTemplate: any ) { diff --git a/packages/server/src/api/index.js b/packages/server/src/api/index.ts similarity index 70% rename from packages/server/src/api/index.js rename to packages/server/src/api/index.ts index 4cd574f557..a77fc62b9b 100644 --- a/packages/server/src/api/index.js +++ b/packages/server/src/api/index.ts @@ -1,20 +1,15 @@ -const Router = require("@koa/router") -const { - buildAuthMiddleware, - auditLog, - buildTenancyMiddleware, -} = require("@budibase/backend-core/auth") -const { errors } = require("@budibase/backend-core") -const currentApp = require("../middleware/currentapp") +import Router from "@koa/router" +import { errors, auth } from "@budibase/backend-core" +import currentApp from "../middleware/currentapp" +import zlib from "zlib" +import { mainRoutes, staticRoutes, publicRoutes } from "./routes" +import pkg from "../../package.json" +import env from "../environment" +import { middleware as pro } from "@budibase/pro" +export { shutdown } from "./routes/public" const compress = require("koa-compress") -const zlib = require("zlib") -const { mainRoutes, staticRoutes, publicRoutes } = require("./routes") -const pkg = require("../../package.json") -const env = require("../environment") -const { middleware: pro } = require("@budibase/pro") -const { shutdown } = require("./routes/public") -const router = new Router() +export const router: Router = new Router() router.get("/health", ctx => (ctx.status = 200)) router.get("/version", ctx => (ctx.body = pkg.version)) @@ -42,7 +37,7 @@ router // re-direct before any middlewares occur .redirect("/", "/builder") .use( - buildAuthMiddleware(null, { + auth.buildAuthMiddleware(null, { publicAllowed: true, }) ) @@ -50,19 +45,20 @@ router // the server can be public anywhere, so nowhere should throw errors // if the tenancy has not been set, it'll have to be discovered at application layer .use( - buildTenancyMiddleware(null, null, { + auth.buildTenancyMiddleware(null, null, { noTenancyRequired: true, }) ) .use(pro.licensing()) + // @ts-ignore .use(currentApp) - .use(auditLog) + .use(auth.auditLog) // error handling middleware router.use(async (ctx, next) => { try { await next() - } catch (err) { + } catch (err: any) { ctx.status = err.status || err.statusCode || 500 const error = errors.getPublicError(err) ctx.body = { @@ -91,6 +87,3 @@ router.use(publicRoutes.allowedMethods()) // WARNING - static routes will catch everything else after them this must be last router.use(staticRoutes.routes()) router.use(staticRoutes.allowedMethods()) - -module.exports.router = router -module.exports.shutdown = shutdown diff --git a/packages/server/src/api/routes/layout.ts b/packages/server/src/api/routes/layout.ts index 6ec48b9263..cdfdb4002a 100644 --- a/packages/server/src/api/routes/layout.ts +++ b/packages/server/src/api/routes/layout.ts @@ -1,7 +1,7 @@ import Router from "@koa/router" import authorized from "../../middleware/authorized" import { permissions } from "@budibase/backend-core" -import controller from "../controllers/layout" +import * as controller from "../controllers/layout" const router: Router = new Router() diff --git a/packages/server/src/api/routes/script.ts b/packages/server/src/api/routes/script.ts index 44f1069c9e..271cbc51c6 100644 --- a/packages/server/src/api/routes/script.ts +++ b/packages/server/src/api/routes/script.ts @@ -1,7 +1,7 @@ import Router from "@koa/router" import * as controller from "../controllers/script" import authorized from "../../middleware/authorized" -import { permissions } from "@budibase/backend-core/permissions" +import { permissions } from "@budibase/backend-core" const router: Router = new Router() diff --git a/packages/server/src/api/routes/tests/permissions.spec.js b/packages/server/src/api/routes/tests/permissions.spec.js index b416d1c0bf..093f63913a 100644 --- a/packages/server/src/api/routes/tests/permissions.spec.js +++ b/packages/server/src/api/routes/tests/permissions.spec.js @@ -1,6 +1,7 @@ -const { BUILTIN_ROLE_IDS } = require("@budibase/backend-core/roles") +const { roles } = require("@budibase/backend-core") const setup = require("./utilities") const { basicRow } = setup.structures +const { BUILTIN_ROLE_IDS } = roles const HIGHER_ROLE_ID = BUILTIN_ROLE_IDS.BASIC const STD_ROLE_ID = BUILTIN_ROLE_IDS.PUBLIC diff --git a/packages/server/src/api/routes/tests/role.spec.js b/packages/server/src/api/routes/tests/role.spec.js index 56a3f1e9d9..8402a7b13c 100644 --- a/packages/server/src/api/routes/tests/role.spec.js +++ b/packages/server/src/api/routes/tests/role.spec.js @@ -1,10 +1,8 @@ -const { BUILTIN_ROLE_IDS } = require("@budibase/backend-core/roles") -const { - BuiltinPermissionID, -} = require("@budibase/backend-core/permissions") +const { roles, events, permissions } = require("@budibase/backend-core") const setup = require("./utilities") const { basicRole } = setup.structures -const { events } = require("@budibase/backend-core") +const { BUILTIN_ROLE_IDS } = roles +const { BuiltinPermissionID } = permissions describe("/roles", () => { let request = setup.getRequest() diff --git a/packages/server/src/api/routes/tests/routing.spec.js b/packages/server/src/api/routes/tests/routing.spec.js index 1c3abf2457..148e5eded1 100644 --- a/packages/server/src/api/routes/tests/routing.spec.js +++ b/packages/server/src/api/routes/tests/routing.spec.js @@ -1,7 +1,8 @@ const setup = require("./utilities") const { basicScreen } = setup.structures const { checkBuilderEndpoint, runInProd } = require("./utilities/TestFunctions") -const { BUILTIN_ROLE_IDS } = require("@budibase/backend-core/roles") +const { roles } = require("@budibase/backend-core") +const { BUILTIN_ROLE_IDS } = roles const route = "/test" diff --git a/packages/server/src/api/routes/tests/row.spec.js b/packages/server/src/api/routes/tests/row.spec.js index afcc73fd36..65e6df544a 100644 --- a/packages/server/src/api/routes/tests/row.spec.js +++ b/packages/server/src/api/routes/tests/row.spec.js @@ -1,8 +1,7 @@ const { outputProcessing } = require("../../../utilities/rowProcessor") const setup = require("./utilities") const { basicRow } = setup.structures -const { doInAppContext } = require("@budibase/backend-core/context") -const { doInTenant } = require("@budibase/backend-core/tenancy") +const { context, tenancy } = require("@budibase/backend-core") const { quotas, } = require("@budibase/pro") @@ -447,7 +446,7 @@ describe("/rows", () => { describe("fetchEnrichedRows", () => { it("should allow enriching some linked rows", async () => { - const { table, firstRow, secondRow } = await doInTenant( + const { table, firstRow, secondRow } = await tenancy.doInTenant( setup.structures.TENANT_ID, async () => { const table = await config.createLinkedTable() @@ -507,7 +506,7 @@ describe("/rows", () => { }) // the environment needs configured for this await setup.switchToSelfHosted(async () => { - doInAppContext(config.getAppId(), async () => { + context.doInAppContext(config.getAppId(), async () => { const enriched = await outputProcessing(table, [row]) expect(enriched[0].attachment[0].url).toBe( `/prod-budi-app-assets/${config.getAppId()}/attachments/test/thing.csv` diff --git a/packages/server/src/api/routes/tests/user.spec.js b/packages/server/src/api/routes/tests/user.spec.js index 29c33b3899..7e4bf02616 100644 --- a/packages/server/src/api/routes/tests/user.spec.js +++ b/packages/server/src/api/routes/tests/user.spec.js @@ -1,6 +1,7 @@ -const { BUILTIN_ROLE_IDS } = require("@budibase/backend-core/roles") +const { roles } = require("@budibase/backend-core") const { checkPermissionsEndpoint } = require("./utilities/TestFunctions") const setup = require("./utilities") +const { BUILTIN_ROLE_IDS } = roles jest.mock("../../../utilities/workerRequests", () => ({ getGlobalUsers: jest.fn(() => { diff --git a/packages/server/src/api/routes/tests/utilities/TestFunctions.ts b/packages/server/src/api/routes/tests/utilities/TestFunctions.ts index a34527e8f2..3ac7dea5ac 100644 --- a/packages/server/src/api/routes/tests/utilities/TestFunctions.ts +++ b/packages/server/src/api/routes/tests/utilities/TestFunctions.ts @@ -1,10 +1,8 @@ import * as rowController from "../../../controllers/row" import * as appController from "../../../controllers/application" import { AppStatus } from "../../../../db/utils" -import { BUILTIN_ROLE_IDS } from "@budibase/backend-core/roles" -import { doInTenant } from "@budibase/backend-core/tenancy" +import { roles, tenancy, context } from "@budibase/backend-core" import { TENANT_ID } from "../../../../tests/utilities/structures" -import { getAppDB, doInAppContext } from "@budibase/backend-core/context" import * as env from "../../../../environment" class Request { @@ -21,7 +19,7 @@ class Request { } function runRequest(appId: any, controlFunc: any, request?: any) { - return doInAppContext(appId, async () => { + return context.doInAppContext(appId, async () => { return controlFunc(request) }) } @@ -33,7 +31,7 @@ export const getAllTableRows = async (config: any) => { } export const clearAllApps = async (tenantId = TENANT_ID) => { - await doInTenant(tenantId, async () => { + await tenancy.doInTenant(tenantId, async () => { const req: any = { query: { status: AppStatus.DEV }, user: { tenantId } } await appController.fetch(req) const apps = req.body @@ -51,7 +49,7 @@ export const clearAllApps = async (tenantId = TENANT_ID) => { export const clearAllAutomations = async (config: any) => { const automations = await config.getAllAutomations() for (let auto of automations) { - await doInAppContext(config.appId, async () => { + await context.doInAppContext(config.appId, async () => { await config.deleteAutomation(auto) }) } @@ -110,7 +108,7 @@ export const checkPermissionsEndpoint = async ({ .expect(200) let failHeader - if (failRole === BUILTIN_ROLE_IDS.PUBLIC) { + if (failRole === roles.BUILTIN_ROLE_IDS.PUBLIC) { failHeader = config.publicHeaders({ prodApp: true }) } else { failHeader = await config.login({ @@ -127,7 +125,7 @@ export const checkPermissionsEndpoint = async ({ } export const getDB = () => { - return getAppDB() + return context.getAppDB() } export const testAutomation = async (config: any, automation: any) => { diff --git a/packages/server/src/api/routes/user.ts b/packages/server/src/api/routes/user.ts index 95010bf8f2..60eaf5b1b9 100644 --- a/packages/server/src/api/routes/user.ts +++ b/packages/server/src/api/routes/user.ts @@ -1,5 +1,5 @@ import Router from "@koa/router" -import controller from "../controllers/user" +import * as controller from "../controllers/user" import authorized from "../../middleware/authorized" import { permissions } from "@budibase/backend-core" const { PermissionType, PermissionLevel } = permissions diff --git a/packages/server/src/app.ts b/packages/server/src/app.ts index 9253186498..8a9c1d5b24 100644 --- a/packages/server/src/app.ts +++ b/packages/server/src/app.ts @@ -19,10 +19,9 @@ const http = require("http") const api = require("./api") const automations = require("./automations/index") const Sentry = require("@sentry/node") -const { logAlert } = require("@budibase/backend-core/logging") const { Thread } = require("./threads") -import redis from "./utilities/redis" -import { events } from "@budibase/backend-core" +import * as redis from "./utilities/redis" +import { events, logging } from "@budibase/backend-core" import { initialise as initialiseWebsockets } from "./websocket" import { startup } from "./startup" @@ -93,7 +92,7 @@ process.on("uncaughtException", err => { return } errCode = -1 - logAlert("Uncaught exception.", err) + logging.logAlert("Uncaught exception.", err) shutdown() }) diff --git a/packages/server/src/automations/triggers.js b/packages/server/src/automations/triggers.js index 3481cebf9b..4f865d4df8 100644 --- a/packages/server/src/automations/triggers.js +++ b/packages/server/src/automations/triggers.js @@ -8,8 +8,7 @@ const { automationQueue } = require("./bullboard") const { checkTestFlag } = require("../utilities/redis") const utils = require("./utils") const env = require("../environment") -const { doInAppContext, getAppDB } = require("@budibase/backend-core/context") -const { getAllApps } = require("@budibase/backend-core/db") +const { context, db: dbCore } = require("@budibase/backend-core") const TRIGGER_DEFINITIONS = definitions const JOB_OPTS = { @@ -18,7 +17,7 @@ const JOB_OPTS = { } async function getAllAutomations() { - const db = getAppDB() + const db = context.getAppDB() let automations = await db.allDocs( getAutomationParams(null, { include_docs: true }) ) @@ -30,7 +29,7 @@ async function queueRelevantRowAutomations(event, eventType) { throw `No appId specified for ${eventType} - check event emitters.` } - doInAppContext(event.appId, async () => { + context.doInAppContext(event.appId, async () => { let automations = await getAllAutomations() // filter down to the correct event type @@ -122,9 +121,9 @@ exports.rebootTrigger = async () => { } // iterate through all production apps, find the reboot crons // and trigger events for them - const appIds = await getAllApps({ dev: false, idsOnly: true }) + const appIds = await dbCore.getAllApps({ dev: false, idsOnly: true }) for (let prodAppId of appIds) { - await doInAppContext(prodAppId, async () => { + await context.doInAppContext(prodAppId, async () => { let automations = await getAllAutomations() let rebootEvents = [] for (let automation of automations) { diff --git a/packages/server/src/constants/index.js b/packages/server/src/constants/index.js index 6d8fe57baa..5f68cc26ed 100644 --- a/packages/server/src/constants/index.js +++ b/packages/server/src/constants/index.js @@ -1,6 +1,4 @@ -const { BUILTIN_ROLE_IDS } = require("@budibase/backend-core/roles") -const { UserStatus } = require("@budibase/backend-core/constants") -const { objectStore } = require("@budibase/backend-core") +const { objectStore, roles, constants } = require("@budibase/backend-core") const FilterTypes = { STRING: "string", @@ -139,7 +137,7 @@ exports.USERS_TABLE_SCHEMA = { constraints: { type: exports.FieldTypes.STRING, presence: false, - inclusion: Object.values(BUILTIN_ROLE_IDS), + inclusion: Object.values(roles.BUILTIN_ROLE_IDS), }, }, status: { @@ -149,7 +147,7 @@ exports.USERS_TABLE_SCHEMA = { constraints: { type: exports.FieldTypes.STRING, presence: false, - inclusion: Object.values(UserStatus), + inclusion: Object.values(constants.UserStatus), }, }, }, diff --git a/packages/server/src/constants/screens.js b/packages/server/src/constants/screens.js index 23f8bc88df..dc21c0d9bd 100644 --- a/packages/server/src/constants/screens.js +++ b/packages/server/src/constants/screens.js @@ -1,4 +1,4 @@ -const { BUILTIN_ROLE_IDS } = require("@budibase/backend-core/roles") +const { roles } = require("@budibase/backend-core") const { BASE_LAYOUT_PROP_IDS } = require("./layouts") exports.createHomeScreen = () => ({ @@ -40,7 +40,7 @@ exports.createHomeScreen = () => ({ }, routing: { route: "/", - roleId: BUILTIN_ROLE_IDS.BASIC, + roleId: roles.BUILTIN_ROLE_IDS.BASIC, }, name: "home-screen", }) diff --git a/packages/server/src/db/inMemoryView.js b/packages/server/src/db/inMemoryView.js index 57ea89071c..278b906e24 100644 --- a/packages/server/src/db/inMemoryView.js +++ b/packages/server/src/db/inMemoryView.js @@ -2,8 +2,8 @@ const newid = require("./newid") // bypass the main application db config // use in memory pouchdb directly -const { getPouch, closePouchDB } = require("@budibase/backend-core/db") -const Pouch = getPouch({ inMemory: true }) +const { db: dbCore } = require("@budibase/backend-core") +const Pouch = dbCore.getPouch({ inMemory: true }) exports.runView = async (view, calculation, group, data) => { // use a different ID each time for the DB, make sure they @@ -44,6 +44,6 @@ exports.runView = async (view, calculation, group, data) => { return response } finally { await db.destroy() - await closePouchDB(db) + await dbCore.closePouchDB(db) } } diff --git a/packages/server/src/db/linkedRows/LinkController.js b/packages/server/src/db/linkedRows/LinkController.js index e7c338f709..df24b97e85 100644 --- a/packages/server/src/db/linkedRows/LinkController.js +++ b/packages/server/src/db/linkedRows/LinkController.js @@ -2,12 +2,12 @@ const { IncludeDocs, getLinkDocuments } = require("./linkUtils") const { InternalTables, getUserMetadataParams } = require("../utils") const Sentry = require("@sentry/node") const { FieldTypes, RelationshipTypes } = require("../../constants") -const { getAppDB } = require("@budibase/backend-core/context") +const { context } = require("@budibase/backend-core") const LinkDocument = require("./LinkDocument") class LinkController { constructor({ tableId, row, table, oldTable }) { - this._db = getAppDB() + this._db = context.getAppDB() this._tableId = tableId this._row = row this._table = table diff --git a/packages/server/src/db/linkedRows/index.js b/packages/server/src/db/linkedRows/index.js index 45bc72156f..1ee98f6148 100644 --- a/packages/server/src/db/linkedRows/index.js +++ b/packages/server/src/db/linkedRows/index.js @@ -14,7 +14,7 @@ const { getMultiIDParams, USER_METDATA_PREFIX } = require("../../db/utils") const { partition } = require("lodash") const { getGlobalUsersFromMetadata } = require("../../utilities/global") const { processFormulas } = require("../../utilities/rowProcessor/utils") -const { getAppDB } = require("@budibase/backend-core/context") +const { context } = require("@budibase/backend-core") /** * This functionality makes sure that when rows with links are created, updated or deleted they are processed @@ -74,7 +74,7 @@ async function getLinksForRows(rows) { async function getFullLinkedDocs(links) { // create DBs - const db = getAppDB() + const db = context.getAppDB() const linkedRowIds = links.map(link => link.id) const uniqueRowIds = [...new Set(linkedRowIds)] let dbRows = (await db.allDocs(getMultiIDParams(uniqueRowIds))).rows.map( diff --git a/packages/server/src/db/linkedRows/linkUtils.js b/packages/server/src/db/linkedRows/linkUtils.js index 5fc393ecf0..25a1b5fcf8 100644 --- a/packages/server/src/db/linkedRows/linkUtils.js +++ b/packages/server/src/db/linkedRows/linkUtils.js @@ -2,7 +2,7 @@ const Sentry = require("@sentry/node") const { ViewName, getQueryIndex } = require("../utils") const { FieldTypes } = require("../../constants") const { createLinkView } = require("../views/staticViews") -const { getAppDB } = require("@budibase/backend-core/context") +const { context } = require("@budibase/backend-core") /** * Only needed so that boolean parameters are being used for includeDocs @@ -30,7 +30,7 @@ exports.createLinkView = createLinkView */ exports.getLinkDocuments = async function (args) { const { tableId, rowId, includeDocs } = args - const db = getAppDB() + const db = context.getAppDB() let params if (rowId != null) { params = { key: [tableId, rowId] } @@ -89,7 +89,7 @@ exports.getLinkedTableIDs = table => { } exports.getLinkedTable = async (id, tables) => { - const db = getAppDB() + const db = context.getAppDB() let linkedTable = tables.find(table => table._id === id) if (linkedTable) { return linkedTable diff --git a/packages/server/src/db/utils.ts b/packages/server/src/db/utils.ts index 13bf6eb3b5..ac5a6162b9 100644 --- a/packages/server/src/db/utils.ts +++ b/packages/server/src/db/utils.ts @@ -128,7 +128,7 @@ export function getLinkParams(otherProps: any = {}) { * Generates a new layout ID. * @returns {string} The new layout ID which the layout doc can be stored under. */ -export function generateLayoutID(id: string) { +export function generateLayoutID(id?: string) { return `${DocumentType.LAYOUT}${SEPARATOR}${id || newid()}` } diff --git a/packages/server/src/db/views/staticViews.js b/packages/server/src/db/views/staticViews.js index d715c02968..10ad8fd410 100644 --- a/packages/server/src/db/views/staticViews.js +++ b/packages/server/src/db/views/staticViews.js @@ -1,4 +1,4 @@ -const { getAppDB } = require("@budibase/backend-core/context") +const { context } = require("@budibase/backend-core") const { DocumentType, SEPARATOR, ViewName, SearchIndexes } = require("../utils") const SCREEN_PREFIX = DocumentType.SCREEN + SEPARATOR @@ -20,7 +20,7 @@ const SCREEN_PREFIX = DocumentType.SCREEN + SEPARATOR * so it may be slow. */ exports.createLinkView = async () => { - const db = getAppDB() + const db = context.getAppDB() const designDoc = await db.get("_design/database") const view = { map: function (doc) { @@ -54,7 +54,7 @@ exports.createLinkView = async () => { } exports.createRoutingView = async () => { - const db = getAppDB() + const db = context.getAppDB() const designDoc = await db.get("_design/database") const view = { // if using variables in a map function need to inject them before use @@ -75,7 +75,7 @@ exports.createRoutingView = async () => { } async function searchIndex(indexName, fnString) { - const db = getAppDB() + const db = context.getAppDB() const designDoc = await db.get("_design/database") designDoc.indexes = { [indexName]: { diff --git a/packages/server/src/integrations/base/sql.ts b/packages/server/src/integrations/base/sql.ts index f18e9d1d98..43ebc8b1dd 100644 --- a/packages/server/src/integrations/base/sql.ts +++ b/packages/server/src/integrations/base/sql.ts @@ -96,7 +96,7 @@ function generateSelectStatement( ): (string | Knex.Raw)[] { const { resource, meta } = json const schema = meta?.table?.schema - return resource.fields.map(field => { + return resource!.fields.map(field => { const fieldNames = field.split(/\./g) const tableName = fieldNames[0] const columnName = fieldNames[1] diff --git a/packages/server/src/integrations/base/sqlTable.ts b/packages/server/src/integrations/base/sqlTable.ts index 02f7ad8718..2ab610fecd 100644 --- a/packages/server/src/integrations/base/sqlTable.ts +++ b/packages/server/src/integrations/base/sqlTable.ts @@ -185,7 +185,7 @@ class SqlTableQueryBuilder { json.table, json.meta.tables, json.meta.table, - json.meta.renamed + json.meta.renamed! ) break case Operation.DELETE_TABLE: diff --git a/packages/server/src/integrations/index.ts b/packages/server/src/integrations/index.ts index c926aeb992..e6f5968e32 100644 --- a/packages/server/src/integrations/index.ts +++ b/packages/server/src/integrations/index.ts @@ -67,50 +67,54 @@ if ( INTEGRATIONS[SourceName.ORACLE] = oracle.integration } -module.exports = { - getDefinitions: async () => { - const pluginSchemas: { [key: string]: Integration } = {} - if (environment.SELF_HOSTED) { - const plugins = await getPlugins(PluginType.DATASOURCE) - // extract the actual schema from each custom - for (let plugin of plugins) { - const sourceId = plugin.name - pluginSchemas[sourceId] = { - ...plugin.schema["schema"], - custom: true, - } - if (plugin.iconUrl) { - pluginSchemas[sourceId].iconUrl = plugin.iconUrl - } +export async function getDefinitions() { + const pluginSchemas: { [key: string]: Integration } = {} + if (environment.SELF_HOSTED) { + const plugins = await getPlugins(PluginType.DATASOURCE) + // extract the actual schema from each custom + for (let plugin of plugins) { + const sourceId = plugin.name + pluginSchemas[sourceId] = { + ...plugin.schema["schema"], + custom: true, + } + if (plugin.iconUrl) { + pluginSchemas[sourceId].iconUrl = plugin.iconUrl } } - return { - ...cloneDeep(DEFINITIONS), - ...pluginSchemas, - } - }, - getIntegration: async (integration: string) => { - if (INTEGRATIONS[integration]) { - return INTEGRATIONS[integration] - } - if (environment.SELF_HOSTED) { - const plugins = await getPlugins(PluginType.DATASOURCE) - for (let plugin of plugins) { - if (plugin.name === integration) { - // need to use commonJS require due to its dynamic runtime nature - const retrieved: any = await getDatasourcePlugin( - plugin.name, - plugin.jsUrl, - plugin.schema?.hash - ) - if (retrieved.integration) { - return retrieved.integration - } else { - return retrieved - } - } - } - } - throw new Error("No datasource implementation found.") - }, + } + return { + ...cloneDeep(DEFINITIONS), + ...pluginSchemas, + } +} + +export async function getIntegration(integration: string) { + if (INTEGRATIONS[integration]) { + return INTEGRATIONS[integration] + } + if (environment.SELF_HOSTED) { + const plugins = await getPlugins(PluginType.DATASOURCE) + for (let plugin of plugins) { + if (plugin.name === integration) { + // need to use commonJS require due to its dynamic runtime nature + const retrieved: any = await getDatasourcePlugin( + plugin.name, + plugin.jsUrl, + plugin.schema?.hash + ) + if (retrieved.integration) { + return retrieved.integration + } else { + return retrieved + } + } + } + } + throw new Error("No datasource implementation found.") +} + +export default { + getDefinitions, + getIntegration, } diff --git a/packages/server/src/migrations/functions/appUrls.ts b/packages/server/src/migrations/functions/appUrls.ts index 1b563bb932..4d5ce6c30c 100644 --- a/packages/server/src/migrations/functions/appUrls.ts +++ b/packages/server/src/migrations/functions/appUrls.ts @@ -1,4 +1,4 @@ -const { DocumentType } = require("@budibase/backend-core/db") +import { db as dbCore } from "@budibase/backend-core" import { getAppUrl } from "../../api/controllers/application" /** @@ -11,7 +11,7 @@ import { getAppUrl } from "../../api/controllers/application" export const run = async (appDb: any) => { let metadata try { - metadata = await appDb.get(DocumentType.APP_METADATA) + metadata = await appDb.get(dbCore.DocumentType.APP_METADATA) } catch (e) { // sometimes the metadata document doesn't exist // exit early instead of failing the migration diff --git a/packages/server/src/migrations/functions/tests/appUrls.spec.js b/packages/server/src/migrations/functions/tests/appUrls.spec.js index 4551bac160..dafe67712f 100644 --- a/packages/server/src/migrations/functions/tests/appUrls.spec.js +++ b/packages/server/src/migrations/functions/tests/appUrls.spec.js @@ -1,4 +1,4 @@ -const { DocumentType, doWithDB } = require("@budibase/backend-core/db") +const { db: dbCore } = require("@budibase/backend-core") const TestConfig = require("../../../tests/utilities/TestConfiguration") const migration = require("../appUrls") @@ -14,12 +14,12 @@ describe("run", () => { it("runs successfully", async () => { const app = await config.createApp("testApp") - const metadata = await doWithDB(app.appId, async db => { - const metadataDoc = await db.get( DocumentType.APP_METADATA) + const metadata = await dbCore.doWithDB(app.appId, async db => { + const metadataDoc = await db.get(dbCore.DocumentType.APP_METADATA) delete metadataDoc.url await db.put(metadataDoc) await migration.run(db) - return await db.get( DocumentType.APP_METADATA) + return await db.get(dbCore.DocumentType.APP_METADATA) }) expect(metadata.url).toEqual("/testapp") }) diff --git a/packages/server/src/migrations/functions/tests/userEmailViewCasing.spec.js b/packages/server/src/migrations/functions/tests/userEmailViewCasing.spec.js index 3c8894f8e5..e6e6725f07 100644 --- a/packages/server/src/migrations/functions/tests/userEmailViewCasing.spec.js +++ b/packages/server/src/migrations/functions/tests/userEmailViewCasing.spec.js @@ -1,11 +1,16 @@ -jest.mock("@budibase/backend-core/db", () => ({ - ...jest.requireActual("@budibase/backend-core/db"), - createNewUserEmailView: jest.fn(), -})) -const coreDb = require("@budibase/backend-core/db") +jest.mock("@budibase/backend-core", () => { + const core = jest.requireActual("@budibase/backend-core") + return { + ...core, + db: { + ...core.db, + createNewUserEmailView: jest.fn() + } + } +}) +const { tenancy, db: dbCore } = require("@budibase/backend-core") const TestConfig = require("../../../tests/utilities/TestConfiguration") const { TENANT_ID } = require("../../../tests/utilities/structures") -const { getGlobalDB, doInTenant } = require("@budibase/backend-core/tenancy") // mock email view creation @@ -21,10 +26,10 @@ describe("run", () => { afterAll(config.end) it("runs successfully", async () => { - await doInTenant(TENANT_ID, async () => { - const globalDb = getGlobalDB() + await tenancy.doInTenant(TENANT_ID, async () => { + const globalDb = tenancy.getGlobalDB() await migration.run(globalDb) - expect(coreDb.createNewUserEmailView).toHaveBeenCalledTimes(1) + expect(dbCore.createNewUserEmailView).toHaveBeenCalledTimes(1) }) }) }) diff --git a/packages/server/src/migrations/functions/usageQuotas/syncApps.ts b/packages/server/src/migrations/functions/usageQuotas/syncApps.ts index 76e2dbdacd..351154dccc 100644 --- a/packages/server/src/migrations/functions/usageQuotas/syncApps.ts +++ b/packages/server/src/migrations/functions/usageQuotas/syncApps.ts @@ -1,15 +1,14 @@ -import { getTenantId } from "@budibase/backend-core/tenancy" -import { getAllApps } from "@budibase/backend-core/db" +import { tenancy, db as dbCore } from "@budibase/backend-core" import { quotas } from "@budibase/pro" import { QuotaUsageType, StaticQuotaName } from "@budibase/types" export const run = async () => { // get app count - const devApps = await getAllApps({ dev: true }) + const devApps = await dbCore.getAllApps({ dev: true }) const appCount = devApps ? devApps.length : 0 // sync app count - const tenantId = getTenantId() + const tenantId = tenancy.getTenantId() console.log(`[Tenant: ${tenantId}] Syncing app count: ${appCount}`) await quotas.setUsage(appCount, StaticQuotaName.APPS, QuotaUsageType.STATIC) } diff --git a/packages/server/src/migrations/functions/usageQuotas/syncRows.ts b/packages/server/src/migrations/functions/usageQuotas/syncRows.ts index e5c8a1743c..92574d1f27 100644 --- a/packages/server/src/migrations/functions/usageQuotas/syncRows.ts +++ b/packages/server/src/migrations/functions/usageQuotas/syncRows.ts @@ -1,12 +1,11 @@ -import { getTenantId } from "@budibase/backend-core/tenancy" -import { getAllApps } from "@budibase/backend-core/db" +import { tenancy, db as dbCore } from "@budibase/backend-core" import { getUniqueRows } from "../../../utilities/usageQuota/rows" import { quotas } from "@budibase/pro" import { StaticQuotaName, QuotaUsageType, App } from "@budibase/types" export const run = async () => { // get all rows in all apps - const allApps = (await getAllApps({ all: true })) as App[] + const allApps = (await dbCore.getAllApps({ all: true })) as App[] const appIds = allApps ? allApps.map((app: { appId: any }) => app.appId) : [] const { appRows } = await getUniqueRows(appIds) @@ -19,7 +18,7 @@ export const run = async () => { }) // sync row count - const tenantId = getTenantId() + const tenantId = tenancy.getTenantId() console.log(`[Tenant: ${tenantId}] Syncing row count: ${rowCount}`) await quotas.setUsagePerApp( counts, diff --git a/packages/server/src/migrations/functions/usageQuotas/tests/syncRows.spec.ts b/packages/server/src/migrations/functions/usageQuotas/tests/syncRows.spec.ts index b0d429fbe8..a5cb203e0f 100644 --- a/packages/server/src/migrations/functions/usageQuotas/tests/syncRows.spec.ts +++ b/packages/server/src/migrations/functions/usageQuotas/tests/syncRows.spec.ts @@ -2,7 +2,7 @@ import TestConfig from "../../../../tests/utilities/TestConfiguration" import * as syncRows from "../syncRows" import { quotas } from "@budibase/pro" import { QuotaUsageType, StaticQuotaName } from "@budibase/types" -const { getProdAppID } = require("@budibase/backend-core/db") +const { db: dbCore } = require("@budibase/backend-core") describe("syncRows", () => { let config = new TestConfig(false) @@ -38,12 +38,12 @@ describe("syncRows", () => { // assert the migration worked usageDoc = await quotas.getQuotaUsage() expect(usageDoc.usageQuota.rows).toEqual(3) - expect(usageDoc.apps?.[getProdAppID(app1.appId)].usageQuota.rows).toEqual( - 1 - ) - expect(usageDoc.apps?.[getProdAppID(app2.appId)].usageQuota.rows).toEqual( - 2 - ) + expect( + usageDoc.apps?.[dbCore.getProdAppID(app1.appId)].usageQuota.rows + ).toEqual(1) + expect( + usageDoc.apps?.[dbCore.getProdAppID(app2.appId)].usageQuota.rows + ).toEqual(2) }) }) }) diff --git a/packages/server/src/migrations/functions/userEmailViewCasing.ts b/packages/server/src/migrations/functions/userEmailViewCasing.ts index fe58692a27..078289cddf 100644 --- a/packages/server/src/migrations/functions/userEmailViewCasing.ts +++ b/packages/server/src/migrations/functions/userEmailViewCasing.ts @@ -1,4 +1,4 @@ -const { createNewUserEmailView } = require("@budibase/backend-core/db") +import { db as dbCore } from "@budibase/backend-core" /** * Date: @@ -8,6 +8,6 @@ const { createNewUserEmailView } = require("@budibase/backend-core/db") * Recreate the user email view to include latest changes i.e. lower casing the email address */ -export const run = async (db: any) => { - await createNewUserEmailView(db) +export const run = async () => { + await dbCore.createNewUserEmailView() } diff --git a/packages/server/src/module.d.ts b/packages/server/src/module.d.ts deleted file mode 100644 index ada45a3a66..0000000000 --- a/packages/server/src/module.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -declare module "@budibase/backend-core/tenancy" -declare module "@budibase/backend-core/db" -declare module "@budibase/backend-core/context" -declare module "@budibase/backend-core/cache" -declare module "@budibase/backend-core/permissions" -declare module "@budibase/backend-core/roles" -declare module "@budibase/backend-core/constants" -declare module "@budibase/backend-core/auth" -declare module "@budibase/backend-core/sessions" -declare module "@budibase/backend-core/encryption" -declare module "@budibase/backend-core/utils" -declare module "@budibase/backend-core/redis" -declare module "@budibase/backend-core/objectStore" -declare module "@budibase/backend-core/plugins" diff --git a/packages/server/src/startup.ts b/packages/server/src/startup.ts index 7d3302655a..53fcf3ebef 100644 --- a/packages/server/src/startup.ts +++ b/packages/server/src/startup.ts @@ -1,5 +1,5 @@ import * as env from "./environment" -import redis from "./utilities/redis" +import * as redis from "./utilities/redis" import { createAdminUser, generateApiKey, @@ -19,7 +19,7 @@ import eventEmitter from "./events" import * as migrations from "./migrations" import bullboard from "./automations/bullboard" import * as pro from "@budibase/pro" -import api from "./api" +import * as api from "./api" import sdk from "./sdk" const pino = require("koa-pino-logger") diff --git a/packages/server/src/threads/automation.ts b/packages/server/src/threads/automation.ts index 3552ffa0f3..5e2817ed06 100644 --- a/packages/server/src/threads/automation.ts +++ b/packages/server/src/threads/automation.ts @@ -23,15 +23,14 @@ import { AutomationMetadata, } from "../definitions/automations" import { WorkerCallback } from "./definitions" -const { doInAppContext, getAppDB } = require("@budibase/backend-core/context") -const { logAlertWithInfo, logWarn } = require("@budibase/backend-core/logging") -const { processObject } = require("@budibase/string-templates") +import { context, logging } from "@budibase/backend-core" +import { processObject } from "@budibase/string-templates" +import { cloneDeep } from "lodash/fp" +import env from "../environment" const FILTER_STEP_ID = actions.ACTION_DEFINITIONS.FILTER.stepId const LOOP_STEP_ID = actions.ACTION_DEFINITIONS.LOOP.stepId const CRON_STEP_ID = triggerDefs.CRON.stepId const STOPPED_STATUS = { success: true, status: AutomationStatus.STOPPED } -const { cloneDeep } = require("lodash/fp") -const env = require("../environment") function typecastForLooping(loopStep: LoopStep, input: LoopInput) { if (!input || !input.binding) { @@ -121,7 +120,7 @@ class Orchestrator { async getMetadata(): Promise { const metadataId = generateAutomationMetadataID(this._automation._id!) - const db = getAppDB() + const db = context.getAppDB() let metadata: AutomationMetadata try { metadata = await db.get(metadataId) @@ -138,7 +137,7 @@ class Orchestrator { if (!this._job.opts.repeat) { return } - logWarn( + logging.logWarn( `CRON disabled reason=${reason} - ${this._appId}/${this._automation._id}` ) const automation = this._automation @@ -184,14 +183,14 @@ class Orchestrator { } else { metadata.errorCount = 0 } - const db = getAppDB() + const db = context.getAppDB() try { await db.put(metadata) } catch (err) { - logAlertWithInfo( + logging.logAlertWithInfo( "Failed to write automation metadata", db.name, - automation._id, + automation._id!, err ) } @@ -265,7 +264,7 @@ class Orchestrator { for (let step of automation.definition.steps) { stepCount++ - let input, + let input: any, iterations = 1, iterationCount = 0 @@ -283,7 +282,7 @@ class Orchestrator { let originalStepInput = cloneDeep(step.inputs) // Handle if the user has set a max iteration count or if it reaches the max limit set by us if (loopStep && input.binding) { - let newInput = await processObject( + let newInput: any = await processObject( loopStep.inputs, cloneDeep(this._context) ) @@ -352,7 +351,7 @@ class Orchestrator { } } if ( - index === env.AUTOMATION_MAX_ITERATION || + index === env.AUTOMATION_MAX_ITERATIONS || index === parseInt(loopStep.inputs.iterations) ) { this.updateContextAndOutput(loopStepNumber, step, tempOutput, { @@ -481,7 +480,7 @@ export function execute(job: Job, callback: WorkerCallback) { if (!appId) { throw new Error("Unable to execute, event doesn't contain app ID.") } - doInAppContext(appId, async () => { + return context.doInAppContext(appId, async () => { const automationOrchestrator = new Orchestrator(job) try { const response = await automationOrchestrator.execute() @@ -497,7 +496,7 @@ export const removeStalled = async (job: Job) => { if (!appId) { throw new Error("Unable to execute, event doesn't contain app ID.") } - await doInAppContext(appId, async () => { + await context.doInAppContext(appId, async () => { const automationOrchestrator = new Orchestrator(job) await automationOrchestrator.stopCron("stalled") }) diff --git a/packages/server/src/threads/query.ts b/packages/server/src/threads/query.ts index 86cbf89c87..8ee8bcb463 100644 --- a/packages/server/src/threads/query.ts +++ b/packages/server/src/threads/query.ts @@ -1,17 +1,12 @@ import { default as threadUtils } from "./utils" threadUtils.threadSetup() import { WorkerCallback, QueryEvent, QueryVariable } from "./definitions" -const ScriptRunner = require("../utilities/scriptRunner") -const { getIntegration } = require("../integrations") -const { processStringSync } = require("@budibase/string-templates") -const { doInAppContext, getAppDB } = require("@budibase/backend-core/context") -const { - refreshOAuthToken, - updateUserOAuth, -} = require("@budibase/backend-core/auth") -const { user: userCache } = require("@budibase/backend-core/cache") -const { getGlobalIDFromUserMetadataID } = require("../db/utils") -const { cloneDeep } = require("lodash/fp") +import ScriptRunner from "../utilities/scriptRunner" +import { getIntegration } from "../integrations" +import { processStringSync } from "@budibase/string-templates" +import { context, cache, auth } from "@budibase/backend-core" +import { getGlobalIDFromUserMetadataID } from "../db/utils" +import { cloneDeep } from "lodash/fp" const { isSQL } = require("../integrations/utils") const { @@ -170,7 +165,7 @@ class QueryRunner { } async runAnotherQuery(queryId: string, parameters: any) { - const db = getAppDB() + const db = context.getAppDB() const query = await db.get(queryId) const datasource = await db.get(query.datasourceId) return new QueryRunner( @@ -194,7 +189,7 @@ class QueryRunner { throw new Error("No refresh token found for authenticated user") } - const resp = await refreshOAuthToken( + const resp: any = await auth.refreshOAuthToken( oauth2.refreshToken, providerType, configId @@ -204,8 +199,8 @@ class QueryRunner { // There are several other properties available in 'resp' if (!resp.err) { const globalUserId = getGlobalIDFromUserMetadataID(_id) - await updateUserOAuth(globalUserId, resp) - this.ctx.user = await userCache.getUser(globalUserId) + await auth.updateUserOAuth(globalUserId, resp) + this.ctx.user = await cache.user.getUser(globalUserId) } else { // In this event the user may have oAuth issues that // could require re-authenticating with their provider. @@ -285,7 +280,7 @@ class QueryRunner { } export function execute(input: QueryEvent, callback: WorkerCallback) { - doInAppContext(input.appId, async () => { + context.doInAppContext(input.appId!, async () => { const Runner = new QueryRunner(input) try { const response = await Runner.execute() diff --git a/packages/server/src/threads/utils.ts b/packages/server/src/threads/utils.ts index a51c861b00..53120160a8 100644 --- a/packages/server/src/threads/utils.ts +++ b/packages/server/src/threads/utils.ts @@ -1,8 +1,7 @@ import { QueryVariable } from "./definitions" -const env = require("../environment") -const db = require("../db") -const redis = require("@budibase/backend-core/redis") -const { SEPARATOR } = require("@budibase/backend-core/db") +import env from "../environment" +import db from "../db" +import { redis, db as dbCore } from "@budibase/backend-core" const VARIABLE_TTL_SECONDS = 3600 let client: any @@ -21,7 +20,7 @@ process.on("exit", async () => { }) function makeVariableKey(queryId: string, variable: string) { - return `${queryId}${SEPARATOR}${variable}` + return `${queryId}${dbCore.SEPARATOR}${variable}` } export function threadSetup() { diff --git a/packages/server/src/utilities/redis.ts b/packages/server/src/utilities/redis.ts index 8659843dbb..1b7a3ce64c 100644 --- a/packages/server/src/utilities/redis.ts +++ b/packages/server/src/utilities/redis.ts @@ -1,6 +1,6 @@ import { redis } from "@budibase/backend-core" import { getGlobalIDFromUserMetadataID } from "../db/utils" -import { User } from "@budibase/types" +import { ContextUser } from "@budibase/types" const APP_DEV_LOCK_SECONDS = 600 const AUTOMATION_TEST_FLAG_SECONDS = 60 @@ -24,7 +24,7 @@ export async function shutdown() { console.log("Redis shutdown") } -export async function doesUserHaveLock(devAppId: string, user: User) { +export async function doesUserHaveLock(devAppId: string, user: ContextUser) { const value = await devAppClient.get(devAppId) if (!value) { return true @@ -39,7 +39,7 @@ export async function getLocksById(appIds: string[]) { return await devAppClient.bulkGet(appIds) } -export async function updateLock(devAppId: string, user: User) { +export async function updateLock(devAppId: string, user: ContextUser) { // make sure always global user ID const globalId = getGlobalIDFromUserMetadataID(user._id!) const inputUser = { @@ -52,7 +52,7 @@ export async function updateLock(devAppId: string, user: User) { await devAppClient.store(devAppId, inputUser, APP_DEV_LOCK_SECONDS) } -export async function clearLock(devAppId: string, user: User) { +export async function clearLock(devAppId: string, user: ContextUser) { const value = await devAppClient.get(devAppId) if (!value) { return diff --git a/packages/server/src/utilities/rowProcessor/index.ts b/packages/server/src/utilities/rowProcessor/index.ts index 2b4f4e05a6..5595d0c5fb 100644 --- a/packages/server/src/utilities/rowProcessor/index.ts +++ b/packages/server/src/utilities/rowProcessor/index.ts @@ -180,7 +180,7 @@ export function inputProcessing( */ export async function outputProcessing( table: Table, - rows: Row[], + rows: Row[] | Row, opts = { squash: true } ) { let wasArray = true diff --git a/packages/server/src/watch.ts b/packages/server/src/watch.ts index 4beef5ddb8..2ef132c19d 100644 --- a/packages/server/src/watch.ts +++ b/packages/server/src/watch.ts @@ -2,8 +2,7 @@ import path from "path" import * as env from "./environment" import chokidar from "chokidar" import fs from "fs" -import { tenancy } from "@budibase/backend-core" -import { DEFAULT_TENANT_ID } from "@budibase/backend-core/constants" +import { constants, tenancy } from "@budibase/backend-core" import { processUploadedPlugin } from "./api/controllers/plugin" export function watch() { @@ -23,7 +22,7 @@ export function watch() { if (!path?.endsWith(".tar.gz") || !fs.existsSync(path)) { return } - await tenancy.doInTenant(DEFAULT_TENANT_ID, async () => { + await tenancy.doInTenant(constants.DEFAULT_TENANT_ID, async () => { try { const split = path.split("/") const name = split[split.length - 1] diff --git a/packages/types/src/sdk/events/role.ts b/packages/types/src/sdk/events/role.ts index adeb169a53..b04b9b8ee5 100644 --- a/packages/types/src/sdk/events/role.ts +++ b/packages/types/src/sdk/events/role.ts @@ -3,19 +3,19 @@ import { BaseEvent } from "./event" export interface RoleCreatedEvent extends BaseEvent { roleId: string permissionId: string - inherits: string + inherits?: string } export interface RoleUpdatedEvent extends BaseEvent { roleId: string permissionId: string - inherits: string + inherits?: string } export interface RoleDeletedEvent extends BaseEvent { roleId: string permissionId: string - inherits: string + inherits?: string } export interface RoleAssignedEvent extends BaseEvent { From 70016dc7e4c83b16bc550ba801b1e0416f5ea0c1 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Tue, 22 Nov 2022 22:24:45 +0000 Subject: [PATCH 202/396] Account portal <-> backend-core fixes --- packages/backend-core/src/security/sessions.ts | 1 + packages/types/src/sdk/auth.ts | 2 ++ packages/types/src/sdk/featureFlag.ts | 7 +++++++ packages/types/src/sdk/index.ts | 1 + packages/types/src/sdk/koa.ts | 9 ++++++--- 5 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 packages/types/src/sdk/featureFlag.ts diff --git a/packages/backend-core/src/security/sessions.ts b/packages/backend-core/src/security/sessions.ts index 33230afc60..48e75b0d60 100644 --- a/packages/backend-core/src/security/sessions.ts +++ b/packages/backend-core/src/security/sessions.ts @@ -89,6 +89,7 @@ export async function createASession( userId, } await client.store(key, session, EXPIRY_SECONDS) + return session } export async function updateSessionTTL(session: Session) { diff --git a/packages/types/src/sdk/auth.ts b/packages/types/src/sdk/auth.ts index 766d18a606..edcaf197e2 100644 --- a/packages/types/src/sdk/auth.ts +++ b/packages/types/src/sdk/auth.ts @@ -1,4 +1,5 @@ import { BBContext } from "./koa" +import { Hosting } from "./hosting" export interface AuthToken { userId: string @@ -10,6 +11,7 @@ export interface CreateSession { sessionId: string tenantId: string csrfToken?: string + hosting?: Hosting } export interface Session extends CreateSession { diff --git a/packages/types/src/sdk/featureFlag.ts b/packages/types/src/sdk/featureFlag.ts new file mode 100644 index 0000000000..53aa4842c4 --- /dev/null +++ b/packages/types/src/sdk/featureFlag.ts @@ -0,0 +1,7 @@ +export enum FeatureFlag { + LICENSING = "LICENSING", +} + +export interface TenantFeatureFlags { + [key: string]: FeatureFlag[] +} diff --git a/packages/types/src/sdk/index.ts b/packages/types/src/sdk/index.ts index a32c8e2077..e5512b062b 100644 --- a/packages/types/src/sdk/index.ts +++ b/packages/types/src/sdk/index.ts @@ -10,3 +10,4 @@ export * from "./auth" export * from "./locks" export * from "./db" export * from "./middleware" +export * from "./featureFlag" diff --git a/packages/types/src/sdk/koa.ts b/packages/types/src/sdk/koa.ts index ffbb1cf053..a9d3cc4231 100644 --- a/packages/types/src/sdk/koa.ts +++ b/packages/types/src/sdk/koa.ts @@ -1,15 +1,18 @@ import { Context, Request } from "koa" -import { User, Role, UserRoles } from "../documents" -import { License } from "../sdk" +import { User, Role, UserRoles, Account } from "../documents" +import { FeatureFlag, License } from "../sdk" export interface ContextUser extends Omit { globalId?: string - license: License + license?: License userId?: string roleId?: string | null role?: Role roles?: UserRoles csrfToken?: string + featureFlags?: FeatureFlag[] + accountPortalAccess?: boolean + account?: Account } export interface BBRequest extends Request { From 50f7a03afc17442dc9d7f6a657dcb3a98bf0921e Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 23 Nov 2022 08:45:13 +0000 Subject: [PATCH 203/396] v2.1.32-alpha.5 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 8 ++++---- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/sdk/package.json | 2 +- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lerna.json b/lerna.json index 48b80e9e6c..4c90dcb882 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.1.32-alpha.4", + "version": "2.1.32-alpha.5", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 4cfc5de3dc..6af1808bdb 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.1.32-alpha.4", + "version": "2.1.32-alpha.5", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "2.1.32-alpha.4", + "@budibase/types": "2.1.32-alpha.5", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index cafb9eb86b..92f5493bcf 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "2.1.32-alpha.4", + "version": "2.1.32-alpha.5", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "2.1.32-alpha.4", + "@budibase/string-templates": "2.1.32-alpha.5", "@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 a87c871f76..5b3ba61776 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.1.32-alpha.4", + "version": "2.1.32-alpha.5", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.1.32-alpha.4", - "@budibase/client": "2.1.32-alpha.4", - "@budibase/frontend-core": "2.1.32-alpha.4", - "@budibase/string-templates": "2.1.32-alpha.4", + "@budibase/bbui": "2.1.32-alpha.5", + "@budibase/client": "2.1.32-alpha.5", + "@budibase/frontend-core": "2.1.32-alpha.5", + "@budibase/string-templates": "2.1.32-alpha.5", "@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 3d3b615b90..3ec4f5c35e 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.1.32-alpha.4", + "version": "2.1.32-alpha.5", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "2.1.32-alpha.4", - "@budibase/string-templates": "2.1.32-alpha.4", - "@budibase/types": "2.1.32-alpha.4", + "@budibase/backend-core": "2.1.32-alpha.5", + "@budibase/string-templates": "2.1.32-alpha.5", + "@budibase/types": "2.1.32-alpha.5", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index 537709132d..74ee686497 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.1.32-alpha.4", + "version": "2.1.32-alpha.5", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "2.1.32-alpha.4", - "@budibase/frontend-core": "2.1.32-alpha.4", - "@budibase/string-templates": "2.1.32-alpha.4", + "@budibase/bbui": "2.1.32-alpha.5", + "@budibase/frontend-core": "2.1.32-alpha.5", + "@budibase/string-templates": "2.1.32-alpha.5", "@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 fe095fb45c..bf89d51e96 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.1.32-alpha.4", + "version": "2.1.32-alpha.5", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.1.32-alpha.4", + "@budibase/bbui": "2.1.32-alpha.5", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index d4a54007e5..4f6aa17bbb 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.1.32-alpha.4", + "version": "2.1.32-alpha.5", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index 60af02db61..cb69e49090 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.1.32-alpha.4", + "version": "2.1.32-alpha.5", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -43,11 +43,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "2.1.32-alpha.4", - "@budibase/client": "2.1.32-alpha.4", + "@budibase/backend-core": "2.1.32-alpha.5", + "@budibase/client": "2.1.32-alpha.5", "@budibase/pro": "2.1.32-alpha.4", - "@budibase/string-templates": "2.1.32-alpha.4", - "@budibase/types": "2.1.32-alpha.4", + "@budibase/string-templates": "2.1.32-alpha.5", + "@budibase/types": "2.1.32-alpha.5", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 6153b04363..ffa0ab112f 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.1.32-alpha.4", + "version": "2.1.32-alpha.5", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index 7c9c389af8..ad1f19774c 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.1.32-alpha.4", + "version": "2.1.32-alpha.5", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index f6d8d45c21..a901b92805 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.1.32-alpha.4", + "version": "2.1.32-alpha.5", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.1.32-alpha.4", + "@budibase/backend-core": "2.1.32-alpha.5", "@budibase/pro": "2.1.32-alpha.4", - "@budibase/string-templates": "2.1.32-alpha.4", - "@budibase/types": "2.1.32-alpha.4", + "@budibase/string-templates": "2.1.32-alpha.5", + "@budibase/types": "2.1.32-alpha.5", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From ee9e00d48fe333ecb1a62315f8779ebd140549ff Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 23 Nov 2022 08:48:45 +0000 Subject: [PATCH 204/396] Update pro version to 2.1.32-alpha.5 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index cb69e49090..04d043cc50 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -45,7 +45,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "2.1.32-alpha.5", "@budibase/client": "2.1.32-alpha.5", - "@budibase/pro": "2.1.32-alpha.4", + "@budibase/pro": "2.1.32-alpha.5", "@budibase/string-templates": "2.1.32-alpha.5", "@budibase/types": "2.1.32-alpha.5", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index ca7e080694..f97eae1133 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1273,12 +1273,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.32-alpha.4": - version "2.1.32-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.32-alpha.4.tgz#f5ecc6a5348b61a4f8ebd3f6cd541d7892bc38bd" - integrity sha512-CbjK7fLWXjdHaFlLnmrUE+zEpltgdWzA+sfT9WrKAWlyrI18/0Hs5E5Q3s8NUk3slixktvs2Bs3nYDbTZj7coA== +"@budibase/backend-core@2.1.32-alpha.5": + version "2.1.32-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.32-alpha.5.tgz#85d94d85f44c6e9220ce8ce6d7d3e62d15d6bc25" + integrity sha512-UV7ng+o7bo+GHAocd3rn6okFsCjf5RfGNs+CRgyB7rW0DZYCTwn1jj71HGYO6eI0FWgkaFYEeiOaNz0BeCssnw== dependencies: - "@budibase/types" "2.1.32-alpha.4" + "@budibase/types" "2.1.32-alpha.5" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1361,13 +1361,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.1.32-alpha.4": - version "2.1.32-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.32-alpha.4.tgz#b760fe8e1cc2db64564d61c84b749a3555861be2" - integrity sha512-+D0YeIlylRu5VkBsEDhkNYLlsDGfEOZJ7c67liPPRSBfHNh8oyTMTptyqcyFYhemFNPjoyxBCzi1RIFCk8Eg2w== +"@budibase/pro@2.1.32-alpha.5": + version "2.1.32-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.32-alpha.5.tgz#ca75dcf90d275e1d78a9ab837a763b703963908d" + integrity sha512-OwtCJugVYz+V2IaBLITCec6AtQr7HgABLw0dRrS481o/ibyJh+Syooafwx1ijrvfNl4i8YQVuJuzoPYsZHVwqw== dependencies: - "@budibase/backend-core" "2.1.32-alpha.4" - "@budibase/types" "2.1.32-alpha.4" + "@budibase/backend-core" "2.1.32-alpha.5" + "@budibase/types" "2.1.32-alpha.5" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -1391,10 +1391,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.1.32-alpha.4": - version "2.1.32-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.32-alpha.4.tgz#47d25d028b4e9e5295e311a06bf801fbb14c98d7" - integrity sha512-ZwaPQVcOdoqaO7fr8mQ0hIfsjBFhsowu3Sv3/o3Z4qCdth6EZ8LnbeW1dQeQRRbqe3gNhaotfzgxwqbFxmtqzg== +"@budibase/types@2.1.32-alpha.5": + version "2.1.32-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.32-alpha.5.tgz#08389b921673c0e4cbbbaba41ba92356c186dd0f" + integrity sha512-/vbEClKbiNdhDuDjYt5DF2e82u6kFe79BETU8ssaJ4lfI6y2YxMnrLSKB38QfCG/XjijAPMO0THTFoSVgqTQCA== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index a901b92805..217d634997 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "2.1.32-alpha.5", - "@budibase/pro": "2.1.32-alpha.4", + "@budibase/pro": "2.1.32-alpha.5", "@budibase/string-templates": "2.1.32-alpha.5", "@budibase/types": "2.1.32-alpha.5", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index a1aa2dfcfc..4f23ce5c03 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -470,12 +470,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.32-alpha.4": - version "2.1.32-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.32-alpha.4.tgz#f5ecc6a5348b61a4f8ebd3f6cd541d7892bc38bd" - integrity sha512-CbjK7fLWXjdHaFlLnmrUE+zEpltgdWzA+sfT9WrKAWlyrI18/0Hs5E5Q3s8NUk3slixktvs2Bs3nYDbTZj7coA== +"@budibase/backend-core@2.1.32-alpha.5": + version "2.1.32-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.32-alpha.5.tgz#85d94d85f44c6e9220ce8ce6d7d3e62d15d6bc25" + integrity sha512-UV7ng+o7bo+GHAocd3rn6okFsCjf5RfGNs+CRgyB7rW0DZYCTwn1jj71HGYO6eI0FWgkaFYEeiOaNz0BeCssnw== dependencies: - "@budibase/types" "2.1.32-alpha.4" + "@budibase/types" "2.1.32-alpha.5" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -508,22 +508,22 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.1.32-alpha.4": - version "2.1.32-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.32-alpha.4.tgz#b760fe8e1cc2db64564d61c84b749a3555861be2" - integrity sha512-+D0YeIlylRu5VkBsEDhkNYLlsDGfEOZJ7c67liPPRSBfHNh8oyTMTptyqcyFYhemFNPjoyxBCzi1RIFCk8Eg2w== +"@budibase/pro@2.1.32-alpha.5": + version "2.1.32-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.32-alpha.5.tgz#ca75dcf90d275e1d78a9ab837a763b703963908d" + integrity sha512-OwtCJugVYz+V2IaBLITCec6AtQr7HgABLw0dRrS481o/ibyJh+Syooafwx1ijrvfNl4i8YQVuJuzoPYsZHVwqw== dependencies: - "@budibase/backend-core" "2.1.32-alpha.4" - "@budibase/types" "2.1.32-alpha.4" + "@budibase/backend-core" "2.1.32-alpha.5" + "@budibase/types" "2.1.32-alpha.5" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.1.32-alpha.4": - version "2.1.32-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.32-alpha.4.tgz#47d25d028b4e9e5295e311a06bf801fbb14c98d7" - integrity sha512-ZwaPQVcOdoqaO7fr8mQ0hIfsjBFhsowu3Sv3/o3Z4qCdth6EZ8LnbeW1dQeQRRbqe3gNhaotfzgxwqbFxmtqzg== +"@budibase/types@2.1.32-alpha.5": + version "2.1.32-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.32-alpha.5.tgz#08389b921673c0e4cbbbaba41ba92356c186dd0f" + integrity sha512-/vbEClKbiNdhDuDjYt5DF2e82u6kFe79BETU8ssaJ4lfI6y2YxMnrLSKB38QfCG/XjijAPMO0THTFoSVgqTQCA== "@cspotcode/source-map-support@^0.8.0": version "0.8.1" From debff4b4918e948719743d062c364543e5a4dd37 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Nov 2022 08:50:58 +0000 Subject: [PATCH 205/396] Bump engine.io from 6.2.0 to 6.2.1 in /packages/server Bumps [engine.io](https://github.com/socketio/engine.io) from 6.2.0 to 6.2.1. - [Release notes](https://github.com/socketio/engine.io/releases) - [Changelog](https://github.com/socketio/engine.io/blob/main/CHANGELOG.md) - [Commits](https://github.com/socketio/engine.io/compare/6.2.0...6.2.1) --- updated-dependencies: - dependency-name: engine.io dependency-type: indirect ... Signed-off-by: dependabot[bot] --- packages/server/yarn.lock | 600 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 579 insertions(+), 21 deletions(-) diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index f97eae1133..780a3394b3 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1311,6 +1311,59 @@ uuid "8.3.2" zlib "1.0.5" +"@budibase/bbui@2.1.32-alpha.5": + version "2.1.32-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-2.1.32-alpha.5.tgz#ffcf50ade8d28c695889ceb307c6d7ceae731e9d" + integrity sha512-6PRFGSMFP15RHwK/aCQZ9cAwOv5MwQCQyOiCaipkAlLTZR9NFAhRB0BWY4bJLWL/ScnnXAEcrPfBvVJ6G+4RPg== + dependencies: + "@adobe/spectrum-css-workflow-icons" "^1.2.1" + "@budibase/string-templates" "2.1.32-alpha.5" + "@spectrum-css/actionbutton" "^1.0.1" + "@spectrum-css/actiongroup" "^1.0.1" + "@spectrum-css/avatar" "^3.0.2" + "@spectrum-css/button" "^3.0.1" + "@spectrum-css/buttongroup" "^3.0.2" + "@spectrum-css/checkbox" "^3.0.2" + "@spectrum-css/dialog" "^3.0.1" + "@spectrum-css/divider" "^1.0.3" + "@spectrum-css/dropzone" "^3.0.2" + "@spectrum-css/fieldgroup" "^3.0.2" + "@spectrum-css/fieldlabel" "^3.0.1" + "@spectrum-css/icon" "^3.0.1" + "@spectrum-css/illustratedmessage" "^3.0.2" + "@spectrum-css/inlinealert" "^2.0.1" + "@spectrum-css/inputgroup" "^3.0.2" + "@spectrum-css/label" "^2.0.10" + "@spectrum-css/link" "^3.1.1" + "@spectrum-css/menu" "^3.0.1" + "@spectrum-css/modal" "^3.0.1" + "@spectrum-css/pagination" "^3.0.3" + "@spectrum-css/picker" "^1.0.1" + "@spectrum-css/popover" "^3.0.1" + "@spectrum-css/progressbar" "^1.0.2" + "@spectrum-css/progresscircle" "^1.0.2" + "@spectrum-css/radio" "^3.0.2" + "@spectrum-css/search" "^3.0.2" + "@spectrum-css/sidenav" "^3.0.2" + "@spectrum-css/slider" "3.0.1" + "@spectrum-css/statuslight" "^3.0.2" + "@spectrum-css/stepper" "^3.0.3" + "@spectrum-css/switch" "^1.0.2" + "@spectrum-css/table" "^3.0.1" + "@spectrum-css/tabs" "^3.2.12" + "@spectrum-css/tags" "^3.0.2" + "@spectrum-css/textfield" "^3.0.1" + "@spectrum-css/toast" "^3.0.1" + "@spectrum-css/tooltip" "^3.0.3" + "@spectrum-css/treeview" "^3.0.2" + "@spectrum-css/typography" "^3.0.1" + "@spectrum-css/underlay" "^2.0.9" + "@spectrum-css/vars" "^3.0.1" + dayjs "^1.10.4" + easymde "^2.16.1" + svelte-flatpickr "^3.2.3" + svelte-portal "^1.0.0" + "@budibase/bbui@^0.9.139": version "0.9.190" resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-0.9.190.tgz#e1ec400ac90f556bfbc80fc23a04506f1585ea81" @@ -1361,6 +1414,71 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" +"@budibase/client@2.1.32-alpha.5": + version "2.1.32-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/client/-/client-2.1.32-alpha.5.tgz#1cfdcc4fc9c3fb5943c75778b81dea430aab0857" + integrity sha512-4OuExoSJFVtOsJszrLzLeCSHSWDobYiF8jfT4nyc1nGWTwetHUacX3nnz9uhxcprpQTer4W9Qw3hnsn5OVtW4A== + dependencies: + "@budibase/bbui" "2.1.32-alpha.5" + "@budibase/frontend-core" "2.1.32-alpha.5" + "@budibase/string-templates" "2.1.32-alpha.5" + "@spectrum-css/button" "^3.0.3" + "@spectrum-css/card" "^3.0.3" + "@spectrum-css/divider" "^1.0.3" + "@spectrum-css/link" "^3.1.3" + "@spectrum-css/page" "^3.0.1" + "@spectrum-css/tag" "^3.1.4" + "@spectrum-css/typography" "^3.0.2" + "@spectrum-css/vars" "^3.0.1" + apexcharts "^3.22.1" + dayjs "^1.10.5" + downloadjs "1.4.7" + html5-qrcode "^2.2.1" + leaflet "^1.7.1" + regexparam "^1.3.0" + sanitize-html "^2.7.0" + screenfull "^6.0.1" + shortid "^2.2.15" + socket.io-client "^4.5.1" + svelte "^3.49.0" + svelte-apexcharts "^1.0.2" + svelte-flatpickr "^3.1.0" + svelte-spa-router "^3.0.5" + +"@budibase/frontend-core@2.1.32-alpha.5": + version "2.1.32-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/frontend-core/-/frontend-core-2.1.32-alpha.5.tgz#617cd8605e579682eaaccf74fec5d7441352b8ff" + integrity sha512-W3Q9XtPen3hbPZwL2hKNHFZJhUMX1FlbYPMpFlgMADIpV8eA8il7G7iMfFEj/GLSemd9DZJUT6nrvcz/FActtg== + dependencies: + "@budibase/bbui" "2.1.32-alpha.5" + lodash "^4.17.21" + svelte "^3.46.2" + +"@budibase/handlebars-helpers@^0.11.8": + version "0.11.8" + resolved "https://registry.yarnpkg.com/@budibase/handlebars-helpers/-/handlebars-helpers-0.11.8.tgz#6953d29673a8c5c407e096c0a84890465c7ce841" + integrity sha512-ggWJUt0GqsHFAEup5tlWlcrmYML57nKhpNGGLzVsqXVYN8eVmf3xluYmmMe7fDYhQH0leSprrdEXmsdFQF3HAQ== + dependencies: + array-sort "^1.0.0" + define-property "^2.0.2" + extend-shallow "^3.0.2" + for-in "^1.0.2" + get-object "^0.2.0" + get-value "^3.0.1" + handlebars "^4.7.7" + handlebars-utils "^1.0.6" + has-value "^2.0.2" + helper-md "^0.2.2" + html-tag "^2.0.0" + is-even "^1.0.0" + is-glob "^4.0.1" + kind-of "^6.0.3" + micromatch "^3.1.5" + relative "^3.0.2" + striptags "^3.1.1" + to-gfm-code-block "^0.1.1" + year "^0.2.1" + "@budibase/pro@2.1.32-alpha.5": version "2.1.32-alpha.5" resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.32-alpha.5.tgz#ca75dcf90d275e1d78a9ab837a763b703963908d" @@ -1391,6 +1509,18 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" +"@budibase/string-templates@2.1.32-alpha.5": + version "2.1.32-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/string-templates/-/string-templates-2.1.32-alpha.5.tgz#89351d15889b25348f528e2d613e7b32fd9656bd" + integrity sha512-8ubCFTNkC7BjJRXhMv8Ti86PEp01rNFcEJyNwKml/XBWoz9MPqwT3ZNHdu3inxWVoiNumPCfd4P33SWF7q93nQ== + dependencies: + "@budibase/handlebars-helpers" "^0.11.8" + dayjs "^1.10.4" + handlebars "^4.7.6" + handlebars-utils "^1.0.6" + lodash "^4.17.20" + vm2 "^3.9.4" + "@budibase/types@2.1.32-alpha.5": version "2.1.32-alpha.5" resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.32-alpha.5.tgz#08389b921673c0e4cbbbaba41ba92356c186dd0f" @@ -2745,6 +2875,11 @@ resolved "https://registry.yarnpkg.com/@spectrum-css/sidenav/-/sidenav-3.0.23.tgz#c218560d472e13a3e0d1499b762df1206dcffbfd" integrity sha512-4IFw2/HMQJRzM0M2c5na/HeY7y5vJoGpMFBkXNpQyhW4TRo7N1rGwYQ5dRD3s4OVEWV4/rjfGV0d/qhfwKUTog== +"@spectrum-css/slider@3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@spectrum-css/slider/-/slider-3.0.1.tgz#5281e6f47eb5a4fd3d1816c138bf66d01d7f2e49" + integrity sha512-DI2dtMRnQuDM1miVzl3SGyR1khUEKnwdXfO5EHDFwkC3yav43F5QogkfjmjFmWWobMVovdJlAuiaaJ/IHejD0Q== + "@spectrum-css/statuslight@^3.0.2": version "3.0.8" resolved "https://registry.yarnpkg.com/@spectrum-css/statuslight/-/statuslight-3.0.8.tgz#3b0ea80712573679870a85d469850230e794a0f7" @@ -2770,6 +2905,16 @@ resolved "https://registry.yarnpkg.com/@spectrum-css/tabs/-/tabs-3.2.16.tgz#c3f7800d8d6f7c9930c28cd01354816328bf72b1" integrity sha512-JUcMB/fiDG/KoyrVstlUMacFJUY4OHKqhMRuPtu9ggUXWCRbSkY8he92v6u0HwY3DuhDoOxNTK8d/PLjk/fsbg== +"@spectrum-css/tabs@^3.2.12": + version "3.2.21" + resolved "https://registry.yarnpkg.com/@spectrum-css/tabs/-/tabs-3.2.21.tgz#a8888b83d6b74ba05a00cacdb27a1e8bf4639071" + integrity sha512-25WGV1Sih7dW69/RvB1Ts6xVDJDhVEyYZzIGAll0PDST1GjBMHuGblqN/fZpDy/r/rop3GoHIsumtIMvOBdJKw== + +"@spectrum-css/tag@^3.1.4": + version "3.3.15" + resolved "https://registry.yarnpkg.com/@spectrum-css/tag/-/tag-3.3.15.tgz#971184fd8cb977b85a529f808313851863123278" + integrity sha512-pF6Wh61Z7hmAy20twIlpjdDuivYj6UPtWIzK7giyJKr/qcn20BjVN2ChIeFB1N+vBamJdLsuQOewv4AJ3+LZ2Q== + "@spectrum-css/tags@^3.0.2": version "3.0.3" resolved "https://registry.yarnpkg.com/@spectrum-css/tags/-/tags-3.0.3.tgz#fc76d2735cdc442de91b7eb3bee49a928c0767ac" @@ -2934,6 +3079,13 @@ resolved "https://registry.yarnpkg.com/@types/caseless/-/caseless-0.12.2.tgz#f65d3d6389e01eeb458bd54dc8f52b95a9463bc8" integrity sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w== +"@types/codemirror@^5.60.4": + version "5.60.5" + resolved "https://registry.yarnpkg.com/@types/codemirror/-/codemirror-5.60.5.tgz#5b989a3b4bbe657458cf372c92b6bfda6061a2b7" + integrity sha512-TiECZmm8St5YxjFUp64LK0c8WU5bxMDt9YaAek1UqUb9swrSCoJhh92fWu1p3mTEqlHjhB5sY7OFBhWroJXZVg== + dependencies: + "@types/tern" "*" + "@types/connect@*": version "3.4.35" resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.35.tgz#5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1" @@ -3142,6 +3294,11 @@ resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.2.tgz#b74129719fc8d11c01868010082d483b7545591a" integrity sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA== +"@types/marked@^4.0.7": + version "4.0.7" + resolved "https://registry.yarnpkg.com/@types/marked/-/marked-4.0.7.tgz#400a76809fd08c2bbd9e25f3be06ea38c8e0a1d3" + integrity sha512-eEAhnz21CwvKVW+YvRvcTuFKNU9CV1qH+opcgVK3pIMI6YZzDm6gc8o2vHjldFk6MGKt5pueSB7IOpvpx5Qekw== + "@types/mime@^1": version "1.3.2" resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" @@ -3168,10 +3325,10 @@ "@types/node" "*" form-data "^3.0.0" -"@types/node@*", "@types/node@>=12.12.47", "@types/node@>=13.13.4", "@types/node@>=13.7.0": - version "17.0.41" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.41.tgz#1607b2fd3da014ae5d4d1b31bc792a39348dfb9b" - integrity sha512-xA6drNNeqb5YyV5fO3OAEsnXLfO7uF0whiOfPTz5AeDo8KeZFmODKnvwPymMNO8qE/an8pVY/O50tig2SQCrGw== +"@types/node@*", "@types/node@>=10.0.0", "@types/node@>=12.12.47", "@types/node@>=13.13.4", "@types/node@>=13.7.0": + version "18.11.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.9.tgz#02d013de7058cea16d36168ef2fc653464cfbad4" + integrity sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg== "@types/node@14.18.20": version "14.18.20" @@ -3183,11 +3340,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-16.9.1.tgz#0611b37db4246c937feef529ddcc018cf8e35708" integrity sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g== -"@types/node@>=10.0.0": - version "18.7.18" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.18.tgz#633184f55c322e4fb08612307c274ee6d5ed3154" - integrity sha512-m+6nTEOadJZuTPkKR/SYK3A2d7FZrgElol9UP1Kae90VVU4a6mxnPuLiIW1m4Cq4gZ/nWb9GrdVXJCoCazDAbg== - "@types/node@>=8.0.0 <15": version "14.18.21" resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.21.tgz#0155ee46f6be28b2ff0342ca1a9b9fd4468bef41" @@ -3418,6 +3570,13 @@ "@types/cookiejar" "*" "@types/node" "*" +"@types/tern@*": + version "0.23.4" + resolved "https://registry.yarnpkg.com/@types/tern/-/tern-0.23.4.tgz#03926eb13dbeaf3ae0d390caf706b2643a0127fb" + integrity sha512-JAUw1iXGO1qaWwEOzxTKJZ/5JxVeON9kvGZ/osgZaJImBnyjyn0cjovPsf6FNLmyGY8Vw9DoXZCMlfMkMwHRWg== + dependencies: + "@types/estree" "*" + "@types/tough-cookie@*", "@types/tough-cookie@^4.0.2": version "4.0.2" resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.2.tgz#6286b4c7228d58ab7866d19716f3696e03a09397" @@ -4023,7 +4182,7 @@ arg@^4.1.0: resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== -argparse@^1.0.7: +argparse@^1.0.10, argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== @@ -4070,6 +4229,15 @@ array-equal@^1.0.0: resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" integrity sha512-H3LU5RLiSsGXPhN+Nipar0iR0IofH+8r89G2y1tBKxQ/agagKyAjhkAFDRBfodP2caPrNKHpAWNIM/c9yeL7uA== +array-sort@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-sort/-/array-sort-1.0.0.tgz#e4c05356453f56f53512a7d1d6123f2c54c0a88a" + integrity sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg== + dependencies: + default-compare "^1.0.0" + get-value "^2.0.6" + kind-of "^5.0.2" + array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" @@ -4220,6 +4388,13 @@ atomic-sleep@^1.0.0: resolved "https://registry.yarnpkg.com/atomic-sleep/-/atomic-sleep-1.0.0.tgz#eb85b77a601fc932cfe432c5acd364a9e2c9075b" integrity sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ== +autolinker@~0.28.0: + version "0.28.1" + resolved "https://registry.yarnpkg.com/autolinker/-/autolinker-0.28.1.tgz#0652b491881879f0775dace0cdca3233942a4e47" + integrity sha512-zQAFO1Dlsn69eXaO6+7YZc+v84aquQKbwpzCE3L0stj56ERn9hutFxPopViLjo9G+rWwjozRhgS5KJ25Xy19cQ== + dependencies: + gulp-header "^1.7.1" + available-typed-arrays@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" @@ -5133,6 +5308,18 @@ co@^4.6.0: resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== +codemirror-spell-checker@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/codemirror-spell-checker/-/codemirror-spell-checker-1.1.2.tgz#1c660f9089483ccb5113b9ba9ca19c3f4993371e" + integrity sha512-2Tl6n0v+GJRsC9K3MLCdLaMOmvWL0uukajNJseorZJsslaxZyZMgENocPU8R0DyoTAiKsyqiemSOZo7kjGV0LQ== + dependencies: + typo-js "*" + +codemirror@^5.63.1: + version "5.65.10" + resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.65.10.tgz#4276a93b8534ce91f14b733ba9a1ac949666eac9" + integrity sha512-IXAG5wlhbgcTJ6rZZcmi4+sjWIbJqIGfeg3tNa3yX84Jb3T4huS5qzQAo/cUisc1l3bI47WZodpyf7cYcocDKg== + collect-v8-coverage@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59" @@ -5283,6 +5470,13 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== +concat-with-sourcemaps@*: + version "1.1.0" + resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz#d4ea93f05ae25790951b99e7b3b09e3908a4082e" + integrity sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg== + dependencies: + source-map "^0.6.1" + condense-newlines@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/condense-newlines/-/condense-newlines-0.2.1.tgz#3de985553139475d32502c83b02f60684d24c55f" @@ -5670,6 +5864,13 @@ deepmerge@^4.2.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== +default-compare@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/default-compare/-/default-compare-1.0.0.tgz#cb61131844ad84d84788fb68fd01681ca7781a2f" + integrity sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ== + dependencies: + kind-of "^5.0.2" + default-shell@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/default-shell/-/default-shell-1.0.1.tgz#752304bddc6174f49eb29cb988feea0b8813c8bc" @@ -5847,11 +6048,25 @@ doctrine@3.0.0, doctrine@^3.0.0: dependencies: esutils "^2.0.2" +dom-serializer@^1.0.1: + 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" + 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.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" resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" @@ -5859,6 +6074,22 @@ domexception@^1.0.1: dependencies: webidl-conversions "^4.0.2" +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" @@ -5903,6 +6134,11 @@ download@8.0.0: p-event "^2.1.0" pify "^4.0.1" +downloadjs@1.4.7: + version "1.4.7" + resolved "https://registry.yarnpkg.com/downloadjs/-/downloadjs-1.4.7.tgz#f69f96f940e0d0553dac291139865a3cd0101e3c" + integrity sha512-LN1gO7+u9xjU5oEScGFKvXhYf7Y/empUIIEAGBs1LzUq/rg5duiDrkuH5A2lQGd5jfMOb9X9usDa2oVXwJ0U/Q== + duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" @@ -5918,6 +6154,17 @@ duplexify@^4.0.0: readable-stream "^3.1.1" stream-shift "^1.0.0" +easymde@^2.16.1: + version "2.18.0" + resolved "https://registry.yarnpkg.com/easymde/-/easymde-2.18.0.tgz#ff1397d07329b1a7b9187d2d0c20766fa16b3b1b" + integrity sha512-IxVVUxNWIoXLeqtBU4BLc+eS/ScYhT1Dcb6yF5Wchoj1iXAV+TIIDWx+NCaZhY7RcSHqDPKllbYq7nwGKILnoA== + dependencies: + "@types/codemirror" "^5.60.4" + "@types/marked" "^4.0.7" + codemirror "^5.63.1" + codemirror-spell-checker "1.1.2" + marked "^4.1.0" + ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" @@ -6080,15 +6327,26 @@ end-stream@~0.1.0: dependencies: write-stream "~0.4.3" +engine.io-client@~6.2.3: + version "6.2.3" + resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-6.2.3.tgz#a8cbdab003162529db85e9de31575097f6d29458" + integrity sha512-aXPtgF1JS3RuuKcpSrBtimSjYvrbhKW9froICH4s0F3XQWLxsKNxqzG39nnvQZQnva4CMvUK63T7shevxRyYHw== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.1" + engine.io-parser "~5.0.3" + ws "~8.2.3" + xmlhttprequest-ssl "~2.0.0" + engine.io-parser@~5.0.3: version "5.0.4" resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.0.4.tgz#0b13f704fa9271b3ec4f33112410d8f3f41d0fc0" integrity sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg== engine.io@~6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-6.2.0.tgz#003bec48f6815926f2b1b17873e576acd54f41d0" - integrity sha512-4KzwW3F3bk+KlzSOY57fj/Jx6LyRQ1nbcyIadehl+AnXjKT7gDO0ORdRi/84ixvMKTym6ZKuxvbzN62HDDU1Lg== + version "6.2.1" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-6.2.1.tgz#e3f7826ebc4140db9bbaa9021ad6b1efb175878f" + integrity sha512-ECceEFcAaNRybd3lsGQKas3ZlMVjN3cyWwMP25D2i0zWfyiytVbTpRPa34qrr+FHddtpBVOmq4H/DCv1O0lZRA== dependencies: "@types/cookie" "^0.4.1" "@types/cors" "^2.8.12" @@ -6109,6 +6367,16 @@ enhanced-resolve@^5.9.3: graceful-fs "^4.2.4" tapable "^2.2.0" +ent@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" + integrity sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA== + +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" @@ -7114,6 +7382,11 @@ fs-constants@^1.0.0: resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== +fs-exists-sync@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" + integrity sha512-cR/vflFyPZtrN6b38ZyWxpWdhlXrzZEBawlpBQMq7033xVY7/kg0GDMBK5jg8lDYQckdJ5x/YC88lM3C7VMsLg== + fs-extra@8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" @@ -7262,6 +7535,14 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: has "^1.0.3" has-symbols "^1.0.3" +get-object@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/get-object/-/get-object-0.2.0.tgz#d92ff7d5190c64530cda0543dac63a3d47fe8c0c" + integrity sha512-7P6y6k6EzEFmO/XyUyFlXm1YLJy9xeA1x/grNV8276abX5GuwUtYgKFkRFkLixw4hf4Pz9q2vgv/8Ar42R0HuQ== + dependencies: + is-number "^2.0.2" + isobject "^0.2.0" + get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" @@ -7324,6 +7605,13 @@ get-value@^2.0.3, get-value@^2.0.6: resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" integrity sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA== +get-value@^3.0.0, get-value@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-3.0.1.tgz#5efd2a157f1d6a516d7524e124ac52d0a39ef5a8" + integrity sha512-mKZj9JLQrwMBtj5wxi6MH8Z5eSKaERpAwjg43dPtlGI1ZVEgH/qC7T8/6R2OBSUA+zzHBZgICsVJaEIV2tKTDA== + dependencies: + isobject "^3.0.1" + getopts@2.2.5: version "2.2.5" resolved "https://registry.yarnpkg.com/getopts/-/getopts-2.2.5.tgz#67a0fe471cacb9c687d817cab6450b96dde8313b" @@ -7629,7 +7917,24 @@ gtoken@^5.0.4: google-p12-pem "^3.1.3" jws "^4.0.0" -handlebars@^4.7.7: +gulp-header@^1.7.1: + version "1.8.12" + resolved "https://registry.yarnpkg.com/gulp-header/-/gulp-header-1.8.12.tgz#ad306be0066599127281c4f8786660e705080a84" + integrity sha512-lh9HLdb53sC7XIZOYzTXM4lFuXElv3EVkSDhsd7DoJBj7hm+Ni7D3qYbb+Rr8DuM8nRanBvkVO9d7askreXGnQ== + dependencies: + concat-with-sourcemaps "*" + lodash.template "^4.4.0" + through2 "^2.0.0" + +handlebars-utils@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/handlebars-utils/-/handlebars-utils-1.0.6.tgz#cb9db43362479054782d86ffe10f47abc76357f9" + integrity sha512-d5mmoQXdeEqSKMtQQZ9WkiUcO1E3tPbWxluCK9hVgIDPzQa9WsKo3Lbe/sGflTe7TomHEeZaOgwIkyIr1kfzkw== + dependencies: + kind-of "^6.0.0" + typeof-article "^0.1.1" + +handlebars@^4.7.6, handlebars@^4.7.7: version "4.7.7" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== @@ -7723,6 +8028,14 @@ has-value@^1.0.0: has-values "^1.0.0" isobject "^3.0.0" +has-value@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-2.0.2.tgz#d0f12e8780ba8e90e66ad1a21c707fdb67c25658" + integrity sha512-ybKOlcRsK2MqrM3Hmz/lQxXHZ6ejzSPzpNabKB45jb5qDgJvKPa3SdapTsTLwEb9WltgWpOmNax7i+DzNOk4TA== + dependencies: + get-value "^3.0.0" + has-values "^2.0.1" + has-values@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" @@ -7736,6 +8049,13 @@ has-values@^1.0.0: is-number "^3.0.0" kind-of "^4.0.0" +has-values@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-2.0.1.tgz#3876200ff86d8a8546a9264a952c17d5fc17579d" + integrity sha512-+QdH3jOmq9P8GfdjFg0eJudqx1FqU62NQJ4P16rOEHeRdl7ckgwn6uqQjzYE0ZoHVV/e5E2esuJ5Gl5+HUW19w== + dependencies: + kind-of "^6.0.2" + has-yarn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-2.1.0.tgz#137e11354a7b5bf11aa5cb649cf0c6f3ff2b2e77" @@ -7748,6 +8068,16 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" +helper-md@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/helper-md/-/helper-md-0.2.2.tgz#c1f59d7e55bbae23362fd8a0e971607aec69d41f" + integrity sha512-49TaQzK+Ic7ZVTq4i1UZxRUJEmAilTk8hz7q4I0WNUaTclLR8ArJV5B3A1fe1xF2HtsDTr2gYKLaVTof/Lt84Q== + dependencies: + ent "^2.2.0" + extend-shallow "^2.0.1" + fs-exists-sync "^0.1.0" + remarkable "^1.6.2" + homedir-polyfill@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" @@ -7777,6 +8107,29 @@ html-escaper@^2.0.0: resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== +html-tag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/html-tag/-/html-tag-2.0.0.tgz#36c3bc8d816fd30b570d5764a497a641640c2fed" + integrity sha512-XxzooSo6oBoxBEUazgjdXj7VwTn/iSTSZzTYKzYY6I916tkaYzypHxy+pbVU1h+0UQ9JlVf5XkNQyxOAiiQO1g== + dependencies: + is-self-closing "^1.0.1" + kind-of "^6.0.0" + +html5-qrcode@^2.2.1: + version "2.3.3" + resolved "https://registry.yarnpkg.com/html5-qrcode/-/html5-qrcode-2.3.3.tgz#e88fb2088e3475e22e2d938eb7e3df9b90d4ae52" + integrity sha512-3mA9N7wKM+nEFemBo1vCNgypJBFv2WvBXeacLx9b+Z8sueW1cUHq6p5fQ9aIBDK0DNBvtqhhW+79hdJPUHGwrA== + +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" @@ -8241,6 +8594,13 @@ is-docker@^2.0.0, is-docker@^2.1.1: resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== +is-even@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-even/-/is-even-1.0.0.tgz#76b5055fbad8d294a86b6a949015e1c97b717c06" + integrity sha512-LEhnkAdJqic4Dbqn58A0y52IXoHWlsueqQkKfMfdEnIYG8A1sm/GHidKkS6yvXlMoRrkM34csHnXQtOqcb+Jzg== + dependencies: + is-odd "^0.1.2" + is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" @@ -8347,6 +8707,13 @@ is-number-object@^1.0.4: dependencies: has-tostringtag "^1.0.0" +is-number@^2.0.2: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + integrity sha512-QUzH43Gfb9+5yckcrSA0VBDwEtDUchrk4F6tfJZQuNzDJbEDB9cZNzSfXGQ1jqmdDY/kl41lUOWM9syA8z8jlg== + dependencies: + kind-of "^3.0.2" + is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" @@ -8369,6 +8736,13 @@ is-object@^1.0.1: resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf" integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA== +is-odd@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-0.1.2.tgz#bc573b5ce371ef2aad6e6f49799b72bef13978a7" + integrity sha512-Ri7C2K7o5IrUU9UEI8losXJCCD/UtsaIrkR5sxIcFg4xQ9cRJXlWA5DQvTE0yDc0krvSNLsRGXN11UPS6KyfBw== + dependencies: + is-number "^3.0.0" + is-path-inside@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" @@ -8386,6 +8760,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-property@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" @@ -8409,6 +8788,13 @@ is-retry-allowed@^2.2.0: resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-2.2.0.tgz#88f34cbd236e043e71b6932d09b0c65fb7b4d71d" integrity sha512-XVm7LOeLpTW4jV19QSH38vkswxoLud8sQ57YwJVTPWdiaI9I8keEhGFpBlslyVsgdQy4Opg8QOLb8YRgsyZiQg== +is-self-closing@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-self-closing/-/is-self-closing-1.0.1.tgz#5f406b527c7b12610176320338af0fa3896416e4" + integrity sha512-E+60FomW7Blv5GXTlYee2KDrnG6srxF7Xt1SjrhWUGUEsTFIqY/nq2y3DaftCsgUMdh89V07IVfhY9KIJhLezg== + dependencies: + self-closing-tags "^1.0.1" + is-shared-array-buffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" @@ -8519,6 +8905,11 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== +isobject@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-0.2.0.tgz#a3432192f39b910b5f02cc989487836ec70aa85e" + integrity sha512-VaWq6XYAsbvM0wf4dyBO7WH9D7GosB7ZZlqrawI9BBiTMINBeCyqSKBa35m870MY3O4aM31pYyZi9DfGrYMJrQ== + isobject@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" @@ -9693,7 +10084,7 @@ keyv@^3.0.0: dependencies: json-buffer "3.0.0" -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.1.0, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" integrity sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ== @@ -9707,12 +10098,12 @@ kind-of@^4.0.0: dependencies: is-buffer "^1.1.5" -kind-of@^5.0.0: +kind-of@^5.0.0, kind-of@^5.0.2: version "5.1.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== -kind-of@^6.0.0, kind-of@^6.0.2: +kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== @@ -9927,6 +10318,11 @@ lcid@^2.0.0: dependencies: invert-kv "^2.0.0" +leaflet@^1.7.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.9.3.tgz#52ec436954964e2d3d39e0d433da4b2500d74414" + integrity sha512-iB2cR9vAkDOu5l3HAay2obcUHZ7xwUBBjph8+PGtmW/2lYhbLizWtG7nTeYht36WfOslixQF9D/uSIzhZgGMfQ== + left-pad@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" @@ -10121,6 +10517,11 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +lodash._reinterpolate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + integrity sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA== + lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" @@ -10231,6 +10632,21 @@ lodash.sortby@^4.7.0: resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" integrity sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA== +lodash.template@^4.4.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" + integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.templatesettings "^4.0.0" + +lodash.templatesettings@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" + integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.without@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.without/-/lodash.without-4.4.0.tgz#3cd4574a00b67bae373a94b748772640507b7aac" @@ -10241,7 +10657,7 @@ lodash.xor@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.xor/-/lodash.xor-4.5.0.tgz#4d48ed7e98095b0632582ba714d3ff8ae8fb1db6" integrity sha512-sVN2zimthq7aZ5sPGXnSz32rZPuqcparVW50chJQe+mzTYV+IsxSsl/2gnkWWE2Of7K3myBQBqtLKOUEHJKRsQ== -lodash@4.17.21, lodash@^4.14.0, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.17.3: +lodash@4.17.21, lodash@^4.14.0, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.3: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -10383,6 +10799,11 @@ markdown-it@^12.2.0: mdurl "^1.0.1" uc.micro "^1.0.5" +marked@^4.1.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/marked/-/marked-4.2.3.tgz#bd76a5eb510ff1d8421bc6c3b2f0b93488c15bea" + integrity sha512-slWRdJkbTZ+PjkyJnE30Uid64eHwbwa1Q25INCAYfZlK4o6ylagBy/Le9eWntqJFoFT93ikUKMv47GZ4gTwHkw== + matcher@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/matcher/-/matcher-3.0.0.tgz#bd9060f4c5b70aa8041ccc6f80368760994f30ca" @@ -10478,7 +10899,7 @@ methods@^1.1.1, methods@^1.1.2: resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== -micromatch@^3.1.10, micromatch@^3.1.4: +micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.5: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -10781,6 +11202,16 @@ nano@^10.1.0: qs "^6.11.0" tough-cookie "^4.1.2" +nanoid@^2.1.0: + version "2.1.11" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-2.1.11.tgz#ec24b8a758d591561531b4176a01e3ab4f0f0280" + integrity sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA== + +nanoid@^3.3.4: + version "3.3.4" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" + integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== + nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -11454,6 +11885,11 @@ parse-passwd@^1.0.0: resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" integrity sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q== +parse-srcset@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/parse-srcset/-/parse-srcset-1.0.2.tgz#f2bd221f6cc970a938d88556abc589caaaa2bde1" + integrity sha512-/2qh0lav6CmI15FzA3i/2Bzk2zCgQhGMkvhOhKNcBVQ1ldgpbfiNTVslmooUmWJcADi1f1kIeynbDRVzNlfR6Q== + parse5@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" @@ -11810,6 +12246,15 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg== +postcss@^8.3.11: + version "8.4.19" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.19.tgz#61178e2add236b17351897c8bcc0b4c8ecab56fc" + integrity sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA== + dependencies: + nanoid "^3.3.4" + 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" @@ -12581,6 +13026,16 @@ regexp.prototype.flags@^1.4.3: define-properties "^1.1.3" functions-have-names "^1.2.2" +regexparam@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/regexparam/-/regexparam-2.0.1.tgz#c912f5dae371e3798100b3c9ce22b7414d0889fa" + integrity sha512-zRgSaYemnNYxUv+/5SeoHI0eJIgTL/A2pUtXUPLHQxUldagouJ9p+K6IbIZ/JiQuCEv2E2B1O11SjVQy3aMCkw== + +regexparam@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/regexparam/-/regexparam-1.3.0.tgz#2fe42c93e32a40eff6235d635e0ffa344b92965f" + integrity sha512-6IQpFBv6e5vz1QAqI+V4k8P2e/3gRrqfCJ9FI+O1FLQTO+Uz6RXZEZOPmTJ6hlGj7gkERzY5BRCv09whKP96/g== + regexpp@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" @@ -12629,6 +13084,21 @@ relative-microtime@^2.0.0: resolved "https://registry.yarnpkg.com/relative-microtime/-/relative-microtime-2.0.0.tgz#cceed2af095ecd72ea32011279c79e5fcc7de29b" integrity sha512-l18ha6HEZc+No/uK4GyAnNxgKW7nvEe35IaeN54sShMojtqik2a6GbTyuiezkjpPaqP874Z3lW5ysBo5irz4NA== +relative@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/relative/-/relative-3.0.2.tgz#0dcd8ec54a5d35a3c15e104503d65375b5a5367f" + integrity sha512-Q5W2qeYtY9GbiR8z1yHNZ1DGhyjb4AnLEjt8iE6XfcC1QIu+FAtj3HQaO0wH28H1mX6cqNLvAqWhP402dxJGyA== + dependencies: + isobject "^2.0.0" + +remarkable@^1.6.2: + version "1.7.4" + resolved "https://registry.yarnpkg.com/remarkable/-/remarkable-1.7.4.tgz#19073cb960398c87a7d6546eaa5e50d2022fcd00" + integrity sha512-e6NKUXgX95whv7IgddywbeN/ItCkWbISmc2DiqHJb0wTrqZIexqdco5b8Z3XZoo/48IdNVKM9ZCvTPJ4F5uvhg== + dependencies: + argparse "^1.0.10" + autolinker "~0.28.0" + remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" @@ -12916,6 +13386,18 @@ sane@^4.0.3: minimist "^1.1.1" walker "~1.0.5" +sanitize-html@^2.7.0: + version "2.7.3" + resolved "https://registry.yarnpkg.com/sanitize-html/-/sanitize-html-2.7.3.tgz#166c868444ee4f9fd7352ac8c63fa86c343fc2bd" + integrity sha512-jMaHG29ak4miiJ8wgqA1849iInqORgNv7SLfSw9LtfOhEUQ1C0YHKH73R+hgyufBW9ZFeJrb057k9hjlfBCVlw== + 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" @@ -12947,6 +13429,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.2" + resolved "https://registry.yarnpkg.com/screenfull/-/screenfull-6.0.2.tgz#3dbe4b8c4f8f49fb8e33caa8f69d0bca730ab238" + integrity sha512-AQdy8s4WhNvUZ6P8F6PB21tSPIYKniic+Ogx0AacBMjKP1GUHN2E9URxQHtCusiwxudnCKkdy4GrHXPPJSkCCw== + search-params@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/search-params/-/search-params-3.0.0.tgz#dbc7c243058e5a33ae1e9870be91f5aced4100d8" @@ -12964,6 +13451,11 @@ seek-bzip@^1.0.5: dependencies: commander "^2.8.1" +self-closing-tags@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/self-closing-tags/-/self-closing-tags-1.0.1.tgz#6c5fa497994bb826b484216916371accee490a5d" + integrity sha512-7t6hNbYMxM+VHXTgJmxwgZgLGktuXtVVD5AivWzNTdJBM4DBjnDKDzkf2SrNjihaArpeJYNjxkELBu1evI4lQA== + semver-compare@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" @@ -13109,6 +13601,13 @@ shimmer@^1.2.0: resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== +shortid@^2.2.15: + version "2.2.16" + resolved "https://registry.yarnpkg.com/shortid/-/shortid-2.2.16.tgz#b742b8f0cb96406fd391c76bfc18a67a57fe5608" + integrity sha512-Ugt+GIZqvGXCIItnsL+lvFJOiN7RYqlGy7QE41O3YC1xbNSeDGIRO7xg2JJXIAj1cAGnOeC1r7/T9pgrtQbv4g== + dependencies: + nanoid "^2.1.0" + side-channel@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" @@ -13249,7 +13748,17 @@ socket.io-adapter@~2.4.0: resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.4.0.tgz#b50a4a9ecdd00c34d4c8c808224daa1a786152a6" integrity sha512-W4N+o69rkMEGVuk2D/cvca3uYsvGlMwsySWV447y99gUPghxq42BxqLNMndb+a1mm/5/7NeXVQS7RLa2XyXvYg== -socket.io-parser@~4.2.0: +socket.io-client@^4.5.1: + version "4.5.4" + resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-4.5.4.tgz#d3cde8a06a6250041ba7390f08d2468ccebc5ac9" + integrity sha512-ZpKteoA06RzkD32IbqILZ+Cnst4xewU7ZYK12aS1mzHftFFjpoMz69IuhP/nL25pJfao/amoPI527KnuhFm01g== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.2" + engine.io-client "~6.2.3" + socket.io-parser "~4.2.1" + +socket.io-parser@~4.2.0, socket.io-parser@~4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.1.tgz#01c96efa11ded938dcb21cbe590c26af5eff65e5" integrity sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g== @@ -13311,6 +13820,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" @@ -13715,6 +14229,11 @@ strip-outer@^1.0.0: dependencies: escape-string-regexp "^1.0.2" +striptags@^3.1.1: + version "3.2.0" + resolved "https://registry.yarnpkg.com/striptags/-/striptags-3.2.0.tgz#cc74a137db2de8b0b9a370006334161f7dd67052" + integrity sha512-g45ZOGzHDMe2bdYMdIvdAfCQkCTDMGBazSw1ypMowwGIee7ZQ5dU0rBJ8Jqgl+jAKIv4dbeE1jscZq9wid1Tkw== + style-loader@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-3.3.1.tgz#057dfa6b3d4d7c7064462830f9113ed417d38575" @@ -13814,11 +14333,23 @@ svelte-portal@^1.0.0: resolved "https://registry.yarnpkg.com/svelte-portal/-/svelte-portal-1.0.0.tgz#36a47c5578b1a4d9b4dc60fa32a904640ec4cdd3" integrity sha512-nHf+DS/jZ6jjnZSleBMSaZua9JlG5rZv9lOGKgJuaZStfevtjIlUJrkLc3vbV8QdBvPPVmvcjTlazAzfKu0v3Q== +svelte-spa-router@^3.0.5: + version "3.3.0" + resolved "https://registry.yarnpkg.com/svelte-spa-router/-/svelte-spa-router-3.3.0.tgz#2fc0967a49dc361dfe4d38dddad6e662eed5b42c" + integrity sha512-cwRNe7cxD43sCvSfEeaKiNZg3FCizGxeMcf7CPiWRP3jKXjEma3vxyyuDtPOam6nWbVxl9TNM3hlE/i87ZlqcQ== + dependencies: + regexparam "2.0.1" + svelte@3.49.0: version "3.49.0" resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.49.0.tgz#5baee3c672306de1070c3b7888fc2204e36a4029" integrity sha512-+lmjic1pApJWDfPCpUUTc1m8azDqYCG1JN9YEngrx/hUyIcFJo6VZhj0A1Ai0wqoHcEIuQy+e9tk+4uDgdtsFA== +svelte@^3.46.2, svelte@^3.49.0: + version "3.53.1" + resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.53.1.tgz#db9d7df7a8f570e8e22547444c149208b1914442" + integrity sha512-Q4/hHkktZogGhN5iqxqSi9sjEVoe/NbIxX4hXEHoasTxj+TxEQVAq66LnDMdAZxjmsodkoI5F3slqsS68U7FNw== + svg.draggable.js@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/svg.draggable.js/-/svg.draggable.js-2.2.2.tgz#c514a2f1405efb6f0263e7958f5b68fce50603ba" @@ -14171,6 +14702,11 @@ to-fast-properties@^2.0.0: resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= +to-gfm-code-block@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/to-gfm-code-block/-/to-gfm-code-block-0.1.1.tgz#25d045a5fae553189e9637b590900da732d8aa82" + integrity sha512-LQRZWyn8d5amUKnfR9A9Uu7x9ss7Re8peuWR2gkh1E+ildOfv2aF26JpuDg8JtvCduu5+hOrMIH+XstZtnagqg== + to-json-schema@0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/to-json-schema/-/to-json-schema-0.2.5.tgz#ef3c3f11ad64460dcfbdbafd0fd525d69d62a98f" @@ -14439,6 +14975,13 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" +typeof-article@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/typeof-article/-/typeof-article-0.1.1.tgz#9f07e733c3fbb646ffa9e61c08debacd460e06af" + integrity sha512-Vn42zdX3FhmUrzEmitX3iYyLb+Umwpmv8fkZRIknYh84lmdrwqZA5xYaoKiIj2Rc5i/5wcDrpUmZcbk1U51vTw== + dependencies: + kind-of "^3.1.0" + typeof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/typeof/-/typeof-1.0.0.tgz#9c84403f2323ae5399167275497638ea1d2f2440" @@ -14449,6 +14992,11 @@ typescript@4.7.3: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.3.tgz#8364b502d5257b540f9de4c40be84c98e23a129d" integrity sha512-WOkT3XYvrpXx4vMMqlD+8R8R37fZkjyLGlxavMc4iB8lrl8L0DeTcHbYgw/v0N/z9wAFsgBhcsF0ruoySS22mA== +typo-js@*: + version "1.2.2" + resolved "https://registry.yarnpkg.com/typo-js/-/typo-js-1.2.2.tgz#340484d81fe518e77c81a5a770162b14492f183b" + integrity sha512-C7pYBQK17EjSg8tVNY91KHdUt5Nf6FMJ+c3js076quPmBML57PmNMzAcIq/2kf/hSYtFABNDIYNYlJRl5BJhGw== + uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" @@ -14791,7 +15339,7 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -vm2@3.9.11: +vm2@3.9.11, vm2@^3.9.4: version "3.9.11" resolved "https://registry.yarnpkg.com/vm2/-/vm2-3.9.11.tgz#a880f510a606481719ec3f9803b940c5805a06fe" integrity sha512-PFG8iJRSjvvBdisowQ7iVF580DXb1uCIiGaXgm7tynMR1uTBlv7UJlB1zdv5KJ+Tmq1f0Upnj3fayoEOPpCBKg== @@ -15222,6 +15770,11 @@ xmlbuilder@~9.0.1: resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" integrity sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0= +xmlhttprequest-ssl@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz#91360c86b914e67f44dce769180027c0da618c67" + integrity sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A== + xpath.js@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/xpath.js/-/xpath.js-1.1.0.tgz#3816a44ed4bb352091083d002a383dd5104a5ff1" @@ -15360,6 +15913,11 @@ yauzl@^2.4.2: buffer-crc32 "~0.2.3" fd-slicer "~1.1.0" +year@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/year/-/year-0.2.1.tgz#4083ae520a318b23ec86037f3000cb892bdf9bb0" + integrity sha512-9GnJUZ0QM4OgXuOzsKNzTJ5EOkums1Xc+3YQXp+Q+UxFjf7zLucp9dQ8QMIft0Szs1E1hUiXFim1OYfEKFq97w== + ylru@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/ylru/-/ylru-1.3.2.tgz#0de48017473275a4cbdfc83a1eaf67c01af8a785" From 37410e041a089af9a6acd7b52a46d0652a00b6b8 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 23 Nov 2022 11:44:15 +0000 Subject: [PATCH 206/396] Some fixes based on test runs. --- packages/server/src/api/routes/tests/backup.spec.js | 10 +++++++++- .../server/src/middleware/tests/authorized.spec.js | 2 +- packages/server/src/utilities/rowProcessor/index.ts | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/server/src/api/routes/tests/backup.spec.js b/packages/server/src/api/routes/tests/backup.spec.js index 7863129c75..7131aca852 100644 --- a/packages/server/src/api/routes/tests/backup.spec.js +++ b/packages/server/src/api/routes/tests/backup.spec.js @@ -1,4 +1,12 @@ -jest.mock("../../../utilities/fileSystem/utilities") +jest.mock("@budibase/backend-core", () => { + const core = jest.requireActual("@budibase/backend-core") + return { + ...core, + objectStore: { + budibaseTempDir: core.objectStore.budibaseTempDir, + }, + } +}) const { checkBuilderEndpoint } = require("./utilities/TestFunctions") const setup = require("./utilities") diff --git a/packages/server/src/middleware/tests/authorized.spec.js b/packages/server/src/middleware/tests/authorized.spec.js index 18a100bd93..85697b6052 100644 --- a/packages/server/src/middleware/tests/authorized.spec.js +++ b/packages/server/src/middleware/tests/authorized.spec.js @@ -154,7 +154,7 @@ describe("Authorization middleware", () => { _id: "" }, }) - config.setMiddlewareRequiredPermission(PermissionType.ADMIN, PermissionLevel.BASIC) + config.setMiddlewareRequiredPermission(permissions.PermissionType.ADMIN, permissions.PermissionLevel.BASIC) await config.executeMiddleware() expect(config.throw).toHaveBeenCalledWith(403, "User does not have permission") diff --git a/packages/server/src/utilities/rowProcessor/index.ts b/packages/server/src/utilities/rowProcessor/index.ts index 5595d0c5fb..9807fc7d61 100644 --- a/packages/server/src/utilities/rowProcessor/index.ts +++ b/packages/server/src/utilities/rowProcessor/index.ts @@ -52,7 +52,7 @@ export function processAutoColumn( user: User | null, table: Table, row: Row, - opts: AutoColumnProcessingOpts + opts?: AutoColumnProcessingOpts ) { let noUser = !user || !user.userId let isUserTable = table._id === InternalTables.USER_METADATA @@ -61,7 +61,7 @@ export function processAutoColumn( const creating = !row._rev // check its not user table, or whether any of the processing options have been disabled const shouldUpdateUserFields = - !isUserTable && !opts.reprocessing && !opts.noAutoRelationships && !noUser + !isUserTable && !opts?.reprocessing && !opts?.noAutoRelationships && !noUser for (let [key, schema] of Object.entries(table.schema)) { if (!schema.autocolumn) { continue From ff5a44692d224d96262809b3a5f1f3175b4734cc Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 23 Nov 2022 12:32:20 +0000 Subject: [PATCH 207/396] Remount table when columns change to avoid rare crashes --- packages/bbui/src/Table/Table.svelte | 276 ++++++++++++++------------- 1 file changed, 139 insertions(+), 137 deletions(-) diff --git a/packages/bbui/src/Table/Table.svelte b/packages/bbui/src/Table/Table.svelte index 7745c3c407..958869b066 100644 --- a/packages/bbui/src/Table/Table.svelte +++ b/packages/bbui/src/Table/Table.svelte @@ -270,155 +270,157 @@ } -
- {#if !loaded} -
- -
- {:else} -
- {#if fields.length} -
- {#if showEditColumn} -
- {#if allowSelectRows} - - {:else} - Edit - {/if} -
- {/if} - {#each fields as field} -
sortBy(schema[field])} - > -
{getDisplayName(schema[field])}
- {#if schema[field]?.autocolumn} - - - - {/if} - {#if sortColumn === field} - - {/if} - {#if allowEditColumns && schema[field]?.editable !== false} - editColumn(e, field)} - > - - - {/if} -
- {/each} -
- {/if} - {#if sortedRows?.length} - {#each sortedRows as row, idx} -
+{#key fields?.length} +
+ {#if !loaded} +
+ +
+ {:else} +
+ {#if fields.length} +
{#if showEditColumn}
{ - toggleSelectRow(row) - e.stopPropagation() - }} + class:noBorderHeader={!showHeaderBorder} + class="spectrum-Table-headCell spectrum-Table-headCell--divider spectrum-Table-headCell--edit" > - selectedRow._id === row._id - ) !== -1} - onEdit={e => editRow(e, row)} - {allowSelectRows} - {allowEditRows} - /> + {#if allowSelectRows} + + {:else} + Edit + {/if}
{/if} {#each fields as field}
{ - if (!schema[field]?.preventSelectRow) { - dispatch("click", row) - toggleSelectRow(row) - } - }} + class="spectrum-Table-headCell" + class:noBorderHeader={!showHeaderBorder} + class:spectrum-Table-headCell--alignCenter={schema[field] + .align === "Center"} + class:spectrum-Table-headCell--alignRight={schema[field] + .align === "Right"} + class:is-sortable={schema[field].sortable !== false} + class:is-sorted-desc={sortColumn === field && + sortOrder === "Descending"} + class:is-sorted-asc={sortColumn === field && + sortOrder === "Ascending"} + on:click={() => sortBy(schema[field])} > - - - +
{getDisplayName(schema[field])}
+ {#if schema[field]?.autocolumn} + + + + {/if} + {#if sortColumn === field} + + {/if} + {#if allowEditColumns && schema[field]?.editable !== false} + editColumn(e, field)} + > + + + {/if}
{/each}
- {/each} - {:else} -
- {#if customPlaceholder} - - {:else} -
- - - -
{placeholderText}
+ {/if} + {#if sortedRows?.length} + {#each sortedRows as row, idx} +
+ {#if showEditColumn} +
{ + toggleSelectRow(row) + e.stopPropagation() + }} + > + selectedRow._id === row._id + ) !== -1} + onEdit={e => editRow(e, row)} + {allowSelectRows} + {allowEditRows} + /> +
+ {/if} + {#each fields as field} +
{ + if (!schema[field]?.preventSelectRow) { + dispatch("click", row) + toggleSelectRow(row) + } + }} + > + + + +
+ {/each}
- {/if} -
- {/if} -
- {/if} -
+ {/each} + {:else} +
+ {#if customPlaceholder} + + {:else} +
+ + + +
{placeholderText}
+
+ {/if} +
+ {/if} +
+ {/if} +
+{/key} From d0dc9adcca31b6fe4e30fefcf4ba812915215c80 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 23 Nov 2022 15:04:51 +0000 Subject: [PATCH 215/396] Update auto screens to only generate a single list screen using new side panels --- .../store/screenTemplates/index.js | 8 +- .../store/screenTemplates/newRowScreen.js | 72 ---------- .../store/screenTemplates/rowDetailScreen.js | 70 ---------- .../store/screenTemplates/rowListScreen.js | 12 +- .../screenTemplates/utils/commonComponents.js | 131 ------------------ .../screens/_components/ScreenWizard.svelte | 18 +-- 6 files changed, 13 insertions(+), 298 deletions(-) delete mode 100644 packages/builder/src/builderStore/store/screenTemplates/newRowScreen.js delete mode 100644 packages/builder/src/builderStore/store/screenTemplates/rowDetailScreen.js diff --git a/packages/builder/src/builderStore/store/screenTemplates/index.js b/packages/builder/src/builderStore/store/screenTemplates/index.js index 51496bdeb3..1bf0af6eeb 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/index.js +++ b/packages/builder/src/builderStore/store/screenTemplates/index.js @@ -1,13 +1,7 @@ -import newRowScreen from "./newRowScreen" -import rowDetailScreen from "./rowDetailScreen" import rowListScreen from "./rowListScreen" import createFromScratchScreen from "./createFromScratchScreen" -const allTemplates = tables => [ - ...newRowScreen(tables), - ...rowDetailScreen(tables), - ...rowListScreen(tables), -] +const allTemplates = tables => [...rowListScreen(tables)] // Allows us to apply common behaviour to all create() functions const createTemplateOverride = (frontendState, template) => () => { diff --git a/packages/builder/src/builderStore/store/screenTemplates/newRowScreen.js b/packages/builder/src/builderStore/store/screenTemplates/newRowScreen.js deleted file mode 100644 index 6564bf6050..0000000000 --- a/packages/builder/src/builderStore/store/screenTemplates/newRowScreen.js +++ /dev/null @@ -1,72 +0,0 @@ -import sanitizeUrl from "./utils/sanitizeUrl" -import { Screen } from "./utils/Screen" -import { Component } from "./utils/Component" -import { makeBreadcrumbContainer } from "./utils/commonComponents" -import { getSchemaForDatasource } from "../../dataBinding" - -export default function (tables) { - return tables.map(table => { - return { - name: `${table.name} - New`, - create: () => createScreen(table), - id: NEW_ROW_TEMPLATE, - table: table._id, - } - }) -} - -export const newRowUrl = table => sanitizeUrl(`/${table.name}/new/row`) -export const NEW_ROW_TEMPLATE = "NEW_ROW_TEMPLATE" - -const rowListUrl = table => sanitizeUrl(`/${table.name}`) - -const getFields = schema => { - let columns = [] - Object.entries(schema || {}).forEach(([field, fieldSchema]) => { - if (!field || !fieldSchema) { - return - } - if (!fieldSchema?.autocolumn) { - columns.push(field) - } - }) - return columns -} - -const generateFormBlock = table => { - const datasource = { type: "table", tableId: table._id } - const { schema } = getSchemaForDatasource(null, datasource, { - formSchema: true, - }) - const formBlock = new Component("@budibase/standard-components/formblock") - formBlock - .customProps({ - title: "New row", - actionType: "Create", - actionUrl: rowListUrl(table), - showDeleteButton: false, - showSaveButton: true, - fields: getFields(schema), - dataSource: { - label: table.name, - tableId: table._id, - type: "table", - }, - labelPosition: "left", - size: "spectrum--medium", - }) - .instanceName(`${table.name} - Form block`) - return formBlock -} - -const createScreen = table => { - const formBlock = generateFormBlock(table) - const screen = new Screen() - .instanceName(`${table.name} - New`) - .route(newRowUrl(table)) - - return screen - .addChild(makeBreadcrumbContainer(table.name, "New row")) - .addChild(formBlock) - .json() -} diff --git a/packages/builder/src/builderStore/store/screenTemplates/rowDetailScreen.js b/packages/builder/src/builderStore/store/screenTemplates/rowDetailScreen.js deleted file mode 100644 index 22b39aba3e..0000000000 --- a/packages/builder/src/builderStore/store/screenTemplates/rowDetailScreen.js +++ /dev/null @@ -1,70 +0,0 @@ -import sanitizeUrl from "./utils/sanitizeUrl" -import { Screen } from "./utils/Screen" -import { Component } from "./utils/Component" -import { makeBreadcrumbContainer } from "./utils/commonComponents" -import { getSchemaForDatasource } from "../../dataBinding" - -export default function (tables) { - return tables.map(table => { - return { - name: `${table.name} - Detail`, - create: () => createScreen(table), - id: ROW_DETAIL_TEMPLATE, - table: table._id, - } - }) -} - -export const ROW_DETAIL_TEMPLATE = "ROW_DETAIL_TEMPLATE" -export const rowDetailUrl = table => sanitizeUrl(`/${table.name}/:id`) - -const rowListUrl = table => sanitizeUrl(`/${table.name}`) - -const getFields = schema => { - let columns = [] - Object.entries(schema || {}).forEach(([field, fieldSchema]) => { - if (!field || !fieldSchema) { - return - } - if (!fieldSchema?.autocolumn) { - columns.push(field) - } - }) - return columns -} - -const generateFormBlock = table => { - const datasource = { type: "table", tableId: table._id } - const { schema } = getSchemaForDatasource(null, datasource, { - formSchema: true, - }) - - const formBlock = new Component("@budibase/standard-components/formblock") - formBlock - .customProps({ - title: "Edit row", - actionType: "Update", - actionUrl: rowListUrl(table), - showDeleteButton: true, - showSaveButton: true, - fields: getFields(schema), - dataSource: { - label: table.name, - tableId: table._id, - type: "table", - }, - labelPosition: "left", - size: "spectrum--medium", - }) - .instanceName(`${table.name} - Form block`) - return formBlock -} - -const createScreen = table => { - return new Screen() - .instanceName(`${table.name} - Detail`) - .route(rowDetailUrl(table)) - .addChild(makeBreadcrumbContainer(table.name, "Edit row")) - .addChild(generateFormBlock(table)) - .json() -} diff --git a/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js b/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js index 8231133bdf..06d9e5aa3e 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js +++ b/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js @@ -1,5 +1,4 @@ import sanitizeUrl from "./utils/sanitizeUrl" -import { newRowUrl } from "./newRowScreen" import { Screen } from "./utils/Screen" import { Component } from "./utils/Component" @@ -21,12 +20,6 @@ const generateTableBlock = table => { const tableBlock = new Component("@budibase/standard-components/tableblock") tableBlock .customProps({ - linkRows: true, - linkURL: `${rowListUrl(table)}/:id`, - showAutoColumns: false, - showTitleButton: true, - titleButtonText: "Create row", - titleButtonURL: newRowUrl(table), title: table.name, dataSource: { label: table.name, @@ -34,9 +27,14 @@ const generateTableBlock = table => { tableId: table._id, type: "table", }, + sortOrder: "Ascending", size: "spectrum--medium", paginate: true, rowCount: 8, + clickBehaviour: "details", + showTitleButton: true, + titleButtonText: "Create row", + titleButtonClickBehaviour: "new", }) .instanceName(`${table.name} - Table block`) return tableBlock diff --git a/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js b/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js index f00cd9c215..6fdedbe44c 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js +++ b/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js @@ -1,137 +1,6 @@ import { Component } from "./Component" -import { rowListUrl } from "../rowListScreen" import { getSchemaForDatasource } from "../../../dataBinding" -export function spectrumColor(number) { - // Acorn throws a parsing error in this file if the word g-l-o-b-a-l is found - // (without dashes - I can't even type it in a comment). - // God knows why. It seems to think optional chaining further down the - // file is invalid if the word g-l-o-b-a-l is found - hence the reason this - // statement is split into parts. - return "var(--spectrum-glo" + `bal-color-gray-${number})` -} - -export function makeLinkComponent(tableName) { - return new Component("@budibase/standard-components/link") - .text(tableName) - .customProps({ - url: `/${tableName.toLowerCase()}`, - openInNewTab: false, - color: spectrumColor(700), - size: "S", - align: "left", - }) -} - -export function makeMainForm() { - return new Component("@budibase/standard-components/form") - .normalStyle({ - width: "600px", - }) - .instanceName("Form") -} - -export function makeBreadcrumbContainer(tableName, text) { - const link = makeLinkComponent(tableName).instanceName("Back Link") - - const arrowText = new Component("@budibase/standard-components/text") - .type("none") - .normalStyle({ - "margin-right": "4px", - "margin-left": "4px", - }) - .text(">") - .instanceName("Arrow") - .customProps({ - color: spectrumColor(700), - size: "S", - align: "left", - }) - - const identifierText = new Component("@budibase/standard-components/text") - .text(text) - .instanceName("Identifier") - .customProps({ - color: spectrumColor(700), - size: "S", - align: "left", - }) - - return new Component("@budibase/standard-components/container") - .customProps({ - gap: "N", - direction: "row", - hAlign: "left", - vAlign: "middle", - size: "shrink", - }) - .normalStyle({ - width: "600px", - "margin-right": "auto", - "margin-left": "auto", - }) - .instanceName("Breadcrumbs") - .addChild(link) - .addChild(arrowText) - .addChild(identifierText) -} - -export function makeSaveButton(table, formId) { - return new Component("@budibase/standard-components/button") - .text("Save") - .customProps({ - type: "primary", - size: "M", - onClick: [ - { - "##eventHandlerType": "Validate Form", - parameters: { - componentId: formId, - }, - }, - { - parameters: { - providerId: formId, - tableId: table._id, - }, - "##eventHandlerType": "Save Row", - }, - { - parameters: { - url: rowListUrl(table), - }, - "##eventHandlerType": "Navigate To", - }, - ], - }) - .instanceName("Save Button") -} - -export function makeTitleContainer(title) { - const heading = new Component("@budibase/standard-components/heading") - .instanceName("Title") - .text(title) - .customProps({ - size: "M", - align: "left", - }) - - return new Component("@budibase/standard-components/container") - .normalStyle({ - "margin-top": "32px", - "margin-bottom": "32px", - }) - .customProps({ - direction: "row", - hAlign: "stretch", - vAlign: "middle", - size: "shrink", - gap: "M", - }) - .instanceName("Title Container") - .addChild(heading) -} - const fieldTypeToComponentMap = { string: "stringfield", number: "numberfield", diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/screens/_components/ScreenWizard.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/screens/_components/ScreenWizard.svelte index bf782adf39..acca6e0fa3 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/screens/_components/ScreenWizard.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/screens/_components/ScreenWizard.svelte @@ -127,17 +127,13 @@ // Handler for Datasource Screen Creation const completeDatasourceScreenCreation = async () => { - // // Handle template selection - if (selectedTemplates?.length > 1) { - // Autoscreens, so create immediately - const screens = selectedTemplates.map(template => { - let screenTemplate = template.create() - screenTemplate.datasource = template.datasource - screenTemplate.autoTableId = template.table - return screenTemplate - }) - await createScreens({ screens, screenAccessRole }) - } + const screens = selectedTemplates.map(template => { + let screenTemplate = template.create() + screenTemplate.datasource = template.datasource + screenTemplate.autoTableId = template.table + return screenTemplate + }) + await createScreens({ screens, screenAccessRole }) } const confirmScreenBlank = async ({ screenUrl }) => { From e92f72b0caee1fece8ebe3848234b683f9d17d1c Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 23 Nov 2022 15:05:04 +0000 Subject: [PATCH 216/396] Fix issues with not resetting side panel content --- .../client/src/components/app/Layout.svelte | 2 +- .../src/components/app/SidePanel.svelte | 27 +++++++++++++++++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/packages/client/src/components/app/Layout.svelte b/packages/client/src/components/app/Layout.svelte index dc540a03e8..0f84785505 100644 --- a/packages/client/src/components/app/Layout.svelte +++ b/packages/client/src/components/app/Layout.svelte @@ -356,7 +356,7 @@ flex-direction: column; gap: 30px; overflow-y: auto; - transition: margin-right 260ms ease-out; + transition: margin-right 130ms ease-out; position: absolute; width: 400px; right: 0; diff --git a/packages/client/src/components/app/SidePanel.svelte b/packages/client/src/components/app/SidePanel.svelte index a48b8365a3..05862c880e 100644 --- a/packages/client/src/components/app/SidePanel.svelte +++ b/packages/client/src/components/app/SidePanel.svelte @@ -1,10 +1,13 @@
- + {#if renderContent} + + {/if}
diff --git a/packages/bbui/src/Table/Table.svelte b/packages/bbui/src/Table/Table.svelte index 7745c3c407..d6be0e8c9b 100644 --- a/packages/bbui/src/Table/Table.svelte +++ b/packages/bbui/src/Table/Table.svelte @@ -71,7 +71,8 @@ visibleRowCount, rowCount, totalRowCount, - rowHeight + rowHeight, + loading ) $: sortedRows = sortRows(rows, sortColumn, sortOrder) $: gridStyle = getGridStyle(fields, schema, showEditColumn) @@ -120,8 +121,12 @@ visibleRowCount, rowCount, totalRowCount, - rowHeight + rowHeight, + loading ) => { + if (loading) { + return `height: ${headerHeight + visibleRowCount * rowHeight}px;` + } if (!rowCount || !visibleRowCount || totalRowCount <= rowCount) { return "" } @@ -277,9 +282,11 @@ bind:offsetHeight={height} style={`--row-height: ${rowHeight}px; --header-height: ${headerHeight}px;`} > - {#if !loaded} + {#if loading}
- + + +
{:else}
@@ -438,9 +445,10 @@ /* Loading */ .loading { - display: grid; - place-items: center; + display: flex; + align-items: center; min-height: 100px; + justify-content: center; } /* Table */ diff --git a/packages/bbui/src/index.js b/packages/bbui/src/index.js index 538a62188f..601c4dcbca 100644 --- a/packages/bbui/src/index.js +++ b/packages/bbui/src/index.js @@ -4,6 +4,7 @@ import "./bbui.css" import "@spectrum-css/icon/dist/index-vars.css" // Components +export { default as Skeleton } from "./Skeleton/Skeleton.svelte" export { default as Input } from "./Form/Input.svelte" export { default as Stepper } from "./Form/Stepper.svelte" export { default as TextArea } from "./Form/TextArea.svelte" diff --git a/packages/client/manifest.json b/packages/client/manifest.json index 8ded099d80..1f29012197 100644 --- a/packages/client/manifest.json +++ b/packages/client/manifest.json @@ -284,7 +284,7 @@ "editable": true, "size": { "width": 105, - "height": 35 + "height": 32 }, "settings": [ { @@ -683,7 +683,7 @@ "editable": true, "size": { "width": 400, - "height": 30 + "height": 24 }, "settings": [ { @@ -808,7 +808,7 @@ "editable": true, "size": { "width": 400, - "height": 40 + "height": 32 }, "settings": [ { @@ -2447,6 +2447,7 @@ ] }, "stringfield": { + "skeleton": false, "name": "Text Field", "icon": "Text", "styles": [ @@ -2455,7 +2456,7 @@ "editable": true, "size": { "width": 400, - "height": 50 + "height": 32 }, "settings": [ { @@ -2538,6 +2539,7 @@ ] }, "numberfield": { + "skeleton": false, "name": "Number Field", "icon": "123", "styles": [ @@ -2652,6 +2654,7 @@ ] }, "optionsfield": { + "skeleton": false, "name": "Options Picker", "icon": "Menu", "styles": [ @@ -2820,6 +2823,7 @@ ] }, "multifieldselect": { + "skeleton": false, "name": "Multi-select Picker", "icon": "ViewList", "styles": [ @@ -2982,12 +2986,13 @@ ] }, "booleanfield": { + "skeleton": false, "name": "Checkbox", "icon": "SelectBox", "editable": true, "size": { - "width": 400, - "height": 50 + "width": 20, + "height": 20 }, "settings": [ { @@ -3139,6 +3144,7 @@ ] }, "datetimefield": { + "skeleton": false, "name": "Date Picker", "icon": "Date", "styles": [ @@ -3220,6 +3226,7 @@ ] }, "codescanner": { + "skeleton": false, "name": "Barcode/QR Scanner", "icon": "Camera", "styles": [ @@ -3385,6 +3392,7 @@ ] }, "attachmentfield": { + "skeleton": false, "name": "Attachment", "icon": "Attach", "styles": [ @@ -3443,6 +3451,7 @@ ] }, "relationshipfield": { + "skeleton": false, "name": "Relationship Picker", "icon": "TaskList", "styles": [ @@ -3506,6 +3515,7 @@ ] }, "jsonfield": { + "skeleton": false, "name": "JSON Field", "icon": "Brackets", "styles": [ @@ -3707,6 +3717,7 @@ } }, "table": { + "skeleton": false, "name": "Table", "icon": "Table", "illegalChildren": [ diff --git a/packages/client/src/components/BlockComponent.svelte b/packages/client/src/components/BlockComponent.svelte index 0131c5f0d4..c23a31b8b9 100644 --- a/packages/client/src/components/BlockComponent.svelte +++ b/packages/client/src/components/BlockComponent.svelte @@ -23,6 +23,7 @@ // to render this part of the block, taking advantage of binding enrichment $: id = `${block.id}-${context ?? rand}` $: instance = { + _blockElementHasChildren: $$slots?.default ?? false, _component: `@budibase/standard-components/${type}`, _id: id, _instanceName: type[0].toUpperCase() + type.slice(1), diff --git a/packages/client/src/components/Component.svelte b/packages/client/src/components/Component.svelte index b98548fc9c..c44225cd71 100644 --- a/packages/client/src/components/Component.svelte +++ b/packages/client/src/components/Component.svelte @@ -29,6 +29,7 @@ import Placeholder from "components/app/Placeholder.svelte" import ScreenPlaceholder from "components/app/ScreenPlaceholder.svelte" import ComponentPlaceholder from "components/app/ComponentPlaceholder.svelte" + import Skeleton from "components/app/Skeleton.svelte" export let instance = {} export let isLayout = false @@ -38,6 +39,7 @@ // Get parent contexts const context = getContext("context") + const loading = getContext("loading") const insideScreenslot = !!getContext("screenslot") // Create component context @@ -470,9 +472,21 @@ componentStore.actions.unregisterInstance(id) } }) + + $: showSkeleton = + $loading && + definition.name !== "Screenslot" && + children.length === 0 && + !instance._blockElementHasChildren && + definition.skeleton !== false -{#if constructor && initialSettings && (visible || inSelectedPath) && !builderHidden} +{#if showSkeleton} + +{:else if constructor && initialSettings && (visible || inSelectedPath) && !builderHidden}
+ import { writable } from "svelte/store" import { setContext, getContext, onMount } from "svelte" import Router, { querystring } from "svelte-spa-router" import { routeStore, stateStore } from "stores" @@ -9,6 +10,9 @@ const component = getContext("component") setContext("screenslot", true) + const loading = writable(false) + setContext("loading", loading) + // Only wrap this as an array to take advantage of svelte keying, // to ensure the svelte-spa-router is fully remounted when route config // changes diff --git a/packages/client/src/components/app/DataProvider.svelte b/packages/client/src/components/app/DataProvider.svelte index 8cd2f00eec..c28cdef24c 100644 --- a/packages/client/src/components/app/DataProvider.svelte +++ b/packages/client/src/components/app/DataProvider.svelte @@ -1,6 +1,7 @@ {#if $component.empty} - {:else if rows.length > 0} + {:else if !$loading && rows.length === 0} +
{noRowsMessage}
+ {:else} {#each rows as row, index} {/each} - {:else if loaded && noRowsMessage} -
{noRowsMessage}
{/if}
diff --git a/packages/client/src/components/app/Skeleton.svelte b/packages/client/src/components/app/Skeleton.svelte new file mode 100644 index 0000000000..5c247bf3e4 --- /dev/null +++ b/packages/client/src/components/app/Skeleton.svelte @@ -0,0 +1,31 @@ + + +
+ + + +
diff --git a/packages/client/src/components/app/forms/AttachmentField.svelte b/packages/client/src/components/app/forms/AttachmentField.svelte index 9887901d4c..da04c57e82 100644 --- a/packages/client/src/components/app/forms/AttachmentField.svelte +++ b/packages/client/src/components/app/forms/AttachmentField.svelte @@ -76,18 +76,26 @@ bind:fieldApi defaultValue={[]} > - {#if fieldState} - - {/if} +
+ {#if fieldState} + + {/if} +
+ + diff --git a/packages/client/src/components/app/forms/Field.svelte b/packages/client/src/components/app/forms/Field.svelte index d6dddbbe39..a14c6ac9c8 100644 --- a/packages/client/src/components/app/forms/Field.svelte +++ b/packages/client/src/components/app/forms/Field.svelte @@ -1,6 +1,7 @@ diff --git a/packages/server/src/api/controllers/datasource.ts b/packages/server/src/api/controllers/datasource.ts index 511eb8ab74..cb1eb9ccaf 100644 --- a/packages/server/src/api/controllers/datasource.ts +++ b/packages/server/src/api/controllers/datasource.ts @@ -152,7 +152,12 @@ export async function update(ctx: BBContext) { let datasource = await db.get(datasourceId) const auth = datasource.config.auth await invalidateVariables(datasource, ctx.request.body) - datasource = { ...datasource, ...ctx.request.body } + + const dataSourceBody = !datasource.plus + ? { name: ctx.request.body?.name } + : ctx.request.body + + datasource = { ...datasource, ...dataSourceBody } if (auth && !ctx.request.body.auth) { // don't strip auth config from DB datasource.config.auth = auth @@ -163,7 +168,7 @@ export async function update(ctx: BBContext) { datasource._rev = response.rev // Drain connection pools when configuration is changed - if (datasource.source) { + if (datasource.source && datasource.plus) { const source = await getIntegration(datasource.source) if (source && source.pool) { await source.pool.end() diff --git a/packages/server/src/db/defaultData/datasource_bb_default.js b/packages/server/src/db/defaultData/datasource_bb_default.js index f12ee2c97d..0716b4bddf 100644 --- a/packages/server/src/db/defaultData/datasource_bb_default.js +++ b/packages/server/src/db/defaultData/datasource_bb_default.js @@ -631,8 +631,14 @@ exports.buildDefaultDocs = () => { ) }) + const dataSource = { + ...this.DEFAULT_BB_DATASOURCE, + updatedAt: new Date().toISOString(), + createdAt: new Date().toISOString(), + } + return [ - this.DEFAULT_BB_DATASOURCE, + dataSource, inventoryData.table, employeeData.table, jobData.table, From b5b74b9cadd0c80f1e136e63724895b868fa1691 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 28 Nov 2022 17:54:04 +0000 Subject: [PATCH 260/396] General work after running some tests in CI - general refactoring as well. --- packages/backend-core/src/{ => auth}/auth.ts | 71 +++++++++---------- packages/backend-core/src/auth/index.ts | 1 + .../src/{db/constants.ts => constants/db.ts} | 0 packages/backend-core/src/constants/index.ts | 2 + .../src/{constants.ts => constants/misc.ts} | 0 packages/backend-core/src/context/Context.ts | 11 ++- .../backend-core/src/context/constants.ts | 7 -- .../backend-core/src/context/mainContext.ts | 37 ++++++++-- packages/backend-core/src/db/Replication.ts | 4 +- packages/backend-core/src/db/conversions.ts | 2 +- packages/backend-core/src/db/index.ts | 6 +- packages/backend-core/src/db/tenancy.ts | 22 ------ .../backend-core/src/db/tests/utils.spec.js | 4 +- packages/backend-core/src/db/utils.ts | 22 +++--- packages/backend-core/src/db/views.ts | 9 ++- packages/backend-core/src/environment.ts | 3 +- packages/backend-core/src/events/analytics.ts | 4 +- .../backend-core/src/featureFlags/index.ts | 2 +- packages/backend-core/src/index.ts | 10 ++- .../src/migrations/tests/index.spec.js | 2 +- packages/backend-core/src/plugin/index.ts | 8 +-- packages/backend-core/src/tenancy/index.ts | 11 +-- packages/backend-core/src/tenancy/tenancy.ts | 10 +-- packages/backend-core/src/tests/utils.spec.js | 3 +- packages/backend-core/src/utils/utils.ts | 11 +-- packages/server/src/app.ts | 20 +++--- packages/server/src/environment.ts | 3 +- packages/worker/src/api/index.ts | 2 +- packages/worker/src/environment.ts | 2 +- packages/worker/src/index.ts | 2 +- .../worker/src/tests/TestConfiguration.ts | 2 +- packages/worker/src/tests/controllers.js | 7 -- packages/worker/src/tests/controllers.ts | 5 ++ .../structures/{configs.js => configs.ts} | 10 +-- packages/worker/src/tests/structures/index.ts | 2 +- 35 files changed, 145 insertions(+), 172 deletions(-) rename packages/backend-core/src/{ => auth}/auth.ts (79%) create mode 100644 packages/backend-core/src/auth/index.ts rename packages/backend-core/src/{db/constants.ts => constants/db.ts} (100%) create mode 100644 packages/backend-core/src/constants/index.ts rename packages/backend-core/src/{constants.ts => constants/misc.ts} (100%) delete mode 100644 packages/backend-core/src/context/constants.ts delete mode 100644 packages/backend-core/src/db/tenancy.ts delete mode 100644 packages/worker/src/tests/controllers.js create mode 100644 packages/worker/src/tests/controllers.ts rename packages/worker/src/tests/structures/{configs.js => configs.ts} (88%) diff --git a/packages/backend-core/src/auth.ts b/packages/backend-core/src/auth/auth.ts similarity index 79% rename from packages/backend-core/src/auth.ts rename to packages/backend-core/src/auth/auth.ts index 91a4b750ad..75e425bd0f 100644 --- a/packages/backend-core/src/auth.ts +++ b/packages/backend-core/src/auth/auth.ts @@ -1,16 +1,14 @@ -const passport = require("koa-passport") +const _passport = require("koa-passport") const LocalStrategy = require("passport-local").Strategy const JwtStrategy = require("passport-jwt").Strategy -import { getGlobalDB } from "./tenancy" +import { getGlobalDB } from "../tenancy" const refresh = require("passport-oauth2-refresh") -import { Config } from "./constants" -import { getScopedConfig } from "./db" +import { Config } from "../constants" +import { getScopedConfig } from "../db" import { - jwt, + jwt as jwtPassport, local, authenticated, - google, - oidc, auditLog, tenancy, authError, @@ -21,22 +19,41 @@ import { builderOnly, builderOrAdmin, joiValidator, -} from "./middleware" -import { invalidateUser } from "./cache/user" + oidc, + google, +} from "../middleware" +import { invalidateUser } from "../cache/user" import { User } from "@budibase/types" -import { logAlert } from "./logging" +import { logAlert } from "../logging" +export { + auditLog, + authError, + internalApi, + ssoCallbackUrl, + adminOnly, + builderOnly, + builderOrAdmin, + joiValidator, + google, + oidc, +} from "../middleware" +export const buildAuthMiddleware = authenticated +export const buildTenancyMiddleware = tenancy +export const buildCsrfMiddleware = csrf +export const passport = _passport +export const jwt = require("jsonwebtoken") // Strategies -passport.use(new LocalStrategy(local.options, local.authenticate)) -if (jwt.options.secretOrKey) { - passport.use(new JwtStrategy(jwt.options, jwt.authenticate)) +_passport.use(new LocalStrategy(local.options, local.authenticate)) +if (jwtPassport.options.secretOrKey) { + _passport.use(new JwtStrategy(jwtPassport.options, jwtPassport.authenticate)) } else { logAlert("No JWT Secret supplied, cannot configure JWT strategy") } -passport.serializeUser((user: User, done: any) => done(null, user)) +_passport.serializeUser((user: User, done: any) => done(null, user)) -passport.deserializeUser(async (user: User, done: any) => { +_passport.deserializeUser(async (user: User, done: any) => { const db = getGlobalDB() try { @@ -115,7 +132,7 @@ async function refreshGoogleAccessToken( }) } -async function refreshOAuthToken( +export async function refreshOAuthToken( refreshToken: string, configType: string, configId: string @@ -152,7 +169,7 @@ async function refreshOAuthToken( return refreshResponse } -async function updateUserOAuth(userId: string, oAuthConfig: any) { +export async function updateUserOAuth(userId: string, oAuthConfig: any) { const details = { accessToken: oAuthConfig.accessToken, refreshToken: oAuthConfig.refreshToken, @@ -179,23 +196,3 @@ async function updateUserOAuth(userId: string, oAuthConfig: any) { console.error("Could not update OAuth details for current user", e) } } - -export = { - buildAuthMiddleware: authenticated, - passport, - google, - oidc, - jwt: require("jsonwebtoken"), - buildTenancyMiddleware: tenancy, - auditLog, - authError, - buildCsrfMiddleware: csrf, - internalApi, - refreshOAuthToken, - updateUserOAuth, - ssoCallbackUrl, - adminOnly, - builderOnly, - builderOrAdmin, - joiValidator, -} diff --git a/packages/backend-core/src/auth/index.ts b/packages/backend-core/src/auth/index.ts new file mode 100644 index 0000000000..306751af96 --- /dev/null +++ b/packages/backend-core/src/auth/index.ts @@ -0,0 +1 @@ +export * from "./auth" diff --git a/packages/backend-core/src/db/constants.ts b/packages/backend-core/src/constants/db.ts similarity index 100% rename from packages/backend-core/src/db/constants.ts rename to packages/backend-core/src/constants/db.ts diff --git a/packages/backend-core/src/constants/index.ts b/packages/backend-core/src/constants/index.ts new file mode 100644 index 0000000000..62d5e08e63 --- /dev/null +++ b/packages/backend-core/src/constants/index.ts @@ -0,0 +1,2 @@ +export * from "./db" +export * from "./misc" diff --git a/packages/backend-core/src/constants.ts b/packages/backend-core/src/constants/misc.ts similarity index 100% rename from packages/backend-core/src/constants.ts rename to packages/backend-core/src/constants/misc.ts diff --git a/packages/backend-core/src/context/Context.ts b/packages/backend-core/src/context/Context.ts index 6ffb57e44e..f0ccdb97a8 100644 --- a/packages/backend-core/src/context/Context.ts +++ b/packages/backend-core/src/context/Context.ts @@ -1,18 +1,17 @@ import { AsyncLocalStorage } from "async_hooks" -import { ContextMap } from "./constants" export default class Context { - static storage = new AsyncLocalStorage() + static storage = new AsyncLocalStorage>() - static run(context: ContextMap, func: any) { + static run(context: Record, func: any) { return Context.storage.run(context, () => func()) } - static get(): ContextMap { - return Context.storage.getStore() as ContextMap + static get(): Record { + return Context.storage.getStore() as Record } - static set(context: ContextMap) { + static set(context: Record) { Context.storage.enterWith(context) } } diff --git a/packages/backend-core/src/context/constants.ts b/packages/backend-core/src/context/constants.ts deleted file mode 100644 index 64fdb45dec..0000000000 --- a/packages/backend-core/src/context/constants.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { IdentityContext } from "@budibase/types" - -export type ContextMap = { - tenantId?: string - appId?: string - identity?: IdentityContext -} diff --git a/packages/backend-core/src/context/mainContext.ts b/packages/backend-core/src/context/mainContext.ts index 9fe8a016a6..d743d2f49b 100644 --- a/packages/backend-core/src/context/mainContext.ts +++ b/packages/backend-core/src/context/mainContext.ts @@ -2,20 +2,43 @@ // store an app ID to pretend there is a context import env from "../environment" import Context from "./Context" +import { getDevelopmentAppID, getProdAppID } from "../db/conversions" +import { getDB } from "../db/db" import { - baseGlobalDBName, DocumentType, - getDB, - getDevelopmentAppID, - getProdAppID, SEPARATOR, -} from "../db" -import { ContextMap } from "./constants" + StaticDatabases, + DEFAULT_TENANT_ID, +} from "../constants" import { Database, IdentityContext } from "@budibase/types" -import { DEFAULT_TENANT_ID } from "./index" + +export type ContextMap = { + tenantId?: string + appId?: string + identity?: IdentityContext +} let TEST_APP_ID: string | null = null +export function getGlobalDBName(tenantId?: string) { + // tenant ID can be set externally, for example user API where + // new tenants are being created, this may be the case + if (!tenantId) { + tenantId = getTenantId() + } + return baseGlobalDBName(tenantId) +} + +export function baseGlobalDBName(tenantId: string | undefined | null) { + let dbName + if (!tenantId || tenantId === DEFAULT_TENANT_ID) { + dbName = StaticDatabases.GLOBAL.name + } else { + dbName = `${tenantId}${SEPARATOR}${StaticDatabases.GLOBAL.name}` + } + return dbName +} + export function isMultiTenant() { return env.MULTI_TENANCY } diff --git a/packages/backend-core/src/db/Replication.ts b/packages/backend-core/src/db/Replication.ts index 12f6001a70..eb9d613a58 100644 --- a/packages/backend-core/src/db/Replication.ts +++ b/packages/backend-core/src/db/Replication.ts @@ -1,5 +1,5 @@ -import { getPouchDB, closePouchDB } from "./couch/pouchDB" -import { DocumentType } from "./constants" +import { getPouchDB, closePouchDB } from "./couch" +import { DocumentType } from "../constants" class Replication { source: any diff --git a/packages/backend-core/src/db/conversions.ts b/packages/backend-core/src/db/conversions.ts index 48eaf31844..381c5cb90f 100644 --- a/packages/backend-core/src/db/conversions.ts +++ b/packages/backend-core/src/db/conversions.ts @@ -1,4 +1,4 @@ -import { APP_DEV_PREFIX, APP_PREFIX } from "./constants" +import { APP_DEV_PREFIX, APP_PREFIX } from "../constants" import { App } from "@budibase/types" const NO_APP_ERROR = "No app provided" diff --git a/packages/backend-core/src/db/index.ts b/packages/backend-core/src/db/index.ts index 7269aa8f92..0d9f75fa18 100644 --- a/packages/backend-core/src/db/index.ts +++ b/packages/backend-core/src/db/index.ts @@ -2,6 +2,8 @@ export * from "./couch" export * from "./db" export * from "./utils" export * from "./views" -export * from "./constants" export * from "./conversions" -export * from "./tenancy" +export { default as Replication } from "./Replication" +// exports to support old export structure +export * from "../constants/db" +export { getGlobalDBName, baseGlobalDBName } from "../context" diff --git a/packages/backend-core/src/db/tenancy.ts b/packages/backend-core/src/db/tenancy.ts deleted file mode 100644 index d920f7cd41..0000000000 --- a/packages/backend-core/src/db/tenancy.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { DEFAULT_TENANT_ID } from "../constants" -import { StaticDatabases, SEPARATOR } from "./constants" -import { getTenantId } from "../context" - -export const getGlobalDBName = (tenantId?: string) => { - // tenant ID can be set externally, for example user API where - // new tenants are being created, this may be the case - if (!tenantId) { - tenantId = getTenantId() - } - return baseGlobalDBName(tenantId) -} - -export const baseGlobalDBName = (tenantId: string | undefined | null) => { - let dbName - if (!tenantId || tenantId === DEFAULT_TENANT_ID) { - dbName = StaticDatabases.GLOBAL.name - } else { - dbName = `${tenantId}${SEPARATOR}${StaticDatabases.GLOBAL.name}` - } - return dbName -} diff --git a/packages/backend-core/src/db/tests/utils.spec.js b/packages/backend-core/src/db/tests/utils.spec.js index 0d16e2dec2..f95889c1cc 100644 --- a/packages/backend-core/src/db/tests/utils.spec.js +++ b/packages/backend-core/src/db/tests/utils.spec.js @@ -1,10 +1,12 @@ require("../../../tests") const { - generateAppID, getDevelopmentAppID, getProdAppID, isDevAppID, isProdAppID, +} = require("../conversions") +const { + generateAppID, getPlatformUrl, getScopedConfig } = require("../utils") diff --git a/packages/backend-core/src/db/utils.ts b/packages/backend-core/src/db/utils.ts index cfab451de4..590c3eeef8 100644 --- a/packages/backend-core/src/db/utils.ts +++ b/packages/backend-core/src/db/utils.ts @@ -1,26 +1,20 @@ -import { newid } from "../utils/hashing" -import { DEFAULT_TENANT_ID, Config } from "../constants" +import { newid } from "../newid" import env from "../environment" import { + DEFAULT_TENANT_ID, SEPARATOR, DocumentType, UNICODE_MAX, ViewName, InternalTable, -} from "./constants" -import { getTenantId, getGlobalDB } from "../context" -import { getGlobalDBName } from "./tenancy" + APP_PREFIX, +} from "../constants" +import { getTenantId, getGlobalDB, getGlobalDBName } from "../context" import { doWithDB, allDbs, directCouchAllDbs } from "./db" import { getAppMetadata } from "../cache/appMetadata" import { isDevApp, isDevAppID, getProdAppID } from "./conversions" -import { APP_PREFIX } from "./constants" import * as events from "../events" -import { App, Database } from "@budibase/types" - -export * from "./constants" -export * from "./conversions" -export { default as Replication } from "./Replication" -export * from "./tenancy" +import { App, Database, ConfigType } from "@budibase/types" /** * Generates a new app ID. @@ -494,7 +488,7 @@ export const getScopedFullConfig = async function ( )[0] // custom logic for settings doc - if (type === Config.SETTINGS) { + if (type === ConfigType.SETTINGS) { if (scopedConfig && scopedConfig.doc) { // overrides affected by environment variables scopedConfig.doc.config.platformUrl = await getPlatformUrl({ @@ -533,7 +527,7 @@ export const getPlatformUrl = async (opts = { tenantAware: true }) => { // get the doc directly instead of with getScopedConfig to prevent loop let settings try { - settings = await db.get(generateConfigID({ type: Config.SETTINGS })) + settings = await db.get(generateConfigID({ type: ConfigType.SETTINGS })) } catch (e: any) { if (e.status !== 404) { throw e diff --git a/packages/backend-core/src/db/views.ts b/packages/backend-core/src/db/views.ts index c563d55be3..4a87be0a68 100644 --- a/packages/backend-core/src/db/views.ts +++ b/packages/backend-core/src/db/views.ts @@ -1,6 +1,11 @@ -import { DocumentType, ViewName, DeprecatedViews, SEPARATOR } from "./utils" +import { + DocumentType, + ViewName, + DeprecatedViews, + SEPARATOR, + StaticDatabases, +} from "../constants" import { getGlobalDB } from "../context" -import { StaticDatabases } from "./constants" import { doWithDB } from "./" import { Database, DatabaseQueryOpts } from "@budibase/types" diff --git a/packages/backend-core/src/environment.ts b/packages/backend-core/src/environment.ts index 5d010f1421..b35f3ecaa4 100644 --- a/packages/backend-core/src/environment.ts +++ b/packages/backend-core/src/environment.ts @@ -75,7 +75,8 @@ const environment = { process.env.DEPLOYMENT_ENVIRONMENT || "docker-compose", _set(key: any, value: any) { process.env[key] = value - module.exports[key] = value + // @ts-ignore + environment[key] = value }, } diff --git a/packages/backend-core/src/events/analytics.ts b/packages/backend-core/src/events/analytics.ts index 90cacc902b..f621a9c98b 100644 --- a/packages/backend-core/src/events/analytics.ts +++ b/packages/backend-core/src/events/analytics.ts @@ -1,8 +1,8 @@ import env from "../environment" -import tenancy from "../tenancy" +import * as tenancy from "../tenancy" import * as dbUtils from "../db/utils" import { Config } from "../constants" -import { withCache, TTL, CacheKey } from "../cache/generic" +import { withCache, TTL, CacheKey } from "../cache" export const enabled = async () => { // cloud - always use the environment variable diff --git a/packages/backend-core/src/featureFlags/index.ts b/packages/backend-core/src/featureFlags/index.ts index 0d59e5129e..71e226c976 100644 --- a/packages/backend-core/src/featureFlags/index.ts +++ b/packages/backend-core/src/featureFlags/index.ts @@ -1,5 +1,5 @@ import env from "../environment" -import tenancy from "../tenancy" +import * as tenancy from "../tenancy" /** * Read the TENANT_FEATURE_FLAGS env var and return an array of features flags for each tenant. diff --git a/packages/backend-core/src/index.ts b/packages/backend-core/src/index.ts index ace9bc5034..a4d4ad0a80 100644 --- a/packages/backend-core/src/index.ts +++ b/packages/backend-core/src/index.ts @@ -8,17 +8,16 @@ import * as permissions from "./security/permissions" import * as accounts from "./cloud/accounts" import * as installation from "./installation" import env from "./environment" -import tenancy from "./tenancy" +import * as tenancy from "./tenancy" import * as featureFlags from "./featureFlags" import * as sessions from "./security/sessions" import * as deprovisioning from "./context/deprovision" -import auth from "./auth" +import * as auth from "./auth" import * as constants from "./constants" -import * as dbConstants from "./db/constants" import * as logging from "./logging" import * as pino from "./pino" import * as middleware from "./middleware" -import plugins from "./plugin" +import * as plugins from "./plugin" import * as encryption from "./security/encryption" import * as queue from "./queue" import * as db from "./db" @@ -35,7 +34,7 @@ const init = (opts: any = {}) => { const core = { init, db, - ...dbConstants, + ...constants, redis, locks: redis.redlock, objectStore, @@ -44,7 +43,6 @@ const core = { cache, auth, constants, - ...constants, migrations, env, accounts, diff --git a/packages/backend-core/src/migrations/tests/index.spec.js b/packages/backend-core/src/migrations/tests/index.spec.js index 8fbc244cd6..b7d2e14ea5 100644 --- a/packages/backend-core/src/migrations/tests/index.spec.js +++ b/packages/backend-core/src/migrations/tests/index.spec.js @@ -3,7 +3,7 @@ const { runMigrations, getMigrationsDoc } = require("../index") const { getDB } = require("../../db") const { StaticDatabases, -} = require("../../db/utils") +} = require("../../constants") let db diff --git a/packages/backend-core/src/plugin/index.ts b/packages/backend-core/src/plugin/index.ts index a6d1853007..3eeaeaa90c 100644 --- a/packages/backend-core/src/plugin/index.ts +++ b/packages/backend-core/src/plugin/index.ts @@ -1,7 +1 @@ -import * as utils from "./utils" - -const pkg = { - ...utils, -} - -export = pkg +export * from "./utils" diff --git a/packages/backend-core/src/tenancy/index.ts b/packages/backend-core/src/tenancy/index.ts index e0006abab2..1618a136dd 100644 --- a/packages/backend-core/src/tenancy/index.ts +++ b/packages/backend-core/src/tenancy/index.ts @@ -1,9 +1,2 @@ -import * as context from "../context" -import * as tenancy from "./tenancy" - -const pkg = { - ...context, - ...tenancy, -} - -export = pkg +export * from "../context" +export * from "./tenancy" diff --git a/packages/backend-core/src/tenancy/tenancy.ts b/packages/backend-core/src/tenancy/tenancy.ts index cc1088ab08..e0e0703433 100644 --- a/packages/backend-core/src/tenancy/tenancy.ts +++ b/packages/backend-core/src/tenancy/tenancy.ts @@ -1,10 +1,4 @@ -import { - doWithDB, - queryPlatformView, - StaticDatabases, - getGlobalDBName, - ViewName, -} from "../db" +import { doWithDB, queryPlatformView, getGlobalDBName } from "../db" import { DEFAULT_TENANT_ID, getTenantId, @@ -18,7 +12,7 @@ import { TenantResolutionStrategy, GetTenantIdOptions, } from "@budibase/types" -import { Header } from "../constants" +import { Header, StaticDatabases, ViewName } from "../constants" const TENANT_DOC = StaticDatabases.PLATFORM_INFO.docs.tenants const PLATFORM_INFO_DB = StaticDatabases.PLATFORM_INFO.name diff --git a/packages/backend-core/src/tests/utils.spec.js b/packages/backend-core/src/tests/utils.spec.js index 76fc7b4481..fb3828921d 100644 --- a/packages/backend-core/src/tests/utils.spec.js +++ b/packages/backend-core/src/tests/utils.spec.js @@ -1,7 +1,8 @@ const { structures } = require("../../tests") const utils = require("../utils") const events = require("../events") -const { doInTenant, DEFAULT_TENANT_ID }= require("../context") +const { DEFAULT_TENANT_ID } = require("../constants") +const { doInTenant } = require("../context") describe("utils", () => { describe("platformLogout", () => { diff --git a/packages/backend-core/src/utils/utils.ts b/packages/backend-core/src/utils/utils.ts index d830164414..3e9fbb177a 100644 --- a/packages/backend-core/src/utils/utils.ts +++ b/packages/backend-core/src/utils/utils.ts @@ -1,17 +1,11 @@ -import { - DocumentType, - SEPARATOR, - ViewName, - getAllApps, - queryGlobalView, -} from "../db" +import { getAllApps, queryGlobalView } from "../db" import { options } from "../middleware/passport/jwt" import { Header, Cookie, MAX_VALID_DATE } from "../constants" import env from "../environment" import * as userCache from "../cache/user" import { getSessionsForUser, invalidateSessions } from "../security/sessions" import * as events from "../events" -import tenancy from "../tenancy" +import * as tenancy from "../tenancy" import { App, BBContext, @@ -19,6 +13,7 @@ import { TenantResolutionStrategy, } from "@budibase/types" import { SetOption } from "cookies" +import { DocumentType, SEPARATOR, ViewName } from "../constants" const jwt = require("jsonwebtoken") const APP_PREFIX = DocumentType.APP + SEPARATOR diff --git a/packages/server/src/app.ts b/packages/server/src/app.ts index 9010bf87f3..0fb78d7525 100644 --- a/packages/server/src/app.ts +++ b/packages/server/src/app.ts @@ -12,18 +12,18 @@ if (process.env.ELASTIC_APM_ENABLED) { import { ExtendableContext } from "koa" import * as db from "./db" db.init() -const Koa = require("koa") -const destroyable = require("server-destroy") -const koaBody = require("koa-body") -const http = require("http") -const api = require("./api") -const automations = require("./automations/index") -const Sentry = require("@sentry/node") -const { Thread } = require("./threads") +import Koa from "koa" +import koaBody from "koa-body" +import http from "http" +import * as api from "./api" +import * as automations from "./automations" +import { Thread } from "./threads" import * as redis from "./utilities/redis" import { events, logging } from "@budibase/backend-core" import { initialise as initialiseWebsockets } from "./websocket" import { startup } from "./startup" +const Sentry = require("@sentry/node") +const destroyable = require("server-destroy") const app = new Koa() @@ -34,6 +34,7 @@ app.use( formLimit: "10mb", jsonLimit: "10mb", textLimit: "10mb", + // @ts-ignore enableTypes: ["json", "form", "text"], parsedMethods: ["POST", "PUT", "PATCH", "DELETE"], }) @@ -76,12 +77,13 @@ server.on("close", async () => { } }) -module.exports = server.listen(env.PORT || 0, async () => { +export = server.listen(env.PORT || 0, async () => { await startup(app, server) }) const shutdown = () => { server.close() + // @ts-ignore server.destroy() } diff --git a/packages/server/src/environment.ts b/packages/server/src/environment.ts index d3b884c12c..bf5330f9b6 100644 --- a/packages/server/src/environment.ts +++ b/packages/server/src/environment.ts @@ -88,7 +88,8 @@ const environment = { CLIENT_ID: process.env.CLIENT_ID, _set(key: string, value: any) { process.env[key] = value - module.exports[key] = value + // @ts-ignore + environment[key] = value }, isTest, isJest, diff --git a/packages/worker/src/api/index.ts b/packages/worker/src/api/index.ts index 073235c3ba..e37c6c2d94 100644 --- a/packages/worker/src/api/index.ts +++ b/packages/worker/src/api/index.ts @@ -163,4 +163,4 @@ for (let route of routes) { router.use(route.allowedMethods()) } -export = router +export default router diff --git a/packages/worker/src/environment.ts b/packages/worker/src/environment.ts index 84f8ba0a4d..f4c339ad6d 100644 --- a/packages/worker/src/environment.ts +++ b/packages/worker/src/environment.ts @@ -68,7 +68,7 @@ const environment = { _set(key: any, value: any) { process.env[key] = value // @ts-ignore - env[key] = value + environment[key] = value }, isDev, isTest, diff --git a/packages/worker/src/index.ts b/packages/worker/src/index.ts index b1ebb72e20..b513b11279 100644 --- a/packages/worker/src/index.ts +++ b/packages/worker/src/index.ts @@ -19,7 +19,7 @@ db.init() import Koa from "koa" import koaBody from "koa-body" import http from "http" -import * as api from "./api" +import api from "./api" import * as redis from "./utilities/redis" import Sentry from "@sentry/node" const koaSession = require("koa-session") diff --git a/packages/worker/src/tests/TestConfiguration.ts b/packages/worker/src/tests/TestConfiguration.ts index 015ebb6258..871b7ec6a6 100644 --- a/packages/worker/src/tests/TestConfiguration.ts +++ b/packages/worker/src/tests/TestConfiguration.ts @@ -2,7 +2,7 @@ import "./mocks" import * as dbConfig from "../db" dbConfig.init() import env from "../environment" -import controllers from "./controllers" +import * as controllers from "./controllers" const supertest = require("supertest") import { Config } from "../constants" import { diff --git a/packages/worker/src/tests/controllers.js b/packages/worker/src/tests/controllers.js deleted file mode 100644 index 226355506f..0000000000 --- a/packages/worker/src/tests/controllers.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - email: require("../api/controllers/global/email"), - workspaces: require("../api/controllers/global/workspaces"), - config: require("../api/controllers/global/configs"), - templates: require("../api/controllers/global/templates"), - users: require("../api/controllers/global/users"), -} diff --git a/packages/worker/src/tests/controllers.ts b/packages/worker/src/tests/controllers.ts new file mode 100644 index 0000000000..bdcf11434b --- /dev/null +++ b/packages/worker/src/tests/controllers.ts @@ -0,0 +1,5 @@ +export * as email from "../api/controllers/global/email" +export * as workspaces from "../api/controllers/global/workspaces" +export * as config from "../api/controllers/global/configs" +export * as templates from "../api/controllers/global/templates" +export * as users from "../api/controllers/global/users" diff --git a/packages/worker/src/tests/structures/configs.js b/packages/worker/src/tests/structures/configs.ts similarity index 88% rename from packages/worker/src/tests/structures/configs.js rename to packages/worker/src/tests/structures/configs.ts index fbd82de0a7..a692e77987 100644 --- a/packages/worker/src/tests/structures/configs.js +++ b/packages/worker/src/tests/structures/configs.ts @@ -1,7 +1,7 @@ const { Config } = require("../../constants") const { utils } = require("@budibase/backend-core") -exports.oidc = conf => { +export function oidc(conf?: any) { return { type: Config.OIDC, config: { @@ -21,7 +21,7 @@ exports.oidc = conf => { } } -exports.google = conf => { +export function google(conf?: any) { return { type: Config.GOOGLE, config: { @@ -33,7 +33,7 @@ exports.google = conf => { } } -exports.smtp = conf => { +export function smtp(conf?: any) { return { type: Config.SMTP, config: { @@ -47,7 +47,7 @@ exports.smtp = conf => { } } -exports.smtpEthereal = () => { +export function smtpEthereal() { return { type: Config.SMTP, config: { @@ -63,7 +63,7 @@ exports.smtpEthereal = () => { } } -exports.settings = conf => { +export function settings(conf?: any) { return { type: Config.SETTINGS, config: { diff --git a/packages/worker/src/tests/structures/index.ts b/packages/worker/src/tests/structures/index.ts index 3a4c3324df..0ac32e77ee 100644 --- a/packages/worker/src/tests/structures/index.ts +++ b/packages/worker/src/tests/structures/index.ts @@ -1,5 +1,5 @@ import { structures } from "@budibase/backend-core/tests" -import configs from "./configs" +import * as configs from "./configs" import * as users from "./users" import * as groups from "./groups" import { v4 as uuid } from "uuid" From 482c130a2ee1b6f2fa4038044dc21dd622b833eb Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 28 Nov 2022 18:14:10 +0000 Subject: [PATCH 261/396] Some fixes after re-running server tests. --- packages/server/src/api/controllers/public/rows.ts | 2 +- packages/server/src/api/controllers/public/utils.ts | 4 ++-- packages/server/src/api/routes/public/index.ts | 9 +++------ packages/server/src/automations/steps/utils.ts | 2 +- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/packages/server/src/api/controllers/public/rows.ts b/packages/server/src/api/controllers/public/rows.ts index 67059ec2f5..df856f1fe0 100644 --- a/packages/server/src/api/controllers/public/rows.ts +++ b/packages/server/src/api/controllers/public/rows.ts @@ -1,6 +1,6 @@ import * as rowController from "../row" import { addRev } from "./utils" -import { Row } from "../../../definitions/common" +import { Row } from "@budibase/types" import { convertBookmark } from "../../../utilities" // makes sure that the user doesn't need to pass in the type, tableId or _id params for diff --git a/packages/server/src/api/controllers/public/utils.ts b/packages/server/src/api/controllers/public/utils.ts index 6909db9628..a51b6b5fff 100644 --- a/packages/server/src/api/controllers/public/utils.ts +++ b/packages/server/src/api/controllers/public/utils.ts @@ -1,4 +1,4 @@ -const { getAppDB } = require("@budibase/backend-core/context") +import { context } from "@budibase/backend-core" import { isExternalTable } from "../../../integrations/utils" import { APP_PREFIX, DocumentType } from "../../../db/utils" @@ -13,7 +13,7 @@ export async function addRev( if (body._id.startsWith(APP_PREFIX)) { id = DocumentType.APP_METADATA } - const db = getAppDB() + const db = context.getAppDB() const dbDoc = await db.get(id) body._rev = dbDoc._rev // update ID in case it is an app ID diff --git a/packages/server/src/api/routes/public/index.ts b/packages/server/src/api/routes/public/index.ts index 198ba2d2b2..79e7731752 100644 --- a/packages/server/src/api/routes/public/index.ts +++ b/packages/server/src/api/routes/public/index.ts @@ -12,11 +12,8 @@ import env from "../../../environment" // below imports don't have declaration files const Router = require("@koa/router") const { RateLimit, Stores } = require("koa2-ratelimit") -const { - PermissionLevel, - PermissionType, -} = require("@budibase/backend-core/permissions") -const { getRedisOptions } = require("@budibase/backend-core/redis").utils +import { redis, permissions } from "@budibase/backend-core" +const { PermissionType, PermissionLevel } = permissions const PREFIX = "/api/public/v1" // allow a lot more requests when in test @@ -31,7 +28,7 @@ function getApiLimitPerSecond(): number { let rateLimitStore: any = null if (!env.isTest()) { - const REDIS_OPTS = getRedisOptions() + const REDIS_OPTS = redis.utils.getRedisOptions() let options if (REDIS_OPTS.redisProtocolUrl) { // fully qualified redis URL diff --git a/packages/server/src/automations/steps/utils.ts b/packages/server/src/automations/steps/utils.ts index 02b0f4d34c..8b99044303 100644 --- a/packages/server/src/automations/steps/utils.ts +++ b/packages/server/src/automations/steps/utils.ts @@ -20,7 +20,7 @@ export async function getFetchResponse(fetched: any) { // throw added to them, so that controllers don't // throw a ctx.throw undefined when error occurs // opts can contain, body, params and version -export async function buildCtx( +export function buildCtx( appId: string, emitter?: EventEmitter | null, opts: any = {} From ab914bcca2781a8aa138d648a2054cd2724dfc5e Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 28 Nov 2022 19:12:23 +0000 Subject: [PATCH 262/396] Final fixes after re-running all test suites. --- packages/backend-core/src/environment.ts | 2 +- .../src/api/routes/tests/deployment.spec.ts | 2 +- .../server/src/api/routes/tests/table.spec.js | 3 +- .../tests/utilities/{index.js => index.ts} | 24 ++-- .../tests/utilities/{index.js => index.ts} | 33 ++--- ...tConfiguration.js => TestConfiguration.ts} | 119 +++++++++++------- packages/server/tsconfig.build.json | 1 - .../types/src/documents/app/automation.ts | 1 + 8 files changed, 108 insertions(+), 77 deletions(-) rename packages/server/src/api/routes/tests/utilities/{index.js => index.ts} (73%) rename packages/server/src/automations/tests/utilities/{index.js => index.ts} (50%) rename packages/server/src/tests/utilities/{TestConfiguration.js => TestConfiguration.ts} (84%) diff --git a/packages/backend-core/src/environment.ts b/packages/backend-core/src/environment.ts index b35f3ecaa4..51ab101b3c 100644 --- a/packages/backend-core/src/environment.ts +++ b/packages/backend-core/src/environment.ts @@ -85,7 +85,7 @@ for (let [key, value] of Object.entries(environment)) { // handle the edge case of "0" to disable an environment variable if (value === "0") { // @ts-ignore - env[key] = 0 + environment[key] = 0 } } diff --git a/packages/server/src/api/routes/tests/deployment.spec.ts b/packages/server/src/api/routes/tests/deployment.spec.ts index 0219e3f2b4..bd705f9f59 100644 --- a/packages/server/src/api/routes/tests/deployment.spec.ts +++ b/packages/server/src/api/routes/tests/deployment.spec.ts @@ -1,4 +1,4 @@ -import setup from "./utilities" +import * as setup from "./utilities" import { events } from "@budibase/backend-core" describe("/deployments", () => { diff --git a/packages/server/src/api/routes/tests/table.spec.js b/packages/server/src/api/routes/tests/table.spec.js index e42aaf07e4..4776878635 100644 --- a/packages/server/src/api/routes/tests/table.spec.js +++ b/packages/server/src/api/routes/tests/table.spec.js @@ -271,7 +271,7 @@ describe("/tables", () => { .expect(200) expect(res.body.message).toEqual(`Table ${testTable._id} deleted.`) expect(events.table.deleted).toBeCalledTimes(1) - expect(events.table.deleted).toBeCalledWith(testTable) + expect(events.table.deleted).toBeCalledWith({ ...testTable, tableId: testTable._id }) }) it("deletes linked references to the table after deletion", async () => { @@ -288,6 +288,7 @@ describe("/tables", () => { }, TestTable: { type: "link", + fieldName: "TestTable", tableId: testTable._id, constraints: { type: "array" diff --git a/packages/server/src/api/routes/tests/utilities/index.js b/packages/server/src/api/routes/tests/utilities/index.ts similarity index 73% rename from packages/server/src/api/routes/tests/utilities/index.js rename to packages/server/src/api/routes/tests/utilities/index.ts index b6dde0cb79..87a373a2c6 100644 --- a/packages/server/src/api/routes/tests/utilities/index.js +++ b/packages/server/src/api/routes/tests/utilities/index.ts @@ -1,6 +1,6 @@ -const TestConfig = require("../../../../tests/utilities/TestConfiguration") -const structures = require("../../../../tests/utilities/structures") -const env = require("../../../../environment") +import TestConfig from "../../../../tests/utilities/TestConfiguration" +import env from "../../../../environment" +export * as structures from "../../../../tests/utilities/structures" function user() { return { @@ -40,16 +40,18 @@ jest.mock("../../../../utilities/workerRequests", () => ({ removeAppFromUserRoles: jest.fn(), })) -exports.delay = ms => new Promise(resolve => setTimeout(resolve, ms)) +export function delay(ms: number) { + return new Promise(resolve => setTimeout(resolve, ms)) +} -let request, config +let request: any, config: any -exports.beforeAll = () => { +export function beforeAll() { config = new TestConfig() request = config.getRequest() } -exports.afterAll = () => { +export function afterAll() { if (config) { config.end() } @@ -59,21 +61,21 @@ exports.afterAll = () => { config = null } -exports.getRequest = () => { +export function getRequest() { if (!request) { exports.beforeAll() } return request } -exports.getConfig = () => { +export function getConfig() { if (!config) { exports.beforeAll() } return config } -exports.switchToSelfHosted = async func => { +export async function switchToSelfHosted(func: any) { // self hosted stops any attempts to Dynamo env._set("NODE_ENV", "production") env._set("SELF_HOSTED", true) @@ -90,5 +92,3 @@ exports.switchToSelfHosted = async func => { throw error } } - -exports.structures = structures diff --git a/packages/server/src/automations/tests/utilities/index.js b/packages/server/src/automations/tests/utilities/index.ts similarity index 50% rename from packages/server/src/automations/tests/utilities/index.js rename to packages/server/src/automations/tests/utilities/index.ts index 1e705182dc..a18e931bab 100644 --- a/packages/server/src/automations/tests/utilities/index.js +++ b/packages/server/src/automations/tests/utilities/index.ts @@ -1,23 +1,23 @@ -const TestConfig = require("../../../tests/utilities/TestConfiguration") -const { context } = require("@budibase/backend-core") -const actions = require("../../actions") -const emitter = require("../../../events/index") -const env = require("../../../environment") +import TestConfig from "../../../tests/utilities/TestConfiguration" +import { context } from "@budibase/backend-core" +import { ACTION_DEFINITIONS, getAction } from "../../actions" +import emitter from "../../../events/index" +import env from "../../../environment" -let config +let config: any -exports.getConfig = () => { +export function getConfig() { if (!config) { config = new TestConfig(false) } return config } -exports.afterAll = () => { +export function afterAll() { config.end() } -exports.runInProd = async fn => { +export async function runInProd(fn: any) { env._set("NODE_ENV", "production") let error try { @@ -31,15 +31,19 @@ exports.runInProd = async fn => { } } -exports.runStep = async function runStep(stepId, inputs) { +export async function runStep(stepId: string, inputs: any) { async function run() { - let step = await actions.getAction(stepId) + let step = await getAction(stepId) expect(step).toBeDefined() + if (!step) { + throw new Error("No step found") + } return step({ + context: {}, inputs, appId: config ? config.getAppId() : null, // don't really need an API key, mocked out usage quota, not being tested here - apiKey: exports.apiKey, + apiKey, emitter, }) } @@ -52,6 +56,5 @@ exports.runStep = async function runStep(stepId, inputs) { } } -exports.apiKey = "test" - -exports.actions = actions.ACTION_DEFINITIONS +export const apiKey = "test" +export const actions = ACTION_DEFINITIONS diff --git a/packages/server/src/tests/utilities/TestConfiguration.js b/packages/server/src/tests/utilities/TestConfiguration.ts similarity index 84% rename from packages/server/src/tests/utilities/TestConfiguration.js rename to packages/server/src/tests/utilities/TestConfiguration.ts index fd9635e9f1..bbd940150f 100644 --- a/packages/server/src/tests/utilities/TestConfiguration.js +++ b/packages/server/src/tests/utilities/TestConfiguration.ts @@ -1,6 +1,7 @@ -require("../../db").init() -const env = require("../../environment") -const { +import { init as dbInit } from "../../db" +dbInit() +import env from "../../environment" +import { basicTable, basicRow, basicRole, @@ -11,24 +12,24 @@ const { basicLayout, basicWebhook, TENANT_ID, -} = require("./structures") -const { +} from "./structures" +import { constants, tenancy, sessions, cache, context, - db: dbCore, + db as dbCore, encryption, auth, roles, -} = require("@budibase/backend-core") -const controllers = require("./controllers") +} from "@budibase/backend-core" +import * as controllers from "./controllers" +import { cleanup } from "../../utilities/fileSystem" +import newid from "../../db/newid" +import { generateUserMetadataID } from "../../db/utils" +import { startup } from "../../startup" const supertest = require("supertest") -const { cleanup } = require("../../utilities/fileSystem") -const newid = require("../../db/newid") -const { generateUserMetadataID } = require("../../db/utils") -const { startup } = require("../../startup") const GLOBAL_USER_ID = "us_uuid1" const EMAIL = "babs@babs.com" @@ -37,10 +38,26 @@ const LASTNAME = "Barbington" const CSRF_TOKEN = "e3727778-7af0-4226-b5eb-f43cbe60a306" class TestConfiguration { + server: any + request: any + started: boolean + appId: string | null + allApps: any[] + app: any + prodApp: any + prodAppId: any + user: any + globalUserId: any + userMetadataId: any + table: any + linkedTable: any + automation: any + datasource: any + constructor(openServer = true) { if (openServer) { // use a random port because it doesn't matter - env.PORT = 0 + env.PORT = "0" this.server = require("../../app") // we need the request for logging in, involves cookies, hard to fake this.request = supertest(this.server) @@ -81,7 +98,7 @@ class TestConfiguration { } } - async doInContext(appId, task) { + async doInContext(appId: string | null, task: any) { if (!appId) { appId = this.appId } @@ -125,9 +142,9 @@ class TestConfiguration { // UTILS - async _req(body, params, controlFunc) { + async _req(body: any, params: any, controlFunc: any) { // create a fake request ctx - const request = {} + const request: any = {} const appId = this.appId request.appId = appId // fake cookies, we don't need them @@ -156,8 +173,8 @@ class TestConfiguration { admin = false, email = EMAIL, roles, - } = {}) { - return tenancy.doWithGlobalDB(TENANT_ID, async db => { + }: any = {}) { + return tenancy.doWithGlobalDB(TENANT_ID, async (db: any) => { let existing try { existing = await db.get(id) @@ -221,7 +238,7 @@ class TestConfiguration { } } - async login({ roleId, userId, builder, prodApp = false } = {}) { + async login({ roleId, userId, builder, prodApp = false }: any = {}) { const appId = prodApp ? this.prodAppId : this.appId return context.doInAppContext(appId, async () => { userId = !userId ? `us_uuid1` : userId @@ -278,7 +295,7 @@ class TestConfiguration { } const authToken = auth.jwt.sign(authObj, env.JWT_SECRET) const appToken = auth.jwt.sign(app, env.JWT_SECRET) - const headers = { + const headers: any = { Accept: "application/json", Cookie: [ `${constants.Cookie.Auth}=${authToken}`, @@ -296,7 +313,7 @@ class TestConfiguration { publicHeaders({ prodApp = true } = {}) { const appId = prodApp ? this.prodAppId : this.appId - const headers = { + const headers: any = { Accept: "application/json", } if (appId) { @@ -317,7 +334,7 @@ class TestConfiguration { // API async generateApiKey(userId = GLOBAL_USER_ID) { - return tenancy.doWithGlobalDB(TENANT_ID, async db => { + return tenancy.doWithGlobalDB(TENANT_ID, async (db: any) => { const id = dbCore.generateDevInfoID(userId) let devInfo try { @@ -335,13 +352,15 @@ class TestConfiguration { // APP - async createApp(appName) { + async createApp(appName: string) { // create dev app // clear any old app this.appId = null + // @ts-ignore await context.updateAppId(null) this.app = await this._req({ name: appName }, null, controllers.app.create) this.appId = this.app.appId + // @ts-ignore await context.updateAppId(this.appId) // create production app @@ -355,6 +374,7 @@ class TestConfiguration { async deploy() { await this._req(null, null, controllers.deploy.deployApp) + // @ts-ignore const prodAppId = this.getAppId().replace("_dev", "") this.prodAppId = prodAppId @@ -366,29 +386,29 @@ class TestConfiguration { // TABLE - async updateTable(config = null) { + async updateTable(config?: any) { config = config || basicTable() this.table = await this._req(config, null, controllers.table.save) return this.table } - async createTable(config = null) { + async createTable(config?: any) { if (config != null && config._id) { delete config._id } return this.updateTable(config) } - async getTable(tableId = null) { + async getTable(tableId?: string) { tableId = tableId || this.table._id return this._req(null, { tableId }, controllers.table.find) } - async createLinkedTable(relationshipType = null, links = ["link"]) { + async createLinkedTable(relationshipType?: string, links: any = ["link"]) { if (!this.table) { throw "Must have created a table first." } - const tableConfig = basicTable() + const tableConfig: any = basicTable() tableConfig.primaryDisplay = "name" for (let link of links) { tableConfig.schema[link] = { @@ -407,7 +427,7 @@ class TestConfiguration { } async createAttachmentTable() { - const table = basicTable() + const table: any = basicTable() table.schema.attachment = { type: "attachment", } @@ -416,7 +436,7 @@ class TestConfiguration { // ROW - async createRow(config = null) { + async createRow(config: any = null) { if (!this.table) { throw "Test requires table to be configured." } @@ -425,11 +445,11 @@ class TestConfiguration { return this._req(config, { tableId }, controllers.row.save) } - async getRow(tableId, rowId) { + async getRow(tableId: string, rowId: string) { return this._req(null, { tableId, rowId }, controllers.row.find) } - async getRows(tableId) { + async getRows(tableId: string) { if (!tableId && this.table) { tableId = this.table._id } @@ -438,12 +458,12 @@ class TestConfiguration { // ROLE - async createRole(config = null) { + async createRole(config?: any) { config = config || basicRole() return this._req(config, null, controllers.role.save) } - async addPermission(roleId, resourceId, level = "read") { + async addPermission(roleId: string, resourceId: string, level = "read") { return this._req( null, { @@ -457,7 +477,7 @@ class TestConfiguration { // VIEW - async createView(config) { + async createView(config?: any) { if (!this.table) { throw "Test requires table to be configured." } @@ -470,7 +490,7 @@ class TestConfiguration { // AUTOMATION - async createAutomation(config) { + async createAutomation(config?: any) { config = config || basicAutomation() if (config._rev) { delete config._rev @@ -485,7 +505,7 @@ class TestConfiguration { return this._req(null, null, controllers.automation.fetch) } - async deleteAutomation(automation = null) { + async deleteAutomation(automation?: any) { automation = automation || this.automation if (!automation) { return @@ -497,7 +517,7 @@ class TestConfiguration { ) } - async createWebhook(config = null) { + async createWebhook(config?: any) { if (!this.automation) { throw "Must create an automation before creating webhook." } @@ -507,14 +527,14 @@ class TestConfiguration { // DATASOURCE - async createDatasource(config = null) { + async createDatasource(config?: any) { config = config || basicDatasource() const response = await this._req(config, null, controllers.datasource.save) this.datasource = response.datasource return this.datasource } - async updateDatasource(datasource) { + async updateDatasource(datasource: any) { const response = await this._req( datasource, { datasourceId: datasource._id }, @@ -524,7 +544,7 @@ class TestConfiguration { return this.datasource } - async restDatasource(cfg) { + async restDatasource(cfg?: any) { return this.createDatasource({ datasource: { ...basicDatasource().datasource, @@ -559,7 +579,14 @@ class TestConfiguration { // QUERY - async previewQuery(request, config, datasource, fields, params, verb) { + async previewQuery( + request: any, + config: any, + datasource: any, + fields: any, + params: any, + verb: string + ) { return request .post(`/api/queries/preview`) .send({ @@ -574,7 +601,7 @@ class TestConfiguration { .expect(200) } - async createQuery(config = null) { + async createQuery(config?: any) { if (!this.datasource && !config) { throw "No datasource created for query." } @@ -584,17 +611,17 @@ class TestConfiguration { // SCREEN - async createScreen(config = null) { + async createScreen(config?: any) { config = config || basicScreen() return this._req(config, null, controllers.screen.save) } // LAYOUT - async createLayout(config = null) { + async createLayout(config?: any) { config = config || basicLayout() return await this._req(config, null, controllers.layout.save) } } -module.exports = TestConfiguration +export = TestConfiguration diff --git a/packages/server/tsconfig.build.json b/packages/server/tsconfig.build.json index bbc0bfa0ee..2212a5e100 100644 --- a/packages/server/tsconfig.build.json +++ b/packages/server/tsconfig.build.json @@ -1,7 +1,6 @@ { "compilerOptions": { "target": "es6", - "allowJs": true, "module": "commonjs", "lib": ["es2020"], "strict": true, diff --git a/packages/types/src/documents/app/automation.ts b/packages/types/src/documents/app/automation.ts index f267aa339f..184fed629d 100644 --- a/packages/types/src/documents/app/automation.ts +++ b/packages/types/src/documents/app/automation.ts @@ -115,4 +115,5 @@ export type AutomationStepInput = { context: Record emitter: EventEmitter appId: string + apiKey?: string } From 618bba54c0986312fb6acdd8705baf7dec120d8f Mon Sep 17 00:00:00 2001 From: Michael Drury Date: Tue, 29 Nov 2022 11:16:37 +0000 Subject: [PATCH 263/396] Updating lock files. --- packages/builder/yarn.lock | 1016 ++---------------------------------- packages/server/yarn.lock | 98 +--- packages/worker/yarn.lock | 121 +---- 3 files changed, 66 insertions(+), 1169 deletions(-) diff --git a/packages/builder/yarn.lock b/packages/builder/yarn.lock index f1dd22207b..b68e166d9c 100644 --- a/packages/builder/yarn.lock +++ b/packages/builder/yarn.lock @@ -2,11 +2,6 @@ # yarn lockfile v1 -"@adobe/spectrum-css-workflow-icons@^1.2.1": - version "1.5.4" - resolved "https://registry.yarnpkg.com/@adobe/spectrum-css-workflow-icons/-/spectrum-css-workflow-icons-1.5.4.tgz#0e09ff519c36139176c3ba3ce617a995c9032f67" - integrity sha512-sZ19YOLGw5xTZzCEkVXPjf53lXVzo063KmDTJjpSjy/XLVsF+RaX0b436SfSM4hsIUZ7n27+UsbOvzFaFjcYXw== - "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.0.tgz#0dfc80309beec8411e65e706461c408b0bb9b431" @@ -920,136 +915,6 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/bbui@2.1.22-alpha.9": - version "2.1.22-alpha.9" - resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-2.1.22-alpha.9.tgz#829f60db76ba2ae3c40032885b4cf7cf70c22935" - integrity sha512-uLdLstalEWIe3gyRr1ngfqCTNGLQu6KFl9z9U1JDn4iNYYLP1gnyd0JFvX+E2L/v/fIuV8FiAPhlG10beszYmQ== - dependencies: - "@adobe/spectrum-css-workflow-icons" "^1.2.1" - "@budibase/string-templates" "2.1.22-alpha.9" - "@spectrum-css/actionbutton" "^1.0.1" - "@spectrum-css/actiongroup" "^1.0.1" - "@spectrum-css/avatar" "^3.0.2" - "@spectrum-css/button" "^3.0.1" - "@spectrum-css/buttongroup" "^3.0.2" - "@spectrum-css/checkbox" "^3.0.2" - "@spectrum-css/dialog" "^3.0.1" - "@spectrum-css/divider" "^1.0.3" - "@spectrum-css/dropzone" "^3.0.2" - "@spectrum-css/fieldgroup" "^3.0.2" - "@spectrum-css/fieldlabel" "^3.0.1" - "@spectrum-css/icon" "^3.0.1" - "@spectrum-css/illustratedmessage" "^3.0.2" - "@spectrum-css/inlinealert" "^2.0.1" - "@spectrum-css/inputgroup" "^3.0.2" - "@spectrum-css/label" "^2.0.10" - "@spectrum-css/link" "^3.1.1" - "@spectrum-css/menu" "^3.0.1" - "@spectrum-css/modal" "^3.0.1" - "@spectrum-css/pagination" "^3.0.3" - "@spectrum-css/picker" "^1.0.1" - "@spectrum-css/popover" "^3.0.1" - "@spectrum-css/progressbar" "^1.0.2" - "@spectrum-css/progresscircle" "^1.0.2" - "@spectrum-css/radio" "^3.0.2" - "@spectrum-css/search" "^3.0.2" - "@spectrum-css/sidenav" "^3.0.2" - "@spectrum-css/slider" "3.0.1" - "@spectrum-css/statuslight" "^3.0.2" - "@spectrum-css/stepper" "^3.0.3" - "@spectrum-css/switch" "^1.0.2" - "@spectrum-css/table" "^3.0.1" - "@spectrum-css/tabs" "^3.2.12" - "@spectrum-css/tags" "^3.0.2" - "@spectrum-css/textfield" "^3.0.1" - "@spectrum-css/toast" "^3.0.1" - "@spectrum-css/tooltip" "^3.0.3" - "@spectrum-css/treeview" "^3.0.2" - "@spectrum-css/typography" "^3.0.1" - "@spectrum-css/underlay" "^2.0.9" - "@spectrum-css/vars" "^3.0.1" - dayjs "^1.10.4" - easymde "^2.16.1" - svelte-flatpickr "^3.2.3" - svelte-portal "^1.0.0" - -"@budibase/client@2.1.22-alpha.9": - version "2.1.22-alpha.9" - resolved "https://registry.yarnpkg.com/@budibase/client/-/client-2.1.22-alpha.9.tgz#2dfb63eed66fdd132c90c045e70ed6fb86546790" - integrity sha512-vzIdF/4vKzJkF5pbMPnOBRIO0/W3sYv5dZv9lH0OSy8rKm7A9Gb59tz7xkJvmo7ro2tn9M7/Xsh5GuzTWuweaw== - dependencies: - "@budibase/bbui" "2.1.22-alpha.9" - "@budibase/frontend-core" "2.1.22-alpha.9" - "@budibase/string-templates" "2.1.22-alpha.9" - "@spectrum-css/button" "^3.0.3" - "@spectrum-css/card" "^3.0.3" - "@spectrum-css/divider" "^1.0.3" - "@spectrum-css/link" "^3.1.3" - "@spectrum-css/page" "^3.0.1" - "@spectrum-css/tag" "^3.1.4" - "@spectrum-css/typography" "^3.0.2" - "@spectrum-css/vars" "^3.0.1" - apexcharts "^3.22.1" - dayjs "^1.10.5" - downloadjs "1.4.7" - html5-qrcode "^2.2.1" - leaflet "^1.7.1" - regexparam "^1.3.0" - sanitize-html "^2.7.0" - screenfull "^6.0.1" - shortid "^2.2.15" - socket.io-client "^4.5.1" - svelte "^3.49.0" - svelte-apexcharts "^1.0.2" - svelte-flatpickr "^3.1.0" - svelte-spa-router "^3.0.5" - -"@budibase/frontend-core@2.1.22-alpha.9": - version "2.1.22-alpha.9" - resolved "https://registry.yarnpkg.com/@budibase/frontend-core/-/frontend-core-2.1.22-alpha.9.tgz#2d8e91c32032e2087172b764cde5553e04624f06" - integrity sha512-sPmD/Mogct7veqtJLLU15BbKpbx/9fsclweh1/LuMloZQiq45gB5oJMnSn5lQoqi5YG2S+BgvGZBAw/U3AyvDA== - dependencies: - "@budibase/bbui" "2.1.22-alpha.9" - lodash "^4.17.21" - svelte "^3.46.2" - -"@budibase/handlebars-helpers@^0.11.8": - version "0.11.8" - resolved "https://registry.yarnpkg.com/@budibase/handlebars-helpers/-/handlebars-helpers-0.11.8.tgz#6953d29673a8c5c407e096c0a84890465c7ce841" - integrity sha512-ggWJUt0GqsHFAEup5tlWlcrmYML57nKhpNGGLzVsqXVYN8eVmf3xluYmmMe7fDYhQH0leSprrdEXmsdFQF3HAQ== - dependencies: - array-sort "^1.0.0" - define-property "^2.0.2" - extend-shallow "^3.0.2" - for-in "^1.0.2" - get-object "^0.2.0" - get-value "^3.0.1" - handlebars "^4.7.7" - handlebars-utils "^1.0.6" - has-value "^2.0.2" - helper-md "^0.2.2" - html-tag "^2.0.0" - is-even "^1.0.0" - is-glob "^4.0.1" - kind-of "^6.0.3" - micromatch "^3.1.5" - relative "^3.0.2" - striptags "^3.1.1" - to-gfm-code-block "^0.1.1" - year "^0.2.1" - -"@budibase/string-templates@2.1.22-alpha.9": - version "2.1.22-alpha.9" - resolved "https://registry.yarnpkg.com/@budibase/string-templates/-/string-templates-2.1.22-alpha.9.tgz#9696839112333a5f1d08a2e3b1701c2830ee1d72" - integrity sha512-EcyAOLJk8kiaieLoMbh/EX7w4mbQzoW2QX34eyO7bUHDxZFTjUidGDufC+Qh6iazIYsU7k6YNV5HxtYDNhCzFw== - dependencies: - "@budibase/handlebars-helpers" "^0.11.8" - dayjs "^1.10.4" - handlebars "^4.7.6" - handlebars-utils "^1.0.6" - lodash "^4.17.20" - vm2 "^3.9.4" - "@cnakazawa/watch@^1.0.3": version "1.0.4" resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.4.tgz#f864ae85004d0fcab6f50be9141c4da368d1656a" @@ -1447,6 +1312,11 @@ resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.19.1.tgz#8762f668d3fc2416fbde31d15d13009544caeb54" integrity sha512-M5MhTLnjqYFwxMwcFPBpBgYQqI9hCvtVuj/A+NvcBHpe7VWOXdn/Sys+zD6C76DWGFYQdw3OWCsZimP24dL8mA== +"@sentry/types@^7.2.0": + version "7.21.1" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.21.1.tgz#408a7b95a66ddc30c4359979594e03bee8f9fbdc" + integrity sha512-3/IKnd52Ol21amQvI+kz+WB76s8/LR5YvFJzMgIoI2S8d82smIr253zGijRXxHPEif8kMLX4Yt+36VzrLxg6+A== + "@sentry/utils@5.19.1": version "5.19.1" resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.19.1.tgz#e1134db40e4bb9732251e515721cec7ee94d4d9c" @@ -1486,113 +1356,6 @@ dependencies: "@sinonjs/commons" "^1.7.0" -"@socket.io/component-emitter@~3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz#96116f2a912e0c02817345b3c10751069920d553" - integrity sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg== - -"@spectrum-css/actionbutton@^1.0.1": - version "1.1.14" - resolved "https://registry.yarnpkg.com/@spectrum-css/actionbutton/-/actionbutton-1.1.14.tgz#4e12eb7f482fb5944c3d97547591964baebeb1d4" - integrity sha512-ViBjdWi23J6vIR4t8JTRQ6jY/+KgpZgCALj3otgy495zMNG7jPeN7sKoy6i6JZJcdIRJA4MjOTVvcDOGkYWUZg== - -"@spectrum-css/actiongroup@^1.0.1": - version "1.0.26" - resolved "https://registry.yarnpkg.com/@spectrum-css/actiongroup/-/actiongroup-1.0.26.tgz#181ee059f28b1342389a128c39d20d2e10566aae" - integrity sha512-T1IK9a2Gxix9givm+chGvFtZh5oGBZQc/S2UA9F76JZKu45eCkLkvUH6F670XOrBhDGkVfzvN21QnFymSY43ow== - -"@spectrum-css/avatar@^3.0.2": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@spectrum-css/avatar/-/avatar-3.0.2.tgz#4f1826223eae330e64b6d3cc899e9bc2e98dac95" - integrity sha512-wEczvSqxttTWSiL3cOvXV/RmGRwSkw2w6+slcHhnf0kb7ovymMM+9oz8vvEpEsSeo5u598bc+7ktrKFpAd6soQ== - -"@spectrum-css/button@^3.0.1", "@spectrum-css/button@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@spectrum-css/button/-/button-3.0.3.tgz#2df1efaab6c7e0b3b06cb4b59e1eae59c7f1fc84" - integrity sha512-6CnLPqqtaU/PcSSIGeGRi0iFIIxIUByYLKFO6zn5NEUc12KQ28dJ4PLwB6WBa0L8vRoAGlnWWH2ZZweTijbXgg== - -"@spectrum-css/buttongroup@^3.0.2": - version "3.0.10" - resolved "https://registry.yarnpkg.com/@spectrum-css/buttongroup/-/buttongroup-3.0.10.tgz#897ea04b3ffea389fc7fe5bf67a6d1f3454b774d" - integrity sha512-U7D24vgHYhlqOyaLJZ5LPskDAuD7cGZktmWvXtvLqG6RFyTr7JHn5oPRuo6mLzaggIHqCdJylOjZ4FHqT4LpTQ== - -"@spectrum-css/card@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@spectrum-css/card/-/card-3.0.3.tgz#56b2e2da6b80c1583228baa279de7407383bfb6b" - integrity sha512-+oKLUI2a0QmQP9EzySeq/G4FpUkkdaDNbuEbqCj2IkPMc/2v/nwzsPhh1fj2UIghGAiiUwXfPpzax1e8fyhQUg== - -"@spectrum-css/checkbox@^3.0.2": - version "3.1.3" - resolved "https://registry.yarnpkg.com/@spectrum-css/checkbox/-/checkbox-3.1.3.tgz#584cdea28a4e7e203314bfeccf69d6d1ab3799af" - integrity sha512-c1l8jQCj/CniHNNvZR/wr/PM8C/EuwhFyWXwzfr2npkgnWqdbcooIa0QfDRYtVy9U5/N8MM2IDLiZ8kPf7LKqQ== - -"@spectrum-css/dialog@^3.0.1": - version "3.0.12" - resolved "https://registry.yarnpkg.com/@spectrum-css/dialog/-/dialog-3.0.12.tgz#fc97e002ca768a3d99dd10cb6a135c2b06052004" - integrity sha512-50rbFa+9eUKT+3uYBX7CkmI7SbQ0Z3CAFwjyjai+itYZ8kf/FcHVFwcLjgrry9scUnKhexMs94kkr0gfQpPe8Q== - -"@spectrum-css/divider@^1.0.3": - version "1.0.27" - resolved "https://registry.yarnpkg.com/@spectrum-css/divider/-/divider-1.0.27.tgz#435bf738a65b4eb15c899edf5c536bea22f2d679" - integrity sha512-hWKPHOEo9lkOGN5zecpVVwVxE3x0SJHQJKDNx1g0xs/P/AthAboK+L1c9Rq29czNfcQ2kUjumi4igzQzcqABMQ== - dependencies: - "@spectrum-css/vars" "^8.0.0" - -"@spectrum-css/dropzone@^3.0.2": - version "3.0.26" - resolved "https://registry.yarnpkg.com/@spectrum-css/dropzone/-/dropzone-3.0.26.tgz#d9da999f40643581518e2f56dcac5eb46e5269b2" - integrity sha512-YUHIqjJ3vqlF4wsyCC7VEHaV4KsbT35FnmyGvykJg5kcbXHHkVa2ioyRrknx4jwqhWWEX8e/SeKxS6k3jd4aFg== - -"@spectrum-css/fieldgroup@^3.0.2": - version "3.1.4" - resolved "https://registry.yarnpkg.com/@spectrum-css/fieldgroup/-/fieldgroup-3.1.4.tgz#aede57bda56c41310d262774a8805eefc89ddf74" - integrity sha512-ynqkD1OWicCEW7hgYQWzJUrUih+guJHjDtPbTKYhCbnxPqi6aifKmLstBehCgs4iG4+YfGDdZTppW64A3o5foQ== - -"@spectrum-css/fieldlabel@^3.0.1": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@spectrum-css/fieldlabel/-/fieldlabel-3.0.3.tgz#f73c04d20734d4718ffb620dc46458904685b449" - integrity sha512-nEvIkEXCD5n4fW67Unq6Iu7VXoauEd/JGpfTY02VsC5p4FJLnwKfPDbJUuUsqClAxqw7nAsmXVKtn4zQFf5yPQ== - -"@spectrum-css/icon@^3.0.1": - version "3.0.24" - resolved "https://registry.yarnpkg.com/@spectrum-css/icon/-/icon-3.0.24.tgz#a09a4720b1a54abc1dc22378187f8ba16f0f6404" - integrity sha512-P/HTD9Wgh1o+l0VQtk3XNn9v7dJVprpOSix1MiUKMktKDpIN9013KEOcR2z84/12Bs5atGCs/mvkSHgjKTdNAA== - -"@spectrum-css/illustratedmessage@^3.0.2": - version "3.0.17" - resolved "https://registry.yarnpkg.com/@spectrum-css/illustratedmessage/-/illustratedmessage-3.0.17.tgz#49cb2549fda97a6812156bfba6ccdd3a18bebd11" - integrity sha512-kpDqeq1U+rEjG1XuiXkbGvS71vn6mpFF/hiwCgFJWudVOfypDPQ4KLfYw1ditFSUzMCm5H6U/RqAShAJn8oMWA== - -"@spectrum-css/inlinealert@^2.0.1": - version "2.0.6" - resolved "https://registry.yarnpkg.com/@spectrum-css/inlinealert/-/inlinealert-2.0.6.tgz#4c5e923a1f56a96cc1adb30ef1f06ae04f2c6376" - integrity sha512-OpvvoWP02wWyCnF4IgG8SOPkXymovkC9cGtgMS1FdDubnG3tJZB/JeKTsRR9C9Vt3WBaOmISRdSKlZ4lC9CFzA== - -"@spectrum-css/inputgroup@^3.0.2": - version "3.0.8" - resolved "https://registry.yarnpkg.com/@spectrum-css/inputgroup/-/inputgroup-3.0.8.tgz#fc23afc8a73c24d17249c9d2337e8b42085b298b" - integrity sha512-cmQWzFp0GU+4IMc8SSeVFdmQDlRUdPelXaQdKUR9mZuO2iYettg37s0lfBCeJyYkUNTagz0zP8O7A0iXfmeE6g== - -"@spectrum-css/label@^2.0.10": - version "2.0.10" - resolved "https://registry.yarnpkg.com/@spectrum-css/label/-/label-2.0.10.tgz#2368651d7636a19385b5d300cdf6272db1916001" - integrity sha512-xCbtEiQkZIlLdWFikuw7ifDCC21DOC/KMgVrrVJHXFc4KRQe9LTZSqmGF3tovm+CSq1adE59mYoTbojVQ9YuEQ== - -"@spectrum-css/link@^3.1.1", "@spectrum-css/link@^3.1.3": - version "3.1.23" - resolved "https://registry.yarnpkg.com/@spectrum-css/link/-/link-3.1.23.tgz#9d9ff64c41366edbfdb19d04a5deec88bf2ea8fd" - integrity sha512-CAJQGnGTrTtR4tF1L94ou9Y+c4vnx9d5rWhb3AMzKb2Focqz02xSkTyaCCH7OM/3CwD8TCLOMANon8LcRpGAjA== - -"@spectrum-css/menu@^3.0.1": - version "3.0.21" - resolved "https://registry.yarnpkg.com/@spectrum-css/menu/-/menu-3.0.21.tgz#d1f7e6e69d30b5e1edd7ed2c86ea4e08dfd670ab" - integrity sha512-G5AIUO26O6IAc6HUGZu4AZgyw0QRyLfSbcKlFGu4oJHzP36cQc1S1uCh8Xp4g5d+n6mU62LxNDLSMpVbwnA00A== - -"@spectrum-css/modal@^3.0.1": - version "3.0.24" - resolved "https://registry.yarnpkg.com/@spectrum-css/modal/-/modal-3.0.24.tgz#e321bda4f0676379ff1e78b556ef6f306b3ded65" - integrity sha512-kld3B0PkFNSmcv9vvw6w3E8wwB5fq7S3mIrO3bSb39SmWwG3YIv9/tZPWy+OXUj8CihqsE2y+7fCMECJT3G4Cw== - "@spectrum-css/page@^3.0.1": version "3.0.8" resolved "https://registry.yarnpkg.com/@spectrum-css/page/-/page-3.0.8.tgz#001efa9e4c10095df9b2b37cf7d7d6eb60140190" @@ -1600,116 +1363,6 @@ dependencies: "@spectrum-css/vars" "^4.3.0" -"@spectrum-css/pagination@^3.0.3": - version "3.0.11" - resolved "https://registry.yarnpkg.com/@spectrum-css/pagination/-/pagination-3.0.11.tgz#68d9f34fe8eb36bf922e41b11f49eac62ac2fc41" - integrity sha512-wjZr7NAcqHK6fxNIGKTYEVtAOJugJTbcz4d8K7DZuUDgBVwLJJHJBi4uJ4KrIRYliMWOvqWTZzCJLmmTfx4cyw== - -"@spectrum-css/picker@^1.0.1": - version "1.2.13" - resolved "https://registry.yarnpkg.com/@spectrum-css/picker/-/picker-1.2.13.tgz#4a253bda84338187e47cc8b90e7e069e535369ce" - integrity sha512-07Ke3Qb/mwK3is3MZ+APcjuEYRdY1aEgI8GtnLijO8OC98ChrneAJAiLEZuj6NseCIrFEKsrLfqJF+kunxpeAA== - -"@spectrum-css/popover@^3.0.1": - version "3.0.11" - resolved "https://registry.yarnpkg.com/@spectrum-css/popover/-/popover-3.0.11.tgz#a7450c01bcf1609264b4a9df58821368b9e224d1" - integrity sha512-bzyNQJVw6Mn1EBelTaRlXCdd0ZfykNX9O6SHx3a+jXPYu8VBrRpHm0gsfWzPAz1etd1vj1CxwG/teQt4qvyZ/Q== - -"@spectrum-css/progressbar@^1.0.2": - version "1.0.33" - resolved "https://registry.yarnpkg.com/@spectrum-css/progressbar/-/progressbar-1.0.33.tgz#0fbf815355e3b352ab0965a0d1ff9424c145204e" - integrity sha512-DLNkEd9XsyxSYRyLsV2cy9clByDoHy+GpKGOu7q6STtYYl7Y2hjBvNk9DNaLc78PBCXDf4MJ/j59vl5VmfRctA== - -"@spectrum-css/progresscircle@^1.0.2": - version "1.0.23" - resolved "https://registry.yarnpkg.com/@spectrum-css/progresscircle/-/progresscircle-1.0.23.tgz#b8872716d2f54bf4bb20d571527f8ee4b04f5c10" - integrity sha512-J6IYhospCebEZ/+82vxBAckl5XATuNPQ5n0QSUFnRxql824x4B/mFhLt/PPLJtPBxEty6OA3GQ4evxAYutqEqQ== - -"@spectrum-css/radio@^3.0.2": - version "3.0.24" - resolved "https://registry.yarnpkg.com/@spectrum-css/radio/-/radio-3.0.24.tgz#7a08476edf42be2007b75f7765c18c26eb3a9880" - integrity sha512-C/saSKXb3dNCWprsP4iXkFFEmRrxwsdm2Al04myZ6pxOJ4tr1WjHAAtorwUgaUiyR87OnL1mGX2aWrFEN1mvtQ== - -"@spectrum-css/search@^3.0.2": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@spectrum-css/search/-/search-3.1.2.tgz#8d43f35f884f7c190e7694c8d26a3f2cfed01ef0" - integrity sha512-8cMK1QB07dbReZ/ECyTyoT2dELZ7hK1b3jEDiWSeLBbXcKirR1OI24sZEnewQY/XWFd/62Z1YdNaaA8S6UuXWQ== - -"@spectrum-css/sidenav@^3.0.2": - version "3.0.25" - resolved "https://registry.yarnpkg.com/@spectrum-css/sidenav/-/sidenav-3.0.25.tgz#b9c0c7056269340d876ff28a155ac722aed72aad" - integrity sha512-aEV07fBQebI1MqXSpJ+RQxz1zsRZa0KTfr7iYUxhTjEFc05kbG4F5eIMflySq+w370xBSwCv/SMYB4Ncm+AcgQ== - -"@spectrum-css/slider@3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@spectrum-css/slider/-/slider-3.0.1.tgz#5281e6f47eb5a4fd3d1816c138bf66d01d7f2e49" - integrity sha512-DI2dtMRnQuDM1miVzl3SGyR1khUEKnwdXfO5EHDFwkC3yav43F5QogkfjmjFmWWobMVovdJlAuiaaJ/IHejD0Q== - -"@spectrum-css/statuslight@^3.0.2": - version "3.0.8" - resolved "https://registry.yarnpkg.com/@spectrum-css/statuslight/-/statuslight-3.0.8.tgz#3b0ea80712573679870a85d469850230e794a0f7" - integrity sha512-zMTHs8lk+I7fLdi9waEEbsCmJ1FxeHcjQ0yltWxuRmGk2vl4MQdQIuHIMI63iblqEaiwnJRjXJoKnWlNvndTJQ== - -"@spectrum-css/stepper@^3.0.3": - version "3.0.28" - resolved "https://registry.yarnpkg.com/@spectrum-css/stepper/-/stepper-3.0.28.tgz#f46d6000f67abb46e4903bbf5712050f656dd3c0" - integrity sha512-gBegbFeWzUZouBsxVXkwKPefLsFjKAqt6aBAIDScQiaSgM0tYqENJoABVuodqBMIqUr/DmllNCbca/Ihqwmhjw== - -"@spectrum-css/switch@^1.0.2": - version "1.0.23" - resolved "https://registry.yarnpkg.com/@spectrum-css/switch/-/switch-1.0.23.tgz#c523c2f528ca16feca57f01b0e703e14f38c0919" - integrity sha512-6ym5p672xPCzfIBn8vtCtswGZ77cXb9BZEMSqwqu9O2MCi1QRPk3ot82SRXqjT2i5yeDgQR2dyBWrjzOh97mJg== - -"@spectrum-css/table@^3.0.1": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@spectrum-css/table/-/table-3.0.3.tgz#7f7f19905ef3275cbf907ce3a5818e63c30b2caf" - integrity sha512-nxwzVjLPsXoY/v4sdxOVYLcC+cEbGgJyLcLclT5LT9MGSbngFeUMJzzVR4EvehzuN4dH7hrATG7Mbuq29Mf0Hg== - -"@spectrum-css/tabs@^3.2.12": - version "3.2.21" - resolved "https://registry.yarnpkg.com/@spectrum-css/tabs/-/tabs-3.2.21.tgz#a8888b83d6b74ba05a00cacdb27a1e8bf4639071" - integrity sha512-25WGV1Sih7dW69/RvB1Ts6xVDJDhVEyYZzIGAll0PDST1GjBMHuGblqN/fZpDy/r/rop3GoHIsumtIMvOBdJKw== - -"@spectrum-css/tag@^3.1.4": - version "3.3.15" - resolved "https://registry.yarnpkg.com/@spectrum-css/tag/-/tag-3.3.15.tgz#971184fd8cb977b85a529f808313851863123278" - integrity sha512-pF6Wh61Z7hmAy20twIlpjdDuivYj6UPtWIzK7giyJKr/qcn20BjVN2ChIeFB1N+vBamJdLsuQOewv4AJ3+LZ2Q== - -"@spectrum-css/tags@^3.0.2": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@spectrum-css/tags/-/tags-3.0.3.tgz#fc76d2735cdc442de91b7eb3bee49a928c0767ac" - integrity sha512-SL8vPxVDfWcY5VdIuyl0TImEXcOU1I7yCyXkk7MudMwfnYs81FaIyY32hFV9OHj0Tz/36UzRzc7AVMSuRQ53pw== - -"@spectrum-css/textfield@^3.0.1": - version "3.2.6" - resolved "https://registry.yarnpkg.com/@spectrum-css/textfield/-/textfield-3.2.6.tgz#ad55cc6dd64f006fc659150298d3df463118fa24" - integrity sha512-yNTlrteDJcjKJRL7HV7vF2fZ9SLEDaRcLR6Zf2iwe0fdzzY0SXo9LGf0zoVRe47eW3UFrGC1cMyX27y2MMH1ag== - -"@spectrum-css/toast@^3.0.1": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@spectrum-css/toast/-/toast-3.0.3.tgz#97c1527384707600832ecda35643ed304615250f" - integrity sha512-CjLeaMs+cjUXojCCRtbj0YkD2BoZW16kjj2o5omkEpUTjA34IJ8xJ1a+CCtDILWekhXvN0MBN4sbumcnwcnx8w== - -"@spectrum-css/tooltip@^3.0.3": - version "3.1.20" - resolved "https://registry.yarnpkg.com/@spectrum-css/tooltip/-/tooltip-3.1.20.tgz#c3b6cf274be3ed552f86534f1fede7169827dc83" - integrity sha512-37knTGAjj4GE22M3MQrLa4PyecEc07xOZIle9igfRohXUwHv6ZIyoqy2/cQfmBkeGP6iGEzy8oKJp4nbBKZGsQ== - -"@spectrum-css/treeview@^3.0.2": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@spectrum-css/treeview/-/treeview-3.0.3.tgz#aeda5175158b9f8d7529cb2b394428eb2a428046" - integrity sha512-D5gGzZC/KtRArdx86Mesc9+99W9nTbUOeyYGqoJoAfJSOttoT6Tk5CrDvlCmAqjKf5rajemAkGri1ChqvUIwkw== - -"@spectrum-css/typography@^3.0.1", "@spectrum-css/typography@^3.0.2": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@spectrum-css/typography/-/typography-3.0.2.tgz#ea3ca0a60e18064527819d48c8c4364cab4fcd38" - integrity sha512-5ZOLmQe0edzsDMyhghUd4hBb5uxGsFrxzf+WasfcUw9klSfTsRZ09n1BsaaWbgrLjlMQ+EEHS46v5VNo0Ms2CA== - -"@spectrum-css/underlay@^2.0.9": - version "2.0.32" - resolved "https://registry.yarnpkg.com/@spectrum-css/underlay/-/underlay-2.0.32.tgz#6d3d5ae495d341755beeeccf5469483474f0f777" - integrity sha512-6rV9hHi20wCUig19tyByTkbX3ak3E1qEHOu+Gk0vRcEXRWy1yGoQ4+VTGBp5FRKfbvGfJ9Gu6hqZ6rGTwAVYPQ== - "@spectrum-css/vars@^3.0.1": version "3.0.2" resolved "https://registry.yarnpkg.com/@spectrum-css/vars/-/vars-3.0.2.tgz#ea9062c3c98dfc6ba59e5df14a03025ad8969999" @@ -1720,11 +1373,6 @@ resolved "https://registry.yarnpkg.com/@spectrum-css/vars/-/vars-4.3.0.tgz#03ddf67d3aa8a9a4cb0edbbd259465c9ced7e70d" integrity sha512-ZQ2XAhgu4G9yBeXQNDAz07Z8oZNnMt5o9vzf/mpBA7Teb/JI+8qXp2wt8D245SzmtNlFkG/bzRYvQc0scgZeCQ== -"@spectrum-css/vars@^8.0.0": - version "8.0.0" - resolved "https://registry.yarnpkg.com/@spectrum-css/vars/-/vars-8.0.0.tgz#b88a3b1165b63de50ab01f20ccafb42115d67443" - integrity sha512-cClQgNyH1VdNu6zdiZ5M7kbQDZS4/wPAclk5IPO5+nMhSzqTesUL/zfiaPB95MTCKFyVJrFpOeJ37HmUifWJ3A== - "@sveltejs/vite-plugin-svelte@1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-1.0.1.tgz#7f468f03c933fcdfc60d4773671c73f33b9ef4d6" @@ -1836,18 +1484,6 @@ dependencies: "@babel/types" "^7.3.0" -"@types/codemirror@^5.60.4": - version "5.60.5" - resolved "https://registry.yarnpkg.com/@types/codemirror/-/codemirror-5.60.5.tgz#5b989a3b4bbe657458cf372c92b6bfda6061a2b7" - integrity sha512-TiECZmm8St5YxjFUp64LK0c8WU5bxMDt9YaAek1UqUb9swrSCoJhh92fWu1p3mTEqlHjhB5sY7OFBhWroJXZVg== - dependencies: - "@types/tern" "*" - -"@types/estree@*": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" - integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== - "@types/estree@0.0.39": version "0.0.39" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" @@ -1902,11 +1538,6 @@ jest-diff "^27.0.0" pretty-format "^27.0.0" -"@types/marked@^4.0.7": - version "4.0.7" - resolved "https://registry.yarnpkg.com/@types/marked/-/marked-4.0.7.tgz#400a76809fd08c2bbd9e25f3be06ea38c8e0a1d3" - integrity sha512-eEAhnz21CwvKVW+YvRvcTuFKNU9CV1qH+opcgVK3pIMI6YZzDm6gc8o2vHjldFk6MGKt5pueSB7IOpvpx5Qekw== - "@types/minimatch@*": version "3.0.5" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" @@ -1952,13 +1583,6 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== -"@types/tern@*": - version "0.23.4" - resolved "https://registry.yarnpkg.com/@types/tern/-/tern-0.23.4.tgz#03926eb13dbeaf3ae0d390caf706b2643a0127fb" - integrity sha512-JAUw1iXGO1qaWwEOzxTKJZ/5JxVeON9kvGZ/osgZaJImBnyjyn0cjovPsf6FNLmyGY8Vw9DoXZCMlfMkMwHRWg== - dependencies: - "@types/estree" "*" - "@types/testing-library__jest-dom@^5.9.1": version "5.14.1" resolved "https://registry.yarnpkg.com/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.1.tgz#014162a5cee6571819d48e999980694e2f657c3c" @@ -2010,7 +1634,7 @@ acorn-walk@^7.1.1: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== -acorn-walk@^8.1.1, acorn-walk@^8.2.0: +acorn-walk@^8.1.1: version "8.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== @@ -2030,11 +1654,6 @@ acorn@^8.4.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.0.tgz#90951fde0f8f09df93549481e5fc141445b791cf" integrity sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ== -acorn@^8.7.0: - version "8.8.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.1.tgz#0a3f9cbecc4ec3bea6f0a80b66ae8dd2da250b73" - integrity sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA== - agent-base@6: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" @@ -2102,18 +1721,6 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" -apexcharts@^3.19.2, apexcharts@^3.22.1: - version "3.36.3" - resolved "https://registry.yarnpkg.com/apexcharts/-/apexcharts-3.36.3.tgz#debd58ded07163d51e00aeb15827d594e0cc8129" - integrity sha512-8/FXEs0ohXMff07Gv28XjhPwEJphIUdq2/wii/pcvi54Tw6z1mjrV8ydN8rlWi/ve8BAPBefJkLmRWv7UOBsLw== - dependencies: - svg.draggable.js "^2.2.2" - svg.easing.js "^2.0.0" - svg.filter.js "^2.0.2" - svg.pathmorphing.js "^0.1.3" - svg.resize.js "^1.4.3" - svg.select.js "^3.0.1" - arch@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/arch/-/arch-2.2.0.tgz#1bc47818f305764f23ab3306b0bfc086c5a29d11" @@ -2124,7 +1731,7 @@ arg@^4.1.0: resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== -argparse@^1.0.10, argparse@^1.0.7: +argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== @@ -2154,15 +1761,6 @@ arr-union@^3.1.0: resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= -array-sort@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-sort/-/array-sort-1.0.0.tgz#e4c05356453f56f53512a7d1d6123f2c54c0a88a" - integrity sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg== - dependencies: - default-compare "^1.0.0" - get-value "^2.0.6" - kind-of "^5.0.2" - array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" @@ -2215,13 +1813,6 @@ atob@^2.1.2: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -autolinker@~0.28.0: - version "0.28.1" - resolved "https://registry.yarnpkg.com/autolinker/-/autolinker-0.28.1.tgz#0652b491881879f0775dace0cdca3233942a4e47" - integrity sha512-zQAFO1Dlsn69eXaO6+7YZc+v84aquQKbwpzCE3L0stj56ERn9hutFxPopViLjo9G+rWwjozRhgS5KJ25Xy19cQ== - dependencies: - gulp-header "^1.7.1" - aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" @@ -2627,23 +2218,11 @@ co@^4.6.0: resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= -codemirror-spell-checker@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/codemirror-spell-checker/-/codemirror-spell-checker-1.1.2.tgz#1c660f9089483ccb5113b9ba9ca19c3f4993371e" - integrity sha512-2Tl6n0v+GJRsC9K3MLCdLaMOmvWL0uukajNJseorZJsslaxZyZMgENocPU8R0DyoTAiKsyqiemSOZo7kjGV0LQ== - dependencies: - typo-js "*" - codemirror@^5.59.0: version "5.63.3" resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.63.3.tgz#97042a242027fe0c87c09b36bc01931d37b76527" integrity sha512-1C+LELr+5grgJYqwZKqxrcbPsHFHapVaVAloBsFBASbpLnQqLw1U8yXJ3gT5D+rhxIiSpo+kTqN+hQ+9ialIXw== -codemirror@^5.63.1: - version "5.65.10" - resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.65.10.tgz#4276a93b8534ce91f14b733ba9a1ac949666eac9" - integrity sha512-IXAG5wlhbgcTJ6rZZcmi4+sjWIbJqIGfeg3tNa3yX84Jb3T4huS5qzQAo/cUisc1l3bI47WZodpyf7cYcocDKg== - collect-v8-coverage@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59" @@ -2728,13 +2307,6 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -concat-with-sourcemaps@*: - version "1.1.0" - resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz#d4ea93f05ae25790951b99e7b3b09e3908a4082e" - integrity sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg== - dependencies: - source-map "^0.6.1" - configent@^2.1.4: version "2.2.0" resolved "https://registry.yarnpkg.com/configent/-/configent-2.2.0.tgz#2de230fc43f22c47cfd99016aa6962d6f9546994" @@ -2772,11 +2344,6 @@ core-util-is@1.0.2: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= -core-util-is@~1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" - integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== - create-require@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" @@ -2923,11 +2490,6 @@ dayjs@^1.10.4: resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.10.7.tgz#2cf5f91add28116748440866a0a1d26f3a6ce468" integrity sha512-P6twpd70BcPK34K26uJ1KT3wlhpuOAPoMwJzpsIWUxHZ7wpmbdZL/hQqBDfz7hGurYSa5PhzdhDHtt319hL3ig== -dayjs@^1.10.5: - version "1.11.6" - resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.6.tgz#2e79a226314ec3ec904e3ee1dd5a4f5e5b1c7afb" - integrity sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ== - dayjs@^1.11.2: version "1.11.2" resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.2.tgz#fa0f5223ef0d6724b3d8327134890cfe3d72fbe5" @@ -2954,7 +2516,7 @@ debug@^3.1.0: dependencies: ms "^2.1.1" -debug@^4.3.4, debug@~4.3.1, debug@~4.3.2: +debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -2986,13 +2548,6 @@ deepmerge@^4.2.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== -default-compare@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/default-compare/-/default-compare-1.0.0.tgz#cb61131844ad84d84788fb68fd01681ca7781a2f" - integrity sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ== - dependencies: - kind-of "^5.0.2" - define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" @@ -3064,20 +2619,6 @@ dom-accessibility-api@^0.5.6: resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.5.10.tgz#caa6d08f60388d0bb4539dd75fe458a9a1d0014c" integrity sha512-Xu9mD0UjrJisTmv7lmVSDMagQcU9R5hwAbxsaAE/35XPnPLJobbuREfV/rraiSaEj/UOvgrzQs66zyTWTlyd+g== -dom-serializer@^1.0.1: - 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" - entities "^2.0.0" - -domelementtype@^2.0.1, domelementtype@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" - integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== - domexception@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/domexception/-/domexception-2.0.1.tgz#fb44aefba793e1574b0af6aed2801d057529f304" @@ -3085,22 +2626,6 @@ 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" - dotenv@^8.2.0: version "8.6.0" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b" @@ -3116,17 +2641,6 @@ duplexer@~0.1.1: resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== -easymde@^2.16.1: - version "2.18.0" - resolved "https://registry.yarnpkg.com/easymde/-/easymde-2.18.0.tgz#ff1397d07329b1a7b9187d2d0c20766fa16b3b1b" - integrity sha512-IxVVUxNWIoXLeqtBU4BLc+eS/ScYhT1Dcb6yF5Wchoj1iXAV+TIIDWx+NCaZhY7RcSHqDPKllbYq7nwGKILnoA== - dependencies: - "@types/codemirror" "^5.60.4" - "@types/marked" "^4.0.7" - codemirror "^5.63.1" - codemirror-spell-checker "1.1.2" - marked "^4.1.0" - ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" @@ -3157,22 +2671,6 @@ end-of-stream@^1.1.0: dependencies: once "^1.4.0" -engine.io-client@~6.2.3: - version "6.2.3" - resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-6.2.3.tgz#a8cbdab003162529db85e9de31575097f6d29458" - integrity sha512-aXPtgF1JS3RuuKcpSrBtimSjYvrbhKW9froICH4s0F3XQWLxsKNxqzG39nnvQZQnva4CMvUK63T7shevxRyYHw== - dependencies: - "@socket.io/component-emitter" "~3.1.0" - debug "~4.3.1" - engine.io-parser "~5.0.3" - ws "~8.2.3" - xmlhttprequest-ssl "~2.0.0" - -engine.io-parser@~5.0.3: - version "5.0.4" - resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.0.4.tgz#0b13f704fa9271b3ec4f33112410d8f3f41d0fc0" - integrity sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg== - enquirer@^2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" @@ -3180,16 +2678,6 @@ enquirer@^2.3.6: dependencies: ansi-colors "^4.1.1" -ent@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" - integrity sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA== - -entities@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" - integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== - error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -3344,11 +2832,6 @@ 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@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.0.0.tgz#5e32b12833e8aa8fa35e1bf0befa89380484c7dd" @@ -3596,6 +3079,11 @@ fd-slicer@~1.1.0: dependencies: pend "~1.2.0" +fflate@^0.4.1: + version "0.4.8" + resolved "https://registry.yarnpkg.com/fflate/-/fflate-0.4.8.tgz#f90b82aefbd8ac174213abb338bd7ef848f0f5ae" + integrity sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA== + figures@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" @@ -3628,11 +3116,6 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" -flatpickr@^4.5.2: - version "4.6.13" - resolved "https://registry.yarnpkg.com/flatpickr/-/flatpickr-4.6.13.tgz#8a029548187fd6e0d670908471e43abe9ad18d94" - integrity sha512-97PMG/aywoYpB4IvbvUJi0RQi8vearvU0oov1WW3k0WZPBMrTQVqekSX5CjSG/M4Q3i6A/0FKXC7RyAoAUUSPw== - fn-name@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/fn-name/-/fn-name-3.0.0.tgz#0596707f635929634d791f452309ab41558e3c5c" @@ -3683,11 +3166,6 @@ from@~0: resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" integrity sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4= -fs-exists-sync@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" - integrity sha512-cR/vflFyPZtrN6b38ZyWxpWdhlXrzZEBawlpBQMq7033xVY7/kg0GDMBK5jg8lDYQckdJ5x/YC88lM3C7VMsLg== - fs-extra@^10.0.0: version "10.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" @@ -3764,14 +3242,6 @@ get-intrinsic@^1.0.2: has "^1.0.3" has-symbols "^1.0.1" -get-object@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/get-object/-/get-object-0.2.0.tgz#d92ff7d5190c64530cda0543dac63a3d47fe8c0c" - integrity sha512-7P6y6k6EzEFmO/XyUyFlXm1YLJy9xeA1x/grNV8276abX5GuwUtYgKFkRFkLixw4hf4Pz9q2vgv/8Ar42R0HuQ== - dependencies: - is-number "^2.0.2" - isobject "^0.2.0" - get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" @@ -3801,13 +3271,6 @@ get-value@^2.0.3, get-value@^2.0.6: resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= -get-value@^3.0.0, get-value@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/get-value/-/get-value-3.0.1.tgz#5efd2a157f1d6a516d7524e124ac52d0a39ef5a8" - integrity sha512-mKZj9JLQrwMBtj5wxi6MH8Z5eSKaERpAwjg43dPtlGI1ZVEgH/qC7T8/6R2OBSUA+zzHBZgICsVJaEIV2tKTDA== - dependencies: - isobject "^3.0.1" - getos@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/getos/-/getos-3.2.1.tgz#0134d1f4e00eb46144c5a9c0ac4dc087cbb27dc5" @@ -3894,35 +3357,6 @@ growly@^1.3.0: resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= -gulp-header@^1.7.1: - version "1.8.12" - resolved "https://registry.yarnpkg.com/gulp-header/-/gulp-header-1.8.12.tgz#ad306be0066599127281c4f8786660e705080a84" - integrity sha512-lh9HLdb53sC7XIZOYzTXM4lFuXElv3EVkSDhsd7DoJBj7hm+Ni7D3qYbb+Rr8DuM8nRanBvkVO9d7askreXGnQ== - dependencies: - concat-with-sourcemaps "*" - lodash.template "^4.4.0" - through2 "^2.0.0" - -handlebars-utils@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/handlebars-utils/-/handlebars-utils-1.0.6.tgz#cb9db43362479054782d86ffe10f47abc76357f9" - integrity sha512-d5mmoQXdeEqSKMtQQZ9WkiUcO1E3tPbWxluCK9hVgIDPzQa9WsKo3Lbe/sGflTe7TomHEeZaOgwIkyIr1kfzkw== - dependencies: - kind-of "^6.0.0" - typeof-article "^0.1.1" - -handlebars@^4.7.6, handlebars@^4.7.7: - version "4.7.7" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" - integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== - dependencies: - minimist "^1.2.5" - neo-async "^2.6.0" - source-map "^0.6.1" - wordwrap "^1.0.0" - optionalDependencies: - uglify-js "^3.1.4" - harmony-reflect@^1.4.6: version "1.6.2" resolved "https://registry.yarnpkg.com/harmony-reflect/-/harmony-reflect-1.6.2.tgz#31ecbd32e648a34d030d86adb67d4d47547fe710" @@ -3961,14 +3395,6 @@ has-value@^1.0.0: has-values "^1.0.0" isobject "^3.0.0" -has-value@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-2.0.2.tgz#d0f12e8780ba8e90e66ad1a21c707fdb67c25658" - integrity sha512-ybKOlcRsK2MqrM3Hmz/lQxXHZ6ejzSPzpNabKB45jb5qDgJvKPa3SdapTsTLwEb9WltgWpOmNax7i+DzNOk4TA== - dependencies: - get-value "^3.0.0" - has-values "^2.0.1" - has-values@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" @@ -3982,13 +3408,6 @@ has-values@^1.0.0: is-number "^3.0.0" kind-of "^4.0.0" -has-values@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-2.0.1.tgz#3876200ff86d8a8546a9264a952c17d5fc17579d" - integrity sha512-+QdH3jOmq9P8GfdjFg0eJudqx1FqU62NQJ4P16rOEHeRdl7ckgwn6uqQjzYE0ZoHVV/e5E2esuJ5Gl5+HUW19w== - dependencies: - kind-of "^6.0.2" - has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" @@ -3996,16 +3415,6 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" -helper-md@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/helper-md/-/helper-md-0.2.2.tgz#c1f59d7e55bbae23362fd8a0e971607aec69d41f" - integrity sha512-49TaQzK+Ic7ZVTq4i1UZxRUJEmAilTk8hz7q4I0WNUaTclLR8ArJV5B3A1fe1xF2HtsDTr2gYKLaVTof/Lt84Q== - dependencies: - ent "^2.2.0" - extend-shallow "^2.0.1" - fs-exists-sync "^0.1.0" - remarkable "^1.6.2" - hosted-git-info@^2.1.4: version "2.8.9" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" @@ -4023,29 +3432,6 @@ html-escaper@^2.0.0: resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== -html-tag@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/html-tag/-/html-tag-2.0.0.tgz#36c3bc8d816fd30b570d5764a497a641640c2fed" - integrity sha512-XxzooSo6oBoxBEUazgjdXj7VwTn/iSTSZzTYKzYY6I916tkaYzypHxy+pbVU1h+0UQ9JlVf5XkNQyxOAiiQO1g== - dependencies: - is-self-closing "^1.0.1" - kind-of "^6.0.0" - -html5-qrcode@^2.2.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/html5-qrcode/-/html5-qrcode-2.3.1.tgz#81861de0feb006de5aa6a1dbe8d301b244a7bb6f" - integrity sha512-sSAgpmmUlssKm9az18I6d7fytH5jPq4xG7E4mCuhsGpMsDwk05AumKNsag5rfxwgMFPiUQg7CcRiOCXlgSJxmg== - -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-proxy-agent@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" @@ -4132,7 +3518,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.4, inherits@~2.0.3: +inherits@2, inherits@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -4231,13 +3617,6 @@ is-docker@^2.0.0: resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== -is-even@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-even/-/is-even-1.0.0.tgz#76b5055fbad8d294a86b6a949015e1c97b717c06" - integrity sha512-LEhnkAdJqic4Dbqn58A0y52IXoHWlsueqQkKfMfdEnIYG8A1sm/GHidKkS6yvXlMoRrkM34csHnXQtOqcb+Jzg== - dependencies: - is-odd "^0.1.2" - is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" @@ -4280,13 +3659,6 @@ is-installed-globally@~0.4.0: global-dirs "^3.0.0" is-path-inside "^3.0.2" -is-number@^2.0.2: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - integrity sha512-QUzH43Gfb9+5yckcrSA0VBDwEtDUchrk4F6tfJZQuNzDJbEDB9cZNzSfXGQ1jqmdDY/kl41lUOWM9syA8z8jlg== - dependencies: - kind-of "^3.0.2" - is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" @@ -4299,13 +3671,6 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -is-odd@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-0.1.2.tgz#bc573b5ce371ef2aad6e6f49799b72bef13978a7" - integrity sha512-Ri7C2K7o5IrUU9UEI8losXJCCD/UtsaIrkR5sxIcFg4xQ9cRJXlWA5DQvTE0yDc0krvSNLsRGXN11UPS6KyfBw== - dependencies: - is-number "^3.0.0" - is-path-inside@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" @@ -4323,23 +3688,11 @@ is-plain-object@^3.0.0: resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-3.0.1.tgz#662d92d24c0aa4302407b0d45d21f2251c85f85b" integrity sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g== -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" integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== -is-self-closing@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-self-closing/-/is-self-closing-1.0.1.tgz#5f406b527c7b12610176320338af0fa3896416e4" - integrity sha512-E+60FomW7Blv5GXTlYee2KDrnG6srxF7Xt1SjrhWUGUEsTFIqY/nq2y3DaftCsgUMdh89V07IVfhY9KIJhLezg== - dependencies: - self-closing-tags "^1.0.1" - is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" @@ -4372,7 +3725,7 @@ is-wsl@^2.2.0: dependencies: is-docker "^2.0.0" -isarray@1.0.0, isarray@~1.0.0: +isarray@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= @@ -4382,11 +3735,6 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= -isobject@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-0.2.0.tgz#a3432192f39b910b5f02cc989487836ec70aa85e" - integrity sha512-VaWq6XYAsbvM0wf4dyBO7WH9D7GosB7ZZlqrawI9BBiTMINBeCyqSKBa35m870MY3O4aM31pYyZi9DfGrYMJrQ== - isobject@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" @@ -4969,7 +4317,7 @@ jsprim@^2.0.2: json-schema "0.4.0" verror "1.10.0" -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.1.0, kind-of@^3.2.0: +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= @@ -4983,12 +4331,12 @@ kind-of@^4.0.0: dependencies: is-buffer "^1.1.5" -kind-of@^5.0.0, kind-of@^5.0.2: +kind-of@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== -kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3: +kind-of@^6.0.0, kind-of@^6.0.2: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== @@ -5008,11 +4356,6 @@ lazy-ass@1.6.0, lazy-ass@^1.6.0: resolved "https://registry.yarnpkg.com/lazy-ass/-/lazy-ass-1.6.0.tgz#7999655e8646c17f089fdd187d150d3324d54513" integrity sha1-eZllXoZGwX8In90YfRUNMyTVRRM= -leaflet@^1.7.1: - version "1.9.3" - resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.9.3.tgz#52ec436954964e2d3d39e0d433da4b2500d74414" - integrity sha512-iB2cR9vAkDOu5l3HAay2obcUHZ7xwUBBjph8+PGtmW/2lYhbLizWtG7nTeYht36WfOslixQF9D/uSIzhZgGMfQ== - leven@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" @@ -5057,11 +4400,6 @@ lodash-es@^4.17.11: resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee" integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw== -lodash._reinterpolate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" - integrity sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA== - lodash.debounce@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" @@ -5092,22 +4430,7 @@ lodash.once@^4.1.1: resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" integrity sha1-DdOXEhPHxW34gJd9UEyI+0cal6w= -lodash.template@^4.4.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" - integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== - dependencies: - lodash._reinterpolate "^3.0.0" - lodash.templatesettings "^4.0.0" - -lodash.templatesettings@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" - integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== - dependencies: - lodash._reinterpolate "^3.0.0" - -lodash@4.17.21, lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.7.0: +lodash@4.17.21, lodash@^4.17.15, lodash@^4.17.21, lodash@^4.7.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -5206,11 +4529,6 @@ map-visit@^1.0.0: dependencies: object-visit "^1.0.0" -marked@^4.1.0: - version "4.2.3" - resolved "https://registry.yarnpkg.com/marked/-/marked-4.2.3.tgz#bd76a5eb510ff1d8421bc6c3b2f0b93488c15bea" - integrity sha512-slWRdJkbTZ+PjkyJnE30Uid64eHwbwa1Q25INCAYfZlK4o6ylagBy/Le9eWntqJFoFT93ikUKMv47GZ4gTwHkw== - merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" @@ -5226,7 +4544,7 @@ methods@^1.1.2: resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= -micromatch@^3.1.4, micromatch@^3.1.5: +micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -5390,11 +4708,6 @@ ncp@^2.0.0: resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3" integrity sha1-GVoh1sRuNh0vsSgbo4uR6d9727M= -neo-async@^2.6.0: - version "2.6.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" - integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - nice-try@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" @@ -5605,11 +4918,6 @@ parse-json@^5.0.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" -parse-srcset@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/parse-srcset/-/parse-srcset-1.0.2.tgz#f2bd221f6cc970a938d88556abc589caaaa2bde1" - integrity sha512-/2qh0lav6CmI15FzA3i/2Bzk2zCgQhGMkvhOhKNcBVQ1ldgpbfiNTVslmooUmWJcADi1f1kIeynbDRVzNlfR6Q== - parse5@6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" @@ -5701,15 +5009,6 @@ 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.19" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.19.tgz#61178e2add236b17351897c8bcc0b4c8ecab56fc" - integrity sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA== - dependencies: - nanoid "^3.3.4" - picocolors "^1.0.0" - source-map-js "^1.0.2" - postcss@^8.4.16: version "8.4.16" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.16.tgz#33a1d675fac39941f5f445db0de4db2b6e01d43c" @@ -5719,10 +5018,14 @@ postcss@^8.4.16: picocolors "^1.0.0" source-map-js "^1.0.2" -posthog-js@1.4.5: - version "1.4.5" - resolved "https://registry.yarnpkg.com/posthog-js/-/posthog-js-1.4.5.tgz#b16235afe47938bd71eaed4ede3790c8b910ed71" - integrity sha512-Rzc5/DpuX55BqwNEbZB0tLav1gEinnr5H+82cbLiMtXLADlxmCwZiEaVXcC3XOqW0x8bcAEehicx1TbpfBamzA== +posthog-js@^1.36.0: + version "1.36.0" + resolved "https://registry.yarnpkg.com/posthog-js/-/posthog-js-1.36.0.tgz#cbefa031a1e7ee6ff25dae29b8aa77bd741adbba" + integrity sha512-LL9lbJxN46GbckRKSFZxX7fwNAvKUbi5nLFF0hMkmKY9o9zoz58oA0DJBZkqyEXK+15XzNoyLxF+wnxSPNwn3g== + dependencies: + "@sentry/types" "^7.2.0" + fflate "^0.4.1" + rrweb-snapshot "^1.1.14" prelude-ls@~1.1.2: version "1.1.2" @@ -5754,11 +5057,6 @@ pretty-format@^27.0.0, pretty-format@^27.3.1: ansi-styles "^5.0.0" react-is "^17.0.1" -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - prompts@^2.0.1: version "2.4.2" resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" @@ -5850,19 +5148,6 @@ read-pkg@^5.2.0: parse-json "^5.0.0" type-fest "^0.6.0" -readable-stream@~2.3.6: - version "2.3.7" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" - integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - redent@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f" @@ -5903,16 +5188,6 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexparam@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/regexparam/-/regexparam-2.0.1.tgz#c912f5dae371e3798100b3c9ce22b7414d0889fa" - integrity sha512-zRgSaYemnNYxUv+/5SeoHI0eJIgTL/A2pUtXUPLHQxUldagouJ9p+K6IbIZ/JiQuCEv2E2B1O11SjVQy3aMCkw== - -regexparam@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/regexparam/-/regexparam-1.3.0.tgz#2fe42c93e32a40eff6235d635e0ffa344b92965f" - integrity sha512-6IQpFBv6e5vz1QAqI+V4k8P2e/3gRrqfCJ9FI+O1FLQTO+Uz6RXZEZOPmTJ6hlGj7gkERzY5BRCv09whKP96/g== - regexpu-core@^4.7.1: version "4.8.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.8.0.tgz#e5605ba361b67b1718478501327502f4479a98f0" @@ -5937,21 +5212,6 @@ regjsparser@^0.7.0: dependencies: jsesc "~0.5.0" -relative@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/relative/-/relative-3.0.2.tgz#0dcd8ec54a5d35a3c15e104503d65375b5a5367f" - integrity sha512-Q5W2qeYtY9GbiR8z1yHNZ1DGhyjb4AnLEjt8iE6XfcC1QIu+FAtj3HQaO0wH28H1mX6cqNLvAqWhP402dxJGyA== - dependencies: - isobject "^2.0.0" - -remarkable@^1.6.2: - version "1.7.4" - resolved "https://registry.yarnpkg.com/remarkable/-/remarkable-1.7.4.tgz#19073cb960398c87a7d6546eaa5e50d2022fcd00" - integrity sha512-e6NKUXgX95whv7IgddywbeN/ItCkWbISmc2DiqHJb0wTrqZIexqdco5b8Z3XZoo/48IdNVKM9ZCvTPJ4F5uvhg== - dependencies: - argparse "^1.0.10" - autolinker "~0.28.0" - remixicon@2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/remixicon/-/remixicon-2.5.0.tgz#b5e245894a1550aa23793f95daceadbf96ad1a41" @@ -6085,6 +5345,11 @@ rollup@^2.44.0: optionalDependencies: fsevents "~2.3.2" +rrweb-snapshot@^1.1.14: + version "1.1.14" + resolved "https://registry.yarnpkg.com/rrweb-snapshot/-/rrweb-snapshot-1.1.14.tgz#9d4d9be54a28a893373428ee4393ec7e5bd83fcc" + integrity sha512-eP5pirNjP5+GewQfcOQY4uBiDnpqxNRc65yKPW0eSoU1XamDfc4M8oqpXGMyUyvLyxFDB0q0+DChuxxiU2FXBQ== + rsvp@^4.8.4: version "4.8.5" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" @@ -6116,7 +5381,7 @@ safe-buffer@^5.0.1, safe-buffer@^5.1.2: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== @@ -6148,18 +5413,6 @@ sane@^4.0.3: minimist "^1.1.1" walker "~1.0.5" -sanitize-html@^2.7.0: - version "2.7.3" - resolved "https://registry.yarnpkg.com/sanitize-html/-/sanitize-html-2.7.3.tgz#166c868444ee4f9fd7352ac8c63fa86c343fc2bd" - integrity sha512-jMaHG29ak4miiJ8wgqA1849iInqORgNv7SLfSw9LtfOhEUQ1C0YHKH73R+hgyufBW9ZFeJrb057k9hjlfBCVlw== - 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" - saxes@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d" @@ -6167,16 +5420,6 @@ saxes@^5.0.1: dependencies: xmlchars "^2.2.0" -screenfull@^6.0.1: - version "6.0.2" - resolved "https://registry.yarnpkg.com/screenfull/-/screenfull-6.0.2.tgz#3dbe4b8c4f8f49fb8e33caa8f69d0bca730ab238" - integrity sha512-AQdy8s4WhNvUZ6P8F6PB21tSPIYKniic+Ogx0AacBMjKP1GUHN2E9URxQHtCusiwxudnCKkdy4GrHXPPJSkCCw== - -self-closing-tags@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/self-closing-tags/-/self-closing-tags-1.0.1.tgz#6c5fa497994bb826b484216916371accee490a5d" - integrity sha512-7t6hNbYMxM+VHXTgJmxwgZgLGktuXtVVD5AivWzNTdJBM4DBjnDKDzkf2SrNjihaArpeJYNjxkELBu1evI4lQA== - "semver@2 || 3 || 4 || 5", semver@^5.5.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" @@ -6250,13 +5493,6 @@ shortid@2.2.15: dependencies: nanoid "^2.1.0" -shortid@^2.2.15: - version "2.2.16" - resolved "https://registry.yarnpkg.com/shortid/-/shortid-2.2.16.tgz#b742b8f0cb96406fd391c76bfc18a67a57fe5608" - integrity sha512-Ugt+GIZqvGXCIItnsL+lvFJOiN7RYqlGy7QE41O3YC1xbNSeDGIRO7xg2JJXIAj1cAGnOeC1r7/T9pgrtQbv4g== - dependencies: - nanoid "^2.1.0" - signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.5" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.5.tgz#9e3e8cc0c75a99472b44321033a7702e7738252f" @@ -6320,24 +5556,6 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" -socket.io-client@^4.5.1: - version "4.5.3" - resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-4.5.3.tgz#bed69209d001465b2fea650d2e95c1e82768ab5e" - integrity sha512-I/hqDYpQ6JKwtJOf5ikM+Qz+YujZPMEl6qBLhxiP0nX+TfXKhW4KZZG8lamrD6Y5ngjmYHreESVasVCgi5Kl3A== - dependencies: - "@socket.io/component-emitter" "~3.1.0" - debug "~4.3.2" - engine.io-client "~6.2.3" - socket.io-parser "~4.2.0" - -socket.io-parser@~4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.1.tgz#01c96efa11ded938dcb21cbe590c26af5eff65e5" - integrity sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g== - dependencies: - "@socket.io/component-emitter" "~3.1.0" - debug "~4.3.1" - 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" @@ -6507,13 +5725,6 @@ string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" @@ -6548,11 +5759,6 @@ strip-indent@^3.0.0: dependencies: min-indent "^1.0.0" -striptags@^3.1.1: - version "3.2.0" - resolved "https://registry.yarnpkg.com/striptags/-/striptags-3.2.0.tgz#cc74a137db2de8b0b9a370006334161f7dd67052" - integrity sha512-g45ZOGzHDMe2bdYMdIvdAfCQkCTDMGBazSw1ypMowwGIee7ZQ5dU0rBJ8Jqgl+jAKIv4dbeE1jscZq9wid1Tkw== - supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -6587,25 +5793,11 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -svelte-apexcharts@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/svelte-apexcharts/-/svelte-apexcharts-1.0.2.tgz#4e000f8b8f7c901c05658c845457dfc8314d54c1" - integrity sha512-6qlx4rE+XsonZ0FZudfwqOQ34Pq+3wpxgAD75zgEmGoYhYBJcwmikTuTf3o8ZBsZue9U/pAwhNy3ed1Bkq1gmA== - dependencies: - apexcharts "^3.19.2" - svelte-dnd-action@^0.9.8: version "0.9.12" resolved "https://registry.yarnpkg.com/svelte-dnd-action/-/svelte-dnd-action-0.9.12.tgz#78cf33097986488c6d069eca517af473cd998730" integrity sha512-GlXIB3/56IMR5A0+qUx+FX7Q7n8uCAIeuYdgSBmn9iOlxWc+mgM8P1kNwAKCMSTdQ4IQETVQILNgWVY1KIFzsg== -svelte-flatpickr@^3.1.0, svelte-flatpickr@^3.2.3: - version "3.2.6" - resolved "https://registry.yarnpkg.com/svelte-flatpickr/-/svelte-flatpickr-3.2.6.tgz#595a97b2f25a669e61fe743f90a10dce783bbd49" - integrity sha512-0ePUyE9OjInYFqQwRKOxnFSu4dQX9+/rzFMynq2fKYXx406ZUThzSx72gebtjr0DoAQbsH2///BBZa5qk4qZXg== - dependencies: - flatpickr "^4.5.2" - svelte-hmr@^0.14.12: version "0.14.12" resolved "https://registry.yarnpkg.com/svelte-hmr/-/svelte-hmr-0.14.12.tgz#a127aec02f1896500b10148b2d4d21ddde39973f" @@ -6626,83 +5818,11 @@ svelte-portal@0.1.0: resolved "https://registry.yarnpkg.com/svelte-portal/-/svelte-portal-0.1.0.tgz#cc2821cc84b05ed5814e0218dcdfcbebc53c1742" integrity sha512-kef+ksXVKun224mRxat+DdO4C+cGHla+fEcZfnBAvoZocwiaceOfhf5azHYOPXSSB1igWVFTEOF3CDENPnuWxg== -svelte-portal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/svelte-portal/-/svelte-portal-1.0.0.tgz#36a47c5578b1a4d9b4dc60fa32a904640ec4cdd3" - integrity sha512-nHf+DS/jZ6jjnZSleBMSaZua9JlG5rZv9lOGKgJuaZStfevtjIlUJrkLc3vbV8QdBvPPVmvcjTlazAzfKu0v3Q== - -svelte-spa-router@^3.0.5: - version "3.3.0" - resolved "https://registry.yarnpkg.com/svelte-spa-router/-/svelte-spa-router-3.3.0.tgz#2fc0967a49dc361dfe4d38dddad6e662eed5b42c" - integrity sha512-cwRNe7cxD43sCvSfEeaKiNZg3FCizGxeMcf7CPiWRP3jKXjEma3vxyyuDtPOam6nWbVxl9TNM3hlE/i87ZlqcQ== - dependencies: - regexparam "2.0.1" - -svelte@^3.46.2, svelte@^3.49.0: - version "3.53.1" - resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.53.1.tgz#db9d7df7a8f570e8e22547444c149208b1914442" - integrity sha512-Q4/hHkktZogGhN5iqxqSi9sjEVoe/NbIxX4hXEHoasTxj+TxEQVAq66LnDMdAZxjmsodkoI5F3slqsS68U7FNw== - svelte@^3.48.0: version "3.49.0" resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.49.0.tgz#5baee3c672306de1070c3b7888fc2204e36a4029" integrity sha512-+lmjic1pApJWDfPCpUUTc1m8azDqYCG1JN9YEngrx/hUyIcFJo6VZhj0A1Ai0wqoHcEIuQy+e9tk+4uDgdtsFA== -svg.draggable.js@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/svg.draggable.js/-/svg.draggable.js-2.2.2.tgz#c514a2f1405efb6f0263e7958f5b68fce50603ba" - integrity sha512-JzNHBc2fLQMzYCZ90KZHN2ohXL0BQJGQimK1kGk6AvSeibuKcIdDX9Kr0dT9+UJ5O8nYA0RB839Lhvk4CY4MZw== - dependencies: - svg.js "^2.0.1" - -svg.easing.js@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/svg.easing.js/-/svg.easing.js-2.0.0.tgz#8aa9946b0a8e27857a5c40a10eba4091e5691f12" - integrity sha512-//ctPdJMGy22YoYGV+3HEfHbm6/69LJUTAqI2/5qBvaNHZ9uUFVC82B0Pl299HzgH13rKrBgi4+XyXXyVWWthA== - dependencies: - svg.js ">=2.3.x" - -svg.filter.js@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/svg.filter.js/-/svg.filter.js-2.0.2.tgz#91008e151389dd9230779fcbe6e2c9a362d1c203" - integrity sha512-xkGBwU+dKBzqg5PtilaTb0EYPqPfJ9Q6saVldX+5vCRy31P6TlRCP3U9NxH3HEufkKkpNgdTLBJnmhDHeTqAkw== - dependencies: - svg.js "^2.2.5" - -svg.js@>=2.3.x, svg.js@^2.0.1, svg.js@^2.2.5, svg.js@^2.4.0, svg.js@^2.6.5: - version "2.7.1" - resolved "https://registry.yarnpkg.com/svg.js/-/svg.js-2.7.1.tgz#eb977ed4737001eab859949b4a398ee1bb79948d" - integrity sha512-ycbxpizEQktk3FYvn/8BH+6/EuWXg7ZpQREJvgacqn46gIddG24tNNe4Son6omdXCnSOaApnpZw6MPCBA1dODA== - -svg.pathmorphing.js@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/svg.pathmorphing.js/-/svg.pathmorphing.js-0.1.3.tgz#c25718a1cc7c36e852ecabc380e758ac09bb2b65" - integrity sha512-49HWI9X4XQR/JG1qXkSDV8xViuTLIWm/B/7YuQELV5KMOPtXjiwH4XPJvr/ghEDibmLQ9Oc22dpWpG0vUDDNww== - dependencies: - svg.js "^2.4.0" - -svg.resize.js@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/svg.resize.js/-/svg.resize.js-1.4.3.tgz#885abd248e0cd205b36b973c4b578b9a36f23332" - integrity sha512-9k5sXJuPKp+mVzXNvxz7U0uC9oVMQrrf7cFsETznzUDDm0x8+77dtZkWdMfRlmbkEEYvUn9btKuZ3n41oNA+uw== - dependencies: - svg.js "^2.6.5" - svg.select.js "^2.1.2" - -svg.select.js@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/svg.select.js/-/svg.select.js-2.1.2.tgz#e41ce13b1acff43a7441f9f8be87a2319c87be73" - integrity sha512-tH6ABEyJsAOVAhwcCjF8mw4crjXSI1aa7j2VQR8ZuJ37H2MBUbyeqYr5nEO7sSN3cy9AR9DUwNg0t/962HlDbQ== - dependencies: - svg.js "^2.2.5" - -svg.select.js@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/svg.select.js/-/svg.select.js-3.0.1.tgz#a4198e359f3825739226415f82176a90ea5cc917" - integrity sha512-h5IS/hKkuVCbKSieR9uQCj9w+zLHoPh+ce19bBYyqF53g6mnPB8sAtIbe1s9dh2S2fCmYX2xel1Ln3PJBbK4kw== - dependencies: - svg.js "^2.6.5" - symbol-tree@^3.2.4: version "3.2.4" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" @@ -6752,14 +5872,6 @@ throttleit@^1.0.0: resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" integrity sha1-nnhYNtr0Z0MUWlmEtiaNgoUorGw= -through2@^2.0.0: - version "2.0.5" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" - integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== - dependencies: - readable-stream "~2.3.6" - xtend "~4.0.1" - through@2, through@^2.3.8, through@~2.3, through@~2.3.1: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" @@ -6782,11 +5894,6 @@ to-fast-properties@^2.0.0: resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= -to-gfm-code-block@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/to-gfm-code-block/-/to-gfm-code-block-0.1.1.tgz#25d045a5fae553189e9637b590900da732d8aa82" - integrity sha512-LQRZWyn8d5amUKnfR9A9Uu7x9ss7Re8peuWR2gkh1E+ildOfv2aF26JpuDg8JtvCduu5+hOrMIH+XstZtnagqg== - to-object-path@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" @@ -6942,28 +6049,11 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typeof-article@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/typeof-article/-/typeof-article-0.1.1.tgz#9f07e733c3fbb646ffa9e61c08debacd460e06af" - integrity sha512-Vn42zdX3FhmUrzEmitX3iYyLb+Umwpmv8fkZRIknYh84lmdrwqZA5xYaoKiIj2Rc5i/5wcDrpUmZcbk1U51vTw== - dependencies: - kind-of "^3.1.0" - typescript@4.7.3: version "4.7.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.3.tgz#8364b502d5257b540f9de4c40be84c98e23a129d" integrity sha512-WOkT3XYvrpXx4vMMqlD+8R8R37fZkjyLGlxavMc4iB8lrl8L0DeTcHbYgw/v0N/z9wAFsgBhcsF0ruoySS22mA== -typo-js@*: - version "1.2.2" - resolved "https://registry.yarnpkg.com/typo-js/-/typo-js-1.2.2.tgz#340484d81fe518e77c81a5a770162b14492f183b" - integrity sha512-C7pYBQK17EjSg8tVNY91KHdUt5Nf6FMJ+c3js076quPmBML57PmNMzAcIq/2kf/hSYtFABNDIYNYlJRl5BJhGw== - -uglify-js@^3.1.4: - version "3.17.4" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" - integrity sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g== - unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" @@ -7037,11 +6127,6 @@ utf-8-validate@^5.0.2: dependencies: node-gyp-build "^4.3.0" -util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== - uuid@8.3.1: version "8.3.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.1.tgz#2ba2e6ca000da60fce5a196954ab241131e05a31" @@ -7100,14 +6185,6 @@ vite@^3.0.8: optionalDependencies: fsevents "~2.3.2" -vm2@^3.9.4: - version "3.9.11" - resolved "https://registry.yarnpkg.com/vm2/-/vm2-3.9.11.tgz#a880f510a606481719ec3f9803b940c5805a06fe" - integrity sha512-PFG8iJRSjvvBdisowQ7iVF580DXb1uCIiGaXgm7tynMR1uTBlv7UJlB1zdv5KJ+Tmq1f0Upnj3fayoEOPpCBKg== - dependencies: - acorn "^8.7.0" - acorn-walk "^8.2.0" - w3c-hr-time@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" @@ -7208,11 +6285,6 @@ word-wrap@~1.2.3: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== -wordwrap@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== - wrap-ansi@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" @@ -7251,11 +6323,6 @@ ws@^7.4.6: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.5.tgz#8b4bc4af518cfabd0473ae4f99144287b33eb881" integrity sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w== -ws@~8.2.3: - version "8.2.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.2.3.tgz#63a56456db1b04367d0b721a0b80cae6d8becbba" - integrity sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA== - xml-name-validator@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" @@ -7266,16 +6333,6 @@ xmlchars@^2.2.0: resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== -xmlhttprequest-ssl@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz#91360c86b914e67f44dce769180027c0da618c67" - integrity sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A== - -xtend@~4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" - integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== - y18n@^4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" @@ -7342,11 +6399,6 @@ yauzl@^2.10.0: buffer-crc32 "~0.2.3" fd-slicer "~1.1.0" -year@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/year/-/year-0.2.1.tgz#4083ae520a318b23ec86037f3000cb892bdf9bb0" - integrity sha512-9GnJUZ0QM4OgXuOzsKNzTJ5EOkums1Xc+3YQXp+Q+UxFjf7zLucp9dQ8QMIft0Szs1E1hUiXFim1OYfEKFq97w== - yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 4e68957ab2..2bd74dfc2c 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1273,12 +1273,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.32-alpha.11": - version "2.1.32-alpha.11" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.32-alpha.11.tgz#bbf49464c95d3bc10e58d478d53fb88012c7bc35" - integrity sha512-JPlJIDkN6Id2K++MysV0Wx05KS8qFmdyhE1OTt1e7EVYrYdCHubWPmJynEfd0ceMEkMTqdssN7nUuQfMXBP4dA== +"@budibase/backend-core@2.1.39": + version "2.1.39" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.39.tgz#0ada64b114d2b61e6a4a782227348e1bfd33ebc6" + integrity sha512-OW1SOS0jWHoHBVMZo3A36F5urgphduOXWqegtHRL3o3cFmf38l8XI6TtKDWrfSkJat0FKrzjJs1vAnIh9cQeMA== dependencies: - "@budibase/types" "2.1.32-alpha.11" + "@budibase/types" "^2.1.39" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1293,7 +1293,6 @@ koa-passport "4.1.4" lodash "4.17.21" lodash.isarguments "3.1.0" - nano "^10.1.0" node-fetch "2.6.7" passport-google-auth "1.0.2" passport-google-oauth "2.0.0" @@ -1361,13 +1360,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.1.32-alpha.11": - version "2.1.32-alpha.11" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.32-alpha.11.tgz#40e57623403133eeef1e3e1f5b6f9226dabd9b39" - integrity sha512-/XW5BDP7IueDSeAhDw6/Lp1kIQBxCTgjk9GLmpCuvSv4HEN1mu1bobebASaaqiZ7YVx8dPZXQV8bfzSKl6eHOg== +"@budibase/pro@2.1.39": + version "2.1.39" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.39.tgz#31d59a9e3bde75f9b83cff8db1b8fcb75c16fafe" + integrity sha512-GQ5Z0U03C9RifZhPQX9dc61yLM9YkRZOjl7mHXIrcm6ytUA3I/DMuGcN83hwlxlPOem9utofDmXfCE288nLDZg== dependencies: - "@budibase/backend-core" "2.1.32-alpha.11" - "@budibase/types" "2.1.32-alpha.11" + "@budibase/backend-core" "2.1.39" + "@budibase/types" "2.1.39" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -1391,10 +1390,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.1.32-alpha.11": - version "2.1.32-alpha.11" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.32-alpha.11.tgz#a69b002ab80fd7a97b1204b12ef867a16d48122a" - integrity sha512-lyN7EZQAe2I815z9IEQ1kZS1eDrWxsvyyGMM6tLucm/49d+FutqAqTuMvU0OatjEzaxBflEQLhv98EGX4vDVuw== +"@budibase/types@2.1.39", "@budibase/types@^2.1.39": + version "2.1.39" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.39.tgz#ffa88a87c18d565c02576c5b75cde29326a4263c" + integrity sha512-S5v3lQbUxyzGYWMo5P3V+e47O4CNyhih2uHr+YLvdMtaq8Pj7jNHrZU9pxEFF0ldZDAFC3Z5WZaUglNXfZyZCw== "@bull-board/api@3.7.0": version "3.7.0" @@ -3413,7 +3412,7 @@ "@types/cookiejar" "*" "@types/node" "*" -"@types/tough-cookie@*", "@types/tough-cookie@^4.0.2": +"@types/tough-cookie@*": version "4.0.2" resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.2.tgz#6286b4c7228d58ab7866d19716f3696e03a09397" integrity sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw== @@ -4298,15 +4297,6 @@ axios@^0.27.2: follow-redirects "^1.14.9" form-data "^4.0.0" -axios@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.1.3.tgz#8274250dada2edf53814ed7db644b9c2866c1e35" - integrity sha512-00tXVRwKx/FZr/IDVFt4C+f9FYairX517WoGCL6dpOntqLkZofjhu43F/Xl44UOpqa+9sLFDrG/XAnFsUYgkDA== - dependencies: - follow-redirects "^1.15.0" - form-data "^4.0.0" - proxy-from-env "^1.1.0" - babel-jest@27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.5.1.tgz#a1bf8d61928edfefd21da27eb86a695bfd691444" @@ -7011,11 +7001,6 @@ follow-redirects@^1.14.0, follow-redirects@^1.14.4, follow-redirects@^1.14.8, fo resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.1.tgz#0ca6a452306c9b276e4d3127483e29575e207ad5" integrity sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA== -follow-redirects@^1.15.0: - version "1.15.2" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" - integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== - for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -7790,13 +7775,6 @@ http-cache-semantics@^4.0.0: resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== -http-cookie-agent@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/http-cookie-agent/-/http-cookie-agent-4.0.2.tgz#dcdaae18ed1f7452d81ae4d5cd80b227d6831b69" - integrity sha512-noTmxdH5CuytTnLj/Qv3Z84e/YFq8yLXAw3pqIYZ25Edhb9pQErIAC+ednw40Cic6Le/h9ryph5/TqsvkOaUCw== - dependencies: - agent-base "^6.0.2" - http-errors@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" @@ -10764,18 +10742,6 @@ nan@^2.12.1: resolved "https://registry.yarnpkg.com/nan/-/nan-2.16.0.tgz#664f43e45460fb98faf00edca0bb0d7b8dce7916" integrity sha512-UdAqHyFngu7TfQKsCBgAA6pWDkT8MAO7d0jyOecVhN5354xbLqdn8mV9Tat9gepAupm0bt2DbeaSC8vS52MuFA== -nano@^10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/nano/-/nano-10.1.0.tgz#afdd5a7440e62f09a8e23f41fcea328d27383922" - integrity sha512-COeN2TpLcHuSN44QLnPmfZCoCsKAg8/aelPOVqqm/2/MvRHDEA11/Kld5C4sLzDlWlhFZ3SO2WGJGevCsvcEzQ== - dependencies: - "@types/tough-cookie" "^4.0.2" - axios "^1.1.3" - http-cookie-agent "^4.0.2" - node-abort-controller "^3.0.1" - qs "^6.11.0" - tough-cookie "^4.1.2" - nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -10838,11 +10804,6 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -node-abort-controller@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/node-abort-controller/-/node-abort-controller-3.0.1.tgz#f91fa50b1dee3f909afabb7e261b1e1d6b0cb74e" - integrity sha512-/ujIVxthRs+7q6hsdjHMaj8hRG9NuWmwrz+JdRwZ14jdFoKSkm+vDsCbF9PLpnSqjaWQJuTmVtcWHNLr+vrOFw== - node-addon-api@^3.1.0: version "3.2.1" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" @@ -12203,11 +12164,6 @@ protobufjs@6.11.3, protobufjs@^6.11.2, protobufjs@^6.11.3, protobufjs@^6.8.6: "@types/node" ">=13.7.0" long "^4.0.0" -proxy-from-env@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" @@ -12270,13 +12226,6 @@ q@^1.1.2: resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw== -qs@^6.11.0: - version "6.11.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" - integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== - dependencies: - side-channel "^1.0.4" - qs@^6.4.0, qs@^6.5.1: version "6.10.5" resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.5.tgz#974715920a80ff6a262264acd2c7e6c2a53282b4" @@ -14260,16 +14209,6 @@ tough-cookie@^3.0.1: psl "^1.1.28" punycode "^2.1.1" -tough-cookie@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.2.tgz#e53e84b85f24e0b65dd526f46628db6c85f6b874" - integrity sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ== - dependencies: - psl "^1.1.33" - punycode "^2.1.1" - universalify "^0.2.0" - url-parse "^1.5.3" - tr46@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" @@ -14550,11 +14489,6 @@ universalify@^0.1.0, universalify@^0.1.2: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== -universalify@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" - integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== - universalify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index f670f90db6..b953c15e0e 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -470,12 +470,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.32-alpha.11": - version "2.1.32-alpha.11" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.32-alpha.11.tgz#bbf49464c95d3bc10e58d478d53fb88012c7bc35" - integrity sha512-JPlJIDkN6Id2K++MysV0Wx05KS8qFmdyhE1OTt1e7EVYrYdCHubWPmJynEfd0ceMEkMTqdssN7nUuQfMXBP4dA== +"@budibase/backend-core@2.1.39": + version "2.1.39" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.39.tgz#0ada64b114d2b61e6a4a782227348e1bfd33ebc6" + integrity sha512-OW1SOS0jWHoHBVMZo3A36F5urgphduOXWqegtHRL3o3cFmf38l8XI6TtKDWrfSkJat0FKrzjJs1vAnIh9cQeMA== dependencies: - "@budibase/types" "2.1.32-alpha.11" + "@budibase/types" "^2.1.39" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -490,7 +490,6 @@ koa-passport "4.1.4" lodash "4.17.21" lodash.isarguments "3.1.0" - nano "^10.1.0" node-fetch "2.6.7" passport-google-auth "1.0.2" passport-google-oauth "2.0.0" @@ -508,22 +507,22 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.1.32-alpha.11": - version "2.1.32-alpha.11" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.32-alpha.11.tgz#40e57623403133eeef1e3e1f5b6f9226dabd9b39" - integrity sha512-/XW5BDP7IueDSeAhDw6/Lp1kIQBxCTgjk9GLmpCuvSv4HEN1mu1bobebASaaqiZ7YVx8dPZXQV8bfzSKl6eHOg== +"@budibase/pro@2.1.39": + version "2.1.39" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.39.tgz#31d59a9e3bde75f9b83cff8db1b8fcb75c16fafe" + integrity sha512-GQ5Z0U03C9RifZhPQX9dc61yLM9YkRZOjl7mHXIrcm6ytUA3I/DMuGcN83hwlxlPOem9utofDmXfCE288nLDZg== dependencies: - "@budibase/backend-core" "2.1.32-alpha.11" - "@budibase/types" "2.1.32-alpha.11" + "@budibase/backend-core" "2.1.39" + "@budibase/types" "2.1.39" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.1.32-alpha.11": - version "2.1.32-alpha.11" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.32-alpha.11.tgz#a69b002ab80fd7a97b1204b12ef867a16d48122a" - integrity sha512-lyN7EZQAe2I815z9IEQ1kZS1eDrWxsvyyGMM6tLucm/49d+FutqAqTuMvU0OatjEzaxBflEQLhv98EGX4vDVuw== +"@budibase/types@2.1.39", "@budibase/types@^2.1.39": + version "2.1.39" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.39.tgz#ffa88a87c18d565c02576c5b75cde29326a4263c" + integrity sha512-S5v3lQbUxyzGYWMo5P3V+e47O4CNyhih2uHr+YLvdMtaq8Pj7jNHrZU9pxEFF0ldZDAFC3Z5WZaUglNXfZyZCw== "@cspotcode/source-map-support@^0.8.0": version "0.8.1" @@ -1541,11 +1540,6 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== -"@types/tough-cookie@^4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.2.tgz#6286b4c7228d58ab7866d19716f3696e03a09397" - integrity sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw== - "@types/uuid@8.3.4": version "8.3.4" resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.4.tgz#bd86a43617df0594787d38b735f55c805becf1bc" @@ -1693,7 +1687,7 @@ after-all-results@^2.0.0: resolved "https://registry.yarnpkg.com/after-all-results/-/after-all-results-2.0.0.tgz#6ac2fc202b500f88da8f4f5530cfa100f4c6a2d0" integrity sha512-2zHEyuhSJOuCrmas9YV0YL/MFCWLxe1dS6k/ENhgYrb/JqyMnadLN4iIAc9kkZrbElMDyyAGH/0J18OPErOWLg== -agent-base@6, agent-base@^6.0.2: +agent-base@6: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== @@ -1923,15 +1917,6 @@ axios@0.24.0: dependencies: follow-redirects "^1.14.4" -axios@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.1.3.tgz#8274250dada2edf53814ed7db644b9c2866c1e35" - integrity sha512-00tXVRwKx/FZr/IDVFt4C+f9FYairX517WoGCL6dpOntqLkZofjhu43F/Xl44UOpqa+9sLFDrG/XAnFsUYgkDA== - dependencies: - follow-redirects "^1.15.0" - form-data "^4.0.0" - proxy-from-env "^1.1.0" - babel-jest@^28.1.3: version "28.1.3" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-28.1.3.tgz#c1187258197c099072156a0a121c11ee1e3917d5" @@ -3437,11 +3422,6 @@ follow-redirects@^1.14.4: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.1.tgz#0ca6a452306c9b276e4d3127483e29575e207ad5" integrity sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA== -follow-redirects@^1.15.0: - version "1.15.2" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" - integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== - forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" @@ -3866,13 +3846,6 @@ http-cache-semantics@^4.0.0: resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== -http-cookie-agent@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/http-cookie-agent/-/http-cookie-agent-4.0.2.tgz#dcdaae18ed1f7452d81ae4d5cd80b227d6831b69" - integrity sha512-noTmxdH5CuytTnLj/Qv3Z84e/YFq8yLXAw3pqIYZ25Edhb9pQErIAC+ednw40Cic6Le/h9ryph5/TqsvkOaUCw== - dependencies: - agent-base "^6.0.2" - http-errors@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" @@ -5542,18 +5515,6 @@ mute-stream@0.0.8: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -nano@^10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/nano/-/nano-10.1.0.tgz#afdd5a7440e62f09a8e23f41fcea328d27383922" - integrity sha512-COeN2TpLcHuSN44QLnPmfZCoCsKAg8/aelPOVqqm/2/MvRHDEA11/Kld5C4sLzDlWlhFZ3SO2WGJGevCsvcEzQ== - dependencies: - "@types/tough-cookie" "^4.0.2" - axios "^1.1.3" - http-cookie-agent "^4.0.2" - node-abort-controller "^3.0.1" - qs "^6.11.0" - tough-cookie "^4.1.2" - napi-macros@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-2.0.0.tgz#2b6bae421e7b96eb687aa6c77a7858640670001b" @@ -5589,11 +5550,6 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -node-abort-controller@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/node-abort-controller/-/node-abort-controller-3.0.1.tgz#f91fa50b1dee3f909afabb7e261b1e1d6b0cb74e" - integrity sha512-/ujIVxthRs+7q6hsdjHMaj8hRG9NuWmwrz+JdRwZ14jdFoKSkm+vDsCbF9PLpnSqjaWQJuTmVtcWHNLr+vrOFw== - node-addon-api@^3.1.0: version "3.2.1" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" @@ -6430,11 +6386,6 @@ prompts@^2.0.1: kleur "^3.0.3" sisteransi "^1.0.5" -proxy-from-env@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" @@ -6502,13 +6453,6 @@ qs@^6.10.3, qs@^6.4.0: dependencies: side-channel "^1.0.4" -qs@^6.11.0: - version "6.11.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" - integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== - dependencies: - side-channel "^1.0.4" - qs@~6.5.2: version "6.5.3" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" @@ -6519,11 +6463,6 @@ querystring@0.2.0: resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" integrity sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g== -querystringify@^2.1.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" - integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== - queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" @@ -6745,11 +6684,6 @@ require-in-the-middle@^5.0.3: module-details-from-path "^1.0.3" resolve "^1.22.1" -requires-port@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== - resolve-alpn@^1.0.0: version "1.2.1" resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9" @@ -7505,16 +7439,6 @@ touch@^3.1.0: punycode "^2.1.1" universalify "^0.1.2" -tough-cookie@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.2.tgz#e53e84b85f24e0b65dd526f46628db6c85f6b874" - integrity sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ== - dependencies: - psl "^1.1.33" - punycode "^2.1.1" - universalify "^0.2.0" - url-parse "^1.5.3" - tough-cookie@~2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" @@ -7708,11 +7632,6 @@ universalify@^0.1.2: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== -universalify@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" - integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== - unpipe@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" @@ -7775,14 +7694,6 @@ url-parse-lax@^3.0.0: dependencies: prepend-http "^2.0.0" -url-parse@^1.5.3: - version "1.5.10" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" - integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== - dependencies: - querystringify "^2.1.1" - requires-port "^1.0.0" - url@0.10.3: version "0.10.3" resolved "https://registry.yarnpkg.com/url/-/url-0.10.3.tgz#021e4d9c7705f21bbf37d03ceb58767402774c64" From 659f974eba521f6341a6288317391269f03765ce Mon Sep 17 00:00:00 2001 From: Michael Drury Date: Tue, 29 Nov 2022 11:26:23 +0000 Subject: [PATCH 264/396] Updating typescript eslinter version to all match and resolve issue with our current Typescript version. --- package.json | 4 +- packages/server/package.json | 2 +- packages/server/yarn.lock | 79 ++++++++++++++++++++---------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 70 ++++++++++++++++---------------- 5 files changed, 82 insertions(+), 75 deletions(-) diff --git a/package.json b/package.json index af513fc8dd..6c147698ad 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "private": true, "devDependencies": { "@rollup/plugin-json": "^4.0.2", - "@typescript-eslint/parser": "4.28.0", + "@typescript-eslint/parser": "5.45.0", "babel-eslint": "^10.0.3", "eslint": "^7.28.0", "eslint-plugin-cypress": "^2.11.3", @@ -87,4 +87,4 @@ "install:pro": "bash scripts/pro/install.sh", "dep:clean": "yarn clean && yarn bootstrap" } -} \ No newline at end of file +} diff --git a/packages/server/package.json b/packages/server/package.json index 85799f329c..51c9dfdb30 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -137,7 +137,7 @@ "@types/oracledb": "5.2.2", "@types/pouchdb": "6.4.0", "@types/redis": "4.0.11", - "@typescript-eslint/parser": "5.12.0", + "@typescript-eslint/parser": "5.45.0", "apidoc": "0.50.4", "babel-jest": "27.5.1", "copyfiles": "2.4.1", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 2bd74dfc2c..8ff6af32aa 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -3470,49 +3470,49 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/parser@5.12.0": - version "5.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.12.0.tgz#0ca669861813df99ce54916f66f524c625ed2434" - integrity sha512-MfSwg9JMBojMUoGjUmX+D2stoQj1CBYTCP0qnnVtu9A+YQXVKNtLjasYh+jozOcrb/wau8TCfWOkQTiOAruBog== +"@typescript-eslint/parser@5.45.0": + version "5.45.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.45.0.tgz#b18a5f6b3cf1c2b3e399e9d2df4be40d6b0ddd0e" + integrity sha512-brvs/WSM4fKUmF5Ot/gEve6qYiCMjm6w4HkHPfS6ZNmxTS0m0iNN4yOChImaCkqc1hRwFGqUyanMXuGal6oyyQ== dependencies: - "@typescript-eslint/scope-manager" "5.12.0" - "@typescript-eslint/types" "5.12.0" - "@typescript-eslint/typescript-estree" "5.12.0" - debug "^4.3.2" + "@typescript-eslint/scope-manager" "5.45.0" + "@typescript-eslint/types" "5.45.0" + "@typescript-eslint/typescript-estree" "5.45.0" + debug "^4.3.4" -"@typescript-eslint/scope-manager@5.12.0": - version "5.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.12.0.tgz#59619e6e5e2b1ce6cb3948b56014d3a24da83f5e" - integrity sha512-GAMobtIJI8FGf1sLlUWNUm2IOkIjvn7laFWyRx7CLrv6nLBI7su+B7lbStqVlK5NdLvHRFiJo2HhiDF7Ki01WQ== +"@typescript-eslint/scope-manager@5.45.0": + version "5.45.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.45.0.tgz#7a4ac1bfa9544bff3f620ab85947945938319a96" + integrity sha512-noDMjr87Arp/PuVrtvN3dXiJstQR1+XlQ4R1EvzG+NMgXi8CuMCXpb8JqNtFHKceVSQ985BZhfRdowJzbv4yKw== dependencies: - "@typescript-eslint/types" "5.12.0" - "@typescript-eslint/visitor-keys" "5.12.0" + "@typescript-eslint/types" "5.45.0" + "@typescript-eslint/visitor-keys" "5.45.0" -"@typescript-eslint/types@5.12.0": - version "5.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.12.0.tgz#5b4030a28222ee01e851836562c07769eecda0b8" - integrity sha512-JowqbwPf93nvf8fZn5XrPGFBdIK8+yx5UEGs2QFAYFI8IWYfrzz+6zqlurGr2ctShMaJxqwsqmra3WXWjH1nRQ== +"@typescript-eslint/types@5.45.0": + version "5.45.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.45.0.tgz#794760b9037ee4154c09549ef5a96599621109c5" + integrity sha512-QQij+u/vgskA66azc9dCmx+rev79PzX8uDHpsqSjEFtfF2gBUTRCpvYMh2gw2ghkJabNkPlSUCimsyBEQZd1DA== -"@typescript-eslint/typescript-estree@5.12.0": - version "5.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.12.0.tgz#cabf545fd592722f0e2b4104711e63bf89525cd2" - integrity sha512-Dd9gVeOqt38QHR0BEA8oRaT65WYqPYbIc5tRFQPkfLquVEFPD1HAtbZT98TLBkEcCkvwDYOAvuSvAD9DnQhMfQ== +"@typescript-eslint/typescript-estree@5.45.0": + version "5.45.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.45.0.tgz#f70a0d646d7f38c0dfd6936a5e171a77f1e5291d" + integrity sha512-maRhLGSzqUpFcZgXxg1qc/+H0bT36lHK4APhp0AEUVrpSwXiRAomm/JGjSG+kNUio5kAa3uekCYu/47cnGn5EQ== dependencies: - "@typescript-eslint/types" "5.12.0" - "@typescript-eslint/visitor-keys" "5.12.0" - debug "^4.3.2" - globby "^11.0.4" + "@typescript-eslint/types" "5.45.0" + "@typescript-eslint/visitor-keys" "5.45.0" + debug "^4.3.4" + globby "^11.1.0" is-glob "^4.0.3" - semver "^7.3.5" + semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/visitor-keys@5.12.0": - version "5.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.12.0.tgz#1ac9352ed140b07ba144ebf371b743fdf537ec16" - integrity sha512-cFwTlgnMV6TgezQynx2c/4/tx9Tufbuo9LPzmWqyRC3QC4qTGkAG1C6pBr0/4I10PAI/FlYunI3vJjIcu+ZHMg== +"@typescript-eslint/visitor-keys@5.45.0": + version "5.45.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.45.0.tgz#e0d160e9e7fdb7f8da697a5b78e7a14a22a70528" + integrity sha512-jc6Eccbn2RtQPr1s7th6jJWQHBHI6GBVQkCHoJFQ5UreaKm59Vxw+ynQUPPY2u2Amquc+7tmEoC2G52ApsGNNg== dependencies: - "@typescript-eslint/types" "5.12.0" - eslint-visitor-keys "^3.0.0" + "@typescript-eslint/types" "5.45.0" + eslint-visitor-keys "^3.3.0" "@webassemblyjs/ast@1.11.1": version "1.11.1" @@ -5527,7 +5527,7 @@ dayjs@^1.10.4, dayjs@^1.10.5: resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.3.tgz#4754eb694a624057b9ad2224b67b15d552589258" integrity sha512-xxwlswWOlGhzgQ4TKzASQkUhqERI3egRNqgV4ScR8wlANA/A9tZ7miXa44vTTKEq5l7vWoL5G57bG3zA+Kow0A== -debug@4, debug@^4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@~4.3.1, debug@~4.3.2: +debug@4, debug@^4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -6401,7 +6401,7 @@ eslint-visitor-keys@^1.1.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== -eslint-visitor-keys@^3.0.0: +eslint-visitor-keys@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== @@ -7422,7 +7422,7 @@ globalyzer@0.1.0: resolved "https://registry.yarnpkg.com/globalyzer/-/globalyzer-0.1.0.tgz#cb76da79555669a1519d5a8edf093afaa0bf1465" integrity sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q== -globby@^11.0.4: +globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -12942,6 +12942,13 @@ semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@^7.3.7: + version "7.3.8" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" + integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== + dependencies: + lru-cache "^6.0.0" + seq-queue@^0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/seq-queue/-/seq-queue-0.0.5.tgz#d56812e1c017a6e4e7c3e3a37a1da6d78dd3c93e" diff --git a/packages/worker/package.json b/packages/worker/package.json index 4b2c0f2722..f5f5f12b18 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -78,7 +78,7 @@ "@types/node-fetch": "2.6.1", "@types/pouchdb": "6.4.0", "@types/uuid": "8.3.4", - "@typescript-eslint/parser": "5.12.0", + "@typescript-eslint/parser": "5.45.0", "copyfiles": "2.4.1", "eslint": "6.8.0", "jest": "28.1.1", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index b953c15e0e..35722d687e 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -1564,49 +1564,49 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/parser@5.12.0": - version "5.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.12.0.tgz#0ca669861813df99ce54916f66f524c625ed2434" - integrity sha512-MfSwg9JMBojMUoGjUmX+D2stoQj1CBYTCP0qnnVtu9A+YQXVKNtLjasYh+jozOcrb/wau8TCfWOkQTiOAruBog== +"@typescript-eslint/parser@5.45.0": + version "5.45.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.45.0.tgz#b18a5f6b3cf1c2b3e399e9d2df4be40d6b0ddd0e" + integrity sha512-brvs/WSM4fKUmF5Ot/gEve6qYiCMjm6w4HkHPfS6ZNmxTS0m0iNN4yOChImaCkqc1hRwFGqUyanMXuGal6oyyQ== dependencies: - "@typescript-eslint/scope-manager" "5.12.0" - "@typescript-eslint/types" "5.12.0" - "@typescript-eslint/typescript-estree" "5.12.0" - debug "^4.3.2" + "@typescript-eslint/scope-manager" "5.45.0" + "@typescript-eslint/types" "5.45.0" + "@typescript-eslint/typescript-estree" "5.45.0" + debug "^4.3.4" -"@typescript-eslint/scope-manager@5.12.0": - version "5.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.12.0.tgz#59619e6e5e2b1ce6cb3948b56014d3a24da83f5e" - integrity sha512-GAMobtIJI8FGf1sLlUWNUm2IOkIjvn7laFWyRx7CLrv6nLBI7su+B7lbStqVlK5NdLvHRFiJo2HhiDF7Ki01WQ== +"@typescript-eslint/scope-manager@5.45.0": + version "5.45.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.45.0.tgz#7a4ac1bfa9544bff3f620ab85947945938319a96" + integrity sha512-noDMjr87Arp/PuVrtvN3dXiJstQR1+XlQ4R1EvzG+NMgXi8CuMCXpb8JqNtFHKceVSQ985BZhfRdowJzbv4yKw== dependencies: - "@typescript-eslint/types" "5.12.0" - "@typescript-eslint/visitor-keys" "5.12.0" + "@typescript-eslint/types" "5.45.0" + "@typescript-eslint/visitor-keys" "5.45.0" -"@typescript-eslint/types@5.12.0": - version "5.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.12.0.tgz#5b4030a28222ee01e851836562c07769eecda0b8" - integrity sha512-JowqbwPf93nvf8fZn5XrPGFBdIK8+yx5UEGs2QFAYFI8IWYfrzz+6zqlurGr2ctShMaJxqwsqmra3WXWjH1nRQ== +"@typescript-eslint/types@5.45.0": + version "5.45.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.45.0.tgz#794760b9037ee4154c09549ef5a96599621109c5" + integrity sha512-QQij+u/vgskA66azc9dCmx+rev79PzX8uDHpsqSjEFtfF2gBUTRCpvYMh2gw2ghkJabNkPlSUCimsyBEQZd1DA== -"@typescript-eslint/typescript-estree@5.12.0": - version "5.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.12.0.tgz#cabf545fd592722f0e2b4104711e63bf89525cd2" - integrity sha512-Dd9gVeOqt38QHR0BEA8oRaT65WYqPYbIc5tRFQPkfLquVEFPD1HAtbZT98TLBkEcCkvwDYOAvuSvAD9DnQhMfQ== +"@typescript-eslint/typescript-estree@5.45.0": + version "5.45.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.45.0.tgz#f70a0d646d7f38c0dfd6936a5e171a77f1e5291d" + integrity sha512-maRhLGSzqUpFcZgXxg1qc/+H0bT36lHK4APhp0AEUVrpSwXiRAomm/JGjSG+kNUio5kAa3uekCYu/47cnGn5EQ== dependencies: - "@typescript-eslint/types" "5.12.0" - "@typescript-eslint/visitor-keys" "5.12.0" - debug "^4.3.2" - globby "^11.0.4" + "@typescript-eslint/types" "5.45.0" + "@typescript-eslint/visitor-keys" "5.45.0" + debug "^4.3.4" + globby "^11.1.0" is-glob "^4.0.3" - semver "^7.3.5" + semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/visitor-keys@5.12.0": - version "5.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.12.0.tgz#1ac9352ed140b07ba144ebf371b743fdf537ec16" - integrity sha512-cFwTlgnMV6TgezQynx2c/4/tx9Tufbuo9LPzmWqyRC3QC4qTGkAG1C6pBr0/4I10PAI/FlYunI3vJjIcu+ZHMg== +"@typescript-eslint/visitor-keys@5.45.0": + version "5.45.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.45.0.tgz#e0d160e9e7fdb7f8da697a5b78e7a14a22a70528" + integrity sha512-jc6Eccbn2RtQPr1s7th6jJWQHBHI6GBVQkCHoJFQ5UreaKm59Vxw+ynQUPPY2u2Amquc+7tmEoC2G52ApsGNNg== dependencies: - "@typescript-eslint/types" "5.12.0" - eslint-visitor-keys "^3.0.0" + "@typescript-eslint/types" "5.45.0" + eslint-visitor-keys "^3.3.0" abbrev@1: version "1.1.1" @@ -3110,7 +3110,7 @@ eslint-visitor-keys@^1.1.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== -eslint-visitor-keys@^3.0.0: +eslint-visitor-keys@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== @@ -3672,7 +3672,7 @@ globalthis@^1.0.1: dependencies: define-properties "^1.1.3" -globby@^11.0.4: +globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== From c1e2c04c89df9f5ce6d5b25d7f6726a9473d9a34 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 29 Nov 2022 11:33:39 +0000 Subject: [PATCH 265/396] v2.1.40-alpha.0 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 8 ++++---- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/sdk/package.json | 2 +- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lerna.json b/lerna.json index 196113a33a..535393e618 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.1.39", + "version": "2.1.40-alpha.0", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 6b350ca7a6..6abd448ce7 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.1.39", + "version": "2.1.40-alpha.0", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "^2.1.39", + "@budibase/types": "2.1.40-alpha.0", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 5d3aea92f8..cdf7ce1f8e 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "2.1.39", + "version": "2.1.40-alpha.0", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "^2.1.39", + "@budibase/string-templates": "2.1.40-alpha.0", "@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 ed7e0a9310..a86d386aa4 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.1.39", + "version": "2.1.40-alpha.0", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "^2.1.39", - "@budibase/client": "^2.1.39", - "@budibase/frontend-core": "^2.1.39", - "@budibase/string-templates": "^2.1.39", + "@budibase/bbui": "2.1.40-alpha.0", + "@budibase/client": "2.1.40-alpha.0", + "@budibase/frontend-core": "2.1.40-alpha.0", + "@budibase/string-templates": "2.1.40-alpha.0", "@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 644a77c34d..3572cba626 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.1.39", + "version": "2.1.40-alpha.0", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "^2.1.39", - "@budibase/string-templates": "^2.1.39", - "@budibase/types": "^2.1.39", + "@budibase/backend-core": "2.1.40-alpha.0", + "@budibase/string-templates": "2.1.40-alpha.0", + "@budibase/types": "2.1.40-alpha.0", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index 2f31afd3eb..8785e13f43 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.1.39", + "version": "2.1.40-alpha.0", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "^2.1.39", - "@budibase/frontend-core": "^2.1.39", - "@budibase/string-templates": "^2.1.39", + "@budibase/bbui": "2.1.40-alpha.0", + "@budibase/frontend-core": "2.1.40-alpha.0", + "@budibase/string-templates": "2.1.40-alpha.0", "@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 240716848f..a3098c7fed 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.1.39", + "version": "2.1.40-alpha.0", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "^2.1.39", + "@budibase/bbui": "2.1.40-alpha.0", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index c7708fcc51..d7c62486a8 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.1.39", + "version": "2.1.40-alpha.0", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index 85799f329c..3c5ddca35e 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.1.39", + "version": "2.1.40-alpha.0", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -43,11 +43,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "^2.1.39", - "@budibase/client": "^2.1.39", + "@budibase/backend-core": "2.1.40-alpha.0", + "@budibase/client": "2.1.40-alpha.0", "@budibase/pro": "2.1.39", - "@budibase/string-templates": "^2.1.39", - "@budibase/types": "^2.1.39", + "@budibase/string-templates": "2.1.40-alpha.0", + "@budibase/types": "2.1.40-alpha.0", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index ea10351553..aa06b83ff9 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.1.39", + "version": "2.1.40-alpha.0", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index f502413aa7..8b911e5acd 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.1.39", + "version": "2.1.40-alpha.0", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index 4b2c0f2722..2308f99bbb 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.1.39", + "version": "2.1.40-alpha.0", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "^2.1.39", + "@budibase/backend-core": "2.1.40-alpha.0", "@budibase/pro": "2.1.39", - "@budibase/string-templates": "^2.1.39", - "@budibase/types": "^2.1.39", + "@budibase/string-templates": "2.1.40-alpha.0", + "@budibase/types": "2.1.40-alpha.0", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 4fee031a686a195b7da169faf513e795009dad11 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 29 Nov 2022 11:37:04 +0000 Subject: [PATCH 266/396] Update pro version to 2.1.40-alpha.0 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 173 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 198 +++++++++++++++++++---------------- 4 files changed, 198 insertions(+), 177 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index 3c5ddca35e..407fb135f1 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -45,7 +45,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "2.1.40-alpha.0", "@budibase/client": "2.1.40-alpha.0", - "@budibase/pro": "2.1.39", + "@budibase/pro": "2.1.40-alpha.0", "@budibase/string-templates": "2.1.40-alpha.0", "@budibase/types": "2.1.40-alpha.0", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 2bd74dfc2c..ba4b1025df 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1273,12 +1273,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.39": - version "2.1.39" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.39.tgz#0ada64b114d2b61e6a4a782227348e1bfd33ebc6" - integrity sha512-OW1SOS0jWHoHBVMZo3A36F5urgphduOXWqegtHRL3o3cFmf38l8XI6TtKDWrfSkJat0FKrzjJs1vAnIh9cQeMA== +"@budibase/backend-core@2.1.40-alpha.0": + version "2.1.40-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.40-alpha.0.tgz#f494c8644e2d39a4fd92cca010318166a97c6f43" + integrity sha512-k1r8h7UGNOV295p6NU5g0cuvkKtWJub5w4swCHZZfXrOPLkBASuAdM6jbd75cjInWr+1ivpOUBWNhsxHnsZh4A== dependencies: - "@budibase/types" "^2.1.39" + "@budibase/types" "2.1.40-alpha.0" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1293,8 +1293,8 @@ koa-passport "4.1.4" lodash "4.17.21" lodash.isarguments "3.1.0" + nano "^10.1.0" node-fetch "2.6.7" - passport-google-auth "1.0.2" passport-google-oauth "2.0.0" passport-jwt "4.0.0" passport-local "1.0.0" @@ -1360,13 +1360,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.1.39": - version "2.1.39" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.39.tgz#31d59a9e3bde75f9b83cff8db1b8fcb75c16fafe" - integrity sha512-GQ5Z0U03C9RifZhPQX9dc61yLM9YkRZOjl7mHXIrcm6ytUA3I/DMuGcN83hwlxlPOem9utofDmXfCE288nLDZg== +"@budibase/pro@2.1.40-alpha.0": + version "2.1.40-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.40-alpha.0.tgz#2b43c7eadfdb70a8af4c690a7f892ee009b44d50" + integrity sha512-zrr5lFVzq5CerbsrCO/71cj3JV9Lq7nqs02lwmzZJboELz8CTdmC23Tk9TKACosOLowgZxJqsa5qMJBSC5X+kg== dependencies: - "@budibase/backend-core" "2.1.39" - "@budibase/types" "2.1.39" + "@budibase/backend-core" "2.1.40-alpha.0" + "@budibase/types" "2.1.40-alpha.0" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -1390,10 +1390,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.1.39", "@budibase/types@^2.1.39": - version "2.1.39" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.39.tgz#ffa88a87c18d565c02576c5b75cde29326a4263c" - integrity sha512-S5v3lQbUxyzGYWMo5P3V+e47O4CNyhih2uHr+YLvdMtaq8Pj7jNHrZU9pxEFF0ldZDAFC3Z5WZaUglNXfZyZCw== +"@budibase/types@2.1.40-alpha.0": + version "2.1.40-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.40-alpha.0.tgz#d7168082f052e57a50aa8ef1b1dbef98b58e0fc9" + integrity sha512-FGsDvSCYRPuPOtbcwsIuah//ZHml5Oi86Dvb+G7Hdgt7CszkBJCwMCJPIM+FZ5wOYnZj0LV/sOJbOt0vpFXiPg== "@bull-board/api@3.7.0": version "3.7.0" @@ -3412,7 +3412,7 @@ "@types/cookiejar" "*" "@types/node" "*" -"@types/tough-cookie@*": +"@types/tough-cookie@*", "@types/tough-cookie@^4.0.2": version "4.0.2" resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.2.tgz#6286b4c7228d58ab7866d19716f3696e03a09397" integrity sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw== @@ -4187,13 +4187,6 @@ async@^3.2.1, async@^3.2.3: resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c" integrity sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ== -async@~2.1.4: - version "2.1.5" - resolved "https://registry.yarnpkg.com/async/-/async-2.1.5.tgz#e587c68580994ac67fc56ff86d3ac56bdbe810bc" - integrity sha512-+g/Ncjbx0JSq2Mk03WQkyKvNh5q9Qvyo/RIqIqnmC5feJY70PNl2ESwZU2BhAB+AZPkHNzzyC2Dq2AS5VnTKhQ== - dependencies: - lodash "^4.14.0" - asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -4297,6 +4290,15 @@ axios@^0.27.2: follow-redirects "^1.14.9" form-data "^4.0.0" +axios@^1.1.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.2.0.tgz#1cb65bd75162c70e9f8d118a905126c4a201d383" + integrity sha512-zT7wZyNYu3N5Bu0wuZ6QccIf93Qk1eV8LOewxgjOZFd2DenOs98cJ7+Y6703d0wkaXGY6/nZd4EweJaHz9uzQw== + dependencies: + follow-redirects "^1.15.0" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + babel-jest@27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.5.1.tgz#a1bf8d61928edfefd21da27eb86a695bfd691444" @@ -7001,6 +7003,11 @@ follow-redirects@^1.14.0, follow-redirects@^1.14.4, follow-redirects@^1.14.8, fo resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.1.tgz#0ca6a452306c9b276e4d3127483e29575e207ad5" integrity sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA== +follow-redirects@^1.15.0: + version "1.15.2" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" + integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== + for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -7484,16 +7491,6 @@ google-auth-library@^7.14.0: jws "^4.0.0" lru-cache "^6.0.0" -google-auth-library@~0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-0.10.0.tgz#6e15babee85fd1dd14d8d128a295b6838d52136e" - integrity sha512-KM54Y9GhdAzfXUHmWEoYmaOykSLuMG7W4HvVLYqyogxOyE6px8oSS8W13ngqW0oDGZ915GFW3V6OM6+qcdvPOA== - dependencies: - gtoken "^1.2.1" - jws "^3.1.4" - lodash.noop "^3.0.1" - request "^2.74.0" - google-gax@^2.24.1: version "2.30.5" resolved "https://registry.yarnpkg.com/google-gax/-/google-gax-2.30.5.tgz#e836f984f3228900a8336f608c83d75f9cb73eff" @@ -7513,13 +7510,6 @@ google-gax@^2.24.1: protobufjs "6.11.3" retry-request "^4.0.0" -google-p12-pem@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/google-p12-pem/-/google-p12-pem-0.1.2.tgz#33c46ab021aa734fa0332b3960a9a3ffcb2f3177" - integrity sha512-puhMlJ2+E/rgvxWaqgN/nC7x623OAE8MR9vBUqxF0inCE7HoVfCHvTeQ9+BR+rj9KM0fIg6XV6tmbt7XHHssoQ== - dependencies: - node-forge "^0.7.1" - google-p12-pem@^3.1.3: version "3.1.4" resolved "https://registry.yarnpkg.com/google-p12-pem/-/google-p12-pem-3.1.4.tgz#123f7b40da204de4ed1fbf2fd5be12c047fc8b3b" @@ -7536,15 +7526,6 @@ google-spreadsheet@3.2.0: google-auth-library "^6.1.3" lodash "^4.17.21" -googleapis@^16.0.0: - version "16.1.0" - resolved "https://registry.yarnpkg.com/googleapis/-/googleapis-16.1.0.tgz#0f19f2d70572d918881a0f626e3b1a2fa8629576" - integrity sha512-5czmF7xkIlJKc1+/+5tltrI1skoR3HKtkDOld9rk+DOucTpZRjOhCoJzoSjxB3M8rP2tEb1VIr1TPyzR3V2PUQ== - dependencies: - async "~2.1.4" - google-auth-library "~0.10.0" - string-template "~1.0.0" - got@^8.3.1: version "8.3.2" resolved "https://registry.yarnpkg.com/got/-/got-8.3.2.tgz#1d23f64390e97f776cac52e5b936e5f514d2e937" @@ -7590,16 +7571,6 @@ graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1. resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== -gtoken@^1.2.1: - version "1.2.3" - resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-1.2.3.tgz#5509571b8afd4322e124cf66cf68115284c476d8" - integrity sha512-wQAJflfoqSgMWrSBk9Fg86q+sd6s7y6uJhIvvIPz++RElGlMtEqsdAR2oWwZ/WTEtp7P9xFbJRrT976oRgzJ/w== - dependencies: - google-p12-pem "^0.1.0" - jws "^3.0.0" - mime "^1.4.1" - request "^2.72.0" - gtoken@^5.0.4: version "5.3.2" resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-5.3.2.tgz#deb7dc876abe002178e0515e383382ea9446d58f" @@ -7775,6 +7746,13 @@ http-cache-semantics@^4.0.0: resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== +http-cookie-agent@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/http-cookie-agent/-/http-cookie-agent-4.0.2.tgz#dcdaae18ed1f7452d81ae4d5cd80b227d6831b69" + integrity sha512-noTmxdH5CuytTnLj/Qv3Z84e/YFq8yLXAw3pqIYZ25Edhb9pQErIAC+ednw40Cic6Le/h9ryph5/TqsvkOaUCw== + dependencies: + agent-base "^6.0.2" + http-errors@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" @@ -9629,7 +9607,7 @@ jwa@^2.0.0: ecdsa-sig-formatter "1.0.11" safe-buffer "^5.0.1" -jws@3.x.x, jws@^3.0.0, jws@^3.1.4, jws@^3.2.2: +jws@3.x.x, jws@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== @@ -10179,11 +10157,6 @@ lodash.mergewith@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz#617121f89ac55f59047c7aec1ccd6654c6590f55" integrity sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ== -lodash.noop@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash.noop/-/lodash.noop-3.0.1.tgz#38188f4d650a3a474258439b96ec45b32617133c" - integrity sha512-TmYdmu/pebrdTIBDK/FDx9Bmfzs9x0sZG6QIJuMDTqEPfeciLcN13ij+cOd0i9vwJfBtbG9UQ+C7MkXgYxrIJg== - lodash.omit@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.omit/-/lodash.omit-4.5.0.tgz#6eb19ae5a1ee1dd9df0b969e66ce0b7fa30b5e60" @@ -10214,7 +10187,7 @@ lodash.xor@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.xor/-/lodash.xor-4.5.0.tgz#4d48ed7e98095b0632582ba714d3ff8ae8fb1db6" integrity sha512-sVN2zimthq7aZ5sPGXnSz32rZPuqcparVW50chJQe+mzTYV+IsxSsl/2gnkWWE2Of7K3myBQBqtLKOUEHJKRsQ== -lodash@4.17.21, lodash@^4.14.0, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.17.3: +lodash@4.17.21, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.17.3: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -10742,6 +10715,18 @@ nan@^2.12.1: resolved "https://registry.yarnpkg.com/nan/-/nan-2.16.0.tgz#664f43e45460fb98faf00edca0bb0d7b8dce7916" integrity sha512-UdAqHyFngu7TfQKsCBgAA6pWDkT8MAO7d0jyOecVhN5354xbLqdn8mV9Tat9gepAupm0bt2DbeaSC8vS52MuFA== +nano@^10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/nano/-/nano-10.1.0.tgz#afdd5a7440e62f09a8e23f41fcea328d27383922" + integrity sha512-COeN2TpLcHuSN44QLnPmfZCoCsKAg8/aelPOVqqm/2/MvRHDEA11/Kld5C4sLzDlWlhFZ3SO2WGJGevCsvcEzQ== + dependencies: + "@types/tough-cookie" "^4.0.2" + axios "^1.1.3" + http-cookie-agent "^4.0.2" + node-abort-controller "^3.0.1" + qs "^6.11.0" + tough-cookie "^4.1.2" + nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -10804,6 +10789,11 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== +node-abort-controller@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/node-abort-controller/-/node-abort-controller-3.0.1.tgz#f91fa50b1dee3f909afabb7e261b1e1d6b0cb74e" + integrity sha512-/ujIVxthRs+7q6hsdjHMaj8hRG9NuWmwrz+JdRwZ14jdFoKSkm+vDsCbF9PLpnSqjaWQJuTmVtcWHNLr+vrOFw== + node-addon-api@^3.1.0: version "3.2.1" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" @@ -10821,11 +10811,6 @@ node-fetch@2.6.7, node-fetch@^2.6.1, node-fetch@^2.6.7: dependencies: whatwg-url "^5.0.0" -node-forge@^0.7.1: - version "0.7.6" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.6.tgz#fdf3b418aee1f94f0ef642cd63486c77ca9724ac" - integrity sha512-sol30LUpz1jQFBjOKwbjxijiE3b6pjd74YwfD0fJOKPjF+fONKb2Yg8rYgS6+bK6VDl+/wfr4IYpC7jDzLUIfw== - node-forge@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" @@ -11425,14 +11410,6 @@ pascalcase@^0.1.1: resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" integrity sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw== -passport-google-auth@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/passport-google-auth/-/passport-google-auth-1.0.2.tgz#8b300b5aa442ef433de1d832ed3112877d0b2938" - integrity sha512-cfAqna6jZLyMEwUdd4PIwAh2mQKQVEDAaRIaom1pG6h4x4Gwjllf/Jflt3TkR1Sen5Rkvr3l7kSXCWE1EKkh8g== - dependencies: - googleapis "^16.0.0" - passport-strategy "1.x" - passport-google-oauth1@1.x.x: version "1.0.0" resolved "https://registry.yarnpkg.com/passport-google-oauth1/-/passport-google-oauth1-1.0.0.tgz#af74a803df51ec646f66a44d82282be6f108e0cc" @@ -11495,7 +11472,7 @@ passport-oauth2@1.x.x: uid2 "0.0.x" utils-merge "1.x.x" -passport-strategy@1.x, passport-strategy@1.x.x, passport-strategy@^1.0.0: +passport-strategy@1.x.x, passport-strategy@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/passport-strategy/-/passport-strategy-1.0.0.tgz#b5539aa8fc225a3d1ad179476ddf236b440f52e4" integrity sha512-CB97UUvDKJde2V0KDWWB3lyf6PC3FaZP7YxZ2G8OAtn9p4HI9j9JLP9qjOGZFvyl8uwNT8qM+hGnz/n16NI7oA== @@ -12164,6 +12141,11 @@ protobufjs@6.11.3, protobufjs@^6.11.2, protobufjs@^6.11.3, protobufjs@^6.8.6: "@types/node" ">=13.7.0" long "^4.0.0" +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" @@ -12226,6 +12208,13 @@ q@^1.1.2: resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw== +qs@^6.11.0: + version "6.11.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" + integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== + dependencies: + side-channel "^1.0.4" + qs@^6.4.0, qs@^6.5.1: version "6.10.5" resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.5.tgz#974715920a80ff6a262264acd2c7e6c2a53282b4" @@ -12609,7 +12598,7 @@ request-promise-native@^1.0.5: stealthy-require "^1.1.1" tough-cookie "^2.3.3" -request@^2.72.0, request@^2.74.0, request@^2.87.0, request@^2.88.0, request@^2.88.2: +request@^2.87.0, request@^2.88.0, request@^2.88.2: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== @@ -13519,11 +13508,6 @@ string-similarity@^4.0.1, string-similarity@^4.0.4: resolved "https://registry.yarnpkg.com/string-similarity/-/string-similarity-4.0.4.tgz#42d01ab0b34660ea8a018da8f56a3309bb8b2a5b" integrity sha512-/q/8Q4Bl4ZKAPjj8WerIBJWALKkaPRfrvhfF8k/B23i4nzrlRj2/go1m90In7nG/3XDSbOo0+pu6RvCTM9RGMQ== -string-template@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/string-template/-/string-template-1.0.0.tgz#9e9f2233dc00f218718ec379a28a5673ecca8b96" - integrity sha512-SLqR3GBUXuoPP5MmYtD7ompvXiG87QjT6lzOszyXjTM86Uu7At7vNnt2xgyTLq5o9T4IxTYFyGxcULqpsmsfdg== - "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" @@ -14209,6 +14193,16 @@ tough-cookie@^3.0.1: psl "^1.1.28" punycode "^2.1.1" +tough-cookie@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.2.tgz#e53e84b85f24e0b65dd526f46628db6c85f6b874" + integrity sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ== + dependencies: + psl "^1.1.33" + punycode "^2.1.1" + universalify "^0.2.0" + url-parse "^1.5.3" + tr46@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" @@ -14489,6 +14483,11 @@ universalify@^0.1.0, universalify@^0.1.2: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== +universalify@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" + integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== + universalify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" diff --git a/packages/worker/package.json b/packages/worker/package.json index 2308f99bbb..922ef1302e 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "2.1.40-alpha.0", - "@budibase/pro": "2.1.39", + "@budibase/pro": "2.1.40-alpha.0", "@budibase/string-templates": "2.1.40-alpha.0", "@budibase/types": "2.1.40-alpha.0", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index b953c15e0e..0cbb9f5867 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -470,12 +470,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.39": - version "2.1.39" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.39.tgz#0ada64b114d2b61e6a4a782227348e1bfd33ebc6" - integrity sha512-OW1SOS0jWHoHBVMZo3A36F5urgphduOXWqegtHRL3o3cFmf38l8XI6TtKDWrfSkJat0FKrzjJs1vAnIh9cQeMA== +"@budibase/backend-core@2.1.40-alpha.0": + version "2.1.40-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.40-alpha.0.tgz#f494c8644e2d39a4fd92cca010318166a97c6f43" + integrity sha512-k1r8h7UGNOV295p6NU5g0cuvkKtWJub5w4swCHZZfXrOPLkBASuAdM6jbd75cjInWr+1ivpOUBWNhsxHnsZh4A== dependencies: - "@budibase/types" "^2.1.39" + "@budibase/types" "2.1.40-alpha.0" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -490,8 +490,8 @@ koa-passport "4.1.4" lodash "4.17.21" lodash.isarguments "3.1.0" + nano "^10.1.0" node-fetch "2.6.7" - passport-google-auth "1.0.2" passport-google-oauth "2.0.0" passport-jwt "4.0.0" passport-local "1.0.0" @@ -507,22 +507,22 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.1.39": - version "2.1.39" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.39.tgz#31d59a9e3bde75f9b83cff8db1b8fcb75c16fafe" - integrity sha512-GQ5Z0U03C9RifZhPQX9dc61yLM9YkRZOjl7mHXIrcm6ytUA3I/DMuGcN83hwlxlPOem9utofDmXfCE288nLDZg== +"@budibase/pro@2.1.40-alpha.0": + version "2.1.40-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.40-alpha.0.tgz#2b43c7eadfdb70a8af4c690a7f892ee009b44d50" + integrity sha512-zrr5lFVzq5CerbsrCO/71cj3JV9Lq7nqs02lwmzZJboELz8CTdmC23Tk9TKACosOLowgZxJqsa5qMJBSC5X+kg== dependencies: - "@budibase/backend-core" "2.1.39" - "@budibase/types" "2.1.39" + "@budibase/backend-core" "2.1.40-alpha.0" + "@budibase/types" "2.1.40-alpha.0" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.1.39", "@budibase/types@^2.1.39": - version "2.1.39" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.39.tgz#ffa88a87c18d565c02576c5b75cde29326a4263c" - integrity sha512-S5v3lQbUxyzGYWMo5P3V+e47O4CNyhih2uHr+YLvdMtaq8Pj7jNHrZU9pxEFF0ldZDAFC3Z5WZaUglNXfZyZCw== +"@budibase/types@2.1.40-alpha.0": + version "2.1.40-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.40-alpha.0.tgz#d7168082f052e57a50aa8ef1b1dbef98b58e0fc9" + integrity sha512-FGsDvSCYRPuPOtbcwsIuah//ZHml5Oi86Dvb+G7Hdgt7CszkBJCwMCJPIM+FZ5wOYnZj0LV/sOJbOt0vpFXiPg== "@cspotcode/source-map-support@^0.8.0": version "0.8.1" @@ -1540,6 +1540,11 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== +"@types/tough-cookie@^4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.2.tgz#6286b4c7228d58ab7866d19716f3696e03a09397" + integrity sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw== + "@types/uuid@8.3.4": version "8.3.4" resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.4.tgz#bd86a43617df0594787d38b735f55c805becf1bc" @@ -1687,7 +1692,7 @@ after-all-results@^2.0.0: resolved "https://registry.yarnpkg.com/after-all-results/-/after-all-results-2.0.0.tgz#6ac2fc202b500f88da8f4f5530cfa100f4c6a2d0" integrity sha512-2zHEyuhSJOuCrmas9YV0YL/MFCWLxe1dS6k/ENhgYrb/JqyMnadLN4iIAc9kkZrbElMDyyAGH/0J18OPErOWLg== -agent-base@6: +agent-base@6, agent-base@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== @@ -1860,13 +1865,6 @@ async-value@^1.2.2: resolved "https://registry.yarnpkg.com/async-value/-/async-value-1.2.2.tgz#84517a1e7cb6b1a5b5e181fa31be10437b7fb125" integrity sha512-8rwtYe32OAS1W9CTwvknoyts+mc3ta8N7Pi0h7AjkMaKvsFbr39K+gEfZ7Z81aPXQ1sK5M23lgLy1QfZpcpadQ== -async@~2.1.4: - version "2.1.5" - resolved "https://registry.yarnpkg.com/async/-/async-2.1.5.tgz#e587c68580994ac67fc56ff86d3ac56bdbe810bc" - integrity sha512-+g/Ncjbx0JSq2Mk03WQkyKvNh5q9Qvyo/RIqIqnmC5feJY70PNl2ESwZU2BhAB+AZPkHNzzyC2Dq2AS5VnTKhQ== - dependencies: - lodash "^4.14.0" - asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -1917,6 +1915,15 @@ axios@0.24.0: dependencies: follow-redirects "^1.14.4" +axios@^1.1.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.2.0.tgz#1cb65bd75162c70e9f8d118a905126c4a201d383" + integrity sha512-zT7wZyNYu3N5Bu0wuZ6QccIf93Qk1eV8LOewxgjOZFd2DenOs98cJ7+Y6703d0wkaXGY6/nZd4EweJaHz9uzQw== + dependencies: + follow-redirects "^1.15.0" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + babel-jest@^28.1.3: version "28.1.3" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-28.1.3.tgz#c1187258197c099072156a0a121c11ee1e3917d5" @@ -3422,6 +3429,11 @@ follow-redirects@^1.14.4: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.1.tgz#0ca6a452306c9b276e4d3127483e29575e207ad5" integrity sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA== +follow-redirects@^1.15.0: + version "1.15.2" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" + integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== + forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" @@ -3684,32 +3696,6 @@ globby@^11.0.4: merge2 "^1.4.1" slash "^3.0.0" -google-auth-library@~0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-0.10.0.tgz#6e15babee85fd1dd14d8d128a295b6838d52136e" - integrity sha512-KM54Y9GhdAzfXUHmWEoYmaOykSLuMG7W4HvVLYqyogxOyE6px8oSS8W13ngqW0oDGZ915GFW3V6OM6+qcdvPOA== - dependencies: - gtoken "^1.2.1" - jws "^3.1.4" - lodash.noop "^3.0.1" - request "^2.74.0" - -google-p12-pem@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/google-p12-pem/-/google-p12-pem-0.1.2.tgz#33c46ab021aa734fa0332b3960a9a3ffcb2f3177" - integrity sha512-puhMlJ2+E/rgvxWaqgN/nC7x623OAE8MR9vBUqxF0inCE7HoVfCHvTeQ9+BR+rj9KM0fIg6XV6tmbt7XHHssoQ== - dependencies: - node-forge "^0.7.1" - -googleapis@^16.0.0: - version "16.1.0" - resolved "https://registry.yarnpkg.com/googleapis/-/googleapis-16.1.0.tgz#0f19f2d70572d918881a0f626e3b1a2fa8629576" - integrity sha512-5czmF7xkIlJKc1+/+5tltrI1skoR3HKtkDOld9rk+DOucTpZRjOhCoJzoSjxB3M8rP2tEb1VIr1TPyzR3V2PUQ== - dependencies: - async "~2.1.4" - google-auth-library "~0.10.0" - string-template "~1.0.0" - got@11.8.3: version "11.8.3" resolved "https://registry.yarnpkg.com/got/-/got-11.8.3.tgz#f496c8fdda5d729a90b4905d2b07dbd148170770" @@ -3749,16 +3735,6 @@ graceful-fs@^4.1.2, graceful-fs@^4.2.9: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== -gtoken@^1.2.1: - version "1.2.3" - resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-1.2.3.tgz#5509571b8afd4322e124cf66cf68115284c476d8" - integrity sha512-wQAJflfoqSgMWrSBk9Fg86q+sd6s7y6uJhIvvIPz++RElGlMtEqsdAR2oWwZ/WTEtp7P9xFbJRrT976oRgzJ/w== - dependencies: - google-p12-pem "^0.1.0" - jws "^3.0.0" - mime "^1.4.1" - request "^2.72.0" - har-schema@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" @@ -3846,6 +3822,13 @@ http-cache-semantics@^4.0.0: resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== +http-cookie-agent@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/http-cookie-agent/-/http-cookie-agent-4.0.2.tgz#dcdaae18ed1f7452d81ae4d5cd80b227d6831b69" + integrity sha512-noTmxdH5CuytTnLj/Qv3Z84e/YFq8yLXAw3pqIYZ25Edhb9pQErIAC+ednw40Cic6Le/h9ryph5/TqsvkOaUCw== + dependencies: + agent-base "^6.0.2" + http-errors@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" @@ -4889,7 +4872,7 @@ jwa@^1.4.1: ecdsa-sig-formatter "1.0.11" safe-buffer "^5.0.1" -jws@^3.0.0, jws@^3.1.4, jws@^3.2.2: +jws@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== @@ -5215,11 +5198,6 @@ lodash.memoize@4.x: resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== -lodash.noop@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash.noop/-/lodash.noop-3.0.1.tgz#38188f4d650a3a474258439b96ec45b32617133c" - integrity sha512-TmYdmu/pebrdTIBDK/FDx9Bmfzs9x0sZG6QIJuMDTqEPfeciLcN13ij+cOd0i9vwJfBtbG9UQ+C7MkXgYxrIJg== - lodash.once@^4.0.0: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" @@ -5235,7 +5213,7 @@ lodash.sortby@^4.7.0: resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" integrity sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA== -lodash@4.17.21, lodash@^4.14.0, lodash@^4.17.14, lodash@^4.17.19, lodash@^4.17.21: +lodash@4.17.21, lodash@^4.17.14, lodash@^4.17.19, lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -5400,7 +5378,7 @@ mime@2.6.0: resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== -mime@^1.3.4, mime@^1.4.1: +mime@^1.3.4: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== @@ -5515,6 +5493,18 @@ mute-stream@0.0.8: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== +nano@^10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/nano/-/nano-10.1.0.tgz#afdd5a7440e62f09a8e23f41fcea328d27383922" + integrity sha512-COeN2TpLcHuSN44QLnPmfZCoCsKAg8/aelPOVqqm/2/MvRHDEA11/Kld5C4sLzDlWlhFZ3SO2WGJGevCsvcEzQ== + dependencies: + "@types/tough-cookie" "^4.0.2" + axios "^1.1.3" + http-cookie-agent "^4.0.2" + node-abort-controller "^3.0.1" + qs "^6.11.0" + tough-cookie "^4.1.2" + napi-macros@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-2.0.0.tgz#2b6bae421e7b96eb687aa6c77a7858640670001b" @@ -5550,6 +5540,11 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== +node-abort-controller@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/node-abort-controller/-/node-abort-controller-3.0.1.tgz#f91fa50b1dee3f909afabb7e261b1e1d6b0cb74e" + integrity sha512-/ujIVxthRs+7q6hsdjHMaj8hRG9NuWmwrz+JdRwZ14jdFoKSkm+vDsCbF9PLpnSqjaWQJuTmVtcWHNLr+vrOFw== + node-addon-api@^3.1.0: version "3.2.1" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" @@ -5567,11 +5562,6 @@ node-fetch@2.6.7, node-fetch@^2.6.1, node-fetch@^2.6.7: dependencies: whatwg-url "^5.0.0" -node-forge@^0.7.1: - version "0.7.6" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.6.tgz#fdf3b418aee1f94f0ef642cd63486c77ca9724ac" - integrity sha512-sol30LUpz1jQFBjOKwbjxijiE3b6pjd74YwfD0fJOKPjF+fONKb2Yg8rYgS6+bK6VDl+/wfr4IYpC7jDzLUIfw== - node-gyp-build-optional-packages@5.0.3: version "5.0.3" resolved "https://registry.yarnpkg.com/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.0.3.tgz#92a89d400352c44ad3975010368072b41ad66c17" @@ -5889,14 +5879,6 @@ parseurl@^1.3.2, parseurl@^1.3.3: resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== -passport-google-auth@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/passport-google-auth/-/passport-google-auth-1.0.2.tgz#8b300b5aa442ef433de1d832ed3112877d0b2938" - integrity sha512-cfAqna6jZLyMEwUdd4PIwAh2mQKQVEDAaRIaom1pG6h4x4Gwjllf/Jflt3TkR1Sen5Rkvr3l7kSXCWE1EKkh8g== - dependencies: - googleapis "^16.0.0" - passport-strategy "1.x" - passport-google-oauth1@1.x.x: version "1.0.0" resolved "https://registry.yarnpkg.com/passport-google-oauth1/-/passport-google-oauth1-1.0.0.tgz#af74a803df51ec646f66a44d82282be6f108e0cc" @@ -5959,7 +5941,7 @@ passport-oauth2@1.x.x: uid2 "0.0.x" utils-merge "1.x.x" -passport-strategy@1.x, passport-strategy@1.x.x, passport-strategy@^1.0.0: +passport-strategy@1.x.x, passport-strategy@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/passport-strategy/-/passport-strategy-1.0.0.tgz#b5539aa8fc225a3d1ad179476ddf236b440f52e4" integrity sha512-CB97UUvDKJde2V0KDWWB3lyf6PC3FaZP7YxZ2G8OAtn9p4HI9j9JLP9qjOGZFvyl8uwNT8qM+hGnz/n16NI7oA== @@ -6386,6 +6368,11 @@ prompts@^2.0.1: kleur "^3.0.3" sisteransi "^1.0.5" +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" @@ -6453,6 +6440,13 @@ qs@^6.10.3, qs@^6.4.0: dependencies: side-channel "^1.0.4" +qs@^6.11.0: + version "6.11.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" + integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== + dependencies: + side-channel "^1.0.4" + qs@~6.5.2: version "6.5.3" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" @@ -6463,6 +6457,11 @@ querystring@0.2.0: resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" integrity sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g== +querystringify@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" + integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== + queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" @@ -6644,7 +6643,7 @@ remove-trailing-slash@^0.1.1: resolved "https://registry.yarnpkg.com/remove-trailing-slash/-/remove-trailing-slash-0.1.1.tgz#be2285a59f39c74d1bce4f825950061915e3780d" integrity sha512-o4S4Qh6L2jpnCy83ysZDau+VORNvnFw07CKSAymkd6ICNVEPisMyzlc00KlvvicsxKck94SEwhDnMNdICzO+tA== -request@^2.72.0, request@^2.74.0, request@^2.88.0: +request@^2.88.0: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== @@ -6684,6 +6683,11 @@ require-in-the-middle@^5.0.3: module-details-from-path "^1.0.3" resolve "^1.22.1" +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== + resolve-alpn@^1.0.0: version "1.2.1" resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9" @@ -7118,11 +7122,6 @@ string-similarity@^4.0.1: resolved "https://registry.yarnpkg.com/string-similarity/-/string-similarity-4.0.4.tgz#42d01ab0b34660ea8a018da8f56a3309bb8b2a5b" integrity sha512-/q/8Q4Bl4ZKAPjj8WerIBJWALKkaPRfrvhfF8k/B23i4nzrlRj2/go1m90In7nG/3XDSbOo0+pu6RvCTM9RGMQ== -string-template@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/string-template/-/string-template-1.0.0.tgz#9e9f2233dc00f218718ec379a28a5673ecca8b96" - integrity sha512-SLqR3GBUXuoPP5MmYtD7ompvXiG87QjT6lzOszyXjTM86Uu7At7vNnt2xgyTLq5o9T4IxTYFyGxcULqpsmsfdg== - "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" @@ -7439,6 +7438,16 @@ touch@^3.1.0: punycode "^2.1.1" universalify "^0.1.2" +tough-cookie@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.2.tgz#e53e84b85f24e0b65dd526f46628db6c85f6b874" + integrity sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ== + dependencies: + psl "^1.1.33" + punycode "^2.1.1" + universalify "^0.2.0" + url-parse "^1.5.3" + tough-cookie@~2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" @@ -7632,6 +7641,11 @@ universalify@^0.1.2: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== +universalify@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" + integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== + unpipe@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" @@ -7694,6 +7708,14 @@ url-parse-lax@^3.0.0: dependencies: prepend-http "^2.0.0" +url-parse@^1.5.3: + version "1.5.10" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" + integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== + dependencies: + querystringify "^2.1.1" + requires-port "^1.0.0" + url@0.10.3: version "0.10.3" resolved "https://registry.yarnpkg.com/url/-/url-0.10.3.tgz#021e4d9c7705f21bbf37d03ceb58767402774c64" From 956ff5d3d6746fc9c9187727d01a22edc3b4cf6e Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 29 Nov 2022 12:18:18 +0000 Subject: [PATCH 267/396] v2.1.40-alpha.1 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 8 ++++---- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/sdk/package.json | 2 +- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lerna.json b/lerna.json index 535393e618..37577f16f1 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.1.40-alpha.0", + "version": "2.1.40-alpha.1", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 6abd448ce7..c9e7c7e7c5 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.1.40-alpha.0", + "version": "2.1.40-alpha.1", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "2.1.40-alpha.0", + "@budibase/types": "2.1.40-alpha.1", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index cdf7ce1f8e..9c078d431c 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "2.1.40-alpha.0", + "version": "2.1.40-alpha.1", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "2.1.40-alpha.0", + "@budibase/string-templates": "2.1.40-alpha.1", "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/avatar": "^3.0.2", diff --git a/packages/builder/package.json b/packages/builder/package.json index a86d386aa4..5b17b7724c 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.1.40-alpha.0", + "version": "2.1.40-alpha.1", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.1.40-alpha.0", - "@budibase/client": "2.1.40-alpha.0", - "@budibase/frontend-core": "2.1.40-alpha.0", - "@budibase/string-templates": "2.1.40-alpha.0", + "@budibase/bbui": "2.1.40-alpha.1", + "@budibase/client": "2.1.40-alpha.1", + "@budibase/frontend-core": "2.1.40-alpha.1", + "@budibase/string-templates": "2.1.40-alpha.1", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index 3572cba626..5f399b21d3 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.1.40-alpha.0", + "version": "2.1.40-alpha.1", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "2.1.40-alpha.0", - "@budibase/string-templates": "2.1.40-alpha.0", - "@budibase/types": "2.1.40-alpha.0", + "@budibase/backend-core": "2.1.40-alpha.1", + "@budibase/string-templates": "2.1.40-alpha.1", + "@budibase/types": "2.1.40-alpha.1", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index 8785e13f43..7e55f462a4 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.1.40-alpha.0", + "version": "2.1.40-alpha.1", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "2.1.40-alpha.0", - "@budibase/frontend-core": "2.1.40-alpha.0", - "@budibase/string-templates": "2.1.40-alpha.0", + "@budibase/bbui": "2.1.40-alpha.1", + "@budibase/frontend-core": "2.1.40-alpha.1", + "@budibase/string-templates": "2.1.40-alpha.1", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index a3098c7fed..00449faa13 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.1.40-alpha.0", + "version": "2.1.40-alpha.1", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.1.40-alpha.0", + "@budibase/bbui": "2.1.40-alpha.1", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index d7c62486a8..a4e3c37039 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.1.40-alpha.0", + "version": "2.1.40-alpha.1", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index b566e59727..5bd0b7c5fc 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.1.40-alpha.0", + "version": "2.1.40-alpha.1", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -43,11 +43,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "2.1.40-alpha.0", - "@budibase/client": "2.1.40-alpha.0", + "@budibase/backend-core": "2.1.40-alpha.1", + "@budibase/client": "2.1.40-alpha.1", "@budibase/pro": "2.1.40-alpha.0", - "@budibase/string-templates": "2.1.40-alpha.0", - "@budibase/types": "2.1.40-alpha.0", + "@budibase/string-templates": "2.1.40-alpha.1", + "@budibase/types": "2.1.40-alpha.1", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index aa06b83ff9..c5e1311466 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.1.40-alpha.0", + "version": "2.1.40-alpha.1", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index 8b911e5acd..c88b815382 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.1.40-alpha.0", + "version": "2.1.40-alpha.1", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index 57fd3c94e9..0a2f895e9c 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.1.40-alpha.0", + "version": "2.1.40-alpha.1", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.1.40-alpha.0", + "@budibase/backend-core": "2.1.40-alpha.1", "@budibase/pro": "2.1.40-alpha.0", - "@budibase/string-templates": "2.1.40-alpha.0", - "@budibase/types": "2.1.40-alpha.0", + "@budibase/string-templates": "2.1.40-alpha.1", + "@budibase/types": "2.1.40-alpha.1", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 4279d3687e0563ff0bb6bbf08c0743e968d87817 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 29 Nov 2022 12:19:37 +0000 Subject: [PATCH 268/396] Update table migration test to use imports, and update TestConfiguration to work with type parameters --- .../functions/tests/tableSettings.spec.ts | 14 +++++----- .../src/tests/utilities/TestConfiguration.js | 28 +++++++++---------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/packages/server/src/migrations/functions/tests/tableSettings.spec.ts b/packages/server/src/migrations/functions/tests/tableSettings.spec.ts index 2d8cb3806d..32cf744987 100644 --- a/packages/server/src/migrations/functions/tests/tableSettings.spec.ts +++ b/packages/server/src/migrations/functions/tests/tableSettings.spec.ts @@ -1,8 +1,8 @@ import { App, Screen, ScreenProps } from "@budibase/types" -const { db: dbCore } = require("@budibase/backend-core") -const TestConfig = require("../../../tests/utilities/TestConfiguration") -const migration = require("../tableSettings") +import { db as dbCore } from "@budibase/backend-core" +import TestConfig from "../../../tests/utilities/TestConfiguration" +import { run as runMigration } from "../tableSettings" // Local type for allowing any child components inside screens type MigratingScreenProps = ScreenProps & { _children: any[] } @@ -35,7 +35,7 @@ describe("run", () => { // Run migration screen = await dbCore.doWithDB(app.appId, async (db: any) => { - await migration.run(db) + await runMigration(db) return await db.get(screen._id) }) @@ -64,7 +64,7 @@ describe("run", () => { // Run migration screen = await dbCore.doWithDB(app.appId, async (db: any) => { - await migration.run(db) + await runMigration(db) return await db.get(screen._id) }) @@ -92,7 +92,7 @@ describe("run", () => { // Run migration screen = await dbCore.doWithDB(app.appId, async (db: any) => { - await migration.run(db) + await runMigration(db) return await db.get(screen._id) }) @@ -121,7 +121,7 @@ describe("run", () => { // Run migration screen = await dbCore.doWithDB(app.appId, async (db: any) => { - await migration.run(db) + await runMigration(db) return await db.get(screen._id) }) diff --git a/packages/server/src/tests/utilities/TestConfiguration.js b/packages/server/src/tests/utilities/TestConfiguration.js index 76c79b838f..501e1ed5d6 100644 --- a/packages/server/src/tests/utilities/TestConfiguration.js +++ b/packages/server/src/tests/utilities/TestConfiguration.js @@ -87,7 +87,7 @@ class TestConfiguration { } return tenancy.doInTenant(TENANT_ID, () => { // check if already in a context - if (context.getAppId() == null && appId !== null) { + if (context.getAppId() == null && appId != null) { return context.doInAppContext(appId, async () => { return task() }) @@ -196,7 +196,7 @@ class TestConfiguration { } async createUser( - id = null, + id, firstName = FIRSTNAME, lastName = LASTNAME, email = EMAIL, @@ -366,25 +366,25 @@ class TestConfiguration { // TABLE - async updateTable(config = null) { + async updateTable(config) { config = config || basicTable() this.table = await this._req(config, null, controllers.table.save) return this.table } - async createTable(config = null) { + async createTable(config) { if (config != null && config._id) { delete config._id } return this.updateTable(config) } - async getTable(tableId = null) { + async getTable(tableId) { tableId = tableId || this.table._id return this._req(null, { tableId }, controllers.table.find) } - async createLinkedTable(relationshipType = null, links = ["link"]) { + async createLinkedTable(relationshipType, links = ["link"]) { if (!this.table) { throw "Must have created a table first." } @@ -416,7 +416,7 @@ class TestConfiguration { // ROW - async createRow(config = null) { + async createRow(config) { if (!this.table) { throw "Test requires table to be configured." } @@ -438,7 +438,7 @@ class TestConfiguration { // ROLE - async createRole(config = null) { + async createRole(config) { config = config || basicRole() return this._req(config, null, controllers.role.save) } @@ -485,7 +485,7 @@ class TestConfiguration { return this._req(null, null, controllers.automation.fetch) } - async deleteAutomation(automation = null) { + async deleteAutomation(automation) { automation = automation || this.automation if (!automation) { return @@ -497,7 +497,7 @@ class TestConfiguration { ) } - async createWebhook(config = null) { + async createWebhook(config) { if (!this.automation) { throw "Must create an automation before creating webhook." } @@ -507,7 +507,7 @@ class TestConfiguration { // DATASOURCE - async createDatasource(config = null) { + async createDatasource(config) { config = config || basicDatasource() const response = await this._req(config, null, controllers.datasource.save) this.datasource = response.datasource @@ -574,7 +574,7 @@ class TestConfiguration { .expect(200) } - async createQuery(config = null) { + async createQuery(config) { if (!this.datasource && !config) { throw "No datasource created for query." } @@ -584,14 +584,14 @@ class TestConfiguration { // SCREEN - async createScreen(config = null) { + async createScreen(config) { config = config || basicScreen() return this._req(config, null, controllers.screen.save) } // LAYOUT - async createLayout(config = null) { + async createLayout(config) { config = config || basicLayout() return await this._req(config, null, controllers.layout.save) } From b0f65526d8356107c42cf89c107322f1d5c2edbd Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 29 Nov 2022 12:21:36 +0000 Subject: [PATCH 269/396] Update pro version to 2.1.40-alpha.1 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index 5bd0b7c5fc..a57ee6c084 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -45,7 +45,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "2.1.40-alpha.1", "@budibase/client": "2.1.40-alpha.1", - "@budibase/pro": "2.1.40-alpha.0", + "@budibase/pro": "2.1.40-alpha.1", "@budibase/string-templates": "2.1.40-alpha.1", "@budibase/types": "2.1.40-alpha.1", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 973064b888..7e12dc5619 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1273,12 +1273,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.40-alpha.0": - version "2.1.40-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.40-alpha.0.tgz#f494c8644e2d39a4fd92cca010318166a97c6f43" - integrity sha512-k1r8h7UGNOV295p6NU5g0cuvkKtWJub5w4swCHZZfXrOPLkBASuAdM6jbd75cjInWr+1ivpOUBWNhsxHnsZh4A== +"@budibase/backend-core@2.1.40-alpha.1": + version "2.1.40-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.40-alpha.1.tgz#fd1a002e6a4b42a43c25937abe99afa5d4c68bab" + integrity sha512-XXj3QPqylmKwO27lhfcJ2lhBxjN3Q91bZ0nv/SDVwOMqTT/FzypG00cA/dL3E91BoibwGYd9KYvs6FAEFscG8A== dependencies: - "@budibase/types" "2.1.40-alpha.0" + "@budibase/types" "2.1.40-alpha.1" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1360,13 +1360,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.1.40-alpha.0": - version "2.1.40-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.40-alpha.0.tgz#2b43c7eadfdb70a8af4c690a7f892ee009b44d50" - integrity sha512-zrr5lFVzq5CerbsrCO/71cj3JV9Lq7nqs02lwmzZJboELz8CTdmC23Tk9TKACosOLowgZxJqsa5qMJBSC5X+kg== +"@budibase/pro@2.1.40-alpha.1": + version "2.1.40-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.40-alpha.1.tgz#a5cd55772be5f2b9d30b9cbed6cb01b69b64870f" + integrity sha512-e3Rkk+qvMwPDhw2HqDOe9NvRN91C/lTA9pwwgP25aNzMGLjIlIt9gbpEOj9LkWCVhLypmyPxlbHA9DtJinBpzg== dependencies: - "@budibase/backend-core" "2.1.40-alpha.0" - "@budibase/types" "2.1.40-alpha.0" + "@budibase/backend-core" "2.1.40-alpha.1" + "@budibase/types" "2.1.40-alpha.1" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -1390,10 +1390,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.1.40-alpha.0": - version "2.1.40-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.40-alpha.0.tgz#d7168082f052e57a50aa8ef1b1dbef98b58e0fc9" - integrity sha512-FGsDvSCYRPuPOtbcwsIuah//ZHml5Oi86Dvb+G7Hdgt7CszkBJCwMCJPIM+FZ5wOYnZj0LV/sOJbOt0vpFXiPg== +"@budibase/types@2.1.40-alpha.1": + version "2.1.40-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.40-alpha.1.tgz#b94b19dad8bc652d6ca7020173468e758db77737" + integrity sha512-k6oOeyitqW61mRHmxXZLRxeK/F7To+pWoOnSdwJxYedD5SWPdnMdR01KZFj2ahnKU+VBWNf67NppWLDfDeKM9g== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 0a2f895e9c..fc3c09ea08 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "2.1.40-alpha.1", - "@budibase/pro": "2.1.40-alpha.0", + "@budibase/pro": "2.1.40-alpha.1", "@budibase/string-templates": "2.1.40-alpha.1", "@budibase/types": "2.1.40-alpha.1", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index e14f4c930b..7ed6841141 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -470,12 +470,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.40-alpha.0": - version "2.1.40-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.40-alpha.0.tgz#f494c8644e2d39a4fd92cca010318166a97c6f43" - integrity sha512-k1r8h7UGNOV295p6NU5g0cuvkKtWJub5w4swCHZZfXrOPLkBASuAdM6jbd75cjInWr+1ivpOUBWNhsxHnsZh4A== +"@budibase/backend-core@2.1.40-alpha.1": + version "2.1.40-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.40-alpha.1.tgz#fd1a002e6a4b42a43c25937abe99afa5d4c68bab" + integrity sha512-XXj3QPqylmKwO27lhfcJ2lhBxjN3Q91bZ0nv/SDVwOMqTT/FzypG00cA/dL3E91BoibwGYd9KYvs6FAEFscG8A== dependencies: - "@budibase/types" "2.1.40-alpha.0" + "@budibase/types" "2.1.40-alpha.1" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -507,22 +507,22 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.1.40-alpha.0": - version "2.1.40-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.40-alpha.0.tgz#2b43c7eadfdb70a8af4c690a7f892ee009b44d50" - integrity sha512-zrr5lFVzq5CerbsrCO/71cj3JV9Lq7nqs02lwmzZJboELz8CTdmC23Tk9TKACosOLowgZxJqsa5qMJBSC5X+kg== +"@budibase/pro@2.1.40-alpha.1": + version "2.1.40-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.40-alpha.1.tgz#a5cd55772be5f2b9d30b9cbed6cb01b69b64870f" + integrity sha512-e3Rkk+qvMwPDhw2HqDOe9NvRN91C/lTA9pwwgP25aNzMGLjIlIt9gbpEOj9LkWCVhLypmyPxlbHA9DtJinBpzg== dependencies: - "@budibase/backend-core" "2.1.40-alpha.0" - "@budibase/types" "2.1.40-alpha.0" + "@budibase/backend-core" "2.1.40-alpha.1" + "@budibase/types" "2.1.40-alpha.1" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.1.40-alpha.0": - version "2.1.40-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.40-alpha.0.tgz#d7168082f052e57a50aa8ef1b1dbef98b58e0fc9" - integrity sha512-FGsDvSCYRPuPOtbcwsIuah//ZHml5Oi86Dvb+G7Hdgt7CszkBJCwMCJPIM+FZ5wOYnZj0LV/sOJbOt0vpFXiPg== +"@budibase/types@2.1.40-alpha.1": + version "2.1.40-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.40-alpha.1.tgz#b94b19dad8bc652d6ca7020173468e758db77737" + integrity sha512-k6oOeyitqW61mRHmxXZLRxeK/F7To+pWoOnSdwJxYedD5SWPdnMdR01KZFj2ahnKU+VBWNf67NppWLDfDeKM9g== "@cspotcode/source-map-support@^0.8.0": version "0.8.1" From 903d259fc4b06bb826e30cf9e51073d6d82899aa Mon Sep 17 00:00:00 2001 From: Michael Drury Date: Tue, 29 Nov 2022 15:23:01 +0000 Subject: [PATCH 270/396] Removing old JS file. --- .../server/src/utilities/fileSystem/index.js | 333 ------------------ 1 file changed, 333 deletions(-) delete mode 100644 packages/server/src/utilities/fileSystem/index.js diff --git a/packages/server/src/utilities/fileSystem/index.js b/packages/server/src/utilities/fileSystem/index.js deleted file mode 100644 index 8e93d33ed9..0000000000 --- a/packages/server/src/utilities/fileSystem/index.js +++ /dev/null @@ -1,333 +0,0 @@ -const { budibaseTempDir } = require("../budibaseDir") -const fs = require("fs") -const { join } = require("path") -const uuid = require("uuid/v4") -const { - doWithDB, - dangerousGetDB, - closeDB, -} = require("@budibase/backend-core/db") -const { ObjectStoreBuckets } = require("../../constants") -const { - upload, - retrieve, - retrieveToTmp, - streamUpload, - deleteFolder, - downloadTarball, -} = require("./utilities") -const { updateClientLibrary } = require("./clientLibrary") -const env = require("../../environment") -const { - USER_METDATA_PREFIX, - LINK_USER_METADATA_PREFIX, - TABLE_ROW_PREFIX, -} = require("../../db/utils") -const MemoryStream = require("memorystream") -const { getAppId } = require("@budibase/backend-core/context") - -const TOP_LEVEL_PATH = join(__dirname, "..", "..", "..") -const NODE_MODULES_PATH = join(TOP_LEVEL_PATH, "node_modules") - -/** - * The single stack system (Cloud and Builder) should not make use of the file system where possible, - * this file handles all of the file access for the system with the intention of limiting it all to one - * place. Keeping all of this logic in one place means that when we need to do file system access (like - * downloading a package or opening a temporary file) in can be done in way that we can confirm it shouldn't - * be done through an object store instead. - */ - -/** - * Upon first startup of instance there may not be everything we need in tmp directory, set it up. - */ -exports.init = () => { - const tempDir = budibaseTempDir() - if (!fs.existsSync(tempDir)) { - fs.mkdirSync(tempDir) - } - const clientLibPath = join(budibaseTempDir(), "budibase-client.js") - if (env.isTest() && !fs.existsSync(clientLibPath)) { - fs.copyFileSync(require.resolve("@budibase/client"), clientLibPath) - } -} - -/** - * Checks if the system is currently in development mode and if it is makes sure - * everything required to function is ready. - */ -exports.checkDevelopmentEnvironment = () => { - if (!env.isDev() || env.isTest()) { - return - } - if (!fs.existsSync(budibaseTempDir())) { - fs.mkdirSync(budibaseTempDir()) - } - let error - if (!fs.existsSync(join(process.cwd(), ".env"))) { - error = "Must run via yarn once to generate environment." - } - if (error) { - console.error(error) - process.exit(-1) - } -} - -/** - * This function manages temporary template files which are stored by Koa. - * @param {Object} template The template object retrieved from the Koa context object. - * @returns {Object} Returns an fs read stream which can be loaded into the database. - */ -exports.getTemplateStream = async template => { - if (template.file) { - return fs.createReadStream(template.file.path) - } else { - const [type, name] = template.key.split("/") - const tmpPath = await exports.downloadTemplate(type, name) - return fs.createReadStream(join(tmpPath, name, "db", "dump.txt")) - } -} - -/** - * Used to retrieve a handlebars file from the system which will be used as a template. - * This is allowable as the template handlebars files should be static and identical across - * the cluster. - * @param {string} path The path to the handlebars file which is to be loaded. - * @returns {string} The loaded handlebars file as a string - loaded as utf8. - */ -exports.loadHandlebarsFile = path => { - return fs.readFileSync(path, "utf8") -} - -/** - * When return a file from the API need to write the file to the system temporarily so we - * can create a read stream to send. - * @param {string} contents the contents of the file which is to be returned from the API. - * @return {Object} the read stream which can be put into the koa context body. - */ -exports.apiFileReturn = contents => { - const path = join(budibaseTempDir(), uuid()) - fs.writeFileSync(path, "\ufeff" + contents) - const readerStream = fs.createReadStream(path) - readerStream.setEncoding("binary") - return readerStream -} - -exports.defineFilter = excludeRows => { - const ids = [USER_METDATA_PREFIX, LINK_USER_METADATA_PREFIX] - if (excludeRows) { - ids.push(TABLE_ROW_PREFIX) - } - return doc => - !ids.map(key => doc._id.includes(key)).reduce((prev, curr) => prev || curr) -} - -/** - * Local utility to back up the database state for an app, excluding global user - * data or user relationships. - * @param {string} appId The app to backup - * @param {object} config Config to send to export DB - * @param {boolean} includeRows Flag to state whether the export should include data. - * @returns {*} either a string or a stream of the backup - */ -const backupAppData = async (appId, config, includeRows) => { - return await exports.exportDB(appId, { - ...config, - filter: exports.defineFilter(includeRows), - }) -} - -/** - * Takes a copy of the database state for an app to the object store. - * @param {string} appId The ID of the app which is to be backed up. - * @param {string} backupName The name of the backup located in the object store. - * @return {*} a readable stream to the completed backup file - */ -exports.performBackup = async (appId, backupName) => { - return await backupAppData(appId, { exportName: backupName }) -} - -/** - * Streams a backup of the database state for an app - * @param {string} appId The ID of the app which is to be backed up. - * @param {boolean} includeRows Flag to state whether the export should include data. - * @returns {*} a readable stream of the backup which is written in real time - */ -exports.streamBackup = async (appId, includeRows) => { - return await backupAppData(appId, { stream: true }, includeRows) -} - -/** - * Exports a DB to either file or a variable (memory). - * @param {string} dbName the DB which is to be exported. - * @param {string} exportName optional - provide a filename to write the backup to a file - * @param {boolean} stream optional - whether to perform a full backup - * @param {function} filter optional - a filter function to clear out any un-wanted docs. - * @return {*} either a readable stream or a string - */ -exports.exportDB = async (dbName, { stream, filter, exportName } = {}) => { - // streaming a DB dump is a bit more complicated, can't close DB - if (stream) { - const db = dangerousGetDB(dbName) - const memStream = new MemoryStream() - memStream.on("end", async () => { - await closeDB(db) - }) - db.dump(memStream, { filter }) - return memStream - } - - return doWithDB(dbName, async db => { - // Write the dump to file if required - if (exportName) { - const path = join(budibaseTempDir(), exportName) - const writeStream = fs.createWriteStream(path) - await db.dump(writeStream, { filter }) - - // Upload the dump to the object store if self hosted - if (env.SELF_HOSTED) { - await streamUpload( - ObjectStoreBuckets.BACKUPS, - join(dbName, exportName), - fs.createReadStream(path) - ) - } - - return fs.createReadStream(path) - } - - // Stringify the dump in memory if required - const memStream = new MemoryStream() - let appString = "" - memStream.on("data", chunk => { - appString += chunk.toString() - }) - await db.dump(memStream, { filter }) - return appString - }) -} - -/** - * Writes the provided contents to a temporary file, which can be used briefly. - * @param {string} fileContents contents which will be written to a temp file. - * @return {string} the path to the temp file. - */ -exports.storeTempFile = fileContents => { - const path = join(budibaseTempDir(), uuid()) - fs.writeFileSync(path, fileContents) - return path -} - -/** - * Utility function for getting a file read stream - a simple in memory buffered read - * stream doesn't work for pouchdb. - */ -exports.stringToFileStream = contents => { - const path = exports.storeTempFile(contents) - return fs.createReadStream(path) -} - -/** - * Creates a temp file and returns it from the API. - * @param {string} fileContents the contents to be returned in file. - */ -exports.sendTempFile = fileContents => { - const path = exports.storeTempFile(fileContents) - return fs.createReadStream(path) -} - -/** - * Uploads the latest client library to the object store. - * @param {string} appId The ID of the app which is being created. - * @return {Promise} once promise completes app resources should be ready in object store. - */ -exports.createApp = async appId => { - await updateClientLibrary(appId) -} - -/** - * Removes all of the assets created for an app in the object store. - * @param {string} appId The ID of the app which is being deleted. - * @return {Promise} once promise completes the app resources will be removed from object store. - */ -exports.deleteApp = async appId => { - await deleteFolder(ObjectStoreBuckets.APPS, `${appId}/`) -} - -/** - * Retrieves a template and pipes it to minio as well as making it available temporarily. - * @param {string} type The type of template which is to be retrieved. - * @param name - * @return {Promise<*>} - */ -exports.downloadTemplate = async (type, name) => { - const DEFAULT_TEMPLATES_BUCKET = - "prod-budi-templates.s3-eu-west-1.amazonaws.com" - const templateUrl = `https://${DEFAULT_TEMPLATES_BUCKET}/templates/${type}/${name}.tar.gz` - return downloadTarball(templateUrl, ObjectStoreBuckets.TEMPLATES, type) -} - -/** - * Retrieves component libraries from object store (or tmp symlink if in local) - */ -exports.getComponentLibraryManifest = async library => { - const appId = getAppId() - const filename = "manifest.json" - /* istanbul ignore next */ - // when testing in cypress and so on we need to get the package - // as the environment may not be fully fleshed out for dev or prod - if (env.isTest()) { - library = library.replace("standard-components", "client") - const lib = library.split("/")[1] - const path = require.resolve(library).split(lib)[0] - return require(join(path, lib, filename)) - } else if (env.isDev()) { - const path = join(NODE_MODULES_PATH, "@budibase", "client", filename) - // always load from new so that updates are refreshed - delete require.cache[require.resolve(path)] - return require(path) - } - - let resp - try { - // Try to load the manifest from the new file location - const path = join(appId, filename) - resp = await retrieve(ObjectStoreBuckets.APPS, path) - } catch (error) { - // Fallback to loading it from the old location for old apps - const path = join(appId, "node_modules", library, "package", filename) - resp = await retrieve(ObjectStoreBuckets.APPS, path) - } - if (typeof resp !== "string") { - resp = resp.toString("utf8") - } - return JSON.parse(resp) -} - -/** - * All file reads come through here just to make sure all of them make sense - * allows a centralised location to check logic is all good. - */ -exports.readFileSync = (filepath, options = "utf8") => { - return fs.readFileSync(filepath, options) -} - -/** - * Given a set of app IDs makes sure file system is cleared of any of their temp info. - */ -exports.cleanup = appIds => { - for (let appId of appIds) { - const path = join(budibaseTempDir(), appId) - if (fs.existsSync(path)) { - fs.rmdirSync(path, { recursive: true }) - } - } -} - -/** - * Full function definition for below can be found in the utilities. - */ -exports.upload = upload -exports.retrieve = retrieve -exports.retrieveToTmp = retrieveToTmp -exports.TOP_LEVEL_PATH = TOP_LEVEL_PATH -exports.NODE_MODULES_PATH = NODE_MODULES_PATH From 791d74dd94eec2d9f438996f4b040978ebe46c5e Mon Sep 17 00:00:00 2001 From: Michael Drury Date: Tue, 29 Nov 2022 15:38:25 +0000 Subject: [PATCH 271/396] Fixing sentry init. --- packages/worker/src/index.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/worker/src/index.ts b/packages/worker/src/index.ts index b513b11279..50fb2fcb8d 100644 --- a/packages/worker/src/index.ts +++ b/packages/worker/src/index.ts @@ -21,7 +21,7 @@ import koaBody from "koa-body" import http from "http" import api from "./api" import * as redis from "./utilities/redis" -import Sentry from "@sentry/node" +const Sentry = require("@sentry/node") const koaSession = require("koa-session") const logger = require("koa-pino-logger") const destroyable = require("server-destroy") @@ -46,18 +46,18 @@ app.use(auth.passport.session()) app.use(api.routes()) // sentry -if (env.isProd()) { - Sentry.init() +//if (env.isProd()) { +Sentry.init() - app.on("error", (err, ctx) => { - Sentry.withScope(function (scope: Scope) { - scope.addEventProcessor(function (event: Event) { - return Sentry.Handlers.parseRequest(event, ctx.request) - }) - Sentry.captureException(err) +app.on("error", (err, ctx) => { + Sentry.withScope(function (scope: Scope) { + scope.addEventProcessor(function (event: Event) { + return Sentry.Handlers.parseRequest(event, ctx.request) }) + Sentry.captureException(err) }) -} +}) +//} const server = http.createServer(app.callback()) destroyable(server) From 8e4cb2f079009d95918f8d18db3458fb5efbe768 Mon Sep 17 00:00:00 2001 From: Michael Drury Date: Tue, 29 Nov 2022 15:43:44 +0000 Subject: [PATCH 272/396] Adding back prod check. --- packages/worker/src/index.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/worker/src/index.ts b/packages/worker/src/index.ts index 50fb2fcb8d..34e6937f3a 100644 --- a/packages/worker/src/index.ts +++ b/packages/worker/src/index.ts @@ -46,18 +46,18 @@ app.use(auth.passport.session()) app.use(api.routes()) // sentry -//if (env.isProd()) { -Sentry.init() +if (env.isProd()) { + Sentry.init() -app.on("error", (err, ctx) => { - Sentry.withScope(function (scope: Scope) { - scope.addEventProcessor(function (event: Event) { - return Sentry.Handlers.parseRequest(event, ctx.request) + app.on("error", (err, ctx) => { + Sentry.withScope(function (scope: Scope) { + scope.addEventProcessor(function (event: Event) { + return Sentry.Handlers.parseRequest(event, ctx.request) + }) + Sentry.captureException(err) }) - Sentry.captureException(err) }) -}) -//} +} const server = http.createServer(app.callback()) destroyable(server) From de0b16397150fc37145f9dd43261a52f3832bea2 Mon Sep 17 00:00:00 2001 From: Michael Drury Date: Tue, 29 Nov 2022 16:03:22 +0000 Subject: [PATCH 273/396] Adding test case for char encoding and being explicit about utf8 export. --- packages/server/src/api/routes/tests/view.spec.js | 6 +++--- packages/server/src/utilities/fileSystem/index.ts | 12 +++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/server/src/api/routes/tests/view.spec.js b/packages/server/src/api/routes/tests/view.spec.js index 2ea90ce32d..bd5177b905 100644 --- a/packages/server/src/api/routes/tests/view.spec.js +++ b/packages/server/src/api/routes/tests/view.spec.js @@ -347,7 +347,7 @@ describe("/views", () => { const setupExport = async () => { const table = await config.createTable() - await config.createRow({ name: "test-name", description: "test-desc" }) + await config.createRow({ name: "test-name", description: "ùúûü" }) return table } @@ -362,11 +362,11 @@ describe("/views", () => { const rows = JSON.parse(res.text) expect(rows.length).toBe(1) expect(rows[0].name).toBe("test-name") - expect(rows[0].description).toBe("test-desc") + expect(rows[0].description).toBe("ùúûü") } const assertCSVExport = (res) => { - expect(res.text).toBe("\"name\",\"description\"\n\"test-name\",\"test-desc\"") + expect(res.text).toBe(`"name","description"\n"test-name","ùúûü"`) } it("should be able to export a table as JSON", async () => { diff --git a/packages/server/src/utilities/fileSystem/index.ts b/packages/server/src/utilities/fileSystem/index.ts index a888c72b57..58a687c31b 100644 --- a/packages/server/src/utilities/fileSystem/index.ts +++ b/packages/server/src/utilities/fileSystem/index.ts @@ -80,14 +80,16 @@ export function loadHandlebarsFile(path: string) { * When return a file from the API need to write the file to the system temporarily so we * can create a read stream to send. * @param {string} contents the contents of the file which is to be returned from the API. + * @param {string} encoding the encoding of the file to return (utf8 default) * @return {Object} the read stream which can be put into the koa context body. */ -export function apiFileReturn(contents: string) { +export function apiFileReturn( + contents: string, + encoding: BufferEncoding = "utf8" +) { const path = join(budibaseTempDir(), uuid()) - fs.writeFileSync(path, "\ufeff" + contents) - const readerStream = fs.createReadStream(path) - readerStream.setEncoding("binary") - return readerStream + fs.writeFileSync(path, contents, { encoding }) + return fs.createReadStream(path, { encoding }) } export function streamFile(path: string) { From 2de437aaa710d7a13e8491a28fef83e5d862bd8c Mon Sep 17 00:00:00 2001 From: Dean Date: Tue, 29 Nov 2022 16:08:31 +0000 Subject: [PATCH 274/396] Fix to ensure only the budibase datasource type is altered on save --- packages/server/src/api/controllers/datasource.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/server/src/api/controllers/datasource.ts b/packages/server/src/api/controllers/datasource.ts index cb1eb9ccaf..d47629ed3e 100644 --- a/packages/server/src/api/controllers/datasource.ts +++ b/packages/server/src/api/controllers/datasource.ts @@ -153,7 +153,9 @@ export async function update(ctx: BBContext) { const auth = datasource.config.auth await invalidateVariables(datasource, ctx.request.body) - const dataSourceBody = !datasource.plus + const isBudibaseSource = datasource.type === dbCore.BUDIBASE_DATASOURCE_TYPE + + const dataSourceBody = isBudibaseSource ? { name: ctx.request.body?.name } : ctx.request.body @@ -168,7 +170,7 @@ export async function update(ctx: BBContext) { datasource._rev = response.rev // Drain connection pools when configuration is changed - if (datasource.source && datasource.plus) { + if (datasource.source && !isBudibaseSource) { const source = await getIntegration(datasource.source) if (source && source.pool) { await source.pool.end() From 1fbbcab3e39fa2922471e6abc837cf7b19ff8ff2 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 29 Nov 2022 16:16:09 +0000 Subject: [PATCH 275/396] v2.1.40-alpha.2 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 8 ++++---- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/sdk/package.json | 2 +- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lerna.json b/lerna.json index 37577f16f1..314d83aba0 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.1.40-alpha.1", + "version": "2.1.40-alpha.2", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index c9e7c7e7c5..374ecffbe3 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.1.40-alpha.1", + "version": "2.1.40-alpha.2", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "2.1.40-alpha.1", + "@budibase/types": "2.1.40-alpha.2", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 9c078d431c..7241c240e9 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "2.1.40-alpha.1", + "version": "2.1.40-alpha.2", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "2.1.40-alpha.1", + "@budibase/string-templates": "2.1.40-alpha.2", "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/avatar": "^3.0.2", diff --git a/packages/builder/package.json b/packages/builder/package.json index 5b17b7724c..5a7f87aa51 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.1.40-alpha.1", + "version": "2.1.40-alpha.2", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.1.40-alpha.1", - "@budibase/client": "2.1.40-alpha.1", - "@budibase/frontend-core": "2.1.40-alpha.1", - "@budibase/string-templates": "2.1.40-alpha.1", + "@budibase/bbui": "2.1.40-alpha.2", + "@budibase/client": "2.1.40-alpha.2", + "@budibase/frontend-core": "2.1.40-alpha.2", + "@budibase/string-templates": "2.1.40-alpha.2", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index 5f399b21d3..e1660a016f 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.1.40-alpha.1", + "version": "2.1.40-alpha.2", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "2.1.40-alpha.1", - "@budibase/string-templates": "2.1.40-alpha.1", - "@budibase/types": "2.1.40-alpha.1", + "@budibase/backend-core": "2.1.40-alpha.2", + "@budibase/string-templates": "2.1.40-alpha.2", + "@budibase/types": "2.1.40-alpha.2", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index 7e55f462a4..21f81b9d65 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.1.40-alpha.1", + "version": "2.1.40-alpha.2", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "2.1.40-alpha.1", - "@budibase/frontend-core": "2.1.40-alpha.1", - "@budibase/string-templates": "2.1.40-alpha.1", + "@budibase/bbui": "2.1.40-alpha.2", + "@budibase/frontend-core": "2.1.40-alpha.2", + "@budibase/string-templates": "2.1.40-alpha.2", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index 00449faa13..50df7eb569 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.1.40-alpha.1", + "version": "2.1.40-alpha.2", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.1.40-alpha.1", + "@budibase/bbui": "2.1.40-alpha.2", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index a4e3c37039..1c8d658b33 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.1.40-alpha.1", + "version": "2.1.40-alpha.2", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index a57ee6c084..8e0e8b3405 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.1.40-alpha.1", + "version": "2.1.40-alpha.2", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -43,11 +43,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "2.1.40-alpha.1", - "@budibase/client": "2.1.40-alpha.1", + "@budibase/backend-core": "2.1.40-alpha.2", + "@budibase/client": "2.1.40-alpha.2", "@budibase/pro": "2.1.40-alpha.1", - "@budibase/string-templates": "2.1.40-alpha.1", - "@budibase/types": "2.1.40-alpha.1", + "@budibase/string-templates": "2.1.40-alpha.2", + "@budibase/types": "2.1.40-alpha.2", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index c5e1311466..78702b56a5 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.1.40-alpha.1", + "version": "2.1.40-alpha.2", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index c88b815382..56437cb0db 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.1.40-alpha.1", + "version": "2.1.40-alpha.2", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index fc3c09ea08..1285511870 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.1.40-alpha.1", + "version": "2.1.40-alpha.2", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.1.40-alpha.1", + "@budibase/backend-core": "2.1.40-alpha.2", "@budibase/pro": "2.1.40-alpha.1", - "@budibase/string-templates": "2.1.40-alpha.1", - "@budibase/types": "2.1.40-alpha.1", + "@budibase/string-templates": "2.1.40-alpha.2", + "@budibase/types": "2.1.40-alpha.2", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 90b93a851f8ca6eb67bf1aec44ba3a8737508a30 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 29 Nov 2022 16:20:13 +0000 Subject: [PATCH 276/396] Update pro version to 2.1.40-alpha.2 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index 8e0e8b3405..0ce085fe70 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -45,7 +45,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "2.1.40-alpha.2", "@budibase/client": "2.1.40-alpha.2", - "@budibase/pro": "2.1.40-alpha.1", + "@budibase/pro": "2.1.40-alpha.2", "@budibase/string-templates": "2.1.40-alpha.2", "@budibase/types": "2.1.40-alpha.2", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 7e12dc5619..1352574002 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1273,12 +1273,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.40-alpha.1": - version "2.1.40-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.40-alpha.1.tgz#fd1a002e6a4b42a43c25937abe99afa5d4c68bab" - integrity sha512-XXj3QPqylmKwO27lhfcJ2lhBxjN3Q91bZ0nv/SDVwOMqTT/FzypG00cA/dL3E91BoibwGYd9KYvs6FAEFscG8A== +"@budibase/backend-core@2.1.40-alpha.2": + version "2.1.40-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.40-alpha.2.tgz#8f761eecc425db1c199825fb178c063b07fad56b" + integrity sha512-SnBGufcwadOVTANVu4Y/IQHGPAr84MRZiHEd0DapK8nAxOWsHhZZrYc/t0ReROMwTfOevRHUXEarMB70t8asdg== dependencies: - "@budibase/types" "2.1.40-alpha.1" + "@budibase/types" "2.1.40-alpha.2" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1360,13 +1360,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.1.40-alpha.1": - version "2.1.40-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.40-alpha.1.tgz#a5cd55772be5f2b9d30b9cbed6cb01b69b64870f" - integrity sha512-e3Rkk+qvMwPDhw2HqDOe9NvRN91C/lTA9pwwgP25aNzMGLjIlIt9gbpEOj9LkWCVhLypmyPxlbHA9DtJinBpzg== +"@budibase/pro@2.1.40-alpha.2": + version "2.1.40-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.40-alpha.2.tgz#eaf5cec93ffb8d499de8e030894b8e9b017303e5" + integrity sha512-Plq3RzWE9hdXPEQgZWF3fNWrf3sTEf06Qh1OgAIH1S/xna9LN3lQaZ79u7UFphYtCb9mv7SPRUSa1hrC4x1jjA== dependencies: - "@budibase/backend-core" "2.1.40-alpha.1" - "@budibase/types" "2.1.40-alpha.1" + "@budibase/backend-core" "2.1.40-alpha.2" + "@budibase/types" "2.1.40-alpha.2" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -1390,10 +1390,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.1.40-alpha.1": - version "2.1.40-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.40-alpha.1.tgz#b94b19dad8bc652d6ca7020173468e758db77737" - integrity sha512-k6oOeyitqW61mRHmxXZLRxeK/F7To+pWoOnSdwJxYedD5SWPdnMdR01KZFj2ahnKU+VBWNf67NppWLDfDeKM9g== +"@budibase/types@2.1.40-alpha.2": + version "2.1.40-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.40-alpha.2.tgz#0aef32164ac10202afb3227fdb1ca3a9a021a227" + integrity sha512-AHNwIF3DpIOMagYE77ugpaTVcp0mxoBxoevWhenhhaHhqPTNmHg8Wn5JH0UhawTlYnGM0y/m6gRiixwwIzm5YA== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 1285511870..9f145ee33a 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "2.1.40-alpha.2", - "@budibase/pro": "2.1.40-alpha.1", + "@budibase/pro": "2.1.40-alpha.2", "@budibase/string-templates": "2.1.40-alpha.2", "@budibase/types": "2.1.40-alpha.2", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 7ed6841141..d25d49a6a3 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -470,12 +470,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.40-alpha.1": - version "2.1.40-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.40-alpha.1.tgz#fd1a002e6a4b42a43c25937abe99afa5d4c68bab" - integrity sha512-XXj3QPqylmKwO27lhfcJ2lhBxjN3Q91bZ0nv/SDVwOMqTT/FzypG00cA/dL3E91BoibwGYd9KYvs6FAEFscG8A== +"@budibase/backend-core@2.1.40-alpha.2": + version "2.1.40-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.40-alpha.2.tgz#8f761eecc425db1c199825fb178c063b07fad56b" + integrity sha512-SnBGufcwadOVTANVu4Y/IQHGPAr84MRZiHEd0DapK8nAxOWsHhZZrYc/t0ReROMwTfOevRHUXEarMB70t8asdg== dependencies: - "@budibase/types" "2.1.40-alpha.1" + "@budibase/types" "2.1.40-alpha.2" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -507,22 +507,22 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.1.40-alpha.1": - version "2.1.40-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.40-alpha.1.tgz#a5cd55772be5f2b9d30b9cbed6cb01b69b64870f" - integrity sha512-e3Rkk+qvMwPDhw2HqDOe9NvRN91C/lTA9pwwgP25aNzMGLjIlIt9gbpEOj9LkWCVhLypmyPxlbHA9DtJinBpzg== +"@budibase/pro@2.1.40-alpha.2": + version "2.1.40-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.40-alpha.2.tgz#eaf5cec93ffb8d499de8e030894b8e9b017303e5" + integrity sha512-Plq3RzWE9hdXPEQgZWF3fNWrf3sTEf06Qh1OgAIH1S/xna9LN3lQaZ79u7UFphYtCb9mv7SPRUSa1hrC4x1jjA== dependencies: - "@budibase/backend-core" "2.1.40-alpha.1" - "@budibase/types" "2.1.40-alpha.1" + "@budibase/backend-core" "2.1.40-alpha.2" + "@budibase/types" "2.1.40-alpha.2" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.1.40-alpha.1": - version "2.1.40-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.40-alpha.1.tgz#b94b19dad8bc652d6ca7020173468e758db77737" - integrity sha512-k6oOeyitqW61mRHmxXZLRxeK/F7To+pWoOnSdwJxYedD5SWPdnMdR01KZFj2ahnKU+VBWNf67NppWLDfDeKM9g== +"@budibase/types@2.1.40-alpha.2": + version "2.1.40-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.40-alpha.2.tgz#0aef32164ac10202afb3227fdb1ca3a9a021a227" + integrity sha512-AHNwIF3DpIOMagYE77ugpaTVcp0mxoBxoevWhenhhaHhqPTNmHg8Wn5JH0UhawTlYnGM0y/m6gRiixwwIzm5YA== "@cspotcode/source-map-support@^0.8.0": version "0.8.1" From a3cb7e9516f3e643b5de746090bb4143fcabd16f Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 29 Nov 2022 16:21:59 +0000 Subject: [PATCH 277/396] Add basic component type --- .../functions/tests/tableSettings.spec.ts | 8 +- packages/types/src/documents/app/component.ts | 9 ++ packages/types/src/documents/app/index.ts | 1 + packages/types/src/documents/app/screen.ts | 7 +- yarn.lock | 92 +++++++++++-------- 5 files changed, 66 insertions(+), 51 deletions(-) create mode 100644 packages/types/src/documents/app/component.ts diff --git a/packages/server/src/migrations/functions/tests/tableSettings.spec.ts b/packages/server/src/migrations/functions/tests/tableSettings.spec.ts index 32cf744987..70701443c5 100644 --- a/packages/server/src/migrations/functions/tests/tableSettings.spec.ts +++ b/packages/server/src/migrations/functions/tests/tableSettings.spec.ts @@ -1,17 +1,13 @@ -import { App, Screen, ScreenProps } from "@budibase/types" +import { App, Screen, ScreenProps, Component } from "@budibase/types" import { db as dbCore } from "@budibase/backend-core" import TestConfig from "../../../tests/utilities/TestConfiguration" import { run as runMigration } from "../tableSettings" -// Local type for allowing any child components inside screens -type MigratingScreenProps = ScreenProps & { _children: any[] } -type MigratingScreen = Screen & { props: MigratingScreenProps } - describe("run", () => { const config = new TestConfig(false) let app: App - let screen: MigratingScreen + let screen: Component beforeAll(async () => { await config.init() diff --git a/packages/types/src/documents/app/component.ts b/packages/types/src/documents/app/component.ts new file mode 100644 index 0000000000..654b2c87cb --- /dev/null +++ b/packages/types/src/documents/app/component.ts @@ -0,0 +1,9 @@ +import { Document } from "../document" + +export interface Component extends Document { + _instanceName: string + _styles: { [key: string]: any } + _component: string + _children?: Component[] + [key: string]: any +} diff --git a/packages/types/src/documents/app/index.ts b/packages/types/src/documents/app/index.ts index 8544617c30..b81c9e36ac 100644 --- a/packages/types/src/documents/app/index.ts +++ b/packages/types/src/documents/app/index.ts @@ -13,3 +13,4 @@ export * from "./user" export * from "./backup" export * from "./webhook" export * from "./links" +export * from "./component" diff --git a/packages/types/src/documents/app/screen.ts b/packages/types/src/documents/app/screen.ts index a3778d140f..5f79620ae4 100644 --- a/packages/types/src/documents/app/screen.ts +++ b/packages/types/src/documents/app/screen.ts @@ -1,10 +1,7 @@ import { Document } from "../document" +import { Component } from "./component" -export interface ScreenProps extends Document { - _instanceName: string - _styles: { [key: string]: any } - _component: string - _children: ScreenProps[] +export interface ScreenProps extends Component { size?: string gap?: string direction?: string diff --git a/yarn.lock b/yarn.lock index 4cfb66951c..60cb598a60 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1011,45 +1011,45 @@ resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw== -"@typescript-eslint/parser@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.28.0.tgz#2404c16751a28616ef3abab77c8e51d680a12caa" - integrity sha512-7x4D22oPY8fDaOCvkuXtYYTQ6mTMmkivwEzS+7iml9F9VkHGbbZ3x4fHRwxAb5KeuSkLqfnYjs46tGx2Nour4A== +"@typescript-eslint/parser@5.45.0": + version "5.45.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.45.0.tgz#b18a5f6b3cf1c2b3e399e9d2df4be40d6b0ddd0e" + integrity sha512-brvs/WSM4fKUmF5Ot/gEve6qYiCMjm6w4HkHPfS6ZNmxTS0m0iNN4yOChImaCkqc1hRwFGqUyanMXuGal6oyyQ== dependencies: - "@typescript-eslint/scope-manager" "4.28.0" - "@typescript-eslint/types" "4.28.0" - "@typescript-eslint/typescript-estree" "4.28.0" - debug "^4.3.1" + "@typescript-eslint/scope-manager" "5.45.0" + "@typescript-eslint/types" "5.45.0" + "@typescript-eslint/typescript-estree" "5.45.0" + debug "^4.3.4" -"@typescript-eslint/scope-manager@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.28.0.tgz#6a3009d2ab64a30fc8a1e257a1a320067f36a0ce" - integrity sha512-eCALCeScs5P/EYjwo6se9bdjtrh8ByWjtHzOkC4Tia6QQWtQr3PHovxh3TdYTuFcurkYI4rmFsRFpucADIkseg== +"@typescript-eslint/scope-manager@5.45.0": + version "5.45.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.45.0.tgz#7a4ac1bfa9544bff3f620ab85947945938319a96" + integrity sha512-noDMjr87Arp/PuVrtvN3dXiJstQR1+XlQ4R1EvzG+NMgXi8CuMCXpb8JqNtFHKceVSQ985BZhfRdowJzbv4yKw== dependencies: - "@typescript-eslint/types" "4.28.0" - "@typescript-eslint/visitor-keys" "4.28.0" - -"@typescript-eslint/types@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.28.0.tgz#a33504e1ce7ac51fc39035f5fe6f15079d4dafb0" - integrity sha512-p16xMNKKoiJCVZY5PW/AfILw2xe1LfruTcfAKBj3a+wgNYP5I9ZEKNDOItoRt53p4EiPV6iRSICy8EPanG9ZVA== + "@typescript-eslint/types" "5.45.0" + "@typescript-eslint/visitor-keys" "5.45.0" "@typescript-eslint/types@4.33.0": version "4.33.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.33.0.tgz#a1e59036a3b53ae8430ceebf2a919dc7f9af6d72" integrity sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ== -"@typescript-eslint/typescript-estree@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.28.0.tgz#e66d4e5aa2ede66fec8af434898fe61af10c71cf" - integrity sha512-m19UQTRtxMzKAm8QxfKpvh6OwQSXaW1CdZPoCaQuLwAq7VZMNuhJmZR4g5281s2ECt658sldnJfdpSZZaxUGMQ== +"@typescript-eslint/types@5.45.0": + version "5.45.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.45.0.tgz#794760b9037ee4154c09549ef5a96599621109c5" + integrity sha512-QQij+u/vgskA66azc9dCmx+rev79PzX8uDHpsqSjEFtfF2gBUTRCpvYMh2gw2ghkJabNkPlSUCimsyBEQZd1DA== + +"@typescript-eslint/typescript-estree@5.45.0": + version "5.45.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.45.0.tgz#f70a0d646d7f38c0dfd6936a5e171a77f1e5291d" + integrity sha512-maRhLGSzqUpFcZgXxg1qc/+H0bT36lHK4APhp0AEUVrpSwXiRAomm/JGjSG+kNUio5kAa3uekCYu/47cnGn5EQ== dependencies: - "@typescript-eslint/types" "4.28.0" - "@typescript-eslint/visitor-keys" "4.28.0" - debug "^4.3.1" - globby "^11.0.3" - is-glob "^4.0.1" - semver "^7.3.5" + "@typescript-eslint/types" "5.45.0" + "@typescript-eslint/visitor-keys" "5.45.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" tsutils "^3.21.0" "@typescript-eslint/typescript-estree@^4.33.0": @@ -1065,14 +1065,6 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/visitor-keys@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.28.0.tgz#255c67c966ec294104169a6939d96f91c8a89434" - integrity sha512-PjJyTWwrlrvM5jazxYF5ZPs/nl0kHDZMVbuIcbpawVXaDPelp3+S9zpOz5RmVUfS/fD5l5+ZXNKnWhNYjPzCvw== - dependencies: - "@typescript-eslint/types" "4.28.0" - eslint-visitor-keys "^2.0.0" - "@typescript-eslint/visitor-keys@4.33.0": version "4.33.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz#2a22f77a41604289b7a186586e9ec48ca92ef1dd" @@ -1081,6 +1073,14 @@ "@typescript-eslint/types" "4.33.0" eslint-visitor-keys "^2.0.0" +"@typescript-eslint/visitor-keys@5.45.0": + version "5.45.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.45.0.tgz#e0d160e9e7fdb7f8da697a5b78e7a14a22a70528" + integrity sha512-jc6Eccbn2RtQPr1s7th6jJWQHBHI6GBVQkCHoJFQ5UreaKm59Vxw+ynQUPPY2u2Amquc+7tmEoC2G52ApsGNNg== + dependencies: + "@typescript-eslint/types" "5.45.0" + eslint-visitor-keys "^3.3.0" + JSONStream@^1.0.4, JSONStream@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" @@ -2015,7 +2015,7 @@ debug@^3.1.0: dependencies: ms "^2.1.1" -debug@^4.0.0, debug@^4.3.1, debug@^4.3.3: +debug@^4.0.0, debug@^4.3.1, debug@^4.3.3, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -2446,6 +2446,11 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== +eslint-visitor-keys@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" + integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== + eslint@^7.28.0: version "7.32.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" @@ -3081,7 +3086,7 @@ globals@^13.6.0, globals@^13.9.0: dependencies: type-fest "^0.20.2" -globby@^11.0.3: +globby@^11.0.3, globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -3606,7 +3611,7 @@ is-glob@^3.1.0: dependencies: is-extglob "^2.1.0" -is-glob@^4.0.0, is-glob@^4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== @@ -5843,6 +5848,13 @@ semver@^7.3.4: dependencies: lru-cache "^6.0.0" +semver@^7.3.7: + version "7.3.8" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" + integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== + dependencies: + lru-cache "^6.0.0" + semver@~5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" From bc33af13f91bfd1bb5a1a5fa793084bd92c8ce19 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 29 Nov 2022 16:27:06 +0000 Subject: [PATCH 278/396] Fix types in table migration tests --- .../functions/tests/tableSettings.spec.ts | 94 +++++++++++-------- 1 file changed, 55 insertions(+), 39 deletions(-) diff --git a/packages/server/src/migrations/functions/tests/tableSettings.spec.ts b/packages/server/src/migrations/functions/tests/tableSettings.spec.ts index 70701443c5..8d28a43322 100644 --- a/packages/server/src/migrations/functions/tests/tableSettings.spec.ts +++ b/packages/server/src/migrations/functions/tests/tableSettings.spec.ts @@ -1,4 +1,4 @@ -import { App, Screen, ScreenProps, Component } from "@budibase/types" +import { App, Screen } from "@budibase/types" import { db as dbCore } from "@budibase/backend-core" import TestConfig from "../../../tests/utilities/TestConfiguration" @@ -7,7 +7,7 @@ import { run as runMigration } from "../tableSettings" describe("run", () => { const config = new TestConfig(false) let app: App - let screen: Component + let screen: Screen beforeAll(async () => { await config.init() @@ -19,14 +19,18 @@ describe("run", () => { it("migrates table block row on click settings", async () => { // Add legacy table block as first child - screen.props._children[0] = { - _component: "@budibase/standard-components/tableblock", - _id: "foo", - linkRows: true, - linkURL: "/rows/:id", - linkPeek: true, - linkColumn: "name", - } + screen.props._children = [ + { + _instanceName: "Table Block", + _styles: {}, + _component: "@budibase/standard-components/tableblock", + _id: "foo", + linkRows: true, + linkURL: "/rows/:id", + linkPeek: true, + linkColumn: "name", + }, + ] await config.createScreen(screen) // Run migration @@ -36,7 +40,7 @@ describe("run", () => { }) // Verify new "onClick" setting - const onClick = screen.props._children[0].onClick + const onClick = screen.props._children?.[0].onClick expect(onClick).toBeDefined() expect(onClick.length).toBe(1) expect(onClick[0]["##eventHandlerType"]).toBe("Navigate To") @@ -48,14 +52,18 @@ describe("run", () => { it("migrates table row on click settings", async () => { // Add legacy table block as first child - screen.props._children[0] = { - _component: "@budibase/standard-components/table", - _id: "foo", - linkRows: true, - linkURL: "/rows/:id", - linkPeek: true, - linkColumn: "name", - } + screen.props._children = [ + { + _instanceName: "Table", + _styles: {}, + _component: "@budibase/standard-components/table", + _id: "foo", + linkRows: true, + linkURL: "/rows/:id", + linkPeek: true, + linkColumn: "name", + }, + ] await config.createScreen(screen) // Run migration @@ -65,7 +73,7 @@ describe("run", () => { }) // Verify new "onClick" setting - const onClick = screen.props._children[0].onClick + const onClick = screen.props._children?.[0].onClick expect(onClick).toBeDefined() expect(onClick.length).toBe(1) expect(onClick[0]["##eventHandlerType"]).toBe("Navigate To") @@ -77,13 +85,17 @@ describe("run", () => { it("migrates table block title button settings", async () => { // Add legacy table block as first child - screen.props._children[0] = { - _component: "@budibase/standard-components/tableblock", - _id: "foo", - showTitleButton: true, - titleButtonURL: "/url", - titleButtonPeek: true, - } + screen.props._children = [ + { + _instanceName: "Table Block", + _styles: {}, + _component: "@budibase/standard-components/tableblock", + _id: "foo", + showTitleButton: true, + titleButtonURL: "/url", + titleButtonPeek: true, + }, + ] await config.createScreen(screen) // Run migration @@ -93,7 +105,7 @@ describe("run", () => { }) // Verify new "onClickTitleButton" setting - const onClick = screen.props._children[0].onClickTitleButton + const onClick = screen.props._children?.[0].onClickTitleButton expect(onClick).toBeDefined() expect(onClick.length).toBe(1) expect(onClick[0]["##eventHandlerType"]).toBe("Navigate To") @@ -103,16 +115,20 @@ describe("run", () => { it("ignores components that have already been migrated", async () => { // Add legacy table block as first child - screen.props._children[0] = { - _component: "@budibase/standard-components/tableblock", - _id: "foo", - linkRows: true, - linkURL: "/rows/:id", - linkPeek: true, - linkColumn: "name", - onClick: "foo", - } - const initialDefinition = JSON.stringify(screen.props._children[0]) + screen.props._children = [ + { + _instanceName: "Table Block", + _styles: {}, + _component: "@budibase/standard-components/tableblock", + _id: "foo", + linkRows: true, + linkURL: "/rows/:id", + linkPeek: true, + linkColumn: "name", + onClick: "foo", + }, + ] + const initialDefinition = JSON.stringify(screen.props._children?.[0]) await config.createScreen(screen) // Run migration @@ -122,7 +138,7 @@ describe("run", () => { }) // Verify new "onClick" setting - const newDefinition = JSON.stringify(screen.props._children[0]) + const newDefinition = JSON.stringify(screen.props._children?.[0]) expect(initialDefinition).toEqual(newDefinition) }) }) From f1ba4d6d13547c88a2662269d070cfc674dd0761 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 29 Nov 2022 17:23:40 +0000 Subject: [PATCH 279/396] v2.1.40-alpha.3 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 8 ++++---- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/sdk/package.json | 2 +- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lerna.json b/lerna.json index 314d83aba0..baed35d8ce 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.1.40-alpha.2", + "version": "2.1.40-alpha.3", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 374ecffbe3..b4dc26999c 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.1.40-alpha.2", + "version": "2.1.40-alpha.3", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "2.1.40-alpha.2", + "@budibase/types": "2.1.40-alpha.3", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 7241c240e9..fdcaa8e09f 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "2.1.40-alpha.2", + "version": "2.1.40-alpha.3", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "2.1.40-alpha.2", + "@budibase/string-templates": "2.1.40-alpha.3", "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/avatar": "^3.0.2", diff --git a/packages/builder/package.json b/packages/builder/package.json index 5a7f87aa51..3f5702bd4c 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.1.40-alpha.2", + "version": "2.1.40-alpha.3", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.1.40-alpha.2", - "@budibase/client": "2.1.40-alpha.2", - "@budibase/frontend-core": "2.1.40-alpha.2", - "@budibase/string-templates": "2.1.40-alpha.2", + "@budibase/bbui": "2.1.40-alpha.3", + "@budibase/client": "2.1.40-alpha.3", + "@budibase/frontend-core": "2.1.40-alpha.3", + "@budibase/string-templates": "2.1.40-alpha.3", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index e1660a016f..9afe133b02 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.1.40-alpha.2", + "version": "2.1.40-alpha.3", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "2.1.40-alpha.2", - "@budibase/string-templates": "2.1.40-alpha.2", - "@budibase/types": "2.1.40-alpha.2", + "@budibase/backend-core": "2.1.40-alpha.3", + "@budibase/string-templates": "2.1.40-alpha.3", + "@budibase/types": "2.1.40-alpha.3", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index 21f81b9d65..263b353b81 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.1.40-alpha.2", + "version": "2.1.40-alpha.3", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "2.1.40-alpha.2", - "@budibase/frontend-core": "2.1.40-alpha.2", - "@budibase/string-templates": "2.1.40-alpha.2", + "@budibase/bbui": "2.1.40-alpha.3", + "@budibase/frontend-core": "2.1.40-alpha.3", + "@budibase/string-templates": "2.1.40-alpha.3", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index 50df7eb569..b0bd19fdd2 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.1.40-alpha.2", + "version": "2.1.40-alpha.3", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.1.40-alpha.2", + "@budibase/bbui": "2.1.40-alpha.3", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 1c8d658b33..e431ee1505 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.1.40-alpha.2", + "version": "2.1.40-alpha.3", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index 0ce085fe70..0b3399069e 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.1.40-alpha.2", + "version": "2.1.40-alpha.3", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -43,11 +43,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "2.1.40-alpha.2", - "@budibase/client": "2.1.40-alpha.2", + "@budibase/backend-core": "2.1.40-alpha.3", + "@budibase/client": "2.1.40-alpha.3", "@budibase/pro": "2.1.40-alpha.2", - "@budibase/string-templates": "2.1.40-alpha.2", - "@budibase/types": "2.1.40-alpha.2", + "@budibase/string-templates": "2.1.40-alpha.3", + "@budibase/types": "2.1.40-alpha.3", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 78702b56a5..4c50a08b67 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.1.40-alpha.2", + "version": "2.1.40-alpha.3", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index 56437cb0db..e770942d72 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.1.40-alpha.2", + "version": "2.1.40-alpha.3", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index 9f145ee33a..9470d4a4ca 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.1.40-alpha.2", + "version": "2.1.40-alpha.3", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.1.40-alpha.2", + "@budibase/backend-core": "2.1.40-alpha.3", "@budibase/pro": "2.1.40-alpha.2", - "@budibase/string-templates": "2.1.40-alpha.2", - "@budibase/types": "2.1.40-alpha.2", + "@budibase/string-templates": "2.1.40-alpha.3", + "@budibase/types": "2.1.40-alpha.3", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 1fd3521fa9812cfa811f58396439dbdc16fffa3d Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 29 Nov 2022 17:27:19 +0000 Subject: [PATCH 280/396] Update pro version to 2.1.40-alpha.3 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index 0b3399069e..b68af8aeff 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -45,7 +45,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "2.1.40-alpha.3", "@budibase/client": "2.1.40-alpha.3", - "@budibase/pro": "2.1.40-alpha.2", + "@budibase/pro": "2.1.40-alpha.3", "@budibase/string-templates": "2.1.40-alpha.3", "@budibase/types": "2.1.40-alpha.3", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 1352574002..209625265c 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1273,12 +1273,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.40-alpha.2": - version "2.1.40-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.40-alpha.2.tgz#8f761eecc425db1c199825fb178c063b07fad56b" - integrity sha512-SnBGufcwadOVTANVu4Y/IQHGPAr84MRZiHEd0DapK8nAxOWsHhZZrYc/t0ReROMwTfOevRHUXEarMB70t8asdg== +"@budibase/backend-core@2.1.40-alpha.3": + version "2.1.40-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.40-alpha.3.tgz#b454a261d502725aa2963a98fe16fb983616b4ce" + integrity sha512-XoevkptJSAt9WAewwWs5isMITJMT9FAg2r6w31T4xh0YdVNQcR2y6ZK88S3lZUMGibPCdqMJuquOQRx/tH1FqQ== dependencies: - "@budibase/types" "2.1.40-alpha.2" + "@budibase/types" "2.1.40-alpha.3" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1360,13 +1360,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.1.40-alpha.2": - version "2.1.40-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.40-alpha.2.tgz#eaf5cec93ffb8d499de8e030894b8e9b017303e5" - integrity sha512-Plq3RzWE9hdXPEQgZWF3fNWrf3sTEf06Qh1OgAIH1S/xna9LN3lQaZ79u7UFphYtCb9mv7SPRUSa1hrC4x1jjA== +"@budibase/pro@2.1.40-alpha.3": + version "2.1.40-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.40-alpha.3.tgz#8bbf63aedfd35a366b65c23df7f2a96ed89093ae" + integrity sha512-LJKTAsUqWwOeFH9qw1uNSdtStUYIZnHxeJ2uM4mwHHyNaT7ra903w0bpgTtYl18yaeP3Y3io8EV3ylvjbIxwkw== dependencies: - "@budibase/backend-core" "2.1.40-alpha.2" - "@budibase/types" "2.1.40-alpha.2" + "@budibase/backend-core" "2.1.40-alpha.3" + "@budibase/types" "2.1.40-alpha.3" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -1390,10 +1390,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.1.40-alpha.2": - version "2.1.40-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.40-alpha.2.tgz#0aef32164ac10202afb3227fdb1ca3a9a021a227" - integrity sha512-AHNwIF3DpIOMagYE77ugpaTVcp0mxoBxoevWhenhhaHhqPTNmHg8Wn5JH0UhawTlYnGM0y/m6gRiixwwIzm5YA== +"@budibase/types@2.1.40-alpha.3": + version "2.1.40-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.40-alpha.3.tgz#8424b699be84e78fe1e7a6dccd3eee882c3abfb2" + integrity sha512-Tr1K59RBVAnAKLvj1bhZ6ffRqc9cCjDrEGycMRYoFLlVhtRsm51NF60NpeyhnZgYX5TNZPreu0gvSt9AmjYz0Q== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 9470d4a4ca..7af82ff9ec 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "2.1.40-alpha.3", - "@budibase/pro": "2.1.40-alpha.2", + "@budibase/pro": "2.1.40-alpha.3", "@budibase/string-templates": "2.1.40-alpha.3", "@budibase/types": "2.1.40-alpha.3", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index d25d49a6a3..249ff1d6e4 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -470,12 +470,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.40-alpha.2": - version "2.1.40-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.40-alpha.2.tgz#8f761eecc425db1c199825fb178c063b07fad56b" - integrity sha512-SnBGufcwadOVTANVu4Y/IQHGPAr84MRZiHEd0DapK8nAxOWsHhZZrYc/t0ReROMwTfOevRHUXEarMB70t8asdg== +"@budibase/backend-core@2.1.40-alpha.3": + version "2.1.40-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.40-alpha.3.tgz#b454a261d502725aa2963a98fe16fb983616b4ce" + integrity sha512-XoevkptJSAt9WAewwWs5isMITJMT9FAg2r6w31T4xh0YdVNQcR2y6ZK88S3lZUMGibPCdqMJuquOQRx/tH1FqQ== dependencies: - "@budibase/types" "2.1.40-alpha.2" + "@budibase/types" "2.1.40-alpha.3" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -507,22 +507,22 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.1.40-alpha.2": - version "2.1.40-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.40-alpha.2.tgz#eaf5cec93ffb8d499de8e030894b8e9b017303e5" - integrity sha512-Plq3RzWE9hdXPEQgZWF3fNWrf3sTEf06Qh1OgAIH1S/xna9LN3lQaZ79u7UFphYtCb9mv7SPRUSa1hrC4x1jjA== +"@budibase/pro@2.1.40-alpha.3": + version "2.1.40-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.40-alpha.3.tgz#8bbf63aedfd35a366b65c23df7f2a96ed89093ae" + integrity sha512-LJKTAsUqWwOeFH9qw1uNSdtStUYIZnHxeJ2uM4mwHHyNaT7ra903w0bpgTtYl18yaeP3Y3io8EV3ylvjbIxwkw== dependencies: - "@budibase/backend-core" "2.1.40-alpha.2" - "@budibase/types" "2.1.40-alpha.2" + "@budibase/backend-core" "2.1.40-alpha.3" + "@budibase/types" "2.1.40-alpha.3" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.1.40-alpha.2": - version "2.1.40-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.40-alpha.2.tgz#0aef32164ac10202afb3227fdb1ca3a9a021a227" - integrity sha512-AHNwIF3DpIOMagYE77ugpaTVcp0mxoBxoevWhenhhaHhqPTNmHg8Wn5JH0UhawTlYnGM0y/m6gRiixwwIzm5YA== +"@budibase/types@2.1.40-alpha.3": + version "2.1.40-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.40-alpha.3.tgz#8424b699be84e78fe1e7a6dccd3eee882c3abfb2" + integrity sha512-Tr1K59RBVAnAKLvj1bhZ6ffRqc9cCjDrEGycMRYoFLlVhtRsm51NF60NpeyhnZgYX5TNZPreu0gvSt9AmjYz0Q== "@cspotcode/source-map-support@^0.8.0": version "0.8.1" From bd954a087097ffee12b0a03fce5c285739e1d0a9 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 29 Nov 2022 18:28:26 +0000 Subject: [PATCH 281/396] Enable capturing events for certain setting changes, and track usage of side panels inside table blocks --- packages/builder/src/analytics/constants.js | 1 + .../settings/ComponentSettingsSection.svelte | 18 ++++++++++++++---- packages/client/manifest.json | 1 + 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/packages/builder/src/analytics/constants.js b/packages/builder/src/analytics/constants.js index 424b32c8a4..1bb8517a2b 100644 --- a/packages/builder/src/analytics/constants.js +++ b/packages/builder/src/analytics/constants.js @@ -1,5 +1,6 @@ export const Events = { COMPONENT_CREATED: "component:created", + COMPONENT_UPDATED: "component:updated", APP_VIEW_PUBLISHED: "app:view_published", } diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsSection.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsSection.svelte index eafedd61b8..bf8bff1292 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsSection.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsSection.svelte @@ -6,6 +6,7 @@ import ResetFieldsButton from "components/design/settings/controls/ResetFieldsButton.svelte" import EjectBlockButton from "components/design/settings/controls/EjectBlockButton.svelte" import { getComponentForSetting } from "components/design/settings/componentSettings" + import analytics, { Events } from "analytics" export let componentDefinition export let componentInstance @@ -44,9 +45,18 @@ return sections } - const updateSetting = async (key, value) => { + const updateSetting = async (setting, value) => { try { - await store.actions.components.updateSetting(key, value) + await store.actions.components.updateSetting(setting.key, value) + + // Send event if required + if (setting.sendEvents) { + analytics.captureEvent(Events.COMPONENT_UPDATED, { + name: componentInstance._component, + setting: setting.key, + value, + }) + } } catch (error) { notifications.error("Error updating component prop") } @@ -113,7 +123,7 @@ label="Name" key="_instanceName" value={componentInstance._instanceName} - onChange={val => updateSetting("_instanceName", val)} + onChange={val => updateSetting({ key: "_instanceName" }, val)} /> {/if} {#each section.settings as setting (setting.key)} @@ -126,7 +136,7 @@ value={componentInstance[setting.key]} defaultValue={setting.defaultValue} nested={setting.nested} - onChange={val => updateSetting(setting.key, val)} + onChange={val => updateSetting(setting, val)} highlighted={$store.highlightedSettingKey === setting.key} info={setting.info} props={{ diff --git a/packages/client/manifest.json b/packages/client/manifest.json index 4bd7bc2b5d..d7b0184876 100644 --- a/packages/client/manifest.json +++ b/packages/client/manifest.json @@ -4546,6 +4546,7 @@ { "type": "radio", "key": "clickBehaviour", + "sendEvents": true, "defaultValue": "actions", "info": "Details side panel is only compatible with internal or SQL tables", "options": [ From 24d5fc4af3cf845cbde458b72f6e90c732dbc03d Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Tue, 29 Nov 2022 22:11:44 +0000 Subject: [PATCH 282/396] Fix default env processing typescript error --- packages/worker/src/environment.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/worker/src/environment.ts b/packages/worker/src/environment.ts index f4c339ad6d..37d40a2a9c 100644 --- a/packages/worker/src/environment.ts +++ b/packages/worker/src/environment.ts @@ -89,7 +89,7 @@ for (let [key, value] of Object.entries(environment)) { // handle the edge case of "0" to disable an environment variable if (value === "0") { // @ts-ignore - env[key] = 0 + environment[key] = 0 } } From 5c318f9d9f9f4b4377c8a6d3345321a50692ac14 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 29 Nov 2022 22:24:37 +0000 Subject: [PATCH 283/396] v2.1.40-alpha.4 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 8 ++++---- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/sdk/package.json | 2 +- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lerna.json b/lerna.json index baed35d8ce..bb8f2b26ba 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.1.40-alpha.3", + "version": "2.1.40-alpha.4", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index b4dc26999c..da716bf753 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.1.40-alpha.3", + "version": "2.1.40-alpha.4", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "2.1.40-alpha.3", + "@budibase/types": "2.1.40-alpha.4", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index fdcaa8e09f..448b525326 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "2.1.40-alpha.3", + "version": "2.1.40-alpha.4", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "2.1.40-alpha.3", + "@budibase/string-templates": "2.1.40-alpha.4", "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/avatar": "^3.0.2", diff --git a/packages/builder/package.json b/packages/builder/package.json index 3f5702bd4c..5bb7c8b5b7 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.1.40-alpha.3", + "version": "2.1.40-alpha.4", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.1.40-alpha.3", - "@budibase/client": "2.1.40-alpha.3", - "@budibase/frontend-core": "2.1.40-alpha.3", - "@budibase/string-templates": "2.1.40-alpha.3", + "@budibase/bbui": "2.1.40-alpha.4", + "@budibase/client": "2.1.40-alpha.4", + "@budibase/frontend-core": "2.1.40-alpha.4", + "@budibase/string-templates": "2.1.40-alpha.4", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index 9afe133b02..4555416bf6 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.1.40-alpha.3", + "version": "2.1.40-alpha.4", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "2.1.40-alpha.3", - "@budibase/string-templates": "2.1.40-alpha.3", - "@budibase/types": "2.1.40-alpha.3", + "@budibase/backend-core": "2.1.40-alpha.4", + "@budibase/string-templates": "2.1.40-alpha.4", + "@budibase/types": "2.1.40-alpha.4", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index 263b353b81..d897b55fe7 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.1.40-alpha.3", + "version": "2.1.40-alpha.4", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "2.1.40-alpha.3", - "@budibase/frontend-core": "2.1.40-alpha.3", - "@budibase/string-templates": "2.1.40-alpha.3", + "@budibase/bbui": "2.1.40-alpha.4", + "@budibase/frontend-core": "2.1.40-alpha.4", + "@budibase/string-templates": "2.1.40-alpha.4", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index b0bd19fdd2..99e6dc7bc3 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.1.40-alpha.3", + "version": "2.1.40-alpha.4", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.1.40-alpha.3", + "@budibase/bbui": "2.1.40-alpha.4", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index e431ee1505..5d557d3dbd 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.1.40-alpha.3", + "version": "2.1.40-alpha.4", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index b68af8aeff..cfc5b6f7cc 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.1.40-alpha.3", + "version": "2.1.40-alpha.4", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -43,11 +43,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "2.1.40-alpha.3", - "@budibase/client": "2.1.40-alpha.3", + "@budibase/backend-core": "2.1.40-alpha.4", + "@budibase/client": "2.1.40-alpha.4", "@budibase/pro": "2.1.40-alpha.3", - "@budibase/string-templates": "2.1.40-alpha.3", - "@budibase/types": "2.1.40-alpha.3", + "@budibase/string-templates": "2.1.40-alpha.4", + "@budibase/types": "2.1.40-alpha.4", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 4c50a08b67..63088298a6 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.1.40-alpha.3", + "version": "2.1.40-alpha.4", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index e770942d72..f842b0d6d5 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.1.40-alpha.3", + "version": "2.1.40-alpha.4", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index 7af82ff9ec..0653dd6e9d 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.1.40-alpha.3", + "version": "2.1.40-alpha.4", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.1.40-alpha.3", + "@budibase/backend-core": "2.1.40-alpha.4", "@budibase/pro": "2.1.40-alpha.3", - "@budibase/string-templates": "2.1.40-alpha.3", - "@budibase/types": "2.1.40-alpha.3", + "@budibase/string-templates": "2.1.40-alpha.4", + "@budibase/types": "2.1.40-alpha.4", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 88285257553ba301b8f979c2e7f81e144f808754 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 29 Nov 2022 22:27:53 +0000 Subject: [PATCH 284/396] Update pro version to 2.1.40-alpha.4 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index cfc5b6f7cc..4d7ec13d9a 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -45,7 +45,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "2.1.40-alpha.4", "@budibase/client": "2.1.40-alpha.4", - "@budibase/pro": "2.1.40-alpha.3", + "@budibase/pro": "2.1.40-alpha.4", "@budibase/string-templates": "2.1.40-alpha.4", "@budibase/types": "2.1.40-alpha.4", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 209625265c..8aef32a169 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1273,12 +1273,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.40-alpha.3": - version "2.1.40-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.40-alpha.3.tgz#b454a261d502725aa2963a98fe16fb983616b4ce" - integrity sha512-XoevkptJSAt9WAewwWs5isMITJMT9FAg2r6w31T4xh0YdVNQcR2y6ZK88S3lZUMGibPCdqMJuquOQRx/tH1FqQ== +"@budibase/backend-core@2.1.40-alpha.4": + version "2.1.40-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.40-alpha.4.tgz#3eec0f7cc66d058e3a6c513c38afb10cb4eb8363" + integrity sha512-rjtAYnyT0hn8EUUv9QntBkgDbG+qpqwe6dnivoZjTwaJ40lSndSGyL/Tgl5ry/C9RBdIdNzTEsWtWywTsfyNhQ== dependencies: - "@budibase/types" "2.1.40-alpha.3" + "@budibase/types" "2.1.40-alpha.4" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1360,13 +1360,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.1.40-alpha.3": - version "2.1.40-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.40-alpha.3.tgz#8bbf63aedfd35a366b65c23df7f2a96ed89093ae" - integrity sha512-LJKTAsUqWwOeFH9qw1uNSdtStUYIZnHxeJ2uM4mwHHyNaT7ra903w0bpgTtYl18yaeP3Y3io8EV3ylvjbIxwkw== +"@budibase/pro@2.1.40-alpha.4": + version "2.1.40-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.40-alpha.4.tgz#d856e742b0d7b18af8d8dc50008cec269229403f" + integrity sha512-hbcDNVktjXQN8QVnQIugtI4tek33O2tnuxdiLpfqGNoHA6Jfkd0Ofi2JexFkncfSHqHioCiVURIvh/6zCCNy0g== dependencies: - "@budibase/backend-core" "2.1.40-alpha.3" - "@budibase/types" "2.1.40-alpha.3" + "@budibase/backend-core" "2.1.40-alpha.4" + "@budibase/types" "2.1.40-alpha.4" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -1390,10 +1390,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.1.40-alpha.3": - version "2.1.40-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.40-alpha.3.tgz#8424b699be84e78fe1e7a6dccd3eee882c3abfb2" - integrity sha512-Tr1K59RBVAnAKLvj1bhZ6ffRqc9cCjDrEGycMRYoFLlVhtRsm51NF60NpeyhnZgYX5TNZPreu0gvSt9AmjYz0Q== +"@budibase/types@2.1.40-alpha.4": + version "2.1.40-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.40-alpha.4.tgz#dfa732c8a7518a2443b40f3d8f1889cb386fbddf" + integrity sha512-0M24L9Mkgak+XbXJkRvQIiRUuq0qf1g/8XhB3JP6ey9dpbby3aXRODiNhilBiyZkHwxMESMpzkPTV1MbBuTOCw== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 0653dd6e9d..4fbdeab568 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "2.1.40-alpha.4", - "@budibase/pro": "2.1.40-alpha.3", + "@budibase/pro": "2.1.40-alpha.4", "@budibase/string-templates": "2.1.40-alpha.4", "@budibase/types": "2.1.40-alpha.4", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 249ff1d6e4..c1b4fcd16b 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -470,12 +470,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.40-alpha.3": - version "2.1.40-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.40-alpha.3.tgz#b454a261d502725aa2963a98fe16fb983616b4ce" - integrity sha512-XoevkptJSAt9WAewwWs5isMITJMT9FAg2r6w31T4xh0YdVNQcR2y6ZK88S3lZUMGibPCdqMJuquOQRx/tH1FqQ== +"@budibase/backend-core@2.1.40-alpha.4": + version "2.1.40-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.40-alpha.4.tgz#3eec0f7cc66d058e3a6c513c38afb10cb4eb8363" + integrity sha512-rjtAYnyT0hn8EUUv9QntBkgDbG+qpqwe6dnivoZjTwaJ40lSndSGyL/Tgl5ry/C9RBdIdNzTEsWtWywTsfyNhQ== dependencies: - "@budibase/types" "2.1.40-alpha.3" + "@budibase/types" "2.1.40-alpha.4" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -507,22 +507,22 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.1.40-alpha.3": - version "2.1.40-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.40-alpha.3.tgz#8bbf63aedfd35a366b65c23df7f2a96ed89093ae" - integrity sha512-LJKTAsUqWwOeFH9qw1uNSdtStUYIZnHxeJ2uM4mwHHyNaT7ra903w0bpgTtYl18yaeP3Y3io8EV3ylvjbIxwkw== +"@budibase/pro@2.1.40-alpha.4": + version "2.1.40-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.40-alpha.4.tgz#d856e742b0d7b18af8d8dc50008cec269229403f" + integrity sha512-hbcDNVktjXQN8QVnQIugtI4tek33O2tnuxdiLpfqGNoHA6Jfkd0Ofi2JexFkncfSHqHioCiVURIvh/6zCCNy0g== dependencies: - "@budibase/backend-core" "2.1.40-alpha.3" - "@budibase/types" "2.1.40-alpha.3" + "@budibase/backend-core" "2.1.40-alpha.4" + "@budibase/types" "2.1.40-alpha.4" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.1.40-alpha.3": - version "2.1.40-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.40-alpha.3.tgz#8424b699be84e78fe1e7a6dccd3eee882c3abfb2" - integrity sha512-Tr1K59RBVAnAKLvj1bhZ6ffRqc9cCjDrEGycMRYoFLlVhtRsm51NF60NpeyhnZgYX5TNZPreu0gvSt9AmjYz0Q== +"@budibase/types@2.1.40-alpha.4": + version "2.1.40-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.40-alpha.4.tgz#dfa732c8a7518a2443b40f3d8f1889cb386fbddf" + integrity sha512-0M24L9Mkgak+XbXJkRvQIiRUuq0qf1g/8XhB3JP6ey9dpbby3aXRODiNhilBiyZkHwxMESMpzkPTV1MbBuTOCw== "@cspotcode/source-map-support@^0.8.0": version "0.8.1" From b9a56cbf4c9044ef49d6cea53e429e74baacda98 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 30 Nov 2022 09:24:52 +0000 Subject: [PATCH 285/396] v2.1.40-alpha.5 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 8 ++++---- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/sdk/package.json | 2 +- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lerna.json b/lerna.json index bb8f2b26ba..cc3d386d7c 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.1.40-alpha.4", + "version": "2.1.40-alpha.5", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index da716bf753..53813059bb 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.1.40-alpha.4", + "version": "2.1.40-alpha.5", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "2.1.40-alpha.4", + "@budibase/types": "2.1.40-alpha.5", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 448b525326..b473a00094 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "2.1.40-alpha.4", + "version": "2.1.40-alpha.5", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "2.1.40-alpha.4", + "@budibase/string-templates": "2.1.40-alpha.5", "@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 5bb7c8b5b7..3a21e7dc34 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.1.40-alpha.4", + "version": "2.1.40-alpha.5", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.1.40-alpha.4", - "@budibase/client": "2.1.40-alpha.4", - "@budibase/frontend-core": "2.1.40-alpha.4", - "@budibase/string-templates": "2.1.40-alpha.4", + "@budibase/bbui": "2.1.40-alpha.5", + "@budibase/client": "2.1.40-alpha.5", + "@budibase/frontend-core": "2.1.40-alpha.5", + "@budibase/string-templates": "2.1.40-alpha.5", "@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 4555416bf6..3a7c83fee1 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.1.40-alpha.4", + "version": "2.1.40-alpha.5", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "2.1.40-alpha.4", - "@budibase/string-templates": "2.1.40-alpha.4", - "@budibase/types": "2.1.40-alpha.4", + "@budibase/backend-core": "2.1.40-alpha.5", + "@budibase/string-templates": "2.1.40-alpha.5", + "@budibase/types": "2.1.40-alpha.5", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index d897b55fe7..67c01da8ce 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.1.40-alpha.4", + "version": "2.1.40-alpha.5", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "2.1.40-alpha.4", - "@budibase/frontend-core": "2.1.40-alpha.4", - "@budibase/string-templates": "2.1.40-alpha.4", + "@budibase/bbui": "2.1.40-alpha.5", + "@budibase/frontend-core": "2.1.40-alpha.5", + "@budibase/string-templates": "2.1.40-alpha.5", "@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 99e6dc7bc3..14c67102b0 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.1.40-alpha.4", + "version": "2.1.40-alpha.5", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.1.40-alpha.4", + "@budibase/bbui": "2.1.40-alpha.5", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 5d557d3dbd..5542f89e4b 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.1.40-alpha.4", + "version": "2.1.40-alpha.5", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index 4d7ec13d9a..7b8f0f2a93 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.1.40-alpha.4", + "version": "2.1.40-alpha.5", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -43,11 +43,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "2.1.40-alpha.4", - "@budibase/client": "2.1.40-alpha.4", + "@budibase/backend-core": "2.1.40-alpha.5", + "@budibase/client": "2.1.40-alpha.5", "@budibase/pro": "2.1.40-alpha.4", - "@budibase/string-templates": "2.1.40-alpha.4", - "@budibase/types": "2.1.40-alpha.4", + "@budibase/string-templates": "2.1.40-alpha.5", + "@budibase/types": "2.1.40-alpha.5", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 63088298a6..67a30c5651 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.1.40-alpha.4", + "version": "2.1.40-alpha.5", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index f842b0d6d5..7ca67d225a 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.1.40-alpha.4", + "version": "2.1.40-alpha.5", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index 4fbdeab568..c784a12f3e 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.1.40-alpha.4", + "version": "2.1.40-alpha.5", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.1.40-alpha.4", + "@budibase/backend-core": "2.1.40-alpha.5", "@budibase/pro": "2.1.40-alpha.4", - "@budibase/string-templates": "2.1.40-alpha.4", - "@budibase/types": "2.1.40-alpha.4", + "@budibase/string-templates": "2.1.40-alpha.5", + "@budibase/types": "2.1.40-alpha.5", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From d7c6855fa82072a94b37daabe301eccfe11b1a0e Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 30 Nov 2022 09:28:50 +0000 Subject: [PATCH 286/396] Update pro version to 2.1.40-alpha.5 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index 7b8f0f2a93..ac62e3a0e0 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -45,7 +45,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "2.1.40-alpha.5", "@budibase/client": "2.1.40-alpha.5", - "@budibase/pro": "2.1.40-alpha.4", + "@budibase/pro": "2.1.40-alpha.5", "@budibase/string-templates": "2.1.40-alpha.5", "@budibase/types": "2.1.40-alpha.5", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 8aef32a169..c21a7ef278 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1273,12 +1273,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.40-alpha.4": - version "2.1.40-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.40-alpha.4.tgz#3eec0f7cc66d058e3a6c513c38afb10cb4eb8363" - integrity sha512-rjtAYnyT0hn8EUUv9QntBkgDbG+qpqwe6dnivoZjTwaJ40lSndSGyL/Tgl5ry/C9RBdIdNzTEsWtWywTsfyNhQ== +"@budibase/backend-core@2.1.40-alpha.5": + version "2.1.40-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.40-alpha.5.tgz#7f52dfe3c6616c632653801f01cec346356c2bae" + integrity sha512-cmP25VK2QoCldxdmRfxEdPzajhQWJxjaTmweYalyj58ZyJPUN+/lXBGvjJkcpMd+9QQMv1IkO5qUBMkS/lAQlg== dependencies: - "@budibase/types" "2.1.40-alpha.4" + "@budibase/types" "2.1.40-alpha.5" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1360,13 +1360,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.1.40-alpha.4": - version "2.1.40-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.40-alpha.4.tgz#d856e742b0d7b18af8d8dc50008cec269229403f" - integrity sha512-hbcDNVktjXQN8QVnQIugtI4tek33O2tnuxdiLpfqGNoHA6Jfkd0Ofi2JexFkncfSHqHioCiVURIvh/6zCCNy0g== +"@budibase/pro@2.1.40-alpha.5": + version "2.1.40-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.40-alpha.5.tgz#c45894842643718883a6ff1e1cb0cd04dc0e9fbd" + integrity sha512-/kOpcqDm0xSewB4ylvqfjobMdhaVxOxRhC8HZ1s6ZRokW/qs4EhU3VvhkIGSOp276k9rm8Cb0PvsK2B2ATKZKQ== dependencies: - "@budibase/backend-core" "2.1.40-alpha.4" - "@budibase/types" "2.1.40-alpha.4" + "@budibase/backend-core" "2.1.40-alpha.5" + "@budibase/types" "2.1.40-alpha.5" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -1390,10 +1390,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.1.40-alpha.4": - version "2.1.40-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.40-alpha.4.tgz#dfa732c8a7518a2443b40f3d8f1889cb386fbddf" - integrity sha512-0M24L9Mkgak+XbXJkRvQIiRUuq0qf1g/8XhB3JP6ey9dpbby3aXRODiNhilBiyZkHwxMESMpzkPTV1MbBuTOCw== +"@budibase/types@2.1.40-alpha.5": + version "2.1.40-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.40-alpha.5.tgz#3e87ff10de0e2ee672b8bf9138f2a894d846abf8" + integrity sha512-Zqi2CvMT5026afrGUBkSXFZKpaEoUAviQLvHq1JSgh0EBzQp6D5o42yKBaHns1PnS6REt4JHex5p6e3wdXjoFw== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index c784a12f3e..9844e87c55 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "2.1.40-alpha.5", - "@budibase/pro": "2.1.40-alpha.4", + "@budibase/pro": "2.1.40-alpha.5", "@budibase/string-templates": "2.1.40-alpha.5", "@budibase/types": "2.1.40-alpha.5", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index c1b4fcd16b..4db599a979 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -470,12 +470,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.40-alpha.4": - version "2.1.40-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.40-alpha.4.tgz#3eec0f7cc66d058e3a6c513c38afb10cb4eb8363" - integrity sha512-rjtAYnyT0hn8EUUv9QntBkgDbG+qpqwe6dnivoZjTwaJ40lSndSGyL/Tgl5ry/C9RBdIdNzTEsWtWywTsfyNhQ== +"@budibase/backend-core@2.1.40-alpha.5": + version "2.1.40-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.40-alpha.5.tgz#7f52dfe3c6616c632653801f01cec346356c2bae" + integrity sha512-cmP25VK2QoCldxdmRfxEdPzajhQWJxjaTmweYalyj58ZyJPUN+/lXBGvjJkcpMd+9QQMv1IkO5qUBMkS/lAQlg== dependencies: - "@budibase/types" "2.1.40-alpha.4" + "@budibase/types" "2.1.40-alpha.5" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -507,22 +507,22 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.1.40-alpha.4": - version "2.1.40-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.40-alpha.4.tgz#d856e742b0d7b18af8d8dc50008cec269229403f" - integrity sha512-hbcDNVktjXQN8QVnQIugtI4tek33O2tnuxdiLpfqGNoHA6Jfkd0Ofi2JexFkncfSHqHioCiVURIvh/6zCCNy0g== +"@budibase/pro@2.1.40-alpha.5": + version "2.1.40-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.40-alpha.5.tgz#c45894842643718883a6ff1e1cb0cd04dc0e9fbd" + integrity sha512-/kOpcqDm0xSewB4ylvqfjobMdhaVxOxRhC8HZ1s6ZRokW/qs4EhU3VvhkIGSOp276k9rm8Cb0PvsK2B2ATKZKQ== dependencies: - "@budibase/backend-core" "2.1.40-alpha.4" - "@budibase/types" "2.1.40-alpha.4" + "@budibase/backend-core" "2.1.40-alpha.5" + "@budibase/types" "2.1.40-alpha.5" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.1.40-alpha.4": - version "2.1.40-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.40-alpha.4.tgz#dfa732c8a7518a2443b40f3d8f1889cb386fbddf" - integrity sha512-0M24L9Mkgak+XbXJkRvQIiRUuq0qf1g/8XhB3JP6ey9dpbby3aXRODiNhilBiyZkHwxMESMpzkPTV1MbBuTOCw== +"@budibase/types@2.1.40-alpha.5": + version "2.1.40-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.40-alpha.5.tgz#3e87ff10de0e2ee672b8bf9138f2a894d846abf8" + integrity sha512-Zqi2CvMT5026afrGUBkSXFZKpaEoUAviQLvHq1JSgh0EBzQp6D5o42yKBaHns1PnS6REt4JHex5p6e3wdXjoFw== "@cspotcode/source-map-support@^0.8.0": version "0.8.1" From bca9672926731a595cfb2272ecdea8aa22dc6ea5 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 30 Nov 2022 14:18:31 +0000 Subject: [PATCH 287/396] Add ability to show component info above the settings panel and add info to side panels --- .../src/DetailSummary/DetailSummary.svelte | 23 ++++++++---- .../settings/ComponentInfoSection.svelte | 36 +++++++++++++++++++ .../settings/ComponentSettingsPanel.svelte | 4 +++ packages/client/manifest.json | 3 +- 4 files changed, 58 insertions(+), 8 deletions(-) create mode 100644 packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentInfoSection.svelte diff --git a/packages/bbui/src/DetailSummary/DetailSummary.svelte b/packages/bbui/src/DetailSummary/DetailSummary.svelte index 518c615504..f7e2611792 100644 --- a/packages/bbui/src/DetailSummary/DetailSummary.svelte +++ b/packages/bbui/src/DetailSummary/DetailSummary.svelte @@ -19,13 +19,19 @@
-
-
{name}
- {#if collapsible} - - {/if} -
-
+ {#if name} +
+
{name}
+ {#if collapsible} + + {/if} +
+ {/if} +
@@ -72,6 +78,9 @@ padding: var(--spacing-s) var(--spacing-xl) var(--spacing-xl) var(--spacing-xl); } + .property-panel.no-title { + padding: var(--spacing-xl); + } .show { display: flex; diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentInfoSection.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentInfoSection.svelte new file mode 100644 index 0000000000..756a4bb43e --- /dev/null +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentInfoSection.svelte @@ -0,0 +1,36 @@ + + + +
+
+ + {componentDefinition.name} +
+ {componentDefinition.info} +
+
+ + \ No newline at end of file diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsPanel.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsPanel.svelte index 688d7c5db9..c301bfdc20 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsPanel.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsPanel.svelte @@ -5,6 +5,7 @@ import DesignSection from "./DesignSection.svelte" import CustomStylesSection from "./CustomStylesSection.svelte" import ConditionalUISection from "./ConditionalUISection.svelte" + import ComponentInfoSection from "./ComponentInfoSection.svelte" import { getBindableProperties, getComponentBindableProperties, @@ -29,6 +30,9 @@ {#if $selectedComponent} {#key $selectedComponent._id} + {#if componentDefinition.info} + + {/if}
From 216539a454477b7b88564e8338243e166f25228e Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Thu, 1 Dec 2022 10:34:03 +0000 Subject: [PATCH 294/396] Adjust z index --- packages/builder/src/components/integration/QueryViewer.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/builder/src/components/integration/QueryViewer.svelte b/packages/builder/src/components/integration/QueryViewer.svelte index e70cf8330e..6a49ffa634 100644 --- a/packages/builder/src/components/integration/QueryViewer.svelte +++ b/packages/builder/src/components/integration/QueryViewer.svelte @@ -223,6 +223,7 @@ .config { display: grid; grid-gap: var(--spacing-s); + z-index: 1; } .config-field { From 54f0112d683f919d388f34156886a1548c1a50c1 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Thu, 1 Dec 2022 10:37:58 +0000 Subject: [PATCH 295/396] Remove console log --- .../builder/src/components/common/bindings/BindingPanel.svelte | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/builder/src/components/common/bindings/BindingPanel.svelte b/packages/builder/src/components/common/bindings/BindingPanel.svelte index 7ba1c44853..83fc19f388 100644 --- a/packages/builder/src/components/common/bindings/BindingPanel.svelte +++ b/packages/builder/src/components/common/bindings/BindingPanel.svelte @@ -55,7 +55,6 @@ let popoverAnchor let hoverTarget - $: console.log("HELPERS ", allowHelpers) $: usingJS = mode === "JavaScript" $: searchRgx = new RegExp(search, "ig") $: categories = Object.entries(groupBy("category", bindings)) From 828084dc76b97f63214c8e8f08359cd11d5378b2 Mon Sep 17 00:00:00 2001 From: Gerard Burns Date: Thu, 1 Dec 2022 11:29:45 +0000 Subject: [PATCH 296/396] Text Overflowing Notifications (#8859) --- packages/bbui/src/Notification/Notification.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/bbui/src/Notification/Notification.svelte b/packages/bbui/src/Notification/Notification.svelte index 53ab062701..eb2922a5de 100644 --- a/packages/bbui/src/Notification/Notification.svelte +++ b/packages/bbui/src/Notification/Notification.svelte @@ -25,7 +25,7 @@ {/if}
-
{message || ""}
+
{message || ""}
{#if action}
{actionMessage}
@@ -53,6 +53,10 @@
From e87ed9aaf72c4b5d65d1cf7a313403f0617156ca Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Fri, 2 Dec 2022 13:40:48 +0000 Subject: [PATCH 318/396] v2.1.43-alpha.1 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 8 ++++---- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/sdk/package.json | 2 +- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lerna.json b/lerna.json index 539c4cf6a8..12363a27f6 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.1.43-alpha.0", + "version": "2.1.43-alpha.1", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 1061e700dc..bdd96a5c8a 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.1.43-alpha.0", + "version": "2.1.43-alpha.1", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "2.1.43-alpha.0", + "@budibase/types": "2.1.43-alpha.1", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 4201cc6fa4..725fd62b7c 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "2.1.43-alpha.0", + "version": "2.1.43-alpha.1", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "2.1.43-alpha.0", + "@budibase/string-templates": "2.1.43-alpha.1", "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/avatar": "^3.0.2", diff --git a/packages/builder/package.json b/packages/builder/package.json index dc9054bf39..5e9e739c83 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.1.43-alpha.0", + "version": "2.1.43-alpha.1", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.1.43-alpha.0", - "@budibase/client": "2.1.43-alpha.0", - "@budibase/frontend-core": "2.1.43-alpha.0", - "@budibase/string-templates": "2.1.43-alpha.0", + "@budibase/bbui": "2.1.43-alpha.1", + "@budibase/client": "2.1.43-alpha.1", + "@budibase/frontend-core": "2.1.43-alpha.1", + "@budibase/string-templates": "2.1.43-alpha.1", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index 812d27e5e1..f1d27b9470 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.1.43-alpha.0", + "version": "2.1.43-alpha.1", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "2.1.43-alpha.0", - "@budibase/string-templates": "2.1.43-alpha.0", - "@budibase/types": "2.1.43-alpha.0", + "@budibase/backend-core": "2.1.43-alpha.1", + "@budibase/string-templates": "2.1.43-alpha.1", + "@budibase/types": "2.1.43-alpha.1", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index bd9ea5f189..edb2c03fce 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.1.43-alpha.0", + "version": "2.1.43-alpha.1", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "2.1.43-alpha.0", - "@budibase/frontend-core": "2.1.43-alpha.0", - "@budibase/string-templates": "2.1.43-alpha.0", + "@budibase/bbui": "2.1.43-alpha.1", + "@budibase/frontend-core": "2.1.43-alpha.1", + "@budibase/string-templates": "2.1.43-alpha.1", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index df397432b9..7c86825285 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.1.43-alpha.0", + "version": "2.1.43-alpha.1", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.1.43-alpha.0", + "@budibase/bbui": "2.1.43-alpha.1", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 84024c61c4..b489dbbdb5 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.1.43-alpha.0", + "version": "2.1.43-alpha.1", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index cf6678aea4..a6088762ea 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.1.43-alpha.0", + "version": "2.1.43-alpha.1", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -43,11 +43,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "2.1.43-alpha.0", - "@budibase/client": "2.1.43-alpha.0", + "@budibase/backend-core": "2.1.43-alpha.1", + "@budibase/client": "2.1.43-alpha.1", "@budibase/pro": "2.1.43-alpha.0", - "@budibase/string-templates": "2.1.43-alpha.0", - "@budibase/types": "2.1.43-alpha.0", + "@budibase/string-templates": "2.1.43-alpha.1", + "@budibase/types": "2.1.43-alpha.1", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 47b8bb6051..05bb23737a 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.1.43-alpha.0", + "version": "2.1.43-alpha.1", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index 6aa5625f14..aa46092c34 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.1.43-alpha.0", + "version": "2.1.43-alpha.1", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index 135137750c..72120cb37f 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.1.43-alpha.0", + "version": "2.1.43-alpha.1", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.1.43-alpha.0", + "@budibase/backend-core": "2.1.43-alpha.1", "@budibase/pro": "2.1.43-alpha.0", - "@budibase/string-templates": "2.1.43-alpha.0", - "@budibase/types": "2.1.43-alpha.0", + "@budibase/string-templates": "2.1.43-alpha.1", + "@budibase/types": "2.1.43-alpha.1", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From a9d0f983d2b9a8217cf9748976c2132ece4ed588 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Fri, 2 Dec 2022 13:44:27 +0000 Subject: [PATCH 319/396] Update pro version to 2.1.43-alpha.1 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index a6088762ea..3ec85339d0 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -45,7 +45,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "2.1.43-alpha.1", "@budibase/client": "2.1.43-alpha.1", - "@budibase/pro": "2.1.43-alpha.0", + "@budibase/pro": "2.1.43-alpha.1", "@budibase/string-templates": "2.1.43-alpha.1", "@budibase/types": "2.1.43-alpha.1", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index e906428da8..ecb2709f92 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1273,12 +1273,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.43-alpha.0": - version "2.1.43-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.0.tgz#0a983bcab9006e41dc59ea63f50d41cf445543c6" - integrity sha512-d6hZiDdhzR/wWSJndhGyg4idWDLjgietdK2aK52NThC/wxPiNvo1cYMnFM0Aa0BMoHSmEQDH0L804T8fe9JO5Q== +"@budibase/backend-core@2.1.43-alpha.1": + version "2.1.43-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.1.tgz#15a0d0b9bbf233e3ad824f7b63adff63c7ea3b20" + integrity sha512-3Ir7GZvpZ53K9PiWqtfZxcxlUT4RPXe6TyTbQyzR8e+FF23mh07+F+zKZuoZMzLdu+IYC1sez6L9sjKcVoF50Q== dependencies: - "@budibase/types" "2.1.43-alpha.0" + "@budibase/types" "2.1.43-alpha.1" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1360,13 +1360,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.1.43-alpha.0": - version "2.1.43-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.0.tgz#f003a0c618af1e7cc7016413217b9450250027d0" - integrity sha512-s1HOj9B2ika8ba50fRc2CHv5hTbqW1n1r1WWQ61tNjJ4G8ixBu+SkLuw6lxfTCe8i2RX1sLDCJ/nRDQmGbIJwQ== +"@budibase/pro@2.1.43-alpha.1": + version "2.1.43-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.1.tgz#c2d6056624d312193c4dafcf706d5755d9afe73d" + integrity sha512-EtyY0+Fcs5tJwVo/NLcsrB1hsDw313aUQg/nOZb4yd00SfwejD1INzY7Cnb+nabB3qBG6GEkmvDhVT7KQbPGgw== dependencies: - "@budibase/backend-core" "2.1.43-alpha.0" - "@budibase/types" "2.1.43-alpha.0" + "@budibase/backend-core" "2.1.43-alpha.1" + "@budibase/types" "2.1.43-alpha.1" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -1390,10 +1390,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.1.43-alpha.0": - version "2.1.43-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.0.tgz#027f9c591b1cbc1edadabbfb3b2c3287706b0848" - integrity sha512-EeiAM2KkrI4n2aeVHJlnsX8HsAgcLGvuSezLlfG4asjdW6W/oLhVbjnEIhf4ptotdM4dsYTX4hkmVKZA3/N4CA== +"@budibase/types@2.1.43-alpha.1": + version "2.1.43-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.1.tgz#22d0d47d072afd6b2756ff525216e1a7837e1a2e" + integrity sha512-FXLcZkcn1XxHPznr0ilRQDFthKJZFEJVqy5T96/n/dg6+v6N/i/hOMpelBNjB9MSMeFecucho/l038HSKLmpnw== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 72120cb37f..f1608e2e53 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "2.1.43-alpha.1", - "@budibase/pro": "2.1.43-alpha.0", + "@budibase/pro": "2.1.43-alpha.1", "@budibase/string-templates": "2.1.43-alpha.1", "@budibase/types": "2.1.43-alpha.1", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index d7d54c8f72..8881c49217 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -470,12 +470,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.43-alpha.0": - version "2.1.43-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.0.tgz#0a983bcab9006e41dc59ea63f50d41cf445543c6" - integrity sha512-d6hZiDdhzR/wWSJndhGyg4idWDLjgietdK2aK52NThC/wxPiNvo1cYMnFM0Aa0BMoHSmEQDH0L804T8fe9JO5Q== +"@budibase/backend-core@2.1.43-alpha.1": + version "2.1.43-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.1.tgz#15a0d0b9bbf233e3ad824f7b63adff63c7ea3b20" + integrity sha512-3Ir7GZvpZ53K9PiWqtfZxcxlUT4RPXe6TyTbQyzR8e+FF23mh07+F+zKZuoZMzLdu+IYC1sez6L9sjKcVoF50Q== dependencies: - "@budibase/types" "2.1.43-alpha.0" + "@budibase/types" "2.1.43-alpha.1" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -507,22 +507,22 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.1.43-alpha.0": - version "2.1.43-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.0.tgz#f003a0c618af1e7cc7016413217b9450250027d0" - integrity sha512-s1HOj9B2ika8ba50fRc2CHv5hTbqW1n1r1WWQ61tNjJ4G8ixBu+SkLuw6lxfTCe8i2RX1sLDCJ/nRDQmGbIJwQ== +"@budibase/pro@2.1.43-alpha.1": + version "2.1.43-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.1.tgz#c2d6056624d312193c4dafcf706d5755d9afe73d" + integrity sha512-EtyY0+Fcs5tJwVo/NLcsrB1hsDw313aUQg/nOZb4yd00SfwejD1INzY7Cnb+nabB3qBG6GEkmvDhVT7KQbPGgw== dependencies: - "@budibase/backend-core" "2.1.43-alpha.0" - "@budibase/types" "2.1.43-alpha.0" + "@budibase/backend-core" "2.1.43-alpha.1" + "@budibase/types" "2.1.43-alpha.1" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.1.43-alpha.0": - version "2.1.43-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.0.tgz#027f9c591b1cbc1edadabbfb3b2c3287706b0848" - integrity sha512-EeiAM2KkrI4n2aeVHJlnsX8HsAgcLGvuSezLlfG4asjdW6W/oLhVbjnEIhf4ptotdM4dsYTX4hkmVKZA3/N4CA== +"@budibase/types@2.1.43-alpha.1": + version "2.1.43-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.1.tgz#22d0d47d072afd6b2756ff525216e1a7837e1a2e" + integrity sha512-FXLcZkcn1XxHPznr0ilRQDFthKJZFEJVqy5T96/n/dg6+v6N/i/hOMpelBNjB9MSMeFecucho/l038HSKLmpnw== "@cspotcode/source-map-support@^0.8.0": version "0.8.1" From e4306d347b65e68c5fe24504274f6924d22ca454 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 Dec 2022 13:46:12 +0000 Subject: [PATCH 320/396] Bump decode-uri-component from 0.2.0 to 0.2.2 in /packages/server Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2. - [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases) - [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2) --- updated-dependencies: - dependency-name: decode-uri-component dependency-type: indirect ... Signed-off-by: dependabot[bot] --- packages/server/yarn.lock | 593 +++++++++++++++++++++++++++++++++++++- 1 file changed, 582 insertions(+), 11 deletions(-) diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index ecb2709f92..86b14b6d8d 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1310,6 +1310,59 @@ uuid "8.3.2" zlib "1.0.5" +"@budibase/bbui@2.1.43-alpha.1": + version "2.1.43-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-2.1.43-alpha.1.tgz#9b3239b3389dc96e11d567d705b9ae7d4efd11ca" + integrity sha512-ruEL2EtaScvwCfNfR9vdLz/wSonAByIbesWxzbldy3WXyjADiPr+gZrIXXVL4xE84/ZPJJKqBw4sAIQLfhg07g== + dependencies: + "@adobe/spectrum-css-workflow-icons" "^1.2.1" + "@budibase/string-templates" "2.1.43-alpha.1" + "@spectrum-css/actionbutton" "^1.0.1" + "@spectrum-css/actiongroup" "^1.0.1" + "@spectrum-css/avatar" "^3.0.2" + "@spectrum-css/button" "^3.0.1" + "@spectrum-css/buttongroup" "^3.0.2" + "@spectrum-css/checkbox" "^3.0.2" + "@spectrum-css/dialog" "^3.0.1" + "@spectrum-css/divider" "^1.0.3" + "@spectrum-css/dropzone" "^3.0.2" + "@spectrum-css/fieldgroup" "^3.0.2" + "@spectrum-css/fieldlabel" "^3.0.1" + "@spectrum-css/icon" "^3.0.1" + "@spectrum-css/illustratedmessage" "^3.0.2" + "@spectrum-css/inlinealert" "^2.0.1" + "@spectrum-css/inputgroup" "^3.0.2" + "@spectrum-css/label" "^2.0.10" + "@spectrum-css/link" "^3.1.1" + "@spectrum-css/menu" "^3.0.1" + "@spectrum-css/modal" "^3.0.1" + "@spectrum-css/pagination" "^3.0.3" + "@spectrum-css/picker" "^1.0.1" + "@spectrum-css/popover" "^3.0.1" + "@spectrum-css/progressbar" "^1.0.2" + "@spectrum-css/progresscircle" "^1.0.2" + "@spectrum-css/radio" "^3.0.2" + "@spectrum-css/search" "^3.0.2" + "@spectrum-css/sidenav" "^3.0.2" + "@spectrum-css/slider" "3.0.1" + "@spectrum-css/statuslight" "^3.0.2" + "@spectrum-css/stepper" "^3.0.3" + "@spectrum-css/switch" "^1.0.2" + "@spectrum-css/table" "^3.0.1" + "@spectrum-css/tabs" "^3.2.12" + "@spectrum-css/tags" "^3.0.2" + "@spectrum-css/textfield" "^3.0.1" + "@spectrum-css/toast" "^3.0.1" + "@spectrum-css/tooltip" "^3.0.3" + "@spectrum-css/treeview" "^3.0.2" + "@spectrum-css/typography" "^3.0.1" + "@spectrum-css/underlay" "^2.0.9" + "@spectrum-css/vars" "^3.0.1" + dayjs "^1.10.4" + easymde "^2.16.1" + svelte-flatpickr "^3.2.3" + svelte-portal "^1.0.0" + "@budibase/bbui@^0.9.139": version "0.9.190" resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-0.9.190.tgz#e1ec400ac90f556bfbc80fc23a04506f1585ea81" @@ -1360,6 +1413,71 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" +"@budibase/client@2.1.43-alpha.1": + version "2.1.43-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/client/-/client-2.1.43-alpha.1.tgz#99a71036e44614a83e1fc2751e4ca5571d4c7b1f" + integrity sha512-bCjRFGwsUFnic288KZfb+Q6mKIXZDOUIlnLBrZv9fisSgHx4WWC2YYPwbq/srpRiBq+FR5nxdo0w5wZwi2v1eA== + dependencies: + "@budibase/bbui" "2.1.43-alpha.1" + "@budibase/frontend-core" "2.1.43-alpha.1" + "@budibase/string-templates" "2.1.43-alpha.1" + "@spectrum-css/button" "^3.0.3" + "@spectrum-css/card" "^3.0.3" + "@spectrum-css/divider" "^1.0.3" + "@spectrum-css/link" "^3.1.3" + "@spectrum-css/page" "^3.0.1" + "@spectrum-css/tag" "^3.1.4" + "@spectrum-css/typography" "^3.0.2" + "@spectrum-css/vars" "^3.0.1" + apexcharts "^3.22.1" + dayjs "^1.10.5" + downloadjs "1.4.7" + html5-qrcode "^2.2.1" + leaflet "^1.7.1" + regexparam "^1.3.0" + sanitize-html "^2.7.0" + screenfull "^6.0.1" + shortid "^2.2.15" + socket.io-client "^4.5.1" + svelte "^3.49.0" + svelte-apexcharts "^1.0.2" + svelte-flatpickr "^3.1.0" + svelte-spa-router "^3.0.5" + +"@budibase/frontend-core@2.1.43-alpha.1": + version "2.1.43-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/frontend-core/-/frontend-core-2.1.43-alpha.1.tgz#a68d41d4df0f931ae4e58f617bc1dd3b2e70e4c3" + integrity sha512-nrODSEX1iszoyLXeKEMIAu3+RLuuNuI8lGIzHtP/PaAaufY7xsPsUcmBrnVLGgt+cUVHk9zcEHYNyL75OwsR3A== + dependencies: + "@budibase/bbui" "2.1.43-alpha.1" + lodash "^4.17.21" + svelte "^3.46.2" + +"@budibase/handlebars-helpers@^0.11.8": + version "0.11.8" + resolved "https://registry.yarnpkg.com/@budibase/handlebars-helpers/-/handlebars-helpers-0.11.8.tgz#6953d29673a8c5c407e096c0a84890465c7ce841" + integrity sha512-ggWJUt0GqsHFAEup5tlWlcrmYML57nKhpNGGLzVsqXVYN8eVmf3xluYmmMe7fDYhQH0leSprrdEXmsdFQF3HAQ== + dependencies: + array-sort "^1.0.0" + define-property "^2.0.2" + extend-shallow "^3.0.2" + for-in "^1.0.2" + get-object "^0.2.0" + get-value "^3.0.1" + handlebars "^4.7.7" + handlebars-utils "^1.0.6" + has-value "^2.0.2" + helper-md "^0.2.2" + html-tag "^2.0.0" + is-even "^1.0.0" + is-glob "^4.0.1" + kind-of "^6.0.3" + micromatch "^3.1.5" + relative "^3.0.2" + striptags "^3.1.1" + to-gfm-code-block "^0.1.1" + year "^0.2.1" + "@budibase/pro@2.1.43-alpha.1": version "2.1.43-alpha.1" resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.1.tgz#c2d6056624d312193c4dafcf706d5755d9afe73d" @@ -1390,6 +1508,18 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" +"@budibase/string-templates@2.1.43-alpha.1": + version "2.1.43-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/string-templates/-/string-templates-2.1.43-alpha.1.tgz#71ae3425375ad570c18dcaa522f0441816cee19f" + integrity sha512-DFOrf2FpysX16at3rI9Tnf/x6l0Rr6XF9IhOifssi23EaqmbhX/qydVc+1+kNLdFOIhI1wCBcCxecRBgKzSwrw== + dependencies: + "@budibase/handlebars-helpers" "^0.11.8" + dayjs "^1.10.4" + handlebars "^4.7.6" + handlebars-utils "^1.0.6" + lodash "^4.17.20" + vm2 "^3.9.4" + "@budibase/types@2.1.43-alpha.1": version "2.1.43-alpha.1" resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.1.tgz#22d0d47d072afd6b2756ff525216e1a7837e1a2e" @@ -2744,6 +2874,11 @@ resolved "https://registry.yarnpkg.com/@spectrum-css/sidenav/-/sidenav-3.0.23.tgz#c218560d472e13a3e0d1499b762df1206dcffbfd" integrity sha512-4IFw2/HMQJRzM0M2c5na/HeY7y5vJoGpMFBkXNpQyhW4TRo7N1rGwYQ5dRD3s4OVEWV4/rjfGV0d/qhfwKUTog== +"@spectrum-css/slider@3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@spectrum-css/slider/-/slider-3.0.1.tgz#5281e6f47eb5a4fd3d1816c138bf66d01d7f2e49" + integrity sha512-DI2dtMRnQuDM1miVzl3SGyR1khUEKnwdXfO5EHDFwkC3yav43F5QogkfjmjFmWWobMVovdJlAuiaaJ/IHejD0Q== + "@spectrum-css/statuslight@^3.0.2": version "3.0.8" resolved "https://registry.yarnpkg.com/@spectrum-css/statuslight/-/statuslight-3.0.8.tgz#3b0ea80712573679870a85d469850230e794a0f7" @@ -2769,6 +2904,16 @@ resolved "https://registry.yarnpkg.com/@spectrum-css/tabs/-/tabs-3.2.16.tgz#c3f7800d8d6f7c9930c28cd01354816328bf72b1" integrity sha512-JUcMB/fiDG/KoyrVstlUMacFJUY4OHKqhMRuPtu9ggUXWCRbSkY8he92v6u0HwY3DuhDoOxNTK8d/PLjk/fsbg== +"@spectrum-css/tabs@^3.2.12": + version "3.2.21" + resolved "https://registry.yarnpkg.com/@spectrum-css/tabs/-/tabs-3.2.21.tgz#a8888b83d6b74ba05a00cacdb27a1e8bf4639071" + integrity sha512-25WGV1Sih7dW69/RvB1Ts6xVDJDhVEyYZzIGAll0PDST1GjBMHuGblqN/fZpDy/r/rop3GoHIsumtIMvOBdJKw== + +"@spectrum-css/tag@^3.1.4": + version "3.3.15" + resolved "https://registry.yarnpkg.com/@spectrum-css/tag/-/tag-3.3.15.tgz#971184fd8cb977b85a529f808313851863123278" + integrity sha512-pF6Wh61Z7hmAy20twIlpjdDuivYj6UPtWIzK7giyJKr/qcn20BjVN2ChIeFB1N+vBamJdLsuQOewv4AJ3+LZ2Q== + "@spectrum-css/tags@^3.0.2": version "3.0.3" resolved "https://registry.yarnpkg.com/@spectrum-css/tags/-/tags-3.0.3.tgz#fc76d2735cdc442de91b7eb3bee49a928c0767ac" @@ -2933,6 +3078,13 @@ resolved "https://registry.yarnpkg.com/@types/caseless/-/caseless-0.12.2.tgz#f65d3d6389e01eeb458bd54dc8f52b95a9463bc8" integrity sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w== +"@types/codemirror@^5.60.4": + version "5.60.5" + resolved "https://registry.yarnpkg.com/@types/codemirror/-/codemirror-5.60.5.tgz#5b989a3b4bbe657458cf372c92b6bfda6061a2b7" + integrity sha512-TiECZmm8St5YxjFUp64LK0c8WU5bxMDt9YaAek1UqUb9swrSCoJhh92fWu1p3mTEqlHjhB5sY7OFBhWroJXZVg== + dependencies: + "@types/tern" "*" + "@types/connect@*": version "3.4.35" resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.35.tgz#5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1" @@ -3141,6 +3293,11 @@ resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.2.tgz#b74129719fc8d11c01868010082d483b7545591a" integrity sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA== +"@types/marked@^4.0.7": + version "4.0.7" + resolved "https://registry.yarnpkg.com/@types/marked/-/marked-4.0.7.tgz#400a76809fd08c2bbd9e25f3be06ea38c8e0a1d3" + integrity sha512-eEAhnz21CwvKVW+YvRvcTuFKNU9CV1qH+opcgVK3pIMI6YZzDm6gc8o2vHjldFk6MGKt5pueSB7IOpvpx5Qekw== + "@types/mime@^1": version "1.3.2" resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" @@ -3417,6 +3574,13 @@ "@types/cookiejar" "*" "@types/node" "*" +"@types/tern@*": + version "0.23.4" + resolved "https://registry.yarnpkg.com/@types/tern/-/tern-0.23.4.tgz#03926eb13dbeaf3ae0d390caf706b2643a0127fb" + integrity sha512-JAUw1iXGO1qaWwEOzxTKJZ/5JxVeON9kvGZ/osgZaJImBnyjyn0cjovPsf6FNLmyGY8Vw9DoXZCMlfMkMwHRWg== + dependencies: + "@types/estree" "*" + "@types/tough-cookie@*", "@types/tough-cookie@^4.0.2": version "4.0.2" resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.2.tgz#6286b4c7228d58ab7866d19716f3696e03a09397" @@ -4022,7 +4186,7 @@ arg@^4.1.0: resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== -argparse@^1.0.7: +argparse@^1.0.10, argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== @@ -4069,6 +4233,15 @@ array-equal@^1.0.0: resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" integrity sha512-H3LU5RLiSsGXPhN+Nipar0iR0IofH+8r89G2y1tBKxQ/agagKyAjhkAFDRBfodP2caPrNKHpAWNIM/c9yeL7uA== +array-sort@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-sort/-/array-sort-1.0.0.tgz#e4c05356453f56f53512a7d1d6123f2c54c0a88a" + integrity sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg== + dependencies: + default-compare "^1.0.0" + get-value "^2.0.6" + kind-of "^5.0.2" + array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" @@ -4212,6 +4385,13 @@ atomic-sleep@^1.0.0: resolved "https://registry.yarnpkg.com/atomic-sleep/-/atomic-sleep-1.0.0.tgz#eb85b77a601fc932cfe432c5acd364a9e2c9075b" integrity sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ== +autolinker@~0.28.0: + version "0.28.1" + resolved "https://registry.yarnpkg.com/autolinker/-/autolinker-0.28.1.tgz#0652b491881879f0775dace0cdca3233942a4e47" + integrity sha512-zQAFO1Dlsn69eXaO6+7YZc+v84aquQKbwpzCE3L0stj56ERn9hutFxPopViLjo9G+rWwjozRhgS5KJ25Xy19cQ== + dependencies: + gulp-header "^1.7.1" + available-typed-arrays@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" @@ -5125,6 +5305,18 @@ co@^4.6.0: resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== +codemirror-spell-checker@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/codemirror-spell-checker/-/codemirror-spell-checker-1.1.2.tgz#1c660f9089483ccb5113b9ba9ca19c3f4993371e" + integrity sha512-2Tl6n0v+GJRsC9K3MLCdLaMOmvWL0uukajNJseorZJsslaxZyZMgENocPU8R0DyoTAiKsyqiemSOZo7kjGV0LQ== + dependencies: + typo-js "*" + +codemirror@^5.63.1: + version "5.65.10" + resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.65.10.tgz#4276a93b8534ce91f14b733ba9a1ac949666eac9" + integrity sha512-IXAG5wlhbgcTJ6rZZcmi4+sjWIbJqIGfeg3tNa3yX84Jb3T4huS5qzQAo/cUisc1l3bI47WZodpyf7cYcocDKg== + collect-v8-coverage@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59" @@ -5275,6 +5467,13 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== +concat-with-sourcemaps@*: + version "1.1.0" + resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz#d4ea93f05ae25790951b99e7b3b09e3908a4082e" + integrity sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg== + dependencies: + source-map "^0.6.1" + condense-newlines@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/condense-newlines/-/condense-newlines-0.2.1.tgz#3de985553139475d32502c83b02f60684d24c55f" @@ -5573,9 +5772,9 @@ decamelize@^1.2.0: integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - integrity sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og== + version "0.2.2" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" + integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== decompress-response@^3.3.0: version "3.3.0" @@ -5662,6 +5861,13 @@ deepmerge@^4.2.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== +default-compare@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/default-compare/-/default-compare-1.0.0.tgz#cb61131844ad84d84788fb68fd01681ca7781a2f" + integrity sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ== + dependencies: + kind-of "^5.0.2" + default-shell@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/default-shell/-/default-shell-1.0.1.tgz#752304bddc6174f49eb29cb988feea0b8813c8bc" @@ -5839,11 +6045,25 @@ doctrine@3.0.0, doctrine@^3.0.0: dependencies: esutils "^2.0.2" +dom-serializer@^1.0.1: + 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" + 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.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" resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" @@ -5851,6 +6071,22 @@ domexception@^1.0.1: dependencies: webidl-conversions "^4.0.2" +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" @@ -5895,6 +6131,11 @@ download@8.0.0: p-event "^2.1.0" pify "^4.0.1" +downloadjs@1.4.7: + version "1.4.7" + resolved "https://registry.yarnpkg.com/downloadjs/-/downloadjs-1.4.7.tgz#f69f96f940e0d0553dac291139865a3cd0101e3c" + integrity sha512-LN1gO7+u9xjU5oEScGFKvXhYf7Y/empUIIEAGBs1LzUq/rg5duiDrkuH5A2lQGd5jfMOb9X9usDa2oVXwJ0U/Q== + duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" @@ -5910,6 +6151,17 @@ duplexify@^4.0.0: readable-stream "^3.1.1" stream-shift "^1.0.0" +easymde@^2.16.1: + version "2.18.0" + resolved "https://registry.yarnpkg.com/easymde/-/easymde-2.18.0.tgz#ff1397d07329b1a7b9187d2d0c20766fa16b3b1b" + integrity sha512-IxVVUxNWIoXLeqtBU4BLc+eS/ScYhT1Dcb6yF5Wchoj1iXAV+TIIDWx+NCaZhY7RcSHqDPKllbYq7nwGKILnoA== + dependencies: + "@types/codemirror" "^5.60.4" + "@types/marked" "^4.0.7" + codemirror "^5.63.1" + codemirror-spell-checker "1.1.2" + marked "^4.1.0" + ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" @@ -6072,6 +6324,17 @@ end-stream@~0.1.0: dependencies: write-stream "~0.4.3" +engine.io-client@~6.2.3: + version "6.2.3" + resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-6.2.3.tgz#a8cbdab003162529db85e9de31575097f6d29458" + integrity sha512-aXPtgF1JS3RuuKcpSrBtimSjYvrbhKW9froICH4s0F3XQWLxsKNxqzG39nnvQZQnva4CMvUK63T7shevxRyYHw== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.1" + engine.io-parser "~5.0.3" + ws "~8.2.3" + xmlhttprequest-ssl "~2.0.0" + engine.io-parser@~5.0.3: version "5.0.4" resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.0.4.tgz#0b13f704fa9271b3ec4f33112410d8f3f41d0fc0" @@ -6101,6 +6364,16 @@ enhanced-resolve@^5.9.3: graceful-fs "^4.2.4" tapable "^2.2.0" +ent@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" + integrity sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA== + +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" @@ -7106,6 +7379,11 @@ fs-constants@^1.0.0: resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== +fs-exists-sync@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" + integrity sha512-cR/vflFyPZtrN6b38ZyWxpWdhlXrzZEBawlpBQMq7033xVY7/kg0GDMBK5jg8lDYQckdJ5x/YC88lM3C7VMsLg== + fs-extra@8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" @@ -7254,6 +7532,14 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: has "^1.0.3" has-symbols "^1.0.3" +get-object@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/get-object/-/get-object-0.2.0.tgz#d92ff7d5190c64530cda0543dac63a3d47fe8c0c" + integrity sha512-7P6y6k6EzEFmO/XyUyFlXm1YLJy9xeA1x/grNV8276abX5GuwUtYgKFkRFkLixw4hf4Pz9q2vgv/8Ar42R0HuQ== + dependencies: + is-number "^2.0.2" + isobject "^0.2.0" + get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" @@ -7316,6 +7602,13 @@ get-value@^2.0.3, get-value@^2.0.6: resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" integrity sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA== +get-value@^3.0.0, get-value@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-3.0.1.tgz#5efd2a157f1d6a516d7524e124ac52d0a39ef5a8" + integrity sha512-mKZj9JLQrwMBtj5wxi6MH8Z5eSKaERpAwjg43dPtlGI1ZVEgH/qC7T8/6R2OBSUA+zzHBZgICsVJaEIV2tKTDA== + dependencies: + isobject "^3.0.1" + getopts@2.2.5: version "2.2.5" resolved "https://registry.yarnpkg.com/getopts/-/getopts-2.2.5.tgz#67a0fe471cacb9c687d817cab6450b96dde8313b" @@ -7585,7 +7878,24 @@ gtoken@^5.0.4: google-p12-pem "^3.1.3" jws "^4.0.0" -handlebars@^4.7.7: +gulp-header@^1.7.1: + version "1.8.12" + resolved "https://registry.yarnpkg.com/gulp-header/-/gulp-header-1.8.12.tgz#ad306be0066599127281c4f8786660e705080a84" + integrity sha512-lh9HLdb53sC7XIZOYzTXM4lFuXElv3EVkSDhsd7DoJBj7hm+Ni7D3qYbb+Rr8DuM8nRanBvkVO9d7askreXGnQ== + dependencies: + concat-with-sourcemaps "*" + lodash.template "^4.4.0" + through2 "^2.0.0" + +handlebars-utils@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/handlebars-utils/-/handlebars-utils-1.0.6.tgz#cb9db43362479054782d86ffe10f47abc76357f9" + integrity sha512-d5mmoQXdeEqSKMtQQZ9WkiUcO1E3tPbWxluCK9hVgIDPzQa9WsKo3Lbe/sGflTe7TomHEeZaOgwIkyIr1kfzkw== + dependencies: + kind-of "^6.0.0" + typeof-article "^0.1.1" + +handlebars@^4.7.6, handlebars@^4.7.7: version "4.7.7" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== @@ -7679,6 +7989,14 @@ has-value@^1.0.0: has-values "^1.0.0" isobject "^3.0.0" +has-value@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-2.0.2.tgz#d0f12e8780ba8e90e66ad1a21c707fdb67c25658" + integrity sha512-ybKOlcRsK2MqrM3Hmz/lQxXHZ6ejzSPzpNabKB45jb5qDgJvKPa3SdapTsTLwEb9WltgWpOmNax7i+DzNOk4TA== + dependencies: + get-value "^3.0.0" + has-values "^2.0.1" + has-values@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" @@ -7692,6 +8010,13 @@ has-values@^1.0.0: is-number "^3.0.0" kind-of "^4.0.0" +has-values@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-2.0.1.tgz#3876200ff86d8a8546a9264a952c17d5fc17579d" + integrity sha512-+QdH3jOmq9P8GfdjFg0eJudqx1FqU62NQJ4P16rOEHeRdl7ckgwn6uqQjzYE0ZoHVV/e5E2esuJ5Gl5+HUW19w== + dependencies: + kind-of "^6.0.2" + has-yarn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-2.1.0.tgz#137e11354a7b5bf11aa5cb649cf0c6f3ff2b2e77" @@ -7704,6 +8029,16 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" +helper-md@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/helper-md/-/helper-md-0.2.2.tgz#c1f59d7e55bbae23362fd8a0e971607aec69d41f" + integrity sha512-49TaQzK+Ic7ZVTq4i1UZxRUJEmAilTk8hz7q4I0WNUaTclLR8ArJV5B3A1fe1xF2HtsDTr2gYKLaVTof/Lt84Q== + dependencies: + ent "^2.2.0" + extend-shallow "^2.0.1" + fs-exists-sync "^0.1.0" + remarkable "^1.6.2" + homedir-polyfill@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" @@ -7733,6 +8068,29 @@ html-escaper@^2.0.0: resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== +html-tag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/html-tag/-/html-tag-2.0.0.tgz#36c3bc8d816fd30b570d5764a497a641640c2fed" + integrity sha512-XxzooSo6oBoxBEUazgjdXj7VwTn/iSTSZzTYKzYY6I916tkaYzypHxy+pbVU1h+0UQ9JlVf5XkNQyxOAiiQO1g== + dependencies: + is-self-closing "^1.0.1" + kind-of "^6.0.0" + +html5-qrcode@^2.2.1: + version "2.3.4" + resolved "https://registry.yarnpkg.com/html5-qrcode/-/html5-qrcode-2.3.4.tgz#7e2b4575a23b10ff5e26d2bf147c8027c1ece389" + integrity sha512-VPZrOTG8XR9HmIAhSSiGtJVPErZxKy/DuGc9cPQLburCWZEbvxQGJP9y4K4P+8vdalLtYB/vM5YP1BdWQKZ8jQ== + +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" @@ -8197,6 +8555,13 @@ is-docker@^2.0.0, is-docker@^2.1.1: resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== +is-even@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-even/-/is-even-1.0.0.tgz#76b5055fbad8d294a86b6a949015e1c97b717c06" + integrity sha512-LEhnkAdJqic4Dbqn58A0y52IXoHWlsueqQkKfMfdEnIYG8A1sm/GHidKkS6yvXlMoRrkM34csHnXQtOqcb+Jzg== + dependencies: + is-odd "^0.1.2" + is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" @@ -8303,6 +8668,13 @@ is-number-object@^1.0.4: dependencies: has-tostringtag "^1.0.0" +is-number@^2.0.2: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + integrity sha512-QUzH43Gfb9+5yckcrSA0VBDwEtDUchrk4F6tfJZQuNzDJbEDB9cZNzSfXGQ1jqmdDY/kl41lUOWM9syA8z8jlg== + dependencies: + kind-of "^3.0.2" + is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" @@ -8325,6 +8697,13 @@ is-object@^1.0.1: resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf" integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA== +is-odd@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-0.1.2.tgz#bc573b5ce371ef2aad6e6f49799b72bef13978a7" + integrity sha512-Ri7C2K7o5IrUU9UEI8losXJCCD/UtsaIrkR5sxIcFg4xQ9cRJXlWA5DQvTE0yDc0krvSNLsRGXN11UPS6KyfBw== + dependencies: + is-number "^3.0.0" + is-path-inside@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" @@ -8342,6 +8721,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-property@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" @@ -8365,6 +8749,13 @@ is-retry-allowed@^2.2.0: resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-2.2.0.tgz#88f34cbd236e043e71b6932d09b0c65fb7b4d71d" integrity sha512-XVm7LOeLpTW4jV19QSH38vkswxoLud8sQ57YwJVTPWdiaI9I8keEhGFpBlslyVsgdQy4Opg8QOLb8YRgsyZiQg== +is-self-closing@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-self-closing/-/is-self-closing-1.0.1.tgz#5f406b527c7b12610176320338af0fa3896416e4" + integrity sha512-E+60FomW7Blv5GXTlYee2KDrnG6srxF7Xt1SjrhWUGUEsTFIqY/nq2y3DaftCsgUMdh89V07IVfhY9KIJhLezg== + dependencies: + self-closing-tags "^1.0.1" + is-shared-array-buffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" @@ -8475,6 +8866,11 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== +isobject@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-0.2.0.tgz#a3432192f39b910b5f02cc989487836ec70aa85e" + integrity sha512-VaWq6XYAsbvM0wf4dyBO7WH9D7GosB7ZZlqrawI9BBiTMINBeCyqSKBa35m870MY3O4aM31pYyZi9DfGrYMJrQ== + isobject@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" @@ -9649,7 +10045,7 @@ keyv@^3.0.0: dependencies: json-buffer "3.0.0" -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.1.0, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" integrity sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ== @@ -9663,12 +10059,12 @@ kind-of@^4.0.0: dependencies: is-buffer "^1.1.5" -kind-of@^5.0.0: +kind-of@^5.0.0, kind-of@^5.0.2: version "5.1.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== -kind-of@^6.0.0, kind-of@^6.0.2: +kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== @@ -9883,6 +10279,11 @@ lcid@^2.0.0: dependencies: invert-kv "^2.0.0" +leaflet@^1.7.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.9.3.tgz#52ec436954964e2d3d39e0d433da4b2500d74414" + integrity sha512-iB2cR9vAkDOu5l3HAay2obcUHZ7xwUBBjph8+PGtmW/2lYhbLizWtG7nTeYht36WfOslixQF9D/uSIzhZgGMfQ== + left-pad@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" @@ -10077,6 +10478,11 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +lodash._reinterpolate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + integrity sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA== + lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" @@ -10182,6 +10588,21 @@ lodash.sortby@^4.7.0: resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" integrity sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA== +lodash.template@^4.4.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" + integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.templatesettings "^4.0.0" + +lodash.templatesettings@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" + integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.without@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.without/-/lodash.without-4.4.0.tgz#3cd4574a00b67bae373a94b748772640507b7aac" @@ -10192,7 +10613,7 @@ lodash.xor@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.xor/-/lodash.xor-4.5.0.tgz#4d48ed7e98095b0632582ba714d3ff8ae8fb1db6" integrity sha512-sVN2zimthq7aZ5sPGXnSz32rZPuqcparVW50chJQe+mzTYV+IsxSsl/2gnkWWE2Of7K3myBQBqtLKOUEHJKRsQ== -lodash@4.17.21, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.17.3: +lodash@4.17.21, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.3: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -10334,6 +10755,11 @@ markdown-it@^12.2.0: mdurl "^1.0.1" uc.micro "^1.0.5" +marked@^4.1.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/marked/-/marked-4.2.3.tgz#bd76a5eb510ff1d8421bc6c3b2f0b93488c15bea" + integrity sha512-slWRdJkbTZ+PjkyJnE30Uid64eHwbwa1Q25INCAYfZlK4o6ylagBy/Le9eWntqJFoFT93ikUKMv47GZ4gTwHkw== + matcher@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/matcher/-/matcher-3.0.0.tgz#bd9060f4c5b70aa8041ccc6f80368760994f30ca" @@ -10429,7 +10855,7 @@ methods@^1.1.1, methods@^1.1.2: resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== -micromatch@^3.1.10, micromatch@^3.1.4: +micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.5: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -10732,6 +11158,16 @@ nano@^10.1.0: qs "^6.11.0" tough-cookie "^4.1.2" +nanoid@^2.1.0: + version "2.1.11" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-2.1.11.tgz#ec24b8a758d591561531b4176a01e3ab4f0f0280" + integrity sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA== + +nanoid@^3.3.4: + version "3.3.4" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" + integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== + nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -11400,6 +11836,11 @@ parse-passwd@^1.0.0: resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" integrity sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q== +parse-srcset@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/parse-srcset/-/parse-srcset-1.0.2.tgz#f2bd221f6cc970a938d88556abc589caaaa2bde1" + integrity sha512-/2qh0lav6CmI15FzA3i/2Bzk2zCgQhGMkvhOhKNcBVQ1ldgpbfiNTVslmooUmWJcADi1f1kIeynbDRVzNlfR6Q== + parse5@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" @@ -11748,6 +12189,15 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg== +postcss@^8.3.11: + version "8.4.19" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.19.tgz#61178e2add236b17351897c8bcc0b4c8ecab56fc" + integrity sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA== + dependencies: + nanoid "^3.3.4" + 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" @@ -12519,6 +12969,16 @@ regexp.prototype.flags@^1.4.3: define-properties "^1.1.3" functions-have-names "^1.2.2" +regexparam@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/regexparam/-/regexparam-2.0.1.tgz#c912f5dae371e3798100b3c9ce22b7414d0889fa" + integrity sha512-zRgSaYemnNYxUv+/5SeoHI0eJIgTL/A2pUtXUPLHQxUldagouJ9p+K6IbIZ/JiQuCEv2E2B1O11SjVQy3aMCkw== + +regexparam@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/regexparam/-/regexparam-1.3.0.tgz#2fe42c93e32a40eff6235d635e0ffa344b92965f" + integrity sha512-6IQpFBv6e5vz1QAqI+V4k8P2e/3gRrqfCJ9FI+O1FLQTO+Uz6RXZEZOPmTJ6hlGj7gkERzY5BRCv09whKP96/g== + regexpp@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" @@ -12567,6 +13027,21 @@ relative-microtime@^2.0.0: resolved "https://registry.yarnpkg.com/relative-microtime/-/relative-microtime-2.0.0.tgz#cceed2af095ecd72ea32011279c79e5fcc7de29b" integrity sha512-l18ha6HEZc+No/uK4GyAnNxgKW7nvEe35IaeN54sShMojtqik2a6GbTyuiezkjpPaqP874Z3lW5ysBo5irz4NA== +relative@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/relative/-/relative-3.0.2.tgz#0dcd8ec54a5d35a3c15e104503d65375b5a5367f" + integrity sha512-Q5W2qeYtY9GbiR8z1yHNZ1DGhyjb4AnLEjt8iE6XfcC1QIu+FAtj3HQaO0wH28H1mX6cqNLvAqWhP402dxJGyA== + dependencies: + isobject "^2.0.0" + +remarkable@^1.6.2: + version "1.7.4" + resolved "https://registry.yarnpkg.com/remarkable/-/remarkable-1.7.4.tgz#19073cb960398c87a7d6546eaa5e50d2022fcd00" + integrity sha512-e6NKUXgX95whv7IgddywbeN/ItCkWbISmc2DiqHJb0wTrqZIexqdco5b8Z3XZoo/48IdNVKM9ZCvTPJ4F5uvhg== + dependencies: + argparse "^1.0.10" + autolinker "~0.28.0" + remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" @@ -12854,6 +13329,18 @@ sane@^4.0.3: minimist "^1.1.1" walker "~1.0.5" +sanitize-html@^2.7.0: + version "2.7.3" + resolved "https://registry.yarnpkg.com/sanitize-html/-/sanitize-html-2.7.3.tgz#166c868444ee4f9fd7352ac8c63fa86c343fc2bd" + integrity sha512-jMaHG29ak4miiJ8wgqA1849iInqORgNv7SLfSw9LtfOhEUQ1C0YHKH73R+hgyufBW9ZFeJrb057k9hjlfBCVlw== + 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" @@ -12885,6 +13372,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.2" + resolved "https://registry.yarnpkg.com/screenfull/-/screenfull-6.0.2.tgz#3dbe4b8c4f8f49fb8e33caa8f69d0bca730ab238" + integrity sha512-AQdy8s4WhNvUZ6P8F6PB21tSPIYKniic+Ogx0AacBMjKP1GUHN2E9URxQHtCusiwxudnCKkdy4GrHXPPJSkCCw== + search-params@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/search-params/-/search-params-3.0.0.tgz#dbc7c243058e5a33ae1e9870be91f5aced4100d8" @@ -12902,6 +13394,11 @@ seek-bzip@^1.0.5: dependencies: commander "^2.8.1" +self-closing-tags@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/self-closing-tags/-/self-closing-tags-1.0.1.tgz#6c5fa497994bb826b484216916371accee490a5d" + integrity sha512-7t6hNbYMxM+VHXTgJmxwgZgLGktuXtVVD5AivWzNTdJBM4DBjnDKDzkf2SrNjihaArpeJYNjxkELBu1evI4lQA== + semver-compare@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" @@ -13054,6 +13551,13 @@ shimmer@^1.2.0: resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== +shortid@^2.2.15: + version "2.2.16" + resolved "https://registry.yarnpkg.com/shortid/-/shortid-2.2.16.tgz#b742b8f0cb96406fd391c76bfc18a67a57fe5608" + integrity sha512-Ugt+GIZqvGXCIItnsL+lvFJOiN7RYqlGy7QE41O3YC1xbNSeDGIRO7xg2JJXIAj1cAGnOeC1r7/T9pgrtQbv4g== + dependencies: + nanoid "^2.1.0" + side-channel@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" @@ -13194,7 +13698,17 @@ socket.io-adapter@~2.4.0: resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.4.0.tgz#b50a4a9ecdd00c34d4c8c808224daa1a786152a6" integrity sha512-W4N+o69rkMEGVuk2D/cvca3uYsvGlMwsySWV447y99gUPghxq42BxqLNMndb+a1mm/5/7NeXVQS7RLa2XyXvYg== -socket.io-parser@~4.2.0: +socket.io-client@^4.5.1: + version "4.5.4" + resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-4.5.4.tgz#d3cde8a06a6250041ba7390f08d2468ccebc5ac9" + integrity sha512-ZpKteoA06RzkD32IbqILZ+Cnst4xewU7ZYK12aS1mzHftFFjpoMz69IuhP/nL25pJfao/amoPI527KnuhFm01g== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.2" + engine.io-client "~6.2.3" + socket.io-parser "~4.2.1" + +socket.io-parser@~4.2.0, socket.io-parser@~4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.1.tgz#01c96efa11ded938dcb21cbe590c26af5eff65e5" integrity sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g== @@ -13256,6 +13770,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" @@ -13655,6 +14174,11 @@ strip-outer@^1.0.0: dependencies: escape-string-regexp "^1.0.2" +striptags@^3.1.1: + version "3.2.0" + resolved "https://registry.yarnpkg.com/striptags/-/striptags-3.2.0.tgz#cc74a137db2de8b0b9a370006334161f7dd67052" + integrity sha512-g45ZOGzHDMe2bdYMdIvdAfCQkCTDMGBazSw1ypMowwGIee7ZQ5dU0rBJ8Jqgl+jAKIv4dbeE1jscZq9wid1Tkw== + style-loader@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-3.3.1.tgz#057dfa6b3d4d7c7064462830f9113ed417d38575" @@ -13754,11 +14278,23 @@ svelte-portal@^1.0.0: resolved "https://registry.yarnpkg.com/svelte-portal/-/svelte-portal-1.0.0.tgz#36a47c5578b1a4d9b4dc60fa32a904640ec4cdd3" integrity sha512-nHf+DS/jZ6jjnZSleBMSaZua9JlG5rZv9lOGKgJuaZStfevtjIlUJrkLc3vbV8QdBvPPVmvcjTlazAzfKu0v3Q== +svelte-spa-router@^3.0.5: + version "3.3.0" + resolved "https://registry.yarnpkg.com/svelte-spa-router/-/svelte-spa-router-3.3.0.tgz#2fc0967a49dc361dfe4d38dddad6e662eed5b42c" + integrity sha512-cwRNe7cxD43sCvSfEeaKiNZg3FCizGxeMcf7CPiWRP3jKXjEma3vxyyuDtPOam6nWbVxl9TNM3hlE/i87ZlqcQ== + dependencies: + regexparam "2.0.1" + svelte@3.49.0: version "3.49.0" resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.49.0.tgz#5baee3c672306de1070c3b7888fc2204e36a4029" integrity sha512-+lmjic1pApJWDfPCpUUTc1m8azDqYCG1JN9YEngrx/hUyIcFJo6VZhj0A1Ai0wqoHcEIuQy+e9tk+4uDgdtsFA== +svelte@^3.46.2, svelte@^3.49.0: + version "3.53.1" + resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.53.1.tgz#db9d7df7a8f570e8e22547444c149208b1914442" + integrity sha512-Q4/hHkktZogGhN5iqxqSi9sjEVoe/NbIxX4hXEHoasTxj+TxEQVAq66LnDMdAZxjmsodkoI5F3slqsS68U7FNw== + svg.draggable.js@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/svg.draggable.js/-/svg.draggable.js-2.2.2.tgz#c514a2f1405efb6f0263e7958f5b68fce50603ba" @@ -14111,6 +14647,11 @@ to-fast-properties@^2.0.0: resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= +to-gfm-code-block@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/to-gfm-code-block/-/to-gfm-code-block-0.1.1.tgz#25d045a5fae553189e9637b590900da732d8aa82" + integrity sha512-LQRZWyn8d5amUKnfR9A9Uu7x9ss7Re8peuWR2gkh1E+ildOfv2aF26JpuDg8JtvCduu5+hOrMIH+XstZtnagqg== + to-json-schema@0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/to-json-schema/-/to-json-schema-0.2.5.tgz#ef3c3f11ad64460dcfbdbafd0fd525d69d62a98f" @@ -14379,6 +14920,13 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" +typeof-article@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/typeof-article/-/typeof-article-0.1.1.tgz#9f07e733c3fbb646ffa9e61c08debacd460e06af" + integrity sha512-Vn42zdX3FhmUrzEmitX3iYyLb+Umwpmv8fkZRIknYh84lmdrwqZA5xYaoKiIj2Rc5i/5wcDrpUmZcbk1U51vTw== + dependencies: + kind-of "^3.1.0" + typeof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/typeof/-/typeof-1.0.0.tgz#9c84403f2323ae5399167275497638ea1d2f2440" @@ -14389,6 +14937,11 @@ typescript@4.7.3: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.3.tgz#8364b502d5257b540f9de4c40be84c98e23a129d" integrity sha512-WOkT3XYvrpXx4vMMqlD+8R8R37fZkjyLGlxavMc4iB8lrl8L0DeTcHbYgw/v0N/z9wAFsgBhcsF0ruoySS22mA== +typo-js@*: + version "1.2.2" + resolved "https://registry.yarnpkg.com/typo-js/-/typo-js-1.2.2.tgz#340484d81fe518e77c81a5a770162b14492f183b" + integrity sha512-C7pYBQK17EjSg8tVNY91KHdUt5Nf6FMJ+c3js076quPmBML57PmNMzAcIq/2kf/hSYtFABNDIYNYlJRl5BJhGw== + uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" @@ -14739,6 +15292,14 @@ vm2@3.9.11: acorn "^8.7.0" acorn-walk "^8.2.0" +vm2@^3.9.4: + version "3.9.12" + resolved "https://registry.yarnpkg.com/vm2/-/vm2-3.9.12.tgz#9bfa6d913a8b467861524e5a11c3b038cc967ec4" + integrity sha512-OMmRsKh1gmdosFzuqmj6O43hqIStqXA24YbwjtUTO0TkOBP8yLNHLplbr4odnAzEcMnm9lt2r3R8kTivn8urMg== + dependencies: + acorn "^8.7.0" + acorn-walk "^8.2.0" + vuvuzela@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/vuvuzela/-/vuvuzela-1.0.3.tgz#3be145e58271c73ca55279dd851f12a682114b0b" @@ -15162,6 +15723,11 @@ xmlbuilder@~9.0.1: resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" integrity sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0= +xmlhttprequest-ssl@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz#91360c86b914e67f44dce769180027c0da618c67" + integrity sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A== + xpath.js@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/xpath.js/-/xpath.js-1.1.0.tgz#3816a44ed4bb352091083d002a383dd5104a5ff1" @@ -15300,6 +15866,11 @@ yauzl@^2.4.2: buffer-crc32 "~0.2.3" fd-slicer "~1.1.0" +year@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/year/-/year-0.2.1.tgz#4083ae520a318b23ec86037f3000cb892bdf9bb0" + integrity sha512-9GnJUZ0QM4OgXuOzsKNzTJ5EOkums1Xc+3YQXp+Q+UxFjf7zLucp9dQ8QMIft0Szs1E1hUiXFim1OYfEKFq97w== + ylru@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/ylru/-/ylru-1.3.2.tgz#0de48017473275a4cbdfc83a1eaf67c01af8a785" From 2d9dd1a66766073a91c816267425cd7c09c5528a Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 2 Dec 2022 16:17:56 +0000 Subject: [PATCH 321/396] Adding some null controls. --- .../scripts/integrations/mssql/data/setup.sql | 6 +-- .../integrations/postgres/emp-skill.sql | 51 ------------------- .../src/integrations/microsoftSqlServer.ts | 44 ++++++++++++++-- packages/server/src/integrations/oracle.ts | 1 + packages/server/src/integrations/postgres.ts | 4 ++ 5 files changed, 48 insertions(+), 58 deletions(-) diff --git a/packages/server/scripts/integrations/mssql/data/setup.sql b/packages/server/scripts/integrations/mssql/data/setup.sql index 5d2eeb8bb9..91c53cced7 100644 --- a/packages/server/scripts/integrations/mssql/data/setup.sql +++ b/packages/server/scripts/integrations/mssql/data/setup.sql @@ -11,7 +11,7 @@ GO CREATE TABLE products ( id int IDENTITY(1,1), - name varchar (20), + name varchar (20) NOT NULL, description varchar(30), CONSTRAINT pk_products PRIMARY KEY NONCLUSTERED (id) ); @@ -22,7 +22,7 @@ GO CREATE TABLE tasks ( taskid int IDENTITY(1,1), - taskname varchar (20), + taskname varchar (20) NOT NULL, productid int, CONSTRAINT pk_tasks PRIMARY KEY NONCLUSTERED (taskid), CONSTRAINT fk_products FOREIGN KEY (productid) REFERENCES products (id), @@ -33,7 +33,7 @@ IF OBJECT_ID ('dbo.people', 'U') IS NOT NULL GO CREATE TABLE people ( - name varchar(30), + name varchar(30) NOT NULL, age varchar(20), CONSTRAINT pk_people PRIMARY KEY NONCLUSTERED (name, age) ); diff --git a/packages/server/scripts/integrations/postgres/emp-skill.sql b/packages/server/scripts/integrations/postgres/emp-skill.sql index 5060b58a28..41c0427a05 100644 --- a/packages/server/scripts/integrations/postgres/emp-skill.sql +++ b/packages/server/scripts/integrations/postgres/emp-skill.sql @@ -1,14 +1,5 @@ SELECT 'CREATE DATABASE main' WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'main')\gexec -CREATE SCHEMA test; -CREATE TYPE person_job AS ENUM ('qa', 'programmer', 'designer'); -CREATE TABLE Persons ( - PersonID SERIAL PRIMARY KEY, - LastName varchar(255), - FirstName varchar(255), - Address varchar(255), - City varchar(255) DEFAULT 'Belfast', - Type person_job CREATE TABLE IF NOT EXISTS public."Employee" ( @@ -19,18 +10,6 @@ CREATE TABLE IF NOT EXISTS public."Employee" WITH ( OIDS = FALSE ); -CREATE TABLE Tasks ( - TaskID SERIAL PRIMARY KEY, - ExecutorID INT, - QaID INT, - Completed BOOLEAN, - TaskName varchar(255), - CONSTRAINT fkexecutor - FOREIGN KEY(ExecutorID) - REFERENCES Persons(PersonID), - CONSTRAINT fkqa - FOREIGN KEY(QaID) - REFERENCES Persons(PersonID) INSERT INTO public."Employee" ("id", "name") VALUES (1, 'Alice'); INSERT INTO public."Employee" ("id", "name") VALUES (2, 'Bob'); @@ -43,9 +22,6 @@ CREATE TABLE IF NOT EXISTS public."Skills" WITH ( OIDS = FALSE ); -CREATE TABLE Products ( - ProductID SERIAL PRIMARY KEY, - ProductName varchar(255) INSERT INTO public."Skills" ("id", "name") VALUES (1, 'Docker'); INSERT INTO public."Skills" ("id", "name") VALUES (2, 'Microservices'); @@ -61,33 +37,6 @@ CREATE TABLE IF NOT EXISTS public."jt_employee_skills_Skills_employee" WITH ( OIDS = FALSE ); -CREATE TABLE Products_Tasks ( - ProductID INT NOT NULL, - TaskID INT NOT NULL, - CONSTRAINT fkProducts - FOREIGN KEY(ProductID) - REFERENCES Products(ProductID), - CONSTRAINT fkTasks - FOREIGN KEY(TaskID) - REFERENCES Tasks(TaskID), - PRIMARY KEY (ProductID, TaskID) -); -CREATE TABLE test.table1 ( - id SERIAL PRIMARY KEY, - Name varchar(255) -); -INSERT INTO Persons (FirstName, LastName, Address, City, Type) VALUES ('Mike', 'Hughes', '123 Fake Street', 'Belfast', 'qa'); -INSERT INTO Persons (FirstName, LastName, Address, City, Type) VALUES ('John', 'Smith', '64 Updown Road', 'Dublin', 'programmer'); -INSERT INTO Tasks (ExecutorID, QaID, TaskName, Completed) VALUES (1, 2, 'assembling', TRUE); -INSERT INTO Tasks (ExecutorID, QaID, TaskName, Completed) VALUES (2, 1, 'processing', FALSE); -INSERT INTO Products (ProductName) VALUES ('Computers'); -INSERT INTO Products (ProductName) VALUES ('Laptops'); -INSERT INTO Products (ProductName) VALUES ('Chairs'); -INSERT INTO Products_Tasks (ProductID, TaskID) VALUES (1, 1); -INSERT INTO Products_Tasks (ProductID, TaskID) VALUES (2, 1); -INSERT INTO Products_Tasks (ProductID, TaskID) VALUES (3, 1); -INSERT INTO Products_Tasks (ProductID, TaskID) VALUES (1, 2); -INSERT INTO test.table1 (Name) VALUES ('Test'); insert into public."jt_employee_skills_Skills_employee" ("id", "employee_id", "skills_id") VALUES (1, 1, 1); insert into public."jt_employee_skills_Skills_employee" ("id", "employee_id", "skills_id") VALUES (2, 1, 2); diff --git a/packages/server/src/integrations/microsoftSqlServer.ts b/packages/server/src/integrations/microsoftSqlServer.ts index 0746d0e3bc..8c136dcc0f 100644 --- a/packages/server/src/integrations/microsoftSqlServer.ts +++ b/packages/server/src/integrations/microsoftSqlServer.ts @@ -38,6 +38,34 @@ interface TablesResponse { TABLE_TYPE: string } +type MSSQLColumn = { + IS_COMPUTED: number + IS_IDENTITY: number + TABLE_CATALOG: string + TABLE_SCHEMA: string + TABLE_NAME: string + COLUMN_NAME: string + ORDINAL_POSITION: number + COLUMN_DEFAULT: null | any + IS_NULLABLE: "NO" | "YES" + DATA_TYPE: string + CHARACTER_MAXIMUM_LENGTH: null | number + CHARACTER_OCTET_LENGTH: null | number + NUMERIC_PRECISION: null | string + NUMERIC_PRECISION_RADIX: null | string + NUMERIC_SCALE: null | string + DATETIME_PRECISION: null | string + CHARACTER_SET_CATALOG: null | string + CHARACTER_SET_SCHEMA: null | string + CHARACTER_SET_NAME: null | string + COLLATION_CATALOG: null | string + COLLATION_SCHEMA: null | string + COLLATION_NAME: null | string + DOMAIN_CATALOG: null | string + DOMAIN_SCHEMA: null | string + DOMAIN_NAME: null | string +} + const SCHEMA: Integration = { docs: "https://github.com/tediousjs/node-mssql", plus: true, @@ -228,15 +256,20 @@ class SqlServerIntegration extends Sql implements DatasourcePlus { // find primary key constraints const constraints = await this.runSQL(this.getConstraintsSQL(tableName)) // find the computed and identity columns (auto columns) - const columns = await this.runSQL(this.getAutoColumnsSQL(tableName)) + const columns: MSSQLColumn[] = await this.runSQL( + this.getAutoColumnsSQL(tableName) + ) const primaryKeys = constraints .filter( (constraint: any) => constraint.CONSTRAINT_TYPE === "PRIMARY KEY" ) .map((constraint: any) => constraint.COLUMN_NAME) const autoColumns = columns - .filter((col: any) => col.IS_COMPUTED || col.IS_IDENTITY) - .map((col: any) => col.COLUMN_NAME) + .filter(col => col.IS_COMPUTED || col.IS_IDENTITY) + .map(col => col.COLUMN_NAME) + const requiredColumns = columns + .filter(col => col.IS_NULLABLE === "NO") + .map(col => col.COLUMN_NAME) let schema: TableSchema = {} for (let def of definition) { @@ -245,8 +278,11 @@ class SqlServerIntegration extends Sql implements DatasourcePlus { continue } schema[name] = { - autocolumn: !!autoColumns.find((col: string) => col === name), + autocolumn: !!autoColumns.find(col => col === name), name: name, + constraints: { + presence: requiredColumns.find(col => col === name), + }, ...convertSqlType(def.DATA_TYPE), externalType: def.DATA_TYPE, } diff --git a/packages/server/src/integrations/oracle.ts b/packages/server/src/integrations/oracle.ts index 101d459ec0..13c2d11b8b 100644 --- a/packages/server/src/integrations/oracle.ts +++ b/packages/server/src/integrations/oracle.ts @@ -334,6 +334,7 @@ class OracleIntegration extends Sql implements DatasourcePlus { fieldSchema = { autocolumn: OracleIntegration.isAutoColumn(oracleColumn), name: columnName, + // TODO: add required constraint ...this.internalConvertType(oracleColumn), } table.schema[columnName] = fieldSchema diff --git a/packages/server/src/integrations/postgres.ts b/packages/server/src/integrations/postgres.ts index da1124f421..c0bda099eb 100644 --- a/packages/server/src/integrations/postgres.ts +++ b/packages/server/src/integrations/postgres.ts @@ -260,6 +260,9 @@ class PostgresIntegration extends Sql implements DatasourcePlus { column.identity_start || column.identity_increment ) + const constraints = { + presence: column.is_nullable === "NO", + } const hasDefault = typeof column.column_default === "string" && column.column_default.startsWith("nextval") @@ -269,6 +272,7 @@ class PostgresIntegration extends Sql implements DatasourcePlus { tables[tableName].schema[columnName] = { autocolumn: isAuto, name: columnName, + constraints, ...convertSqlType(column.data_type), externalType: column.data_type, } From 47d782ad287fd50d1e12b9d61b2ad98a829bfdf3 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 2 Dec 2022 17:28:37 +0000 Subject: [PATCH 322/396] Final fix for #8882 - adding text to show the error - as well as fixing an issue with many to many updating correctly. --- .../Datasources/CreateEditRelationship.svelte | 21 +++ .../api/controllers/row/ExternalRequest.ts | 5 +- .../server/src/integrations/base/types.ts | 134 ++++++++++++++++++ .../src/integrations/microsoftSqlServer.ts | 38 +---- packages/server/src/integrations/mysql.ts | 7 +- packages/server/src/integrations/oracle.ts | 64 +++------ packages/server/src/integrations/postgres.ts | 6 +- 7 files changed, 186 insertions(+), 89 deletions(-) create mode 100644 packages/server/src/integrations/base/types.ts diff --git a/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte b/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte index 230748b577..644ee9216b 100644 --- a/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte +++ b/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte @@ -45,6 +45,23 @@ const touched = writable({}) + function invalidThroughTable({ through, throughTo, throughFrom }) { + // need to know the foreign key columns to check error + if (!through || !throughTo || !throughFrom) { + return false + } + const throughTable = plusTables.find(tbl => tbl._id === through) + const otherColumns = Object.values(throughTable.schema).filter( + col => col.name !== throughFrom && col.name !== throughTo + ) + for (let col of otherColumns) { + if (col.constraints?.presence && !col.autocolumn) { + return true + } + } + return false + } + function checkForErrors(fromRelate, toRelate) { const isMany = fromRelate.relationshipType === RelationshipTypes.MANY_TO_MANY @@ -59,6 +76,10 @@ if ($touched.through && isMany && !fromRelate.through) { errObj.through = tableNotSet } + if ($touched.through && invalidThroughTable(fromRelate)) { + errObj.through = + "Table contains non-nullable columns which aren't generated" + } if ($touched.foreign && !isMany && !fromRelate.fieldName) { errObj.foreign = "Please pick the foreign key" } diff --git a/packages/server/src/api/controllers/row/ExternalRequest.ts b/packages/server/src/api/controllers/row/ExternalRequest.ts index de4ce317ef..a343553fc8 100644 --- a/packages/server/src/api/controllers/row/ExternalRequest.ts +++ b/packages/server/src/api/controllers/row/ExternalRequest.ts @@ -588,7 +588,10 @@ export class ExternalRequest { for (let [colName, { isMany, rows, tableId }] of Object.entries(related)) { const table: Table | undefined = this.getTable(tableId) // if its not the foreign key skip it, nothing to do - if (!table || (table.primary && table.primary.indexOf(colName) !== -1)) { + if ( + !table || + (!isMany && table.primary && table.primary.indexOf(colName) !== -1) + ) { continue } for (let row of rows) { diff --git a/packages/server/src/integrations/base/types.ts b/packages/server/src/integrations/base/types.ts new file mode 100644 index 0000000000..7144d20206 --- /dev/null +++ b/packages/server/src/integrations/base/types.ts @@ -0,0 +1,134 @@ +export interface MSSQLTablesResponse { + TABLE_CATALOG: string + TABLE_SCHEMA: string + TABLE_NAME: string + TABLE_TYPE: string +} + +export interface MSSQLColumn { + IS_COMPUTED: number + IS_IDENTITY: number + TABLE_CATALOG: string + TABLE_SCHEMA: string + TABLE_NAME: string + COLUMN_NAME: string + ORDINAL_POSITION: number + COLUMN_DEFAULT: null | any + IS_NULLABLE: "NO" | "YES" + DATA_TYPE: string + CHARACTER_MAXIMUM_LENGTH: null | number + CHARACTER_OCTET_LENGTH: null | number + NUMERIC_PRECISION: null | number + NUMERIC_PRECISION_RADIX: null | number + NUMERIC_SCALE: null | number + DATETIME_PRECISION: null | string + CHARACTER_SET_CATALOG: null | string + CHARACTER_SET_SCHEMA: null | string + CHARACTER_SET_NAME: null | string + COLLATION_CATALOG: null | string + COLLATION_SCHEMA: null | string + COLLATION_NAME: null | string + DOMAIN_CATALOG: null | string + DOMAIN_SCHEMA: null | string + DOMAIN_NAME: null | string +} + +export interface PostgresColumn { + table_catalog: string + table_schema: string + table_name: string + column_name: string + ordinal_position: number + column_default: null | any + is_nullable: "NO" | "YES" + data_type: string + character_maximum_length: null | number + character_octet_length: null | number + numeric_precision: null | number + numeric_precision_radix: null | number + numeric_scale: null | number + datetime_precision: null | string + interval_type: null | string + interval_precision: null | string + character_set_catalog: null | string + character_set_schema: null | string + character_set_name: null | string + collation_catalog: null | string + collation_schema: null | string + collation_name: null | string + domain_catalog: null | string + domain_schema: null | string + domain_name: null | string + udt_catalog: string + udt_schema: string + udt_name: string + scope_catalog: null | string + scope_schema: null | string + scope_name: null | string + maximum_cardinality: null | string + dtd_identifier: string + is_self_referencing: "NO" | "YES" + is_identity: "NO" | "YES" + identity_generation: null | number + identity_start: null | number + identity_increment: null | number + identity_maximum: null | number + identity_minimum: null | number + identity_cycle: "NO" | "YES" + is_generated: "NEVER" + generation_expression: null | string + is_updatable: "NO" | "YES" +} + +export interface MySQLColumn { + Field: string + Type: string + Null: "NO" | "YES" + Key: "PRI" | "MUL" | "" + Default: null | any + Extra: null | string +} + +/** + * Raw query response + */ +export interface OracleColumnsResponse { + TABLE_NAME: string + COLUMN_NAME: string + DATA_TYPE: string + DATA_DEFAULT: null | string + COLUMN_ID: number + CONSTRAINT_NAME: null | string + CONSTRAINT_TYPE: null | string + R_CONSTRAINT_NAME: null | string + SEARCH_CONDITION: null | string +} + +/** + * An oracle constraint + */ +export interface OracleConstraint { + name: string + type: string + relatedConstraintName: null | string + searchCondition: null | string +} + +/** + * An oracle column and it's related constraints + */ +export interface OracleColumn { + name: string + type: string + default: null | string + id: number + constraints: { [key: string]: OracleConstraint } +} + +/** + * An oracle table and it's related columns + */ +export interface OracleTable { + name: string + columns: { [key: string]: OracleColumn } +} diff --git a/packages/server/src/integrations/microsoftSqlServer.ts b/packages/server/src/integrations/microsoftSqlServer.ts index 8c136dcc0f..437a9812a6 100644 --- a/packages/server/src/integrations/microsoftSqlServer.ts +++ b/packages/server/src/integrations/microsoftSqlServer.ts @@ -17,6 +17,7 @@ import { SqlClient, } from "./utils" import Sql from "./base/sql" +import { MSSQLTablesResponse, MSSQLColumn } from "./base/types" const sqlServer = require("mssql") const DEFAULT_SCHEMA = "dbo" @@ -31,41 +32,6 @@ interface MSSQLConfig { encrypt?: boolean } -interface TablesResponse { - TABLE_CATALOG: string - TABLE_SCHEMA: string - TABLE_NAME: string - TABLE_TYPE: string -} - -type MSSQLColumn = { - IS_COMPUTED: number - IS_IDENTITY: number - TABLE_CATALOG: string - TABLE_SCHEMA: string - TABLE_NAME: string - COLUMN_NAME: string - ORDINAL_POSITION: number - COLUMN_DEFAULT: null | any - IS_NULLABLE: "NO" | "YES" - DATA_TYPE: string - CHARACTER_MAXIMUM_LENGTH: null | number - CHARACTER_OCTET_LENGTH: null | number - NUMERIC_PRECISION: null | string - NUMERIC_PRECISION_RADIX: null | string - NUMERIC_SCALE: null | string - DATETIME_PRECISION: null | string - CHARACTER_SET_CATALOG: null | string - CHARACTER_SET_SCHEMA: null | string - CHARACTER_SET_NAME: null | string - COLLATION_CATALOG: null | string - COLLATION_SCHEMA: null | string - COLLATION_NAME: null | string - DOMAIN_CATALOG: null | string - DOMAIN_SCHEMA: null | string - DOMAIN_NAME: null | string -} - const SCHEMA: Integration = { docs: "https://github.com/tediousjs/node-mssql", plus: true, @@ -238,7 +204,7 @@ class SqlServerIntegration extends Sql implements DatasourcePlus { */ async buildSchema(datasourceId: string, entities: Record) { await this.connect() - let tableInfo: TablesResponse[] = await this.runSQL(this.TABLES_SQL) + let tableInfo: MSSQLTablesResponse[] = await this.runSQL(this.TABLES_SQL) if (tableInfo == null || !Array.isArray(tableInfo)) { throw "Unable to get list of tables in database" } diff --git a/packages/server/src/integrations/mysql.ts b/packages/server/src/integrations/mysql.ts index acf8f4904a..136d84361a 100644 --- a/packages/server/src/integrations/mysql.ts +++ b/packages/server/src/integrations/mysql.ts @@ -18,6 +18,7 @@ import { import dayjs from "dayjs" const { NUMBER_REGEX } = require("../utilities") import Sql from "./base/sql" +import { MySQLColumn } from "./base/types" const mysql = require("mysql2/promise") @@ -203,11 +204,11 @@ class MySQLIntegration extends Sql implements DatasourcePlus { try { // get the tables first - const tablesResp = await this.internalQuery( + const tablesResp: Record[] = await this.internalQuery( { sql: "SHOW TABLES;" }, { connect: false } ) - const tableNames = tablesResp.map( + const tableNames: string[] = tablesResp.map( (obj: any) => obj[`Tables_in_${database}`] || obj[`Tables_in_${database.toLowerCase()}`] @@ -215,7 +216,7 @@ class MySQLIntegration extends Sql implements DatasourcePlus { for (let tableName of tableNames) { const primaryKeys = [] const schema: TableSchema = {} - const descResp = await this.internalQuery( + const descResp: MySQLColumn[] = await this.internalQuery( { sql: `DESCRIBE \`${tableName}\`;` }, { connect: false } ) diff --git a/packages/server/src/integrations/oracle.ts b/packages/server/src/integrations/oracle.ts index 13c2d11b8b..9ec9c3f858 100644 --- a/packages/server/src/integrations/oracle.ts +++ b/packages/server/src/integrations/oracle.ts @@ -24,6 +24,12 @@ import { ExecuteOptions, Result, } from "oracledb" +import { + OracleTable, + OracleColumn, + OracleColumnsResponse, + OracleConstraint, +} from "./base/types" let oracledb: any try { oracledb = require("oracledb") @@ -89,50 +95,6 @@ const SCHEMA: Integration = { const UNSUPPORTED_TYPES = ["BLOB", "CLOB", "NCLOB"] -/** - * Raw query response - */ -interface ColumnsResponse { - TABLE_NAME: string - COLUMN_NAME: string - DATA_TYPE: string - DATA_DEFAULT: string | null - COLUMN_ID: number - CONSTRAINT_NAME: string | null - CONSTRAINT_TYPE: string | null - R_CONSTRAINT_NAME: string | null - SEARCH_CONDITION: string | null -} - -/** - * An oracle constraint - */ -interface OracleConstraint { - name: string - type: string - relatedConstraintName: string | null - searchCondition: string | null -} - -/** - * An oracle column and it's related constraints - */ -interface OracleColumn { - name: string - type: string - default: string | null - id: number - constraints: { [key: string]: OracleConstraint } -} - -/** - * An oracle table and it's related columns - */ -interface OracleTable { - name: string - columns: { [key: string]: OracleColumn } -} - const OracleContraintTypes = { PRIMARY: "P", NOT_NULL_OR_CHECK: "C", @@ -195,7 +157,7 @@ class OracleIntegration extends Sql implements DatasourcePlus { /** * Map the flat tabular columns and constraints data into a nested object */ - private mapColumns(result: Result): { + private mapColumns(result: Result): { [key: string]: OracleTable } { const oracleTables: { [key: string]: OracleTable } = {} @@ -299,7 +261,7 @@ class OracleIntegration extends Sql implements DatasourcePlus { * @param entities - the tables that are to be built */ async buildSchema(datasourceId: string, entities: Record) { - const columnsResponse = await this.internalQuery({ + const columnsResponse = await this.internalQuery({ sql: this.COLUMNS_SQL, }) const oracleTables = this.mapColumns(columnsResponse) @@ -334,7 +296,9 @@ class OracleIntegration extends Sql implements DatasourcePlus { fieldSchema = { autocolumn: OracleIntegration.isAutoColumn(oracleColumn), name: columnName, - // TODO: add required constraint + constraints: { + presence: false, + }, ...this.internalConvertType(oracleColumn), } table.schema[columnName] = fieldSchema @@ -344,6 +308,12 @@ class OracleIntegration extends Sql implements DatasourcePlus { Object.values(oracleColumn.constraints).forEach(oracleConstraint => { if (oracleConstraint.type === OracleContraintTypes.PRIMARY) { table.primary!.push(columnName) + } else if ( + oracleConstraint.type === OracleContraintTypes.NOT_NULL_OR_CHECK + ) { + table.schema[columnName].constraints = { + presence: true, + } } }) }) diff --git a/packages/server/src/integrations/postgres.ts b/packages/server/src/integrations/postgres.ts index c0bda099eb..eba0d3691d 100644 --- a/packages/server/src/integrations/postgres.ts +++ b/packages/server/src/integrations/postgres.ts @@ -15,9 +15,10 @@ import { SqlClient, } from "./utils" import Sql from "./base/sql" +import { PostgresColumn } from "./base/types" +import { escapeDangerousCharacters } from "../utilities" const { Client, types } = require("pg") -const { escapeDangerousCharacters } = require("../utilities") // Return "date" and "timestamp" types as plain strings. // This lets us reference the original stored timezone. @@ -237,7 +238,8 @@ class PostgresIntegration extends Sql implements DatasourcePlus { } try { - const columnsResponse = await this.client.query(this.COLUMNS_SQL) + const columnsResponse: { rows: PostgresColumn[] } = + await this.client.query(this.COLUMNS_SQL) const tables: { [key: string]: Table } = {} From 9967b1962b7ddcbe4fac08fd06b1967e3ce94e01 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Fri, 2 Dec 2022 17:54:31 +0000 Subject: [PATCH 323/396] v2.1.43-alpha.2 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 8 ++++---- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/sdk/package.json | 2 +- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lerna.json b/lerna.json index 12363a27f6..2df56648da 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.1.43-alpha.1", + "version": "2.1.43-alpha.2", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index bdd96a5c8a..3c0f7b6912 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.1.43-alpha.1", + "version": "2.1.43-alpha.2", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "2.1.43-alpha.1", + "@budibase/types": "2.1.43-alpha.2", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 725fd62b7c..cd728bf7c2 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "2.1.43-alpha.1", + "version": "2.1.43-alpha.2", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "2.1.43-alpha.1", + "@budibase/string-templates": "2.1.43-alpha.2", "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/avatar": "^3.0.2", diff --git a/packages/builder/package.json b/packages/builder/package.json index 5e9e739c83..1303efe183 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.1.43-alpha.1", + "version": "2.1.43-alpha.2", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.1.43-alpha.1", - "@budibase/client": "2.1.43-alpha.1", - "@budibase/frontend-core": "2.1.43-alpha.1", - "@budibase/string-templates": "2.1.43-alpha.1", + "@budibase/bbui": "2.1.43-alpha.2", + "@budibase/client": "2.1.43-alpha.2", + "@budibase/frontend-core": "2.1.43-alpha.2", + "@budibase/string-templates": "2.1.43-alpha.2", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index f1d27b9470..27348a8104 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.1.43-alpha.1", + "version": "2.1.43-alpha.2", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "2.1.43-alpha.1", - "@budibase/string-templates": "2.1.43-alpha.1", - "@budibase/types": "2.1.43-alpha.1", + "@budibase/backend-core": "2.1.43-alpha.2", + "@budibase/string-templates": "2.1.43-alpha.2", + "@budibase/types": "2.1.43-alpha.2", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index edb2c03fce..b082630fa9 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.1.43-alpha.1", + "version": "2.1.43-alpha.2", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "2.1.43-alpha.1", - "@budibase/frontend-core": "2.1.43-alpha.1", - "@budibase/string-templates": "2.1.43-alpha.1", + "@budibase/bbui": "2.1.43-alpha.2", + "@budibase/frontend-core": "2.1.43-alpha.2", + "@budibase/string-templates": "2.1.43-alpha.2", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index 7c86825285..c3c335e898 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.1.43-alpha.1", + "version": "2.1.43-alpha.2", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.1.43-alpha.1", + "@budibase/bbui": "2.1.43-alpha.2", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index b489dbbdb5..2728d1a730 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.1.43-alpha.1", + "version": "2.1.43-alpha.2", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index 3ec85339d0..b1ae217e7a 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.1.43-alpha.1", + "version": "2.1.43-alpha.2", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -43,11 +43,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "2.1.43-alpha.1", - "@budibase/client": "2.1.43-alpha.1", + "@budibase/backend-core": "2.1.43-alpha.2", + "@budibase/client": "2.1.43-alpha.2", "@budibase/pro": "2.1.43-alpha.1", - "@budibase/string-templates": "2.1.43-alpha.1", - "@budibase/types": "2.1.43-alpha.1", + "@budibase/string-templates": "2.1.43-alpha.2", + "@budibase/types": "2.1.43-alpha.2", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 05bb23737a..2ba6e33eb7 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.1.43-alpha.1", + "version": "2.1.43-alpha.2", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index aa46092c34..f6c83bf527 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.1.43-alpha.1", + "version": "2.1.43-alpha.2", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index f1608e2e53..364bdbbc36 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.1.43-alpha.1", + "version": "2.1.43-alpha.2", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.1.43-alpha.1", + "@budibase/backend-core": "2.1.43-alpha.2", "@budibase/pro": "2.1.43-alpha.1", - "@budibase/string-templates": "2.1.43-alpha.1", - "@budibase/types": "2.1.43-alpha.1", + "@budibase/string-templates": "2.1.43-alpha.2", + "@budibase/types": "2.1.43-alpha.2", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 850acc38370a63627e8074c39f8059b55f2029a6 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Fri, 2 Dec 2022 17:58:05 +0000 Subject: [PATCH 324/396] Update pro version to 2.1.43-alpha.2 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 617 ++--------------------------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +- 4 files changed, 40 insertions(+), 611 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index b1ae217e7a..d5691dfd89 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -45,7 +45,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "2.1.43-alpha.2", "@budibase/client": "2.1.43-alpha.2", - "@budibase/pro": "2.1.43-alpha.1", + "@budibase/pro": "2.1.43-alpha.2", "@budibase/string-templates": "2.1.43-alpha.2", "@budibase/types": "2.1.43-alpha.2", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 86b14b6d8d..3a939ef964 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1273,12 +1273,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.43-alpha.1": - version "2.1.43-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.1.tgz#15a0d0b9bbf233e3ad824f7b63adff63c7ea3b20" - integrity sha512-3Ir7GZvpZ53K9PiWqtfZxcxlUT4RPXe6TyTbQyzR8e+FF23mh07+F+zKZuoZMzLdu+IYC1sez6L9sjKcVoF50Q== +"@budibase/backend-core@2.1.43-alpha.2": + version "2.1.43-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.2.tgz#32188e13fccbe88d651fa8011cbc3c6d17ce8846" + integrity sha512-5fBPEhaoRZU+pUfvLGy3ENKiB+KSPEoNn5SNdiXgjhN51GjLf3hHXXB3uj6m5fxirJFjW2RLVL2IeQffL3N/Ow== dependencies: - "@budibase/types" "2.1.43-alpha.1" + "@budibase/types" "2.1.43-alpha.2" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1310,59 +1310,6 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/bbui@2.1.43-alpha.1": - version "2.1.43-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-2.1.43-alpha.1.tgz#9b3239b3389dc96e11d567d705b9ae7d4efd11ca" - integrity sha512-ruEL2EtaScvwCfNfR9vdLz/wSonAByIbesWxzbldy3WXyjADiPr+gZrIXXVL4xE84/ZPJJKqBw4sAIQLfhg07g== - dependencies: - "@adobe/spectrum-css-workflow-icons" "^1.2.1" - "@budibase/string-templates" "2.1.43-alpha.1" - "@spectrum-css/actionbutton" "^1.0.1" - "@spectrum-css/actiongroup" "^1.0.1" - "@spectrum-css/avatar" "^3.0.2" - "@spectrum-css/button" "^3.0.1" - "@spectrum-css/buttongroup" "^3.0.2" - "@spectrum-css/checkbox" "^3.0.2" - "@spectrum-css/dialog" "^3.0.1" - "@spectrum-css/divider" "^1.0.3" - "@spectrum-css/dropzone" "^3.0.2" - "@spectrum-css/fieldgroup" "^3.0.2" - "@spectrum-css/fieldlabel" "^3.0.1" - "@spectrum-css/icon" "^3.0.1" - "@spectrum-css/illustratedmessage" "^3.0.2" - "@spectrum-css/inlinealert" "^2.0.1" - "@spectrum-css/inputgroup" "^3.0.2" - "@spectrum-css/label" "^2.0.10" - "@spectrum-css/link" "^3.1.1" - "@spectrum-css/menu" "^3.0.1" - "@spectrum-css/modal" "^3.0.1" - "@spectrum-css/pagination" "^3.0.3" - "@spectrum-css/picker" "^1.0.1" - "@spectrum-css/popover" "^3.0.1" - "@spectrum-css/progressbar" "^1.0.2" - "@spectrum-css/progresscircle" "^1.0.2" - "@spectrum-css/radio" "^3.0.2" - "@spectrum-css/search" "^3.0.2" - "@spectrum-css/sidenav" "^3.0.2" - "@spectrum-css/slider" "3.0.1" - "@spectrum-css/statuslight" "^3.0.2" - "@spectrum-css/stepper" "^3.0.3" - "@spectrum-css/switch" "^1.0.2" - "@spectrum-css/table" "^3.0.1" - "@spectrum-css/tabs" "^3.2.12" - "@spectrum-css/tags" "^3.0.2" - "@spectrum-css/textfield" "^3.0.1" - "@spectrum-css/toast" "^3.0.1" - "@spectrum-css/tooltip" "^3.0.3" - "@spectrum-css/treeview" "^3.0.2" - "@spectrum-css/typography" "^3.0.1" - "@spectrum-css/underlay" "^2.0.9" - "@spectrum-css/vars" "^3.0.1" - dayjs "^1.10.4" - easymde "^2.16.1" - svelte-flatpickr "^3.2.3" - svelte-portal "^1.0.0" - "@budibase/bbui@^0.9.139": version "0.9.190" resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-0.9.190.tgz#e1ec400ac90f556bfbc80fc23a04506f1585ea81" @@ -1413,78 +1360,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/client@2.1.43-alpha.1": - version "2.1.43-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/client/-/client-2.1.43-alpha.1.tgz#99a71036e44614a83e1fc2751e4ca5571d4c7b1f" - integrity sha512-bCjRFGwsUFnic288KZfb+Q6mKIXZDOUIlnLBrZv9fisSgHx4WWC2YYPwbq/srpRiBq+FR5nxdo0w5wZwi2v1eA== +"@budibase/pro@2.1.43-alpha.2": + version "2.1.43-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.2.tgz#0bfa5518b7ea6cad13f70477b37bfc0d44c35740" + integrity sha512-A6oqGbtH9MEjKwgGz5gbZE5KOrTUdYvfc+69y7yAPGMLKlnxnfwdvPizFYcbmpra4sVtEoKJudS46qZldhQpYg== dependencies: - "@budibase/bbui" "2.1.43-alpha.1" - "@budibase/frontend-core" "2.1.43-alpha.1" - "@budibase/string-templates" "2.1.43-alpha.1" - "@spectrum-css/button" "^3.0.3" - "@spectrum-css/card" "^3.0.3" - "@spectrum-css/divider" "^1.0.3" - "@spectrum-css/link" "^3.1.3" - "@spectrum-css/page" "^3.0.1" - "@spectrum-css/tag" "^3.1.4" - "@spectrum-css/typography" "^3.0.2" - "@spectrum-css/vars" "^3.0.1" - apexcharts "^3.22.1" - dayjs "^1.10.5" - downloadjs "1.4.7" - html5-qrcode "^2.2.1" - leaflet "^1.7.1" - regexparam "^1.3.0" - sanitize-html "^2.7.0" - screenfull "^6.0.1" - shortid "^2.2.15" - socket.io-client "^4.5.1" - svelte "^3.49.0" - svelte-apexcharts "^1.0.2" - svelte-flatpickr "^3.1.0" - svelte-spa-router "^3.0.5" - -"@budibase/frontend-core@2.1.43-alpha.1": - version "2.1.43-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/frontend-core/-/frontend-core-2.1.43-alpha.1.tgz#a68d41d4df0f931ae4e58f617bc1dd3b2e70e4c3" - integrity sha512-nrODSEX1iszoyLXeKEMIAu3+RLuuNuI8lGIzHtP/PaAaufY7xsPsUcmBrnVLGgt+cUVHk9zcEHYNyL75OwsR3A== - dependencies: - "@budibase/bbui" "2.1.43-alpha.1" - lodash "^4.17.21" - svelte "^3.46.2" - -"@budibase/handlebars-helpers@^0.11.8": - version "0.11.8" - resolved "https://registry.yarnpkg.com/@budibase/handlebars-helpers/-/handlebars-helpers-0.11.8.tgz#6953d29673a8c5c407e096c0a84890465c7ce841" - integrity sha512-ggWJUt0GqsHFAEup5tlWlcrmYML57nKhpNGGLzVsqXVYN8eVmf3xluYmmMe7fDYhQH0leSprrdEXmsdFQF3HAQ== - dependencies: - array-sort "^1.0.0" - define-property "^2.0.2" - extend-shallow "^3.0.2" - for-in "^1.0.2" - get-object "^0.2.0" - get-value "^3.0.1" - handlebars "^4.7.7" - handlebars-utils "^1.0.6" - has-value "^2.0.2" - helper-md "^0.2.2" - html-tag "^2.0.0" - is-even "^1.0.0" - is-glob "^4.0.1" - kind-of "^6.0.3" - micromatch "^3.1.5" - relative "^3.0.2" - striptags "^3.1.1" - to-gfm-code-block "^0.1.1" - year "^0.2.1" - -"@budibase/pro@2.1.43-alpha.1": - version "2.1.43-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.1.tgz#c2d6056624d312193c4dafcf706d5755d9afe73d" - integrity sha512-EtyY0+Fcs5tJwVo/NLcsrB1hsDw313aUQg/nOZb4yd00SfwejD1INzY7Cnb+nabB3qBG6GEkmvDhVT7KQbPGgw== - dependencies: - "@budibase/backend-core" "2.1.43-alpha.1" - "@budibase/types" "2.1.43-alpha.1" + "@budibase/backend-core" "2.1.43-alpha.2" + "@budibase/types" "2.1.43-alpha.2" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -1508,22 +1390,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/string-templates@2.1.43-alpha.1": - version "2.1.43-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/string-templates/-/string-templates-2.1.43-alpha.1.tgz#71ae3425375ad570c18dcaa522f0441816cee19f" - integrity sha512-DFOrf2FpysX16at3rI9Tnf/x6l0Rr6XF9IhOifssi23EaqmbhX/qydVc+1+kNLdFOIhI1wCBcCxecRBgKzSwrw== - dependencies: - "@budibase/handlebars-helpers" "^0.11.8" - dayjs "^1.10.4" - handlebars "^4.7.6" - handlebars-utils "^1.0.6" - lodash "^4.17.20" - vm2 "^3.9.4" - -"@budibase/types@2.1.43-alpha.1": - version "2.1.43-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.1.tgz#22d0d47d072afd6b2756ff525216e1a7837e1a2e" - integrity sha512-FXLcZkcn1XxHPznr0ilRQDFthKJZFEJVqy5T96/n/dg6+v6N/i/hOMpelBNjB9MSMeFecucho/l038HSKLmpnw== +"@budibase/types@2.1.43-alpha.2": + version "2.1.43-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.2.tgz#4ecbe0662fb033b06fffa946e0955c55e8012611" + integrity sha512-4d/8A0OzJo/0Qj/0EEkwCzEE61BrhKxrSQAALgEqJOrmha4/ZpZlOVor6yew+1CwvnB9I6ut6GVpubbnrugNlw== "@bull-board/api@3.7.0": version "3.7.0" @@ -2874,11 +2744,6 @@ resolved "https://registry.yarnpkg.com/@spectrum-css/sidenav/-/sidenav-3.0.23.tgz#c218560d472e13a3e0d1499b762df1206dcffbfd" integrity sha512-4IFw2/HMQJRzM0M2c5na/HeY7y5vJoGpMFBkXNpQyhW4TRo7N1rGwYQ5dRD3s4OVEWV4/rjfGV0d/qhfwKUTog== -"@spectrum-css/slider@3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@spectrum-css/slider/-/slider-3.0.1.tgz#5281e6f47eb5a4fd3d1816c138bf66d01d7f2e49" - integrity sha512-DI2dtMRnQuDM1miVzl3SGyR1khUEKnwdXfO5EHDFwkC3yav43F5QogkfjmjFmWWobMVovdJlAuiaaJ/IHejD0Q== - "@spectrum-css/statuslight@^3.0.2": version "3.0.8" resolved "https://registry.yarnpkg.com/@spectrum-css/statuslight/-/statuslight-3.0.8.tgz#3b0ea80712573679870a85d469850230e794a0f7" @@ -2904,16 +2769,6 @@ resolved "https://registry.yarnpkg.com/@spectrum-css/tabs/-/tabs-3.2.16.tgz#c3f7800d8d6f7c9930c28cd01354816328bf72b1" integrity sha512-JUcMB/fiDG/KoyrVstlUMacFJUY4OHKqhMRuPtu9ggUXWCRbSkY8he92v6u0HwY3DuhDoOxNTK8d/PLjk/fsbg== -"@spectrum-css/tabs@^3.2.12": - version "3.2.21" - resolved "https://registry.yarnpkg.com/@spectrum-css/tabs/-/tabs-3.2.21.tgz#a8888b83d6b74ba05a00cacdb27a1e8bf4639071" - integrity sha512-25WGV1Sih7dW69/RvB1Ts6xVDJDhVEyYZzIGAll0PDST1GjBMHuGblqN/fZpDy/r/rop3GoHIsumtIMvOBdJKw== - -"@spectrum-css/tag@^3.1.4": - version "3.3.15" - resolved "https://registry.yarnpkg.com/@spectrum-css/tag/-/tag-3.3.15.tgz#971184fd8cb977b85a529f808313851863123278" - integrity sha512-pF6Wh61Z7hmAy20twIlpjdDuivYj6UPtWIzK7giyJKr/qcn20BjVN2ChIeFB1N+vBamJdLsuQOewv4AJ3+LZ2Q== - "@spectrum-css/tags@^3.0.2": version "3.0.3" resolved "https://registry.yarnpkg.com/@spectrum-css/tags/-/tags-3.0.3.tgz#fc76d2735cdc442de91b7eb3bee49a928c0767ac" @@ -3078,13 +2933,6 @@ resolved "https://registry.yarnpkg.com/@types/caseless/-/caseless-0.12.2.tgz#f65d3d6389e01eeb458bd54dc8f52b95a9463bc8" integrity sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w== -"@types/codemirror@^5.60.4": - version "5.60.5" - resolved "https://registry.yarnpkg.com/@types/codemirror/-/codemirror-5.60.5.tgz#5b989a3b4bbe657458cf372c92b6bfda6061a2b7" - integrity sha512-TiECZmm8St5YxjFUp64LK0c8WU5bxMDt9YaAek1UqUb9swrSCoJhh92fWu1p3mTEqlHjhB5sY7OFBhWroJXZVg== - dependencies: - "@types/tern" "*" - "@types/connect@*": version "3.4.35" resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.35.tgz#5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1" @@ -3293,11 +3141,6 @@ resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.2.tgz#b74129719fc8d11c01868010082d483b7545591a" integrity sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA== -"@types/marked@^4.0.7": - version "4.0.7" - resolved "https://registry.yarnpkg.com/@types/marked/-/marked-4.0.7.tgz#400a76809fd08c2bbd9e25f3be06ea38c8e0a1d3" - integrity sha512-eEAhnz21CwvKVW+YvRvcTuFKNU9CV1qH+opcgVK3pIMI6YZzDm6gc8o2vHjldFk6MGKt5pueSB7IOpvpx5Qekw== - "@types/mime@^1": version "1.3.2" resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" @@ -3574,13 +3417,6 @@ "@types/cookiejar" "*" "@types/node" "*" -"@types/tern@*": - version "0.23.4" - resolved "https://registry.yarnpkg.com/@types/tern/-/tern-0.23.4.tgz#03926eb13dbeaf3ae0d390caf706b2643a0127fb" - integrity sha512-JAUw1iXGO1qaWwEOzxTKJZ/5JxVeON9kvGZ/osgZaJImBnyjyn0cjovPsf6FNLmyGY8Vw9DoXZCMlfMkMwHRWg== - dependencies: - "@types/estree" "*" - "@types/tough-cookie@*", "@types/tough-cookie@^4.0.2": version "4.0.2" resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.2.tgz#6286b4c7228d58ab7866d19716f3696e03a09397" @@ -4186,7 +4022,7 @@ arg@^4.1.0: resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== -argparse@^1.0.10, argparse@^1.0.7: +argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== @@ -4233,15 +4069,6 @@ array-equal@^1.0.0: resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" integrity sha512-H3LU5RLiSsGXPhN+Nipar0iR0IofH+8r89G2y1tBKxQ/agagKyAjhkAFDRBfodP2caPrNKHpAWNIM/c9yeL7uA== -array-sort@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-sort/-/array-sort-1.0.0.tgz#e4c05356453f56f53512a7d1d6123f2c54c0a88a" - integrity sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg== - dependencies: - default-compare "^1.0.0" - get-value "^2.0.6" - kind-of "^5.0.2" - array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" @@ -4385,13 +4212,6 @@ atomic-sleep@^1.0.0: resolved "https://registry.yarnpkg.com/atomic-sleep/-/atomic-sleep-1.0.0.tgz#eb85b77a601fc932cfe432c5acd364a9e2c9075b" integrity sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ== -autolinker@~0.28.0: - version "0.28.1" - resolved "https://registry.yarnpkg.com/autolinker/-/autolinker-0.28.1.tgz#0652b491881879f0775dace0cdca3233942a4e47" - integrity sha512-zQAFO1Dlsn69eXaO6+7YZc+v84aquQKbwpzCE3L0stj56ERn9hutFxPopViLjo9G+rWwjozRhgS5KJ25Xy19cQ== - dependencies: - gulp-header "^1.7.1" - available-typed-arrays@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" @@ -5305,18 +5125,6 @@ co@^4.6.0: resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== -codemirror-spell-checker@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/codemirror-spell-checker/-/codemirror-spell-checker-1.1.2.tgz#1c660f9089483ccb5113b9ba9ca19c3f4993371e" - integrity sha512-2Tl6n0v+GJRsC9K3MLCdLaMOmvWL0uukajNJseorZJsslaxZyZMgENocPU8R0DyoTAiKsyqiemSOZo7kjGV0LQ== - dependencies: - typo-js "*" - -codemirror@^5.63.1: - version "5.65.10" - resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.65.10.tgz#4276a93b8534ce91f14b733ba9a1ac949666eac9" - integrity sha512-IXAG5wlhbgcTJ6rZZcmi4+sjWIbJqIGfeg3tNa3yX84Jb3T4huS5qzQAo/cUisc1l3bI47WZodpyf7cYcocDKg== - collect-v8-coverage@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59" @@ -5467,13 +5275,6 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -concat-with-sourcemaps@*: - version "1.1.0" - resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz#d4ea93f05ae25790951b99e7b3b09e3908a4082e" - integrity sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg== - dependencies: - source-map "^0.6.1" - condense-newlines@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/condense-newlines/-/condense-newlines-0.2.1.tgz#3de985553139475d32502c83b02f60684d24c55f" @@ -5861,13 +5662,6 @@ deepmerge@^4.2.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== -default-compare@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/default-compare/-/default-compare-1.0.0.tgz#cb61131844ad84d84788fb68fd01681ca7781a2f" - integrity sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ== - dependencies: - kind-of "^5.0.2" - default-shell@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/default-shell/-/default-shell-1.0.1.tgz#752304bddc6174f49eb29cb988feea0b8813c8bc" @@ -6045,25 +5839,11 @@ doctrine@3.0.0, doctrine@^3.0.0: dependencies: esutils "^2.0.2" -dom-serializer@^1.0.1: - 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" - 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.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" resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" @@ -6071,22 +5851,6 @@ domexception@^1.0.1: dependencies: webidl-conversions "^4.0.2" -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" @@ -6131,11 +5895,6 @@ download@8.0.0: p-event "^2.1.0" pify "^4.0.1" -downloadjs@1.4.7: - version "1.4.7" - resolved "https://registry.yarnpkg.com/downloadjs/-/downloadjs-1.4.7.tgz#f69f96f940e0d0553dac291139865a3cd0101e3c" - integrity sha512-LN1gO7+u9xjU5oEScGFKvXhYf7Y/empUIIEAGBs1LzUq/rg5duiDrkuH5A2lQGd5jfMOb9X9usDa2oVXwJ0U/Q== - duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" @@ -6151,17 +5910,6 @@ duplexify@^4.0.0: readable-stream "^3.1.1" stream-shift "^1.0.0" -easymde@^2.16.1: - version "2.18.0" - resolved "https://registry.yarnpkg.com/easymde/-/easymde-2.18.0.tgz#ff1397d07329b1a7b9187d2d0c20766fa16b3b1b" - integrity sha512-IxVVUxNWIoXLeqtBU4BLc+eS/ScYhT1Dcb6yF5Wchoj1iXAV+TIIDWx+NCaZhY7RcSHqDPKllbYq7nwGKILnoA== - dependencies: - "@types/codemirror" "^5.60.4" - "@types/marked" "^4.0.7" - codemirror "^5.63.1" - codemirror-spell-checker "1.1.2" - marked "^4.1.0" - ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" @@ -6324,17 +6072,6 @@ end-stream@~0.1.0: dependencies: write-stream "~0.4.3" -engine.io-client@~6.2.3: - version "6.2.3" - resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-6.2.3.tgz#a8cbdab003162529db85e9de31575097f6d29458" - integrity sha512-aXPtgF1JS3RuuKcpSrBtimSjYvrbhKW9froICH4s0F3XQWLxsKNxqzG39nnvQZQnva4CMvUK63T7shevxRyYHw== - dependencies: - "@socket.io/component-emitter" "~3.1.0" - debug "~4.3.1" - engine.io-parser "~5.0.3" - ws "~8.2.3" - xmlhttprequest-ssl "~2.0.0" - engine.io-parser@~5.0.3: version "5.0.4" resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.0.4.tgz#0b13f704fa9271b3ec4f33112410d8f3f41d0fc0" @@ -6364,16 +6101,6 @@ enhanced-resolve@^5.9.3: graceful-fs "^4.2.4" tapable "^2.2.0" -ent@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" - integrity sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA== - -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" @@ -7379,11 +7106,6 @@ fs-constants@^1.0.0: resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== -fs-exists-sync@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" - integrity sha512-cR/vflFyPZtrN6b38ZyWxpWdhlXrzZEBawlpBQMq7033xVY7/kg0GDMBK5jg8lDYQckdJ5x/YC88lM3C7VMsLg== - fs-extra@8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" @@ -7532,14 +7254,6 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: has "^1.0.3" has-symbols "^1.0.3" -get-object@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/get-object/-/get-object-0.2.0.tgz#d92ff7d5190c64530cda0543dac63a3d47fe8c0c" - integrity sha512-7P6y6k6EzEFmO/XyUyFlXm1YLJy9xeA1x/grNV8276abX5GuwUtYgKFkRFkLixw4hf4Pz9q2vgv/8Ar42R0HuQ== - dependencies: - is-number "^2.0.2" - isobject "^0.2.0" - get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" @@ -7602,13 +7316,6 @@ get-value@^2.0.3, get-value@^2.0.6: resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" integrity sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA== -get-value@^3.0.0, get-value@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/get-value/-/get-value-3.0.1.tgz#5efd2a157f1d6a516d7524e124ac52d0a39ef5a8" - integrity sha512-mKZj9JLQrwMBtj5wxi6MH8Z5eSKaERpAwjg43dPtlGI1ZVEgH/qC7T8/6R2OBSUA+zzHBZgICsVJaEIV2tKTDA== - dependencies: - isobject "^3.0.1" - getopts@2.2.5: version "2.2.5" resolved "https://registry.yarnpkg.com/getopts/-/getopts-2.2.5.tgz#67a0fe471cacb9c687d817cab6450b96dde8313b" @@ -7878,24 +7585,7 @@ gtoken@^5.0.4: google-p12-pem "^3.1.3" jws "^4.0.0" -gulp-header@^1.7.1: - version "1.8.12" - resolved "https://registry.yarnpkg.com/gulp-header/-/gulp-header-1.8.12.tgz#ad306be0066599127281c4f8786660e705080a84" - integrity sha512-lh9HLdb53sC7XIZOYzTXM4lFuXElv3EVkSDhsd7DoJBj7hm+Ni7D3qYbb+Rr8DuM8nRanBvkVO9d7askreXGnQ== - dependencies: - concat-with-sourcemaps "*" - lodash.template "^4.4.0" - through2 "^2.0.0" - -handlebars-utils@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/handlebars-utils/-/handlebars-utils-1.0.6.tgz#cb9db43362479054782d86ffe10f47abc76357f9" - integrity sha512-d5mmoQXdeEqSKMtQQZ9WkiUcO1E3tPbWxluCK9hVgIDPzQa9WsKo3Lbe/sGflTe7TomHEeZaOgwIkyIr1kfzkw== - dependencies: - kind-of "^6.0.0" - typeof-article "^0.1.1" - -handlebars@^4.7.6, handlebars@^4.7.7: +handlebars@^4.7.7: version "4.7.7" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== @@ -7989,14 +7679,6 @@ has-value@^1.0.0: has-values "^1.0.0" isobject "^3.0.0" -has-value@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-2.0.2.tgz#d0f12e8780ba8e90e66ad1a21c707fdb67c25658" - integrity sha512-ybKOlcRsK2MqrM3Hmz/lQxXHZ6ejzSPzpNabKB45jb5qDgJvKPa3SdapTsTLwEb9WltgWpOmNax7i+DzNOk4TA== - dependencies: - get-value "^3.0.0" - has-values "^2.0.1" - has-values@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" @@ -8010,13 +7692,6 @@ has-values@^1.0.0: is-number "^3.0.0" kind-of "^4.0.0" -has-values@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-2.0.1.tgz#3876200ff86d8a8546a9264a952c17d5fc17579d" - integrity sha512-+QdH3jOmq9P8GfdjFg0eJudqx1FqU62NQJ4P16rOEHeRdl7ckgwn6uqQjzYE0ZoHVV/e5E2esuJ5Gl5+HUW19w== - dependencies: - kind-of "^6.0.2" - has-yarn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-2.1.0.tgz#137e11354a7b5bf11aa5cb649cf0c6f3ff2b2e77" @@ -8029,16 +7704,6 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" -helper-md@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/helper-md/-/helper-md-0.2.2.tgz#c1f59d7e55bbae23362fd8a0e971607aec69d41f" - integrity sha512-49TaQzK+Ic7ZVTq4i1UZxRUJEmAilTk8hz7q4I0WNUaTclLR8ArJV5B3A1fe1xF2HtsDTr2gYKLaVTof/Lt84Q== - dependencies: - ent "^2.2.0" - extend-shallow "^2.0.1" - fs-exists-sync "^0.1.0" - remarkable "^1.6.2" - homedir-polyfill@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" @@ -8068,29 +7733,6 @@ html-escaper@^2.0.0: resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== -html-tag@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/html-tag/-/html-tag-2.0.0.tgz#36c3bc8d816fd30b570d5764a497a641640c2fed" - integrity sha512-XxzooSo6oBoxBEUazgjdXj7VwTn/iSTSZzTYKzYY6I916tkaYzypHxy+pbVU1h+0UQ9JlVf5XkNQyxOAiiQO1g== - dependencies: - is-self-closing "^1.0.1" - kind-of "^6.0.0" - -html5-qrcode@^2.2.1: - version "2.3.4" - resolved "https://registry.yarnpkg.com/html5-qrcode/-/html5-qrcode-2.3.4.tgz#7e2b4575a23b10ff5e26d2bf147c8027c1ece389" - integrity sha512-VPZrOTG8XR9HmIAhSSiGtJVPErZxKy/DuGc9cPQLburCWZEbvxQGJP9y4K4P+8vdalLtYB/vM5YP1BdWQKZ8jQ== - -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" @@ -8555,13 +8197,6 @@ is-docker@^2.0.0, is-docker@^2.1.1: resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== -is-even@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-even/-/is-even-1.0.0.tgz#76b5055fbad8d294a86b6a949015e1c97b717c06" - integrity sha512-LEhnkAdJqic4Dbqn58A0y52IXoHWlsueqQkKfMfdEnIYG8A1sm/GHidKkS6yvXlMoRrkM34csHnXQtOqcb+Jzg== - dependencies: - is-odd "^0.1.2" - is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" @@ -8668,13 +8303,6 @@ is-number-object@^1.0.4: dependencies: has-tostringtag "^1.0.0" -is-number@^2.0.2: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - integrity sha512-QUzH43Gfb9+5yckcrSA0VBDwEtDUchrk4F6tfJZQuNzDJbEDB9cZNzSfXGQ1jqmdDY/kl41lUOWM9syA8z8jlg== - dependencies: - kind-of "^3.0.2" - is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" @@ -8697,13 +8325,6 @@ is-object@^1.0.1: resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf" integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA== -is-odd@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-0.1.2.tgz#bc573b5ce371ef2aad6e6f49799b72bef13978a7" - integrity sha512-Ri7C2K7o5IrUU9UEI8losXJCCD/UtsaIrkR5sxIcFg4xQ9cRJXlWA5DQvTE0yDc0krvSNLsRGXN11UPS6KyfBw== - dependencies: - is-number "^3.0.0" - is-path-inside@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" @@ -8721,11 +8342,6 @@ 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-property@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" @@ -8749,13 +8365,6 @@ is-retry-allowed@^2.2.0: resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-2.2.0.tgz#88f34cbd236e043e71b6932d09b0c65fb7b4d71d" integrity sha512-XVm7LOeLpTW4jV19QSH38vkswxoLud8sQ57YwJVTPWdiaI9I8keEhGFpBlslyVsgdQy4Opg8QOLb8YRgsyZiQg== -is-self-closing@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-self-closing/-/is-self-closing-1.0.1.tgz#5f406b527c7b12610176320338af0fa3896416e4" - integrity sha512-E+60FomW7Blv5GXTlYee2KDrnG6srxF7Xt1SjrhWUGUEsTFIqY/nq2y3DaftCsgUMdh89V07IVfhY9KIJhLezg== - dependencies: - self-closing-tags "^1.0.1" - is-shared-array-buffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" @@ -8866,11 +8475,6 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== -isobject@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-0.2.0.tgz#a3432192f39b910b5f02cc989487836ec70aa85e" - integrity sha512-VaWq6XYAsbvM0wf4dyBO7WH9D7GosB7ZZlqrawI9BBiTMINBeCyqSKBa35m870MY3O4aM31pYyZi9DfGrYMJrQ== - isobject@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" @@ -10045,7 +9649,7 @@ keyv@^3.0.0: dependencies: json-buffer "3.0.0" -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.1.0, kind-of@^3.2.0: +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" integrity sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ== @@ -10059,12 +9663,12 @@ kind-of@^4.0.0: dependencies: is-buffer "^1.1.5" -kind-of@^5.0.0, kind-of@^5.0.2: +kind-of@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== -kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3: +kind-of@^6.0.0, kind-of@^6.0.2: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== @@ -10279,11 +9883,6 @@ lcid@^2.0.0: dependencies: invert-kv "^2.0.0" -leaflet@^1.7.1: - version "1.9.3" - resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.9.3.tgz#52ec436954964e2d3d39e0d433da4b2500d74414" - integrity sha512-iB2cR9vAkDOu5l3HAay2obcUHZ7xwUBBjph8+PGtmW/2lYhbLizWtG7nTeYht36WfOslixQF9D/uSIzhZgGMfQ== - left-pad@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" @@ -10478,11 +10077,6 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" -lodash._reinterpolate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" - integrity sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA== - lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" @@ -10588,21 +10182,6 @@ lodash.sortby@^4.7.0: resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" integrity sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA== -lodash.template@^4.4.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" - integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== - dependencies: - lodash._reinterpolate "^3.0.0" - lodash.templatesettings "^4.0.0" - -lodash.templatesettings@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" - integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== - dependencies: - lodash._reinterpolate "^3.0.0" - lodash.without@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.without/-/lodash.without-4.4.0.tgz#3cd4574a00b67bae373a94b748772640507b7aac" @@ -10613,7 +10192,7 @@ lodash.xor@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.xor/-/lodash.xor-4.5.0.tgz#4d48ed7e98095b0632582ba714d3ff8ae8fb1db6" integrity sha512-sVN2zimthq7aZ5sPGXnSz32rZPuqcparVW50chJQe+mzTYV+IsxSsl/2gnkWWE2Of7K3myBQBqtLKOUEHJKRsQ== -lodash@4.17.21, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.3: +lodash@4.17.21, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.17.3: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -10755,11 +10334,6 @@ markdown-it@^12.2.0: mdurl "^1.0.1" uc.micro "^1.0.5" -marked@^4.1.0: - version "4.2.3" - resolved "https://registry.yarnpkg.com/marked/-/marked-4.2.3.tgz#bd76a5eb510ff1d8421bc6c3b2f0b93488c15bea" - integrity sha512-slWRdJkbTZ+PjkyJnE30Uid64eHwbwa1Q25INCAYfZlK4o6ylagBy/Le9eWntqJFoFT93ikUKMv47GZ4gTwHkw== - matcher@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/matcher/-/matcher-3.0.0.tgz#bd9060f4c5b70aa8041ccc6f80368760994f30ca" @@ -10855,7 +10429,7 @@ methods@^1.1.1, methods@^1.1.2: resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== -micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.5: +micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -11158,16 +10732,6 @@ nano@^10.1.0: qs "^6.11.0" tough-cookie "^4.1.2" -nanoid@^2.1.0: - version "2.1.11" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-2.1.11.tgz#ec24b8a758d591561531b4176a01e3ab4f0f0280" - integrity sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA== - -nanoid@^3.3.4: - version "3.3.4" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" - integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== - nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -11836,11 +11400,6 @@ parse-passwd@^1.0.0: resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" integrity sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q== -parse-srcset@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/parse-srcset/-/parse-srcset-1.0.2.tgz#f2bd221f6cc970a938d88556abc589caaaa2bde1" - integrity sha512-/2qh0lav6CmI15FzA3i/2Bzk2zCgQhGMkvhOhKNcBVQ1ldgpbfiNTVslmooUmWJcADi1f1kIeynbDRVzNlfR6Q== - parse5@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" @@ -12189,15 +11748,6 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg== -postcss@^8.3.11: - version "8.4.19" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.19.tgz#61178e2add236b17351897c8bcc0b4c8ecab56fc" - integrity sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA== - dependencies: - nanoid "^3.3.4" - 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" @@ -12969,16 +12519,6 @@ regexp.prototype.flags@^1.4.3: define-properties "^1.1.3" functions-have-names "^1.2.2" -regexparam@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/regexparam/-/regexparam-2.0.1.tgz#c912f5dae371e3798100b3c9ce22b7414d0889fa" - integrity sha512-zRgSaYemnNYxUv+/5SeoHI0eJIgTL/A2pUtXUPLHQxUldagouJ9p+K6IbIZ/JiQuCEv2E2B1O11SjVQy3aMCkw== - -regexparam@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/regexparam/-/regexparam-1.3.0.tgz#2fe42c93e32a40eff6235d635e0ffa344b92965f" - integrity sha512-6IQpFBv6e5vz1QAqI+V4k8P2e/3gRrqfCJ9FI+O1FLQTO+Uz6RXZEZOPmTJ6hlGj7gkERzY5BRCv09whKP96/g== - regexpp@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" @@ -13027,21 +12567,6 @@ relative-microtime@^2.0.0: resolved "https://registry.yarnpkg.com/relative-microtime/-/relative-microtime-2.0.0.tgz#cceed2af095ecd72ea32011279c79e5fcc7de29b" integrity sha512-l18ha6HEZc+No/uK4GyAnNxgKW7nvEe35IaeN54sShMojtqik2a6GbTyuiezkjpPaqP874Z3lW5ysBo5irz4NA== -relative@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/relative/-/relative-3.0.2.tgz#0dcd8ec54a5d35a3c15e104503d65375b5a5367f" - integrity sha512-Q5W2qeYtY9GbiR8z1yHNZ1DGhyjb4AnLEjt8iE6XfcC1QIu+FAtj3HQaO0wH28H1mX6cqNLvAqWhP402dxJGyA== - dependencies: - isobject "^2.0.0" - -remarkable@^1.6.2: - version "1.7.4" - resolved "https://registry.yarnpkg.com/remarkable/-/remarkable-1.7.4.tgz#19073cb960398c87a7d6546eaa5e50d2022fcd00" - integrity sha512-e6NKUXgX95whv7IgddywbeN/ItCkWbISmc2DiqHJb0wTrqZIexqdco5b8Z3XZoo/48IdNVKM9ZCvTPJ4F5uvhg== - dependencies: - argparse "^1.0.10" - autolinker "~0.28.0" - remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" @@ -13329,18 +12854,6 @@ sane@^4.0.3: minimist "^1.1.1" walker "~1.0.5" -sanitize-html@^2.7.0: - version "2.7.3" - resolved "https://registry.yarnpkg.com/sanitize-html/-/sanitize-html-2.7.3.tgz#166c868444ee4f9fd7352ac8c63fa86c343fc2bd" - integrity sha512-jMaHG29ak4miiJ8wgqA1849iInqORgNv7SLfSw9LtfOhEUQ1C0YHKH73R+hgyufBW9ZFeJrb057k9hjlfBCVlw== - 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" @@ -13372,11 +12885,6 @@ 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.2" - resolved "https://registry.yarnpkg.com/screenfull/-/screenfull-6.0.2.tgz#3dbe4b8c4f8f49fb8e33caa8f69d0bca730ab238" - integrity sha512-AQdy8s4WhNvUZ6P8F6PB21tSPIYKniic+Ogx0AacBMjKP1GUHN2E9URxQHtCusiwxudnCKkdy4GrHXPPJSkCCw== - search-params@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/search-params/-/search-params-3.0.0.tgz#dbc7c243058e5a33ae1e9870be91f5aced4100d8" @@ -13394,11 +12902,6 @@ seek-bzip@^1.0.5: dependencies: commander "^2.8.1" -self-closing-tags@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/self-closing-tags/-/self-closing-tags-1.0.1.tgz#6c5fa497994bb826b484216916371accee490a5d" - integrity sha512-7t6hNbYMxM+VHXTgJmxwgZgLGktuXtVVD5AivWzNTdJBM4DBjnDKDzkf2SrNjihaArpeJYNjxkELBu1evI4lQA== - semver-compare@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" @@ -13551,13 +13054,6 @@ shimmer@^1.2.0: resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== -shortid@^2.2.15: - version "2.2.16" - resolved "https://registry.yarnpkg.com/shortid/-/shortid-2.2.16.tgz#b742b8f0cb96406fd391c76bfc18a67a57fe5608" - integrity sha512-Ugt+GIZqvGXCIItnsL+lvFJOiN7RYqlGy7QE41O3YC1xbNSeDGIRO7xg2JJXIAj1cAGnOeC1r7/T9pgrtQbv4g== - dependencies: - nanoid "^2.1.0" - side-channel@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" @@ -13698,17 +13194,7 @@ socket.io-adapter@~2.4.0: resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.4.0.tgz#b50a4a9ecdd00c34d4c8c808224daa1a786152a6" integrity sha512-W4N+o69rkMEGVuk2D/cvca3uYsvGlMwsySWV447y99gUPghxq42BxqLNMndb+a1mm/5/7NeXVQS7RLa2XyXvYg== -socket.io-client@^4.5.1: - version "4.5.4" - resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-4.5.4.tgz#d3cde8a06a6250041ba7390f08d2468ccebc5ac9" - integrity sha512-ZpKteoA06RzkD32IbqILZ+Cnst4xewU7ZYK12aS1mzHftFFjpoMz69IuhP/nL25pJfao/amoPI527KnuhFm01g== - dependencies: - "@socket.io/component-emitter" "~3.1.0" - debug "~4.3.2" - engine.io-client "~6.2.3" - socket.io-parser "~4.2.1" - -socket.io-parser@~4.2.0, socket.io-parser@~4.2.1: +socket.io-parser@~4.2.0: version "4.2.1" resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.1.tgz#01c96efa11ded938dcb21cbe590c26af5eff65e5" integrity sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g== @@ -13770,11 +13256,6 @@ 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" @@ -14174,11 +13655,6 @@ strip-outer@^1.0.0: dependencies: escape-string-regexp "^1.0.2" -striptags@^3.1.1: - version "3.2.0" - resolved "https://registry.yarnpkg.com/striptags/-/striptags-3.2.0.tgz#cc74a137db2de8b0b9a370006334161f7dd67052" - integrity sha512-g45ZOGzHDMe2bdYMdIvdAfCQkCTDMGBazSw1ypMowwGIee7ZQ5dU0rBJ8Jqgl+jAKIv4dbeE1jscZq9wid1Tkw== - style-loader@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-3.3.1.tgz#057dfa6b3d4d7c7064462830f9113ed417d38575" @@ -14278,23 +13754,11 @@ svelte-portal@^1.0.0: resolved "https://registry.yarnpkg.com/svelte-portal/-/svelte-portal-1.0.0.tgz#36a47c5578b1a4d9b4dc60fa32a904640ec4cdd3" integrity sha512-nHf+DS/jZ6jjnZSleBMSaZua9JlG5rZv9lOGKgJuaZStfevtjIlUJrkLc3vbV8QdBvPPVmvcjTlazAzfKu0v3Q== -svelte-spa-router@^3.0.5: - version "3.3.0" - resolved "https://registry.yarnpkg.com/svelte-spa-router/-/svelte-spa-router-3.3.0.tgz#2fc0967a49dc361dfe4d38dddad6e662eed5b42c" - integrity sha512-cwRNe7cxD43sCvSfEeaKiNZg3FCizGxeMcf7CPiWRP3jKXjEma3vxyyuDtPOam6nWbVxl9TNM3hlE/i87ZlqcQ== - dependencies: - regexparam "2.0.1" - svelte@3.49.0: version "3.49.0" resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.49.0.tgz#5baee3c672306de1070c3b7888fc2204e36a4029" integrity sha512-+lmjic1pApJWDfPCpUUTc1m8azDqYCG1JN9YEngrx/hUyIcFJo6VZhj0A1Ai0wqoHcEIuQy+e9tk+4uDgdtsFA== -svelte@^3.46.2, svelte@^3.49.0: - version "3.53.1" - resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.53.1.tgz#db9d7df7a8f570e8e22547444c149208b1914442" - integrity sha512-Q4/hHkktZogGhN5iqxqSi9sjEVoe/NbIxX4hXEHoasTxj+TxEQVAq66LnDMdAZxjmsodkoI5F3slqsS68U7FNw== - svg.draggable.js@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/svg.draggable.js/-/svg.draggable.js-2.2.2.tgz#c514a2f1405efb6f0263e7958f5b68fce50603ba" @@ -14647,11 +14111,6 @@ to-fast-properties@^2.0.0: resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= -to-gfm-code-block@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/to-gfm-code-block/-/to-gfm-code-block-0.1.1.tgz#25d045a5fae553189e9637b590900da732d8aa82" - integrity sha512-LQRZWyn8d5amUKnfR9A9Uu7x9ss7Re8peuWR2gkh1E+ildOfv2aF26JpuDg8JtvCduu5+hOrMIH+XstZtnagqg== - to-json-schema@0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/to-json-schema/-/to-json-schema-0.2.5.tgz#ef3c3f11ad64460dcfbdbafd0fd525d69d62a98f" @@ -14920,13 +14379,6 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typeof-article@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/typeof-article/-/typeof-article-0.1.1.tgz#9f07e733c3fbb646ffa9e61c08debacd460e06af" - integrity sha512-Vn42zdX3FhmUrzEmitX3iYyLb+Umwpmv8fkZRIknYh84lmdrwqZA5xYaoKiIj2Rc5i/5wcDrpUmZcbk1U51vTw== - dependencies: - kind-of "^3.1.0" - typeof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/typeof/-/typeof-1.0.0.tgz#9c84403f2323ae5399167275497638ea1d2f2440" @@ -14937,11 +14389,6 @@ typescript@4.7.3: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.3.tgz#8364b502d5257b540f9de4c40be84c98e23a129d" integrity sha512-WOkT3XYvrpXx4vMMqlD+8R8R37fZkjyLGlxavMc4iB8lrl8L0DeTcHbYgw/v0N/z9wAFsgBhcsF0ruoySS22mA== -typo-js@*: - version "1.2.2" - resolved "https://registry.yarnpkg.com/typo-js/-/typo-js-1.2.2.tgz#340484d81fe518e77c81a5a770162b14492f183b" - integrity sha512-C7pYBQK17EjSg8tVNY91KHdUt5Nf6FMJ+c3js076quPmBML57PmNMzAcIq/2kf/hSYtFABNDIYNYlJRl5BJhGw== - uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" @@ -15292,14 +14739,6 @@ vm2@3.9.11: acorn "^8.7.0" acorn-walk "^8.2.0" -vm2@^3.9.4: - version "3.9.12" - resolved "https://registry.yarnpkg.com/vm2/-/vm2-3.9.12.tgz#9bfa6d913a8b467861524e5a11c3b038cc967ec4" - integrity sha512-OMmRsKh1gmdosFzuqmj6O43hqIStqXA24YbwjtUTO0TkOBP8yLNHLplbr4odnAzEcMnm9lt2r3R8kTivn8urMg== - dependencies: - acorn "^8.7.0" - acorn-walk "^8.2.0" - vuvuzela@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/vuvuzela/-/vuvuzela-1.0.3.tgz#3be145e58271c73ca55279dd851f12a682114b0b" @@ -15723,11 +15162,6 @@ xmlbuilder@~9.0.1: resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" integrity sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0= -xmlhttprequest-ssl@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz#91360c86b914e67f44dce769180027c0da618c67" - integrity sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A== - xpath.js@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/xpath.js/-/xpath.js-1.1.0.tgz#3816a44ed4bb352091083d002a383dd5104a5ff1" @@ -15866,11 +15300,6 @@ yauzl@^2.4.2: buffer-crc32 "~0.2.3" fd-slicer "~1.1.0" -year@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/year/-/year-0.2.1.tgz#4083ae520a318b23ec86037f3000cb892bdf9bb0" - integrity sha512-9GnJUZ0QM4OgXuOzsKNzTJ5EOkums1Xc+3YQXp+Q+UxFjf7zLucp9dQ8QMIft0Szs1E1hUiXFim1OYfEKFq97w== - ylru@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/ylru/-/ylru-1.3.2.tgz#0de48017473275a4cbdfc83a1eaf67c01af8a785" diff --git a/packages/worker/package.json b/packages/worker/package.json index 364bdbbc36..4435a3a611 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "2.1.43-alpha.2", - "@budibase/pro": "2.1.43-alpha.1", + "@budibase/pro": "2.1.43-alpha.2", "@budibase/string-templates": "2.1.43-alpha.2", "@budibase/types": "2.1.43-alpha.2", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 8881c49217..e0a8341d84 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -470,12 +470,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.43-alpha.1": - version "2.1.43-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.1.tgz#15a0d0b9bbf233e3ad824f7b63adff63c7ea3b20" - integrity sha512-3Ir7GZvpZ53K9PiWqtfZxcxlUT4RPXe6TyTbQyzR8e+FF23mh07+F+zKZuoZMzLdu+IYC1sez6L9sjKcVoF50Q== +"@budibase/backend-core@2.1.43-alpha.2": + version "2.1.43-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.2.tgz#32188e13fccbe88d651fa8011cbc3c6d17ce8846" + integrity sha512-5fBPEhaoRZU+pUfvLGy3ENKiB+KSPEoNn5SNdiXgjhN51GjLf3hHXXB3uj6m5fxirJFjW2RLVL2IeQffL3N/Ow== dependencies: - "@budibase/types" "2.1.43-alpha.1" + "@budibase/types" "2.1.43-alpha.2" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -507,22 +507,22 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.1.43-alpha.1": - version "2.1.43-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.1.tgz#c2d6056624d312193c4dafcf706d5755d9afe73d" - integrity sha512-EtyY0+Fcs5tJwVo/NLcsrB1hsDw313aUQg/nOZb4yd00SfwejD1INzY7Cnb+nabB3qBG6GEkmvDhVT7KQbPGgw== +"@budibase/pro@2.1.43-alpha.2": + version "2.1.43-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.2.tgz#0bfa5518b7ea6cad13f70477b37bfc0d44c35740" + integrity sha512-A6oqGbtH9MEjKwgGz5gbZE5KOrTUdYvfc+69y7yAPGMLKlnxnfwdvPizFYcbmpra4sVtEoKJudS46qZldhQpYg== dependencies: - "@budibase/backend-core" "2.1.43-alpha.1" - "@budibase/types" "2.1.43-alpha.1" + "@budibase/backend-core" "2.1.43-alpha.2" + "@budibase/types" "2.1.43-alpha.2" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.1.43-alpha.1": - version "2.1.43-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.1.tgz#22d0d47d072afd6b2756ff525216e1a7837e1a2e" - integrity sha512-FXLcZkcn1XxHPznr0ilRQDFthKJZFEJVqy5T96/n/dg6+v6N/i/hOMpelBNjB9MSMeFecucho/l038HSKLmpnw== +"@budibase/types@2.1.43-alpha.2": + version "2.1.43-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.2.tgz#4ecbe0662fb033b06fffa946e0955c55e8012611" + integrity sha512-4d/8A0OzJo/0Qj/0EEkwCzEE61BrhKxrSQAALgEqJOrmha4/ZpZlOVor6yew+1CwvnB9I6ut6GVpubbnrugNlw== "@cspotcode/source-map-support@^0.8.0": version "0.8.1" From 788db7ab35bd943dec9e3766ed4d58c18a8922b0 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 5 Dec 2022 09:51:56 +0000 Subject: [PATCH 325/396] v2.1.43-alpha.3 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 8 ++++---- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/sdk/package.json | 2 +- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lerna.json b/lerna.json index 2df56648da..a5f46a1e05 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.1.43-alpha.2", + "version": "2.1.43-alpha.3", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 3c0f7b6912..912ba5878b 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.1.43-alpha.2", + "version": "2.1.43-alpha.3", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "2.1.43-alpha.2", + "@budibase/types": "2.1.43-alpha.3", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index cd728bf7c2..238d0251ba 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "2.1.43-alpha.2", + "version": "2.1.43-alpha.3", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "2.1.43-alpha.2", + "@budibase/string-templates": "2.1.43-alpha.3", "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/avatar": "^3.0.2", diff --git a/packages/builder/package.json b/packages/builder/package.json index 1303efe183..40bac411f2 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.1.43-alpha.2", + "version": "2.1.43-alpha.3", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.1.43-alpha.2", - "@budibase/client": "2.1.43-alpha.2", - "@budibase/frontend-core": "2.1.43-alpha.2", - "@budibase/string-templates": "2.1.43-alpha.2", + "@budibase/bbui": "2.1.43-alpha.3", + "@budibase/client": "2.1.43-alpha.3", + "@budibase/frontend-core": "2.1.43-alpha.3", + "@budibase/string-templates": "2.1.43-alpha.3", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index 27348a8104..d3705d0bcb 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.1.43-alpha.2", + "version": "2.1.43-alpha.3", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "2.1.43-alpha.2", - "@budibase/string-templates": "2.1.43-alpha.2", - "@budibase/types": "2.1.43-alpha.2", + "@budibase/backend-core": "2.1.43-alpha.3", + "@budibase/string-templates": "2.1.43-alpha.3", + "@budibase/types": "2.1.43-alpha.3", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index b082630fa9..4595f56200 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.1.43-alpha.2", + "version": "2.1.43-alpha.3", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "2.1.43-alpha.2", - "@budibase/frontend-core": "2.1.43-alpha.2", - "@budibase/string-templates": "2.1.43-alpha.2", + "@budibase/bbui": "2.1.43-alpha.3", + "@budibase/frontend-core": "2.1.43-alpha.3", + "@budibase/string-templates": "2.1.43-alpha.3", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index c3c335e898..247e1c1ffd 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.1.43-alpha.2", + "version": "2.1.43-alpha.3", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.1.43-alpha.2", + "@budibase/bbui": "2.1.43-alpha.3", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 2728d1a730..3a712a7e75 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.1.43-alpha.2", + "version": "2.1.43-alpha.3", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index d5691dfd89..de67071a22 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.1.43-alpha.2", + "version": "2.1.43-alpha.3", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -43,11 +43,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "2.1.43-alpha.2", - "@budibase/client": "2.1.43-alpha.2", + "@budibase/backend-core": "2.1.43-alpha.3", + "@budibase/client": "2.1.43-alpha.3", "@budibase/pro": "2.1.43-alpha.2", - "@budibase/string-templates": "2.1.43-alpha.2", - "@budibase/types": "2.1.43-alpha.2", + "@budibase/string-templates": "2.1.43-alpha.3", + "@budibase/types": "2.1.43-alpha.3", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 2ba6e33eb7..dcee3d40f0 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.1.43-alpha.2", + "version": "2.1.43-alpha.3", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index f6c83bf527..1178f182e5 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.1.43-alpha.2", + "version": "2.1.43-alpha.3", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index 4435a3a611..b6b2debd0f 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.1.43-alpha.2", + "version": "2.1.43-alpha.3", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.1.43-alpha.2", + "@budibase/backend-core": "2.1.43-alpha.3", "@budibase/pro": "2.1.43-alpha.2", - "@budibase/string-templates": "2.1.43-alpha.2", - "@budibase/types": "2.1.43-alpha.2", + "@budibase/string-templates": "2.1.43-alpha.3", + "@budibase/types": "2.1.43-alpha.3", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From cf7af9ffa05e63d529d0750508b000b192b2a4b2 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 5 Dec 2022 09:55:34 +0000 Subject: [PATCH 326/396] Update pro version to 2.1.43-alpha.3 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index de67071a22..3ba825f1bf 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -45,7 +45,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "2.1.43-alpha.3", "@budibase/client": "2.1.43-alpha.3", - "@budibase/pro": "2.1.43-alpha.2", + "@budibase/pro": "2.1.43-alpha.3", "@budibase/string-templates": "2.1.43-alpha.3", "@budibase/types": "2.1.43-alpha.3", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 3a939ef964..8d1b18448a 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1273,12 +1273,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.43-alpha.2": - version "2.1.43-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.2.tgz#32188e13fccbe88d651fa8011cbc3c6d17ce8846" - integrity sha512-5fBPEhaoRZU+pUfvLGy3ENKiB+KSPEoNn5SNdiXgjhN51GjLf3hHXXB3uj6m5fxirJFjW2RLVL2IeQffL3N/Ow== +"@budibase/backend-core@2.1.43-alpha.3": + version "2.1.43-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.3.tgz#d3d4c30bbda13164e8c5310240ccd7d90e8e9e23" + integrity sha512-a3GMU7NKhUs6jgQtJ4e9lY4UnvwNn6CI23vdDC5vLJlZ94hnfUxvWlI8uIm8raX1vdkwoextqHsw4RKsnA4cmQ== dependencies: - "@budibase/types" "2.1.43-alpha.2" + "@budibase/types" "2.1.43-alpha.3" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1360,13 +1360,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.1.43-alpha.2": - version "2.1.43-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.2.tgz#0bfa5518b7ea6cad13f70477b37bfc0d44c35740" - integrity sha512-A6oqGbtH9MEjKwgGz5gbZE5KOrTUdYvfc+69y7yAPGMLKlnxnfwdvPizFYcbmpra4sVtEoKJudS46qZldhQpYg== +"@budibase/pro@2.1.43-alpha.3": + version "2.1.43-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.3.tgz#503cd1a850611f7508d34ce02f680a53bb28f08b" + integrity sha512-WIN6rEEIUqZrAsI7XUIHBhq5ILxU6qF8E3T7h69eigeRX61YaiuNIarwO+5vBzHP88BYyiiV3NQcf4++MJLU3w== dependencies: - "@budibase/backend-core" "2.1.43-alpha.2" - "@budibase/types" "2.1.43-alpha.2" + "@budibase/backend-core" "2.1.43-alpha.3" + "@budibase/types" "2.1.43-alpha.3" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -1390,10 +1390,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.1.43-alpha.2": - version "2.1.43-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.2.tgz#4ecbe0662fb033b06fffa946e0955c55e8012611" - integrity sha512-4d/8A0OzJo/0Qj/0EEkwCzEE61BrhKxrSQAALgEqJOrmha4/ZpZlOVor6yew+1CwvnB9I6ut6GVpubbnrugNlw== +"@budibase/types@2.1.43-alpha.3": + version "2.1.43-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.3.tgz#0300f0d3c8fa5adab15f537d88a78346ce01225f" + integrity sha512-n/2dwQKt+AIpUL5aRjVYEZ3goqePKv+J0yXi67l7YWuKVROx2FeB8Erq/OR+5NgqUdnqHD/13usO6kgkmA8V3A== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index b6b2debd0f..8cc8deef2b 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "2.1.43-alpha.3", - "@budibase/pro": "2.1.43-alpha.2", + "@budibase/pro": "2.1.43-alpha.3", "@budibase/string-templates": "2.1.43-alpha.3", "@budibase/types": "2.1.43-alpha.3", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index e0a8341d84..45aaedbfc0 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -470,12 +470,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.43-alpha.2": - version "2.1.43-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.2.tgz#32188e13fccbe88d651fa8011cbc3c6d17ce8846" - integrity sha512-5fBPEhaoRZU+pUfvLGy3ENKiB+KSPEoNn5SNdiXgjhN51GjLf3hHXXB3uj6m5fxirJFjW2RLVL2IeQffL3N/Ow== +"@budibase/backend-core@2.1.43-alpha.3": + version "2.1.43-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.3.tgz#d3d4c30bbda13164e8c5310240ccd7d90e8e9e23" + integrity sha512-a3GMU7NKhUs6jgQtJ4e9lY4UnvwNn6CI23vdDC5vLJlZ94hnfUxvWlI8uIm8raX1vdkwoextqHsw4RKsnA4cmQ== dependencies: - "@budibase/types" "2.1.43-alpha.2" + "@budibase/types" "2.1.43-alpha.3" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -507,22 +507,22 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.1.43-alpha.2": - version "2.1.43-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.2.tgz#0bfa5518b7ea6cad13f70477b37bfc0d44c35740" - integrity sha512-A6oqGbtH9MEjKwgGz5gbZE5KOrTUdYvfc+69y7yAPGMLKlnxnfwdvPizFYcbmpra4sVtEoKJudS46qZldhQpYg== +"@budibase/pro@2.1.43-alpha.3": + version "2.1.43-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.3.tgz#503cd1a850611f7508d34ce02f680a53bb28f08b" + integrity sha512-WIN6rEEIUqZrAsI7XUIHBhq5ILxU6qF8E3T7h69eigeRX61YaiuNIarwO+5vBzHP88BYyiiV3NQcf4++MJLU3w== dependencies: - "@budibase/backend-core" "2.1.43-alpha.2" - "@budibase/types" "2.1.43-alpha.2" + "@budibase/backend-core" "2.1.43-alpha.3" + "@budibase/types" "2.1.43-alpha.3" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.1.43-alpha.2": - version "2.1.43-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.2.tgz#4ecbe0662fb033b06fffa946e0955c55e8012611" - integrity sha512-4d/8A0OzJo/0Qj/0EEkwCzEE61BrhKxrSQAALgEqJOrmha4/ZpZlOVor6yew+1CwvnB9I6ut6GVpubbnrugNlw== +"@budibase/types@2.1.43-alpha.3": + version "2.1.43-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.3.tgz#0300f0d3c8fa5adab15f537d88a78346ce01225f" + integrity sha512-n/2dwQKt+AIpUL5aRjVYEZ3goqePKv+J0yXi67l7YWuKVROx2FeB8Erq/OR+5NgqUdnqHD/13usO6kgkmA8V3A== "@cspotcode/source-map-support@^0.8.0": version "0.8.1" From 19649b761acd41900bfc7a1ea12ed2a2872c9093 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 5 Dec 2022 11:48:27 +0000 Subject: [PATCH 327/396] Updating error message. --- .../backend/Datasources/CreateEditRelationship.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte b/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte index 644ee9216b..4defcbafab 100644 --- a/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte +++ b/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte @@ -78,7 +78,7 @@ } if ($touched.through && invalidThroughTable(fromRelate)) { errObj.through = - "Table contains non-nullable columns which aren't generated" + "Ensure all columns in table are nullable or auto generated" } if ($touched.foreign && !isMany && !fromRelate.fieldName) { errObj.foreign = "Please pick the foreign key" From a64436c9c8f01192c948a4b47dfbd0ad31f66f3d Mon Sep 17 00:00:00 2001 From: Gerard Burns Date: Mon, 5 Dec 2022 12:09:27 +0000 Subject: [PATCH 328/396] Multifield Input Autoselect All Fields (#8884) * Multifield Input Autoselect All Fields * PR Feedback * PR Feedback * Linting --- .../src/builderStore/store/frontend.js | 26 ++++++++++++++++++- packages/client/manifest.json | 8 +++--- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/packages/builder/src/builderStore/store/frontend.js b/packages/builder/src/builderStore/store/frontend.js index aca25dbe05..e831f6a343 100644 --- a/packages/builder/src/builderStore/store/frontend.js +++ b/packages/builder/src/builderStore/store/frontend.js @@ -25,6 +25,7 @@ import { DB_TYPE_INTERNAL, DB_TYPE_EXTERNAL, } from "constants/backend" +import { getSchemaForDatasource } from "builderStore/dataBinding" const INITIAL_FRONTEND_STATE = { apps: [], @@ -524,7 +525,9 @@ export const getFrontendStore = () => { // Generate default props let props = { ...presetProps } settings.forEach(setting => { - if (setting.defaultValue !== undefined) { + if (setting.type === "multifield" && setting.selectAllFields) { + props[setting.key] = Object.keys(defaultDatasource.schema || {}) + } else if (setting.defaultValue !== undefined) { props[setting.key] = setting.defaultValue } }) @@ -1041,6 +1044,27 @@ export const getFrontendStore = () => { if (component[name] === value) { return false } + + const settings = getComponentSettings(component._component) + const updatedSetting = settings.find(setting => setting.key === name) + + if ( + updatedSetting.type === "dataSource" || + updatedSetting.type === "table" + ) { + const { schema } = getSchemaForDatasource(null, value) + const columnNames = Object.keys(schema || {}) + const multifieldKeysToSelectAll = settings + .filter(setting => { + return setting.type === "multifield" && setting.selectAllFields + }) + .map(setting => setting.key) + + multifieldKeysToSelectAll.forEach(key => { + component[key] = columnNames + }) + } + component[name] = value }) }, diff --git a/packages/client/manifest.json b/packages/client/manifest.json index e0282eb8a9..dbbb7726be 100644 --- a/packages/client/manifest.json +++ b/packages/client/manifest.json @@ -5118,7 +5118,8 @@ { "type": "multifield", "label": "Fields", - "key": "fields" + "key": "fields", + "selectAllFields": true }, { "type": "select", @@ -5284,7 +5285,8 @@ "type": "multifield", "label": "Fields", "key": "detailFields", - "nested": true + "nested": true, + "selectAllFields": true } ] } @@ -5294,4 +5296,4 @@ "suffix": "repeater" } } -} \ No newline at end of file +} From dd55af82d7e1184897fef4014bb205b2ce740479 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 5 Dec 2022 12:10:24 +0000 Subject: [PATCH 329/396] Revert removing loading blockers in forms to fix multiple issues --- .../src/components/app/forms/Form.svelte | 45 ++++++++++--------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/packages/client/src/components/app/forms/Form.svelte b/packages/client/src/components/app/forms/Form.svelte index e2a6dcf7c5..717bf00064 100644 --- a/packages/client/src/components/app/forms/Form.svelte +++ b/packages/client/src/components/app/forms/Form.svelte @@ -20,11 +20,11 @@ const context = getContext("context") const { API, fetchDatasourceSchema } = getContext("sdk") + let loaded = false let schema let table $: fetchSchema(dataSource) - $: fetchTable(dataSource) // Returns the closes data context which isn't a built in context const getInitialValues = (type, dataSource, context) => { @@ -47,10 +47,6 @@ // Fetches the form schema from this form's dataSource const fetchSchema = async dataSource => { - schema = (await fetchDatasourceSchema(dataSource)) || {} - } - - const fetchTable = async dataSource => { if (dataSource?.tableId && dataSource?.type !== "query") { try { table = await API.fetchTableDefinition(dataSource.tableId) @@ -58,6 +54,11 @@ table = null } } + const res = await fetchDatasourceSchema(dataSource) + schema = res || {} + if (!loaded) { + loaded = true + } } $: initialValues = getInitialValues(actionType, dataSource, $context) @@ -66,19 +67,21 @@ ) -{#key resetKey} - - - -{/key} +{#if loaded} + {#key resetKey} + + + + {/key} +{/if} From 4842fe12ae45e6302b7305ad64a7ce71b0a7003f Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 5 Dec 2022 12:38:09 +0000 Subject: [PATCH 330/396] v2.1.43-alpha.4 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 8 ++++---- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/sdk/package.json | 2 +- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lerna.json b/lerna.json index a5f46a1e05..aead883445 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.1.43-alpha.3", + "version": "2.1.43-alpha.4", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 912ba5878b..a92b1c2489 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.1.43-alpha.3", + "version": "2.1.43-alpha.4", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "2.1.43-alpha.3", + "@budibase/types": "2.1.43-alpha.4", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 238d0251ba..09282c92da 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "2.1.43-alpha.3", + "version": "2.1.43-alpha.4", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "2.1.43-alpha.3", + "@budibase/string-templates": "2.1.43-alpha.4", "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/avatar": "^3.0.2", diff --git a/packages/builder/package.json b/packages/builder/package.json index 40bac411f2..18bdf5ebe4 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.1.43-alpha.3", + "version": "2.1.43-alpha.4", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.1.43-alpha.3", - "@budibase/client": "2.1.43-alpha.3", - "@budibase/frontend-core": "2.1.43-alpha.3", - "@budibase/string-templates": "2.1.43-alpha.3", + "@budibase/bbui": "2.1.43-alpha.4", + "@budibase/client": "2.1.43-alpha.4", + "@budibase/frontend-core": "2.1.43-alpha.4", + "@budibase/string-templates": "2.1.43-alpha.4", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index d3705d0bcb..1380e06bfe 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.1.43-alpha.3", + "version": "2.1.43-alpha.4", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "2.1.43-alpha.3", - "@budibase/string-templates": "2.1.43-alpha.3", - "@budibase/types": "2.1.43-alpha.3", + "@budibase/backend-core": "2.1.43-alpha.4", + "@budibase/string-templates": "2.1.43-alpha.4", + "@budibase/types": "2.1.43-alpha.4", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index 4595f56200..fe77fb82bd 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.1.43-alpha.3", + "version": "2.1.43-alpha.4", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "2.1.43-alpha.3", - "@budibase/frontend-core": "2.1.43-alpha.3", - "@budibase/string-templates": "2.1.43-alpha.3", + "@budibase/bbui": "2.1.43-alpha.4", + "@budibase/frontend-core": "2.1.43-alpha.4", + "@budibase/string-templates": "2.1.43-alpha.4", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index 247e1c1ffd..4bfdb3e759 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.1.43-alpha.3", + "version": "2.1.43-alpha.4", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.1.43-alpha.3", + "@budibase/bbui": "2.1.43-alpha.4", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 3a712a7e75..c87a270945 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.1.43-alpha.3", + "version": "2.1.43-alpha.4", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index 3ba825f1bf..901fbd4351 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.1.43-alpha.3", + "version": "2.1.43-alpha.4", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -43,11 +43,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "2.1.43-alpha.3", - "@budibase/client": "2.1.43-alpha.3", + "@budibase/backend-core": "2.1.43-alpha.4", + "@budibase/client": "2.1.43-alpha.4", "@budibase/pro": "2.1.43-alpha.3", - "@budibase/string-templates": "2.1.43-alpha.3", - "@budibase/types": "2.1.43-alpha.3", + "@budibase/string-templates": "2.1.43-alpha.4", + "@budibase/types": "2.1.43-alpha.4", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index dcee3d40f0..f1c2944797 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.1.43-alpha.3", + "version": "2.1.43-alpha.4", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index 1178f182e5..c9e14dd18c 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.1.43-alpha.3", + "version": "2.1.43-alpha.4", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index 8cc8deef2b..bdaeff19a3 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.1.43-alpha.3", + "version": "2.1.43-alpha.4", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.1.43-alpha.3", + "@budibase/backend-core": "2.1.43-alpha.4", "@budibase/pro": "2.1.43-alpha.3", - "@budibase/string-templates": "2.1.43-alpha.3", - "@budibase/types": "2.1.43-alpha.3", + "@budibase/string-templates": "2.1.43-alpha.4", + "@budibase/types": "2.1.43-alpha.4", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From d44f5308efc8793bbc0e3e3f816ead70fb11fe4b Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 5 Dec 2022 12:41:41 +0000 Subject: [PATCH 331/396] Update pro version to 2.1.43-alpha.4 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index 901fbd4351..6c2b7a2640 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -45,7 +45,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "2.1.43-alpha.4", "@budibase/client": "2.1.43-alpha.4", - "@budibase/pro": "2.1.43-alpha.3", + "@budibase/pro": "2.1.43-alpha.4", "@budibase/string-templates": "2.1.43-alpha.4", "@budibase/types": "2.1.43-alpha.4", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 8d1b18448a..d5672e059e 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1273,12 +1273,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.43-alpha.3": - version "2.1.43-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.3.tgz#d3d4c30bbda13164e8c5310240ccd7d90e8e9e23" - integrity sha512-a3GMU7NKhUs6jgQtJ4e9lY4UnvwNn6CI23vdDC5vLJlZ94hnfUxvWlI8uIm8raX1vdkwoextqHsw4RKsnA4cmQ== +"@budibase/backend-core@2.1.43-alpha.4": + version "2.1.43-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.4.tgz#8f284accc7502080fa19d7e7b2cefe9a3bcc9e5e" + integrity sha512-Thzy1Qwj0ZNF3d8y2F2aUo5Uk68lArn1mBstXjxsAJEGF2LszEAhxCmKXB0PFXy2JLIetGnyLM7rEulwMYsLPw== dependencies: - "@budibase/types" "2.1.43-alpha.3" + "@budibase/types" "2.1.43-alpha.4" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1360,13 +1360,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.1.43-alpha.3": - version "2.1.43-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.3.tgz#503cd1a850611f7508d34ce02f680a53bb28f08b" - integrity sha512-WIN6rEEIUqZrAsI7XUIHBhq5ILxU6qF8E3T7h69eigeRX61YaiuNIarwO+5vBzHP88BYyiiV3NQcf4++MJLU3w== +"@budibase/pro@2.1.43-alpha.4": + version "2.1.43-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.4.tgz#b7f853d565c42445e8615bb78107b74f82a7ec90" + integrity sha512-SMLquDsXrTLElOb7ZzQ/BnQ8nsM8FW0azdnyvKkOXT+R/FiQXbTyDje/eSXg62pu17HxXefN8Ul9keo1DIxGnQ== dependencies: - "@budibase/backend-core" "2.1.43-alpha.3" - "@budibase/types" "2.1.43-alpha.3" + "@budibase/backend-core" "2.1.43-alpha.4" + "@budibase/types" "2.1.43-alpha.4" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -1390,10 +1390,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.1.43-alpha.3": - version "2.1.43-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.3.tgz#0300f0d3c8fa5adab15f537d88a78346ce01225f" - integrity sha512-n/2dwQKt+AIpUL5aRjVYEZ3goqePKv+J0yXi67l7YWuKVROx2FeB8Erq/OR+5NgqUdnqHD/13usO6kgkmA8V3A== +"@budibase/types@2.1.43-alpha.4": + version "2.1.43-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.4.tgz#900846cb6575cc0872da33811b3de81a6277c4a3" + integrity sha512-2mDak76eINFQVZJDrOLHtpTMS9rmQ4dtkfkVLZ5TrpY71mLhF5fUBD/W6pF6iKlI4PttJjWGHCWQszKD1jdAOQ== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index bdaeff19a3..fdbab35b80 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "2.1.43-alpha.4", - "@budibase/pro": "2.1.43-alpha.3", + "@budibase/pro": "2.1.43-alpha.4", "@budibase/string-templates": "2.1.43-alpha.4", "@budibase/types": "2.1.43-alpha.4", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 45aaedbfc0..d8cc971acb 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -470,12 +470,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.43-alpha.3": - version "2.1.43-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.3.tgz#d3d4c30bbda13164e8c5310240ccd7d90e8e9e23" - integrity sha512-a3GMU7NKhUs6jgQtJ4e9lY4UnvwNn6CI23vdDC5vLJlZ94hnfUxvWlI8uIm8raX1vdkwoextqHsw4RKsnA4cmQ== +"@budibase/backend-core@2.1.43-alpha.4": + version "2.1.43-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.4.tgz#8f284accc7502080fa19d7e7b2cefe9a3bcc9e5e" + integrity sha512-Thzy1Qwj0ZNF3d8y2F2aUo5Uk68lArn1mBstXjxsAJEGF2LszEAhxCmKXB0PFXy2JLIetGnyLM7rEulwMYsLPw== dependencies: - "@budibase/types" "2.1.43-alpha.3" + "@budibase/types" "2.1.43-alpha.4" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -507,22 +507,22 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.1.43-alpha.3": - version "2.1.43-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.3.tgz#503cd1a850611f7508d34ce02f680a53bb28f08b" - integrity sha512-WIN6rEEIUqZrAsI7XUIHBhq5ILxU6qF8E3T7h69eigeRX61YaiuNIarwO+5vBzHP88BYyiiV3NQcf4++MJLU3w== +"@budibase/pro@2.1.43-alpha.4": + version "2.1.43-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.4.tgz#b7f853d565c42445e8615bb78107b74f82a7ec90" + integrity sha512-SMLquDsXrTLElOb7ZzQ/BnQ8nsM8FW0azdnyvKkOXT+R/FiQXbTyDje/eSXg62pu17HxXefN8Ul9keo1DIxGnQ== dependencies: - "@budibase/backend-core" "2.1.43-alpha.3" - "@budibase/types" "2.1.43-alpha.3" + "@budibase/backend-core" "2.1.43-alpha.4" + "@budibase/types" "2.1.43-alpha.4" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.1.43-alpha.3": - version "2.1.43-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.3.tgz#0300f0d3c8fa5adab15f537d88a78346ce01225f" - integrity sha512-n/2dwQKt+AIpUL5aRjVYEZ3goqePKv+J0yXi67l7YWuKVROx2FeB8Erq/OR+5NgqUdnqHD/13usO6kgkmA8V3A== +"@budibase/types@2.1.43-alpha.4": + version "2.1.43-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.4.tgz#900846cb6575cc0872da33811b3de81a6277c4a3" + integrity sha512-2mDak76eINFQVZJDrOLHtpTMS9rmQ4dtkfkVLZ5TrpY71mLhF5fUBD/W6pF6iKlI4PttJjWGHCWQszKD1jdAOQ== "@cspotcode/source-map-support@^0.8.0": version "0.8.1" From 0a103a9a8a2015bd60069457c1cdebed7e90f935 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 5 Dec 2022 13:10:00 +0000 Subject: [PATCH 332/396] v2.1.43-alpha.5 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 8 ++++---- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/sdk/package.json | 2 +- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lerna.json b/lerna.json index aead883445..1d8589b8f4 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.1.43-alpha.4", + "version": "2.1.43-alpha.5", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index a92b1c2489..9544034e8f 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.1.43-alpha.4", + "version": "2.1.43-alpha.5", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "2.1.43-alpha.4", + "@budibase/types": "2.1.43-alpha.5", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 09282c92da..0568fb3085 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "2.1.43-alpha.4", + "version": "2.1.43-alpha.5", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "2.1.43-alpha.4", + "@budibase/string-templates": "2.1.43-alpha.5", "@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 18bdf5ebe4..e7cd8f7847 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.1.43-alpha.4", + "version": "2.1.43-alpha.5", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.1.43-alpha.4", - "@budibase/client": "2.1.43-alpha.4", - "@budibase/frontend-core": "2.1.43-alpha.4", - "@budibase/string-templates": "2.1.43-alpha.4", + "@budibase/bbui": "2.1.43-alpha.5", + "@budibase/client": "2.1.43-alpha.5", + "@budibase/frontend-core": "2.1.43-alpha.5", + "@budibase/string-templates": "2.1.43-alpha.5", "@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 1380e06bfe..8de4028ef5 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.1.43-alpha.4", + "version": "2.1.43-alpha.5", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "2.1.43-alpha.4", - "@budibase/string-templates": "2.1.43-alpha.4", - "@budibase/types": "2.1.43-alpha.4", + "@budibase/backend-core": "2.1.43-alpha.5", + "@budibase/string-templates": "2.1.43-alpha.5", + "@budibase/types": "2.1.43-alpha.5", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index fe77fb82bd..684cc10653 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.1.43-alpha.4", + "version": "2.1.43-alpha.5", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "2.1.43-alpha.4", - "@budibase/frontend-core": "2.1.43-alpha.4", - "@budibase/string-templates": "2.1.43-alpha.4", + "@budibase/bbui": "2.1.43-alpha.5", + "@budibase/frontend-core": "2.1.43-alpha.5", + "@budibase/string-templates": "2.1.43-alpha.5", "@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 4bfdb3e759..80a6d62d8c 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.1.43-alpha.4", + "version": "2.1.43-alpha.5", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.1.43-alpha.4", + "@budibase/bbui": "2.1.43-alpha.5", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index c87a270945..1b8ae72afb 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.1.43-alpha.4", + "version": "2.1.43-alpha.5", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index 6c2b7a2640..2395d75cbb 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.1.43-alpha.4", + "version": "2.1.43-alpha.5", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -43,11 +43,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "2.1.43-alpha.4", - "@budibase/client": "2.1.43-alpha.4", + "@budibase/backend-core": "2.1.43-alpha.5", + "@budibase/client": "2.1.43-alpha.5", "@budibase/pro": "2.1.43-alpha.4", - "@budibase/string-templates": "2.1.43-alpha.4", - "@budibase/types": "2.1.43-alpha.4", + "@budibase/string-templates": "2.1.43-alpha.5", + "@budibase/types": "2.1.43-alpha.5", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index f1c2944797..fab30a939c 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.1.43-alpha.4", + "version": "2.1.43-alpha.5", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index c9e14dd18c..13eefee6f6 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.1.43-alpha.4", + "version": "2.1.43-alpha.5", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index fdbab35b80..340f638f6d 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.1.43-alpha.4", + "version": "2.1.43-alpha.5", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.1.43-alpha.4", + "@budibase/backend-core": "2.1.43-alpha.5", "@budibase/pro": "2.1.43-alpha.4", - "@budibase/string-templates": "2.1.43-alpha.4", - "@budibase/types": "2.1.43-alpha.4", + "@budibase/string-templates": "2.1.43-alpha.5", + "@budibase/types": "2.1.43-alpha.5", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 471193402481a8c3ee7f971518a68c119cddf555 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 5 Dec 2022 13:13:26 +0000 Subject: [PATCH 333/396] Update pro version to 2.1.43-alpha.5 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index 2395d75cbb..743670ca20 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -45,7 +45,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "2.1.43-alpha.5", "@budibase/client": "2.1.43-alpha.5", - "@budibase/pro": "2.1.43-alpha.4", + "@budibase/pro": "2.1.43-alpha.5", "@budibase/string-templates": "2.1.43-alpha.5", "@budibase/types": "2.1.43-alpha.5", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index d5672e059e..02dcaa0b48 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1273,12 +1273,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.43-alpha.4": - version "2.1.43-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.4.tgz#8f284accc7502080fa19d7e7b2cefe9a3bcc9e5e" - integrity sha512-Thzy1Qwj0ZNF3d8y2F2aUo5Uk68lArn1mBstXjxsAJEGF2LszEAhxCmKXB0PFXy2JLIetGnyLM7rEulwMYsLPw== +"@budibase/backend-core@2.1.43-alpha.5": + version "2.1.43-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.5.tgz#111b460861f41a16b0003c9fe26837fc34e31851" + integrity sha512-JIP2LQZeqOVtcLWxSdEVIsLX6DwWGxIbHiM6fQFuzjnwY79SRUyKKcT2AJZBkjktvNQpFTReM9vxHJbVwvTSqg== dependencies: - "@budibase/types" "2.1.43-alpha.4" + "@budibase/types" "2.1.43-alpha.5" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1360,13 +1360,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.1.43-alpha.4": - version "2.1.43-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.4.tgz#b7f853d565c42445e8615bb78107b74f82a7ec90" - integrity sha512-SMLquDsXrTLElOb7ZzQ/BnQ8nsM8FW0azdnyvKkOXT+R/FiQXbTyDje/eSXg62pu17HxXefN8Ul9keo1DIxGnQ== +"@budibase/pro@2.1.43-alpha.5": + version "2.1.43-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.5.tgz#7ba1b2002f701dab665877a9481e51af28efe05e" + integrity sha512-lKcWWquxLkJ+BhWah6zn/OnmstZvwr73HiNkJkUkd5f8plw8by6KMfyfPoyAAivjDuNzF+oOlXVZnX/IbTfCIg== dependencies: - "@budibase/backend-core" "2.1.43-alpha.4" - "@budibase/types" "2.1.43-alpha.4" + "@budibase/backend-core" "2.1.43-alpha.5" + "@budibase/types" "2.1.43-alpha.5" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -1390,10 +1390,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.1.43-alpha.4": - version "2.1.43-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.4.tgz#900846cb6575cc0872da33811b3de81a6277c4a3" - integrity sha512-2mDak76eINFQVZJDrOLHtpTMS9rmQ4dtkfkVLZ5TrpY71mLhF5fUBD/W6pF6iKlI4PttJjWGHCWQszKD1jdAOQ== +"@budibase/types@2.1.43-alpha.5": + version "2.1.43-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.5.tgz#b713dc5b8c9023ba5a0eeb5c781f972444a98a9e" + integrity sha512-7KYhAliJb9lLcFuYA26h2nb2z6WmBEI5d2W5mAwlCD78mtL9G1ofxabbZ/egc+OGMDDa6AAS/7R5zpEgueKyyw== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 340f638f6d..33c1099525 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "2.1.43-alpha.5", - "@budibase/pro": "2.1.43-alpha.4", + "@budibase/pro": "2.1.43-alpha.5", "@budibase/string-templates": "2.1.43-alpha.5", "@budibase/types": "2.1.43-alpha.5", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index d8cc971acb..7a38c64bf9 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -470,12 +470,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.43-alpha.4": - version "2.1.43-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.4.tgz#8f284accc7502080fa19d7e7b2cefe9a3bcc9e5e" - integrity sha512-Thzy1Qwj0ZNF3d8y2F2aUo5Uk68lArn1mBstXjxsAJEGF2LszEAhxCmKXB0PFXy2JLIetGnyLM7rEulwMYsLPw== +"@budibase/backend-core@2.1.43-alpha.5": + version "2.1.43-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.5.tgz#111b460861f41a16b0003c9fe26837fc34e31851" + integrity sha512-JIP2LQZeqOVtcLWxSdEVIsLX6DwWGxIbHiM6fQFuzjnwY79SRUyKKcT2AJZBkjktvNQpFTReM9vxHJbVwvTSqg== dependencies: - "@budibase/types" "2.1.43-alpha.4" + "@budibase/types" "2.1.43-alpha.5" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -507,22 +507,22 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.1.43-alpha.4": - version "2.1.43-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.4.tgz#b7f853d565c42445e8615bb78107b74f82a7ec90" - integrity sha512-SMLquDsXrTLElOb7ZzQ/BnQ8nsM8FW0azdnyvKkOXT+R/FiQXbTyDje/eSXg62pu17HxXefN8Ul9keo1DIxGnQ== +"@budibase/pro@2.1.43-alpha.5": + version "2.1.43-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.5.tgz#7ba1b2002f701dab665877a9481e51af28efe05e" + integrity sha512-lKcWWquxLkJ+BhWah6zn/OnmstZvwr73HiNkJkUkd5f8plw8by6KMfyfPoyAAivjDuNzF+oOlXVZnX/IbTfCIg== dependencies: - "@budibase/backend-core" "2.1.43-alpha.4" - "@budibase/types" "2.1.43-alpha.4" + "@budibase/backend-core" "2.1.43-alpha.5" + "@budibase/types" "2.1.43-alpha.5" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.1.43-alpha.4": - version "2.1.43-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.4.tgz#900846cb6575cc0872da33811b3de81a6277c4a3" - integrity sha512-2mDak76eINFQVZJDrOLHtpTMS9rmQ4dtkfkVLZ5TrpY71mLhF5fUBD/W6pF6iKlI4PttJjWGHCWQszKD1jdAOQ== +"@budibase/types@2.1.43-alpha.5": + version "2.1.43-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.5.tgz#b713dc5b8c9023ba5a0eeb5c781f972444a98a9e" + integrity sha512-7KYhAliJb9lLcFuYA26h2nb2z6WmBEI5d2W5mAwlCD78mtL9G1ofxabbZ/egc+OGMDDa6AAS/7R5zpEgueKyyw== "@cspotcode/source-map-support@^0.8.0": version "0.8.1" From a75ec0d7aeb448791f46556859d8c0dd96892281 Mon Sep 17 00:00:00 2001 From: Gerard Burns Date: Mon, 5 Dec 2022 14:24:53 +0000 Subject: [PATCH 334/396] Fix Skeleton Loader Jumping --- packages/client/manifest.json | 2 + .../src/components/app/forms/Form.svelte | 43 +++++++++---------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/packages/client/manifest.json b/packages/client/manifest.json index dbbb7726be..37b8cc5c8b 100644 --- a/packages/client/manifest.json +++ b/packages/client/manifest.json @@ -2598,6 +2598,7 @@ ] }, "passwordfield": { + "skeleton": false, "name": "Password Field", "icon": "LockClosed", "styles": [ @@ -3066,6 +3067,7 @@ ] }, "longformfield": { + "skeleton": false, "name": "Long Form Field", "icon": "TextAlignLeft", "styles": [ diff --git a/packages/client/src/components/app/forms/Form.svelte b/packages/client/src/components/app/forms/Form.svelte index 717bf00064..840c65f6bf 100644 --- a/packages/client/src/components/app/forms/Form.svelte +++ b/packages/client/src/components/app/forms/Form.svelte @@ -20,7 +20,6 @@ const context = getContext("context") const { API, fetchDatasourceSchema } = getContext("sdk") - let loaded = false let schema let table @@ -56,32 +55,30 @@ } const res = await fetchDatasourceSchema(dataSource) schema = res || {} - if (!loaded) { - loaded = true - } } $: initialValues = getInitialValues(actionType, dataSource, $context) $: resetKey = Helpers.hashString( - JSON.stringify(initialValues) + JSON.stringify(dataSource) + disabled + JSON.stringify(schema) + + JSON.stringify(initialValues) + + JSON.stringify(dataSource) + + disabled ) -{#if loaded} - {#key resetKey} - - - - {/key} -{/if} +{#key resetKey} + + + +{/key} From 12fdbfafb662a241439eb27faeb78a95b75f33f7 Mon Sep 17 00:00:00 2001 From: Gerard Burns Date: Mon, 5 Dec 2022 14:38:43 +0000 Subject: [PATCH 335/396] pr feedback --- packages/client/src/components/app/forms/Form.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/components/app/forms/Form.svelte b/packages/client/src/components/app/forms/Form.svelte index 840c65f6bf..977b940d1f 100644 --- a/packages/client/src/components/app/forms/Form.svelte +++ b/packages/client/src/components/app/forms/Form.svelte @@ -59,7 +59,7 @@ $: initialValues = getInitialValues(actionType, dataSource, $context) $: resetKey = Helpers.hashString( - JSON.stringify(schema) + + !!schema + JSON.stringify(initialValues) + JSON.stringify(dataSource) + disabled From 95a515ec3d4d418ae2b5209dc974d071c45e14c9 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 5 Dec 2022 18:24:25 +0000 Subject: [PATCH 336/396] Fix for #8896 - the automation logs were already being sync'd to the dev database, but when unpublished they are in-accessible. Some minor updates to make sure that before unpublishing there is a sync, and then most of the changes are in pro. --- .../server/src/api/controllers/application.ts | 152 ++++++------------ packages/server/src/api/controllers/cloud.ts | 1 + .../src/migrations/functions/appUrls.ts | 4 +- .../src/sdk/app/applications/general.ts | 19 +++ .../server/src/sdk/app/applications/index.ts | 7 + .../server/src/sdk/app/applications/sync.ts | 53 ++++++ packages/server/src/sdk/index.ts | 5 +- 7 files changed, 134 insertions(+), 107 deletions(-) create mode 100644 packages/server/src/sdk/app/applications/general.ts create mode 100644 packages/server/src/sdk/app/applications/index.ts create mode 100644 packages/server/src/sdk/app/applications/sync.ts diff --git a/packages/server/src/api/controllers/application.ts b/packages/server/src/api/controllers/application.ts index 752353893f..f2f065476e 100644 --- a/packages/server/src/api/controllers/application.ts +++ b/packages/server/src/api/controllers/application.ts @@ -26,7 +26,6 @@ import { } from "@budibase/backend-core" import { USERS_TABLE_SCHEMA } from "../../constants" import { buildDefaultDocs } from "../../db/defaultData/datasource_bb_default" - import { removeAppFromUserRoles } from "../../utilities/workerRequests" import { clientLibraryPath, @@ -39,18 +38,22 @@ import { backupClientLibrary, revertClientLibrary, } from "../../utilities/fileSystem/clientLibrary" -import { syncGlobalUsers } from "./user" import { cleanupAutomations } from "../../automations/utils" import { checkAppMetadata } from "../../automations/logging" import { getUniqueRows } from "../../utilities/usageQuota/rows" import { quotas, groups } from "@budibase/pro" -import { App, Layout, Screen, MigrationType } from "@budibase/types" +import { + App, + Layout, + Screen, + MigrationType, + BBContext, + Database, +} from "@budibase/types" import { BASE_LAYOUT_PROP_IDS } from "../../constants/layouts" import { enrichPluginURLs } from "../../utilities/plugins" import sdk from "../../sdk" -const URL_REGEX_SLASH = /\/|\\/g - // utility function, need to do away with this async function getLayouts() { const db = context.getAppDB() @@ -74,29 +77,18 @@ async function getScreens() { ).rows.map((row: any) => row.doc) } -function getUserRoleId(ctx: any) { - return !ctx.user.role || !ctx.user.role._id +function getUserRoleId(ctx: BBContext) { + return !ctx.user?.role || !ctx.user.role._id ? roles.BUILTIN_ROLE_IDS.PUBLIC : ctx.user.role._id } -export const getAppUrl = (ctx: any) => { - // construct the url - let url - if (ctx.request.body.url) { - // if the url is provided, use that - url = encodeURI(ctx.request.body.url) - } else if (ctx.request.body.name) { - // otherwise use the name - url = encodeURI(`${ctx.request.body.name}`) - } - if (url) { - url = `/${url.replace(URL_REGEX_SLASH, "")}`.toLowerCase() - } - return url -} - -const checkAppUrl = (ctx: any, apps: any, url: any, currentAppId?: string) => { +function checkAppUrl( + ctx: BBContext, + apps: App[], + url: string, + currentAppId?: string +) { if (currentAppId) { apps = apps.filter((app: any) => app.appId !== currentAppId) } @@ -105,12 +97,12 @@ const checkAppUrl = (ctx: any, apps: any, url: any, currentAppId?: string) => { } } -const checkAppName = ( - ctx: any, - apps: any, - name: any, +function checkAppName( + ctx: BBContext, + apps: App[], + name: string, currentAppId?: string -) => { +) { // TODO: Replace with Joi if (!name) { ctx.throw(400, "Name is required") @@ -165,14 +157,14 @@ async function createInstance(template: any, includeSampleData: boolean) { return { _id: appId } } -const addDefaultTables = async (db: any) => { +async function addDefaultTables(db: Database) { const defaultDbDocs = buildDefaultDocs() // add in the default db data docs - tables, datasource, rows and links await db.bulkDocs([...defaultDbDocs]) } -export const fetch = async (ctx: any) => { +export async function fetch(ctx: BBContext) { const dev = ctx.query && ctx.query.status === AppStatus.DEV const all = ctx.query && ctx.query.status === AppStatus.ALL const apps = (await dbCore.getAllApps({ dev, all })) as App[] @@ -197,7 +189,7 @@ export const fetch = async (ctx: any) => { ctx.body = await checkAppMetadata(apps) } -export const fetchAppDefinition = async (ctx: any) => { +export async function fetchAppDefinition(ctx: BBContext) { const layouts = await getLayouts() const userRoleId = getUserRoleId(ctx) const accessController = new roles.AccessController() @@ -212,7 +204,7 @@ export const fetchAppDefinition = async (ctx: any) => { } } -export const fetchAppPackage = async (ctx: any) => { +export async function fetchAppPackage(ctx: BBContext) { const db = context.getAppDB() let application = await db.get(DocumentType.APP_METADATA) const layouts = await getLayouts() @@ -222,7 +214,7 @@ export const fetchAppPackage = async (ctx: any) => { application.usedPlugins = enrichPluginURLs(application.usedPlugins) // Only filter screens if the user is not a builder - if (!(ctx.user.builder && ctx.user.builder.global)) { + if (!(ctx.user?.builder && ctx.user.builder.global)) { const userRoleId = getUserRoleId(ctx) const accessController = new roles.AccessController() screens = await accessController.checkScreensAccess(screens, userRoleId) @@ -236,11 +228,11 @@ export const fetchAppPackage = async (ctx: any) => { } } -const performAppCreate = async (ctx: any) => { - const apps = await dbCore.getAllApps({ dev: true }) +async function performAppCreate(ctx: BBContext) { + const apps = (await dbCore.getAllApps({ dev: true })) as App[] const name = ctx.request.body.name checkAppName(ctx, apps, name) - const url = getAppUrl(ctx) + const url = sdk.applications.getAppUrl(ctx) checkAppUrl(ctx, apps, url) const { useTemplate, templateKey, templateString } = ctx.request.body @@ -331,7 +323,7 @@ const performAppCreate = async (ctx: any) => { return newApplication } -const creationEvents = async (request: any, app: App) => { +async function creationEvents(request: any, app: App) { let creationFns: ((app: App) => Promise)[] = [] const body = request.body @@ -356,7 +348,7 @@ const creationEvents = async (request: any, app: App) => { } } -const appPostCreate = async (ctx: any, app: App) => { +async function appPostCreate(ctx: BBContext, app: App) { const tenantId = tenancy.getTenantId() await migrations.backPopulateMigrations({ type: MigrationType.APP, @@ -377,7 +369,7 @@ const appPostCreate = async (ctx: any, app: App) => { if (err.code && err.code === errors.codes.USAGE_LIMIT_EXCEEDED) { // this import resulted in row usage exceeding the quota // delete the app - // skip pre and post steps as no rows have been added to quotas yet + // skip pre- and post-steps as no rows have been added to quotas yet ctx.params.appId = app.appId await destroyApp(ctx) } @@ -387,7 +379,7 @@ const appPostCreate = async (ctx: any, app: App) => { } } -export const create = async (ctx: any) => { +export async function create(ctx: BBContext) { const newApplication = await quotas.addApp(() => performAppCreate(ctx)) await appPostCreate(ctx, newApplication) await cache.bustCache(cache.CacheKey.CHECKLIST) @@ -397,14 +389,14 @@ export const create = async (ctx: any) => { // This endpoint currently operates as a PATCH rather than a PUT // Thus name and url fields are handled only if present -export const update = async (ctx: any) => { - const apps = await dbCore.getAllApps({ dev: true }) +export async function update(ctx: BBContext) { + const apps = (await dbCore.getAllApps({ dev: true })) as App[] // validation const name = ctx.request.body.name if (name) { checkAppName(ctx, apps, name, ctx.params.appId) } - const url = getAppUrl(ctx) + const url = sdk.applications.getAppUrl(ctx) if (url) { checkAppUrl(ctx, apps, url, ctx.params.appId) ctx.request.body.url = url @@ -416,7 +408,7 @@ export const update = async (ctx: any) => { ctx.body = app } -export const updateClient = async (ctx: any) => { +export async function updateClient(ctx: BBContext) { // Get current app version const db = context.getAppDB() const application = await db.get(DocumentType.APP_METADATA) @@ -440,7 +432,7 @@ export const updateClient = async (ctx: any) => { ctx.body = app } -export const revertClient = async (ctx: any) => { +export async function revertClient(ctx: BBContext) { // Check app can be reverted const db = context.getAppDB() const application = await db.get(DocumentType.APP_METADATA) @@ -466,12 +458,14 @@ export const revertClient = async (ctx: any) => { ctx.body = app } -const destroyApp = async (ctx: any) => { +async function destroyApp(ctx: BBContext) { let appId = ctx.params.appId let isUnpublish = ctx.query && ctx.query.unpublish if (isUnpublish) { appId = dbCore.getProdAppID(appId) + // sync before removing the published app + await sdk.applications.syncApp(appId) } const db = isUnpublish ? context.getProdAppDB() : context.getAppDB() @@ -501,12 +495,12 @@ const destroyApp = async (ctx: any) => { return result } -const preDestroyApp = async (ctx: any) => { +async function preDestroyApp(ctx: BBContext) { const { rows } = await getUniqueRows([ctx.params.appId]) ctx.rowCount = rows.length } -const postDestroyApp = async (ctx: any) => { +async function postDestroyApp(ctx: BBContext) { const rowCount = ctx.rowCount await groups.cleanupApp(ctx.params.appId) if (rowCount) { @@ -514,7 +508,7 @@ const postDestroyApp = async (ctx: any) => { } } -export const destroy = async (ctx: any) => { +export async function destroy(ctx: BBContext) { await preDestroyApp(ctx) const result = await destroyApp(ctx) await postDestroyApp(ctx) @@ -522,62 +516,16 @@ export const destroy = async (ctx: any) => { ctx.body = result } -export const sync = async (ctx: any, next: any) => { - if (env.DISABLE_AUTO_PROD_APP_SYNC) { - ctx.status = 200 - ctx.body = { - message: - "App sync disabled. You can reenable with the DISABLE_AUTO_PROD_APP_SYNC environment variable.", - } - return next() - } - +export async function sync(ctx: BBContext) { const appId = ctx.params.appId - if (!dbCore.isDevAppID(appId)) { - ctx.throw(400, "This action cannot be performed for production apps") - } - - // replicate prod to dev - const prodAppId = dbCore.getProdAppID(appId) - - // specific case, want to make sure setup is skipped - const prodDb = context.getProdAppDB({ skip_setup: true }) - const exists = await prodDb.exists() - if (!exists) { - // the database doesn't exist. Don't replicate - ctx.status = 200 - ctx.body = { - message: "App sync not required, app not deployed.", - } - return next() - } - - const replication = new dbCore.Replication({ - source: prodAppId, - target: appId, - }) - let error try { - await replication.replicate(replication.appReplicateOpts()) - } catch (err) { - error = err - } finally { - await replication.close() - } - - // sync the users - await syncGlobalUsers() - - if (error) { - ctx.throw(400, error) - } else { - ctx.body = { - message: "App sync completed successfully.", - } + ctx.body = await sdk.applications.syncApp(appId) + } catch (err: any) { + ctx.throw(err.status || 400, err.message) } } -export const updateAppPackage = async (appPackage: any, appId: any) => { +export async function updateAppPackage(appPackage: any, appId: any) { return context.doInAppContext(appId, async () => { const db = context.getAppDB() const application = await db.get(DocumentType.APP_METADATA) @@ -598,7 +546,7 @@ export const updateAppPackage = async (appPackage: any, appId: any) => { }) } -const migrateAppNavigation = async () => { +async function migrateAppNavigation() { const db = context.getAppDB() const existing: App = await db.get(DocumentType.APP_METADATA) const layouts: Layout[] = await getLayouts() diff --git a/packages/server/src/api/controllers/cloud.ts b/packages/server/src/api/controllers/cloud.ts index 41c21d534a..f8f7a27d00 100644 --- a/packages/server/src/api/controllers/cloud.ts +++ b/packages/server/src/api/controllers/cloud.ts @@ -22,6 +22,7 @@ async function createApp(appName: string, appDirectory: string) { }, }, } + // @ts-ignore return create(ctx) } diff --git a/packages/server/src/migrations/functions/appUrls.ts b/packages/server/src/migrations/functions/appUrls.ts index 4d5ce6c30c..30ce09e188 100644 --- a/packages/server/src/migrations/functions/appUrls.ts +++ b/packages/server/src/migrations/functions/appUrls.ts @@ -1,5 +1,5 @@ import { db as dbCore } from "@budibase/backend-core" -import { getAppUrl } from "../../api/controllers/application" +import sdk from "../../sdk" /** * Date: @@ -27,7 +27,7 @@ export const run = async (appDb: any) => { }, }, } - metadata.url = getAppUrl(context) + metadata.url = sdk.applications.getAppUrl(context) console.log(`Adding url to app: ${metadata.url}`) await appDb.put(metadata) } diff --git a/packages/server/src/sdk/app/applications/general.ts b/packages/server/src/sdk/app/applications/general.ts new file mode 100644 index 0000000000..4de94c1b92 --- /dev/null +++ b/packages/server/src/sdk/app/applications/general.ts @@ -0,0 +1,19 @@ +const URL_REGEX_SLASH = /\/|\\/g + +export function getAppUrl(ctx: { + request: { body: { name?: string; url?: string } } +}) { + // construct the url + let url + if (ctx.request.body.url) { + // if the url is provided, use that + url = encodeURI(ctx.request.body.url) + } else if (ctx.request.body.name) { + // otherwise use the name + url = encodeURI(`${ctx.request.body.name}`) + } + if (url) { + url = `/${url.replace(URL_REGEX_SLASH, "")}`.toLowerCase() + } + return url as string +} diff --git a/packages/server/src/sdk/app/applications/index.ts b/packages/server/src/sdk/app/applications/index.ts new file mode 100644 index 0000000000..17100a08ff --- /dev/null +++ b/packages/server/src/sdk/app/applications/index.ts @@ -0,0 +1,7 @@ +import * as sync from "./sync" +import * as general from "./general" + +export default { + ...sync, + ...general, +} diff --git a/packages/server/src/sdk/app/applications/sync.ts b/packages/server/src/sdk/app/applications/sync.ts new file mode 100644 index 0000000000..71931dde21 --- /dev/null +++ b/packages/server/src/sdk/app/applications/sync.ts @@ -0,0 +1,53 @@ +import env from "../../../environment" +import { syncGlobalUsers } from "../../../api/controllers/user" +import { db as dbCore, context } from "@budibase/backend-core" + +export async function syncApp(appId: string) { + if (env.DISABLE_AUTO_PROD_APP_SYNC) { + return { + message: + "App sync disabled. You can reenable with the DISABLE_AUTO_PROD_APP_SYNC environment variable.", + } + } + + if (!dbCore.isDevAppID(appId)) { + throw new Error("This action cannot be performed for production apps") + } + + // replicate prod to dev + const prodAppId = dbCore.getProdAppID(appId) + + // specific case, want to make sure setup is skipped + const prodDb = context.getProdAppDB({ skip_setup: true }) + const exists = await prodDb.exists() + if (!exists) { + // the database doesn't exist. Don't replicate + return { + message: "App sync not required, app not deployed.", + } + } + + const replication = new dbCore.Replication({ + source: prodAppId, + target: appId, + }) + let error + try { + await replication.replicate(replication.appReplicateOpts()) + } catch (err) { + error = err + } finally { + await replication.close() + } + + // sync the users + await syncGlobalUsers() + + if (error) { + throw error + } else { + return { + message: "App sync completed successfully.", + } + } +} diff --git a/packages/server/src/sdk/index.ts b/packages/server/src/sdk/index.ts index 1f7a365e90..b80ded90fa 100644 --- a/packages/server/src/sdk/index.ts +++ b/packages/server/src/sdk/index.ts @@ -1,15 +1,14 @@ import { default as backups } from "./app/backups" import { default as tables } from "./app/tables" import { default as automations } from "./app/automations" +import { default as applications } from "./app/applications" const sdk = { backups, tables, automations, + applications, } // default export for TS export default sdk - -// default export for JS -module.exports = sdk From 4eadbd1e1d5813e767c1bdb66772f99dfc793f3b Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 5 Dec 2022 18:25:31 +0000 Subject: [PATCH 337/396] v2.1.43-alpha.6 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 8 ++++---- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/sdk/package.json | 2 +- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lerna.json b/lerna.json index 1d8589b8f4..d9de893102 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.1.43-alpha.5", + "version": "2.1.43-alpha.6", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 9544034e8f..f6aa340d0c 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.1.43-alpha.5", + "version": "2.1.43-alpha.6", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "2.1.43-alpha.5", + "@budibase/types": "2.1.43-alpha.6", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 0568fb3085..41304f09d7 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "2.1.43-alpha.5", + "version": "2.1.43-alpha.6", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "2.1.43-alpha.5", + "@budibase/string-templates": "2.1.43-alpha.6", "@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 e7cd8f7847..eba71538d8 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.1.43-alpha.5", + "version": "2.1.43-alpha.6", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.1.43-alpha.5", - "@budibase/client": "2.1.43-alpha.5", - "@budibase/frontend-core": "2.1.43-alpha.5", - "@budibase/string-templates": "2.1.43-alpha.5", + "@budibase/bbui": "2.1.43-alpha.6", + "@budibase/client": "2.1.43-alpha.6", + "@budibase/frontend-core": "2.1.43-alpha.6", + "@budibase/string-templates": "2.1.43-alpha.6", "@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 8de4028ef5..dbb8747a6b 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.1.43-alpha.5", + "version": "2.1.43-alpha.6", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "2.1.43-alpha.5", - "@budibase/string-templates": "2.1.43-alpha.5", - "@budibase/types": "2.1.43-alpha.5", + "@budibase/backend-core": "2.1.43-alpha.6", + "@budibase/string-templates": "2.1.43-alpha.6", + "@budibase/types": "2.1.43-alpha.6", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index 684cc10653..2aa3c598f1 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.1.43-alpha.5", + "version": "2.1.43-alpha.6", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "2.1.43-alpha.5", - "@budibase/frontend-core": "2.1.43-alpha.5", - "@budibase/string-templates": "2.1.43-alpha.5", + "@budibase/bbui": "2.1.43-alpha.6", + "@budibase/frontend-core": "2.1.43-alpha.6", + "@budibase/string-templates": "2.1.43-alpha.6", "@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 80a6d62d8c..18114b3066 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.1.43-alpha.5", + "version": "2.1.43-alpha.6", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.1.43-alpha.5", + "@budibase/bbui": "2.1.43-alpha.6", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 1b8ae72afb..8250399f5c 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.1.43-alpha.5", + "version": "2.1.43-alpha.6", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index 743670ca20..60e5bbbd4e 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.1.43-alpha.5", + "version": "2.1.43-alpha.6", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -43,11 +43,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "2.1.43-alpha.5", - "@budibase/client": "2.1.43-alpha.5", + "@budibase/backend-core": "2.1.43-alpha.6", + "@budibase/client": "2.1.43-alpha.6", "@budibase/pro": "2.1.43-alpha.5", - "@budibase/string-templates": "2.1.43-alpha.5", - "@budibase/types": "2.1.43-alpha.5", + "@budibase/string-templates": "2.1.43-alpha.6", + "@budibase/types": "2.1.43-alpha.6", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index fab30a939c..eba89d57a6 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.1.43-alpha.5", + "version": "2.1.43-alpha.6", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index 13eefee6f6..d07421e840 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.1.43-alpha.5", + "version": "2.1.43-alpha.6", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index 33c1099525..53bdd0c740 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.1.43-alpha.5", + "version": "2.1.43-alpha.6", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.1.43-alpha.5", + "@budibase/backend-core": "2.1.43-alpha.6", "@budibase/pro": "2.1.43-alpha.5", - "@budibase/string-templates": "2.1.43-alpha.5", - "@budibase/types": "2.1.43-alpha.5", + "@budibase/string-templates": "2.1.43-alpha.6", + "@budibase/types": "2.1.43-alpha.6", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 95b332a351854ef8d95cbd20d25677c23df8756e Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 5 Dec 2022 18:29:19 +0000 Subject: [PATCH 338/396] Update pro version to 2.1.43-alpha.6 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index 60e5bbbd4e..8f8d864465 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -45,7 +45,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "2.1.43-alpha.6", "@budibase/client": "2.1.43-alpha.6", - "@budibase/pro": "2.1.43-alpha.5", + "@budibase/pro": "2.1.43-alpha.6", "@budibase/string-templates": "2.1.43-alpha.6", "@budibase/types": "2.1.43-alpha.6", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 02dcaa0b48..3ef6255935 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1273,12 +1273,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.43-alpha.5": - version "2.1.43-alpha.5" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.5.tgz#111b460861f41a16b0003c9fe26837fc34e31851" - integrity sha512-JIP2LQZeqOVtcLWxSdEVIsLX6DwWGxIbHiM6fQFuzjnwY79SRUyKKcT2AJZBkjktvNQpFTReM9vxHJbVwvTSqg== +"@budibase/backend-core@2.1.43-alpha.6": + version "2.1.43-alpha.6" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.6.tgz#26edec27b410061c7c75e77704e3c6d8d2ab0376" + integrity sha512-hYHRky4ByX+y1TJbdZ1dup/eU0/MDRNc5v84GHZFzDBG5ZLafm88xUBkX6hPIV+vgowEq18d/AXPgVJlZYBGRw== dependencies: - "@budibase/types" "2.1.43-alpha.5" + "@budibase/types" "2.1.43-alpha.6" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1360,13 +1360,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.1.43-alpha.5": - version "2.1.43-alpha.5" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.5.tgz#7ba1b2002f701dab665877a9481e51af28efe05e" - integrity sha512-lKcWWquxLkJ+BhWah6zn/OnmstZvwr73HiNkJkUkd5f8plw8by6KMfyfPoyAAivjDuNzF+oOlXVZnX/IbTfCIg== +"@budibase/pro@2.1.43-alpha.6": + version "2.1.43-alpha.6" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.6.tgz#1f178e44e730920eade432db2e5c2a5f04d13331" + integrity sha512-jCCCMnlUbM/A1W/8usO0PDeUHfWMwiT00Jfjaa61gYawGJnCVRE+H+MulbZTIBRwDGnFEh1OwNBT4bc9qIyHhA== dependencies: - "@budibase/backend-core" "2.1.43-alpha.5" - "@budibase/types" "2.1.43-alpha.5" + "@budibase/backend-core" "2.1.43-alpha.6" + "@budibase/types" "2.1.43-alpha.6" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -1390,10 +1390,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.1.43-alpha.5": - version "2.1.43-alpha.5" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.5.tgz#b713dc5b8c9023ba5a0eeb5c781f972444a98a9e" - integrity sha512-7KYhAliJb9lLcFuYA26h2nb2z6WmBEI5d2W5mAwlCD78mtL9G1ofxabbZ/egc+OGMDDa6AAS/7R5zpEgueKyyw== +"@budibase/types@2.1.43-alpha.6": + version "2.1.43-alpha.6" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.6.tgz#27312006021705a07b4e4ef8971f9c6c6689f628" + integrity sha512-XqHZevC7yUBAQcOhWbbr1YG084jX/WMo7b06eeL4bRHrGL815rlVGNTp4ksFi0+K3AZDuIyVrVaU4FLM9UgFUA== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 53bdd0c740..ecbca53a93 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "2.1.43-alpha.6", - "@budibase/pro": "2.1.43-alpha.5", + "@budibase/pro": "2.1.43-alpha.6", "@budibase/string-templates": "2.1.43-alpha.6", "@budibase/types": "2.1.43-alpha.6", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 7a38c64bf9..1d17fb31e8 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -470,12 +470,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.43-alpha.5": - version "2.1.43-alpha.5" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.5.tgz#111b460861f41a16b0003c9fe26837fc34e31851" - integrity sha512-JIP2LQZeqOVtcLWxSdEVIsLX6DwWGxIbHiM6fQFuzjnwY79SRUyKKcT2AJZBkjktvNQpFTReM9vxHJbVwvTSqg== +"@budibase/backend-core@2.1.43-alpha.6": + version "2.1.43-alpha.6" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.6.tgz#26edec27b410061c7c75e77704e3c6d8d2ab0376" + integrity sha512-hYHRky4ByX+y1TJbdZ1dup/eU0/MDRNc5v84GHZFzDBG5ZLafm88xUBkX6hPIV+vgowEq18d/AXPgVJlZYBGRw== dependencies: - "@budibase/types" "2.1.43-alpha.5" + "@budibase/types" "2.1.43-alpha.6" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -507,22 +507,22 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.1.43-alpha.5": - version "2.1.43-alpha.5" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.5.tgz#7ba1b2002f701dab665877a9481e51af28efe05e" - integrity sha512-lKcWWquxLkJ+BhWah6zn/OnmstZvwr73HiNkJkUkd5f8plw8by6KMfyfPoyAAivjDuNzF+oOlXVZnX/IbTfCIg== +"@budibase/pro@2.1.43-alpha.6": + version "2.1.43-alpha.6" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.6.tgz#1f178e44e730920eade432db2e5c2a5f04d13331" + integrity sha512-jCCCMnlUbM/A1W/8usO0PDeUHfWMwiT00Jfjaa61gYawGJnCVRE+H+MulbZTIBRwDGnFEh1OwNBT4bc9qIyHhA== dependencies: - "@budibase/backend-core" "2.1.43-alpha.5" - "@budibase/types" "2.1.43-alpha.5" + "@budibase/backend-core" "2.1.43-alpha.6" + "@budibase/types" "2.1.43-alpha.6" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.1.43-alpha.5": - version "2.1.43-alpha.5" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.5.tgz#b713dc5b8c9023ba5a0eeb5c781f972444a98a9e" - integrity sha512-7KYhAliJb9lLcFuYA26h2nb2z6WmBEI5d2W5mAwlCD78mtL9G1ofxabbZ/egc+OGMDDa6AAS/7R5zpEgueKyyw== +"@budibase/types@2.1.43-alpha.6": + version "2.1.43-alpha.6" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.6.tgz#27312006021705a07b4e4ef8971f9c6c6689f628" + integrity sha512-XqHZevC7yUBAQcOhWbbr1YG084jX/WMo7b06eeL4bRHrGL815rlVGNTp4ksFi0+K3AZDuIyVrVaU4FLM9UgFUA== "@cspotcode/source-map-support@^0.8.0": version "0.8.1" From e56b5cde90392526bb655387025d62d1560fbb1f Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 6 Dec 2022 09:55:25 +0000 Subject: [PATCH 339/396] Hide content when side panel is hidden to avoid stale data being shown when re-revealing side panel --- packages/client/src/components/app/SidePanel.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/client/src/components/app/SidePanel.svelte b/packages/client/src/components/app/SidePanel.svelte index ed4216fa93..8731c7191e 100644 --- a/packages/client/src/components/app/SidePanel.svelte +++ b/packages/client/src/components/app/SidePanel.svelte @@ -57,7 +57,9 @@ class="side-panel" class:open > - + {#if $sidePanelStore.open} + + {/if}