parse 4.1.0-alpha.4 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/parse.js +58 -253
  2. package/dist/parse.min.js +2 -2
  3. package/dist/parse.weapp.js +58 -253
  4. package/dist/parse.weapp.min.js +2 -2
  5. package/lib/browser/AnonymousUtils.js +1 -1
  6. package/lib/browser/Cloud.js +2 -1
  7. package/lib/browser/CoreManager.js +1 -1
  8. package/lib/browser/EventuallyQueue.js +1 -13
  9. package/lib/browser/LiveQueryClient.js +4 -8
  10. package/lib/browser/LocalDatastore.js +1 -3
  11. package/lib/browser/LocalDatastoreController.js +1 -3
  12. package/lib/browser/ObjectStateMutations.js +1 -14
  13. package/lib/browser/ParseACL.js +1 -2
  14. package/lib/browser/ParseCLP.js +1 -6
  15. package/lib/browser/ParseConfig.js +0 -1
  16. package/lib/browser/ParseFile.js +1 -5
  17. package/lib/browser/ParseInstallation.js +1 -4
  18. package/lib/browser/ParseObject.js +7 -10
  19. package/lib/browser/ParseOp.js +1 -3
  20. package/lib/browser/ParseQuery.js +24 -79
  21. package/lib/browser/ParseRole.js +1 -5
  22. package/lib/browser/ParseSchema.js +1 -1
  23. package/lib/browser/ParseSession.js +1 -5
  24. package/lib/browser/ParseUser.js +1 -42
  25. package/lib/browser/Push.js +2 -8
  26. package/lib/browser/RESTController.js +0 -20
  27. package/lib/browser/SingleInstanceStateController.js +1 -6
  28. package/lib/browser/TaskQueue.js +0 -4
  29. package/lib/browser/UniqueInstanceStateController.js +1 -3
  30. package/lib/browser/unsavedChildren.js +1 -4
  31. package/lib/node/AnonymousUtils.js +1 -1
  32. package/lib/node/Cloud.js +2 -1
  33. package/lib/node/CoreManager.js +1 -1
  34. package/lib/node/EventuallyQueue.js +1 -13
  35. package/lib/node/LiveQueryClient.js +2 -5
  36. package/lib/node/LocalDatastore.js +1 -1
  37. package/lib/node/ObjectStateMutations.js +1 -11
  38. package/lib/node/ParseACL.js +1 -2
  39. package/lib/node/ParseCLP.js +1 -3
  40. package/lib/node/ParseConfig.js +2 -1
  41. package/lib/node/ParseFile.js +1 -2
  42. package/lib/node/ParseInstallation.js +1 -1
  43. package/lib/node/ParseObject.js +1 -2
  44. package/lib/node/ParseQuery.js +1 -50
  45. package/lib/node/ParseRole.js +1 -2
  46. package/lib/node/ParseSchema.js +1 -1
  47. package/lib/node/ParseSession.js +1 -2
  48. package/lib/node/ParseUser.js +1 -37
  49. package/lib/node/Push.js +2 -8
  50. package/lib/node/RESTController.js +0 -20
  51. package/lib/node/SingleInstanceStateController.js +1 -6
  52. package/lib/node/TaskQueue.js +1 -4
  53. package/lib/node/UniqueInstanceStateController.js +1 -3
  54. package/lib/node/unsavedChildren.js +1 -4
  55. package/lib/react-native/CoreManager.js +1 -1
  56. package/lib/react-native/LiveQueryClient.js +3 -7
  57. package/lib/react-native/ParseCLP.js +2 -2
  58. package/lib/react-native/ParseFile.js +0 -1
  59. package/lib/react-native/ParseQuery.js +11 -34
  60. package/lib/react-native/ParseUser.js +0 -25
  61. package/lib/weapp/AnonymousUtils.js +1 -1
  62. package/lib/weapp/Cloud.js +2 -1
  63. package/lib/weapp/CoreManager.js +1 -1
  64. package/lib/weapp/EventuallyQueue.js +1 -13
  65. package/lib/weapp/LiveQueryClient.js +4 -8
  66. package/lib/weapp/LocalDatastore.js +1 -3
  67. package/lib/weapp/LocalDatastoreController.js +1 -3
  68. package/lib/weapp/ObjectStateMutations.js +1 -14
  69. package/lib/weapp/ParseACL.js +1 -2
  70. package/lib/weapp/ParseCLP.js +1 -6
  71. package/lib/weapp/ParseConfig.js +0 -1
  72. package/lib/weapp/ParseFile.js +1 -5
  73. package/lib/weapp/ParseInstallation.js +1 -4
  74. package/lib/weapp/ParseObject.js +7 -10
  75. package/lib/weapp/ParseOp.js +1 -3
  76. package/lib/weapp/ParseQuery.js +24 -79
  77. package/lib/weapp/ParseRole.js +1 -5
  78. package/lib/weapp/ParseSchema.js +1 -1
  79. package/lib/weapp/ParseSession.js +1 -5
  80. package/lib/weapp/ParseUser.js +1 -42
  81. package/lib/weapp/Push.js +2 -8
  82. package/lib/weapp/RESTController.js +0 -20
  83. package/lib/weapp/SingleInstanceStateController.js +1 -6
  84. package/lib/weapp/TaskQueue.js +0 -4
  85. package/lib/weapp/UniqueInstanceStateController.js +1 -3
  86. package/lib/weapp/unsavedChildren.js +1 -4
  87. package/package.json +18 -18
@@ -17,10 +17,7 @@ var _ParseRelation = _interopRequireDefault(require("./ParseRelation"));
17
17
  /**
18
18
  * @flow
19
19
  */
20
- /*:: type EncounterMap = {
21
- objects: { [identifier: string]: ParseObject | boolean },
22
- files: Array<ParseFile>,
23
- };*/
20
+
24
21
  /**
25
22
  * Return an array of unsaved children, which are either Parse Objects or Files.
26
23
  * If it encounters any dirty Objects without Ids, it will throw an exception.
@@ -13,7 +13,7 @@ function _interopRequireDefault(obj) {
13
13
  /**
14
14
  * @flow-weak
15
15
  */
16
- /*:: import type { RequestOptions } from './RESTController';*/
16
+
17
17
  const uuidv4 = require('./uuid');
18
18
  let registered = false;
19
19
 
package/lib/node/Cloud.js CHANGED
@@ -21,7 +21,7 @@ function _interopRequireDefault(obj) {
21
21
  /**
22
22
  * @flow
23
23
  */
24
- /*:: import type { RequestOptions } from './RESTController';*/
24
+
25
25
  /**
26
26
  * Contains functions for calling and declaring
27
27
  * <a href="/docs/cloud_code_guide#functions">cloud functions</a>.
@@ -33,6 +33,7 @@ function _interopRequireDefault(obj) {
33
33
  * @static
34
34
  * @hideconstructor
35
35
  */
36
+
36
37
  /**
37
38
  * Makes a call to a cloud function.
38
39
  *
@@ -179,7 +179,7 @@ const config /*: Config & { [key: string]: mixed }*/ = {
179
179
  SERVER_AUTH_TOKEN: null,
180
180
  LIVEQUERY_SERVER_URL: null,
181
181
  ENCRYPTED_KEY: null,
182
- VERSION: 'js' + "4.1.0-alpha.4",
182
+ VERSION: 'js' + "4.1.0",
183
183
  APPLICATION_ID: null,
184
184
  JAVASCRIPT_KEY: null,
185
185
  MASTER_KEY: null,
@@ -14,19 +14,7 @@ function _interopRequireDefault(obj) {
14
14
  *
15
15
  * @flow
16
16
  */
17
- /*:: import type { SaveOptions } from './ParseObject';*/
18
- /*:: import type { RequestOptions } from './RESTController';*/
19
- /*:: type QueueObject = {
20
- queueId: string,
21
- action: string,
22
- object: ParseObject,
23
- serverOptions: SaveOptions | RequestOptions,
24
- id: string,
25
- className: string,
26
- hash: string,
27
- createdAt: Date,
28
- };*/
29
- /*:: type Queue = Array<QueueObject>;*/
17
+
30
18
  const QUEUE_KEY = 'Parse/Eventually/Queue';
31
19
  let queueCache = [];
32
20
  let dirtyCache = true;
@@ -188,23 +188,20 @@ class LiveQueryClient extends _EventEmitter.default {
188
188
  * @returns {LiveQuerySubscription | undefined}
189
189
  */
190
190
  subscribe(query /*: Object*/, sessionToken /*: ?string*/) /*: LiveQuerySubscription*/{
191
- var _queryJSON$keys, _queryJSON$watch;
192
191
  if (!query) {
193
192
  return;
194
193
  }
195
194
  const className = query.className;
196
195
  const queryJSON = query.toJSON();
197
196
  const where = queryJSON.where;
198
- const fields = (_queryJSON$keys = queryJSON.keys) === null || _queryJSON$keys === void 0 ? void 0 : _queryJSON$keys.split(',');
199
- const watch = (_queryJSON$watch = queryJSON.watch) === null || _queryJSON$watch === void 0 ? void 0 : _queryJSON$watch.split(',');
197
+ const fields = queryJSON.keys ? queryJSON.keys.split(',') : undefined;
200
198
  const subscribeRequest = {
201
199
  op: OP_TYPES.SUBSCRIBE,
202
200
  requestId: this.requestId,
203
201
  query: {
204
202
  className,
205
203
  where,
206
- fields,
207
- watch
204
+ fields
208
205
  }
209
206
  };
210
207
  if (sessionToken) {
@@ -11,7 +11,7 @@ function _interopRequireDefault(obj) {
11
11
  /**
12
12
  * @flow
13
13
  */
14
- /*:: import type ParseObject from './ParseObject';*/
14
+
15
15
  /**
16
16
  * Provides a local datastore which can be used to store and retrieve <code>Parse.Object</code>. <br />
17
17
  * To enable this functionality, call <code>Parse.enableLocalDatastore()</code>.
@@ -26,17 +26,7 @@ function _interopRequireDefault(obj) {
26
26
  /**
27
27
  * @flow
28
28
  */
29
- /*:: import type { Op } from './ParseOp';*/
30
- /*:: export type AttributeMap = { [attr: string]: any };*/
31
- /*:: export type OpsMap = { [attr: string]: Op };*/
32
- /*:: export type ObjectCache = { [attr: string]: string };*/
33
- /*:: export type State = {
34
- serverData: AttributeMap,
35
- pendingOps: Array<OpsMap>,
36
- objectCache: ObjectCache,
37
- tasks: TaskQueue,
38
- existed: boolean,
39
- };*/
29
+
40
30
  function defaultState() /*: State*/{
41
31
  return {
42
32
  serverData: {},
@@ -14,8 +14,7 @@ function _interopRequireDefault(obj) {
14
14
  /**
15
15
  * @flow
16
16
  */
17
- /*:: type PermissionsMap = { [permission: string]: boolean };*/
18
- /*:: type ByIdMap = { [userId: string]: PermissionsMap };*/
17
+
19
18
  const PUBLIC_KEY = '*';
20
19
 
21
20
  /**
@@ -14,9 +14,7 @@ function _interopRequireDefault(obj) {
14
14
  /**
15
15
  * @flow
16
16
  */
17
- /*:: type Entity = Entity;*/
18
- /*:: type UsersMap = { [userId: string]: boolean | any };*/
19
- /*:: export type PermissionsMap = { [permission: string]: UsersMap };*/
17
+
20
18
  const PUBLIC_KEY = '*';
21
19
  const VALID_PERMISSIONS /*: Map<string, UsersMap>*/ = new Map(
22
20
  /*:: <string, UsersMap>*/
@@ -18,13 +18,14 @@ function _interopRequireDefault(obj) {
18
18
  /**
19
19
  * @flow
20
20
  */
21
- /*:: import type { RequestOptions } from './RESTController';*/
21
+
22
22
  /**
23
23
  * Parse.Config is a local representation of configuration data that
24
24
  * can be set from the Parse dashboard.
25
25
  *
26
26
  * @alias Parse.Config
27
27
  */
28
+
28
29
  class ParseConfig {
29
30
  /*:: attributes: { [key: string]: any };*/
30
31
  /*:: _escapedAttributes: { [key: string]: any };*/
@@ -14,7 +14,7 @@ function _interopRequireDefault(obj) {
14
14
  * @flow
15
15
  */
16
16
  /* global XMLHttpRequest, Blob */
17
- /*:: import type { FullOptions } from './RESTController';*/
17
+
18
18
  const ParseError = require('./ParseError').default;
19
19
  let XHR = null;
20
20
  if (typeof XMLHttpRequest !== 'undefined') {
@@ -289,7 +289,6 @@ class ParseFile {
289
289
  */
290
290
  cancel() {
291
291
  if (this._requestTask && typeof this._requestTask.abort === 'function') {
292
- this._requestTask._aborted = true;
293
292
  this._requestTask.abort();
294
293
  }
295
294
  this._requestTask = null;
@@ -13,7 +13,7 @@ function _interopRequireDefault(obj) {
13
13
  /**
14
14
  * @flow
15
15
  */
16
- /*:: import type { AttributeMap } from './ObjectStateMutations';*/
16
+
17
17
  class Installation extends _ParseObject.default {
18
18
  constructor(attributes /*: ?AttributeMap*/) {
19
19
  super('_Installation');
@@ -70,8 +70,7 @@ function _interopRequireDefault(obj) {
70
70
  /**
71
71
  * @flow
72
72
  */
73
- /*:: import type { AttributeMap, OpsMap } from './ObjectStateMutations';*/
74
- /*:: import type { RequestOptions, FullOptions } from './RESTController';*/
73
+
75
74
  const uuidv4 = require('./uuid');
76
75
  /*:: export type Pointer = {
77
76
  __type: string,
@@ -20,29 +20,7 @@ function _interopRequireDefault(obj) {
20
20
  /*
21
21
  * @flow
22
22
  */
23
- /*:: import type LiveQuerySubscription from './LiveQuerySubscription';*/
24
- /*:: import type { RequestOptions, FullOptions } from './RESTController';*/
25
- /*:: type BatchOptions = FullOptions & { batchSize?: number };*/
26
- /*:: export type WhereClause = {
27
- [attr: string]: mixed,
28
- };*/
29
- /*:: export type QueryJSON = {
30
- where: WhereClause,
31
- watch?: string,
32
- include?: string,
33
- excludeKeys?: string,
34
- keys?: string,
35
- limit?: number,
36
- skip?: number,
37
- order?: string,
38
- className?: string,
39
- count?: number,
40
- hint?: mixed,
41
- explain?: boolean,
42
- readPreference?: string,
43
- includeReadPreference?: string,
44
- subqueryReadPreference?: string,
45
- };*/
23
+
46
24
  /**
47
25
  * Converts a string into a regex that matches it.
48
26
  * Surrounding with \Q .. \E does this, we just need to escape any \E's in
@@ -222,7 +200,6 @@ class ParseQuery {
222
200
  */
223
201
  /*:: className: string;*/
224
202
  /*:: _where: any;*/
225
- /*:: _watch: Array<string>;*/
226
203
  /*:: _include: Array<string>;*/
227
204
  /*:: _exclude: Array<string>;*/
228
205
  /*:: _select: Array<string>;*/
@@ -262,7 +239,6 @@ class ParseQuery {
262
239
  throw new TypeError('A ParseQuery must be constructed with a ParseObject or class name.');
263
240
  }
264
241
  this._where = {};
265
- this._watch = [];
266
242
  this._include = [];
267
243
  this._exclude = [];
268
244
  this._count = false;
@@ -415,9 +391,6 @@ class ParseQuery {
415
391
  const params /*: QueryJSON*/ = {
416
392
  where: this._where
417
393
  };
418
- if (this._watch.length) {
419
- params.watch = this._watch.join(',');
420
- }
421
394
  if (this._include.length) {
422
395
  params.include = this._include.join(',');
423
396
  }
@@ -485,9 +458,6 @@ class ParseQuery {
485
458
  if (json.where) {
486
459
  this._where = json.where;
487
460
  }
488
- if (json.watch) {
489
- this._watch = json.watch.split(',');
490
- }
491
461
  if (json.include) {
492
462
  this._include = json.include.split(',');
493
463
  }
@@ -1825,25 +1795,6 @@ class ParseQuery {
1825
1795
  return this;
1826
1796
  }
1827
1797
 
1828
- /**
1829
- * Restricts live query to trigger only for watched fields.
1830
- *
1831
- * Requires Parse Server 6.0.0+
1832
- *
1833
- * @param {...string|Array<string>} keys The name(s) of the key(s) to watch.
1834
- * @returns {Parse.Query} Returns the query, so you can chain this call.
1835
- */
1836
- watch(...keys /*: Array<string | Array<string>>*/) /*: ParseQuery*/{
1837
- keys.forEach(key => {
1838
- if (Array.isArray(key)) {
1839
- this._watch = this._watch.concat(key);
1840
- } else {
1841
- this._watch.push(key);
1842
- }
1843
- });
1844
- return this;
1845
- }
1846
-
1847
1798
  /**
1848
1799
  * Changes the read preference that the backend will use when performing the query to the database.
1849
1800
  *
@@ -15,8 +15,7 @@ function _interopRequireDefault(obj) {
15
15
  /**
16
16
  * @flow
17
17
  */
18
- /*:: import type { AttributeMap } from './ObjectStateMutations';*/
19
- /*:: import type ParseRelation from './ParseRelation';*/
18
+
20
19
  /**
21
20
  * Represents a Role on the Parse server. Roles represent groupings of
22
21
  * Users for the purposes of granting permissions (e.g. specifying an ACL
@@ -15,7 +15,7 @@ function _interopRequireDefault(obj) {
15
15
  /**
16
16
  * @flow
17
17
  */
18
- /*:: import type { PermissionsMap } from './ParseCLP';*/
18
+
19
19
  const FIELD_TYPES = ['String', 'Number', 'Boolean', 'Date', 'File', 'GeoPoint', 'Polygon', 'Array', 'Object', 'Pointer', 'Relation'];
20
20
  /*:: type FieldOptions = {
21
21
  required: boolean,
@@ -16,8 +16,7 @@ function _interopRequireDefault(obj) {
16
16
  /**
17
17
  * @flow
18
18
  */
19
- /*:: import type { AttributeMap } from './ObjectStateMutations';*/
20
- /*:: import type { RequestOptions, FullOptions } from './RESTController';*/
19
+
21
20
  /**
22
21
  * <p>A Parse.Session object is a local representation of a revocable session.
23
22
  * This class is a subclass of a Parse.Object, and retains the same
@@ -18,9 +18,7 @@ function _interopRequireDefault(obj) {
18
18
  /**
19
19
  * @flow
20
20
  */
21
- /*:: import type { AttributeMap } from './ObjectStateMutations';*/
22
- /*:: import type { RequestOptions, FullOptions } from './RESTController';*/
23
- /*:: export type AuthData = ?{ [key: string]: mixed };*/
21
+
24
22
  const CURRENT_USER_KEY = 'currentUser';
25
23
  let canUseCurrentUser = !_CoreManager.default.get('IS_NODE');
26
24
  let currentUserCacheMatchesDisk = false;
@@ -638,25 +636,6 @@ class ParseUser extends _ParseObject.default {
638
636
  return user.logIn(options);
639
637
  }
640
638
 
641
- /**
642
- * Logs in a user with an objectId. On success, this saves the session
643
- * to disk, so you can retrieve the currently logged in user using
644
- * <code>current</code>.
645
- *
646
- * @param {string} userId The objectId for the user.
647
- * @static
648
- * @returns {Promise} A promise that is fulfilled with the user when
649
- * the login completes.
650
- */
651
- static loginAs(userId /*: string*/) {
652
- if (!userId) {
653
- throw new _ParseError.default(_ParseError.default.USERNAME_MISSING, 'Cannot log in as user with an empty user id');
654
- }
655
- const controller = _CoreManager.default.getUserController();
656
- const user = new this();
657
- return controller.loginAs(user, userId);
658
- }
659
-
660
639
  /**
661
640
  * Logs in a user with a session token. On success, this saves the session
662
641
  * to disk, so you can retrieve the currently logged in user using
@@ -1065,21 +1044,6 @@ const DefaultController = {
1065
1044
  return DefaultController.setCurrentUser(user);
1066
1045
  });
1067
1046
  },
1068
- loginAs(user /*: ParseUser*/, userId /*: string*/) /*: Promise<ParseUser>*/{
1069
- const RESTController = _CoreManager.default.getRESTController();
1070
- return RESTController.request('POST', 'loginAs', {
1071
- userId
1072
- }, {
1073
- useMasterKey: true
1074
- }).then(response => {
1075
- user._finishFetch(response);
1076
- user._setExisted(true);
1077
- if (!canUseCurrentUser) {
1078
- return Promise.resolve(user);
1079
- }
1080
- return DefaultController.setCurrentUser(user);
1081
- });
1082
- },
1083
1047
  become(user /*: ParseUser*/, options /*: RequestOptions*/) /*: Promise<ParseUser>*/{
1084
1048
  const RESTController = _CoreManager.default.getRESTController();
1085
1049
  return RESTController.request('GET', 'users/me', {}, options).then(response => {
package/lib/node/Push.js CHANGED
@@ -15,14 +15,7 @@ function _interopRequireDefault(obj) {
15
15
  /**
16
16
  * @flow
17
17
  */
18
- /*:: import type { WhereClause } from './ParseQuery';*/
19
- /*:: import type { FullOptions } from './RESTController';*/
20
- /*:: export type PushData = {
21
- where?: WhereClause | ParseQuery,
22
- push_time?: Date | string,
23
- expiration_time?: Date | string,
24
- expiration_interval?: number,
25
- };*/
18
+
26
19
  /**
27
20
  * Contains functions to deal with Push in Parse.
28
21
  *
@@ -30,6 +23,7 @@ function _interopRequireDefault(obj) {
30
23
  * @static
31
24
  * @hideconstructor
32
25
  */
26
+
33
27
  /**
34
28
  * Sends a push notification.
35
29
  * **Available in Cloud Code only.**
@@ -13,26 +13,6 @@ function _interopRequireDefault(obj) {
13
13
  */
14
14
  /* global XMLHttpRequest, XDomainRequest */
15
15
  const uuidv4 = require('./uuid');
16
- /*:: export type RequestOptions = {
17
- useMasterKey?: boolean,
18
- sessionToken?: string,
19
- installationId?: string,
20
- returnStatus?: boolean,
21
- batchSize?: number,
22
- include?: any,
23
- progress?: any,
24
- context?: any,
25
- usePost?: boolean,
26
- };*/
27
- /*:: export type FullOptions = {
28
- success?: any,
29
- error?: any,
30
- useMasterKey?: boolean,
31
- sessionToken?: string,
32
- installationId?: string,
33
- progress?: any,
34
- usePost?: boolean,
35
- };*/
36
16
  let XHR = null;
37
17
  if (typeof XMLHttpRequest !== 'undefined') {
38
18
  XHR = XMLHttpRequest;
@@ -63,12 +63,7 @@ function _interopRequireWildcard(obj, nodeInterop) {
63
63
  /**
64
64
  * @flow
65
65
  */
66
- /*:: import type { Op } from './ParseOp';*/
67
- /*:: import type { AttributeMap, ObjectCache, OpsMap, State } from './ObjectStateMutations';*/
68
- /*:: type ObjectIdentifier = {
69
- className: string,
70
- id: string,
71
- };*/
66
+
72
67
  let objectState
73
68
  /*: {
74
69
  [className: string]: {
@@ -4,10 +4,7 @@ var _promiseUtils = require("./promiseUtils");
4
4
  /**
5
5
  * @flow
6
6
  */
7
- /*:: type Task = {
8
- task: () => Promise,
9
- _completion: Promise,
10
- };*/
7
+
11
8
  class TaskQueue {
12
9
  /*:: queue: Array<Task>;*/
13
10
  constructor() {
@@ -69,9 +69,7 @@ function _interopRequireWildcard(obj, nodeInterop) {
69
69
  /**
70
70
  * @flow
71
71
  */
72
- /*:: import type { Op } from './ParseOp';*/
73
- /*:: import type ParseObject from './ParseObject';*/
74
- /*:: import type { AttributeMap, ObjectCache, OpsMap, State } from './ObjectStateMutations';*/
72
+
75
73
  let objectState = new WeakMap();
76
74
  function getState(obj /*: ParseObject*/) /*: ?State*/{
77
75
  const classData = objectState.get(obj);
@@ -15,10 +15,7 @@ function _interopRequireDefault(obj) {
15
15
  /**
16
16
  * @flow
17
17
  */
18
- /*:: type EncounterMap = {
19
- objects: { [identifier: string]: ParseObject | boolean },
20
- files: Array<ParseFile>,
21
- };*/
18
+
22
19
  /**
23
20
  * Return an array of unsaved children, which are either Parse Objects or Files.
24
21
  * If it encounters any dirty Objects without Ids, it will throw an exception.
@@ -8,7 +8,7 @@ var config = {
8
8
  SERVER_AUTH_TOKEN: null,
9
9
  LIVEQUERY_SERVER_URL: null,
10
10
  ENCRYPTED_KEY: null,
11
- VERSION: 'js' + "4.1.0-alpha.4",
11
+ VERSION: 'js' + "4.1.0",
12
12
  APPLICATION_ID: null,
13
13
  JAVASCRIPT_KEY: null,
14
14
  MASTER_KEY: null,
@@ -123,25 +123,21 @@ var LiveQueryClient = function (_EventEmitter) {
123
123
  }, {
124
124
  key: "subscribe",
125
125
  value: function (query, sessionToken) {
126
- var _queryJSON$keys,
127
- _queryJSON$watch,
128
- _this2 = this;
126
+ var _this2 = this;
129
127
  if (!query) {
130
128
  return;
131
129
  }
132
130
  var className = query.className;
133
131
  var queryJSON = query.toJSON();
134
132
  var where = queryJSON.where;
135
- var fields = (_queryJSON$keys = queryJSON.keys) == null ? void 0 : _queryJSON$keys.split(',');
136
- var watch = (_queryJSON$watch = queryJSON.watch) == null ? void 0 : _queryJSON$watch.split(',');
133
+ var fields = queryJSON.keys ? queryJSON.keys.split(',') : undefined;
137
134
  var subscribeRequest = {
138
135
  op: OP_TYPES.SUBSCRIBE,
139
136
  requestId: this.requestId,
140
137
  query: {
141
138
  className: className,
142
139
  where: where,
143
- fields: fields,
144
- watch: watch
140
+ fields: fields
145
141
  }
146
142
  };
147
143
  if (sessionToken) {
@@ -24,7 +24,7 @@ var ParseCLP = function () {
24
24
  var _this = this;
25
25
  (0, _classCallCheck2.default)(this, ParseCLP);
26
26
  this.permissionsMap = {};
27
- var _loop = function _loop(operation) {
27
+ var _loop = function _loop(operation, group) {
28
28
  _this.permissionsMap[operation] = Object.assign({}, group);
29
29
  var action = operation.charAt(0).toUpperCase() + operation.slice(1);
30
30
  _this[`get${action}RequiresAuthentication`] = function () {
@@ -62,7 +62,7 @@ var ParseCLP = function () {
62
62
  var _ref2 = (0, _slicedToArray2.default)(_ref, 2);
63
63
  var operation = _ref2[0];
64
64
  var group = _ref2[1];
65
- _loop(operation);
65
+ _loop(operation, group);
66
66
  }
67
67
  for (var _ref3 of VALID_PERMISSIONS_EXTENDED.entries()) {
68
68
  var _ref4 = (0, _slicedToArray2.default)(_ref3, 2);
@@ -181,7 +181,6 @@ var ParseFile = function () {
181
181
  key: "cancel",
182
182
  value: function () {
183
183
  if (this._requestTask && typeof this._requestTask.abort === 'function') {
184
- this._requestTask._aborted = true;
185
184
  this._requestTask.abort();
186
185
  }
187
186
  this._requestTask = null;