parse 6.1.0-alpha.1 → 6.1.0-alpha.3
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 -8
- package/dist/parse.js +93 -105
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +93 -105
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/Cloud.js +1 -0
- package/lib/browser/CoreManager.js +2 -2
- package/lib/browser/CryptoController.js +0 -1
- package/lib/browser/EventEmitter.js +0 -1
- package/lib/browser/EventuallyQueue.js +6 -10
- package/lib/browser/IndexedDBStorageController.js +0 -1
- package/lib/browser/InstallationController.js +0 -1
- package/lib/browser/LiveQuerySubscription.js +4 -4
- package/lib/browser/LocalDatastore.js +0 -1
- package/lib/browser/LocalDatastoreController.default.js +0 -1
- package/lib/browser/LocalDatastoreController.js +0 -1
- package/lib/browser/LocalDatastoreController.react-native.js +0 -1
- package/lib/browser/OfflineQuery.js +0 -1
- package/lib/browser/Parse.js +12 -1
- package/lib/browser/ParseACL.js +1 -1
- package/lib/browser/ParseConfig.js +2 -4
- package/lib/browser/ParseInstallation.js +0 -1
- package/lib/browser/ParseLiveQuery.js +2 -2
- package/lib/browser/ParseObject.js +10 -10
- package/lib/browser/ParseQuery.js +26 -25
- package/lib/browser/ParseRole.js +1 -1
- package/lib/browser/ParseSchema.js +6 -6
- package/lib/browser/ParseUser.js +10 -12
- package/lib/browser/RESTController.js +7 -3
- package/lib/browser/Socket.weapp.js +0 -1
- package/lib/browser/Storage.js +0 -1
- package/lib/browser/StorageController.browser.js +0 -1
- package/lib/browser/StorageController.default.js +0 -1
- package/lib/browser/StorageController.js +0 -1
- package/lib/browser/StorageController.react-native.js +0 -1
- package/lib/browser/StorageController.weapp.js +0 -1
- package/lib/browser/TaskQueue.js +0 -1
- package/lib/browser/WebSocketController.js +0 -1
- package/lib/browser/Xhr.weapp.js +0 -1
- package/lib/browser/uuid.js +0 -1
- package/lib/node/Cloud.js +1 -0
- package/lib/node/CoreManager.js +2 -2
- package/lib/node/CryptoController.js +0 -1
- package/lib/node/EventEmitter.js +0 -1
- package/lib/node/EventuallyQueue.js +6 -7
- package/lib/node/IndexedDBStorageController.js +0 -1
- package/lib/node/InstallationController.js +0 -1
- package/lib/node/LiveQuerySubscription.js +4 -4
- package/lib/node/LocalDatastore.js +0 -1
- package/lib/node/LocalDatastoreController.default.js +0 -1
- package/lib/node/LocalDatastoreController.js +0 -1
- package/lib/node/LocalDatastoreController.react-native.js +0 -1
- package/lib/node/OfflineQuery.js +0 -1
- package/lib/node/Parse.js +12 -1
- package/lib/node/ParseACL.js +1 -1
- package/lib/node/ParseConfig.js +2 -2
- package/lib/node/ParseInstallation.js +0 -1
- package/lib/node/ParseLiveQuery.js +2 -2
- package/lib/node/ParseObject.js +10 -7
- package/lib/node/ParseQuery.js +7 -7
- package/lib/node/ParseRole.js +1 -1
- package/lib/node/ParseSchema.js +6 -4
- package/lib/node/ParseUser.js +10 -10
- package/lib/node/RESTController.js +3 -1
- package/lib/node/Socket.weapp.js +0 -1
- package/lib/node/Storage.js +0 -1
- package/lib/node/StorageController.browser.js +0 -1
- package/lib/node/StorageController.default.js +0 -1
- package/lib/node/StorageController.js +0 -1
- package/lib/node/StorageController.react-native.js +0 -1
- package/lib/node/StorageController.weapp.js +0 -1
- package/lib/node/TaskQueue.js +0 -1
- package/lib/node/WebSocketController.js +0 -1
- package/lib/node/Xhr.weapp.js +0 -1
- package/lib/node/uuid.js +0 -1
- package/lib/react-native/CoreManager.js +2 -2
- package/lib/react-native/CryptoController.js +0 -1
- package/lib/react-native/EventEmitter.js +0 -1
- package/lib/react-native/EventuallyQueue.js +5 -9
- package/lib/react-native/IndexedDBStorageController.js +0 -1
- package/lib/react-native/InstallationController.js +0 -1
- package/lib/react-native/LiveQuerySubscription.js +7 -7
- package/lib/react-native/LocalDatastore.js +0 -1
- package/lib/react-native/LocalDatastoreController.default.js +0 -1
- package/lib/react-native/LocalDatastoreController.js +0 -1
- package/lib/react-native/LocalDatastoreController.react-native.js +0 -1
- package/lib/react-native/OfflineQuery.js +0 -1
- package/lib/react-native/Parse.js +8 -1
- package/lib/react-native/ParseConfig.js +2 -4
- package/lib/react-native/ParseInstallation.js +0 -1
- package/lib/react-native/ParseLiveQuery.js +2 -2
- package/lib/react-native/ParseObject.js +16 -18
- package/lib/react-native/ParseQuery.js +5 -6
- package/lib/react-native/ParseSchema.js +5 -6
- package/lib/react-native/ParseUser.js +3 -5
- package/lib/react-native/RESTController.js +3 -1
- package/lib/react-native/Socket.weapp.js +0 -1
- package/lib/react-native/Storage.js +0 -1
- package/lib/react-native/StorageController.browser.js +0 -1
- package/lib/react-native/StorageController.default.js +0 -1
- package/lib/react-native/StorageController.js +0 -1
- package/lib/react-native/StorageController.react-native.js +0 -1
- package/lib/react-native/StorageController.weapp.js +0 -1
- package/lib/react-native/TaskQueue.js +0 -1
- package/lib/react-native/WebSocketController.js +0 -1
- package/lib/react-native/Xhr.weapp.js +0 -1
- package/lib/react-native/uuid.js +0 -1
- package/lib/weapp/Cloud.js +1 -0
- package/lib/weapp/CoreManager.js +2 -2
- package/lib/weapp/CryptoController.js +0 -1
- package/lib/weapp/EventEmitter.js +0 -1
- package/lib/weapp/EventuallyQueue.js +6 -10
- package/lib/weapp/IndexedDBStorageController.js +0 -1
- package/lib/weapp/InstallationController.js +0 -1
- package/lib/weapp/LiveQuerySubscription.js +4 -4
- package/lib/weapp/LocalDatastore.js +0 -1
- package/lib/weapp/LocalDatastoreController.default.js +0 -1
- package/lib/weapp/LocalDatastoreController.js +0 -1
- package/lib/weapp/LocalDatastoreController.react-native.js +0 -1
- package/lib/weapp/OfflineQuery.js +0 -1
- package/lib/weapp/Parse.js +12 -1
- package/lib/weapp/ParseACL.js +1 -1
- package/lib/weapp/ParseConfig.js +2 -4
- package/lib/weapp/ParseInstallation.js +0 -1
- package/lib/weapp/ParseLiveQuery.js +2 -2
- package/lib/weapp/ParseObject.js +10 -10
- package/lib/weapp/ParseQuery.js +26 -25
- package/lib/weapp/ParseRole.js +1 -1
- package/lib/weapp/ParseSchema.js +6 -6
- package/lib/weapp/ParseUser.js +10 -12
- package/lib/weapp/RESTController.js +7 -3
- package/lib/weapp/Socket.weapp.js +0 -1
- package/lib/weapp/Storage.js +0 -1
- package/lib/weapp/StorageController.browser.js +0 -1
- package/lib/weapp/StorageController.default.js +0 -1
- package/lib/weapp/StorageController.js +0 -1
- package/lib/weapp/StorageController.react-native.js +0 -1
- package/lib/weapp/StorageController.weapp.js +0 -1
- package/lib/weapp/TaskQueue.js +0 -1
- package/lib/weapp/WebSocketController.js +0 -1
- package/lib/weapp/Xhr.weapp.js +0 -1
- package/lib/weapp/uuid.js +0 -1
- package/package.json +15 -12
- package/types/Analytics.d.ts +42 -0
- package/types/AnonymousUtils.d.ts +84 -0
- package/types/Cloud.d.ts +65 -0
- package/types/CloudCode.d.ts +307 -0
- package/types/CoreManager.d.ts +325 -0
- package/types/CryptoController.d.ts +5 -0
- package/types/EventEmitter.d.ts +5 -0
- package/types/EventuallyQueue.d.ts +168 -0
- package/types/FacebookUtils.d.ts +107 -0
- package/types/IndexedDBStorageController.d.ts +2 -0
- package/types/InstallationController.d.ts +10 -0
- package/types/LiveQueryClient.d.ts +128 -0
- package/types/LiveQuerySubscription.d.ts +103 -0
- package/types/LocalDatastore.d.ts +56 -0
- package/types/LocalDatastoreController.d.ts +2 -0
- package/types/LocalDatastoreController.default.d.ts +9 -0
- package/types/LocalDatastoreController.react-native.d.ts +9 -0
- package/types/LocalDatastoreUtils.d.ts +5 -0
- package/types/ObjectStateMutations.d.ts +28 -0
- package/types/OfflineQuery.d.ts +20 -0
- package/types/Parse.d.ts +633 -0
- package/types/ParseACL.d.ts +141 -0
- package/types/ParseCLP.d.ts +293 -0
- package/types/ParseConfig.d.ts +77 -0
- package/types/ParseError.d.ts +476 -0
- package/types/ParseFile.d.ts +192 -0
- package/types/ParseGeoPoint.d.ts +104 -0
- package/types/ParseHooks.d.ts +27 -0
- package/types/ParseInstallation.d.ts +179 -0
- package/types/ParseLiveQuery.d.ts +48 -0
- package/types/ParseObject.d.ts +1072 -0
- package/types/ParseOp.d.ts +78 -0
- package/types/ParsePolygon.d.ts +69 -0
- package/types/ParseQuery.d.ts +961 -0
- package/types/ParseRelation.d.ts +56 -0
- package/types/ParseRole.d.ts +79 -0
- package/types/ParseSchema.d.ts +286 -0
- package/types/ParseSession.d.ts +45 -0
- package/types/ParseUser.d.ts +517 -0
- package/types/Push.d.ts +62 -0
- package/types/RESTController.d.ts +35 -0
- package/types/SingleInstanceStateController.d.ts +24 -0
- package/types/Socket.weapp.d.ts +10 -0
- package/types/Storage.d.ts +14 -0
- package/types/StorageController.browser.d.ts +9 -0
- package/types/StorageController.d.ts +2 -0
- package/types/StorageController.default.d.ts +9 -0
- package/types/StorageController.react-native.d.ts +11 -0
- package/types/StorageController.weapp.d.ts +9 -0
- package/types/TaskQueue.d.ts +11 -0
- package/types/UniqueInstanceStateController.d.ts +20 -0
- package/types/WebSocketController.d.ts +2 -0
- package/types/Xhr.weapp.d.ts +29 -0
- package/types/arrayContainsObject.d.ts +2 -0
- package/types/canBeSerialized.d.ts +2 -0
- package/types/decode.d.ts +1 -0
- package/types/encode.d.ts +1 -0
- package/types/equals.d.ts +1 -0
- package/types/escape.d.ts +1 -0
- package/types/index.d.ts +66 -0
- package/types/isRevocableSession.d.ts +1 -0
- package/types/node.d.ts +3 -0
- package/types/parseDate.d.ts +1 -0
- package/types/promiseUtils.d.ts +9 -0
- package/types/react-native.d.ts +3 -0
- package/types/tests.ts +2256 -0
- package/types/tsconfig.json +25 -0
- package/types/unique.d.ts +1 -0
- package/types/unsavedChildren.d.ts +11 -0
- package/types/uuid.d.ts +2 -0
package/dist/parse.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Parse JavaScript SDK v6.1.0-alpha.
|
|
2
|
+
* Parse JavaScript SDK v6.1.0-alpha.3
|
|
3
3
|
*
|
|
4
4
|
* The source tree of this library can be found at
|
|
5
5
|
* https://github.com/ParsePlatform/Parse-SDK-JS
|
|
@@ -247,6 +247,7 @@ var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
|
|
|
247
247
|
* @returns {Promise} A promise that will be resolved with the result
|
|
248
248
|
* of the function.
|
|
249
249
|
*/
|
|
250
|
+
|
|
250
251
|
function run(name, data, options) {
|
|
251
252
|
if (typeof name !== 'string' || name.length === 0) {
|
|
252
253
|
throw new TypeError('Cloud function name must be a string.');
|
|
@@ -354,9 +355,10 @@ const config = {
|
|
|
354
355
|
SERVER_AUTH_TOKEN: null,
|
|
355
356
|
LIVEQUERY_SERVER_URL: null,
|
|
356
357
|
ENCRYPTED_KEY: null,
|
|
357
|
-
VERSION: 'js' + "6.1.0-alpha.
|
|
358
|
+
VERSION: 'js' + "6.1.0-alpha.3",
|
|
358
359
|
APPLICATION_ID: null,
|
|
359
360
|
JAVASCRIPT_KEY: null,
|
|
361
|
+
MAINTENANCE_KEY: null,
|
|
360
362
|
MASTER_KEY: null,
|
|
361
363
|
USE_MASTER_KEY: false,
|
|
362
364
|
PERFORM_USER_REWRITE: true,
|
|
@@ -589,7 +591,6 @@ const CoreManager = {
|
|
|
589
591
|
return config['ParseUser'];
|
|
590
592
|
}
|
|
591
593
|
};
|
|
592
|
-
module.exports = CoreManager;
|
|
593
594
|
var _default = exports.default = CoreManager;
|
|
594
595
|
}).call(this)}).call(this,_dereq_('_process'))
|
|
595
596
|
},{"@babel/runtime-corejs3/core-js-stable/instance/for-each":74,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104,"_process":108}],5:[function(_dereq_,module,exports){
|
|
@@ -616,7 +617,6 @@ const CryptoController = {
|
|
|
616
617
|
return decryptedStr;
|
|
617
618
|
}
|
|
618
619
|
};
|
|
619
|
-
module.exports = CryptoController;
|
|
620
620
|
var _default = exports.default = CryptoController;
|
|
621
621
|
},{"@babel/runtime-corejs3/core-js-stable/json/stringify":86,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104,"crypto-js/aes":481,"crypto-js/enc-utf8":485}],6:[function(_dereq_,module,exports){
|
|
622
622
|
"use strict";
|
|
@@ -636,7 +636,6 @@ try {
|
|
|
636
636
|
} catch (_) {
|
|
637
637
|
// EventEmitter unavailable
|
|
638
638
|
}
|
|
639
|
-
module.exports = EventEmitter;
|
|
640
639
|
var _default = exports.default = EventEmitter;
|
|
641
640
|
},{"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"events":490}],7:[function(_dereq_,module,exports){
|
|
642
641
|
"use strict";
|
|
@@ -681,8 +680,7 @@ const EventuallyQueue = {
|
|
|
681
680
|
* @static
|
|
682
681
|
* @see Parse.Object#saveEventually
|
|
683
682
|
*/
|
|
684
|
-
save(object) {
|
|
685
|
-
let serverOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
683
|
+
save(object, serverOptions) {
|
|
686
684
|
return this.enqueue('save', object, serverOptions);
|
|
687
685
|
},
|
|
688
686
|
/**
|
|
@@ -696,8 +694,7 @@ const EventuallyQueue = {
|
|
|
696
694
|
* @static
|
|
697
695
|
* @see Parse.Object#destroyEventually
|
|
698
696
|
*/
|
|
699
|
-
destroy(object) {
|
|
700
|
-
let serverOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
697
|
+
destroy(object, serverOptions) {
|
|
701
698
|
return this.enqueue('destroy', object, serverOptions);
|
|
702
699
|
},
|
|
703
700
|
/**
|
|
@@ -747,7 +744,7 @@ const EventuallyQueue = {
|
|
|
747
744
|
queueId,
|
|
748
745
|
action,
|
|
749
746
|
object: object.toJSON(),
|
|
750
|
-
serverOptions,
|
|
747
|
+
serverOptions: serverOptions || {},
|
|
751
748
|
id: object.id,
|
|
752
749
|
className: object.className,
|
|
753
750
|
hash: object.get('hash'),
|
|
@@ -766,7 +763,7 @@ const EventuallyQueue = {
|
|
|
766
763
|
*
|
|
767
764
|
* @function getQueue
|
|
768
765
|
* @name Parse.EventuallyQueue.getQueue
|
|
769
|
-
* @returns {Promise<
|
|
766
|
+
* @returns {Promise<Queue>}
|
|
770
767
|
* @static
|
|
771
768
|
*/
|
|
772
769
|
async getQueue() {
|
|
@@ -921,8 +918,7 @@ const EventuallyQueue = {
|
|
|
921
918
|
* @param [ms] Milliseconds to ping the server. Default 2000ms
|
|
922
919
|
* @static
|
|
923
920
|
*/
|
|
924
|
-
poll() {
|
|
925
|
-
let ms = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 2000;
|
|
921
|
+
poll(ms) {
|
|
926
922
|
if (polling) {
|
|
927
923
|
return;
|
|
928
924
|
}
|
|
@@ -937,7 +933,7 @@ const EventuallyQueue = {
|
|
|
937
933
|
return this.sendQueue();
|
|
938
934
|
}
|
|
939
935
|
}).catch(e => e);
|
|
940
|
-
}, ms);
|
|
936
|
+
}, ms || 2000);
|
|
941
937
|
},
|
|
942
938
|
/**
|
|
943
939
|
* Turns off polling.
|
|
@@ -996,7 +992,6 @@ const EventuallyQueue = {
|
|
|
996
992
|
}
|
|
997
993
|
}
|
|
998
994
|
};
|
|
999
|
-
module.exports = EventuallyQueue;
|
|
1000
995
|
var _default = exports.default = EventuallyQueue;
|
|
1001
996
|
},{"./CoreManager":4,"./ParseError":24,"./ParseObject":30,"./ParseQuery":33,"./Storage":43,"@babel/runtime-corejs3/core-js-stable/instance/find":73,"@babel/runtime-corejs3/core-js-stable/instance/find-index":72,"@babel/runtime-corejs3/core-js-stable/instance/splice":83,"@babel/runtime-corejs3/core-js-stable/json/stringify":86,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/set-interval":99,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],8:[function(_dereq_,module,exports){
|
|
1002
997
|
"use strict";
|
|
@@ -1264,7 +1259,6 @@ if (typeof window !== 'undefined' && window.indexedDB) {
|
|
|
1264
1259
|
// IndexedDB not supported
|
|
1265
1260
|
IndexedDBStorageController = undefined;
|
|
1266
1261
|
}
|
|
1267
|
-
module.exports = IndexedDBStorageController;
|
|
1268
1262
|
var _default = exports.default = IndexedDBStorageController;
|
|
1269
1263
|
},{"@babel/runtime-corejs3/core-js-stable/instance/keys":77,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"idb-keyval":491}],10:[function(_dereq_,module,exports){
|
|
1270
1264
|
"use strict";
|
|
@@ -1347,7 +1341,6 @@ const InstallationController = {
|
|
|
1347
1341
|
currentInstallationCacheMatchesDisk = matchesDisk;
|
|
1348
1342
|
}
|
|
1349
1343
|
};
|
|
1350
|
-
module.exports = InstallationController;
|
|
1351
1344
|
var _default = exports.default = InstallationController;
|
|
1352
1345
|
},{"./CoreManager":4,"./ParseInstallation":28,"./Storage":43,"./uuid":64,"@babel/runtime-corejs3/core-js-stable/json/stringify":86,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],11:[function(_dereq_,module,exports){
|
|
1353
1346
|
"use strict";
|
|
@@ -1951,7 +1944,7 @@ var _promiseUtils = _dereq_("./promiseUtils");
|
|
|
1951
1944
|
*
|
|
1952
1945
|
* });</pre></p>
|
|
1953
1946
|
*/
|
|
1954
|
-
class
|
|
1947
|
+
class LiveQuerySubscription {
|
|
1955
1948
|
/*
|
|
1956
1949
|
* @param {string | number} id - subscription id
|
|
1957
1950
|
* @param {string} query - query to subscribe to
|
|
@@ -1974,8 +1967,8 @@ class Subscription {
|
|
|
1974
1967
|
this.subscribePromise = (0, _promiseUtils.resolvingPromise)();
|
|
1975
1968
|
this.unsubscribePromise = (0, _promiseUtils.resolvingPromise)();
|
|
1976
1969
|
this.subscribed = false;
|
|
1977
|
-
const
|
|
1978
|
-
this.emitter = new
|
|
1970
|
+
const Emitter = _CoreManager.default.getEventEmitter();
|
|
1971
|
+
this.emitter = new Emitter();
|
|
1979
1972
|
this.on = (eventName, listener) => this.emitter.on(eventName, listener);
|
|
1980
1973
|
this.emit = function (eventName) {
|
|
1981
1974
|
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
@@ -2000,7 +1993,7 @@ class Subscription {
|
|
|
2000
1993
|
});
|
|
2001
1994
|
}
|
|
2002
1995
|
}
|
|
2003
|
-
var _default = exports.default =
|
|
1996
|
+
var _default = exports.default = LiveQuerySubscription;
|
|
2004
1997
|
},{"./CoreManager":4,"./promiseUtils":61,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/defineProperty":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],13:[function(_dereq_,module,exports){
|
|
2005
1998
|
"use strict";
|
|
2006
1999
|
|
|
@@ -2384,7 +2377,6 @@ const LocalDatastore = {
|
|
|
2384
2377
|
return this.isEnabled;
|
|
2385
2378
|
}
|
|
2386
2379
|
};
|
|
2387
|
-
module.exports = LocalDatastore;
|
|
2388
2380
|
var _default = exports.default = LocalDatastore;
|
|
2389
2381
|
_CoreManager.default.setLocalDatastoreController(_LocalDatastoreController.default);
|
|
2390
2382
|
_CoreManager.default.setLocalDatastore(LocalDatastore);
|
|
@@ -2456,7 +2448,6 @@ const LocalDatastoreController = {
|
|
|
2456
2448
|
return _promise.default.all(promises);
|
|
2457
2449
|
}
|
|
2458
2450
|
};
|
|
2459
|
-
module.exports = LocalDatastoreController;
|
|
2460
2451
|
var _default = exports.default = LocalDatastoreController;
|
|
2461
2452
|
},{"./LocalDatastoreUtils":17,"./Storage":43,"@babel/runtime-corejs3/core-js-stable/instance/map":78,"@babel/runtime-corejs3/core-js-stable/instance/reduce":79,"@babel/runtime-corejs3/core-js-stable/json/stringify":86,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/promise":98,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],15:[function(_dereq_,module,exports){
|
|
2462
2453
|
"use strict";
|
|
@@ -2470,7 +2461,6 @@ exports.default = void 0;
|
|
|
2470
2461
|
var _LocalDatastoreController = _interopRequireDefault(_dereq_("./LocalDatastoreController.react-native"));
|
|
2471
2462
|
var _LocalDatastoreController2 = _interopRequireDefault(_dereq_("./LocalDatastoreController.default"));
|
|
2472
2463
|
let LocalDatastoreController = _LocalDatastoreController2.default;
|
|
2473
|
-
module.exports = LocalDatastoreController;
|
|
2474
2464
|
var _default = exports.default = LocalDatastoreController;
|
|
2475
2465
|
},{"./LocalDatastoreController.default":14,"./LocalDatastoreController.react-native":16,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],16:[function(_dereq_,module,exports){
|
|
2476
2466
|
"use strict";
|
|
@@ -2558,7 +2548,6 @@ const LocalDatastoreController = {
|
|
|
2558
2548
|
await _StorageController.default.multiRemove(batch).catch(error => console.error('Error clearing local datastore: ', error));
|
|
2559
2549
|
}
|
|
2560
2550
|
};
|
|
2561
|
-
module.exports = LocalDatastoreController;
|
|
2562
2551
|
var _default = exports.default = LocalDatastoreController;
|
|
2563
2552
|
},{"./LocalDatastoreUtils":17,"./StorageController.react-native":47,"@babel/runtime-corejs3/core-js-stable/instance/for-each":74,"@babel/runtime-corejs3/core-js-stable/instance/map":78,"@babel/runtime-corejs3/core-js-stable/json/stringify":86,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],17:[function(_dereq_,module,exports){
|
|
2564
2553
|
"use strict";
|
|
@@ -3308,7 +3297,6 @@ const OfflineQuery = {
|
|
|
3308
3297
|
matchesQuery: matchesQuery,
|
|
3309
3298
|
validateQuery: validateQuery
|
|
3310
3299
|
};
|
|
3311
|
-
module.exports = OfflineQuery;
|
|
3312
3300
|
var _default = exports.default = OfflineQuery;
|
|
3313
3301
|
},{"./ParseError":24,"./ParseGeoPoint":26,"./ParsePolygon":32,"./decode":55,"./equals":57,"@babel/runtime-corejs3/core-js-stable/array/is-array":66,"@babel/runtime-corejs3/core-js-stable/instance/filter":71,"@babel/runtime-corejs3/core-js-stable/instance/for-each":74,"@babel/runtime-corejs3/core-js-stable/instance/index-of":76,"@babel/runtime-corejs3/core-js-stable/instance/map":78,"@babel/runtime-corejs3/core-js-stable/instance/slice":80,"@babel/runtime-corejs3/core-js-stable/number/is-integer":88,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/object/keys":96,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],20:[function(_dereq_,module,exports){
|
|
3314
3302
|
(function (process){(function (){
|
|
@@ -3446,9 +3434,10 @@ const Parse = {
|
|
|
3446
3434
|
}
|
|
3447
3435
|
Parse._initialize(applicationId, javaScriptKey);
|
|
3448
3436
|
},
|
|
3449
|
-
_initialize(applicationId, javaScriptKey, masterKey) {
|
|
3437
|
+
_initialize(applicationId, javaScriptKey, masterKey, maintenanceKey) {
|
|
3450
3438
|
_CoreManager.default.set('APPLICATION_ID', applicationId);
|
|
3451
3439
|
_CoreManager.default.set('JAVASCRIPT_KEY', javaScriptKey);
|
|
3440
|
+
_CoreManager.default.set('MAINTENANCE_KEY', maintenanceKey);
|
|
3452
3441
|
_CoreManager.default.set('MASTER_KEY', masterKey);
|
|
3453
3442
|
_CoreManager.default.set('USE_MASTER_KEY', false);
|
|
3454
3443
|
_CoreManager.default.setIfNeeded('EventEmitter', _EventEmitter.default);
|
|
@@ -3521,6 +3510,16 @@ const Parse = {
|
|
|
3521
3510
|
get masterKey() {
|
|
3522
3511
|
return _CoreManager.default.get('MASTER_KEY');
|
|
3523
3512
|
},
|
|
3513
|
+
/**
|
|
3514
|
+
* @member {string} Parse.maintenanceKey
|
|
3515
|
+
* @static
|
|
3516
|
+
*/
|
|
3517
|
+
set maintenanceKey(value) {
|
|
3518
|
+
_CoreManager.default.set('MAINTENANCE_KEY', value);
|
|
3519
|
+
},
|
|
3520
|
+
get maintenanceKey() {
|
|
3521
|
+
return _CoreManager.default.get('MAINTENANCE_KEY');
|
|
3522
|
+
},
|
|
3524
3523
|
/**
|
|
3525
3524
|
* @member {string} Parse.serverURL
|
|
3526
3525
|
* @static
|
|
@@ -3735,7 +3734,7 @@ const PUBLIC_KEY = '*';
|
|
|
3735
3734
|
*/
|
|
3736
3735
|
class ParseACL {
|
|
3737
3736
|
/**
|
|
3738
|
-
* @param {(Parse.User | object)} arg1 The user to initialize the ACL for
|
|
3737
|
+
* @param {(Parse.User | object | null)} arg1 The user to initialize the ACL for
|
|
3739
3738
|
*/
|
|
3740
3739
|
constructor(arg1) {
|
|
3741
3740
|
(0, _defineProperty2.default)(this, "permissionsById", void 0);
|
|
@@ -4695,8 +4694,7 @@ class ParseConfig {
|
|
|
4695
4694
|
* @returns {Promise} A promise that is resolved with a newly-created
|
|
4696
4695
|
* configuration object when the get completes.
|
|
4697
4696
|
*/
|
|
4698
|
-
static get() {
|
|
4699
|
-
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
4697
|
+
static get(options) {
|
|
4700
4698
|
const controller = _CoreManager.default.getConfigController();
|
|
4701
4699
|
return controller.get(options);
|
|
4702
4700
|
}
|
|
@@ -4777,8 +4775,7 @@ const DefaultController = {
|
|
|
4777
4775
|
return config;
|
|
4778
4776
|
});
|
|
4779
4777
|
},
|
|
4780
|
-
get() {
|
|
4781
|
-
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
4778
|
+
get(options) {
|
|
4782
4779
|
const RESTController = _CoreManager.default.getRESTController();
|
|
4783
4780
|
return RESTController.request('GET', 'config', {}, options).then(response => {
|
|
4784
4781
|
if (!response || !response.params) {
|
|
@@ -6476,7 +6473,6 @@ class ParseInstallation extends _ParseObject.default {
|
|
|
6476
6473
|
}
|
|
6477
6474
|
}
|
|
6478
6475
|
_ParseObject.default.registerSubclass('_Installation', ParseInstallation);
|
|
6479
|
-
module.exports = ParseInstallation;
|
|
6480
6476
|
var _default = exports.default = ParseInstallation;
|
|
6481
6477
|
},{"./CoreManager":4,"./ParseError":24,"./ParseObject":30,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/object/entries":92,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],29:[function(_dereq_,module,exports){
|
|
6482
6478
|
"use strict";
|
|
@@ -6529,8 +6525,8 @@ class LiveQuery {
|
|
|
6529
6525
|
(0, _defineProperty2.default)(this, "emitter", void 0);
|
|
6530
6526
|
(0, _defineProperty2.default)(this, "on", void 0);
|
|
6531
6527
|
(0, _defineProperty2.default)(this, "emit", void 0);
|
|
6532
|
-
const
|
|
6533
|
-
this.emitter = new
|
|
6528
|
+
const Emitter = _CoreManager.default.getEventEmitter();
|
|
6529
|
+
this.emitter = new Emitter();
|
|
6534
6530
|
this.on = (eventName, listener) => this.emitter.on(eventName, listener);
|
|
6535
6531
|
this.emit = function (eventName) {
|
|
6536
6532
|
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
@@ -6834,7 +6830,7 @@ class ParseObject {
|
|
|
6834
6830
|
id = this._getId();
|
|
6835
6831
|
}
|
|
6836
6832
|
return {
|
|
6837
|
-
id
|
|
6833
|
+
id,
|
|
6838
6834
|
className: this.className
|
|
6839
6835
|
};
|
|
6840
6836
|
} else {
|
|
@@ -7060,6 +7056,9 @@ class ParseObject {
|
|
|
7060
7056
|
if (hasOwn(options, 'useMasterKey')) {
|
|
7061
7057
|
requestOptions.useMasterKey = !!options.useMasterKey;
|
|
7062
7058
|
}
|
|
7059
|
+
if (hasOwn(options, 'useMaintenanceKey')) {
|
|
7060
|
+
requestOptions.useMaintenanceKey = !!options.useMaintenanceKey;
|
|
7061
|
+
}
|
|
7063
7062
|
if (hasOwn(options, 'sessionToken') && typeof options.sessionToken === 'string') {
|
|
7064
7063
|
requestOptions.sessionToken = options.sessionToken;
|
|
7065
7064
|
}
|
|
@@ -7894,6 +7893,7 @@ class ParseObject {
|
|
|
7894
7893
|
* @returns {Promise} A promise that is fulfilled when the save
|
|
7895
7894
|
* completes.
|
|
7896
7895
|
*/
|
|
7896
|
+
|
|
7897
7897
|
async save(arg1, arg2, arg3) {
|
|
7898
7898
|
let attrs;
|
|
7899
7899
|
let options;
|
|
@@ -7924,9 +7924,8 @@ class ParseObject {
|
|
|
7924
7924
|
const filePromise = unsavedFiles.length ? controller.save(unsavedFiles, saveOptions) : _promise.default.resolve();
|
|
7925
7925
|
return filePromise.then(() => controller.save(unsavedObjects, saveOptions)).then(savedOjbects => savedOjbects.pop());
|
|
7926
7926
|
}
|
|
7927
|
-
|
|
7928
|
-
|
|
7929
|
-
});
|
|
7927
|
+
await controller.save(unsaved, saveOptions);
|
|
7928
|
+
return controller.save(this, saveOptions);
|
|
7930
7929
|
}
|
|
7931
7930
|
|
|
7932
7931
|
/**
|
|
@@ -8132,8 +8131,7 @@ class ParseObject {
|
|
|
8132
8131
|
* @static
|
|
8133
8132
|
* @returns {Parse.Object[]}
|
|
8134
8133
|
*/
|
|
8135
|
-
static fetchAll(list) {
|
|
8136
|
-
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
8134
|
+
static fetchAll(list, options) {
|
|
8137
8135
|
const fetchOptions = ParseObject._getRequestOptions(options);
|
|
8138
8136
|
return _CoreManager.default.getObjectController().fetch(list, true, fetchOptions);
|
|
8139
8137
|
}
|
|
@@ -8312,8 +8310,7 @@ class ParseObject {
|
|
|
8312
8310
|
* @returns {Promise} A promise that is fulfilled when the destroyAll
|
|
8313
8311
|
* completes.
|
|
8314
8312
|
*/
|
|
8315
|
-
static destroyAll(list) {
|
|
8316
|
-
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
8313
|
+
static destroyAll(list, options) {
|
|
8317
8314
|
const destroyOptions = ParseObject._getRequestOptions(options);
|
|
8318
8315
|
return _CoreManager.default.getObjectController().destroy(list, destroyOptions);
|
|
8319
8316
|
}
|
|
@@ -8347,8 +8344,7 @@ class ParseObject {
|
|
|
8347
8344
|
* @static
|
|
8348
8345
|
* @returns {Parse.Object[]}
|
|
8349
8346
|
*/
|
|
8350
|
-
static saveAll(list) {
|
|
8351
|
-
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
8347
|
+
static saveAll(list, options) {
|
|
8352
8348
|
const saveOptions = ParseObject._getRequestOptions(options);
|
|
8353
8349
|
return _CoreManager.default.getObjectController().save(list, saveOptions);
|
|
8354
8350
|
}
|
|
@@ -9691,6 +9687,7 @@ var _sort = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stabl
|
|
|
9691
9687
|
var _splice = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/splice"));
|
|
9692
9688
|
var _promise = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/promise"));
|
|
9693
9689
|
var _find = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/find"));
|
|
9690
|
+
var _bind = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/bind"));
|
|
9694
9691
|
var _isArray = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/array/is-array"));
|
|
9695
9692
|
var _entries = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/object/entries"));
|
|
9696
9693
|
var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
|
|
@@ -10269,11 +10266,12 @@ class ParseQuery {
|
|
|
10269
10266
|
return this._handleOfflineQuery(this.toJSON());
|
|
10270
10267
|
}
|
|
10271
10268
|
return (0, _find.default)(controller).call(controller, this.className, this.toJSON(), findOptions).then(response => {
|
|
10269
|
+
var _context4, _context5;
|
|
10272
10270
|
// Return generic object when explain is used
|
|
10273
10271
|
if (this._explain) {
|
|
10274
10272
|
return response.results;
|
|
10275
10273
|
}
|
|
10276
|
-
const results = response.results?.
|
|
10274
|
+
const results = ((_context4 = response.results) == null ? void 0 : (0, _bind.default)(_context5 = Function.call).call(_context5, (0, _map.default)(_context4), _context4))?.(data => {
|
|
10277
10275
|
// In cases of relations, the server may send back a className
|
|
10278
10276
|
// on the top level of the payload
|
|
10279
10277
|
const override = response.className || this.className;
|
|
@@ -10721,8 +10719,8 @@ class ParseQuery {
|
|
|
10721
10719
|
*/
|
|
10722
10720
|
equalTo(key, value) {
|
|
10723
10721
|
if (key && typeof key === 'object') {
|
|
10724
|
-
var
|
|
10725
|
-
(0, _forEach.default)(
|
|
10722
|
+
var _context6;
|
|
10723
|
+
(0, _forEach.default)(_context6 = (0, _entries.default)(key)).call(_context6, _ref => {
|
|
10726
10724
|
let [k, val] = _ref;
|
|
10727
10725
|
return this.equalTo(k, val);
|
|
10728
10726
|
});
|
|
@@ -10745,8 +10743,8 @@ class ParseQuery {
|
|
|
10745
10743
|
*/
|
|
10746
10744
|
notEqualTo(key, value) {
|
|
10747
10745
|
if (key && typeof key === 'object') {
|
|
10748
|
-
var
|
|
10749
|
-
(0, _forEach.default)(
|
|
10746
|
+
var _context7;
|
|
10747
|
+
(0, _forEach.default)(_context7 = (0, _entries.default)(key)).call(_context7, _ref2 => {
|
|
10750
10748
|
let [k, val] = _ref2;
|
|
10751
10749
|
return this.notEqualTo(k, val);
|
|
10752
10750
|
});
|
|
@@ -10808,11 +10806,11 @@ class ParseQuery {
|
|
|
10808
10806
|
* be contained in the provided list of values.
|
|
10809
10807
|
*
|
|
10810
10808
|
* @param {string} key The key to check.
|
|
10811
|
-
* @param {Array<*>}
|
|
10809
|
+
* @param {Array<*>} values The values that will match.
|
|
10812
10810
|
* @returns {Parse.Query} Returns the query, so you can chain this call.
|
|
10813
10811
|
*/
|
|
10814
|
-
containedIn(key,
|
|
10815
|
-
return this._addCondition(key, '$in',
|
|
10812
|
+
containedIn(key, values) {
|
|
10813
|
+
return this._addCondition(key, '$in', values);
|
|
10816
10814
|
}
|
|
10817
10815
|
|
|
10818
10816
|
/**
|
|
@@ -10820,11 +10818,11 @@ class ParseQuery {
|
|
|
10820
10818
|
* not be contained in the provided list of values.
|
|
10821
10819
|
*
|
|
10822
10820
|
* @param {string} key The key to check.
|
|
10823
|
-
* @param {Array<*>}
|
|
10821
|
+
* @param {Array<*>} values The values that will not match.
|
|
10824
10822
|
* @returns {Parse.Query} Returns the query, so you can chain this call.
|
|
10825
10823
|
*/
|
|
10826
|
-
notContainedIn(key,
|
|
10827
|
-
return this._addCondition(key, '$nin',
|
|
10824
|
+
notContainedIn(key, values) {
|
|
10825
|
+
return this._addCondition(key, '$nin', values);
|
|
10828
10826
|
}
|
|
10829
10827
|
|
|
10830
10828
|
/**
|
|
@@ -11034,8 +11032,7 @@ class ParseQuery {
|
|
|
11034
11032
|
* @param {boolean} options.diacriticSensitive A boolean flag to enable or disable diacritic sensitive search.
|
|
11035
11033
|
* @returns {Parse.Query} Returns the query, so you can chain this call.
|
|
11036
11034
|
*/
|
|
11037
|
-
fullText(key, value) {
|
|
11038
|
-
let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
11035
|
+
fullText(key, value, options) {
|
|
11039
11036
|
options = options || {};
|
|
11040
11037
|
if (!key) {
|
|
11041
11038
|
throw new Error('A key is required.');
|
|
@@ -11274,11 +11271,11 @@ class ParseQuery {
|
|
|
11274
11271
|
keys[_key2] = arguments[_key2];
|
|
11275
11272
|
}
|
|
11276
11273
|
(0, _forEach.default)(keys).call(keys, key => {
|
|
11277
|
-
var
|
|
11274
|
+
var _context8;
|
|
11278
11275
|
if ((0, _isArray.default)(key)) {
|
|
11279
11276
|
key = key.join();
|
|
11280
11277
|
}
|
|
11281
|
-
this._order = (0, _concat.default)(
|
|
11278
|
+
this._order = (0, _concat.default)(_context8 = this._order).call(_context8, key.replace(/\s/g, '').split(','));
|
|
11282
11279
|
});
|
|
11283
11280
|
return this;
|
|
11284
11281
|
}
|
|
@@ -11314,11 +11311,11 @@ class ParseQuery {
|
|
|
11314
11311
|
keys[_key4] = arguments[_key4];
|
|
11315
11312
|
}
|
|
11316
11313
|
(0, _forEach.default)(keys).call(keys, key => {
|
|
11317
|
-
var
|
|
11314
|
+
var _context9, _context10;
|
|
11318
11315
|
if ((0, _isArray.default)(key)) {
|
|
11319
11316
|
key = key.join();
|
|
11320
11317
|
}
|
|
11321
|
-
this._order = (0, _concat.default)(
|
|
11318
|
+
this._order = (0, _concat.default)(_context9 = this._order).call(_context9, (0, _map.default)(_context10 = key.replace(/\s/g, '').split(',')).call(_context10, k => {
|
|
11322
11319
|
return '-' + k;
|
|
11323
11320
|
}));
|
|
11324
11321
|
});
|
|
@@ -11391,8 +11388,8 @@ class ParseQuery {
|
|
|
11391
11388
|
}
|
|
11392
11389
|
(0, _forEach.default)(keys).call(keys, key => {
|
|
11393
11390
|
if ((0, _isArray.default)(key)) {
|
|
11394
|
-
var
|
|
11395
|
-
this._include = (0, _concat.default)(
|
|
11391
|
+
var _context11;
|
|
11392
|
+
this._include = (0, _concat.default)(_context11 = this._include).call(_context11, key);
|
|
11396
11393
|
} else {
|
|
11397
11394
|
this._include.push(key);
|
|
11398
11395
|
}
|
|
@@ -11428,8 +11425,8 @@ class ParseQuery {
|
|
|
11428
11425
|
}
|
|
11429
11426
|
(0, _forEach.default)(keys).call(keys, key => {
|
|
11430
11427
|
if ((0, _isArray.default)(key)) {
|
|
11431
|
-
var
|
|
11432
|
-
this._select = (0, _concat.default)(
|
|
11428
|
+
var _context12;
|
|
11429
|
+
this._select = (0, _concat.default)(_context12 = this._select).call(_context12, key);
|
|
11433
11430
|
} else {
|
|
11434
11431
|
this._select.push(key);
|
|
11435
11432
|
}
|
|
@@ -11452,8 +11449,8 @@ class ParseQuery {
|
|
|
11452
11449
|
}
|
|
11453
11450
|
(0, _forEach.default)(keys).call(keys, key => {
|
|
11454
11451
|
if ((0, _isArray.default)(key)) {
|
|
11455
|
-
var
|
|
11456
|
-
this._exclude = (0, _concat.default)(
|
|
11452
|
+
var _context13;
|
|
11453
|
+
this._exclude = (0, _concat.default)(_context13 = this._exclude).call(_context13, key);
|
|
11457
11454
|
} else {
|
|
11458
11455
|
this._exclude.push(key);
|
|
11459
11456
|
}
|
|
@@ -11475,8 +11472,8 @@ class ParseQuery {
|
|
|
11475
11472
|
}
|
|
11476
11473
|
(0, _forEach.default)(keys).call(keys, key => {
|
|
11477
11474
|
if ((0, _isArray.default)(key)) {
|
|
11478
|
-
var
|
|
11479
|
-
this._watch = (0, _concat.default)(
|
|
11475
|
+
var _context14;
|
|
11476
|
+
this._watch = (0, _concat.default)(_context14 = this._watch).call(_context14, key);
|
|
11480
11477
|
} else {
|
|
11481
11478
|
this._watch.push(key);
|
|
11482
11479
|
}
|
|
@@ -11686,7 +11683,7 @@ const DefaultController = {
|
|
|
11686
11683
|
_CoreManager.default.setParseQuery(ParseQuery);
|
|
11687
11684
|
_CoreManager.default.setQueryController(DefaultController);
|
|
11688
11685
|
var _default = exports.default = ParseQuery;
|
|
11689
|
-
},{"./CoreManager":4,"./LocalDatastoreUtils":17,"./OfflineQuery":19,"./ParseError":24,"./ParseGeoPoint":26,"./ParseObject":30,"./encode":56,"./promiseUtils":61,"@babel/runtime-corejs3/core-js-stable/array/is-array":66,"@babel/runtime-corejs3/core-js-stable/instance/concat":68,"@babel/runtime-corejs3/core-js-stable/instance/filter":71,"@babel/runtime-corejs3/core-js-stable/instance/find":73,"@babel/runtime-corejs3/core-js-stable/instance/for-each":74,"@babel/runtime-corejs3/core-js-stable/instance/includes":75,"@babel/runtime-corejs3/core-js-stable/instance/index-of":76,"@babel/runtime-corejs3/core-js-stable/instance/keys":77,"@babel/runtime-corejs3/core-js-stable/instance/map":78,"@babel/runtime-corejs3/core-js-stable/instance/slice":80,"@babel/runtime-corejs3/core-js-stable/instance/sort":82,"@babel/runtime-corejs3/core-js-stable/instance/splice":83,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/object/entries":92,"@babel/runtime-corejs3/core-js-stable/object/keys":96,"@babel/runtime-corejs3/core-js-stable/promise":98,"@babel/runtime-corejs3/helpers/defineProperty":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],34:[function(_dereq_,module,exports){
|
|
11686
|
+
},{"./CoreManager":4,"./LocalDatastoreUtils":17,"./OfflineQuery":19,"./ParseError":24,"./ParseGeoPoint":26,"./ParseObject":30,"./encode":56,"./promiseUtils":61,"@babel/runtime-corejs3/core-js-stable/array/is-array":66,"@babel/runtime-corejs3/core-js-stable/instance/bind":67,"@babel/runtime-corejs3/core-js-stable/instance/concat":68,"@babel/runtime-corejs3/core-js-stable/instance/filter":71,"@babel/runtime-corejs3/core-js-stable/instance/find":73,"@babel/runtime-corejs3/core-js-stable/instance/for-each":74,"@babel/runtime-corejs3/core-js-stable/instance/includes":75,"@babel/runtime-corejs3/core-js-stable/instance/index-of":76,"@babel/runtime-corejs3/core-js-stable/instance/keys":77,"@babel/runtime-corejs3/core-js-stable/instance/map":78,"@babel/runtime-corejs3/core-js-stable/instance/slice":80,"@babel/runtime-corejs3/core-js-stable/instance/sort":82,"@babel/runtime-corejs3/core-js-stable/instance/splice":83,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/object/entries":92,"@babel/runtime-corejs3/core-js-stable/object/keys":96,"@babel/runtime-corejs3/core-js-stable/promise":98,"@babel/runtime-corejs3/helpers/defineProperty":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],34:[function(_dereq_,module,exports){
|
|
11690
11687
|
"use strict";
|
|
11691
11688
|
|
|
11692
11689
|
var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
@@ -11908,7 +11905,7 @@ class ParseRole extends _ParseObject.default {
|
|
|
11908
11905
|
* @param {string} name The name of the role.
|
|
11909
11906
|
* @param {object} options Standard options object with success and error
|
|
11910
11907
|
* callbacks.
|
|
11911
|
-
* @returns {
|
|
11908
|
+
* @returns {Parse.Object} Returns the object, so you can chain this call.
|
|
11912
11909
|
*/
|
|
11913
11910
|
setName(name, options) {
|
|
11914
11911
|
this._validateName(name);
|
|
@@ -11992,6 +11989,7 @@ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
|
|
|
11992
11989
|
var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
|
|
11993
11990
|
var _ParseCLP = _interopRequireDefault(_dereq_("./ParseCLP"));
|
|
11994
11991
|
const FIELD_TYPES = ['String', 'Number', 'Boolean', 'Bytes', 'Date', 'File', 'GeoPoint', 'Polygon', 'Array', 'Object', 'Pointer', 'Relation'];
|
|
11992
|
+
|
|
11995
11993
|
/**
|
|
11996
11994
|
* A Parse.Schema object is for handling schema data from Parse.
|
|
11997
11995
|
* <p>All the schemas methods require MasterKey.
|
|
@@ -12166,9 +12164,9 @@ class ParseSchema {
|
|
|
12166
12164
|
* </ul>
|
|
12167
12165
|
* @returns {Parse.Schema} Returns the schema, so you can chain this call.
|
|
12168
12166
|
*/
|
|
12169
|
-
addField(name, type) {
|
|
12170
|
-
let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
12167
|
+
addField(name, type, options) {
|
|
12171
12168
|
type = type || 'String';
|
|
12169
|
+
options = options || {};
|
|
12172
12170
|
if (!name) {
|
|
12173
12171
|
throw new Error('field name may not be null.');
|
|
12174
12172
|
}
|
|
@@ -12350,8 +12348,7 @@ class ParseSchema {
|
|
|
12350
12348
|
* @param {object} options See {@link https://parseplatform.org/Parse-SDK-JS/api/master/Parse.Schema.html#addField addField}
|
|
12351
12349
|
* @returns {Parse.Schema} Returns the schema, so you can chain this call.
|
|
12352
12350
|
*/
|
|
12353
|
-
addPointer(name, targetClass) {
|
|
12354
|
-
let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
12351
|
+
addPointer(name, targetClass, options) {
|
|
12355
12352
|
if (!name) {
|
|
12356
12353
|
throw new Error('field name may not be null.');
|
|
12357
12354
|
}
|
|
@@ -12362,10 +12359,10 @@ class ParseSchema {
|
|
|
12362
12359
|
type: 'Pointer',
|
|
12363
12360
|
targetClass
|
|
12364
12361
|
};
|
|
12365
|
-
if (typeof options
|
|
12362
|
+
if (typeof options?.required === 'boolean') {
|
|
12366
12363
|
fieldOptions.required = options.required;
|
|
12367
12364
|
}
|
|
12368
|
-
if (options
|
|
12365
|
+
if (options?.defaultValue !== undefined) {
|
|
12369
12366
|
fieldOptions.defaultValue = options.defaultValue;
|
|
12370
12367
|
if (options.defaultValue instanceof _ParseObject.default) {
|
|
12371
12368
|
fieldOptions.defaultValue = options.defaultValue.toPointer();
|
|
@@ -13146,7 +13143,7 @@ class ParseUser extends _ParseObject.default {
|
|
|
13146
13143
|
* either from memory or localStorage, if necessary.
|
|
13147
13144
|
*
|
|
13148
13145
|
* @static
|
|
13149
|
-
* @returns {Parse.
|
|
13146
|
+
* @returns {Parse.User} The currently logged in Parse.User.
|
|
13150
13147
|
*/
|
|
13151
13148
|
static current() {
|
|
13152
13149
|
if (!canUseCurrentUser) {
|
|
@@ -13213,8 +13210,8 @@ class ParseUser extends _ParseObject.default {
|
|
|
13213
13210
|
}
|
|
13214
13211
|
const user = new this();
|
|
13215
13212
|
user._finishFetch({
|
|
13216
|
-
username
|
|
13217
|
-
password
|
|
13213
|
+
username,
|
|
13214
|
+
password
|
|
13218
13215
|
});
|
|
13219
13216
|
return user.logIn(options);
|
|
13220
13217
|
}
|
|
@@ -13244,8 +13241,8 @@ class ParseUser extends _ParseObject.default {
|
|
|
13244
13241
|
}
|
|
13245
13242
|
const user = new this();
|
|
13246
13243
|
user._finishFetch({
|
|
13247
|
-
username
|
|
13248
|
-
password
|
|
13244
|
+
username,
|
|
13245
|
+
password,
|
|
13249
13246
|
authData
|
|
13250
13247
|
});
|
|
13251
13248
|
return user.logIn(options);
|
|
@@ -13302,8 +13299,7 @@ class ParseUser extends _ParseObject.default {
|
|
|
13302
13299
|
* @static
|
|
13303
13300
|
* @returns {Promise} A promise that is fulfilled with the user is fetched.
|
|
13304
13301
|
*/
|
|
13305
|
-
static me(sessionToken) {
|
|
13306
|
-
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
13302
|
+
static me(sessionToken, options) {
|
|
13307
13303
|
const controller = _CoreManager.default.getUserController();
|
|
13308
13304
|
const meOptions = _ParseObject.default._getRequestOptions(options);
|
|
13309
13305
|
meOptions.sessionToken = sessionToken;
|
|
@@ -13352,8 +13348,7 @@ class ParseUser extends _ParseObject.default {
|
|
|
13352
13348
|
* @returns {Promise} A promise that is resolved when the session is
|
|
13353
13349
|
* destroyed on the server.
|
|
13354
13350
|
*/
|
|
13355
|
-
static logOut() {
|
|
13356
|
-
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
13351
|
+
static logOut(options) {
|
|
13357
13352
|
const controller = _CoreManager.default.getUserController();
|
|
13358
13353
|
return controller.logOut(options);
|
|
13359
13354
|
}
|
|
@@ -13714,7 +13709,7 @@ const DefaultController = {
|
|
|
13714
13709
|
},
|
|
13715
13710
|
logOut(options) {
|
|
13716
13711
|
const RESTController = _CoreManager.default.getRESTController();
|
|
13717
|
-
if (options
|
|
13712
|
+
if (options?.sessionToken) {
|
|
13718
13713
|
return RESTController.request('POST', 'logout', {}, options);
|
|
13719
13714
|
}
|
|
13720
13715
|
return DefaultController.currentUserAsync().then(currentUser => {
|
|
@@ -13742,7 +13737,7 @@ const DefaultController = {
|
|
|
13742
13737
|
requestPasswordReset(email, options) {
|
|
13743
13738
|
const RESTController = _CoreManager.default.getRESTController();
|
|
13744
13739
|
return RESTController.request('POST', 'requestPasswordReset', {
|
|
13745
|
-
email
|
|
13740
|
+
email
|
|
13746
13741
|
}, options);
|
|
13747
13742
|
},
|
|
13748
13743
|
async upgradeToRevocableSession(user, options) {
|
|
@@ -13786,7 +13781,7 @@ const DefaultController = {
|
|
|
13786
13781
|
requestEmailVerification(email, options) {
|
|
13787
13782
|
const RESTController = _CoreManager.default.getRESTController();
|
|
13788
13783
|
return RESTController.request('POST', 'verificationEmailRequest', {
|
|
13789
|
-
email
|
|
13784
|
+
email
|
|
13790
13785
|
}, options);
|
|
13791
13786
|
}
|
|
13792
13787
|
};
|
|
@@ -13909,8 +13904,9 @@ exports.default = void 0;
|
|
|
13909
13904
|
var _promise = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/promise"));
|
|
13910
13905
|
var _stringify = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/json/stringify"));
|
|
13911
13906
|
var _includes = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/includes"));
|
|
13912
|
-
var _forEach = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
|
|
13913
13907
|
var _indexOf = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/index-of"));
|
|
13908
|
+
var _bind = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/bind"));
|
|
13909
|
+
var _forEach = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
|
|
13914
13910
|
var _setTimeout2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/set-timeout"));
|
|
13915
13911
|
var _uuid = _interopRequireDefault(_dereq_("./uuid"));
|
|
13916
13912
|
var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
|
|
@@ -13993,10 +13989,11 @@ const RESTController = {
|
|
|
13993
13989
|
if (xhr.status >= 200 && xhr.status < 300) {
|
|
13994
13990
|
let response;
|
|
13995
13991
|
try {
|
|
13992
|
+
var _context2, _context3;
|
|
13996
13993
|
response = JSON.parse(xhr.responseText);
|
|
13997
13994
|
const availableHeaders = typeof xhr.getAllResponseHeaders === 'function' ? xhr.getAllResponseHeaders() : '';
|
|
13998
13995
|
headers = {};
|
|
13999
|
-
if (typeof xhr.getResponseHeader === 'function' && availableHeaders?.
|
|
13996
|
+
if (typeof xhr.getResponseHeader === 'function' && ((_context2 = availableHeaders) == null ? void 0 : (0, _bind.default)(_context3 = Function.call).call(_context3, (0, _indexOf.default)(_context2), _context2))?.('access-control-expose-headers') >= 0) {
|
|
14000
13997
|
const responseHeaders = xhr.getResponseHeader('access-control-expose-headers').split(', ');
|
|
14001
13998
|
(0, _forEach.default)(responseHeaders).call(responseHeaders, header => {
|
|
14002
13999
|
if ((0, _indexOf.default)(availableHeaders).call(availableHeaders, header.toLowerCase()) >= 0) {
|
|
@@ -14133,6 +14130,9 @@ const RESTController = {
|
|
|
14133
14130
|
throw new Error('Cannot use the Master Key, it has not been provided.');
|
|
14134
14131
|
}
|
|
14135
14132
|
}
|
|
14133
|
+
if (options.useMaintenanceKey) {
|
|
14134
|
+
payload._MaintenanceKey = _CoreManager.default.get('MAINTENANCE_KEY');
|
|
14135
|
+
}
|
|
14136
14136
|
if (_CoreManager.default.get('FORCE_REVOCABLE_SESSION')) {
|
|
14137
14137
|
payload._RevocableSession = '1';
|
|
14138
14138
|
}
|
|
@@ -14208,10 +14208,9 @@ const RESTController = {
|
|
|
14208
14208
|
return XHR;
|
|
14209
14209
|
}
|
|
14210
14210
|
};
|
|
14211
|
-
module.exports = RESTController;
|
|
14212
14211
|
var _default = exports.default = RESTController;
|
|
14213
14212
|
}).call(this)}).call(this,_dereq_('_process'))
|
|
14214
|
-
},{"./CoreManager":4,"./ParseError":24,"./Xhr.weapp":52,"./promiseUtils":61,"./uuid":64,"@babel/runtime-corejs3/core-js-stable/instance/for-each":74,"@babel/runtime-corejs3/core-js-stable/instance/includes":75,"@babel/runtime-corejs3/core-js-stable/instance/index-of":76,"@babel/runtime-corejs3/core-js-stable/json/stringify":86,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/promise":98,"@babel/runtime-corejs3/core-js-stable/set-timeout":100,"@babel/runtime-corejs3/helpers/interopRequireDefault":104,"_process":108}],41:[function(_dereq_,module,exports){
|
|
14213
|
+
},{"./CoreManager":4,"./ParseError":24,"./Xhr.weapp":52,"./promiseUtils":61,"./uuid":64,"@babel/runtime-corejs3/core-js-stable/instance/bind":67,"@babel/runtime-corejs3/core-js-stable/instance/for-each":74,"@babel/runtime-corejs3/core-js-stable/instance/includes":75,"@babel/runtime-corejs3/core-js-stable/instance/index-of":76,"@babel/runtime-corejs3/core-js-stable/json/stringify":86,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/promise":98,"@babel/runtime-corejs3/core-js-stable/set-timeout":100,"@babel/runtime-corejs3/helpers/interopRequireDefault":104,"_process":108}],41:[function(_dereq_,module,exports){
|
|
14215
14214
|
"use strict";
|
|
14216
14215
|
|
|
14217
14216
|
var _WeakMap = _dereq_("@babel/runtime-corejs3/core-js-stable/weak-map");
|
|
@@ -14417,7 +14416,6 @@ class SocketWeapp {
|
|
|
14417
14416
|
wx.closeSocket();
|
|
14418
14417
|
}
|
|
14419
14418
|
}
|
|
14420
|
-
module.exports = SocketWeapp;
|
|
14421
14419
|
var _default = exports.default = SocketWeapp;
|
|
14422
14420
|
},{"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/defineProperty":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],43:[function(_dereq_,module,exports){
|
|
14423
14421
|
"use strict";
|
|
@@ -14510,7 +14508,6 @@ const Storage = {
|
|
|
14510
14508
|
}
|
|
14511
14509
|
}
|
|
14512
14510
|
};
|
|
14513
|
-
module.exports = Storage;
|
|
14514
14511
|
var _default = exports.default = Storage;
|
|
14515
14512
|
},{"./CoreManager":4,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/promise":98,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],44:[function(_dereq_,module,exports){
|
|
14516
14513
|
"use strict";
|
|
@@ -14549,7 +14546,6 @@ const StorageController = {
|
|
|
14549
14546
|
localStorage.clear();
|
|
14550
14547
|
}
|
|
14551
14548
|
};
|
|
14552
|
-
module.exports = StorageController;
|
|
14553
14549
|
var _default = exports.default = StorageController;
|
|
14554
14550
|
},{"@babel/runtime-corejs3/core-js-stable/object/define-property":91}],45:[function(_dereq_,module,exports){
|
|
14555
14551
|
"use strict";
|
|
@@ -14588,7 +14584,6 @@ const StorageController = {
|
|
|
14588
14584
|
}
|
|
14589
14585
|
}
|
|
14590
14586
|
};
|
|
14591
|
-
module.exports = StorageController;
|
|
14592
14587
|
var _default = exports.default = StorageController;
|
|
14593
14588
|
},{"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/object/keys":96,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],46:[function(_dereq_,module,exports){
|
|
14594
14589
|
"use strict";
|
|
@@ -14605,7 +14600,6 @@ var _StorageController3 = _interopRequireDefault(_dereq_("./StorageController.we
|
|
|
14605
14600
|
var _StorageController4 = _interopRequireDefault(_dereq_("./StorageController.default"));
|
|
14606
14601
|
let StorageController = _StorageController4.default;
|
|
14607
14602
|
StorageController = _StorageController2.default;
|
|
14608
|
-
module.exports = StorageController;
|
|
14609
14603
|
var _default = exports.default = StorageController;
|
|
14610
14604
|
},{"./StorageController.browser":44,"./StorageController.default":45,"./StorageController.react-native":47,"./StorageController.weapp":48,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],47:[function(_dereq_,module,exports){
|
|
14611
14605
|
"use strict";
|
|
@@ -14690,7 +14684,6 @@ const StorageController = {
|
|
|
14690
14684
|
return _CoreManager.default.getAsyncStorage().clear();
|
|
14691
14685
|
}
|
|
14692
14686
|
};
|
|
14693
|
-
module.exports = StorageController;
|
|
14694
14687
|
var _default = exports.default = StorageController;
|
|
14695
14688
|
},{"./CoreManager":4,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/promise":98,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],48:[function(_dereq_,module,exports){
|
|
14696
14689
|
"use strict";
|
|
@@ -14730,7 +14723,6 @@ const StorageController = {
|
|
|
14730
14723
|
wx.clearStorageSync();
|
|
14731
14724
|
}
|
|
14732
14725
|
};
|
|
14733
|
-
module.exports = StorageController;
|
|
14734
14726
|
var _default = exports.default = StorageController;
|
|
14735
14727
|
},{"@babel/runtime-corejs3/core-js-stable/instance/keys":77,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],49:[function(_dereq_,module,exports){
|
|
14736
14728
|
"use strict";
|
|
@@ -14779,7 +14771,6 @@ class TaskQueue {
|
|
|
14779
14771
|
}
|
|
14780
14772
|
}
|
|
14781
14773
|
}
|
|
14782
|
-
module.exports = TaskQueue;
|
|
14783
14774
|
var _default = exports.default = TaskQueue;
|
|
14784
14775
|
},{"./promiseUtils":61,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/defineProperty":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],50:[function(_dereq_,module,exports){
|
|
14785
14776
|
"use strict";
|
|
@@ -14963,7 +14954,6 @@ try {
|
|
|
14963
14954
|
} catch (_) {
|
|
14964
14955
|
// WebSocket unavailable
|
|
14965
14956
|
}
|
|
14966
|
-
module.exports = WebSocketController;
|
|
14967
14957
|
var _default = exports.default = WebSocketController;
|
|
14968
14958
|
},{"./Socket.weapp":42,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104,"ws":513}],52:[function(_dereq_,module,exports){
|
|
14969
14959
|
"use strict";
|
|
@@ -15077,7 +15067,6 @@ class XhrWeapp {
|
|
|
15077
15067
|
});
|
|
15078
15068
|
}
|
|
15079
15069
|
}
|
|
15080
|
-
module.exports = XhrWeapp;
|
|
15081
15070
|
var _default = exports.default = XhrWeapp;
|
|
15082
15071
|
},{"@babel/runtime-corejs3/core-js-stable/json/stringify":86,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/defineProperty":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],53:[function(_dereq_,module,exports){
|
|
15083
15072
|
"use strict";
|
|
@@ -15636,7 +15625,6 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
15636
15625
|
exports.default = void 0;
|
|
15637
15626
|
var _uuid = _dereq_("uuid");
|
|
15638
15627
|
let uuid = _uuid.v4;
|
|
15639
|
-
module.exports = uuid;
|
|
15640
15628
|
var _default = exports.default = uuid;
|
|
15641
15629
|
},{"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"uuid":492}],65:[function(_dereq_,module,exports){
|
|
15642
15630
|
module.exports = _dereq_("core-js-pure/stable/array/from");
|