Merge branch 'master' into develop

This commit is contained in:
Rory Powell 2022-08-10 14:36:49 +01:00
commit 3d12db8b2b
37 changed files with 250 additions and 176 deletions

View File

@ -75,7 +75,7 @@ services:
ports:
- "${MAIN_PORT}:10000"
container_name: bbproxy
image: proxy-service
image: budibase/proxy
environment:
- PROXY_RATE_LIMIT_WEBHOOKS_PER_SECOND=10
depends_on:

View File

@ -1,5 +1,5 @@
{
"version": "1.2.28-alpha.0",
"version": "1.2.30",
"npmClient": "yarn",
"packages": [
"packages/*"

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/backend-core",
"version": "1.2.28-alpha.0",
"version": "1.2.30",
"description": "Budibase backend core libraries used in server and worker",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
@ -20,7 +20,7 @@
"test:watch": "jest --watchAll"
},
"dependencies": {
"@budibase/types": "1.2.28-alpha.0",
"@budibase/types": "^1.2.30",
"@techpass/passport-openidconnect": "0.3.2",
"aws-sdk": "2.1030.0",
"bcrypt": "5.0.1",

View File

@ -1,27 +0,0 @@
import { EventEmitter } from "events"
import * as context from "../../context"
import { Identity, Event } from "@budibase/types"
export interface EmittedEvent {
tenantId: string
identity: Identity
appId: string | undefined
properties: any
}
class BBEventEmitter extends EventEmitter {
emitEvent(event: Event, properties: any, identity: Identity) {
const tenantId = context.getTenantId()
const appId = context.getAppId()
const emittedEvent: EmittedEvent = {
tenantId,
identity,
appId,
properties,
}
this.emit(event, emittedEvent)
}
}
export const emitter = new BBEventEmitter()

View File

@ -1 +0,0 @@
export * from "./BBEventEmitter"

View File

@ -2,41 +2,6 @@ import { Event } from "@budibase/types"
import { processors } from "./processors"
import * as identification from "./identification"
import * as backfill from "./backfill"
import { emitter, EmittedEvent } from "./emit"
import * as context from "../context"
import * as logging from "../logging"
const USE_EMITTER: any[] = [
Event.SERVED_BUILDER,
Event.SERVED_APP,
Event.SERVED_APP_PREVIEW,
]
for (let event of USE_EMITTER) {
emitter.on(event, async (props: EmittedEvent) => {
try {
await context.doInTenant(props.tenantId, async () => {
if (props.appId) {
await context.doInAppContext(props.appId, async () => {
await processors.processEvent(
event as Event,
props.identity,
props.properties
)
})
} else {
await processors.processEvent(
event as Event,
props.identity,
props.properties
)
}
})
} catch (e) {
logging.logAlert(`Unable to process async event ${event}`, e)
}
})
}
export const publishEvent = async (
event: Event,
@ -46,11 +11,6 @@ export const publishEvent = async (
// in future this should use async events via a distributed queue.
const identity = await identification.getCurrentIdentity()
if (USE_EMITTER.includes(event)) {
emitter.emitEvent(event, properties, identity)
return
}
const backfilling = await backfill.isBackfillingEvent(event)
// no backfill - send the event and exit
if (!backfilling) {

View File

@ -7,22 +7,26 @@ import {
AppServedEvent,
} from "@budibase/types"
export async function servedBuilder() {
const properties: BuilderServedEvent = {}
export async function servedBuilder(timezone: string) {
const properties: BuilderServedEvent = {
timezone,
}
await publishEvent(Event.SERVED_BUILDER, properties)
}
export async function servedApp(app: App) {
export async function servedApp(app: App, timezone: string) {
const properties: AppServedEvent = {
appVersion: app.version,
timezone,
}
await publishEvent(Event.SERVED_APP, properties)
}
export async function servedAppPreview(app: App) {
export async function servedAppPreview(app: App, timezone: string) {
const properties: AppPreviewServedEvent = {
appId: app.appId,
appVersion: app.version,
timezone,
}
await publishEvent(Event.SERVED_APP_PREVIEW, properties)
}

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/bbui",
"description": "A UI solution used in the different Budibase projects.",
"version": "1.2.28-alpha.0",
"version": "1.2.30",
"license": "MPL-2.0",
"svelte": "src/index.js",
"module": "dist/bbui.es.js",
@ -38,7 +38,7 @@
],
"dependencies": {
"@adobe/spectrum-css-workflow-icons": "^1.2.1",
"@budibase/string-templates": "1.2.28-alpha.0",
"@budibase/string-templates": "^1.2.30",
"@spectrum-css/actionbutton": "^1.0.1",
"@spectrum-css/actiongroup": "^1.0.1",
"@spectrum-css/avatar": "^3.0.2",

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/builder",
"version": "1.2.28-alpha.0",
"version": "1.2.30",
"license": "GPL-3.0",
"private": true,
"scripts": {
@ -69,10 +69,10 @@
}
},
"dependencies": {
"@budibase/bbui": "1.2.28-alpha.0",
"@budibase/client": "1.2.28-alpha.0",
"@budibase/frontend-core": "1.2.28-alpha.0",
"@budibase/string-templates": "1.2.28-alpha.0",
"@budibase/bbui": "^1.2.30",
"@budibase/client": "^1.2.30",
"@budibase/frontend-core": "^1.2.30",
"@budibase/string-templates": "^1.2.30",
"@sentry/browser": "5.19.1",
"@spectrum-css/page": "^3.0.1",
"@spectrum-css/vars": "^3.0.1",

View File

@ -3,6 +3,7 @@
import { datasources, integrations, queries } from "stores/backend"
import BindingBuilder from "components/integration/QueryBindingBuilder.svelte"
import IntegrationQueryEditor from "components/integration/index.svelte"
import { IntegrationTypes } from "constants/backend"
export let parameters
export let bindings = []
@ -11,6 +12,12 @@
$: datasource = $datasources.list.find(
ds => ds._id === parameters.datasourceId
)
// Executequery action just works on PostgreSQL and MongoDB datasources
$: executeQueryDatasources = $datasources.list.filter(
x =>
x.source === IntegrationTypes.POSTGRES ||
x.source === IntegrationTypes.MONGODB
)
function fetchQueryDefinition(query) {
const source = $datasources.list.find(
@ -24,7 +31,7 @@
<Select
label="Datasource"
bind:value={parameters.datasourceId}
options={$datasources.list}
options={executeQueryDatasources}
getOptionLabel={source => source.name}
getOptionValue={source => source._id}
/>

View File

@ -3,6 +3,7 @@
import { admin, auth } from "stores/portal"
import { onMount } from "svelte"
import { CookieUtils, Constants } from "@budibase/frontend-core"
import { API } from "api"
let loaded = false
@ -53,6 +54,9 @@
await auth.setOrganisation(urlTenantId)
}
}
async function analyticsPing() {
await API.analyticsPing({ source: "builder" })
}
onMount(async () => {
try {
@ -73,6 +77,9 @@
// being logged in
}
loaded = true
// lastly
await analyticsPing()
})
$: {

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/cli",
"version": "1.2.28-alpha.0",
"version": "1.2.30",
"description": "Budibase CLI, for developers, self hosting and migrations.",
"main": "src/index.js",
"bin": {

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/client",
"version": "1.2.28-alpha.0",
"version": "1.2.30",
"license": "MPL-2.0",
"module": "dist/budibase-client.js",
"main": "dist/budibase-client.js",
@ -19,9 +19,9 @@
"dev:builder": "rollup -cw"
},
"dependencies": {
"@budibase/bbui": "1.2.28-alpha.0",
"@budibase/frontend-core": "1.2.28-alpha.0",
"@budibase/string-templates": "1.2.28-alpha.0",
"@budibase/bbui": "^1.2.30",
"@budibase/frontend-core": "^1.2.30",
"@budibase/string-templates": "^1.2.30",
"@spectrum-css/button": "^3.0.3",
"@spectrum-css/card": "^3.0.3",
"@spectrum-css/divider": "^1.0.3",

View File

@ -83,6 +83,8 @@
dataLoaded = true
if (get(builderStore).inBuilder) {
builderStore.actions.notifyLoaded()
} else {
builderStore.actions.analyticsPing({ source: "app" })
}
})
</script>

View File

@ -1,4 +1,5 @@
import { writable, get } from "svelte/store"
import { API } from "api"
import { devToolsStore } from "./devTools.js"
const dispatchEvent = (type, data = {}) => {
@ -48,6 +49,13 @@ const createBuilderStore = () => {
notifyLoaded: () => {
dispatchEvent("preview-loaded")
},
analyticsPing: async () => {
try {
await API.analyticsPing({ source: "app" })
} catch (error) {
// Do nothing
}
},
moveComponent: (componentId, destinationComponentId, mode) => {
dispatchEvent("move-component", {
componentId,

View File

@ -1,12 +1,12 @@
{
"name": "@budibase/frontend-core",
"version": "1.2.28-alpha.0",
"version": "1.2.30",
"description": "Budibase frontend core libraries used in builder and client",
"author": "Budibase",
"license": "MPL-2.0",
"svelte": "src/index.js",
"dependencies": {
"@budibase/bbui": "1.2.28-alpha.0",
"@budibase/bbui": "^1.2.30",
"lodash": "^4.17.21",
"svelte": "^3.46.2"
}

View File

@ -7,4 +7,11 @@ export const buildAnalyticsEndpoints = API => ({
url: "/api/bbtel",
})
},
analyticsPing: async ({ source }) => {
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone
return await API.post({
url: "/api/bbtel/ping",
body: { source, timezone },
})
},
})

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/server",
"email": "hi@budibase.com",
"version": "1.2.28-alpha.0",
"version": "1.2.30",
"description": "Budibase Web Server",
"main": "src/index.ts",
"repository": {
@ -77,11 +77,11 @@
"license": "GPL-3.0",
"dependencies": {
"@apidevtools/swagger-parser": "10.0.3",
"@budibase/backend-core": "1.2.28-alpha.0",
"@budibase/client": "1.2.28-alpha.0",
"@budibase/pro": "1.2.28-alpha.0",
"@budibase/string-templates": "1.2.28-alpha.0",
"@budibase/types": "1.2.28-alpha.0",
"@budibase/backend-core": "^1.2.30",
"@budibase/client": "^1.2.30",
"@budibase/pro": "1.2.30",
"@budibase/string-templates": "^1.2.30",
"@budibase/types": "^1.2.30",
"@bull-board/api": "3.7.0",
"@bull-board/koa": "3.9.4",
"@elastic/elasticsearch": "7.10.0",

View File

@ -1,4 +1,7 @@
import { events } from "@budibase/backend-core"
import { AnalyticsPingRequest, PingSource } from "@budibase/types"
import { DocumentTypes, isDevAppID } from "../../db/utils"
import { context } from "@budibase/backend-core"
export const isEnabled = async (ctx: any) => {
const enabled = await events.analytics.enabled()
@ -6,3 +9,27 @@ export const isEnabled = async (ctx: any) => {
enabled,
}
}
export const ping = async (ctx: any) => {
const body = ctx.request.body as AnalyticsPingRequest
switch (body.source) {
case PingSource.APP: {
const db = context.getAppDB({ skip_setup: true })
const appInfo = await db.get(DocumentTypes.APP_METADATA)
let appId = context.getAppId()
if (isDevAppID(appId)) {
await events.serve.servedAppPreview(appInfo, body.timezone)
} else {
await events.serve.servedApp(appInfo, body.timezone)
}
break
}
case PingSource.BUILDER: {
await events.serve.servedBuilder(body.timezone)
break
}
}
ctx.status = 200
}

View File

@ -14,11 +14,10 @@ const env = require("../../../environment")
const { clientLibraryPath } = require("../../../utilities")
const { upload } = require("../../../utilities/fileSystem")
const { attachmentsRelativeURL } = require("../../../utilities")
const { DocumentTypes, isDevAppID } = require("../../../db/utils")
const { DocumentTypes } = require("../../../db/utils")
const { getAppDB, getAppId } = require("@budibase/backend-core/context")
const { setCookie, clearCookie } = require("@budibase/backend-core/utils")
const AWS = require("aws-sdk")
import { events } from "@budibase/backend-core"
const fs = require("fs")
const {
@ -75,9 +74,6 @@ export const toggleBetaUiFeature = async function (ctx: any) {
export const serveBuilder = async function (ctx: any) {
const builderPath = resolve(TOP_LEVEL_PATH, "builder")
await send(ctx, ctx.file, { root: builderPath })
if (ctx.file === "index.html") {
await events.serve.servedBuilder()
}
}
export const uploadFile = async function (ctx: any) {
@ -126,12 +122,6 @@ export const serveApp = async function (ctx: any) {
// just return the app info for jest to assert on
ctx.body = appInfo
}
if (isDevAppID(appInfo.appId)) {
await events.serve.servedAppPreview(appInfo)
} else {
await events.serve.servedApp(appInfo)
}
}
export const serveClientLibrary = async function (ctx: any) {

View File

@ -4,5 +4,6 @@ const controller = require("../controllers/analytics")
const router = Router()
router.get("/api/bbtel", controller.isEnabled)
router.post("/api/bbtel/ping", controller.ping)
module.exports = router

View File

@ -0,0 +1,59 @@
const setup = require("./utilities")
const { events, constants, db } = require("@budibase/backend-core")
describe("/static", () => {
let request = setup.getRequest()
let config = setup.getConfig()
let app
const timezone = "Europe/London"
afterAll(setup.afterAll)
beforeEach(async () => {
app = await config.init()
jest.clearAllMocks()
})
describe("/ping", () => {
it("should ping from builder", async () => {
await request
.post("/api/bbtel/ping")
.send({source: "builder", timezone})
.set(config.defaultHeaders())
.expect(200)
expect(events.serve.servedBuilder).toBeCalledTimes(1)
expect(events.serve.servedBuilder).toBeCalledWith(timezone)
expect(events.serve.servedApp).not.toBeCalled()
expect(events.serve.servedAppPreview).not.toBeCalled()
})
it("should ping from app preview", async () => {
await request
.post("/api/bbtel/ping")
.send({source: "app", timezone})
.set(config.defaultHeaders())
.expect(200)
expect(events.serve.servedAppPreview).toBeCalledTimes(1)
expect(events.serve.servedAppPreview).toBeCalledWith(config.getApp(), timezone)
expect(events.serve.servedApp).not.toBeCalled()
})
it("should ping from app", async () => {
const headers = config.defaultHeaders()
headers[constants.Headers.APP_ID] = config.prodAppId
await request
.post("/api/bbtel/ping")
.send({source: "app", timezone})
.set(headers)
.expect(200)
expect(events.serve.servedApp).toBeCalledTimes(1)
expect(events.serve.servedApp).toBeCalledWith(config.getProdApp(), timezone)
expect(events.serve.servedAppPreview).not.toBeCalled()
})
})
})

View File

@ -36,7 +36,6 @@ describe("/static", () => {
.expect(200)
expect(res.text).toContain("<title>Budibase</title>")
expect(events.serve.servedBuilder).toBeCalledTimes(1)
})
})
@ -56,9 +55,6 @@ describe("/static", () => {
.expect(200)
expect(res.body.appId).toBe(config.prodAppId)
expect(events.serve.servedApp).toBeCalledTimes(1)
expect(events.serve.servedApp).toBeCalledWith(res.body)
expect(events.serve.servedAppPreview).not.toBeCalled()
})
it("should serve the app by url", async () => {
@ -71,9 +67,6 @@ describe("/static", () => {
.expect(200)
expect(res.body.appId).toBe(config.prodAppId)
expect(events.serve.servedApp).toBeCalledTimes(1)
expect(events.serve.servedApp).toBeCalledWith(res.body)
expect(events.serve.servedAppPreview).not.toBeCalled()
})
it("should serve the app preview by id", async () => {
@ -83,9 +76,6 @@ describe("/static", () => {
.expect(200)
expect(res.body.appId).toBe(config.appId)
expect(events.serve.servedAppPreview).toBeCalledTimes(1)
expect(events.serve.servedAppPreview).toBeCalledWith(res.body)
expect(events.serve.servedApp).not.toBeCalled()
})
})

View File

@ -64,6 +64,11 @@ module AirtableModule {
customisable: true,
fields: {
id: {
display: "Record ID",
type: DatasourceFieldTypes.STRING,
required: true,
},
table: {
type: DatasourceFieldTypes.STRING,
required: true,
},

View File

@ -48,7 +48,7 @@ describe("Airtable Integration", () => {
it("calls the update method with the correct params", async () => {
const response = await config.integration.update({
table: "test",
table: "table",
id: "123",
json: {
name: "test"

View File

@ -25,6 +25,7 @@ const newid = require("../../db/newid")
const context = require("@budibase/backend-core/context")
const { generateDevInfoID, SEPARATOR } = require("@budibase/backend-core/db")
const { encrypt } = require("@budibase/backend-core/encryption")
const { DocumentTypes } = require("../../db/utils")
const GLOBAL_USER_ID = "us_uuid1"
const EMAIL = "babs@babs.com"
@ -53,6 +54,10 @@ class TestConfiguration {
return this.app
}
getProdApp() {
return this.prodApp
}
getAppId() {
return this.appId
}
@ -106,19 +111,11 @@ class TestConfiguration {
// UTILS
async _req(body, params, controlFunc, opts = { prodApp: false }) {
async _req(body, params, controlFunc) {
// create a fake request ctx
const request = {}
// set the app id
let appId
if (opts.prodApp) {
appId = this.prodAppId
} else {
appId = this.appId
}
const appId = this.appId
request.appId = appId
// fake cookies, we don't need them
request.cookies = { set: () => {}, get: () => {} }
request.config = { jwtSecret: env.JWT_SECRET }
@ -344,14 +341,10 @@ class TestConfiguration {
await this._req(null, null, controllers.deploy.deployApp)
const prodAppId = this.getAppId().replace("_dev", "")
this.prodAppId = prodAppId
return context.doInAppContext(prodAppId, async () => {
const appPackage = await this._req(
null,
{ appId: prodAppId },
controllers.app.fetchAppPackage,
{ prodApp: true }
)
return appPackage.application
const db = context.getProdAppDB()
return await db.get(DocumentTypes.APP_METADATA)
})
}

View File

@ -1094,19 +1094,18 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
"@budibase/backend-core@1.2.28-alpha.0":
version "1.2.28-alpha.0"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.28-alpha.0.tgz#f4253825724327e6552000f8c7575134bfaa05cd"
integrity sha512-ueu+NZgkiKrX49E0Zy2rrNE4NLe2HAyl3VolTrZfVxOzu1IvtQ/wJBcGDG84VvSliP+0bOOVO9TiGMY3bvZ/Hw==
"@budibase/backend-core@1.2.29":
version "1.2.29"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.29.tgz#b95a5969209d474cb64f8f2c1d2d1e92de7a6062"
integrity sha512-jexTSQby2ClPe3oXyGr/msSHc6aYC5Ptl4SSg5PTFUhNsS7O1uk3Te2cuTWHCz1FVjv0X6iJiLrSD+Fw94ymGg==
dependencies:
"@budibase/types" "1.2.28-alpha.0"
"@budibase/types" "^1.2.29"
"@techpass/passport-openidconnect" "0.3.2"
aws-sdk "2.1030.0"
bcrypt "5.0.1"
dotenv "16.0.1"
emitter-listener "1.1.2"
ioredis "4.28.0"
joi "17.6.0"
jsonwebtoken "8.5.1"
koa-passport "4.1.4"
lodash "4.17.21"
@ -1178,13 +1177,13 @@
svelte-flatpickr "^3.2.3"
svelte-portal "^1.0.0"
"@budibase/pro@1.2.28-alpha.0":
version "1.2.28-alpha.0"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.28-alpha.0.tgz#f372dcbac55634a1f0e7ff8125ffb0a0aeea086c"
integrity sha512-YxElWs5gwpe1JmHgpB52YeRkyeWPoBiUIt8EshyW90EFVUXP7FOy3LsjvKMNJXAZs1mI4ttkZfuWva8HjrGaKA==
"@budibase/pro@1.2.29":
version "1.2.29"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.29.tgz#204efed7a6519173227d7c8172edc24622a74b68"
integrity sha512-Ymwvg6iPaKBC59MnOrxKnn9G4hM8HYVsCElcw98JiUC/hs8VpFIgq2L3Z6iZV9KMQ3ipIvdUMvWEW6b2NqCgCA==
dependencies:
"@budibase/backend-core" "1.2.28-alpha.0"
"@budibase/types" "1.2.28-alpha.0"
"@budibase/backend-core" "1.2.29"
"@budibase/types" "1.2.29"
"@koa/router" "8.0.8"
joi "17.6.0"
node-fetch "^2.6.1"
@ -1207,10 +1206,10 @@
svelte-apexcharts "^1.0.2"
svelte-flatpickr "^3.1.0"
"@budibase/types@1.2.28-alpha.0":
version "1.2.28-alpha.0"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.28-alpha.0.tgz#61668b7d5d9b1f85c09d658deed87ec3dc28e290"
integrity sha512-tYhdUl1+dEtG8h2xoGUl0NXZC5BZYQIhgPK7JkYrqFHuNx+1f6EoHPQ9MMb/WyOxIDZv4gY7QJLg0KeVflofbw==
"@budibase/types@1.2.29", "@budibase/types@^1.2.29":
version "1.2.29"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.29.tgz#9e47e360bd9979f6e3ed5539cc31111484aaf203"
integrity sha512-Em5MOxBokJmwWGby8MOXyaT4hAZQBmM6r11O+HNpI/Zzq60GsmVDgtZPyZkumDRxTwI/n8bqugeMvxsxkd9uDw==
"@bull-board/api@3.7.0":
version "3.7.0"
@ -1344,16 +1343,33 @@
protobufjs "^6.11.3"
yargs "^16.2.0"
"@hapi/address@^4.1.0":
version "4.1.0"
resolved "https://registry.yarnpkg.com/@hapi/address/-/address-4.1.0.tgz#d60c5c0d930e77456fdcde2598e77302e2955e1d"
integrity sha512-SkszZf13HVgGmChdHo/PxchnSaCJ6cetVqLzyciudzZRT0jcOouIF/Q93mgjw8cce+D+4F4C1Z/WrfFN+O3VHQ==
dependencies:
"@hapi/hoek" "^9.0.0"
"@hapi/bourne@^2.0.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@hapi/bourne/-/bourne-2.1.0.tgz#66aff77094dc3080bd5df44ec63881f2676eb020"
integrity sha512-i1BpaNDVLJdRBEKeJWkVO6tYX6DMFBuwMhSuWqLsY4ufeTKGVuV5rBsUhxPayXqnnWHgXUAmWK16H/ykO5Wj4Q==
"@hapi/formula@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@hapi/formula/-/formula-2.0.0.tgz#edade0619ed58c8e4f164f233cda70211e787128"
integrity sha512-V87P8fv7PI0LH7LiVi8Lkf3x+KCO7pQozXRssAHNXXL9L1K+uyu4XypLXwxqVDKgyQai6qj3/KteNlrqDx4W5A==
"@hapi/hoek@^9.0.0":
version "9.3.0"
resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb"
integrity sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==
"@hapi/pinpoint@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@hapi/pinpoint/-/pinpoint-2.0.0.tgz#805b40d4dbec04fc116a73089494e00f073de8df"
integrity sha512-vzXR5MY7n4XeIvLpfl3HtE3coZYO4raKXW766R6DZw/6aLqR26iuZ109K7a0NtF2Db0jxqh7xz2AxkUwpUFybw==
"@hapi/topo@^5.0.0":
version "5.1.0"
resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-5.1.0.tgz#dc448e332c6c6e37a4dc02fd84ba8d44b9afb012"
@ -8657,6 +8673,17 @@ jmespath@0.16.0:
resolved "https://registry.yarnpkg.com/jmespath/-/jmespath-0.16.0.tgz#b15b0a85dfd4d930d43e69ed605943c802785076"
integrity sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==
joi@17.2.1:
version "17.2.1"
resolved "https://registry.yarnpkg.com/joi/-/joi-17.2.1.tgz#e5140fdf07e8fecf9bc977c2832d1bdb1e3f2a0a"
integrity sha512-YT3/4Ln+5YRpacdmfEfrrKh50/kkgX3LgBltjqnlMPIYiZ4hxXZuVJcxmsvxsdeHg9soZfE3qXxHC2tMpCCBOA==
dependencies:
"@hapi/address" "^4.1.0"
"@hapi/formula" "^2.0.0"
"@hapi/hoek" "^9.0.0"
"@hapi/pinpoint" "^2.0.0"
"@hapi/topo" "^5.0.0"
joi@17.6.0:
version "17.6.0"
resolved "https://registry.yarnpkg.com/joi/-/joi-17.6.0.tgz#0bb54f2f006c09a96e75ce687957bd04290054b2"

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/string-templates",
"version": "1.2.28-alpha.0",
"version": "1.2.30",
"description": "Handlebars wrapper for Budibase templating.",
"main": "src/index.cjs",
"module": "dist/bundle.mjs",

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/types",
"version": "1.2.28-alpha.0",
"version": "1.2.30",
"description": "Budibase types",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@ -0,0 +1 @@
export * from "./web"

View File

@ -0,0 +1,9 @@
export enum PingSource {
BUILDER = "builder",
APP = "app",
}
export interface AnalyticsPingRequest {
source: PingSource
timezone: string
}

View File

@ -0,0 +1 @@
export * from "./analytics"

View File

@ -2,3 +2,4 @@ export * from "./documents"
export * from "./sdk/events"
export * from "./sdk/licensing"
export * from "./sdk"
export * from "./api"

View File

@ -1,11 +1,15 @@
import { BaseEvent } from "./event"
export interface BuilderServedEvent extends BaseEvent {}
export interface BuilderServedEvent extends BaseEvent {
timezone: string
}
export interface AppServedEvent extends BaseEvent {
appVersion: string
timezone: string
}
export interface AppPreviewServedEvent extends BaseEvent {
appVersion: string
timezone: string
}

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/worker",
"email": "hi@budibase.com",
"version": "1.2.28-alpha.0",
"version": "1.2.30",
"description": "Budibase background service",
"main": "src/index.ts",
"repository": {
@ -35,10 +35,10 @@
"author": "Budibase",
"license": "GPL-3.0",
"dependencies": {
"@budibase/backend-core": "1.2.28-alpha.0",
"@budibase/pro": "1.2.28-alpha.0",
"@budibase/string-templates": "1.2.28-alpha.0",
"@budibase/types": "1.2.28-alpha.0",
"@budibase/backend-core": "^1.2.30",
"@budibase/pro": "1.2.30",
"@budibase/string-templates": "^1.2.30",
"@budibase/types": "^1.2.30",
"@koa/router": "8.0.8",
"@sentry/node": "6.17.7",
"@techpass/passport-openidconnect": "0.3.2",

View File

@ -291,19 +291,18 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
"@budibase/backend-core@1.2.28-alpha.0":
version "1.2.28-alpha.0"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.28-alpha.0.tgz#f4253825724327e6552000f8c7575134bfaa05cd"
integrity sha512-ueu+NZgkiKrX49E0Zy2rrNE4NLe2HAyl3VolTrZfVxOzu1IvtQ/wJBcGDG84VvSliP+0bOOVO9TiGMY3bvZ/Hw==
"@budibase/backend-core@1.2.29":
version "1.2.29"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.29.tgz#b95a5969209d474cb64f8f2c1d2d1e92de7a6062"
integrity sha512-jexTSQby2ClPe3oXyGr/msSHc6aYC5Ptl4SSg5PTFUhNsS7O1uk3Te2cuTWHCz1FVjv0X6iJiLrSD+Fw94ymGg==
dependencies:
"@budibase/types" "1.2.28-alpha.0"
"@budibase/types" "^1.2.29"
"@techpass/passport-openidconnect" "0.3.2"
aws-sdk "2.1030.0"
bcrypt "5.0.1"
dotenv "16.0.1"
emitter-listener "1.1.2"
ioredis "4.28.0"
joi "17.6.0"
jsonwebtoken "8.5.1"
koa-passport "4.1.4"
lodash "4.17.21"
@ -325,21 +324,21 @@
uuid "8.3.2"
zlib "1.0.5"
"@budibase/pro@1.2.28-alpha.0":
version "1.2.28-alpha.0"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.28-alpha.0.tgz#f372dcbac55634a1f0e7ff8125ffb0a0aeea086c"
integrity sha512-YxElWs5gwpe1JmHgpB52YeRkyeWPoBiUIt8EshyW90EFVUXP7FOy3LsjvKMNJXAZs1mI4ttkZfuWva8HjrGaKA==
"@budibase/pro@1.2.29":
version "1.2.29"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.29.tgz#204efed7a6519173227d7c8172edc24622a74b68"
integrity sha512-Ymwvg6iPaKBC59MnOrxKnn9G4hM8HYVsCElcw98JiUC/hs8VpFIgq2L3Z6iZV9KMQ3ipIvdUMvWEW6b2NqCgCA==
dependencies:
"@budibase/backend-core" "1.2.28-alpha.0"
"@budibase/types" "1.2.28-alpha.0"
"@budibase/backend-core" "1.2.29"
"@budibase/types" "1.2.29"
"@koa/router" "8.0.8"
joi "17.6.0"
node-fetch "^2.6.1"
"@budibase/types@1.2.28-alpha.0":
version "1.2.28-alpha.0"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.28-alpha.0.tgz#61668b7d5d9b1f85c09d658deed87ec3dc28e290"
integrity sha512-tYhdUl1+dEtG8h2xoGUl0NXZC5BZYQIhgPK7JkYrqFHuNx+1f6EoHPQ9MMb/WyOxIDZv4gY7QJLg0KeVflofbw==
"@budibase/types@1.2.29", "@budibase/types@^1.2.29":
version "1.2.29"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.29.tgz#9e47e360bd9979f6e3ed5539cc31111484aaf203"
integrity sha512-Em5MOxBokJmwWGby8MOXyaT4hAZQBmM6r11O+HNpI/Zzq60GsmVDgtZPyZkumDRxTwI/n8bqugeMvxsxkd9uDw==
"@cspotcode/source-map-consumer@0.8.0":
version "0.8.0"