@budibase/server 1.0.110 → 1.0.113
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.
- package/builder/assets/{index.6bb639ff.js → index.e3e5909b.js} +1 -1
- package/builder/index.html +1 -1
- package/coverage/clover.xml +73 -72
- package/coverage/coverage-final.json +1 -1
- package/coverage/lcov-report/api/controllers/analytics.js.html +1 -1
- package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/controllers/application.js.html +1 -1
- package/coverage/lcov-report/api/controllers/auth.js.html +1 -1
- package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
- package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
- package/coverage/lcov-report/api/controllers/component.js.html +1 -1
- package/coverage/lcov-report/api/controllers/datasource.js.html +1 -1
- package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
- package/coverage/lcov-report/api/controllers/index.html +1 -1
- package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
- package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
- package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
- package/coverage/lcov-report/api/controllers/migrations.js.html +1 -1
- package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
- package/coverage/lcov-report/api/controllers/query/index.html +1 -1
- package/coverage/lcov-report/api/controllers/query/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/role.js.html +1 -1
- package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/index.html +1 -1
- package/coverage/lcov-report/api/controllers/row/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/screen.js.html +1 -1
- package/coverage/lcov-report/api/controllers/script.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/internal.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
- package/coverage/lcov-report/api/controllers/user.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
- package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
- package/coverage/lcov-report/api/index.html +1 -1
- package/coverage/lcov-report/api/index.js.html +1 -1
- package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
- package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/routes/application.js.html +1 -1
- package/coverage/lcov-report/api/routes/auth.js.html +1 -1
- package/coverage/lcov-report/api/routes/automation.js.html +1 -1
- package/coverage/lcov-report/api/routes/backup.js.html +1 -1
- package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
- package/coverage/lcov-report/api/routes/component.js.html +1 -1
- package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
- package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
- package/coverage/lcov-report/api/routes/dev.js.html +1 -1
- package/coverage/lcov-report/api/routes/index.html +1 -1
- package/coverage/lcov-report/api/routes/index.js.html +1 -1
- package/coverage/lcov-report/api/routes/integration.js.html +1 -1
- package/coverage/lcov-report/api/routes/layout.js.html +1 -1
- package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
- package/coverage/lcov-report/api/routes/migrations.js.html +1 -1
- package/coverage/lcov-report/api/routes/permission.js.html +1 -1
- package/coverage/lcov-report/api/routes/query.js.html +1 -1
- package/coverage/lcov-report/api/routes/role.js.html +1 -1
- package/coverage/lcov-report/api/routes/routing.js.html +1 -1
- package/coverage/lcov-report/api/routes/row.js.html +1 -1
- package/coverage/lcov-report/api/routes/screen.js.html +1 -1
- package/coverage/lcov-report/api/routes/script.js.html +1 -1
- package/coverage/lcov-report/api/routes/static.js.html +1 -1
- package/coverage/lcov-report/api/routes/table.js.html +1 -1
- package/coverage/lcov-report/api/routes/templates.js.html +1 -1
- package/coverage/lcov-report/api/routes/user.js.html +1 -1
- package/coverage/lcov-report/api/routes/utils/index.html +1 -1
- package/coverage/lcov-report/api/routes/utils/validators.js.html +1 -1
- package/coverage/lcov-report/api/routes/view.js.html +1 -1
- package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/actions.js.html +1 -1
- package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
- package/coverage/lcov-report/automations/bullboard.js.html +1 -1
- package/coverage/lcov-report/automations/index.html +1 -1
- package/coverage/lcov-report/automations/index.js.html +1 -1
- package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
- package/coverage/lcov-report/automations/steps/createRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
- package/coverage/lcov-report/automations/steps/deleteRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
- package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
- package/coverage/lcov-report/automations/steps/index.html +1 -1
- package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
- package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
- package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
- package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
- package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
- package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
- package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
- package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/triggers.js.html +1 -1
- package/coverage/lcov-report/automations/utils.js.html +1 -1
- package/coverage/lcov-report/constants/index.html +1 -1
- package/coverage/lcov-report/constants/index.js.html +1 -1
- package/coverage/lcov-report/constants/layouts.js.html +1 -1
- package/coverage/lcov-report/constants/screens.js.html +1 -1
- package/coverage/lcov-report/db/client.js.html +1 -1
- package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
- package/coverage/lcov-report/db/index.html +1 -1
- package/coverage/lcov-report/db/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
- package/coverage/lcov-report/db/newid.js.html +1 -1
- package/coverage/lcov-report/db/utils.js.html +1 -1
- package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
- package/coverage/lcov-report/events/index.html +1 -1
- package/coverage/lcov-report/events/index.js.html +1 -1
- package/coverage/lcov-report/events/utils.js.html +1 -1
- package/coverage/lcov-report/index.html +8 -8
- package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
- package/coverage/lcov-report/integrations/tests/index.html +1 -1
- package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
- package/coverage/lcov-report/middleware/authorized.js.html +1 -1
- package/coverage/lcov-report/middleware/builder.js.html +1 -1
- package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
- package/coverage/lcov-report/middleware/index.html +1 -1
- package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
- package/coverage/lcov-report/middleware/publicApi.js.html +1 -1
- package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
- package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
- package/coverage/lcov-report/middleware/usageQuota.js.html +1 -1
- package/coverage/lcov-report/middleware/utils.js.html +1 -1
- package/coverage/lcov-report/threads/automation.js.html +1 -1
- package/coverage/lcov-report/threads/index.html +1 -1
- package/coverage/lcov-report/threads/index.js.html +1 -1
- package/coverage/lcov-report/threads/query.js.html +1 -1
- package/coverage/lcov-report/threads/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/bcrypt.js.html +1 -1
- package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
- package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
- package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
- package/coverage/lcov-report/utilities/global.js.html +1 -1
- package/coverage/lcov-report/utilities/index.html +11 -11
- package/coverage/lcov-report/utilities/index.js.html +32 -26
- package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
- package/coverage/lcov-report/utilities/security.js.html +1 -1
- package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/index.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
- package/coverage/lcov-report/utilities/users.js.html +1 -1
- package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
- package/coverage/lcov.info +111 -110
- package/dist/environment.js +6 -1
- package/dist/integrations/dynamodb.js +2 -1
- package/dist/integrations/mysql.js +2 -1
- package/dist/package.json +4 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utilities/index.js +1 -0
- package/package.json +5 -5
- package/src/environment.js +7 -1
- package/src/integrations/dynamodb.ts +2 -1
- package/src/integrations/mysql.ts +2 -1
- package/src/utilities/index.js +2 -0
package/dist/utilities/index.js
CHANGED
|
@@ -17,6 +17,7 @@ const { getAppDB } = require("@budibase/backend-core/context");
|
|
|
17
17
|
const BB_CDN = "https://cdn.budi.live";
|
|
18
18
|
exports.wait = ms => new Promise(resolve => setTimeout(resolve, ms));
|
|
19
19
|
exports.isDev = env.isDev;
|
|
20
|
+
exports.NUMBER_REGEX = /^[+-]?([0-9]*[.])?[0-9]+$/g;
|
|
20
21
|
exports.removeFromArray = (array, element) => {
|
|
21
22
|
const index = array.indexOf(element);
|
|
22
23
|
if (index !== -1) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/server",
|
|
3
3
|
"email": "hi@budibase.com",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.113",
|
|
5
5
|
"description": "Budibase Web Server",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -68,9 +68,9 @@
|
|
|
68
68
|
"license": "GPL-3.0",
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@apidevtools/swagger-parser": "^10.0.3",
|
|
71
|
-
"@budibase/backend-core": "^1.0.
|
|
72
|
-
"@budibase/client": "^1.0.
|
|
73
|
-
"@budibase/string-templates": "^1.0.
|
|
71
|
+
"@budibase/backend-core": "^1.0.113",
|
|
72
|
+
"@budibase/client": "^1.0.113",
|
|
73
|
+
"@budibase/string-templates": "^1.0.113",
|
|
74
74
|
"@bull-board/api": "^3.7.0",
|
|
75
75
|
"@bull-board/koa": "^3.7.0",
|
|
76
76
|
"@elastic/elasticsearch": "7.10.0",
|
|
@@ -174,5 +174,5 @@
|
|
|
174
174
|
"optionalDependencies": {
|
|
175
175
|
"oracledb": "^5.3.0"
|
|
176
176
|
},
|
|
177
|
-
"gitHead": "
|
|
177
|
+
"gitHead": "20852c30cca5054eb7ef8bacdb91343a56be0d30"
|
|
178
178
|
}
|
package/src/environment.js
CHANGED
|
@@ -24,6 +24,12 @@ if (!LOADED && isDev() && !isTest()) {
|
|
|
24
24
|
LOADED = true
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
function parseIntSafe(number) {
|
|
28
|
+
if (number) {
|
|
29
|
+
return parseInt(number)
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
27
33
|
let inThread = false
|
|
28
34
|
|
|
29
35
|
module.exports = {
|
|
@@ -62,6 +68,7 @@ module.exports = {
|
|
|
62
68
|
SENDGRID_API_KEY: process.env.SENDGRID_API_KEY,
|
|
63
69
|
DYNAMO_ENDPOINT: process.env.DYNAMO_ENDPOINT,
|
|
64
70
|
POSTHOG_TOKEN: process.env.POSTHOG_TOKEN,
|
|
71
|
+
QUERY_THREAD_TIMEOUT: parseIntSafe(process.env.QUERY_THREAD_TIMEOUT),
|
|
65
72
|
// old - to remove
|
|
66
73
|
CLIENT_ID: process.env.CLIENT_ID,
|
|
67
74
|
BUDIBASE_DIR: process.env.BUDIBASE_DIR,
|
|
@@ -71,7 +78,6 @@ module.exports = {
|
|
|
71
78
|
DEPLOYMENT_CREDENTIALS_URL: process.env.DEPLOYMENT_CREDENTIALS_URL,
|
|
72
79
|
ALLOW_DEV_AUTOMATIONS: process.env.ALLOW_DEV_AUTOMATIONS,
|
|
73
80
|
DISABLE_THREADING: process.env.DISABLE_THREADING,
|
|
74
|
-
QUERY_THREAD_TIMEOUT: process.env.QUERY_THREAD_TIMEOUT,
|
|
75
81
|
SQL_MAX_ROWS: process.env.SQL_MAX_ROWS,
|
|
76
82
|
_set(key, value) {
|
|
77
83
|
process.env[key] = value
|
|
@@ -131,11 +131,12 @@ module DynamoModule {
|
|
|
131
131
|
|
|
132
132
|
constructor(config: DynamoDBConfig) {
|
|
133
133
|
this.config = config
|
|
134
|
-
if (!this.config.endpoint) {
|
|
134
|
+
if (this.config.endpoint && !this.config.endpoint.includes("localhost")) {
|
|
135
135
|
this.connect()
|
|
136
136
|
}
|
|
137
137
|
let options = {
|
|
138
138
|
correctClockSkew: true,
|
|
139
|
+
region: this.config.region || AWS_REGION,
|
|
139
140
|
endpoint: config.endpoint ? config.endpoint : undefined,
|
|
140
141
|
}
|
|
141
142
|
this.client = new AWS.DynamoDB.DocumentClient(options)
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
} from "./utils"
|
|
16
16
|
import { DatasourcePlus } from "./base/datasourcePlus"
|
|
17
17
|
import dayjs from "dayjs"
|
|
18
|
+
const { NUMBER_REGEX } = require("../utilities")
|
|
18
19
|
|
|
19
20
|
module MySQLModule {
|
|
20
21
|
const mysql = require("mysql2/promise")
|
|
@@ -87,7 +88,7 @@ module MySQLModule {
|
|
|
87
88
|
if (typeof binding !== "string") {
|
|
88
89
|
continue
|
|
89
90
|
}
|
|
90
|
-
const matches = binding.match(
|
|
91
|
+
const matches = binding.match(NUMBER_REGEX)
|
|
91
92
|
// check if number first
|
|
92
93
|
if (matches && matches[0] !== "" && !isNaN(Number(matches[0]))) {
|
|
93
94
|
bindings[i] = parseFloat(binding)
|
package/src/utilities/index.js
CHANGED
|
@@ -11,6 +11,8 @@ exports.wait = ms => new Promise(resolve => setTimeout(resolve, ms))
|
|
|
11
11
|
|
|
12
12
|
exports.isDev = env.isDev
|
|
13
13
|
|
|
14
|
+
exports.NUMBER_REGEX = /^[+-]?([0-9]*[.])?[0-9]+$/g
|
|
15
|
+
|
|
14
16
|
exports.removeFromArray = (array, element) => {
|
|
15
17
|
const index = array.indexOf(element)
|
|
16
18
|
if (index !== -1) {
|