import './globalfix' ; import { MiniProgramOptions } from './backend' ; import { MiniProgramClient } from './client' ; import { ApiError , Common , GlobalHandlers , MPTracing , ResourceErrorIntegration } from './integrations' ; import { core } from './shared' ; const { initAndBind } = core ; /**
 * 内部插件集合, 暂时不考虑外部情况
 */ const defaultIntegrations = [ new Common ( ) , new GlobalHandlers ( ) , new ApiError ( ) , new ResourceErrorIntegration ( ) , new MPTracing ( ) ] ; /**
 * 初始化调用处理
 */ export function init ( options = { url : '' } ) { options . isDebug = options . isDebug || false ; options . isProd = true ; options . defaultIntegrations = defaultIntegrations ; initAndBind ( MiniProgramClient , options ) ; }