@payloadcms/db-postgres 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../src/connect.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AA+C/C,eAAO,MAAM,OAAO,EAAE,OAmGrB,CAAA"}
1
+ {"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../src/connect.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AA+C/C,eAAO,MAAM,OAAO,EAAE,OAuGrB,CAAA"}
package/dist/connect.js CHANGED
@@ -71,9 +71,11 @@ const connect = async function connect(payload) {
71
71
  schema: this.schema
72
72
  });
73
73
  if (process.env.PAYLOAD_DROP_DATABASE === 'true') {
74
- this.payload.logger.info('---- DROPPING TABLES ----');
75
- await this.drizzle.execute((0, _drizzleorm.sql)`drop schema public cascade;
76
- create schema public;`);
74
+ this.payload.logger.info(`---- DROPPING TABLES SCHEMA(${this.schemaName || 'public'}) ----`);
75
+ await this.drizzle.execute(_drizzleorm.sql.raw(`
76
+ drop schema if exists ${this.schemaName || 'public'} cascade;
77
+ create schema ${this.schemaName || 'public'};
78
+ `));
77
79
  this.payload.logger.info('---- DROPPED TABLES ----');
78
80
  }
79
81
  } catch (err) {
@@ -109,7 +111,7 @@ const connect = async function connect(payload) {
109
111
  }
110
112
  await apply();
111
113
  // Migration table def in order to use query using drizzle
112
- const migrationsSchema = (0, _pgcore.pgTable)('payload_migrations', {
114
+ const migrationsSchema = this.pgSchema.table('payload_migrations', {
113
115
  name: (0, _pgcore.varchar)('name'),
114
116
  batch: (0, _pgcore.numeric)('batch'),
115
117
  created_at: (0, _pgcore.timestamp)('created_at'),
@@ -128,4 +130,4 @@ const connect = async function connect(payload) {
128
130
  }
129
131
  };
130
132
 
131
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIj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_${(0, _tosnakecase.default)(field.name)}`;
64
+ const arrayTableName = `${currentTableName}_${path}${(0, _tosnakecase.default)(field.name)}`;
65
65
  if (adapter.tables[`${arrayTableName}_locales`]) withArray.with._locales = _locales;
66
66
  currentArgs.with[`${path}${field.name}`] = withArray;
67
67
  traverseFields({
@@ -147,4 +147,4 @@ const traverseFields = ({ _locales, adapter, currentArgs, currentTableName, dept
147
147
  return topLevelArgs;
148
148
  };
149
149
 
150
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9maW5kL3RyYXZlcnNlRmllbGRzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qIGVzbGludC1kaXNhYmxlIG5vLXBhcmFtLXJlYXNzaWduICovXG5pbXBvcnQgdHlwZSB7IEZpZWxkIH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxuaW1wb3J0IHsgZmllbGRBZmZlY3RzRGF0YSwgdGFiSGFzTmFtZSB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5pbXBvcnQgdG9TbmFrZUNhc2UgZnJvbSAndG8tc25ha2UtY2FzZSdcblxuaW1wb3J0IHR5cGUgeyBQb3N0Z3Jlc0FkYXB0ZXIgfSBmcm9tICcuLi90eXBlcydcbmltcG9ydCB0eXBlIHsgUmVzdWx0IH0gZnJvbSAnLi9idWlsZEZpbmRNYW55QXJncydcblxudHlwZSBUcmF2ZXJzZUZpZWxkQXJncyA9IHtcbiAgX2xvY2FsZXM6IFJlY29yZDxzdHJpbmcsIHVua25vd24+XG4gIGFkYXB0ZXI6IFBvc3RncmVzQWRhcHRlclxuICBjdXJyZW50QXJnczogUmVjb3JkPHN0cmluZywgdW5rbm93bj5cbiAgY3VycmVudFRhYmxlTmFtZTogc3RyaW5nXG4gIGRlcHRoPzogbnVtYmVyXG4gIGZpZWxkczogRmllbGRbXVxuICBwYXRoOiBzdHJpbmdcbiAgdG9wTGV2ZWxBcmdzOiBSZWNvcmQ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AgICAgICBjdXJyZW50VGFibGVOYW1lLFxuICAgICAgICAgIGRlcHRoLFxuICAgICAgICAgIGZpZWxkczogdGFiLmZpZWxkcyxcbiAgICAgICAgICBwYXRoOiB0YWJQYXRoLFxuICAgICAgICAgIHRvcExldmVsQXJncyxcbiAgICAgICAgICB0b3BMZXZlbFRhYmxlTmFtZSxcbiAgICAgICAgfSlcbiAgICAgIH0pXG5cbiAgICAgIHJldHVyblxuICAgIH1cblxuICAgIGlmIChmaWVsZEFmZmVjdHNEYXRhKGZpZWxkKSkge1xuICAgICAgc3dpdGNoIChmaWVsZC50eXBlKSB7XG4gICAgICAgIGNhc2UgJ2FycmF5Jzoge1xuICAgICAgICAgIGNvbnN0IHdpdGhBcnJheTogUmVzdWx0ID0ge1xuICAgICAgICAgICAgY29sdW1uczoge1xuICAgICAgICAgICAgICBfcGFyZW50SUQ6IGZhbHNlLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIG9yZGVyQnk6ICh7IF9vcmRlciB9LCB7IGFzYyB9KSA9PiBbYXNjKF9vcmRlcildLFxuICAgICAgICAgICAgd2l0aDoge30sXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY29uc3QgYXJyYXlUYWJsZU5hbWUgPSBgJHtjdXJyZW50VGFibGVOYW1lfV8ke3RvU25ha2VDYXNlKGZpZWxkLm5hbWUpfWBcblxuICAgICAgICAgIGlmIChhZGFwdGVyLnRhYmxlc1tgJHthcnJheVRhYmxlTmFtZX1fbG9jYWxlc2BdKSB3aXRoQXJyYXkud2l0aC5fbG9jYWxlcyA9IF9sb2NhbGVzXG4gICAgICAgICAgY3VycmVudEFyZ3Mud2l0aFtgJHtwYXRofSR7ZmllbGQubmFtZX1gXSA9IHdpdGhBcnJheVxuXG4gICAgICAgICAgdHJhdmVyc2VGaWVsZHMoe1xuICAgICAgICAgICAgX2xvY2FsZXMsXG4gICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgY3VycmVudEFyZ3M6IHdpdGhBcnJheSxcbiAgICAgICAgICAgIGN1cnJlbnRUYWJsZU5hbWU6IGFycmF5VGFibGVOYW1lLFxuICAgICAgICAgICAgZGVwdGgsXG4gICAgICAgICAgICBmaWVsZHM6IGZpZWxkLmZpZWxkcyxcbiAgICAgICAgICAgIHBhdGg6ICcnLFxuICAgICAgICAgICAgdG9wTGV2ZWxBcmdzLFxuICAgICAgICAgICAgdG9wTGV2ZWxUYWJsZU5hbWUsXG4gICAgICAgICAgfSlcblxuICAgICAgICAgIGJyZWFrXG4gICAgICAgIH1cblxuICAgICAgICBjYXNlICdzZWxlY3QnOiB7XG4gICAgICAgICAgaWYgKGZpZWxkLmhhc01hbnkpIHtcbiAgICAgICAgICAgIGNvbnN0IHdpdGhTZWxlY3Q6IFJlc3VsdCA9IHtcbiAgICAgICAgICAgICAgY29sdW1uczoge1xuICAgICAgICAgICAgICAgIGlkOiBmYWxzZSxcbiAgICAgICAgICAgICAgICBvcmRlcjogZmFsc2UsXG4gICAgICAgICAgICAgICAgcGFyZW50OiBmYWxzZSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgb3JkZXJCeTogKHsgb3JkZXIgfSwgeyBhc2MgfSkgPT4gW2FzYyhvcmRlcildLFxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjdXJyZW50QXJncy53aXRoW2Ake3BhdGh9JHtmaWVsZC5uYW1lfWBdID0gd2l0aFNlbGVjdFxuICAgICAgICAgIH1cblxuICAgICAgICAgIGJyZWFrXG4gICAgICAgIH1cblxuICAgICAgICBjYXNlICdibG9ja3MnOlxuICAgICAgICAgIGZpZWxkLmJsb2Nrcy5mb3JFYWNoKChibG9jaykgPT4ge1xuICAgICAgICAgICAgY29uc3QgYmxvY2tLZXkgPSBgX2Jsb2Nrc18ke2Jsb2NrLnNsdWd9YFxuXG4gICAgICAgICAgICBpZiAoIXRvcExldmVsQXJnc1tibG9ja0tleV0pIHtcbiAgICAgICAgICAgICAgY29uc3Qgd2l0aEJsb2NrOiBSZXN1bHQgPSB7XG4gICAgICAgICAgICAgICAgY29sdW1uczoge1xuICAgICAgICAgICAgICAgICAgX3BhcmVudElEOiBmYWxzZSxcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIG9yZGVyQnk6ICh7IF9vcmRlciB9LCB7IGFzYyB9KSA9PiBbYXNjKF9vcmRlcildLFxuICAgICAgICAgICAgICAgIHdpdGg6IHt9LFxuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgY29uc3QgdGFibGVOYW1lID0gYCR7dG9wTGV2ZWxUYWJsZU5hbWV9X2Jsb2Nrc18ke3RvU25ha2VDYXNlKGJsb2NrLnNsdWcpfWBcblxuICAgICAgICAgICAgICBpZiAoYWRhcHRlci50YWJsZXNbYCR7dGFibGVOYW1lfV9sb2NhbGVzYF0pIHdpdGhCbG9jay53aXRoLl9sb2NhbGVzID0gX2xvY2FsZXNcbiAgICAgICAgICAgICAgdG9wTGV2ZWxBcmdzLndpdGhbYmxvY2tLZXldID0gd2l0aEJsb2NrXG5cbiAgICAgICAgICAgICAgdHJhdmVyc2VGaWVsZHMoe1xuICAgICAgICAgICAgICAgIF9sb2NhbGVzLFxuICAgICAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICAgICAgY3VycmVudEFyZ3M6IHdpdGhCbG9jayxcbiAgICAgICAgICAgICAgICBjdXJyZW50VGFibGVOYW1lOiB0YWJsZU5hbWUsXG4gICAgICAgICAgICAgICAgZGVwdGgsXG4gICAgICAgICAgICAgICAgZmllbGRzOiBibG9jay5maWVsZHMsXG4gICAgICAgICAgICAgICAgcGF0aDogJycsXG4gICAgICAgICAgICAgICAgdG9wTGV2ZWxBcmdzLFxuICAgICAgICAgICAgICAgIHRvcExldmVsVGFibGVOYW1lLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pXG5cbiAgICAgICAgICBicmVha1xuXG4gICAgICAgIGNhc2UgJ2dyb3VwJzpcbiA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gICAgICAgICAgX2xvY2FsZXMsXG4gICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICBjdXJyZW50QXJncyxcbiAgICAgICAgICBjdXJyZW50VGFibGVOYW1lLFxuICAgICAgICAgIGRlcHRoLFxuICAgICAgICAgIGZpZWxkczogdGFiLmZpZWxkcyxcbiAgICAgICAgICBwYXRoOiB0YWJQYXRoLFxuICAgICAgICAgIHRvcExldmVsQXJncyxcbiAgICAgICAgICB0b3BMZXZlbFRhYmxlTmFtZSxcbiAgICAgICAgfSlcbiAgICAgIH0pXG5cbiAgICAgIHJldHVyblxuICAgIH1cblxuICAgIGlmIChmaWVsZEFmZmVjdHNEYXRhKGZpZWxkKSkge1xuICAgICAgc3dpdGNoIChmaWVsZC50eXBlKSB7XG4gICAgICAgIGNhc2UgJ2FycmF5Jzoge1xuICAgICAgICAgIGNvbnN0IHdpdGhBcnJheTogUmVzdWx0ID0ge1xuICAgICAgICAgICAgY29sdW1uczoge1xuICAgICAgICAgICAgICBfcGFyZW50SUQ6IGZhbHNlLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIG9yZGVyQnk6ICh7IF9vcmRlciB9LCB7IGFzYyB9KSA9PiBbYXNjKF9vcmRlcildLFxuICAgICAgICAgICAgd2l0aDoge30sXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY29uc3QgYXJyYXlUYWJsZU5hbWUgPSBgJHtjdXJyZW50VGFibGVOYW1lfV8ke3BhdGh9JHt0b1NuYWtlQ2FzZShmaWVsZC5uYW1lKX1gXG5cbiAgICAgICAgICBpZiAoYWRhcHRlci50YWJsZXNbYCR7YXJyYXlUYWJsZU5hbWV9X2xvY2FsZXNgXSkgd2l0aEFycmF5LndpdGguX2xvY2FsZXMgPSBfbG9jYWxlc1xuICAgICAgICAgIGN1cnJlbnRBcmdzLndpdGhbYCR7cGF0aH0ke2ZpZWxkLm5hbWV9YF0gPSB3aXRoQXJyYXlcblxuICAgICAgICAgIHRyYXZlcnNlRmllbGRzKHtcbiAgICAgICAgICAgIF9sb2NhbGVzLFxuICAgICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICAgIGN1cnJlbnRBcmdzOiB3aXRoQXJyYXksXG4gICAgICAgICAgICBjdXJyZW50VGFibGVOYW1lOiBhcnJheVRhYmxlTmFtZSxcbiAgICAgICAgICAgIGRlcHRoLFxuICAgICAgICAgICAgZmllbGRzOiBmaWVsZC5maWVsZHMsXG4gICAgICAgICAgICBwYXRoOiAnJyxcbiAgICAgICAgICAgIHRvcExldmVsQXJncyxcbiAgICAgICAgICAgIHRvcExldmVsVGFibGVOYW1lLFxuICAgICAgICAgIH0pXG5cbiAgICAgICAgICBicmVha1xuICAgICAgICB9XG5cbiAgICAgICAgY2FzZSAnc2VsZWN0Jzoge1xuICAgICAgICAgIGlmIChmaWVsZC5oYXNNYW55KSB7XG4gICAgICAgICAgICBjb25zdCB3aXRoU2VsZWN0OiBSZXN1bHQgPSB7XG4gICAgICAgICAgICAgIGNvbHVtbnM6IHtcbiAgICAgICAgICAgICAgICBpZDogZmFsc2UsXG4gICAgICAgICAgICAgICAgb3JkZXI6IGZhbHNlLFxuICAgICAgICAgICAgICAgIHBhcmVudDogZmFsc2UsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIG9yZGVyQnk6ICh7IG9yZGVyIH0sIHsgYXNjIH0pID0+IFthc2Mob3JkZXIpXSxcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY3VycmVudEFyZ3Mud2l0aFtgJHtwYXRofSR7ZmllbGQubmFtZX1gXSA9IHdpdGhTZWxlY3RcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVha1xuICAgICAgICB9XG5cbiAgICAgICAgY2FzZSAnYmxvY2tzJzpcbiAgICAgICAgICBmaWVsZC5ibG9ja3MuZm9yRWFjaCgoYmxvY2spID0+IHtcbiAgICAgICAgICAgIGNvbnN0IGJsb2NrS2V5ID0gYF9ibG9ja3NfJHtibG9jay5zbHVnfWBcblxuICAgICAgICAgICAgaWYgKCF0b3BMZXZlbEFyZ3NbYmxvY2tLZXldKSB7XG4gICAgICAgICAgICAgIGNvbnN0IHdpdGhCbG9jazogUmVzdWx0ID0ge1xuICAgICAgICAgICAgICAgIGNvbHVtbnM6IHtcbiAgICAgICAgICAgICAgICAgIF9wYXJlbnRJRDogZmFsc2UsXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBvcmRlckJ5OiAoeyBfb3JkZXIgfSwgeyBhc2MgfSkgPT4gW2FzYyhfb3JkZXIpXSxcbiAgICAgICAgICAgICAgICB3aXRoOiB7fSxcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIGNvbnN0IHRhYmxlTmFtZSA9IGAke3RvcExldmVsVGFibGVOYW1lfV9ibG9ja3NfJHt0b1NuYWtlQ2FzZShibG9jay5zbHVnKX1gXG5cbiAgICAgICAgICAgICAgaWYgKGFkYXB0ZXIudGFibGVzW2Ake3RhYmxlTmFtZX1fbG9jYWxlc2BdKSB3aXRoQmxvY2sud2l0aC5fbG9jYWxlcyA9IF9sb2NhbGVzXG4gICAgICAgICAgICAgIHRvcExldmVsQXJncy53aXRoW2Jsb2NrS2V5XSA9IHdpdGhCbG9ja1xuXG4gICAgICAgICAgICAgIHRyYXZlcnNlRmllbGRzKHtcbiAgICAgICAgICAgICAgICBfbG9jYWxlcyxcbiAgICAgICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgICAgIGN1cnJlbnRBcmdzOiB3aXRoQmxvY2ssXG4gICAgICAgICAgICAgICAgY3VycmVudFRhYmxlTmFtZTogdGFibGVOYW1lLFxuICAgICAgICAgICAgICAgIGRlcHRoLFxuICAgICAgICAgICAgICAgIGZpZWxkczogYmxvY2suZmllbGRzLFxuICAgICAgICAgICAgICAgIHBhdGg6ICcnLFxuICAgICAgICAgICAgICAgIHRvcExldmVsQXJncyxcbiAgICAgICAgICAgICAgICB0b3BMZXZlbFRhYmxlTmFtZSxcbiAgICAgICAgICAg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FDQUMsUUFBUTZCLE1BQU03QixNQUFNO2dDQUNwQkMsTUFBTTtnQ0FDTkM7Z0NBQ0FDOzRCQUNGO3dCQUNGO29CQUNGO29CQUVBO2dCQUVGLEtBQUs7b0JBQ0hULGVBQWU7d0JBQ2JDO3dCQUNBQzt3QkFDQUM7d0JBQ0FDO3dCQUNBQzt3QkFDQUMsUUFBUUssTUFBTUwsTUFBTTt3QkFDcEJDLE1BQU0sQ0FBQyxFQUFFQSxLQUFLLEVBQUVJLE1BQU1NLElBQUksQ0FBQyxDQUFDLENBQUM7d0JBQzdCVDt3QkFDQUM7b0JBQ0Y7b0JBRUE7Z0JBRUY7b0JBQVM7d0JBQ1A7b0JBQ0Y7WUFDRjtRQUNGO0lBQ0Y7SUFFQSxPQUFPRDtBQUNUIn0=
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAmB,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAiC3E,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE7D,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,qBAAqB,CA8DjE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAmB,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAiC3E,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE7D,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,qBAAqB,CAgEjE"}
package/dist/index.js CHANGED
@@ -58,11 +58,13 @@ function postgresAdapter(args) {
58
58
  fieldConstraints: {},
59
59
  idType,
60
60
  logger: args.logger,
61
+ pgSchema: undefined,
61
62
  pool: undefined,
62
63
  poolOptions: args.pool,
63
64
  push: args.push,
64
65
  relations: {},
65
66
  schema: {},
67
+ schemaName: args.schemaName,
66
68
  sessions: {},
67
69
  tables: {},
68
70
  // DatabaseAdapter
@@ -138,4 +140,4 @@ function postgresAdapter(args) {
138
140
  return srcDir;
139
141
  }
140
142
 
141
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7IFBheWxvYWQgfSBmcm9tICdwYXlsb2FkJ1xuXG5pbXBvcnQgZnMgZnJvbSAnZnMnXG5pbXBvcnQgcGF0aCBmcm9tICdwYXRoJ1xuaW1wb3J0IHsgY3JlYXRlRGF0YWJhc2VBZGFwdGVyIH0gZnJvbSAncGF5bG9hZC9kYXRhYmFzZSdcblxuaW1wb3J0IHR5cGUgeyBBcmdzLCBQb3N0Z3Jlc0FkYXB0ZXIsIFBvc3RncmVzQWRhcHRlclJlc3VsdCB9IGZyb20gJy4vdHlwZXMnXG5cbmltcG9ydCB7IGNvbm5lY3QgfSBmcm9tICcuL2Nvbm5lY3QnXG5pbXBvcnQgeyBjcmVhdGUgfSBmcm9tICcuL2NyZWF0ZSdcbmltcG9ydCB7IGNyZWF0ZUdsb2JhbCB9IGZyb20gJy4vY3JlYXRlR2xvYmFsJ1xuaW1wb3J0IHsgY3JlYXRlR2xvYmFsVmVyc2lvbiB9IGZyb20gJy4vY3JlYXRlR2xvYmFsVmVyc2lvbidcbmltcG9ydCB7IGNyZWF0ZU1pZ3JhdGlvbiB9IGZyb20gJy4vY3JlYXRlTWlncmF0aW9uJ1xuaW1wb3J0IHsgY3JlYXRlVmVyc2lvbiB9IGZyb20gJy4vY3JlYXRlVmVyc2lvbidcbmltcG9ydCB7IGRlbGV0ZU1hbnkgfSBmcm9tICcuL2RlbGV0ZU1hbnknXG5pbXBvcnQgeyBkZWxldGVPbmUgfSBmcm9tICcuL2RlbGV0ZU9uZSdcbmltcG9ydCB7IGRlbGV0ZVZlcnNp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yxzQkFBc0I7SUFDdEIsSUFBSWxELGNBQWMsT0FBT0E7SUFFekIsK0JBQStCO0lBQy9CLElBQUl5RCxXQUFFLENBQUNDLFVBQVUsQ0FBQ04sU0FBUztRQUN6QixPQUFPQTtJQUNUO0lBRUEsSUFBSUssV0FBRSxDQUFDQyxVQUFVLENBQUNILFVBQVU7UUFDMUIsT0FBT0E7SUFDVDtJQUVBLElBQUlFLFdBQUUsQ0FBQ0MsVUFBVSxDQUFDRixxQkFBcUI7UUFDckMsT0FBT0E7SUFDVDtJQUVBLE9BQU9KO0FBQ1QifQ==
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAW5C,eAAO,MAAM,IAAI,EAAE,IAyElB,CAAA"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAW5C,eAAO,MAAM,IAAI,EAAE,IA+ElB,CAAA"}
package/dist/init.js CHANGED
@@ -18,6 +18,13 @@ function _interop_require_default(obj) {
18
18
  };
19
19
  }
20
20
  const init = async function init() {
21
+ if (this.schemaName) {
22
+ this.pgSchema = (0, _pgcore.pgSchema)(this.schemaName);
23
+ } else {
24
+ this.pgSchema = {
25
+ table: _pgcore.pgTable
26
+ };
27
+ }
21
28
  if (this.payload.config.localization) {
22
29
  this.enums.enum__locales = (0, _pgcore.pgEnum)('_locales', this.payload.config.localization.locales.map(({ code })=>code));
23
30
  }
@@ -81,4 +88,4 @@ const init = async function init() {
81
88
  });
82
89
  };
83
90
 
84
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbml0LnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qIGVzbGludC1kaXNhYmxlIG5vL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UUFDRjtJQUNGO0lBRUEsSUFBSSxDQUFDekIsT0FBTyxDQUFDQyxNQUFNLENBQUM0QixPQUFPLENBQUNuQixPQUFPLENBQUMsQ0FBQ29CO1FBQ25DLE1BQU1sQixZQUFZQyxJQUFBQSxvQkFBVyxFQUFDaUIsT0FBT2hCLElBQUk7UUFFekNDLElBQUFBLGlCQUFVLEVBQUM7WUFDVEMsU0FBUyxJQUFJO1lBQ2JDLGNBQWM7WUFDZEMsb0JBQW9CO1lBQ3BCQyxZQUFZO1lBQ1pDLGdCQUFnQixDQUFDLENBQUNVLFFBQVFULFVBQVVDO1lBQ3BDQyxlQUFlO1lBQ2ZDLFFBQVFNLE9BQU9OLE1BQU07WUFDckJaO1lBQ0FhLFlBQVk7UUFDZDtRQUVBLElBQUlLLE9BQU9ULFFBQVEsRUFBRTtZQUNuQixNQUFNSyxvQkFBb0IsQ0FBQyxDQUFDLEVBQUVkLFVBQVUsRUFBRSxDQUFDO1lBQzNDLE1BQU1lLGdCQUFnQkksSUFBQUEsa0NBQXdCLEVBQUNEO1lBRS9DZixJQUFBQSxpQkFBVSxFQUFDO2dCQUNUQyxTQUFTLElBQUk7Z0JBQ2JDLGNBQWM7Z0JBQ2RDLG9CQUFvQjtnQkFDcEJDLFlBQVk7Z0JBQ1pDLGdCQUFnQixDQUFDLENBQUNVLE9BQU9ULFFBQVEsRUFBRUM7Z0JBQ25DQyxlQUFlO2dCQUNmQyxRQUFRRztnQkFDUmYsV0FBV2M7Z0JBQ1hELFlBQVk7WUFDZDtRQUNGO0lBQ0Y7QUFDRiJ9
package/dist/migrate.js CHANGED
@@ -45,7 +45,7 @@ async function migrate() {
45
45
  latestBatch = Number(migrationsInDB[0]?.batch);
46
46
  }
47
47
  } else {
48
- await (0, _createMigrationTable.createMigrationTable)(this.drizzle);
48
+ await (0, _createMigrationTable.createMigrationTable)(this);
49
49
  }
50
50
  if (migrationsInDB.find((m)=>m.batch === -1)) {
51
51
  const { confirm: runMigrations } = await (0, _prompts.default)({
@@ -112,4 +112,4 @@ async function runMigrationFile(payload, migration, batch) {
112
112
  }
113
113
  }
114
114
 
115
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9taWdyYXRlLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qIGVzbGludC1kaXNhYmxlIG5vLXJlc3RyaWN0ZWQtc3ludGF4LCBuby1hd2FpdC1pbi1sb29wICovXG5pbXBvcnQgdHlwZSB7IFBheWxvYWQgfSBmcm9tICdwYXlsb2FkJ1xuaW1wb3J0IHR5cGUgeyBNaWdyYXRpb24gfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuaW1wb3J0IHR5cGUgeyBQYXlsb2FkUmVxdWVzdCB9IGZyb20gJ3BheWxvYWQvZGlzdC9leHByZXNzL3R5cGVzJ1xuXG5pbXBvcnQgeyByZWFkTWlncmF0aW9uRmlsZXMgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuaW1wb3J0IHsgY29tbWl0VHJhbnNhY3Rpb24gfSBmcm9tICdwYXlsb2FkL2Rpc3QvdXRpbGl0aWVzL2NvbW1pdFRyYW5zYWN0aW9uJ1xuaW1wb3J0IHsgaW5pdFRyYW5zYWN0aW9uIH0gZnJvbSAncGF5bG9hZC9kaXN0L3V0aWxpdGllcy9pbml0VHJhbnNhY3Rpb24nXG5pbXBvcnQgeyBraWxsVHJhbnNhY3Rpb24gfSBmcm9tICdwYXlsb2FkL2Rpc3QvdXRpbGl0aWVzL2tpbGxUcmFuc2FjdGlvbidcbmltcG9ydCBwcm9tcHRzIGZyb20gJ3Byb21wdHMnXG5cbmltcG9ydCB0eXBlIHsgUG9zdGdyZXNBZGFwdGVyIH0gZnJvbSAnLi90eXBlcydcblxuaW1wb3J0IHsgY3JlYXRlTWlncmF0aW9uVGFibGUgfSBmcm9tICcuL3V0aWxpdGllcy9jcmVhdGVNaWdyYXRpb25UYWJsZSdcbmltcG9ydCB7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EAAE,eAAe,EACrB,EAAE,kBAA0B,EAAE;;CAAA,GAC7B,OAAO,CAAC,IAAI,CAAC,CA8Df"}
1
+ {"version":3,"file":"migrateFresh.d.ts","sourceRoot":"","sources":["../src/migrateFresh.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C;;GAEG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,eAAe,EACrB,EAAE,kBAA0B,EAAE;;CAAA,GAC7B,OAAO,CAAC,IAAI,CAAC,CAgEf"}
@@ -40,8 +40,8 @@ async function migrateFresh({ forceAcceptWarning = false }) {
40
40
  payload.logger.info({
41
41
  msg: `Dropping database.`
42
42
  });
43
- await this.drizzle.execute((0, _drizzleorm.sql)`drop schema public cascade;
44
- create schema public;`);
43
+ await this.drizzle.execute(_drizzleorm.sql.raw(`drop schema ${this.schemaName || 'public'} cascade;
44
+ create schema ${this.schemaName || 'public'};`));
45
45
  const migrationFiles = await (0, _database.readMigrationFiles)({
46
46
  payload
47
47
  });
@@ -85,4 +85,4 @@ async function migrateFresh({ forceAcceptWarning = false }) {
85
85
  }
86
86
  }
87
87
 
88
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9taWdyYXRlRnJlc2gudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBQYXlsb2FkUmVxdWVzdCB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmltcG9ydCB7IHNxbCB9IGZyb20gJ2RyaXp6bGUtb3JtJ1xuaW1wb3J0IHsgcmVhZE1pZ3JhdGlvbkZpbGVzIH0gZnJvbSAncGF5bG9hZC9kYXRhYmFzZSdcbmltcG9ydCB7IGNvbW1pdFRyYW5zYWN0aW9uIH0gZnJvbSAncGF5bG9hZC9kaXN0L3V0aWxpdGllcy9jb21taXRUcmFuc2FjdGlvbidcbmltcG9ydCB7IGluaXRUcmFu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BQU0sQ0FBQztnQkFDbkJDLFlBQVk7Z0JBQ1pDLE1BQU07b0JBQ0o1QixNQUFNb0IsVUFBVXBCLElBQUk7b0JBQ3BCNkIsT0FBTztnQkFDVDtnQkFDQVY7WUFDRjtZQUNBLE1BQU1XLElBQUFBLG9DQUFpQixFQUFDWDtZQUV4QnZCLFFBQVFXLE1BQU0sQ0FBQ0MsSUFBSSxDQUFDO2dCQUFFQyxLQUFLLENBQUMsV0FBVyxFQUFFVyxVQUFVcEIsSUFBSSxDQUFDLEVBQUUsRUFBRXNCLEtBQUtDLEdBQUcsS0FBS0YsTUFBTSxHQUFHLENBQUM7WUFBQztRQUN0RixFQUFFLE9BQU9VLEtBQWM7WUFDckIsTUFBTUMsSUFBQUEsZ0NBQWUsRUFBQ2I7WUFDdEJ2QixRQUFRVyxNQUFNLENBQUMwQixLQUFLLENBQUM7Z0JBQ25CRjtnQkFDQXRCLEtBQUt5QixJQUFBQSxzQkFBVSxFQUFDSCxLQUFLLENBQUMsd0JBQXdCLEVBQUVYLFVBQVVwQixJQUFJLENBQUMsY0FBYyxDQUFDO1lBQ2hGO1FBQ0Y7SUFDRjtBQUNGIn0=
@@ -1,11 +1,12 @@
1
1
  import type { SQL } from 'drizzle-orm';
2
+ import type { PgTableWithColumns } from 'drizzle-orm/pg-core';
2
3
  import type { Field, Where } from 'payload/types';
3
4
  import { asc, desc } from 'drizzle-orm';
4
5
  import type { GenericColumn, GenericTable, PostgresAdapter } from '../types';
5
6
  export type BuildQueryJoins = Record<string, SQL>;
6
7
  export type BuildQueryJoinAliases = {
7
8
  condition: SQL;
8
- table: GenericTable;
9
+ table: GenericTable | PgTableWithColumns<any>;
9
10
  }[];
10
11
  type BuildQueryArgs = {
11
12
  adapter: PostgresAdapter;
@@ -1 +1 @@
1
- {"version":3,"file":"buildQuery.d.ts","sourceRoot":"","sources":["../../src/queries/buildQuery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CA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AAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAK5E,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAEjD,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,EAAE,GAAG,CAAA;IACd,KAAK,EAAE,YAAY,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAA;CAC9C,EAAE,CAAA;AAEH,KAAK,cAAc,GAAG;IACpB,OAAO,EAAE,eAAe,CAAA;IACxB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,KAAK,CAAA;CACb,CAAA;AAED,KAAK,MAAM,GAAG;IACZ,WAAW,EAAE,qBAAqB,CAAA;IAClC,KAAK,EAAE,eAAe,CAAA;IACtB,OAAO,EAAE;QACP,MAAM,EAAE,aAAa,CAAA;QACrB,KAAK,EAAE,OAAO,GAAG,GAAG,OAAO,IAAI,CAAA;KAChC,CAAA;IACD,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IAC3C,KAAK,EAAE,GAAG,CAAA;CACX,CAAA;AACD,QAAA,MAAM,UAAU,wEAOb,cAAc,KAAG,QAAQ,MAAM,CA+EjC,CAAA;AAED,eAAe,UAAU,CAAA"}
@@ -83,4 +83,4 @@ const buildQuery = async function buildQuery({ adapter, fields, locale, sort, ta
83
83
  };
84
84
  const _default = buildQuery;
85
85
 
86
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9xdWVyaWVzL2J1aWxkUXV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QUNGO0lBRUEsSUFBSUksUUFBUUMsTUFBTSxFQUFFO1FBQ2xCTixhQUFhSixJQUFJLEdBQUdTLFFBQVFDLE1BQU07SUFDcEM7SUFFQSxJQUFJUjtJQUVKLElBQUlDLGlCQUFpQnlCLE9BQU9DLElBQUksQ0FBQzFCLGVBQWUyQixNQUFNLEdBQUcsR0FBRztRQUMxRDVCLFFBQVEsTUFBTTZCLElBQUFBLHdCQUFXLEVBQUM7WUFDeEJsQztZQUNBQztZQUNBVTtZQUNBRDtZQUNBUjtZQUNBSztZQUNBSDtZQUNBQyxPQUFPQztRQUNUO0lBQ0Y7SUFFQSxPQUFPO1FBQ0xLO1FBQ0FEO1FBQ0FFO1FBQ0FMO1FBQ0FGO0lBQ0Y7QUFDRjtNQUVBLFdBQWVOIn0=
@@ -1,10 +1,11 @@
1
1
  import type { SQL } from 'drizzle-orm';
2
+ import type { PgTableWithColumns } from 'drizzle-orm/pg-core';
2
3
  import type { Field, FieldAffectingData, TabAsField } from 'payload/types';
3
4
  import type { GenericColumn, GenericTable, PostgresAdapter } from '../types';
4
5
  import type { BuildQueryJoinAliases, BuildQueryJoins } from './buildQuery';
5
6
  type Constraint = {
6
7
  columnName: string;
7
- table: GenericTable;
8
+ table: GenericTable | PgTableWithColumns<any>;
8
9
  value: unknown;
9
10
  };
10
11
  type TableColumn = {
@@ -14,11 +15,11 @@ type TableColumn = {
14
15
  getNotNullColumnByValue?: (val: unknown) => string;
15
16
  pathSegments?: string[];
16
17
  rawColumn?: SQL;
17
- table: GenericTable;
18
+ table: GenericTable | PgTableWithColumns<any>;
18
19
  };
19
20
  type Args = {
20
21
  adapter: PostgresAdapter;
21
- aliasTable?: GenericTable;
22
+ aliasTable?: GenericTable | PgTableWithColumns<any>;
22
23
  collectionPath: string;
23
24
  columnPrefix?: string;
24
25
  constraintPath?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"getTableColumnFromPath.d.ts","sourceRoot":"","sources":["../../src/queries/getTableColumnFromPath.ts"],"names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IACxB,UAAU,CAAC,EAAE,YAAY,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAA;IACnD,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAA;IAC1B,MAAM,EAAE,CAAC,KAAK,GAAG,UAAU,CAAC,EAAE,CAAA;IAC9B,WAAW,EAAE,qBAAqB,CAAA;IAClC,KAAK,EAAE,eAAe,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IAC3C,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;OAEG;IACH,KAAK,EAAE,OAAO,CAAA;CACf,CAAA;AACD;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,2RAiBhC,IAAI,KAAG,WAgZT,CAAA"}
@@ -376,4 +376,4 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
376
376
  throw new _errors.APIError(`Cannot find field for path at ${fieldPath}`);
377
377
  };
378
378
 
379
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9xdWVyaWVzL2dldFRhYmxlQ29sdW1uRnJvbVBhdGgudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcGFyYW0tcmVhc3NpZ24gKi9cbmltcG9ydCB0eXBlIHsgU1FMIH0gZnJvbSAnZHJpenpsZS1vcm0nXG5pbXBvcnQgdHlwZSB7ICBGaWVsZCwgRmllbGRBZmZlY3RpbmdEYXRhLCBOdW1iZXJGaWVsZCwgVGFiQXNGaWVsZCw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LnNwbGljZSgxLCAxKVxuICAgICAgfVxuICAgIH1cblxuICAgIHN3aXRjaCAoZmllbGQudHlwZSkge1xuICAgICAgY2FzZSAndGFicyc6IHtcbiAgICAgICAgcmV0dXJuIGdldFRhYmxlQ29sdW1uRnJvbVBhdGgoe1xuICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgYWxpYXNUYWJsZSxcbiAgICAgICAgICBjb2xsZWN0aW9uUGF0aCxcbiAgICAgICAgICBjb2x1bW5QcmVmaXgsXG4gICAgICAgICAgY29uc3RyYWludFBhdGgsXG4gICAgICAgICAgY29uc3RyYWludHMsXG4gICAgICAgICAgZmllbGRzOiBmaWVsZC50YWJzLm1hcCgodGFiKSA9PiAoe1xuICAgICAgICAgICAgLi4udGFiLFxuICAgICAgICAgICAgdHlwZTogJ3RhYicsXG4gICAgICAgICAgfSkpLFxuICAgICAgICAgIGpvaW5BbGlhc2VzLFxuICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICBwYXRoU2VnbWVudHM6IHBhdGhTZWdtZW50cy5zbGljZSgxKSxcbiAgICAgICAgICByb290VGFibGVOYW1lLFxuICAgICAgICAgIHNlbGVjdEZpZWxkcyxcbiAgICAgICAgICB0YWJsZU5hbWU6IG5ld1RhYmxlTmFtZSxcbiAgICAgICAgICB0YWJsZU5hbWVTdWZmaXgsXG4gICAgICAgICAgdmFsdWUsXG4gICAgICAgIH0pXG4gICAgICB9XG4gICAgICBjYXNlICd0YWInOiB7XG4gICAgICAgIGlmICh0YWJIYXNOYW1lKGZpZWxkKSkge1xuICAgICAgICAgIHJldHVybiBnZXRUYWJsZUNvbHVtbkZyb21QYXRoKHtcbiAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICBhbGlhc1RhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvblBhdGgsXG4gICAgICAgICAgICBjb2x1bW5QcmVmaXg6IGAke2NvbHVtblByZWZpeH0ke2ZpZWxkLm5hbWV9X2AsXG4gICAgICAgICAgICBjb25zdHJhaW50UGF0aDogYCR7Y29uc3RyYWludFBhdGh9JHtmaWVsZC5uYW1lfS5gLFxuICAgICAgICAgICAgY29uc3RyYWludHMsXG4gICAgICAgICAgICBmaWVsZHM6IGZpZWxkLmZpZWxkcyxcbiAgICAgICAgICAgIGpvaW5BbGlhc2VzLFxuICAgICAgICAgICAgam9pbnMsXG4gICAgICAgICAgICBsb2NhbGUsXG4gICAgICAgICAgICBwYXRoU2VnbWVudHM6IHBhdGhTZWdtZW50cy5zbGljZSgxKSxcbiAgICAgICAgICAgIHJvb3RUYWJsZU5hbWUsXG4gICAgICAgICAgICBzZWxlY3RGaWVsZHMsXG4gICAgICAgICAgICB0YWJsZU5hbWU6IG5ld1RhYmxlTmFtZSxcbiAgICAgICAgICAgIHRhYmxlTmFtZVN1ZmZpeDogYCR7dGFibGVOYW1lU3VmZml4fSR7dG9TbmFrZUNhc2UoZmllbGQubmFtZSl9X2AsXG4gICAgICAgICAgICB2YWx1ZSxcbiAgICAgICAgICB9KVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBnZXRUYWJsZUNvbHVtbkZyb21QYXRoKHtcbiAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgIGFsaWFzVGFibGUsXG4gICAgICAgICAgY29sbGVjdGlvblBhdGgsXG4gICAgICAgICAgY29sdW1uUHJlZml4LFxuICAgICAgICAgIGNvbnN0cmFpbnRQYXRoLFxuICAgICAgICAgIGNvbnN0cmFpbnRzLFxuICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgIGpvaW5BbGlhc2VzLFxuICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICBwYXRoU2VnbWVudHM6IHBhdGhTZWdtZW50cy5zbGljZSgxKSxcbiAgICAgICAgICByb290VGFibGVOYW1lLFxuICAgICAgICAgIHNlbGVjdEZpZWxkcyxcbiAgICAgICAgICB0YWJsZ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gICBpZiAobG9jYWxlICE9PSAnYWxsJykge1xuICAgICAgICAgICAgY29uc3RyYWludHMucHVzaCh7XG4gICAgICAgICAgICAgIGNvbHVtbk5hbWU6ICdfbG9jYWxlJyxcbiAgICAgICAgICAgICAgdGFibGU6IGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0sXG4gICAgICAgICAgICAgIHZhbHVlOiBsb2NhbGUsXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBqb2luc1tuZXdUYWJsZU5hbWVdID0gZXEoXG4gICAgICAgICAgICBhZGFwdGVyLnRhYmxlc1t0YWJsZU5hbWVdLmlkLFxuICAgICAgICAgICAgYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXS5fcGFyZW50SUQsXG4gICAgICAgICAgKVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBnZXRUYWJsZUNvbHVtbkZyb21QYXRoKHtcbiAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgIGNvbGxlY3Rpb25QYXRoLFxuICAgICAgICAgIGNvbnN0cmFpbnRQYXRoLFxuICAgICAgICAgIGNvbnN0cmFpbnRzLFxuICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgIGpvaW5BbGlhc2VzLFxuICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICBwYXRoU2VnbWVudHM6IHBhdGhTZWdtZW50cy5zbGljZSgxKSxcbiAgICAgICAgICByb290VGFibGVOYW1lLFxuICAgICAgICAgIHNlbGVjdEZpZWxkcyxcbiAgICAgICAgICB0YWJsZU5hbWU6IG5ld1RhYmxlTmFtZSxcbiAgICAgICAgICB2YWx1ZSxcbiAgICAgICAgfSlcbiAgICAgIH1cblxuICAgICAgY2FzZSAnYmxvY2tzJzoge1xuICAgICAgICBsZXQgYmxvY2tUYWJsZUNvbHVtbjogVGFibGVDb2x1bW5cbiAgICAgICAgbGV0IG5ld1RhYmxlTmFtZTogc3RyaW5nXG5cbiAgICAgICAgLy8gaGFuZGxlIGJsb2NrVHlwZSBxdWVyaWVzXG4gICAgICAgIGlmIChwYXRoU2VnbWVudHNbMV0gPT09ICdibG9ja1R5cGUnKSB7XG4gICAgICAgICAgLy8gZmluZCB0aGUgYmxvY2sgY29uZmlnIHVzaW5nIHRoZSB2YWx1ZVxuICAgICAgICAgIGNvbnN0IGJsb2NrVHlwZXMgPSBBcnJheS5pc0FycmF5KHZhbHVlKSA/IHZhbHVlIDogW3ZhbHVlXVxuICAgICAgICAgIGJsb2NrVHlwZXMuZm9yRWFjaCgoYmxvY2tUeXBlKSA9PiB7XG4gICAgICAgICAgICBjb25zdCBibG9jayA9IGZpZWxkLmJsb2Nrcy5maW5kKChibG9jaykgPT4gYmxvY2suc2x1ZyA9PT0gYmxvY2tUeXBlKVxuICAgICAgICAgICAgbmV3VGFibGVOYW1lID0gYCR7dGFibGVOYW1lfV9ibG9ja3NfJHt0b1NuYWtlQ2FzZShibG9jay5zbHVnKX1gXG4gICAgICAgICAgICBqb2luc1tuZXdUYWJsZU5hbWVdID0gZXEoXG4gICAgICAgICAgICAgIGFkYXB0ZXIudGFibGVzW3RhYmxlTmFtZV0uaWQsXG4gICAgICAgICAgICAgIGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0uX3BhcmVudElELFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgY29uc3RyYWludHMucHVzaCh7XG4gICAgICAgICAgICAgIGNvbHVtbk5hbWU6ICdfcGF0aCcsXG4gICAgICAgICAgICAgIHRhYmxlOiBhZGFwdGVyLnRhYmxlc1tuZXdUYWJsZU5hbWVdLFxuICAgICAgICAgICAgICB2YWx1ZTogcGF0aFNlZ21lbnRzWzBdLFxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9KVxuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBjb25zdHJhaW50cyxcbiAgICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgICAgZ2V0Tm90TnVsbENvbHVtbkJ5VmFsdWU6ICgpID0+ICdpZCcsXG4gICAgICAgICAgICB0YWJsZTogYWRhcHRlci50YWJsZXNbdGFibGVOYW1lXSxcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBoYXNCbG9ja0ZpZWxkID0gZmllbGQuYmxvY2tzLnNvbWUoKGJsb2NrKSA9PiB7XG4gICAgICAgICAgbmV3VGFibGVOYW1lID0gYCR7dGFibGVOYW1lfV9ibG9ja3NfJHt0b1NuYWtlQ2FzZShibG9jay5zbHVnKX1gXG4gICAgICAgICAgY29uc3RyYWludFBhdGggPSBgJHtjb25zdHJhaW50UGF0aH0ke2ZpZWxkLm5hbWV9LiUuYFxuICAgICAgICAgIGxldCByZXN1bHRcbiAgICAgICAgICBjb25zdCBibG9ja0NvbnN0cmFpbnRzID0gW11cbiAgICAgICAgICBjb25zdCBibG9ja1NlbGVjdEZpZWxkcyA9IHt9XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHJlc3VsdCA9IGdldFRhYmxlQ29sdW1uRnJvbVBhdGgoe1xuICAgICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgICBjb2xsZWN0aW9uUGF0aCxcbiAgICAgICAgICAgICAgY29uc3RyYWludFBhdGgsXG4gICAgICAgICAgICAgIGNvbnN0cmFpbnRzOiBibG9ja0NvbnN0cmFpbnRzLFxuICAgICAgICAgICAgICBmaWVsZHM6IGJsb2NrLmZpZWxkcyxcbiAgICAgICAgICAgICAgam9pbkFsaWFzZXMsXG4gICAgICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgICAgICBsb2NhbGUsXG4gICAgICAgICAgICAgIHBhdGhTZWdtZW50czogcGF0aFNlZ21lbnRzLnNsaWNlKDEpLFxuICAgICAgICAgICAgICByb290VGFibGVOYW1lLFxuICAgICAgICAgICAgICBzZWxlY3RGaWVsZHM6IGJsb2NrU2VsZWN0RmllbGRzLFxuICAgICAgICAgICAgICB0YWJsZU5hbWU6IG5ld1RhYmxlTmFtZSxcbiAgICAgICAgICAgICAgdmFsdWUsXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICAvLyB0aGlzIGlzIGZpbmUsIG5vdCBldmVyeSBibG9jayB3aWxsIGhhdmUgdGhlIGZpZWxkXG4gICAgICAgICAgfVxuICAgICAgICAgIGlmICghcmVzdWx0KSB7XG4gICAgICAgICAgICByZXR1cm5cbiAgICAgICAgICB9XG4gICAgICAgICAgYmxvY2tUYWJsZUNvbHVtbiA9IHJlc3VsdFxuICAgICAgICAgIGNvbnN0cmFpbnRzID0gY29uc3RyYWludHMuY29uY2F0KGJsb2NrQ29uc3RyYWludHMpXG4gICAgICAgICAgc2VsZWN0RmllbGRzID0geyAuLi5zZWxlY3RGaWVsZHMsIC4uLmJsb2NrU2VsZWN0RmllbGRzIH1cbiAgICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkICYmIGFkYXB0ZXIucGF5bG9hZC5jb25maWcubG9jYWxpemF0aW9uKSB7XG4gICAgICAgICAgICBqb2luc1tuZXdUYWJsZU5hbWVdID0gYW5kKFxuICAgICAgICAgICAgICBlcShhZGFwdGVyLnRhYmxlc1t0YWJsZU5hbWVdLmlkLCBhZGFwdGVyLnRhYmxlc1tuZXdUYWJsZU5hbWVdLl9wYXJlbnRJRCksXG4gICAgICAgICAgICAgIGVxKGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0uX2xvY2FsZSwgbG9jYWxlKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGlmIChsb2NhbGUpIHtcbiAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaCh7XG4gICAgICAgICAgICAgICAgY29sdW1uTmFtZTogJ19sb2NhbGUnLFxuICAgICAgICAgICAgICAgIHRhYmxlOiBhZGFwdGVyLnRhYmxlc1tuZXdUYWJsZU5hbWVdLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBsb2NhbGUsXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGpvaW5zW25ld1RhYmxlTmFtZV0gPSBlcShcbiAgICAgICAgICAgICAgYWRhcHRlci50YWJsZXNbdGFibGVOYW1lXS5pZCxcbiAgICAgICAgICAgICAgYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXS5fcGFyZW50SUQsXG4gICAgICAgICAgICApXG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiB0cnVlXG4gICAgICAgIH0pXG4gICAgICAgIGlmIChoYXNCbG9ja0ZpZWxkKSB7XG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGNvbHVtbk5hbWU6IGJsb2NrVGFibGVDb2x1bW4uY29sdW1uTmFtZSxcbiAgICAgICAgICAgIGNvbnN0cmFpbnRzLFxuICAgICAgICAgICAgZmllbGQ6IGJsb2NrVGFibGVDb2x1bW4uZmllbGQsXG4gICAgICAgICAgICBwYXRoU2VnbWVudHM6IHBhdGhTZWdtZW50cy5zbGljZSgxKSxcbiAgICAgICAgICAgIHJhd0NvbHVtbjogYmxvY2tUYWJsZUNvbHVtbi5yYXdDb2x1bW4sXG4gICAgICAgICAgICB0YWJsZTogYmxvY2tUYWJsZUNvbHVtbi50YWJsZSxcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgYnJlYWtcbiAgICAgIH1cblxuICAgICAgY2FzZSAncmVsYXRpb25zaGlwJzpcbiAgICAgIGNhc2UgJ3VwbG9hZCc6IHtcbiAgICAgICAgbGV0IHJlbGF0aW9uc2hpcEZpZWxkc1xuICAgICAgICBjb25zdCByZWxhdGlvblRhYmxlTmFtZSA9IGAke3Jvb3RUYWJsZU5hbWV9X3JlbHNgXG4gICAgICAgIGNvbnN0IG5ld0NvbGxlY3Rpb25QYXRoID0gcGF0aFNlZ21lbnRzLnNsaWNlKD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ICAgKVxuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBjb25zdHJhaW50cyxcbiAgICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgICAgcmF3Q29sdW1uOiBzcWwucmF3KGBDT0FMRVNDRSgke3RhYmxlQ29sdW1uc05hbWVzLmpvaW4oJywgJyl9KWApLFxuICAgICAgICAgICAgdGFibGU6IGFsaWFzUmVsYXRpb25zaGlwVGFibGUsXG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKG5ld0NvbGxlY3Rpb25QYXRoID09PSAncmVsYXRpb25UbycpIHtcbiAgICAgICAgICBjb25zdCByZWxhdGlvblRvID0gQXJyYXkuaXNBcnJheShmaWVsZC5yZWxhdGlvblRvKSA/IGZpZWxkLnJlbGF0aW9uVG8gOiBbZmllbGQucmVsYXRpb25Ub11cblxuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBjb25zdHJhaW50cyxcbiAgICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgICAgZ2V0Tm90TnVsbENvbHVtbkJ5VmFsdWU6ICh2YWwpID0+IHtcbiAgICAgICAgICAgICAgY29uc3QgbWF0Y2hlZFJlbGF0aW9uID0gcmVsYXRpb25Uby5maW5kKChyZWxhdGlvbikgPT4gcmVsYXRpb24gPT09IHZhbClcbiAgICAgICAgICAgICAgaWYgKG1hdGNoZWRSZWxhdGlvbikgcmV0dXJuIGAke21hdGNoZWRSZWxhdGlvbn1JRGBcbiAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHRhYmxlOiBhbGlhc1JlbGF0aW9uc2hpcFRhYmxlLFxuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB0aHJvdyBuZXcgQVBJRXJyb3IoJ05vdCBzdXBwb3J0ZWQnKVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGdldFRhYmxlQ29sdW1uRnJvbVBhd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XG5cbiAgICAgICAgICAgIGpvaW5zW25ld1RhYmxlTmFtZV0gPSBlcShwYXJlbnRUYWJsZS5pZCwgYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXS5fcGFyZW50SUQpXG5cbiAgICAgICAgICAgIGFsaWFzVGFibGUgPSB1bmRlZmluZWRcblxuICAgICAgICAgICAgaWYgKGxvY2FsZSAhPT0gJ2FsbCcpIHtcbiAgICAgICAgICAgICAgY29uc3RyYWludHMucHVzaCh7XG4gICAgICAgICAgICAgICAgY29sdW1uTmFtZTogJ19sb2NhbGUnLFxuICAgICAgICAgICAgICAgIHRhYmxlOiBhZGFwdGVyLnRhYmxlc1tuZXdUYWJsZU5hbWVdLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBsb2NhbGUsXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY29uc3QgdGFyZ2V0VGFibGUgPSBhbGlhc1RhYmxlIHx8IGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV1cblxuICAgICAgICAgIHNlbGVjdEZpZWxkc1tgJHtuZXdUYWJsZU5hbWV9LiR7Y29sdW1uUHJlZml4fSR7ZmllbGQubmFtZX1gXSA9XG4gICAgICAgICAgICB0YXJnZXRUYWJsZVtgJHtjb2x1bW5QcmVmaXh9JHtmaWVsZC5uYW1lfWBdXG5cbiAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgY29sdW1uTmFtZTogYCR7Y29sdW1uUHJlZml4fSR7ZmllbGQubmFtZX1gLFxuICAgICAgICAgICAgY29uc3RyYWludHMsXG4gICAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICAgIHBhdGhTZWdtZW50cyxcbiAgICAgICAgICAgIHRhYmxlOiB0YXJnZXRUYWJsZSxcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICB0aHJvdyBuZXcgQVBJRXJyb3IoYENhbm5vdC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gICAgICAgam9pbkFsaWFzZXMsXG4gICAgICAgICAgam9pbnMsXG4gICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgIHBhdGhTZWdtZW50czogcGF0aFNlZ21lbnRzLnNsaWNlKDEpLFxuICAgICAgICAgIHJvb3RUYWJsZU5hbWUsXG4gICAgICAgICAgc2VsZWN0RmllbGRzLFxuICAgICAgICAgIHRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICAgIHRhYmxlTmFtZVN1ZmZpeCxcbiAgICAgICAgICB2YWx1ZSxcbiAgICAgICAgfSlcbiAgICAgIH1cbiAgICAgIGNhc2UgJ3RhYic6IHtcbiAgICAgICAgaWYgKHRhYkhhc05hbWUoZmllbGQpKSB7XG4gICAgICAgICAgcmV0dXJuIGdldFRhYmxlQ29sdW1uRnJvbVBhdGgoe1xuICAgICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICAgIGFsaWFzVGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uUGF0aCxcbiAgICAgICAgICAgIGNvbHVtblByZWZpeDogYCR7Y29sdW1uUHJlZml4fSR7ZmllbGQubmFtZX1fYCxcbiAgICAgICAgICAgIGNvbnN0cmFpbnRQYXRoOiBgJHtjb25zdHJhaW50UGF0aH0ke2ZpZWxkLm5hbWV9LmAsXG4gICAgICAgICAgICBjb25zdHJhaW50cyxcbiAgICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgICAgam9pbkFsaWFzZXMsXG4gICAgICAgICAgICBqb2lucyxcbiAgICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICAgIHBhdGhTZWdtZW50czogcGF0aFNlZ21lbnRzLnNsaWNlKDEpLFxuICAgICAgICAgICAgcm9vdFRhYmxlTmFtZSxcbiAgICAgICAgICAgIHNlbGVjdEZpZWxkcyxcbiAgICAgICAgICAgIHRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICAgICAgdGFibGVOYW1lU3VmZml4OiBgJHt0YWJsZU5hbWVTdWZmaXh9JHt0b1NuYWtlQ2FzZShmaWVsZC5uYW1lKX1fYCxcbiAgICAgICAgICAgIHZhbHVlLFxuICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGdldFRhYmxlQ29sdW1uRnJvbVBhdGgoe1xuICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgYWxpYXNUYWJsZSxcbiAgICAgICAgICBjb2xsZWN0aW9uUGF0aCxcbiAgICAgICAgICBjb2x1bW5QcmVmaXgsXG4gICAgICAgICAgY29uc3RyYWludFBhdGgsXG4gICAgICAgICAgY29uc3RyYWludHMsXG4gICAgICAgICAgZmllbGRzOiBmaWVsZC5maWVsZHMsXG4gICAgICAgICAgam9pbkFsaWFzZXMsXG4gICAgICAgICAgam9pbnMsXG4gICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgIHBhdGhTZWdtZW50czogcGF0aFNlZ21lbnRzLnNsaWNlKDEpLFxuICAgICAgICAgIHJvb3RUYWJsZU5hbWUsXG4gICAgICAgICAgc2VsZWN0RmllbGRzLFxuICAgICAgICAgIHRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICAgIHRhYmxlTmFtZVN1ZmZpeCxcbiAgICAgICAgICB2YWx1ZSxcbiAgICAgICAgfSlcbiAgICAgIH1cblxuICAgICAgY2FzZSAnZ3JvdXAnOiB7XG4gICAgICAgIGlmIChsb2NhbGUgJiYgZmllbGQubG9jYWxpemVkICYmIGFkYXB0ZXIucGF5bG9hZC5jb25maWcubG9jYWxpemF0aW9uKSB7XG4gICAgICAgICAgbmV3VGFibGVOYW1lID0gYCR7dGFibGVOYW1lfV9sb2NhbGVzYFxuXG4gICAgICAgICAgam9pbnNbdGFibGVOYW1lXSA9IGVxKFxuICAgICAgICAgICAgYWRhcHRlci50YWJsZXNbdGFibGVOYW1lXS5pZCxcbiAgICAgICAgICAgIGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0uX3BhcmVudElELFxuICAgICAgICAgIClcbiAgICAgICAgICBpZiAobG9jYWxlICE9PSAnYWxsJykge1xuICAgICAgICAgICAgY29uc3RyYWludHMucHVzaCh7XG4gICAgICAgICAgICAgIGNvbHVtbk5hbWU6ICdfbG9jYWxlJyxcbiAgICAgICAgICAgICAgdGFibGU6IGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0sXG4gICAgICAgICAgICAgIHZhbHVlOiBsb2NhbGUsXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZ2V0VGFibGVDb2x1bW5Gcm9tUGF0aCh7XG4gICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICBhbGlhc1RhYmxlLFxuICAgICAgICAgIGNvbGxlY3Rpb25QYXRoLFxuICAgICAgICAgIGNvbHVtblByZWZpeDogYCR7Y29sdW1uUHJlZml4fSR7ZmllbGQubmFtZX1fYCxcbiAgICAgICAgICBjb25zdHJhaW50UGF0aDogYCR7Y29uc3RyYWludFBhdGh9JHtmaWVsZC5uYW1lfS5gLFxuICAgICAgICAgIGNvbnN0cmFpbnRzLFxuICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgIGpvaW5BbGlhc2VzLFxuICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICBwYXRoU2VnbWVudHM6IHBhdGhTZWdtZW50cy5zbGljZSgxKSxcbiAgICAgICAgICByb290VGFibGVOYW1lLFxuICAgICAgICAgIHNlbGVjdEZpZWxkcyxcbiAgICAgICAgICB0YWJsZU5hbWU6IG5ld1RhYmxlTmFtZSxcbiAgICAgICAgICB0YWJsZU5hbWVTdWZmaXg6IGAke3RhYmxlTmFtZVN1ZmZpeH0ke3RvU25ha2VDYXNlKGZpZWxkLm5hbWUpfV9gLFxuICAgICAgICAgIHZhbHVlLFxuICAgICAgICB9KVxuICAgICAgfVxuXG4gICAgICBjYXNlICdhcnJheSc6IHtcbiAgICAgICAgbmV3VGFibGVOYW1lID0gYCR7dGFibGVOYW1lfV8ke3RhYmxlTmFtZVN1ZmZpeH0ke3RvU25ha2VDYXNlKGZpZWxkLm5hbWUpfWBcbiAgICAgICAgY29uc3RyYWludFBhdGggPSBgJHtjb25zdHJhaW50UGF0aH0ke2ZpZWxkLm5hbWV9LiUuYFxuICAgICAgICBpZiAobG9jYWxlICYmIGZpZWxkLmxvY2FsaXplZCAmJiBhZGFwdGVyLnBheWxvYWQuY29uZmlnLmxvY2FsaXphdGlvbikge1xuICAgICAgICAgIGpvaW5zW25ld1RhYmxlTmFtZV0gPSBhbmQoXG4gICAgICAgICAgICBlcShhZGFwdGVyLnRhYmxlc1t0YWJsZU5hbWVdLmlkLCBhZGFwdGVyLnRhYmxlc1tuZXdUYWJsZU5hbWVdLl9wYXJlbnRJRCksXG4gICAgICAgICAgICBlcShhZGFwdGVyLnRhYmxlc1tuZXdUYWJsZU5hbWVdLl9sb2NhbGUsIGxvY2FsZSksXG4gICAgICAgICAgKVxuICAgICAgICAgIGlmIChsb2NhbGUgIT09ICdhbGwnKSB7XG4gICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKHtcbiAgICAgICAgICAgICAgY29sdW1uTmFtZTogJ19sb2NhbGUnLFxuICAgICAgICAgICAgICB0YWJsZTogYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXSxcbiAgICAgICAgICAgICAgdmFsdWU6IGxvY2FsZSxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGpvaW5zW25ld1RhYmxlTmFtZV0gPSBlcShcbiAgICAgICAgICAgIGFkYXB0ZXIudGFibGVzW3RhYmxlTmFtZV0uaWQsXG4gICAgICAgICAgICBhZGFwdGVyLnRhYmxlc1tuZXdUYWJsZU5hbWVdLl9wYXJlbnRJRCxcbiAgICAgICAgICApXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGdldFRhYmxlQ29sdW1uRnJvbVBhdGgoe1xuICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgY29sbGVjdGlvblBhdGgsXG4gICAgICAgICAgY29uc3RyYWludFBhdGgsXG4gICAgICAgICAgY29uc3RyYWludHMsXG4gICAgICAgICAgZmllbGRzOiBmaWVsZC5maWVsZHMsXG4gICAgICAgICAgam9pbkFsaWFzZXMsXG4gICAgICAgICAgam9pbnMsXG4gICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgIHBhdGhTZWdtZW50czogcGF0aFNlZ21lbnRzLnNsaWNlKDEpLFxuICAgICAgICAgIHJvb3RUYWJsZU5hbWUsXG4gICAgICAgICAgc2VsZWN0RmllbGRzLFxuICAgICAgICAgIHRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICAgIHZhbHVlLFxuICAgICAgICB9KVxuICAgICAgfVxuXG4gICAgICBjYXNlICdibG9ja3MnOiB7XG4gICAgICAgIGxldCBibG9ja1RhYmxlQ29sdW1uOiBUYWJsZUNvbHVtblxuICAgICAgICBsZXQgbmV3VGFibGVOYW1lOiBzdHJpbmdcblxuICAgICAgICAvLyBoYW5kbGUgYmxvY2tUeXBlIHF1ZXJpZXNcbiAgICAgICAgaWYgKHBhdGhTZWdtZW50c1sxXSA9PT0gJ2Jsb2NrVHlwZScpIHtcbiAgICAgICAgICAvLyBmaW5kIHRoZSBibG9jayBjb25maWcgdXNpbmcgdGhlIHZhbHVlXG4gICAgICAgICAgY29uc3QgYmxvY2tUeXBlcyA9IEFycmF5LmlzQXJyYXkodmFsdWUpID8gdmFsdWUgOiBbdmFsdWVdXG4gICAgICAgICAgYmxvY2tUeXBlcy5mb3JFYWNoKChibG9ja1R5cGUpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IGJsb2NrID0gZmllbGQuYmxvY2tzLmZpbmQoKGJsb2NrKSA9PiBibG9jay5zbHVnID09PSBibG9ja1R5cGUpXG4gICAgICAgICAgICBuZXdUYWJsZU5hbWUgPSBgJHt0YWJsZU5hbWV9X2Jsb2Nrc18ke3RvU25ha2VDYXNlKGJsb2NrLnNsdWcpfWBcbiAgICAgICAgICAgIGpvaW5zW25ld1RhYmxlTmFtZV0gPSBlcShcbiAgICAgICAgICAgICAgYWRhcHRlci50YWJsZXNbdGFibGVOYW1lXS5pZCxcbiAgICAgICAgICAgICAgYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXS5fcGFyZW50SUQsXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKHtcbiAgICAgICAgICAgICAgY29sdW1uTmFtZTogJ19wYXRoJyxcbiAgICAgICAgICAgICAgdGFibGU6IGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0sXG4gICAgICAgICAgICAgIHZhbHVlOiBwYXRoU2VnbWVudHNbMF0sXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH0pXG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGNvbnN0cmFpbnRzLFxuICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICBnZXROb3ROdWxsQ29sdW1uQnlWYWx1ZTogKCkgPT4gJ2lkJyxcbiAgICAgICAgICAgIHRhYmxlOiBhZGFwdGVyLnRhYmxlc1t0YWJsZU5hbWVdLFxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGhhc0Jsb2NrRmllbGQgPSBmaWVsZC5ibG9ja3Muc29tZSgoYmxvY2spID0+IHtcbiAgICAgICAgICBuZXdUYWJsZU5hbWUgPSBgJHt0YWJsZU5hbWV9X2Jsb2Nrc18ke3RvU25ha2VDYXNlKGJsb2NrLnNsdWcpfWBcbiAgICAgICAgICBjb25zdHJhaW50UGF0aCA9IGAke2NvbnN0cmFpbnRQYXRofSR7ZmllbGQubmFtZX0uJS5gXG4gICAgICAgICAgbGV0IHJlc3VsdFxuICAgICAgICAgIGNvbnN0IGJsb2NrQ29uc3RyYWludHMgPSBbXVxuICAgICAgICAgIGNvbnN0IGJsb2NrU2VsZWN0RmllbGRzID0ge31cbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgcmVzdWx0ID0gZ2V0VGFibGVDb2x1bW5Gcm9tUGF0aCh7XG4gICAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICAgIGNvbGxlY3Rpb25QYXRoLFxuICAgICAgICAgICAgICBjb25zdHJhaW50UGF0aCxcbiAgICAgICAgICAgICAgY29uc3RyYWludHM6IGJsb2NrQ29uc3RyYWludHMsXG4gICAgICAgICAgICAgIGZpZWxkczogYmxvY2suZmllbGRzLFxuICAgICAgICAgICAgICBqb2luQWxpYXNlcyxcbiAgICAgICAgICAgICAgam9pbnMsXG4gICAgICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICAgICAgcGF0aFNlZ21lbnRzOiBwYXRoU2VnbWVudHMuc2xpY2UoMSksXG4gICAgICAgICAgICAgIHJvb3RUYWJsZU5hbWUsXG4gICAgICAgICAgICAgIHNlbGVjdEZpZWxkczogYmxvY2tTZWxlY3RGaWVsZHMsXG4gICAgICAgICAgICAgIHRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICAgICAgICB2YWx1ZSxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgIC8vIHRoaXMgaXMgZmluZSwgbm90IGV2ZXJ5IGJsb2NrIHdpbGwgaGF2ZSB0aGUgZmllbGRcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKCFyZXN1bHQpIHtcbiAgICAgICAgICAgIHJldHVyblxuICAgICAgICAgIH1cbiAgICAgICAgICBibG9ja1RhYmxlQ29sdW1uID0gcmVzdWx0XG4gICAgICAgICAgY29uc3RyYWludHMgPSBjb25zdHJhaW50cy5jb25jYXQoYmxvY2tDb25zdHJhaW50cylcbiAgICAgICAgICBzZWxlY3RGaWVsZHMgPSB7IC4uLnNlbGVjdEZpZWxkcywgLi4uYmxvY2tTZWxlY3RGaWVsZHMgfVxuICAgICAgICAgIGlmIChmaWVsZC5sb2NhbGl6ZWQgJiYgYWRhcHRlci5wYXlsb2FkLmNvbmZpZy5sb2NhbGl6YXRpb24pIHtcbiAgICAgICAgICAgIGpvaW5zW25ld1RhYmxlTmFtZV0gPSBhbmQoXG4gICAgICAgICAgICAgIGVxKGFkYXB0ZXIudGFibGVzW3RhYmxlTmFtZV0uaWQsIGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0uX3BhcmVudElEKSxcbiAgICAgICAgICAgICAgZXEoYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXS5fbG9jYWxlLCBsb2NhbGUpLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgaWYgKGxvY2FsZSkge1xuICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKHtcbiAgICAgICAgICAgICAgICBjb2x1bW5OYW1lOiAnX2xvY2FsZScsXG4gICAgICAgICAgICAgICAgdGFibGU6IGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0sXG4gICAgICAgICAgICAgICAgdmFsdWU6IGxvY2FsZSxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgam9pbnNbbmV3VGFibGVOYW1lXSA9IGVxKFxuICAgICAgICAgICAgICBhZGFwdGVyLnRhYmxlc1t0YWJsZU5hbWVdLmlkLFxuICAgICAgICAgICAgICBhZGFwdGVyLnRhYmxlc1tuZXdUYWJsZU5hbWVdLl9wYXJlbnRJRCxcbiAgICAgICAgICAgIClcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIHRydWVcbiAgICAgICAgfSlcbiAgICAgICAgaWYgKGhhc0Jsb2NrRmllbGQpIHtcbiAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgY29sdW1uTmFtZTogYmxvY2tUYWJsZUNvbHVtbi5jb2x1bW5OYW1lLFxuICAgICAgICAgICAgY29uc3RyYWludHMsXG4gICAgICAgICAgICBmaWVsZDogYmxvY2tUYWJsZUNvbHVtbi5maWVsZCxcbiAgICAgICAgICAgIHBhdGhTZWdtZW50czogcGF0aFNlZ21lbnRzLnNsaWNlKDEpLFxuICAgICAgICAgICAgcmF3Q29sdW1uOiBibG9ja1RhYmxlQ29sdW1uLnJhd0NvbHVtbixcbiAgICAgICAgICAgIHRhYmxlOiBibG9ja1RhYmxlQ29sdW1uLnRhYmxlLFxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBicmVha1xuICAgICAgfVxuXG4gICAgICBjYXNlICdyZWxhdGlvbnNoaXAnOlxuICAgICAgY2FzZSAndXBsb2FkJzoge1xuICAgICAgICBsZXQgcmVsYXRpb25zaGlwRmllbGRzXG4gICAgICAgIGNvbnN0IHJlbGF0aW9uVGFibGVOYW1lID0gYCR7cm9vdFRhYmxlTmFtZX1fcmVsc2BcbiAgICAgICAgY29uc3QgbmV3Q29sbGVjdGlvblBhdGggPSBwYXRoU2VnbWVudHMuc2xpY2UoMSkuam9pbignLicpXG4gICAgICAgIGNvbnN0IGFsaWFzUmVsYXRpb25zaGlwVGFibGVOYW1lID0gdXVpZCgpXG4gICAgICAgIGNvbnN0IGFsaWFzUmVsYXRpb25zaGlwVGFibGUgPSBhbGlhcyhcbiAgICAgICAgICBhZGFwdGVyLnRhYmxlc1tyZWxhdGlvblRhYmxlTmFtZV0sXG4gICAgICAgICAgYWxpYXNSZWxhdGlvbnNoaXBUYWJsZU5hbWUsXG4gICAgICAgIClcblxuICAgICAgICAvLyBKb2luIGluIHRoZSByZWxhdGlvbnNoaXBzIHRhYmxlXG4gICAgICAgIGpvaW5BbGlhc2VzLnB1c2goe1xuICAgICAgICAgIGNvbmRpdGlvbjogYW5kKFxuICAgICAgICAgICAgZXEoKGFsaWFzVGFibGUgfHwgYWRhcHRlci50YWJsZXNbcm9vdFRhYmxlTmFtZV0pLmlkLCBhbGlh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jdGlvblBhdGggPT09ICcnIHx8IG5ld0NvbGxlY3Rpb25QYXRoID09PSAnaWQnKSB7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICBjb2x1bW5OYW1lOiBgJHtmaWVsZC5yZWxhdGlvblRvfUlEYCxcbiAgICAgICAgICAgICAgY29uc3RyYWludHMsXG4gICAgICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgICAgICB0YWJsZTogYWxpYXNSZWxhdGlvbnNoaXBUYWJsZSxcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAobmV3Q29sbGVjdGlvblBhdGggPT09ICd2YWx1ZScpIHtcbiAgICAgICAgICBjb25zdCB0YWJsZUNvbHVtbnNOYW1lcyA9IGZpZWxkLnJlbGF0aW9uVG8ubWFwKFxuICAgICAgICAgICAgKHJlbGF0aW9uVG8pID0+IGBcIiR7YWxpYXNSZWxhdGlvbnNoaXBUYWJsZU5hbWV9XCIuXCIke3RvU25ha2VDYXNlKHJlbGF0aW9uVG8pfV9pZFwiYCxcbiAgICAgICAgICApXG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGNvbnN0cmFpbnRzLFxuICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICByYXdDb2x1bW46IHNxbC5yYXcoYENPQUxFU0NFKCR7dGFibGVDb2x1bW5zTmFtZXMuam9pbignLCAnKX0pYCksXG4gICAgICAgICAgICB0YWJsZTogYWxpYXNSZWxhdGlvbnNoaXBUYWJsZSxcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAobmV3Q29sbGVjdGlvblBhdGggPT09ICdyZWxhdGlvblRvJykge1xuICAgICAgICAgIGNvbnN0IHJlbGF0aW9uVG8gPSBBcnJheS5pc0FycmF5KGZpZWxkLnJlbGF0aW9uVG8pID8gZmllbGQucmVsYXRpb25UbyA6IFtmaWVsZC5yZWxhdGlvblRvXVxuXG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGNvbnN0cmFpbnRzLFxuICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICBnZXROb3ROdWxsQ29sdW1uQnlWYWx1ZTogKHZhbCkgPT4ge1xuICAgICAgICAgICAgICBjb25zdCBtYXRjaGVkUmVsYXRpb24gPSByZWxhdGlvblRvLmZpbmQoKHJlbGF0aW9uKSA9PiByZWxhdGlvbiA9PT0gdmFsKVxuICAgICAgICAgICAgICBpZiAobWF0Y2hlZFJlbGF0aW9uKSByZXR1cm4gYCR7bWF0Y2hlZFJlbGF0aW9ufUlEYFxuICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgdGFibGU6IGFsaWFzUmVsYXRpb25zaGlwVGFibGUsXG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRocm93IG5ldyBBUElFcnJvcignTm90IHN1cHBvcnRlZCcpXG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZ2V0VGFibGVDb2x1bW5Gcm9tUGF0aCh7XG4gICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICBhbGlhc1RhYmxlOiBuZXdBbGlhc1RhYmxlLFxuICAgICAgICAgIGNvbGxlY3Rpb25QYXRoOiBuZXdDb2xsZWN0aW9uUGF0aCxcbiAgICAgICAgICBjb25zdHJhaW50cyxcbiAgICAgICAgICBmaWVsZHM6IHJlbGF0aW9uc2hpcEZpZWxkcyxcbiAgICAgICAgICBqb2luQWxpYXNlcyxcbiAgICAgICAgICBqb2lucyxcbiAgICAgICAgICBsb2NhbGUsXG4gICAgICAgICAgcGF0aFNlZ21lbnRzOiBwYXRoU2VnbWVudHMuc2xpY2UoMSksXG4gICAgICAgICAgcm9vdFRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICAgIHNlbGVjdEZpZWxkcyxcbiAgICAgICAgICB0YWJsZU5hbWU6IG5ld1RhYmxlTmFtZSxcbiAgICAgICAgICB2YWx1ZSxcbiAgICAgICAgfSlcbiAgICAgIH1cblxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBpZiAoZmllbGRBZmZlY3RzRGF0YShmaWVsZCkpIHtcbiAgICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkICYmIGFkYXB0ZXIucGF5bG9hZC5jb25maWcubG9jYWxpemF0aW9uKSB7XG4gICAgICAgICAgICAvLyBJZiBsb2NhbGl6ZWQsIHdlIGdvIHRvIGxvY2FsaXplZCB0YWJsZSBhbmQgc2V0IGFsaWFzVGFibGUgdG8gdW5kZWZpbmVkXG4gICAgICAgICAgICAvLyBzbyBpdCBpcyBub3QgcGlja2VkIHVwIGJlbG93IHRvIGJlIHVzZWQgYXMgdGFyZ2V0VGFibGVcbiAgICAgICAgICAgIG5ld1RhYmxlTmFtZSA9IGAke3RhYmxlTmFtZX1fbG9jYWxlc2BcblxuICAgICAgICAgICAgY29uc3QgcGFyZW50VGFibGUgPSBhbGlhc1RhYmxlIHx8IGFkYXB0ZXIudGFibGVzW3RhYmxlTmFtZV1cblxuICAgICAgICAgICAgam9pbnNbbmV3VGFibGVOYW1lXSA9IGVxKHBhcmVudFRhYmxlLmlkLCBhZGFwdGVyLnRhYmxlc1tuZXdUYWJsZU5hbWVdLl9wYXJlbnRJRClcblxuICAgICAgICAgICAgYWxpYXNUYWJsZSA9IHVuZGVmaW5lZFxuXG4gICAgICAgICAgICBpZiAobG9jYWxlICE9PSAnYWxsJykge1xuICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKHtcbiAgICAgICAgICAgICAgICBjb2x1bW5OYW1lOiAnX2xvY2FsZScsXG4gICAgICAgICAgICAgICAgdGFibGU6IGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0sXG4gICAgICAgICAgICAgICAgdmFsdWU6IGxvY2FsZSxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjb25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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,MAAM,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,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,8PAgBpB,IAAI,KAAG,MA+TT,CAAA"}
@@ -77,7 +77,7 @@ const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildNumb
77
77
  withTimezone: true
78
78
  }).defaultNow().notNull();
79
79
  }
80
- const table = (0, _pgcore.pgTable)(tableName, columns, (cols)=>{
80
+ const table = adapter.pgSchema.table(tableName, columns, (cols)=>{
81
81
  const extraConfig = Object.entries(baseExtraConfig).reduce((config, [key, func])=>{
82
82
  config[key] = func(cols);
83
83
  return config;
@@ -95,7 +95,7 @@ const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildNumb
95
95
  localesColumns._parentID = _parentIDColumnMap.parentIDColumnMap[idColType]('_parent_id').references(()=>table.id, {
96
96
  onDelete: 'cascade'
97
97
  }).notNull();
98
- localesTable = (0, _pgcore.pgTable)(localeTableName, localesColumns, (cols)=>{
98
+ localesTable = adapter.pgSchema.table(localeTableName, localesColumns, (cols)=>{
99
99
  return Object.entries(localesIndexes).reduce((acc, [colName, func])=>{
100
100
  acc[colName] = func(cols);
101
101
  return acc;
@@ -130,7 +130,7 @@ const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildNumb
130
130
  if (hasLocalizedManyTextField) {
131
131
  columns.locale = adapter.enums.enum__locales('locale');
132
132
  }
133
- textsTable = (0, _pgcore.pgTable)(textsTableName, columns, (cols)=>{
133
+ textsTable = adapter.pgSchema.table(textsTableName, columns, (cols)=>{
134
134
  const indexes = {
135
135
  orderParentIdx: (0, _pgcore.index)(`${textsTableName}_order_parent_idx`).on(cols.order, cols.parent)
136
136
  };
@@ -169,7 +169,7 @@ const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildNumb
169
169
  if (hasLocalizedManyNumberField) {
170
170
  columns.locale = adapter.enums.enum__locales('locale');
171
171
  }
172
- numbersTable = (0, _pgcore.pgTable)(numbersTableName, columns, (cols)=>{
172
+ numbersTable = adapter.pgSchema.table(numbersTableName, columns, (cols)=>{
173
173
  const indexes = {
174
174
  orderParentIdx: (0, _pgcore.index)(`${numbersTableName}_order_parent_idx`).on(cols.order, cols.parent)
175
175
  };
@@ -218,7 +218,7 @@ const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildNumb
218
218
  });
219
219
  });
220
220
  const relationshipsTableName = `${tableName}_rels`;
221
- relationshipsTable = (0, _pgcore.pgTable)(relationshipsTableName, relationshipColumns, (cols)=>{
221
+ relationshipsTable = adapter.pgSchema.table(relationshipsTableName, relationshipColumns, (cols)=>{
222
222
  const result = {
223
223
  order: (0, _pgcore.index)(`${relationshipsTableName}_order_idx`).on(cols.order),
224
224
  parentIdx: (0, _pgcore.index)(`${relationshipsTableName}_parent_idx`).on(cols.parent),
@@ -288,4 +288,4 @@ const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildNumb
288
288
  };
289
289
  };
290
290
 
291
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zY2hlbWEvYnVpbGQudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcGFyYW0tcmVhc3NpZ24gKi9cbmltcG9ydCB0eXBlIHsgUmVsYXRpb24gfSBmcm9tICdkcml6emxlLW9ybSdcbmltcG9ydCB0eXBlIHsgSW5kZXhCdWlsZGVyLCBQZ0NvbHVtbkJ1aWxkZXIsIFVuaXF1ZUNvbnN0cmFpbnRCdWlsZGVyIH0gZnJvbSAnZHJpenpsZS1vcm0vcGctY29yZSdcbmltcG9ydCB0eXBlIHsgRmllbGQgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgeyByZWxhdGlvbnMgfSBmcm9tICdkcml6emxlLW9ybSdcbmltcG9ydCB7XG4gIGluZGV4LFxuICBpbnRlZ2VyLFxuICBudW1lcmljLFxuICBwZ1RhYmxlLFxuICBzZXJpYWwsXG4gIHRpbWVzdGFtcCxcbiAgdW5pcXVlLFxuICB2YXJjaGFyLFxufSBmcm9tICdkcml6emxlLW9ybS9wZy1jb3JlJ1xuaW1wb3J0IHsgZmllbGRBZmZlY3RzRGF0YSB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5pbXBvcnQgdG9TbmFrZUNhc2UgZnJvbSAndG8tc25ha2UtY2FzZSdcblxuaW1wb3J0IHR5cGUgeyBHZW5lcmljQ29sdW1ucywgR2VuZXJpY1RhYmxlLCBJRFR5cGUsIFBvc3RncmVzQWRhcHRlciB9IGZyb20gJy4uL3R5cGVzJ1xuXG5pbXBvcnQgeyBwYXJlbnRJRENvbHVtbk1hcCB9IGZyb20gJy4vcGFyZW50SURDb2x1bW5NYXAnXG5pbXBvcnQgeyBzZXRDb2x1bW5JRCB9IGZyb20gJy4vc2V0Q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RQUFrQlk7SUFBaUI7QUFDbEUifQ==
package/dist/types.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import type { ColumnBaseConfig, ColumnDataType, DrizzleConfig, ExtractTablesWithRelations, Relation, Relations } from 'drizzle-orm';
2
2
  import type { NodePgDatabase, NodePgQueryResultHKT } from 'drizzle-orm/node-postgres';
3
- import type { PgColumn, PgEnum, PgTableWithColumns, PgTransaction } from 'drizzle-orm/pg-core';
3
+ import type { PgColumn, PgEnum, PgSchema, PgTableWithColumns, PgTransaction } from 'drizzle-orm/pg-core';
4
+ import type { PgTableFn } from 'drizzle-orm/pg-core/table';
4
5
  import type { Payload } from 'payload';
5
6
  import type { BaseDatabaseAdapter } from 'payload/database';
6
7
  import type { PayloadRequest } from 'payload/types';
@@ -12,6 +13,7 @@ export type Args = {
12
13
  migrationDir?: string;
13
14
  pool: PoolConfig;
14
15
  push?: boolean;
16
+ schemaName?: string;
15
17
  };
16
18
  export type GenericColumn = PgColumn<ColumnBaseConfig<ColumnDataType, string>, Record<string, unknown>>;
17
19
  export type GenericColumns = {
@@ -36,11 +38,15 @@ export type PostgresAdapter = BaseDatabaseAdapter & {
36
38
  fieldConstraints: Record<string, Record<string, string>>;
37
39
  idType: Args['idType'];
38
40
  logger: DrizzleConfig['logger'];
41
+ pgSchema?: {
42
+ table: PgTableFn;
43
+ } | PgSchema;
39
44
  pool: Pool;
40
45
  poolOptions: Args['pool'];
41
46
  push: boolean;
42
47
  relations: Record<string, GenericRelation>;
43
48
  schema: Record<string, GenericEnum | GenericRelation | GenericTable>;
49
+ schemaName?: Args['schemaName'];
44
50
  sessions: {
45
51
  [id: string]: {
46
52
  db: DrizzleTransaction;
@@ -48,7 +54,7 @@ export type PostgresAdapter = BaseDatabaseAdapter & {
48
54
  resolve: () => Promise<void>;
49
55
  };
50
56
  };
51
- tables: Record<string, GenericTable>;
57
+ tables: Record<string, GenericTable | PgTableWithColumns<any>>;
52
58
  };
53
59
  export type IDType = 'integer' | 'numeric' | 'uuid' | 'varchar';
54
60
  export type PostgresAdapterResult = (args: {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,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,cAAc,EAAE,MAAM,eAAe,CAAA;AACnD,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,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAA;IAC1B,MAAM,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAA;IAChC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,UAAU,CAAA;IAChB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,QAAQ,CAClC,gBAAgB,CAAC,cAAc,EAAE,MAAM,CAAC,EACxC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CACxB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,CAAC,CAAC,EAAE,MAAM,GAAG,aAAa,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,YAAY,G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,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;QAClC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;QACxD,IAAI,EAAE,IAAI,CAAA;QACV,IAAI,EAAE,OAAO,CAAA;QACb,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;QAC1C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,eAAe,GAAG,YAAY,CAAC,CAAA;QACpE,QAAQ,EAAE;YACR,CAAC,EAAE,EAAE,MAAM,GAAG;gBACZ,EAAE,EAAE,kBAAkB,CAAA;gBACtB,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;gBAC3B,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;aAC7B,CAAA;SACF,CAAA;QACD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;KACrC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"insertArrays.d.ts","sourceRoot":"","sources":["../../src/upsertRow/insertArrays.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE1D,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,MAAM,EAAE;QACN,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;KACxC,EAAE,CAAA;IACH,EAAE,EAAE,SAAS,CAAA;IACb,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;CACtC,CAAA;AAYD,eAAO,MAAM,YAAY,wCAA+C,IAAI,KAAG,QAAQ,IAAI,CA6D1F,CAAA"}
1
+ {"version":3,"file":"insertArrays.d.ts","sourceRoot":"","sources":["../../src/upsertRow/insertArrays.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE1D,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,MAAM,EAAE;QACN,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;KACxC,EAAE,CAAA;IACH,EAAE,EAAE,SAAS,CAAA;IACb,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;CACtC,CAAA;AAYD,eAAO,MAAM,YAAY,wCAA+C,IAAI,KAAG,QAAQ,IAAI,CAyE1F,CAAA"}
@@ -24,7 +24,7 @@ const insertArrays = async ({ adapter, arrays, db, parentRows })=>{
24
24
  const parentID = parentRows[parentRowIndex].id;
25
25
  // Add any sub arrays that need to be created
26
26
  // We will call this recursively below
27
- arrayRows.forEach((arrayRow)=>{
27
+ arrayRows.forEach((arrayRow, i)=>{
28
28
  if (Object.keys(arrayRow.arrays).length > 0) {
29
29
  rowsByTable[tableName].arrays.push(arrayRow.arrays);
30
30
  }
@@ -35,6 +35,9 @@ const insertArrays = async ({ adapter, arrays, db, parentRows })=>{
35
35
  arrayRowLocaleData._parentID = arrayRow.row.id;
36
36
  arrayRowLocaleData._locale = arrayRowLocale;
37
37
  rowsByTable[tableName].locales.push(arrayRowLocaleData);
38
+ if (!arrayRow.row.id) {
39
+ arrayRowLocaleData._getParentID = (rows)=>rows[i].id;
40
+ }
38
41
  });
39
42
  });
40
43
  });
@@ -49,6 +52,15 @@ const insertArrays = async ({ adapter, arrays, db, parentRows })=>{
49
52
  }
50
53
  // Insert locale rows
51
54
  if (adapter.tables[`${tableName}_locales`] && row.locales.length > 0) {
55
+ if (!row.locales[0]._parentID) {
56
+ row.locales = row.locales.map((localeRow, i)=>{
57
+ if (typeof localeRow._getParentID === 'function') {
58
+ localeRow._parentID = localeRow._getParentID(insertedRows);
59
+ delete localeRow._getParentID;
60
+ }
61
+ return localeRow;
62
+ });
63
+ }
52
64
  await db.insert(adapter.tables[`${tableName}_locales`]).values(row.locales).returning();
53
65
  }
54
66
  // If there are sub arrays, call this function recursively
@@ -63,4 +75,4 @@ const insertArrays = async ({ adapter, arrays, db, parentRows })=>{
63
75
  }
64
76
  };
65
77
 
66
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91cHNlcnRSb3cvaW5zZXJ0QXJyYXlzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qIGVzbGludC1kaXNhYmxlIG5vLXBhcmFtLXJlYXNzaWduICovXG5pbXBvcnQgdHlwZSB7IEFycmF5Um93VG9JbnNlcnQgfSBmcm9tICcuLi90cmFuc2Zvcm0vd3JpdGUvdHlwZXMnXG5pbXBvcnQgdHlwZSB7IERyaXp6bGVEQiwgUG9zdGdyZXNBZGFwdGVyIH0gZnJvbSAnLi4vdHlwZXMnXG5cbnR5cGUgQXJncyA9IHtcbiAgYWRhcHRlcjogUG9zdGdyZXNBZGFwdGVyXG4gIGFycmF5czoge1xuICAgIFt0YWJsZU5hbWU6IHN0cmluZ106IEFycmF5Um93VG9JbnNlcnRbXVxuICB9W11cbiAgZGI6IERyaXp6bGVEQlxuICBwYXJlbnRSb3dzOiBSZWNvcmQ8c3RyaW5nLCB1bmtub3duPltdXG59XG5cbnR5cGUgUm93c0J5VGFibGUgPSB7XG4gIFt0YWJsZU5hbWU6IHN0cmluZ106IHtcbiAgICBhcnJheXM6IHtcbiAgICAgIFt0YWJsZU5hbWU6IHN0cmluZ106IEFycmF5Um93VG9JbnNlcnRbXVxuICAgIH1bXVxuICAgIGxvY2FsZXM6IFJlY29yZDxzdHJpbmcsIHVua25vd24+W11cbiAgICByb3dzOiBSZWNvcmQ8c3RyaW5nLCB1bmtub3duPltdXG4gIH1cbn1cblxuZXhwb3J0I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RyxHQUFHO1lBQ3pCLE1BQU1wQixhQUFhO2dCQUNqQkM7Z0JBQ0FDLFFBQVFvQixJQUFJcEIsTUFBTTtnQkFDbEJDO2dCQUNBQyxZQUFZd0I7WUFDZDtRQUNGO0lBQ0Y7QUFDRiJ9
@@ -1,3 +1,3 @@
1
- import type { DrizzleDB } from '../types';
2
- export declare const createMigrationTable: (db: DrizzleDB) => Promise<void>;
1
+ import type { PostgresAdapter } from '../types';
2
+ export declare const createMigrationTable: (adapter: PostgresAdapter) => Promise<void>;
3
3
  //# sourceMappingURL=createMigrationTable.d.ts.map
@@ -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,CAQtE,CAAA"}
1
+ {"version":3,"file":"createMigrationTable.d.ts","sourceRoot":"","sources":["../../src/utilities/createMigrationTable.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE/C,eAAO,MAAM,oBAAoB,YAAmB,eAAe,KAAG,QAAQ,IAAI,CAYjF,CAAA"}
@@ -9,14 +9,15 @@ Object.defineProperty(exports, "createMigrationTable", {
9
9
  }
10
10
  });
11
11
  const _drizzleorm = require("drizzle-orm");
12
- const createMigrationTable = async (db)=>{
13
- await db.execute((0, _drizzleorm.sql)`CREATE TABLE IF NOT EXISTS "payload_migrations" (
12
+ const createMigrationTable = async (adapter)=>{
13
+ const prependSchema = adapter.schemaName ? `"${adapter.schemaName}".` : '';
14
+ await adapter.drizzle.execute(_drizzleorm.sql.raw(`CREATE TABLE IF NOT EXISTS ${prependSchema}"payload_migrations" (
14
15
  "id" serial PRIMARY KEY NOT NULL,
15
16
  "name" varchar,
16
17
  "batch" numeric,
17
18
  "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL,
18
19
  "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL
19
- );`);
20
+ );`));
20
21
  };
21
22
 
22
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsaXRpZXMvY3JlYXRlTWlncmF0aW9uVGFibGUudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgc3FsIH0gZnJvbSAnZHJpenpsZS1vcm0nXG5cbmltcG9ydCB0eXBlIHsgRHJpenpsZURCIH0gZnJvbSAnLi4vdHlwZXMnXG5cbmV4cG9ydCBjb25zdCBjcmVhdGVNaWdyYXRpb25UYWJsZSA9IGFzeW5jIChkYjogRHJpenpsZURCKTogUHJvbWlzZTx2b2lkPiA9PiB7XG4gIGF3YWl0IGRiLmV4ZWN1dGUoc3FsYENSRUFURSBUQUJMRSBJRiBOT1QgRVhJU1RTIFwicGF5bG9hZF9taWdyYXRpb25zXCIgKFxuICBcImlkXCIgc2VyaWFsIFBSSU1BUlkgS0VZIE5PVCBOVUxMLFxuICBcIm5hbWVcIiB2YXJjaGFyLFxuICBcImJhdGNoXCIgbnVtZXJpYyxcbiAgXCJ1cGRhdGVkX2F0XCIgdGltZXN0YW1wKDMpIHdpdGggdGltZSB6b25lIERFRkFVTFQgbm93KCkgTk9UIE5VTEwsXG4gIFwiY3JlYXRlZF9hdFwiIHRpbWVzdGFtcCgzKSB3aXRoIHRpbWUgem9uZSBERUZBVUxUIG5vdygpIE5PVCBOVUxMXG4pO2ApXG59XG4iXSwibmFtZXMiOlsiY3JlYXRlTWlncmF0aW9uVGFibGUiLCJkYiIsImV4ZWN1dGUiLCJzcWwiXSwibWFwcGluZ3MiOiI7Ozs7K0JBSWFBOzs7ZUFBQUE7Ozs0QkFKTztBQUliLE1BQU1BLHVCQUF1QixPQUFPQztJQUN6QyxNQUFNQSxHQUFHQyxPQUFPLENBQUNDLElBQUFBLGVBQUcsQ0FBQSxDQUF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ByZXBlbmRTY2hlbWEiLCJzY2hlbWFOYW1lIiwiZHJpenpsZSIsImV4ZWN1dGUiLCJzcWwiLCJyYXciXSwibWFwcGluZ3MiOiI7Ozs7K0JBSWFBOzs7ZUFBQUE7Ozs0QkFKTztBQUliLE1BQU1BLHVCQUF1QixPQUFPQztJQUN6QyxNQUFNQyxnQkFBZ0JELFFBQVFFLFVBQVUsR0FBRyxDQUFDLENBQUMsRUFBRUYsUUFBUUUsVUFBVSxDQUFDLEVBQUUsQ0FBQyxHQUFHO0lBRXhFLE1BQU1GLFFBQVFHLE9BQU8sQ0FBQ0MsT0FBTyxDQUMzQkMsZUFBRyxDQUFDQyxHQUFHLENBQUMsQ0FBQywyQkFBMkIsRUFBRUwsY0FBYzs7Ozs7O0VBTXRELENBQUM7QUFFSCJ9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/db-postgres",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "The officially supported Postgres database adapter for Payload",
5
5
  "repository": "https://github.com/payloadcms/payload",
6
6
  "license": "MIT",
@@ -25,7 +25,7 @@
25
25
  "devDependencies": {
26
26
  "@types/pg": "8.10.2",
27
27
  "@types/to-snake-case": "1.0.0",
28
- "payload": "2.11.1",
28
+ "payload": "2.11.2",
29
29
  "@payloadcms/eslint-config": "1.1.1"
30
30
  },
31
31
  "peerDependencies": {