From 3b5f9ed3e26b5b1286efe166528c0acabb2fb642 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Jul 2022 13:34:40 +0900 Subject: [PATCH 001/320] Fix popover min-width to have parents full width --- packages/bbui/src/Popover/Popover.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bbui/src/Popover/Popover.svelte b/packages/bbui/src/Popover/Popover.svelte index 1017ef71fc..756e5e6a09 100644 --- a/packages/bbui/src/Popover/Popover.svelte +++ b/packages/bbui/src/Popover/Popover.svelte @@ -63,7 +63,7 @@ diff --git a/packages/builder/src/components/portal/overview/automation/StatusRenderer.svelte b/packages/builder/src/components/portal/overview/automation/StatusRenderer.svelte index 5f71041809..a50932c582 100644 --- a/packages/builder/src/components/portal/overview/automation/StatusRenderer.svelte +++ b/packages/builder/src/components/portal/overview/automation/StatusRenderer.svelte @@ -3,7 +3,8 @@ export let value $: isError = !value || value.toLowerCase() === "error" - $: isStopped = value?.toLowerCase() === "stopped" + $: isStoppedError = value?.toLowerCase() === "stopped_error" + $: isStopped = value?.toLowerCase() === "stopped" || isStoppedError $: status = getStatus(isError, isStopped) function getStatus(error, stopped) { diff --git a/packages/server/src/threads/automation.ts b/packages/server/src/threads/automation.ts index ac43874ab1..9a2e3b5100 100644 --- a/packages/server/src/threads/automation.ts +++ b/packages/server/src/threads/automation.ts @@ -144,7 +144,15 @@ class Orchestrator { `CRON disabled due to errors - ${this._appId}/${this._automation._id}` ) await disableCron(this._repeat?.jobId, this._repeat?.jobKey) - this.updateExecutionOutput(trigger.id, trigger.stepId, {}, STOPPED_STATUS) + this.updateExecutionOutput( + trigger.id, + trigger.stepId, + {}, + { + status: AutomationStatus.STOPPED_ERROR, + success: false, + } + ) await storeLog(automation, this.executionOutput) return true } @@ -183,8 +191,20 @@ class Orchestrator { updateExecutionOutput(id: string, stepId: string, inputs: any, outputs: any) { const stepObj = { id, stepId, inputs, outputs } + // replacing trigger when disabling CRON + if ( + stepId === CRON_STEP_ID && + outputs.status === AutomationStatus.STOPPED_ERROR + ) { + this.executionOutput.trigger = stepObj + this.executionOutput.steps = [stepObj] + return + } // first entry is always the trigger (constructor) - if (this.executionOutput.steps.length === 0) { + if ( + this.executionOutput.steps.length === 0 || + this.executionOutput.trigger.id === id + ) { this.executionOutput.trigger = stepObj } this.executionOutput.steps.push(stepObj) diff --git a/packages/types/src/documents/app/automation.ts b/packages/types/src/documents/app/automation.ts index ce72adda92..50562461e4 100644 --- a/packages/types/src/documents/app/automation.ts +++ b/packages/types/src/documents/app/automation.ts @@ -31,6 +31,7 @@ export enum AutomationStatus { SUCCESS = "success", ERROR = "error", STOPPED = "stopped", + STOPPED_ERROR = "stopped_error", } export interface AutomationResults { From e7010296ae9fc4a273a1f197473eb8d020c0b28e Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 26 Jul 2022 16:13:41 +0100 Subject: [PATCH 008/320] Fixing issue with test after update. --- packages/server/src/automations/tests/automation.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/src/automations/tests/automation.spec.js b/packages/server/src/automations/tests/automation.spec.js index e7496fa4b3..168819daa3 100644 --- a/packages/server/src/automations/tests/automation.spec.js +++ b/packages/server/src/automations/tests/automation.spec.js @@ -31,7 +31,7 @@ describe("Run through some parts of the automations system", () => { it("should be able to init in builder", async () => { await triggers.externalTrigger(basicAutomation(), { a: 1 }) await wait(100) - expect(thread).toHaveBeenCalled() + expect(thread.execute).toHaveBeenCalled() }) it("should be able to init in prod", async () => { @@ -52,7 +52,7 @@ describe("Run through some parts of the automations system", () => { } }) await wait(100) - expect(thread).toHaveBeenCalledWith(makePartial({ + expect(thread.execute).toHaveBeenCalledWith(makePartial({ data: { event: { fields: { From b76000f8282220b6d2c2544e4ace0fc9829ef776 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 27 Jul 2022 12:55:20 +0100 Subject: [PATCH 009/320] Fix issue showing selected component indicators on initial load sometimes due to null reference --- packages/client/src/components/preview/IndicatorSet.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/client/src/components/preview/IndicatorSet.svelte b/packages/client/src/components/preview/IndicatorSet.svelte index bbd03aa974..662741d100 100644 --- a/packages/client/src/components/preview/IndicatorSet.svelte +++ b/packages/client/src/components/preview/IndicatorSet.svelte @@ -72,6 +72,7 @@ // Sanity limit of 100 active indicators const children = Array.from(parents) .map(parent => parent?.children?.[0]) + .filter(x => x != null) .slice(0, 100) // If there aren't any nodes then reset From 56704b3c204a946986f77f96098d4bf619e98027 Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Thu, 28 Jul 2022 10:38:54 +0100 Subject: [PATCH 010/320] added a note to clean cookies when swapping modes --- docs/CONTRIBUTING.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 531ed05749..7637bbcd44 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -162,7 +162,10 @@ When you are running locally, budibase stores data on disk using docker volumes. ### Development Modes -A combination of environment variables controls the mode budibase runs in. +A combination of environment variables controls the mode budibase runs in. + +| **NOTE**: You need to clean your browser cookies when you change between different modes. + Yarn commands can be used to mimic the different modes as described in the sections below: #### Self Hosted From 2b53d0bb4bbd00843670508cabe58d0990d6eb61 Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Thu, 28 Jul 2022 10:43:14 +0100 Subject: [PATCH 011/320] fixed broken link --- docs/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 7637bbcd44..2439e01781 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -192,7 +192,7 @@ To enable this mode, use: yarn mode:account ``` ### CI - An overview of the CI pipelines can be found [here](./workflows/README.md) + An overview of the CI pipelines can be found [here](../.github/workflows/README.md) ### Pro From 51620dfc35410100b908662dd68160ba12b10146 Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Thu, 28 Jul 2022 11:13:03 +0100 Subject: [PATCH 012/320] cleaning dependencies before bootstrap to linking pro version --- .github/workflows/README.md | 2 +- docs/CONTRIBUTING.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index c33665c964..c5c5e9cea3 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -132,7 +132,7 @@ This is done to prevent pro needing to be published prior to CI runs in budiabse - backend-core lives in the monorepo, so it can't be released independently to be used in pro - therefore the only option is to pull pro from source and release it as a part of the monorepo release, as if it were a mono package -The install is performed using the same steps as local development, via the `yarn bootstrap` command, see the [Contributing Guide#Pro](../CONTRIBUTING.md#pro) +The install is performed using the same steps as local development, via the `yarn clean && yarn bootstrap` command, see the [Contributing Guide#Pro](../CONTRIBUTING.md#pro) The branch to install pro from can vary depending on ref of the commit that triggered the budibase CI job. This is done to enable branches which have changes in both the monorepo and the pro repo to have their CI pass successfully. diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 2439e01781..910e789e6b 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -206,7 +206,7 @@ yarn mode:account Note that only budibase maintainers will be able to access the pro repo. -The `yarn bootstrap` command can be used to replace the NPM supplied dependency with the local source aware version. This is achieved using the `yarn link` command. To see specifically how dependencies are linked see [scripts/link-dependencies.sh](../scripts/link-dependencies.sh). The same link script is used to link dependencies to account-portal in local dev. +The `yarn clean && yarn bootstrap` command can be used to replace the NPM supplied dependency with the local source aware version. This is achieved using the `yarn link` command. To see specifically how dependencies are linked see [scripts/link-dependencies.sh](../scripts/link-dependencies.sh). The same link script is used to link dependencies to account-portal in local dev. ### Troubleshooting From 76ce26c6b5b6aed33a01594e9ce560f63bf4acd2 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 28 Jul 2022 11:14:06 +0100 Subject: [PATCH 013/320] Adding more logging to server log for cloud etc. --- packages/server/src/automations/steps/serverLog.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/server/src/automations/steps/serverLog.js b/packages/server/src/automations/steps/serverLog.js index b88a731d56..19bbc36abf 100644 --- a/packages/server/src/automations/steps/serverLog.js +++ b/packages/server/src/automations/steps/serverLog.js @@ -31,15 +31,21 @@ exports.definition = { type: "boolean", description: "Whether the action was successful", }, + message: { + type: "string", + description: "What was output", + }, }, - required: ["success"], + required: ["success", "message"], }, }, } exports.run = async function ({ inputs, appId }) { - console.log(`App ${appId} - ${inputs.text}`) + const message = `App ${appId} - ${inputs.text}` + console.log(message) return { success: true, + message, } } From 33e1d6934174b895598c762a0e3c55ee54a9f302 Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Thu, 28 Jul 2022 11:21:06 +0100 Subject: [PATCH 014/320] linking to doc instead of symlink to make it readable on Github --- .github/workflows/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index c5c5e9cea3..e70b3ce39d 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -132,7 +132,7 @@ This is done to prevent pro needing to be published prior to CI runs in budiabse - backend-core lives in the monorepo, so it can't be released independently to be used in pro - therefore the only option is to pull pro from source and release it as a part of the monorepo release, as if it were a mono package -The install is performed using the same steps as local development, via the `yarn clean && yarn bootstrap` command, see the [Contributing Guide#Pro](../CONTRIBUTING.md#pro) +The install is performed using the same steps as local development, via the `yarn clean && yarn bootstrap` command, see the [Contributing Guide#Pro](../../docs/CONTRIBUTING.md#pro) The branch to install pro from can vary depending on ref of the commit that triggered the budibase CI job. This is done to enable branches which have changes in both the monorepo and the pro repo to have their CI pass successfully. From 9194c599509cab23341e43fae1d664d0ac676c1b Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Thu, 28 Jul 2022 11:32:24 +0100 Subject: [PATCH 015/320] updated table of contents --- docs/CONTRIBUTING.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 910e789e6b..8d38ed73ee 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -4,10 +4,10 @@ From opening a bug report to creating a pull request: every contribution is appr ## Table of contents -- [Quick start](#quick-start) -- [Status](#status) -- [What's included](#whats-included) -- [Bugs and feature requests](#bugs-and-feature-requests) +- [Where to start](#not-sure-where-to-start) +- [Contributor Licence Agreement](#contributor-license-agreement-cla) +- [Glossary of Terms](#glossary-of-terms) +- [Contributing to Budibase](#contributing-to-budibase) ## Not Sure Where to Start? From 20e8c03641faa1a562c43adc2d3d87eb4b14038e Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Thu, 28 Jul 2022 11:51:02 +0100 Subject: [PATCH 016/320] troubleshooting M1 processors --- docs/DEV-SETUP-MACOSX.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/DEV-SETUP-MACOSX.md b/docs/DEV-SETUP-MACOSX.md index 5606fd0d10..c5990e58da 100644 --- a/docs/DEV-SETUP-MACOSX.md +++ b/docs/DEV-SETUP-MACOSX.md @@ -4,6 +4,11 @@ Install instructions [here](https://brew.sh/) +| **NOTE**: If you are working on a M1 Apple Silicon which is running Z shell, you could need to add +`eval $(/opt/homebrew/bin/brew shellenv)` line to your `.zshrc`. This will make your zsh to find the apps you install +through brew. + + ### Install Node Budibase requires a recent version of node (14+): @@ -51,4 +56,7 @@ So this command will actually run the application in dev mode. It creates .env f The dev version will be available on port 10000 i.e. -http://127.0.0.1:10000/builder/admin \ No newline at end of file +http://127.0.0.1:10000/builder/admin + +| **NOTE**: If you are working on a M1 Apple Silicon, you will need to uncomment `# platform: linux/amd64` line in +[hosting/docker-compose-dev.yaml](../hosting/docker-compose.dev.yaml) \ No newline at end of file From 348f7e2d1cab20ede39a12586339e962f414b3f4 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 28 Jul 2022 13:39:11 +0100 Subject: [PATCH 017/320] Fixing some issues with automations + lucene filtering (with string templating on the backend) as well as type coercion in the query rows action. --- packages/frontend-core/src/utils/lucene.js | 5 +++- .../server/src/automations/steps/queryRows.js | 23 ++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/packages/frontend-core/src/utils/lucene.js b/packages/frontend-core/src/utils/lucene.js index 1001ec26a8..9554c2201a 100644 --- a/packages/frontend-core/src/utils/lucene.js +++ b/packages/frontend-core/src/utils/lucene.js @@ -1,6 +1,8 @@ import { Helpers } from "@budibase/bbui" import { OperatorOptions, SqlNumberTypeRangeMap } from "../constants" +const HBS_REGEX = /{{([^{].*?)}}/g + /** * Returns the valid operator options for a certain data type * @param type the data type @@ -98,6 +100,7 @@ export const buildLuceneQuery = filter => { if (Array.isArray(filter)) { filter.forEach(expression => { let { operator, field, type, value, externalType } = expression + const isHbs = typeof value === "string" && value.match(HBS_REGEX)?.length > 0 // Parse all values into correct types if (type === "datetime" && value) { value = new Date(value).toISOString() @@ -105,7 +108,7 @@ export const buildLuceneQuery = filter => { if (type === "number" && !Array.isArray(value)) { if (operator === "oneOf") { value = value.split(",").map(item => parseFloat(item)) - } else { + } else if (!isHbs) { value = parseFloat(value) } } diff --git a/packages/server/src/automations/steps/queryRows.js b/packages/server/src/automations/steps/queryRows.js index b6d1938995..58e7313dd2 100644 --- a/packages/server/src/automations/steps/queryRows.js +++ b/packages/server/src/automations/steps/queryRows.js @@ -82,6 +82,27 @@ async function getTable(appId, tableId) { return ctx.body } +function typeCoercion(filters, table) { + if (!filters || !table) { + return filters + } + for (let key of Object.keys(filters)) { + if (typeof filters[key] === "object") { + for (let [property, value] of Object.entries(filters[key])) { + const column = table.schema[property] + // convert string inputs + if (!column || typeof value !== "string") { + continue + } + if (column.type === FieldTypes.NUMBER) { + filters[key][property] = parseFloat(value) + } + } + } + } + return filters +} + exports.run = async function ({ inputs, appId }) { const { tableId, filters, sortColumn, sortOrder, limit } = inputs const table = await getTable(appId, tableId) @@ -99,7 +120,7 @@ exports.run = async function ({ inputs, appId }) { sortType, limit, sort: sortColumn, - query: filters || {}, + query: typeCoercion(filters || {}, table), // default to ascending, like data tab sortOrder: sortOrder || SortOrders.ASCENDING, }, From b20ef0c14655404174dcdec3f82096fb4399c565 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 28 Jul 2022 13:40:04 +0100 Subject: [PATCH 018/320] Linting. --- packages/frontend-core/src/utils/lucene.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/frontend-core/src/utils/lucene.js b/packages/frontend-core/src/utils/lucene.js index 9554c2201a..29c2ca684a 100644 --- a/packages/frontend-core/src/utils/lucene.js +++ b/packages/frontend-core/src/utils/lucene.js @@ -100,7 +100,8 @@ export const buildLuceneQuery = filter => { if (Array.isArray(filter)) { filter.forEach(expression => { let { operator, field, type, value, externalType } = expression - const isHbs = typeof value === "string" && value.match(HBS_REGEX)?.length > 0 + const isHbs = + typeof value === "string" && value.match(HBS_REGEX)?.length > 0 // Parse all values into correct types if (type === "datetime" && value) { value = new Date(value).toISOString() From 154619c42ab8b7eb71c0871d6d75003cccf8ea4e Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Thu, 28 Jul 2022 16:56:50 +0100 Subject: [PATCH 019/320] making link accesible from github instead of symlink --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e8c6475d90..b969a2128c 100644 --- a/README.md +++ b/README.md @@ -164,7 +164,7 @@ If you have a question or would like to talk with other Budibase users and join ## ❗ Code of conduct -Budibase is dedicated to providing a welcoming, diverse, and harrassment-free experience for everyone. We expect everyone in the Budibase community to abide by our [**Code of Conduct**](https://github.com/Budibase/budibase/blob/HEAD/.github/CODE_OF_CONDUCT.md). Please read it. +Budibase is dedicated to providing a welcoming, diverse, and harrassment-free experience for everyone. We expect everyone in the Budibase community to abide by our [**Code of Conduct**](https://github.com/Budibase/budibase/blob/HEAD/docs/CODE_OF_CONDUCT.md). Please read it.
From 4e99856186b4e556dfded60529443c29a2e47cfc Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Thu, 28 Jul 2022 18:27:28 +0100 Subject: [PATCH 020/320] agree CLA when PR is created by other contributor --- docs/CONTRIBUTING.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 8d38ed73ee..fdd054745e 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -32,6 +32,9 @@ All contributors must sign an [Individual Contributor License Agreement](https:/ If contributing on behalf of your company, your company must sign a [Corporate Contributor License Agreement](https://github.com/budibase/budibase/blob/next/.github/cla/corporate-cla.md). If so, please contact us via community@budibase.com. +If for any reason, your first contribution is in a PR created by other contributor, please just add a comment to the PR +with the following text to agree our CLA: "I have read the CLA Document and I hereby sign the CLA". + ## Glossary of Terms To understand the budibase API, it can be helpful to understand the top level entities that make up Budibase. From 3d13030aa1e8c3f311668ffd4dc8d62960358e4b Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 28 Jul 2022 20:20:53 +0100 Subject: [PATCH 021/320] Initial attempt at transpiling HBS to JS. --- .../common/bindings/BindingPanel.svelte | 29 ++++++- .../string-templates/src/conversion/index.js | 87 +++++++++++++++++++ .../string-templates/src/helpers/external.js | 3 + .../string-templates/src/helpers/index.js | 3 + .../src/helpers/javascript.js | 2 + packages/string-templates/src/helpers/list.js | 19 ++++ packages/string-templates/src/index.cjs | 1 + packages/string-templates/src/index.js | 29 +++++++ packages/string-templates/src/index.mjs | 1 + .../string-templates/test/hbsToJs.spec.js | 84 ++++++++++++++++++ 10 files changed, 255 insertions(+), 3 deletions(-) create mode 100644 packages/string-templates/src/conversion/index.js create mode 100644 packages/string-templates/src/helpers/list.js create mode 100644 packages/string-templates/test/hbsToJs.spec.js diff --git a/packages/builder/src/components/common/bindings/BindingPanel.svelte b/packages/builder/src/components/common/bindings/BindingPanel.svelte index f05f935226..6f0bc4615a 100644 --- a/packages/builder/src/components/common/bindings/BindingPanel.svelte +++ b/packages/builder/src/components/common/bindings/BindingPanel.svelte @@ -8,6 +8,7 @@ Tab, Body, Layout, + Button, } from "@budibase/bbui" import { createEventDispatcher, onMount } from "svelte" import { @@ -15,10 +16,14 @@ decodeJSBinding, encodeJSBinding, } from "@budibase/string-templates" - import { readableToRuntimeBinding } from "builderStore/dataBinding" + import { + readableToRuntimeBinding, + runtimeToReadableBinding, + } from "builderStore/dataBinding" import { handlebarsCompletions } from "constants/completions" import { addHBSBinding, addJSBinding } from "./utils" import CodeMirrorEditor from "components/common/CodeMirrorEditor.svelte" + import { convertToJS } from "@budibase/string-templates" const dispatch = createEventDispatcher() @@ -57,6 +62,7 @@ const updateValue = val => { valid = isValid(readableToRuntimeBinding(bindings, val)) + console.log(decodeJSBinding(readableToRuntimeBinding(bindings, val))) if (valid) { dispatch("change", val) } @@ -69,8 +75,8 @@ } // Adds a data binding to the expression - const addBinding = binding => { - if (usingJS) { + const addBinding = (binding, { forceJS } = {}) => { + if (usingJS || forceJS) { let js = decodeJSBinding(jsValue) js = addJSBinding(js, getCaretPosition(), binding.readableBinding) jsValue = encodeJSBinding(js) @@ -100,6 +106,16 @@ updateValue(jsValue) } + const convert = () => { + const runtime = readableToRuntimeBinding(bindings, hbsValue) + console.log(runtime) + const runtimeJs = encodeJSBinding(convertToJS(runtime)) + jsValue = runtimeToReadableBinding(bindings, runtimeJs) + hbsValue = null + mode = "JavaScript" + addBinding("", { forceJS: true }) + } + onMount(() => { valid = isValid(readableToRuntimeBinding(bindings, value)) }) @@ -172,6 +188,9 @@ for more details.

{/if} +
+ +
{#if allowJS} @@ -306,4 +325,8 @@ color: var(--red); text-decoration: underline; } + + .convert { + padding-top: var(--spacing-m); + } diff --git a/packages/string-templates/src/conversion/index.js b/packages/string-templates/src/conversion/index.js new file mode 100644 index 0000000000..62abdf6f54 --- /dev/null +++ b/packages/string-templates/src/conversion/index.js @@ -0,0 +1,87 @@ +const { getHelperList } = require("../helpers") + +function getLayers(fullBlock) { + let layers = [] + while (fullBlock.length) { + const start = fullBlock.lastIndexOf("("), + end = fullBlock.indexOf(")") + let layer + if (start === -1 || end === -1) { + layer = fullBlock.trim() + fullBlock = "" + } else { + const untrimmed = fullBlock.substring(start, end + 1) + layer = untrimmed.substring(1, untrimmed.length - 1).trim() + fullBlock = + fullBlock.slice(0, start) + + fullBlock.slice(start + untrimmed.length + 1, fullBlock.length) + } + layers.push(layer) + } + return layers +} + +function getVariable(variableName) { + return isNaN(parseFloat(variableName)) ? `$("${variableName}")` : variableName +} + +function buildList(parts, value) { + function build() { + return parts + .map(part => (part.startsWith("helper") ? part : getVariable(part))) + .join(", ") + } + if (!value) { + return parts.length > 1 ? `...[${build()}]` : build() + } else { + return parts.length === 0 ? value : `...[${value}, ${build()}]` + } +} + +function splitBySpace(layer) { + const parts = [] + let started = null, + last = 0 + for (let index = 0; index < layer.length; index++) { + const char = layer[index] + if (char === "[" && started == null) { + started = index + } else if (char === "]" && started != null && layer[index + 1] !== ".") { + parts.push(layer.substring(started, index + 1).trim()) + started = null + last = index + } else if (started == null && char === " ") { + parts.push(layer.substring(last, index).trim()) + last = index + } + } + if (!layer.startsWith("[")) { + parts.push(layer.substring(last, layer.length).trim()) + } + return parts +} + +module.exports.convertHBSBlock = (block, blockNumber) => { + const braceLength = block[2] === "{" ? 3 : 2 + block = block.substring(braceLength, block.length - braceLength).trim() + const layers = getLayers(block) + + let value = null + const list = getHelperList() + for (let layer of layers) { + const parts = splitBySpace(layer) + if (value || parts.length > 1) { + // first of layer should always be the helper + const helper = parts.splice(0, 1) + if (list[helper]) { + value = `helpers.${helper}(${buildList(parts, value)})` + } + } + // no helpers + else { + value = getVariable(parts[0]) + } + } + // split by space will remove square brackets + return { variable: `var${blockNumber}`, value } +} diff --git a/packages/string-templates/src/helpers/external.js b/packages/string-templates/src/helpers/external.js index 0fa7f734d0..f461045f71 100644 --- a/packages/string-templates/src/helpers/external.js +++ b/packages/string-templates/src/helpers/external.js @@ -23,6 +23,9 @@ const ADDED_HELPERS = { duration: duration, } +exports.externalCollections = EXTERNAL_FUNCTION_COLLECTIONS +exports.addedHelpers = ADDED_HELPERS + exports.registerAll = handlebars => { for (let [name, helper] of Object.entries(ADDED_HELPERS)) { handlebars.registerHelper(name, helper) diff --git a/packages/string-templates/src/helpers/index.js b/packages/string-templates/src/helpers/index.js index 76a4c5d2ca..f04fa58399 100644 --- a/packages/string-templates/src/helpers/index.js +++ b/packages/string-templates/src/helpers/index.js @@ -7,6 +7,7 @@ const { HelperFunctionBuiltin, LITERAL_MARKER, } = require("./constants") +const { getHelperList } = require("./list") const HTML_SWAPS = { "<": "<", @@ -91,3 +92,5 @@ module.exports.unregisterAll = handlebars => { // unregister all imported helpers externalHandlebars.unregisterAll(handlebars) } + +module.exports.getHelperList = getHelperList diff --git a/packages/string-templates/src/helpers/javascript.js b/packages/string-templates/src/helpers/javascript.js index 0173be0b54..951a9f534a 100644 --- a/packages/string-templates/src/helpers/javascript.js +++ b/packages/string-templates/src/helpers/javascript.js @@ -1,6 +1,7 @@ const { atob } = require("../utilities") const { cloneDeep } = require("lodash/fp") const { LITERAL_MARKER } = require("../helpers/constants") +const { getHelperList } = require("./list") // The method of executing JS scripts depends on the bundle being built. // This setter is used in the entrypoint (either index.cjs or index.mjs). @@ -45,6 +46,7 @@ module.exports.processJS = (handlebars, context) => { // app context. const sandboxContext = { $: path => getContextValue(path, cloneDeep(context)), + helpers: getHelperList(), } // Create a sandbox with our context and run the JS diff --git a/packages/string-templates/src/helpers/list.js b/packages/string-templates/src/helpers/list.js new file mode 100644 index 0000000000..a309b9e57f --- /dev/null +++ b/packages/string-templates/src/helpers/list.js @@ -0,0 +1,19 @@ +const externalHandlebars = require("./external") +const helperList = require("@budibase/handlebars-helpers") + +module.exports.getHelperList = () => { + let constructed = [] + for (let collection of externalHandlebars.externalCollections) { + constructed.push(helperList[collection]()) + } + const fullMap = {} + for (let collection of constructed) { + for (let [key, func] of Object.entries(collection)) { + fullMap[key] = func + } + } + for (let key of Object.keys(externalHandlebars.addedHelpers)) { + fullMap[key] = externalHandlebars.addedHelpers[key] + } + return fullMap +} diff --git a/packages/string-templates/src/index.cjs b/packages/string-templates/src/index.cjs index d0de680aca..870e14493a 100644 --- a/packages/string-templates/src/index.cjs +++ b/packages/string-templates/src/index.cjs @@ -19,6 +19,7 @@ module.exports.doesContainStrings = templates.doesContainStrings module.exports.doesContainString = templates.doesContainString module.exports.disableEscaping = templates.disableEscaping module.exports.findHBSBlocks = templates.findHBSBlocks +module.exports.convertToJS = templates.convertToJS /** * Use vm2 to run JS scripts in a node env diff --git a/packages/string-templates/src/index.js b/packages/string-templates/src/index.js index f4feceac4b..eae545de14 100644 --- a/packages/string-templates/src/index.js +++ b/packages/string-templates/src/index.js @@ -8,6 +8,7 @@ const { FIND_ANY_HBS_REGEX, findDoubleHbsInstances, } = require("./utilities") +const { convertHBSBlock } = require("./conversion") const hbsInstance = handlebars.create() registerAll(hbsInstance) @@ -342,3 +343,31 @@ module.exports.findHBSBlocks = string => { module.exports.doesContainString = (template, string) => { return exports.doesContainStrings(template, [string]) } + +module.exports.convertToJS = hbs => { + const blocks = exports.findHBSBlocks(hbs) + let js = "return `", + prevBlock = null + const variables = {} + if (blocks.length === 0) { + js += hbs + } + let count = 1 + for (let block of blocks) { + let stringPart = hbs + if (prevBlock) { + stringPart = stringPart.split(prevBlock)[1] + } + stringPart = stringPart.split(block)[0] + prevBlock = block + const { variable, value } = convertHBSBlock(block, count++) + variables[variable] = value + js += `${stringPart.split()}\${${variable}}` + } + let varBlock = "" + for (let [variable, value] of Object.entries(variables)) { + varBlock += `const ${variable} = ${value};\n` + } + js += "`;" + return `${varBlock}${js}` +} diff --git a/packages/string-templates/src/index.mjs b/packages/string-templates/src/index.mjs index 3d115cdec1..34cb90ea34 100644 --- a/packages/string-templates/src/index.mjs +++ b/packages/string-templates/src/index.mjs @@ -19,6 +19,7 @@ export const doesContainStrings = templates.doesContainStrings export const doesContainString = templates.doesContainString export const disableEscaping = templates.disableEscaping export const findHBSBlocks = templates.findHBSBlocks +export const convertToJS = templates.convertToJS /** * Use polyfilled vm to run JS scripts in a browser Env diff --git a/packages/string-templates/test/hbsToJs.spec.js b/packages/string-templates/test/hbsToJs.spec.js new file mode 100644 index 0000000000..1197907b29 --- /dev/null +++ b/packages/string-templates/test/hbsToJs.spec.js @@ -0,0 +1,84 @@ +const { + convertToJS +} = require("../src/index.cjs") + +function checkLines(response, lines) { + const toCheck = response.split("\n") + let count = 0 + for (let line of lines) { + expect(toCheck[count++]).toBe(line) + } +} + +describe("Test that the string processing works correctly", () => { + it("should convert string without HBS", () => { + const response = convertToJS("Hello my name is Michael") + expect(response).toBe("return `Hello my name is Michael`;") + }) + + it("basic example with square brackets", () => { + const response = convertToJS("{{ [query] }}") + checkLines(response, [ + "const var1 = $(\"[query]\");", + "return `${var1}`;", + ]) + }) + + it("should convert some basic HBS strings", () => { + const response = convertToJS("Hello {{ name }}, welcome to {{ company }}!") + checkLines(response, [ + "const var1 = $(\"name\");", + "const var2 = $(\"company\");", + "return `Hello ${var1}, welcome to ${var2}`;", + ]) + }) + + it("should handle a helper block", () => { + const response = convertToJS("This is the average: {{ avg array }}") + checkLines(response, [ + "const var1 = helpers.avg($(\"array\"));", + "return `This is the average: ${var1}`;", + ]) + }) + + it("should handle multi-variable helper", () => { + const response = convertToJS("This is the average: {{ join ( avg val1 val2 val3 ) }}") + checkLines(response, [ + "const var1 = helpers.join(helpers.avg(...[$(\"val1\"), $(\"val2\"), $(\"val3\")]));", + "return `This is the average: ${var1}`;", + ]) + }) + + it("should handle a complex statement", () => { + const response = convertToJS("This is the average: {{ join ( avg val1 val2 val3 ) val4 }}") + checkLines(response, [ + "const var1 = helpers.join(...[helpers.avg(...[$(\"val1\"), $(\"val2\"), $(\"val3\")]), $(\"val4\")]);", + "return `This is the average: ${var1}`;", + ]) + }) + + it("should handle square brackets", () => { + const response = convertToJS("This is: {{ [val thing] }}") + checkLines(response, [ + "const var1 = $(\"[val thing]\");", + "return `This is: ${var1}`;", + ]) + }) + + it("should handle square brackets with properties", () => { + const response = convertToJS("{{ [user].[_id] }}") + checkLines(response, [ + "const var1 = $(\"[user].[_id]\");", + "return `${var1}`;", + ]) + }) + + it("should handle multiple complex statements", () => { + const response = convertToJS("average: {{ avg ( abs val1 ) val2 }} add: {{ add 1 2 }}") + checkLines(response, [ + "const var1 = helpers.avg(...[helpers.abs($(\"val1\")), $(\"val2\")]);", + "const var2 = helpers.add(...[1, 2]);", + "return `average: ${var1} add: ${var2}`;", + ]) + }) +}) \ No newline at end of file From 011b97d57fda9643ba325ee7a1fd6681abb66448 Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Thu, 28 Jul 2022 20:35:43 +0100 Subject: [PATCH 022/320] important note for pro modifications --- .github/workflows/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index e70b3ce39d..9367ce7073 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -119,6 +119,8 @@ This job is responsible for deploying to our production, cloud kubernetes enviro ## Pro +| **NOTE**: When developing for both pro / budibase repositories, your branch names need to match, or else the correct pro image doesn't get run within your CI job. + ### Installing Pro The pro package is always installed from source in our CI jobs. From 7a6efe3ea8403960d7c27cb9f9d6ae17b60cd5c6 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 29 Jul 2022 09:50:53 +0100 Subject: [PATCH 023/320] Some minor fixes for edge cases. --- .../common/bindings/BindingPanel.svelte | 2 +- .../string-templates/src/conversion/index.js | 11 +++++---- .../string-templates/test/hbsToJs.spec.js | 24 +++++++++++++++---- 3 files changed, 28 insertions(+), 9 deletions(-) diff --git a/packages/builder/src/components/common/bindings/BindingPanel.svelte b/packages/builder/src/components/common/bindings/BindingPanel.svelte index 6f0bc4615a..2a9a64b455 100644 --- a/packages/builder/src/components/common/bindings/BindingPanel.svelte +++ b/packages/builder/src/components/common/bindings/BindingPanel.svelte @@ -62,7 +62,7 @@ const updateValue = val => { valid = isValid(readableToRuntimeBinding(bindings, val)) - console.log(decodeJSBinding(readableToRuntimeBinding(bindings, val))) + console.log(readableToRuntimeBinding(bindings, val)) if (valid) { dispatch("change", val) } diff --git a/packages/string-templates/src/conversion/index.js b/packages/string-templates/src/conversion/index.js index 62abdf6f54..51b760b8c5 100644 --- a/packages/string-templates/src/conversion/index.js +++ b/packages/string-templates/src/conversion/index.js @@ -32,9 +32,9 @@ function buildList(parts, value) { .join(", ") } if (!value) { - return parts.length > 1 ? `...[${build()}]` : build() + return parts.length > 1 ? `${build()}` : build() } else { - return parts.length === 0 ? value : `...[${value}, ${build()}]` + return parts.length === 0 ? value : `${value}, ${build()}` } } @@ -50,12 +50,15 @@ function splitBySpace(layer) { parts.push(layer.substring(started, index + 1).trim()) started = null last = index - } else if (started == null && char === " ") { + } else if (started == null && char === " " && last !== index - 1) { parts.push(layer.substring(last, index).trim()) last = index } } - if (!layer.startsWith("[")) { + if ( + (!layer.startsWith("[") || parts.length === 0) && + last !== layer.length - 1 + ) { parts.push(layer.substring(last, layer.length).trim()) } return parts diff --git a/packages/string-templates/test/hbsToJs.spec.js b/packages/string-templates/test/hbsToJs.spec.js index 1197907b29..aca2e931fc 100644 --- a/packages/string-templates/test/hbsToJs.spec.js +++ b/packages/string-templates/test/hbsToJs.spec.js @@ -24,6 +24,14 @@ describe("Test that the string processing works correctly", () => { ]) }) + it("handle properties", () => { + const response = convertToJS("{{ [query].id }}") + checkLines(response, [ + "const var1 = $(\"[query].id\");", + "return `${var1}`;", + ]) + }) + it("should convert some basic HBS strings", () => { const response = convertToJS("Hello {{ name }}, welcome to {{ company }}!") checkLines(response, [ @@ -33,6 +41,14 @@ describe("Test that the string processing works correctly", () => { ]) }) + it("Should handle many square brackets in helpers", () => { + const response = convertToJS("Hello {{ avg [user].[_id] [user].[_rev] }}") + checkLines(response, [ + "const var1 = helpers.avg($(\"[user].[_id]\"), $(\"[user].[_rev]\"));", + "return `Hello ${var1}`;" + ]) + }) + it("should handle a helper block", () => { const response = convertToJS("This is the average: {{ avg array }}") checkLines(response, [ @@ -44,7 +60,7 @@ describe("Test that the string processing works correctly", () => { it("should handle multi-variable helper", () => { const response = convertToJS("This is the average: {{ join ( avg val1 val2 val3 ) }}") checkLines(response, [ - "const var1 = helpers.join(helpers.avg(...[$(\"val1\"), $(\"val2\"), $(\"val3\")]));", + "const var1 = helpers.join(helpers.avg($(\"val1\"), $(\"val2\"), $(\"val3\")));", "return `This is the average: ${var1}`;", ]) }) @@ -52,7 +68,7 @@ describe("Test that the string processing works correctly", () => { it("should handle a complex statement", () => { const response = convertToJS("This is the average: {{ join ( avg val1 val2 val3 ) val4 }}") checkLines(response, [ - "const var1 = helpers.join(...[helpers.avg(...[$(\"val1\"), $(\"val2\"), $(\"val3\")]), $(\"val4\")]);", + "const var1 = helpers.join(helpers.avg($(\"val1\"), $(\"val2\"), $(\"val3\")), $(\"val4\"));", "return `This is the average: ${var1}`;", ]) }) @@ -76,8 +92,8 @@ describe("Test that the string processing works correctly", () => { it("should handle multiple complex statements", () => { const response = convertToJS("average: {{ avg ( abs val1 ) val2 }} add: {{ add 1 2 }}") checkLines(response, [ - "const var1 = helpers.avg(...[helpers.abs($(\"val1\")), $(\"val2\")]);", - "const var2 = helpers.add(...[1, 2]);", + "const var1 = helpers.avg(helpers.abs($(\"val1\")), $(\"val2\"));", + "const var2 = helpers.add(1, 2);", "return `average: ${var1} add: ${var2}`;", ]) }) From 8a77aca54021e0012040652855fd342e194cb012 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Fri, 29 Jul 2022 13:10:00 +0100 Subject: [PATCH 024/320] more efficient fetching of total users per app --- .../overview/_components/AssignmentModal.svelte | 5 ++--- packages/builder/src/stores/portal/users.js | 6 ++++++ packages/frontend-core/src/api/user.js | 11 +++++++++++ packages/worker/src/api/controllers/global/users.ts | 12 +++++++++++- packages/worker/src/api/routes/global/users.js | 1 + packages/worker/src/sdk/users/users.ts | 13 +++++++++++-- 6 files changed, 42 insertions(+), 6 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/overview/_components/AssignmentModal.svelte b/packages/builder/src/pages/builder/portal/overview/_components/AssignmentModal.svelte index aee7a8aa7d..48503e56e6 100644 --- a/packages/builder/src/pages/builder/portal/overview/_components/AssignmentModal.svelte +++ b/packages/builder/src/pages/builder/portal/overview/_components/AssignmentModal.svelte @@ -13,7 +13,6 @@ export let app export let addData export let appUsers = [] - let prevSearch = undefined, search = undefined let pageInfo = createPaginationStore() @@ -32,7 +31,7 @@ prevSearch = search try { pageInfo.loading() - await users.search({ page, search }) + await users.search({ page, email: search }) pageInfo.fetched($users.hasNextPage, $users.nextPage) } catch (error) { notifications.error("Error getting user list") @@ -83,10 +82,10 @@ group.name} getPrimaryOptionValue={group => group.name} getPrimaryOptionIcon={group => group.icon} diff --git a/packages/builder/src/stores/portal/users.js b/packages/builder/src/stores/portal/users.js index 94fdf806e6..490d1bc9f6 100644 --- a/packages/builder/src/stores/portal/users.js +++ b/packages/builder/src/stores/portal/users.js @@ -61,6 +61,7 @@ export function createUsersStore() { break case "admin": body.admin = { global: true } + body.builder = { global: true } break } @@ -77,6 +78,10 @@ export function createUsersStore() { update(users => users.filter(user => user._id !== id)) } + async function getUserCountByApp({ appId }) { + return await API.getUserCountByApp({ appId }) + } + async function bulkDelete(userIds) { await API.deleteUsers(userIds) } @@ -99,6 +104,7 @@ export function createUsersStore() { create, save, bulkDelete, + getUserCountByApp, delete: del, } } diff --git a/packages/frontend-core/src/api/user.js b/packages/frontend-core/src/api/user.js index b2ecafdb35..17223a80e6 100644 --- a/packages/frontend-core/src/api/user.js +++ b/packages/frontend-core/src/api/user.js @@ -172,4 +172,15 @@ export const buildUserEndpoints = API => ({ }, }) }, + + /** + * Accepts an invite to join the platform and creates a user. + * @param inviteCode the invite code sent in the email + * @param password the password for the newly created user + */ + getUserCountByApp: async ({ appId }) => { + return await API.get({ + url: `/api/global/users/count/${appId}`, + }) + }, }) diff --git a/packages/worker/src/api/controllers/global/users.ts b/packages/worker/src/api/controllers/global/users.ts index ff630efae8..17e655edb3 100644 --- a/packages/worker/src/api/controllers/global/users.ts +++ b/packages/worker/src/api/controllers/global/users.ts @@ -3,7 +3,7 @@ import { checkInviteCode } from "../../../utilities/redis" import { sendEmail } from "../../../utilities/email" import { users } from "../../../sdk" import env from "../../../environment" -import { User, CloudAccount, UserGroup } from "@budibase/types" +import { User, CloudAccount } from "@budibase/types" import { events, errors, @@ -114,6 +114,16 @@ export const adminUser = async (ctx: any) => { }) } +export const countByApp = async (ctx: any) => { + const appId = ctx.params.appId + try { + const response = await users.countUsersByApp(appId) + ctx.body = response + } catch (err: any) { + ctx.throw(err.status || 400, err) + } +} + export const destroy = async (ctx: any) => { const id = ctx.params.id diff --git a/packages/worker/src/api/routes/global/users.js b/packages/worker/src/api/routes/global/users.js index a1aa9fca7f..e62e996443 100644 --- a/packages/worker/src/api/routes/global/users.js +++ b/packages/worker/src/api/routes/global/users.js @@ -64,6 +64,7 @@ router .post("/api/global/users/search", builderOrAdmin, controller.search) .delete("/api/global/users/:id", adminOnly, controller.destroy) .post("/api/global/users/bulkDelete", adminOnly, controller.bulkDelete) + .get("/api/global/users/count/:appId", adminOnly, controller.countByApp) .get("/api/global/roles/:appId") .post( "/api/global/users/invite", diff --git a/packages/worker/src/sdk/users/users.ts b/packages/worker/src/sdk/users/users.ts index 48e4f0db02..d6c667dbfb 100644 --- a/packages/worker/src/sdk/users/users.ts +++ b/packages/worker/src/sdk/users/users.ts @@ -20,7 +20,7 @@ import { groups as groupUtils } from "@budibase/pro" const PAGE_LIMIT = 8 -export const allUsers = async (newDb?: any) => { +export const allUsers = async () => { const db = tenancy.getGlobalDB() const response = await db.allDocs( dbUtils.getGlobalUserParams(null, { @@ -30,6 +30,15 @@ export const allUsers = async (newDb?: any) => { return response.rows.map((row: any) => row.doc) } +export const countUsersByApp = async (appId: string) => { + let response: any = await usersCore.searchGlobalUsersByApp(appId, { + include_docs: true, + }) + return { + userCount: response.length, + } +} + export const paginatedUsers = async ({ page, email, @@ -56,7 +65,7 @@ export const paginatedUsers = async ({ userList = await usersCore.searchGlobalUsersByEmail(email, opts) property = "email" } else { - // no search, query allDocs + // no search, query allDcso const response = await db.allDocs(dbUtils.getGlobalUserParams(null, opts)) userList = response.rows.map((row: any) => row.doc) } From 23dc9f612875448958dc83b57b2f01782ad05af7 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Fri, 29 Jul 2022 13:13:41 +0100 Subject: [PATCH 025/320] fetching of users via new api in app assignment --- .../overview/_components/AccessTab.svelte | 32 +++++++++++++------ .../overview/_components/OverviewTab.svelte | 9 ++++-- 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/overview/_components/AccessTab.svelte b/packages/builder/src/pages/builder/portal/overview/_components/AccessTab.svelte index 65bb90194c..565dfc7aa2 100644 --- a/packages/builder/src/pages/builder/portal/overview/_components/AccessTab.svelte +++ b/packages/builder/src/pages/builder/portal/overview/_components/AccessTab.svelte @@ -29,7 +29,6 @@ let pageInfo = createPaginationStore() let fixedAppId $: page = $pageInfo.page - $: fetchUsers(page, search) $: hasGroupsLicense = $auth.user?.license.features.includes( Constants.Features.USER_GROUPS @@ -37,12 +36,6 @@ $: fixedAppId = apps.getProdAppID(app.devId) - $: appUsers = - $users.data?.filter(x => { - return Object.keys(x.roles).find(y => { - return y === fixedAppId - }) - }) || [] $: appGroups = $groups.filter(x => { return x.apps.includes(app.appId) }) @@ -130,6 +123,12 @@ pageInfo.loading() await users.search({ page, appId: fixedAppId }) pageInfo.fetched($users.hasNextPage, $users.nextPage) + appUsers = + $users.data?.filter(x => { + return Object.keys(x.roles).find(y => { + return y === fixedAppId + }) + }) || [] } catch (error) { notifications.error("Error getting user list") } @@ -137,6 +136,8 @@ onMount(async () => { try { + await fetchUsers(page, search) + await groups.actions.init() await apps.load() await roles.fetch() @@ -212,8 +213,14 @@ page={$pageInfo.pageNumber} hasPrevPage={$pageInfo.loading ? false : $pageInfo.hasPrevPage} hasNextPage={$pageInfo.loading ? false : $pageInfo.hasNextPage} - goToPrevPage={pageInfo.prevPage} - goToNextPage={pageInfo.nextPage} + goToPrevPage={async () => { + await pageInfo.prevPage() + fetchUsers(page, search) + }} + goToNextPage={async () => { + await pageInfo.nextPage() + fetchUsers(page, search) + }} /> {/if} @@ -264,4 +271,11 @@ justify-content: space-between; align-items: center; } + + .pagination { + display: flex; + flex-direction: row; + justify-content: flex-end; + margin-top: var(--spacing-xl); + } diff --git a/packages/builder/src/pages/builder/portal/overview/_components/OverviewTab.svelte b/packages/builder/src/pages/builder/portal/overview/_components/OverviewTab.svelte index 6693c285ff..3e8e15fb2c 100644 --- a/packages/builder/src/pages/builder/portal/overview/_components/OverviewTab.svelte +++ b/packages/builder/src/pages/builder/portal/overview/_components/OverviewTab.svelte @@ -11,7 +11,7 @@ export let app export let deployments export let navigateTab - + let userCount const dispatch = createEventDispatcher() const unpublishApp = () => { @@ -40,7 +40,9 @@ } onMount(async () => { - await users.search({ page: undefined, appId: "app_" + app.appId }) + let resp = await users.getUserCountByApp({ appId: "app_" + app.appId }) + userCount = resp.userCount + await users.search({ appId: "app_" + app.appId, limit: 4 }) }) @@ -155,7 +157,8 @@
- {$users?.data.length} users have access to this app + {userCount} + {userCount > 1 ? `users have` : `user has`} access to this app
{:else} From 5477ffe5755247651d513a6f6b87a1857a64394b Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Fri, 29 Jul 2022 13:17:17 +0100 Subject: [PATCH 026/320] improve email validation --- .../bbui/src/Form/Core/InputDropdown.svelte | 10 ++++++ .../bbui/src/Form/Core/PickerDropdown.svelte | 35 ++++++++----------- packages/bbui/src/Form/PickerDropdown.svelte | 7 ++++ .../users/_components/AddUserModal.svelte | 9 ++++- .../_components/NameTableRenderer.svelte | 2 +- 5 files changed, 41 insertions(+), 22 deletions(-) diff --git a/packages/bbui/src/Form/Core/InputDropdown.svelte b/packages/bbui/src/Form/Core/InputDropdown.svelte index 723b8ba9b1..8865ee3ddc 100644 --- a/packages/bbui/src/Form/Core/InputDropdown.svelte +++ b/packages/bbui/src/Form/Core/InputDropdown.svelte @@ -115,6 +115,16 @@ class:is-disabled={disabled} class:is-focused={focus} > + {#if error} + + {/if} + { - return x.name === primaryFieldText - }) - */ + + const updateSearch = e => { + dispatch("search", e.detail) + } + const updateValue = newValue => { if (readonly) { return @@ -107,16 +103,6 @@ updateValue(event.target.value) } } - - const getFilteredOptions = (options, term, getLabel) => { - if (autocomplete && term) { - const lowerCaseTerm = term.toLowerCase() - return options.filter(option => { - return `${getLabel(option)}`.toLowerCase().includes(lowerCaseTerm) - }) - } - return options - }
+ {#if autocomplete} + updateSearch(event)} + {disabled} + placeholder="Search" + /> + {/if} +
    {#if placeholderOption}
  • { + searchTerm = e.detail + } {/each}
    diff --git a/packages/builder/src/pages/builder/portal/manage/users/_components/NameTableRenderer.svelte b/packages/builder/src/pages/builder/portal/manage/users/_components/NameTableRenderer.svelte index af61ea2d57..a4b65c4d62 100644 --- a/packages/builder/src/pages/builder/portal/manage/users/_components/NameTableRenderer.svelte +++ b/packages/builder/src/pages/builder/portal/manage/users/_components/NameTableRenderer.svelte @@ -17,7 +17,7 @@
    {value} {:else} -
    Not Available
    +
    -
    {/if}
From 00ee5ccf31258f1a1ee88d7ad3b7e39550767df9 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Fri, 29 Jul 2022 13:21:42 +0100 Subject: [PATCH 027/320] handle undefined user name and avatar initials --- .../src/pages/builder/portal/_layout.svelte | 13 ++++-- .../portal/manage/users/[userId].svelte | 41 ++++++++++++++----- .../builder/portal/manage/users/index.svelte | 16 ++++---- .../overview/[application]/index.svelte | 2 +- 4 files changed, 49 insertions(+), 23 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/_layout.svelte b/packages/builder/src/pages/builder/portal/_layout.svelte index 5da8b34700..dcebe0e2c9 100644 --- a/packages/builder/src/pages/builder/portal/_layout.svelte +++ b/packages/builder/src/pages/builder/portal/_layout.svelte @@ -45,6 +45,15 @@ }, ]) } + if (isEnabled(FEATURE_FLAGS.USER_GROUPS)) { + menu = menu.concat([ + { + title: "User Groups", + href: "/builder/portal/manage/groups", + }, + ]) + } + if (admin) { menu = menu.concat([ { @@ -52,10 +61,6 @@ href: "/builder/portal/manage/users", heading: "Manage", }, - { - title: "User Groups", - href: "/builder/portal/manage/groups", - }, { title: "Auth", href: "/builder/portal/manage/auth" }, { title: "Email", href: "/builder/portal/manage/email" }, diff --git a/packages/builder/src/pages/builder/portal/manage/users/[userId].svelte b/packages/builder/src/pages/builder/portal/manage/users/[userId].svelte index 28c5aa2593..ed30c0347d 100644 --- a/packages/builder/src/pages/builder/portal/manage/users/[userId].svelte +++ b/packages/builder/src/pages/builder/portal/manage/users/[userId].svelte @@ -41,6 +41,11 @@ let allAppList = [] let user $: fetchUser(userId) + + $: fullName = $userFetch?.data?.firstName + ? $userFetch?.data?.firstName + " " + $userFetch?.data?.lastName + : "" + $: hasGroupsLicense = $auth.user?.license.features.includes( Constants.Features.USER_GROUPS ) @@ -127,7 +132,7 @@ if (detail === "developer") { toggleFlags({ admin: { global: false }, builder: { global: true } }) } else if (detail === "admin") { - toggleFlags({ admin: { global: true }, builder: { global: false } }) + toggleFlags({ admin: { global: true }, builder: { global: true } }) } else if (detail === "appUser") { toggleFlags({ admin: { global: false }, builder: { global: false } }) } @@ -186,15 +191,25 @@
- -
- {$userFetch?.data?.firstName + - " " + - $userFetch?.data?.lastName} - {$userFetch?.data?.email} -
+ x[0]) + .join("")} + /> + + {#if fullName} +
+ {fullName} + + {$userFetch?.data?.email} +
+ {:else} +
+ {$userFetch?.data?.email} +
+ {/if}
@@ -372,4 +387,10 @@ display: flex; flex-direction: column; } + + .alignEmail { + display: flex; + align-items: center; + margin-left: var(--spacing-m); + } diff --git a/packages/builder/src/pages/builder/portal/manage/users/index.svelte b/packages/builder/src/pages/builder/portal/manage/users/index.svelte index 952acaf324..5a6c58aed1 100644 --- a/packages/builder/src/pages/builder/portal/manage/users/index.svelte +++ b/packages/builder/src/pages/builder/portal/manage/users/index.svelte @@ -72,19 +72,12 @@ name: {}, email: {}, role: { - noPropagation: true, sortable: false, }, ...(hasGroupsLicense && { userGroups: { sortable: false, displayName: "User groups" }, }), - apps: { width: "120px" }, - settings: { - sortable: false, - width: "60px", - displayName: "", - align: "Right", - }, + apps: {}, } $: userData = [] @@ -323,6 +316,13 @@ diff --git a/packages/builder/src/pages/builder/portal/manage/users/_components/ImportUsersModal.svelte b/packages/builder/src/pages/builder/portal/manage/users/_components/ImportUsersModal.svelte index 64334b4ab2..bc8a0d1f1f 100644 --- a/packages/builder/src/pages/builder/portal/manage/users/_components/ImportUsersModal.svelte +++ b/packages/builder/src/pages/builder/portal/manage/users/_components/ImportUsersModal.svelte @@ -108,10 +108,6 @@ From b838a66954200678a149d5fdf40a811a35c6143c Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 2 Aug 2022 16:41:15 +0100 Subject: [PATCH 110/320] Update styles in user details page and user list page --- .../portal/manage/users/[userId].svelte | 22 ++-- .../_components/RoleTableRenderer.svelte | 18 +-- .../builder/portal/manage/users/index.svelte | 117 +++++++----------- 3 files changed, 62 insertions(+), 95 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/manage/users/[userId].svelte b/packages/builder/src/pages/builder/portal/manage/users/[userId].svelte index df228f8fbc..74a1629357 100644 --- a/packages/builder/src/pages/builder/portal/manage/users/[userId].svelte +++ b/packages/builder/src/pages/builder/portal/manage/users/[userId].svelte @@ -216,15 +216,13 @@ {#if loaded} - - -
- $goto("./")} icon="ArrowLeft"> - Back - -
-
- + +
+ $goto("./")} icon="ArrowLeft"> + Back + +
+
@@ -253,8 +251,6 @@
{/if}
- -
@@ -291,7 +287,7 @@
- User groups + User groups Add or remove this user from user groups
@@ -337,7 +333,7 @@
- Apps + Apps Manage apps that this user has been assigned to
diff --git a/packages/builder/src/pages/builder/portal/manage/users/_components/RoleTableRenderer.svelte b/packages/builder/src/pages/builder/portal/manage/users/_components/RoleTableRenderer.svelte index 4f481d374c..0a2daf7580 100644 --- a/packages/builder/src/pages/builder/portal/manage/users/_components/RoleTableRenderer.svelte +++ b/packages/builder/src/pages/builder/portal/manage/users/_components/RoleTableRenderer.svelte @@ -3,14 +3,18 @@ import { Constants } from "@budibase/frontend-core" export let row - $: value = - Constants.BbRoles.find(x => x.value === users.getUserRole(row))?.label || - "Not Available" + + const TooltipMap = { + appUser: "Only has access to published apps", + developer: "Access to the app builder", + admin: "Full access", + } + + $: role = Constants.BbRoles.find(x => x.value === users.getUserRole(row)) + $: value = role?.label || "Not available" + $: tooltip = TooltipMap[role?.value] || "" -
+
{value}
- - diff --git a/packages/builder/src/pages/builder/portal/manage/users/index.svelte b/packages/builder/src/pages/builder/portal/manage/users/index.svelte index b6cac9ece3..b5b4881d14 100644 --- a/packages/builder/src/pages/builder/portal/manage/users/index.svelte +++ b/packages/builder/src/pages/builder/portal/manage/users/index.svelte @@ -8,11 +8,9 @@ Layout, Modal, ModalContent, - Icon, + Search, notifications, Pagination, - Search, - Label, } from "@budibase/bbui" import AddUserModal from "./_components/AddUserModal.svelte" import { users, groups, auth } from "stores/portal" @@ -30,21 +28,6 @@ import { Constants } from "@budibase/frontend-core" import { get } from "svelte/store" - const accessTypes = [ - { - icon: "User", - description: "App user - Only has access to published apps", - }, - { - icon: "Hammer", - description: "Developer - Access to the app builder", - }, - { - icon: "Draw", - description: "Admin - Full access", - }, - ] - //let email let enrichedUsers = [] let createUserModal, @@ -236,19 +219,8 @@ Users Add users and control who gets access to your published apps - -
- {#each accessTypes as type} -
- -
- {type.description} -
-
- {/each} -
- +
- - -
- - -
+ Import users + +
+
+ {#if selectedRows.length > 0} {/if} - - $goto(`./${detail._id}`)} - {schema} - bind:selectedRows - data={enrichedUsers} - allowEditColumns={false} - allowEditRows={false} - allowSelectRows={true} - showHeaderBorder={false} - {customRenderers} - /> - - + + +
$goto(`./${detail._id}`)} + {schema} + bind:selectedRows + data={enrichedUsers} + allowEditColumns={false} + allowEditRows={false} + allowSelectRows={true} + showHeaderBorder={false} + {customRenderers} + /> + @@ -325,28 +301,19 @@ display: flex; flex-direction: row; justify-content: flex-end; - margin-top: var(--spacing-xl); } - .field { + .controls { display: flex; - align-items: center; flex-direction: row; - grid-gap: var(--spacing-m); - margin-left: auto; + justify-content: space-between; + align-items: center; } - - .field > :global(*) + :global(*) { - margin-left: var(--spacing-m); - } - - .access-description { + .controls-right { display: flex; - margin-top: var(--spacing-xl); - opacity: 0.8; - } - - .access-text { - margin-left: var(--spacing-m); + flex-direction: row; + justify-content: flex-end; + align-items: center; + gap: var(--spacing-xl); } From e9df049e017b9c50c0f9d2e32636fad137dbdae8 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 2 Aug 2022 16:44:37 +0100 Subject: [PATCH 111/320] Update delete rows button to be configurable --- .../backend/DataTable/buttons/DeleteRowsButton.svelte | 7 +++++-- .../src/pages/builder/portal/manage/users/index.svelte | 7 ++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/buttons/DeleteRowsButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/DeleteRowsButton.svelte index 3d662ed556..e70a0aa042 100644 --- a/packages/builder/src/components/backend/DataTable/buttons/DeleteRowsButton.svelte +++ b/packages/builder/src/components/backend/DataTable/buttons/DeleteRowsButton.svelte @@ -5,6 +5,7 @@ export let selectedRows export let deleteRows + export let item = "row" const dispatch = createEventDispatcher() let modal @@ -14,12 +15,14 @@ modal?.hide() dispatch("updaterows") } + + $: text = `${item}${selectedRows?.length === 1 ? "" : "s"}` Are you sure you want to delete {selectedRows.length} - row{selectedRows.length > 1 ? "s" : ""}? + {text}? diff --git a/packages/builder/src/pages/builder/portal/manage/users/index.svelte b/packages/builder/src/pages/builder/portal/manage/users/index.svelte index b5b4881d14..e48ace9160 100644 --- a/packages/builder/src/pages/builder/portal/manage/users/index.svelte +++ b/packages/builder/src/pages/builder/portal/manage/users/index.svelte @@ -240,7 +240,12 @@
{#if selectedRows.length > 0} - + {/if}
From 4f84fb069bb2c3b9468b8d65ef12cbbfbc8d9f73 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 2 Aug 2022 16:46:00 +0100 Subject: [PATCH 112/320] Fix type in import users modal --- .../portal/manage/users/_components/ImportUsersModal.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/pages/builder/portal/manage/users/_components/ImportUsersModal.svelte b/packages/builder/src/pages/builder/portal/manage/users/_components/ImportUsersModal.svelte index bc8a0d1f1f..522d4cb826 100644 --- a/packages/builder/src/pages/builder/portal/manage/users/_components/ImportUsersModal.svelte +++ b/packages/builder/src/pages/builder/portal/manage/users/_components/ImportUsersModal.svelte @@ -81,7 +81,7 @@ onConfirm={() => createUsersFromCsv({ userEmails, usersRole, userGroups })} disabled={!userEmails.length || !validEmails(userEmails) || !usersRole} > - Import your users email addrresses from a CSV + Import your users email addresses from a CSV
From 82c75b43de90b5af54e530d7a2965e324172c5bb Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 2 Aug 2022 17:05:27 +0000 Subject: [PATCH 113/320] v1.1.33-alpha.4 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lerna.json b/lerna.json index b1b9369f4f..cc9bd6bd85 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.1.33-alpha.3", + "version": "1.1.33-alpha.4", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 1ea4fec4c4..3a40b37d9c 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.1.33-alpha.3", + "version": "1.1.33-alpha.4", "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.1.33-alpha.3", + "@budibase/types": "1.1.33-alpha.4", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", "bcrypt": "5.0.1", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 808f30dbea..08e79914bc 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.1.33-alpha.3", + "version": "1.1.33-alpha.4", "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.1.33-alpha.3", + "@budibase/string-templates": "1.1.33-alpha.4", "@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 7c2f4ab3e4..d50d9c2287 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.1.33-alpha.3", + "version": "1.1.33-alpha.4", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "1.1.33-alpha.3", - "@budibase/client": "1.1.33-alpha.3", - "@budibase/frontend-core": "1.1.33-alpha.3", - "@budibase/string-templates": "1.1.33-alpha.3", + "@budibase/bbui": "1.1.33-alpha.4", + "@budibase/client": "1.1.33-alpha.4", + "@budibase/frontend-core": "1.1.33-alpha.4", + "@budibase/string-templates": "1.1.33-alpha.4", "@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 ee04c8eb31..390f89813e 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.1.33-alpha.3", + "version": "1.1.33-alpha.4", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index af4d7bf806..0d9348a85a 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.1.33-alpha.3", + "version": "1.1.33-alpha.4", "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.1.33-alpha.3", - "@budibase/frontend-core": "1.1.33-alpha.3", - "@budibase/string-templates": "1.1.33-alpha.3", + "@budibase/bbui": "1.1.33-alpha.4", + "@budibase/frontend-core": "1.1.33-alpha.4", + "@budibase/string-templates": "1.1.33-alpha.4", "@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 1d70c86cd7..e52cbd5c3a 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.1.33-alpha.3", + "version": "1.1.33-alpha.4", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "1.1.33-alpha.3", + "@budibase/bbui": "1.1.33-alpha.4", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 02ccbb875f..bd2075cf87 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "1.1.33-alpha.3", + "version": "1.1.33-alpha.4", "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.1.33-alpha.3", - "@budibase/client": "1.1.33-alpha.3", + "@budibase/backend-core": "1.1.33-alpha.4", + "@budibase/client": "1.1.33-alpha.4", "@budibase/pro": "1.1.33-alpha.3", - "@budibase/string-templates": "1.1.33-alpha.3", - "@budibase/types": "1.1.33-alpha.3", + "@budibase/string-templates": "1.1.33-alpha.4", + "@budibase/types": "1.1.33-alpha.4", "@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 419a530d50..ce472cf6f5 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.1.33-alpha.3", + "version": "1.1.33-alpha.4", "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 c3723be162..eaca5b3bbf 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.1.33-alpha.3", + "version": "1.1.33-alpha.4", "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 974aead2d4..71135d167e 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "1.1.33-alpha.3", + "version": "1.1.33-alpha.4", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -35,10 +35,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "1.1.33-alpha.3", + "@budibase/backend-core": "1.1.33-alpha.4", "@budibase/pro": "1.1.33-alpha.3", - "@budibase/string-templates": "1.1.33-alpha.3", - "@budibase/types": "1.1.33-alpha.3", + "@budibase/string-templates": "1.1.33-alpha.4", + "@budibase/types": "1.1.33-alpha.4", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 03ae7f8e255107c5f2eced84e13f159d75d9c0dc Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 2 Aug 2022 17:08:30 +0000 Subject: [PATCH 114/320] Update pro version to 1.1.33-alpha.4 --- 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 bd2075cf87..0f07104af2 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "1.1.33-alpha.4", "@budibase/client": "1.1.33-alpha.4", - "@budibase/pro": "1.1.33-alpha.3", + "@budibase/pro": "1.1.33-alpha.4", "@budibase/string-templates": "1.1.33-alpha.4", "@budibase/types": "1.1.33-alpha.4", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 6b64c228f6..744803548c 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.1.33-alpha.3": - version "1.1.33-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.1.33-alpha.3.tgz#3ae8b800a1b6c1beed834637b9050812bd1e00d7" - integrity sha512-v63wVHvTdxnHaL7ZfrIxeK1EBDfTHBFqTBd/H5LPs5PN8Jx52Hsn48eyQHrveRbkRpvoAiAzCL+ukVx6S9g86g== +"@budibase/backend-core@1.1.33-alpha.4": + version "1.1.33-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.1.33-alpha.4.tgz#207ffe45d41535e59ccc21cca9892d1e41818a14" + integrity sha512-p8SZkODBF4+BhfIYWIkUtJhR04OjvkmkrVTSFWXv2NTkIbSpaJGTkx9Kao+1Dn4N3H4jU4OBdmScy+C8F5MeSw== dependencies: - "@budibase/types" "1.1.33-alpha.3" + "@budibase/types" "1.1.33-alpha.4" "@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.1.33-alpha.3": - version "1.1.33-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.1.33-alpha.3.tgz#7670dc446f31fc2eb02a0b13897d8f8aac2234c7" - integrity sha512-RhlG5RJw7krbcJfizZ/DiGoz1INareJ9xviJeFJx2PFZV7BH07CLNUs4IhW5jf2WOBLC0hJXBnVvM2A6MFENbA== +"@budibase/pro@1.1.33-alpha.4": + version "1.1.33-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.1.33-alpha.4.tgz#d25bc2ca73d11adfdc659e324b1e8de31c17657a" + integrity sha512-CQ3zVbom4ndzIfUznUSERQ4Bz6ZVuy4HbOYGKKkU/FjoWqrYRK1tqlhmfCNQy8P9rnKURCUf3PMoWVWSOAS24g== dependencies: - "@budibase/backend-core" "1.1.33-alpha.3" - "@budibase/types" "1.1.33-alpha.3" + "@budibase/backend-core" "1.1.33-alpha.4" + "@budibase/types" "1.1.33-alpha.4" "@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.1.33-alpha.3": - version "1.1.33-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.1.33-alpha.3.tgz#0e12b680f0fa1f8444075fc657440bc7e1ffc666" - integrity sha512-hGmtMvuSwW/ydwUm+Mz5wxky8aoQi4laySJhMeWWyMsOcinYYhZIvRIv5hO3nkFbZDDb+8QxckZzfK2WTmmZVA== +"@budibase/types@1.1.33-alpha.4": + version "1.1.33-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.1.33-alpha.4.tgz#a8de79c385280389be8b2cc214185caddf5fe4d3" + integrity sha512-od/gbLgbJnHsVlCvBQkuJf3t/Y9VLUNRYPl3Y4IbNOylpj3rSOKVGF3jANQgkI+pOBt5ni3Xlhc7aOI3qAning== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 71135d167e..827d323c98 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -36,7 +36,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "1.1.33-alpha.4", - "@budibase/pro": "1.1.33-alpha.3", + "@budibase/pro": "1.1.33-alpha.4", "@budibase/string-templates": "1.1.33-alpha.4", "@budibase/types": "1.1.33-alpha.4", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 2b6203fb04..8e682666fe 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.1.33-alpha.3": - version "1.1.33-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.1.33-alpha.3.tgz#3ae8b800a1b6c1beed834637b9050812bd1e00d7" - integrity sha512-v63wVHvTdxnHaL7ZfrIxeK1EBDfTHBFqTBd/H5LPs5PN8Jx52Hsn48eyQHrveRbkRpvoAiAzCL+ukVx6S9g86g== +"@budibase/backend-core@1.1.33-alpha.4": + version "1.1.33-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.1.33-alpha.4.tgz#207ffe45d41535e59ccc21cca9892d1e41818a14" + integrity sha512-p8SZkODBF4+BhfIYWIkUtJhR04OjvkmkrVTSFWXv2NTkIbSpaJGTkx9Kao+1Dn4N3H4jU4OBdmScy+C8F5MeSw== dependencies: - "@budibase/types" "1.1.33-alpha.3" + "@budibase/types" "1.1.33-alpha.4" "@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.1.33-alpha.3": - version "1.1.33-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.1.33-alpha.3.tgz#7670dc446f31fc2eb02a0b13897d8f8aac2234c7" - integrity sha512-RhlG5RJw7krbcJfizZ/DiGoz1INareJ9xviJeFJx2PFZV7BH07CLNUs4IhW5jf2WOBLC0hJXBnVvM2A6MFENbA== +"@budibase/pro@1.1.33-alpha.4": + version "1.1.33-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.1.33-alpha.4.tgz#d25bc2ca73d11adfdc659e324b1e8de31c17657a" + integrity sha512-CQ3zVbom4ndzIfUznUSERQ4Bz6ZVuy4HbOYGKKkU/FjoWqrYRK1tqlhmfCNQy8P9rnKURCUf3PMoWVWSOAS24g== dependencies: - "@budibase/backend-core" "1.1.33-alpha.3" - "@budibase/types" "1.1.33-alpha.3" + "@budibase/backend-core" "1.1.33-alpha.4" + "@budibase/types" "1.1.33-alpha.4" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.1.33-alpha.3": - version "1.1.33-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.1.33-alpha.3.tgz#0e12b680f0fa1f8444075fc657440bc7e1ffc666" - integrity sha512-hGmtMvuSwW/ydwUm+Mz5wxky8aoQi4laySJhMeWWyMsOcinYYhZIvRIv5hO3nkFbZDDb+8QxckZzfK2WTmmZVA== +"@budibase/types@1.1.33-alpha.4": + version "1.1.33-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.1.33-alpha.4.tgz#a8de79c385280389be8b2cc214185caddf5fe4d3" + integrity sha512-od/gbLgbJnHsVlCvBQkuJf3t/Y9VLUNRYPl3Y4IbNOylpj3rSOKVGF3jANQgkI+pOBt5ni3Xlhc7aOI3qAning== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From 129c9662266bc6b1b29cf61a9aa6a14fcf074b3f Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 2 Aug 2022 18:34:58 +0100 Subject: [PATCH 115/320] Updating the filter system to allow adding multiple filter properties of the same name at once, as well as enabling the use of the allOr property from within the UI - resolves an old issue #2585. --- .../controls/FilterEditor/FilterDrawer.svelte | 29 +++++++- .../controls/FilterEditor/FilterEditor.svelte | 66 +++++++++++++++++-- packages/frontend-core/src/utils/lucene.js | 4 ++ .../src/api/controllers/row/internalSearch.js | 3 + .../server/src/api/controllers/row/utils.js | 7 +- packages/server/src/integrations/base/sql.ts | 8 ++- .../server/src/integrations/base/utils.ts | 40 ++++++----- .../server/src/integrations/queries/sql.ts | 1 - 8 files changed, 130 insertions(+), 28 deletions(-) diff --git a/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte b/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte index aa191ce0ea..1d9c3dea09 100644 --- a/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte +++ b/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte @@ -9,19 +9,26 @@ Input, Layout, Select, + Toggle, + Label, } from "@budibase/bbui" import DrawerBindableInput from "components/common/bindings/DrawerBindableInput.svelte" import ClientBindingPanel from "components/common/bindings/ClientBindingPanel.svelte" import { generate } from "shortid" import { LuceneUtils, Constants } from "@budibase/frontend-core" import { getFields } from "helpers/searchFields" + import { createEventDispatcher } from "svelte" + + const dispatch = createEventDispatcher() export let schemaFields export let filters = [] export let bindings = [] export let panel = ClientBindingPanel export let allowBindings = true + export let allOr = false + $: dispatch("change", filters) $: enrichedSchemaFields = getFields(schemaFields || []) $: fieldOptions = enrichedSchemaFields.map(field => field.name) || [] $: valueTypeOptions = allowBindings ? ["Value", "Binding"] : ["Value"] @@ -69,7 +76,7 @@ } // if changed to an array, change default value to empty array - const idx = filters.findIndex(x => x.field === field) + const idx = filters.findIndex(x => x.id === expression.id) if (expression.type === "array") { filters[idx].value = [] } else { @@ -179,10 +186,16 @@ {/each}
{/if} -
+
+
+ (allOr = event.detail)} + /> +
@@ -202,4 +215,16 @@ align-items: center; grid-template-columns: 1fr 120px 120px 1fr auto auto; } + + .toggle { + display: flex; + align-items: center; + padding-right: var(--spacing-s); + } + + .bottom { + display: flex; + justify-content: space-between; + align-items: center; + } diff --git a/packages/builder/src/components/design/settings/controls/FilterEditor/FilterEditor.svelte b/packages/builder/src/components/design/settings/controls/FilterEditor/FilterEditor.svelte index 2cb35a9cf5..ea54afc0ee 100644 --- a/packages/builder/src/components/design/settings/controls/FilterEditor/FilterEditor.svelte +++ b/packages/builder/src/components/design/settings/controls/FilterEditor/FilterEditor.svelte @@ -8,21 +8,73 @@ import FilterDrawer from "./FilterDrawer.svelte" import { currentAsset } from "builderStore" + const QUERY_START_REGEX = /\d[0-9]*:/g const dispatch = createEventDispatcher() export let value = [] export let componentInstance export let bindings = [] - let drawer - let tempValue = value || [] + let drawer, + toSaveFilters = null, + allOr, + initialAllOr + $: initialFilters = correctFilters(value || []) $: dataSource = getDatasourceForProvider($currentAsset, componentInstance) $: schema = getSchemaForDatasource($currentAsset, dataSource)?.schema $: schemaFields = Object.values(schema || {}) - const saveFilter = async () => { - dispatch("change", tempValue) + function addNumbering(filters) { + let count = 1 + for (let value of filters) { + if (value.field && value.field?.match(QUERY_START_REGEX) == null) { + value.field = `${count++}:${value.field}` + } + } + return filters + } + + function correctFilters(filters) { + const corrected = [] + for (let filter of filters) { + let field = filter.field + if (filter.operator === "allOr") { + initialAllOr = allOr = true + continue + } + if ( + typeof filter.field === "string" && + filter.field.match(QUERY_START_REGEX) != null + ) { + const parts = field.split(":") + const number = parts[0] + // it's the new format, remove number + if (!isNaN(parseInt(number))) { + parts.shift() + field = parts.join(":") + } + } + corrected.push({ + ...filter, + field, + }) + } + return corrected + } + + async function saveFilter() { + if (!toSaveFilters && allOr !== initialAllOr) { + toSaveFilters = initialFilters + } + const filters = toSaveFilters?.filter(filter => filter.operator !== "allOr") + if (allOr && filters) { + filters.push({ operator: "allOr" }) + } + // only save if anything was updated + if (filters) { + dispatch("change", addNumbering(filters)) + } notifications.success("Filters saved.") drawer.hide() } @@ -33,8 +85,12 @@ { + toSaveFilters = event.detail + }} /> diff --git a/packages/frontend-core/src/utils/lucene.js b/packages/frontend-core/src/utils/lucene.js index b6699628d1..780cb2da39 100644 --- a/packages/frontend-core/src/utils/lucene.js +++ b/packages/frontend-core/src/utils/lucene.js @@ -103,6 +103,10 @@ export const buildLuceneQuery = filter => { const isHbs = typeof value === "string" && value.match(HBS_REGEX)?.length > 0 // Parse all values into correct types + if (operator === "allOr") { + query.allOr = true + return + } if (type === "datetime") { // Ensure date value is a valid date and parse into correct format if (!value) { diff --git a/packages/server/src/api/controllers/row/internalSearch.js b/packages/server/src/api/controllers/row/internalSearch.js index 8a04fc2bd0..ab084d9e0b 100644 --- a/packages/server/src/api/controllers/row/internalSearch.js +++ b/packages/server/src/api/controllers/row/internalSearch.js @@ -1,4 +1,5 @@ const { SearchIndexes } = require("../../../db/utils") +const { removeKeyNumbering } = require("./utils") const fetch = require("node-fetch") const { getCouchInfo } = require("@budibase/backend-core/db") const { getAppId } = require("@budibase/backend-core/context") @@ -197,6 +198,8 @@ class QueryBuilder { function build(structure, queryFn) { for (let [key, value] of Object.entries(structure)) { + // check for new format - remove numbering if needed + key = removeKeyNumbering(key) key = builder.preprocess(key.replace(/ /g, "_"), { escape: true, }) diff --git a/packages/server/src/api/controllers/row/utils.js b/packages/server/src/api/controllers/row/utils.js index 5da7ca331e..da14020757 100644 --- a/packages/server/src/api/controllers/row/utils.js +++ b/packages/server/src/api/controllers/row/utils.js @@ -3,8 +3,11 @@ const { cloneDeep } = require("lodash/fp") const { InternalTables } = require("../../../db/utils") const userController = require("../user") const { FieldTypes } = require("../../../constants") -const { makeExternalQuery } = require("../../../integrations/base/utils") const { getAppDB } = require("@budibase/backend-core/context") +const { + makeExternalQuery, + removeKeyNumbering, +} = require("../../../integrations/base/utils") validateJs.extend(validateJs.validators.datetime, { parse: function (value) { @@ -16,6 +19,8 @@ validateJs.extend(validateJs.validators.datetime, { }, }) +exports.removeKeyNumbering = removeKeyNumbering + exports.getDatasourceAndQuery = async json => { const datasourceId = json.endpoint.datasourceId const db = getAppDB() diff --git a/packages/server/src/integrations/base/sql.ts b/packages/server/src/integrations/base/sql.ts index 750564c6ff..a46ce7aea2 100644 --- a/packages/server/src/integrations/base/sql.ts +++ b/packages/server/src/integrations/base/sql.ts @@ -10,6 +10,7 @@ import { import { isIsoDateString, SqlClients } from "../utils" import SqlTableQueryBuilder from "./sqlTable" import environment from "../../environment" +import { removeKeyNumbering } from "./utils" const envLimit = environment.SQL_MAX_ROWS ? parseInt(environment.SQL_MAX_ROWS) @@ -133,12 +134,13 @@ class InternalBuilder { fn: (key: string, value: any) => void ) { for (let [key, value] of Object.entries(structure)) { - const isRelationshipField = key.includes(".") + const updatedKey = removeKeyNumbering(key) + const isRelationshipField = updatedKey.includes(".") if (!opts.relationship && !isRelationshipField) { - fn(`${opts.tableName}.${key}`, value) + fn(`${opts.tableName}.${updatedKey}`, value) } if (opts.relationship && isRelationshipField) { - fn(key, value) + fn(updatedKey, value) } } } diff --git a/packages/server/src/integrations/base/utils.ts b/packages/server/src/integrations/base/utils.ts index 086912b920..0913d59b2a 100644 --- a/packages/server/src/integrations/base/utils.ts +++ b/packages/server/src/integrations/base/utils.ts @@ -1,22 +1,30 @@ import { QueryJson } from "../../definitions/datasource" import { Datasource } from "../../definitions/common" +const { integrations } = require("../index") -module DatasourceUtils { - const { integrations } = require("../index") +const QUERY_START_REGEX = /\d[0-9]*:/g - export async function makeExternalQuery( - datasource: Datasource, - json: QueryJson - ) { - const Integration = integrations[datasource.source] - // query is the opinionated function - if (Integration.prototype.query) { - const integration = new Integration(datasource.config) - return integration.query(json) - } else { - throw "Datasource does not support query." - } +export async function makeExternalQuery( + datasource: Datasource, + json: QueryJson +) { + const Integration = integrations[datasource.source] + // query is the opinionated function + if (Integration.prototype.query) { + const integration = new Integration(datasource.config) + return integration.query(json) + } else { + throw "Datasource does not support query." + } +} + +export function removeKeyNumbering(key: any): string { + if (typeof key === "string" && key.match(QUERY_START_REGEX) != null) { + const parts = key.split(":") + // remove the number + parts.shift() + return parts.join(":") + } else { + return key } - - module.exports.makeExternalQuery = makeExternalQuery } diff --git a/packages/server/src/integrations/queries/sql.ts b/packages/server/src/integrations/queries/sql.ts index 271a414d44..7fbcfea0a3 100644 --- a/packages/server/src/integrations/queries/sql.ts +++ b/packages/server/src/integrations/queries/sql.ts @@ -1,5 +1,4 @@ import { findHBSBlocks, processStringSync } from "@budibase/string-templates" -import { Integration } from "../../definitions/datasource" import { DatasourcePlus } from "../base/datasourcePlus" const CONST_CHAR_REGEX = new RegExp("'[^']*'", "g") From d79b95b710cecd93230d93bb15dbb6095a8c1462 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 2 Aug 2022 18:47:00 +0100 Subject: [PATCH 116/320] Update users page to be narrow and remove name column --- packages/bbui/src/Table/Table.svelte | 13 ------------- .../pages/builder/portal/manage/_layout.svelte | 1 - .../_components/GroupsTableRenderer.svelte | 17 +++++------------ .../builder/portal/manage/users/index.svelte | 9 ++++----- 4 files changed, 9 insertions(+), 31 deletions(-) diff --git a/packages/bbui/src/Table/Table.svelte b/packages/bbui/src/Table/Table.svelte index c929e02d86..01a2ca4835 100644 --- a/packages/bbui/src/Table/Table.svelte +++ b/packages/bbui/src/Table/Table.svelte @@ -503,12 +503,6 @@ .spectrum-Table-headCell--alignRight { justify-content: flex-end; } - .spectrum-Table-headCell--divider { - padding-right: var(--cell-padding); - } - .spectrum-Table-headCell--divider + .spectrum-Table-headCell { - padding-left: var(--cell-padding); - } .spectrum-Table-headCell--edit { position: sticky; left: 0; @@ -580,13 +574,6 @@ background-color: var(--table-bg); z-index: auto; } - .spectrum-Table-cell--divider { - padding-right: var(--cell-padding); - } - .spectrum-Table-cell--divider + .spectrum-Table-cell { - padding-left: var(--cell-padding); - } - .spectrum-Table-cell--edit { position: sticky; left: 0; diff --git a/packages/builder/src/pages/builder/portal/manage/_layout.svelte b/packages/builder/src/pages/builder/portal/manage/_layout.svelte index a63195a214..47d9aaf59e 100644 --- a/packages/builder/src/pages/builder/portal/manage/_layout.svelte +++ b/packages/builder/src/pages/builder/portal/manage/_layout.svelte @@ -12,7 +12,6 @@ $: wide = $page.path.includes("email/:template") || - ($page.path.includes("users") && !$page.path.includes(":userId")) || ($page.path.includes("groups") && !$page.path.includes(":groupId")) diff --git a/packages/builder/src/pages/builder/portal/manage/users/_components/GroupsTableRenderer.svelte b/packages/builder/src/pages/builder/portal/manage/users/_components/GroupsTableRenderer.svelte index 772b5fe7b9..b334575669 100644 --- a/packages/builder/src/pages/builder/portal/manage/users/_components/GroupsTableRenderer.svelte +++ b/packages/builder/src/pages/builder/portal/manage/users/_components/GroupsTableRenderer.svelte @@ -1,5 +1,6 @@ @@ -7,17 +8,9 @@
- {#if value?.length === 0} -
0
- {:else if value?.length === 1} -
- {value[0]?.name} -
- {:else} -
- {parseInt(value?.length) || 0} groups -
- {/if} +
+ {value?.length || 0} +
From c2bad6133d5afaceee0640338c48008f071c21a9 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 2 Aug 2022 19:43:01 +0100 Subject: [PATCH 120/320] Fix typo --- .../portal/manage/users/_components/PasswordModal.svelte | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/manage/users/_components/PasswordModal.svelte b/packages/builder/src/pages/builder/portal/manage/users/_components/PasswordModal.svelte index 01dac8c222..02501f2de0 100644 --- a/packages/builder/src/pages/builder/portal/manage/users/_components/PasswordModal.svelte +++ b/packages/builder/src/pages/builder/portal/manage/users/_components/PasswordModal.svelte @@ -49,10 +49,10 @@ cancelText="Cancel" showCloseIcon={false} > - All your new users can be accessed through the autogenerated passwords. - Make not of these passwords or download the csv + + All your new users can be accessed through the autogenerated passwords. Take + note of these passwords or download the CSV file. +
From 1f7784c6c00040a50164b61f5e5d687f3a00c25c Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 2 Aug 2022 19:49:15 +0100 Subject: [PATCH 121/320] More improvements to user pages --- .../users/_components/AddUserModal.svelte | 4 ++-- .../users/_components/ImportUsersModal.svelte | 17 ++++++++++------- .../builder/portal/manage/users/index.svelte | 3 +++ 3 files changed, 15 insertions(+), 9 deletions(-) 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 44ec8085a6..184ff13eaf 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 @@ -72,8 +72,8 @@ createUsersFromCsv({ userEmails, usersRole, userGroups })} disabled={!userEmails.length || !validEmails(userEmails) || !usersRole} > - Import your users email addresses from a CSV + Import your users email addresses from a CSV file
@@ -98,8 +98,8 @@ {#if hasGroupsLicense} option.name} getOptionValue={option => option._id} @@ -122,14 +122,12 @@ label { font-family: var(--font-sans); - cursor: pointer; font-weight: 600; box-sizing: border-box; overflow: hidden; border-radius: var(--border-radius-s); color: var(--ink); padding: var(--spacing-m) var(--spacing-l); - transition: all 0.2s ease 0s; display: inline-flex; text-rendering: optimizeLegibility; min-width: auto; @@ -141,10 +139,15 @@ align-items: center; justify-content: center; width: 100%; - background-color: var(--grey-2); - font-size: var(--font-size-xs); + background: var(--spectrum-global-color-gray-200); + font-size: 12px; line-height: normal; border: var(--border-transparent); + transition: background-color 130ms ease-out; + } + label:hover { + background: var(--spectrum-global-color-gray-300); + cursor: pointer; } input[type="file"] { diff --git a/packages/builder/src/pages/builder/portal/manage/users/index.svelte b/packages/builder/src/pages/builder/portal/manage/users/index.svelte index ebe020aade..745006aef5 100644 --- a/packages/builder/src/pages/builder/portal/manage/users/index.svelte +++ b/packages/builder/src/pages/builder/portal/manage/users/index.svelte @@ -319,4 +319,7 @@ align-items: center; gap: var(--spacing-xl); } + .controls-right :global(.spectrum-Search) { + width: 200px; + } From 96e239c66c4b457953ae502c8c4c976117ca2acd Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 2 Aug 2022 20:03:39 +0100 Subject: [PATCH 122/320] Prevent showing any mention of groups when groups are not enabled both the platform and license level --- .../pages/builder/portal/apps/index.svelte | 7 +----- .../builder/portal/manage/groups/index.svelte | 21 +++++++---------- .../portal/manage/users/[userId].svelte | 10 ++------ .../users/_components/AddUserModal.svelte | 5 +--- .../users/_components/ImportUsersModal.svelte | 7 ++---- .../builder/portal/manage/users/index.svelte | 15 +++--------- .../overview/_components/AccessTab.svelte | 11 +++------ .../_components/AssignmentModal.svelte | 23 +++++++++++-------- packages/builder/src/stores/portal/auth.js | 8 +++++++ 9 files changed, 41 insertions(+), 66 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/apps/index.svelte b/packages/builder/src/pages/builder/portal/apps/index.svelte index 0d05e170e0..a089664d2e 100644 --- a/packages/builder/src/pages/builder/portal/apps/index.svelte +++ b/packages/builder/src/pages/builder/portal/apps/index.svelte @@ -27,7 +27,6 @@ import { AppStatus } from "constants" import Logo from "assets/bb-space-man.svg" import AccessFilter from "./_components/AcessFilter.svelte" - import { Constants } from "@budibase/frontend-core" let sortBy = "name" let template @@ -69,10 +68,6 @@ $: unlocked = lockedApps?.length === 0 $: automationErrors = getAutomationErrors(enrichedApps) - $: hasGroupsLicense = $auth.user?.license.features.includes( - Constants.Features.USER_GROUPS - ) - const enrichApps = (apps, user, sortBy) => { const enrichedApps = apps.map(app => ({ ...app, @@ -360,7 +355,7 @@ {/if}
- {#if hasGroupsLicense && $groups.length} + {#if $auth.groupsEnabled && $groups.length} {/if}
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 e86943c106..165d94e0b5 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 @@ -47,7 +47,11 @@ function validateInput(email, index) { if (email) { const res = emailValidator(email) - userData[index].error = res === true ? null : res + if (res === true) { + delete userData[index].error + } else { + userData[index].error = res + } } else { userData[index].error = "Please enter an email address" } @@ -89,7 +93,7 @@ inputType="email" bind:inputValue={input.email} bind:dropdownValue={input.role} - options={Constants.BbRoles} + options={Constants.BudibaseRoleOptions} error={input.error} on:blur={() => validateInput(input.email, index)} /> diff --git a/packages/builder/src/pages/builder/portal/manage/users/_components/RoleTableRenderer.svelte b/packages/builder/src/pages/builder/portal/manage/users/_components/RoleTableRenderer.svelte index 0a2daf7580..fe7acee6c4 100644 --- a/packages/builder/src/pages/builder/portal/manage/users/_components/RoleTableRenderer.svelte +++ b/packages/builder/src/pages/builder/portal/manage/users/_components/RoleTableRenderer.svelte @@ -10,7 +10,9 @@ admin: "Full access", } - $: role = Constants.BbRoles.find(x => x.value === users.getUserRole(row)) + $: role = Constants.BudibaseRoleOptions.find( + x => x.value === users.getUserRole(row) + ) $: value = role?.label || "Not available" $: tooltip = TooltipMap[role?.value] || "" diff --git a/packages/builder/src/pages/builder/portal/manage/users/index.svelte b/packages/builder/src/pages/builder/portal/manage/users/index.svelte index a33ef55c61..73cf5e26fa 100644 --- a/packages/builder/src/pages/builder/portal/manage/users/index.svelte +++ b/packages/builder/src/pages/builder/portal/manage/users/index.svelte @@ -26,6 +26,7 @@ import ImportUsersModal from "./_components/ImportUsersModal.svelte" import { createPaginationStore } from "helpers/pagination" import { get } from "svelte/store" + import { Constants } from "@budibase/frontend-core" let enrichedUsers = [] let createUserModal, @@ -85,13 +86,13 @@ } async function createUserFlow() { - let emails = userData?.users?.map(x => x.email) || [] + const payload = userData?.users?.map(user => ({ + email: user.email, + builder: user.role === Constants.BudibaseRoles.Developer, + admin: user.role === Constants.BudibaseRoles.Admin, + })) try { - const res = await users.invite({ - emails: emails, - builder: false, - admin: false, - }) + const res = await users.invite(payload) notifications.success(res.message) inviteConfirmationModal.show() } catch (error) { diff --git a/packages/builder/src/stores/portal/users.js b/packages/builder/src/stores/portal/users.js index 490d1bc9f6..7fc3704e98 100644 --- a/packages/builder/src/stores/portal/users.js +++ b/packages/builder/src/stores/portal/users.js @@ -26,12 +26,8 @@ export function createUsersStore() { return await API.getUsers() } - async function invite({ emails, builder, admin }) { - return API.inviteUsers({ - emails, - builder, - admin, - }) + async function invite(payload) { + return API.inviteUsers(payload) } async function acceptInvite(inviteCode, password) { return API.acceptInvite({ diff --git a/packages/frontend-core/src/api/user.js b/packages/frontend-core/src/api/user.js index 17223a80e6..56f0537b97 100644 --- a/packages/frontend-core/src/api/user.js +++ b/packages/frontend-core/src/api/user.js @@ -141,20 +141,18 @@ export const buildUserEndpoints = API => ({ /** * Invites multiple users to the current tenant. - * @param email An array of email addresses - * @param builder whether the user should be a global builder - * @param admin whether the user should be a global admin + * @param users An array of users to invite */ - inviteUsers: async ({ emails, builder, admin }) => { + inviteUsers: async users => { return await API.post({ url: "/api/global/users/inviteMultiple", - body: { - emails, + body: users.map(user => ({ + email: user.email, userInfo: { - admin: admin ? { global: true } : undefined, - builder: builder ? { global: true } : undefined, + admin: user.admin ? { global: true } : undefined, + builder: user.admin || user.builder ? { global: true } : undefined, }, - }, + })), }) }, diff --git a/packages/frontend-core/src/constants.js b/packages/frontend-core/src/constants.js index 77765f8d6e..4ad4f0fef8 100644 --- a/packages/frontend-core/src/constants.js +++ b/packages/frontend-core/src/constants.js @@ -60,25 +60,31 @@ export const TableNames = { USERS: "ta_users", } -export const BbRoles = [ - { label: "App User", value: "appUser" }, - { label: "Developer", value: "developer" }, - { label: "Admin", value: "admin" }, +export const BudibaseRoles = { + AppUser: "appUser", + Developer: "developer", + Admin: "admin", +} + +export const BudibaseRoleOptions = [ + { label: "App User", value: BudibaseRoles.AppUser }, + { label: "Developer", value: BudibaseRoles.Developer }, + { label: "Admin", value: BudibaseRoles.Admin }, ] export const BuilderRoleDescriptions = [ { - value: "appUser", + value: BudibaseRoles.AppUser, icon: "User", label: "App user - Only has access to published apps", }, { - value: "developer", + value: BudibaseRoles.Developer, icon: "Hammer", label: "Developer - Access to the app builder", }, { - value: "admin", + value: BudibaseRoles.Admin, icon: "Draw", label: "Admin - Full access", }, diff --git a/packages/worker/src/api/controllers/global/users.ts b/packages/worker/src/api/controllers/global/users.ts index 30bf78efc6..f5e551130e 100644 --- a/packages/worker/src/api/controllers/global/users.ts +++ b/packages/worker/src/api/controllers/global/users.ts @@ -214,13 +214,13 @@ export const invite = async (ctx: any) => { } export const inviteMultiple = async (ctx: any) => { - let { emails, userInfo } = ctx.request.body + let users = ctx.request.body let existing = false let existingEmail - for (let email of emails) { - if (await usersCore.getGlobalUserByEmail(email)) { + for (let user of users) { + if (await usersCore.getGlobalUserByEmail(user.email)) { existing = true - existingEmail = email + existingEmail = user.email break } } @@ -228,17 +228,19 @@ export const inviteMultiple = async (ctx: any) => { if (existing) { ctx.throw(400, `${existingEmail} already exists`) } - if (!userInfo) { - userInfo = {} - } - userInfo.tenantId = tenancy.getTenantId() - const opts: any = { - subject: "{{ company }} platform invitation", - info: userInfo, - } - for (let i = 0; i < emails.length; i++) { - await sendEmail(emails[i], EmailTemplatePurpose.INVITATION, opts) + for (let i = 0; i < users.length; i++) { + let userInfo = users[i].userInfo + if (!userInfo) { + userInfo = {} + } + userInfo.tenantId = tenancy.getTenantId() + const opts: any = { + subject: "{{ company }} platform invitation", + info: userInfo, + } + console.log(userInfo) + await sendEmail(users[i].email, EmailTemplatePurpose.INVITATION, opts) } ctx.body = { diff --git a/packages/worker/src/api/routes/global/users.js b/packages/worker/src/api/routes/global/users.js index e62e996443..7e8aee1b9e 100644 --- a/packages/worker/src/api/routes/global/users.js +++ b/packages/worker/src/api/routes/global/users.js @@ -32,10 +32,12 @@ function buildInviteValidation() { function buildInviteMultipleValidation() { // prettier-ignore - return joiValidator.body(Joi.object({ - emails: Joi.array().required(), - userInfo: Joi.object().optional(), - }).required()) + return joiValidator.body(Joi.array().required().items( + Joi.object({ + email: Joi.string(), + userInfo: Joi.object().optional(), + }) + )) } function buildInviteAcceptValidation() { From dee15b6415e319e7e50e69d2ae72a55d9579b659 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 3 Aug 2022 17:44:44 +0100 Subject: [PATCH 131/320] Switching to an explicit select for the OR/AND options in the filter. --- .../controls/FilterEditor/FilterDrawer.svelte | 172 ++++++++++-------- 1 file changed, 94 insertions(+), 78 deletions(-) diff --git a/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte b/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte index 1d9c3dea09..fcec0e35ac 100644 --- a/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte +++ b/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte @@ -9,7 +9,6 @@ Input, Layout, Select, - Toggle, Label, } from "@budibase/bbui" import DrawerBindableInput from "components/common/bindings/DrawerBindableInput.svelte" @@ -17,7 +16,7 @@ import { generate } from "shortid" import { LuceneUtils, Constants } from "@budibase/frontend-core" import { getFields } from "helpers/searchFields" - import { createEventDispatcher } from "svelte" + import { createEventDispatcher, onMount } from "svelte" const dispatch = createEventDispatcher() @@ -33,6 +32,11 @@ $: fieldOptions = enrichedSchemaFields.map(field => field.name) || [] $: valueTypeOptions = allowBindings ? ["Value", "Binding"] : ["Value"] + let behaviourValue + const behaviourOptions = [ + { value: "and", label: "Match all of the following filters" }, + { value: "or", label: "Match any of the following filters" }, + ] const addFilter = () => { filters = [ ...filters, @@ -99,6 +103,10 @@ const schema = enrichedSchemaFields.find(x => x.name === field) return schema?.constraints?.inclusion || [] } + + onMount(() => { + behaviourValue = allOr ? "or" : "and" + }) @@ -114,88 +122,98 @@ {#if filters?.length}
- {#each filters as filter, idx} - onOperatorChange(filter, e.detail)} - placeholder={null} - /> - opt.label} + getOptionValue={opt => opt.value} + on:change={e => (allOr = e.detail === "or")} + placeholder={null} + /> +
+
+
+ +
+
+ {#each filters as filter, idx} + - {:else if ["options", "array"].includes(filter.type)} - onOperatorChange(filter, e.detail)} + placeholder={null} /> - {:else if filter.type === "boolean"} - - {:else if filter.type === "datetime"} - (filter.value = event.detail)} + /> + {:else if ["string", "longform", "number", "formula"].includes(filter.type)} + + {:else if ["options", "array"].includes(filter.type)} + + {:else if filter.type === "boolean"} + + {:else if filter.type === "datetime"} + + {:else} + + {/if} + duplicateFilter(filter.id)} /> - {:else} - - {/if} - duplicateFilter(filter.id)} - /> - removeFilter(filter.id)} - /> - {/each} + removeFilter(filter.id)} + /> + {/each} +
{/if}
-
- (allOr = event.detail)} - /> -
@@ -216,10 +234,8 @@ grid-template-columns: 1fr 120px 120px 1fr auto auto; } - .toggle { - display: flex; - align-items: center; - padding-right: var(--spacing-s); + .filter-label { + margin-bottom: var(--spacing-s); } .bottom { From d14051bd62feca7a0264d95127451e2386e935c8 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 3 Aug 2022 18:20:07 +0100 Subject: [PATCH 132/320] Fixing test cases. --- .../server/src/api/controllers/row/utils.js | 6 ++---- .../src/api/controllers/table/external.js | 2 +- packages/server/src/integrations/base/query.ts | 17 +++++++++++++++++ packages/server/src/integrations/base/sql.ts | 1 - packages/server/src/integrations/base/utils.ts | 18 ------------------ .../src/integrations/microsoftSqlServer.ts | 5 +++-- packages/server/src/integrations/mysql.ts | 2 +- packages/server/src/integrations/postgres.ts | 3 ++- .../server/src/integrations/tests/sql.spec.js | 2 +- 9 files changed, 27 insertions(+), 29 deletions(-) create mode 100644 packages/server/src/integrations/base/query.ts diff --git a/packages/server/src/api/controllers/row/utils.js b/packages/server/src/api/controllers/row/utils.js index da14020757..4c837e7630 100644 --- a/packages/server/src/api/controllers/row/utils.js +++ b/packages/server/src/api/controllers/row/utils.js @@ -4,10 +4,8 @@ const { InternalTables } = require("../../../db/utils") const userController = require("../user") const { FieldTypes } = require("../../../constants") const { getAppDB } = require("@budibase/backend-core/context") -const { - makeExternalQuery, - removeKeyNumbering, -} = require("../../../integrations/base/utils") +const { makeExternalQuery } = require("../../../integrations/base/query") +const { removeKeyNumbering } = require("../../../integrations/base/utils") validateJs.extend(validateJs.validators.datetime, { parse: function (value) { diff --git a/packages/server/src/api/controllers/table/external.js b/packages/server/src/api/controllers/table/external.js index 34319c5bff..d919e9dad7 100644 --- a/packages/server/src/api/controllers/table/external.js +++ b/packages/server/src/api/controllers/table/external.js @@ -14,7 +14,7 @@ const { FieldTypes, RelationshipTypes, } = require("../../../constants") -const { makeExternalQuery } = require("../../../integrations/base/utils") +const { makeExternalQuery } = require("../../../integrations/base/query") const { cloneDeep } = require("lodash/fp") const csvParser = require("../../../utilities/csvParser") const { handleRequest } = require("../row/external") diff --git a/packages/server/src/integrations/base/query.ts b/packages/server/src/integrations/base/query.ts new file mode 100644 index 0000000000..59d67b2ef1 --- /dev/null +++ b/packages/server/src/integrations/base/query.ts @@ -0,0 +1,17 @@ +import { QueryJson } from "../../definitions/datasource" +import { Datasource } from "../../definitions/common" +const { integrations } = require("../index") + +export async function makeExternalQuery( + datasource: Datasource, + json: QueryJson +) { + const Integration = integrations[datasource.source] + // query is the opinionated function + if (Integration.prototype.query) { + const integration = new Integration(datasource.config) + return integration.query(json) + } else { + throw "Datasource does not support query." + } +} diff --git a/packages/server/src/integrations/base/sql.ts b/packages/server/src/integrations/base/sql.ts index a46ce7aea2..4d33669a03 100644 --- a/packages/server/src/integrations/base/sql.ts +++ b/packages/server/src/integrations/base/sql.ts @@ -584,4 +584,3 @@ class SqlQueryBuilder extends SqlTableQueryBuilder { } export default SqlQueryBuilder -module.exports = SqlQueryBuilder diff --git a/packages/server/src/integrations/base/utils.ts b/packages/server/src/integrations/base/utils.ts index 0913d59b2a..54efdb91a0 100644 --- a/packages/server/src/integrations/base/utils.ts +++ b/packages/server/src/integrations/base/utils.ts @@ -1,23 +1,5 @@ -import { QueryJson } from "../../definitions/datasource" -import { Datasource } from "../../definitions/common" -const { integrations } = require("../index") - const QUERY_START_REGEX = /\d[0-9]*:/g -export async function makeExternalQuery( - datasource: Datasource, - json: QueryJson -) { - const Integration = integrations[datasource.source] - // query is the opinionated function - if (Integration.prototype.query) { - const integration = new Integration(datasource.config) - return integration.query(json) - } else { - throw "Datasource does not support query." - } -} - export function removeKeyNumbering(key: any): string { if (typeof key === "string" && key.match(QUERY_START_REGEX) != null) { const parts = key.split(":") diff --git a/packages/server/src/integrations/microsoftSqlServer.ts b/packages/server/src/integrations/microsoftSqlServer.ts index 1e5664748d..2fe445f8fe 100644 --- a/packages/server/src/integrations/microsoftSqlServer.ts +++ b/packages/server/src/integrations/microsoftSqlServer.ts @@ -15,10 +15,10 @@ import { } from "./utils" import { DatasourcePlus } from "./base/datasourcePlus" import { Table, TableSchema } from "../definitions/common" +import Sql from "./base/sql" module MSSQLModule { const sqlServer = require("mssql") - const Sql = require("./base/sql") const DEFAULT_SCHEMA = "dbo" interface MSSQLConfig { @@ -96,7 +96,8 @@ module MSSQLModule { class SqlServerIntegration extends Sql implements DatasourcePlus { private readonly config: MSSQLConfig private index: number = 0 - static pool: any + private readonly pool: any + private client: any public tables: Record = {} public schemaErrors: Record = {} diff --git a/packages/server/src/integrations/mysql.ts b/packages/server/src/integrations/mysql.ts index 1fdab66701..61780ffcd7 100644 --- a/packages/server/src/integrations/mysql.ts +++ b/packages/server/src/integrations/mysql.ts @@ -16,10 +16,10 @@ import { import { DatasourcePlus } from "./base/datasourcePlus" import dayjs from "dayjs" const { NUMBER_REGEX } = require("../utilities") +import Sql from "./base/sql" module MySQLModule { const mysql = require("mysql2/promise") - const Sql = require("./base/sql") interface MySQLConfig { host: string diff --git a/packages/server/src/integrations/postgres.ts b/packages/server/src/integrations/postgres.ts index 7cc01bdc79..48b9544e50 100644 --- a/packages/server/src/integrations/postgres.ts +++ b/packages/server/src/integrations/postgres.ts @@ -14,10 +14,10 @@ import { SqlClients, } from "./utils" import { DatasourcePlus } from "./base/datasourcePlus" +import Sql from "./base/sql" module PostgresModule { const { Client, types } = require("pg") - const Sql = require("./base/sql") const { escapeDangerousCharacters } = require("../utilities") // Return "date" and "timestamp" types as plain strings. @@ -117,6 +117,7 @@ module PostgresModule { private readonly client: any private readonly config: PostgresConfig private index: number = 1 + private open: boolean public tables: Record = {} public schemaErrors: Record = {} diff --git a/packages/server/src/integrations/tests/sql.spec.js b/packages/server/src/integrations/tests/sql.spec.js index 55c762573a..42fe9e3b30 100644 --- a/packages/server/src/integrations/tests/sql.spec.js +++ b/packages/server/src/integrations/tests/sql.spec.js @@ -1,4 +1,4 @@ -const Sql = require("../base/sql") +const Sql = require("../base/sql").default const { SqlClients } = require("../utils") const TABLE_NAME = "test" From 76948ee09ae85f58248fe80ed40c0ba61e92b6d1 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 3 Aug 2022 19:20:18 +0100 Subject: [PATCH 133/320] Remove log --- packages/worker/src/api/controllers/global/users.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/worker/src/api/controllers/global/users.ts b/packages/worker/src/api/controllers/global/users.ts index f5e551130e..1f9af3514b 100644 --- a/packages/worker/src/api/controllers/global/users.ts +++ b/packages/worker/src/api/controllers/global/users.ts @@ -239,7 +239,6 @@ export const inviteMultiple = async (ctx: any) => { subject: "{{ company }} platform invitation", info: userInfo, } - console.log(userInfo) await sendEmail(users[i].email, EmailTemplatePurpose.INVITATION, opts) } From bfe248c8562a4aa2c1c720646622db0253ffc32d Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 3 Aug 2022 19:20:33 +0100 Subject: [PATCH 134/320] Update multi-user invite endpoint --- packages/frontend-core/src/api/user.js | 2 +- packages/worker/src/api/routes/global/users.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/frontend-core/src/api/user.js b/packages/frontend-core/src/api/user.js index 56f0537b97..653376aa55 100644 --- a/packages/frontend-core/src/api/user.js +++ b/packages/frontend-core/src/api/user.js @@ -145,7 +145,7 @@ export const buildUserEndpoints = API => ({ */ inviteUsers: async users => { return await API.post({ - url: "/api/global/users/inviteMultiple", + url: "/api/global/users/multi/invite", body: users.map(user => ({ email: user.email, userInfo: { diff --git a/packages/worker/src/api/routes/global/users.js b/packages/worker/src/api/routes/global/users.js index 7e8aee1b9e..cf1674c031 100644 --- a/packages/worker/src/api/routes/global/users.js +++ b/packages/worker/src/api/routes/global/users.js @@ -81,7 +81,7 @@ router controller.invite ) .post( - "/api/global/users/inviteMultiple", + "/api/global/users/multi/invite", adminOnly, buildInviteMultipleValidation(), controller.inviteMultiple From 15d62a5fd3d76fc06ccd99b9ad34c2c11297f5b8 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Thu, 4 Aug 2022 08:30:40 +0000 Subject: [PATCH 135/320] v1.2.6 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lerna.json b/lerna.json index 9571899f44..a854b56c46 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.2.5", + "version": "1.2.6", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 1515c4b4b6..f3e14412cc 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.2.5", + "version": "1.2.6", "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.5", + "@budibase/types": "^1.2.6", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", "bcrypt": "5.0.1", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index c91176a8b7..416213d21e 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.5", + "version": "1.2.6", "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.5", + "@budibase/string-templates": "^1.2.6", "@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 aff7d5f8a6..e554ba3abe 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.2.5", + "version": "1.2.6", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.2.5", - "@budibase/client": "^1.2.5", - "@budibase/frontend-core": "^1.2.5", - "@budibase/string-templates": "^1.2.5", + "@budibase/bbui": "^1.2.6", + "@budibase/client": "^1.2.6", + "@budibase/frontend-core": "^1.2.6", + "@budibase/string-templates": "^1.2.6", "@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 5aa0a12a52..0173929ffb 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.2.5", + "version": "1.2.6", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index 614849108a..38f0f8b295 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.2.5", + "version": "1.2.6", "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.5", - "@budibase/frontend-core": "^1.2.5", - "@budibase/string-templates": "^1.2.5", + "@budibase/bbui": "^1.2.6", + "@budibase/frontend-core": "^1.2.6", + "@budibase/string-templates": "^1.2.6", "@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 8dbde0b8c8..283efae417 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.2.5", + "version": "1.2.6", "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.5", + "@budibase/bbui": "^1.2.6", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 761247d755..6e9adf08a0 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.5", + "version": "1.2.6", "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.5", - "@budibase/client": "^1.2.5", + "@budibase/backend-core": "^1.2.6", + "@budibase/client": "^1.2.6", "@budibase/pro": "1.2.5", - "@budibase/string-templates": "^1.2.5", - "@budibase/types": "^1.2.5", + "@budibase/string-templates": "^1.2.6", + "@budibase/types": "^1.2.6", "@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 10f3d13e06..3eefa11d70 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.2.5", + "version": "1.2.6", "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 55530259e9..c2f8f5add8 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.2.5", + "version": "1.2.6", "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 000ad623c8..bd4a251fc8 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.5", + "version": "1.2.6", "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.5", + "@budibase/backend-core": "^1.2.6", "@budibase/pro": "1.2.5", - "@budibase/string-templates": "^1.2.5", - "@budibase/types": "^1.2.5", + "@budibase/string-templates": "^1.2.6", + "@budibase/types": "^1.2.6", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From b550b802ebad5c869cb07498d40e0ef9fe6b0da9 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Thu, 4 Aug 2022 08:33:41 +0000 Subject: [PATCH 136/320] Update pro version to 1.2.6 --- 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 6e9adf08a0..e61cd33666 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "^1.2.6", "@budibase/client": "^1.2.6", - "@budibase/pro": "1.2.5", + "@budibase/pro": "1.2.6", "@budibase/string-templates": "^1.2.6", "@budibase/types": "^1.2.6", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index d957ef6812..34733cebac 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.5": - version "1.2.5" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.5.tgz#4d8e9e86587f73244c298c4483715b5754e1eebd" - integrity sha512-8HChhwa6Mo4FouNAWtai5F9FugGCg5EQ8nn47/W5O+WM/VaWdJcjGURHfR9KnWHQUOyWlonvhHEgzyFWp5t+7w== +"@budibase/backend-core@1.2.6": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.6.tgz#cfbcc9301749d98b4d7f5f29f5d334621b966885" + integrity sha512-55FX2vPo3yHontiis0LTNg/ETWrDNm/KgDg/F5DJ+2l0+gkiU9xtU1RY/Q/v6Yb0gBx9t0VDwSrXPK0C81SsMQ== dependencies: - "@budibase/types" "^1.2.5" + "@budibase/types" "^1.2.6" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -1177,13 +1177,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.2.5": - version "1.2.5" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.5.tgz#3a0c2adc994027e114bb133ac26f0562bdb7c945" - integrity sha512-//RB2p5FVkhH8ylMFyaU0Z1Gh4d6x9p4lm5wabe282O1sIdBAbsq9mtMK6NIftZgakELHS/xwOR6W/knKB4Ybw== +"@budibase/pro@1.2.6": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.6.tgz#f62afd1486be6480464fcf3db609daccfd6e5e09" + integrity sha512-wPJrb4nebs15bmZrNdYiq5cTUPTKpg+w4g14N8mtLxAmrKMjTmoPHdY6yigF6IGmR7UJYGDdSoTz1ccJwDInuw== dependencies: - "@budibase/backend-core" "1.2.5" - "@budibase/types" "1.2.5" + "@budibase/backend-core" "1.2.6" + "@budibase/types" "1.2.6" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1206,10 +1206,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.2.5", "@budibase/types@^1.2.5": - version "1.2.5" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.5.tgz#0d4dafdee42fb5324dba9393206c6e34d4538afe" - integrity sha512-ZEDy3TlVSWEhQy7HkAqsuZWJmFxuELo6pu77mpH2fEHY+UpGkSSQPxMg7LYYuWDNsGjJGl0urXh0G5StDM1aTw== +"@budibase/types@1.2.6", "@budibase/types@^1.2.6": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.6.tgz#dcc1e015ac2232dfdaaa332ffbdb78112333ed56" + integrity sha512-haYNpdMwqnD0R0SVWNUq8fYO1Hl1oLpHV7+2XNnqXXUSF2fVFZNFaN12SsMnyPMOxXvJZG6MkfpLXsZffJpopw== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index bd4a251fc8..9b4c791bf8 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -36,7 +36,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "^1.2.6", - "@budibase/pro": "1.2.5", + "@budibase/pro": "1.2.6", "@budibase/string-templates": "^1.2.6", "@budibase/types": "^1.2.6", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 7f0700015f..900aa7e175 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.5": - version "1.2.5" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.5.tgz#4d8e9e86587f73244c298c4483715b5754e1eebd" - integrity sha512-8HChhwa6Mo4FouNAWtai5F9FugGCg5EQ8nn47/W5O+WM/VaWdJcjGURHfR9KnWHQUOyWlonvhHEgzyFWp5t+7w== +"@budibase/backend-core@1.2.6": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.6.tgz#cfbcc9301749d98b4d7f5f29f5d334621b966885" + integrity sha512-55FX2vPo3yHontiis0LTNg/ETWrDNm/KgDg/F5DJ+2l0+gkiU9xtU1RY/Q/v6Yb0gBx9t0VDwSrXPK0C81SsMQ== dependencies: - "@budibase/types" "^1.2.5" + "@budibase/types" "^1.2.6" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -324,21 +324,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.2.5": - version "1.2.5" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.5.tgz#3a0c2adc994027e114bb133ac26f0562bdb7c945" - integrity sha512-//RB2p5FVkhH8ylMFyaU0Z1Gh4d6x9p4lm5wabe282O1sIdBAbsq9mtMK6NIftZgakELHS/xwOR6W/knKB4Ybw== +"@budibase/pro@1.2.6": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.6.tgz#f62afd1486be6480464fcf3db609daccfd6e5e09" + integrity sha512-wPJrb4nebs15bmZrNdYiq5cTUPTKpg+w4g14N8mtLxAmrKMjTmoPHdY6yigF6IGmR7UJYGDdSoTz1ccJwDInuw== dependencies: - "@budibase/backend-core" "1.2.5" - "@budibase/types" "1.2.5" + "@budibase/backend-core" "1.2.6" + "@budibase/types" "1.2.6" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.2.5", "@budibase/types@^1.2.5": - version "1.2.5" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.5.tgz#0d4dafdee42fb5324dba9393206c6e34d4538afe" - integrity sha512-ZEDy3TlVSWEhQy7HkAqsuZWJmFxuELo6pu77mpH2fEHY+UpGkSSQPxMg7LYYuWDNsGjJGl0urXh0G5StDM1aTw== +"@budibase/types@1.2.6", "@budibase/types@^1.2.6": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.6.tgz#dcc1e015ac2232dfdaaa332ffbdb78112333ed56" + integrity sha512-haYNpdMwqnD0R0SVWNUq8fYO1Hl1oLpHV7+2XNnqXXUSF2fVFZNFaN12SsMnyPMOxXvJZG6MkfpLXsZffJpopw== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From 5c5996c29f165aad1ab9084c754592913e33bedb Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Thu, 4 Aug 2022 11:56:18 +0100 Subject: [PATCH 137/320] Fix login issues for new users --- packages/worker/src/sdk/users/users.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/worker/src/sdk/users/users.ts b/packages/worker/src/sdk/users/users.ts index ea7f2517e0..de312b7a25 100644 --- a/packages/worker/src/sdk/users/users.ts +++ b/packages/worker/src/sdk/users/users.ts @@ -101,7 +101,7 @@ interface SaveUserOpts { bulkCreate?: boolean } -export const buildUser = async ( +const buildUser = async ( user: any, opts: SaveUserOpts = { hashPassword: true, @@ -195,6 +195,11 @@ export const save = async ( dbUser ) + // make sure we set the _id field for a new user + if (!_id) { + _id = builtUser._id + } + try { const putOpts = { password: builtUser.password, @@ -220,7 +225,7 @@ export const save = async ( await addTenant(tenantId, _id, email) await cache.user.invalidateUser(response.id) // let server know to sync user - await apps.syncUserInApps(builtUser._id) + await apps.syncUserInApps(_id) return { _id: response.id, @@ -305,6 +310,9 @@ export const bulkCreate = async ( // Post processing of bulk added users, i.e events and cache operations for (const user of usersToBulkSave) { + // TODO: Refactor to bulk insert users into the info db + // instead of relying on looping tenant creation + await addTenant(tenantId, user._id, user.email) await eventHelpers.handleSaveEvents(user, null) await apps.syncUserInApps(user._id) } From 6437f9af4a83d775d122b4d2ab64e989bc7114b3 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Thu, 4 Aug 2022 11:15:11 +0000 Subject: [PATCH 138/320] v1.2.7 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lerna.json b/lerna.json index a854b56c46..cda495c5bc 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.2.6", + "version": "1.2.7", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index f3e14412cc..8e8845dade 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.2.6", + "version": "1.2.7", "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.6", + "@budibase/types": "^1.2.7", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", "bcrypt": "5.0.1", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 416213d21e..69e441f9dd 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.6", + "version": "1.2.7", "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.6", + "@budibase/string-templates": "^1.2.7", "@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 e554ba3abe..c08382319f 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.2.6", + "version": "1.2.7", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.2.6", - "@budibase/client": "^1.2.6", - "@budibase/frontend-core": "^1.2.6", - "@budibase/string-templates": "^1.2.6", + "@budibase/bbui": "^1.2.7", + "@budibase/client": "^1.2.7", + "@budibase/frontend-core": "^1.2.7", + "@budibase/string-templates": "^1.2.7", "@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 0173929ffb..99b6e2e131 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.2.6", + "version": "1.2.7", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index 38f0f8b295..a1cceb7dc6 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.2.6", + "version": "1.2.7", "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.6", - "@budibase/frontend-core": "^1.2.6", - "@budibase/string-templates": "^1.2.6", + "@budibase/bbui": "^1.2.7", + "@budibase/frontend-core": "^1.2.7", + "@budibase/string-templates": "^1.2.7", "@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 283efae417..0b9bb51d23 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.2.6", + "version": "1.2.7", "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.6", + "@budibase/bbui": "^1.2.7", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index e61cd33666..3fd4d2f54d 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.6", + "version": "1.2.7", "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.6", - "@budibase/client": "^1.2.6", + "@budibase/backend-core": "^1.2.7", + "@budibase/client": "^1.2.7", "@budibase/pro": "1.2.6", - "@budibase/string-templates": "^1.2.6", - "@budibase/types": "^1.2.6", + "@budibase/string-templates": "^1.2.7", + "@budibase/types": "^1.2.7", "@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 3eefa11d70..007c63cf72 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.2.6", + "version": "1.2.7", "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 c2f8f5add8..1274c576d6 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.2.6", + "version": "1.2.7", "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 9b4c791bf8..fb4680816b 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.6", + "version": "1.2.7", "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.6", + "@budibase/backend-core": "^1.2.7", "@budibase/pro": "1.2.6", - "@budibase/string-templates": "^1.2.6", - "@budibase/types": "^1.2.6", + "@budibase/string-templates": "^1.2.7", + "@budibase/types": "^1.2.7", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 5fe5df65f659bc3ab1769aeb73e900366cef0d0d Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Thu, 4 Aug 2022 11:18:08 +0000 Subject: [PATCH 139/320] Update pro version to 1.2.7 --- 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 3fd4d2f54d..e15ff42b9a 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "^1.2.7", "@budibase/client": "^1.2.7", - "@budibase/pro": "1.2.6", + "@budibase/pro": "1.2.7", "@budibase/string-templates": "^1.2.7", "@budibase/types": "^1.2.7", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 34733cebac..da9bfc7d32 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.6": - version "1.2.6" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.6.tgz#cfbcc9301749d98b4d7f5f29f5d334621b966885" - integrity sha512-55FX2vPo3yHontiis0LTNg/ETWrDNm/KgDg/F5DJ+2l0+gkiU9xtU1RY/Q/v6Yb0gBx9t0VDwSrXPK0C81SsMQ== +"@budibase/backend-core@1.2.7": + version "1.2.7" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.7.tgz#10cc56023910727566e981294d47ac0ac6a7f1d6" + integrity sha512-Ig/V+2XohnogMLV4NlQxrdB7APAv2GbvGcWwPbPekX60tzTTK1ZKgnQp1y72o2ebor46Nw5iRH+OabA/YhO7fg== dependencies: - "@budibase/types" "^1.2.6" + "@budibase/types" "^1.2.7" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -1177,13 +1177,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.2.6": - version "1.2.6" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.6.tgz#f62afd1486be6480464fcf3db609daccfd6e5e09" - integrity sha512-wPJrb4nebs15bmZrNdYiq5cTUPTKpg+w4g14N8mtLxAmrKMjTmoPHdY6yigF6IGmR7UJYGDdSoTz1ccJwDInuw== +"@budibase/pro@1.2.7": + version "1.2.7" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.7.tgz#8ea9712ea908a66a7189b8d2c1e9f90403a740c7" + integrity sha512-lfQU16Bm7aHj8y+YOkfNLb8K9qrg4U8DhGKVkPP++T+6CTFZyKde5xJBNFHBCspLagPdB6Pst/aM9yZVhYfW6A== dependencies: - "@budibase/backend-core" "1.2.6" - "@budibase/types" "1.2.6" + "@budibase/backend-core" "1.2.7" + "@budibase/types" "1.2.7" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1206,10 +1206,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.2.6", "@budibase/types@^1.2.6": - version "1.2.6" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.6.tgz#dcc1e015ac2232dfdaaa332ffbdb78112333ed56" - integrity sha512-haYNpdMwqnD0R0SVWNUq8fYO1Hl1oLpHV7+2XNnqXXUSF2fVFZNFaN12SsMnyPMOxXvJZG6MkfpLXsZffJpopw== +"@budibase/types@1.2.7", "@budibase/types@^1.2.7": + version "1.2.7" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.7.tgz#7e79c7b0d24e21656dd096e24e8b272eaa6cbeb7" + integrity sha512-0OQoT808CC6GRnTzay9BCzYdi1Tzl8l/8zWEhmhzRsuUZLUL8It1mU+B3JGCTqsMUHf0JGMrZu35H7j0VoZEBA== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index fb4680816b..1447313308 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -36,7 +36,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "^1.2.7", - "@budibase/pro": "1.2.6", + "@budibase/pro": "1.2.7", "@budibase/string-templates": "^1.2.7", "@budibase/types": "^1.2.7", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 900aa7e175..53e300f4d6 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.6": - version "1.2.6" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.6.tgz#cfbcc9301749d98b4d7f5f29f5d334621b966885" - integrity sha512-55FX2vPo3yHontiis0LTNg/ETWrDNm/KgDg/F5DJ+2l0+gkiU9xtU1RY/Q/v6Yb0gBx9t0VDwSrXPK0C81SsMQ== +"@budibase/backend-core@1.2.7": + version "1.2.7" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.7.tgz#10cc56023910727566e981294d47ac0ac6a7f1d6" + integrity sha512-Ig/V+2XohnogMLV4NlQxrdB7APAv2GbvGcWwPbPekX60tzTTK1ZKgnQp1y72o2ebor46Nw5iRH+OabA/YhO7fg== dependencies: - "@budibase/types" "^1.2.6" + "@budibase/types" "^1.2.7" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -324,21 +324,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.2.6": - version "1.2.6" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.6.tgz#f62afd1486be6480464fcf3db609daccfd6e5e09" - integrity sha512-wPJrb4nebs15bmZrNdYiq5cTUPTKpg+w4g14N8mtLxAmrKMjTmoPHdY6yigF6IGmR7UJYGDdSoTz1ccJwDInuw== +"@budibase/pro@1.2.7": + version "1.2.7" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.7.tgz#8ea9712ea908a66a7189b8d2c1e9f90403a740c7" + integrity sha512-lfQU16Bm7aHj8y+YOkfNLb8K9qrg4U8DhGKVkPP++T+6CTFZyKde5xJBNFHBCspLagPdB6Pst/aM9yZVhYfW6A== dependencies: - "@budibase/backend-core" "1.2.6" - "@budibase/types" "1.2.6" + "@budibase/backend-core" "1.2.7" + "@budibase/types" "1.2.7" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.2.6", "@budibase/types@^1.2.6": - version "1.2.6" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.6.tgz#dcc1e015ac2232dfdaaa332ffbdb78112333ed56" - integrity sha512-haYNpdMwqnD0R0SVWNUq8fYO1Hl1oLpHV7+2XNnqXXUSF2fVFZNFaN12SsMnyPMOxXvJZG6MkfpLXsZffJpopw== +"@budibase/types@1.2.7", "@budibase/types@^1.2.7": + version "1.2.7" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.7.tgz#7e79c7b0d24e21656dd096e24e8b272eaa6cbeb7" + integrity sha512-0OQoT808CC6GRnTzay9BCzYdi1Tzl8l/8zWEhmhzRsuUZLUL8It1mU+B3JGCTqsMUHf0JGMrZu35H7j0VoZEBA== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From 26c3f8a486363c6817db2a639cb4e0eb69034154 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 4 Aug 2022 12:56:08 +0100 Subject: [PATCH 140/320] Switching variable name to make it more obvious value isn't being set directly. --- .../src/components/common/bindings/BindingPanel.svelte | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/builder/src/components/common/bindings/BindingPanel.svelte b/packages/builder/src/components/common/bindings/BindingPanel.svelte index 4dc9d9700e..49cbd434cf 100644 --- a/packages/builder/src/components/common/bindings/BindingPanel.svelte +++ b/packages/builder/src/components/common/bindings/BindingPanel.svelte @@ -70,17 +70,17 @@ // Adds a JS/HBS helper to the expression const addHelper = (helper, js) => { - let value + let tempVal const pos = getCaretPosition() if (js) { const decoded = decodeJSBinding(jsValue) - value = jsValue = encodeJSBinding( + tempVal = jsValue = encodeJSBinding( addJSBinding(decoded, pos, helper.text, { helper: true }) ) } else { - value = hbsValue = addHBSBinding(hbsValue, pos, helper.text) + tempVal = hbsValue = addHBSBinding(hbsValue, pos, helper.text) } - updateValue(value) + updateValue(tempVal) } // Adds a data binding to the expression From a91a8857c8a7eee0716a1723a8f36fa54e5fab70 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Thu, 4 Aug 2022 12:00:52 +0000 Subject: [PATCH 141/320] v1.2.8 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lerna.json b/lerna.json index cda495c5bc..beb1d1d8f4 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.2.7", + "version": "1.2.8", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 8e8845dade..d63cc2ebd1 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.2.7", + "version": "1.2.8", "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.7", + "@budibase/types": "^1.2.8", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", "bcrypt": "5.0.1", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 69e441f9dd..3dd6f71a58 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.7", + "version": "1.2.8", "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.7", + "@budibase/string-templates": "^1.2.8", "@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 c08382319f..bf3eeb957f 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.2.7", + "version": "1.2.8", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.2.7", - "@budibase/client": "^1.2.7", - "@budibase/frontend-core": "^1.2.7", - "@budibase/string-templates": "^1.2.7", + "@budibase/bbui": "^1.2.8", + "@budibase/client": "^1.2.8", + "@budibase/frontend-core": "^1.2.8", + "@budibase/string-templates": "^1.2.8", "@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 99b6e2e131..ca15309549 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.2.7", + "version": "1.2.8", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index a1cceb7dc6..b82c41b7bd 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.2.7", + "version": "1.2.8", "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.7", - "@budibase/frontend-core": "^1.2.7", - "@budibase/string-templates": "^1.2.7", + "@budibase/bbui": "^1.2.8", + "@budibase/frontend-core": "^1.2.8", + "@budibase/string-templates": "^1.2.8", "@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 0b9bb51d23..5d8ba8fc27 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.2.7", + "version": "1.2.8", "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.7", + "@budibase/bbui": "^1.2.8", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index e15ff42b9a..610a7d954b 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.7", + "version": "1.2.8", "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.7", - "@budibase/client": "^1.2.7", + "@budibase/backend-core": "^1.2.8", + "@budibase/client": "^1.2.8", "@budibase/pro": "1.2.7", - "@budibase/string-templates": "^1.2.7", - "@budibase/types": "^1.2.7", + "@budibase/string-templates": "^1.2.8", + "@budibase/types": "^1.2.8", "@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 007c63cf72..a1cc33fd5c 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.2.7", + "version": "1.2.8", "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 1274c576d6..f474727ee7 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.2.7", + "version": "1.2.8", "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 1447313308..c900d406ca 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.7", + "version": "1.2.8", "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.7", + "@budibase/backend-core": "^1.2.8", "@budibase/pro": "1.2.7", - "@budibase/string-templates": "^1.2.7", - "@budibase/types": "^1.2.7", + "@budibase/string-templates": "^1.2.8", + "@budibase/types": "^1.2.8", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From a53bc1ec077436d524c8162f259e7f23cfef61d5 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Thu, 4 Aug 2022 12:03:52 +0000 Subject: [PATCH 142/320] Update pro version to 1.2.8 --- 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 610a7d954b..f79dc4be22 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "^1.2.8", "@budibase/client": "^1.2.8", - "@budibase/pro": "1.2.7", + "@budibase/pro": "1.2.8", "@budibase/string-templates": "^1.2.8", "@budibase/types": "^1.2.8", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index da9bfc7d32..dce1b00e1a 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.7": - version "1.2.7" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.7.tgz#10cc56023910727566e981294d47ac0ac6a7f1d6" - integrity sha512-Ig/V+2XohnogMLV4NlQxrdB7APAv2GbvGcWwPbPekX60tzTTK1ZKgnQp1y72o2ebor46Nw5iRH+OabA/YhO7fg== +"@budibase/backend-core@1.2.8": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.8.tgz#771619a4e4eacf61c204b5b9d8aea9380176ede8" + integrity sha512-+j6wDRJfeq7eQRLiblhfHySwz7e+sOD8spoS6qhqr732J9j6B4uFnvTc1HEezmHw6W4ZkCEqa97v+bSr9y2MPg== dependencies: - "@budibase/types" "^1.2.7" + "@budibase/types" "^1.2.8" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -1177,13 +1177,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.2.7": - version "1.2.7" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.7.tgz#8ea9712ea908a66a7189b8d2c1e9f90403a740c7" - integrity sha512-lfQU16Bm7aHj8y+YOkfNLb8K9qrg4U8DhGKVkPP++T+6CTFZyKde5xJBNFHBCspLagPdB6Pst/aM9yZVhYfW6A== +"@budibase/pro@1.2.8": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.8.tgz#bdd65b89eba4cf883cc1f2c704826d2c217ccbfe" + integrity sha512-2S2YaMNUCkBg6ZuX8BFFtc39/8fW8bf2nHLX6dKSw0G6itfhrTxi/ShXH+61k//gtB2APQQwJNJ9LX5ikiKp4g== dependencies: - "@budibase/backend-core" "1.2.7" - "@budibase/types" "1.2.7" + "@budibase/backend-core" "1.2.8" + "@budibase/types" "1.2.8" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1206,10 +1206,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.2.7", "@budibase/types@^1.2.7": - version "1.2.7" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.7.tgz#7e79c7b0d24e21656dd096e24e8b272eaa6cbeb7" - integrity sha512-0OQoT808CC6GRnTzay9BCzYdi1Tzl8l/8zWEhmhzRsuUZLUL8It1mU+B3JGCTqsMUHf0JGMrZu35H7j0VoZEBA== +"@budibase/types@1.2.8", "@budibase/types@^1.2.8": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.8.tgz#0cf5a086be1c98962f9f4e91331da660412f4ff4" + integrity sha512-FRt8Ceh7iRA/4Dd8lyq7Po4ukfPVbrMBwRBggPhMFY+Oxch/fDBNx6WMEqSr7LGsLA5UaLz+eHNyEFtV3V4+Sg== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index c900d406ca..11e544919c 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -36,7 +36,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "^1.2.8", - "@budibase/pro": "1.2.7", + "@budibase/pro": "1.2.8", "@budibase/string-templates": "^1.2.8", "@budibase/types": "^1.2.8", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 53e300f4d6..e527ba8473 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.7": - version "1.2.7" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.7.tgz#10cc56023910727566e981294d47ac0ac6a7f1d6" - integrity sha512-Ig/V+2XohnogMLV4NlQxrdB7APAv2GbvGcWwPbPekX60tzTTK1ZKgnQp1y72o2ebor46Nw5iRH+OabA/YhO7fg== +"@budibase/backend-core@1.2.8": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.8.tgz#771619a4e4eacf61c204b5b9d8aea9380176ede8" + integrity sha512-+j6wDRJfeq7eQRLiblhfHySwz7e+sOD8spoS6qhqr732J9j6B4uFnvTc1HEezmHw6W4ZkCEqa97v+bSr9y2MPg== dependencies: - "@budibase/types" "^1.2.7" + "@budibase/types" "^1.2.8" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -324,21 +324,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.2.7": - version "1.2.7" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.7.tgz#8ea9712ea908a66a7189b8d2c1e9f90403a740c7" - integrity sha512-lfQU16Bm7aHj8y+YOkfNLb8K9qrg4U8DhGKVkPP++T+6CTFZyKde5xJBNFHBCspLagPdB6Pst/aM9yZVhYfW6A== +"@budibase/pro@1.2.8": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.8.tgz#bdd65b89eba4cf883cc1f2c704826d2c217ccbfe" + integrity sha512-2S2YaMNUCkBg6ZuX8BFFtc39/8fW8bf2nHLX6dKSw0G6itfhrTxi/ShXH+61k//gtB2APQQwJNJ9LX5ikiKp4g== dependencies: - "@budibase/backend-core" "1.2.7" - "@budibase/types" "1.2.7" + "@budibase/backend-core" "1.2.8" + "@budibase/types" "1.2.8" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.2.7", "@budibase/types@^1.2.7": - version "1.2.7" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.7.tgz#7e79c7b0d24e21656dd096e24e8b272eaa6cbeb7" - integrity sha512-0OQoT808CC6GRnTzay9BCzYdi1Tzl8l/8zWEhmhzRsuUZLUL8It1mU+B3JGCTqsMUHf0JGMrZu35H7j0VoZEBA== +"@budibase/types@1.2.8", "@budibase/types@^1.2.8": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.8.tgz#0cf5a086be1c98962f9f4e91331da660412f4ff4" + integrity sha512-FRt8Ceh7iRA/4Dd8lyq7Po4ukfPVbrMBwRBggPhMFY+Oxch/fDBNx6WMEqSr7LGsLA5UaLz+eHNyEFtV3V4+Sg== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From 1b6b8775466847443990aacf6a36464219f6b49b Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Thu, 4 Aug 2022 14:49:56 +0100 Subject: [PATCH 143/320] Sync global-info users to fix login + prevent double password hashing --- .../src/migrations/definitions.ts | 4 + packages/types/src/sdk/migrations.ts | 1 + .../src/api/controllers/system/migrations.ts | 13 ++++ packages/worker/src/api/index.js | 5 +- packages/worker/src/api/routes/index.js | 2 + .../src/api/routes/system/migrations.ts | 19 +++++ .../functions/globalInfoSyncUsers.ts | 20 +++++ packages/worker/src/migrations/index.ts | 74 +++++++++++++++++++ packages/worker/src/sdk/users/users.ts | 12 +-- 9 files changed, 138 insertions(+), 12 deletions(-) create mode 100644 packages/worker/src/api/controllers/system/migrations.ts create mode 100644 packages/worker/src/api/routes/system/migrations.ts create mode 100644 packages/worker/src/migrations/functions/globalInfoSyncUsers.ts create mode 100644 packages/worker/src/migrations/index.ts diff --git a/packages/backend-core/src/migrations/definitions.ts b/packages/backend-core/src/migrations/definitions.ts index 745c8718c9..34ec0f0cad 100644 --- a/packages/backend-core/src/migrations/definitions.ts +++ b/packages/backend-core/src/migrations/definitions.ts @@ -37,4 +37,8 @@ export const DEFINITIONS: MigrationDefinition[] = [ type: MigrationType.INSTALLATION, name: MigrationName.EVENT_INSTALLATION_BACKFILL, }, + { + type: MigrationType.GLOBAL, + name: MigrationName.GLOBAL_INFO_SYNC_USERS, + }, ] diff --git a/packages/types/src/sdk/migrations.ts b/packages/types/src/sdk/migrations.ts index bb32d2e045..23a4d6d097 100644 --- a/packages/types/src/sdk/migrations.ts +++ b/packages/types/src/sdk/migrations.ts @@ -46,6 +46,7 @@ export enum MigrationName { EVENT_APP_BACKFILL = "event_app_backfill", EVENT_GLOBAL_BACKFILL = "event_global_backfill", EVENT_INSTALLATION_BACKFILL = "event_installation_backfill", + GLOBAL_INFO_SYNC_USERS = "global_info_sync_users", } export interface MigrationDefinition { diff --git a/packages/worker/src/api/controllers/system/migrations.ts b/packages/worker/src/api/controllers/system/migrations.ts new file mode 100644 index 0000000000..57a5f6261c --- /dev/null +++ b/packages/worker/src/api/controllers/system/migrations.ts @@ -0,0 +1,13 @@ +const { migrate, MIGRATIONS } = require("../../../migrations") + +export const runMigrations = async (ctx: any) => { + const options = ctx.request.body + // don't await as can take a while, just return + migrate(options) + ctx.status = 200 +} + +export const fetchDefinitions = async (ctx: any) => { + ctx.body = MIGRATIONS + ctx.status = 200 +} diff --git a/packages/worker/src/api/index.js b/packages/worker/src/api/index.js index 281d9d097c..ca56e0c5d2 100644 --- a/packages/worker/src/api/index.js +++ b/packages/worker/src/api/index.js @@ -106,7 +106,10 @@ router if (ctx.publicEndpoint) { return next() } - if ((!ctx.isAuthenticated || !ctx.user.budibaseAccess) && !ctx.internal) { + if ( + (!ctx.isAuthenticated || (ctx.user && !ctx.user.budibaseAccess)) && + !ctx.internal + ) { ctx.throw(403, "Unauthorized - no public worker access") } return next() diff --git a/packages/worker/src/api/routes/index.js b/packages/worker/src/api/routes/index.js index 89c67bdf88..e112d4def3 100644 --- a/packages/worker/src/api/routes/index.js +++ b/packages/worker/src/api/routes/index.js @@ -12,6 +12,7 @@ const tenantsRoutes = require("./system/tenants") const statusRoutes = require("./system/status") const selfRoutes = require("./global/self") const licenseRoutes = require("./global/license") +const migrationRoutes = require("./system/migrations") let userGroupRoutes = api.groups exports.routes = [ @@ -29,4 +30,5 @@ exports.routes = [ selfRoutes, licenseRoutes, userGroupRoutes, + migrationRoutes, ] diff --git a/packages/worker/src/api/routes/system/migrations.ts b/packages/worker/src/api/routes/system/migrations.ts new file mode 100644 index 0000000000..5dcf90c4de --- /dev/null +++ b/packages/worker/src/api/routes/system/migrations.ts @@ -0,0 +1,19 @@ +import Router from "@koa/router" +import * as migrationsController from "../../controllers/system/migrations" +import { auth } from "@budibase/backend-core" + +const router = new Router() + +router + .post( + "/api/system/migrations/run", + auth.internalApi, + migrationsController.runMigrations + ) + .get( + "/api/system/migrations/definitions", + auth.internalApi, + migrationsController.fetchDefinitions + ) + +export = router diff --git a/packages/worker/src/migrations/functions/globalInfoSyncUsers.ts b/packages/worker/src/migrations/functions/globalInfoSyncUsers.ts new file mode 100644 index 0000000000..cae6c6af51 --- /dev/null +++ b/packages/worker/src/migrations/functions/globalInfoSyncUsers.ts @@ -0,0 +1,20 @@ +import { User } from "@budibase/types" +import * as sdk from "../../sdk" + +/** + * Date: + * Aug 2022 + * + * Description: + * Re-sync the global-db users to the global-info db users + */ +export const run = async (globalDb: any) => { + const users = (await sdk.users.allUsers()) as User[] + const promises = [] + for (let user of users) { + promises.push( + sdk.users.addTenant(user.tenantId, user._id as string, user.email) + ) + } + await Promise.all(promises) +} diff --git a/packages/worker/src/migrations/index.ts b/packages/worker/src/migrations/index.ts new file mode 100644 index 0000000000..6900596216 --- /dev/null +++ b/packages/worker/src/migrations/index.ts @@ -0,0 +1,74 @@ +import { migrations, redis } from "@budibase/backend-core" +import { Migration, MigrationOptions, MigrationName } from "@budibase/types" +import env from "../environment" + +// migration functions +import * as syncUserInfo from "./functions/globalInfoSyncUsers" + +/** + * Populate the migration function and additional configuration from + * the static migration definitions. + */ +export const buildMigrations = () => { + const definitions = migrations.DEFINITIONS + const workerMigrations: Migration[] = [] + + for (const definition of definitions) { + switch (definition.name) { + case MigrationName.GLOBAL_INFO_SYNC_USERS: { + // only needed in cloud + if (!env.SELF_HOSTED) { + workerMigrations.push({ + ...definition, + fn: syncUserInfo.run, + }) + } + break + } + } + } + + return workerMigrations +} + +export const MIGRATIONS = buildMigrations() + +export const migrate = async (options?: MigrationOptions) => { + if (env.SELF_HOSTED) { + await migrateWithLock(options) + } else { + await migrations.runMigrations(MIGRATIONS, options) + } +} + +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 + } + } + + // 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/worker/src/sdk/users/users.ts b/packages/worker/src/sdk/users/users.ts index de312b7a25..e6b3f0a21d 100644 --- a/packages/worker/src/sdk/users/users.ts +++ b/packages/worker/src/sdk/users/users.ts @@ -106,7 +106,6 @@ const buildUser = async ( opts: SaveUserOpts = { hashPassword: true, requirePassword: true, - bulkCreate: false, }, tenantId: string, dbUser?: any @@ -185,15 +184,7 @@ export const save = async ( dbUser = await db.get(_id) } - let builtUser = await buildUser( - user, - { - hashPassword: true, - requirePassword: user.requirePassword, - }, - tenantId, - dbUser - ) + let builtUser = await buildUser(user, opts, tenantId, dbUser) // make sure we set the _id field for a new user if (!_id) { @@ -298,7 +289,6 @@ export const bulkCreate = async ( { hashPassword: true, requirePassword: user.requirePassword, - bulkCreate: false, }, tenantId ) From d47b0d15b96d75d88dabd457a86f270f4282e187 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Thu, 4 Aug 2022 14:33:14 +0000 Subject: [PATCH 144/320] v1.2.9 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lerna.json b/lerna.json index beb1d1d8f4..ec25239572 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.2.8", + "version": "1.2.9", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index d63cc2ebd1..90f25a1346 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.2.8", + "version": "1.2.9", "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.8", + "@budibase/types": "^1.2.9", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", "bcrypt": "5.0.1", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 3dd6f71a58..4c60949d01 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.8", + "version": "1.2.9", "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.8", + "@budibase/string-templates": "^1.2.9", "@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 bf3eeb957f..5e689ddb9b 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.2.8", + "version": "1.2.9", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.2.8", - "@budibase/client": "^1.2.8", - "@budibase/frontend-core": "^1.2.8", - "@budibase/string-templates": "^1.2.8", + "@budibase/bbui": "^1.2.9", + "@budibase/client": "^1.2.9", + "@budibase/frontend-core": "^1.2.9", + "@budibase/string-templates": "^1.2.9", "@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 ca15309549..6c2cab2396 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.2.8", + "version": "1.2.9", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index b82c41b7bd..2a84350f84 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.2.8", + "version": "1.2.9", "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.8", - "@budibase/frontend-core": "^1.2.8", - "@budibase/string-templates": "^1.2.8", + "@budibase/bbui": "^1.2.9", + "@budibase/frontend-core": "^1.2.9", + "@budibase/string-templates": "^1.2.9", "@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 5d8ba8fc27..34f506cb04 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.2.8", + "version": "1.2.9", "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.8", + "@budibase/bbui": "^1.2.9", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index f79dc4be22..982f4e66bb 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.8", + "version": "1.2.9", "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.8", - "@budibase/client": "^1.2.8", + "@budibase/backend-core": "^1.2.9", + "@budibase/client": "^1.2.9", "@budibase/pro": "1.2.8", - "@budibase/string-templates": "^1.2.8", - "@budibase/types": "^1.2.8", + "@budibase/string-templates": "^1.2.9", + "@budibase/types": "^1.2.9", "@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 a1cc33fd5c..6257eec21b 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.2.8", + "version": "1.2.9", "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 f474727ee7..5721d41bcf 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.2.8", + "version": "1.2.9", "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 11e544919c..39c6608245 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.8", + "version": "1.2.9", "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.8", + "@budibase/backend-core": "^1.2.9", "@budibase/pro": "1.2.8", - "@budibase/string-templates": "^1.2.8", - "@budibase/types": "^1.2.8", + "@budibase/string-templates": "^1.2.9", + "@budibase/types": "^1.2.9", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From ea17cd9a2d663d969bc5f2977e8bbff211e56d34 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Thu, 4 Aug 2022 14:36:45 +0000 Subject: [PATCH 145/320] Update pro version to 1.2.9 --- 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 982f4e66bb..55eb4c44d2 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "^1.2.9", "@budibase/client": "^1.2.9", - "@budibase/pro": "1.2.8", + "@budibase/pro": "1.2.9", "@budibase/string-templates": "^1.2.9", "@budibase/types": "^1.2.9", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index dce1b00e1a..70f36370e4 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.8": - version "1.2.8" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.8.tgz#771619a4e4eacf61c204b5b9d8aea9380176ede8" - integrity sha512-+j6wDRJfeq7eQRLiblhfHySwz7e+sOD8spoS6qhqr732J9j6B4uFnvTc1HEezmHw6W4ZkCEqa97v+bSr9y2MPg== +"@budibase/backend-core@1.2.9": + version "1.2.9" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.9.tgz#4ef2fd3f549784e7c2b8621562d98f6ca560e401" + integrity sha512-Xq7A1ugKgK55cnWPtzYZ2aX2x6uD0TKY9NIl7AJ3WAavmTc8F9eZ2jOUHULtTKrZ1uYY0PRgQDhfch5EqaT9XQ== dependencies: - "@budibase/types" "^1.2.8" + "@budibase/types" "^1.2.9" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -1177,13 +1177,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.2.8": - version "1.2.8" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.8.tgz#bdd65b89eba4cf883cc1f2c704826d2c217ccbfe" - integrity sha512-2S2YaMNUCkBg6ZuX8BFFtc39/8fW8bf2nHLX6dKSw0G6itfhrTxi/ShXH+61k//gtB2APQQwJNJ9LX5ikiKp4g== +"@budibase/pro@1.2.9": + version "1.2.9" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.9.tgz#884d6916197a09caec450f46d565d3cae1dfe768" + integrity sha512-s8hck7SVQhdNmyMGNOo/t3f5bq7ZWChsg43hnFUwH5Dytw0483zGxzA0/y3RQ8t8I8vvoudx/JDGNzZxbIqSyw== dependencies: - "@budibase/backend-core" "1.2.8" - "@budibase/types" "1.2.8" + "@budibase/backend-core" "1.2.9" + "@budibase/types" "1.2.9" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1206,10 +1206,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.2.8", "@budibase/types@^1.2.8": - version "1.2.8" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.8.tgz#0cf5a086be1c98962f9f4e91331da660412f4ff4" - integrity sha512-FRt8Ceh7iRA/4Dd8lyq7Po4ukfPVbrMBwRBggPhMFY+Oxch/fDBNx6WMEqSr7LGsLA5UaLz+eHNyEFtV3V4+Sg== +"@budibase/types@1.2.9", "@budibase/types@^1.2.9": + version "1.2.9" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.9.tgz#e3e7996daa6703e69b8c28e705c108f7a981aca8" + integrity sha512-6qgXKr86B2TT4lX+f5B6K9dXPQ6QpU83QwqohpvjVgbmbiAcylh4BsBS1reIAASh3+9t4VdydQR6+jwQTTr+Yg== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 39c6608245..b27e727731 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -36,7 +36,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "^1.2.9", - "@budibase/pro": "1.2.8", + "@budibase/pro": "1.2.9", "@budibase/string-templates": "^1.2.9", "@budibase/types": "^1.2.9", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index e527ba8473..49c47a6ede 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.8": - version "1.2.8" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.8.tgz#771619a4e4eacf61c204b5b9d8aea9380176ede8" - integrity sha512-+j6wDRJfeq7eQRLiblhfHySwz7e+sOD8spoS6qhqr732J9j6B4uFnvTc1HEezmHw6W4ZkCEqa97v+bSr9y2MPg== +"@budibase/backend-core@1.2.9": + version "1.2.9" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.9.tgz#4ef2fd3f549784e7c2b8621562d98f6ca560e401" + integrity sha512-Xq7A1ugKgK55cnWPtzYZ2aX2x6uD0TKY9NIl7AJ3WAavmTc8F9eZ2jOUHULtTKrZ1uYY0PRgQDhfch5EqaT9XQ== dependencies: - "@budibase/types" "^1.2.8" + "@budibase/types" "^1.2.9" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -324,21 +324,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.2.8": - version "1.2.8" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.8.tgz#bdd65b89eba4cf883cc1f2c704826d2c217ccbfe" - integrity sha512-2S2YaMNUCkBg6ZuX8BFFtc39/8fW8bf2nHLX6dKSw0G6itfhrTxi/ShXH+61k//gtB2APQQwJNJ9LX5ikiKp4g== +"@budibase/pro@1.2.9": + version "1.2.9" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.9.tgz#884d6916197a09caec450f46d565d3cae1dfe768" + integrity sha512-s8hck7SVQhdNmyMGNOo/t3f5bq7ZWChsg43hnFUwH5Dytw0483zGxzA0/y3RQ8t8I8vvoudx/JDGNzZxbIqSyw== dependencies: - "@budibase/backend-core" "1.2.8" - "@budibase/types" "1.2.8" + "@budibase/backend-core" "1.2.9" + "@budibase/types" "1.2.9" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.2.8", "@budibase/types@^1.2.8": - version "1.2.8" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.8.tgz#0cf5a086be1c98962f9f4e91331da660412f4ff4" - integrity sha512-FRt8Ceh7iRA/4Dd8lyq7Po4ukfPVbrMBwRBggPhMFY+Oxch/fDBNx6WMEqSr7LGsLA5UaLz+eHNyEFtV3V4+Sg== +"@budibase/types@1.2.9", "@budibase/types@^1.2.9": + version "1.2.9" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.9.tgz#e3e7996daa6703e69b8c28e705c108f7a981aca8" + integrity sha512-6qgXKr86B2TT4lX+f5B6K9dXPQ6QpU83QwqohpvjVgbmbiAcylh4BsBS1reIAASh3+9t4VdydQR6+jwQTTr+Yg== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From 382a2a3050e801dffdc43d6e4b5d4e08ba29137c Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 4 Aug 2022 16:06:59 +0100 Subject: [PATCH 146/320] Adding logging for session invalidation. --- packages/backend-core/src/security/sessions.js | 6 ++++++ packages/cli/.gitignore | 1 + 2 files changed, 7 insertions(+) diff --git a/packages/backend-core/src/security/sessions.js b/packages/backend-core/src/security/sessions.js index 8874b47469..2ac6eefb24 100644 --- a/packages/backend-core/src/security/sessions.js +++ b/packages/backend-core/src/security/sessions.js @@ -1,5 +1,6 @@ const redis = require("../redis/init") const { v4: uuidv4 } = require("uuid") +const { logWarn } = require("../logging") // a week in seconds const EXPIRY_SECONDS = 86400 * 7 @@ -38,6 +39,11 @@ async function invalidateSessions(userId, sessionIds = null) { for (let session of sessions) { promises.push(client.delete(session.key)) } + logWarn( + `Invalidating sessions for ${userId} - ${sessions + .map(session => session.key) + .join(", ")}` + ) await Promise.all(promises) } catch (err) { console.error(`Error invalidating sessions: ${err}`) diff --git a/packages/cli/.gitignore b/packages/cli/.gitignore index efef4f97c8..655ef7b624 100644 --- a/packages/cli/.gitignore +++ b/packages/cli/.gitignore @@ -5,3 +5,4 @@ build/ docker-error.log envoy.yaml *.tar.gz +prebuilds/ From 787ecbc9dba971fd3740cbdcdeb59643f403c418 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Thu, 4 Aug 2022 15:20:18 +0000 Subject: [PATCH 147/320] v1.2.10 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lerna.json b/lerna.json index ec25239572..36c945e3fb 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.2.9", + "version": "1.2.10", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 90f25a1346..1fc60d3a74 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.2.9", + "version": "1.2.10", "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.9", + "@budibase/types": "^1.2.10", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", "bcrypt": "5.0.1", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 4c60949d01..8a087580df 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.9", + "version": "1.2.10", "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.9", + "@budibase/string-templates": "^1.2.10", "@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 5e689ddb9b..5b8999cce8 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.2.9", + "version": "1.2.10", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.2.9", - "@budibase/client": "^1.2.9", - "@budibase/frontend-core": "^1.2.9", - "@budibase/string-templates": "^1.2.9", + "@budibase/bbui": "^1.2.10", + "@budibase/client": "^1.2.10", + "@budibase/frontend-core": "^1.2.10", + "@budibase/string-templates": "^1.2.10", "@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 6c2cab2396..3048a31e31 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.2.9", + "version": "1.2.10", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index 2a84350f84..ce0aebde41 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.2.9", + "version": "1.2.10", "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.9", - "@budibase/frontend-core": "^1.2.9", - "@budibase/string-templates": "^1.2.9", + "@budibase/bbui": "^1.2.10", + "@budibase/frontend-core": "^1.2.10", + "@budibase/string-templates": "^1.2.10", "@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 34f506cb04..6cdaec8fd3 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.2.9", + "version": "1.2.10", "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.9", + "@budibase/bbui": "^1.2.10", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 55eb4c44d2..712ef586d0 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.9", + "version": "1.2.10", "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.9", - "@budibase/client": "^1.2.9", + "@budibase/backend-core": "^1.2.10", + "@budibase/client": "^1.2.10", "@budibase/pro": "1.2.9", - "@budibase/string-templates": "^1.2.9", - "@budibase/types": "^1.2.9", + "@budibase/string-templates": "^1.2.10", + "@budibase/types": "^1.2.10", "@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 6257eec21b..4db9a9838f 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.2.9", + "version": "1.2.10", "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 5721d41bcf..979a91baa2 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.2.9", + "version": "1.2.10", "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 b27e727731..7420b8a5d8 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.9", + "version": "1.2.10", "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.9", + "@budibase/backend-core": "^1.2.10", "@budibase/pro": "1.2.9", - "@budibase/string-templates": "^1.2.9", - "@budibase/types": "^1.2.9", + "@budibase/string-templates": "^1.2.10", + "@budibase/types": "^1.2.10", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 9cd2dbab05db85b08bd61baf08baca80c3434aa9 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Thu, 4 Aug 2022 15:23:31 +0000 Subject: [PATCH 148/320] Update pro version to 1.2.10 --- 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 712ef586d0..9dcbc4ad69 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "^1.2.10", "@budibase/client": "^1.2.10", - "@budibase/pro": "1.2.9", + "@budibase/pro": "1.2.10", "@budibase/string-templates": "^1.2.10", "@budibase/types": "^1.2.10", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 70f36370e4..367a3a8d31 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.9": - version "1.2.9" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.9.tgz#4ef2fd3f549784e7c2b8621562d98f6ca560e401" - integrity sha512-Xq7A1ugKgK55cnWPtzYZ2aX2x6uD0TKY9NIl7AJ3WAavmTc8F9eZ2jOUHULtTKrZ1uYY0PRgQDhfch5EqaT9XQ== +"@budibase/backend-core@1.2.10": + version "1.2.10" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.10.tgz#85d3abc3f018f0bf1aa43fd67a0082a57b2a6734" + integrity sha512-jsVg2Rlj74w/Z7dEFavQAutH+b3gFpxryhj/vGPN0AUw9meIFfIjwXYtPKbG/i+4u9IehH0rR74qPMDvCPAQbw== dependencies: - "@budibase/types" "^1.2.9" + "@budibase/types" "^1.2.10" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -1177,13 +1177,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.2.9": - version "1.2.9" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.9.tgz#884d6916197a09caec450f46d565d3cae1dfe768" - integrity sha512-s8hck7SVQhdNmyMGNOo/t3f5bq7ZWChsg43hnFUwH5Dytw0483zGxzA0/y3RQ8t8I8vvoudx/JDGNzZxbIqSyw== +"@budibase/pro@1.2.10": + version "1.2.10" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.10.tgz#d7eb9a6ae644ba12e619cb75e8ba344f1f5a236b" + integrity sha512-yBkLheDX2lervydUSyyufMLASlT9h4MOf6Eah2Xs0u7W0SjpYg3dNKNuOWOFMwF5wVG1oqJbF2xN2YBd8rPObw== dependencies: - "@budibase/backend-core" "1.2.9" - "@budibase/types" "1.2.9" + "@budibase/backend-core" "1.2.10" + "@budibase/types" "1.2.10" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1206,10 +1206,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.2.9", "@budibase/types@^1.2.9": - version "1.2.9" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.9.tgz#e3e7996daa6703e69b8c28e705c108f7a981aca8" - integrity sha512-6qgXKr86B2TT4lX+f5B6K9dXPQ6QpU83QwqohpvjVgbmbiAcylh4BsBS1reIAASh3+9t4VdydQR6+jwQTTr+Yg== +"@budibase/types@1.2.10", "@budibase/types@^1.2.10": + version "1.2.10" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.10.tgz#1d4f1c2acaef6bf1792783cb9601f3618ab06c47" + integrity sha512-dA+metuFnJx4LP67JGaBnYvq7zVfzIE6VXr2HHetnbpk5sVKDzwqRQnfh1T88zFcFlYDNvk52sLLbbAw7r4ozA== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 7420b8a5d8..fa1b1bbbab 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -36,7 +36,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "^1.2.10", - "@budibase/pro": "1.2.9", + "@budibase/pro": "1.2.10", "@budibase/string-templates": "^1.2.10", "@budibase/types": "^1.2.10", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 49c47a6ede..04b3dc934e 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.9": - version "1.2.9" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.9.tgz#4ef2fd3f549784e7c2b8621562d98f6ca560e401" - integrity sha512-Xq7A1ugKgK55cnWPtzYZ2aX2x6uD0TKY9NIl7AJ3WAavmTc8F9eZ2jOUHULtTKrZ1uYY0PRgQDhfch5EqaT9XQ== +"@budibase/backend-core@1.2.10": + version "1.2.10" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.10.tgz#85d3abc3f018f0bf1aa43fd67a0082a57b2a6734" + integrity sha512-jsVg2Rlj74w/Z7dEFavQAutH+b3gFpxryhj/vGPN0AUw9meIFfIjwXYtPKbG/i+4u9IehH0rR74qPMDvCPAQbw== dependencies: - "@budibase/types" "^1.2.9" + "@budibase/types" "^1.2.10" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -324,21 +324,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.2.9": - version "1.2.9" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.9.tgz#884d6916197a09caec450f46d565d3cae1dfe768" - integrity sha512-s8hck7SVQhdNmyMGNOo/t3f5bq7ZWChsg43hnFUwH5Dytw0483zGxzA0/y3RQ8t8I8vvoudx/JDGNzZxbIqSyw== +"@budibase/pro@1.2.10": + version "1.2.10" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.10.tgz#d7eb9a6ae644ba12e619cb75e8ba344f1f5a236b" + integrity sha512-yBkLheDX2lervydUSyyufMLASlT9h4MOf6Eah2Xs0u7W0SjpYg3dNKNuOWOFMwF5wVG1oqJbF2xN2YBd8rPObw== dependencies: - "@budibase/backend-core" "1.2.9" - "@budibase/types" "1.2.9" + "@budibase/backend-core" "1.2.10" + "@budibase/types" "1.2.10" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.2.9", "@budibase/types@^1.2.9": - version "1.2.9" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.9.tgz#e3e7996daa6703e69b8c28e705c108f7a981aca8" - integrity sha512-6qgXKr86B2TT4lX+f5B6K9dXPQ6QpU83QwqohpvjVgbmbiAcylh4BsBS1reIAASh3+9t4VdydQR6+jwQTTr+Yg== +"@budibase/types@1.2.10", "@budibase/types@^1.2.10": + version "1.2.10" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.10.tgz#1d4f1c2acaef6bf1792783cb9601f3618ab06c47" + integrity sha512-dA+metuFnJx4LP67JGaBnYvq7zVfzIE6VXr2HHetnbpk5sVKDzwqRQnfh1T88zFcFlYDNvk52sLLbbAw7r4ozA== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From d23af4dec1ef80a9b29896a59ee4330d3f3fb4b1 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 4 Aug 2022 17:14:52 +0100 Subject: [PATCH 149/320] Allow builders (not just admins) to delete apps. --- packages/worker/src/api/routes/global/roles.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/worker/src/api/routes/global/roles.js b/packages/worker/src/api/routes/global/roles.js index 4e27b7d54b..dff4c6a068 100644 --- a/packages/worker/src/api/routes/global/roles.js +++ b/packages/worker/src/api/routes/global/roles.js @@ -1,12 +1,12 @@ const Router = require("@koa/router") const controller = require("../../controllers/global/roles") -const { adminOnly } = require("@budibase/backend-core/auth") +const builderOrAdmin = require("../../../middleware/builderOrAdmin") const router = Router() router - .get("/api/global/roles", adminOnly, controller.fetch) - .get("/api/global/roles/:appId", adminOnly, controller.find) - .delete("/api/global/roles/:appId", adminOnly, controller.removeAppRole) + .get("/api/global/roles", builderOrAdmin, controller.fetch) + .get("/api/global/roles/:appId", builderOrAdmin, controller.find) + .delete("/api/global/roles/:appId", builderOrAdmin, controller.removeAppRole) module.exports = router From f3418c4107158aa9f52092e70f9afeb74f383f76 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 4 Aug 2022 19:03:50 +0100 Subject: [PATCH 150/320] Some more logging, moving middlewares to backend-core. --- packages/backend-core/src/auth.js | 4 +++ .../src/middleware/authenticated.js | 2 +- .../src/middleware/builderOnly.js | 0 .../src/middleware/builderOrAdmin.js | 0 packages/backend-core/src/middleware/index.js | 4 +++ .../backend-core/src/security/sessions.js | 25 ++++++++++------- .../worker/src/api/routes/global/roles.js | 2 +- packages/worker/src/api/routes/global/self.js | 2 +- .../worker/src/api/routes/global/users.js | 2 +- .../worker/src/api/routes/validation/users.ts | 2 +- packages/worker/src/middleware/adminOnly.js | 9 ------ .../worker/src/middleware/joi-validator.js | 28 ------------------- 12 files changed, 28 insertions(+), 52 deletions(-) rename packages/{worker => backend-core}/src/middleware/builderOnly.js (100%) rename packages/{worker => backend-core}/src/middleware/builderOrAdmin.js (100%) delete mode 100644 packages/worker/src/middleware/adminOnly.js delete mode 100644 packages/worker/src/middleware/joi-validator.js diff --git a/packages/backend-core/src/auth.js b/packages/backend-core/src/auth.js index 9ae29a3cbd..d39b8426fb 100644 --- a/packages/backend-core/src/auth.js +++ b/packages/backend-core/src/auth.js @@ -19,6 +19,8 @@ const { csrf, internalApi, adminOnly, + builderOnly, + builderOrAdmin, joiValidator, } = require("./middleware") @@ -176,5 +178,7 @@ module.exports = { updateUserOAuth, ssoCallbackUrl, adminOnly, + builderOnly, + builderOrAdmin, joiValidator, } diff --git a/packages/backend-core/src/middleware/authenticated.js b/packages/backend-core/src/middleware/authenticated.js index d86af773c3..674c16aa55 100644 --- a/packages/backend-core/src/middleware/authenticated.js +++ b/packages/backend-core/src/middleware/authenticated.js @@ -81,7 +81,7 @@ module.exports = ( const session = await getSession(userId, sessionId) if (!session) { - error = "No session found" + error = `Session not found - ${userId} - ${sessionId}` } else { try { if (opts && opts.populateUser) { diff --git a/packages/worker/src/middleware/builderOnly.js b/packages/backend-core/src/middleware/builderOnly.js similarity index 100% rename from packages/worker/src/middleware/builderOnly.js rename to packages/backend-core/src/middleware/builderOnly.js diff --git a/packages/worker/src/middleware/builderOrAdmin.js b/packages/backend-core/src/middleware/builderOrAdmin.js similarity index 100% rename from packages/worker/src/middleware/builderOrAdmin.js rename to packages/backend-core/src/middleware/builderOrAdmin.js diff --git a/packages/backend-core/src/middleware/index.js b/packages/backend-core/src/middleware/index.js index 9d94bf5763..7e7b8a2931 100644 --- a/packages/backend-core/src/middleware/index.js +++ b/packages/backend-core/src/middleware/index.js @@ -10,6 +10,8 @@ const internalApi = require("./internalApi") const datasourceGoogle = require("./passport/datasource/google") const csrf = require("./csrf") const adminOnly = require("./adminOnly") +const builderOrAdmin = require("./builderOrAdmin") +const builderOnly = require("./builderOnly") const joiValidator = require("./joi-validator") module.exports = { google, @@ -27,5 +29,7 @@ module.exports = { }, csrf, adminOnly, + builderOnly, + builderOrAdmin, joiValidator, } diff --git a/packages/backend-core/src/security/sessions.js b/packages/backend-core/src/security/sessions.js index 2ac6eefb24..a3be0a1a58 100644 --- a/packages/backend-core/src/security/sessions.js +++ b/packages/backend-core/src/security/sessions.js @@ -1,6 +1,7 @@ const redis = require("../redis/init") const { v4: uuidv4 } = require("uuid") const { logWarn } = require("../logging") +const env = require("../environment") // a week in seconds const EXPIRY_SECONDS = 86400 * 7 @@ -34,17 +35,21 @@ async function invalidateSessions(userId, sessionIds = null) { })) } - const client = await redis.getSessionClient() - const promises = [] - for (let session of sessions) { - promises.push(client.delete(session.key)) + if (sessions && sessions.length > 0) { + const client = await redis.getSessionClient() + const promises = [] + for (let session of sessions) { + promises.push(client.delete(session.key)) + } + if (!env.isTest()) { + logWarn( + `Invalidating sessions for ${userId} - ${sessions + .map(session => session.key) + .join(", ")}` + ) + } + await Promise.all(promises) } - logWarn( - `Invalidating sessions for ${userId} - ${sessions - .map(session => session.key) - .join(", ")}` - ) - await Promise.all(promises) } catch (err) { console.error(`Error invalidating sessions: ${err}`) } diff --git a/packages/worker/src/api/routes/global/roles.js b/packages/worker/src/api/routes/global/roles.js index dff4c6a068..d99e0e5b56 100644 --- a/packages/worker/src/api/routes/global/roles.js +++ b/packages/worker/src/api/routes/global/roles.js @@ -1,6 +1,6 @@ const Router = require("@koa/router") const controller = require("../../controllers/global/roles") -const builderOrAdmin = require("../../../middleware/builderOrAdmin") +const { builderOrAdmin } = require("@budibase/backend-core/auth") const router = Router() diff --git a/packages/worker/src/api/routes/global/self.js b/packages/worker/src/api/routes/global/self.js index e1af7c2146..1683a94f37 100644 --- a/packages/worker/src/api/routes/global/self.js +++ b/packages/worker/src/api/routes/global/self.js @@ -1,6 +1,6 @@ const Router = require("@koa/router") const controller = require("../../controllers/global/self") -const builderOnly = require("../../../middleware/builderOnly") +const { builderOnly } = require("@budibase/backend-core/auth") const { users } = require("../validation") const router = Router() diff --git a/packages/worker/src/api/routes/global/users.js b/packages/worker/src/api/routes/global/users.js index 0fc479df39..e0a221a795 100644 --- a/packages/worker/src/api/routes/global/users.js +++ b/packages/worker/src/api/routes/global/users.js @@ -6,7 +6,7 @@ const Joi = require("joi") const cloudRestricted = require("../../../middleware/cloudRestricted") const { users } = require("../validation") const selfController = require("../../controllers/global/self") -const builderOrAdmin = require("../../../middleware/builderOrAdmin") +const { builderOrAdmin } = require("@budibase/backend-core/auth") const router = Router() diff --git a/packages/worker/src/api/routes/validation/users.ts b/packages/worker/src/api/routes/validation/users.ts index e7ad4cca18..d84ae94ee6 100644 --- a/packages/worker/src/api/routes/validation/users.ts +++ b/packages/worker/src/api/routes/validation/users.ts @@ -1,4 +1,4 @@ -import joiValidator from "../../../middleware/joi-validator" +const { joiValidator } = require("@budibase/backend-core/auth") import Joi from "joi" let schema: any = { diff --git a/packages/worker/src/middleware/adminOnly.js b/packages/worker/src/middleware/adminOnly.js deleted file mode 100644 index 4bfdf83848..0000000000 --- a/packages/worker/src/middleware/adminOnly.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = async (ctx, next) => { - if ( - !ctx.internal && - (!ctx.user || !ctx.user.admin || !ctx.user.admin.global) - ) { - ctx.throw(403, "Admin user only endpoint.") - } - return next() -} diff --git a/packages/worker/src/middleware/joi-validator.js b/packages/worker/src/middleware/joi-validator.js deleted file mode 100644 index 1686b0e727..0000000000 --- a/packages/worker/src/middleware/joi-validator.js +++ /dev/null @@ -1,28 +0,0 @@ -function validate(schema, property) { - // Return a Koa middleware function - return (ctx, next) => { - if (!schema) { - return next() - } - let params = null - if (ctx[property] != null) { - params = ctx[property] - } else if (ctx.request[property] != null) { - params = ctx.request[property] - } - const { error } = schema.validate(params) - if (error) { - ctx.throw(400, `Invalid ${property} - ${error.message}`) - return - } - return next() - } -} - -module.exports.body = schema => { - return validate(schema, "body") -} - -module.exports.params = schema => { - return validate(schema, "params") -} From 93f5a57df601157a12bb805baab0248c3ff17525 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Thu, 4 Aug 2022 18:49:45 +0000 Subject: [PATCH 151/320] v1.2.11 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lerna.json b/lerna.json index 36c945e3fb..29e79d6853 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.2.10", + "version": "1.2.11", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 1fc60d3a74..25ecdd45a6 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.2.10", + "version": "1.2.11", "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.10", + "@budibase/types": "^1.2.11", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", "bcrypt": "5.0.1", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 8a087580df..963df30f61 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.10", + "version": "1.2.11", "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.10", + "@budibase/string-templates": "^1.2.11", "@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 5b8999cce8..0d1cc41eb3 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.2.10", + "version": "1.2.11", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.2.10", - "@budibase/client": "^1.2.10", - "@budibase/frontend-core": "^1.2.10", - "@budibase/string-templates": "^1.2.10", + "@budibase/bbui": "^1.2.11", + "@budibase/client": "^1.2.11", + "@budibase/frontend-core": "^1.2.11", + "@budibase/string-templates": "^1.2.11", "@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 3048a31e31..65bfa6f5c0 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.2.10", + "version": "1.2.11", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index ce0aebde41..4ea237c43f 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.2.10", + "version": "1.2.11", "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.10", - "@budibase/frontend-core": "^1.2.10", - "@budibase/string-templates": "^1.2.10", + "@budibase/bbui": "^1.2.11", + "@budibase/frontend-core": "^1.2.11", + "@budibase/string-templates": "^1.2.11", "@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 6cdaec8fd3..3002ce9543 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.2.10", + "version": "1.2.11", "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.10", + "@budibase/bbui": "^1.2.11", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 9dcbc4ad69..291eab56aa 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.10", + "version": "1.2.11", "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.10", - "@budibase/client": "^1.2.10", + "@budibase/backend-core": "^1.2.11", + "@budibase/client": "^1.2.11", "@budibase/pro": "1.2.10", - "@budibase/string-templates": "^1.2.10", - "@budibase/types": "^1.2.10", + "@budibase/string-templates": "^1.2.11", + "@budibase/types": "^1.2.11", "@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 4db9a9838f..15c80b3751 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.2.10", + "version": "1.2.11", "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 979a91baa2..15fa1e54d1 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.2.10", + "version": "1.2.11", "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 fa1b1bbbab..0b9dfce944 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.10", + "version": "1.2.11", "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.10", + "@budibase/backend-core": "^1.2.11", "@budibase/pro": "1.2.10", - "@budibase/string-templates": "^1.2.10", - "@budibase/types": "^1.2.10", + "@budibase/string-templates": "^1.2.11", + "@budibase/types": "^1.2.11", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 1d9d021cc811aea15da35e4779a21580184c69c7 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Thu, 4 Aug 2022 18:52:59 +0000 Subject: [PATCH 152/320] Update pro version to 1.2.11 --- 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 291eab56aa..21ba2bb84f 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "^1.2.11", "@budibase/client": "^1.2.11", - "@budibase/pro": "1.2.10", + "@budibase/pro": "1.2.11", "@budibase/string-templates": "^1.2.11", "@budibase/types": "^1.2.11", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 367a3a8d31..2652c0ac1a 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.10": - version "1.2.10" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.10.tgz#85d3abc3f018f0bf1aa43fd67a0082a57b2a6734" - integrity sha512-jsVg2Rlj74w/Z7dEFavQAutH+b3gFpxryhj/vGPN0AUw9meIFfIjwXYtPKbG/i+4u9IehH0rR74qPMDvCPAQbw== +"@budibase/backend-core@1.2.11": + version "1.2.11" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.11.tgz#f8f0fd42545fdfdf1046681ac162d48681a5b4af" + integrity sha512-jJicRyS0xhpn63rugP8fMhKoFw9TIupIQ3Oks+p3lsBqlaODrCFxrAcJsnqpTydBL3mWrioRpGtBPFrptk+71g== dependencies: - "@budibase/types" "^1.2.10" + "@budibase/types" "^1.2.11" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -1177,13 +1177,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.2.10": - version "1.2.10" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.10.tgz#d7eb9a6ae644ba12e619cb75e8ba344f1f5a236b" - integrity sha512-yBkLheDX2lervydUSyyufMLASlT9h4MOf6Eah2Xs0u7W0SjpYg3dNKNuOWOFMwF5wVG1oqJbF2xN2YBd8rPObw== +"@budibase/pro@1.2.11": + version "1.2.11" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.11.tgz#54c912674ee2713f269b29232e636c4073454738" + integrity sha512-O+xZJLbK5PJYwqXLAtzKs+Akt8snjPSGb6exdvGSn/ZqmxBCMt8Ydf49prA3vMRvgjVkxkXBeqUo7+CJS3n6mw== dependencies: - "@budibase/backend-core" "1.2.10" - "@budibase/types" "1.2.10" + "@budibase/backend-core" "1.2.11" + "@budibase/types" "1.2.11" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1206,10 +1206,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.2.10", "@budibase/types@^1.2.10": - version "1.2.10" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.10.tgz#1d4f1c2acaef6bf1792783cb9601f3618ab06c47" - integrity sha512-dA+metuFnJx4LP67JGaBnYvq7zVfzIE6VXr2HHetnbpk5sVKDzwqRQnfh1T88zFcFlYDNvk52sLLbbAw7r4ozA== +"@budibase/types@1.2.11", "@budibase/types@^1.2.11": + version "1.2.11" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.11.tgz#5b9ad4a044c5521e166742f1cbdb6f582ddd2aae" + integrity sha512-qVVcVl/Cx6mBnh6QFsJU4N/a5clYMdvgAkBAgaZo0+UC+PLPbRPeSHNdteEfhLDpQaCGaktJqtr9aDsMMs3lJQ== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 0b9dfce944..0434fb02e2 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -36,7 +36,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "^1.2.11", - "@budibase/pro": "1.2.10", + "@budibase/pro": "1.2.11", "@budibase/string-templates": "^1.2.11", "@budibase/types": "^1.2.11", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 04b3dc934e..e1e9233ec0 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.10": - version "1.2.10" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.10.tgz#85d3abc3f018f0bf1aa43fd67a0082a57b2a6734" - integrity sha512-jsVg2Rlj74w/Z7dEFavQAutH+b3gFpxryhj/vGPN0AUw9meIFfIjwXYtPKbG/i+4u9IehH0rR74qPMDvCPAQbw== +"@budibase/backend-core@1.2.11": + version "1.2.11" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.11.tgz#f8f0fd42545fdfdf1046681ac162d48681a5b4af" + integrity sha512-jJicRyS0xhpn63rugP8fMhKoFw9TIupIQ3Oks+p3lsBqlaODrCFxrAcJsnqpTydBL3mWrioRpGtBPFrptk+71g== dependencies: - "@budibase/types" "^1.2.10" + "@budibase/types" "^1.2.11" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -324,21 +324,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.2.10": - version "1.2.10" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.10.tgz#d7eb9a6ae644ba12e619cb75e8ba344f1f5a236b" - integrity sha512-yBkLheDX2lervydUSyyufMLASlT9h4MOf6Eah2Xs0u7W0SjpYg3dNKNuOWOFMwF5wVG1oqJbF2xN2YBd8rPObw== +"@budibase/pro@1.2.11": + version "1.2.11" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.11.tgz#54c912674ee2713f269b29232e636c4073454738" + integrity sha512-O+xZJLbK5PJYwqXLAtzKs+Akt8snjPSGb6exdvGSn/ZqmxBCMt8Ydf49prA3vMRvgjVkxkXBeqUo7+CJS3n6mw== dependencies: - "@budibase/backend-core" "1.2.10" - "@budibase/types" "1.2.10" + "@budibase/backend-core" "1.2.11" + "@budibase/types" "1.2.11" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.2.10", "@budibase/types@^1.2.10": - version "1.2.10" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.10.tgz#1d4f1c2acaef6bf1792783cb9601f3618ab06c47" - integrity sha512-dA+metuFnJx4LP67JGaBnYvq7zVfzIE6VXr2HHetnbpk5sVKDzwqRQnfh1T88zFcFlYDNvk52sLLbbAw7r4ozA== +"@budibase/types@1.2.11", "@budibase/types@^1.2.11": + version "1.2.11" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.11.tgz#5b9ad4a044c5521e166742f1cbdb6f582ddd2aae" + integrity sha512-qVVcVl/Cx6mBnh6QFsJU4N/a5clYMdvgAkBAgaZo0+UC+PLPbRPeSHNdteEfhLDpQaCGaktJqtr9aDsMMs3lJQ== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From cfe3db835b54b950783594d88fefc3734e4d03f9 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 4 Aug 2022 20:23:45 +0100 Subject: [PATCH 153/320] Updating pino logging to remove health check spam. --- packages/backend-core/src/environment.ts | 1 + packages/backend-core/src/index.ts | 2 ++ packages/backend-core/src/pino.js | 11 +++++++++++ packages/server/src/app.ts | 10 ++-------- packages/worker/src/index.ts | 11 ++--------- 5 files changed, 18 insertions(+), 17 deletions(-) create mode 100644 packages/backend-core/src/pino.js diff --git a/packages/backend-core/src/environment.ts b/packages/backend-core/src/environment.ts index 37804b31a6..51cc721ded 100644 --- a/packages/backend-core/src/environment.ts +++ b/packages/backend-core/src/environment.ts @@ -55,6 +55,7 @@ const env = { DEFAULT_LICENSE: process.env.DEFAULT_LICENSE, SERVICE: process.env.SERVICE || "budibase", MEMORY_LEAK_CHECK: process.env.MEMORY_LEAK_CHECK || false, + LOG_LEVEL: process.env.LOG_LEVEL, DEPLOYMENT_ENVIRONMENT: process.env.DEPLOYMENT_ENVIRONMENT || "docker-compose", _set(key: any, value: any) { diff --git a/packages/backend-core/src/index.ts b/packages/backend-core/src/index.ts index 35777ae817..ced4630fb7 100644 --- a/packages/backend-core/src/index.ts +++ b/packages/backend-core/src/index.ts @@ -15,6 +15,7 @@ import auth from "./auth" import constants from "./constants" import * as dbConstants from "./db/constants" import logging from "./logging" +import pino from "./pino" // mimic the outer package exports import * as db from "./pkg/db" @@ -53,6 +54,7 @@ const core = { errors, logging, roles, + ...pino, ...errorClasses, } diff --git a/packages/backend-core/src/pino.js b/packages/backend-core/src/pino.js new file mode 100644 index 0000000000..69962b3841 --- /dev/null +++ b/packages/backend-core/src/pino.js @@ -0,0 +1,11 @@ +const env = require("./environment") + +exports.pinoSettings = () => ({ + prettyPrint: { + levelFirst: true, + }, + level: env.LOG_LEVEL || "error", + autoLogging: { + ignore: req => req.url.includes("/health"), + }, +}) diff --git a/packages/server/src/app.ts b/packages/server/src/app.ts index 32951cc47e..62301d57ca 100644 --- a/packages/server/src/app.ts +++ b/packages/server/src/app.ts @@ -15,6 +15,7 @@ const Sentry = require("@sentry/node") const fileSystem = require("./utilities/fileSystem") const bullboard = require("./automations/bullboard") const { logAlert } = require("@budibase/backend-core/logging") +const { pinoSettings } = require("@budibase/backend-core") const { Thread } = require("./threads") import redis from "./utilities/redis" import * as migrations from "./migrations" @@ -35,14 +36,7 @@ app.use( }) ) -app.use( - pino({ - prettyPrint: { - levelFirst: true, - }, - level: env.LOG_LEVEL || "error", - }) -) +app.use(pino(pinoSettings())) if (!env.isTest()) { const plugin = bullboard.init() diff --git a/packages/worker/src/index.ts b/packages/worker/src/index.ts index f8031abacb..6fb954a1b5 100644 --- a/packages/worker/src/index.ts +++ b/packages/worker/src/index.ts @@ -18,7 +18,7 @@ const http = require("http") const api = require("./api") const redis = require("./utilities/redis") const Sentry = require("@sentry/node") -import { events } from "@budibase/backend-core" +import { events, pinoSettings } from "@budibase/backend-core" // this will setup http and https proxies form env variables bootstrap() @@ -30,14 +30,7 @@ app.keys = ["secret", "key"] // set up top level koa middleware app.use(koaBody({ multipart: true })) app.use(koaSession(app)) -app.use( - logger({ - prettyPrint: { - levelFirst: true, - }, - level: env.LOG_LEVEL || "error", - }) -) +app.use(logger(pinoSettings())) // authentication app.use(passport.initialize()) From 8db77ffaf4c3caea2a61af998608728bd1b66fd4 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Thu, 4 Aug 2022 19:51:17 +0000 Subject: [PATCH 154/320] v1.2.12 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lerna.json b/lerna.json index 29e79d6853..b82f3faeed 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.2.11", + "version": "1.2.12", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 25ecdd45a6..486cd68812 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.2.11", + "version": "1.2.12", "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.11", + "@budibase/types": "^1.2.12", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", "bcrypt": "5.0.1", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 963df30f61..417940aa58 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.11", + "version": "1.2.12", "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.11", + "@budibase/string-templates": "^1.2.12", "@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 0d1cc41eb3..3688514c28 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.2.11", + "version": "1.2.12", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.2.11", - "@budibase/client": "^1.2.11", - "@budibase/frontend-core": "^1.2.11", - "@budibase/string-templates": "^1.2.11", + "@budibase/bbui": "^1.2.12", + "@budibase/client": "^1.2.12", + "@budibase/frontend-core": "^1.2.12", + "@budibase/string-templates": "^1.2.12", "@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 65bfa6f5c0..c24c32ad15 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.2.11", + "version": "1.2.12", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index 4ea237c43f..7cdc66413d 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.2.11", + "version": "1.2.12", "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.11", - "@budibase/frontend-core": "^1.2.11", - "@budibase/string-templates": "^1.2.11", + "@budibase/bbui": "^1.2.12", + "@budibase/frontend-core": "^1.2.12", + "@budibase/string-templates": "^1.2.12", "@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 3002ce9543..9561d43369 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.2.11", + "version": "1.2.12", "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.11", + "@budibase/bbui": "^1.2.12", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 21ba2bb84f..c3180ccccd 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.11", + "version": "1.2.12", "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.11", - "@budibase/client": "^1.2.11", + "@budibase/backend-core": "^1.2.12", + "@budibase/client": "^1.2.12", "@budibase/pro": "1.2.11", - "@budibase/string-templates": "^1.2.11", - "@budibase/types": "^1.2.11", + "@budibase/string-templates": "^1.2.12", + "@budibase/types": "^1.2.12", "@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 15c80b3751..d832e5a32f 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.2.11", + "version": "1.2.12", "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 15fa1e54d1..4ddb558c52 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.2.11", + "version": "1.2.12", "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 0434fb02e2..3d99e850a8 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.11", + "version": "1.2.12", "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.11", + "@budibase/backend-core": "^1.2.12", "@budibase/pro": "1.2.11", - "@budibase/string-templates": "^1.2.11", - "@budibase/types": "^1.2.11", + "@budibase/string-templates": "^1.2.12", + "@budibase/types": "^1.2.12", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From e5d8217ac47509c8d6659b6014465a7cd4a7a447 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Thu, 4 Aug 2022 19:54:14 +0000 Subject: [PATCH 155/320] Update pro version to 1.2.12 --- 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 c3180ccccd..53035aa8f4 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "^1.2.12", "@budibase/client": "^1.2.12", - "@budibase/pro": "1.2.11", + "@budibase/pro": "1.2.12", "@budibase/string-templates": "^1.2.12", "@budibase/types": "^1.2.12", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 2652c0ac1a..426e5f9b07 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.11": - version "1.2.11" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.11.tgz#f8f0fd42545fdfdf1046681ac162d48681a5b4af" - integrity sha512-jJicRyS0xhpn63rugP8fMhKoFw9TIupIQ3Oks+p3lsBqlaODrCFxrAcJsnqpTydBL3mWrioRpGtBPFrptk+71g== +"@budibase/backend-core@1.2.12": + version "1.2.12" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.12.tgz#a09ef7c4b7d1217b65e385199f2d044d1f30f450" + integrity sha512-o6tsX9bfpMLfAEfxBI4StC6Lvt1PkJ6b0JYlgp8QiXa0WxZX7np24cOxt2fWrP3ASIMDCrzLn2e3k3eOnzvh8w== dependencies: - "@budibase/types" "^1.2.11" + "@budibase/types" "^1.2.12" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -1177,13 +1177,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.2.11": - version "1.2.11" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.11.tgz#54c912674ee2713f269b29232e636c4073454738" - integrity sha512-O+xZJLbK5PJYwqXLAtzKs+Akt8snjPSGb6exdvGSn/ZqmxBCMt8Ydf49prA3vMRvgjVkxkXBeqUo7+CJS3n6mw== +"@budibase/pro@1.2.12": + version "1.2.12" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.12.tgz#252f8f1c6730a3395d9d340f2e843052bf0293bb" + integrity sha512-1zhMMVBCX+VX/ILPlSbI7tdsQLcrxf1W29IQD4W55AbevlFnpQs4qNVveIdXFm+GWvCJbdN5I26CXBOftbVUhA== dependencies: - "@budibase/backend-core" "1.2.11" - "@budibase/types" "1.2.11" + "@budibase/backend-core" "1.2.12" + "@budibase/types" "1.2.12" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1206,10 +1206,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.2.11", "@budibase/types@^1.2.11": - version "1.2.11" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.11.tgz#5b9ad4a044c5521e166742f1cbdb6f582ddd2aae" - integrity sha512-qVVcVl/Cx6mBnh6QFsJU4N/a5clYMdvgAkBAgaZo0+UC+PLPbRPeSHNdteEfhLDpQaCGaktJqtr9aDsMMs3lJQ== +"@budibase/types@1.2.12", "@budibase/types@^1.2.12": + version "1.2.12" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.12.tgz#c460d1b39116538e47e00178116ad066aa6a6f1c" + integrity sha512-EeWadHUzeLx4X27Pv6XWlpSXbeLIMvg7r+Q52kYyOZFkmjtdCNFQW5PCu1bYUw9L1Xa64t7fvRLjKiNs2xGX7g== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 3d99e850a8..9878464237 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -36,7 +36,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "^1.2.12", - "@budibase/pro": "1.2.11", + "@budibase/pro": "1.2.12", "@budibase/string-templates": "^1.2.12", "@budibase/types": "^1.2.12", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index e1e9233ec0..0241459cf4 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.11": - version "1.2.11" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.11.tgz#f8f0fd42545fdfdf1046681ac162d48681a5b4af" - integrity sha512-jJicRyS0xhpn63rugP8fMhKoFw9TIupIQ3Oks+p3lsBqlaODrCFxrAcJsnqpTydBL3mWrioRpGtBPFrptk+71g== +"@budibase/backend-core@1.2.12": + version "1.2.12" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.12.tgz#a09ef7c4b7d1217b65e385199f2d044d1f30f450" + integrity sha512-o6tsX9bfpMLfAEfxBI4StC6Lvt1PkJ6b0JYlgp8QiXa0WxZX7np24cOxt2fWrP3ASIMDCrzLn2e3k3eOnzvh8w== dependencies: - "@budibase/types" "^1.2.11" + "@budibase/types" "^1.2.12" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -324,21 +324,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.2.11": - version "1.2.11" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.11.tgz#54c912674ee2713f269b29232e636c4073454738" - integrity sha512-O+xZJLbK5PJYwqXLAtzKs+Akt8snjPSGb6exdvGSn/ZqmxBCMt8Ydf49prA3vMRvgjVkxkXBeqUo7+CJS3n6mw== +"@budibase/pro@1.2.12": + version "1.2.12" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.12.tgz#252f8f1c6730a3395d9d340f2e843052bf0293bb" + integrity sha512-1zhMMVBCX+VX/ILPlSbI7tdsQLcrxf1W29IQD4W55AbevlFnpQs4qNVveIdXFm+GWvCJbdN5I26CXBOftbVUhA== dependencies: - "@budibase/backend-core" "1.2.11" - "@budibase/types" "1.2.11" + "@budibase/backend-core" "1.2.12" + "@budibase/types" "1.2.12" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.2.11", "@budibase/types@^1.2.11": - version "1.2.11" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.11.tgz#5b9ad4a044c5521e166742f1cbdb6f582ddd2aae" - integrity sha512-qVVcVl/Cx6mBnh6QFsJU4N/a5clYMdvgAkBAgaZo0+UC+PLPbRPeSHNdteEfhLDpQaCGaktJqtr9aDsMMs3lJQ== +"@budibase/types@1.2.12", "@budibase/types@^1.2.12": + version "1.2.12" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.12.tgz#c460d1b39116538e47e00178116ad066aa6a6f1c" + integrity sha512-EeWadHUzeLx4X27Pv6XWlpSXbeLIMvg7r+Q52kYyOZFkmjtdCNFQW5PCu1bYUw9L1Xa64t7fvRLjKiNs2xGX7g== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From 84e2187d2d9897e860aea0b4e70d113d772c7b73 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Thu, 4 Aug 2022 20:47:50 +0000 Subject: [PATCH 156/320] v1.2.13-alpha.0 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lerna.json b/lerna.json index b82f3faeed..856609014a 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.2.12", + "version": "1.2.13-alpha.0", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 50ff14d081..7468e73d09 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.2.12", + "version": "1.2.13-alpha.0", "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.12", + "@budibase/types": "1.2.13-alpha.0", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", "bcrypt": "5.0.1", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 417940aa58..5a345e48d9 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.12", + "version": "1.2.13-alpha.0", "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.12", + "@budibase/string-templates": "1.2.13-alpha.0", "@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 3688514c28..fdcbc7afcd 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.2.12", + "version": "1.2.13-alpha.0", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.2.12", - "@budibase/client": "^1.2.12", - "@budibase/frontend-core": "^1.2.12", - "@budibase/string-templates": "^1.2.12", + "@budibase/bbui": "1.2.13-alpha.0", + "@budibase/client": "1.2.13-alpha.0", + "@budibase/frontend-core": "1.2.13-alpha.0", + "@budibase/string-templates": "1.2.13-alpha.0", "@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 c24c32ad15..8fea40f323 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.2.12", + "version": "1.2.13-alpha.0", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index 7cdc66413d..1c10a57c7d 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.2.12", + "version": "1.2.13-alpha.0", "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.12", - "@budibase/frontend-core": "^1.2.12", - "@budibase/string-templates": "^1.2.12", + "@budibase/bbui": "1.2.13-alpha.0", + "@budibase/frontend-core": "1.2.13-alpha.0", + "@budibase/string-templates": "1.2.13-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 9561d43369..f40a60463e 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.2.12", + "version": "1.2.13-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": "^1.2.12", + "@budibase/bbui": "1.2.13-alpha.0", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 7730db03f7..1281c9248c 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.12", + "version": "1.2.13-alpha.0", "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.12", - "@budibase/client": "^1.2.12", + "@budibase/backend-core": "1.2.13-alpha.0", + "@budibase/client": "1.2.13-alpha.0", "@budibase/pro": "1.2.12", - "@budibase/string-templates": "^1.2.12", - "@budibase/types": "^1.2.12", + "@budibase/string-templates": "1.2.13-alpha.0", + "@budibase/types": "1.2.13-alpha.0", "@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 d832e5a32f..d41df308d7 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.2.12", + "version": "1.2.13-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 4ddb558c52..7e310f0246 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.2.12", + "version": "1.2.13-alpha.0", "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 9878464237..1de8f21150 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.12", + "version": "1.2.13-alpha.0", "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.12", + "@budibase/backend-core": "1.2.13-alpha.0", "@budibase/pro": "1.2.12", - "@budibase/string-templates": "^1.2.12", - "@budibase/types": "^1.2.12", + "@budibase/string-templates": "1.2.13-alpha.0", + "@budibase/types": "1.2.13-alpha.0", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 2c80ee88f9e9455cec6e20896bbd52cccc60c8a7 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Thu, 4 Aug 2022 20:50:55 +0000 Subject: [PATCH 157/320] Update pro version to 1.2.13-alpha.0 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 31 ++++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 31 ++++++++++++++++--------------- 4 files changed, 34 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index 1281c9248c..d0ccb31a8d 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "1.2.13-alpha.0", "@budibase/client": "1.2.13-alpha.0", - "@budibase/pro": "1.2.12", + "@budibase/pro": "1.2.13-alpha.0", "@budibase/string-templates": "1.2.13-alpha.0", "@budibase/types": "1.2.13-alpha.0", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 62f204199b..9d424377bb 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1094,18 +1094,19 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.2.12": - version "1.2.12" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.12.tgz#a09ef7c4b7d1217b65e385199f2d044d1f30f450" - integrity sha512-o6tsX9bfpMLfAEfxBI4StC6Lvt1PkJ6b0JYlgp8QiXa0WxZX7np24cOxt2fWrP3ASIMDCrzLn2e3k3eOnzvh8w== +"@budibase/backend-core@1.2.13-alpha.0": + version "1.2.13-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.13-alpha.0.tgz#32e17c35d90313d5c4aeafa26f1223547cbc1120" + integrity sha512-EPuxofOZc1svullIVohJhgjDhi36U3jPHPlvMdbc0H9tMPXQZPv+sKGDJROdHJRYMOMKPpEqzSheDI+v86oTLg== dependencies: - "@budibase/types" "^1.2.12" + "@budibase/types" "1.2.13-alpha.0" "@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" @@ -1177,13 +1178,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.2.12": - version "1.2.12" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.12.tgz#252f8f1c6730a3395d9d340f2e843052bf0293bb" - integrity sha512-1zhMMVBCX+VX/ILPlSbI7tdsQLcrxf1W29IQD4W55AbevlFnpQs4qNVveIdXFm+GWvCJbdN5I26CXBOftbVUhA== +"@budibase/pro@1.2.13-alpha.0": + version "1.2.13-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.13-alpha.0.tgz#59f972e50e41346cbc1a4730b133c43c39b3610a" + integrity sha512-LE/lXBmLxHgnD//ySpFLyQXM6Hys9Fjhikl/zQAHbUwnxtXE/GKXvwHTvCJTY9A2WHzhh/0ZZcbt+EkJrgDuTA== dependencies: - "@budibase/backend-core" "1.2.12" - "@budibase/types" "1.2.12" + "@budibase/backend-core" "1.2.13-alpha.0" + "@budibase/types" "1.2.13-alpha.0" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1206,10 +1207,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.2.12", "@budibase/types@^1.2.12": - version "1.2.12" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.12.tgz#c460d1b39116538e47e00178116ad066aa6a6f1c" - integrity sha512-EeWadHUzeLx4X27Pv6XWlpSXbeLIMvg7r+Q52kYyOZFkmjtdCNFQW5PCu1bYUw9L1Xa64t7fvRLjKiNs2xGX7g== +"@budibase/types@1.2.13-alpha.0": + version "1.2.13-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.13-alpha.0.tgz#5005a55042f9b5e4df6b91ffd700482e920f22da" + integrity sha512-+P2VkkiTWs8VtbdZ1lBiTi6Cf9LbGrDLu3lFWQ/WfVTda8ijGpMM3gHgfF5tncV1krn6Ha3yA1uFvCf6KHz08g== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 1de8f21150..b48d02c6c9 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -36,7 +36,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "1.2.13-alpha.0", - "@budibase/pro": "1.2.12", + "@budibase/pro": "1.2.13-alpha.0", "@budibase/string-templates": "1.2.13-alpha.0", "@budibase/types": "1.2.13-alpha.0", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 0241459cf4..44b51f3904 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -291,18 +291,19 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.2.12": - version "1.2.12" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.12.tgz#a09ef7c4b7d1217b65e385199f2d044d1f30f450" - integrity sha512-o6tsX9bfpMLfAEfxBI4StC6Lvt1PkJ6b0JYlgp8QiXa0WxZX7np24cOxt2fWrP3ASIMDCrzLn2e3k3eOnzvh8w== +"@budibase/backend-core@1.2.13-alpha.0": + version "1.2.13-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.13-alpha.0.tgz#32e17c35d90313d5c4aeafa26f1223547cbc1120" + integrity sha512-EPuxofOZc1svullIVohJhgjDhi36U3jPHPlvMdbc0H9tMPXQZPv+sKGDJROdHJRYMOMKPpEqzSheDI+v86oTLg== dependencies: - "@budibase/types" "^1.2.12" + "@budibase/types" "1.2.13-alpha.0" "@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" @@ -324,21 +325,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.2.12": - version "1.2.12" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.12.tgz#252f8f1c6730a3395d9d340f2e843052bf0293bb" - integrity sha512-1zhMMVBCX+VX/ILPlSbI7tdsQLcrxf1W29IQD4W55AbevlFnpQs4qNVveIdXFm+GWvCJbdN5I26CXBOftbVUhA== +"@budibase/pro@1.2.13-alpha.0": + version "1.2.13-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.13-alpha.0.tgz#59f972e50e41346cbc1a4730b133c43c39b3610a" + integrity sha512-LE/lXBmLxHgnD//ySpFLyQXM6Hys9Fjhikl/zQAHbUwnxtXE/GKXvwHTvCJTY9A2WHzhh/0ZZcbt+EkJrgDuTA== dependencies: - "@budibase/backend-core" "1.2.12" - "@budibase/types" "1.2.12" + "@budibase/backend-core" "1.2.13-alpha.0" + "@budibase/types" "1.2.13-alpha.0" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.2.12", "@budibase/types@^1.2.12": - version "1.2.12" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.12.tgz#c460d1b39116538e47e00178116ad066aa6a6f1c" - integrity sha512-EeWadHUzeLx4X27Pv6XWlpSXbeLIMvg7r+Q52kYyOZFkmjtdCNFQW5PCu1bYUw9L1Xa64t7fvRLjKiNs2xGX7g== +"@budibase/types@1.2.13-alpha.0": + version "1.2.13-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.13-alpha.0.tgz#5005a55042f9b5e4df6b91ffd700482e920f22da" + integrity sha512-+P2VkkiTWs8VtbdZ1lBiTi6Cf9LbGrDLu3lFWQ/WfVTda8ijGpMM3gHgfF5tncV1krn6Ha3yA1uFvCf6KHz08g== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From 28aa158ef977a670862890ab8e492d37c25d4cbe Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Fri, 5 Aug 2022 10:45:41 +0100 Subject: [PATCH 158/320] spanish README --- i18n/README.es.md | 296 ++++++++++++++++++++++++++++++---------------- 1 file changed, 191 insertions(+), 105 deletions(-) diff --git a/i18n/README.es.md b/i18n/README.es.md index 7245dc8656..21eb8caef7 100644 --- a/i18n/README.es.md +++ b/i18n/README.es.md @@ -8,10 +8,11 @@

- Construye herramientas empresariales personalizadas en cuestión de minutos y en su propia infraestructura. + Construye herramientas empresariales personalizadas en cuestión de minutos y en tu propia infraestructura.

- Budibase es una plataforma de código bajo de código abierto, que ayuda a desarrolladores y profesionales de TI a crear, automatizar y enviar aplicaciones empresariales personalizadas en cuestión de minutos y en su propia infraestructura + Budibase es una plataforma low code de código abierto, que ayuda a desarrolladores y profesionales de TI a crear y +automatizar aplicaciones personalizadas en cuestión de minutos

@@ -20,7 +21,7 @@

- + Budibase design ui

@@ -30,9 +31,6 @@ GitHub release (latest by date) - - Discord - Follow @budibase @@ -43,130 +41,213 @@

- Sign-up + Comenzar con Budibase en la nube · - Docs + Comenzar con Docker, K8s, DO · - Feature request + Documentaciones · - Report a bug + Pedir una funcionalidad · - Support: Discussions - & - Discord + Reportar un error + · + Support: Comunidad

+

+## ✨ Caracteristicas -## ✨ Features -When other platforms chose the closed source route, we decided to go open source. When other platforms chose cloud builders, we decided a local builder offered the better developer experience. We like to do things differently at Budibase. +### Construir aplicaciones reales +Con Budibase podras construir aplicaciones de pagina unica de gran rendimiento. Ademas, puedes hacerlas con un diseño +adaptativo para darles a tus usuarios una gran experiencia. +

-- **Build and ship real software.** Unlike other platforms, with Budibase you build and ship single page applications. Budibase applications have performance baked in and can be designed responsively, providing your users with a great experience. +### Codigo abierto y ampliable +Budibase es de codigo abierto con licencia GPL v3. Puedes ampliarlo o modificarlo para adaptarlo a tus necesidades y preferencias. -- **Open source and extensable.** Budibase is open-source. The builder is licensed AGPL v3, the server is GPL v3, and the client is MPL. This should fill you with confidence that Budibase will always be around. You can also code against Budibase or fork it and make changes as you please, providing a developer-friendly experience. +De esta manera proveemos una buena experiencia para el desarrollador asi como establecemos la confianza de que Budibase siempre estara funcional. +

-- **Load data or start from scratch.** Budibase pulls in data from multiple sources, including MongoDB, CouchDB, PostgreSQL, mySQL, Airtable, Google Sheets, S3, DyanmoDB, or a REST API. And unlike other platforms, with Budibase you can start from scratch and create business apps with no data sources. [Request new data sources](https://github.com/Budibase/budibase/discussions?discussions_q=category%3AIdeas). +### Cargar informacion o empezar desde cero +Budibase permite importar datos desde multiples fuentes, entre las que estan incluidas: MondoDB, CouchDB, PostgreSQL, MySQL, +Airtable, S3, DynamoDB o API REST. -- **Design and build apps with powerful pre-made components.** Budibase comes out of the box with beautifully designed, powerful components which you can use like building blocks to build your UI. We also expose a lot of your favourite CSS styling options so you can go that extra creative mile. [Request new components](https://github.com/Budibase/budibase/discussions?discussions_q=category%3AIdeas). - -- **Automate processes, integrate with other tools, and connect to webhooks.** Save time by automating manual processes and workflows. From connecting to webhooks, to automating emails, simply tell Budibase what to do and let it work for you. You can easily [create new automations for Budibase here](https://github.com/Budibase/automations) or [request new integrations here](https://github.com/Budibase/budibase/discussions?discussions_q=category%3AIdeas). - -- **Cloud hosting and self-hosting.** Users can self-host (see below), or host their apps with Budibase. Currently, our cloud hosting offering is limited to the free tier but we aim to change this in the future. For heavy usage, we advise users to self-host. +O si lo prefieres, con Budibase puedes empezar desde cero y construir tus propias aplicaciones +sin necesidad de herramientas externas. +[Sugerir fuente de datos](https://github.com/Budibase/budibase/discussions?discussions_q=category%3AIdeas).

- Budibase design ui + Budibase data

+

+### Diseña y construye aplicaciones con componentes profesionales prediseñados -## ⌛ Status -- [x] Alpha: We are demoing Budibase to users and receiving feedback -- [x] Private Beta: We are testing Budibase with a closed set of customers -- [x] Public Beta: Anyone can [sign-up and use Budibase](https://portal.budi.live/signup). -- [ ] Official Launch +Budibase incorpora componentes profesionales prediseñados que podras usar de manera facil e intuitiva +como bloques de construccion para la interfaz de tu aplicacion. -Watch "releases" of this repo to get notified of major updates, and give the star button a click whilst you're there. +Tambien mostramos gran parte del CSS para que puedas adaptar los componentes a tus diseños. +[Sugerir componente](https://github.com/Budibase/budibase/discussions?discussions_q=category%3AIdeas).

- + Budibase design

+

-### Stargazers over time +### Procesos automatizados, integra tu aplicacion con otras herramientas y conectala a eventos webhook + +Ahorra tiempo automatizando flujos de trabajo y procesos manuales. Podras desde conectar eventos webhook hasta automatizar emails, +simplemente dile a Budibase que hacer y deja que el haga el trabajo por ti. +[Crear nuevos procesos automatizados](https://github.com/Budibase/automations) o [Sugerir proceso automatizado](https://github.com/Budibase/budibase/discussions?discussions_q=category%3AIdeas). + +

+ Budibase automations +

+

+ +### Tus herramientas favoritas + +Budibase integra un gran numero de herramientas que te permitiran construir tus aplicaciones ajustandose a tus preferencias. + +

+ Budibase integrations +

+

+ +### Un paraiso para administradores + +Puedes albergar Budibase en tu propia infraestructura y gestionar globalmente usuarios, incorporaciones, SMTP, aplicaciones, +grupos, diseños de temas, etc. + +Tambien puedes gestionar los usuarios y grupos, o delegar en personas asignadas para ello, desde nuestra aplicacion sin +mucho esfuerzo. + +Budibase is made to scale. With Budibase, you can self-host on your own infrastructure and globally manage users, onboarding, SMTP, apps, groups, theming and more. You can also provide users/groups with an app portal and disseminate user-management to the group manager. + +- Video Promocional: https://youtu.be/xoljVpty_Kw + +
+ +--- + +
+ + +## Budibase API Publica + +Como todo lo que construimos en Budibase, nuestra nueva API publica es facil de usar, flexible e introduce nueva ampliacion +del sistema. Budibase API ofrece: +- Uso de Budibase como backend +- Interoperabilidad + +#### Documentacion + +Puedes aprender mas acerca de Budibase API en los siguientes documentos: +- [Documentacion general](https://docs.budibase.com/docs/public-api) : Como optener tu clave para la API, usar Insomnia y Postman +- [API Interactiva](https://docs.budibase.com/reference/post_applications) : Aprende como trabajar con la API + +#### Guias + +- [Construye una aplicacion con Budibase y Next.js](https://budibase.com/blog/building-a-crud-app-with-budibase-and-next.js/) + +

+ Budibase data +

+

+ +


+ +## 🏁 Comenzar con Budibase + +Puedes alojar Budibase en tu propia infraestructura con Docker, Kubernetes o Digital Ocean; o usa Budibase en la nube si +quieres empezar a crear tus aplicaciones rapidamente y sin ningun tipo de preocupacion. + +### [Comenzar con Budibase self-hosting](https://docs.budibase.com/docs/hosting-methods) + +- [Docker - single ARM compatible image](https://docs.budibase.com/docs/docker) +- [Docker Compose](https://docs.budibase.com/docs/docker-compose) +- [Kubernetes](https://docs.budibase.com/docs/kubernetes-k8s) +- [Digital Ocean](https://docs.budibase.com/docs/digitalocean) +- [Portainer](https://docs.budibase.com/docs/portainer) + + +### [Comenzar con Budibase en la nube](https://budibase.com) + +

+ +## 🎓 Aprende a usar Budibase + +Aqui tienes la [documentacion de Budibase](https://docs.budibase.com/docs). +
+ + +

+ +## 💬 Comunidad + +Te invitamos a que te unas a nuestra comunidad de Budibase, alli podras hacer las preguntas que quieras, ayudar a otras +personas o tener una charla entretenida con otros usuarios de Budibase. +[Acceder a la comunidad de Budibase](https://github.com/Budibase/budibase/discussions) +


+ + +## ❗ Codigo de conducta + +Budibase presta especial atencion en acoger a personas de toda diversidad y ofrecer un entorno de respeto mutuo. Asi mismo +esperamos lo mismo de nuestra comunidad, por favor lee el +[**Codigo de conducta**](https://github.com/Budibase/budibase/blob/HEAD/.github/CODE_OF_CONDUCT.md). +
+ +

+ + +## 🙌 Contribuir en Budibase + +Desde comunicar un bug a solventar un error en el codigo, toda contribucion es apreciada y bienvenida. Si estas planeando +implementar una nueva funcionalidad o un realizar un cambio en la API, por favor crea un [nuevo mensaje aqui](https://github.com/Budibase/budibase/issues), +de esta manera nos encargaremos que tu trabajo no sea en vano. + +Aqui tienes instrucciones de como configurar tu entorno Budibase para [Debian](https://github.com/Budibase/budibase/tree/HEAD/docs/DEV-SETUP-DEBIAN.md) +y [MacOSX](https://github.com/Budibase/budibase/tree/HEAD/docs/DEV-SETUP-MACOSX.md) + +### No estas seguro por donde empezar? +Un buen lugar para empezar a contribuir con nosotros es [aqui](https://github.com/Budibase/budibase/projects/22). + +### Organizacion del repositorio + +Budibase es un repositorio unico gestionado por Lerna. Lerna construye y publica los paquetes de Budibase sincronizandolos +cada ves que se realiza un cambio. A rasgos generales, estos son los paquetes que conforman Budibase: + +- [packages/builder](https://github.com/Budibase/budibase/tree/HEAD/packages/builder) - contiene el codigo del builder de la parte cliente, esta es una aplicacion svelte. + +- [packages/client](https://github.com/Budibase/budibase/tree/HEAD/packages/client) - Este modulo se ejecuta en el browser y es el responsable de leer definiciones JSON y crear aplicaciones web en el momento. + +- [packages/server](https://github.com/Budibase/budibase/tree/HEAD/packages/server) - La parte servidor de Budibase. Esta aplicacion Koa es responsable de suministrar lo necesario al builder para asi generar las aplicaciones Budibase. Tambien provee una API para interaccionar con la base de datos y el almacenamiento de ficheros. + +Para mas informacion, por favor lee el siguiente documento [CONTRIBUTING.md](https://github.com/Budibase/budibase/blob/HEAD/docs/CONTRIBUTING.md) + +

+ + +## 📝 Licencia + +Budibase es open-source, licenciado como [GPL v3](https://www.gnu.org/licenses/gpl-3.0.en.html). El cliente y las librerias +de componentes estan licenciadas como [MPL](https://directory.fsf.org/wiki/License:MPL-2.0) - de esta manera, puedes licenciar +como tu quieras las aplicaciones que construyas. + +

+ +## ⭐ Historia de nuestros Stargazers [![Stargazers over time](https://starchart.cc/Budibase/budibase.svg)](https://starchart.cc/Budibase/budibase) -If you are having issues between updates of the builder, please use the guide [here](https://github.com/Budibase/budibase/blob/HEAD/.github/CONTRIBUTING.md#troubleshooting) to clear down your environment. +Si estas teniendo problemas con el builder despues de actualizar, por favor [lee esta guia](https://github.com/Budibase/budibase/blob/HEAD/docs/CONTRIBUTING.md#troubleshooting) to clear down your environment. +

-## 🏁 Getting Started with Budibase +## Contribuidores ✨ -The Budibase builder runs in Electron, on Mac, PC and Linux. Follow the steps below to get started: -- [ ] [Sign-up to Budibase](https://portal.budi.live/signup) -- [ ] Create a username and password -- [ ] Copy your API key -- [ ] Download Budibase -- [ ] Open Budibase and enter your API key - -[Here is a guided tutorial](https://docs.budibase.com/tutorial/tutorial-signing-up) if you need extra help. - - -## 🤖 Self-hosting - -Budibase wants to make sure anyone can use the tools we develop and we know a lot of people need to be able to host the apps they make on their own systems - that is why we've decided to try and make self hosting as easy as possible! - -Currently, you can host your apps using Docker or Digital Ocean. The documentation for self-hosting can be found [here](https://docs.budibase.com/docs/hosting-methods). - -[![Deploy to DO](https://www.deploytodo.com/do-btn-blue.svg)](https://cloud.digitalocean.com/droplets/new?onboarding_origin=marketplace&i=09038e&fleetUuid=bb04f9c8-1de8-4687-b2ae-1d5177a0535b&appId=77729671&type=applications&size=s-4vcpu-8gb®ion=nyc1&refcode=0caaa6085a82&image=budibase-20-04) - - -## 🎓 Learning Budibase - -The Budibase [documentation lives here](https://docs.budibase.com). - -You can also follow a quick tutorial on [how to build a CRM with Budibase](https://docs.budibase.com/tutorial/tutorial-introduction) - - -## Roadmap - -Checkout our [Public Roadmap](https://github.com/Budibase/budibase/projects/10). If you would like to discuss some of the items on the roadmap, please feel to reach out on [Discord](https://discord.gg/rCYayfe), or via [Github discussions](https://github.com/Budibase/budibase/discussions) - - -## ❗ Code of Conduct - -Budibase is dedicated to providing a welcoming, diverse, and harrassment-free experience for everyone. We expect everyone in the Budibase community to abide by our [**Code of Conduct**](https://github.com/Budibase/budibase/blob/HEAD/.github/CODE_OF_CONDUCT.md). Please read it. - -## 🙌 Contributing to Budibase - -From opening a bug report to creating a pull request: every contribution is appreciated and welcomed. If you're planning to implement a new feature or change the API please create an issue first. This way we can ensure your work is not in vain. - -### Not Sure Where to Start? -A good place to start contributing, is the [First time issues project](https://github.com/Budibase/budibase/projects/22). - -### How the repository is organized -Budibase is a monorepo managed by lerna. Lerna manages the building and publishing of the budibase packages. At a high level, here are the packages that make up Budibase. - -- [packages/builder](https://github.com/Budibase/budibase/tree/HEAD/packages/builder) - contains code for the budibase builder client side svelte application. - -- [packages/client](https://github.com/Budibase/budibase/tree/HEAD/packages/client) - A module that runs in the browser responsible for reading JSON definition and creating living, breathing web apps from it. - -- [packages/server](https://github.com/Budibase/budibase/tree/HEAD/packages/server) - The budibase server. This Koa app is responsible for serving the JS for the builder and budibase apps, as well as providing the API for interaction with the database and file system. - -For more information, see [CONTRIBUTING.md](https://github.com/Budibase/budibase/blob/HEAD/.github/CONTRIBUTING.md) - -## 📝 License - -Budibase is open-source. The builder is licensed [AGPL v3](https://www.gnu.org/licenses/agpl-3.0.en.html), the server is licensed [GPL v3](https://www.gnu.org/licenses/gpl-3.0.en.html), and the client is licensed [MPL](https://directory.fsf.org/wiki/License:MPL-2.0). - -## 💬 Get in touch - -If you have a question or would like to talk with other Budibase users, please hop over to [Github discussions](https://github.com/Budibase/budibase/discussions) or join our Discord server: - -[Discord chatroom](https://discord.gg/rCYayfe) - -![Discord Shield](https://discordapp.com/api/guilds/733030666647765003/widget.png?style=shield) - - -## Contributors ✨ - -Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): +Queremos prestar un especial agradecimiento a nuestra maravillosa gente ([emoji key](https://allcontributors.org/docs/en/emoji-key)): @@ -179,14 +260,18 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
- + + + + +

Michael Shanks

📖 💻 ⚠️

Kevin Åberg Kultalahti

📖 💻 ⚠️

Joe

📖 💻 🖋 🎨

Conor_Mack

💻 ⚠️

Rory Powell

💻 📖 ⚠️

Peter Clement

💻 📖 ⚠️

Conor_Mack

💻 ⚠️

pngwn

💻 ⚠️

HugoLd

💻

victoriasloan

💻

yashank09

💻

SOVLOOKUP

💻

seoulaja

🌍

Maurits Lourens

⚠️ 💻
@@ -195,4 +280,5 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d -This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! +Este proyecto sigue las especificaciones de [all-contributors](https://github.com/all-contributors/all-contributors). +Todo tipo de contribuciones son agradecidas! From de5d1cea3ec87c1862c58ba3460b6e647651cd16 Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Fri, 5 Aug 2022 10:57:13 +0100 Subject: [PATCH 159/320] amendments for PR comments --- .github/workflows/README.md | 4 ++-- docs/CONTRIBUTING.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 9367ce7073..f77323d85a 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -119,7 +119,7 @@ This job is responsible for deploying to our production, cloud kubernetes enviro ## Pro -| **NOTE**: When developing for both pro / budibase repositories, your branch names need to match, or else the correct pro image doesn't get run within your CI job. +| **NOTE**: When developing for both pro / budibase repositories, your branch names need to match, or else the correct pro doesn't get run within your CI job. ### Installing Pro @@ -134,7 +134,7 @@ This is done to prevent pro needing to be published prior to CI runs in budiabse - backend-core lives in the monorepo, so it can't be released independently to be used in pro - therefore the only option is to pull pro from source and release it as a part of the monorepo release, as if it were a mono package -The install is performed using the same steps as local development, via the `yarn clean && yarn bootstrap` command, see the [Contributing Guide#Pro](../../docs/CONTRIBUTING.md#pro) +The install is performed using the same steps as local development, via the `yarn bootstrap` command, see the [Contributing Guide#Pro](../../docs/CONTRIBUTING.md#pro) The branch to install pro from can vary depending on ref of the commit that triggered the budibase CI job. This is done to enable branches which have changes in both the monorepo and the pro repo to have their CI pass successfully. diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index fdd054745e..fb0848596c 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -209,7 +209,7 @@ yarn mode:account Note that only budibase maintainers will be able to access the pro repo. -The `yarn clean && yarn bootstrap` command can be used to replace the NPM supplied dependency with the local source aware version. This is achieved using the `yarn link` command. To see specifically how dependencies are linked see [scripts/link-dependencies.sh](../scripts/link-dependencies.sh). The same link script is used to link dependencies to account-portal in local dev. +The `yarn bootstrap` command can be used to replace the NPM supplied dependency with the local source aware version. This is achieved using the `yarn link` command. To see specifically how dependencies are linked see [scripts/link-dependencies.sh](../scripts/link-dependencies.sh). The same link script is used to link dependencies to account-portal in local dev. ### Troubleshooting From 1b952d29a3181323cd3501a975deb5f180bbef9f Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 5 Aug 2022 11:39:28 +0100 Subject: [PATCH 160/320] Removing session API. --- .../src/api/controllers/global/sessions.js | 37 ------------------- .../worker/src/api/routes/global/sessions.js | 14 ------- packages/worker/src/api/routes/index.js | 2 - 3 files changed, 53 deletions(-) delete mode 100644 packages/worker/src/api/controllers/global/sessions.js delete mode 100644 packages/worker/src/api/routes/global/sessions.js diff --git a/packages/worker/src/api/controllers/global/sessions.js b/packages/worker/src/api/controllers/global/sessions.js deleted file mode 100644 index 4a334037d4..0000000000 --- a/packages/worker/src/api/controllers/global/sessions.js +++ /dev/null @@ -1,37 +0,0 @@ -const { - getAllSessions, - getUserSessions, - invalidateSessions, -} = require("@budibase/backend-core/sessions") - -exports.fetch = async ctx => { - ctx.body = await getAllSessions() -} - -exports.find = async ctx => { - const { userId } = ctx.params - const sessions = await getUserSessions(userId) - ctx.body = sessions.map(session => session.value) -} - -exports.invalidateUser = async ctx => { - const { userId } = ctx.params - await invalidateSessions(userId) - ctx.body = { - message: "User sessions invalidated", - } -} - -exports.selfSessions = async ctx => { - const userId = ctx.user._id - ctx.body = await getUserSessions(userId) -} - -exports.invalidateSession = async ctx => { - const userId = ctx.user._id - const { sessionId } = ctx.params - await invalidateSessions(userId, sessionId) - ctx.body = { - message: "Session invalidated successfully.", - } -} diff --git a/packages/worker/src/api/routes/global/sessions.js b/packages/worker/src/api/routes/global/sessions.js deleted file mode 100644 index 6ab4ad8e59..0000000000 --- a/packages/worker/src/api/routes/global/sessions.js +++ /dev/null @@ -1,14 +0,0 @@ -const Router = require("@koa/router") -const controller = require("../../controllers/global/sessions") -const { adminOnly } = require("@budibase/backend-core/auth") - -const router = Router() - -router - .get("/api/global/sessions", adminOnly, controller.fetch) - .get("/api/global/sessions/self", controller.selfSessions) - .get("/api/global/sessions/:userId", adminOnly, controller.find) - .delete("/api/global/sessions/:userId", adminOnly, controller.invalidateUser) - .delete("/api/global/sessions/self/:sessionId", controller.invalidateSession) - -module.exports = router diff --git a/packages/worker/src/api/routes/index.js b/packages/worker/src/api/routes/index.js index e112d4def3..550d14a9a3 100644 --- a/packages/worker/src/api/routes/index.js +++ b/packages/worker/src/api/routes/index.js @@ -6,7 +6,6 @@ const templateRoutes = require("./global/templates") const emailRoutes = require("./global/email") const authRoutes = require("./global/auth") const roleRoutes = require("./global/roles") -const sessionRoutes = require("./global/sessions") const environmentRoutes = require("./system/environment") const tenantsRoutes = require("./system/tenants") const statusRoutes = require("./system/status") @@ -23,7 +22,6 @@ exports.routes = [ templateRoutes, tenantsRoutes, emailRoutes, - sessionRoutes, roleRoutes, environmentRoutes, statusRoutes, From dff11ee7a5f6849c697065b73351e7a0763f7a7a Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Fri, 5 Aug 2022 10:40:20 +0000 Subject: [PATCH 161/320] v1.2.13 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lerna.json b/lerna.json index b82f3faeed..2ff12b486b 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.2.12", + "version": "1.2.13", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 486cd68812..fa96af9e42 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.2.12", + "version": "1.2.13", "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.12", + "@budibase/types": "^1.2.13", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", "bcrypt": "5.0.1", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 417940aa58..4812e67883 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.12", + "version": "1.2.13", "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.12", + "@budibase/string-templates": "^1.2.13", "@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 3688514c28..98d09c9095 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.2.12", + "version": "1.2.13", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.2.12", - "@budibase/client": "^1.2.12", - "@budibase/frontend-core": "^1.2.12", - "@budibase/string-templates": "^1.2.12", + "@budibase/bbui": "^1.2.13", + "@budibase/client": "^1.2.13", + "@budibase/frontend-core": "^1.2.13", + "@budibase/string-templates": "^1.2.13", "@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 c24c32ad15..710fadefa2 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.2.12", + "version": "1.2.13", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index 7cdc66413d..876164fdb0 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.2.12", + "version": "1.2.13", "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.12", - "@budibase/frontend-core": "^1.2.12", - "@budibase/string-templates": "^1.2.12", + "@budibase/bbui": "^1.2.13", + "@budibase/frontend-core": "^1.2.13", + "@budibase/string-templates": "^1.2.13", "@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 9561d43369..2ebf026a6c 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.2.12", + "version": "1.2.13", "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.12", + "@budibase/bbui": "^1.2.13", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 53035aa8f4..5547eb6437 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.12", + "version": "1.2.13", "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.12", - "@budibase/client": "^1.2.12", + "@budibase/backend-core": "^1.2.13", + "@budibase/client": "^1.2.13", "@budibase/pro": "1.2.12", - "@budibase/string-templates": "^1.2.12", - "@budibase/types": "^1.2.12", + "@budibase/string-templates": "^1.2.13", + "@budibase/types": "^1.2.13", "@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 d832e5a32f..738e25329d 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.2.12", + "version": "1.2.13", "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 4ddb558c52..8da39585d1 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.2.12", + "version": "1.2.13", "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 9878464237..062fb76565 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.12", + "version": "1.2.13", "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.12", + "@budibase/backend-core": "^1.2.13", "@budibase/pro": "1.2.12", - "@budibase/string-templates": "^1.2.12", - "@budibase/types": "^1.2.12", + "@budibase/string-templates": "^1.2.13", + "@budibase/types": "^1.2.13", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 5425e296da2bbf5996bd7cd37092cd469af2a0b1 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Fri, 5 Aug 2022 10:43:53 +0000 Subject: [PATCH 162/320] Update pro version to 1.2.13 --- 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 5547eb6437..6693256062 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "^1.2.13", "@budibase/client": "^1.2.13", - "@budibase/pro": "1.2.12", + "@budibase/pro": "1.2.13", "@budibase/string-templates": "^1.2.13", "@budibase/types": "^1.2.13", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 426e5f9b07..2e64257b27 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.12": - version "1.2.12" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.12.tgz#a09ef7c4b7d1217b65e385199f2d044d1f30f450" - integrity sha512-o6tsX9bfpMLfAEfxBI4StC6Lvt1PkJ6b0JYlgp8QiXa0WxZX7np24cOxt2fWrP3ASIMDCrzLn2e3k3eOnzvh8w== +"@budibase/backend-core@1.2.13": + version "1.2.13" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.13.tgz#0539c03738d137c93e26679d7639d644bb2b77b0" + integrity sha512-Ic24IoTjZBB5QIfHLbYPgvWTkKwXCpqln5dImHdDVKVLMJvAmokzSrNX4k5CNRGX/MjROb9rZESWLEmX91hFjQ== dependencies: - "@budibase/types" "^1.2.12" + "@budibase/types" "^1.2.13" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -1177,13 +1177,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.2.12": - version "1.2.12" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.12.tgz#252f8f1c6730a3395d9d340f2e843052bf0293bb" - integrity sha512-1zhMMVBCX+VX/ILPlSbI7tdsQLcrxf1W29IQD4W55AbevlFnpQs4qNVveIdXFm+GWvCJbdN5I26CXBOftbVUhA== +"@budibase/pro@1.2.13": + version "1.2.13" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.13.tgz#73071eaa17cba176d99a6d4c22ec437fe39f2484" + integrity sha512-0MSEnx/3hTpgOCtJEcGCVt4gvo4QBwdyr1/wPJZPDPJUNIeOOxxj+FJtVJ7DLOOt6cd927Zqf6E4QwK5fp8/FA== dependencies: - "@budibase/backend-core" "1.2.12" - "@budibase/types" "1.2.12" + "@budibase/backend-core" "1.2.13" + "@budibase/types" "1.2.13" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1206,10 +1206,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.2.12", "@budibase/types@^1.2.12": - version "1.2.12" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.12.tgz#c460d1b39116538e47e00178116ad066aa6a6f1c" - integrity sha512-EeWadHUzeLx4X27Pv6XWlpSXbeLIMvg7r+Q52kYyOZFkmjtdCNFQW5PCu1bYUw9L1Xa64t7fvRLjKiNs2xGX7g== +"@budibase/types@1.2.13", "@budibase/types@^1.2.13": + version "1.2.13" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.13.tgz#d28ed3c22ec30a9a9f083cdd6255e6020ff35c0b" + integrity sha512-QLbdtpkPCU1Xlb8GopWhUbfqqWSqAjTVEau1sZJl9tq5T6KT1qlMn/7mUo0lbbQksbJwdINSO+aHSaBImzg8kA== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 062fb76565..30660f622b 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -36,7 +36,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "^1.2.13", - "@budibase/pro": "1.2.12", + "@budibase/pro": "1.2.13", "@budibase/string-templates": "^1.2.13", "@budibase/types": "^1.2.13", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 0241459cf4..f156541d2f 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.12": - version "1.2.12" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.12.tgz#a09ef7c4b7d1217b65e385199f2d044d1f30f450" - integrity sha512-o6tsX9bfpMLfAEfxBI4StC6Lvt1PkJ6b0JYlgp8QiXa0WxZX7np24cOxt2fWrP3ASIMDCrzLn2e3k3eOnzvh8w== +"@budibase/backend-core@1.2.13": + version "1.2.13" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.13.tgz#0539c03738d137c93e26679d7639d644bb2b77b0" + integrity sha512-Ic24IoTjZBB5QIfHLbYPgvWTkKwXCpqln5dImHdDVKVLMJvAmokzSrNX4k5CNRGX/MjROb9rZESWLEmX91hFjQ== dependencies: - "@budibase/types" "^1.2.12" + "@budibase/types" "^1.2.13" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -324,21 +324,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.2.12": - version "1.2.12" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.12.tgz#252f8f1c6730a3395d9d340f2e843052bf0293bb" - integrity sha512-1zhMMVBCX+VX/ILPlSbI7tdsQLcrxf1W29IQD4W55AbevlFnpQs4qNVveIdXFm+GWvCJbdN5I26CXBOftbVUhA== +"@budibase/pro@1.2.13": + version "1.2.13" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.13.tgz#73071eaa17cba176d99a6d4c22ec437fe39f2484" + integrity sha512-0MSEnx/3hTpgOCtJEcGCVt4gvo4QBwdyr1/wPJZPDPJUNIeOOxxj+FJtVJ7DLOOt6cd927Zqf6E4QwK5fp8/FA== dependencies: - "@budibase/backend-core" "1.2.12" - "@budibase/types" "1.2.12" + "@budibase/backend-core" "1.2.13" + "@budibase/types" "1.2.13" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.2.12", "@budibase/types@^1.2.12": - version "1.2.12" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.12.tgz#c460d1b39116538e47e00178116ad066aa6a6f1c" - integrity sha512-EeWadHUzeLx4X27Pv6XWlpSXbeLIMvg7r+Q52kYyOZFkmjtdCNFQW5PCu1bYUw9L1Xa64t7fvRLjKiNs2xGX7g== +"@budibase/types@1.2.13", "@budibase/types@^1.2.13": + version "1.2.13" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.13.tgz#d28ed3c22ec30a9a9f083cdd6255e6020ff35c0b" + integrity sha512-QLbdtpkPCU1Xlb8GopWhUbfqqWSqAjTVEau1sZJl9tq5T6KT1qlMn/7mUo0lbbQksbJwdINSO+aHSaBImzg8kA== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From ade84965849a51b632d8b8ed601161d8f68842d1 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Fri, 5 Aug 2022 10:50:30 +0000 Subject: [PATCH 163/320] v1.2.13-alpha.1 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lerna.json b/lerna.json index 856609014a..91f1a57b00 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.2.13-alpha.0", + "version": "1.2.13-alpha.1", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 7468e73d09..825568e977 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.2.13-alpha.0", + "version": "1.2.13-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": "1.2.13-alpha.0", + "@budibase/types": "1.2.13-alpha.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", "bcrypt": "5.0.1", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 5a345e48d9..bbdb398c54 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.13-alpha.0", + "version": "1.2.13-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": "1.2.13-alpha.0", + "@budibase/string-templates": "1.2.13-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 fdcbc7afcd..d4523e5ca5 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.2.13-alpha.0", + "version": "1.2.13-alpha.1", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "1.2.13-alpha.0", - "@budibase/client": "1.2.13-alpha.0", - "@budibase/frontend-core": "1.2.13-alpha.0", - "@budibase/string-templates": "1.2.13-alpha.0", + "@budibase/bbui": "1.2.13-alpha.1", + "@budibase/client": "1.2.13-alpha.1", + "@budibase/frontend-core": "1.2.13-alpha.1", + "@budibase/string-templates": "1.2.13-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 8fea40f323..f67a0873f1 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.2.13-alpha.0", + "version": "1.2.13-alpha.1", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index 1c10a57c7d..db232d59cf 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.2.13-alpha.0", + "version": "1.2.13-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": "1.2.13-alpha.0", - "@budibase/frontend-core": "1.2.13-alpha.0", - "@budibase/string-templates": "1.2.13-alpha.0", + "@budibase/bbui": "1.2.13-alpha.1", + "@budibase/frontend-core": "1.2.13-alpha.1", + "@budibase/string-templates": "1.2.13-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 f40a60463e..4ad7b3154d 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.2.13-alpha.0", + "version": "1.2.13-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": "1.2.13-alpha.0", + "@budibase/bbui": "1.2.13-alpha.1", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index d0ccb31a8d..5b0c0fc1d1 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.13-alpha.0", + "version": "1.2.13-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": "1.2.13-alpha.0", - "@budibase/client": "1.2.13-alpha.0", + "@budibase/backend-core": "1.2.13-alpha.1", + "@budibase/client": "1.2.13-alpha.1", "@budibase/pro": "1.2.13-alpha.0", - "@budibase/string-templates": "1.2.13-alpha.0", - "@budibase/types": "1.2.13-alpha.0", + "@budibase/string-templates": "1.2.13-alpha.1", + "@budibase/types": "1.2.13-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 d41df308d7..f35f006fb8 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.2.13-alpha.0", + "version": "1.2.13-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 7e310f0246..7ed0d6336c 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.2.13-alpha.0", + "version": "1.2.13-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 b48d02c6c9..5947aeb812 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.13-alpha.0", + "version": "1.2.13-alpha.1", "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.13-alpha.0", + "@budibase/backend-core": "1.2.13-alpha.1", "@budibase/pro": "1.2.13-alpha.0", - "@budibase/string-templates": "1.2.13-alpha.0", - "@budibase/types": "1.2.13-alpha.0", + "@budibase/string-templates": "1.2.13-alpha.1", + "@budibase/types": "1.2.13-alpha.1", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From e51c96a8057dcec75165d6fea82060b3552350db Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Fri, 5 Aug 2022 10:53:28 +0000 Subject: [PATCH 164/320] Update pro version to 1.2.13-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 5b0c0fc1d1..94c2f5486f 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "1.2.13-alpha.1", "@budibase/client": "1.2.13-alpha.1", - "@budibase/pro": "1.2.13-alpha.0", + "@budibase/pro": "1.2.13-alpha.1", "@budibase/string-templates": "1.2.13-alpha.1", "@budibase/types": "1.2.13-alpha.1", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 9d424377bb..77018f13da 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.13-alpha.0": - version "1.2.13-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.13-alpha.0.tgz#32e17c35d90313d5c4aeafa26f1223547cbc1120" - integrity sha512-EPuxofOZc1svullIVohJhgjDhi36U3jPHPlvMdbc0H9tMPXQZPv+sKGDJROdHJRYMOMKPpEqzSheDI+v86oTLg== +"@budibase/backend-core@1.2.13-alpha.1": + version "1.2.13-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.13-alpha.1.tgz#3f51e51f30209f58a76e53629d349645f1e15b30" + integrity sha512-d8vGKhkHGWJoFSPphfSe8JeV/8lfNptGt/xvkOaBS3sSPm/tW0bhAG8hwek1ib2xsmUxTT2q5YBuK/8QlZMpWg== dependencies: - "@budibase/types" "1.2.13-alpha.0" + "@budibase/types" "1.2.13-alpha.1" "@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.13-alpha.0": - version "1.2.13-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.13-alpha.0.tgz#59f972e50e41346cbc1a4730b133c43c39b3610a" - integrity sha512-LE/lXBmLxHgnD//ySpFLyQXM6Hys9Fjhikl/zQAHbUwnxtXE/GKXvwHTvCJTY9A2WHzhh/0ZZcbt+EkJrgDuTA== +"@budibase/pro@1.2.13-alpha.1": + version "1.2.13-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.13-alpha.1.tgz#df5bf7741035781fe0f8b389da9eaffc7048eeb6" + integrity sha512-2sEQglt67i4tU/h2RS53z0MLf/iCy54gGtuRCnMBb721pMioaqRj+bqkpcoTYMIOWm4eaJSs9Kwn1a0SPABRLQ== dependencies: - "@budibase/backend-core" "1.2.13-alpha.0" - "@budibase/types" "1.2.13-alpha.0" + "@budibase/backend-core" "1.2.13-alpha.1" + "@budibase/types" "1.2.13-alpha.1" "@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.13-alpha.0": - version "1.2.13-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.13-alpha.0.tgz#5005a55042f9b5e4df6b91ffd700482e920f22da" - integrity sha512-+P2VkkiTWs8VtbdZ1lBiTi6Cf9LbGrDLu3lFWQ/WfVTda8ijGpMM3gHgfF5tncV1krn6Ha3yA1uFvCf6KHz08g== +"@budibase/types@1.2.13-alpha.1": + version "1.2.13-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.13-alpha.1.tgz#0369ede65c490996a4f3e03239e45bb56523a31d" + integrity sha512-2rdZMKVZSDv+074ljH8QBb6IgzeFih2z0usXCH2fjNTUs1wO7saO5EX1UcprFWm0xYHAOsaWWFUrzqrh+38+cw== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 5947aeb812..bb4b8fd438 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -36,7 +36,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "1.2.13-alpha.1", - "@budibase/pro": "1.2.13-alpha.0", + "@budibase/pro": "1.2.13-alpha.1", "@budibase/string-templates": "1.2.13-alpha.1", "@budibase/types": "1.2.13-alpha.1", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 44b51f3904..4c971fe16a 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.13-alpha.0": - version "1.2.13-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.13-alpha.0.tgz#32e17c35d90313d5c4aeafa26f1223547cbc1120" - integrity sha512-EPuxofOZc1svullIVohJhgjDhi36U3jPHPlvMdbc0H9tMPXQZPv+sKGDJROdHJRYMOMKPpEqzSheDI+v86oTLg== +"@budibase/backend-core@1.2.13-alpha.1": + version "1.2.13-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.13-alpha.1.tgz#3f51e51f30209f58a76e53629d349645f1e15b30" + integrity sha512-d8vGKhkHGWJoFSPphfSe8JeV/8lfNptGt/xvkOaBS3sSPm/tW0bhAG8hwek1ib2xsmUxTT2q5YBuK/8QlZMpWg== dependencies: - "@budibase/types" "1.2.13-alpha.0" + "@budibase/types" "1.2.13-alpha.1" "@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.13-alpha.0": - version "1.2.13-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.13-alpha.0.tgz#59f972e50e41346cbc1a4730b133c43c39b3610a" - integrity sha512-LE/lXBmLxHgnD//ySpFLyQXM6Hys9Fjhikl/zQAHbUwnxtXE/GKXvwHTvCJTY9A2WHzhh/0ZZcbt+EkJrgDuTA== +"@budibase/pro@1.2.13-alpha.1": + version "1.2.13-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.13-alpha.1.tgz#df5bf7741035781fe0f8b389da9eaffc7048eeb6" + integrity sha512-2sEQglt67i4tU/h2RS53z0MLf/iCy54gGtuRCnMBb721pMioaqRj+bqkpcoTYMIOWm4eaJSs9Kwn1a0SPABRLQ== dependencies: - "@budibase/backend-core" "1.2.13-alpha.0" - "@budibase/types" "1.2.13-alpha.0" + "@budibase/backend-core" "1.2.13-alpha.1" + "@budibase/types" "1.2.13-alpha.1" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.2.13-alpha.0": - version "1.2.13-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.13-alpha.0.tgz#5005a55042f9b5e4df6b91ffd700482e920f22da" - integrity sha512-+P2VkkiTWs8VtbdZ1lBiTi6Cf9LbGrDLu3lFWQ/WfVTda8ijGpMM3gHgfF5tncV1krn6Ha3yA1uFvCf6KHz08g== +"@budibase/types@1.2.13-alpha.1": + version "1.2.13-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.13-alpha.1.tgz#0369ede65c490996a4f3e03239e45bb56523a31d" + integrity sha512-2rdZMKVZSDv+074ljH8QBb6IgzeFih2z0usXCH2fjNTUs1wO7saO5EX1UcprFWm0xYHAOsaWWFUrzqrh+38+cw== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From f3dfcf07aaa76a3757801a5572adc0392512b2bc Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Fri, 5 Aug 2022 12:00:58 +0000 Subject: [PATCH 165/320] v1.2.14 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lerna.json b/lerna.json index 2ff12b486b..8ce0e0c314 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.2.13", + "version": "1.2.14", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index fa96af9e42..6081d5b8e6 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.2.13", + "version": "1.2.14", "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.13", + "@budibase/types": "^1.2.14", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", "bcrypt": "5.0.1", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 4812e67883..342e65583d 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.13", + "version": "1.2.14", "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.13", + "@budibase/string-templates": "^1.2.14", "@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 98d09c9095..a5f1e5ecd6 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.2.13", + "version": "1.2.14", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.2.13", - "@budibase/client": "^1.2.13", - "@budibase/frontend-core": "^1.2.13", - "@budibase/string-templates": "^1.2.13", + "@budibase/bbui": "^1.2.14", + "@budibase/client": "^1.2.14", + "@budibase/frontend-core": "^1.2.14", + "@budibase/string-templates": "^1.2.14", "@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 710fadefa2..b94d8ef4fb 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.2.13", + "version": "1.2.14", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index 876164fdb0..4e2daac226 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.2.13", + "version": "1.2.14", "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.13", - "@budibase/frontend-core": "^1.2.13", - "@budibase/string-templates": "^1.2.13", + "@budibase/bbui": "^1.2.14", + "@budibase/frontend-core": "^1.2.14", + "@budibase/string-templates": "^1.2.14", "@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 2ebf026a6c..3d8e52cf74 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.2.13", + "version": "1.2.14", "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.13", + "@budibase/bbui": "^1.2.14", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 6693256062..ce41280450 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.13", + "version": "1.2.14", "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.13", - "@budibase/client": "^1.2.13", + "@budibase/backend-core": "^1.2.14", + "@budibase/client": "^1.2.14", "@budibase/pro": "1.2.13", - "@budibase/string-templates": "^1.2.13", - "@budibase/types": "^1.2.13", + "@budibase/string-templates": "^1.2.14", + "@budibase/types": "^1.2.14", "@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 738e25329d..5d859902b5 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.2.13", + "version": "1.2.14", "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 8da39585d1..c62ed636d1 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.2.13", + "version": "1.2.14", "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 30660f622b..3d22c5df76 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.13", + "version": "1.2.14", "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.13", + "@budibase/backend-core": "^1.2.14", "@budibase/pro": "1.2.13", - "@budibase/string-templates": "^1.2.13", - "@budibase/types": "^1.2.13", + "@budibase/string-templates": "^1.2.14", + "@budibase/types": "^1.2.14", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 1a43b72dfe9d85561b423f9e1f979d54d20e6e47 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Fri, 5 Aug 2022 12:04:48 +0000 Subject: [PATCH 166/320] Update pro version to 1.2.14 --- 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 ce41280450..9052ea132e 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "^1.2.14", "@budibase/client": "^1.2.14", - "@budibase/pro": "1.2.13", + "@budibase/pro": "1.2.14", "@budibase/string-templates": "^1.2.14", "@budibase/types": "^1.2.14", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 2e64257b27..2d7a376ab1 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.13": - version "1.2.13" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.13.tgz#0539c03738d137c93e26679d7639d644bb2b77b0" - integrity sha512-Ic24IoTjZBB5QIfHLbYPgvWTkKwXCpqln5dImHdDVKVLMJvAmokzSrNX4k5CNRGX/MjROb9rZESWLEmX91hFjQ== +"@budibase/backend-core@1.2.14": + version "1.2.14" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.14.tgz#1aca6a82b8ac28f5c101721ba4596f674eb57197" + integrity sha512-870ZzNX13/f1U7qkUJUoKp/e8UQqDHEc0TZBBaWcpLXbEBs6ikxGp5YdYGEVXkr/ca4rusfHs6jAjUNkIPThow== dependencies: - "@budibase/types" "^1.2.13" + "@budibase/types" "^1.2.14" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -1177,13 +1177,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.2.13": - version "1.2.13" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.13.tgz#73071eaa17cba176d99a6d4c22ec437fe39f2484" - integrity sha512-0MSEnx/3hTpgOCtJEcGCVt4gvo4QBwdyr1/wPJZPDPJUNIeOOxxj+FJtVJ7DLOOt6cd927Zqf6E4QwK5fp8/FA== +"@budibase/pro@1.2.14": + version "1.2.14" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.14.tgz#bce72c8a0d48dbec8dc6aa4af47abb9dbfd3d029" + integrity sha512-nYyVHO1IaoDRFSrLp0ueKWG0/Z+PSRs3yF+OZ7vQaECCXXSgWnZyCOy9o6iIovUlbimbPxrQvkwcL8v4deWuvQ== dependencies: - "@budibase/backend-core" "1.2.13" - "@budibase/types" "1.2.13" + "@budibase/backend-core" "1.2.14" + "@budibase/types" "1.2.14" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1206,10 +1206,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.2.13", "@budibase/types@^1.2.13": - version "1.2.13" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.13.tgz#d28ed3c22ec30a9a9f083cdd6255e6020ff35c0b" - integrity sha512-QLbdtpkPCU1Xlb8GopWhUbfqqWSqAjTVEau1sZJl9tq5T6KT1qlMn/7mUo0lbbQksbJwdINSO+aHSaBImzg8kA== +"@budibase/types@1.2.14", "@budibase/types@^1.2.14": + version "1.2.14" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.14.tgz#8ef2d1b526661629dd9db2f10fea515fadfdcc53" + integrity sha512-E3k1kJz24W0l1aw1cL2Edf7WnO6Nt6iew4stDpuQjG2r1EcXPv6/hPsRA7Ms0331ZjGKEswaddSyF5NTn1O8VQ== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 3d22c5df76..70afd899e8 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -36,7 +36,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "^1.2.14", - "@budibase/pro": "1.2.13", + "@budibase/pro": "1.2.14", "@budibase/string-templates": "^1.2.14", "@budibase/types": "^1.2.14", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index f156541d2f..e03cbaf580 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.13": - version "1.2.13" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.13.tgz#0539c03738d137c93e26679d7639d644bb2b77b0" - integrity sha512-Ic24IoTjZBB5QIfHLbYPgvWTkKwXCpqln5dImHdDVKVLMJvAmokzSrNX4k5CNRGX/MjROb9rZESWLEmX91hFjQ== +"@budibase/backend-core@1.2.14": + version "1.2.14" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.14.tgz#1aca6a82b8ac28f5c101721ba4596f674eb57197" + integrity sha512-870ZzNX13/f1U7qkUJUoKp/e8UQqDHEc0TZBBaWcpLXbEBs6ikxGp5YdYGEVXkr/ca4rusfHs6jAjUNkIPThow== dependencies: - "@budibase/types" "^1.2.13" + "@budibase/types" "^1.2.14" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -324,21 +324,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.2.13": - version "1.2.13" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.13.tgz#73071eaa17cba176d99a6d4c22ec437fe39f2484" - integrity sha512-0MSEnx/3hTpgOCtJEcGCVt4gvo4QBwdyr1/wPJZPDPJUNIeOOxxj+FJtVJ7DLOOt6cd927Zqf6E4QwK5fp8/FA== +"@budibase/pro@1.2.14": + version "1.2.14" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.14.tgz#bce72c8a0d48dbec8dc6aa4af47abb9dbfd3d029" + integrity sha512-nYyVHO1IaoDRFSrLp0ueKWG0/Z+PSRs3yF+OZ7vQaECCXXSgWnZyCOy9o6iIovUlbimbPxrQvkwcL8v4deWuvQ== dependencies: - "@budibase/backend-core" "1.2.13" - "@budibase/types" "1.2.13" + "@budibase/backend-core" "1.2.14" + "@budibase/types" "1.2.14" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.2.13", "@budibase/types@^1.2.13": - version "1.2.13" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.13.tgz#d28ed3c22ec30a9a9f083cdd6255e6020ff35c0b" - integrity sha512-QLbdtpkPCU1Xlb8GopWhUbfqqWSqAjTVEau1sZJl9tq5T6KT1qlMn/7mUo0lbbQksbJwdINSO+aHSaBImzg8kA== +"@budibase/types@1.2.14", "@budibase/types@^1.2.14": + version "1.2.14" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.14.tgz#8ef2d1b526661629dd9db2f10fea515fadfdcc53" + integrity sha512-E3k1kJz24W0l1aw1cL2Edf7WnO6Nt6iew4stDpuQjG2r1EcXPv6/hPsRA7Ms0331ZjGKEswaddSyF5NTn1O8VQ== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From 15ffa76d6f27cfd45cd99841d07a36555e5c9e0d Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Fri, 5 Aug 2022 14:53:41 +0100 Subject: [PATCH 167/320] Handle non-array values --- .../client/src/components/app/forms/RelationshipField.svelte | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/client/src/components/app/forms/RelationshipField.svelte b/packages/client/src/components/app/forms/RelationshipField.svelte index 2c1136bea3..ce2f194786 100644 --- a/packages/client/src/components/app/forms/RelationshipField.svelte +++ b/packages/client/src/components/app/forms/RelationshipField.svelte @@ -55,6 +55,9 @@ if (!values) { return [] } + if (!Array.isArray(values)) { + values = [values] + } return values.map(value => (typeof value === "object" ? value._id : value)) } From 5909ce62f7fac1281defe9b26830d2a1c9b08cef Mon Sep 17 00:00:00 2001 From: Dean Date: Fri, 5 Aug 2022 15:16:04 +0100 Subject: [PATCH 168/320] Removed query filtering on dynamic variables in binding drawer --- .../[selectedDatasource]/rest/[query]/index.svelte | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte index 5ccc173318..8ecd88243e 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte @@ -231,13 +231,10 @@ ] // convert dynamic variables list to simple key/val object - const getDynamicVariables = (datasource, queryId) => { + const getDynamicVariables = datasource => { const variablesList = datasource?.config?.dynamicVariables if (variablesList && variablesList.length > 0) { - const filtered = queryId - ? variablesList.filter(variable => variable.queryId === queryId) - : variablesList - return filtered.reduce( + return variablesList.reduce( (acc, next) => ({ ...acc, [next.name]: next.value }), {} ) @@ -367,7 +364,7 @@ if (query && !query.fields.pagination) { query.fields.pagination = {} } - dynamicVariables = getDynamicVariables(datasource, query._id) + dynamicVariables = getDynamicVariables(datasource) prettifyQueryRequestBody( query, From b3a6efa2f90c3569fa9afc1095d1550c292f50e0 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 5 Aug 2022 15:21:12 +0100 Subject: [PATCH 169/320] Updating authenticated middleware to typescript and updating the TTL once per minute rather than every API request. --- .../{authenticated.js => authenticated.ts} | 63 +++++++++++-------- 1 file changed, 38 insertions(+), 25 deletions(-) rename packages/backend-core/src/middleware/{authenticated.js => authenticated.ts} (76%) diff --git a/packages/backend-core/src/middleware/authenticated.js b/packages/backend-core/src/middleware/authenticated.ts similarity index 76% rename from packages/backend-core/src/middleware/authenticated.js rename to packages/backend-core/src/middleware/authenticated.ts index 674c16aa55..e5b2232a42 100644 --- a/packages/backend-core/src/middleware/authenticated.js +++ b/packages/backend-core/src/middleware/authenticated.ts @@ -1,28 +1,39 @@ -const { Cookies, Headers } = require("../constants") -const { getCookie, clearCookie, openJwt } = require("../utils") -const { getUser } = require("../cache/user") -const { getSession, updateSessionTTL } = require("../security/sessions") -const { buildMatcherRegex, matches } = require("./matchers") -const env = require("../environment") -const { SEPARATOR } = require("../db/constants") -const { ViewNames } = require("../db/utils") -const { queryGlobalView } = require("../db/views") -const { getGlobalDB, doInTenant } = require("../tenancy") -const { decrypt } = require("../security/encryption") +import { Cookies, Headers } from "../constants" +import { getCookie, clearCookie, openJwt } from "../utils" +import { getUser } from "../cache/user" +import { getSession, updateSessionTTL } from "../security/sessions" +import { buildMatcherRegex, matches } from "./matchers" +import { SEPARATOR } from "../db/constants" +import { ViewNames } from "../db/utils" +import { queryGlobalView } from "../db/views" +import { getGlobalDB, doInTenant } from "../tenancy" +import { decrypt } from "../security/encryption" const identity = require("../context/identity") +const env = require("../environment") -function finalise( - ctx, - { authenticated, user, internal, version, publicEndpoint } = {} -) { - ctx.publicEndpoint = publicEndpoint || false - ctx.isAuthenticated = authenticated || false - ctx.user = user - ctx.internal = internal || false - ctx.version = version +const ONE_MINUTE = 60 * 1000 + +interface FinaliseOpts { + authenticated?: boolean + internal?: boolean + publicEndpoint?: boolean + version?: string + user?: any } -async function checkApiKey(apiKey, populateUser) { +function timeMinusOneMinute() { + return new Date(Date.now() - ONE_MINUTE).toISOString() +} + +function finalise(ctx: any, opts: FinaliseOpts = {}) { + ctx.publicEndpoint = opts.publicEndpoint || false + ctx.isAuthenticated = opts.authenticated || false + ctx.user = opts.user + ctx.internal = opts.internal || false + ctx.version = opts.version +} + +async function checkApiKey(apiKey: string, populateUser?: Function) { if (apiKey === env.INTERNAL_API_KEY) { return { valid: true } } @@ -56,10 +67,12 @@ async function checkApiKey(apiKey, populateUser) { */ module.exports = ( noAuthPatterns = [], - opts = { publicAllowed: false, populateUser: null } + opts: { publicAllowed: boolean; populateUser?: Function } = { + publicAllowed: false, + } ) => { const noAuthOptions = noAuthPatterns ? buildMatcherRegex(noAuthPatterns) : [] - return async (ctx, next) => { + return async (ctx: any, next: any) => { let publicEndpoint = false const version = ctx.request.headers[Headers.API_VER] // the path is not authenticated @@ -103,7 +116,7 @@ module.exports = ( console.error("Auth Error", error) // remove the cookie as the user does not exist anymore clearCookie(ctx, Cookies.Auth) - } else { + } else if (session?.lastAccessedAt < timeMinusOneMinute()) { // make sure we denote that the session is still in use await updateSessionTTL(session) } @@ -142,7 +155,7 @@ module.exports = ( } else { return next() } - } catch (err) { + } catch (err: any) { // invalid token, clear the cookie if (err && err.name === "JsonWebTokenError") { clearCookie(ctx, Cookies.Auth) From 9fa463313c4f427e990b8e853786657473644a17 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 5 Aug 2022 16:06:16 +0100 Subject: [PATCH 170/320] Insert table ID back into query for follow-up pagination query --- packages/server/src/api/controllers/row/internalSearch.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/server/src/api/controllers/row/internalSearch.js b/packages/server/src/api/controllers/row/internalSearch.js index 8a04fc2bd0..522d1c55c7 100644 --- a/packages/server/src/api/controllers/row/internalSearch.js +++ b/packages/server/src/api/controllers/row/internalSearch.js @@ -423,6 +423,7 @@ exports.paginatedSearch = async (query, params) => { // Try fetching 1 row in the next page to see if another page of results // exists or not const nextResults = await search + .setTable(params.tableId) .setBookmark(searchResults.bookmark) .setLimit(1) .run() From 52d16d1099fd2346bf8e7f485fc37ebffbedb243 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 5 Aug 2022 17:13:03 +0100 Subject: [PATCH 171/320] Updating sessions to TS, adding env var to set the session update length, adding reasons for invalidation, making sure errors are never considered authenticated. --- packages/backend-core/src/environment.ts | 1 + packages/backend-core/src/index.ts | 2 +- .../src/middleware/authenticated.ts | 8 +-- .../src/security/{sessions.js => sessions.ts} | 62 ++++++++++++------- packages/backend-core/src/utils.js | 13 ++-- packages/server/src/environment.js | 1 + packages/worker/src/environment.js | 1 + packages/worker/src/sdk/users/users.ts | 16 ++--- 8 files changed, 62 insertions(+), 42 deletions(-) rename packages/backend-core/src/security/{sessions.js => sessions.ts} (63%) diff --git a/packages/backend-core/src/environment.ts b/packages/backend-core/src/environment.ts index 51cc721ded..0348d921ab 100644 --- a/packages/backend-core/src/environment.ts +++ b/packages/backend-core/src/environment.ts @@ -56,6 +56,7 @@ const env = { SERVICE: process.env.SERVICE || "budibase", MEMORY_LEAK_CHECK: process.env.MEMORY_LEAK_CHECK || false, LOG_LEVEL: process.env.LOG_LEVEL, + SESSION_UPDATE_PERIOD: process.env.SESSION_UPDATE_PERIOD, DEPLOYMENT_ENVIRONMENT: process.env.DEPLOYMENT_ENVIRONMENT || "docker-compose", _set(key: any, value: any) { diff --git a/packages/backend-core/src/index.ts b/packages/backend-core/src/index.ts index ced4630fb7..e585d4b6c3 100644 --- a/packages/backend-core/src/index.ts +++ b/packages/backend-core/src/index.ts @@ -9,7 +9,7 @@ import * as installation from "./installation" import env from "./environment" import tenancy from "./tenancy" import featureFlags from "./featureFlags" -import sessions from "./security/sessions" +import * as sessions from "./security/sessions" import deprovisioning from "./context/deprovision" import auth from "./auth" import constants from "./constants" diff --git a/packages/backend-core/src/middleware/authenticated.ts b/packages/backend-core/src/middleware/authenticated.ts index e5b2232a42..7280eba294 100644 --- a/packages/backend-core/src/middleware/authenticated.ts +++ b/packages/backend-core/src/middleware/authenticated.ts @@ -11,7 +11,7 @@ import { decrypt } from "../security/encryption" const identity = require("../context/identity") const env = require("../environment") -const ONE_MINUTE = 60 * 1000 +const ONE_MINUTE = env.SESSION_UPDATE_PERIOD || 60 * 1000 interface FinaliseOpts { authenticated?: boolean @@ -86,9 +86,9 @@ module.exports = ( const authCookie = getCookie(ctx, Cookies.Auth) || openJwt(headerToken) let authenticated = false, user = null, - internal = false + internal = false, + error = null if (authCookie) { - let error = null const sessionId = authCookie.sessionId const userId = authCookie.userId @@ -144,7 +144,7 @@ module.exports = ( delete user.password } // be explicit - if (authenticated !== true) { + if (error || authenticated !== true) { authenticated = false } // isAuthenticated is a function, so use a variable to be able to check authed state diff --git a/packages/backend-core/src/security/sessions.js b/packages/backend-core/src/security/sessions.ts similarity index 63% rename from packages/backend-core/src/security/sessions.js rename to packages/backend-core/src/security/sessions.ts index a3be0a1a58..f8375f510b 100644 --- a/packages/backend-core/src/security/sessions.js +++ b/packages/backend-core/src/security/sessions.ts @@ -3,34 +3,51 @@ const { v4: uuidv4 } = require("uuid") const { logWarn } = require("../logging") const env = require("../environment") +interface Session { + key: string + userId: string + sessionId: string + lastAccessedAt: string + createdAt: string + csrfToken?: string + value: string +} + +type SessionKey = { key: string }[] + // a week in seconds const EXPIRY_SECONDS = 86400 * 7 -async function getSessionsForUser(userId) { - const client = await redis.getSessionClient() - const sessions = await client.scan(userId) - return sessions.map(session => session.value) -} - -function makeSessionID(userId, sessionId) { +function makeSessionID(userId: string, sessionId: string) { return `${userId}/${sessionId}` } -async function invalidateSessions(userId, sessionIds = null) { +export async function getSessionsForUser(userId: string) { + const client = await redis.getSessionClient() + const sessions = await client.scan(userId) + return sessions.map((session: Session) => session.value) +} + +export async function invalidateSessions( + userId: string, + opts: { sessionIds?: string[]; reason?: string } = {} +) { try { - let sessions = [] + const reason = opts?.reason || "unknown" + let sessionIds: string[] = opts.sessionIds || [] + let sessions: SessionKey // If no sessionIds, get all the sessions for the user if (!sessionIds) { sessions = await getSessionsForUser(userId) sessions.forEach( - session => + (session: any) => (session.key = makeSessionID(session.userId, session.sessionId)) ) } else { // use the passed array of sessionIds - sessions = Array.isArray(sessionIds) ? sessionIds : [sessionIds] - sessions = sessions.map(sessionId => ({ + sessionIds = Array.isArray(sessionIds) ? sessionIds : [sessionIds] + sessions = sessionIds.map((sessionId: string) => ({ key: makeSessionID(userId, sessionId), })) } @@ -43,7 +60,7 @@ async function invalidateSessions(userId, sessionIds = null) { } if (!env.isTest()) { logWarn( - `Invalidating sessions for ${userId} - ${sessions + `Invalidating sessions for ${userId} (reason: ${reason}) - ${sessions .map(session => session.key) .join(", ")}` ) @@ -55,9 +72,9 @@ async function invalidateSessions(userId, sessionIds = null) { } } -exports.createASession = async (userId, session) => { +export async function createASession(userId: string, session: Session) { // invalidate all other sessions - await invalidateSessions(userId) + await invalidateSessions(userId, { reason: "creation" }) const client = await redis.getSessionClient() const sessionId = session.sessionId @@ -65,27 +82,27 @@ exports.createASession = async (userId, session) => { session.csrfToken = uuidv4() } session = { + ...session, createdAt: new Date().toISOString(), lastAccessedAt: new Date().toISOString(), - ...session, userId, } await client.store(makeSessionID(userId, sessionId), session, EXPIRY_SECONDS) } -exports.updateSessionTTL = async session => { +export async function updateSessionTTL(session: Session) { const client = await redis.getSessionClient() const key = makeSessionID(session.userId, session.sessionId) session.lastAccessedAt = new Date().toISOString() await client.store(key, session, EXPIRY_SECONDS) } -exports.endSession = async (userId, sessionId) => { +export async function endSession(userId: string, sessionId: string) { const client = await redis.getSessionClient() await client.delete(makeSessionID(userId, sessionId)) } -exports.getSession = async (userId, sessionId) => { +export async function getSession(userId: string, sessionId: string) { try { const client = await redis.getSessionClient() return client.get(makeSessionID(userId, sessionId)) @@ -96,11 +113,8 @@ exports.getSession = async (userId, sessionId) => { } } -exports.getAllSessions = async () => { +export async function getAllSessions() { const client = await redis.getSessionClient() const sessions = await client.scan() - return sessions.map(session => session.value) + return sessions.map((session: Session) => session.value) } - -exports.getUserSessions = getSessionsForUser -exports.invalidateSessions = invalidateSessions diff --git a/packages/backend-core/src/utils.js b/packages/backend-core/src/utils.js index cf32539c58..1e143968d9 100644 --- a/packages/backend-core/src/utils.js +++ b/packages/backend-core/src/utils.js @@ -10,7 +10,10 @@ const { queryGlobalView } = require("./db/views") const { Headers, Cookies, MAX_VALID_DATE } = require("./constants") const env = require("./environment") const userCache = require("./cache/user") -const { getUserSessions, invalidateSessions } = require("./security/sessions") +const { + getSessionsForUser, + invalidateSessions, +} = require("./security/sessions") const events = require("./events") const tenancy = require("./tenancy") @@ -178,7 +181,7 @@ exports.platformLogout = async ({ ctx, userId, keepActiveSession }) => { if (!ctx) throw new Error("Koa context must be supplied to logout.") const currentSession = exports.getCookie(ctx, Cookies.Auth) - let sessions = await getUserSessions(userId) + let sessions = await getSessionsForUser(userId) if (keepActiveSession) { sessions = sessions.filter( @@ -190,10 +193,8 @@ exports.platformLogout = async ({ ctx, userId, keepActiveSession }) => { exports.clearCookie(ctx, Cookies.CurrentApp) } - await invalidateSessions( - userId, - sessions.map(({ sessionId }) => sessionId) - ) + const sessionIds = sessions.map(({ sessionId }) => sessionId) + await invalidateSessions(userId, { sessionIds, reason: "logout" }) await events.auth.logout() await userCache.invalidateUser(userId) } diff --git a/packages/server/src/environment.js b/packages/server/src/environment.js index 99d099f8d5..c2e2815e00 100644 --- a/packages/server/src/environment.js +++ b/packages/server/src/environment.js @@ -63,6 +63,7 @@ module.exports = { DISABLE_ACCOUNT_PORTAL: process.env.DISABLE_ACCOUNT_PORTAL, TEMPLATE_REPOSITORY: process.env.TEMPLATE_REPOSITORY || "app", DISABLE_AUTO_PROD_APP_SYNC: process.env.DISABLE_AUTO_PROD_APP_SYNC, + SESSION_UPDATE_PERIOD: process.env.SESSION_UPDATE_PERIOD, // minor SALT_ROUNDS: process.env.SALT_ROUNDS, LOGGER: process.env.LOGGER, diff --git a/packages/worker/src/environment.js b/packages/worker/src/environment.js index 4c3cab1cab..bb45c1dd78 100644 --- a/packages/worker/src/environment.js +++ b/packages/worker/src/environment.js @@ -61,6 +61,7 @@ module.exports = { SMTP_FROM_ADDRESS: process.env.SMTP_FROM_ADDRESS, // other CHECKLIST_CACHE_TTL: parseIntSafe(process.env.CHECKLIST_CACHE_TTL) || 3600, + SESSION_UPDATE_PERIOD: process.env.SESSION_UPDATE_PERIOD, _set(key, value) { process.env[key] = value module.exports[key] = value diff --git a/packages/worker/src/sdk/users/users.ts b/packages/worker/src/sdk/users/users.ts index e6b3f0a21d..58c2decabf 100644 --- a/packages/worker/src/sdk/users/users.ts +++ b/packages/worker/src/sdk/users/users.ts @@ -370,6 +370,7 @@ export const bulkDelete = async (userIds: any) => { export const destroy = async (id: string, currentUser: any) => { const db = tenancy.getGlobalDB() const dbUser = await db.get(id) + const userId = dbUser._id as string let groups = dbUser.userGroups if (!env.SELF_HOSTED && !env.DISABLE_ACCOUNT_PORTAL) { @@ -387,7 +388,7 @@ export const destroy = async (id: string, currentUser: any) => { await deprovisioning.removeUserFromInfoDB(dbUser) - await db.remove(dbUser._id, dbUser._rev) + await db.remove(userId, dbUser._rev) if (groups) { await groupUtils.deleteGroupUsers(groups, dbUser) @@ -395,17 +396,18 @@ export const destroy = async (id: string, currentUser: any) => { await eventHelpers.handleDeleteEvents(dbUser) await quotas.removeUser(dbUser) - await cache.user.invalidateUser(dbUser._id) - await sessions.invalidateSessions(dbUser._id) + await cache.user.invalidateUser(userId) + await sessions.invalidateSessions(userId, { reason: "deletion" }) // let server know to sync user - await apps.syncUserInApps(dbUser._id) + await apps.syncUserInApps(userId) } const bulkDeleteProcessing = async (dbUser: User) => { + const userId = dbUser._id as string await deprovisioning.removeUserFromInfoDB(dbUser) await eventHelpers.handleDeleteEvents(dbUser) - await cache.user.invalidateUser(dbUser._id) - await sessions.invalidateSessions(dbUser._id) + await cache.user.invalidateUser(userId) + await sessions.invalidateSessions(userId, { reason: "bulk-deletion" }) // let server know to sync user - await apps.syncUserInApps(dbUser._id) + await apps.syncUserInApps(userId) } From c94d916050dae90f81ef5b545970056d7839df63 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Fri, 5 Aug 2022 17:41:55 +0100 Subject: [PATCH 172/320] Add seperate rate limiting config for webhooks + environment variable support --- hosting/docker-compose.yaml | 4 +++- hosting/nginx.prod.conf.hbs | 23 +++++++++++++++++++++++ hosting/proxy/Dockerfile | 14 ++++++++++++-- 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/hosting/docker-compose.yaml b/hosting/docker-compose.yaml index f669f9261d..5281155545 100644 --- a/hosting/docker-compose.yaml +++ b/hosting/docker-compose.yaml @@ -75,7 +75,9 @@ services: ports: - "${MAIN_PORT}:10000" container_name: bbproxy - image: budibase/proxy + image: proxy-service + environment: + - PROXY_RATE_LIMIT_WEBHOOKS_PER_SECOND=10 depends_on: - minio-service - worker-service diff --git a/hosting/nginx.prod.conf.hbs b/hosting/nginx.prod.conf.hbs index ac35a2020d..4213626309 100644 --- a/hosting/nginx.prod.conf.hbs +++ b/hosting/nginx.prod.conf.hbs @@ -9,7 +9,11 @@ events { } http { + # rate limiting + limit_req_status 429; limit_req_zone $binary_remote_addr zone=ratelimit:10m rate=20r/s; + limit_req_zone $binary_remote_addr zone=webhooks:10m rate=${PROXY_RATE_LIMIT_WEBHOOKS_PER_SECOND}r/s; + include /etc/nginx/mime.types; default_type application/octet-stream; proxy_set_header Host $host; @@ -126,6 +130,25 @@ http { proxy_pass http://$apps:4002; } + location /api/webhooks/ { + # calls to webhooks are rate limited + limit_req zone=webhooks nodelay; + + # Rest of configuration copied from /api/ location above + # 120s timeout on API requests + proxy_read_timeout 120s; + proxy_connect_timeout 120s; + proxy_send_timeout 120s; + + proxy_http_version 1.1; + proxy_set_header Connection $connection_upgrade; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + proxy_pass http://$apps:4002; + } + location /db/ { proxy_pass http://$couchdb:5984; rewrite ^/db/(.*)$ /$1 break; diff --git a/hosting/proxy/Dockerfile b/hosting/proxy/Dockerfile index a2b17d3333..d9b33e3e9a 100644 --- a/hosting/proxy/Dockerfile +++ b/hosting/proxy/Dockerfile @@ -1,3 +1,13 @@ FROM nginx:latest -COPY .generated-nginx.prod.conf /etc/nginx/nginx.conf -COPY error.html /usr/share/nginx/html/error.html \ No newline at end of file + +# nginx.conf +# use the default nginx behaviour for *.template files which are processed with envsubst +# 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 + +# Error handling +COPY error.html /usr/share/nginx/html/error.html + +# Default environment +ENV PROXY_RATE_LIMIT_WEBHOOKS_PER_SECOND=10 \ No newline at end of file From b40a3ff5a45fcc1d3c1c62a88525b5e5d9b99d72 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Fri, 5 Aug 2022 16:45:30 +0000 Subject: [PATCH 173/320] v1.2.15 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lerna.json b/lerna.json index 8ce0e0c314..c785ec1257 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.2.14", + "version": "1.2.15", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 6081d5b8e6..be74358881 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.2.14", + "version": "1.2.15", "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.14", + "@budibase/types": "^1.2.15", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", "bcrypt": "5.0.1", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 342e65583d..b0b280c3df 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.14", + "version": "1.2.15", "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.14", + "@budibase/string-templates": "^1.2.15", "@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 a5f1e5ecd6..30f691264d 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.2.14", + "version": "1.2.15", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.2.14", - "@budibase/client": "^1.2.14", - "@budibase/frontend-core": "^1.2.14", - "@budibase/string-templates": "^1.2.14", + "@budibase/bbui": "^1.2.15", + "@budibase/client": "^1.2.15", + "@budibase/frontend-core": "^1.2.15", + "@budibase/string-templates": "^1.2.15", "@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 b94d8ef4fb..b59e50039c 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.2.14", + "version": "1.2.15", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index 4e2daac226..b749dfbc3b 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.2.14", + "version": "1.2.15", "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.14", - "@budibase/frontend-core": "^1.2.14", - "@budibase/string-templates": "^1.2.14", + "@budibase/bbui": "^1.2.15", + "@budibase/frontend-core": "^1.2.15", + "@budibase/string-templates": "^1.2.15", "@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 3d8e52cf74..7882d0edf9 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.2.14", + "version": "1.2.15", "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.14", + "@budibase/bbui": "^1.2.15", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 9052ea132e..b481b472bb 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.14", + "version": "1.2.15", "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.14", - "@budibase/client": "^1.2.14", + "@budibase/backend-core": "^1.2.15", + "@budibase/client": "^1.2.15", "@budibase/pro": "1.2.14", - "@budibase/string-templates": "^1.2.14", - "@budibase/types": "^1.2.14", + "@budibase/string-templates": "^1.2.15", + "@budibase/types": "^1.2.15", "@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 5d859902b5..081c731975 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.2.14", + "version": "1.2.15", "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 c62ed636d1..8c7e14866a 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.2.14", + "version": "1.2.15", "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 70afd899e8..7d86bea820 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.14", + "version": "1.2.15", "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.14", + "@budibase/backend-core": "^1.2.15", "@budibase/pro": "1.2.14", - "@budibase/string-templates": "^1.2.14", - "@budibase/types": "^1.2.14", + "@budibase/string-templates": "^1.2.15", + "@budibase/types": "^1.2.15", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 54d57e9b065e942f320248df2d1d7cd7020f1981 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Fri, 5 Aug 2022 16:48:53 +0000 Subject: [PATCH 174/320] Update pro version to 1.2.15 --- 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 b481b472bb..2167fca297 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "^1.2.15", "@budibase/client": "^1.2.15", - "@budibase/pro": "1.2.14", + "@budibase/pro": "1.2.15", "@budibase/string-templates": "^1.2.15", "@budibase/types": "^1.2.15", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 2d7a376ab1..9969370e24 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.14": - version "1.2.14" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.14.tgz#1aca6a82b8ac28f5c101721ba4596f674eb57197" - integrity sha512-870ZzNX13/f1U7qkUJUoKp/e8UQqDHEc0TZBBaWcpLXbEBs6ikxGp5YdYGEVXkr/ca4rusfHs6jAjUNkIPThow== +"@budibase/backend-core@1.2.15": + version "1.2.15" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.15.tgz#d9884b5a4309bd2530323291e98ede5acae62de1" + integrity sha512-LoQhZIgptPwcB7DCbQiIRRBYaQiLYUqB4qGJj3C/SVyZV4ONOiJ8QTfHEtWMaxv5bXKJF+wALbKXOoNeWGF9Ow== dependencies: - "@budibase/types" "^1.2.14" + "@budibase/types" "^1.2.15" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -1177,13 +1177,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.2.14": - version "1.2.14" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.14.tgz#bce72c8a0d48dbec8dc6aa4af47abb9dbfd3d029" - integrity sha512-nYyVHO1IaoDRFSrLp0ueKWG0/Z+PSRs3yF+OZ7vQaECCXXSgWnZyCOy9o6iIovUlbimbPxrQvkwcL8v4deWuvQ== +"@budibase/pro@1.2.15": + version "1.2.15" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.15.tgz#88fd20dc502b9cbfef544cb66a05f57a7256ef92" + integrity sha512-mzaYKzQmLuyq1lzjfktvxKn0FOVmKx+AM62JaI6SxuPsvsFqJ9SdGpD2XUOZ+b8sdezHJxCEd9KyAryik8fSOA== dependencies: - "@budibase/backend-core" "1.2.14" - "@budibase/types" "1.2.14" + "@budibase/backend-core" "1.2.15" + "@budibase/types" "1.2.15" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1206,10 +1206,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.2.14", "@budibase/types@^1.2.14": - version "1.2.14" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.14.tgz#8ef2d1b526661629dd9db2f10fea515fadfdcc53" - integrity sha512-E3k1kJz24W0l1aw1cL2Edf7WnO6Nt6iew4stDpuQjG2r1EcXPv6/hPsRA7Ms0331ZjGKEswaddSyF5NTn1O8VQ== +"@budibase/types@1.2.15", "@budibase/types@^1.2.15": + version "1.2.15" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.15.tgz#99e66d14f1cab8e5403f98e0dd097d1030ed8d5d" + integrity sha512-8WbponGlP0E0/mQh27GnWhY5jdR36kQ/rUzK1km4/ZZju7E88lM20DQE4yuUnTf2xbBihTR2gpAQpiOTPCI+7Q== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 7d86bea820..1af5eabedf 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -36,7 +36,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "^1.2.15", - "@budibase/pro": "1.2.14", + "@budibase/pro": "1.2.15", "@budibase/string-templates": "^1.2.15", "@budibase/types": "^1.2.15", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index e03cbaf580..45d16eebaa 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.14": - version "1.2.14" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.14.tgz#1aca6a82b8ac28f5c101721ba4596f674eb57197" - integrity sha512-870ZzNX13/f1U7qkUJUoKp/e8UQqDHEc0TZBBaWcpLXbEBs6ikxGp5YdYGEVXkr/ca4rusfHs6jAjUNkIPThow== +"@budibase/backend-core@1.2.15": + version "1.2.15" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.15.tgz#d9884b5a4309bd2530323291e98ede5acae62de1" + integrity sha512-LoQhZIgptPwcB7DCbQiIRRBYaQiLYUqB4qGJj3C/SVyZV4ONOiJ8QTfHEtWMaxv5bXKJF+wALbKXOoNeWGF9Ow== dependencies: - "@budibase/types" "^1.2.14" + "@budibase/types" "^1.2.15" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -324,21 +324,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.2.14": - version "1.2.14" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.14.tgz#bce72c8a0d48dbec8dc6aa4af47abb9dbfd3d029" - integrity sha512-nYyVHO1IaoDRFSrLp0ueKWG0/Z+PSRs3yF+OZ7vQaECCXXSgWnZyCOy9o6iIovUlbimbPxrQvkwcL8v4deWuvQ== +"@budibase/pro@1.2.15": + version "1.2.15" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.15.tgz#88fd20dc502b9cbfef544cb66a05f57a7256ef92" + integrity sha512-mzaYKzQmLuyq1lzjfktvxKn0FOVmKx+AM62JaI6SxuPsvsFqJ9SdGpD2XUOZ+b8sdezHJxCEd9KyAryik8fSOA== dependencies: - "@budibase/backend-core" "1.2.14" - "@budibase/types" "1.2.14" + "@budibase/backend-core" "1.2.15" + "@budibase/types" "1.2.15" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.2.14", "@budibase/types@^1.2.14": - version "1.2.14" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.14.tgz#8ef2d1b526661629dd9db2f10fea515fadfdcc53" - integrity sha512-E3k1kJz24W0l1aw1cL2Edf7WnO6Nt6iew4stDpuQjG2r1EcXPv6/hPsRA7Ms0331ZjGKEswaddSyF5NTn1O8VQ== +"@budibase/types@1.2.15", "@budibase/types@^1.2.15": + version "1.2.15" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.15.tgz#99e66d14f1cab8e5403f98e0dd097d1030ed8d5d" + integrity sha512-8WbponGlP0E0/mQh27GnWhY5jdR36kQ/rUzK1km4/ZZju7E88lM20DQE4yuUnTf2xbBihTR2gpAQpiOTPCI+7Q== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From 2dea5c56149ad8fbc3edf451902e53d35a62f097 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 5 Aug 2022 21:35:26 +0100 Subject: [PATCH 175/320] Some various session fixes based on current data. --- .../src/middleware/authenticated.ts | 71 +++++++++---------- .../backend-core/src/security/sessions.ts | 21 +++--- .../src/utilities/rowProcessor/index.js | 2 +- 3 files changed, 42 insertions(+), 52 deletions(-) diff --git a/packages/backend-core/src/middleware/authenticated.ts b/packages/backend-core/src/middleware/authenticated.ts index 7280eba294..3406b00812 100644 --- a/packages/backend-core/src/middleware/authenticated.ts +++ b/packages/backend-core/src/middleware/authenticated.ts @@ -84,45 +84,40 @@ module.exports = ( // check the actual user is authenticated first, try header or cookie const headerToken = ctx.request.headers[Headers.TOKEN] const authCookie = getCookie(ctx, Cookies.Auth) || openJwt(headerToken) - let authenticated = false, - user = null, - internal = false, - error = null - if (authCookie) { - const sessionId = authCookie.sessionId - const userId = authCookie.userId - - const session = await getSession(userId, sessionId) - if (!session) { - error = `Session not found - ${userId} - ${sessionId}` - } else { - try { - if (opts && opts.populateUser) { - user = await getUser( - userId, - session.tenantId, - opts.populateUser(ctx) - ) - } else { - user = await getUser(userId, session.tenantId) - } - user.csrfToken = session.csrfToken - authenticated = true - } catch (err) { - error = err - } - } - if (error) { - console.error("Auth Error", error) - // remove the cookie as the user does not exist anymore - clearCookie(ctx, Cookies.Auth) - } else if (session?.lastAccessedAt < timeMinusOneMinute()) { - // make sure we denote that the session is still in use - await updateSessionTTL(session) - } - } const apiKey = ctx.request.headers[Headers.API_KEY] const tenantId = ctx.request.headers[Headers.TENANT_ID] + let authenticated = false, + user = null, + internal = false + if (authCookie && !apiKey) { + const sessionId = authCookie.sessionId + const userId = authCookie.userId + let session + try { + // getting session handles error checking (if session exists etc) + session = await getSession(userId, sessionId) + if (opts && opts.populateUser) { + user = await getUser( + userId, + session.tenantId, + opts.populateUser(ctx) + ) + } else { + user = await getUser(userId, session.tenantId) + } + user.csrfToken = session.csrfToken + if (session?.lastAccessedAt < timeMinusOneMinute()) { + // make sure we denote that the session is still in use + await updateSessionTTL(session) + } + authenticated = true + } catch (err: any) { + authenticated = false + console.error("Auth Error", err?.message || err) + // remove the cookie as the user does not exist anymore + clearCookie(ctx, Cookies.Auth) + } + } // this is an internal request, no user made it if (!authenticated && apiKey) { const populateUser = opts.populateUser ? opts.populateUser(ctx) : null @@ -144,7 +139,7 @@ module.exports = ( delete user.password } // be explicit - if (error || authenticated !== true) { + if (authenticated !== true) { authenticated = false } // isAuthenticated is a function, so use a variable to be able to check authed state diff --git a/packages/backend-core/src/security/sessions.ts b/packages/backend-core/src/security/sessions.ts index f8375f510b..39d24ee16a 100644 --- a/packages/backend-core/src/security/sessions.ts +++ b/packages/backend-core/src/security/sessions.ts @@ -38,7 +38,7 @@ export async function invalidateSessions( let sessions: SessionKey // If no sessionIds, get all the sessions for the user - if (!sessionIds) { + if (sessionIds.length === 0) { sessions = await getSessionsForUser(userId) sessions.forEach( (session: any) => @@ -103,18 +103,13 @@ export async function endSession(userId: string, sessionId: string) { } export async function getSession(userId: string, sessionId: string) { - try { - const client = await redis.getSessionClient() - return client.get(makeSessionID(userId, sessionId)) - } catch (err) { - // if can't get session don't error, just don't return anything - console.error(err) - return null + if (!userId || !sessionId) { + throw new Error(`Invalid session details - ${userId} - ${sessionId}`) } -} - -export async function getAllSessions() { const client = await redis.getSessionClient() - const sessions = await client.scan() - return sessions.map((session: Session) => session.value) + const session = await client.get(makeSessionID(userId, sessionId)) + if (!session) { + throw new Error(`Session not found - ${userId} - ${sessionId}`) + } + return session } diff --git a/packages/server/src/utilities/rowProcessor/index.js b/packages/server/src/utilities/rowProcessor/index.js index 36a02eb9b1..e4c364eaf3 100644 --- a/packages/server/src/utilities/rowProcessor/index.js +++ b/packages/server/src/utilities/rowProcessor/index.js @@ -278,7 +278,7 @@ exports.outputProcessing = async (table, rows, opts = { squash: true }) => { for (let [property, column] of Object.entries(table.schema)) { if (column.type === FieldTypes.ATTACHMENT) { for (let row of enriched) { - if (row[property] == null || row[property].length === 0) { + if (row[property] == null || !Array.isArray(row[property])) { continue } row[property].forEach(attachment => { From ca59b500f12624ddd179422a182e43b9ac6fb03d Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Fri, 5 Aug 2022 21:22:22 +0000 Subject: [PATCH 176/320] v1.2.16 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lerna.json b/lerna.json index c785ec1257..9401e4ab71 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.2.15", + "version": "1.2.16", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index be74358881..64ae5619cc 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.2.15", + "version": "1.2.16", "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.15", + "@budibase/types": "^1.2.16", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", "bcrypt": "5.0.1", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index b0b280c3df..1a62ff6893 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.15", + "version": "1.2.16", "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.15", + "@budibase/string-templates": "^1.2.16", "@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 30f691264d..81104013bb 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.2.15", + "version": "1.2.16", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.2.15", - "@budibase/client": "^1.2.15", - "@budibase/frontend-core": "^1.2.15", - "@budibase/string-templates": "^1.2.15", + "@budibase/bbui": "^1.2.16", + "@budibase/client": "^1.2.16", + "@budibase/frontend-core": "^1.2.16", + "@budibase/string-templates": "^1.2.16", "@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 b59e50039c..a43242496c 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.2.15", + "version": "1.2.16", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index b749dfbc3b..4d47950162 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.2.15", + "version": "1.2.16", "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.15", - "@budibase/frontend-core": "^1.2.15", - "@budibase/string-templates": "^1.2.15", + "@budibase/bbui": "^1.2.16", + "@budibase/frontend-core": "^1.2.16", + "@budibase/string-templates": "^1.2.16", "@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 7882d0edf9..54bde5eeb3 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.2.15", + "version": "1.2.16", "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.15", + "@budibase/bbui": "^1.2.16", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 2167fca297..71d41e55f7 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.15", + "version": "1.2.16", "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.15", - "@budibase/client": "^1.2.15", + "@budibase/backend-core": "^1.2.16", + "@budibase/client": "^1.2.16", "@budibase/pro": "1.2.15", - "@budibase/string-templates": "^1.2.15", - "@budibase/types": "^1.2.15", + "@budibase/string-templates": "^1.2.16", + "@budibase/types": "^1.2.16", "@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 081c731975..b4c0f4bd3c 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.2.15", + "version": "1.2.16", "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 8c7e14866a..b50394c5a9 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.2.15", + "version": "1.2.16", "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 1af5eabedf..0e33eddf01 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.15", + "version": "1.2.16", "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.15", + "@budibase/backend-core": "^1.2.16", "@budibase/pro": "1.2.15", - "@budibase/string-templates": "^1.2.15", - "@budibase/types": "^1.2.15", + "@budibase/string-templates": "^1.2.16", + "@budibase/types": "^1.2.16", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 8c364cd5c423dcf88a7e41a3e1cd72e783922a16 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Fri, 5 Aug 2022 21:25:20 +0000 Subject: [PATCH 177/320] Update pro version to 1.2.16 --- 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 71d41e55f7..a7da5fd458 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "^1.2.16", "@budibase/client": "^1.2.16", - "@budibase/pro": "1.2.15", + "@budibase/pro": "1.2.16", "@budibase/string-templates": "^1.2.16", "@budibase/types": "^1.2.16", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 9969370e24..e51fbe7b46 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.15": - version "1.2.15" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.15.tgz#d9884b5a4309bd2530323291e98ede5acae62de1" - integrity sha512-LoQhZIgptPwcB7DCbQiIRRBYaQiLYUqB4qGJj3C/SVyZV4ONOiJ8QTfHEtWMaxv5bXKJF+wALbKXOoNeWGF9Ow== +"@budibase/backend-core@1.2.16": + version "1.2.16" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.16.tgz#5edbc234b7636e3bb7f65339809c32dc5dbbe303" + integrity sha512-0tt5zy3Z+zTp1jSrGV2c6b1b3cqx5GAUyuQNVdJA5MIEMI1T3utHK78Dg689/OAzZtBWGpWXbOfZN1wrcfYu9w== dependencies: - "@budibase/types" "^1.2.15" + "@budibase/types" "^1.2.16" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -1177,13 +1177,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.2.15": - version "1.2.15" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.15.tgz#88fd20dc502b9cbfef544cb66a05f57a7256ef92" - integrity sha512-mzaYKzQmLuyq1lzjfktvxKn0FOVmKx+AM62JaI6SxuPsvsFqJ9SdGpD2XUOZ+b8sdezHJxCEd9KyAryik8fSOA== +"@budibase/pro@1.2.16": + version "1.2.16" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.16.tgz#2d57e51d5b6e167e076495dcfc01ee5a33d7588c" + integrity sha512-a7bTLfHrGYIRqIoDStNezdk28y/UwHZitRQRvaF1Hz4Vt9rIi8Fh3pQ+o52S7VAqqZJfAOZLkR+zbj64Ar+u4Q== dependencies: - "@budibase/backend-core" "1.2.15" - "@budibase/types" "1.2.15" + "@budibase/backend-core" "1.2.16" + "@budibase/types" "1.2.16" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1206,10 +1206,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.2.15", "@budibase/types@^1.2.15": - version "1.2.15" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.15.tgz#99e66d14f1cab8e5403f98e0dd097d1030ed8d5d" - integrity sha512-8WbponGlP0E0/mQh27GnWhY5jdR36kQ/rUzK1km4/ZZju7E88lM20DQE4yuUnTf2xbBihTR2gpAQpiOTPCI+7Q== +"@budibase/types@1.2.16", "@budibase/types@^1.2.16": + version "1.2.16" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.16.tgz#eaf367e786225572efb00091c804635e0aa8bc8b" + integrity sha512-9aswx9MfW0hCqNsMF6jBVqT199elOEAeFG+gyArsgyyjBrQzDK0iFMa4w6KrRLiA7Wta1wi2Jxq4dLW0HQK41A== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 0e33eddf01..8a02f104de 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -36,7 +36,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "^1.2.16", - "@budibase/pro": "1.2.15", + "@budibase/pro": "1.2.16", "@budibase/string-templates": "^1.2.16", "@budibase/types": "^1.2.16", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 45d16eebaa..c756d67883 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.15": - version "1.2.15" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.15.tgz#d9884b5a4309bd2530323291e98ede5acae62de1" - integrity sha512-LoQhZIgptPwcB7DCbQiIRRBYaQiLYUqB4qGJj3C/SVyZV4ONOiJ8QTfHEtWMaxv5bXKJF+wALbKXOoNeWGF9Ow== +"@budibase/backend-core@1.2.16": + version "1.2.16" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.16.tgz#5edbc234b7636e3bb7f65339809c32dc5dbbe303" + integrity sha512-0tt5zy3Z+zTp1jSrGV2c6b1b3cqx5GAUyuQNVdJA5MIEMI1T3utHK78Dg689/OAzZtBWGpWXbOfZN1wrcfYu9w== dependencies: - "@budibase/types" "^1.2.15" + "@budibase/types" "^1.2.16" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -324,21 +324,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.2.15": - version "1.2.15" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.15.tgz#88fd20dc502b9cbfef544cb66a05f57a7256ef92" - integrity sha512-mzaYKzQmLuyq1lzjfktvxKn0FOVmKx+AM62JaI6SxuPsvsFqJ9SdGpD2XUOZ+b8sdezHJxCEd9KyAryik8fSOA== +"@budibase/pro@1.2.16": + version "1.2.16" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.16.tgz#2d57e51d5b6e167e076495dcfc01ee5a33d7588c" + integrity sha512-a7bTLfHrGYIRqIoDStNezdk28y/UwHZitRQRvaF1Hz4Vt9rIi8Fh3pQ+o52S7VAqqZJfAOZLkR+zbj64Ar+u4Q== dependencies: - "@budibase/backend-core" "1.2.15" - "@budibase/types" "1.2.15" + "@budibase/backend-core" "1.2.16" + "@budibase/types" "1.2.16" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.2.15", "@budibase/types@^1.2.15": - version "1.2.15" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.15.tgz#99e66d14f1cab8e5403f98e0dd097d1030ed8d5d" - integrity sha512-8WbponGlP0E0/mQh27GnWhY5jdR36kQ/rUzK1km4/ZZju7E88lM20DQE4yuUnTf2xbBihTR2gpAQpiOTPCI+7Q== +"@budibase/types@1.2.16", "@budibase/types@^1.2.16": + version "1.2.16" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.16.tgz#eaf367e786225572efb00091c804635e0aa8bc8b" + integrity sha512-9aswx9MfW0hCqNsMF6jBVqT199elOEAeFG+gyArsgyyjBrQzDK0iFMa4w6KrRLiA7Wta1wi2Jxq4dLW0HQK41A== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From 4743181157122f2f740f02aea9748b0c62f6f7bf Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Sat, 6 Aug 2022 19:29:21 +0000 Subject: [PATCH 178/320] v1.2.17 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lerna.json b/lerna.json index 9401e4ab71..1d903be061 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.2.16", + "version": "1.2.17", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 64ae5619cc..8695363cac 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.2.16", + "version": "1.2.17", "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.16", + "@budibase/types": "^1.2.17", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", "bcrypt": "5.0.1", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 1a62ff6893..0b3d9e3d22 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.16", + "version": "1.2.17", "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.16", + "@budibase/string-templates": "^1.2.17", "@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 81104013bb..00cd837cdd 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.2.16", + "version": "1.2.17", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.2.16", - "@budibase/client": "^1.2.16", - "@budibase/frontend-core": "^1.2.16", - "@budibase/string-templates": "^1.2.16", + "@budibase/bbui": "^1.2.17", + "@budibase/client": "^1.2.17", + "@budibase/frontend-core": "^1.2.17", + "@budibase/string-templates": "^1.2.17", "@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 a43242496c..5b530ab22c 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.2.16", + "version": "1.2.17", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index 4d47950162..39c8d6e0be 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.2.16", + "version": "1.2.17", "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.16", - "@budibase/frontend-core": "^1.2.16", - "@budibase/string-templates": "^1.2.16", + "@budibase/bbui": "^1.2.17", + "@budibase/frontend-core": "^1.2.17", + "@budibase/string-templates": "^1.2.17", "@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 54bde5eeb3..d3522b0da7 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.2.16", + "version": "1.2.17", "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.16", + "@budibase/bbui": "^1.2.17", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index a7da5fd458..f2f8952936 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.16", + "version": "1.2.17", "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.16", - "@budibase/client": "^1.2.16", + "@budibase/backend-core": "^1.2.17", + "@budibase/client": "^1.2.17", "@budibase/pro": "1.2.16", - "@budibase/string-templates": "^1.2.16", - "@budibase/types": "^1.2.16", + "@budibase/string-templates": "^1.2.17", + "@budibase/types": "^1.2.17", "@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 b4c0f4bd3c..eeb9c2aab5 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.2.16", + "version": "1.2.17", "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 b50394c5a9..ea5ab8c897 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.2.16", + "version": "1.2.17", "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 8a02f104de..3812fdf9c8 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.16", + "version": "1.2.17", "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.16", + "@budibase/backend-core": "^1.2.17", "@budibase/pro": "1.2.16", - "@budibase/string-templates": "^1.2.16", - "@budibase/types": "^1.2.16", + "@budibase/string-templates": "^1.2.17", + "@budibase/types": "^1.2.17", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From eef00b62bc28981fee759d3acc3100b95df16766 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Sat, 6 Aug 2022 19:32:22 +0000 Subject: [PATCH 179/320] Update pro version to 1.2.17 --- 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 f2f8952936..c7d14254bb 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "^1.2.17", "@budibase/client": "^1.2.17", - "@budibase/pro": "1.2.16", + "@budibase/pro": "1.2.17", "@budibase/string-templates": "^1.2.17", "@budibase/types": "^1.2.17", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index e51fbe7b46..cd67c70206 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.16": - version "1.2.16" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.16.tgz#5edbc234b7636e3bb7f65339809c32dc5dbbe303" - integrity sha512-0tt5zy3Z+zTp1jSrGV2c6b1b3cqx5GAUyuQNVdJA5MIEMI1T3utHK78Dg689/OAzZtBWGpWXbOfZN1wrcfYu9w== +"@budibase/backend-core@1.2.17": + version "1.2.17" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.17.tgz#9025a5063b35a43ee35332bbf91474cbf3c296ed" + integrity sha512-PaUwBdI5PydAMkpfq7pgnWcPwaV01sDPLZooplr7fmOnOCHg5yDKkpo/n6n8FT2T0YeL1oPfStKtPkx+J4w8Jg== dependencies: - "@budibase/types" "^1.2.16" + "@budibase/types" "^1.2.17" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -1177,13 +1177,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.2.16": - version "1.2.16" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.16.tgz#2d57e51d5b6e167e076495dcfc01ee5a33d7588c" - integrity sha512-a7bTLfHrGYIRqIoDStNezdk28y/UwHZitRQRvaF1Hz4Vt9rIi8Fh3pQ+o52S7VAqqZJfAOZLkR+zbj64Ar+u4Q== +"@budibase/pro@1.2.17": + version "1.2.17" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.17.tgz#14fe3e7fe7af77094285d2183cda6a7fb55c3d21" + integrity sha512-Sa9f8QCL8sa8mJ8SCJkPAE2RNLQ7T6A3gun0aKe2eI6qZHtdvB0Av6e+vYfl/GruZh/JUoCh5rkn+Q08e9jPig== dependencies: - "@budibase/backend-core" "1.2.16" - "@budibase/types" "1.2.16" + "@budibase/backend-core" "1.2.17" + "@budibase/types" "1.2.17" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1206,10 +1206,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.2.16", "@budibase/types@^1.2.16": - version "1.2.16" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.16.tgz#eaf367e786225572efb00091c804635e0aa8bc8b" - integrity sha512-9aswx9MfW0hCqNsMF6jBVqT199elOEAeFG+gyArsgyyjBrQzDK0iFMa4w6KrRLiA7Wta1wi2Jxq4dLW0HQK41A== +"@budibase/types@1.2.17", "@budibase/types@^1.2.17": + version "1.2.17" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.17.tgz#b1c48827341f4a4088abb726f07c5a5aab21c0d7" + integrity sha512-qSeNn2eNDiuQP1hHXr6I97M7HKrXdzAsN2lmS6jED/PT7D5/G/vaecG+ZoWfuWoxiS9cm4DZTdyXg/ry+GqQUA== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 3812fdf9c8..c0ca7e2f92 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -36,7 +36,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "^1.2.17", - "@budibase/pro": "1.2.16", + "@budibase/pro": "1.2.17", "@budibase/string-templates": "^1.2.17", "@budibase/types": "^1.2.17", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index c756d67883..0a73dfe88d 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.16": - version "1.2.16" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.16.tgz#5edbc234b7636e3bb7f65339809c32dc5dbbe303" - integrity sha512-0tt5zy3Z+zTp1jSrGV2c6b1b3cqx5GAUyuQNVdJA5MIEMI1T3utHK78Dg689/OAzZtBWGpWXbOfZN1wrcfYu9w== +"@budibase/backend-core@1.2.17": + version "1.2.17" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.17.tgz#9025a5063b35a43ee35332bbf91474cbf3c296ed" + integrity sha512-PaUwBdI5PydAMkpfq7pgnWcPwaV01sDPLZooplr7fmOnOCHg5yDKkpo/n6n8FT2T0YeL1oPfStKtPkx+J4w8Jg== dependencies: - "@budibase/types" "^1.2.16" + "@budibase/types" "^1.2.17" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -324,21 +324,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.2.16": - version "1.2.16" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.16.tgz#2d57e51d5b6e167e076495dcfc01ee5a33d7588c" - integrity sha512-a7bTLfHrGYIRqIoDStNezdk28y/UwHZitRQRvaF1Hz4Vt9rIi8Fh3pQ+o52S7VAqqZJfAOZLkR+zbj64Ar+u4Q== +"@budibase/pro@1.2.17": + version "1.2.17" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.17.tgz#14fe3e7fe7af77094285d2183cda6a7fb55c3d21" + integrity sha512-Sa9f8QCL8sa8mJ8SCJkPAE2RNLQ7T6A3gun0aKe2eI6qZHtdvB0Av6e+vYfl/GruZh/JUoCh5rkn+Q08e9jPig== dependencies: - "@budibase/backend-core" "1.2.16" - "@budibase/types" "1.2.16" + "@budibase/backend-core" "1.2.17" + "@budibase/types" "1.2.17" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.2.16", "@budibase/types@^1.2.16": - version "1.2.16" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.16.tgz#eaf367e786225572efb00091c804635e0aa8bc8b" - integrity sha512-9aswx9MfW0hCqNsMF6jBVqT199elOEAeFG+gyArsgyyjBrQzDK0iFMa4w6KrRLiA7Wta1wi2Jxq4dLW0HQK41A== +"@budibase/types@1.2.17", "@budibase/types@^1.2.17": + version "1.2.17" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.17.tgz#b1c48827341f4a4088abb726f07c5a5aab21c0d7" + integrity sha512-qSeNn2eNDiuQP1hHXr6I97M7HKrXdzAsN2lmS6jED/PT7D5/G/vaecG+ZoWfuWoxiS9cm4DZTdyXg/ry+GqQUA== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From fe17ffffb69748d3c47ded0a21cdd2aaa7124fc9 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Mon, 8 Aug 2022 09:34:45 +0100 Subject: [PATCH 180/320] Bulk session wipe fix + logging --- packages/backend-core/src/security/sessions.ts | 4 ++++ .../backend-core/src/security/tests/sessions.spec.ts | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 packages/backend-core/src/security/tests/sessions.spec.ts diff --git a/packages/backend-core/src/security/sessions.ts b/packages/backend-core/src/security/sessions.ts index 39d24ee16a..284adbcd1f 100644 --- a/packages/backend-core/src/security/sessions.ts +++ b/packages/backend-core/src/security/sessions.ts @@ -23,6 +23,10 @@ function makeSessionID(userId: string, sessionId: string) { } export async function getSessionsForUser(userId: string) { + if (!userId) { + console.trace("Cannot get sessions for undefined userId") + return [] + } const client = await redis.getSessionClient() const sessions = await client.scan(userId) return sessions.map((session: Session) => session.value) diff --git a/packages/backend-core/src/security/tests/sessions.spec.ts b/packages/backend-core/src/security/tests/sessions.spec.ts new file mode 100644 index 0000000000..7f01bdcdb7 --- /dev/null +++ b/packages/backend-core/src/security/tests/sessions.spec.ts @@ -0,0 +1,12 @@ +import * as sessions from "../sessions" + +describe("sessions", () => { + describe("getSessionsForUser", () => { + it("returns empty when user is undefined", async () => { + // @ts-ignore - allow the undefined to be passed + const results = await sessions.getSessionsForUser(undefined) + + expect(results).toStrictEqual([]) + }) + }) +}) From bf155b69e2192fc6125f6199cd84446e0bbad4e9 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Mon, 8 Aug 2022 09:10:52 +0000 Subject: [PATCH 181/320] v1.2.18 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lerna.json b/lerna.json index 1d903be061..ad9ad1a5f1 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.2.17", + "version": "1.2.18", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 8695363cac..6896545333 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.2.17", + "version": "1.2.18", "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.17", + "@budibase/types": "^1.2.18", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", "bcrypt": "5.0.1", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 0b3d9e3d22..1dee96bc46 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.17", + "version": "1.2.18", "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.17", + "@budibase/string-templates": "^1.2.18", "@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 00cd837cdd..a842647ac6 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.2.17", + "version": "1.2.18", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.2.17", - "@budibase/client": "^1.2.17", - "@budibase/frontend-core": "^1.2.17", - "@budibase/string-templates": "^1.2.17", + "@budibase/bbui": "^1.2.18", + "@budibase/client": "^1.2.18", + "@budibase/frontend-core": "^1.2.18", + "@budibase/string-templates": "^1.2.18", "@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 5b530ab22c..81a28b0c8a 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.2.17", + "version": "1.2.18", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index 39c8d6e0be..cd73e0d59d 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.2.17", + "version": "1.2.18", "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.17", - "@budibase/frontend-core": "^1.2.17", - "@budibase/string-templates": "^1.2.17", + "@budibase/bbui": "^1.2.18", + "@budibase/frontend-core": "^1.2.18", + "@budibase/string-templates": "^1.2.18", "@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 d3522b0da7..47261b8558 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.2.17", + "version": "1.2.18", "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.17", + "@budibase/bbui": "^1.2.18", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index c7d14254bb..3dbb0d883a 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.17", + "version": "1.2.18", "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.17", - "@budibase/client": "^1.2.17", + "@budibase/backend-core": "^1.2.18", + "@budibase/client": "^1.2.18", "@budibase/pro": "1.2.17", - "@budibase/string-templates": "^1.2.17", - "@budibase/types": "^1.2.17", + "@budibase/string-templates": "^1.2.18", + "@budibase/types": "^1.2.18", "@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 eeb9c2aab5..0116fbe224 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.2.17", + "version": "1.2.18", "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 ea5ab8c897..3c2dce9d33 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.2.17", + "version": "1.2.18", "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 c0ca7e2f92..8c6fe0f2ec 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.17", + "version": "1.2.18", "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.17", + "@budibase/backend-core": "^1.2.18", "@budibase/pro": "1.2.17", - "@budibase/string-templates": "^1.2.17", - "@budibase/types": "^1.2.17", + "@budibase/string-templates": "^1.2.18", + "@budibase/types": "^1.2.18", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From d976bbbdebe52b0db1fcc4ef61c36b085cc27a68 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Mon, 8 Aug 2022 09:13:47 +0000 Subject: [PATCH 182/320] Update pro version to 1.2.18 --- 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 3dbb0d883a..076e29669c 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "^1.2.18", "@budibase/client": "^1.2.18", - "@budibase/pro": "1.2.17", + "@budibase/pro": "1.2.18", "@budibase/string-templates": "^1.2.18", "@budibase/types": "^1.2.18", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index cd67c70206..ba52c2a353 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.17": - version "1.2.17" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.17.tgz#9025a5063b35a43ee35332bbf91474cbf3c296ed" - integrity sha512-PaUwBdI5PydAMkpfq7pgnWcPwaV01sDPLZooplr7fmOnOCHg5yDKkpo/n6n8FT2T0YeL1oPfStKtPkx+J4w8Jg== +"@budibase/backend-core@1.2.18": + version "1.2.18" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.18.tgz#0cda91e4d156511177fb5be81580bf9cf42a2716" + integrity sha512-TQ3wz15zCUxGpmYvWo7QfAdWjpgYfxoDuxT7lGZB/OhjFGCgeCPOTRAuo0M5WrdnLZ0cGczwRssWVtUKWSwOGA== dependencies: - "@budibase/types" "^1.2.17" + "@budibase/types" "^1.2.18" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -1177,13 +1177,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.2.17": - version "1.2.17" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.17.tgz#14fe3e7fe7af77094285d2183cda6a7fb55c3d21" - integrity sha512-Sa9f8QCL8sa8mJ8SCJkPAE2RNLQ7T6A3gun0aKe2eI6qZHtdvB0Av6e+vYfl/GruZh/JUoCh5rkn+Q08e9jPig== +"@budibase/pro@1.2.18": + version "1.2.18" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.18.tgz#94fd973a5d206bf49faf27990b82c0e21f833b17" + integrity sha512-NwL73UonzxHzqVkD9Zp/w6NohI+kRhzTk3RFtwf1A10v7quypSaE824xke0TyTxxxeM2+jfYPcmh6UFprOsdpw== dependencies: - "@budibase/backend-core" "1.2.17" - "@budibase/types" "1.2.17" + "@budibase/backend-core" "1.2.18" + "@budibase/types" "1.2.18" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1206,10 +1206,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.2.17", "@budibase/types@^1.2.17": - version "1.2.17" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.17.tgz#b1c48827341f4a4088abb726f07c5a5aab21c0d7" - integrity sha512-qSeNn2eNDiuQP1hHXr6I97M7HKrXdzAsN2lmS6jED/PT7D5/G/vaecG+ZoWfuWoxiS9cm4DZTdyXg/ry+GqQUA== +"@budibase/types@1.2.18", "@budibase/types@^1.2.18": + version "1.2.18" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.18.tgz#2ff46464ee99fb7ff506c23b970f7dcddf1affdd" + integrity sha512-cSF7zr0k74rCbeif5+2o4UOG+CIvuvSxwnbP8DCuLsBWuQdi8KUFgqAXxilC0xEfiJl91xWMaop61YhBFTniTw== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 8c6fe0f2ec..5593c8fff5 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -36,7 +36,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "^1.2.18", - "@budibase/pro": "1.2.17", + "@budibase/pro": "1.2.18", "@budibase/string-templates": "^1.2.18", "@budibase/types": "^1.2.18", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 0a73dfe88d..e64a7f03d8 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.17": - version "1.2.17" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.17.tgz#9025a5063b35a43ee35332bbf91474cbf3c296ed" - integrity sha512-PaUwBdI5PydAMkpfq7pgnWcPwaV01sDPLZooplr7fmOnOCHg5yDKkpo/n6n8FT2T0YeL1oPfStKtPkx+J4w8Jg== +"@budibase/backend-core@1.2.18": + version "1.2.18" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.18.tgz#0cda91e4d156511177fb5be81580bf9cf42a2716" + integrity sha512-TQ3wz15zCUxGpmYvWo7QfAdWjpgYfxoDuxT7lGZB/OhjFGCgeCPOTRAuo0M5WrdnLZ0cGczwRssWVtUKWSwOGA== dependencies: - "@budibase/types" "^1.2.17" + "@budibase/types" "^1.2.18" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -324,21 +324,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.2.17": - version "1.2.17" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.17.tgz#14fe3e7fe7af77094285d2183cda6a7fb55c3d21" - integrity sha512-Sa9f8QCL8sa8mJ8SCJkPAE2RNLQ7T6A3gun0aKe2eI6qZHtdvB0Av6e+vYfl/GruZh/JUoCh5rkn+Q08e9jPig== +"@budibase/pro@1.2.18": + version "1.2.18" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.18.tgz#94fd973a5d206bf49faf27990b82c0e21f833b17" + integrity sha512-NwL73UonzxHzqVkD9Zp/w6NohI+kRhzTk3RFtwf1A10v7quypSaE824xke0TyTxxxeM2+jfYPcmh6UFprOsdpw== dependencies: - "@budibase/backend-core" "1.2.17" - "@budibase/types" "1.2.17" + "@budibase/backend-core" "1.2.18" + "@budibase/types" "1.2.18" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.2.17", "@budibase/types@^1.2.17": - version "1.2.17" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.17.tgz#b1c48827341f4a4088abb726f07c5a5aab21c0d7" - integrity sha512-qSeNn2eNDiuQP1hHXr6I97M7HKrXdzAsN2lmS6jED/PT7D5/G/vaecG+ZoWfuWoxiS9cm4DZTdyXg/ry+GqQUA== +"@budibase/types@1.2.18", "@budibase/types@^1.2.18": + version "1.2.18" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.18.tgz#2ff46464ee99fb7ff506c23b970f7dcddf1affdd" + integrity sha512-cSF7zr0k74rCbeif5+2o4UOG+CIvuvSxwnbP8DCuLsBWuQdi8KUFgqAXxilC0xEfiJl91xWMaop61YhBFTniTw== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From de0e8b3d1e50125a89edb54ef66f5903581d1418 Mon Sep 17 00:00:00 2001 From: Dean Date: Mon, 8 Aug 2022 10:33:39 +0100 Subject: [PATCH 183/320] Walked back previous change. Ensured filtering of global bindings surfaces appropriate values. Filtering logic separated for global and local dynamic variables. --- .../rest/[query]/index.svelte | 31 ++++++++++++++----- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte index 8ecd88243e..b0a93f8eec 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte @@ -55,13 +55,16 @@ let saveId, url let response, schema, enabledHeaders let authConfigId - let dynamicVariables, addVariableModal, varBinding + let dynamicVariables, addVariableModal, varBinding, globalDynamicBindings let restBindings = getRestBindings() $: staticVariables = datasource?.config?.staticVariables || {} $: customRequestBindings = toBindingsArray(requestBindings, "Binding") - $: dynamicRequestBindings = toBindingsArray(dynamicVariables, "Dynamic") + $: globalDynamicRequestBindings = toBindingsArray( + globalDynamicBindings, + "Dynamic" + ) $: dataSourceStaticBindings = toBindingsArray( staticVariables, "Datasource.Static" @@ -70,7 +73,7 @@ $: mergedBindings = [ ...restBindings, ...customRequestBindings, - ...dynamicRequestBindings, + ...globalDynamicRequestBindings, ...dataSourceStaticBindings, ] @@ -231,10 +234,13 @@ ] // convert dynamic variables list to simple key/val object - const getDynamicVariables = datasource => { + const getDynamicVariables = (datasource, queryId, matchFn) => { const variablesList = datasource?.config?.dynamicVariables if (variablesList && variablesList.length > 0) { - return variablesList.reduce( + const filtered = queryId + ? variablesList.filter(variable => matchFn(variable, queryId)) + : variablesList + return filtered.reduce( (acc, next) => ({ ...acc, [next.name]: next.value }), {} ) @@ -364,12 +370,21 @@ if (query && !query.fields.pagination) { query.fields.pagination = {} } - dynamicVariables = getDynamicVariables(datasource) + dynamicVariables = getDynamicVariables( + datasource, + query._id, + (variable, queryId) => variable.queryId === queryId + ) + globalDynamicBindings = getDynamicVariables( + datasource, + query._id, + (variable, queryId) => variable.queryId !== queryId + ) prettifyQueryRequestBody( query, requestBindings, - dynamicVariables, + globalDynamicBindings, staticVariables, restBindings ) @@ -434,7 +449,7 @@ valuePlaceholder="Default" bindings={[ ...restBindings, - ...dynamicRequestBindings, + ...globalDynamicRequestBindings, ...dataSourceStaticBindings, ]} bindingDrawerLeft="260px" From cc9bc937b6e7107b6419c04efda44ac755e9b3e8 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Tue, 2 Aug 2022 10:52:09 +0100 Subject: [PATCH 184/320] Reduce event frequency --- .../src/events/processors/PosthogProcessor.ts | 21 ++++++++++ .../processors/tests/PosthogProcessor.spec.ts | 40 +++++++++++++++++++ .../src/events/publishers/license.ts | 6 --- .../tests/utilities/mocks/index.js | 2 + .../tests/utilities/mocks/posthog.ts | 7 ++++ .../builder/src/analytics/PosthogClient.js | 10 ++++- packages/builder/src/stores/portal/auth.js | 5 +++ packages/types/src/sdk/events/event.ts | 1 - 8 files changed, 84 insertions(+), 8 deletions(-) create mode 100644 packages/backend-core/src/events/processors/tests/PosthogProcessor.spec.ts create mode 100644 packages/backend-core/tests/utilities/mocks/posthog.ts diff --git a/packages/backend-core/src/events/processors/PosthogProcessor.ts b/packages/backend-core/src/events/processors/PosthogProcessor.ts index eb12db1dc4..9d68d3919a 100644 --- a/packages/backend-core/src/events/processors/PosthogProcessor.ts +++ b/packages/backend-core/src/events/processors/PosthogProcessor.ts @@ -5,6 +5,22 @@ import env from "../../environment" import * as context from "../../context" const pkg = require("../../../package.json") +const EXCLUDED_EVENTS: Event[] = [ + Event.USER_UPDATED, + Event.EMAIL_SMTP_UPDATED, + Event.AUTH_SSO_UPDATED, + Event.APP_UPDATED, + Event.ROLE_UPDATED, + Event.DATASOURCE_UPDATED, + Event.QUERY_UPDATED, + Event.TABLE_UPDATED, + Event.VIEW_UPDATED, + Event.VIEW_FILTER_UPDATED, + Event.VIEW_CALCULATION_UPDATED, + Event.AUTOMATION_TRIGGER_UPDATED, + Event.USER_GROUP_UPDATED, +] + export default class PosthogProcessor implements EventProcessor { posthog: PostHog @@ -21,6 +37,11 @@ export default class PosthogProcessor implements EventProcessor { properties: BaseEvent, timestamp?: string | number ): Promise { + // don't send excluded events + if (EXCLUDED_EVENTS.includes(event)) { + return + } + properties.version = pkg.version properties.service = env.SERVICE properties.environment = identity.environment diff --git a/packages/backend-core/src/events/processors/tests/PosthogProcessor.spec.ts b/packages/backend-core/src/events/processors/tests/PosthogProcessor.spec.ts new file mode 100644 index 0000000000..4a6d55b272 --- /dev/null +++ b/packages/backend-core/src/events/processors/tests/PosthogProcessor.spec.ts @@ -0,0 +1,40 @@ +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/backend-core/src/events/publishers/license.ts b/packages/backend-core/src/events/publishers/license.ts index 44dafd84ce..1adc71652e 100644 --- a/packages/backend-core/src/events/publishers/license.ts +++ b/packages/backend-core/src/events/publishers/license.ts @@ -20,12 +20,6 @@ export async function downgraded(license: License) { await publishEvent(Event.LICENSE_DOWNGRADED, properties) } -// TODO -export async function updated(license: License) { - const properties: LicenseUpdatedEvent = {} - await publishEvent(Event.LICENSE_UPDATED, properties) -} - // TODO export async function activated(license: License) { const properties: LicenseActivatedEvent = {} diff --git a/packages/backend-core/tests/utilities/mocks/index.js b/packages/backend-core/tests/utilities/mocks/index.js index 3dd5c854c0..6aa1c4a54f 100644 --- a/packages/backend-core/tests/utilities/mocks/index.js +++ b/packages/backend-core/tests/utilities/mocks/index.js @@ -1,7 +1,9 @@ +const posthog = require("./posthog") const events = require("./events") const date = require("./date") module.exports = { + posthog, date, events, } diff --git a/packages/backend-core/tests/utilities/mocks/posthog.ts b/packages/backend-core/tests/utilities/mocks/posthog.ts new file mode 100644 index 0000000000..e9cc653ccc --- /dev/null +++ b/packages/backend-core/tests/utilities/mocks/posthog.ts @@ -0,0 +1,7 @@ +jest.mock("posthog-node", () => { + return jest.fn().mockImplementation(() => { + return { + capture: jest.fn(), + } + }) +}) diff --git a/packages/builder/src/analytics/PosthogClient.js b/packages/builder/src/analytics/PosthogClient.js index 0b9f052906..c1e596358f 100644 --- a/packages/builder/src/analytics/PosthogClient.js +++ b/packages/builder/src/analytics/PosthogClient.js @@ -1,5 +1,7 @@ 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) { @@ -9,9 +11,15 @@ 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: true, + capture_pageview: capturePageViews, }) posthog.set_config({ persistence: "cookie" }) diff --git a/packages/builder/src/stores/portal/auth.js b/packages/builder/src/stores/portal/auth.js index 8ac19ab785..9d2d9cf42e 100644 --- a/packages/builder/src/stores/portal/auth.js +++ b/packages/builder/src/stores/portal/auth.js @@ -139,6 +139,11 @@ 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/types/src/sdk/events/event.ts b/packages/types/src/sdk/events/event.ts index f0e023df51..d7086370ec 100644 --- a/packages/types/src/sdk/events/event.ts +++ b/packages/types/src/sdk/events/event.ts @@ -135,7 +135,6 @@ export enum Event { // LICENSE LICENSE_UPGRADED = "license:upgraded", LICENSE_DOWNGRADED = "license:downgraded", - LICENSE_UPDATED = "license:updated", LICENSE_ACTIVATED = "license:activated", // ACCOUNT From a94576add8d7fa8a54337fc4150f68d8747fdefc Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Mon, 8 Aug 2022 09:59:51 +0000 Subject: [PATCH 185/320] v1.2.19 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lerna.json b/lerna.json index ad9ad1a5f1..e079a0faee 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.2.18", + "version": "1.2.19", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 6896545333..b4ab38387e 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.2.18", + "version": "1.2.19", "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.18", + "@budibase/types": "^1.2.19", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", "bcrypt": "5.0.1", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 1dee96bc46..3ae887a4f8 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.18", + "version": "1.2.19", "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.18", + "@budibase/string-templates": "^1.2.19", "@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 a842647ac6..a0ab10f029 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.2.18", + "version": "1.2.19", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.2.18", - "@budibase/client": "^1.2.18", - "@budibase/frontend-core": "^1.2.18", - "@budibase/string-templates": "^1.2.18", + "@budibase/bbui": "^1.2.19", + "@budibase/client": "^1.2.19", + "@budibase/frontend-core": "^1.2.19", + "@budibase/string-templates": "^1.2.19", "@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 81a28b0c8a..6971439315 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.2.18", + "version": "1.2.19", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index cd73e0d59d..8aad954c28 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.2.18", + "version": "1.2.19", "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.18", - "@budibase/frontend-core": "^1.2.18", - "@budibase/string-templates": "^1.2.18", + "@budibase/bbui": "^1.2.19", + "@budibase/frontend-core": "^1.2.19", + "@budibase/string-templates": "^1.2.19", "@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 47261b8558..8b76bfae50 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.2.18", + "version": "1.2.19", "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.18", + "@budibase/bbui": "^1.2.19", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 076e29669c..121ccebf64 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.18", + "version": "1.2.19", "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.18", - "@budibase/client": "^1.2.18", + "@budibase/backend-core": "^1.2.19", + "@budibase/client": "^1.2.19", "@budibase/pro": "1.2.18", - "@budibase/string-templates": "^1.2.18", - "@budibase/types": "^1.2.18", + "@budibase/string-templates": "^1.2.19", + "@budibase/types": "^1.2.19", "@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 0116fbe224..674f922f02 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.2.18", + "version": "1.2.19", "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 3c2dce9d33..145329204c 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.2.18", + "version": "1.2.19", "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 5593c8fff5..7080c3aff6 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.18", + "version": "1.2.19", "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.18", + "@budibase/backend-core": "^1.2.19", "@budibase/pro": "1.2.18", - "@budibase/string-templates": "^1.2.18", - "@budibase/types": "^1.2.18", + "@budibase/string-templates": "^1.2.19", + "@budibase/types": "^1.2.19", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From a0288f0c2e824a445e4289f129faa32d7c868a16 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Mon, 8 Aug 2022 10:02:59 +0000 Subject: [PATCH 186/320] Update pro version to 1.2.19 --- 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 121ccebf64..964f6bf285 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "^1.2.19", "@budibase/client": "^1.2.19", - "@budibase/pro": "1.2.18", + "@budibase/pro": "1.2.19", "@budibase/string-templates": "^1.2.19", "@budibase/types": "^1.2.19", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index ba52c2a353..f933f54373 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.18": - version "1.2.18" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.18.tgz#0cda91e4d156511177fb5be81580bf9cf42a2716" - integrity sha512-TQ3wz15zCUxGpmYvWo7QfAdWjpgYfxoDuxT7lGZB/OhjFGCgeCPOTRAuo0M5WrdnLZ0cGczwRssWVtUKWSwOGA== +"@budibase/backend-core@1.2.19": + version "1.2.19" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.19.tgz#8606f41eb02530ff84cc1cd1e3580dd952879103" + integrity sha512-WN1y7NDWhUWzwl4ek+8XejEncZckmYheWqWod1l0JI93apiRfhMfxxPxW1/9Hi473Ofd5LG5qZbFuu8BfZGSVQ== dependencies: - "@budibase/types" "^1.2.18" + "@budibase/types" "^1.2.19" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -1177,13 +1177,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.2.18": - version "1.2.18" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.18.tgz#94fd973a5d206bf49faf27990b82c0e21f833b17" - integrity sha512-NwL73UonzxHzqVkD9Zp/w6NohI+kRhzTk3RFtwf1A10v7quypSaE824xke0TyTxxxeM2+jfYPcmh6UFprOsdpw== +"@budibase/pro@1.2.19": + version "1.2.19" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.19.tgz#bfe9305e7dabe3ed239ad494838ba1fa7b4da37b" + integrity sha512-bdD/Y+zpeFe06bBxg6c2fX0C5xm4vwn3BLUelovLBr9CTyrkGEr40NkoEAligWkHZ5awSTiVhHaFkzFceJkjVQ== dependencies: - "@budibase/backend-core" "1.2.18" - "@budibase/types" "1.2.18" + "@budibase/backend-core" "1.2.19" + "@budibase/types" "1.2.19" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1206,10 +1206,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.2.18", "@budibase/types@^1.2.18": - version "1.2.18" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.18.tgz#2ff46464ee99fb7ff506c23b970f7dcddf1affdd" - integrity sha512-cSF7zr0k74rCbeif5+2o4UOG+CIvuvSxwnbP8DCuLsBWuQdi8KUFgqAXxilC0xEfiJl91xWMaop61YhBFTniTw== +"@budibase/types@1.2.19", "@budibase/types@^1.2.19": + version "1.2.19" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.19.tgz#f2dade0f25f4fa55c3a7a99b3195f655db6c9cf5" + integrity sha512-+FKv29hJ3FXldmihdfn8omfEVp2WsB7nm7gbZPJs7mD+yP+AYGnuZinCYJ8PcX1CjoIgzcYE27OOQuxy+9cDmQ== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 7080c3aff6..6305ebcbbd 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -36,7 +36,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "^1.2.19", - "@budibase/pro": "1.2.18", + "@budibase/pro": "1.2.19", "@budibase/string-templates": "^1.2.19", "@budibase/types": "^1.2.19", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index e64a7f03d8..53eed9581e 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.18": - version "1.2.18" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.18.tgz#0cda91e4d156511177fb5be81580bf9cf42a2716" - integrity sha512-TQ3wz15zCUxGpmYvWo7QfAdWjpgYfxoDuxT7lGZB/OhjFGCgeCPOTRAuo0M5WrdnLZ0cGczwRssWVtUKWSwOGA== +"@budibase/backend-core@1.2.19": + version "1.2.19" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.19.tgz#8606f41eb02530ff84cc1cd1e3580dd952879103" + integrity sha512-WN1y7NDWhUWzwl4ek+8XejEncZckmYheWqWod1l0JI93apiRfhMfxxPxW1/9Hi473Ofd5LG5qZbFuu8BfZGSVQ== dependencies: - "@budibase/types" "^1.2.18" + "@budibase/types" "^1.2.19" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -324,21 +324,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.2.18": - version "1.2.18" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.18.tgz#94fd973a5d206bf49faf27990b82c0e21f833b17" - integrity sha512-NwL73UonzxHzqVkD9Zp/w6NohI+kRhzTk3RFtwf1A10v7quypSaE824xke0TyTxxxeM2+jfYPcmh6UFprOsdpw== +"@budibase/pro@1.2.19": + version "1.2.19" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.19.tgz#bfe9305e7dabe3ed239ad494838ba1fa7b4da37b" + integrity sha512-bdD/Y+zpeFe06bBxg6c2fX0C5xm4vwn3BLUelovLBr9CTyrkGEr40NkoEAligWkHZ5awSTiVhHaFkzFceJkjVQ== dependencies: - "@budibase/backend-core" "1.2.18" - "@budibase/types" "1.2.18" + "@budibase/backend-core" "1.2.19" + "@budibase/types" "1.2.19" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.2.18", "@budibase/types@^1.2.18": - version "1.2.18" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.18.tgz#2ff46464ee99fb7ff506c23b970f7dcddf1affdd" - integrity sha512-cSF7zr0k74rCbeif5+2o4UOG+CIvuvSxwnbP8DCuLsBWuQdi8KUFgqAXxilC0xEfiJl91xWMaop61YhBFTniTw== +"@budibase/types@1.2.19", "@budibase/types@^1.2.19": + version "1.2.19" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.19.tgz#f2dade0f25f4fa55c3a7a99b3195f655db6c9cf5" + integrity sha512-+FKv29hJ3FXldmihdfn8omfEVp2WsB7nm7gbZPJs7mD+yP+AYGnuZinCYJ8PcX1CjoIgzcYE27OOQuxy+9cDmQ== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From 40b22019ea60339520af1c148a0cbe2c3c9af391 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Mon, 8 Aug 2022 11:51:38 +0100 Subject: [PATCH 187/320] Disable posthog in release env --- .github/workflows/release-develop.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-develop.yml b/.github/workflows/release-develop.yml index 631308d945..772fcf933d 100644 --- a/.github/workflows/release-develop.yml +++ b/.github/workflows/release-develop.yml @@ -18,8 +18,9 @@ on: workflow_dispatch: env: - # Posthog token used by ui at build time - POSTHOG_TOKEN: phc_uDYOfnFt6wAbBAXkC6STjcrTpAFiWIhqgFcsC1UVO5F + # Posthog token used by ui at build time + # disable unless needed for testing + # POSTHOG_TOKEN: phc_uDYOfnFt6wAbBAXkC6STjcrTpAFiWIhqgFcsC1UVO5F INTERCOM_TOKEN: ${{ secrets.INTERCOM_TOKEN }} PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} FEATURE_PREVIEW_URL: https://budirelease.live From c62de92556b5c39ddde9c6a7efdd8b00f70ea4a7 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 8 Aug 2022 11:01:32 +0000 Subject: [PATCH 188/320] v1.2.20-alpha.0 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lerna.json b/lerna.json index e079a0faee..08b9563a98 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.2.19", + "version": "1.2.20-alpha.0", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index afbf39160e..4949c050e7 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.2.19", + "version": "1.2.20-alpha.0", "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.19", + "@budibase/types": "1.2.20-alpha.0", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", "bcrypt": "5.0.1", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 3ae887a4f8..f619b69d99 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.19", + "version": "1.2.20-alpha.0", "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.19", + "@budibase/string-templates": "1.2.20-alpha.0", "@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 a0ab10f029..6a07b41bb8 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.2.19", + "version": "1.2.20-alpha.0", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.2.19", - "@budibase/client": "^1.2.19", - "@budibase/frontend-core": "^1.2.19", - "@budibase/string-templates": "^1.2.19", + "@budibase/bbui": "1.2.20-alpha.0", + "@budibase/client": "1.2.20-alpha.0", + "@budibase/frontend-core": "1.2.20-alpha.0", + "@budibase/string-templates": "1.2.20-alpha.0", "@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 6971439315..cf4dfc6f3c 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.2.19", + "version": "1.2.20-alpha.0", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index 8aad954c28..418d7267a3 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.2.19", + "version": "1.2.20-alpha.0", "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.19", - "@budibase/frontend-core": "^1.2.19", - "@budibase/string-templates": "^1.2.19", + "@budibase/bbui": "1.2.20-alpha.0", + "@budibase/frontend-core": "1.2.20-alpha.0", + "@budibase/string-templates": "1.2.20-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 8b76bfae50..39719d2d1b 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.2.19", + "version": "1.2.20-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": "^1.2.19", + "@budibase/bbui": "1.2.20-alpha.0", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 628658ad25..0f6af3a5f0 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.19", + "version": "1.2.20-alpha.0", "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.19", - "@budibase/client": "^1.2.19", + "@budibase/backend-core": "1.2.20-alpha.0", + "@budibase/client": "1.2.20-alpha.0", "@budibase/pro": "1.2.19", - "@budibase/string-templates": "^1.2.19", - "@budibase/types": "^1.2.19", + "@budibase/string-templates": "1.2.20-alpha.0", + "@budibase/types": "1.2.20-alpha.0", "@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 674f922f02..d2fb5d0be6 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.2.19", + "version": "1.2.20-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 145329204c..6916a0b8b8 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.2.19", + "version": "1.2.20-alpha.0", "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 6305ebcbbd..da7fe7131f 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.19", + "version": "1.2.20-alpha.0", "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.19", + "@budibase/backend-core": "1.2.20-alpha.0", "@budibase/pro": "1.2.19", - "@budibase/string-templates": "^1.2.19", - "@budibase/types": "^1.2.19", + "@budibase/string-templates": "1.2.20-alpha.0", + "@budibase/types": "1.2.20-alpha.0", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From d735e0abc6a4d7bfee1ab7f4bbee0759e24bbca8 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 8 Aug 2022 11:04:33 +0000 Subject: [PATCH 189/320] Update pro version to 1.2.20-alpha.0 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 31 ++++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 31 ++++++++++++++++--------------- 4 files changed, 34 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index 0f6af3a5f0..b891098c75 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "1.2.20-alpha.0", "@budibase/client": "1.2.20-alpha.0", - "@budibase/pro": "1.2.19", + "@budibase/pro": "1.2.20-alpha.0", "@budibase/string-templates": "1.2.20-alpha.0", "@budibase/types": "1.2.20-alpha.0", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 865fcd0df7..d4ed0b6ac8 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1094,18 +1094,19 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.2.19": - version "1.2.19" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.19.tgz#8606f41eb02530ff84cc1cd1e3580dd952879103" - integrity sha512-WN1y7NDWhUWzwl4ek+8XejEncZckmYheWqWod1l0JI93apiRfhMfxxPxW1/9Hi473Ofd5LG5qZbFuu8BfZGSVQ== +"@budibase/backend-core@1.2.20-alpha.0": + version "1.2.20-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.20-alpha.0.tgz#a7b660785f96a34bff214b505caad3a18a6fbc88" + integrity sha512-s0LwhDyfrmBwmwReNrkbmYu6s81FsWnt9qCvJsB3kQottCLVmo7yS+ruHa1CKoTLeJX6IIG4OxgkDqXFR107/A== dependencies: - "@budibase/types" "^1.2.19" + "@budibase/types" "1.2.20-alpha.0" "@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" @@ -1177,13 +1178,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.2.19": - version "1.2.19" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.19.tgz#bfe9305e7dabe3ed239ad494838ba1fa7b4da37b" - integrity sha512-bdD/Y+zpeFe06bBxg6c2fX0C5xm4vwn3BLUelovLBr9CTyrkGEr40NkoEAligWkHZ5awSTiVhHaFkzFceJkjVQ== +"@budibase/pro@1.2.20-alpha.0": + version "1.2.20-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.20-alpha.0.tgz#9fff53db95fee7ee26c38179915abc73e5b9b7a2" + integrity sha512-a3CmmHnZys5bdw4lODxd8x+sub1z9mVZMxQwi/QaaAYBtJT/yb9p/zic2OHIsybx9b6geyE6khC5zN1MZY7nKw== dependencies: - "@budibase/backend-core" "1.2.19" - "@budibase/types" "1.2.19" + "@budibase/backend-core" "1.2.20-alpha.0" + "@budibase/types" "1.2.20-alpha.0" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1206,10 +1207,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.2.19", "@budibase/types@^1.2.19": - version "1.2.19" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.19.tgz#f2dade0f25f4fa55c3a7a99b3195f655db6c9cf5" - integrity sha512-+FKv29hJ3FXldmihdfn8omfEVp2WsB7nm7gbZPJs7mD+yP+AYGnuZinCYJ8PcX1CjoIgzcYE27OOQuxy+9cDmQ== +"@budibase/types@1.2.20-alpha.0": + version "1.2.20-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.20-alpha.0.tgz#495482859a44eab065b9e5a670a984ad027caaa6" + integrity sha512-HmGXXpxj0cnJZlQ69B2TQ/+otBioVqHG/mYugvkYcqqPWSX3mKdgwXmj7RRZdhWjJY+QiSnTFw6O7HjjXuoCNQ== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index da7fe7131f..315724726c 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -36,7 +36,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "1.2.20-alpha.0", - "@budibase/pro": "1.2.19", + "@budibase/pro": "1.2.20-alpha.0", "@budibase/string-templates": "1.2.20-alpha.0", "@budibase/types": "1.2.20-alpha.0", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 53eed9581e..e8e796b1f9 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -291,18 +291,19 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.2.19": - version "1.2.19" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.19.tgz#8606f41eb02530ff84cc1cd1e3580dd952879103" - integrity sha512-WN1y7NDWhUWzwl4ek+8XejEncZckmYheWqWod1l0JI93apiRfhMfxxPxW1/9Hi473Ofd5LG5qZbFuu8BfZGSVQ== +"@budibase/backend-core@1.2.20-alpha.0": + version "1.2.20-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.20-alpha.0.tgz#a7b660785f96a34bff214b505caad3a18a6fbc88" + integrity sha512-s0LwhDyfrmBwmwReNrkbmYu6s81FsWnt9qCvJsB3kQottCLVmo7yS+ruHa1CKoTLeJX6IIG4OxgkDqXFR107/A== dependencies: - "@budibase/types" "^1.2.19" + "@budibase/types" "1.2.20-alpha.0" "@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" @@ -324,21 +325,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.2.19": - version "1.2.19" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.19.tgz#bfe9305e7dabe3ed239ad494838ba1fa7b4da37b" - integrity sha512-bdD/Y+zpeFe06bBxg6c2fX0C5xm4vwn3BLUelovLBr9CTyrkGEr40NkoEAligWkHZ5awSTiVhHaFkzFceJkjVQ== +"@budibase/pro@1.2.20-alpha.0": + version "1.2.20-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.20-alpha.0.tgz#9fff53db95fee7ee26c38179915abc73e5b9b7a2" + integrity sha512-a3CmmHnZys5bdw4lODxd8x+sub1z9mVZMxQwi/QaaAYBtJT/yb9p/zic2OHIsybx9b6geyE6khC5zN1MZY7nKw== dependencies: - "@budibase/backend-core" "1.2.19" - "@budibase/types" "1.2.19" + "@budibase/backend-core" "1.2.20-alpha.0" + "@budibase/types" "1.2.20-alpha.0" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.2.19", "@budibase/types@^1.2.19": - version "1.2.19" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.19.tgz#f2dade0f25f4fa55c3a7a99b3195f655db6c9cf5" - integrity sha512-+FKv29hJ3FXldmihdfn8omfEVp2WsB7nm7gbZPJs7mD+yP+AYGnuZinCYJ8PcX1CjoIgzcYE27OOQuxy+9cDmQ== +"@budibase/types@1.2.20-alpha.0": + version "1.2.20-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.20-alpha.0.tgz#495482859a44eab065b9e5a670a984ad027caaa6" + integrity sha512-HmGXXpxj0cnJZlQ69B2TQ/+otBioVqHG/mYugvkYcqqPWSX3mKdgwXmj7RRZdhWjJY+QiSnTFw6O7HjjXuoCNQ== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From 0b8e0309f6e86edde792a82321b0b07a75e71b84 Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Mon, 8 Aug 2022 12:12:56 +0100 Subject: [PATCH 190/320] filtering datasources for execute query actions --- .../ButtonActionEditor/actions/ExecuteQuery.svelte | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/ExecuteQuery.svelte b/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/ExecuteQuery.svelte index 462ee71cbe..042a55d761 100644 --- a/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/ExecuteQuery.svelte +++ b/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/ExecuteQuery.svelte @@ -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 @@