fix: restore main type gates

This commit is contained in:
Peter Steinberger
2026-04-10 08:16:42 +01:00
parent 6517c700de
commit ef1694575d
3 changed files with 6 additions and 4 deletions

View File

@@ -208,7 +208,9 @@ const createRedirectResponse = (location: string, status = 302) =>
new Response(null, { status, headers: { location } });
const createOkFetchMock = (contentType: string, payload = "png") =>
vi.fn(async () => createBufferResponse(payload, contentType));
vi.fn(async (_input: RequestInfo | URL, _init?: RequestInit) =>
createBufferResponse(payload, contentType),
);
const asFetchFn = (fetchFn: unknown): FetchFn => fetchFn as FetchFn;
const buildDownloadParams = (

View File

@@ -1,4 +1,5 @@
import { describe, expect, it } from "vitest";
import type { ConfiguredProviderRequest } from "../config/types.provider-request.js";
import type { SecretRef } from "../config/types.secrets.js";
import {
buildProviderRequestDispatcherPolicy,
@@ -11,7 +12,6 @@ import {
sanitizeConfiguredProviderRequest,
sanitizeRuntimeProviderRequestOverrides,
} from "./provider-request-config.js";
import type { ProviderRequestTransportOverrides } from "./provider-request-config.js";
describe("provider request config", () => {
it("merges discovered, provider, and model headers in precedence order", () => {
@@ -360,7 +360,7 @@ describe("provider request config", () => {
expect(
sanitizeConfiguredProviderRequest({
allowPrivateNetwork: true,
} as ProviderRequestTransportOverrides),
} as ConfiguredProviderRequest),
).toBeUndefined();
});

View File

@@ -511,7 +511,7 @@ describe("exec-policy CLI", () => {
it("does not clobber a newer approvals write during rollback", async () => {
const originalApprovals = structuredClone(mocks.getApprovals());
const originalRaw = JSON.stringify(originalApprovals, null, 2);
const originalSnapshot: ExecApprovalsSnapshot = {
const originalSnapshot = {
path: "/tmp/exec-approvals.json",
exists: true,
raw: originalRaw,