parse 6.1.0 → 6.1.1
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/dist/parse.js +28 -38
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +28 -38
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/CoreManager.js +1 -1
- package/lib/browser/Parse.js +14 -14
- package/lib/browser/ParseObject.js +2 -1
- package/lib/browser/ParseOp.js +1 -1
- package/lib/browser/ParseQuery.js +8 -20
- package/lib/browser/TaskQueue.js +1 -0
- package/lib/node/CoreManager.js +1 -1
- package/lib/node/Parse.js +14 -14
- package/lib/node/ParseObject.js +2 -1
- package/lib/node/ParseOp.js +1 -1
- package/lib/node/ParseQuery.js +8 -20
- package/lib/node/TaskQueue.js +1 -0
- package/lib/react-native/CoreManager.js +1 -1
- package/lib/react-native/ObjectStateMutations.js +13 -13
- package/lib/react-native/ParseACL.js +7 -7
- package/lib/react-native/ParseCLP.js +15 -15
- package/lib/react-native/ParseObject.js +9 -9
- package/lib/react-native/ParseQuery.js +8 -16
- package/lib/react-native/ParseUser.js +15 -15
- package/lib/weapp/CoreManager.js +1 -1
- package/lib/weapp/Parse.js +14 -14
- package/lib/weapp/ParseObject.js +2 -1
- package/lib/weapp/ParseOp.js +1 -1
- package/lib/weapp/ParseQuery.js +8 -20
- package/lib/weapp/TaskQueue.js +1 -0
- package/package.json +8 -8
- package/types/Analytics.d.ts +1 -3
- package/types/CoreManager.d.ts +56 -62
- package/types/LocalDatastore.d.ts +3 -3
- package/types/LocalDatastoreController.default.d.ts +1 -1
- package/types/LocalDatastoreController.react-native.d.ts +1 -1
- package/types/ObjectStateMutations.d.ts +12 -18
- package/types/Parse.d.ts +63 -324
- package/types/ParseACL.d.ts +2 -6
- package/types/ParseCLP.d.ts +2 -6
- package/types/ParseConfig.d.ts +3 -11
- package/types/ParseFile.d.ts +8 -12
- package/types/ParseInstallation.d.ts +4 -4
- package/types/ParseObject.d.ts +24 -26
- package/types/ParseOp.d.ts +13 -15
- package/types/ParsePolygon.d.ts +3 -3
- package/types/ParseQuery.d.ts +39 -55
- package/types/ParseSchema.d.ts +12 -28
- package/types/ParseUser.d.ts +8 -14
- package/types/Push.d.ts +2 -2
- package/types/RESTController.d.ts +4 -4
- package/types/SingleInstanceStateController.d.ts +1 -1
- package/types/Storage.d.ts +2 -2
- package/types/StorageController.react-native.d.ts +2 -2
- package/types/TaskQueue.d.ts +3 -3
- package/types/UniqueInstanceStateController.d.ts +1 -1
- package/types/arrayContainsObject.d.ts +1 -1
- package/types/encode.d.ts +1 -1
- package/types/eslint.config.mjs +30 -0
- package/types/unique.d.ts +1 -1
- package/types/unsavedChildren.d.ts +1 -1
package/dist/parse.weapp.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Parse JavaScript SDK v6.1.
|
|
2
|
+
* Parse JavaScript SDK v6.1.1
|
|
3
3
|
*
|
|
4
4
|
* The source tree of this library can be found at
|
|
5
5
|
* https://github.com/ParsePlatform/Parse-SDK-JS
|
|
@@ -355,7 +355,7 @@ const config = {
|
|
|
355
355
|
SERVER_AUTH_TOKEN: null,
|
|
356
356
|
LIVEQUERY_SERVER_URL: null,
|
|
357
357
|
ENCRYPTED_KEY: null,
|
|
358
|
-
VERSION: 'js' + "6.1.
|
|
358
|
+
VERSION: 'js' + "6.1.1",
|
|
359
359
|
APPLICATION_ID: null,
|
|
360
360
|
JAVASCRIPT_KEY: null,
|
|
361
361
|
MAINTENANCE_KEY: null,
|
|
@@ -3410,7 +3410,7 @@ const Parse = {
|
|
|
3410
3410
|
Hooks: undefined,
|
|
3411
3411
|
Parse: undefined,
|
|
3412
3412
|
/**
|
|
3413
|
-
* @
|
|
3413
|
+
* @property {EventuallyQueue} Parse.EventuallyQueue
|
|
3414
3414
|
* @static
|
|
3415
3415
|
*/
|
|
3416
3416
|
set EventuallyQueue(queue) {
|
|
@@ -3476,7 +3476,7 @@ const Parse = {
|
|
|
3476
3476
|
return _CoreManager.default.getRESTController().request('GET', 'health');
|
|
3477
3477
|
},
|
|
3478
3478
|
/**
|
|
3479
|
-
* @
|
|
3479
|
+
* @property {string} Parse.applicationId
|
|
3480
3480
|
* @static
|
|
3481
3481
|
*/
|
|
3482
3482
|
set applicationId(value) {
|
|
@@ -3486,7 +3486,7 @@ const Parse = {
|
|
|
3486
3486
|
return _CoreManager.default.get('APPLICATION_ID');
|
|
3487
3487
|
},
|
|
3488
3488
|
/**
|
|
3489
|
-
* @
|
|
3489
|
+
* @property {string} Parse.javaScriptKey
|
|
3490
3490
|
* @static
|
|
3491
3491
|
*/
|
|
3492
3492
|
set javaScriptKey(value) {
|
|
@@ -3496,7 +3496,7 @@ const Parse = {
|
|
|
3496
3496
|
return _CoreManager.default.get('JAVASCRIPT_KEY');
|
|
3497
3497
|
},
|
|
3498
3498
|
/**
|
|
3499
|
-
* @
|
|
3499
|
+
* @property {string} Parse.masterKey
|
|
3500
3500
|
* @static
|
|
3501
3501
|
*/
|
|
3502
3502
|
set masterKey(value) {
|
|
@@ -3506,7 +3506,7 @@ const Parse = {
|
|
|
3506
3506
|
return _CoreManager.default.get('MASTER_KEY');
|
|
3507
3507
|
},
|
|
3508
3508
|
/**
|
|
3509
|
-
* @
|
|
3509
|
+
* @property {string} Parse.maintenanceKey
|
|
3510
3510
|
* @static
|
|
3511
3511
|
*/
|
|
3512
3512
|
set maintenanceKey(value) {
|
|
@@ -3516,7 +3516,7 @@ const Parse = {
|
|
|
3516
3516
|
return _CoreManager.default.get('MAINTENANCE_KEY');
|
|
3517
3517
|
},
|
|
3518
3518
|
/**
|
|
3519
|
-
* @
|
|
3519
|
+
* @property {string} Parse.serverURL
|
|
3520
3520
|
* @static
|
|
3521
3521
|
*/
|
|
3522
3522
|
set serverURL(value) {
|
|
@@ -3526,7 +3526,7 @@ const Parse = {
|
|
|
3526
3526
|
return _CoreManager.default.get('SERVER_URL');
|
|
3527
3527
|
},
|
|
3528
3528
|
/**
|
|
3529
|
-
* @
|
|
3529
|
+
* @property {string} Parse.serverAuthToken
|
|
3530
3530
|
* @static
|
|
3531
3531
|
*/
|
|
3532
3532
|
set serverAuthToken(value) {
|
|
@@ -3536,7 +3536,7 @@ const Parse = {
|
|
|
3536
3536
|
return _CoreManager.default.get('SERVER_AUTH_TOKEN');
|
|
3537
3537
|
},
|
|
3538
3538
|
/**
|
|
3539
|
-
* @
|
|
3539
|
+
* @property {string} Parse.serverAuthType
|
|
3540
3540
|
* @static
|
|
3541
3541
|
*/
|
|
3542
3542
|
set serverAuthType(value) {
|
|
@@ -3546,7 +3546,7 @@ const Parse = {
|
|
|
3546
3546
|
return _CoreManager.default.get('SERVER_AUTH_TYPE');
|
|
3547
3547
|
},
|
|
3548
3548
|
/**
|
|
3549
|
-
* @
|
|
3549
|
+
* @property {ParseLiveQuery} Parse.LiveQuery
|
|
3550
3550
|
* @static
|
|
3551
3551
|
*/
|
|
3552
3552
|
set LiveQuery(liveQuery) {
|
|
@@ -3556,7 +3556,7 @@ const Parse = {
|
|
|
3556
3556
|
return _CoreManager.default.getLiveQuery();
|
|
3557
3557
|
},
|
|
3558
3558
|
/**
|
|
3559
|
-
* @
|
|
3559
|
+
* @property {string} Parse.liveQueryServerURL
|
|
3560
3560
|
* @static
|
|
3561
3561
|
*/
|
|
3562
3562
|
set liveQueryServerURL(value) {
|
|
@@ -3566,7 +3566,7 @@ const Parse = {
|
|
|
3566
3566
|
return _CoreManager.default.get('LIVEQUERY_SERVER_URL');
|
|
3567
3567
|
},
|
|
3568
3568
|
/**
|
|
3569
|
-
* @
|
|
3569
|
+
* @property {boolean} Parse.encryptedUser
|
|
3570
3570
|
* @static
|
|
3571
3571
|
*/
|
|
3572
3572
|
set encryptedUser(value) {
|
|
@@ -3576,7 +3576,7 @@ const Parse = {
|
|
|
3576
3576
|
return _CoreManager.default.get('ENCRYPTED_USER');
|
|
3577
3577
|
},
|
|
3578
3578
|
/**
|
|
3579
|
-
* @
|
|
3579
|
+
* @property {string} Parse.secret
|
|
3580
3580
|
* @static
|
|
3581
3581
|
*/
|
|
3582
3582
|
set secret(value) {
|
|
@@ -3586,7 +3586,7 @@ const Parse = {
|
|
|
3586
3586
|
return _CoreManager.default.get('ENCRYPTED_KEY');
|
|
3587
3587
|
},
|
|
3588
3588
|
/**
|
|
3589
|
-
* @
|
|
3589
|
+
* @property {boolean} Parse.idempotency
|
|
3590
3590
|
* @static
|
|
3591
3591
|
*/
|
|
3592
3592
|
set idempotency(value) {
|
|
@@ -3596,7 +3596,7 @@ const Parse = {
|
|
|
3596
3596
|
return _CoreManager.default.get('IDEMPOTENCY');
|
|
3597
3597
|
},
|
|
3598
3598
|
/**
|
|
3599
|
-
* @
|
|
3599
|
+
* @property {boolean} Parse.allowCustomObjectId
|
|
3600
3600
|
* @static
|
|
3601
3601
|
*/
|
|
3602
3602
|
set allowCustomObjectId(value) {
|
|
@@ -7973,7 +7973,7 @@ class ParseObject {
|
|
|
7973
7973
|
*/
|
|
7974
7974
|
destroy(options) {
|
|
7975
7975
|
if (!this.id) {
|
|
7976
|
-
return _promise.default.resolve();
|
|
7976
|
+
return _promise.default.resolve(undefined);
|
|
7977
7977
|
}
|
|
7978
7978
|
const destroyOptions = ParseObject._getRequestOptions(options);
|
|
7979
7979
|
return _CoreManager.default.getObjectController().destroy(this, destroyOptions);
|
|
@@ -8957,6 +8957,7 @@ const DefaultController = {
|
|
|
8957
8957
|
const batchReady = [];
|
|
8958
8958
|
const batchTasks = [];
|
|
8959
8959
|
(0, _forEach.default)(batch).call(batch, (obj, index) => {
|
|
8960
|
+
// eslint-disable-next-line
|
|
8960
8961
|
const ready = (0, _promiseUtils.resolvingPromise)();
|
|
8961
8962
|
batchReady.push(ready);
|
|
8962
8963
|
stateController.pushPendingState(obj._getStateIdentifier());
|
|
@@ -9125,7 +9126,7 @@ function opFromJSON(json) {
|
|
|
9125
9126
|
class Op {
|
|
9126
9127
|
// Empty parent class
|
|
9127
9128
|
applyTo() {} /* eslint-disable-line @typescript-eslint/no-unused-vars */
|
|
9128
|
-
mergeWith() {} /* eslint-disable-line
|
|
9129
|
+
mergeWith() {} /* eslint-disable-line */
|
|
9129
9130
|
toJSON() {} /* eslint-disable-line @typescript-eslint/no-unused-vars */
|
|
9130
9131
|
}
|
|
9131
9132
|
exports.Op = Op;
|
|
@@ -10353,25 +10354,19 @@ class ParseQuery {
|
|
|
10353
10354
|
* Executes a distinct query and returns unique values
|
|
10354
10355
|
*
|
|
10355
10356
|
* @param {string} key A field to find distinct values
|
|
10356
|
-
* @param {object} options
|
|
10357
|
-
* @param {string} [options.sessionToken] A valid session token, used for making a request on behalf of a specific user.
|
|
10358
10357
|
* @returns {Promise} A promise that is resolved with the query completes.
|
|
10359
10358
|
*/
|
|
10360
|
-
distinct(key
|
|
10361
|
-
options = options || {};
|
|
10359
|
+
distinct(key) {
|
|
10362
10360
|
const distinctOptions = {
|
|
10363
10361
|
useMasterKey: true
|
|
10364
10362
|
};
|
|
10365
|
-
if (Object.hasOwn(options, 'sessionToken')) {
|
|
10366
|
-
distinctOptions.sessionToken = options.sessionToken;
|
|
10367
|
-
}
|
|
10368
10363
|
this._setRequestTask(distinctOptions);
|
|
10369
|
-
const controller = _CoreManager.default.getQueryController();
|
|
10370
10364
|
const params = {
|
|
10371
10365
|
distinct: key,
|
|
10372
10366
|
where: this._where,
|
|
10373
10367
|
hint: this._hint
|
|
10374
10368
|
};
|
|
10369
|
+
const controller = _CoreManager.default.getQueryController();
|
|
10375
10370
|
return controller.aggregate(this.className, params, distinctOptions).then(results => {
|
|
10376
10371
|
return results.results;
|
|
10377
10372
|
});
|
|
@@ -10381,20 +10376,9 @@ class ParseQuery {
|
|
|
10381
10376
|
* Executes an aggregate query and returns aggregate results
|
|
10382
10377
|
*
|
|
10383
10378
|
* @param {(Array|object)} pipeline Array or Object of stages to process query
|
|
10384
|
-
* @param {object} options
|
|
10385
|
-
* @param {string} [options.sessionToken] A valid session token, used for making a request on behalf of a specific user.
|
|
10386
10379
|
* @returns {Promise} A promise that is resolved with the query completes.
|
|
10387
10380
|
*/
|
|
10388
|
-
aggregate(pipeline
|
|
10389
|
-
options = options || {};
|
|
10390
|
-
const aggregateOptions = {
|
|
10391
|
-
useMasterKey: true
|
|
10392
|
-
};
|
|
10393
|
-
if (Object.hasOwn(options, 'sessionToken')) {
|
|
10394
|
-
aggregateOptions.sessionToken = options.sessionToken;
|
|
10395
|
-
}
|
|
10396
|
-
this._setRequestTask(aggregateOptions);
|
|
10397
|
-
const controller = _CoreManager.default.getQueryController();
|
|
10381
|
+
aggregate(pipeline) {
|
|
10398
10382
|
if (!(0, _isArray.default)(pipeline) && typeof pipeline !== 'object') {
|
|
10399
10383
|
throw new Error('Invalid pipeline must be Array or Object');
|
|
10400
10384
|
}
|
|
@@ -10412,6 +10396,11 @@ class ParseQuery {
|
|
|
10412
10396
|
explain: this._explain,
|
|
10413
10397
|
readPreference: this._readPreference
|
|
10414
10398
|
};
|
|
10399
|
+
const aggregateOptions = {
|
|
10400
|
+
useMasterKey: true
|
|
10401
|
+
};
|
|
10402
|
+
this._setRequestTask(aggregateOptions);
|
|
10403
|
+
const controller = _CoreManager.default.getQueryController();
|
|
10415
10404
|
return controller.aggregate(this.className, params, aggregateOptions).then(results => {
|
|
10416
10405
|
return results.results;
|
|
10417
10406
|
});
|
|
@@ -14737,6 +14726,7 @@ class TaskQueue {
|
|
|
14737
14726
|
this.queue = [];
|
|
14738
14727
|
}
|
|
14739
14728
|
enqueue(task) {
|
|
14729
|
+
// eslint-disable-next-line
|
|
14740
14730
|
const taskComplete = (0, _promiseUtils.resolvingPromise)();
|
|
14741
14731
|
this.queue.push({
|
|
14742
14732
|
task: task,
|