drapcode-utility 1.4.8 → 1.4.9

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.
@@ -35,6 +35,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
35
35
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
36
  }
37
37
  };
38
+ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
39
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
40
+ to[j] = from[i];
41
+ return to;
42
+ };
38
43
  Object.defineProperty(exports, "__esModule", { value: true });
39
44
  exports.processKMSDecryption = exports.cryptFile = exports.drapcodeEncryptDecrypt = exports.decryptDataWithKMS = exports.encryptDataWithKMS = exports.createKMSDataKey = exports.processDataEncryptionDecryption = exports.processItemEncryptDecrypt = exports.crypt = void 0;
40
45
  var client_kms_1 = require("@aws-sdk/client-kms");
@@ -106,7 +111,10 @@ var processItemEncryptDecrypt = function (item, fields, encryption, decrypt, enc
106
111
  _j.label = 2;
107
112
  case 2:
108
113
  if (!decrypt) return [3 /*break*/, 6];
109
- if (![drapcode_constant_1.FieldTypes.reference.id, drapcode_constant_1.FieldTypes.createdBy.id].includes(field === null || field === void 0 ? void 0 : field.type)) return [3 /*break*/, 4];
114
+ if (!__spreadArray(__spreadArray([], drapcode_constant_1.onlyReferenceField), [
115
+ drapcode_constant_1.FieldTypes.createdBy.id,
116
+ drapcode_constant_1.FieldTypes.belongsTo.id,
117
+ ]).includes(field === null || field === void 0 ? void 0 : field.type)) return [3 /*break*/, 4];
110
118
  refField = field;
111
119
  if (!refField.refCollection &&
112
120
  field.type === drapcode_constant_1.FieldTypes.createdBy.id) {
@@ -13,6 +13,7 @@ var getEncryptedReferenceFieldsQuery = function (collectionFields, projectId) {
13
13
  if (__spreadArray(__spreadArray([], drapcode_constant_1.onlyReferenceField), [
14
14
  drapcode_constant_1.FieldTypes.dynamic_option.id,
15
15
  drapcode_constant_1.FieldTypes.createdBy.id,
16
+ drapcode_constant_1.FieldTypes.belongsTo.id,
16
17
  ]).includes(field.type)) {
17
18
  if (!field.refCollection && field.type === drapcode_constant_1.FieldTypes.createdBy.id) {
18
19
  collectionsNamesArr.push("user");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drapcode-utility",
3
- "version": "1.4.8",
3
+ "version": "1.4.9",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",