123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306 |
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = exports.GraphQLConfigKey = exports.GraphQLConfigId = exports.GraphQLConfigClassName = void 0;
- var _requiredParameter = _interopRequireDefault(require("../../lib/requiredParameter"));
- var _DatabaseController = _interopRequireDefault(require("./DatabaseController"));
- var _CacheController = _interopRequireDefault(require("./CacheController"));
- const _excluded = ["enabledForClasses", "disabledForClasses", "classConfigs"],
- _excluded2 = ["className", "type", "query", "mutation"],
- _excluded3 = ["inputFields", "outputFields", "constraintFields", "sortFields"],
- _excluded4 = ["field", "asc", "desc"],
- _excluded5 = ["create", "update"],
- _excluded6 = ["find", "get", "findAlias", "getAlias"],
- _excluded7 = ["create", "update", "destroy", "createAlias", "updateAlias", "destroyAlias"];
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
- const GraphQLConfigClassName = exports.GraphQLConfigClassName = '_GraphQLConfig';
- const GraphQLConfigId = exports.GraphQLConfigId = '1';
- const GraphQLConfigKey = exports.GraphQLConfigKey = 'config';
- class ParseGraphQLController {
- constructor(params = {}) {
- this.databaseController = params.databaseController || (0, _requiredParameter.default)(`ParseGraphQLController requires a "databaseController" to be instantiated.`);
- this.cacheController = params.cacheController;
- this.isMounted = !!params.mountGraphQL;
- this.configCacheKey = GraphQLConfigKey;
- }
- async getGraphQLConfig() {
- if (this.isMounted) {
- const _cachedConfig = await this._getCachedGraphQLConfig();
- if (_cachedConfig) {
- return _cachedConfig;
- }
- }
- const results = await this.databaseController.find(GraphQLConfigClassName, {
- objectId: GraphQLConfigId
- }, {
- limit: 1
- });
- let graphQLConfig;
- if (results.length != 1) {
- // If there is no config in the database - return empty config.
- return {};
- } else {
- graphQLConfig = results[0][GraphQLConfigKey];
- }
- if (this.isMounted) {
- this._putCachedGraphQLConfig(graphQLConfig);
- }
- return graphQLConfig;
- }
- async updateGraphQLConfig(graphQLConfig) {
- // throws if invalid
- this._validateGraphQLConfig(graphQLConfig || (0, _requiredParameter.default)('You must provide a graphQLConfig!'));
- // Transform in dot notation to make sure it works
- const update = Object.keys(graphQLConfig).reduce((acc, key) => {
- return {
- [GraphQLConfigKey]: _objectSpread(_objectSpread({}, acc[GraphQLConfigKey]), {}, {
- [key]: graphQLConfig[key]
- })
- };
- }, {
- [GraphQLConfigKey]: {}
- });
- await this.databaseController.update(GraphQLConfigClassName, {
- objectId: GraphQLConfigId
- }, update, {
- upsert: true
- });
- if (this.isMounted) {
- this._putCachedGraphQLConfig(graphQLConfig);
- }
- return {
- response: {
- result: true
- }
- };
- }
- _getCachedGraphQLConfig() {
- return this.cacheController.graphQL.get(this.configCacheKey);
- }
- _putCachedGraphQLConfig(graphQLConfig) {
- return this.cacheController.graphQL.put(this.configCacheKey, graphQLConfig, 60000);
- }
- _validateGraphQLConfig(graphQLConfig) {
- const errorMessages = [];
- if (!graphQLConfig) {
- errorMessages.push('cannot be undefined, null or empty');
- } else if (!isValidSimpleObject(graphQLConfig)) {
- errorMessages.push('must be a valid object');
- } else {
- const {
- enabledForClasses = null,
- disabledForClasses = null,
- classConfigs = null
- } = graphQLConfig,
- invalidKeys = _objectWithoutProperties(graphQLConfig, _excluded);
- if (Object.keys(invalidKeys).length) {
- errorMessages.push(`encountered invalid keys: [${Object.keys(invalidKeys)}]`);
- }
- if (enabledForClasses !== null && !isValidStringArray(enabledForClasses)) {
- errorMessages.push(`"enabledForClasses" is not a valid array`);
- }
- if (disabledForClasses !== null && !isValidStringArray(disabledForClasses)) {
- errorMessages.push(`"disabledForClasses" is not a valid array`);
- }
- if (classConfigs !== null) {
- if (Array.isArray(classConfigs)) {
- classConfigs.forEach(classConfig => {
- const errorMessage = this._validateClassConfig(classConfig);
- if (errorMessage) {
- errorMessages.push(`classConfig:${classConfig.className} is invalid because ${errorMessage}`);
- }
- });
- } else {
- errorMessages.push(`"classConfigs" is not a valid array`);
- }
- }
- }
- if (errorMessages.length) {
- throw new Error(`Invalid graphQLConfig: ${errorMessages.join('; ')}`);
- }
- }
- _validateClassConfig(classConfig) {
- if (!isValidSimpleObject(classConfig)) {
- return 'it must be a valid object';
- } else {
- const {
- className,
- type = null,
- query = null,
- mutation = null
- } = classConfig,
- invalidKeys = _objectWithoutProperties(classConfig, _excluded2);
- if (Object.keys(invalidKeys).length) {
- return `"invalidKeys" [${Object.keys(invalidKeys)}] should not be present`;
- }
- if (typeof className !== 'string' || !className.trim().length) {
- // TODO consider checking class exists in schema?
- return `"className" must be a valid string`;
- }
- if (type !== null) {
- if (!isValidSimpleObject(type)) {
- return `"type" must be a valid object`;
- }
- const {
- inputFields = null,
- outputFields = null,
- constraintFields = null,
- sortFields = null
- } = type,
- invalidKeys = _objectWithoutProperties(type, _excluded3);
- if (Object.keys(invalidKeys).length) {
- return `"type" contains invalid keys, [${Object.keys(invalidKeys)}]`;
- } else if (outputFields !== null && !isValidStringArray(outputFields)) {
- return `"outputFields" must be a valid string array`;
- } else if (constraintFields !== null && !isValidStringArray(constraintFields)) {
- return `"constraintFields" must be a valid string array`;
- }
- if (sortFields !== null) {
- if (Array.isArray(sortFields)) {
- let errorMessage;
- sortFields.every((sortField, index) => {
- if (!isValidSimpleObject(sortField)) {
- errorMessage = `"sortField" at index ${index} is not a valid object`;
- return false;
- } else {
- const {
- field,
- asc,
- desc
- } = sortField,
- invalidKeys = _objectWithoutProperties(sortField, _excluded4);
- if (Object.keys(invalidKeys).length) {
- errorMessage = `"sortField" at index ${index} contains invalid keys, [${Object.keys(invalidKeys)}]`;
- return false;
- } else {
- if (typeof field !== 'string' || field.trim().length === 0) {
- errorMessage = `"sortField" at index ${index} did not provide the "field" as a string`;
- return false;
- } else if (typeof asc !== 'boolean' || typeof desc !== 'boolean') {
- errorMessage = `"sortField" at index ${index} did not provide "asc" or "desc" as booleans`;
- return false;
- }
- }
- }
- return true;
- });
- if (errorMessage) {
- return errorMessage;
- }
- } else {
- return `"sortFields" must be a valid array.`;
- }
- }
- if (inputFields !== null) {
- if (isValidSimpleObject(inputFields)) {
- const {
- create = null,
- update = null
- } = inputFields,
- invalidKeys = _objectWithoutProperties(inputFields, _excluded5);
- if (Object.keys(invalidKeys).length) {
- return `"inputFields" contains invalid keys: [${Object.keys(invalidKeys)}]`;
- } else {
- if (update !== null && !isValidStringArray(update)) {
- return `"inputFields.update" must be a valid string array`;
- } else if (create !== null) {
- if (!isValidStringArray(create)) {
- return `"inputFields.create" must be a valid string array`;
- } else if (className === '_User') {
- if (!create.includes('username') || !create.includes('password')) {
- return `"inputFields.create" must include required fields, username and password`;
- }
- }
- }
- }
- } else {
- return `"inputFields" must be a valid object`;
- }
- }
- }
- if (query !== null) {
- if (isValidSimpleObject(query)) {
- const {
- find = null,
- get = null,
- findAlias = null,
- getAlias = null
- } = query,
- invalidKeys = _objectWithoutProperties(query, _excluded6);
- if (Object.keys(invalidKeys).length) {
- return `"query" contains invalid keys, [${Object.keys(invalidKeys)}]`;
- } else if (find !== null && typeof find !== 'boolean') {
- return `"query.find" must be a boolean`;
- } else if (get !== null && typeof get !== 'boolean') {
- return `"query.get" must be a boolean`;
- } else if (findAlias !== null && typeof findAlias !== 'string') {
- return `"query.findAlias" must be a string`;
- } else if (getAlias !== null && typeof getAlias !== 'string') {
- return `"query.getAlias" must be a string`;
- }
- } else {
- return `"query" must be a valid object`;
- }
- }
- if (mutation !== null) {
- if (isValidSimpleObject(mutation)) {
- const {
- create = null,
- update = null,
- destroy = null,
- createAlias = null,
- updateAlias = null,
- destroyAlias = null
- } = mutation,
- invalidKeys = _objectWithoutProperties(mutation, _excluded7);
- if (Object.keys(invalidKeys).length) {
- return `"mutation" contains invalid keys, [${Object.keys(invalidKeys)}]`;
- }
- if (create !== null && typeof create !== 'boolean') {
- return `"mutation.create" must be a boolean`;
- }
- if (update !== null && typeof update !== 'boolean') {
- return `"mutation.update" must be a boolean`;
- }
- if (destroy !== null && typeof destroy !== 'boolean') {
- return `"mutation.destroy" must be a boolean`;
- }
- if (createAlias !== null && typeof createAlias !== 'string') {
- return `"mutation.createAlias" must be a string`;
- }
- if (updateAlias !== null && typeof updateAlias !== 'string') {
- return `"mutation.updateAlias" must be a string`;
- }
- if (destroyAlias !== null && typeof destroyAlias !== 'string') {
- return `"mutation.destroyAlias" must be a string`;
- }
- } else {
- return `"mutation" must be a valid object`;
- }
- }
- }
- }
- }
- const isValidStringArray = function (array) {
- return Array.isArray(array) ? !array.some(s => typeof s !== 'string' || s.trim().length < 1) : false;
- };
- /**
- * Ensures the obj is a simple JSON/{}
- * object, i.e. not an array, null, date
- * etc.
- */
- const isValidSimpleObject = function (obj) {
- return typeof obj === 'object' && !Array.isArray(obj) && obj !== null && obj instanceof Date !== true && obj instanceof Promise !== true;
- };
- var _default = exports.default = ParseGraphQLController;
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfcmVxdWlyZWRQYXJhbWV0ZXIiLCJfaW50ZXJvcFJlcXVpcmVEZWZhdWx0IiwicmVxdWlyZSIsIl9EYXRhYmFzZUNvbnRyb2xsZXIiLCJfQ2FjaGVDb250cm9sbGVyIiwiX2V4Y2x1ZGVkIiwiX2V4Y2x1ZGVkMiIsIl9leGNsdWRlZDMiLCJfZXhjbHVkZWQ0IiwiX2V4Y2x1ZGVkNSIsIl9leGNsdWRlZDYiLCJfZXhjbHVkZWQ3IiwiZSIsIl9fZXNNb2R1bGUiLCJkZWZhdWx0IiwiX29iamVjdFdpdGhvdXRQcm9wZXJ0aWVzIiwidCIsIm8iLCJyIiwiaSIsIl9vYmplY3RXaXRob3V0UHJvcGVydGllc0xvb3NlIiwiT2JqZWN0IiwiZ2V0T3duUHJvcGVydHlTeW1ib2xzIiwibiIsImxlbmd0aCIsImluZGV4T2YiLCJwcm9wZXJ0eUlzRW51bWVyYWJsZSIs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dXJuIGBcInR5cGVcIiBtdXN0IGJlIGEgdmFsaWQgb2JqZWN0YDtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCB7XG4gICAgICAgICAgaW5wdXRGaWVsZHMgPSBudWxsLFxuICAgICAgICAgIG91dHB1dEZpZWxkcyA9IG51bGwsXG4gICAgICAgICAgY29uc3RyYWludEZpZWxkcyA9IG51bGwsXG4gICAgICAgICAgc29ydEZpZWxkcyA9IG51bGwsXG4gICAgICAgICAgLi4uaW52YWxpZEtleXNcbiAgICAgICAgfSA9IHR5cGU7XG4gICAgICAgIGlmIChPYmplY3Qua2V5cyhpbnZhbGlkS2V5cykubGVuZ3RoKSB7XG4gICAgICAgICAgcmV0dXJuIGBcInR5cGVcIiBjb250YWlucyBpbnZhbGlkIGtleXMsIFske09iamVjdC5rZXlzKGludmFsaWRLZXlzKX1dYDtcbiAgICAgICAgfSBlbHNlIGlmIChvdXRwdXRGaWVsZHMgIT09IG51bGwgJiYgIWlzVmFsaWRTdHJpbmdBcnJheShvdXRwdXRGaWVsZHMpKSB7XG4gICAgICAgICAgcmV0dXJuIGBcIm91dHB1dEZpZWxkc1wiIG11c3QgYmUgYSB2YWxpZCBzdHJpbmcgYXJyYXlgO1xuICAgICAgICB9IGVsc2UgaWYgKGNvbnN0cmFpbnRGaWVsZHMgIT09IG51bGwgJiYgIWlzVmFsaWRTdHJpbmdBcnJheShjb25zdHJhaW50RmllbGRzKSkge1xuICAgICAgICAgIHJldHVybiBgXCJjb25zdHJhaW50RmllbGRzXCIgbXVzdCBiZSBhIHZhbGlkIHN0cmluZyBhcnJheWA7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHNvcnRGaWVsZHMgIT09IG51bGwpIHtcbiAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShzb3J0RmllbGRzKSkge1xuICAgICAgICAgICAgbGV0IGVycm9yTWVzc2FnZTtcbiAgICAgICAgICAgIHNvcnRGaWVsZHMuZXZlcnkoKHNvcnRGaWVsZCwgaW5kZXgpID0+IHtcbiAgICAgICAgICAgICAgaWYgKCFpc1ZhbGlkU2ltcGxlT2JqZWN0KHNvcnRGaWVsZCkpIHtcbiAgICAgICAgICAgICAgICBlcnJvck1lc3NhZ2UgPSBgXCJzb3J0RmllbGRcIiBhdCBpbmRleCAke2luZGV4fSBpcyBub3QgYSB2YWxpZCBvYmplY3RgO1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBjb25zdCB7IGZpZWxkLCBhc2MsIGRlc2MsIC4uLmludmFsaWRLZXlzIH0gPSBzb3J0RmllbGQ7XG4gICAgICAgICAgICAgICAgaWYgKE9iamVjdC5rZXlzKGludmFsaWRLZXlzKS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgIGVycm9yTWVzc2FnZSA9IGBcInNvcnRGaWVsZFwiIGF0IGluZGV4ICR7aW5kZXh9IGNvbnRhaW5zIGludmFsaWQga2V5cywgWyR7T2JqZWN0LmtleXMoXG4gICAgICAgICAgICAgICAgICAgIGludmFsaWRLZXlzXG4gICAgICAgICAgICAgICAgICApfV1gO1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGZpZWxkICE9PSAnc3RyaW5nJyB8fCBmaWVsZC50cmltKCkubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGVycm9yTWVzc2FnZSA9IGBcInNvcnRGaWVsZFwiIGF0IGluZGV4ICR7aW5kZXh9IGRpZCBub3QgcHJvdmlkZSB0aGUgXCJmaWVsZFwiIGFzIGEgc3RyaW5nYDtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgYXNjICE9PSAnYm9vbGVhbicgfHwgdHlwZW9mIGRlc2MgIT09ICdib29sZWFuJykge1xuICAgICAgICAgICAgICAgICAgICBlcnJvck1lc3NhZ2UgPSBgXCJzb3J0RmllbGRcIiBhdCBpbmRleCAke2luZGV4fSBkaWQgbm90IHByb3ZpZGUgXCJhc2NcIiBvciBcImRlc2NcIiBhcyBib29sZWFuc2A7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGlmIChlcnJvck1lc3NhZ2UpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGVycm9yTWVzc2FnZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIGBcInNvcnRGaWVsZHNcIiBtdXN0IGJlIGEgdmFsaWQgYXJyYXkuYDtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGlucHV0RmllbGRzICE9PSBudWxsKSB7XG4gICAgICAgICAgaWYgKGlzVmFsaWRTaW1wbGVPYmplY3QoaW5wdXRGaWVsZHMpKSB7XG4gICAgICAgICAgICBjb25zdCB7IGNyZWF0ZSA9IG51bGwsIHVwZGF0ZSA9IG51bGwsIC4uLmludmFsaWRLZXlzIH0gPSBpbnB1dEZpZWxkcztcbiAgICAgICAgICAgIGlmIChPYmplY3Qua2V5cyhpbnZhbGlkS2V5cykubGVuZ3RoKSB7XG4gICAgICAgICAgICAgIHJldHVybiBgXCJpbnB1dEZpZWxkc1wiIGNvbnRhaW5zIGludmFsaWQga2V5czogWyR7T2JqZWN0LmtleXMoaW52YWxpZEtleXMpfV1gO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgaWYgKHVwZGF0ZSAhPT0gbnVsbCAmJiAhaXNWYWxpZFN0cmluZ0FycmF5KHVwZGF0ZSkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gYFwiaW5wdXRGaWVsZHMudXBkYXRlXCIgbXVzdCBiZSBhIHZhbGlkIHN0cmluZyBhcnJheWA7XG4gICAgICAgICAgICAgIH0gZWxzZSBpZiAoY3JlYXRlICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFpc1ZhbGlkU3RyaW5nQXJyYXkoY3JlYXRlKSkge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIGBcImlucHV0RmllbGRzLmNyZWF0ZVwiIG11c3QgYmUgYSB2YWxpZCBzdHJpbmcgYXJyYXlgO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2xhc3NOYW1lID09PSAnX1VzZXInKSB7XG4gICAgICAgICAgICAgICAgICBpZiAoIWNyZWF0ZS5pbmNsdWRlcygndXNlcm5hbWUnKSB8fCAhY3JlYXRlLmluY2x1ZGVzKCdwYXNzd29yZCcpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBgXCJpbnB1dEZpZWxkcy5jcmVhdGVcIiBtdXN0IGluY2x1ZGUgcmVxdWlyZWQgZmllbGRzLCB1c2VybmFtZSBhbmQgcGFzc3dvcmRgO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gYFwiaW5wdXRGaWVsZHNcIiBtdXN0IGJlIGEgdmFsaWQgb2JqZWN0YDtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGlmIChxdWVyeSAhPT0gbnVsbCkge1xuICAgICAgICBpZiAoaXNWYWxpZFNpbXBsZU9iamVjdChxdWVyeSkpIHtcbiAgICAgICAgICBjb25zdCB7XG4gICAgICAgICAgICBmaW5kID0gbnVsbCxcbiAgICAgICAgICAgIGdldCA9IG51bGwsXG4gICAgICAg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DtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgaWYgKG11dGF0aW9uICE9PSBudWxsKSB7XG4gICAgICAgIGlmIChpc1ZhbGlkU2ltcGxlT2JqZWN0KG11dGF0aW9uKSkge1xuICAgICAgICAgIGNvbnN0IHtcbiAgICAgICAgICAgIGNyZWF0ZSA9IG51bGwsXG4gICAgICAgICAgICB1cGRhdGUgPSBudWxsLFxuICAgICAgICAgICAgZGVzdHJveSA9IG51bGwsXG4gICAgICAgICAgICBjcmVhdGVBbGlhcyA9IG51bGwsXG4gICAgICAgICAgICB1cGRhdGVBbGlhcyA9IG51bGwsXG4gICAgICAgICAgICBkZXN0cm95QWxpYXMgPSBudWxsLFxuICAgICAgICAgICAgLi4uaW52YWxpZEtleXNcbiAgICAgICAgICB9ID0gbXV0YXRpb247XG4gICAgICAgICAgaWYgKE9iamVjdC5rZXlzKGludmFsaWRLZXlzKS5sZW5ndGgpIHtcbiAgICAgICAgICAgIHJldHVybiBgXCJtdXRhdGlvblwiIGNvbnRhaW5zIGludmFsaWQga2V5cywgWyR7T2JqZWN0LmtleXMoaW52YWxpZEtleXMpfV1gO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoY3JlYXRlICE9PSBudWxsICYmIHR5cGVvZiBjcmVhdGUgIT09ICdib29sZWFuJykge1xuICAgICAgICAgICAgcmV0dXJuIGBcIm11dGF0aW9uLmNyZWF0ZVwiIG11c3QgYmUgYSBib29sZWFuYDtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKHVwZGF0ZSAhPT0gbnVsbCAmJiB0eXBlb2YgdXBkYXRlICE9PSAnYm9vbGVhbicpIHtcbiAgICAgICAgICAgIHJldHVybiBgXCJtdXRhdGlvbi51cGRhdGVcIiBtdXN0IGJlIGEgYm9vbGVhbmA7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChkZXN0cm95ICE9PSBudWxsICYmIHR5cGVvZiBkZXN0cm95ICE9PSAnYm9vbGVhbicpIHtcbiAgICAg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