-
Query type: {config[query.queryVerb].type}
-
-
-
+
+
+ Query type:
+ {config[query.queryVerb].type}
+
+
+
+
-
+
{/if}
@@ -182,7 +187,11 @@
{#each fields as field, idx}
-
+
{/each}
-
-
+
+
{/if}
{/if}
@@ -206,7 +215,6 @@
{/if}
-
\ No newline at end of file
+ import { flip } from "svelte/animate"
+ import { fly } from "svelte/transition"
+ import { getContext } from "svelte"
+ const { notifications } = getContext("sdk")
+
+ export let themes = {
+ danger: "#E26D69",
+ success: "#84C991",
+ warning: "#f0ad4e",
+ info: "#5bc0de",
+ default: "#aaaaaa",
+ }
+
+
+
+ {#each $notifications as notification (notification.id)}
+
+
{notification.message}
+ {#if notification.icon}
{/if}
+
+ {/each}
+
+
+
diff --git a/packages/server/package.json b/packages/server/package.json
index feefffb827..2ee2c79e22 100644
--- a/packages/server/package.json
+++ b/packages/server/package.json
@@ -1,7 +1,7 @@
{
"name": "@budibase/server",
"email": "hi@budibase.com",
- "version": "0.5.3",
+ "version": "0.6.2",
"description": "Budibase Web Server",
"main": "src/electron.js",
"repository": {
@@ -49,13 +49,14 @@
"author": "Budibase",
"license": "AGPL-3.0-or-later",
"dependencies": {
- "@budibase/client": "^0.5.3",
- "@budibase/string-templates": "^0.5.3",
+ "@budibase/client": "^0.6.2",
+ "@budibase/string-templates": "^0.6.2",
"@elastic/elasticsearch": "^7.10.0",
"@koa/router": "^8.0.0",
"@sendgrid/mail": "^7.1.1",
"@sentry/node": "^5.19.2",
"airtable": "^0.10.1",
+ "arangojs": "^7.2.0",
"aws-sdk": "^2.767.0",
"bcryptjs": "^2.4.3",
"chmodr": "^1.2.0",
diff --git a/packages/server/src/db/linkedRows/linkUtils.js b/packages/server/src/db/linkedRows/linkUtils.js
index 3a9aff6c33..5f9dca4088 100644
--- a/packages/server/src/db/linkedRows/linkUtils.js
+++ b/packages/server/src/db/linkedRows/linkUtils.js
@@ -77,11 +77,21 @@ exports.getLinkDocuments = async function({
}
params.include_docs = !!includeDocs
try {
- const response = await db.query(getQueryIndex(ViewNames.LINK), params)
+ let linkRows = (await db.query(getQueryIndex(ViewNames.LINK), params)).rows
+ // filter to get unique entries
+ const foundIds = []
+ linkRows = linkRows.filter(link => {
+ const unique = foundIds.indexOf(link.id) === -1
+ if (unique) {
+ foundIds.push(link.id)
+ }
+ return unique
+ })
+
if (includeDocs) {
- return response.rows.map(row => row.doc)
+ return linkRows.map(row => row.doc)
} else {
- return response.rows.map(row => row.value)
+ return linkRows.map(row => row.value)
}
} catch (err) {
// check if the view doesn't exist, it should for all new instances
diff --git a/packages/server/src/integrations/arangodb.js b/packages/server/src/integrations/arangodb.js
new file mode 100644
index 0000000000..10449fc967
--- /dev/null
+++ b/packages/server/src/integrations/arangodb.js
@@ -0,0 +1,83 @@
+const { Database, aql } = require("arangojs")
+const { FIELD_TYPES, QUERY_TYPES } = require("./Integration")
+
+const SCHEMA = {
+ docs: "https://github.com/arangodb/arangojs",
+ datasource: {
+ url: {
+ type: FIELD_TYPES.STRING,
+ default: "http://localhost:8529",
+ required: true,
+ },
+ username: {
+ type: FIELD_TYPES.STRING,
+ default: "root",
+ required: true,
+ },
+ password: {
+ type: FIELD_TYPES.PASSWORD,
+ required: true,
+ },
+ databaseName: {
+ type: FIELD_TYPES.STRING,
+ default: "_system",
+ required: true,
+ },
+ collection: {
+ type: FIELD_TYPES.STRING,
+ required: true,
+ },
+ },
+ query: {
+ read: {
+ type: QUERY_TYPES.SQL,
+ },
+ create: {
+ type: QUERY_TYPES.JSON,
+ },
+ },
+}
+
+class ArangoDBIntegration {
+ constructor(config) {
+ config.auth = {
+ username: config.username,
+ password: config.password,
+ }
+
+ this.config = config
+ this.client = new Database(config)
+ }
+
+ async read(query) {
+ try {
+ const result = await this.client.query(query.sql)
+ return result.all()
+ } catch (err) {
+ console.error("Error querying arangodb", err.message)
+ throw err
+ } finally {
+ this.client.close()
+ }
+ }
+
+ async create(query) {
+ const clc = this.client.collection(this.config.collection)
+ try {
+ const result = await this.client.query(
+ aql`INSERT ${query.json} INTO ${clc} RETURN NEW`
+ )
+ return result.all()
+ } catch (err) {
+ console.error("Error querying arangodb", err.message)
+ throw err
+ } finally {
+ this.client.close()
+ }
+ }
+}
+
+module.exports = {
+ schema: SCHEMA,
+ integration: ArangoDBIntegration,
+}
diff --git a/packages/server/src/integrations/index.js b/packages/server/src/integrations/index.js
index acb81992a9..9f9d5a1530 100644
--- a/packages/server/src/integrations/index.js
+++ b/packages/server/src/integrations/index.js
@@ -7,6 +7,7 @@ const sqlServer = require("./microsoftSqlServer")
const s3 = require("./s3")
const airtable = require("./airtable")
const mysql = require("./mysql")
+const arangodb = require("./arangodb")
const DEFINITIONS = {
POSTGRES: postgres.schema,
@@ -18,6 +19,7 @@ const DEFINITIONS = {
S3: s3.schema,
AIRTABLE: airtable.schema,
MYSQL: mysql.schema,
+ ARANGODB: arangodb.schema,
}
const INTEGRATIONS = {
@@ -30,6 +32,7 @@ const INTEGRATIONS = {
SQL_SERVER: sqlServer.integration,
AIRTABLE: airtable.integration,
MYSQL: mysql.integration,
+ ARANGODB: arangodb.integration,
}
module.exports = {
diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock
index 55450d3e0c..36efad1747 100644
--- a/packages/server/yarn.lock
+++ b/packages/server/yarn.lock
@@ -947,6 +947,11 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.8.tgz#fe2012f2355e4ce08bca44aeb3abbb21cf88d33f"
integrity sha512-KPcKqKm5UKDkaYPTuXSx8wEP7vE9GnuaXIZKijwRYcePpZFDVuy2a57LarFKiORbHOuTOOwYzxVxcUzsh2P2Pw==
+"@types/node@>=13.13.4":
+ version "14.14.22"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.22.tgz#0d29f382472c4ccf3bd96ff0ce47daf5b7b84b18"
+ integrity sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw==
+
"@types/node@>=8.0.0 <15":
version "14.14.20"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.20.tgz#f7974863edd21d1f8a494a73e8e2b3658615c340"
@@ -1278,6 +1283,17 @@ app-builder-lib@22.9.1:
semver "^7.3.2"
temp-file "^3.3.7"
+arangojs@^7.2.0:
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/arangojs/-/arangojs-7.2.0.tgz#e576926b4b3469c5a130cceba45fada8b5f015d1"
+ integrity sha512-9mQRCcttaG0lckapNF9TA71ZU7H2ATXK2a1w+0fj+Y4TlTP1bNDMIz3ZN+EnaSgEtwVu0rb6N6Ac97Yd56GmkQ==
+ dependencies:
+ "@types/node" ">=13.13.4"
+ es6-error "^4.0.1"
+ multi-part "^3.0.0"
+ x3-linkedlist "1.2.0"
+ xhr "^2.4.1"
+
archive-type@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/archive-type/-/archive-type-4.0.0.tgz#f92e72233056dfc6969472749c267bdb046b1d70"
@@ -2759,7 +2775,7 @@ es3ify@^0.2.2:
jstransform "~11.0.0"
through "~2.3.4"
-es6-error@^4.1.1:
+es6-error@^4.0.1, es6-error@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d"
integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==
@@ -3173,6 +3189,11 @@ file-type@^11.1.0:
resolved "https://registry.yarnpkg.com/file-type/-/file-type-11.1.0.tgz#93780f3fed98b599755d846b99a1617a2ad063b8"
integrity sha512-rM0UO7Qm9K7TWTtA6AShI/t7H5BPjDeGVDaNyg9BjHAj3PysKy7+8C8D137R88jnR3rFJZQB/tFgydl5sN5m7g==
+file-type@^12.1.0:
+ version "12.4.2"
+ resolved "https://registry.yarnpkg.com/file-type/-/file-type-12.4.2.tgz#a344ea5664a1d01447ee7fb1b635f72feb6169d9"
+ integrity sha512-UssQP5ZgIOKelfsaB5CuGAL+Y+q7EmONuiwF3N5HAH0t27rvrttgi6Ra9k/+DVaY9UF6+ybxu5pOXLUdA8N7Vg==
+
file-type@^3.8.0:
version "3.9.0"
resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9"
@@ -3524,6 +3545,14 @@ global@~4.3.0:
min-document "^2.19.0"
process "~0.5.1"
+global@~4.4.0:
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406"
+ integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==
+ dependencies:
+ min-document "^2.19.0"
+ process "^0.11.10"
+
globals@^11.1.0:
version "11.12.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e"
@@ -5441,11 +5470,19 @@ mime-db@1.44.0:
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92"
integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==
-"mime-db@>= 1.43.0 < 2", mime-db@^1.28.0:
+mime-db@1.45.0, "mime-db@>= 1.43.0 < 2", mime-db@^1.28.0:
version "1.45.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.45.0.tgz#cceeda21ccd7c3a745eba2decd55d4b73e7879ea"
integrity sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==
+mime-kind@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/mime-kind/-/mime-kind-3.0.0.tgz#23bb3aba03ed6a1ea8c4f6093a9c7ab7121a9cb2"
+ integrity sha512-sx9lClVP7GXY2mO3aVDWTQLhfvAdDvNhGi3o3g7+ae3aKaoybeGbEIlnreoRKjrbDpvlPltlkIryxOtatojeXQ==
+ dependencies:
+ file-type "^12.1.0"
+ mime-types "^2.1.24"
+
mime-types@^2.1.12, mime-types@^2.1.18, mime-types@~2.1.19, mime-types@~2.1.24:
version "2.1.27"
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f"
@@ -5453,6 +5490,13 @@ mime-types@^2.1.12, mime-types@^2.1.18, mime-types@~2.1.19, mime-types@~2.1.24:
dependencies:
mime-db "1.44.0"
+mime-types@^2.1.24:
+ version "2.1.28"
+ resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.28.tgz#1160c4757eab2c5363888e005273ecf79d2a0ecd"
+ integrity sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==
+ dependencies:
+ mime-db "1.45.0"
+
mime@^1.3.4, mime@^1.4.1:
version "1.6.0"
resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
@@ -5549,6 +5593,19 @@ mssql@^6.2.3:
tarn "^1.1.5"
tedious "^6.6.2"
+multi-part-lite@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/multi-part-lite/-/multi-part-lite-1.0.0.tgz#7b86baf8ff83ef20ca13f1269a0f35aec42b9000"
+ integrity sha512-KxIRbBZZ45hoKX1ROD/19wJr0ql1bef1rE8Y1PCwD3PuNXV42pp7Wo8lEHYuAajoT4vfAFcd3rPjlkyEEyt1nw==
+
+multi-part@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/multi-part/-/multi-part-3.0.0.tgz#2bde386e8c1dcc9f15a2277267a7f5ed13aa0cc0"
+ integrity sha512-pDbdYQ6DLDxAsD83w9R7r7rlW56cETL7hIB5bCWX7FJYw0K+kL5JwHr0I8tRk9lGeFcAzf+2OEzXWlG/4wCnFw==
+ dependencies:
+ mime-kind "^3.0.0"
+ multi-part-lite "^1.0.0"
+
mute-stream@0.0.8:
version "0.0.8"
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
@@ -6452,6 +6509,11 @@ process-nextick-args@~2.0.0:
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==
+process@^0.11.10:
+ version "0.11.10"
+ resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
+ integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI=
+
process@~0.5.1:
version "0.5.2"
resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf"
@@ -8264,6 +8326,11 @@ ws@^5.2.0:
dependencies:
async-limiter "~1.0.0"
+x3-linkedlist@1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/x3-linkedlist/-/x3-linkedlist-1.2.0.tgz#c70467559b7c748595f0f79222af1d709402699e"
+ integrity sha512-mH/YwxpYSKNa8bDNF1yOuZCMuV+K80LtDN8vcLDUAwNazCxptDNsYt+zA/EJeYiGbdtKposhKLZjErGVOR8mag==
+
xdg-basedir@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13"
@@ -8279,6 +8346,16 @@ xhr@^2.0.1:
parse-headers "^2.0.0"
xtend "^4.0.0"
+xhr@^2.4.1:
+ version "2.6.0"
+ resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.6.0.tgz#b69d4395e792b4173d6b7df077f0fc5e4e2b249d"
+ integrity sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA==
+ dependencies:
+ global "~4.4.0"
+ is-function "^1.0.1"
+ parse-headers "^2.0.0"
+ xtend "^4.0.0"
+
xml-name-validator@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a"
diff --git a/packages/standard-components/.npmignore b/packages/standard-components/.npmignore
deleted file mode 100644
index 81c5644598..0000000000
--- a/packages/standard-components/.npmignore
+++ /dev/null
@@ -1,3 +0,0 @@
-*
-!dist/*
-!components.json
\ No newline at end of file
diff --git a/packages/standard-components/package.json b/packages/standard-components/package.json
index b5b3a64888..51eda7815e 100644
--- a/packages/standard-components/package.json
+++ b/packages/standard-components/package.json
@@ -10,6 +10,11 @@
"start:dev": "sirv public --single --dev",
"dev:builder": "rollup -cw"
},
+ "files": [
+ "manifest.json",
+ "package.json",
+ "dist"
+ ],
"devDependencies": {
"@rollup/plugin-alias": "^3.1.1",
"@rollup/plugin-commonjs": "^16.0.0",
@@ -29,7 +34,7 @@
"keywords": [
"svelte"
],
- "version": "0.5.3",
+ "version": "0.6.2",
"license": "MIT",
"gitHead": "62ebf3cedcd7e9b2494b4f8cbcfb90927609b491",
"dependencies": {
diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json
index 77e8f7ded5..1ebebaaeec 100644
--- a/packages/string-templates/package.json
+++ b/packages/string-templates/package.json
@@ -1,6 +1,6 @@
{
"name": "@budibase/string-templates",
- "version": "0.5.3",
+ "version": "0.6.2",
"description": "Handlebars wrapper for Budibase templating.",
"main": "dist/bundle.js",
"module": "dist/bundle.js",
diff --git a/packages/worker/package.json b/packages/worker/package.json
index c53d4e9429..63d026e56b 100644
--- a/packages/worker/package.json
+++ b/packages/worker/package.json
@@ -1,7 +1,7 @@
{
"name": "@budibase/deployment",
"email": "hi@budibase.com",
- "version": "0.5.3",
+ "version": "0.6.2",
"description": "Budibase Deployment Server",
"main": "src/index.js",
"repository": {