Skip to content

Commit cb5534e

Browse files
committed
fix: fix nx build
1 parent 43086e0 commit cb5534e

File tree

4 files changed

+20
-72
lines changed

4 files changed

+20
-72
lines changed

nx.json

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
{
22
"$schema": "./node_modules/nx/schemas/nx-schema.json",
33
"namedInputs": {
4-
"default": ["{projectRoot}/**/*", "sharedGlobals"],
5-
"production": ["default"],
4+
"default": [
5+
"{projectRoot}/**/*",
6+
"sharedGlobals"
7+
],
8+
"production": [
9+
"default"
10+
],
611
"sharedGlobals": []
712
},
13+
"targetDefaults": {
14+
"build": {
15+
"dependsOn": [
16+
"^build"
17+
]
18+
}
19+
},
820
"plugins": []
9-
}
21+
}

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"workspace"
2020
],
2121
"scripts": {
22-
"build": "nx run-many --target=build --all --parallel",
22+
"build": "nx run-many --target=build --all",
2323
"fix:lint": "nx run-many --target=fix:lint --all --parallel",
2424
"lint": "nx run-many --target=lint --all --parallel",
2525
"publish:packages": "changeset publish",
@@ -37,6 +37,5 @@
3737
},
3838
"publishConfig": {
3939
"access": "restricted"
40-
},
41-
"packageManager": "[email protected]+sha512.0e82714d1b5b43c74610193cb20734897c1d00de89d0e18420aebc5977fa13d780a9cb05734624e81ebd81cc876cd464794850641c48b9544326b5622ca29971"
42-
}
40+
}
41+
}

packages/next/README.md

Lines changed: 0 additions & 56 deletions
This file was deleted.

packages/nextjs/src/AsgardeoNextClient.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,22 +83,20 @@ class AsgardeoNextClient<T extends AsgardeoNextConfig = AsgardeoNextConfig> exte
8383
authorizationCode?: string,
8484
sessionState?: string,
8585
state?: string,
86-
): Promise<NextResponse> {
86+
): Promise<User> {
8787
let resolvedSessionId: string = sessionId || ((await getSessionId()) as string);
8888

8989
if (!resolvedSessionId) {
9090
resolvedSessionId = await setSessionId(sessionId);
9191
}
9292

93-
console.log('[AsgardeoNextClient] signIn called with options:', options, 'sessionId:', resolvedSessionId);
94-
9593
return this.asgardeo.signIn(
9694
beforeSignIn as any,
9795
resolvedSessionId,
9896
authorizationCode,
9997
sessionState,
10098
state,
101-
) as unknown as NextResponse;
99+
) as unknown as User;
102100
}
103101

104102
override signOut(options?: SignOutOptions, afterSignOut?: (redirectUrl: string) => void): Promise<string>;
@@ -123,8 +121,6 @@ class AsgardeoNextClient<T extends AsgardeoNextConfig = AsgardeoNextConfig> exte
123121
const {method} = req;
124122

125123
if ((method === 'GET' && sanitizedPathname === InternalAuthAPIRoutesConfig.signIn) || searchParams.get('code')) {
126-
console.log('[AsgardeoNextClient] Handling sign-in request', searchParams.get('code'));
127-
128124
let response: NextResponse | undefined;
129125

130126
await this.signIn(
@@ -156,19 +152,16 @@ class AsgardeoNextClient<T extends AsgardeoNextConfig = AsgardeoNextConfig> exte
156152
}
157153

158154
if (method === 'GET' && sanitizedPathname === InternalAuthAPIRoutesConfig.session) {
159-
console.log('[AsgardeoNextClient] Checking session status');
160155
try {
161156
const isAuthenticated: boolean = await this.isSignedIn();
162157

163158
return NextResponse.json({isSignedIn: isAuthenticated});
164159
} catch (error) {
165-
console.error('[AsgardeoNextClient] Session check error:', error);
166160
return NextResponse.json({error: 'Failed to check session'}, {status: 500});
167161
}
168162
}
169163

170164
if (method === 'GET' && sanitizedPathname === InternalAuthAPIRoutesConfig.signOut) {
171-
console.log('[AsgardeoNextClient] Handling sign-out request');
172165
try {
173166
const afterSignOutUrl: string = await this.signOut();
174167

0 commit comments

Comments
 (0)