import path from 'path' ; import isCi from 'is-ci' ; import getMockId from './mock-id' ; import type { Options , Interceptor } from './types' ; export const DEFAULT_INTERCEPTOR_CAPTURE = { name : '__teremock_buildin_capture' , url : '*' , methods : new Set ( '*' ) , pass : false , naming : { } , resourceTypes : new Set ( [ 'xhr' , 'fetch' ] ) , } ; export const DEFAULT_INTERCEPTOR_PASS = { name : '__teremock_buildin_pass' , url : '*' , methods : new Set ( '*' ) , pass : true , naming : { } , resourceTypes : new Set ( '*' ) , } ; const defaultInterceptors = { __teremock_buildin_capture : DEFAULT_INTERCEPTOR_CAPTURE , __teremock_buildin_pass : DEFAULT_INTERCEPTOR_PASS , } ; export const DEFAULT_OPTIONS = { interceptors : defaultInterceptors , skipResponseHeaders : [ 'date' , 'expires' , 'last-modified' , 'x-powered-by' , 'etag' , 'cache-control' , 'content-length' , 'server' , 'sec-ch-ua' , 'sec-ch-ua-mobile' , ] , skipRequestHeaders : [ 'user-agent' , ] , ci : isCi , awaitConnectionsOnStop : false , getMockId , wd : path . resolve ( process . cwd ( ) , '__teremocks__' ) , } ; export const DEFAULT_RESP_HEADERS = { 'Content-Type' : 'application/json; charset=utf-8' } ;