diff --git a/package.json b/package.json index 4c24e0025b..71acd886d3 100644 --- a/package.json +++ b/package.json @@ -45,8 +45,8 @@ "lint:eslint": "eslint packages", "lint:prettier": "prettier --check \"packages/**/*.{js,ts,svelte}\"", "lint": "yarn run lint:eslint && yarn run lint:prettier", - "lint:fix:eslint": "eslint --fix packages", - "lint:fix:prettier": "prettier --write \"packages/**/*.{js,ts,svelte}\" && prettier --write \"examples/**/*.{js,ts,svelte}\"", + "lint:fix:eslint": "eslint --fix packages qa-core", + "lint:fix:prettier": "prettier --write \"packages/**/*.{js,ts,svelte}\" && prettier --write \"examples/**/*.{js,ts,svelte}\" && prettier --write \"qa-core/**/*.{js,ts,svelte}\"", "lint:fix": "yarn run lint:fix:prettier && yarn run lint:fix:eslint", "test:e2e": "lerna run cy:test --stream", "test:e2e:ci": "lerna run cy:ci --stream", diff --git a/packages/server/src/api/controllers/public/mapping/types.ts b/packages/server/src/api/controllers/public/mapping/types.ts index a82a525f9c..5d161ec17a 100644 --- a/packages/server/src/api/controllers/public/mapping/types.ts +++ b/packages/server/src/api/controllers/public/mapping/types.ts @@ -4,10 +4,18 @@ export type Query = components["schemas"]["query"] export type ExecuteQuery = components["schemas"]["executeQueryOutput"] export type Application = components["schemas"]["applicationOutput"]["data"] +export type CreateApplicationParams = components["schemas"]["application"] export type Table = components["schemas"]["tableOutput"]["data"] +export type CreateTableParams = components["schemas"]["table"] export type Row = components["schemas"]["rowOutput"]["data"] export type RowSearch = components["schemas"]["searchOutput"] +export type CreateRowParams = components["schemas"]["row"] export type User = components["schemas"]["userOutput"]["data"] +export type CreateUserParams = components["schemas"]["user"] + +export type SearchInputParams = + | components["schemas"]["nameSearch"] + | components["schemas"]["querySearch"] diff --git a/packages/server/src/api/routes/tests/user.spec.js b/packages/server/src/api/routes/tests/user.spec.js index a7f1e7e7dc..e699f818d6 100644 --- a/packages/server/src/api/routes/tests/user.spec.js +++ b/packages/server/src/api/routes/tests/user.spec.js @@ -23,6 +23,7 @@ describe("/users", () => { }) describe("fetch", () => { + it("returns a list of users from an instance db", async () => { await config.createUser("uuidx") await config.createUser("uuidy") diff --git a/qa-core/package.json b/qa-core/package.json index 30d2fc9526..2103f1670e 100644 --- a/qa-core/package.json +++ b/qa-core/package.json @@ -21,8 +21,6 @@ "preset": "ts-jest", "testEnvironment": "node", "moduleNameMapper": { - "@budibase/backend-core/(.*)": "/../packages/backend-core/$1", - "@budibase/backend-core": "/../packages/backend-core/src", "@budibase/types": "/../packages/types/src" }, "setupFiles": [ @@ -33,18 +31,18 @@ ] }, "devDependencies": { - "@budibase/types": "^1.3.4", - "@types/jest": "^29.0.0", - "@types/node-fetch": "^2.6.2", - "chance": "^1.1.8", - "jest": "^28.0.2", - "prettier": "^2.7.1", - "start-server-and-test": "^1.14.0", - "timekeeper": "^2.2.0", + "@budibase/types": "1.3.4", + "@types/jest": "29.0.0", + "@types/node-fetch": "2.6.2", + "chance": "1.1.8", + "jest": "28.0.2", + "prettier": "2.7.1", + "start-server-and-test": "1.14.0", + "timekeeper": "2.2.0", "ts-jest": "28.0.8", - "ts-node": "^10.9.1", - "tsconfig-paths": "^4.1.0", - "typescript": "^4.8.2" + "ts-node": "10.9.1", + "tsconfig-paths": "4.1.0", + "typescript": "4.7.3" }, "dependencies": { "node-fetch": "2" diff --git a/qa-core/scripts/jestSetup.js b/qa-core/scripts/jestSetup.js index 5902a68af7..8254fd6d34 100644 --- a/qa-core/scripts/jestSetup.js +++ b/qa-core/scripts/jestSetup.js @@ -1,12 +1,14 @@ const env = require("../src/environment") env._set("BUDIBASE_SERVER_URL", "http://localhost:4100") -env._set("BUDIBASE_PUBLIC_API_KEY", "a65722f06bee5caeadc5d7ca2f543a43-d610e627344210c643bb726f") +env._set( + "BUDIBASE_PUBLIC_API_KEY", + "a65722f06bee5caeadc5d7ca2f543a43-d610e627344210c643bb726f" +) // mock all dates to 2020-01-01T00:00:00.000Z // use tk.reset() to use real dates in individual tests const MOCK_DATE = new Date("2020-01-01T00:00:00.000Z") -const MOCK_DATE_TIMESTAMP = 1577836800000 const tk = require("timekeeper") tk.freeze(MOCK_DATE) diff --git a/qa-core/src/tests/public-api/PublicAPIClient.ts b/qa-core/src/config/public-api/TestConfiguration/PublicAPIClient.ts similarity index 74% rename from qa-core/src/tests/public-api/PublicAPIClient.ts rename to qa-core/src/config/public-api/TestConfiguration/PublicAPIClient.ts index 017d8088dd..405007b5aa 100644 --- a/qa-core/src/tests/public-api/PublicAPIClient.ts +++ b/qa-core/src/config/public-api/TestConfiguration/PublicAPIClient.ts @@ -1,14 +1,14 @@ -import env from "../../environment" -import fetch from "node-fetch" - -interface HeaderOptions { - headers?: object; - body?: object; - json?: boolean; -} +import env from "../../../environment" +import fetch, { HeadersInit } from "node-fetch" type APIMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" +interface ApiOptions { + method?: APIMethod + body?: object + headers?: HeadersInit | undefined +} + class PublicAPIClient { host: string apiKey: string @@ -16,7 +16,9 @@ class PublicAPIClient { constructor(appId?: string) { if (!env.BUDIBASE_PUBLIC_API_KEY || !env.BUDIBASE_SERVER_URL) { - throw new Error("Must set BUDIBASE_PUBLIC_API_KEY and BUDIBASE_SERVER_URL env vars") + throw new Error( + "Must set BUDIBASE_PUBLIC_API_KEY and BUDIBASE_SERVER_URL env vars" + ) } this.host = `${env.BUDIBASE_SERVER_URL}/api/public/v1` this.apiKey = env.BUDIBASE_PUBLIC_API_KEY @@ -25,9 +27,9 @@ class PublicAPIClient { apiCall = (method: APIMethod) => - async (url = "", options: HeaderOptions = {}) => { + async (url = "", options: ApiOptions = {}) => { const requestOptions = { - method: method, + method, body: JSON.stringify(options.body), headers: { "x-budibase-api-key": this.apiKey, @@ -55,4 +57,4 @@ class PublicAPIClient { put = this.apiCall("PUT") } -export default PublicAPIClient \ No newline at end of file +export default PublicAPIClient diff --git a/qa-core/src/config/public-api/TestConfiguration/applications.ts b/qa-core/src/config/public-api/TestConfiguration/applications.ts new file mode 100644 index 0000000000..6232c14c28 --- /dev/null +++ b/qa-core/src/config/public-api/TestConfiguration/applications.ts @@ -0,0 +1,49 @@ +import PublicAPIClient from "./PublicAPIClient" +import { + Application, + SearchInputParams, + CreateApplicationParams, +} from "../../../../../packages/server/src/api/controllers/public/mapping/types" +import { Response } from "node-fetch" +import generateApp from "../fixtures/applications" + +export default class AppApi { + api: PublicAPIClient + + constructor(apiClient: PublicAPIClient) { + this.api = apiClient + } + + async seed(): Promise<[Response, Application]> { + return this.create(generateApp()) + } + + async create( + body: CreateApplicationParams + ): Promise<[Response, Application]> { + const response = await this.api.post(`/applications`, { body }) + const json = await response.json() + return [response, json.data] + } + + async read(id: string): Promise<[Response, Application]> { + const response = await this.api.get(`/applications/${id}`) + const json = await response.json() + return [response, json.data] + } + + async search(body: SearchInputParams): Promise<[Response, Application]> { + const response = await this.api.post(`/applications/search`, { body }) + const json = await response.json() + return [response, json.data] + } + + async update( + id: string, + body: Application + ): Promise<[Response, Application]> { + const response = await this.api.put(`/applications/${id}`, { body }) + const json = await response.json() + return [response, json.data] + } +} diff --git a/qa-core/src/tests/public-api/generator.ts b/qa-core/src/config/public-api/TestConfiguration/generator.ts similarity index 54% rename from qa-core/src/tests/public-api/generator.ts rename to qa-core/src/config/public-api/TestConfiguration/generator.ts index f9ef06f243..c9395f7e47 100644 --- a/qa-core/src/tests/public-api/generator.ts +++ b/qa-core/src/config/public-api/TestConfiguration/generator.ts @@ -1,3 +1,3 @@ const Chance = require("chance") -export default new Chance() \ No newline at end of file +export default new Chance() diff --git a/qa-core/src/config/public-api/TestConfiguration/index.ts b/qa-core/src/config/public-api/TestConfiguration/index.ts new file mode 100644 index 0000000000..36cc3022b0 --- /dev/null +++ b/qa-core/src/config/public-api/TestConfiguration/index.ts @@ -0,0 +1,27 @@ +import PublicAPIClient from "./PublicAPIClient" +import ApplicationApi from "./applications" +import TableApi from "./tables" +import UserApi from "./users" +import RowApi from "./rows" + +export default class TestConfiguration { + applications: ApplicationApi + users: UserApi + tables: TableApi + rows: RowApi + context: T + + constructor(apiClient: PublicAPIClient) { + this.applications = new ApplicationApi(apiClient) + this.users = new UserApi(apiClient) + this.tables = new TableApi(apiClient) + this.rows = new RowApi(apiClient) + this.context = {} + } + + async beforeAll() {} + + async afterAll() { + this.context = {} + } +} diff --git a/qa-core/src/config/public-api/TestConfiguration/rows.ts b/qa-core/src/config/public-api/TestConfiguration/rows.ts new file mode 100644 index 0000000000..4e39e4ec9e --- /dev/null +++ b/qa-core/src/config/public-api/TestConfiguration/rows.ts @@ -0,0 +1,58 @@ +import PublicAPIClient from "./PublicAPIClient" +import { + CreateRowParams, + Row, + SearchInputParams, +} from "../../../../../packages/server/src/api/controllers/public/mapping/types" +import { HeadersInit, Response } from "node-fetch" + +export default class RowApi { + api: PublicAPIClient + headers?: HeadersInit + tableId?: string + + constructor(apiClient: PublicAPIClient) { + this.api = apiClient + } + + set appId(appId: string) { + this.headers = { + "x-budibase-app-id": appId, + } + } + + async create(body: CreateRowParams): Promise<[Response, Row]> { + const response = await this.api.post(`/tables/${this.tableId}/rows`, { + body, + headers: this.headers, + }) + const json = await response.json() + return [response, json.data] + } + + async read(id: string): Promise<[Response, Row]> { + const response = await this.api.get(`/tables/${this.tableId}/rows/${id}`, { + headers: this.headers, + }) + const json = await response.json() + return [response, json.data] + } + + async search(body: SearchInputParams): Promise<[Response, Row]> { + const response = await this.api.post( + `/tables/${this.tableId}/rows/search`, + { body, headers: this.headers } + ) + const json = await response.json() + return [response, json.data] + } + + async update(id: string, body: Row): Promise<[Response, Row]> { + const response = await this.api.put(`/tables/${this.tableId}/rows/${id}`, { + body, + headers: this.headers, + }) + const json = await response.json() + return [response, json.data] + } +} diff --git a/qa-core/src/config/public-api/TestConfiguration/tables.ts b/qa-core/src/config/public-api/TestConfiguration/tables.ts new file mode 100644 index 0000000000..c0b7e088e1 --- /dev/null +++ b/qa-core/src/config/public-api/TestConfiguration/tables.ts @@ -0,0 +1,62 @@ +import PublicAPIClient from "./PublicAPIClient" +import { + Table, + SearchInputParams, + CreateTableParams, +} from "../../../../../packages/server/src/api/controllers/public/mapping/types" +import { HeadersInit, Response } from "node-fetch" +import { generateTable } from "../fixtures/tables" + +export default class TableApi { + api: PublicAPIClient + headers?: HeadersInit + + constructor(apiClient: PublicAPIClient) { + this.api = apiClient + } + + async seed() { + return this.create(generateTable()) + } + + set appId(appId: string) { + this.headers = { + "x-budibase-app-id": appId, + } + } + + async create(body: CreateTableParams): Promise<[Response, Table]> { + const response = await this.api.post(`/tables`, { + body, + headers: this.headers, + }) + const json = await response.json() + return [response, json.data] + } + + async read(id: string): Promise<[Response, Table]> { + const response = await this.api.get(`/tables/${id}`, { + headers: this.headers, + }) + const json = await response.json() + return [response, json.data] + } + + async search(body: SearchInputParams): Promise<[Response, Table]> { + const response = await this.api.post(`/tables/search`, { + body, + headers: this.headers, + }) + const json = await response.json() + return [response, json.data] + } + + async update(id: string, body: Table): Promise<[Response, Table]> { + const response = await this.api.put(`/tables/${id}`, { + body, + headers: this.headers, + }) + const json = await response.json() + return [response, json.data] + } +} diff --git a/qa-core/src/config/public-api/TestConfiguration/users.ts b/qa-core/src/config/public-api/TestConfiguration/users.ts new file mode 100644 index 0000000000..79217620aa --- /dev/null +++ b/qa-core/src/config/public-api/TestConfiguration/users.ts @@ -0,0 +1,41 @@ +import PublicAPIClient from "./PublicAPIClient" +import { + CreateUserParams, + SearchInputParams, + User, +} from "../../../../../packages/server/src/api/controllers/public/mapping/types" +import { Response } from "node-fetch" + +export default class UserApi { + api: PublicAPIClient + + constructor(apiClient: PublicAPIClient) { + this.api = apiClient + } + + async seed() {} + + async create(body: CreateUserParams): Promise<[Response, User]> { + const response = await this.api.post(`/users`, { body }) + const json = await response.json() + return [response, json.data] + } + + async read(id: string): Promise<[Response, User]> { + const response = await this.api.get(`/users/${id}`) + const json = await response.json() + return [response, json.data] + } + + async search(body: SearchInputParams): Promise<[Response, User]> { + const response = await this.api.post(`/users/search`, { body }) + const json = await response.json() + return [response, json.data] + } + + async update(id: string, body: User): Promise<[Response, User]> { + const response = await this.api.put(`/users/${id}`, { body }) + const json = await response.json() + return [response, json.data] + } +} diff --git a/qa-core/src/config/public-api/fixtures/applications.ts b/qa-core/src/config/public-api/fixtures/applications.ts new file mode 100644 index 0000000000..25456f4c4b --- /dev/null +++ b/qa-core/src/config/public-api/fixtures/applications.ts @@ -0,0 +1,10 @@ +import generator from "../TestConfiguration/generator" +import { CreateApplicationParams } from "../../../../../packages/server/src/api/controllers/public/mapping/types" + +const generate = (overrides = {}): CreateApplicationParams => ({ + name: generator.word(), + url: `/${generator.word()}`, + ...overrides, +}) + +export default generate diff --git a/qa-core/src/config/public-api/fixtures/tables.ts b/qa-core/src/config/public-api/fixtures/tables.ts new file mode 100644 index 0000000000..bbf93322c3 --- /dev/null +++ b/qa-core/src/config/public-api/fixtures/tables.ts @@ -0,0 +1,56 @@ +import { + CreateRowParams, + CreateTableParams, +} from "../../../../../packages/server/src/api/controllers/public/mapping/types" +import generator from "../TestConfiguration/generator" + +export const generateTable = (overrides = {}): CreateTableParams => ({ + name: generator.word(), + primaryDisplay: "sasa", + schema: { + "Auto ID": { + autocolumn: true, + name: "Auto ID", + type: "number", + }, + "Created At": { + autocolumn: true, + name: "Created At", + type: "datetime", + }, + "Created By": { + autocolumn: true, + fieldName: "test12-Created By", + name: "Created By", + relationshipType: "many-to-many", + tableId: "ta_users", + type: "link", + }, + sasa: { + name: "sasa", + type: "string", + }, + "Updated At": { + autocolumn: true, + name: "Updated At", + type: "datetime", + }, + "Updated By": { + autocolumn: true, + fieldName: "test12-Updated By", + name: "Updated By", + relationshipType: "many-to-many", + tableId: "ta_users", + type: "link", + }, + }, + ...overrides, +}) + +export const generateRow = (overrides = {}): CreateRowParams => ({ + type: "row", + tableId: "seed_table", + sasa: "Mike", + relationship: ["ro_ta_"], + ...overrides, +}) diff --git a/qa-core/src/config/public-api/fixtures/users.ts b/qa-core/src/config/public-api/fixtures/users.ts new file mode 100644 index 0000000000..52124024e7 --- /dev/null +++ b/qa-core/src/config/public-api/fixtures/users.ts @@ -0,0 +1,22 @@ +import { CreateUserParams } from "../../../../../packages/server/src/api/controllers/public/mapping/types" +import generator from "../TestConfiguration/generator" + +const generate = (overrides = {}): CreateUserParams => ({ + email: generator.email(), + roles: { + [generator.string({ length: 32, alpha: true, numeric: true })]: + generator.word(), + }, + password: generator.word(), + status: "active", + forceResetPassword: generator.bool(), + builder: { + global: generator.bool(), + }, + admin: { + global: generator.bool(), + }, + ...overrides, +}) + +export default generate diff --git a/qa-core/src/environment.ts b/qa-core/src/environment.ts index 4ef8de795a..b0ed3cec85 100644 --- a/qa-core/src/environment.ts +++ b/qa-core/src/environment.ts @@ -1,8 +1,10 @@ -export = { +const env = { BUDIBASE_SERVER_URL: process.env.BUDIBASE_SERVER_URL, BUDIBASE_PUBLIC_API_KEY: process.env.BUDIBASE_PUBLIC_API_KEY, _set(key: any, value: any) { process.env[key] = value module.exports[key] = value }, -} \ No newline at end of file +} + +export = env diff --git a/qa-core/src/jest.extends.ts b/qa-core/src/jest.extends.ts index 380bf85c81..653009f5f0 100644 --- a/qa-core/src/jest.extends.ts +++ b/qa-core/src/jest.extends.ts @@ -1,21 +1,22 @@ +import { Response } from "node-fetch" + // boilerplate to allow TS updates to the global scope -export {}; +export {} declare global { namespace jest { interface Matchers { - toHaveStatusCode(code: number): R; + toHaveStatusCode(code: number): R } } } // Expect extensions expect.extend({ - toHaveStatusCode(received, code) { + toHaveStatusCode(received: Response, code: number) { const pass = received.status === code return { - message: () => - `expected ${received.status} to match status code ${code}`, + message: () => `expected ${received.status} to match status code ${code}`, pass, } }, diff --git a/qa-core/src/tests/public-api/TestConfiguration.ts b/qa-core/src/tests/public-api/TestConfiguration.ts deleted file mode 100644 index 647e64758e..0000000000 --- a/qa-core/src/tests/public-api/TestConfiguration.ts +++ /dev/null @@ -1,39 +0,0 @@ -import PublicAPIClient from "./PublicAPIClient"; -import generateApp from "./applications/fixtures/generate" - -class TestConfiguration { - testContext: Record; - apiClient: PublicAPIClient; - - constructor() { - this.testContext = {} - this.apiClient = new PublicAPIClient() - } - - async beforeAll() { - - } - - async afterAll() { - } - - async seedTable(appId: string) { - const response = await this.apiClient.post("/tables", { - body: require("./tables/fixtures/seed.json"), - headers: { - "x-budibase-app-id": appId - } - }) - const json = await response.json() - return json.data - } - - async seedApp() { - const response = await this.apiClient.post("/applications", { - body: generateApp() - }) - return response.json() - } -} - -export default TestConfiguration diff --git a/qa-core/src/tests/public-api/applications/applications.spec.ts b/qa-core/src/tests/public-api/applications/applications.spec.ts index 83180429e0..1031f511b4 100644 --- a/qa-core/src/tests/public-api/applications/applications.spec.ts +++ b/qa-core/src/tests/public-api/applications/applications.spec.ts @@ -1,10 +1,11 @@ -import TestConfiguration from "../TestConfiguration" -import PublicAPIClient from "../PublicAPIClient" -import generateApp from "./fixtures/generate" +import TestConfiguration from "../../../config/public-api/TestConfiguration" +import PublicAPIClient from "../../../config/public-api/TestConfiguration/PublicAPIClient" +import generateApp from "../../../config/public-api/fixtures/applications" +import { Application } from "../../../../../packages/server/src/api/controllers/public/mapping/types" describe("Public API - /applications endpoints", () => { const api = new PublicAPIClient() - const config = new TestConfiguration() + const config = new TestConfiguration(api) beforeAll(async () => { await config.beforeAll() @@ -14,34 +15,30 @@ describe("Public API - /applications endpoints", () => { await config.afterAll() }) - it("POST - Create a application", async () => { - const response = await api.post(`/applications`, { - body: generateApp() - }) - const json = await response.json() - config.testContext.application = json.data + it("POST - Create an application", async () => { + const [response, app] = await config.applications.create(generateApp()) + config.context = app expect(response).toHaveStatusCode(200) }) it("POST - Search applications", async () => { - const response = await api.post(`/applications/search`, { - body: { - name: config.testContext.application.name - } + const [response, app] = await config.applications.search({ + name: config.context.name, }) expect(response).toHaveStatusCode(200) }) - it("GET - Retrieve a application", async () => { - const response = await api.get(`/applications/${config.testContext.application._id}`) + it("GET - Retrieve an application", async () => { + const [response, app] = await config.applications.read(config.context._id) expect(response).toHaveStatusCode(200) }) - - it("PUT - update a application", async () => { - const response = await api.put(`/applications/${config.testContext.application._id}`, { - body: require("./fixtures/update_application.json") - }) + it("PUT - update an application", async () => { + config.context.name = "UpdatedName" + const [response, app] = await config.applications.update( + config.context._id, + config.context + ) expect(response).toHaveStatusCode(200) }) }) diff --git a/qa-core/src/tests/public-api/applications/fixtures/application.json b/qa-core/src/tests/public-api/applications/fixtures/application.json deleted file mode 100644 index 093edbcb0e..0000000000 --- a/qa-core/src/tests/public-api/applications/fixtures/application.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "TestApp", - "url": "/testapp" -} \ No newline at end of file diff --git a/qa-core/src/tests/public-api/applications/fixtures/generate.ts b/qa-core/src/tests/public-api/applications/fixtures/generate.ts deleted file mode 100644 index 2e28f6fb06..0000000000 --- a/qa-core/src/tests/public-api/applications/fixtures/generate.ts +++ /dev/null @@ -1,9 +0,0 @@ -import generator from "../../generator" - -const generate = (overrides = {}) => ({ - name: generator.word(), - url: `/${generator.word()}`, - ...overrides -}) - -export default generate \ No newline at end of file diff --git a/qa-core/src/tests/public-api/applications/fixtures/seed.json b/qa-core/src/tests/public-api/applications/fixtures/seed.json deleted file mode 100644 index 7a5de02e82..0000000000 --- a/qa-core/src/tests/public-api/applications/fixtures/seed.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "SeedApp", - "url": "/seedapp" -} \ No newline at end of file diff --git a/qa-core/src/tests/public-api/applications/fixtures/update_application.json b/qa-core/src/tests/public-api/applications/fixtures/update_application.json deleted file mode 100644 index ea3b3d0b31..0000000000 --- a/qa-core/src/tests/public-api/applications/fixtures/update_application.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "UpdatedTestApp", - "url": "/updatedtestapp" -} \ No newline at end of file diff --git a/qa-core/src/tests/public-api/tables/fixtures/row.json b/qa-core/src/tests/public-api/tables/fixtures/row.json deleted file mode 100644 index 9436576947..0000000000 --- a/qa-core/src/tests/public-api/tables/fixtures/row.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "type": "row", - "tableId": "seed_table", - "sasa": "Mike", - "relationship": [ - "ro_ta_" - ] -} \ No newline at end of file diff --git a/qa-core/src/tests/public-api/tables/fixtures/seed.json b/qa-core/src/tests/public-api/tables/fixtures/seed.json deleted file mode 100644 index acbaeaff6c..0000000000 --- a/qa-core/src/tests/public-api/tables/fixtures/seed.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "name": "test", - "primaryDisplay": "sasa", - "schema": { - "Auto ID": { - "autocolumn": true, - "constraints": { - "numericality": { - "greaterThanOrEqualTo": "", - "lessThanOrEqualTo": "" - }, - "presence": false, - "type": "number" - }, - "icon": "ri-magic-line", - "name": "Auto ID", - "subtype": "autoID", - "type": "number" - }, - "Created At": { - "autocolumn": true, - "constraints": { - "datetime": { - "earliest": "", - "latest": "" - }, - "length": {}, - "presence": false, - "type": "string" - }, - "icon": "ri-magic-line", - "name": "Created At", - "subtype": "createdAt", - "type": "datetime" - }, - "Created By": { - "autocolumn": true, - "constraints": { - "presence": false, - "type": "array" - }, - "fieldName": "test12-Created By", - "icon": "ri-magic-line", - "name": "Created By", - "relationshipType": "many-to-many", - "subtype": "createdBy", - "tableId": "ta_users", - "type": "link" - }, - "sasa": { - "constraints": { - "length": { - "maximum": null - }, - "presence": { - "allowEmpty": false - }, - "type": "string" - }, - "name": "sasa", - "type": "string" - }, - "Updated At": { - "autocolumn": true, - "constraints": { - "datetime": { - "earliest": "", - "latest": "" - }, - "length": {}, - "presence": false, - "type": "string" - }, - "icon": "ri-magic-line", - "name": "Updated At", - "subtype": "updatedAt", - "type": "datetime" - }, - "Updated By": { - "autocolumn": true, - "constraints": { - "presence": false, - "type": "array" - }, - "fieldName": "test12-Updated By", - "icon": "ri-magic-line", - "name": "Updated By", - "relationshipType": "many-to-many", - "subtype": "updatedBy", - "tableId": "ta_users", - "type": "link" - } - } -} \ No newline at end of file diff --git a/qa-core/src/tests/public-api/tables/fixtures/table.json b/qa-core/src/tests/public-api/tables/fixtures/table.json deleted file mode 100644 index acbaeaff6c..0000000000 --- a/qa-core/src/tests/public-api/tables/fixtures/table.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "name": "test", - "primaryDisplay": "sasa", - "schema": { - "Auto ID": { - "autocolumn": true, - "constraints": { - "numericality": { - "greaterThanOrEqualTo": "", - "lessThanOrEqualTo": "" - }, - "presence": false, - "type": "number" - }, - "icon": "ri-magic-line", - "name": "Auto ID", - "subtype": "autoID", - "type": "number" - }, - "Created At": { - "autocolumn": true, - "constraints": { - "datetime": { - "earliest": "", - "latest": "" - }, - "length": {}, - "presence": false, - "type": "string" - }, - "icon": "ri-magic-line", - "name": "Created At", - "subtype": "createdAt", - "type": "datetime" - }, - "Created By": { - "autocolumn": true, - "constraints": { - "presence": false, - "type": "array" - }, - "fieldName": "test12-Created By", - "icon": "ri-magic-line", - "name": "Created By", - "relationshipType": "many-to-many", - "subtype": "createdBy", - "tableId": "ta_users", - "type": "link" - }, - "sasa": { - "constraints": { - "length": { - "maximum": null - }, - "presence": { - "allowEmpty": false - }, - "type": "string" - }, - "name": "sasa", - "type": "string" - }, - "Updated At": { - "autocolumn": true, - "constraints": { - "datetime": { - "earliest": "", - "latest": "" - }, - "length": {}, - "presence": false, - "type": "string" - }, - "icon": "ri-magic-line", - "name": "Updated At", - "subtype": "updatedAt", - "type": "datetime" - }, - "Updated By": { - "autocolumn": true, - "constraints": { - "presence": false, - "type": "array" - }, - "fieldName": "test12-Updated By", - "icon": "ri-magic-line", - "name": "Updated By", - "relationshipType": "many-to-many", - "subtype": "updatedBy", - "tableId": "ta_users", - "type": "link" - } - } -} \ No newline at end of file diff --git a/qa-core/src/tests/public-api/tables/fixtures/update_row.json b/qa-core/src/tests/public-api/tables/fixtures/update_row.json deleted file mode 100644 index 556e02f8bd..0000000000 --- a/qa-core/src/tests/public-api/tables/fixtures/update_row.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "type": "row", - "tableId": "seed_table", - "sasa": "MikeIsTheBest", - "relationship": [ - "ro_ta_..." - ] -} \ No newline at end of file diff --git a/qa-core/src/tests/public-api/tables/fixtures/update_table.json b/qa-core/src/tests/public-api/tables/fixtures/update_table.json deleted file mode 100644 index 64ca1147e8..0000000000 --- a/qa-core/src/tests/public-api/tables/fixtures/update_table.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "name": "test123", - "primaryDisplay": "sasa", - "schema": { - "Auto ID": { - "autocolumn": true, - "constraints": { - "numericality": { - "greaterThanOrEqualTo": "", - "lessThanOrEqualTo": "" - }, - "presence": false, - "type": "number" - }, - "icon": "ri-magic-line", - "name": "Auto ID", - "subtype": "autoID", - "type": "number" - }, - "Created At": { - "autocolumn": true, - "constraints": { - "datetime": { - "earliest": "", - "latest": "" - }, - "length": {}, - "presence": false, - "type": "string" - }, - "icon": "ri-magic-line", - "name": "Created At", - "subtype": "createdAt", - "type": "datetime" - }, - "Created By": { - "autocolumn": true, - "constraints": { - "presence": false, - "type": "array" - }, - "fieldName": "test12-Created By", - "icon": "ri-magic-line", - "name": "Created By", - "relationshipType": "many-to-many", - "subtype": "createdBy", - "tableId": "ta_users", - "type": "link" - }, - "sasa": { - "constraints": { - "length": { - "maximum": null - }, - "presence": { - "allowEmpty": false - }, - "type": "string" - }, - "name": "sasa", - "type": "string" - }, - "Updated At": { - "autocolumn": true, - "constraints": { - "datetime": { - "earliest": "", - "latest": "" - }, - "length": {}, - "presence": false, - "type": "string" - }, - "icon": "ri-magic-line", - "name": "Updated At", - "subtype": "updatedAt", - "type": "datetime" - }, - "Updated By": { - "autocolumn": true, - "constraints": { - "presence": false, - "type": "array" - }, - "fieldName": "test12-Updated By", - "icon": "ri-magic-line", - "name": "Updated By", - "relationshipType": "many-to-many", - "subtype": "updatedBy", - "tableId": "ta_users", - "type": "link" - } - } -} \ No newline at end of file diff --git a/qa-core/src/tests/public-api/tables/rows.spec.ts b/qa-core/src/tests/public-api/tables/rows.spec.ts index 099a3d3593..66d46208cc 100644 --- a/qa-core/src/tests/public-api/tables/rows.spec.ts +++ b/qa-core/src/tests/public-api/tables/rows.spec.ts @@ -1,17 +1,22 @@ -import TestConfiguration from "../TestConfiguration" -import PublicAPIClient from "../PublicAPIClient" +import { Row } from "../../../../../packages/server/src/api/controllers/public/mapping/types" +import { generateRow } from "../../../config/public-api/fixtures/tables" +import TestConfiguration from "../../../config/public-api/TestConfiguration" +import PublicAPIClient from "../../../config/public-api/TestConfiguration/PublicAPIClient" describe("Public API - /rows endpoints", () => { - let api: PublicAPIClient + let api = new PublicAPIClient() - const config = new TestConfiguration() + const config = new TestConfiguration(api) beforeAll(async () => { await config.beforeAll() - const app = await config.seedApp() + const [appResp, app] = await config.applications.seed() - config.testContext.table = await config.seedTable(app.data._id) - api = new PublicAPIClient(app.data._id) + config.tables.appId = app._id + const [tableResp, table] = await config.tables.seed() + + config.rows.appId = app._id + config.rows.tableId = table._id }) afterAll(async () => { @@ -19,33 +24,29 @@ describe("Public API - /rows endpoints", () => { }) it("POST - Create a row", async () => { - const response = await api.post(`/tables/${config.testContext.table._id}/rows`, { - body: require("./fixtures/row.json") - }) - const json = await response.json() - config.testContext.row = json.data + const [response, row] = await config.rows.create(generateRow()) + config.context = row expect(response).toHaveStatusCode(200) }) it("POST - Search rows", async () => { - const response = await api.post(`/tables/${config.testContext.table._id}/rows/search`, { - body: { - name: config.testContext.row.name - } + const [response, row] = await config.rows.search({ + name: config.context.name as string, }) expect(response).toHaveStatusCode(200) }) it("GET - Retrieve a row", async () => { - const response = await api.get(`/tables/${config.testContext.table._id}/rows/${config.testContext.row._id}`) + const [response, row] = await config.rows.read(config.context._id) expect(response).toHaveStatusCode(200) }) - it("PUT - update a row", async () => { - const response = await api.put(`/tables/${config.testContext.table._id}/rows/${config.testContext.row._id}`, { - body: require("./fixtures/update_row.json") - }) + config.context.name = "UpdatedName" + const [response, row] = await config.rows.update( + config.context._id, + config.context + ) expect(response).toHaveStatusCode(200) }) }) diff --git a/qa-core/src/tests/public-api/tables/tables.spec.ts b/qa-core/src/tests/public-api/tables/tables.spec.ts index 70e3bb8d78..9dfdc8cdc0 100644 --- a/qa-core/src/tests/public-api/tables/tables.spec.ts +++ b/qa-core/src/tests/public-api/tables/tables.spec.ts @@ -1,14 +1,16 @@ -import TestConfiguration from "../TestConfiguration" -import PublicAPIClient from "../PublicAPIClient" +import { Table } from "../../../../../packages/server/src/api/controllers/public/mapping/types" +import { generateTable } from "../../../config/public-api/fixtures/tables" +import TestConfiguration from "../../../config/public-api/TestConfiguration" +import PublicAPIClient from "../../../config/public-api/TestConfiguration/PublicAPIClient" describe("Public API - /tables endpoints", () => { - let api: PublicAPIClient - const config = new TestConfiguration() + let api = new PublicAPIClient() + const config = new TestConfiguration(api) beforeAll(async () => { await config.beforeAll() - const app = await config.seedApp() - api = new PublicAPIClient(app.data._id) + const [_, app] = await config.applications.seed() + config.tables.appId = app._id }) afterAll(async () => { @@ -16,33 +18,29 @@ describe("Public API - /tables endpoints", () => { }) it("POST - Create a table", async () => { - const response = await api.post(`/tables`, { - body: require("./fixtures/table.json") - }) - const json = await response.json() - config.testContext.table = json.data + const [response, table] = await config.tables.create(generateTable()) + config.context = table expect(response).toHaveStatusCode(200) }) it("POST - Search tables", async () => { - const response = await api.post(`/tables/search`, { - body: { - name: config.testContext.table.name - } + const [response, table] = await config.tables.search({ + name: config.context.name, }) expect(response).toHaveStatusCode(200) }) it("GET - Retrieve a table", async () => { - const response = await api.get(`/tables/${config.testContext.table._id}`) + const [response, table] = await config.tables.read(config.context._id) expect(response).toHaveStatusCode(200) }) - it("PUT - update a table", async () => { - const response = await api.put(`/tables/${config.testContext.table._id}`, { - body: require("./fixtures/update_table.json") - }) + config.context.name = "updatedName" + const [response, table] = await config.tables.update( + config.context._id, + config.context + ) expect(response).toHaveStatusCode(200) }) }) diff --git a/qa-core/src/tests/public-api/users/fixtures/generate.ts b/qa-core/src/tests/public-api/users/fixtures/generate.ts deleted file mode 100644 index ca3c7b3c2c..0000000000 --- a/qa-core/src/tests/public-api/users/fixtures/generate.ts +++ /dev/null @@ -1,22 +0,0 @@ -import generator from "../../generator" -import { User } from "@budibase/types" - -const generate = (overrides = {}): User => ({ - tenantId: generator.word(), - email: generator.email(), - roles: { - [generator.string({ length: 32, alpha: true, numeric: true })]: generator.word(), - }, - password: generator.word(), - status: "active", - forceResetPassword: generator.bool(), - builder: { - global: generator.bool() - }, - admin: { - global: generator.bool() - }, - ...overrides -}) - -export default generate \ No newline at end of file diff --git a/qa-core/src/tests/public-api/users/fixtures/update_user.json b/qa-core/src/tests/public-api/users/fixtures/update_user.json deleted file mode 100644 index 72d24b3ee8..0000000000 --- a/qa-core/src/tests/public-api/users/fixtures/update_user.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "email": "test@budibase.com", - "roles": { - "sed_6d7": "sit ea amet", - "cupidatat_e16": "fugiat proident sed" - }, - "password": "cupidatat Lorem ad", - "status": "active", - "firstName": "QA", - "lastName": "Updated", - "forceResetPassword": true, - "builder": { - "global": true - }, - "admin": { - "global": false - } -} \ No newline at end of file diff --git a/qa-core/src/tests/public-api/users/fixtures/user.json b/qa-core/src/tests/public-api/users/fixtures/user.json deleted file mode 100644 index b6fc9f49e6..0000000000 --- a/qa-core/src/tests/public-api/users/fixtures/user.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "email": "test@budibase.com", - "roles": { - "sed_6d7": "sit ea amet", - "cupidatat_e16": "fugiat proident sed" - }, - "password": "cupidatat Lorem ad", - "status": "active", - "firstName": "QA", - "lastName": "Test", - "forceResetPassword": true, - "builder": { - "global": true - }, - "admin": { - "global": false - } -} \ No newline at end of file diff --git a/qa-core/src/tests/public-api/users/users.spec.ts b/qa-core/src/tests/public-api/users/users.spec.ts index c18a78ca72..95d257c0f9 100644 --- a/qa-core/src/tests/public-api/users/users.spec.ts +++ b/qa-core/src/tests/public-api/users/users.spec.ts @@ -1,9 +1,11 @@ -import TestConfiguration from "../TestConfiguration" -import PublicAPIClient from "../PublicAPIClient" +import TestConfiguration from "../../../config/public-api/TestConfiguration" +import PublicAPIClient from "../../../config/public-api/TestConfiguration/PublicAPIClient" +import generateUser from "../../../config/public-api/fixtures/users" +import { User } from "../../../../../packages/server/src/api/controllers/public/mapping/types" describe("Public API - /users endpoints", () => { const api = new PublicAPIClient() - const config = new TestConfiguration() + const config = new TestConfiguration(api) beforeAll(async () => { await config.beforeAll() @@ -14,33 +16,29 @@ describe("Public API - /users endpoints", () => { }) it("POST - Create a user", async () => { - const response = await api.post(`/users`, { - body: require("./fixtures/user.json") - }) - const json = await response.json() - config.testContext.user = json.data + const [response, user] = await config.users.create(generateUser()) + config.context = user expect(response).toHaveStatusCode(200) }) it("POST - Search users", async () => { - const response = await api.post(`/users/search`, { - body: { - name: config.testContext.user.email - } + const [response, user] = await config.users.search({ + name: config.context.email, }) expect(response).toHaveStatusCode(200) }) it("GET - Retrieve a user", async () => { - const response = await api.get(`/users/${config.testContext.user._id}`) + const [response, user] = await config.users.read(config.context._id) expect(response).toHaveStatusCode(200) }) - it("PUT - update a user", async () => { - const response = await api.put(`/users/${config.testContext.user._id}`, { - body: require("./fixtures/update_user.json") - }) + config.context.firstName = "Updated First Name" + const [response, user] = await config.users.update( + config.context._id, + config.context + ) expect(response).toHaveStatusCode(200) }) }) diff --git a/qa-core/tsconfig.json b/qa-core/tsconfig.json index c305c3a4bd..0fa56727b8 100644 --- a/qa-core/tsconfig.json +++ b/qa-core/tsconfig.json @@ -14,8 +14,6 @@ "skipLibCheck": true, "paths": { "@budibase/types": ["../packages/types/src"], - "@budibase/backend-core": ["../packages/backend-core/src"], - "@budibase/backend-core/*": ["../packages/backend-core/*"] } }, "ts-node": { @@ -23,7 +21,6 @@ }, "references": [ { "path": "../packages/types" }, - { "path": "../packages/backend-core" }, ], "include": [ "src/**/*", diff --git a/qa-core/yarn.lock b/qa-core/yarn.lock index 5daa4d7ee7..9474c47b7c 100644 --- a/qa-core/yarn.lock +++ b/qa-core/yarn.lock @@ -290,7 +290,7 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/types@^1.3.4": +"@budibase/types@1.3.4": version "1.3.4" resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.3.4.tgz#25f087b024e843eb372e50c81f8f925fb39f1dfd" integrity sha512-ndyWs8yeCS7cpZjApDB1HhY6UUM2SRBUgAMCZOZaWABG9JHeCbx7x0e/pA2SZjswdMXqS5WmnEd3br5wuvUzJw== @@ -342,7 +342,7 @@ jest-util "^28.1.3" slash "^3.0.0" -"@jest/core@^28.1.3": +"@jest/core@^28.0.2", "@jest/core@^28.1.3": version "28.1.3" resolved "https://registry.yarnpkg.com/@jest/core/-/core-28.1.3.tgz#0ebf2bd39840f1233cd5f2d1e6fc8b71bd5a1ac7" integrity sha512-CIKBrlaKOzA7YG19BEqCw3SLIsEwjZkeJzf5bdooVnW4bH5cktqe3JX+G2YV1aK5vP8N9na1IGWFzYaTp6k6NA== @@ -712,7 +712,7 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@^29.0.0": +"@types/jest@29.0.0": version "29.0.0" resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.0.0.tgz#bc66835bf6b09d6a47e22c21d7f5b82692e60e72" integrity sha512-X6Zjz3WO4cT39Gkl0lZ2baFRaEMqJl5NC1OjElkwtNzAlbkr2K/WJXkBkH5VP0zx4Hgsd2TZYdOEfvp2Dxia+Q== @@ -720,7 +720,7 @@ expect "^29.0.0" pretty-format "^29.0.0" -"@types/node-fetch@^2.6.2": +"@types/node-fetch@2.6.2": version "2.6.2" resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.2.tgz#d1a9c5fd049d9415dce61571557104dec3ec81da" integrity sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A== @@ -979,7 +979,7 @@ chalk@^4.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chance@^1.1.8: +chance@1.1.8: version "1.1.8" resolved "https://registry.yarnpkg.com/chance/-/chance-1.1.8.tgz#5d6c2b78c9170bf6eb9df7acdda04363085be909" integrity sha512-v7fi5Hj2VbR6dJEGRWLmJBA83LJMS47pkAbmROFxHWd9qmE1esHRZW8Clf1Fhzr3rjxnNZVCjOEv/ivFxeIMtg== @@ -1499,7 +1499,7 @@ jest-circus@^28.1.3: slash "^3.0.0" stack-utils "^2.0.3" -jest-cli@^28.1.3: +jest-cli@^28.0.2: version "28.1.3" resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-28.1.3.tgz#558b33c577d06de55087b8448d373b9f654e46b2" integrity sha512-roY3kvrv57Azn1yPgdTebPAXvdR2xfezaKKYzVxZ6It/5NCxzJym6tUI5P1zkdWhfUYkxEI9uZWcQdaFLo8mJQ== @@ -1866,15 +1866,14 @@ jest-worker@^28.1.3: merge-stream "^2.0.0" supports-color "^8.0.0" -jest@^28.0.2: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest/-/jest-28.1.3.tgz#e9c6a7eecdebe3548ca2b18894a50f45b36dfc6b" - integrity sha512-N4GT5on8UkZgH0O5LUavMRV1EDEhNTL0KEfRmDIeZHSV7p2XgLoY9t9VDUgL6o+yfdgYHVxuz81G8oB9VG5uyA== +jest@28.0.2: + version "28.0.2" + resolved "https://registry.yarnpkg.com/jest/-/jest-28.0.2.tgz#41385ca21d009708bb9fc65e08663110e08e2cc0" + integrity sha512-COUtjybolW4koQvO7kCfq5kgbeeU5WbSJfVZprz4zbS8AL32+RAZZTUjBEyRRdpsXqss/pHIvSL7/P+LyMYHXg== dependencies: - "@jest/core" "^28.1.3" - "@jest/types" "^28.1.3" + "@jest/core" "^28.0.2" import-local "^3.0.2" - jest-cli "^28.1.3" + jest-cli "^28.0.2" joi@^17.4.0: version "17.6.0" @@ -2163,7 +2162,7 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" -prettier@^2.7.1: +prettier@2.7.1: version "2.7.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== @@ -2328,7 +2327,7 @@ stack-utils@^2.0.3: dependencies: escape-string-regexp "^2.0.0" -start-server-and-test@^1.14.0: +start-server-and-test@1.14.0: version "1.14.0" resolved "https://registry.yarnpkg.com/start-server-and-test/-/start-server-and-test-1.14.0.tgz#c57f04f73eac15dd51733b551d775b40837fdde3" integrity sha512-on5ELuxO2K0t8EmNj9MtVlFqwBMxfWOhu4U7uZD1xccVpFlOQKR93CSe0u98iQzfNxRyaNTb/CdadbNllplTsw== @@ -2448,7 +2447,7 @@ through@2, through@~2.3, through@~2.3.1: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== -timekeeper@^2.2.0: +timekeeper@2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/timekeeper/-/timekeeper-2.2.0.tgz#9645731fce9e3280a18614a57a9d1b72af3ca368" integrity sha512-W3AmPTJWZkRwu+iSNxPIsLZ2ByADsOLbbLxe46UJyWj3mlYLlwucKiq+/dPm0l9wTzqoF3/2PH0AGFCebjq23A== @@ -2489,7 +2488,7 @@ ts-jest@28.0.8: semver "7.x" yargs-parser "^21.0.1" -ts-node@^10.9.1: +ts-node@10.9.1: version "10.9.1" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== @@ -2508,7 +2507,7 @@ ts-node@^10.9.1: v8-compile-cache-lib "^3.0.1" yn "3.1.1" -tsconfig-paths@^4.1.0: +tsconfig-paths@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-4.1.0.tgz#f8ef7d467f08ae3a695335bf1ece088c5538d2c1" integrity sha512-AHx4Euop/dXFC+Vx589alFba8QItjF+8hf8LtmuiCwHyI4rHXQtOOENaM8kvYf5fR0dRChy3wzWIZ9WbB7FWow== @@ -2532,10 +2531,10 @@ type-fest@^0.21.3: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== -typescript@^4.8.2: - version "4.8.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.2.tgz#e3b33d5ccfb5914e4eeab6699cf208adee3fd790" - integrity sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw== +typescript@4.7.3: + version "4.7.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.3.tgz#8364b502d5257b540f9de4c40be84c98e23a129d" + integrity sha512-WOkT3XYvrpXx4vMMqlD+8R8R37fZkjyLGlxavMc4iB8lrl8L0DeTcHbYgw/v0N/z9wAFsgBhcsF0ruoySS22mA== update-browserslist-db@^1.0.5: version "1.0.7"