@omniviewdev/runtime 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Client-DGdSmmVk.js → Client-9Aa3u0B7.js} +270 -274
- package/dist/Client-B7h6-bCB.cjs +1 -0
- package/dist/api.cjs +1 -1
- package/dist/api.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/models.cjs +1 -1
- package/dist/models.js +166 -161
- package/dist/wailsjs/go/models.d.ts +20 -15
- package/dist/wailsjs/go/plugin/pluginManager.d.ts +7 -9
- package/package.json +1 -1
- package/dist/Client-ES-O5dCV.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function J(n,e){return window.go.settings.Client.GetSetting(n,e)}function K(){return window.go.settings.Client.ListPlugins()}function X(n){return window.go.settings.Client.ListSettings(n)}function r(n){return window.go.settings.Client.PluginValues(n)}function Y(n,e,t){return window.go.settings.Client.SetSetting(n,e,t)}function Z(n,e){return window.go.settings.Client.SetSettings(n,e)}function nn(){return window.go.settings.Client.Values()}const en=Object.freeze(Object.defineProperty({__proto__:null,GetSetting:J,ListPlugins:K,ListSettings:X,PluginValues:r,SetSetting:Y,SetSettings:Z,Values:nn},Symbol.toStringTag,{value:"Module"}));function tn(n){return window.go.plugin.pluginManager.GetPlugin(n)}function on(n){return window.go.plugin.pluginManager.GetPluginDownloadStats(n)}function u(n){return window.go.plugin.pluginManager.GetPluginMeta(n)}function rn(n){return window.go.plugin.pluginManager.GetPluginReadme(n)}function un(n){return window.go.plugin.pluginManager.GetPluginReleaseHistory(n)}function sn(n,e){return window.go.plugin.pluginManager.GetPluginReviews(n,e)}function gn(n){return window.go.plugin.pluginManager.GetPluginVersions(n)}function ln(n){return window.go.plugin.pluginManager.HandlePluginCrash(n)}function cn(n){return window.go.plugin.pluginManager.Initialize(n)}function wn(){return window.go.plugin.pluginManager.InstallFromPathPrompt()}function an(){return window.go.plugin.pluginManager.InstallInDevMode()}function dn(n){return window.go.plugin.pluginManager.InstallPluginFromPath(n)}function Sn(n,e){return window.go.plugin.pluginManager.InstallPluginVersion(n,e)}function Cn(){return window.go.plugin.pluginManager.ListAvailablePlugins()}function fn(){return window.go.plugin.pluginManager.ListPluginMetas()}function pn(){return window.go.plugin.pluginManager.ListPlugins()}function Gn(n,e){return window.go.plugin.pluginManager.LoadPlugin(n,e)}function Pn(n){return window.go.plugin.pluginManager.ReloadPlugin(n)}function vn(n){return window.go.plugin.pluginManager.Run(n)}function mn(n,e,t){return window.go.plugin.pluginManager.SearchPlugins(n,e,t)}function Rn(n){return window.go.plugin.pluginManager.SetDevServerChecker(n)}function Ln(n){return window.go.plugin.pluginManager.SetDevServerManager(n)}function Mn(){return window.go.plugin.pluginManager.Shutdown()}function yn(n){return window.go.plugin.pluginManager.UninstallPlugin(n)}function bn(n){return window.go.plugin.pluginManager.UnloadPlugin(n)}const Fn=Object.freeze(Object.defineProperty({__proto__:null,GetPlugin:tn,GetPluginDownloadStats:on,GetPluginMeta:u,GetPluginReadme:rn,GetPluginReleaseHistory:un,GetPluginReviews:sn,GetPluginVersions:gn,HandlePluginCrash:ln,Initialize:cn,InstallFromPathPrompt:wn,InstallInDevMode:an,InstallPluginFromPath:dn,InstallPluginVersion:Sn,ListAvailablePlugins:Cn,ListPluginMetas:fn,ListPlugins:pn,LoadPlugin:Gn,ReloadPlugin:Pn,Run:vn,SearchPlugins:mn,SetDevServerChecker:Rn,SetDevServerManager:Ln,Shutdown:Mn,UninstallPlugin:yn,UnloadPlugin:bn},Symbol.toStringTag,{value:"Module"}));function _n(n){return window.go.settings.provider.GetBool(n)}function In(){return window.go.settings.provider.GetCategories()}function An(n){return window.go.settings.provider.GetCategory(n)}function $n(n){return window.go.settings.provider.GetCategoryValues(n)}function Tn(n){return window.go.settings.provider.GetFloat(n)}function On(n){return window.go.settings.provider.GetFloatSlice(n)}function hn(n){return window.go.settings.provider.GetInt(n)}function jn(n){return window.go.settings.provider.GetIntSlice(n)}function Dn(n){return window.go.settings.provider.GetSetting(n)}function Vn(n){return window.go.settings.provider.GetSettingValue(n)}function xn(n){return window.go.settings.provider.GetString(n)}function zn(n){return window.go.settings.provider.GetStringSlice(n)}function Un(n){return window.go.settings.provider.HasSetting(n)}function Hn(n,e){return window.go.settings.provider.Initialize(n,e)}function kn(){return window.go.settings.provider.ListSettings()}function En(){return window.go.settings.provider.LoadSettings()}function Qn(n,e){return window.go.settings.provider.RegisterSetting(n,e)}function Nn(n,e){return window.go.settings.provider.RegisterSettings(n,e)}function Bn(n){return window.go.settings.provider.ResetSetting(n)}function Wn(){return window.go.settings.provider.SaveSettings()}function qn(n,e){return window.go.settings.provider.SetSetting(n,e)}function Jn(n){return window.go.settings.provider.SetSettings(n)}function s(){return window.go.settings.provider.Values()}const Kn=Object.freeze(Object.defineProperty({__proto__:null,GetBool:_n,GetCategories:In,GetCategory:An,GetCategoryValues:$n,GetFloat:Tn,GetFloatSlice:On,GetInt:hn,GetIntSlice:jn,GetSetting:Dn,GetSettingValue:Vn,GetString:xn,GetStringSlice:zn,HasSetting:Un,Initialize:Hn,ListSettings:kn,LoadSettings:En,RegisterSetting:Qn,RegisterSettings:Nn,ResetSetting:Bn,SaveSettings:Wn,SetSetting:qn,SetSettings:Jn,Values:s},Symbol.toStringTag,{value:"Module"}));function Xn(n,e){return window.go.resource.Client.AddConnection(n,e)}function g(n,e,t,o){return window.go.resource.Client.Create(n,e,t,o)}function l(n,e,t,o){return window.go.resource.Client.Delete(n,e,t,o)}function Yn(n,e,t){return window.go.resource.Client.EnsureInformerForResource(n,e,t)}function c(n,e,t,o,i){return window.go.resource.Client.ExecuteAction(n,e,t,o,i)}function Zn(n,e,t,o){return window.go.resource.Client.Find(n,e,t,o)}function w(n,e,t,o){return window.go.resource.Client.Get(n,e,t,o)}function a(n,e,t){return window.go.resource.Client.GetActions(n,e,t)}function d(n,e){return window.go.resource.Client.GetConnection(n,e)}function S(n,e){return window.go.resource.Client.GetConnectionNamespaces(n,e)}function ne(n){return window.go.resource.Client.GetDefaultLayout(n)}function C(n,e){return window.go.resource.Client.GetEditorSchemas(n,e)}function f(n,e){return window.go.resource.Client.GetInformerState(n,e)}function ee(n,e){return window.go.resource.Client.GetLayout(n,e)}function te(n,e){return window.go.resource.Client.GetResourceDefinition(n,e)}function oe(n,e){return window.go.resource.Client.GetResourceGroup(n,e)}function p(n,e){return window.go.resource.Client.GetResourceGroups(n,e)}function G(n,e){return window.go.resource.Client.GetResourceType(n,e)}function P(n,e){return window.go.resource.Client.GetResourceTypes(n,e)}function ie(n,e){return window.go.resource.Client.HasResourceType(n,e)}function v(n,e,t,o){return window.go.resource.Client.List(n,e,t,o)}function m(){return window.go.resource.Client.ListAllConnections()}function R(n){return window.go.resource.Client.ListConnections(n)}function re(){return window.go.resource.Client.ListPlugins()}function ue(n){return window.go.resource.Client.LoadConnections(n)}function L(n,e){return window.go.resource.Client.RemoveConnection(n,e)}function se(n,e,t){return window.go.resource.Client.SetLayout(n,e,t)}function M(n,e){return window.go.resource.Client.StartConnection(n,e)}function y(n,e){return window.go.resource.Client.StartConnectionInformer(n,e)}function b(n,e){return window.go.resource.Client.StopConnection(n,e)}function F(n,e){return window.go.resource.Client.StopConnectionInformer(n,e)}function _(n,e,t,o,i){return window.go.resource.Client.StreamAction(n,e,t,o,i)}function I(n,e,t,o){return window.go.resource.Client.Update(n,e,t,o)}function A(n,e){return window.go.resource.Client.UpdateConnection(n,e)}const ge=Object.freeze(Object.defineProperty({__proto__:null,AddConnection:Xn,Create:g,Delete:l,EnsureInformerForResource:Yn,ExecuteAction:c,Find:Zn,Get:w,GetActions:a,GetConnection:d,GetConnectionNamespaces:S,GetDefaultLayout:ne,GetEditorSchemas:C,GetInformerState:f,GetLayout:ee,GetResourceDefinition:te,GetResourceGroup:oe,GetResourceGroups:p,GetResourceType:G,GetResourceTypes:P,HasResourceType:ie,List:v,ListAllConnections:m,ListConnections:R,ListPlugins:re,LoadConnections:ue,RemoveConnection:L,SetLayout:se,StartConnection:M,StartConnectionInformer:y,StopConnection:b,StopConnectionInformer:F,StreamAction:_,Update:I,UpdateConnection:A},Symbol.toStringTag,{value:"Module"}));function le(n){return window.go.exec.Client.AttachSession(n)}function ce(n){return window.go.exec.Client.CloseSession(n)}function $(n,e,t){return window.go.exec.Client.CreateSession(n,e,t)}function we(n){return window.go.exec.Client.CreateTerminal(n)}function ae(n){return window.go.exec.Client.DetachSession(n)}function de(n,e){return window.go.exec.Client.GetHandler(n,e)}function Se(){return window.go.exec.Client.GetHandlers()}function Ce(n){return window.go.exec.Client.GetPluginHandlers(n)}function fe(n){return window.go.exec.Client.GetSession(n)}function pe(){return window.go.exec.Client.ListPlugins()}function Ge(){return window.go.exec.Client.ListSessions()}function Pe(n,e,t){return window.go.exec.Client.ResizeSession(n,e,t)}function ve(n,e){return window.go.exec.Client.WriteSession(n,e)}const me=Object.freeze(Object.defineProperty({__proto__:null,AttachSession:le,CloseSession:ce,CreateSession:$,CreateTerminal:we,DetachSession:ae,GetHandler:de,GetHandlers:Se,GetPluginHandlers:Ce,GetSession:fe,ListPlugins:pe,ListSessions:Ge,ResizeSession:Pe,WriteSession:ve},Symbol.toStringTag,{value:"Module"}));function T(n){return window.go.logs.Client.CloseSession(n)}function O(n,e,t){return window.go.logs.Client.CreateSession(n,e,t)}function Re(n){return window.go.logs.Client.GetSession(n)}function Le(n){return window.go.logs.Client.GetSupportedResources(n)}function Me(){return window.go.logs.Client.ListSessions()}function ye(n){return window.go.logs.Client.PauseSession(n)}function be(n){return window.go.logs.Client.ResumeSession(n)}function Fe(n,e){return window.go.logs.Client.UpdateSessionOptions(n,e)}const _e=Object.freeze(Object.defineProperty({__proto__:null,CloseSession:T,CreateSession:O,GetSession:Re,GetSupportedResources:Le,ListSessions:Me,PauseSession:ye,ResumeSession:be,UpdateSessionOptions:Fe},Symbol.toStringTag,{value:"Module"}));function h(){return window.go.metric.Client.GetProviders()}function j(n){return window.go.metric.Client.GetProvidersForResource(n)}function Ie(n,e,t){return window.go.metric.Client.Query(n,e,t)}function D(n,e,t,o,i,Q,N,B,W,q){return window.go.metric.Client.QueryAll(n,e,t,o,i,Q,N,B,W,q)}function V(n,e,t){return window.go.metric.Client.Subscribe(n,e,t)}function x(n){return window.go.metric.Client.Unsubscribe(n)}const Ae=Object.freeze(Object.defineProperty({__proto__:null,GetProviders:h,GetProvidersForResource:j,Query:Ie,QueryAll:D,Subscribe:V,Unsubscribe:x},Symbol.toStringTag,{value:"Module"}));function z(n){return window.go.networker.Client.ClosePortForwardSession(n)}function U(n,e,t){return window.go.networker.Client.FindPortForwardSessions(n,e,t)}function $e(n){return window.go.networker.Client.GetPortForwardSession(n)}function Te(n){return window.go.networker.Client.GetSupportedPortForwardTargets(n)}function H(){return window.go.networker.Client.ListAllPortForwardSessions()}function Oe(n,e){return window.go.networker.Client.ListPortForwardSessions(n,e)}function k(n,e,t){return window.go.networker.Client.StartResourcePortForwardingSession(n,e,t)}const he=Object.freeze(Object.defineProperty({__proto__:null,ClosePortForwardSession:z,FindPortForwardSessions:U,GetPortForwardSession:$e,GetSupportedPortForwardTargets:Te,ListAllPortForwardSessions:H,ListPortForwardSessions:Oe,StartResourcePortForwardingSession:k},Symbol.toStringTag,{value:"Module"}));function je(n){return window.go.ui.Client.GetPluginComponents(n)}function E(n){return window.go.ui.Client.GetResourceAreaComponent(n)}function De(n){return window.go.ui.Client.GetResourceComponents(n)}const Ve=Object.freeze(Object.defineProperty({__proto__:null,GetPluginComponents:je,GetResourceAreaComponent:E,GetResourceComponents:De},Symbol.toStringTag,{value:"Module"}));exports.Client=me;exports.Client$1=he;exports.Client$2=ge;exports.Client$3=en;exports.Client$4=Ve;exports.Client$5=_e;exports.Client$6=Ae;exports.ClosePortForwardSession=z;exports.CloseSession=T;exports.Create=g;exports.CreateSession=$;exports.CreateSession$1=O;exports.Delete=l;exports.ExecuteAction=c;exports.FindPortForwardSessions=U;exports.Get=w;exports.GetActions=a;exports.GetConnection=d;exports.GetConnectionNamespaces=S;exports.GetEditorSchemas=C;exports.GetInformerState=f;exports.GetPluginMeta=u;exports.GetProviders=h;exports.GetProvidersForResource=j;exports.GetResourceAreaComponent=E;exports.GetResourceGroups=p;exports.GetResourceType=G;exports.GetResourceTypes=P;exports.List=v;exports.ListAllConnections=m;exports.ListAllPortForwardSessions=H;exports.ListConnections=R;exports.PluginValues=r;exports.QueryAll=D;exports.RemoveConnection=L;exports.StartConnection=M;exports.StartConnectionInformer=y;exports.StartResourcePortForwardingSession=k;exports.StopConnection=b;exports.StopConnectionInformer=F;exports.StreamAction=_;exports.Subscribe=V;exports.Unsubscribe=x;exports.Update=I;exports.UpdateConnection=A;exports.Values=s;exports.pluginManager=Fn;exports.provider=Kn;
|
package/dist/api.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./Client-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./Client-B7h6-bCB.cjs");function i(e){return window.go.utils.Client.DetectLanguage(e)}const o=Object.freeze(Object.defineProperty({__proto__:null,DetectLanguage:i},Symbol.toStringTag,{value:"Module"}));function a(e,n){return window.go.diagnostics.DiagnosticsClient.Debug(e,n)}function g(e,n){return window.go.diagnostics.DiagnosticsClient.Error(e,n)}function v(e,n){return window.go.diagnostics.DiagnosticsClient.Info(e,n)}function l(e,n,r){return window.go.diagnostics.DiagnosticsClient.Log(e,n,r)}function u(e){return window.go.diagnostics.DiagnosticsClient.ReadLog(e)}function s(e){return window.go.diagnostics.DiagnosticsClient.StartTail(e)}function c(e){return window.go.diagnostics.DiagnosticsClient.StopTail(e)}function S(e,n){return window.go.diagnostics.DiagnosticsClient.Warn(e,n)}const d=Object.freeze(Object.defineProperty({__proto__:null,Debug:a,Error:g,Info:v,Log:l,ReadLog:u,StartTail:s,StopTail:c,Warn:S},Symbol.toStringTag,{value:"Module"}));function w(e,n){return window.go.devserver.DevServerManager.GetDevServerLogs(e,n)}function D(e){return window.go.devserver.DevServerManager.GetDevServerState(e)}function f(e){return window.go.devserver.DevServerManager.GetExternalPluginInfo(e)}function C(e){return window.go.devserver.DevServerManager.Initialize(e)}function p(e){return window.go.devserver.DevServerManager.IsManaged(e)}function M(){return window.go.devserver.DevServerManager.ListDevServerStates()}function b(e){return window.go.devserver.DevServerManager.RestartDevServer(e)}function O(){return window.go.devserver.DevServerManager.Shutdown()}function _(e){return window.go.devserver.DevServerManager.StartDevServer(e)}function m(e,n){return window.go.devserver.DevServerManager.StartDevServerForPath(e,n)}function y(e){return window.go.devserver.DevServerManager.StopDevServer(e)}const F=Object.freeze(Object.defineProperty({__proto__:null,GetDevServerLogs:w,GetDevServerState:D,GetExternalPluginInfo:f,Initialize:C,IsManaged:p,ListDevServerStates:M,RestartDevServer:b,Shutdown:O,StartDevServer:_,StartDevServerForPath:m,StopDevServer:y},Symbol.toStringTag,{value:"Module"}));function L(){return window.go.main.App.GetOperatingSystem()}function P(e){return window.go.main.App.OpenFileSelectionDialog(e)}function G(e){return window.go.main.App.SaveFileDialog(e)}function I(e,n){return window.go.main.App.WriteFileContent(e,n)}exports.ExecClient=t.Client;exports.LogsClient=t.Client$5;exports.MetricClient=t.Client$6;exports.NetworkerClient=t.Client$1;exports.PluginManager=t.pluginManager;exports.ResourceClient=t.Client$2;exports.SettingsClient=t.Client$3;exports.SettingsProvider=t.provider;exports.UIClient=t.Client$4;exports.DevServerManager=F;exports.DiagnosticsClient=d;exports.GetOperatingSystem=L;exports.OpenFileSelectionDialog=P;exports.SaveFileDialog=G;exports.UtilsClient=o;exports.WriteFileContent=I;
|
package/dist/api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as j, f as x, g as z, a as E, p as R, b as h, c as A, d as W, e as U } from "./Client-
|
|
1
|
+
import { C as j, f as x, g as z, a as E, p as R, b as h, c as A, d as W, e as U } from "./Client-9Aa3u0B7.js";
|
|
2
2
|
function t(e) {
|
|
3
3
|
return window.go.utils.Client.DetectLanguage(e);
|
|
4
4
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var Nt=Object.defineProperty;var kt=(e,t,n)=>t in e?Nt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var $=(e,t,n)=>kt(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react/jsx-runtime"),d=require("react"),X=require("react-router-dom"),m=require("./Client-
|
|
1
|
+
"use strict";var Nt=Object.defineProperty;var kt=(e,t,n)=>t in e?Nt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var $=(e,t,n)=>kt(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react/jsx-runtime"),d=require("react"),X=require("react-router-dom"),m=require("./Client-B7h6-bCB.cjs"),F=require("./models.cjs"),g=require("@tanstack/react-query"),$t=require("@omniviewdev/ui/feedback"),I=require("./runtime.cjs"),de=d.createContext(void 0),ie={PLUGIN_NOT_FOUND:"omniview:plugin/not-found",PLUGIN_NOT_LOADED:"omniview:plugin/not-loaded",PLUGIN_ALREADY_LOADED:"omniview:plugin/already-loaded",PLUGIN_INSTALL_FAILED:"omniview:plugin/install-failed",PLUGIN_LOAD_FAILED:"omniview:plugin/load-failed",PLUGIN_BUILD_FAILED:"omniview:plugin/build-failed",SETTINGS_MISSING_CONFIG:"omniview:settings/missing-config",SETTINGS_INVALID_CONFIG:"omniview:settings/invalid-config",RESOURCE_NOT_FOUND:"omniview:resource/not-found",RESOURCE_FORBIDDEN:"omniview:resource/forbidden",RESOURCE_UNAUTHORIZED:"omniview:resource/unauthorized",RESOURCE_CONFLICT:"omniview:resource/conflict",RESOURCE_TIMEOUT:"omniview:resource/timeout",CONNECTION_NOT_FOUND:"omniview:connection/not-found",CONNECTION_FAILED:"omniview:connection/failed",SESSION_NOT_FOUND:"omniview:session/not-found",SESSION_FAILED:"omniview:session/failed",CANCELLED:"omniview:cancelled",INTERNAL:"omniview:internal",VALIDATION:"omniview:validation",NOT_IMPLEMENTED:"omniview:not-implemented"};function q(e){if(e==null)return{type:ie.INTERNAL,title:"Unknown error",status:500,detail:"An unknown error occurred."};let t;if(typeof e=="string"?t=e:e instanceof Error?t=e.message:t=String(e),t.startsWith("{"))try{const n=JSON.parse(t);if(typeof n.type=="string"&&typeof n.title=="string"&&typeof n.status=="number"&&typeof n.detail=="string")return n}catch{}return{type:ie.INTERNAL,title:"Error",status:500,detail:t}}function Ae(e){return e==null?!1:(typeof e=="string"?e:e instanceof Error?e.message:String(e))==="cancelled"?!0:q(e).type===ie.CANCELLED}function rt(e){switch(e.type){case"navigate":return{label:e.label,onClick:()=>{window.location.hash=e.target??""}};case"open-url":return{label:e.label,onClick:()=>{window.open(e.target,"_blank")}};case"copy":return{label:e.label,onClick:()=>{navigator.clipboard.writeText(e.target??"")}};case"retry":return{label:e.label,onClick:()=>{}};default:return{label:e.label,onClick:()=>{}}}}function st(e,t){var s,i;const n=[e.detail,...((s=e.suggestions)==null?void 0:s.map(o=>`• ${o}`))??[]].join(`
|
|
2
2
|
`);return{message:t||(e.title!=="Error"?e.title:"Operation failed"),status:"error",details:n,actions:(i=e.actions)==null?void 0:i.map(rt)}}function G(e,t,n){if(Ae(t))return;const r=q(t);e(st(r,n))}function A(e,t){return n=>{if(Ae(n))return;const r=q(n);e(st(r,r.title!=="Error"?r.title:t))}}function Lt(e){const{children:t,pluginId:n}=e,[r,s]=d.useState({}),[i,o]=d.useState(new F.config.PluginMeta),[a,c]=d.useState(!1),[l,u]=d.useState(null);console.debug("[PluginContextProvider] render",{pluginId:n,metaLoaded:a,metaError:!!l});const h=()=>{n===void 0||n===""||(console.debug(`[PluginContextProvider] fetching settings for "${n}"`),m.PluginValues(n).then(p=>{console.debug(`[PluginContextProvider] settings loaded for "${n}"`,Object.keys(p)),s(p)}).catch(p=>{const C=q(p);console.error(`[PluginContextProvider] error fetching settings for "${n}":`,C.detail)}))},_=()=>{if(n===void 0||n===""){console.debug("[PluginContextProvider] skipping meta fetch — empty pluginId");return}console.debug(`[PluginContextProvider] fetching meta for "${n}"`),u(null),m.GetPluginMeta(n).then(p=>{console.debug(`[PluginContextProvider] meta loaded for "${n}"`,{name:p==null?void 0:p.name,version:p==null?void 0:p.version}),o(p),c(!0)}).catch(p=>{const C=q(p);console.error(`[PluginContextProvider] error fetching meta for "${n}":`,C.detail),u(C.detail),c(!1)})};return d.useEffect(()=>{console.debug(`[PluginContextProvider] useEffect — pluginId changed to "${n}"`),h(),_()},[n]),l?x.jsx("div",{style:{display:"flex",flex:1,alignItems:"center",justifyContent:"center",padding:24},children:x.jsxs("div",{style:{maxWidth:480,width:"100%",border:"1px solid #7F1D1D",borderRadius:8,backgroundColor:"#1C1917",padding:20,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},children:[x.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:12},children:[x.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"#EF4444",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("circle",{cx:"12",cy:"12",r:"10"}),x.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),x.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),x.jsx("span",{style:{fontSize:14,fontWeight:600,color:"#FECACA"},children:"Plugin failed to load"})]}),x.jsx("p",{style:{fontSize:13,color:"#A1A1AA",margin:"0 0 16px"},children:l}),x.jsx("button",{onClick:()=>_(),style:{background:"transparent",color:"#F87171",border:"1px solid #7F1D1D",borderRadius:6,padding:"6px 14px",fontSize:13,fontWeight:500,cursor:"pointer"},children:"Retry"})]})}):a?x.jsx(de.Provider,{value:{pluginId:n,settings:r,meta:i},children:t}):x.jsxs("div",{style:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:[x.jsx("div",{style:{width:24,height:24,border:"2px solid #3F3F46",borderTopColor:"#A1A1AA",borderRadius:"50%",animation:"plugin-spin 0.8s linear infinite"}}),x.jsx("style",{children:"@keyframes plugin-spin { to { transform: rotate(360deg); } }"})]})}function fe(){const e=d.useContext(de);if(!e)throw new Error("usePluginContext must be used within a PluginContextProvider");return e}function qt(){return fe().settings}const Re=d.createContext(void 0),Qt=({children:e})=>{const[t,n]=d.useState({}),r=()=>{m.Values().then(i=>{console.log("Fetched settings:",i),n(i)}).catch(i=>{console.error("Error fetching settings:",i)})};d.useEffect(()=>{r()},[]);const s=()=>{r()};return x.jsx(Re.Provider,{value:{settings:t,reload:s},children:e})},ot={height:32,focused:0,tabs:[],createTab:()=>{},createTabs:()=>{},updateTab:()=>{},focusTab:()=>{},reorderTab:()=>{},closeTab:()=>{},closeTabs:()=>{},resizeDrawer:()=>{},closeDrawer:()=>{},fullscreenDrawer:()=>{}},it=d.createContext(ot),at=d.createContext(void 0),ct=d.createContext(void 0),Te=d.createContext(void 0),jt=3e4,Gt=({children:e})=>{const[t,n]=d.useState([]),r=d.useCallback(a=>{n(c=>[a,...c])},[]),s=d.useCallback((a,c)=>{n(l=>l.map(u=>u.id===a?{...u,...c}:u))},[]),i=d.useCallback(a=>{n(c=>c.filter(l=>l.id!==a))},[]);d.useEffect(()=>{const a=[];for(const c of t)if(c.status==="completed"||c.status==="error"){const l=Date.now()-(c.completedAt??c.startedAt),u=Math.max(0,jt-l);a.push(setTimeout(()=>i(c.id),u))}return()=>a.forEach(clearTimeout)},[t,i]);const o=d.useMemo(()=>({operations:t,addOperation:r,updateOperation:s,removeOperation:i}),[t,r,s,i]);return x.jsx(Te.Provider,{value:o,children:e})};var ve=function(e,t){return ve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[s]=r[s])},ve(e,t)};function Ut(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ve(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ce="Invariant Violation",We=Object.setPrototypeOf,Kt=We===void 0?function(e,t){return e.__proto__=t,e}:We,zt=function(e){Ut(t,e);function t(n){n===void 0&&(n=Ce);var r=e.call(this,typeof n=="number"?Ce+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=Ce,Kt(r,t.prototype),r}return t}(Error);function be(e,t){if(!e)throw new zt(t)}var ut=["debug","log","warn","error","silent"],Wt=ut.indexOf("log");function re(e){return function(){if(ut.indexOf(e)>=Wt){var t=console[e]||console.log;return t.apply(console,arguments)}}}(function(e){e.debug=re("debug"),e.log=re("log"),e.warn=re("warn"),e.error=re("error")})(be||(be={}));const lt=d.createContext(void 0),Me=()=>d.useContext(lt),Bt=e=>{const t=Me();return t==null?void 0:t.getExtensionPoint(e)},Ht=e=>{const t=Me(),n=t==null?void 0:t.getExtensionPoint(e);return n?n.provide({getCacheKey:()=>e}):[]},Yt=({registry:e,children:t})=>{const n=d.useRef(e);return d.useEffect(()=>{be(n.current===e,"You can't change the extension registry after it has been rendered")},[e]),x.jsx(lt.Provider,{value:n.current,children:d.Children.only(t)})},Be=e=>{if(!e||typeof e!="string")throw new TypeError(`extensionName is required to be a string and can't be: "${e}" (${typeof e})`);return e.trim()};class dt{constructor(t){$(this,"_settings");$(this,"_extensions",new Map);$(this,"_lookupCache",new Map);$(this,"_matchCache",new Map);$(this,"_matcher");const{matcher:n,...r}=t;this._settings=r,this._matcher=t.matcher}settings(){return this._settings}register(t){if(this._extensions.get(t.id))throw new Error(`Resource sidebar view with id ${t.id} already exists`);const n={...t,registeredAt:new Date,updatedAt:new Date,enabled:!0};this._extensions.set(t.id,n);const r=Array.from(this._matchCache.keys());for(const s of r)s.startsWith(t.plugin)&&this._matchCache.delete(s)}unregister(t){this._extensions.delete(t)}get(t){var n;return(n=this._extensions.get(t))==null?void 0:n.component}list(){return Array.from(this._extensions.values())}generateMatchCacheKey(t){return`${t.plugin}/${t.id}`}calculateMatches(t){if(!this._matcher)return Array.from(this._extensions.values());const n=[];for(const r of this._extensions.values()){const s=this.generateMatchCacheKey(r),i=this._matchCache.has(s);if(i&&this._matchCache.get(s)){n.push(r);continue}this._matcher(t,r)?(this._matchCache.set(s,!0),n.push(r)):i||this._matchCache.set(s,!1)}return n}preload(t){const n=this.calculateMatches(t),r=t.getCacheKey();this._lookupCache.set(r,n.map(s=>s.id))}provide(t){if(this._settings.disabled)return[];if(this._settings.mode==="single"){const i=this._extensions.get(this._settings.selected);return i?[i.component]:[]}const n=t.getCacheKey();let r=this._lookupCache.get(n);if(r){let i=r.map(o=>this._extensions.get(o)).filter(o=>!!o).map(o=>o.component);return this._settings.order&&(i=this.reorderComponents(i,r,this._settings.order)),i}r=this.calculateMatches(t).map(i=>i.id),this._lookupCache.set(n,r);let s=r.map(i=>this._extensions.get(i)).filter(i=>!!i).map(i=>i.component);return this._settings.order&&(s=this.reorderComponents(s,r,this._settings.order)),s}reorderComponents(t,n,r){const s=new Map(n.map((i,o)=>[i,t[o]]));return r.map(i=>s.get(i)).filter(i=>!!i)}reorder(t){const n=t.map(o=>this._extensions.get(o)).filter(o=>!!o),r=Array.from(this._extensions.values()).filter(o=>!t.includes(o.id)),s=[...n,...r];this._extensions.clear(),s.forEach(o=>this._extensions.set(o.id,o));const i=Array.from(this._lookupCache.keys());for(const o of i){const a=this._lookupCache.get(o);if(!a)continue;const c=a.filter(l=>t.includes(l));this._lookupCache.set(o,c)}}clearLookupCache(){this._lookupCache.clear()}clearMatchCache(){this._matchCache.clear()}clearAllCaches(){this.clearLookupCache(),this.clearMatchCache()}}class Jt{constructor({initialStores:t}){$(this,"store",{});t.forEach(n=>{this.addExtensionPoint(n)})}addExtensionPoint(t){let n=Be(t.id);if(console.log("validated",n),console.log("store",this.store),this.store[n]){console.warn(`Extension point ${n} already exists. Not adding again.`);return}this.store[n]=new dt(t)}getExtensionPoint(t){return t=Be(t),this.store[t]}listExtensionPointIds(){return Object.keys(this.store)}listExtensionPoints(){return Object.values(this.store).map(t=>t.settings())}}const ft=d.createContext(void 0),Vt={default:"info",info:"info",success:"success",warning:"warning",error:"error"},Xt=({children:e})=>{const{push:t}=$t.useNotificationStack(),[n,r]=d.useState([]),s=o=>{r(a=>[...a,o])},i=(o,a,c)=>{const l=typeof o=="object";let u="",h="info",_,p=5e3,C;if(l){if(u=o.message,o.showOnce){if(n.includes(u))return;s(u)}h=o.status,_=o.details,p=o.autoHideDuration??5e3,C=o.actions}else u=o,h=a,_=c;t({severity:Vt[h]??"info",title:u,message:_,timeout:p,actions:C})};return x.jsx(ft.Provider,{value:{showSnackbar:i},children:e})},k=()=>{const e=d.useContext(ft);if(e===void 0)throw new Error("useCustomSnackbar must be used within a CustomSnackbarProvider");return e};function D(e){const t=d.useContext(de),n=(t==null?void 0:t.pluginId)??e;if(!n)throw new Error("pluginID must be provided either via PluginContext or as an explicit parameter");return n}const Zt=({pluginID:e,connectionID:t})=>{const n=D(e),r=g.useQueryClient(),{showSnackbar:s}=k(),i=[n,"connection","detail",t],{mutateAsync:o}=g.useMutation({mutationFn:async()=>m.StartConnection(n,t),onSuccess(h){r.setQueryData(i,h),r.invalidateQueries({queryKey:["EDITOR_SCHEMAS",n,t]})},onError:A(s,"Failed to start connection")}),{mutateAsync:a}=g.useMutation({mutationFn:async()=>m.StopConnection(n,t),onSuccess(h){r.setQueryData(i,h)},onError:A(s,"Failed to stop connection")}),{mutateAsync:c}=g.useMutation({mutationFn:async h=>m.UpdateConnection(n,h),onSuccess(h,{name:_}){s({message:`Connection ${_} successfully updated`,status:"success"}),r.setQueryData(i,u),r.setQueriesData({queryKey:[n,"connection","list"]},p=>p==null?void 0:p.map(C=>C.id===t?h:C))},onError:A(s,"Failed to update connection")}),{mutateAsync:l}=g.useMutation({mutationFn:async()=>m.RemoveConnection(n,t),onSuccess(){s({message:"Connection successfully removed",status:"success"}),r.setQueryData(i,void 0),r.setQueriesData({queryKey:[n,"connection","list"]},h=>h==null?void 0:h.filter(_=>_.id!==t))},onError:A(s,"Failed to remove connection")}),u=g.useQuery({queryKey:i,queryFn:async()=>m.GetConnection(n,t)});return{connection:u,startConnection:o,stopConnection:a,updateConnection:c,deleteConnection:l}},pt=e=>[e,"connection","list"],en=({plugin:e})=>{const t=D(e),n=g.useQueryClient(),{showSnackbar:r}=k(),s=pt(t),{mutateAsync:i}=g.useMutation({mutationFn:async l=>m.StartConnectionInformer(t,l.id),onError:A(r,"Failed to start connection informer")}),{mutateAsync:o}=g.useMutation({mutationFn:async l=>m.StopConnectionInformer(t,l.id),onError:A(r,"Failed to stop connection informer")}),a=d.useCallback(l=>{console.log("got update to connections",l),n.setQueryData(s,l)},[]);return d.useEffect(()=>{const l=I.EventsOn(`${t}/connection/sync`,a);return()=>{l()}},[]),{connections:g.useQuery({queryKey:s,queryFn:async()=>{try{return await m.ListConnections(t)}catch(l){console.log(l),A(r,"Failed to load connections")(l)}return[]},staleTime:3e4,placeholderData:g.keepPreviousData}),startInformer:i,stopInformer:o}},tn=({pluginID:e,connectionID:t})=>{const n=D(e),r=[n,"connection","namespaces",t];return{namespaces:g.useQuery({queryKey:r,queryFn:async()=>m.GetConnectionNamespaces(n,t)})}};var yt=(e=>(e[e.OnConnect=0]="OnConnect",e[e.OnFirstQuery=1]="OnFirstQuery",e[e.Never=2]="Never",e))(yt||{}),O=(e=>(e[e.Pending=0]="Pending",e[e.Syncing=1]="Syncing",e[e.Synced=2]="Synced",e[e.Error=3]="Error",e[e.Cancelled=4]="Cancelled",e))(O||{});function ht(e){const t=Object.values(e.states),n=t.length;let r=0,s=0;for(const a of t)a===O.Synced&&r++,a===O.Error&&s++;const i=t.filter(a=>a===O.Synced||a===O.Error||a===O.Cancelled).length,o=n>0?i/n:0;return{pluginID:e.pluginID,connectionID:e.connectionID,totalResources:n,syncedCount:r,errorCount:s,doneCount:i,progress:o}}function ae(e){return e.totalResources>0&&e.doneCount>=e.totalResources}function gt(e){return e.some(t=>!ae(t))}function mt(e){const t=e.reduce((r,s)=>r+s.totalResources,0);return t===0?0:e.reduce((r,s)=>r+s.doneCount,0)/t}function Ne(e){return`${e.pluginId}/${e.connection}`}function _t(e,t){const n=Ne(t);e.has(n)||e.set(n,{states:{},pluginID:t.pluginId,connectionID:t.connection});const r=e.get(n);return r.states[t.resourceKey]=t.state,r}function nn(){const[e,t]=d.useState(new Set),[n,r]=d.useState({}),[s,i]=d.useState(new Map),o=d.useRef(new Map);d.useEffect(()=>{m.ListAllConnections().then(y=>{y&&r(y)}).catch(()=>{})},[]),d.useEffect(()=>I.EventsOn("connection/status",E=>{const w=`${E.pluginID}/${E.connectionID}`;E.status==="DISCONNECTED"?(t(P=>{const f=new Set(P);return f.delete(w),f}),i(P=>{const f=new Map(P);return f.delete(w),f}),o.current.delete(w)):t(P=>{const f=new Set(P);return f.add(w),f}),m.ListAllConnections().then(P=>{P&&r(P)}).catch(()=>{})}),[]);const a=d.useCallback(y=>{const E=Ne(y);t(f=>{if(f.has(E))return f;const S=new Set(f);return S.add(E),S});const w=_t(o.current,y),P=ht(w);i(f=>{const S=new Map(f);return S.set(E,P),S})},[]);d.useEffect(()=>I.EventsOn("informer/STATE",a),[a]);const c=d.useCallback(async(y,E)=>{await m.StopConnection(y,E)},[]),l=d.useCallback(async(y,E)=>{await m.StartConnectionInformer(y,E)},[]),u=[];for(const y of e){const[E,w]=y.split("/",2),f=(n[E]??[]).find(N=>N.id===w),S=s.get(y),b=S!=null&&!ae(S),v=S!=null&&S.errorCount>0;u.push({pluginID:E,connectionID:w,name:(f==null?void 0:f.name)??w,avatar:(f==null?void 0:f.avatar)??"",isStarted:!0,sync:S,isSyncing:b,hasErrors:v})}const h=new Map;for(const y of u){const E=h.get(y.pluginID)??[];E.push(y),h.set(y.pluginID,E)}const _=Array.from(s.values()),p=u.filter(y=>y.isSyncing),C=u.filter(y=>y.hasErrors);return{entries:u,grouped:h,connectedCount:u.length,syncingCount:p.length,errorCount:C.length,hasSyncing:gt(_),aggregateProgress:mt(_),disconnect:c,retryInformer:l}}function rn(e,t){return window.go.data.Client.Get(e,t)}function sn(e,t,n){return window.go.data.Client.Set(e,t,n)}function on(e,t,n){const r=D(e),s=g.useQueryClient(),i=[r,"data",t],o=g.useQuery({queryKey:i,queryFn:async()=>{const c=await rn(r,t);return c??n}}),a=g.useMutation({mutationFn:async c=>{await sn(r,t,c)},onMutate:async c=>{await s.cancelQueries({queryKey:i});const l=s.getQueryData(i);return s.setQueryData(i,c),{previous:l}},onError:(c,l,u)=>{(u==null?void 0:u.previous)!==void 0&&s.setQueryData(i,u.previous)},onSettled:()=>{s.invalidateQueries({queryKey:i})}});return{data:o.data??n,update:async c=>{await a.mutateAsync(c)},isLoading:o.isLoading}}const an=()=>{const e=d.useContext(at);if(!e)throw new Error("useRightDrawer must be used within a RightDrawerProvider");return e},ke=()=>{const e=d.useContext(it);if(e===void 0)throw new Error("useBottomDrawer must be used within a BottomDrawerProvider");return e},cn=({pluginID:e})=>{const t=D(e),{showSnackbar:n}=k(),{createTab:r,updateTab:s}=ke();return{createSession:g.useMutation({mutationFn:async({connectionID:o,icon:a,label:c,opts:l})=>{const u=`pending-${crypto.randomUUID()}`;r({id:u,title:c??"Connecting...",variant:"terminal",icon:a??"LuSquareTerminal",properties:{status:"connecting",pluginID:t,connectionID:o,opts:{...l}}});const h=F.exec.SessionOptions.createFrom({command:["/bin/bash"],tty:!0,...l});try{const _=await m.CreateSession(t,o,h);s({id:u},{id:_.id,title:c??`Session ${_.id.substring(0,8)}`,properties:{status:"connected",pluginID:t,connectionID:o,opts:{...l}}})}catch(_){const p=q(_);s({id:u},{properties:{status:"error",error:p.detail,pluginID:t,connectionID:o,opts:{...l}}}),G(n,_,"Failed to start session")}}}).mutateAsync}},un=({pluginID:e})=>{const t=D(e),{showSnackbar:n}=k(),{createTab:r}=ke(),s=g.useMutation({mutationFn:async({connectionID:o,resourceKey:a,resourceID:c,resourceData:l,icon:u,label:h,target:_,follow:p=!0,tailLines:C=1e3,params:y})=>{const E=F.logs.CreateSessionOptions.createFrom({resource_key:a,resource_id:c,resource_data:l,options:F.logs.LogSessionOptions.createFrom({target:_??"",follow:p,include_previous:!1,include_timestamps:!0,tail_lines:C,since_seconds:0,limit_bytes:0,include_source_events:!0,params:y??{}})}),w=await m.CreateSession$1(t,o,E);return r({id:w.id,title:h??`Logs ${w.id.substring(0,8)}`,variant:"logs",icon:u??"LuLogs"}),w},onError:A(n,"Failed to start log session")}),i=g.useMutation({mutationFn:async o=>{await m.CloseSession(o)},onError:A(n,"Failed to close log session")});return{createLogSession:s.mutateAsync,closeLogSession:i.mutateAsync}},ln=()=>g.useQuery({queryKey:["metric","providers"],queryFn:m.GetProviders,staleTime:3e4}),Ct=e=>g.useQuery({queryKey:["metric","providers",e],queryFn:()=>m.GetProvidersForResource(e),enabled:!!e,staleTime:3e4}),dn=e=>{var E,w;const{connectionID:t,resourceKey:n,resourceID:r,resourceNamespace:s="",resourceData:i={},metricIDs:o=[],shape:a=0,timeRange:c,refreshInterval:l=0,enabled:u=!0}=e,{data:h,isLoading:_}=Ct(n),p=h??[],C=c?Math.max(Math.floor((c.end.getTime()-c.start.getTime())/250),15e3)*1e6:0,y=g.useQuery({queryKey:["metric","query",t,n,r,s,o,a,(E=c==null?void 0:c.start)==null?void 0:E.getTime(),(w=c==null?void 0:c.end)==null?void 0:w.getTime()],queryFn:()=>m.QueryAll(t,n,r,s,i,o,a,(c==null?void 0:c.start)??new Date(0),(c==null?void 0:c.end)??new Date(0),C),enabled:u&&!!t&&!!n&&(n.startsWith("cluster::")||!!r)&&p.length>0,refetchInterval:l>0?l:void 0,staleTime:5e3,placeholderData:g.keepPreviousData});return{data:y.data??void 0,providers:p,isLoading:_||y.isLoading,error:y.error,refetch:y.refetch}},fn=e=>{const{pluginID:t,connectionID:n,resourceKey:r,resourceID:s,resourceNamespace:i="",resourceData:o={},metricIDs:a=[],interval:c=1e4,enabled:l=!0}=e,u=D(t),[h,_]=d.useState(null),[p,C]=d.useState(null),[y,E]=d.useState(!1),[w,P]=d.useState(null),f=d.useRef(null),S=d.useCallback(async()=>{if(!(!l||!u||!n||!r||!s))try{const v=await m.Subscribe(u,n,{resource_key:r,resource_id:s,resource_namespace:i,resource_data:o,metric_ids:a,interval:c*1e6});C(v),E(!0),P(null);const N=I.EventsOn(`core/metrics/data/${v}`,B=>{try{const L=JSON.parse(B);L.results&&_(L.results)}catch(L){console.error("Failed to parse metric stream data:",L)}}),ne=I.EventsOn(`core/metrics/error/${v}`,B=>{try{const L=JSON.parse(B);P(L.error||"Unknown error")}catch{P("Failed to parse metric stream error")}});f.current=()=>{N(),ne()}}catch(v){P(v instanceof Error?v.message:String(v))}},[u,n,r,s,i,a,c,l]),b=d.useCallback(async()=>{if(p)try{await m.Unsubscribe(p)}catch(v){console.error("Failed to unsubscribe:",v)}f.current&&(f.current(),f.current=null),C(null),E(!1)},[p]);return d.useEffect(()=>()=>{p&&m.Unsubscribe(p).catch(console.error),f.current&&f.current()},[p]),{data:h,subscriptionID:p,isStreaming:y,error:w,start:S,stop:b}},j=["networker","portforward","all-sessions"];function pn(){const{showSnackbar:e}=k(),t=g.useQueryClient(),n=g.useQuery({queryKey:[...j],queryFn:async()=>m.ListAllPortForwardSessions().catch(i=>{if(q(i).detail.includes("not found"))return[];throw i}),retry:!1});d.useEffect(()=>{const i=I.EventsOn("core/networker/portforward/created",()=>{t.invalidateQueries({queryKey:[...j]})}),o=I.EventsOn("core/networker/portforward/closed",()=>{t.invalidateQueries({queryKey:[...j]})});return()=>{i(),o()}},[t]);const r=n.data??[],s=g.useMutation({mutationFn:async i=>m.ClosePortForwardSession(i),onError:A(e,"Failed to close port forwarding session"),onSuccess:async()=>{await t.invalidateQueries({queryKey:[...j]})}});return{sessions:n,activeSessions:r,closeSession:s.mutateAsync,openInBrowser:i=>I.BrowserOpenURL(`http://localhost:${i}`)}}function yn({pluginID:e,connectionID:t,resourceID:n}){const r=D(e),s=["networker","portforward","sessions",r,t,n],{showSnackbar:i}=k(),o=g.useQueryClient(),a=g.useQuery({queryKey:s,queryFn:async()=>m.FindPortForwardSessions(r,t,F.networker.FindPortForwardSessionRequest.createFrom({resource_id:n,connection_id:t})).catch(u=>{const h=q(u);return h.detail.includes("not found")?[]:(i({message:"Failed to fetch port forward sessions",status:"error",details:h.detail}),[])}),retry:!1}),c=g.useMutation({mutationFn:async({opts:u})=>{const h=F.networker.PortForwardSessionOptions.createFrom({local_port:u.localPort||0,remote_port:u.remotePort,protocol:u.protocol||"TCP",connection_type:"RESOURCE",connection:{resource_data:u.resource,connection_id:t,plugin_id:r,resource_id:u.resourceId,resource_key:u.resourceKey},labels:u.labels??{},params:u.parameters??{}}),_=await m.StartResourcePortForwardingSession(r,t,h);return u.openInBrowser&&I.BrowserOpenURL(`http://localhost:${_.local_port}`),_},onError:A(i,"Failed to start port forwarding session"),onSuccess:async()=>{await Promise.all([o.invalidateQueries({queryKey:s}),o.invalidateQueries({queryKey:[...j]})])}}),l=g.useMutation({mutationFn:async({opts:u})=>m.ClosePortForwardSession(u.sessionID),onError:A(i,"Failed to close port forwarding session"),onSuccess:async()=>{await Promise.all([o.invalidateQueries({queryKey:s}),o.invalidateQueries({queryKey:[...j]})])}});return{sessions:a,forward:c.mutateAsync,close:l.mutateAsync}}const hn=()=>{const e=d.useContext(ct);if(!e)throw new Error("useConfirmationModal must be used within a ConfirmationModalProvider");return e},gn=({pluginID:e,connectionID:t,resourceKey:n,resourceID:r,namespace:s="",getParams:i={},updateParams:o={},deleteParams:a={}})=>{const c=D(e),l=g.useQueryClient(),{showSnackbar:u}=k(),h=["RESOURCE",c,t,n,r,s],{mutateAsync:_}=g.useMutation({mutationFn:async y=>m.Update(c,t,n,F.types.UpdateInput.createFrom({params:{...o,...y.params},input:{...o,...y.input},id:r,namespace:s})),onSuccess:async()=>{u(`Resource ${r} updated`,"success"),await l.invalidateQueries({queryKey:h})},onError:A(u,`Failed to update resource ${r}`)}),{mutateAsync:p}=g.useMutation({mutationFn:async y=>m.Delete(c,t,n,F.types.DeleteInput.createFrom({params:{...a,...y.params},input:{...a,...y.input},id:r,...y,namespace:s})),onSuccess:async()=>{u(`Resource ${r} deleted`,"success"),await l.invalidateQueries({queryKey:h})},onError:A(u,`Failed to delete resource ${r}`)});return{resource:g.useQuery({queryKey:h,queryFn:async()=>m.Get(c,t,n,F.types.GetInput.createFrom({params:i,id:r,namespace:s})),retry:!1}),update:_,remove:p}},mn=e=>{const t=["component",e.plugin,e.resource,e.area];return{component:g.useQuery({queryKey:t,queryFn:async()=>m.GetResourceAreaComponent(e)})}},_n=({pluginID:e,connectionID:t})=>{const n=D(e),r=[n,"resource_groups","list"];return{groups:g.useQuery({queryKey:r,queryFn:async()=>m.GetResourceGroups(n,t),retry:!1})}},Cn=({pluginID:e,connectionID:t,searches:n})=>{const r=D(e),s=o=>[r,t,o.key,o.namespaces,"list"];return g.useQueries({queries:n.map(o=>({queryKey:s(o),queryFn:async()=>m.List(r,t,o.key,F.types.ListInput.createFrom({params:{},order:{by:"name",direction:!0},pagination:{page:1,pageSize:200},namespaces:o.namespaces})).then(a=>(console.log(a.result),a.result&&o.postFilter?Object.values(a.result).filter(o.postFilter):Object.values(a.result||{}))),retry:!1}))})},Sn=({pluginID:e,resourceKey:t})=>{const n=D(e),r=[n,"resources",t];return{resourceType:g.useQuery({queryKey:r,queryFn:async()=>m.GetResourceType(n,t),retry:!1})}},wn=({pluginID:e,connectionID:t})=>{const n=D(e),r=[n,"resources","list"];return{types:g.useQuery({queryKey:r,queryFn:async()=>m.GetResourceTypes(n,t),retry:!1})}};var St=Symbol.for("immer-nothing"),He=Symbol.for("immer-draftable"),T=Symbol.for("immer-state"),En=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function R(e,...t){if(process.env.NODE_ENV!=="production"){const n=En[e],r=typeof n=="function"?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Y=Object.getPrototypeOf;function J(e){return!!e&&!!e[T]}function U(e){var t;return e?wt(e)||Array.isArray(e)||!!e[He]||!!((t=e.constructor)!=null&&t[He])||ye(e)||he(e):!1}var vn=Object.prototype.constructor.toString();function wt(e){if(!e||typeof e!="object")return!1;const t=Y(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===vn}function ce(e,t){pe(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function pe(e){const t=e[T];return t?t.type_:Array.isArray(e)?1:ye(e)?2:he(e)?3:0}function Pe(e,t){return pe(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Et(e,t,n){const r=pe(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function bn(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ye(e){return e instanceof Map}function he(e){return e instanceof Set}function Q(e){return e.copy_||e.base_}function xe(e,t){if(ye(e))return new Map(e);if(he(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=wt(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[T];let s=Reflect.ownKeys(r);for(let i=0;i<s.length;i++){const o=s[i],a=r[o];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[o]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[o]})}return Object.create(Y(e),r)}else{const r=Y(e);if(r!==null&&n)return{...e};const s=Object.create(r);return Object.assign(s,e)}}function $e(e,t=!1){return ge(e)||J(e)||!U(e)||(pe(e)>1&&(e.set=e.add=e.clear=e.delete=Pn),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>$e(r,!0))),e}function Pn(){R(2)}function ge(e){return Object.isFrozen(e)}var xn={};function K(e){const t=xn[e];return t||R(0,e),t}var Z;function vt(){return Z}function Dn(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ye(e,t){t&&(K("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function De(e){Fe(e),e.drafts_.forEach(Fn),e.drafts_=null}function Fe(e){e===Z&&(Z=e.parent_)}function Je(e){return Z=Dn(Z,e)}function Fn(e){const t=e[T];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ve(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[T].modified_&&(De(t),R(4)),U(e)&&(e=ue(t,e),t.parent_||le(t,e)),t.patches_&&K("Patches").generateReplacementPatches_(n[T].base_,e,t.patches_,t.inversePatches_)):e=ue(t,n,[]),De(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==St?e:void 0}function ue(e,t,n){if(ge(t))return t;const r=t[T];if(!r)return ce(t,(s,i)=>Xe(e,r,t,s,i,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return le(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const s=r.copy_;let i=s,o=!1;r.type_===3&&(i=new Set(s),s.clear(),o=!0),ce(i,(a,c)=>Xe(e,r,s,a,c,n,o)),le(e,s,!1),n&&e.patches_&&K("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Xe(e,t,n,r,s,i,o){if(process.env.NODE_ENV!=="production"&&s===n&&R(5),J(s)){const a=i&&t&&t.type_!==3&&!Pe(t.assigned_,r)?i.concat(r):void 0,c=ue(e,s,a);if(Et(n,r,c),J(c))e.canAutoFreeze_=!1;else return}else o&&n.add(s);if(U(s)&&!ge(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ue(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&le(e,s)}}function le(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&$e(t,n)}function In(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:vt(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,i=Le;n&&(s=[r],i=ee);const{revoke:o,proxy:a}=Proxy.revocable(s,i);return r.draft_=a,r.revoke_=o,a}var Le={get(e,t){if(t===T)return e;const n=Q(e);if(!Pe(n,t))return On(e,n,t);const r=n[t];return e.finalized_||!U(r)?r:r===Se(e.base_,t)?(we(e),e.copy_[t]=Oe(r,e)):r},has(e,t){return t in Q(e)},ownKeys(e){return Reflect.ownKeys(Q(e))},set(e,t,n){const r=bt(Q(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=Se(Q(e),t),i=s==null?void 0:s[T];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(bn(n,s)&&(n!==void 0||Pe(e.base_,t)))return!0;we(e),Ie(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Se(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,we(e),Ie(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Q(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){R(11)},getPrototypeOf(e){return Y(e.base_)},setPrototypeOf(){R(12)}},ee={};ce(Le,(e,t)=>{ee[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ee.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&R(13),ee.set.call(this,e,t,void 0)};ee.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&R(14),Le.set.call(this,e[0],t,n,e[0])};function Se(e,t){const n=e[T];return(n?Q(n):e)[t]}function On(e,t,n){var s;const r=bt(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function bt(e,t){if(!(t in e))return;let n=Y(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Y(n)}}function Ie(e){e.modified_||(e.modified_=!0,e.parent_&&Ie(e.parent_))}function we(e){e.copy_||(e.copy_=xe(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var An=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const i=n;n=t;const o=this;return function(c=i,...l){return o.produce(c,u=>n.call(this,u,...l))}}typeof n!="function"&&R(6),r!==void 0&&typeof r!="function"&&R(7);let s;if(U(t)){const i=Je(this),o=Oe(t,void 0);let a=!0;try{s=n(o),a=!1}finally{a?De(i):Fe(i)}return Ye(i,r),Ve(s,i)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===St&&(s=void 0),this.autoFreeze_&&$e(s,!0),r){const i=[],o=[];K("Patches").generateReplacementPatches_(t,s,i,o),r(i,o)}return s}else R(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(o,...a)=>this.produceWithPatches(o,c=>t(c,...a));let r,s;return[this.produce(t,n,(o,a)=>{r=o,s=a}),r,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){U(e)||R(8),J(e)&&(e=Rn(e));const t=Je(this),n=Oe(e,void 0);return n[T].isManual_=!0,Fe(t),n}finishDraft(e,t){const n=e&&e[T];(!n||!n.isManual_)&&R(9);const{scope_:r}=n;return Ye(r,t),Ve(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=K("Patches").applyPatches_;return J(e)?r(e,t):this.produce(e,s=>r(s,t))}};function Oe(e,t){const n=ye(e)?K("MapSet").proxyMap_(e,t):he(e)?K("MapSet").proxySet_(e,t):In(e,t);return(t?t.scope_:vt()).drafts_.push(n),n}function Rn(e){return J(e)||R(10,e),Pt(e)}function Pt(e){if(!U(e)||ge(e))return e;const t=e[T];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=xe(e,t.scope_.immer_.useStrictShallowCopy_)}else n=xe(e,!0);return ce(n,(r,s)=>{Et(n,r,Pt(s))}),t&&(t.finalized_=!1),n}var M=new An,oe=M.produce;M.produceWithPatches.bind(M);M.setAutoFreeze.bind(M);M.setUseStrictShallowCopy.bind(M);M.applyPatches.bind(M);M.createDraft.bind(M);M.finishDraft.bind(M);var se=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mn="Expected a function",xt="__lodash_hash_undefined__",Nn="[object Function]",kn="[object GeneratorFunction]",$n="[object Symbol]",Ln=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,qn=/^\w*$/,Qn=/^\./,jn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Gn=/[\\^$.*+?()[\]{}|]/g,Un=/\\(\\)?/g,Kn=/^\[object .+?Constructor\]$/,zn=typeof se=="object"&&se&&se.Object===Object&&se,Wn=typeof self=="object"&&self&&self.Object===Object&&self,qe=zn||Wn||Function("return this")();function Bn(e,t){return e==null?void 0:e[t]}function Hn(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var Yn=Array.prototype,Jn=Function.prototype,Dt=Object.prototype,Ee=qe["__core-js_shared__"],Ze=function(){var e=/[^.]+$/.exec(Ee&&Ee.keys&&Ee.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ft=Jn.toString,Qe=Dt.hasOwnProperty,It=Dt.toString,Vn=RegExp("^"+Ft.call(Qe).replace(Gn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),et=qe.Symbol,Xn=Yn.splice,Zn=Ot(qe,"Map"),te=Ot(Object,"create"),tt=et?et.prototype:void 0,nt=tt?tt.toString:void 0;function z(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function er(){this.__data__=te?te(null):{}}function tr(e){return this.has(e)&&delete this.__data__[e]}function nr(e){var t=this.__data__;if(te){var n=t[e];return n===xt?void 0:n}return Qe.call(t,e)?t[e]:void 0}function rr(e){var t=this.__data__;return te?t[e]!==void 0:Qe.call(t,e)}function sr(e,t){var n=this.__data__;return n[e]=te&&t===void 0?xt:t,this}z.prototype.clear=er;z.prototype.delete=tr;z.prototype.get=nr;z.prototype.has=rr;z.prototype.set=sr;function V(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function or(){this.__data__=[]}function ir(e){var t=this.__data__,n=me(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Xn.call(t,n,1),!0}function ar(e){var t=this.__data__,n=me(t,e);return n<0?void 0:t[n][1]}function cr(e){return me(this.__data__,e)>-1}function ur(e,t){var n=this.__data__,r=me(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}V.prototype.clear=or;V.prototype.delete=ir;V.prototype.get=ar;V.prototype.has=cr;V.prototype.set=ur;function W(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function lr(){this.__data__={hash:new z,map:new(Zn||V),string:new z}}function dr(e){return _e(this,e).delete(e)}function fr(e){return _e(this,e).get(e)}function pr(e){return _e(this,e).has(e)}function yr(e,t){return _e(this,e).set(e,t),this}W.prototype.clear=lr;W.prototype.delete=dr;W.prototype.get=fr;W.prototype.has=pr;W.prototype.set=yr;function me(e,t){for(var n=e.length;n--;)if(Pr(e[n][0],t))return n;return-1}function hr(e,t){t=Cr(t,e)?[t]:_r(t);for(var n=0,r=t.length;e!=null&&n<r;)e=e[vr(t[n++])];return n&&n==r?e:void 0}function gr(e){if(!Rt(e)||wr(e))return!1;var t=xr(e)||Hn(e)?Vn:Kn;return t.test(br(e))}function mr(e){if(typeof e=="string")return e;if(Ge(e))return nt?nt.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function _r(e){return At(e)?e:Er(e)}function _e(e,t){var n=e.__data__;return Sr(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Ot(e,t){var n=Bn(e,t);return gr(n)?n:void 0}function Cr(e,t){if(At(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Ge(e)?!0:qn.test(e)||!Ln.test(e)||t!=null&&e in Object(t)}function Sr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function wr(e){return!!Ze&&Ze in e}var Er=je(function(e){e=Fr(e);var t=[];return Qn.test(e)&&t.push(""),e.replace(jn,function(n,r,s,i){t.push(s?i.replace(Un,"$1"):r||n)}),t});function vr(e){if(typeof e=="string"||Ge(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function br(e){if(e!=null){try{return Ft.call(e)}catch{}try{return e+""}catch{}}return""}function je(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(Mn);var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],i=n.cache;if(i.has(s))return i.get(s);var o=e.apply(this,r);return n.cache=i.set(s,o),o};return n.cache=new(je.Cache||W),n}je.Cache=W;function Pr(e,t){return e===t||e!==e&&t!==t}var At=Array.isArray;function xr(e){var t=Rt(e)?It.call(e):"";return t==Nn||t==kn}function Rt(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Dr(e){return!!e&&typeof e=="object"}function Ge(e){return typeof e=="symbol"||Dr(e)&&It.call(e)==$n}function Fr(e){return e==null?"":mr(e)}function Ir(e,t,n){var r=e==null?void 0:hr(e,t);return r===void 0?n:r}var Or=Ir;const H=Tn(Or),Ar=({pluginID:e,connectionID:t,resourceKey:n,idAccessor:r,namespaces:s=[],listParams:i={},createParams:o={}})=>{const a=D(e),c=g.useQueryClient(),{showSnackbar:l}=k(),u=[a,t,n,s,"list"],h=(f,S)=>[a,t,n,S,f];console.log("getting from key: ",`${a}/${t}/${n}`);const{mutateAsync:_}=g.useMutation({mutationFn:async f=>m.Create(a,t,n,F.types.CreateInput.createFrom({params:f.params||o,input:f.input,namespaces:s})),onSuccess:async f=>{var v,N,ne,B,L,Ue,Ke,ze;let S="";(v=f.result.metadata)!=null&&v.name?S=f.result.metadata.name:(N=f.result)!=null&&N.id?S=(ne=f.result)==null?void 0:ne.id:(B=f.result)!=null&&B.name?S=(L=f.result)==null?void 0:L.name:(Ue=f.result)!=null&&Ue.ID?S=(Ke=f.result)==null?void 0:Ke.ID:(ze=f.result)!=null&&ze.Name&&(S=f.result.Name);const b=S?`Resource ${S} created`:"Resource created";l(b,"success"),await c.invalidateQueries({queryKey:u})},onError:A(l,"Failed to create resource")}),p=g.useQuery({queryKey:u,queryFn:async()=>m.List(a,t,n,F.types.ListInput.createFrom({params:i,order:{by:"name",direction:!0},pagination:{page:1,pageSize:200},namespaces:s})),placeholderData:(f,S)=>f,retry:!1}),C=d.useCallback(f=>{console.log("got a new resource",f),r&&(c.setQueryData(u,S=>oe(S,b=>{if(b||(b=F.types.ListResult.createFrom({result:[],success:!0,pagination:{}})),b.result.findIndex(N=>H(f.data,r)===H(N,r))===-1){b.result.push(f.data);return}})),c.setQueryData(h(f.id,f.namespace),{result:f.data}))},[]),y=d.useCallback(f=>{console.log("got an updated resource",f),r&&(c.setQueryData(u,S=>oe(S,b=>{b||(b=F.types.ListResult.createFrom({result:[],success:!0,pagination:{}}));const v=b.result.findIndex(N=>H(f.newData,r)===H(N,r));if(v!==-1){b.result[v]=f.newData;return}})),c.setQueryData(h(f.id,f.namespace),{result:f.newData}))},[]),E=d.useCallback(f=>{console.log("got a deleted resource",f),r&&c.setQueryData(u,S=>oe(S,b=>{if(!b)return;const v=b.result.findIndex(N=>H(f.data,r)===H(N,r));if(v!==-1){b.result.splice(v,1);return}}))},[]);d.useEffect(()=>{if(!r)return;const f=I.EventsOn(`${a}/${t}/${n}/ADD`,C),S=I.EventsOn(`${a}/${t}/${n}/UPDATE`,y),b=I.EventsOn(`${a}/${t}/${n}/DELETE`,E);return()=>{f(),S(),b()}},[]);const[w,P]=d.useState(O.Pending);return d.useEffect(()=>I.EventsOn(`${a}/${t}/informer/STATE`,S=>{S.resourceKey===n&&P(S.state)}),[a,t,n]),{resources:p,create:_,informerState:w,isSyncing:w===O.Syncing,isSynced:w===O.Synced,informerError:w===O.Error}},Rr=({pluginID:e})=>{const t=D(e),{showSnackbar:n}=k(),r=g.useMutation({mutationFn:async({opts:o,input:a})=>m.Create(t,o.connectionID,o.resourceKey,F.types.CreateInput.createFrom({params:{...o.params,...a.params},input:{...o.params,...a.input},id:o.resourceID,namespace:o.namespace})),onSuccess:(o,{opts:a})=>{n(`Resource ${a.resourceID} created`,"success")},onError(o,{opts:a}){G(n,o,`Failed to create resource ${a.resourceID}`)}}),s=g.useMutation({mutationFn:async({opts:o,input:a})=>m.Update(t,o.connectionID,o.resourceKey,F.types.UpdateInput.createFrom({params:{...o.params,...a.params},input:{...o.params,...a.input},id:o.resourceID,namespace:o.namespace})),onSuccess:(o,{opts:a})=>{n(`Resource ${a.resourceID} updated`,"success")},onError(o,{opts:a}){G(n,o,`Failed to update resource ${a.resourceID}`)}}),i=g.useMutation({mutationFn:async({opts:o,input:a})=>m.Delete(t,o.connectionID,o.resourceKey,F.types.DeleteInput.createFrom({...a,params:{...o.params,...a.params},input:{...o.params,...a.input},id:o.resourceID,namespace:o.namespace})),onSuccess:(o,{opts:a})=>{n(`Resource ${a.resourceID} deleted`,"success")},onError(o,{opts:a}){G(n,o,`Failed to delete resource ${a.resourceID}`)}});return{create:r.mutateAsync,update:s.mutateAsync,remove:i.mutateAsync}},Tr=({pluginID:e,connectionID:t,resourceKey:n,enabled:r=!0})=>{const s=D(e),i=g.useQuery({queryKey:["RESOURCE_ACTIONS",s,t,n],queryFn:()=>m.GetActions(s,t,n),enabled:r&&!!s&&!!t&&!!n,staleTime:5*60*1e3});return{actions:i.data??[],isLoading:i.isLoading,error:i.error}},Mr=({pluginID:e,connectionID:t,resourceKey:n})=>{const r=D(e),s=g.useQueryClient(),{showSnackbar:i}=k(),o=g.useMutation({mutationFn:async({actionID:a,id:c="",namespace:l="",params:u={}})=>m.ExecuteAction(r,t,n,a,F.types.ActionInput.createFrom({id:c,namespace:l,params:u})),onSuccess:a=>{a.message&&i(a.message,"success"),s.invalidateQueries({queryKey:["RESOURCES",r,t,n]})},onError:(a,c)=>{G(i,a,`Failed to execute action "${c.actionID}"`)}});return{executeAction:o.mutateAsync,isExecuting:o.isPending,error:o.error}},Nr=({pluginID:e,connectionID:t,enabled:n=!0})=>{const r=D(e),s=g.useQuery({queryKey:["EDITOR_SCHEMAS",r,t],queryFn:()=>m.GetEditorSchemas(r,t),enabled:n&&!!r&&!!t,staleTime:10*60*1e3,retry:1});return{schemas:s.data??[],isLoading:s.isLoading,error:s.error,refetch:s.refetch}},kr=({pluginID:e,connectionID:t,enabled:n=!0})=>{const r=D(e),s=g.useQueryClient(),i=[r,t,"informer-state"],o=g.useQuery({queryKey:i,queryFn:()=>m.GetInformerState(r,t),enabled:n&&!!r&&!!t});d.useEffect(()=>!n||!r||!t?void 0:I.EventsOn(`${r}/${t}/informer/STATE`,u=>{s.setQueryData(i,h=>h&&oe(h,_=>{_.resources[u.resourceKey]=u.state,_.resourceCounts[u.resourceKey]=u.resourceCount;let p=0,C=0;for(const y of Object.values(_.resources))y===O.Synced&&p++,y===O.Error&&C++;_.syncedCount=p,_.errorCount=C}))}),[r,t,n]);const a=o.data;let c=0;if(a!=null&&a.resources)for(const l of Object.values(a.resources))(l===O.Synced||l===O.Error||l===O.Cancelled)&&c++;return{summary:o,getResourceState:l=>a==null?void 0:a.resources[l],isFullySynced:a?a.totalResources>0&&c===a.totalResources:!1,syncProgress:a&&a.totalResources>0?c/a.totalResources:0,errorCount:(a==null?void 0:a.errorCount)??0}},$r=()=>{const[e,t]=d.useState(new Map),n=d.useRef(new Map),r=d.useRef(new Map),s=d.useCallback(l=>{const u=Ne(l),h=_t(n.current,l),_=ht(h);if(t(p=>{const C=new Map(p);return C.set(u,_),C}),r.current.has(u)&&(clearTimeout(r.current.get(u)),r.current.delete(u)),ae(_)){const p=setTimeout(()=>{t(C=>{const y=new Map(C);return y.delete(u),y}),n.current.delete(u),r.current.delete(u)},5e3);r.current.set(u,p)}},[]);d.useEffect(()=>{const l=I.EventsOn("informer/STATE",s);return()=>{l();for(const u of r.current.values())clearTimeout(u)}},[s]);const i=Array.from(e.values()),o=gt(i),a=i.find(l=>!ae(l))??i[0]??null,c=mt(i);return{syncs:i,hasSyncing:o,primarySync:a,aggregateProgress:c}},Tt=()=>{const e=d.useContext(Te);if(!e)throw new Error("useOperations must be used within an OperationsProvider");return e},Lr=({pluginID:e,connectionID:t,resourceKey:n})=>{const r=D(e),{showSnackbar:s}=k(),{addOperation:i,updateOperation:o}=Tt(),a=d.useRef([]);return d.useEffect(()=>()=>{a.current.forEach(l=>l())},[]),{startStreamAction:d.useCallback(async({actionID:l,id:u,namespace:h,label:_,params:p={}})=>{try{const C=await m.StreamAction(r,t,n,l,F.types.ActionInput.createFrom({id:u,namespace:h,params:p}));i({id:C,label:_,resourceKey:n,resourceName:u,namespace:h,connectionID:t,status:"running",startedAt:Date.now()});const y=`action/stream/${C}`,E=I.EventsOn(y,w=>{var P,f,S,b;switch(w.type){case"progress":{const v=w.data??{};o(C,{message:v.message,progress:v.ready!==void 0&&v.desired!==void 0?{ready:v.ready,desired:v.desired}:void 0});break}case"complete":o(C,{status:"completed",message:((P=w.data)==null?void 0:P.message)??"Completed",completedAt:Date.now()}),s(((f=w.data)==null?void 0:f.message)??_+" completed","success"),I.EventsOff(y);break;case"error":o(C,{status:"error",message:((S=w.data)==null?void 0:S.message)??"Failed",completedAt:Date.now()}),s(((b=w.data)==null?void 0:b.message)??_+" failed","error"),I.EventsOff(y);break}});return a.current.push(()=>{E(),I.EventsOff(y)}),C}catch(C){throw G(s,C,`Failed to start "${l}"`),C}},[r,t,n,i,o,s])}},qr=()=>{const e=d.useContext(Re);if(!e)throw new Error("useSettings must be used within a SettingsProvider");return e},Qr=({to:e,withinContext:t,...n})=>{const{meta:r}=fe();r.id||console.error("Link used outside of a plugin context");const s=`/_plugin/${r.id}${e.startsWith("/")?"":"/"}${e}`;return d.useMemo(()=>x.jsx(X.Link,{style:{textDecoration:"none",color:"inherit"},...n,to:s}),[n,s])};function jr(){const e=X.useNavigate(),t=X.useLocation(),{meta:n}=fe();n.id||console.error("usePluginRouter used outside of a plugin context");const r=`/_plugin/${n.id}`,s=t.pathname.startsWith(r)?t.pathname.slice(r.length)||"/":t.pathname,i=(o,a)=>{const{...c}=a??{};o.startsWith("/")?e(`${r}${o}`,c):e(o,c)};return d.useMemo(()=>({location:t,navigate:i,pluginPath:s}),[t.pathname])}class Gr{}class Ur{constructor(){$(this,"_extensions");$(this,"root");$(this,"pages");$(this,"_routes")}get extensions(){return this._extensions||[]}get Routes(){var t;if(!this._routes&&this.root)return[{path:"",index:!0,Component:this.root}];if(!((t=this._routes)!=null&&t.length))throw new Error("cannot use plugin without a root page or router");return this._routes}get Window(){if(!this._routes&&this.root)return x.jsx(this.root,{});const t=X.createMemoryRouter(this._routes||[]);return x.jsx(X.RouterProvider,{router:t})}registerExtensionPoints(t){return this._extensions=t||[],this}setRootPage(t){return this.root=t,this}withPage(t,n){return this.pages||(this.pages={}),this.pages[t]?(console.warn("Cannot register page with the same name. Please use a different name."),this):(this.pages[t]=n,this)}withRoutes(t){return this._routes=t,this}}var Mt=(e=>(e.MISSING_MANIFEST="MISSING_MANIFEST",e.MISSING_PLUGIN="MISSING_PLUGIN",e.MISSING_ENTRYPOINT="MISSING_ENTRYPOINT",e))(Mt||{});exports.ALL_SESSIONS_KEY=j;exports.BottomDrawerContext=it;exports.ConfirmationModalContext=ct;exports.ErrorTypes=ie;exports.ExtensionPointRegistry=Jt;exports.ExtensionPointStore=dt;exports.ExtensionProvider=Yt;exports.InformerResourceState=O;exports.InformerSyncPolicy=yt;exports.Link=Qr;exports.OperationsContext=Te;exports.OperationsProvider=Gt;exports.PluginContext=de;exports.PluginContextProvider=Lt;exports.PluginErrorCode=Mt;exports.PluginWindow=Ur;exports.PluginWindowRootProps=Gr;exports.RightDrawerContext=at;exports.SettingsContext=Re;exports.SettingsProvider=Qt;exports.SnackbarProvider=Xt;exports.actionToSnackbar=rt;exports.connectionListQueryKey=pt;exports.createErrorHandler=A;exports.defaultState=ot;exports.isCancelledError=Ae;exports.parseAppError=q;exports.showAppError=G;exports.useActiveSyncs=$r;exports.useBottomDrawer=ke;exports.useConfirmationModal=hn;exports.useConnection=Zt;exports.useConnectionNamespaces=tn;exports.useConnectionStatus=nn;exports.useConnections=en;exports.useEditorSchemas=Nr;exports.useExec=cn;exports.useExecuteAction=Mr;exports.useExtensionPoint=Bt;exports.useExtensionPointComponents=Ht;exports.useExtensionRegistry=Me;exports.useInformerState=kr;exports.useLogs=un;exports.useMetricProviders=ln;exports.useMetricProvidersForResource=Ct;exports.useMetricStream=fn;exports.useOperations=Tt;exports.usePluginContext=fe;exports.usePluginData=on;exports.usePluginRouter=jr;exports.usePluginSettings=qt;exports.usePortForwardSessions=pn;exports.useResolvedPluginId=D;exports.useResource=gn;exports.useResourceActions=Tr;exports.useResourceAreaComponent=mn;exports.useResourceGroups=_n;exports.useResourceMetrics=dn;exports.useResourceMutations=Rr;exports.useResourcePortForwarder=yn;exports.useResourceSearch=Cn;exports.useResourceType=Sn;exports.useResourceTypes=wn;exports.useResources=Ar;exports.useRightDrawer=an;exports.useSettings=qr;exports.useSnackbar=k;exports.useStreamAction=Lr;
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var M = (e, t, n) => Wt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
|
4
4
|
import { jsx as F, jsxs as ae } from "react/jsx-runtime";
|
|
5
5
|
import _, { useContext as te, createContext as me, useState as q, useRef as de, useEffect as j, useCallback as V, useMemo as Ht } from "react";
|
|
6
6
|
import { Link as Bt, useNavigate as Yt, useLocation as Jt, createMemoryRouter as Vt, RouterProvider as Xt } from "react-router-dom";
|
|
7
|
-
import { P as Zt, G as en, V as tn, S as nn, h as lt, U as rn, R as sn, i as on, j as dt, k as an, L as cn, l as un, m as Ye, n as ln, o as dn, q as fn, r as pn, s as yn, Q as hn, t as mn, u as Je, v as gn, w as ft, F as _n, x as wn, y as pt, D as yt, z as Sn, A as Cn, B as En, E as ht, H as bn, I as vn, J as mt, K as Pn, M as Dn, N as Fn, O as xn, T as In } from "./Client-
|
|
7
|
+
import { P as Zt, G as en, V as tn, S as nn, h as lt, U as rn, R as sn, i as on, j as dt, k as an, L as cn, l as un, m as Ye, n as ln, o as dn, q as fn, r as pn, s as yn, Q as hn, t as mn, u as Je, v as gn, w as ft, F as _n, x as wn, y as pt, D as yt, z as Sn, A as Cn, B as En, E as ht, H as bn, I as vn, J as mt, K as Pn, M as Dn, N as Fn, O as xn, T as In } from "./Client-9Aa3u0B7.js";
|
|
8
8
|
import { config as On, exec as An, logs as Ve, networker as Xe, types as T } from "./models.js";
|
|
9
9
|
import { useQueryClient as G, useMutation as v, useQuery as D, keepPreviousData as gt, useQueries as Tn } from "@tanstack/react-query";
|
|
10
10
|
import { useNotificationStack as Nn } from "@omniviewdev/ui/feedback";
|
package/dist/models.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var L=Object.defineProperty;var x=(a,p,f)=>p in a?L(a,p,{enumerable:!0,configurable:!0,writable:!0,value:f}):a[p]=f;var e=(a,p,f)=>x(a,typeof p!="symbol"?p+"":p,f);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.config=void 0;(a=>{class p{constructor(s={}){e(this,"name");e(this,"email");e(this,"url");typeof s=="string"&&(s=JSON.parse(s)),this.name=s.name,this.email=s.email,this.url=s.url}static createFrom(s={}){return new p(s)}}a.PluginAuthor=p;class f{constructor(s={}){e(this,"name");e(this,"plugin");e(this,"area");e(this,"resources");e(this,"extension");typeof s=="string"&&(s=JSON.parse(s)),this.name=s.name,this.plugin=s.plugin,this.area=s.area,this.resources=s.resources,this.extension=s.extension}static createFrom(s={}){return new f(s)}}a.PluginResourceComponent=f;class l{constructor(s={}){e(this,"resource");typeof s=="string"&&(s=JSON.parse(s)),this.resource=this.convertValues(s.resource,f)}static createFrom(s={}){return new l(s)}convertValues(s,c,O=!1){if(!s)return s;if(s.slice&&s.map)return s.map(w=>this.convertValues(w,c));if(typeof s=="object"){if(O){for(const w of Object.keys(s))s[w]=new c(s[w]);return s}return new c(s)}return s}}a.PluginComponents=l;class o{constructor(s={}){e(this,"name");e(this,"email");typeof s=="string"&&(s=JSON.parse(s)),this.name=s.name,this.email=s.email}static createFrom(s={}){return new o(s)}}a.PluginMaintainer=o;class g{constructor(s={}){e(this,"primary");e(this,"secondary");e(this,"tertiary");typeof s=="string"&&(s=JSON.parse(s)),this.primary=s.primary,this.secondary=s.secondary,this.tertiary=s.tertiary}static createFrom(s={}){return new g(s)}}a.PluginThemeColors=g;class r{constructor(s={}){e(this,"colors");typeof s=="string"&&(s=JSON.parse(s)),this.colors=this.convertValues(s.colors,g)}static createFrom(s={}){return new r(s)}convertValues(s,c,O=!1){if(!s)return s;if(s.slice&&s.map)return s.map(w=>this.convertValues(w,c));if(typeof s=="object"){if(O){for(const w of Object.keys(s))s[w]=new c(s[w]);return s}return new c(s)}return s}}a.PluginTheme=r;class i{constructor(s={}){e(this,"id");e(this,"version");e(this,"name");e(this,"icon");e(this,"icon_url");e(this,"description");e(this,"repository");e(this,"website");e(this,"category");e(this,"license");e(this,"author");e(this,"maintainers");e(this,"tags");e(this,"dependencies");e(this,"capabilities");e(this,"theme");e(this,"components");typeof s=="string"&&(s=JSON.parse(s)),this.id=s.id,this.version=s.version,this.name=s.name,this.icon=s.icon,this.icon_url=s.icon_url,this.description=s.description,this.repository=s.repository,this.website=s.website,this.category=s.category,this.license=s.license,this.author=this.convertValues(s.author,p),this.maintainers=this.convertValues(s.maintainers,o),this.tags=s.tags,this.dependencies=s.dependencies,this.capabilities=s.capabilities,this.theme=this.convertValues(s.theme,r),this.components=this.convertValues(s.components,l)}static createFrom(s={}){return new i(s)}convertValues(s,c,O=!1){if(!s)return s;if(s.slice&&s.map)return s.map(w=>this.convertValues(w,c));if(typeof s=="object"){if(O){for(const w of Object.keys(s))s[w]=new c(s[w]);return s}return new c(s)}return s}}a.PluginMeta=i})(exports.config||(exports.config={}));exports.devserver=void 0;(a=>{class p{constructor(r={}){e(this,"pid");e(this,"protocol");e(this,"protocolVersion");e(this,"addr");e(this,"vitePort");e(this,"pluginId");e(this,"version");e(this,"startedAt");typeof r=="string"&&(r=JSON.parse(r)),this.pid=r.pid,this.protocol=r.protocol,this.protocolVersion=r.protocolVersion,this.addr=r.addr,this.vitePort=r.vitePort,this.pluginId=r.pluginId,this.version=r.version,this.startedAt=r.startedAt}static createFrom(r={}){return new p(r)}}a.DevInfoFile=p;class f{static createFrom(r={}){return new f(r)}constructor(r={}){typeof r=="string"&&(r=JSON.parse(r))}}a.DevServerManager=f;class l{constructor(r={}){e(this,"pluginID");e(this,"mode");e(this,"devPath");e(this,"vitePort");e(this,"viteURL");e(this,"viteStatus");e(this,"goStatus");e(this,"lastBuildDuration");e(this,"lastBuildTime");e(this,"lastError");e(this,"grpcConnected");typeof r=="string"&&(r=JSON.parse(r)),this.pluginID=r.pluginID,this.mode=r.mode,this.devPath=r.devPath,this.vitePort=r.vitePort,this.viteURL=r.viteURL,this.viteStatus=r.viteStatus,this.goStatus=r.goStatus,this.lastBuildDuration=r.lastBuildDuration,this.lastBuildTime=this.convertValues(r.lastBuildTime,exports.time.Time),this.lastError=r.lastError,this.grpcConnected=r.grpcConnected}static createFrom(r={}){return new l(r)}convertValues(r,i,m=!1){if(!r)return r;if(r.slice&&r.map)return r.map(s=>this.convertValues(s,i));if(typeof r=="object"){if(m){for(const s of Object.keys(r))r[s]=new i(r[s]);return r}return new i(r)}return r}}a.DevServerState=l;class o{constructor(r={}){e(this,"timestamp");e(this,"source");e(this,"level");e(this,"message");e(this,"pluginID");typeof r=="string"&&(r=JSON.parse(r)),this.timestamp=this.convertValues(r.timestamp,exports.time.Time),this.source=r.source,this.level=r.level,this.message=r.message,this.pluginID=r.pluginID}static createFrom(r={}){return new o(r)}convertValues(r,i,m=!1){if(!r)return r;if(r.slice&&r.map)return r.map(s=>this.convertValues(s,i));if(typeof r=="object"){if(m){for(const s of Object.keys(r))r[s]=new i(r[s]);return r}return new i(r)}return r}}a.LogEntry=o})(exports.devserver||(exports.devserver={}));exports.exec=void 0;(a=>{class p{constructor(i={}){e(this,"created_at");e(this,"labels");e(this,"params");e(this,"id");e(this,"command");e(this,"attached");typeof i=="string"&&(i=JSON.parse(i)),this.created_at=this.convertValues(i.created_at,exports.time.Time),this.labels=i.labels,this.params=i.params,this.id=i.id,this.command=i.command,this.attached=i.attached}static createFrom(i={}){return new p(i)}convertValues(i,m,s=!1){if(!i)return i;if(i.slice&&i.map)return i.map(c=>this.convertValues(c,m));if(typeof i=="object"){if(s){for(const c of Object.keys(i))i[c]=new m(i[c]);return i}return new m(i)}return i}}a.Session=p;class f{constructor(i={}){e(this,"session");e(this,"buffer");typeof i=="string"&&(i=JSON.parse(i)),this.session=this.convertValues(i.session,p),this.buffer=i.buffer}static createFrom(i={}){return new f(i)}convertValues(i,m,s=!1){if(!i)return i;if(i.slice&&i.map)return i.map(c=>this.convertValues(c,m));if(typeof i=="object"){if(s){for(const c of Object.keys(i))i[c]=new m(i[c]);return i}return new m(i)}return i}}a.AttachSessionResult=f;class l{constructor(i={}){e(this,"labels");e(this,"command");typeof i=="string"&&(i=JSON.parse(i)),this.labels=i.labels,this.command=i.command}static createFrom(i={}){return new l(i)}}a.CreateTerminalOptions=l;class o{constructor(i={}){e(this,"plugin");e(this,"resource");e(this,"target_builder");e(this,"default_command");typeof i=="string"&&(i=JSON.parse(i)),this.plugin=i.plugin,this.resource=i.resource,this.target_builder=this.convertValues(i.target_builder,exports.types.ActionTargetBuilder),this.default_command=i.default_command}static createFrom(i={}){return new o(i)}convertValues(i,m,s=!1){if(!i)return i;if(i.slice&&i.map)return i.map(c=>this.convertValues(c,m));if(typeof i=="object"){if(s){for(const c of Object.keys(i))i[c]=new m(i[c]);return i}return new m(i)}return i}}a.Handler=o;class g{constructor(i={}){e(this,"params");e(this,"labels");e(this,"id");e(this,"resource_plugin");e(this,"resource_key");e(this,"resource_data");e(this,"command");e(this,"tty");typeof i=="string"&&(i=JSON.parse(i)),this.params=i.params,this.labels=i.labels,this.id=i.id,this.resource_plugin=i.resource_plugin,this.resource_key=i.resource_key,this.resource_data=i.resource_data,this.command=i.command,this.tty=i.tty}static createFrom(i={}){return new g(i)}}a.SessionOptions=g})(exports.exec||(exports.exec={}));exports.logs=void 0;(a=>{class p{constructor(i={}){e(this,"target");e(this,"follow");e(this,"include_previous");e(this,"include_timestamps");e(this,"tail_lines");e(this,"since_seconds");e(this,"since_time");e(this,"limit_bytes");e(this,"include_source_events");e(this,"params");typeof i=="string"&&(i=JSON.parse(i)),this.target=i.target,this.follow=i.follow,this.include_previous=i.include_previous,this.include_timestamps=i.include_timestamps,this.tail_lines=i.tail_lines,this.since_seconds=i.since_seconds,this.since_time=this.convertValues(i.since_time,exports.time.Time),this.limit_bytes=i.limit_bytes,this.include_source_events=i.include_source_events,this.params=i.params}static createFrom(i={}){return new p(i)}convertValues(i,m,s=!1){if(!i)return i;if(i.slice&&i.map)return i.map(c=>this.convertValues(c,m));if(typeof i=="object"){if(s){for(const c of Object.keys(i))i[c]=new m(i[c]);return i}return new m(i)}return i}}a.LogSessionOptions=p;class f{constructor(i={}){e(this,"resource_key");e(this,"resource_id");e(this,"resource_data");e(this,"options");typeof i=="string"&&(i=JSON.parse(i)),this.resource_key=i.resource_key,this.resource_id=i.resource_id,this.resource_data=i.resource_data,this.options=this.convertValues(i.options,p)}static createFrom(i={}){return new f(i)}convertValues(i,m,s=!1){if(!i)return i;if(i.slice&&i.map)return i.map(c=>this.convertValues(c,m));if(typeof i=="object"){if(s){for(const c of Object.keys(i))i[c]=new m(i[c]);return i}return new m(i)}return i}}a.CreateSessionOptions=f;class l{constructor(i={}){e(this,"plugin");e(this,"resource");e(this,"target_builder");typeof i=="string"&&(i=JSON.parse(i)),this.plugin=i.plugin,this.resource=i.resource,this.target_builder=this.convertValues(i.target_builder,exports.types.ActionTargetBuilder)}static createFrom(i={}){return new l(i)}convertValues(i,m,s=!1){if(!i)return i;if(i.slice&&i.map)return i.map(c=>this.convertValues(c,m));if(typeof i=="object"){if(s){for(const c of Object.keys(i))i[c]=new m(i[c]);return i}return new m(i)}return i}}a.Handler=l;class o{constructor(i={}){e(this,"id");e(this,"labels");typeof i=="string"&&(i=JSON.parse(i)),this.id=i.id,this.labels=i.labels}static createFrom(i={}){return new o(i)}}a.LogSource=o;class g{constructor(i={}){e(this,"id");e(this,"plugin_id");e(this,"connection_id");e(this,"resource_key");e(this,"resource_id");e(this,"options");e(this,"status");e(this,"active_sources");e(this,"created_at");typeof i=="string"&&(i=JSON.parse(i)),this.id=i.id,this.plugin_id=i.plugin_id,this.connection_id=i.connection_id,this.resource_key=i.resource_key,this.resource_id=i.resource_id,this.options=this.convertValues(i.options,p),this.status=i.status,this.active_sources=this.convertValues(i.active_sources,o),this.created_at=this.convertValues(i.created_at,exports.time.Time)}static createFrom(i={}){return new g(i)}convertValues(i,m,s=!1){if(!i)return i;if(i.slice&&i.map)return i.map(c=>this.convertValues(c,m));if(typeof i=="object"){if(s){for(const c of Object.keys(i))i[c]=new m(i[c]);return i}return new m(i)}return i}}a.LogSession=g})(exports.logs||(exports.logs={}));exports.main=void 0;(a=>{class p{constructor(o={}){e(this,"displayName");e(this,"pattern");typeof o=="string"&&(o=JSON.parse(o)),this.displayName=o.displayName,this.pattern=o.pattern}static createFrom(o={}){return new p(o)}}a.FileFilter=p;class f{constructor(o={}){e(this,"defaultDirectory");e(this,"defaultFilename");e(this,"title");e(this,"filters");e(this,"showHiddenFiles");e(this,"canCreateDirectories");e(this,"resolvesAliases");e(this,"treatPackagesAsDirectories");typeof o=="string"&&(o=JSON.parse(o)),this.defaultDirectory=o.defaultDirectory,this.defaultFilename=o.defaultFilename,this.title=o.title,this.filters=this.convertValues(o.filters,p),this.showHiddenFiles=o.showHiddenFiles,this.canCreateDirectories=o.canCreateDirectories,this.resolvesAliases=o.resolvesAliases,this.treatPackagesAsDirectories=o.treatPackagesAsDirectories}static createFrom(o={}){return new f(o)}convertValues(o,g,r=!1){if(!o)return o;if(o.slice&&o.map)return o.map(i=>this.convertValues(i,g));if(typeof o=="object"){if(r){for(const i of Object.keys(o))o[i]=new g(o[i]);return o}return new g(o)}return o}}a.FileDialogOptions=f})(exports.main||(exports.main={}));exports.metric=void 0;(a=>{class p{constructor(n={}){e(this,"metric_id");e(this,"min");e(this,"max");e(this,"avg");e(this,"sum");e(this,"p50");e(this,"p90");e(this,"p99");e(this,"count");e(this,"window");e(this,"labels");typeof n=="string"&&(n=JSON.parse(n)),this.metric_id=n.metric_id,this.min=n.min,this.max=n.max,this.avg=n.avg,this.sum=n.sum,this.p50=n.p50,this.p90=n.p90,this.p99=n.p99,this.count=n.count,this.window=n.window,this.labels=n.labels}static createFrom(n={}){return new p(n)}}a.AggregateValue=p;class f{constructor(n={}){e(this,"min");e(this,"max");e(this,"color");typeof n=="string"&&(n=JSON.parse(n)),this.min=n.min,this.max=n.max,this.color=n.color}static createFrom(n={}){return new f(n)}}a.ColorRange=f;class l{constructor(n={}){e(this,"metric_id");e(this,"value");e(this,"timestamp");e(this,"labels");typeof n=="string"&&(n=JSON.parse(n)),this.metric_id=n.metric_id,this.value=n.value,this.timestamp=this.convertValues(n.timestamp,exports.time.Time),this.labels=n.labels}static createFrom(n={}){return new l(n)}convertValues(n,y,b=!1){if(!n)return n;if(n.slice&&n.map)return n.map(d=>this.convertValues(d,y));if(typeof n=="object"){if(b){for(const d of Object.keys(n))n[d]=new y(n[d]);return n}return new y(n)}return n}}a.CurrentValue=l;class o{constructor(n={}){e(this,"timestamp");e(this,"value");e(this,"labels");typeof n=="string"&&(n=JSON.parse(n)),this.timestamp=this.convertValues(n.timestamp,exports.time.Time),this.value=n.value,this.labels=n.labels}static createFrom(n={}){return new o(n)}convertValues(n,y,b=!1){if(!n)return n;if(n.slice&&n.map)return n.map(d=>this.convertValues(d,y));if(typeof n=="object"){if(b){for(const d of Object.keys(n))n[d]=new y(n[d]);return n}return new y(n)}return n}}a.DataPoint=o;class g{constructor(n={}){e(this,"id");e(this,"name");e(this,"unit");e(this,"icon");e(this,"color_ranges");e(this,"format_string");e(this,"supported_shapes");e(this,"chart_group");typeof n=="string"&&(n=JSON.parse(n)),this.id=n.id,this.name=n.name,this.unit=n.unit,this.icon=n.icon,this.color_ranges=this.convertValues(n.color_ranges,f),this.format_string=n.format_string,this.supported_shapes=n.supported_shapes,this.chart_group=n.chart_group}static createFrom(n={}){return new g(n)}convertValues(n,y,b=!1){if(!n)return n;if(n.slice&&n.map)return n.map(d=>this.convertValues(d,y));if(typeof n=="object"){if(b){for(const d of Object.keys(n))n[d]=new y(n[d]);return n}return new y(n)}return n}}a.MetricDescriptor=g;class r{constructor(n={}){e(this,"resource");e(this,"metrics");typeof n=="string"&&(n=JSON.parse(n)),this.resource=n.resource,this.metrics=this.convertValues(n.metrics,g)}static createFrom(n={}){return new r(n)}convertValues(n,y,b=!1){if(!n)return n;if(n.slice&&n.map)return n.map(d=>this.convertValues(d,y));if(typeof n=="object"){if(b){for(const d of Object.keys(n))n[d]=new y(n[d]);return n}return new y(n)}return n}}a.Handler=r;class i{constructor(n={}){e(this,"plugin_id");e(this,"provider_id");e(this,"name");e(this,"icon");e(this,"description");e(this,"handlers");typeof n=="string"&&(n=JSON.parse(n)),this.plugin_id=n.plugin_id,this.provider_id=n.provider_id,this.name=n.name,this.icon=n.icon,this.description=n.description,this.handlers=this.convertValues(n.handlers,r)}static createFrom(n={}){return new i(n)}convertValues(n,y,b=!1){if(!n)return n;if(n.slice&&n.map)return n.map(d=>this.convertValues(d,y));if(typeof n=="object"){if(b){for(const d of Object.keys(n))n[d]=new y(n[d]);return n}return new y(n)}return n}}a.MetricProviderSummary=i;class m{constructor(n={}){e(this,"metric_id");e(this,"data_points");e(this,"labels");typeof n=="string"&&(n=JSON.parse(n)),this.metric_id=n.metric_id,this.data_points=this.convertValues(n.data_points,o),this.labels=n.labels}static createFrom(n={}){return new m(n)}convertValues(n,y,b=!1){if(!n)return n;if(n.slice&&n.map)return n.map(d=>this.convertValues(d,y));if(typeof n=="object"){if(b){for(const d of Object.keys(n))n[d]=new y(n[d]);return n}return new y(n)}return n}}a.TimeSeries=m;class s{constructor(n={}){e(this,"time_series");e(this,"current_value");e(this,"aggregate_value");typeof n=="string"&&(n=JSON.parse(n)),this.time_series=this.convertValues(n.time_series,m),this.current_value=this.convertValues(n.current_value,l),this.aggregate_value=this.convertValues(n.aggregate_value,p)}static createFrom(n={}){return new s(n)}convertValues(n,y,b=!1){if(!n)return n;if(n.slice&&n.map)return n.map(d=>this.convertValues(d,y));if(typeof n=="object"){if(b){for(const d of Object.keys(n))n[d]=new y(n[d]);return n}return new y(n)}return n}}a.MetricResult=s;class c{constructor(n={}){e(this,"resource_key");e(this,"resource_id");e(this,"resource_namespace");e(this,"resource_data");e(this,"metric_ids");e(this,"shape");e(this,"start_time");e(this,"end_time");e(this,"step");e(this,"params");typeof n=="string"&&(n=JSON.parse(n)),this.resource_key=n.resource_key,this.resource_id=n.resource_id,this.resource_namespace=n.resource_namespace,this.resource_data=n.resource_data,this.metric_ids=n.metric_ids,this.shape=n.shape,this.start_time=this.convertValues(n.start_time,exports.time.Time),this.end_time=this.convertValues(n.end_time,exports.time.Time),this.step=n.step,this.params=n.params}static createFrom(n={}){return new c(n)}convertValues(n,y,b=!1){if(!n)return n;if(n.slice&&n.map)return n.map(d=>this.convertValues(d,y));if(typeof n=="object"){if(b){for(const d of Object.keys(n))n[d]=new y(n[d]);return n}return new y(n)}return n}}a.QueryRequest=c;class O{constructor(n={}){e(this,"success");e(this,"results");e(this,"error");typeof n=="string"&&(n=JSON.parse(n)),this.success=n.success,this.results=this.convertValues(n.results,s),this.error=n.error}static createFrom(n={}){return new O(n)}convertValues(n,y,b=!1){if(!n)return n;if(n.slice&&n.map)return n.map(d=>this.convertValues(d,y));if(typeof n=="object"){if(b){for(const d of Object.keys(n))n[d]=new y(n[d]);return n}return new y(n)}return n}}a.QueryResponse=O;class w{constructor(n={}){e(this,"resource_key");e(this,"resource_id");e(this,"resource_namespace");e(this,"resource_data");e(this,"metric_ids");e(this,"interval");typeof n=="string"&&(n=JSON.parse(n)),this.resource_key=n.resource_key,this.resource_id=n.resource_id,this.resource_namespace=n.resource_namespace,this.resource_data=n.resource_data,this.metric_ids=n.metric_ids,this.interval=n.interval}static createFrom(n={}){return new w(n)}}a.SubscribeRequest=w})(exports.metric||(exports.metric={}));exports.networker=void 0;(a=>{class p{constructor(r={}){e(this,"resource_id");e(this,"connection_id");typeof r=="string"&&(r=JSON.parse(r)),this.resource_id=r.resource_id,this.connection_id=r.connection_id}static createFrom(r={}){return new p(r)}}a.FindPortForwardSessionRequest=p;class f{constructor(r={}){e(this,"algorithm");e(this,"key");e(this,"enabled");typeof r=="string"&&(r=JSON.parse(r)),this.algorithm=r.algorithm,this.key=r.key,this.enabled=r.enabled}static createFrom(r={}){return new f(r)}}a.PortForwardSessionEncryption=f;class l{constructor(r={}){e(this,"created_at");e(this,"updated_at");e(this,"connection");e(this,"labels");e(this,"id");e(this,"protocol");e(this,"state");e(this,"connection_type");e(this,"encryption");e(this,"local_port");e(this,"remote_port");typeof r=="string"&&(r=JSON.parse(r)),this.created_at=this.convertValues(r.created_at,exports.time.Time),this.updated_at=this.convertValues(r.updated_at,exports.time.Time),this.connection=r.connection,this.labels=r.labels,this.id=r.id,this.protocol=r.protocol,this.state=r.state,this.connection_type=r.connection_type,this.encryption=this.convertValues(r.encryption,f),this.local_port=r.local_port,this.remote_port=r.remote_port}static createFrom(r={}){return new l(r)}convertValues(r,i,m=!1){if(!r)return r;if(r.slice&&r.map)return r.map(s=>this.convertValues(s,i));if(typeof r=="object"){if(m){for(const s of Object.keys(r))r[s]=new i(r[s]);return r}return new i(r)}return r}}a.PortForwardSession=l;class o{constructor(r={}){e(this,"connection");e(this,"labels");e(this,"params");e(this,"protocol");e(this,"connection_type");e(this,"encryption");e(this,"local_port");e(this,"remote_port");typeof r=="string"&&(r=JSON.parse(r)),this.connection=r.connection,this.labels=r.labels,this.params=r.params,this.protocol=r.protocol,this.connection_type=r.connection_type,this.encryption=this.convertValues(r.encryption,f),this.local_port=r.local_port,this.remote_port=r.remote_port}static createFrom(r={}){return new o(r)}convertValues(r,i,m=!1){if(!r)return r;if(r.slice&&r.map)return r.map(s=>this.convertValues(s,i));if(typeof r=="object"){if(m){for(const s of Object.keys(r))r[s]=new i(r[s]);return r}return new i(r)}return r}}a.PortForwardSessionOptions=o})(exports.networker||(exports.networker={}));exports.plugin=void 0;(a=>{class p{constructor(l={}){e(this,"DevMode");e(this,"DevModePath");e(this,"ExistingState");typeof l=="string"&&(l=JSON.parse(l)),this.DevMode=l.DevMode,this.DevModePath=l.DevModePath,this.ExistingState=this.convertValues(l.ExistingState,exports.types.PluginState)}static createFrom(l={}){return new p(l)}convertValues(l,o,g=!1){if(!l)return l;if(l.slice&&l.map)return l.map(r=>this.convertValues(r,o));if(typeof l=="object"){if(g){for(const r of Object.keys(l))l[r]=new o(l[r]);return l}return new o(l)}return l}}a.LoadPluginOptions=p})(exports.plugin||(exports.plugin={}));exports.registry=void 0;(a=>{class p{constructor(i={}){e(this,"id");e(this,"name");e(this,"description");e(this,"icon_url");e(this,"category");e(this,"tags");e(this,"license");e(this,"official");e(this,"featured");e(this,"download_count");e(this,"average_rating");e(this,"review_count");e(this,"repository");e(this,"url");e(this,"installed");e(this,"installed_version");e(this,"latest_version");e(this,"update_available");typeof i=="string"&&(i=JSON.parse(i)),this.id=i.id,this.name=i.name,this.description=i.description,this.icon_url=i.icon_url,this.category=i.category,this.tags=i.tags,this.license=i.license,this.official=i.official,this.featured=i.featured,this.download_count=i.download_count,this.average_rating=i.average_rating,this.review_count=i.review_count,this.repository=i.repository,this.url=i.url,this.installed=i.installed,this.installed_version=i.installed_version,this.latest_version=i.latest_version,this.update_available=i.update_available}static createFrom(i={}){return new p(i)}}a.AvailablePlugin=p;class f{constructor(i={}){e(this,"date");e(this,"count");typeof i=="string"&&(i=JSON.parse(i)),this.date=i.date,this.count=i.count}static createFrom(i={}){return new f(i)}}a.DailyStat=f;class l{constructor(i={}){e(this,"total");e(this,"last_month");e(this,"last_week");e(this,"daily_stats");typeof i=="string"&&(i=JSON.parse(i)),this.total=i.total,this.last_month=i.last_month,this.last_week=i.last_week,this.daily_stats=this.convertValues(i.daily_stats,f)}static createFrom(i={}){return new l(i)}convertValues(i,m,s=!1){if(!i)return i;if(i.slice&&i.map)return i.map(c=>this.convertValues(c,m));if(typeof i=="object"){if(s){for(const c of Object.keys(i))i[c]=new m(i[c]);return i}return new m(i)}return i}}a.DownloadStats=l;class o{constructor(i={}){e(this,"id");e(this,"user_id");e(this,"rating");e(this,"title");e(this,"body");e(this,"created_at");typeof i=="string"&&(i=JSON.parse(i)),this.id=i.id,this.user_id=i.user_id,this.rating=i.rating,this.title=i.title,this.body=i.body,this.created_at=i.created_at}static createFrom(i={}){return new o(i)}}a.Review=o;class g{constructor(i={}){e(this,"version");e(this,"description");e(this,"changelog");e(this,"min_ide_version");e(this,"max_ide_version");e(this,"capabilities");e(this,"created_at");typeof i=="string"&&(i=JSON.parse(i)),this.version=i.version,this.description=i.description,this.changelog=i.changelog,this.min_ide_version=i.min_ide_version,this.max_ide_version=i.max_ide_version,this.capabilities=i.capabilities,this.created_at=i.created_at}static createFrom(i={}){return new g(i)}}a.VersionInfo=g})(exports.registry||(exports.registry={}));exports.settings=void 0;(a=>{(g=>{g.TEXT="text",g.INTEGER="integer",g.FLOAT="float",g.TOGGLE="toggle",g.COLOR="color",g.DATETIME="datetime",g.PASSWORD="password"})(a.SettingType||(a.SettingType={}));class p{constructor(r={}){e(this,"enabled");e(this,"allowFolders");e(this,"extensions");e(this,"multiple");e(this,"relative");e(this,"defaultPath");typeof r=="string"&&(r=JSON.parse(r)),this.enabled=r.enabled,this.allowFolders=r.allowFolders,this.extensions=r.extensions,this.multiple=r.multiple,this.relative=r.relative,this.defaultPath=r.defaultPath}static createFrom(r={}){return new p(r)}}a.SettingFileSelection=p;class f{constructor(r={}){e(this,"label");e(this,"description");e(this,"value");typeof r=="string"&&(r=JSON.parse(r)),this.label=r.label,this.description=r.description,this.value=r.value}static createFrom(r={}){return new f(r)}}a.SettingOption=f;class l{constructor(r={}){e(this,"id");e(this,"label");e(this,"description");e(this,"type");e(this,"value");e(this,"default");e(this,"options");e(this,"fileSelection");e(this,"sensitive");typeof r=="string"&&(r=JSON.parse(r)),this.id=r.id,this.label=r.label,this.description=r.description,this.type=r.type,this.value=r.value,this.default=r.default,this.options=this.convertValues(r.options,f),this.fileSelection=this.convertValues(r.fileSelection,p),this.sensitive=r.sensitive}static createFrom(r={}){return new l(r)}convertValues(r,i,m=!1){if(!r)return r;if(r.slice&&r.map)return r.map(s=>this.convertValues(s,i));if(typeof r=="object"){if(m){for(const s of Object.keys(r))r[s]=new i(r[s]);return r}return new i(r)}return r}}a.Setting=l;class o{constructor(r={}){e(this,"settings");e(this,"id");e(this,"label");e(this,"description");e(this,"icon");typeof r=="string"&&(r=JSON.parse(r)),this.settings=this.convertValues(r.settings,l,!0),this.id=r.id,this.label=r.label,this.description=r.description,this.icon=r.icon}static createFrom(r={}){return new o(r)}convertValues(r,i,m=!1){if(!r)return r;if(r.slice&&r.map)return r.map(s=>this.convertValues(s,i));if(typeof r=="object"){if(m){for(const s of Object.keys(r))r[s]=new i(r[s]);return r}return new i(r)}return r}}a.Category=o})(exports.settings||(exports.settings={}));exports.time=void 0;(a=>{class p{static createFrom(l={}){return new p(l)}constructor(l={}){typeof l=="string"&&(l=JSON.parse(l))}}a.Time=p})(exports.time||(exports.time={}));exports.trivy=void 0;(a=>{(l=>{l.CONFIG="config",l.FILESYSTEM="fs",l.IMAGE="image",l.KUBERNETES="kubernetes",l.REPOSITORY="repository",l.ROOTFS="rootfs",l.SBOM="sbom"})(a.Command||(a.Command={})),(l=>{l.VULN="vuln",l.MISCONFIG="misconfig",l.SECRET="secret",l.LICENSE="license"})(a.Scanner||(a.Scanner={}));class p{constructor(o={}){e(this,"filePatterns");e(this,"skipDirs");e(this,"skipFiles");e(this,"scanners");typeof o=="string"&&(o=JSON.parse(o)),this.filePatterns=o.filePatterns,this.skipDirs=o.skipDirs,this.skipFiles=o.skipFiles,this.scanners=o.scanners}static createFrom(o={}){return new p(o)}}a.ScanOptions=p;class f{constructor(o={}){e(this,"timestamp");e(this,"result");e(this,"id");e(this,"command");typeof o=="string"&&(o=JSON.parse(o)),this.timestamp=this.convertValues(o.timestamp,exports.time.Time),this.result=o.result,this.id=o.id,this.command=o.command}static createFrom(o={}){return new f(o)}convertValues(o,g,r=!1){if(!o)return o;if(o.slice&&o.map)return o.map(i=>this.convertValues(i,g));if(typeof o=="object"){if(r){for(const i of Object.keys(o))o[i]=new g(o[i]);return o}return new g(o)}return o}}a.ScanResult=f})(exports.trivy||(exports.trivy={}));exports.types=void 0;(a=>{(_=>{_.UNKNOWN="UNKNOWN",_.CONNECTED="CONNECTED",_.DISCONNECTED="DISCONNECTED",_.PENDING="PENDING",_.FAILED="FAILED",_.ERROR="ERROR",_.UNAUTHORIZED="UNAUTHORIZED",_.FORBIDDEN="FORBIDDEN",_.BAD_REQUEST="BAD_REQUEST",_.NOT_FOUND="NOT_FOUND",_.TIMEOUT="TIMEOUT",_.UNAVAILABLE="UNAVAILABLE",_.REQUEST_ENTITY_TOO_LARGE="REQUEST_ENTITY_TOO_LARGE"})(a.ConnectionStatusCode||(a.ConnectionStatusCode={}));class p{constructor(t={}){e(this,"id");e(this,"label");e(this,"description");e(this,"icon");e(this,"scope");e(this,"streaming");typeof t=="string"&&(t=JSON.parse(t)),this.id=t.id,this.label=t.label,this.description=t.description,this.icon=t.icon,this.scope=t.scope,this.streaming=t.streaming}static createFrom(t={}){return new p(t)}}a.ActionDescriptor=p;class f{constructor(t={}){e(this,"id");e(this,"namespace");e(this,"params");typeof t=="string"&&(t=JSON.parse(t)),this.id=t.id,this.namespace=t.namespace,this.params=t.params}static createFrom(t={}){return new f(t)}}a.ActionInput=f;class l{constructor(t={}){e(this,"success");e(this,"data");e(this,"message");typeof t=="string"&&(t=JSON.parse(t)),this.success=t.success,this.data=t.data,this.message=t.message}static createFrom(t={}){return new l(t)}}a.ActionResult=l;class o{constructor(t={}){e(this,"selectors");e(this,"label_selector");e(this,"label");e(this,"paths");typeof t=="string"&&(t=JSON.parse(t)),this.selectors=t.selectors,this.label_selector=t.label_selector,this.label=t.label,this.paths=t.paths}static createFrom(t={}){return new o(t)}}a.ActionTargetBuilder=o;class g{constructor(t={}){e(this,"idAccessor");e(this,"namespaceAccessor");e(this,"namespaced");e(this,"resourceKey");e(this,"keyAccessor");e(this,"keyMap");e(this,"detailExtractors");e(this,"displayId");typeof t=="string"&&(t=JSON.parse(t)),this.idAccessor=t.idAccessor,this.namespaceAccessor=t.namespaceAccessor,this.namespaced=t.namespaced,this.resourceKey=t.resourceKey,this.keyAccessor=t.keyAccessor,this.keyMap=t.keyMap,this.detailExtractors=t.detailExtractors,this.displayId=t.displayId}static createFrom(t={}){return new g(t)}}a.ResourceLink=g;class r{constructor(t={}){e(this,"id");e(this,"header");e(this,"accessor");e(this,"accessorPriority");e(this,"colorMap");e(this,"color");e(this,"align");e(this,"hidden");e(this,"width");e(this,"formatter");e(this,"component");e(this,"componentParams");e(this,"resourceLink");e(this,"valueMap");typeof t=="string"&&(t=JSON.parse(t)),this.id=t.id,this.header=t.header,this.accessor=t.accessor,this.accessorPriority=t.accessorPriority,this.colorMap=t.colorMap,this.color=t.color,this.align=t.align,this.hidden=t.hidden,this.width=t.width,this.formatter=t.formatter,this.component=t.component,this.componentParams=t.componentParams,this.resourceLink=this.convertValues(t.resourceLink,g),this.valueMap=t.valueMap}static createFrom(t={}){return new r(t)}convertValues(t,u,v=!1){if(!t)return t;if(t.slice&&t.map)return t.map(h=>this.convertValues(h,u));if(typeof t=="object"){if(v){for(const h of Object.keys(t))t[h]=new u(t[h]);return t}return new u(t)}return t}}a.ColumnDef=r;class i{constructor(t={}){e(this,"last_refresh");e(this,"data");e(this,"labels");e(this,"id");e(this,"uid");e(this,"name");e(this,"description");e(this,"avatar");e(this,"expiry_time");e(this,"Client");typeof t=="string"&&(t=JSON.parse(t)),this.last_refresh=this.convertValues(t.last_refresh,exports.time.Time),this.data=t.data,this.labels=t.labels,this.id=t.id,this.uid=t.uid,this.name=t.name,this.description=t.description,this.avatar=t.avatar,this.expiry_time=t.expiry_time,this.Client=t.Client}static createFrom(t={}){return new i(t)}convertValues(t,u,v=!1){if(!t)return t;if(t.slice&&t.map)return t.map(h=>this.convertValues(h,u));if(typeof t=="object"){if(v){for(const h of Object.keys(t))t[h]=new u(t[h]);return t}return new u(t)}return t}}a.Connection=i;class m{constructor(t={}){e(this,"connection");e(this,"status");e(this,"error");e(this,"details");typeof t=="string"&&(t=JSON.parse(t)),this.connection=this.convertValues(t.connection,i),this.status=t.status,this.error=t.error,this.details=t.details}static createFrom(t={}){return new m(t)}convertValues(t,u,v=!1){if(!t)return t;if(t.slice&&t.map)return t.map(h=>this.convertValues(h,u));if(typeof t=="object"){if(v){for(const h of Object.keys(t))t[h]=new u(t[h]);return t}return new u(t)}return t}}a.ConnectionStatus=m;class s{constructor(t={}){e(this,"params");e(this,"input");e(this,"namespace");typeof t=="string"&&(t=JSON.parse(t)),this.params=t.params,this.input=t.input,this.namespace=t.namespace}static createFrom(t={}){return new s(t)}}a.CreateInput=s;class c{constructor(t={}){e(this,"result");e(this,"success");typeof t=="string"&&(t=JSON.parse(t)),this.result=t.result,this.success=t.success}static createFrom(t={}){return new c(t)}}a.CreateResult=c;class O{constructor(t={}){e(this,"input");e(this,"params");e(this,"id");e(this,"namespace");typeof t=="string"&&(t=JSON.parse(t)),this.input=t.input,this.params=t.params,this.id=t.id,this.namespace=t.namespace}static createFrom(t={}){return new O(t)}}a.DeleteInput=O;class w{constructor(t={}){e(this,"result");e(this,"success");typeof t=="string"&&(t=JSON.parse(t)),this.result=t.result,this.success=t.success}static createFrom(t={}){return new w(t)}}a.DeleteResult=w;class S{constructor(t={}){e(this,"resourceKey");e(this,"fileMatch");e(this,"uri");e(this,"url");e(this,"content");e(this,"language");typeof t=="string"&&(t=JSON.parse(t)),this.resourceKey=t.resourceKey,this.fileMatch=t.fileMatch,this.uri=t.uri,this.url=t.url,this.content=t.content,this.language=t.language}static createFrom(t={}){return new S(t)}}a.EditorSchema=S;class n{constructor(t={}){e(this,"page");e(this,"pageSize");typeof t=="string"&&(t=JSON.parse(t)),this.page=t.page,this.pageSize=t.pageSize}static createFrom(t={}){return new n(t)}}a.PaginationParams=n;class y{constructor(t={}){e(this,"by");e(this,"direction");typeof t=="string"&&(t=JSON.parse(t)),this.by=t.by,this.direction=t.direction}static createFrom(t={}){return new y(t)}}a.OrderParams=y;class b{constructor(t={}){e(this,"params");e(this,"conditions");e(this,"namespaces");e(this,"order");e(this,"pagination");typeof t=="string"&&(t=JSON.parse(t)),this.params=t.params,this.conditions=t.conditions,this.namespaces=t.namespaces,this.order=this.convertValues(t.order,y),this.pagination=this.convertValues(t.pagination,n)}static createFrom(t={}){return new b(t)}convertValues(t,u,v=!1){if(!t)return t;if(t.slice&&t.map)return t.map(h=>this.convertValues(h,u));if(typeof t=="object"){if(v){for(const h of Object.keys(t))t[h]=new u(t[h]);return t}return new u(t)}return t}}a.FindInput=b;class d{constructor(t={}){e(this,"page");e(this,"pageSize");e(this,"total");e(this,"pages");typeof t=="string"&&(t=JSON.parse(t)),this.page=t.page,this.pageSize=t.pageSize,this.total=t.total,this.pages=t.pages}static createFrom(t={}){return new d(t)}}a.PaginationResult=d;class N{constructor(t={}){e(this,"result");e(this,"success");e(this,"pagination");typeof t=="string"&&(t=JSON.parse(t)),this.result=t.result,this.success=t.success,this.pagination=this.convertValues(t.pagination,d)}static createFrom(t={}){return new N(t)}convertValues(t,u,v=!1){if(!t)return t;if(t.slice&&t.map)return t.map(h=>this.convertValues(h,u));if(typeof t=="object"){if(v){for(const h of Object.keys(t))t[h]=new u(t[h]);return t}return new u(t)}return t}}a.FindResult=N;class k{constructor(t={}){e(this,"params");e(this,"id");e(this,"namespace");typeof t=="string"&&(t=JSON.parse(t)),this.params=t.params,this.id=t.id,this.namespace=t.namespace}static createFrom(t={}){return new k(t)}}a.GetInput=k;class F{constructor(t={}){e(this,"result");e(this,"success");typeof t=="string"&&(t=JSON.parse(t)),this.result=t.result,this.success=t.success}static createFrom(t={}){return new F(t)}}a.GetResult=F;class J{constructor(t={}){e(this,"connection");e(this,"resources");e(this,"resourceCounts");e(this,"totalResources");e(this,"syncedCount");e(this,"errorCount");typeof t=="string"&&(t=JSON.parse(t)),this.connection=t.connection,this.resources=t.resources,this.resourceCounts=t.resourceCounts,this.totalResources=t.totalResources,this.syncedCount=t.syncedCount,this.errorCount=t.errorCount}static createFrom(t={}){return new J(t)}}a.InformerConnectionSummary=J;class V{constructor(t={}){e(this,"id");e(this,"title");e(this,"icon");e(this,"description");e(this,"items");typeof t=="string"&&(t=JSON.parse(t)),this.id=t.id,this.title=t.title,this.icon=t.icon,this.description=t.description,this.items=this.convertValues(t.items,V)}static createFrom(t={}){return new V(t)}convertValues(t,u,v=!1){if(!t)return t;if(t.slice&&t.map)return t.map(h=>this.convertValues(h,u));if(typeof t=="object"){if(v){for(const h of Object.keys(t))t[h]=new u(t[h]);return t}return new u(t)}return t}}a.LayoutItem=V;class j{constructor(t={}){e(this,"params");e(this,"namespaces");e(this,"order");e(this,"pagination");typeof t=="string"&&(t=JSON.parse(t)),this.params=t.params,this.namespaces=t.namespaces,this.order=this.convertValues(t.order,y),this.pagination=this.convertValues(t.pagination,n)}static createFrom(t={}){return new j(t)}convertValues(t,u,v=!1){if(!t)return t;if(t.slice&&t.map)return t.map(h=>this.convertValues(h,u));if(typeof t=="object"){if(v){for(const h of Object.keys(t))t[h]=new u(t[h]);return t}return new u(t)}return t}}a.ListInput=j;class D{constructor(t={}){e(this,"result");e(this,"success");e(this,"pagination");typeof t=="string"&&(t=JSON.parse(t)),this.result=t.result,this.success=t.success,this.pagination=this.convertValues(t.pagination,d)}static createFrom(t={}){return new D(t)}convertValues(t,u,v=!1){if(!t)return t;if(t.slice&&t.map)return t.map(h=>this.convertValues(h,u));if(typeof t=="object"){if(v){for(const h of Object.keys(t))t[h]=new u(t[h]);return t}return new u(t)}return t}}a.ListResult=D;class E{constructor(t={}){e(this,"id");e(this,"metadata");e(this,"enabled");e(this,"running");e(this,"devMode");e(this,"devPath");e(this,"loading");e(this,"loadError");e(this,"capabilities");typeof t=="string"&&(t=JSON.parse(t)),this.id=t.id,this.metadata=this.convertValues(t.metadata,exports.config.PluginMeta),this.enabled=t.enabled,this.running=t.running,this.devMode=t.devMode,this.devPath=t.devPath,this.loading=t.loading,this.loadError=t.loadError,this.capabilities=t.capabilities}static createFrom(t={}){return new E(t)}convertValues(t,u,v=!1){if(!t)return t;if(t.slice&&t.map)return t.map(h=>this.convertValues(h,u));if(typeof t=="object"){if(v){for(const h of Object.keys(t))t[h]=new u(t[h]);return t}return new u(t)}return t}}a.Plugin=E;class P{constructor(t={}){e(this,"Metadata");e(this,"ID");e(this,"DevPath");e(this,"Enabled");e(this,"DevMode");typeof t=="string"&&(t=JSON.parse(t)),this.Metadata=this.convertValues(t.Metadata,exports.config.PluginMeta),this.ID=t.ID,this.DevPath=t.DevPath,this.Enabled=t.Enabled,this.DevMode=t.DevMode}static createFrom(t={}){return new P(t)}convertValues(t,u,v=!1){if(!t)return t;if(t.slice&&t.map)return t.map(h=>this.convertValues(h,u));if(typeof t=="object"){if(v){for(const h of Object.keys(t))t[h]=new u(t[h]);return t}return new u(t)}return t}}a.PluginState=P;class R{constructor(t={}){e(this,"id_accessor");e(this,"namespace_accessor");e(this,"memoizer_accessor");e(this,"columnDefs");e(this,"supportedOperations");typeof t=="string"&&(t=JSON.parse(t)),this.id_accessor=t.id_accessor,this.namespace_accessor=t.namespace_accessor,this.memoizer_accessor=t.memoizer_accessor,this.columnDefs=this.convertValues(t.columnDefs,r),this.supportedOperations=t.supportedOperations}static createFrom(t={}){return new R(t)}convertValues(t,u,v=!1){if(!t)return t;if(t.slice&&t.map)return t.map(h=>this.convertValues(h,u));if(typeof t=="object"){if(v){for(const h of Object.keys(t))t[h]=new u(t[h]);return t}return new u(t)}return t}}a.ResourceDefinition=R;class T{constructor(t={}){e(this,"id");e(this,"name");e(this,"description");e(this,"icon");e(this,"resources");typeof t=="string"&&(t=JSON.parse(t)),this.id=t.id,this.name=t.name,this.description=t.description,this.icon=t.icon,this.resources=this.convertValues(t.resources,Array,!0)}static createFrom(t={}){return new T(t)}convertValues(t,u,v=!1){if(!t)return t;if(t.slice&&t.map)return t.map(h=>this.convertValues(h,u));if(typeof t=="object"){if(v){for(const h of Object.keys(t))t[h]=new u(t[h]);return t}return new u(t)}return t}}a.ResourceGroup=T;class I{constructor(t={}){e(this,"group");e(this,"version");e(this,"kind");e(this,"label");e(this,"icon");e(this,"description");e(this,"category");typeof t=="string"&&(t=JSON.parse(t)),this.group=t.group,this.version=t.version,this.kind=t.kind,this.label=t.label,this.icon=t.icon,this.description=t.description,this.category=t.category}static createFrom(t={}){return new I(t)}}a.ResourceMeta=I;class A{constructor(t={}){e(this,"input");e(this,"params");e(this,"id");e(this,"namespace");typeof t=="string"&&(t=JSON.parse(t)),this.input=t.input,this.params=t.params,this.id=t.id,this.namespace=t.namespace}static createFrom(t={}){return new A(t)}}a.UpdateInput=A;class M{constructor(t={}){e(this,"result");e(this,"success");typeof t=="string"&&(t=JSON.parse(t)),this.result=t.result,this.success=t.success}static createFrom(t={}){return new M(t)}}a.UpdateResult=M})(exports.types||(exports.types={}));exports.ui=void 0;(a=>{class p{constructor(r={}){e(this,"plugin");typeof r=="string"&&(r=JSON.parse(r)),this.plugin=r.plugin}static createFrom(r={}){return new p(r)}}a.GetPluginComponentsInput=p;class f{constructor(r={}){e(this,"plugin");e(this,"resource");e(this,"area");typeof r=="string"&&(r=JSON.parse(r)),this.plugin=r.plugin,this.resource=r.resource,this.area=r.area}static createFrom(r={}){return new f(r)}}a.GetResourceAreaComponentInput=f;class l{constructor(r={}){e(this,"plugin");e(this,"resource");typeof r=="string"&&(r=JSON.parse(r)),this.plugin=r.plugin,this.resource=r.resource}static createFrom(r={}){return new l(r)}}a.GetResourceComponentsInput=l;class o{constructor(r={}){e(this,"owner");e(this,"name");e(this,"plugin");e(this,"resource");e(this,"area");e(this,"extension");typeof r=="string"&&(r=JSON.parse(r)),this.owner=r.owner,this.name=r.name,this.plugin=r.plugin,this.resource=r.resource,this.area=r.area,this.extension=r.extension}static createFrom(r={}){return new o(r)}}a.ResourceComponent=o})(exports.ui||(exports.ui={}));exports.utils=void 0;(a=>{class p{constructor(l={}){e(this,"filename");e(this,"contents");typeof l=="string"&&(l=JSON.parse(l)),this.filename=l.filename,this.contents=l.contents}static createFrom(l={}){return new p(l)}}a.GetLanguageInput=p})(exports.utils||(exports.utils={}));
|
|
1
|
+
"use strict";var L=Object.defineProperty;var C=(a,p,f)=>p in a?L(a,p,{enumerable:!0,configurable:!0,writable:!0,value:f}):a[p]=f;var e=(a,p,f)=>C(a,typeof p!="symbol"?p+"":p,f);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.config=void 0;(a=>{class p{constructor(s={}){e(this,"name");e(this,"email");e(this,"url");typeof s=="string"&&(s=JSON.parse(s)),this.name=s.name,this.email=s.email,this.url=s.url}static createFrom(s={}){return new p(s)}}a.PluginAuthor=p;class f{constructor(s={}){e(this,"name");e(this,"plugin");e(this,"area");e(this,"resources");e(this,"extension");typeof s=="string"&&(s=JSON.parse(s)),this.name=s.name,this.plugin=s.plugin,this.area=s.area,this.resources=s.resources,this.extension=s.extension}static createFrom(s={}){return new f(s)}}a.PluginResourceComponent=f;class l{constructor(s={}){e(this,"resource");typeof s=="string"&&(s=JSON.parse(s)),this.resource=this.convertValues(s.resource,f)}static createFrom(s={}){return new l(s)}convertValues(s,c,_=!1){if(!s)return s;if(s.slice&&s.map)return s.map(w=>this.convertValues(w,c));if(typeof s=="object"){if(_){for(const w of Object.keys(s))s[w]=new c(s[w]);return s}return new c(s)}return s}}a.PluginComponents=l;class o{constructor(s={}){e(this,"name");e(this,"email");typeof s=="string"&&(s=JSON.parse(s)),this.name=s.name,this.email=s.email}static createFrom(s={}){return new o(s)}}a.PluginMaintainer=o;class y{constructor(s={}){e(this,"primary");e(this,"secondary");e(this,"tertiary");typeof s=="string"&&(s=JSON.parse(s)),this.primary=s.primary,this.secondary=s.secondary,this.tertiary=s.tertiary}static createFrom(s={}){return new y(s)}}a.PluginThemeColors=y;class r{constructor(s={}){e(this,"colors");typeof s=="string"&&(s=JSON.parse(s)),this.colors=this.convertValues(s.colors,y)}static createFrom(s={}){return new r(s)}convertValues(s,c,_=!1){if(!s)return s;if(s.slice&&s.map)return s.map(w=>this.convertValues(w,c));if(typeof s=="object"){if(_){for(const w of Object.keys(s))s[w]=new c(s[w]);return s}return new c(s)}return s}}a.PluginTheme=r;class i{constructor(s={}){e(this,"id");e(this,"version");e(this,"name");e(this,"icon");e(this,"icon_url");e(this,"description");e(this,"repository");e(this,"website");e(this,"category");e(this,"license");e(this,"author");e(this,"maintainers");e(this,"tags");e(this,"dependencies");e(this,"capabilities");e(this,"theme");e(this,"components");e(this,"schema_version");e(this,"sdk_protocol_version");typeof s=="string"&&(s=JSON.parse(s)),this.id=s.id,this.version=s.version,this.name=s.name,this.icon=s.icon,this.icon_url=s.icon_url,this.description=s.description,this.repository=s.repository,this.website=s.website,this.category=s.category,this.license=s.license,this.author=this.convertValues(s.author,p),this.maintainers=this.convertValues(s.maintainers,o),this.tags=s.tags,this.dependencies=s.dependencies,this.capabilities=s.capabilities,this.theme=this.convertValues(s.theme,r),this.components=this.convertValues(s.components,l),this.schema_version=s.schema_version,this.sdk_protocol_version=s.sdk_protocol_version}static createFrom(s={}){return new i(s)}convertValues(s,c,_=!1){if(!s)return s;if(s.slice&&s.map)return s.map(w=>this.convertValues(w,c));if(typeof s=="object"){if(_){for(const w of Object.keys(s))s[w]=new c(s[w]);return s}return new c(s)}return s}}a.PluginMeta=i})(exports.config||(exports.config={}));exports.devserver=void 0;(a=>{class p{constructor(r={}){e(this,"pid");e(this,"protocol");e(this,"protocolVersion");e(this,"addr");e(this,"vitePort");e(this,"pluginId");e(this,"version");e(this,"startedAt");typeof r=="string"&&(r=JSON.parse(r)),this.pid=r.pid,this.protocol=r.protocol,this.protocolVersion=r.protocolVersion,this.addr=r.addr,this.vitePort=r.vitePort,this.pluginId=r.pluginId,this.version=r.version,this.startedAt=r.startedAt}static createFrom(r={}){return new p(r)}}a.DevInfoFile=p;class f{static createFrom(r={}){return new f(r)}constructor(r={}){typeof r=="string"&&(r=JSON.parse(r))}}a.DevServerManager=f;class l{constructor(r={}){e(this,"pluginID");e(this,"mode");e(this,"devPath");e(this,"vitePort");e(this,"viteURL");e(this,"viteStatus");e(this,"goStatus");e(this,"lastBuildDuration");e(this,"lastBuildTime");e(this,"lastError");e(this,"grpcConnected");typeof r=="string"&&(r=JSON.parse(r)),this.pluginID=r.pluginID,this.mode=r.mode,this.devPath=r.devPath,this.vitePort=r.vitePort,this.viteURL=r.viteURL,this.viteStatus=r.viteStatus,this.goStatus=r.goStatus,this.lastBuildDuration=r.lastBuildDuration,this.lastBuildTime=this.convertValues(r.lastBuildTime,exports.time.Time),this.lastError=r.lastError,this.grpcConnected=r.grpcConnected}static createFrom(r={}){return new l(r)}convertValues(r,i,m=!1){if(!r)return r;if(r.slice&&r.map)return r.map(s=>this.convertValues(s,i));if(typeof r=="object"){if(m){for(const s of Object.keys(r))r[s]=new i(r[s]);return r}return new i(r)}return r}}a.DevServerState=l;class o{constructor(r={}){e(this,"timestamp");e(this,"source");e(this,"level");e(this,"message");e(this,"pluginID");typeof r=="string"&&(r=JSON.parse(r)),this.timestamp=this.convertValues(r.timestamp,exports.time.Time),this.source=r.source,this.level=r.level,this.message=r.message,this.pluginID=r.pluginID}static createFrom(r={}){return new o(r)}convertValues(r,i,m=!1){if(!r)return r;if(r.slice&&r.map)return r.map(s=>this.convertValues(s,i));if(typeof r=="object"){if(m){for(const s of Object.keys(r))r[s]=new i(r[s]);return r}return new i(r)}return r}}a.LogEntry=o})(exports.devserver||(exports.devserver={}));exports.exec=void 0;(a=>{class p{constructor(i={}){e(this,"created_at");e(this,"labels");e(this,"params");e(this,"id");e(this,"command");e(this,"attached");typeof i=="string"&&(i=JSON.parse(i)),this.created_at=this.convertValues(i.created_at,exports.time.Time),this.labels=i.labels,this.params=i.params,this.id=i.id,this.command=i.command,this.attached=i.attached}static createFrom(i={}){return new p(i)}convertValues(i,m,s=!1){if(!i)return i;if(i.slice&&i.map)return i.map(c=>this.convertValues(c,m));if(typeof i=="object"){if(s){for(const c of Object.keys(i))i[c]=new m(i[c]);return i}return new m(i)}return i}}a.Session=p;class f{constructor(i={}){e(this,"session");e(this,"buffer");typeof i=="string"&&(i=JSON.parse(i)),this.session=this.convertValues(i.session,p),this.buffer=i.buffer}static createFrom(i={}){return new f(i)}convertValues(i,m,s=!1){if(!i)return i;if(i.slice&&i.map)return i.map(c=>this.convertValues(c,m));if(typeof i=="object"){if(s){for(const c of Object.keys(i))i[c]=new m(i[c]);return i}return new m(i)}return i}}a.AttachSessionResult=f;class l{constructor(i={}){e(this,"labels");e(this,"command");typeof i=="string"&&(i=JSON.parse(i)),this.labels=i.labels,this.command=i.command}static createFrom(i={}){return new l(i)}}a.CreateTerminalOptions=l;class o{constructor(i={}){e(this,"plugin");e(this,"resource");e(this,"target_builder");e(this,"default_command");typeof i=="string"&&(i=JSON.parse(i)),this.plugin=i.plugin,this.resource=i.resource,this.target_builder=this.convertValues(i.target_builder,exports.types.ActionTargetBuilder),this.default_command=i.default_command}static createFrom(i={}){return new o(i)}convertValues(i,m,s=!1){if(!i)return i;if(i.slice&&i.map)return i.map(c=>this.convertValues(c,m));if(typeof i=="object"){if(s){for(const c of Object.keys(i))i[c]=new m(i[c]);return i}return new m(i)}return i}}a.Handler=o;class y{constructor(i={}){e(this,"params");e(this,"labels");e(this,"id");e(this,"resource_plugin");e(this,"resource_key");e(this,"resource_data");e(this,"command");e(this,"tty");typeof i=="string"&&(i=JSON.parse(i)),this.params=i.params,this.labels=i.labels,this.id=i.id,this.resource_plugin=i.resource_plugin,this.resource_key=i.resource_key,this.resource_data=i.resource_data,this.command=i.command,this.tty=i.tty}static createFrom(i={}){return new y(i)}}a.SessionOptions=y})(exports.exec||(exports.exec={}));exports.logs=void 0;(a=>{class p{constructor(i={}){e(this,"target");e(this,"follow");e(this,"include_previous");e(this,"include_timestamps");e(this,"tail_lines");e(this,"since_seconds");e(this,"since_time");e(this,"limit_bytes");e(this,"include_source_events");e(this,"params");typeof i=="string"&&(i=JSON.parse(i)),this.target=i.target,this.follow=i.follow,this.include_previous=i.include_previous,this.include_timestamps=i.include_timestamps,this.tail_lines=i.tail_lines,this.since_seconds=i.since_seconds,this.since_time=this.convertValues(i.since_time,exports.time.Time),this.limit_bytes=i.limit_bytes,this.include_source_events=i.include_source_events,this.params=i.params}static createFrom(i={}){return new p(i)}convertValues(i,m,s=!1){if(!i)return i;if(i.slice&&i.map)return i.map(c=>this.convertValues(c,m));if(typeof i=="object"){if(s){for(const c of Object.keys(i))i[c]=new m(i[c]);return i}return new m(i)}return i}}a.LogSessionOptions=p;class f{constructor(i={}){e(this,"resource_key");e(this,"resource_id");e(this,"resource_data");e(this,"options");typeof i=="string"&&(i=JSON.parse(i)),this.resource_key=i.resource_key,this.resource_id=i.resource_id,this.resource_data=i.resource_data,this.options=this.convertValues(i.options,p)}static createFrom(i={}){return new f(i)}convertValues(i,m,s=!1){if(!i)return i;if(i.slice&&i.map)return i.map(c=>this.convertValues(c,m));if(typeof i=="object"){if(s){for(const c of Object.keys(i))i[c]=new m(i[c]);return i}return new m(i)}return i}}a.CreateSessionOptions=f;class l{constructor(i={}){e(this,"plugin");e(this,"resource");e(this,"target_builder");typeof i=="string"&&(i=JSON.parse(i)),this.plugin=i.plugin,this.resource=i.resource,this.target_builder=this.convertValues(i.target_builder,exports.types.ActionTargetBuilder)}static createFrom(i={}){return new l(i)}convertValues(i,m,s=!1){if(!i)return i;if(i.slice&&i.map)return i.map(c=>this.convertValues(c,m));if(typeof i=="object"){if(s){for(const c of Object.keys(i))i[c]=new m(i[c]);return i}return new m(i)}return i}}a.Handler=l;class o{constructor(i={}){e(this,"id");e(this,"labels");typeof i=="string"&&(i=JSON.parse(i)),this.id=i.id,this.labels=i.labels}static createFrom(i={}){return new o(i)}}a.LogSource=o;class y{constructor(i={}){e(this,"id");e(this,"plugin_id");e(this,"connection_id");e(this,"resource_key");e(this,"resource_id");e(this,"options");e(this,"status");e(this,"active_sources");e(this,"created_at");typeof i=="string"&&(i=JSON.parse(i)),this.id=i.id,this.plugin_id=i.plugin_id,this.connection_id=i.connection_id,this.resource_key=i.resource_key,this.resource_id=i.resource_id,this.options=this.convertValues(i.options,p),this.status=i.status,this.active_sources=this.convertValues(i.active_sources,o),this.created_at=this.convertValues(i.created_at,exports.time.Time)}static createFrom(i={}){return new y(i)}convertValues(i,m,s=!1){if(!i)return i;if(i.slice&&i.map)return i.map(c=>this.convertValues(c,m));if(typeof i=="object"){if(s){for(const c of Object.keys(i))i[c]=new m(i[c]);return i}return new m(i)}return i}}a.LogSession=y})(exports.logs||(exports.logs={}));exports.main=void 0;(a=>{class p{constructor(o={}){e(this,"displayName");e(this,"pattern");typeof o=="string"&&(o=JSON.parse(o)),this.displayName=o.displayName,this.pattern=o.pattern}static createFrom(o={}){return new p(o)}}a.FileFilter=p;class f{constructor(o={}){e(this,"defaultDirectory");e(this,"defaultFilename");e(this,"title");e(this,"filters");e(this,"showHiddenFiles");e(this,"canCreateDirectories");e(this,"resolvesAliases");e(this,"treatPackagesAsDirectories");typeof o=="string"&&(o=JSON.parse(o)),this.defaultDirectory=o.defaultDirectory,this.defaultFilename=o.defaultFilename,this.title=o.title,this.filters=this.convertValues(o.filters,p),this.showHiddenFiles=o.showHiddenFiles,this.canCreateDirectories=o.canCreateDirectories,this.resolvesAliases=o.resolvesAliases,this.treatPackagesAsDirectories=o.treatPackagesAsDirectories}static createFrom(o={}){return new f(o)}convertValues(o,y,r=!1){if(!o)return o;if(o.slice&&o.map)return o.map(i=>this.convertValues(i,y));if(typeof o=="object"){if(r){for(const i of Object.keys(o))o[i]=new y(o[i]);return o}return new y(o)}return o}}a.FileDialogOptions=f})(exports.main||(exports.main={}));exports.metric=void 0;(a=>{class p{constructor(n={}){e(this,"metric_id");e(this,"min");e(this,"max");e(this,"avg");e(this,"sum");e(this,"p50");e(this,"p90");e(this,"p99");e(this,"count");e(this,"window");e(this,"labels");typeof n=="string"&&(n=JSON.parse(n)),this.metric_id=n.metric_id,this.min=n.min,this.max=n.max,this.avg=n.avg,this.sum=n.sum,this.p50=n.p50,this.p90=n.p90,this.p99=n.p99,this.count=n.count,this.window=n.window,this.labels=n.labels}static createFrom(n={}){return new p(n)}}a.AggregateValue=p;class f{constructor(n={}){e(this,"min");e(this,"max");e(this,"color");typeof n=="string"&&(n=JSON.parse(n)),this.min=n.min,this.max=n.max,this.color=n.color}static createFrom(n={}){return new f(n)}}a.ColorRange=f;class l{constructor(n={}){e(this,"metric_id");e(this,"value");e(this,"timestamp");e(this,"labels");typeof n=="string"&&(n=JSON.parse(n)),this.metric_id=n.metric_id,this.value=n.value,this.timestamp=this.convertValues(n.timestamp,exports.time.Time),this.labels=n.labels}static createFrom(n={}){return new l(n)}convertValues(n,g,b=!1){if(!n)return n;if(n.slice&&n.map)return n.map(d=>this.convertValues(d,g));if(typeof n=="object"){if(b){for(const d of Object.keys(n))n[d]=new g(n[d]);return n}return new g(n)}return n}}a.CurrentValue=l;class o{constructor(n={}){e(this,"timestamp");e(this,"value");e(this,"labels");typeof n=="string"&&(n=JSON.parse(n)),this.timestamp=this.convertValues(n.timestamp,exports.time.Time),this.value=n.value,this.labels=n.labels}static createFrom(n={}){return new o(n)}convertValues(n,g,b=!1){if(!n)return n;if(n.slice&&n.map)return n.map(d=>this.convertValues(d,g));if(typeof n=="object"){if(b){for(const d of Object.keys(n))n[d]=new g(n[d]);return n}return new g(n)}return n}}a.DataPoint=o;class y{constructor(n={}){e(this,"id");e(this,"name");e(this,"unit");e(this,"icon");e(this,"color_ranges");e(this,"format_string");e(this,"supported_shapes");e(this,"chart_group");typeof n=="string"&&(n=JSON.parse(n)),this.id=n.id,this.name=n.name,this.unit=n.unit,this.icon=n.icon,this.color_ranges=this.convertValues(n.color_ranges,f),this.format_string=n.format_string,this.supported_shapes=n.supported_shapes,this.chart_group=n.chart_group}static createFrom(n={}){return new y(n)}convertValues(n,g,b=!1){if(!n)return n;if(n.slice&&n.map)return n.map(d=>this.convertValues(d,g));if(typeof n=="object"){if(b){for(const d of Object.keys(n))n[d]=new g(n[d]);return n}return new g(n)}return n}}a.MetricDescriptor=y;class r{constructor(n={}){e(this,"resource");e(this,"metrics");typeof n=="string"&&(n=JSON.parse(n)),this.resource=n.resource,this.metrics=this.convertValues(n.metrics,y)}static createFrom(n={}){return new r(n)}convertValues(n,g,b=!1){if(!n)return n;if(n.slice&&n.map)return n.map(d=>this.convertValues(d,g));if(typeof n=="object"){if(b){for(const d of Object.keys(n))n[d]=new g(n[d]);return n}return new g(n)}return n}}a.Handler=r;class i{constructor(n={}){e(this,"plugin_id");e(this,"provider_id");e(this,"name");e(this,"icon");e(this,"description");e(this,"handlers");typeof n=="string"&&(n=JSON.parse(n)),this.plugin_id=n.plugin_id,this.provider_id=n.provider_id,this.name=n.name,this.icon=n.icon,this.description=n.description,this.handlers=this.convertValues(n.handlers,r)}static createFrom(n={}){return new i(n)}convertValues(n,g,b=!1){if(!n)return n;if(n.slice&&n.map)return n.map(d=>this.convertValues(d,g));if(typeof n=="object"){if(b){for(const d of Object.keys(n))n[d]=new g(n[d]);return n}return new g(n)}return n}}a.MetricProviderSummary=i;class m{constructor(n={}){e(this,"metric_id");e(this,"data_points");e(this,"labels");typeof n=="string"&&(n=JSON.parse(n)),this.metric_id=n.metric_id,this.data_points=this.convertValues(n.data_points,o),this.labels=n.labels}static createFrom(n={}){return new m(n)}convertValues(n,g,b=!1){if(!n)return n;if(n.slice&&n.map)return n.map(d=>this.convertValues(d,g));if(typeof n=="object"){if(b){for(const d of Object.keys(n))n[d]=new g(n[d]);return n}return new g(n)}return n}}a.TimeSeries=m;class s{constructor(n={}){e(this,"time_series");e(this,"current_value");e(this,"aggregate_value");typeof n=="string"&&(n=JSON.parse(n)),this.time_series=this.convertValues(n.time_series,m),this.current_value=this.convertValues(n.current_value,l),this.aggregate_value=this.convertValues(n.aggregate_value,p)}static createFrom(n={}){return new s(n)}convertValues(n,g,b=!1){if(!n)return n;if(n.slice&&n.map)return n.map(d=>this.convertValues(d,g));if(typeof n=="object"){if(b){for(const d of Object.keys(n))n[d]=new g(n[d]);return n}return new g(n)}return n}}a.MetricResult=s;class c{constructor(n={}){e(this,"resource_key");e(this,"resource_id");e(this,"resource_namespace");e(this,"resource_data");e(this,"metric_ids");e(this,"shape");e(this,"start_time");e(this,"end_time");e(this,"step");e(this,"params");typeof n=="string"&&(n=JSON.parse(n)),this.resource_key=n.resource_key,this.resource_id=n.resource_id,this.resource_namespace=n.resource_namespace,this.resource_data=n.resource_data,this.metric_ids=n.metric_ids,this.shape=n.shape,this.start_time=this.convertValues(n.start_time,exports.time.Time),this.end_time=this.convertValues(n.end_time,exports.time.Time),this.step=n.step,this.params=n.params}static createFrom(n={}){return new c(n)}convertValues(n,g,b=!1){if(!n)return n;if(n.slice&&n.map)return n.map(d=>this.convertValues(d,g));if(typeof n=="object"){if(b){for(const d of Object.keys(n))n[d]=new g(n[d]);return n}return new g(n)}return n}}a.QueryRequest=c;class _{constructor(n={}){e(this,"success");e(this,"results");e(this,"error");typeof n=="string"&&(n=JSON.parse(n)),this.success=n.success,this.results=this.convertValues(n.results,s),this.error=n.error}static createFrom(n={}){return new _(n)}convertValues(n,g,b=!1){if(!n)return n;if(n.slice&&n.map)return n.map(d=>this.convertValues(d,g));if(typeof n=="object"){if(b){for(const d of Object.keys(n))n[d]=new g(n[d]);return n}return new g(n)}return n}}a.QueryResponse=_;class w{constructor(n={}){e(this,"resource_key");e(this,"resource_id");e(this,"resource_namespace");e(this,"resource_data");e(this,"metric_ids");e(this,"interval");typeof n=="string"&&(n=JSON.parse(n)),this.resource_key=n.resource_key,this.resource_id=n.resource_id,this.resource_namespace=n.resource_namespace,this.resource_data=n.resource_data,this.metric_ids=n.metric_ids,this.interval=n.interval}static createFrom(n={}){return new w(n)}}a.SubscribeRequest=w})(exports.metric||(exports.metric={}));exports.networker=void 0;(a=>{class p{constructor(r={}){e(this,"resource_id");e(this,"connection_id");typeof r=="string"&&(r=JSON.parse(r)),this.resource_id=r.resource_id,this.connection_id=r.connection_id}static createFrom(r={}){return new p(r)}}a.FindPortForwardSessionRequest=p;class f{constructor(r={}){e(this,"algorithm");e(this,"key");e(this,"enabled");typeof r=="string"&&(r=JSON.parse(r)),this.algorithm=r.algorithm,this.key=r.key,this.enabled=r.enabled}static createFrom(r={}){return new f(r)}}a.PortForwardSessionEncryption=f;class l{constructor(r={}){e(this,"created_at");e(this,"updated_at");e(this,"connection");e(this,"labels");e(this,"id");e(this,"protocol");e(this,"state");e(this,"connection_type");e(this,"encryption");e(this,"local_port");e(this,"remote_port");typeof r=="string"&&(r=JSON.parse(r)),this.created_at=this.convertValues(r.created_at,exports.time.Time),this.updated_at=this.convertValues(r.updated_at,exports.time.Time),this.connection=r.connection,this.labels=r.labels,this.id=r.id,this.protocol=r.protocol,this.state=r.state,this.connection_type=r.connection_type,this.encryption=this.convertValues(r.encryption,f),this.local_port=r.local_port,this.remote_port=r.remote_port}static createFrom(r={}){return new l(r)}convertValues(r,i,m=!1){if(!r)return r;if(r.slice&&r.map)return r.map(s=>this.convertValues(s,i));if(typeof r=="object"){if(m){for(const s of Object.keys(r))r[s]=new i(r[s]);return r}return new i(r)}return r}}a.PortForwardSession=l;class o{constructor(r={}){e(this,"connection");e(this,"labels");e(this,"params");e(this,"protocol");e(this,"connection_type");e(this,"encryption");e(this,"local_port");e(this,"remote_port");typeof r=="string"&&(r=JSON.parse(r)),this.connection=r.connection,this.labels=r.labels,this.params=r.params,this.protocol=r.protocol,this.connection_type=r.connection_type,this.encryption=this.convertValues(r.encryption,f),this.local_port=r.local_port,this.remote_port=r.remote_port}static createFrom(r={}){return new o(r)}convertValues(r,i,m=!1){if(!r)return r;if(r.slice&&r.map)return r.map(s=>this.convertValues(s,i));if(typeof r=="object"){if(m){for(const s of Object.keys(r))r[s]=new i(r[s]);return r}return new i(r)}return r}}a.PortForwardSessionOptions=o})(exports.networker||(exports.networker={}));exports.plugin=void 0;(a=>{class p{constructor(l={}){e(this,"DevMode");e(this,"DevModePath");e(this,"ExistingState");typeof l=="string"&&(l=JSON.parse(l)),this.DevMode=l.DevMode,this.DevModePath=l.DevModePath,this.ExistingState=this.convertValues(l.ExistingState,exports.types.PluginStateRecord)}static createFrom(l={}){return new p(l)}convertValues(l,o,y=!1){if(!l)return l;if(l.slice&&l.map)return l.map(r=>this.convertValues(r,o));if(typeof l=="object"){if(y){for(const r of Object.keys(l))l[r]=new o(l[r]);return l}return new o(l)}return l}}a.LoadPluginOptions=p})(exports.plugin||(exports.plugin={}));exports.registry=void 0;(a=>{class p{constructor(i={}){e(this,"id");e(this,"name");e(this,"description");e(this,"icon_url");e(this,"category");e(this,"tags");e(this,"license");e(this,"official");e(this,"featured");e(this,"download_count");e(this,"average_rating");e(this,"review_count");e(this,"repository");e(this,"url");e(this,"installed");e(this,"installed_version");e(this,"latest_version");e(this,"update_available");typeof i=="string"&&(i=JSON.parse(i)),this.id=i.id,this.name=i.name,this.description=i.description,this.icon_url=i.icon_url,this.category=i.category,this.tags=i.tags,this.license=i.license,this.official=i.official,this.featured=i.featured,this.download_count=i.download_count,this.average_rating=i.average_rating,this.review_count=i.review_count,this.repository=i.repository,this.url=i.url,this.installed=i.installed,this.installed_version=i.installed_version,this.latest_version=i.latest_version,this.update_available=i.update_available}static createFrom(i={}){return new p(i)}}a.AvailablePlugin=p;class f{constructor(i={}){e(this,"date");e(this,"count");typeof i=="string"&&(i=JSON.parse(i)),this.date=i.date,this.count=i.count}static createFrom(i={}){return new f(i)}}a.DailyStat=f;class l{constructor(i={}){e(this,"total");e(this,"last_month");e(this,"last_week");e(this,"daily_stats");typeof i=="string"&&(i=JSON.parse(i)),this.total=i.total,this.last_month=i.last_month,this.last_week=i.last_week,this.daily_stats=this.convertValues(i.daily_stats,f)}static createFrom(i={}){return new l(i)}convertValues(i,m,s=!1){if(!i)return i;if(i.slice&&i.map)return i.map(c=>this.convertValues(c,m));if(typeof i=="object"){if(s){for(const c of Object.keys(i))i[c]=new m(i[c]);return i}return new m(i)}return i}}a.DownloadStats=l;class o{constructor(i={}){e(this,"id");e(this,"user_id");e(this,"rating");e(this,"title");e(this,"body");e(this,"created_at");typeof i=="string"&&(i=JSON.parse(i)),this.id=i.id,this.user_id=i.user_id,this.rating=i.rating,this.title=i.title,this.body=i.body,this.created_at=i.created_at}static createFrom(i={}){return new o(i)}}a.Review=o;class y{constructor(i={}){e(this,"version");e(this,"description");e(this,"changelog");e(this,"min_ide_version");e(this,"max_ide_version");e(this,"capabilities");e(this,"created_at");typeof i=="string"&&(i=JSON.parse(i)),this.version=i.version,this.description=i.description,this.changelog=i.changelog,this.min_ide_version=i.min_ide_version,this.max_ide_version=i.max_ide_version,this.capabilities=i.capabilities,this.created_at=i.created_at}static createFrom(i={}){return new y(i)}}a.VersionInfo=y})(exports.registry||(exports.registry={}));exports.settings=void 0;(a=>{(y=>{y.TEXT="text",y.INTEGER="integer",y.FLOAT="float",y.TOGGLE="toggle",y.COLOR="color",y.DATETIME="datetime",y.PASSWORD="password"})(a.SettingType||(a.SettingType={}));class p{constructor(r={}){e(this,"enabled");e(this,"allowFolders");e(this,"extensions");e(this,"multiple");e(this,"relative");e(this,"defaultPath");typeof r=="string"&&(r=JSON.parse(r)),this.enabled=r.enabled,this.allowFolders=r.allowFolders,this.extensions=r.extensions,this.multiple=r.multiple,this.relative=r.relative,this.defaultPath=r.defaultPath}static createFrom(r={}){return new p(r)}}a.SettingFileSelection=p;class f{constructor(r={}){e(this,"label");e(this,"description");e(this,"value");typeof r=="string"&&(r=JSON.parse(r)),this.label=r.label,this.description=r.description,this.value=r.value}static createFrom(r={}){return new f(r)}}a.SettingOption=f;class l{constructor(r={}){e(this,"id");e(this,"label");e(this,"description");e(this,"type");e(this,"value");e(this,"default");e(this,"options");e(this,"fileSelection");e(this,"sensitive");typeof r=="string"&&(r=JSON.parse(r)),this.id=r.id,this.label=r.label,this.description=r.description,this.type=r.type,this.value=r.value,this.default=r.default,this.options=this.convertValues(r.options,f),this.fileSelection=this.convertValues(r.fileSelection,p),this.sensitive=r.sensitive}static createFrom(r={}){return new l(r)}convertValues(r,i,m=!1){if(!r)return r;if(r.slice&&r.map)return r.map(s=>this.convertValues(s,i));if(typeof r=="object"){if(m){for(const s of Object.keys(r))r[s]=new i(r[s]);return r}return new i(r)}return r}}a.Setting=l;class o{constructor(r={}){e(this,"settings");e(this,"id");e(this,"label");e(this,"description");e(this,"icon");typeof r=="string"&&(r=JSON.parse(r)),this.settings=this.convertValues(r.settings,l,!0),this.id=r.id,this.label=r.label,this.description=r.description,this.icon=r.icon}static createFrom(r={}){return new o(r)}convertValues(r,i,m=!1){if(!r)return r;if(r.slice&&r.map)return r.map(s=>this.convertValues(s,i));if(typeof r=="object"){if(m){for(const s of Object.keys(r))r[s]=new i(r[s]);return r}return new i(r)}return r}}a.Category=o})(exports.settings||(exports.settings={}));exports.time=void 0;(a=>{class p{static createFrom(l={}){return new p(l)}constructor(l={}){typeof l=="string"&&(l=JSON.parse(l))}}a.Time=p})(exports.time||(exports.time={}));exports.trivy=void 0;(a=>{(l=>{l.CONFIG="config",l.FILESYSTEM="fs",l.IMAGE="image",l.KUBERNETES="kubernetes",l.REPOSITORY="repository",l.ROOTFS="rootfs",l.SBOM="sbom"})(a.Command||(a.Command={})),(l=>{l.VULN="vuln",l.MISCONFIG="misconfig",l.SECRET="secret",l.LICENSE="license"})(a.Scanner||(a.Scanner={}));class p{constructor(o={}){e(this,"filePatterns");e(this,"skipDirs");e(this,"skipFiles");e(this,"scanners");typeof o=="string"&&(o=JSON.parse(o)),this.filePatterns=o.filePatterns,this.skipDirs=o.skipDirs,this.skipFiles=o.skipFiles,this.scanners=o.scanners}static createFrom(o={}){return new p(o)}}a.ScanOptions=p;class f{constructor(o={}){e(this,"timestamp");e(this,"result");e(this,"id");e(this,"command");typeof o=="string"&&(o=JSON.parse(o)),this.timestamp=this.convertValues(o.timestamp,exports.time.Time),this.result=o.result,this.id=o.id,this.command=o.command}static createFrom(o={}){return new f(o)}convertValues(o,y,r=!1){if(!o)return o;if(o.slice&&o.map)return o.map(i=>this.convertValues(i,y));if(typeof o=="object"){if(r){for(const i of Object.keys(o))o[i]=new y(o[i]);return o}return new y(o)}return o}}a.ScanResult=f})(exports.trivy||(exports.trivy={}));exports.types=void 0;(a=>{(O=>{O.UNKNOWN="UNKNOWN",O.CONNECTED="CONNECTED",O.DISCONNECTED="DISCONNECTED",O.PENDING="PENDING",O.FAILED="FAILED",O.ERROR="ERROR",O.UNAUTHORIZED="UNAUTHORIZED",O.FORBIDDEN="FORBIDDEN",O.BAD_REQUEST="BAD_REQUEST",O.NOT_FOUND="NOT_FOUND",O.TIMEOUT="TIMEOUT",O.UNAVAILABLE="UNAVAILABLE",O.REQUEST_ENTITY_TOO_LARGE="REQUEST_ENTITY_TOO_LARGE"})(a.ConnectionStatusCode||(a.ConnectionStatusCode={}));class p{constructor(t={}){e(this,"id");e(this,"label");e(this,"description");e(this,"icon");e(this,"scope");e(this,"streaming");typeof t=="string"&&(t=JSON.parse(t)),this.id=t.id,this.label=t.label,this.description=t.description,this.icon=t.icon,this.scope=t.scope,this.streaming=t.streaming}static createFrom(t={}){return new p(t)}}a.ActionDescriptor=p;class f{constructor(t={}){e(this,"id");e(this,"namespace");e(this,"params");typeof t=="string"&&(t=JSON.parse(t)),this.id=t.id,this.namespace=t.namespace,this.params=t.params}static createFrom(t={}){return new f(t)}}a.ActionInput=f;class l{constructor(t={}){e(this,"success");e(this,"data");e(this,"message");typeof t=="string"&&(t=JSON.parse(t)),this.success=t.success,this.data=t.data,this.message=t.message}static createFrom(t={}){return new l(t)}}a.ActionResult=l;class o{constructor(t={}){e(this,"selectors");e(this,"label_selector");e(this,"label");e(this,"paths");typeof t=="string"&&(t=JSON.parse(t)),this.selectors=t.selectors,this.label_selector=t.label_selector,this.label=t.label,this.paths=t.paths}static createFrom(t={}){return new o(t)}}a.ActionTargetBuilder=o;class y{constructor(t={}){e(this,"idAccessor");e(this,"namespaceAccessor");e(this,"namespaced");e(this,"resourceKey");e(this,"keyAccessor");e(this,"keyMap");e(this,"detailExtractors");e(this,"displayId");typeof t=="string"&&(t=JSON.parse(t)),this.idAccessor=t.idAccessor,this.namespaceAccessor=t.namespaceAccessor,this.namespaced=t.namespaced,this.resourceKey=t.resourceKey,this.keyAccessor=t.keyAccessor,this.keyMap=t.keyMap,this.detailExtractors=t.detailExtractors,this.displayId=t.displayId}static createFrom(t={}){return new y(t)}}a.ResourceLink=y;class r{constructor(t={}){e(this,"id");e(this,"header");e(this,"accessor");e(this,"accessorPriority");e(this,"colorMap");e(this,"color");e(this,"align");e(this,"hidden");e(this,"width");e(this,"formatter");e(this,"component");e(this,"componentParams");e(this,"resourceLink");e(this,"valueMap");typeof t=="string"&&(t=JSON.parse(t)),this.id=t.id,this.header=t.header,this.accessor=t.accessor,this.accessorPriority=t.accessorPriority,this.colorMap=t.colorMap,this.color=t.color,this.align=t.align,this.hidden=t.hidden,this.width=t.width,this.formatter=t.formatter,this.component=t.component,this.componentParams=t.componentParams,this.resourceLink=this.convertValues(t.resourceLink,y),this.valueMap=t.valueMap}static createFrom(t={}){return new r(t)}convertValues(t,u,v=!1){if(!t)return t;if(t.slice&&t.map)return t.map(h=>this.convertValues(h,u));if(typeof t=="object"){if(v){for(const h of Object.keys(t))t[h]=new u(t[h]);return t}return new u(t)}return t}}a.ColumnDef=r;class i{constructor(t={}){e(this,"last_refresh");e(this,"data");e(this,"labels");e(this,"id");e(this,"uid");e(this,"name");e(this,"description");e(this,"avatar");e(this,"expiry_time");e(this,"Client");typeof t=="string"&&(t=JSON.parse(t)),this.last_refresh=this.convertValues(t.last_refresh,exports.time.Time),this.data=t.data,this.labels=t.labels,this.id=t.id,this.uid=t.uid,this.name=t.name,this.description=t.description,this.avatar=t.avatar,this.expiry_time=t.expiry_time,this.Client=t.Client}static createFrom(t={}){return new i(t)}convertValues(t,u,v=!1){if(!t)return t;if(t.slice&&t.map)return t.map(h=>this.convertValues(h,u));if(typeof t=="object"){if(v){for(const h of Object.keys(t))t[h]=new u(t[h]);return t}return new u(t)}return t}}a.Connection=i;class m{constructor(t={}){e(this,"connection");e(this,"status");e(this,"error");e(this,"details");typeof t=="string"&&(t=JSON.parse(t)),this.connection=this.convertValues(t.connection,i),this.status=t.status,this.error=t.error,this.details=t.details}static createFrom(t={}){return new m(t)}convertValues(t,u,v=!1){if(!t)return t;if(t.slice&&t.map)return t.map(h=>this.convertValues(h,u));if(typeof t=="object"){if(v){for(const h of Object.keys(t))t[h]=new u(t[h]);return t}return new u(t)}return t}}a.ConnectionStatus=m;class s{constructor(t={}){e(this,"params");e(this,"input");e(this,"namespace");typeof t=="string"&&(t=JSON.parse(t)),this.params=t.params,this.input=t.input,this.namespace=t.namespace}static createFrom(t={}){return new s(t)}}a.CreateInput=s;class c{constructor(t={}){e(this,"result");e(this,"success");typeof t=="string"&&(t=JSON.parse(t)),this.result=t.result,this.success=t.success}static createFrom(t={}){return new c(t)}}a.CreateResult=c;class _{constructor(t={}){e(this,"input");e(this,"params");e(this,"id");e(this,"namespace");typeof t=="string"&&(t=JSON.parse(t)),this.input=t.input,this.params=t.params,this.id=t.id,this.namespace=t.namespace}static createFrom(t={}){return new _(t)}}a.DeleteInput=_;class w{constructor(t={}){e(this,"result");e(this,"success");typeof t=="string"&&(t=JSON.parse(t)),this.result=t.result,this.success=t.success}static createFrom(t={}){return new w(t)}}a.DeleteResult=w;class S{constructor(t={}){e(this,"resourceKey");e(this,"fileMatch");e(this,"uri");e(this,"url");e(this,"content");e(this,"language");typeof t=="string"&&(t=JSON.parse(t)),this.resourceKey=t.resourceKey,this.fileMatch=t.fileMatch,this.uri=t.uri,this.url=t.url,this.content=t.content,this.language=t.language}static createFrom(t={}){return new S(t)}}a.EditorSchema=S;class n{constructor(t={}){e(this,"page");e(this,"pageSize");typeof t=="string"&&(t=JSON.parse(t)),this.page=t.page,this.pageSize=t.pageSize}static createFrom(t={}){return new n(t)}}a.PaginationParams=n;class g{constructor(t={}){e(this,"by");e(this,"direction");typeof t=="string"&&(t=JSON.parse(t)),this.by=t.by,this.direction=t.direction}static createFrom(t={}){return new g(t)}}a.OrderParams=g;class b{constructor(t={}){e(this,"params");e(this,"conditions");e(this,"namespaces");e(this,"order");e(this,"pagination");typeof t=="string"&&(t=JSON.parse(t)),this.params=t.params,this.conditions=t.conditions,this.namespaces=t.namespaces,this.order=this.convertValues(t.order,g),this.pagination=this.convertValues(t.pagination,n)}static createFrom(t={}){return new b(t)}convertValues(t,u,v=!1){if(!t)return t;if(t.slice&&t.map)return t.map(h=>this.convertValues(h,u));if(typeof t=="object"){if(v){for(const h of Object.keys(t))t[h]=new u(t[h]);return t}return new u(t)}return t}}a.FindInput=b;class d{constructor(t={}){e(this,"page");e(this,"pageSize");e(this,"total");e(this,"pages");typeof t=="string"&&(t=JSON.parse(t)),this.page=t.page,this.pageSize=t.pageSize,this.total=t.total,this.pages=t.pages}static createFrom(t={}){return new d(t)}}a.PaginationResult=d;class k{constructor(t={}){e(this,"result");e(this,"success");e(this,"pagination");typeof t=="string"&&(t=JSON.parse(t)),this.result=t.result,this.success=t.success,this.pagination=this.convertValues(t.pagination,d)}static createFrom(t={}){return new k(t)}convertValues(t,u,v=!1){if(!t)return t;if(t.slice&&t.map)return t.map(h=>this.convertValues(h,u));if(typeof t=="object"){if(v){for(const h of Object.keys(t))t[h]=new u(t[h]);return t}return new u(t)}return t}}a.FindResult=k;class N{constructor(t={}){e(this,"params");e(this,"id");e(this,"namespace");typeof t=="string"&&(t=JSON.parse(t)),this.params=t.params,this.id=t.id,this.namespace=t.namespace}static createFrom(t={}){return new N(t)}}a.GetInput=N;class F{constructor(t={}){e(this,"result");e(this,"success");typeof t=="string"&&(t=JSON.parse(t)),this.result=t.result,this.success=t.success}static createFrom(t={}){return new F(t)}}a.GetResult=F;class J{constructor(t={}){e(this,"connection");e(this,"resources");e(this,"resourceCounts");e(this,"totalResources");e(this,"syncedCount");e(this,"errorCount");typeof t=="string"&&(t=JSON.parse(t)),this.connection=t.connection,this.resources=t.resources,this.resourceCounts=t.resourceCounts,this.totalResources=t.totalResources,this.syncedCount=t.syncedCount,this.errorCount=t.errorCount}static createFrom(t={}){return new J(t)}}a.InformerConnectionSummary=J;class V{constructor(t={}){e(this,"id");e(this,"title");e(this,"icon");e(this,"description");e(this,"items");typeof t=="string"&&(t=JSON.parse(t)),this.id=t.id,this.title=t.title,this.icon=t.icon,this.description=t.description,this.items=this.convertValues(t.items,V)}static createFrom(t={}){return new V(t)}convertValues(t,u,v=!1){if(!t)return t;if(t.slice&&t.map)return t.map(h=>this.convertValues(h,u));if(typeof t=="object"){if(v){for(const h of Object.keys(t))t[h]=new u(t[h]);return t}return new u(t)}return t}}a.LayoutItem=V;class j{constructor(t={}){e(this,"params");e(this,"namespaces");e(this,"order");e(this,"pagination");typeof t=="string"&&(t=JSON.parse(t)),this.params=t.params,this.namespaces=t.namespaces,this.order=this.convertValues(t.order,g),this.pagination=this.convertValues(t.pagination,n)}static createFrom(t={}){return new j(t)}convertValues(t,u,v=!1){if(!t)return t;if(t.slice&&t.map)return t.map(h=>this.convertValues(h,u));if(typeof t=="object"){if(v){for(const h of Object.keys(t))t[h]=new u(t[h]);return t}return new u(t)}return t}}a.ListInput=j;class E{constructor(t={}){e(this,"result");e(this,"success");e(this,"pagination");typeof t=="string"&&(t=JSON.parse(t)),this.result=t.result,this.success=t.success,this.pagination=this.convertValues(t.pagination,d)}static createFrom(t={}){return new E(t)}convertValues(t,u,v=!1){if(!t)return t;if(t.slice&&t.map)return t.map(h=>this.convertValues(h,u));if(typeof t=="object"){if(v){for(const h of Object.keys(t))t[h]=new u(t[h]);return t}return new u(t)}return t}}a.ListResult=E;class D{constructor(t={}){e(this,"id");e(this,"metadata");e(this,"phase");e(this,"enabled");e(this,"devMode");e(this,"devPath");e(this,"capabilities");e(this,"lastError");typeof t=="string"&&(t=JSON.parse(t)),this.id=t.id,this.metadata=this.convertValues(t.metadata,exports.config.PluginMeta),this.phase=t.phase,this.enabled=t.enabled,this.devMode=t.devMode,this.devPath=t.devPath,this.capabilities=t.capabilities,this.lastError=t.lastError}static createFrom(t={}){return new D(t)}convertValues(t,u,v=!1){if(!t)return t;if(t.slice&&t.map)return t.map(h=>this.convertValues(h,u));if(typeof t=="object"){if(v){for(const h of Object.keys(t))t[h]=new u(t[h]);return t}return new u(t)}return t}}a.PluginInfo=D;class P{constructor(t={}){e(this,"id");e(this,"phase");e(this,"metadata");e(this,"enabled");e(this,"devMode");e(this,"devPath");e(this,"lastError");e(this,"errorCount");e(this,"installedAt");typeof t=="string"&&(t=JSON.parse(t)),this.id=t.id,this.phase=t.phase,this.metadata=this.convertValues(t.metadata,exports.config.PluginMeta),this.enabled=t.enabled,this.devMode=t.devMode,this.devPath=t.devPath,this.lastError=t.lastError,this.errorCount=t.errorCount,this.installedAt=this.convertValues(t.installedAt,exports.time.Time)}static createFrom(t={}){return new P(t)}convertValues(t,u,v=!1){if(!t)return t;if(t.slice&&t.map)return t.map(h=>this.convertValues(h,u));if(typeof t=="object"){if(v){for(const h of Object.keys(t))t[h]=new u(t[h]);return t}return new u(t)}return t}}a.PluginStateRecord=P;class R{constructor(t={}){e(this,"id_accessor");e(this,"namespace_accessor");e(this,"memoizer_accessor");e(this,"columnDefs");e(this,"supportedOperations");typeof t=="string"&&(t=JSON.parse(t)),this.id_accessor=t.id_accessor,this.namespace_accessor=t.namespace_accessor,this.memoizer_accessor=t.memoizer_accessor,this.columnDefs=this.convertValues(t.columnDefs,r),this.supportedOperations=t.supportedOperations}static createFrom(t={}){return new R(t)}convertValues(t,u,v=!1){if(!t)return t;if(t.slice&&t.map)return t.map(h=>this.convertValues(h,u));if(typeof t=="object"){if(v){for(const h of Object.keys(t))t[h]=new u(t[h]);return t}return new u(t)}return t}}a.ResourceDefinition=R;class T{constructor(t={}){e(this,"id");e(this,"name");e(this,"description");e(this,"icon");e(this,"resources");typeof t=="string"&&(t=JSON.parse(t)),this.id=t.id,this.name=t.name,this.description=t.description,this.icon=t.icon,this.resources=this.convertValues(t.resources,Array,!0)}static createFrom(t={}){return new T(t)}convertValues(t,u,v=!1){if(!t)return t;if(t.slice&&t.map)return t.map(h=>this.convertValues(h,u));if(typeof t=="object"){if(v){for(const h of Object.keys(t))t[h]=new u(t[h]);return t}return new u(t)}return t}}a.ResourceGroup=T;class I{constructor(t={}){e(this,"group");e(this,"version");e(this,"kind");e(this,"label");e(this,"icon");e(this,"description");e(this,"category");typeof t=="string"&&(t=JSON.parse(t)),this.group=t.group,this.version=t.version,this.kind=t.kind,this.label=t.label,this.icon=t.icon,this.description=t.description,this.category=t.category}static createFrom(t={}){return new I(t)}}a.ResourceMeta=I;class A{constructor(t={}){e(this,"input");e(this,"params");e(this,"id");e(this,"namespace");typeof t=="string"&&(t=JSON.parse(t)),this.input=t.input,this.params=t.params,this.id=t.id,this.namespace=t.namespace}static createFrom(t={}){return new A(t)}}a.UpdateInput=A;class M{constructor(t={}){e(this,"result");e(this,"success");typeof t=="string"&&(t=JSON.parse(t)),this.result=t.result,this.success=t.success}static createFrom(t={}){return new M(t)}}a.UpdateResult=M})(exports.types||(exports.types={}));exports.ui=void 0;(a=>{class p{constructor(r={}){e(this,"plugin");typeof r=="string"&&(r=JSON.parse(r)),this.plugin=r.plugin}static createFrom(r={}){return new p(r)}}a.GetPluginComponentsInput=p;class f{constructor(r={}){e(this,"plugin");e(this,"resource");e(this,"area");typeof r=="string"&&(r=JSON.parse(r)),this.plugin=r.plugin,this.resource=r.resource,this.area=r.area}static createFrom(r={}){return new f(r)}}a.GetResourceAreaComponentInput=f;class l{constructor(r={}){e(this,"plugin");e(this,"resource");typeof r=="string"&&(r=JSON.parse(r)),this.plugin=r.plugin,this.resource=r.resource}static createFrom(r={}){return new l(r)}}a.GetResourceComponentsInput=l;class o{constructor(r={}){e(this,"owner");e(this,"name");e(this,"plugin");e(this,"resource");e(this,"area");e(this,"extension");typeof r=="string"&&(r=JSON.parse(r)),this.owner=r.owner,this.name=r.name,this.plugin=r.plugin,this.resource=r.resource,this.area=r.area,this.extension=r.extension}static createFrom(r={}){return new o(r)}}a.ResourceComponent=o})(exports.ui||(exports.ui={}));exports.utils=void 0;(a=>{class p{constructor(l={}){e(this,"filename");e(this,"contents");typeof l=="string"&&(l=JSON.parse(l)),this.filename=l.filename,this.contents=l.contents}static createFrom(l={}){return new p(l)}}a.GetLanguageInput=p})(exports.utils||(exports.utils={}));
|