feat(planning): grille hebdomadaire complète avec API et filtres

- Connexion API via proxy Angular (résolution CORS, base path /api)
- Import CSS ng-zorro global pour les modales et composants
- Filtres Camion/Show câblés sur l'affichage de la grille
- Camions affichés via TrucksService (linkés au show du même créneau)
- Panneau de détails : spectacles + camions du jour sélectionné
- Modale de création de spectacle stylisée avec fond et centrage
- Positionnement précis des events à la minute dans leur créneau
- Auto-scroll vers l'heure courante au chargement
- Ligne "maintenant" sur la colonne du jour actuel
- Régénération des services OpenAPI (nouveaux noms de types)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-27 20:36:03 +02:00
parent 150b97cd2e
commit 654b297e2e
3131 changed files with 149304 additions and 104334 deletions
@@ -1,19 +1,17 @@
import express from 'express';
import { McpServer } from '../../server/mcp.js';
import { StreamableHTTPServerTransport } from '../../server/streamableHttp.js';
import * as z from 'zod/v4';
import { createMcpExpressApp } from '../../server/express.js';
import { z } from 'zod';
import cors from 'cors';
const getServer = () => {
// Create an MCP server with implementation details
const server = new McpServer({
name: 'stateless-streamable-http-server',
version: '1.0.0'
version: '1.0.0',
}, { capabilities: { logging: {} } });
// Register a simple prompt
server.registerPrompt('greeting-template', {
description: 'A simple greeting prompt template',
argsSchema: {
name: z.string().describe('Name to include in greeting')
}
server.prompt('greeting-template', 'A simple greeting prompt template', {
name: z.string().describe('Name to include in greeting'),
}, async ({ name }) => {
return {
messages: [
@@ -21,32 +19,32 @@ const getServer = () => {
role: 'user',
content: {
type: 'text',
text: `Please greet ${name} in a friendly manner.`
}
}
]
text: `Please greet ${name} in a friendly manner.`,
},
},
],
};
});
// Register a tool specifically for testing resumability
server.registerTool('start-notification-stream', {
description: 'Starts sending periodic notifications for testing resumability',
inputSchema: {
interval: z.number().describe('Interval in milliseconds between notifications').default(100),
count: z.number().describe('Number of notifications to send (0 for 100)').default(10)
}
}, async ({ interval, count }, extra) => {
server.tool('start-notification-stream', 'Starts sending periodic notifications for testing resumability', {
interval: z.number().describe('Interval in milliseconds between notifications').default(100),
count: z.number().describe('Number of notifications to send (0 for 100)').default(10),
}, async ({ interval, count }, { sendNotification }) => {
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
let counter = 0;
while (count === 0 || counter < count) {
counter++;
try {
await server.sendLoggingMessage({
level: 'info',
data: `Periodic notification #${counter} at ${new Date().toISOString()}`
}, extra.sessionId);
await sendNotification({
method: "notifications/message",
params: {
level: "info",
data: `Periodic notification #${counter} at ${new Date().toISOString()}`
}
});
}
catch (error) {
console.error('Error sending notification:', error);
console.error("Error sending notification:", error);
}
// Wait for the specified interval
await sleep(interval);
@@ -55,30 +53,36 @@ const getServer = () => {
content: [
{
type: 'text',
text: `Started sending periodic notifications every ${interval}ms`
text: `Started sending periodic notifications every ${interval}ms`,
}
]
],
};
});
// Create a simple resource at a fixed URI
server.registerResource('greeting-resource', 'https://example.com/greetings/default', { mimeType: 'text/plain' }, async () => {
server.resource('greeting-resource', 'https://example.com/greetings/default', { mimeType: 'text/plain' }, async () => {
return {
contents: [
{
uri: 'https://example.com/greetings/default',
text: 'Hello, world!'
}
]
text: 'Hello, world!',
},
],
};
});
return server;
};
const app = createMcpExpressApp();
const app = express();
app.use(express.json());
// Configure CORS to expose Mcp-Session-Id header for browser-based clients
app.use(cors({
origin: '*', // Allow all origins - adjust as needed for production
exposedHeaders: ['Mcp-Session-Id']
}));
app.post('/mcp', async (req, res) => {
const server = getServer();
try {
const transport = new StreamableHTTPServerTransport({
sessionIdGenerator: undefined
sessionIdGenerator: undefined,
});
await server.connect(transport);
await transport.handleRequest(req, res, req.body);
@@ -95,9 +99,9 @@ app.post('/mcp', async (req, res) => {
jsonrpc: '2.0',
error: {
code: -32603,
message: 'Internal server error'
message: 'Internal server error',
},
id: null
id: null,
});
}
}
@@ -105,10 +109,10 @@ app.post('/mcp', async (req, res) => {
app.get('/mcp', async (req, res) => {
console.log('Received GET MCP request');
res.writeHead(405).end(JSON.stringify({
jsonrpc: '2.0',
jsonrpc: "2.0",
error: {
code: -32000,
message: 'Method not allowed.'
message: "Method not allowed."
},
id: null
}));
@@ -116,17 +120,17 @@ app.get('/mcp', async (req, res) => {
app.delete('/mcp', async (req, res) => {
console.log('Received DELETE MCP request');
res.writeHead(405).end(JSON.stringify({
jsonrpc: '2.0',
jsonrpc: "2.0",
error: {
code: -32000,
message: 'Method not allowed.'
message: "Method not allowed."
},
id: null
}));
});
// Start the server
const PORT = 3000;
app.listen(PORT, error => {
app.listen(PORT, (error) => {
if (error) {
console.error('Failed to start server:', error);
process.exit(1);