wallaby-cash 2.0.3 → 2.0.4
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/index.cjs.js +7 -15
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +7 -15
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +7 -15
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -6990,7 +6990,7 @@ class Base {
|
|
|
6990
6990
|
* @returns Promise of <T> where T is the type of the response.
|
|
6991
6991
|
*/
|
|
6992
6992
|
async request(route, options) {
|
|
6993
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
6993
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
6994
6994
|
try {
|
|
6995
6995
|
let url;
|
|
6996
6996
|
if (typeof route.fullPath !== 'string') {
|
|
@@ -7048,10 +7048,10 @@ class Base {
|
|
|
7048
7048
|
if (((_e = error.response) === null || _e === void 0 ? void 0 : _e.data.errorCode) && error.response.data.errorCode === ErrorResponseCodes.user_already_exists) {
|
|
7049
7049
|
return error.response.data;
|
|
7050
7050
|
}
|
|
7051
|
-
return Promise.reject(error.
|
|
7051
|
+
return Promise.reject((_f = error.response) === null || _f === void 0 ? void 0 : _f.data);
|
|
7052
7052
|
}
|
|
7053
7053
|
logger.error('SDK::Base::RequestMethod.Post::error', error);
|
|
7054
|
-
return Promise.reject(error);
|
|
7054
|
+
return Promise.reject(error.message);
|
|
7055
7055
|
}
|
|
7056
7056
|
case RequestMethod.Put:
|
|
7057
7057
|
try {
|
|
@@ -7061,8 +7061,8 @@ class Base {
|
|
|
7061
7061
|
}
|
|
7062
7062
|
catch (error) {
|
|
7063
7063
|
if (error instanceof AxiosError) {
|
|
7064
|
-
logger.error('SDK::Base::RequestMethod.Put::error', (
|
|
7065
|
-
return Promise.reject((
|
|
7064
|
+
logger.error('SDK::Base::RequestMethod.Put::error', (_g = error.response) === null || _g === void 0 ? void 0 : _g.data);
|
|
7065
|
+
return Promise.reject((_h = error.response) === null || _h === void 0 ? void 0 : _h.data);
|
|
7066
7066
|
}
|
|
7067
7067
|
return Promise.reject(error === null || error === void 0 ? void 0 : error.message);
|
|
7068
7068
|
}
|
|
@@ -7074,8 +7074,8 @@ class Base {
|
|
|
7074
7074
|
}
|
|
7075
7075
|
catch (error) {
|
|
7076
7076
|
if (error instanceof AxiosError) {
|
|
7077
|
-
logger.error('SDK::Base::RequestMethod.Put::AxiosError', (
|
|
7078
|
-
return Promise.reject((
|
|
7077
|
+
logger.error('SDK::Base::RequestMethod.Put::AxiosError', (_j = error.response) === null || _j === void 0 ? void 0 : _j.data);
|
|
7078
|
+
return Promise.reject((_k = error.response) === null || _k === void 0 ? void 0 : _k.data);
|
|
7079
7079
|
}
|
|
7080
7080
|
return Promise.reject(error === null || error === void 0 ? void 0 : error.message);
|
|
7081
7081
|
}
|
|
@@ -8396,14 +8396,6 @@ class AuthService extends Base {
|
|
|
8396
8396
|
message: 'Password must be at least 8 characters long',
|
|
8397
8397
|
};
|
|
8398
8398
|
}
|
|
8399
|
-
// Check if password contains at least 1 number
|
|
8400
|
-
const hasNumber = /\d/.test(password);
|
|
8401
|
-
if (!hasNumber) {
|
|
8402
|
-
return {
|
|
8403
|
-
valid: false,
|
|
8404
|
-
message: 'Password must contain at least 1 number',
|
|
8405
|
-
};
|
|
8406
|
-
}
|
|
8407
8399
|
// Check maximum length (128 characters) to avoid DDoS attacks
|
|
8408
8400
|
if (password.length > 128) {
|
|
8409
8401
|
return {
|