SchemaController.js 186 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.VolatileClassesSchemas = exports.SchemaController = void 0;
  6. exports.buildMergedSchemaObject = buildMergedSchemaObject;
  7. exports.classNameIsValid = classNameIsValid;
  8. exports.defaultColumns = exports.default = exports.convertSchemaToAdapterSchema = void 0;
  9. exports.fieldNameIsValid = fieldNameIsValid;
  10. exports.invalidClassNameMessage = invalidClassNameMessage;
  11. exports.systemClasses = exports.requiredColumns = exports.load = void 0;
  12. var _StorageAdapter = require("../Adapters/Storage/StorageAdapter");
  13. var _SchemaCache = _interopRequireDefault(require("../Adapters/Cache/SchemaCache"));
  14. var _DatabaseController = _interopRequireDefault(require("./DatabaseController"));
  15. var _Config = _interopRequireDefault(require("../Config"));
  16. var _deepcopy = _interopRequireDefault(require("deepcopy"));
  17. function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
  18. 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; }
  19. 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; }
  20. 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; }
  21. function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
  22. 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); }
  23. function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }
  24. function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
  25. // This class handles schema validation, persistence, and modification.
  26. //
  27. // Each individual Schema object should be immutable. The helpers to
  28. // do things with the Schema just return a new schema when the schema
  29. // is changed.
  30. //
  31. // The canonical place to store this Schema is in the database itself,
  32. // in a _SCHEMA collection. This is not the right way to do it for an
  33. // open source framework, but it's backward compatible, so we're
  34. // keeping it this way for now.
  35. //
  36. // In API-handling code, you should only use the Schema class via the
  37. // DatabaseController. This will let us replace the schema logic for
  38. // different databases.
  39. // TODO: hide all schema logic inside the database adapter.
  40. // -disable-next
  41. const Parse = require('parse/node').Parse;
  42. // -disable-next
  43. const defaultColumns = exports.defaultColumns = Object.freeze({
  44. // Contain the default columns for every parse object type (except _Join collection)
  45. _Default: {
  46. objectId: {
  47. type: 'String'
  48. },
  49. createdAt: {
  50. type: 'Date'
  51. },
  52. updatedAt: {
  53. type: 'Date'
  54. },
  55. ACL: {
  56. type: 'ACL'
  57. }
  58. },
  59. // The additional default columns for the _User collection (in addition to DefaultCols)
  60. _User: {
  61. username: {
  62. type: 'String'
  63. },
  64. password: {
  65. type: 'String'
  66. },
  67. email: {
  68. type: 'String'
  69. },
  70. emailVerified: {
  71. type: 'Boolean'
  72. },
  73. authData: {
  74. type: 'Object'
  75. }
  76. },
  77. // The additional default columns for the _Installation collection (in addition to DefaultCols)
  78. _Installation: {
  79. installationId: {
  80. type: 'String'
  81. },
  82. deviceToken: {
  83. type: 'String'
  84. },
  85. channels: {
  86. type: 'Array'
  87. },
  88. deviceType: {
  89. type: 'String'
  90. },
  91. pushType: {
  92. type: 'String'
  93. },
  94. GCMSenderId: {
  95. type: 'String'
  96. },
  97. timeZone: {
  98. type: 'String'
  99. },
  100. localeIdentifier: {
  101. type: 'String'
  102. },
  103. badge: {
  104. type: 'Number'
  105. },
  106. appVersion: {
  107. type: 'String'
  108. },
  109. appName: {
  110. type: 'String'
  111. },
  112. appIdentifier: {
  113. type: 'String'
  114. },
  115. parseVersion: {
  116. type: 'String'
  117. }
  118. },
  119. // The additional default columns for the _Role collection (in addition to DefaultCols)
  120. _Role: {
  121. name: {
  122. type: 'String'
  123. },
  124. users: {
  125. type: 'Relation',
  126. targetClass: '_User'
  127. },
  128. roles: {
  129. type: 'Relation',
  130. targetClass: '_Role'
  131. }
  132. },
  133. // The additional default columns for the _Session collection (in addition to DefaultCols)
  134. _Session: {
  135. user: {
  136. type: 'Pointer',
  137. targetClass: '_User'
  138. },
  139. installationId: {
  140. type: 'String'
  141. },
  142. sessionToken: {
  143. type: 'String'
  144. },
  145. expiresAt: {
  146. type: 'Date'
  147. },
  148. createdWith: {
  149. type: 'Object'
  150. }
  151. },
  152. _Product: {
  153. productIdentifier: {
  154. type: 'String'
  155. },
  156. download: {
  157. type: 'File'
  158. },
  159. downloadName: {
  160. type: 'String'
  161. },
  162. icon: {
  163. type: 'File'
  164. },
  165. order: {
  166. type: 'Number'
  167. },
  168. title: {
  169. type: 'String'
  170. },
  171. subtitle: {
  172. type: 'String'
  173. }
  174. },
  175. _PushStatus: {
  176. pushTime: {
  177. type: 'String'
  178. },
  179. source: {
  180. type: 'String'
  181. },
  182. // rest or webui
  183. query: {
  184. type: 'String'
  185. },
  186. // the stringified JSON query
  187. payload: {
  188. type: 'String'
  189. },
  190. // the stringified JSON payload,
  191. title: {
  192. type: 'String'
  193. },
  194. expiry: {
  195. type: 'Number'
  196. },
  197. expiration_interval: {
  198. type: 'Number'
  199. },
  200. status: {
  201. type: 'String'
  202. },
  203. numSent: {
  204. type: 'Number'
  205. },
  206. numFailed: {
  207. type: 'Number'
  208. },
  209. pushHash: {
  210. type: 'String'
  211. },
  212. errorMessage: {
  213. type: 'Object'
  214. },
  215. sentPerType: {
  216. type: 'Object'
  217. },
  218. failedPerType: {
  219. type: 'Object'
  220. },
  221. sentPerUTCOffset: {
  222. type: 'Object'
  223. },
  224. failedPerUTCOffset: {
  225. type: 'Object'
  226. },
  227. count: {
  228. type: 'Number'
  229. } // tracks # of batches queued and pending
  230. },
  231. _JobStatus: {
  232. jobName: {
  233. type: 'String'
  234. },
  235. source: {
  236. type: 'String'
  237. },
  238. status: {
  239. type: 'String'
  240. },
  241. message: {
  242. type: 'String'
  243. },
  244. params: {
  245. type: 'Object'
  246. },
  247. // params received when calling the job
  248. finishedAt: {
  249. type: 'Date'
  250. }
  251. },
  252. _JobSchedule: {
  253. jobName: {
  254. type: 'String'
  255. },
  256. description: {
  257. type: 'String'
  258. },
  259. params: {
  260. type: 'String'
  261. },
  262. startAfter: {
  263. type: 'String'
  264. },
  265. daysOfWeek: {
  266. type: 'Array'
  267. },
  268. timeOfDay: {
  269. type: 'String'
  270. },
  271. lastRun: {
  272. type: 'Number'
  273. },
  274. repeatMinutes: {
  275. type: 'Number'
  276. }
  277. },
  278. _Hooks: {
  279. functionName: {
  280. type: 'String'
  281. },
  282. className: {
  283. type: 'String'
  284. },
  285. triggerName: {
  286. type: 'String'
  287. },
  288. url: {
  289. type: 'String'
  290. }
  291. },
  292. _GlobalConfig: {
  293. objectId: {
  294. type: 'String'
  295. },
  296. params: {
  297. type: 'Object'
  298. },
  299. masterKeyOnly: {
  300. type: 'Object'
  301. }
  302. },
  303. _GraphQLConfig: {
  304. objectId: {
  305. type: 'String'
  306. },
  307. config: {
  308. type: 'Object'
  309. }
  310. },
  311. _Audience: {
  312. objectId: {
  313. type: 'String'
  314. },
  315. name: {
  316. type: 'String'
  317. },
  318. query: {
  319. type: 'String'
  320. },
  321. //storing query as JSON string to prevent "Nested keys should not contain the '$' or '.' characters" error
  322. lastUsed: {
  323. type: 'Date'
  324. },
  325. timesUsed: {
  326. type: 'Number'
  327. }
  328. },
  329. _Idempotency: {
  330. reqId: {
  331. type: 'String'
  332. },
  333. expire: {
  334. type: 'Date'
  335. }
  336. }
  337. });
  338. // fields required for read or write operations on their respective classes.
  339. const requiredColumns = exports.requiredColumns = Object.freeze({
  340. read: {
  341. _User: ['username']
  342. },
  343. write: {
  344. _Product: ['productIdentifier', 'icon', 'order', 'title', 'subtitle'],
  345. _Role: ['name', 'ACL']
  346. }
  347. });
  348. const invalidColumns = ['length'];
  349. const systemClasses = exports.systemClasses = Object.freeze(['_User', '_Installation', '_Role', '_Session', '_Product', '_PushStatus', '_JobStatus', '_JobSchedule', '_Audience', '_Idempotency']);
  350. const volatileClasses = Object.freeze(['_JobStatus', '_PushStatus', '_Hooks', '_GlobalConfig', '_GraphQLConfig', '_JobSchedule', '_Audience', '_Idempotency']);
  351. // Anything that start with role
  352. const roleRegex = /^role:.*/;
  353. // Anything that starts with userField (allowed for protected fields only)
  354. const protectedFieldsPointerRegex = /^userField:.*/;
  355. // * permission
  356. const publicRegex = /^\*$/;
  357. const authenticatedRegex = /^authenticated$/;
  358. const requiresAuthenticationRegex = /^requiresAuthentication$/;
  359. const clpPointerRegex = /^pointerFields$/;
  360. // regex for validating entities in protectedFields object
  361. const protectedFieldsRegex = Object.freeze([protectedFieldsPointerRegex, publicRegex, authenticatedRegex, roleRegex]);
  362. // clp regex
  363. const clpFieldsRegex = Object.freeze([clpPointerRegex, publicRegex, requiresAuthenticationRegex, roleRegex]);
  364. function validatePermissionKey(key, userIdRegExp) {
  365. let matchesSome = false;
  366. for (const regEx of clpFieldsRegex) {
  367. if (key.match(regEx) !== null) {
  368. matchesSome = true;
  369. break;
  370. }
  371. }
  372. // userId depends on startup options so it's dynamic
  373. const valid = matchesSome || key.match(userIdRegExp) !== null;
  374. if (!valid) {
  375. throw new Parse.Error(Parse.Error.INVALID_JSON, `'${key}' is not a valid key for class level permissions`);
  376. }
  377. }
  378. function validateProtectedFieldsKey(key, userIdRegExp) {
  379. let matchesSome = false;
  380. for (const regEx of protectedFieldsRegex) {
  381. if (key.match(regEx) !== null) {
  382. matchesSome = true;
  383. break;
  384. }
  385. }
  386. // userId regex depends on launch options so it's dynamic
  387. const valid = matchesSome || key.match(userIdRegExp) !== null;
  388. if (!valid) {
  389. throw new Parse.Error(Parse.Error.INVALID_JSON, `'${key}' is not a valid key for class level permissions`);
  390. }
  391. }
  392. const CLPValidKeys = Object.freeze(['find', 'count', 'get', 'create', 'update', 'delete', 'addField', 'readUserFields', 'writeUserFields', 'protectedFields']);
  393. // validation before setting class-level permissions on collection
  394. function validateCLP(perms, fields, userIdRegExp) {
  395. if (!perms) {
  396. return;
  397. }
  398. for (const operationKey in perms) {
  399. if (CLPValidKeys.indexOf(operationKey) == -1) {
  400. throw new Parse.Error(Parse.Error.INVALID_JSON, `${operationKey} is not a valid operation for class level permissions`);
  401. }
  402. const operation = perms[operationKey];
  403. // proceed with next operationKey
  404. // throws when root fields are of wrong type
  405. validateCLPjson(operation, operationKey);
  406. if (operationKey === 'readUserFields' || operationKey === 'writeUserFields') {
  407. // validate grouped pointer permissions
  408. // must be an array with field names
  409. for (const fieldName of operation) {
  410. validatePointerPermission(fieldName, fields, operationKey);
  411. }
  412. // readUserFields and writerUserFields do not have nesdted fields
  413. // proceed with next operationKey
  414. continue;
  415. }
  416. // validate protected fields
  417. if (operationKey === 'protectedFields') {
  418. for (const entity in operation) {
  419. // throws on unexpected key
  420. validateProtectedFieldsKey(entity, userIdRegExp);
  421. const protectedFields = operation[entity];
  422. if (!Array.isArray(protectedFields)) {
  423. throw new Parse.Error(Parse.Error.INVALID_JSON, `'${protectedFields}' is not a valid value for protectedFields[${entity}] - expected an array.`);
  424. }
  425. // if the field is in form of array
  426. for (const field of protectedFields) {
  427. // do not alloow to protect default fields
  428. if (defaultColumns._Default[field]) {
  429. throw new Parse.Error(Parse.Error.INVALID_JSON, `Default field '${field}' can not be protected`);
  430. }
  431. // field should exist on collection
  432. if (!Object.prototype.hasOwnProperty.call(fields, field)) {
  433. throw new Parse.Error(Parse.Error.INVALID_JSON, `Field '${field}' in protectedFields:${entity} does not exist`);
  434. }
  435. }
  436. }
  437. // proceed with next operationKey
  438. continue;
  439. }
  440. // validate other fields
  441. // Entity can be:
  442. // "*" - Public,
  443. // "requiresAuthentication" - authenticated users,
  444. // "objectId" - _User id,
  445. // "role:rolename",
  446. // "pointerFields" - array of field names containing pointers to users
  447. for (const entity in operation) {
  448. // throws on unexpected key
  449. validatePermissionKey(entity, userIdRegExp);
  450. // entity can be either:
  451. // "pointerFields": string[]
  452. if (entity === 'pointerFields') {
  453. const pointerFields = operation[entity];
  454. if (Array.isArray(pointerFields)) {
  455. for (const pointerField of pointerFields) {
  456. validatePointerPermission(pointerField, fields, operation);
  457. }
  458. } else {
  459. throw new Parse.Error(Parse.Error.INVALID_JSON, `'${pointerFields}' is not a valid value for ${operationKey}[${entity}] - expected an array.`);
  460. }
  461. // proceed with next entity key
  462. continue;
  463. }
  464. // or [entity]: boolean
  465. const permit = operation[entity];
  466. if (permit !== true) {
  467. throw new Parse.Error(Parse.Error.INVALID_JSON, `'${permit}' is not a valid value for class level permissions ${operationKey}:${entity}:${permit}`);
  468. }
  469. }
  470. }
  471. }
  472. function validateCLPjson(operation, operationKey) {
  473. if (operationKey === 'readUserFields' || operationKey === 'writeUserFields') {
  474. if (!Array.isArray(operation)) {
  475. throw new Parse.Error(Parse.Error.INVALID_JSON, `'${operation}' is not a valid value for class level permissions ${operationKey} - must be an array`);
  476. }
  477. } else {
  478. if (typeof operation === 'object' && operation !== null) {
  479. // ok to proceed
  480. return;
  481. } else {
  482. throw new Parse.Error(Parse.Error.INVALID_JSON, `'${operation}' is not a valid value for class level permissions ${operationKey} - must be an object`);
  483. }
  484. }
  485. }
  486. function validatePointerPermission(fieldName, fields, operation) {
  487. // Uses collection schema to ensure the field is of type:
  488. // - Pointer<_User> (pointers)
  489. // - Array
  490. //
  491. // It's not possible to enforce type on Array's items in schema
  492. // so we accept any Array field, and later when applying permissions
  493. // only items that are pointers to _User are considered.
  494. if (!(fields[fieldName] && (fields[fieldName].type == 'Pointer' && fields[fieldName].targetClass == '_User' || fields[fieldName].type == 'Array'))) {
  495. throw new Parse.Error(Parse.Error.INVALID_JSON, `'${fieldName}' is not a valid column for class level pointer permissions ${operation}`);
  496. }
  497. }
  498. const joinClassRegex = /^_Join:[A-Za-z0-9_]+:[A-Za-z0-9_]+/;
  499. const classAndFieldRegex = /^[A-Za-z][A-Za-z0-9_]*$/;
  500. function classNameIsValid(className) {
  501. // Valid classes must:
  502. return (
  503. // Be one of _User, _Installation, _Role, _Session OR
  504. systemClasses.indexOf(className) > -1 ||
  505. // Be a join table OR
  506. joinClassRegex.test(className) ||
  507. // Include only alpha-numeric and underscores, and not start with an underscore or number
  508. fieldNameIsValid(className, className)
  509. );
  510. }
  511. // Valid fields must be alpha-numeric, and not start with an underscore or number
  512. // must not be a reserved key
  513. function fieldNameIsValid(fieldName, className) {
  514. if (className && className !== '_Hooks') {
  515. if (fieldName === 'className') {
  516. return false;
  517. }
  518. }
  519. return classAndFieldRegex.test(fieldName) && !invalidColumns.includes(fieldName);
  520. }
  521. // Checks that it's not trying to clobber one of the default fields of the class.
  522. function fieldNameIsValidForClass(fieldName, className) {
  523. if (!fieldNameIsValid(fieldName, className)) {
  524. return false;
  525. }
  526. if (defaultColumns._Default[fieldName]) {
  527. return false;
  528. }
  529. if (defaultColumns[className] && defaultColumns[className][fieldName]) {
  530. return false;
  531. }
  532. return true;
  533. }
  534. function invalidClassNameMessage(className) {
  535. return 'Invalid classname: ' + className + ', classnames can only have alphanumeric characters and _, and must start with an alpha character ';
  536. }
  537. const invalidJsonError = new Parse.Error(Parse.Error.INVALID_JSON, 'invalid JSON');
  538. const validNonRelationOrPointerTypes = ['Number', 'String', 'Boolean', 'Date', 'Object', 'Array', 'GeoPoint', 'File', 'Bytes', 'Polygon'];
  539. // Returns an error suitable for throwing if the type is invalid
  540. const fieldTypeIsInvalid = ({
  541. type,
  542. targetClass
  543. }) => {
  544. if (['Pointer', 'Relation'].indexOf(type) >= 0) {
  545. if (!targetClass) {
  546. return new Parse.Error(135, `type ${type} needs a class name`);
  547. } else if (typeof targetClass !== 'string') {
  548. return invalidJsonError;
  549. } else if (!classNameIsValid(targetClass)) {
  550. return new Parse.Error(Parse.Error.INVALID_CLASS_NAME, invalidClassNameMessage(targetClass));
  551. } else {
  552. return undefined;
  553. }
  554. }
  555. if (typeof type !== 'string') {
  556. return invalidJsonError;
  557. }
  558. if (validNonRelationOrPointerTypes.indexOf(type) < 0) {
  559. return new Parse.Error(Parse.Error.INCORRECT_TYPE, `invalid field type: ${type}`);
  560. }
  561. return undefined;
  562. };
  563. const convertSchemaToAdapterSchema = schema => {
  564. schema = injectDefaultSchema(schema);
  565. delete schema.fields.ACL;
  566. schema.fields._rperm = {
  567. type: 'Array'
  568. };
  569. schema.fields._wperm = {
  570. type: 'Array'
  571. };
  572. if (schema.className === '_User') {
  573. delete schema.fields.password;
  574. schema.fields._hashed_password = {
  575. type: 'String'
  576. };
  577. }
  578. return schema;
  579. };
  580. exports.convertSchemaToAdapterSchema = convertSchemaToAdapterSchema;
  581. const convertAdapterSchemaToParseSchema = _ref => {
  582. let schema = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
  583. delete schema.fields._rperm;
  584. delete schema.fields._wperm;
  585. schema.fields.ACL = {
  586. type: 'ACL'
  587. };
  588. if (schema.className === '_User') {
  589. delete schema.fields.authData; //Auth data is implicit
  590. delete schema.fields._hashed_password;
  591. schema.fields.password = {
  592. type: 'String'
  593. };
  594. }
  595. if (schema.indexes && Object.keys(schema.indexes).length === 0) {
  596. delete schema.indexes;
  597. }
  598. return schema;
  599. };
  600. class SchemaData {
  601. constructor(allSchemas = [], protectedFields = {}) {
  602. this.__data = {};
  603. this.__protectedFields = protectedFields;
  604. allSchemas.forEach(schema => {
  605. if (volatileClasses.includes(schema.className)) {
  606. return;
  607. }
  608. Object.defineProperty(this, schema.className, {
  609. get: () => {
  610. if (!this.__data[schema.className]) {
  611. const data = {};
  612. data.fields = injectDefaultSchema(schema).fields;
  613. data.classLevelPermissions = (0, _deepcopy.default)(schema.classLevelPermissions);
  614. data.indexes = schema.indexes;
  615. const classProtectedFields = this.__protectedFields[schema.className];
  616. if (classProtectedFields) {
  617. for (const key in classProtectedFields) {
  618. const unq = new Set([...(data.classLevelPermissions.protectedFields[key] || []), ...classProtectedFields[key]]);
  619. data.classLevelPermissions.protectedFields[key] = Array.from(unq);
  620. }
  621. }
  622. this.__data[schema.className] = data;
  623. }
  624. return this.__data[schema.className];
  625. }
  626. });
  627. });
  628. // Inject the in-memory classes
  629. volatileClasses.forEach(className => {
  630. Object.defineProperty(this, className, {
  631. get: () => {
  632. if (!this.__data[className]) {
  633. const schema = injectDefaultSchema({
  634. className,
  635. fields: {},
  636. classLevelPermissions: {}
  637. });
  638. const data = {};
  639. data.fields = schema.fields;
  640. data.classLevelPermissions = schema.classLevelPermissions;
  641. data.indexes = schema.indexes;
  642. this.__data[className] = data;
  643. }
  644. return this.__data[className];
  645. }
  646. });
  647. });
  648. }
  649. }
  650. const injectDefaultSchema = ({
  651. className,
  652. fields,
  653. classLevelPermissions,
  654. indexes
  655. }) => {
  656. const defaultSchema = {
  657. className,
  658. fields: _objectSpread(_objectSpread(_objectSpread({}, defaultColumns._Default), defaultColumns[className] || {}), fields),
  659. classLevelPermissions
  660. };
  661. if (indexes && Object.keys(indexes).length !== 0) {
  662. defaultSchema.indexes = indexes;
  663. }
  664. return defaultSchema;
  665. };
  666. const _HooksSchema = {
  667. className: '_Hooks',
  668. fields: defaultColumns._Hooks
  669. };
  670. const _GlobalConfigSchema = {
  671. className: '_GlobalConfig',
  672. fields: defaultColumns._GlobalConfig
  673. };
  674. const _GraphQLConfigSchema = {
  675. className: '_GraphQLConfig',
  676. fields: defaultColumns._GraphQLConfig
  677. };
  678. const _PushStatusSchema = convertSchemaToAdapterSchema(injectDefaultSchema({
  679. className: '_PushStatus',
  680. fields: {},
  681. classLevelPermissions: {}
  682. }));
  683. const _JobStatusSchema = convertSchemaToAdapterSchema(injectDefaultSchema({
  684. className: '_JobStatus',
  685. fields: {},
  686. classLevelPermissions: {}
  687. }));
  688. const _JobScheduleSchema = convertSchemaToAdapterSchema(injectDefaultSchema({
  689. className: '_JobSchedule',
  690. fields: {},
  691. classLevelPermissions: {}
  692. }));
  693. const _AudienceSchema = convertSchemaToAdapterSchema(injectDefaultSchema({
  694. className: '_Audience',
  695. fields: defaultColumns._Audience,
  696. classLevelPermissions: {}
  697. }));
  698. const _IdempotencySchema = convertSchemaToAdapterSchema(injectDefaultSchema({
  699. className: '_Idempotency',
  700. fields: defaultColumns._Idempotency,
  701. classLevelPermissions: {}
  702. }));
  703. const VolatileClassesSchemas = exports.VolatileClassesSchemas = [_HooksSchema, _JobStatusSchema, _JobScheduleSchema, _PushStatusSchema, _GlobalConfigSchema, _GraphQLConfigSchema, _AudienceSchema, _IdempotencySchema];
  704. const dbTypeMatchesObjectType = (dbType, objectType) => {
  705. if (dbType.type !== objectType.type) return false;
  706. if (dbType.targetClass !== objectType.targetClass) return false;
  707. if (dbType === objectType.type) return true;
  708. if (dbType.type === objectType.type) return true;
  709. return false;
  710. };
  711. const typeToString = type => {
  712. if (typeof type === 'string') {
  713. return type;
  714. }
  715. if (type.targetClass) {
  716. return `${type.type}<${type.targetClass}>`;
  717. }
  718. return `${type.type}`;
  719. };
  720. const ttl = {
  721. date: Date.now(),
  722. duration: undefined
  723. };
  724. // Stores the entire schema of the app in a weird hybrid format somewhere between
  725. // the mongo format and the Parse format. Soon, this will all be Parse format.
  726. class SchemaController {
  727. constructor(databaseAdapter) {
  728. this._dbAdapter = databaseAdapter;
  729. const config = _Config.default.get(Parse.applicationId);
  730. this.schemaData = new SchemaData(_SchemaCache.default.all(), this.protectedFields);
  731. this.protectedFields = config.protectedFields;
  732. const customIds = config.allowCustomObjectId;
  733. const customIdRegEx = /^.{1,}$/u; // 1+ chars
  734. const autoIdRegEx = /^[a-zA-Z0-9]{1,}$/;
  735. this.userIdRegEx = customIds ? customIdRegEx : autoIdRegEx;
  736. this._dbAdapter.watch(() => {
  737. this.reloadData({
  738. clearCache: true
  739. });
  740. });
  741. }
  742. async reloadDataIfNeeded() {
  743. if (this._dbAdapter.enableSchemaHooks) {
  744. return;
  745. }
  746. const {
  747. date,
  748. duration
  749. } = ttl || {};
  750. if (!duration) {
  751. return;
  752. }
  753. const now = Date.now();
  754. if (now - date > duration) {
  755. ttl.date = now;
  756. await this.reloadData({
  757. clearCache: true
  758. });
  759. }
  760. }
  761. reloadData(options = {
  762. clearCache: false
  763. }) {
  764. if (this.reloadDataPromise && !options.clearCache) {
  765. return this.reloadDataPromise;
  766. }
  767. this.reloadDataPromise = this.getAllClasses(options).then(allSchemas => {
  768. this.schemaData = new SchemaData(allSchemas, this.protectedFields);
  769. delete this.reloadDataPromise;
  770. }, err => {
  771. this.schemaData = new SchemaData();
  772. delete this.reloadDataPromise;
  773. throw err;
  774. }).then(() => {});
  775. return this.reloadDataPromise;
  776. }
  777. async getAllClasses(options = {
  778. clearCache: false
  779. }) {
  780. if (options.clearCache) {
  781. return this.setAllClasses();
  782. }
  783. await this.reloadDataIfNeeded();
  784. const cached = _SchemaCache.default.all();
  785. if (cached && cached.length) {
  786. return Promise.resolve(cached);
  787. }
  788. return this.setAllClasses();
  789. }
  790. setAllClasses() {
  791. return this._dbAdapter.getAllClasses().then(allSchemas => allSchemas.map(injectDefaultSchema)).then(allSchemas => {
  792. _SchemaCache.default.put(allSchemas);
  793. return allSchemas;
  794. });
  795. }
  796. getOneSchema(className, allowVolatileClasses = false, options = {
  797. clearCache: false
  798. }) {
  799. if (options.clearCache) {
  800. _SchemaCache.default.clear();
  801. }
  802. if (allowVolatileClasses && volatileClasses.indexOf(className) > -1) {
  803. const data = this.schemaData[className];
  804. return Promise.resolve({
  805. className,
  806. fields: data.fields,
  807. classLevelPermissions: data.classLevelPermissions,
  808. indexes: data.indexes
  809. });
  810. }
  811. const cached = _SchemaCache.default.get(className);
  812. if (cached && !options.clearCache) {
  813. return Promise.resolve(cached);
  814. }
  815. return this.setAllClasses().then(allSchemas => {
  816. const oneSchema = allSchemas.find(schema => schema.className === className);
  817. if (!oneSchema) {
  818. return Promise.reject(undefined);
  819. }
  820. return oneSchema;
  821. });
  822. }
  823. // Create a new class that includes the three default fields.
  824. // ACL is an implicit column that does not get an entry in the
  825. // _SCHEMAS database. Returns a promise that resolves with the
  826. // created schema, in mongo format.
  827. // on success, and rejects with an error on fail. Ensure you
  828. // have authorization (master key, or client class creation
  829. // enabled) before calling this function.
  830. async addClassIfNotExists(className, fields = {}, classLevelPermissions, indexes = {}) {
  831. var validationError = this.validateNewClass(className, fields, classLevelPermissions);
  832. if (validationError) {
  833. if (validationError instanceof Parse.Error) {
  834. return Promise.reject(validationError);
  835. } else if (validationError.code && validationError.error) {
  836. return Promise.reject(new Parse.Error(validationError.code, validationError.error));
  837. }
  838. return Promise.reject(validationError);
  839. }
  840. try {
  841. const adapterSchema = await this._dbAdapter.createClass(className, convertSchemaToAdapterSchema({
  842. fields,
  843. classLevelPermissions,
  844. indexes,
  845. className
  846. }));
  847. // TODO: Remove by updating schema cache directly
  848. await this.reloadData({
  849. clearCache: true
  850. });
  851. const parseSchema = convertAdapterSchemaToParseSchema(adapterSchema);
  852. return parseSchema;
  853. } catch (error) {
  854. if (error && error.code === Parse.Error.DUPLICATE_VALUE) {
  855. throw new Parse.Error(Parse.Error.INVALID_CLASS_NAME, `Class ${className} already exists.`);
  856. } else {
  857. throw error;
  858. }
  859. }
  860. }
  861. updateClass(className, submittedFields, classLevelPermissions, indexes, database) {
  862. return this.getOneSchema(className).then(schema => {
  863. const existingFields = schema.fields;
  864. Object.keys(submittedFields).forEach(name => {
  865. const field = submittedFields[name];
  866. if (existingFields[name] && existingFields[name].type !== field.type && field.__op !== 'Delete') {
  867. throw new Parse.Error(255, `Field ${name} exists, cannot update.`);
  868. }
  869. if (!existingFields[name] && field.__op === 'Delete') {
  870. throw new Parse.Error(255, `Field ${name} does not exist, cannot delete.`);
  871. }
  872. });
  873. delete existingFields._rperm;
  874. delete existingFields._wperm;
  875. const newSchema = buildMergedSchemaObject(existingFields, submittedFields);
  876. const defaultFields = defaultColumns[className] || defaultColumns._Default;
  877. const fullNewSchema = Object.assign({}, newSchema, defaultFields);
  878. const validationError = this.validateSchemaData(className, newSchema, classLevelPermissions, Object.keys(existingFields));
  879. if (validationError) {
  880. throw new Parse.Error(validationError.code, validationError.error);
  881. }
  882. // Finally we have checked to make sure the request is valid and we can start deleting fields.
  883. // Do all deletions first, then a single save to _SCHEMA collection to handle all additions.
  884. const deletedFields = [];
  885. const insertedFields = [];
  886. Object.keys(submittedFields).forEach(fieldName => {
  887. if (submittedFields[fieldName].__op === 'Delete') {
  888. deletedFields.push(fieldName);
  889. } else {
  890. insertedFields.push(fieldName);
  891. }
  892. });
  893. let deletePromise = Promise.resolve();
  894. if (deletedFields.length > 0) {
  895. deletePromise = this.deleteFields(deletedFields, className, database);
  896. }
  897. let enforceFields = [];
  898. return deletePromise // Delete Everything
  899. .then(() => this.reloadData({
  900. clearCache: true
  901. })) // Reload our Schema, so we have all the new values
  902. .then(() => {
  903. const promises = insertedFields.map(fieldName => {
  904. const type = submittedFields[fieldName];
  905. return this.enforceFieldExists(className, fieldName, type);
  906. });
  907. return Promise.all(promises);
  908. }).then(results => {
  909. enforceFields = results.filter(result => !!result);
  910. return this.setPermissions(className, classLevelPermissions, newSchema);
  911. }).then(() => this._dbAdapter.setIndexesWithSchemaFormat(className, indexes, schema.indexes, fullNewSchema)).then(() => this.reloadData({
  912. clearCache: true
  913. }))
  914. //TODO: Move this logic into the database adapter
  915. .then(() => {
  916. this.ensureFields(enforceFields);
  917. const schema = this.schemaData[className];
  918. const reloadedSchema = {
  919. className: className,
  920. fields: schema.fields,
  921. classLevelPermissions: schema.classLevelPermissions
  922. };
  923. if (schema.indexes && Object.keys(schema.indexes).length !== 0) {
  924. reloadedSchema.indexes = schema.indexes;
  925. }
  926. return reloadedSchema;
  927. });
  928. }).catch(error => {
  929. if (error === undefined) {
  930. throw new Parse.Error(Parse.Error.INVALID_CLASS_NAME, `Class ${className} does not exist.`);
  931. } else {
  932. throw error;
  933. }
  934. });
  935. }
  936. // Returns a promise that resolves successfully to the new schema
  937. // object or fails with a reason.
  938. enforceClassExists(className) {
  939. if (this.schemaData[className]) {
  940. return Promise.resolve(this);
  941. }
  942. // We don't have this class. Update the schema
  943. return (
  944. // The schema update succeeded. Reload the schema
  945. this.addClassIfNotExists(className).catch(() => {
  946. // The schema update failed. This can be okay - it might
  947. // have failed because there's a race condition and a different
  948. // client is making the exact same schema update that we want.
  949. // So just reload the schema.
  950. return this.reloadData({
  951. clearCache: true
  952. });
  953. }).then(() => {
  954. // Ensure that the schema now validates
  955. if (this.schemaData[className]) {
  956. return this;
  957. } else {
  958. throw new Parse.Error(Parse.Error.INVALID_JSON, `Failed to add ${className}`);
  959. }
  960. }).catch(() => {
  961. // The schema still doesn't validate. Give up
  962. throw new Parse.Error(Parse.Error.INVALID_JSON, 'schema class name does not revalidate');
  963. })
  964. );
  965. }
  966. validateNewClass(className, fields = {}, classLevelPermissions) {
  967. if (this.schemaData[className]) {
  968. throw new Parse.Error(Parse.Error.INVALID_CLASS_NAME, `Class ${className} already exists.`);
  969. }
  970. if (!classNameIsValid(className)) {
  971. return {
  972. code: Parse.Error.INVALID_CLASS_NAME,
  973. error: invalidClassNameMessage(className)
  974. };
  975. }
  976. return this.validateSchemaData(className, fields, classLevelPermissions, []);
  977. }
  978. validateSchemaData(className, fields, classLevelPermissions, existingFieldNames) {
  979. for (const fieldName in fields) {
  980. if (existingFieldNames.indexOf(fieldName) < 0) {
  981. if (!fieldNameIsValid(fieldName, className)) {
  982. return {
  983. code: Parse.Error.INVALID_KEY_NAME,
  984. error: 'invalid field name: ' + fieldName
  985. };
  986. }
  987. if (!fieldNameIsValidForClass(fieldName, className)) {
  988. return {
  989. code: 136,
  990. error: 'field ' + fieldName + ' cannot be added'
  991. };
  992. }
  993. const fieldType = fields[fieldName];
  994. const error = fieldTypeIsInvalid(fieldType);
  995. if (error) return {
  996. code: error.code,
  997. error: error.message
  998. };
  999. if (fieldType.defaultValue !== undefined) {
  1000. let defaultValueType = getType(fieldType.defaultValue);
  1001. if (typeof defaultValueType === 'string') {
  1002. defaultValueType = {
  1003. type: defaultValueType
  1004. };
  1005. } else if (typeof defaultValueType === 'object' && fieldType.type === 'Relation') {
  1006. return {
  1007. code: Parse.Error.INCORRECT_TYPE,
  1008. error: `The 'default value' option is not applicable for ${typeToString(fieldType)}`
  1009. };
  1010. }
  1011. if (!dbTypeMatchesObjectType(fieldType, defaultValueType)) {
  1012. return {
  1013. code: Parse.Error.INCORRECT_TYPE,
  1014. error: `schema mismatch for ${className}.${fieldName} default value; expected ${typeToString(fieldType)} but got ${typeToString(defaultValueType)}`
  1015. };
  1016. }
  1017. } else if (fieldType.required) {
  1018. if (typeof fieldType === 'object' && fieldType.type === 'Relation') {
  1019. return {
  1020. code: Parse.Error.INCORRECT_TYPE,
  1021. error: `The 'required' option is not applicable for ${typeToString(fieldType)}`
  1022. };
  1023. }
  1024. }
  1025. }
  1026. }
  1027. for (const fieldName in defaultColumns[className]) {
  1028. fields[fieldName] = defaultColumns[className][fieldName];
  1029. }
  1030. const geoPoints = Object.keys(fields).filter(key => fields[key] && fields[key].type === 'GeoPoint');
  1031. if (geoPoints.length > 1) {
  1032. return {
  1033. code: Parse.Error.INCORRECT_TYPE,
  1034. error: 'currently, only one GeoPoint field may exist in an object. Adding ' + geoPoints[1] + ' when ' + geoPoints[0] + ' already exists.'
  1035. };
  1036. }
  1037. validateCLP(classLevelPermissions, fields, this.userIdRegEx);
  1038. }
  1039. // Sets the Class-level permissions for a given className, which must exist.
  1040. async setPermissions(className, perms, newSchema) {
  1041. if (typeof perms === 'undefined') {
  1042. return Promise.resolve();
  1043. }
  1044. validateCLP(perms, newSchema, this.userIdRegEx);
  1045. await this._dbAdapter.setClassLevelPermissions(className, perms);
  1046. const cached = _SchemaCache.default.get(className);
  1047. if (cached) {
  1048. cached.classLevelPermissions = perms;
  1049. }
  1050. }
  1051. // Returns a promise that resolves successfully to the new schema
  1052. // object if the provided className-fieldName-type tuple is valid.
  1053. // The className must already be validated.
  1054. // If 'freeze' is true, refuse to update the schema for this field.
  1055. enforceFieldExists(className, fieldName, type, isValidation, maintenance) {
  1056. if (fieldName.indexOf('.') > 0) {
  1057. // "<array>.<index>" for Nested Arrays
  1058. // "<embedded document>.<field>" for Nested Objects
  1059. // JSON Arrays are treated as Nested Objects
  1060. const [x, y] = fieldName.split('.');
  1061. fieldName = x;
  1062. const isArrayIndex = Array.from(y).every(c => c >= '0' && c <= '9');
  1063. if (isArrayIndex && !['sentPerUTCOffset', 'failedPerUTCOffset'].includes(fieldName)) {
  1064. type = 'Array';
  1065. } else {
  1066. type = 'Object';
  1067. }
  1068. }
  1069. let fieldNameToValidate = `${fieldName}`;
  1070. if (maintenance && fieldNameToValidate.charAt(0) === '_') {
  1071. fieldNameToValidate = fieldNameToValidate.substring(1);
  1072. }
  1073. if (!fieldNameIsValid(fieldNameToValidate, className)) {
  1074. throw new Parse.Error(Parse.Error.INVALID_KEY_NAME, `Invalid field name: ${fieldName}.`);
  1075. }
  1076. // If someone tries to create a new field with null/undefined as the value, return;
  1077. if (!type) {
  1078. return undefined;
  1079. }
  1080. const expectedType = this.getExpectedType(className, fieldName);
  1081. if (typeof type === 'string') {
  1082. type = {
  1083. type
  1084. };
  1085. }
  1086. if (type.defaultValue !== undefined) {
  1087. let defaultValueType = getType(type.defaultValue);
  1088. if (typeof defaultValueType === 'string') {
  1089. defaultValueType = {
  1090. type: defaultValueType
  1091. };
  1092. }
  1093. if (!dbTypeMatchesObjectType(type, defaultValueType)) {
  1094. throw new Parse.Error(Parse.Error.INCORRECT_TYPE, `schema mismatch for ${className}.${fieldName} default value; expected ${typeToString(type)} but got ${typeToString(defaultValueType)}`);
  1095. }
  1096. }
  1097. if (expectedType) {
  1098. if (!dbTypeMatchesObjectType(expectedType, type)) {
  1099. throw new Parse.Error(Parse.Error.INCORRECT_TYPE, `schema mismatch for ${className}.${fieldName}; expected ${typeToString(expectedType)} but got ${typeToString(type)}`);
  1100. }
  1101. // If type options do not change
  1102. // we can safely return
  1103. if (isValidation || JSON.stringify(expectedType) === JSON.stringify(type)) {
  1104. return undefined;
  1105. }
  1106. // Field options are may be changed
  1107. // ensure to have an update to date schema field
  1108. return this._dbAdapter.updateFieldOptions(className, fieldName, type);
  1109. }
  1110. return this._dbAdapter.addFieldIfNotExists(className, fieldName, type).catch(error => {
  1111. if (error.code == Parse.Error.INCORRECT_TYPE) {
  1112. // Make sure that we throw errors when it is appropriate to do so.
  1113. throw error;
  1114. }
  1115. // The update failed. This can be okay - it might have been a race
  1116. // condition where another client updated the schema in the same
  1117. // way that we wanted to. So, just reload the schema
  1118. return Promise.resolve();
  1119. }).then(() => {
  1120. return {
  1121. className,
  1122. fieldName,
  1123. type
  1124. };
  1125. });
  1126. }
  1127. ensureFields(fields) {
  1128. for (let i = 0; i < fields.length; i += 1) {
  1129. const {
  1130. className,
  1131. fieldName
  1132. } = fields[i];
  1133. let {
  1134. type
  1135. } = fields[i];
  1136. const expectedType = this.getExpectedType(className, fieldName);
  1137. if (typeof type === 'string') {
  1138. type = {
  1139. type: type
  1140. };
  1141. }
  1142. if (!expectedType || !dbTypeMatchesObjectType(expectedType, type)) {
  1143. throw new Parse.Error(Parse.Error.INVALID_JSON, `Could not add field ${fieldName}`);
  1144. }
  1145. }
  1146. }
  1147. // maintain compatibility
  1148. deleteField(fieldName, className, database) {
  1149. return this.deleteFields([fieldName], className, database);
  1150. }
  1151. // Delete fields, and remove that data from all objects. This is intended
  1152. // to remove unused fields, if other writers are writing objects that include
  1153. // this field, the field may reappear. Returns a Promise that resolves with
  1154. // no object on success, or rejects with { code, error } on failure.
  1155. // Passing the database and prefix is necessary in order to drop relation collections
  1156. // and remove fields from objects. Ideally the database would belong to
  1157. // a database adapter and this function would close over it or access it via member.
  1158. deleteFields(fieldNames, className, database) {
  1159. if (!classNameIsValid(className)) {
  1160. throw new Parse.Error(Parse.Error.INVALID_CLASS_NAME, invalidClassNameMessage(className));
  1161. }
  1162. fieldNames.forEach(fieldName => {
  1163. if (!fieldNameIsValid(fieldName, className)) {
  1164. throw new Parse.Error(Parse.Error.INVALID_KEY_NAME, `invalid field name: ${fieldName}`);
  1165. }
  1166. //Don't allow deleting the default fields.
  1167. if (!fieldNameIsValidForClass(fieldName, className)) {
  1168. throw new Parse.Error(136, `field ${fieldName} cannot be changed`);
  1169. }
  1170. });
  1171. return this.getOneSchema(className, false, {
  1172. clearCache: true
  1173. }).catch(error => {
  1174. if (error === undefined) {
  1175. throw new Parse.Error(Parse.Error.INVALID_CLASS_NAME, `Class ${className} does not exist.`);
  1176. } else {
  1177. throw error;
  1178. }
  1179. }).then(schema => {
  1180. fieldNames.forEach(fieldName => {
  1181. if (!schema.fields[fieldName]) {
  1182. throw new Parse.Error(255, `Field ${fieldName} does not exist, cannot delete.`);
  1183. }
  1184. });
  1185. const schemaFields = _objectSpread({}, schema.fields);
  1186. return database.adapter.deleteFields(className, schema, fieldNames).then(() => {
  1187. return Promise.all(fieldNames.map(fieldName => {
  1188. const field = schemaFields[fieldName];
  1189. if (field && field.type === 'Relation') {
  1190. //For relations, drop the _Join table
  1191. return database.adapter.deleteClass(`_Join:${fieldName}:${className}`);
  1192. }
  1193. return Promise.resolve();
  1194. }));
  1195. });
  1196. }).then(() => {
  1197. _SchemaCache.default.clear();
  1198. });
  1199. }
  1200. // Validates an object provided in REST format.
  1201. // Returns a promise that resolves to the new schema if this object is
  1202. // valid.
  1203. async validateObject(className, object, query, maintenance) {
  1204. let geocount = 0;
  1205. const schema = await this.enforceClassExists(className);
  1206. const promises = [];
  1207. for (const fieldName in object) {
  1208. if (object[fieldName] && getType(object[fieldName]) === 'GeoPoint') {
  1209. geocount++;
  1210. }
  1211. if (geocount > 1) {
  1212. return Promise.reject(new Parse.Error(Parse.Error.INCORRECT_TYPE, 'there can only be one geopoint field in a class'));
  1213. }
  1214. }
  1215. for (const fieldName in object) {
  1216. if (object[fieldName] === undefined) {
  1217. continue;
  1218. }
  1219. const expected = getType(object[fieldName]);
  1220. if (!expected) {
  1221. continue;
  1222. }
  1223. if (fieldName === 'ACL') {
  1224. // Every object has ACL implicitly.
  1225. continue;
  1226. }
  1227. promises.push(schema.enforceFieldExists(className, fieldName, expected, true, maintenance));
  1228. }
  1229. const results = await Promise.all(promises);
  1230. const enforceFields = results.filter(result => !!result);
  1231. if (enforceFields.length !== 0) {
  1232. // TODO: Remove by updating schema cache directly
  1233. await this.reloadData({
  1234. clearCache: true
  1235. });
  1236. }
  1237. this.ensureFields(enforceFields);
  1238. const promise = Promise.resolve(schema);
  1239. return thenValidateRequiredColumns(promise, className, object, query);
  1240. }
  1241. // Validates that all the properties are set for the object
  1242. validateRequiredColumns(className, object, query) {
  1243. const columns = requiredColumns.write[className];
  1244. if (!columns || columns.length == 0) {
  1245. return Promise.resolve(this);
  1246. }
  1247. const missingColumns = columns.filter(function (column) {
  1248. if (query && query.objectId) {
  1249. if (object[column] && typeof object[column] === 'object') {
  1250. // Trying to delete a required column
  1251. return object[column].__op == 'Delete';
  1252. }
  1253. // Not trying to do anything there
  1254. return false;
  1255. }
  1256. return !object[column];
  1257. });
  1258. if (missingColumns.length > 0) {
  1259. throw new Parse.Error(Parse.Error.INCORRECT_TYPE, missingColumns[0] + ' is required.');
  1260. }
  1261. return Promise.resolve(this);
  1262. }
  1263. testPermissionsForClassName(className, aclGroup, operation) {
  1264. return SchemaController.testPermissions(this.getClassLevelPermissions(className), aclGroup, operation);
  1265. }
  1266. // Tests that the class level permission let pass the operation for a given aclGroup
  1267. static testPermissions(classPermissions, aclGroup, operation) {
  1268. if (!classPermissions || !classPermissions[operation]) {
  1269. return true;
  1270. }
  1271. const perms = classPermissions[operation];
  1272. if (perms['*']) {
  1273. return true;
  1274. }
  1275. // Check permissions against the aclGroup provided (array of userId/roles)
  1276. if (aclGroup.some(acl => {
  1277. return perms[acl] === true;
  1278. })) {
  1279. return true;
  1280. }
  1281. return false;
  1282. }
  1283. // Validates an operation passes class-level-permissions set in the schema
  1284. static validatePermission(classPermissions, className, aclGroup, operation, action) {
  1285. if (SchemaController.testPermissions(classPermissions, aclGroup, operation)) {
  1286. return Promise.resolve();
  1287. }
  1288. if (!classPermissions || !classPermissions[operation]) {
  1289. return true;
  1290. }
  1291. const perms = classPermissions[operation];
  1292. // If only for authenticated users
  1293. // make sure we have an aclGroup
  1294. if (perms['requiresAuthentication']) {
  1295. // If aclGroup has * (public)
  1296. if (!aclGroup || aclGroup.length == 0) {
  1297. throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, 'Permission denied, user needs to be authenticated.');
  1298. } else if (aclGroup.indexOf('*') > -1 && aclGroup.length == 1) {
  1299. throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, 'Permission denied, user needs to be authenticated.');
  1300. }
  1301. // requiresAuthentication passed, just move forward
  1302. // probably would be wise at some point to rename to 'authenticatedUser'
  1303. return Promise.resolve();
  1304. }
  1305. // No matching CLP, let's check the Pointer permissions
  1306. // And handle those later
  1307. const permissionField = ['get', 'find', 'count'].indexOf(operation) > -1 ? 'readUserFields' : 'writeUserFields';
  1308. // Reject create when write lockdown
  1309. if (permissionField == 'writeUserFields' && operation == 'create') {
  1310. throw new Parse.Error(Parse.Error.OPERATION_FORBIDDEN, `Permission denied for action ${operation} on class ${className}.`);
  1311. }
  1312. // Process the readUserFields later
  1313. if (Array.isArray(classPermissions[permissionField]) && classPermissions[permissionField].length > 0) {
  1314. return Promise.resolve();
  1315. }
  1316. const pointerFields = classPermissions[operation].pointerFields;
  1317. if (Array.isArray(pointerFields) && pointerFields.length > 0) {
  1318. // any op except 'addField as part of create' is ok.
  1319. if (operation !== 'addField' || action === 'update') {
  1320. // We can allow adding field on update flow only.
  1321. return Promise.resolve();
  1322. }
  1323. }
  1324. throw new Parse.Error(Parse.Error.OPERATION_FORBIDDEN, `Permission denied for action ${operation} on class ${className}.`);
  1325. }
  1326. // Validates an operation passes class-level-permissions set in the schema
  1327. validatePermission(className, aclGroup, operation, action) {
  1328. return SchemaController.validatePermission(this.getClassLevelPermissions(className), className, aclGroup, operation, action);
  1329. }
  1330. getClassLevelPermissions(className) {
  1331. return this.schemaData[className] && this.schemaData[className].classLevelPermissions;
  1332. }
  1333. // Returns the expected type for a className+key combination
  1334. // or undefined if the schema is not set
  1335. getExpectedType(className, fieldName) {
  1336. if (this.schemaData[className]) {
  1337. const expectedType = this.schemaData[className].fields[fieldName];
  1338. return expectedType === 'map' ? 'Object' : expectedType;
  1339. }
  1340. return undefined;
  1341. }
  1342. // Checks if a given class is in the schema.
  1343. hasClass(className) {
  1344. if (this.schemaData[className]) {
  1345. return Promise.resolve(true);
  1346. }
  1347. return this.reloadData().then(() => !!this.schemaData[className]);
  1348. }
  1349. }
  1350. // Returns a promise for a new Schema.
  1351. exports.SchemaController = exports.default = SchemaController;
  1352. const load = (dbAdapter, options) => {
  1353. const schema = new SchemaController(dbAdapter);
  1354. ttl.duration = dbAdapter.schemaCacheTtl;
  1355. return schema.reloadData(options).then(() => schema);
  1356. };
  1357. // Builds a new schema (in schema API response format) out of an
  1358. // existing mongo schema + a schemas API put request. This response
  1359. // does not include the default fields, as it is intended to be passed
  1360. // to mongoSchemaFromFieldsAndClassName. No validation is done here, it
  1361. // is done in mongoSchemaFromFieldsAndClassName.
  1362. exports.load = load;
  1363. function buildMergedSchemaObject(existingFields, putRequest) {
  1364. const newSchema = {};
  1365. // -disable-next
  1366. const sysSchemaField = Object.keys(defaultColumns).indexOf(existingFields._id) === -1 ? [] : Object.keys(defaultColumns[existingFields._id]);
  1367. for (const oldField in existingFields) {
  1368. if (oldField !== '_id' && oldField !== 'ACL' && oldField !== 'updatedAt' && oldField !== 'createdAt' && oldField !== 'objectId') {
  1369. if (sysSchemaField.length > 0 && sysSchemaField.indexOf(oldField) !== -1) {
  1370. continue;
  1371. }
  1372. const fieldIsDeleted = putRequest[oldField] && putRequest[oldField].__op === 'Delete';
  1373. if (!fieldIsDeleted) {
  1374. newSchema[oldField] = existingFields[oldField];
  1375. }
  1376. }
  1377. }
  1378. for (const newField in putRequest) {
  1379. if (newField !== 'objectId' && putRequest[newField].__op !== 'Delete') {
  1380. if (sysSchemaField.length > 0 && sysSchemaField.indexOf(newField) !== -1) {
  1381. continue;
  1382. }
  1383. newSchema[newField] = putRequest[newField];
  1384. }
  1385. }
  1386. return newSchema;
  1387. }
  1388. // Given a schema promise, construct another schema promise that
  1389. // validates this field once the schema loads.
  1390. function thenValidateRequiredColumns(schemaPromise, className, object, query) {
  1391. return schemaPromise.then(schema => {
  1392. return schema.validateRequiredColumns(className, object, query);
  1393. });
  1394. }
  1395. // Gets the type from a REST API formatted object, where 'type' is
  1396. // extended past javascript types to include the rest of the Parse
  1397. // type system.
  1398. // The output should be a valid schema value.
  1399. // TODO: ensure that this is compatible with the format used in Open DB
  1400. function getType(obj) {
  1401. const type = typeof obj;
  1402. switch (type) {
  1403. case 'boolean':
  1404. return 'Boolean';
  1405. case 'string':
  1406. return 'String';
  1407. case 'number':
  1408. return 'Number';
  1409. case 'map':
  1410. case 'object':
  1411. if (!obj) {
  1412. return undefined;
  1413. }
  1414. return getObjectType(obj);
  1415. case 'function':
  1416. case 'symbol':
  1417. case 'undefined':
  1418. default:
  1419. throw 'bad obj: ' + obj;
  1420. }
  1421. }
  1422. // This gets the type for non-JSON types like pointers and files, but
  1423. // also gets the appropriate type for $ operators.
  1424. // Returns null if the type is unknown.
  1425. function getObjectType(obj) {
  1426. if (obj instanceof Array) {
  1427. return 'Array';
  1428. }
  1429. if (obj.__type) {
  1430. switch (obj.__type) {
  1431. case 'Pointer':
  1432. if (obj.className) {
  1433. return {
  1434. type: 'Pointer',
  1435. targetClass: obj.className
  1436. };
  1437. }
  1438. break;
  1439. case 'Relation':
  1440. if (obj.className) {
  1441. return {
  1442. type: 'Relation',
  1443. targetClass: obj.className
  1444. };
  1445. }
  1446. break;
  1447. case 'File':
  1448. if (obj.name) {
  1449. return 'File';
  1450. }
  1451. break;
  1452. case 'Date':
  1453. if (obj.iso) {
  1454. return 'Date';
  1455. }
  1456. break;
  1457. case 'GeoPoint':
  1458. if (obj.latitude != null && obj.longitude != null) {
  1459. return 'GeoPoint';
  1460. }
  1461. break;
  1462. case 'Bytes':
  1463. if (obj.base64) {
  1464. return 'Bytes';
  1465. }
  1466. break;
  1467. case 'Polygon':
  1468. if (obj.coordinates) {
  1469. return 'Polygon';
  1470. }
  1471. break;
  1472. }
  1473. throw new Parse.Error(Parse.Error.INCORRECT_TYPE, 'This is not a valid ' + obj.__type);
  1474. }
  1475. if (obj['$ne']) {
  1476. return getObjectType(obj['$ne']);
  1477. }
  1478. if (obj.__op) {
  1479. switch (obj.__op) {
  1480. case 'Increment':
  1481. return 'Number';
  1482. case 'Delete':
  1483. return null;
  1484. case 'Add':
  1485. case 'AddUnique':
  1486. case 'Remove':
  1487. return 'Array';
  1488. case 'AddRelation':
  1489. case 'RemoveRelation':
  1490. return {
  1491. type: 'Relation',
  1492. targetClass: obj.objects[0].className
  1493. };
  1494. case 'Batch':
  1495. return getObjectType(obj.ops[0]);
  1496. default:
  1497. throw 'unexpected op: ' + obj.__op;
  1498. }
  1499. }
  1500. return 'Object';
  1501. }
  1502. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfU3RvcmFnZUFkYXB0ZXIiLCJyZXF1aXJlIiwiX1NjaGVtYUNhY2hlIiwiX2ludGVyb3BSZXF1aXJlRGVmYXVsdCIsIl9EYXRhYmFzZUNvbnRyb2xsZXIiLCJfQ29uZmlnIiwiX2RlZXBjb3B5IiwiZSIsIl9fZXNNb2R1bGUiLCJkZWZhdWx0Iiwib3duS2V5cyIsInIiLCJ0IiwiT2JqZWN0Iiwia2V5cyIsImdldE93blByb3BlcnR5U3ltYm9scyIsIm8iLCJmaWx0ZXIiLCJnZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IiLCJlbnVtZXJhYmxlIiwicHVzaCIsImFwcGx5IiwiX29iamVjdFNwcmVhZCIsImFyZ3VtZW50cyIsImxlbmd0aCIsImZvckVhY2giLCJfZGVmaW5lUHJvcGVydHkiLCJnZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3JzIiwiZGVmaW5lUHJvcGVydGllcyIsImRlZmluZVByb3BlcnR5IiwiX3RvUHJvcGVydHlLZXkiLCJ2YWx1ZSIsImNvbmZpZ3VyYWJsZSIsIndyaXRhYmxlIiwiaSIsIl90b1ByaW1pdGl2ZSIsIlN5bWJvbCIsInRvUHJpbWl0aXZlIiwi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IGlzIGluIGZvcm0gb2YgYXJyYXlcbiAgICAgICAgZm9yIChjb25zdCBmaWVsZCBvZiBwcm90ZWN0ZWRGaWVsZHMpIHtcbiAgICAgICAgICAvLyBkbyBub3QgYWxsb293IHRvIHByb3RlY3QgZGVmYXVsdCBmaWVsZHNcbiAgICAgICAgICBpZiAoZGVmYXVsdENvbHVtbnMuX0RlZmF1bHRbZmllbGRdKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgUGFyc2UuRXJyb3IoXG4gICAgICAgICAgICAgIFBhcnNlLkVycm9yLklOVkFMSURfSlNPTixcbiAgICAgICAgICAgICAgYERlZmF1bHQgZmllbGQgJyR7ZmllbGR9JyBjYW4gbm90IGJlIHByb3RlY3RlZGBcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIC8vIGZpZWxkIHNob3VsZCBleGlzdCBvbiBjb2xsZWN0aW9uXG4gICAgICAgICAgaWYgKCFPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZmllbGRzLCBmaWVsZCkpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBQYXJzZS5FcnJvcihcbiAgICAgICAgICAgICAgUGFyc2UuRXJyb3IuSU5WQUxJRF9KU09OLFxuICAgICAgICAgICAgICBgRmllbGQgJyR7ZmllbGR9JyBpbiBwcm90ZWN0ZWRGaWVsZHM6JHtlbnRpdHl9IGRvZXMgbm90IGV4aXN0YFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIC8vIHByb2NlZWQgd2l0aCBuZXh0IG9wZXJhdGlvbktleVxuICAgICAgY29udGludWU7XG4gICAgfVxuXG4gICAgLy8gdmFsaWRhdGUgb3RoZXIgZmllbGRzXG4gICAgLy8gRW50aXR5IGNhbiBiZTpcbiAgICAvLyBcIipcIiAtIFB1YmxpYyxcbiAgICAvLyBcInJlcXVpcmVzQXV0aGVudGljYXRpb25cIiAtIGF1dGhl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gICAgICAgKTtcbiAgICAgICAgfVxuICAgICAgICAvLyBwcm9jZWVkIHdpdGggbmV4dCBlbnRpdHkga2V5XG4gICAgICAgIGNvbnRpbnVlO1xuICAgICAgfVxuXG4gICAgICAvLyBvciBbZW50aXR5XTogYm9vbGVhblxuICAgICAgY29uc3QgcGVybWl0ID0gb3BlcmF0aW9uW2VudGl0eV07XG5cbiAgICAgIGlmIChwZXJtaXQgIT09IHRydWUpIHtcbiAgICAgICAgdGhyb3cgbmV3IFBhcnNlLkVycm9yKFxuICAgICAgICAgIFBhcnNlLkVycm9yLklOVkFMSURfSlNPTixcbiAgICAgICAgICBgJyR7cGVybWl0fScgaXMgbm90IGEgdmFsaWQgdmFsdWUgZm9yIGNsYXNzIGxldmVsIHBlcm1pc3Npb25zICR7b3BlcmF0aW9uS2V5fToke2VudGl0eX06JHtwZXJtaXR9YFxuICAgICAgICApO1xuICAgICAgfVxuICAgIH1cbiAgfVxufVxuXG5mdW5jdGlvbiB2YWxpZGF0ZUNMUGpzb24ob3BlcmF0aW9uOiBhbnksIG9wZXJhdGlvbktleTogc3RyaW5nKSB7XG4gIGlmIChvcGVyYXRpb25LZXkgPT09ICdyZWFkVXNlckZpZWxkcycgfHwgb3BlcmF0aW9uS2V5ID09PSAnd3JpdGVVc2VyRmllbGRzJykge1xuICAgIGlmICghQXJyYXkuaXNBcnJheShvcGVyYXRpb24pKSB7XG4gICAgICB0aHJvdyBuZXcgUGFyc2UuRXJyb3IoXG4gICAgICAgIFBhcnNlLkVycm9yLklOVkFMSURfSlNPTixcbiAgICAgICAgYCcke29wZXJhdGlvbn0nIGlzIG5vdCBhIHZhbGlkIHZhbHVlIGZvciBjbGFzcyBsZXZlbCBwZXJtaXNzaW9ucyAke29wZXJhdGlvbktleX0gLSBtdXN0IGJlIGFuIGFycmF5YFxuICAgICAgKTtcbiAgICB9XG4gIH0gZWxzZSB7XG4gICAgaWYgKHR5cGVvZiBvcGVyYXRpb24gPT09ICdvYmplY3QnICYmIG9w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AgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMuX19kYXRhW3NjaGVtYS5jbGFzc05hbWVdID0gZGF0YTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIHRoaXMuX19kYXRhW3NjaGVtYS5jbGFzc05hbWVdO1xuICAgICAgICB9LFxuICAgICAgfSk7XG4gICAgfSk7XG5cbiAgICAvLyBJbmplY3QgdGhlIGluLW1lbW9yeSBjbGFzc2VzXG4gICAgdm9sYXRpbGVDbGFzc2VzLmZvckVhY2goY2xhc3NOYW1lID0+IHtcbiAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eSh0aGlzLCBjbGFzc05hbWUsIHtcbiAgICAgICAgZ2V0OiAoKSA9PiB7XG4gICAgICAgICAgaWYgKCF0aGlzLl9fZGF0YVtjbGFzc05hbWVdKSB7XG4gICAgICAgICAgICBjb25zdCBzY2hlbWEgPSBpbmplY3REZWZhdWx0U2NoZW1hKHtcbiAgICAgICAgICAgICAgY2xhc3NOYW1lLFxuICAgICAgICAgICAgICBmaWVsZHM6IHt9LFxuICAgICAgICAgICAgICBjbGFzc0xldmVsUGVybWlzc2lvbnM6IHt9LFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjb25zdCBkYXRhID0ge307XG4gICAgICAgICAgICBkYXRhLmZpZWxkcyA9IHNjaGVtYS5maWVsZHM7XG4gICAgICAgICAgICBkYXRhLmNsYXNzTGV2ZWxQZXJtaXNzaW9ucyA9IHNjaGVtYS5jbGFzc0xldmVsUGVybWlzc2lvbnM7XG4gICAgICAgICAgICBkYXRhLmluZGV4ZXMgPSBzY2hlbWEuaW5kZXhlcztcbiAgICAgICAgICAgIHRoaXMuX19kYXRhW2NsYXNzTmFtZV0gPSBkYXRhO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gdGhpcy5fX2RhdGFbY2xhc3NOYW1lXTtcbiAgICAgICAgfSxcbiAgICAgIH0pO1xuICAgIH0pO1xuICB9XG59XG5cbm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pXG4gICAgICAgICAgICAudGhlbigoKSA9PlxuICAgICAgICAgICAgICB0aGlzLl9kYkFkYXB0ZXIuc2V0SW5kZXhlc1dpdGhTY2hlbWFGb3JtYXQoXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lLFxuICAgICAgICAgICAgICAgIGluZGV4ZXMsXG4gICAgICAgICAgICAgICAgc2NoZW1hLmluZGV4ZXMsXG4gICAgICAgICAgICAgICAgZnVsbE5ld1NjaGVtYVxuICAgICAgICAgICAgICApXG4gICAgICAgICAgICApXG4gICAgICAgICAgICAudGhlbigoKSA9PiB0aGlzLnJlbG9hZERhdGEoeyBjbGVhckNhY2hlOiB0cnVlIH0pKVxuICAgICAgICAgICAgLy9UT0RPOiBNb3ZlIHRoaXMgbG9naWMgaW50byB0aGUgZGF0YWJhc2UgYWRhcHRlclxuICAgICAgICAgICAgLnRoZW4oKCkgPT4ge1xuICAgICAgICAgICAgICB0aGlzLmVuc3VyZUZpZWxkcyhlbmZvcmNlRmllbGRzKTtcbiAgICAgICAgICAgICAgY29uc3Qgc2NoZW1hID0gdGhpcy5zY2hlbWFEYXRhW2NsYXNzTmFtZV07XG4gICAgICAgICAgICAgIGNvbnN0IHJlbG9hZGVkU2NoZW1hOiBTY2hlbWEgPSB7XG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lOiBjbGFzc05hbWUsXG4gICAgICAgICAgICAgICAgZmllbGRzOiBzY2hlbWEuZmllbGRzLFxuICAgICAgICAgICAgICAgIGNsYXNzTGV2ZWxQZXJtaXNzaW9uczogc2NoZW1hLmNsYXNzTGV2ZWxQZXJtaXNzaW9ucyxcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgaWYgKHNjaGVtYS5pbmRleGVzICYmIE9iamVjdC5rZXlzKHNjaGVtYS5pbmRleGVzKS5sZW5ndGggIT09IDApIHtcbiAgICAgICAgICAgICAgICByZWxvYWRlZFNjaGVtYS5pbmRleGVzID0gc2NoZW1hLmluZGV4ZXM7XG4gICAgIC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ZWxkTmFtZSBpbiBvYmplY3QpIHtcbiAgICAgIGlmIChvYmplY3RbZmllbGROYW1lXSAmJiBnZXRUeXBlKG9iamVjdFtmaWVsZE5hbWVdKSA9PT0gJ0dlb1BvaW50Jykge1xuICAgICAgICBnZW9jb3VudCsrO1xuICAgICAgfVxuICAgICAgaWYgKGdlb2NvdW50ID4gMSkge1xuICAgICAgICByZXR1cm4gUHJvbWlzZS5yZWplY3QoXG4gICAgICAgICAgbmV3IFBhcnNlLkVycm9yKFxuICAgICAgICAgICAgUGFyc2UuRXJyb3IuSU5DT1JSRUNUX1RZUEUsXG4gICAgICAgICAgICAndGhlcmUgY2FuIG9ubHkgYmUgb25lIGdlb3BvaW50IGZpZWxkIGluIGEgY2xhc3MnXG4gICAgICAgICAgKVxuICAgICAgICApO1xuICAgICAgfVxuICAgIH1cbiAgICBmb3IgKGNvbnN0IGZpZWxkTmFtZSBpbiBvYmplY3QpIHtcbiAgICAgIGlmIChvYmplY3RbZmllbGROYW1lXSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIGNvbnRpbnVlO1xuICAgICAgfVxuICAgICAgY29uc3QgZXhwZWN0ZWQgPSBnZXRUeXBlKG9iamVjdFtmaWVsZE5hbWVdKTtcbiAgICAgIGlmICghZXhwZWN0ZWQpIHtcbiAgICAgICAgY29udGludWU7XG4gICAgICB9XG4gICAgICBpZiAoZmllbGROYW1lID09PSAnQUNMJykge1xuICAgICAgICAvLyBFdmVyeSBvYmplY3QgaGFzIEFDTCBpbXBsaWNpdGx5LlxuICAgICAgICBjb250aW51ZTtcbiAgICAgIH1cbiAgICAgIHByb21pc2VzLnB1c2goc2NoZW1hLmVuZm9yY2VGaWVsZEV4aXN0cyhjbGFzc05hbWUsIGZpZWxkTmFtZSwgZXhwZWN0ZWQsIHRydWUsIG1haW50ZW5hbmNlKSk7XG4gICAgfVxuICAgIGNvbnN0IHJlc3VsdHMgPSBhd2FpdCBQcm9taXNlLmFsbChwcm9taXNlcyk7XG4gICA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hc2UgJ1BvaW50ZXInOlxuICAgICAgICBpZiAob2JqLmNsYXNzTmFtZSkge1xuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB0eXBlOiAnUG9pbnRlcicsXG4gICAgICAgICAgICB0YXJnZXRDbGFzczogb2JqLmNsYXNzTmFtZSxcbiAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAnUmVsYXRpb24nOlxuICAgICAgICBpZiAob2JqLmNsYXNzTmFtZSkge1xuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB0eXBlOiAnUmVsYXRpb24nLFxuICAgICAgICAgICAgdGFyZ2V0Q2xhc3M6IG9iai5jbGFzc05hbWUsXG4gICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ0ZpbGUnOlxuICAgICAgICBpZiAob2JqLm5hbWUpIHtcbiAgICAgICAgICByZXR1cm4gJ0ZpbGUnO1xuICAgICAgICB9XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAnRGF0ZSc6XG4gICAgICAgIGlmIChvYmouaXNvKSB7XG4gICAgICAgICAgcmV0dXJuICdEYXRlJztcbiAgICAgICAgfVxuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ0dlb1BvaW50JzpcbiAgICAgICAgaWYgKG9iai5sYXRpdHVkZSAhPSBudWxsICYmIG9iai5sb25naXR1ZGUgIT0gbnVsbCkge1xuICAgICAgICAgIHJldHVybiAnR2VvUG9pbnQnO1xuICAgICAgICB9XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAnQnl0ZXMnOlxuICAgICAgICBpZiAob2JqLmJhc2U2NCkge1xuICAgICAgICAgIHJldHVybiAnQnl0ZXMnO1xuICAgICAgICB9XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAnUG9seWdvbic6XG4gICAgICAgIGlmIChvYmouY29vcmRpbmF0ZXMpIHtcbiAgICAgICA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