refactor: 프론트엔드 리펙토링

This commit is contained in:
donghyeon-ka
2026-09-18 22:05:42 +09:00
parent 5cc41467ae
commit ec7f20e2ee
100 changed files with 6005 additions and 2867 deletions
+1 -1
View File
@@ -35,7 +35,7 @@
"src/application/create-application.ts": {
"lines": { "total": 1, "covered": 1, "skipped": 0, "pct": 100 }, "statements": { "total": 1, "covered": 1, "skipped": 0, "pct": 100 }, "functions": { "total": 1, "covered": 1, "skipped": 0, "pct": 100 }, "branches": { "total": 1, "covered": 1, "skipped": 0, "pct": 100 }
},
"src/application/policies/compatibility.ts": {
"src/contracts/compatibility.ts": {
"lines": { "total": 1, "covered": 1, "skipped": 0, "pct": 100 }, "statements": { "total": 1, "covered": 1, "skipped": 0, "pct": 100 }, "functions": { "total": 1, "covered": 1, "skipped": 0, "pct": 100 }, "branches": { "total": 1, "covered": 1, "skipped": 0, "pct": 100 }
},
"src/application/policies/performance-budgets.ts": {
@@ -0,0 +1,33 @@
import type { InstalledHttpOperationExecutor } from "../../../src/adapters/http/index.ts";
import { composeFeatureAdapterInputs } from "../../../src/features/feature-adapter-contribution.ts";
declare module "../../../src/application/ports/in/application-api.ts" {
interface ApplicationFeatureInputs {
"direct-compose-probe": Readonly<{
ping(): "pong";
}>;
}
}
const malformedRawContribution = Object.freeze({
featureId: "direct-compose-probe" as const,
needs: ["http"] as const,
createInput() {
return Object.freeze({
featureId: "direct-compose-probe" as const,
input: Object.freeze({
ping() {
return "pong" as const;
},
}),
});
},
});
composeFeatureAdapterInputs(
Object.freeze([malformedRawContribution] as const),
Object.freeze(["direct-compose-probe"]),
Object.freeze({
http: null as unknown as InstalledHttpOperationExecutor,
}),
);
@@ -0,0 +1,13 @@
import { defineFeatureAdapterContribution } from "../../../src/features/feature-adapter-contribution.ts";
import { createReferenceFeatureInstalledInput } from "../../../src/features/reference-feature/adapters/create-reference-feature-input.ts";
defineFeatureAdapterContribution({
featureId: "reference-feature",
needs: ["http"] as const,
createInput(context) {
context.indexedDb;
return createReferenceFeatureInstalledInput({
http: context.http,
});
},
});
@@ -0,0 +1,15 @@
import { defineFeatureAdapterContribution } from "../../../src/features/feature-adapter-contribution.ts";
import type {} from "../../../src/features/reference-feature/application/reference-feature-api.ts";
defineFeatureAdapterContribution({
featureId: "reference-feature",
needs: ["http"] as const,
createInput() {
return {
featureId: "reference-feature" as const,
input: {
definitelyNotReferenceFeatureInput: true,
},
};
},
});
+19
View File
@@ -0,0 +1,19 @@
import {
createFeatureHttpBinding,
defineFeatureHttpOperation,
type InstalledHttpOperationExecutor,
} from "../../../src/adapters/http/index.ts";
import { GET_REFERENCE_RESOURCE_CONTRACT } from "../../../src/features/reference-feature/contracts/reference-feature-contract-contribution.ts";
import { mapReferenceResourcePayload } from "../../../src/features/reference-feature/contracts/reference-mapper.ts";
declare const executor: InstalledHttpOperationExecutor;
const operations = Object.freeze({
TOTALLY_WRONG_OPERATION_ID: defineFeatureHttpOperation({
contract: GET_REFERENCE_RESOURCE_CONTRACT,
routeId: "REFERENCE_RESOURCE_DETAIL",
mapSuccess: mapReferenceResourcePayload,
}),
});
createFeatureHttpBinding(executor, operations);
@@ -0,0 +1,7 @@
import type { ReferenceHttpBinding } from "../../../src/features/reference-feature/adapters/reference-http-gateway.ts";
declare const http: ReferenceHttpBinding;
http.execute("GET_REFERENCE_RESOURCE", {
name: "wrong-command-for-get",
});
+15
View File
@@ -0,0 +1,15 @@
import { defineFeatureHttpOperationForRoutes } from "../../../src/adapters/http/index.ts";
import {
type ReferenceFeatureRouteId,
} from "../../../src/features/reference-feature/adapters/reference-http-gateway.ts";
import { GET_REFERENCE_RESOURCE_CONTRACT } from "../../../src/features/reference-feature/contracts/reference-feature-contract-contribution.ts";
import { mapReferenceResourcePayload } from "../../../src/features/reference-feature/contracts/reference-mapper.ts";
const defineReferenceOperation =
defineFeatureHttpOperationForRoutes<ReferenceFeatureRouteId>();
defineReferenceOperation({
contract: GET_REFERENCE_RESOURCE_CONTRACT,
routeId: "TOTALLY_WRONG_ROUTE",
mapSuccess: mapReferenceResourcePayload,
});
+13
View File
@@ -0,0 +1,13 @@
import { defineFeatureHttpOperation } from "../../../src/adapters/http/index.ts";
import { GET_REFERENCE_RESOURCE_CONTRACT } from "../../../src/features/reference-feature/contracts/reference-feature-contract-contribution.ts";
defineFeatureHttpOperation({
contract: GET_REFERENCE_RESOURCE_CONTRACT,
routeId: "REFERENCE_RESOURCE_DETAIL",
mapSuccess(value: Readonly<{ unrelatedWireField: number }>) {
return {
ok: true as const,
value,
};
},
});
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.base.json",
"files": [
"./invalid-application-input.ts"
]
}
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.base.json",
"files": [
"./invalid-application-output.ts"
]
}
+6
View File
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.base.json",
"files": [
"./invalid-async-overlay.ts"
]
}
+15
View File
@@ -0,0 +1,15 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"lib": [
"ES2022",
"DOM",
"DOM.Iterable"
],
"types": [
"node",
"vite/client"
],
"isolatedModules": false
}
}
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.base.json",
"files": [
"./invalid-diagnostics-port.ts"
]
}
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.base.json",
"files": [
"./invalid-direct-feature-composition.ts"
]
}
+6
View File
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.base.json",
"files": [
"./invalid-failure-kind.ts"
]
}
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.base.json",
"files": [
"./invalid-feature-capability-selection.ts"
]
}
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.base.json",
"files": [
"./invalid-feature-contribution-input.ts"
]
}
+6
View File
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.base.json",
"files": [
"./invalid-feature-input.ts"
]
}
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.base.json",
"files": [
"./invalid-http-operation-id.ts"
]
}
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.base.json",
"files": [
"./invalid-http-operation-input.ts"
]
}
+6
View File
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.base.json",
"files": [
"./invalid-http-route-id.ts"
]
}
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.base.json",
"files": [
"./invalid-http-wire-mapper.ts"
]
}
+6
View File
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.base.json",
"files": [
"./invalid-icon-button.tsx"
]
}
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.base.json",
"files": [
"./invalid-image-cdn-resolve-signal.ts"
]
}
+6
View File
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.base.json",
"files": [
"./invalid-message-key.ts"
]
}
+6
View File
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.base.json",
"files": [
"./invalid-message-params.ts"
]
}
+6
View File
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.base.json",
"files": [
"./invalid-page-action.tsx"
]
}
+6
View File
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.base.json",
"files": [
"./invalid-port-call.ts"
]
}
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.base.json",
"files": [
"./invalid-port-implementation.ts"
]
}
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.base.json",
"files": [
"./invalid-reference-operation.ts"
]
}
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.base.json",
"files": [
"./invalid-result-narrowing.ts"
]
}
+6
View File
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.base.json",
"files": [
"./invalid-route-runtime.ts"
]
}