@budibase/server 2.7.28 → 2.7.30

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.
@@ -9,7 +9,7 @@
9
9
  <link href="/builder/fonts/source-sans-pro/600.css" rel="stylesheet" />
10
10
  <link href="/builder/fonts/source-sans-pro/700.css" rel="stylesheet" />
11
11
  <link href="/builder/fonts/remixicon.css" rel="stylesheet" />
12
- <script type="module" crossorigin src="/builder/assets/index.604fee97.js"></script>
12
+ <script type="module" crossorigin src="/builder/assets/index.abd4e5cc.js"></script>
13
13
  <link rel="stylesheet" href="/builder/assets/index.d9b46807.css">
14
14
  </head>
15
15
 
@@ -25241,11 +25241,13 @@ function checkDatasourceTypes(schema, config) {
25241
25241
  async function enrichDatasourceWithValues(datasource2) {
25242
25242
  const cloned = (0, import_fp.cloneDeep)(datasource2);
25243
25243
  const env = await getEnvironmentVariables2();
25244
+ const { entities, ...clonedWithoutEntities } = cloned;
25244
25245
  const processed = (0, import_string_templates.processObjectSync)(
25245
- cloned,
25246
+ clonedWithoutEntities,
25246
25247
  { env },
25247
25248
  { onlyFound: true }
25248
25249
  );
25250
+ processed.entities = entities;
25249
25251
  const definition26 = await getDefinition(processed.source);
25250
25252
  processed.config = checkDatasourceTypes(definition26, processed.config);
25251
25253
  return {
@@ -26295,6 +26297,12 @@ __export(utils_exports9, {
26295
26297
  getTableId: () => getTableId,
26296
26298
  validate: () => validate3
26297
26299
  });
26300
+ function isForeignKey(key, table) {
26301
+ const relationships = Object.values(table.schema).filter(
26302
+ (column) => column.type === "link" /* LINK */
26303
+ );
26304
+ return relationships.some((relationship) => relationship.foreignKey === key);
26305
+ }
26298
26306
  async function getDatasourceAndQuery(json2) {
26299
26307
  const datasourceId = json2.endpoint.datasourceId;
26300
26308
  const datasource2 = await sdk_default.datasources.get(datasourceId);
@@ -26333,6 +26341,9 @@ async function validate3({
26333
26341
  const column = fetchedTable.schema[fieldName];
26334
26342
  const constraints = cloneDeep6(column.constraints);
26335
26343
  const type = column.type;
26344
+ if (isForeignKey(fieldName, fetchedTable)) {
26345
+ continue;
26346
+ }
26336
26347
  if (type === "formula" /* FORMULA */ || column.autocolumn) {
26337
26348
  continue;
26338
26349
  }
@@ -26417,6 +26428,7 @@ var init_utils20 = __esm({
26417
26428
  init_constants6();
26418
26429
  init_src2();
26419
26430
  init_query4();
26431
+ init_src();
26420
26432
  init_exporters();
26421
26433
  init_sdk3();
26422
26434
  validateJs = require("validate.js");