1
0
Fork 0
mirror of synced 2024-06-28 02:50:50 +12:00
This commit is contained in:
Martin McKeaveney 2021-06-10 14:15:03 +01:00
commit 28d4a9ad06
18 changed files with 98 additions and 38 deletions

View file

@ -14,7 +14,6 @@ services:
environment:
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
MINIO_BROWSER: "off"
command: server /data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]

View file

@ -1,5 +1,5 @@
{
"version": "0.9.39",
"version": "0.9.42",
"npmClient": "yarn",
"packages": [
"packages/*"

View file

@ -1,6 +1,6 @@
{
"name": "@budibase/auth",
"version": "0.9.39",
"version": "0.9.42",
"description": "Authentication middlewares for budibase builder and apps",
"main": "src/index.js",
"author": "Budibase",

View file

@ -1,7 +1,7 @@
{
"name": "@budibase/bbui",
"description": "A UI solution used in the different Budibase projects.",
"version": "0.9.39",
"version": "0.9.42",
"license": "AGPL-3.0",
"svelte": "src/index.js",
"module": "dist/bbui.es.js",

View file

@ -1,6 +1,6 @@
{
"name": "@budibase/builder",
"version": "0.9.39",
"version": "0.9.42",
"license": "AGPL-3.0",
"private": true,
"scripts": {
@ -65,10 +65,10 @@
}
},
"dependencies": {
"@budibase/bbui": "^0.9.39",
"@budibase/client": "^0.9.39",
"@budibase/bbui": "^0.9.42",
"@budibase/client": "^0.9.42",
"@budibase/colorpicker": "1.1.2",
"@budibase/string-templates": "^0.9.39",
"@budibase/string-templates": "^0.9.42",
"@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": "0.9.39",
"version": "0.9.42",
"description": "Budibase CLI, for developers, self hosting and migrations.",
"main": "src/index.js",
"bin": {

View file

@ -1,6 +1,6 @@
{
"name": "@budibase/client",
"version": "0.9.39",
"version": "0.9.42",
"license": "MPL-2.0",
"module": "dist/budibase-client.js",
"main": "dist/budibase-client.js",
@ -18,13 +18,13 @@
"dev:builder": "rollup -cw"
},
"dependencies": {
"@budibase/string-templates": "^0.9.39",
"@budibase/string-templates": "^0.9.42",
"regexparam": "^1.3.0",
"shortid": "^2.2.15",
"svelte-spa-router": "^3.0.5"
},
"devDependencies": {
"@budibase/standard-components": "^0.9.39",
"@budibase/standard-components": "^0.9.42",
"@rollup/plugin-commonjs": "^18.0.0",
"@rollup/plugin-node-resolve": "^11.2.1",
"fs-extra": "^8.1.0",

View file

@ -1,7 +1,7 @@
{
"name": "@budibase/server",
"email": "hi@budibase.com",
"version": "0.9.39",
"version": "0.9.42",
"description": "Budibase Web Server",
"main": "src/electron.js",
"repository": {
@ -55,9 +55,9 @@
"author": "Budibase",
"license": "AGPL-3.0-or-later",
"dependencies": {
"@budibase/auth": "^0.9.39",
"@budibase/client": "^0.9.39",
"@budibase/string-templates": "^0.9.39",
"@budibase/auth": "^0.9.42",
"@budibase/client": "^0.9.42",
"@budibase/string-templates": "^0.9.42",
"@elastic/elasticsearch": "7.10.0",
"@koa/router": "8.0.0",
"@sendgrid/mail": "7.1.1",
@ -110,7 +110,7 @@
"devDependencies": {
"@babel/core": "^7.14.3",
"@babel/preset-env": "^7.14.4",
"@budibase/standard-components": "^0.9.39",
"@budibase/standard-components": "^0.9.42",
"@jest/test-sequencer": "^24.8.0",
"babel-jest": "^27.0.2",
"docker-compose": "^0.23.6",

View file

@ -82,7 +82,7 @@ exports.query = async function (ctx) {
exports.plus = async function (ctx) {
const db = new CouchDB(ctx.appId)
const PlusConnector = plusIntegrations[ctx.request.body.source]
const PlusConnector = plusIntegrations[ctx.request.body.source].integration
const connector = new PlusConnector(ctx.request.body)
await connector.init()

View file

@ -71,7 +71,7 @@ exports.uploadFile = async function (ctx) {
return prepareUpload({
file,
s3Key: `assets/${ctx.appId}/attachments/${processedFileName}`,
s3Key: `${ctx.appId}/attachments/${processedFileName}`,
bucket: ObjectStoreBuckets.APPS,
})
})

View file

@ -385,7 +385,7 @@ describe("/rows", () => {
name: "test",
description: "test",
attachment: [{
key: `${config.getAppId()}/attachment/test/thing.csv`,
key: `${config.getAppId()}/attachments/test/thing.csv`,
}],
tableId: table._id,
})
@ -393,7 +393,7 @@ describe("/rows", () => {
await setup.switchToSelfHosted(async () => {
const enriched = await outputProcessing(config.getAppId(), table, [row])
expect(enriched[0].attachment[0].url).toBe(
`/prod-budi-app-assets/${config.getAppId()}/attachment/test/thing.csv`
`/prod-budi-app-assets/${config.getAppId()}/attachments/test/thing.csv`
)
})
})

View file

@ -9,6 +9,8 @@ const airtable = require("./airtable")
const mysql = require("./mysql")
const arangodb = require("./arangodb")
const rest = require("./rest")
// Plus
const postgresPlus = require("../integrations/plus/postgres")
const DEFINITIONS = {
POSTGRES: postgres.schema,
@ -22,6 +24,7 @@ const DEFINITIONS = {
MYSQL: mysql.schema,
ARANGODB: arangodb.schema,
REST: rest.schema,
POSTGRES_PLUS: postgresPlus.schema,
}
const INTEGRATIONS = {

View file

@ -1,5 +1,6 @@
const { Pool } = require("pg")
const { FieldTypes } = require("../../constants")
const { FIELD_TYPES } = require("../Integration")
const TYPE_MAP = {
text: FieldTypes.LONGFORM,
@ -13,6 +14,44 @@ const TYPE_MAP = {
boolean: FieldTypes.BOOLEAN,
}
const SCHEMA = {
friendlyName: "PostgreSQL",
description:
"PostgreSQL, also known as Postgres, is a free and open-source relational database management system emphasizing extensibility and SQL compliance.",
datasource: {
host: {
type: FIELD_TYPES.STRING,
default: "localhost",
required: true,
},
port: {
type: FIELD_TYPES.NUMBER,
required: true,
default: 5432,
},
database: {
type: FIELD_TYPES.STRING,
default: "postgres",
required: true,
},
user: {
type: FIELD_TYPES.STRING,
default: "root",
required: true,
},
password: {
type: FIELD_TYPES.PASSWORD,
default: "root",
required: true,
},
ssl: {
type: FIELD_TYPES.BOOLEAN,
default: false,
required: false,
},
},
}
class PostgresPlus {
static pool
COLUMNS_SQL =
@ -52,4 +91,7 @@ class PostgresPlus {
}
}
module.exports = PostgresPlus
module.exports = {
schema: SCHEMA,
integration: PostgresPlus,
}

View file

@ -29,11 +29,11 @@
"keywords": [
"svelte"
],
"version": "0.9.39",
"version": "0.9.42",
"license": "MIT",
"gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc",
"dependencies": {
"@budibase/bbui": "^0.9.39",
"@budibase/bbui": "^0.9.42",
"@spectrum-css/page": "^3.0.1",
"@spectrum-css/vars": "^3.0.1",
"apexcharts": "^3.22.1",

View file

@ -13,7 +13,9 @@ export const buildLuceneQuery = filter => {
notEmpty: {},
}
if (Array.isArray(filter)) {
filter.forEach(({ operator, field, type, value }) => {
// Build up proper range filters
filter.forEach(expression => {
const { operator, field, type, value } = expression
if (operator.startsWith("range")) {
if (!query.range[field]) {
query.range[field] = {
@ -33,10 +35,24 @@ export const buildLuceneQuery = filter => {
query.range[field].high = value
}
} else if (query[operator]) {
query[operator][field] = value
if (type === "boolean") {
// Transform boolean filters to cope with null.
// "equals false" needs to be "not equals true"
// "not equals false" needs to be "equals true"
if (operator === "equal" && value === "false") {
query.notEqual[field] = "true"
} else if (operator === "notEqual" && value === "false") {
query.equal[field] = "true"
} else {
query[operator][field] = value
}
} else {
query[operator][field] = value
}
}
})
}
return query
}

View file

@ -1,6 +1,6 @@
{
"name": "@budibase/string-templates",
"version": "0.9.39",
"version": "0.9.42",
"description": "Handlebars wrapper for Budibase templating.",
"main": "src/index.cjs",
"module": "dist/bundle.mjs",

View file

@ -1,7 +1,7 @@
{
"name": "@budibase/worker",
"email": "hi@budibase.com",
"version": "0.9.39",
"version": "0.9.42",
"description": "Budibase background service",
"main": "src/index.js",
"repository": {
@ -21,8 +21,8 @@
"author": "Budibase",
"license": "AGPL-3.0-or-later",
"dependencies": {
"@budibase/auth": "^0.9.39",
"@budibase/string-templates": "^0.9.39",
"@budibase/auth": "^0.9.42",
"@budibase/string-templates": "^0.9.42",
"@koa/router": "^8.0.0",
"aws-sdk": "^2.811.0",
"bcryptjs": "^2.4.3",

View file

@ -287,10 +287,10 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
"@budibase/auth@^0.9.36":
version "0.9.36"
resolved "https://registry.yarnpkg.com/@budibase/auth/-/auth-0.9.36.tgz#8111890390fb57a513ea1fc0b209db474460ea59"
integrity sha512-pGDd3d5/MwEDrSQI7NZNfekXlywuxjKNOfQHi5+5cbpje3DdWxRu2ILpvYj0TdmIk8K3vd4TsZLL0APVaB/mhg==
"@budibase/auth@^0.9.38":
version "0.9.38"
resolved "https://registry.yarnpkg.com/@budibase/auth/-/auth-0.9.38.tgz#196f2f20f8df09e07804877965ada6bd7a9e7e72"
integrity sha512-ww1gfjjmSvmzNFZY8Omy9tzuzFsStLzHR6t54hinOVcL3Bu8T/xBAqSyEvyCkZNbfTHis7V8QmTzugRxhuyHoQ==
dependencies:
aws-sdk "^2.901.0"
bcryptjs "^2.4.3"
@ -340,10 +340,10 @@
to-gfm-code-block "^0.1.1"
year "^0.2.1"
"@budibase/string-templates@^0.9.36":
version "0.9.36"
resolved "https://registry.yarnpkg.com/@budibase/string-templates/-/string-templates-0.9.36.tgz#a8391d01fec9587b8b0873f6bdc402a6d8375e8a"
integrity sha512-OtuwJZkwgGD/pu0I0duCqiC4djGhc3olMvROq9JHIs6jm7qWLRxud53S1TdgHFFZPdEsuUGHGLRlZrIZaPujQw==
"@budibase/string-templates@^0.9.38":
version "0.9.38"
resolved "https://registry.yarnpkg.com/@budibase/string-templates/-/string-templates-0.9.38.tgz#8fec7b18654b2e42e388a774a515c6f8617b56e9"
integrity sha512-38n+zf8L1s24rbSnk9/18In7xxz/zLeI0Yn6OUn079Nqz7MCgdhnYg/TTYAORzm7WYFwnAF1pXStWqTrsZk+lg==
dependencies:
"@budibase/handlebars-helpers" "^0.11.3"
dayjs "^1.10.4"