Merge branch 'master' of github.com:Budibase/budibase into develop

This commit is contained in:
mike12345567 2022-09-29 10:23:53 +01:00
commit 0465e2605f
29 changed files with 285 additions and 162 deletions

View File

@ -1,5 +1,5 @@
{
"version": "1.4.18-alpha.1",
"version": "2.0.6",
"npmClient": "yarn",
"packages": [
"packages/*"

View File

@ -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",

View File

@ -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.

View File

@ -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",

View File

@ -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",

View File

@ -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

View File

@ -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
}
// 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
}
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
}
const onOperatorChange = (expression, operator) => {
// Update the noValue flag if the operator does not take a value
const noValueOptions = [
Constants.OperatorOptions.Empty.value,
Constants.OperatorOptions.NotEmpty.value,
OperatorOptions.Empty.value,
OperatorOptions.NotEmpty.value,
]
expression.noValue = noValueOptions.includes(operator)
if (expression.noValue) {
expression.value = null
filter.noValue = noValueOptions.includes(filter.operator)
}
if (
operator === Constants.OperatorOptions.In.value &&
!Array.isArray(expression.value)
) {
if (expression.value) {
expression.value = [expression.value]
} else {
expression.value = []
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 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 @@
<Select
bind:value={filter.field}
options={fieldOptions}
on:change={e => onFieldChange(filter, e.detail)}
on:change={() => onFieldChange(filter)}
placeholder="Column"
/>
<Select
disabled={!filter.field}
options={LuceneUtils.getValidOperatorsForType(filter.type)}
options={getValidOperatorsForType(filter.type)}
bind:value={filter.operator}
on:change={e => onOperatorChange(filter, e.detail)}
on:change={() => onOperatorChange(filter)}
placeholder={null}
/>
<Select
disabled={filter.noValue || !filter.field}
options={valueTypeOptions}
bind:value={filter.valueType}
on:change={() => onValueTypeChange(filter)}
placeholder={null}
/>
{#if filter.valueType === "Binding"}
{#if filter.field && filter.valueType === "Binding"}
<DrawerBindableInput
disabled={filter.noValue}
title={`Value for "${filter.field}"`}
@ -250,7 +264,7 @@
column-gap: var(--spacing-l);
row-gap: var(--spacing-s);
align-items: center;
grid-template-columns: 1fr 120px 120px 1fr auto auto;
grid-template-columns: 1fr 150px 120px 1fr 16px 16px;
}
.filter-label {

View File

@ -133,7 +133,7 @@
</Body>
</Layout>
<Divider />
{#if $licensing.usageMetrics.dayPasses >= 100}
{#if $licensing.usageMetrics?.dayPasses >= 100}
<div>
<Layout gap="S" justifyItems="center">
<img class="spaceman" alt="spaceman" src={Spaceman} />

View File

@ -56,7 +56,7 @@
{
title: "Plugins",
href: "/builder/portal/manage/plugins",
badge: "Beta",
badge: "New",
},
{

View File

@ -25,6 +25,7 @@
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
import CreateEditGroupModal from "./_components/CreateEditGroupModal.svelte"
import GroupIcon from "./_components/GroupIcon.svelte"
import AppAddModal from "./_components/AppAddModal.svelte"
export let groupId
@ -34,15 +35,14 @@
let prevSearch = undefined
let pageInfo = createPaginationStore()
let loaded = false
let editModal
let deleteModal
let editModal, deleteModal, appAddModal
$: page = $pageInfo.page
$: fetchUsers(page, searchTerm)
$: group = $groups.find(x => x._id === groupId)
$: filtered = $users.data
$: groupApps = $apps.filter(app =>
groups.actions.getGroupAppIds(group).includes(apps.getProdAppID(app.appId))
groups.actions.getGroupAppIds(group).includes(apps.getProdAppID(app.devId))
)
$: {
if (loaded && !group?._id) {
@ -182,7 +182,14 @@
</Layout>
<Layout noPadding gap="S">
<div class="header">
<Heading size="S">Apps</Heading>
<div>
<Button on:click={appAddModal.show()} icon="ExperienceAdd" cta>
Add app
</Button>
</div>
</div>
<List>
{#if groupApps.length}
{#each groupApps as app}
@ -197,12 +204,24 @@
<StatusLight
square
color={RoleUtils.getRoleColour(
group.roles[apps.getProdAppID(app.appId)]
group.roles[apps.getProdAppID(app.devId)]
)}
>
{getRoleLabel(app.appId)}
{getRoleLabel(app.devId)}
</StatusLight>
</div>
<Icon
on:click={e => {
groups.actions.removeApp(
groupId,
apps.getProdAppID(app.devId)
)
e.stopPropagation()
}}
hoverable
size="S"
name="Close"
/>
</ListItem>
{/each}
{:else}
@ -216,6 +235,11 @@
<Modal bind:this={editModal}>
<CreateEditGroupModal {group} {saveGroup} />
</Modal>
<Modal bind:this={appAddModal}>
<AppAddModal {group} />
</Modal>
<ConfirmDialog
bind:this={deleteModal}
title="Delete user group"

View File

@ -0,0 +1,53 @@
<script>
import { Body, ModalContent, Select } from "@budibase/bbui"
import { apps, groups } from "stores/portal"
import { roles } from "stores/backend"
import RoleSelect from "components/common/RoleSelect.svelte"
export let group
$: appOptions = $apps.map(app => ({
label: app.name,
value: app,
}))
$: confirmDisabled =
(!selectingRole && !selectedApp) || (selectingRole && !selectedRoleId)
let selectedApp, selectedRoleId
let selectingRole = false
async function appSelected() {
const prodAppId = apps.getProdAppID(selectedApp.devId)
if (!selectingRole) {
selectingRole = true
await roles.fetchByAppId(prodAppId)
// return false to stop closing modal
return false
} else {
await groups.actions.addApp(group._id, prodAppId, selectedRoleId)
}
}
</script>
<ModalContent
onConfirm={appSelected}
size="M"
title="Add app to group"
confirmText={selectingRole ? "Confirm" : "Next"}
showSecondaryButton={selectingRole}
secondaryButtonText="Back"
secondaryAction={() => (selectingRole = false)}
disabled={confirmDisabled}
>
{#if !selectingRole}
<Body
>Select an app to assign roles for members of <i>"{group.name}"</i></Body
>
<Select bind:value={selectedApp} options={appOptions} />
{:else}
<Body
>Select the role that all members of "<i>{group.name}</i>" will have for
<i>"{selectedApp.name}"</i></Body
>
<RoleSelect allowPublic={false} bind:value={selectedRoleId} />
{/if}
</ModalContent>

View File

@ -27,7 +27,6 @@
icon: "UserGroup",
color: "var(--spectrum-global-color-blue-600)",
users: [],
apps: [],
roles: {},
}
@ -91,16 +90,14 @@
<Layout noPadding gap="M">
<Layout gap="XS" noPadding>
<div class="title">
<Heading size="M">User groups</Heading>
{#if !$licensing.groupsEnabled}
<Tags>
<div class="tags">
<div class="tag">
<Tag icon="LockClosed">Pro plan</Tag>
</div>
</div>
</Tags>
{/if}
</div>
<Body>
Easily assign and manage your users' access with user groups.
{#if !$auth.accountPortalAccess && !$licensing.groupsEnabled && $admin.cloud}
@ -124,6 +121,7 @@
{:else}
<Button
newStyles
primary
disabled={!$auth.accountPortalAccess && $admin.cloud}
on:click={$licensing.goToUpgradePage()}
>
@ -141,10 +139,13 @@
</Button>
{/if}
</ButtonGroup>
{#if $licensing.groupsEnabled}
<div class="controls-right">
<Search bind:value={searchString} placeholder="Search" />
</div>
{/if}
</div>
{#if $licensing.groupsEnabled}
<Table
on:click={({ detail }) => $goto(`./${detail._id}`)}
{schema}
@ -153,6 +154,7 @@
allowEditRows={false}
{customRenderers}
/>
{/if}
</Layout>
<Modal bind:this={modal}>
@ -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);
}
</style>

View File

@ -55,6 +55,7 @@
Add plugin
</Button>
</div>
{#if filteredPlugins?.length}
<div class="filters">
<div class="select">
<Select
@ -67,6 +68,7 @@
</div>
<Search bind:value={searchTerm} placeholder="Search plugins" />
</div>
{/if}
</div>
{#if filteredPlugins?.length}
<Layout noPadding gap="S">

View File

@ -5,9 +5,7 @@ import { RoleUtils } from "@budibase/frontend-core"
export function createRolesStore() {
const { subscribe, update, set } = writable([])
const actions = {
fetch: async () => {
const roles = await API.getRoles()
function setRoles(roles) {
set(
roles.sort((a, b) => {
const priorityA = RoleUtils.getRolePriority(a._id)
@ -15,6 +13,16 @@ export function createRolesStore() {
return priorityA > priorityB ? -1 : 1
})
)
}
const actions = {
fetch: async () => {
const roles = await API.getRoles()
setRoles(roles)
},
fetchByAppId: async appId => {
const { roles } = await API.getRolesForApp(appId)
setRoles(roles)
},
delete: async role => {
await API.deleteRole({

View File

@ -21,6 +21,8 @@ const getProdAppID = appId => {
} else if (!appId.startsWith("app")) {
rest = appId
separator = "_"
} else {
return appId
}
return `app${separator}${rest}`
}

View File

@ -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",

View File

@ -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",

View File

@ -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 @@
<svelte:head>
{#if $builderStore.usedPlugins?.length}
{#each $builderStore.usedPlugins as plugin (plugin.hash)}
<script src={`/plugins/${plugin.jsUrl}?r=${plugin.hash || ""}`}></script>
<script
src={`${pluginsUrl}/${plugin.jsUrl}?r=${plugin.hash || ""}`}></script>
{/each}
{/if}
</svelte:head>

View File

@ -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"
}

View File

@ -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}`,
})
},
})

View File

@ -40,7 +40,7 @@ export const OperatorOptions = {
},
NotContains: {
value: "notContains",
label: "Does Not Contain",
label: "Does not contain",
},
In: {
value: "oneOf",

View File

@ -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",

View File

@ -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",

View File

@ -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"

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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 = {

View File

@ -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"