@payloadcms/db-postgres 0.1.10 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/create.d.ts.map +1 -1
- package/dist/create.js +3 -2
- package/dist/createGlobal.d.ts.map +1 -1
- package/dist/createGlobal.js +3 -2
- package/dist/createGlobalVersion.d.ts +1 -1
- package/dist/createGlobalVersion.d.ts.map +1 -1
- package/dist/createGlobalVersion.js +3 -2
- package/dist/createVersion.d.ts.map +1 -1
- package/dist/createVersion.js +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/schema/traverseFields.d.ts.map +1 -1
- package/dist/schema/traverseFields.js +13 -5
- package/dist/transform/write/array.d.ts +2 -1
- package/dist/transform/write/array.d.ts.map +1 -1
- package/dist/transform/write/array.js +3 -2
- package/dist/transform/write/blocks.d.ts +2 -1
- package/dist/transform/write/blocks.d.ts.map +1 -1
- package/dist/transform/write/blocks.js +3 -2
- package/dist/transform/write/index.d.ts.map +1 -1
- package/dist/transform/write/index.js +3 -1
- package/dist/transform/write/traverseFields.d.ts +2 -1
- package/dist/transform/write/traverseFields.d.ts.map +1 -1
- package/dist/transform/write/traverseFields.js +15 -2
- package/dist/transform/write/types.d.ts +1 -0
- package/dist/transform/write/types.d.ts.map +1 -1
- package/dist/types.d.ts +6 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/update.d.ts.map +1 -1
- package/dist/update.js +3 -2
- package/dist/updateGlobal.d.ts.map +1 -1
- package/dist/updateGlobal.js +3 -2
- package/dist/updateGlobalVersion.d.ts +1 -2
- package/dist/updateGlobalVersion.d.ts.map +1 -1
- package/dist/updateGlobalVersion.js +3 -2
- package/dist/updateVersion.d.ts.map +1 -1
- package/dist/updateVersion.js +3 -2
- package/dist/upsertRow/index.d.ts +1 -1
- package/dist/upsertRow/index.d.ts.map +1 -1
- package/dist/upsertRow/index.js +183 -172
- package/dist/upsertRow/types.d.ts +2 -1
- package/dist/upsertRow/types.d.ts.map +1 -1
- package/package.json +3 -3
@@ -15,7 +15,7 @@ function _interop_require_default(obj) {
|
|
15
15
|
default: obj
|
16
16
|
};
|
17
17
|
}
|
18
|
-
const transformBlocks = ({ adapter, baseTableName, blocks, data, field, locale, numbers, path, relationships, relationshipsToDelete, selects })=>{
|
18
|
+
const transformBlocks = ({ adapter, baseTableName, blocks, blocksToDelete, data, field, locale, numbers, path, relationships, relationshipsToDelete, selects })=>{
|
19
19
|
data.forEach((blockRow, i)=>{
|
20
20
|
if (typeof blockRow.blockType !== 'string') return;
|
21
21
|
const matchedBlock = field.blocks.find(({ slug })=>slug === blockRow.blockType);
|
@@ -47,6 +47,7 @@ const transformBlocks = ({ adapter, baseTableName, blocks, data, field, locale,
|
|
47
47
|
arrays: newRow.arrays,
|
48
48
|
baseTableName,
|
49
49
|
blocks,
|
50
|
+
blocksToDelete,
|
50
51
|
columnPrefix: '',
|
51
52
|
data: blockRow,
|
52
53
|
fieldPrefix: '',
|
@@ -64,4 +65,4 @@ const transformBlocks = ({ adapter, baseTableName, blocks, data, field, locale,
|
|
64
65
|
});
|
65
66
|
};
|
66
67
|
|
67
|
-
//# sourceMappingURL=data:application/json;base64,
|
68
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vd3JpdGUvYmxvY2tzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qIGVzbGludC1kaXNhYmxlIG5vLXBhcmFtLXJlYXNzaWduICovXG5pbXBvcnQgdHlwZSB7IEJsb2NrRmllbGQgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgdG9TbmFrZUNhc2UgZnJvbSAndG8tc25ha2UtY2FzZSdcblxuaW1wb3J0IHR5cGUgeyBQb3N0Z3Jlc0FkYXB0ZXIgfSBmcm9tICcuLi8uLi90eXBlcydcbmltcG9ydCB0eXBlIHsgQmxvY2tSb3dUb0luc2VydCwgUmVsYXRpb25zaGlwVG9EZWxldGUgfSB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UcsRUFBRUgsTUFBTXFCLElBQUksQ0FBQyxDQUFDLEVBQUVaLEVBQUUsQ0FBQyxDQUFDO1lBQ3hDTDtZQUNBQztZQUNBYSxLQUFLSCxPQUFPRyxHQUFHO1lBQ2ZaO1FBQ0Y7UUFFQVQsTUFBTSxDQUFDYSxVQUFVLENBQUN3QixJQUFJLENBQUNuQjtJQUN6QjtBQUNGIn0=
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/transform/write/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAE1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAI1C,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,iBAAiB,gDAM3B,IAAI,KAAG,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/transform/write/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAE1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAI1C,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,iBAAiB,gDAM3B,IAAI,KAAG,WAqCT,CAAA"}
|
@@ -14,6 +14,7 @@ const transformForWrite = ({ adapter, data, fields, path = '', tableName })=>{
|
|
14
14
|
const rowToInsert = {
|
15
15
|
arrays: {},
|
16
16
|
blocks: {},
|
17
|
+
blocksToDelete: new Set(),
|
17
18
|
locales: {},
|
18
19
|
numbers: [],
|
19
20
|
relationships: [],
|
@@ -28,6 +29,7 @@ const transformForWrite = ({ adapter, data, fields, path = '', tableName })=>{
|
|
28
29
|
arrays: rowToInsert.arrays,
|
29
30
|
baseTableName: tableName,
|
30
31
|
blocks: rowToInsert.blocks,
|
32
|
+
blocksToDelete: rowToInsert.blocksToDelete,
|
31
33
|
columnPrefix: '',
|
32
34
|
data,
|
33
35
|
fieldPrefix: '',
|
@@ -44,4 +46,4 @@ const transformForWrite = ({ adapter, data, fields, path = '', tableName })=>{
|
|
44
46
|
return rowToInsert;
|
45
47
|
};
|
46
48
|
|
47
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vd3JpdGUvaW5kZXgudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcGFyYW0tcmVhc3NpZ24gKi9cbmltcG9ydCB0eXBlIHsgRmllbGQgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgdHlwZSB7IFBvc3RncmVzQWRhcHRlciB9IGZyb20gJy4uLy4uL3R5cGVzJ1xuaW1wb3J0IHR5cGUgeyBSb3dUb0luc2VydCB9IGZyb20gJy4vdHlwZXMnXG5cbmltcG9ydCB7IHRyYXZlcnNlRmllbGRzIH0gZnJvbSAnLi90cmF2ZXJzZUZpZWxkcydcblxudHlwZSBBcmdzID0ge1xuICBhZGFwdGVyOiBQb3N0Z3Jlc0FkYXB0ZXJcbiAgZGF0YTogU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iakI7UUFDQVEsU0FBU0wsWUFBWUssT0FBTztRQUM1QkMsU0FBU04sWUFBWU0sT0FBTztRQUM1QlMsaUJBQWlCaEI7UUFDakJEO1FBQ0FTLGVBQWVQLFlBQVlPLGFBQWE7UUFDeENDLHVCQUF1QlIsWUFBWVEscUJBQXFCO1FBQ3hEQyxLQUFLVCxZQUFZUyxHQUFHO1FBQ3BCQyxTQUFTVixZQUFZVSxPQUFPO0lBQzlCO0lBRUEsT0FBT1Y7QUFDVCJ9
|
@@ -13,6 +13,7 @@ type Args = {
|
|
13
13
|
blocks: {
|
14
14
|
[blockType: string]: BlockRowToInsert[];
|
15
15
|
};
|
16
|
+
blocksToDelete: Set<string>;
|
16
17
|
/**
|
17
18
|
* A snake-case field prefix, representing prior fields
|
18
19
|
* Ex: my_group_my_named_tab_
|
@@ -43,6 +44,6 @@ type Args = {
|
|
43
44
|
[tableName: string]: Record<string, unknown>[];
|
44
45
|
};
|
45
46
|
};
|
46
|
-
export declare const traverseFields: ({ adapter, arrays, baseTableName, blocks, columnPrefix, data, existingLocales, fieldPrefix, fields, forcedLocale, locales, numbers, parentTableName, path, relationships, relationshipsToDelete, row, selects, }: Args) => void;
|
47
|
+
export declare const traverseFields: ({ adapter, arrays, baseTableName, blocks, blocksToDelete, columnPrefix, data, existingLocales, fieldPrefix, fields, forcedLocale, locales, numbers, parentTableName, path, relationships, relationshipsToDelete, row, selects, }: Args) => void;
|
47
48
|
export {};
|
48
49
|
//# sourceMappingURL=traverseFields.d.ts.map
|
@@ -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;AASvF,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;;;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;CACF,CAAA;AAED,eAAO,MAAM,cAAc,
|
1
|
+
{"version":3,"file":"traverseFields.d.ts","sourceRoot":"","sources":["../../../src/transform/write/traverseFields.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA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E,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;KAC/C,CAAA;CACF,CAAA;AAED,eAAO,MAAM,cAAc,qOAoBxB,IAAI,SAsZN,CAAA"}
|
@@ -21,7 +21,7 @@ function _interop_require_default(obj) {
|
|
21
21
|
default: obj
|
22
22
|
};
|
23
23
|
}
|
24
|
-
const traverseFields = ({ adapter, arrays, baseTableName, blocks, columnPrefix, data, existingLocales, fieldPrefix, fields, forcedLocale, locales, numbers, parentTableName, path, relationships, relationshipsToDelete, row, selects })=>{
|
24
|
+
const traverseFields = ({ adapter, arrays, baseTableName, blocks, blocksToDelete, columnPrefix, data, existingLocales, fieldPrefix, fields, forcedLocale, locales, numbers, parentTableName, path, relationships, relationshipsToDelete, row, selects })=>{
|
25
25
|
fields.forEach((field)=>{
|
26
26
|
let columnName = '';
|
27
27
|
let fieldName = '';
|
@@ -43,6 +43,7 @@ const traverseFields = ({ adapter, arrays, baseTableName, blocks, columnPrefix,
|
|
43
43
|
arrayTableName,
|
44
44
|
baseTableName,
|
45
45
|
blocks,
|
46
|
+
blocksToDelete,
|
46
47
|
data: localeData,
|
47
48
|
field,
|
48
49
|
locale: localeKey,
|
@@ -62,6 +63,7 @@ const traverseFields = ({ adapter, arrays, baseTableName, blocks, columnPrefix,
|
|
62
63
|
arrayTableName,
|
63
64
|
baseTableName,
|
64
65
|
blocks,
|
66
|
+
blocksToDelete,
|
65
67
|
data: data[field.name],
|
66
68
|
field,
|
67
69
|
numbers,
|
@@ -75,6 +77,9 @@ const traverseFields = ({ adapter, arrays, baseTableName, blocks, columnPrefix,
|
|
75
77
|
return;
|
76
78
|
}
|
77
79
|
if (field.type === 'blocks') {
|
80
|
+
field.blocks.forEach(({ slug })=>{
|
81
|
+
blocksToDelete.add((0, _tosnakecase.default)(slug));
|
82
|
+
});
|
78
83
|
if (field.localized) {
|
79
84
|
if (typeof data[field.name] === 'object' && data[field.name] !== null) {
|
80
85
|
Object.entries(data[field.name]).forEach(([localeKey, localeData])=>{
|
@@ -83,6 +88,7 @@ const traverseFields = ({ adapter, arrays, baseTableName, blocks, columnPrefix,
|
|
83
88
|
adapter,
|
84
89
|
baseTableName,
|
85
90
|
blocks,
|
91
|
+
blocksToDelete,
|
86
92
|
data: localeData,
|
87
93
|
field,
|
88
94
|
locale: localeKey,
|
@@ -100,6 +106,7 @@ const traverseFields = ({ adapter, arrays, baseTableName, blocks, columnPrefix,
|
|
100
106
|
adapter,
|
101
107
|
baseTableName,
|
102
108
|
blocks,
|
109
|
+
blocksToDelete,
|
103
110
|
data: fieldData,
|
104
111
|
field,
|
105
112
|
numbers,
|
@@ -120,6 +127,7 @@ const traverseFields = ({ adapter, arrays, baseTableName, blocks, columnPrefix,
|
|
120
127
|
arrays,
|
121
128
|
baseTableName,
|
122
129
|
blocks,
|
130
|
+
blocksToDelete,
|
123
131
|
columnPrefix: `${columnName}_`,
|
124
132
|
data: localeData,
|
125
133
|
existingLocales,
|
@@ -142,6 +150,7 @@ const traverseFields = ({ adapter, arrays, baseTableName, blocks, columnPrefix,
|
|
142
150
|
arrays,
|
143
151
|
baseTableName,
|
144
152
|
blocks,
|
153
|
+
blocksToDelete,
|
145
154
|
columnPrefix: `${columnName}_`,
|
146
155
|
data: data[field.name],
|
147
156
|
existingLocales,
|
@@ -171,6 +180,7 @@ const traverseFields = ({ adapter, arrays, baseTableName, blocks, columnPrefix,
|
|
171
180
|
arrays,
|
172
181
|
baseTableName,
|
173
182
|
blocks,
|
183
|
+
blocksToDelete,
|
174
184
|
columnPrefix: `${columnPrefix || ''}${(0, _tosnakecase.default)(tab.name)}_`,
|
175
185
|
data: localeData,
|
176
186
|
existingLocales,
|
@@ -193,6 +203,7 @@ const traverseFields = ({ adapter, arrays, baseTableName, blocks, columnPrefix,
|
|
193
203
|
arrays,
|
194
204
|
baseTableName,
|
195
205
|
blocks,
|
206
|
+
blocksToDelete,
|
196
207
|
columnPrefix: `${columnPrefix || ''}${(0, _tosnakecase.default)(tab.name)}_`,
|
197
208
|
data: data[tab.name],
|
198
209
|
existingLocales,
|
@@ -215,6 +226,7 @@ const traverseFields = ({ adapter, arrays, baseTableName, blocks, columnPrefix,
|
|
215
226
|
arrays,
|
216
227
|
baseTableName,
|
217
228
|
blocks,
|
229
|
+
blocksToDelete,
|
218
230
|
columnPrefix,
|
219
231
|
data,
|
220
232
|
existingLocales,
|
@@ -238,6 +250,7 @@ const traverseFields = ({ adapter, arrays, baseTableName, blocks, columnPrefix,
|
|
238
250
|
arrays,
|
239
251
|
baseTableName,
|
240
252
|
blocks,
|
253
|
+
blocksToDelete,
|
241
254
|
columnPrefix,
|
242
255
|
data,
|
243
256
|
existingLocales,
|
@@ -386,4 +399,4 @@ const traverseFields = ({ adapter, arrays, baseTableName, blocks, columnPrefix,
|
|
386
399
|
});
|
387
400
|
};
|
388
401
|
|
389
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vd3JpdGUvdHJhdmVyc2VGaWVsZHMudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcGFyYW0tcmVhc3NpZ24gKi9cbmltcG9ydCB0eXBlIHsgRmllbGQgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgeyBmaWVsZEFmZmVjdHNEYXRhIH0gZnJvbSAncGF5bG9hZC90eXBlcydcbmltcG9ydCB0b1NuYWtlQ2FzZSBmcm9tICd0by1zbmFrZS1jYXNlJ1xuXG5pbXBvcnQgdHlwZSB7IFBvc3RncmVzQWRhcHRlciB9IGZyb20gJy4uLy4uL3R5cGVzJ1xuaW1wb3J0IHR5cGUgeyBBcnJheVJvd1RvSW5zZXJ0LCBCbG9ja1Jvd1RvSW5zZXJ0LCBSZWxhdGlvbnNoaXBUb0RlbGV0ZSB9IGZyb20gJy4vdHlwZXMnXG5cbmltcG9ydCB7IGlzQXJyY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AgICBhcnJheVRhYmxlTmFtZSxcbiAgICAgICAgICAgICAgICBiYXNlVGFibGVOYW1lLFxuICAgICAgICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICAgICAgICBkYXRhOiBsb2NhbGVEYXRhLFxuICAgICAgICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgICAgICAgIGxvY2FsZTogbG9jYWxlS2V5LFxuICAgICAgICAgICAgICAgIG51bWJlcnMsXG4gICAgICAgICAgICAgICAgcGF0aCxcbiAgICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgICAgIHJlbGF0aW9uc2hpcHNUb0RlbGV0ZSxcbiAgICAgICAgICAgICAgICBzZWxlY3RzLFxuICAgICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICAgIGFycmF5c1thcnJheVRhYmxlTmFtZV0gPSBhcnJheXNbYXJyYXlUYWJsZU5hbWVdLmNvbmNhdChuZXdSb3dzKVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGNvbnN0IG5ld1Jvd3MgPSB0cmFuc2Zvcm1BcnJheSh7XG4gICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICBhcnJheVRhYmxlTmFtZSxcbiAgICAgICAgICBiYXNlVGFibGVOYW1lLFxuICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICBkYXRhOiBkYXRhW2ZpZWxkLm5hbWVdLFxuICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgIG51bWJlcnMsXG4gICAgICAgICAgcGF0aCxcbiAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgIHJlbGF0aW9uc2hpcHNUb0RlbGV0ZSxcbiAgICAgICAgICBzZWxlY3RzLFxuICAgICAgICB9KVxuXG4gICAgICAgIGFycmF5c1thcnJheVRhYmxlTmFtZV0gPSBhcnJheXNbYXJyYXlUYWJsZU5hbWVdLmNvbmNhdChuZXdSb3dzKVxuICAgICAgfVxuXG4gICAgICByZXR1cm5cbiAgICB9XG5cbiAgICBpZiAoZmllbGQudHlwZSA9PT0gJ2Jsb2NrcycpIHtcbiAgICAgIGlmIChmaWVsZC5sb2NhbGl6ZWQpIHtcbiAgICAgICAgaWYgKHR5cGVvZiBkYXRhW2ZpZWxkLm5hbWVdID09PSAnb2JqZWN0JyAmJiBkYXRhW2ZpZWxkLm5hbWVdICE9PSBudWxsKSB7XG4gICAgICAgICAgT2JqZWN0LmVudHJpZXMoZGF0YVtmaWVsZC5uYW1lXSkuZm9yRWFjaCgoW2xvY2FsZUtleSwgbG9jYWxlRGF0YV0pID0+IHtcbiAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGxvY2FsZURhdGEpKSB7XG4gICAgICAgICAgICAgIHRyYW5zZm9ybUJsb2Nrcyh7XG4gICAgICAgICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICAgICAgICBiYXNlVGFibGVOYW1lLFxuICAgICAgICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICAgICAgICBkYXRhOiBsb2NhbGVEYXRhLFxuICAgICAgICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgICAgICAgIGxvY2FsZTogbG9jYWxlS2V5LFxuICAgICAgICAgICAgICAgIG51bWJlcnMsXG4gICAgICAgICAgICAgICAgcGF0aCxcbiAgICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgICAgIHJlbGF0aW9uc2hpcHNUb0RlbGV0ZSxcbiAgICAgICAgICAgICAgICBzZWxlY3RzLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSBpZiAoaXNBcnJheU9mUm93cyhmaWVsZERhdGEpKSB7XG4gICAgICAgIHRyYW5zZm9ybUJsb2Nrcyh7XG4gICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICBiYXNlVGFibGVOYW1lLFxuICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICBkYXRhOiBmaWVsZERhdGEsXG4gICAgICAgICAgZmllbGQsXG4gICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICBwYXRoLFxuICAgICAgICAgIHJlbGF0aW9uc2hpcHMsXG4gICAgICAgICAgcmVsYXRpb25zaGlwc1RvRGVsZXRlLFxuICAgICAgICAgIHNlbGVjdHMsXG4gICAgICAgIH0pXG4gICAgICB9XG5cbiAgICAgIHJldHVyblxuICAgIH1cblxuICAgIGlmIChmaWVsZC50eXBlID09PSAnZ3JvdXAnKSB7XG4gICAgICBpZiAodHlwZW9mIGRhdGFbZmllbGQubmFtZV0gPT09ICdvYmplY3QnICYmIGRhdGFbZmllbGQubmFtZV0gIT09IG51bGwpIHtcbiAgICAgICAgaWYgKGZpZWxkLmxvY2FsaXplZCkge1xuICAgICAgICAgIE9iamVjdC5lbnRyaWVzKGRhdGFbZmllbGQubmFtZV0pLmZvckVhY2goKFtsb2NhbGVLZXksIGxvY2FsZURhdGFdKSA9PiB7XG4gICAgICAgICAgICB0cmF2ZXJzZUZpZWxkcyh7XG4gICAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICAgIGFycmF5cyxcbiAgICAgICAgICAgICAgYmFzZVRhYmxlTmFtZSxcbiAgICAgICAgICAgICAgYmxvY2tzLFxuICAgICAgICAgICAgICBjb2x1bW5QcmVmaXg6IGAke2NvbHVtbk5hbWV9X2AsXG4gICAgICAgICAgICAgIGRhdGE6IGxvY2FsZURhdGEgYXMgUmVjb3JkPHN0cmluZywgdW5rbm93bj4sXG4gICAgICAgICAgICAgIGV4aXN0aW5nTG9jYWxlcyxcbiAgICAgICAgICAgICAgZmllbGRQcmVmaXg6IGAke2ZpZWxkTmFtZX1fYCxcbiAgICAgICAgICAgICAgZmllbGRzOiBmaWVsZC5maWVsZHMsXG4gICAgICAgICAgICAgIGZvcmNlZExvY2FsZTogbG9jYWxlS2V5LFxuICAgICAgICAgICAgICBsb2NhbGVzLFxuICAgICAgICAgICAgICBudW1iZXJzLFxuICAgICAgICAgICAgICBwYXJlbnRUYWJsZU5hbWUsXG4gICAgICAgICAgICAgIHBhdGg6IGAke3BhdGggfHwgJyd9JHtmaWVsZC5uYW1lfS5gLFxuICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzVG9EZWxldGUsXG4gICAgICAgICAgICAgIHJvdyxcbiAgICAgICAgICAgICAgc2VsZWN0cyxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfSlcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB0cmF2ZXJzZUZpZWxkcyh7XG4gICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgYXJyYXlzLFxuICAgICAgICAgICAgYmFzZVRhYmxlTmFtZSxcbiAgICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICAgIGNvbHVtblByZWZpeDogYCR7Y29sdW1uTmFtZX1fYCxcbiAgICAgICAgICAgIGRhdGE6IGRhdGFbZmllbGQubmFtZV0gYXMgUmVjb3JkPHN0cmluZywgdW5rbm93bj4sXG4gICAgICAgICAgICBleGlzdGluZ0xvY2FsZXMsXG4gICAgICAgICAgICBmaWVsZFByZWZpeDogYCR7ZmllbGROYW1lfV9gLFxuICAgICAgICAgICAgZmllbGRzOiBmaWVsZC5maWVsZHMsXG4gICAgICAgICAgICBsb2NhbGVzLFxuICAgICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICAgIHBhcmVudFRhYmxlTmFtZSxcbiAgICAgICAgICAgIHBhdGg6IGAke3BhdGggfHwgJyd9JHtmaWVsZC5uYW1lfS5gLFxuICAgICAgICAgICAgcmVsYXRpb25zaGlwcyxcbiAgICAgICAgICAgIHJlbGF0aW9uc2hpcHNUb0RlbGV0ZSxcbiAgICAgICAgICAgIHJvdyxcbiAgICAgICAgICAgIHNlbGVjdHMsXG4gICAgICAgICAgfSlcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICByZXR1cm5cbiAgICB9XG5cbiAgICBpZiAoZmllbGQudHlwZSA9PT0gJ3RhYnMnKSB7XG4gICAgICBmaWVsZC50YWJzLmZvckVhY2goKHRhYikgPT4ge1xuICAgICAgICBpZiAoJ25hbWUnIGluIHRhYikge1xuICAgICAgICAgIGlmICh0eXBlb2YgZGF0YVt0YWIubmFtZV0gPT09ICdvYmplY3QnICYmIGRhdGFbdGFiLm5hbWVdICE9PSBudWxsKSB7XG4gICAgICAgICAgICBpZiAodGFiLmxvY2FsaXplZCkge1xuICAgICAgICAgICAgICBPYmplY3QuZW50cmllcyhkYXRhW3RhYi5uYW1lXSkuZm9yRWFjaCgoW2xvY2FsZUtleSwgbG9jYWxlRGF0YV0pID0+IHtcbiAgICAgICAgICAgICAgICB0cmF2ZXJzZUZpZWxkcyh7XG4gICAgICAgICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgICAgICAgYXJyYXlzLFxuICAgICAgICAgICAgICAgICAgYmFzZVRhYmxlTmFtZSxcbiAgICAgICAgICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICAgICAgICAgIGNvbHVtblByZWZpeDogYCR7Y29sdW1uUHJlZml4IHx8ICcnfSR7dG9TbmFrZUNhc2UodGFiLm5hbWUpfV9gLFxuICAgICAgICAgICAgICAgICAgZGF0YTogbG9jYWxlRGF0YSBhcyBSZWNvcmQ8c3RyaW5nLCB1bmtub3duPixcbiAgICAgICAgICAgICAgICAgIGV4aXN0aW5nTG9jYWxlcyxcbiAgICAgICAgICAgICAgICAgIGZpZWxkUHJlZml4OiBgJHtmaWVsZFByZWZpeCB8fCAnJ30ke3RhYi5uYW1lfV9gLFxuICAgICAgICAgICAgICAgICAgZmllbGRzOiB0YWIuZmllbGRzLFxuICAgICAgICAgICAgICAgICAgZm9yY2VkTG9jYWxlOiBsb2NhbGVLZXksXG4gICAgICAgICAgICAgICAgICBsb2NhbGVzLFxuICAgICAgICAgICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICAgICAgICAgIHBhcmVudFRhYmxlTmFtZSxcbiAgICAgICAgICAgICAgICAgIHBhdGg6IGAke3BhdGggfHwgJyd9JHt0YWIubmFtZX0uYCxcbiAgICAgICAgICAgICAgICAgIHJlbGF0aW9uc2hpcHMsXG4gICAgICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzVG9EZWxldGUsXG4gICAgICAgICAgICAgICAgICByb3csXG4gICAgICAgICAgICAgICAgICBzZWxlY3RzLFxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB0cmF2ZXJzZUZpZWxkcyh7XG4gICAgICAgICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICAgICAgICBhcnJheXMsXG4gICAgICAgICAgICAgICAgYmFzZVRhYmxlTmFtZSxcbiAgICAgICAgICAgICAgICBibG9ja3MsXG4gICAgICAgICAgICAgICAgY29sdW1uUHJlZml4OiBgJHtjb2x1bW5QcmVmaXggfHwgJyd9JHt0b1NuYWtlQ2FzZSh0YWIubmFtZSl9X2AsXG4gICAgICAgICAgICAgICAgZGF0YTogZGF0YVt0YWIubmFtZV0gYXMgUmVjb3JkPHN0cmluZywgdW5rbm93bj4sXG4gICAgICAgICAgICAgICAgZXhpc3RpbmdMb2NhbGVzLFxuICAgICAgICAgICAgICAgIGZpZWxkUHJlZml4OiBgJHtmaWVsZFByZWZpeCB8fCAnJ30ke3RhYi5uYW1lfV9gLFxuICAgICAgICAgICAgICAgIGZpZWxkczogdGFiLmZpZWxkcyxcbiAgICAgICAgICAgICAgICBsb2NhbGVzLFxuICAgICAgICAgICAgICAgIG51bWJlcnMsXG4gICAgICAgICAgICAgICAgcGFyZW50VGFibGVOYW1lLFxuICAgICAgICAgICAgICAgIHBhdGg6IGAke3BhdGggfHwgJyd9JHt0YWIubmFtZX0uYCxcbiAgICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgICAgIHJlbGF0aW9uc2hpcHNUb0RlbGV0ZSxcbiAgICAgICAgICAgICAgICByb3csXG4gICAgICAgICAgICAgICAgc2VsZWN0cyxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdHJhdmVyc2VGaWVsZHMoe1xuICAgICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICAgIGFycmF5cyxcbiAgICAgICAgICAgIGJhc2VUYWJsZU5hbWUsXG4gICAgICAgICAgICBibG9ja3MsXG4gICAgICAgICAgICBjb2x1bW5QcmVmaXgsXG4gICAgICAgICAgICBkYXRhLFxuICAgICAgICAgICAgZXhpc3RpbmdMb2NhbGVzLFxuICAgICAgICAgICAgZmllbGRQcmVmaXgsXG4gICAgICAgICAgICBmaWVsZHM6IHRhYi5maWVsZHMsXG4gICAgICAgICAgICBsb2NhbGVzLFxuICAgICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICAgIHBhcmVudFRhYmxlTmFtZSxcbiAgICAgICAgICAgIHBhdGgsXG4gICAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgcmVsYXRpb25zaGlwc1RvRGVsZXRlLFxuICAgICAgICAgICAgcm93LFxuICAgICAgICAgICAgc2VsZWN0cyxcbiAgICAgICAgICB9KVxuICAgICAgICB9XG4gICAgICB9KVxuICAgIH1cblxuICAgIGlmIChmaWVsZC50eXBlID09PSAncm93JyB8fCBmaWVsZC50eXBlID09PSAnY29sbGFwc2libGUnKSB7XG4gICAgICB0cmF2ZXJzZUZpZWxkcyh7XG4gICAgICAgIGFkYXB0ZXIsXG4gICAgICAgIGFycmF5cyxcbiAgICAgICAgYmFzZVRhYmxlTmFtZSxcbiAgICAgICAgYmxvY2tzLFxuICAgICAgICBjb2x1bW5QcmVmaXgsXG4gICAgICAgIGRhdGEsXG4gICAgICAgIGV4aXN0aW5nTG9jYWxlcyxcbiAgICAgICAgZmllbGRQcmVmaXgsXG4gICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICBsb2NhbGVzLFxuICAgICAgICBudW1iZXJzLFxuICAgICAgICBwYXJlbnRUYWJsZU5hbWUsXG4gICAgICAgIHBhdGgsXG4gICAgICAgIHJlbGF0aW9uc2hpcHMsXG4gICAgICAgIHJlbGF0aW9uc2hpcHNUb0RlbGV0ZSxcbiAgICAgICAgcm93LFxuICAgICAgICBzZWxlY3RzLFxuICAgICAgfSlcbiAgICB9XG5cbiAgICBpZiAoZmllbGQudHlwZSA9PT0gJ3JlbGF0aW9uc2hpcCcgfHwgZmllbGQudHlwZSA9PT0gJ3VwbG9hZCcpIHtcbiAgICAgIGNvbnN0IHJlbGF0aW9uc2hpcFBhdGggPSBgJHtwYXRoIHx8ICcnfSR7ZmllbGQubmFtZX1gXG5cbiAgICAgIGlmIChmaWVsZC5sb2NhbGl6ZWQpIHtcbiAgICAgICAgaWYgKHR5cGVvZiBmaWVsZERhdGEgPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgT2JqZWN0LmVudHJpZXMoZmllbGREYXRhKS5mb3JFYWNoKChbbG9jYWxlS2V5LCBsb2NhbGVEYXRhXSkgPT4ge1xuICAgICAgICAgICAgaWYgKGxvY2FsZURhdGEgPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgcmVsYXRpb25zaGlwc1RvRGVsZXRlLnB1c2goe1xuICAgICAgICAgICAgICAgIGxvY2FsZTogbG9jYWxlS2V5LFxuICAgICAgICAgICAgICAgIHBhdGg6IHJlbGF0aW9uc2hpcFBhdGgsXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgIHJldHVyblxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0cmFuc2Zvcm1SZWxhdGlvbnNoaXAoe1xuICAgICAgICAgICAgICBiYXNlUm93OiB7XG4gICAgICAgICAgICAgICAgbG9jYWxlOiBsb2NhbGVLZXksXG4gICAgICAgICAgICAgICAgcGF0aDogcmVsYXRpb25zaGlwUGF0aCxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgZGF0YTogbG9jYWxlRGF0YSxcbiAgICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICAgIHJlbGF0aW9uc2hpcHMsXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGlmIChmaWVsZERhdGEgPT09IG51bGwgfHwgKEFycmF5LmlzQXJyYXkoZmllbGREYXRhKSAmJiBmaWVsZERhdGEubGVuZ3RoID09PSAwKSkge1xuICAgICAgICAgIHJlbGF0aW9uc2hpcHNUb0RlbGV0ZS5wdXNoKHsgcGF0aDogcmVsYXRpb25zaGlwUGF0aCB9KVxuICAgICAgICAgIHJldHVyblxuICAgICAgICB9XG5cbiAgICAgICAgdHJhbnNmb3JtUmVsYXRpb25zaGlwKHtcbiAgICAgICAgICBiYXNlUm93OiB7XG4gICAgICAgICAgICBwYXRoOiByZWxhdGlvbnNoaXBQYXRoLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgZGF0YTogZmllbGREYXRhLFxuICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgIHJlbGF0aW9uc2hpcHMsXG4gICAgICAgIH0pXG4gICAgICB9XG5cbiAgICAgIHJldHVyblxuICAgIH1cblxuICAgIGlmIChmaWVsZC50eXBlID09PSAnbnVtYmVyJyAmJiBmaWVsZC5oYXNNYW55KSB7XG4gICAgICBjb25zdCBudW1iZXJQYXRoID0gYCR7cGF0aCB8fCAnJ30ke2ZpZWxkLm5hbWV9YFxuXG4gICAgICBpZiAoZmllbGQubG9jYWxpemVkKSB7XG4gICAgICAgIGlmICh0eXBlb2YgZmllbGREYXRhID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgIE9iamVjdC5lbnRyaWVzKGZpZWxkRGF0YSkuZm9yRWFjaCgoW2xvY2FsZUtleSwgbG9jYWxlRGF0YV0pID0+IHtcbiAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGxvY2FsZURhdGEpKSB7XG4gICAgICAgICAgICAgIHRyYW5zZm9ybU51bWJlcnMoe1xuICAgICAgICAgICAgICAgIGJhc2VSb3c6IHtcbiAgICAgICAgICAgICAgICAgIGxvY2FsZTogbG9jYWxlS2V5LFxuICAgICAgICAgICAgICAgICAgcGF0aDogbnVtYmVyUGF0aCxcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGRhdGE6IGxvY2FsZURhdGEsXG4gICAgICAgICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KVxuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKEFycmF5LmlzQXJyYXkoZmllbGREYXRhKSkge1xuICAgICAgICB0cmFuc2Zvcm1OdW1iZXJzKHtcbiAgICAgICAgICBiYXNlUm93OiB7XG4gICAgICAgICAgICBwYXRoOiBudW1iZXJQYXRoLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgZGF0YTogZmllbGREYXRhLFxuICAgICAgICAgIG51bWJlcnMsXG4gICAgICAgIH0pXG4gICAgICB9XG5cbiAgICAgIHJldHVyblxuICAgIH1cblxuICAgIGlmIChmaWVsZC50eXBlID09PSAnc2VsZWN0JyAmJiBmaWVsZC5oYXNNYW55KSB7XG4gICAgICBjb25zdCBzZWxlY3RUYWJsZU5hbWUgPSBgJHtwYXJlbnRUYWJsZU5hbWV9XyR7Y29sdW1uTmFtZX1gXG4gICAgICBpZiAoIXNlbGVjdHNbc2VsZWN0VGFibGVOYW1lXSkgc2VsZWN0c1tzZWxlY3RUYWJsZU5hbWVdID0gW11cblxuICAgICAgaWYgKGZpZWxkLmxvY2FsaXplZCkge1xuICAgICAgICBpZiAodHlwZW9mIGRhdGFbZmllbGQubmFtZV0gPT09ICdvYmplY3QnICYmIGRhdGFbZmllbGQubmFtZV0gIT09IG51bGwpIHtcbiAgICAgICAgICB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uICAgIH1cblxuICAgIGlmIChmaWVsZC50eXBlID09PSAnYXJyYXknKSB7XG4gICAgICBjb25zdCBhcnJheVRhYmxlTmFtZSA9IGAke3BhcmVudFRhYmxlTmFtZX1fJHtjb2x1bW5OYW1lfWBcblxuICAgICAgaWYgKCFhcnJheXNbYXJyYXlUYWJsZU5hbWVdKSBhcnJheXNbYXJyYXlUYWJsZU5hbWVdID0gW11cblxuICAgICAgaWYgKGZpZWxkLmxvY2FsaXplZCkge1xuICAgICAgICBpZiAodHlwZW9mIGRhdGFbZmllbGQubmFtZV0gPT09ICdvYmplY3QnICYmIGRhdGFbZmllbGQubmFtZV0gIT09IG51bGwpIHtcbiAgICAgICAgICBPYmplY3QuZW50cmllcyhkYXRhW2ZpZWxkLm5hbWVdKS5mb3JFYWNoKChbbG9jYWxlS2V5LCBsb2NhbGVEYXRhXSkgPT4ge1xuICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkobG9jYWxlRGF0YSkpIHtcbiAgICAgICAgICAgICAgY29uc3QgbmV3Um93cyA9IHRyYW5zZm9ybUFycmF5KHtcbiAgICAgICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgICAgIGFycmF5VGFibGVOYW1lLFxuICAgICAgICAgICAgICAgIGJhc2VUYWJsZU5hbWUsXG4gICAgICAgICAgICAgICAgYmxvY2tzLFxuICAgICAgICAgICAgICAgIGJsb2Nrc1RvRGVsZXRlLFxuICAgICAgICAgICAgICAgIGRhdGE6IGxvY2FsZURhdGEsXG4gICAgICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICAgICAgbG9jYWxlOiBsb2NhbGVLZXksXG4gICAgICAgICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICAgICAgICBwYXRoLFxuICAgICAgICAgICAgICAgIHJlbGF0aW9uc2hpcHMsXG4gICAgICAgICAgICAgICAgcmVsYXRpb25zaGlwc1RvRGVsZXRlLFxuICAgICAgICAgICAgICAgIHNlbGVjdHMsXG4gICAgICAgICA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SB7XG4gICAgICAgICAgT2JqZWN0LmVudHJpZXMoZGF0YVtmaWVsZC5uYW1lXSkuZm9yRWFjaCgoW2xvY2FsZUtleSwgbG9jYWxlRGF0YV0pID0+IHtcbiAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGxvY2FsZURhdGEpKSB7XG4gICAgICAgICAgICAgIHRyYW5zZm9ybUJsb2Nrcyh7XG4gICAgICAgICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICAgICAgICBiYXNlVGFibGVOYW1lLFxuICAgICAgICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICAgICAgICBibG9ja3NUb0RlbGV0ZSxcbiAgICAgICAgICAgICAgICBkYXRhOiBsb2NhbGVEYXRhLFxuICAgICAgICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgICAgICAgIGxvY2FsZTogbG9jYWxlS2V5LFxuICAgICAgICAgICAgICAgIG51bWJlcnMsXG4gICAgICAgICAgICAgICAgcGF0aCxcbiAgICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgICAgIHJlbGF0aW9uc2hpcHNUb0RlbGV0ZSxcbiAgICAgICAgICAgICAgICBzZWxlY3RzLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSBpZiAoaXNBcnJheU9mUm93cyhmaWVsZERhdGEpKSB7XG4gICAgICAgIHRyYW5zZm9ybUJsb2Nrcyh7XG4gICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICBiYXNlVGFibGVOYW1lLFxuICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICBibG9ja3NUb0RlbGV0ZSxcbiAgICAgICAgICBkYXRhOiBmaWVsZERhdGEsXG4gICAgICAgICAgZmllbGQsXG4gICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICBwYXRoLFxuICAgICAgICAgIHJlbGF0aW9uc2hpcHMsXG4gICAgICAgICAgcmVsYXRpb25zaGlwc1RvRGVsZXRlLFxuICAgICAgICAgIHNlbGVjdHMsXG4gICAgICAgIH0pXG4gICAgICB9XG5cbiAgICAgIHJldHVyblxuICAgIH1cblxuICAgIGlmIChmaWVsZC50eXBlID09PSAnZ3JvdXAnKSB7XG4gICAgICBpZiAodHlwZW9mIGRhdGFbZmllbGQubmFtZV0gPT09ICdvYmplY3QnICYmIGRhdGFbZmllbGQubmFtZV0gIT09IG51bGwpIHtcbiAgICAgICAgaWYgKGZpZWxkLmxvY2FsaXplZCkge1xuICAgICAgICAgIE9iamVjdC5lbnRyaWVzKGRhdGFbZmllbGQubmFtZV0pLmZvckVhY2goKFtsb2NhbGVLZXksIGxvY2FsZURhdGFdKSA9PiB7XG4gICAgICAgICAgICB0cmF2ZXJzZUZpZWxkcyh7XG4gICAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICAgIGFycmF5cyxcbiAgICAgICAgICAgICAgYmFzZVRhYmxlTmFtZSxcbiAgICAgICAgICAgICAgYmxvY2tzLFxuICAgICAgICAgICAgICBibG9ja3NUb0RlbGV0ZSxcbiAgICAgICAgICAgICAgY29sdW1uUHJlZml4OiBgJHtjb2x1bW5OYW1lfV9gLFxuICAgICAgICAgICAgICBkYXRhOiBsb2NhbGVEYXRhIGFzIFJlY29yZDxzdHJpbmcsIHVua25vd24+LFxuICAgICAgICAgICAgICBleGlzdGluZ0xvY2FsZXMsXG4gICAgICAgICAgICAgIGZpZWxkUHJlZml4OiBgJHtmaWVsZE5hbWV9X2AsXG4gICAgICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgICAgICBmb3JjZWRMb2NhbGU6IGxvY2FsZUtleSxcbiAgICAgICAgICAgICAgbG9jYWxlcyxcbiAgICAgICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICAgICAgcGFyZW50VGFibGVOYW1lLFxuICAgICAgICAgICAgICBwYXRoOiBgJHtwYXRoIHx8ICcnfSR7ZmllbGQubmFtZX0uYCxcbiAgICAgICAgICAgICAgcmVsYXRpb25zaGlwcyxcbiAgICAgICAgICAgICAgcmVsYXRpb25zaGlwc1RvRGVsZXRlLFxuICAgICAgICAgICAgICByb3csXG4gICAgICAgICAgICAgIHNlbGVjdHMsXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH0pXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdHJhdmVyc2VGaWVsZHMoe1xuICAgICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICAgIGFycmF5cyxcbiAgICAgICAgICAgIGJhc2VUYWJsZU5hbWUsXG4gICAgICAgICAgICBibG9ja3MsXG4gICAgICAgICAgICBibG9ja3NUb0RlbGV0ZSxcbiAgICAgICAgICAgIGNvbHVtblByZWZpeDogYCR7Y29sdW1uTmFtZX1fYCxcbiAgICAgICAgICAgIGRhdGE6IGRhdGFbZmllbGQubmFtZV0gYXMgUmVjb3JkPHN0cmluZywgdW5rbm93bj4sXG4gICAgICAgICAgICBleGlzdGluZ0xvY2FsZXMsXG4gICAgICAgICAgICBmaWVsZFByZWZpeDogYCR7ZmllbGROYW1lfV9gLFxuICAgICAgICAgICAgZmllbGRzOiBmaWVsZC5maWVsZHMsXG4gICAgICAgICAgICBsb2NhbGVzLFxuICAgICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICAgIHBhcmVudFRhYmxlTmFtZSxcbiAgICAgICAgICAgIHBhdGg6IGAke3BhdGggfHwgJyd9JHtmaWVsZC5uYW1lfS5gLFxuICAgICAgICAgICAgcmVsYXRpb25zaGlwcyxcbiAgICAgICAgICAgIHJlbGF0aW9uc2hpcHNUb0RlbGV0ZSxcbiAgICAgICAgICAgIHJvdyxcbiAgICAgICAgICAgIHNlbGVjdHMsXG4gICAgICAgICAgfSlcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICByZXR1cm5cbiAgICB9XG5cbiAgICBpZiAoZmllbGQudHlwZSA9PT0gJ3RhYnMnKSB7XG4gICAgICBmaWVsZC50YWJzLmZvckVhY2goKHRhYikgPT4ge1xuICAgICAgICBpZiAoJ25hbWUnIGluIHRhYikge1xuICAgICAgICAgIGlmICh0eXBlb2YgZGF0YVt0YWIubmFtZV0gPT09ICdvYmplY3QnICYmIGRhdGFbdGFiLm5hbWVdICE9PSBudWxsKSB7XG4gICAgICAgICAgICBpZiAodGFiLmxvY2FsaXplZCkge1xuICAgICAgICAgICAgICBPYmplY3QuZW50cmllcyhkYXRhW3RhYi5uYW1lXSkuZm9yRWFjaCgoW2xvY2FsZUtleSwgbG9jYWxlRGF0YV0pID0+IHtcbiAgICAgICAgICAgICAgICB0cmF2ZXJzZUZpZWxkcyh7XG4gICAgICAgICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgICAgICAgYXJyYXlzLFxuICAgICAgICAgICAgICAgICAgYmFzZVRhYmxlTmFtZSxcbiAgICAgICAgICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICAgICAgICAgIGJsb2Nrc1RvRGVsZXRlLFxuICAgICAgICAgICAgICAgICAgY29sdW1uUHJlZml4OiBgJHtjb2x1bW5QcmVmaXggfHwgJyd9JHt0b1NuYWtlQ2FzZSh0YWIubmFtZSl9X2AsXG4gICAgICAgICAgICAgICAgICBkYXRhOiBsb2NhbGVEYXRhIGFzIFJlY29yZDxzdHJpbmcsIHVua25vd24+LFxuICAgICAgICAgICAgICAgICAgZXhpc3RpbmdMb2NhbGVzLFxuICAgICAgICAgICAgICAgICAgZmllbGRQcmVmaXg6IGAke2ZpZWxkUHJlZml4IHx8ICcnfSR7dGFiLm5hbWV9X2AsXG4gICAgICAgICAgICAgICAgICBmaWVsZHM6IHRhYi5maWVsZHMsXG4gICAgICAgICAgICAgICAgICBmb3JjZWRMb2NhbGU6IGxvY2FsZUtleSxcbiAgICAgICAgICAgICAgICAgIGxvY2FsZXMsXG4gICAgICAgICAgICAgICAgICBudW1iZXJzLFxuICAgICAgICAgICAgICAgICAgcGFyZW50VGFibGVOYW1lLFxuICAgICAgICAgICAgICAgICAgcGF0aDogYCR7cGF0aCB8fCAnJ30ke3RhYi5uYW1lfS5gLFxuICAgICAgICAgICAgICAgICAgcmVsYXRpb25zaGlwcyxcbiAgICAgICAgICAgICAgICAgIHJlbGF0aW9uc2hpcHNUb0RlbGV0ZSxcbiAgICAgICAgICAgICAgICAgIHJvdyxcbiAgICAgICAgICAgICAgICAgIHNlbGVjdHMsXG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHRyYXZlcnNlRmllbGRzKHtcbiAgICAgICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgICAgIGFycmF5cyxcbiAgICAgICAgICAgICAgICBiYXNlVGFibGVOYW1lLFxuICAgICAgICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICAgICAgICBibG9ja3NUb0RlbGV0ZSxcbiAgICAgICAgICAgICAgICBjb2x1bW5QcmVmaXg6IGAke2NvbHVtblByZWZpeCB8fCAnJ30ke3RvU25ha2VDYXNlKHRhYi5uYW1lKX1fYCxcbiAgICAgICAgICAgICAgICBkYXRhOiBkYXRhW3RhYi5uYW1lXSBhcyBSZWNvcmQ8c3RyaW5nLCB1bmtub3duPixcbiAgICAgICAgICAgICAgICBleGlzdGluZ0xvY2FsZXMsXG4gICAgICAgICAgICAgICAgZmllbGRQcmVmaXg6IGAke2ZpZWxkUHJlZml4IHx8ICcnfSR7dGFiLm5hbWV9X2AsXG4gICAgICAgICAgICAgICAgZmllbGRzOiB0YWIuZmllbGRzLFxuICAgICAgICAgICAgICAgIGxvY2FsZXMsXG4gICAgICAgICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICAgICAgICBwYXJlbnRUYWJsZU5hbWUsXG4gICAgICAgICAgICAgICAgcGF0aDogYCR7cGF0aCB8fCAnJ30ke3RhYi5uYW1lfS5gLFxuICAgICAgICAgICAgICAgIHJlbGF0aW9uc2hpcHMsXG4gICAgICAgICAgICAgICAgcmVsYXRpb25zaGlwc1RvRGVsZXRlLFxuICAgICAgICAgICAgICAgIHJvdyxcbiAgICAgICAgICAgICAgICBzZWxlY3RzLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB0cmF2ZXJzZUZpZWxkcyh7XG4gICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgYXJyYXlzLFxuICAgICAgICAgICAgYmFzZVRhYmxlTmFtZSxcbiAgICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICAgIGJsb2Nrc1RvRGVsZXRlLFxuICAgICAgICAgICAgY29sdW1uUHJlZml4LFxuICAgICAgICAgICAgZGF0YSxcbiAgICAgICAgICAgIGV4aXN0aW5nTG9jYWxlcyxcbiAgICAgICAgICAgIGZpZWxkUHJlZml4LFxuICAgICAgICAgICAgZmllbGRzOiB0YWIuZmllbGRzLFxuICAgICAgICAgICAgbG9jYWxlcyxcbiAgICAgICAgICAgIG51bWJlcnMsXG4gICAgICAgICAgICBwYXJlbnRUYWJsZU5hbWUsXG4gICAgICAgICAgICBwYXRoLFxuICAgICAgICAgICAgcmVsYXRpb25zaGlwcyxcbiAgICAgICAgICAgIHJlbGF0aW9uc2hpcHNUb0RlbGV0ZSxcbiAgICAgICAgICAgIHJvdyxcbiAgICAgICAgICAgIHNlbGVjdHMsXG4gICAgICAgICAgfSlcbiAgICAgICAgfVxuICAgICAgfSlcbiAgICB9XG5cbiAgICBpZiAoZmllbGQudHlwZSA9PT0gJ3JvdycgfHwgZmllbGQudHlwZSA9PT0gJ2NvbGxhcHNpYmxlJykge1xuICAgICAgdHJhdmVyc2VGaWVsZHMoe1xuICAgICAgICBhZGFwdGVyLFxuICAgICAgICBhcnJheXMsXG4gICAgICAgIGJhc2VUYWJsZU5hbWUsXG4gICAgICAgIGJsb2NrcyxcbiAgICAgICAgYmxvY2tzVG9EZWxldGUsXG4gICAgICAgIGNvbHVtblByZWZpeCxcbiAgICAgICAgZGF0YSxcbiAgICAgICAgZXhpc3RpbmdMb2NhbGVzLFxuICAgICAgICBmaWVsZFByZWZpeCxcbiAgICAgICAgZmllbGRzOiBmaWVsZC5maWVsZHMsXG4gICAgICAgIGxvY2FsZXMsXG4gICAgICAgIG51bWJlcnMsXG4gICAgICAgIHBhcmVudFRhYmxlTmFtZSxcbiAgICAgICAgcGF0aCxcbiAgICAgICAgcmVsYXRpb25zaGlwcyxcbiAgICAgICAgcmVsYXRpb25zaGlwc1RvRGVsZXRlLFxuICAgICAgICByb3csXG4gICAgICAgIHNlbGVjdHMsXG4gICAgICB9KVxuICAgIH1cblxuICAgIGlmIChmaWVsZC50eXBlID09PSAncmVsYXRpb25zaGlwJyB8fCBmaWVsZC50eXBlID09PSAndXBsb2FkJykge1xuICAgICAgY29uc3QgcmVsYXRpb25zaGlwUGF0aCA9IGAke3BhdGggfHwgJyd9JHtmaWVsZC5uYW1lfWBcblxuICAgICAgaWYgKGZpZWxkLmxvY2FsaXplZCkge1xuICAgICAgICBpZiAodHlwZW9mIGZpZWxkRGF0YSA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICBPYmplY3QuZW50cmllcyhmaWVsZERhdGEpLmZvckVhY2goKFtsb2NhbGVLZXksIGxvY2FsZURhdGFdKSA9PiB7XG4gICAgICAgICAgICBpZiAobG9jYWxlRGF0YSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzVG9EZWxldGUucHVzaCh7XG4gICAgICAgICAgICAgICAgbG9jYWxlOiBsb2NhbGVLZXksXG4gICAgICAgICAgICAgICAgcGF0aDogcmVsYXRpb25zaGlwUGF0aCxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgcmV0dXJuXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRyYW5zZm9ybVJlbGF0aW9uc2hpcCh7XG4gICAgICAgICAgICAgIGJhc2VSb3c6IHtcbiAgICAgICAgICAgICAgICBsb2NhbGU6IGxvY2FsZUtleSxcbiAgICAgICAgICAgICAgICBwYXRoOiByZWxhdGlvbnNoaXBQYXRoLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICBkYXRhOiBsb2NhbGVEYXRhLFxuICAgICAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICAgICAgcmVsYXRpb25zaGlwcyxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfSlcbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgaWYgKGZpZWxkRGF0YSA9PT0gbnVsbCB8fCAoQXJyYXkuaXNBcnJheShmaWVsZERhdGEpICYmIGZpZWxkRGF0YS5sZW5ndGggPT09IDApKSB7XG4gICAgICAgICAgcmVsYXRpb25zaGlwc1RvRGVsZXRlLnB1c2goeyBwYXRoOiByZWxhdGlvbnNoaXBQYXRoIH0pXG4gICAgICAgICAgcmV0dXJuXG4gICAgICAgIH1cblxuICAgICAgICB0cmFuc2Zvcm1SZWxhdGlvbnNoaXAoe1xuICAgICAgICAgIGJhc2VSb3c6IHtcbiAgICAgICAgICAgIHBhdGg6IHJlbGF0aW9uc2hpcFBhdGgsXG4gICAgICAgICAgfSxcbiAgICAgICAgICBkYXRhOiBmaWVsZERhdGEsXG4gICAgICAgICAgZmllbGQsXG4gICAgICAgICAgcmVsYXRpb25zaGlwcyxcbiAgICAgICAgfSlcbiAgICAgIH1cblxuICAgICAgcmV0dXJuXG4gICAgfVxuXG4gICAgaWYgKGZpZWxkLnR5cGUgPT09ICdudW1iZXInICYmIGZpZWxkLmhhc01hbnkpIHtcbiAgICAgIGNvbnN0IG51bWJlclBhdGggPSBgJHtwYXRoIHx8ICcnfSR7ZmllbGQubmFtZX1gXG5cbiAgICAgIGlmIChmaWVsZC5sb2NhbGl6ZWQpIHtcbiAgICAgICAgaWYgKHR5cGVvZiBmaWVsZERhdGEgPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgT2JqZWN0LmVudHJpZXMoZmllbGREYXRhKS5mb3JFYWNoKChbbG9jYWxlS2V5LCBsb2NhbGVEYXRhXSkgPT4ge1xuICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkobG9jYWxlRGF0YSkpIHtcbiAgICAgICAgICAgICAgdHJhbnNmb3JtTnVtYmVycyh7XG4gICAgICAgICAgICAgICAgYmFzZVJvdzoge1xuICAgICAgICAgICAgICAgICAgbG9jYWxlOiBsb2NhbGVLZXksXG4gICAgICAgICAgICAgICAgICBwYXRoOiBudW1iZXJQYXRoLFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgZGF0YTogbG9jYWxlRGF0YSxcbiAgICAgICAgICAgICAgICBudW1iZXJzLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSBpZiAoQXJyYXkuaXNBcnJheShmaWVsZERhdGEpKSB7XG4gICAgICAgIHRyYW5zZm9ybU51bWJlcnMoe1xuICAgICAgICAgIGJhc2VSb3c6IHtcbiAgICAgICAgICAgIHBhdGg6IG51bWJlclBhdGgsXG4gICAgICAgICAgfSxcbiAgICAgICAgICBkYXRhOiBmaWVsZERhdGEsXG4gICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgfSlcbiAgICAgIH1cblxuICAgICAgcmV0dXJuXG4gICAgfVxuXG4gICAgaWYgKGZpZWxkLnR5cGUgPT09ICdzZWxlY3QnICYmIGZpZWxkLmhhc01hbnkpIHtcbiAgICAgIGNvbnN0IHNlbGVjdFRhYmxlTmFtZSA9IGAke3BhcmVudFRhYmxlTmFtZX1fJHtjb2x1bW5OYW1lfWBcbiAgICAgIGlmICghc2VsZWN0c1tzZWxlY3RUYWJsZU5hbWVdKSBzZWxlY3RzW3NlbGVjdFRhYmxlTmFtZV0gPSBbXVxuXG4gICAgICBpZiAoZmllbGQubG9jYWxpemVkKSB7XG4gICAgICAgIGlmICh0eXBlb2YgZGF0YVt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,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,oBAAoB,GAAG;IACjC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,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;CACF,CAAA"}
|
package/dist/types.d.ts
CHANGED
@@ -39,6 +39,11 @@ export type PostgresAdapter = BaseDatabaseAdapter & {
|
|
39
39
|
};
|
40
40
|
};
|
41
41
|
tables: Record<string, GenericTable>;
|
42
|
+
/**
|
43
|
+
* An object keyed on each table, with a key value pair where the constraint name is the key, followed by the dot-notation field name
|
44
|
+
* Used for returning properly formed errors from unique fields
|
45
|
+
*/
|
46
|
+
fieldConstraints: Record<string, Record<string, string>>;
|
42
47
|
};
|
43
48
|
export type PostgresAdapterResult = (args: {
|
44
49
|
payload: Payload;
|
@@ -65,6 +70,7 @@ declare module 'payload' {
|
|
65
70
|
};
|
66
71
|
};
|
67
72
|
tables: Record<string, GenericTable>;
|
73
|
+
fieldConstraints: Record<string, Record<string, string>>;
|
68
74
|
}
|
69
75
|
}
|
70
76
|
//# sourceMappingURL=types.d.ts.map
|
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,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,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,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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O,EAAE,OAAO,CAAA;CAAE,CAAA;AAChD,MAAM,MAAM,eAAe,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAA;AAElD,OAAO,QAAQ,SAAS,CAAC;IACvB,UAAiB,eACf,SAAQ,IAAI,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAAC,EACzC,mBAAmB;QACrB,OAAO,EAAE,SAAS,CAAA;QAClB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;QAClC,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,IAAI,CAAA;gBAClB,OAAO,EAAE,MAAM,IAAI,CAAA;aACpB,CAAA;SACF,CAAA;QACD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;QACpC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;KACzD;CACF"}
|
package/dist/update.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../src/update.ts"],"names":[],"mappings":"AAAA,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,SAmEvB,CAAA"}
|
package/dist/update.js
CHANGED
@@ -86,9 +86,10 @@ const updateOne = async function updateOne({ id, collection: collectionSlug, dat
|
|
86
86
|
db,
|
87
87
|
fields: collection.fields,
|
88
88
|
operation: 'update',
|
89
|
-
tableName: (0, _tosnakecase.default)(collectionSlug)
|
89
|
+
tableName: (0, _tosnakecase.default)(collectionSlug),
|
90
|
+
req
|
90
91
|
});
|
91
92
|
return result;
|
92
93
|
};
|
93
94
|
|
94
|
-
//# sourceMappingURL=data:application/json;base64,
|
95
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy91cGRhdGUudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBVcGRhdGVPbmUgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuXG5pbXBvcnQgdG9TbmFrZUNhc2UgZnJvbSAndG8tc25ha2UtY2FzZSdcblxuaW1wb3J0IHR5cGUgeyBDaGFpbmVkTWV0aG9kcyB9IGZyb20gJy4vZmluZC9jaGFpbk1ldGhvZHMnXG5pbXBvcnQgeyBjaGFpbk1ldGhvZHMgfSBmcm9tICcuL2ZpbmQvY2hhaW5NZXRob2RzJ1xuaW1wb3J0IHR5cGUgeyBQb3N0Z3Jlc0FkYXB0ZXIgfSBmcm9tICcuL3R5cGVzJ1xuaW1wb3J0IGJ1aWxkUXVlcnkgZnJvbSAnLi9xdWVyaWVzL2J1aWxkUXVlcnknXG5pbXBvcnQgeyB1cHNlcnRSb3cgfSBmcm9tICcuL3Vwc2VydFJvdydcblxuZXhwb3J0IGNvbnN0IHVwZGF0ZU9uZTogVXBkYXRlT25lID0gYXN5bmMgZnVuY3Rpb24gdXBkYXRlT25lKFxuICB0aGlzOiBQb3N0Z3Jlc0FkYXB0ZXIsXG4gIHsgaWQsIGNvbGxlY3Rpb246IGNvbGxlY3Rpb25TbHVnLCBkYXRhLCBkcmFmdCwgbG9jYWxlLCByZXEsIHdoZXJlOiB3aGVyZUFyZyB9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7UUFDdkJJO0lBQ0Y7SUFFQSxPQUFPd0M7QUFDVCJ9
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"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,GAA0B,EAAE,IAAI,EAAE,EAAE,gBAAgB,GAC3D,OAAO,CAAC,CAAC,CAAC,
|
1
|
+
{"version":3,"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,GAA0B,EAAE,IAAI,EAAE,EAAE,gBAAgB,GAC3D,OAAO,CAAC,CAAC,CAAC,CAkBZ"}
|
package/dist/updateGlobal.js
CHANGED
@@ -31,9 +31,10 @@ async function updateGlobal({ data, req = {}, slug }) {
|
|
31
31
|
data,
|
32
32
|
db,
|
33
33
|
fields: globalConfig.fields,
|
34
|
-
tableName
|
34
|
+
tableName,
|
35
|
+
req
|
35
36
|
});
|
36
37
|
return result;
|
37
38
|
}
|
38
39
|
|
39
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy91cGRhdGVH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UFDYnJCO1FBQ0FHO1FBQ0FtQixRQUFRZixhQUFhZSxNQUFNO1FBQzNCVjtRQUNBWDtJQUNGO0lBRUEsT0FBT2dCO0FBQ1QifQ==
|
@@ -1,5 +1,4 @@
|
|
1
|
-
import type { TypeWithVersion } from 'payload/database';
|
2
|
-
import type { UpdateGlobalVersionArgs } from 'payload/database';
|
1
|
+
import type { TypeWithVersion, UpdateGlobalVersionArgs } from 'payload/database';
|
3
2
|
import type { TypeWithID } from 'payload/types';
|
4
3
|
import type { PostgresAdapter } from './types';
|
5
4
|
export declare function updateGlobalVersion<T extends TypeWithID>(this: PostgresAdapter, { id, global, locale, req, versionData, where: whereArg, }: UpdateGlobalVersionArgs<T>): Promise<TypeWithVersion<T>>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"updateGlobalVersion.d.ts","sourceRoot":"","sources":["../src/updateGlobalVersion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,
|
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,+BA+B9B"}
|
@@ -42,9 +42,10 @@ async function updateGlobalVersion({ id, global, locale, req = {}, versionData,
|
|
42
42
|
fields,
|
43
43
|
operation: 'update',
|
44
44
|
tableName,
|
45
|
-
where
|
45
|
+
where,
|
46
|
+
req
|
46
47
|
});
|
47
48
|
return result;
|
48
49
|
}
|
49
50
|
|
50
|
-
//# sourceMappingURL=data:application/json;base64,
|
51
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy91cGRhdGVHbG9iYWxWZXJzaW9uLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgVHlwZVdpdGhWZXJzaW9uLCBVcGRhdGVHbG9iYWxWZXJzaW9uQXJncyB9IGZyb20gJ3BheWxvYWQvZGF0YWJhc2UnXG5pbXBvcnQgdHlwZSB7IFBheWxvYWRSZXF1ZXN0LCBTYW5pdGl6ZWRHbG9iYWxDb25maWcsIFR5cGVXaXRoSUQgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgeyBidWlsZFZlcnNpb25HbG9iYWxGaWVsZHMgfSBmcm9tICdwYXlsb2FkL3ZlcnNpb25zJ1xuaW1wb3J0IHRvU25ha2VDYXNlIGZyb20gJ3RvLXNuYWtlLWNhc2UnXG5cbmltcG9ydCB0eXBlIHsgUG9zdGdyZXNBZGFwdGVyIH0gZnJvbSAnLi90eXBlcydcblxuaW1wb3J0IGJ1aWxkUXVlcnkgZnJvbSAnLi9xdWVyaWVzL2J1aWxkUXVlcnknXG5pbXBvcnQgeyB1cHNlcnRSb3cgfSBmcm9tICcuL3Vwc2VydFJvdydcblxuZXhwb3J0IGFzeW5jIGZ1bmN0aW9uIHVwZGF0ZUdsb2JhbFZlcnNpb248VCBleHRlbmRzIFR5cGVXaXRoSUQ+KFxuICB0aGlzOiBQb3N0Z3Jlc0FkYXB0ZXIsXG4gIHtcbiAgICBpZCxcbiAgICBnbG9iYWwsXG4gICAgbG9jYWxlLFxuICAgIHJlcSA9IHt9IGFzIFBheWxvYWRSZXF1ZXN0LFxuICAgIHZlcnNpb25EYXRhLFxuICAgIHdoZXJlOiB3aGVyZUFyZyxcbiAgfTogVXBkYXRlR2xv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FBQUEsa0NBQXdCLEVBQUNYO0lBRXhDLE1BQU0sRUFBRU4sS0FBSyxFQUFFLEdBQUcsTUFBTWtCLElBQUFBLG1CQUFVLEVBQUM7UUFDakNDLFNBQVMsSUFBSTtRQUNiSDtRQUNBbkI7UUFDQWlCO1FBQ0FkLE9BQU9ZO0lBQ1Q7SUFFQSxNQUFNUSxTQUFTLE1BQU1DLElBQUFBLG9CQUFTLEVBQXFCO1FBQ2pEMUI7UUFDQXdCLFNBQVMsSUFBSTtRQUNiRyxNQUFNdkI7UUFDTkc7UUFDQWM7UUFDQU8sV0FBVztRQUNYVDtRQUNBZDtRQUNBRjtJQUNGO0lBRUEsT0FBT3NCO0FBQ1QifQ==
|
@@ -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;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,+
|
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,+BA6BxB"}
|
package/dist/updateVersion.js
CHANGED
@@ -42,9 +42,10 @@ async function updateVersion({ id, collection, locale, req = {}, versionData, wh
|
|
42
42
|
fields,
|
43
43
|
operation: 'update',
|
44
44
|
tableName,
|
45
|
-
where
|
45
|
+
where,
|
46
|
+
req
|
46
47
|
});
|
47
48
|
return result;
|
48
49
|
}
|
49
50
|
|
50
|
-
//# sourceMappingURL=data:application/json;base64,
|
51
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy91cGRhdGVWZXJzaW9uLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgVHlwZVdpdGhWZXJzaW9uLCBVcGRhdGVWZXJzaW9uQXJncyB9IGZyb20gJ3BheWxvYWQvZGF0YWJhc2UnXG5pbXBvcnQgdHlwZSB7IFBheWxvYWRSZXF1ZXN0LCBTYW5pdGl6ZWRDb2xsZWN0aW9uQ29uZmlnLCBUeXBlV2l0aElEIH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxuaW1wb3J0IHsgYnVpbGRWZXJzaW9uQ29sbGVjdGlvbkZpZWxkcyB9IGZyb20gJ3BheWxvYWQvdmVyc2lvbnMnXG5pbXBvcnQgdG9TbmFrZUNhc2UgZnJvbSAndG8tc25ha2UtY2FzZSdcblxuaW1wb3J0IHR5cGUgeyBQb3N0Z3Jlc0FkYXB0ZXIgfSBmcm9tICcuL3R5cGVzJ1xuXG5pbXBvcnQgYnVpbGRRdWVyeSBmcm9tICcuL3F1ZXJpZXMvYnVpbGRRdWVyeSdcbmltcG9ydCB7IHVwc2VydFJvdyB9IGZyb20gJy4vdXBzZXJ0Um93J1xuXG5leHBvcnQgYXN5bmMgZnVuY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BQWFULFlBQVk7UUFBRU4sSUFBSTtZQUFFZ0IsUUFBUWhCO1FBQUc7SUFBRTtJQUNwRCxNQUFNaUIsWUFBWSxDQUFDLENBQUMsRUFBRUMsSUFBQUEsb0JBQVcsRUFBQ2pCLFlBQVksRUFBRSxDQUFDO0lBQ2pELE1BQU1rQixTQUFTQyxJQUFBQSxzQ0FBNEIsRUFBQ1Q7SUFFNUMsTUFBTSxFQUFFTixLQUFLLEVBQUUsR0FBRyxNQUFNZ0IsSUFBQUEsbUJBQVUsRUFBQztRQUNqQ0MsU0FBUyxJQUFJO1FBQ2JIO1FBQ0FqQjtRQUNBZTtRQUNBWixPQUFPVTtJQUNUO0lBRUEsTUFBTVEsU0FBUyxNQUFNQyxJQUFBQSxvQkFBUyxFQUFxQjtRQUNqRHhCO1FBQ0FzQixTQUFTLElBQUk7UUFDYkcsTUFBTXJCO1FBQ05HO1FBQ0FZO1FBQ0FPLFdBQVc7UUFDWFQ7UUFDQVo7UUFDQUY7SUFDRjtJQUVBLE9BQU9vQjtBQUNUIn0=
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import type { TypeWithID } from 'payload/types';
|
2
2
|
import type { Args } from './types';
|
3
|
-
export declare const upsertRow: <T extends TypeWithID>({ id, adapter, data, db, fields, operation, path, tableName, upsertTarget, where, }: Args) => Promise<T>;
|
3
|
+
export declare const upsertRow: <T extends TypeWithID>({ id, adapter, data, db, fields, operation, path, req, tableName, upsertTarget, where, }: Args) => Promise<T>;
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/upsertRow/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/upsertRow/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAO/C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AASnC,eAAO,MAAM,SAAS,mHAYnB,IAAI,eAgSN,CAAA"}
|