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:
Generated
Vendored
+27
-23
@@ -1,7 +1,7 @@
|
||||
import express from 'express';
|
||||
import { McpServer } from '../../server/mcp.js';
|
||||
import { SSEServerTransport } from '../../server/sse.js';
|
||||
import * as z from 'zod/v4';
|
||||
import { createMcpExpressApp } from '../../server/express.js';
|
||||
import { z } from 'zod';
|
||||
/**
|
||||
* This example server demonstrates the deprecated HTTP+SSE transport
|
||||
* (protocol version 2024-11-05). It mainly used for testing backward compatible clients.
|
||||
@@ -15,48 +15,52 @@ import { createMcpExpressApp } from '../../server/express.js';
|
||||
const getServer = () => {
|
||||
const server = new McpServer({
|
||||
name: 'simple-sse-server',
|
||||
version: '1.0.0'
|
||||
version: '1.0.0',
|
||||
}, { capabilities: { logging: {} } });
|
||||
server.registerTool('start-notification-stream', {
|
||||
description: 'Starts sending periodic notifications',
|
||||
inputSchema: {
|
||||
interval: z.number().describe('Interval in milliseconds between notifications').default(1000),
|
||||
count: z.number().describe('Number of notifications to send').default(10)
|
||||
}
|
||||
}, async ({ interval, count }, extra) => {
|
||||
server.tool('start-notification-stream', 'Starts sending periodic notifications', {
|
||||
interval: z.number().describe('Interval in milliseconds between notifications').default(1000),
|
||||
count: z.number().describe('Number of notifications to send').default(10),
|
||||
}, async ({ interval, count }, { sendNotification }) => {
|
||||
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
|
||||
let counter = 0;
|
||||
// Send the initial notification
|
||||
await server.sendLoggingMessage({
|
||||
level: 'info',
|
||||
data: `Starting notification stream with ${count} messages every ${interval}ms`
|
||||
}, extra.sessionId);
|
||||
await sendNotification({
|
||||
method: "notifications/message",
|
||||
params: {
|
||||
level: "info",
|
||||
data: `Starting notification stream with ${count} messages every ${interval}ms`
|
||||
}
|
||||
});
|
||||
// Send periodic notifications
|
||||
while (counter < count) {
|
||||
counter++;
|
||||
await sleep(interval);
|
||||
try {
|
||||
await server.sendLoggingMessage({
|
||||
level: 'info',
|
||||
data: `Notification #${counter} at ${new Date().toISOString()}`
|
||||
}, extra.sessionId);
|
||||
await sendNotification({
|
||||
method: "notifications/message",
|
||||
params: {
|
||||
level: "info",
|
||||
data: `Notification #${counter} at ${new Date().toISOString()}`
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (error) {
|
||||
console.error('Error sending notification:', error);
|
||||
console.error("Error sending notification:", error);
|
||||
}
|
||||
}
|
||||
return {
|
||||
content: [
|
||||
{
|
||||
type: 'text',
|
||||
text: `Completed sending ${count} notifications every ${interval}ms`
|
||||
text: `Completed sending ${count} notifications every ${interval}ms`,
|
||||
}
|
||||
]
|
||||
],
|
||||
};
|
||||
});
|
||||
return server;
|
||||
};
|
||||
const app = createMcpExpressApp();
|
||||
const app = express();
|
||||
app.use(express.json());
|
||||
// Store transports by session ID
|
||||
const transports = {};
|
||||
// SSE endpoint for establishing the stream
|
||||
@@ -116,7 +120,7 @@ app.post('/messages', async (req, res) => {
|
||||
});
|
||||
// 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);
|
||||
|
||||
Reference in New Issue
Block a user