UNPKG

@re-shell/cli

Version:

Full-stack development platform uniting microservices and microfrontends. Build complete applications with .NET (ASP.NET Core Web API, Minimal API), Java (Spring Boot, Quarkus, Micronaut, Vert.x), Rust (Actix-Web, Warp, Rocket, Axum), Python (FastAPI, Dja

149 lines (148 loc) 4.14 kB
import { EventEmitter } from 'events'; export interface CrossPlatformConfig { platforms: PlatformTarget[]; tests: PlatformTest[]; dockerEnabled?: boolean; vmEnabled?: boolean; ciEnabled?: boolean; localOnly?: boolean; parallel?: boolean; generateReport?: boolean; failFast?: boolean; } export interface PlatformTarget { os: 'win32' | 'darwin' | 'linux'; arch?: 'x64' | 'arm64' | 'ia32'; version?: string; nodeVersion?: string; dockerImage?: string; vmImage?: string; enabled?: boolean; } export interface PlatformTest { name: string; description?: string; command: string; args?: string[]; env?: Record<string, string>; cwd?: string; timeout?: number; platforms?: string[]; skip?: string[]; expectedOutput?: string | RegExp; expectedExitCode?: number; validators?: TestValidator[]; } export interface TestValidator { type: 'file' | 'directory' | 'command' | 'custom'; target: string; condition: 'exists' | 'contains' | 'matches' | 'custom'; value?: any; platform?: string; } export interface PlatformTestResult { platform: PlatformInfo; test: string; success: boolean; duration: number; output?: string; error?: string; validators?: ValidatorResult[]; artifacts?: string[]; } export interface PlatformInfo { os: string; arch: string; version: string; nodeVersion: string; npmVersion?: string; environment: 'local' | 'docker' | 'vm' | 'ci'; } export interface ValidatorResult { validator: string; success: boolean; actual?: any; expected?: any; error?: string; } export interface CrossPlatformReport { summary: TestSummary; platforms: PlatformInfo[]; results: PlatformTestResult[]; compatibility: CompatibilityMatrix; issues: CompatibilityIssue[]; recommendations: string[]; timestamp: Date; } export interface TestSummary { totalTests: number; totalPlatforms: number; passed: number; failed: number; skipped: number; duration: number; compatibility: number; } export interface CompatibilityMatrix { tests: string[]; platforms: string[]; results: boolean[][]; } export interface CompatibilityIssue { test: string; platform: string; type: 'failure' | 'warning' | 'incompatible'; description: string; suggestion?: string; } export interface DockerConfig { baseImages: Map<string, string>; buildCache?: boolean; cleanup?: boolean; network?: string; volumes?: string[]; } export declare class CrossPlatformTesting extends EventEmitter { private config; private results; private currentPlatform; private dockerConfig; constructor(config: CrossPlatformConfig); run(): Promise<CrossPlatformReport>; private runSequential; private runParallel; private runPlatformTests; private runTest; private runLocalTest; private runDockerTest; private runVMTest; private runCITest; private runValidators; private runValidator; private validateFile; private validateDirectory; private validateCommand; private validateCustom; private detectCurrentPlatform; private getNpmVersion; private initializeDockerConfig; private getEnabledPlatforms; private isCurrentPlatform; private shouldRunTest; private hasFailures; private getPlatformInfo; private generateReport; private getUniquePlatforms; private getUniqueTests; private buildCompatibilityMatrix; private identifyIssues; private getSuggestion; private calculateCompatibility; private generateRecommendations; private saveReport; private formatMarkdownReport; private formatMatrix; } export declare function createPlatformTest(name: string, command: string, options?: Partial<PlatformTest>): PlatformTest; export declare function createPlatformTarget(os: 'win32' | 'darwin' | 'linux', options?: Partial<PlatformTarget>): PlatformTarget; export declare function runCrossPlatformTests(config: CrossPlatformConfig): Promise<CrossPlatformReport>;