Skip to content

Commit e78eac3

Browse files
update package.json for ver5
1 parent e984a3d commit e78eac3

File tree

17 files changed

+25701
-167
lines changed

17 files changed

+25701
-167
lines changed

asynchronous-authorization/langchain-next-js/package-lock.json

Lines changed: 13520 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

asynchronous-authorization/langchain-next-js/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
"node": ">=20 <23"
2626
},
2727
"dependencies": {
28-
"@auth0/ai-langchain": "^3.4.0",
29-
"@auth0/nextjs-auth0": "^4.9.0",
28+
"@auth0/ai-langchain": "^3.5.0",
29+
"@auth0/nextjs-auth0": "^4.10.0",
3030
"@langchain/community": "^0.3.55",
3131
"@langchain/core": "^0.3.75",
3232
"@langchain/langgraph": "^0.4.9",
@@ -42,7 +42,7 @@
4242
"clsx": "^2.1.1",
4343
"date-fns": "^4.1.0",
4444
"drizzle-orm": "^0.44.5",
45-
"drizzle-zod": "^0.8.3",
45+
"drizzle-zod": "0.7.1",
4646
"googleapis": "^159.0.0",
4747
"langchain": "^0.3.33",
4848
"langgraph-nextjs-api-passthrough": "^0.1.4",
@@ -65,8 +65,8 @@
6565
"tailwindcss-animate": "^1.0.7",
6666
"use-stick-to-bottom": "^1.1.1",
6767
"vaul": "^1.1.2",
68-
"zod": "^3.24.2",
69-
"zod-to-json-schema": "^3.24.6"
68+
"zod": "3.25.76 || ^4",
69+
"zod-to-json-schema": "^3.23.2"
7070
},
7171
"devDependencies": {
7272
"@next/bundle-analyzer": "^15.5.2",

asynchronous-authorization/langchain-next-js/src/app/layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { ActiveLink } from '@/components/navbar';
88
import { Button } from '@/components/ui/button';
99
import { Toaster } from '@/components/ui/sonner';
1010
import UserButton from '@/components/auth0/user-button';
11-
import { getCurrentSession } from '@/utils/session';
11+
import { auth0 } from '@/lib/auth0';
1212

1313
const robotoMono = Roboto_Mono({ weight: '400', subsets: ['latin'] });
1414
const publicSans = Inter({ weight: '400', subsets: ['latin'] });
@@ -17,7 +17,7 @@ const TITLE = 'Auth0 Assistant0: An Auth0 + LangChain + Next.js Template';
1717
const DESCRIPTION = 'Starter template showing how to use Auth0 in LangChain + Next.js projects.';
1818

1919
export default async function RootLayout({ children }: { children: React.ReactNode }) {
20-
const session = await getCurrentSession();
20+
const session = await auth0.getSession();
2121

2222
return (
2323
<html lang="en" suppressHydrationWarning>

asynchronous-authorization/langchain-next-js/src/app/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import { LogIn, UserPlus } from 'lucide-react';
22
import { ChatWindow } from '@/components/chat-window';
33
import { GuideInfoBox } from '@/components/guide/GuideInfoBox';
44
import { Button } from '@/components/ui/button';
5-
import { getCurrentSession } from '@/utils/session';
5+
import { auth0 } from '@/lib/auth0';
66

77
export default async function Home() {
8-
const session = await getCurrentSession();
8+
const session = await auth0.getSession();
99

1010
if (!session) {
1111
return (

asynchronous-authorization/langchain-next-js/src/lib/db/schema/documents.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { sql } from 'drizzle-orm';
2-
import { text, varchar, timestamp, pgTable, customType } from 'drizzle-orm/pg-core';
2+
import { varchar, timestamp, pgTable, customType } from 'drizzle-orm/pg-core';
33
import { createSelectSchema } from 'drizzle-zod';
44
import { z } from 'zod';
55

@@ -18,20 +18,17 @@ export const documents = pgTable('documents', {
1818
content: bytea('content').notNull(),
1919
fileName: varchar('file_name', { length: 300 }).notNull(),
2020
fileType: varchar('file_type', { length: 100 }).notNull(),
21-
createdAt: timestamp('created_at')
22-
.notNull()
23-
.default(sql`now()`),
24-
updatedAt: timestamp('updated_at')
25-
.notNull()
26-
.default(sql`now()`),
21+
createdAt: timestamp('created_at').notNull().default(sql`now()`),
22+
updatedAt: timestamp('updated_at').notNull().default(sql`now()`),
2723
userId: varchar('user_id', { length: 191 }).notNull(),
2824
userEmail: varchar('user_email', { length: 191 }).notNull(),
2925
sharedWith: varchar('shared_with', { length: 300 }).array(),
3026
});
3127

32-
export const documentSchema = createSelectSchema(documents).extend({});
28+
export const documentSchema = createSelectSchema(documents, {
29+
content: z.instanceof(Buffer),
30+
}).extend({});
3331

34-
// Schema for documents - used to validate API requests
3532
export const insertDocumentSchema = documentSchema.omit({
3633
id: true,
3734
createdAt: true,
@@ -40,6 +37,5 @@ export const insertDocumentSchema = documentSchema.omit({
4037
userEmail: true,
4138
});
4239

43-
// Type for documents - used to type API request params and within Components
4440
export type DocumentParams = z.infer<typeof documentSchema>;
4541
export type NewDocumentParams = z.infer<typeof insertDocumentSchema>;

asynchronous-authorization/langchain-next-js/src/utils/session.ts

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

0 commit comments

Comments
 (0)