@budibase/shared-core 2.29.26 → 2.29.28

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/dist/index.js CHANGED
@@ -10097,7 +10097,7 @@ var AnalyticsEvent = {
10097
10097
  PluginInit: "plugin:init" /* PLUGIN_INIT */
10098
10098
  };
10099
10099
 
10100
- // ../types/src/documents/app/automation.ts
10100
+ // ../types/src/documents/app/automation/automation.ts
10101
10101
  var AutomationTriggerStepId = /* @__PURE__ */ ((AutomationTriggerStepId2) => {
10102
10102
  AutomationTriggerStepId2["ROW_SAVED"] = "ROW_SAVED";
10103
10103
  AutomationTriggerStepId2["ROW_UPDATED"] = "ROW_UPDATED";
@@ -11064,6 +11064,7 @@ __export(utils_exports, {
11064
11064
  filterValueToLabel: () => filterValueToLabel,
11065
11065
  hasSchema: () => hasSchema,
11066
11066
  parallelForeach: () => parallelForeach,
11067
+ trimOtherProps: () => trimOtherProps,
11067
11068
  unreachable: () => unreachable
11068
11069
  });
11069
11070
  function unreachable(value, message = `No such case in exhaustive switch: ${value}`) {
@@ -11110,6 +11111,13 @@ function filterValueToLabel() {
11110
11111
  function hasSchema(test) {
11111
11112
  return typeof test === "object" && !Array.isArray(test) && test !== null && !(test instanceof Date) && Object.keys(test).length > 0;
11112
11113
  }
11114
+ function trimOtherProps(object, allowedProps) {
11115
+ const result = Object.keys(object).filter((key) => allowedProps.includes(key)).reduce(
11116
+ (acc, key) => ({ ...acc, [key]: object[key] }),
11117
+ {}
11118
+ );
11119
+ return result;
11120
+ }
11113
11121
 
11114
11122
  // src/sdk/index.ts
11115
11123
  var sdk_exports = {};
@@ -11324,7 +11332,7 @@ function canBeDisplayColumn(type) {
11324
11332
  function canBeSortColumn(type) {
11325
11333
  return !!allowSortColumnByType[type];
11326
11334
  }
11327
- function findDuplicateInternalColumns(table, opts) {
11335
+ function findDuplicateInternalColumns(table) {
11328
11336
  const casedKeys = Object.keys(table.schema);
11329
11337
  const uncasedKeys = casedKeys.map((colName) => colName.toLowerCase());
11330
11338
  const set = new Set(uncasedKeys);
@@ -11337,11 +11345,9 @@ function findDuplicateInternalColumns(table, opts) {
11337
11345
  }
11338
11346
  }
11339
11347
  }
11340
- if (!opts?.ignoreProtectedColumnNames) {
11341
- for (let internalColumn of PROTECTED_INTERNAL_COLUMNS) {
11342
- if (casedKeys.find((key) => key === internalColumn)) {
11343
- duplicates.push(internalColumn);
11344
- }
11348
+ for (let internalColumn of PROTECTED_INTERNAL_COLUMNS) {
11349
+ if (casedKeys.find((key) => key === internalColumn)) {
11350
+ duplicates.push(internalColumn);
11345
11351
  }
11346
11352
  }
11347
11353
  return duplicates;