@budibase/server 1.0.91-alpha.2 → 1.0.91-alpha.3
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.d1097f6b.js → index.fc731251.js} +134 -134
- package/builder/index.html +1 -1
- package/coverage/clover.xml +2 -2
- 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 +1 -1
- 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 +1 -1
- 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/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/dist/definitions/datasource.js +1 -0
- package/dist/integrations/firebase.js +192 -0
- package/dist/integrations/index.js +3 -0
- package/dist/package.json +5 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -5
- package/src/definitions/datasource.ts +1 -0
- package/src/integrations/firebase.ts +205 -0
- package/src/integrations/index.ts +3 -0
|
@@ -118,7 +118,7 @@ function <span class="fstat-no" title="function not covered" >resetQuotasIfRequi
|
|
|
118
118
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
119
119
|
Code coverage generated by
|
|
120
120
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
121
|
-
at Fri Mar 18 2022
|
|
121
|
+
at Fri Mar 18 2022 10:13:31 GMT+0000 (Coordinated Universal Time)
|
|
122
122
|
</div>
|
|
123
123
|
</div>
|
|
124
124
|
<script src="../../prettify.js"></script>
|
|
@@ -136,7 +136,7 @@ exports.getFullUser = async (ctx, userId) => {
|
|
|
136
136
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
137
137
|
Code coverage generated by
|
|
138
138
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
139
|
-
at Fri Mar 18 2022
|
|
139
|
+
at Fri Mar 18 2022 10:13:31 GMT+0000 (Coordinated Universal Time)
|
|
140
140
|
</div>
|
|
141
141
|
</div>
|
|
142
142
|
<script src="../prettify.js"></script>
|
|
@@ -481,7 +481,7 @@ exports.readGlobalUser = <span class="fstat-no" title="function not covered" >as
|
|
|
481
481
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
482
482
|
Code coverage generated by
|
|
483
483
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
484
|
-
at Fri Mar 18 2022
|
|
484
|
+
at Fri Mar 18 2022 10:13:31 GMT+0000 (Coordinated Universal Time)
|
|
485
485
|
</div>
|
|
486
486
|
</div>
|
|
487
487
|
<script src="../prettify.js"></script>
|
|
@@ -50,6 +50,7 @@ var SourceNames;
|
|
|
50
50
|
SourceNames["REST"] = "REST";
|
|
51
51
|
SourceNames["ORACLE"] = "ORACLE";
|
|
52
52
|
SourceNames["GOOGLE_SHEETS"] = "GOOGLE_SHEETS";
|
|
53
|
+
SourceNames["FIREBASE"] = "FIREBASE";
|
|
53
54
|
})(SourceNames = exports.SourceNames || (exports.SourceNames = {}));
|
|
54
55
|
var IncludeRelationships;
|
|
55
56
|
(function (IncludeRelationships) {
|
|
@@ -0,0 +1,192 @@
|
|
|
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 firestore_1 = require("@google-cloud/firestore");
|
|
14
|
+
var Firebase;
|
|
15
|
+
(function (Firebase) {
|
|
16
|
+
const SCHEMA = {
|
|
17
|
+
docs: "https://firebase.google.com/docs/firestore/quickstart",
|
|
18
|
+
friendlyName: "Firestore",
|
|
19
|
+
description: "Cloud Firestore is a flexible, scalable database for mobile, web, and server development from Firebase and Google Cloud.",
|
|
20
|
+
datasource: {
|
|
21
|
+
email: {
|
|
22
|
+
type: datasource_1.DatasourceFieldTypes.STRING,
|
|
23
|
+
required: true,
|
|
24
|
+
},
|
|
25
|
+
privateKey: {
|
|
26
|
+
type: datasource_1.DatasourceFieldTypes.STRING,
|
|
27
|
+
required: true,
|
|
28
|
+
},
|
|
29
|
+
projectId: {
|
|
30
|
+
type: datasource_1.DatasourceFieldTypes.STRING,
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
serviceAccount: {
|
|
34
|
+
type: datasource_1.DatasourceFieldTypes.JSON,
|
|
35
|
+
required: false,
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
query: {
|
|
39
|
+
create: {
|
|
40
|
+
type: datasource_1.QueryTypes.JSON,
|
|
41
|
+
},
|
|
42
|
+
read: {
|
|
43
|
+
type: datasource_1.QueryTypes.JSON,
|
|
44
|
+
},
|
|
45
|
+
update: {
|
|
46
|
+
type: datasource_1.QueryTypes.JSON,
|
|
47
|
+
},
|
|
48
|
+
delete: {
|
|
49
|
+
type: datasource_1.QueryTypes.JSON,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
extra: {
|
|
53
|
+
collection: {
|
|
54
|
+
displayName: "Collection",
|
|
55
|
+
type: datasource_1.DatasourceFieldTypes.STRING,
|
|
56
|
+
required: true,
|
|
57
|
+
},
|
|
58
|
+
filterField: {
|
|
59
|
+
displayName: "Filter field",
|
|
60
|
+
type: datasource_1.DatasourceFieldTypes.STRING,
|
|
61
|
+
required: false,
|
|
62
|
+
},
|
|
63
|
+
filter: {
|
|
64
|
+
displayName: "Filter comparison",
|
|
65
|
+
type: datasource_1.DatasourceFieldTypes.LIST,
|
|
66
|
+
required: false,
|
|
67
|
+
data: {
|
|
68
|
+
read: [
|
|
69
|
+
"==",
|
|
70
|
+
"<",
|
|
71
|
+
"<=",
|
|
72
|
+
"==",
|
|
73
|
+
"!=",
|
|
74
|
+
">=",
|
|
75
|
+
">",
|
|
76
|
+
"array-contains",
|
|
77
|
+
"in",
|
|
78
|
+
"not-in",
|
|
79
|
+
"array-contains-any",
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
filterValue: {
|
|
84
|
+
displayName: "Filter value",
|
|
85
|
+
type: datasource_1.DatasourceFieldTypes.STRING,
|
|
86
|
+
required: false,
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
class FirebaseIntegration {
|
|
91
|
+
constructor(config) {
|
|
92
|
+
this.config = config;
|
|
93
|
+
if (config.serviceAccount) {
|
|
94
|
+
const serviceAccount = JSON.parse(config.serviceAccount);
|
|
95
|
+
this.db = new firestore_1.Firestore({
|
|
96
|
+
projectId: serviceAccount.project_id,
|
|
97
|
+
credentials: {
|
|
98
|
+
client_email: serviceAccount.client_email,
|
|
99
|
+
private_key: serviceAccount.private_key,
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
this.db = new firestore_1.Firestore({
|
|
105
|
+
projectId: config.projectId,
|
|
106
|
+
credentials: {
|
|
107
|
+
client_email: config.email,
|
|
108
|
+
private_key: config.privateKey,
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
create(query) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
try {
|
|
116
|
+
const documentReference = this.db
|
|
117
|
+
.collection(query.extra.collection)
|
|
118
|
+
.doc();
|
|
119
|
+
yield documentReference.set(Object.assign(Object.assign({}, query.json), { id: documentReference.id }));
|
|
120
|
+
const snapshot = yield documentReference.get();
|
|
121
|
+
return snapshot.data();
|
|
122
|
+
}
|
|
123
|
+
catch (err) {
|
|
124
|
+
console.error("Error writing to Firestore", err);
|
|
125
|
+
throw err;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
read(query) {
|
|
130
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
131
|
+
try {
|
|
132
|
+
let snapshot;
|
|
133
|
+
const collectionRef = this.db.collection(query.extra.collection);
|
|
134
|
+
if (query.extra.filterField &&
|
|
135
|
+
query.extra.filter &&
|
|
136
|
+
query.extra.filterValue) {
|
|
137
|
+
snapshot = yield collectionRef
|
|
138
|
+
.where(query.extra.filterField, query.extra.filter, query.extra.filterValue)
|
|
139
|
+
.get();
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
snapshot = yield collectionRef.get();
|
|
143
|
+
}
|
|
144
|
+
const result = [];
|
|
145
|
+
snapshot.forEach(doc => result.push(doc.data()));
|
|
146
|
+
return result;
|
|
147
|
+
}
|
|
148
|
+
catch (err) {
|
|
149
|
+
console.error("Error querying Firestore", err);
|
|
150
|
+
throw err;
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
update(query) {
|
|
155
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
156
|
+
try {
|
|
157
|
+
yield this.db
|
|
158
|
+
.collection(query.extra.collection)
|
|
159
|
+
.doc(query.json.id)
|
|
160
|
+
.update(query.json);
|
|
161
|
+
return (yield this.db
|
|
162
|
+
.collection(query.extra.collection)
|
|
163
|
+
.doc(query.json.id)
|
|
164
|
+
.get()).data();
|
|
165
|
+
}
|
|
166
|
+
catch (err) {
|
|
167
|
+
console.error("Error writing to firebase", err);
|
|
168
|
+
throw err;
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
delete(query) {
|
|
173
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
174
|
+
try {
|
|
175
|
+
yield this.db
|
|
176
|
+
.collection(query.extra.collection)
|
|
177
|
+
.doc(query.json.id)
|
|
178
|
+
.delete();
|
|
179
|
+
return true;
|
|
180
|
+
}
|
|
181
|
+
catch (err) {
|
|
182
|
+
console.error("Error writing to mongodb", err);
|
|
183
|
+
throw err;
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
module.exports = {
|
|
189
|
+
schema: SCHEMA,
|
|
190
|
+
integration: FirebaseIntegration,
|
|
191
|
+
};
|
|
192
|
+
})(Firebase || (Firebase = {}));
|
|
@@ -11,6 +11,7 @@ const mysql = require("./mysql");
|
|
|
11
11
|
const arangodb = require("./arangodb");
|
|
12
12
|
const rest = require("./rest");
|
|
13
13
|
const googlesheets = require("./googlesheets");
|
|
14
|
+
const firebase = require("./firebase");
|
|
14
15
|
const { SourceNames } = require("../definitions/datasource");
|
|
15
16
|
const environment = require("../environment");
|
|
16
17
|
const DEFINITIONS = {
|
|
@@ -25,6 +26,7 @@ const DEFINITIONS = {
|
|
|
25
26
|
[SourceNames.MYSQL]: mysql.schema,
|
|
26
27
|
[SourceNames.ARANGODB]: arangodb.schema,
|
|
27
28
|
[SourceNames.REST]: rest.schema,
|
|
29
|
+
[SourceNames.FIREBASE]: firebase.schema,
|
|
28
30
|
};
|
|
29
31
|
const INTEGRATIONS = {
|
|
30
32
|
[SourceNames.POSTGRES]: postgres.integration,
|
|
@@ -38,6 +40,7 @@ const INTEGRATIONS = {
|
|
|
38
40
|
[SourceNames.MYSQL]: mysql.integration,
|
|
39
41
|
[SourceNames.ARANGODB]: arangodb.integration,
|
|
40
42
|
[SourceNames.REST]: rest.integration,
|
|
43
|
+
[SourceNames.FIREBASE]: firebase.integration,
|
|
41
44
|
};
|
|
42
45
|
// optionally add oracle integration if the oracle binary can be installed
|
|
43
46
|
if (!(process.arch === "arm64" && process.platform === "darwin")) {
|
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.91-alpha.
|
|
4
|
+
"version": "1.0.91-alpha.2",
|
|
5
5
|
"description": "Budibase Web Server",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -71,12 +71,13 @@
|
|
|
71
71
|
"license": "GPL-3.0",
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"@apidevtools/swagger-parser": "^10.0.3",
|
|
74
|
-
"@budibase/backend-core": "^1.0.91-alpha.
|
|
75
|
-
"@budibase/client": "^1.0.91-alpha.
|
|
76
|
-
"@budibase/string-templates": "^1.0.91-alpha.
|
|
74
|
+
"@budibase/backend-core": "^1.0.91-alpha.2",
|
|
75
|
+
"@budibase/client": "^1.0.91-alpha.2",
|
|
76
|
+
"@budibase/string-templates": "^1.0.91-alpha.2",
|
|
77
77
|
"@bull-board/api": "^3.7.0",
|
|
78
78
|
"@bull-board/koa": "^3.7.0",
|
|
79
79
|
"@elastic/elasticsearch": "7.10.0",
|
|
80
|
+
"@google-cloud/firestore": "^5.0.2",
|
|
80
81
|
"@koa/router": "8.0.0",
|
|
81
82
|
"@sendgrid/mail": "7.1.1",
|
|
82
83
|
"@sentry/node": "^6.0.0",
|