From 71a55eb288efea9dbf5e856616517f87e01862fb Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Tue, 26 Jul 2022 10:53:53 +0100 Subject: [PATCH 01/12] Support ObjectId in operator blocks --- packages/server/src/integrations/mongodb.ts | 6 ++-- packages/server/yarn.lock | 35 ++++++++++++--------- packages/worker/yarn.lock | 35 ++++++++++++--------- 3 files changed, 43 insertions(+), 33 deletions(-) diff --git a/packages/server/src/integrations/mongodb.ts b/packages/server/src/integrations/mongodb.ts index 802696ff40..70b4be9e14 100644 --- a/packages/server/src/integrations/mongodb.ts +++ b/packages/server/src/integrations/mongodb.ts @@ -92,12 +92,12 @@ module MongoDBModule { if (json[field] instanceof Object) { json[field] = self.createObjectIds(json[field]) } - if (field === "_id" && typeof json[field] === "string") { - const id = json["_id"].match( + if ((field === "_id" || field?.startsWith("$")) && typeof json[field] === "string") { + const id = json[field].match( /(?<=objectid\(['"]).*(?=['"]\))/gi )?.[0] if (id) { - json["_id"] = ObjectID.createFromHexString(id) + json[field] = ObjectID.createFromHexString(id) } } } diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 2018d4ec5a..fe229cc137 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1094,12 +1094,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.1.21": - version "1.1.21" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.1.21.tgz#660e0023f674189b25ca5eabbaff67aebcdf03b8" - integrity sha512-qEf9ggMX6NpVOTe1xfp6NZnbdBV0h0ls9qGGTcMjPakhatB4+3YKSTEDSYYRzY/OLNoKPhcd3aErXuFRR7WKrg== +"@budibase/backend-core@1.1.22-alpha.0": + version "1.1.22-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.1.22-alpha.0.tgz#2a090a723d35ce4a2e377ac0927fe127213bcbb3" + integrity sha512-77gxcPrjejdqaMaMkbrCS0glYA1jdGo74NpCxdadWx+suU4SMTmOt2jgnEZg20aeKcky2xTpVbjDxIq+Fb2J+g== dependencies: - "@budibase/types" "^1.1.21" + "@budibase/types" "^1.1.22-alpha.0" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -1177,13 +1177,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.1.21": - version "1.1.21" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.1.21.tgz#c9d21bc82740e9407673088dc8451273368943d9" - integrity sha512-aE20qZmVg/sPp4bV++xwdUnp8+c9wq7Df34P9hYvlhklgh+fxd+2RyautOAfMADRMIZIbtP4/gal95bE/KTPNQ== +"@budibase/pro@1.1.22-alpha.0": + version "1.1.22-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.1.22-alpha.0.tgz#5718188fbc76ce3c3cf3c633c99c6e59f5846310" + integrity sha512-QL5bhT/BJnoKVV5XH5+s3jSCBzV/JGOy8YQObEjZgCrtTWUjdvMrm5pFinflFGriCfoArmvR3Q51FBpNJQfaag== dependencies: - "@budibase/backend-core" "1.1.21" - "@budibase/types" "1.1.21" + "@budibase/backend-core" "1.1.22-alpha.0" + "@budibase/types" "1.1.22-alpha.0" node-fetch "^2.6.1" "@budibase/standard-components@^0.9.139": @@ -1204,10 +1204,15 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.1.21", "@budibase/types@^1.1.21": - version "1.1.21" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.1.21.tgz#4f46cd52f3e52c804e5dba06b0520825da81f84e" - integrity sha512-fR8783evr6SKZggu/QZRgcZfd8SAuG2U+xO8lL0x/pLNZI1vOeTyQXASoPLLzj6uA8bWnPIy8BGd9PK4Mw3XVQ== +"@budibase/types@1.1.22-alpha.0": + version "1.1.22-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.1.22-alpha.0.tgz#85fb7f37773c710e8232c95104095c26a8dd22ca" + integrity sha512-1gRwAtjEl7Ug1jrYwD9Iudbfgs37nndEBEB6yVdNPKA5SpjG+Fwx30zp6R961zlx1vsSu4iMdwM8IbMsCM8p1g== + +"@budibase/types@^1.1.22-alpha.0": + version "1.1.22" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.1.22.tgz#a73a8315ad6a04bf0709f2b51cb35058442ce723" + integrity sha512-24sun/hZ2OJZdavhiJt+S8Aip+RdlKeTyUrkf7OuRCUqbxgEIR2J9QOKBSEumuckwTcpzJHBAm4P4G3dXX5Neg== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 60bbdef6b8..1fa3281b49 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -291,12 +291,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.1.21": - version "1.1.21" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.1.21.tgz#660e0023f674189b25ca5eabbaff67aebcdf03b8" - integrity sha512-qEf9ggMX6NpVOTe1xfp6NZnbdBV0h0ls9qGGTcMjPakhatB4+3YKSTEDSYYRzY/OLNoKPhcd3aErXuFRR7WKrg== +"@budibase/backend-core@1.1.22-alpha.0": + version "1.1.22-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.1.22-alpha.0.tgz#2a090a723d35ce4a2e377ac0927fe127213bcbb3" + integrity sha512-77gxcPrjejdqaMaMkbrCS0glYA1jdGo74NpCxdadWx+suU4SMTmOt2jgnEZg20aeKcky2xTpVbjDxIq+Fb2J+g== dependencies: - "@budibase/types" "^1.1.21" + "@budibase/types" "^1.1.22-alpha.0" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -324,19 +324,24 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.1.21": - version "1.1.21" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.1.21.tgz#c9d21bc82740e9407673088dc8451273368943d9" - integrity sha512-aE20qZmVg/sPp4bV++xwdUnp8+c9wq7Df34P9hYvlhklgh+fxd+2RyautOAfMADRMIZIbtP4/gal95bE/KTPNQ== +"@budibase/pro@1.1.22-alpha.0": + version "1.1.22-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.1.22-alpha.0.tgz#5718188fbc76ce3c3cf3c633c99c6e59f5846310" + integrity sha512-QL5bhT/BJnoKVV5XH5+s3jSCBzV/JGOy8YQObEjZgCrtTWUjdvMrm5pFinflFGriCfoArmvR3Q51FBpNJQfaag== dependencies: - "@budibase/backend-core" "1.1.21" - "@budibase/types" "1.1.21" + "@budibase/backend-core" "1.1.22-alpha.0" + "@budibase/types" "1.1.22-alpha.0" node-fetch "^2.6.1" -"@budibase/types@1.1.21", "@budibase/types@^1.1.21": - version "1.1.21" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.1.21.tgz#4f46cd52f3e52c804e5dba06b0520825da81f84e" - integrity sha512-fR8783evr6SKZggu/QZRgcZfd8SAuG2U+xO8lL0x/pLNZI1vOeTyQXASoPLLzj6uA8bWnPIy8BGd9PK4Mw3XVQ== +"@budibase/types@1.1.22-alpha.0": + version "1.1.22-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.1.22-alpha.0.tgz#85fb7f37773c710e8232c95104095c26a8dd22ca" + integrity sha512-1gRwAtjEl7Ug1jrYwD9Iudbfgs37nndEBEB6yVdNPKA5SpjG+Fwx30zp6R961zlx1vsSu4iMdwM8IbMsCM8p1g== + +"@budibase/types@^1.1.22-alpha.0": + version "1.1.22" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.1.22.tgz#a73a8315ad6a04bf0709f2b51cb35058442ce723" + integrity sha512-24sun/hZ2OJZdavhiJt+S8Aip+RdlKeTyUrkf7OuRCUqbxgEIR2J9QOKBSEumuckwTcpzJHBAm4P4G3dXX5Neg== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From 4cc0a327a052270da83a943a9ca502b41237fca3 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Tue, 26 Jul 2022 11:38:34 +0100 Subject: [PATCH 02/12] lint --- packages/server/src/integrations/mongodb.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/server/src/integrations/mongodb.ts b/packages/server/src/integrations/mongodb.ts index 70b4be9e14..e300715781 100644 --- a/packages/server/src/integrations/mongodb.ts +++ b/packages/server/src/integrations/mongodb.ts @@ -92,7 +92,10 @@ module MongoDBModule { if (json[field] instanceof Object) { json[field] = self.createObjectIds(json[field]) } - if ((field === "_id" || field?.startsWith("$")) && typeof json[field] === "string") { + if ( + (field === "_id" || field?.startsWith("$")) && + typeof json[field] === "string" + ) { const id = json[field].match( /(?<=objectid\(['"]).*(?=['"]\))/gi )?.[0] From c289d728164a5b75848aa709ff140eeba0a49416 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Mon, 8 Aug 2022 17:01:56 +0100 Subject: [PATCH 03/12] Add unit tests for ObjectId --- packages/server/__mocks__/mongodb.ts | 2 + .../src/integrations/tests/mongo.spec.js | 66 +++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/packages/server/__mocks__/mongodb.ts b/packages/server/__mocks__/mongodb.ts index 2a03dc7a7b..3b6db96b78 100644 --- a/packages/server/__mocks__/mongodb.ts +++ b/packages/server/__mocks__/mongodb.ts @@ -31,5 +31,7 @@ module MongoMock { }) } + mongodb.ObjectID = require("mongodb").ObjectID + module.exports = mongodb } diff --git a/packages/server/src/integrations/tests/mongo.spec.js b/packages/server/src/integrations/tests/mongo.spec.js index b0a49521ec..f866048e4b 100644 --- a/packages/server/src/integrations/tests/mongo.spec.js +++ b/packages/server/src/integrations/tests/mongo.spec.js @@ -102,4 +102,70 @@ describe("MongoDB Integration", () => { expect(error).toBeDefined() restore() }) + + it("creates ObjectIds if the _id fields contains a match on ObjectId", async () => { + const query = { + json: { + filter: { + _id: "ObjectId('ACBD12345678ABCD12345678')", + name: "ObjectId('name')" + }, + update: { + _id: "ObjectId('FFFF12345678ABCD12345678')", + name: "ObjectId('updatedName')", + }, + options: { + upsert: false, + }, + }, + extra: { collection: "testCollection", actionTypes: "updateOne" }, + } + await config.integration.update(query) + expect(config.integration.client.updateOne).toHaveBeenCalled() + + const args = config.integration.client.updateOne.mock.calls[0] + expect(args[0]).toEqual({ + _id: mongo.ObjectID.createFromHexString("ACBD12345678ABCD12345678"), + name: "ObjectId('name')", + }) + expect(args[1]).toEqual({ + _id: mongo.ObjectID.createFromHexString("FFFF12345678ABCD12345678"), + name: "ObjectId('updatedName')", + }) + }) + + it("creates ObjectIds if the $ operator fields contains a match on ObjectId", async () => { + const query = { + json: { + filter: { + _id: { + $eq: "ObjectId('ACBD12345678ABCD12345678')", + } + }, + update: { + $set: { + _id: "ObjectId('FFFF12345678ABCD12345678')", + }, + }, + options: { + upsert: false, + }, + }, + extra: { collection: "testCollection", actionTypes: "updateOne" }, + } + await config.integration.update(query) + expect(config.integration.client.updateOne).toHaveBeenCalled() + + const args = config.integration.client.updateOne.mock.calls[0] + expect(args[0]).toEqual({ + _id: { + $eq: mongo.ObjectID.createFromHexString("ACBD12345678ABCD12345678"), + } + }) + expect(args[1]).toEqual({ + $set: { + _id: mongo.ObjectID.createFromHexString("FFFF12345678ABCD12345678"), + } + }) + }) }) From fe0163ac292e64224f700f92a79b15f3884fd333 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Mon, 8 Aug 2022 17:53:17 +0100 Subject: [PATCH 04/12] Bug fix findOneAndUpdate --- packages/server/__mocks__/mongodb.ts | 2 + packages/server/src/integrations/mongodb.ts | 5 +- .../src/integrations/tests/mongo.spec.js | 48 ++++++++++++++++++- 3 files changed, 53 insertions(+), 2 deletions(-) diff --git a/packages/server/__mocks__/mongodb.ts b/packages/server/__mocks__/mongodb.ts index 3b6db96b78..92ec89227f 100644 --- a/packages/server/__mocks__/mongodb.ts +++ b/packages/server/__mocks__/mongodb.ts @@ -8,6 +8,7 @@ module MongoMock { this.insertMany = jest.fn(() => ({ toArray: () => [] })) this.find = jest.fn(() => ({ toArray: () => [] })) this.findOne = jest.fn() + this.findOneAndUpdate = jest.fn() this.count = jest.fn() this.deleteOne = jest.fn() this.deleteMany = jest.fn(() => ({ toArray: () => [] })) @@ -19,6 +20,7 @@ module MongoMock { find: this.find, insertMany: this.insertMany, findOne: this.findOne, + findOneAndUpdate: this.findOneAndUpdate, count: this.count, deleteOne: this.deleteOne, deleteMany: this.deleteMany, diff --git a/packages/server/src/integrations/mongodb.ts b/packages/server/src/integrations/mongodb.ts index e300715781..a520cdb157 100644 --- a/packages/server/src/integrations/mongodb.ts +++ b/packages/server/src/integrations/mongodb.ts @@ -179,7 +179,10 @@ module MongoDBModule { return await collection.findOne(json) } case "findOneAndUpdate": { - let findAndUpdateJson = json as { + if (typeof query.json === "string") { + json = this.parseQueryParams(query.json, "update") + } + let findAndUpdateJson = this.createObjectIds(json) as { filter: FilterQuery update: UpdateQuery options: FindOneAndUpdateOption diff --git a/packages/server/src/integrations/tests/mongo.spec.js b/packages/server/src/integrations/tests/mongo.spec.js index f866048e4b..555188a526 100644 --- a/packages/server/src/integrations/tests/mongo.spec.js +++ b/packages/server/src/integrations/tests/mongo.spec.js @@ -132,6 +132,9 @@ describe("MongoDB Integration", () => { _id: mongo.ObjectID.createFromHexString("FFFF12345678ABCD12345678"), name: "ObjectId('updatedName')", }) + expect(args[2]).toEqual({ + upsert: false + }) }) it("creates ObjectIds if the $ operator fields contains a match on ObjectId", async () => { @@ -148,7 +151,7 @@ describe("MongoDB Integration", () => { }, }, options: { - upsert: false, + upsert: true, }, }, extra: { collection: "testCollection", actionTypes: "updateOne" }, @@ -167,5 +170,48 @@ describe("MongoDB Integration", () => { _id: mongo.ObjectID.createFromHexString("FFFF12345678ABCD12345678"), } }) + expect(args[2]).toEqual({ + upsert: true + }) + }) + + it("supports findOneAndUpdate", async () => { + const query = { + json: { + filter: { + _id: { + $eq: "ObjectId('ACBD12345678ABCD12345678')", + } + }, + update: { + $set: { + name: "UPDATED", + age: 99 + }, + }, + options: { + upsert: false, + }, + }, + extra: { collection: "testCollection", actionTypes: "findOneAndUpdate" }, + } + await config.integration.read(query) + expect(config.integration.client.findOneAndUpdate).toHaveBeenCalled() + + const args = config.integration.client.findOneAndUpdate.mock.calls[0] + expect(args[0]).toEqual({ + _id: { + $eq: mongo.ObjectID.createFromHexString("ACBD12345678ABCD12345678"), + } + }) + expect(args[1]).toEqual({ + $set: { + name: "UPDATED", + age: 99 + } + }) + expect(args[2]).toEqual({ + upsert: false + }) }) }) From 09a3052aa226cfbb7202ceee2465577524b981b0 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Mon, 8 Aug 2022 21:56:55 +0100 Subject: [PATCH 05/12] Nested braces parse fix added for MongoDB --- packages/server/src/integrations/mongodb.ts | 16 ++++++ .../src/integrations/tests/mongo.spec.js | 52 +++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/packages/server/src/integrations/mongodb.ts b/packages/server/src/integrations/mongodb.ts index a520cdb157..d24cb51fcc 100644 --- a/packages/server/src/integrations/mongodb.ts +++ b/packages/server/src/integrations/mongodb.ts @@ -118,6 +118,22 @@ module MongoDBModule { parseQueryParams(params: string, mode: string) { let queryParams = params.split(/(?<=}),[\n\s]*(?={)/g) + if (queryParams.length > 3) { + for (let i = 0; i < queryParams.length; i++) { + const openCount = queryParams[i].match(/{/g)?.length ?? 0 + const closeCount = queryParams[i].match(/}/g)?.length ?? 0 + if ((openCount + closeCount) % 2 !== 0) { + if (openCount > closeCount) { + queryParams[i] += `, ${queryParams[i+1]}` + queryParams.splice(i+1, 1) + } else { + queryParams[i-1] += `, ${queryParams[i]}` + queryParams.splice(i, 1) + i-- + } + } + } + } let group1 = queryParams[0] ? JSON.parse(queryParams[0]) : {} let group2 = queryParams[1] ? JSON.parse(queryParams[1]) : {} let group3 = queryParams[2] ? JSON.parse(queryParams[2]) : {} diff --git a/packages/server/src/integrations/tests/mongo.spec.js b/packages/server/src/integrations/tests/mongo.spec.js index 555188a526..17561723b3 100644 --- a/packages/server/src/integrations/tests/mongo.spec.js +++ b/packages/server/src/integrations/tests/mongo.spec.js @@ -214,4 +214,56 @@ describe("MongoDB Integration", () => { upsert: false }) }) + + it("can parse nested objects with arrays", async () => { + const query = { + json: `{ + "_id": { + "$eq": "ObjectId('ACBD12345678ABCD12345678')" + } + }, + { + "$set": { + "value": { + "data": [ + { "cid": 1 }, + { "cid": 2 }, + { "nested": { + "name": "test" + }} + ] + } + } + }, + { + "upsert": true + }`, + extra: { collection: "testCollection", actionTypes: "updateOne" }, + } + await config.integration.update(query) + expect(config.integration.client.updateOne).toHaveBeenCalled() + + const args = config.integration.client.updateOne.mock.calls[0] + expect(args[0]).toEqual({ + _id: { + $eq: mongo.ObjectID.createFromHexString("ACBD12345678ABCD12345678"), + } + }) + expect(args[1]).toEqual({ + $set: { + value: { + data: [ + { cid: 1 }, + { cid: 2 }, + { nested: { + name: "test" + }} + ] + }, + }, + }) + expect(args[2]).toEqual({ + upsert: true + }) + }) }) From 051779b013b3ee2d739e54abeef2152c75f8f4b3 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Mon, 8 Aug 2022 21:57:36 +0100 Subject: [PATCH 06/12] lint --- packages/server/src/integrations/mongodb.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/server/src/integrations/mongodb.ts b/packages/server/src/integrations/mongodb.ts index d24cb51fcc..0ae9515a0e 100644 --- a/packages/server/src/integrations/mongodb.ts +++ b/packages/server/src/integrations/mongodb.ts @@ -124,10 +124,10 @@ module MongoDBModule { const closeCount = queryParams[i].match(/}/g)?.length ?? 0 if ((openCount + closeCount) % 2 !== 0) { if (openCount > closeCount) { - queryParams[i] += `, ${queryParams[i+1]}` - queryParams.splice(i+1, 1) + queryParams[i] += `, ${queryParams[i + 1]}` + queryParams.splice(i + 1, 1) } else { - queryParams[i-1] += `, ${queryParams[i]}` + queryParams[i - 1] += `, ${queryParams[i]}` queryParams.splice(i, 1) i-- } From 415f57e0efd8f3c515cafe585368ce60af3121be Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Tue, 9 Aug 2022 17:27:51 +0100 Subject: [PATCH 07/12] Handle braces within quotes --- packages/server/src/integrations/mongodb.ts | 41 +++++++------- .../src/integrations/tests/mongo.spec.js | 54 +++++++++++++++++++ 2 files changed, 77 insertions(+), 18 deletions(-) diff --git a/packages/server/src/integrations/mongodb.ts b/packages/server/src/integrations/mongodb.ts index 0ae9515a0e..9bfc105144 100644 --- a/packages/server/src/integrations/mongodb.ts +++ b/packages/server/src/integrations/mongodb.ts @@ -117,26 +117,31 @@ module MongoDBModule { } parseQueryParams(params: string, mode: string) { - let queryParams = params.split(/(?<=}),[\n\s]*(?={)/g) - if (queryParams.length > 3) { - for (let i = 0; i < queryParams.length; i++) { - const openCount = queryParams[i].match(/{/g)?.length ?? 0 - const closeCount = queryParams[i].match(/}/g)?.length ?? 0 - if ((openCount + closeCount) % 2 !== 0) { - if (openCount > closeCount) { - queryParams[i] += `, ${queryParams[i + 1]}` - queryParams.splice(i + 1, 1) - } else { - queryParams[i - 1] += `, ${queryParams[i]}` - queryParams.splice(i, 1) - i-- - } - } + let queryParams = [] + let openCount = 0 + let inQuotes = false + let i = 0 + let startIndex = 0 + for (let c of params) { + if (c === '"') { + inQuotes = !inQuotes } + if (c === '{' && !inQuotes) { + openCount++ + if (openCount === 1) { + startIndex = i + } + } else if (c === '}' && !inQuotes) { + if (openCount === 1) { + queryParams.push(JSON.parse(params.substring(startIndex, i+1))) + } + openCount-- + } + i++ } - let group1 = queryParams[0] ? JSON.parse(queryParams[0]) : {} - let group2 = queryParams[1] ? JSON.parse(queryParams[1]) : {} - let group3 = queryParams[2] ? JSON.parse(queryParams[2]) : {} + let group1 = queryParams[0] ?? {} + let group2 = queryParams[1] ?? {} + let group3 = queryParams[2] ?? {} if (mode === "update") { return { filter: group1, diff --git a/packages/server/src/integrations/tests/mongo.spec.js b/packages/server/src/integrations/tests/mongo.spec.js index 17561723b3..02d37b18a2 100644 --- a/packages/server/src/integrations/tests/mongo.spec.js +++ b/packages/server/src/integrations/tests/mongo.spec.js @@ -266,4 +266,58 @@ describe("MongoDB Integration", () => { upsert: true }) }) + + it("ignores braces within strings when parsing nested objects", async () => { + const query = { + json: `{ + "_id": { + "$eq": "ObjectId('ACBD12345678ABCD12345678')" + } + }, + { + "$set": { + "value": { + "data": [ + { "cid": 1 }, + { "cid": 2 }, + { "nested": { + "name": "te}st" + }} + ] + } + } + }, + { + "upsert": true, + "extra": "ad{d" + }`, + extra: { collection: "testCollection", actionTypes: "updateOne" }, + } + await config.integration.update(query) + expect(config.integration.client.updateOne).toHaveBeenCalled() + + const args = config.integration.client.updateOne.mock.calls[0] + expect(args[0]).toEqual({ + _id: { + $eq: mongo.ObjectID.createFromHexString("ACBD12345678ABCD12345678"), + } + }) + expect(args[1]).toEqual({ + $set: { + value: { + data: [ + { cid: 1 }, + { cid: 2 }, + { nested: { + name: "te}st" + }} + ] + }, + }, + }) + expect(args[2]).toEqual({ + upsert: true, + extra: "ad{d" + }) + }) }) From 9a10590414e5c7ae93ad4aeb5f5cd27b418a304f Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Tue, 9 Aug 2022 17:28:21 +0100 Subject: [PATCH 08/12] lint --- packages/server/src/integrations/mongodb.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/server/src/integrations/mongodb.ts b/packages/server/src/integrations/mongodb.ts index 9bfc105144..f3be29e386 100644 --- a/packages/server/src/integrations/mongodb.ts +++ b/packages/server/src/integrations/mongodb.ts @@ -126,14 +126,14 @@ module MongoDBModule { if (c === '"') { inQuotes = !inQuotes } - if (c === '{' && !inQuotes) { + if (c === "{" && !inQuotes) { openCount++ if (openCount === 1) { startIndex = i } - } else if (c === '}' && !inQuotes) { + } else if (c === "}" && !inQuotes) { if (openCount === 1) { - queryParams.push(JSON.parse(params.substring(startIndex, i+1))) + queryParams.push(JSON.parse(params.substring(startIndex, i + 1))) } openCount-- } From dc7566308ead7fe9a968fe3e8d95361ce5fc0d46 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Wed, 10 Aug 2022 10:57:42 +0100 Subject: [PATCH 09/12] Ignore escaped double quotes within strings --- packages/server/src/integrations/mongodb.ts | 2 +- packages/server/src/integrations/tests/mongo.spec.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/server/src/integrations/mongodb.ts b/packages/server/src/integrations/mongodb.ts index f3be29e386..cdc1b581b6 100644 --- a/packages/server/src/integrations/mongodb.ts +++ b/packages/server/src/integrations/mongodb.ts @@ -123,7 +123,7 @@ module MongoDBModule { let i = 0 let startIndex = 0 for (let c of params) { - if (c === '"') { + if (c === '"' && (i > 0 && params[i-1] !== '\\')) { inQuotes = !inQuotes } if (c === "{" && !inQuotes) { diff --git a/packages/server/src/integrations/tests/mongo.spec.js b/packages/server/src/integrations/tests/mongo.spec.js index 02d37b18a2..9687723528 100644 --- a/packages/server/src/integrations/tests/mongo.spec.js +++ b/packages/server/src/integrations/tests/mongo.spec.js @@ -289,7 +289,7 @@ describe("MongoDB Integration", () => { }, { "upsert": true, - "extra": "ad{d" + "extra": "ad\\"{\\"d" }`, extra: { collection: "testCollection", actionTypes: "updateOne" }, } @@ -317,7 +317,7 @@ describe("MongoDB Integration", () => { }) expect(args[2]).toEqual({ upsert: true, - extra: "ad{d" + extra: "ad\"{\"d" }) }) }) From 1109f1162c199640cd173e463c50f7212c0dfe3b Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Wed, 10 Aug 2022 10:58:11 +0100 Subject: [PATCH 10/12] lint --- packages/server/src/integrations/mongodb.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/integrations/mongodb.ts b/packages/server/src/integrations/mongodb.ts index cdc1b581b6..35420c456c 100644 --- a/packages/server/src/integrations/mongodb.ts +++ b/packages/server/src/integrations/mongodb.ts @@ -123,7 +123,7 @@ module MongoDBModule { let i = 0 let startIndex = 0 for (let c of params) { - if (c === '"' && (i > 0 && params[i-1] !== '\\')) { + if (c === '"' && i > 0 && params[i - 1] !== "\\") { inQuotes = !inQuotes } if (c === "{" && !inQuotes) { From 333b1a4cb6c4b3f61f809c68c03680523f3e6669 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 10 Aug 2022 14:04:56 +0000 Subject: [PATCH 11/12] v1.2.28-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 | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lerna.json b/lerna.json index 9e190e668b..6b58661011 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.2.28-alpha.0", + "version": "1.2.28-alpha.1", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 23d4c07fe7..ccbbc9bb53 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.2.28-alpha.0", + "version": "1.2.28-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": "1.2.28-alpha.0", + "@budibase/types": "1.2.28-alpha.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", "bcrypt": "5.0.1", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 431570af14..e9508e53d4 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "1.2.28-alpha.0", + "version": "1.2.28-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": "1.2.28-alpha.0", + "@budibase/string-templates": "1.2.28-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 ca7b3b938a..045f6ce2d3 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.2.28-alpha.0", + "version": "1.2.28-alpha.1", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "1.2.28-alpha.0", - "@budibase/client": "1.2.28-alpha.0", - "@budibase/frontend-core": "1.2.28-alpha.0", - "@budibase/string-templates": "1.2.28-alpha.0", + "@budibase/bbui": "1.2.28-alpha.1", + "@budibase/client": "1.2.28-alpha.1", + "@budibase/frontend-core": "1.2.28-alpha.1", + "@budibase/string-templates": "1.2.28-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 8875bb2afe..757e1734ff 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.2.28-alpha.0", + "version": "1.2.28-alpha.1", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index f3050be5d7..460fa792e0 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.2.28-alpha.0", + "version": "1.2.28-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": "1.2.28-alpha.0", - "@budibase/frontend-core": "1.2.28-alpha.0", - "@budibase/string-templates": "1.2.28-alpha.0", + "@budibase/bbui": "1.2.28-alpha.1", + "@budibase/frontend-core": "1.2.28-alpha.1", + "@budibase/string-templates": "1.2.28-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 ec9399e38a..6afce3e530 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.2.28-alpha.0", + "version": "1.2.28-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": "1.2.28-alpha.0", + "@budibase/bbui": "1.2.28-alpha.1", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 6d9fe36809..16e4e67421 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "1.2.28-alpha.0", + "version": "1.2.28-alpha.1", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -77,11 +77,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "1.2.28-alpha.0", - "@budibase/client": "1.2.28-alpha.0", + "@budibase/backend-core": "1.2.28-alpha.1", + "@budibase/client": "1.2.28-alpha.1", "@budibase/pro": "1.2.28-alpha.0", - "@budibase/string-templates": "1.2.28-alpha.0", - "@budibase/types": "1.2.28-alpha.0", + "@budibase/string-templates": "1.2.28-alpha.1", + "@budibase/types": "1.2.28-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 57fa17c1ff..fe615f6118 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.2.28-alpha.0", + "version": "1.2.28-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 ed9dee51b9..2ffe31c54c 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.2.28-alpha.0", + "version": "1.2.28-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 2902a9e470..546c7a002f 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "1.2.28-alpha.0", + "version": "1.2.28-alpha.1", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -35,10 +35,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "1.2.28-alpha.0", + "@budibase/backend-core": "1.2.28-alpha.1", "@budibase/pro": "1.2.28-alpha.0", - "@budibase/string-templates": "1.2.28-alpha.0", - "@budibase/types": "1.2.28-alpha.0", + "@budibase/string-templates": "1.2.28-alpha.1", + "@budibase/types": "1.2.28-alpha.1", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 5d30b69ffbc59f7191411920f0de910990bd3f0b Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 10 Aug 2022 14:07:59 +0000 Subject: [PATCH 12/12] Update pro version to 1.2.28-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 16e4e67421..b7173a4f13 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "1.2.28-alpha.1", "@budibase/client": "1.2.28-alpha.1", - "@budibase/pro": "1.2.28-alpha.0", + "@budibase/pro": "1.2.28-alpha.1", "@budibase/string-templates": "1.2.28-alpha.1", "@budibase/types": "1.2.28-alpha.1", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 6b26556c47..7e51a40180 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1094,12 +1094,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.2.28-alpha.0": - version "1.2.28-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.28-alpha.0.tgz#f4253825724327e6552000f8c7575134bfaa05cd" - integrity sha512-ueu+NZgkiKrX49E0Zy2rrNE4NLe2HAyl3VolTrZfVxOzu1IvtQ/wJBcGDG84VvSliP+0bOOVO9TiGMY3bvZ/Hw== +"@budibase/backend-core@1.2.28-alpha.1": + version "1.2.28-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.28-alpha.1.tgz#8dbed2df0098fa2361834ca9e95af686f9db0c9c" + integrity sha512-7mVl7jPtWZ6spVvAicF/kFMn0Io8GBY4LHmv+D/SWngbT8ATtcQHMlcBvg404ulevCJQBs4DaMweFnZsCvAyNA== dependencies: - "@budibase/types" "1.2.28-alpha.0" + "@budibase/types" "1.2.28-alpha.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -1178,13 +1178,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.2.28-alpha.0": - version "1.2.28-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.28-alpha.0.tgz#f372dcbac55634a1f0e7ff8125ffb0a0aeea086c" - integrity sha512-YxElWs5gwpe1JmHgpB52YeRkyeWPoBiUIt8EshyW90EFVUXP7FOy3LsjvKMNJXAZs1mI4ttkZfuWva8HjrGaKA== +"@budibase/pro@1.2.28-alpha.1": + version "1.2.28-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.28-alpha.1.tgz#9fa6ac9ebd40b10cca63dba4d3fe0c5063bf4aac" + integrity sha512-6DzX2506wBDGKNp6/0tT6FpHLYKub0XyIM99FM/GHwccsUTZ3zRJ1NNHxBw2X2ahQ8ZT0Zcz533xNhb5vx0mGw== dependencies: - "@budibase/backend-core" "1.2.28-alpha.0" - "@budibase/types" "1.2.28-alpha.0" + "@budibase/backend-core" "1.2.28-alpha.1" + "@budibase/types" "1.2.28-alpha.1" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1207,10 +1207,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.2.28-alpha.0": - version "1.2.28-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.28-alpha.0.tgz#61668b7d5d9b1f85c09d658deed87ec3dc28e290" - integrity sha512-tYhdUl1+dEtG8h2xoGUl0NXZC5BZYQIhgPK7JkYrqFHuNx+1f6EoHPQ9MMb/WyOxIDZv4gY7QJLg0KeVflofbw== +"@budibase/types@1.2.28-alpha.1": + version "1.2.28-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.28-alpha.1.tgz#2de2546d60b86ff6a14ddf3a6cd0de194d833c3c" + integrity sha512-2FUGUHVGwcdBmMdZgBdeBuhCn4L8oqUgqsAki0hD46YeLEtx/gPVHb14/Mk6kfafmcyUuoa2KJs0S8YYi3uMkw== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 546c7a002f..3bfbfcbb5b 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -36,7 +36,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "1.2.28-alpha.1", - "@budibase/pro": "1.2.28-alpha.0", + "@budibase/pro": "1.2.28-alpha.1", "@budibase/string-templates": "1.2.28-alpha.1", "@budibase/types": "1.2.28-alpha.1", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 2973783268..42f1157a94 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -291,12 +291,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.2.28-alpha.0": - version "1.2.28-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.28-alpha.0.tgz#f4253825724327e6552000f8c7575134bfaa05cd" - integrity sha512-ueu+NZgkiKrX49E0Zy2rrNE4NLe2HAyl3VolTrZfVxOzu1IvtQ/wJBcGDG84VvSliP+0bOOVO9TiGMY3bvZ/Hw== +"@budibase/backend-core@1.2.28-alpha.1": + version "1.2.28-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.28-alpha.1.tgz#8dbed2df0098fa2361834ca9e95af686f9db0c9c" + integrity sha512-7mVl7jPtWZ6spVvAicF/kFMn0Io8GBY4LHmv+D/SWngbT8ATtcQHMlcBvg404ulevCJQBs4DaMweFnZsCvAyNA== dependencies: - "@budibase/types" "1.2.28-alpha.0" + "@budibase/types" "1.2.28-alpha.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -325,21 +325,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.2.28-alpha.0": - version "1.2.28-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.28-alpha.0.tgz#f372dcbac55634a1f0e7ff8125ffb0a0aeea086c" - integrity sha512-YxElWs5gwpe1JmHgpB52YeRkyeWPoBiUIt8EshyW90EFVUXP7FOy3LsjvKMNJXAZs1mI4ttkZfuWva8HjrGaKA== +"@budibase/pro@1.2.28-alpha.1": + version "1.2.28-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.28-alpha.1.tgz#9fa6ac9ebd40b10cca63dba4d3fe0c5063bf4aac" + integrity sha512-6DzX2506wBDGKNp6/0tT6FpHLYKub0XyIM99FM/GHwccsUTZ3zRJ1NNHxBw2X2ahQ8ZT0Zcz533xNhb5vx0mGw== dependencies: - "@budibase/backend-core" "1.2.28-alpha.0" - "@budibase/types" "1.2.28-alpha.0" + "@budibase/backend-core" "1.2.28-alpha.1" + "@budibase/types" "1.2.28-alpha.1" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.2.28-alpha.0": - version "1.2.28-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.28-alpha.0.tgz#61668b7d5d9b1f85c09d658deed87ec3dc28e290" - integrity sha512-tYhdUl1+dEtG8h2xoGUl0NXZC5BZYQIhgPK7JkYrqFHuNx+1f6EoHPQ9MMb/WyOxIDZv4gY7QJLg0KeVflofbw== +"@budibase/types@1.2.28-alpha.1": + version "1.2.28-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.28-alpha.1.tgz#2de2546d60b86ff6a14ddf3a6cd0de194d833c3c" + integrity sha512-2FUGUHVGwcdBmMdZgBdeBuhCn4L8oqUgqsAki0hD46YeLEtx/gPVHb14/Mk6kfafmcyUuoa2KJs0S8YYi3uMkw== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0"