Merge branch 'master' of github.com:budibase/budibase into demock-dynamodb
This commit is contained in:
commit
0897196c81
|
@ -9,6 +9,7 @@ import {
|
||||||
const DISABLED_EXTERNAL_INTEGRATIONS = [
|
const DISABLED_EXTERNAL_INTEGRATIONS = [
|
||||||
SourceName.AIRTABLE,
|
SourceName.AIRTABLE,
|
||||||
SourceName.BUDIBASE,
|
SourceName.BUDIBASE,
|
||||||
|
SourceName.ARANGODB,
|
||||||
]
|
]
|
||||||
|
|
||||||
export async function fetch(ctx: UserCtx<void, FetchIntegrationsResponse>) {
|
export async function fetch(ctx: UserCtx<void, FetchIntegrationsResponse>) {
|
||||||
|
|
|
@ -9,6 +9,11 @@ import {
|
||||||
|
|
||||||
import { Database, aql } from "arangojs"
|
import { Database, aql } from "arangojs"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated 3rd March 2025
|
||||||
|
* datasource disabled - this datasource is marked for deprecation and removal
|
||||||
|
*/
|
||||||
|
|
||||||
interface ArangodbConfig {
|
interface ArangodbConfig {
|
||||||
url: string
|
url: string
|
||||||
username: string
|
username: string
|
||||||
|
|
|
@ -33,15 +33,17 @@ const DEFINITIONS: Record<SourceName, Integration | undefined> = {
|
||||||
[SourceName.COUCHDB]: couchdb.schema,
|
[SourceName.COUCHDB]: couchdb.schema,
|
||||||
[SourceName.SQL_SERVER]: sqlServer.schema,
|
[SourceName.SQL_SERVER]: sqlServer.schema,
|
||||||
[SourceName.S3]: s3.schema,
|
[SourceName.S3]: s3.schema,
|
||||||
[SourceName.AIRTABLE]: airtable.schema,
|
|
||||||
[SourceName.MYSQL]: mysql.schema,
|
[SourceName.MYSQL]: mysql.schema,
|
||||||
[SourceName.ARANGODB]: arangodb.schema,
|
|
||||||
[SourceName.REST]: rest.schema,
|
[SourceName.REST]: rest.schema,
|
||||||
[SourceName.FIRESTORE]: firebase.schema,
|
[SourceName.FIRESTORE]: firebase.schema,
|
||||||
[SourceName.GOOGLE_SHEETS]: googlesheets.schema,
|
[SourceName.GOOGLE_SHEETS]: googlesheets.schema,
|
||||||
[SourceName.REDIS]: redis.schema,
|
[SourceName.REDIS]: redis.schema,
|
||||||
[SourceName.SNOWFLAKE]: snowflake.schema,
|
[SourceName.SNOWFLAKE]: snowflake.schema,
|
||||||
[SourceName.ORACLE]: oracle.schema,
|
[SourceName.ORACLE]: oracle.schema,
|
||||||
|
/* deprecated - not available through UI */
|
||||||
|
[SourceName.ARANGODB]: arangodb.schema,
|
||||||
|
[SourceName.AIRTABLE]: airtable.schema,
|
||||||
|
/* un-used */
|
||||||
[SourceName.BUDIBASE]: undefined,
|
[SourceName.BUDIBASE]: undefined,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,15 +58,17 @@ const INTEGRATIONS: Record<SourceName, IntegrationBaseConstructor | undefined> =
|
||||||
[SourceName.COUCHDB]: couchdb.integration,
|
[SourceName.COUCHDB]: couchdb.integration,
|
||||||
[SourceName.SQL_SERVER]: sqlServer.integration,
|
[SourceName.SQL_SERVER]: sqlServer.integration,
|
||||||
[SourceName.S3]: s3.integration,
|
[SourceName.S3]: s3.integration,
|
||||||
[SourceName.AIRTABLE]: airtable.integration,
|
|
||||||
[SourceName.MYSQL]: mysql.integration,
|
[SourceName.MYSQL]: mysql.integration,
|
||||||
[SourceName.ARANGODB]: arangodb.integration,
|
|
||||||
[SourceName.REST]: rest.integration,
|
[SourceName.REST]: rest.integration,
|
||||||
[SourceName.FIRESTORE]: firebase.integration,
|
[SourceName.FIRESTORE]: firebase.integration,
|
||||||
[SourceName.GOOGLE_SHEETS]: googlesheets.integration,
|
[SourceName.GOOGLE_SHEETS]: googlesheets.integration,
|
||||||
[SourceName.REDIS]: redis.integration,
|
[SourceName.REDIS]: redis.integration,
|
||||||
[SourceName.SNOWFLAKE]: snowflake.integration,
|
[SourceName.SNOWFLAKE]: snowflake.integration,
|
||||||
[SourceName.ORACLE]: oracle.integration,
|
[SourceName.ORACLE]: oracle.integration,
|
||||||
|
/* deprecated - not available through UI */
|
||||||
|
[SourceName.ARANGODB]: arangodb.integration,
|
||||||
|
[SourceName.AIRTABLE]: airtable.integration,
|
||||||
|
/* un-used */
|
||||||
[SourceName.BUDIBASE]: undefined,
|
[SourceName.BUDIBASE]: undefined,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
import { default as ArangoDBIntegration } from "../arangodb"
|
|
||||||
|
|
||||||
jest.mock("arangojs")
|
|
||||||
|
|
||||||
class TestConfiguration {
|
|
||||||
integration: any
|
|
||||||
|
|
||||||
constructor(config: any = {}) {
|
|
||||||
this.integration = new ArangoDBIntegration.integration(config)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
describe("ArangoDB Integration", () => {
|
|
||||||
let config: any
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
config = new TestConfiguration()
|
|
||||||
})
|
|
||||||
|
|
||||||
it("calls the create method with the correct params", async () => {
|
|
||||||
const body = {
|
|
||||||
json: "Hello",
|
|
||||||
}
|
|
||||||
|
|
||||||
await config.integration.create(body)
|
|
||||||
expect(config.integration.client.query).toHaveBeenCalledWith(
|
|
||||||
`INSERT Hello INTO collection RETURN NEW`
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
it("calls the read method with the correct params", async () => {
|
|
||||||
const query = {
|
|
||||||
sql: `test`,
|
|
||||||
}
|
|
||||||
await config.integration.read(query)
|
|
||||||
expect(config.integration.client.query).toHaveBeenCalledWith(query.sql)
|
|
||||||
})
|
|
||||||
})
|
|
Loading…
Reference in New Issue