@payloadcms/db-postgres 0.1.0-beta.9 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. package/README.md +32 -0
  2. package/dist/connect.d.ts.map +1 -1
  3. package/dist/connect.js +28 -19
  4. package/dist/createMigration.d.ts.map +1 -1
  5. package/dist/createMigration.js +29 -19
  6. package/dist/createVersion.js +2 -2
  7. package/dist/extendViteConfig.d.ts +4 -0
  8. package/dist/extendViteConfig.d.ts.map +1 -0
  9. package/dist/extendViteConfig.js +38 -0
  10. package/dist/extendWebpackConfig.d.ts +4 -0
  11. package/dist/extendWebpackConfig.d.ts.map +1 -0
  12. package/dist/extendWebpackConfig.js +45 -0
  13. package/dist/find/buildFindManyArgs.js +3 -3
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +16 -5
  16. package/dist/init.d.ts.map +1 -1
  17. package/dist/init.js +2 -4
  18. package/dist/migrate.d.ts.map +1 -1
  19. package/dist/migrate.js +63 -39
  20. package/dist/migrateDown.d.ts +3 -0
  21. package/dist/migrateDown.d.ts.map +1 -0
  22. package/dist/migrateDown.js +71 -0
  23. package/dist/migrateFresh.d.ts +6 -0
  24. package/dist/migrateFresh.d.ts.map +1 -0
  25. package/dist/migrateFresh.js +81 -0
  26. package/dist/migrateRefresh.d.ts +6 -0
  27. package/dist/migrateRefresh.d.ts.map +1 -0
  28. package/dist/migrateRefresh.js +109 -0
  29. package/dist/migrateReset.d.ts +6 -0
  30. package/dist/migrateReset.d.ts.map +1 -0
  31. package/dist/migrateReset.js +89 -0
  32. package/dist/queries/getTableColumnFromPath.js +2 -2
  33. package/dist/schema/build.d.ts +2 -1
  34. package/dist/schema/build.d.ts.map +1 -1
  35. package/dist/schema/build.js +14 -11
  36. package/dist/schema/createIndex.d.ts +1 -1
  37. package/dist/schema/createIndex.d.ts.map +1 -1
  38. package/dist/schema/createIndex.js +12 -3
  39. package/dist/schema/traverseFields.d.ts.map +1 -1
  40. package/dist/schema/traverseFields.js +19 -14
  41. package/dist/transform/read/index.js +4 -4
  42. package/dist/types.d.ts +7 -4
  43. package/dist/types.d.ts.map +1 -1
  44. package/dist/update.d.ts.map +1 -1
  45. package/dist/update.js +51 -5
  46. package/dist/upsertRow/index.js +2 -2
  47. package/dist/utilities/createMigrationTable.d.ts.map +1 -1
  48. package/dist/utilities/createMigrationTable.js +1 -2
  49. package/dist/utilities/parseError.d.ts +5 -0
  50. package/dist/utilities/parseError.d.ts.map +1 -0
  51. package/dist/utilities/parseError.js +24 -0
  52. package/mock.js +1 -0
  53. package/package.json +5 -4
  54. package/src/index.ts +18 -5
  55. package/dist/mock.js +0 -13
  56. package/dist/webpack.d.ts +0 -3
  57. package/dist/webpack.d.ts.map +0 -1
  58. package/dist/webpack.js +0 -32
@@ -128,13 +128,13 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
128
128
  }).notNull(),
129
129
  value: adapter.enums[enumName]('value')
130
130
  };
131
- const baseExtraConfig = {};
131
+ const baseExtraConfig = {
132
+ orderIdx: (cols)=>(0, _pgcore.index)('order_idx').on(cols.order),
133
+ parentIdx: (cols)=>(0, _pgcore.index)('parent_idx').on(cols.parent)
134
+ };
132
135
  if (field.localized) {
133
136
  baseColumns.locale = adapter.enums.enum__locales('locale').notNull();
134
- baseExtraConfig.parentOrderLocale = (cols)=>(0, _pgcore.unique)(`${selectTableName}_parent_id_order_locale_unique`).on(cols.parent, cols.order, cols.locale);
135
- } else {
136
- baseExtraConfig.parent = (cols)=>(0, _pgcore.index)('parent_idx').on(cols.parent);
137
- baseExtraConfig.order = (cols)=>(0, _pgcore.index)('order_idx').on(cols.order);
137
+ baseExtraConfig.localeIdx = (cols)=>(0, _pgcore.index)('locale_idx').on(cols.locale);
138
138
  }
139
139
  if (field.index) {
140
140
  baseExtraConfig.value = (cols)=>(0, _pgcore.index)('value_idx').on(cols.value);
@@ -181,12 +181,13 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
181
181
  onDelete: 'cascade'
182
182
  }).notNull()
183
183
  };
184
- const baseExtraConfig = {};
184
+ const baseExtraConfig = {
185
+ _orderIdx: (cols)=>(0, _pgcore.index)('_order_idx').on(cols._order),
186
+ _parentIDIdx: (cols)=>(0, _pgcore.index)('_parent_id_idx').on(cols._parentID)
187
+ };
185
188
  if (field.localized && adapter.payload.config.localization) {
186
189
  baseColumns._locale = adapter.enums.enum__locales('_locale').notNull();
187
- baseExtraConfig._parentOrderLocale = (cols)=>(0, _pgcore.unique)(`${arrayTableName}_parent_id_order_locale_unique`).on(cols._parentID, cols._order, cols._locale);
188
- } else {
189
- baseExtraConfig._parentOrder = (cols)=>(0, _pgcore.unique)(`${arrayTableName}_parent_id_order_unique`).on(cols._parentID, cols._order);
190
+ baseExtraConfig._localeIdx = (cols)=>(0, _pgcore.index)('_locale_idx').on(cols._locale);
190
191
  }
191
192
  const { relationsToBuild: subRelationsToBuild } = (0, _build.buildTable)({
192
193
  adapter,
@@ -195,6 +196,7 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
195
196
  disableUnique,
196
197
  fields: field.fields,
197
198
  rootRelationsToBuild,
199
+ rootRelationships: relationships,
198
200
  rootTableIDColType,
199
201
  rootTableName,
200
202
  tableName: arrayTableName
@@ -234,12 +236,14 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
234
236
  }).notNull(),
235
237
  _path: (0, _pgcore.text)('_path').notNull()
236
238
  };
237
- const baseExtraConfig = {};
239
+ const baseExtraConfig = {
240
+ _orderIdx: (cols)=>(0, _pgcore.index)('order_idx').on(cols._order),
241
+ _parentIDIdx: (cols)=>(0, _pgcore.index)('parent_id_idx').on(cols._parentID),
242
+ _pathIdx: (cols)=>(0, _pgcore.index)('path_idx').on(cols._path)
243
+ };
238
244
  if (field.localized && adapter.payload.config.localization) {
239
245
  baseColumns._locale = adapter.enums.enum__locales('_locale').notNull();
240
- baseExtraConfig._parentPathOrderLocale = (cols)=>(0, _pgcore.unique)(`${blockTableName}_parent_id_path_order_locale_unique`).on(cols._parentID, cols._path, cols._order, cols._locale);
241
- } else {
242
- baseExtraConfig._parentPathOrder = (cols)=>(0, _pgcore.unique)(`${blockTableName}_parent_id_path_order_unique`).on(cols._parentID, cols._path, cols._order);
246
+ baseExtraConfig._localeIdx = (cols)=>(0, _pgcore.index)('locale_idx').on(cols._locale);
243
247
  }
244
248
  const { relationsToBuild: subRelationsToBuild } = (0, _build.buildTable)({
245
249
  adapter,
@@ -248,6 +252,7 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
248
252
  disableUnique,
249
253
  fields: block.fields,
250
254
  rootRelationsToBuild,
255
+ rootRelationships: relationships,
251
256
  rootTableIDColType,
252
257
  rootTableName,
253
258
  tableName: blockTableName
@@ -427,4 +432,4 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
427
432
  };
428
433
  };
429
434
 
430
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zY2hlbWEvdHJhdmVyc2VGaWVsZHMudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcGFyYW0tcmVhc3NpZ24gKi9cbmltcG9ydCB0eXBlIHsgUmVsYXRpb24gfSBmcm9tICdkcml6emxlLW9ybSdcbmltcG9ydCB0eXBlIHsgSW5kZXhCdWlsZGVyLCBQZ0NvbHVtbkJ1aWxkZXIsIFVuaXF1ZUNvbnN0cmFpbnRCdWlsZGVyIH0gZnJvbSAnZHJpenpsZS1vcm0vcGctY29yZSdcbmltcG9ydCB0eXBlIHsgRmllbGQsIFRhYkFzRmllbGQgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgeyByZWxhdGlvbnMgfSBmcm9tICdkcml6emxlLW9ybSdcbmltcG9ydCB7XG4gIFBnTnVtZXJpY0J1aWxkZXIsXG4gIFBnVmFyY2hhckJ1aWxkZXIsXG4gIGJvb2xlYW4sXG4gIGluZGV4LFxu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gbnVtYmVyIGZpZWxkcy4nLFxuICAgICAgICAgICAgKVxuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB0YXJnZXRUYWJsZVtmaWVsZE5hbWVdID0gbnVtZXJpYyhjb2x1bW5OYW1lKVxuICAgICAgICB9XG4gICAgICAgIGJyZWFrXG4gICAgICB9XG5cbiAgICAgIGNhc2UgJ3JpY2hUZXh0JzpcbiAgICAgIGNhc2UgJ2pzb24nOiB7XG4gICAgICAgIHRhcmdldFRhYmxlW2ZpZWxkTmFtZV0gPSBqc29uYihjb2x1bW5OYW1lKVxuICAgICAgICBicmVha1xuICAgICAgfVxuXG4gICAgICBjYXNlICdkYXRlJzoge1xuICAgICAgICB0YXJnZXRUYWJsZVtmaWVsZE5hbWVdID0gdGltZXN0YW1wKGNvbHVtbk5hbWUsIHtcbiAgICAgICAgICBtb2RlOiAnc3RyaW5nJyxcbiAgICAgICAgICBwcmVjaXNpb246IDMsXG4gICAgICAgICAgd2l0aFRpbWV6b25lOiB0cnVlLFxuICAgICAgICB9KVxuICAgICAgICBicmVha1xuICAgICAgfVxuXG4gICAgICBjYXNlICdwb2ludCc6IHtcbiAgICAgICAgYnJlYWtcbiAgICAgIH1cblxuICAgICAgY2FzZSAncmFkaW8nOlxuICAgICAgY2FzZSAnc2VsZWN0Jzoge1xuICAgICAgICBjb25zdCBlbnVtTmFtZSA9IGBlbnVtXyR7bmV3VGFibGVOYW1lfV8ke2NvbHVtblByZWZpeCB8fCAnJ30ke3RvU25ha2VDYXNlKGZpZWxkLm5hbWUpfWBcblxuICAgICAgICBhZGFwdGVyLmVudW1zW2VudW1OYW1lXSA9IHBnRW51bShcbiAgICAgICAgICBlbnVtTmFtZSxcbiAgICAgICAgICBmaWVsZC5vcHRpb25zLm1hcCgob3B0aW9uKSA9PiB7XG4gICAgICAgICAgICBpZiAob3B0aW9uSXNPYmplY3Qob3B0aW9uKSkge1xuICAgICAgICAgICAgICByZXR1cm4gb3B0aW9u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ZGFwdGVyLmVudW1zLmVudW1fX2xvY2FsZXMoJ2xvY2FsZScpLm5vdE51bGwoKVxuICAgICAgICAgICAgYmFzZUV4dHJhQ29uZmlnLnBhcmVudE9yZGVyTG9jYWxlID0gKGNvbHMpID0+XG4gICAgICAgICAgICAgIHVuaXF1ZShgJHtzZWxlY3RUYWJsZU5hbWV9X3BhcmVudF9pZF9vcmRlcl9sb2NhbGVfdW5pcXVlYCkub24oXG4gICAgICAgICAgICAgICAgY29scy5wYXJlbnQsXG4gICAgICAgICAgICAgICAgY29scy5vcmRlcixcbiAgICAgICAgICAgICAgICBjb2xzLmxvY2FsZSxcbiAgICAgICAgICAgICAgKVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBiYXNlRXh0cmFDb25maWcucGFyZW50ID0gKGNvbHMpID0+IGluZGV4KCdwYXJlbnRfaWR4Jykub24oY29scy5wYXJlbnQpXG4gICAgICAgICAgICBiYXNlRXh0cmFDb25maWcub3JkZXIgPSAoY29scykgPT4gaW5kZXgoJ29yZGVyX2lkeCcpLm9uKGNvbHMub3JkZXIpXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGZpZWxkLmluZGV4KSB7XG4gICAgICAgICAgICBiYXNlRXh0cmFDb25maWcudmFsdWUgPSAoY29scykgPT4gaW5kZXgoJ3ZhbHVlX2lkeCcpLm9uKGNvbHMudmFsdWUpXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnVpbGRUYWJsZSh7XG4gICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgYmFzZUNvbHVtbnMsXG4gICAgICAgICAgICBiYXNlRXh0cmFDb25maWcsXG4gICAgICAgICAgICBkaXNhYmxlVW5pcXVlLFxuICAgICAgICAgICAgZmllbGRzOiBbXSxcbiAgICAgICAgICAgIHRhYmxlTmFtZTogc2VsZWN0VGFibGVOYW1lLFxuICAgICAgICAgIH0pXG5cbiAgICAgICAgICByZWxhdGlvbnNUb0J1aWxkLnNldChmaWVs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mQ8c3RyaW5nLCBQZ0NvbHVtbkJ1aWxkZXI+ID0ge1xuICAgICAgICAgICAgICBfb3JkZXI6IGludGVnZXIoJ19vcmRlcicpLm5vdE51bGwoKSxcbiAgICAgICAgICAgICAgX3BhcmVudElEOiBwYXJlbnRJRENvbHVtbk1hcFtyb290VGFibGVJRENvbFR5cGVdKCdfcGFyZW50X2lkJylcbiAgICAgICAgICAgICAgICAucmVmZXJlbmNlcygoKSA9PiBhZGFwdGVyLnRhYmxlc1tyb290VGFibGVOYW1lXS5pZCwgeyBvbkRlbGV0ZTogJ2Nhc2NhZGUnIH0pXG4gICAgICAgICAgICAgICAgLm5vdE51bGwoKSxcbiAgICAgICAgICAgICAgX3BhdGg6IHRleHQoJ19wYXRoJykubm90TnVsbCgpLFxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb25zdCBiYXNlRXh0cmFDb25maWc6IFJlY29yZDxcbiAgICAgICAgICAgICAgc3RyaW5nLFxuICAgICAgICAgICAgICAoY29sczogR2VuZXJpY0NvbHVtbnMpID0+IEluZGV4QnVpbGRlciB8IFVuaXF1ZUNvbnN0cmFpbnRCdWlsZGVyXG4gICAgICAgICAgICA+ID0ge31cblxuICAgICAgICAgICAgaWYgKGZpZWxkLmxvY2FsaXplZCAmJiBhZGFwdGVyLnBheWxvYWQuY29uZmlnLmxvY2FsaXphdGlvbikge1xuICAgICAgICAgICAgICBiYXNlQ29sdW1ucy5fbG9jYWxlID0gYWRhcHRlci5lbnVtcy5lbnVtX19sb2NhbGVzKCdfbG9jYWxlJykubm90TnVsbCgpXG4gICAgICAgICAgICAgIGJhc2VFeHRyYUNvbmZpZy5fcGFyZW50UGF0aE9yZGVyTG9jYWxlID0gKGNvbHMpID0+XG4gICAgICAgICAgICAgICAgdW5pcXVlKGAke2Jsb2NrVGFibGVOYW1lfV9wYXJlbnRfaWRfcGF0aF9vcmRlcl9sb2NhbGVfdW5pcXVlYCkub24oXG4gICAgICAgICAgICAgICAgICBjb2xzLl9wYXJlbnRJRCxcbiAgICAgICAgICAgICAgICAgIGNvbHMuX3BhdGgsXG4gICAgICAgICAgICAgICAgICBjb2xzLl9vcmRlcixcbiAgICAgICAgICAgICAgICAgIGNvbHMuX2xvY2FsZSxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBiYXNlRXh0cmFDb25maWcuX3BhcmVudFBhdGhPcmRlciA9IChjb2xzKSA9PlxuICAgICAgICAgICAgICAgIHVuaXF1ZShgJHtibG9ja1RhYmxlTmFtZX1fcGFyZW50X2lkX3BhdGhfb3JkZXJfdW5pcXVlYCkub24oXG4gICAgICAgICAgICAgICAgICBjb2xzLl9wYXJlbnRJRCxcbiAgICAgICAgICAgICAgICAgIGNvbHMuX3BhdGgsXG4gICAgICAgICAgICAgICAgICBjb2xzLl9vcmRlcixcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGNvbnN0IHsgcmVsYXRpb25zVG9CdWlsZDogc3ViUmVsYXRpb25zVG9CdWlsZCB9ID0gYnVpbGRUYWJsZSh7XG4gICAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICAgIGJhc2VDb2x1bW5zLFxuICAgICAgICAgICAgICBiYXNlRXh0cmFDb25maWcsXG4gICAgICAgICAgICAgIGRpc2FibGVVbmlxdWUsXG4gICAgICAgICAgICAgIGZpZWxkczogYmxvY2suZmllbGRzLFxuICAgICAgICAgICAgICByb290UmVsYXRpb25zVG9CdWlsZCxcbiAgICAgICAgICAgICAgcm9vdFRhYmxlSURDb2xUeXBlLFxuICAgICAgICAgICAgICByb290VGFibGVOYW1lLFxuICAgICAgICAgICAgICB0YWJsZU5hbWU6IGJsb2NrVGFibGVOYW1lLFxuICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgY29uc3QgYmxvY2tUYWJsZVJlbGF0aW9ucyA9IHJlbGF0aW9ucyhcbiAgICAgICAgICAgICAgYWRhcHRlci50YWJsZXNbYmxvY2tUYWJsZU5hbWVdLFxuICAgICAgICAgICAgICAoeyBtYW55LCBvbmUgfSkgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IHJlc3VsdDogUmVjb3JkPHN0cmluZywgUmVsYXRpb248c3RyaW5nPj4gPSB7XG4gICAgICAgICAgICAgICAgICBfcGFyZW50SUQ6IG9uZShhZGFwdGVyLnRhYmxlc1tyb290VGFibGVOYW1lXSwge1xuICAgICAgICAgICAgICAgICAgICBmaWVsZHM6IFthZGFwdGVyLnRhYmxlc1tibG9ja1RhYmxlTmFtZV0uX3BhcmVudElEXSxcbiAgICAgICAgICAgICAgICAgICAgcmVmZXJlbmNlczogW2FkYXB0ZXIudGFibGVzW3Jvb3RUYWJsZU5hbWVdLmlkXSxcbiAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChoYXNMb2NhbGVzVGFibGUoYmxvY2suZmllbGRzKSkge1xuICAgICAgICAgICAgICAgICAgcmVzdWx0Ll9sb2NhbGVzID0gbWFueShhZGFwdGVyLnRhYmxlc1tgJHtibG9ja1RhYmxlTmFtZX1fbG9jYWxlc2BdKVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHN1YlJlbGF0aW9uc1RvQnVpbGQuZm9yRWFjaCgodmFsLCBrZXkpID0+IHtcbiAgICAgICAgICAgICAgICAgIHJlc3VsdFtrZXldID0gbWFueShhZGFwdGVyLnRhYmxlc1t2YWxdKVxuICAgICAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApXG5cbiAgICAgICAgICAgIGFkYXB0ZXIucmVsYXRpb25zW2ByZWxhdGlvbnNfJHtibG9ja1RhYmxlTmFtZX1gXSA9IGJsb2NrVGFibGVSZWxhdGlvbnNcbiAgICAgICAgICB9IGVsc2UgaWYgKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSAncHJvZHVjdGlvbicpIHtcbiAgICAgICAgICAgIHZhbGlkYXRlRXhpc3RpbmdCbG9ja0lzSWRlbnRpY2FsKHtcbiAgICAgICAgICAgICAgYmxvY2ssXG4gICAgICAgICAgICAgIGxvY2FsaXplZDogZmllbGQubG9jYWxpemVkLFxuICAgICAgICAgICAgICByb290VGFibGVOYW1lLFxuICAgICAgICAgICAgICB0YWJsZTogYWRhcHRlci50YWJsZXNbYmxvY2tUYWJsZU5hbWVdLFxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByb290UmVsYXRpb25zVG9CdWlsZC5zZXQoYF9ibG9ja3NfJHtibG9jay5zbHVnfWAsIGJsb2NrVGFibGVOYW1lKVxuICAgICAgICB9KVxuXG4gICAgICAgIGJyZWFrXG4gICAgICB9XG5cbiAgICAgIGNhc2UgJ3RhYic6XG4gICAgICBjYXNlICdncm91cCc6IHtcbiAgICAgICAgaWYgKCEoJ25hbWUnIGluIGZpZWxkKSkge1xuICAgICAgICAgIGNvbnN0IHtcbiAgICAgICAgICAgIGhhc0xvY2FsaXplZEZpZWxkOiBncm91cEhhc0xvY2FsaXplZEZpZWxkLFxuICAgICAgICAgICAgaGFzTG9jYWxpemVkTWFueU51bWJlckZpZWxkOiBncm91cEhhc0xvY2FsaXplZE1hbnlOdW1iZXJGaWVsZCxcbiAgICAgICAgICAgIGhhc0xvY2FsaXplZFJlbGF0aW9uc2hpcEZpZWxkOiBncm91cEhhc0xvY2FsaXplZFJlbGF0aW9uc2hpcEZpZWxkLFxuICAgICAgICAgICAgaGFzTWFueU51bWJlckZpZWxkOiBncm91cEhhc01hbnlOdW1iZXJGaWVsZCxcbiAgICAgICAgICB9ID0gdHJhdmVyc2VGaWVsZHMoe1xuICAgICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICAgIGJ1aWxkUmVsYXRpb25zaGlwcyxcbiAgICAgICAgICAgIGNvbHVtblByZWZpeCxcbiAgICAgICAgICAgIGNvbHVtbnMsXG4gICAgICAgICAgICBkaXNhYmxlVW5pcXVlLFxuICAgICAgICAgICAgZmllbGRQcmVmaXgsXG4gICAgICAgICAgICBmaWVsZHM6IGZpZWxkLmZpZWxkcyxcbiAgICAgICAgICAgIGZvcmNlTG9jYWxpemVkLFxuICAgICAgICAgICAgaW5kZXhlcyxcbiAgICAgICAgICAgIGxvY2FsZXNDb2x1bW5zLFxuICAgICAgICAgICAgbG9jYWxlc0luZGV4ZXMsXG4gICAgICAgICAgICBuZXdUYWJsZU5hbWU6IHBhcmVudFRhYmxlTmFtZSxcbiAgICAgICAgICAgIHBhcmVudFRhYmxlTmFtZSxcbiAgICAgICAgICAgIHJlbGF0aW9uc1RvQnVpbGQsXG4gICAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgcm9vdFJlbGF0aW9uc1RvQnVpbGQsXG4gICAgICAgICAgICByb290VGFibGVJRENvbFR5cGUsXG4gICAgICAgICAgICByb290VGFibGVOYW1lLFxuICAgICAgICAgIH0pXG5cbiAgICAgICAgICBpZiAoZ3JvdXBIYXNMb2NhbGl6ZWRGaWVsZCkgaGFzTG9jYWxpemVkRmllbGQgPSB0cnVlXG4gICAgICAgICAgaWYgKGdyb3VwSGFzTG9jYWxpemVkUmVsYXRpb25zaGlwRmllbGQpIGhhc0xvY2FsaXplZFJlbGF0aW9uc2hpcEZpZWxkID0gdHJ1ZVxuICAgICAgICAgIGlmIChncm91cEhhc01hbnlOdW1iZXJGaWVsZCkgaGFzTWFueU51bWJlckZpZWxkID0gdHJ1ZVxuICAgICAgICAgIGlmIChncm91cEhhc0xvY2FsaXplZE1hbnlOdW1iZXJGaWVsZCkgaGFzTG9jYWxpemVkTWFueU51bWJlckZpZWxkID0gdHJ1ZVxuICAgICAgICAgIGJyZWFrXG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCB7XG4gICAgICAgICAgaGFzTG9jYWxpemVkRmllbGQ6IGdyb3VwSGFzTG9jYW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ZWxkLFxuICAgICAgICAgIGhhc0xvY2FsaXplZFJlbGF0aW9uc2hpcEZpZWxkOiByb3dIYXNMb2NhbGl6ZWRSZWxhdGlvbnNoaXBGaWVsZCxcbiAgICAgICAgICBoYXNNYW55TnVtYmVyRmllbGQ6IHJvd0hhc01hbnlOdW1iZXJGaWVsZCxcbiAgICAgICAgfSA9IHRyYXZlcnNlRmllbGRzKHtcbiAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgIGJ1aWxkUmVsYXRpb25zaGlwcyxcbiAgICAgICAgICBjb2x1bW5QcmVmaXgsXG4gICAgICAgICAgY29sdW1ucyxcbiAgICAgICAgICBkaXNhYmxlVW5pcXVlLFxuICAgICAgICAgIGZpZWxkUHJlZml4LFxuICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgIGZvcmNlTG9jYWxpemVkLFxuICAgICAgICAgIGluZGV4ZXMsXG4gICAgICAgICAgbG9jYWxlc0NvbHVtbnMsXG4gICAgICAgICAgbG9jYWxlc0luZGV4ZXMsXG4gICAgICAgICAgbmV3VGFibGVOYW1lOiBwYXJlbnRUYWJsZU5hbWUsXG4gICAgICAgICAgcGFyZW50VGFibGVOYW1lLFxuICAgICAgICAgIHJlbGF0aW9uc1RvQnVpbGQsXG4gICAgICAgICAgcmVsYXRpb25zaGlwcyxcbiAgICAgICAgICByb290UmVsYXRpb25zVG9CdWlsZCxcbiAgICAgICAgICByb290VGFibGVJRENvbFR5cGUsXG4gICAgICAgICAgcm9vdFRhYmxlTmFtZSxcbiAgICAgICAgfSlcblxuICAgICAgICBpZiAocm93SGFzTG9jYWxpemVkRmllbGQpIGhhc0xvY2FsaXplZEZpZWxkID0gdHJ1ZVxuICAgICAgICBpZiAocm93SGFzTG9jYWxpemVkUmVsYXRpb25zaGlwRmllbGQpIGhhc0xvY2FsaXplZFJlbGF0aW9uc2hpcEZpZWxkID0gdHJ1ZVxuICAgICAgICBpZiAocm93SGFzTWFueU51bWJlckZpZWxk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SA9IGxvY2FsZXNDb2x1bW5zXG4gICAgICAgIHRhcmdldEluZGV4ZXMgPSBsb2NhbGVzSW5kZXhlc1xuICAgICAgfVxuXG4gICAgICBpZiAoXG4gICAgICAgIChmaWVsZC51bmlxdWUgfHwgZmllbGQuaW5kZXgpICYmXG4gICAgICAgICFbJ2FycmF5JywgJ2Jsb2NrcycsICdncm91cCcsICdwb2ludCcsICdyZWxhdGlvbnNoaXAnLCAndXBsb2FkJ10uaW5jbHVkZXMoZmllbGQudHlwZSkgJiZcbiAgICAgICAgIShmaWVsZC50eXBlID09PSAnbnVtYmVyJyAmJiBmaWVsZC5oYXNNYW55ID09PSB0cnVlKVxuICAgICAgKSB7XG4gICAgICAgIHRhcmdldEluZGV4ZXNbYCR7ZmllbGQubmFtZX1JZHhgXSA9IGNyZWF0ZUluZGV4KHtcbiAgICAgICAgICBuYW1lOiBmaWVsZE5hbWUsXG4gICAgICAgICAgY29sdW1uTmFtZSxcbiAgICAgICAgICB1bmlxdWU6IGRpc2FibGVVbmlxdWUgIT09IHRydWUgJiYgZmllbGQudW5pcXVlLFxuICAgICAgICB9KVxuICAgICAgfVxuICAgIH1cblxuICAgIHN3aXRjaCAoZmllbGQudHlwZSkge1xuICAgICAgY2FzZSAndGV4dCc6XG4gICAgICBjYXNlICdlbWFpbCc6XG4gICAgICBjYXNlICdjb2RlJzpcbiAgICAgIGNhc2UgJ3RleHRhcmVhJzoge1xuICAgICAgICB0YXJnZXRUYWJsZVtmaWVsZE5hbWVdID0gdmFyY2hhcihjb2x1bW5OYW1lKVxuICAgICAgICBicmVha1xuICAgICAgfVxuXG4gICAgICBjYXNlICdudW1iZXInOiB7XG4gICAgICAgIGlmIChmaWVsZC5oYXNNYW55KSB7XG4gICAgICAgICAgaWYgKGZpZWxkLmxvY2FsaXplZCkge1xuICAgICAgICAgICAgaGFzTG9jYWxpemVkTWFueU51bWJlckZpZWxkID0gdHJ1ZVxuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChmaWVsZC5pbmRleCkge1xuICAgICAgICAgICAgaGFzTWFueU51bWJlckZpZWxkID0gJ2luZGV4J1xuICAgICAgICAgIH0gZWxzZSBpZiAoIWhhc01hbnlOdW1iZXJGaWVsZCkge1xuICAgICAgICAgICAgaGFzTWFueU51bWJlckZpZWxkID0gdHJ1ZVxuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChmaWVsZC51bmlxdWUpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBJbnZhbGlkQ29uZmlndXJhdGlvbihcbiAgICAgICAgICAgICAgJ1VuaXF1ZSBpcyBub3Qgc3VwcG9ydGVkIGluIFBvc3RncmVzIGZvciBoYXNNYW55IG51bWJlciBmaWVsZHMuJyxcbiAgICAgICAgICAgIClcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdGFyZ2V0VGFibGVbZmllbGROYW1lXSA9IG51bWVyaWMoY29sdW1uTmFtZSlcbiAgICAgICAgfVxuICAgICAgICBicmVha1xuICAgICAgfVxuXG4gICAgICBjYXNlICdyaWNoVGV4dCc6XG4gICAgICBjYXNlICdqc29uJzoge1xuICAgICAgICB0YXJnZXRUYWJsZVtmaWVsZE5hbWVdID0ganNvbmIoY29sdW1uTmFtZSlcbiAgICAgICAgYnJlYWtcbiAgICAgIH1cblxuICAgICAgY2FzZSAnZGF0ZSc6IHtcbiAgICAgICAgdGFyZ2V0VGFibGVbZmllbGROYW1lXSA9IHRpbWVzdGFtcChjb2x1bW5OYW1lLCB7XG4gICAgICAgICAgbW9kZTogJ3N0cmluZycsXG4gICAgICAgICAgcHJlY2lzaW9uOiAzLFxuICAgICAgICAgIHdpdGhUaW1lem9uZTogdHJ1ZSxcbiAgICAgICAgfSlcbiAgICAgICAgYnJlYWtcbiAgICAgIH1cblxuICAgICAgY2FzZSAncG9pbnQnOiB7XG4gICAgICAgIGJyZWFrXG4gICAgICB9XG5cbiAgICAgIGNhc2UgJ3JhZGlvJzpcbiAgICAgIGNhc2UgJ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ICAgdmFsdWU6IGFkYXB0ZXIuZW51bXNbZW51bU5hbWVdKCd2YWx1ZScpLFxuICAgICAgICAgIH1cblxuICAgICAgICAgIGNvbnN0IGJhc2VFeHRyYUNvbmZpZzogUmVjb3JkPFxuICAgICAgICAgICAgc3RyaW5nLFxuICAgICAgICAgICAgKGNvbHM6IEdlbmVyaWNDb2x1bW5zKSA9PiBJbmRleEJ1aWxkZXIgfCBVbmlxdWVDb25zdHJhaW50QnVpbGRlclxuICAgICAgICAgID4gPSB7XG4gICAgICAgICAgICBvcmRlcklkeDogKGNvbHMpID0+IGluZGV4KCdvcmRlcl9pZHgnKS5vbihjb2xzLm9yZGVyKSxcbiAgICAgICAgICAgIHBhcmVudElkeDogKGNvbHMpID0+IGluZGV4KCdwYXJlbnRfaWR4Jykub24oY29scy5wYXJlbnQpLFxuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChmaWVsZC5sb2NhbGl6ZWQpIHtcbiAgICAgICAgICAgIGJhc2VDb2x1bW5zLmxvY2FsZSA9IGFkYXB0ZXIuZW51bXMuZW51bV9fbG9jYWxlcygnbG9jYWxlJykubm90TnVsbCgpXG4gICAgICAgICAgICBiYXNlRXh0cmFDb25maWcubG9jYWxlSWR4ID0gKGNvbHMpID0+IGluZGV4KCdsb2NhbGVfaWR4Jykub24oY29scy5sb2NhbGUpXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGZpZWxkLmluZGV4KSB7XG4gICAgICAgICAgICBiYXNlRXh0cmFDb25maWcudmFsdWUgPSAoY29scykgPT4gaW5kZXgoJ3ZhbHVlX2lkeCcpLm9uKGNvbHMudmFsdWUpXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnVpbGRUYWJsZSh7XG4gICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgYmFzZUNvbHVtbnMsXG4gICAgICAgICAgICBiYXNlRXh0cmFDb25maWcsXG4gICAgICAgICAgICBkaXNhYmxlVW5pcXVlLFxuICAgICAgICAgIC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Q8c3RyaW5nLCBQZ0NvbHVtbkJ1aWxkZXI+ID0ge1xuICAgICAgICAgICAgICBfb3JkZXI6IGludGVnZXIoJ19vcmRlcicpLm5vdE51bGwoKSxcbiAgICAgICAgICAgICAgX3BhcmVudElEOiBwYXJlbnRJRENvbHVtbk1hcFtyb290VGFibGVJRENvbFR5cGVdKCdfcGFyZW50X2lkJylcbiAgICAgICAgICAgICAgICAucmVmZXJlbmNlcygoKSA9PiBhZGFwdGVyLnRhYmxlc1tyb290VGFibGVOYW1lXS5pZCwgeyBvbkRlbGV0ZTogJ2Nhc2NhZGUnIH0pXG4gICAgICAgICAgICAgICAgLm5vdE51bGwoKSxcbiAgICAgICAgICAgICAgX3BhdGg6IHRleHQoJ19wYXRoJykubm90TnVsbCgpLFxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb25zdCBiYXNlRXh0cmFDb25maWc6IFJlY29yZDxcbiAgICAgICAgICAgICAgc3RyaW5nLFxuICAgICAgICAgICAgICAoY29sczogR2VuZXJpY0NvbHVtbnMpID0+IEluZGV4QnVpbGRlciB8IFVuaXF1ZUNvbnN0cmFpbnRCdWlsZGVyXG4gICAgICAgICAgICA+ID0ge1xuICAgICAgICAgICAgICBfb3JkZXJJZHg6IChjb2xzKSA9PiBpbmRleCgnb3JkZXJfaWR4Jykub24oY29scy5fb3JkZXIpLFxuICAgICAgICAgICAgICBfcGFyZW50SURJZHg6IChjb2xzKSA9PiBpbmRleCgncGFyZW50X2lkX2lkeCcpLm9uKGNvbHMuX3BhcmVudElEKSxcbiAgICAgICAgICAgICAgX3BhdGhJZHg6IChjb2xzKSA9PiBpbmRleCgncGF0aF9pZHgnKS5vbihjb2xzLl9wYXRoKSxcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGZpZWxkLmxvY2FsaXplZCAmJiBhZGFwdGVyLnBheWxvYWQuY29uZmlnLmxvY2FsaXphdGlvbikge1xuICAgICAgICAgICAgICBiYXNlQ29sdW1ucy5fbG9jYWxlID0gYWRhcHRlci5lbnVtcy5lbnVtX19sb2NhbGVzKCdfbG9jYWxlJykubm90TnVsbCgpXG4gICAgICAgICAgICAgIGJhc2VFeHRyYUNvbmZpZy5fbG9jYWxlSWR4ID0gKGNvbHMpID0+IGluZGV4KCdsb2NhbGVfaWR4Jykub24oY29scy5fbG9jYWxlKVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb25zdCB7IHJlbGF0aW9uc1RvQnVpbGQ6IHN1YlJlbGF0aW9uc1RvQnVpbGQgfSA9IGJ1aWxkVGFibGUoe1xuICAgICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgICBiYXNlQ29sdW1ucyxcbiAgICAgICAgICAgICAgYmFzZUV4dHJhQ29uZmlnLFxuICAgICAgICAgICAgICBkaXNhYmxlVW5pcXVlLFxuICAgICAgICAgICAgICBmaWVsZHM6IGJsb2NrLmZpZWxkcyxcbiAgICAgICAgICAgICAgcm9vdFJlbGF0aW9uc1RvQnVpbGQsXG4gICAgICAgICAgICAgIHJvb3RSZWxhdGlvbnNoaXBzOiByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgICByb290VGFibGVJRENvbFR5cGUsXG4gICAgICAgICAgICAgIHJvb3RUYWJsZU5hbWUsXG4gICAgICAgICAgICAgIHRhYmxlTmFtZTogYmxvY2tUYWJsZU5hbWUsXG4gICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICBjb25zdCBibG9ja1RhYmxlUmVsYXRpb25zID0gcmVsYXRpb25zKFxuICAgICAgICAgICAgICBhZGFwdGVyLnRhYmxlc1tibG9ja1RhYmxlTmFtZV0sXG4gICAgICAgICAgICAgICh7IG1hbnksIG9uZSB9KSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgcmVzdWx0OiBSZWNvcmQ8c3RyaW5nLCBSZWxhdGlvbjxzdHJpbmc+PiA9IHtcbiAgICAgICAgICAgICAgICAgIF9wYXJlbnRJRDogb25lKGFkYXB0ZXIudGFibGVzW3Jvb3RUYWJsZU5hbWVdLCB7XG4gICAgICAgICAgICAgICAgICAgIGZpZWxkczogW2FkYXB0ZXIudGFibGVzW2Jsb2NrVGFibGVOYW1lXS5fcGFyZW50SURdLFxuICAgICAgICAgICAgICAgICAgICByZWZlcmVuY2VzOiBbYWRhcHRlci50YWJsZXNbcm9vdFRhYmxlTmFtZV0uaWRdLFxuICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKGhhc0xvY2FsZXNUYWJsZShibG9jay5maWVsZHMpKSB7XG4gICAgICAgICAgICAgICAgICByZXN1bHQuX2xvY2FsZXMgPSBtYW55KGFkYXB0ZXIudGFibGVzW2Ake2Jsb2NrVGFibGVOYW1lfV9sb2NhbGVzYF0pXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgc3ViUmVsYXRpb25zVG9CdWlsZC5mb3JFYWNoKCh2YWwsIGtleSkgPT4ge1xuICAgICAgICAgICAgICAgICAgcmVzdWx0W2tleV0gPSBtYW55KGFkYXB0ZXIudGFibGVzW3ZhbF0pXG4gICAgICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHRcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIClcblxuICAgICAgICAgICAgYWRhcHRlci5yZWxhdGlvbnNbYHJlbGF0aW9uc18ke2Jsb2NrVGFibGVOYW1lfWBdID0gYmxvY2tUYWJsZVJlbGF0aW9uc1xuICAgICAgICAgIH0gZWxzZSBpZiAocHJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09ICdwcm9kdWN0aW9uJykge1xuICAgICAgICAgICAgdmFsaWRhdGVFeGlzdGluZ0Jsb2NrSXNJZGVudGljYWwoe1xuICAgICAgICAgICAgICBibG9jayxcbiAgICAgICAgICAgICAgbG9jYWxpemVkOiBmaWVsZC5sb2NhbGl6ZWQsXG4gICAgICAgICAgICAgIHJvb3RUYWJsZU5hbWUsXG4gICAgICAgICAgICAgIHRhYmxlOiBhZGFwdGVyLnRhYmxlc1tibG9ja1RhYmxlTmFtZV0sXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH1cblxuICAgICAgICAgIHJvb3RSZWxhdGlvbnNUb0J1aWxkLnNldChgX2Jsb2Nrc18ke2Jsb2NrLnNsdWd9YCwgYmxvY2tUYWJsZU5hbWUpXG4gICAgICAgIH0pXG5cbiAgICAgICAgYnJlYWtcbiAgICAgIH1cblxuICAgICAgY2FzZSAndGFiJzpcbiAgICAgIGNhc2UgJ2dyb3VwJzoge1xuICAgICAgICBpZiAoISgnbmFtZScgaW4gZmllbGQpKSB7XG4gICAgICAgICAgY29uc3Qge1xuICAgICAgICAgICAgaGFzTG9jYWxpemVkRmllbGQ6IGdyb3VwSGFzTG9jYWxpemVkRmllbGQsXG4gICAgICAgICAgICBoYXNMb2NhbGl6ZWRNYW55TnVtYmVyRmllbGQ6IGdyb3VwSGFzTG9jYWxpemVkTWFueU51bWJlckZpZWxkLFxuICAgICAgICAgICAgaGFzTG9jYWxpemVkUmVsYXRpb25zaGlwRmllbGQ6IGdyb3VwSGFzTG9jYWxpemVkUmVsYXRpb25zaGlwRmllbGQsXG4gICAgICAgICAgICBoYXNNYW55TnVtYmVyRmllbGQ6IGdyb3VwSGFzTWFueU51bWJlckZpZWxkLFxuICAgICAgICAgIH0gPSB0cmF2ZXJzZUZpZWxkcyh7XG4gICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgYnVpbGRSZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgY29sdW1uUHJlZml4LFxuICAgICAgICAgICAgY29sdW1ucyxcbiAgICAgICAgICAgIGRpc2FibGVVbmlxdWUsXG4gICAgICAgICAgICBmaWVsZFByZWZpeCxcbiAgICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgICAgZm9yY2VMb2NhbGl6ZWQsXG4gICAgICAgICAgICBpbmRleGVzLFxuICAgICAgICAg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wSGFzTWFueU51bWJlckZpZWxkKSBoYXNNYW55TnVtYmVyRmllbGQgPSB0cnVlXG4gICAgICAgIGlmIChncm91cEhhc0xvY2FsaXplZE1hbnlOdW1iZXJGaWVsZCkgaGFzTG9jYWxpemVkTWFueU51bWJlckZpZWxkID0gdHJ1ZVxuICAgICAgICBicmVha1xuICAgICAgfVxuXG4gICAgICBjYXNlICd0YWJzJzoge1xuICAgICAgICBjb25zdCB7XG4gICAgICAgICAgaGFzTG9jYWxpemVkRmllbGQ6IHRhYkhhc0xvY2FsaXplZEZpZWxkLFxuICAgICAgICAgIGhhc0xvY2FsaXplZE1hbnlOdW1iZXJGaWVsZDogdGFiSGFzTG9jYWxpemVkTWFueU51bWJlckZpZWxkLFxuICAgICAgICAgIGhhc0xvY2FsaXplZFJlbGF0aW9uc2hpcEZpZWxkOiB0YWJIYXNMb2NhbGl6ZWRSZWxhdGlvbnNoaXBGaWVsZCxcbiAgICAgICAgICBoYXNNYW55TnVtYmVyRmllbGQ6IHRhYkhhc01hbnlOdW1iZXJGaWVsZCxcbiAgICAgICAgfSA9IHRyYXZlcnNlRmllbGRzKHtcbiAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgIGJ1aWxkUmVsYXRpb25zaGlwcyxcbiAgICAgICAgICBjb2x1bW5QcmVmaXgsXG4gICAgICAgICAgY29sdW1ucyxcbiAgICAgICAgICBkaXNhYmxlVW5pcXVlLFxuICAgICAgICAgIGZpZWxkUHJlZml4LFxuICAgICAgICAgIGZpZWxkczogZmllbGQudGFicy5tYXAoKHRhYikgPT4gKHsgLi4udGFiLCB0eXBlOiAndGFiJyB9KSksXG4gICAgICAgICAgZm9yY2VMb2NhbGl6ZWQsXG4gICAgICAgICAgaW5kZXhlcyxcbiAgICAgICAgICBsb2NhbGVzQ29sdW1ucyxcbiAgICAgICAgICBsb2NhbGVzSW5kZXhlcyxcbiAgICAgICAgICBuZXdUYWJsZU5hbWUsXG4gICAgICAgICAgcGFyZW50VGFibGVOYW1lLFxuICAgICAgICAgIHJlbGF0aW9uc1RvQnVpbGQsXG4gICAgICAgICAgcmVsYXRpb25zaGlwcyxcbiAgICAgICAgICByb290UmVsYXRpb25zVG9CdWlsZCxcbiAgICAgICAgICByb290VGFibGVJRENvbFR5cGUsXG4gICAgICAgICAgcm9vdFRhYmxlTmFtZSxcbiAgICAgICAgfSlcblxuICAgICAgICBpZiAodGFiSGFzTG9jYWxpemVkRmllbGQpIGhhc0xvY2FsaXplZEZpZWxkID0gdHJ1ZVxuICAgICAgICBpZiAodGFiSGFzTG9jYWxpemVkUmVsYXRpb25zaGlwRmllbGQpIGhhc0xvY2FsaXplZFJlbGF0aW9uc2hpcEZpZWxkID0gdHJ1ZVxuICAgICAgICBpZiAodGFiSGFzTWFueU51bWJlckZpZWxkKSBoYXNNYW55TnVtYmVyRmllbGQgPSB0cnVlXG4gICAgICAgIGlmICh0YWJIYXNMb2NhbGl6ZWRNYW55TnVtYmVyRmllbGQpIGhhc0xvY2FsaXplZE1hbnlOdW1iZXJGaWVsZCA9IHRydWVcblxuICAgICAgICBicmVha1xuICAgICAgfVxuXG4gICAgICBjYXNlICdyb3cnOlxuICAgICAgY2FzZSAnY29sbGFwc2libGUnOiB7XG4gICAgICAgIGNvbnN0IHtcbiAgICAgICAgICBoYXNMb2NhbGl6ZWRGaWVsZDogcm93SGFzTG9jYWxpemVkRmllbGQsXG4gICAgICAgICAgaGFzTG9jYWxpemVkTWFueU51bWJlckZpZWxkOiByb3dIYXNMb2NhbGl6ZWRNYW55TnVtYmVyRmllbGQsXG4gICAgICAgICAgaGFzTG9jYWxpemVkUmVsYXRpb25zaGlwRmllbGQ6IHJvd0hhc0xvY2FsaXplZFJlbGF0aW9uc2hpcEZpZWxkLFxuICAgICAgICAgIGhhc01hbnlOdW1iZXJGaWVsZDogcm93SGFzTWFueU51bWJlckZpZWxkLFxuICAgICAgICB9ID0gdHJhdmVyc2VGaWVsZHMoe1xuICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICA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3BDO2dCQUVBLElBQUl4RyxNQUFNVyxTQUFTLElBQUl0QyxRQUFRbUMsT0FBTyxDQUFDQyxNQUFNLENBQUNDLFlBQVksRUFBRTtvQkFDMURsQixnQ0FBZ0M7Z0JBQ2xDO2dCQUNBO1lBRUY7Z0JBQ0U7UUFDSjtRQUVBLE1BQU1tSCxZQUFZM0csTUFBTTRHLEtBQUssSUFBSTVHLE1BQU00RyxLQUFLLENBQUNELFNBQVM7UUFFdEQsSUFBSXZHLFdBQVcsQ0FBQ0QsVUFBVSxJQUFJLGNBQWNILFNBQVNBLE1BQU02RyxRQUFRLElBQUksQ0FBQ0YsV0FBVztZQUNqRnZHLFdBQVcsQ0FBQ0QsVUFBVSxDQUFDbUMsT0FBTztRQUNoQztJQUNGO0lBRUEsT0FBTztRQUNML0M7UUFDQUc7UUFDQUY7UUFDQUM7SUFDRjtBQUNGIn0=
@@ -14,9 +14,9 @@ const _traverseFields = require("./traverseFields");
14
14
  const transform = ({ config, data, fields })=>{
15
15
  let relationships = {};
16
16
  let numbers = {};
17
- if ('_relationships' in data) {
18
- relationships = (0, _createRelationshipMap.createPathMap)(data._relationships);
19
- delete data._relationships;
17
+ if ('_rels' in data) {
18
+ relationships = (0, _createRelationshipMap.createPathMap)(data._rels);
19
+ delete data._rels;
20
20
  }
21
21
  if ('_numbers' in data) {
22
22
  numbers = (0, _createRelationshipMap.createPathMap)(data._numbers);
@@ -39,4 +39,4 @@ const transform = ({ config, data, fields })=>{
39
39
  return result;
40
40
  };
41
41
 
42
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vcmVhZC9pbmRleC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKiBlc2xpbnQtZGlzYWJsZSBuby1wYXJhbS1yZWFzc2lnbiAqL1xuaW1wb3J0IHR5cGUgeyBTYW5pdGl6ZWRDb25maWcgfSBmcm9tICdwYXlsb2FkL2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7SUFFQSxJQUFJLGNBQWNMLE1BQU07UUFDdEJHLFVBQVVDLElBQUFBLG9DQUFhLEVBQUNKLEtBQUtNLFFBQVE7UUFDckMsT0FBT04sS0FBS00sUUFBUTtJQUN0QjtJQUVBLE1BQU1DLFNBQVNDLElBQUFBLGdDQUFlLEVBQUNSO0lBRS9CLE1BQU1TLFNBQVNDLElBQUFBLDhCQUFjLEVBQUk7UUFDL0JIO1FBQ0FSO1FBQ0FZLFNBQVM7WUFDUEMsSUFBSVosS0FBS1ksRUFBRTtRQUNiO1FBQ0FDLGFBQWE7UUFDYlo7UUFDQUU7UUFDQVcsTUFBTTtRQUNOWjtRQUNBYSxPQUFPZjtJQUNUO0lBRUEsT0FBT1M7QUFDVCJ9
package/dist/types.d.ts CHANGED
@@ -6,9 +6,9 @@ import type { BaseDatabaseAdapter } from 'payload/database';
6
6
  import type { Pool, PoolConfig } from 'pg';
7
7
  export type DrizzleDB = NodePgDatabase<Record<string, unknown>>;
8
8
  export type Args = {
9
- client: PoolConfig;
10
9
  migrationDir?: string;
11
- migrationName?: string;
10
+ pool: PoolConfig;
11
+ push?: boolean;
12
12
  };
13
13
  export type GenericColumn = PgColumn<ColumnBaseConfig<ColumnDataType, string>, Record<string, unknown>>;
14
14
  export type GenericColumns = {
@@ -23,10 +23,12 @@ export type GenericTable = PgTableWithColumns<{
23
23
  export type GenericEnum = PgEnum<[string, ...string[]]>;
24
24
  export type GenericRelation = Relations<string, Record<string, Relation<string>>>;
25
25
  export type DrizzleTransaction = PgTransaction<NodePgQueryResultHKT, Record<string, unknown>, ExtractTablesWithRelations<Record<string, unknown>>>;
26
- export type PostgresAdapter = BaseDatabaseAdapter & Args & {
26
+ export type PostgresAdapter = BaseDatabaseAdapter & {
27
27
  drizzle: DrizzleDB;
28
28
  enums: Record<string, GenericEnum>;
29
29
  pool: Pool;
30
+ poolOptions: Args['pool'];
31
+ push: boolean;
30
32
  relations: Record<string, GenericRelation>;
31
33
  schema: Record<string, GenericEnum | GenericRelation | GenericTable>;
32
34
  sessions: {
@@ -48,10 +50,11 @@ export type MigrateDownArgs = {
48
50
  payload: Payload;
49
51
  };
50
52
  declare module 'payload' {
51
- interface DatabaseAdapter extends Args {
53
+ interface DatabaseAdapter extends Omit<Args, 'pool'> {
52
54
  drizzle: DrizzleDB;
53
55
  enums: Record<string, GenericEnum>;
54
56
  pool: Pool;
57
+ push: boolean;
55
58
  relations: Record<string, GenericRelation>;
56
59
  schema: Record<string, GenericEnum | GenericRelation | GenericTable>;
57
60
  sessions: {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,0BAA0B,EAC1B,QAAQ,EACR,SAAS,EACV,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AACrF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAC3D,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,IAAI,CAAA;AAE1C,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;AAE/D,MAAM,MAAM,IAAI,GAAG;IACjB,MAAM,EAAE,UAAU,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,QAAQ,CAClC,gBAAgB,CAAC,cAAc,EAAE,MAAM,CAAC,EACxC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CACxB,CAAA;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CAAC,EAAE,EAAE,MAAM,GAAG;gBACZ,EAAE,EAAE,kBAAkB,CAAA;gBACtB,MAAM,EAAE,MAAM,IAAI,CAAA;gBAClB,OAAO,EAAE,MAAM,IAAI,CAAA;aACpB,CAAA;SACF,CAAA;QACD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;KACrC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../src/update.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AASjD,eAAO,MAAM,SAAS,EAAE,SA6BvB,CAAA"}
1
+ {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../src/update.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAWjD,eAAO,MAAM,SAAS,EAAE,SAkEvB,CAAA"}
package/dist/update.js CHANGED
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "updateOne", {
9
9
  }
10
10
  });
11
11
  const _tosnakecase = /*#__PURE__*/ _interop_require_default(require("to-snake-case"));
12
+ const _chainMethods = require("./find/chainMethods");
12
13
  const _buildQuery = /*#__PURE__*/ _interop_require_default(require("./queries/buildQuery"));
13
14
  const _upsertRow = require("./upsertRow");
14
15
  function _interop_require_default(obj) {
@@ -25,24 +26,69 @@ const updateOne = async function updateOne({ id, collection: collectionSlug, dat
25
26
  equals: id
26
27
  }
27
28
  };
28
- const { where } = await (0, _buildQuery.default)({
29
+ const { joinAliases, joins, selectFields, where } = await (0, _buildQuery.default)({
29
30
  adapter: this,
30
31
  fields: collection.fields,
31
32
  locale,
32
33
  tableName,
33
34
  where: whereToUse
34
35
  });
36
+ let idToUpdate = id;
37
+ // only fetch IDs when a sort or where query is used that needs to be done on join tables, otherwise these can be done directly on the table in findMany
38
+ if (Object.keys(joins).length > 0 || joinAliases.length > 0) {
39
+ const selectDistinctMethods = [];
40
+ if (where) {
41
+ selectDistinctMethods.push({
42
+ args: [
43
+ where
44
+ ],
45
+ method: 'where'
46
+ });
47
+ }
48
+ joinAliases.forEach(({ condition, table })=>{
49
+ selectDistinctMethods.push({
50
+ args: [
51
+ table,
52
+ condition
53
+ ],
54
+ method: 'leftJoin'
55
+ });
56
+ });
57
+ Object.entries(joins).forEach(([joinTable, condition])=>{
58
+ if (joinTable) {
59
+ selectDistinctMethods.push({
60
+ args: [
61
+ this.tables[joinTable],
62
+ condition
63
+ ],
64
+ method: 'leftJoin'
65
+ });
66
+ }
67
+ });
68
+ selectDistinctMethods.push({
69
+ args: [
70
+ 1
71
+ ],
72
+ method: 'limit'
73
+ });
74
+ const selectDistinctResult = await (0, _chainMethods.chainMethods)({
75
+ methods: selectDistinctMethods,
76
+ query: db.selectDistinct(selectFields).from(this.tables[tableName])
77
+ });
78
+ if (selectDistinctResult?.[0]?.id) {
79
+ idToUpdate = selectDistinctResult?.[0]?.id;
80
+ }
81
+ }
35
82
  const result = await (0, _upsertRow.upsertRow)({
36
- id,
83
+ id: idToUpdate,
37
84
  adapter: this,
38
85
  data,
39
86
  db,
40
87
  fields: collection.fields,
41
88
  operation: 'update',
42
- tableName: (0, _tosnakecase.default)(collectionSlug),
43
- where
89
+ tableName: (0, _tosnakecase.default)(collectionSlug)
44
90
  });
45
91
  return result;
46
92
  };
47
93
 
48
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy91cGRhdGUudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBVcGRhdGVPbmUgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuXG5pbXBvcnQgdG9TbmFrZUNhc2UgZnJvbSAndG8tc25ha2UtY2FzZSdcblxuaW1wb3J0IHR5cGUgeyBQb3N0Z3Jlc0FkYXB0ZXIgfSBmcm9tICcuL3R5cGVzJ1xuXG5pbXBvcnQgYnVpbGRRdWVyeSB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1FBQ0pGLFNBQVMsSUFBSTtRQUNickI7UUFDQU07UUFDQWdCLFFBQVF4QixXQUFXd0IsTUFBTTtRQUN6QnVCLFdBQVc7UUFDWGhDLFdBQVdDLElBQUFBLG9CQUFXLEVBQUNmO0lBQ3pCO0lBRUEsT0FBTzRDO0FBQ1QifQ==
@@ -104,7 +104,7 @@ const upsertRow = async ({ id, adapter, data, db, fields, operation, path = '',
104
104
  // //////////////////////////////////
105
105
  // INSERT RELATIONSHIPS
106
106
  // //////////////////////////////////
107
- const relationshipsTableName = `${tableName}_relationships`;
107
+ const relationshipsTableName = `${tableName}_rels`;
108
108
  if (operation === 'update') {
109
109
  await (0, _deleteExistingRowsByPath.deleteExistingRowsByPath)({
110
110
  adapter,
@@ -240,4 +240,4 @@ const upsertRow = async ({ id, adapter, data, db, fields, operation, path = '',
240
240
  return result;
241
241
  };
242
242
 
243
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91cHNlcnRSb3cvaW5kZXgudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcGFyYW0tcmVhc3NpZ24gKi9cbmltcG9ydCB0eXBlIHsgVHlwZVdpdGhJRCB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmltcG9ydCB7IGVxIH0gZnJvbSAnZHJpenpsZS1vcm0nXG5cbmltcG9ydCB0eXBlIHsgQmxvY2tSb3dUb0luc2VydCB9IGZyb20gJy4uL3RyYW5zZm9ybS93cml0ZS90eXBlcydcbmltcG9ydCB0eXBlIHsgQXJncyB9IGZyb20gJy4vdHlwZXMnXG5cbmltcG9ydCB7IGJ1aWxkRmluZE1hbnlBcmdzIH0gZnJvbSAnLi4vZmluZC9idWlsZEZpbmRNYW55QXJncydcbmltcG9ydCB7IHRyYW5zZm9ybSB9IGZyb20gJy4uL3RyYW5zZm9ybS9yZWFkJ1xuaW1wb3J0IHsgdHJhbnNmb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XFDO0lBRXJDLE1BQU15RCxlQUFlQyxJQUFBQSxvQ0FBaUIsRUFBQztRQUNyQzdFO1FBQ0E4RSxPQUFPO1FBQ1AzRTtRQUNBRztJQUNGO0lBRUFzRSxhQUFhcEUsS0FBSyxHQUFHeUMsSUFBQUEsY0FBRSxFQUFDakQsUUFBUWEsTUFBTSxDQUFDUCxVQUFVLENBQUNQLEVBQUUsRUFBRVksWUFBWVosRUFBRTtJQUVwRSxNQUFNZ0YsTUFBTSxNQUFNN0UsR0FBRzhFLEtBQUssQ0FBQzFFLFVBQVUsQ0FBQzJFLFNBQVMsQ0FBQ0w7SUFFaEQscUNBQXFDO0lBQ3JDLGlCQUFpQjtJQUNqQixxQ0FBcUM7SUFFckMsTUFBTU0sU0FBU0MsSUFBQUEsZUFBUyxFQUFJO1FBQzFCQyxRQUFRcEYsUUFBUXFGLE9BQU8sQ0FBQ0QsTUFBTTtRQUM5Qm5GLE1BQU04RTtRQUNONUU7SUFDRjtJQUVBLE9BQU8rRTtBQUNUIn0=
@@ -1 +1 @@
1
- {"version":3,"file":"createMigrationTable.d.ts","sourceRoot":"","sources":["../../src/utilities/createMigrationTable.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEzC,eAAO,MAAM,oBAAoB,qBAA0B,QAAQ,IAAI,CAStE,CAAA"}
1
+ {"version":3,"file":"createMigrationTable.d.ts","sourceRoot":"","sources":["../../src/utilities/createMigrationTable.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEzC,eAAO,MAAM,oBAAoB,qBAA0B,QAAQ,IAAI,CAQtE,CAAA"}
@@ -14,10 +14,9 @@ const createMigrationTable = async (db)=>{
14
14
  "id" serial PRIMARY KEY NOT NULL,
15
15
  "name" varchar,
16
16
  "batch" numeric,
17
- "schema" jsonb,
18
17
  "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL,
19
18
  "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL
20
19
  );`);
21
20
  };
22
21
 
23
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsaXRpZXMvY3JlYXRlTWlncmF0aW9uVGFibGUudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgc3FsIH0gZnJvbSAnZHJpenpsZS1vcm0nXG5cbmltcG9ydCB0eXBlIHsgRHJpenpsZURCIH0gZnJvbSAnLi4vdHlwZXMnXG5cbmV4cG9ydCBjb25zdCBjcmVhdGVNaWdyYXRpb25UYWJsZSA9IGFzeW5jIChkYjogRHJpenpsZURCKTogUHJvbWlzZTx2b2lkPiA9PiB7XG4gIGF3YWl0IGRiLmV4ZWN1dGUoc3FsYENSRUFURSBUQUJMRSBJRiBOT1QgRVhJU1RTIFwicGF5bG9hZF9taWdyYXRpb25zXCIgKFxuICBcImlkXCIgc2VyaWFsIFBSSU1BUlkgS0VZIE5PVCBOVUxMLFxuICBcIm5hbWVcIiB2YXJjaGFyLFxuICBcImJhdGNoXCIgbnVtZXJpYyxcbiAgXCJzY2hlbWFcIiBqc29uYixcbiAgXCJ1cGRhdGVkX2F0XCIgdGltZXN0YW1wKDMpIHdpdGggdGltZSB6b25lIERFRkFVTFQgbm93KCkgTk9UIE5VTEwsXG4gIFwiY3JlYXRlZF9hdFwiIHRpbWVzdGFtcCgzKSB3aXRoIHRpbWUgem9uZSBERUZBVUxUIG5vdygpIE5PVCBOVUxMXG4pO2ApXG59XG4iXSwibmFtZXMiOlsiY3JlYXRlTWlncmF0aW9uVGFibGUiLCJkYiIsImV4ZWN1dGUiLCJzcWwiXSwibWFwcGluZ3MiOiI7Ozs7K0JBSWFBOzs7ZUFBQUE7Ozs0QkFKTztBQUliLE1BQU1BLHVCQUF1QixPQUFPQztJQUN6QyxNQUFNQSxHQUFHQyxPQUFPLENBQUNDLElBQUFBLGVBQUcsQ0FBQSxDQU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0,0 +1,5 @@
1
+ /**
2
+ * Format error message with hint if available
3
+ */
4
+ export declare const parseError: (err: unknown, msg: string) => string;
5
+ //# sourceMappingURL=parseError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseError.d.ts","sourceRoot":"","sources":["../../src/utilities/parseError.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,UAAU,QAAS,OAAO,OAAO,MAAM,KAAG,MAUtD,CAAA"}