Socket
Socket
Sign inDemoInstall

parse

Package Overview
Dependencies
Maintainers
12
Versions
193
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse - npm Package Compare versions

Comparing version 3.5.1-alpha.1 to 3.5.1-alpha.2

2

lib/browser/CoreManager.js

@@ -227,3 +227,3 @@ "use strict";

ENCRYPTED_KEY: null,
VERSION: 'js' + "3.5.1-alpha.1",
VERSION: 'js' + "3.5.1-alpha.2",
APPLICATION_ID: null,

@@ -230,0 +230,0 @@ JAVASCRIPT_KEY: null,

@@ -512,3 +512,3 @@ "use strict";

var queueData, queueId, index, prop;
return _regeneratorRuntime().wrap(function (_context) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) {

@@ -556,6 +556,6 @@ switch (_context.prev = _context.next) {

},
store: function (data) {
store: function store(data) {
return _Storage.default.setItemAsync(QUEUE_KEY, (0, _stringify.default)(data));
},
load: function () {
load: function load() {
return _Storage.default.getItemAsync(QUEUE_KEY);

@@ -572,7 +572,9 @@ },

*/
getQueue: function ()
getQueue: function getQueue()
/*: Promise<Array>*/
{
var _this2 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
return _regeneratorRuntime().wrap(function (_context2) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) {

@@ -588,3 +590,3 @@ switch (_context2.prev = _context2.next) {

_context2.next = 4;
return this.load();
return _this2.load();

@@ -626,3 +628,3 @@ case 4:

*/
setQueue: function (queue
setQueue: function setQueue(queue
/*: Queue*/

@@ -644,3 +646,3 @@ )

*/
remove: function (queueId
remove: function remove(queueId
/*: string*/

@@ -654,3 +656,3 @@ )

var queueData, index;
return _regeneratorRuntime().wrap(function (_context3) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) {

@@ -692,3 +694,3 @@ switch (_context3.prev = _context3.next) {

*/
clear: function ()
clear: function clear()
/*: Promise*/

@@ -709,3 +711,3 @@ {

*/
queueItemExists: function (queue
queueItemExists: function queueItemExists(queue
/*: Queue*/

@@ -730,8 +732,10 @@ , queueId

*/
length: function ()
length: function length()
/*: number*/
{
var _this4 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
var queueData;
return _regeneratorRuntime().wrap(function (_context4) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) {

@@ -741,3 +745,3 @@ switch (_context4.prev = _context4.next) {

_context4.next = 2;
return this.getQueue();
return _this4.getQueue();

@@ -765,3 +769,3 @@ case 2:

*/
sendQueue: function ()
sendQueue: function sendQueue()
/*: Promise<boolean>*/

@@ -773,3 +777,3 @@ {

var queue, queueData, i, queueObject, id, hash, className, ObjectType;
return _regeneratorRuntime().wrap(function (_context5) {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) {

@@ -860,3 +864,3 @@ switch (_context5.prev = _context5.next) {

*/
sendQueueCallback: function (object
sendQueueCallback: function sendQueueCallback(object
/*: ParseObject*/

@@ -871,3 +875,3 @@ , queueObject

return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
return _regeneratorRuntime().wrap(function (_context6) {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) {

@@ -970,3 +974,3 @@ switch (_context6.prev = _context6.next) {

*/
poll: function () {
poll: function poll() {
var _this7 = this;

@@ -1006,3 +1010,3 @@

*/
stopPoll: function () {
stopPoll: function stopPoll() {
clearInterval(polling);

@@ -1020,3 +1024,3 @@ polling = undefined;

*/
isPolling: function ()
isPolling: function isPolling()
/*: boolean*/

@@ -1026,3 +1030,3 @@ {

},
_setPolling: function (flag
_setPolling: function _setPolling(flag
/*: boolean*/

@@ -1033,10 +1037,10 @@ ) {

process: {
create: function (ObjectType, queueObject) {
create: function create(ObjectType, queueObject) {
var object = new ObjectType();
return EventuallyQueue.sendQueueCallback(object, queueObject);
},
byId: function (ObjectType, queueObject) {
byId: function byId(ObjectType, queueObject) {
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
var sessionToken, query, results;
return _regeneratorRuntime().wrap(function (_context7) {
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) {

@@ -1065,6 +1069,6 @@ switch (_context7.prev = _context7.next) {

},
byHash: function (ObjectType, queueObject) {
byHash: function byHash(ObjectType, queueObject) {
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
var sessionToken, query, results;
return _regeneratorRuntime().wrap(function (_context8) {
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) {

@@ -1071,0 +1075,0 @@ switch (_context8.prev = _context8.next) {

@@ -370,2 +370,4 @@ "use strict";

{
var _this2 = this;
if (!query) {

@@ -397,3 +399,3 @@ return;

this.connectPromise.then(function () {
this.socket.send((0, _stringify.default)(subscribeRequest));
_this2.socket.send((0, _stringify.default)(subscribeRequest));
});

@@ -413,2 +415,4 @@ return subscription;

) {
var _this3 = this;
if (!subscription) {

@@ -424,3 +428,3 @@ return;

this.connectPromise.then(function () {
this.socket.send((0, _stringify.default)(unsubscribeRequest));
_this3.socket.send((0, _stringify.default)(unsubscribeRequest));
});

@@ -427,0 +431,0 @@ }

@@ -598,3 +598,3 @@ "use strict";

return _regeneratorRuntime().wrap(function (_context2) {
return _regeneratorRuntime().wrap(function _callee$(_context2) {
while (1) {

@@ -653,3 +653,3 @@ switch (_context2.prev = _context2.next) {

// Keeps the object and children pinned
_handleUnPinAllWithName: function (name
_handleUnPinAllWithName: function _handleUnPinAllWithName(name
/*: string*/

@@ -664,3 +664,3 @@ , objects

return _regeneratorRuntime().wrap(function (_context4) {
return _regeneratorRuntime().wrap(function _callee2$(_context4) {
while (1) {

@@ -787,3 +787,3 @@ switch (_context4.prev = _context4.next) {

// Retrieve all pointer fields from object recursively
_getChildren: function (object
_getChildren: function _getChildren(object
/*: ParseObject*/

@@ -803,3 +803,3 @@ ) {

},
_traverse: function (object
_traverse: function _traverse(object
/*: any*/

@@ -834,3 +834,3 @@ , encountered

// Transform keys in pin name to objects
_serializeObjectsFromPinName: function (name
_serializeObjectsFromPinName: function _serializeObjectsFromPinName(name
/*: string*/

@@ -844,3 +844,3 @@ ) {

var localDatastore, allObjects, key, pinName, pinned, promises, objects;
return _regeneratorRuntime().wrap(function (_context7) {
return _regeneratorRuntime().wrap(function _callee3$(_context7) {
while (1) {

@@ -905,3 +905,3 @@ switch (_context7.prev = _context7.next) {

// Uses Breadth First Search Algorithm
_serializeObject: function (objectKey
_serializeObject: function _serializeObject(objectKey
/*: string*/

@@ -915,3 +915,3 @@ , localDatastore

var LDS, root, queue, meta, uniqueId, nodeId, subTreeRoot, field, value, key, pointer;
return _regeneratorRuntime().wrap(function (_context8) {
return _regeneratorRuntime().wrap(function _callee4$(_context8) {
while (1) {

@@ -982,3 +982,3 @@ switch (_context8.prev = _context8.next) {

// Update object pin value
_updateObjectIfPinned: function (object
_updateObjectIfPinned: function _updateObjectIfPinned(object
/*: ParseObject*/

@@ -992,3 +992,3 @@ )

var objectKey, pinned;
return _regeneratorRuntime().wrap(function (_context9) {
return _regeneratorRuntime().wrap(function _callee5$(_context9) {
while (1) {

@@ -1033,3 +1033,3 @@ switch (_context9.prev = _context9.next) {

// TODO: Destroy children?
_destroyObjectIfPinned: function (object
_destroyObjectIfPinned: function _destroyObjectIfPinned(object
/*: ParseObject*/

@@ -1041,3 +1041,3 @@ ) {

var localDatastore, objectKey, pin, promises, key, pinned;
return _regeneratorRuntime().wrap(function (_context10) {
return _regeneratorRuntime().wrap(function _callee6$(_context10) {
while (1) {

@@ -1104,3 +1104,3 @@ switch (_context10.prev = _context10.next) {

// Update pin and references of the unsaved object
_updateLocalIdForObject: function (localId
_updateLocalIdForObject: function _updateLocalIdForObject(localId
/*: string*/

@@ -1116,3 +1116,3 @@ , object

var localKey, objectKey, unsaved, promises, localDatastore, key, pinned;
return _regeneratorRuntime().wrap(function (_context13) {
return _regeneratorRuntime().wrap(function _callee7$(_context13) {
while (1) {

@@ -1189,3 +1189,3 @@ switch (_context13.prev = _context13.next) {

*/
updateFromServer: function () {
updateFromServer: function updateFromServer() {
var _this8 = this;

@@ -1198,3 +1198,3 @@

return _regeneratorRuntime().wrap(function (_context15) {
return _regeneratorRuntime().wrap(function _callee8$(_context15) {
while (1) {

@@ -1318,3 +1318,3 @@ switch (_context15.prev = _context15.next) {

},
getKeyForObject: function (object
getKeyForObject: function getKeyForObject(object
/*: any*/

@@ -1328,3 +1328,3 @@ ) {

},
getPinName: function (pinName
getPinName: function getPinName(pinName
/*: ?string*/

@@ -1338,3 +1338,3 @@ ) {

},
checkIfEnabled: function () {
checkIfEnabled: function checkIfEnabled() {
if (!this.isEnabled) {

@@ -1341,0 +1341,0 @@ console.error('Parse.enableLocalDatastore() must be called first');

@@ -491,3 +491,3 @@ "use strict";

var values, objects;
return _regeneratorRuntime().wrap(function (_context) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) {

@@ -521,3 +521,3 @@ switch (_context.prev = _context.next) {

},
pinWithName: function (name
pinWithName: function pinWithName(name
/*: string*/

@@ -530,3 +530,3 @@ , value

},
unPinWithName: function (name
unPinWithName: function unPinWithName(name
/*: string*/

@@ -536,3 +536,3 @@ ) {

},
getAllContents: function ()
getAllContents: function getAllContents()
/*: Object*/

@@ -542,3 +542,3 @@ {

var keys;
return _regeneratorRuntime().wrap(function (_context3) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) {

@@ -555,3 +555,3 @@ switch (_context3.prev = _context3.next) {

var LDS, value;
return _regeneratorRuntime().wrap(function (_context2) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) {

@@ -594,3 +594,3 @@ switch (_context2.prev = _context2.next) {

return function () {
return function (_x, _x2) {
return _ref.apply(this, arguments);

@@ -609,3 +609,3 @@ };

// Used for testing
getRawStorage: function ()
getRawStorage: function getRawStorage()
/*: Object*/

@@ -615,3 +615,3 @@ {

var keys;
return _regeneratorRuntime().wrap(function (_context5) {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) {

@@ -628,3 +628,3 @@ switch (_context5.prev = _context5.next) {

var LDS, value;
return _regeneratorRuntime().wrap(function (_context4) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) {

@@ -654,3 +654,3 @@ switch (_context4.prev = _context4.next) {

return function () {
return function (_x3, _x4) {
return _ref2.apply(this, arguments);

@@ -668,9 +668,11 @@ };

},
clear: function ()
clear: function clear()
/*: Promise*/
{
var _this = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
var keys, toRemove, _iterator, _step, key, promises;
return _regeneratorRuntime().wrap(function (_context6) {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) {

@@ -701,3 +703,3 @@ switch (_context6.prev = _context6.next) {

promises = (0, _map.default)(toRemove).call(toRemove, this.unPinWithName);
promises = (0, _map.default)(toRemove).call(toRemove, _this.unPinWithName);
return _context6.abrupt("return", _promise.default.all(promises));

@@ -704,0 +706,0 @@

@@ -405,3 +405,3 @@ "use strict";

var values, objects;
return _regeneratorRuntime().wrap(function (_context) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) {

@@ -435,3 +435,3 @@ switch (_context.prev = _context.next) {

},
pinWithName: function (name
pinWithName: function pinWithName(name
/*: string*/

@@ -445,3 +445,3 @@ , value

var values;
return _regeneratorRuntime().wrap(function (_context2) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) {

@@ -473,3 +473,3 @@ switch (_context2.prev = _context2.next) {

},
unPinWithName: function (name
unPinWithName: function unPinWithName(name
/*: string*/

@@ -481,3 +481,3 @@ )

},
getAllContents: function ()
getAllContents: function getAllContents()
/*: Promise<Object>*/

@@ -487,3 +487,3 @@ {

var keys, batch, i, key, LDS, results;
return _regeneratorRuntime().wrap(function (_context3) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) {

@@ -547,3 +547,3 @@ switch (_context3.prev = _context3.next) {

// Used for testing
getRawStorage: function ()
getRawStorage: function getRawStorage()
/*: Promise<Object>*/

@@ -553,3 +553,3 @@ {

var keys, storage, results;
return _regeneratorRuntime().wrap(function (_context4) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) {

@@ -586,3 +586,3 @@ switch (_context4.prev = _context4.next) {

},
clear: function ()
clear: function clear()
/*: Promise<void>*/

@@ -592,3 +592,3 @@ {

var keys, batch, i, key;
return _regeneratorRuntime().wrap(function (_context5) {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) {

@@ -595,0 +595,0 @@ switch (_context5.prev = _context5.next) {

@@ -301,3 +301,3 @@ "use strict";

try {
var _loop = function () {
var _loop = function _loop() {
var _step$value = (0, _slicedToArray2.default)(_step.value, 2),

@@ -433,3 +433,3 @@ operation = _step$value[0],

key: "toJSON",
value: function ()
value: function toJSON()
/*: PermissionsMap*/

@@ -448,3 +448,3 @@ {

key: "equals",
value: function (other
value: function equals(other
/*: ParseCLP*/

@@ -492,3 +492,3 @@ )

key: "_getRoleName",
value: function (role
value: function _getRoleName(role
/*: ParseRole | string*/

@@ -513,3 +513,3 @@ )

key: "_parseEntity",
value: function (entity
value: function _parseEntity(entity
/*: Entity*/

@@ -537,3 +537,3 @@ ) {

key: "_setAccess",
value: function (permission
value: function _setAccess(permission
/*: string*/

@@ -570,3 +570,3 @@ , userId

key: "_getAccess",
value: function (permission
value: function _getAccess(permission
/*: string*/

@@ -594,3 +594,3 @@ , userId

key: "_setArrayAccess",
value: function (permission
value: function _setArrayAccess(permission
/*: string*/

@@ -621,3 +621,3 @@ , userId

key: "_setGroupPointerPermission",
value: function (operation
value: function _setGroupPointerPermission(operation
/*: string*/

@@ -645,3 +645,3 @@ , pointerFields

key: "_getGroupPointerPermissions",
value: function (operation
value: function _getGroupPointerPermissions(operation
/*: string*/

@@ -661,3 +661,3 @@ )

key: "setReadUserFields",
value: function (pointerFields
value: function setReadUserFields(pointerFields
/*: string[]*/

@@ -673,3 +673,3 @@ ) {

key: "getReadUserFields",
value: function ()
value: function getReadUserFields()
/*: string[]*/

@@ -687,3 +687,3 @@ {

key: "setWriteUserFields",
value: function (pointerFields
value: function setWriteUserFields(pointerFields
/*: string[]*/

@@ -699,3 +699,3 @@ ) {

key: "getWriteUserFields",
value: function ()
value: function getWriteUserFields()
/*: string[]*/

@@ -714,3 +714,3 @@ {

key: "setProtectedFields",
value: function (userId
value: function setProtectedFields(userId
/*: Entity*/

@@ -731,3 +731,3 @@ , fields

key: "getProtectedFields",
value: function (userId
value: function getProtectedFields(userId
/*: Entity*/

@@ -748,3 +748,3 @@ )

key: "setReadAccess",
value: function (userId
value: function setReadAccess(userId
/*: Entity*/

@@ -772,3 +772,3 @@ , allowed

key: "getReadAccess",
value: function (userId
value: function getReadAccess(userId
/*: Entity*/

@@ -789,3 +789,3 @@ )

key: "setWriteAccess",
value: function (userId
value: function setWriteAccess(userId
/*: Entity*/

@@ -815,3 +815,3 @@ , allowed

key: "getWriteAccess",
value: function (userId
value: function getWriteAccess(userId
/*: Entity*/

@@ -831,3 +831,3 @@ )

key: "setPublicReadAccess",
value: function (allowed
value: function setPublicReadAccess(allowed
/*: boolean*/

@@ -845,3 +845,3 @@ ) {

key: "getPublicReadAccess",
value: function ()
value: function getPublicReadAccess()
/*: boolean*/

@@ -859,3 +859,3 @@ {

key: "setPublicWriteAccess",
value: function (allowed
value: function setPublicWriteAccess(allowed
/*: boolean*/

@@ -873,3 +873,3 @@ ) {

key: "getPublicWriteAccess",
value: function ()
value: function getPublicWriteAccess()
/*: boolean*/

@@ -887,3 +887,3 @@ {

key: "setPublicProtectedFields",
value: function (fields
value: function setPublicProtectedFields(fields
/*: string[]*/

@@ -901,3 +901,3 @@ ) {

key: "getPublicProtectedFields",
value: function ()
value: function getPublicProtectedFields()
/*: string[]*/

@@ -919,3 +919,3 @@ {

key: "getRoleReadAccess",
value: function (role
value: function getRoleReadAccess(role
/*: ParseRole | string*/

@@ -939,3 +939,3 @@ )

key: "getRoleWriteAccess",
value: function (role
value: function getRoleWriteAccess(role
/*: ParseRole | string*/

@@ -958,3 +958,3 @@ )

key: "setRoleReadAccess",
value: function (role
value: function setRoleReadAccess(role
/*: ParseRole | string*/

@@ -977,3 +977,3 @@ , allowed

key: "setRoleWriteAccess",
value: function (role
value: function setRoleWriteAccess(role
/*: ParseRole | string*/

@@ -997,3 +997,3 @@ , allowed

key: "getRoleProtectedFields",
value: function (role
value: function getRoleProtectedFields(role
/*: ParseRole | string*/

@@ -1016,3 +1016,3 @@ )

key: "setRoleProtectedFields",
value: function (role
value: function setRoleProtectedFields(role
/*: ParseRole | string*/

@@ -1019,0 +1019,0 @@ , fields

@@ -626,2 +626,4 @@ "use strict";

var _getData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var _this = this;
var options, controller, result;

@@ -650,3 +652,3 @@ return _regeneratorRuntime().wrap(function (_context4) {

requestTask: function (task) {
return this._requestTask = task;
return _this._requestTask = task;
}

@@ -671,5 +673,7 @@ };

return function () {
function getData() {
return _getData.apply(this, arguments);
};
}
return getData;
}()

@@ -919,2 +923,4 @@ /**

) {
var _this4 = this;
if (metadata && (0, _typeof2.default)(metadata) === 'object') {

@@ -924,3 +930,3 @@ var _context5;

(0, _forEach.default)(_context5 = (0, _keys.default)(metadata)).call(_context5, function (key) {
this.addMetadata(key, metadata[key]);
_this4.addMetadata(key, metadata[key]);
});

@@ -958,2 +964,4 @@ }

) {
var _this5 = this;
if (tags && (0, _typeof2.default)(tags) === 'object') {

@@ -963,3 +971,3 @@ var _context6;

(0, _forEach.default)(_context6 = (0, _keys.default)(tags)).call(_context6, function (key) {
this.addTag(key, tags[key]);
_this5.addTag(key, tags[key]);
});

@@ -1035,3 +1043,3 @@ }

return _regeneratorRuntime().wrap(function (_context7) {
return _regeneratorRuntime().wrap(function _callee2$(_context7) {
while (1) {

@@ -1091,7 +1099,9 @@ switch (_context7.prev = _context7.next) {

return function () {
function saveFile(_x, _x2, _x3) {
return _saveFile.apply(this, arguments);
};
}
return saveFile;
}(),
saveBase64: function (name
saveBase64: function saveBase64(name
/*: string*/

@@ -1123,5 +1133,6 @@ , source

return _CoreManager.default.getRESTController().request('POST', 'files/' + name, data, options);
var path = 'files/' + name;
return _CoreManager.default.getRESTController().request('POST', path, data, options);
},
download: function (uri, options) {
download: function download(uri, options) {
if (XHR) {

@@ -1133,3 +1144,3 @@ return this.downloadAjax(uri, options);

},
downloadAjax: function (uri, options) {
downloadAjax: function downloadAjax(uri, options) {
return new _promise.default(function (resolve, reject) {

@@ -1164,3 +1175,3 @@ var xhr = new XHR();

},
deleteFile: function (name
deleteFile: function deleteFile(name
/*: string*/

@@ -1194,3 +1205,3 @@ , options

},
_setXHR: function (xhr
_setXHR: function _setXHR(xhr
/*: any*/

@@ -1200,3 +1211,3 @@ ) {

},
_getXHR: function () {
_getXHR: function _getXHR() {
return XHR;

@@ -1203,0 +1214,0 @@ }

@@ -445,3 +445,3 @@ "use strict";

var liveQueryClient;
return _regeneratorRuntime().wrap(function (_context) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) {

@@ -474,3 +474,3 @@ switch (_context.prev = _context.next) {

var liveQueryClient;
return _regeneratorRuntime().wrap(function (_context2) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) {

@@ -499,3 +499,3 @@ switch (_context2.prev = _context2.next) {

var DefaultLiveQueryController = {
setDefaultLiveQueryClient: function (liveQueryClient
setDefaultLiveQueryClient: function setDefaultLiveQueryClient(liveQueryClient
/*: LiveQueryClient*/

@@ -505,3 +505,3 @@ ) {

},
getDefaultLiveQueryClient: function ()
getDefaultLiveQueryClient: function getDefaultLiveQueryClient()
/*: Promise<LiveQueryClient>*/

@@ -512,3 +512,3 @@ {

return _regeneratorRuntime().wrap(function (_context3) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) {

@@ -584,3 +584,3 @@ switch (_context3.prev = _context3.next) {

},
_clearCachedDefaultClient: function () {
_clearCachedDefaultClient: function _clearCachedDefaultClient() {
defaultLiveQueryClient = null;

@@ -587,0 +587,0 @@ }

@@ -784,6 +784,8 @@ "use strict";

{
var _this7 = this;
var idToPointer = function (id) {
return {
__type: 'Pointer',
className: this._targetClassName,
className: _this7._targetClassName,
objectId: id

@@ -790,0 +792,0 @@ };

@@ -174,3 +174,3 @@ "use strict";

var dispatch = function dispatch() {
(function dispatch() {
if (XHR == null) {

@@ -304,8 +304,7 @@ throw new Error('Cannot make a request: No definition of XMLHttpRequest was found.');

}
};
})();
dispatch();
return promise;
},
request: function (method
request: function request(method
/*: string*/

@@ -425,3 +424,3 @@ , path

},
handleError: function (response) {
handleError: function handleError(response) {
// Transform the error into an instance of ParseError by trying to parse

@@ -446,3 +445,3 @@ // the error string as JSON

},
_setXHR: function (xhr
_setXHR: function _setXHR(xhr
/*: any*/

@@ -452,3 +451,3 @@ ) {

},
_getXHR: function () {
_getXHR: function _getXHR() {
return XHR;

@@ -455,0 +454,0 @@ }

@@ -220,3 +220,3 @@ "use strict";

ENCRYPTED_KEY: null,
VERSION: 'js' + "3.5.1-alpha.1",
VERSION: 'js' + "3.5.1-alpha.2",
APPLICATION_ID: null,

@@ -223,0 +223,0 @@ JAVASCRIPT_KEY: null,

@@ -11,3 +11,3 @@ var config = {

ENCRYPTED_KEY: null,
VERSION: 'js' + "3.5.1-alpha.1",
VERSION: 'js' + "3.5.1-alpha.2",
APPLICATION_ID: null,

@@ -14,0 +14,0 @@ JAVASCRIPT_KEY: null,

@@ -193,2 +193,4 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

value: function (query, sessionToken) {
var _this2 = this;
if (!query) {

@@ -220,3 +222,3 @@ return;

this.connectPromise.then(function () {
this.socket.send(JSON.stringify(subscribeRequest));
_this2.socket.send(JSON.stringify(subscribeRequest));
});

@@ -228,2 +230,4 @@ return subscription;

value: function (subscription) {
var _this3 = this;
if (!subscription) {

@@ -239,3 +243,3 @@ return;

this.connectPromise.then(function () {
this.socket.send(JSON.stringify(unsubscribeRequest));
_this3.socket.send(JSON.stringify(unsubscribeRequest));
});

@@ -242,0 +246,0 @@ }

@@ -619,3 +619,4 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

_serializeObjectsFromPinName: function (name) {
var _ref;
var _this = this,
_ref;

@@ -660,3 +661,3 @@ var localDatastore, allObjects, key, pinName, pinned, promises, objects;

promises = pinned.map(function (objectKey) {
return this.fromPinWithName(objectKey);
return _this.fromPinWithName(objectKey);
});

@@ -663,0 +664,0 @@ _context3.next = 14;

@@ -107,3 +107,3 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

var _loop = function (operation, group) {
var _loop = function _loop(operation, group) {
_this.permissionsMap[operation] = (0, _extends2.default)({}, group);

@@ -221,3 +221,3 @@ var action = operation.charAt(0).toUpperCase() + operation.slice(1);

key: "toJSON",
value: function () {
value: function toJSON() {
return _objectSpread({}, this.permissionsMap);

@@ -227,3 +227,3 @@ }

key: "equals",
value: function (other) {
value: function equals(other) {
if (!(other instanceof ParseCLP)) {

@@ -267,3 +267,3 @@ return false;

key: "_getRoleName",
value: function (role) {
value: function _getRoleName(role) {
var name = role;

@@ -283,3 +283,3 @@

key: "_parseEntity",
value: function (entity) {
value: function _parseEntity(entity) {
var userId = entity;

@@ -305,3 +305,3 @@

key: "_setAccess",
value: function (permission, userId, allowed) {
value: function _setAccess(permission, userId, allowed) {
userId = this._parseEntity(userId);

@@ -331,3 +331,3 @@

key: "_getAccess",
value: function (permission, userId) {
value: function _getAccess(permission, userId) {
var returnBoolean = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;

@@ -349,3 +349,3 @@ userId = this._parseEntity(userId);

key: "_setArrayAccess",
value: function (permission, userId, fields) {
value: function _setArrayAccess(permission, userId, fields) {
userId = this._parseEntity(userId);

@@ -370,3 +370,3 @@ var permissions = this.permissionsMap[permission][userId];

key: "_setGroupPointerPermission",
value: function (operation, pointerFields) {
value: function _setGroupPointerPermission(operation, pointerFields) {
var fields = this.permissionsMap[operation];

@@ -390,3 +390,3 @@

key: "_getGroupPointerPermissions",
value: function (operation) {
value: function _getGroupPointerPermissions(operation) {
return this.permissionsMap[operation];

@@ -396,3 +396,3 @@ }

key: "setReadUserFields",
value: function (pointerFields) {
value: function setReadUserFields(pointerFields) {
this._setGroupPointerPermission('readUserFields', pointerFields);

@@ -402,3 +402,3 @@ }

key: "getReadUserFields",
value: function () {
value: function getReadUserFields() {
return this._getGroupPointerPermissions('readUserFields');

@@ -408,3 +408,3 @@ }

key: "setWriteUserFields",
value: function (pointerFields) {
value: function setWriteUserFields(pointerFields) {
this._setGroupPointerPermission('writeUserFields', pointerFields);

@@ -414,3 +414,3 @@ }

key: "getWriteUserFields",
value: function () {
value: function getWriteUserFields() {
return this._getGroupPointerPermissions('writeUserFields');

@@ -420,3 +420,3 @@ }

key: "setProtectedFields",
value: function (userId, fields) {
value: function setProtectedFields(userId, fields) {
this._setArrayAccess('protectedFields', userId, fields);

@@ -426,3 +426,3 @@ }

key: "getProtectedFields",
value: function (userId) {
value: function getProtectedFields(userId) {
return this._getAccess('protectedFields', userId, false);

@@ -432,3 +432,3 @@ }

key: "setReadAccess",
value: function (userId, allowed) {
value: function setReadAccess(userId, allowed) {
this._setAccess('find', userId, allowed);

@@ -442,3 +442,3 @@

key: "getReadAccess",
value: function (userId) {
value: function getReadAccess(userId) {
return this._getAccess('find', userId) && this._getAccess('get', userId) && this._getAccess('count', userId);

@@ -448,3 +448,3 @@ }

key: "setWriteAccess",
value: function (userId, allowed) {
value: function setWriteAccess(userId, allowed) {
this._setAccess('create', userId, allowed);

@@ -460,3 +460,3 @@

key: "getWriteAccess",
value: function (userId) {
value: function getWriteAccess(userId) {
return this._getAccess('create', userId) && this._getAccess('update', userId) && this._getAccess('delete', userId) && this._getAccess('addField', userId);

@@ -466,3 +466,3 @@ }

key: "setPublicReadAccess",
value: function (allowed) {
value: function setPublicReadAccess(allowed) {
this.setReadAccess(PUBLIC_KEY, allowed);

@@ -472,3 +472,3 @@ }

key: "getPublicReadAccess",
value: function () {
value: function getPublicReadAccess() {
return this.getReadAccess(PUBLIC_KEY);

@@ -478,3 +478,3 @@ }

key: "setPublicWriteAccess",
value: function (allowed) {
value: function setPublicWriteAccess(allowed) {
this.setWriteAccess(PUBLIC_KEY, allowed);

@@ -484,3 +484,3 @@ }

key: "getPublicWriteAccess",
value: function () {
value: function getPublicWriteAccess() {
return this.getWriteAccess(PUBLIC_KEY);

@@ -490,3 +490,3 @@ }

key: "setPublicProtectedFields",
value: function (fields) {
value: function setPublicProtectedFields(fields) {
this.setProtectedFields(PUBLIC_KEY, fields);

@@ -496,3 +496,3 @@ }

key: "getPublicProtectedFields",
value: function () {
value: function getPublicProtectedFields() {
return this.getProtectedFields(PUBLIC_KEY);

@@ -502,3 +502,3 @@ }

key: "getRoleReadAccess",
value: function (role) {
value: function getRoleReadAccess(role) {
return this.getReadAccess(this._getRoleName(role));

@@ -508,3 +508,3 @@ }

key: "getRoleWriteAccess",
value: function (role) {
value: function getRoleWriteAccess(role) {
return this.getWriteAccess(this._getRoleName(role));

@@ -514,3 +514,3 @@ }

key: "setRoleReadAccess",
value: function (role, allowed) {
value: function setRoleReadAccess(role, allowed) {
this.setReadAccess(this._getRoleName(role), allowed);

@@ -520,3 +520,3 @@ }

key: "setRoleWriteAccess",
value: function (role, allowed) {
value: function setRoleWriteAccess(role, allowed) {
this.setWriteAccess(this._getRoleName(role), allowed);

@@ -526,3 +526,3 @@ }

key: "getRoleProtectedFields",
value: function (role) {
value: function getRoleProtectedFields(role) {
return this.getProtectedFields(this._getRoleName(role));

@@ -532,3 +532,3 @@ }

key: "setRoleProtectedFields",
value: function (role, fields) {
value: function setRoleProtectedFields(role, fields) {
this.setProtectedFields(this._getRoleName(role), fields);

@@ -535,0 +535,0 @@ }

@@ -473,2 +473,4 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

value: function () {
var _this = this;
var options, controller, result;

@@ -497,3 +499,3 @@ return _regeneratorRuntime().async(function (_context) {

requestTask: function (task) {
return this._requestTask = task;
return _this._requestTask = task;
}

@@ -663,5 +665,7 @@ };

value: function (metadata) {
var _this4 = this;
if (metadata && typeof metadata === 'object') {
Object.keys(metadata).forEach(function (key) {
this.addMetadata(key, metadata[key]);
_this4.addMetadata(key, metadata[key]);
});

@@ -680,5 +684,7 @@ }

value: function (tags) {
var _this5 = this;
if (tags && typeof tags === 'object') {
Object.keys(tags).forEach(function (key) {
this.addTag(key, tags[key]);
_this5.addTag(key, tags[key]);
});

@@ -685,0 +691,0 @@ }

@@ -651,6 +651,8 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

value: function () {
var _this7 = this;
var idToPointer = function (id) {
return {
__type: 'Pointer',
className: this._targetClassName,
className: _this7._targetClassName,
objectId: id

@@ -657,0 +659,0 @@ };

@@ -1015,2 +1015,4 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

value: function (options) {
var _this4 = this;
options = options || {};

@@ -1057,3 +1059,3 @@ var findOptions = {};

if (!objects[0].className) {
objects[0].className = this.className;
objects[0].className = _this4.className;
}

@@ -1226,2 +1228,4 @@

value: function (callback, options) {
var _this5 = this;
var array, index;

@@ -1236,3 +1240,3 @@ return _regeneratorRuntime().async(function (_context4) {

return _regeneratorRuntime().awrap(this.each(function (object) {
return Promise.resolve(callback(object, index, this)).then(function (result) {
return Promise.resolve(callback(object, index, _this5)).then(function (result) {
array.push(result);

@@ -1298,2 +1302,4 @@ index += 1;

value: function (callback, options) {
var _this6 = this;
var array, index;

@@ -1308,3 +1314,3 @@ return _regeneratorRuntime().async(function (_context6) {

return _regeneratorRuntime().awrap(this.each(function (object) {
return Promise.resolve(callback(object, index, this)).then(function (flag) {
return Promise.resolve(callback(object, index, _this6)).then(function (flag) {
if (flag) {

@@ -1331,2 +1337,4 @@ array.push(object);

value: function (key, value) {
var _this7 = this;
if (key && typeof key === 'object') {

@@ -1338,3 +1346,3 @@ Object.entries(key).forEach(function (_ref) {

return this.equalTo(k, val);
return _this7.equalTo(k, val);
});

@@ -1354,2 +1362,4 @@ return this;

value: function (key, value) {
var _this8 = this;
if (key && typeof key === 'object') {

@@ -1361,3 +1371,3 @@ Object.entries(key).forEach(function (_ref3) {

return this.notEqualTo(k, val);
return _this8.notEqualTo(k, val);
});

@@ -1412,2 +1422,4 @@ return this;

value: function (key, values) {
var _this = this;
if (!Array.isArray(values)) {

@@ -1419,3 +1431,3 @@ values = [values];

return {
$regex: this._regexStartWith(value)
$regex: _this._regexStartWith(value)
};

@@ -1874,2 +1886,4 @@ });

value: function () {
var _this14 = this;
if (this._xhrRequest.task && typeof this._xhrRequest.task.abort === 'function') {

@@ -1888,3 +1902,3 @@ this._xhrRequest.task._aborted = true;

return this._xhrRequest.onchange = function () {
return this.cancel();
return _this14.cancel();
};

@@ -1891,0 +1905,0 @@ }

@@ -107,3 +107,3 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

var dispatch = function dispatch() {
(function dispatch() {
if (XHR == null) {

@@ -232,8 +232,7 @@ throw new Error('Cannot make a request: No definition of XMLHttpRequest was found.');

}
};
})();
dispatch();
return promise;
},
request: function (method, path, data, options) {
request: function request(method, path, data, options) {
options = options || {};

@@ -344,3 +343,3 @@

},
handleError: function (response) {
handleError: function handleError(response) {
var error;

@@ -362,6 +361,6 @@

},
_setXHR: function (xhr) {
_setXHR: function _setXHR(xhr) {
XHR = xhr;
},
_getXHR: function () {
_getXHR: function _getXHR() {
return XHR;

@@ -368,0 +367,0 @@ }

@@ -227,3 +227,3 @@ "use strict";

ENCRYPTED_KEY: null,
VERSION: 'js' + "3.5.1-alpha.1",
VERSION: 'js' + "3.5.1-alpha.2",
APPLICATION_ID: null,

@@ -230,0 +230,0 @@ JAVASCRIPT_KEY: null,

@@ -512,3 +512,3 @@ "use strict";

var queueData, queueId, index, prop;
return _regeneratorRuntime().wrap(function (_context) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) {

@@ -556,6 +556,6 @@ switch (_context.prev = _context.next) {

},
store: function (data) {
store: function store(data) {
return _Storage.default.setItemAsync(QUEUE_KEY, (0, _stringify.default)(data));
},
load: function () {
load: function load() {
return _Storage.default.getItemAsync(QUEUE_KEY);

@@ -572,7 +572,9 @@ },

*/
getQueue: function ()
getQueue: function getQueue()
/*: Promise<Array>*/
{
var _this2 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
return _regeneratorRuntime().wrap(function (_context2) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) {

@@ -588,3 +590,3 @@ switch (_context2.prev = _context2.next) {

_context2.next = 4;
return this.load();
return _this2.load();

@@ -626,3 +628,3 @@ case 4:

*/
setQueue: function (queue
setQueue: function setQueue(queue
/*: Queue*/

@@ -644,3 +646,3 @@ )

*/
remove: function (queueId
remove: function remove(queueId
/*: string*/

@@ -654,3 +656,3 @@ )

var queueData, index;
return _regeneratorRuntime().wrap(function (_context3) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) {

@@ -692,3 +694,3 @@ switch (_context3.prev = _context3.next) {

*/
clear: function ()
clear: function clear()
/*: Promise*/

@@ -709,3 +711,3 @@ {

*/
queueItemExists: function (queue
queueItemExists: function queueItemExists(queue
/*: Queue*/

@@ -730,8 +732,10 @@ , queueId

*/
length: function ()
length: function length()
/*: number*/
{
var _this4 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
var queueData;
return _regeneratorRuntime().wrap(function (_context4) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) {

@@ -741,3 +745,3 @@ switch (_context4.prev = _context4.next) {

_context4.next = 2;
return this.getQueue();
return _this4.getQueue();

@@ -765,3 +769,3 @@ case 2:

*/
sendQueue: function ()
sendQueue: function sendQueue()
/*: Promise<boolean>*/

@@ -773,3 +777,3 @@ {

var queue, queueData, i, queueObject, id, hash, className, ObjectType;
return _regeneratorRuntime().wrap(function (_context5) {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) {

@@ -860,3 +864,3 @@ switch (_context5.prev = _context5.next) {

*/
sendQueueCallback: function (object
sendQueueCallback: function sendQueueCallback(object
/*: ParseObject*/

@@ -871,3 +875,3 @@ , queueObject

return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
return _regeneratorRuntime().wrap(function (_context6) {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) {

@@ -970,3 +974,3 @@ switch (_context6.prev = _context6.next) {

*/
poll: function () {
poll: function poll() {
var _this7 = this;

@@ -1006,3 +1010,3 @@

*/
stopPoll: function () {
stopPoll: function stopPoll() {
clearInterval(polling);

@@ -1020,3 +1024,3 @@ polling = undefined;

*/
isPolling: function ()
isPolling: function isPolling()
/*: boolean*/

@@ -1026,3 +1030,3 @@ {

},
_setPolling: function (flag
_setPolling: function _setPolling(flag
/*: boolean*/

@@ -1033,10 +1037,10 @@ ) {

process: {
create: function (ObjectType, queueObject) {
create: function create(ObjectType, queueObject) {
var object = new ObjectType();
return EventuallyQueue.sendQueueCallback(object, queueObject);
},
byId: function (ObjectType, queueObject) {
byId: function byId(ObjectType, queueObject) {
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
var sessionToken, query, results;
return _regeneratorRuntime().wrap(function (_context7) {
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) {

@@ -1065,6 +1069,6 @@ switch (_context7.prev = _context7.next) {

},
byHash: function (ObjectType, queueObject) {
byHash: function byHash(ObjectType, queueObject) {
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
var sessionToken, query, results;
return _regeneratorRuntime().wrap(function (_context8) {
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) {

@@ -1071,0 +1075,0 @@ switch (_context8.prev = _context8.next) {

@@ -370,2 +370,4 @@ "use strict";

{
var _this2 = this;
if (!query) {

@@ -397,3 +399,3 @@ return;

this.connectPromise.then(function () {
this.socket.send((0, _stringify.default)(subscribeRequest));
_this2.socket.send((0, _stringify.default)(subscribeRequest));
});

@@ -413,2 +415,4 @@ return subscription;

) {
var _this3 = this;
if (!subscription) {

@@ -424,3 +428,3 @@ return;

this.connectPromise.then(function () {
this.socket.send((0, _stringify.default)(unsubscribeRequest));
_this3.socket.send((0, _stringify.default)(unsubscribeRequest));
});

@@ -427,0 +431,0 @@ }

@@ -598,3 +598,3 @@ "use strict";

return _regeneratorRuntime().wrap(function (_context2) {
return _regeneratorRuntime().wrap(function _callee$(_context2) {
while (1) {

@@ -653,3 +653,3 @@ switch (_context2.prev = _context2.next) {

// Keeps the object and children pinned
_handleUnPinAllWithName: function (name
_handleUnPinAllWithName: function _handleUnPinAllWithName(name
/*: string*/

@@ -664,3 +664,3 @@ , objects

return _regeneratorRuntime().wrap(function (_context4) {
return _regeneratorRuntime().wrap(function _callee2$(_context4) {
while (1) {

@@ -787,3 +787,3 @@ switch (_context4.prev = _context4.next) {

// Retrieve all pointer fields from object recursively
_getChildren: function (object
_getChildren: function _getChildren(object
/*: ParseObject*/

@@ -803,3 +803,3 @@ ) {

},
_traverse: function (object
_traverse: function _traverse(object
/*: any*/

@@ -834,3 +834,3 @@ , encountered

// Transform keys in pin name to objects
_serializeObjectsFromPinName: function (name
_serializeObjectsFromPinName: function _serializeObjectsFromPinName(name
/*: string*/

@@ -844,3 +844,3 @@ ) {

var localDatastore, allObjects, key, pinName, pinned, promises, objects;
return _regeneratorRuntime().wrap(function (_context7) {
return _regeneratorRuntime().wrap(function _callee3$(_context7) {
while (1) {

@@ -905,3 +905,3 @@ switch (_context7.prev = _context7.next) {

// Uses Breadth First Search Algorithm
_serializeObject: function (objectKey
_serializeObject: function _serializeObject(objectKey
/*: string*/

@@ -915,3 +915,3 @@ , localDatastore

var LDS, root, queue, meta, uniqueId, nodeId, subTreeRoot, field, value, key, pointer;
return _regeneratorRuntime().wrap(function (_context8) {
return _regeneratorRuntime().wrap(function _callee4$(_context8) {
while (1) {

@@ -982,3 +982,3 @@ switch (_context8.prev = _context8.next) {

// Update object pin value
_updateObjectIfPinned: function (object
_updateObjectIfPinned: function _updateObjectIfPinned(object
/*: ParseObject*/

@@ -992,3 +992,3 @@ )

var objectKey, pinned;
return _regeneratorRuntime().wrap(function (_context9) {
return _regeneratorRuntime().wrap(function _callee5$(_context9) {
while (1) {

@@ -1033,3 +1033,3 @@ switch (_context9.prev = _context9.next) {

// TODO: Destroy children?
_destroyObjectIfPinned: function (object
_destroyObjectIfPinned: function _destroyObjectIfPinned(object
/*: ParseObject*/

@@ -1041,3 +1041,3 @@ ) {

var localDatastore, objectKey, pin, promises, key, pinned;
return _regeneratorRuntime().wrap(function (_context10) {
return _regeneratorRuntime().wrap(function _callee6$(_context10) {
while (1) {

@@ -1104,3 +1104,3 @@ switch (_context10.prev = _context10.next) {

// Update pin and references of the unsaved object
_updateLocalIdForObject: function (localId
_updateLocalIdForObject: function _updateLocalIdForObject(localId
/*: string*/

@@ -1116,3 +1116,3 @@ , object

var localKey, objectKey, unsaved, promises, localDatastore, key, pinned;
return _regeneratorRuntime().wrap(function (_context13) {
return _regeneratorRuntime().wrap(function _callee7$(_context13) {
while (1) {

@@ -1189,3 +1189,3 @@ switch (_context13.prev = _context13.next) {

*/
updateFromServer: function () {
updateFromServer: function updateFromServer() {
var _this8 = this;

@@ -1198,3 +1198,3 @@

return _regeneratorRuntime().wrap(function (_context15) {
return _regeneratorRuntime().wrap(function _callee8$(_context15) {
while (1) {

@@ -1318,3 +1318,3 @@ switch (_context15.prev = _context15.next) {

},
getKeyForObject: function (object
getKeyForObject: function getKeyForObject(object
/*: any*/

@@ -1328,3 +1328,3 @@ ) {

},
getPinName: function (pinName
getPinName: function getPinName(pinName
/*: ?string*/

@@ -1338,3 +1338,3 @@ ) {

},
checkIfEnabled: function () {
checkIfEnabled: function checkIfEnabled() {
if (!this.isEnabled) {

@@ -1341,0 +1341,0 @@ console.error('Parse.enableLocalDatastore() must be called first');

@@ -491,3 +491,3 @@ "use strict";

var values, objects;
return _regeneratorRuntime().wrap(function (_context) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) {

@@ -521,3 +521,3 @@ switch (_context.prev = _context.next) {

},
pinWithName: function (name
pinWithName: function pinWithName(name
/*: string*/

@@ -530,3 +530,3 @@ , value

},
unPinWithName: function (name
unPinWithName: function unPinWithName(name
/*: string*/

@@ -536,3 +536,3 @@ ) {

},
getAllContents: function ()
getAllContents: function getAllContents()
/*: Object*/

@@ -542,3 +542,3 @@ {

var keys;
return _regeneratorRuntime().wrap(function (_context3) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) {

@@ -555,3 +555,3 @@ switch (_context3.prev = _context3.next) {

var LDS, value;
return _regeneratorRuntime().wrap(function (_context2) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) {

@@ -594,3 +594,3 @@ switch (_context2.prev = _context2.next) {

return function () {
return function (_x, _x2) {
return _ref.apply(this, arguments);

@@ -609,3 +609,3 @@ };

// Used for testing
getRawStorage: function ()
getRawStorage: function getRawStorage()
/*: Object*/

@@ -615,3 +615,3 @@ {

var keys;
return _regeneratorRuntime().wrap(function (_context5) {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) {

@@ -628,3 +628,3 @@ switch (_context5.prev = _context5.next) {

var LDS, value;
return _regeneratorRuntime().wrap(function (_context4) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) {

@@ -654,3 +654,3 @@ switch (_context4.prev = _context4.next) {

return function () {
return function (_x3, _x4) {
return _ref2.apply(this, arguments);

@@ -668,9 +668,11 @@ };

},
clear: function ()
clear: function clear()
/*: Promise*/
{
var _this = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
var keys, toRemove, _iterator, _step, key, promises;
return _regeneratorRuntime().wrap(function (_context6) {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) {

@@ -701,3 +703,3 @@ switch (_context6.prev = _context6.next) {

promises = (0, _map.default)(toRemove).call(toRemove, this.unPinWithName);
promises = (0, _map.default)(toRemove).call(toRemove, _this.unPinWithName);
return _context6.abrupt("return", _promise.default.all(promises));

@@ -704,0 +706,0 @@

@@ -405,3 +405,3 @@ "use strict";

var values, objects;
return _regeneratorRuntime().wrap(function (_context) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) {

@@ -435,3 +435,3 @@ switch (_context.prev = _context.next) {

},
pinWithName: function (name
pinWithName: function pinWithName(name
/*: string*/

@@ -445,3 +445,3 @@ , value

var values;
return _regeneratorRuntime().wrap(function (_context2) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) {

@@ -473,3 +473,3 @@ switch (_context2.prev = _context2.next) {

},
unPinWithName: function (name
unPinWithName: function unPinWithName(name
/*: string*/

@@ -481,3 +481,3 @@ )

},
getAllContents: function ()
getAllContents: function getAllContents()
/*: Promise<Object>*/

@@ -487,3 +487,3 @@ {

var keys, batch, i, key, LDS, results;
return _regeneratorRuntime().wrap(function (_context3) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) {

@@ -547,3 +547,3 @@ switch (_context3.prev = _context3.next) {

// Used for testing
getRawStorage: function ()
getRawStorage: function getRawStorage()
/*: Promise<Object>*/

@@ -553,3 +553,3 @@ {

var keys, storage, results;
return _regeneratorRuntime().wrap(function (_context4) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) {

@@ -586,3 +586,3 @@ switch (_context4.prev = _context4.next) {

},
clear: function ()
clear: function clear()
/*: Promise<void>*/

@@ -592,3 +592,3 @@ {

var keys, batch, i, key;
return _regeneratorRuntime().wrap(function (_context5) {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) {

@@ -595,0 +595,0 @@ switch (_context5.prev = _context5.next) {

@@ -301,3 +301,3 @@ "use strict";

try {
var _loop = function () {
var _loop = function _loop() {
var _step$value = (0, _slicedToArray2.default)(_step.value, 2),

@@ -433,3 +433,3 @@ operation = _step$value[0],

key: "toJSON",
value: function ()
value: function toJSON()
/*: PermissionsMap*/

@@ -448,3 +448,3 @@ {

key: "equals",
value: function (other
value: function equals(other
/*: ParseCLP*/

@@ -492,3 +492,3 @@ )

key: "_getRoleName",
value: function (role
value: function _getRoleName(role
/*: ParseRole | string*/

@@ -513,3 +513,3 @@ )

key: "_parseEntity",
value: function (entity
value: function _parseEntity(entity
/*: Entity*/

@@ -537,3 +537,3 @@ ) {

key: "_setAccess",
value: function (permission
value: function _setAccess(permission
/*: string*/

@@ -570,3 +570,3 @@ , userId

key: "_getAccess",
value: function (permission
value: function _getAccess(permission
/*: string*/

@@ -594,3 +594,3 @@ , userId

key: "_setArrayAccess",
value: function (permission
value: function _setArrayAccess(permission
/*: string*/

@@ -621,3 +621,3 @@ , userId

key: "_setGroupPointerPermission",
value: function (operation
value: function _setGroupPointerPermission(operation
/*: string*/

@@ -645,3 +645,3 @@ , pointerFields

key: "_getGroupPointerPermissions",
value: function (operation
value: function _getGroupPointerPermissions(operation
/*: string*/

@@ -661,3 +661,3 @@ )

key: "setReadUserFields",
value: function (pointerFields
value: function setReadUserFields(pointerFields
/*: string[]*/

@@ -673,3 +673,3 @@ ) {

key: "getReadUserFields",
value: function ()
value: function getReadUserFields()
/*: string[]*/

@@ -687,3 +687,3 @@ {

key: "setWriteUserFields",
value: function (pointerFields
value: function setWriteUserFields(pointerFields
/*: string[]*/

@@ -699,3 +699,3 @@ ) {

key: "getWriteUserFields",
value: function ()
value: function getWriteUserFields()
/*: string[]*/

@@ -714,3 +714,3 @@ {

key: "setProtectedFields",
value: function (userId
value: function setProtectedFields(userId
/*: Entity*/

@@ -731,3 +731,3 @@ , fields

key: "getProtectedFields",
value: function (userId
value: function getProtectedFields(userId
/*: Entity*/

@@ -748,3 +748,3 @@ )

key: "setReadAccess",
value: function (userId
value: function setReadAccess(userId
/*: Entity*/

@@ -772,3 +772,3 @@ , allowed

key: "getReadAccess",
value: function (userId
value: function getReadAccess(userId
/*: Entity*/

@@ -789,3 +789,3 @@ )

key: "setWriteAccess",
value: function (userId
value: function setWriteAccess(userId
/*: Entity*/

@@ -815,3 +815,3 @@ , allowed

key: "getWriteAccess",
value: function (userId
value: function getWriteAccess(userId
/*: Entity*/

@@ -831,3 +831,3 @@ )

key: "setPublicReadAccess",
value: function (allowed
value: function setPublicReadAccess(allowed
/*: boolean*/

@@ -845,3 +845,3 @@ ) {

key: "getPublicReadAccess",
value: function ()
value: function getPublicReadAccess()
/*: boolean*/

@@ -859,3 +859,3 @@ {

key: "setPublicWriteAccess",
value: function (allowed
value: function setPublicWriteAccess(allowed
/*: boolean*/

@@ -873,3 +873,3 @@ ) {

key: "getPublicWriteAccess",
value: function ()
value: function getPublicWriteAccess()
/*: boolean*/

@@ -887,3 +887,3 @@ {

key: "setPublicProtectedFields",
value: function (fields
value: function setPublicProtectedFields(fields
/*: string[]*/

@@ -901,3 +901,3 @@ ) {

key: "getPublicProtectedFields",
value: function ()
value: function getPublicProtectedFields()
/*: string[]*/

@@ -919,3 +919,3 @@ {

key: "getRoleReadAccess",
value: function (role
value: function getRoleReadAccess(role
/*: ParseRole | string*/

@@ -939,3 +939,3 @@ )

key: "getRoleWriteAccess",
value: function (role
value: function getRoleWriteAccess(role
/*: ParseRole | string*/

@@ -958,3 +958,3 @@ )

key: "setRoleReadAccess",
value: function (role
value: function setRoleReadAccess(role
/*: ParseRole | string*/

@@ -977,3 +977,3 @@ , allowed

key: "setRoleWriteAccess",
value: function (role
value: function setRoleWriteAccess(role
/*: ParseRole | string*/

@@ -997,3 +997,3 @@ , allowed

key: "getRoleProtectedFields",
value: function (role
value: function getRoleProtectedFields(role
/*: ParseRole | string*/

@@ -1016,3 +1016,3 @@ )

key: "setRoleProtectedFields",
value: function (role
value: function setRoleProtectedFields(role
/*: ParseRole | string*/

@@ -1019,0 +1019,0 @@ , fields

@@ -628,2 +628,4 @@ "use strict";

var _getData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var _this = this;
var options, controller, result;

@@ -652,3 +654,3 @@ return _regeneratorRuntime().wrap(function (_context4) {

requestTask: function (task) {
return this._requestTask = task;
return _this._requestTask = task;
}

@@ -673,5 +675,7 @@ };

return function () {
function getData() {
return _getData.apply(this, arguments);
};
}
return getData;
}()

@@ -921,2 +925,4 @@ /**

) {
var _this4 = this;
if (metadata && (0, _typeof2.default)(metadata) === 'object') {

@@ -926,3 +932,3 @@ var _context5;

(0, _forEach.default)(_context5 = (0, _keys.default)(metadata)).call(_context5, function (key) {
this.addMetadata(key, metadata[key]);
_this4.addMetadata(key, metadata[key]);
});

@@ -960,2 +966,4 @@ }

) {
var _this5 = this;
if (tags && (0, _typeof2.default)(tags) === 'object') {

@@ -965,3 +973,3 @@ var _context6;

(0, _forEach.default)(_context6 = (0, _keys.default)(tags)).call(_context6, function (key) {
this.addTag(key, tags[key]);
_this5.addTag(key, tags[key]);
});

@@ -1037,3 +1045,3 @@ }

return _regeneratorRuntime().wrap(function (_context7) {
return _regeneratorRuntime().wrap(function _callee2$(_context7) {
while (1) {

@@ -1093,7 +1101,9 @@ switch (_context7.prev = _context7.next) {

return function () {
function saveFile(_x, _x2, _x3) {
return _saveFile.apply(this, arguments);
};
}
return saveFile;
}(),
saveBase64: function (name
saveBase64: function saveBase64(name
/*: string*/

@@ -1125,5 +1135,6 @@ , source

return _CoreManager.default.getRESTController().request('POST', 'files/' + name, data, options);
var path = 'files/' + name;
return _CoreManager.default.getRESTController().request('POST', path, data, options);
},
download: function (uri, options) {
download: function download(uri, options) {
if (XHR) {

@@ -1135,3 +1146,3 @@ return this.downloadAjax(uri, options);

},
downloadAjax: function (uri, options) {
downloadAjax: function downloadAjax(uri, options) {
return new _promise.default(function (resolve, reject) {

@@ -1166,3 +1177,3 @@ var xhr = new XHR();

},
deleteFile: function (name
deleteFile: function deleteFile(name
/*: string*/

@@ -1196,3 +1207,3 @@ , options

},
_setXHR: function (xhr
_setXHR: function _setXHR(xhr
/*: any*/

@@ -1202,3 +1213,3 @@ ) {

},
_getXHR: function () {
_getXHR: function _getXHR() {
return XHR;

@@ -1205,0 +1216,0 @@ }

@@ -445,3 +445,3 @@ "use strict";

var liveQueryClient;
return _regeneratorRuntime().wrap(function (_context) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) {

@@ -474,3 +474,3 @@ switch (_context.prev = _context.next) {

var liveQueryClient;
return _regeneratorRuntime().wrap(function (_context2) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) {

@@ -499,3 +499,3 @@ switch (_context2.prev = _context2.next) {

var DefaultLiveQueryController = {
setDefaultLiveQueryClient: function (liveQueryClient
setDefaultLiveQueryClient: function setDefaultLiveQueryClient(liveQueryClient
/*: LiveQueryClient*/

@@ -505,3 +505,3 @@ ) {

},
getDefaultLiveQueryClient: function ()
getDefaultLiveQueryClient: function getDefaultLiveQueryClient()
/*: Promise<LiveQueryClient>*/

@@ -512,3 +512,3 @@ {

return _regeneratorRuntime().wrap(function (_context3) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) {

@@ -584,3 +584,3 @@ switch (_context3.prev = _context3.next) {

},
_clearCachedDefaultClient: function () {
_clearCachedDefaultClient: function _clearCachedDefaultClient() {
defaultLiveQueryClient = null;

@@ -587,0 +587,0 @@ }

@@ -784,6 +784,8 @@ "use strict";

{
var _this7 = this;
var idToPointer = function (id) {
return {
__type: 'Pointer',
className: this._targetClassName,
className: _this7._targetClassName,
objectId: id

@@ -790,0 +792,0 @@ };

@@ -175,3 +175,3 @@ "use strict";

var dispatch = function dispatch() {
(function dispatch() {
if (XHR == null) {

@@ -305,8 +305,7 @@ throw new Error('Cannot make a request: No definition of XMLHttpRequest was found.');

}
};
})();
dispatch();
return promise;
},
request: function (method
request: function request(method
/*: string*/

@@ -426,3 +425,3 @@ , path

},
handleError: function (response) {
handleError: function handleError(response) {
// Transform the error into an instance of ParseError by trying to parse

@@ -447,3 +446,3 @@ // the error string as JSON

},
_setXHR: function (xhr
_setXHR: function _setXHR(xhr
/*: any*/

@@ -453,3 +452,3 @@ ) {

},
_getXHR: function () {
_getXHR: function _getXHR() {
return XHR;

@@ -456,0 +455,0 @@ }

{
"name": "parse",
"version": "3.5.1-alpha.1",
"version": "3.5.1-alpha.2",
"description": "The Parse JavaScript SDK",

@@ -59,3 +59,3 @@ "homepage": "https://parseplatform.org/",

"babel-plugin-inline-package-json": "2.0.0",
"babel-plugin-minify-dead-code-elimination": "0.5.1",
"babel-plugin-minify-dead-code-elimination": "0.5.2",
"babel-plugin-transform-inline-environment-variables": "0.4.3",

@@ -88,2 +88,3 @@ "browserify": "16.5.1",

"prettier": "2.2.1",
"puppeteer": "19.2.2",
"regenerator-runtime": "0.13.5",

@@ -90,0 +91,0 @@ "semantic-release": "19.0.3",

@@ -5,3 +5,4 @@ ![parse-repository-header-sdk-js](https://user-images.githubusercontent.com/5673677/138293960-641c96bf-1293-4061-99a5-a4ed09868e1c.png)

[![Build Status CI alpha](https://github.com/parse-community/Parse-SDK-JS/workflows/ci/badge.svg?branch=alpha)](https://github.com/parse-community/Parse-SDK-JS/actions?query=workflow%3Aci+branch%3Aalpha)
[![Build Status CI alpha](https://github.com/parse-community/Parse-SDK-JS/workflows/ci/badge.svg?branch=alpha&subject=alpha)](https://github.com/parse-community/Parse-SDK-JS/actions?query=workflow%3Aci+branch%3Aalpha)
[![Build Status CI beta](https://github.com/parse-community/Parse-SDK-JS/workflows/ci/badge.svg?branch=beta)](https://github.com/parse-community/Parse-SDK-JS/actions?query=workflow%3Aci+branch%3Abeta)
[![Build Status CI release](https://github.com/parse-community/Parse-SDK-JS/workflows/ci/badge.svg?branch=release)](https://github.com/parse-community/Parse-SDK-JS/actions?query=workflow%3Aci+branch%3Arelease)

@@ -8,0 +9,0 @@ [![Snyk Badge](https://snyk.io/test/github/parse-community/Parse-SDK-JS/badge.svg)](https://snyk.io/test/github/parse-community/Parse-SDK-JS)

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc