@budibase/server 1.0.191 → 1.0.192-alpha.2
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.125b5754.js +1315 -0
- package/builder/assets/{index.bb5e3dfd.css → index.8a6f249b.css} +2 -2
- package/builder/assets/{vendor.5240f480.js → vendor.9bf2fcb4.js} +53 -53
- package/builder/index.html +3 -3
- package/coverage/clover.xml +73 -68
- package/coverage/coverage-final.json +8 -8
- 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/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 +15 -15
- 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/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 +15 -15
- 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 +17 -8
- 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/templates.js.html +12 -9
- package/coverage/lcov-report/api/controllers/user.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/exporters.js.html +3 -3
- package/coverage/lcov-report/api/controllers/view/index.html +4 -4
- 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/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/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/screen.js.html +1 -1
- package/coverage/lcov-report/api/routes/script.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/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 +14 -14
- 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 +5 -2
- package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +10 -7
- 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 +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 +4 -4
- 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 +49 -49
- 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 +43 -10
- package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
- package/coverage/lcov-report/middleware/index.html +14 -14
- 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/threads/automation.js.html +1 -1
- package/coverage/lcov-report/threads/index.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/budibaseDir.js.html +11 -32
- 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 +19 -19
- 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 +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/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 +128 -116
- package/dist/api/controllers/row/utils.js +3 -0
- package/dist/api/controllers/templates.js +2 -1
- package/dist/api/controllers/view/exporters.js +1 -1
- package/dist/automations/steps/queryRows.js +1 -0
- package/dist/automations/steps/sendSmtpEmail.js +1 -0
- package/dist/definitions/datasource.js +1 -0
- package/dist/environment.js +9 -13
- package/dist/integrations/index.js +3 -0
- package/dist/integrations/snowflake.js +101 -0
- package/dist/middleware/builder.js +9 -2
- package/dist/package.json +6 -5
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utilities/budibaseDir.js +0 -6
- package/dist/utilities/redis.js +1 -1
- package/package.json +7 -6
- package/scripts/likeCypress.ts +0 -1
- package/src/api/controllers/row/utils.js +3 -0
- package/src/api/controllers/templates.js +2 -1
- package/src/api/controllers/view/exporters.js +1 -1
- package/src/automations/steps/queryRows.js +1 -0
- package/src/automations/steps/sendSmtpEmail.js +1 -0
- package/src/definitions/datasource.ts +1 -0
- package/src/environment.js +9 -13
- package/src/integrations/index.ts +3 -0
- package/src/integrations/snowflake.ts +98 -0
- package/src/middleware/builder.js +13 -2
- package/src/utilities/budibaseDir.js +0 -7
- package/src/utilities/redis.js +2 -0
- package/builder/assets/index.dae59da9.js +0 -1299
|
@@ -52,6 +52,7 @@ var SourceNames;
|
|
|
52
52
|
SourceNames["GOOGLE_SHEETS"] = "GOOGLE_SHEETS";
|
|
53
53
|
SourceNames["FIREBASE"] = "FIREBASE";
|
|
54
54
|
SourceNames["REDIS"] = "REDIS";
|
|
55
|
+
SourceNames["SNOWFLAKE"] = "SNOWFLAKE";
|
|
55
56
|
})(SourceNames = exports.SourceNames || (exports.SourceNames = {}));
|
|
56
57
|
var IncludeRelationships;
|
|
57
58
|
(function (IncludeRelationships) {
|
package/dist/environment.js
CHANGED
|
@@ -33,15 +33,12 @@ module.exports = {
|
|
|
33
33
|
COUCH_DB_URL: process.env.COUCH_DB_URL,
|
|
34
34
|
MINIO_URL: process.env.MINIO_URL,
|
|
35
35
|
WORKER_URL: process.env.WORKER_URL,
|
|
36
|
-
SELF_HOSTED: process.env.SELF_HOSTED,
|
|
37
36
|
AWS_REGION: process.env.AWS_REGION,
|
|
38
|
-
ENABLE_ANALYTICS: process.env.ENABLE_ANALYTICS,
|
|
39
37
|
MINIO_ACCESS_KEY: process.env.MINIO_ACCESS_KEY,
|
|
40
38
|
MINIO_SECRET_KEY: process.env.MINIO_SECRET_KEY,
|
|
41
39
|
REDIS_URL: process.env.REDIS_URL,
|
|
42
40
|
REDIS_PASSWORD: process.env.REDIS_PASSWORD,
|
|
43
41
|
INTERNAL_API_KEY: process.env.INTERNAL_API_KEY,
|
|
44
|
-
MULTI_TENANCY: process.env.MULTI_TENANCY,
|
|
45
42
|
HTTP_MIGRATIONS: process.env.HTTP_MIGRATIONS,
|
|
46
43
|
API_REQ_LIMIT_PER_SEC: process.env.API_REQ_LIMIT_PER_SEC,
|
|
47
44
|
GOOGLE_CLIENT_ID: process.env.GOOGLE_CLIENT_ID,
|
|
@@ -51,28 +48,27 @@ module.exports = {
|
|
|
51
48
|
JEST_WORKER_ID: process.env.JEST_WORKER_ID,
|
|
52
49
|
BUDIBASE_ENVIRONMENT: process.env.BUDIBASE_ENVIRONMENT,
|
|
53
50
|
DISABLE_ACCOUNT_PORTAL: process.env.DISABLE_ACCOUNT_PORTAL,
|
|
51
|
+
TEMPLATE_REPOSITORY: process.env.TEMPLATE_REPOSITORY || "app",
|
|
54
52
|
DISABLE_AUTO_PROD_APP_SYNC: process.env.DISABLE_AUTO_PROD_APP_SYNC,
|
|
55
53
|
// minor
|
|
56
54
|
SALT_ROUNDS: process.env.SALT_ROUNDS,
|
|
57
55
|
LOGGER: process.env.LOGGER,
|
|
58
56
|
LOG_LEVEL: process.env.LOG_LEVEL,
|
|
59
|
-
AUTOMATION_DIRECTORY: process.env.AUTOMATION_DIRECTORY,
|
|
60
|
-
AUTOMATION_BUCKET: process.env.AUTOMATION_BUCKET,
|
|
61
57
|
AUTOMATION_MAX_ITERATIONS: process.env.AUTOMATION_MAX_ITERATIONS,
|
|
62
58
|
SENDGRID_API_KEY: process.env.SENDGRID_API_KEY,
|
|
63
59
|
DYNAMO_ENDPOINT: process.env.DYNAMO_ENDPOINT,
|
|
64
60
|
POSTHOG_TOKEN: process.env.POSTHOG_TOKEN,
|
|
65
61
|
QUERY_THREAD_TIMEOUT: parseIntSafe(process.env.QUERY_THREAD_TIMEOUT),
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
BUDIBASE_DIR: process.env.BUDIBASE_DIR,
|
|
69
|
-
DEPLOYMENT_DB_URL: process.env.DEPLOYMENT_DB_URL,
|
|
70
|
-
BUDIBASE_API_KEY: process.env.BUDIBASE_API_KEY,
|
|
71
|
-
USERID_API_KEY: process.env.USERID_API_KEY,
|
|
72
|
-
DEPLOYMENT_CREDENTIALS_URL: process.env.DEPLOYMENT_CREDENTIALS_URL,
|
|
62
|
+
SQL_MAX_ROWS: process.env.SQL_MAX_ROWS,
|
|
63
|
+
// flags
|
|
73
64
|
ALLOW_DEV_AUTOMATIONS: process.env.ALLOW_DEV_AUTOMATIONS,
|
|
74
65
|
DISABLE_THREADING: process.env.DISABLE_THREADING,
|
|
75
|
-
|
|
66
|
+
DISABLE_DEVELOPER_LICENSE: process.env.DISABLE_DEVELOPER_LICENSE,
|
|
67
|
+
MULTI_TENANCY: process.env.MULTI_TENANCY,
|
|
68
|
+
ENABLE_ANALYTICS: process.env.ENABLE_ANALYTICS,
|
|
69
|
+
SELF_HOSTED: process.env.SELF_HOSTED,
|
|
70
|
+
// old
|
|
71
|
+
CLIENT_ID: process.env.CLIENT_ID,
|
|
76
72
|
_set(key, value) {
|
|
77
73
|
process.env[key] = value;
|
|
78
74
|
module.exports[key] = value;
|
|
@@ -13,6 +13,7 @@ const rest = require("./rest");
|
|
|
13
13
|
const googlesheets = require("./googlesheets");
|
|
14
14
|
const firebase = require("./firebase");
|
|
15
15
|
const redis = require("./redis");
|
|
16
|
+
const snowflake = require("./snowflake");
|
|
16
17
|
const { SourceNames } = require("../definitions/datasource");
|
|
17
18
|
const environment = require("../environment");
|
|
18
19
|
const DEFINITIONS = {
|
|
@@ -29,6 +30,7 @@ const DEFINITIONS = {
|
|
|
29
30
|
[SourceNames.REST]: rest.schema,
|
|
30
31
|
[SourceNames.FIREBASE]: firebase.schema,
|
|
31
32
|
[SourceNames.REDIS]: redis.schema,
|
|
33
|
+
[SourceNames.SNOWFLAKE]: snowflake.schema,
|
|
32
34
|
};
|
|
33
35
|
const INTEGRATIONS = {
|
|
34
36
|
[SourceNames.POSTGRES]: postgres.integration,
|
|
@@ -46,6 +48,7 @@ const INTEGRATIONS = {
|
|
|
46
48
|
[SourceNames.GOOGLE_SHEETS]: googlesheets.integration,
|
|
47
49
|
[SourceNames.REDIS]: redis.integration,
|
|
48
50
|
[SourceNames.FIREBASE]: firebase.integration,
|
|
51
|
+
[SourceNames.SNOWFLAKE]: snowflake.integration,
|
|
49
52
|
};
|
|
50
53
|
// optionally add oracle integration if the oracle binary can be installed
|
|
51
54
|
if (!(process.arch === "arm64" && process.platform === "darwin")) {
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const datasource_1 = require("../definitions/datasource");
|
|
13
|
+
const snowflake_promise_1 = require("snowflake-promise");
|
|
14
|
+
var SnowflakeModule;
|
|
15
|
+
(function (SnowflakeModule) {
|
|
16
|
+
const SCHEMA = {
|
|
17
|
+
docs: "https://developers.snowflake.com/",
|
|
18
|
+
description: "Snowflake is a solution for data warehousing, data lakes, data engineering, data science, data application development, and securely sharing and consuming shared data.",
|
|
19
|
+
friendlyName: "Snowflake",
|
|
20
|
+
datasource: {
|
|
21
|
+
account: {
|
|
22
|
+
type: "string",
|
|
23
|
+
required: true,
|
|
24
|
+
},
|
|
25
|
+
username: {
|
|
26
|
+
type: "string",
|
|
27
|
+
required: true,
|
|
28
|
+
},
|
|
29
|
+
password: {
|
|
30
|
+
type: "password",
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
warehouse: {
|
|
34
|
+
type: "string",
|
|
35
|
+
required: true,
|
|
36
|
+
},
|
|
37
|
+
database: {
|
|
38
|
+
type: "string",
|
|
39
|
+
required: true,
|
|
40
|
+
},
|
|
41
|
+
schema: {
|
|
42
|
+
type: "string",
|
|
43
|
+
required: true,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
query: {
|
|
47
|
+
create: {
|
|
48
|
+
type: datasource_1.QueryTypes.SQL,
|
|
49
|
+
},
|
|
50
|
+
read: {
|
|
51
|
+
type: datasource_1.QueryTypes.SQL,
|
|
52
|
+
},
|
|
53
|
+
update: {
|
|
54
|
+
type: datasource_1.QueryTypes.SQL,
|
|
55
|
+
},
|
|
56
|
+
delete: {
|
|
57
|
+
type: datasource_1.QueryTypes.SQL,
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
class SnowflakeIntegration {
|
|
62
|
+
constructor(config) {
|
|
63
|
+
this.client = new snowflake_promise_1.Snowflake(config);
|
|
64
|
+
}
|
|
65
|
+
internalQuery(query) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
yield this.client.connect();
|
|
68
|
+
try {
|
|
69
|
+
return yield this.client.execute(query.sql);
|
|
70
|
+
}
|
|
71
|
+
catch (err) {
|
|
72
|
+
throw (err === null || err === void 0 ? void 0 : err.message.split(":")[1]) || (err === null || err === void 0 ? void 0 : err.message);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
create(query) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
return this.internalQuery(query);
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
read(query) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
return this.internalQuery(query);
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
update(query) {
|
|
87
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
+
return this.internalQuery(query);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
delete(query) {
|
|
92
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
+
return this.internalQuery(query);
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
module.exports = {
|
|
98
|
+
schema: SCHEMA,
|
|
99
|
+
integration: SnowflakeIntegration,
|
|
100
|
+
};
|
|
101
|
+
})(SnowflakeModule || (SnowflakeModule = {}));
|
|
@@ -11,7 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
const { APP_DEV_PREFIX } = require("../db/utils");
|
|
12
12
|
const { doesUserHaveLock, updateLock, checkDebounce, setDebounce, } = require("../utilities/redis");
|
|
13
13
|
const { doWithDB } = require("@budibase/backend-core/db");
|
|
14
|
-
const { DocumentTypes } = require("../db/utils");
|
|
14
|
+
const { DocumentTypes, getGlobalIDFromUserMetadataID } = require("../db/utils");
|
|
15
15
|
const { PermissionTypes } = require("@budibase/backend-core/permissions");
|
|
16
16
|
const { app: appCache } = require("@budibase/backend-core/cache");
|
|
17
17
|
const DEBOUNCE_TIME_SEC = 30;
|
|
@@ -52,6 +52,7 @@ function updateAppUpdatedAt(ctx) {
|
|
|
52
52
|
yield doWithDB(appId, (db) => __awaiter(this, void 0, void 0, function* () {
|
|
53
53
|
const metadata = yield db.get(DocumentTypes.APP_METADATA);
|
|
54
54
|
metadata.updatedAt = new Date().toISOString();
|
|
55
|
+
metadata.updatedBy = getGlobalIDFromUserMetadataID(ctx.user.userId);
|
|
55
56
|
const response = yield db.put(metadata);
|
|
56
57
|
metadata._rev = response.rev;
|
|
57
58
|
yield appCache.invalidateAppMetadata(appId, metadata);
|
|
@@ -68,7 +69,13 @@ module.exports = (ctx, permType) => __awaiter(void 0, void 0, void 0, function*
|
|
|
68
69
|
}
|
|
69
70
|
const isBuilderApi = permType === PermissionTypes.BUILDER;
|
|
70
71
|
const referer = ctx.headers["referer"];
|
|
71
|
-
const
|
|
72
|
+
const overviewPath = "/builder/portal/overview/";
|
|
73
|
+
const overviewContext = !referer ? false : referer.includes(overviewPath);
|
|
74
|
+
if (overviewContext) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const hasAppId = !referer ? false : referer.includes(appId);
|
|
78
|
+
const editingApp = referer ? hasAppId : false;
|
|
72
79
|
// check this is a builder call and editing
|
|
73
80
|
if (!isBuilderApi || !editingApp) {
|
|
74
81
|
return;
|
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.0.
|
|
4
|
+
"version": "1.0.192-alpha.1",
|
|
5
5
|
"description": "Budibase Web Server",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -70,10 +70,10 @@
|
|
|
70
70
|
"license": "GPL-3.0",
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@apidevtools/swagger-parser": "^10.0.3",
|
|
73
|
-
"@budibase/backend-core": "^1.0.
|
|
74
|
-
"@budibase/client": "^1.0.
|
|
75
|
-
"@budibase/pro": "1.0.
|
|
76
|
-
"@budibase/string-templates": "^1.0.
|
|
73
|
+
"@budibase/backend-core": "^1.0.192-alpha.1",
|
|
74
|
+
"@budibase/client": "^1.0.192-alpha.1",
|
|
75
|
+
"@budibase/pro": "1.0.192-alpha.1",
|
|
76
|
+
"@budibase/string-templates": "^1.0.192-alpha.1",
|
|
77
77
|
"@bull-board/api": "^3.7.0",
|
|
78
78
|
"@bull-board/koa": "^3.7.0",
|
|
79
79
|
"@elastic/elasticsearch": "7.10.0",
|
|
@@ -130,6 +130,7 @@
|
|
|
130
130
|
"pouchdb-replication-stream": "1.2.9",
|
|
131
131
|
"redis": "4",
|
|
132
132
|
"server-destroy": "1.0.1",
|
|
133
|
+
"snowflake-promise": "^4.5.0",
|
|
133
134
|
"svelte": "^3.38.2",
|
|
134
135
|
"swagger-parser": "^10.0.3",
|
|
135
136
|
"to-json-schema": "0.2.5",
|