@budibase/server 2.4.12-alpha.0 → 2.4.13
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.cbe2be2f.js → index.a418a576.js} +375 -375
- package/builder/assets/{index.af76a09d.css → index.b0e3aca6.css} +2 -2
- package/builder/index.html +2 -2
- package/dist/api/controllers/row/ExternalRequest.js +2 -10
- package/dist/api/controllers/row/external.js +1 -1
- package/dist/environment.js +0 -1
- package/dist/integrations/base/sql.js +1 -1
- package/dist/integrations/googlesheets.js +3 -14
- package/dist/package.json +6 -7
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/jest.config.ts +0 -1
- package/package.json +7 -8
- package/src/api/controllers/row/ExternalRequest.ts +2 -12
- package/src/api/controllers/row/external.ts +3 -3
- package/src/environment.ts +0 -1
- package/src/integrations/base/sql.ts +1 -2
- package/src/integrations/googlesheets.ts +4 -30
- package/tsconfig.json +10 -5
package/builder/index.html
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap"
|
|
11
11
|
rel="stylesheet"
|
|
12
12
|
/>
|
|
13
|
-
<script type="module" crossorigin src="/builder/assets/index.
|
|
14
|
-
<link rel="stylesheet" href="/builder/assets/index.
|
|
13
|
+
<script type="module" crossorigin src="/builder/assets/index.a418a576.js"></script>
|
|
14
|
+
<link rel="stylesheet" href="/builder/assets/index.b0e3aca6.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body id="app">
|
|
17
17
|
|
|
@@ -614,16 +614,8 @@ class ExternalRequest {
|
|
|
614
614
|
let { id, row, filters, sort, paginate, rows } = cleanupConfig(config, table);
|
|
615
615
|
//if the sort column is a formula, remove it
|
|
616
616
|
for (let sortColumn of Object.keys(sort || {})) {
|
|
617
|
-
if (
|
|
618
|
-
|
|
619
|
-
}
|
|
620
|
-
switch ((_a = table.schema[sortColumn]) === null || _a === void 0 ? void 0 : _a.type) {
|
|
621
|
-
case types_1.FieldType.FORMULA:
|
|
622
|
-
sort === null || sort === void 0 ? true : delete sort[sortColumn];
|
|
623
|
-
break;
|
|
624
|
-
case types_1.FieldType.NUMBER:
|
|
625
|
-
sort[sortColumn].type = types_1.SortType.number;
|
|
626
|
-
break;
|
|
617
|
+
if (((_a = table.schema[sortColumn]) === null || _a === void 0 ? void 0 : _a.type) === "formula") {
|
|
618
|
+
sort === null || sort === void 0 ? true : delete sort[sortColumn];
|
|
627
619
|
}
|
|
628
620
|
}
|
|
629
621
|
filters = buildFilters(id, filters || {}, table);
|
package/dist/environment.js
CHANGED
|
@@ -38,7 +38,6 @@ const environment = {
|
|
|
38
38
|
AWS_REGION: process.env.AWS_REGION,
|
|
39
39
|
MINIO_ACCESS_KEY: process.env.MINIO_ACCESS_KEY,
|
|
40
40
|
MINIO_SECRET_KEY: process.env.MINIO_SECRET_KEY,
|
|
41
|
-
CDN_URL: process.env.CDN_URL || "https://cdn.budi.live",
|
|
42
41
|
REDIS_URL: process.env.REDIS_URL,
|
|
43
42
|
REDIS_PASSWORD: process.env.REDIS_PASSWORD,
|
|
44
43
|
INTERNAL_API_KEY: process.env.INTERNAL_API_KEY,
|
|
@@ -293,7 +293,7 @@ class InternalBuilder {
|
|
|
293
293
|
const table = (_a = json.meta) === null || _a === void 0 ? void 0 : _a.table;
|
|
294
294
|
if (sort) {
|
|
295
295
|
for (let [key, value] of Object.entries(sort)) {
|
|
296
|
-
const direction = value
|
|
296
|
+
const direction = value === types_1.SortDirection.ASCENDING ? "asc" : "desc";
|
|
297
297
|
query = query.orderBy(`${table === null || table === void 0 ? void 0 : table.name}.${key}`, direction);
|
|
298
298
|
}
|
|
299
299
|
}
|
|
@@ -19,7 +19,6 @@ const constants_1 = require("../constants");
|
|
|
19
19
|
const google_spreadsheet_1 = require("google-spreadsheet");
|
|
20
20
|
const node_fetch_1 = __importDefault(require("node-fetch"));
|
|
21
21
|
const backend_core_1 = require("@budibase/backend-core");
|
|
22
|
-
const shared_core_1 = require("@budibase/shared-core");
|
|
23
22
|
const SCHEMA = {
|
|
24
23
|
plus: true,
|
|
25
24
|
auth: {
|
|
@@ -197,7 +196,7 @@ class GoogleSheetsIntegration {
|
|
|
197
196
|
const sheet = json.endpoint.entityId;
|
|
198
197
|
const handlers = {
|
|
199
198
|
[constants_1.DataSourceOperation.CREATE]: () => this.create({ sheet, row: json.body }),
|
|
200
|
-
[constants_1.DataSourceOperation.READ]: () => this.read(
|
|
199
|
+
[constants_1.DataSourceOperation.READ]: () => this.read({ sheet }),
|
|
201
200
|
[constants_1.DataSourceOperation.UPDATE]: () => {
|
|
202
201
|
var _a, _b, _c;
|
|
203
202
|
return this.update({
|
|
@@ -313,21 +312,11 @@ class GoogleSheetsIntegration {
|
|
|
313
312
|
yield this.connect();
|
|
314
313
|
const sheet = this.client.sheetsByTitle[query.sheet];
|
|
315
314
|
const rows = yield sheet.getRows();
|
|
316
|
-
const filtered = shared_core_1.dataFilters.runLuceneQuery(rows, query.filters);
|
|
317
315
|
const headerValues = sheet.headerValues;
|
|
318
|
-
|
|
319
|
-
for (let row of
|
|
316
|
+
const response = [];
|
|
317
|
+
for (let row of rows) {
|
|
320
318
|
response.push(this.buildRowObject(headerValues, row._rawData, row._rowNumber));
|
|
321
319
|
}
|
|
322
|
-
if (query.sort) {
|
|
323
|
-
if (Object.keys(query.sort).length !== 1) {
|
|
324
|
-
console.warn("Googlesheets does not support multiple sorting", {
|
|
325
|
-
sortInfo: query.sort,
|
|
326
|
-
});
|
|
327
|
-
}
|
|
328
|
-
const [sortField, sortInfo] = Object.entries(query.sort)[0];
|
|
329
|
-
response = shared_core_1.dataFilters.luceneSort(response, sortField, sortInfo.direction, sortInfo.type);
|
|
330
|
-
}
|
|
331
320
|
return response;
|
|
332
321
|
}
|
|
333
322
|
catch (err) {
|
package/dist/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/server",
|
|
3
3
|
"email": "hi@budibase.com",
|
|
4
|
-
"version": "2.4.
|
|
4
|
+
"version": "2.4.12",
|
|
5
5
|
"description": "Budibase Web Server",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -43,12 +43,11 @@
|
|
|
43
43
|
"license": "GPL-3.0",
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@apidevtools/swagger-parser": "10.0.3",
|
|
46
|
-
"@budibase/backend-core": "^2.4.
|
|
47
|
-
"@budibase/client": "^2.4.
|
|
48
|
-
"@budibase/pro": "2.4.
|
|
49
|
-
"@budibase/
|
|
50
|
-
"@budibase/
|
|
51
|
-
"@budibase/types": "^2.4.11",
|
|
46
|
+
"@budibase/backend-core": "^2.4.12",
|
|
47
|
+
"@budibase/client": "^2.4.12",
|
|
48
|
+
"@budibase/pro": "2.4.12",
|
|
49
|
+
"@budibase/string-templates": "^2.4.12",
|
|
50
|
+
"@budibase/types": "^2.4.12",
|
|
52
51
|
"@bull-board/api": "3.7.0",
|
|
53
52
|
"@bull-board/koa": "3.9.4",
|
|
54
53
|
"@elastic/elasticsearch": "7.10.0",
|