@payloadcms/db-postgres 0.8.1 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/count.d.ts.map +1 -1
- package/dist/count.js +3 -6
- package/dist/create.d.ts.map +1 -1
- package/dist/create.js +9 -6
- package/dist/createGlobal.d.ts.map +1 -1
- package/dist/createGlobal.js +9 -6
- package/dist/createGlobalVersion.d.ts.map +1 -1
- package/dist/createGlobalVersion.js +11 -10
- package/dist/createVersion.d.ts.map +1 -1
- package/dist/createVersion.js +22 -21
- package/dist/deleteMany.d.ts.map +1 -1
- package/dist/deleteMany.js +8 -6
- package/dist/deleteOne.d.ts.map +1 -1
- package/dist/deleteOne.js +3 -6
- package/dist/deleteVersions.d.ts.map +1 -1
- package/dist/deleteVersions.js +8 -7
- package/dist/find/traverseFields.d.ts.map +1 -1
- package/dist/find/traverseFields.js +13 -22
- package/dist/find.d.ts.map +1 -1
- package/dist/find.js +8 -6
- package/dist/findGlobal.d.ts.map +1 -1
- package/dist/findGlobal.js +8 -6
- package/dist/findGlobalVersions.d.ts.map +1 -1
- package/dist/findGlobalVersions.js +8 -7
- package/dist/findOne.d.ts.map +1 -1
- package/dist/findOne.js +8 -6
- package/dist/findVersions.d.ts.map +1 -1
- package/dist/findVersions.js +8 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -8
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +10 -8
- package/dist/queries/getTableColumnFromPath.d.ts.map +1 -1
- package/dist/queries/getTableColumnFromPath.js +12 -41
- package/dist/queries/parseParams.js +3 -3
- package/dist/queryDrafts.d.ts.map +1 -1
- package/dist/queryDrafts.js +8 -7
- package/dist/schema/build.d.ts +4 -3
- package/dist/schema/build.d.ts.map +1 -1
- package/dist/schema/build.js +86 -45
- package/dist/schema/{getTableName.d.ts → createTableName.d.ts} +5 -7
- package/dist/schema/createTableName.d.ts.map +1 -0
- package/dist/schema/createTableName.js +43 -0
- package/dist/schema/traverseFields.d.ts.map +1 -1
- package/dist/schema/traverseFields.js +40 -18
- package/dist/schema/validateExistingBlockIsIdentical.d.ts.map +1 -1
- package/dist/schema/validateExistingBlockIsIdentical.js +1 -1
- package/dist/transform/read/hasManyText.d.ts +2 -2
- package/dist/transform/read/hasManyText.d.ts.map +1 -1
- package/dist/transform/read/hasManyText.js +2 -2
- package/dist/transform/read/index.js +3 -3
- package/dist/transform/write/array.d.ts +2 -2
- package/dist/transform/write/array.d.ts.map +1 -1
- package/dist/transform/write/array.js +4 -4
- package/dist/transform/write/blocks.js +2 -2
- package/dist/transform/write/index.js +5 -5
- package/dist/transform/write/texts.js +3 -3
- package/dist/transform/write/traverseFields.d.ts.map +1 -1
- package/dist/transform/write/traverseFields.js +6 -15
- package/dist/transform/write/types.d.ts +1 -1
- package/dist/transform/write/types.d.ts.map +1 -1
- package/dist/types.d.ts +3 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/update.d.ts.map +1 -1
- package/dist/update.js +3 -6
- package/dist/updateGlobal.d.ts.map +1 -1
- package/dist/updateGlobal.js +8 -6
- package/dist/updateGlobalVersion.d.ts.map +1 -1
- package/dist/updateGlobalVersion.js +3 -7
- package/dist/updateVersion.d.ts.map +1 -1
- package/dist/updateVersion.js +3 -7
- package/dist/upsertRow/index.js +3 -3
- package/dist/upsertRow/insertArrays.js +2 -2
- package/package.json +2 -2
- package/dist/schema/getTableName.d.ts.map +0 -1
- package/dist/schema/getTableName.js +0 -43
@@ -31,7 +31,7 @@ const transformBlocks = ({ adapter, baseTableName, blocks, blocksToDelete, data,
|
|
31
31
|
}
|
32
32
|
};
|
33
33
|
if (field.localized && locale) newRow.row._locale = locale;
|
34
|
-
const blockTableName = `${baseTableName}_blocks_${blockType}
|
34
|
+
const blockTableName = adapter.tableNameMap.get(`${baseTableName}_blocks_${blockType}`);
|
35
35
|
const hasUUID = adapter.tables[blockTableName]._uuid;
|
36
36
|
// If we have declared a _uuid field on arrays,
|
37
37
|
// that means the ID has to be unique,
|
@@ -66,4 +66,4 @@ const transformBlocks = ({ adapter, baseTableName, blocks, blocksToDelete, data,
|
|
66
66
|
});
|
67
67
|
};
|
68
68
|
|
69
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vd3JpdGUvYmxvY2tzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qIGVzbGludC1kaXNhYmxlIG5vLXBhcmFtLXJlYXNzaWduICovXG5pbXBvcnQgdHlwZSB7IEJsb2NrRmllbGQgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgdG9TbmFrZUNhc2UgZnJvbSAndG8tc25ha2UtY2FzZSdcblxuaW1wb3J0IHR5cGUgeyBQb3N0Z3Jlc0FkYXB0ZXIgfSBmcm9tICcuLi8uLi90eXBlcydcbmltcG9ydCB0eXBlIHsgQmxvY2tSb3dUb0luc2VydCwgUmVsYXRpb25zaGlwVG9EZWxldGUgfSBmcm9tICcuL3R5cGVzJ1xuXG5pbXBvcnQgeyB0cmF2ZXJzZUZpZWxkcyB9IGZyb20gJy4vdHJhdmVyc2VGaWVsZHMnXG5cbnR5cGUgQXJncyA9IHtcbiAgYWRhcHRlcjogUG9zdGdyZXNBZGFwdGVyXG4gIGJhc2VUYWJsZU5hbWU6IHN0cmluZ1xuICBibG9ja3M6IHtcbiAgICBbYmxvY2tUeXBlOiBzdHJpbmddOiBCbG9ja1Jvd1RvSW5zZXJ0W11cbiAgfVxuICBibG9ja3NUb0RlbGV0ZTogU2V0PHN0cmluZz5cbiAgZGF0YTogUmVjb3JkPHN0cmluZywgdW5rbm93bj5bXVxuICBmaWVsZDogQmxvY2tGaWVsZFxuICBsb2NhbGU/OiBzdHJpbmdcbiAgbnVtYmVyczogUmVjb3JkPHN0cmluZywgdW5rbm93bj5bXVxuICBwYXRoOiBzdHJpbmdcbiAgcmVsYXRpb25zaGlwczogUmVjb3JkPHN0cmluZywgdW5rbm93bj5bXVxuICByZWxhdGlvbnNoa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tZQUNOeUIsYUFBYTtZQUNiQyxRQUFRdkIsYUFBYXVCLE1BQU07WUFDM0JqQixTQUFTRixPQUFPRSxPQUFPO1lBQ3ZCaEI7WUFDQWtDLGlCQUFpQlg7WUFDakJ0QixNQUFNLENBQUMsRUFBRUEsUUFBUSxHQUFHLEVBQUVILE1BQU1zQixJQUFJLENBQUMsQ0FBQyxFQUFFWixFQUFFLENBQUMsQ0FBQztZQUN4Q047WUFDQUM7WUFDQWMsS0FBS0gsT0FBT0csR0FBRztZQUNmYjtZQUNBQztRQUNGO1FBRUFWLE1BQU0sQ0FBQ2MsVUFBVSxDQUFDMEIsSUFBSSxDQUFDckI7SUFDekI7QUFDRiJ9
|
@@ -16,12 +16,12 @@ const transformForWrite = ({ adapter, data, fields, path = '', tableName })=>{
|
|
16
16
|
blocks: {},
|
17
17
|
blocksToDelete: new Set(),
|
18
18
|
locales: {},
|
19
|
-
texts: [],
|
20
19
|
numbers: [],
|
21
20
|
relationships: [],
|
22
21
|
relationshipsToDelete: [],
|
23
22
|
row: {},
|
24
|
-
selects: {}
|
23
|
+
selects: {},
|
24
|
+
texts: []
|
25
25
|
};
|
26
26
|
// This function is responsible for building up the
|
27
27
|
// above rowToInsert
|
@@ -36,16 +36,16 @@ const transformForWrite = ({ adapter, data, fields, path = '', tableName })=>{
|
|
36
36
|
fieldPrefix: '',
|
37
37
|
fields,
|
38
38
|
locales: rowToInsert.locales,
|
39
|
-
texts: rowToInsert.texts,
|
40
39
|
numbers: rowToInsert.numbers,
|
41
40
|
parentTableName: tableName,
|
42
41
|
path,
|
43
42
|
relationships: rowToInsert.relationships,
|
44
43
|
relationshipsToDelete: rowToInsert.relationshipsToDelete,
|
45
44
|
row: rowToInsert.row,
|
46
|
-
selects: rowToInsert.selects
|
45
|
+
selects: rowToInsert.selects,
|
46
|
+
texts: rowToInsert.texts
|
47
47
|
});
|
48
48
|
return rowToInsert;
|
49
49
|
};
|
50
50
|
|
51
|
-
//# sourceMappingURL=data:application/json;base64,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
};
|
20
20
|
|
21
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vd3JpdGUvdGV4dHMudHMiXSwic291cmNlc0NvbnRlbnQiOlsidHlwZSBBcmdzID0ge1xuICBiYXNlUm93OiBSZWNvcmQ8c3RyaW5nLCB1bmtub3duPlxuICBkYXRhOiB1bmtub3duW11cbiAgdGV4dHM6IFJlY29yZDxzdHJpbmcsIHVua25vd24+
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vd3JpdGUvdGV4dHMudHMiXSwic291cmNlc0NvbnRlbnQiOlsidHlwZSBBcmdzID0ge1xuICBiYXNlUm93OiBSZWNvcmQ8c3RyaW5nLCB1bmtub3duPlxuICBkYXRhOiB1bmtub3duW11cbiAgdGV4dHM6IFJlY29yZDxzdHJpbmcsIHVua25vd24+W11cbn1cblxuZXhwb3J0IGNvbnN0IHRyYW5zZm9ybVRleHRzID0gKHsgYmFzZVJvdywgZGF0YSwgdGV4dHMgfTogQXJncykgPT4ge1xuICBkYXRhLmZvckVhY2goKHZhbCwgaSkgPT4ge1xuICAgIHRleHRzLnB1c2goe1xuICAgICAgLi4uYmFzZVJvdyxcbiAgICAgIG9yZGVyOiBpICsgMSxcbiAgICAgIHRleHQ6IHZhbCxcbiAgICB9KVxuICB9KVxufVxuIl0sIm5hbWVzIjpbInRyYW5zZm9ybVRleHRzIiwiYmFzZVJvdyIsImRhdGEiLCJ0ZXh0cyIsImZvckVhY2giLCJ2YWwiLCJpIiwicHVzaCIsIm9yZGVyIiwidGV4dCJdLCJtYXBwaW5ncyI6Ijs7OzsrQkFNYUE7OztlQUFBQTs7O0FBQU4sTUFBTUEsaUJBQWlCLENBQUMsRUFBRUMsT0FBTyxFQUFFQyxJQUFJLEVBQUVDLEtBQUssRUFBUTtJQUMzREQsS0FBS0UsT0FBTyxDQUFDLENBQUNDLEtBQUtDO1FBQ2pCSCxNQUFNSSxJQUFJLENBQUM7WUFDVCxHQUFHTixPQUFPO1lBQ1ZPLE9BQU9GLElBQUk7WUFDWEcsTUFBTUo7UUFDUjtJQUNGO0FBQ0YifQ==
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"traverseFields.d.ts","sourceRoot":"","sources":["../../../src/transform/write/traverseFields.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAK1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;
|
1
|
+
{"version":3,"file":"traverseFields.d.ts","sourceRoot":"","sources":["../../../src/transform/write/traverseFields.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAK1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAUvF,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,MAAM,EAAE;QACN,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;KACxC,CAAA;IACD;;OAEG;IACH,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE;QACN,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;KACxC,CAAA;IACD,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAA;IACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;IAC3C;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE;QACP,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAC1C,CAAA;IACD,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;IAClC;;OAEG;IACH,eAAe,EAAE,MAAM,CAAA;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;IACxC,qBAAqB,EAAE,oBAAoB,EAAE,CAAA;IAC7C,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC5B,OAAO,EAAE;QACP,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;KAC/C,CAAA;IACD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;CACjC,CAAA;AAED,eAAO,MAAM,cAAc,4OAqBxB,IAAI,SAicN,CAAA"}
|
@@ -10,7 +10,6 @@ Object.defineProperty(exports, "traverseFields", {
|
|
10
10
|
});
|
11
11
|
const _types = require("payload/types");
|
12
12
|
const _tosnakecase = /*#__PURE__*/ _interop_require_default(require("to-snake-case"));
|
13
|
-
const _getTableName = require("../../schema/getTableName");
|
14
13
|
const _isArrayOfRows = require("../../utilities/isArrayOfRows");
|
15
14
|
const _array = require("./array");
|
16
15
|
const _blocks = require("./blocks");
|
@@ -29,17 +28,12 @@ const traverseFields = ({ adapter, arrays, baseTableName, blocks, blocksToDelete
|
|
29
28
|
let fieldName = '';
|
30
29
|
let fieldData;
|
31
30
|
if ((0, _types.fieldAffectsData)(field)) {
|
32
|
-
columnName = `${columnPrefix || ''}${(0,
|
33
|
-
adapter,
|
34
|
-
config: field,
|
35
|
-
// do not pass columnPrefix here because it is required and custom dbNames also need it
|
36
|
-
prefix: ''
|
37
|
-
})}`;
|
31
|
+
columnName = `${columnPrefix || ''}${(0, _tosnakecase.default)(field.name)}`;
|
38
32
|
fieldName = `${fieldPrefix || ''}${field.name}`;
|
39
33
|
fieldData = data[field.name];
|
40
34
|
}
|
41
35
|
if (field.type === 'array') {
|
42
|
-
const arrayTableName = `${parentTableName}_${columnName}
|
36
|
+
const arrayTableName = adapter.tableNameMap.get(`${parentTableName}_${columnName}`);
|
43
37
|
if (!arrays[arrayTableName]) arrays[arrayTableName] = [];
|
44
38
|
if (field.localized) {
|
45
39
|
if (typeof data[field.name] === 'object' && data[field.name] !== null) {
|
@@ -86,11 +80,8 @@ const traverseFields = ({ adapter, arrays, baseTableName, blocks, blocksToDelete
|
|
86
80
|
return;
|
87
81
|
}
|
88
82
|
if (field.type === 'blocks') {
|
89
|
-
field.blocks.forEach((
|
90
|
-
blocksToDelete.add((0,
|
91
|
-
adapter,
|
92
|
-
config: block
|
93
|
-
}));
|
83
|
+
field.blocks.forEach(({ slug })=>{
|
84
|
+
blocksToDelete.add((0, _tosnakecase.default)(slug));
|
94
85
|
});
|
95
86
|
if (field.localized) {
|
96
87
|
if (typeof data[field.name] === 'object' && data[field.name] !== null) {
|
@@ -384,7 +375,7 @@ const traverseFields = ({ adapter, arrays, baseTableName, blocks, blocksToDelete
|
|
384
375
|
return;
|
385
376
|
}
|
386
377
|
if (field.type === 'select' && field.hasMany) {
|
387
|
-
const selectTableName = `${parentTableName}_${columnName}
|
378
|
+
const selectTableName = adapter.tableNameMap.get(`${parentTableName}_${columnName}`);
|
388
379
|
if (!selects[selectTableName]) selects[selectTableName] = [];
|
389
380
|
if (field.localized) {
|
390
381
|
if (typeof data[field.name] === 'object' && data[field.name] !== null) {
|
@@ -449,4 +440,4 @@ const traverseFields = ({ adapter, arrays, baseTableName, bloc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IG5ld1Jvd3MgPSB0cmFuc2Zvcm1BcnJheSh7XG4gICAgICAgICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICAgICAgICBhcnJheVRhYmxlTmFtZSxcbiAgICAgICAgICAgICAgICBiYXNlVGFibGVOYW1lLFxuICAgICAgICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICAgICAgICBibG9ja3NUb0RlbGV0ZSxcbiAgICAgICAgICAgICAgICBkYXRhOiBsb2NhbGVEYXRhLFxuICAgICAgICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgICAgICAgIGxvY2FsZTogbG9jYWxlS2V5LFxuICAgICAgICAgICAgICAgIG51bWJlcnMsXG4gICAgICAgICAgICAgICAgcGF0aCxcbiAgICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgICAgIHJlbGF0aW9uc2hpcHNUb0RlbGV0ZSxcbiAgICAgICAgICAgICAgICBzZWxlY3RzLFxuICAgICAgICAgICAgICAgIHRleHRzLFxuICAgICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICAgIGFycmF5c1thcnJheVRhYmxlTmFtZV0gPSBhcnJheXNbYXJyYXlUYWJsZU5hbWVdLmNvbmNhdChuZXdSb3dzKVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGNvbnN0IG5ld1Jvd3MgPSB0cmFuc2Zvcm1BcnJheSh7XG4gICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICBhcnJheVRhYmxlTmFtZSxcbiAgICAgICAgICBiYXNlVGFibGVOYW1lLFxuICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICBibG9ja3NUb0RlbGV0ZSxcbiAgICAgICAgICBkYXRhOiBkYXRhW2ZpZWxkLm5hbWVdLFxuICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgIG51bWJlcnMsXG4gICAgICAgICAgcGF0aCxcbiAgICAgICAgICByZWxhdGlvbn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5LFxuICAgICAgICAgICAgICAgIG51bWJlcnMsXG4gICAgICAgICAgICAgICAgcGF0aCxcbiAgICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgICAgIHJlbGF0aW9uc2hpcHNUb0RlbGV0ZSxcbiAgICAgICAgICAgICAgICBzZWxlY3RzLFxuICAgICAgICAgICAgICAgIHRleHRzLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSBpZiAoaXNBcnJheU9mUm93cyhmaWVsZERhdGEpKSB7XG4gICAgICAgIHRyYW5zZm9ybUJsb2Nrcyh7XG4gICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICBiYXNlVGFibGVOYW1lLFxuICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICBibG9ja3NUb0RlbGV0ZSxcbiAgICAgICAgICBkYXRhOiBmaWVsZERhdGEsXG4gICAgICAgICAgZmllbGQsXG4gICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICBwYXRoLFxuICAgICAgICAgIHJlbGF0aW9uc2hpcHMsXG4gICAgICAgICAgcmVsYXRpb25zaGlwc1RvRGVsZXRlLFxuICAgICAgICAgIHNlbGVjdHMsXG4gICAgICAgICAgdGV4dHMsXG4gICAgICAgIH0pXG4gICAgICB9XG5cbiAgICAgIHJldHVyblxuICAgIH1cblxuICAgIGlmIChmaWVsZC50eXBlID09PSAnZ3JvdXAnKSB7XG4gICAgICBpZiAodHlwZW9mIGRhdGFbZmllbGQubmFtZV0gPT09ICdvYmplY3QnICYmIGRhdGFbZmllbGQubmFtZV0gIT09IG51bGwpIHtcbiAgICAgICAgaWYgKGZpZWxkLmxvY2FsaXplZCkge1xuICAgICAgICAgIE9iamVjdC5lbnRyaWVzKGRhdGFbZmllbGQubmFtZV0pLmZvckVhY2goKFtsb2NhbGVLZXksIGxvY2FsZURhdGFdKSA9PiB7XG4gICAgICAgICAgICB0cmF2ZXJzZUZpZWxkcyh7XG4gICAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICAgIGFycmF5cyxcbiAgICAgICAgICAgICAgYmFzZVRhYmxlTmFtZSxcbiAgICAgICAgICAgICAgYmxvY2tzLFxuICAgICAgICAgICAgICBibG9ja3NUb0RlbGV0ZSxcbiAgICAgICAgICAgICAgY29sdW1uUHJlZml4OiBgJHtjb2x1bW5OYW1lfV9gLFxuICAgICAgICAgICAgICBkYXRhOiBsb2NhbGVEYXRhIGFzIFJlY29yZDxzdHJpbmcsIHVua25vd24+LFxuICAgICAgICAgICAgICBleGlzdGluZ0xvY2FsZXMsXG4gICAgICAgICAgICAgIGZpZWxkUHJlZml4OiBgJHtmaWVsZE5hbWV9X2AsXG4gICAgICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgICAgICBmb3JjZWRMb2NhbGU6IGxvY2FsZUtleSxcbiAgICAgICAgICAgICAgbG9jYWxlcyxcbiAgICAgICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICAgICAgcGFyZW50VGFibGVOYW1lLFxuICAgICAgICAgICAgICBwYXRoOiBgJHtwYXRoIHx8ICcnfSR7ZmllbGQubmFtZX0uYCxcbiAgICAgICAgICAgICAgcmVsYXRpb25zaGlwcyxcbiAgICAgICAgICAgICAgcmVsYXRpb25zaGlwc1RvRGVsZXRlLFxuICAgICAgICAgICAgICByb3csXG4gICAgICAgICAgICAgIHNlbGVjdHMsXG4gICAgICAgICAgICAgIHRleHRzLFxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9KVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRyYXZlcnNlRmllbGRzKHtcbiAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICBhcnJheXMsXG4gICAgICAgICAgICBiYXNlVGFibGVOYW1lLFxuICAgICAgICAgICAgYmxvY2tzLFxuICAgICAgICAgICAgYmxvY2tzVG9EZWxldGUsXG4gICAgICAgICAgICBjb2x1bW5QcmVmaXg6IGAke2NvbHVtbk5hbWV9X2AsXG4gICAgICAgICAgICBkYXRhOiBkYXRhW2ZpZWxkLm5hbWVdIGFzIFJlY29yZDxzdHJpbmcsIHVua25vd24+LFxuICAgICAgICAgICAgZXhpc3RpbmdMb2NhbGVzLFxuICAgICAgICAgICAgZmllbGRQcmVmaXg6IGAke2ZpZWxkTmFtZX1fYCxcbiAgICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgICAgbG9jYWxlcyxcbiAgICAgICAgICAgIG51bWJlcnMsXG4gICAgICAgICAgICBwYXJlbnRUYWJsZU5hbWUsXG4gICAgICAgICAgICBwYXRoOiBgJHtwYXRoIHx8ICcnfSR7ZmllbGQubmFtZX0uYCxcbiAgICAgICAgICAgIHJlbGF0aW9uc2hpcHMsXG4gICAgICAgICAgICByZWxhdGlvbnNoaXBzVG9EZWxldGUsXG4gICAgICAgICAgICByb3csXG4gICAgICAgICAgICBzZWxlY3RzLFxuICAgICAgICAgICAgdGV4dHMsXG4gICAgICAgICAgfSlcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICByZXR1cm5cbiAgICB9XG5cbiAgICBpZiAoZmllbGQudHlwZSA9PT0gJ3RhYnMnKSB7XG4gICAgICBmaWVsZC50YWJzLmZvckVhY2goKHRhYikgPT4ge1xuICAgICAgICBpZiAoJ25hbWUnIGluIHRhYikge1xuICAgICAgICAgIGlmICh0eXBlb2YgZGF0YVt0YWIubmFtZV0gPT09ICdvYmplY3QnICYmIGRhdGFbdGFiLm5hbWVdICE9PSBudWxsKSB7XG4gICAgICAgICAgICBpZiAodGFiLmxvY2FsaXplZCkge1xuICAgICAgICAgICAgICBPYmplY3QuZW50cmllcyhkYXRhW3RhYi5uYW1lXSkuZm9yRWFjaCgoW2xvY2FsZUtleSwgbG9jYWxlRGF0YV0pID0+IHtcbiAgICAgICAgICAgICAgICB0cmF2ZXJzZUZpZWxkcyh7XG4gICAgICAgICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgICAgICAgYXJyYXlzLFxuICAgICAgICAgICAgICAgICAgYmFzZVRhYmxlTmFtZSxcbiAgICAgICAgICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICAgICAgICAgIGJsb2Nrc1RvRGVsZXRlLFxuICAgICAgICAgICAgICAgICAgY29sdW1uUHJlZml4OiBgJHtjb2x1bW5QcmVmaXggfHwgJyd9JHt0b1NuYWtlQ2FzZSh0YWIubmFtZSl9X2AsXG4gICAgICAgICAgICAgICAgICBkYXRhOiBsb2NhbGVEYXRhIGFzIFJlY29yZDxzdHJpbmcsIHVua25vd24+LFxuICAgICAgICAgICAgICAgICAgZXhpc3RpbmdMb2NhbGVzLFxuICAgICAgICAgICAgICAgICAgZmllbGRQcmVmaXg6IGAke2ZpZWxkUHJlZml4IHx8ICcnfSR7dGFiLm5hbWV9X2AsXG4gICAgICAgICAgICAgICAgICBmaWVsZHM6IHRhYi5maWVsZHMsXG4gICAgICAgICAgICAgICAgICBmb3JjZWRMb2NhbGU6IGxvY2FsZUtleSxcbiAgICAgICAgICAgICAgICAgIGxvY2FsZXMsXG4gICAgICAgICAgICAgICAgICBudW1iZXJzLFxuICAgICAgICAgICAgICAgICAgcGFyZW50VGFibGVOYW1lLFxuICAgICAgICAgICAgICAgICAgcGF0aDogYCR7cGF0aCB8fCAnJ30ke3RhYi5uYW1lfS5gLFxuICAgICAgICAgICAgICAgICAgcmVsYXRpb25zaGlwcyxcbiAgICAgICAgICAgICAgICAgIHJlbGF0aW9uc2hpcHNUb0RlbGV0ZSxcbiAgICAgICAgICAgICAgICAgIHJvdyxcbiAgICAgICAgICAgICAgICAgIHNlbGVjdHMsXG4gICAgICAgICAgICAgICAgICB0ZXh0cyxcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgdHJhdmVyc2VGaWVsZHMoe1xuICAgICAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICAgICAgYXJyYXlzLFxuICAgICAgICAgICAgICAgIGJhc2VUYWJsZU5hbWUsXG4gICAgICAgICAgICAgICAgYmxvY2tzLFxuICAgICAgICAgICAgICAgIGJsb2Nrc1RvRGVsZXRlLFxuICAgICAgICAgICAgICAgIGNvbHVtblByZWZpeDogYCR7Y29sdW1uUHJlZml4IHx8ICcnfSR7dG9TbmFrZUNhc2UodGFiLm5hbWUpfV9gLFxuICAgICAgICAgICAgICAgIGRhdGE6IGRhdGFbdGFiLm5hbWVdIGFzIFJlY29yZDxzdHJpbmcsIHVua25vd24+LFxuICAgICAgICAgICAgICAgIGV4aXN0aW5nTG9jYWxlcyxcbiAgICAgICAgICAgICAgICBmaWVsZFByZWZpeDogYCR7ZmllbGRQcmVmaXggfHwgJyd9JHt0YWIubmFtZX1fYCxcbiAgICAgICAgICAgICAgICBmaWVsZHM6IHRhYi5maWVsZHMsXG4gICAgICAgICAgICAgICAgbG9jYWxlcyxcbiAgICAgICAgICAgICAgICBudW1iZXJzLFxuICAgICAgICAgICAgICAgIHBhcmVudFRhYmxlTmFtZSxcbiAgICAgICAgICAgICAgICBwYXRoOiBgJHtwYXRoIHx8ICcnfSR7dGFiLm5hbWV9LmAsXG4gICAgICAgICAgICAgICAgcmVsYXRpb25zaGlwcyxcbiAgICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzVG9EZWxldGUsXG4gICAgICAgICAgICAgICAgcm93LFxuICAgICAgICAgICAgICAgIHNlbGVjdHMsXG4gICAgICAgICAgICAgICAgdGV4dHMsXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRyYXZlcnNlRmllbGRzKHtcbiAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICBhcnJheXMsXG4gICAgICAgICAgICBiYXNlVGFibGVOYW1lLFxuICAgICAgICAgICAgYmxvY2tzLFxuICAgICAgICAgICAgYmxvY2tzVG9EZWxldGUsXG4gICAgICAgICAgICBjb2x1bW5QcmVmaXgsXG4gICAgICAgICAgICBkYXRhLFxuICAgICAgICAgICAgZXhpc3RpbmdMb2NhbGVzLFxuICAgICAgICAgICAgZmllbGRQcmVmaXgsXG4gICAgICAgICAgICBmaWVsZHM6IHRhYi5maWVsZHMsXG4gICAgICAgICAgICBsb2NhbGVzLFxuICAgICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICAgIHBhcmVudFRhYmxlTmFtZSxcbiAgICAgICAgICAgIHBhdGgsXG4gICAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgcmVsYXRpb25zaGlwc1RvRGVsZXRlLFxuICAgICAgICAgICAgcm93LFxuICAgICAgICAgICAgc2VsZWN0cyxcbiAgICAgICAgICAgIHRleHRzLFxuICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICAgIH0pXG4gICAgfVxuXG4gICAgaWYgKGZpZWxkLnR5cGUgPT09ICdyb3cnIHx8IGZpZWxkLnR5cGUgPT09ICdjb2xsYXBzaWJsZScpIHtcbiAgICAgIHRyYXZlcnNlRmllbGRzKHtcbiAgICAgICAgYWRhcHRlcixcbiAgICAgICAgYXJyYXlzLFxuICAgICAgICBiYXNlVGFibGVOYW1lLFxuICAgICAgICBibG9ja3MsXG4gICAgICAgIGJsb2Nrc1RvRGVsZXRlLFxuICAgICAgICBjb2x1bW5QcmVmaXgsXG4gICAgICAgIGRhdGEsXG4gICAgICAgIGV4aXN0aW5nTG9jYWxlcyxcbiAgICAgICAgZmllbGRQcmVmaXgsXG4gICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICBsb2NhbGVzLFxuICAgICAgICBudW1iZXJzLFxuICAgICAgICBwYXJlbnRUYWJsZU5hbWUsXG4gICAgICAgIHBhdGgsXG4gICAgICAgIHJlbGF0aW9uc2hpcHMsXG4gICAgICAgIHJlbGF0aW9uc2hpcHNUb0RlbGV0ZSxcbiAgICAgICAgcm93LFxuICAgICAgICBzZWxlY3RzLFxuICAgICAgICB0ZXh0cyxcbiAgICAgIH0pXG4gICAgfVxuXG4gICAgaWYgKGZpZWxkLnR5cGUgPT09ICdyZWxhdGlvbnNoaXAnIHx8IGZpZWxkLnR5cGUgPT09ICd1cGxvYWQnKSB7XG4gICAgICBjb25zdCByZWxhdGlvbnNoaXBQYXRoID0gYCR7cGF0aCB8fCAnJ30ke2ZpZWxkLm5hbWV9YFxuXG4gICAgICBpZiAoZmllbGQubG9jYWxpemVkKSB7XG4gICAgICAgIGlmICh0eXBlb2YgZmllbGREYXRhID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgIE9iamVjdC5lbnRyaWVzKGZpZWxkRGF0YSkuZm9yRWFjaCgoW2xvY2FsZUtleSwgbG9jYWxlRGF0YV0pID0+IHtcbiAgICAgICAgICAgIGlmIChsb2NhbGVEYXRhID09PSBudWxsKSB7XG4gICAgICAgICAgICAgIHJlbGF0aW9uc2hpcHNUb0RlbGV0ZS5wdXNoKHtcbiAgICAgICAgICAgICAgICBsb2NhbGU6IGxvY2FsZUtleSxcbiAgICAgICAgICAgICAgICBwYXRoOiByZWxhdGlvbnNoaXBQYXRoLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICByZXR1cm5cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdHJhbnNmb3JtUmVsYXRpb25zaGlwKHtcbiAgICAgICAgICAgICAgYmFzZVJvdzoge1xuICAgICAgICAgICAgICAgIGxvY2FsZTogbG9jYWxlS2V5LFxuICAgICAgICAgICAgICAgIHBhdGg6IHJlbGF0aW9uc2hpcFBhdGgsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIGRhdGE6IGxvY2FsZURhdGEsXG4gICAgICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9KVxuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBpZiAoZmllbGREYXRhID09PSBudWxsIHx8IChBcnJheS5pc0FycmF5KGZpZWxkRGF0YSkgJiYgZmllbGREYXRhLmxlbmd0aCA9PT0gMCkpIHtcbiAgICAgICAgICByZWxhdGlvbnNoaXBzVG9EZWxldGUucHVzaCh7IHBhdGg6IHJlbGF0aW9uc2hpcFBhdGggfSlcbiAgICAgICAgICByZXR1cm5cbiAgICAgICAgfVxuXG4gICAgICAgIHRyYW5zZm9ybVJlbGF0aW9uc2hpcCh7XG4gICAgICAgICAgYmFzZVJvdzoge1xuICAgICAgICAgICAgcGF0aDogcmVsYXRpb25zaGlwUGF0aCxcbiAgICAgICAgICB9LFxuICAgICAgICAgIGRhdGE6IGZpZWxkRGF0YSxcbiAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICB9KVxuICAgICAgfVxuXG4gICAgICByZXR1cm5cbiAgICB9XG5cbiAgICBpZiAoZmllbGQudHlwZSA9PT0gJ3RleHQnICYmIGZpZWxkLmhhc01hbnkpIHtcbiAgICAgIGNvbnN0IHRleHRQYXRoID0gYCR7cGF0aCB8fCAnJ30ke2ZpZWxkLm5hbWV9YFxuXG4gICAgICBpZiAoZmllbGQubG9jYWxpemVkKSB7XG4gICAgICAgIGlmICh0eXBlb2YgZmllbGREYXRhID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgIE9iamVjdC5lbnRyaWVzKGZpZWxkRGF0YSkuZm9yRWFjaCgoW2xvY2FsZUtleSwgbG9jYWxlRGF0YV0pID0+IHtcbiAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGxvY2FsZURhdGEpKSB7XG4gICAgICAgICAgICAgIHRyYW5zZm9ybVRleHRzKHtcbiAgICAgICAgICAgICAgICBiYXNlUm93OiB7XG4gICAgICAgICAgICAgICAgICBsb2NhbGU6IGxvY2FsZUtleSxcbiAgICAgICAgICAgICAgICAgIHBhdGg6IHRleHRQYXRoLFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgZGF0YTogbG9jYWxlRGF0YSxcbiAgICAgICAgICAgICAgICB0ZXh0cyxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KVxuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKEFycmF5LmlzQXJyYXkoZmllbGREYXRhKSkge1xuICAgICAgICB0cmFuc2Zvcm1UZXh0cyh7XG4gICAgICAgICAgYmFzZVJvdzoge1xuICAgICAgICAgICAgcGF0aDogdGV4dFBhdGgsXG4gICAgICAgICAgfSxcbiAgICAgICAgICBkYXRhOiBmaWVsZERhdGEsXG4gICAgICAgICAgdGV4dHMsXG4gICAgICAgIH0pXG4gICAgICB9XG5cbiAgICAgIHJldHVyblxuICAgIH1cblxuICAgIGlmIChmaWVsZC50eXBlID09PSAnbnVtYmVyJyAmJiBmaWVsZC5oYXNNYW55KSB7XG4gICAgICBjb25zdCBudW1iZXJQYXRoID0gYCR7cGF0aCB8fCAnJ30ke2ZpZWxkLm5hbWV9YFxuXG4gICAgICBpZiAoZmllbGQubG9jYWxpemVkKSB7XG4gICAgICAgIGlmICh0eXBlb2YgZmllbGREYXRhID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgIE9iamVjdC5lbnRyaWVzKGZpZWxkRGF0YSkuZm9yRWFjaCgoW2xvY2FsZUtleSwgbG9jYWxlRGF0YV0pID0+IHtcbiAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGxvY2FsZURhdGEpKSB7XG4gICAgICAgICAgICAgIHRyYW5zZm9ybU51bWJlcnMoe1xuICAgICAgICAgICAgICAgIGJhc2VSb3c6IHtcbiAgICAgICAgICAgICAgICAgIGxvY2FsZTogbG9jYWxlS2V5LFxuICAgICAgICAgICAgICAgICAgcGF0aDogbnVtYmVyUGF0aCxcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGRhdGE6IGxvY2FsZURhdGEsXG4gICAgICAgICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KVxuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKEFycmF5LmlzQXJyYXkoZmllbGREYXRhKSkge1xuICAgICAgICB0cmFuc2Zvcm1OdW1iZXJzKHtcbiAgICAgICAgICBiYXNlUm93OiB7XG4gICAgICAgICAgICBwYXRoOiBudW1iZXJQYXRoLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgZGF0YTogZmllbGREYXRhLFxuICAgICAgICAgIG51bWJlcnMsXG4gICAgICAgIH0pXG4gICAgICB9XG5cbiAgICAgIHJldHVyblxuICAgIH1cblxuICAgIGlmIChmaWVsZC50eXBlID09PSAnc2VsZWN0JyAmJiBmaWVsZC5oYXNNYW55KSB7XG4gICAgICBjb25zdCBzZWxlY3RUYWJsZU5hbWUgPSBgJHtwYXJlbnRUYWJsZU5hbWV9XyR7Y29sdW1uTmFtZX1gXG4gICAgICBpZiAoIXNlbGVjdHNbc2VsZWN0VGFibGVOYW1lXSkgc2VsZWN0c1tzZWxlY3RUYWJsZU5hbWVdID0gW11cblxuICAgICAgaWYgKGZpZWxkLmxvY2FsaXplZCkge1xuICAgICAgICBpZiAodHlwZW9mIGRhdGFbZmllbGQubmFtZV0gPT09ICdvYmplY3QnICYmIGRhdGFbZmllbGQubmFtZV0gIT09IG51bGwpIHtcbiAgICAgICAgICBPYmplY3QuZW50cmllcyhkYXRhW2ZpZWxkLm5hbWVdKS5mb3JFYWNoKChbbG9jYWxlS2V5LCBsb2NhbGVEYXRhXSkgPT4ge1xuICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkobG9jYWxlRGF0YSkpIHtcbiAgICAgICAgICAgICAgY29uc3QgbmV3Um93cyA9IHRyYW5zZm9ybVNlbGVjdHMoe1xuICAgICAgICAgICAgICAgIGlkOiBkYXRhLl91dWlkIHx8IGRhdGEuaWQsXG4gICAg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AgICAgICAgICAgIGFycmF5VGFibGVOYW1lLFxuICAgICAgICAgICAgICAgIGJhc2VUYWJsZU5hbWUsXG4gICAgICAgICAgICAgICAgYmxvY2tzLFxuICAgICAgICAgICAgICAgIGJsb2Nrc1RvRGVsZXRlLFxuICAgICAgICAgICAgICAgIGRhdGE6IGxvY2FsZURhdGEsXG4gICAgICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICAgICAgbG9jYWxlOiBsb2NhbGVLZXksXG4gICAgICAgICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICAgICAgICBwYXRoLFxuICAgICAgICAgICAgICAgIHJlbGF0aW9uc2hpcHMsXG4gICAgICAgICAgICAgICAgcmVsYXRpb25zaGlwc1RvRGVsZXRlLFxuICAgICAgICAgICAgICAgIHNlbGVjdHMsXG4gICAgICAgICAgICAgICAgdGV4dHMsXG4gICAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgICAgYXJyYXlzW2FycmF5VGFibGVOYW1lXSA9IGFycmF5c1thcnJheVRhYmxlTmFtZV0uY29uY2F0KG5ld1Jvd3MpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSlcbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgY29uc3QgbmV3Um93cyA9IHRyYW5zZm9ybUFycmF5KHtcbiAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgIGFycmF5VGFibGVOYW1lLFxuICAgICAgICAgIGJhc2VUYWJsZU5hbWUsXG4gICAgICAgICAgYmxvY2tzLFxuICAgICAgICAgIGJsb2Nrc1RvRGVsZXRlLFxuICAgICAgICAgIGRhdGE6IGRhdGFbZmllbGQubmFtZV0sXG4gICAgICAgICAgZmllbGQsXG4gICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICBwYXRoLFxuICAgICAgICAgIHJlbGF0aW9uc2hpcHMsXG4gICAgICAgICAgcmVsYXRpb25zaGlwc1RvRGVsZXRlLFxuICAgICAgICAgIHNlbGVjdHMsXG4gICAgICAgICAgdGV4dHMsXG4gICAgICAgIH0pXG5cbiAgICAgICAgYXJyYXlzW2FycmF5VGFibGVOYW1lXSA9IGFycmF5c1thcnJheVRhYmxlTmFtZV0uY29uY2F0KG5ld1Jvd3MpXG4gICAgICB9XG5cbiAgICAgIHJldHVyblxuICAgIH1cblxuICAgIGlmIChmaWVsZC50eXBlID09PSAnYmxvY2tzJykge1xuICAgICAgZmllbGQuYmxvY2tzLmZvckVhY2goKHsgc2x1ZyB9KSA9PiB7XG4gICAgICAgIGJsb2Nrc1RvRGVsZXRlLmFkZCh0b1NuYWtlQ2FzZShzbHVnKSlcbiAgICAgIH0pXG5cbiAgICAgIGlmIChmaWVsZC5sb2NhbGl6ZWQpIHtcbiAgICAgICAgaWYgKHR5cGVvZiBkYXRhW2ZpZWxkLm5hbWVdID09PSAnb2JqZWN0JyAmJiBkYXRhW2ZpZWxkLm5hbWVdICE9PSBudWxsKSB7XG4gICAgICAgICAgT2JqZWN0LmVudHJpZXMoZGF0YVtmaWVsZC5uYW1lXSkuZm9yRWFjaCgoW2xvY2FsZUtleSwgbG9jYWxlRGF0YV0pID0+IHtcbiAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGxvY2FsZURhdGEpKSB7XG4gICAgICAgICAgICAgIHRyYW5zZm9ybUJsb2Nrcyh7XG4gICAgICAgICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICAgICAgICBiYXNlVGFibGVOYW1lLFxuICAgICAgICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICAgICAgICBibG9ja3NUb0RlbGV0ZSxcbiAgICAgICAgICAgICAgICBkYXRhOiBsb2NhbGVEYXRhLFxuICAgICAgICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgICAgICAgIGxvY2FsZTogbG9jYWxlS2V5LFxuICAgICAgICAgICAgICAgIG51bWJlcnMsXG4gICAgICAgICAgICAgICAgcGF0aCxcbiAgICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgICAgIHJlbGF0aW9uc2hpcHNUb0RlbGV0ZSxcbiAgICAgICAgICAgICAgICBzZWxlY3RzLFxuICAgICAgICAgICAgICAgIHRleHRzLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSBpZiAoaXNBcnJheU9mUm93cyhmaWVsZERhdGEpKSB7XG4gICAgICAgIHRyYW5zZm9ybUJsb2Nrcyh7XG4gICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICBiYXNlVGFibGVOYW1lLFxuICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICBibG9ja3NUb0RlbGV0ZSxcbiAgICAgICAgICBkYXRhOiBmaWVsZERhdGEsXG4gICAgICAgICAgZmllbGQsXG4gICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICBwYXRoLFxuICAgICAgICAgIHJlbGF0aW9uc2hpcHMsXG4gICAgICAgICAgcmVsYXRpb25zaGlwc1RvRGVsZXRlLFxuICAgICAgICAgIHNlbGVjdHMsXG4gICAgICAgICAgdGV4dHMsXG4gICAgICAgIH0pXG4gICAgICB9XG5cbiAgICAgIHJldHVyblxuICAgIH1cblxuICAgIGlmIChmaWVsZC50eXBlID09PSAnZ3JvdXAnKSB7XG4gICAgICBpZiAodHlwZW9mIGRhdGFbZmllbGQubmFtZV0gPT09ICdvYmplY3QnICYmIGRhdGFbZmllbGQubmFtZV0gIT09IG51bGwpIHtcbiAgICAgICAgaWYgKGZpZWxkLmxvY2FsaXplZCkge1xuICAgICAgICAgIE9iamVjdC5lbnRyaWVzKGRhdGFbZmllbGQubmFtZV0pLmZvckVhY2goKFtsb2NhbGVLZXksIGxvY2FsZURhdGFdKSA9PiB7XG4gICAgICAgICAgICB0cmF2ZXJzZUZpZWxkcyh7XG4gICAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICAgIGFycmF5cyxcbiAgICAgICAgICAgICAgYmFzZVRhYmxlTmFtZSxcbiAgICAgICAgICAgICAgYmxvY2tzLFxuICAgICAgICAgICAgICBibG9ja3NUb0RlbGV0ZSxcbiAgICAgICAgICAgICAgY29sdW1uUHJlZml4OiBgJHtjb2x1bW5OYW1lfV9gLFxuICAgICAgICAgICAgICBkYXRhOiBsb2NhbGVEYXRhIGFzIFJlY29yZDxzdHJpbmcsIHVua25vd24+LFxuICAgICAgICAgICAgICBleGlzdGluZ0xvY2FsZXMsXG4gICAgICAgICAgICAgIGZpZWxkUHJlZml4OiBgJHtmaWVsZE5hbWV9X2AsXG4gICAgICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgICAgICBmb3JjZWRMb2NhbGU6IGxvY2FsZUtleSxcbiAgICAgICAgICAgICAgbG9jYWxlcyxcbiAgICAgICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICAgICAgcGFyZW50VGFibGVOYW1lLFxuICAgICAgICAgICAgICBwYXRoOiBgJHtwYXRoIHx8ICcnfSR7ZmllbGQubmFtZX0uYCxcbiAgICAgICAgICAgICAgcmVsYXRpb25zaGlwcyxcbiAgICAgICAgICAgICAgcmVsYXRpb25zaGlwc1RvRGVsZXRlLFxuICAgICAgICAgICAgICByb3csXG4gICAgICAgICAgICAgIHNlbGVjdHMsXG4gICAgICAgICAgICAgIHRleHRzLFxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9KVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRyYXZlcnNlRmllbGRzKHtcbiAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICBhcnJheXMsXG4gICAgICAgICAgICBiYXNlVGFibGVOYW1lLFxuICAgICAgICAgICAgYmxvY2tzLFxuICAgICAgICAgICAgYmxvY2tzVG9EZWxldGUsXG4gICAgICAgICAgICBjb2x1bW5QcmVmaXg6IGAke2NvbHVtbk5hbWV9X2AsXG4gICAgICAgICAgICBkYXRhOiBkYXRhW2ZpZWxkLm5hbWVdIGFzIFJlY29yZDxzdHJpbmcsIHVua25vd24+LFxuICAgICAgICAgICAgZXhpc3RpbmdMb2NhbGVzLFxuICAgICAgICAgICAgZmllbGRQcmVmaXg6IGAke2ZpZWxkTmFtZX1fYCxcbiAgICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgICAgbG9jYWxlcyxcbiAgICAgICAgICAgIG51bWJlcnMsXG4gICAgICAgICAgICBwYXJlbnRUYWJsZU5hbWUsXG4gICAgICAgICAgICBwYXRoOiBgJHtwYXRoIHx8ICcnfSR7ZmllbGQubmFtZX0uYCxcbiAgICAgICAgICAgIHJlbGF0aW9uc2hpcHMsXG4gICAgICAgICAgICByZWxhdGlvbnNoaXBzVG9EZWxldGUsXG4gICAgICAgICAgICByb3csXG4gICAgICAgICAgICBzZWxlY3RzLFxuICAgICAgICAgICAgdGV4dHMsXG4gICAgICAgICAgfSlcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICByZXR1cm5cbiAgICB9XG5cbiAgICBpZiAoZmllbGQudHlwZSA9PT0gJ3RhYnMnKSB7XG4gICAgICBmaWVsZC50YWJzLmZvckVhY2goKHRhYikgPT4ge1xuICAgICAgICBpZiAoJ25hbWUnIGluIHRhYikge1xuICAgICAgICAgIGlmICh0eXBlb2YgZGF0YVt0YWIubmFtZV0gPT09ICdvYmplY3QnICYmIGRhdGFbdGFiLm5hbWVdICE9PSBudWxsKSB7XG4gICAgICAgICAgICBpZiAodGFiLmxvY2FsaXplZCkge1xuICAgICAgICAgICAgICBPYmplY3QuZW50cmllcyhkYXRhW3RhYi5uYW1lXSkuZm9yRWFjaCgoW2xvY2FsZUtleSwgbG9jYWxlRGF0YV0pID0+IHtcbiAgICAgICAgICAgICAgICB0cmF2ZXJzZUZpZWxkcyh7XG4gICAgICAgICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgICAgICAgYXJyYXlzLFxuICAgICAgICAgICAgICAgICAgYmFzZVRhYmxlTmFtZSxcbiAgICAgICAgICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICAgICAgICAgIGJsb2Nrc1RvRGVsZXRlLFxuICAgICAgICAgICAgICAgICAgY29sdW1uUHJlZml4OiBgJHtjb2x1bW5QcmVmaXggfHwgJyd9JHt0b1NuYWtlQ2FzZSh0YWIubmFtZSl9X2AsXG4gICAgICAgICAgICAgICAgICBkYXRhOiBsb2NhbGVEYXRhIGFzIFJlY29yZDxzdHJpbmcsIHVua25vd24+LFxuICAgICAgICAgICAgICAgICAgZXhpc3RpbmdMb2NhbGVzLFxuICAgICAgICAgICAgICAgICAgZmllbGRQcmVmaXg6IGAke2ZpZWxkUHJlZml4IHx8ICcnfSR7dGFiLm5hbWV9X2AsXG4gICAgICAgICAgICAgICAgICBmaWVsZHM6IHRhYi5maWVsZHMsXG4gICAgICAgICAgICAgICAgICBmb3JjZWRMb2NhbGU6IGxvY2FsZUtleSxcbiAgICAgICAgICAgICAgICAgIGxvY2FsZXMsXG4gICAgICAgICAgICAgICAgICBudW1iZXJzLFxuICAgICAgICAgICAgICAgICAgcGFyZW50VGFibGVOYW1lLFxuICAgICAgICAgICAgICAgICAgcGF0aDogYCR7cGF0aCB8fCAnJ30ke3RhYi5uYW1lfS5gLFxuICAgICAgICAgICAgICAgICAgcmVsYXRpb25zaGlwcyxcbiAgICAgICAgICAgICAgICAgIHJlbGF0aW9uc2hpcHNUb0RlbGV0ZSxcbiAgICAgICAgICAgICAgICAgIHJvdyxcbiAgICAgICAgICAgICAgICAgIHNlbGVjdHMsXG4gICAgICAgICAgICAgICAgICB0ZXh0cyxcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgdHJhdmVyc2VGaWVsZHMoe1xuICAgICAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICAgICAgYXJyYXlzLFxuICAgICAgICAgICAgICAgIGJhc2VUYWJsZU5hbWUsXG4gICAgICAgICAgICAgICAgYmxvY2tzLFxuICAgICAgICAgICAgICAgIGJsb2Nrc1RvRGVsZXRlLFxuICAgICAgICAgICAgICAgIGNvbHVtblByZWZpeDogYCR7Y29sdW1uUHJlZml4IHx8ICcnfSR7dG9TbmFrZUNhc2UodGFiLm5hbWUpfV9gLFxuICAgICAgICAgICAgICAgIGRhdGE6IGRhdGFbdGFiLm5hbWVdIGFzIFJlY29yZDxzdHJpbmcsIHVua25vd24+LFxuICAgICAgICAgICAgICAgIGV4aXN0aW5nTG9jYWxlcyxcbiAgICAgICAgICAgICAgICBmaWVsZFByZWZpeDogYCR7ZmllbGRQcmVmaXggfHwgJyd9JHt0YWIubmFtZX1fYCxcbiAgICAgICAgICAgICAgICBmaWVsZHM6IHRhYi5maWVsZHMsXG4gICAgICAgICAgICAgICAgbG9jYWxlcyxcbiAgICAgICAgICAgICAgICBudW1iZXJzLFxuICAgICAgICAgICAgICAgIHBhcmVudFRhYmxlTmFtZSxcbiAgICAgICAgICAgICAgICBwYXRoOiBgJHtwYXRoIHx8ICcnfSR7dGFiLm5hbWV9LmAsXG4gICAgICAgICAgICAgICAgcmVsYXRpb25zaGlwcyxcbiAgICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzVG9EZWxldGUsXG4gICAgICAgICAgICAgICAgcm93LFxuICAgICAgICAgICAgICAgIHNlbGVjdHMsXG4gICAgICAgICAgICAgICAgdGV4dHMsXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRyYXZlcnNlRmllbGRzKHtcbiAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICBhcnJheXMsXG4gICAgICAgICAgICBiYXNlVGFibGVOYW1lLFxuICAgICAgICAgICAgYmxvY2tzLFxuICAgICAgICAgICAgYmxvY2tzVG9EZWxldGUsXG4gICAgICAgICAgICBjb2x1bW5QcmVmaXgsXG4gICAgICAgICAgICBkYXRhLFxuICAgICAgICAgICAgZXhpc3RpbmdMb2NhbGVzLFxuICAgICAgICAgICAgZmllbGRQcmVmaXgsXG4gICAgICAgICAgICBmaWVsZHM6IHRhYi5maWVsZHMsXG4gICAgICAgICAgICBsb2NhbGVzLFxuICAgICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICAgIHBhcmVudFRhYmxlTmFtZSxcbiAgICAgICAgICAgIHBhdGgsXG4gICAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgcmVsYXRpb25zaGlwc1RvRGVsZXRlLFxuICAgICAgICAgICAgcm93LFxuICAgICAgICAgICAgc2VsZWN0cyxcbiAgICAgICAgICAgIHRleHRzLFxuICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICAgIH0pXG4gICAgfVxuXG4gICAgaWYgKGZpZWxkLnR5cGUgPT09ICdyb3cnIHx8IGZpZWxkLnR5cGUgPT09ICdjb2xsYXBzaWJsZScpIHtcbiAgICAgIHRyYXZlcnNlRmllbGRzKHtcbiAgICAgICAgYWRhcHRlcixcbiAgICAgICAgYXJyYXlzLFxuICAgICAgICBiYXNlVGFibGVOYW1lLFxuICAgICAgICBibG9ja3MsXG4gICAgICAgIGJsb2Nrc1RvRGVsZXRlLFxuICAgICAgICBjb2x1bW5QcmVmaXgsXG4gICAgICAgIGRhdGEsXG4gICAgICAgIGV4aXN0aW5nTG9jYWxlcyxcbiAgICAgICAgZmllbGRQcmVmaXgsXG4gICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICBsb2NhbGVzLFxuICAgICAgICBudW1iZXJzLFxuICAgICAgICBwYXJlbnRUYWJsZU5hbWUsXG4gICAgICAgIHBhdGgsXG4gICAgICAgIHJlbGF0aW9uc2hpcHMsXG4gICAgICAgIHJlbGF0aW9uc2hpcHNUb0RlbGV0ZSxcbiAgICAgICAgcm93LFxuICAgICAgICBzZWxlY3RzLFxuICAgICAgICB0ZXh0cyxcbiAgICAgIH0pXG4gICAgfVxuXG4gICAgaWYgKGZpZWxkLnR5cGUgPT09ICdyZWxhdGlvbnNoaXAnIHx8IGZpZWxkLnR5cGUgPT09ICd1cGxvYWQnKSB7XG4gICAgICBjb25zdCByZWxhdGlvbnNoaXBQYXRoID0gYCR7cGF0aCB8fCAnJ30ke2ZpZWxkLm5hbWV9YFxuXG4gICAgICBpZiAoZmllbGQubG9jYWxpemVkKSB7XG4gICAgICAgIGlmICh0eXBlb2YgZmllbGREYXRhID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgIE9iamVjdC5lbnRyaWVzKGZpZWxkRGF0YSkuZm9yRWFjaCgoW2xvY2FsZUtleSwgbG9jYWxlRGF0YV0pID0+IHtcbiAgICAgICAgICAgIGlmIChsb2NhbGVEYXRhID09PSBudWxsKSB7XG4gICAgICAgICAgICAgIHJlbGF0aW9uc2hpcHNUb0RlbGV0ZS5wdXNoKHtcbiAgICAgICAgICAgICAgICBsb2NhbGU6IGxvY2FsZUtleSxcbiAgICAgICAgICAgICAgICBwYXRoOiByZWxhdGlvbnNoaXBQYXRoLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICByZXR1cm5cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdHJhbnNmb3JtUmVsYXRpb25zaGlwKHtcbiAgICAgICAgICAgICAgYmFzZVJvdzoge1xuICAgICAgICAgICAgICAgIGxvY2FsZTogbG9jYWxlS2V5LFxuICAgICAgICAgICAgICAgIHBhdGg6IHJlbGF0aW9uc2hpcFBhdGgsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIGRhdGE6IGxvY2FsZURhdGEsXG4gICAgICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9KVxuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBpZiAoZmllbGREYXRhID09PSBudWxsIHx8IChBcnJheS5pc0FycmF5KGZpZWxkRGF0YSkgJiYgZmllbGREYXRhLmxlbmd0aCA9PT0gMCkpIHtcbiAgICAgICAgICByZWxhdGlvbnNoaXBzVG9EZWxldGUucHVzaCh7IHBhdGg6IHJlbGF0aW9uc2hpcFBhdGggfSlcbiAgICAgICAgICByZXR1cm5cbiAgICAgICAgfVxuXG4gICAgICAgIHRyYW5zZm9ybVJlbGF0aW9uc2hpcCh7XG4gICAgICAgICAgYmFzZVJvdzoge1xuICAgICAgICAgICAgcGF0aDogcmVsYXRpb25zaGlwUGF0aCxcbiAgICAgICAgICB9LFxuICAgICAgICAgIGRhdGE6IGZpZWxkRGF0YSxcbiAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICB9KVxuICAgICAgfVxuXG4gICAgICByZXR1cm5cbiAgICB9XG5cbiAgICBpZiAoZmllbGQudHlwZSA9PT0gJ3RleHQnICYmIGZpZWxkLmhhc01hbnkpIHtcbiAgICAgIGNvbnN0IHRleHRQYXRoID0gYCR7cGF0aCB8fCAnJ30ke2ZpZWxkLm5hbWV9YFxuXG4gICAgICBpZiAoZmllbGQubG9jYWxpemVkKSB7XG4gICAgICAgIGlmICh0eXBlb2YgZmllbGREYXRhID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgIE9iamVjdC5lbnRyaWVzKGZpZWxkRGF0YSkuZm9yRWFjaCgoW2xvY2FsZUtleSwgbG9jYWxlRGF0YV0pID0+IHtcbiAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGxvY2FsZURhdGEpKSB7XG4gICAgICAgICAgICAgIHRyYW5zZm9ybVRleHRzKHtcbiAgICAgICAgICAgICAgICBiYXNlUm93OiB7XG4gICAgICAgICAgICAgICAgICBsb2NhbGU6IGxvY2FsZUtleSxcbiAgICAgICAgICAgICAgICAgIHBhdGg6IHRleHRQYXRoLFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgZGF0YTogbG9jYWxlRGF0YSxcbiAgICAgICAgICAgICAgICB0ZXh0cyxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KVxuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKEFycmF5LmlzQXJyYXkoZmllbGREYXRhKSkge1xuICAgICAgICB0cmFuc2Zvcm1UZXh0cyh7XG4gICAgICAgICAgYmFzZVJvdzoge1xuICAgICAgICAgICAgcGF0aDogdGV4dFBhdGgsXG4gICAgICAgICAgfSxcbiAgICAgICAgICBkYXRhOiBmaWVsZERhdGEsXG4gICAgICAgICAgdGV4dHMsXG4gICAgICAgIH0pXG4gICAgICB9XG5cbiAgICAgIHJldHVyblxuICAgIH1cblxuICAgIGlmIChmaWVsZC50eXBlID09PSAnbnVtYmVyJyAmJiBmaWVsZC5oYXNNYW55KSB7XG4gICAgICBjb25zdCBudW1iZXJQYXRoID0gYCR7cGF0aCB8fCAnJ30ke2ZpZWxkLm5hbWV9YFxuXG4gICAgICBpZiAoZmllbGQubG9jYWxpemVkKSB7XG4gICAgICAgIGlmICh0eXBlb2YgZmllbGREYXRhID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgIE9iamVjdC5lbnRyaWVzKGZpZWxkRGF0YSkuZm9yRWFjaCgoW2xvY2FsZUtleSwgbG9jYWxlRGF0YV0pID0+IHtcbiAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGxvY2FsZURhdGEpKSB7XG4gICAgICAgICAgICAgIHRyYW5zZm9ybU51bWJlcnMoe1xuICAgICAgICAgICAgICAgIGJhc2VSb3c6IHtcbiAgICAgICAgICAgICAgICAgIGxvY2FsZTogbG9jYWxlS2V5LFxuICAgICAgICAgICAgICAgICAgcGF0aDogbnVtYmVyUGF0aCxcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGRhdGE6IGxvY2FsZURhdGEsXG4gICAgICAgICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KVxuICAgICAgICB9XG4gICA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ixVQUFVLENBQUNaLFVBQVUsR0FBRzJDO29CQUM5QixPQUFPO3dCQUNMRixHQUFHLENBQUN6QyxVQUFVLEdBQUcyQztvQkFDbkI7Z0JBQ0Y7WUFDRjtRQUNGO0lBQ0Y7QUFDRiJ9
|
@@ -31,7 +31,6 @@ export type RowToInsert = {
|
|
31
31
|
locales: {
|
32
32
|
[locale: string]: Record<string, unknown>;
|
33
33
|
};
|
34
|
-
texts: Record<string, unknown>[];
|
35
34
|
numbers: Record<string, unknown>[];
|
36
35
|
relationships: Record<string, unknown>[];
|
37
36
|
relationshipsToDelete: RelationshipToDelete[];
|
@@ -39,5 +38,6 @@ export type RowToInsert = {
|
|
39
38
|
selects: {
|
40
39
|
[tableName: string]: Record<string, unknown>[];
|
41
40
|
};
|
41
|
+
texts: Record<string, unknown>[];
|
42
42
|
};
|
43
43
|
//# sourceMappingURL=types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/transform/write/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE;QACN,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;KACxC,CAAA;IACD,OAAO,EAAE;QACP,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAC1C,CAAA;IACD,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE;QACN,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;KACxC,CAAA;IACD,OAAO,EAAE;QACP,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAC1C,CAAA;IACD,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;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,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE;QACN,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;KACxC,CAAA;IACD,MAAM,EAAE;QACN,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;KACxC,CAAA;IACD,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,OAAO,EAAE;QACP,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAC1C,CAAA;IACD,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;IAClC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;IACxC,qBAAqB,EAAE,oBAAoB,EAAE,CAAA;IAC7C,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC5B,OAAO,EAAE;QACP,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;KAC/C,CAAA;IACD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;CACjC,CAAA"}
|
package/dist/types.d.ts
CHANGED
@@ -8,14 +8,14 @@ import type { PayloadRequest } from 'payload/types';
|
|
8
8
|
import type { Pool, PoolConfig } from 'pg';
|
9
9
|
export type DrizzleDB = NodePgDatabase<Record<string, unknown>>;
|
10
10
|
export type Args = {
|
11
|
-
localesSuffix?: string;
|
12
11
|
idType?: 'serial' | 'uuid';
|
12
|
+
localesSuffix?: string;
|
13
13
|
logger?: DrizzleConfig['logger'];
|
14
14
|
migrationDir?: string;
|
15
15
|
pool: PoolConfig;
|
16
16
|
push?: boolean;
|
17
|
-
schemaName?: string;
|
18
17
|
relationshipsSuffix?: string;
|
18
|
+
schemaName?: string;
|
19
19
|
versionsSuffix?: string;
|
20
20
|
};
|
21
21
|
export type GenericColumn = PgColumn<ColumnBaseConfig<ColumnDataType, string>, Record<string, unknown>>;
|
@@ -32,10 +32,6 @@ export type GenericEnum = PgEnum<[string, ...string[]]>;
|
|
32
32
|
export type GenericRelation = Relations<string, Record<string, Relation<string>>>;
|
33
33
|
export type DrizzleTransaction = PgTransaction<NodePgQueryResultHKT, Record<string, unknown>, ExtractTablesWithRelations<Record<string, unknown>>>;
|
34
34
|
export type PostgresAdapter = BaseDatabaseAdapter & {
|
35
|
-
/**
|
36
|
-
* Used internally to map the block name to the table name
|
37
|
-
*/
|
38
|
-
blockTableNames: Record<string, string>;
|
39
35
|
drizzle: DrizzleDB;
|
40
36
|
enums: Record<string, GenericEnum>;
|
41
37
|
/**
|
@@ -63,6 +59,7 @@ export type PostgresAdapter = BaseDatabaseAdapter & {
|
|
63
59
|
resolve: () => Promise<void>;
|
64
60
|
};
|
65
61
|
};
|
62
|
+
tableNameMap: Map<string, string>;
|
66
63
|
tables: Record<string, GenericTable | PgTableWithColumns<any>>;
|
67
64
|
versionsSuffix?: string;
|
68
65
|
};
|
package/dist/types.d.ts.map
CHANGED
@@ -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,EACV,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,aAAa,EACd,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,E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,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../src/update.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAUjD,eAAO,MAAM,SAAS,EAAE,SA6CvB,CAAA"}
|
package/dist/update.js
CHANGED
@@ -8,9 +8,9 @@ Object.defineProperty(exports, "updateOne", {
|
|
8
8
|
return updateOne;
|
9
9
|
}
|
10
10
|
});
|
11
|
+
const _tosnakecase = /*#__PURE__*/ _interop_require_default(require("to-snake-case"));
|
11
12
|
const _buildQuery = /*#__PURE__*/ _interop_require_default(require("./queries/buildQuery"));
|
12
13
|
const _selectDistinct = require("./queries/selectDistinct");
|
13
|
-
const _getTableName = require("./schema/getTableName");
|
14
14
|
const _upsertRow = require("./upsertRow");
|
15
15
|
function _interop_require_default(obj) {
|
16
16
|
return obj && obj.__esModule ? obj : {
|
@@ -20,10 +20,7 @@ function _interop_require_default(obj) {
|
|
20
20
|
const updateOne = async function updateOne({ id, collection: collectionSlug, data, draft, locale, req, where: whereArg }) {
|
21
21
|
const db = this.sessions[req.transactionID]?.db || this.drizzle;
|
22
22
|
const collection = this.payload.collections[collectionSlug].config;
|
23
|
-
const tableName = (0,
|
24
|
-
adapter: this,
|
25
|
-
config: collection
|
26
|
-
});
|
23
|
+
const tableName = this.tableNameMap.get((0, _tosnakecase.default)(collection.slug));
|
27
24
|
const whereToUse = whereArg || {
|
28
25
|
id: {
|
29
26
|
equals: id
|
@@ -70,4 +67,4 @@ const updateOne = async function updateOne({ id, collection: collectionSlug, dat
|
|
70
67
|
return result;
|
71
68
|
};
|
72
69
|
|
73
|
-
//# sourceMappingURL=data:application/json;base64,
|
70
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy91cGRhdGUudHMiXSwic291cmNlc0NvbnRlbnQiOlsia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,"file":"updateGlobal.d.ts","sourceRoot":"","sources":["../src/updateGlobal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,KAAK,EAAkB,UAAU,EAAE,MAAM,eAAe,CAAA;AAI/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C,wBAAsB,YAAY,CAAC,CAAC,SAAS,UAAU,EACrD,IAAI,EAAE,eAAe,EACrB,EAAE,IAAI,EAAE,IAAI,EAAE,GAA0B,EAAE,EAAE,gBAAgB,GAC3D,OAAO,CAAC,CAAC,CAAC,CAkBZ"}
|
package/dist/updateGlobal.js
CHANGED
@@ -8,15 +8,17 @@ Object.defineProperty(exports, "updateGlobal", {
|
|
8
8
|
return updateGlobal;
|
9
9
|
}
|
10
10
|
});
|
11
|
-
const
|
11
|
+
const _tosnakecase = /*#__PURE__*/ _interop_require_default(require("to-snake-case"));
|
12
12
|
const _upsertRow = require("./upsertRow");
|
13
|
+
function _interop_require_default(obj) {
|
14
|
+
return obj && obj.__esModule ? obj : {
|
15
|
+
default: obj
|
16
|
+
};
|
17
|
+
}
|
13
18
|
async function updateGlobal({ slug, data, req = {} }) {
|
14
19
|
const db = this.sessions[req.transactionID]?.db || this.drizzle;
|
15
20
|
const globalConfig = this.payload.globals.config.find((config)=>config.slug === slug);
|
16
|
-
const tableName = (0,
|
17
|
-
adapter: this,
|
18
|
-
config: globalConfig
|
19
|
-
});
|
21
|
+
const tableName = this.tableNameMap.get((0, _tosnakecase.default)(globalConfig.slug));
|
20
22
|
const existingGlobal = await db.query[tableName].findFirst({});
|
21
23
|
const result = await (0, _upsertRow.upsertRow)({
|
22
24
|
...existingGlobal ? {
|
@@ -35,4 +37,4 @@ async function updateGlobal({ slug, data, req = {} }) {
|
|
35
37
|
return result;
|
36
38
|
}
|
37
39
|
|
38
|
-
//# sourceMappingURL=data:application/json;base64,
|
40
|
+
//# sourceMappingURL=data:application/json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0MsT0FBTyxDQUFDQyxNQUFNLENBQUNDLElBQUksQ0FBQyxDQUFDRCxTQUFXQSxPQUFPVixJQUFJLEtBQUtBO0lBQ2xGLE1BQU1ZLFlBQVksSUFBSSxDQUFDQyxZQUFZLENBQUNDLEdBQUcsQ0FBQ0MsSUFBQUEsb0JBQVcsRUFBQ1IsYUFBYVAsSUFBSTtJQUVyRSxNQUFNZ0IsaUJBQWlCLE1BQU1iLEdBQUdjLEtBQUssQ0FBQ0wsVUFBVSxDQUFDTSxTQUFTLENBQUMsQ0FBQztJQUU1RCxNQUFNQyxTQUFTLE1BQU1DLElBQUFBLG9CQUFTLEVBQUk7UUFDaEMsR0FBSUosaUJBQWlCO1lBQUVLLElBQUlMLGVBQWVLLEVBQUU7WUFBRUMsV0FBVztRQUFTLElBQUk7WUFBRUEsV0FBVztRQUFTLENBQUM7UUFDN0ZDLFNBQVMsSUFBSTtRQUNidEI7UUFDQUU7UUFDQXFCLFFBQVFqQixhQUFhaUIsTUFBTTtRQUMzQnRCO1FBQ0FVO0lBQ0Y7SUFFQSxPQUFPTztBQUNUIn0=
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"updateGlobalVersion.d.ts","sourceRoot":"","sources":["../src/updateGlobalVersion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAChF,OAAO,KAAK,EAAyC,UAAU,EAAE,MAAM,eAAe,CAAA;
|
1
|
+
{"version":3,"file":"updateGlobalVersion.d.ts","sourceRoot":"","sources":["../src/updateGlobalVersion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAChF,OAAO,KAAK,EAAyC,UAAU,EAAE,MAAM,eAAe,CAAA;AAKtF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAK9C,wBAAsB,mBAAmB,CAAC,CAAC,SAAS,UAAU,EAC5D,IAAI,EAAE,eAAe,EACrB,EACE,EAAE,EACF,MAAM,EACN,MAAM,EACN,GAA0B,EAC1B,WAAW,EACX,KAAK,EAAE,QAAQ,GAChB,EAAE,uBAAuB,CAAC,CAAC,CAAC,+BAmC9B"}
|
@@ -9,8 +9,8 @@ Object.defineProperty(exports, "updateGlobalVersion", {
|
|
9
9
|
}
|
10
10
|
});
|
11
11
|
const _versions = require("payload/versions");
|
12
|
+
const _tosnakecase = /*#__PURE__*/ _interop_require_default(require("to-snake-case"));
|
12
13
|
const _buildQuery = /*#__PURE__*/ _interop_require_default(require("./queries/buildQuery"));
|
13
|
-
const _getTableName = require("./schema/getTableName");
|
14
14
|
const _upsertRow = require("./upsertRow");
|
15
15
|
function _interop_require_default(obj) {
|
16
16
|
return obj && obj.__esModule ? obj : {
|
@@ -25,11 +25,7 @@ async function updateGlobalVersion({ id, global, locale, req = {}, versionData,
|
|
25
25
|
equals: id
|
26
26
|
}
|
27
27
|
};
|
28
|
-
const tableName = (0,
|
29
|
-
adapter: this,
|
30
|
-
config: globalConfig,
|
31
|
-
versions: true
|
32
|
-
});
|
28
|
+
const tableName = this.tableNameMap.get(`_${(0, _tosnakecase.default)(globalConfig.slug)}${this.versionsSuffix}`);
|
33
29
|
const fields = (0, _versions.buildVersionGlobalFields)(globalConfig);
|
34
30
|
const { where } = await (0, _buildQuery.default)({
|
35
31
|
adapter: this,
|
@@ -52,4 +48,4 @@ async function updateGlobalVersion({ id, global, locale, req = {}, versionData,
|
|
52
48
|
return result;
|
53
49
|
}
|
54
50
|
|
55
|
-
//# sourceMappingURL=data:application/json;base64,
|
51
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy91cGRhdGVHbG9iYWxWZXJzaW9uLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgVHlwZVdpdGhWZXJzaW9uLCBVcGRhdGVHbG9iYWxWZXJzaW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FTixLQUFLLEVBQUUsR0FBRyxNQUFNcUIsSUFBQUEsbUJBQVUsRUFBQztRQUNqQ0MsU0FBUyxJQUFJO1FBQ2JIO1FBQ0F0QjtRQUNBaUI7UUFDQWQsT0FBT1k7SUFDVDtJQUVBLE1BQU1XLFNBQVMsTUFBTUMsSUFBQUEsb0JBQVMsRUFBcUI7UUFDakQ3QjtRQUNBMkIsU0FBUyxJQUFJO1FBQ2JHLE1BQU0xQjtRQUNORztRQUNBaUI7UUFDQU8sV0FBVztRQUNYNUI7UUFDQWdCO1FBQ0FkO0lBQ0Y7SUFFQSxPQUFPdUI7QUFDVCJ9
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"updateVersion.d.ts","sourceRoot":"","sources":["../src/updateVersion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAC1E,OAAO,KAAK,EAA6C,UAAU,EAAE,MAAM,eAAe,CAAA;
|
1
|
+
{"version":3,"file":"updateVersion.d.ts","sourceRoot":"","sources":["../src/updateVersion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAC1E,OAAO,KAAK,EAA6C,UAAU,EAAE,MAAM,eAAe,CAAA;AAK1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAK9C,wBAAsB,aAAa,CAAC,CAAC,SAAS,UAAU,EACtD,IAAI,EAAE,eAAe,EACrB,EACE,EAAE,EACF,UAAU,EACV,MAAM,EACN,GAA0B,EAC1B,WAAW,EACX,KAAK,EAAE,QAAQ,GAChB,EAAE,iBAAiB,CAAC,CAAC,CAAC,+BAgCxB"}
|