@payloadcms/db-postgres 0.8.5 → 0.8.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,11 +11,13 @@ Object.defineProperty(exports, "hasLocalesTable", {
11
11
  const _types = require("payload/types");
12
12
  const hasLocalesTable = (fields)=>{
13
13
  return fields.some((field)=>{
14
+ // arrays always get a separate table
15
+ if (field.type === 'array') return false;
14
16
  if ((0, _types.fieldAffectsData)(field) && field.localized) return true;
15
- if ((0, _types.fieldHasSubFields)(field) && field.type !== 'array') return hasLocalesTable(field.fields);
17
+ if ((0, _types.fieldHasSubFields)(field)) return hasLocalesTable(field.fields);
16
18
  if (field.type === 'tabs') return field.tabs.some((tab)=>hasLocalesTable(tab.fields));
17
19
  return false;
18
20
  });
19
21
  };
20
22
 
21
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsaXRpZXMvaGFzTG9jYWxlc1RhYmxlLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgRmllbGQgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgeyBmaWVsZEFmZmVjdHNEYXRhLCBmaWVsZEhhc1N1YkZpZWxkcyB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmV4cG9ydCBjb25zdCBoYXNMb2NhbGVzVGFibGUgPSAoZmllbGRzOiBGaWVsZFtdKTogYm9vbGVhbiA9PiB7XG4gIHJldHVybiBmaWVsZHMuc29tZSgoZmllbGQpID0+IHtcbiAgICBpZiAoZmllbGRBZmZlY3RzRGF0YShmaWVsZCkgJiYgZmllbGQubG9jYWxpemVkKSByZXR1cm4gdHJ1ZVxuICAgIGlmIChmaWVsZEhhc1N1YkZpZWxkcyhmaWVsZCkgJiYgZmllbGQudHlwZSAhPT0gJ2FycmF5JykgcmV0dXJuIGhhc0xvY2FsZXNUYWJsZShmaWVsZC5maWVsZHMpXG4gICAgaWYgKGZpZWxkLnR5cGUgPT09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xLQUFLLFNBQVMsT0FBTztRQUNuQyxJQUFJQyxJQUFBQSx1QkFBZ0IsRUFBQ0YsVUFBVUEsTUFBTUcsU0FBUyxFQUFFLE9BQU87UUFDdkQsSUFBSUMsSUFBQUEsd0JBQWlCLEVBQUNKLFFBQVEsT0FBT0gsZ0JBQWdCRyxNQUFNRixNQUFNO1FBQ2pFLElBQUlFLE1BQU1DLElBQUksS0FBSyxRQUFRLE9BQU9ELE1BQU1LLElBQUksQ0FBQ04sSUFBSSxDQUFDLENBQUNPLE1BQVFULGdCQUFnQlMsSUFBSVIsTUFBTTtRQUNyRixPQUFPO0lBQ1Q7QUFDRiJ9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/db-postgres",
3
- "version": "0.8.5",
3
+ "version": "0.8.7",
4
4
  "description": "The officially supported Postgres database adapter for Payload",
5
5
  "repository": {
6
6
  "type": "git",
@@ -29,8 +29,8 @@
29
29
  "devDependencies": {
30
30
  "@types/pg": "8.10.2",
31
31
  "@types/to-snake-case": "1.0.0",
32
- "payload": "2.22.0",
33
- "@payloadcms/eslint-config": "1.1.1"
32
+ "@payloadcms/eslint-config": "1.1.1",
33
+ "payload": "2.29.0"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "payload": "^2.0.0"