@budibase/server 2.4.39 → 2.4.41

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.
@@ -10,7 +10,7 @@
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.0e859568.js"></script>
13
+ <script type="module" crossorigin src="/builder/assets/index.cf8e1455.js"></script>
14
14
  <link rel="stylesheet" href="/builder/assets/index.b0e3aca6.css">
15
15
  </head>
16
16
  <body id="app">
@@ -54,7 +54,6 @@ const exporters = __importStar(require("../view/exporters"));
54
54
  const fileSystem_1 = require("../../../utilities/fileSystem");
55
55
  const types_1 = require("@budibase/types");
56
56
  const sdk_1 = __importDefault(require("../../../sdk"));
57
- const utils = __importStar(require("./utils"));
58
57
  const { cleanExportRows } = require("./utils");
59
58
  function handleRequest(operation, tableId, opts) {
60
59
  return __awaiter(this, void 0, void 0, function* () {
@@ -84,13 +83,6 @@ function patch(ctx) {
84
83
  const id = inputs._id;
85
84
  // don't save the ID to db
86
85
  delete inputs._id;
87
- const validateResult = yield utils.validate({
88
- row: inputs,
89
- tableId,
90
- });
91
- if (!validateResult.valid) {
92
- throw { validation: validateResult.errors };
93
- }
94
86
  return handleRequest(types_1.Operation.UPDATE, tableId, {
95
87
  id: (0, utils_1.breakRowIdField)(id),
96
88
  row: inputs,
@@ -103,13 +95,6 @@ function save(ctx) {
103
95
  return __awaiter(this, void 0, void 0, function* () {
104
96
  const inputs = ctx.request.body;
105
97
  const tableId = ctx.params.tableId;
106
- const validateResult = yield utils.validate({
107
- row: inputs,
108
- tableId,
109
- });
110
- if (!validateResult.valid) {
111
- throw { validation: validateResult.errors };
112
- }
113
98
  return handleRequest(types_1.Operation.CREATE, tableId, {
114
99
  row: inputs,
115
100
  includeSqlRelationships: types_1.IncludeRelationship.EXCLUDE,
@@ -172,10 +172,16 @@ exports.search = search;
172
172
  function validate(ctx) {
173
173
  return __awaiter(this, void 0, void 0, function* () {
174
174
  const tableId = getTableId(ctx);
175
- ctx.body = yield utils.validate({
176
- row: ctx.request.body,
177
- tableId,
178
- });
175
+ // external tables are hard to validate currently
176
+ if ((0, utils_1.isExternalTable)(tableId)) {
177
+ ctx.body = { valid: true };
178
+ }
179
+ else {
180
+ ctx.body = yield utils.validate({
181
+ row: ctx.request.body,
182
+ tableId,
183
+ });
184
+ }
179
185
  });
180
186
  }
181
187
  exports.validate = validate;
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.38",
4
+ "version": "2.4.40",
5
5
  "description": "Budibase Web Server",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -43,12 +43,12 @@
43
43
  "license": "GPL-3.0",
44
44
  "dependencies": {
45
45
  "@apidevtools/swagger-parser": "10.0.3",
46
- "@budibase/backend-core": "^2.4.38",
47
- "@budibase/client": "^2.4.38",
48
- "@budibase/pro": "2.4.38",
49
- "@budibase/shared-core": "^2.4.38",
50
- "@budibase/string-templates": "^2.4.38",
51
- "@budibase/types": "^2.4.38",
46
+ "@budibase/backend-core": "^2.4.40",
47
+ "@budibase/client": "^2.4.40",
48
+ "@budibase/pro": "2.4.40",
49
+ "@budibase/shared-core": "^2.4.40",
50
+ "@budibase/string-templates": "^2.4.40",
51
+ "@budibase/types": "^2.4.40",
52
52
  "@bull-board/api": "3.7.0",
53
53
  "@bull-board/koa": "3.9.4",
54
54
  "@elastic/elasticsearch": "7.10.0",