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