diff --git a/js/libs/keycloak-admin-client/package.json b/js/libs/keycloak-admin-client/package.json index aff727c7d7..d7eec9e192 100644 --- a/js/libs/keycloak-admin-client/package.json +++ b/js/libs/keycloak-admin-client/package.json @@ -45,7 +45,7 @@ "url-template": "^3.1.1" }, "devDependencies": { - "@faker-js/faker": "^9.0.3", + "@faker-js/faker": "^9.1.0", "@types/chai": "^5.0.1", "@types/lodash-es": "^4.17.12", "@types/mocha": "^10.0.9", diff --git a/js/libs/keycloak-admin-client/test/attackDetection.spec.ts b/js/libs/keycloak-admin-client/test/attackDetection.spec.ts index 91c9ed463d..eb7ca6d151 100644 --- a/js/libs/keycloak-admin-client/test/attackDetection.spec.ts +++ b/js/libs/keycloak-admin-client/test/attackDetection.spec.ts @@ -15,7 +15,7 @@ describe("Attack Detection", () => { kcAdminClient = new KeycloakAdminClient(); await kcAdminClient.auth(credentials); - const username = faker.internet.userName(); + const username = faker.internet.username(); currentUser = await kcAdminClient.users.create({ username, }); diff --git a/js/libs/keycloak-admin-client/test/authenticationManagement.spec.ts b/js/libs/keycloak-admin-client/test/authenticationManagement.spec.ts index ce2a666f10..0b8ae5d5b4 100644 --- a/js/libs/keycloak-admin-client/test/authenticationManagement.spec.ts +++ b/js/libs/keycloak-admin-client/test/authenticationManagement.spec.ts @@ -16,7 +16,7 @@ describe("Authentication management", () => { before(async () => { kcAdminClient = new KeycloakAdminClient(); await kcAdminClient.auth(credentials); - const realmName = faker.internet.userName().toLowerCase(); + const realmName = faker.internet.username().toLowerCase(); await kcAdminClient.realms.create({ id: realmName, realm: realmName, diff --git a/js/libs/keycloak-admin-client/test/clients.spec.ts b/js/libs/keycloak-admin-client/test/clients.spec.ts index b277fe3e3e..c75932b5e5 100644 --- a/js/libs/keycloak-admin-client/test/clients.spec.ts +++ b/js/libs/keycloak-admin-client/test/clients.spec.ts @@ -27,7 +27,7 @@ describe("Clients", () => { // create client and also test it // NOTICE: to be clear, clientId stands for the property `clientId` of client // clientUniqueId stands for property `id` of client - const clientId = faker.internet.userName(); + const clientId = faker.internet.username(); const createdClient = await kcAdminClient.clients.create({ clientId, }); @@ -82,7 +82,7 @@ describe("Clients", () => { it("delete single client", async () => { // create another one for delete test - const clientId = faker.internet.userName(); + const clientId = faker.internet.username(); const { id } = await kcAdminClient.clients.create({ clientId, }); @@ -103,7 +103,7 @@ describe("Clients", () => { */ describe("client roles", () => { before(async () => { - const roleName = faker.internet.userName(); + const roleName = faker.internet.username(); // create a client role const { roleName: createdRoleName } = await kcAdminClient.clients.createRole({ @@ -172,7 +172,7 @@ describe("Clients", () => { }); it("delete a client role", async () => { - const roleName = faker.internet.userName(); + const roleName = faker.internet.username(); // create a client role await kcAdminClient.clients.createRole({ id: currentClient.id, @@ -762,7 +762,7 @@ describe("Clients", () => { it("get JSON with payload of examples", async () => { const { id: clientUniqueId } = currentClient; - const username = faker.internet.userName(); + const username = faker.internet.username(); const user = await kcAdminClient.users.create({ username, }); @@ -1019,7 +1019,7 @@ describe("Clients", () => { }); before("create test user", async () => { - const username = faker.internet.userName(); + const username = faker.internet.username(); user = await kcAdminClient.users.create({ username, }); diff --git a/js/libs/keycloak-admin-client/test/components.spec.ts b/js/libs/keycloak-admin-client/test/components.spec.ts index 85723f6324..9f58386efd 100644 --- a/js/libs/keycloak-admin-client/test/components.spec.ts +++ b/js/libs/keycloak-admin-client/test/components.spec.ts @@ -16,7 +16,7 @@ describe("User federation using component api", () => { await kcAdminClient.auth(credentials); // create user fed - const name = faker.internet.userName(); + const name = faker.internet.username(); const component = await kcAdminClient.components.create({ name, parentId: "master", diff --git a/js/libs/keycloak-admin-client/test/crossRealm.spec.ts b/js/libs/keycloak-admin-client/test/crossRealm.spec.ts index b36a4eb784..1d7693d93e 100644 --- a/js/libs/keycloak-admin-client/test/crossRealm.spec.ts +++ b/js/libs/keycloak-admin-client/test/crossRealm.spec.ts @@ -14,7 +14,7 @@ describe("Realms", () => { kcAdminClient = new KeycloakAdminClient(); await kcAdminClient.auth(credentials); - const realmId = faker.internet.userName(); + const realmId = faker.internet.username(); const realm = await kcAdminClient.realms.create({ id: realmId, realm: realmId, @@ -28,7 +28,7 @@ describe("Realms", () => { }); it("add a user to another realm", async () => { - const username = faker.internet.userName().toLowerCase(); + const username = faker.internet.username().toLowerCase(); const user = await kcAdminClient.users.create({ realm: currentRealmId, username, diff --git a/js/libs/keycloak-admin-client/test/groupUser.spec.ts b/js/libs/keycloak-admin-client/test/groupUser.spec.ts index 6414f90a6f..dfd7901ce6 100644 --- a/js/libs/keycloak-admin-client/test/groupUser.spec.ts +++ b/js/libs/keycloak-admin-client/test/groupUser.spec.ts @@ -21,7 +21,7 @@ describe("Group user integration", () => { let currentPolicy: PolicyRepresentation; before(async () => { - const groupName = faker.internet.userName(); + const groupName = faker.internet.username(); kcAdminClient = new KeycloakAdminClient(); await kcAdminClient.auth(credentials); // create group @@ -31,7 +31,7 @@ describe("Group user integration", () => { currentGroup = (await kcAdminClient.groups.findOne({ id: group.id }))!; // create user - const username = faker.internet.userName(); + const username = faker.internet.username(); const user = await kcAdminClient.users.create({ username, email: "test@keycloak.org", diff --git a/js/libs/keycloak-admin-client/test/groups.spec.ts b/js/libs/keycloak-admin-client/test/groups.spec.ts index c646e7f77a..7ac416afed 100644 --- a/js/libs/keycloak-admin-client/test/groups.spec.ts +++ b/js/libs/keycloak-admin-client/test/groups.spec.ts @@ -100,7 +100,7 @@ describe("Groups", () => { describe("role-mappings", () => { before(async () => { // create new role - const roleName = faker.internet.userName(); + const roleName = faker.internet.username(); const { roleName: createdRoleName } = await kcAdminClient.roles.create({ name: roleName, }); @@ -189,7 +189,7 @@ describe("Groups", () => { describe("client role-mappings", () => { before(async () => { // create new client - const clientId = faker.internet.userName(); + const clientId = faker.internet.username(); await kcAdminClient.clients.create({ clientId, }); @@ -199,7 +199,7 @@ describe("Groups", () => { currentClient = clients[0]; // create new client role - const roleName = faker.internet.userName(); + const roleName = faker.internet.username(); await kcAdminClient.clients.createRole({ id: currentClient.id, name: roleName, @@ -265,7 +265,7 @@ describe("Groups", () => { }); it("del client role-mappings from group", async () => { - const roleName = faker.internet.userName(); + const roleName = faker.internet.username(); await kcAdminClient.clients.createRole({ id: currentClient.id, name: roleName, diff --git a/js/libs/keycloak-admin-client/test/idp.spec.ts b/js/libs/keycloak-admin-client/test/idp.spec.ts index 71c68763f0..7356e9bd93 100644 --- a/js/libs/keycloak-admin-client/test/idp.spec.ts +++ b/js/libs/keycloak-admin-client/test/idp.spec.ts @@ -15,7 +15,7 @@ describe("Identity providers", () => { await kcAdminClient.auth(credentials); // create idp - const alias = faker.internet.userName(); + const alias = faker.internet.username(); const idp = await kcAdminClient.identityProviders.create({ alias, providerId: "saml", diff --git a/js/libs/keycloak-admin-client/test/realms.spec.ts b/js/libs/keycloak-admin-client/test/realms.spec.ts index 951c1aa243..d22267c68e 100644 --- a/js/libs/keycloak-admin-client/test/realms.spec.ts +++ b/js/libs/keycloak-admin-client/test/realms.spec.ts @@ -10,8 +10,8 @@ import { credentials } from "./constants.js"; const expect = chai.expect; const createRealm = async (kcAdminClient: KeycloakAdminClient) => { - const realmId = faker.internet.userName().toLowerCase(); - const realmName = faker.internet.userName().toLowerCase(); + const realmId = faker.internet.username().toLowerCase(); + const realmName = faker.internet.username().toLowerCase(); const realm = await kcAdminClient.realms.create({ id: realmId, realm: realmName, @@ -48,8 +48,8 @@ describe("Realms", () => { }); it("create realm", async () => { - const realmId = faker.internet.userName().toLowerCase(); - const realmName = faker.internet.userName().toLowerCase(); + const realmId = faker.internet.username().toLowerCase(); + const realmName = faker.internet.username().toLowerCase(); const realm = await kcAdminClient.realms.create({ id: realmId, realm: realmName, diff --git a/js/libs/keycloak-admin-client/test/userStorageProvider.spec.ts b/js/libs/keycloak-admin-client/test/userStorageProvider.spec.ts index 42a64b8f4b..b54d10c29a 100644 --- a/js/libs/keycloak-admin-client/test/userStorageProvider.spec.ts +++ b/js/libs/keycloak-admin-client/test/userStorageProvider.spec.ts @@ -15,7 +15,7 @@ describe("Users federation provider", () => { kcAdminClient = new KeycloakAdminClient(); await kcAdminClient.auth(credentials); - const name = faker.internet.userName(); + const name = faker.internet.username(); currentUserFed = await kcAdminClient.components.create({ name, parentId: "master", diff --git a/js/libs/keycloak-admin-client/test/users.spec.ts b/js/libs/keycloak-admin-client/test/users.spec.ts index 9b11c82882..9ea80f4904 100644 --- a/js/libs/keycloak-admin-client/test/users.spec.ts +++ b/js/libs/keycloak-admin-client/test/users.spec.ts @@ -34,7 +34,7 @@ describe("Users", () => { }); // initialize user - const username = faker.internet.userName(); + const username = faker.internet.username(); const user = await kcAdminClient.users.create({ username, email: "test@keycloak.org", @@ -373,7 +373,7 @@ describe("Users", () => { describe("role-mappings", () => { before(async () => { // create new role - const roleName = faker.internet.userName(); + const roleName = faker.internet.username(); await kcAdminClient.roles.create({ name: roleName, }); @@ -460,7 +460,7 @@ describe("Users", () => { describe("client role-mappings", () => { before(async () => { // create new client - const clientId = faker.internet.userName(); + const clientId = faker.internet.username(); await kcAdminClient.clients.create({ clientId, }); @@ -470,7 +470,7 @@ describe("Users", () => { currentClient = clients[0]; // create new client role - const roleName = faker.internet.userName(); + const roleName = faker.internet.username(); await kcAdminClient.clients.createRole({ id: currentClient.id, name: roleName, @@ -536,7 +536,7 @@ describe("Users", () => { }); it("del client role-mappings from user", async () => { - const roleName = faker.internet.userName(); + const roleName = faker.internet.username(); await kcAdminClient.clients.createRole({ id: currentClient.id, name: roleName, @@ -575,7 +575,7 @@ describe("Users", () => { await kcAdminClient.auth(credentials); // create client - const clientId = faker.internet.userName(); + const clientId = faker.internet.username(); await kcAdminClient.clients.create({ clientId, consentRequired: true, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index eed25f0c37..81875fcdcc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -348,8 +348,8 @@ importers: version: 3.1.1 devDependencies: '@faker-js/faker': - specifier: ^9.0.3 - version: 9.0.3 + specifier: ^9.1.0 + version: 9.1.0 '@types/chai': specifier: ^5.0.1 version: 5.0.1 @@ -1043,8 +1043,8 @@ packages: resolution: {integrity: sha512-HFZ4Mp26nbWk9d/BpvP0YNL6W4UoZF0VFcTw/aPPA8RpOxeFQgK+ClABGgAUXs9Y/RGX/l1vOmrqz1MQt9MNuw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@faker-js/faker@9.0.3': - resolution: {integrity: sha512-lWrrK4QNlFSU+13PL9jMbMKLJYXDFu3tQfayBsMXX7KL/GiQeqfB1CzHkqD5UHBUtPAuPo6XwGbMFNdVMZObRA==} + '@faker-js/faker@9.1.0': + resolution: {integrity: sha512-GJvX9iM9PBtKScJVlXQ0tWpihK3i0pha/XAhzQa1hPK/ILLa1Wq3I63Ij7lRtqTwmdTxRCyrUhLC5Sly9SLbug==} engines: {node: '>=18.0.0', npm: '>=9.0.0'} '@fastify/busboy@2.1.1': @@ -5608,7 +5608,7 @@ snapshots: dependencies: levn: 0.4.1 - '@faker-js/faker@9.0.3': {} + '@faker-js/faker@9.1.0': {} '@fastify/busboy@2.1.1': {}