Comparing version 1.6.13 to 1.6.14
@@ -19,3 +19,3 @@ /** | ||
SERVER_URL: 'https://api.parse.com/1', | ||
VERSION: 'js' + '1.6.13', | ||
VERSION: 'js' + '1.6.14', | ||
APPLICATION_ID: null, | ||
@@ -22,0 +22,0 @@ JAVASCRIPT_KEY: null, |
@@ -113,2 +113,11 @@ /** | ||
function getServerUrlPath() { | ||
var serverUrl = _CoreManager2['default'].get('SERVER_URL'); | ||
if (serverUrl[serverUrl.length - 1] !== '/') { | ||
serverUrl += '/'; | ||
} | ||
var url = serverUrl.replace(/https?:\/\//, ''); | ||
return url.substr(url.indexOf('/')); | ||
} | ||
/** | ||
@@ -141,2 +150,7 @@ * Creates a new model with defined attributes. | ||
// Enable legacy initializers | ||
if (typeof this.initialize === 'function') { | ||
this.initialize.apply(this, arguments); | ||
} | ||
var toSet = null; | ||
@@ -164,6 +178,2 @@ this._objCount = objectCount++; | ||
} | ||
// Enable legacy initializers | ||
if (typeof this.initialize === 'function') { | ||
this.initialize.apply(this, arguments); | ||
} | ||
} | ||
@@ -250,5 +260,11 @@ | ||
// unless the object is changed | ||
var json = (0, _encode2['default'])(val, false, true); | ||
var stringified = JSON.stringify(json); | ||
if (objectCache[attr] !== stringified) { | ||
try { | ||
var json = (0, _encode2['default'])(val, false, true); | ||
var stringified = JSON.stringify(json); | ||
if (objectCache[attr] !== stringified) { | ||
dirty[attr] = val; | ||
} | ||
} catch (e) { | ||
// Error occurred, possibly by a nested unsaved pointer in a mutable container | ||
// No matter how it happened, it indicates a change in the attribute | ||
dirty[attr] = val; | ||
@@ -799,8 +815,8 @@ } | ||
var clone = new this.constructor(); | ||
if (!clone.className) { | ||
clone.className = this.className; | ||
} | ||
if (clone.set) { | ||
clone.set(this.attributes); | ||
} | ||
if (!clone.className) { | ||
clone.className = this.className; | ||
} | ||
return clone; | ||
@@ -1461,2 +1477,7 @@ } | ||
var ParseObjectSubclass = function ParseObjectSubclass(attributes, options) { | ||
// Enable legacy initializers | ||
if (typeof this.initialize === 'function') { | ||
this.initialize.apply(this, arguments); | ||
} | ||
this.className = adjustedClassName; | ||
@@ -1469,6 +1490,2 @@ this._objCount = objectCount++; | ||
} | ||
// Enable legacy initializers | ||
if (typeof this.initialize === 'function') { | ||
this.initialize.apply(this, arguments); | ||
} | ||
}; | ||
@@ -1659,3 +1676,3 @@ ParseObjectSubclass.className = adjustedClassName; | ||
method: 'DELETE', | ||
path: '/1/classes/' + obj.className + '/' + obj._getId(), | ||
path: getServerUrlPath() + 'classes/' + obj.className + '/' + obj._getId(), | ||
body: {} | ||
@@ -1770,3 +1787,3 @@ }; | ||
var params = obj._getSaveParams(); | ||
params.path = '/1/' + params.path; | ||
params.path = getServerUrlPath() + params.path; | ||
return params; | ||
@@ -1773,0 +1790,0 @@ }) |
@@ -886,3 +886,3 @@ /** | ||
} | ||
var current = ParseUser.fromJSON(userData); | ||
var current = _ParseObject3['default'].fromJSON(userData); | ||
currentUserCache = current; | ||
@@ -921,3 +921,3 @@ current._synchronizeAllAuthData(); | ||
} | ||
var current = ParseUser.fromJSON(userData); | ||
var current = _ParseObject3['default'].fromJSON(userData); | ||
currentUserCache = current; | ||
@@ -924,0 +924,0 @@ current._synchronizeAllAuthData(); |
@@ -56,3 +56,5 @@ /** | ||
} | ||
promise.resolve(response); | ||
if (response) { | ||
promise.resolve(response); | ||
} | ||
}; | ||
@@ -102,5 +104,7 @@ xdr.onerror = xdr.ontimeout = function () { | ||
} catch (e) { | ||
promise.reject(e); | ||
promise.reject(e.toString()); | ||
} | ||
promise.resolve(response, xhr.status, xhr); | ||
if (response) { | ||
promise.resolve(response, xhr.status, xhr); | ||
} | ||
} else if (xhr.status >= 500 || xhr.status === 0) { | ||
@@ -107,0 +111,0 @@ // retry on 5XX or node-xmlhttprequest error |
@@ -28,3 +28,7 @@ /** | ||
setItem: function setItem(path, value) { | ||
localStorage.setItem(path, value); | ||
try { | ||
localStorage.setItem(path, value); | ||
} catch (e) { | ||
// Quota exceeded, possibly due to Safari Private Browsing mode | ||
} | ||
}, | ||
@@ -31,0 +35,0 @@ |
@@ -19,3 +19,3 @@ /** | ||
SERVER_URL: 'https://api.parse.com/1', | ||
VERSION: 'js' + '1.6.13', | ||
VERSION: 'js' + '1.6.14', | ||
APPLICATION_ID: null, | ||
@@ -22,0 +22,0 @@ JAVASCRIPT_KEY: null, |
@@ -113,2 +113,11 @@ /** | ||
function getServerUrlPath() { | ||
var serverUrl = _CoreManager2['default'].get('SERVER_URL'); | ||
if (serverUrl[serverUrl.length - 1] !== '/') { | ||
serverUrl += '/'; | ||
} | ||
var url = serverUrl.replace(/https?:\/\//, ''); | ||
return url.substr(url.indexOf('/')); | ||
} | ||
/** | ||
@@ -141,2 +150,7 @@ * Creates a new model with defined attributes. | ||
// Enable legacy initializers | ||
if (typeof this.initialize === 'function') { | ||
this.initialize.apply(this, arguments); | ||
} | ||
var toSet = null; | ||
@@ -164,6 +178,2 @@ this._objCount = objectCount++; | ||
} | ||
// Enable legacy initializers | ||
if (typeof this.initialize === 'function') { | ||
this.initialize.apply(this, arguments); | ||
} | ||
} | ||
@@ -250,5 +260,11 @@ | ||
// unless the object is changed | ||
var json = (0, _encode2['default'])(val, false, true); | ||
var stringified = JSON.stringify(json); | ||
if (objectCache[attr] !== stringified) { | ||
try { | ||
var json = (0, _encode2['default'])(val, false, true); | ||
var stringified = JSON.stringify(json); | ||
if (objectCache[attr] !== stringified) { | ||
dirty[attr] = val; | ||
} | ||
} catch (e) { | ||
// Error occurred, possibly by a nested unsaved pointer in a mutable container | ||
// No matter how it happened, it indicates a change in the attribute | ||
dirty[attr] = val; | ||
@@ -799,8 +815,8 @@ } | ||
var clone = new this.constructor(); | ||
if (!clone.className) { | ||
clone.className = this.className; | ||
} | ||
if (clone.set) { | ||
clone.set(this.attributes); | ||
} | ||
if (!clone.className) { | ||
clone.className = this.className; | ||
} | ||
return clone; | ||
@@ -1461,2 +1477,7 @@ } | ||
var ParseObjectSubclass = function ParseObjectSubclass(attributes, options) { | ||
// Enable legacy initializers | ||
if (typeof this.initialize === 'function') { | ||
this.initialize.apply(this, arguments); | ||
} | ||
this.className = adjustedClassName; | ||
@@ -1469,6 +1490,2 @@ this._objCount = objectCount++; | ||
} | ||
// Enable legacy initializers | ||
if (typeof this.initialize === 'function') { | ||
this.initialize.apply(this, arguments); | ||
} | ||
}; | ||
@@ -1659,3 +1676,3 @@ ParseObjectSubclass.className = adjustedClassName; | ||
method: 'DELETE', | ||
path: '/1/classes/' + obj.className + '/' + obj._getId(), | ||
path: getServerUrlPath() + 'classes/' + obj.className + '/' + obj._getId(), | ||
body: {} | ||
@@ -1770,3 +1787,3 @@ }; | ||
var params = obj._getSaveParams(); | ||
params.path = '/1/' + params.path; | ||
params.path = getServerUrlPath() + params.path; | ||
return params; | ||
@@ -1773,0 +1790,0 @@ }) |
@@ -886,3 +886,3 @@ /** | ||
} | ||
var current = ParseUser.fromJSON(userData); | ||
var current = _ParseObject3['default'].fromJSON(userData); | ||
currentUserCache = current; | ||
@@ -921,3 +921,3 @@ current._synchronizeAllAuthData(); | ||
} | ||
var current = ParseUser.fromJSON(userData); | ||
var current = _ParseObject3['default'].fromJSON(userData); | ||
currentUserCache = current; | ||
@@ -924,0 +924,0 @@ current._synchronizeAllAuthData(); |
@@ -58,3 +58,5 @@ /** | ||
} | ||
promise.resolve(response); | ||
if (response) { | ||
promise.resolve(response); | ||
} | ||
}; | ||
@@ -104,5 +106,7 @@ xdr.onerror = xdr.ontimeout = function () { | ||
} catch (e) { | ||
promise.reject(e); | ||
promise.reject(e.toString()); | ||
} | ||
promise.resolve(response, xhr.status, xhr); | ||
if (response) { | ||
promise.resolve(response, xhr.status, xhr); | ||
} | ||
} else if (xhr.status >= 500 || xhr.status === 0) { | ||
@@ -109,0 +113,0 @@ // retry on 5XX or node-xmlhttprequest error |
@@ -28,3 +28,7 @@ /** | ||
setItem: function setItem(path, value) { | ||
localStorage.setItem(path, value); | ||
try { | ||
localStorage.setItem(path, value); | ||
} catch (e) { | ||
// Quota exceeded, possibly due to Safari Private Browsing mode | ||
} | ||
}, | ||
@@ -31,0 +35,0 @@ |
@@ -19,3 +19,3 @@ /** | ||
SERVER_URL: 'https://api.parse.com/1', | ||
VERSION: 'js' + '1.6.13', | ||
VERSION: 'js' + '1.6.14', | ||
APPLICATION_ID: null, | ||
@@ -22,0 +22,0 @@ JAVASCRIPT_KEY: null, |
@@ -113,2 +113,11 @@ /** | ||
function getServerUrlPath() { | ||
var serverUrl = _CoreManager2['default'].get('SERVER_URL'); | ||
if (serverUrl[serverUrl.length - 1] !== '/') { | ||
serverUrl += '/'; | ||
} | ||
var url = serverUrl.replace(/https?:\/\//, ''); | ||
return url.substr(url.indexOf('/')); | ||
} | ||
/** | ||
@@ -141,2 +150,7 @@ * Creates a new model with defined attributes. | ||
// Enable legacy initializers | ||
if (typeof this.initialize === 'function') { | ||
this.initialize.apply(this, arguments); | ||
} | ||
var toSet = null; | ||
@@ -164,6 +178,2 @@ this._objCount = objectCount++; | ||
} | ||
// Enable legacy initializers | ||
if (typeof this.initialize === 'function') { | ||
this.initialize.apply(this, arguments); | ||
} | ||
} | ||
@@ -250,5 +260,11 @@ | ||
// unless the object is changed | ||
var json = (0, _encode2['default'])(val, false, true); | ||
var stringified = JSON.stringify(json); | ||
if (objectCache[attr] !== stringified) { | ||
try { | ||
var json = (0, _encode2['default'])(val, false, true); | ||
var stringified = JSON.stringify(json); | ||
if (objectCache[attr] !== stringified) { | ||
dirty[attr] = val; | ||
} | ||
} catch (e) { | ||
// Error occurred, possibly by a nested unsaved pointer in a mutable container | ||
// No matter how it happened, it indicates a change in the attribute | ||
dirty[attr] = val; | ||
@@ -799,8 +815,8 @@ } | ||
var clone = new this.constructor(); | ||
if (!clone.className) { | ||
clone.className = this.className; | ||
} | ||
if (clone.set) { | ||
clone.set(this.attributes); | ||
} | ||
if (!clone.className) { | ||
clone.className = this.className; | ||
} | ||
return clone; | ||
@@ -1461,2 +1477,7 @@ } | ||
var ParseObjectSubclass = function ParseObjectSubclass(attributes, options) { | ||
// Enable legacy initializers | ||
if (typeof this.initialize === 'function') { | ||
this.initialize.apply(this, arguments); | ||
} | ||
this.className = adjustedClassName; | ||
@@ -1469,6 +1490,2 @@ this._objCount = objectCount++; | ||
} | ||
// Enable legacy initializers | ||
if (typeof this.initialize === 'function') { | ||
this.initialize.apply(this, arguments); | ||
} | ||
}; | ||
@@ -1659,3 +1676,3 @@ ParseObjectSubclass.className = adjustedClassName; | ||
method: 'DELETE', | ||
path: '/1/classes/' + obj.className + '/' + obj._getId(), | ||
path: getServerUrlPath() + 'classes/' + obj.className + '/' + obj._getId(), | ||
body: {} | ||
@@ -1770,3 +1787,3 @@ }; | ||
var params = obj._getSaveParams(); | ||
params.path = '/1/' + params.path; | ||
params.path = getServerUrlPath() + params.path; | ||
return params; | ||
@@ -1773,0 +1790,0 @@ }) |
@@ -886,3 +886,3 @@ /** | ||
} | ||
var current = ParseUser.fromJSON(userData); | ||
var current = _ParseObject3['default'].fromJSON(userData); | ||
currentUserCache = current; | ||
@@ -921,3 +921,3 @@ current._synchronizeAllAuthData(); | ||
} | ||
var current = ParseUser.fromJSON(userData); | ||
var current = _ParseObject3['default'].fromJSON(userData); | ||
currentUserCache = current; | ||
@@ -924,0 +924,0 @@ current._synchronizeAllAuthData(); |
@@ -56,3 +56,5 @@ /** | ||
} | ||
promise.resolve(response); | ||
if (response) { | ||
promise.resolve(response); | ||
} | ||
}; | ||
@@ -102,5 +104,7 @@ xdr.onerror = xdr.ontimeout = function () { | ||
} catch (e) { | ||
promise.reject(e); | ||
promise.reject(e.toString()); | ||
} | ||
promise.resolve(response, xhr.status, xhr); | ||
if (response) { | ||
promise.resolve(response, xhr.status, xhr); | ||
} | ||
} else if (xhr.status >= 500 || xhr.status === 0) { | ||
@@ -107,0 +111,0 @@ // retry on 5XX or node-xmlhttprequest error |
@@ -28,3 +28,7 @@ /** | ||
setItem: function setItem(path, value) { | ||
localStorage.setItem(path, value); | ||
try { | ||
localStorage.setItem(path, value); | ||
} catch (e) { | ||
// Quota exceeded, possibly due to Safari Private Browsing mode | ||
} | ||
}, | ||
@@ -31,0 +35,0 @@ |
{ | ||
"name": "parse", | ||
"version": "1.6.13", | ||
"version": "1.6.14", | ||
"description": "The Parse JavaScript SDK", | ||
@@ -5,0 +5,0 @@ "homepage": "https://www.parse.com", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1312407
34351