- Remove enableCORS and allowedOrigins from MCPServerSettings - Make apiKey required (string, not optional) - Set enableAuth to true by default - Add comprehensive test coverage for settings types
30 lines
781 B
TypeScript
30 lines
781 B
TypeScript
// Settings Types
|
|
export interface MCPServerSettings {
|
|
port: number;
|
|
apiKey: string; // Now required, not optional
|
|
enableAuth: boolean; // Will be removed in future, kept for migration
|
|
}
|
|
|
|
export interface NotificationSettings {
|
|
notificationsEnabled: boolean;
|
|
showParameters: boolean;
|
|
notificationDuration: number; // milliseconds
|
|
logToConsole: boolean;
|
|
}
|
|
|
|
export interface MCPPluginSettings extends MCPServerSettings, NotificationSettings {
|
|
autoStart: boolean;
|
|
}
|
|
|
|
export const DEFAULT_SETTINGS: MCPPluginSettings = {
|
|
port: 3000,
|
|
apiKey: '', // Will be auto-generated on first load
|
|
enableAuth: true, // Always true now
|
|
autoStart: false,
|
|
// Notification defaults
|
|
notificationsEnabled: false,
|
|
showParameters: false,
|
|
notificationDuration: 3000,
|
|
logToConsole: false
|
|
};
|