diff --git a/lerna.json b/lerna.json index 111a13702b..9a771b2983 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.4.18-alpha.1", + "version": "2.0.6", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 146e41e2e0..bd5a839edc 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.4.18-alpha.1", + "version": "2.0.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.4.18-alpha.1", + "@budibase/types": "^2.0.6", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/backend-core/src/db/conversions.js b/packages/backend-core/src/db/conversions.js index 90c04e9251..5b1a785ecc 100644 --- a/packages/backend-core/src/db/conversions.js +++ b/packages/backend-core/src/db/conversions.js @@ -36,6 +36,7 @@ exports.getDevelopmentAppID = appId => { const rest = split.join(APP_PREFIX) return `${APP_DEV_PREFIX}${rest}` } +exports.getDevAppID = exports.getDevelopmentAppID /** * Convert a development app ID to a deployed app ID. diff --git a/packages/bbui/package.json b/packages/bbui/package.json index b081f17943..6ebe70be0b 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.4.18-alpha.1", + "version": "2.0.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.4.18-alpha.1", + "@budibase/string-templates": "^2.0.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 6cfbdb9710..a7d9d7d264 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.4.18-alpha.1", + "version": "2.0.6", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "1.4.18-alpha.1", - "@budibase/client": "1.4.18-alpha.1", - "@budibase/frontend-core": "1.4.18-alpha.1", - "@budibase/string-templates": "1.4.18-alpha.1", + "@budibase/bbui": "^2.0.6", + "@budibase/client": "^2.0.6", + "@budibase/frontend-core": "^2.0.6", + "@budibase/string-templates": "^2.0.6", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/builder/src/components/common/bindings/BindingPanel.svelte b/packages/builder/src/components/common/bindings/BindingPanel.svelte index 3447106136..1a1714967d 100644 --- a/packages/builder/src/components/common/bindings/BindingPanel.svelte +++ b/packages/builder/src/components/common/bindings/BindingPanel.svelte @@ -43,7 +43,7 @@ let helpers = handlebarsCompletions() let getCaretPosition let search = "" - let initialValueJS = value?.startsWith("{{ js ") + let initialValueJS = typeof value === "string" && value?.startsWith("{{ js ") let mode = initialValueJS ? "JavaScript" : "Handlebars" let jsValue = initialValueJS ? value : null let hbsValue = initialValueJS ? null : value 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 6c59119169..a419f5ad46 100644 --- a/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte +++ b/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte @@ -20,6 +20,8 @@ import { createEventDispatcher, onMount } from "svelte" const dispatch = createEventDispatcher() + const { OperatorOptions } = Constants + const { getValidOperatorsForType } = LuceneUtils export let schemaFields export let filters = [] @@ -45,7 +47,7 @@ { id: generate(), field: null, - operator: Constants.OperatorOptions.Equals.value, + operator: OperatorOptions.Equals.value, value: null, valueType: "Value", }, @@ -66,49 +68,60 @@ return schemaFields.find(field => field.name === filter.field) } - const onFieldChange = (expression, field) => { - // Update the field types - expression.type = enrichedSchemaFields.find(x => x.name === field)?.type - expression.externalType = getSchema(expression)?.externalType + const santizeTypes = filter => { + // Update type based on field + const fieldSchema = enrichedSchemaFields.find(x => x.name === filter.field) + filter.type = fieldSchema?.type - // Ensure a valid operator is set - const validOperators = LuceneUtils.getValidOperatorsForType( - expression.type - ).map(x => x.value) - if (!validOperators.includes(expression.operator)) { - expression.operator = - validOperators[0] ?? Constants.OperatorOptions.Equals.value - onOperatorChange(expression, expression.operator) + // Update external type based on field + filter.externalType = getSchema(filter)?.externalType + } + + const santizeOperator = filter => { + // Ensure a valid operator is selected + const operators = getValidOperatorsForType(filter.type).map(x => x.value) + if (!operators.includes(filter.operator)) { + filter.operator = operators[0] ?? OperatorOptions.Equals.value } - // if changed to an array, change default value to empty array - const idx = filters.findIndex(x => x.id === expression.id) - if (expression.type === "array") { - filters[idx].value = [] - } else { - filters[idx].value = null + // Update the noValue flag if the operator does not take a value + const noValueOptions = [ + OperatorOptions.Empty.value, + OperatorOptions.NotEmpty.value, + ] + filter.noValue = noValueOptions.includes(filter.operator) + } + + const santizeValue = filter => { + // Check if the operator allows a value at all + if (filter.noValue) { + filter.value = null + return + } + + // Ensure array values are properly set and cleared + if (Array.isArray(filter.value)) { + if (filter.valueType !== "Value" || filter.type !== "array") { + filter.value = null + } + } else if (filter.type === "array" && filter.valueType === "Value") { + filter.value = [] } } - const onOperatorChange = (expression, operator) => { - const noValueOptions = [ - Constants.OperatorOptions.Empty.value, - Constants.OperatorOptions.NotEmpty.value, - ] - expression.noValue = noValueOptions.includes(operator) - if (expression.noValue) { - expression.value = null - } - if ( - operator === Constants.OperatorOptions.In.value && - !Array.isArray(expression.value) - ) { - if (expression.value) { - expression.value = [expression.value] - } else { - expression.value = [] - } - } + const onFieldChange = filter => { + santizeTypes(filter) + santizeOperator(filter) + santizeValue(filter) + } + + const onOperatorChange = filter => { + santizeOperator(filter) + santizeValue(filter) + } + + const onValueTypeChange = filter => { + santizeValue(filter) } const getFieldOptions = field => { @@ -153,23 +166,24 @@ onOperatorChange(filter, e.detail)} + on:change={() => onOperatorChange(filter)} placeholder={null} /> + {:else} + Select the role that all members of "{group.name}" will have for + "{selectedApp.name}" + + {/if} + diff --git a/packages/builder/src/pages/builder/portal/manage/groups/index.svelte b/packages/builder/src/pages/builder/portal/manage/groups/index.svelte index 558e9af8b7..b81918ba89 100644 --- a/packages/builder/src/pages/builder/portal/manage/groups/index.svelte +++ b/packages/builder/src/pages/builder/portal/manage/groups/index.svelte @@ -27,7 +27,6 @@ icon: "UserGroup", color: "var(--spectrum-global-color-blue-600)", users: [], - apps: [], roles: {}, } @@ -91,16 +90,14 @@ - User groups - {#if !$licensing.groupsEnabled} - -
-
- Pro plan -
-
-
- {/if} +
+ User groups + {#if !$licensing.groupsEnabled} + + Pro plan + + {/if} +
Easily assign and manage your users' access with user groups. {#if !$auth.accountPortalAccess && !$licensing.groupsEnabled && $admin.cloud} @@ -124,6 +121,7 @@ {:else} {/if} -
- -
+ {#if $licensing.groupsEnabled} +
+ +
+ {/if} - $goto(`./${detail._id}`)} - {schema} - data={filteredGroups} - allowEditColumns={false} - allowEditRows={false} - {customRenderers} - /> + {#if $licensing.groupsEnabled} +
$goto(`./${detail._id}`)} + {schema} + data={filteredGroups} + allowEditColumns={false} + allowEditRows={false} + {customRenderers} + /> + {/if} @@ -176,8 +178,11 @@ .controls-right :global(.spectrum-Search) { width: 200px; } - .tag { - margin-top: var(--spacing-xs); - margin-left: var(--spacing-m); + .title { + display: flex; + flex-direction: row; + align-items: center; + justify-content: flex-start; + gap: var(--spacing-m); } diff --git a/packages/builder/src/pages/builder/portal/manage/plugins/index.svelte b/packages/builder/src/pages/builder/portal/manage/plugins/index.svelte index b1f2480c28..84722c27be 100644 --- a/packages/builder/src/pages/builder/portal/manage/plugins/index.svelte +++ b/packages/builder/src/pages/builder/portal/manage/plugins/index.svelte @@ -55,18 +55,20 @@ Add plugin -
-
- +
+
- - + {/if} {#if filteredPlugins?.length} diff --git a/packages/builder/src/stores/backend/roles.js b/packages/builder/src/stores/backend/roles.js index 4d9ab303c9..ac395aa232 100644 --- a/packages/builder/src/stores/backend/roles.js +++ b/packages/builder/src/stores/backend/roles.js @@ -5,16 +5,24 @@ import { RoleUtils } from "@budibase/frontend-core" export function createRolesStore() { const { subscribe, update, set } = writable([]) + function setRoles(roles) { + set( + roles.sort((a, b) => { + const priorityA = RoleUtils.getRolePriority(a._id) + const priorityB = RoleUtils.getRolePriority(b._id) + return priorityA > priorityB ? -1 : 1 + }) + ) + } + const actions = { fetch: async () => { const roles = await API.getRoles() - set( - roles.sort((a, b) => { - const priorityA = RoleUtils.getRolePriority(a._id) - const priorityB = RoleUtils.getRolePriority(b._id) - return priorityA > priorityB ? -1 : 1 - }) - ) + setRoles(roles) + }, + fetchByAppId: async appId => { + const { roles } = await API.getRolesForApp(appId) + setRoles(roles) }, delete: async role => { await API.deleteRole({ diff --git a/packages/builder/src/stores/portal/apps.js b/packages/builder/src/stores/portal/apps.js index 41fdc232b7..a83e35e941 100644 --- a/packages/builder/src/stores/portal/apps.js +++ b/packages/builder/src/stores/portal/apps.js @@ -21,6 +21,8 @@ const getProdAppID = appId => { } else if (!appId.startsWith("app")) { rest = appId separator = "_" + } else { + return appId } return `app${separator}${rest}` } diff --git a/packages/cli/package.json b/packages/cli/package.json index fe5878e73e..1d42e01246 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.4.18-alpha.1", + "version": "2.0.6", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "1.4.18-alpha.1", - "@budibase/string-templates": "1.4.18-alpha.1", - "@budibase/types": "1.4.18-alpha.1", + "@budibase/backend-core": "^2.0.6", + "@budibase/string-templates": "^2.0.6", + "@budibase/types": "^2.0.6", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index 0d8c92a6cb..cfbb361dab 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.4.18-alpha.1", + "version": "2.0.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.4.18-alpha.1", - "@budibase/frontend-core": "1.4.18-alpha.1", - "@budibase/string-templates": "1.4.18-alpha.1", + "@budibase/bbui": "^2.0.6", + "@budibase/frontend-core": "^2.0.6", + "@budibase/string-templates": "^2.0.6", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", diff --git a/packages/client/src/components/ClientApp.svelte b/packages/client/src/components/ClientApp.svelte index c212fcf0f5..ab19e91038 100644 --- a/packages/client/src/components/ClientApp.svelte +++ b/packages/client/src/components/ClientApp.svelte @@ -16,6 +16,7 @@ themeStore, appStore, devToolsStore, + environmentStore, } from "stores" import NotificationDisplay from "components/overlay/NotificationDisplay.svelte" import ConfirmationDisplay from "components/overlay/ConfirmationDisplay.svelte" @@ -47,6 +48,8 @@ !$builderStore.inBuilder && $devToolsStore.enabled && !$routeStore.queryParams?.peek + $: objectStoreUrl = $environmentStore.cloud ? "https://cdn.budi.live" : "" + $: pluginsUrl = `${objectStoreUrl}/plugins` // Handle no matching route $: { @@ -92,7 +95,8 @@ {#if $builderStore.usedPlugins?.length} {#each $builderStore.usedPlugins as plugin (plugin.hash)} - + {/each} {/if} diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index f2d6741b75..b44f15137a 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.4.18-alpha.1", + "version": "2.0.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.4.18-alpha.1", + "@budibase/bbui": "^2.0.6", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/frontend-core/src/api/roles.js b/packages/frontend-core/src/api/roles.js index 15c27091c4..0b8a866a00 100644 --- a/packages/frontend-core/src/api/roles.js +++ b/packages/frontend-core/src/api/roles.js @@ -29,4 +29,13 @@ export const buildRoleEndpoints = API => ({ url: "/api/roles", }) }, + + /** + * Gets a list of roles within a specified app. + */ + getRolesForApp: async appId => { + return await API.get({ + url: `/api/global/roles/${appId}`, + }) + }, }) diff --git a/packages/frontend-core/src/constants.js b/packages/frontend-core/src/constants.js index 633534dddb..eb7a8849a5 100644 --- a/packages/frontend-core/src/constants.js +++ b/packages/frontend-core/src/constants.js @@ -40,7 +40,7 @@ export const OperatorOptions = { }, NotContains: { value: "notContains", - label: "Does Not Contain", + label: "Does not contain", }, In: { value: "oneOf", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 027d06d0ab..70fb754fff 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "1.4.18-alpha.1", + "version": "2.0.6", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index 5b33b111d1..38b37812c4 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "1.4.18-alpha.1", + "version": "2.0.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.4.18-alpha.1", - "@budibase/client": "1.4.18-alpha.1", - "@budibase/pro": "1.4.18-alpha.1", - "@budibase/string-templates": "1.4.18-alpha.1", - "@budibase/types": "1.4.18-alpha.1", + "@budibase/backend-core": "^2.0.6", + "@budibase/client": "^2.0.6", + "@budibase/pro": "2.0.6", + "@budibase/string-templates": "^2.0.6", + "@budibase/types": "^2.0.6", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 2e68a25ed0..305b715d55 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.4.18-alpha.1": - version "1.4.18-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.4.18-alpha.1.tgz#4222d3927d2a37bf7e505e17533c15fb0f134525" - integrity sha512-lYySQUPt8wuIXh3LRiUTlr81KHFLiJWa0piP1UDa5viqzxPRZ/UhvsrPFw+avJ7dZl2FR314PN2enO3q9/Az/A== +"@budibase/backend-core@2.0.6": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.6.tgz#1e80e5a06a53c294def350f10fcce3c224d73a84" + integrity sha512-BxBfFH/qW66MXatD1DSrefPp/dQxgY9hq+Z8hB8raOZfoL+fxIa0m/U8Ihqe5atYPXf9B4/RdjjQk+ioZ/Bjaw== dependencies: - "@budibase/types" "1.4.18-alpha.1" + "@budibase/types" "^2.0.6" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1180,13 +1180,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.4.18-alpha.1": - version "1.4.18-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.4.18-alpha.1.tgz#a00471e34d352f57e5bf56f2ae596ff6c1311021" - integrity sha512-UkE1hgMTzWOBa67czStcGyegZAlmf/TgyUjNB8OxeyzQ7jCjUHdVAijnMUMVCfAnq0gdewg+vAu2UFck0dNDGw== +"@budibase/pro@2.0.6": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.6.tgz#ac3d32e595c7649c1051c021347d1d8c7d870e0a" + integrity sha512-qvcalSJOEEE//cFazLuR8qrd12CBx6l/RIMKq9+KMXEA9ZyG7UfsCl3C2Yk6bgtW+ZkmmJabO9QjTTU81Ktn0A== dependencies: - "@budibase/backend-core" "1.4.18-alpha.1" - "@budibase/types" "1.4.18-alpha.1" + "@budibase/backend-core" "2.0.6" + "@budibase/types" "2.0.6" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1209,10 +1209,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.4.18-alpha.1": - version "1.4.18-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.4.18-alpha.1.tgz#aad43686afe861838f89e69ecf16ccee9e45f462" - integrity sha512-5fWImsg5cZomUSNs+DK0ZWH5pd4pzHk6x0mgHBcaL+CpzO+ROs/W1JWSVJ6uWYUi9ohy6G1FKB0+4/F5yUaOcw== +"@budibase/types@2.0.6", "@budibase/types@^2.0.6": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.6.tgz#03f294e4809c4044197a52325a7d1b55f40643a4" + integrity sha512-D2vQ+zSJqOpjCc7KdxnUtB4MucNC0OEsxcSp0uiIb+2Tv0dfRUUKl/IOrvXrkwqZ+uLDUMYYjKUQQcKxdBrnqA== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 3f06af47cc..a205959db2 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.4.18-alpha.1", + "version": "2.0.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 8a865fa369..7d6a2936ab 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.4.18-alpha.1", + "version": "2.0.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 854e602c85..9bf4319bd5 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "1.4.18-alpha.1", + "version": "2.0.6", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "1.4.18-alpha.1", - "@budibase/pro": "1.4.18-alpha.1", - "@budibase/string-templates": "1.4.18-alpha.1", - "@budibase/types": "1.4.18-alpha.1", + "@budibase/backend-core": "^2.0.6", + "@budibase/pro": "2.0.6", + "@budibase/string-templates": "^2.0.6", + "@budibase/types": "^2.0.6", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", diff --git a/packages/worker/src/api/controllers/global/roles.js b/packages/worker/src/api/controllers/global/roles.js index 800311b6be..d63f1a62b5 100644 --- a/packages/worker/src/api/controllers/global/roles.js +++ b/packages/worker/src/api/controllers/global/roles.js @@ -2,6 +2,7 @@ const { getAllRoles } = require("@budibase/backend-core/roles") const { getAllApps, getProdAppID, + getDevAppID, DocumentType, } = require("@budibase/backend-core/db") const { doInAppContext, getAppDB } = require("@budibase/backend-core/context") @@ -34,7 +35,7 @@ exports.fetch = async ctx => { exports.find = async ctx => { const appId = ctx.params.appId - await doInAppContext(appId, async () => { + await doInAppContext(getDevAppID(appId), async () => { const db = getAppDB() const app = await db.get(DocumentType.APP_METADATA) ctx.body = { diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index ad3d9a8123..5945f7b962 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.4.18-alpha.1": - version "1.4.18-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.4.18-alpha.1.tgz#4222d3927d2a37bf7e505e17533c15fb0f134525" - integrity sha512-lYySQUPt8wuIXh3LRiUTlr81KHFLiJWa0piP1UDa5viqzxPRZ/UhvsrPFw+avJ7dZl2FR314PN2enO3q9/Az/A== +"@budibase/backend-core@2.0.6": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.6.tgz#1e80e5a06a53c294def350f10fcce3c224d73a84" + integrity sha512-BxBfFH/qW66MXatD1DSrefPp/dQxgY9hq+Z8hB8raOZfoL+fxIa0m/U8Ihqe5atYPXf9B4/RdjjQk+ioZ/Bjaw== dependencies: - "@budibase/types" "1.4.18-alpha.1" + "@budibase/types" "^2.0.6" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -327,21 +327,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.4.18-alpha.1": - version "1.4.18-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.4.18-alpha.1.tgz#a00471e34d352f57e5bf56f2ae596ff6c1311021" - integrity sha512-UkE1hgMTzWOBa67czStcGyegZAlmf/TgyUjNB8OxeyzQ7jCjUHdVAijnMUMVCfAnq0gdewg+vAu2UFck0dNDGw== +"@budibase/pro@2.0.6": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.6.tgz#ac3d32e595c7649c1051c021347d1d8c7d870e0a" + integrity sha512-qvcalSJOEEE//cFazLuR8qrd12CBx6l/RIMKq9+KMXEA9ZyG7UfsCl3C2Yk6bgtW+ZkmmJabO9QjTTU81Ktn0A== dependencies: - "@budibase/backend-core" "1.4.18-alpha.1" - "@budibase/types" "1.4.18-alpha.1" + "@budibase/backend-core" "2.0.6" + "@budibase/types" "2.0.6" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.4.18-alpha.1": - version "1.4.18-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.4.18-alpha.1.tgz#aad43686afe861838f89e69ecf16ccee9e45f462" - integrity sha512-5fWImsg5cZomUSNs+DK0ZWH5pd4pzHk6x0mgHBcaL+CpzO+ROs/W1JWSVJ6uWYUi9ohy6G1FKB0+4/F5yUaOcw== +"@budibase/types@2.0.6", "@budibase/types@^2.0.6": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.6.tgz#03f294e4809c4044197a52325a7d1b55f40643a4" + integrity sha512-D2vQ+zSJqOpjCc7KdxnUtB4MucNC0OEsxcSp0uiIb+2Tv0dfRUUKl/IOrvXrkwqZ+uLDUMYYjKUQQcKxdBrnqA== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0"