@payloadcms/db-postgres 0.1.12 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"findMany.d.ts","sourceRoot":"","sources":["../../src/find/findMany.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,KAAK,EAAE,KAAK,EAA8B,MAAM,eAAe,CAAA;AAItE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAQ/C,KAAK,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,GAAG;IACzC,OAAO,EAAE,eAAe,CAAA;IACxB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,QAAQ,iHAYlB,IAAI;;;;;;;;;;;EA8KN,CAAA"}
1
+ {"version":3,"file":"findMany.d.ts","sourceRoot":"","sources":["../../src/find/findMany.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,KAAK,EAAE,KAAK,EAA8B,MAAM,eAAe,CAAA;AAItE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAQ/C,KAAK,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,GAAG;IACzC,OAAO,EAAE,eAAe,CAAA;IACxB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,QAAQ,iHAYlB,IAAI;;;;;;;;;;;EA+KN,CAAA"}
@@ -21,7 +21,7 @@ function _interop_require_default(obj) {
21
21
  const findMany = async function find({ adapter, fields, limit: limitArg, locale, page = 1, pagination, req = {}, skip, sort, tableName, where: whereArg }) {
22
22
  const db = adapter.sessions[req.transactionID]?.db || adapter.drizzle;
23
23
  const table = adapter.tables[tableName];
24
- let limit = limitArg ?? 10;
24
+ const limit = limitArg ?? 10;
25
25
  let totalDocs;
26
26
  let totalPages;
27
27
  let hasPrevPage;
@@ -37,6 +37,7 @@ const findMany = async function find({ adapter, fields, limit: limitArg, locale,
37
37
  where: whereArg
38
38
  });
39
39
  const orderedIDMap = {};
40
+ let orderedIDs;
40
41
  const selectDistinctMethods = [];
41
42
  if (orderBy?.order && orderBy?.column) {
42
43
  selectDistinctMethods.push({
@@ -116,7 +117,8 @@ const findMany = async function find({ adapter, fields, limit: limitArg, locale,
116
117
  selectDistinctResult.forEach(({ id }, i)=>{
117
118
  orderedIDMap[id] = i;
118
119
  });
119
- findManyArgs.where = (0, _drizzleorm.inArray)(adapter.tables[tableName].id, Object.keys(orderedIDMap));
120
+ orderedIDs = Object.keys(orderedIDMap);
121
+ findManyArgs.where = (0, _drizzleorm.inArray)(adapter.tables[tableName].id, orderedIDs);
120
122
  } else {
121
123
  findManyArgs.limit = limitArg === 0 ? undefined : limitArg;
122
124
  const offset = skip || (page - 1) * limitArg;
@@ -127,7 +129,7 @@ const findMany = async function find({ adapter, fields, limit: limitArg, locale,
127
129
  findManyArgs.orderBy = orderBy.order(orderBy.column);
128
130
  }
129
131
  const findPromise = db.query[tableName].findMany(findManyArgs);
130
- if (pagination !== false || selectDistinctResult?.length > limit) {
132
+ if (pagination !== false && (orderedIDs ? orderedIDs?.length >= limit : true)) {
131
133
  const selectCountMethods = [];
132
134
  joinAliases.forEach(({ condition, table })=>{
133
135
  selectCountMethods.push({
@@ -167,9 +169,8 @@ const findMany = async function find({ adapter, fields, limit: limitArg, locale,
167
169
  if (Object.keys(orderedIDMap).length > 0) {
168
170
  rawDocs.sort((a, b)=>orderedIDMap[a.id] - orderedIDMap[b.id]);
169
171
  }
170
- if (pagination === false) {
172
+ if (pagination === false || !totalDocs) {
171
173
  totalDocs = rawDocs.length;
172
- limit = totalDocs;
173
174
  totalPages = 1;
174
175
  pagingCounter = 1;
175
176
  hasPrevPage = false;
@@ -196,4 +197,4 @@ const findMany = async function find({ adapter, fields, limit: limitArg, locale,
196
197
  };
197
198
  };
198
199
 
199
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9maW5kL2ZpbmRNYW55LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgRmluZEFyZ3MgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuaW1wb3J0IHR5cGUgeyBGaWVsZCwgUGF5bG9hZFJlcXVlc3QsIFR5cGVXaXRoSUQgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgeyBpbkFycmF5LCBzcWwgfSBmcm9tICdkcml6emxlLW9ybSdcblxuaW1wb3J0IHR5cGUgeyBQb3N0Z3Jlc0FkYXB0ZXIgfSBmcm9tICcuLi90eXBlcydcbmltcG9ydCB0eXBlIHsgQ2hhaW5lZE1ldGhvZHMgfSBmcm9tICcuL2NoYWluTWV0aG9kcydcblxuaW1wb3J0IGJ1aWxkUXVlcnkgZnJvbSAnLi4vcXVlcmllcy9idWlsZFF1ZXJ5J1xuaW1wb3J0IHsgdHJhbnNmb3JtIH0gZnJvbSAnLi4vdHJhbnNmb3JtL3JlYWQnXG5pbXBvcnQgeyBidWlsZEZpbmRNYW55QXJncyB9IGZyb20gJy4vYnVpbGRGaW5kTWFueUFyZ3MnXG5pbXBvcnQgeyBjaGFpbk1ldGhvZHMgfSBmcm9tICcuL2NoYWluTWV0aG9kcydcblxudHlwZSBBcmdzID0gT21pdDxGaW5kQXJncywgJ2NvbGxlY3Rpb24nPiAmIHtcbiAgYWRhcHRlcjogUG9zdGdyZXNBZGFwdGVyXG4gIGZpZWxkczogRmllbGRbXVxuICB0YWJsZU5hbWU6IHN0cmluZ1xufVxuXG5leHBvcnQgY29uc3QgZmluZE1hbnkgPSBhc3luYyBmdW5jdGlvbiBmaW5kKHtcbiAgYWRhcHRlcixcbiAgZmllbGRzLFxu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HQUFHLEdBQUc7UUFDeEM0QixRQUFROUQsSUFBSSxDQUFDLENBQUMrRCxHQUFHQyxJQUFNM0MsWUFBWSxDQUFDMEMsRUFBRWYsRUFBRSxDQUFDLEdBQUczQixZQUFZLENBQUMyQyxFQUFFaEIsRUFBRSxDQUFDO0lBQ2hFO0lBRUEsSUFBSW5ELGVBQWUsU0FBUyxDQUFDYSxXQUFXO1FBQ3RDQSxZQUFZb0QsUUFBUTVCLE1BQU07UUFDMUJ2QixhQUFhO1FBQ2JHLGdCQUFnQjtRQUNoQkYsY0FBYztRQUNkQyxjQUFjO0lBQ2hCO0lBRUEsTUFBTWdDLE9BQU9pQixRQUFRRyxHQUFHLENBQUMsQ0FBQ0M7UUFDeEIsT0FBT0MsSUFBQUEsZUFBUyxFQUFDO1lBQ2ZDLFFBQVE3RSxRQUFROEUsT0FBTyxDQUFDRCxNQUFNO1lBQzlCRjtZQUNBMUU7UUFDRjtJQUNGO0lBRUEsT0FBTztRQUNMcUQ7UUFDQWhDO1FBQ0FEO1FBQ0FuQjtRQUNBcUQsVUFBVWpDLGNBQWNqQixPQUFPLElBQUk7UUFDbkNBO1FBQ0FrQjtRQUNBaUMsVUFBVW5DLGNBQWNoQixPQUFPLElBQUk7UUFDbkNjO1FBQ0FDO0lBQ0Y7QUFDRiJ9
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAmB,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAmC3E,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE7D,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,qBAAqB,CA4DjE"}
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;AAmC3E,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE7D,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,qBAAqB,CA4DjE"}
package/dist/index.js CHANGED
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "postgresAdapter", {
8
8
  return postgresAdapter;
9
9
  }
10
10
  });
11
+ const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
11
12
  const _path = /*#__PURE__*/ _interop_require_default(require("path"));
12
13
  const _database = require("payload/database");
13
14
  const _connect = require("./connect");
@@ -49,7 +50,7 @@ function _interop_require_default(obj) {
49
50
  }
50
51
  function postgresAdapter(args) {
51
52
  function adapter({ payload }) {
52
- const migrationDir = args.migrationDir || _path.default.resolve(process.cwd(), 'src/migrations');
53
+ const migrationDir = findMigrationDir(args.migrationDir);
53
54
  (0, _extendWebpackConfig.extendWebpackConfig)(payload.config);
54
55
  (0, _extendViteConfig.extendViteConfig)(payload.config);
55
56
  return (0, _database.createDatabaseAdapter)({
@@ -57,6 +58,7 @@ function postgresAdapter(args) {
57
58
  // Postgres-specific
58
59
  drizzle: undefined,
59
60
  enums: {},
61
+ fieldConstraints: {},
60
62
  pool: undefined,
61
63
  poolOptions: args.pool,
62
64
  push: args.push,
@@ -64,7 +66,6 @@ function postgresAdapter(args) {
64
66
  schema: {},
65
67
  sessions: {},
66
68
  tables: {},
67
- fieldConstraints: {},
68
69
  // DatabaseAdapter
69
70
  beginTransaction: _beginTransaction.beginTransaction,
70
71
  commitTransaction: _commitTransaction.commitTransaction,
@@ -103,5 +104,37 @@ function postgresAdapter(args) {
103
104
  }
104
105
  return adapter;
105
106
  }
107
+ /**
108
+ * Attempt to find migrations directory.
109
+ *
110
+ * Checks for the following directories in order:
111
+ * - `migrationDir` argument from Payload config
112
+ * - `src/migrations`
113
+ * - `dist/migrations`
114
+ * - `migrations`
115
+ *
116
+ * Defaults to `src/migrations`
117
+ *
118
+ * @param migrationDir
119
+ * @returns
120
+ */ function findMigrationDir(migrationDir) {
121
+ const cwd = process.cwd();
122
+ const srcDir = _path.default.resolve(cwd, 'src/migrations');
123
+ const distDir = _path.default.resolve(cwd, 'dist/migrations');
124
+ const relativeMigrations = _path.default.resolve(cwd, 'migrations');
125
+ // Use arg if provided
126
+ if (migrationDir) return migrationDir;
127
+ // Check other common locations
128
+ if (_fs.default.existsSync(srcDir)) {
129
+ return srcDir;
130
+ }
131
+ if (_fs.default.existsSync(distDir)) {
132
+ return distDir;
133
+ }
134
+ if (_fs.default.existsSync(relativeMigrations)) {
135
+ return relativeMigrations;
136
+ }
137
+ return srcDir;
138
+ }
106
139
 
107
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7IFBheWxvYWQgfSBmcm9tICdwYXlsb2FkJ1xuXG5pbXBvcnQgcGF0aCBmcm9tICdwYXRoJ1xuaW1wb3J0IHsgY3JlYXRlRGF0YWJhc2VBZGFwdGVyIH0gZnJvbSAncGF5bG9hZC9kYXRhYmFzZSdcblxuaW1wb3J0IHR5cGUgeyBBcmdzLCBQb3N0Z3Jlc0FkYXB0ZXIsIFBvc3RncmVzQWRhcHRlclJlc3VsdCB9IGZyb20gJy4vdHlwZXMnXG5cbmltcG9ydCB7IGNvbm5lY3QgfSBmcm9tICcuL2Nvbm5lY3QnXG5pbXBvcnQgeyBjcmVhdGUgfSBmcm9tICcuL2NyZWF0ZSdcbmltcG9ydCB7IGNyZWF0ZUdsb2JhbCB9IGZyb20gJy4vY3JlYXRlR2xvYmFsJ1xuaW1wb3J0IHsgY3JlYXRlR2xvYmFsVmVyc2lvbiB9IGZyb20gJy4vY3JlYXRlR2xvYmFsVmVyc2lvbidcbmltcG9ydCB7IGNyZWF0ZU1pZ3JhdGlvbiB9IGZyb20gJy4vY3JlYXRlTWlncmF0aW9uJ1xuaW1wb3J0IHsgY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FDRjtJQUVBLE9BQU9sRDtBQUNUO0FBRUE7Ozs7Ozs7Ozs7Ozs7Q0FhQyxHQUNELFNBQVNHLGlCQUFpQkQsWUFBcUI7SUFDN0MsTUFBTWlELE1BQU1DLFFBQVFELEdBQUc7SUFDdkIsTUFBTUUsU0FBU0MsYUFBSSxDQUFDQyxPQUFPLENBQUNKLEtBQUs7SUFDakMsTUFBTUssVUFBVUYsYUFBSSxDQUFDQyxPQUFPLENBQUNKLEtBQUs7SUFDbEMsTUFBTU0scUJBQXFCSCxhQUFJLENBQUNDLE9BQU8sQ0FBQ0osS0FBSztJQUU3QyxzQkFBc0I7SUFDdEIsSUFBSWpELGNBQWMsT0FBT0E7SUFFekIsK0JBQStCO0lBQy9CLElBQUl3RCxXQUFFLENBQUNDLFVBQVUsQ0FBQ04sU0FBUztRQUN6QixPQUFPQTtJQUNUO0lBRUEsSUFBSUssV0FBRSxDQUFDQyxVQUFVLENBQUNILFVBQVU7UUFDMUIsT0FBT0E7SUFDVDtJQUVBLElBQUlFLFdBQUUsQ0FBQ0MsVUFBVSxDQUFDRixxQkFBcUI7UUFDckMsT0FBT0E7SUFDVDtJQUVBLE9BQU9KO0FBQ1QifQ==
@@ -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,IAiElB,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,IAqElB,CAAA"}
package/dist/init.js CHANGED
@@ -25,6 +25,7 @@ const init = async function init() {
25
25
  const tableName = (0, _tosnakecase.default)(collection.slug);
26
26
  (0, _build.buildTable)({
27
27
  adapter: this,
28
+ buildNumbers: true,
28
29
  buildRelationships: true,
29
30
  disableNotNull: !!collection?.versions?.drafts,
30
31
  disableUnique: false,
@@ -37,6 +38,7 @@ const init = async function init() {
37
38
  const versionFields = (0, _versions.buildVersionCollectionFields)(collection);
38
39
  (0, _build.buildTable)({
39
40
  adapter: this,
41
+ buildNumbers: true,
40
42
  buildRelationships: true,
41
43
  disableNotNull: !!collection.versions?.drafts,
42
44
  disableUnique: true,
@@ -50,6 +52,7 @@ const init = async function init() {
50
52
  const tableName = (0, _tosnakecase.default)(global.slug);
51
53
  (0, _build.buildTable)({
52
54
  adapter: this,
55
+ buildNumbers: true,
53
56
  buildRelationships: true,
54
57
  disableNotNull: !!global?.versions?.drafts,
55
58
  disableUnique: false,
@@ -62,6 +65,7 @@ const init = async function init() {
62
65
  const versionFields = (0, _versions.buildVersionGlobalFields)(global);
63
66
  (0, _build.buildTable)({
64
67
  adapter: this,
68
+ buildNumbers: true,
65
69
  buildRelationships: true,
66
70
  disableNotNull: !!global.versions?.drafts,
67
71
  disableUnique: true,
@@ -73,4 +77,4 @@ const init = async function init() {
73
77
  });
74
78
  };
75
79
 
76
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbml0LnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qIGVzbGludC1kaXNhYmxlIG5vLXBhcmFtLXJlYXNzaWduICovXG5pbXBvcnQgdHlwZSB7IEluaXQgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuaW1wb3J0IHR5cGUgeyBTYW5pdGl6ZWRDb2xsZWN0aW9uQ29uZmlnIH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxuaW1wb3J0IHsgcGdFbnVtIH0gZnJvbSAnZHJpenpsZS1vcm0vcGctY29yZSdcbmltcG9ydCB7IGJ1aWxkVmVyc2lvbkNvbGxlY3Rpb25GaWVsZHMsIGJ1aWxkVmVyc2lvbkdsb2JhbEZpZWxkcyB9IGZyb20gJ3BheWxvY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KAAK,EAAE,OAAO,CAAA;CACf,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,UAAU,EAAE,CAAA;IACzB,KAAK,EAAE,kBAAkB,CAAA;IACzB,uBAAuB,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,MAAM,CAAA;IAClD,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,SAAS,CAAC,EAAE,GAAG,CAAA;IACf,KAAK,EAAE,YAAY,CAAA;CACpB,CAAA;AAED,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,UAAU,CAAC,EAAE,YAAY,CAAA;IACzB,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;CAClB,CAAA;AACD;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,mQAehC,IAAI,KAAG,WAmXT,CAAA"}
@@ -233,6 +233,9 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
233
233
  table: adapter.tables[newTableName]
234
234
  };
235
235
  }
236
+ if (pathSegments[1] === 'blockType') {
237
+ throw new _errors.APIError('Querying on blockType is not supported');
238
+ }
236
239
  break;
237
240
  }
238
241
  case 'relationship':
@@ -346,4 +349,4 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
346
349
  throw new _errors.APIError(`Cannot find field for path at ${fieldPath}`);
347
350
  };
348
351
 
349
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9xdWVyaWVzL2dldFRhYmxlQ29sdW1uRnJvbVBhdGgudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcGFyYW0tcmVhc3NpZ24gKi9cbmltcG9ydCB0eXBlIHsgU1FMIH0gZnJvbSAnZHJpenpsZS1vcm0nXG5pbXBvcnQgdHlwZSB7IEZpZWxkLCBGaWVsZEFmZmVjdGluZ0RhdGEsIFRhYkFzRmllbGQgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgeyBhbmQsIGVxLCBzcWwgfSBmcm9tICdkcml6emxlLW9ybSdcbmltcG9ydCB7IGFsaWFzIH0gZnJvbSAnZHJpenpsZS1vcm0vcGctY29yZSdcbmltcG9ydCB7IEFQSUVycm9yIH0gZnJvbSAncGF5bG9hZC9lcnJvcnMnXG5pbXBvcnQgeyBmaWVsZEFmZmVjdHNEYXRhLCB0YWJIYXNOYW1lIH0gZnJvbSAncGF5bG9hZC90eXBlcydcbmltcG9ydCB7IGZsYXR0ZW5Ub3BMZXZlbEZpZWxkcyB9IGZyb20gJ3BheWxvYWQvdXRpbGl0aWVzJ1xuaW1wb3J0IHRvU25ha2VDYXNlIGZyb20gJ3RvLXNuYWtlLWNhc2UnXG5pbXBvcnQgeyB2NCBhcyB1dWlkIH0gZnJvbSAndXVpZCdcblxuaW1wb3J0IHR5cGUgeyBHZW5lcmljQ29sdW1uLCBHZW5lcmljVGFibGUsIFBvc3RncmVzQWRhcHRlciB9IGZyb20gJy4uL3R5cGVzJ1xuaW1wb3J0IHR5cGUgeyBCdWlsZFF1ZXJ5Sm9pbkFsaWFzZXMsIEJ1aWxkUXVlcnlKb2lucyB9IGZyb20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AgfVxuXG4gICAgc3dpdGNoIChmaWVsZC50eXBlKSB7XG4gICAgICBjYXNlICd0YWJzJzoge1xuICAgICAgICByZXR1cm4gZ2V0VGFibGVDb2x1bW5Gcm9tUGF0aCh7XG4gICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICBhbGlhc1RhYmxlLFxuICAgICAgICAgIGNvbGxlY3Rpb25QYXRoLFxuICAgICAgICAgIGNvbHVtblByZWZpeCxcbiAgICAgICAgICBjb25zdHJhaW50UGF0aCxcbiAgICAgICAgICBjb25zdHJhaW50cyxcbiAgICAgICAgICBmaWVsZHM6IGZpZWxkLnRhYnMubWFwKCh0YWIpID0+ICh7XG4gICAgICAgICAgICAuLi50YWIsXG4gICAgICAgICAgICB0eXBlOiAndGFiJyxcbiAgICAgICAgICB9KSksXG4gICAgICAgICAgam9pbkFsaWFzZXMsXG4gICAgICAgICAgam9pbnMsXG4gICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgIHBhdGhTZWdtZW50czogcGF0aFNlZ21lbnRzLnNsaWNlKDEpLFxuICAgICAgICAgIHJvb3RUYWJsZU5hbWUsXG4gICAgICAgICAgc2VsZWN0RmllbGRzLFxuICAgICAgICAgIHRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICB9KVxuICAgICAgfVxuICAgICAgY2FzZSAndGFiJzoge1xuICAgICAgICBpZiAodGFiSGFzTmFtZShmaWVsZCkpIHtcbiAgICAgICAgICByZXR1cm4gZ2V0VGFibGVDb2x1bW5Gcm9tUGF0aCh7XG4gICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgYWxpYXNUYWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25QYXRoLFxuICAgICAgICAgICAgY29sdW1uUHJlZml4OiBgJHtjb2x1bW5QcmVmaXh9JHtmaWVsZC5uYW1lfV9gLFxuICAgICAgICAgICAgY29uc3RyYWludFBhdGgsXG4gICAgICAgICAgICBjb25zdHJhaW50cyxcbiAgICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgICAgam9pbkFsaWFzZXMsXG4gICAgICAgICAgICBqb2lucyxcbiAgICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICAgIHBhdGhTZWdtZW50czogcGF0aFNlZ21lbnRzLnNsaWNlKDEpLFxuICAgICAgICAgICAgcm9vdFRhYmxlTmFtZSxcbiAgICAgICAgICAgIHNlbGVjdEZpZWxkcyxcbiAgICAgICAgICAgIHRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGdldFRhYmxlQ29sdW1uRnJvbVBhdGgoe1xuICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgYWxpYXNUYWJsZSxcbiAgICAgICAgICBjb2xsZWN0aW9uUGF0aCxcbiAgICAgICAgICBjb2x1bW5QcmVmaXgsXG4gICAgICAgICAgY29uc3RyYWludFBhdGgsXG4gICAgICAgICAgY29uc3RyYWludHMsXG4gICAgICAgICAgZmllbGRzOiBmaWVsZC5maWVsZHMsXG4gICAgICAgICAgam9pbkFsaWFzZXMsXG4gICAgICAgICAgam9pbnMsXG4gICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgIHBhdGhTZWdtZW50czogcGF0aFNlZ21lbnRzLnNsaWNlKDEpLFxuICAgICAgICAgIHJvb3RUYWJsZU5hbWUsXG4gICAgICAgICAgc2VsZWN0RmllbGRzLFxuICAgICAgICAgIHRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICB9KVxuICAgICAgfVxuXG4gICAgICBjYXNlICdncm91cCc6IHtcbiAgICAgICAgaWYgKGxvY2FsZSAmJiBmaWVsZC5sb2NhbGl6ZWQgJiYgYWRhcHRlci5wYXlsb2FkLmNvbmZpZy5sb2NhbGl6YXRpb24pIHtcbiAgICAgICAgICBuZXdUYWJsZU5hbWUgPSBgJHt0YWJsZU5hbWV9X2xvY2FsZXNgXG5cbiAgICAgICAgICBqb2luc1t0YWJsZU5hbWVdID0gZXEoXG4gICAgICAgICAgICBhZGFwdGVyLnRhYmxlc1t0YWJsZU5hbWVdLmlkLFxuICAgICAgICAgICAgYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXS5fcGFyZW50SUQsXG4gICAgICAgICAgKVxuICAgICAgICAgIGlmIChsb2NhbGUgIT09ICdhbGwnKSB7XG4gICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKHtcbiAgICAgICAgICAgICAgY29sdW1uTmFtZTogJ19sb2NhbGUnLFxuICAgICAgICAgICAgICB0YWJsZTogYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXSxcbiAgICAgICAgICAgICAgdmFsdWU6IGxvY2FsZSxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBnZXRUYWJsZUNvbHVtbkZyb21QYXRoKHtcbiAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgIGFsaWFzVGFibGUsXG4gICAgICAgICAgY29sbGVjdGlvblBhdGgsXG4gICAgICAgICAgY29sdW1uUHJlZml4OiBgJHtjb2x1bW5QcmVmaXh9JHtmaWVsZC5uYW1lfV9gLFxuICAgICAgICAgIGNvbnN0cmFpbnRQYXRoLFxuICAgICAgICAgIGNvbnN0cmFpbnRzLFxuICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgIGpvaW5BbGlhc2VzLFxuICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICBwYXRoU2VnbWVudHM6IHBhdGhTZWdtZW50cy5zbGljZSgxKSxcbiAgICAgICAgICByb290VGFibGVOYW1lLFxuICAgICAgICAgIHNlbGVjdEZpZWxkcyxcbiAgICAgICAgICB0YWJsZU5hbWU6IG5ld1RhYmxlTmFtZSxcbiAgICAgICAgfSlcbiAgICAgIH1cblxuICAgICAgY2FzZSAnYXJyYXknOiB7XG4gICAgICAgIG5ld1RhYmxlTmFtZSA9IGAke3RhYmxlTmFtZX1fJHt0b1NuYWtlQ2FzZShmaWVsZC5uYW1lKX1gXG4gICAgICAgIGNvbnN0cmFpbnRQYXRoID0gYCR7Y29uc3RyYWludFBhdGh9JHtmaWVsZC5uYW1lfS4lLmBcbiAgICAgICAgaWYgKGxvY2FsZSAmJiBmaWVsZC5sb2NhbGl6ZWQgJiYgYWRhcHRlci5wYXlsb2FkLmNvbmZpZy5sb2NhbGl6YXRpb24pIHtcbiAgICAgICAgICBqb2luc1tuZXdUYWJsZU5hbWVdID0gYW5kKFxuICAgICAgICAgICAgZXEoYWRhcHRlci50YWJsZXNbdGFibGVOYW1lXS5pZCwgYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXS5fcGFyZW50SUQpLFxuICAgICAgICAgICAgZXEoYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXS5fbG9jYWxlLCBsb2NhbGUpLFxuICAgICAgICAgIClcbiAgICAgICAgICBpZiAobG9jYWxlICE9PSAnYWxsJykge1xuICAgICAgICAgICAgY29uc3RyYWludHMucHVzaCh7XG4gICAgICAgICAgICAgIGNvbHVtbk5hbWU6ICdfbG9jYWxlJyxcbiAgICAgICAgICAgICAgdGFibGU6IGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0sXG4gICAgICAgICAgICAgIHZhbHVlOiBsb2NhbGUsXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBqb2luc1tuZXdUYWJsZU5hbWVdID0gZXEoXG4gICAgICAgICAgICBhZGFwdGVyLnRhYmxlc1t0YWJsZU5hbWVdLmlkLFxuICAgICAgICAgICAgYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXS5fcGFyZW50SUQsXG4gICAgICAgICAgKVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBnZXRUYWJsZUNvbHVtbkZyb21QYXRoKHtcbiAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgIGNvbGxlY3Rpb25QYXRoLFxuICAgICAgICAgIGNvbnN0cmFpbnRQYXRoLFxuICAgICAgICAgIGNvbnN0cmFpbnRzLFxuICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgIGpvaW5BbGlhc2VzLFxuICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICBwYXRoU2VnbWVudHM6IHBhdGhTZWdtZW50cy5zbGljZSgxKSxcbiAgICAgICAgICByb290VGFibGVOYW1lLFxuICAgICAgICAgIHNlbGVjdEZpZWxkcyxcbiAgICAgICAgICB0YWJsZU5hbWU6IG5ld1RhYmxlTmFtZSxcbiAgICAgICAgfSlcbiAgICAgIH1cblxuICAgICAgY2FzZSAnYmxvY2tzJzoge1xuICAgICAgICBsZXQgYmxvY2tUYWJsZUNvbHVtbjogVGFibGVDb2x1bW5cbiAgICAgICAgbGV0IG5ld1RhYmxlTmFtZTogc3RyaW5nXG4gICAgICAgIGNvbnN0IGhhc0Jsb2NrRmllbGQgPSBmaWVsZC5ibG9ja3Muc29tZSgoYmxvY2spID0+IHtcbiAgICAgICAgICBuZXdUYWJsZU5hbWUgPSBgJHt0YWJsZU5hbWV9X2Jsb2Nrc18ke3RvU25ha2VDYXNlKGJsb2NrLnNsdWcpfWBcbiAgICAgICAgICBsZXQgcmVzdWx0XG4gICAgICAgICAgY29uc3QgYmxvY2tDb25zdHJhaW50cyA9IFtdXG4gICAgICAgICAgY29uc3QgYmxvY2tTZWxlY3RGaWVsZHMgPSB7fVxuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICByZXN1bHQgPSBnZXRUYWJsZUNvbHVtbkZyb21QYXRoKHtcbiAgICAgICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICAgICAgY29sbGVjdGlvblBhdGgsXG4gICAgICAgICAgICAgIGNvbnN0cmFpbnRQYXRoOiAnJyxcbiAgICAgICAgICAgICAgY29uc3RyYWludHM6IGJsb2NrQ29uc3RyYWludHMsXG4gICAgICAgICAgICAgIGZpZWxkczogYmxvY2suZmllbGRzLFxuICAgICAgICAgICAgICBqb2luQWxpYXNlcyxcbiAgICAgICAgICAgICAgam9pbnMsXG4gICAgICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICAgICAgcGF0aFNlZ21lbnRzOiBwYXRoU2VnbWVudHMuc2xpY2UoMSksXG4gICAgICAgICAgICAgIHJvb3RUYWJsZU5hbWUsXG4gICAgICAgICAgICAgIHNlbGVjdEZpZWxkczogYmxvY2tTZWxlY3RGaWVsZHMsXG4gICAgICAgICAgICAgIHRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgLy8gdGhpcyBpcyBmaW5lLCBub3QgZXZlcnkgYmxvY2sgd2lsbCBoYXZlIHRoZSBmaWVsZFxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoIXJlc3VsdCkge1xuICAgICAgICAgICAgcmV0dXJuXG4gICAgICAgICAgfVxuICAgICAgICAgIGJsb2NrVGFibGVDb2x1bW4gPSByZXN1bHRcbiAgICAgICAgICBjb25zdHJhaW50cyA9IGNvbnN0cmFpbnRzLmNvbmNhdChibG9ja0NvbnN0cmFpbnRzKVxuICAgICAgICAgIHNlbGVjdEZpZWxkcyA9IHsgLi4uc2VsZWN0RmllbGRzLCAuLi5ibG9ja1NlbGVjdEZpZWxkcyB9XG4gICAgICAgICAgaWYgKGZpZWxkLmxvY2FsaXplZCAmJiBhZGFwdGVyLnBheWxvYWQuY29uZmlnLmxvY2FsaXphdGlvbikge1xuICAgICAgICAgICAgam9pbnNbbmV3VGFibGVOYW1lXSA9IGFuZChcbiAgICAgICAgICAgICAgZXEoYWRhcHRlci50YWJsZXNbdGFibGVOYW1lXS5pZCwgYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXS5fcGFyZW50SUQpLFxuICAgICAgICAgICAgICBlcShhZGFwdGVyLnRhYmxlc1tuZXdUYWJsZU5hbWVdLl9sb2NhbGUsIGxvY2FsZSksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBpZiAobG9jYWxlKSB7XG4gICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2goe1xuICAgICAgICAgICAgICAgIGNvbHVtbk5hbWU6ICdfbG9jYWxlJyxcbiAgICAgICAgICAgICAgICB0YWJsZTogYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXSxcbiAgICAgICAgICAgICAgICB2YWx1ZTogbG9jYWxlLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBqb2luc1tuZXdUYWJsZU5hbWVdID0gZXEoXG4gICAgICAgICAgICAgIGFkYXB0ZXIudGFibGVzW3RhYmxlTmFtZV0uaWQsXG4gICAgICAgICAgICAgIGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0uX3BhcmVudElELFxuICAgICAgICAgICAgKVxuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gcmVzdWx0XG4gICAgICAgIH0pXG4gICAgICAgIGlmIChoYXNCbG9ja0ZpZWxkKSB7XG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGNvbHVtbk5hbWU6IGJsb2NrVGFibGVDb2x1bW4uY29sdW1uTmFtZSxcbiAgICAgICAgICAgIGNvbnN0cmFpbnRzLFxuICAgICAgICAgICAgZmllbGQ6IGJsb2NrVGFibGVDb2x1bW4uZmllbGQsXG4gICAgICAgICAgICBwYXRoU2VnbWVudHM6IHBhdGhTZWdtZW50cy5zbGljZSgxKSxcbiAgICAgICAgICAgIHJhd0NvbHVtbjogYmxvY2tUYWJsZUNvbHVtbi5yYXdDb2x1bW4sXG4gICAgICAgICAgICB0YWJsZTogYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXSxcbiAgICAgICAg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maWVsZCxcbiAgICAgICAgICAgICAgdGFibGU6IGFsaWFzUmVsYXRpb25zaGlwVGFibGUsXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKG5ld0NvbGxlY3Rpb25QYXRoID09PSAndmFsdWUnKSB7XG4gICAgICAgICAgY29uc3QgdGFibGVDb2x1bW5zTmFtZXMgPSBmaWVsZC5yZWxhdGlvblRvLm1hcChcbiAgICAgICAgICAgIChyZWxhdGlvblRvKSA9PiBgXCIke2FsaWFzUmVsYXRpb25zaGlwVGFibGVOYW1lfVwiLlwiJHt0b1NuYWtlQ2FzZShyZWxhdGlvblRvKX1faWRcImAsXG4gICAgICAgICAgKVxuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBjb25zdHJhaW50cyxcbiAgICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgICAgcmF3Q29sdW1uOiBzcWwucmF3KGBDT0FMRVNDRSgke3RhYmxlQ29sdW1uc05hbWVzLmpvaW4oJywgJyl9KWApLFxuICAgICAgICAgICAgdGFibGU6IGFsaWFzUmVsYXRpb25zaGlwVGFibGUsXG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKG5ld0NvbGxlY3Rpb25QYXRoID09PSAncmVsYXRpb25UbycpIHtcbiAgICAgICAgICBjb25zdCByZWxhdGlvblRvID0gQXJyYXkuaXNBcnJheShmaWVsZC5yZWxhdGlvblRvKSA/IGZpZWxkLnJlbGF0aW9uVG8gOiBbZmllbGQucmVsYXRpb25Ub11cblxuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBjb25zdHJhaW50cyxcbiAgICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgICAgZ2V0Tm90TnVsbENvbHVtbkJ5VmFsdWU6ICh2YWwpID0+IHtcbiAgICAgICAgICAgICAgY29uc3QgbWF0Y2hlZFJlbGF0aW9uID0gcmVsYXRpb25Uby5maW5kKChyZWxhdGlvbikgPT4gcmVsYXRpb24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AgICAgICAgICBjb25zdHJhaW50cyxcbiAgICAgICAgICBmaWVsZHM6IGZpZWxkLnRhYnMubWFwKCh0YWIpID0+ICh7XG4gICAgICAgICAgICAuLi50YWIsXG4gICAgICAgICAgICB0eXBlOiAndGFiJyxcbiAgICAgICAgICB9KSksXG4gICAgICAgICAgam9pbkFsaWFzZXMsXG4gICAgICAgICAgam9pbnMsXG4gICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgIHBhdGhTZWdtZW50czogcGF0aFNlZ21lbnRzLnNsaWNlKDEpLFxuICAgICAgICAgIHJvb3RUYWJsZU5hbWUsXG4gICAgICAgICAgc2VsZWN0RmllbGRzLFxuICAgICAgICAgIHRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICB9KVxuICAgICAgfVxuICAgICAgY2FzZSAndGFiJzoge1xuICAgICAgICBpZiAodGFiSGFzTmFtZShmaWVsZCkpIHtcbiAgICAgICAgICByZXR1cm4gZ2V0VGFibGVDb2x1bW5Gcm9tUGF0aCh7XG4gICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgYWxpYXNUYWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25QYXRoLFxuICAgICAgICAgICAgY29sdW1uUHJlZml4OiBgJHtjb2x1bW5QcmVmaXh9JHtmaWVsZC5uYW1lfV9gLFxuICAgICAgICAgICAgY29uc3RyYWludFBhdGgsXG4gICAgICAgICAgICBjb25zdHJhaW50cyxcbiAgICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgICAgam9pbkFsaWFzZXMsXG4gICAgICAgICAgICBqb2lucyxcbiAgICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICAgIHBhdGhTZWdtZW50czogcGF0aFNlZ21lbnRzLnNsaWNlKDEpLFxuICAgICAgICAgICAgcm9vdFRhYmxlTmFtZSxcbiAgICAgICAgICAgIHNlbGVjdEZpZWxkcyxcbiAgICAgICAgICAgIHRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGdldFRhYmxlQ29sdW1uRnJvbVBhdGgoe1xuICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgYWxpYXNUYWJsZSxcbiAgICAgICAgICBjb2xsZWN0aW9uUGF0aCxcbiAgICAgICAgICBjb2x1bW5QcmVmaXgsXG4gICAgICAgICAgY29uc3RyYWludFBhdGgsXG4gICAgICAgICAgY29uc3RyYWludHMsXG4gICAgICAgICAgZmllbGRzOiBmaWVsZC5maWVsZHMsXG4gICAgICAgICAgam9pbkFsaWFzZXMsXG4gICAgICAgICAgam9pbnMsXG4gICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgIHBhdGhTZWdtZW50czogcGF0aFNlZ21lbnRzLnNsaWNlKDEpLFxuICAgICAgICAgIHJvb3RUYWJsZU5hbWUsXG4gICAgICAgICAgc2VsZWN0RmllbGRzLFxuICAgICAgICAgIHRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICB9KVxuICAgICAgfVxuXG4gICAgICBjYXNlICdncm91cCc6IHtcbiAgICAgICAgaWYgKGxvY2FsZSAmJiBmaWVsZC5sb2NhbGl6ZWQgJiYgYWRhcHRlci5wYXlsb2FkLmNvbmZpZy5sb2NhbGl6YXRpb24pIHtcbiAgICAgICAgICBuZXdUYWJsZU5hbWUgPSBgJHt0YWJsZU5hbWV9X2xvY2FsZXNgXG5cbiAgICAgICAgICBqb2luc1t0YWJsZU5hbWVdID0gZXEoXG4gICAgICAgICAgICBhZGFwdGVyLnRhYmxlc1t0YWJsZU5hbWVdLmlkLFxuICAgICAgICAgICAgYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXS5fcGFyZW50SUQsXG4gICAgICAgICAgKVxuICAgICAgICAgIGlmIChsb2NhbGUgIT09ICdhbGwnKSB7XG4gICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKHtcbiAgICAgICAgICAgICAgY29sdW1uTmFtZTogJ19sb2NhbGUnLFxuICAgICAgICAgICAgICB0YWJsZTogYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXSxcbiAgICAgICAgICAgICAgdmFsdWU6IGxvY2FsZSxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBnZXRUYWJsZUNvbHVtbkZyb21QYXRoKHtcbiAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgIGFsaWFzVGFibGUsXG4gICAgICAgICAgY29sbGVjdGlvblBhdGgsXG4gICAgICAgICAgY29sdW1uUHJlZml4OiBgJHtjb2x1bW5QcmVmaXh9JHtmaWVsZC5uYW1lfV9gLFxuICAgICAgICAgIGNvbnN0cmFpbnRQYXRoLFxuICAgICAgICAgIGNvbnN0cmFpbnRzLFxuICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgIGpvaW5BbGlhc2VzLFxuICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICBwYXRoU2VnbWVudHM6IHBhdGhTZWdtZW50cy5zbGljZSgxKSxcbiAgICAgICAgICByb290VGFibGVOYW1lLFxuICAgICAgICAgIHNlbGVjdEZpZWxkcyxcbiAgICAgICAgICB0YWJsZU5hbWU6IG5ld1RhYmxlTmFtZSxcbiAgICAgICAgfSlcbiAgICAgIH1cblxuICAgICAgY2FzZSAnYXJyYXknOiB7XG4gICAgICAgIG5ld1RhYmxlTmFtZSA9IGAke3RhYmxlTmFtZX1fJHt0b1NuYWtlQ2FzZShmaWVsZC5uYW1lKX1gXG4gICAgICAgIGNvbnN0cmFpbnRQYXRoID0gYCR7Y29uc3RyYWludFBhdGh9JHtmaWVsZC5uYW1lfS4lLmBcbiAgICAgICAgaWYgKGxvY2FsZSAmJiBmaWVsZC5sb2NhbGl6ZWQgJiYgYWRhcHRlci5wYXlsb2FkLmNvbmZpZy5sb2NhbGl6YXRpb24pIHtcbiAgICAgICAgICBqb2luc1tuZXdUYWJsZU5hbWVdID0gYW5kKFxuICAgICAgICAgICAgZXEoYWRhcHRlci50YWJsZXNbdGFibGVOYW1lXS5pZCwgYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXS5fcGFyZW50SUQpLFxuICAgICAgICAgICAgZXEoYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXS5fbG9jYWxlLCBsb2NhbGUpLFxuICAgICAgICAgIClcbiAgICAgICAgICBpZiAobG9jYWxlICE9PSAnYWxsJykge1xuICAgICAgICAgICAgY29uc3RyYWludHMucHVzaCh7XG4gICAgICAgICAgICAgIGNvbHVtbk5hbWU6ICdfbG9jYWxlJyxcbiAgICAgICAgICAgICAgdGFibGU6IGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0sXG4gICAgICAgICAgICAgIHZhbHVlOiBsb2NhbGUsXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBqb2luc1tuZXdUYWJsZU5hbWVdID0gZXEoXG4gICAgICAgICAgICBhZGFwdGVyLnRhYmxlc1t0YWJsZU5hbWVdLmlkLFxuICAgICAgICAgICAgYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXS5fcGFyZW50SUQsXG4gICAgICAgICAgKVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBnZXRUYWJsZUNvbHVtbkZyb21QYXRoKHtcbiAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgIGNvbGxlY3Rpb25QYXRoLFxuICAgICAgICAgIGNvbnN0cmFpbnRQYXRoLFxuICAgICAgICAgIGNvbnN0cmFpbnRzLFxuICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgIGpvaW5BbGlhc2VzLFxuICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICBwYXRoU2VnbWVudHM6IHBhdGhTZWdtZW50cy5zbGljZSgxKSxcbiAgICAgICAgICByb290VGFibGVOYW1lLFxuICAgICAgICAgIHNlbGVjdEZpZWxkcyxcbiAgICAgICAgICB0YWJsZU5hbWU6IG5ld1RhYmxlTmFtZSxcbiAgICAgICAgfSlcbiAgICAgIH1cblxuICAgICAgY2FzZSAnYmxvY2tzJzoge1xuICAgICAgICBsZXQgYmxvY2tUYWJsZUNvbHVtbjogVGFibGVDb2x1bW5cbiAgICAgICAgbGV0IG5ld1RhYmxlTmFtZTogc3RyaW5nXG4gICAgICAgIGNvbnN0IGhhc0Jsb2NrRmllbGQgPSBmaWVsZC5ibG9ja3Muc29tZSgoYmxvY2spID0+IHtcbiAgICAgICAgICBuZXdUYWJsZU5hbWUgPSBgJHt0YWJsZU5hbWV9X2Jsb2Nrc18ke3RvU25ha2VDYXNlKGJsb2NrLnNsdWcpfWBcbiAgICAgICAgICBsZXQgcmVzdWx0XG4gICAgICAgICAgY29uc3QgYmxvY2tDb25zdHJhaW50cyA9IFtdXG4gICAgICAgICAgY29uc3QgYmxvY2tTZWxlY3RGaWVsZHMgPSB7fVxuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICByZXN1bHQgPSBnZXRUYWJsZUNvbHVtbkZyb21QYXRoKHtcbiAgICAgICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICAgICAgY29sbGVjdGlvblBhdGgsXG4gICAgICAgICAgICAgIGNvbnN0cmFpbnRQYXRoOiAnJyxcbiAgICAgICAgICAgICAgY29uc3RyYWludHM6IGJsb2NrQ29uc3RyYWludHMsXG4gICAgICAgICAgICAgIGZpZWxkczogYmxvY2suZmllbGRzLFxuICAgICAgICAgICAgICBqb2luQWxpYXNlcyxcbiAgICAgICAgICAgICAgam9pbnMsXG4gICAgICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICAgICAgcGF0aFNlZ21lbnRzOiBwYXRoU2VnbWVudHMuc2xpY2UoMSksXG4gICAgICAgICAgICAgIHJvb3RUYWJsZU5hbWUsXG4gICAgICAgICAgICAgIHNlbGVjdEZpZWxkczogYmxvY2tTZWxlY3RGaWVsZHMsXG4gICAgICAgICAgICAgIHRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgLy8gdGhpcyBpcyBmaW5lLCBub3QgZXZlcnkgYmxvY2sgd2lsbCBoYXZlIHRoZSBmaWVsZFxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoIXJlc3VsdCkge1xuICAgICAgICAgICAgcmV0dXJuXG4gICAgICAgICAgfVxuICAgICAgICAgIGJsb2NrVGFibGVDb2x1bW4gPSByZXN1bHRcbiAgICAgICAgICBjb25zdHJhaW50cyA9IGNvbnN0cmFpbnRzLmNvbmNhdChibG9ja0NvbnN0cmFpbnRzKVxuICAgICAgICAgIHNlbGVjdEZpZWxkcyA9IHsgLi4uc2VsZWN0RmllbGRzLCAuLi5ibG9ja1NlbGVjdEZpZWxkcyB9XG4gICAgICAgICAgaWYgKGZpZWxkLmxvY2FsaXplZCAmJiBhZGFwdGVyLnBheWxvYWQuY29uZmlnLmxvY2FsaXphdGlvbikge1xuICAgICAgICAgICAgam9pbnNbbmV3VGFibGVOYW1lXSA9IGFuZChcbiAgICAgICAgICAgICAgZXEoYWRhcHRlci50YWJsZXNbdGFibGVOYW1lXS5pZCwgYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXS5fcGFyZW50SUQpLFxuICAgICAgICAgICAgICBlcShhZGFwdGVyLnRhYmxlc1tuZXdUYWJsZU5hbWVdLl9sb2NhbGUsIGxvY2FsZSksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBpZiAobG9jYWxlKSB7XG4gICAgICAgICAgICAgIGNvbnN0cmFpbnRzLnB1c2goe1xuICAgICAgICAgICAgICAgIGNvbHVtbk5hbWU6ICdfbG9jYWxlJyxcbiAgICAgICAgICAgICAgICB0YWJsZTogYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXSxcbiAgICAgICAgICAgICAgICB2YWx1ZTogbG9jYWxlLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBqb2luc1tuZXdUYWJsZU5hbWVdID0gZXEoXG4gICAgICAgICAgICAgIGFkYXB0ZXIudGFibGVzW3RhYmxlTmFtZV0uaWQsXG4gICAgICAgICAgICAgIGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0uX3BhcmVudElELFxuICAgICAgICAgICAgKVxuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gcmVzdWx0XG4gICAgICAgIH0pXG4gICAgICAgIGlmIChoYXNCbG9ja0ZpZWxkKSB7XG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGNvbHVtbk5hbWU6IGJsb2NrVGFibGVDb2x1bW4uY29sdW1uTmFtZSxcbiAgICAgICAgICAgIGNvbnN0cmFpbnRzLFxuICAgICAgICAgICAgZmllbGQ6IGJsb2NrVGFibGVDb2x1bW4uZmllbGQsXG4gICAgICAgICAgICBwYXRoU2VnbWVudHM6IHBhdGhTZWdtZW50cy5zbGljZSgxKSxcbiAgICAgICAgICAgIHJhd0NvbHVtbjogYmxvY2tUYWJsZUNvbHVtbi5yYXdDb2x1bW4sXG4gICAgICAgICAgICB0YWJsZTogYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXSxcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHBhdGhTZWdtZW50c1sxXSA9PT0gJ2Jsb2NrVHlwZScpIHtcbiAgICAgICAgICB0aHJvdyBuZXcgQVBJRXJyb3IoJ1F1ZXJ5aW5nIG9uIGJsb2NrVHlwZSBpcyBub3Qgc3VwcG9ydGVkJylcbiAgICAgICAgfVxuICAgICAgICBicmVha1xuICAgICAgfVxuXG4gICAgICBjYXNlICdyZWxhdGlvbnNoaXAnOlxuICAgICAgY2FzZS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F0aW9ufUlEYFxuICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgdGFibGU6IGFsaWFzUmVsYXRpb25zaGlwVGFibGUsXG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRocm93IG5ldyBBUElFcnJvcignTm90IHN1cHBvcnRlZCcpXG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZ2V0VGFibGVDb2x1bW5Gcm9tUGF0aCh7XG4gICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICBhbGlhc1RhYmxlOiBuZXdBbGlhc1RhYmxlLFxuICAgICAgICAgIGNvbGxlY3Rpb25QYXRoOiBuZXdDb2xsZWN0aW9uUGF0aCxcbiAgICAgICAgICBjb25zdHJhaW50cyxcbiAgICAgICAgICBmaWVsZHM6IHJlbGF0aW9uc2hpcEZpZWxkcyxcbiAgICAgICAgICBqb2luQWxpYXNlcyxcbiAgICAgICAgICBqb2lucyxcbiAgICAgICAgICBsb2NhbGUsXG4gICAgICAgICAgcGF0aFNlZ21lbnRzOiBwYXRoU2VnbWVudHMuc2xpY2UoMSksXG4gICAgICAgICAgcm9vdFRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICAgIHNlbGVjdEZpZWxkcyxcbiAgICAgICAgICB0YWJsZU5hbWU6IG5ld1RhYmxlTmFtZSxcbiAgICAgICAgfSlcbiAgICAgIH1cblxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBpZiAoZmllbGRBZmZlY3RzRGF0YShmaWVsZCkpIHtcbiAgICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkICYmIGFkYXB0ZXIucGF5bG9hZC5jb25maWcubG9jYWxpemF0aW9uKSB7XG4gICAgICAgICAgICAvLyBJZiBsb2NhbGl6ZWQsIHdlIGdvIHRvIGxvY2FsaXplZCB0YWJsZSBhbmQgc2V0IGFsaWFzVGFibGUgdG8gdW5kZWZpbmVkXG4gICAgICAgICAgICAvLyBzbyBpdCBpcyBub3QgcGlja2VkIHVwIGJlbG93IHRvIGJlIHVzZWQgYXMgdGFyZ2V0VGFibGVcbiAgICAgICAgICAgIG5ld1RhYmxlTmFtZSA9IGAke3RhYmxlTmFtZX1fbG9jYWxlc2BcblxuICAgICAgICAgICAgY29uc3QgcGFyZW50VGFibGUgPSBhbGlhc1RhYmxlIHx8IGFkYXB0ZXIudGFibGVzW3RhYmxlTmFtZV1cblxuICAgICAgICAgICAgam9pbnNbbmV3VGFibGVOYW1lXSA9IGVxKHBhcmVudFRhYmxlLmlkLCBhZGFwdGVyLnRhYmxlc1tuZXdUYWJsZU5hbWVdLl9wYXJlbnRJRClcblxuICAgICAgICAgICAgYWxpYXNUYWJsZSA9IHVuZGVmaW5lZFxuXG4gICAgICAgICAgICBpZiAobG9jYWxlICE9PSAnYWxsJykge1xuICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKHtcbiAgICAgICAgICAgICAgICBjb2x1bW5OYW1lOiAnX2xvY2FsZScsXG4gICAgICAgICAgICAgICAgdGFibGU6IGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0sXG4gICAgICAgICAgICAgICAgdmFsdWU6IGxvY2FsZSxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjb25zdCB0YXJnZXRUYWJsZSA9IGFsaWFzVGFibGUgfHwgYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXVxuXG4gICAgICAgICAgc2VsZWN0RmllbGRzW2Ake25ld1RhYmxlTmFtZX0uJHtjb2x1bW5QcmVmaXh9JHtmaWVsZC5uYW1lfWBdID1cbiAgICAgICAgICAgIHRhcmdldFRhYmxlW2Ake2NvbHVtblByZWZpeH0ke2ZpZWxkLm5hbWV9YF1cblxuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBjb2x1bW5OYW1lOiBgJHtjb2x1bW5QcmVmaXh9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CQUUzRFIsS0FBSyxDQUFDZ0IsYUFBYSxHQUFHa0IsSUFBQUEsY0FBRSxFQUFDNEMsWUFBWTdELEVBQUUsRUFBRTFCLFFBQVEyQixNQUFNLENBQUNGLGFBQWEsQ0FBQ21CLFNBQVM7NEJBRS9FM0MsYUFBYXFGOzRCQUViLElBQUk1RSxXQUFXLE9BQU87Z0NBQ3BCSixZQUFZdUMsSUFBSSxDQUFDO29DQUNmakIsWUFBWTtvQ0FDWkUsT0FBTzlCLFFBQVEyQixNQUFNLENBQUNGLGFBQWE7b0NBQ25DcUIsT0FBT3BDO2dDQUNUOzRCQUNGO3dCQUNGO3dCQUVBLE1BQU04RSxjQUFjdkYsY0FBY0QsUUFBUTJCLE1BQU0sQ0FBQ0YsYUFBYTt3QkFFOURULFlBQVksQ0FBQyxDQUFDLEVBQUVTLGFBQWEsQ0FBQyxFQUFFdEIsYUFBYSxFQUFFZ0IsTUFBTUssSUFBSSxDQUFDLENBQUMsQ0FBQyxHQUMxRGdFLFdBQVcsQ0FBQyxDQUFDLEVBQUVyRixhQUFhLEVBQUVnQixNQUFNSyxJQUFJLENBQUMsQ0FBQyxDQUFDO3dCQUU3QyxPQUFPOzRCQUNMSSxZQUFZLENBQUMsRUFBRXpCLGFBQWEsRUFBRWdCLE1BQU1LLElBQUksQ0FBQyxDQUFDOzRCQUMxQ2xCOzRCQUNBYTs0QkFDQVAsY0FBY0E7NEJBQ2RrQixPQUFPMEQ7d0JBQ1Q7b0JBQ0Y7Z0JBQ0Y7UUFDRjtJQUNGO0lBRUEsTUFBTSxJQUFJMUIsZ0JBQVEsQ0FBQyxDQUFDLDhCQUE4QixFQUFFNUMsVUFBVSxDQUFDO0FBQ2pFIn0=
@@ -5,6 +5,7 @@ type Args = {
5
5
  adapter: PostgresAdapter;
6
6
  baseColumns?: Record<string, PgColumnBuilder>;
7
7
  baseExtraConfig?: Record<string, (cols: GenericColumns) => IndexBuilder | UniqueConstraintBuilder>;
8
+ buildNumbers?: boolean;
8
9
  buildRelationships?: boolean;
9
10
  disableNotNull: boolean;
10
11
  disableUnique: boolean;
@@ -17,8 +18,9 @@ type Args = {
17
18
  timestamps?: boolean;
18
19
  };
19
20
  type Result = {
21
+ hasManyNumberField: 'index' | boolean;
20
22
  relationsToBuild: Map<string, string>;
21
23
  };
22
- export declare const buildTable: ({ adapter, baseColumns, baseExtraConfig, buildRelationships, disableNotNull, disableUnique, fields, rootRelationsToBuild, rootRelationships, rootTableIDColType, rootTableName, tableName, timestamps, }: Args) => Result;
24
+ export declare const buildTable: ({ adapter, baseColumns, baseExtraConfig, buildNumbers, buildRelationships, disableNotNull, disableUnique, fields, rootRelationsToBuild, rootRelationships, rootTableIDColType, rootTableName: incomingRootTableName, tableName, timestamps, }: Args) => Result;
23
25
  export {};
24
26
  //# 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,EAAE,YAAY,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AACjG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAgB1C,OAAO,KAAK,EAAE,cAAc,EAAgB,eAAe,EAAE,MAAM,UAAU,CAAA;AAK7E,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,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,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,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