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

This commit is contained in:
mike12345567 2022-07-29 16:14:45 +01:00
commit aa3ad62a9b
14 changed files with 65 additions and 34 deletions

View File

@ -1,5 +1,5 @@
{
"version": "1.1.29-alpha.2",
"version": "1.1.31",
"npmClient": "yarn",
"packages": [
"packages/*"

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/backend-core",
"version": "1.1.29-alpha.2",
"version": "1.1.31",
"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.29-alpha.2",
"@budibase/types": "^1.1.31",
"@techpass/passport-openidconnect": "0.3.2",
"aws-sdk": "2.1030.0",
"bcrypt": "5.0.1",

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/bbui",
"description": "A UI solution used in the different Budibase projects.",
"version": "1.1.29-alpha.2",
"version": "1.1.31",
"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.29-alpha.2",
"@budibase/string-templates": "^1.1.31",
"@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.1.29-alpha.2",
"version": "1.1.31",
"license": "GPL-3.0",
"private": true,
"scripts": {
@ -69,10 +69,10 @@
}
},
"dependencies": {
"@budibase/bbui": "^1.1.29-alpha.2",
"@budibase/client": "^1.1.29-alpha.2",
"@budibase/frontend-core": "^1.1.29-alpha.2",
"@budibase/string-templates": "^1.1.29-alpha.2",
"@budibase/bbui": "^1.1.31",
"@budibase/client": "^1.1.31",
"@budibase/frontend-core": "^1.1.31",
"@budibase/string-templates": "^1.1.31",
"@sentry/browser": "5.19.1",
"@spectrum-css/page": "^3.0.1",
"@spectrum-css/vars": "^3.0.1",

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/cli",
"version": "1.1.29-alpha.2",
"version": "1.1.31",
"description": "Budibase CLI, for developers, self hosting and migrations.",
"main": "src/index.js",
"bin": {

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/client",
"version": "1.1.29-alpha.2",
"version": "1.1.31",
"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.29-alpha.2",
"@budibase/frontend-core": "^1.1.29-alpha.2",
"@budibase/string-templates": "^1.1.29-alpha.2",
"@budibase/bbui": "^1.1.31",
"@budibase/frontend-core": "^1.1.31",
"@budibase/string-templates": "^1.1.31",
"@spectrum-css/button": "^3.0.3",
"@spectrum-css/card": "^3.0.3",
"@spectrum-css/divider": "^1.0.3",

View File

@ -1,12 +1,12 @@
{
"name": "@budibase/frontend-core",
"version": "1.1.29-alpha.2",
"version": "1.1.31",
"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.29-alpha.2",
"@budibase/bbui": "^1.1.31",
"lodash": "^4.17.21",
"svelte": "^3.46.2"
}

View File

@ -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,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
// Parse all values into correct types
if (type === "datetime") {
// Ensure date value is a valid date and parse into correct format
@ -113,7 +117,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)
}
}

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/server",
"email": "hi@budibase.com",
"version": "1.1.29-alpha.2",
"version": "1.1.31",
"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.29-alpha.2",
"@budibase/client": "^1.1.29-alpha.2",
"@budibase/pro": "1.1.29-alpha.2",
"@budibase/string-templates": "^1.1.29-alpha.2",
"@budibase/types": "^1.1.29-alpha.2",
"@budibase/backend-core": "^1.1.31",
"@budibase/client": "^1.1.31",
"@budibase/pro": "1.1.31",
"@budibase/string-templates": "^1.1.31",
"@budibase/types": "^1.1.31",
"@bull-board/api": "3.7.0",
"@bull-board/koa": "3.9.4",
"@elastic/elasticsearch": "7.10.0",

View File

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

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/string-templates",
"version": "1.1.29-alpha.2",
"version": "1.1.31",
"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.1.29-alpha.2",
"version": "1.1.31",
"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.1.29-alpha.2",
"version": "1.1.31",
"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.29-alpha.2",
"@budibase/pro": "1.1.29-alpha.2",
"@budibase/string-templates": "^1.1.29-alpha.2",
"@budibase/types": "^1.1.29-alpha.2",
"@budibase/backend-core": "^1.1.31",
"@budibase/pro": "1.1.31",
"@budibase/string-templates": "^1.1.31",
"@budibase/types": "^1.1.31",
"@koa/router": "8.0.8",
"@sentry/node": "6.17.7",
"@techpass/passport-openidconnect": "0.3.2",