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.weapp.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,
|
|
@@ -8471,9 +8471,6 @@ XHR = _dereq_('./Xhr.weapp');
|
|
|
8471
8471
|
type: string,
|
|
8472
8472
|
};*/
|
|
8473
8473
|
|
|
8474
|
-
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');
|
|
8475
|
-
var dataUriRegex = new RegExp("^data:([a-zA-Z]+\\/[-a-zA-Z0-9+.]+(;[a-z-]+=[a-zA-Z0-9+.-]+)?)?(;base64)?,(".concat(base64Regex.source, ")*$"), 'i');
|
|
8476
|
-
|
|
8477
8474
|
function b64Digit(number
|
|
8478
8475
|
/*: number*/
|
|
8479
8476
|
)
|
|
@@ -8586,30 +8583,14 @@ var ParseFile = /*#__PURE__*/function () {
|
|
|
8586
8583
|
type: specifiedType
|
|
8587
8584
|
};
|
|
8588
8585
|
} else if (data && typeof data.base64 === 'string') {
|
|
8589
|
-
var _context, _context2, _context3;
|
|
8590
|
-
|
|
8591
|
-
|
|
8592
|
-
var validationRegex = new RegExp(base64Regex.source + '|' + dataUriRegex.source, 'i');
|
|
8593
|
-
|
|
8594
|
-
if (!validationRegex.test(data.base64)) {
|
|
8595
|
-
throw new Error('Cannot create a Parse.File without valid data URIs or base64 encoded data.');
|
|
8596
|
-
}
|
|
8586
|
+
var _context, _context2, _context3;
|
|
8597
8587
|
|
|
8598
8588
|
var base64 = (0, _slice.default)(_context = data.base64.split(',')).call(_context, -1)[0];
|
|
8599
|
-
|
|
8600
|
-
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
|
|
8601
|
-
// If <mediatype> is omitted, it defaults to text/plain;charset=US-ASCII.
|
|
8602
|
-
// As a shorthand, "text/plain" can be omitted but the charset parameter supplied.
|
|
8603
|
-
|
|
8604
|
-
|
|
8605
|
-
if (dataUriRegex.test(data.base64)) {
|
|
8606
|
-
_type = _type || 'text/plain';
|
|
8607
|
-
}
|
|
8608
|
-
|
|
8589
|
+
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';
|
|
8609
8590
|
this._source = {
|
|
8610
8591
|
format: 'base64',
|
|
8611
8592
|
base64: base64,
|
|
8612
|
-
type:
|
|
8593
|
+
type: dataType
|
|
8613
8594
|
};
|
|
8614
8595
|
} else {
|
|
8615
8596
|
throw new TypeError('Cannot create a Parse.File with that data.');
|