From d84b3b95d03be469529201f1dfe36857d77667d9 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Tue, 4 Oct 2022 10:31:40 +0100 Subject: [PATCH 01/16] Types for sending quota triggered email --- packages/types/src/api/account/index.ts | 1 + packages/types/src/api/account/license.ts | 11 +++++++++++ packages/types/src/documents/account/account.ts | 2 ++ .../TestConfiguration/InternalAPIClient.ts | 6 ++---- .../internal-api/TestConfiguration/applications.ts | 8 ++------ .../config/internal-api/TestConfiguration/auth.ts | 6 +++--- .../config/internal-api/fixtures/applications.ts | 9 ++++----- .../tests/internal-api/applications/create.spec.ts | 13 +++++++------ 8 files changed, 32 insertions(+), 24 deletions(-) create mode 100644 packages/types/src/api/account/license.ts diff --git a/packages/types/src/api/account/index.ts b/packages/types/src/api/account/index.ts index 50c6bf22c6..0cbc487bcc 100644 --- a/packages/types/src/api/account/index.ts +++ b/packages/types/src/api/account/index.ts @@ -1 +1,2 @@ export * from "./user" +export * from "./license" diff --git a/packages/types/src/api/account/license.ts b/packages/types/src/api/account/license.ts new file mode 100644 index 0000000000..67791e5d6f --- /dev/null +++ b/packages/types/src/api/account/license.ts @@ -0,0 +1,11 @@ +import { QuotaUsage } from "../../documents" + +export interface GetLicenseRequest { + quotaUsage: QuotaUsage +} + +export interface QuotaUsageTriggeredRequest { + percentage: number + name: string + resetDate: string +} diff --git a/packages/types/src/documents/account/account.ts b/packages/types/src/documents/account/account.ts index e7dcf2d89f..eb12f7754b 100644 --- a/packages/types/src/documents/account/account.ts +++ b/packages/types/src/documents/account/account.ts @@ -1,4 +1,5 @@ import { Feature, Hosting, PlanType, Quotas } from "../../sdk" +import { QuotaUsage } from "../global" export interface CreateAccount { email: string @@ -42,6 +43,7 @@ export interface Account extends CreateAccount { licenseKey?: string licenseKeyActivatedAt?: number licenseOverrides?: LicenseOverrides + quotaUsage?: QuotaUsage } export interface PasswordAccount extends Account { diff --git a/qa-core/src/config/internal-api/TestConfiguration/InternalAPIClient.ts b/qa-core/src/config/internal-api/TestConfiguration/InternalAPIClient.ts index bfcbb9f4e2..dafc2b1ff2 100644 --- a/qa-core/src/config/internal-api/TestConfiguration/InternalAPIClient.ts +++ b/qa-core/src/config/internal-api/TestConfiguration/InternalAPIClient.ts @@ -16,9 +16,7 @@ class InternalAPIClient { constructor(appId?: string) { if (!env.BUDIBASE_SERVER_URL) { - throw new Error( - "Must set BUDIBASE_SERVER_URL env var" - ) + throw new Error("Must set BUDIBASE_SERVER_URL env var") } this.host = `${env.BUDIBASE_SERVER_URL}/api` this.appId = appId @@ -55,4 +53,4 @@ class InternalAPIClient { put = this.apiCall("PUT") } -export default InternalAPIClient \ No newline at end of file +export default InternalAPIClient diff --git a/qa-core/src/config/internal-api/TestConfiguration/applications.ts b/qa-core/src/config/internal-api/TestConfiguration/applications.ts index 10e4a6657b..0c51487122 100644 --- a/qa-core/src/config/internal-api/TestConfiguration/applications.ts +++ b/qa-core/src/config/internal-api/TestConfiguration/applications.ts @@ -1,6 +1,4 @@ -import { - Application, -} from "@budibase/server/api/controllers/public/mapping/types" +import { Application } from "@budibase/server/api/controllers/public/mapping/types" import { App } from "@budibase/types" import { Response } from "node-fetch" import InternalAPIClient from "./InternalAPIClient" @@ -37,9 +35,7 @@ export default class AppApi { return [response, json] } - async create( - body: any - ): Promise<[Response, Partial]> { + async create(body: any): Promise<[Response, Partial]> { const response = await this.api.post(`/applications`, { body }) const json = await response.json() return [response, json] diff --git a/qa-core/src/config/internal-api/TestConfiguration/auth.ts b/qa-core/src/config/internal-api/TestConfiguration/auth.ts index 6ac53f24b6..d83c859ab3 100644 --- a/qa-core/src/config/internal-api/TestConfiguration/auth.ts +++ b/qa-core/src/config/internal-api/TestConfiguration/auth.ts @@ -9,11 +9,11 @@ export default class AuthApi { } async login(): Promise<[Response, any]> { - const response = await this.api.post(`/global/auth/default/login`, { + const response = await this.api.post(`/global/auth/default/login`, { body: { username: process.env.BB_ADMIN_USER_EMAIL, - password: process.env.BB_ADMIN_USER_PASSWORD - } + password: process.env.BB_ADMIN_USER_PASSWORD, + }, }) const cookie = response.headers.get("set-cookie") this.api.cookie = cookie as any diff --git a/qa-core/src/config/internal-api/fixtures/applications.ts b/qa-core/src/config/internal-api/fixtures/applications.ts index dfad7e0b46..9076a05e1b 100644 --- a/qa-core/src/config/internal-api/fixtures/applications.ts +++ b/qa-core/src/config/internal-api/fixtures/applications.ts @@ -1,10 +1,9 @@ import generator from "../../generator" -import { - Application, -} from "@budibase/server/api/controllers/public/mapping/types" +import { Application } from "@budibase/server/api/controllers/public/mapping/types" - -const generate = (overrides: Partial = {}): Partial => ({ +const generate = ( + overrides: Partial = {} +): Partial => ({ name: generator.word(), url: `/${generator.word()}`, ...overrides, 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 81d43d9c91..2c934e0bd7 100644 --- a/qa-core/src/tests/internal-api/applications/create.spec.ts +++ b/qa-core/src/tests/internal-api/applications/create.spec.ts @@ -24,14 +24,14 @@ describe("Internal API - /applications endpoints", () => { useTemplate: "true", templateName: "Near Miss Register", templateKey: "app/near-miss-register", - templateFile: undefined + templateFile: undefined, }) } it("GET - fetch applications", async () => { await config.applications.create({ ...generateApp(), - useTemplate: false + useTemplate: false, }) const [response, apps] = await config.applications.fetch() expect(response).toHaveStatusCode(200) @@ -57,7 +57,7 @@ describe("Internal API - /applications endpoints", () => { expect(publish).toEqual({ _id: expect.any(String), appUrl: app.url, - status: "SUCCESS" + status: "SUCCESS", }) }) @@ -70,7 +70,8 @@ describe("Internal API - /applications endpoints", () => { config.applications.api.appId = app.appId // check preview renders - const [previewResponse, previewRenders] = await config.applications.canRender() + const [previewResponse, previewRenders] = + await config.applications.canRender() expect(previewResponse).toHaveStatusCode(200) expect(previewRenders).toBe(true) @@ -79,8 +80,8 @@ describe("Internal API - /applications endpoints", () => { // check published app renders config.applications.api.appId = db.getProdAppID(app.appId) - const [publishedAppResponse, publishedAppRenders] = await config.applications.canRender() + const [publishedAppResponse, publishedAppRenders] = + await config.applications.canRender() expect(publishedAppRenders).toBe(true) }) - }) From af24f72166f7d4649a4087b2903d49a09fcfc249 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Thu, 6 Oct 2022 16:03:47 +0100 Subject: [PATCH 02/16] Process quota emails in account-portal --- packages/backend-core/package.json | 2 + .../tests/utilities/structures/accounts.ts | 23 +++++++ .../tests/utilities/structures/common.ts | 1 + .../tests/utilities/structures/index.ts | 7 ++ .../tests/utilities/structures/licenses.ts | 18 +++++ packages/backend-core/yarn.lock | 10 +++ .../src/api/controllers/deploy/index.ts | 1 - packages/types/src/api/account/license.ts | 6 -- .../types/src/documents/account/account.ts | 36 +++++++++- packages/types/src/documents/global/quotas.ts | 13 ++-- packages/types/src/sdk/licensing/quota.ts | 35 ++++++---- .../src/api/controllers/system/tenants.js | 58 ---------------- .../src/api/controllers/system/tenants.ts | 66 +++++++++++++++++++ packages/worker/src/sdk/users/events.ts | 1 - 14 files changed, 190 insertions(+), 87 deletions(-) create mode 100644 packages/backend-core/tests/utilities/structures/accounts.ts create mode 100644 packages/backend-core/tests/utilities/structures/common.ts create mode 100644 packages/backend-core/tests/utilities/structures/licenses.ts delete mode 100644 packages/worker/src/api/controllers/system/tenants.js create mode 100644 packages/worker/src/api/controllers/system/tenants.ts diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index a07db6fca0..ed31e3c0c8 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -62,6 +62,7 @@ ] }, "devDependencies": { + "@types/chance": "1.1.3", "@types/jest": "27.5.1", "@types/koa": "2.0.52", "@types/lodash": "4.14.180", @@ -73,6 +74,7 @@ "@types/tar-fs": "2.0.1", "@types/uuid": "8.3.4", "ioredis-mock": "5.8.0", + "chance": "1.1.3", "jest": "27.5.1", "koa": "2.7.0", "nodemon": "2.0.16", diff --git a/packages/backend-core/tests/utilities/structures/accounts.ts b/packages/backend-core/tests/utilities/structures/accounts.ts new file mode 100644 index 0000000000..5d23962575 --- /dev/null +++ b/packages/backend-core/tests/utilities/structures/accounts.ts @@ -0,0 +1,23 @@ +import { generator, uuid } from "." +import { AuthType, CloudAccount, Hosting } from "@budibase/types" +import * as db from "../../../src/db/utils" + +export const cloudAccount = (): CloudAccount => { + return { + accountId: uuid(), + createdAt: Date.now(), + verified: true, + verificationSent: true, + tier: "", + email: generator.email(), + tenantId: generator.word(), + hosting: Hosting.CLOUD, + authType: AuthType.PASSWORD, + password: generator.word(), + tenantName: generator.word(), + name: generator.name(), + size: "10+", + profession: "Software Engineer", + budibaseUserId: db.generateGlobalUserID(), + } +} diff --git a/packages/backend-core/tests/utilities/structures/common.ts b/packages/backend-core/tests/utilities/structures/common.ts new file mode 100644 index 0000000000..51ae220254 --- /dev/null +++ b/packages/backend-core/tests/utilities/structures/common.ts @@ -0,0 +1 @@ +export { v4 as uuid } from "uuid" diff --git a/packages/backend-core/tests/utilities/structures/index.ts b/packages/backend-core/tests/utilities/structures/index.ts index 12b6ab7ad6..68064b9715 100644 --- a/packages/backend-core/tests/utilities/structures/index.ts +++ b/packages/backend-core/tests/utilities/structures/index.ts @@ -1 +1,8 @@ +export * from "./common" + +import Chance from "chance" +export const generator = new Chance() + export * as koa from "./koa" +export * as accounts from "./accounts" +export * as licenses from "./licenses" diff --git a/packages/backend-core/tests/utilities/structures/licenses.ts b/packages/backend-core/tests/utilities/structures/licenses.ts new file mode 100644 index 0000000000..a541e91860 --- /dev/null +++ b/packages/backend-core/tests/utilities/structures/licenses.ts @@ -0,0 +1,18 @@ +import { AccountPlan, License, PlanType, Quotas } from "@budibase/types" + +const newPlan = (type: PlanType = PlanType.FREE): AccountPlan => { + return { + type, + } +} + +export const newLicense = (opts: { + quotas: Quotas + planType?: PlanType +}): License => { + return { + features: [], + quotas: opts.quotas, + plan: newPlan(opts.planType), + } +} diff --git a/packages/backend-core/yarn.lock b/packages/backend-core/yarn.lock index 2e62aea734..6bc9b63728 100644 --- a/packages/backend-core/yarn.lock +++ b/packages/backend-core/yarn.lock @@ -663,6 +663,11 @@ "@types/connect" "*" "@types/node" "*" +"@types/chance@1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@types/chance/-/chance-1.1.3.tgz#d19fe9391288d60fdccd87632bfc9ab2b4523fea" + integrity sha512-X6c6ghhe4/sQh4XzcZWSFaTAUOda38GQHmq9BUanYkOE/EO7ZrkazwKmtsj3xzTjkLWmwULE++23g3d3CCWaWw== + "@types/connect@*": version "3.4.35" resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.35.tgz#5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1" @@ -1555,6 +1560,11 @@ chalk@^4.0.0, chalk@^4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" +chance@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chance/-/chance-1.1.3.tgz#414f08634ee479c7a316b569050ea20751b82dd3" + integrity sha512-XeJsdoVAzDb1WRPRuMBesRSiWpW1uNTo5Fd7mYxPJsAfgX71+jfuCOHOdbyBz2uAUZ8TwKcXgWk3DMedFfJkbg== + char-regex@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" diff --git a/packages/server/src/api/controllers/deploy/index.ts b/packages/server/src/api/controllers/deploy/index.ts index 5edf862706..a51e7ad6ec 100644 --- a/packages/server/src/api/controllers/deploy/index.ts +++ b/packages/server/src/api/controllers/deploy/index.ts @@ -17,7 +17,6 @@ import { getProdAppDB, getDevAppDB, } from "@budibase/backend-core/context" -import { quotas } from "@budibase/pro" import { events } from "@budibase/backend-core" // the max time we can wait for an invalidation to complete before considering it failed diff --git a/packages/types/src/api/account/license.ts b/packages/types/src/api/account/license.ts index 67791e5d6f..80481eb8f5 100644 --- a/packages/types/src/api/account/license.ts +++ b/packages/types/src/api/account/license.ts @@ -3,9 +3,3 @@ import { QuotaUsage } from "../../documents" export interface GetLicenseRequest { quotaUsage: QuotaUsage } - -export interface QuotaUsageTriggeredRequest { - percentage: number - name: string - resetDate: string -} diff --git a/packages/types/src/documents/account/account.ts b/packages/types/src/documents/account/account.ts index eb12f7754b..e3fcf75ecf 100644 --- a/packages/types/src/documents/account/account.ts +++ b/packages/types/src/documents/account/account.ts @@ -1,5 +1,12 @@ -import { Feature, Hosting, PlanType, Quotas } from "../../sdk" -import { QuotaUsage } from "../global" +import { + Feature, + Hosting, + MonthlyQuotaName, + PlanType, + Quotas, + StaticQuotaName, +} from "../../sdk" +import { MonthlyUsage, QuotaUsage, StaticUsage } from "../global" export interface CreateAccount { email: string @@ -43,7 +50,7 @@ export interface Account extends CreateAccount { licenseKey?: string licenseKeyActivatedAt?: number licenseOverrides?: LicenseOverrides - quotaUsage?: QuotaUsage + quotaUsage?: AccountQuotaUsage } export interface PasswordAccount extends Account { @@ -86,3 +93,26 @@ export interface OAuthTokens { accessToken: string refreshToken: string } + +export type QuotaTriggers = { + [key: string]: string | null +} + +export interface AccountStaticUsage extends StaticUsage { + triggers?: { + [key in StaticQuotaName]?: QuotaTriggers + } +} + +export interface AccountMonthlyUsage extends MonthlyUsage { + triggers?: { + [key in MonthlyQuotaName]?: QuotaTriggers + } +} + +export interface AccountQuotaUsage extends QuotaUsage { + usageQuota: AccountStaticUsage + monthly: { + [key: string]: AccountMonthlyUsage + } +} diff --git a/packages/types/src/documents/global/quotas.ts b/packages/types/src/documents/global/quotas.ts index eb1d77c228..d9cc83b46a 100644 --- a/packages/types/src/documents/global/quotas.ts +++ b/packages/types/src/documents/global/quotas.ts @@ -24,7 +24,14 @@ export interface UsageBreakdown { } } -export type MonthlyUsage = { +export interface StaticUsage { + [StaticQuotaName.APPS]: number + [StaticQuotaName.PLUGINS]: number + [StaticQuotaName.USER_GROUPS]: number + [StaticQuotaName.ROWS]: number +} + +export interface MonthlyUsage { [MonthlyQuotaName.QUERIES]: number [MonthlyQuotaName.AUTOMATIONS]: number [MonthlyQuotaName.DAY_PASSES]: number @@ -34,9 +41,7 @@ export type MonthlyUsage = { } export interface BaseQuotaUsage { - usageQuota: { - [key in StaticQuotaName]: number - } + usageQuota: StaticUsage monthly: { [key: string]: MonthlyUsage } diff --git a/packages/types/src/sdk/licensing/quota.ts b/packages/types/src/sdk/licensing/quota.ts index 49dd561db0..6e58734925 100644 --- a/packages/types/src/sdk/licensing/quota.ts +++ b/packages/types/src/sdk/licensing/quota.ts @@ -61,26 +61,33 @@ export type PlanQuotas = { [PlanType.ENTERPRISE]: Quotas } +export type MonthlyQuotas = { + [MonthlyQuotaName.QUERIES]: Quota + [MonthlyQuotaName.AUTOMATIONS]: Quota + [MonthlyQuotaName.DAY_PASSES]: Quota +} + +export type StaticQuotas = { + [StaticQuotaName.ROWS]: Quota + [StaticQuotaName.APPS]: Quota + [StaticQuotaName.USER_GROUPS]: Quota + [StaticQuotaName.PLUGINS]: Quota +} + +export type ConstantQuotas = { + [ConstantQuotaName.AUTOMATION_LOG_RETENTION_DAYS]: Quota +} + export type Quotas = { [QuotaType.USAGE]: { - [QuotaUsageType.MONTHLY]: { - [MonthlyQuotaName.QUERIES]: Quota - [MonthlyQuotaName.AUTOMATIONS]: Quota - [MonthlyQuotaName.DAY_PASSES]: Quota - } - [QuotaUsageType.STATIC]: { - [StaticQuotaName.ROWS]: Quota - [StaticQuotaName.APPS]: Quota - [StaticQuotaName.USER_GROUPS]: Quota - [StaticQuotaName.PLUGINS]: Quota - } - } - [QuotaType.CONSTANT]: { - [ConstantQuotaName.AUTOMATION_LOG_RETENTION_DAYS]: Quota + [QuotaUsageType.MONTHLY]: MonthlyQuotas + [QuotaUsageType.STATIC]: StaticQuotas } + [QuotaType.CONSTANT]: ConstantQuotas } export interface Quota { name: string value: number + triggers: number[] } diff --git a/packages/worker/src/api/controllers/system/tenants.js b/packages/worker/src/api/controllers/system/tenants.js deleted file mode 100644 index c54a3d9834..0000000000 --- a/packages/worker/src/api/controllers/system/tenants.js +++ /dev/null @@ -1,58 +0,0 @@ -const { StaticDatabases, doWithDB } = require("@budibase/backend-core/db") -const { getTenantId } = require("@budibase/backend-core/tenancy") -const { deleteTenant } = require("@budibase/backend-core/deprovision") -const { quotas } = require("@budibase/pro") - -exports.exists = async ctx => { - const tenantId = ctx.request.params - ctx.body = { - exists: await doWithDB(StaticDatabases.PLATFORM_INFO.name, async db => { - let exists = false - try { - const tenantsDoc = await db.get( - StaticDatabases.PLATFORM_INFO.docs.tenants - ) - if (tenantsDoc) { - exists = tenantsDoc.tenantIds.indexOf(tenantId) !== -1 - } - } catch (err) { - // if error it doesn't exist - } - return exists - }), - } -} - -exports.fetch = async ctx => { - ctx.body = await doWithDB(StaticDatabases.PLATFORM_INFO.name, async db => { - let tenants = [] - try { - const tenantsDoc = await db.get( - StaticDatabases.PLATFORM_INFO.docs.tenants - ) - if (tenantsDoc) { - tenants = tenantsDoc.tenantIds - } - } catch (err) { - // if error it doesn't exist - } - return tenants - }) -} - -exports.delete = async ctx => { - const tenantId = getTenantId() - - if (ctx.params.tenantId !== tenantId) { - ctx.throw(403, "Unauthorized") - } - - try { - await deleteTenant(tenantId) - await quotas.bustCache() - ctx.status = 204 - } catch (err) { - ctx.log.error(err) - throw err - } -} diff --git a/packages/worker/src/api/controllers/system/tenants.ts b/packages/worker/src/api/controllers/system/tenants.ts new file mode 100644 index 0000000000..d6e6261c22 --- /dev/null +++ b/packages/worker/src/api/controllers/system/tenants.ts @@ -0,0 +1,66 @@ +const { StaticDatabases, doWithDB } = require("@budibase/backend-core/db") +const { getTenantId } = require("@budibase/backend-core/tenancy") +const { deleteTenant } = require("@budibase/backend-core/deprovision") +import { quotas } from "@budibase/pro" + +export const exists = async (ctx: any) => { + const tenantId = ctx.request.params + ctx.body = { + exists: await doWithDB( + StaticDatabases.PLATFORM_INFO.name, + async (db: any) => { + let exists = false + try { + const tenantsDoc = await db.get( + StaticDatabases.PLATFORM_INFO.docs.tenants + ) + if (tenantsDoc) { + exists = tenantsDoc.tenantIds.indexOf(tenantId) !== -1 + } + } catch (err) { + // if error it doesn't exist + } + return exists + } + ), + } +} + +export const fetch = async (ctx: any) => { + ctx.body = await doWithDB( + StaticDatabases.PLATFORM_INFO.name, + async (db: any) => { + let tenants = [] + try { + const tenantsDoc = await db.get( + StaticDatabases.PLATFORM_INFO.docs.tenants + ) + if (tenantsDoc) { + tenants = tenantsDoc.tenantIds + } + } catch (err) { + // if error it doesn't exist + } + return tenants + } + ) +} + +const _delete = async (ctx: any) => { + const tenantId = getTenantId() + + if (ctx.params.tenantId !== tenantId) { + ctx.throw(403, "Unauthorized") + } + + try { + await deleteTenant(tenantId) + await quotas.bustCache() + ctx.status = 204 + } catch (err) { + ctx.log.error(err) + throw err + } +} + +export { _delete as delete } diff --git a/packages/worker/src/sdk/users/events.ts b/packages/worker/src/sdk/users/events.ts index 0094c6fd84..3046442393 100644 --- a/packages/worker/src/sdk/users/events.ts +++ b/packages/worker/src/sdk/users/events.ts @@ -1,7 +1,6 @@ import env from "../../environment" import { events, accounts, tenancy } from "@budibase/backend-core" import { User, UserRoles, CloudAccount } from "@budibase/types" -import { users as pro } from "@budibase/pro" export const handleDeleteEvents = async (user: any) => { await events.user.deleted(user) From ed948e6ae7cc920982f83d78cc02a031e38732cd Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Fri, 7 Oct 2022 13:57:10 +0100 Subject: [PATCH 03/16] Move trigger logic inside pro --- packages/types/src/api/account/license.ts | 6 +++++ .../types/src/documents/account/account.ts | 25 +------------------ packages/types/src/documents/global/quotas.ts | 17 +++++++++++++ 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/packages/types/src/api/account/license.ts b/packages/types/src/api/account/license.ts index 80481eb8f5..40ee79c3e3 100644 --- a/packages/types/src/api/account/license.ts +++ b/packages/types/src/api/account/license.ts @@ -3,3 +3,9 @@ import { QuotaUsage } from "../../documents" export interface GetLicenseRequest { quotaUsage: QuotaUsage } + +export interface QuotaTriggeredRequest { + percentage: number + name: string + resetDate?: string +} diff --git a/packages/types/src/documents/account/account.ts b/packages/types/src/documents/account/account.ts index e3fcf75ecf..70c3061c3f 100644 --- a/packages/types/src/documents/account/account.ts +++ b/packages/types/src/documents/account/account.ts @@ -50,7 +50,7 @@ export interface Account extends CreateAccount { licenseKey?: string licenseKeyActivatedAt?: number licenseOverrides?: LicenseOverrides - quotaUsage?: AccountQuotaUsage + quotaUsage?: QuotaUsage } export interface PasswordAccount extends Account { @@ -93,26 +93,3 @@ export interface OAuthTokens { accessToken: string refreshToken: string } - -export type QuotaTriggers = { - [key: string]: string | null -} - -export interface AccountStaticUsage extends StaticUsage { - triggers?: { - [key in StaticQuotaName]?: QuotaTriggers - } -} - -export interface AccountMonthlyUsage extends MonthlyUsage { - triggers?: { - [key in MonthlyQuotaName]?: QuotaTriggers - } -} - -export interface AccountQuotaUsage extends QuotaUsage { - usageQuota: AccountStaticUsage - monthly: { - [key: string]: AccountMonthlyUsage - } -} diff --git a/packages/types/src/documents/global/quotas.ts b/packages/types/src/documents/global/quotas.ts index d9cc83b46a..84e5af3996 100644 --- a/packages/types/src/documents/global/quotas.ts +++ b/packages/types/src/documents/global/quotas.ts @@ -24,17 +24,27 @@ export interface UsageBreakdown { } } +export type QuotaTriggers = { + [key: string]: string | undefined +} + export interface StaticUsage { [StaticQuotaName.APPS]: number [StaticQuotaName.PLUGINS]: number [StaticQuotaName.USER_GROUPS]: number [StaticQuotaName.ROWS]: number + triggers: { + [key in StaticQuotaName]?: QuotaTriggers + } } export interface MonthlyUsage { [MonthlyQuotaName.QUERIES]: number [MonthlyQuotaName.AUTOMATIONS]: number [MonthlyQuotaName.DAY_PASSES]: number + triggers: { + [key in MonthlyQuotaName]?: QuotaTriggers + } breakdown?: { [key in BreakdownQuotaName]?: UsageBreakdown } @@ -56,6 +66,13 @@ export interface QuotaUsage extends BaseQuotaUsage { } } +export type SetUsageValues = { + total: number + app?: number + breakdown?: number + triggers?: QuotaTriggers +} + export type UsageValues = { total: number app?: number From e92a31bd459cb3e5524f45945e2892ecb4e509e0 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Mon, 10 Oct 2022 08:21:17 +0100 Subject: [PATCH 04/16] Add locking framework --- packages/backend-core/src/index.ts | 1 + packages/backend-core/src/pkg/redis.ts | 2 + packages/backend-core/src/redis/init.js | 25 ++++---- packages/backend-core/src/redis/redlock.ts | 74 ++++++++++++++++++++-- packages/backend-core/src/redis/utils.js | 1 + packages/server/src/migrations/index.ts | 47 +++++--------- packages/types/src/sdk/index.ts | 1 + packages/types/src/sdk/locks.ts | 31 +++++++++ packages/worker/src/migrations/index.ts | 47 +++++--------- 9 files changed, 149 insertions(+), 80 deletions(-) create mode 100644 packages/types/src/sdk/locks.ts diff --git a/packages/backend-core/src/index.ts b/packages/backend-core/src/index.ts index 83b23b479d..42cad17620 100644 --- a/packages/backend-core/src/index.ts +++ b/packages/backend-core/src/index.ts @@ -37,6 +37,7 @@ const core = { db, ...dbConstants, redis, + locks: redis.redlock, objectStore, utils, users, diff --git a/packages/backend-core/src/pkg/redis.ts b/packages/backend-core/src/pkg/redis.ts index 65ab186d9a..297c2b54f4 100644 --- a/packages/backend-core/src/pkg/redis.ts +++ b/packages/backend-core/src/pkg/redis.ts @@ -3,9 +3,11 @@ import Client from "../redis" import utils from "../redis/utils" import clients from "../redis/init" +import * as redlock from "../redis/redlock" export = { Client, utils, clients, + redlock, } diff --git a/packages/backend-core/src/redis/init.js b/packages/backend-core/src/redis/init.js index 8e5d10f838..3150ef2c1c 100644 --- a/packages/backend-core/src/redis/init.js +++ b/packages/backend-core/src/redis/init.js @@ -1,27 +1,23 @@ const Client = require("./index") const utils = require("./utils") -const { getRedlock } = require("./redlock") -let userClient, sessionClient, appClient, cacheClient, writethroughClient -let migrationsRedlock - -// turn retry off so that only one instance can ever hold the lock -const migrationsRedlockConfig = { retryCount: 0 } +let userClient, + sessionClient, + appClient, + cacheClient, + writethroughClient, + lockClient async function init() { userClient = await new Client(utils.Databases.USER_CACHE).init() sessionClient = await new Client(utils.Databases.SESSIONS).init() appClient = await new Client(utils.Databases.APP_METADATA).init() cacheClient = await new Client(utils.Databases.GENERIC_CACHE).init() + lockClient = await new Client(utils.Databases.LOCKS).init() writethroughClient = await new Client( utils.Databases.WRITE_THROUGH, utils.SelectableDatabases.WRITE_THROUGH ).init() - // pass the underlying ioredis client to redlock - migrationsRedlock = getRedlock( - cacheClient.getClient(), - migrationsRedlockConfig - ) } process.on("exit", async () => { @@ -30,6 +26,7 @@ process.on("exit", async () => { if (appClient) await appClient.finish() if (cacheClient) await cacheClient.finish() if (writethroughClient) await writethroughClient.finish() + if (lockClient) await lockClient.finish() }) module.exports = { @@ -63,10 +60,10 @@ module.exports = { } return writethroughClient }, - getMigrationsRedlock: async () => { - if (!migrationsRedlock) { + getLockClient: async () => { + if (!lockClient) { await init() } - return migrationsRedlock + return lockClient }, } diff --git a/packages/backend-core/src/redis/redlock.ts b/packages/backend-core/src/redis/redlock.ts index beef375b55..abb13b2534 100644 --- a/packages/backend-core/src/redis/redlock.ts +++ b/packages/backend-core/src/redis/redlock.ts @@ -1,14 +1,37 @@ -import Redlock from "redlock" +import Redlock, { Options } from "redlock" +import { getLockClient } from "./init" +import { LockOptions, LockType } from "@budibase/types" +import * as tenancy from "../tenancy" -export const getRedlock = (redisClient: any, opts = { retryCount: 10 }) => { - return new Redlock([redisClient], { +let noRetryRedlock: Redlock | undefined + +const getClient = async (type: LockType): Promise => { + switch (type) { + case LockType.TRY_ONCE: { + if (!noRetryRedlock) { + noRetryRedlock = await newRedlock(OPTIONS.TRY_ONCE) + } + return noRetryRedlock + } + default: { + throw new Error(`Could not get redlock client: ${type}`) + } + } +} + +export const OPTIONS = { + TRY_ONCE: { + // immediately throws an error if the lock is already held + retryCount: 0, + }, + DEFAULT: { // the expected clock drift; for more details // see http://redis.io/topics/distlock driftFactor: 0.01, // multiplied by lock ttl to determine drift time // the max number of times Redlock will attempt // to lock a resource before erroring - retryCount: opts.retryCount, + retryCount: 10, // the time in ms between attempts retryDelay: 200, // time in ms @@ -16,6 +39,45 @@ export const getRedlock = (redisClient: any, opts = { retryCount: 10 }) => { // the max time in ms randomly added to retries // to improve performance under high contention // see https://www.awsarchitectureblog.com/2015/03/backoff.html - retryJitter: 200, // time in ms - }) + retryJitter: 100, // time in ms + }, +} + +export const newRedlock = async (opts: Options = {}) => { + let options = { ...OPTIONS.DEFAULT, ...opts } + const redisWrapper = await getLockClient() + const client = redisWrapper.getClient() + return new Redlock([client], options) +} + +export const doWithLock = async (opts: LockOptions, task: any) => { + const redlock = await getClient(opts.type) + let lock + try { + // aquire lock + let name: string = `${tenancy.getTenantId()}_${opts.name}` + if (opts.nameSuffix) { + name = name + `_${opts.nameSuffix}` + } + lock = await redlock.lock(name, opts.ttl) + // perform locked task + return task() + } catch (e: any) { + // lock limit exceeded + if (e.name === "LockError") { + if (opts.type === LockType.TRY_ONCE) { + // don't throw for try-once locks, they will always error + // due to retry count (0) exceeded + return + } else { + throw e + } + } else { + throw e + } + } finally { + if (lock) { + await lock.unlock() + } + } } diff --git a/packages/backend-core/src/redis/utils.js b/packages/backend-core/src/redis/utils.js index 90b3561f31..af719197b5 100644 --- a/packages/backend-core/src/redis/utils.js +++ b/packages/backend-core/src/redis/utils.js @@ -28,6 +28,7 @@ exports.Databases = { LICENSES: "license", GENERIC_CACHE: "data_cache", WRITE_THROUGH: "writeThrough", + LOCKS: "locks", } /** diff --git a/packages/server/src/migrations/index.ts b/packages/server/src/migrations/index.ts index cb1e6d1c82..275a954a78 100644 --- a/packages/server/src/migrations/index.ts +++ b/packages/server/src/migrations/index.ts @@ -1,5 +1,11 @@ -import { migrations, redis } from "@budibase/backend-core" -import { Migration, MigrationOptions, MigrationName } from "@budibase/types" +import { locks, migrations } from "@budibase/backend-core" +import { + Migration, + MigrationOptions, + MigrationName, + LockType, + LockName, +} from "@budibase/types" import env from "../environment" // migration functions @@ -86,33 +92,14 @@ export const migrate = async (options?: MigrationOptions) => { } const migrateWithLock = async (options?: MigrationOptions) => { - // get a new lock client - const redlock = await redis.clients.getMigrationsRedlock() - // lock for 15 minutes - const ttl = 1000 * 60 * 15 - - let migrationLock - - // acquire lock - try { - migrationLock = await redlock.lock("migrations", ttl) - } catch (e: any) { - if (e.name === "LockError") { - return - } else { - throw e + await locks.doWithLock( + { + type: LockType.TRY_ONCE, + name: LockName.MIGRATIONS, + ttl: 1000 * 60 * 15, // auto expire the migration lock after 15 minutes + }, + async () => { + await migrations.runMigrations(MIGRATIONS, options) } - } - - // run migrations - try { - await migrations.runMigrations(MIGRATIONS, options) - } finally { - // release lock - try { - await migrationLock.unlock() - } catch (e) { - console.error("unable to release migration lock") - } - } + ) } diff --git a/packages/types/src/sdk/index.ts b/packages/types/src/sdk/index.ts index bae566b42e..0c374dd105 100644 --- a/packages/types/src/sdk/index.ts +++ b/packages/types/src/sdk/index.ts @@ -7,3 +7,4 @@ export * from "./datasources" export * from "./search" export * from "./koa" export * from "./auth" +export * from "./locks" diff --git a/packages/types/src/sdk/locks.ts b/packages/types/src/sdk/locks.ts new file mode 100644 index 0000000000..3aa067bea1 --- /dev/null +++ b/packages/types/src/sdk/locks.ts @@ -0,0 +1,31 @@ +export enum LockType { + /** + * If this lock is already held the attempted operation will not be performed. + * No retries will take place and no error will be thrown. + */ + TRY_ONCE = "try_once", +} + +export enum LockName { + MIGRATIONS = "migrations", + TRIGGER_QUOTA = "trigger_quota", +} + +export interface LockOptions { + /** + * The lock type determines which client to use + */ + type: LockType + /** + * The name for the lock + */ + name: LockName + /** + * The ttl to auto-expire the lock if not unlocked manually + */ + ttl: number + /** + * The suffix to add to the lock name for additional uniqueness + */ + nameSuffix?: string +} diff --git a/packages/worker/src/migrations/index.ts b/packages/worker/src/migrations/index.ts index 6900596216..19ef076a52 100644 --- a/packages/worker/src/migrations/index.ts +++ b/packages/worker/src/migrations/index.ts @@ -1,5 +1,11 @@ -import { migrations, redis } from "@budibase/backend-core" -import { Migration, MigrationOptions, MigrationName } from "@budibase/types" +import { migrations, locks } from "@budibase/backend-core" +import { + Migration, + MigrationOptions, + MigrationName, + LockType, + LockName, +} from "@budibase/types" import env from "../environment" // migration functions @@ -42,33 +48,14 @@ export const migrate = async (options?: MigrationOptions) => { } const migrateWithLock = async (options?: MigrationOptions) => { - // get a new lock client - const redlock = await redis.clients.getMigrationsRedlock() - // lock for 15 minutes - const ttl = 1000 * 60 * 15 - - let migrationLock - - // acquire lock - try { - migrationLock = await redlock.lock("migrations", ttl) - } catch (e: any) { - if (e.name === "LockError") { - return - } else { - throw e + await locks.doWithLock( + { + type: LockType.TRY_ONCE, + name: LockName.MIGRATIONS, + ttl: 1000 * 60 * 15, // auto expire the migration lock after 15 minutes + }, + async () => { + await migrations.runMigrations(MIGRATIONS, options) } - } - - // run migrations - try { - await migrations.runMigrations(MIGRATIONS, options) - } finally { - // release lock - try { - await migrationLock.unlock() - } catch (e) { - console.error("unable to release migration lock") - } - } + ) } From cabfe00ef568f73119df3fcbe1d5e29105c15466 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Wed, 12 Oct 2022 11:05:16 +0100 Subject: [PATCH 05/16] Deprecate legacyHttpParser, fix rest tests --- .../server/src/api/controllers/query/index.ts | 1 + packages/server/src/integrations/rest.ts | 8 +-- .../src/integrations/tests/rest.spec.ts | 60 ++++++++++++------- 3 files changed, 41 insertions(+), 28 deletions(-) diff --git a/packages/server/src/api/controllers/query/index.ts b/packages/server/src/api/controllers/query/index.ts index 5c09a2f3b6..c92f942986 100644 --- a/packages/server/src/api/controllers/query/index.ts +++ b/packages/server/src/api/controllers/query/index.ts @@ -56,6 +56,7 @@ const _import = async (ctx: any) => { config: { url: info.url, defaultHeaders: [], + rejectUnauthorized: true, }, name: info.name, } diff --git a/packages/server/src/integrations/rest.ts b/packages/server/src/integrations/rest.ts index 71294b9cb0..08d2337593 100644 --- a/packages/server/src/integrations/rest.ts +++ b/packages/server/src/integrations/rest.ts @@ -78,16 +78,11 @@ const SCHEMA: Integration = { default: {}, }, rejectUnauthorized: { + display: "Reject Unauthorized", type: DatasourceFieldType.BOOLEAN, default: true, required: false, }, - legacyHttpParser: { - display: "Legacy HTTP Support", - type: DatasourceFieldType.BOOLEAN, - required: false, - default: false, - }, }, query: { create: { @@ -397,6 +392,7 @@ class RestIntegration implements IntegrationBase { }) } + // Deprecated by rejectUnauthorized if (this.config.legacyHttpParser) { // https://github.com/nodejs/node/issues/43798 input.extraHttpOptions = { insecureHTTPParser: true } diff --git a/packages/server/src/integrations/tests/rest.spec.ts b/packages/server/src/integrations/tests/rest.spec.ts index 175e6bce43..d53f9c7ce3 100644 --- a/packages/server/src/integrations/tests/rest.spec.ts +++ b/packages/server/src/integrations/tests/rest.spec.ts @@ -1,17 +1,16 @@ -jest.mock("node-fetch", () => - jest.fn(() => ({ - headers: { - raw: () => { - return { "content-type": ["application/json"] } - }, - get: () => ["application/json"], +const mockFetch = jest.fn(() => ({ + headers: { + raw: () => { + return { "content-type": ["application/json"] } }, - json: jest.fn(() => ({ - my_next_cursor: 123, - })), - text: jest.fn(), - })) -) + get: () => ["application/json"], + }, + json: jest.fn(() => ({ + my_next_cursor: 123, + })), + text: jest.fn(), +})) +jest.mock("node-fetch", () => mockFetch) import fetch from "node-fetch" import { default as RestIntegration } from "../rest" const FormData = require("form-data") @@ -256,7 +255,7 @@ describe("REST Integration", () => { authConfigId: "c59c14bd1898a43baa08da68959b24686", } await config.integration.read(query) - expect(fetch).toHaveBeenCalledWith(`${BASE_URL}/?`, { + expect(fetch).toHaveBeenCalledWith(`${BASE_URL}/`, { method: "GET", headers: { Authorization: "Basic dXNlcjpwYXNzd29yZA==", @@ -269,7 +268,7 @@ describe("REST Integration", () => { authConfigId: "0d91d732f34e4befabeff50b392a8ff3", } await config.integration.read(query) - expect(fetch).toHaveBeenCalledWith(`${BASE_URL}/?`, { + expect(fetch).toHaveBeenCalledWith(`${BASE_URL}/`, { method: "GET", headers: { Authorization: "Bearer mytoken", @@ -327,7 +326,7 @@ describe("REST Integration", () => { }, } await config.integration.create(query) - expect(fetch).toHaveBeenCalledWith(`${BASE_URL}/api?`, { + expect(fetch).toHaveBeenCalledWith(`${BASE_URL}/api`, { body: JSON.stringify({ [pageParam]: pageValue, [sizeParam]: sizeValue, @@ -359,7 +358,7 @@ describe("REST Integration", () => { }, } await config.integration.create(query) - expect(fetch).toHaveBeenCalledWith(`${BASE_URL}/api?`, { + expect(fetch).toHaveBeenCalledWith(`${BASE_URL}/api`, { body: expect.any(FormData), headers: {}, method: "POST", @@ -390,7 +389,7 @@ describe("REST Integration", () => { }, } await config.integration.create(query) - expect(fetch).toHaveBeenCalledWith(`${BASE_URL}/api?`, { + expect(fetch).toHaveBeenCalledWith(`${BASE_URL}/api`, { body: expect.any(URLSearchParams), headers: {}, method: "POST", @@ -456,7 +455,7 @@ describe("REST Integration", () => { }, } const res = await config.integration.create(query) - expect(fetch).toHaveBeenCalledWith(`${BASE_URL}/api?`, { + expect(fetch).toHaveBeenCalledWith(`${BASE_URL}/api`, { body: JSON.stringify({ [pageParam]: pageValue, [sizeParam]: sizeValue, @@ -490,7 +489,7 @@ describe("REST Integration", () => { }, } const res = await config.integration.create(query) - expect(fetch).toHaveBeenCalledWith(`${BASE_URL}/api?`, { + expect(fetch).toHaveBeenCalledWith(`${BASE_URL}/api`, { body: expect.any(FormData), headers: {}, method: "POST", @@ -523,7 +522,7 @@ describe("REST Integration", () => { }, } const res = await config.integration.create(query) - expect(fetch).toHaveBeenCalledWith(`${BASE_URL}/api?`, { + expect(fetch).toHaveBeenCalledWith(`${BASE_URL}/api`, { body: expect.any(URLSearchParams), headers: {}, method: "POST", @@ -563,7 +562,7 @@ describe("REST Integration", () => { legacyHttpParser: true, }) await config.integration.read({}) - expect(fetch).toHaveBeenCalledWith(`${BASE_URL}/?`, { + expect(fetch).toHaveBeenCalledWith(`${BASE_URL}/`, { method: "GET", headers: {}, extraHttpOptions: { @@ -572,4 +571,21 @@ describe("REST Integration", () => { }) }) }) + + it("Attaches custom agent when Reject Unauthorized option is false", async () => { + config = new TestConfiguration({ + url: BASE_URL, + rejectUnauthorized: false, + }) + await config.integration.read({}) + + const calls: any = mockFetch.mock.calls[0] + const url = calls[0] + expect(url).toBe(`${BASE_URL}/`) + + const calledConfig = calls[1] + expect(calledConfig.method).toBe("GET") + expect(calledConfig.headers).toEqual({}) + expect(calledConfig.agent.options.rejectUnauthorized).toBe(false) + }) }) From 34bd4b15dfed0e9201b0d8fd766a27788b6d9cfd Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Wed, 12 Oct 2022 11:38:16 +0100 Subject: [PATCH 06/16] Improve documentation on quota.triggers[] --- packages/types/src/sdk/licensing/quota.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/types/src/sdk/licensing/quota.ts b/packages/types/src/sdk/licensing/quota.ts index 6e58734925..74777d4590 100644 --- a/packages/types/src/sdk/licensing/quota.ts +++ b/packages/types/src/sdk/licensing/quota.ts @@ -89,5 +89,12 @@ export type Quotas = { export interface Quota { name: string value: number + /** + * Array of whole numbers (1-100) that dictate the percentage that this quota should trigger + * at in relation to the corresponding usage inside budibase. + * + * Triggering results in a budibase installation sending a request to account-portal, + * which can have subsequent effects such as sending emails to users. + */ triggers: number[] } From 6183bdb53edee366d882f01479a61cb2eebcc12e Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 12 Oct 2022 11:46:45 +0000 Subject: [PATCH 07/16] v2.0.30-alpha.1 --- lerna.json | 2 +- packages/backend-core/package.json | 6 +++--- 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, 33 insertions(+), 33 deletions(-) diff --git a/lerna.json b/lerna.json index df9302103d..c17905e010 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.0.30-alpha.0", + "version": "2.0.30-alpha.1", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index e5147b194f..e89ff61325 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.0", + "version": "2.0.30-alpha.1", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "2.0.30-alpha.0", + "@budibase/types": "2.0.30-alpha.1", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", @@ -73,8 +73,8 @@ "@types/semver": "7.3.7", "@types/tar-fs": "2.0.1", "@types/uuid": "8.3.4", - "ioredis-mock": "5.8.0", "chance": "1.1.3", + "ioredis-mock": "5.8.0", "jest": "27.5.1", "koa": "2.7.0", "nodemon": "2.0.16", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 5bf0e38e3c..2b1b50485e 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.0", + "version": "2.0.30-alpha.1", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "2.0.30-alpha.0", + "@budibase/string-templates": "2.0.30-alpha.1", "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/avatar": "^3.0.2", diff --git a/packages/builder/package.json b/packages/builder/package.json index e118b66a5d..318309653f 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.0.30-alpha.0", + "version": "2.0.30-alpha.1", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.0.30-alpha.0", - "@budibase/client": "2.0.30-alpha.0", - "@budibase/frontend-core": "2.0.30-alpha.0", - "@budibase/string-templates": "2.0.30-alpha.0", + "@budibase/bbui": "2.0.30-alpha.1", + "@budibase/client": "2.0.30-alpha.1", + "@budibase/frontend-core": "2.0.30-alpha.1", + "@budibase/string-templates": "2.0.30-alpha.1", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index b20cebed5f..5c17ec8abf 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.0.30-alpha.0", + "version": "2.0.30-alpha.1", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "2.0.30-alpha.0", - "@budibase/string-templates": "2.0.30-alpha.0", - "@budibase/types": "2.0.30-alpha.0", + "@budibase/backend-core": "2.0.30-alpha.1", + "@budibase/string-templates": "2.0.30-alpha.1", + "@budibase/types": "2.0.30-alpha.1", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index bfcdf91601..d8c611b2bb 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.0.30-alpha.0", + "version": "2.0.30-alpha.1", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "2.0.30-alpha.0", - "@budibase/frontend-core": "2.0.30-alpha.0", - "@budibase/string-templates": "2.0.30-alpha.0", + "@budibase/bbui": "2.0.30-alpha.1", + "@budibase/frontend-core": "2.0.30-alpha.1", + "@budibase/string-templates": "2.0.30-alpha.1", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index f3fb939fc3..2f7fdd41e8 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.0", + "version": "2.0.30-alpha.1", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.0.30-alpha.0", + "@budibase/bbui": "2.0.30-alpha.1", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 4fd26a5a20..9153383675 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.0.30-alpha.0", + "version": "2.0.30-alpha.1", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index e37a8e6d36..93216842e1 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.0", + "version": "2.0.30-alpha.1", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -77,11 +77,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "2.0.30-alpha.0", - "@budibase/client": "2.0.30-alpha.0", + "@budibase/backend-core": "2.0.30-alpha.1", + "@budibase/client": "2.0.30-alpha.1", "@budibase/pro": "2.0.30-alpha.0", - "@budibase/string-templates": "2.0.30-alpha.0", - "@budibase/types": "2.0.30-alpha.0", + "@budibase/string-templates": "2.0.30-alpha.1", + "@budibase/types": "2.0.30-alpha.1", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index e8df4e2bba..a453583844 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.0", + "version": "2.0.30-alpha.1", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index 93271fb93e..b7c7a3f540 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.0.30-alpha.0", + "version": "2.0.30-alpha.1", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index c95d45007a..c3d2f632e0 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.0", + "version": "2.0.30-alpha.1", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.0.30-alpha.0", + "@budibase/backend-core": "2.0.30-alpha.1", "@budibase/pro": "2.0.30-alpha.0", - "@budibase/string-templates": "2.0.30-alpha.0", - "@budibase/types": "2.0.30-alpha.0", + "@budibase/string-templates": "2.0.30-alpha.1", + "@budibase/types": "2.0.30-alpha.1", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From ddf9abf63d9ebb390a81d557cb145c0d13e0457a Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 12 Oct 2022 11:50:43 +0000 Subject: [PATCH 08/16] Update pro version to 2.0.30-alpha.1 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index 93216842e1..d290de3249 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.1", "@budibase/client": "2.0.30-alpha.1", - "@budibase/pro": "2.0.30-alpha.0", + "@budibase/pro": "2.0.30-alpha.1", "@budibase/string-templates": "2.0.30-alpha.1", "@budibase/types": "2.0.30-alpha.1", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 0b548839f1..c7a7d5b550 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.0": - version "2.0.30-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.30-alpha.0.tgz#aa9277ec26da51f8396fe047ebab39a0dff69c93" - integrity sha512-6+KHAceEZv1SC0qSA4GTNQBAlF1wnr9jfl85D5Tq1O2caD4J7drkIz8D6e0/DVv8zccHT+aUA7hy7YhKxbHAUA== +"@budibase/backend-core@2.0.30-alpha.1": + version "2.0.30-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.30-alpha.1.tgz#6e5cbc448cd819f67c93451d35c8793748380649" + integrity sha512-AuXk5IZBQ9zFTjTL2FsqqYdqqVjrSv19ozXSsb1w2z8Pyymz57WgzUiZ6uzHbHzUXNVD4Nei7cgfgSyCJ27Phg== dependencies: - "@budibase/types" "2.0.30-alpha.0" + "@budibase/types" "2.0.30-alpha.1" "@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.0": - version "2.0.30-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.30-alpha.0.tgz#6f0d9e45bc458e0e423280355c1a339f3143da47" - integrity sha512-8PFdiIHT7wUusa1Gi+KvcpLaJdBAtnAK6bfYGayasnrS9OIasfIBAMgzXRONMAGMvY7PZz84psZVimXSkW7EEA== +"@budibase/pro@2.0.30-alpha.1": + version "2.0.30-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.30-alpha.1.tgz#12e4c2115d3e647d365b46e6b5df59746148d4ea" + integrity sha512-K/iy3Z3f9AVodxtuAk8yemSQ2R08tjoot4wogDCwsTMRlXxq/WChCcm9prkb2DzwOzQQSsJ3bLgL1p/9sGzagg== dependencies: - "@budibase/backend-core" "2.0.30-alpha.0" - "@budibase/types" "2.0.30-alpha.0" + "@budibase/backend-core" "2.0.30-alpha.1" + "@budibase/types" "2.0.30-alpha.1" "@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.0": - version "2.0.30-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.30-alpha.0.tgz#fb5e80870b00850601785f1102f64bd22339f4e9" - integrity sha512-i9c02crPzZPRzn+RXwn2f4H4WCLWhC7HlsiXH2w4Ngk7PJvtcR9Jn7mKBKVcXM/9PAK6d0vWIQidA8XuU0CpZA== +"@budibase/types@2.0.30-alpha.1": + version "2.0.30-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.30-alpha.1.tgz#1320eb9c2996e371b47b2a845ce1b81e1b21b67c" + integrity sha512-tw49Jwo7Dnhv9IuZq68DVvHsKcaVpggZ/1BYkQsdzUw+0yoIe1k8t+4XPbHqBP328mpp8oPx4rUQF3yFpJv41g== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index c3d2f632e0..e87be9afb2 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.1", - "@budibase/pro": "2.0.30-alpha.0", + "@budibase/pro": "2.0.30-alpha.1", "@budibase/string-templates": "2.0.30-alpha.1", "@budibase/types": "2.0.30-alpha.1", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 6cf3a6556d..68188cf827 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.0": - version "2.0.30-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.30-alpha.0.tgz#aa9277ec26da51f8396fe047ebab39a0dff69c93" - integrity sha512-6+KHAceEZv1SC0qSA4GTNQBAlF1wnr9jfl85D5Tq1O2caD4J7drkIz8D6e0/DVv8zccHT+aUA7hy7YhKxbHAUA== +"@budibase/backend-core@2.0.30-alpha.1": + version "2.0.30-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.30-alpha.1.tgz#6e5cbc448cd819f67c93451d35c8793748380649" + integrity sha512-AuXk5IZBQ9zFTjTL2FsqqYdqqVjrSv19ozXSsb1w2z8Pyymz57WgzUiZ6uzHbHzUXNVD4Nei7cgfgSyCJ27Phg== dependencies: - "@budibase/types" "2.0.30-alpha.0" + "@budibase/types" "2.0.30-alpha.1" "@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.0": - version "2.0.30-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.30-alpha.0.tgz#6f0d9e45bc458e0e423280355c1a339f3143da47" - integrity sha512-8PFdiIHT7wUusa1Gi+KvcpLaJdBAtnAK6bfYGayasnrS9OIasfIBAMgzXRONMAGMvY7PZz84psZVimXSkW7EEA== +"@budibase/pro@2.0.30-alpha.1": + version "2.0.30-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.30-alpha.1.tgz#12e4c2115d3e647d365b46e6b5df59746148d4ea" + integrity sha512-K/iy3Z3f9AVodxtuAk8yemSQ2R08tjoot4wogDCwsTMRlXxq/WChCcm9prkb2DzwOzQQSsJ3bLgL1p/9sGzagg== dependencies: - "@budibase/backend-core" "2.0.30-alpha.0" - "@budibase/types" "2.0.30-alpha.0" + "@budibase/backend-core" "2.0.30-alpha.1" + "@budibase/types" "2.0.30-alpha.1" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.0.30-alpha.0": - version "2.0.30-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.30-alpha.0.tgz#fb5e80870b00850601785f1102f64bd22339f4e9" - integrity sha512-i9c02crPzZPRzn+RXwn2f4H4WCLWhC7HlsiXH2w4Ngk7PJvtcR9Jn7mKBKVcXM/9PAK6d0vWIQidA8XuU0CpZA== +"@budibase/types@2.0.30-alpha.1": + version "2.0.30-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.30-alpha.1.tgz#1320eb9c2996e371b47b2a845ce1b81e1b21b67c" + integrity sha512-tw49Jwo7Dnhv9IuZq68DVvHsKcaVpggZ/1BYkQsdzUw+0yoIe1k8t+4XPbHqBP328mpp8oPx4rUQF3yFpJv41g== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From 6cab57932edaa7c3ab6a9949bf0254a48e49a4d4 Mon Sep 17 00:00:00 2001 From: Jonny McCullagh Date: Wed, 12 Oct 2022 14:53:06 +0100 Subject: [PATCH 09/16] remove ipv6 conf from nginx proxy if ipv6 not enabled --- hosting/proxy/10-listen-on-ipv6-by-default.sh | 24 +++++++++++++++++++ hosting/proxy/Dockerfile | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 hosting/proxy/10-listen-on-ipv6-by-default.sh diff --git a/hosting/proxy/10-listen-on-ipv6-by-default.sh b/hosting/proxy/10-listen-on-ipv6-by-default.sh new file mode 100644 index 0000000000..7d25a644c8 --- /dev/null +++ b/hosting/proxy/10-listen-on-ipv6-by-default.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# vim:sw=4:ts=4:et + +set -e + +ME=$(basename $0) +NGINX_CONF_FILE="/etc/nginx/nginx.conf" +DEFAULT_CONF_FILE="/etc/nginx/conf.d/default.conf" + +# check if we have ipv6 available +if [ ! -f "/proc/net/if_jonnyinet6" ]; then + # ipv6 not available so delete lines from nginx conf + if [ -f "$NGINX_CONF_FILE" ]; then + sed -i '/listen \[::\]/d' $NGINX_CONF_FILE + fi + if [ -f "$DEFAULT_CONF_FILE" ]; then + sed -i '/listen \[::\]/d' $DEFAULT_CONF_FILE + fi + echo "$ME: info: ipv6 not available so delete lines from nginx conf" +else + echo "$ME: info: ipv6 is available so no need to delete lines from nginx conf" +fi + +exit 0 \ No newline at end of file diff --git a/hosting/proxy/Dockerfile b/hosting/proxy/Dockerfile index 298762aaf1..5fd0dc7d11 100644 --- a/hosting/proxy/Dockerfile +++ b/hosting/proxy/Dockerfile @@ -5,7 +5,7 @@ FROM nginx:latest # override the output dir to output directly to /etc/nginx instead of /etc/nginx/conf.d ENV NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx COPY .generated-nginx.prod.conf /etc/nginx/templates/nginx.conf.template - +COPY 10-listen-on-ipv6-by-default.sh /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh # Error handling COPY error.html /usr/share/nginx/html/error.html From 9b830c5b19417f2ed5e5359025d068ce788ca52d Mon Sep 17 00:00:00 2001 From: Jonny McCullagh Date: Wed, 12 Oct 2022 14:54:25 +0100 Subject: [PATCH 10/16] remove ipv6 conf from nginx proxy if ipv6 not enabled --- hosting/proxy/10-listen-on-ipv6-by-default.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosting/proxy/10-listen-on-ipv6-by-default.sh b/hosting/proxy/10-listen-on-ipv6-by-default.sh index 7d25a644c8..1d62732ea1 100644 --- a/hosting/proxy/10-listen-on-ipv6-by-default.sh +++ b/hosting/proxy/10-listen-on-ipv6-by-default.sh @@ -8,7 +8,7 @@ NGINX_CONF_FILE="/etc/nginx/nginx.conf" DEFAULT_CONF_FILE="/etc/nginx/conf.d/default.conf" # check if we have ipv6 available -if [ ! -f "/proc/net/if_jonnyinet6" ]; then +if [ ! -f "/proc/net/if_inet6" ]; then # ipv6 not available so delete lines from nginx conf if [ -f "$NGINX_CONF_FILE" ]; then sed -i '/listen \[::\]/d' $NGINX_CONF_FILE From d5df8e8305b797c7a31f2029730c1550f38adf2d Mon Sep 17 00:00:00 2001 From: Jonny McCullagh Date: Wed, 12 Oct 2022 15:02:05 +0100 Subject: [PATCH 11/16] remove ipv6 conf from nginx proxy if ipv6 not enabled --- hosting/proxy/10-listen-on-ipv6-by-default.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosting/proxy/10-listen-on-ipv6-by-default.sh b/hosting/proxy/10-listen-on-ipv6-by-default.sh index 1d62732ea1..e2e89388a9 100644 --- a/hosting/proxy/10-listen-on-ipv6-by-default.sh +++ b/hosting/proxy/10-listen-on-ipv6-by-default.sh @@ -21,4 +21,4 @@ else echo "$ME: info: ipv6 is available so no need to delete lines from nginx conf" fi -exit 0 \ No newline at end of file +exit 0 From d5b65426c0d87bf44de3bd8ed396554387d55af4 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 12 Oct 2022 19:07:36 +0000 Subject: [PATCH 12/16] v2.0.30-alpha.2 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 8 ++++---- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/sdk/package.json | 2 +- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lerna.json b/lerna.json index c17905e010..a47b941565 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.0.30-alpha.1", + "version": "2.0.30-alpha.2", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index e89ff61325..d25f05504f 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.1", + "version": "2.0.30-alpha.2", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "2.0.30-alpha.1", + "@budibase/types": "2.0.30-alpha.2", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 2b1b50485e..2aa5c25f63 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.1", + "version": "2.0.30-alpha.2", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "2.0.30-alpha.1", + "@budibase/string-templates": "2.0.30-alpha.2", "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/avatar": "^3.0.2", diff --git a/packages/builder/package.json b/packages/builder/package.json index 318309653f..60078b07b8 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.0.30-alpha.1", + "version": "2.0.30-alpha.2", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.0.30-alpha.1", - "@budibase/client": "2.0.30-alpha.1", - "@budibase/frontend-core": "2.0.30-alpha.1", - "@budibase/string-templates": "2.0.30-alpha.1", + "@budibase/bbui": "2.0.30-alpha.2", + "@budibase/client": "2.0.30-alpha.2", + "@budibase/frontend-core": "2.0.30-alpha.2", + "@budibase/string-templates": "2.0.30-alpha.2", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index 5c17ec8abf..be8d3dff78 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.0.30-alpha.1", + "version": "2.0.30-alpha.2", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "2.0.30-alpha.1", - "@budibase/string-templates": "2.0.30-alpha.1", - "@budibase/types": "2.0.30-alpha.1", + "@budibase/backend-core": "2.0.30-alpha.2", + "@budibase/string-templates": "2.0.30-alpha.2", + "@budibase/types": "2.0.30-alpha.2", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index d8c611b2bb..2a7a8f8e94 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.0.30-alpha.1", + "version": "2.0.30-alpha.2", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "2.0.30-alpha.1", - "@budibase/frontend-core": "2.0.30-alpha.1", - "@budibase/string-templates": "2.0.30-alpha.1", + "@budibase/bbui": "2.0.30-alpha.2", + "@budibase/frontend-core": "2.0.30-alpha.2", + "@budibase/string-templates": "2.0.30-alpha.2", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index 2f7fdd41e8..75376858d8 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.1", + "version": "2.0.30-alpha.2", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.0.30-alpha.1", + "@budibase/bbui": "2.0.30-alpha.2", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 9153383675..003078387e 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.0.30-alpha.1", + "version": "2.0.30-alpha.2", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index d290de3249..25774dc9a5 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.1", + "version": "2.0.30-alpha.2", "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.1", - "@budibase/client": "2.0.30-alpha.1", + "@budibase/backend-core": "2.0.30-alpha.2", + "@budibase/client": "2.0.30-alpha.2", "@budibase/pro": "2.0.30-alpha.1", - "@budibase/string-templates": "2.0.30-alpha.1", - "@budibase/types": "2.0.30-alpha.1", + "@budibase/string-templates": "2.0.30-alpha.2", + "@budibase/types": "2.0.30-alpha.2", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index a453583844..54056b2574 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.1", + "version": "2.0.30-alpha.2", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index b7c7a3f540..4eb477afa5 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.0.30-alpha.1", + "version": "2.0.30-alpha.2", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index e87be9afb2..542b3a6278 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.1", + "version": "2.0.30-alpha.2", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.0.30-alpha.1", + "@budibase/backend-core": "2.0.30-alpha.2", "@budibase/pro": "2.0.30-alpha.1", - "@budibase/string-templates": "2.0.30-alpha.1", - "@budibase/types": "2.0.30-alpha.1", + "@budibase/string-templates": "2.0.30-alpha.2", + "@budibase/types": "2.0.30-alpha.2", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 9bff10e9db13754a9d345fe5ddb40e3da0e7b808 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 12 Oct 2022 19:10:56 +0000 Subject: [PATCH 13/16] Update pro version to 2.0.30-alpha.2 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index 25774dc9a5..038aa5f271 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.2", "@budibase/client": "2.0.30-alpha.2", - "@budibase/pro": "2.0.30-alpha.1", + "@budibase/pro": "2.0.30-alpha.2", "@budibase/string-templates": "2.0.30-alpha.2", "@budibase/types": "2.0.30-alpha.2", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index c7a7d5b550..e49560b37e 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.1": - version "2.0.30-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.30-alpha.1.tgz#6e5cbc448cd819f67c93451d35c8793748380649" - integrity sha512-AuXk5IZBQ9zFTjTL2FsqqYdqqVjrSv19ozXSsb1w2z8Pyymz57WgzUiZ6uzHbHzUXNVD4Nei7cgfgSyCJ27Phg== +"@budibase/backend-core@2.0.30-alpha.2": + version "2.0.30-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.30-alpha.2.tgz#606fc16e6a21deb2f2fd27fadb3813ede421d33e" + integrity sha512-nsY91Ui3mUNuT+WW0Ko3UpM5WjNvYLd399AwwekpNbPIUwdVN4i8Cg4MZ2C7nEr278hxdb30OQAIPbYxh5GkNw== dependencies: - "@budibase/types" "2.0.30-alpha.1" + "@budibase/types" "2.0.30-alpha.2" "@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.1": - version "2.0.30-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.30-alpha.1.tgz#12e4c2115d3e647d365b46e6b5df59746148d4ea" - integrity sha512-K/iy3Z3f9AVodxtuAk8yemSQ2R08tjoot4wogDCwsTMRlXxq/WChCcm9prkb2DzwOzQQSsJ3bLgL1p/9sGzagg== +"@budibase/pro@2.0.30-alpha.2": + version "2.0.30-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.30-alpha.2.tgz#eede1652d79e9729bfbd76c0774f923426ee1be7" + integrity sha512-ddQ+ys7Xt9m6N2fJWS0WWHieis+fvcjCqVPImVIqSrfej3Aqp6F3iEIE1zgGn9bwBF9no5SyENBYC/3caOw60Q== dependencies: - "@budibase/backend-core" "2.0.30-alpha.1" - "@budibase/types" "2.0.30-alpha.1" + "@budibase/backend-core" "2.0.30-alpha.2" + "@budibase/types" "2.0.30-alpha.2" "@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.1": - version "2.0.30-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.30-alpha.1.tgz#1320eb9c2996e371b47b2a845ce1b81e1b21b67c" - integrity sha512-tw49Jwo7Dnhv9IuZq68DVvHsKcaVpggZ/1BYkQsdzUw+0yoIe1k8t+4XPbHqBP328mpp8oPx4rUQF3yFpJv41g== +"@budibase/types@2.0.30-alpha.2": + version "2.0.30-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.30-alpha.2.tgz#a09f3c93218a1542fa0d0be022d54b36d9613e74" + integrity sha512-DxOY+GqzY1ugbjeERQekbkqzcZnlgHV4xS/IT68WySDm7ncC+UkIiA3lzw3MHAaitp2OdbXYJb35VZ+QzHsOLw== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 542b3a6278..c56c85d8be 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.2", - "@budibase/pro": "2.0.30-alpha.1", + "@budibase/pro": "2.0.30-alpha.2", "@budibase/string-templates": "2.0.30-alpha.2", "@budibase/types": "2.0.30-alpha.2", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 68188cf827..b77f757052 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.1": - version "2.0.30-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.30-alpha.1.tgz#6e5cbc448cd819f67c93451d35c8793748380649" - integrity sha512-AuXk5IZBQ9zFTjTL2FsqqYdqqVjrSv19ozXSsb1w2z8Pyymz57WgzUiZ6uzHbHzUXNVD4Nei7cgfgSyCJ27Phg== +"@budibase/backend-core@2.0.30-alpha.2": + version "2.0.30-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.30-alpha.2.tgz#606fc16e6a21deb2f2fd27fadb3813ede421d33e" + integrity sha512-nsY91Ui3mUNuT+WW0Ko3UpM5WjNvYLd399AwwekpNbPIUwdVN4i8Cg4MZ2C7nEr278hxdb30OQAIPbYxh5GkNw== dependencies: - "@budibase/types" "2.0.30-alpha.1" + "@budibase/types" "2.0.30-alpha.2" "@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.1": - version "2.0.30-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.30-alpha.1.tgz#12e4c2115d3e647d365b46e6b5df59746148d4ea" - integrity sha512-K/iy3Z3f9AVodxtuAk8yemSQ2R08tjoot4wogDCwsTMRlXxq/WChCcm9prkb2DzwOzQQSsJ3bLgL1p/9sGzagg== +"@budibase/pro@2.0.30-alpha.2": + version "2.0.30-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.30-alpha.2.tgz#eede1652d79e9729bfbd76c0774f923426ee1be7" + integrity sha512-ddQ+ys7Xt9m6N2fJWS0WWHieis+fvcjCqVPImVIqSrfej3Aqp6F3iEIE1zgGn9bwBF9no5SyENBYC/3caOw60Q== dependencies: - "@budibase/backend-core" "2.0.30-alpha.1" - "@budibase/types" "2.0.30-alpha.1" + "@budibase/backend-core" "2.0.30-alpha.2" + "@budibase/types" "2.0.30-alpha.2" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.0.30-alpha.1": - version "2.0.30-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.30-alpha.1.tgz#1320eb9c2996e371b47b2a845ce1b81e1b21b67c" - integrity sha512-tw49Jwo7Dnhv9IuZq68DVvHsKcaVpggZ/1BYkQsdzUw+0yoIe1k8t+4XPbHqBP328mpp8oPx4rUQF3yFpJv41g== +"@budibase/types@2.0.30-alpha.2": + version "2.0.30-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.30-alpha.2.tgz#a09f3c93218a1542fa0d0be022d54b36d9613e74" + integrity sha512-DxOY+GqzY1ugbjeERQekbkqzcZnlgHV4xS/IT68WySDm7ncC+UkIiA3lzw3MHAaitp2OdbXYJb35VZ+QzHsOLw== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From a5749b8024c0ace4e3435ae639259c44237dc293 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Thu, 13 Oct 2022 09:28:12 +0100 Subject: [PATCH 14/16] Remove debug message from upgrade page ui (self host) --- .../builder/src/pages/builder/portal/settings/upgrade.svelte | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/builder/src/pages/builder/portal/settings/upgrade.svelte b/packages/builder/src/pages/builder/portal/settings/upgrade.svelte index 16bbc0b03d..5d10f22396 100644 --- a/packages/builder/src/pages/builder/portal/settings/upgrade.svelte +++ b/packages/builder/src/pages/builder/portal/settings/upgrade.svelte @@ -91,7 +91,6 @@ }) -{"is adming" + $auth.isAdmin} {#if $auth.isAdmin} Date: Thu, 13 Oct 2022 09:11:09 +0000 Subject: [PATCH 15/16] v2.0.30-alpha.3 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 8 ++++---- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/sdk/package.json | 2 +- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lerna.json b/lerna.json index a47b941565..1d092b043c 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.0.30-alpha.2", + "version": "2.0.30-alpha.3", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index d25f05504f..abcf72491a 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.2", + "version": "2.0.30-alpha.3", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "2.0.30-alpha.2", + "@budibase/types": "2.0.30-alpha.3", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 2aa5c25f63..147a1b3785 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.2", + "version": "2.0.30-alpha.3", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "2.0.30-alpha.2", + "@budibase/string-templates": "2.0.30-alpha.3", "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/avatar": "^3.0.2", diff --git a/packages/builder/package.json b/packages/builder/package.json index 60078b07b8..8ced899d20 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.0.30-alpha.2", + "version": "2.0.30-alpha.3", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.0.30-alpha.2", - "@budibase/client": "2.0.30-alpha.2", - "@budibase/frontend-core": "2.0.30-alpha.2", - "@budibase/string-templates": "2.0.30-alpha.2", + "@budibase/bbui": "2.0.30-alpha.3", + "@budibase/client": "2.0.30-alpha.3", + "@budibase/frontend-core": "2.0.30-alpha.3", + "@budibase/string-templates": "2.0.30-alpha.3", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index be8d3dff78..b750bb5c77 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.0.30-alpha.2", + "version": "2.0.30-alpha.3", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "2.0.30-alpha.2", - "@budibase/string-templates": "2.0.30-alpha.2", - "@budibase/types": "2.0.30-alpha.2", + "@budibase/backend-core": "2.0.30-alpha.3", + "@budibase/string-templates": "2.0.30-alpha.3", + "@budibase/types": "2.0.30-alpha.3", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index 2a7a8f8e94..3040a731a7 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.0.30-alpha.2", + "version": "2.0.30-alpha.3", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "2.0.30-alpha.2", - "@budibase/frontend-core": "2.0.30-alpha.2", - "@budibase/string-templates": "2.0.30-alpha.2", + "@budibase/bbui": "2.0.30-alpha.3", + "@budibase/frontend-core": "2.0.30-alpha.3", + "@budibase/string-templates": "2.0.30-alpha.3", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index 75376858d8..5d23386f05 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.2", + "version": "2.0.30-alpha.3", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.0.30-alpha.2", + "@budibase/bbui": "2.0.30-alpha.3", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 003078387e..3431ee654b 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.0.30-alpha.2", + "version": "2.0.30-alpha.3", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index 038aa5f271..a399c5a6d0 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.2", + "version": "2.0.30-alpha.3", "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.2", - "@budibase/client": "2.0.30-alpha.2", + "@budibase/backend-core": "2.0.30-alpha.3", + "@budibase/client": "2.0.30-alpha.3", "@budibase/pro": "2.0.30-alpha.2", - "@budibase/string-templates": "2.0.30-alpha.2", - "@budibase/types": "2.0.30-alpha.2", + "@budibase/string-templates": "2.0.30-alpha.3", + "@budibase/types": "2.0.30-alpha.3", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 54056b2574..d8117e19f4 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.2", + "version": "2.0.30-alpha.3", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index 4eb477afa5..a3de479a0f 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.0.30-alpha.2", + "version": "2.0.30-alpha.3", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index c56c85d8be..ea016b4f06 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.2", + "version": "2.0.30-alpha.3", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.0.30-alpha.2", + "@budibase/backend-core": "2.0.30-alpha.3", "@budibase/pro": "2.0.30-alpha.2", - "@budibase/string-templates": "2.0.30-alpha.2", - "@budibase/types": "2.0.30-alpha.2", + "@budibase/string-templates": "2.0.30-alpha.3", + "@budibase/types": "2.0.30-alpha.3", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 67ab376e63a8734cb7fb3c4b123cb6b3c2370a57 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Thu, 13 Oct 2022 09:14:35 +0000 Subject: [PATCH 16/16] Update pro version to 2.0.30-alpha.3 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index a399c5a6d0..5e1522f077 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.3", "@budibase/client": "2.0.30-alpha.3", - "@budibase/pro": "2.0.30-alpha.2", + "@budibase/pro": "2.0.30-alpha.3", "@budibase/string-templates": "2.0.30-alpha.3", "@budibase/types": "2.0.30-alpha.3", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index e49560b37e..673c468284 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.2": - version "2.0.30-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.30-alpha.2.tgz#606fc16e6a21deb2f2fd27fadb3813ede421d33e" - integrity sha512-nsY91Ui3mUNuT+WW0Ko3UpM5WjNvYLd399AwwekpNbPIUwdVN4i8Cg4MZ2C7nEr278hxdb30OQAIPbYxh5GkNw== +"@budibase/backend-core@2.0.30-alpha.3": + version "2.0.30-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.30-alpha.3.tgz#42235b33676c3357d8cf8e181e619c4c92065fd0" + integrity sha512-ixE28ddY8FqvCcaCkqsxUI5UjkFKxFu23MgNARJ8VSpj5NLq6d8qAR+xE0E2pJ58hm5r1KLn2yAZiNXZzu0dzg== dependencies: - "@budibase/types" "2.0.30-alpha.2" + "@budibase/types" "2.0.30-alpha.3" "@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.2": - version "2.0.30-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.30-alpha.2.tgz#eede1652d79e9729bfbd76c0774f923426ee1be7" - integrity sha512-ddQ+ys7Xt9m6N2fJWS0WWHieis+fvcjCqVPImVIqSrfej3Aqp6F3iEIE1zgGn9bwBF9no5SyENBYC/3caOw60Q== +"@budibase/pro@2.0.30-alpha.3": + version "2.0.30-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.30-alpha.3.tgz#ad8f8aa5ced2b5200e05b98e392267b9f84c8177" + integrity sha512-Cw7XUGVVbHCxKo3tJFvG5EKUvO0zdOoU/baFArjMiNHAivlZvFVWCsxptIua+qtFkaUpjQneTHihFiQnY9g83A== dependencies: - "@budibase/backend-core" "2.0.30-alpha.2" - "@budibase/types" "2.0.30-alpha.2" + "@budibase/backend-core" "2.0.30-alpha.3" + "@budibase/types" "2.0.30-alpha.3" "@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.2": - version "2.0.30-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.30-alpha.2.tgz#a09f3c93218a1542fa0d0be022d54b36d9613e74" - integrity sha512-DxOY+GqzY1ugbjeERQekbkqzcZnlgHV4xS/IT68WySDm7ncC+UkIiA3lzw3MHAaitp2OdbXYJb35VZ+QzHsOLw== +"@budibase/types@2.0.30-alpha.3": + version "2.0.30-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.30-alpha.3.tgz#cb55bcced75b711cc8a675284fbacaa8ebf1c0f2" + integrity sha512-rHeFVuNbSSE4fMnX6uyrM2r47m+neqFXlVNOkhHU9i7KoIcIZbEYInU8CjUFR2da3ruST9ajXjJ5UenX2+MnTg== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index ea016b4f06..8334210808 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.3", - "@budibase/pro": "2.0.30-alpha.2", + "@budibase/pro": "2.0.30-alpha.3", "@budibase/string-templates": "2.0.30-alpha.3", "@budibase/types": "2.0.30-alpha.3", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index b77f757052..92a8ef024d 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.2": - version "2.0.30-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.30-alpha.2.tgz#606fc16e6a21deb2f2fd27fadb3813ede421d33e" - integrity sha512-nsY91Ui3mUNuT+WW0Ko3UpM5WjNvYLd399AwwekpNbPIUwdVN4i8Cg4MZ2C7nEr278hxdb30OQAIPbYxh5GkNw== +"@budibase/backend-core@2.0.30-alpha.3": + version "2.0.30-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.30-alpha.3.tgz#42235b33676c3357d8cf8e181e619c4c92065fd0" + integrity sha512-ixE28ddY8FqvCcaCkqsxUI5UjkFKxFu23MgNARJ8VSpj5NLq6d8qAR+xE0E2pJ58hm5r1KLn2yAZiNXZzu0dzg== dependencies: - "@budibase/types" "2.0.30-alpha.2" + "@budibase/types" "2.0.30-alpha.3" "@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.2": - version "2.0.30-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.30-alpha.2.tgz#eede1652d79e9729bfbd76c0774f923426ee1be7" - integrity sha512-ddQ+ys7Xt9m6N2fJWS0WWHieis+fvcjCqVPImVIqSrfej3Aqp6F3iEIE1zgGn9bwBF9no5SyENBYC/3caOw60Q== +"@budibase/pro@2.0.30-alpha.3": + version "2.0.30-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.30-alpha.3.tgz#ad8f8aa5ced2b5200e05b98e392267b9f84c8177" + integrity sha512-Cw7XUGVVbHCxKo3tJFvG5EKUvO0zdOoU/baFArjMiNHAivlZvFVWCsxptIua+qtFkaUpjQneTHihFiQnY9g83A== dependencies: - "@budibase/backend-core" "2.0.30-alpha.2" - "@budibase/types" "2.0.30-alpha.2" + "@budibase/backend-core" "2.0.30-alpha.3" + "@budibase/types" "2.0.30-alpha.3" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.0.30-alpha.2": - version "2.0.30-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.30-alpha.2.tgz#a09f3c93218a1542fa0d0be022d54b36d9613e74" - integrity sha512-DxOY+GqzY1ugbjeERQekbkqzcZnlgHV4xS/IT68WySDm7ncC+UkIiA3lzw3MHAaitp2OdbXYJb35VZ+QzHsOLw== +"@budibase/types@2.0.30-alpha.3": + version "2.0.30-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.30-alpha.3.tgz#cb55bcced75b711cc8a675284fbacaa8ebf1c0f2" + integrity sha512-rHeFVuNbSSE4fMnX6uyrM2r47m+neqFXlVNOkhHU9i7KoIcIZbEYInU8CjUFR2da3ruST9ajXjJ5UenX2+MnTg== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0"