Skip to content

Commit

Permalink
Merge pull request #560 from logto-io/simeng-refactor-align-js-sdk-er…
Browse files Browse the repository at this point in the history
…rors

refactor: align the error exports in all js SDKs
  • Loading branch information
simeng-li authored Sep 27, 2023
2 parents 05b9d3e + 5c89d1a commit 9ff6f68
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 13 deletions.
4 changes: 2 additions & 2 deletions packages/browser/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ export type {

export {
LogtoError,
OidcError,
Prompt,
LogtoRequestError,
LogtoClientError,
OidcError,
Prompt,
ReservedScope,
UserScope,
} from '@logto/client';
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ import { once } from './utils/once.js';
export type { IdTokenClaims, LogtoErrorCode, UserInfoResponse, InteractionMode } from '@logto/js';
export {
LogtoError,
LogtoRequestError,
OidcError,
Prompt,
LogtoRequestError,
ReservedScope,
UserScope,
} from '@logto/js';
Expand Down
12 changes: 9 additions & 3 deletions packages/express/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@ import { LogtoExpressError } from './errors.js';
import ExpressStorage from './storage.js';
import type { LogtoExpressConfig } from './types.js';

export { ReservedScope, UserScope } from '@logto/node';

export type { LogtoContext, InteractionMode } from '@logto/node';
export {
ReservedScope,
UserScope,
LogtoError,
LogtoClientError,
LogtoRequestError,
} from '@logto/node';

export type { LogtoContext, InteractionMode, LogtoErrorCode } from '@logto/node';
export type { LogtoExpressConfig } from './types.js';

export type Middleware = (
Expand Down
12 changes: 9 additions & 3 deletions packages/next/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@ import LogtoNextBaseClient from './client.js';
import { createSession } from './session.js';
import type { LogtoNextConfig } from './types.js';

export { ReservedScope, UserScope } from '@logto/node';

export type { LogtoContext, InteractionMode } from '@logto/node';
export {
ReservedScope,
UserScope,
LogtoError,
LogtoClientError,
LogtoRequestError,
} from '@logto/node';

export type { LogtoContext, InteractionMode, LogtoErrorCode } from '@logto/node';

export default class LogtoClient extends LogtoNextBaseClient {
constructor(config: LogtoNextConfig) {
Expand Down
4 changes: 2 additions & 2 deletions packages/node/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ export type {

export {
LogtoError,
OidcError,
Prompt,
LogtoRequestError,
LogtoClientError,
OidcError,
Prompt,
ReservedScope,
UserScope,
} from '@logto/client';
Expand Down
4 changes: 2 additions & 2 deletions packages/node/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ export type {

export {
LogtoError,
OidcError,
Prompt,
LogtoRequestError,
LogtoClientError,
OidcError,
Prompt,
ReservedScope,
UserScope,
PersistKey,
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export type {
export {
LogtoError,
LogtoClientError,
LogtoRequestError,
OidcError,
Prompt,
ReservedScope,
Expand Down
1 change: 1 addition & 0 deletions packages/vue/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export type {
export {
LogtoError,
LogtoClientError,
LogtoRequestError,
OidcError,
Prompt,
ReservedScope,
Expand Down

0 comments on commit 9ff6f68

Please sign in to comment.