refactor: 템플릿에서 기본적으로 제공하고 있는 워크 플로우에 디자인과 라우팅 흡수

This commit is contained in:
donghyeon-ka
2026-09-23 12:42:10 +09:00
parent afde2b1da1
commit aaa384c145
181 changed files with 12553 additions and 5280 deletions
@@ -8,6 +8,7 @@ import { createCsrfTokenProvider } from "../../../src/features/tech-log/adapters
import type { TechLogFeatureInput } from "../../../src/features/tech-log/application/tech-log-feature-input.ts";
import type { WorkingCopy } from "../../../src/features/tech-log/contracts/studio/contract.ts";
import { studioAssetGatewayFromApplication, studioGatewayFromApplication } from "../../helpers/studio-application-gateway-adapter.ts";
type Equal<Left, Right> =
(<Value>() => Value extends Left ? 1 : 2) extends <Value>() =>
Value extends Right ? 1 : 2
@@ -71,11 +72,6 @@ function installedInputs(
throw new Error("platform executor is not used by composition tests");
},
},
contractOperations: {
async execute() {
throw new Error("reference executor is not used by composition tests");
},
},
apiBaseUrl: "http://composition.test/",
requestTimeoutMs: 10_000,
csrf: createCsrfTokenProvider({
@@ -91,9 +87,7 @@ test("installs TechLog beside the retained reference feature through application
assert.deepEqual(Object.keys(installed), ["reference-feature", "tech-log"]);
assert.deepEqual(Object.keys(installed["tech-log"]).sort(), [
"createManagementGateway",
"createStudioAssetGateway",
"createStudioGateway",
"createStudioApplication",
"publicContent",
]);
assert.equal(Object.isFrozen(installed), true);
@@ -106,8 +100,8 @@ test("installs TechLog beside the retained reference feature through application
});
test("selects the mock gateway by default and the HTTP gateway when switched", async () => {
const mockGateway = installedInputs("MOCK")["tech-log"].createStudioGateway();
const httpGateway = installedInputs("HTTP")["tech-log"].createStudioGateway();
const mockGateway = studioGatewayFromApplication(installedInputs("MOCK")["tech-log"].createStudioApplication());
const httpGateway = studioGatewayFromApplication(installedInputs("HTTP")["tech-log"].createStudioApplication());
// The mock reads an in-memory fixture immediately. HTTP defers to the
// (here, throwing) contract executor, so it rejects instead.
@@ -117,8 +111,8 @@ test("selects the mock gateway by default and the HTTP gateway when switched", a
test("each createStudioGateway call owns an isolated mutable Studio session", async () => {
const installed = installedInputs();
const first = installed["tech-log"].createStudioGateway();
const second = installed["tech-log"].createStudioGateway();
const first = studioGatewayFromApplication(installed["tech-log"].createStudioApplication());
const second = studioGatewayFromApplication(installed["tech-log"].createStudioApplication());
assert.notEqual(first, second);
const firstBefore = await first.getDocument(FIXTURE_IDS.fetchJoinCase);
@@ -156,7 +150,7 @@ test("each createStudioGateway call owns an isolated mutable Studio session", as
test("each Studio session gets its own asset gateway instance", () => {
const installed = installedInputs("HTTP");
assert.notEqual(
installed["tech-log"].createStudioAssetGateway(),
installed["tech-log"].createStudioAssetGateway(),
studioAssetGatewayFromApplication(installed["tech-log"].createStudioApplication()),
studioAssetGatewayFromApplication(installed["tech-log"].createStudioApplication()),
);
});