merge with master
This commit is contained in:
commit
0b3110b223
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "0.8.16",
|
"version": "0.8.18",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/builder",
|
"name": "@budibase/builder",
|
||||||
"version": "0.8.16",
|
"version": "0.8.18",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -66,9 +66,9 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^1.58.13",
|
"@budibase/bbui": "^1.58.13",
|
||||||
"@budibase/client": "^0.8.16",
|
"@budibase/client": "^0.8.18",
|
||||||
"@budibase/colorpicker": "1.1.2",
|
"@budibase/colorpicker": "1.1.2",
|
||||||
"@budibase/string-templates": "^0.8.16",
|
"@budibase/string-templates": "^0.8.18",
|
||||||
"@sentry/browser": "5.19.1",
|
"@sentry/browser": "5.19.1",
|
||||||
"@spectrum-css/page": "^3.0.1",
|
"@spectrum-css/page": "^3.0.1",
|
||||||
"@spectrum-css/vars": "^3.0.1",
|
"@spectrum-css/vars": "^3.0.1",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "cli",
|
"name": "cli",
|
||||||
"version": "0.8.15",
|
"version": "0.8.18",
|
||||||
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/client",
|
"name": "@budibase/client",
|
||||||
"version": "0.8.16",
|
"version": "0.8.18",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"module": "dist/budibase-client.js",
|
"module": "dist/budibase-client.js",
|
||||||
"main": "dist/budibase-client.js",
|
"main": "dist/budibase-client.js",
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
"dev:builder": "rollup -cw"
|
"dev:builder": "rollup -cw"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/string-templates": "^0.8.16",
|
"@budibase/string-templates": "^0.8.18",
|
||||||
"regexparam": "^1.3.0",
|
"regexparam": "^1.3.0",
|
||||||
"shortid": "^2.2.15",
|
"shortid": "^2.2.15",
|
||||||
"svelte-spa-router": "^3.0.5"
|
"svelte-spa-router": "^3.0.5"
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rollup/plugin-commonjs": "^18.0.0",
|
"@rollup/plugin-commonjs": "^18.0.0",
|
||||||
"@rollup/plugin-node-resolve": "^11.2.1",
|
"@rollup/plugin-node-resolve": "^11.2.1",
|
||||||
"@budibase/standard-components": "^0.8.16",
|
"@budibase/standard-components": "^0.8.18",
|
||||||
"fs-extra": "^8.1.0",
|
"fs-extra": "^8.1.0",
|
||||||
"jsdom": "^16.0.1",
|
"jsdom": "^16.0.1",
|
||||||
"postcss": "^8.2.9",
|
"postcss": "^8.2.9",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/server",
|
"name": "@budibase/server",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "0.8.16",
|
"version": "0.8.18",
|
||||||
"description": "Budibase Web Server",
|
"description": "Budibase Web Server",
|
||||||
"main": "src/electron.js",
|
"main": "src/electron.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -80,8 +80,8 @@
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/auth": "^0.18.6",
|
"@budibase/auth": "^0.18.6",
|
||||||
"@budibase/client": "^0.8.16",
|
"@budibase/client": "^0.8.18",
|
||||||
"@budibase/string-templates": "^0.8.16",
|
"@budibase/string-templates": "^0.8.18",
|
||||||
"@elastic/elasticsearch": "7.10.0",
|
"@elastic/elasticsearch": "7.10.0",
|
||||||
"@koa/router": "8.0.0",
|
"@koa/router": "8.0.0",
|
||||||
"@sendgrid/mail": "7.1.1",
|
"@sendgrid/mail": "7.1.1",
|
||||||
|
@ -131,7 +131,7 @@
|
||||||
"zlib": "1.0.5"
|
"zlib": "1.0.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@budibase/standard-components": "^0.8.16",
|
"@budibase/standard-components": "^0.8.18",
|
||||||
"@jest/test-sequencer": "^24.8.0",
|
"@jest/test-sequencer": "^24.8.0",
|
||||||
"docker-compose": "^0.23.6",
|
"docker-compose": "^0.23.6",
|
||||||
"eslint": "^6.8.0",
|
"eslint": "^6.8.0",
|
||||||
|
|
|
@ -119,9 +119,8 @@ exports.preview = async function (ctx) {
|
||||||
|
|
||||||
const enrichedQuery = await enrichQueryFields(fields, parameters)
|
const enrichedQuery = await enrichQueryFields(fields, parameters)
|
||||||
|
|
||||||
const rows = formatResponse(
|
const integration = new Integration(datasource.config)
|
||||||
await new Integration(datasource.config)[queryVerb](enrichedQuery)
|
const rows = formatResponse(await integration[queryVerb](enrichedQuery))
|
||||||
)
|
|
||||||
|
|
||||||
// get all the potential fields in the schema
|
// get all the potential fields in the schema
|
||||||
const keys = rows.flatMap(Object.keys)
|
const keys = rows.flatMap(Object.keys)
|
||||||
|
@ -130,6 +129,10 @@ exports.preview = async function (ctx) {
|
||||||
rows,
|
rows,
|
||||||
schemaFields: [...new Set(keys)],
|
schemaFields: [...new Set(keys)],
|
||||||
}
|
}
|
||||||
|
// cleanup
|
||||||
|
if (integration.end) {
|
||||||
|
integration.end()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.execute = async function (ctx) {
|
exports.execute = async function (ctx) {
|
||||||
|
@ -149,10 +152,13 @@ exports.execute = async function (ctx) {
|
||||||
ctx.request.body.parameters
|
ctx.request.body.parameters
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const integration = new Integration(datasource.config)
|
||||||
// call the relevant CRUD method on the integration class
|
// call the relevant CRUD method on the integration class
|
||||||
ctx.body = formatResponse(
|
ctx.body = formatResponse(await integration[query.queryVerb](enrichedQuery))
|
||||||
await new Integration(datasource.config)[query.queryVerb](enrichedQuery)
|
// cleanup
|
||||||
)
|
if (integration.end) {
|
||||||
|
integration.end()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.destroy = async function (ctx) {
|
exports.destroy = async function (ctx) {
|
||||||
|
|
|
@ -2,6 +2,7 @@ let { merge } = require("lodash")
|
||||||
let env = require("../environment")
|
let env = require("../environment")
|
||||||
|
|
||||||
const AWS_REGION = env.AWS_REGION ? env.AWS_REGION : "eu-west-1"
|
const AWS_REGION = env.AWS_REGION ? env.AWS_REGION : "eu-west-1"
|
||||||
|
exports.AWS_REGION = AWS_REGION
|
||||||
|
|
||||||
const TableInfo = {
|
const TableInfo = {
|
||||||
API_KEYS: {
|
API_KEYS: {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
const AWS = require("aws-sdk")
|
const AWS = require("aws-sdk")
|
||||||
const { FIELD_TYPES, QUERY_TYPES } = require("./Integration")
|
const { FIELD_TYPES, QUERY_TYPES } = require("./Integration")
|
||||||
|
const { AWS_REGION } = require("../db/dynamoClient")
|
||||||
|
|
||||||
const SCHEMA = {
|
const SCHEMA = {
|
||||||
docs: "https://github.com/dabit3/dynamodb-documentclient-cheat-sheet",
|
docs: "https://github.com/dabit3/dynamodb-documentclient-cheat-sheet",
|
||||||
|
@ -16,7 +17,7 @@ const SCHEMA = {
|
||||||
type: FIELD_TYPES.PASSWORD,
|
type: FIELD_TYPES.PASSWORD,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
secretKey: {
|
secretAccessKey: {
|
||||||
type: FIELD_TYPES.PASSWORD,
|
type: FIELD_TYPES.PASSWORD,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
@ -114,10 +115,22 @@ class DynamoDBIntegration {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
async connect() {
|
end() {
|
||||||
|
this.disconnect()
|
||||||
|
}
|
||||||
|
|
||||||
|
connect() {
|
||||||
AWS.config.update(this.config)
|
AWS.config.update(this.config)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
disconnect() {
|
||||||
|
AWS.config.update({
|
||||||
|
secretAccessKey: undefined,
|
||||||
|
accessKeyId: undefined,
|
||||||
|
region: AWS_REGION,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
async create(query) {
|
async create(query) {
|
||||||
const params = {
|
const params = {
|
||||||
TableName: query.table,
|
TableName: query.table,
|
||||||
|
|
|
@ -306,11 +306,7 @@ class TestConfiguration {
|
||||||
return await this._req(config, null, controllers.layout.save)
|
return await this._req(config, null, controllers.layout.save)
|
||||||
}
|
}
|
||||||
|
|
||||||
async createUser(
|
async createUser(roleId = BUILTIN_ROLE_IDS.POWER) {
|
||||||
email = EMAIL,
|
|
||||||
password = PASSWORD,
|
|
||||||
roleId = BUILTIN_ROLE_IDS.POWER
|
|
||||||
) {
|
|
||||||
const globalId = `us_${Math.random()}`
|
const globalId = `us_${Math.random()}`
|
||||||
const resp = await this.globalUser(
|
const resp = await this.globalUser(
|
||||||
globalId,
|
globalId,
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"svelte"
|
"svelte"
|
||||||
],
|
],
|
||||||
"version": "0.8.16",
|
"version": "0.8.18",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"gitHead": "4b6efc42ed3273595c7a129411f4d883733d3321",
|
"gitHead": "4b6efc42ed3273595c7a129411f4d883733d3321",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/string-templates",
|
"name": "@budibase/string-templates",
|
||||||
"version": "0.8.16",
|
"version": "0.8.18",
|
||||||
"description": "Handlebars wrapper for Budibase templating.",
|
"description": "Handlebars wrapper for Budibase templating.",
|
||||||
"main": "src/index.cjs",
|
"main": "src/index.cjs",
|
||||||
"module": "dist/bundle.mjs",
|
"module": "dist/bundle.mjs",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/worker",
|
"name": "@budibase/worker",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "0.8.16",
|
"version": "0.8.18",
|
||||||
"description": "Budibase background service",
|
"description": "Budibase background service",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
Loading…
Reference in New Issue