@payloadcms/db-postgres 0.1.0-beta.0 → 0.1.0-beta.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (177) hide show
  1. package/dist/connect.d.ts +3 -0
  2. package/dist/connect.d.ts.map +1 -0
  3. package/dist/connect.js +12 -12
  4. package/dist/create.d.ts +3 -0
  5. package/dist/create.d.ts.map +1 -0
  6. package/dist/create.js +2 -2
  7. package/dist/createGlobal.d.ts +5 -0
  8. package/dist/createGlobal.d.ts.map +1 -0
  9. package/dist/createGlobal.js +2 -2
  10. package/dist/createGlobalVersion.d.ts +6 -0
  11. package/dist/createGlobalVersion.d.ts.map +1 -0
  12. package/dist/createGlobalVersion.js +2 -2
  13. package/dist/createMigration.d.ts +3 -0
  14. package/dist/createMigration.d.ts.map +1 -0
  15. package/dist/createMigration.js +6 -6
  16. package/dist/createVersion.d.ts +5 -0
  17. package/dist/createVersion.d.ts.map +1 -0
  18. package/dist/createVersion.js +2 -2
  19. package/dist/deleteMany.d.ts +3 -0
  20. package/dist/deleteMany.d.ts.map +1 -0
  21. package/dist/deleteMany.js +2 -3
  22. package/dist/deleteOne.d.ts +3 -0
  23. package/dist/deleteOne.d.ts.map +1 -0
  24. package/dist/deleteOne.js +2 -2
  25. package/dist/deleteVersions.d.ts +3 -0
  26. package/dist/deleteVersions.d.ts.map +1 -0
  27. package/dist/deleteVersions.js +2 -2
  28. package/dist/destroy.d.ts +3 -0
  29. package/dist/destroy.d.ts.map +1 -0
  30. package/dist/extendViteConfig.d.ts +4 -0
  31. package/dist/extendViteConfig.d.ts.map +1 -0
  32. package/dist/extendViteConfig.js +38 -0
  33. package/dist/extendWebpackConfig.d.ts +4 -0
  34. package/dist/extendWebpackConfig.d.ts.map +1 -0
  35. package/dist/extendWebpackConfig.js +45 -0
  36. package/dist/find/buildFindManyArgs.d.ts +13 -0
  37. package/dist/find/buildFindManyArgs.d.ts.map +1 -0
  38. package/dist/find/chainMethods.d.ts +15 -0
  39. package/dist/find/chainMethods.d.ts.map +1 -0
  40. package/dist/find/findMany.d.ts +22 -0
  41. package/dist/find/findMany.d.ts.map +1 -0
  42. package/dist/find/findMany.js +2 -2
  43. package/dist/find/traverseFields.d.ts +16 -0
  44. package/dist/find/traverseFields.d.ts.map +1 -0
  45. package/dist/find.d.ts +3 -0
  46. package/dist/find.d.ts.map +1 -0
  47. package/dist/findGlobal.d.ts +3 -0
  48. package/dist/findGlobal.d.ts.map +1 -0
  49. package/dist/findGlobalVersions.d.ts +3 -0
  50. package/dist/findGlobalVersions.d.ts.map +1 -0
  51. package/dist/findOne.d.ts +5 -0
  52. package/dist/findOne.d.ts.map +1 -0
  53. package/dist/findOne.js +2 -2
  54. package/dist/findVersions.d.ts +3 -0
  55. package/dist/findVersions.d.ts.map +1 -0
  56. package/dist/index.d.ts +4 -0
  57. package/dist/index.d.ts.map +1 -0
  58. package/dist/index.js +8 -6
  59. package/dist/init.d.ts +3 -0
  60. package/dist/init.d.ts.map +1 -0
  61. package/dist/init.js +3 -4
  62. package/dist/migrate.d.ts +3 -0
  63. package/dist/migrate.d.ts.map +1 -0
  64. package/dist/migrate.js +4 -5
  65. package/dist/migrateStatus.d.ts +3 -0
  66. package/dist/migrateStatus.d.ts.map +1 -0
  67. package/dist/migrateStatus.js +2 -2
  68. package/dist/queries/buildAndOrConditions.d.ts +17 -0
  69. package/dist/queries/buildAndOrConditions.d.ts.map +1 -0
  70. package/dist/queries/buildQuery.d.ts +30 -0
  71. package/dist/queries/buildQuery.d.ts.map +1 -0
  72. package/dist/queries/createJSONQuery/convertPathToJSONTraversal.d.ts +2 -0
  73. package/dist/queries/createJSONQuery/convertPathToJSONTraversal.d.ts.map +1 -0
  74. package/dist/queries/createJSONQuery/formatJSONPathSegment.d.ts +2 -0
  75. package/dist/queries/createJSONQuery/formatJSONPathSegment.d.ts.map +1 -0
  76. package/dist/queries/createJSONQuery/index.d.ts +10 -0
  77. package/dist/queries/createJSONQuery/index.d.ts.map +1 -0
  78. package/dist/queries/getTableColumnFromPath.d.ts +40 -0
  79. package/dist/queries/getTableColumnFromPath.d.ts.map +1 -0
  80. package/dist/queries/operatorMap.d.ts +18 -0
  81. package/dist/queries/operatorMap.d.ts.map +1 -0
  82. package/dist/queries/parseParams.d.ts +17 -0
  83. package/dist/queries/parseParams.d.ts.map +1 -0
  84. package/dist/queries/parseParams.js +1 -1
  85. package/dist/queries/sanitizeQueryValue.d.ts +12 -0
  86. package/dist/queries/sanitizeQueryValue.d.ts.map +1 -0
  87. package/dist/queryDrafts.d.ts +3 -0
  88. package/dist/queryDrafts.d.ts.map +1 -0
  89. package/dist/reference.d.ts +2 -0
  90. package/dist/reference.d.ts.map +1 -0
  91. package/dist/schema/build.d.ts +23 -0
  92. package/dist/schema/build.d.ts.map +1 -0
  93. package/dist/schema/build.js +6 -5
  94. package/dist/schema/createIndex.d.ts +11 -0
  95. package/dist/schema/createIndex.d.ts.map +1 -0
  96. package/dist/schema/createIndex.js +12 -3
  97. package/dist/schema/parentIDColumnMap.d.ts +7 -0
  98. package/dist/schema/parentIDColumnMap.d.ts.map +1 -0
  99. package/dist/schema/traverseFields.d.ts +33 -0
  100. package/dist/schema/traverseFields.d.ts.map +1 -0
  101. package/dist/schema/traverseFields.js +25 -9
  102. package/dist/schema/validateExistingBlockIsIdentical.d.ts +11 -0
  103. package/dist/schema/validateExistingBlockIsIdentical.d.ts.map +1 -0
  104. package/dist/transactions/beginTransaction.d.ts +3 -0
  105. package/dist/transactions/beginTransaction.d.ts.map +1 -0
  106. package/dist/transactions/beginTransaction.js +2 -2
  107. package/dist/transactions/commitTransaction.d.ts +3 -0
  108. package/dist/transactions/commitTransaction.d.ts.map +1 -0
  109. package/dist/transactions/rollbackTransaction.d.ts +3 -0
  110. package/dist/transactions/rollbackTransaction.d.ts.map +1 -0
  111. package/dist/transform/read/hasManyNumber.d.ts +10 -0
  112. package/dist/transform/read/hasManyNumber.d.ts.map +1 -0
  113. package/dist/transform/read/index.d.ts +12 -0
  114. package/dist/transform/read/index.d.ts.map +1 -0
  115. package/dist/transform/read/relationship.d.ts +10 -0
  116. package/dist/transform/read/relationship.d.ts.map +1 -0
  117. package/dist/transform/read/traverseFields.d.ts +44 -0
  118. package/dist/transform/read/traverseFields.d.ts.map +1 -0
  119. package/dist/transform/write/array.d.ts +22 -0
  120. package/dist/transform/write/array.d.ts.map +1 -0
  121. package/dist/transform/write/blocks.d.ts +21 -0
  122. package/dist/transform/write/blocks.d.ts.map +1 -0
  123. package/dist/transform/write/index.d.ts +11 -0
  124. package/dist/transform/write/index.d.ts.map +1 -0
  125. package/dist/transform/write/numbers.d.ts +8 -0
  126. package/dist/transform/write/numbers.d.ts.map +1 -0
  127. package/dist/transform/write/relationships.d.ts +10 -0
  128. package/dist/transform/write/relationships.d.ts.map +1 -0
  129. package/dist/transform/write/selects.d.ts +7 -0
  130. package/dist/transform/write/selects.d.ts.map +1 -0
  131. package/dist/transform/write/traverseFields.d.ts +46 -0
  132. package/dist/transform/write/traverseFields.d.ts.map +1 -0
  133. package/dist/transform/write/types.d.ts +41 -0
  134. package/dist/transform/write/types.d.ts.map +1 -0
  135. package/dist/types.d.ts +67 -0
  136. package/dist/types.d.ts.map +1 -0
  137. package/dist/update.d.ts +3 -0
  138. package/dist/update.d.ts.map +1 -0
  139. package/dist/update.js +2 -2
  140. package/dist/updateGlobal.d.ts +5 -0
  141. package/dist/updateGlobal.d.ts.map +1 -0
  142. package/dist/updateGlobal.js +2 -2
  143. package/dist/updateGlobalVersion.d.ts +6 -0
  144. package/dist/updateGlobalVersion.d.ts.map +1 -0
  145. package/dist/updateGlobalVersion.js +2 -2
  146. package/dist/updateVersion.d.ts +5 -0
  147. package/dist/updateVersion.d.ts.map +1 -0
  148. package/dist/updateVersion.js +2 -2
  149. package/dist/upsertRow/deleteExistingArrayRows.d.ts +10 -0
  150. package/dist/upsertRow/deleteExistingArrayRows.d.ts.map +1 -0
  151. package/dist/upsertRow/deleteExistingRowsByPath.d.ts +14 -0
  152. package/dist/upsertRow/deleteExistingRowsByPath.d.ts.map +1 -0
  153. package/dist/upsertRow/index.d.ts +4 -0
  154. package/dist/upsertRow/index.d.ts.map +1 -0
  155. package/dist/upsertRow/insertArrays.d.ts +13 -0
  156. package/dist/upsertRow/insertArrays.d.ts.map +1 -0
  157. package/dist/upsertRow/types.d.ts +26 -0
  158. package/dist/upsertRow/types.d.ts.map +1 -0
  159. package/dist/utilities/appendPrefixToKeys.d.ts +2 -0
  160. package/dist/utilities/appendPrefixToKeys.d.ts.map +1 -0
  161. package/dist/utilities/createBlocksMap.d.ts +5 -0
  162. package/dist/utilities/createBlocksMap.d.ts.map +1 -0
  163. package/dist/utilities/createMigrationTable.d.ts +3 -0
  164. package/dist/utilities/createMigrationTable.d.ts.map +1 -0
  165. package/dist/utilities/createRelationshipMap.d.ts +2 -0
  166. package/dist/utilities/createRelationshipMap.d.ts.map +1 -0
  167. package/dist/utilities/hasLocalesTable.d.ts +3 -0
  168. package/dist/utilities/hasLocalesTable.d.ts.map +1 -0
  169. package/dist/utilities/isArrayOfRows.d.ts +2 -0
  170. package/dist/utilities/isArrayOfRows.d.ts.map +1 -0
  171. package/dist/utilities/migrationTableExists.d.ts +3 -0
  172. package/dist/utilities/migrationTableExists.d.ts.map +1 -0
  173. package/mock.js +1 -0
  174. package/package.json +16 -17
  175. package/src/index.ts +93 -0
  176. package/dist/mock.js +0 -13
  177. package/dist/webpack.js +0 -30
@@ -23,7 +23,7 @@ function _interop_require_default(obj) {
23
23
  default: obj
24
24
  };
25
25
  }
26
- const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, disableUnique = false, fieldPrefix, fields, forceLocalized, indexes, localesColumns, localesIndexes, newTableName, parentTableName, relationsToBuild, relationships, rootRelationsToBuild, rootTableIDColType, rootTableName })=>{
26
+ const traverseFields = ({ adapter, buildRelationships, collectionIndexes, columnPrefix, columns, disableUnique = false, fieldPrefix, fields, forceLocalized, indexes, localesColumns, localesIndexes, newTableName, parentTableName, relationsToBuild, relationships, rootRelationsToBuild, rootTableIDColType, rootTableName })=>{
27
27
  let hasLocalizedField = false;
28
28
  let hasLocalizedRelationshipField = false;
29
29
  let hasManyNumberField = false;
@@ -47,6 +47,18 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
47
47
  targetTable = localesColumns;
48
48
  targetIndexes = localesIndexes;
49
49
  }
50
+ const collectionIndex = collectionIndexes ? collectionIndexes.findIndex((index)=>{
51
+ return Object.keys(index.fields).some((indexField)=>indexField === fieldName);
52
+ }) : -1;
53
+ if (collectionIndex > -1) {
54
+ const name = (0, _tosnakecase.default)(`${Object.keys(collectionIndexes[collectionIndex].fields).join('_')}`);
55
+ targetIndexes[`${name}Idx`] = (0, _createIndex.createIndex)({
56
+ name: Object.keys(collectionIndexes[collectionIndex].fields),
57
+ columnName: name,
58
+ unique: collectionIndexes[collectionIndex].options.unique
59
+ });
60
+ collectionIndexes.splice(collectionIndex);
61
+ }
50
62
  if ((field.unique || field.index) && ![
51
63
  'array',
52
64
  'blocks',
@@ -120,6 +132,7 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
120
132
  return option;
121
133
  }));
122
134
  if (field.type === 'select' && field.hasMany) {
135
+ const selectTableName = `${newTableName}_${(0, _tosnakecase.default)(fieldName)}`;
123
136
  const baseColumns = {
124
137
  order: (0, _pgcore.integer)('order').notNull(),
125
138
  parent: _parentIDColumnMap.parentIDColumnMap[parentIDColType]('parent_id').references(()=>adapter.tables[parentTableName].id, {
@@ -130,7 +143,7 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
130
143
  const baseExtraConfig = {};
131
144
  if (field.localized) {
132
145
  baseColumns.locale = adapter.enums.enum__locales('locale').notNull();
133
- baseExtraConfig.parentOrderLocale = (cols)=>(0, _pgcore.unique)().on(cols.parent, cols.order, cols.locale);
146
+ baseExtraConfig.parentOrderLocale = (cols)=>(0, _pgcore.unique)(`${selectTableName}_parent_id_order_locale_unique`).on(cols.parent, cols.order, cols.locale);
134
147
  } else {
135
148
  baseExtraConfig.parent = (cols)=>(0, _pgcore.index)('parent_idx').on(cols.parent);
136
149
  baseExtraConfig.order = (cols)=>(0, _pgcore.index)('order_idx').on(cols.order);
@@ -138,7 +151,6 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
138
151
  if (field.index) {
139
152
  baseExtraConfig.value = (cols)=>(0, _pgcore.index)('value_idx').on(cols.value);
140
153
  }
141
- const selectTableName = `${newTableName}_${(0, _tosnakecase.default)(fieldName)}`;
142
154
  (0, _build.buildTable)({
143
155
  adapter,
144
156
  baseColumns,
@@ -174,6 +186,7 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
174
186
  }
175
187
  case 'array':
176
188
  {
189
+ const arrayTableName = `${newTableName}_${(0, _tosnakecase.default)(field.name)}`;
177
190
  const baseColumns = {
178
191
  _order: (0, _pgcore.integer)('_order').notNull(),
179
192
  _parentID: _parentIDColumnMap.parentIDColumnMap[parentIDColType]('_parent_id').references(()=>adapter.tables[parentTableName].id, {
@@ -183,11 +196,10 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
183
196
  const baseExtraConfig = {};
184
197
  if (field.localized && adapter.payload.config.localization) {
185
198
  baseColumns._locale = adapter.enums.enum__locales('_locale').notNull();
186
- baseExtraConfig._parentOrderLocale = (cols)=>(0, _pgcore.unique)().on(cols._parentID, cols._order, cols._locale);
199
+ baseExtraConfig._parentOrderLocale = (cols)=>(0, _pgcore.unique)(`${arrayTableName}_parent_id_order_locale_unique`).on(cols._parentID, cols._order, cols._locale);
187
200
  } else {
188
- baseExtraConfig._parentOrder = (cols)=>(0, _pgcore.unique)().on(cols._parentID, cols._order);
201
+ baseExtraConfig._parentOrder = (cols)=>(0, _pgcore.unique)(`${arrayTableName}_parent_id_order_unique`).on(cols._parentID, cols._order);
189
202
  }
190
- const arrayTableName = `${newTableName}_${(0, _tosnakecase.default)(field.name)}`;
191
203
  const { relationsToBuild: subRelationsToBuild } = (0, _build.buildTable)({
192
204
  adapter,
193
205
  baseColumns,
@@ -237,9 +249,9 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
237
249
  const baseExtraConfig = {};
238
250
  if (field.localized && adapter.payload.config.localization) {
239
251
  baseColumns._locale = adapter.enums.enum__locales('_locale').notNull();
240
- baseExtraConfig._parentPathOrderLocale = (cols)=>(0, _pgcore.unique)().on(cols._parentID, cols._path, cols._order, cols._locale);
252
+ baseExtraConfig._parentPathOrderLocale = (cols)=>(0, _pgcore.unique)(`${blockTableName}_parent_id_path_order_locale_unique`).on(cols._parentID, cols._path, cols._order, cols._locale);
241
253
  } else {
242
- baseExtraConfig._parentPathOrder = (cols)=>(0, _pgcore.unique)().on(cols._parentID, cols._path, cols._order);
254
+ baseExtraConfig._parentPathOrder = (cols)=>(0, _pgcore.unique)(`${blockTableName}_parent_id_path_order_unique`).on(cols._parentID, cols._path, cols._order);
243
255
  }
244
256
  const { relationsToBuild: subRelationsToBuild } = (0, _build.buildTable)({
245
257
  adapter,
@@ -291,6 +303,7 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
291
303
  const { hasLocalizedField: groupHasLocalizedField, hasLocalizedManyNumberField: groupHasLocalizedManyNumberField, hasLocalizedRelationshipField: groupHasLocalizedRelationshipField, hasManyNumberField: groupHasManyNumberField } = traverseFields({
292
304
  adapter,
293
305
  buildRelationships,
306
+ collectionIndexes,
294
307
  columnPrefix,
295
308
  columns,
296
309
  disableUnique,
@@ -317,6 +330,7 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
317
330
  const { hasLocalizedField: groupHasLocalizedField, hasLocalizedManyNumberField: groupHasLocalizedManyNumberField, hasLocalizedRelationshipField: groupHasLocalizedRelationshipField, hasManyNumberField: groupHasManyNumberField } = traverseFields({
318
331
  adapter,
319
332
  buildRelationships,
333
+ collectionIndexes,
320
334
  columnPrefix: `${columnName}_`,
321
335
  columns,
322
336
  disableUnique,
@@ -345,6 +359,7 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
345
359
  const { hasLocalizedField: tabHasLocalizedField, hasLocalizedManyNumberField: tabHasLocalizedManyNumberField, hasLocalizedRelationshipField: tabHasLocalizedRelationshipField, hasManyNumberField: tabHasManyNumberField } = traverseFields({
346
360
  adapter,
347
361
  buildRelationships,
362
+ collectionIndexes,
348
363
  columnPrefix,
349
364
  columns,
350
365
  disableUnique,
@@ -377,6 +392,7 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
377
392
  const { hasLocalizedField: rowHasLocalizedField, hasLocalizedManyNumberField: rowHasLocalizedManyNumberField, hasLocalizedRelationshipField: rowHasLocalizedRelationshipField, hasManyNumberField: rowHasManyNumberField } = traverseFields({
378
393
  adapter,
379
394
  buildRelationships,
395
+ collectionIndexes,
380
396
  columnPrefix,
381
397
  columns,
382
398
  disableUnique,
@@ -427,4 +443,4 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
427
443
  };
428
444
  };
429
445
 
430
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zY2hlbWEvdHJhdmVyc2VGaWVsZHMudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcGFyYW0tcmVhc3NpZ24gKi9cbmltcG9ydCB0eXBlIHsgUmVsYXRpb24gfSBmcm9tICdkcml6emxlLW9ybSdcbmltcG9ydCB0eXBlIHsgSW5kZXhCdWlsZGVyLCBQZ0NvbHVtbkJ1aWxkZXIsIFVuaXF1ZUNvbnN0cmFpbnRCdWlsZGVyIH0gZnJvbSAnZHJpenpsZS1vcm0vcGctY29yZSdcbmltcG9ydCB0eXBlIHsgRmllbGQsIFRhYkFzRmllbGQgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgeyByZWxhdGlvbnMgfSBmcm9tICdkcml6emxlLW9ybSdcbmltcG9ydCB7XG4gIFBnTnVtZXJpY0J1aWxkZXIsXG4gIFBnVmFyY2hh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dXBwb3J0ZWQgaW4gUG9zdGdyZXMgZm9yIGhhc01hbnkgbnVtYmVyIGZpZWxkcy4nLFxuICAgICAgICAgICAgKVxuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB0YXJnZXRUYWJsZVtmaWVsZE5hbWVdID0gbnVtZXJpYyhjb2x1bW5OYW1lKVxuICAgICAgICB9XG4gICAgICAgIGJyZWFrXG4gICAgICB9XG5cbiAgICAgIGNhc2UgJ3JpY2hUZXh0JzpcbiAgICAgIGNhc2UgJ2pzb24nOiB7XG4gICAgICAgIHRhcmdldFRhYmxlW2ZpZWxkTmFtZV0gPSBqc29uYihjb2x1bW5OYW1lKVxuICAgICAgICBicmVha1xuICAgICAgfVxuXG4gICAgICBjYXNlICdkYXRlJzoge1xuICAgICAgICB0YXJnZXRUYWJsZVtmaWVsZE5hbWVdID0gdGltZXN0YW1wKGNvbHVtbk5hbWUsIHtcbiAgICAgICAgICBtb2RlOiAnc3RyaW5nJyxcbiAgICAgICAgICBwcmVjaXNpb246IDMsXG4gICAgICAgICAgd2l0aFRpbWV6b25lOiB0cnVlLFxuICAgICAgICB9KVxuICAgICAgICBicmVha1xuICAgICAgfVxuXG4gICAgICBjYXNlICdwb2ludCc6IHtcbiAgICAgICAgYnJlYWtcbiAgICAgIH1cblxuICAgICAgY2FzZSAncmFkaW8nOlxuICAgICAgY2FzZSAnc2VsZWN0Jzoge1xuICAgICAgICBjb25zdCBlbnVtTmFtZSA9IGBlbnVtXyR7bmV3VGFibGVOYW1lfV8ke2NvbHVtblByZWZpeCB8fCAnJ30ke3RvU25ha2VDYXNlKGZpZWxkLm5hbWUpfWBcblxuICAgICAgICBhZGFwdGVyLmVudW1zW2VudW1OYW1lXSA9IHBnRW51bShcbiAgICAgICAgICBlbnVtTmFtZSxcbiAgICAgICAgICBmaWVsZC5vcHRpb25zLm1hcCgob3B0aW9uKSA9PiB7XG4gICAgICAgICAgICBpZiAob3B0aW9uSXNPYmplY3Qob3B0aW9uKSkge1xuICAgICAgICAgICAgICByZXR1cm4gb3B0aW9uLnZhbHVlXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBvcHRpb25cbiAgICAgICAgICB9KSBhcyBbc3RyaW5nLCAuLi5zdHJpbmdbXV0sXG4gICAgICAgIClcblxuICAgICAgICBpZiAoZmllbGQudHlwZSA9PT0gJ3NlbGVjdCcgJiYgZmllbGQuaGFzTWFueSkge1xuICAgICAgICAgIGNvbnN0IGJhc2VDb2x1bW5zOiBSZWNvcmQ8c3RyaW5nLCBQZ0NvbHVtbkJ1aWxkZXI+ID0ge1xuICAgICAgICAgICAgb3JkZXI6IGludGVnZXIoJ29yZGVyJykubm90TnVsbCgpLFxuICAgICAgICAgICAgcGFyZW50OiBwYXJlbnRJRENvbHVtbk1hcFtwYXJlbnRJRENvbFR5cGVdKCdwYXJlbnRfaWQnKVxuICAgICAgICAgICAgICAucmVmZXJlbmNlcygoKSA9PiBhZGFwdGVyLnRhYmxlc1twYXJlbnRUYWJsZU5hbWVdLmlkLCB7IG9uRGVsZXRlOiAnY2FzY2FkZScgfSlcbiAgICAgICAgICAgICAgLm5vdE51bGwoKSxcbiAgICAgICAgICAgIHZhbHVlOiBhZGFwdGVyLmVudW1zW2VudW1OYW1lXSgndmFsdWUnKSxcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjb25zdCBiYXNlRXh0cmFDb25maWc6IFJlY29yZDxcbiAgICAgICAgICAgIHN0cmluZyxcbiAgICAgICAgICAgIChjb2xzOiBHZW5lcmljQ29sdW1ucykgPT4gSW5kZXhCdWlsZGVyIHwgVW5pcXVlQ29uc3RyYWludEJ1aWxkZXJcbiAgICAgICAgICA+ID0ge31cblxuICAgICAgICAgIGlmIChmaWVsZC5sb2NhbGl6ZWQpIHtcbiAgICAgICAgICAgIGJhc2VDb2x1bW5zLmxvY2FsZSA9IGFkYXB0ZXIuZW51bXMuZW51bV9fbG9jYWxlcygnbG9jYWxlJykubm90TnVsbCgpXG4gICAgICAgICAgICBiYXNlRXh0cmFDb25maWcucGFyZW50T3JkZXJMb2NhbGUgPSAoY29scykgPT5cbiAgICAgICAgICAgICAgdW5pcXVlKCkub24oY29scy5wYXJlbnQsIGNvbHMub3JkZXIsIGNvbHMubG9jYWxlKVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBiYXNlRXh0cmFDb25maWcucGFyZW50ID0gKGNvbHMpID0+IGluZGV4KCdwYXJlbnRfaWR4Jykub24oY29scy5wYXJlbnQpXG4gICAgICAgICAgICBiYXNlRXh0cmFDb25maWcub3JkZXIgPSAoY29scykgPT4gaW5kZXgoJ29yZGVyX2lkeCcpLm9uKGNvbHMub3JkZXIpXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGZpZWxkLmluZGV4KSB7XG4gICAgICAgICAgICBiYXNlRXh0cmFDb25maWcudmFsdWUgPSAoY29scykgPT4gaW5kZXgoJ3ZhbHVlX2lkeCcpLm9uKGNvbHMudmFsdWUpXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY29uc3Qgc2VsZWN0VGFibGVOYW1lID0gYCR7bmV3VGFibGVOYW1lfV8ke3RvU25ha2VDYXNlKGZpZWxkTmFtZSl9YFxuXG4gICAgICAgICAgYnVpbGRUYWJsZSh7XG4gICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgYmFzZUNvbHVtbnMsXG4gICAgICAgICAgICBiYXNlRXh0cmFDb25maWcsXG4gICAgICAgICAgICBkaXNhYmxlVW5pcXVlLFxuICAgICAgICAgICAgZmllbGRzOiBbXSxcbiAgICAgICAgICAgIHRhYmxlTmFtZTogc2VsZWN0VGFibGVOYW1lLFxuICAgICAgICAgIH0pXG5cbiAgICAgICAgICByZWxhdGlvbnNUb0J1aWxkLnNldChmaWVsZE5hbWUsIHNlbGVjdFRhYmxlTmFtZSlcblxuICAgICAgICAgIGNvbnN0IHNlbGVjdFRhYmxlUmVsYXRpb25zID0gcmVsYXRpb25zKGFk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AgY29uc3QgeyByZWxhdGlvbnNUb0J1aWxkOiBzdWJSZWxhdGlvbnNUb0J1aWxkIH0gPSBidWlsZFRhYmxlKHtcbiAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgIGJhc2VDb2x1bW5zLFxuICAgICAgICAgIGJhc2VFeHRyYUNvbmZpZyxcbiAgICAgICAgICBkaXNhYmxlVW5pcXVlLFxuICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgIHJvb3RSZWxhdGlvbnNUb0J1aWxkLFxuICAgICAgICAgIHJvb3RUYWJsZUlEQ29sVHlwZSxcbiAgICAgICAgICByb290VGFibGVOYW1lLFxuICAgICAgICAgIHRhYmxlTmFtZTogYXJyYXlUYWJsZU5hbWUsXG4gICAgICAgIH0pXG5cbiAgICAgICAgcmVsYXRpb25zVG9CdWlsZC5zZXQoZmllbGROYW1lLCBhcnJheVRhYmxlTmFtZSlcblxuICAgICAgICBjb25zdCBhcnJheVRhYmxlUmVsYXRpb25zID0gcmVsYXRpb25zKGFkYXB0ZXIudGFibGVzW2FycmF5VGFibGVOYW1lXSwgKHsgbWFueSwgb25lIH0pID0+IHtcbiAgICAgICAgICBjb25zdCByZXN1bHQ6IFJlY29yZDxzdHJpbmcsIFJlbGF0aW9uPHN0cmluZz4+ID0ge1xuICAgICAgICAgICAgX3BhcmVudElEOiBvbmUoYWRhcHRlci50YWJsZXNbcGFyZW50VGFibGVOYW1lXSwge1xuICAgICAgICAgICAgICBmaWVsZHM6IFthZGFwdGVyLnRhYmxlc1thcnJheVRhYmxlTmFtZV0uX3BhcmVudElEXSxcbiAgICAgICAgICAgICAgcmVmZXJlbmNlczogW2FkYXB0ZXIudGFibGVzW3BhcmVudFRhYmxlTmFtZV0uaWRdLFxuICAgICAgICAgICAgfSksXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGhhc0xvY2FsZXNUYWJsZShmaWVsZC5maWVsZHMpKSB7XG4gICAgICAgICAgICByZXN1bHQuX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2FkZScgfSlcbiAgICAgICAgICAgICAgICAubm90TnVsbCgpLFxuICAgICAgICAgICAgICBfcGF0aDogdGV4dCgnX3BhdGgnKS5ub3ROdWxsKCksXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGNvbnN0IGJhc2VFeHRyYUNvbmZpZzogUmVjb3JkPFxuICAgICAgICAgICAgICBzdHJpbmcsXG4gICAgICAgICAgICAgIChjb2xzOiBHZW5lcmljQ29sdW1ucykgPT4gSW5kZXhCdWlsZGVyIHwgVW5pcXVlQ29uc3RyYWludEJ1aWxkZXJcbiAgICAgICAgICAgID4gPSB7fVxuXG4gICAgICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkICYmIGFkYXB0ZXIucGF5bG9hZC5jb25maWcubG9jYWxpemF0aW9uKSB7XG4gICAgICAgICAgICAgIGJhc2VDb2x1bW5zLl9sb2NhbGUgPSBhZGFwdGVyLmVudW1zLmVudW1fX2xvY2FsZXMoJ19sb2NhbGUnKS5ub3ROdWxsKClcbiAgICAgICAgICAgICAgYmFzZUV4dHJhQ29uZmlnLl9wYXJlbnRQYXRoT3JkZXJMb2NhbGUgPSAoY29scykgPT5cbiAgICAgICAgICAgICAgICB1bmlxdWUoKS5vbihjb2xzLl9wYXJlbnRJRCwgY29scy5fcGF0aCwgY29scy5fb3JkZXIsIGNvbHMuX2xvY2FsZSlcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIGJhc2VFeHRyYUNvbmZpZy5fcGFyZW50UGF0aE9yZGVyID0gKGNvbHMpID0+XG4gICAgICAgICAgICAgICAgdW5pcXVlKCkub24oY29scy5fcGFyZW50SUQsIGNvbHMuX3BhdGgsIGNvbHMuX29yZGVyKVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb25zdCB7IHJlbGF0aW9uc1RvQnVpbGQ6IHN1YlJlbGF0aW9uc1RvQnVpbGQgfSA9IGJ1aWxkVGFibGUoe1xuICAgICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgICBiYXNlQ29sdW1ucyxcbiAgICAgICAgICAgICAgYmFzZUV4dHJhQ29uZmlnLFxuICAgICAgICAgICAgICBkaXNhYmxlVW5pcXVlLFxuICAgICAgICAgICAgICBmaWVsZHM6IGJsb2NrLmZpZWxkcyxcbiAgICAgICAgICAgICAgcm9vdFJlbGF0aW9uc1RvQnVpbGQsXG4gICAgICAgICAgICAgIHJvb3RUYWJsZUlEQ29sVHlwZSxcbiAgICAgICAgICAgICAgcm9vdFRhYmxlTmFtZSxcbiAgICAgICAgICAgICAgdGFibGVOYW1lOiBibG9ja1RhYmxlTmFtZSxcbiAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgIGNvbnN0IGJsb2NrVGFibGVSZWxhdGlvbnMgPSByZWxhdGlvbnMoXG4gICAgICAgICAgICAgIGFkYXB0ZXIudGFibGVzW2Jsb2NrVGFibGVOYW1lXSxcbiAgICAgICAgICAgICAgKHsgbWFueSwgb25lIH0pID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCByZXN1bHQ6IFJlY29yZDxzdHJpbmcsIFJlbGF0aW9uPHN0cmluZz4+ID0ge1xuICAgICAgICAgICAgICAgICAgX3BhcmVudElEOiBvbmUoYWRhcHRlci50YWJsZXNbcm9vdFRhYmxlTmFtZV0sIHtcbiAgICAgICAgICAgICAgICAgICAgZmllbGRzOiBbYWRhcHRlci50YWJsZXNbYmxvY2tUYWJsZU5hbWVdLl9wYXJlbnRJRF0sXG4gICAgICAgICAgICAgICAgICAgIHJlZmVyZW5jZXM6IFthZGFwdGVyLnRhYmxlc1tyb290VGFibGVOYW1lXS5pZF0sXG4gICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoaGFzTG9jYWxlc1RhYmxlKGJsb2NrLmZpZWxkcykpIHtcbiAgICAgICAgICAgICAgICAgIHJlc3VsdC5fbG9jYWxlcyA9IG1hbnkoYWRhcHRlci50YWJsZXNbYCR7YmxvY2tUYWJsZU5hbWV9X2xvY2FsZXNgXSlcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBzdWJSZWxhdGlvbnNUb0J1aWxkLmZvckVhY2goKHZhbCwga2V5KSA9PiB7XG4gICAgICAgICAgICAgICAgICByZXN1bHRba2V5XSA9IG1hbnkoYWRhcHRlci50YWJsZXNbdmFsXSlcbiAgICAgICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICBhZGFwdGVyLnJlbGF0aW9uc1tgcmVsYXRpb25zXyR7YmxvY2tUYWJsZU5hbWV9YF0gPSBibG9ja1RhYmxlUmVsYXRpb25zXG4gICAgICAgICAgfSBlbHNlIGlmIChwcm9jZXNzLmVudi5OT0RFX0VOViAhPT0gJ3Byb2R1Y3Rpb24nKSB7XG4gICAgICAgICAgICB2YWxpZGF0ZUV4aXN0aW5nQmxvY2tJc0lkZW50aWNhbCh7XG4gICAgICAgICAgICAgIGJsb2NrLFxuICAgICAgICAgICAgICBsb2NhbGl6ZWQ6IGZpZWxkLmxvY2FsaXplZCxcbiAgICAgICAgICAgICAgcm9vdFRhYmxlTmFtZSxcbiAgICAgICAgICAgICAgdGFibGU6IGFkYXB0ZXIudGFibGVzW2Jsb2NrVGFibGVOYW1lXSxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcm9vdFJlbGF0aW9uc1RvQnVpbGQuc2V0KGBfYmxvY2tzXyR7YmxvY2suc2x1Z31gLCBibG9ja1RhYmxlTmFtZSlcbiAgICAgICAgfSlcblxuICAgICAgICBicmVha1xuICAgICAgfVxuXG4gICAgICBjYXNlICd0YWInOlxuICAgICAgY2FzZSAnZ3JvdXAnOiB7XG4gICAgICAgIGlmICghKCduYW1lJyBpbiBmaWVsZCkpIHtcbiAgICAgICAgICBjb25zdCB7XG4gICAg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29sdW1uTmFtZSlcbiAgICAgICAgYnJlYWtcbiAgICAgIH1cblxuICAgICAgY2FzZSAnbnVtYmVyJzoge1xuICAgICAgICBpZiAoZmllbGQuaGFzTWFueSkge1xuICAgICAgICAgIGlmIChmaWVsZC5sb2NhbGl6ZWQpIHtcbiAgICAgICAgICAgIGhhc0xvY2FsaXplZE1hbnlOdW1iZXJGaWVsZCA9IHRydWVcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoZmllbGQuaW5kZXgpIHtcbiAgICAgICAgICAgIGhhc01hbnlOdW1iZXJGaWVsZCA9ICdpbmRleCdcbiAgICAgICAgICB9IGVsc2UgaWYgKCFoYXNNYW55TnVtYmVyRmllbGQpIHtcbiAgICAgICAgICAgIGhhc01hbnlOdW1iZXJGaWVsZCA9IHRydWVcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoZmllbGQudW5pcXVlKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgSW52YWxpZENvbmZpZ3VyYXRpb24oXG4gICAgICAgICAgICAgICdVbmlxdWUgaXMgbm90IHN1cHBvcnRlZCBpbiBQb3N0Z3JlcyBmb3IgaGFzTWFueSBudW1iZXIgZmllbGRzLicsXG4gICAgICAgICAgICApXG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRhcmdldFRhYmxlW2ZpZWxkTmFtZV0gPSBudW1lcmljKGNvbHVtbk5hbWUpXG4gICAgICAgIH1cbiAgICAgICAgYnJlYWtcbiAgICAgIH1cblxuICAgICAgY2FzZSAncmljaFRleHQnOlxuICAgICAgY2FzZSAnanNvbic6IHtcbiAgICAgICAgdGFyZ2V0VGFibGVbZmllbGROYW1lXSA9IGpzb25iKGNvbHVtbk5hbWUpXG4gICAgICAgIGJyZWFrXG4gICAgICB9XG5cbiAgICAgIGNhc2UgJ2RhdGUnOiB7XG4gICAgICAgIHRhcmdldFRhYmxlW2ZpZWxkTmFtZV0gPSB0aW1lc3RhbXAoY29sdW1uTmFtZSwge1xuICAgICAgICAgIG1vZGU6ICdzdHJpbmcnLFxuICAgICAgICAgIHByZWNpc2lvbjogMyxcbiAgICAgICAgICB3aXRoVGltZXpvbmU6IHRydWUsXG4gICAgICAgIH0pXG4gICAgICAgIGJyZWFrXG4gICAgICB9XG5cbiAgICAgIGNhc2UgJ3BvaW50Jzoge1xuICAgICAgICBicmVha1xuICAgICAgfVxuXG4gICAgICBjYXNlICdyYWRpbyc6XG4gICAgICBjYXNlICdzZWxlY3QnOiB7XG4gICAgICAgIGNvbnN0IGVudW1OYW1lID0gYGVudW1fJHtuZXdUYWJsZU5hbWV9XyR7Y29sdW1uUHJlZml4IHx8ICcnfSR7dG9TbmFrZUNhc2UoZmllbGQubmFtZSl9YFxuXG4gICAgICAgIGFkYXB0ZXIuZW51bXNbZW51bU5hbWVdID0gcGdFbnVtKFxuICAgICAgICAgIGVudW1OYW1lLFxuICAgICAgICAgIGZpZWxkLm9wdGlvbnMubWFwKChvcHRpb24pID0+IHtcbiAgICAgICAgICAgIGlmIChvcHRpb25Jc09iamVjdChvcHRpb24pKSB7XG4gICAgICAgICAgICAgIHJldHVybiBvcHRpb24udmFsdWVcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIG9wdGlvblxuICAgICAgICAgIH0pIGFzIFtzdHJpbmcsIC4uLnN0cmluZ1tdXSxcbiAgICAgICAgKVxuXG4gICAgICAgIGlmIChmaWVsZC50eXBlID09PSAnc2VsZWN0JyAmJiBmaWVsZC5oYXNNYW55KSB7XG4gICAgICAgICAgY29uc3Qgc2VsZWN0VGFibGVOYW1lID0gYCR7bmV3VGFibGVOYW1lfV8ke3RvU25ha2VDYXNlKGZpZWxkTmFtZSl9YFxuICAgICAgICAgIGNvbnN0IGJhc2VDb2x1bW5zOiBSZWNvcmQ8c3RyaW5nLCBQZ0NvbHVtbkJ1aWxkZXI+ID0ge1xuICAgICAgICAgICAgb3JkZXI6IGludGVnZXIoJ29yZGVyJykubm90TnVsbCgpLFxuICAgICAgICAgICAgcGFyZW50OiBwYXJlbnRJRENvbHVtbk1hcFtwYXJlbnRJRENvbFR5cGVdKCdwYXJlbnRfaWQnKVxuICAgICAgICAgICAgICAucmVmZXJlbmNlcygoKSA9PiBhZGFwdGVyLnRhYmxlc1twYXJlbnRUYWJsZU5hbWVdLmlkLCB7IG9uRGVsZXRlOiAnY2FzY2FkZScgfSlcbiAgICAgICAgICAgICAgLm5vdE51bGwoKSxcbiAgICAgICAgICAgIHZhbHVlOiBhZGFwdGVyLmVudW1zW2VudW1OYW1lXSgndmFsdWUnKSxcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjb25zdCBiYXNlRXh0cmFDb25maWc6IFJlY29yZDxcbiAgICAgICAgICAgIHN0cmluZyxcbiAgICAgICAgICAgIChjb2xzOiBHZW5lcmljQ29sdW1ucykgPT4gSW5kZXhCdWlsZGVyIHwgVW5pcXVlQ29uc3RyYWludEJ1aWxkZXJcbiAgICAgICAgICA+ID0ge31cblxuICAgICAgICAgIGlmIChmaWVsZC5sb2NhbGl6ZWQpIHtcbiAgICAgICAgICAgIGJhc2VDb2x1bW5zLmxvY2FsZSA9IGFkYXB0ZXIuZW51bXMuZW51bV9fbG9jYWxlcygnbG9jYWxlJykubm90TnVsbCgpXG4gICAgICAgICAgICBiYXNlRXh0cmFDb25maWcucGFyZW50T3JkZXJMb2NhbGUgPSAoY29scykgPT5cbiAgICAgICAgICAgICAgdW5pcXVlKGAke3NlbGVjdFRhYmxlTmFtZX1fcGFyZW50X2lkX29yZGVyX2xvY2FsZV91bmlxdWVgKS5vbihcbiAgICAgICAgICAgICAgICBjb2xzLnBhcmVudCxcbiAgICAgICAgICAgICAgICBjb2xzLm9yZGVyLFxuICAgICAgICAgICAgICAgIGNvbHMubG9jYWxlLFxuICAgICAgICAgICAgICApXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGJhc2VFeHRyYUNvbmZpZy5wYXJlbnQgPSAoY29scykgPT4gaW5kZXgoJ3BhcmVudF9pZHgnKS5vbihjb2xzLnBhcmVudClcbiAgICAgICAgICAgIGJhc2VFeHRyYUNvbmZpZy5vcmRlciA9IChjb2xzKSA9PiBpbmRleCgnb3JkZXJfaWR4Jykub24oY29scy5vcmRlcilcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoZmllbGQuaW5kZXgpIHtcbiAgICAgICAgICAgIGJhc2VFeHRyYUNvbmZpZy52YWx1ZSA9IChjb2xzKSA9PiBpbmRleCgndmFsdWVfaWR4Jykub24oY29scy52YWx1ZSlcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBidWlsZFRhYmxlKHtcbiAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICBiYXNlQ29sdW1ucyxcbiAgICAgICAgICAgIGJhc2VFeHRyYUNvbmZpZyxcbiAgICAgICAgICAgIGRpc2FibGVVbmlxdWUsXG4gICAgICAgICAgICBmaWVsZHM6IFtdLFxuICAgICAgICAgICAgdGFibGVOYW1lOiBzZWxlY3RUYWJsZU5hbWUsXG4gICAgICAgICAgfSlcblxuICAgICAgICAgIHJlbGF0aW9uc1RvQnVpbGQuc2V0KGZpZWxkTmFtZSwgc2VsZWN0VGFibGVOYW1lKVxuXG4gICAgICAgICAgY29uc3Qgc2VsZWN0VGFibGVSZWxhdGlvbnMgPSByZWxhdGlvbnMoYWRhcHRlci50YWJsZXNbc2VsZWN0VGFibGVOYW1lXSwgKHsgb25lIH0pID0+IHtcbiAgICAgICAgICAgIGNvbnN0IHJlc3VsdDogUmVjb3JkPHN0cmluZywgUmVsYXRpb248c3RyaW5nPj4gPSB7XG4gICAgICAgICAgICAgIHBhcmVudDogb25lKGFkYXB0ZXIudGFibGVzW3BhcmVudFRhYmxlTmFtZV0sIHtcbiAgICAgICAgICAgICAgICBmaWVsZHM6IFthZGFwdGVyLnRhYmxlc1tzZWxlY3RUYWJsZU5hbWVdLnBhcmVudF0sXG4gICAgICAgICAgICAgICAgcmVmZXJlbmNlczogW2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ICAgICAgIH1cblxuICAgICAgICBjb25zdCBiYXNlRXh0cmFDb25maWc6IFJlY29yZDxcbiAgICAgICAgICBzdHJpbmcsXG4gICAgICAgICAgKGNvbHM6IEdlbmVyaWNDb2x1bW5zKSA9PiBJbmRleEJ1aWxkZXIgfCBVbmlxdWVDb25zdHJhaW50QnVpbGRlclxuICAgICAgICA+ID0ge31cblxuICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkICYmIGFkYXB0ZXIucGF5bG9hZC5jb25maWcubG9jYWxpemF0aW9uKSB7XG4gICAgICAgICAgYmFzZUNvbHVtbnMuX2xvY2FsZSA9IGFkYXB0ZXIuZW51bXMuZW51bV9fbG9jYWxlcygnX2xvY2FsZScpLm5vdE51bGwoKVxuICAgICAgICAgIGJhc2VFeHRyYUNvbmZpZy5fcGFyZW50T3JkZXJMb2NhbGUgPSAoY29scykgPT5cbiAgICAgICAgICAgIHVuaXF1ZShgJHthcnJheVRhYmxlTmFtZX1fcGFyZW50X2lkX29yZGVyX2xvY2FsZV91bmlxdWVgKS5vbihcbiAgICAgICAgICAgICAgY29scy5fcGFyZW50SUQsXG4gICAgICAgICAgICAgIGNvbHMuX29yZGVyLFxuICAgICAgICAgICAgICBjb2xzLl9sb2NhbGUsXG4gICAgICAgICAgICApXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgYmFzZUV4dHJhQ29uZmlnLl9wYXJlbnRPcmRlciA9IChjb2xzKSA9PlxuICAgICAgICAgICAgdW5pcXVlKGAke2FycmF5VGFibGVOYW1lfV9wYXJlbnRfaWRfb3JkZXJfdW5pcXVlYCkub24oY29scy5fcGFyZW50SUQsIGNvbHMuX29yZGVyKVxuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgeyByZWxhdGlvbnNUb0J1aWxkOiBzdWJSZWxhdGlvbnNUb0J1aWxkIH0gPSBidWlsZFRhYmxlKHtcbiAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgIGJhc2VDb2x1bW5zLFxuICAgICAgICAgIGJhc2VFeHRyYUNvbmZpZyxcbiAgICAgICAgICBkaXNhYmxlVW5pcXVlLFxuICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgIHJvb3RSZWxhdGlvbnNUb0J1aWxkLFxuICAgICAgICAgIHJvb3RUYWJsZUlEQ29sVHlwZSxcbiAgICAgICAgICByb290VGFibGVOYW1lLFxuICAgICAgICAgIHRhYmxlTmFtZTogYXJyYXlUYWJsZU5hbWUsXG4gICAgICAgIH0pXG5cbiAgICAgICAgcmVsYXRpb25zVG9CdWlsZC5zZXQoZmllbGROYW1lLCBhcnJheVRhYmxlTmFtZSlcblxuICAgICAgICBjb25zdCBhcnJheVRhYmxlUmVsYXRpb25zID0gcmVsYXRpb25zKGFkYXB0ZXIudGFibGVzW2FycmF5VGFibGVOYW1lXSwgKHsgbWFueSwgb25lIH0pID0+IHtcbiAgICAgICAgICBjb25zdCByZXN1bHQ6IFJlY29yZDxzdHJpbmcsIFJlbGF0aW9uPHN0cmluZz4+ID0ge1xuICAgICAgICAgICAgX3BhcmVudElEOiBvbmUoYWRhcHRlci50YWJsZXNbcGFyZW50VGFibGVOYW1lXSwge1xuICAgICAgICAgICAgICBmaWVsZHM6IFthZGFwdGVyLnRhYmxlc1thcnJheVRhYmxlTmFtZV0uX3BhcmVudElEXSxcbiAgICAgICAgICAgICAgcmVmZXJlbmNlczogW2FkYXB0ZXIudGFibGVzW3BhcmVudFRhYmxlTmFtZV0uaWRdLFxuICAgICAgICAgICAgfSksXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGhhc0xvY2FsZXNUYWJsZShmaWVsZC5maWVsZHMpKSB7XG4gICAgICAgICAgICByZXN1bHQuX2xvY2FsZXMgPSBtYW55KGFkYXB0ZXIudGFibGVzW2Ake2FycmF5VGFibGVOYW1lfV9sb2NhbGVzYF0pXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgc3ViUmVsYXRpb25zVG9CdWlsZC5mb3JFYWNoKCh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VFeHRyYUNvbmZpZzogUmVjb3JkPFxuICAgICAgICAgICAgICBzdHJpbmcsXG4gICAgICAgICAgICAgIChjb2xzOiBHZW5lcmljQ29sdW1ucykgPT4gSW5kZXhCdWlsZGVyIHwgVW5pcXVlQ29uc3RyYWludEJ1aWxkZXJcbiAgICAgICAgICAgID4gPSB7fVxuXG4gICAgICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkICYmIGFkYXB0ZXIucGF5bG9hZC5jb25maWcubG9jYWxpemF0aW9uKSB7XG4gICAgICAgICAgICAgIGJhc2VDb2x1bW5zLl9sb2NhbGUgPSBhZGFwdGVyLmVudW1zLmVudW1fX2xvY2FsZXMoJ19sb2NhbGUnKS5ub3ROdWxsKClcbiAgICAgICAgICAgICAgYmFzZUV4dHJhQ29uZmlnLl9wYXJlbnRQYXRoT3JkZXJMb2NhbGUgPSAoY29scykgPT5cbiAgICAgICAgICAgICAgICB1bmlxdWUoYCR7YmxvY2tUYWJsZU5hbWV9X3BhcmVudF9pZF9wYXRoX29yZGVyX2xvY2FsZV91bmlxdWVgKS5vbihcbiAgICAgICAgICAgICAgICAgIGNvbHMuX3BhcmVudElELFxuICAgICAgICAgICAgICAgICAgY29scy5fcGF0aCxcbiAgICAgICAgICAgICAgICAgIGNvbHMuX29yZGVyLFxuICAgICAgICAgICAgICAgICAgY29scy5fbG9jYWxlLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIGJhc2VFeHRyYUNvbmZpZy5fcGFyZW50UGF0aE9yZGVyID0gKGNvbHMpID0+XG4gICAgICAgICAgICAgICAgdW5pcXVlKGAke2Jsb2NrVGFibGVOYW1lfV9wYXJlbnRfaWRfcGF0aF9vcmRlcl91bmlxdWVgKS5vbihcbiAgICAgICAgICAgICAgICAgIGNvbHMuX3BhcmVudElELFxuICAgICAgICAgICAgICAgICAgY29scy5fcGF0aCxcbiAgICAgICAgICAgICAgICAgIGNvbHMuX29yZGVyLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY29uc3QgeyByZWxhdGlvbnNUb0J1aWxkOiBzdWJSZWxhdGlvbnNUb0J1aWxkIH0gPSBidWlsZFRhYmxlKHtcbiAgICAgICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICAgICAgYmFzZUNvbHVtbnMsXG4gICAgICAgICAgICAgIGJhc2VFeHRyYUNvbmZpZyxcbiAgICAgICAgICAgICAgZGlzYWJsZVVuaXF1ZSxcbiAgICAgICAgICAgICAgZmllbGRzOiBibG9jay5maWVsZHMsXG4gICAgICAgICAgICAgIHJvb3RSZWxhdGlvbnNUb0J1aWxkLFxuICAgICAgICAgICAgICByb290VGFibGVJRENvbFR5cGUsXG4gICAgICAgICAgICAgIHJvb3RUYWJsZU5hbWUsXG4gICAgICAgICAgICAgIHRhYmxlTmFtZTogYmxvY2tUYWJsZU5hbWUsXG4gICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICBjb25zdCBibG9ja1RhYmxlUmVsYXRpb25zID0gcmVsYXRpb25zKFxuICAgICAgICAgICAgICBhZGFwdGVyLnRhYmxlc1tibG9ja1RhYmxlTmFtZV0sXG4gICAgICAgICAgICAgICh7IG1hbnksIG9uZSB9KSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgcmVzdWx0OiBSZWNvcmQ8c3RyaW5nLCBSZWxhdGlvbjxzdHJpbmc+PiA9IHtcbiAgICAgICAgICAgICAgICAgIF9wYXJlbnRJRDogb25lKGFkYXB0ZXIudGFibGVzW3Jvb3RUYWJsZU5hbWVdLCB7XG4gICAgICAgICAgICAgICAgICAgIGZpZWxkczogW2FkYXB0ZXIudGFibGVzW2Jsb2NrVGFibGVOYW1lXS5fcGFyZW50SURdLFxuICAgICAgICAgICAgICAgICAgICByZWZlcmVuY2VzOiBbYWRhcHRlci50YWJsZXNbcm9vdFRhYmxlTmFtZV0uaWRdLFxuICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKGhhc0xvY2FsZXNUYWJsZShibG9jay5maWVsZHMpKSB7XG4gICAgICAgICAgICAgICAgICByZXN1bHQuX2xvY2FsZXMgPSBtYW55KGFkYXB0ZXIudGFibGVzW2Ake2Jsb2NrVGFibGVOYW1lfV9sb2NhbGVzYF0pXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgc3ViUmVsYXRpb25zVG9CdWlsZC5mb3JFYWNoKCh2YWwsIGtleSkgPT4ge1xuICAgICAgICAgICAgICAgICAgcmVzdWx0W2tleV0gPSBtYW55KGFkYXB0ZXIudGFibGVzW3ZhbF0pXG4gICAgICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHRcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIClcblxuICAgICAgICAgICAgYWRhcHRlci5yZWxhdGlvbnNbYHJlbGF0aW9uc18ke2Jsb2NrVGFibGVOYW1lfWBdID0gYmxvY2tUYWJsZVJlbGF0aW9uc1xuICAgICAgICAgIH0gZWxzZSBpZiAocHJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09ICdwcm9kdWN0aW9uJykge1xuICAgICAgICAgICAgdmFsaWRhdGVFeGlzdGluZ0Jsb2NrSXNJZGVudGljYWwoe1xuICAgICAgICAgICAgICBibG9jayxcbiAgICAgICAgICAgICAgbG9jYWxpemVkOiBmaWVsZC5sb2NhbGl6ZWQsXG4gICAgICAgICAgICAgIHJvb3RUYWJsZU5hbWUsXG4gICAgICAgICAgICAgIHRhYmxlOiBhZGFwdGVyLnRhYmxlc1tibG9ja1RhYmxlTmFtZV0sXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH1cblxuICAgICAgICAgIHJvb3RSZWxhdGlvbnNUb0J1aWxkLnNldChgX2Jsb2Nrc18ke2Jsb2NrLnNsdWd9YCwgYmxvY2tUYWJsZU5hbWUpXG4gICAgICAgIH0pXG5cbiAgICAgICAgYnJlYWtcbiAgICAgIH1cblxuICAgICAgY2FzZSAndGFiJzpcbiAgICAgIGNhc2UgJ2dyb3VwJzoge1xuICAgICAgICBpZiAoISgnbmFtZScgaW4gZmllbGQpKSB7XG4gICAgICAgICAgY29uc3Qge1xuICAgICAgICAgICAgaGFzTG9jYWxpemVkRmllbGQ6IGdyb3VwSGFzTG9jYWxpemVkRmllbGQsXG4gICAgICAgICAgICBoYXNMb2NhbGl6ZWRNYW55TnVtYmVyRmllbGQ6IGdyb3VwSGFzTG9jYWxpemVkTWFueU51bWJlckZpZWxkLFxuICAgICAgICAgICAgaGFzTG9jYWxpemVkUmVsYXRpb25zaGlwRmllbGQ6IGdyb3VwSGFzTG9jYWxpemVkUmVsYXRpb25zaGlwRmllbGQsXG4gICAgICAgICAgICBoYXNNYW55TnVtYmVyRmllbGQ6IGdyb3VwSGFzTWFueU51bWJlckZpZWxkLFxuICAgICAgICAgIH0gPSB0cmF2ZXJzZUZpZWxkcyh7XG4gICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgYnVpbGRSZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgY29sbGVjdGlvbkluZGV4ZXMsXG4gICAgICAgICAgICBjb2x1bW5QcmVmaXgsXG4gICAgICAgICAgICBjb2x1bW5zLFxuICAgICAgICAgICAgZGlzYWJsZVVuaXF1ZSxcbiAgICAgICAgICAgIGZpZWxkUHJlZml4LFxuICAgICAgICAgICAgZmllbGRzOiBmaWVsZC5maWVsZHMsXG4gICAgICAgICAgICBmb3JjZUxvY2FsaXplZCxcbiAgICAgICAgICAgIGluZGV4ZXMsXG4gICAgICAgICAgICBsb2NhbGVzQ29sdW1ucyxcbiAgICAgICAgICAgIGxvY2FsZXNJbmRleGVzLFxuICAgICAgICAgICAgbmV3VGFibGVOYW1lOiBwYXJlbnRUYWJsZU5hbWUsXG4gICAgICAgICAgICBwYXJlbnRUYWJsZU5hbWUsXG4gICAgICAgICAgICByZWxhdGlvbnNUb0J1a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kFDTDNILGNBQWM0SCxHQUFHLENBQUMvRyxNQUFNNkcsVUFBVTtnQkFDcEM7Z0JBRUEsSUFBSTdHLE1BQU1XLFNBQVMsSUFBSXZDLFFBQVFvQyxPQUFPLENBQUNDLE1BQU0sQ0FBQ0MsWUFBWSxFQUFFO29CQUMxRGxCLGdDQUFnQztnQkFDbEM7Z0JBQ0E7WUFFRjtnQkFDRTtRQUNKO1FBRUEsTUFBTXdILFlBQVloSCxNQUFNaUgsS0FBSyxJQUFJakgsTUFBTWlILEtBQUssQ0FBQ0QsU0FBUztRQUV0RCxJQUFJNUcsV0FBVyxDQUFDRCxVQUFVLElBQUksY0FBY0gsU0FBU0EsTUFBTWtILFFBQVEsSUFBSSxDQUFDRixXQUFXO1lBQ2pGNUcsV0FBVyxDQUFDRCxVQUFVLENBQUMyQyxPQUFPO1FBQ2hDO0lBQ0Y7SUFFQSxPQUFPO1FBQ0x2RDtRQUNBRztRQUNBRjtRQUNBQztJQUNGO0FBQ0YifQ==
@@ -0,0 +1,11 @@
1
+ import type { Block } from 'payload/types';
2
+ import type { GenericTable } from '../types';
3
+ type Args = {
4
+ block: Block;
5
+ localized: boolean;
6
+ rootTableName: string;
7
+ table: GenericTable;
8
+ };
9
+ export declare const validateExistingBlockIsIdentical: ({ block, localized, rootTableName, table, }: Args) => void;
10
+ export {};
11
+ //# sourceMappingURL=validateExistingBlockIsIdentical.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateExistingBlockIsIdentical.d.ts","sourceRoot":"","sources":["../../src/schema/validateExistingBlockIsIdentical.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAK1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAE5C,KAAK,IAAI,GAAG;IACV,KAAK,EAAE,KAAK,CAAA;IACZ,SAAS,EAAE,OAAO,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,KAAK,EAAE,YAAY,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,gCAAgC,gDAK1C,IAAI,KAAG,IAoBT,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { BeginTransaction } from 'payload/database';
2
+ export declare const beginTransaction: BeginTransaction;
3
+ //# sourceMappingURL=beginTransaction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"beginTransaction.d.ts","sourceRoot":"","sources":["../../src/transactions/beginTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAMxD,eAAO,MAAM,gBAAgB,EAAE,gBAgD9B,CAAA"}
@@ -23,7 +23,7 @@ const beginTransaction = async function beginTransaction() {
23
23
  // so instead, we "lift" up the `resolve` and `reject` methods
24
24
  // and will call them in our respective transaction methods
25
25
  // eslint-disable-next-line @typescript-eslint/no-floating-promises
26
- this.db.transaction(async (tx)=>{
26
+ this.drizzle.transaction(async (tx)=>{
27
27
  transaction = tx;
28
28
  await new Promise((res, rej)=>{
29
29
  transactionReady();
@@ -48,4 +48,4 @@ const beginTransaction = async function beginTransaction() {
48
48
  return id;
49
49
  };
50
50
 
51
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90cmFuc2FjdGlvbnMvYmVnaW5UcmFuc2FjdGlvbi50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7IEJlZ2luVHJhbnNhY3Rpb24gfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuXG5pbXBvcnQgeyB2NCBhcyB1dWlkIH0gZnJvbSAndXVpZCdcblxuaW1wb3J0IHR5cGUgeyBEcml6emxlVHJhbnNhY3Rpb24sIFBvc3RncmVzQWRhcHRlciB9IGZyb20gJy4uL3R5cGVzJ1xuXG5leHBvcnQgY29uc3QgYmVnaW5UcmFuc2FjdGlvbjogQmVnaW5UcmFuc2FjdGlvbiA9IG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BSztRQUNaLElBQUksQ0FBQ0MsT0FBTyxDQUFDQyxNQUFNLENBQUNDLEtBQUssQ0FBQyxDQUFDLGlDQUFpQyxFQUFFSCxJQUFJSSxPQUFPLENBQUMsQ0FBQyxFQUFFSjtRQUM3RUssUUFBUUMsSUFBSSxDQUFDO0lBQ2Y7SUFFQSxPQUFPcEI7QUFDVCJ9
@@ -0,0 +1,3 @@
1
+ import type { CommitTransaction } from 'payload/database';
2
+ export declare const commitTransaction: CommitTransaction;
3
+ //# sourceMappingURL=commitTransaction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commitTransaction.d.ts","sourceRoot":"","sources":["../../src/transactions/commitTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,eAAO,MAAM,iBAAiB,EAAE,iBAa/B,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { RollbackTransaction } from 'payload/database';
2
+ export declare const rollbackTransaction: RollbackTransaction;
3
+ //# sourceMappingURL=rollbackTransaction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rollbackTransaction.d.ts","sourceRoot":"","sources":["../../src/transactions/rollbackTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAE3D,eAAO,MAAM,mBAAmB,EAAE,mBAWjC,CAAA"}
@@ -0,0 +1,10 @@
1
+ import type { NumberField } from 'payload/types';
2
+ type Args = {
3
+ field: NumberField;
4
+ locale?: string;
5
+ numberRows: Record<string, unknown>[];
6
+ ref: Record<string, unknown>;
7
+ };
8
+ export declare const transformHasManyNumber: ({ field, locale, numberRows, ref }: Args) => void;
9
+ export {};
10
+ //# sourceMappingURL=hasManyNumber.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hasManyNumber.d.ts","sourceRoot":"","sources":["../../../src/transform/read/hasManyNumber.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAEhD,KAAK,IAAI,GAAG;IACV,KAAK,EAAE,WAAW,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;IACrC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,sBAAsB,uCAAwC,IAAI,SAQ9E,CAAA"}
@@ -0,0 +1,12 @@
1
+ import type { SanitizedConfig } from 'payload/config';
2
+ import type { Field, TypeWithID } from 'payload/types';
3
+ type TransformArgs = {
4
+ config: SanitizedConfig;
5
+ data: Record<string, unknown>;
6
+ fallbackLocale?: false | string;
7
+ fields: Field[];
8
+ locale?: string;
9
+ };
10
+ export declare const transform: <T extends TypeWithID>({ config, data, fields }: TransformArgs) => T;
11
+ export {};
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/transform/read/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAMtD,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,eAAe,CAAA;IACvB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B,cAAc,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;IAC/B,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAID,eAAO,MAAM,SAAS,mDAAoD,aAAa,MA+BtF,CAAA"}
@@ -0,0 +1,10 @@
1
+ import type { RelationshipField, UploadField } from 'payload/types';
2
+ type Args = {
3
+ field: RelationshipField | UploadField;
4
+ locale?: string;
5
+ ref: Record<string, unknown>;
6
+ relations: Record<string, unknown>[];
7
+ };
8
+ export declare const transformRelationship: ({ field, locale, ref, relations }: Args) => void;
9
+ export {};
10
+ //# sourceMappingURL=relationship.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relationship.d.ts","sourceRoot":"","sources":["../../../src/transform/read/relationship.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAEnE,KAAK,IAAI,GAAG;IACV,KAAK,EAAE,iBAAiB,GAAG,WAAW,CAAA;IACtC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC5B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;CACrC,CAAA;AAED,eAAO,MAAM,qBAAqB,sCAAuC,IAAI,SAiE5E,CAAA"}
@@ -0,0 +1,44 @@
1
+ import type { SanitizedConfig } from 'payload/config';
2
+ import type { Field, TabAsField } from 'payload/types';
3
+ import type { BlocksMap } from '../../utilities/createBlocksMap';
4
+ type TraverseFieldsArgs = {
5
+ /**
6
+ * Pre-formatted blocks map
7
+ */
8
+ blocks: BlocksMap;
9
+ /**
10
+ * The full Payload config
11
+ */
12
+ config: SanitizedConfig;
13
+ /**
14
+ * The data reference to be mutated within this recursive function
15
+ */
16
+ dataRef: Record<string, unknown>;
17
+ /**
18
+ * Column prefix can be built up by group and named tab fields
19
+ */
20
+ fieldPrefix: string;
21
+ /**
22
+ * An array of Payload fields to traverse
23
+ */
24
+ fields: (Field | TabAsField)[];
25
+ /**
26
+ * All hasMany number fields, as returned by Drizzle, keyed on an object by field path
27
+ */
28
+ numbers: Record<string, Record<string, unknown>[]>;
29
+ /**
30
+ * The current field path (in dot notation), used to merge in relationships
31
+ */
32
+ path: string;
33
+ /**
34
+ * All related documents, as returned by Drizzle, keyed on an object by field path
35
+ */
36
+ relationships: Record<string, Record<string, unknown>[]>;
37
+ /**
38
+ * Data structure representing the nearest table from db
39
+ */
40
+ table: Record<string, unknown>;
41
+ };
42
+ export declare const traverseFields: <T extends Record<string, unknown>>({ blocks, config, dataRef, fieldPrefix, fields, numbers, path, relationships, table, }: TraverseFieldsArgs) => T;
43
+ export {};
44
+ //# sourceMappingURL=traverseFields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"traverseFields.d.ts","sourceRoot":"","sources":["../../../src/transform/read/traverseFields.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAItD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAKhE,KAAK,kBAAkB,GAAG;IACxB;;OAEG;IACH,MAAM,EAAE,SAAS,CAAA;IACjB;;OAEG;IACH,MAAM,EAAE,eAAe,CAAA;IACvB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,MAAM,EAAE,CAAC,KAAK,GAAG,UAAU,CAAC,EAAE,CAAA;IAC9B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAA;IAClD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAA;IACxD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC/B,CAAA;AAID,eAAO,MAAM,cAAc,8HAUxB,kBAAkB,MAkWpB,CAAA"}
@@ -0,0 +1,22 @@
1
+ import type { ArrayField } from 'payload/types';
2
+ import type { ArrayRowToInsert, BlockRowToInsert, RelationshipToDelete } from './types';
3
+ type Args = {
4
+ arrayTableName: string;
5
+ baseTableName: string;
6
+ blocks: {
7
+ [blockType: string]: BlockRowToInsert[];
8
+ };
9
+ data: unknown;
10
+ field: ArrayField;
11
+ locale?: string;
12
+ numbers: Record<string, unknown>[];
13
+ path: string;
14
+ relationships: Record<string, unknown>[];
15
+ relationshipsToDelete: RelationshipToDelete[];
16
+ selects: {
17
+ [tableName: string]: Record<string, unknown>[];
18
+ };
19
+ };
20
+ export declare const transformArray: ({ arrayTableName, baseTableName, blocks, data, field, locale, numbers, path, relationships, relationshipsToDelete, selects, }: Args) => ArrayRowToInsert[];
21
+ export {};
22
+ //# sourceMappingURL=array.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../../src/transform/write/array.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAKvF,KAAK,IAAI,GAAG;IACV,cAAc,EAAE,MAAM,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE;QACN,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;KACxC,CAAA;IACD,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,UAAU,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;IACxC,qBAAqB,EAAE,oBAAoB,EAAE,CAAA;IAC7C,OAAO,EAAE;QACP,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;KAC/C,CAAA;CACF,CAAA;AAED,eAAO,MAAM,cAAc,kIAYxB,IAAI,uBA8CN,CAAA"}
@@ -0,0 +1,21 @@
1
+ import type { BlockField } from 'payload/types';
2
+ import type { BlockRowToInsert, RelationshipToDelete } from './types';
3
+ type Args = {
4
+ baseTableName: string;
5
+ blocks: {
6
+ [blockType: string]: BlockRowToInsert[];
7
+ };
8
+ data: Record<string, unknown>[];
9
+ field: BlockField;
10
+ locale?: string;
11
+ numbers: Record<string, unknown>[];
12
+ path: string;
13
+ relationships: Record<string, unknown>[];
14
+ relationshipsToDelete: RelationshipToDelete[];
15
+ selects: {
16
+ [tableName: string]: Record<string, unknown>[];
17
+ };
18
+ };
19
+ export declare const transformBlocks: ({ baseTableName, blocks, data, field, locale, numbers, path, relationships, relationshipsToDelete, selects, }: Args) => void;
20
+ export {};
21
+ //# sourceMappingURL=blocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../../src/transform/write/blocks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAI/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAIrE,KAAK,IAAI,GAAG;IACV,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE;QACN,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;KACxC,CAAA;IACD,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;IAC/B,KAAK,EAAE,UAAU,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;IACxC,qBAAqB,EAAE,oBAAoB,EAAE,CAAA;IAC7C,OAAO,EAAE;QACP,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;KAC/C,CAAA;CACF,CAAA;AACD,eAAO,MAAM,eAAe,kHAWzB,IAAI,SA0CN,CAAA"}
@@ -0,0 +1,11 @@
1
+ import type { Field } from 'payload/types';
2
+ import type { RowToInsert } from './types';
3
+ type Args = {
4
+ data: Record<string, unknown>;
5
+ fields: Field[];
6
+ path?: string;
7
+ tableName: string;
8
+ };
9
+ export declare const transformForWrite: ({ data, fields, path, tableName }: Args) => RowToInsert;
10
+ export {};
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/transform/write/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAE1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAI1C,KAAK,IAAI,GAAG;IACV,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,iBAAiB,sCAA4C,IAAI,KAAG,WAkChF,CAAA"}
@@ -0,0 +1,8 @@
1
+ type Args = {
2
+ baseRow: Record<string, unknown>;
3
+ data: unknown[];
4
+ numbers: Record<string, unknown>[];
5
+ };
6
+ export declare const transformNumbers: ({ baseRow, data, numbers }: Args) => void;
7
+ export {};
8
+ //# sourceMappingURL=numbers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"numbers.d.ts","sourceRoot":"","sources":["../../../src/transform/write/numbers.ts"],"names":[],"mappings":"AAAA,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,IAAI,EAAE,OAAO,EAAE,CAAA;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;CACnC,CAAA;AAED,eAAO,MAAM,gBAAgB,+BAAgC,IAAI,SAQhE,CAAA"}
@@ -0,0 +1,10 @@
1
+ import type { RelationshipField, UploadField } from 'payload/types';
2
+ type Args = {
3
+ baseRow: Record<string, unknown>;
4
+ data: unknown;
5
+ field: RelationshipField | UploadField;
6
+ relationships: Record<string, unknown>[];
7
+ };
8
+ export declare const transformRelationship: ({ baseRow, data, field, relationships }: Args) => void;
9
+ export {};
10
+ //# sourceMappingURL=relationships.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relationships.d.ts","sourceRoot":"","sources":["../../../src/transform/write/relationships.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAInE,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,iBAAiB,GAAG,WAAW,CAAA;IACtC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;CACzC,CAAA;AAED,eAAO,MAAM,qBAAqB,4CAA6C,IAAI,SAiBlF,CAAA"}
@@ -0,0 +1,7 @@
1
+ type Args = {
2
+ data: unknown;
3
+ locale?: string;
4
+ };
5
+ export declare const transformSelects: ({ data, locale }: Args) => Record<string, unknown>[];
6
+ export {};
7
+ //# sourceMappingURL=selects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selects.d.ts","sourceRoot":"","sources":["../../../src/transform/write/selects.ts"],"names":[],"mappings":"AAGA,KAAK,IAAI,GAAG;IACV,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,gBAAgB,qBAAsB,IAAI,8BAmBtD,CAAA"}