parse 6.0.0-alpha.1 → 6.0.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.
- package/README.md +0 -1
- package/dist/parse.js +19 -30
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +19 -30
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/CoreManager.js +1 -1
- package/lib/browser/Parse.js +10 -21
- package/lib/browser/ParseHooks.js +7 -7
- package/lib/node/CoreManager.js +1 -1
- package/lib/node/Parse.js +10 -19
- package/lib/node/ParseHooks.js +7 -7
- package/lib/react-native/CoreManager.js +1 -1
- package/lib/react-native/Parse.js +3 -5
- package/lib/react-native/ParseHooks.js +7 -7
- package/lib/weapp/CoreManager.js +1 -1
- package/lib/weapp/Parse.js +10 -21
- package/lib/weapp/ParseHooks.js +7 -7
- package/package.json +12 -13
package/dist/parse.weapp.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Parse JavaScript SDK v6.0.0
|
|
2
|
+
* Parse JavaScript SDK v6.0.0
|
|
3
3
|
*
|
|
4
4
|
* The source tree of this library can be found at
|
|
5
5
|
* https://github.com/ParsePlatform/Parse-SDK-JS
|
|
@@ -354,7 +354,7 @@ const config = {
|
|
|
354
354
|
SERVER_AUTH_TOKEN: null,
|
|
355
355
|
LIVEQUERY_SERVER_URL: null,
|
|
356
356
|
ENCRYPTED_KEY: null,
|
|
357
|
-
VERSION: 'js' + "6.0.0
|
|
357
|
+
VERSION: 'js' + "6.0.0",
|
|
358
358
|
APPLICATION_ID: null,
|
|
359
359
|
JAVASCRIPT_KEY: null,
|
|
360
360
|
MASTER_KEY: null,
|
|
@@ -3322,8 +3322,8 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
3322
3322
|
});
|
|
3323
3323
|
exports.default = void 0;
|
|
3324
3324
|
var _promise = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/promise"));
|
|
3325
|
-
var
|
|
3326
|
-
var
|
|
3325
|
+
var _decode = _interopRequireDefault(_dereq_("./decode"));
|
|
3326
|
+
var _encode = _interopRequireDefault(_dereq_("./encode"));
|
|
3327
3327
|
var _CryptoController = _interopRequireDefault(_dereq_("./CryptoController"));
|
|
3328
3328
|
var _EventuallyQueue = _interopRequireDefault(_dereq_("./EventuallyQueue"));
|
|
3329
3329
|
var _IndexedDBStorageController = _interopRequireDefault(_dereq_("./IndexedDBStorageController"));
|
|
@@ -3384,20 +3384,11 @@ function _interopRequireWildcard(e, r) {
|
|
|
3384
3384
|
}
|
|
3385
3385
|
return n.default = e, t && t.set(e, n), n;
|
|
3386
3386
|
}
|
|
3387
|
-
/**
|
|
3388
|
-
* Contains all Parse API classes and functions.
|
|
3389
|
-
*
|
|
3390
|
-
* @static
|
|
3391
|
-
* @global
|
|
3392
|
-
* @class
|
|
3393
|
-
* @hideconstructor
|
|
3394
|
-
*/
|
|
3395
|
-
|
|
3396
3387
|
const Parse = {
|
|
3397
3388
|
ACL: _ParseACL.default,
|
|
3398
|
-
Analytics
|
|
3389
|
+
Analytics,
|
|
3399
3390
|
AnonymousUtils: _AnonymousUtils.default,
|
|
3400
|
-
Cloud
|
|
3391
|
+
Cloud,
|
|
3401
3392
|
CLP: _ParseCLP.default,
|
|
3402
3393
|
CoreManager: _CoreManager.default,
|
|
3403
3394
|
Config: _ParseConfig.default,
|
|
@@ -3418,7 +3409,7 @@ const Parse = {
|
|
|
3418
3409
|
AddUnique: ParseOp.AddUniqueOp,
|
|
3419
3410
|
Relation: ParseOp.RelationOp
|
|
3420
3411
|
},
|
|
3421
|
-
Push
|
|
3412
|
+
Push,
|
|
3422
3413
|
Query: _ParseQuery.default,
|
|
3423
3414
|
Relation: _ParseRelation.default,
|
|
3424
3415
|
Role: _ParseRole.default,
|
|
@@ -3629,10 +3620,10 @@ const Parse = {
|
|
|
3629
3620
|
},
|
|
3630
3621
|
// We attempt to match the signatures of the legacy versions of these methods
|
|
3631
3622
|
_decode(_, value) {
|
|
3632
|
-
return (0,
|
|
3623
|
+
return (0, _decode.default)(value);
|
|
3633
3624
|
},
|
|
3634
3625
|
_encode(value, _, disallowObjects) {
|
|
3635
|
-
return (0,
|
|
3626
|
+
return (0, _encode.default)(value, disallowObjects);
|
|
3636
3627
|
},
|
|
3637
3628
|
_getInstallationId() {
|
|
3638
3629
|
return _CoreManager.default.getInstallationController().currentInstallationId();
|
|
@@ -3645,17 +3636,15 @@ const Parse = {
|
|
|
3645
3636
|
* @param [ms] Milliseconds to ping the server. Default 2000ms
|
|
3646
3637
|
* @static
|
|
3647
3638
|
*/
|
|
3648
|
-
enableLocalDatastore() {
|
|
3649
|
-
let polling = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
3650
|
-
let ms = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;
|
|
3639
|
+
enableLocalDatastore(polling, ms) {
|
|
3651
3640
|
if (!this.applicationId) {
|
|
3652
3641
|
console.log("'enableLocalDataStore' must be called after 'initialize'");
|
|
3653
3642
|
return;
|
|
3654
3643
|
}
|
|
3655
3644
|
if (!this.LocalDatastore.isEnabled) {
|
|
3656
3645
|
this.LocalDatastore.isEnabled = true;
|
|
3657
|
-
if (polling) {
|
|
3658
|
-
_CoreManager.default.getEventuallyQueue().poll(ms);
|
|
3646
|
+
if (polling || typeof polling === 'undefined') {
|
|
3647
|
+
_CoreManager.default.getEventuallyQueue().poll(ms || 2000);
|
|
3659
3648
|
}
|
|
3660
3649
|
}
|
|
3661
3650
|
},
|
|
@@ -6120,7 +6109,7 @@ function remove(hook) {
|
|
|
6120
6109
|
}
|
|
6121
6110
|
const DefaultController = {
|
|
6122
6111
|
get(type, functionName, triggerName) {
|
|
6123
|
-
let url = '
|
|
6112
|
+
let url = 'hooks/' + type;
|
|
6124
6113
|
if (functionName) {
|
|
6125
6114
|
url += '/' + functionName;
|
|
6126
6115
|
if (triggerName) {
|
|
@@ -6132,9 +6121,9 @@ const DefaultController = {
|
|
|
6132
6121
|
create(hook) {
|
|
6133
6122
|
let url;
|
|
6134
6123
|
if (hook.functionName && hook.url) {
|
|
6135
|
-
url = '
|
|
6124
|
+
url = 'hooks/functions';
|
|
6136
6125
|
} else if (hook.className && hook.triggerName && hook.url) {
|
|
6137
|
-
url = '
|
|
6126
|
+
url = 'hooks/triggers';
|
|
6138
6127
|
} else {
|
|
6139
6128
|
return _promise.default.reject({
|
|
6140
6129
|
error: 'invalid hook declaration',
|
|
@@ -6146,10 +6135,10 @@ const DefaultController = {
|
|
|
6146
6135
|
remove(hook) {
|
|
6147
6136
|
let url;
|
|
6148
6137
|
if (hook.functionName) {
|
|
6149
|
-
url = '
|
|
6138
|
+
url = 'hooks/functions/' + hook.functionName;
|
|
6150
6139
|
delete hook.functionName;
|
|
6151
6140
|
} else if (hook.className && hook.triggerName) {
|
|
6152
|
-
url = '
|
|
6141
|
+
url = 'hooks/triggers/' + hook.className + '/' + hook.triggerName;
|
|
6153
6142
|
delete hook.className;
|
|
6154
6143
|
delete hook.triggerName;
|
|
6155
6144
|
} else {
|
|
@@ -6165,10 +6154,10 @@ const DefaultController = {
|
|
|
6165
6154
|
update(hook) {
|
|
6166
6155
|
let url;
|
|
6167
6156
|
if (hook.functionName && hook.url) {
|
|
6168
|
-
url = '
|
|
6157
|
+
url = 'hooks/functions/' + hook.functionName;
|
|
6169
6158
|
delete hook.functionName;
|
|
6170
6159
|
} else if (hook.className && hook.triggerName && hook.url) {
|
|
6171
|
-
url = '
|
|
6160
|
+
url = 'hooks/triggers/' + hook.className + '/' + hook.triggerName;
|
|
6172
6161
|
delete hook.className;
|
|
6173
6162
|
delete hook.triggerName;
|
|
6174
6163
|
} else {
|