Skip to content

Commit 032af05

Browse files
committed
refactor: Remove Kiro installation detection service and clean up related deployment logic
- Deleted KiroInstallationDetectorService and its associated tests to streamline the deployment process. - Updated DeploymentService to remove Kiro installation checks and related logic. - Reorganized import statements for clarity and consistency across deployment services. - Added FIXME comments in various services to address future improvements in validation and security scanning logic.
1 parent 592fe5c commit 032af05

File tree

7 files changed

+11
-1311
lines changed

7 files changed

+11
-1311
lines changed

src/modules/deploy/interfaces/kiro-deployment.interface.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
/**
1212
* Kiro-specific deployment options
1313
*/
14+
// FIXME: kiro 옵션 제거??
1415
export interface KiroDeploymentOptions {
1516
platform: Extract<SupportedPlatform, 'kiro-ide'>;
1617
conflictStrategy: KiroConflictStrategy;

src/modules/deploy/services/deployment-reporter.service.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import * as fs from 'node:fs/promises';
2-
import * as path from 'node:path';
32
import * as os from 'node:os';
3+
import * as path from 'node:path';
44

55
import { Injectable, Logger } from '@nestjs/common';
66

7-
import { DeploymentResult, DeploymentError, DeploymentWarning } from '../interfaces/deployment-result.interface';
8-
import { SupportedPlatform } from '../interfaces/deploy-options.interface';
7+
import { TaptikContext } from '../../context/interfaces/taptik-context.interface';
98
import { ComponentType } from '../interfaces/component-types.interface';
109
import { CursorComponentType } from '../interfaces/cursor-deployment.interface';
11-
import { TaptikContext } from '../../context/interfaces/taptik-context.interface';
10+
import { SupportedPlatform } from '../interfaces/deploy-options.interface';
11+
import { DeploymentResult, DeploymentError, DeploymentWarning } from '../interfaces/deployment-result.interface';
1212

1313
export interface DeploymentReport {
1414
id: string;
@@ -518,7 +518,7 @@ export class DeploymentReporterService {
518518
// Private helper methods
519519

520520
private generateReportId(platform: SupportedPlatform, contextId: string): string {
521-
const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
521+
const timestamp = new Date().toISOString().replace(/[.:]/g, '-');
522522
return `${platform}-${contextId}-${timestamp}`;
523523
}
524524

@@ -892,7 +892,7 @@ export class DeploymentReporterService {
892892
const k = 1024;
893893
const sizes = ['Bytes', 'KB', 'MB', 'GB'];
894894
const i = Math.floor(Math.log(bytes) / Math.log(k));
895-
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
895+
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(2)) } ${ sizes[i]}`;
896896
}
897897

898898
private generateHtmlReport(report: DeploymentReport): string {

src/modules/deploy/services/deployment.service.ts

Lines changed: 2 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import { CursorDeploymentService } from './cursor-deployment.service';
1818
import { DiffService } from './diff.service';
1919
import { ErrorRecoveryService } from './error-recovery.service';
2020
import { KiroComponentHandlerService } from './kiro-component-handler.service';
21-
import { KiroInstallationDetectorService } from './kiro-installation-detector.service';
2221
import { KiroTransformerService } from './kiro-transformer.service';
2322
import { LargeFileStreamerService } from './large-file-streamer.service';
2423
import { PerformanceMonitorService } from './performance-monitor.service';
@@ -37,7 +36,6 @@ export class DeploymentService {
3736
private readonly largeFileStreamer: LargeFileStreamerService,
3837
private readonly kiroTransformer: KiroTransformerService,
3938
private readonly kiroComponentHandler: KiroComponentHandlerService,
40-
private readonly kiroInstallationDetector: KiroInstallationDetectorService,
4139
private readonly cursorDeploymentService: CursorDeploymentService,
4240
) {}
4341

@@ -324,83 +322,6 @@ export class DeploymentService {
324322
};
325323

326324
try {
327-
// Step 1: Check Kiro installation and compatibility
328-
this.performanceMonitor.recordMemoryUsage(
329-
deploymentId,
330-
'installation-check-start',
331-
);
332-
333-
const installationInfo =
334-
await this.kiroInstallationDetector.detectKiroInstallation();
335-
336-
if (!installationInfo.isInstalled) {
337-
result.errors.push({
338-
message:
339-
'Kiro IDE is not installed or not found in expected locations',
340-
code: 'KIRO_NOT_INSTALLED',
341-
severity: 'CRITICAL',
342-
});
343-
this.performanceMonitor.endDeploymentTiming(deploymentId);
344-
result.metadata!.performanceReport =
345-
'Kiro deployment failed - installation not found';
346-
return result;
347-
}
348-
349-
// Add installation info to warnings for user visibility
350-
result.warnings.push({
351-
message: `Kiro IDE detected: v${installationInfo.version || 'unknown'} at ${installationInfo.installationPath}`,
352-
code: 'KIRO_INSTALLATION_DETECTED',
353-
});
354-
355-
// Check compatibility
356-
if (!installationInfo.isCompatible) {
357-
const compatibilityResult =
358-
await this.kiroInstallationDetector.checkCompatibility(
359-
installationInfo.version,
360-
);
361-
362-
// Add compatibility issues as warnings or errors based on severity
363-
for (const issue of compatibilityResult.issues) {
364-
if (issue.severity === 'critical') {
365-
result.errors.push({
366-
message: `Compatibility issue: ${issue.message}`,
367-
code: 'KIRO_COMPATIBILITY_ERROR',
368-
severity: 'HIGH',
369-
});
370-
} else {
371-
result.warnings.push({
372-
message: `Compatibility warning: ${issue.message}`,
373-
code: 'KIRO_COMPATIBILITY_WARNING',
374-
});
375-
}
376-
}
377-
378-
// Stop deployment if critical compatibility issues exist
379-
if (
380-
compatibilityResult.issues.some(
381-
(issue) => issue.severity === 'critical',
382-
)
383-
) {
384-
this.performanceMonitor.endDeploymentTiming(deploymentId);
385-
result.metadata!.performanceReport =
386-
'Kiro deployment failed - compatibility issues';
387-
return result;
388-
}
389-
390-
// Add recommendations
391-
for (const recommendation of compatibilityResult.recommendations) {
392-
result.warnings.push({
393-
message: `Recommendation: ${recommendation}`,
394-
code: 'KIRO_RECOMMENDATION',
395-
});
396-
}
397-
}
398-
399-
this.performanceMonitor.recordMemoryUsage(
400-
deploymentId,
401-
'installation-check-end',
402-
);
403-
404325
// Step 2: Validate configuration for Kiro platform
405326
this.performanceMonitor.recordMemoryUsage(
406327
deploymentId,
@@ -445,6 +366,7 @@ export class DeploymentService {
445366
// Step 4: Security scan for Kiro components
446367
this.performanceMonitor.recordMemoryUsage(deploymentId, 'security-start');
447368

369+
// FIXME: 각 ide별로 transformer를 만들어야 함
448370
// Transform TaptikContext to Kiro formats for security scanning
449371
const globalSettings =
450372
this.kiroTransformer.transformPersonalContext(context);
@@ -634,6 +556,7 @@ export class DeploymentService {
634556
});
635557

636558
// Step 9: Handle backup strategy
559+
// FIXME: dryRun이면 백업 만들 필요 없음 순서 바꾸기
637560
if (options.conflictStrategy === 'backup') {
638561
try {
639562
const backupPath = await this.createKiroBackup();

0 commit comments

Comments
 (0)