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
@@ -49,12 +49,7 @@ function _isNativeReflectConstruct() {
49
49
  } catch (e) {
50
50
  return false;
51
51
  }
52
- } /**
53
- * @flow
54
- */
55
- /*:: import type { AttributeMap } from './ObjectStateMutations';*/
56
- /*:: import type { RequestOptions, FullOptions } from './RESTController';*/
57
- /*:: export type AuthData = ?{ [key: string]: mixed };*/
52
+ }
58
53
  var CURRENT_USER_KEY = 'currentUser';
59
54
  var canUseCurrentUser = !_CoreManager.default.get('IS_NODE');
60
55
  var currentUserCacheMatchesDisk = false;
@@ -880,27 +875,6 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
880
875
  return user.logIn(options);
881
876
  }
882
877
 
883
- /**
884
- * Logs in a user with an objectId. On success, this saves the session
885
- * to disk, so you can retrieve the currently logged in user using
886
- * <code>current</code>.
887
- *
888
- * @param {string} userId The objectId for the user.
889
- * @static
890
- * @returns {Promise} A promise that is fulfilled with the user when
891
- * the login completes.
892
- */
893
- }, {
894
- key: "loginAs",
895
- value: function (userId /*: string*/) {
896
- if (!userId) {
897
- throw new _ParseError.default(_ParseError.default.USERNAME_MISSING, 'Cannot log in as user with an empty user id');
898
- }
899
- var controller = _CoreManager.default.getUserController();
900
- var user = new this();
901
- return controller.loginAs(user, userId);
902
- }
903
-
904
878
  /**
905
879
  * Logs in a user with a session token. On success, this saves the session
906
880
  * to disk, so you can retrieve the currently logged in user using
@@ -1345,21 +1319,6 @@ var DefaultController = {
1345
1319
  return DefaultController.setCurrentUser(user);
1346
1320
  });
1347
1321
  },
1348
- loginAs: function (user /*: ParseUser*/, userId /*: string*/) /*: Promise<ParseUser>*/{
1349
- var RESTController = _CoreManager.default.getRESTController();
1350
- return RESTController.request('POST', 'loginAs', {
1351
- userId: userId
1352
- }, {
1353
- useMasterKey: true
1354
- }).then(function (response) {
1355
- user._finishFetch(response);
1356
- user._setExisted(true);
1357
- if (!canUseCurrentUser) {
1358
- return _promise.default.resolve(user);
1359
- }
1360
- return DefaultController.setCurrentUser(user);
1361
- });
1362
- },
1363
1322
  become: function (user /*: ParseUser*/, options /*: RequestOptions*/) /*: Promise<ParseUser>*/{
1364
1323
  var RESTController = _CoreManager.default.getRESTController();
1365
1324
  return RESTController.request('GET', 'users/me', {}, options).then(function (response) {
package/lib/weapp/Push.js CHANGED
@@ -13,14 +13,7 @@ var _ParseQuery = _interopRequireDefault(require("./ParseQuery"));
13
13
  /**
14
14
  * @flow
15
15
  */
16
- /*:: import type { WhereClause } from './ParseQuery';*/
17
- /*:: import type { FullOptions } from './RESTController';*/
18
- /*:: export type PushData = {
19
- where?: WhereClause | ParseQuery,
20
- push_time?: Date | string,
21
- expiration_time?: Date | string,
22
- expiration_interval?: number,
23
- };*/
16
+
24
17
  /**
25
18
  * Contains functions to deal with Push in Parse.
26
19
  *
@@ -28,6 +21,7 @@ var _ParseQuery = _interopRequireDefault(require("./ParseQuery"));
28
21
  * @static
29
22
  * @hideconstructor
30
23
  */
24
+
31
25
  /**
32
26
  * Sends a push notification.
33
27
  * **Available in Cloud Code only.**
@@ -45,26 +45,6 @@ function _objectSpread(target) {
45
45
  */
46
46
  /* global XMLHttpRequest, XDomainRequest */
47
47
  var uuidv4 = require('./uuid');
48
- /*:: export type RequestOptions = {
49
- useMasterKey?: boolean,
50
- sessionToken?: string,
51
- installationId?: string,
52
- returnStatus?: boolean,
53
- batchSize?: number,
54
- include?: any,
55
- progress?: any,
56
- context?: any,
57
- usePost?: boolean,
58
- };*/
59
- /*:: export type FullOptions = {
60
- success?: any,
61
- error?: any,
62
- useMasterKey?: boolean,
63
- sessionToken?: string,
64
- installationId?: string,
65
- progress?: any,
66
- usePost?: boolean,
67
- };*/
68
48
  var XHR = null;
69
49
  if (typeof XMLHttpRequest !== 'undefined') {
70
50
  XHR = XMLHttpRequest;
@@ -66,12 +66,7 @@ function _interopRequireWildcard(obj, nodeInterop) {
66
66
  /**
67
67
  * @flow
68
68
  */
69
- /*:: import type { Op } from './ParseOp';*/
70
- /*:: import type { AttributeMap, ObjectCache, OpsMap, State } from './ObjectStateMutations';*/
71
- /*:: type ObjectIdentifier = {
72
- className: string,
73
- id: string,
74
- };*/
69
+
75
70
  var objectState
76
71
  /*: {
77
72
  [className: string]: {
@@ -8,10 +8,6 @@ var _promiseUtils = require("./promiseUtils");
8
8
  /**
9
9
  * @flow
10
10
  */
11
- /*:: type Task = {
12
- task: () => Promise,
13
- _completion: Promise,
14
- };*/
15
11
  var TaskQueue = /*#__PURE__*/function () {
16
12
  function TaskQueue() {
17
13
  (0, _classCallCheck2.default)(this, TaskQueue);
@@ -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
  var objectState = new _weakMap.default();
76
74
  function getState(obj /*: ParseObject*/) /*: ?State*/{
77
75
  var classData = objectState.get(obj);
@@ -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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "parse",
3
- "version": "4.1.0-alpha.4",
3
+ "version": "4.1.0",
4
4
  "description": "Parse JavaScript SDK",
5
5
  "homepage": "https://parseplatform.org",
6
6
  "keywords": [
@@ -33,37 +33,37 @@
33
33
  "idb-keyval": "6.2.0",
34
34
  "react-native-crypto-js": "1.0.0",
35
35
  "uuid": "9.0.0",
36
- "ws": "8.13.0",
36
+ "ws": "8.12.0",
37
37
  "xmlhttprequest": "1.8.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@babel/core": "7.21.4",
41
- "@babel/eslint-parser": "7.21.3",
40
+ "@babel/core": "7.21.0",
41
+ "@babel/eslint-parser": "7.19.1",
42
42
  "@babel/plugin-proposal-class-properties": "7.18.6",
43
43
  "@babel/plugin-transform-flow-comments": "7.21.0",
44
44
  "@babel/plugin-transform-flow-strip-types": "7.21.0",
45
- "@babel/plugin-transform-runtime": "7.21.4",
46
- "@babel/preset-env": "7.21.4",
45
+ "@babel/plugin-transform-runtime": "7.21.0",
46
+ "@babel/preset-env": "7.20.2",
47
47
  "@babel/preset-react": "7.18.6",
48
48
  "@parse/minami": "1.0.0",
49
49
  "@saithodev/semantic-release-backmerge": "2.1.3",
50
- "@semantic-release/changelog": "6.0.3",
50
+ "@semantic-release/changelog": "6.0.2",
51
51
  "@semantic-release/commit-analyzer": "9.0.2",
52
52
  "@semantic-release/git": "10.0.1",
53
53
  "@semantic-release/github": "8.0.7",
54
54
  "@semantic-release/npm": "9.0.2",
55
55
  "@semantic-release/release-notes-generator": "10.0.3",
56
- "babel-jest": "29.5.0",
56
+ "babel-jest": "29.4.3",
57
57
  "babel-plugin-inline-package-json": "2.0.0",
58
58
  "babel-plugin-minify-dead-code-elimination": "0.5.2",
59
59
  "babel-plugin-transform-inline-environment-variables": "0.4.4",
60
60
  "browserify": "17.0.0",
61
61
  "codecov": "3.8.3",
62
- "core-js": "3.30.1",
62
+ "core-js": "3.29.0",
63
63
  "cross-env": "7.0.2",
64
- "eslint": "8.39.0",
64
+ "eslint": "8.35.0",
65
65
  "eslint-plugin-flowtype": "8.0.3",
66
- "eslint-plugin-jsdoc": "43.0.7",
66
+ "eslint-plugin-jsdoc": "40.0.0",
67
67
  "express": "4.18.2",
68
68
  "gulp": "4.0.2",
69
69
  "gulp-babel": "8.0.0",
@@ -73,19 +73,19 @@
73
73
  "gulp-uglify": "3.0.2",
74
74
  "gulp-watch": "5.0.1",
75
75
  "husky": "8.0.3",
76
- "jasmine": "4.6.0",
76
+ "jasmine": "4.5.0",
77
77
  "jasmine-reporters": "2.5.2",
78
78
  "jasmine-spec-reporter": "7.0.0",
79
- "jest": "29.5.0",
80
- "jest-environment-jsdom": "29.5.0",
79
+ "jest": "29.4.3",
80
+ "jest-environment-jsdom": "29.4.3",
81
81
  "jsdoc": "4.0.2",
82
82
  "jsdoc-babel": "0.5.0",
83
- "lint-staged": "13.2.2",
84
- "metro-react-native-babel-preset": "0.76.3",
83
+ "lint-staged": "13.1.2",
84
+ "metro-react-native-babel-preset": "0.75.1",
85
85
  "mongodb-runner": "4.10.0",
86
86
  "parse-server": "git+https://github.com/parse-community/parse-server#alpha",
87
- "prettier": "2.8.8",
88
- "puppeteer": "19.11.1",
87
+ "prettier": "2.8.4",
88
+ "puppeteer": "19.7.2",
89
89
  "regenerator-runtime": "0.13.11",
90
90
  "semantic-release": "19.0.5",
91
91
  "vinyl-source-stream": "2.0.0"