@budibase/server 1.4.17 → 1.4.18
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/Dockerfile +2 -0
- package/builder/assets/{index.2062efc5.js → index.1f3e9e95.js} +296 -292
- package/builder/assets/index.ffaba7b0.css +6 -0
- package/builder/index.html +2 -2
- package/coverage/clover.xml +144 -182
- package/coverage/coverage-final.json +34 -36
- package/coverage/lcov-report/api/controllers/apikeys.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/datasource.js.html +1 -1
- package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
- package/coverage/lcov-report/api/controllers/index.html +9 -24
- package/coverage/lcov-report/api/controllers/integration.js.html +2 -2
- 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/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 +5 -5
- package/coverage/lcov-report/api/controllers/row/internal.js.html +4 -4
- 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/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/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 +2 -2
- package/coverage/lcov-report/api/routes/apikeys.js.html +2 -2
- package/coverage/lcov-report/api/routes/automation.js.html +2 -2
- package/coverage/lcov-report/api/routes/backup.js.html +2 -2
- package/coverage/lcov-report/api/routes/cloud.js.html +2 -2
- package/coverage/lcov-report/api/routes/component.js.html +2 -2
- package/coverage/lcov-report/api/routes/datasource.js.html +2 -2
- package/coverage/lcov-report/api/routes/deploy.js.html +2 -2
- package/coverage/lcov-report/api/routes/dev.js.html +2 -2
- package/coverage/lcov-report/api/routes/index.html +5 -20
- package/coverage/lcov-report/api/routes/integration.js.html +2 -2
- package/coverage/lcov-report/api/routes/layout.js.html +2 -2
- package/coverage/lcov-report/api/routes/metadata.js.html +2 -2
- package/coverage/lcov-report/api/routes/migrations.js.html +2 -2
- package/coverage/lcov-report/api/routes/permission.js.html +2 -2
- package/coverage/lcov-report/api/routes/query.js.html +2 -2
- package/coverage/lcov-report/api/routes/role.js.html +2 -2
- package/coverage/lcov-report/api/routes/routing.js.html +2 -2
- package/coverage/lcov-report/api/routes/screen.js.html +2 -2
- package/coverage/lcov-report/api/routes/script.js.html +2 -2
- package/coverage/lcov-report/api/routes/table.js.html +2 -2
- package/coverage/lcov-report/api/routes/templates.js.html +2 -2
- package/coverage/lcov-report/api/routes/user.js.html +2 -2
- 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 +2 -2
- package/coverage/lcov-report/api/routes/webhook.js.html +2 -2
- 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/delay.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/loop.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 +52 -4
- 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/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/inMemoryView.js.html +1 -1
- package/coverage/lcov-report/db/index.html +5 -5
- package/coverage/lcov-report/db/index.js.html +4 -4
- 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 +11 -11
- package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +7 -7
- 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 +34 -34
- 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/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/utils.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 +19 -13
- package/coverage/lcov-report/utilities/index.html +24 -24
- package/coverage/lcov-report/utilities/index.js.html +1 -1
- 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 +12 -12
- package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +8 -8
- 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/rows.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
- package/coverage/lcov-report/utilities/users.js.html +21 -12
- package/coverage/lcov-report/utilities/workerRequests.js.html +33 -3
- package/coverage/lcov.info +236 -290
- package/dist/api/controllers/application.js +2 -0
- package/dist/api/controllers/auth.js +58 -49
- package/dist/api/controllers/integration.js +1 -1
- package/dist/api/controllers/row/internal.js +1 -1
- package/dist/api/routes/analytics.js +1 -1
- package/dist/api/routes/apikeys.js +1 -1
- package/dist/api/routes/auth.js +31 -4
- package/dist/api/routes/automation.js +1 -1
- package/dist/api/routes/backup.js +1 -1
- package/dist/api/routes/cloud.js +1 -1
- package/dist/api/routes/component.js +1 -1
- package/dist/api/routes/datasource.js +1 -1
- package/dist/api/routes/deploy.js +1 -1
- package/dist/api/routes/dev.js +1 -1
- package/dist/api/routes/integration.js +1 -1
- package/dist/api/routes/layout.js +1 -1
- package/dist/api/routes/metadata.js +1 -1
- package/dist/api/routes/migrations.js +1 -1
- package/dist/api/routes/permission.js +1 -1
- package/dist/api/routes/public/applications.js +5 -0
- package/dist/api/routes/public/queries.js +2 -0
- package/dist/api/routes/public/rows.js +5 -0
- package/dist/api/routes/public/tables.js +5 -0
- package/dist/api/routes/public/users.js +5 -0
- package/dist/api/routes/query.js +1 -1
- package/dist/api/routes/role.js +1 -1
- package/dist/api/routes/routing.js +1 -1
- package/dist/api/routes/screen.js +1 -1
- package/dist/api/routes/script.js +1 -1
- package/dist/api/routes/table.js +1 -1
- package/dist/api/routes/templates.js +1 -1
- package/dist/api/routes/user.js +1 -1
- package/dist/api/routes/view.js +1 -1
- package/dist/api/routes/webhook.js +1 -1
- package/dist/automations/steps/sendSmtpEmail.js +10 -2
- package/dist/db/index.js +1 -1
- package/dist/middleware/authorized.js +2 -2
- package/dist/migrations/functions/usageQuotas/syncApps.js +2 -1
- package/dist/migrations/functions/usageQuotas/syncRows.js +2 -1
- package/dist/package.json +6 -6
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utilities/global.js +6 -3
- package/dist/utilities/users.js +4 -2
- package/dist/utilities/workerRequests.js +3 -1
- package/package.json +7 -7
- package/scripts/dev/manage.js +1 -0
- package/specs/openapi.json +22 -0
- package/specs/openapi.yaml +22 -0
- package/src/api/controllers/application.ts +3 -7
- package/src/api/controllers/{auth.js → auth.ts} +20 -18
- package/src/api/controllers/integration.js +1 -1
- package/src/api/controllers/row/internal.js +1 -1
- package/src/api/routes/analytics.js +1 -1
- package/src/api/routes/apikeys.js +1 -1
- package/src/api/routes/auth.ts +8 -0
- package/src/api/routes/automation.js +1 -1
- package/src/api/routes/backup.js +1 -1
- package/src/api/routes/cloud.js +1 -1
- package/src/api/routes/component.js +1 -1
- package/src/api/routes/datasource.js +1 -1
- package/src/api/routes/deploy.js +1 -1
- package/src/api/routes/dev.js +1 -1
- package/src/api/routes/integration.js +1 -1
- package/src/api/routes/layout.js +1 -1
- package/src/api/routes/metadata.js +1 -1
- package/src/api/routes/migrations.js +1 -1
- package/src/api/routes/permission.js +1 -1
- package/src/api/routes/public/applications.ts +5 -0
- package/src/api/routes/public/queries.ts +2 -0
- package/src/api/routes/public/rows.ts +5 -0
- package/src/api/routes/public/tables.ts +5 -0
- package/src/api/routes/public/users.ts +5 -0
- package/src/api/routes/query.js +1 -1
- package/src/api/routes/role.js +1 -1
- package/src/api/routes/routing.js +1 -1
- package/src/api/routes/screen.js +1 -1
- package/src/api/routes/script.js +1 -1
- package/src/api/routes/table.js +1 -1
- package/src/api/routes/templates.js +1 -1
- package/src/api/routes/tests/row.spec.js +3 -1
- package/src/api/routes/user.js +1 -1
- package/src/api/routes/view.js +1 -1
- package/src/api/routes/webhook.js +1 -1
- package/src/automations/steps/sendSmtpEmail.js +18 -2
- package/src/db/index.js +1 -1
- package/src/definitions/openapi.ts +134 -447
- package/src/middleware/authorized.ts +2 -2
- package/src/migrations/functions/usageQuotas/syncApps.ts +2 -1
- package/src/migrations/functions/usageQuotas/syncRows.ts +2 -1
- package/src/migrations/functions/usageQuotas/tests/syncApps.spec.ts +2 -1
- package/src/migrations/functions/usageQuotas/tests/syncRows.spec.ts +2 -1
- package/src/utilities/global.js +6 -4
- package/src/utilities/users.js +5 -2
- package/src/utilities/workerRequests.js +11 -1
- package/builder/assets/index.91c8117f.css +0 -6
- package/coverage/lcov-report/api/controllers/auth.js.html +0 -292
- package/coverage/lcov-report/api/routes/auth.js.html +0 -109
- package/src/api/routes/auth.js +0 -8
|
@@ -30,6 +30,14 @@ exports.definition = {
|
|
|
30
30
|
type: "string",
|
|
31
31
|
title: "Send From",
|
|
32
32
|
},
|
|
33
|
+
cc: {
|
|
34
|
+
type: "string",
|
|
35
|
+
title: "CC",
|
|
36
|
+
},
|
|
37
|
+
bcc: {
|
|
38
|
+
type: "string",
|
|
39
|
+
title: "BCC",
|
|
40
|
+
},
|
|
33
41
|
subject: {
|
|
34
42
|
type: "string",
|
|
35
43
|
title: "Email Subject",
|
|
@@ -58,13 +66,13 @@ exports.definition = {
|
|
|
58
66
|
};
|
|
59
67
|
exports.run = function ({ inputs }) {
|
|
60
68
|
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
-
let { to, from, subject, contents } = inputs;
|
|
69
|
+
let { to, from, subject, contents, cc, bcc } = inputs;
|
|
62
70
|
if (!contents) {
|
|
63
71
|
contents = "<h1>No content</h1>";
|
|
64
72
|
}
|
|
65
73
|
to = to || undefined;
|
|
66
74
|
try {
|
|
67
|
-
let response = yield sendSmtpEmail(to, from, subject, contents, true);
|
|
75
|
+
let response = yield sendSmtpEmail(to, from, subject, contents, cc, bcc, true);
|
|
68
76
|
return {
|
|
69
77
|
success: true,
|
|
70
78
|
response,
|
package/dist/db/index.js
CHANGED
|
@@ -39,9 +39,9 @@ const checkAuthorized = (ctx, resourceRoles, permType, permLevel) => __awaiter(v
|
|
|
39
39
|
const checkAuthorizedResource = (ctx, resourceRoles, permType, permLevel) => __awaiter(void 0, void 0, void 0, function* () {
|
|
40
40
|
// get the user's roles
|
|
41
41
|
const roleId = ctx.roleId || roles_1.BUILTIN_ROLE_IDS.PUBLIC;
|
|
42
|
-
const userRoles = yield (0, roles_1.getUserRoleHierarchy)(roleId, {
|
|
42
|
+
const userRoles = (yield (0, roles_1.getUserRoleHierarchy)(roleId, {
|
|
43
43
|
idOnly: false,
|
|
44
|
-
});
|
|
44
|
+
}));
|
|
45
45
|
const permError = "User does not have permission";
|
|
46
46
|
// check if the user has the required role
|
|
47
47
|
if (resourceRoles.length > 0) {
|
|
@@ -13,6 +13,7 @@ exports.run = void 0;
|
|
|
13
13
|
const tenancy_1 = require("@budibase/backend-core/tenancy");
|
|
14
14
|
const db_1 = require("@budibase/backend-core/db");
|
|
15
15
|
const pro_1 = require("@budibase/pro");
|
|
16
|
+
const types_1 = require("@budibase/types");
|
|
16
17
|
const run = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
18
|
// get app count
|
|
18
19
|
// @ts-ignore
|
|
@@ -21,6 +22,6 @@ const run = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
21
22
|
// sync app count
|
|
22
23
|
const tenantId = (0, tenancy_1.getTenantId)();
|
|
23
24
|
console.log(`[Tenant: ${tenantId}] Syncing app count: ${appCount}`);
|
|
24
|
-
yield pro_1.quotas.setUsage(appCount,
|
|
25
|
+
yield pro_1.quotas.setUsage(appCount, types_1.StaticQuotaName.APPS, types_1.QuotaUsageType.STATIC);
|
|
25
26
|
});
|
|
26
27
|
exports.run = run;
|
|
@@ -14,6 +14,7 @@ const tenancy_1 = require("@budibase/backend-core/tenancy");
|
|
|
14
14
|
const db_1 = require("@budibase/backend-core/db");
|
|
15
15
|
const rows_1 = require("../../../utilities/usageQuota/rows");
|
|
16
16
|
const pro_1 = require("@budibase/pro");
|
|
17
|
+
const types_1 = require("@budibase/types");
|
|
17
18
|
const run = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
19
|
// get all rows in all apps
|
|
19
20
|
// @ts-ignore
|
|
@@ -25,6 +26,6 @@ const run = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
25
26
|
// sync row count
|
|
26
27
|
const tenantId = (0, tenancy_1.getTenantId)();
|
|
27
28
|
console.log(`[Tenant: ${tenantId}] Syncing row count: ${rowCount}`);
|
|
28
|
-
yield pro_1.quotas.setUsage(rowCount,
|
|
29
|
+
yield pro_1.quotas.setUsage(rowCount, types_1.StaticQuotaName.ROWS, types_1.QuotaUsageType.STATIC);
|
|
29
30
|
});
|
|
30
31
|
exports.run = run;
|
package/dist/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/server",
|
|
3
3
|
"email": "hi@budibase.com",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.18-alpha.0",
|
|
5
5
|
"description": "Budibase Web Server",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -77,11 +77,11 @@
|
|
|
77
77
|
"license": "GPL-3.0",
|
|
78
78
|
"dependencies": {
|
|
79
79
|
"@apidevtools/swagger-parser": "10.0.3",
|
|
80
|
-
"@budibase/backend-core": "
|
|
81
|
-
"@budibase/client": "
|
|
82
|
-
"@budibase/pro": "1.4.
|
|
83
|
-
"@budibase/string-templates": "
|
|
84
|
-
"@budibase/types": "
|
|
80
|
+
"@budibase/backend-core": "1.4.18-alpha.0",
|
|
81
|
+
"@budibase/client": "1.4.18-alpha.0",
|
|
82
|
+
"@budibase/pro": "1.4.18-alpha.0",
|
|
83
|
+
"@budibase/string-templates": "1.4.18-alpha.0",
|
|
84
|
+
"@budibase/types": "1.4.18-alpha.0",
|
|
85
85
|
"@bull-board/api": "3.7.0",
|
|
86
86
|
"@bull-board/koa": "3.9.4",
|
|
87
87
|
"@elastic/elasticsearch": "7.10.0",
|