refactor: remove dead code and unused files
- Remove duplicate web implementation (src/web.ts - 1,129 lines) - Remove unused DailyNotification wrapper class (src/daily-notification.ts - 288 lines) - Remove unused callback registry (src/callback-registry.ts - 413 lines) - Remove unused example files (5 files, ~1,500 lines) - Remove unused TypeScript modules (moved to test-apps/shared/typescript/) - Remove unused interfaces (ContentHandler, ScheduleOptions) - Remove outdated documentation files (VERIFICATION_*, GLOSSARY, etc.) - Update import paths in test apps to use moved TypeScript modules - Clean up README and USAGE.md references to deleted files Total cleanup: ~3,330+ lines of dead code removed Files deleted: 20 files Files modified: 6 files (import path updates and documentation cleanup) This significantly reduces codebase complexity and maintenance burden.
This commit is contained in:
@@ -27,28 +27,9 @@ export interface NotificationOptions {
|
||||
retryCount?: number;
|
||||
retryInterval?: number;
|
||||
offlineFallback?: boolean;
|
||||
contentHandler?: ContentHandler;
|
||||
headers?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface ContentHandler {
|
||||
(response?: any): Promise<{ title: string; body: string; data?: any }>;
|
||||
}
|
||||
|
||||
|
||||
|
||||
export interface ScheduleOptions {
|
||||
url?: string;
|
||||
time?: string;
|
||||
sound?: boolean;
|
||||
priority?: 'high' | 'default' | 'low' | 'min' | 'max' | 'normal';
|
||||
timezone?: string;
|
||||
retryCount?: number;
|
||||
retryInterval?: number;
|
||||
offlineFallback?: boolean;
|
||||
contentHandler?: ContentHandler;
|
||||
headers?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface NotificationSettings {
|
||||
url?: string;
|
||||
@@ -223,7 +204,6 @@ export interface ContentFetchConfig {
|
||||
onError?: (error: Error) => Promise<void>;
|
||||
onComplete?: (result: ContentFetchResult) => Promise<void>;
|
||||
};
|
||||
contentHandler?: ContentHandler;
|
||||
cachePolicy?: CachePolicy;
|
||||
networkConfig?: NetworkConfig;
|
||||
// Phase 2: TimeSafari Endorser.ch API configuration
|
||||
@@ -355,7 +335,7 @@ export interface DailyNotificationPlugin {
|
||||
}>;
|
||||
|
||||
// Existing methods
|
||||
scheduleDailyNotification(options: NotificationOptions | ScheduleOptions): Promise<void>;
|
||||
scheduleDailyNotification(options: NotificationOptions): Promise<void>;
|
||||
getLastNotification(): Promise<NotificationResponse | null>;
|
||||
cancelAllNotifications(): Promise<void>;
|
||||
getNotificationStatus(): Promise<NotificationStatus>;
|
||||
|
||||
Reference in New Issue
Block a user