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.weapp.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,
|
|
@@ -5373,7 +5373,7 @@ class ParseFile {
|
|
|
5373
5373
|
* an alphanumeric character, and consist of alphanumeric characters,
|
|
5374
5374
|
* periods, spaces, underscores, or dashes.
|
|
5375
5375
|
* @param data {Array} The data for the file, as either:
|
|
5376
|
-
* 1. an Array of byte value Numbers
|
|
5376
|
+
* 1. an Array of byte value Numbers or Uint8Array.
|
|
5377
5377
|
* 2. an Object like { base64: "..." } with a base64-encoded String.
|
|
5378
5378
|
* 3. an Object like { uri: "..." } with a uri String.
|
|
5379
5379
|
* 4. a File object selected with a file upload control. (3) only works
|
|
@@ -5411,7 +5411,7 @@ class ParseFile {
|
|
|
5411
5411
|
this._metadata = metadata || {};
|
|
5412
5412
|
this._tags = tags || {};
|
|
5413
5413
|
if (data !== undefined) {
|
|
5414
|
-
if ((0, _isArray.default)(data)) {
|
|
5414
|
+
if ((0, _isArray.default)(data) || data instanceof Uint8Array) {
|
|
5415
5415
|
this._data = ParseFile.encodeBase64(data);
|
|
5416
5416
|
this._source = {
|
|
5417
5417
|
format: 'base64',
|
|
@@ -7531,7 +7531,7 @@ class ParseObject {
|
|
|
7531
7531
|
*/
|
|
7532
7532
|
op(attr) {
|
|
7533
7533
|
const pending = this._getPendingOps();
|
|
7534
|
-
for (let i = pending.length; i
|
|
7534
|
+
for (let i = 0; i < pending.length; i += 1) {
|
|
7535
7535
|
if (pending[i][attr]) {
|
|
7536
7536
|
return pending[i][attr];
|
|
7537
7537
|
}
|
|
@@ -14175,7 +14175,7 @@ const RESTController = {
|
|
|
14175
14175
|
if (response && response.responseText) {
|
|
14176
14176
|
try {
|
|
14177
14177
|
const errorJSON = JSON.parse(response.responseText);
|
|
14178
|
-
error = new _ParseError.default(errorJSON.code, errorJSON.error);
|
|
14178
|
+
error = new _ParseError.default(errorJSON.code, errorJSON.error || errorJSON.message);
|
|
14179
14179
|
} catch (_) {
|
|
14180
14180
|
// If we fail to parse the error text, that's okay.
|
|
14181
14181
|
error = new _ParseError.default(_ParseError.default.INVALID_JSON, 'Received an error with invalid JSON from Parse: ' + response.responseText);
|
|
@@ -15318,7 +15318,7 @@ function equals(a, b) {
|
|
|
15318
15318
|
if (a.length !== b.length) {
|
|
15319
15319
|
return false;
|
|
15320
15320
|
}
|
|
15321
|
-
for (let i = a.length; i
|
|
15321
|
+
for (let i = 0; i < a.length; i += 1) {
|
|
15322
15322
|
if (!equals(a[i], b[i])) {
|
|
15323
15323
|
return false;
|
|
15324
15324
|
}
|