From 99cdcd7c810c3c139c1c2f4253a347955ec9c270 Mon Sep 17 00:00:00 2001 From: hyperse-net Date: Sat, 14 Sep 2024 17:40:09 +0800 Subject: [PATCH] chore: fix issue --- packages/next-demo/next.config.mjs | 2 +- packages/next-demo/src/app/[locale]/page.tsx | 2 +- packages/next-demo/src/app/[locale]/post/[id]/page.tsx | 2 +- packages/next-demo/src/app/api/auth/github/callback/route.ts | 2 +- packages/next-demo/src/app/api/auth/github/route.ts | 2 +- packages/next-demo/src/app/api/auth/logout/route.ts | 2 +- packages/next-demo/src/app/api/auth/session/route.ts | 2 +- packages/next-demo/src/auth/lucia.ts | 2 +- packages/next-demo/src/common/client-trpc.tsx | 2 +- packages/next-demo/src/middleware.ts | 2 +- packages/next-demo/src/server/context.ts | 2 +- packages/next-demo/src/server/rsc.ts | 2 +- packages/next-demo/src/server/trpc.ts | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/next-demo/next.config.mjs b/packages/next-demo/next.config.mjs index c87813c..6a12282 100644 --- a/packages/next-demo/next.config.mjs +++ b/packages/next-demo/next.config.mjs @@ -5,7 +5,7 @@ import bundleAnalyzer from '@next/bundle-analyzer'; /** * The order of plugins - * @type {import("@xpro-js/next-env").NextConfigPlugin} + * @type {import("@hyperse/next-env").NextConfigPlugin} */ const plugins = []; diff --git a/packages/next-demo/src/app/[locale]/page.tsx b/packages/next-demo/src/app/[locale]/page.tsx index cf250ae..61f6798 100644 --- a/packages/next-demo/src/app/[locale]/page.tsx +++ b/packages/next-demo/src/app/[locale]/page.tsx @@ -6,7 +6,7 @@ import { PostList } from '@/app/[locale]/post/components/PostList'; import { PostListItem } from '@/app/[locale]/post/components/PostListItem'; import { ProcessEnv } from '@/components/ProcessEnv/ProcessEnv'; import { rsc } from '@/server/rsc'; -import { HydrateClient } from '@xpro-js/next-core'; +import { HydrateClient } from '@hyperse/next-core'; function PostListSkeleton() { return ( diff --git a/packages/next-demo/src/app/[locale]/post/[id]/page.tsx b/packages/next-demo/src/app/[locale]/post/[id]/page.tsx index f1097c4..fcc117d 100644 --- a/packages/next-demo/src/app/[locale]/post/[id]/page.tsx +++ b/packages/next-demo/src/app/[locale]/post/[id]/page.tsx @@ -2,7 +2,7 @@ import { notFound } from 'next/navigation'; import { queryMe } from '@/data/queries/query-me'; import { type NextMeQuery } from '@/generated-types'; import { graphqlRsc, rsc } from '@/server/rsc'; -import { HydrateClient } from '@xpro-js/next-core'; +import { HydrateClient } from '@hyperse/next-core'; export default async function Page(props: PageProps<{ id: string }>) { const post = await rsc.post.byId.fetch({ id: props.params.id }); diff --git a/packages/next-demo/src/app/api/auth/github/callback/route.ts b/packages/next-demo/src/app/api/auth/github/callback/route.ts index 196a5fb..7bbc119 100644 --- a/packages/next-demo/src/app/api/auth/github/callback/route.ts +++ b/packages/next-demo/src/app/api/auth/github/callback/route.ts @@ -1,6 +1,6 @@ import type { NextRequest } from 'next/server'; import { auth, githubAuth } from '@/auth/lucia'; -import { githubProviderHandlers } from '@xpro-js/next-auth'; +import { githubProviderHandlers } from '@hyperse/next-auth'; /** * Upon authentication, the provider will redirect the user back to your application (GET request). diff --git a/packages/next-demo/src/app/api/auth/github/route.ts b/packages/next-demo/src/app/api/auth/github/route.ts index ca54f23..d58dfb4 100644 --- a/packages/next-demo/src/app/api/auth/github/route.ts +++ b/packages/next-demo/src/app/api/auth/github/route.ts @@ -1,5 +1,5 @@ import { auth, githubAuth } from '@/auth/lucia'; -import { githubProviderHandlers } from '@xpro-js/next-auth'; +import { githubProviderHandlers } from '@hyperse/next-auth'; export const GET = async () => { return githubProviderHandlers.authorizeHandler(auth, githubAuth, { diff --git a/packages/next-demo/src/app/api/auth/logout/route.ts b/packages/next-demo/src/app/api/auth/logout/route.ts index dfdcd85..9a46018 100644 --- a/packages/next-demo/src/app/api/auth/logout/route.ts +++ b/packages/next-demo/src/app/api/auth/logout/route.ts @@ -1,7 +1,7 @@ import { type NextRequest } from 'next/server'; import { auth } from '@/auth/lucia'; import { env } from '@/config/env'; -import { logoutHandler } from '@xpro-js/next-auth'; +import { logoutHandler } from '@hyperse/next-auth'; const handleLogout = (request: NextRequest) => { return logoutHandler(auth, request, { diff --git a/packages/next-demo/src/app/api/auth/session/route.ts b/packages/next-demo/src/app/api/auth/session/route.ts index 541295c..5243d5c 100644 --- a/packages/next-demo/src/app/api/auth/session/route.ts +++ b/packages/next-demo/src/app/api/auth/session/route.ts @@ -1,7 +1,7 @@ import { type NextRequest } from 'next/server'; import { auth } from '@/auth/lucia'; import { env } from '@/config/env'; -import { sessionHandler } from '@xpro-js/next-auth'; +import { sessionHandler } from '@hyperse/next-auth'; export const POST = async (req: NextRequest) => { return sessionHandler(auth, req, env.LUCIA_AUTH_SECRET); diff --git a/packages/next-demo/src/auth/lucia.ts b/packages/next-demo/src/auth/lucia.ts index afe1185..09847eb 100644 --- a/packages/next-demo/src/auth/lucia.ts +++ b/packages/next-demo/src/auth/lucia.ts @@ -6,7 +6,7 @@ import { Lucia, PrismaAdapter, TimeSpan, -} from '@xpro-js/next-auth'; +} from '@hyperse/next-auth'; export const auth = new Lucia(new PrismaAdapter(prismaClient), { sessionExpiresIn: new TimeSpan(1, 'd'), diff --git a/packages/next-demo/src/common/client-trpc.tsx b/packages/next-demo/src/common/client-trpc.tsx index 8666959..c79a9c3 100644 --- a/packages/next-demo/src/common/client-trpc.tsx +++ b/packages/next-demo/src/common/client-trpc.tsx @@ -2,10 +2,10 @@ import { useState } from 'react'; import type { AppRouter } from '@/server/routers/_app'; +import { transformer } from '@hyperse/next-core'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { httpBatchLink, loggerLink } from '@trpc/client'; import { createTRPCReact } from '@trpc/react-query'; -import { transformer } from '@xpro-js/next-core'; export const trpc = createTRPCReact({ // overrides: { diff --git a/packages/next-demo/src/middleware.ts b/packages/next-demo/src/middleware.ts index 939636a..e1b731d 100644 --- a/packages/next-demo/src/middleware.ts +++ b/packages/next-demo/src/middleware.ts @@ -1,6 +1,6 @@ import { type NextRequest } from 'next/server'; import createIntlMiddleware from 'next-intl/middleware'; -import { createAuthMiddleware } from '@xpro-js/next-auth'; +import { createAuthMiddleware } from '@hyperse/next-auth'; import { env } from './config/env'; import { locales, pathnames } from './navigation'; diff --git a/packages/next-demo/src/server/context.ts b/packages/next-demo/src/server/context.ts index fc006d5..0cc47cd 100644 --- a/packages/next-demo/src/server/context.ts +++ b/packages/next-demo/src/server/context.ts @@ -1,6 +1,6 @@ import { auth } from '@/auth/lucia'; +import { getSession, type IGetSessionReturn } from '@hyperse/next-auth'; import { type FetchCreateContextFnOptions } from '@trpc/server/adapters/fetch'; -import { getSession, type IGetSessionReturn } from '@xpro-js/next-auth'; import { prisma } from './prisma'; interface CreateContextInnerOptions { diff --git a/packages/next-demo/src/server/rsc.ts b/packages/next-demo/src/server/rsc.ts index f86488c..0d5029f 100644 --- a/packages/next-demo/src/server/rsc.ts +++ b/packages/next-demo/src/server/rsc.ts @@ -1,9 +1,9 @@ import { cookies } from 'next/headers'; import { createContext } from '@/server/context'; import { appRouter } from '@/server/routers/_app'; +import { createTRPCNextLayout, transformer } from '@hyperse/next-core'; import { cacheExchange, createClient, fetchExchange } from '@urql/core'; import { registerUrql } from '@urql/next/rsc'; -import { createTRPCNextLayout, transformer } from '@xpro-js/next-core'; import 'server-only'; /** diff --git a/packages/next-demo/src/server/trpc.ts b/packages/next-demo/src/server/trpc.ts index 985a342..1be3373 100644 --- a/packages/next-demo/src/server/trpc.ts +++ b/packages/next-demo/src/server/trpc.ts @@ -8,8 +8,8 @@ * @see https://trpc.io/docs/v10/procedures */ import { ZodError } from 'zod'; +import { transformer } from '@hyperse/next-core'; import { initTRPC, TRPCError } from '@trpc/server'; -import { transformer } from '@xpro-js/next-core'; import { type Context } from './context'; const t = initTRPC.context().create({