@budibase/server 1.0.219-alpha.9 → 1.0.219
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/__mocks__/node-fetch.ts +0 -9
- package/builder/assets/index.1c640a53.js +1316 -0
- package/builder/assets/index.24307ca0.css +6 -0
- package/builder/assets/{vendor.001dcf8c.js → vendor.9bf2fcb4.js} +163 -163
- package/builder/index.html +3 -3
- package/coverage/clover.xml +794 -868
- package/coverage/coverage-final.json +26 -26
- 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 +12 -111
- package/coverage/lcov-report/api/controllers/backup.js.html +6 -9
- 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 +16 -16
- package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
- package/coverage/lcov-report/api/controllers/index.html +21 -21
- 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 +17 -47
- package/coverage/lcov-report/api/controllers/row/index.html +34 -34
- package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +11 -95
- package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/utils.js.html +8 -17
- 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 +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 +15 -15
- package/coverage/lcov-report/api/index.js.html +13 -22
- 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 +2 -32
- 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 +12 -57
- package/coverage/lcov-report/automations/bullboard.js.html +1 -1
- package/coverage/lcov-report/automations/index.html +17 -17
- 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 +34 -58
- package/coverage/lcov-report/automations/steps/index.html +11 -11
- 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 +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 +4 -4
- 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 +14 -14
- 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 +13 -13
- package/coverage/lcov-report/db/linkedRows/index.js.html +7 -10
- package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
- package/coverage/lcov-report/db/newid.js.html +2 -2
- package/coverage/lcov-report/db/utils.js.html +51 -27
- 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 +74 -74
- 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 +12 -12
- package/coverage/lcov-report/middleware/currentapp.js.html +33 -33
- package/coverage/lcov-report/middleware/index.html +1 -1
- package/coverage/lcov-report/middleware/joi-validator.js.html +10 -10
- package/coverage/lcov-report/middleware/publicApi.js.html +1 -1
- package/coverage/lcov-report/middleware/resourceId.js.html +7 -7
- package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
- package/coverage/lcov-report/middleware/utils.js.html +2 -2
- package/coverage/lcov-report/threads/automation.js.html +9 -18
- package/coverage/lcov-report/threads/index.html +25 -25
- package/coverage/lcov-report/threads/query.js.html +76 -283
- package/coverage/lcov-report/threads/utils.js.html +4 -4
- 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 +14 -14
- package/coverage/lcov-report/utilities/index.html +1 -1
- package/coverage/lcov-report/utilities/index.js.html +9 -9
- package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +2 -2
- 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 +2 -2
- 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 +1425 -1553
- package/dist/api/controllers/application.js +15 -18
- package/dist/api/controllers/automation.js +2 -28
- package/dist/api/controllers/backup.js +2 -3
- package/dist/api/controllers/query/index.js +0 -25
- package/dist/api/controllers/row/external.js +7 -19
- package/dist/api/controllers/row/internalSearch.js +1 -22
- package/dist/api/controllers/row/utils.js +0 -3
- package/dist/api/index.js +1 -4
- package/dist/api/routes/automation.js +0 -2
- package/dist/automations/automationUtils.js +4 -16
- package/dist/automations/steps/filter.js +29 -38
- package/dist/automations/triggers.js +1 -1
- package/dist/db/linkedRows/index.js +0 -1
- package/dist/db/utils.js +31 -4
- package/dist/definitions/datasource.js +0 -1
- package/dist/environment.js +0 -1
- package/dist/integrations/airtable.js +0 -1
- package/dist/integrations/arangodb.js +0 -1
- package/dist/integrations/base/sql.js +3 -20
- package/dist/integrations/couchdb.js +0 -1
- package/dist/integrations/dynamodb.js +0 -1
- package/dist/integrations/elasticsearch.js +0 -1
- package/dist/integrations/firebase.js +0 -1
- package/dist/integrations/googlesheets.js +0 -1
- package/dist/integrations/index.js +0 -4
- package/dist/integrations/microsoftSqlServer.js +1 -2
- package/dist/integrations/mongodb.js +0 -1
- package/dist/integrations/mysql.js +1 -2
- package/dist/integrations/oracle.js +0 -1
- package/dist/integrations/postgres.js +1 -2
- package/dist/integrations/queries/sql.js +0 -3
- package/dist/integrations/redis.js +0 -1
- package/dist/integrations/rest.js +1 -2
- package/dist/integrations/s3.js +0 -1
- package/dist/package.json +6 -7
- package/dist/tests/utilities/TestConfiguration.js +6 -19
- package/dist/threads/automation.js +3 -6
- package/dist/threads/index.js +1 -15
- package/dist/threads/query.js +8 -54
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utilities/fileSystem/index.js +6 -16
- package/package.json +7 -8
- package/src/api/controllers/application.ts +14 -18
- package/src/api/controllers/automation.js +2 -35
- package/src/api/controllers/backup.js +2 -3
- package/src/api/controllers/query/index.ts +1 -29
- package/src/api/controllers/row/external.js +9 -19
- package/src/api/controllers/row/internalSearch.js +0 -28
- package/src/api/controllers/row/utils.js +0 -3
- package/src/api/index.js +1 -4
- package/src/api/routes/automation.js +0 -10
- package/src/api/routes/tests/query.spec.js +0 -166
- package/src/automations/automationUtils.js +4 -19
- package/src/automations/steps/filter.js +28 -36
- package/src/automations/tests/filter.spec.js +1 -2
- package/src/automations/triggers.js +1 -1
- package/src/db/linkedRows/index.js +0 -1
- package/src/db/utils.js +13 -5
- package/src/definitions/common.ts +0 -1
- package/src/definitions/datasource.ts +0 -2
- package/src/environment.js +0 -1
- package/src/integrations/airtable.ts +0 -1
- package/src/integrations/arangodb.ts +0 -1
- package/src/integrations/base/sql.ts +11 -25
- package/src/integrations/couchdb.ts +0 -1
- package/src/integrations/dynamodb.ts +0 -1
- package/src/integrations/elasticsearch.ts +0 -1
- package/src/integrations/firebase.ts +0 -1
- package/src/integrations/googlesheets.ts +0 -1
- package/src/integrations/index.ts +0 -4
- package/src/integrations/microsoftSqlServer.ts +0 -2
- package/src/integrations/mongodb.ts +0 -1
- package/src/integrations/mysql.ts +0 -2
- package/src/integrations/oracle.ts +0 -1
- package/src/integrations/postgres.ts +0 -2
- package/src/integrations/queries/sql.ts +1 -3
- package/src/integrations/redis.ts +0 -1
- package/src/integrations/rest.ts +1 -2
- package/src/integrations/s3.ts +0 -1
- package/src/integrations/tests/rest.spec.js +1 -16
- package/src/migrations/tests/index.spec.ts +2 -18
- package/src/module.d.ts +0 -2
- package/src/tests/utilities/TestConfiguration.js +3 -22
- package/src/threads/automation.js +3 -6
- package/src/threads/index.ts +1 -5
- package/src/threads/query.js +10 -79
- package/src/utilities/fileSystem/index.js +8 -22
- package/builder/assets/index.40715052.js +0 -977
- package/builder/assets/index.7786f497.css +0 -6
- package/dist/automations/logging/index.js +0 -70
- package/dist/integrations/snowflake.js +0 -102
- package/scripts/integrations/oracle/instantclient/linux/arm64/basiclite-19.10.zip +0 -0
- package/scripts/integrations/oracle/instantclient/linux/arm64/install.sh +0 -23
- package/scripts/integrations/oracle/instantclient/linux/install.sh +0 -10
- package/src/automations/logging/index.ts +0 -35
- package/src/integrations/snowflake.ts +0 -99
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.checkAppMetadata = exports.storeLog = void 0;
|
|
36
|
-
const env = __importStar(require("../../environment"));
|
|
37
|
-
const pro_1 = require("@budibase/pro");
|
|
38
|
-
const backend_core_1 = require("@budibase/backend-core");
|
|
39
|
-
function storeLog(automation, results) {
|
|
40
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
// can disable this if un-needed in self-host, also only do this for prod apps
|
|
42
|
-
if (env.DISABLE_AUTOMATION_LOGS) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
yield pro_1.automations.logs.storeLog(automation, results);
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
exports.storeLog = storeLog;
|
|
49
|
-
function checkAppMetadata(apps) {
|
|
50
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
-
const maxStartDate = yield pro_1.automations.logs.oldestLogDate();
|
|
52
|
-
for (let metadata of apps) {
|
|
53
|
-
if (!metadata.automationErrors) {
|
|
54
|
-
continue;
|
|
55
|
-
}
|
|
56
|
-
for (let [key, errors] of Object.entries(metadata.automationErrors)) {
|
|
57
|
-
const updated = [];
|
|
58
|
-
for (let error of errors) {
|
|
59
|
-
const startDate = error.split(backend_core_1.db.SEPARATOR)[2];
|
|
60
|
-
if (startDate > maxStartDate) {
|
|
61
|
-
updated.push(error);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
metadata.automationErrors[key] = updated;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return apps;
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
exports.checkAppMetadata = checkAppMetadata;
|
|
@@ -1,102 +0,0 @@
|
|
|
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
|
-
type: "Relational",
|
|
21
|
-
datasource: {
|
|
22
|
-
account: {
|
|
23
|
-
type: "string",
|
|
24
|
-
required: true,
|
|
25
|
-
},
|
|
26
|
-
username: {
|
|
27
|
-
type: "string",
|
|
28
|
-
required: true,
|
|
29
|
-
},
|
|
30
|
-
password: {
|
|
31
|
-
type: "password",
|
|
32
|
-
required: true,
|
|
33
|
-
},
|
|
34
|
-
warehouse: {
|
|
35
|
-
type: "string",
|
|
36
|
-
required: true,
|
|
37
|
-
},
|
|
38
|
-
database: {
|
|
39
|
-
type: "string",
|
|
40
|
-
required: true,
|
|
41
|
-
},
|
|
42
|
-
schema: {
|
|
43
|
-
type: "string",
|
|
44
|
-
required: true,
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
query: {
|
|
48
|
-
create: {
|
|
49
|
-
type: datasource_1.QueryTypes.SQL,
|
|
50
|
-
},
|
|
51
|
-
read: {
|
|
52
|
-
type: datasource_1.QueryTypes.SQL,
|
|
53
|
-
},
|
|
54
|
-
update: {
|
|
55
|
-
type: datasource_1.QueryTypes.SQL,
|
|
56
|
-
},
|
|
57
|
-
delete: {
|
|
58
|
-
type: datasource_1.QueryTypes.SQL,
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
};
|
|
62
|
-
class SnowflakeIntegration {
|
|
63
|
-
constructor(config) {
|
|
64
|
-
this.client = new snowflake_promise_1.Snowflake(config);
|
|
65
|
-
}
|
|
66
|
-
internalQuery(query) {
|
|
67
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
-
yield this.client.connect();
|
|
69
|
-
try {
|
|
70
|
-
return yield this.client.execute(query.sql);
|
|
71
|
-
}
|
|
72
|
-
catch (err) {
|
|
73
|
-
throw (err === null || err === void 0 ? void 0 : err.message.split(":")[1]) || (err === null || err === void 0 ? void 0 : err.message);
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
create(query) {
|
|
78
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
-
return this.internalQuery(query);
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
read(query) {
|
|
83
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
-
return this.internalQuery(query);
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
update(query) {
|
|
88
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
-
return this.internalQuery(query);
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
delete(query) {
|
|
93
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
94
|
-
return this.internalQuery(query);
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
module.exports = {
|
|
99
|
-
schema: SCHEMA,
|
|
100
|
-
integration: SnowflakeIntegration,
|
|
101
|
-
};
|
|
102
|
-
})(SnowflakeModule || (SnowflakeModule = {}));
|
|
Binary file
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# Must be root to continue
|
|
4
|
-
if [[ $(id -u) -ne 0 ]] ; then echo "Please run as root" ; exit 1 ; fi
|
|
5
|
-
|
|
6
|
-
# Allow for re-runs
|
|
7
|
-
rm -rf /opt/oracle
|
|
8
|
-
|
|
9
|
-
echo "Installing oracle instant client"
|
|
10
|
-
|
|
11
|
-
# copy and unzip package
|
|
12
|
-
mkdir -p /opt/oracle
|
|
13
|
-
cp scripts/integrations/oracle/instantclient/linux/arm64/basiclite-19.10.zip /opt/oracle
|
|
14
|
-
cd /opt/oracle
|
|
15
|
-
unzip -qq basiclite-19.10.zip -d .
|
|
16
|
-
rm *.zip
|
|
17
|
-
mv instantclient* instantclient
|
|
18
|
-
|
|
19
|
-
# update runtime link path
|
|
20
|
-
sh -c "echo /opt/oracle/instantclient > /etc/ld.so.conf.d/oracle-instantclient.conf"
|
|
21
|
-
ldconfig /etc/ld.so.conf.d
|
|
22
|
-
|
|
23
|
-
echo "Installation complete"
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"
|
|
3
|
-
if [[ $TARGETARCH == arm* ]] ;
|
|
4
|
-
then
|
|
5
|
-
echo "Installing ARM Oracle instant client..."
|
|
6
|
-
$SCRIPT_DIR/arm64/install.sh
|
|
7
|
-
else
|
|
8
|
-
echo "Installing x86-64 Oracle instant client..."
|
|
9
|
-
$SCRIPT_DIR/x86-64/install.sh
|
|
10
|
-
fi
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import * as env from "../../environment"
|
|
2
|
-
import { AutomationResults, Automation, App } from "@budibase/types"
|
|
3
|
-
import { automations } from "@budibase/pro"
|
|
4
|
-
import { db as dbUtils } from "@budibase/backend-core"
|
|
5
|
-
|
|
6
|
-
export async function storeLog(
|
|
7
|
-
automation: Automation,
|
|
8
|
-
results: AutomationResults
|
|
9
|
-
) {
|
|
10
|
-
// can disable this if un-needed in self-host, also only do this for prod apps
|
|
11
|
-
if (env.DISABLE_AUTOMATION_LOGS) {
|
|
12
|
-
return
|
|
13
|
-
}
|
|
14
|
-
await automations.logs.storeLog(automation, results)
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export async function checkAppMetadata(apps: App[]) {
|
|
18
|
-
const maxStartDate = await automations.logs.oldestLogDate()
|
|
19
|
-
for (let metadata of apps) {
|
|
20
|
-
if (!metadata.automationErrors) {
|
|
21
|
-
continue
|
|
22
|
-
}
|
|
23
|
-
for (let [key, errors] of Object.entries(metadata.automationErrors)) {
|
|
24
|
-
const updated = []
|
|
25
|
-
for (let error of errors) {
|
|
26
|
-
const startDate = error.split(dbUtils.SEPARATOR)[2]
|
|
27
|
-
if (startDate > maxStartDate) {
|
|
28
|
-
updated.push(error)
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
metadata.automationErrors[key] = updated
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return apps
|
|
35
|
-
}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { Integration, QueryTypes, SqlQuery } from "../definitions/datasource"
|
|
2
|
-
import { Snowflake } from "snowflake-promise"
|
|
3
|
-
|
|
4
|
-
module SnowflakeModule {
|
|
5
|
-
interface SnowflakeConfig {
|
|
6
|
-
account: string
|
|
7
|
-
username: string
|
|
8
|
-
password: string
|
|
9
|
-
warehouse: string
|
|
10
|
-
database: string
|
|
11
|
-
schema: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const SCHEMA: Integration = {
|
|
15
|
-
docs: "https://developers.snowflake.com/",
|
|
16
|
-
description:
|
|
17
|
-
"Snowflake is a solution for data warehousing, data lakes, data engineering, data science, data application development, and securely sharing and consuming shared data.",
|
|
18
|
-
friendlyName: "Snowflake",
|
|
19
|
-
type: "Relational",
|
|
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: QueryTypes.SQL,
|
|
49
|
-
},
|
|
50
|
-
read: {
|
|
51
|
-
type: QueryTypes.SQL,
|
|
52
|
-
},
|
|
53
|
-
update: {
|
|
54
|
-
type: QueryTypes.SQL,
|
|
55
|
-
},
|
|
56
|
-
delete: {
|
|
57
|
-
type: QueryTypes.SQL,
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
class SnowflakeIntegration {
|
|
63
|
-
private client: Snowflake
|
|
64
|
-
|
|
65
|
-
constructor(config: SnowflakeConfig) {
|
|
66
|
-
this.client = new Snowflake(config)
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
async internalQuery(query: SqlQuery) {
|
|
70
|
-
await this.client.connect()
|
|
71
|
-
try {
|
|
72
|
-
return await this.client.execute(query.sql)
|
|
73
|
-
} catch (err: any) {
|
|
74
|
-
throw err?.message.split(":")[1] || err?.message
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
async create(query: SqlQuery) {
|
|
79
|
-
return this.internalQuery(query)
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
async read(query: SqlQuery) {
|
|
83
|
-
return this.internalQuery(query)
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
async update(query: SqlQuery) {
|
|
87
|
-
return this.internalQuery(query)
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
async delete(query: SqlQuery) {
|
|
91
|
-
return this.internalQuery(query)
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
module.exports = {
|
|
96
|
-
schema: SCHEMA,
|
|
97
|
-
integration: SnowflakeIntegration,
|
|
98
|
-
}
|
|
99
|
-
}
|