Comparing version 0.25.1 to 0.25.3
@@ -8,3 +8,3 @@ "use strict"; | ||
const notImplemented_1 = require("./notImplemented"); | ||
const FiremockError_1 = require("../errors/FiremockError"); | ||
const FireMockError_1 = require("../errors/FireMockError"); | ||
const authMockHelpers_1 = require("./authMockHelpers"); | ||
@@ -51,6 +51,6 @@ exports.implemented = { | ||
if (!authMockHelpers_1.emailValidationAllowed()) { | ||
throw new FiremockError_1.FireMockError("email authentication not allowed", "auth/operation-not-allowed"); | ||
throw new FireMockError_1.FireMockError("email authentication not allowed", "auth/operation-not-allowed"); | ||
} | ||
if (!authMockHelpers_1.checkIfEmailIsValidFormat(email)) { | ||
throw new FiremockError_1.FireMockError(`invalid email: ${email}`, "auth/invalid-email"); | ||
throw new FireMockError_1.FireMockError(`invalid email: ${email}`, "auth/invalid-email"); | ||
} | ||
@@ -64,3 +64,3 @@ const found = authAdmin_1.authAdminApi | ||
if (!authMockHelpers_1.validEmailUserPassword(email, found.password)) { | ||
throw new FiremockError_1.FireMockError(`Invalid password for ${email}`, "auth/wrong-password"); | ||
throw new FireMockError_1.FireMockError(`Invalid password for ${email}`, "auth/wrong-password"); | ||
} | ||
@@ -88,12 +88,12 @@ const partial = { | ||
if (!authMockHelpers_1.emailValidationAllowed()) { | ||
throw new FiremockError_1.FireMockError("email authentication not allowed", "auth/operation-not-allowed"); | ||
throw new FireMockError_1.FireMockError("email authentication not allowed", "auth/operation-not-allowed"); | ||
} | ||
if (authMockHelpers_1.checkIfEmailUserExists(email)) { | ||
throw new FiremockError_1.FireMockError(`"${email}" user already exists`, "auth/email-already-in-use"); | ||
throw new FireMockError_1.FireMockError(`"${email}" user already exists`, "auth/email-already-in-use"); | ||
} | ||
if (authMockHelpers_1.checkIfEmailIsValidFormat(email)) { | ||
throw new FiremockError_1.FireMockError(`"${email}" user already exists`, "auth/invalid-email"); | ||
throw new FireMockError_1.FireMockError(`"${email}" user already exists`, "auth/invalid-email"); | ||
} | ||
if (!authMockHelpers_1.validEmailUserPassword(email, password)) { | ||
throw new FiremockError_1.FireMockError(`invalid password for "${email}" user`, "firemock/denied"); | ||
throw new FireMockError_1.FireMockError(`invalid password for "${email}" user`, "firemock/denied"); | ||
} | ||
@@ -100,0 +100,0 @@ const partial = { |
@@ -12,2 +12,2 @@ "use strict"; | ||
exports.FireMockError = FireMockError; | ||
//# sourceMappingURL=FiremockError.js.map | ||
//# sourceMappingURL=FireMockError.js.map |
@@ -6,3 +6,3 @@ import { networkDelay } from "../util"; | ||
import { notImplemented } from "./notImplemented"; | ||
import { FireMockError } from "../errors/FiremockError"; | ||
import { FireMockError } from "../errors/FireMockError"; | ||
import { checkIfEmailUserExists, validEmailUserPassword, emailVerified, userUid, emailValidationAllowed, loggedIn, loggedOut, checkIfEmailIsValidFormat } from "./authMockHelpers"; | ||
@@ -9,0 +9,0 @@ export const implemented = { |
{ | ||
"name": "firemock", | ||
"version": "0.25.1", | ||
"version": "0.25.3", | ||
"description": "firemock", | ||
@@ -36,3 +36,3 @@ "license": "MIT", | ||
"@firebase/util": "^0.2.15", | ||
"common-types": "^1.10.20", | ||
"common-types": "^1.10.22", | ||
"email-validator": "^2.0.4", | ||
@@ -39,0 +39,0 @@ "faker": "^4.1.0", |
Sorry, the diff of this file is not supported yet
Updatedcommon-types@^1.10.22