keycloak-mock
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -19,2 +19,3 @@ export interface CreateMockUserProfileOptions { | ||
findUserByID(sub: string): MockUserProfile | null; | ||
clear(): void; | ||
/** | ||
@@ -21,0 +22,0 @@ * Creates a new user and returns the profile of the newly created user. |
@@ -11,2 +11,5 @@ "use strict"; | ||
}; | ||
MockDatabase.prototype.clear = function () { | ||
this.users = []; | ||
}; | ||
/** | ||
@@ -13,0 +16,0 @@ * Creates a new user and returns the profile of the newly created user. |
@@ -1,2 +0,4 @@ | ||
export { activateMock, deactivateMock } from "./mock"; | ||
export { createMockInstance } from "./instance"; | ||
export { Mock, MockOptions, activateMock, deactivateMock, getMock, getMockInstance } from "./mock"; | ||
export { MockInstance, MockInstanceParams, CreateMockInstanceOptions, createMockInstance, } from "./instance"; | ||
export { default as MockDatabase, MockUserProfile, CreateMockUserProfileOptions } from "./database"; | ||
export { default as createBearerToken, CreateTokenOptions } from "./createBearerToken"; |
@@ -6,3 +6,10 @@ "use strict"; | ||
exports.deactivateMock = mock_1.deactivateMock; | ||
exports.getMock = mock_1.getMock; | ||
exports.getMockInstance = mock_1.getMockInstance; | ||
var instance_1 = require("./instance"); | ||
exports.MockInstance = instance_1.MockInstance; | ||
exports.createMockInstance = instance_1.createMockInstance; | ||
var database_1 = require("./database"); | ||
exports.MockDatabase = database_1.default; | ||
var createBearerToken_1 = require("./createBearerToken"); | ||
exports.createBearerToken = createBearerToken_1.default; |
@@ -15,2 +15,3 @@ import { Scope } from "nock"; | ||
declare const getMock: (authServerURL: string) => Mock; | ||
export { activateMock, deactivateMock, getMock }; | ||
declare const getMockInstance: (authServerURL: string) => MockInstance; | ||
export { activateMock, deactivateMock, getMock, getMockInstance }; |
@@ -58,1 +58,5 @@ "use strict"; | ||
exports.getMock = getMock; | ||
var getMockInstance = function (authServerURL) { | ||
return getMock(authServerURL).instance; | ||
}; | ||
exports.getMockInstance = getMockInstance; |
@@ -30,2 +30,6 @@ import { v4 as uuidv4 } from "uuid"; | ||
clear(): void { | ||
this.users = []; | ||
} | ||
/** | ||
@@ -32,0 +36,0 @@ * Creates a new user and returns the profile of the newly created user. |
@@ -1,2 +0,9 @@ | ||
export { activateMock, deactivateMock } from "./mock"; | ||
export { createMockInstance } from "./instance"; | ||
export { Mock, MockOptions, activateMock, deactivateMock, getMock, getMockInstance } from "./mock"; | ||
export { | ||
MockInstance, | ||
MockInstanceParams, | ||
CreateMockInstanceOptions, | ||
createMockInstance, | ||
} from "./instance"; | ||
export { default as MockDatabase, MockUserProfile, CreateMockUserProfileOptions } from "./database"; | ||
export { default as createBearerToken, CreateTokenOptions } from "./createBearerToken"; |
@@ -80,2 +80,6 @@ import nock, { Scope } from "nock"; | ||
export { activateMock, deactivateMock, getMock }; | ||
const getMockInstance = (authServerURL: string): MockInstance => { | ||
return getMock(authServerURL).instance; | ||
}; | ||
export { activateMock, deactivateMock, getMock, getMockInstance }; |
{ | ||
"name": "keycloak-mock", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Keycloak server mock for Node.js", | ||
@@ -12,3 +12,4 @@ "main": "dist/index.js", | ||
"format": "prettier --write '**/*.ts'", | ||
"format:verify": "prettier --check '**/*.ts'" | ||
"format:verify": "prettier --check '**/*.ts'", | ||
"publish": "yarn format && yarn build && npm publish --access public" | ||
}, | ||
@@ -15,0 +16,0 @@ "devDependencies": { |
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
36897
828