keycloak-mock
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -1,2 +0,2 @@ | ||
export declare type CreateMockUserProfileOptionsAttributes = { | ||
export declare type MockUserProfileAttributes = { | ||
[key: string]: [string]; | ||
@@ -14,8 +14,4 @@ }; | ||
email?: string; | ||
attributes?: CreateMockUserProfileOptionsAttributes; | ||
attributes?: MockUserProfileAttributes; | ||
} | ||
export declare type MockUserProfileAttributes = { | ||
gender: [string]; | ||
[key: string]: [string]; | ||
}; | ||
export interface MockUserProfile { | ||
@@ -22,0 +18,0 @@ id: string; |
@@ -48,3 +48,3 @@ "use strict"; | ||
email: finalizedOptions.email || "henk.jansen@gmail.com", | ||
attributes: __assign({ gender: ["male"] }, (finalizedOptions.attributes || {})), | ||
attributes: __assign({}, (finalizedOptions.attributes || {})), | ||
}; | ||
@@ -51,0 +51,0 @@ this.users.push(profile); |
@@ -13,3 +13,3 @@ "use strict"; | ||
email_verified: user.emailVerified, | ||
gender: user.attributes.gender[0], | ||
gender: (user.attributes.gender || [])[0] || null, | ||
name: user.firstName + " " + user.lastName, | ||
@@ -16,0 +16,0 @@ preferred_username: user.username, |
import { v4 as uuidv4 } from "uuid"; | ||
import isNil from "lodash/isNil"; | ||
export type CreateMockUserProfileOptionsAttributes = { | ||
export type MockUserProfileAttributes = { | ||
[key: string]: [string]; | ||
@@ -18,10 +18,5 @@ }; | ||
email?: string; | ||
attributes?: CreateMockUserProfileOptionsAttributes; | ||
attributes?: MockUserProfileAttributes; | ||
} | ||
export type MockUserProfileAttributes = { | ||
gender: [string]; | ||
[key: string]: [string]; | ||
}; | ||
export interface MockUserProfile { | ||
@@ -77,3 +72,2 @@ id: string; | ||
attributes: { | ||
gender: ["male"], | ||
...(finalizedOptions.attributes || {}), | ||
@@ -80,0 +74,0 @@ }, |
@@ -16,3 +16,3 @@ import { ViewFn } from "../types"; | ||
email_verified: user.emailVerified, | ||
gender: user.attributes.gender[0], | ||
gender: (user.attributes.gender || [])[0] || null, | ||
name: `${user.firstName} ${user.lastName}`, | ||
@@ -19,0 +19,0 @@ preferred_username: user.username, |
{ | ||
"name": "keycloak-mock", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "Keycloak server mock for Node.js", | ||
@@ -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
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
42247
1002