import{ObjectWrapper as o}from"../common/common.js";import{TargetDetachedDialog as e}from"../components/components.js";import{userMetrics as n,UserMetrics as r}from"../host/host.js";import{ls as t}from"../platform/platform.js";import{Connections as i,SDKModel as m}from"../sdk/sdk.js";class a extends o.ObjectWrapper{run(){return n.actionTaken(r.Action.ConnectToNodeJSDirectly),i.initMainConnection((()=>(m.TargetManager.instance().createTarget("main",t`Main`,m.Type.Node,null).runtimeAgent().invoke_runIfWaitingForDebugger(),Promise.resolve())),e.TargetDetachedDialog.webSocketConnectionLost),Promise.resolve()}}var s=Object.freeze({__proto__:null,JsMainImpl:a});export{s as JsMain};
