@payloadcms/db-postgres 0.8.2 → 0.8.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"createVersion.d.ts","sourceRoot":"","sources":["../src/createVersion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAC1E,OAAO,KAAK,EAAkB,UAAU,EAAE,MAAM,eAAe,CAAA;AAM/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C,wBAAsB,aAAa,CAAC,CAAC,SAAS,UAAU,EACtD,IAAI,EAAE,eAAe,EACrB,EACE,QAAQ,EACR,cAAc,EACd,MAAM,EACN,GAA0B,EAC1B,WAAW,GACZ,EAAE,iBAAiB,CAAC,CAAC,CAAC,+BA4CxB"}
1
+ {"version":3,"file":"createVersion.d.ts","sourceRoot":"","sources":["../src/createVersion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAC1E,OAAO,KAAK,EAAkB,UAAU,EAAE,MAAM,eAAe,CAAA;AAM/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C,wBAAsB,aAAa,CAAC,CAAC,SAAS,UAAU,EACtD,IAAI,EAAE,eAAe,EACrB,EACE,QAAQ,EACR,cAAc,EACd,MAAM,EACN,GAA0B,EAC1B,WAAW,GACZ,EAAE,iBAAiB,CAAC,CAAC,CAAC,+BA2CxB"}
@@ -41,7 +41,7 @@ async function createVersion({ autosave, collectionSlug, parent, req = {}, versi
41
41
  tableName
42
42
  });
43
43
  const table = this.tables[tableName];
44
- const relationshipsTable = this.tables[`_${defaultTableName}${this.versionsSuffix}${this.relationshipsSuffix}`];
44
+ const relationshipsTable = this.tables[`${tableName}${this.relationshipsSuffix}`];
45
45
  if (collection.versions.drafts) {
46
46
  await db.execute((0, _drizzleorm.sql)`
47
47
  UPDATE ${table}
@@ -56,4 +56,4 @@ async function createVersion({ autosave, collectionSlug, parent, req = {}, versi
56
56
  return result;
57
57
  }
58
58
 
59
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jcmVhdGVWZXJzaW9uLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgQ3JlYXRlVmVyc2lvbkFyZ3MsIFR5cGVXaXRoVmVyc2lvbiB9IGZyb20gJ3BheWxvYWQvZGF0YWJhc2UnXG5pbXBvcnQgdHlwZSB7IFBheWxvYWRSZXF1ZXN0LCBUeXBlV2l0aElEIH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxuaW1wb3J0IHsgc3FsIH0gZnJvbSAnZHJpenpsZS1vcm0nXG5pbXBvcnQgeyBidWlsZFZlcnNpb25Db2xsZWN0aW9uRmllbGRzIH0gZnJvbSAncGF5bG9hZC92ZXJzaW9ucydcbmltcG9ydCB0b1NuYWtlQ2FzZSBmcm9tICd0by1zbmFrZS1jYXNlJ1xuXG5pbXBvcnQgdHlwZSB7IFBvc3RncmVzQWRhcHRlciB9IGZyb20gJy4vdHlwZXMnXG5cbmltcG9ydCB7IHVwc2VydFJvdyB9IGZyb20gJy4vdXBzZXJ0Um93J1xuXG5leHBvcnQgYXN5bmMgZnVuY3Rpb24gY3JlYXRlVmVyc2lvbjxUIGV4dGVuZHMgVHlwZVdpdGhJRD4oXG4gIHRoaXM6IFBvc3RncmVzQWRhcHRlcixcbiAge1xuICAgIGF1dG9zYXZlLFxuICAgIGNvbGxlY3Rpb25TbHVnLFxuICAgIHBhcmVudCxcbiAgICByZXEgPSB7fSBhcyBQYXlsb2FkUmVxdWVzdCxcbiAgICB2ZXJzaW9uRGF0YSxcbiAgfTogQ3JlYXRlVmVyc2lvbkFyZ3M8VD4sXG4pIHtcbiAgY29uc3QgZGIgPSB0aGlzLnNlc3Npb25zW3JlcS50cmFuc2FjdGlvbklEXT8uZGIg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ENBQUMsR0FBRyxFQUFFLFNBQVM7WUFDeEMsRUFBRU4sa0JBQWtCLENBQUMsQ0FBQyxFQUFFL0IsZUFBZSxFQUFFLENBQUMsQ0FBQyxDQUFDLEdBQUcsRUFBRUMsT0FBTztZQUN4RCxFQUFFNEIsTUFBTVQsRUFBRSxDQUFDLElBQUksRUFBRUMsT0FBT0QsRUFBRSxDQUFDO0lBQ25DLENBQUM7SUFDSDtJQUVBLE9BQU9DO0FBQ1QifQ==
@@ -1 +1 @@
1
- {"version":3,"file":"parseParams.d.ts","sourceRoot":"","sources":["../../src/queries/parseParams.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,KAAK,EAAE,KAAK,EAAY,KAAK,EAAE,MAAM,eAAe,CAAA;AAM3D,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAS1E,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,WAAW,EAAE,qBAAqB,CAAA;IAClC,KAAK,EAAE,eAAe,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IAC3C,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,KAAK,CAAA;CACb,CAAA;AAED,wBAAsB,WAAW,CAAC,EAChC,OAAO,EACP,MAAM,EACN,WAAW,EACX,KAAK,EACL,MAAM,EACN,YAAY,EACZ,SAAS,EACT,KAAK,GACN,EAAE,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,CAwMrB"}
1
+ {"version":3,"file":"parseParams.d.ts","sourceRoot":"","sources":["../../src/queries/parseParams.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,KAAK,EAAE,KAAK,EAAY,KAAK,EAAE,MAAM,eAAe,CAAA;AAM3D,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAS1E,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,WAAW,EAAE,qBAAqB,CAAA;IAClC,KAAK,EAAE,eAAe,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IAC3C,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,KAAK,CAAA;CACb,CAAA;AAED,wBAAsB,WAAW,CAAC,EAChC,OAAO,EACP,MAAM,EACN,WAAW,EACX,KAAK,EACL,MAAM,EACN,YAAY,EACZ,SAAS,EACT,KAAK,GACN,EAAE,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,CA+MrB"}
@@ -12,8 +12,8 @@ const _drizzleorm = require("drizzle-orm");
12
12
  const _errors = require("payload/errors");
13
13
  const _types = require("payload/types");
14
14
  const _buildAndOrConditions = require("./buildAndOrConditions");
15
- const _convertPathToJSONTraversal = require("./createJSONQuery/convertPathToJSONTraversal");
16
15
  const _createJSONQuery = require("./createJSONQuery");
16
+ const _convertPathToJSONTraversal = require("./createJSONQuery/convertPathToJSONTraversal");
17
17
  const _getTableColumnFromPath = require("./getTableColumnFromPath");
18
18
  const _operatorMap = require("./operatorMap");
19
19
  const _sanitizeQueryValue = require("./sanitizeQueryValue");
@@ -51,7 +51,7 @@ async function parseParams({ adapter, fields, joinAliases, joins, locale, select
51
51
  // So we need to loop on keys again here to handle each operator independently
52
52
  const pathOperators = where[relationOrPath];
53
53
  if (typeof pathOperators === 'object') {
54
- for (const operator of Object.keys(pathOperators)){
54
+ for (let operator of Object.keys(pathOperators)){
55
55
  if (_types.validOperators.includes(operator)) {
56
56
  const val = where[relationOrPath][operator];
57
57
  const { columnName, constraints: queryConstraints, field, getNotNullColumnByValue, pathSegments, rawColumn, table } = (0, _getTableColumnFromPath.getTableColumnFromPath)({
@@ -134,6 +134,9 @@ async function parseParams({ adapter, fields, joinAliases, joins, locale, select
134
134
  }
135
135
  break;
136
136
  }
137
+ if (operator === 'like' && (field.type === 'number' || table[columnName].columnType === 'PgUUID')) {
138
+ operator = 'equals';
139
+ }
137
140
  if (operator === 'like') {
138
141
  constraints.push((0, _drizzleorm.and)(...val.split(' ').map((word)=>(0, _drizzleorm.ilike)(table[columnName], `%${word}%`))));
139
142
  break;
@@ -154,10 +157,10 @@ async function parseParams({ adapter, fields, joinAliases, joins, locale, select
154
157
  break;
155
158
  }
156
159
  if ((field.type === 'relationship' || field.type === 'upload') && Array.isArray(queryValue) && operator === 'not_in') {
157
- constraints.push((0, _drizzleorm.sql)`${(0, _drizzleorm.notInArray)(table[columnName], queryValue)} OR
160
+ constraints.push((0, _drizzleorm.sql)`(${(0, _drizzleorm.notInArray)(table[columnName], queryValue)} OR
158
161
  ${table[columnName]}
159
162
  IS
160
- NULL`);
163
+ NULL)`);
161
164
  break;
162
165
  }
163
166
  if (operator === 'equals' && queryValue === null) {
@@ -189,4 +192,4 @@ async function parseParams({ adapter, fields, joinAliases, joins, locale, select
189
192
  return result;
190
193
  }
191
194
 
192
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9xdWVyaWVzL3BhcnNlUGFyYW1zLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qIGVzbGludC1kaXNhYmxlIG5vLWF3YWl0LWluLWxvb3AgKi9cbmltcG9ydCB0eXBlIHsgU1FMIH0gZnJvbSAnZHJpenpsZS1vcm0nXG5pbXBvcnQgdHlwZSB7IEZpZWxkLCBPcGVy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0aE9wZXJhdG9ycyA9IHdoZXJlW3JlbGF0aW9uT3JQYXRoXVxuICAgICAgICAgIGlmICh0eXBlb2YgcGF0aE9wZXJhdG9ycyA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgIGZvciAoY29uc3Qgb3BlcmF0b3Igb2YgT2JqZWN0LmtleXMocGF0aE9wZXJhdG9ycykpIHtcbiAgICAgICAgICAgICAgaWYgKHZhbGlkT3BlcmF0b3JzLmluY2x1ZGVzKG9wZXJhdG9yIGFzIE9wZXJhdG9yKSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IHZhbCA9IHdoZXJlW3JlbGF0aW9uT3JQYXRoXVtvcGVyYXRvcl1cbiAgICAgICAgICAgICAgICBjb25zdCB7XG4gICAgICAgICAgICAgICAgICBjb2x1bW5OYW1lLFxuICAgICAgICAgICAgICAgICAgY29uc3RyYWludHM6IHF1ZXJ5Q29uc3RyYWludHMsXG4gICAgICAgICAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICAgICAgICAgIGdldE5vdE51bGxDb2x1bW5CeVZhbHVlLFxuICAgICAgICAgICAgICAgICAgcGF0aFNlZ21lbnRzLFxuICAgICAgICAgICAgICAgICAgcmF3Q29sdW1uLFxuICAgICAgICAgICAgICAgICAgdGFibGUsXG4gICAgICAgICAgICAgICAgfSA9IGdldFRhYmxlQ29sdW1uRnJvbVBhdGgoe1xuICAgICAgICAgICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICAgICAgICAgIGNvbGxlY3Rpb25QYXRoOiByZWxhdGlvbk9yUGF0aCxcbiAgICAgICAgICAgICAgICAgIGZpZWxkcyxcbiAgICAgICAgICAgICAgICAgIGpvaW5BbGlhc2VzLFxuICAgICAgICAgICAgICAgICAgam9pbnMsXG4gICAgICAgICAgICAgICAgICBsb2NhbGUsXG4gICAgICAgICAgICAgICAgICBwYXRoU2VnbWVudHM6IHJlbGF0aW9uT3JQYXRoLnJlcGxhY2UoL19fL2csICcuJykuc3BsaXQoJy4nKSxcbiAgICAgICAgICAgICAgICAgIHNlbGVjdEZpZWxkcyxcbiAgICAgICAgICAgICAgICAgIHRhYmxlTmFtZSxcbiAgICAgICAgICAgICAgICAgIHZhbHVlOiB2YWwsXG4gICAgICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgICAgIHF1ZXJ5Q29uc3RyYWludHMuZm9yRWFjaCgoeyBjb2x1bW5OYW1lOiBjb2wsIHRhYmxlOiBjb25zdHJhaW50VGFibGUsIHZhbHVlIH0pID0+IHtcbiAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdmFsdWUgPT09ICdzdHJpbmcnICYmIHZhbHVlLmluZGV4T2YoJyUnKSA+IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2gob3BlcmF0b3JNYXAubGlrZShjb25zdHJhaW50VGFibGVbY29sXSwgdmFsdWUpKVxuICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChvcGVyYXRvck1hcC5lcXVhbHMoY29uc3RyYWludFRhYmxlW2NvbF0sIHZhbHVlKSlcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgWydqc29uJywgJ3JpY2hUZXh0J10uaW5jbHVkZXMoZmllbGQudHlwZSkgJiZcbiAgICAgICAgICAgICAgICAgIEFycmF5LmlzQXJyYXkocGF0aFNlZ21lbnRzKSAmJlxuICAgICAgICAgICAgICAgICAgcGF0aFNlZ21lbnRzLmxlbmd0aCA+IDFcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IHNlZ21lbnRzID0gcGF0aFNlZ21lbnRzLnNsaWNlKDEpXG4gICAgICAgICAgICAgICAgICBzZWdtZW50cy51bnNoaWZ0KHRhYmxlW2NvbHVtbk5hbWVdLm5hbWUpXG5cbiAgICAgICAgICAgICAgICAgIGlmIChmaWVsZC50eXBlID09PSAncmljaFRleHQnKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGpzb25RdWVyeSA9IGNyZWF0ZUpTT05RdWVyeSh7XG4gICAgICAgICAgICAgICAgICAgICAgb3BlcmF0b3IsXG4gICAgICAgICAgICAgICAgICAgICAgcGF0aFNlZ21lbnRzOiBzZWdtZW50cyxcbiAgICAgICAgICAgICAgICAgICAgICB0cmVhdEFzQXJyYXk6IFsnY2hpbGRyZW4nXSxcbiAgICAgICAgICAgICAgICAgICAgICB0cmVhdFJvb3RBc0FycmF5OiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiB2YWwsXG4gICAgICAgICAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChzcWwucmF3KGpzb25RdWVyeSkpXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgIGNvbnN0IGpzb25RdWVyeSA9IGNvbnZlcnRQYXRoVG9KU09OVHJhdmVyc2FsKHBhdGhTZWdtZW50cylcbiAgICAgICAgICAgICAgICAgIGNvbnN0IG9wZXJhdG9yS2V5cyA9IHtcbiAgICAgICAgICAgICAgICAgICAgY29udGFpbnM6IHsgb3BlcmF0b3I6ICdpbGlrZScsIHdpbGRjYXJkOiAnJScgfSxcbiAgICAgICAgICAgICAgICAgICAgZXF1YWxzOiB7IG9wZXJhdG9yOiAnPScsIHdpbGRjYXJkOiAnJyB9LFxuICAgICAgICAgICAgICAgICAgICBleGlzdHM6IHsgb3BlcmF0b3I6IHZhbCA9PT0gdHJ1ZSA/ICdpcyBub3QgbnVsbCcgOiAnaXMgbnVsbCcgfSxcbiAgICAgICAgICAgICAgICAgICAgbGlrZTogeyBvcGVyYXRvcjogJ2xpa2UnLCB3aWxkY2FyZDogJyUnIH0sXG4gICAgICAgICAgICAgICAgICAgIG5vdF9lcXVhbHM6IHsgb3BlcmF0b3I6ICc8PicsIHdpbGRjYXJkOiAnJyB9LFxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgbGV0IGZvcm1hdHRlZFZhbHVlID0gYCcke29wZXJhdG9yS2V5c1tvcGVyYXRvcl0ud2lsZGNhcmR9JHt2YWx9JHtvcGVyYXRvcktleXNbb3BlcmF0b3JdLndpbGRjYXJkfSdgXG5cbiAgICAgICAgICAgICAgICAgIGlmIChvcGVyYXRvciA9PT0gJ2V4aXN0cycpIHtcbiAgICAgICAgICAgICAgICAgICAgZm9ybWF0dGVkVmFsdWUgPSAnJ1xuICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKFxuICAgICAgICAgICAgICAgICAgICBzcWwucmF3KFxuICAgICAgICAgICAgICAgICAgICAgIGAke3RhYmxlW2NvbHVtbk5hbWVdLm5hbWV9JHtqc29uUXVlcnl9ICR7b3BlcmF0b3JLZXlzW29wZXJhdG9yXS5vcGVyYXRvcn0gJHtmb3JtYXR0ZWRWYWx1ZX1gLFxuICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChnZXROb3ROdWxsQ29sdW1uQnlWYWx1ZSkge1xuICAgICAgICAgICAgICAgICAgY29uc3QgY29sdW1uTmFtZSA9IGdldE5vdE51bGxDb2x1bW5CeVZhbHVlKHZhbClcbiAgICAgICAgICAgICAgICAgIGlmIChjb2x1bW5OYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2goaXNOb3ROdWxsKHRhYmxlW2NvbHVtbk5hbWVdKSlcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBRdWVyeUVycm9yKFt7IHBhdGg6IHJlbGF0aW9uT3JQYXRoIH1dKVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAob3BlcmF0b3IgPT09ICdsaWtlJykge1xuICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChcbiAgICAgICAgICAgICAgICAgICAgYW5kKC4uLnZhbC5zcGxpdCgnICcpLm1hcCgod29yZCkgPT4gaWxpa2UodGFibGVbY29sdW1uTmFtZV0sIGAlJHt3b3JkfSVgKSkpLFxuICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBjb25zdCBzYW5pdGl6ZWRRdWVyeVZhbHVlID0gc2FuaXRpemVRdWVyeVZhbHVlKHtcbiAgICAgICAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICAgICAgICAgIG9wZXJhdG9yLFxuICAgICAgICAgICAgICAgICAgcmVsYXRpb25PclBhdGgsXG4gICAgICAgICAgICAgICAgICB2YWwsXG4gICAgICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgICAgIGlmIChzYW5pdGl6ZWRRdWVyeVZhbHVlID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGNvbnN0IHsgb3BlcmF0b3I6IHF1ZXJ5T3BlcmF0b3IsIHZhbHVlOiBxdWVyeVZhbHVlIH0gPSBzYW5pdGl6ZWRRdWVyeVZhbHVlXG5cbiAgICAgICAgICAgICAgICBpZiAocXVlcnlPcGVyYXRvciA9PT0gJ25vdF9lcXVhbHMnICYmIHF1ZXJ5VmFsdWUgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2goXG4gICAgICAgICAgICAgICAgICAgIG9yKFxuICAgICAgICAgICAgICAgICAgICAgIGlzTnVsbChyYXdDb2x1bW4gfHwgdGFibGVbY29sdW1uTmFtZV0pLFxuICAgICAgICAgICAgICAgICAgICAgIC8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkgKi9cbiAgICAgICAgICAgICAgICAgICAgICBuZTxhbnk+KHJhd0NvbHVtbiB8fCB0YWJsZVtjb2x1bW5OYW1lXSwgcXVlcnlWYWx1ZSksXG4gICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIChmaWVsZC50eXBlID09PSAncmVsYXRpb25zaGlwJyB8fCBmaWVsZC50eXBlID09PSAndXBsb2FkJykgJiZcbiAgICAgICAgICAgICAgICAgIEFycmF5LmlzQXJyYXkocXVlcnlWYWx1ZSkgJiZcbiAgICAgICAgICAgICAgICAgIG9wZXJhdG9yID09PSAnbm90X2luJ1xuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChcbiAgICAgICAgICAgICAgICAgICAgc3FsYCR7bm90SW5BcnJheSh0YWJsZVtjb2x1bW5OYW1lXSwgcXVlcnlWYWx1ZSl9IE9SXG4gICAgICAgICAgICAgICAgICAgICR7dGFibGVbY29sdW1uTmFtZV19XG4gICAgICAgICAgICAgICAgICAgIElTXG4gICAgICAgICAgICAgICAgICAgIE5VTExgLFxuICAgICAgICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChvcGVyYXRvciA9PT0gJ2VxdWFscycgJiYgcXVlcnlWYWx1ZSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChpc051bGwocmF3Q29sdW1uIHx8IHRhYmxlW2NvbHVtbk5hbWVdKSlcbiAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKG9wZXJhdG9yID09PSAnbm90X2VxdWFscycgJiYgcXVlcnlWYWx1ZSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChpc05vdE51bGwocmF3Q29sdW1uIHx8IHRhYmxlW2NvbHVtbk5hbWVdKSlcbiAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChcbiAgICAgICAgICAgICAgICAgIG9wZXJhdG9yTWFwW3F1ZXJ5T3BlcmF0b3JdKHJhd0NvbHVtbiB8fCB0YWJsZVtjb2x1bW5OYW1lXSwgcXVlcnlWYWx1ZSksXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICB9XG4gIGlmIChjb25zdHJhaW50cy5sZW5ndGggPiAwKSB7XG4gICAgaWYgKHJlc3VsdCkge1xuICAgICAgcmVzdWx0ID0gYW5kKHJlc3VsdCwgLi4uY29uc3RyYWludHMpXG4gICAgfSBlbHNlIHtcbiAgICAgIHJlc3VsdCA9IGFuZCguLi5jb25zdHJhaW50cylcbiAgICB9XG4gIH1cbiAgaWYgKGNvbnN0cmFpbnRzLmxlbmd0aCA9PT0gMSAmJiAhcmVzdWx0KSB7XG4gICAgO1tyZXN1bHRdID0gY29uc3RyYWludHNcbiAgfVxuXG4gIHJldHVybiByZXN1bHRcbn1cbiJdLCJuYW1lcyI6WyJwYXJzZVBhcmFtcyIsImFkYXB0ZXIiLCJmaWVsZHMiLCJqb2luQWxpYXNlcyIsImpvaW5zIiwibG9jYWx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GVudGx5XG4gICAgICAgICAgY29uc3QgcGF0aE9wZXJhdG9ycyA9IHdoZXJlW3JlbGF0aW9uT3JQYXRoXVxuICAgICAgICAgIGlmICh0eXBlb2YgcGF0aE9wZXJhdG9ycyA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgIGZvciAobGV0IG9wZXJhdG9yIG9mIE9iamVjdC5rZXlzKHBhdGhPcGVyYXRvcnMpKSB7XG4gICAgICAgICAgICAgIGlmICh2YWxpZE9wZXJhdG9ycy5pbmNsdWRlcyhvcGVyYXRvciBhcyBPcGVyYXRvcikpIHtcbiAgICAgICAgICAgICAgICBjb25zdCB2YWwgPSB3aGVyZVtyZWxhdGlvbk9yUGF0aF1bb3BlcmF0b3JdXG4gICAgICAgICAgICAgICAgY29uc3Qge1xuICAgICAgICAgICAgICAgICAgY29sdW1uTmFtZSxcbiAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzOiBxdWVyeUNvbnN0cmFpbnRzLFxuICAgICAgICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICAgICAgICBnZXROb3ROdWxsQ29sdW1uQnlWYWx1ZSxcbiAgICAgICAgICAgICAgICAgIHBhdGhTZWdtZW50cyxcbiAgICAgICAgICAgICAgICAgIHJhd0NvbHVtbixcbiAgICAgICAgICAgICAgICAgIHRhYmxlLFxuICAgICAgICAgICAgICAgIH0gPSBnZXRUYWJsZUNvbHVtbkZyb21QYXRoKHtcbiAgICAgICAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICAgICAgICBjb2xsZWN0aW9uUGF0aDogcmVsYXRpb25PclBhdGgsXG4gICAgICAgICAgICAgICAgICBmaWVsZHMsXG4gICAgICAgICAgICAgICAgICBqb2luQWxpYXNlcyxcbiAgICAgICAgICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgICAgICAgICAgcGF0aFNlZ21lbnRzOiByZWxhdGlvbk9yUGF0aC5yZXBsYWNlKC9fXy9nLCAnLicpLnNwbGl0KCcuJyksXG4gICAgICAgICAgICAgICAgICBzZWxlY3RGaWVsZHMsXG4gICAgICAgICAgICAgICAgICB0YWJsZU5hbWUsXG4gICAgICAgICAgICAgICAgICB2YWx1ZTogdmFsLFxuICAgICAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgICAgICBxdWVyeUNvbnN0cmFpbnRzLmZvckVhY2goKHsgY29sdW1uTmFtZTogY29sLCB0YWJsZTogY29uc3RyYWludFRhYmxlLCB2YWx1ZSB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHZhbHVlID09PSAnc3RyaW5nJyAmJiB2YWx1ZS5pbmRleE9mKCclJykgPiAtMSkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKG9wZXJhdG9yTWFwLmxpa2UoY29uc3RyYWludFRhYmxlW2NvbF0sIHZhbHVlKSlcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2gob3BlcmF0b3JNYXAuZXF1YWxzKGNvbnN0cmFpbnRUYWJsZVtjb2xdLCB2YWx1ZSkpXG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIFsnanNvbicsICdyaWNoVGV4dCddLmluY2x1ZGVzKGZpZWxkLnR5cGUpICYmXG4gICAgICAgICAgICAgICAgICBBcnJheS5pc0FycmF5KHBhdGhTZWdtZW50cykgJiZcbiAgICAgICAgICAgICAgICAgIHBhdGhTZWdtZW50cy5sZW5ndGggPiAxXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBjb25zdCBzZWdtZW50cyA9IHBhdGhTZWdtZW50cy5zbGljZSgxKVxuICAgICAgICAgICAgICAgICAgc2VnbWVudHMudW5zaGlmdCh0YWJsZVtjb2x1bW5OYW1lXS5uYW1lKVxuXG4gICAgICAgICAgICAgICAgICBpZiAoZmllbGQudHlwZSA9PT0gJ3JpY2hUZXh0Jykge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBqc29uUXVlcnkgPSBjcmVhdGVKU09OUXVlcnkoe1xuICAgICAgICAgICAgICAgICAgICAgIG9wZXJhdG9yLFxuICAgICAgICAgICAgICAgICAgICAgIHBhdGhTZWdtZW50czogc2VnbWVudHMsXG4gICAgICAgICAgICAgICAgICAgICAgdHJlYXRBc0FycmF5OiBbJ2NoaWxkcmVuJ10sXG4gICAgICAgICAgICAgICAgICAgICAgdHJlYXRSb290QXNBcnJheTogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogdmFsLFxuICAgICAgICAgICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2goc3FsLnJhdyhqc29uUXVlcnkpKVxuICAgICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICBjb25zdCBqc29uUXVlcnkgPSBjb252ZXJ0UGF0aFRvSlNPTlRyYXZlcnNhbChwYXRoU2VnbWVudHMpXG4gICAgICAgICAgICAgICAgICBjb25zdCBvcGVyYXRvcktleXMgPSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRhaW5zOiB7IG9wZXJhdG9yOiAnaWxpa2UnLCB3aWxkY2FyZDogJyUnIH0sXG4gICAgICAgICAgICAgICAgICAgIGVxdWFsczogeyBvcGVyYXRvcjogJz0nLCB3aWxkY2FyZDogJycgfSxcbiAgICAgICAgICAgICAgICAgICAgZXhpc3RzOiB7IG9wZXJhdG9yOiB2YWwgPT09IHRydWUgPyAnaXMgbm90IG51bGwnIDogJ2lzIG51bGwnIH0sXG4gICAgICAgICAgICAgICAgICAgIGxpa2U6IHsgb3BlcmF0b3I6ICdsaWtlJywgd2lsZGNhcmQ6ICclJyB9LFxuICAgICAgICAgICAgICAgICAgICBub3RfZXF1YWxzOiB7IG9wZXJhdG9yOiAnPD4nLCB3aWxkY2FyZDogJycgfSxcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIGxldCBmb3JtYXR0ZWRWYWx1ZSA9IGAnJHtvcGVyYXRvcktleXNbb3BlcmF0b3JdLndpbGRjYXJkfSR7dmFsfSR7b3BlcmF0b3JLZXlzW29wZXJhdG9yXS53aWxkY2FyZH0nYFxuXG4gICAgICAgICAgICAgICAgICBpZiAob3BlcmF0b3IgPT09ICdleGlzdHMnKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvcm1hdHRlZFZhbHVlID0gJydcbiAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChcbiAgICAgICAgICAgICAgICAgICAgc3FsLnJhdyhcbiAgICAgICAgICAgICAgICAgICAgICBgJHt0YWJsZVtjb2x1bW5OYW1lXS5uYW1lfSR7anNvblF1ZXJ5fSAke29wZXJhdG9yS2V5c1tvcGVyYXRvcl0ub3BlcmF0b3J9ICR7Zm9ybWF0dGVkVmFsdWV9YCxcbiAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgIClcblxuICAgICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoZ2V0Tm90TnVsbENvbHVtbkJ5VmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IGNvbHVtbk5hbWUgPSBnZXROb3ROdWxsQ29sdW1uQnlWYWx1ZSh2YWwpXG4gICAgICAgICAgICAgICAgICBpZiAoY29sdW1uTmFtZSkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKGlzTm90TnVsbCh0YWJsZVtjb2x1bW5OYW1lXSkpXG4gICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgUXVlcnlFcnJvcihbeyBwYXRoOiByZWxhdGlvbk9yUGF0aCB9XSlcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgb3BlcmF0b3IgPT09ICdsaWtlJyAmJlxuICAgICAgICAgICAgICAgICAgKGZpZWxkLnR5cGUgPT09ICdudW1iZXInIHx8IHRhYmxlW2NvbHVtbk5hbWVdLmNvbHVtblR5cGUgPT09ICdQZ1VVSUQnKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgb3BlcmF0b3IgPSAnZXF1YWxzJ1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChvcGVyYXRvciA9PT0gJ2xpa2UnKSB7XG4gICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKFxuICAgICAgICAgICAgICAgICAgICBhbmQoLi4udmFsLnNwbGl0KCcgJykubWFwKCh3b3JkKSA9PiBpbGlrZSh0YWJsZVtjb2x1bW5OYW1lXSwgYCUke3dvcmR9JWApKSksXG4gICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGNvbnN0IHNhbml0aXplZFF1ZXJ5VmFsdWUgPSBzYW5pdGl6ZVF1ZXJ5VmFsdWUoe1xuICAgICAgICAgICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgICAgICAgICAgb3BlcmF0b3IsXG4gICAgICAgICAgICAgICAgICByZWxhdGlvbk9yUGF0aCxcbiAgICAgICAgICAgICAgICAgIHZhbCxcbiAgICAgICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICAgICAgaWYgKHNhbml0aXplZFF1ZXJ5VmFsdWUgPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgY29uc3QgeyBvcGVyYXRvcjogcXVlcnlPcGVyYXRvciwgdmFsdWU6IHF1ZXJ5VmFsdWUgfSA9IHNhbml0aXplZFF1ZXJ5VmFsdWVcblxuICAgICAgICAgICAgICAgIGlmIChxdWVyeU9wZXJhdG9yID09PSAnbm90X2VxdWFscycgJiYgcXVlcnlWYWx1ZSAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaChcbiAgICAgICAgICAgICAgICAgICAgb3IoXG4gICAgICAgICAgICAgICAgICAgICAgaXNOdWxsKHJhd0NvbHVtbiB8fCB0YWJsZVtjb2x1bW5OYW1lXSksXG4gICAgICAgICAgICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgICAgICAgICAgIG5lPGFueT4ocmF3Q29sdW1uIHx8IHRhYmxlW2NvbHVtbk5hbWVdLCBxdWVyeVZhbHVlKSxcbiAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgKGZpZWxkLnR5cGUgPT09ICdyZWxhdGlvbnNoaXAnIHx8IGZpZWxkLnR5cGUgPT09ICd1cGxvYWQnKSAmJlxuICAgICAgICAgICAgICAgICAgQXJyYXkuaXNBcnJheShxdWVyeVZhbHVlKSAmJlxuICAgICAgICAgICAgICAgICAgb3BlcmF0b3IgPT09ICdub3RfaW4nXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKFxuICAgICAgICAgICAgICAgICAgICBzcWxgKCR7bm90SW5BcnJheSh0YWJsZVtjb2x1bW5OYW1lXSwgcXVlcnlWYWx1ZSl9IE9SXG4gICAgICAgICAgICAgICAgICAgICR7dGFibGVbY29sdW1uTmFtZV19XG4gICAgICAgICAgICAgICAgICAgIElTXG4gICAgICAgICAgICAgICAgICAgIE5VTEwpYCxcbiAgICAgICAgICAgICAgICAgIClcblxuICAgICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAob3BlcmF0b3IgPT09ICdlcXVhbHMnICYmIHF1ZXJ5VmFsdWUgPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2goaXNOdWxsKHJhd0NvbHVtbiB8fCB0YWJsZVtjb2x1bW5OYW1lXSkpXG4gICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChvcGVyYXRvciA9PT0gJ25vdF9lcXVhbHMnICYmIHF1ZXJ5VmFsdWUgPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2goaXNOb3ROdWxsKHJhd0NvbHVtbiB8fCB0YWJsZVtjb2x1bW5OYW1lXSkpXG4gICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2goXG4gICAgICAgICAgICAgICAgICBvcGVyYXRvck1hcFtxdWVyeU9wZXJhdG9yXShyYXdDb2x1bW4gfHwgdGFibGVbY29sdW1uTmFtZV0sIHF1ZXJ5VmFsdWUpLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfVxuICBpZiAoY29uc3RyYWludHMubGVuZ3RoID4gMCkge1xuICAgIGlmIChyZXN1bHQpIHtcbiAgICAgIHJlc3VsdCA9IGFuZChyZXN1bHQ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DMUIsSUFBSUosUUFBUTtZQUNWQSxTQUFTNEQsSUFBQUEsZUFBRyxFQUFDNUQsV0FBV0M7UUFDMUIsT0FBTztZQUNMRCxTQUFTNEQsSUFBQUEsZUFBRyxLQUFJM0Q7UUFDbEI7SUFDRjtJQUNBLElBQUlBLFlBQVlHLE1BQU0sS0FBSyxLQUFLLENBQUNKLFFBQVE7UUFDdEMsQ0FBQ0EsT0FBTyxHQUFHQztJQUNkO0lBRUEsT0FBT0Q7QUFDVCJ9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/db-postgres",
3
- "version": "0.8.2",
3
+ "version": "0.8.4",
4
4
  "description": "The officially supported Postgres database adapter for Payload",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,7 +30,7 @@
30
30
  "@types/pg": "8.10.2",
31
31
  "@types/to-snake-case": "1.0.0",
32
32
  "@payloadcms/eslint-config": "1.1.1",
33
- "payload": "2.14.1"
33
+ "payload": "2.18.3"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "payload": "^2.0.0"