import { createCsrfTokenProvider } from "../../src/features/tech-log/adapters/http/studio-session-csrf.ts"; import type { TechLogInstallContext } from "../../src/features/tech-log/adapters/create-tech-log-feature-input.ts"; /** * The install context the existing Studio test suite composes against. It * always selects the mock adapter, so `contractOperations` is a throwing stub * — `createTechLogFeatureInstalledInput` never reads it on the MOCK branch. * * `createStudioAssetGateway` is unconditional (Task 7), so `apiBaseUrl`, * `requestTimeoutMs` and `csrf` must still be well-formed even here: building * the gateway constructs the upload transport eagerly. No existing test * exercises the asset gateway's operations, so `contractOperations` and * `csrf` stay throwing stubs — the same "never actually used" contract as * before. */ export const MOCK_STUDIO_INSTALL_CONTEXT: TechLogInstallContext = Object.freeze({ studioSource: "MOCK", contractOperations: Object.freeze({ async execute() { throw new Error("contract executor is not used by the mock Studio gateway"); }, }), apiBaseUrl: "http://mock-studio.test/", requestTimeoutMs: 10_000, csrf: createCsrfTokenProvider({ async execute() { throw new Error("CSRF provider is not used by the mock Studio gateway"); }, }), });