parse 6.1.1 → 6.2.0-alpha.2
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 +7 -7
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +7 -7
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/CoreManager.js +1 -1
- package/lib/browser/ParseFile.js +2 -2
- package/lib/browser/ParseObject.js +1 -1
- package/lib/browser/RESTController.js +1 -1
- package/lib/browser/equals.js +1 -1
- package/lib/node/CoreManager.js +1 -1
- package/lib/node/ParseFile.js +2 -2
- package/lib/node/ParseObject.js +1 -1
- package/lib/node/RESTController.js +1 -1
- package/lib/node/equals.js +1 -1
- package/lib/react-native/CoreManager.js +1 -1
- package/lib/react-native/ParseFile.js +1 -1
- package/lib/react-native/ParseObject.js +1 -1
- package/lib/react-native/RESTController.js +1 -1
- package/lib/react-native/equals.js +1 -1
- package/lib/weapp/CoreManager.js +1 -1
- package/lib/weapp/ParseFile.js +2 -2
- package/lib/weapp/ParseObject.js +1 -1
- package/lib/weapp/RESTController.js +1 -1
- package/lib/weapp/equals.js +1 -1
- package/package.json +9 -20
- package/types/ParseFile.d.ts +1 -1
package/dist/parse.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Parse JavaScript SDK v6.
|
|
2
|
+
* Parse JavaScript SDK v6.2.0-alpha.2
|
|
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.
|
|
358
|
+
VERSION: 'js' + "6.2.0-alpha.2",
|
|
359
359
|
APPLICATION_ID: null,
|
|
360
360
|
JAVASCRIPT_KEY: null,
|
|
361
361
|
MAINTENANCE_KEY: null,
|
|
@@ -5378,7 +5378,7 @@ class ParseFile {
|
|
|
5378
5378
|
* an alphanumeric character, and consist of alphanumeric characters,
|
|
5379
5379
|
* periods, spaces, underscores, or dashes.
|
|
5380
5380
|
* @param data {Array} The data for the file, as either:
|
|
5381
|
-
* 1. an Array of byte value Numbers
|
|
5381
|
+
* 1. an Array of byte value Numbers or Uint8Array.
|
|
5382
5382
|
* 2. an Object like { base64: "..." } with a base64-encoded String.
|
|
5383
5383
|
* 3. an Object like { uri: "..." } with a uri String.
|
|
5384
5384
|
* 4. a File object selected with a file upload control. (3) only works
|
|
@@ -5416,7 +5416,7 @@ class ParseFile {
|
|
|
5416
5416
|
this._metadata = metadata || {};
|
|
5417
5417
|
this._tags = tags || {};
|
|
5418
5418
|
if (data !== undefined) {
|
|
5419
|
-
if ((0, _isArray.default)(data)) {
|
|
5419
|
+
if ((0, _isArray.default)(data) || data instanceof Uint8Array) {
|
|
5420
5420
|
this._data = ParseFile.encodeBase64(data);
|
|
5421
5421
|
this._source = {
|
|
5422
5422
|
format: 'base64',
|
|
@@ -7536,7 +7536,7 @@ class ParseObject {
|
|
|
7536
7536
|
*/
|
|
7537
7537
|
op(attr) {
|
|
7538
7538
|
const pending = this._getPendingOps();
|
|
7539
|
-
for (let i = pending.length; i
|
|
7539
|
+
for (let i = 0; i < pending.length; i += 1) {
|
|
7540
7540
|
if (pending[i][attr]) {
|
|
7541
7541
|
return pending[i][attr];
|
|
7542
7542
|
}
|
|
@@ -14179,7 +14179,7 @@ const RESTController = {
|
|
|
14179
14179
|
if (response && response.responseText) {
|
|
14180
14180
|
try {
|
|
14181
14181
|
const errorJSON = JSON.parse(response.responseText);
|
|
14182
|
-
error = new _ParseError.default(errorJSON.code, errorJSON.error);
|
|
14182
|
+
error = new _ParseError.default(errorJSON.code, errorJSON.error || errorJSON.message);
|
|
14183
14183
|
} catch (_) {
|
|
14184
14184
|
// If we fail to parse the error text, that's okay.
|
|
14185
14185
|
error = new _ParseError.default(_ParseError.default.INVALID_JSON, 'Received an error with invalid JSON from Parse: ' + response.responseText);
|
|
@@ -15322,7 +15322,7 @@ function equals(a, b) {
|
|
|
15322
15322
|
if (a.length !== b.length) {
|
|
15323
15323
|
return false;
|
|
15324
15324
|
}
|
|
15325
|
-
for (let i = a.length; i
|
|
15325
|
+
for (let i = 0; i < a.length; i += 1) {
|
|
15326
15326
|
if (!equals(a[i], b[i])) {
|
|
15327
15327
|
return false;
|
|
15328
15328
|
}
|