-
+
{#each options as option}
{/each}
diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/PropertyControl.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/PropertyControl.svelte
index 6f78484339..47fbc0bbff 100644
--- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/PropertyControl.svelte
+++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/PropertyControl.svelte
@@ -53,7 +53,7 @@
}
}
- // The "safe" value is the value with eny bindings made readable
+ // The "safe" value is the value with any bindings made readable
// If there is no value set, any default value is used
const getSafeValue = (value, defaultValue, bindableProperties) => {
const enriched = runtimeToReadableBinding(bindableProperties, value)
@@ -125,7 +125,7 @@
.control {
flex: 1;
- display: flex;
+ display: inline-block;
padding-left: 2px;
overflow: hidden;
}
diff --git a/packages/builder/src/components/start/AppCard.svelte b/packages/builder/src/components/start/AppCard.svelte
index 4efc298cdd..cf8bcce688 100644
--- a/packages/builder/src/components/start/AppCard.svelte
+++ b/packages/builder/src/components/start/AppCard.svelte
@@ -32,13 +32,13 @@
diff --git a/packages/builder/src/pages/[application]/deploy/index.svelte b/packages/builder/src/pages/[application]/deploy/index.svelte
index d7e75e9a8e..bad79d8949 100644
--- a/packages/builder/src/pages/[application]/deploy/index.svelte
+++ b/packages/builder/src/pages/[application]/deploy/index.svelte
@@ -25,8 +25,8 @@
notifier.danger(
"No budibase API Keys configured. You must set either a self hosted or cloud API key to deploy your budibase app."
)
+ return
}
- return
}
const DEPLOY_URL = `/api/deploy`
diff --git a/packages/builder/yarn.lock b/packages/builder/yarn.lock
index 186e330135..9946326ed4 100644
--- a/packages/builder/yarn.lock
+++ b/packages/builder/yarn.lock
@@ -842,10 +842,10 @@
lodash "^4.17.19"
to-fast-properties "^2.0.0"
-"@budibase/bbui@^1.56.0":
- version "1.56.0"
- resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-1.56.0.tgz#91376f11b43706fd380291e9a5283760996eb62b"
- integrity sha512-OEFC7MapbJk7Bd7oo79cVOq9BIcK1x8XPHLC1lB2N4hts37IygzB4Egg6JZBD7rh7CqU8ppc4W7wkfQbaXEO1Q==
+"@budibase/bbui@^1.58.2":
+ version "1.58.2"
+ resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-1.58.2.tgz#1b9a5b1bf20597c1ea85ebba69acfec01ef6edce"
+ integrity sha512-Gn4yCNpoVhtVhRDuWEYdaBK/oAfccTvehywgbyH4sHKaY7aQ7v0679nsJsOHBjNPleKy5YN3ZLhneh5k3F1O2Q==
dependencies:
markdown-it "^12.0.2"
quill "^1.3.7"
@@ -2023,6 +2023,14 @@ call-bind@^1.0.0:
function-bind "^1.1.1"
get-intrinsic "^1.0.0"
+call-bind@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c"
+ integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==
+ dependencies:
+ function-bind "^1.1.1"
+ get-intrinsic "^1.0.2"
+
callsites@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73"
@@ -2796,10 +2804,10 @@ end-of-stream@^1.1.0:
dependencies:
once "^1.4.0"
-entities@~2.0.0:
- version "2.0.3"
- resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.3.tgz#5c487e5742ab93c15abb5da22759b8590ec03b7f"
- integrity sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==
+entities@~2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5"
+ integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==
errno@^0.1.1, errno@~0.1.1:
version "0.1.7"
@@ -3212,9 +3220,9 @@ find-up@^3.0.0:
locate-path "^3.0.0"
flatpickr@^4.5.2:
- version "4.6.6"
- resolved "https://registry.yarnpkg.com/flatpickr/-/flatpickr-4.6.6.tgz#34d2ad80adfa34254e62583a34264d472f1038d6"
- integrity sha512-EZ48CJMttMg3maMhJoX+GvTuuEhX/RbA1YeuI19attP3pwBdbYy6+yqAEVm0o0hSBFYBiLbVxscLW6gJXq6H3A==
+ version "4.6.9"
+ resolved "https://registry.yarnpkg.com/flatpickr/-/flatpickr-4.6.9.tgz#9a13383e8a6814bda5d232eae3fcdccb97dc1499"
+ integrity sha512-F0azNNi8foVWKSF+8X+ZJzz8r9sE1G4hl06RyceIaLvyltKvDl6vqk9Lm/6AUUCi5HWaIjiUbk7UpeE/fOXOpw==
fn-name@~3.0.0:
version "3.0.0"
@@ -3332,6 +3340,15 @@ get-intrinsic@^1.0.0:
has "^1.0.3"
has-symbols "^1.0.1"
+get-intrinsic@^1.0.2:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6"
+ integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==
+ dependencies:
+ function-bind "^1.1.1"
+ has "^1.0.3"
+ has-symbols "^1.0.1"
+
get-port@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc"
@@ -3889,7 +3906,15 @@ is-reference@^1.2.1:
dependencies:
"@types/estree" "*"
-is-regex@^1.0.4, is-regex@^1.1.1:
+is-regex@^1.0.4:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.2.tgz#81c8ebde4db142f2cf1c53fc86d6a45788266251"
+ integrity sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==
+ dependencies:
+ call-bind "^1.0.2"
+ has-symbols "^1.0.1"
+
+is-regex@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9"
integrity sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==
@@ -4909,12 +4934,12 @@ map-visit@^1.0.0:
object-visit "^1.0.0"
markdown-it@^12.0.2:
- version "12.0.2"
- resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-12.0.2.tgz#4401beae8df8aa2221fc6565a7188e60a06ef0ed"
- integrity sha512-4Lkvjbv2kK+moL9TbeV+6/NHx+1Q+R/NIdUlFlkqkkzUcTod4uiyTJRiBidKR9qXSdkNFkgv+AELY8KN9vSgVA==
+ version "12.0.4"
+ resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-12.0.4.tgz#eec8247d296327eac3ba9746bdeec9cfcc751e33"
+ integrity sha512-34RwOXZT8kyuOJy25oJNJoulO8L0bTHYWXcdZBYZqFnjIy3NgjeoM3FmPXIOFQ26/lSHYMr8oc62B6adxXcb3Q==
dependencies:
argparse "^2.0.1"
- entities "~2.0.0"
+ entities "~2.1.0"
linkify-it "^3.0.1"
mdurl "^1.0.1"
uc.micro "^1.0.5"
@@ -4995,7 +5020,12 @@ mime-types@^2.1.12, mime-types@~2.1.19:
dependencies:
mime-db "1.44.0"
-mime@^2.3.1, mime@^2.4.4:
+mime@^2.3.1:
+ version "2.5.0"
+ resolved "https://registry.yarnpkg.com/mime/-/mime-2.5.0.tgz#2b4af934401779806ee98026bb42e8c1ae1876b1"
+ integrity sha512-ft3WayFSFUVBuJj7BMLKAQcSlItKtfjsKDDsii3rqFDAZ7t11zRe8ASw/GlmivGwVUYtwkQrxiGGpL6gFvB0ag==
+
+mime@^2.4.4:
version "2.4.6"
resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.6.tgz#e5b407c90db442f2beb5b162373d07b69affa4d1"
integrity sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA==
@@ -5228,12 +5258,12 @@ object-inspect@^1.8.0:
integrity sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==
object-is@^1.0.1:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.3.tgz#2e3b9e65560137455ee3bd62aec4d90a2ea1cc81"
- integrity sha512-teyqLvFWzLkq5B9ki8FVWA902UER2qkxmdA4nLf+wjOLAWgxzCWZNCxpDq9MvE8MmhWNr+I8w3BN49Vx36Y6Xg==
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.4.tgz#63d6c83c00a43f4cbc9434eb9757c8a5b8565068"
+ integrity sha512-1ZvAZ4wlF7IyPVOcE1Omikt7UpaFlOQq0HlSti+ZvDH3UiD2brwGMwDbyV43jao2bKJ+4+WdPJHSd7kgzKYVqg==
dependencies:
+ call-bind "^1.0.0"
define-properties "^1.1.3"
- es-abstract "^1.18.0-next.1"
object-keys@^1.0.12, object-keys@^1.1.1:
version "1.1.1"
@@ -5842,12 +5872,12 @@ regex-not@^1.0.0, regex-not@^1.0.2:
safe-regex "^1.1.0"
regexp.prototype.flags@^1.2.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz#7aba89b3c13a64509dabcf3ca8d9fbb9bdf5cb75"
- integrity sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz#7ef352ae8d159e758c0eadca6f8fcb4eef07be26"
+ integrity sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA==
dependencies:
+ call-bind "^1.0.2"
define-properties "^1.1.3"
- es-abstract "^1.17.0-next.1"
regexpu-core@^4.7.1:
version "4.7.1"
diff --git a/packages/client/package.json b/packages/client/package.json
index 46a25f4baf..8541e2f807 100644
--- a/packages/client/package.json
+++ b/packages/client/package.json
@@ -1,6 +1,6 @@
{
"name": "@budibase/client",
- "version": "0.7.4",
+ "version": "0.7.6",
"license": "MPL-2.0",
"main": "dist/budibase-client.js",
"module": "dist/budibase-client.js",
@@ -9,14 +9,14 @@
"dev:builder": "rollup -cw"
},
"dependencies": {
- "@budibase/string-templates": "^0.7.4",
+ "@budibase/string-templates": "^0.7.6",
"deep-equal": "^2.0.1",
"regexparam": "^1.3.0",
"shortid": "^2.2.15",
"svelte-spa-router": "^3.0.5"
},
"devDependencies": {
- "@budibase/standard-components": "^0.7.4",
+ "@budibase/standard-components": "^0.7.6",
"@rollup/plugin-commonjs": "^16.0.0",
"@rollup/plugin-node-resolve": "^10.0.0",
"fs-extra": "^8.1.0",
diff --git a/packages/client/src/utils/buttonActions.js b/packages/client/src/utils/buttonActions.js
index 178abd328d..0cafb151fa 100644
--- a/packages/client/src/utils/buttonActions.js
+++ b/packages/client/src/utils/buttonActions.js
@@ -51,7 +51,10 @@ const navigationHandler = action => {
const queryExecutionHandler = async (action, context) => {
const { datasourceId, queryId, queryParams } = action.parameters
- const enrichedQueryParameters = enrichDataBindings(queryParams || {}, context)
+ const enrichedQueryParameters = await enrichDataBindings(
+ queryParams || {},
+ context
+ )
await executeQuery({
datasourceId,
queryId,
diff --git a/packages/server/package.json b/packages/server/package.json
index 9ac7e84a14..61b6fcf31a 100644
--- a/packages/server/package.json
+++ b/packages/server/package.json
@@ -1,7 +1,7 @@
{
"name": "@budibase/server",
"email": "hi@budibase.com",
- "version": "0.7.4",
+ "version": "0.7.6",
"description": "Budibase Web Server",
"main": "src/electron.js",
"repository": {
@@ -50,8 +50,8 @@
"author": "Budibase",
"license": "AGPL-3.0-or-later",
"dependencies": {
- "@budibase/client": "^0.7.4",
- "@budibase/string-templates": "^0.7.4",
+ "@budibase/client": "^0.7.6",
+ "@budibase/string-templates": "^0.7.6",
"@elastic/elasticsearch": "7.10.0",
"@koa/router": "8.0.0",
"@sendgrid/mail": "7.1.1",
diff --git a/packages/server/src/api/controllers/row.js b/packages/server/src/api/controllers/row.js
index 3d0fedbc4d..6e0bfb3da4 100644
--- a/packages/server/src/api/controllers/row.js
+++ b/packages/server/src/api/controllers/row.js
@@ -57,13 +57,15 @@ exports.patch = async function(ctx) {
let row = await db.get(ctx.params.id)
const table = await db.get(row.tableId)
const patchfields = ctx.request.body
- row = coerceRowValues(row, table)
+ // need to build up full patch fields before coerce
for (let key of Object.keys(patchfields)) {
if (!table.schema[key]) continue
row[key] = patchfields[key]
}
+ row = coerceRowValues(row, table)
+
const validateResult = await validate({
row,
table,
@@ -89,6 +91,8 @@ exports.patch = async function(ctx) {
// Creation of a new user goes to the user controller
if (row.tableId === ViewNames.USERS) {
+ // the row has been updated, need to put it into the ctx
+ ctx.request.body = row
await usersController.update(ctx)
return
}
@@ -157,6 +161,8 @@ exports.save = async function(ctx) {
// Creation of a new user goes to the user controller
if (row.tableId === ViewNames.USERS) {
+ // the row has been updated, need to put it into the ctx
+ ctx.request.body = row
await usersController.create(ctx)
return
}
diff --git a/packages/server/src/api/controllers/user.js b/packages/server/src/api/controllers/user.js
index 9ef7c2281f..fcb4c34319 100644
--- a/packages/server/src/api/controllers/user.js
+++ b/packages/server/src/api/controllers/user.js
@@ -64,15 +64,13 @@ exports.create = async function(ctx) {
exports.update = async function(ctx) {
const db = new CouchDB(ctx.user.appId)
const user = ctx.request.body
- const dbUser = await db.get(ctx.request.body._id)
if (user.password) {
user.password = await bcrypt.hash(user.password)
} else {
delete user.password
}
- const newData = { ...dbUser, ...user }
- const response = await db.put(newData)
+ const response = await db.put(user)
user._rev = response.rev
ctx.status = 200
diff --git a/packages/server/src/app.js b/packages/server/src/app.js
index a5ef3132af..f1f3586801 100644
--- a/packages/server/src/app.js
+++ b/packages/server/src/app.js
@@ -53,7 +53,8 @@ server.on("close", () => console.log("Server Closed"))
module.exports = server.listen(env.PORT || 4001, async () => {
console.log(`Budibase running on ${JSON.stringify(server.address())}`)
automations.init()
- if (env.SELF_HOSTED) {
+ // only init the self hosting DB info in the Pouch, not needed in self hosting prod
+ if (!env.CLOUD) {
await selfhost.init()
}
})
diff --git a/packages/standard-components/package.json b/packages/standard-components/package.json
index 8a6652341a..c432746d3d 100644
--- a/packages/standard-components/package.json
+++ b/packages/standard-components/package.json
@@ -34,7 +34,7 @@
"keywords": [
"svelte"
],
- "version": "0.7.4",
+ "version": "0.7.6",
"license": "MIT",
"gitHead": "1a80b09fd093f2599a68f7db72ad639dd50922dd",
"dependencies": {
diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json
index f6a7a12f77..fae7314241 100644
--- a/packages/string-templates/package.json
+++ b/packages/string-templates/package.json
@@ -1,6 +1,6 @@
{
"name": "@budibase/string-templates",
- "version": "0.7.4",
+ "version": "0.7.6",
"description": "Handlebars wrapper for Budibase templating.",
"main": "src/index.js",
"module": "src/index.js",
diff --git a/packages/worker/package.json b/packages/worker/package.json
index 24e357bf7d..65e4c4742d 100644
--- a/packages/worker/package.json
+++ b/packages/worker/package.json
@@ -1,7 +1,7 @@
{
"name": "@budibase/deployment",
"email": "hi@budibase.com",
- "version": "0.7.4",
+ "version": "0.7.6",
"description": "Budibase Deployment Server",
"main": "src/index.js",
"repository": {