fix: MCP server Docker deployment, healthchecks, and minor fixes
MCP server: - Fix Prisma imports from stale client-generated path to @prisma/client - Switch schema from SQLite to PostgreSQL for Docker compatibility - Add prisma generate step to Dockerfile with proper binaryTargets - Include index-sse.js in Docker build (was excluded by .dockerignore) - Install openssl and libc6-compat in Alpine image for Prisma runtime Docker: - Fix memento-note healthcheck (wget unavailable in bullseye-slim) Minor fixes: - scrape.service SSRF protection, middleware route coverage - canvas-board and note-input type fixes - next.config turbopack and devIndicators adjustments Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
import dynamic from 'next/dynamic'
|
||||
import { useState, useEffect, useRef } from 'react'
|
||||
import { toast } from 'sonner'
|
||||
import type { ExcalidrawElement } from '@excalidraw/excalidraw/types/element/types'
|
||||
import type { AppState, BinaryFiles } from '@excalidraw/excalidraw/types/types'
|
||||
import type { ExcalidrawElement } from '@excalidraw/excalidraw/element/types'
|
||||
import type { AppState, BinaryFiles } from '@excalidraw/excalidraw/types'
|
||||
import '@excalidraw/excalidraw/index.css'
|
||||
|
||||
// Dynamic import with SSR disabled is REQUIRED for Excalidraw due to window dependencies
|
||||
|
||||
@@ -68,7 +68,7 @@ interface NoteInputProps {
|
||||
onNoteCreated?: (note: Note) => void
|
||||
defaultExpanded?: boolean
|
||||
forceExpanded?: boolean
|
||||
/** Mode onglets : occupe toute la largeur du contenu principal (plus de carte étroite centrée) */
|
||||
/** Tab mode: takes full width of main content (no narrow centered card) */
|
||||
fullWidth?: boolean
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ export function NoteInput({
|
||||
const [dismissedTitleSuggestions, setDismissedTitleSuggestions] = useState(false)
|
||||
|
||||
const handleSelectGhostTag = async (tag: string) => {
|
||||
// Vérification insensible à la casse
|
||||
// Case-insensitive check
|
||||
const tagExists = selectedLabels.some(l => l.toLowerCase() === tag.toLowerCase())
|
||||
|
||||
if (!tagExists) {
|
||||
@@ -145,7 +145,7 @@ export function NoteInput({
|
||||
try {
|
||||
await addLabel(tag)
|
||||
} catch (err) {
|
||||
console.error('Erreur création label auto:', err)
|
||||
console.error('Error creating auto-label:', err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,18 +29,18 @@ export interface OrganizationPlan {
|
||||
}
|
||||
|
||||
/**
|
||||
* Service for batch organizing notes from "Notes générales" into notebooks
|
||||
* Service for batch organizing notes from "General Notes" into notebooks
|
||||
* (Story 5.3 - IA3)
|
||||
*/
|
||||
export class BatchOrganizationService {
|
||||
/**
|
||||
* Analyze all notes in "Notes générales" and create an organization plan
|
||||
* Analyze all notes in "General Notes" and create an organization plan
|
||||
* @param userId - User ID
|
||||
* @param language - User's preferred language (default: 'en')
|
||||
* @returns Organization plan with notebook assignments
|
||||
*/
|
||||
async createOrganizationPlan(userId: string, language: string = 'en'): Promise<OrganizationPlan> {
|
||||
// 1. Get all notes without notebook (Inbox/Notes générales)
|
||||
// 1. Get all notes without notebook (Inbox/General Notes)
|
||||
const notesWithoutNotebook = await prisma.note.findMany({
|
||||
where: {
|
||||
userId,
|
||||
|
||||
@@ -50,12 +50,12 @@ export class ScrapeService {
|
||||
}
|
||||
|
||||
return {
|
||||
title: article.title,
|
||||
content: article.content, // HTML fragment from readability
|
||||
textContent: article.textContent, // Clean text
|
||||
excerpt: article.excerpt,
|
||||
byline: article.byline,
|
||||
siteName: article.siteName,
|
||||
title: article.title ?? '',
|
||||
content: article.content ?? '', // HTML fragment from readability
|
||||
textContent: article.textContent ?? '', // Clean text
|
||||
excerpt: article.excerpt ?? '',
|
||||
byline: article.byline ?? '',
|
||||
siteName: article.siteName ?? '',
|
||||
url: targetUrl
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import NextAuth from 'next-auth';
|
||||
import { authConfig } from './auth.config';
|
||||
|
||||
// NOTE: NextAuth middleware API may change in Next.js 16+.
|
||||
// See: https://nextjs.org/docs/app/building-your-application/routing/middleware
|
||||
export default NextAuth(authConfig).auth;
|
||||
|
||||
export const config = {
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
import type { NextConfig } from "next";
|
||||
|
||||
const withPWA = require("@ducanh2912/next-pwa").default({
|
||||
dest: "public",
|
||||
register: true,
|
||||
skipWaiting: true,
|
||||
disable: process.env.NODE_ENV === "development",
|
||||
});
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
// Enable standalone output for Docker
|
||||
output: 'standalone',
|
||||
@@ -22,8 +15,7 @@ const nextConfig: NextConfig = {
|
||||
// Hide the "compiling" indicator
|
||||
devIndicators: false,
|
||||
|
||||
// Silence warning from Next-PWA custom webpack injections
|
||||
turbopack: {},
|
||||
};
|
||||
|
||||
export default withPWA(nextConfig);
|
||||
export default nextConfig;
|
||||
|
||||
8605
memento-note/package-lock.json
generated
8605
memento-note/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user