@budibase/server 2.6.19-alpha.0 → 2.6.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/builder/assets/{index.07382a47.css → index.86c992bf.css} +2 -2
  2. package/builder/assets/{index.b9eeb2a8.js → index.b131b0de.js} +317 -309
  3. package/builder/index.html +2 -2
  4. package/dist/api/controllers/datasource.js +39 -70
  5. package/dist/api/controllers/integration.js +2 -2
  6. package/dist/api/routes/datasource.js +0 -1
  7. package/dist/automations/steps/make.js +5 -19
  8. package/dist/automations/steps/zapier.js +6 -19
  9. package/dist/db/dynamoClient.js +1 -1
  10. package/dist/integrations/airtable.js +2 -28
  11. package/dist/integrations/arangodb.js +3 -19
  12. package/dist/integrations/couchdb.js +1 -16
  13. package/dist/integrations/dynamodb.js +0 -16
  14. package/dist/integrations/elasticsearch.js +0 -15
  15. package/dist/integrations/firebase.js +0 -15
  16. package/dist/integrations/googlesheets.js +1 -30
  17. package/dist/integrations/index.js +2 -5
  18. package/dist/integrations/microsoftSqlServer.js +0 -16
  19. package/dist/integrations/mongodb.js +0 -16
  20. package/dist/integrations/mysql.js +5 -21
  21. package/dist/integrations/oracle.js +0 -29
  22. package/dist/integrations/postgres.js +7 -26
  23. package/dist/integrations/redis.js +1 -20
  24. package/dist/integrations/s3.js +4 -23
  25. package/dist/integrations/snowflake.js +0 -15
  26. package/dist/migrations/functions/backfill/app/queries.js +2 -1
  27. package/dist/sdk/app/datasources/datasources.js +3 -10
  28. package/dist/tsconfig.build.tsbuildinfo +1 -1
  29. package/jest.config.ts +3 -3
  30. package/nodemon.json +3 -7
  31. package/package.json +9 -10
  32. package/src/api/controllers/datasource.ts +49 -88
  33. package/src/api/controllers/integration.ts +3 -3
  34. package/src/api/routes/datasource.ts +0 -5
  35. package/src/automations/steps/make.ts +1 -18
  36. package/src/automations/steps/zapier.ts +1 -18
  37. package/src/automations/tests/zapier.spec.js +27 -0
  38. package/src/db/dynamoClient.ts +1 -1
  39. package/src/integration-test/postgres.spec.ts +1 -0
  40. package/src/integrations/airtable.ts +4 -31
  41. package/src/integrations/arangodb.ts +2 -18
  42. package/src/integrations/couchdb.ts +4 -18
  43. package/src/integrations/dynamodb.ts +5 -34
  44. package/src/integrations/elasticsearch.ts +1 -16
  45. package/src/integrations/firebase.ts +0 -15
  46. package/src/integrations/googlesheets.ts +2 -31
  47. package/src/integrations/index.ts +7 -12
  48. package/src/integrations/microsoftSqlServer.ts +0 -16
  49. package/src/integrations/mongodb.ts +0 -16
  50. package/src/integrations/mysql.ts +16 -27
  51. package/src/integrations/oracle.ts +6 -28
  52. package/src/integrations/postgres.ts +3 -21
  53. package/src/integrations/redis.ts +3 -26
  54. package/src/integrations/s3.ts +3 -19
  55. package/src/integrations/snowflake.ts +1 -20
  56. package/src/migrations/functions/backfill/app/queries.ts +1 -1
  57. package/src/sdk/app/datasources/datasources.ts +1 -7
  58. package/tsconfig.json +1 -1
  59. package/src/automations/tests/make.spec.ts +0 -54
  60. package/src/automations/tests/zapier.spec.ts +0 -56
@@ -13,7 +13,6 @@ import {
13
13
  import { cloneDeep } from "lodash/fp"
14
14
  import { getEnvironmentVariables } from "../../utils"
15
15
  import { getDefinitions, getDefinition } from "../../../integrations"
16
- import _ from "lodash"
17
16
 
18
17
  const ENV_VAR_PREFIX = "env."
19
18
 
@@ -42,7 +41,7 @@ async function enrichDatasourceWithValues(datasource: Datasource) {
42
41
  { onlyFound: true }
43
42
  ) as Datasource
44
43
  const definition = await getDefinition(processed.source)
45
- processed.config = checkDatasourceTypes(definition!, processed.config)
44
+ processed.config = checkDatasourceTypes(definition, processed.config)
46
45
  return {
47
46
  datasource: processed,
48
47
  envVars: env as Record<string, string>,
@@ -148,11 +147,6 @@ export function mergeConfigs(update: Datasource, old: Datasource) {
148
147
  }
149
148
  }
150
149
  }
151
-
152
- if (old.config?.auth) {
153
- update.config = _.merge(old.config, update.config)
154
- }
155
-
156
150
  // update back to actual passwords for everything else
157
151
  for (let [key, value] of Object.entries(update.config)) {
158
152
  if (value !== PASSWORD_REPLACEMENT) {
package/tsconfig.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "@budibase/backend-core": ["../backend-core/src"],
12
12
  "@budibase/backend-core/*": ["../backend-core/*"],
13
13
  "@budibase/shared-core": ["../shared-core/src"],
14
- "@budibase/pro": ["../pro/packages/pro/src"]
14
+ "@budibase/pro": ["../../../budibase-pro/packages/pro/src"]
15
15
  }
16
16
  },
17
17
  "ts-node": {
@@ -1,54 +0,0 @@
1
- import { getConfig, afterAll, runStep, actions } from "./utilities"
2
-
3
- describe("test the outgoing webhook action", () => {
4
- let config = getConfig()
5
-
6
- beforeAll(async () => {
7
- await config.init()
8
- })
9
-
10
- afterAll()
11
-
12
- it("should be able to run the action", async () => {
13
- const res = await runStep(actions.integromat.stepId, {
14
- value1: "test",
15
- url: "http://www.test.com",
16
- })
17
- expect(res.response.url).toEqual("http://www.test.com")
18
- expect(res.response.method).toEqual("post")
19
- expect(res.success).toEqual(true)
20
- })
21
-
22
- it("should add the payload props when a JSON string is provided", async () => {
23
- const payload = `{"value1":1,"value2":2,"value3":3,"value4":4,"value5":5,"name":"Adam","age":9}`
24
- const res = await runStep(actions.integromat.stepId, {
25
- value1: "ONE",
26
- value2: "TWO",
27
- value3: "THREE",
28
- value4: "FOUR",
29
- value5: "FIVE",
30
- body: {
31
- value: payload,
32
- },
33
- url: "http://www.test.com",
34
- })
35
- expect(res.response.url).toEqual("http://www.test.com")
36
- expect(res.response.method).toEqual("post")
37
- expect(res.response.body).toEqual(payload)
38
- expect(res.success).toEqual(true)
39
- })
40
-
41
- it("should return a 400 if the JSON payload string is malformed", async () => {
42
- const payload = `{ value1 1 }`
43
- const res = await runStep(actions.integromat.stepId, {
44
- value1: "ONE",
45
- body: {
46
- value: payload,
47
- },
48
- url: "http://www.test.com",
49
- })
50
- expect(res.httpStatus).toEqual(400)
51
- expect(res.response).toEqual("Invalid payload JSON")
52
- expect(res.success).toEqual(false)
53
- })
54
- })
@@ -1,56 +0,0 @@
1
- import { getConfig, afterAll, runStep, actions } from "./utilities"
2
-
3
- describe("test the outgoing webhook action", () => {
4
- let config = getConfig()
5
-
6
- beforeAll(async () => {
7
- await config.init()
8
- })
9
-
10
- afterAll()
11
-
12
- it("should be able to run the action", async () => {
13
- const res = await runStep(actions.zapier.stepId, {
14
- value1: "test",
15
- url: "http://www.test.com",
16
- })
17
- expect(res.response.url).toEqual("http://www.test.com")
18
- expect(res.response.method).toEqual("post")
19
- expect(res.success).toEqual(true)
20
- })
21
-
22
- it("should add the payload props when a JSON string is provided", async () => {
23
- const payload = `{ "value1": 1, "value2": 2, "value3": 3, "value4": 4, "value5": 5, "name": "Adam", "age": 9 }`
24
- const res = await runStep(actions.zapier.stepId, {
25
- value1: "ONE",
26
- value2: "TWO",
27
- value3: "THREE",
28
- value4: "FOUR",
29
- value5: "FIVE",
30
- body: {
31
- value: payload,
32
- },
33
- url: "http://www.test.com",
34
- })
35
- expect(res.response.url).toEqual("http://www.test.com")
36
- expect(res.response.method).toEqual("post")
37
- expect(res.response.body).toEqual(
38
- `{"platform":"budibase","value1":1,"value2":2,"value3":3,"value4":4,"value5":5,"name":"Adam","age":9}`
39
- )
40
- expect(res.success).toEqual(true)
41
- })
42
-
43
- it("should return a 400 if the JSON payload string is malformed", async () => {
44
- const payload = `{ value1 1 }`
45
- const res = await runStep(actions.zapier.stepId, {
46
- value1: "ONE",
47
- body: {
48
- value: payload,
49
- },
50
- url: "http://www.test.com",
51
- })
52
- expect(res.httpStatus).toEqual(400)
53
- expect(res.response).toEqual("Invalid payload JSON")
54
- expect(res.success).toEqual(false)
55
- })
56
- })