From 1606d9b0c19a09fea7e3a93c3eb667d6a4f2832a Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Wed, 16 Sep 2026 18:52:39 +0900 Subject: [PATCH] refactor: reach adapter groups through their barrel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bootstrap과 feature 어댑터가 어댑터 내부 파일을 직접 겨누던 15곳을 그룹 배럴로 바꾼다. 커널(platform/**) 간선과 그룹 내부 import는 파일 경로를 유지한다 — check:adapter-inventory가 그 경로를 직접 검증한다. 번들 영향 없음: 초기 JS가 도입 전후 모두 181114 gzip bytes로 동일하다. sideEffects 선언 없이도 재수출이 트리셰이킹된다. Co-Authored-By: Claude Opus 5 (1M context) --- .storybook/preview.tsx | 4 ++-- src/bootstrap/main.tsx | 2 +- src/bootstrap/optional-runtime-host.ts | 2 +- src/bootstrap/register-service-worker.ts | 2 +- src/bootstrap/runtime-adapters.ts | 22 +++++++++---------- .../create-reference-feature-input.ts | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx index 3dca769..2d0e868 100644 --- a/.storybook/preview.tsx +++ b/.storybook/preview.tsx @@ -2,8 +2,8 @@ import type { Preview } from "@storybook/react-vite"; import { QueryClientProvider } from "@tanstack/react-query"; import { MemoryRouter } from "react-router-dom"; -import { createAnonymousSessionAdapter } from "../src/adapters/auth/external-session-adapter.ts"; -import { createQueryClient } from "../src/adapters/query-cache/tanstack-query-cache.ts"; +import { createAnonymousSessionAdapter } from "../src/adapters/auth/index.ts"; +import { createQueryClient } from "../src/adapters/query-cache/index.ts"; import { createApplication } from "../src/application/create-application.ts"; import { LocaleProvider } from "../src/presentation/i18n/index.ts"; import { ApplicationProvider } from "../src/presentation/providers/application-provider.tsx"; diff --git a/src/bootstrap/main.tsx b/src/bootstrap/main.tsx index bc5509e..d741772 100644 --- a/src/bootstrap/main.tsx +++ b/src/bootstrap/main.tsx @@ -1,6 +1,6 @@ import { createRoot } from "react-dom/client"; -import { recordBootFailure } from "../adapters/diagnostics/bounded-diagnostics.ts"; +import { recordBootFailure } from "../adapters/diagnostics/index.ts"; import { BootErrorShell } from "../presentation/boundaries/boot-error-shell.tsx"; import "../presentation/styles/theme.css"; import { createRuntimeComposition } from "./create-runtime-composition.ts"; diff --git a/src/bootstrap/optional-runtime-host.ts b/src/bootstrap/optional-runtime-host.ts index d6c465d..2ace893 100644 --- a/src/bootstrap/optional-runtime-host.ts +++ b/src/bootstrap/optional-runtime-host.ts @@ -1,7 +1,7 @@ import { createBrowserLifecycleRuntime, type BrowserLifecycleRuntime, -} from "../adapters/platform/browser-lifecycle.ts"; +} from "../adapters/platform/index.ts"; import type { ResolvedRuntimeCapabilities, RuntimeHealth, diff --git a/src/bootstrap/register-service-worker.ts b/src/bootstrap/register-service-worker.ts index ff87d96..24e567b 100644 --- a/src/bootstrap/register-service-worker.ts +++ b/src/bootstrap/register-service-worker.ts @@ -2,7 +2,7 @@ import type { ResolvedRuntimeCapabilities, } from "../contracts/runtime-capabilities.ts"; import type { ServiceWorkerRuntimeHost } from "../contracts/service-worker.ts"; -import { createServiceWorkerPageController } from "../adapters/service-worker/service-worker-page-controller.ts"; +import { createServiceWorkerPageController } from "../adapters/service-worker/index.ts"; /** * §17.5. Composition-side factory. The host object is created without any diff --git a/src/bootstrap/runtime-adapters.ts b/src/bootstrap/runtime-adapters.ts index baed010..4d97f5a 100644 --- a/src/bootstrap/runtime-adapters.ts +++ b/src/bootstrap/runtime-adapters.ts @@ -3,13 +3,13 @@ import { createExternalAuthSessionAdapter, createUnavailableSessionAdapter, type ExternalSessionOwner, -} from "../adapters/auth/external-session-adapter.ts"; -import { createDiagnosticsAdapter } from "../adapters/diagnostics/bounded-diagnostics.ts"; -import { createHttpClient } from "../adapters/http/client.ts"; +} from "../adapters/auth/index.ts"; +import { createDiagnosticsAdapter } from "../adapters/diagnostics/index.ts"; import { createContractHttpExecutor, + createHttpClient, type HttpExecutionObservation, -} from "../adapters/http/http-execution-v3.ts"; +} from "../adapters/http/index.ts"; import { attemptBucket, durationBucket, @@ -19,14 +19,14 @@ import { import type { TelemetryEventName } from "../contracts/telemetry.ts"; import { createBrowserCrossContextInvalidationFromHost } from "../adapters/cross-context-invalidation/index.ts"; import { + createConditionalValidatorStore, + createQueryClient, + createServerStateScopeRuntime, createTanStackCacheCoordinator, -} from "../adapters/query-cache/tanstack-cache-coordinator.ts"; -import { createQueryClient } from "../adapters/query-cache/tanstack-query-cache.ts"; -import { createServerStateScopeRuntime } from "../adapters/query-cache/server-state-scope-runtime.ts"; -import { createConditionalValidatorStore } from "../adapters/query-cache/conditional-validator-store.ts"; -import { createBrowserStorageAdapter } from "../adapters/storage/browser-storage-adapter.ts"; -import { createBrowserMutationIntentFactory } from "../adapters/platform/browser-mutation-intent-factory.ts"; -import { createTelemetryAdapter } from "../adapters/telemetry/best-effort-telemetry.ts"; +} from "../adapters/query-cache/index.ts"; +import { createBrowserStorageAdapter } from "../adapters/storage/index.ts"; +import { createBrowserMutationIntentFactory } from "../adapters/platform/index.ts"; +import { createTelemetryAdapter } from "../adapters/telemetry/index.ts"; import type { AuthSessionPort } from "../application/ports/auth-session-port.ts"; import type { ReleaseInfo } from "../application/ports/release-info-port.ts"; import { diff --git a/src/features/reference-feature/adapters/create-reference-feature-input.ts b/src/features/reference-feature/adapters/create-reference-feature-input.ts index d6c040a..de6e1f3 100644 --- a/src/features/reference-feature/adapters/create-reference-feature-input.ts +++ b/src/features/reference-feature/adapters/create-reference-feature-input.ts @@ -6,7 +6,7 @@ import { createFailure, kindForStatus, } from "../../../contracts/errors.ts"; -import type { HttpExecutionOutcome } from "../../../adapters/http/http-execution-v3.ts"; +import type { HttpExecutionOutcome } from "../../../adapters/http/index.ts"; import { createReferenceFeatureInput } from "../application/reference-feature-api.ts"; import { REFERENCE_FEATURE_ID,