parse 3.5.0-alpha.1 → 3.5.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 +5 -24
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +5 -24
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/CoreManager.js +1 -1
- package/lib/browser/ParseFile.js +3 -22
- package/lib/node/CoreManager.js +1 -1
- package/lib/node/ParseFile.js +2 -19
- package/lib/react-native/CoreManager.js +1 -1
- package/lib/react-native/ParseFile.js +2 -17
- package/lib/weapp/CoreManager.js +1 -1
- package/lib/weapp/ParseFile.js +3 -22
- package/package.json +1 -1
package/dist/parse.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Parse JavaScript SDK v3.5.0-alpha.
|
|
2
|
+
* Parse JavaScript SDK v3.5.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
|
|
@@ -699,7 +699,7 @@ var config
|
|
|
699
699
|
SERVER_AUTH_TOKEN: null,
|
|
700
700
|
LIVEQUERY_SERVER_URL: null,
|
|
701
701
|
ENCRYPTED_KEY: null,
|
|
702
|
-
VERSION: 'js' + "3.5.0-alpha.
|
|
702
|
+
VERSION: 'js' + "3.5.0-alpha.2",
|
|
703
703
|
APPLICATION_ID: null,
|
|
704
704
|
JAVASCRIPT_KEY: null,
|
|
705
705
|
MASTER_KEY: null,
|
|
@@ -8477,9 +8477,6 @@ if (typeof XMLHttpRequest !== 'undefined') {
|
|
|
8477
8477
|
uri: string,
|
|
8478
8478
|
type: string,
|
|
8479
8479
|
};*/
|
|
8480
|
-
var base64Regex = new RegExp('([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/][AQgw]==)|([0-9a-zA-Z+/]{2}[AEIMQUYcgkosw048]=)|([0-9a-zA-Z+/]{4}))', 'i');
|
|
8481
|
-
var dataUriRegex = new RegExp("^data:([a-zA-Z]+\\/[-a-zA-Z0-9+.]+(;[a-z-]+=[a-zA-Z0-9+.-]+)?)?(;base64)?,(".concat(base64Regex.source, ")*$"), 'i');
|
|
8482
|
-
|
|
8483
8480
|
function b64Digit(number
|
|
8484
8481
|
/*: number*/
|
|
8485
8482
|
)
|
|
@@ -8592,30 +8589,14 @@ var ParseFile = /*#__PURE__*/function () {
|
|
|
8592
8589
|
type: specifiedType
|
|
8593
8590
|
};
|
|
8594
8591
|
} else if (data && typeof data.base64 === 'string') {
|
|
8595
|
-
var _context, _context2, _context3;
|
|
8596
|
-
|
|
8597
|
-
|
|
8598
|
-
var validationRegex = new RegExp(base64Regex.source + '|' + dataUriRegex.source, 'i');
|
|
8599
|
-
|
|
8600
|
-
if (!validationRegex.test(data.base64)) {
|
|
8601
|
-
throw new Error('Cannot create a Parse.File without valid data URIs or base64 encoded data.');
|
|
8602
|
-
}
|
|
8592
|
+
var _context, _context2, _context3;
|
|
8603
8593
|
|
|
8604
8594
|
var base64 = (0, _slice.default)(_context = data.base64.split(',')).call(_context, -1)[0];
|
|
8605
|
-
|
|
8606
|
-
var _type = specifiedType || (0, _slice.default)(_context2 = (0, _slice.default)(_context3 = data.base64.split(';')).call(_context3, 0, 1)[0].split(':')).call(_context2, 1, 2)[0] || ''; // https://tools.ietf.org/html/rfc2397
|
|
8607
|
-
// If <mediatype> is omitted, it defaults to text/plain;charset=US-ASCII.
|
|
8608
|
-
// As a shorthand, "text/plain" can be omitted but the charset parameter supplied.
|
|
8609
|
-
|
|
8610
|
-
|
|
8611
|
-
if (dataUriRegex.test(data.base64)) {
|
|
8612
|
-
_type = _type || 'text/plain';
|
|
8613
|
-
}
|
|
8614
|
-
|
|
8595
|
+
var dataType = specifiedType || (0, _slice.default)(_context2 = (0, _slice.default)(_context3 = data.base64.split(';')).call(_context3, 0, 1)[0].split(':')).call(_context2, 1, 2)[0] || 'text/plain';
|
|
8615
8596
|
this._source = {
|
|
8616
8597
|
format: 'base64',
|
|
8617
8598
|
base64: base64,
|
|
8618
|
-
type:
|
|
8599
|
+
type: dataType
|
|
8619
8600
|
};
|
|
8620
8601
|
} else {
|
|
8621
8602
|
throw new TypeError('Cannot create a Parse.File with that data.');
|