From cbe16aa5e5a4e93b90318280c7ba364b1080923a Mon Sep 17 00:00:00 2001 From: DDD1542 Date: Mon, 30 Mar 2026 11:35:08 +0900 Subject: [PATCH] [agent-pipeline] pipe-20260330021427-v9fb round-2 --- frontend/lib/utils/webTypeMapping.ts | 4 +-- .../test-scenarios/stress-test-scenarios.ts | 28 +++++++++---------- frontend/test-scenarios/type-safety-tests.ts | 22 +++++++-------- frontend/types/screen-legacy-backup.ts | 2 +- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/frontend/lib/utils/webTypeMapping.ts b/frontend/lib/utils/webTypeMapping.ts index dee5b343..ed3c5877 100644 --- a/frontend/lib/utils/webTypeMapping.ts +++ b/frontend/lib/utils/webTypeMapping.ts @@ -3,7 +3,7 @@ */ export interface WebTypeMapping { - webType: string; + web_type: string; componentId: string; description: string; } @@ -346,7 +346,7 @@ export function getSupportedComponentIds(): string[] { */ export function getWebTypeMappings(): WebTypeMapping[] { return Object.entries(WEB_TYPE_V2_MAPPING).map(([webType, mapping]) => ({ - webType, + web_type: webType, componentId: mapping.componentType, description: `${webType} → ${mapping.componentType}`, })); diff --git a/frontend/test-scenarios/stress-test-scenarios.ts b/frontend/test-scenarios/stress-test-scenarios.ts index f0d203c3..c6263eac 100644 --- a/frontend/test-scenarios/stress-test-scenarios.ts +++ b/frontend/test-scenarios/stress-test-scenarios.ts @@ -132,17 +132,17 @@ export class StressTestSuite { // 다양한 잘못된 데이터들로 타입 시스템 공격 const corruptedInputs = [ // 잘못된 WebType들 - { webType: null, expected: false }, - { webType: undefined, expected: false }, - { webType: "", expected: false }, - { webType: "invalid_type", expected: false }, - { webType: "VARCHAR(255)", expected: false }, - { webType: "submit", expected: false }, // ButtonActionType과 혼동 - { webType: "widget", expected: false }, // ComponentType과 혼동 - { webType: 123, expected: false }, - { webType: {}, expected: false }, - { webType: [], expected: false }, - { webType: "text", expected: true }, // 유일한 올바른 값 + { web_type: null, expected: false }, + { web_type: undefined, expected: false }, + { web_type: "", expected: false }, + { web_type: "invalid_type", expected: false }, + { web_type: "VARCHAR(255)", expected: false }, + { web_type: "submit", expected: false }, // ButtonActionType과 혼동 + { web_type: "widget", expected: false }, // ComponentType과 혼동 + { web_type: 123, expected: false }, + { web_type: {}, expected: false }, + { web_type: [], expected: false }, + { web_type: "text", expected: true }, // 유일한 올바른 값 // 잘못된 ButtonActionType들 { buttonAction: "insert", expected: false }, @@ -160,15 +160,15 @@ export class StressTestSuite { console.log("🦠 타입 오염 데이터 검증 중..."); corruptedInputs.forEach((input, index) => { - if ("webType" in input) { - const isValid = isWebType(input.webType as unknown); + if ("web_type" in input) { + const isValid = isWebType(input.web_type as unknown); if (isValid === input.expected) { passedChecks++; } else { failedChecks++; console.warn( `❌ WebType 검증 실패 #${index}:`, - input.webType, + input.web_type, "expected:", input.expected, "got:", diff --git a/frontend/test-scenarios/type-safety-tests.ts b/frontend/test-scenarios/type-safety-tests.ts index 9df01ea7..952204de 100644 --- a/frontend/test-scenarios/type-safety-tests.ts +++ b/frontend/test-scenarios/type-safety-tests.ts @@ -478,19 +478,19 @@ export class StressTestScenarios { // API로부터 받을 수 있는 다양한 잘못된 데이터들 const corruptedData = [ - { webType: "text_area", expected: false }, // 기존 잘못된 타입 - { webType: "VARCHAR(255)", expected: false }, // DB 타입 혼입 - { webType: "submit", expected: false }, // ButtonActionType 혼입 - { webType: "", expected: false }, // 빈 문자열 - { webType: null, expected: false }, // null - { webType: undefined, expected: false }, // undefined - { webType: 123, expected: false }, // 숫자 - { webType: {}, expected: false }, // 객체 - { webType: "text", expected: true }, // 올바른 타입 + { web_type: "text_area", expected: false }, // 기존 잘못된 타입 + { web_type: "VARCHAR(255)", expected: false }, // DB 타입 혼입 + { web_type: "submit", expected: false }, // ButtonActionType 혼입 + { web_type: "", expected: false }, // 빈 문자열 + { web_type: null, expected: false }, // null + { web_type: undefined, expected: false }, // undefined + { web_type: 123, expected: false }, // 숫자 + { web_type: {}, expected: false }, // 객체 + { web_type: "text", expected: true }, // 올바른 타입 ]; - corruptedData.forEach(({ webType, expected }) => { - const result = isWebType(webType as any); + corruptedData.forEach(({ web_type, expected }) => { + const result = isWebType(web_type as any); console.assert( result === expected, `타입 검증 실패: ${JSON.stringify(webType)} → expected: ${expected}, got: ${result}`, diff --git a/frontend/types/screen-legacy-backup.ts b/frontend/types/screen-legacy-backup.ts index 55451592..b0eb1b71 100644 --- a/frontend/types/screen-legacy-backup.ts +++ b/frontend/types/screen-legacy-backup.ts @@ -713,7 +713,7 @@ export interface ColumnInfo { export interface ColumnWebTypeSetting { tableName: string; columnName: string; - webType: WebType; + web_type: WebType; columnLabel?: string; detailSettings?: Record; codeCategory?: string;