33930e7a33
chore(utils): remove unused utility functions
...
- Remove getPath function (moved to problem-editor store)
- Remove getDifficultyColorClass function (unused)
- Keep only core cn utility function
2025-05-13 16:34:28 +08:00
f6ed0baaf0
refactor(prisma): simplify prisma client initialization and remove caching
...
Removed all caching and logging functionality from prisma.ts, keeping only
the basic Prisma client initialization logic. This includes:
- Removal of getProblems, getCachedProblems, getProblem, getCachedProblem functions
- Removal of related logger and cache imports
- Simplified the global prisma client instantiation
2025-05-13 15:59:57 +08:00
cea0027799
refactor(shiki): migrate to shiki/core with lazy initialization
...
- Replace shiki with shiki/core for better tree-shaking
- Change highlighter initialization to explicit theme/lang imports
- Export getHighlighter function instead of direct highlighter instance
- Add error handling for uninitialized highlighter access
2025-05-13 14:48:32 +08:00
9ec8768393
chore(shiki): convert function to arrow function
2025-05-09 09:42:24 +08:00
b67b13d7bf
refactor(route): rename [id] to [problemId] in problems route
2025-05-07 14:59:17 +08:00
2c7223a323
feat(prisma): add server-only caching for problems queries
...
- Add 'server-only' import to enforce server-side usage
- Implement cached problem queries with logging:
- Add getProblems/getCachedProblems for all problems
- Add getProblem/getCachedProblem for single problem by ID
- Use React cache and Next.js unstable_cache with tags
- Add detailed logging with timing metrics
2025-05-06 21:33:37 +08:00
a3ef5d88e6
refactor(auth)!: remove components and rewrite sign-in page
2025-05-05 18:21:08 +08:00
1f21cad4d1
refactor(auth)!: replace credentials with OAuth providers and add logging
...
BREAKING CHANGE:
- Removed credentials-based authentication
- Added Google OAuth provider
- Implemented detailed logging for auth events
- Removed custom JWT/session handling
- Added sign-in page configuration
- Marked as server-only
2025-05-05 17:05:01 +08:00
613dd5ef17
feat(log): add pino logging support
2025-05-04 21:35:44 +08:00
4428a29306
refactor(i18n): replace hardcoded texts with i18n message keys
2025-04-15 18:22:21 +08:00
ad43eb9b0a
refactor(status): extract status logic into separate module
...
- Moved color class and status map logic to `src/lib/status.ts`
- Simplified `showStatusToast` and `StatusToast` components
- Replaced `getColorClass` with `getStatusColorClass` from the new module
2025-04-11 17:41:04 +08:00
dc939085bb
refactor(hooks): move show-status-toast.tsx from lib to hooks
2025-04-11 09:47:31 +08:00
6e22822383
chore(toast): rename show-exit-code-toast.tsx to show-status-toast.tsx
2025-04-10 22:42:41 +08:00
11ecdcc535
feat(shiki): add support for markdown highlighting
2025-04-04 19:43:33 +08:00
750fb74653
chore(imports): update imports to use @/generated/client instead of @prisma/client
2025-04-01 11:46:25 +08:00
f16363ae72
feat(auth): enable GitHub dangerous email account linking
2025-04-01 00:12:58 +08:00
25920fcb68
feat(utils): add difficulty color utility and update type imports
2025-03-30 20:30:58 +08:00
378d568694
fix(toast): update ExitCodeToast styling and layout
2025-03-24 13:08:21 +08:00
1796d21a09
refactor(language-server): modify connectToLanguageServer
to return both client and webSocket
2025-03-23 23:51:12 +08:00
b339e407cf
feat(utils): include problemId in getPath function
2025-03-23 15:34:57 +08:00
b46a603f62
feat(toast): add custom exit code toast component with icons and messages
2025-03-21 11:07:10 +08:00
8290634afd
fix(utils): update function to use fileName instead of language
2025-03-19 18:18:44 +08:00
e25a97d698
feat(auth): add event to assign ADMIN role to the first user
2025-03-18 21:53:12 +08:00
acfeee5a26
refactor(language-server): replace EditorLanguageMetadata with EditorLanguageConfig and LanguageServerConfig for better type safety
2025-03-16 15:49:46 +08:00
c1999bd386
refactor(utils): update getPath function to use EditorLanguageConfig from Prisma
2025-03-16 15:36:54 +08:00
907d108714
feat(auth): implement custom credentials provider with session management
2025-03-14 14:39:26 +08:00
e6e5ea98ea
feat(auth): add validation schema using Zod
2025-03-14 14:22:58 +08:00
17dd98c78c
refactor(utils): remove type annotation from getPath function
2025-03-14 11:04:12 +08:00
574a98e58e
chore(auth): move auth.ts to src/lib directory
2025-03-12 22:46:01 +08:00
24d94f3802
feat(prisma): add global Prisma client instance
2025-03-12 15:25:31 +08:00
d3d280e618
refactor(prisma): replace global with globalThis for cross-platform compatibility
2025-03-12 15:06:08 +08:00
6a01fed089
refactor(prisma): move prisma initialization to default export
2025-03-11 14:58:36 +08:00
862fbf1379
fix(prisma): ensure single Prisma Client instance in development
...
- Reference: https://www.prisma.io/docs/orm/more/help-and-troubleshooting/nextjs-help#recommended-solution
2025-03-11 12:47:28 +08:00
4f6a37df17
fix(prisma): update enum values for EditorLanguage to lowercase ('c' and 'cpp')
2025-03-08 21:03:32 +08:00
214f4fabef
chore(lib): add prisma client initialization
2025-03-06 11:29:10 +08:00
0d29c56750
feat(language-server): add logging for URL creation in connectToLanguageServer
2025-03-05 19:21:55 +08:00
a920cbc4b8
refactor(utils): rename languageServerConfigs to LanguageServerConfig
2025-03-04 21:28:47 +08:00
af23dd3289
feat(editor): add language server connection via WebSocket
2025-03-04 20:58:06 +08:00
742a827072
feat(language-server): add configuration for C and C++
2025-03-04 20:53:19 +08:00
1f417fb4e6
feat(shiki): improve Shiki highlighter initialization with dynamic theme and language support
2025-03-04 20:29:21 +08:00
2f2b172fb8
feat(shiki): add Shiki highlighter initialization for syntax highlighting
2025-02-20 00:30:32 +08:00
f7261ede2c
chore: initialize shadcn/ui
2025-02-19 09:07:30 +08:00