@reinforz/shared
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -18,2 +18,1 @@ "use strict"; | ||
__exportStar(require("./schemas"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -19,2 +19,1 @@ "use strict"; | ||
__exportStar(require("./Profile"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -37,2 +37,1 @@ "use strict"; | ||
exports.profileUpdatePayloadSchema = profileUpdatePayloadSchema; | ||
//# sourceMappingURL=Profile.js.map |
@@ -23,3 +23,3 @@ import * as yup from 'yup'; | ||
}>>>; | ||
export declare function userUpdatePasswordPayloadSchema(): yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, { | ||
export declare function userChangePasswordPayloadSchema(): yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, { | ||
currentPassword: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>; | ||
@@ -26,0 +26,0 @@ newPassword: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>; |
@@ -26,3 +26,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.userUpdatePasswordPayloadSchema = exports.userLoginPayloadSchema = exports.userRegisterPayloadSchema = void 0; | ||
exports.userChangePasswordPayloadSchema = exports.userLoginPayloadSchema = exports.userRegisterPayloadSchema = void 0; | ||
const yup = __importStar(require("yup")); | ||
@@ -46,9 +46,13 @@ function userRegisterPayloadSchema() { | ||
function userLoginPayloadSchema() { | ||
return yup.object().shape({ | ||
usernameOrEmail: yup.string().required("Username or Email is required!"), | ||
password: yup.string().required("Password is required!") | ||
}).strict().noUnknown(); | ||
return yup | ||
.object() | ||
.shape({ | ||
usernameOrEmail: yup.string().required('Username or Email is required!'), | ||
password: yup.string().required('Password is required!') | ||
}) | ||
.strict() | ||
.noUnknown(); | ||
} | ||
exports.userLoginPayloadSchema = userLoginPayloadSchema; | ||
function userUpdatePasswordPayloadSchema() { | ||
function userChangePasswordPayloadSchema() { | ||
return yup | ||
@@ -64,3 +68,2 @@ .object() | ||
} | ||
exports.userUpdatePasswordPayloadSchema = userUpdatePasswordPayloadSchema; | ||
//# sourceMappingURL=User.js.map | ||
exports.userChangePasswordPayloadSchema = userChangePasswordPayloadSchema; |
{ | ||
"name": "@reinforz/shared", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Package for code shared between `@reinforz/client` & `@reinforz/server`", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
178
10352
9