Merge branch 'master' of github.com:Budibase/budibase into develop
This commit is contained in:
commit
5c88d16cfb
19 changed files with 87 additions and 69 deletions
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "2.1.11",
|
||||
"version": "2.1.13",
|
||||
"npmClient": "yarn",
|
||||
"packages": [
|
||||
"packages/*"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/backend-core",
|
||||
"version": "2.1.11",
|
||||
"version": "2.1.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": "^2.1.11",
|
||||
"@budibase/types": "^2.1.13",
|
||||
"@shopify/jest-koa-mocks": "5.0.1",
|
||||
"@techpass/passport-openidconnect": "0.3.2",
|
||||
"aws-sdk": "2.1030.0",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@budibase/bbui",
|
||||
"description": "A UI solution used in the different Budibase projects.",
|
||||
"version": "2.1.11",
|
||||
"version": "2.1.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": "^2.1.11",
|
||||
"@budibase/string-templates": "^2.1.13",
|
||||
"@spectrum-css/actionbutton": "^1.0.1",
|
||||
"@spectrum-css/actiongroup": "^1.0.1",
|
||||
"@spectrum-css/avatar": "^3.0.2",
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
time_24hr: time24hr || false,
|
||||
altFormat: timeOnly ? "H:i" : enableTime ? "F j Y, H:i" : "F j, Y",
|
||||
wrap: true,
|
||||
mode: range ? "range" : null,
|
||||
mode: range ? "range" : "single",
|
||||
appendTo,
|
||||
disableMobile: "true",
|
||||
onReady: () => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/builder",
|
||||
"version": "2.1.11",
|
||||
"version": "2.1.13",
|
||||
"license": "GPL-3.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
@ -71,10 +71,10 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@budibase/bbui": "^2.1.11",
|
||||
"@budibase/client": "^2.1.11",
|
||||
"@budibase/frontend-core": "^2.1.11",
|
||||
"@budibase/string-templates": "^2.1.11",
|
||||
"@budibase/bbui": "^2.1.13",
|
||||
"@budibase/client": "^2.1.13",
|
||||
"@budibase/frontend-core": "^2.1.13",
|
||||
"@budibase/string-templates": "^2.1.13",
|
||||
"@sentry/browser": "5.19.1",
|
||||
"@spectrum-css/page": "^3.0.1",
|
||||
"@spectrum-css/vars": "^3.0.1",
|
||||
|
|
|
@ -245,7 +245,10 @@ export const getFrontendStore = () => {
|
|||
}
|
||||
},
|
||||
save: async screen => {
|
||||
store.actions.screens.validate(screen)
|
||||
/*
|
||||
Temporarily disabled to accomodate migration issues.
|
||||
store.actions.screens.validate(screen)
|
||||
*/
|
||||
const state = get(store)
|
||||
const creatingNewScreen = screen._id === undefined
|
||||
const savedScreen = await API.saveScreen(screen)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/cli",
|
||||
"version": "2.1.11",
|
||||
"version": "2.1.13",
|
||||
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
||||
"main": "src/index.js",
|
||||
"bin": {
|
||||
|
@ -26,9 +26,9 @@
|
|||
"outputPath": "build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@budibase/backend-core": "^2.1.11",
|
||||
"@budibase/string-templates": "^2.1.11",
|
||||
"@budibase/types": "^2.1.11",
|
||||
"@budibase/backend-core": "^2.1.13",
|
||||
"@budibase/string-templates": "^2.1.13",
|
||||
"@budibase/types": "^2.1.13",
|
||||
"axios": "0.21.2",
|
||||
"chalk": "4.1.0",
|
||||
"cli-progress": "3.11.2",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/client",
|
||||
"version": "2.1.11",
|
||||
"version": "2.1.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": "^2.1.11",
|
||||
"@budibase/frontend-core": "^2.1.11",
|
||||
"@budibase/string-templates": "^2.1.11",
|
||||
"@budibase/bbui": "^2.1.13",
|
||||
"@budibase/frontend-core": "^2.1.13",
|
||||
"@budibase/string-templates": "^2.1.13",
|
||||
"@spectrum-css/button": "^3.0.3",
|
||||
"@spectrum-css/card": "^3.0.3",
|
||||
"@spectrum-css/divider": "^1.0.3",
|
||||
|
|
|
@ -225,7 +225,10 @@ const changeFormStepHandler = async (action, context) => {
|
|||
}
|
||||
|
||||
const closeScreenModalHandler = action => {
|
||||
let { url } = action.parameters
|
||||
let url
|
||||
if (action?.parameters) {
|
||||
url = action.parameters.url
|
||||
}
|
||||
// Emit this as a window event, so parent screens which are iframing us in
|
||||
// can close the modal
|
||||
window.parent.postMessage({ type: "close-screen-modal", url })
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@budibase/frontend-core",
|
||||
"version": "2.1.11",
|
||||
"version": "2.1.13",
|
||||
"description": "Budibase frontend core libraries used in builder and client",
|
||||
"author": "Budibase",
|
||||
"license": "MPL-2.0",
|
||||
"svelte": "src/index.js",
|
||||
"dependencies": {
|
||||
"@budibase/bbui": "^2.1.11",
|
||||
"@budibase/bbui": "^2.1.13",
|
||||
"lodash": "^4.17.21",
|
||||
"svelte": "^3.46.2"
|
||||
}
|
||||
|
|
|
@ -158,7 +158,7 @@ export const buildUserEndpoints = API => ({
|
|||
userInfo: {
|
||||
admin: user.admin ? { global: true } : undefined,
|
||||
builder: user.admin || user.builder ? { global: true } : undefined,
|
||||
groups: user.groups,
|
||||
userGroups: user.groups,
|
||||
},
|
||||
})),
|
||||
})
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/sdk",
|
||||
"version": "2.1.11",
|
||||
"version": "2.1.13",
|
||||
"description": "Budibase Public API SDK",
|
||||
"author": "Budibase",
|
||||
"license": "MPL-2.0",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@budibase/server",
|
||||
"email": "hi@budibase.com",
|
||||
"version": "2.1.11",
|
||||
"version": "2.1.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": "^2.1.11",
|
||||
"@budibase/client": "^2.1.11",
|
||||
"@budibase/pro": "2.1.11",
|
||||
"@budibase/string-templates": "^2.1.11",
|
||||
"@budibase/types": "^2.1.11",
|
||||
"@budibase/backend-core": "^2.1.13",
|
||||
"@budibase/client": "^2.1.13",
|
||||
"@budibase/pro": "2.1.13",
|
||||
"@budibase/string-templates": "^2.1.13",
|
||||
"@budibase/types": "^2.1.13",
|
||||
"@bull-board/api": "3.7.0",
|
||||
"@bull-board/koa": "3.9.4",
|
||||
"@elastic/elasticsearch": "7.10.0",
|
||||
|
|
|
@ -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@2.0.40-alpha.4":
|
||||
version "2.0.40-alpha.4"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.40-alpha.4.tgz#732264961ae4a19949bd318150a0afcd068d37bc"
|
||||
integrity sha512-3XtI8kl7laMHjmW6M9kIj+Eb8fa1gwG3pn0wyojydmUDZOGnnirPT2nvsr4m2icD7KYKhjmiwTI+101Z8QvRfw==
|
||||
"@budibase/backend-core@2.1.13":
|
||||
version "2.1.13"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.13.tgz#d0c4b126c87aa7e48864821bd40ba6523cfcca1f"
|
||||
integrity sha512-6dxl1tdndO+Zj3uacTY33cXbfve90q5AvOjyZihkkh4e/MEZwLU81BD8Be7rAwaPM94hHu7VvHYkGqs9QnGG9Q==
|
||||
dependencies:
|
||||
"@budibase/types" "2.0.40-alpha.4"
|
||||
"@budibase/types" "^2.1.13"
|
||||
"@shopify/jest-koa-mocks" "5.0.1"
|
||||
"@techpass/passport-openidconnect" "0.3.2"
|
||||
aws-sdk "2.1030.0"
|
||||
|
@ -1181,13 +1181,13 @@
|
|||
svelte-flatpickr "^3.2.3"
|
||||
svelte-portal "^1.0.0"
|
||||
|
||||
"@budibase/pro@2.0.40-alpha.4":
|
||||
version "2.0.40-alpha.4"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.40-alpha.4.tgz#3edef22748da6ae9086c9d55b864979657f58afc"
|
||||
integrity sha512-AaruTMmUBuqi3q5wRxL4Yr9SCqENsuoFxJBLfqXIl9DB0LuowfRklf5yehjGjxxHwZpqkIuMgJf/+jYbAvL44g==
|
||||
"@budibase/pro@2.1.13":
|
||||
version "2.1.13"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.13.tgz#c1f6264493652fa7372a97d0c034104ccec25f23"
|
||||
integrity sha512-/1Niv6ywTG3W6zC6cWFqvb5Mup8UR7YKqVCMVzFaQwV2eR+QBSlsTZKHneFpJuFFA/tlQsOpnVYKvpVZCYbViA==
|
||||
dependencies:
|
||||
"@budibase/backend-core" "2.0.40-alpha.4"
|
||||
"@budibase/types" "2.0.40-alpha.4"
|
||||
"@budibase/backend-core" "2.1.13"
|
||||
"@budibase/types" "2.1.13"
|
||||
"@koa/router" "8.0.8"
|
||||
bull "4.10.1"
|
||||
joi "17.6.0"
|
||||
|
@ -1211,10 +1211,10 @@
|
|||
svelte-apexcharts "^1.0.2"
|
||||
svelte-flatpickr "^3.1.0"
|
||||
|
||||
"@budibase/types@2.0.40-alpha.4":
|
||||
version "2.0.40-alpha.4"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.40-alpha.4.tgz#25268ef370e680a1401ca04d5fa6a96cd3a03d9e"
|
||||
integrity sha512-E/4WJpEyP4djElEzwHwehawGXwgcFPWGoeeU/FwgyqiIhJF07tKABjo56MC2aqiYDegYknZtx3OU73pFo/Z4LA==
|
||||
"@budibase/types@2.1.13", "@budibase/types@^2.1.13":
|
||||
version "2.1.13"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.13.tgz#d65adfe0e9fb645701be63bc9b728d5e2b7bb726"
|
||||
integrity sha512-kBUoUxPaVh7YW+0OS5pJ56Rar35n6uct1sEsA14uXErOQ33VssHJjIiYZL1DnlE+4PT5xpmW8fAUQiTz4PYBnw==
|
||||
|
||||
"@bull-board/api@3.7.0":
|
||||
version "3.7.0"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/string-templates",
|
||||
"version": "2.1.11",
|
||||
"version": "2.1.13",
|
||||
"description": "Handlebars wrapper for Budibase templating.",
|
||||
"main": "src/index.cjs",
|
||||
"module": "dist/bundle.mjs",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/types",
|
||||
"version": "2.1.11",
|
||||
"version": "2.1.13",
|
||||
"description": "Budibase types",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@budibase/worker",
|
||||
"email": "hi@budibase.com",
|
||||
"version": "2.1.11",
|
||||
"version": "2.1.13",
|
||||
"description": "Budibase background service",
|
||||
"main": "src/index.ts",
|
||||
"repository": {
|
||||
|
@ -36,10 +36,10 @@
|
|||
"author": "Budibase",
|
||||
"license": "GPL-3.0",
|
||||
"dependencies": {
|
||||
"@budibase/backend-core": "^2.1.11",
|
||||
"@budibase/pro": "2.1.11",
|
||||
"@budibase/string-templates": "^2.1.11",
|
||||
"@budibase/types": "^2.1.11",
|
||||
"@budibase/backend-core": "^2.1.13",
|
||||
"@budibase/pro": "2.1.13",
|
||||
"@budibase/string-templates": "^2.1.13",
|
||||
"@budibase/types": "^2.1.13",
|
||||
"@koa/router": "8.0.8",
|
||||
"@sentry/node": "6.17.7",
|
||||
"@techpass/passport-openidconnect": "0.3.2",
|
||||
|
|
|
@ -177,7 +177,9 @@ export const save = async (
|
|||
): Promise<CreateUserResponse> => {
|
||||
const tenantId = tenancy.getTenantId()
|
||||
const db = tenancy.getGlobalDB()
|
||||
let { email, _id } = user
|
||||
|
||||
let { email, _id, userGroups = [] } = user
|
||||
|
||||
if (!email && !_id) {
|
||||
throw new Error("_id or email is required")
|
||||
}
|
||||
|
@ -213,8 +215,16 @@ export const save = async (
|
|||
let builtUser = await buildUser(user, opts, tenantId, dbUser)
|
||||
|
||||
// make sure we set the _id field for a new user
|
||||
// Also if this is a new user, associate groups with them
|
||||
let groupPromises = []
|
||||
if (!_id) {
|
||||
_id = builtUser._id!
|
||||
|
||||
if (userGroups.length > 0) {
|
||||
for (let groupId of userGroups) {
|
||||
groupPromises.push(groupsSdk.addUsers(groupId, [_id]))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -228,6 +238,8 @@ export const save = async (
|
|||
// let server know to sync user
|
||||
await apps.syncUserInApps(_id)
|
||||
|
||||
await Promise.all(groupPromises)
|
||||
|
||||
return {
|
||||
_id: response.id,
|
||||
_rev: response.rev,
|
||||
|
|
|
@ -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@2.0.40-alpha.4":
|
||||
version "2.0.40-alpha.4"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.40-alpha.4.tgz#732264961ae4a19949bd318150a0afcd068d37bc"
|
||||
integrity sha512-3XtI8kl7laMHjmW6M9kIj+Eb8fa1gwG3pn0wyojydmUDZOGnnirPT2nvsr4m2icD7KYKhjmiwTI+101Z8QvRfw==
|
||||
"@budibase/backend-core@2.1.13":
|
||||
version "2.1.13"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.13.tgz#d0c4b126c87aa7e48864821bd40ba6523cfcca1f"
|
||||
integrity sha512-6dxl1tdndO+Zj3uacTY33cXbfve90q5AvOjyZihkkh4e/MEZwLU81BD8Be7rAwaPM94hHu7VvHYkGqs9QnGG9Q==
|
||||
dependencies:
|
||||
"@budibase/types" "2.0.40-alpha.4"
|
||||
"@budibase/types" "^2.1.13"
|
||||
"@shopify/jest-koa-mocks" "5.0.1"
|
||||
"@techpass/passport-openidconnect" "0.3.2"
|
||||
aws-sdk "2.1030.0"
|
||||
|
@ -328,22 +328,22 @@
|
|||
uuid "8.3.2"
|
||||
zlib "1.0.5"
|
||||
|
||||
"@budibase/pro@2.0.40-alpha.4":
|
||||
version "2.0.40-alpha.4"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.40-alpha.4.tgz#3edef22748da6ae9086c9d55b864979657f58afc"
|
||||
integrity sha512-AaruTMmUBuqi3q5wRxL4Yr9SCqENsuoFxJBLfqXIl9DB0LuowfRklf5yehjGjxxHwZpqkIuMgJf/+jYbAvL44g==
|
||||
"@budibase/pro@2.1.13":
|
||||
version "2.1.13"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.13.tgz#c1f6264493652fa7372a97d0c034104ccec25f23"
|
||||
integrity sha512-/1Niv6ywTG3W6zC6cWFqvb5Mup8UR7YKqVCMVzFaQwV2eR+QBSlsTZKHneFpJuFFA/tlQsOpnVYKvpVZCYbViA==
|
||||
dependencies:
|
||||
"@budibase/backend-core" "2.0.40-alpha.4"
|
||||
"@budibase/types" "2.0.40-alpha.4"
|
||||
"@budibase/backend-core" "2.1.13"
|
||||
"@budibase/types" "2.1.13"
|
||||
"@koa/router" "8.0.8"
|
||||
bull "4.10.1"
|
||||
joi "17.6.0"
|
||||
node-fetch "^2.6.1"
|
||||
|
||||
"@budibase/types@2.0.40-alpha.4":
|
||||
version "2.0.40-alpha.4"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.40-alpha.4.tgz#25268ef370e680a1401ca04d5fa6a96cd3a03d9e"
|
||||
integrity sha512-E/4WJpEyP4djElEzwHwehawGXwgcFPWGoeeU/FwgyqiIhJF07tKABjo56MC2aqiYDegYknZtx3OU73pFo/Z4LA==
|
||||
"@budibase/types@2.1.13", "@budibase/types@^2.1.13":
|
||||
version "2.1.13"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.13.tgz#d65adfe0e9fb645701be63bc9b728d5e2b7bb726"
|
||||
integrity sha512-kBUoUxPaVh7YW+0OS5pJ56Rar35n6uct1sEsA14uXErOQ33VssHJjIiYZL1DnlE+4PT5xpmW8fAUQiTz4PYBnw==
|
||||
|
||||
"@cspotcode/source-map-consumer@0.8.0":
|
||||
version "0.8.0"
|
||||
|
|
Loading…
Reference in a new issue