fix: resolve remaining review follow-ups

This commit is contained in:
Cita
2026-03-22 23:53:41 +08:00
parent 5d78658af9
commit 29c9fcbd29
5 changed files with 53 additions and 16 deletions
+7 -3
View File
@@ -2,9 +2,13 @@ import { describe, expect, it, vi, beforeEach } from 'vitest';
const getProxyFileByPublicIdForOwnerMock = vi.fn();
vi.mock('../../services/proxyFileStore.js', () => ({
getProxyFileByPublicIdForOwner: (...args: unknown[]) => getProxyFileByPublicIdForOwnerMock(...args),
}));
vi.mock('../../services/proxyFileStore.js', async (importOriginal) => {
const actual = await importOriginal<typeof import('../../services/proxyFileStore.js')>();
return {
...actual,
getProxyFileByPublicIdForOwner: (...args: unknown[]) => getProxyFileByPublicIdForOwnerMock(...args),
};
});
describe('inlineLocalInputFileReferences', () => {
beforeEach(() => {
+2 -8
View File
@@ -1,4 +1,4 @@
import { parseProxyLogMetadata } from '../../../shared/proxyLogMeta.js';
import { parseProxyLogMetadata, type ParsedProxyLogMetadata } from '../../../shared/proxyLogMeta.js';
type ComposeProxyLogMessageArgs = {
clientKind?: string | null;
@@ -9,13 +9,7 @@ type ComposeProxyLogMessageArgs = {
errorMessage?: string | null;
};
export type ParsedProxyLogMessageMeta = {
clientKind: string | null;
sessionId: string | null;
downstreamPath: string | null;
upstreamPath: string | null;
messageText: string;
};
export type ParsedProxyLogMessageMeta = ParsedProxyLogMetadata;
export function parseProxyLogMessageMeta(rawMessage: string): ParsedProxyLogMessageMeta {
return parseProxyLogMetadata(rawMessage);
@@ -2,10 +2,13 @@ import { beforeEach, describe, expect, it, vi } from 'vitest';
const getProxyFileByPublicIdForOwnerMock = vi.fn();
vi.mock('./proxyFileStore.js', () => ({
getProxyFileByPublicIdForOwner: (...args: unknown[]) => getProxyFileByPublicIdForOwnerMock(...args),
LOCAL_PROXY_FILE_ID_PREFIX: 'file-metapi-',
}));
vi.mock('./proxyFileStore.js', async (importOriginal) => {
const actual = await importOriginal<typeof import('./proxyFileStore.js')>();
return {
...actual,
getProxyFileByPublicIdForOwner: (...args: unknown[]) => getProxyFileByPublicIdForOwnerMock(...args),
};
});
describe('proxyInputFileResolver', () => {
beforeEach(() => {