@payloadcms/db-postgres 0.7.1 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. package/dist/connect.js +1 -1
  2. package/dist/create.d.ts.map +1 -1
  3. package/dist/create.js +7 -9
  4. package/dist/createGlobal.d.ts +1 -1
  5. package/dist/createGlobal.d.ts.map +1 -1
  6. package/dist/createGlobal.js +8 -10
  7. package/dist/createGlobalVersion.d.ts +1 -1
  8. package/dist/createGlobalVersion.d.ts.map +1 -1
  9. package/dist/createGlobalVersion.js +12 -14
  10. package/dist/createMigration.js +1 -1
  11. package/dist/createVersion.d.ts.map +1 -1
  12. package/dist/createVersion.js +22 -19
  13. package/dist/deleteMany.js +6 -8
  14. package/dist/deleteOne.d.ts.map +1 -1
  15. package/dist/deleteOne.js +6 -3
  16. package/dist/deleteVersions.d.ts.map +1 -1
  17. package/dist/deleteVersions.js +7 -8
  18. package/dist/destroy.js +1 -1
  19. package/dist/find/buildFindManyArgs.js +3 -3
  20. package/dist/find/chainMethods.js +1 -1
  21. package/dist/find/findMany.js +2 -2
  22. package/dist/find/traverseFields.d.ts.map +1 -1
  23. package/dist/find/traverseFields.js +23 -11
  24. package/dist/find.d.ts.map +1 -1
  25. package/dist/find.js +10 -11
  26. package/dist/findGlobal.d.ts.map +1 -1
  27. package/dist/findGlobal.js +7 -9
  28. package/dist/findGlobalVersions.d.ts.map +1 -1
  29. package/dist/findGlobalVersions.js +7 -8
  30. package/dist/findOne.d.ts +1 -1
  31. package/dist/findOne.d.ts.map +1 -1
  32. package/dist/findOne.js +9 -10
  33. package/dist/findVersions.d.ts.map +1 -1
  34. package/dist/findVersions.js +7 -8
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +5 -1
  37. package/dist/init.d.ts.map +1 -1
  38. package/dist/init.js +28 -15
  39. package/dist/migrate.js +1 -1
  40. package/dist/migrateDown.js +1 -1
  41. package/dist/migrateFresh.js +1 -1
  42. package/dist/migrateRefresh.js +1 -1
  43. package/dist/migrateReset.js +1 -1
  44. package/dist/migrateStatus.js +1 -1
  45. package/dist/queries/buildAndOrConditions.js +1 -1
  46. package/dist/queries/buildQuery.js +1 -1
  47. package/dist/queries/createJSONQuery/convertPathToJSONTraversal.js +1 -1
  48. package/dist/queries/createJSONQuery/formatJSONPathSegment.js +1 -1
  49. package/dist/queries/createJSONQuery/index.js +1 -1
  50. package/dist/queries/getTableColumnFromPath.d.ts.map +1 -1
  51. package/dist/queries/getTableColumnFromPath.js +148 -42
  52. package/dist/queries/operatorMap.js +1 -1
  53. package/dist/queries/parseParams.js +1 -1
  54. package/dist/queries/sanitizeQueryValue.d.ts.map +1 -1
  55. package/dist/queries/sanitizeQueryValue.js +5 -2
  56. package/dist/queries/selectDistinct.js +1 -1
  57. package/dist/queryDrafts.d.ts.map +1 -1
  58. package/dist/queryDrafts.js +7 -8
  59. package/dist/schema/build.d.ts +2 -1
  60. package/dist/schema/build.d.ts.map +1 -1
  61. package/dist/schema/build.js +19 -14
  62. package/dist/schema/createIndex.js +1 -1
  63. package/dist/schema/getTableName.d.ts +32 -0
  64. package/dist/schema/getTableName.d.ts.map +1 -0
  65. package/dist/schema/getTableName.js +43 -0
  66. package/dist/schema/idToUUID.js +1 -1
  67. package/dist/schema/parentIDColumnMap.js +1 -1
  68. package/dist/schema/setColumnID.js +1 -1
  69. package/dist/schema/traverseFields.d.ts +2 -1
  70. package/dist/schema/traverseFields.d.ts.map +1 -1
  71. package/dist/schema/traverseFields.js +55 -17
  72. package/dist/schema/validateExistingBlockIsIdentical.d.ts +2 -1
  73. package/dist/schema/validateExistingBlockIsIdentical.d.ts.map +1 -1
  74. package/dist/schema/validateExistingBlockIsIdentical.js +12 -6
  75. package/dist/transactions/beginTransaction.js +1 -1
  76. package/dist/transactions/commitTransaction.js +1 -1
  77. package/dist/transactions/rollbackTransaction.js +1 -1
  78. package/dist/transform/read/hasManyNumber.js +1 -1
  79. package/dist/transform/read/hasManyText.js +1 -1
  80. package/dist/transform/read/index.js +1 -1
  81. package/dist/transform/read/relationship.js +1 -1
  82. package/dist/transform/read/traverseFields.js +1 -1
  83. package/dist/transform/write/array.js +1 -1
  84. package/dist/transform/write/blocks.d.ts +2 -2
  85. package/dist/transform/write/blocks.d.ts.map +1 -1
  86. package/dist/transform/write/blocks.js +4 -4
  87. package/dist/transform/write/index.js +1 -1
  88. package/dist/transform/write/numbers.js +1 -1
  89. package/dist/transform/write/relationships.js +1 -1
  90. package/dist/transform/write/selects.js +1 -1
  91. package/dist/transform/write/texts.js +1 -1
  92. package/dist/transform/write/traverseFields.d.ts +2 -2
  93. package/dist/transform/write/traverseFields.d.ts.map +1 -1
  94. package/dist/transform/write/traverseFields.js +34 -25
  95. package/dist/transform/write/types.js +1 -1
  96. package/dist/types.d.ts +13 -0
  97. package/dist/types.d.ts.map +1 -1
  98. package/dist/types.js +1 -1
  99. package/dist/update.d.ts.map +1 -1
  100. package/dist/update.js +7 -4
  101. package/dist/updateGlobal.d.ts +1 -1
  102. package/dist/updateGlobal.d.ts.map +1 -1
  103. package/dist/updateGlobal.js +9 -11
  104. package/dist/updateGlobalVersion.d.ts.map +1 -1
  105. package/dist/updateGlobalVersion.js +9 -5
  106. package/dist/updateVersion.d.ts.map +1 -1
  107. package/dist/updateVersion.js +9 -5
  108. package/dist/upsertRow/deleteExistingArrayRows.js +1 -1
  109. package/dist/upsertRow/deleteExistingRowsByPath.js +1 -1
  110. package/dist/upsertRow/index.d.ts.map +1 -1
  111. package/dist/upsertRow/index.js +7 -6
  112. package/dist/upsertRow/insertArrays.d.ts.map +1 -1
  113. package/dist/upsertRow/insertArrays.js +3 -3
  114. package/dist/upsertRow/types.d.ts +1 -1
  115. package/dist/upsertRow/types.d.ts.map +1 -1
  116. package/dist/upsertRow/types.js +1 -1
  117. package/dist/utilities/appendPrefixToKeys.js +1 -1
  118. package/dist/utilities/createBlocksMap.js +1 -1
  119. package/dist/utilities/createMigrationTable.js +1 -1
  120. package/dist/utilities/createRelationshipMap.js +1 -1
  121. package/dist/utilities/hasLocalesTable.js +1 -1
  122. package/dist/utilities/isArrayOfRows.js +1 -1
  123. package/dist/utilities/migrationTableExists.js +1 -1
  124. package/dist/utilities/parseError.js +1 -1
  125. package/package.json +2 -2
@@ -46,4 +46,4 @@ const selectDistinct = ({ adapter, chainedMethods = [], db, joinAliases, joins,
46
46
  }
47
47
  };
48
48
 
49
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9xdWVyaWVzL3NlbGVjdERpc3RpbmN0LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgUXVlcnlQcm9taXNlLCBTUUwgfSBmcm9tICdkcml6emxlLW9ybSdcblxuaW1wb3J0IHR5cGUgeyBDaGFpbmVkTWV0aG9kcyB9IGZyb20gJy4uL2ZpbmQvY2hhaW5NZXRob2RzJ1xuaW1wb3J0IHR5cGUgeyBEcml6emxlREIsIFBvc3RncmVzQWRhcHRlciB9IGZyb20gJy4uL3R5cGVzJ1xuaW1wb3J0IHR5cGUgeyBCdWlsZFF1ZXJ5Sm9pbkFsaWFzZXMsIEJ1aWxkUXVlcnlKb2lucyB9IGZyb20gJy4vYnVpbGRRdWVyeSdcblxuaW1wb3J0IHsgY2hhaW5NZXRob2RzIH0gZnJvbSAnLi4vZmluZC9jaGFpbk1ldGhvZHMnXG5pbXBvcnQgeyB0eXBlIEdlbmVyaWNDb2x1bW4gfSBmcm9tICcuLi90eXBlcydcblxudHlwZSBBcmdzID0ge1xuICBhZGFwdGVyOiBQb3N0Z3Jlc0FkYXB0ZXJcbiAgY2hhaW5lZE1ldGhvZHM/OiBDaGFpbmVkTWV0aG9kc1xuICBkYjogRHJpenpsZURCXG4gIGpvaW5BbGlhc2VzOiBCdWlsZFF1ZXJ5Sm9pbkFsaWFzZXNcbiAgam9pbnM6IEJ1aWxkUXVlcnlKb2luc1xuICBzZWxlY3RGaWVsZHM6IFJlY29yZDxzdHJpbmcsIEdlbmVyaWNDb2x1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FDSSxXQUFXSCxVQUFVO1lBQ25ELElBQUlHLFdBQVc7Z0JBQ2JqQixlQUFlVSxJQUFJLENBQUM7b0JBQ2xCQyxNQUFNO3dCQUFDWixRQUFRbUIsTUFBTSxDQUFDRCxVQUFVO3dCQUFFSDtxQkFBVTtvQkFDNUNGLFFBQVE7Z0JBQ1Y7WUFDRjtRQUNGO1FBRUEsT0FBT08sSUFBQUEsMEJBQVksRUFBQztZQUNsQkMsU0FBU3BCO1lBQ1RxQixPQUFPcEIsR0FBR0gsY0FBYyxDQUFDTSxjQUFja0IsSUFBSSxDQUFDdkIsUUFBUW1CLE1BQU0sQ0FBQ2IsVUFBVTtRQUN2RTtJQUNGO0FBQ0YifQ==
@@ -1 +1 @@
1
- {"version":3,"file":"queryDrafts.d.ts","sourceRoot":"","sources":["../src/queryDrafts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,WAAW,EAAkB,MAAM,kBAAkB,CAAA;AAMnE,eAAO,MAAM,WAAW,EAAE,WA2CzB,CAAA"}
1
+ {"version":3,"file":"queryDrafts.d.ts","sourceRoot":"","sources":["../src/queryDrafts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,WAAW,EAAkB,MAAM,kBAAkB,CAAA;AAMnE,eAAO,MAAM,WAAW,EAAE,WA+CzB,CAAA"}
@@ -10,16 +10,15 @@ Object.defineProperty(exports, "queryDrafts", {
10
10
  });
11
11
  const _database = require("payload/database");
12
12
  const _versions = require("payload/versions");
13
- const _tosnakecase = /*#__PURE__*/ _interop_require_default(require("to-snake-case"));
14
13
  const _findMany = require("./find/findMany");
15
- function _interop_require_default(obj) {
16
- return obj && obj.__esModule ? obj : {
17
- default: obj
18
- };
19
- }
14
+ const _getTableName = require("./schema/getTableName");
20
15
  const queryDrafts = async function queryDrafts({ collection, limit, locale, page = 1, pagination, req = {}, sort, where }) {
21
16
  const collectionConfig = this.payload.collections[collection].config;
22
- const tableName = `_${(0, _tosnakecase.default)(collection)}_v`;
17
+ const tableName = (0, _getTableName.getTableName)({
18
+ adapter: this,
19
+ config: collectionConfig,
20
+ versions: true
21
+ });
23
22
  const fields = (0, _versions.buildVersionCollectionFields)(collectionConfig);
24
23
  const combinedWhere = (0, _database.combineQueries)({
25
24
  latest: {
@@ -53,4 +52,4 @@ const queryDrafts = async function queryDrafts({ collection, limit, locale, page
53
52
  };
54
53
  };
55
54
 
56
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9xdWVyeURyYWZ0cy50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7IFBheWxvYWRSZXF1ZXN0LCBTYW5pdGl6ZWRDb2xsZWN0aW9uQ29uZmlnIH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxuaW1wb3J0IHsgdHlwZSBRdWVyeURyYWZ0cywgY29tYmluZVF1ZXJpZXMgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuaW1wb3J0IHsgYnVpbGRWZXJzaW9uQ29sbGVjdGlvbkZpZWxkcyB9IGZyb20gJ3BheWxvYWQvdmVyc2lvbnMnXG5pbXBvcnQgdG9TbmFrZUNhc2UgZnJvbSAndG8tc25ha2UtY2FzZSdcblxuaW1wb3J0IHsgZmluZE1hbnkgfSBmcm9tICcuL2ZpbmQvZmluZE1hbnknXG5cbmV4cG9ydCBjb25zdCBxdWVyeURyYWZ0czogUXVlcnlEcmFmdHMgPSBhc3luYyBmdW5jdGlvbiBxdWVyeURyYWZ0cyh7XG4gIGNvbGxlY3Rpb24sXG4gIGxpbWl0LFxuICBsb2NhbGUsXG4gIHBhZ2UgPSAxLFxuICBwYWdpbmF0aW9uLFxuICByZXEgPSB7fSBhcyBQYXlsb2FkUmVxdWVzdCxcbiAgc29ydCxcbiAgd2hlcmUsXG59KSB7XG4gIGNvbnN0IGNvbGxlY3Rpb25Db25maWc6IFNhbml0aXplZENvbGxlY3Rpb25Db25maWcgPSB0aGlzLnB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lBQ0MsTUFBTUMsbUJBQThDLElBQUksQ0FBQ0MsT0FBTyxDQUFDQyxXQUFXLENBQUNWLFdBQVcsQ0FBQ1csTUFBTTtJQUMvRixNQUFNQyxZQUFZQyxJQUFBQSwwQkFBWSxFQUFDO1FBQzdCQyxTQUFTLElBQUk7UUFDYkgsUUFBUUg7UUFDUk8sVUFBVTtJQUNaO0lBQ0EsTUFBTUMsU0FBU0MsSUFBQUEsc0NBQTRCLEVBQUNUO0lBRTVDLE1BQU1VLGdCQUFnQkMsSUFBQUEsd0JBQWMsRUFBQztRQUFFQyxRQUFRO1lBQUVDLFFBQVE7UUFBSztJQUFFLEdBQUdkO0lBRW5FLE1BQU1lLFNBQVMsTUFBTUMsSUFBQUEsa0JBQVEsRUFBQztRQUM1QlQsU0FBUyxJQUFJO1FBQ2JFO1FBQ0FmO1FBQ0FDO1FBQ0FDO1FBQ0FDO1FBQ0FDO1FBQ0FDO1FBQ0FNO1FBQ0FMLE9BQU9XO0lBQ1Q7SUFFQSxPQUFPO1FBQ0wsR0FBR0ksTUFBTTtRQUNURSxNQUFNRixPQUFPRSxJQUFJLENBQUNDLEdBQUcsQ0FBQyxDQUFDQztZQUNyQiw2Q0FBNkM7WUFDN0NBLE1BQU07Z0JBQ0pDLElBQUlELElBQUlFLE1BQU07Z0JBQ2QsR0FBR0YsSUFBSUcsT0FBTztnQkFDZEMsV0FBV0osSUFBSUksU0FBUztnQkFDeEJDLFdBQVdMLElBQUlLLFNBQVM7WUFDMUI7WUFFQSxPQUFPTDtRQUNUO0lBQ0Y7QUFDRiJ9
@@ -17,12 +17,13 @@ type Args = {
17
17
  rootTableName?: string;
18
18
  tableName: string;
19
19
  timestamps?: boolean;
20
+ versions: boolean;
20
21
  };
21
22
  type Result = {
22
23
  hasManyNumberField: 'index' | boolean;
23
24
  hasManyTextField: 'index' | boolean;
24
25
  relationsToBuild: Map<string, string>;
25
26
  };
26
- export declare const buildTable: ({ adapter, baseColumns, baseExtraConfig, buildNumbers, buildRelationships, buildTexts, disableNotNull, disableUnique, fields, rootRelationsToBuild, rootRelationships, rootTableIDColType, rootTableName: incomingRootTableName, tableName, timestamps, }: Args) => Result;
27
+ export declare const buildTable: ({ adapter, baseColumns, baseExtraConfig, buildNumbers, buildRelationships, buildTexts, disableNotNull, disableUnique, fields, rootRelationsToBuild, rootRelationships, rootTableIDColType, rootTableName: incomingRootTableName, tableName, timestamps, versions, }: Args) => Result;
27
28
  export {};
28
29
  //# sourceMappingURL=build.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/schema/build.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EAEf,uBAAuB,EACxB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAO1C,OAAO,KAAK,EAAE,cAAc,EAAwB,eAAe,EAAE,MAAM,UAAU,CAAA;AAMrF,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;IAC7C,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,YAAY,GAAG,uBAAuB,CAAC,CAAA;IAClG,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,cAAc,EAAE,OAAO,CAAA;IACvB,aAAa,EAAE,OAAO,CAAA;IACtB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,oBAAoB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC1C,iBAAiB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,aAAa,CAAC,EAAE,MAA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,EAAE,MAAM,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,QAAQ,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,KAAK,MAAM,GAAG;IACZ,kBAAkB,EAAE,OAAO,GAAG,OAAO,CAAA;IACrC,gBAAgB,EAAE,OAAO,GAAG,OAAO,CAAA;IACnC,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACtC,CAAA;AAED,eAAO,MAAM,UAAU,wQAiBpB,IAAI,KAAG,MAyUT,CAAA"}
@@ -11,16 +11,11 @@ Object.defineProperty(exports, "buildTable", {
11
11
  const _drizzleorm = require("drizzle-orm");
12
12
  const _pgcore = require("drizzle-orm/pg-core");
13
13
  const _types = require("payload/types");
14
- const _tosnakecase = /*#__PURE__*/ _interop_require_default(require("to-snake-case"));
14
+ const _getTableName = require("./getTableName");
15
15
  const _parentIDColumnMap = require("./parentIDColumnMap");
16
16
  const _setColumnID = require("./setColumnID");
17
17
  const _traverseFields = require("./traverseFields");
18
- function _interop_require_default(obj) {
19
- return obj && obj.__esModule ? obj : {
20
- default: obj
21
- };
22
- }
23
- const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildNumbers, buildRelationships, buildTexts, disableNotNull, disableUnique = false, fields, rootRelationsToBuild, rootRelationships, rootTableIDColType, rootTableName: incomingRootTableName, tableName, timestamps })=>{
18
+ const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildNumbers, buildRelationships, buildTexts, disableNotNull, disableUnique = false, fields, rootRelationsToBuild, rootRelationships, rootTableIDColType, rootTableName: incomingRootTableName, tableName, timestamps, versions })=>{
24
19
  const rootTableName = incomingRootTableName || tableName;
25
20
  const columns = baseColumns;
26
21
  const indexes = {};
@@ -63,7 +58,8 @@ const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildNumb
63
58
  relationships,
64
59
  rootRelationsToBuild: rootRelationsToBuild || relationsToBuild,
65
60
  rootTableIDColType: rootTableIDColType || idColType,
66
- rootTableName
61
+ rootTableName,
62
+ versions
67
63
  }));
68
64
  if (timestamps) {
69
65
  columns.createdAt = (0, _pgcore.timestamp)('created_at', {
@@ -89,7 +85,7 @@ const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildNumb
89
85
  });
90
86
  adapter.tables[tableName] = table;
91
87
  if (hasLocalizedField) {
92
- const localeTableName = `${tableName}_locales`;
88
+ const localeTableName = `${tableName}${adapter.localesSuffix}`;
93
89
  localesColumns.id = (0, _pgcore.serial)('id').primaryKey();
94
90
  localesColumns._locale = adapter.enums.enum__locales('_locale').notNull();
95
91
  localesColumns._parentID = _parentIDColumnMap.parentIDColumnMap[idColType]('_parent_id').references(()=>table.id, {
@@ -208,16 +204,21 @@ const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildNumb
208
204
  relationshipColumns.locale = adapter.enums.enum__locales('locale');
209
205
  }
210
206
  relationships.forEach((relationTo)=>{
211
- const formattedRelationTo = (0, _tosnakecase.default)(relationTo);
207
+ const relationshipConfig = adapter.payload.collections[relationTo].config;
208
+ const formattedRelationTo = (0, _getTableName.getTableName)({
209
+ adapter,
210
+ config: relationshipConfig,
211
+ throwValidationError: true
212
+ });
212
213
  let colType = adapter.idType === 'uuid' ? 'uuid' : 'integer';
213
- const relatedCollectionCustomID = adapter.payload.collections[relationTo].config.fields.find((field)=>(0, _types.fieldAffectsData)(field) && field.name === 'id');
214
+ const relatedCollectionCustomID = relationshipConfig.fields.find((field)=>(0, _types.fieldAffectsData)(field) && field.name === 'id');
214
215
  if (relatedCollectionCustomID?.type === 'number') colType = 'numeric';
215
216
  if (relatedCollectionCustomID?.type === 'text') colType = 'varchar';
216
217
  relationshipColumns[`${relationTo}ID`] = _parentIDColumnMap.parentIDColumnMap[colType](`${formattedRelationTo}_id`).references(()=>adapter.tables[formattedRelationTo].id, {
217
218
  onDelete: 'cascade'
218
219
  });
219
220
  });
220
- const relationshipsTableName = `${tableName}_rels`;
221
+ const relationshipsTableName = `${tableName}${adapter.relationshipsSuffix}`;
221
222
  relationshipsTable = adapter.pgSchema.table(relationshipsTableName, relationshipColumns, (cols)=>{
222
223
  const result = {
223
224
  order: (0, _pgcore.index)(`${relationshipsTableName}_order_idx`).on(cols.order),
@@ -243,7 +244,11 @@ const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildNumb
243
244
  })
244
245
  };
245
246
  relationships.forEach((relationTo)=>{
246
- const relatedTableName = (0, _tosnakecase.default)(relationTo);
247
+ const relatedTableName = (0, _getTableName.getTableName)({
248
+ adapter,
249
+ config: adapter.payload.collections[relationTo].config,
250
+ throwValidationError: true
251
+ });
247
252
  const idColumnName = `${relationTo}ID`;
248
253
  result[idColumnName] = one(adapter.tables[relatedTableName], {
249
254
  fields: [
@@ -288,4 +293,4 @@ const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildNumb
288
293
  };
289
294
  };
290
295
 
291
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zY2hlbWEvYnVpbGQudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcGFyYW0tcmVhc3NpZ24gKi9cbmltcG9ydCB0eXBlIHsgUmVsYXRpb24gfSBmcm9tICdkcml6emxlLW9ybSdcbmltcG9ydCB0eXBlIHtcbiAgSW5kZXhCdWlsZGVyLFxuICBQZ0NvbHVtbkJ1aWxkZXIsXG4gIFBnVGFibGVXaXRoQ29sdW1ucyxcbiAgVW5pcXVlQ29uc3RyYWludEJ1aWxkZXIsXG59IGZyb20gJ2RyaXp6bGUtb3JtL3BnLWNvcmUnXG5pbXBvcnQgdHlwZSB7IEZpZWxkIH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxuaW1wb3J0IHsgcmVsYXRpb25zIH0gZnJvbSAnZHJpenpsZS1vcm0nXG5pbXBvcnQ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mxlTmFtZX1fcGFyZW50X2lkeGApLm9uKGNvbHMucGFyZW50KSxcbiAgICAgICAgICAgIHBhdGhJZHg6IGluZGV4KGAke3JlbGF0aW9uc2hpcHNUYWJsZU5hbWV9X3BhdGhfaWR4YCkub24oY29scy5wYXRoKSxcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoaGFzTG9jYWxpemVkUmVsYXRpb25zaGlwRmllbGQpIHtcbiAgICAgICAgICAgIHJlc3VsdC5sb2NhbGVJZHggPSBpbmRleChgJHtyZWxhdGlvbnNoaXBzVGFibGVOYW1lfV9sb2NhbGVfaWR4YCkub24oY29scy5sb2NhbGUpXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgICAgICB9LFxuICAgICAgKVxuXG4gICAgICBhZGFwdGVyLnRhYmxlc1tyZWxhdGlvbnNoaXBzVGFibGVOYW1lXSA9IHJlbGF0aW9uc2hpcHNUYWJsZVxuXG4gICAgICBjb25zdCByZWxhdGlvbnNoaXBzVGFibGVSZWxhdGlvbnMgPSByZWxhdGlvbnMocmVsYXRpb25zaGlwc1RhYmxlLCAoeyBvbmUgfSkgPT4ge1xuICAgICAgICBjb25zdCByZXN1bHQ6IFJlY29yZDxzdHJpbmcsIFJlbGF0aW9uPHN0cmluZz4+ID0ge1xuICAgICAgICAgIHBhcmVudDogb25lKHRhYmxlLCB7XG4gICAgICAgICAgICBmaWVsZHM6IFtyZWxhdGlvbnNoaXBzVGFibGUucGFyZW50XSxcbiAgICAgICAgICAgIHJlZmVyZW5jZXM6IFt0YWJsZS5pZF0sXG4gICAgICAgICAgICByZWxhdGlvbk5hbWU6ICdfcmVscycsXG4gICAgICAgICAgfSksXG4gICAgICAgIH1cblxuICAgICAgICByZWxhdGlvbnNoaXBzLmZvckVhY2goKHJlbGF0aW9uVG8pID0+IHtcbiAgICAgICAgICBjb25zdCByZWxhdGVkVGFibGVOYW1lID0gdG9TbmFrZUNhc2UocmVsYXRpb25Ubylcb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WJsZU5hbWUgPSBgJHt0YWJsZU5hbWV9JHthZGFwdGVyLnJlbGF0aW9uc2hpcHNTdWZmaXh9YFxuXG4gICAgICByZWxhdGlvbnNoaXBzVGFibGUgPSBhZGFwdGVyLnBnU2NoZW1hLnRhYmxlKFxuICAgICAgICByZWxhdGlvbnNoaXBzVGFibGVOYW1lLFxuICAgICAgICByZWxhdGlvbnNoaXBDb2x1bW5zLFxuICAgICAgICAoY29scykgPT4ge1xuICAgICAgICAgIGNvbnN0IHJlc3VsdDogUmVjb3JkPHN0cmluZywgdW5rbm93bj4gPSB7XG4gICAgICAgICAgICBvcmRlcjogaW5kZXgoYCR7cmVsYXRpb25zaGlwc1RhYmxlTmFtZX1fb3JkZXJfaWR4YCkub24oY29scy5vcmRlciksXG4gICAgICAgICAgICBwYXJlbnRJZHg6IGluZGV4KGAke3JlbGF0aW9uc2hpcHNUYWJsZU5hbWV9X3BhcmVudF9pZHhgKS5vbihjb2xzLnBhcmVudCksXG4gICAgICAgICAgICBwYXRoSWR4OiBpbmRleChgJHtyZWxhdGlvbnNoaXBzVGFibGVOYW1lfV9wYXRoX2lkeGApLm9uKGNvbHMucGF0aCksXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGhhc0xvY2FsaXplZFJlbGF0aW9uc2hpcEZpZWxkKSB7XG4gICAgICAgICAgICByZXN1bHQubG9jYWxlSWR4ID0gaW5kZXgoYCR7cmVsYXRpb25zaGlwc1RhYmxlTmFtZX1fbG9jYWxlX2lkeGApLm9uKGNvbHMubG9jYWxlKVxuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiByZXN1bHRcbiAgICAgICAgfSxcbiAgICAgIClcblxuICAgICAgYWRhcHRlci50YWJsZXNbcmVsYXRpb25zaGlwc1RhYmxlTmFtZV0gPSByZWxhdGlvbnNoaXBzVGFibGVcblxuICAgICAgY29uc3QgcmVsYXRpb25zaGlwc1RhYmxlUmVsYXRpb25zID0gcmVsYXRpb25zKHJlbGF0aW9uc2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xLQUFLLEdBQUdMLEtBQUs5RixvQkFBb0I7Z0JBQ3RDMEYsY0FBYztZQUNoQjtRQUNGO1FBRUEsT0FBT0w7SUFDVDtJQUVBckgsUUFBUTZFLFNBQVMsQ0FBQyxDQUFDLFVBQVUsRUFBRS9ELFVBQVUsQ0FBQyxDQUFDLEdBQUcrRztJQUU5QyxPQUFPO1FBQUV2RztRQUFvQkQ7UUFBa0JZO0lBQWlCO0FBQ2xFIn0=
@@ -25,4 +25,4 @@ const createIndex = ({ name, columnName, tableName, unique })=>{
25
25
  };
26
26
  };
27
27
 
28
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zY2hlbWEvY3JlYXRlSW5kZXgudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcGFyYW0tcmVhc3NpZ24gKi9cbmltcG9ydCB7IGluZGV4LCB1bmlxdWVJbmRleCB9IGZyb20gJ2RyaXp6bGUtb3JtL3BnLWNvcmUnXG5cbmltcG9ydCB0eXBlIHsgR2VuZXJpY0NvbHVtbiB9IGZyb20gJy4uL3R5cGVzJ1xuXG50eXBlIENyZWF0ZUluZGV4QXJncyA9IHtcbiAgY29sdW1uTmFtZTogc3RyaW5nXG4gIG5hbWU6IHN0cmluZyB8IHN0cmluZ1tdXG4gIHRhYmxlTmFtZTogc3RyaW5nXG4gIHVuaXF1ZT86IGJvb2xlYW5cbn1cblxuZXhwb3J0IGNvbnN0IGNyZWF0ZUluZGV4ID0gKHsgbmFtZSwgY29sdW1uTmFtZSwgdGFibGVOYW1lLCB1bmlxdWUgfTogQ3JlYXRlSW5kZXhBcmdzKSA9PiB7XG4gIHJldHVybiAodGFibGU6IHsgW3g6IHN0cmluZ106IEdlbmVyaWNDb2x1bW4gfSkgPT4ge1xuICAgIGxldCBjb2x1bW5zXG4gICAgaWYgKEFycmF5LmlzQXJyYXkobmFtZSkpIHtcbiAgICAgIGN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
4
+ adapter: PostgresAdapter;
5
+ /** The collection, global or field config **/
6
+ config: {
7
+ dbName?: DBIdentifierName;
8
+ enumName?: DBIdentifierName;
9
+ name?: string;
10
+ slug?: string;
11
+ };
12
+ /** Localized tables need to be given the locales suffix */
13
+ locales?: boolean;
14
+ /** For nested tables passed for the user custom dbName functions to handle their own iterations */
15
+ parentTableName?: string;
16
+ /** For sub tables (array for example) this needs to include the parentTableName */
17
+ prefix?: string;
18
+ /** Adds the relationships suffix */
19
+ relationships?: boolean;
20
+ /** For tables based on fields that could have both enumName and dbName (ie: select with hasMany), default: 'dbName' */
21
+ target?: 'dbName' | 'enumName';
22
+ throwValidationError?: boolean;
23
+ /** Adds the versions suffix, should only be used on the base collection to duplicate suffixing */
24
+ versions?: boolean;
25
+ };
26
+ /**
27
+ * Used to name database enums and tables
28
+ * Returns the table or enum name for a given entity
29
+ */
30
+ export declare const getTableName: ({ adapter, config: { name, slug }, config, locales, parentTableName, prefix, relationships, target, throwValidationError, versions, }: Args) => string;
31
+ export {};
32
+ //# sourceMappingURL=getTableName.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTableName.d.ts","sourceRoot":"","sources":["../../src/schema/getTableName.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAKxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE/C,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,8CAA8C;IAC9C,MAAM,EAAE;QACN,MAAM,CAAC,EAAE,gBAAgB,CAAA;QACzB,QAAQ,CAAC,EAAE,gBAAgB,CAAA;QAC3B,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,CAAA;IACD,2DAA2D;IAC3D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,mGAAmG;IACnG,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,mFAAmF;IACnF,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,oCAAoC;IACpC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,uHAAuH;IACvH,MAAM,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAA;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,kGAAkG;IAClG,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,0IAWtB,IAAI,KAAG,MA4BT,CAAA"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "getTableName", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return getTableName;
9
+ }
10
+ });
11
+ const _errors = require("payload/errors");
12
+ const _tosnakecase = /*#__PURE__*/ _interop_require_default(require("to-snake-case"));
13
+ function _interop_require_default(obj) {
14
+ return obj && obj.__esModule ? obj : {
15
+ default: obj
16
+ };
17
+ }
18
+ const getTableName = ({ adapter, config: { name, slug }, config, locales = false, parentTableName, prefix = '', relationships = false, target = 'dbName', throwValidationError = false, versions = false })=>{
19
+ let result;
20
+ let custom = config[target];
21
+ if (!custom && target === 'enumName') {
22
+ custom = config['dbName'];
23
+ }
24
+ if (custom) {
25
+ result = typeof custom === 'function' ? custom({
26
+ tableName: parentTableName
27
+ }) : custom;
28
+ } else {
29
+ result = `${prefix}${(0, _tosnakecase.default)(name ?? slug)}`;
30
+ }
31
+ if (locales) result = `${result}${adapter.localesSuffix}`;
32
+ if (versions) result = `_${result}${adapter.versionsSuffix}`;
33
+ if (relationships) result = `${result}${adapter.relationshipsSuffix}`;
34
+ if (!throwValidationError) {
35
+ return result;
36
+ }
37
+ if (result.length > 63) {
38
+ throw new _errors.APIError(`Exceeded max identifier length for table or enum name of 63 characters. Invalid name: ${result}`);
39
+ }
40
+ return result;
41
+ };
42
+
43
+ //# sourceMappingURL=data:application/json;base64,e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UFFQSxJQUFJQyxTQUFTTyxTQUFTLENBQUMsRUFBRUEsT0FBTyxFQUFFWCxRQUFRZSxhQUFhLENBQUMsQ0FBQztJQUN6RCxJQUFJTCxVQUFVQyxTQUFTLENBQUMsQ0FBQyxFQUFFQSxPQUFPLEVBQUVYLFFBQVFnQixjQUFjLENBQUMsQ0FBQztJQUM1RCxJQUFJVCxlQUFlSSxTQUFTLENBQUMsRUFBRUEsT0FBTyxFQUFFWCxRQUFRaUIsbUJBQW1CLENBQUMsQ0FBQztJQUVyRSxJQUFJLENBQUNSLHNCQUFzQjtRQUN6QixPQUFPRTtJQUNUO0lBRUEsSUFBSUEsT0FBT08sTUFBTSxHQUFHLElBQUk7UUFDdEIsTUFBTSxJQUFJQyxnQkFBUSxDQUNoQixDQUFDLHNGQUFzRixFQUFFUixPQUFPLENBQUM7SUFFckc7SUFDQSxPQUFPQTtBQUNUIn0=
@@ -18,4 +18,4 @@ const idToUUID = (fields)=>fields.map((field)=>{
18
18
  return field;
19
19
  });
20
20
 
21
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zY2hlbWEvaWRUb1VVSUQudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBGaWVsZCB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmV4cG9ydCBjb25zdCBpZFRvVVVJRCA9IChmaWVsZHM6IEZpZWxkW10pOiBGaWVsZFtdID0+XG4gIGZpZWxkcy5tYXAoKGZpZWxkKSA9PiB7XG4gICAgaWYgKCduYW1lJyBpbiBmaWVsZCAmJiBmaWVsZC5uYW1lID09PSAnaWQnKSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICAuLi5maWVsZCxcbiAgICAgICAgbmFtZTogJ191dWlkJyxcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gZmllbGRcbiAgfSlcbiJdLCJuYW1lcyI6WyJpZFRvVVVJRC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UEsU0FBU0EsTUFBTUMsSUFBSSxLQUFLLE1BQU07WUFDMUMsT0FBTztnQkFDTCxHQUFHRCxLQUFLO2dCQUNSQyxNQUFNO1lBQ1I7UUFDRjtRQUVBLE9BQU9EO0lBQ1QifQ==
@@ -16,4 +16,4 @@ const parentIDColumnMap = {
16
16
  varchar: _pgcore.varchar
17
17
  };
18
18
 
19
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zY2hlbWEvcGFyZW50SURDb2x1bW5NYXAudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgaW50ZWdlciwgbnVtZXJpYywgdXVpZCwgdmFyY2hhciB9IGZyb20gJ2RyaXp6bGUtb3JtL3BnLWNvcmUnXG5cbmltcG9ydCB0eXBlIHsgSURUeXBlIH0gZnJvbSAnLi4vdHlwZXMnXG5cbmV4cG9ydCBjb25zdCBwYXJlbnRJRENvbHVtbk1hcDogUmVjb3JkPFxuICBJRFR5cGUsXG4gIHR5cGVvZiBpbnRlZ2VyPHN0cmluZz4gfCB0eXBlb2YgbnVtZXJpYzxzdHJpbmc+IHwgdHlwZW9mIHV1aWQ8c3RyaW5nPiB8IHR5cGVvZiB2YXJjaGFyXG4+ID0ge1xuICBpbnRlZ2VyLFxuICBudW1lcmljLFxuICB1dWlkLFxuICB2YXJjaGFyLFxufVxuIl0sIm5hbWVzIjpbInBhcmVudElEQ29sdW1uTWFwIiwiaW50ZWdlciIsIm51bWVyaWMiLCJ1dWlkIiwidmFyY2hhciJdLCJtYXBwaW5ncyI6Ijs7OzsrQkFJYUE7OztlQUFBQTs7O3dCQUptQztBQUl6QyxNQUFNQSxvQkFHVDtJQUNGQyxTQUFBQSxlQUFPO0lBQ1BDLFNBQUFBLGVBQU87SUFDUEMsTUFBQUEsWUFBSTtJQUNKQyxTQUFBQSxlQUFPO0FBQ1QifQ==
19
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zY2hlbWEvcGFyZW50SURDb2x1bW5NYXAudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgaW50ZWdlciwgbnVtZXJpYywgdXVpZCwgdmFyY2hhciB9IGZyb20gJ2RyaXp6bGUtb3JtL3BnLWNvcmUnXG5cbmltcG9ydCB0eXBlIHsgSURUeXBlIH0gZnJvbSAnLi4vdHlwZXMnXG5cbmV4cG9ydCBjb25zdCBwYXJlbnRJRENvbHVtbk1hcDogUmVjb3JkPFxuICBJRFR5cGUsXG4gIHR5cGVvZiBpbnRlZ2VyPHN0cmluZz4gfCB0eXBlb2YgbnVtZXJpYzxzdHJpbmc+IHwgdHlwZW9mIHV1aWQ8c3RyaW5nPiB8IHR5cGVvZiB2YXJjaGFyXG4+ID0ge1xuICBpbnRlZ2VyLFxuICBudW1lcmljLFxuICB1dWlkLFxuICB2YXJjaGFyLFxufVxuIl0sIm5hbWVzIjpbInBhcmVudElEQ29sdW1uTWFwIiwiaW50ZWdlciIsIm51bWVyaWMiLCJ1dWlkIiwidmFyY2hhciJdLCJyYW5nZU1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7OyIsIm1hcHBpbmdzIjoiOzs7OytCQUlhQTs7O2VBQUFBOzs7d0JBSm1DO0FBSXpDLE1BQU1BLG9CQUdUO0lBQ0ZDLFNBQUFBLGVBQU87SUFDUEMsU0FBQUEsZUFBTztJQUNQQyxNQUFBQSxZQUFJO0lBQ0pDLFNBQUFBLGVBQU87QUFDVCJ9
@@ -31,4 +31,4 @@ const setColumnID = ({ adapter, columns, fields })=>{
31
31
  return 'integer';
32
32
  };
33
33
 
34
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zY2hlbWEvc2V0Q29sdW1uSUQudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBQZ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ableName: string;
26
+ versions: boolean;
26
27
  };
27
28
  type Result = {
28
29
  hasLocalizedField: boolean;
@@ -32,6 +33,6 @@ type Result = {
32
33
  hasManyNumberField: 'index' | boolean;
33
34
  hasManyTextField: 'index' | boolean;
34
35
  };
35
- export declare const traverseFields: ({ adapter, buildNumbers, buildRelationships, buildTexts, columnPrefix, columns, disableNotNull, disableUnique, fieldPrefix, fields, forceLocalized, indexes, localesColumns, localesIndexes, newTableName, parentTableName, relationsToBuild, relationships, rootRelationsToBuild, rootTableIDColType, rootTableName, }: Args) => Result;
36
+ export declare const traverseFields: ({ adapter, buildNumbers, buildRelationships, buildTexts, columnPrefix, columns, disableNotNull, disableUnique, fieldPrefix, fields, forceLocalized, indexes, localesColumns, localesIndexes, newTableName, parentTableName, relationsToBuild, relationships, rootRelationsToBuild, rootTableIDColType, rootTableName, versions, }: Args) => Result;
36
37
  export {};
37
38
  //# sourceMappingURL=traverseFields.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"traverseFields.d.ts","sourceRoot":"","sources":["../../src/schema/traverseFields.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAA2B,MAAM,qBAAqB,CAAA;AACjG,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAqBtD,OAAO,KAAK,EAAE,cAAc,EAAU,eAAe,EAAE,MAAM,UAAU,CAAA;AASvE,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,YAAY,EAAE,OAAO,CAAA;IACrB,kBAAkB,EAAE,OAAO,CAAA;IAC3B,UAAU,EAAE,OAAO,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;IACxC,cAAc,EAAE,OAAO,CAAA;IACvB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACp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