Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
feat: move ErrorResponse into error sub-dir
Browse files Browse the repository at this point in the history
  • Loading branch information
pamapa committed Jan 17, 2022
1 parent af51769 commit b8fa443
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/JsonService.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.

import { ErrorResponse } from "./ErrorResponse";
import { ErrorResponse } from "./errors";
import { JsonService } from "./JsonService";
import { mocked } from "jest-mock";

Expand Down
2 changes: 1 addition & 1 deletion src/JsonService.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.

import { ErrorResponse } from "./ErrorResponse";
import { ErrorResponse } from "./errors";
import { Logger } from "./utils";

/**
Expand Down
2 changes: 1 addition & 1 deletion src/OidcClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.

import { JwtUtils } from "./utils";
import type { ErrorResponse } from "./errors";
import type { JwtClaims } from "./Claims";
import { OidcClient } from "./OidcClient";
import { OidcClientSettingsStore } from "./OidcClientSettings";
Expand All @@ -10,7 +11,6 @@ import { State } from "./State";
import { SigninRequest } from "./SigninRequest";
import { SignoutRequest } from "./SignoutRequest";
import { SignoutResponse } from "./SignoutResponse";
import type { ErrorResponse } from "./ErrorResponse";
import { RefreshState } from "./RefreshState";
import { SigninResponse } from "./SigninResponse";

Expand Down
2 changes: 1 addition & 1 deletion src/OidcClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.

import { Logger, UrlUtils } from "./utils";
import { ErrorResponse } from "./errors";
import { OidcClientSettings, OidcClientSettingsStore } from "./OidcClientSettings";
import { ResponseValidator } from "./ResponseValidator";
import { MetadataService } from "./MetadataService";
import { ErrorResponse } from "./ErrorResponse";
import type { RefreshState } from "./RefreshState";
import { SigninRequest } from "./SigninRequest";
import { SigninResponse } from "./SigninResponse";
Expand Down
2 changes: 1 addition & 1 deletion src/ResponseValidator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.

import { JwtUtils } from "./utils";
import { ErrorResponse } from "./errors";
import { ResponseValidator } from "./ResponseValidator";
import { MetadataService } from "./MetadataService";
import type { SigninState } from "./SigninState";
import type { SigninResponse } from "./SigninResponse";
import type { SignoutResponse } from "./SignoutResponse";
import { ErrorResponse } from "./ErrorResponse";
import type { UserProfile } from "./User";
import type { OidcClientSettingsStore } from "./OidcClientSettings";
import { mocked } from "jest-mock";
Expand Down
2 changes: 1 addition & 1 deletion src/ResponseValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.

import { Logger, JwtUtils } from "./utils";
import { ErrorResponse } from "./errors";
import type { MetadataService } from "./MetadataService";
import { UserInfoService } from "./UserInfoService";
import { TokenClient } from "./TokenClient";
import { ErrorResponse } from "./ErrorResponse";
import type { OidcClientSettingsStore } from "./OidcClientSettings";
import type { SigninState } from "./SigninState";
import type { SigninResponse } from "./SigninResponse";
Expand Down
5 changes: 3 additions & 2 deletions src/UserManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.

import { Logger } from "./utils";
import { IFrameNavigator, NavigateResponse, PopupNavigator, RedirectNavigator, PopupWindowParams, IWindow, IFrameWindowParams, RedirectParams } from "./navigators";
import { ErrorResponse } from "./errors";
import { IFrameNavigator, NavigateResponse, PopupNavigator, RedirectNavigator, PopupWindowParams,
IWindow, IFrameWindowParams, RedirectParams } from "./navigators";
import { OidcClient, CreateSigninRequestArgs, CreateSignoutRequestArgs } from "./OidcClient";
import { UserManagerSettings, UserManagerSettingsStore } from "./UserManagerSettings";
import { User } from "./User";
Expand All @@ -11,7 +13,6 @@ import { SilentRenewService } from "./SilentRenewService";
import { SessionMonitor } from "./SessionMonitor";
import type { SessionStatus } from "./SessionStatus";
import type { SignoutResponse } from "./SignoutResponse";
import { ErrorResponse } from "./ErrorResponse";
import type { MetadataService } from "./MetadataService";
import { RefreshState } from "./RefreshState";

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/ErrorResponse.ts → src/errors/ErrorResponse.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.

import { Logger } from "./utils";
import { Logger } from "../utils";

/**
* Error class thrown in case of an authentication error.
Expand Down
1 change: 1 addition & 0 deletions src/errors/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./ErrorResponse";
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.

export { ErrorResponse } from "./errors";
export type { IFrameWindowParams, PopupWindowParams, RedirectParams } from "./navigators";
export { Log, Logger } from "./utils";
export type { ILogger, PopupWindowFeatures } from "./utils";
Expand All @@ -9,7 +10,6 @@ export type { OidcAddressClaim, OidcStandardClaims, IdTokenClaims, JwtClaims } f
export { AccessTokenEvents } from "./AccessTokenEvents";
export type { AccessTokenCallback } from "./AccessTokenEvents";
export { CheckSessionIFrame } from "./CheckSessionIFrame";
export { ErrorResponse } from "./ErrorResponse";
export { InMemoryWebStorage } from "./InMemoryWebStorage";
export { MetadataService } from "./MetadataService";
export * from "./OidcClient";
Expand Down

0 comments on commit b8fa443

Please sign in to comment.