parse 4.3.0-alpha.2 → 4.3.0-alpha.4
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 +32 -26
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +971 -630
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/CoreManager.js +1 -1
- package/lib/browser/IndexedDBStorageController.js +25 -20
- package/lib/browser/Parse.js +2 -1
- package/lib/browser/ParseObject.js +2 -2
- package/lib/node/CoreManager.js +1 -1
- package/lib/node/IndexedDBStorageController.js +24 -19
- package/lib/node/Parse.js +1 -0
- package/lib/node/ParseObject.js +2 -2
- package/lib/react-native/CoreManager.js +1 -1
- package/lib/react-native/IndexedDBStorageController.js +24 -20
- package/lib/react-native/Parse.js +1 -0
- package/lib/react-native/ParseObject.js +2 -2
- package/lib/weapp/CoreManager.js +1 -1
- package/lib/weapp/IndexedDBStorageController.js +25 -20
- package/lib/weapp/Parse.js +1 -0
- package/lib/weapp/ParseObject.js +2 -2
- package/package.json +2 -2
|
@@ -187,7 +187,7 @@ var config /*: Config & { [key: string]: mixed }*/ = {
|
|
|
187
187
|
SERVER_AUTH_TOKEN: null,
|
|
188
188
|
LIVEQUERY_SERVER_URL: null,
|
|
189
189
|
ENCRYPTED_KEY: null,
|
|
190
|
-
VERSION: 'js' + "4.3.0-alpha.
|
|
190
|
+
VERSION: 'js' + "4.3.0-alpha.4",
|
|
191
191
|
APPLICATION_ID: null,
|
|
192
192
|
JAVASCRIPT_KEY: null,
|
|
193
193
|
MASTER_KEY: null,
|
|
@@ -8,26 +8,31 @@ var _idbKeyval = require("idb-keyval");
|
|
|
8
8
|
/* global window */
|
|
9
9
|
|
|
10
10
|
if (typeof window !== 'undefined' && window.indexedDB) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
11
|
+
try {
|
|
12
|
+
var ParseStore = (0, _idbKeyval.createStore)('parseDB', 'parseStore');
|
|
13
|
+
var IndexedDBStorageController = {
|
|
14
|
+
async: 1,
|
|
15
|
+
getItemAsync: function (path /*: string*/) {
|
|
16
|
+
return (0, _idbKeyval.get)(path, ParseStore);
|
|
17
|
+
},
|
|
18
|
+
setItemAsync: function (path /*: string*/, value /*: string*/) {
|
|
19
|
+
return (0, _idbKeyval.set)(path, value, ParseStore);
|
|
20
|
+
},
|
|
21
|
+
removeItemAsync: function (path /*: string*/) {
|
|
22
|
+
return (0, _idbKeyval.del)(path, ParseStore);
|
|
23
|
+
},
|
|
24
|
+
getAllKeysAsync: function () {
|
|
25
|
+
return (0, _keysInstanceProperty(_idbKeyval))(ParseStore);
|
|
26
|
+
},
|
|
27
|
+
clear: function () {
|
|
28
|
+
return (0, _idbKeyval.clear)(ParseStore);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
module.exports = IndexedDBStorageController;
|
|
32
|
+
} catch (_) {
|
|
33
|
+
// IndexedDB not accessible
|
|
34
|
+
module.exports = undefined;
|
|
35
|
+
}
|
|
31
36
|
} else {
|
|
32
37
|
// IndexedDB not supported
|
|
33
38
|
module.exports = undefined;
|
package/lib/browser/Parse.js
CHANGED
|
@@ -14,6 +14,7 @@ var _decode2 = _interopRequireDefault(require("./decode"));
|
|
|
14
14
|
var _encode2 = _interopRequireDefault(require("./encode"));
|
|
15
15
|
var _CryptoController = _interopRequireDefault(require("./CryptoController"));
|
|
16
16
|
var _EventuallyQueue = _interopRequireDefault(require("./EventuallyQueue"));
|
|
17
|
+
var _IndexedDBStorageController = _interopRequireDefault(require("./IndexedDBStorageController"));
|
|
17
18
|
var _InstallationController = _interopRequireDefault(require("./InstallationController"));
|
|
18
19
|
var ParseOp = _interopRequireWildcard(require("./ParseOp"));
|
|
19
20
|
var _RESTController = _interopRequireDefault(require("./RESTController"));
|
|
@@ -154,6 +155,7 @@ var Parse /*: ParseType*/ = {
|
|
|
154
155
|
_CoreManager.default.setIfNeeded('EventEmitter', _EventEmitter.default);
|
|
155
156
|
Parse.LiveQuery = new _ParseLiveQuery.default();
|
|
156
157
|
_CoreManager.default.setIfNeeded('LiveQuery', Parse.LiveQuery);
|
|
158
|
+
Parse.IndexedDB = _CoreManager.default.setIfNeeded('IndexedDBStorageController', _IndexedDBStorageController.default);
|
|
157
159
|
},
|
|
158
160
|
/**
|
|
159
161
|
* Call this method to set your AsyncStorage engine
|
|
@@ -385,7 +387,6 @@ var Parse /*: ParseType*/ = {
|
|
|
385
387
|
return this.encryptedUser;
|
|
386
388
|
}
|
|
387
389
|
};
|
|
388
|
-
Parse.IndexedDB = require('./IndexedDBStorageController');
|
|
389
390
|
_CoreManager.default.setCryptoController(_CryptoController.default);
|
|
390
391
|
_CoreManager.default.setInstallationController(_InstallationController.default);
|
|
391
392
|
_CoreManager.default.setRESTController(_RESTController.default);
|
|
@@ -1473,7 +1473,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
1473
1473
|
case 5:
|
|
1474
1474
|
_context4.prev = 5;
|
|
1475
1475
|
_context4.t0 = _context4["catch"](0);
|
|
1476
|
-
if (!(_context4.t0.
|
|
1476
|
+
if (!(_context4.t0.code === _ParseError.default.CONNECTION_FAILED)) {
|
|
1477
1477
|
_context4.next = 11;
|
|
1478
1478
|
break;
|
|
1479
1479
|
}
|
|
@@ -1639,7 +1639,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
1639
1639
|
case 5:
|
|
1640
1640
|
_context5.prev = 5;
|
|
1641
1641
|
_context5.t0 = _context5["catch"](0);
|
|
1642
|
-
if (!(_context5.t0.
|
|
1642
|
+
if (!(_context5.t0.code === _ParseError.default.CONNECTION_FAILED)) {
|
|
1643
1643
|
_context5.next = 11;
|
|
1644
1644
|
break;
|
|
1645
1645
|
}
|
package/lib/node/CoreManager.js
CHANGED
|
@@ -183,7 +183,7 @@ const config /*: Config & { [key: string]: mixed }*/ = {
|
|
|
183
183
|
SERVER_AUTH_TOKEN: null,
|
|
184
184
|
LIVEQUERY_SERVER_URL: null,
|
|
185
185
|
ENCRYPTED_KEY: null,
|
|
186
|
-
VERSION: 'js' + "4.3.0-alpha.
|
|
186
|
+
VERSION: 'js' + "4.3.0-alpha.4",
|
|
187
187
|
APPLICATION_ID: null,
|
|
188
188
|
JAVASCRIPT_KEY: null,
|
|
189
189
|
MASTER_KEY: null,
|
|
@@ -7,25 +7,30 @@ var _idbKeyval = require("idb-keyval");
|
|
|
7
7
|
/* global window */
|
|
8
8
|
|
|
9
9
|
if (typeof window !== 'undefined' && window.indexedDB) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
10
|
+
try {
|
|
11
|
+
const ParseStore = (0, _idbKeyval.createStore)('parseDB', 'parseStore');
|
|
12
|
+
module.exports = {
|
|
13
|
+
async: 1,
|
|
14
|
+
getItemAsync(path /*: string*/) {
|
|
15
|
+
return (0, _idbKeyval.get)(path, ParseStore);
|
|
16
|
+
},
|
|
17
|
+
setItemAsync(path /*: string*/, value /*: string*/) {
|
|
18
|
+
return (0, _idbKeyval.set)(path, value, ParseStore);
|
|
19
|
+
},
|
|
20
|
+
removeItemAsync(path /*: string*/) {
|
|
21
|
+
return (0, _idbKeyval.del)(path, ParseStore);
|
|
22
|
+
},
|
|
23
|
+
getAllKeysAsync() {
|
|
24
|
+
return (0, _idbKeyval.keys)(ParseStore);
|
|
25
|
+
},
|
|
26
|
+
clear() {
|
|
27
|
+
return (0, _idbKeyval.clear)(ParseStore);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
} catch (_) {
|
|
31
|
+
// IndexedDB not accessible
|
|
32
|
+
module.exports = undefined;
|
|
33
|
+
}
|
|
29
34
|
} else {
|
|
30
35
|
// IndexedDB not supported
|
|
31
36
|
module.exports = undefined;
|
package/lib/node/Parse.js
CHANGED
|
@@ -8,6 +8,7 @@ var _decode2 = _interopRequireDefault(require("./decode"));
|
|
|
8
8
|
var _encode2 = _interopRequireDefault(require("./encode"));
|
|
9
9
|
var _CryptoController = _interopRequireDefault(require("./CryptoController"));
|
|
10
10
|
var _EventuallyQueue = _interopRequireDefault(require("./EventuallyQueue"));
|
|
11
|
+
var _IndexedDBStorageController = _interopRequireDefault(require("./IndexedDBStorageController"));
|
|
11
12
|
var _InstallationController = _interopRequireDefault(require("./InstallationController"));
|
|
12
13
|
var ParseOp = _interopRequireWildcard(require("./ParseOp"));
|
|
13
14
|
var _RESTController = _interopRequireDefault(require("./RESTController"));
|
package/lib/node/ParseObject.js
CHANGED
|
@@ -1206,7 +1206,7 @@ class ParseObject {
|
|
|
1206
1206
|
try {
|
|
1207
1207
|
await this.save(null, options);
|
|
1208
1208
|
} catch (e) {
|
|
1209
|
-
if (e.
|
|
1209
|
+
if (e.code === _ParseError.default.CONNECTION_FAILED) {
|
|
1210
1210
|
await _EventuallyQueue.default.save(this, options);
|
|
1211
1211
|
_EventuallyQueue.default.poll();
|
|
1212
1212
|
}
|
|
@@ -1344,7 +1344,7 @@ class ParseObject {
|
|
|
1344
1344
|
try {
|
|
1345
1345
|
await this.destroy(options);
|
|
1346
1346
|
} catch (e) {
|
|
1347
|
-
if (e.
|
|
1347
|
+
if (e.code === _ParseError.default.CONNECTION_FAILED) {
|
|
1348
1348
|
await _EventuallyQueue.default.destroy(this, options);
|
|
1349
1349
|
_EventuallyQueue.default.poll();
|
|
1350
1350
|
}
|
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
var _idbKeyval = require("idb-keyval");
|
|
2
2
|
if (typeof window !== 'undefined' && window.indexedDB) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
3
|
+
try {
|
|
4
|
+
var ParseStore = (0, _idbKeyval.createStore)('parseDB', 'parseStore');
|
|
5
|
+
var IndexedDBStorageController = {
|
|
6
|
+
async: 1,
|
|
7
|
+
getItemAsync: function (path) {
|
|
8
|
+
return (0, _idbKeyval.get)(path, ParseStore);
|
|
9
|
+
},
|
|
10
|
+
setItemAsync: function (path, value) {
|
|
11
|
+
return (0, _idbKeyval.set)(path, value, ParseStore);
|
|
12
|
+
},
|
|
13
|
+
removeItemAsync: function (path) {
|
|
14
|
+
return (0, _idbKeyval.del)(path, ParseStore);
|
|
15
|
+
},
|
|
16
|
+
getAllKeysAsync: function () {
|
|
17
|
+
return (0, _idbKeyval.keys)(ParseStore);
|
|
18
|
+
},
|
|
19
|
+
clear: function () {
|
|
20
|
+
return (0, _idbKeyval.clear)(ParseStore);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
module.exports = IndexedDBStorageController;
|
|
24
|
+
} catch (_) {
|
|
25
|
+
module.exports = undefined;
|
|
26
|
+
}
|
|
23
27
|
} else {
|
|
24
28
|
module.exports = undefined;
|
|
25
29
|
}
|
|
@@ -7,6 +7,7 @@ var _decode2 = _interopRequireDefault(require("./decode"));
|
|
|
7
7
|
var _encode2 = _interopRequireDefault(require("./encode"));
|
|
8
8
|
var _CryptoController = _interopRequireDefault(require("./CryptoController"));
|
|
9
9
|
var _EventuallyQueue = _interopRequireDefault(require("./EventuallyQueue"));
|
|
10
|
+
var _IndexedDBStorageController = _interopRequireDefault(require("./IndexedDBStorageController"));
|
|
10
11
|
var _InstallationController = _interopRequireDefault(require("./InstallationController"));
|
|
11
12
|
var ParseOp = _interopRequireWildcard(require("./ParseOp"));
|
|
12
13
|
var _RESTController = _interopRequireDefault(require("./RESTController"));
|
|
@@ -854,7 +854,7 @@ var ParseObject = function () {
|
|
|
854
854
|
try {
|
|
855
855
|
yield this.save(null, options);
|
|
856
856
|
} catch (e) {
|
|
857
|
-
if (e.
|
|
857
|
+
if (e.code === _ParseError.default.CONNECTION_FAILED) {
|
|
858
858
|
yield _EventuallyQueue.default.save(this, options);
|
|
859
859
|
_EventuallyQueue.default.poll();
|
|
860
860
|
}
|
|
@@ -916,7 +916,7 @@ var ParseObject = function () {
|
|
|
916
916
|
try {
|
|
917
917
|
yield this.destroy(options);
|
|
918
918
|
} catch (e) {
|
|
919
|
-
if (e.
|
|
919
|
+
if (e.code === _ParseError.default.CONNECTION_FAILED) {
|
|
920
920
|
yield _EventuallyQueue.default.destroy(this, options);
|
|
921
921
|
_EventuallyQueue.default.poll();
|
|
922
922
|
}
|
package/lib/weapp/CoreManager.js
CHANGED
|
@@ -187,7 +187,7 @@ var config /*: Config & { [key: string]: mixed }*/ = {
|
|
|
187
187
|
SERVER_AUTH_TOKEN: null,
|
|
188
188
|
LIVEQUERY_SERVER_URL: null,
|
|
189
189
|
ENCRYPTED_KEY: null,
|
|
190
|
-
VERSION: 'js' + "4.3.0-alpha.
|
|
190
|
+
VERSION: 'js' + "4.3.0-alpha.4",
|
|
191
191
|
APPLICATION_ID: null,
|
|
192
192
|
JAVASCRIPT_KEY: null,
|
|
193
193
|
MASTER_KEY: null,
|
|
@@ -8,26 +8,31 @@ var _idbKeyval = require("idb-keyval");
|
|
|
8
8
|
/* global window */
|
|
9
9
|
|
|
10
10
|
if (typeof window !== 'undefined' && window.indexedDB) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
11
|
+
try {
|
|
12
|
+
var ParseStore = (0, _idbKeyval.createStore)('parseDB', 'parseStore');
|
|
13
|
+
var IndexedDBStorageController = {
|
|
14
|
+
async: 1,
|
|
15
|
+
getItemAsync: function (path /*: string*/) {
|
|
16
|
+
return (0, _idbKeyval.get)(path, ParseStore);
|
|
17
|
+
},
|
|
18
|
+
setItemAsync: function (path /*: string*/, value /*: string*/) {
|
|
19
|
+
return (0, _idbKeyval.set)(path, value, ParseStore);
|
|
20
|
+
},
|
|
21
|
+
removeItemAsync: function (path /*: string*/) {
|
|
22
|
+
return (0, _idbKeyval.del)(path, ParseStore);
|
|
23
|
+
},
|
|
24
|
+
getAllKeysAsync: function () {
|
|
25
|
+
return (0, _keysInstanceProperty(_idbKeyval))(ParseStore);
|
|
26
|
+
},
|
|
27
|
+
clear: function () {
|
|
28
|
+
return (0, _idbKeyval.clear)(ParseStore);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
module.exports = IndexedDBStorageController;
|
|
32
|
+
} catch (_) {
|
|
33
|
+
// IndexedDB not accessible
|
|
34
|
+
module.exports = undefined;
|
|
35
|
+
}
|
|
31
36
|
} else {
|
|
32
37
|
// IndexedDB not supported
|
|
33
38
|
module.exports = undefined;
|
package/lib/weapp/Parse.js
CHANGED
|
@@ -14,6 +14,7 @@ var _decode2 = _interopRequireDefault(require("./decode"));
|
|
|
14
14
|
var _encode2 = _interopRequireDefault(require("./encode"));
|
|
15
15
|
var _CryptoController = _interopRequireDefault(require("./CryptoController"));
|
|
16
16
|
var _EventuallyQueue = _interopRequireDefault(require("./EventuallyQueue"));
|
|
17
|
+
var _IndexedDBStorageController = _interopRequireDefault(require("./IndexedDBStorageController"));
|
|
17
18
|
var _InstallationController = _interopRequireDefault(require("./InstallationController"));
|
|
18
19
|
var ParseOp = _interopRequireWildcard(require("./ParseOp"));
|
|
19
20
|
var _RESTController = _interopRequireDefault(require("./RESTController"));
|
package/lib/weapp/ParseObject.js
CHANGED
|
@@ -1473,7 +1473,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
1473
1473
|
case 5:
|
|
1474
1474
|
_context4.prev = 5;
|
|
1475
1475
|
_context4.t0 = _context4["catch"](0);
|
|
1476
|
-
if (!(_context4.t0.
|
|
1476
|
+
if (!(_context4.t0.code === _ParseError.default.CONNECTION_FAILED)) {
|
|
1477
1477
|
_context4.next = 11;
|
|
1478
1478
|
break;
|
|
1479
1479
|
}
|
|
@@ -1639,7 +1639,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
1639
1639
|
case 5:
|
|
1640
1640
|
_context5.prev = 5;
|
|
1641
1641
|
_context5.t0 = _context5["catch"](0);
|
|
1642
|
-
if (!(_context5.t0.
|
|
1642
|
+
if (!(_context5.t0.code === _ParseError.default.CONNECTION_FAILED)) {
|
|
1643
1643
|
_context5.next = 11;
|
|
1644
1644
|
break;
|
|
1645
1645
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "parse",
|
|
3
|
-
"version": "4.3.0-alpha.
|
|
3
|
+
"version": "4.3.0-alpha.4",
|
|
4
4
|
"description": "Parse JavaScript SDK",
|
|
5
5
|
"homepage": "https://parseplatform.org",
|
|
6
6
|
"keywords": [
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@babel/runtime-corejs3": "7.22.15",
|
|
33
33
|
"idb-keyval": "6.2.1",
|
|
34
34
|
"react-native-crypto-js": "1.0.0",
|
|
35
|
-
"uuid": "9.0.
|
|
35
|
+
"uuid": "9.0.1",
|
|
36
36
|
"ws": "8.13.0",
|
|
37
37
|
"xmlhttprequest": "1.8.0"
|
|
38
38
|
},
|