Merge branch 'develop' into bug/sev3/automation-mysql-id-relationship-uri-decode
This commit is contained in:
commit
f51599f2a8
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "2.0.40-alpha.0",
|
"version": "2.0.40-alpha.3",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/backend-core",
|
"name": "@budibase/backend-core",
|
||||||
"version": "2.0.40-alpha.0",
|
"version": "2.0.40-alpha.3",
|
||||||
"description": "Budibase backend core libraries used in server and worker",
|
"description": "Budibase backend core libraries used in server and worker",
|
||||||
"main": "dist/src/index.js",
|
"main": "dist/src/index.js",
|
||||||
"types": "dist/src/index.d.ts",
|
"types": "dist/src/index.d.ts",
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
"test:watch": "jest --watchAll"
|
"test:watch": "jest --watchAll"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/types": "2.0.40-alpha.0",
|
"@budibase/types": "2.0.40-alpha.3",
|
||||||
"@shopify/jest-koa-mocks": "5.0.1",
|
"@shopify/jest-koa-mocks": "5.0.1",
|
||||||
"@techpass/passport-openidconnect": "0.3.2",
|
"@techpass/passport-openidconnect": "0.3.2",
|
||||||
"aws-sdk": "2.1030.0",
|
"aws-sdk": "2.1030.0",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/bbui",
|
"name": "@budibase/bbui",
|
||||||
"description": "A UI solution used in the different Budibase projects.",
|
"description": "A UI solution used in the different Budibase projects.",
|
||||||
"version": "2.0.40-alpha.0",
|
"version": "2.0.40-alpha.3",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"svelte": "src/index.js",
|
"svelte": "src/index.js",
|
||||||
"module": "dist/bbui.es.js",
|
"module": "dist/bbui.es.js",
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@adobe/spectrum-css-workflow-icons": "^1.2.1",
|
"@adobe/spectrum-css-workflow-icons": "^1.2.1",
|
||||||
"@budibase/string-templates": "2.0.40-alpha.0",
|
"@budibase/string-templates": "2.0.40-alpha.3",
|
||||||
"@spectrum-css/actionbutton": "^1.0.1",
|
"@spectrum-css/actionbutton": "^1.0.1",
|
||||||
"@spectrum-css/actiongroup": "^1.0.1",
|
"@spectrum-css/actiongroup": "^1.0.1",
|
||||||
"@spectrum-css/avatar": "^3.0.2",
|
"@spectrum-css/avatar": "^3.0.2",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/builder",
|
"name": "@budibase/builder",
|
||||||
"version": "2.0.40-alpha.0",
|
"version": "2.0.40-alpha.3",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -71,10 +71,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "2.0.40-alpha.0",
|
"@budibase/bbui": "2.0.40-alpha.3",
|
||||||
"@budibase/client": "2.0.40-alpha.0",
|
"@budibase/client": "2.0.40-alpha.3",
|
||||||
"@budibase/frontend-core": "2.0.40-alpha.0",
|
"@budibase/frontend-core": "2.0.40-alpha.3",
|
||||||
"@budibase/string-templates": "2.0.40-alpha.0",
|
"@budibase/string-templates": "2.0.40-alpha.3",
|
||||||
"@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": "@budibase/cli",
|
"name": "@budibase/cli",
|
||||||
"version": "2.0.40-alpha.0",
|
"version": "2.0.40-alpha.3",
|
||||||
"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": {
|
||||||
|
@ -26,9 +26,9 @@
|
||||||
"outputPath": "build"
|
"outputPath": "build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/backend-core": "2.0.40-alpha.0",
|
"@budibase/backend-core": "2.0.40-alpha.3",
|
||||||
"@budibase/string-templates": "2.0.40-alpha.0",
|
"@budibase/string-templates": "2.0.40-alpha.3",
|
||||||
"@budibase/types": "2.0.40-alpha.0",
|
"@budibase/types": "2.0.40-alpha.3",
|
||||||
"axios": "0.21.2",
|
"axios": "0.21.2",
|
||||||
"chalk": "4.1.0",
|
"chalk": "4.1.0",
|
||||||
"cli-progress": "3.11.2",
|
"cli-progress": "3.11.2",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/client",
|
"name": "@budibase/client",
|
||||||
"version": "2.0.40-alpha.0",
|
"version": "2.0.40-alpha.3",
|
||||||
"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",
|
||||||
|
@ -19,9 +19,9 @@
|
||||||
"dev:builder": "rollup -cw"
|
"dev:builder": "rollup -cw"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "2.0.40-alpha.0",
|
"@budibase/bbui": "2.0.40-alpha.3",
|
||||||
"@budibase/frontend-core": "2.0.40-alpha.0",
|
"@budibase/frontend-core": "2.0.40-alpha.3",
|
||||||
"@budibase/string-templates": "2.0.40-alpha.0",
|
"@budibase/string-templates": "2.0.40-alpha.3",
|
||||||
"@spectrum-css/button": "^3.0.3",
|
"@spectrum-css/button": "^3.0.3",
|
||||||
"@spectrum-css/card": "^3.0.3",
|
"@spectrum-css/card": "^3.0.3",
|
||||||
"@spectrum-css/divider": "^1.0.3",
|
"@spectrum-css/divider": "^1.0.3",
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/frontend-core",
|
"name": "@budibase/frontend-core",
|
||||||
"version": "2.0.40-alpha.0",
|
"version": "2.0.40-alpha.3",
|
||||||
"description": "Budibase frontend core libraries used in builder and client",
|
"description": "Budibase frontend core libraries used in builder and client",
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"svelte": "src/index.js",
|
"svelte": "src/index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "2.0.40-alpha.0",
|
"@budibase/bbui": "2.0.40-alpha.3",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"svelte": "^3.46.2"
|
"svelte": "^3.46.2"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/sdk",
|
"name": "@budibase/sdk",
|
||||||
"version": "2.0.40-alpha.0",
|
"version": "2.0.40-alpha.3",
|
||||||
"description": "Budibase Public API SDK",
|
"description": "Budibase Public API SDK",
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
|
|
|
@ -37,6 +37,20 @@ module AwsMock {
|
||||||
Contents: {},
|
Contents: {},
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
|
this.createBucket = jest.fn(
|
||||||
|
response({
|
||||||
|
Contents: {},
|
||||||
|
})
|
||||||
|
)
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
|
this.deleteObjects = jest.fn(
|
||||||
|
response({
|
||||||
|
Contents: {},
|
||||||
|
})
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
aws.DynamoDB = { DocumentClient }
|
aws.DynamoDB = { DocumentClient }
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/server",
|
"name": "@budibase/server",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "2.0.40-alpha.0",
|
"version": "2.0.40-alpha.3",
|
||||||
"description": "Budibase Web Server",
|
"description": "Budibase Web Server",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -77,11 +77,11 @@
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apidevtools/swagger-parser": "10.0.3",
|
"@apidevtools/swagger-parser": "10.0.3",
|
||||||
"@budibase/backend-core": "2.0.40-alpha.0",
|
"@budibase/backend-core": "2.0.40-alpha.3",
|
||||||
"@budibase/client": "2.0.40-alpha.0",
|
"@budibase/client": "2.0.40-alpha.3",
|
||||||
"@budibase/pro": "2.0.40-alpha.0",
|
"@budibase/pro": "2.0.40-alpha.3",
|
||||||
"@budibase/string-templates": "2.0.40-alpha.0",
|
"@budibase/string-templates": "2.0.40-alpha.3",
|
||||||
"@budibase/types": "2.0.40-alpha.0",
|
"@budibase/types": "2.0.40-alpha.3",
|
||||||
"@bull-board/api": "3.7.0",
|
"@bull-board/api": "3.7.0",
|
||||||
"@bull-board/koa": "3.9.4",
|
"@bull-board/koa": "3.9.4",
|
||||||
"@elastic/elasticsearch": "7.10.0",
|
"@elastic/elasticsearch": "7.10.0",
|
||||||
|
|
|
@ -5,10 +5,13 @@ import {
|
||||||
IntegrationBase,
|
IntegrationBase,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
|
|
||||||
const { Client } = require("@elastic/elasticsearch")
|
import { Client, ClientOptions } from "@elastic/elasticsearch"
|
||||||
|
|
||||||
interface ElasticsearchConfig {
|
interface ElasticsearchConfig {
|
||||||
url: string
|
url: string
|
||||||
|
ssl?: boolean
|
||||||
|
ca?: string
|
||||||
|
rejectUnauthorized?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const SCHEMA: Integration = {
|
const SCHEMA: Integration = {
|
||||||
|
@ -23,6 +26,21 @@ const SCHEMA: Integration = {
|
||||||
required: true,
|
required: true,
|
||||||
default: "http://localhost:9200",
|
default: "http://localhost:9200",
|
||||||
},
|
},
|
||||||
|
ssl: {
|
||||||
|
type: DatasourceFieldType.BOOLEAN,
|
||||||
|
default: false,
|
||||||
|
required: false,
|
||||||
|
},
|
||||||
|
rejectUnauthorized: {
|
||||||
|
type: DatasourceFieldType.BOOLEAN,
|
||||||
|
default: true,
|
||||||
|
required: false,
|
||||||
|
},
|
||||||
|
ca: {
|
||||||
|
type: DatasourceFieldType.LONGFORM,
|
||||||
|
default: false,
|
||||||
|
required: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
query: {
|
query: {
|
||||||
create: {
|
create: {
|
||||||
|
@ -81,7 +99,19 @@ class ElasticSearchIntegration implements IntegrationBase {
|
||||||
|
|
||||||
constructor(config: ElasticsearchConfig) {
|
constructor(config: ElasticsearchConfig) {
|
||||||
this.config = config
|
this.config = config
|
||||||
this.client = new Client({ node: config.url })
|
|
||||||
|
const clientConfig: ClientOptions = {
|
||||||
|
node: this.config.url,
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.config.ssl) {
|
||||||
|
clientConfig.ssl = {
|
||||||
|
rejectUnauthorized: this.config.rejectUnauthorized,
|
||||||
|
ca: this.config.ca || undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.client = new Client(clientConfig)
|
||||||
}
|
}
|
||||||
|
|
||||||
async create(query: { index: string; json: object }) {
|
async create(query: { index: string; json: object }) {
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
import { Integration, QueryType, IntegrationBase } from "@budibase/types"
|
import {
|
||||||
|
Integration,
|
||||||
|
QueryType,
|
||||||
|
IntegrationBase,
|
||||||
|
DatasourceFieldType,
|
||||||
|
} from "@budibase/types"
|
||||||
|
|
||||||
const AWS = require("aws-sdk")
|
const AWS = require("aws-sdk")
|
||||||
|
const csv = require("csvtojson")
|
||||||
|
|
||||||
interface S3Config {
|
interface S3Config {
|
||||||
region: string
|
region: string
|
||||||
|
@ -40,13 +47,103 @@ const SCHEMA: Integration = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
query: {
|
query: {
|
||||||
|
create: {
|
||||||
|
type: QueryType.FIELDS,
|
||||||
|
fields: {
|
||||||
|
bucket: {
|
||||||
|
display: "New Bucket",
|
||||||
|
type: DatasourceFieldType.STRING,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
location: {
|
||||||
|
required: true,
|
||||||
|
default: "us-east-1",
|
||||||
|
type: DatasourceFieldType.STRING,
|
||||||
|
},
|
||||||
|
grantFullControl: {
|
||||||
|
display: "Grant full control",
|
||||||
|
type: DatasourceFieldType.STRING,
|
||||||
|
},
|
||||||
|
grantRead: {
|
||||||
|
display: "Grant read",
|
||||||
|
type: DatasourceFieldType.STRING,
|
||||||
|
},
|
||||||
|
grantReadAcp: {
|
||||||
|
display: "Grant read ACP",
|
||||||
|
type: DatasourceFieldType.STRING,
|
||||||
|
},
|
||||||
|
grantWrite: {
|
||||||
|
display: "Grant write",
|
||||||
|
type: DatasourceFieldType.STRING,
|
||||||
|
},
|
||||||
|
grantWriteAcp: {
|
||||||
|
display: "Grant write ACP",
|
||||||
|
type: DatasourceFieldType.STRING,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
read: {
|
read: {
|
||||||
type: QueryType.FIELDS,
|
type: QueryType.FIELDS,
|
||||||
fields: {
|
fields: {
|
||||||
bucket: {
|
bucket: {
|
||||||
type: "string",
|
type: DatasourceFieldType.STRING,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
delimiter: {
|
||||||
|
type: DatasourceFieldType.STRING,
|
||||||
|
},
|
||||||
|
marker: {
|
||||||
|
type: DatasourceFieldType.STRING,
|
||||||
|
},
|
||||||
|
maxKeys: {
|
||||||
|
type: DatasourceFieldType.NUMBER,
|
||||||
|
display: "Max Keys",
|
||||||
|
},
|
||||||
|
prefix: {
|
||||||
|
type: DatasourceFieldType.STRING,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
readCsv: {
|
||||||
|
displayName: "Read CSV",
|
||||||
|
type: QueryType.FIELDS,
|
||||||
|
fields: {
|
||||||
|
bucket: {
|
||||||
|
type: DatasourceFieldType.STRING,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
key: {
|
||||||
|
type: DatasourceFieldType.STRING,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
delete: {
|
||||||
|
type: QueryType.FIELDS,
|
||||||
|
fields: {
|
||||||
|
bucket: {
|
||||||
|
type: DatasourceFieldType.STRING,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
delete: {
|
||||||
|
type: DatasourceFieldType.JSON,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
extra: {
|
||||||
|
acl: {
|
||||||
|
required: false,
|
||||||
|
displayName: "ACL",
|
||||||
|
type: DatasourceFieldType.LIST,
|
||||||
|
data: {
|
||||||
|
create: [
|
||||||
|
"private",
|
||||||
|
"public-read",
|
||||||
|
"public-read-write",
|
||||||
|
"authenticated-read",
|
||||||
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -67,14 +164,93 @@ class S3Integration implements IntegrationBase {
|
||||||
this.client = new AWS.S3(this.config)
|
this.client = new AWS.S3(this.config)
|
||||||
}
|
}
|
||||||
|
|
||||||
async read(query: { bucket: string }) {
|
async create(query: {
|
||||||
|
bucket: string
|
||||||
|
location: string
|
||||||
|
grantFullControl: string
|
||||||
|
grantRead: string
|
||||||
|
grantReadAcp: string
|
||||||
|
grantWrite: string
|
||||||
|
grantWriteAcp: string
|
||||||
|
extra: {
|
||||||
|
acl: string
|
||||||
|
}
|
||||||
|
}) {
|
||||||
|
let params: any = {
|
||||||
|
Bucket: query.bucket,
|
||||||
|
ACL: query.extra?.acl,
|
||||||
|
GrantFullControl: query.grantFullControl,
|
||||||
|
GrantRead: query.grantRead,
|
||||||
|
GrantReadACP: query.grantReadAcp,
|
||||||
|
GrantWrite: query.grantWrite,
|
||||||
|
GrantWriteACP: query.grantWriteAcp,
|
||||||
|
}
|
||||||
|
if (query.location) {
|
||||||
|
params["CreateBucketConfiguration"] = {
|
||||||
|
LocationConstraint: query.location,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return await this.client.createBucket(params).promise()
|
||||||
|
}
|
||||||
|
|
||||||
|
async read(query: {
|
||||||
|
bucket: string
|
||||||
|
delimiter: string
|
||||||
|
expectedBucketOwner: string
|
||||||
|
marker: string
|
||||||
|
maxKeys: number
|
||||||
|
prefix: string
|
||||||
|
}) {
|
||||||
const response = await this.client
|
const response = await this.client
|
||||||
.listObjects({
|
.listObjects({
|
||||||
Bucket: query.bucket,
|
Bucket: query.bucket,
|
||||||
|
Delimiter: query.delimiter,
|
||||||
|
Marker: query.marker,
|
||||||
|
MaxKeys: query.maxKeys,
|
||||||
|
Prefix: query.prefix,
|
||||||
})
|
})
|
||||||
.promise()
|
.promise()
|
||||||
return response.Contents
|
return response.Contents
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async readCsv(query: { bucket: string; key: string }) {
|
||||||
|
const stream = this.client
|
||||||
|
.getObject({
|
||||||
|
Bucket: query.bucket,
|
||||||
|
Key: query.key,
|
||||||
|
})
|
||||||
|
.createReadStream()
|
||||||
|
|
||||||
|
let csvError = false
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
stream.on("error", (err: Error) => {
|
||||||
|
reject(err)
|
||||||
|
})
|
||||||
|
const response = csv()
|
||||||
|
.fromStream(stream)
|
||||||
|
.on("error", () => {
|
||||||
|
csvError = true
|
||||||
|
})
|
||||||
|
stream.on("finish", () => {
|
||||||
|
resolve(response)
|
||||||
|
})
|
||||||
|
}).catch(err => {
|
||||||
|
if (csvError) {
|
||||||
|
throw new Error("Could not read CSV")
|
||||||
|
} else {
|
||||||
|
throw err
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
async delete(query: { bucket: string; delete: string }) {
|
||||||
|
return await this.client
|
||||||
|
.deleteObjects({
|
||||||
|
Bucket: query.bucket,
|
||||||
|
Delete: JSON.parse(query.delete),
|
||||||
|
})
|
||||||
|
.promise()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
@ -18,11 +18,95 @@ describe("S3 Integration", () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
it("calls the read method with the correct params", async () => {
|
it("calls the read method with the correct params", async () => {
|
||||||
const response = await config.integration.read({
|
await config.integration.read({
|
||||||
bucket: "test",
|
bucket: "test",
|
||||||
|
delimiter: "/",
|
||||||
|
marker: "file.txt",
|
||||||
|
maxKeys: 999,
|
||||||
|
prefix: "directory/",
|
||||||
})
|
})
|
||||||
expect(config.integration.client.listObjects).toHaveBeenCalledWith({
|
expect(config.integration.client.listObjects).toHaveBeenCalledWith({
|
||||||
Bucket: "test",
|
Bucket: "test",
|
||||||
|
Delimiter: "/",
|
||||||
|
Marker: "file.txt",
|
||||||
|
MaxKeys: 999,
|
||||||
|
Prefix: "directory/",
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it("calls the create method with the correct params", async () => {
|
||||||
|
await config.integration.create({
|
||||||
|
bucket: "test",
|
||||||
|
location: "af-south-1",
|
||||||
|
grantFullControl: "me",
|
||||||
|
grantRead: "him",
|
||||||
|
grantReadAcp: "her",
|
||||||
|
grantWrite: "she",
|
||||||
|
grantWriteAcp: "he",
|
||||||
|
objectLockEnabledForBucket: true,
|
||||||
|
extra: {
|
||||||
|
acl: "private",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
expect(config.integration.client.createBucket).toHaveBeenCalledWith({
|
||||||
|
Bucket: "test",
|
||||||
|
CreateBucketConfiguration: {
|
||||||
|
LocationConstraint: "af-south-1",
|
||||||
|
},
|
||||||
|
GrantFullControl: "me",
|
||||||
|
GrantRead: "him",
|
||||||
|
GrantReadACP: "her",
|
||||||
|
GrantWrite: "she",
|
||||||
|
GrantWriteACP: "he",
|
||||||
|
ACL: "private",
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it("does not add undefined location constraint when calling the create method", async () => {
|
||||||
|
await config.integration.create({
|
||||||
|
bucket: "test",
|
||||||
|
})
|
||||||
|
expect(config.integration.client.createBucket).toHaveBeenCalledWith({
|
||||||
|
Bucket: "test",
|
||||||
|
GrantFullControl: undefined,
|
||||||
|
GrantRead: undefined,
|
||||||
|
GrantReadACP: undefined,
|
||||||
|
GrantWrite: undefined,
|
||||||
|
GrantWriteACP: undefined,
|
||||||
|
ACL: undefined,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it("calls the delete method with the correct params ", async () => {
|
||||||
|
await config.integration.delete({
|
||||||
|
bucket: "test",
|
||||||
|
delete: `{
|
||||||
|
"Objects": [
|
||||||
|
{
|
||||||
|
"Key": "HappyFace.jpg",
|
||||||
|
"VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "HappyFace.jpg",
|
||||||
|
"VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}`,
|
||||||
|
})
|
||||||
|
expect(config.integration.client.deleteObjects).toHaveBeenCalledWith({
|
||||||
|
Bucket: "test",
|
||||||
|
Delete: {
|
||||||
|
Objects: [
|
||||||
|
{
|
||||||
|
Key: "HappyFace.jpg",
|
||||||
|
VersionId: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Key: "HappyFace.jpg",
|
||||||
|
VersionId: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -1094,12 +1094,12 @@
|
||||||
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
||||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||||
|
|
||||||
"@budibase/backend-core@2.0.40-alpha.0":
|
"@budibase/backend-core@2.0.40-alpha.3":
|
||||||
version "2.0.40-alpha.0"
|
version "2.0.40-alpha.3"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.40-alpha.0.tgz#197df7756b8352bbda189e0f497b8df64a4a09de"
|
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.40-alpha.3.tgz#18572cf4c24a7e8e6b4158fc81ceeefde1f3117b"
|
||||||
integrity sha512-7HjMzpSMDcxgJwUrWvibK0Koj348JyAkMhtSjGxj7s8lhu+z9GcqiWNHssx5sdramShmbSkcNny5vnM+A9w+tQ==
|
integrity sha512-4h4GRAbCtLbKqAlaS7EoVzp2Jg/ny95oYsgvH/1kQLXMU67qHHrPtOctoeeQRhqMLrazQkOtt5EJrIA0m5yyyQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@budibase/types" "2.0.40-alpha.0"
|
"@budibase/types" "2.0.40-alpha.3"
|
||||||
"@shopify/jest-koa-mocks" "5.0.1"
|
"@shopify/jest-koa-mocks" "5.0.1"
|
||||||
"@techpass/passport-openidconnect" "0.3.2"
|
"@techpass/passport-openidconnect" "0.3.2"
|
||||||
aws-sdk "2.1030.0"
|
aws-sdk "2.1030.0"
|
||||||
|
@ -1181,13 +1181,13 @@
|
||||||
svelte-flatpickr "^3.2.3"
|
svelte-flatpickr "^3.2.3"
|
||||||
svelte-portal "^1.0.0"
|
svelte-portal "^1.0.0"
|
||||||
|
|
||||||
"@budibase/pro@2.0.40-alpha.0":
|
"@budibase/pro@2.0.40-alpha.3":
|
||||||
version "2.0.40-alpha.0"
|
version "2.0.40-alpha.3"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.40-alpha.0.tgz#748fdad163159cc04b5b2b3103179c9e3bb22ab1"
|
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.40-alpha.3.tgz#2803890c582dfca5852a7c17483d892f2404632f"
|
||||||
integrity sha512-brBVT2B/nzZw8iYnC6Xhu0+x3JprgEsN1s40tQaYbVAvXB6GuHCtnkJ6mDoGDB5xQTilNdx+xNfF/qpZQv7h9w==
|
integrity sha512-N8oqjC2kZ1rzgjYPxiJriOTHu4KT+g6GSzvMSQ7SLIi0BBENO7QWhQOK1S01vJX3a8oe0oLY3JfkzxrvWvKtSQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@budibase/backend-core" "2.0.40-alpha.0"
|
"@budibase/backend-core" "2.0.40-alpha.3"
|
||||||
"@budibase/types" "2.0.40-alpha.0"
|
"@budibase/types" "2.0.40-alpha.3"
|
||||||
"@koa/router" "8.0.8"
|
"@koa/router" "8.0.8"
|
||||||
bull "4.10.1"
|
bull "4.10.1"
|
||||||
joi "17.6.0"
|
joi "17.6.0"
|
||||||
|
@ -1211,10 +1211,10 @@
|
||||||
svelte-apexcharts "^1.0.2"
|
svelte-apexcharts "^1.0.2"
|
||||||
svelte-flatpickr "^3.1.0"
|
svelte-flatpickr "^3.1.0"
|
||||||
|
|
||||||
"@budibase/types@2.0.40-alpha.0":
|
"@budibase/types@2.0.40-alpha.3":
|
||||||
version "2.0.40-alpha.0"
|
version "2.0.40-alpha.3"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.40-alpha.0.tgz#22664329f7662cbf6fc4755f08fb1e6eed65f8c7"
|
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.40-alpha.3.tgz#2c1f9668f281a18e214626ccce2ce37fa7eb345a"
|
||||||
integrity sha512-Z/PZrzkiK4MfsngSzyYmCnYHcGmTQci6achej3q2qPtnG7+AZpmTDszovznMytfyNA+TMvFesECzBy1p+KBTDQ==
|
integrity sha512-bzmbOjVZZwPIBntM9j55EN4xhgeWVkw1zH3hRmgU3vB9t1tU1CDerWAXNktUgJdvI5YO/j7PPb0IsY/6WnYxcQ==
|
||||||
|
|
||||||
"@bull-board/api@3.7.0":
|
"@bull-board/api@3.7.0":
|
||||||
version "3.7.0"
|
version "3.7.0"
|
||||||
|
|
|
@ -625,7 +625,7 @@
|
||||||
"length"
|
"length"
|
||||||
],
|
],
|
||||||
"numArgs": 2,
|
"numArgs": 2,
|
||||||
"example": "{{ellipsis 'foo bar baz', 7}} -> foo bar…",
|
"example": "{{ellipsis 'foo bar baz' 7}} -> foo bar…",
|
||||||
"description": "<p>Truncates a string to the specified <code>length</code>, and appends it with an elipsis, <code>…</code>.</p>\n"
|
"description": "<p>Truncates a string to the specified <code>length</code>, and appends it with an elipsis, <code>…</code>.</p>\n"
|
||||||
},
|
},
|
||||||
"hyphenate": {
|
"hyphenate": {
|
||||||
|
@ -1219,4 +1219,4 @@
|
||||||
"description": "<p>Produce a humanized duration left/until given an amount of time and the type of time measurement.</p>\n"
|
"description": "<p>Produce a humanized duration left/until given an amount of time and the type of time measurement.</p>\n"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/string-templates",
|
"name": "@budibase/string-templates",
|
||||||
"version": "2.0.40-alpha.0",
|
"version": "2.0.40-alpha.3",
|
||||||
"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,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/types",
|
"name": "@budibase/types",
|
||||||
"version": "2.0.40-alpha.0",
|
"version": "2.0.40-alpha.3",
|
||||||
"description": "Budibase types",
|
"description": "Budibase types",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/worker",
|
"name": "@budibase/worker",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "2.0.40-alpha.0",
|
"version": "2.0.40-alpha.3",
|
||||||
"description": "Budibase background service",
|
"description": "Budibase background service",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -36,10 +36,10 @@
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/backend-core": "2.0.40-alpha.0",
|
"@budibase/backend-core": "2.0.40-alpha.3",
|
||||||
"@budibase/pro": "2.0.40-alpha.0",
|
"@budibase/pro": "2.0.40-alpha.3",
|
||||||
"@budibase/string-templates": "2.0.40-alpha.0",
|
"@budibase/string-templates": "2.0.40-alpha.3",
|
||||||
"@budibase/types": "2.0.40-alpha.0",
|
"@budibase/types": "2.0.40-alpha.3",
|
||||||
"@koa/router": "8.0.8",
|
"@koa/router": "8.0.8",
|
||||||
"@sentry/node": "6.17.7",
|
"@sentry/node": "6.17.7",
|
||||||
"@techpass/passport-openidconnect": "0.3.2",
|
"@techpass/passport-openidconnect": "0.3.2",
|
||||||
|
|
|
@ -291,12 +291,12 @@
|
||||||
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
||||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||||
|
|
||||||
"@budibase/backend-core@2.0.40-alpha.0":
|
"@budibase/backend-core@2.0.40-alpha.3":
|
||||||
version "2.0.40-alpha.0"
|
version "2.0.40-alpha.3"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.40-alpha.0.tgz#197df7756b8352bbda189e0f497b8df64a4a09de"
|
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.40-alpha.3.tgz#18572cf4c24a7e8e6b4158fc81ceeefde1f3117b"
|
||||||
integrity sha512-7HjMzpSMDcxgJwUrWvibK0Koj348JyAkMhtSjGxj7s8lhu+z9GcqiWNHssx5sdramShmbSkcNny5vnM+A9w+tQ==
|
integrity sha512-4h4GRAbCtLbKqAlaS7EoVzp2Jg/ny95oYsgvH/1kQLXMU67qHHrPtOctoeeQRhqMLrazQkOtt5EJrIA0m5yyyQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@budibase/types" "2.0.40-alpha.0"
|
"@budibase/types" "2.0.40-alpha.3"
|
||||||
"@shopify/jest-koa-mocks" "5.0.1"
|
"@shopify/jest-koa-mocks" "5.0.1"
|
||||||
"@techpass/passport-openidconnect" "0.3.2"
|
"@techpass/passport-openidconnect" "0.3.2"
|
||||||
aws-sdk "2.1030.0"
|
aws-sdk "2.1030.0"
|
||||||
|
@ -328,22 +328,22 @@
|
||||||
uuid "8.3.2"
|
uuid "8.3.2"
|
||||||
zlib "1.0.5"
|
zlib "1.0.5"
|
||||||
|
|
||||||
"@budibase/pro@2.0.40-alpha.0":
|
"@budibase/pro@2.0.40-alpha.3":
|
||||||
version "2.0.40-alpha.0"
|
version "2.0.40-alpha.3"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.40-alpha.0.tgz#748fdad163159cc04b5b2b3103179c9e3bb22ab1"
|
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.40-alpha.3.tgz#2803890c582dfca5852a7c17483d892f2404632f"
|
||||||
integrity sha512-brBVT2B/nzZw8iYnC6Xhu0+x3JprgEsN1s40tQaYbVAvXB6GuHCtnkJ6mDoGDB5xQTilNdx+xNfF/qpZQv7h9w==
|
integrity sha512-N8oqjC2kZ1rzgjYPxiJriOTHu4KT+g6GSzvMSQ7SLIi0BBENO7QWhQOK1S01vJX3a8oe0oLY3JfkzxrvWvKtSQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@budibase/backend-core" "2.0.40-alpha.0"
|
"@budibase/backend-core" "2.0.40-alpha.3"
|
||||||
"@budibase/types" "2.0.40-alpha.0"
|
"@budibase/types" "2.0.40-alpha.3"
|
||||||
"@koa/router" "8.0.8"
|
"@koa/router" "8.0.8"
|
||||||
bull "4.10.1"
|
bull "4.10.1"
|
||||||
joi "17.6.0"
|
joi "17.6.0"
|
||||||
node-fetch "^2.6.1"
|
node-fetch "^2.6.1"
|
||||||
|
|
||||||
"@budibase/types@2.0.40-alpha.0":
|
"@budibase/types@2.0.40-alpha.3":
|
||||||
version "2.0.40-alpha.0"
|
version "2.0.40-alpha.3"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.40-alpha.0.tgz#22664329f7662cbf6fc4755f08fb1e6eed65f8c7"
|
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.40-alpha.3.tgz#2c1f9668f281a18e214626ccce2ce37fa7eb345a"
|
||||||
integrity sha512-Z/PZrzkiK4MfsngSzyYmCnYHcGmTQci6achej3q2qPtnG7+AZpmTDszovznMytfyNA+TMvFesECzBy1p+KBTDQ==
|
integrity sha512-bzmbOjVZZwPIBntM9j55EN4xhgeWVkw1zH3hRmgU3vB9t1tU1CDerWAXNktUgJdvI5YO/j7PPb0IsY/6WnYxcQ==
|
||||||
|
|
||||||
"@cspotcode/source-map-consumer@0.8.0":
|
"@cspotcode/source-map-consumer@0.8.0":
|
||||||
version "0.8.0"
|
version "0.8.0"
|
||||||
|
|
Loading…
Reference in New Issue