fix: move mimeType to @isomorphic

This commit is contained in:
alvaromartmart 2024-06-24 21:50:02 +02:00
parent c7f7928ce6
commit 13ea32b1f2
3 changed files with 2 additions and 7 deletions

View file

@ -26,7 +26,7 @@ export * from './headers';
export * from './hostPlatform';
export * from './httpServer';
export * from './manualPromise';
export * from './mimeType';
export * from './isomorphic/mimeType';
export * from './multimap';
export * from './network';
export * from './processLauncher';

View file

@ -21,12 +21,7 @@ import type { MultiTraceModel } from './modelUtil';
import { PlaceholderPanel } from './placeholderPanel';
import type { AfterActionTraceEventAttachment } from '@trace/trace';
// TODO: remove local function and restore import
// import { isTextualMimeType } from 'playwright-core/lib/utils';
function isTextualMimeType(mimeType: string) {
return !!mimeType.match(/^(text\/.*?|application\/(json|(x-)?javascript|xml.*?|ecmascript|graphql|x-www-form-urlencoded)|image\/svg(\+xml)?|application\/.*?(\+json|\+xml))(;\s*charset=.*)?$/);
}
import { isTextualMimeType } from '@isomorphic/mimeType';
type Attachment = AfterActionTraceEventAttachment & { traceUrl: string };