mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-10 15:32:05 -03:30
Remove dependency on dom library from admin client (#35968)
Closes #25085 Signed-off-by: Jan Melcher <jan.melcher@aeb.com>
This commit is contained in:
parent
6322554da0
commit
8ddf94ca3b
@ -36,7 +36,7 @@ export interface RequestArgs {
|
||||
* Keys to be ignored, meaning that they will not be filtered out of the request payload even if they are a part of `urlParamKeys` or `queryParamKeys`,
|
||||
*/
|
||||
ignoredKeys?: string[];
|
||||
headers?: HeadersInit;
|
||||
headers?: [string, string][] | Record<string, string> | Headers;
|
||||
}
|
||||
|
||||
const pick = (value: Record<string, unknown>, keys: string[]) =>
|
||||
@ -197,7 +197,7 @@ export class Agent {
|
||||
catchNotFound: boolean;
|
||||
payloadKey?: string;
|
||||
returnResourceIdInLocationHeader?: { field: string };
|
||||
headers?: HeadersInit;
|
||||
headers?: [string, string][] | Record<string, string> | Headers;
|
||||
}) {
|
||||
const newPath = urlJoin(this.#basePath, path);
|
||||
|
||||
|
||||
@ -116,6 +116,6 @@ export const getToken = async (settings: Settings): Promise<TokenResponse> => {
|
||||
body: payload,
|
||||
});
|
||||
|
||||
const data: TokenResponseRaw = await response.json();
|
||||
const data = (await response.json()) as TokenResponseRaw;
|
||||
return camelize(data);
|
||||
};
|
||||
|
||||
@ -14,7 +14,7 @@ export class NetworkError extends Error {
|
||||
}
|
||||
|
||||
export async function fetchWithError(
|
||||
input: RequestInfo | URL,
|
||||
input: Request | string | URL,
|
||||
init?: RequestInit,
|
||||
) {
|
||||
const response = await fetch(input, init);
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
"extends": "../../tsconfig.json",
|
||||
"include": ["src"],
|
||||
"compilerOptions": {
|
||||
"lib": ["ESNext"],
|
||||
"module": "Node16",
|
||||
"moduleResolution": "Node16",
|
||||
"outDir": "lib",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user