From 4acadbe5f746274c1a3a160850bb4a00db742778 Mon Sep 17 00:00:00 2001 From: Pedro Silva Date: Thu, 13 Oct 2022 14:58:23 +0100 Subject: [PATCH 01/11] Refactor create app --- .../TestConfiguration/applications.ts | 6 ++-- .../internal-api/applications/create.spec.ts | 31 +++++-------------- 2 files changed, 12 insertions(+), 25 deletions(-) diff --git a/qa-core/src/config/internal-api/TestConfiguration/applications.ts b/qa-core/src/config/internal-api/TestConfiguration/applications.ts index 3b50a62781..8403afc7fb 100644 --- a/qa-core/src/config/internal-api/TestConfiguration/applications.ts +++ b/qa-core/src/config/internal-api/TestConfiguration/applications.ts @@ -40,10 +40,12 @@ export default class AppApi { return [response, json] } - async create(body: any): Promise<[Response, Partial]> { + async create(body: any): Promise> { const response = await this.api.post(`/applications`, { body }) const json = await response.json() - return [response, json] + expect(response).toHaveStatusCode(200) + expect(json._id).toBeDefined() + return json } async read(id: string): Promise<[Response, Application]> { diff --git a/qa-core/src/tests/internal-api/applications/create.spec.ts b/qa-core/src/tests/internal-api/applications/create.spec.ts index c09af632de..cc4b52125f 100644 --- a/qa-core/src/tests/internal-api/applications/create.spec.ts +++ b/qa-core/src/tests/internal-api/applications/create.spec.ts @@ -40,16 +40,12 @@ describe("Internal API - /applications endpoints", () => { }) it("POST - Create an application", async () => { - const [response, app] = await config.applications.create(generateApp()) - expect(response).toHaveStatusCode(200) - expect(app._id).toBeDefined() + config.applications.create(generateApp()) }) it("POST - Publish application", async () => { // create app const [response, app] = await config.applications.create(generateApp()) - expect(response).toHaveStatusCode(200) - expect(app.appId).toBeDefined() // publish app config.applications.api.appId = app.appId @@ -87,9 +83,7 @@ describe("Internal API - /applications endpoints", () => { }) it("POST - Sync application before deployment", async () => { - const [response, app] = await config.applications.create(generateApp()) - expect(response).toHaveStatusCode(200) - expect(app.appId).toBeDefined() + const app = await config.applications.create(generateApp()) config.applications.api.appId = app.appId const [syncResponse, sync] = await config.applications.sync( @@ -102,9 +96,7 @@ describe("Internal API - /applications endpoints", () => { }) it("POST - Sync application after deployment", async () => { - const [response, app] = await config.applications.create(generateApp()) - expect(response).toHaveStatusCode(200) - expect(app.appId).toBeDefined() + const app = await config.applications.create(generateApp()) config.applications.api.appId = app.appId // publish app @@ -120,9 +112,8 @@ describe("Internal API - /applications endpoints", () => { }) it("PUT - Update an application", async () => { - const [response, app] = await config.applications.create(generateApp()) - expect(response).toHaveStatusCode(200) - expect(app.appId).toBeDefined() + const app = await config.applications.create(generateApp()) + config.applications.api.appId = app.appId const [updateResponse, updatedApp] = await config.applications.update( @@ -136,9 +127,7 @@ describe("Internal API - /applications endpoints", () => { }) it("POST - Revert Changes without changes", async () => { - const [response, app] = await config.applications.create(generateApp()) - expect(response).toHaveStatusCode(200) - expect(app.appId).toBeDefined() + const app = await config.applications.create(generateApp()) config.applications.api.appId = app.appId const [revertResponse, revert] = await config.applications.revert( @@ -152,9 +141,7 @@ describe("Internal API - /applications endpoints", () => { }) it("POST - Revert Changes", async () => { - const [response, app] = await config.applications.create(generateApp()) - expect(response).toHaveStatusCode(200) - expect(app.appId).toBeDefined() + const app = await config.applications.create(generateApp()) config.applications.api.appId = app.appId // publish app @@ -185,9 +172,7 @@ describe("Internal API - /applications endpoints", () => { }) it("DELETE - Delete an application", async () => { - const [response, app] = await config.applications.create(generateApp()) - expect(response).toHaveStatusCode(200) - expect(app.appId).toBeDefined() + const app = await config.applications.create(generateApp()) const [deleteResponse] = await config.applications.delete(app.appId) expect(deleteResponse).toHaveStatusCode(200) From 672a40cd35c62d779ede1dea4e3c1c271b328826 Mon Sep 17 00:00:00 2001 From: Pedro Silva Date: Thu, 13 Oct 2022 15:18:36 +0100 Subject: [PATCH 02/11] Fix extra declarations --- qa-core/src/tests/internal-api/applications/create.spec.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/qa-core/src/tests/internal-api/applications/create.spec.ts b/qa-core/src/tests/internal-api/applications/create.spec.ts index cc4b52125f..f10637bf99 100644 --- a/qa-core/src/tests/internal-api/applications/create.spec.ts +++ b/qa-core/src/tests/internal-api/applications/create.spec.ts @@ -45,7 +45,7 @@ describe("Internal API - /applications endpoints", () => { it("POST - Publish application", async () => { // create app - const [response, app] = await config.applications.create(generateApp()) + const app = await config.applications.create(generateApp()) // publish app config.applications.api.appId = app.appId @@ -61,9 +61,7 @@ describe("Internal API - /applications endpoints", () => { it("POST - Create an application from a template, publish and check it renders", async () => { // create the app const appName = generator.word() - const [response, app] = await createAppFromTemplate() - expect(response).toHaveStatusCode(200) - expect(app.appId).toBeDefined() + const app = await createAppFromTemplate() config.applications.api.appId = app.appId // check preview renders From 5ba7100e486829df3efc59245487fcaa4a3eb0fc Mon Sep 17 00:00:00 2001 From: Pedro Silva Date: Mon, 17 Oct 2022 18:20:40 +0100 Subject: [PATCH 03/11] Add Table endpoints --- .../internal-api/TestConfiguration/index.ts | 3 ++ .../internal-api/TestConfiguration/tables.ts | 37 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 qa-core/src/config/internal-api/TestConfiguration/tables.ts diff --git a/qa-core/src/config/internal-api/TestConfiguration/index.ts b/qa-core/src/config/internal-api/TestConfiguration/index.ts index b433fd98ea..2e88316b4f 100644 --- a/qa-core/src/config/internal-api/TestConfiguration/index.ts +++ b/qa-core/src/config/internal-api/TestConfiguration/index.ts @@ -1,14 +1,17 @@ import ApplicationApi from "./applications" import AuthApi from "./auth" import InternalAPIClient from "./InternalAPIClient" +import TablesApi from "./tables" export default class TestConfiguration { applications: ApplicationApi auth: AuthApi context: T + tables: TablesApi constructor(apiClient: InternalAPIClient) { this.applications = new ApplicationApi(apiClient) + this.tables = new TablesApi(apiClient) this.auth = new AuthApi(apiClient) this.context = {} } diff --git a/qa-core/src/config/internal-api/TestConfiguration/tables.ts b/qa-core/src/config/internal-api/TestConfiguration/tables.ts new file mode 100644 index 0000000000..62ea7d5e15 --- /dev/null +++ b/qa-core/src/config/internal-api/TestConfiguration/tables.ts @@ -0,0 +1,37 @@ +import { Response } from "node-fetch" +import { Table } from "@budibase/types" +import InternalAPIClient from "./InternalAPIClient" + + +export default class TablesApi { + api: InternalAPIClient + + constructor(apiClient: InternalAPIClient) { + this.api = apiClient + } + + async getTables(): Promise<[Response, Table[]]> { + const response = await this.api.get(`/tables`) + const json = await response.json() + return [response, json] + } + + async getTable(tableId: string): Promise<[Response, Table]> { + const response = await this.api.get(`/tables/${tableId}`) + const json = await response.json() + return [response, json] + } + + async createTable(body: any): Promise<[Response, Table]> { + const response = await this.api.post(`/tables`, { body }) + const json = await response.json() + return [response, json] + } + + async deleteTable(tableId: string, revId: string): Promise<[Response, Table]> { + const response = await this.api.del(`/tables/${tableId}/${revId}`) + const json = await response.json() + return [response, json] + } + +} \ No newline at end of file From eae27b48b69767e393442b15e13dd4b73a5acef3 Mon Sep 17 00:00:00 2001 From: Pedro Silva Date: Tue, 18 Oct 2022 17:29:13 +0100 Subject: [PATCH 04/11] Add operations on rows and columns --- .../TestConfiguration/applications.ts | 7 +- .../internal-api/TestConfiguration/tables.ts | 41 ++++++++++-- .../src/config/internal-api/fixtures/table.ts | 61 ++++++++++++++++++ .../fixtures/types/responseMessage.ts | 1 + .../internal-api/applications/create.spec.ts | 64 +++++++++++++++++++ 5 files changed, 164 insertions(+), 10 deletions(-) create mode 100644 qa-core/src/config/internal-api/fixtures/table.ts create mode 100644 qa-core/src/config/internal-api/fixtures/types/responseMessage.ts diff --git a/qa-core/src/config/internal-api/TestConfiguration/applications.ts b/qa-core/src/config/internal-api/TestConfiguration/applications.ts index 8403afc7fb..8d276911c8 100644 --- a/qa-core/src/config/internal-api/TestConfiguration/applications.ts +++ b/qa-core/src/config/internal-api/TestConfiguration/applications.ts @@ -6,8 +6,9 @@ import FormData from "form-data" import { RouteConfig } from "../fixtures/types/routing" import { AppPackageResponse } from "../fixtures/types/appPackage" import { DeployConfig } from "../fixtures/types/deploy" +import { responseMessage } from "../fixtures/types/responseMessage" + -type messageResponse = { message: string } export default class AppApi { api: InternalAPIClient @@ -54,7 +55,7 @@ export default class AppApi { return [response, json.data] } - async sync(appId: string): Promise<[Response, messageResponse]> { + async sync(appId: string): Promise<[Response, responseMessage]> { const response = await this.api.post(`/applications/${appId}/sync`) const json = await response.json() return [response, json] @@ -72,7 +73,7 @@ export default class AppApi { return [response, json] } - async revert(appId: string): Promise<[Response, messageResponse]> { + async revert(appId: string): Promise<[Response, responseMessage]> { const response = await this.api.post(`/dev/${appId}/revert`) const json = await response.json() return [response, json] diff --git a/qa-core/src/config/internal-api/TestConfiguration/tables.ts b/qa-core/src/config/internal-api/TestConfiguration/tables.ts index 62ea7d5e15..041e909532 100644 --- a/qa-core/src/config/internal-api/TestConfiguration/tables.ts +++ b/qa-core/src/config/internal-api/TestConfiguration/tables.ts @@ -1,6 +1,7 @@ import { Response } from "node-fetch" -import { Table } from "@budibase/types" +import { Row, Table } from "@budibase/types" import InternalAPIClient from "./InternalAPIClient" +import { responseMessage } from "../fixtures/types/responseMessage" export default class TablesApi { @@ -10,28 +11,54 @@ export default class TablesApi { this.api = apiClient } - async getTables(): Promise<[Response, Table[]]> { + async getTables(expectedNumber: Number): Promise<[Response, Table[]]> { const response = await this.api.get(`/tables`) const json = await response.json() + expect(response).toHaveStatusCode(200) + expect(json.length).toBe(expectedNumber) return [response, json] } - async getTable(tableId: string): Promise<[Response, Table]> { - const response = await this.api.get(`/tables/${tableId}`) + async getTableById(id: string): Promise<[Response, Table]> { + const response = await this.api.get(`/tables/${id}`) const json = await response.json() return [response, json] } - async createTable(body: any): Promise<[Response, Table]> { + async create(body: any): Promise<[Response, Table]> { const response = await this.api.post(`/tables`, { body }) const json = await response.json() return [response, json] } - async deleteTable(tableId: string, revId: string): Promise<[Response, Table]> { - const response = await this.api.del(`/tables/${tableId}/${revId}`) + async deleteTable(id: string, revId: string): Promise<[Response, responseMessage]> { + const response = await this.api.del(`/tables/${id}/${revId}`) const json = await response.json() return [response, json] } + async update(body: any): Promise<[Response, Table]> { + const response = await this.api.put(`/tables`, { body }) + const json = await response.json() + return [response, json] + } + + async getRows(id: string): Promise<[Response, Row[]]> { + const response = await this.api.get(`/${id}/rows`) + const json = await response.json() + return [response, json] + } + async addRow(id: string, body: any): Promise<[Response, Row]> { + const response = await this.api.post(`/${id}/rows`, { body }) + const json = await response.json() + return [response, json] + } + + async deleteRow(id: string, body: any): Promise<[Response, Row[]]> { + const response = await this.api.del(`/${id}/rows/`, { body }) + const json = await response.json() + return [response, json] + } + + } \ No newline at end of file diff --git a/qa-core/src/config/internal-api/fixtures/table.ts b/qa-core/src/config/internal-api/fixtures/table.ts new file mode 100644 index 0000000000..d35cb74396 --- /dev/null +++ b/qa-core/src/config/internal-api/fixtures/table.ts @@ -0,0 +1,61 @@ +import { Row } from "@budibase/types" + +type Table = { + type?: string + views?: { [key: string]: any } + name: string + primary?: string[] + schema: { [key: string]: any } + primaryDisplay?: string + sourceId?: string + relatedFormula?: string[] + constrained?: string[] + _id?: string + _rev?: string + createdAt?: string + updatedAt?: string + indexes?: { [key: string]: any } + dataImport?: { [key: string]: any } + +} + +export const generateTable = (): Table => { + return { + name: "Test Table", + schema: {}, + sourceId: "bb_internal", + type: "internal", + dataImport: { + valid: true, + schema: {} + } + } +} + +export const generateNewColumnForTable = (tableData: any): Table => { + const newColumn = tableData + newColumn.schema = { + TestColumn: { + type: "string", + name: "TestColumn", + constraints: { + presence: { allowEmpty: false }, + length: { maximum: null }, + type: "string" + } + } + } + newColumn.indexes = { + 0: "TestColumn" + } + newColumn.updatedAt = new Date().toISOString() + return newColumn +} + +export const generateNewRowForTable = (tableId: string): Row => { + const newRow = { + TestColumn: "TestRow", + tableId: tableId + } + return newRow +} diff --git a/qa-core/src/config/internal-api/fixtures/types/responseMessage.ts b/qa-core/src/config/internal-api/fixtures/types/responseMessage.ts new file mode 100644 index 0000000000..97db21c4c1 --- /dev/null +++ b/qa-core/src/config/internal-api/fixtures/types/responseMessage.ts @@ -0,0 +1 @@ +export interface responseMessage { message: string } \ No newline at end of file diff --git a/qa-core/src/tests/internal-api/applications/create.spec.ts b/qa-core/src/tests/internal-api/applications/create.spec.ts index f10637bf99..ff57629458 100644 --- a/qa-core/src/tests/internal-api/applications/create.spec.ts +++ b/qa-core/src/tests/internal-api/applications/create.spec.ts @@ -5,6 +5,7 @@ import InternalAPIClient from "../../../config/internal-api/TestConfiguration/In import generateApp from "../../../config/internal-api/fixtures/applications" import generator from "../../../config/generator" import generateScreen from "../../../config/internal-api/fixtures/screens" +import { generateTable, generateNewColumnForTable, generateNewRowForTable } from "../../../config/internal-api/fixtures/table" describe("Internal API - /applications endpoints", () => { const api = new InternalAPIClient() @@ -175,4 +176,67 @@ describe("Internal API - /applications endpoints", () => { const [deleteResponse] = await config.applications.delete(app.appId) expect(deleteResponse).toHaveStatusCode(200) }) + + it("Operations on Tables", async () => { + // create the app + const appName = generator.word() + const app = await createAppFromTemplate() + config.applications.api.appId = app.appId + + // Get current tables: expect 2 in this template + await config.tables.getTables(2) + + // Add new table + const [createdTableResponse, createdTableData] = await config.tables.create(generateTable()) + expect(createdTableResponse).toHaveStatusCode(200) + expect(createdTableData._id).toBeDefined() + expect(createdTableData._rev).toBeDefined() + + //Table was added + await config.tables.getTables(3) + + //Get information about the table + const [tableInfoResponse, tableInfo] = await config.tables.getTableById(createdTableData._id) + expect(tableInfoResponse).toHaveStatusCode(200) + expect(tableInfo._id).toEqual(createdTableData._id) + + //Add Column to table + const newColumn = generateNewColumnForTable(createdTableData) + const [addColumnResponse, addColumnData] = await config.tables.create(newColumn) + expect(addColumnResponse).toHaveStatusCode(200) + expect(addColumnData._id).toEqual(createdTableData._id) + expect(addColumnData.schema.TestColumn).toBeDefined() + + //Add Row to table + const newRow = generateNewRowForTable(addColumnData._id) + const [addRowResponse, addRowData] = await config.tables.addRow(addColumnData._id, newRow) + console.log(addRowData) + expect(addRowResponse).toHaveStatusCode(200) + expect(addRowData._id).toBeDefined() + expect(addRowData._rev).toBeDefined() + expect(addRowData.tableId).toEqual(addColumnData._id) + + //Get Row from table + const [getRowResponse, getRowData] = await config.tables.getRows(addColumnData._id) + expect(getRowResponse).toHaveStatusCode(200) + expect(getRowData.length).toEqual(1) + + //Delete Row from table + const rowToDelete = { + rows: [ + getRowData[0] + ] + } + const [deleteRowResponse, deleteRowData] = await config.tables.deleteRow(addColumnData._id, rowToDelete) + expect(deleteRowResponse).toHaveStatusCode(200) + expect(deleteRowData[0]._id).toEqual(getRowData[0]._id) + + //Delete the table + const [deleteTableResponse, deleteTable] = await config.tables.deleteTable(addColumnData._id, addColumnData._rev) + expect(deleteTableResponse).toHaveStatusCode(200) + expect(deleteTable.message).toEqual(`Table ${createdTableData._id} deleted.`) + + //Table was deleted + await config.tables.getTables(2) + }) }) From ea27fb10383efda10883110fde9247adbbf60204 Mon Sep 17 00:00:00 2001 From: Pedro Silva Date: Tue, 18 Oct 2022 17:34:19 +0100 Subject: [PATCH 05/11] Remove unecessary const --- qa-core/src/config/internal-api/fixtures/table.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qa-core/src/config/internal-api/fixtures/table.ts b/qa-core/src/config/internal-api/fixtures/table.ts index d35cb74396..68f3e79555 100644 --- a/qa-core/src/config/internal-api/fixtures/table.ts +++ b/qa-core/src/config/internal-api/fixtures/table.ts @@ -53,9 +53,8 @@ export const generateNewColumnForTable = (tableData: any): Table => { } export const generateNewRowForTable = (tableId: string): Row => { - const newRow = { + return { TestColumn: "TestRow", tableId: tableId } - return newRow } From 9ee872c4ef214eee5b540447ff214140f86d8bc3 Mon Sep 17 00:00:00 2001 From: Pedro Silva Date: Wed, 19 Oct 2022 10:35:00 +0100 Subject: [PATCH 06/11] Requested changes --- packages/types/src/documents/app/table.ts | 6 ++++ .../internal-api/TestConfiguration/index.ts | 3 ++ .../internal-api/TestConfiguration/rows.ts | 28 ++++++++++++++++ .../internal-api/TestConfiguration/tables.ts | 32 +++---------------- .../src/config/internal-api/fixtures/rows.ts | 8 +++++ .../src/config/internal-api/fixtures/table.ts | 27 +--------------- .../internal-api/applications/create.spec.ts | 21 ++++++------ 7 files changed, 61 insertions(+), 64 deletions(-) create mode 100644 qa-core/src/config/internal-api/TestConfiguration/rows.ts create mode 100644 qa-core/src/config/internal-api/fixtures/rows.ts diff --git a/packages/types/src/documents/app/table.ts b/packages/types/src/documents/app/table.ts index 72cff4f056..8d5e956495 100644 --- a/packages/types/src/documents/app/table.ts +++ b/packages/types/src/documents/app/table.ts @@ -49,4 +49,10 @@ export interface Table extends Document { sourceId?: string relatedFormula?: string[] constrained?: string[] + _id?: string + _rev?: string + createdAt?: string + updatedAt?: string + indexes?: { [key: string]: any } + dataImport?: { [key: string]: any } } diff --git a/qa-core/src/config/internal-api/TestConfiguration/index.ts b/qa-core/src/config/internal-api/TestConfiguration/index.ts index 2e88316b4f..f1fbb5228e 100644 --- a/qa-core/src/config/internal-api/TestConfiguration/index.ts +++ b/qa-core/src/config/internal-api/TestConfiguration/index.ts @@ -2,16 +2,19 @@ import ApplicationApi from "./applications" import AuthApi from "./auth" import InternalAPIClient from "./InternalAPIClient" import TablesApi from "./tables" +import RowApi from "./rows" export default class TestConfiguration { applications: ApplicationApi auth: AuthApi context: T tables: TablesApi + rows: RowApi constructor(apiClient: InternalAPIClient) { this.applications = new ApplicationApi(apiClient) this.tables = new TablesApi(apiClient) + this.rows = new RowApi(apiClient) this.auth = new AuthApi(apiClient) this.context = {} } diff --git a/qa-core/src/config/internal-api/TestConfiguration/rows.ts b/qa-core/src/config/internal-api/TestConfiguration/rows.ts new file mode 100644 index 0000000000..a439334294 --- /dev/null +++ b/qa-core/src/config/internal-api/TestConfiguration/rows.ts @@ -0,0 +1,28 @@ +import { Response } from "node-fetch" +import { Row } from "@budibase/types" +import InternalAPIClient from "./InternalAPIClient" + +export default class RowsApi { + api: InternalAPIClient + + constructor(apiClient: InternalAPIClient) { + this.api = apiClient + } + + async getAll(id: string): Promise<[Response, Row[]]> { + const response = await this.api.get(`/${id}/rows`) + const json = await response.json() + return [response, json] + } + async add(id: string, body: any): Promise<[Response, Row]> { + const response = await this.api.post(`/${id}/rows`, { body }) + const json = await response.json() + return [response, json] + } + + async delete(id: string, body: any): Promise<[Response, Row[]]> { + const response = await this.api.del(`/${id}/rows/`, { body }) + const json = await response.json() + return [response, json] + } +} \ No newline at end of file diff --git a/qa-core/src/config/internal-api/TestConfiguration/tables.ts b/qa-core/src/config/internal-api/TestConfiguration/tables.ts index 041e909532..0061291524 100644 --- a/qa-core/src/config/internal-api/TestConfiguration/tables.ts +++ b/qa-core/src/config/internal-api/TestConfiguration/tables.ts @@ -1,5 +1,5 @@ import { Response } from "node-fetch" -import { Row, Table } from "@budibase/types" +import { Table } from "@budibase/types" import InternalAPIClient from "./InternalAPIClient" import { responseMessage } from "../fixtures/types/responseMessage" @@ -11,7 +11,7 @@ export default class TablesApi { this.api = apiClient } - async getTables(expectedNumber: Number): Promise<[Response, Table[]]> { + async getAll(expectedNumber: Number): Promise<[Response, Table[]]> { const response = await this.api.get(`/tables`) const json = await response.json() expect(response).toHaveStatusCode(200) @@ -25,40 +25,16 @@ export default class TablesApi { return [response, json] } - async create(body: any): Promise<[Response, Table]> { + async save(body: any): Promise<[Response, Table]> { const response = await this.api.post(`/tables`, { body }) const json = await response.json() return [response, json] } - async deleteTable(id: string, revId: string): Promise<[Response, responseMessage]> { + async delete(id: string, revId: string): Promise<[Response, responseMessage]> { const response = await this.api.del(`/tables/${id}/${revId}`) const json = await response.json() return [response, json] } - async update(body: any): Promise<[Response, Table]> { - const response = await this.api.put(`/tables`, { body }) - const json = await response.json() - return [response, json] - } - - async getRows(id: string): Promise<[Response, Row[]]> { - const response = await this.api.get(`/${id}/rows`) - const json = await response.json() - return [response, json] - } - async addRow(id: string, body: any): Promise<[Response, Row]> { - const response = await this.api.post(`/${id}/rows`, { body }) - const json = await response.json() - return [response, json] - } - - async deleteRow(id: string, body: any): Promise<[Response, Row[]]> { - const response = await this.api.del(`/${id}/rows/`, { body }) - const json = await response.json() - return [response, json] - } - - } \ No newline at end of file diff --git a/qa-core/src/config/internal-api/fixtures/rows.ts b/qa-core/src/config/internal-api/fixtures/rows.ts new file mode 100644 index 0000000000..fa071221a4 --- /dev/null +++ b/qa-core/src/config/internal-api/fixtures/rows.ts @@ -0,0 +1,8 @@ +import { Row } from "@budibase/types" + +export const generateNewRowForTable = (tableId: string): Row => { + return { + TestColumn: "TestRow", + tableId: tableId + } +} \ No newline at end of file diff --git a/qa-core/src/config/internal-api/fixtures/table.ts b/qa-core/src/config/internal-api/fixtures/table.ts index 68f3e79555..b7bfbd6ff6 100644 --- a/qa-core/src/config/internal-api/fixtures/table.ts +++ b/qa-core/src/config/internal-api/fixtures/table.ts @@ -1,23 +1,4 @@ -import { Row } from "@budibase/types" - -type Table = { - type?: string - views?: { [key: string]: any } - name: string - primary?: string[] - schema: { [key: string]: any } - primaryDisplay?: string - sourceId?: string - relatedFormula?: string[] - constrained?: string[] - _id?: string - _rev?: string - createdAt?: string - updatedAt?: string - indexes?: { [key: string]: any } - dataImport?: { [key: string]: any } - -} +import { Table } from "@budibase/types" export const generateTable = (): Table => { return { @@ -52,9 +33,3 @@ export const generateNewColumnForTable = (tableData: any): Table => { return newColumn } -export const generateNewRowForTable = (tableId: string): Row => { - return { - TestColumn: "TestRow", - tableId: tableId - } -} diff --git a/qa-core/src/tests/internal-api/applications/create.spec.ts b/qa-core/src/tests/internal-api/applications/create.spec.ts index ff57629458..588652e446 100644 --- a/qa-core/src/tests/internal-api/applications/create.spec.ts +++ b/qa-core/src/tests/internal-api/applications/create.spec.ts @@ -5,7 +5,8 @@ import InternalAPIClient from "../../../config/internal-api/TestConfiguration/In import generateApp from "../../../config/internal-api/fixtures/applications" import generator from "../../../config/generator" import generateScreen from "../../../config/internal-api/fixtures/screens" -import { generateTable, generateNewColumnForTable, generateNewRowForTable } from "../../../config/internal-api/fixtures/table" +import { generateTable, generateNewColumnForTable } from "../../../config/internal-api/fixtures/table" +import { generateNewRowForTable } from "../../../config/internal-api/fixtures/rows" describe("Internal API - /applications endpoints", () => { const api = new InternalAPIClient() @@ -184,16 +185,16 @@ describe("Internal API - /applications endpoints", () => { config.applications.api.appId = app.appId // Get current tables: expect 2 in this template - await config.tables.getTables(2) + await config.tables.getAll(2) // Add new table - const [createdTableResponse, createdTableData] = await config.tables.create(generateTable()) + const [createdTableResponse, createdTableData] = await config.tables.save(generateTable()) expect(createdTableResponse).toHaveStatusCode(200) expect(createdTableData._id).toBeDefined() expect(createdTableData._rev).toBeDefined() //Table was added - await config.tables.getTables(3) + await config.tables.getAll(3) //Get information about the table const [tableInfoResponse, tableInfo] = await config.tables.getTableById(createdTableData._id) @@ -202,14 +203,14 @@ describe("Internal API - /applications endpoints", () => { //Add Column to table const newColumn = generateNewColumnForTable(createdTableData) - const [addColumnResponse, addColumnData] = await config.tables.create(newColumn) + const [addColumnResponse, addColumnData] = await config.tables.save(newColumn) expect(addColumnResponse).toHaveStatusCode(200) expect(addColumnData._id).toEqual(createdTableData._id) expect(addColumnData.schema.TestColumn).toBeDefined() //Add Row to table const newRow = generateNewRowForTable(addColumnData._id) - const [addRowResponse, addRowData] = await config.tables.addRow(addColumnData._id, newRow) + const [addRowResponse, addRowData] = await config.rows.add(addColumnData._id, newRow) console.log(addRowData) expect(addRowResponse).toHaveStatusCode(200) expect(addRowData._id).toBeDefined() @@ -217,7 +218,7 @@ describe("Internal API - /applications endpoints", () => { expect(addRowData.tableId).toEqual(addColumnData._id) //Get Row from table - const [getRowResponse, getRowData] = await config.tables.getRows(addColumnData._id) + const [getRowResponse, getRowData] = await config.rows.getAll(addColumnData._id) expect(getRowResponse).toHaveStatusCode(200) expect(getRowData.length).toEqual(1) @@ -227,16 +228,16 @@ describe("Internal API - /applications endpoints", () => { getRowData[0] ] } - const [deleteRowResponse, deleteRowData] = await config.tables.deleteRow(addColumnData._id, rowToDelete) + const [deleteRowResponse, deleteRowData] = await config.rows.delete(addColumnData._id, rowToDelete) expect(deleteRowResponse).toHaveStatusCode(200) expect(deleteRowData[0]._id).toEqual(getRowData[0]._id) //Delete the table - const [deleteTableResponse, deleteTable] = await config.tables.deleteTable(addColumnData._id, addColumnData._rev) + const [deleteTableResponse, deleteTable] = await config.tables.delete(addColumnData._id, addColumnData._rev) expect(deleteTableResponse).toHaveStatusCode(200) expect(deleteTable.message).toEqual(`Table ${createdTableData._id} deleted.`) //Table was deleted - await config.tables.getTables(2) + await config.tables.getAll(2) }) }) From 50aaacb903d95991dff183aa4ce9394df7d43494 Mon Sep 17 00:00:00 2001 From: Pedro Silva Date: Wed, 19 Oct 2022 10:42:57 +0100 Subject: [PATCH 07/11] Fix EOF --- qa-core/src/config/internal-api/TestConfiguration/rows.ts | 2 +- qa-core/src/config/internal-api/TestConfiguration/tables.ts | 2 +- qa-core/src/config/internal-api/fixtures/rows.ts | 2 +- qa-core/src/config/internal-api/fixtures/table.ts | 1 - .../src/config/internal-api/fixtures/types/responseMessage.ts | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/qa-core/src/config/internal-api/TestConfiguration/rows.ts b/qa-core/src/config/internal-api/TestConfiguration/rows.ts index a439334294..a995e40e75 100644 --- a/qa-core/src/config/internal-api/TestConfiguration/rows.ts +++ b/qa-core/src/config/internal-api/TestConfiguration/rows.ts @@ -25,4 +25,4 @@ export default class RowsApi { const json = await response.json() return [response, json] } -} \ No newline at end of file +} diff --git a/qa-core/src/config/internal-api/TestConfiguration/tables.ts b/qa-core/src/config/internal-api/TestConfiguration/tables.ts index 0061291524..bbafc73de5 100644 --- a/qa-core/src/config/internal-api/TestConfiguration/tables.ts +++ b/qa-core/src/config/internal-api/TestConfiguration/tables.ts @@ -37,4 +37,4 @@ export default class TablesApi { return [response, json] } -} \ No newline at end of file +} diff --git a/qa-core/src/config/internal-api/fixtures/rows.ts b/qa-core/src/config/internal-api/fixtures/rows.ts index fa071221a4..f3c12d9ddd 100644 --- a/qa-core/src/config/internal-api/fixtures/rows.ts +++ b/qa-core/src/config/internal-api/fixtures/rows.ts @@ -5,4 +5,4 @@ export const generateNewRowForTable = (tableId: string): Row => { TestColumn: "TestRow", tableId: tableId } -} \ No newline at end of file +} diff --git a/qa-core/src/config/internal-api/fixtures/table.ts b/qa-core/src/config/internal-api/fixtures/table.ts index b7bfbd6ff6..9787dc500a 100644 --- a/qa-core/src/config/internal-api/fixtures/table.ts +++ b/qa-core/src/config/internal-api/fixtures/table.ts @@ -32,4 +32,3 @@ export const generateNewColumnForTable = (tableData: any): Table => { newColumn.updatedAt = new Date().toISOString() return newColumn } - diff --git a/qa-core/src/config/internal-api/fixtures/types/responseMessage.ts b/qa-core/src/config/internal-api/fixtures/types/responseMessage.ts index 97db21c4c1..74931123fa 100644 --- a/qa-core/src/config/internal-api/fixtures/types/responseMessage.ts +++ b/qa-core/src/config/internal-api/fixtures/types/responseMessage.ts @@ -1 +1 @@ -export interface responseMessage { message: string } \ No newline at end of file +export interface responseMessage { message: string } From 312e7664142f4a8457f74d891a7f0a0603b3fa6b Mon Sep 17 00:00:00 2001 From: Pedro Silva Date: Thu, 20 Oct 2022 15:31:10 +0100 Subject: [PATCH 08/11] Improvement from PR comments --- packages/types/src/documents/app/table.ts | 4 ---- .../config/internal-api/TestConfiguration/rows.ts | 12 ++++++------ 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/packages/types/src/documents/app/table.ts b/packages/types/src/documents/app/table.ts index 8d5e956495..12135b60cf 100644 --- a/packages/types/src/documents/app/table.ts +++ b/packages/types/src/documents/app/table.ts @@ -49,10 +49,6 @@ export interface Table extends Document { sourceId?: string relatedFormula?: string[] constrained?: string[] - _id?: string - _rev?: string - createdAt?: string - updatedAt?: string indexes?: { [key: string]: any } dataImport?: { [key: string]: any } } diff --git a/qa-core/src/config/internal-api/TestConfiguration/rows.ts b/qa-core/src/config/internal-api/TestConfiguration/rows.ts index a995e40e75..010c8936c1 100644 --- a/qa-core/src/config/internal-api/TestConfiguration/rows.ts +++ b/qa-core/src/config/internal-api/TestConfiguration/rows.ts @@ -9,19 +9,19 @@ export default class RowsApi { this.api = apiClient } - async getAll(id: string): Promise<[Response, Row[]]> { - const response = await this.api.get(`/${id}/rows`) + async getAll(tableId: string): Promise<[Response, Row[]]> { + const response = await this.api.get(`/${tableId}/rows`) const json = await response.json() return [response, json] } - async add(id: string, body: any): Promise<[Response, Row]> { - const response = await this.api.post(`/${id}/rows`, { body }) + async add(tableId: string, body: any): Promise<[Response, Row]> { + const response = await this.api.post(`/${tableId}/rows`, { body }) const json = await response.json() return [response, json] } - async delete(id: string, body: any): Promise<[Response, Row[]]> { - const response = await this.api.del(`/${id}/rows/`, { body }) + async delete(tableId: string, body: any): Promise<[Response, Row[]]> { + const response = await this.api.del(`/${tableId}/rows/`, { body }) const json = await response.json() return [response, json] } From 644a07c8a3d843a39dcab6f279ebb6ff9d386173 Mon Sep 17 00:00:00 2001 From: Pedro Silva Date: Thu, 20 Oct 2022 17:48:05 +0100 Subject: [PATCH 09/11] Fix some tests after merge --- .../tests/internal-api/applications/create.spec.ts | 2 +- .../src/tests/internal-api/screens/screens.spec.ts | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/qa-core/src/tests/internal-api/applications/create.spec.ts b/qa-core/src/tests/internal-api/applications/create.spec.ts index dd894ce66a..f96c915f14 100644 --- a/qa-core/src/tests/internal-api/applications/create.spec.ts +++ b/qa-core/src/tests/internal-api/applications/create.spec.ts @@ -119,7 +119,7 @@ describe("Internal API - /applications endpoints", () => { const [updateResponse, updatedApp] = await config.applications.update( app.appId, { - name: generator.word(), + name: generator.word() } ) expect(updateResponse).toHaveStatusCode(200) 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 68e1022cb4..0ef9fcf279 100644 --- a/qa-core/src/tests/internal-api/screens/screens.spec.ts +++ b/qa-core/src/tests/internal-api/screens/screens.spec.ts @@ -2,7 +2,7 @@ import TestConfiguration from "../../../config/internal-api/TestConfiguration" import { App } from "@budibase/types" import InternalAPIClient from "../../../config/internal-api/TestConfiguration/InternalAPIClient" import generateApp from "../../../config/internal-api/fixtures/applications" -import { Screen } from "@budibase/types" +import { Screen } from "@budibase/types" import generateScreen from "../../../config/internal-api/fixtures/screens" @@ -21,8 +21,8 @@ describe("Internal API - /screens endpoints", () => { it("POST - Create a screen with each role type", async () => { // Create app - const [appResponse, app] = await appConfig.applications.create(generateApp()) - + const app = await appConfig.applications.create(generateApp()) + // Create Screen const roleArray = ["BASIC", "POWER", "ADMIN", "PUBLIC"] appConfig.applications.api.appId = app.appId @@ -35,8 +35,8 @@ describe("Internal API - /screens endpoints", () => { it("GET - Fetch screens", async () => { // Create app - const [appResponse, app] = await appConfig.applications.create(generateApp()) - + const app = await appConfig.applications.create(generateApp()) + // Create Screen appConfig.applications.api.appId = app.appId const [response, screen] = await config.screen.create(generateScreen("BASIC")) @@ -49,8 +49,8 @@ describe("Internal API - /screens endpoints", () => { it("DELETE - Delete a screen", async () => { // Create app - const [appResponse, app] = await appConfig.applications.create(generateApp()) - + const app = await appConfig.applications.create(generateApp()) + // Create Screen appConfig.applications.api.appId = app.appId const [screenResponse, screen] = await config.screen.create(generateScreen("BASIC")) From e8486a69c86fcdfa34ce6db319d005e665ff8649 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 24 Oct 2022 14:33:30 +0000 Subject: [PATCH 10/11] v2.0.30-alpha.13 --- 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 5600db4cf3..b15124be55 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.0.30-alpha.12", + "version": "2.0.30-alpha.13", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 2e358f07b5..e6dff805ca 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.0.30-alpha.12", + "version": "2.0.30-alpha.13", "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.0.30-alpha.12", + "@budibase/types": "2.0.30-alpha.13", "@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 65da2c2cea..6e252dfbfa 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.0.30-alpha.12", + "version": "2.0.30-alpha.13", "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.0.30-alpha.12", + "@budibase/string-templates": "2.0.30-alpha.13", "@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 e99c7ac995..7846e6b6b8 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.0.30-alpha.12", + "version": "2.0.30-alpha.13", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.0.30-alpha.12", - "@budibase/client": "2.0.30-alpha.12", - "@budibase/frontend-core": "2.0.30-alpha.12", - "@budibase/string-templates": "2.0.30-alpha.12", + "@budibase/bbui": "2.0.30-alpha.13", + "@budibase/client": "2.0.30-alpha.13", + "@budibase/frontend-core": "2.0.30-alpha.13", + "@budibase/string-templates": "2.0.30-alpha.13", "@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 7f607508bc..8ef38268be 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.0.30-alpha.12", + "version": "2.0.30-alpha.13", "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.0.30-alpha.12", - "@budibase/string-templates": "2.0.30-alpha.12", - "@budibase/types": "2.0.30-alpha.12", + "@budibase/backend-core": "2.0.30-alpha.13", + "@budibase/string-templates": "2.0.30-alpha.13", + "@budibase/types": "2.0.30-alpha.13", "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 d0a049feee..e84186805a 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.0.30-alpha.12", + "version": "2.0.30-alpha.13", "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.0.30-alpha.12", - "@budibase/frontend-core": "2.0.30-alpha.12", - "@budibase/string-templates": "2.0.30-alpha.12", + "@budibase/bbui": "2.0.30-alpha.13", + "@budibase/frontend-core": "2.0.30-alpha.13", + "@budibase/string-templates": "2.0.30-alpha.13", "@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 880c804beb..7c911cd40a 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.0.30-alpha.12", + "version": "2.0.30-alpha.13", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.0.30-alpha.12", + "@budibase/bbui": "2.0.30-alpha.13", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 302a1f5207..d739d0add1 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.0.30-alpha.12", + "version": "2.0.30-alpha.13", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index 1392d4c0a4..19bedf9248 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.0.30-alpha.12", + "version": "2.0.30-alpha.13", "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": "2.0.30-alpha.12", - "@budibase/client": "2.0.30-alpha.12", + "@budibase/backend-core": "2.0.30-alpha.13", + "@budibase/client": "2.0.30-alpha.13", "@budibase/pro": "2.0.30-alpha.12", - "@budibase/string-templates": "2.0.30-alpha.12", - "@budibase/types": "2.0.30-alpha.12", + "@budibase/string-templates": "2.0.30-alpha.13", + "@budibase/types": "2.0.30-alpha.13", "@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 4438565dc3..a4ca399d8e 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.0.30-alpha.12", + "version": "2.0.30-alpha.13", "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 167a82bde4..879ed72fbb 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.0.30-alpha.12", + "version": "2.0.30-alpha.13", "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 14f2fc9100..2d86a90e31 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.0.30-alpha.12", + "version": "2.0.30-alpha.13", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.0.30-alpha.12", + "@budibase/backend-core": "2.0.30-alpha.13", "@budibase/pro": "2.0.30-alpha.12", - "@budibase/string-templates": "2.0.30-alpha.12", - "@budibase/types": "2.0.30-alpha.12", + "@budibase/string-templates": "2.0.30-alpha.13", + "@budibase/types": "2.0.30-alpha.13", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From c0aa506b43d866f9118c6b62a9c1025775dfd640 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 24 Oct 2022 14:36:50 +0000 Subject: [PATCH 11/11] Update pro version to 2.0.30-alpha.13 --- 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 19bedf9248..1c0efb0527 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "2.0.30-alpha.13", "@budibase/client": "2.0.30-alpha.13", - "@budibase/pro": "2.0.30-alpha.12", + "@budibase/pro": "2.0.30-alpha.13", "@budibase/string-templates": "2.0.30-alpha.13", "@budibase/types": "2.0.30-alpha.13", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 1d9d619f96..5d041c26d0 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@2.0.30-alpha.12": - version "2.0.30-alpha.12" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.30-alpha.12.tgz#adeb3e3f043c7b85a1a4aab3d3e33832d1ab8dfd" - integrity sha512-e/+tvvn1rcLTw/D/OlL9HYV1hw87x2mgofCV5Y1th6r1Tvum7Nr7revcU8CQIpVOc+iz6Eg1vAbMjqDsGr5YUw== +"@budibase/backend-core@2.0.30-alpha.13": + version "2.0.30-alpha.13" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.30-alpha.13.tgz#d32384e136bb458b3ae66435dcb1b73ea1dd371c" + integrity sha512-Jp5H84L68ru+8kSLFe/ysYncgW0LpJsSY1HBpXD/QJ9a/3/weDvOFfDUddq547B18ZclOGdEDt7USdqshiwxJA== dependencies: - "@budibase/types" "2.0.30-alpha.12" + "@budibase/types" "2.0.30-alpha.13" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1180,13 +1180,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.0.30-alpha.12": - version "2.0.30-alpha.12" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.30-alpha.12.tgz#52a26671aad4248fa2a6482a262f07c3f8154b7b" - integrity sha512-qp/plMQCpCabfDGeKZlOL74epNFzH1leZX7K/cqGwos0kYSElg6zPv/BayMRgID0oxllvuDq5M/fllXtF1QMig== +"@budibase/pro@2.0.30-alpha.13": + version "2.0.30-alpha.13" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.30-alpha.13.tgz#64d2536a098c5c46ae20ff2dff4740a7e88e2051" + integrity sha512-uxK5Zo6ZBxw82ZZrz1E2xXm7CBz/TB3VPnBHy5b2dQgEgshEbAxnxwzO1LiFmyb/dc62W1emO/lFIfhmp7tqtA== dependencies: - "@budibase/backend-core" "2.0.30-alpha.12" - "@budibase/types" "2.0.30-alpha.12" + "@budibase/backend-core" "2.0.30-alpha.13" + "@budibase/types" "2.0.30-alpha.13" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1209,10 +1209,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.0.30-alpha.12": - version "2.0.30-alpha.12" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.30-alpha.12.tgz#90912b6f6731d67f135787bc5cdeec562b30e336" - integrity sha512-PFO8BgScyaesA060ickUhiJTlKvOVIn6mUtc2rr3jrWZ5OTGGi31+eq+QhVcUS45BWuoEoPc0AhQPn7WtrvRQw== +"@budibase/types@2.0.30-alpha.13": + version "2.0.30-alpha.13" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.30-alpha.13.tgz#820e1c0e908ead50e76dfdf233f1b64931818ef5" + integrity sha512-tiyRl5Y2JFYSM/mJRszGsrp52+FL6O71tZasytn9H9Zenrcdr33eRWSC+RvoUGIXUub3uCoPht8aAC7YXNm/7g== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 2d86a90e31..78fb31b9f4 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "2.0.30-alpha.13", - "@budibase/pro": "2.0.30-alpha.12", + "@budibase/pro": "2.0.30-alpha.13", "@budibase/string-templates": "2.0.30-alpha.13", "@budibase/types": "2.0.30-alpha.13", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index a6b041c08e..cd817803c1 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@2.0.30-alpha.12": - version "2.0.30-alpha.12" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.30-alpha.12.tgz#adeb3e3f043c7b85a1a4aab3d3e33832d1ab8dfd" - integrity sha512-e/+tvvn1rcLTw/D/OlL9HYV1hw87x2mgofCV5Y1th6r1Tvum7Nr7revcU8CQIpVOc+iz6Eg1vAbMjqDsGr5YUw== +"@budibase/backend-core@2.0.30-alpha.13": + version "2.0.30-alpha.13" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.30-alpha.13.tgz#d32384e136bb458b3ae66435dcb1b73ea1dd371c" + integrity sha512-Jp5H84L68ru+8kSLFe/ysYncgW0LpJsSY1HBpXD/QJ9a/3/weDvOFfDUddq547B18ZclOGdEDt7USdqshiwxJA== dependencies: - "@budibase/types" "2.0.30-alpha.12" + "@budibase/types" "2.0.30-alpha.13" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -327,21 +327,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.0.30-alpha.12": - version "2.0.30-alpha.12" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.30-alpha.12.tgz#52a26671aad4248fa2a6482a262f07c3f8154b7b" - integrity sha512-qp/plMQCpCabfDGeKZlOL74epNFzH1leZX7K/cqGwos0kYSElg6zPv/BayMRgID0oxllvuDq5M/fllXtF1QMig== +"@budibase/pro@2.0.30-alpha.13": + version "2.0.30-alpha.13" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.30-alpha.13.tgz#64d2536a098c5c46ae20ff2dff4740a7e88e2051" + integrity sha512-uxK5Zo6ZBxw82ZZrz1E2xXm7CBz/TB3VPnBHy5b2dQgEgshEbAxnxwzO1LiFmyb/dc62W1emO/lFIfhmp7tqtA== dependencies: - "@budibase/backend-core" "2.0.30-alpha.12" - "@budibase/types" "2.0.30-alpha.12" + "@budibase/backend-core" "2.0.30-alpha.13" + "@budibase/types" "2.0.30-alpha.13" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.0.30-alpha.12": - version "2.0.30-alpha.12" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.30-alpha.12.tgz#90912b6f6731d67f135787bc5cdeec562b30e336" - integrity sha512-PFO8BgScyaesA060ickUhiJTlKvOVIn6mUtc2rr3jrWZ5OTGGi31+eq+QhVcUS45BWuoEoPc0AhQPn7WtrvRQw== +"@budibase/types@2.0.30-alpha.13": + version "2.0.30-alpha.13" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.30-alpha.13.tgz#820e1c0e908ead50e76dfdf233f1b64931818ef5" + integrity sha512-tiyRl5Y2JFYSM/mJRszGsrp52+FL6O71tZasytn9H9Zenrcdr33eRWSC+RvoUGIXUub3uCoPht8aAC7YXNm/7g== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0"