@payloadcms/db-postgres 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. package/dist/connect.d.ts.map +1 -1
  2. package/dist/connect.js +42 -4
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +6 -2
  5. package/dist/init.d.ts.map +1 -1
  6. package/dist/init.js +5 -7
  7. package/dist/queries/buildQuery.d.ts.map +1 -1
  8. package/dist/queries/buildQuery.js +3 -2
  9. package/dist/queries/getTableColumnFromPath.d.ts +9 -1
  10. package/dist/queries/getTableColumnFromPath.d.ts.map +1 -1
  11. package/dist/queries/getTableColumnFromPath.js +46 -15
  12. package/dist/queries/parseParams.d.ts.map +1 -1
  13. package/dist/queries/parseParams.js +6 -8
  14. package/dist/queries/sanitizeQueryValue.d.ts +3 -1
  15. package/dist/queries/sanitizeQueryValue.d.ts.map +1 -1
  16. package/dist/queries/sanitizeQueryValue.js +5 -3
  17. package/dist/schema/build.d.ts.map +1 -1
  18. package/dist/schema/build.js +8 -10
  19. package/dist/schema/parentIDColumnMap.d.ts +3 -6
  20. package/dist/schema/parentIDColumnMap.d.ts.map +1 -1
  21. package/dist/schema/parentIDColumnMap.js +2 -1
  22. package/dist/schema/setColumnID.d.ts +11 -0
  23. package/dist/schema/setColumnID.d.ts.map +1 -0
  24. package/dist/schema/setColumnID.js +34 -0
  25. package/dist/schema/traverseFields.d.ts.map +1 -1
  26. package/dist/schema/traverseFields.js +2 -1
  27. package/dist/types.d.ts +3 -0
  28. package/dist/types.d.ts.map +1 -1
  29. package/dist/upsertRow/insertArrays.d.ts.map +1 -1
  30. package/dist/upsertRow/insertArrays.js +6 -4
  31. package/package.json +3 -3
  32. package/dist/schema/getConfigIDType.d.ts +0 -3
  33. package/dist/schema/getConfigIDType.d.ts.map +0 -1
  34. package/dist/schema/getConfigIDType.js +0 -25
@@ -20,7 +20,7 @@ function _interop_require_default(obj) {
20
20
  default: obj
21
21
  };
22
22
  }
23
- const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPrefix = '', constraintPath: incomingConstraintPath, constraints = [], fields, joinAliases, joins, locale: incomingLocale, pathSegments: incomingSegments, rootTableName: incomingRootTableName, selectFields, tableName })=>{
23
+ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPrefix = '', constraintPath: incomingConstraintPath, constraints = [], fields, joinAliases, joins, locale: incomingLocale, pathSegments: incomingSegments, rootTableName: incomingRootTableName, selectFields, tableName, tableNameSuffix = '', value })=>{
24
24
  const fieldPath = incomingSegments[0];
25
25
  let locale = incomingLocale;
26
26
  const rootTableName = incomingRootTableName || tableName;
@@ -34,7 +34,7 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
34
34
  constraints,
35
35
  field: {
36
36
  name: 'id',
37
- type: 'number'
37
+ type: adapter.idType === 'uuid' ? 'text' : 'number'
38
38
  },
39
39
  table: adapter.tables[newTableName]
40
40
  };
@@ -72,7 +72,9 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
72
72
  pathSegments: pathSegments.slice(1),
73
73
  rootTableName,
74
74
  selectFields,
75
- tableName: newTableName
75
+ tableName: newTableName,
76
+ tableNameSuffix,
77
+ value
76
78
  });
77
79
  }
78
80
  case 'tab':
@@ -92,7 +94,9 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
92
94
  pathSegments: pathSegments.slice(1),
93
95
  rootTableName,
94
96
  selectFields,
95
- tableName: newTableName
97
+ tableName: newTableName,
98
+ tableNameSuffix: `${tableNameSuffix}${(0, _tosnakecase.default)(field.name)}_`,
99
+ value
96
100
  });
97
101
  }
98
102
  return getTableColumnFromPath({
@@ -109,7 +113,9 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
109
113
  pathSegments: pathSegments.slice(1),
110
114
  rootTableName,
111
115
  selectFields,
112
- tableName: newTableName
116
+ tableName: newTableName,
117
+ tableNameSuffix,
118
+ value
113
119
  });
114
120
  }
115
121
  case 'group':
@@ -139,12 +145,14 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
139
145
  pathSegments: pathSegments.slice(1),
140
146
  rootTableName,
141
147
  selectFields,
142
- tableName: newTableName
148
+ tableName: newTableName,
149
+ tableNameSuffix: `${tableNameSuffix}${(0, _tosnakecase.default)(field.name)}_`,
150
+ value
143
151
  });
144
152
  }
145
153
  case 'array':
146
154
  {
147
- newTableName = `${tableName}_${(0, _tosnakecase.default)(field.name)}`;
155
+ newTableName = `${tableName}_${tableNameSuffix}${(0, _tosnakecase.default)(field.name)}`;
148
156
  constraintPath = `${constraintPath}${field.name}.%.`;
149
157
  if (locale && field.localized && adapter.payload.config.localization) {
150
158
  joins[newTableName] = (0, _drizzleorm.and)((0, _drizzleorm.eq)(adapter.tables[tableName].id, adapter.tables[newTableName]._parentID), (0, _drizzleorm.eq)(adapter.tables[newTableName]._locale, locale));
@@ -170,13 +178,37 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
170
178
  pathSegments: pathSegments.slice(1),
171
179
  rootTableName,
172
180
  selectFields,
173
- tableName: newTableName
181
+ tableName: newTableName,
182
+ value
174
183
  });
175
184
  }
176
185
  case 'blocks':
177
186
  {
178
187
  let blockTableColumn;
179
188
  let newTableName;
189
+ // handle blockType queries
190
+ if (pathSegments[1] === 'blockType') {
191
+ // find the block config using the value
192
+ const blockTypes = Array.isArray(value) ? value : [
193
+ value
194
+ ];
195
+ blockTypes.forEach((blockType)=>{
196
+ const block = field.blocks.find((block)=>block.slug === blockType);
197
+ newTableName = `${tableName}_blocks_${(0, _tosnakecase.default)(block.slug)}`;
198
+ joins[newTableName] = (0, _drizzleorm.eq)(adapter.tables[tableName].id, adapter.tables[newTableName]._parentID);
199
+ constraints.push({
200
+ columnName: '_path',
201
+ table: adapter.tables[newTableName],
202
+ value: pathSegments[0]
203
+ });
204
+ });
205
+ return {
206
+ constraints,
207
+ field,
208
+ getNotNullColumnByValue: ()=>'id',
209
+ table: adapter.tables[tableName]
210
+ };
211
+ }
180
212
  const hasBlockField = field.blocks.some((block)=>{
181
213
  newTableName = `${tableName}_blocks_${(0, _tosnakecase.default)(block.slug)}`;
182
214
  constraintPath = `${constraintPath}${field.name}.%.`;
@@ -196,7 +228,8 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
196
228
  pathSegments: pathSegments.slice(1),
197
229
  rootTableName,
198
230
  selectFields: blockSelectFields,
199
- tableName: newTableName
231
+ tableName: newTableName,
232
+ value
200
233
  });
201
234
  } catch (error) {
202
235
  // this is fine, not every block will have the field
@@ -234,9 +267,6 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
234
267
  table: blockTableColumn.table
235
268
  };
236
269
  }
237
- if (pathSegments[1] === 'blockType') {
238
- throw new _errors.APIError('Querying on blockType is not supported');
239
- }
240
270
  break;
241
271
  }
242
272
  case 'relationship':
@@ -263,7 +293,7 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
263
293
  condition: (0, _drizzleorm.eq)(newAliasTable.id, aliasRelationshipTable[`${field.relationTo}ID`]),
264
294
  table: newAliasTable
265
295
  });
266
- if (newCollectionPath === '') {
296
+ if (newCollectionPath === '' || newCollectionPath === 'id') {
267
297
  return {
268
298
  columnName: `${field.relationTo}ID`,
269
299
  constraints,
@@ -308,7 +338,8 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
308
338
  pathSegments: pathSegments.slice(1),
309
339
  rootTableName: newTableName,
310
340
  selectFields,
311
- tableName: newTableName
341
+ tableName: newTableName,
342
+ value
312
343
  });
313
344
  }
314
345
  default:
@@ -345,4 +376,4 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
345
376
  throw new _errors.APIError(`Cannot find field for path at ${fieldPath}`);
346
377
  };
347
378
 
348
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9xdWVyaWVzL2dldFRhYm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lhc1RhYmxlLFxuICAgICAgICAgIGNvbGxlY3Rpb25QYXRoLFxuICAgICAgICAgIGNvbHVtblByZWZpeCxcbiAgICAgICAgICBjb25zdHJhaW50UGF0aCxcbiAgICAgICAgICBjb25zdHJhaW50cyxcbiAgICAgICAgICBmaWVsZHM6IGZpZWxkLnRhYnMubWFwKCh0YWIpID0+ICh7XG4gICAgICAgICAgICAuLi50YWIsXG4gICAgICAgICAgICB0eXBlOiAndGFiJyxcbiAgICAgICAgICB9KSksXG4gICAgICAgICAgam9pbkFsaWFzZXMsXG4gICAgICAgICAgam9pbnMsXG4gICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgIHBhdGhTZWdtZW50czogcGF0aFNlZ21lbnRzLnNsaWNlKDEpLFxuICAgICAgICAgIHJvb3RUYWJsZU5hbWUsXG4gICAgICAgICAgc2VsZWN0RmllbGRzLFxuICAgICAgICAgIHRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICB9KVxuICAgICAgfVxuICAgICAgY2FzZSAndGFiJzoge1xuICAgICAgICBpZiAodGFiSGFzTmFtZShmaWVsZCkpIHtcbiAgICAgICAgICByZXR1cm4gZ2V0VGFibGVDb2x1bW5Gcm9tUGF0aCh7XG4gICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgYWxpYXNUYWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25QYXRoLFxuICAgICAgICAgICAgY29sdW1uUHJlZml4OiBgJHtjb2x1bW5QcmVmaXh9JHtmaWVsZC5uYW1lfV9gLFxuICAgICAgICAgICAgY29uc3RyYWludFBhdGg6IGAke2NvbnN0cmFpbnRQYXRofSR7ZmllbGQubmFtZX0uYCxcbiAgICAgICAgICAgIGNvbnN0cmFpbnRzLFxuICAgICAgICAgICAgZmllbGRzOiBmaWVsZC5maWVsZHMsXG4gICAgICAgICAgICBqb2luQWxpYXNlcyxcbiAgICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgICAgcGF0aFNlZ21lbnRzOiBwYXRoU2VnbWVudHMuc2xpY2UoMSksXG4gICAgICAgICAgICByb290VGFibGVOYW1lLFxuICAgICAgICAgICAgc2VsZWN0RmllbGRzLFxuICAgICAgICAgICAgdGFibGVOYW1lOiBuZXdUYWJsZU5hbWUsXG4gICAgICAgICAgfSlcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZ2V0VGFibGVDb2x1bW5Gcm9tUGF0aCh7XG4gICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICBhbGlhc1RhYmxlLFxuICAgICAgICAgIGNvbGxlY3Rpb25QYXRoLFxuICAgICAgICAgIGNvbHVtblByZWZpeCxcbiAgICAgICAgICBjb25zdHJhaW50UGF0aCxcbiAgICAgICAgICBjb25zdHJhaW50cyxcbiAgICAgICAgICBmaWVsZHM6IGZpZWxkLmZpZWxkcyxcbiAgICAgICAgICBqb2luQWxpYXNlcyxcbiAgICAgICAgICBqb2lucyxcbiAgICAgICAgICBsb2NhbGUsXG4gICAgICAgICAgcGF0aFNlZ21lbnRzOiBwYXRoU2VnbWVudHMuc2xpY2UoMSksXG4gICAgICAgICAgcm9vdFRhYmxlTmFtZSxcbiAgICAgICAgICBzZWxlY3RGaWVsZHMsXG4gICAgICAgICAgdGFibGVOYW1lOiBuZXdUYWJsZU5hbWUsXG4gICAgICAgIH0pXG4gICAgICB9XG5cbiAgICAgIGNhc2UgJ2dyb3VwJzoge1xuICAgICAgICBpZiAobG9jYWxlICYmIGZpZWxkLmxvY2FsaXplZCAmJiBhZGFwdGVyLnBheWxvYWQuY29uZmlnLmxvY2FsaXphdGlvbikge1xuICAgICAgICAgIG5ld1RhYmxlTmFtZSA9IGAke3RhYmxlTmFtZX1fbG9jYWxlc2BcblxuICAgICAgICAgIGpvaW5zW3RhYmxlTmFtZV0gPSBlcShcbiAgICAgICAgICAgIGFkYXB0ZXIudGFibGVzW3RhYmxlTmFtZV0uaWQsXG4gICAgICAgICAgICBhZGFwdGVy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G9TbmFrZUNhc2UoZmllbGQubmFtZSl9YFxuICAgICAgICBjb25zdHJhaW50UGF0aCA9IGAke2NvbnN0cmFpbnRQYXRofSR7ZmllbGQubmFtZX0uJS5gXG4gICAgICAgIGlmIChsb2NhbGUgJiYgZmllbGQubG9jYWxpemVkICYmIGFkYXB0ZXIucGF5bG9hZC5jb25maWcubG9jYWxpemF0aW9uKSB7XG4gICAgICAgICAgam9pbnNbbmV3VGFibGVOYW1lXSA9IGFuZChcbiAgICAgICAgICAgIGVxKGFkYXB0ZXIudGFibGVzW3RhYmxlTmFtZV0uaWQsIGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0uX3BhcmVudElEKSxcbiAgICAgICAgICAgIGVxKGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0uX2xvY2FsZSwgbG9jYWxlKSxcbiAgICAgICAgICApXG4gICAgICAgICAgaWYgKGxvY2FsZSAhPT0gJ2FsbCcpIHtcbiAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2goe1xuICAgICAgICAgICAgICBjb2x1bW5OYW1lOiAnX2xvY2FsZScsXG4gICAgICAgICAgICAgIHRhYmxlOiBhZGFwdGVyLnRhYmxlc1tuZXdUYWJsZU5hbWVdLFxuICAgICAgICAgICAgICB2YWx1ZTogbG9jYWxlLFxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgam9pbnNbbmV3VGFibGVOYW1lXSA9IGVxKFxuICAgICAgICAgICAgYWRhcHRlci50YWJsZXNbdGFibGVOYW1lXS5pZCxcbiAgICAgICAgICAgIGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0uX3BhcmVudElELFxuICAgICAgICAgIClcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZ2V0VGFibGVDb2x1bW5Gcm9tUGF0aCh7XG4gICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICBjb2xsZWN0aW9uUGF0aCxcbiAgICAgICAgICBjb25zdHJhaW50UGF0aCxcbiAgICAgICAgICBjb25zdHJhaW50cyxcbiAgICAgICAgICBmaWVsZHM6IGZpZWxkLmZpZWxkcyxcbiAgICAgICAgICBqb2luQWxpYXNlcyxcbiAgICAgICAgICBqb2lucyxcbiAgICAgICAgICBsb2NhbGUsXG4gICAgICAgICAgcGF0aFNlZ21lbnRzOiBwYXRoU2VnbWVudHMuc2xpY2UoMSksXG4gICAgICAgICAgcm9vdFRhYmxlTmFtZSxcbiAgICAgICAgICBzZWxlY3RGaWVsZHMsXG4gICAgICAgICAgdGFibGVOYW1lOiBuZXdUYWJsZU5hbWUsXG4gICAgICAgIH0pXG4gICAgICB9XG5cbiAgICAgIGNhc2UgJ2Jsb2Nrcyc6IHtcbiAgICAgICAgbGV0IGJsb2NrVGFibGVDb2x1bW46IFRhYmxlQ29sdW1uXG4gICAgICAgIGxldCBuZXdUYWJsZU5hbWU6IHN0cmluZ1xuICAgICAgICBjb25zdCBoYXNCbG9ja0ZpZWxkID0gZmllbGQuYmxvY2tzLnNvbWUoKGJsb2NrKSA9PiB7XG4gICAgICAgICAgbmV3VGFibGVOYW1lID0gYCR7dGFibGVOYW1lfV9ibG9ja3NfJHt0b1NuYWtlQ2FzZShibG9jay5zbHVnKX1gXG4gICAgICAgICAgY29uc3RyYWludFBhdGggPSBgJHtjb25zdHJhaW50UGF0aH0ke2ZpZWxkLm5hbWV9LiUuYFxuICAgICAgICAgIGxldCByZXN1bHRcbiAgICAgICAgICBjb25zdCBibG9ja0NvbnN0cmFpbnRzID0gW11cbiAgICAgICAgICBjb25zdCBibG9ja1NlbGVjdEZpZWxkcyA9IHt9XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHJlc3VsdCA9IGdldFRhYmxlQ29sdW1uRnJvbVBhdGgoe1xuICAgICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgICBjb2xsZWN0aW9uUGF0aCxcbiAgICAgICAgICAgICAgY29uc3RyYWludFBhdGgsXG4gICAgICAgICAgICAgIGNvbnN0cmFpbnRzOiBibG9ja0NvbnN0cmFpbnRzLFxuICAgICAgICAgICAgICBmaWVsZHM6IGJsb2NrLmZpZWxkcyxcbiAgICAgICAgICAgICAgam9pbkFsaWFzZXMsXG4gICAgICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgICAgICBsb2NhbGUsXG4gICAgICAgICAgICAgIHBhdGhTZWdtZW50czogcGF0aFNlZ21lbnRzLnNsaWNlKDEpLFxuICAgICAgICAgICAgICByb290VGFibGVOYW1lLFxuICAgICAgICAgICAgICBzZWxlY3RGaWVsZHM6IGJsb2NrU2VsZWN0RmllbGRzLFxuICAgICAgICAgICAgICB0YWJsZU5hbWU6IG5ld1RhYmxlTmFtZSxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgIC8vIHRoaXMgaXMgZmluZSwgbm90IGV2ZXJ5IGJsb2NrIHdpbGwgaGF2ZSB0aGUgZmllbGRcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKCFyZXN1bHQpIHtcbiAgICAgICAgICAgIHJldHVyblxuICAgICAgICAgIH1cbiAgICAgICAgICBibG9ja1RhYmxlQ29sdW1uID0gcmVzdWx0XG4gICAgICAgICAgY29uc3RyYWludHMgPSBjb25zdHJhaW50cy5jb25jYXQoYmxvY2tDb25zdHJhaW50cylcbiAgICAgICAgICBzZWxlY3RGaWVsZHMgPSB7IC4uLnNlbGVjdEZpZWxkcywgLi4uYmxvY2tTZWxlY3RGaWVsZHMgfVxuICAgICAgICAgIGlmIChmaWVsZC5sb2NhbGl6ZWQgJiYgYWRhcHRlci5wYXlsb2FkLmNvbmZpZy5sb2NhbGl6YXRpb24pIHtcbiAgICAgICAgICAgIGpvaW5zW25ld1RhYmxlTmFtZV0gPSBhbmQoXG4gICAgICAgICAgICAgIGVxKGFkYXB0ZXIudGFibGVzW3RhYmxlTmFtZV0uaWQsIGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0uX3BhcmVudElEKSxcbiAgICAgICAgICAgICAgZXEoYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXS5fbG9jYWxlLCBsb2NhbGUpLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgaWYgKGxvY2FsZSkge1xuICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKHtcbiAgICAgICAgICAgICAgICBjb2x1bW5OYW1lOiAnX2xvY2FsZScsXG4gICAgICAgICAgICAgICAgdGFibGU6IGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0sXG4gICAgICAgICAgICAgICAgdmFsdWU6IGxvY2FsZSxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgam9pbnNbbmV3VGFibGVOYW1lXSA9IGVxKFxuICAgICAgICAgICAgICBhZGFwdGVyLnRhYmxlc1t0YWJsZU5hbWVdLmlkLFxuICAgICAgICAgICAgICBhZGFwdGVyLnRhYmxlc1tuZXdUYWJsZU5hbWVdLl9wYXJlbnRJRCxcbiAgICAgICAgICAgIClcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIHRydWVcbiAgICAgICAgfSlcbiAgICAgICAgaWYgKGhhc0Jsb2NrRmllbGQpIHtcbiAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgY29sdW1uTmFtZTogYmxvY2tUYWJsZUNvbHVtbi5jb2x1bW5OYW1lLFxuICAgICAgICAgICAgY29uc3RyYWludHMsXG4gICAgICAgICAgICBmaWVsZDogYmxvY2tUYWJsZUNvbHVtbi5maWVsZCxcbiAgICAgICAgICAgIHBhdGhTZWdtZW50czogcGF0aFNlZ21lbnRzLnNsaWNlKDEpLFxuICAgICAgICAgICAgcmF3Q29sdW1uOiBibG9ja1RhYmxlQ29sdW1uLnJhd0NvbHVtbixcbiAgICAgICAgICAgIHRhYmxlOiBibG9ja1RhYmxlQ29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2ZpZWxkLnJlbGF0aW9uVG99SURgLFxuICAgICAgICAgICAgICBjb25zdHJhaW50cyxcbiAgICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICAgIHRhYmxlOiBhbGlhc1JlbGF0aW9uc2hpcFRhYmxlLFxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmIChuZXdDb2xsZWN0aW9uUGF0aCA9PT0gJ3ZhbHVlJykge1xuICAgICAgICAgIGNvbnN0IHRhYmxlQ29sdW1uc05hbWVzID0gZmllbGQucmVsYXRpb25Uby5tYXAoXG4gICAgICAgICAgICAocmVsYXRpb25UbykgPT4gYFwiJHthbGlhc1JlbGF0aW9uc2hpcFRhYmxlTmFtZX1cIi5cIiR7dG9TbmFrZUNhc2UocmVsYXRpb25Ubyl9X2lkXCJgLFxuICAgICAgICAgIClcbiAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgY29uc3RyYWludHMsXG4gICAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICAgIHJhd0NvbHVtbjogc3FsLnJhdyhgQ09BTEVTQ0UoJHt0YWJsZUNvbHVtbnNOYW1lcy5qb2luKCcsICcpfSlgKSxcbiAgICAgICAgICAgIHRhYmxlOiBhbGlhc1JlbGF0aW9uc2hpcFRhYmxlLFxuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmIChuZXdDb2xsZWN0aW9uUGF0aCA9PT0gJ3JlbGF0aW9uVG8nKSB7XG4gICAgICAgICAgY29uc3QgcmVsYXRpb25UbyA9IEFycmF5LmlzQXJyYXkoZmllbGQucmVsYXRpb25UbykgPyBmaWVsZC5yZWxhdGlvblRvIDogW2ZpZWxkLnJlbGF0aW9uVG9dXG5cbiAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgY29uc3RyYWludHMsXG4gICAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICAgIGdldE5vdE51bGxDb2x1bW5CeVZhbHVlOiAodmFsKSA9PiB7XG4gICAgICAgICAgICAgIGNvbnN0IG1hdGNoZWRSZWxhdGlvbiA9IHJlbGF0aW9uVG8uZmluZCgocmVsYXRpb24pID0+IHJlbGF0aW9uID09PSB2YWwpXG4gICAgICAgICAgICAgIGlmIChtYXRjaGVkUmVsYXRpb24pIHJldHVybiBgJHttYXRjaGVkUmVsYXRpb259SURgXG4gICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWRcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB0YWJsZTogYWxpYXNSZWxhdGlvbnNoaXBUYWJsZSxcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdGhyb3cgbmV3IEFQSUVycm9yKCdOb3Qgc3VwcG9ydGVkJylcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBnZXRUYWJsZUNvbHVtbkZyb21QYXRoKHtcbiAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgIGFsaWFzVGFibGU6IG5ld0FsaWFzVGFibGUsXG4gICAgICAgICAgY29sbGVjdGlvblBhdGg6IG5ld0NvbGxlY3Rpb25QYXRoLFxuICAgICAgICAgIGNvbnN0cmFpbnRzLFxuICAgICAgICAgIGZpZWxkczogcmVsYXRpb25zaGlwRmllbGRzLFxuICAgICAgICAgIGpvaW5BbGlhc2VzLFxuICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICBwYXRoU2VnbWVudHM6IHBhdGhTZWdtZW50cy5zbGljZSgxKSxcbiAgICAgICAgICByb290VGFibGVOYW1lOiBuZXdUYWJsZU5hbWUsXG4gICAgICAgICAgc2VsZWN0RmllbGRzLFxuICAgICAgICAgIHRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICB9KVxuICAgICAgfVxuXG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIGlmIChmaWVsZEFmZmVjdHNEYXRhKGZpZWxkKSkge1xuICAgICAgICAgIGlmIChmaWVsZC5sb2N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mIG5leHQgc2VnbWVudCBpcyBhIGxvY2FsZSxcbiAgICAvLyB3ZSBuZWVkIHRvIHRha2UgaXQgb3V0IGFuZCB1c2UgaXQgYXMgdGhlIGxvY2FsZSBmcm9tIHRoaXMgcG9pbnQgb25cbiAgICBpZiAoJ2xvY2FsaXplZCcgaW4gZmllbGQgJiYgZmllbGQubG9jYWxpemVkICYmIGFkYXB0ZXIucGF5bG9hZC5jb25maWcubG9jYWxpemF0aW9uKSB7XG4gICAgICBjb25zdCBtYXRjaGVkTG9jYWxlID0gYWRhcHRlci5wYXlsb2FkLmNvbmZpZy5sb2NhbGl6YXRpb24ubG9jYWxlQ29kZXMuZmluZChcbiAgICAgICAgKGxvY2FsZSkgPT4gbG9jYWxlID09PSBwYXRoU2VnbWVudHNbMV0sXG4gICAgICApXG5cbiAgICAgIGlmIChtYXRjaGVkTG9jYWxlKSB7XG4gICAgICAgIGxvY2FsZSA9IG1hdGNoZWRMb2NhbGVcbiAgICAgICAgcGF0aFNlZ21lbnRzLnNwbGljZSgxLCAxKVxuICAgICAgfVxuICAgIH1cblxuICAgIHN3aXRjaCAoZmllbGQudHlwZSkge1xuICAgICAgY2FzZSAndGFicyc6IHtcbiAgICAgICAgcmV0dXJuIGdldFRhYmxlQ29sdW1uRnJvbVBhdGgoe1xuICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgYWxpYXNUYWJsZSxcbiAgICAgICAgICBjb2xsZWN0aW9uUGF0aCxcbiAgICAgICAgICBjb2x1bW5QcmVmaXgsXG4gICAgICAgICAgY29uc3RyYWludFBhdGgsXG4gICAgICAgICAgY29uc3RyYWludHMsXG4gICAgICAgICAgZmllbGRzOiBmaWVsZC50YWJzLm1hcCgodGFiKSA9PiAoe1xuICAgICAgICAgICAgLi4udGFiLFxuICAgICAgICAgICAgdHlwZTogJ3RhYicsXG4gICAgICAgICAgfSkpLFxuICAgICAgICAgIGpvaW5BbGlhc2VzLFxuICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICBwYXRoU2VnbWVudHM6IHBhdGhTZWdtZW50cy5zbGljZSgxKSxcbiAgICAgICAgICByb290VGFibGVOYW1lLFxuICAgICAgICAgIHNlbGVjdEZpZWxkcyxcbiAgICAgICAgICB0YWJsZU5hbWU6IG5ld1RhYmxlTmFtZSxcbiAgICAgICAgICB0YWJsZU5hbWVTdWZmaXgsXG4gICAgICAgICAgdmFsdWUsXG4gICAgICAgIH0pXG4gICAgICB9XG4gICAgICBjYXNlICd0YWInOiB7XG4gICAgICAgIGlmICh0YWJIYXNOYW1lKGZpZWxkKSkge1xuICAgICAgICAgIHJldHVybiBnZXRUYWJsZUNvbHVtbkZyb21QYXRoKHtcbiAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICBhbGlhc1RhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvblBhdGgsXG4gICAgICAgICAgICBjb2x1bW5QcmVmaXg6IGAke2NvbHVtblByZWZpeH0ke2ZpZWxkLm5hbWV9X2AsXG4gICAgICAgICAgICBjb25zdHJhaW50UGF0aDogYCR7Y29uc3RyYWludFBhdGh9JHtmaWVsZC5uYW1lfS5gLFxuICAgICAgICAgICAgY29uc3RyYWludHMsXG4gICAgICAgICAgICBmaWVsZHM6IGZpZWxkLmZpZWxkcyxcbiAgICAgICAgICAgIGpvaW5BbGlhc2VzLFxuICAgICAgICAgICAgam9pbnMsXG4gICAgICAgICAgICBsb2NhbGUsXG4gICAgICAgICAgICBwYXRoU2VnbWVudHM6IHBhdGhTZWdtZW50cy5zbGljZSgxKSxcbiAgICAgICAgICAgIHJvb3RUYWJsZU5hbWUsXG4gICAgICAgICAgICBzZWxlY3RGaWVsZHMsXG4gICAgICAgICAgICB0YWJsZU5hbWU6IG5ld1RhYmxlTmFtZSxcbiAgICAgICAgICAgIHRhYmxlTmFtZVN1ZmZpeDogYCR7dGFibGVOYW1lU3VmZml4fSR7dG9TbmFrZUNhc2UoZmllbGQubmFtZSl9X2AsXG4gICAgICAgICAgICB2YWx1ZSxcbiAgICAgICAgICB9KVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBnZXRUYWJsZUNvbHVtbkZyb21QYXRoKHtcbiAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgIGFsaWFzVGFibGUsXG4gICAgICAgICAgY29sbGVjdGlvblBhdGgsXG4gICAgICAgICAgY29sdW1uUHJlZml4LFxuICAgICAgICAgIGNvbnN0cmFpbnRQYXRoLFxuICAgICAgICAgIGNvbnN0cmFpbnRzLFxuICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgIGpvaW5BbGlhc2VzLFxuICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICBwYXRoU2VnbWVudHM6IHBhdGhTZWdtZW50cy5zbGljZSgxKSxcbiAgICAgICAgICByb290VGFibGVOYW1lLFxuICAgICAgICAgIHNlbGVjdEZpZWxkcyxcbiAgICAgICAgICB0YWJsZU5hbWU6IG5ld1RhYmxlTmFtZSxcbiAgICAgICAgICB0YWJsZU5hbWVTdWZmaXgsXG4gICAgICAgICAgdmFsdWUsXG4gICAgICAgIH0pXG4gICAgICB9XG5cbiAgICAgIGNhc2UgJ2dyb3VwJzoge1xuICAgICAgICBpZiAobG9jYWxlICYmIGZpZWxkLmxvY2FsaXplZCAmJiBhZGFwdGVyLnBheWxvYWQuY29uZmlnLmxvY2FsaXphdGlvbikge1xuICAgICAgICAgIG5ld1RhYmxlTmFtZSA9IGAke3RhYmxlTmFtZX1fbG9jYWxlc2BcblxuICAgICAgICAgIGpvaW5zW3RhYmxlTmFtZV0gPSBlcShcbiAgICAgICAgICAgIGFkYXB0ZXIudGFibGVzW3RhYmxlTmFtZV0uaWQsXG4gICAgICAgICAgICBhZGFwdGVyLnRhYmxlc1tuZXdUYWJsZU5hbWVdLl9wYXJlbnRJRCxcbiAgICAgICAgICApXG4gICAgICAgICAgaWYgKGxvY2FsZSAhPT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TmFtZSA9IGAke3RhYmxlTmFtZX1fJHt0YWJsZU5hbWVTdWZmaXh9JHt0b1NuYWtlQ2FzZShmaWVsZC5uYW1lKX1gXG4gICAgICAgIGNvbnN0cmFpbnRQYXRoID0gYCR7Y29uc3RyYWludFBhdGh9JHtmaWVsZC5uYW1lfS4lLmBcbiAgICAgICAgaWYgKGxvY2FsZSAmJiBmaWVsZC5sb2NhbGl6ZWQgJiYgYWRhcHRlci5wYXlsb2FkLmNvbmZpZy5sb2NhbGl6YXRpb24pIHtcbiAgICAgICAgICBqb2luc1tuZXdUYWJsZU5hbWVdID0gYW5kKFxuICAgICAgICAgICAgZXEoYWRhcHRlci50YWJsZXNbdGFibGVOYW1lXS5pZCwgYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXS5fcGFyZW50SUQpLFxuICAgICAgICAgICAgZXEoYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXS5fbG9jYWxlLCBsb2NhbGUpLFxuICAgICAgICAgIClcbiAgICAgICAgICBpZiAobG9jYWxlICE9PSAnYWxsJykge1xuICAgICAgICAgICAgY29uc3RyYWludHMucHVzaCh7XG4gICAgICAgICAgICAgIGNvbHVtbk5hbWU6ICdfbG9jYWxlJyxcbiAgICAgICAgICAgICAgdGFibGU6IGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0sXG4gICAgICAgICAgICAgIHZhbHVlOiBsb2NhbGUsXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBqb2luc1tuZXdUYWJsZU5hbWVdID0gZXEoXG4gICAgICAgICAgICBhZGFwdGVyLnRhYmxlc1t0YWJsZU5hbWVdLmlkLFxuICAgICAgICAgICAgYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXS5fcGFyZW50SUQsXG4gICAgICAgICAgKVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBnZXRUYWJsZUNvbHVtbkZyb21QYXRoKHtcbiA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fV9ibG9ja3NfJHt0b1NuYWtlQ2FzZShibG9jay5zbHVnKX1gXG4gICAgICAgICAgICBqb2luc1tuZXdUYWJsZU5hbWVdID0gZXEoXG4gICAgICAgICAgICAgIGFkYXB0ZXIudGFibGVzW3RhYmxlTmFtZV0uaWQsXG4gICAgICAgICAgICAgIGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0uX3BhcmVudElELFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgY29uc3RyYWludHMucHVzaCh7XG4gICAgICAgICAgICAgIGNvbHVtbk5hbWU6ICdfcGF0aCcsXG4gICAgICAgICAgICAgIHRhYmxlOiBhZGFwdGVyLnRhYmxlc1tuZXdUYWJsZU5hbWVdLFxuICAgICAgICAgICAgICB2YWx1ZTogcGF0aFNlZ21lbnRzWzBdLFxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9KVxuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBjb25zdHJhaW50cyxcbiAgICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgICAgZ2V0Tm90TnVsbENvbHVtbkJ5VmFsdWU6ICgpID0+ICdpZCcsXG4gICAgICAgICAgICB0YWJsZTogYWRhcHRlci50YWJsZXNbdGFibGVOYW1lXSxcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBoYXNCbG9ja0ZpZWxkID0gZmllbGQuYmxvY2tzLnNvbWUoKGJsb2NrKSA9PiB7XG4gICAgICAgICAgbmV3VGFibGVOYW1lID0gYCR7dGFibGVOYW1lfV9ibG9ja3NfJHt0b1NuYWtlQ2FzZShibG9jay5zbHVnKX1gXG4gICAgICAgICAgY29uc3RyYWludFBhdGggPSBgJHtjb25zdHJhaW50UGF0aH0ke2ZpZWxkLm5hbWV9LiUuYFxuICAgICAgICAgIGxldCByZXN1bHRcbiAgICAgICAgICBjb25zdCBibG9ja0NvbnN0cmFpbnRzID0gW11cbiAgICAgICAgICBjb25zdCBibG9ja1NlbGVjdEZpZWxkcyA9IHt9XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHJlc3VsdCA9IGdldFRhYmxlQ29sdW1uRnJvbVBhdGgoe1xuICAgICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgICBjb2xsZWN0aW9uUGF0aCxcbiAgICAgICAgICAgICAgY29uc3RyYWludFBhdGgsXG4gICAgICAgICAgICAgIGNvbnN0cmFpbnRzOiBibG9ja0NvbnN0cmFpbnRzLFxuICAgICAgICAgICAgICBmaWVsZHM6IGJsb2NrLmZpZWxkcyxcbiAgICAgICAgICAgICAgam9pbkFsaWFzZXMsXG4gICAgICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgICAgICBsb2NhbGUsXG4gICAgICAgICAgICAgIHBhdGhTZWdtZW50czogcGF0aFNlZ21lbnRzLnNsaWNlKDEpLFxuICAgICAgICAgICAgICByb290VGFibGVOYW1lLFxuICAgICAgICAgICAgICBzZWxlY3RGaWVsZHM6IGJsb2NrU2VsZWN0RmllbGRzLFxuICAgICAgICAgICAgICB0YWJsZU5hbWU6IG5ld1RhYmxlTmFtZSxcbiAgICAgICAgICAgICAgdmFsdWUsXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICAvLyB0aGlzIGlzIGZpbmUsIG5vdCBldmVyeSBibG9jayB3aWxsIGhhdmUgdGhlIGZpZWxkXG4gICAgICAgICAgfVxuICAgICAgICAgIGlmICghcmVzdWx0KSB7XG4gICAgICAgICAgICByZXR1cm5cbiAgICAgICAgICB9XG4gICAgICAgICAgYmxvY2tUYWJsZUNvbHVtbiA9IHJlc3VsdFxuICAgICAgICAgIGNvbnN0cmFpbnRzID0gY29uc3RyYWludHMuY29uY2F0KGJsb2NrQ29uc3RyYWludHMpXG4gICAgICAgICAgc2VsZWN0RmllbGRzID0geyAuLi5zZWxlY3RGaWVsZHMsIC4uLmJsb2NrU2VsZWN0RmllbGRzIH1cbiAgICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkICYmIGFkYXB0ZXIucGF5bG9hZC5jb25maWcubG9jYWxpemF0aW9uKSB7XG4gICAgICAgICAgICBqb2luc1tuZXdUYWJsZU5hbWVdID0gYW5kKFxuICAgICAgICAgICAgICBlcShhZGFwdGVyLnRhYmxlc1t0YWJsZU5hbWVdLmlkLCBhZGFwdGVyLnRhYmxlc1tuZXdUYWJsZU5hbWVdLl9wYXJlbnRJRCksXG4gICAgICAgICAgICAgIGVxKGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0uX2xvY2FsZSwgbG9jYWxlKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGlmIChsb2NhbGUpIHtcbiAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaCh7XG4gICAgICAgICAgICAgICAgY29sdW1uTmFtZTogJ19sb2NhbGUnLFxuICAgICAgICAgICAgICAgIHRhYmxlOiBhZGFwdGVyLnRhYmxlc1tuZXdUYWJsZU5hbWVdLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBsb2NhbGUsXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGpvaW5zW25ld1RhYmxlTmFtZV0gPSBlcShcbiAgICAgICAgICAgICAgYWRhcHRlci50YWJsZXNbdGFibGVOYW1lXS5pZCxcbiAgICAgICAgICAgICAgYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXS5fcGFyZW50SUQsXG4gICAgICAgICAgICApXG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiB0cnVlXG4gICAgICAgIH0pXG4gICAgICAgIGlmIChoYXNCbG9ja0ZpZWxkKSB7XG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGNvbHVtbk5hbWU6IGJsb2NrVGFibGVDb2x1bW4uY29sdW1uTmFtZSxcbiAgICAgICAgICAgIGNvbnN0cmFpbnRzLFxuICAgICAgICAgICAgZm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W9uUGF0aCA9PT0gJ2lkJykge1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgY29sdW1uTmFtZTogYCR7ZmllbGQucmVsYXRpb25Ub31JRGAsXG4gICAgICAgICAgICAgIGNvbnN0cmFpbnRzLFxuICAgICAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICAgICAgdGFibGU6IGFsaWFzUmVsYXRpb25zaGlwVGFibGUsXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKG5ld0NvbGxlY3Rpb25QYXRoID09PSAndmFsdWUnKSB7XG4gICAgICAgICAgY29uc3QgdGFibGVDb2x1bW5zTmFtZXMgPSBmaWVsZC5yZWxhdGlvblRvLm1hcChcbiAgICAgICAgICAgIChyZWxhdGlvblRvKSA9PiBgXCIke2FsaWFzUmVsYXRpb25zaGlwVGFibGVOYW1lfVwiLlwiJHt0b1NuYWtlQ2FzZShyZWxhdGlvblRvKX1faWRcImAsXG4gICAgICAgICAgKVxuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBjb25zdHJhaW50cyxcbiAgICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgICAgcmF3Q29sdW1uOiBzcWwucmF3KGBDT0FMRVNDRSgke3RhYmxlQ29sdW1uc05hbWVzLmpvaW4oJywgJyl9KWApLFxuICAgICAgICAgICAgdGFibGU6IGFsaWFzUmVsYXRpb25zaGlwVGFibGUsXG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKG5ld0NvbGxlY3Rpb25QYXRoID09PSAncmVsYXRpb25UbycpIHtcbiAgICAgICAgICBjb25zdCByZWxhdGlvblRvID0gQXJyYXkuaXNBcnJheShmaWVsZC5yZWxhdGlvblRvKSA/IGZpZWxkLnJlbGF0aW9uVG8gOiBbZmllbGQucmVsYXRpb25Ub11cblxuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBjb25zdHJhaW50cyxcbiAgICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgICAgZ2V0Tm90TnVsbENvbHVtbkJ5VmFsdWU6ICh2YWwpID0+IHtcbiAgICAgICAgICAgICAgY29uc3QgbWF0Y2hlZFJlbGF0aW9uID0gcmVsYXRpb25Uby5maW5kKChyZWxhdGlvbikgPT4gcmVsYXRpb24gPT09IHZhbClcbiAgICAgICAgICAgICAgaWYgKG1hdGNoZWRSZWxhdGlvbikgcmV0dXJuIGAke21hdGNoZWRSZWxhdGlvbn1JRGBcbiAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHRhYmxlOiBhbGlhc1JlbGF0aW9uc2hpcFRhYmxlLFxuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB0aHJvdyBuZXcgQVBJRXJyb3IoJ05vdCBzdXBwb3J0ZWQnKVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGdldFRhYmxlQ29sdW1uRnJvbVBhdGgoe1xuICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgYWxpYXNUYWJsZTogbmV3QWxpYXNUYWJsZSxcbiAgICAgICAgICBjb2xsZWN0aW9uUGF0aDogbmV3Q29sbGVjdGlvblBhdGgsXG4gICAgICAgICAgY29uc3RyYWludHMsXG4gICAgICAgICAgZmllbGRzOiByZWxhdGlvbnNoaXBGaWVsZHMsXG4gICAgICAgICAgam9pbkFsaWFzZXMsXG4gICAgICAgICAgam9pbnMsXG4gICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgIHBhdGhTZWdtZW50czogcGF0aFNlZ21lbnRzLnNsaWNlKDEpLFxuICAgICAgICAgIHJvb3RUYWJsZU5hbWU6IG5ld1RhYmxlTmFtZSxcbiAgICAgICAgICBzZWxlY3RGaWVsZHMsXG4gICAgICAgICAgdGFibGVOYW1lOiBuZXdUYWJsZU5hbWUsXG4gICAgICAgICAgdmFsdWUsXG4gICAgICAgIH0pXG4gICAgICB9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Aa,CAAC,CAAA;IAC3C,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,KAAK,CAAA;CACb,CAAA;AAED,wBAAsB,WAAW,CAAC,EAChC,OAAO,EACP,MAAM,EACN,WAAW,EACX,KAAK,EACL,MAAM,EACN,YAAY,EACZ,SAAS,EACT,KAAK,GACN,EAAE,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,CA2MrB"}
1
+ {"version":3,"file":"parseParams.d.ts","sourceRoot":"","sources":["../../src/queries/parseParams.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,KAAK,EAAE,KAAK,EAAY,KAAK,EAAE,MAAM,eAAe,CAAA;AAM3D,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAS1E,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,WAAW,EAAE,qBAAqB,CAAA;IAClC,KAAK,EAAE,eAAe,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IAC3C,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,KAAK,CAAA;CACb,CAAA;AAED,wBAAsB,WAAW,CAAC,EAChC,OAAO,EACP,MAAM,EACN,WAAW,EACX,KAAK,EACL,MAAM,EACN,YAAY,EACZ,SAAS,EACT,KAAK,GACN,EAAE,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,CAwMrB"}
@@ -43,11 +43,7 @@ async function parseParams({ adapter, fields, joinAliases, joins, locale, select
43
43
  where: condition
44
44
  });
45
45
  if (builtConditions.length > 0) {
46
- if (result) {
47
- result = _operatorMap.operatorMap[conditionOperator](result, ...builtConditions);
48
- } else {
49
- result = _operatorMap.operatorMap[conditionOperator](...builtConditions);
50
- }
46
+ result = _operatorMap.operatorMap[conditionOperator](...builtConditions);
51
47
  }
52
48
  } else {
53
49
  // It's a path - and there can be multiple comparisons on a single path.
@@ -57,6 +53,7 @@ async function parseParams({ adapter, fields, joinAliases, joins, locale, select
57
53
  if (typeof pathOperators === 'object') {
58
54
  for (const operator of Object.keys(pathOperators)){
59
55
  if (_types.validOperators.includes(operator)) {
56
+ const val = where[relationOrPath][operator];
60
57
  const { columnName, constraints: queryConstraints, field, getNotNullColumnByValue, pathSegments, rawColumn, table } = (0, _getTableColumnFromPath.getTableColumnFromPath)({
61
58
  adapter,
62
59
  collectionPath: relationOrPath,
@@ -66,9 +63,9 @@ async function parseParams({ adapter, fields, joinAliases, joins, locale, select
66
63
  locale,
67
64
  pathSegments: relationOrPath.replace(/__/g, '.').split('.'),
68
65
  selectFields,
69
- tableName
66
+ tableName,
67
+ value: val
70
68
  });
71
- const val = where[relationOrPath][operator];
72
69
  queryConstraints.forEach(({ columnName: col, table: constraintTable, value })=>{
73
70
  if (typeof value === 'string' && value.indexOf('%') > -1) {
74
71
  constraints.push(_operatorMap.operatorMap.like(constraintTable[col], value));
@@ -142,6 +139,7 @@ async function parseParams({ adapter, fields, joinAliases, joins, locale, select
142
139
  break;
143
140
  }
144
141
  const sanitizedQueryValue = (0, _sanitizeQueryValue.sanitizeQueryValue)({
142
+ adapter,
145
143
  field,
146
144
  operator,
147
145
  relationOrPath,
@@ -191,4 +189,4 @@ async function parseParams({ adapter, fields, joinAliases, joins, locale, select
191
189
  return result;
192
190
  }
193
191
 
194
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9xdWVyaWVzL3BhcnNlUGFyYW1zLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qIGVzbGludC1kaXNhYmxlIG5vLWF3YWl0LWluLWxvb3AgKi9cbmltcG9ydCB0eXBlI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C50b0xvd2VyQ2FzZSgpID09PSAnYW5kJykge1xuICAgICAgICAgIGNvbmRpdGlvbk9wZXJhdG9yID0gJ2FuZCdcbiAgICAgICAgfSBlbHNlIGlmIChyZWxhdGlvbk9yUGF0aC50b0xvd2VyQ2FzZSgpID09PSAnb3InKSB7XG4gICAgICAgICAgY29uZGl0aW9uT3BlcmF0b3IgPSAnb3InXG4gICAgICAgIH1cbiAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoY29uZGl0aW9uKSkge1xuICAgICAgICAgIGNvbnN0IGJ1aWx0Q29uZGl0aW9ucyA9IGF3YWl0IGJ1aWxkQW5kT3JDb25kaXRpb25zKHtcbiAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICBmaWVsZHMsXG4gICAgICAgICAgICBqb2luQWxpYXNlcyxcbiAgICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgICAgc2VsZWN0RmllbGRzLFxuICAgICAgICAgICAgdGFibGVOYW1lLFxuICAgICAgICAgICAgd2hlcmU6IGNvbmRpdGlvbixcbiAgICAgICAgICB9KVxuICAgICAgICAgIGlmIChidWlsdENvbmRpdGlvbnMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgaWYgKHJlc3VsdCkge1xuICAgICAgICAgICAgICByZXN1bHQgPSBvcGVyYXRvck1hcFtjb25kaXRpb25PcGVyYXRvcl0ocmVzdWx0LCAuLi5idWlsdENvbmRpdGlvbnMpXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZXN1bHQgPSBvcGVyYXRvck1hcFtjb25kaXRpb25PcGVyYXRvcl0oLi4uYnVpbHRDb25kaXRpb25zKVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAvLyBJdCdzIGEgcGF0aCAtIGFuZCB0aGVyZSBjYW4gYmUgbXVsdGlwbGUgY29tcGFyaXNvbnMgb24gYSBzaW5nbGUgcGF0aC5cbiAgICAgICAgICAvLyBGb3IgZXhhbXBsZSAtIHRpdGxlIGxpa2UgJ3Rlc3QnIGFuZCB0aXRsZSBub3QgZXF1YWwgdG8gJ3Rlc3RlcidcbiAgICAgICAgICAvLyBTbyB3ZSBuZWVkIHRvIGxvb3Agb24ga2V5cyBhZ2FpbiBoZXJlIHRvIGhhbmRsZSBlYWNoIG9wZXJhdG9yIGluZGVwZW5kZW50bHlcbiAgICAgICAgICBjb25zdCBwYXRoT3BlcmF0b3JzID0gd2hlcmVbcmVsYXRpb25PclBhdGhdXG4gICAgICAgICAgaWYgKHR5cGVvZiBwYXRoT3BlcmF0b3JzID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgZm9yIChjb25zdCBvcGVyYXRvciBvZiBPYmplY3Qua2V5cyhwYXRoT3BlcmF0b3JzKSkge1xuICAgICAgICAgICAgICBpZiAodmFsaWRPcGVyYXRvcnMuaW5jbHVkZXMob3BlcmF0b3IgYXMgT3BlcmF0b3IpKSB7XG4gICAgICAgICAgICAgICAgY29uc3Qge1xuICAgICAgICAgICAgICAgICAgY29sdW1uTmFtZSxcbiAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzOiBxdWVyeUNvbnN0cmFpbnRzLFxuICAgICAgICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICAgICAgICBnZXROb3ROdWxsQ29sdW1uQnlWYWx1ZSxcbiAgICAgICAgICAgICAgICAgIHBhdGhTZWdtZW50cyxcbiAgICAgICAgICAgICAgICAgIHJhd0NvbHVtbixcbiAgICAgICAgICAgICAgICAgIHRhYmxlLFxuICAgICAgICAgICAgICAgIH0gPSBnZXRUYWJsZUNvbHVtbkZyb21QYXRoKHtcbiAgICAgICAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICAgICAgICBjb2xsZWN0aW9uUGF0aDogcmVsYXRpb25PclBhdGgsXG4gICAgICAgICAgICAgICAgICBmaWVsZHMsXG4gICAgICAgICAgICAgICAgICBqb2luQWxpYXNlcyxcbiAgICAgICAgICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgICAgICAgICAgcGF0aFNlZ21lbnRzOiByZWxhdGlvbk9yUGF0aC5yZXBsYWNlKC9fXy9nLCAnLicpLnNwbGl0KCcuJyksXG4gICAgICAgICAgICAgICAgICBzZWxlY3RGaWVsZHMsXG4gICAgICAgICAgICAgICAgICB0YWJsZU5hbWUsXG4gICAgICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgICAgIGNvbnN0IHZhbCA9IHdoZXJlW3JlbGF0aW9uT3JQYXRoXVtvcGVyYXRvcl1cblxuICAgICAgICAgICAgICAgIHF1ZXJ5Q29uc3RyYWludHMuZm9yRWFjaCgoeyBjb2x1bW5OYW1lOiBjb2wsIHRhYmxlOiBjb25zdHJhaW50VGFibGUsIHZhbHVlIH0pID0+IHtcbiAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdmFsdWUgPT09ICdzdHJpbmcnICYmIHZhbHVlLmluZGV4T2YoJyUnKSA+IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2gob3BlcmF0b3JNYXAubGlrZShjb25zdHJhaW50VGFibGVbY29sXSwgdmFsdWUpKVxuICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChvcGVyYXRvck1hcC5lcXVhbHMoY29uc3RyYWludFRhYmxlW2NvbF0sIHZhbHVlKSlcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgWydqc29uJywgJ3JpY2hUZXh0J10uaW5jbHVkZXMoZmllbGQudHlwZSkgJiZcbiAgICAgICAgICAgICAgICAgIEFycmF5LmlzQXJyYXkocGF0aFNlZ21lbnRzKSAmJlxuICAgICAgICAgICAgICAgICAgcGF0aFNlZ21lbnRzLmxlbmd0aCA+IDFcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IHNlZ21lbnRzID0gcGF0aFNlZ21lbnRzLnNsaWNlKDEpXG4gICAgICAgICAgICAgICAgICBzZWdtZW50cy51bnNoaWZ0KHRhYmxlW2NvbHVtbk5hbWVdLm5hbWUpXG5cbiAgICAgICAgICAgICAgICAgIGlmIChmaWVsZC50eXBlID09PSAncmljaFRleHQnKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGpzb25RdWVyeSA9IGNyZWF0ZUpTT05RdWVyeSh7XG4gICAgICAgICAgICAgICAgICAgICAgb3BlcmF0b3IsXG4gICAgICAgICAgICAgICAgICAgICAgcGF0aFNlZ21lbnRzOiBzZWdtZW50cyxcbiAgICAgICAgICAgICAgICAgICAgICB0cmVhdEFzQXJyYXk6IFsnY2hpbGRyZW4nXSxcbiAgICAgICAgICAgICAgICAgICAgICB0cmVhdFJvb3RBc0FycmF5OiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiB2YWwsXG4gICAgICAgICAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChzcWwucmF3KGpzb25RdWVyeSkpXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgIGNvbnN0IGpzb25RdWVyeSA9IGNvbnZlcnRQYXRoVG9KU09OVHJhdmVyc2FsKHBhdGhTZWdtZW50cylcbiAgICAgICAgICAgICAgICAgIGNvbnN0IG9wZXJhdG9yS2V5cyA9IHtcbiAgICAgICAgICAgICAgICAgICAgY29udGFpbnM6IHsgb3BlcmF0b3I6ICdpbGlrZScsIHdpbGRjYXJkOiAnJScgfSxcbiAgICAgICAgICAgICAgICAgICAgZXF1YWxzOiB7IG9wZXJhdG9yOiAnPScsIHdpbGRjYXJkOiAnJyB9LFxuICAgICAgICAgICAgICAgICAgICBleGlzdHM6IHsgb3BlcmF0b3I6IHZhbCA9PT0gdHJ1ZSA/ICdpcyBub3QgbnVsbCcgOiAnaXMgbnVsbCcgfSxcbiAgICAgICAgICAgICAgICAgICAgbGlrZTogeyBvcGVyYXRvcjogJ2xpa2UnLCB3aWxkY2FyZDogJyUnIH0sXG4gICAgICAgICAgICAgICAgICAgIG5vdF9lcXVhbHM6IHsgb3BlcmF0b3I6ICc8PicsIHdpbGRjYXJkOiAnJyB9LFxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgbGV0IGZvcm1hdHRlZFZhbHVlID0gYCcke29wZXJhdG9yS2V5c1tvcGVyYXRvcl0ud2lsZGNhcmR9JHt2YWx9JHtvcGVyYXRvcktleXNbb3BlcmF0b3JdLndpbGRjYXJkfSdgXG5cbiAgICAgICAgICAgICAgICAgIGlmIChvcGVyYXRvciA9PT0gJ2V4aXN0cycpIHtcbiAgICAgICAgICAgICAgICAgICAgZm9ybWF0dGVkVmFsdWUgPSAnJ1xuICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKFxuICAgICAgICAgICAgICAgICAgICBzcWwucmF3KFxuICAgICAgICAgICAgICAgICAgICAgIGAke3RhYmxlW2NvbHVtbk5hbWVdLm5hbWV9JHtqc29uUXVlcnl9ICR7b3BlcmF0b3JLZXlzW29wZXJhdG9yXS5vcGVyYXRvcn0gJHtmb3JtYXR0ZWRWYWx1ZX1gLFxuICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChnZXROb3ROdWxsQ29sdW1uQnlWYWx1ZSkge1xuICAgICAgICAgICAgICAgICAgY29uc3QgY29sdW1uTmFtZSA9IGdldE5vdE51bGxDb2x1bW5CeVZhbHVlKHZhbClcbiAgICAgICAgICAgICAgICAgIGlmIChjb2x1bW5OYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2goaXNOb3ROdWxsKHRhYmxlW2NvbHVtbk5hbWVdKSlcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBRdWVyeUVycm9yKFt7IHBhdGg6IHJlbGF0aW9uT3JQYXRoIH1dKVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAob3BlcmF0b3IgPT09ICdsaWtlJykge1xuICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChcbiAgICAgICAgICAgICAgICAgICAgYW5kKC4uLnZhbC5zcGxpdCgnICcpLm1hcCgod29yZCkgPT4gaWxpa2UodGFibGVbY29sdW1uTmFtZV0sIGAlJHt3b3JkfSVgKSkpLFxuICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBjb25zdCBzYW5pdGl6ZWRRdWVyeVZhbHVlID0gc2FuaXRpemVRdWVyeVZhbHVlKHtcbiAgICAgICAgICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgICAgICAgICAgb3BlcmF0b3IsXG4gICAgICAgICAgICAgICAgICByZWxhdGlvbk9yUGF0aCxcbiAgICAgICAgICAgICAgICAgIHZhbCxcbiAgICAgICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICAgICAgaWYgKHNhbml0aXplZFF1ZXJ5VmFsdWUgPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgY29uc3QgeyBvcGVyYXRvcjogcXVlcnlPcGVyYXRvciwgdmFsdWU6IHF1ZXJ5VmFsdWUgfSA9IHNhbml0aXplZFF1ZXJ5VmFsdWVcblxuICAgICAgICAgICAgICAgIGlmIChxdWVyeU9wZXJhdG9yID09PSAnbm90X2VxdWFscycgJiYgcXVlcnlWYWx1ZSAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChcbiAgICAgICAgICAgICAgICAgICAgb3IoXG4gICAgICAgICAgICAgICAgICAgICAgaXNOdWxsKHJhd0NvbHVtbiB8fCB0YWJsZVtjb2x1bW5OYW1lXSksXG4gICAgICAgICAgICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgICAgICAgICAgIG5lPGFueT4ocmF3Q29sdW1uIHx8IHRhYmxlW2NvbHVtbk5hbWVdLCBxdWVyeVZhbHVlKSxcbiAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgKGZpZWxkLnR5cGUgPT09ICdyZWxhdGlvbnNoaXAnIHx8IGZpZWxkLnR5cGUgPT09ICd1cGxvYWQnKSAmJlxuICAgICAgICAgICAgICAgICAgQXJyYXkuaXNBcnJheShxdWVyeVZhbHVlKSAmJlxuICAgICAgICAgICAgICAgICAgb3BlcmF0b3IgPT09ICdub3RfaW4nXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKFxuICAgICAgICAgICAgICAgICAgICBzcWxgJHtub3RJbkFycmF5KHRhYmxlW2NvbHVtbk5hbWVdLCBxdWVyeVZhbHVlKX0gT1JcbiAgICAgICAgICAgICAgICAgICAgJHt0YWJsZVtjb2x1bW5OYW1lXX1cbiAgICAgICAgICAgICAgICAgICAgSVNcbiAgICAgICAgICAgICAgICAgICAgTlVMTGAsXG4gICAgICAgICAgICAgICAgICApXG5cbiAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKG9wZXJhdG9yID09PSAnZXF1YWxzJyAmJiBxdWVyeVZhbHVlID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKGlzTnVsbChyYXdDb2x1bW4gfHwgdGFibGVbY29sdW1uTmFtZV0pKVxuICAgICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAob3BlcmF0b3IgPT09ICdub3RfZXF1YWxzJyAmJiBxdWVyeVZhbHVlID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKGlzTm90TnVsbChyYXdDb2x1bW4gfHwgdGFibGVbY29sdW1uTmFtZV0pKVxuICAgICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKFxuICAgICAgICAgICAgICAgICAgb3BlcmF0b3JNYXBbcXVlcnlPcGVyYXRvcl0ocmF3Q29sdW1uIHx8IHRhYmxlW2NvbHVtbk5hbWVdLCBxdWVyeVZhbHVlKSxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH1cbiAgaWYgKGNvbnN0cmFpbnRzLmxlbmd0aCA+IDApIHtcbiAgICBpZiAocmVzdWx0KSB7XG4gICAgICByZXN1bHQgPSBhbmQocmVzdWx0LCAuLi5jb25zdHJhaW50cylcbiAgICB9IGVsc2Uge1xuICAgICAgcmVzdWx0ID0gYW5kKC4uLmNvbnN0cmFpbnRzKVxuICAgIH1cbiAgfVxuICBpZiAoY29u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WEgcGF0aFxuICAgIGZvciAoY29uc3QgcmVsYXRpb25PclBhdGggb2YgT2JqZWN0LmtleXMod2hlcmUpKSB7XG4gICAgICBpZiAocmVsYXRpb25PclBhdGgpIHtcbiAgICAgICAgY29uc3QgY29uZGl0aW9uID0gd2hlcmVbcmVsYXRpb25PclBhdGhdXG4gICAgICAgIGxldCBjb25kaXRpb25PcGVyYXRvcjogJ2FuZCcgfCAnb3InXG4gICAgICAgIGlmIChyZWxhdGlvbk9yUGF0aC50b0xvd2VyQ2FzZSgpID09PSAnYW5kJykge1xuICAgICAgICAgIGNvbmRpdGlvbk9wZXJhdG9yID0gJ2FuZCdcbiAgICAgICAgfSBlbHNlIGlmIChyZWxhdGlvbk9yUGF0aC50b0xvd2VyQ2FzZSgpID09PSAnb3InKSB7XG4gICAgICAgICAgY29uZGl0aW9uT3BlcmF0b3IgPSAnb3InXG4gICAgICAgIH1cbiAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoY29uZGl0aW9uKSkge1xuICAgICAgICAgIGNvbnN0IGJ1aWx0Q29uZGl0aW9ucyA9IGF3YWl0IGJ1aWxkQW5kT3JDb25kaXRpb25zKHtcbiAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICBmaWVsZHMsXG4gICAgICAgICAgICBqb2luQWxpYXNlcyxcbiAgICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgICAgc2VsZWN0RmllbGRzLFxuICAgICAgICAgICAgdGFibGVOYW1lLFxuICAgICAgICAgICAgd2hlcmU6IGNvbmRpdGlvbixcbiAgICAgICAgICB9KVxuICAgICAgICAgIGlmIChidWlsdENvbmRpdGlvbnMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgcmVzdWx0ID0gb3BlcmF0b3JNYXBbY29uZGl0aW9uT3BlcmF0b3JdKC4uLmJ1aWx0Q29uZGl0aW9ucylcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgLy8gSXQncyBhIHBhdGggLSBhbmQgdGhlcmUgY2FuIGJlIG11bHRpcGxlIGNvbXBhcmlzb25zIG9uIGEgc2luZ2xlIHBhdGguXG4gICAgICAgICAgLy8gRm9yIGV4YW1wbGUgLSB0aXRsZSBsaWtlICd0ZXN0JyBhbmQgdGl0bGUgbm90IGVxdWFsIHRvICd0ZXN0ZXInXG4gICAgICAgICAgLy8gU28gd2UgbmVlZCB0byBsb29wIG9uIGtleXMgYWdhaW4gaGVyZSB0byBoYW5kbGUgZWFjaCBvcGVyYXRvciBpbmRlcGVuZGVudGx5XG4gICAgICAgICAgY29uc3QgcGF0aE9wZXJhdG9ycyA9IHdoZXJlW3JlbGF0aW9uT3JQYXRoXVxuICAgICAgICAgIGlmICh0eXBlb2YgcGF0aE9wZXJhdG9ycyA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgIGZvciAoY29uc3Qgb3BlcmF0b3Igb2YgT2JqZWN0LmtleXMocGF0aE9wZXJhdG9ycykpIHtcbiAgICAgICAgICAgICAgaWYgKHZhbGlkT3BlcmF0b3JzLmluY2x1ZGVzKG9wZXJhdG9yIGFzIE9wZXJhdG9yKSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IHZhbCA9IHdoZXJlW3JlbGF0aW9uT3JQYXRoXVtvcGVyYXRvcl1cbiAgICAgICAgICAgICAgICBjb25zdCB7XG4gICAgICAgICAgICAgICAgICBjb2x1bW5OYW1lLFxuICAgICAgICAgICAgICAgICAgY29uc3RyYWludHM6IHF1ZXJ5Q29uc3RyYWludHMsXG4gICAgICAgICAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICAgICAgICAgIGdldE5vdE51bGxDb2x1bW5CeVZhbHVlLFxuICAgICAgICAgICAgICAgICAgcGF0aFNlZ21lbnRzLFxuICAgICAgICAgICAgICAgICAgcmF3Q29sdW1uLFxuICAgICAgICAgICAgICAgICAgdGFibGUsXG4gICAgICAgICAgICAgICAgfSA9IGdldFRhYmxlQ29sdW1uRnJvbVBhdGgoe1xuICAgICAgICAgICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICAgICAgICAgIGNvbGxlY3Rpb25QYXRoOiByZWxhdGlvbk9yUGF0aCxcbiAgICAgICAgICAgICAgICAgIGZpZWxkcyxcbiAgICAgICAgICAgICAgICAgIGpvaW5BbGlhc2VzLFxuICAgICAgICAgICAgICAgICAgam9pbnMsXG4gICAgICAgICAgICAgICAgICBsb2NhbGUsXG4gICAgICAgICAgICAgICAgICBwYXRoU2VnbWVudHM6IHJlbGF0aW9uT3JQYXRoLnJlcGxhY2UoL19fL2csICcuJykuc3BsaXQoJy4nKSxcbiAgICAgICAgICAgICAgICAgIHNlbGVjdEZpZWxkcyxcbiAgICAgICAgICAgICAgICAgIHRhYmxlTmFtZSxcbiAgICAgICAgICAgICAgICAgIHZhbHVlOiB2YWwsXG4gICAgICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgICAgIHF1ZXJ5Q29uc3RyYWludHMuZm9yRWFjaCgoeyBjb2x1bW5OYW1lOiBjb2wsIHRhYmxlOiBjb25zdHJhaW50VGFibGUsIHZhbHVlIH0pID0+IHtcbiAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdmFsdWUgPT09ICdzdHJpbmcnICYmIHZhbHVlLmluZGV4T2YoJyUnKSA+IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2gob3BlcmF0b3JNYXAubGlrZShjb25zdHJhaW50VGFibGVbY29sXSwgdmFsdWUpKVxuICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChvcGVyYXRvck1hcC5lcXVhbHMoY29uc3RyYWludFRhYmxlW2NvbF0sIHZhbHVlKSlcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgWydqc29uJywgJ3JpY2hUZXh0J10uaW5jbHVkZXMoZmllbGQudHlwZSkgJiZcbiAgICAgICAgICAgICAgICAgIEFycmF5LmlzQXJyYXkocGF0aFNlZ21lbnRzKSAmJlxuICAgICAgICAgICAgICAgICAgcGF0aFNlZ21lbnRzLmxlbmd0aCA+IDFcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IHNlZ21lbnRzID0gcGF0aFNlZ21lbnRzLnNsaWNlKDEpXG4gICAgICAgICAgICAgICAgICBzZWdtZW50cy51bnNoaWZ0KHRhYmxlW2NvbHVtbk5hbWVdLm5hbWUpXG5cbiAgICAgICAgICAgICAgICAgIGlmIChmaWVsZC50eXBlID09PSAncmljaFRleHQnKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGpzb25RdWVyeSA9IGNyZWF0ZUpTT05RdWVyeSh7XG4gICAgICAgICAgICAgICAgICAgICAgb3BlcmF0b3IsXG4gICAgICAgICAgICAgICAgICAgICAgcGF0aFNlZ21lbnRzOiBzZWdtZW50cyxcbiAgICAgICAgICAgICAgICAgICAgICB0cmVhdEFzQXJyYXk6IFsnY2hpbGRyZW4nXSxcbiAgICAgICAgICAgICAgICAgICAgICB0cmVhdFJvb3RBc0FycmF5OiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiB2YWwsXG4gICAgICAgICAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChzcWwucmF3KGpzb25RdWVyeSkpXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgIGNvbnN0IGpzb25RdWVyeSA9IGNvbnZlcnRQYXRoVG9KU09OVHJhdmVyc2FsKHBhdGhTZWdtZW50cylcbiAgICAgICAgICAgICAgICAgIGNvbnN0IG9wZXJhdG9yS2V5cyA9IHtcbiAgICAgICAgICAgICAgICAgICAgY29udGFpbnM6IHsgb3BlcmF0b3I6ICdpbGlrZScsIHdpbGRjYXJkOiAnJScgfSxcbiAgICAgICAgICAgICAgICAgICAgZXF1YWxzOiB7IG9wZXJhdG9yOiAnPScsIHdpbGRjYXJkOiAnJyB9LFxuICAgICAgICAgICAgICAgICAgICBleGlzdHM6IHsgb3BlcmF0b3I6IHZhbCA9PT0gdHJ1ZSA/ICdpcyBub3QgbnVsbCcgOiAnaXMgbnVsbCcgfSxcbiAgICAgICAgICAgICAgICAgICAgbGlrZTogeyBvcGVyYXRvcjogJ2xpa2UnLCB3aWxkY2FyZDogJyUnIH0sXG4gICAgICAgICAgICAgICAgICAgIG5vdF9lcXVhbHM6IHsgb3BlcmF0b3I6ICc8PicsIHdpbGRjYXJkOiAnJyB9LFxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgbGV0IGZvcm1hdHRlZFZhbHVlID0gYCcke29wZXJhdG9yS2V5c1tvcGVyYXRvcl0ud2lsZGNhcmR9JHt2YWx9JHtvcGVyYXRvcktleXNbb3BlcmF0b3JdLndpbGRjYXJkfSdgXG5cbiAgICAgICAgICAgICAgICAgIGlmIChvcGVyYXRvciA9PT0gJ2V4aXN0cycpIHtcbiAgICAgICAgICAgICAgICAgICAgZm9ybWF0dGVkVmFsdWUgPSAnJ1xuICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKFxuICAgICAgICAgICAgICAgICAgICBzcWwucmF3KFxuICAgICAgICAgICAgICAgICAgICAgIGAke3RhYmxlW2NvbHVtbk5hbWVdLm5hbWV9JHtqc29uUXVlcnl9ICR7b3BlcmF0b3JLZXlzW29wZXJhdG9yXS5vcGVyYXRvcn0gJHtmb3JtYXR0ZWRWYWx1ZX1gLFxuICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChnZXROb3ROdWxsQ29sdW1uQnlWYWx1ZSkge1xuICAgICAgICAgICAgICAgICAgY29uc3QgY29sdW1uTmFtZSA9IGdldE5vdE51bGxDb2x1bW5CeVZhbHVlKHZhbClcbiAgICAgICAgICAgICAgICAgIGlmIChjb2x1bW5OYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2goaXNOb3ROdWxsKHRhYmxlW2NvbHVtbk5hbWVdKSlcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBRdWVyeUVycm9yKFt7IHBhdGg6IHJlbGF0aW9uT3JQYXRoIH1dKVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAob3BlcmF0b3IgPT09ICdsaWtlJykge1xuICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChcbiAgICAgICAgICAgICAgICAgICAgYW5kKC4uLnZhbC5zcGxpdCgnICcpLm1hcCgod29yZCkgPT4gaWxpa2UodGFibGVbY29sdW1uTmFtZV0sIGAlJHt3b3JkfSVgKSkpLFxuICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBjb25zdCBzYW5pdGl6ZWRRdWVyeVZhbHVlID0gc2FuaXRpemVRdWVyeVZhbHVlKHtcbiAgICAgICAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICAgICAgICAgIG9wZXJhdG9yLFxuICAgICAgICAgICAgICAgICAgcmVsYXRpb25PclBhdGgsXG4gICAgICAgICAgICAgICAgICB2YWwsXG4gICAgICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgICAgIGlmIChzYW5pdGl6ZWRRdWVyeVZhbHVlID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGNvbnN0IHsgb3BlcmF0b3I6IHF1ZXJ5T3BlcmF0b3IsIHZhbHVlOiBxdWVyeVZhbHVlIH0gPSBzYW5pdGl6ZWRRdWVyeVZhbHVlXG5cbiAgICAgICAgICAgICAgICBpZiAocXVlcnlPcGVyYXRvciA9PT0gJ25vdF9lcXVhbHMnICYmIHF1ZXJ5VmFsdWUgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2goXG4gICAgICAgICAgICAgICAgICAgIG9yKFxuICAgICAgICAgICAgICAgICAgICAgIGlzTnVsbChyYXdDb2x1bW4gfHwgdGFibGVbY29sdW1uTmFtZV0pLFxuICAgICAgICAgICAgICAgICAgICAgIC8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkgKi9cbiAgICAgICAgICAgICAgICAgICAgICBuZTxhbnk+KHJhd0NvbHVtbiB8fCB0YWJsZVtjb2x1bW5OYW1lXSwgcXVlcnlWYWx1ZSksXG4gICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIChmaWVsZC50eXBlID09PSAncmVsYXRpb25zaGlwJyB8fCBmaWVsZC50eXBlID09PSAndXBsb2FkJykgJiZcbiAgICAgICAgICAgICAgICAgIEFycmF5LmlzQXJyYXkocXVlcnlWYWx1ZSkgJiZcbiAgICAgICAgICAgICAgICAgIG9wZXJhdG9yID09PSAnbm90X2luJ1xuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChcbiAgICAgICAgICAgICAgICAgICAgc3FsYCR7bm90SW5BcnJheSh0YWJsZVtjb2x1bW5OYW1lXSwgcXVlcnlWYWx1ZSl9IE9SXG4gICAgICAgICAgICAgICAgICAgICR7dGFibGVbY29sdW1uTmFtZV19XG4gICAgICAgICAgICAgICAgICAgIElTXG4gICAgICAgICAgICAgICAgICAgIE5VTExgLFxuICAgICAgICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChvcGVyYXRvciA9PT0gJ2VxdWFscycgJiYgcXVlcnlWYWx1ZSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChpc051bGwocmF3Q29sdW1uIHx8IHRhYmxlW2NvbHVtbk5hbWVdKSlcbiAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKG9wZXJhdG9yID09PSAnbm90X2VxdWFscycgJiYgcXVlcnlWYWx1ZSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChpc05vdE51bGwocmF3Q29sdW1uIHx8IHRhYmxlW2NvbHVtbk5hbWVdKSlcbiAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChcbiAgICAgICAgICAgICAgICAgIG9wZXJhdG9yTWFwW3F1ZXJ5T3BlcmF0b3JdKHJhd0NvbHVtbiB8fCB0YWJsZVtjb2x1bW5OYW1lXSwgcXVlcnlWYWx1ZSksXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICB9XG4gIGlmIChjb25zdHJhaW50cy5sZW5ndGggPiAwKSB7XG4gICAgaWYgKHJlc3VsdCkge1xuICAgICAgcmVzdWx0ID0gYW5kK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FBTSxLQUFLLEtBQUssQ0FBQ0osUUFBUTtRQUN0QyxDQUFDQSxPQUFPLEdBQUdDO0lBQ2Q7SUFFQSxPQUFPRDtBQUNUIn0=
@@ -1,11 +1,13 @@
1
1
  import { type Field, type TabAsField } from 'payload/types';
2
+ import type { PostgresAdapter } from '../types';
2
3
  type SanitizeQueryValueArgs = {
4
+ adapter: PostgresAdapter;
3
5
  field: Field | TabAsField;
4
6
  operator: string;
5
7
  relationOrPath: string;
6
8
  val: any;
7
9
  };
8
- export declare const sanitizeQueryValue: ({ field, operator: operatorArg, relationOrPath, val, }: SanitizeQueryValueArgs) => {
10
+ export declare const sanitizeQueryValue: ({ adapter, field, operator: operatorArg, relationOrPath, val, }: SanitizeQueryValueArgs) => {
9
11
  operator: string;
10
12
  value: unknown;
11
13
  };
@@ -1 +1 @@
1
- {"version":3,"file":"sanitizeQueryValue.d.ts","sourceRoot":"","sources":["../../src/queries/sanitizeQueryValue.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,UAAU,EAAoB,MAAM,eAAe,CAAA;AAG7E,KAAK,sBAAsB,GAAG;IAC5B,KAAK,EAAE,KAAK,GAAG,UAAU,CAAA;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,cAAc,EAAE,MAAM,CAAA;IACtB,GAAG,EAAE,GAAG,CAAA;CACT,CAAA;AAED,eAAO,MAAM,kBAAkB,2DAK5B,sBAAsB;cAAe,MAAM;WAAS,OAAO;CAmF7D,CAAA"}
1
+ {"version":3,"file":"sanitizeQueryValue.d.ts","sourceRoot":"","sources":["../../src/queries/sanitizeQueryValue.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,UAAU,EAAoB,MAAM,eAAe,CAAA;AAG7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE/C,KAAK,sBAAsB,GAAG;IAC5B,OAAO,EAAE,eAAe,CAAA;IACxB,KAAK,EAAE,KAAK,GAAG,UAAU,CAAA;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,cAAc,EAAE,MAAM,CAAA;IACtB,GAAG,EAAE,GAAG,CAAA;CACT,CAAA;AAED,eAAO,MAAM,kBAAkB,oEAM5B,sBAAsB;cAAe,MAAM;WAAS,OAAO;CAqF7D,CAAA"}
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "sanitizeQueryValue", {
11
11
  const _errors = require("payload/errors");
12
12
  const _types = require("payload/types");
13
13
  const _utilities = require("payload/utilities");
14
- const sanitizeQueryValue = ({ field, operator: operatorArg, relationOrPath, val })=>{
14
+ const sanitizeQueryValue = ({ adapter, field, operator: operatorArg, relationOrPath, val })=>{
15
15
  let operator = operatorArg;
16
16
  let formattedValue = val;
17
17
  if (!(0, _types.fieldAffectsData)(field)) return {
@@ -21,8 +21,10 @@ const sanitizeQueryValue = ({ field, operator: operatorArg, relationOrPath, val
21
21
  if ((field.type === 'relationship' || field.type === 'upload') && !relationOrPath.endsWith('relationTo') && Array.isArray(formattedValue)) {
22
22
  const allPossibleIDTypes = [];
23
23
  formattedValue.forEach((val)=>{
24
- if (typeof val === 'string') {
24
+ if (adapter.idType !== 'uuid' && typeof val === 'string') {
25
25
  allPossibleIDTypes.push(val, parseInt(val));
26
+ } else if (typeof val === 'string') {
27
+ allPossibleIDTypes.push(val);
26
28
  } else {
27
29
  allPossibleIDTypes.push(val, String(val));
28
30
  }
@@ -92,4 +94,4 @@ const sanitizeQueryValue = ({ field, operator: operatorArg, relationOrPath, val
92
94
  };
93
95
  };
94
96
 
95
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9xdWVyaWVzL3Nhbml0aXplUXVlcnlWYWx1ZS50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBBUElFcnJvciB9IGZyb20gJ3BheWxvYWQvZXJyb3JzJ1xuaW1wb3J0IHsgdHlwZSBGaWVsZCwg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