diff --git a/hosting/proxy/nginx.prod.conf b/hosting/proxy/nginx.prod.conf index 8954106feb..dce1a71918 100644 --- a/hosting/proxy/nginx.prod.conf +++ b/hosting/proxy/nginx.prod.conf @@ -222,9 +222,9 @@ http { rewrite ^/files/signed/(.*)$ /$1 break; } - client_header_timeout 60; - client_body_timeout 60; - keepalive_timeout 60; + client_header_timeout 120; + client_body_timeout 120; + keepalive_timeout 120; # gzip gzip on; diff --git a/lerna.json b/lerna.json index 4b2ef30117..29b136397f 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.5.6-alpha.42", + "version": "2.5.10-alpha.0", "npmClient": "yarn", "packages": [ "packages/backend-core", diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index fe23105596..dfcacdfff2 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.5.6-alpha.42", + "version": "2.5.10-alpha.0", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -22,7 +22,7 @@ "dependencies": { "@budibase/nano": "10.1.2", "@budibase/pouchdb-replication-stream": "1.2.10", - "@budibase/types": "2.5.6-alpha.42", + "@budibase/types": "2.5.10-alpha.0", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-cloudfront-sign": "2.2.0", diff --git a/packages/backend-core/src/cache/writethrough.ts b/packages/backend-core/src/cache/writethrough.ts index a3b1ecc08d..e64c116663 100644 --- a/packages/backend-core/src/cache/writethrough.ts +++ b/packages/backend-core/src/cache/writethrough.ts @@ -47,7 +47,7 @@ async function put( type: LockType.TRY_ONCE, name: LockName.PERSIST_WRITETHROUGH, resource: key, - ttl: 1000, + ttl: 15000, }, async () => { const writeDb = async (toWrite: any) => { @@ -71,6 +71,7 @@ async function put( } } ) + if (!lockResponse.executed) { logWarn(`Ignoring redlock conflict in write-through cache`) } diff --git a/packages/backend-core/src/db/lucene.ts b/packages/backend-core/src/db/lucene.ts index 5d21d4f4e4..4660be81aa 100644 --- a/packages/backend-core/src/db/lucene.ts +++ b/packages/backend-core/src/db/lucene.ts @@ -434,7 +434,7 @@ export class QueryBuilder { }) } if (this.#query.empty) { - build(this.#query.empty, (key: string) => `!${key}:["" TO *]`) + build(this.#query.empty, (key: string) => `(*:* -${key}:["" TO *])`) } if (this.#query.notEmpty) { build(this.#query.notEmpty, (key: string) => `${key}:["" TO *]`) diff --git a/packages/backend-core/src/environment.ts b/packages/backend-core/src/environment.ts index 0d413b8fa9..1bea1f3692 100644 --- a/packages/backend-core/src/environment.ts +++ b/packages/backend-core/src/environment.ts @@ -154,6 +154,7 @@ const environment = { ? process.env.ENABLE_SSO_MAINTENANCE_MODE : false, VERSION: findVersion(), + DISABLE_PINO_LOGGER: process.env.DISABLE_PINO_LOGGER, _set(key: any, value: any) { process.env[key] = value // @ts-ignore diff --git a/packages/backend-core/src/events/publishers/license.ts b/packages/backend-core/src/events/publishers/license.ts index d1ff4d7609..094cf7fac1 100644 --- a/packages/backend-core/src/events/publishers/license.ts +++ b/packages/backend-core/src/events/publishers/license.ts @@ -15,17 +15,18 @@ import { async function planChanged( account: Account, - from: PlanType, - to: PlanType, - quantity: number | undefined, - duration: PriceDuration | undefined + opts: { + from: PlanType + to: PlanType + fromQuantity: number | undefined + toQuantity: number | undefined + fromDuration: PriceDuration | undefined + toDuration: PriceDuration | undefined + } ) { const properties: LicensePlanChangedEvent = { accountId: account.accountId, - to, - from, - quantity, - duration, + ...opts, } await publishEvent(Event.LICENSE_PLAN_CHANGED, properties) } diff --git a/packages/backend-core/src/logging/index.ts b/packages/backend-core/src/logging/index.ts index b229f47dea..b87062c478 100644 --- a/packages/backend-core/src/logging/index.ts +++ b/packages/backend-core/src/logging/index.ts @@ -1,5 +1,5 @@ export * as correlation from "./correlation/correlation" -export { logger, disableLogger } from "./pino/logger" +export { logger } from "./pino/logger" export * from "./alerts" // turn off or on context logging i.e. tenantId, appId etc diff --git a/packages/backend-core/src/logging/pino/logger.ts b/packages/backend-core/src/logging/pino/logger.ts index dd4b505d30..276377eb00 100644 --- a/packages/backend-core/src/logging/pino/logger.ts +++ b/packages/backend-core/src/logging/pino/logger.ts @@ -5,184 +5,169 @@ import * as correlation from "../correlation" import { IdentityType } from "@budibase/types" import { LOG_CONTEXT } from "../index" -// CORE LOGGERS - for disabling - -const BUILT_INS = { - log: console.log, - error: console.error, - info: console.info, - warn: console.warn, - trace: console.trace, - debug: console.debug, -} - // LOGGER -const pinoOptions: LoggerOptions = { - level: env.LOG_LEVEL, - formatters: { - level: label => { - return { level: label.toUpperCase() } - }, - bindings: () => { - return {} - }, - }, - timestamp: () => `,"timestamp":"${new Date(Date.now()).toISOString()}"`, -} - -if (env.isDev()) { - pinoOptions.transport = { - target: "pino-pretty", - options: { - singleLine: true, +let pinoInstance: pino.Logger | undefined +if (!env.DISABLE_PINO_LOGGER) { + const pinoOptions: LoggerOptions = { + level: env.LOG_LEVEL, + formatters: { + level: label => { + return { level: label.toUpperCase() } + }, + bindings: () => { + return {} + }, }, + timestamp: () => `,"timestamp":"${new Date(Date.now()).toISOString()}"`, } -} -export const logger = pino(pinoOptions) - -export function disableLogger() { - console.log = BUILT_INS.log - console.error = BUILT_INS.error - console.info = BUILT_INS.info - console.warn = BUILT_INS.warn - console.trace = BUILT_INS.trace - console.debug = BUILT_INS.debug -} - -// CONSOLE OVERRIDES - -interface MergingObject { - objects?: any[] - tenantId?: string - appId?: string - identityId?: string - identityType?: IdentityType - correlationId?: string - err?: Error -} - -function isPlainObject(obj: any) { - return typeof obj === "object" && obj !== null && !(obj instanceof Error) -} - -function isError(obj: any) { - return obj instanceof Error -} - -function isMessage(obj: any) { - return typeof obj === "string" -} - -/** - * Backwards compatibility between console logging statements - * and pino logging requirements. - */ -function getLogParams(args: any[]): [MergingObject, string] { - let error = undefined - let objects: any[] = [] - let message = "" - - args.forEach(arg => { - if (isMessage(arg)) { - message = `${message} ${arg}`.trimStart() - } - if (isPlainObject(arg)) { - objects.push(arg) - } - if (isError(arg)) { - error = arg - } - }) - - const identity = getIdentity() - - let contextObject = {} - - if (LOG_CONTEXT) { - contextObject = { - tenantId: getTenantId(), - appId: getAppId(), - identityId: identity?._id, - identityType: identity?.type, - correlationId: correlation.getId(), + if (env.isDev()) { + pinoOptions.transport = { + target: "pino-pretty", + options: { + singleLine: true, + }, } } - const mergingObject = { - objects: objects.length ? objects : undefined, - err: error, - ...contextObject, + pinoInstance = pino(pinoOptions) + + // CONSOLE OVERRIDES + + interface MergingObject { + objects?: any[] + tenantId?: string + appId?: string + identityId?: string + identityType?: IdentityType + correlationId?: string + err?: Error } - return [mergingObject, message] -} - -console.log = (...arg: any[]) => { - const [obj, msg] = getLogParams(arg) - logger.info(obj, msg) -} -console.info = (...arg: any[]) => { - const [obj, msg] = getLogParams(arg) - logger.info(obj, msg) -} -console.warn = (...arg: any[]) => { - const [obj, msg] = getLogParams(arg) - logger.warn(obj, msg) -} -console.error = (...arg: any[]) => { - const [obj, msg] = getLogParams(arg) - logger.error(obj, msg) -} - -/** - * custom trace impl - this resembles the node trace behaviour rather - * than traditional trace logging - * @param arg - */ -console.trace = (...arg: any[]) => { - const [obj, msg] = getLogParams(arg) - if (!obj.err) { - // to get stack trace - obj.err = new Error() + function isPlainObject(obj: any) { + return typeof obj === "object" && obj !== null && !(obj instanceof Error) } - logger.trace(obj, msg) -} -console.debug = (...arg: any) => { - const [obj, msg] = getLogParams(arg) - logger.debug(obj, msg) -} - -// CONTEXT - -const getTenantId = () => { - let tenantId - try { - tenantId = context.getTenantId() - } catch (e: any) { - // do nothing + function isError(obj: any) { + return obj instanceof Error + } + + function isMessage(obj: any) { + return typeof obj === "string" + } + + /** + * Backwards compatibility between console logging statements + * and pino logging requirements. + */ + function getLogParams(args: any[]): [MergingObject, string] { + let error = undefined + let objects: any[] = [] + let message = "" + + args.forEach(arg => { + if (isMessage(arg)) { + message = `${message} ${arg}`.trimStart() + } + if (isPlainObject(arg)) { + objects.push(arg) + } + if (isError(arg)) { + error = arg + } + }) + + const identity = getIdentity() + + let contextObject = {} + + if (LOG_CONTEXT) { + contextObject = { + tenantId: getTenantId(), + appId: getAppId(), + identityId: identity?._id, + identityType: identity?.type, + correlationId: correlation.getId(), + } + } + + const mergingObject = { + objects: objects.length ? objects : undefined, + err: error, + ...contextObject, + } + + return [mergingObject, message] + } + + console.log = (...arg: any[]) => { + const [obj, msg] = getLogParams(arg) + pinoInstance?.info(obj, msg) + } + console.info = (...arg: any[]) => { + const [obj, msg] = getLogParams(arg) + pinoInstance?.info(obj, msg) + } + console.warn = (...arg: any[]) => { + const [obj, msg] = getLogParams(arg) + pinoInstance?.warn(obj, msg) + } + console.error = (...arg: any[]) => { + const [obj, msg] = getLogParams(arg) + pinoInstance?.error(obj, msg) + } + + /** + * custom trace impl - this resembles the node trace behaviour rather + * than traditional trace logging + * @param arg + */ + console.trace = (...arg: any[]) => { + const [obj, msg] = getLogParams(arg) + if (!obj.err) { + // to get stack trace + obj.err = new Error() + } + pinoInstance?.trace(obj, msg) + } + + console.debug = (...arg: any) => { + const [obj, msg] = getLogParams(arg) + pinoInstance?.debug(obj, msg) + } + + // CONTEXT + + const getTenantId = () => { + let tenantId + try { + tenantId = context.getTenantId() + } catch (e: any) { + // do nothing + } + return tenantId + } + + const getAppId = () => { + let appId + try { + appId = context.getAppId() + } catch (e) { + // do nothing + } + return appId + } + + const getIdentity = () => { + let identity + try { + identity = context.getIdentity() + } catch (e) { + // do nothing + } + return identity } - return tenantId } -const getAppId = () => { - let appId - try { - appId = context.getAppId() - } catch (e) { - // do nothing - } - return appId -} - -const getIdentity = () => { - let identity - try { - identity = context.getIdentity() - } catch (e) { - // do nothing - } - return identity -} +export const logger = pinoInstance diff --git a/packages/backend-core/tests/core/utilities/structures/licenses.ts b/packages/backend-core/tests/core/utilities/structures/licenses.ts index 810f31cf4f..22e73f2871 100644 --- a/packages/backend-core/tests/core/utilities/structures/licenses.ts +++ b/packages/backend-core/tests/core/utilities/structures/licenses.ts @@ -29,7 +29,7 @@ export const plan = (type: PlanType = PlanType.FREE): PurchasedPlan => { type, usesInvoicing: false, model: PlanModel.PER_USER, - price: price(), + price: type !== PlanType.FREE ? price() : undefined, } } diff --git a/packages/bbui/package.json b/packages/bbui/package.json index ff82bbc2c4..6f50176780 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.5.6-alpha.42", + "version": "2.5.10-alpha.0", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,8 +38,8 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "1.2.1", - "@budibase/shared-core": "2.5.6-alpha.42", - "@budibase/string-templates": "2.5.6-alpha.42", + "@budibase/shared-core": "2.5.10-alpha.0", + "@budibase/string-templates": "2.5.10-alpha.0", "@spectrum-css/accordion": "3.0.24", "@spectrum-css/actionbutton": "1.0.1", "@spectrum-css/actiongroup": "1.0.1", diff --git a/packages/builder/package.json b/packages/builder/package.json index 0015174bcf..25adb35aaf 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.5.6-alpha.42", + "version": "2.5.10-alpha.0", "license": "GPL-3.0", "private": true, "scripts": { @@ -58,10 +58,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.5.6-alpha.42", - "@budibase/frontend-core": "2.5.6-alpha.42", - "@budibase/shared-core": "2.5.6-alpha.42", - "@budibase/string-templates": "2.5.6-alpha.42", + "@budibase/bbui": "2.5.10-alpha.0", + "@budibase/frontend-core": "2.5.10-alpha.0", + "@budibase/shared-core": "2.5.10-alpha.0", + "@budibase/string-templates": "2.5.10-alpha.0", "@fortawesome/fontawesome-svg-core": "^6.2.1", "@fortawesome/free-brands-svg-icons": "^6.2.1", "@fortawesome/free-solid-svg-icons": "^6.2.1", diff --git a/packages/builder/src/components/backend/TableNavigator/utils.js b/packages/builder/src/components/backend/TableNavigator/utils.js index 658f037912..b7e46042be 100644 --- a/packages/builder/src/components/backend/TableNavigator/utils.js +++ b/packages/builder/src/components/backend/TableNavigator/utils.js @@ -42,16 +42,7 @@ export const parseFile = e => { reader.addEventListener("load", function (e) { const fileData = e.target.result - - if (file.type === "text/csv") { - API.csvToJson(fileData) - .then(rows => { - resolveRows(rows) - }) - .catch(() => { - reject("can't convert csv to json") - }) - } else if (file.type === "application/json") { + if (file.type?.includes("json")) { const parsedFileData = JSON.parse(fileData) if (Array.isArray(parsedFileData)) { @@ -62,7 +53,13 @@ export const parseFile = e => { reject("invalid json format") } } else { - reject("invalid file type") + API.csvToJson(fileData) + .then(rows => { + resolveRows(rows) + }) + .catch(() => { + reject("cannot parse csv") + }) } }) diff --git a/packages/builder/src/stores/portal/users.js b/packages/builder/src/stores/portal/users.js index 898d47c0e2..e522cd7958 100644 --- a/packages/builder/src/stores/portal/users.js +++ b/packages/builder/src/stores/portal/users.js @@ -41,7 +41,7 @@ export function createUsersStore() { inviteCode, password, firstName, - lastName, + lastName: !lastName?.trim() ? undefined : lastName, }) } diff --git a/packages/cli/package.json b/packages/cli/package.json index 87f8885baa..6037da7e4d 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.5.6-alpha.42", + "version": "2.5.10-alpha.0", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "dist/index.js", "bin": { @@ -29,14 +29,14 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "2.5.6-alpha.42", - "@budibase/string-templates": "2.5.6-alpha.42", - "@budibase/types": "2.5.6-alpha.42", + "@budibase/backend-core": "2.5.10-alpha.0", + "@budibase/string-templates": "2.5.10-alpha.0", + "@budibase/types": "2.5.10-alpha.0", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", "commander": "7.1.0", - "docker-compose": "0.23.12", + "docker-compose": "0.24.0", "dotenv": "16.0.1", "download": "8.0.0", "find-free-port": "^2.0.0", diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index cca2c91862..8082d3f0a0 100755 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -1,6 +1,5 @@ #!/usr/bin/env node -import { logging } from "@budibase/backend-core" -logging.disableLogger() +process.env.DISABLE_PINO_LOGGER = "1" import "./prebuilds" import "./environment" import { env } from "@budibase/backend-core" diff --git a/packages/client/package.json b/packages/client/package.json index 7ff0ddae9c..e8770c5cb1 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.5.6-alpha.42", + "version": "2.5.10-alpha.0", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,11 +19,11 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "2.5.6-alpha.42", - "@budibase/frontend-core": "2.5.6-alpha.42", - "@budibase/shared-core": "2.5.6-alpha.42", - "@budibase/string-templates": "2.5.6-alpha.42", - "@budibase/types": "2.5.6-alpha.42", + "@budibase/bbui": "2.5.10-alpha.0", + "@budibase/frontend-core": "2.5.10-alpha.0", + "@budibase/shared-core": "2.5.10-alpha.0", + "@budibase/string-templates": "2.5.10-alpha.0", + "@budibase/types": "2.5.10-alpha.0", "@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 c0b60cb091..680756aa38 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,13 +1,13 @@ { "name": "@budibase/frontend-core", - "version": "2.5.6-alpha.42", + "version": "2.5.10-alpha.0", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.5.6-alpha.42", - "@budibase/shared-core": "2.5.6-alpha.42", + "@budibase/bbui": "2.5.10-alpha.0", + "@budibase/shared-core": "2.5.10-alpha.0", "dayjs": "^1.11.7", "lodash": "^4.17.21", "socket.io-client": "^4.6.1", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 13cc20f9e9..6730ad8e76 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.5.6-alpha.42", + "version": "2.5.10-alpha.0", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index d7c0bf4851..45f2c9cbd7 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.5.6-alpha.42", + "version": "2.5.10-alpha.0", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -46,12 +46,12 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "2.5.6-alpha.42", - "@budibase/client": "2.5.6-alpha.42", - "@budibase/pro": "2.5.6-alpha.42", - "@budibase/shared-core": "2.5.6-alpha.42", - "@budibase/string-templates": "2.5.6-alpha.42", - "@budibase/types": "2.5.6-alpha.42", + "@budibase/backend-core": "2.5.10-alpha.0", + "@budibase/client": "2.5.10-alpha.0", + "@budibase/pro": "2.5.10-alpha.0", + "@budibase/shared-core": "2.5.10-alpha.0", + "@budibase/string-templates": "2.5.10-alpha.0", + "@budibase/types": "2.5.10-alpha.0", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/server/src/api/routes/tests/internalSearch.spec.js b/packages/server/src/api/routes/tests/internalSearch.spec.js index 6ad333b87a..8d57d2ee1c 100644 --- a/packages/server/src/api/routes/tests/internalSearch.spec.js +++ b/packages/server/src/api/routes/tests/internalSearch.spec.js @@ -105,7 +105,7 @@ describe("internal search", () => { "column": "", }, }, PARAMS) - checkLucene(response, `*:* AND !column:["" TO *]`, PARAMS) + checkLucene(response, `*:* AND (*:* -column:["" TO *])`, PARAMS) }) it("test notEmpty query", async () => { diff --git a/packages/shared-core/package.json b/packages/shared-core/package.json index 4ea3deea5f..e29fea93af 100644 --- a/packages/shared-core/package.json +++ b/packages/shared-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/shared-core", - "version": "2.5.6-alpha.42", + "version": "2.5.10-alpha.0", "description": "Shared data utils", "main": "dist/cjs/src/index.js", "types": "dist/mjs/src/index.d.ts", @@ -20,7 +20,7 @@ "dev:builder": "yarn prebuild && concurrently \"tsc -p tsconfig.build.json --watch\" \"tsc -p tsconfig-cjs.build.json --watch\"" }, "dependencies": { - "@budibase/types": "2.5.6-alpha.42" + "@budibase/types": "2.5.10-alpha.0" }, "devDependencies": { "concurrently": "^7.6.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index e1397182dc..14af9c2afb 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.5.6-alpha.42", + "version": "2.5.10-alpha.0", "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 3068068d4c..0c84a25627 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.5.6-alpha.42", + "version": "2.5.10-alpha.0", "description": "Budibase types", "main": "dist/cjs/index.js", "types": "dist/mjs/index.d.ts", diff --git a/packages/types/src/sdk/events/license.ts b/packages/types/src/sdk/events/license.ts index b92c556cc8..12bdd92184 100644 --- a/packages/types/src/sdk/events/license.ts +++ b/packages/types/src/sdk/events/license.ts @@ -5,11 +5,10 @@ export interface LicensePlanChangedEvent { from: PlanType to: PlanType // may not be on historical events - // free plans won't have a duration - duration: PriceDuration | undefined - // may not be on historical events - // free plans won't have a quantity - quantity: number | undefined + fromDuration: PriceDuration | undefined + toDuration: PriceDuration | undefined + fromQuantity: number | undefined + toQuantity: number | undefined } export interface LicenseActivatedEvent { diff --git a/packages/worker/package.json b/packages/worker/package.json index ded8abbecb..6de9d3913c 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.5.6-alpha.42", + "version": "2.5.10-alpha.0", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -39,10 +39,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.5.6-alpha.42", - "@budibase/pro": "2.5.6-alpha.42", - "@budibase/string-templates": "2.5.6-alpha.42", - "@budibase/types": "2.5.6-alpha.42", + "@budibase/backend-core": "2.5.10-alpha.0", + "@budibase/pro": "2.5.10-alpha.0", + "@budibase/string-templates": "2.5.10-alpha.0", + "@budibase/types": "2.5.10-alpha.0", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", diff --git a/yarn.lock b/yarn.lock index 2b5a687a68..8e2ad58618 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1385,6 +1385,45 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@budibase/backend-core@2.5.6-alpha.26": + version "2.5.6-alpha.26" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.5.6-alpha.26.tgz#72029afe5a85402fa996e92b84ad56cb8c6bde45" + integrity sha512-ktP2SWwLjaDzJYLnadU1BcZlrfQkvhRb3T+v1SEciTBWi0vF7MUa7k5OW0EKwECpGA3VA576sbI7FgGu7m7Sxw== + dependencies: + "@budibase/nano" "10.1.2" + "@budibase/pouchdb-replication-stream" "1.2.10" + "@budibase/types" "2.5.6-alpha.26" + "@shopify/jest-koa-mocks" "5.0.1" + "@techpass/passport-openidconnect" "0.3.2" + aws-cloudfront-sign "2.2.0" + aws-sdk "2.1030.0" + bcrypt "5.0.1" + bcryptjs "2.4.3" + bull "4.10.1" + correlation-id "4.0.0" + dotenv "16.0.1" + emitter-listener "1.1.2" + ioredis "4.28.0" + joi "17.6.0" + jsonwebtoken "9.0.0" + koa-passport "4.1.4" + koa-pino-logger "4.0.0" + lodash "4.17.21" + lodash.isarguments "3.1.0" + node-fetch "2.6.7" + passport-google-oauth "2.0.0" + passport-jwt "4.0.0" + passport-local "1.0.0" + passport-oauth2-refresh "^2.1.0" + posthog-node "1.3.0" + pouchdb "7.3.0" + pouchdb-find "7.2.2" + redlock "4.2.0" + sanitize-s3-objectkey "0.0.1" + semver "7.3.7" + tar-fs "2.1.1" + uuid "8.3.2" + "@budibase/bbui@^0.9.139": version "0.9.190" resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-0.9.190.tgz#e1ec400ac90f556bfbc80fc23a04506f1585ea81" @@ -1485,15 +1524,15 @@ pouchdb-promise "^6.0.4" through2 "^2.0.0" -"@budibase/pro@2.5.6-alpha.42": - version "2.5.6-alpha.42" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.5.6-alpha.42.tgz#15ec86d9918b7d58e3236240afda31309f3162ae" - integrity sha512-aes19IVAEGqf0YPLJMnOKHv99AR6LO8jMpPVCbSZcZODS3byxh9kC2+sWH1mAd781zymyN79HnwGrVJNOdV8jw== +"@budibase/pro@2.5.10-alpha.0": + version "2.5.10-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.5.10-alpha.0.tgz#f3688cc61d2130fbf8b191e515b8ac9789f2a9df" + integrity sha512-vYa1F4NhMh7veSZyhgrE54iziwZLHiuRwXbU+unEo3xqyFZIvERAAQZ88nrnwssubWBWnPhpN/8JMHrsyM8mXg== dependencies: - "@budibase/backend-core" "2.5.6-alpha.42" - "@budibase/shared-core" "2.4.44-alpha.1" - "@budibase/string-templates" "2.4.44-alpha.1" - "@budibase/types" "2.5.6-alpha.42" + "@budibase/backend-core" "2.5.10-alpha.0" + "@budibase/shared-core" "2.5.9" + "@budibase/string-templates" "2.5.9" + "@budibase/types" "2.5.10-alpha.0" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -1511,6 +1550,13 @@ dependencies: "@budibase/types" "2.4.44-alpha.1" +"@budibase/shared-core@2.5.9": + version "2.5.9" + resolved "https://registry.yarnpkg.com/@budibase/shared-core/-/shared-core-2.5.9.tgz#f22f22637fb7618ded1c7292b10793d7969827ce" + integrity sha512-l417Rb2+1tuXbjNL42wJHmqIQQyla2pPglOnapxfOdRuvzng+5GqlrTV1caLNf/53TS9U6ueGJdPOtxZTTFGUA== + dependencies: + "@budibase/types" "^2.5.9" + "@budibase/standard-components@^0.9.139": version "0.9.139" resolved "https://registry.yarnpkg.com/@budibase/standard-components/-/standard-components-0.9.139.tgz#cf8e2b759ae863e469e50272b3ca87f2827e66e3" @@ -1541,11 +1587,35 @@ lodash "^4.17.20" vm2 "^3.9.4" +"@budibase/string-templates@2.5.9": + version "2.5.9" + resolved "https://registry.yarnpkg.com/@budibase/string-templates/-/string-templates-2.5.9.tgz#64582730421801e1e829b430136b449b1adc0314" + integrity sha512-Szu06M0JFHuUVIil2aHZWU8hvsROYpDx9raX9uIv4DcwBOAtyvVzD16wOCHzlmj8wWeV8fbKe4JF4q4GXnilJg== + dependencies: + "@budibase/handlebars-helpers" "^0.11.8" + dayjs "^1.10.4" + handlebars "^4.7.6" + handlebars-utils "^1.0.6" + lodash "^4.17.20" + vm2 "^3.9.15" + "@budibase/types@2.4.44-alpha.1": version "2.4.44-alpha.1" resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.4.44-alpha.1.tgz#1679657aa180d9c59afa1dffa611bff0638bd933" integrity sha512-Sq+8HfM75EBMoOvKYFwELdlxmVN6wNZMofDjT/2G+9aF+Zfe5Tzw69C+unmdBgcGGjGCHEYWSz4mF0v8FPAGbg== +"@budibase/types@2.5.6-alpha.26": + version "2.5.6-alpha.26" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.5.6-alpha.26.tgz#09ac8f1e4f4dfd5e7e109839cd9db36d5c563dc4" + integrity sha512-C1eHWj4tRwsQb2dJbMdukxRFVqiyzRBhwIMuCSIdJg763sbn9TXTqWTBbljyG7ppH+Dwge+py9KtiFP2MpMCfQ== + dependencies: + scim-patch "^0.7.0" + +"@budibase/types@^2.5.9": + version "2.5.9" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.5.9.tgz#4b1253e76b95cd8d6a42e86ebc3363a305c62653" + integrity sha512-7NELdWB3iV5y+pmXhm9g/v1AlN+wqHtoy67DZxKY5dlcK4DCcTdlqkToGiiw9d3sDPgDAVznjdZYnB5pGzd3TQ== + "@bull-board/api@3.7.0": version "3.7.0" resolved "https://registry.yarnpkg.com/@bull-board/api/-/api-3.7.0.tgz#231f687187c0cb34e0b97f463917b6aaeb4ef6af" @@ -3148,6 +3218,11 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== +"@jridgewell/sourcemap-codec@^1.4.13": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + "@jridgewell/trace-mapping@0.3.9": version "0.3.9" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" @@ -3861,7 +3936,7 @@ dependencies: slash "^3.0.0" -"@rollup/plugin-commonjs@^16.0.0": +"@rollup/plugin-commonjs@16.0.0", "@rollup/plugin-commonjs@^16.0.0": version "16.0.0" resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-16.0.0.tgz#169004d56cd0f0a1d0f35915d31a036b0efe281f" integrity sha512-LuNyypCP3msCGVQJ7ki8PqYdpjfEkE/xtFa5DqlF+7IBD0JsfMZ87C58heSwIMint58sAUZbt3ITqOmdQv/dXw== @@ -3944,6 +4019,22 @@ "@rollup/pluginutils" "^3.1.0" magic-string "^0.25.7" +"@rollup/plugin-replace@^5.0.2": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-5.0.2.tgz#45f53501b16311feded2485e98419acb8448c61d" + integrity sha512-M9YXNekv/C/iHHK+cvORzfRYfPbq0RDD8r0G+bMiTXjNGKulPnCT9O3Ss46WfhI6ZOCgApOP7xAdmCQJ+U2LAA== + dependencies: + "@rollup/pluginutils" "^5.0.1" + magic-string "^0.27.0" + +"@rollup/plugin-typescript@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-8.3.0.tgz#bc1077fa5897b980fc27e376c4e377882c63e68b" + integrity sha512-I5FpSvLbtAdwJ+naznv+B4sjXZUcIvLLceYpITAn7wAP8W0wqc5noLdGIp9HGVntNhRWXctwPYrSSFQxtl0FPA== + dependencies: + "@rollup/pluginutils" "^3.1.0" + resolve "^1.17.0" + "@rollup/pluginutils@^3.0.8", "@rollup/pluginutils@^3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b" @@ -9705,13 +9796,6 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" -docker-compose@0.23.12: - version "0.23.12" - resolved "https://registry.yarnpkg.com/docker-compose/-/docker-compose-0.23.12.tgz#fa883b98be08f6926143d06bf9e522ef7ed3210c" - integrity sha512-KFbSMqQBuHjTGZGmYDOCO0L4SaML3BsWTId5oSUyaBa22vALuFHNv+UdDWs3HcMylHWKsxCbLB7hnM/nCosWZw== - dependencies: - yaml "^1.10.2" - docker-compose@0.23.17: version "0.23.17" resolved "https://registry.yarnpkg.com/docker-compose/-/docker-compose-0.23.17.tgz#8816bef82562d9417dc8c790aa4871350f93a2ba" @@ -9719,6 +9803,13 @@ docker-compose@0.23.17: dependencies: yaml "^1.10.2" +docker-compose@0.24.0: + version "0.24.0" + resolved "https://registry.yarnpkg.com/docker-compose/-/docker-compose-0.24.0.tgz#474cd38b05b3887a56ffb2c39f16a7ae4d7d5077" + integrity sha512-RN/oSPLPa6ZG5e4dHg8tD8EMpd1WJqomNMBQT+d2M5MwcmfrPW/xHTent4TVqX0zZvHemv7qhhNlzXjxCnFaQw== + dependencies: + yaml "^1.10.2" + docker-compose@^0.23.5: version "0.23.19" resolved "https://registry.yarnpkg.com/docker-compose/-/docker-compose-0.23.19.tgz#9947726e2fe67bdfa9e8efe1ff15aa0de2e10eb8" @@ -11942,7 +12033,7 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@^2.1.2, fsevents@^2.3.2, fsevents@~2.3.2: +fsevents@^2.1.2, fsevents@^2.3.2, fsevents@~2.3.1, fsevents@~2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== @@ -17014,6 +17105,13 @@ magic-string@^0.26.2: dependencies: sourcemap-codec "^1.4.8" +magic-string@^0.27.0: + version "0.27.0" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.27.0.tgz#e4a3413b4bab6d98d2becffd48b4a257effdbbf3" + integrity sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA== + dependencies: + "@jridgewell/sourcemap-codec" "^1.4.13" + make-dir@3.1.0, make-dir@^3.0.0, make-dir@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" @@ -21811,6 +21909,13 @@ rollup-pluginutils@^2.3.1, rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.6.0, dependencies: estree-walker "^0.6.1" +rollup@2.45.2: + version "2.45.2" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.45.2.tgz#8fb85917c9f35605720e92328f3ccbfba6f78b48" + integrity sha512-kRRU7wXzFHUzBIv0GfoFFIN3m9oteY4uAsKllIpQDId5cfnkWF2J130l+27dzDju0E6MScKiV0ZM5Bw8m4blYQ== + optionalDependencies: + fsevents "~2.3.1" + rollup@^2.36.2, rollup@^2.44.0, rollup@^2.45.2, rollup@^2.79.1: version "2.79.1" resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.79.1.tgz#bedee8faef7c9f93a2647ac0108748f497f081c7" @@ -23801,7 +23906,7 @@ timed-out@^4.0.1: resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" integrity sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA== -timekeeper@2.2.0: +timekeeper@2.2.0, timekeeper@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/timekeeper/-/timekeeper-2.2.0.tgz#9645731fce9e3280a18614a57a9d1b72af3ca368" integrity sha512-W3AmPTJWZkRwu+iSNxPIsLZ2ByADsOLbbLxe46UJyWj3mlYLlwucKiq+/dPm0l9wTzqoF3/2PH0AGFCebjq23A==