diff --git a/.github/workflows/release-selfhost.yml b/.github/workflows/release-selfhost.yml index fc2b7b0cca..b746c76bc3 100644 --- a/.github/workflows/release-selfhost.yml +++ b/.github/workflows/release-selfhost.yml @@ -3,6 +3,10 @@ name: Budibase Release Selfhost on: workflow_dispatch: +env: + BRANCH: ${{ github.event.pull_request.head.ref }} + BASE_BRANCH: ${{ github.event.pull_request.base.ref}} + jobs: release: runs-on: ubuntu-latest @@ -40,13 +44,15 @@ jobs: DOCKER_USER: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }} SELFHOST_TAG: latest - - - name: Build CLI executables + + - name: Install Pro + run: yarn install:pro $BRANCH $BASE_BRANCH + + - name: Bootstrap and build (CLI) run: | - pushd packages/cli yarn + yarn bootstrap yarn build - popd - name: Build OpenAPI spec run: | @@ -93,4 +99,4 @@ jobs: with: webhook-url: ${{ secrets.PROD_DEPLOY_WEBHOOK_URL }} content: "Self Host Deployment Complete: ${{ env.RELEASE_VERSION }} deployed to Self Host." - embed-title: ${{ env.RELEASE_VERSION }} \ No newline at end of file + embed-title: ${{ env.RELEASE_VERSION }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 348b600f90..961082e1ef 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,7 +29,7 @@ on: env: # Posthog token used by ui at build time - POSTHOG_TOKEN: phc_fg5I3nDOf6oJVMHSaycEhpPdlgS8rzXG2r6F2IpxCHS + POSTHOG_TOKEN: phc_bIjZL7oh2GEUd2vqvTBH8WvrX0fWTFQMs6H5KQxiUxU INTERCOM_TOKEN: ${{ secrets.INTERCOM_TOKEN }} SENTRY_DSN: ${{ secrets.SENTRY_DSN }} PERSONAL_ACCESS_TOKEN : ${{ secrets.PERSONAL_ACCESS_TOKEN }} diff --git a/charts/budibase/values.yaml b/charts/budibase/values.yaml index 2734202fff..404e92c70f 100644 --- a/charts/budibase/values.yaml +++ b/charts/budibase/values.yaml @@ -91,7 +91,7 @@ globals: budibaseEnv: PRODUCTION enableAnalytics: "1" sentryDSN: "" - posthogToken: "phc_fg5I3nDOf6oJVMHSaycEhpPdlgS8rzXG2r6F2IpxCHS" + posthogToken: "phc_bIjZL7oh2GEUd2vqvTBH8WvrX0fWTFQMs6H5KQxiUxU" logLevel: info selfHosted: "1" # set to 0 for budibase cloud environment, set to 1 for self-hosted setup multiTenancy: "0" # set to 0 to disable multiple orgs, set to 1 to enable multiple orgs diff --git a/hosting/single/Dockerfile b/hosting/single/Dockerfile index b5bf17adde..b631782ac2 100644 --- a/hosting/single/Dockerfile +++ b/hosting/single/Dockerfile @@ -37,7 +37,7 @@ ENV \ # CUSTOM_DOMAIN=budi001.custom.com \ DEPLOYMENT_ENVIRONMENT=docker \ MINIO_URL=http://localhost:9000 \ - POSTHOG_TOKEN=phc_fg5I3nDOf6oJVMHSaycEhpPdlgS8rzXG2r6F2IpxCHS \ + POSTHOG_TOKEN=phc_bIjZL7oh2GEUd2vqvTBH8WvrX0fWTFQMs6H5KQxiUxU \ REDIS_URL=localhost:6379 \ SELF_HOSTED=1 \ TARGETBUILD=$TARGETBUILD \ diff --git a/lerna.json b/lerna.json index b8495a870b..30502d64b9 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.2.20-alpha.2", + "version": "1.2.25", "npmClient": "yarn", "packages": [ "packages/*" @@ -15,4 +15,4 @@ ] } } -} +} \ No newline at end of file diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 63ce04f4e7..80f8711ba6 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.2.20-alpha.2", + "version": "1.2.25", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "1.2.20-alpha.2", + "@budibase/types": "^1.2.25", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", "bcrypt": "5.0.1", @@ -81,4 +81,4 @@ "typescript": "4.7.3" }, "gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc" -} +} \ No newline at end of file diff --git a/packages/backend-core/src/cache/generic.js b/packages/backend-core/src/cache/generic.js index e2f3915339..26ef0c6bb0 100644 --- a/packages/backend-core/src/cache/generic.js +++ b/packages/backend-core/src/cache/generic.js @@ -9,6 +9,7 @@ exports.CacheKeys = { UNIQUE_TENANT_ID: "uniqueTenantId", EVENTS: "events", BACKFILL_METADATA: "backfillMetadata", + EVENTS_RATE_LIMIT: "eventsRateLimit", } exports.TTL = { diff --git a/packages/backend-core/src/events/processors/AnalyticsProcessor.ts b/packages/backend-core/src/events/processors/AnalyticsProcessor.ts index 2ee7a02afa..602407400e 100644 --- a/packages/backend-core/src/events/processors/AnalyticsProcessor.ts +++ b/packages/backend-core/src/events/processors/AnalyticsProcessor.ts @@ -2,7 +2,7 @@ import { Event, Identity, Group, IdentityType } from "@budibase/types" import { EventProcessor } from "./types" import env from "../../environment" import * as analytics from "../analytics" -import PosthogProcessor from "./PosthogProcessor" +import PosthogProcessor from "./posthog" /** * Events that are always captured. diff --git a/packages/backend-core/src/events/processors/PosthogProcessor.ts b/packages/backend-core/src/events/processors/posthog/PosthogProcessor.ts similarity index 89% rename from packages/backend-core/src/events/processors/PosthogProcessor.ts rename to packages/backend-core/src/events/processors/posthog/PosthogProcessor.ts index 9d68d3919a..593e5ff082 100644 --- a/packages/backend-core/src/events/processors/PosthogProcessor.ts +++ b/packages/backend-core/src/events/processors/posthog/PosthogProcessor.ts @@ -1,9 +1,10 @@ import PostHog from "posthog-node" import { Event, Identity, Group, BaseEvent } from "@budibase/types" -import { EventProcessor } from "./types" -import env from "../../environment" -import * as context from "../../context" -const pkg = require("../../../package.json") +import { EventProcessor } from "../types" +import env from "../../../environment" +import * as context from "../../../context" +import * as rateLimiting from "./rateLimiting" +const pkg = require("../../../../package.json") const EXCLUDED_EVENTS: Event[] = [ Event.USER_UPDATED, @@ -42,6 +43,10 @@ export default class PosthogProcessor implements EventProcessor { return } + if (await rateLimiting.limited(event)) { + return + } + properties.version = pkg.version properties.service = env.SERVICE properties.environment = identity.environment diff --git a/packages/backend-core/src/events/processors/posthog/index.ts b/packages/backend-core/src/events/processors/posthog/index.ts new file mode 100644 index 0000000000..dceb10d2cd --- /dev/null +++ b/packages/backend-core/src/events/processors/posthog/index.ts @@ -0,0 +1,2 @@ +import PosthogProcessor from "./PosthogProcessor" +export default PosthogProcessor diff --git a/packages/backend-core/src/events/processors/posthog/rateLimiting.ts b/packages/backend-core/src/events/processors/posthog/rateLimiting.ts new file mode 100644 index 0000000000..e2a02eb28e --- /dev/null +++ b/packages/backend-core/src/events/processors/posthog/rateLimiting.ts @@ -0,0 +1,103 @@ +import { Event } from "@budibase/types" +import { CacheKeys, TTL } from "../../../cache/generic" +import * as cache from "../../../cache/generic" +import * as context from "../../../context" + +type RateLimitedEvent = + | Event.SERVED_BUILDER + | Event.SERVED_APP_PREVIEW + | Event.SERVED_APP + +const isRateLimited = (event: Event): event is RateLimitedEvent => { + return ( + event === Event.SERVED_BUILDER || + event === Event.SERVED_APP_PREVIEW || + event === Event.SERVED_APP + ) +} + +const isPerApp = (event: RateLimitedEvent) => { + return event === Event.SERVED_APP_PREVIEW || event === Event.SERVED_APP +} + +interface EventProperties { + timestamp: number +} + +enum RateLimit { + CALENDAR_DAY = "calendarDay", +} + +const RATE_LIMITS = { + [Event.SERVED_APP]: RateLimit.CALENDAR_DAY, + [Event.SERVED_APP_PREVIEW]: RateLimit.CALENDAR_DAY, + [Event.SERVED_BUILDER]: RateLimit.CALENDAR_DAY, +} + +/** + * Check if this event should be sent right now + * Return false to signal the event SHOULD be sent + * Return true to signal the event should NOT be sent + */ +export const limited = async (event: Event): Promise => { + // not a rate limited event -- send + if (!isRateLimited(event)) { + return false + } + + const cachedEvent = (await readEvent(event)) as EventProperties + if (cachedEvent) { + const timestamp = new Date(cachedEvent.timestamp) + const limit = RATE_LIMITS[event] + switch (limit) { + case RateLimit.CALENDAR_DAY: { + // get midnight at the start of the next day for the timestamp + timestamp.setDate(timestamp.getDate() + 1) + timestamp.setHours(0, 0, 0, 0) + + // if we have passed the threshold into the next day + if (Date.now() > timestamp.getTime()) { + // update the timestamp in the event -- send + await recordEvent(event, { timestamp: Date.now() }) + return false + } else { + // still within the limited period -- don't send + return true + } + } + } + } else { + // no event present i.e. expired -- send + await recordEvent(event, { timestamp: Date.now() }) + return false + } +} + +const eventKey = (event: RateLimitedEvent) => { + let key = `${CacheKeys.EVENTS_RATE_LIMIT}:${event}` + if (isPerApp(event)) { + key = key + context.getAppId() + } + return key +} + +const readEvent = async (event: RateLimitedEvent) => { + const key = eventKey(event) + return cache.get(key) +} + +const recordEvent = async ( + event: RateLimitedEvent, + properties: EventProperties +) => { + const key = eventKey(event) + const limit = RATE_LIMITS[event] + let ttl + switch (limit) { + case RateLimit.CALENDAR_DAY: { + ttl = TTL.ONE_DAY + } + } + + await cache.store(key, properties, ttl) +} diff --git a/packages/backend-core/src/events/processors/posthog/tests/PosthogProcessor.spec.ts b/packages/backend-core/src/events/processors/posthog/tests/PosthogProcessor.spec.ts new file mode 100644 index 0000000000..d14b697966 --- /dev/null +++ b/packages/backend-core/src/events/processors/posthog/tests/PosthogProcessor.spec.ts @@ -0,0 +1,145 @@ +import "../../../../../tests/utilities/TestConfiguration" +import PosthogProcessor from "../PosthogProcessor" +import { Event, IdentityType, Hosting } from "@budibase/types" +const tk = require("timekeeper") +import * as cache from "../../../../cache/generic" +import { CacheKeys } from "../../../../cache/generic" +import * as context from "../../../../context" + +const newIdentity = () => { + return { + id: "test", + type: IdentityType.USER, + hosting: Hosting.SELF, + environment: "test", + } +} + +describe("PosthogProcessor", () => { + beforeEach(async () => { + jest.clearAllMocks() + await cache.bustCache( + `${CacheKeys.EVENTS_RATE_LIMIT}:${Event.SERVED_BUILDER}` + ) + }) + + describe("processEvent", () => { + it("processes event", async () => { + const processor = new PosthogProcessor("test") + + const identity = newIdentity() + const properties = {} + + await processor.processEvent(Event.APP_CREATED, identity, properties) + + expect(processor.posthog.capture).toHaveBeenCalledTimes(1) + }) + + it("honours exclusions", async () => { + const processor = new PosthogProcessor("test") + + const identity = newIdentity() + const properties = {} + + await processor.processEvent(Event.AUTH_SSO_UPDATED, identity, properties) + expect(processor.posthog.capture).toHaveBeenCalledTimes(0) + }) + + describe("rate limiting", () => { + it("sends daily event once in same day", async () => { + const processor = new PosthogProcessor("test") + const identity = newIdentity() + const properties = {} + + tk.freeze(new Date(2022, 0, 1, 14, 0)) + await processor.processEvent(Event.SERVED_BUILDER, identity, properties) + // go forward one hour + tk.freeze(new Date(2022, 0, 1, 15, 0)) + await processor.processEvent(Event.SERVED_BUILDER, identity, properties) + + expect(processor.posthog.capture).toHaveBeenCalledTimes(1) + }) + + it("sends daily event once per unique day", async () => { + const processor = new PosthogProcessor("test") + const identity = newIdentity() + const properties = {} + + tk.freeze(new Date(2022, 0, 1, 14, 0)) + await processor.processEvent(Event.SERVED_BUILDER, identity, properties) + // go forward into next day + tk.freeze(new Date(2022, 0, 2, 9, 0)) + await processor.processEvent(Event.SERVED_BUILDER, identity, properties) + // go forward into next day + tk.freeze(new Date(2022, 0, 3, 5, 0)) + await processor.processEvent(Event.SERVED_BUILDER, identity, properties) + // go forward one hour + tk.freeze(new Date(2022, 0, 3, 6, 0)) + await processor.processEvent(Event.SERVED_BUILDER, identity, properties) + + expect(processor.posthog.capture).toHaveBeenCalledTimes(3) + }) + + it("sends event again after cache expires", async () => { + const processor = new PosthogProcessor("test") + const identity = newIdentity() + const properties = {} + + tk.freeze(new Date(2022, 0, 1, 14, 0)) + await processor.processEvent(Event.SERVED_BUILDER, identity, properties) + + await cache.bustCache( + `${CacheKeys.EVENTS_RATE_LIMIT}:${Event.SERVED_BUILDER}` + ) + + tk.freeze(new Date(2022, 0, 1, 14, 0)) + await processor.processEvent(Event.SERVED_BUILDER, identity, properties) + + expect(processor.posthog.capture).toHaveBeenCalledTimes(2) + }) + + it("sends per app events once per day per app", async () => { + const processor = new PosthogProcessor("test") + const identity = newIdentity() + const properties = {} + + const runAppEvents = async (appId: string) => { + await context.doInAppContext(appId, async () => { + tk.freeze(new Date(2022, 0, 1, 14, 0)) + await processor.processEvent(Event.SERVED_APP, identity, properties) + await processor.processEvent( + Event.SERVED_APP_PREVIEW, + identity, + properties + ) + + // go forward one hour - should be ignored + tk.freeze(new Date(2022, 0, 1, 15, 0)) + await processor.processEvent(Event.SERVED_APP, identity, properties) + await processor.processEvent( + Event.SERVED_APP_PREVIEW, + identity, + properties + ) + + // go forward into next day + tk.freeze(new Date(2022, 0, 2, 9, 0)) + + await processor.processEvent(Event.SERVED_APP, identity, properties) + await processor.processEvent( + Event.SERVED_APP_PREVIEW, + identity, + properties + ) + }) + } + + await runAppEvents("app_1") + expect(processor.posthog.capture).toHaveBeenCalledTimes(4) + + await runAppEvents("app_2") + expect(processor.posthog.capture).toHaveBeenCalledTimes(8) + }) + }) + }) +}) diff --git a/packages/backend-core/src/events/processors/tests/PosthogProcessor.spec.ts b/packages/backend-core/src/events/processors/tests/PosthogProcessor.spec.ts deleted file mode 100644 index 4a6d55b272..0000000000 --- a/packages/backend-core/src/events/processors/tests/PosthogProcessor.spec.ts +++ /dev/null @@ -1,40 +0,0 @@ -import PosthogProcessor from "../PosthogProcessor" -import { Event, IdentityType, Hosting } from "@budibase/types" - -const newIdentity = () => { - return { - id: "test", - type: IdentityType.USER, - hosting: Hosting.SELF, - environment: "test", - } -} - -describe("PosthogProcessor", () => { - beforeEach(() => { - jest.clearAllMocks() - }) - - describe("processEvent", () => { - it("processes event", () => { - const processor = new PosthogProcessor("test") - - const identity = newIdentity() - const properties = {} - - processor.processEvent(Event.APP_CREATED, identity, properties) - - expect(processor.posthog.capture).toHaveBeenCalledTimes(1) - }) - - it("honours exclusions", () => { - const processor = new PosthogProcessor("test") - - const identity = newIdentity() - const properties = {} - - processor.processEvent(Event.AUTH_SSO_UPDATED, identity, properties) - expect(processor.posthog.capture).toHaveBeenCalledTimes(0) - }) - }) -}) diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 9df404feca..c3f3c94041 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "1.2.20-alpha.2", + "version": "1.2.25", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "1.2.20-alpha.2", + "@budibase/string-templates": "^1.2.25", "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/avatar": "^3.0.2", @@ -86,4 +86,4 @@ "svelte-portal": "^1.0.0" }, "gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc" -} +} \ No newline at end of file diff --git a/packages/builder/package.json b/packages/builder/package.json index 70589f5c84..a1d673fdf4 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.2.20-alpha.2", + "version": "1.2.25", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "1.2.20-alpha.2", - "@budibase/client": "1.2.20-alpha.2", - "@budibase/frontend-core": "1.2.20-alpha.2", - "@budibase/string-templates": "1.2.20-alpha.2", + "@budibase/bbui": "^1.2.25", + "@budibase/client": "^1.2.25", + "@budibase/frontend-core": "^1.2.25", + "@budibase/string-templates": "^1.2.25", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", @@ -121,4 +121,4 @@ "vite": "^2.1.5" }, "gitHead": "115189f72a850bfb52b65ec61d932531bf327072" -} +} \ No newline at end of file diff --git a/packages/builder/src/analytics/PosthogClient.js b/packages/builder/src/analytics/PosthogClient.js index c1e596358f..f541b69b13 100644 --- a/packages/builder/src/analytics/PosthogClient.js +++ b/packages/builder/src/analytics/PosthogClient.js @@ -1,7 +1,5 @@ import posthog from "posthog-js" import { Events } from "./constants" -import { get } from "svelte/store" -import { admin } from "../stores/portal" export default class PosthogClient { constructor(token) { @@ -11,15 +9,9 @@ export default class PosthogClient { init() { if (!this.token) return - // enable page views in cloud only - let capturePageViews = false - if (get(admin).cloud) { - capturePageViews = true - } - posthog.init(this.token, { autocapture: false, - capture_pageview: capturePageViews, + capture_pageview: false, }) posthog.set_config({ persistence: "cookie" }) diff --git a/packages/builder/src/pages/builder/portal/manage/users/_components/AddUserModal.svelte b/packages/builder/src/pages/builder/portal/manage/users/_components/AddUserModal.svelte index 165d94e0b5..ced45db687 100644 --- a/packages/builder/src/pages/builder/portal/manage/users/_components/AddUserModal.svelte +++ b/packages/builder/src/pages/builder/portal/manage/users/_components/AddUserModal.svelte @@ -48,7 +48,7 @@ if (email) { const res = emailValidator(email) if (res === true) { - delete userData[index].error + userData[index].error = null } else { userData[index].error = res } diff --git a/packages/builder/src/stores/portal/auth.js b/packages/builder/src/stores/portal/auth.js index 9d2d9cf42e..8ac19ab785 100644 --- a/packages/builder/src/stores/portal/auth.js +++ b/packages/builder/src/stores/portal/auth.js @@ -139,11 +139,6 @@ export function createAuthStore() { await setOrganisation(tenantId) }, getSelf: async () => { - // for analytics, we need to make sure the environment has been loaded - // before setting the user - if (!get(admin).loaded) { - await admin.init() - } // We need to catch this locally as we never want this to fail, even // though normally we never want to swallow API errors at the store level. // We're either logged in or we aren't. diff --git a/packages/cli/package.json b/packages/cli/package.json index e1892a28eb..1c025b8ec5 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.2.20-alpha.2", + "version": "1.2.25", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -48,4 +48,4 @@ "eslint": "^7.20.0", "renamer": "^4.0.0" } -} +} \ No newline at end of file diff --git a/packages/client/package.json b/packages/client/package.json index 19155f63a9..c164ebd7b1 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.2.20-alpha.2", + "version": "1.2.25", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "1.2.20-alpha.2", - "@budibase/frontend-core": "1.2.20-alpha.2", - "@budibase/string-templates": "1.2.20-alpha.2", + "@budibase/bbui": "^1.2.25", + "@budibase/frontend-core": "^1.2.25", + "@budibase/string-templates": "^1.2.25", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", @@ -58,4 +58,4 @@ "rollup-plugin-visualizer": "^5.5.4" }, "gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc" -} +} \ No newline at end of file diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index 8f9e20c1b6..2061a71b9e 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,13 +1,13 @@ { "name": "@budibase/frontend-core", - "version": "1.2.20-alpha.2", + "version": "1.2.25", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "1.2.20-alpha.2", + "@budibase/bbui": "^1.2.25", "lodash": "^4.17.21", "svelte": "^3.46.2" } -} +} \ No newline at end of file diff --git a/packages/server/Dockerfile b/packages/server/Dockerfile index 1d15dd501f..bd01b6f9ff 100644 --- a/packages/server/Dockerfile +++ b/packages/server/Dockerfile @@ -11,7 +11,7 @@ ENV PORT=4001 ENV COUCH_DB_URL=https://couchdb.budi.live:5984 ENV BUDIBASE_ENVIRONMENT=PRODUCTION ENV SERVICE=app-service -ENV POSTHOG_TOKEN=phc_fg5I3nDOf6oJVMHSaycEhpPdlgS8rzXG2r6F2IpxCHS +ENV POSTHOG_TOKEN=phc_bIjZL7oh2GEUd2vqvTBH8WvrX0fWTFQMs6H5KQxiUxU # copy files and install dependencies COPY . ./ diff --git a/packages/server/package.json b/packages/server/package.json index af0157a1b2..302de49a2a 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "1.2.20-alpha.2", + "version": "1.2.25", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -77,11 +77,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "1.2.20-alpha.2", - "@budibase/client": "1.2.20-alpha.2", - "@budibase/pro": "1.2.20-alpha.2", - "@budibase/string-templates": "1.2.20-alpha.2", - "@budibase/types": "1.2.20-alpha.2", + "@budibase/backend-core": "^1.2.25", + "@budibase/client": "^1.2.25", + "@budibase/pro": "1.2.25", + "@budibase/string-templates": "^1.2.25", + "@budibase/types": "^1.2.25", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", @@ -196,4 +196,4 @@ "oracledb": "5.3.0" }, "gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc" -} +} \ No newline at end of file diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 1c373904df..63ceb0cc58 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1094,12 +1094,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.2.20-alpha.2": - version "1.2.20-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.20-alpha.2.tgz#18adb18fc4d017df6cf3e04431114a617ac54a34" - integrity sha512-zw8AvxTHoQYUOno53pxXuf0YunuDMscgj6vJ56t1hR+iG24X8Uy3/phh2KwS6kM35huIZVmY25nwWQLs+gOf2g== +"@budibase/backend-core@1.2.25": + version "1.2.25" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.25.tgz#7dcb958cfdd8f73d3755bf0d8470248d4f721360" + integrity sha512-UKA8t8trzTe/jHEpAGlYT2fZIR8SRxDnFvY0wQFGPspvJ0EnoVX6U2sV7kuZy8EtTxpJxShG7Nvt94I0EjiN5w== dependencies: - "@budibase/types" "1.2.20-alpha.2" + "@budibase/types" "^1.2.25" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -1178,13 +1178,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.2.20-alpha.2": - version "1.2.20-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.20-alpha.2.tgz#7b2451fe39d5781424ada144552adc9ccfb97232" - integrity sha512-vy5eOjM4tLFKw6t0Yssnsb1OCX4BwMcFc9KTj/N2lQ/JkNbx4aLUa+NdLd1Dl8qgJ1SaBbFrpgnLUBCz+BxD0Q== +"@budibase/pro@1.2.25": + version "1.2.25" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.25.tgz#9e802bb7b18ba192617b01269f6ebefee0477b05" + integrity sha512-zxL7p61jMNznnAL9EKYg+Ap9ar3K9lbzwyM75uZjgAw2VGCYm7Z1Kftj9EGmEQxzXiZfrWTJcOE8MAhu8nAJRA== dependencies: - "@budibase/backend-core" "1.2.20-alpha.2" - "@budibase/types" "1.2.20-alpha.2" + "@budibase/backend-core" "1.2.25" + "@budibase/types" "1.2.25" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1207,10 +1207,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.2.20-alpha.2": - version "1.2.20-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.20-alpha.2.tgz#28e6c5d9d31c546287dcb1e5eee94fa25ee3fd29" - integrity sha512-UyvqwDAs0ZCpWRJY4qPzovXVQE2SNMbf93qKM10LNyriWeeH1FabXNI0iBKHO9xndbhuZGhudqY5LT+IaEcZfQ== +"@budibase/types@1.2.25", "@budibase/types@^1.2.25": + version "1.2.25" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.25.tgz#9b3738f774592e25f9ac44527e8b2e4aba6b4933" + integrity sha512-ReBvf2aN5/3M1eFcCrqycu68g54CxV2BXiEQTOS2om4u3WRcQMPa69eMjHJ4SltBb5HwfXveDu50Tc+4M8kS6w== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 2ece1f7eaa..aa94aeb9c3 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.2.20-alpha.2", + "version": "1.2.25", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", @@ -46,4 +46,4 @@ "typescript": "^4.5.5" }, "gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc" -} +} \ No newline at end of file diff --git a/packages/types/package.json b/packages/types/package.json index ae049b9e9b..dea2c074b1 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.2.20-alpha.2", + "version": "1.2.25", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -17,4 +17,4 @@ "rimraf": "3.0.2", "typescript": "4.7.3" } -} +} \ No newline at end of file diff --git a/packages/worker/Dockerfile b/packages/worker/Dockerfile index 607352ad92..883a6c299b 100644 --- a/packages/worker/Dockerfile +++ b/packages/worker/Dockerfile @@ -22,6 +22,6 @@ EXPOSE 4001 ENV NODE_ENV=production ENV CLUSTER_MODE=${CLUSTER_MODE} ENV SERVICE=worker-service -ENV POSTHOG_TOKEN=phc_fg5I3nDOf6oJVMHSaycEhpPdlgS8rzXG2r6F2IpxCHS +ENV POSTHOG_TOKEN=phc_bIjZL7oh2GEUd2vqvTBH8WvrX0fWTFQMs6H5KQxiUxU CMD ["./docker_run.sh"] diff --git a/packages/worker/package.json b/packages/worker/package.json index f6e0e4bfe5..e701203bf4 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "1.2.20-alpha.2", + "version": "1.2.25", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -35,10 +35,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "1.2.20-alpha.2", - "@budibase/pro": "1.2.20-alpha.2", - "@budibase/string-templates": "1.2.20-alpha.2", - "@budibase/types": "1.2.20-alpha.2", + "@budibase/backend-core": "^1.2.25", + "@budibase/pro": "1.2.25", + "@budibase/string-templates": "^1.2.25", + "@budibase/types": "^1.2.25", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", @@ -102,4 +102,4 @@ ] }, "gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc" -} +} \ No newline at end of file diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index c716cef773..41e10b85ae 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -291,12 +291,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.2.20-alpha.2": - version "1.2.20-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.20-alpha.2.tgz#18adb18fc4d017df6cf3e04431114a617ac54a34" - integrity sha512-zw8AvxTHoQYUOno53pxXuf0YunuDMscgj6vJ56t1hR+iG24X8Uy3/phh2KwS6kM35huIZVmY25nwWQLs+gOf2g== +"@budibase/backend-core@1.2.25": + version "1.2.25" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.25.tgz#7dcb958cfdd8f73d3755bf0d8470248d4f721360" + integrity sha512-UKA8t8trzTe/jHEpAGlYT2fZIR8SRxDnFvY0wQFGPspvJ0EnoVX6U2sV7kuZy8EtTxpJxShG7Nvt94I0EjiN5w== dependencies: - "@budibase/types" "1.2.20-alpha.2" + "@budibase/types" "^1.2.25" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -325,21 +325,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.2.20-alpha.2": - version "1.2.20-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.20-alpha.2.tgz#7b2451fe39d5781424ada144552adc9ccfb97232" - integrity sha512-vy5eOjM4tLFKw6t0Yssnsb1OCX4BwMcFc9KTj/N2lQ/JkNbx4aLUa+NdLd1Dl8qgJ1SaBbFrpgnLUBCz+BxD0Q== +"@budibase/pro@1.2.25": + version "1.2.25" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.25.tgz#9e802bb7b18ba192617b01269f6ebefee0477b05" + integrity sha512-zxL7p61jMNznnAL9EKYg+Ap9ar3K9lbzwyM75uZjgAw2VGCYm7Z1Kftj9EGmEQxzXiZfrWTJcOE8MAhu8nAJRA== dependencies: - "@budibase/backend-core" "1.2.20-alpha.2" - "@budibase/types" "1.2.20-alpha.2" + "@budibase/backend-core" "1.2.25" + "@budibase/types" "1.2.25" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.2.20-alpha.2": - version "1.2.20-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.20-alpha.2.tgz#28e6c5d9d31c546287dcb1e5eee94fa25ee3fd29" - integrity sha512-UyvqwDAs0ZCpWRJY4qPzovXVQE2SNMbf93qKM10LNyriWeeH1FabXNI0iBKHO9xndbhuZGhudqY5LT+IaEcZfQ== +"@budibase/types@1.2.25", "@budibase/types@^1.2.25": + version "1.2.25" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.25.tgz#9b3738f774592e25f9ac44527e8b2e4aba6b4933" + integrity sha512-ReBvf2aN5/3M1eFcCrqycu68g54CxV2BXiEQTOS2om4u3WRcQMPa69eMjHJ4SltBb5HwfXveDu50Tc+4M8kS6w== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0"