fix: move mimeType to @isomorphic
This commit is contained in:
parent
c7f7928ce6
commit
13ea32b1f2
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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 };
|
||||
|
|
|
|||
Loading…
Reference in a new issue