parse 3.4.3-alpha.1 → 3.4.3-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 +20 -9
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +20 -9
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/CoreManager.js +1 -1
- package/lib/browser/ParseRole.js +17 -6
- package/lib/browser/ParseUser.js +1 -1
- package/lib/node/CoreManager.js +1 -1
- package/lib/node/ParseRole.js +16 -6
- package/lib/node/ParseUser.js +1 -1
- package/lib/react-native/CoreManager.js +1 -1
- package/lib/react-native/ParseRole.js +17 -6
- package/lib/weapp/CoreManager.js +1 -1
- package/lib/weapp/ParseRole.js +17 -6
- package/lib/weapp/ParseUser.js +1 -1
- package/package.json +2 -2
package/dist/parse.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Parse JavaScript SDK v3.4.3-alpha.
|
|
2
|
+
* Parse JavaScript SDK v3.4.3-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.4.3-alpha.
|
|
702
|
+
VERSION: 'js' + "3.4.3-alpha.2",
|
|
703
703
|
APPLICATION_ID: null,
|
|
704
704
|
JAVASCRIPT_KEY: null,
|
|
705
705
|
MASTER_KEY: null,
|
|
@@ -18149,6 +18149,8 @@ var ParseRole = /*#__PURE__*/function (_ParseObject) {
|
|
|
18149
18149
|
)
|
|
18150
18150
|
/*: ParseObject | boolean*/
|
|
18151
18151
|
{
|
|
18152
|
+
this._validateName(name);
|
|
18153
|
+
|
|
18152
18154
|
return this.set('name', name, options);
|
|
18153
18155
|
}
|
|
18154
18156
|
/**
|
|
@@ -18189,6 +18191,17 @@ var ParseRole = /*#__PURE__*/function (_ParseObject) {
|
|
|
18189
18191
|
{
|
|
18190
18192
|
return this.relation('roles');
|
|
18191
18193
|
}
|
|
18194
|
+
}, {
|
|
18195
|
+
key: "_validateName",
|
|
18196
|
+
value: function (newName) {
|
|
18197
|
+
if (typeof newName !== 'string') {
|
|
18198
|
+
throw new _ParseError.default(_ParseError.default.OTHER_CAUSE, "A role's name must be a String.");
|
|
18199
|
+
}
|
|
18200
|
+
|
|
18201
|
+
if (!/^[0-9a-zA-Z\-_ ]+$/.test(newName)) {
|
|
18202
|
+
throw new _ParseError.default(_ParseError.default.OTHER_CAUSE, "A role's name can be only contain alphanumeric characters, _, " + '-, and spaces.');
|
|
18203
|
+
}
|
|
18204
|
+
}
|
|
18192
18205
|
}, {
|
|
18193
18206
|
key: "validate",
|
|
18194
18207
|
value: function (attrs
|
|
@@ -18214,12 +18227,10 @@ var ParseRole = /*#__PURE__*/function (_ParseObject) {
|
|
|
18214
18227
|
return new _ParseError.default(_ParseError.default.OTHER_CAUSE, "A role's name can only be set before it has been saved.");
|
|
18215
18228
|
}
|
|
18216
18229
|
|
|
18217
|
-
|
|
18218
|
-
|
|
18219
|
-
}
|
|
18220
|
-
|
|
18221
|
-
if (!/^[0-9a-zA-Z\-_ ]+$/.test(newName)) {
|
|
18222
|
-
return new _ParseError.default(_ParseError.default.OTHER_CAUSE, "A role's name can be only contain alphanumeric characters, _, " + '-, and spaces.');
|
|
18230
|
+
try {
|
|
18231
|
+
this._validateName(newName);
|
|
18232
|
+
} catch (e) {
|
|
18233
|
+
return e;
|
|
18223
18234
|
}
|
|
18224
18235
|
}
|
|
18225
18236
|
|
|
@@ -20402,7 +20413,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
|
|
|
20402
20413
|
* Request an email verification.
|
|
20403
20414
|
*
|
|
20404
20415
|
* @param {string} email The email address associated with the user that
|
|
20405
|
-
*
|
|
20416
|
+
* needs to verify their email.
|
|
20406
20417
|
* @param {object} options
|
|
20407
20418
|
* @static
|
|
20408
20419
|
* @returns {Promise}
|