@omniviewdev/runtime 0.2.2 → 0.2.3
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-RGYOEzh2.js → Client-D4njqvNH.js} +227 -223
- package/dist/Client-DHqavZ6d.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 +3 -3
- package/dist/wailsjs/go/models.d.ts +7 -7
- package/dist/wailsjs/go/resource/Client.d.ts +2 -0
- package/package.json +1 -1
- package/dist/Client-BRYjLBXY.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function Y(e,n){return window.go.settings.Client.GetSetting(e,n)}function Z(){return window.go.settings.Client.ListPlugins()}function ee(e){return window.go.settings.Client.ListSettings(e)}function u(e){return window.go.settings.Client.PluginValues(e)}function ne(e,n,t){return window.go.settings.Client.SetSetting(e,n,t)}function te(e,n){return window.go.settings.Client.SetSettings(e,n)}function oe(){return window.go.settings.Client.Values()}const ie=Object.freeze(Object.defineProperty({__proto__:null,GetSetting:Y,ListPlugins:Z,ListSettings:ee,PluginValues:u,SetSetting:ne,SetSettings:te,Values:oe},Symbol.toStringTag,{value:"Module"}));function re(e){return window.go.plugin.pluginManager.GetPlugin(e)}function ue(e){return window.go.plugin.pluginManager.GetPluginDownloadStats(e)}function s(e){return window.go.plugin.pluginManager.GetPluginMeta(e)}function se(e){return window.go.plugin.pluginManager.GetPluginReadme(e)}function ge(e){return window.go.plugin.pluginManager.GetPluginReleaseHistory(e)}function le(e,n){return window.go.plugin.pluginManager.GetPluginReviews(e,n)}function ce(e){return window.go.plugin.pluginManager.GetPluginVersions(e)}function we(e){return window.go.plugin.pluginManager.HandlePluginCrash(e)}function ae(e){return window.go.plugin.pluginManager.Initialize(e)}function de(){return window.go.plugin.pluginManager.InstallFromPathPrompt()}function Ce(){return window.go.plugin.pluginManager.InstallInDevMode()}function Se(e){return window.go.plugin.pluginManager.InstallPluginFromPath(e)}function fe(e,n){return window.go.plugin.pluginManager.InstallPluginVersion(e,n)}function pe(){return window.go.plugin.pluginManager.ListAvailablePlugins()}function Ge(){return window.go.plugin.pluginManager.ListPluginMetas()}function Pe(){return window.go.plugin.pluginManager.ListPlugins()}function Re(e,n){return window.go.plugin.pluginManager.LoadPlugin(e,n)}function ve(e){return window.go.plugin.pluginManager.ReloadPlugin(e)}function be(e){return window.go.plugin.pluginManager.Run(e)}function me(e,n,t){return window.go.plugin.pluginManager.SearchPlugins(e,n,t)}function Me(e){return window.go.plugin.pluginManager.SetDevServerChecker(e)}function Le(e){return window.go.plugin.pluginManager.SetDevServerManager(e)}function he(e){return window.go.plugin.pluginManager.SetPluginLogManager(e)}function Fe(){return window.go.plugin.pluginManager.Shutdown()}function ye(e){return window.go.plugin.pluginManager.UninstallPlugin(e)}function _e(e){return window.go.plugin.pluginManager.UnloadPlugin(e)}const Ae=Object.freeze(Object.defineProperty({__proto__:null,GetPlugin:re,GetPluginDownloadStats:ue,GetPluginMeta:s,GetPluginReadme:se,GetPluginReleaseHistory:ge,GetPluginReviews:le,GetPluginVersions:ce,HandlePluginCrash:we,Initialize:ae,InstallFromPathPrompt:de,InstallInDevMode:Ce,InstallPluginFromPath:Se,InstallPluginVersion:fe,ListAvailablePlugins:pe,ListPluginMetas:Ge,ListPlugins:Pe,LoadPlugin:Re,ReloadPlugin:ve,Run:be,SearchPlugins:me,SetDevServerChecker:Me,SetDevServerManager:Le,SetPluginLogManager:he,Shutdown:Fe,UninstallPlugin:ye,UnloadPlugin:_e},Symbol.toStringTag,{value:"Module"}));function $e(e){return window.go.settings.provider.GetBool(e)}function Ie(){return window.go.settings.provider.GetCategories()}function Te(e){return window.go.settings.provider.GetCategory(e)}function Oe(e){return window.go.settings.provider.GetCategoryValues(e)}function We(e){return window.go.settings.provider.GetFloat(e)}function je(e){return window.go.settings.provider.GetFloatSlice(e)}function Ue(e){return window.go.settings.provider.GetInt(e)}function Ve(e){return window.go.settings.provider.GetIntSlice(e)}function xe(e){return window.go.settings.provider.GetSetting(e)}function ze(e){return window.go.settings.provider.GetSettingValue(e)}function He(e){return window.go.settings.provider.GetString(e)}function De(e){return window.go.settings.provider.GetStringSlice(e)}function ke(e){return window.go.settings.provider.HasSetting(e)}function Ee(e,n){return window.go.settings.provider.Initialize(e,n)}function Qe(){return window.go.settings.provider.ListSettings()}function Ne(){return window.go.settings.provider.LoadSettings()}function Be(e,n){return window.go.settings.provider.RegisterSetting(e,n)}function qe(e,n){return window.go.settings.provider.RegisterSettings(e,n)}function Je(e){return window.go.settings.provider.ResetSetting(e)}function Ke(){return window.go.settings.provider.SaveSettings()}function Xe(e,n){return window.go.settings.provider.SetSetting(e,n)}function Ye(e){return window.go.settings.provider.SetSettings(e)}function g(){return window.go.settings.provider.Values()}const Ze=Object.freeze(Object.defineProperty({__proto__:null,GetBool:$e,GetCategories:Ie,GetCategory:Te,GetCategoryValues:Oe,GetFloat:We,GetFloatSlice:je,GetInt:Ue,GetIntSlice:Ve,GetSetting:xe,GetSettingValue:ze,GetString:He,GetStringSlice:De,HasSetting:ke,Initialize:Ee,ListSettings:Qe,LoadSettings:Ne,RegisterSetting:Be,RegisterSettings:qe,ResetSetting:Je,SaveSettings:Ke,SetSetting:Xe,SetSettings:Ye,Values:g},Symbol.toStringTag,{value:"Module"}));function en(e,n){return window.go.resource.Client.AddConnection(e,n)}function nn(e,n){return window.go.resource.Client.CheckConnection(e,n)}function l(e,n,t,o){return window.go.resource.Client.Create(e,n,t,o)}function c(e,n,t,o){return window.go.resource.Client.Delete(e,n,t,o)}function tn(e,n,t){return window.go.resource.Client.EnsureResourceWatch(e,n,t)}function w(e,n,t,o,i){return window.go.resource.Client.ExecuteAction(e,n,t,o,i)}function on(e,n,t,o){return window.go.resource.Client.Find(e,n,t,o)}function a(e,n,t,o){return window.go.resource.Client.Get(e,n,t,o)}function d(e,n,t){return window.go.resource.Client.GetActions(e,n,t)}function C(){return window.go.resource.Client.GetAllConnectionStates()}function S(e,n){return window.go.resource.Client.GetConnection(e,n)}function f(e,n){return window.go.resource.Client.GetConnectionNamespaces(e,n)}function p(e,n){return window.go.resource.Client.GetEditorSchemas(e,n)}function rn(e,n,t){return window.go.resource.Client.GetFilterFields(e,n,t)}function un(e,n,t,o){return window.go.resource.Client.GetHealth(e,n,t,o)}function sn(e,n){return window.go.resource.Client.GetRelationships(e,n)}function gn(e,n){return window.go.resource.Client.GetResourceCapabilities(e,n)}function ln(e,n){return window.go.resource.Client.GetResourceDefinition(e,n)}function cn(e,n,t,o,i,r){return window.go.resource.Client.GetResourceEvents(e,n,t,o,i,r)}function wn(e,n){return window.go.resource.Client.GetResourceGroup(e,n)}function G(e,n){return window.go.resource.Client.GetResourceGroups(e,n)}function an(e,n,t){return window.go.resource.Client.GetResourceSchema(e,n,t)}function P(e,n){return window.go.resource.Client.GetResourceType(e,n)}function R(e,n){return window.go.resource.Client.GetResourceTypes(e,n)}function v(e,n){return window.go.resource.Client.GetWatchState(e,n)}function dn(e,n){return window.go.resource.Client.HasResourceType(e,n)}function Cn(e,n,t){return window.go.resource.Client.IsResourceWatchRunning(e,n,t)}function b(e,n,t,o){return window.go.resource.Client.List(e,n,t,o)}function m(){return window.go.resource.Client.ListAllConnections()}function M(e){return window.go.resource.Client.ListConnections(e)}function Sn(){return window.go.resource.Client.ListPlugins()}function fn(e){return window.go.resource.Client.LoadConnections(e)}function L(e,n){return window.go.resource.Client.RemoveConnection(e,n)}function pn(e,n,t,o,i){return window.go.resource.Client.ResolveRelationships(e,n,t,o,i)}function Gn(e,n,t){return window.go.resource.Client.RestartResourceWatch(e,n,t)}function h(e,n){return window.go.resource.Client.StartConnection(e,n)}function F(e,n){return window.go.resource.Client.StartConnectionWatch(e,n)}function y(e,n){return window.go.resource.Client.StopConnection(e,n)}function _(e,n){return window.go.resource.Client.StopConnectionWatch(e,n)}function Pn(e,n,t){return window.go.resource.Client.StopResourceWatch(e,n,t)}function A(e,n,t,o,i){return window.go.resource.Client.StreamAction(e,n,t,o,i)}function $(e,n,t){return window.go.resource.Client.SubscribeResource(e,n,t)}function I(e,n,t){return window.go.resource.Client.UnsubscribeResource(e,n,t)}function T(e,n,t,o){return window.go.resource.Client.Update(e,n,t,o)}function O(e,n){return window.go.resource.Client.UpdateConnection(e,n)}const Rn=Object.freeze(Object.defineProperty({__proto__:null,AddConnection:en,CheckConnection:nn,Create:l,Delete:c,EnsureResourceWatch:tn,ExecuteAction:w,Find:on,Get:a,GetActions:d,GetAllConnectionStates:C,GetConnection:S,GetConnectionNamespaces:f,GetEditorSchemas:p,GetFilterFields:rn,GetHealth:un,GetRelationships:sn,GetResourceCapabilities:gn,GetResourceDefinition:ln,GetResourceEvents:cn,GetResourceGroup:wn,GetResourceGroups:G,GetResourceSchema:an,GetResourceType:P,GetResourceTypes:R,GetWatchState:v,HasResourceType:dn,IsResourceWatchRunning:Cn,List:b,ListAllConnections:m,ListConnections:M,ListPlugins:Sn,LoadConnections:fn,RemoveConnection:L,ResolveRelationships:pn,RestartResourceWatch:Gn,StartConnection:h,StartConnectionWatch:F,StopConnection:y,StopConnectionWatch:_,StopResourceWatch:Pn,StreamAction:A,SubscribeResource:$,UnsubscribeResource:I,Update:T,UpdateConnection:O},Symbol.toStringTag,{value:"Module"}));function vn(e){return window.go.exec.Client.AttachSession(e)}function bn(e){return window.go.exec.Client.CloseSession(e)}function W(e,n,t){return window.go.exec.Client.CreateSession(e,n,t)}function mn(e){return window.go.exec.Client.CreateTerminal(e)}function Mn(e){return window.go.exec.Client.DetachSession(e)}function Ln(e,n){return window.go.exec.Client.GetHandler(e,n)}function hn(){return window.go.exec.Client.GetHandlers()}function Fn(e){return window.go.exec.Client.GetPluginHandlers(e)}function yn(e){return window.go.exec.Client.GetSession(e)}function _n(){return window.go.exec.Client.ListPlugins()}function An(){return window.go.exec.Client.ListSessions()}function $n(e,n,t){return window.go.exec.Client.ResizeSession(e,n,t)}function In(e,n){return window.go.exec.Client.WriteSession(e,n)}const Tn=Object.freeze(Object.defineProperty({__proto__:null,AttachSession:vn,CloseSession:bn,CreateSession:W,CreateTerminal:mn,DetachSession:Mn,GetHandler:Ln,GetHandlers:hn,GetPluginHandlers:Fn,GetSession:yn,ListPlugins:_n,ListSessions:An,ResizeSession:$n,WriteSession:In},Symbol.toStringTag,{value:"Module"}));function j(e){return window.go.logs.Client.CloseSession(e)}function U(e,n,t){return window.go.logs.Client.CreateSession(e,n,t)}function On(e){return window.go.logs.Client.GetSession(e)}function Wn(e){return window.go.logs.Client.GetSupportedResources(e)}function jn(){return window.go.logs.Client.ListSessions()}function Un(e){return window.go.logs.Client.PauseSession(e)}function Vn(e){return window.go.logs.Client.ResumeSession(e)}function xn(e,n){return window.go.logs.Client.UpdateSessionOptions(e,n)}const zn=Object.freeze(Object.defineProperty({__proto__:null,CloseSession:j,CreateSession:U,GetSession:On,GetSupportedResources:Wn,ListSessions:jn,PauseSession:Un,ResumeSession:Vn,UpdateSessionOptions:xn},Symbol.toStringTag,{value:"Module"}));function V(){return window.go.metric.Client.GetProviders()}function x(e){return window.go.metric.Client.GetProvidersForResource(e)}function Hn(e,n,t){return window.go.metric.Client.Query(e,n,t)}function z(e,n,t,o,i,r,q,J,K,X){return window.go.metric.Client.QueryAll(e,n,t,o,i,r,q,J,K,X)}function H(e,n,t){return window.go.metric.Client.Subscribe(e,n,t)}function D(e){return window.go.metric.Client.Unsubscribe(e)}const Dn=Object.freeze(Object.defineProperty({__proto__:null,GetProviders:V,GetProvidersForResource:x,Query:Hn,QueryAll:z,Subscribe:H,Unsubscribe:D},Symbol.toStringTag,{value:"Module"}));function k(e){return window.go.networker.Client.ClosePortForwardSession(e)}function E(e,n,t){return window.go.networker.Client.FindPortForwardSessions(e,n,t)}function kn(e){return window.go.networker.Client.GetPortForwardSession(e)}function En(e){return window.go.networker.Client.GetSupportedPortForwardTargets(e)}function Q(){return window.go.networker.Client.ListAllPortForwardSessions()}function Qn(e,n){return window.go.networker.Client.ListPortForwardSessions(e,n)}function N(e,n,t){return window.go.networker.Client.StartResourcePortForwardingSession(e,n,t)}const Nn=Object.freeze(Object.defineProperty({__proto__:null,ClosePortForwardSession:k,FindPortForwardSessions:E,GetPortForwardSession:kn,GetSupportedPortForwardTargets:En,ListAllPortForwardSessions:Q,ListPortForwardSessions:Qn,StartResourcePortForwardingSession:N},Symbol.toStringTag,{value:"Module"}));function Bn(e){return window.go.ui.Client.GetPluginComponents(e)}function B(e){return window.go.ui.Client.GetResourceAreaComponent(e)}function qn(e){return window.go.ui.Client.GetResourceComponents(e)}const Jn=Object.freeze(Object.defineProperty({__proto__:null,GetPluginComponents:Bn,GetResourceAreaComponent:B,GetResourceComponents:qn},Symbol.toStringTag,{value:"Module"}));exports.Client=Tn;exports.Client$1=Nn;exports.Client$2=Rn;exports.Client$3=ie;exports.Client$4=Jn;exports.Client$5=zn;exports.Client$6=Dn;exports.ClosePortForwardSession=k;exports.CloseSession=j;exports.Create=l;exports.CreateSession=W;exports.CreateSession$1=U;exports.Delete=c;exports.ExecuteAction=w;exports.FindPortForwardSessions=E;exports.Get=a;exports.GetActions=d;exports.GetAllConnectionStates=C;exports.GetConnection=S;exports.GetConnectionNamespaces=f;exports.GetEditorSchemas=p;exports.GetPluginMeta=s;exports.GetProviders=V;exports.GetProvidersForResource=x;exports.GetResourceAreaComponent=B;exports.GetResourceGroups=G;exports.GetResourceType=P;exports.GetResourceTypes=R;exports.GetWatchState=v;exports.List=b;exports.ListAllConnections=m;exports.ListAllPortForwardSessions=Q;exports.ListConnections=M;exports.PluginValues=u;exports.QueryAll=z;exports.RemoveConnection=L;exports.StartConnection=h;exports.StartConnectionWatch=F;exports.StartResourcePortForwardingSession=N;exports.StopConnection=y;exports.StopConnectionWatch=_;exports.StreamAction=A;exports.Subscribe=H;exports.SubscribeResource=$;exports.Unsubscribe=D;exports.UnsubscribeResource=I;exports.Update=T;exports.UpdateConnection=O;exports.Values=g;exports.pluginManager=Ae;exports.provider=Ze;
|
package/dist/api.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./Client-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./Client-DHqavZ6d.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 g(e,n){return window.go.diagnostics.DiagnosticsClient.Debug(e,n)}function a(e,n){return window.go.diagnostics.DiagnosticsClient.Error(e,n)}function u(e,n){return window.go.diagnostics.DiagnosticsClient.Info(e,n)}function l(e,n,t){return window.go.diagnostics.DiagnosticsClient.Log(e,n,t)}function s(e){return window.go.diagnostics.DiagnosticsClient.ReadLog(e)}function v(e){return window.go.diagnostics.DiagnosticsClient.StartTail(e)}function c(e){return window.go.diagnostics.DiagnosticsClient.StopTail(e)}function d(e,n){return window.go.diagnostics.DiagnosticsClient.Warn(e,n)}const S=Object.freeze(Object.defineProperty({__proto__:null,Debug:g,Error:a,Info:u,Log:l,ReadLog:s,StartTail:v,StopTail:c,Warn:d},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 p(e){return window.go.devserver.DevServerManager.Initialize(e)}function M(e){return window.go.devserver.DevServerManager.IsManaged(e)}function C(){return window.go.devserver.DevServerManager.ListDevServerStates()}function b(e){return window.go.devserver.DevServerManager.RebuildPlugin(e)}function L(e){return window.go.devserver.DevServerManager.RestartDevServer(e)}function m(){return window.go.devserver.DevServerManager.Shutdown()}function O(e){return window.go.devserver.DevServerManager.StartDevServer(e)}function _(e,n){return window.go.devserver.DevServerManager.StartDevServerForPath(e,n)}function P(e){return window.go.devserver.DevServerManager.StopDevServer(e)}const y=Object.freeze(Object.defineProperty({__proto__:null,GetDevServerLogs:w,GetDevServerState:D,GetExternalPluginInfo:f,Initialize:p,IsManaged:M,ListDevServerStates:C,RebuildPlugin:b,RestartDevServer:L,Shutdown:m,StartDevServer:O,StartDevServerForPath:_,StopDevServer:P},Symbol.toStringTag,{value:"Module"}));function F(){return window.go.pluginlog.Manager.Close()}function G(e,n){return window.go.pluginlog.Manager.GetLogs(e,n)}function j(){return window.go.pluginlog.Manager.ListStreams()}function I(){return window.go.pluginlog.Manager.LogDir()}function T(e){return window.go.pluginlog.Manager.OnEmit(e)}function E(e,n){return window.go.pluginlog.Manager.SearchLogs(e,n)}function R(e){return window.go.pluginlog.Manager.Stream(e)}function $(e){return window.go.pluginlog.Manager.Subscribe(e)}function h(e){return window.go.pluginlog.Manager.Unsubscribe(e)}const z=Object.freeze(Object.defineProperty({__proto__:null,Close:F,GetLogs:G,ListStreams:j,LogDir:I,OnEmit:T,SearchLogs:E,Stream:R,Subscribe:$,Unsubscribe:h},Symbol.toStringTag,{value:"Module"}));function W(){return window.go.main.App.GetOperatingSystem()}function A(e){return window.go.main.App.OpenFileSelectionDialog(e)}function U(e){return window.go.main.App.SaveFileDialog(e)}function x(e,n){return window.go.main.App.WriteFileContent(e,n)}exports.ExecClient=r.Client;exports.LogsClient=r.Client$5;exports.MetricClient=r.Client$6;exports.NetworkerClient=r.Client$1;exports.PluginManager=r.pluginManager;exports.ResourceClient=r.Client$2;exports.SettingsClient=r.Client$3;exports.SettingsProvider=r.provider;exports.UIClient=r.Client$4;exports.DevServerManager=y;exports.DiagnosticsClient=S;exports.GetOperatingSystem=W;exports.OpenFileSelectionDialog=A;exports.PluginLogManager=z;exports.SaveFileDialog=U;exports.UtilsClient=o;exports.WriteFileContent=x;
|
package/dist/api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as q, f as B, g as H, a as J, p as K, b as Q, c as V, d as X, e as Y } from "./Client-
|
|
1
|
+
import { C as q, f as B, g as H, a as J, p as K, b as Q, c as V, d as X, e as Y } from "./Client-D4njqvNH.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 Tt=Object.defineProperty;var Nt=(e,t,n)=>t in e?Tt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var L=(e,t,n)=>Nt(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("react/jsx-runtime"),d=require("react"),Z=require("react-router-dom"),C=require("./Client-
|
|
1
|
+
"use strict";var Tt=Object.defineProperty;var Nt=(e,t,n)=>t in e?Tt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var L=(e,t,n)=>Nt(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("react/jsx-runtime"),d=require("react"),Z=require("react-router-dom"),C=require("./Client-DHqavZ6d.cjs"),x=require("./models.cjs"),_=require("@tanstack/react-query"),kt=require("@omniviewdev/ui/feedback"),O=require("./runtime.cjs"),ue=d.createContext(void 0),k={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",RESOURCE_CONNECTION_ERROR:"omniview:resource/connection-error",RESOURCE_CERTIFICATE_ERROR:"omniview:resource/certificate-error",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 Mt(e){switch(e){case"NOT_FOUND":return{typeUri:k.RESOURCE_NOT_FOUND,status:404};case"FORBIDDEN":return{typeUri:k.RESOURCE_FORBIDDEN,status:403};case"UNAUTHORIZED":return{typeUri:k.RESOURCE_UNAUTHORIZED,status:401};case"CONFLICT":case"ALREADY_EXISTS":return{typeUri:k.RESOURCE_CONFLICT,status:409};case"TIMEOUT":return{typeUri:k.RESOURCE_TIMEOUT,status:408};case"CONNECTION_ERROR":return{typeUri:k.RESOURCE_CONNECTION_ERROR,status:503};case"CERTIFICATE_ERROR":return{typeUri:k.RESOURCE_CERTIFICATE_ERROR,status:502};default:return{typeUri:k.INTERNAL,status:500}}}function $(e){if(e==null)return{type:k.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;if(typeof n.code=="string"&&typeof n.title=="string"&&typeof n.message=="string"){const{typeUri:r,status:s}=Mt(n.code);return{type:r,title:n.title,status:s,detail:n.message,suggestions:Array.isArray(n.suggestions)?n.suggestions:void 0}}}catch{}return{type:k.INTERNAL,title:"Error",status:500,detail:t}}function Fe(e){return e==null?!1:(typeof e=="string"?e:e instanceof Error?e.message:String(e))==="cancelled"?!0:$(e).type===k.CANCELLED}function et(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 tt(e,t){var s,o;const n=[e.detail,...((s=e.suggestions)==null?void 0:s.map(i=>`• ${i}`))??[]].join(`
|
|
2
2
|
`);return{message:t||(e.title!=="Error"?e.title:"Operation failed"),status:"error",details:n,actions:(o=e.actions)==null?void 0:o.map(et)}}function G(e,t,n){if(Fe(t))return;const r=$(t);e(tt(r,n))}function I(e,t){return n=>{if(Fe(n))return;const r=$(n);e(tt(r,r.title!=="Error"?r.title:t))}}function Lt(e){const{children:t,pluginId:n}=e,[r,s]=d.useState({}),[o,i]=d.useState(new x.config.PluginMeta),[a,u]=d.useState(!1),[l,c]=d.useState(null);console.debug("[PluginContextProvider] render",{pluginId:n,metaLoaded:a,metaError:!!l});const m=()=>{n===void 0||n===""||(console.debug(`[PluginContextProvider] fetching settings for "${n}"`),C.PluginValues(n).then(f=>{console.debug(`[PluginContextProvider] settings loaded for "${n}"`,Object.keys(f)),s(f)}).catch(f=>{const g=$(f);console.error(`[PluginContextProvider] error fetching settings for "${n}":`,g.detail)}))},p=()=>{if(n===void 0||n===""){console.debug("[PluginContextProvider] skipping meta fetch — empty pluginId");return}console.debug(`[PluginContextProvider] fetching meta for "${n}"`),c(null),C.GetPluginMeta(n).then(f=>{console.debug(`[PluginContextProvider] meta loaded for "${n}"`,{name:f==null?void 0:f.name,version:f==null?void 0:f.version}),i(f),u(!0)}).catch(f=>{const g=$(f);console.error(`[PluginContextProvider] error fetching meta for "${n}":`,g.detail),c(g.detail),u(!1)})};return d.useEffect(()=>{console.debug(`[PluginContextProvider] useEffect — pluginId changed to "${n}"`),m(),p()},[n]),l?R.jsx("div",{style:{display:"flex",flex:1,alignItems:"center",justifyContent:"center",padding:24},children:R.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:[R.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:12},children:[R.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"#EF4444",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[R.jsx("circle",{cx:"12",cy:"12",r:"10"}),R.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),R.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),R.jsx("span",{style:{fontSize:14,fontWeight:600,color:"#FECACA"},children:"Plugin failed to load"})]}),R.jsx("p",{style:{fontSize:13,color:"#A1A1AA",margin:"0 0 16px"},children:l}),R.jsx("button",{onClick:()=>p(),style:{background:"transparent",color:"#F87171",border:"1px solid #7F1D1D",borderRadius:6,padding:"6px 14px",fontSize:13,fontWeight:500,cursor:"pointer"},children:"Retry"})]})}):a?R.jsx(ue.Provider,{value:{pluginId:n,settings:r,meta:o},children:t}):R.jsxs("div",{style:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:[R.jsx("div",{style:{width:24,height:24,border:"2px solid #3F3F46",borderTopColor:"#A1A1AA",borderRadius:"50%",animation:"plugin-spin 0.8s linear infinite"}}),R.jsx("style",{children:"@keyframes plugin-spin { to { transform: rotate(360deg); } }"})]})}function le(){const e=d.useContext(ue);if(!e)throw new Error("usePluginContext must be used within a PluginContextProvider");return e}function $t(){return le().settings}const Ae=d.createContext(void 0),Ut=({children:e})=>{const[t,n]=d.useState({}),r=()=>{C.Values().then(o=>{console.log("Fetched settings:",o),n(o)}).catch(o=>{console.error("Error fetching settings:",o)})};d.useEffect(()=>{r()},[]);const s=()=>{r()};return R.jsx(Ae.Provider,{value:{settings:t,reload:s},children:e})},nt={height:32,focused:0,tabs:[],createTab:()=>{},createTabs:()=>{},updateTab:()=>{},focusTab:()=>{},reorderTab:()=>{},closeTab:()=>{},closeTabs:()=>{},resizeDrawer:()=>{},closeDrawer:()=>{},fullscreenDrawer:()=>{}},rt=d.createContext(nt),st=d.createContext(void 0),ot=d.createContext(void 0),Te=d.createContext(void 0),qt=3e4,jt=({children:e})=>{const[t,n]=d.useState([]),r=d.useCallback(a=>{n(u=>[a,...u])},[]),s=d.useCallback((a,u)=>{n(l=>l.map(c=>c.id===a?{...c,...u}:c))},[]),o=d.useCallback(a=>{n(u=>u.filter(l=>l.id!==a))},[]);d.useEffect(()=>{const a=[];for(const u of t)if(u.status==="completed"||u.status==="error"){const l=Date.now()-(u.completedAt??u.startedAt),c=Math.max(0,qt-l);a.push(setTimeout(()=>o(u.id),c))}return()=>a.forEach(clearTimeout)},[t,o]);const i=d.useMemo(()=>({operations:t,addOperation:r,updateOperation:s,removeOperation:o}),[t,r,s,o]);return R.jsx(Te.Provider,{value:i,children:e})};var we=function(e,t){return we=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])},we(e,t)};function Qt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");we(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var _e="Invariant Violation",Ge=Object.setPrototypeOf,Gt=Ge===void 0?function(e,t){return e.__proto__=t,e}:Ge,Kt=function(e){Qt(t,e);function t(n){n===void 0&&(n=_e);var r=e.call(this,typeof n=="number"?_e+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=_e,Gt(r,t.prototype),r}return t}(Error);function be(e,t){if(!e)throw new Kt(t)}var it=["debug","log","warn","error","silent"],zt=it.indexOf("log");function re(e){return function(){if(it.indexOf(e)>=zt){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 at=d.createContext(void 0),Ne=()=>d.useContext(at),Wt=e=>{const t=Ne();return t==null?void 0:t.getExtensionPoint(e)},Bt=e=>{const t=Ne(),n=t==null?void 0:t.getExtensionPoint(e);return n?n.provide({getCacheKey:()=>e}):[]},Ht=({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]),R.jsx(at.Provider,{value:n.current,children:d.Children.only(t)})},Ke=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 ct{constructor(t){L(this,"_settings");L(this,"_extensions",new Map);L(this,"_lookupCache",new Map);L(this,"_matchCache",new Map);L(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),o=this._matchCache.has(s);if(o&&this._matchCache.get(s)){n.push(r);continue}this._matcher(t,r)?(this._matchCache.set(s,!0),n.push(r)):o||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 o=this._extensions.get(this._settings.selected);return o?[o.component]:[]}const n=t.getCacheKey();let r=this._lookupCache.get(n);if(r){let o=r.map(i=>this._extensions.get(i)).filter(i=>!!i).map(i=>i.component);return this._settings.order&&(o=this.reorderComponents(o,r,this._settings.order)),o}r=this.calculateMatches(t).map(o=>o.id),this._lookupCache.set(n,r);let s=r.map(o=>this._extensions.get(o)).filter(o=>!!o).map(o=>o.component);return this._settings.order&&(s=this.reorderComponents(s,r,this._settings.order)),s}reorderComponents(t,n,r){const s=new Map(n.map((o,i)=>[o,t[i]]));return r.map(o=>s.get(o)).filter(o=>!!o)}reorder(t){const n=t.map(i=>this._extensions.get(i)).filter(i=>!!i),r=Array.from(this._extensions.values()).filter(i=>!t.includes(i.id)),s=[...n,...r];this._extensions.clear(),s.forEach(i=>this._extensions.set(i.id,i));const o=Array.from(this._lookupCache.keys());for(const i of o){const a=this._lookupCache.get(i);if(!a)continue;const u=a.filter(l=>t.includes(l));this._lookupCache.set(i,u)}}clearLookupCache(){this._lookupCache.clear()}clearMatchCache(){this._matchCache.clear()}clearAllCaches(){this.clearLookupCache(),this.clearMatchCache()}}class Yt{constructor({initialStores:t}){L(this,"store",{});t.forEach(n=>{this.addExtensionPoint(n)})}addExtensionPoint(t){let n=Ke(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 ct(t)}getExtensionPoint(t){return t=Ke(t),this.store[t]}listExtensionPointIds(){return Object.keys(this.store)}listExtensionPoints(){return Object.values(this.store).map(t=>t.settings())}}const ut=d.createContext(void 0),Jt={default:"info",info:"info",success:"success",warning:"warning",error:"error"},Vt=({children:e})=>{const{push:t}=kt.useNotificationStack(),[n,r]=d.useState([]),s=i=>{r(a=>[...a,i])},o=(i,a,u)=>{const l=typeof i=="object";let c="",m="info",p,f=5e3,g;if(l){if(c=i.message,i.showOnce){if(n.includes(c))return;s(c)}m=i.status,p=i.details,f=i.autoHideDuration??5e3,g=i.actions}else c=i,m=a,p=u;t({severity:Jt[m]??"info",title:c,message:p,timeout:f,actions:g})};return R.jsx(ut.Provider,{value:{showSnackbar:o},children:e})},M=()=>{const e=d.useContext(ut);if(e===void 0)throw new Error("useCustomSnackbar must be used within a CustomSnackbarProvider");return e};function D(e){const t=d.useContext(ue),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 Xt=({pluginID:e,connectionID:t})=>{const n=D(e),r=_.useQueryClient(),{showSnackbar:s}=M(),o=[n,"connection","detail",t],{mutateAsync:i}=_.useMutation({mutationFn:async()=>C.StartConnection(n,t),onSuccess(m){r.setQueryData(o,m),r.invalidateQueries({queryKey:["EDITOR_SCHEMAS",n,t]})},onError:I(s,"Failed to start connection")}),{mutateAsync:a}=_.useMutation({mutationFn:async()=>C.StopConnection(n,t),onSuccess(m){r.setQueryData(o,m)},onError:I(s,"Failed to stop connection")}),{mutateAsync:u}=_.useMutation({mutationFn:async m=>C.UpdateConnection(n,m),onSuccess(m,{name:p}){s({message:`Connection ${p} successfully updated`,status:"success"}),r.setQueryData(o,c),r.setQueriesData({queryKey:[n,"connection","list"]},f=>f==null?void 0:f.map(g=>g.id===t?m:g))},onError:I(s,"Failed to update connection")}),{mutateAsync:l}=_.useMutation({mutationFn:async()=>C.RemoveConnection(n,t),onSuccess(){s({message:"Connection successfully removed",status:"success"}),r.setQueryData(o,void 0),r.setQueriesData({queryKey:[n,"connection","list"]},m=>m==null?void 0:m.filter(p=>p.id!==t))},onError:I(s,"Failed to remove connection")}),c=_.useQuery({queryKey:o,queryFn:async()=>C.GetConnection(n,t)});return{connection:c,startConnection:i,stopConnection:a,updateConnection:u,deleteConnection:l}},lt=e=>[e,"connection","list"],Zt=({plugin:e})=>{const t=D(e),n=_.useQueryClient(),{showSnackbar:r}=M(),s=lt(t),{mutateAsync:o}=_.useMutation({mutationFn:async l=>C.StartConnectionWatch(t,l.id),onError:I(r,"Failed to start connection watch")}),{mutateAsync:i}=_.useMutation({mutationFn:async l=>C.StopConnectionWatch(t,l.id),onError:I(r,"Failed to stop connection watch")}),a=d.useCallback(l=>{console.log("got update to connections",l),n.setQueryData(s,l)},[]);return d.useEffect(()=>{const l=O.EventsOn(`${t}/connection/sync`,a);return()=>{l()}},[]),{connections:_.useQuery({queryKey:s,queryFn:async()=>{try{return await C.ListConnections(t)}catch(l){console.log(l),I(r,"Failed to load connections")(l)}return[]},staleTime:3e4,placeholderData:_.keepPreviousData}),startWatch:o,stopWatch:i}},en=({pluginID:e,connectionID:t})=>{const n=D(e),r=[n,"connection","namespaces",t];return{namespaces:_.useQuery({queryKey:r,queryFn:async()=>C.GetConnectionNamespaces(n,t)})}},b=x.resource.WatchState,tn=x.resource.SyncPolicy;function ve(e){const t=Object.values(e.states),n=t.length;let r=0,s=0,o=0,i=0;for(const c of t)c===b.SYNCED&&r++,(c===b.ERROR||c===b.FAILED)&&s++,c===b.FORBIDDEN&&o++,c===b.SKIPPED&&i++;const a=n-i,u=t.filter(c=>c===b.SYNCED||c===b.ERROR||c===b.STOPPED||c===b.FAILED||c===b.FORBIDDEN).length,l=a>0?u/a:0;return{pluginID:e.pluginID,connectionID:e.connectionID,totalResources:n,watchedTotal:a,syncedCount:r,errorCount:s,forbiddenCount:o,skippedCount:i,doneCount:u,progress:l}}function oe(e){return e.watchedTotal>0&&e.doneCount>=e.watchedTotal}function dt(e){return e.some(t=>!oe(t))}function ft(e){const t=e.reduce((r,s)=>r+s.watchedTotal,0);return t===0?0:e.reduce((r,s)=>r+s.doneCount,0)/t}function ke(e){return`${e.pluginId}/${e.connection}`}function pt(e,t){const n=ke(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,o]=d.useState(new Map),i=d.useRef(new Map);d.useEffect(()=>{C.GetAllConnectionStates().then(h=>{if(!h)return;const E={},y=new Set,w=new Map;for(const[S,v]of Object.entries(h)){E[S]=v.map(F=>F.connection);for(const F of v){if(!F.started)continue;const P=`${S}/${F.connection.id}`;y.add(P);const U={pluginID:S,connectionID:F.connection.id,states:{}};if(F.resources)for(const[me,X]of Object.entries(F.resources))U.states[me]=X;i.current.set(P,U),w.set(P,ve(U))}}r(E),t(y),o(w)}).catch(()=>{})},[]),d.useEffect(()=>O.EventsOn("connection/status",E=>{const y=`${E.pluginID}/${E.connectionID}`;E.status==="DISCONNECTED"?(t(w=>{const S=new Set(w);return S.delete(y),S}),o(w=>{const S=new Map(w);return S.delete(y),S}),i.current.delete(y)):t(w=>{const S=new Set(w);return S.add(y),S}),C.ListAllConnections().then(w=>{w&&r(w)}).catch(()=>{})}),[]);const a=d.useCallback(h=>{const E=ke(h);t(S=>{if(S.has(E))return S;const v=new Set(S);return v.add(E),v});const y=pt(i.current,h),w=ve(y);o(S=>{const v=new Map(S);return v.set(E,w),v})},[]);d.useEffect(()=>O.EventsOn("watch/STATE",a),[a]);const u=d.useCallback(async(h,E)=>{await C.StopConnection(h,E)},[]),l=d.useCallback(async(h,E)=>{await C.StartConnectionWatch(h,E)},[]),c=[];for(const h of e){const[E,y]=h.split("/",2),S=(n[E]??[]).find(U=>U.id===y),v=s.get(h),F=v!=null&&!oe(v),P=v!=null&&v.errorCount>0;c.push({pluginID:E,connectionID:y,name:(S==null?void 0:S.name)??y,avatar:(S==null?void 0:S.avatar)??"",isStarted:!0,sync:v,isSyncing:F,hasErrors:P})}const m=new Map;for(const h of c){const E=m.get(h.pluginID)??[];E.push(h),m.set(h.pluginID,E)}const p=Array.from(s.values()),f=c.filter(h=>h.isSyncing),g=c.filter(h=>h.hasErrors);return{entries:c,grouped:m,connectedCount:c.length,syncingCount:f.length,errorCount:g.length,hasSyncing:dt(p),aggregateProgress:ft(p),disconnect:u,retryWatch: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=_.useQueryClient(),o=[r,"data",t],i=_.useQuery({queryKey:o,queryFn:async()=>{const u=await rn(r,t);return u??n}}),a=_.useMutation({mutationFn:async u=>{await sn(r,t,u)},onMutate:async u=>{await s.cancelQueries({queryKey:o});const l=s.getQueryData(o);return s.setQueryData(o,u),{previous:l}},onError:(u,l,c)=>{(c==null?void 0:c.previous)!==void 0&&s.setQueryData(o,c.previous)},onSettled:()=>{s.invalidateQueries({queryKey:o})}});return{data:i.data??n,update:async u=>{await a.mutateAsync(u)},isLoading:i.isLoading}}const an=()=>{const e=d.useContext(st);if(!e)throw new Error("useRightDrawer must be used within a RightDrawerProvider");return e},Me=()=>{const e=d.useContext(rt);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}=M(),{createTab:r,updateTab:s}=Me();return{createSession:_.useMutation({mutationFn:async({connectionID:i,icon:a,label:u,opts:l})=>{const c=`pending-${crypto.randomUUID()}`;r({id:c,title:u??"Connecting...",variant:"terminal",icon:a??"LuSquareTerminal",properties:{status:"connecting",pluginID:t,connectionID:i,opts:{...l}}});const m=x.exec.SessionOptions.createFrom({command:["/bin/bash"],tty:!0,...l});try{const p=await C.CreateSession(t,i,m);s({id:c},{id:p.id,title:u??`Session ${p.id.substring(0,8)}`,properties:{status:"connected",pluginID:t,connectionID:i,opts:{...l}}})}catch(p){const f=$(p);s({id:c},{properties:{status:"error",error:f.detail,pluginID:t,connectionID:i,opts:{...l}}}),G(n,p,"Failed to start session")}}}).mutateAsync}},un=({pluginID:e})=>{const t=D(e),{showSnackbar:n}=M(),{createTab:r}=Me(),s=_.useMutation({mutationFn:async({connectionID:i,resourceKey:a,resourceID:u,resourceData:l,icon:c,label:m,target:p,follow:f=!0,tailLines:g=1e3,params:h})=>{const E=x.logs.CreateSessionOptions.createFrom({resource_key:a,resource_id:u,resource_data:l,options:x.logs.LogSessionOptions.createFrom({target:p??"",follow:f,include_previous:!1,include_timestamps:!0,tail_lines:g,since_seconds:0,limit_bytes:0,include_source_events:!0,params:h??{}})}),y=await C.CreateSession$1(t,i,E);return r({id:y.id,title:m??`Logs ${y.id.substring(0,8)}`,variant:"logs",icon:c??"LuLogs"}),y},onError:I(n,"Failed to start log session")}),o=_.useMutation({mutationFn:async i=>{await C.CloseSession(i)},onError:I(n,"Failed to close log session")});return{createLogSession:s.mutateAsync,closeLogSession:o.mutateAsync}},ln=()=>_.useQuery({queryKey:["metric","providers"],queryFn:C.GetProviders,staleTime:3e4}),yt=e=>_.useQuery({queryKey:["metric","providers",e],queryFn:()=>C.GetProvidersForResource(e),enabled:!!e,staleTime:3e4}),dn=e=>{var E,y;const{connectionID:t,resourceKey:n,resourceID:r,resourceNamespace:s="",resourceData:o={},metricIDs:i=[],shape:a=0,timeRange:u,refreshInterval:l=0,enabled:c=!0}=e,{data:m,isLoading:p}=yt(n),f=m??[],g=u?Math.max(Math.floor((u.end.getTime()-u.start.getTime())/250),15e3)*1e6:0,h=_.useQuery({queryKey:["metric","query",t,n,r,s,i,a,(E=u==null?void 0:u.start)==null?void 0:E.getTime(),(y=u==null?void 0:u.end)==null?void 0:y.getTime()],queryFn:()=>C.QueryAll(t,n,r,s,o,i,a,(u==null?void 0:u.start)??new Date(0),(u==null?void 0:u.end)??new Date(0),g),enabled:c&&!!t&&!!n&&(n.startsWith("cluster::")||!!r)&&f.length>0,refetchInterval:l>0?l:void 0,staleTime:5e3,placeholderData:_.keepPreviousData});return{data:h.data??void 0,providers:f,isLoading:p||h.isLoading,error:h.error,refetch:h.refetch}},fn=e=>{const{pluginID:t,connectionID:n,resourceKey:r,resourceID:s,resourceNamespace:o="",resourceData:i={},metricIDs:a=[],interval:u=1e4,enabled:l=!0}=e,c=D(t),[m,p]=d.useState(null),[f,g]=d.useState(null),[h,E]=d.useState(!1),[y,w]=d.useState(null),S=d.useRef(null),v=d.useCallback(async()=>{if(!(!l||!c||!n||!r||!s))try{const P=await C.Subscribe(c,n,{resource_key:r,resource_id:s,resource_namespace:o,resource_data:i,metric_ids:a,interval:u*1e6});g(P),E(!0),w(null);const U=O.EventsOn(`core/metrics/data/${P}`,X=>{try{const q=JSON.parse(X);q.results&&p(q.results)}catch(q){console.error("Failed to parse metric stream data:",q)}}),me=O.EventsOn(`core/metrics/error/${P}`,X=>{try{const q=JSON.parse(X);w(q.error||"Unknown error")}catch{w("Failed to parse metric stream error")}});S.current=()=>{U(),me()}}catch(P){w(P instanceof Error?P.message:String(P))}},[c,n,r,s,o,a,u,l]),F=d.useCallback(async()=>{if(f)try{await C.Unsubscribe(f)}catch(P){console.error("Failed to unsubscribe:",P)}S.current&&(S.current(),S.current=null),g(null),E(!1)},[f]);return d.useEffect(()=>()=>{f&&C.Unsubscribe(f).catch(console.error),S.current&&S.current()},[f]),{data:m,subscriptionID:f,isStreaming:h,error:y,start:v,stop:F}},Q=["networker","portforward","all-sessions"];function pn(){const{showSnackbar:e}=M(),t=_.useQueryClient(),n=_.useQuery({queryKey:[...Q],queryFn:async()=>C.ListAllPortForwardSessions().catch(o=>{if($(o).detail.includes("not found"))return[];throw o}),retry:!1});d.useEffect(()=>{const o=O.EventsOn("core/networker/portforward/created",()=>{t.invalidateQueries({queryKey:[...Q]})}),i=O.EventsOn("core/networker/portforward/closed",()=>{t.invalidateQueries({queryKey:[...Q]})});return()=>{o(),i()}},[t]);const r=n.data??[],s=_.useMutation({mutationFn:async o=>C.ClosePortForwardSession(o),onError:I(e,"Failed to close port forwarding session"),onSuccess:async()=>{await t.invalidateQueries({queryKey:[...Q]})}});return{sessions:n,activeSessions:r,closeSession:s.mutateAsync,openInBrowser:o=>O.BrowserOpenURL(`http://localhost:${o}`)}}function yn({pluginID:e,connectionID:t,resourceID:n}){const r=D(e),s=["networker","portforward","sessions",r,t,n],{showSnackbar:o}=M(),i=_.useQueryClient(),a=_.useQuery({queryKey:s,queryFn:async()=>C.FindPortForwardSessions(r,t,x.networker.FindPortForwardSessionRequest.createFrom({resource_id:n,connection_id:t})).catch(c=>{const m=$(c);return m.detail.includes("not found")?[]:(o({message:"Failed to fetch port forward sessions",status:"error",details:m.detail}),[])}),retry:!1}),u=_.useMutation({mutationFn:async({opts:c})=>{const m=x.networker.PortForwardSessionOptions.createFrom({local_port:c.localPort||0,remote_port:c.remotePort,protocol:c.protocol||"TCP",connection_type:"RESOURCE",connection:{resource_data:c.resource,connection_id:t,plugin_id:r,resource_id:c.resourceId,resource_key:c.resourceKey},labels:c.labels??{},params:c.parameters??{}}),p=await C.StartResourcePortForwardingSession(r,t,m);return c.openInBrowser&&O.BrowserOpenURL(`http://localhost:${p.local_port}`),p},onError:I(o,"Failed to start port forwarding session"),onSuccess:async()=>{await Promise.all([i.invalidateQueries({queryKey:s}),i.invalidateQueries({queryKey:[...Q]})])}}),l=_.useMutation({mutationFn:async({opts:c})=>C.ClosePortForwardSession(c.sessionID),onError:I(o,"Failed to close port forwarding session"),onSuccess:async()=>{await Promise.all([i.invalidateQueries({queryKey:s}),i.invalidateQueries({queryKey:[...Q]})])}});return{sessions:a,forward:u.mutateAsync,close:l.mutateAsync}}const hn=()=>{const e=d.useContext(ot);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=""})=>{const o=D(e),i=_.useQueryClient(),{showSnackbar:a}=M(),u=["RESOURCE",o,t,n,r,s],{mutateAsync:l}=_.useMutation({mutationFn:async p=>C.Update(o,t,n,x.resource.ClientUpdateInput.createFrom({input:p.input,id:r,namespace:s})),onSuccess:async()=>{a(`Resource ${r} updated`,"success"),await i.invalidateQueries({queryKey:u})},onError:I(a,`Failed to update resource ${r}`)}),{mutateAsync:c}=_.useMutation({mutationFn:async(p={})=>C.Delete(o,t,n,x.resource.DeleteInput.createFrom({id:r,namespace:s,gracePeriodSeconds:p.gracePeriodSeconds})),onSuccess:async()=>{a(`Resource ${r} deleted`,"success"),await i.invalidateQueries({queryKey:u})},onError:I(a,`Failed to delete resource ${r}`)});return{resource:_.useQuery({queryKey:u,queryFn:async()=>C.Get(o,t,n,x.resource.GetInput.createFrom({id:r,namespace:s})),retry:!1}),update:l,remove:c}},mn=e=>{const t=["component",e.plugin,e.resource,e.area];return{component:_.useQuery({queryKey:t,queryFn:async()=>C.GetResourceAreaComponent(e)})}},_n=({pluginID:e,connectionID:t})=>{const n=D(e),r=[n,"resource_groups","list"];return{groups:_.useQuery({queryKey:r,queryFn:async()=>C.GetResourceGroups(n,t),retry:!1})}},Cn=({pluginID:e,connectionID:t,searches:n})=>{const r=D(e),s=i=>[r,t,i.key,i.namespaces,"list"];return _.useQueries({queries:n.map(i=>({queryKey:s(i),queryFn:async()=>C.List(r,t,i.key,x.resource.ListInput.createFrom({order:[{field:"name",descending:!1}],pagination:{page:1,pageSize:200},namespaces:i.namespaces})).then(a=>(console.log(a.result),a.result&&i.postFilter?Object.values(a.result).filter(i.postFilter):Object.values(a.result||{}))),retry:!1}))})},En=({pluginID:e,resourceKey:t})=>{const n=D(e),r=[n,"resources",t];return{resourceType:_.useQuery({queryKey:r,queryFn:async()=>C.GetResourceType(n,t),retry:!1})}},Sn=({pluginID:e,connectionID:t})=>{const n=D(e),r=[n,"resources","list"];return{types:_.useQuery({queryKey:r,queryFn:async()=>C.GetResourceTypes(n,t),retry:!1})}};var ht=Symbol.for("immer-nothing"),ze=Symbol.for("immer-draftable"),T=Symbol.for("immer-state"),wn=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 A(e,...t){if(process.env.NODE_ENV!=="production"){const n=wn[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 K(e){var t;return e?gt(e)||Array.isArray(e)||!!e[ze]||!!((t=e.constructor)!=null&&t[ze])||fe(e)||pe(e):!1}var bn=Object.prototype.constructor.toString();function gt(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)===bn}function ie(e,t){de(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function de(e){const t=e[T];return t?t.type_:Array.isArray(e)?1:fe(e)?2:pe(e)?3:0}function Pe(e,t){return de(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function mt(e,t,n){const r=de(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function vn(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function fe(e){return e instanceof Map}function pe(e){return e instanceof Set}function j(e){return e.copy_||e.base_}function Re(e,t){if(fe(e))return new Map(e);if(pe(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=gt(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[T];let s=Reflect.ownKeys(r);for(let o=0;o<s.length;o++){const i=s[o],a=r[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}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 Le(e,t=!1){return ye(e)||J(e)||!K(e)||(de(e)>1&&(e.set=e.add=e.clear=e.delete=Pn),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Le(r,!0))),e}function Pn(){A(2)}function ye(e){return Object.isFrozen(e)}var Rn={};function z(e){const t=Rn[e];return t||A(0,e),t}var ee;function _t(){return ee}function Dn(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function We(e,t){t&&(z("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function De(e){Oe(e),e.drafts_.forEach(On),e.drafts_=null}function Oe(e){e===ee&&(ee=e.parent_)}function Be(e){return ee=Dn(ee,e)}function On(e){const t=e[T];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function He(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[T].modified_&&(De(t),A(4)),K(e)&&(e=ae(t,e),t.parent_||ce(t,e)),t.patches_&&z("Patches").generateReplacementPatches_(n[T].base_,e,t.patches_,t.inversePatches_)):e=ae(t,n,[]),De(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ht?e:void 0}function ae(e,t,n){if(ye(t))return t;const r=t[T];if(!r)return ie(t,(s,o)=>Ye(e,r,t,s,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return ce(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const s=r.copy_;let o=s,i=!1;r.type_===3&&(o=new Set(s),s.clear(),i=!0),ie(o,(a,u)=>Ye(e,r,s,a,u,n,i)),ce(e,s,!1),n&&e.patches_&&z("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Ye(e,t,n,r,s,o,i){if(process.env.NODE_ENV!=="production"&&s===n&&A(5),J(s)){const a=o&&t&&t.type_!==3&&!Pe(t.assigned_,r)?o.concat(r):void 0,u=ae(e,s,a);if(mt(n,r,u),J(u))e.canAutoFreeze_=!1;else return}else i&&n.add(s);if(K(s)&&!ye(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ae(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&ce(e,s)}}function ce(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Le(t,n)}function xn(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:_t(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,o=$e;n&&(s=[r],o=te);const{revoke:i,proxy:a}=Proxy.revocable(s,o);return r.draft_=a,r.revoke_=i,a}var $e={get(e,t){if(t===T)return e;const n=j(e);if(!Pe(n,t))return In(e,n,t);const r=n[t];return e.finalized_||!K(r)?r:r===Ce(e.base_,t)?(Ee(e),e.copy_[t]=Ie(r,e)):r},has(e,t){return t in j(e)},ownKeys(e){return Reflect.ownKeys(j(e))},set(e,t,n){const r=Ct(j(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=Ce(j(e),t),o=s==null?void 0:s[T];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(vn(n,s)&&(n!==void 0||Pe(e.base_,t)))return!0;Ee(e),xe(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 Ce(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Ee(e),xe(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=j(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){A(11)},getPrototypeOf(e){return Y(e.base_)},setPrototypeOf(){A(12)}},te={};ie($e,(e,t)=>{te[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});te.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&A(13),te.set.call(this,e,t,void 0)};te.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&A(14),$e.set.call(this,e[0],t,n,e[0])};function Ce(e,t){const n=e[T];return(n?j(n):e)[t]}function In(e,t,n){var s;const r=Ct(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function Ct(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 xe(e){e.modified_||(e.modified_=!0,e.parent_&&xe(e.parent_))}function Ee(e){e.copy_||(e.copy_=Re(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Fn=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const i=this;return function(u=o,...l){return i.produce(u,c=>n.call(this,c,...l))}}typeof n!="function"&&A(6),r!==void 0&&typeof r!="function"&&A(7);let s;if(K(t)){const o=Be(this),i=Ie(t,void 0);let a=!0;try{s=n(i),a=!1}finally{a?De(o):Oe(o)}return We(o,r),He(s,o)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===ht&&(s=void 0),this.autoFreeze_&&Le(s,!0),r){const o=[],i=[];z("Patches").generateReplacementPatches_(t,s,o,i),r(o,i)}return s}else A(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(i,...a)=>this.produceWithPatches(i,u=>t(u,...a));let r,s;return[this.produce(t,n,(i,a)=>{r=i,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){K(e)||A(8),J(e)&&(e=An(e));const t=Be(this),n=Ie(e,void 0);return n[T].isManual_=!0,Oe(t),n}finishDraft(e,t){const n=e&&e[T];(!n||!n.isManual_)&&A(9);const{scope_:r}=n;return We(r,t),He(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=z("Patches").applyPatches_;return J(e)?r(e,t):this.produce(e,s=>r(s,t))}};function Ie(e,t){const n=fe(e)?z("MapSet").proxyMap_(e,t):pe(e)?z("MapSet").proxySet_(e,t):xn(e,t);return(t?t.scope_:_t()).drafts_.push(n),n}function An(e){return J(e)||A(10,e),Et(e)}function Et(e){if(!K(e)||ye(e))return e;const t=e[T];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Re(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Re(e,!0);return ie(n,(r,s)=>{mt(n,r,Et(s))}),t&&(t.finalized_=!1),n}var N=new Fn,St=N.produce;N.produceWithPatches.bind(N);N.setAutoFreeze.bind(N);N.setUseStrictShallowCopy.bind(N);N.applyPatches.bind(N);N.createDraft.bind(N);N.finishDraft.bind(N);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 Nn="Expected a function",wt="__lodash_hash_undefined__",kn="[object Function]",Mn="[object GeneratorFunction]",Ln="[object Symbol]",$n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Un=/^\w*$/,qn=/^\./,jn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Qn=/[\\^$.*+?()[\]{}|]/g,Gn=/\\(\\)?/g,Kn=/^\[object .+?Constructor\]$/,zn=typeof se=="object"&&se&&se.Object===Object&&se,Wn=typeof self=="object"&&self&&self.Object===Object&&self,Ue=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,bt=Object.prototype,Se=Ue["__core-js_shared__"],Je=function(){var e=/[^.]+$/.exec(Se&&Se.keys&&Se.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),vt=Jn.toString,qe=bt.hasOwnProperty,Pt=bt.toString,Vn=RegExp("^"+vt.call(qe).replace(Qn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ve=Ue.Symbol,Xn=Yn.splice,Zn=Rt(Ue,"Map"),ne=Rt(Object,"create"),Xe=Ve?Ve.prototype:void 0,Ze=Xe?Xe.toString:void 0;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 er(){this.__data__=ne?ne(null):{}}function tr(e){return this.has(e)&&delete this.__data__[e]}function nr(e){var t=this.__data__;if(ne){var n=t[e];return n===wt?void 0:n}return qe.call(t,e)?t[e]:void 0}function rr(e){var t=this.__data__;return ne?t[e]!==void 0:qe.call(t,e)}function sr(e,t){var n=this.__data__;return n[e]=ne&&t===void 0?wt:t,this}W.prototype.clear=er;W.prototype.delete=tr;W.prototype.get=nr;W.prototype.has=rr;W.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=he(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=he(t,e);return n<0?void 0:t[n][1]}function cr(e){return he(this.__data__,e)>-1}function ur(e,t){var n=this.__data__,r=he(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 B(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 W,map:new(Zn||V),string:new W}}function dr(e){return ge(this,e).delete(e)}function fr(e){return ge(this,e).get(e)}function pr(e){return ge(this,e).has(e)}function yr(e,t){return ge(this,e).set(e,t),this}B.prototype.clear=lr;B.prototype.delete=dr;B.prototype.get=fr;B.prototype.has=pr;B.prototype.set=yr;function he(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[br(t[n++])];return n&&n==r?e:void 0}function gr(e){if(!Ot(e)||Sr(e))return!1;var t=Rr(e)||Hn(e)?Vn:Kn;return t.test(vr(e))}function mr(e){if(typeof e=="string")return e;if(Qe(e))return Ze?Ze.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function _r(e){return Dt(e)?e:wr(e)}function ge(e,t){var n=e.__data__;return Er(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Rt(e,t){var n=Bn(e,t);return gr(n)?n:void 0}function Cr(e,t){if(Dt(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Qe(e)?!0:Un.test(e)||!$n.test(e)||t!=null&&e in Object(t)}function Er(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Sr(e){return!!Je&&Je in e}var wr=je(function(e){e=Or(e);var t=[];return qn.test(e)&&t.push(""),e.replace(jn,function(n,r,s,o){t.push(s?o.replace(Gn,"$1"):r||n)}),t});function br(e){if(typeof e=="string"||Qe(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function vr(e){if(e!=null){try{return vt.call(e)}catch{}try{return e+""}catch{}}return""}function je(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(Nn);var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],o=n.cache;if(o.has(s))return o.get(s);var i=e.apply(this,r);return n.cache=o.set(s,i),i};return n.cache=new(je.Cache||B),n}je.Cache=B;function Pr(e,t){return e===t||e!==e&&t!==t}var Dt=Array.isArray;function Rr(e){var t=Ot(e)?Pt.call(e):"";return t==kn||t==Mn}function Ot(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Dr(e){return!!e&&typeof e=="object"}function Qe(e){return typeof e=="symbol"||Dr(e)&&Pt.call(e)==Ln}function Or(e){return e==null?"":mr(e)}function xr(e,t,n){var r=e==null?void 0:hr(e,t);return r===void 0?n:r}var Ir=xr;const H=Tn(Ir);function xt(e,t,n){return St(e??{result:[],success:!0,totalCount:0},s=>{for(const o of t)switch(o.type){case"ADD":{s.result.findIndex(a=>H(o.payload.data,n)===H(a,n))===-1&&s.result.push(o.payload.data);break}case"UPDATE":{const i=s.result.findIndex(a=>H(o.payload.data,n)===H(a,n));i!==-1&&(s.result[i]=o.payload.data);break}case"DELETE":{const i=s.result.findIndex(a=>H(o.payload.data,n)===H(a,n));i!==-1&&s.result.splice(i,1);break}}})}function It(e,t,n,r,s,o){const i=(o==null?void 0:o.syncWindowMs)??500,a=d.useRef([]),u=d.useRef(null),l=d.useRef(null),c=d.useRef(s);c.current=s;const m=d.useCallback(()=>{const f=a.current;if(a.current=[],u.current=null,l.current=null,!(f.length===0||!r)){e.setQueryData(t,g=>xt(g,f,r));for(const g of f)(g.type==="ADD"||g.type==="UPDATE")&&e.setQueryData(n(g.payload.id,g.payload.namespace),{result:g.payload.data})}},[e,t,n,r]),p=d.useCallback(f=>{a.current.push(f),!(u.current!==null||l.current!==null)&&(c.current===1?u.current=setTimeout(m,i):l.current=requestAnimationFrame(m))},[m,i]);return d.useEffect(()=>()=>{u.current!==null&&(clearTimeout(u.current),u.current=null),l.current!==null&&(cancelAnimationFrame(l.current),l.current=null)},[]),p}const Fr=({pluginID:e,connectionID:t,resourceKey:n,idAccessor:r,namespaces:s})=>{const o=D(e),i=_.useQueryClient(),{showSnackbar:a}=M(),u=d.useMemo(()=>s??[],[s]),l=d.useMemo(()=>[o,t,n,u,"list"],[o,t,n,u]),c=d.useCallback((E,y)=>[o,t,n,y,E],[o,t,n]),{mutateAsync:m}=_.useMutation({mutationFn:async E=>C.Create(o,t,n,x.resource.ClientCreateInput.createFrom({input:E.input,namespace:E.namespace??(u.length===1?u[0]:"")})),onSuccess:async E=>{var v;const y=E.result;let w="";(v=y==null?void 0:y.metadata)!=null&&v.name?w=y.metadata.name:y!=null&&y.id?w=y.id:y!=null&&y.name?w=y.name:y!=null&&y.ID?w=y.ID:y!=null&&y.Name&&(w=y.Name);const S=w?`Resource ${w} created`:"Resource created";a(S,"success"),await i.invalidateQueries({queryKey:l})},onError:I(a,"Failed to create resource")}),p=_.useQuery({queryKey:l,queryFn:async()=>C.List(o,t,n,x.resource.ListInput.createFrom({order:[{field:"name",descending:!1}],pagination:{page:1,pageSize:200},namespaces:u})),placeholderData:(E,y)=>E,retry:!1}),[f,g]=d.useState(b.IDLE);d.useEffect(()=>O.EventsOn(`${o}/${t}/watch/STATE`,y=>{y.resourceKey===n&&g(y.state)}),[o,t,n]);const h=It(i,l,c,r,f);return d.useEffect(()=>{if(!r)return;C.SubscribeResource(o,t,n);const E=O.EventsOn(`${o}/${t}/${n}/ADD`,S=>h({type:"ADD",payload:S})),y=O.EventsOn(`${o}/${t}/${n}/UPDATE`,S=>h({type:"UPDATE",payload:S})),w=O.EventsOn(`${o}/${t}/${n}/DELETE`,S=>h({type:"DELETE",payload:S}));return()=>{E(),y(),w(),C.UnsubscribeResource(o,t,n)}},[o,t,n,h]),{resources:p,create:m,watchState:f,isSyncing:f===b.SYNCING,isSynced:f===b.SYNCED,watchError:f===b.ERROR}},Ar=({pluginID:e})=>{const t=D(e),{showSnackbar:n}=M(),r=_.useMutation({mutationFn:async({opts:i,input:a})=>C.Create(t,i.connectionID,i.resourceKey,x.resource.ClientCreateInput.createFrom({input:a.input,namespace:a.namespace??i.namespace??""})),onSuccess:(i,{opts:a})=>{n(`Resource ${a.resourceID} created`,"success")},onError(i,{opts:a}){G(n,i,`Failed to create resource ${a.resourceID}`)}}),s=_.useMutation({mutationFn:async({opts:i,input:a})=>C.Update(t,i.connectionID,i.resourceKey,x.resource.ClientUpdateInput.createFrom({input:a.input,id:i.resourceID,namespace:i.namespace??""})),onSuccess:(i,{opts:a})=>{n(`Resource ${a.resourceID} updated`,"success")},onError(i,{opts:a}){G(n,i,`Failed to update resource ${a.resourceID}`)}}),o=_.useMutation({mutationFn:async({opts:i,input:a})=>C.Delete(t,i.connectionID,i.resourceKey,x.resource.DeleteInput.createFrom({id:i.resourceID,namespace:i.namespace??"",gracePeriodSeconds:a.gracePeriodSeconds})),onSuccess:(i,{opts:a})=>{n(`Resource ${a.resourceID} deleted`,"success")},onError(i,{opts:a}){G(n,i,`Failed to delete resource ${a.resourceID}`)}});return{create:r.mutateAsync,update:s.mutateAsync,remove:o.mutateAsync}},Tr=({pluginID:e,connectionID:t,resourceKey:n,enabled:r=!0})=>{const s=D(e),o=_.useQuery({queryKey:["RESOURCE_ACTIONS",s,t,n],queryFn:()=>C.GetActions(s,t,n),enabled:r&&!!s&&!!t&&!!n,staleTime:5*60*1e3});return{actions:o.data??[],isLoading:o.isLoading,error:o.error}},Nr=({pluginID:e,connectionID:t,resourceKey:n})=>{const r=D(e),s=_.useQueryClient(),{showSnackbar:o}=M(),i=_.useMutation({mutationFn:async({actionID:a,id:u="",namespace:l="",params:c={}})=>C.ExecuteAction(r,t,n,a,x.resource.ActionInput.createFrom({id:u,namespace:l,params:c})),onSuccess:a=>{a.message&&o(a.message,"success"),s.invalidateQueries({queryKey:["RESOURCES",r,t,n]})},onError:(a,u)=>{G(o,a,`Failed to execute action "${u.actionID}"`)}});return{executeAction:i.mutateAsync,isExecuting:i.isPending,error:i.error}},kr=({pluginID:e,connectionID:t,enabled:n=!0})=>{const r=D(e),s=_.useQuery({queryKey:["EDITOR_SCHEMAS",r,t],queryFn:()=>C.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}},Mr=({pluginID:e,connectionID:t,enabled:n=!0})=>{const r=D(e),s=_.useQueryClient(),o=[r,t,"watch-state"],i=d.useRef([]),a=d.useRef(!1),u=d.useCallback(p=>{s.setQueryData(o,f=>f&&St(f,g=>{g.resources[p.resourceKey]=p.state,g.resourceCounts[p.resourceKey]=p.resourceCount;let h=0,E=0;for(const y of Object.values(g.resources))y===b.SYNCED&&h++,(y===b.ERROR||y===b.FAILED)&&E++;g.syncedCount=h,g.errorCount=E}))},[s,r,t]),l=_.useQuery({queryKey:o,queryFn:async()=>{const p=await C.GetWatchState(r,t),f={};let g=0,h=0;for(const[y,w]of Object.entries(p.resources??{}))f[y]=w,w===b.SYNCED&&g++,w===b.ERROR&&h++;const E={};for(const[y,w]of Object.entries(p.resourceCounts??{}))E[y]=w;return{connection:p.connectionId,resources:f,resourceCounts:E,totalResources:Object.keys(f).length,syncedCount:g,errorCount:h}},enabled:n&&!!r&&!!t,refetchInterval:p=>{const f=p.state.data;if(!f||f.totalResources===0)return 3e3;let g=0;for(const h of Object.values(f.resources))(h===b.SYNCED||h===b.ERROR||h===b.STOPPED||h===b.FAILED||h===b.FORBIDDEN||h===b.SKIPPED)&&g++;return g>=f.totalResources?!1:3e3}});d.useEffect(()=>{if(!l.data||a.current)return;a.current=!0;const p=i.current;i.current=[];for(const f of p)u(f)},[l.data,u]),d.useEffect(()=>{if(!n||!r||!t)return;a.current=!1,i.current=[];const p=O.EventsOn(`${r}/${t}/watch/STATE`,f=>{a.current?u(f):i.current.push(f)});return()=>{p(),a.current=!1,i.current=[]}},[r,t,n,u]);const c=l.data;let m=0;if(c!=null&&c.resources)for(const p of Object.values(c.resources))(p===b.SYNCED||p===b.ERROR||p===b.STOPPED||p===b.FAILED||p===b.FORBIDDEN||p===b.SKIPPED)&&m++;return{summary:l,getResourceState:p=>c==null?void 0:c.resources[p],isFullySynced:c?c.totalResources>0&&m===c.totalResources:!1,syncProgress:c&&c.totalResources>0?m/c.totalResources:0,errorCount:(c==null?void 0:c.errorCount)??0}},Lr=()=>{const[e,t]=d.useState(new Map),n=d.useRef(new Map),r=d.useRef(new Map),s=d.useCallback(l=>{const c=ke(l),m=pt(n.current,l),p=ve(m);if(t(f=>{const g=new Map(f);return g.set(c,p),g}),r.current.has(c)&&(clearTimeout(r.current.get(c)),r.current.delete(c)),oe(p)){const f=setTimeout(()=>{t(g=>{const h=new Map(g);return h.delete(c),h}),n.current.delete(c),r.current.delete(c)},5e3);r.current.set(c,f)}},[]);d.useEffect(()=>{const l=O.EventsOn("watch/STATE",s);return()=>{l();for(const c of r.current.values())clearTimeout(c)}},[s]);const o=Array.from(e.values()),i=dt(o),a=o.find(l=>!oe(l))??o[0]??null,u=ft(o);return{syncs:o,hasSyncing:i,primarySync:a,aggregateProgress:u}},Ft=()=>{const e=d.useContext(Te);if(!e)throw new Error("useOperations must be used within an OperationsProvider");return e},$r=({pluginID:e,connectionID:t,resourceKey:n})=>{const r=D(e),{showSnackbar:s}=M(),{addOperation:o,updateOperation:i}=Ft(),a=d.useRef([]);return d.useEffect(()=>()=>{a.current.forEach(l=>l())},[]),{startStreamAction:d.useCallback(async({actionID:l,id:c,namespace:m,label:p,params:f={}})=>{try{const g=await C.StreamAction(r,t,n,l,x.resource.ActionInput.createFrom({id:c,namespace:m,params:f}));o({id:g,label:p,resourceKey:n,resourceName:c,namespace:m,connectionID:t,status:"running",startedAt:Date.now()});const h=`action/stream/${g}`,E=O.EventsOn(h,y=>{var w,S,v,F;switch(y.type){case"progress":{const P=y.data??{};i(g,{message:P.message,progress:P.ready!==void 0&&P.desired!==void 0?{ready:P.ready,desired:P.desired}:void 0});break}case"complete":i(g,{status:"completed",message:((w=y.data)==null?void 0:w.message)??"Completed",completedAt:Date.now()}),s(((S=y.data)==null?void 0:S.message)??p+" completed","success"),O.EventsOff(h);break;case"error":i(g,{status:"error",message:((v=y.data)==null?void 0:v.message)??"Failed",completedAt:Date.now()}),s(((F=y.data)==null?void 0:F.message)??p+" failed","error"),O.EventsOff(h);break}});return a.current.push(()=>{E(),O.EventsOff(h)}),g}catch(g){throw G(s,g,`Failed to start "${l}"`),g}},[r,t,n,o,i,s])}},Ur=()=>{const e=d.useContext(Ae);if(!e)throw new Error("useSettings must be used within a SettingsProvider");return e},qr=({to:e,withinContext:t,...n})=>{const{pluginId:r}=le();r||console.error("Link used outside of a plugin context");const s=`/_plugin/${r}${e.startsWith("/")?"":"/"}${e}`;return d.useMemo(()=>R.jsx(Z.Link,{style:{textDecoration:"none",color:"inherit"},...n,to:s}),[n,s])};function jr(){const e=Z.useNavigate(),t=Z.useLocation(),{pluginId:n}=le();n||console.error("usePluginRouter used outside of a plugin context");const r=`/_plugin/${n}`,s=t.pathname.startsWith(r)?t.pathname.slice(r.length)||"/":t.pathname,o=d.useCallback((i,a)=>{const{...u}=a??{};i.startsWith("/")?e(`${r}${i}`,u):e(i,u)},[e,r]);return d.useMemo(()=>({location:t,navigate:o,pluginPath:s}),[t,o,s])}class Qr{}class Gr{constructor(){L(this,"_extensions");L(this,"root");L(this,"pages");L(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 R.jsx(this.root,{});const t=Z.createMemoryRouter(this._routes||[]);return R.jsx(Z.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 At=(e=>(e.MISSING_MANIFEST="MISSING_MANIFEST",e.MISSING_PLUGIN="MISSING_PLUGIN",e.MISSING_ENTRYPOINT="MISSING_ENTRYPOINT",e))(At||{});const Kr=e=>{const t=e.split("::");return t.length===1?{group:"core",version:"",kind:t[0]}:{group:t[0]||"core",version:t[1]||"",kind:t[2]||t[0]}},zr=e=>!e||e==="core"?"Core":e.charAt(0).toUpperCase()+e.slice(1);exports.ALL_SESSIONS_KEY=Q;exports.BottomDrawerContext=rt;exports.ConfirmationModalContext=ot;exports.ErrorTypes=k;exports.ExtensionPointRegistry=Yt;exports.ExtensionPointStore=ct;exports.ExtensionProvider=Ht;exports.Link=qr;exports.OperationsContext=Te;exports.OperationsProvider=jt;exports.PluginContext=ue;exports.PluginContextProvider=Lt;exports.PluginErrorCode=At;exports.PluginWindow=Gr;exports.PluginWindowRootProps=Qr;exports.RightDrawerContext=st;exports.SettingsContext=Ae;exports.SettingsProvider=Ut;exports.SnackbarProvider=Vt;exports.SyncPolicy=tn;exports.WatchState=b;exports.actionToSnackbar=et;exports.applyBatch=xt;exports.connectionListQueryKey=lt;exports.createErrorHandler=I;exports.defaultState=nt;exports.formatGroup=zr;exports.isCancelledError=Fe;exports.parseAppError=$;exports.parseResourceKey=Kr;exports.showAppError=G;exports.useActiveSyncs=Lr;exports.useBottomDrawer=Me;exports.useConfirmationModal=hn;exports.useConnection=Xt;exports.useConnectionNamespaces=en;exports.useConnectionStatus=nn;exports.useConnections=Zt;exports.useEditorSchemas=kr;exports.useEventBatcher=It;exports.useExec=cn;exports.useExecuteAction=Nr;exports.useExtensionPoint=Wt;exports.useExtensionPointComponents=Bt;exports.useExtensionRegistry=Ne;exports.useLogs=un;exports.useMetricProviders=ln;exports.useMetricProvidersForResource=yt;exports.useMetricStream=fn;exports.useOperations=Ft;exports.usePluginContext=le;exports.usePluginData=on;exports.usePluginRouter=jr;exports.usePluginSettings=$t;exports.usePortForwardSessions=pn;exports.useResolvedPluginId=D;exports.useResource=gn;exports.useResourceActions=Tr;exports.useResourceAreaComponent=mn;exports.useResourceGroups=_n;exports.useResourceMetrics=dn;exports.useResourceMutations=Ar;exports.useResourcePortForwarder=yn;exports.useResourceSearch=Cn;exports.useResourceType=En;exports.useResourceTypes=Sn;exports.useResources=Fr;exports.useRightDrawer=an;exports.useSettings=Ur;exports.useSnackbar=M;exports.useStreamAction=$r;exports.useWatchState=Mr;
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var k = (e, t, n) => Gt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
|
4
4
|
import { jsx as R, jsxs as ce } from "react/jsx-runtime";
|
|
5
5
|
import S, { useContext as ne, createContext as he, useState as q, useRef as $, useEffect as j, useCallback as U, useMemo as Kt } from "react";
|
|
6
6
|
import { Link as zt, useNavigate as Qt, useLocation as Wt, createMemoryRouter as Bt, RouterProvider as Ht } from "react-router-dom";
|
|
7
|
-
import { P as Yt, G as Jt, V as Vt, S as Xt, h as it, U as Zt, R as en, i as tn, j as at, k as nn, L as rn, l as sn, m as on, n as an, o as cn, q as un, r as ln, s as dn, t as fn, Q as pn, u as yn, v as We, w as hn, x as ct, F as gn, y as mn, z as ut, D as lt, A as _n, B as En, E as Sn, H as dt, I as Cn, J as wn, K as ft, M as bn, N as vn, O as Dn, T as Pn, W as Rn, X as In, Y as Fn } from "./Client-
|
|
7
|
+
import { P as Yt, G as Jt, V as Vt, S as Xt, h as it, U as Zt, R as en, i as tn, j as at, k as nn, L as rn, l as sn, m as on, n as an, o as cn, q as un, r as ln, s as dn, t as fn, Q as pn, u as yn, v as We, w as hn, x as ct, F as gn, y as mn, z as ut, D as lt, A as _n, B as En, E as Sn, H as dt, I as Cn, J as wn, K as ft, M as bn, N as vn, O as Dn, T as Pn, W as Rn, X as In, Y as Fn } from "./Client-D4njqvNH.js";
|
|
8
8
|
import { config as On, resource as A, exec as xn, logs as Be, networker as He } from "./models.js";
|
|
9
9
|
import { useQueryClient as G, useMutation as v, useQuery as P, keepPreviousData as pt, useQueries as An } from "@tanstack/react-query";
|
|
10
10
|
import { useNotificationStack as Tn } from "@omniviewdev/ui/feedback";
|
package/dist/models.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var G=Object.defineProperty;var K=(a,h,d)=>h in a?G(a,h,{enumerable:!0,configurable:!0,writable:!0,value:d}):a[h]=d;var e=(a,h,d)=>K(a,typeof h!="symbol"?h+"":h,d);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.config=void 0;(a=>{class h{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 h(s)}}a.PluginAuthor=h;class d{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 d(s)}}a.PluginResourceComponent=d;class p{constructor(s={}){e(this,"resource");typeof s=="string"&&(s=JSON.parse(s)),this.resource=this.convertValues(s.resource,d)}static createFrom(s={}){return new p(s)}convertValues(s,g,f=!1){if(!s)return s;if(s.slice&&s.map)return s.map(O=>this.convertValues(O,g));if(typeof s=="object"){if(f){for(const O of Object.keys(s))s[O]=new g(s[O]);return s}return new g(s)}return s}}a.PluginComponents=p;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 m{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 m(s)}}a.PluginThemeColors=m;class n{constructor(s={}){e(this,"colors");typeof s=="string"&&(s=JSON.parse(s)),this.colors=this.convertValues(s.colors,m)}static createFrom(s={}){return new n(s)}convertValues(s,g,f=!1){if(!s)return s;if(s.slice&&s.map)return s.map(O=>this.convertValues(O,g));if(typeof s=="object"){if(f){for(const O of Object.keys(s))s[O]=new g(s[O]);return s}return new g(s)}return s}}a.PluginTheme=n;class l{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,h),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,n),this.components=this.convertValues(s.components,p),this.schema_version=s.schema_version,this.sdk_protocol_version=s.sdk_protocol_version}static createFrom(s={}){return new l(s)}convertValues(s,g,f=!1){if(!s)return s;if(s.slice&&s.map)return s.map(O=>this.convertValues(O,g));if(typeof s=="object"){if(f){for(const O of Object.keys(s))s[O]=new g(s[O]);return s}return new g(s)}return s}}a.PluginMeta=l})(exports.config||(exports.config={}));exports.devserver=void 0;(a=>{class h{constructor(n={}){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 n=="string"&&(n=JSON.parse(n)),this.pid=n.pid,this.protocol=n.protocol,this.protocolVersion=n.protocolVersion,this.addr=n.addr,this.vitePort=n.vitePort,this.pluginId=n.pluginId,this.version=n.version,this.startedAt=n.startedAt}static createFrom(n={}){return new h(n)}}a.DevInfoFile=h;class d{static createFrom(n={}){return new d(n)}constructor(n={}){typeof n=="string"&&(n=JSON.parse(n))}}a.DevServerManager=d;class p{constructor(n={}){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 n=="string"&&(n=JSON.parse(n)),this.pluginID=n.pluginID,this.mode=n.mode,this.devPath=n.devPath,this.vitePort=n.vitePort,this.viteURL=n.viteURL,this.viteStatus=n.viteStatus,this.goStatus=n.goStatus,this.lastBuildDuration=n.lastBuildDuration,this.lastBuildTime=n.lastBuildTime,this.lastError=n.lastError,this.grpcConnected=n.grpcConnected}static createFrom(n={}){return new p(n)}}a.DevServerState=p;class o{constructor(n={}){e(this,"timestamp");e(this,"source");e(this,"level");e(this,"message");e(this,"pluginID");typeof n=="string"&&(n=JSON.parse(n)),this.timestamp=n.timestamp,this.source=n.source,this.level=n.level,this.message=n.message,this.pluginID=n.pluginID}static createFrom(n={}){return new o(n)}}a.LogEntry=o})(exports.devserver||(exports.devserver={}));exports.exec=void 0;(a=>{class h{constructor(i={}){e(this,"label");e(this,"label_selector");e(this,"paths");e(this,"selectors");typeof i=="string"&&(i=JSON.parse(i)),this.label=i.label,this.label_selector=i.label_selector,this.paths=i.paths,this.selectors=i.selectors}static createFrom(i={}){return new h(i)}}a.ActionTargetBuilder=h;class d{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 d(i)}convertValues(i,s,g=!1){if(!i)return i;if(i.slice&&i.map)return i.map(f=>this.convertValues(f,s));if(typeof i=="object"){if(g){for(const f of Object.keys(i))i[f]=new s(i[f]);return i}return new s(i)}return i}}a.Session=d;class p{constructor(i={}){e(this,"session");e(this,"buffer");typeof i=="string"&&(i=JSON.parse(i)),this.session=this.convertValues(i.session,d),this.buffer=i.buffer}static createFrom(i={}){return new p(i)}convertValues(i,s,g=!1){if(!i)return i;if(i.slice&&i.map)return i.map(f=>this.convertValues(f,s));if(typeof i=="object"){if(g){for(const f of Object.keys(i))i[f]=new s(i[f]);return i}return new s(i)}return i}}a.AttachSessionResult=p;class o{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 o(i)}}a.CreateTerminalOptions=o;class m{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,h),this.default_command=i.default_command}static createFrom(i={}){return new m(i)}convertValues(i,s,g=!1){if(!i)return i;if(i.slice&&i.map)return i.map(f=>this.convertValues(f,s));if(typeof i=="object"){if(g){for(const f of Object.keys(i))i[f]=new s(i[f]);return i}return new s(i)}return i}}a.Handler=m;class n{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 n(i)}}a.SessionOptions=n})(exports.exec||(exports.exec={}));exports.logs=void 0;(a=>{class h{constructor(i={}){e(this,"label");e(this,"label_selector");e(this,"paths");e(this,"selectors");typeof i=="string"&&(i=JSON.parse(i)),this.label=i.label,this.label_selector=i.label_selector,this.paths=i.paths,this.selectors=i.selectors}static createFrom(i={}){return new h(i)}}a.ActionTargetBuilder=h;class d{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 d(i)}convertValues(i,s,g=!1){if(!i)return i;if(i.slice&&i.map)return i.map(f=>this.convertValues(f,s));if(typeof i=="object"){if(g){for(const f of Object.keys(i))i[f]=new s(i[f]);return i}return new s(i)}return i}}a.LogSessionOptions=d;class p{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,d)}static createFrom(i={}){return new p(i)}convertValues(i,s,g=!1){if(!i)return i;if(i.slice&&i.map)return i.map(f=>this.convertValues(f,s));if(typeof i=="object"){if(g){for(const f of Object.keys(i))i[f]=new s(i[f]);return i}return new s(i)}return i}}a.CreateSessionOptions=p;class o{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,h)}static createFrom(i={}){return new o(i)}convertValues(i,s,g=!1){if(!i)return i;if(i.slice&&i.map)return i.map(f=>this.convertValues(f,s));if(typeof i=="object"){if(g){for(const f of Object.keys(i))i[f]=new s(i[f]);return i}return new s(i)}return i}}a.Handler=o;class m{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 m(i)}}a.LogSource=m;class n{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,d),this.status=i.status,this.active_sources=this.convertValues(i.active_sources,m),this.created_at=this.convertValues(i.created_at,exports.time.Time)}static createFrom(i={}){return new n(i)}convertValues(i,s,g=!1){if(!i)return i;if(i.slice&&i.map)return i.map(f=>this.convertValues(f,s));if(typeof i=="object"){if(g){for(const f of Object.keys(i))i[f]=new s(i[f]);return i}return new s(i)}return i}}a.LogSession=n})(exports.logs||(exports.logs={}));exports.main=void 0;(a=>{class h{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 h(o)}}a.FileFilter=h;class d{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,h),this.showHiddenFiles=o.showHiddenFiles,this.canCreateDirectories=o.canCreateDirectories,this.resolvesAliases=o.resolvesAliases,this.treatPackagesAsDirectories=o.treatPackagesAsDirectories}static createFrom(o={}){return new d(o)}convertValues(o,m,n=!1){if(!o)return o;if(o.slice&&o.map)return o.map(l=>this.convertValues(l,m));if(typeof o=="object"){if(n){for(const l of Object.keys(o))o[l]=new m(o[l]);return o}return new m(o)}return o}}a.FileDialogOptions=d})(exports.main||(exports.main={}));exports.metric=void 0;(a=>{class h{constructor(r={}){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 r=="string"&&(r=JSON.parse(r)),this.metric_id=r.metric_id,this.min=r.min,this.max=r.max,this.avg=r.avg,this.sum=r.sum,this.p50=r.p50,this.p90=r.p90,this.p99=r.p99,this.count=r.count,this.window=r.window,this.labels=r.labels}static createFrom(r={}){return new h(r)}}a.AggregateValue=h;class d{constructor(r={}){e(this,"min");e(this,"max");e(this,"color");typeof r=="string"&&(r=JSON.parse(r)),this.min=r.min,this.max=r.max,this.color=r.color}static createFrom(r={}){return new d(r)}}a.ColorRange=d;class p{constructor(r={}){e(this,"metric_id");e(this,"value");e(this,"timestamp");e(this,"labels");typeof r=="string"&&(r=JSON.parse(r)),this.metric_id=r.metric_id,this.value=r.value,this.timestamp=this.convertValues(r.timestamp,exports.time.Time),this.labels=r.labels}static createFrom(r={}){return new p(r)}convertValues(r,v,V=!1){if(!r)return r;if(r.slice&&r.map)return r.map(u=>this.convertValues(u,v));if(typeof r=="object"){if(V){for(const u of Object.keys(r))r[u]=new v(r[u]);return r}return new v(r)}return r}}a.CurrentValue=p;class o{constructor(r={}){e(this,"timestamp");e(this,"value");e(this,"labels");typeof r=="string"&&(r=JSON.parse(r)),this.timestamp=this.convertValues(r.timestamp,exports.time.Time),this.value=r.value,this.labels=r.labels}static createFrom(r={}){return new o(r)}convertValues(r,v,V=!1){if(!r)return r;if(r.slice&&r.map)return r.map(u=>this.convertValues(u,v));if(typeof r=="object"){if(V){for(const u of Object.keys(r))r[u]=new v(r[u]);return r}return new v(r)}return r}}a.DataPoint=o;class m{constructor(r={}){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 r=="string"&&(r=JSON.parse(r)),this.id=r.id,this.name=r.name,this.unit=r.unit,this.icon=r.icon,this.color_ranges=this.convertValues(r.color_ranges,d),this.format_string=r.format_string,this.supported_shapes=r.supported_shapes,this.chart_group=r.chart_group}static createFrom(r={}){return new m(r)}convertValues(r,v,V=!1){if(!r)return r;if(r.slice&&r.map)return r.map(u=>this.convertValues(u,v));if(typeof r=="object"){if(V){for(const u of Object.keys(r))r[u]=new v(r[u]);return r}return new v(r)}return r}}a.MetricDescriptor=m;class n{constructor(r={}){e(this,"resource");e(this,"metrics");typeof r=="string"&&(r=JSON.parse(r)),this.resource=r.resource,this.metrics=this.convertValues(r.metrics,m)}static createFrom(r={}){return new n(r)}convertValues(r,v,V=!1){if(!r)return r;if(r.slice&&r.map)return r.map(u=>this.convertValues(u,v));if(typeof r=="object"){if(V){for(const u of Object.keys(r))r[u]=new v(r[u]);return r}return new v(r)}return r}}a.Handler=n;class l{constructor(r={}){e(this,"plugin_id");e(this,"provider_id");e(this,"name");e(this,"icon");e(this,"description");e(this,"handlers");typeof r=="string"&&(r=JSON.parse(r)),this.plugin_id=r.plugin_id,this.provider_id=r.provider_id,this.name=r.name,this.icon=r.icon,this.description=r.description,this.handlers=this.convertValues(r.handlers,n)}static createFrom(r={}){return new l(r)}convertValues(r,v,V=!1){if(!r)return r;if(r.slice&&r.map)return r.map(u=>this.convertValues(u,v));if(typeof r=="object"){if(V){for(const u of Object.keys(r))r[u]=new v(r[u]);return r}return new v(r)}return r}}a.MetricProviderSummary=l;class i{constructor(r={}){e(this,"metric_id");e(this,"data_points");e(this,"labels");typeof r=="string"&&(r=JSON.parse(r)),this.metric_id=r.metric_id,this.data_points=this.convertValues(r.data_points,o),this.labels=r.labels}static createFrom(r={}){return new i(r)}convertValues(r,v,V=!1){if(!r)return r;if(r.slice&&r.map)return r.map(u=>this.convertValues(u,v));if(typeof r=="object"){if(V){for(const u of Object.keys(r))r[u]=new v(r[u]);return r}return new v(r)}return r}}a.TimeSeries=i;class s{constructor(r={}){e(this,"time_series");e(this,"current_value");e(this,"aggregate_value");typeof r=="string"&&(r=JSON.parse(r)),this.time_series=this.convertValues(r.time_series,i),this.current_value=this.convertValues(r.current_value,p),this.aggregate_value=this.convertValues(r.aggregate_value,h)}static createFrom(r={}){return new s(r)}convertValues(r,v,V=!1){if(!r)return r;if(r.slice&&r.map)return r.map(u=>this.convertValues(u,v));if(typeof r=="object"){if(V){for(const u of Object.keys(r))r[u]=new v(r[u]);return r}return new v(r)}return r}}a.MetricResult=s;class g{constructor(r={}){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 r=="string"&&(r=JSON.parse(r)),this.resource_key=r.resource_key,this.resource_id=r.resource_id,this.resource_namespace=r.resource_namespace,this.resource_data=r.resource_data,this.metric_ids=r.metric_ids,this.shape=r.shape,this.start_time=this.convertValues(r.start_time,exports.time.Time),this.end_time=this.convertValues(r.end_time,exports.time.Time),this.step=r.step,this.params=r.params}static createFrom(r={}){return new g(r)}convertValues(r,v,V=!1){if(!r)return r;if(r.slice&&r.map)return r.map(u=>this.convertValues(u,v));if(typeof r=="object"){if(V){for(const u of Object.keys(r))r[u]=new v(r[u]);return r}return new v(r)}return r}}a.QueryRequest=g;class f{constructor(r={}){e(this,"success");e(this,"results");e(this,"error");typeof r=="string"&&(r=JSON.parse(r)),this.success=r.success,this.results=this.convertValues(r.results,s),this.error=r.error}static createFrom(r={}){return new f(r)}convertValues(r,v,V=!1){if(!r)return r;if(r.slice&&r.map)return r.map(u=>this.convertValues(u,v));if(typeof r=="object"){if(V){for(const u of Object.keys(r))r[u]=new v(r[u]);return r}return new v(r)}return r}}a.QueryResponse=f;class O{constructor(r={}){e(this,"resource_key");e(this,"resource_id");e(this,"resource_namespace");e(this,"resource_data");e(this,"metric_ids");e(this,"interval");typeof r=="string"&&(r=JSON.parse(r)),this.resource_key=r.resource_key,this.resource_id=r.resource_id,this.resource_namespace=r.resource_namespace,this.resource_data=r.resource_data,this.metric_ids=r.metric_ids,this.interval=r.interval}static createFrom(r={}){return new O(r)}}a.SubscribeRequest=O})(exports.metric||(exports.metric={}));exports.networker=void 0;(a=>{class h{constructor(n={}){e(this,"resource_id");e(this,"connection_id");typeof n=="string"&&(n=JSON.parse(n)),this.resource_id=n.resource_id,this.connection_id=n.connection_id}static createFrom(n={}){return new h(n)}}a.FindPortForwardSessionRequest=h;class d{constructor(n={}){e(this,"algorithm");e(this,"key");e(this,"enabled");typeof n=="string"&&(n=JSON.parse(n)),this.algorithm=n.algorithm,this.key=n.key,this.enabled=n.enabled}static createFrom(n={}){return new d(n)}}a.PortForwardSessionEncryption=d;class p{constructor(n={}){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 n=="string"&&(n=JSON.parse(n)),this.created_at=this.convertValues(n.created_at,exports.time.Time),this.updated_at=this.convertValues(n.updated_at,exports.time.Time),this.connection=n.connection,this.labels=n.labels,this.id=n.id,this.protocol=n.protocol,this.state=n.state,this.connection_type=n.connection_type,this.encryption=this.convertValues(n.encryption,d),this.local_port=n.local_port,this.remote_port=n.remote_port}static createFrom(n={}){return new p(n)}convertValues(n,l,i=!1){if(!n)return n;if(n.slice&&n.map)return n.map(s=>this.convertValues(s,l));if(typeof n=="object"){if(i){for(const s of Object.keys(n))n[s]=new l(n[s]);return n}return new l(n)}return n}}a.PortForwardSession=p;class o{constructor(n={}){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 n=="string"&&(n=JSON.parse(n)),this.connection=n.connection,this.labels=n.labels,this.params=n.params,this.protocol=n.protocol,this.connection_type=n.connection_type,this.encryption=this.convertValues(n.encryption,d),this.local_port=n.local_port,this.remote_port=n.remote_port}static createFrom(n={}){return new o(n)}convertValues(n,l,i=!1){if(!n)return n;if(n.slice&&n.map)return n.map(s=>this.convertValues(s,l));if(typeof n=="object"){if(i){for(const s of Object.keys(n))n[s]=new l(n[s]);return n}return new l(n)}return n}}a.PortForwardSessionOptions=o})(exports.networker||(exports.networker={}));exports.plugin=void 0;(a=>{class h{constructor(p={}){e(this,"DevMode");e(this,"DevModePath");e(this,"ExistingState");typeof p=="string"&&(p=JSON.parse(p)),this.DevMode=p.DevMode,this.DevModePath=p.DevModePath,this.ExistingState=this.convertValues(p.ExistingState,exports.types.PluginStateRecord)}static createFrom(p={}){return new h(p)}convertValues(p,o,m=!1){if(!p)return p;if(p.slice&&p.map)return p.map(n=>this.convertValues(n,o));if(typeof p=="object"){if(m){for(const n of Object.keys(p))p[n]=new o(p[n]);return p}return new o(p)}return p}}a.LoadPluginOptions=h})(exports.plugin||(exports.plugin={}));exports.pluginlog=void 0;(a=>{class h{constructor(m={}){e(this,"timestamp");e(this,"pluginID");e(this,"source");e(this,"level");e(this,"message");typeof m=="string"&&(m=JSON.parse(m)),this.timestamp=m.timestamp,this.pluginID=m.pluginID,this.source=m.source,this.level=m.level,this.message=m.message}static createFrom(m={}){return new h(m)}}a.LogEntry=h;class d{static createFrom(m={}){return new d(m)}constructor(m={}){typeof m=="string"&&(m=JSON.parse(m))}}a.Manager=d;class p{static createFrom(m={}){return new p(m)}constructor(m={}){typeof m=="string"&&(m=JSON.parse(m))}}a.PluginLogStream=p})(exports.pluginlog||(exports.pluginlog={}));exports.registry=void 0;(a=>{class h{constructor(l={}){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,"publisher_name");e(this,"installed");e(this,"installed_version");e(this,"latest_version");e(this,"update_available");typeof l=="string"&&(l=JSON.parse(l)),this.id=l.id,this.name=l.name,this.description=l.description,this.icon_url=l.icon_url,this.category=l.category,this.tags=l.tags,this.license=l.license,this.official=l.official,this.featured=l.featured,this.download_count=l.download_count,this.average_rating=l.average_rating,this.review_count=l.review_count,this.repository=l.repository,this.url=l.url,this.publisher_name=l.publisher_name,this.installed=l.installed,this.installed_version=l.installed_version,this.latest_version=l.latest_version,this.update_available=l.update_available}static createFrom(l={}){return new h(l)}}a.AvailablePlugin=h;class d{constructor(l={}){e(this,"date");e(this,"count");typeof l=="string"&&(l=JSON.parse(l)),this.date=l.date,this.count=l.count}static createFrom(l={}){return new d(l)}}a.DailyStat=d;class p{constructor(l={}){e(this,"total");e(this,"last_month");e(this,"last_week");e(this,"daily_stats");typeof l=="string"&&(l=JSON.parse(l)),this.total=l.total,this.last_month=l.last_month,this.last_week=l.last_week,this.daily_stats=this.convertValues(l.daily_stats,d)}static createFrom(l={}){return new p(l)}convertValues(l,i,s=!1){if(!l)return l;if(l.slice&&l.map)return l.map(g=>this.convertValues(g,i));if(typeof l=="object"){if(s){for(const g of Object.keys(l))l[g]=new i(l[g]);return l}return new i(l)}return l}}a.DownloadStats=p;class o{constructor(l={}){e(this,"id");e(this,"user_id");e(this,"rating");e(this,"title");e(this,"body");e(this,"created_at");typeof l=="string"&&(l=JSON.parse(l)),this.id=l.id,this.user_id=l.user_id,this.rating=l.rating,this.title=l.title,this.body=l.body,this.created_at=l.created_at}static createFrom(l={}){return new o(l)}}a.Review=o;class m{constructor(l={}){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 l=="string"&&(l=JSON.parse(l)),this.version=l.version,this.description=l.description,this.changelog=l.changelog,this.min_ide_version=l.min_ide_version,this.max_ide_version=l.max_ide_version,this.capabilities=l.capabilities,this.created_at=l.created_at}static createFrom(l={}){return new m(l)}}a.VersionInfo=m})(exports.registry||(exports.registry={}));exports.resource=void 0;(a=>{(b=>{b[b.IDLE=0]="IDLE",b[b.SYNCING=1]="SYNCING",b[b.SYNCED=2]="SYNCED",b[b.ERROR=3]="ERROR",b[b.STOPPED=4]="STOPPED",b[b.FAILED=5]="FAILED",b[b.FORBIDDEN=6]="FORBIDDEN",b[b.SKIPPED=7]="SKIPPED"})(a.WatchState||(a.WatchState={})),(b=>{b[b.ON_CONNECT=0]="ON_CONNECT",b[b.ON_FIRST_QUERY=1]="ON_FIRST_QUERY",b[b.NEVER=2]="NEVER"})(a.SyncPolicy||(a.SyncPolicy={}));class h{constructor(t={}){e(this,"type");e(this,"description");e(this,"enum");e(this,"default");e(this,"minimum");e(this,"maximum");e(this,"properties");e(this,"required");typeof t=="string"&&(t=JSON.parse(t)),this.type=t.type,this.description=t.description,this.enum=t.enum,this.default=t.default,this.minimum=t.minimum,this.maximum=t.maximum,this.properties=this.convertValues(t.properties,h,!0),this.required=t.required}static createFrom(t={}){return new h(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.SchemaProperty=h;class d{constructor(t={}){e(this,"properties");e(this,"required");typeof t=="string"&&(t=JSON.parse(t)),this.properties=this.convertValues(t.properties,h,!0),this.required=t.required}static createFrom(t={}){return new d(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.Schema=d;class p{constructor(t={}){e(this,"id");e(this,"label");e(this,"description");e(this,"icon");e(this,"scope");e(this,"streaming");e(this,"paramsSchema");e(this,"outputSchema");e(this,"dangerous");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,this.paramsSchema=this.convertValues(t.paramsSchema,d),this.outputSchema=this.convertValues(t.outputSchema,d),this.dangerous=t.dangerous}static createFrom(t={}){return new p(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.ActionDescriptor=p;class o{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 o(t)}}a.ActionInput=o;class m{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 m(t)}}a.ActionResult=m;class n{constructor(t={}){e(this,"input");e(this,"namespace");typeof t=="string"&&(t=JSON.parse(t)),this.input=t.input,this.namespace=t.namespace}static createFrom(t={}){return new n(t)}}a.ClientCreateInput=n;class l{constructor(t={}){e(this,"result");e(this,"success");e(this,"totalCount");e(this,"nextCursor");typeof t=="string"&&(t=JSON.parse(t)),this.result=t.result,this.success=t.success,this.totalCount=t.totalCount,this.nextCursor=t.nextCursor}static createFrom(t={}){return new l(t)}}a.ClientListResult=l;class i{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 i(t)}}a.ClientResult=i;class s{constructor(t={}){e(this,"input");e(this,"id");e(this,"namespace");typeof t=="string"&&(t=JSON.parse(t)),this.input=t.input,this.id=t.id,this.namespace=t.namespace}static createFrom(t={}){return new s(t)}}a.ClientUpdateInput=s;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 f{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 f(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.ColumnDefinition=f;class O{constructor(t={}){e(this,"id");e(this,"namespace");e(this,"gracePeriodSeconds");typeof t=="string"&&(t=JSON.parse(t)),this.id=t.id,this.namespace=t.namespace,this.gracePeriodSeconds=t.gracePeriodSeconds}static createFrom(t={}){return new O(t)}}a.DeleteInput=O;class j{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 j(t)}}a.EditorSchema=j;class r{constructor(t={}){e(this,"field");e(this,"operator");e(this,"value");typeof t=="string"&&(t=JSON.parse(t)),this.field=t.field,this.operator=t.operator,this.value=t.value}static createFrom(t={}){return new r(t)}}a.FilterPredicate=r;class v{constructor(t={}){e(this,"logic");e(this,"predicates");e(this,"groups");typeof t=="string"&&(t=JSON.parse(t)),this.logic=t.logic,this.predicates=this.convertValues(t.predicates,r),this.groups=this.convertValues(t.groups,v)}static createFrom(t={}){return new v(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.FilterExpression=v;class V{constructor(t={}){e(this,"path");e(this,"displayName");e(this,"description");e(this,"type");e(this,"operators");e(this,"allowedValues");e(this,"required");typeof t=="string"&&(t=JSON.parse(t)),this.path=t.path,this.displayName=t.displayName,this.description=t.description,this.type=t.type,this.operators=t.operators,this.allowedValues=t.allowedValues,this.required=t.required}static createFrom(t={}){return new V(t)}}a.FilterField=V;class u{constructor(t={}){e(this,"page");e(this,"pageSize");e(this,"cursor");typeof t=="string"&&(t=JSON.parse(t)),this.page=t.page,this.pageSize=t.pageSize,this.cursor=t.cursor}static createFrom(t={}){return new u(t)}}a.PaginationParams=u;class _{constructor(t={}){e(this,"field");e(this,"descending");typeof t=="string"&&(t=JSON.parse(t)),this.field=t.field,this.descending=t.descending}static createFrom(t={}){return new _(t)}}a.OrderField=_;class D{constructor(t={}){e(this,"filters");e(this,"textQuery");e(this,"namespaces");e(this,"order");e(this,"pagination");typeof t=="string"&&(t=JSON.parse(t)),this.filters=this.convertValues(t.filters,v),this.textQuery=t.textQuery,this.namespaces=t.namespaces,this.order=this.convertValues(t.order,_),this.pagination=this.convertValues(t.pagination,u)}static createFrom(t={}){return new D(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.FindInput=D;class R{constructor(t={}){e(this,"id");e(this,"namespace");typeof t=="string"&&(t=JSON.parse(t)),this.id=t.id,this.namespace=t.namespace}static createFrom(t={}){return new R(t)}}a.GetInput=R;class S{constructor(t={}){e(this,"type");e(this,"status");e(this,"reason");e(this,"message");e(this,"lastProbeTime");e(this,"lastTransitionTime");typeof t=="string"&&(t=JSON.parse(t)),this.type=t.type,this.status=t.status,this.reason=t.reason,this.message=t.message,this.lastProbeTime=this.convertValues(t.lastProbeTime,exports.time.Time),this.lastTransitionTime=this.convertValues(t.lastTransitionTime,exports.time.Time)}static createFrom(t={}){return new S(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.HealthCondition=S;class P{constructor(t={}){e(this,"namespaces");e(this,"order");e(this,"pagination");typeof t=="string"&&(t=JSON.parse(t)),this.namespaces=t.namespaces,this.order=this.convertValues(t.order,_),this.pagination=this.convertValues(t.pagination,u)}static createFrom(t={}){return new P(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.ListInput=P;class N{constructor(t={}){e(this,"method");e(this,"fieldPath");e(this,"ownerRefKind");e(this,"labelSelector");typeof t=="string"&&(t=JSON.parse(t)),this.method=t.method,this.fieldPath=t.fieldPath,this.ownerRefKind=t.ownerRefKind,this.labelSelector=t.labelSelector}static createFrom(t={}){return new N(t)}}a.RelationshipExtractor=N;class F{constructor(t={}){e(this,"type");e(this,"targetResourceKey");e(this,"label");e(this,"inverseLabel");e(this,"cardinality");e(this,"extractor");typeof t=="string"&&(t=JSON.parse(t)),this.type=t.type,this.targetResourceKey=t.targetResourceKey,this.label=t.label,this.inverseLabel=t.inverseLabel,this.cardinality=t.cardinality,this.extractor=this.convertValues(t.extractor,N)}static createFrom(t={}){return new F(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.RelationshipDescriptor=F;class k{constructor(t={}){e(this,"pluginId");e(this,"connectionId");e(this,"resourceKey");e(this,"id");e(this,"namespace");e(this,"displayName");typeof t=="string"&&(t=JSON.parse(t)),this.pluginId=t.pluginId,this.connectionId=t.connectionId,this.resourceKey=t.resourceKey,this.id=t.id,this.namespace=t.namespace,this.displayName=t.displayName}static createFrom(t={}){return new k(t)}}a.ResourceRef=k;class I{constructor(t={}){e(this,"descriptor");e(this,"targets");typeof t=="string"&&(t=JSON.parse(t)),this.descriptor=this.convertValues(t.descriptor,F),this.targets=this.convertValues(t.targets,k)}static createFrom(t={}){return new I(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.ResolvedRelationship=I;class J{constructor(t={}){e(this,"level");e(this,"expectedCount");e(this,"defaultPageSize");typeof t=="string"&&(t=JSON.parse(t)),this.level=t.level,this.expectedCount=t.expectedCount,this.defaultPageSize=t.defaultPageSize}static createFrom(t={}){return new J(t)}}a.ScaleHint=J;class T{constructor(t={}){e(this,"canGet");e(this,"canList");e(this,"canFind");e(this,"canCreate");e(this,"canUpdate");e(this,"canDelete");e(this,"watchable");e(this,"filterable");e(this,"searchable");e(this,"hasActions");e(this,"hasSchema");e(this,"namespaceScoped");e(this,"hasRelationships");e(this,"hasHealth");e(this,"hasEvents");e(this,"scaleHint");typeof t=="string"&&(t=JSON.parse(t)),this.canGet=t.canGet,this.canList=t.canList,this.canFind=t.canFind,this.canCreate=t.canCreate,this.canUpdate=t.canUpdate,this.canDelete=t.canDelete,this.watchable=t.watchable,this.filterable=t.filterable,this.searchable=t.searchable,this.hasActions=t.hasActions,this.hasSchema=t.hasSchema,this.namespaceScoped=t.namespaceScoped,this.hasRelationships=t.hasRelationships,this.hasHealth=t.hasHealth,this.hasEvents=t.hasEvents,this.scaleHint=this.convertValues(t.scaleHint,J)}static createFrom(t={}){return new T(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.ResourceCapabilities=T;class A{constructor(t={}){e(this,"id_accessor");e(this,"namespace_accessor");e(this,"memoizer_accessor");e(this,"columnDefs");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,f)}static createFrom(t={}){return new A(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.ResourceDefinition=A;class C{constructor(t={}){e(this,"type");e(this,"reason");e(this,"message");e(this,"source");e(this,"count");e(this,"firstSeen");e(this,"lastSeen");typeof t=="string"&&(t=JSON.parse(t)),this.type=t.type,this.reason=t.reason,this.message=t.message,this.source=t.source,this.count=t.count,this.firstSeen=this.convertValues(t.firstSeen,exports.time.Time),this.lastSeen=this.convertValues(t.lastSeen,exports.time.Time)}static createFrom(t={}){return new C(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.ResourceEvent=C;class L{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 L(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.ResourceGroup=L;class M{constructor(t={}){e(this,"status");e(this,"reason");e(this,"message");e(this,"since");e(this,"conditions");typeof t=="string"&&(t=JSON.parse(t)),this.status=t.status,this.reason=t.reason,this.message=t.message,this.since=this.convertValues(t.since,exports.time.Time),this.conditions=this.convertValues(t.conditions,S)}static createFrom(t={}){return new M(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.ResourceHealth=M;class x{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 x(t)}}a.ResourceMeta=x;class E{constructor(t={}){e(this,"partitions");typeof t=="string"&&(t=JSON.parse(t)),this.partitions=t.partitions}static createFrom(t={}){return new E(t)}}a.WatchScope=E;class U{constructor(t={}){e(this,"connectionId");e(this,"resources");e(this,"resourceCounts");e(this,"scope");typeof t=="string"&&(t=JSON.parse(t)),this.connectionId=t.connectionId,this.resources=t.resources,this.resourceCounts=t.resourceCounts,this.scope=this.convertValues(t.scope,E)}static createFrom(t={}){return new U(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.WatchConnectionSummary=U})(exports.resource||(exports.resource={}));exports.settings=void 0;(a=>{(m=>{m.TEXT="text",m.SELECT="select",m.MULTISELECT="multiselect",m.INTEGER="integer",m.FLOAT="float",m.TOGGLE="toggle",m.COLOR="color",m.DATETIME="datetime",m.PASSWORD="password"})(a.SettingType||(a.SettingType={}));class h{constructor(n={}){e(this,"enabled");e(this,"allowFolders");e(this,"extensions");e(this,"multiple");e(this,"relative");e(this,"defaultPath");typeof n=="string"&&(n=JSON.parse(n)),this.enabled=n.enabled,this.allowFolders=n.allowFolders,this.extensions=n.extensions,this.multiple=n.multiple,this.relative=n.relative,this.defaultPath=n.defaultPath}static createFrom(n={}){return new h(n)}}a.SettingFileSelection=h;class d{constructor(n={}){e(this,"label");e(this,"description");e(this,"value");typeof n=="string"&&(n=JSON.parse(n)),this.label=n.label,this.description=n.description,this.value=n.value}static createFrom(n={}){return new d(n)}}a.SettingOption=d;class p{constructor(n={}){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 n=="string"&&(n=JSON.parse(n)),this.id=n.id,this.label=n.label,this.description=n.description,this.type=n.type,this.value=n.value,this.default=n.default,this.options=this.convertValues(n.options,d),this.fileSelection=this.convertValues(n.fileSelection,h),this.sensitive=n.sensitive}static createFrom(n={}){return new p(n)}convertValues(n,l,i=!1){if(!n)return n;if(n.slice&&n.map)return n.map(s=>this.convertValues(s,l));if(typeof n=="object"){if(i){for(const s of Object.keys(n))n[s]=new l(n[s]);return n}return new l(n)}return n}}a.Setting=p;class o{constructor(n={}){e(this,"settings");e(this,"id");e(this,"label");e(this,"description");e(this,"icon");typeof n=="string"&&(n=JSON.parse(n)),this.settings=this.convertValues(n.settings,p,!0),this.id=n.id,this.label=n.label,this.description=n.description,this.icon=n.icon}static createFrom(n={}){return new o(n)}convertValues(n,l,i=!1){if(!n)return n;if(n.slice&&n.map)return n.map(s=>this.convertValues(s,l));if(typeof n=="object"){if(i){for(const s of Object.keys(n))n[s]=new l(n[s]);return n}return new l(n)}return n}}a.Category=o})(exports.settings||(exports.settings={}));exports.time=void 0;(a=>{class h{static createFrom(p={}){return new h(p)}constructor(p={}){typeof p=="string"&&(p=JSON.parse(p))}}a.Time=h})(exports.time||(exports.time={}));exports.trivy=void 0;(a=>{(p=>{p.VULN="vuln",p.MISCONFIG="misconfig",p.SECRET="secret",p.LICENSE="license"})(a.Scanner||(a.Scanner={})),(p=>{p.CONFIG="config",p.FILESYSTEM="fs",p.IMAGE="image",p.KUBERNETES="kubernetes",p.REPOSITORY="repository",p.ROOTFS="rootfs",p.SBOM="sbom"})(a.Command||(a.Command={}));class h{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 h(o)}}a.ScanOptions=h;class d{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 d(o)}convertValues(o,m,n=!1){if(!o)return o;if(o.slice&&o.map)return o.map(l=>this.convertValues(l,m));if(typeof o=="object"){if(n){for(const l of Object.keys(o))o[l]=new m(o[l]);return o}return new m(o)}return o}}a.ScanResult=d})(exports.trivy||(exports.trivy={}));exports.types=void 0;(a=>{(l=>{l.UNKNOWN="UNKNOWN",l.CONNECTED="CONNECTED",l.DISCONNECTED="DISCONNECTED",l.PENDING="PENDING",l.FAILED="FAILED",l.ERROR="ERROR",l.UNAUTHORIZED="UNAUTHORIZED",l.FORBIDDEN="FORBIDDEN",l.BAD_REQUEST="BAD_REQUEST",l.NOT_FOUND="NOT_FOUND",l.TIMEOUT="TIMEOUT",l.UNAVAILABLE="UNAVAILABLE",l.REQUEST_ENTITY_TOO_LARGE="REQUEST_ENTITY_TOO_LARGE"})(a.ConnectionStatusCode||(a.ConnectionStatusCode={}));class h{constructor(i={}){e(this,"enabled");e(this,"triggers");e(this,"retry");typeof i=="string"&&(i=JSON.parse(i)),this.enabled=i.enabled,this.triggers=i.triggers,this.retry=i.retry}static createFrom(i={}){return new h(i)}}a.ConnectionAutoConnect=h;class d{constructor(i={}){e(this,"auto_connect");typeof i=="string"&&(i=JSON.parse(i)),this.auto_connect=this.convertValues(i.auto_connect,h)}static createFrom(i={}){return new d(i)}convertValues(i,s,g=!1){if(!i)return i;if(i.slice&&i.map)return i.map(f=>this.convertValues(f,s));if(typeof i=="object"){if(g){for(const f of Object.keys(i))i[f]=new s(i[f]);return i}return new s(i)}return i}}a.ConnectionLifecycle=d;class p{constructor(i={}){e(this,"last_refresh");e(this,"data");e(this,"labels");e(this,"lifecycle");e(this,"id");e(this,"uid");e(this,"name");e(this,"description");e(this,"avatar");e(this,"expiry_time");e(this,"Client");typeof i=="string"&&(i=JSON.parse(i)),this.last_refresh=this.convertValues(i.last_refresh,exports.time.Time),this.data=i.data,this.labels=i.labels,this.lifecycle=this.convertValues(i.lifecycle,d),this.id=i.id,this.uid=i.uid,this.name=i.name,this.description=i.description,this.avatar=i.avatar,this.expiry_time=i.expiry_time,this.Client=i.Client}static createFrom(i={}){return new p(i)}convertValues(i,s,g=!1){if(!i)return i;if(i.slice&&i.map)return i.map(f=>this.convertValues(f,s));if(typeof i=="object"){if(g){for(const f of Object.keys(i))i[f]=new s(i[f]);return i}return new s(i)}return i}}a.Connection=p;class o{constructor(i={}){e(this,"connection");e(this,"status");e(this,"error");e(this,"details");typeof i=="string"&&(i=JSON.parse(i)),this.connection=this.convertValues(i.connection,p),this.status=i.status,this.error=i.error,this.details=i.details}static createFrom(i={}){return new o(i)}convertValues(i,s,g=!1){if(!i)return i;if(i.slice&&i.map)return i.map(f=>this.convertValues(f,s));if(typeof i=="object"){if(g){for(const f of Object.keys(i))i[f]=new s(i[f]);return i}return new s(i)}return i}}a.ConnectionStatus=o;class m{constructor(i={}){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 i=="string"&&(i=JSON.parse(i)),this.id=i.id,this.metadata=this.convertValues(i.metadata,exports.config.PluginMeta),this.phase=i.phase,this.enabled=i.enabled,this.devMode=i.devMode,this.devPath=i.devPath,this.capabilities=i.capabilities,this.lastError=i.lastError}static createFrom(i={}){return new m(i)}convertValues(i,s,g=!1){if(!i)return i;if(i.slice&&i.map)return i.map(f=>this.convertValues(f,s));if(typeof i=="object"){if(g){for(const f of Object.keys(i))i[f]=new s(i[f]);return i}return new s(i)}return i}}a.PluginInfo=m;class n{constructor(i={}){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 i=="string"&&(i=JSON.parse(i)),this.id=i.id,this.phase=i.phase,this.metadata=this.convertValues(i.metadata,exports.config.PluginMeta),this.enabled=i.enabled,this.devMode=i.devMode,this.devPath=i.devPath,this.lastError=i.lastError,this.errorCount=i.errorCount,this.installedAt=this.convertValues(i.installedAt,exports.time.Time)}static createFrom(i={}){return new n(i)}convertValues(i,s,g=!1){if(!i)return i;if(i.slice&&i.map)return i.map(f=>this.convertValues(f,s));if(typeof i=="object"){if(g){for(const f of Object.keys(i))i[f]=new s(i[f]);return i}return new s(i)}return i}}a.PluginStateRecord=n})(exports.types||(exports.types={}));exports.ui=void 0;(a=>{class h{constructor(n={}){e(this,"plugin");typeof n=="string"&&(n=JSON.parse(n)),this.plugin=n.plugin}static createFrom(n={}){return new h(n)}}a.GetPluginComponentsInput=h;class d{constructor(n={}){e(this,"plugin");e(this,"resource");e(this,"area");typeof n=="string"&&(n=JSON.parse(n)),this.plugin=n.plugin,this.resource=n.resource,this.area=n.area}static createFrom(n={}){return new d(n)}}a.GetResourceAreaComponentInput=d;class p{constructor(n={}){e(this,"plugin");e(this,"resource");typeof n=="string"&&(n=JSON.parse(n)),this.plugin=n.plugin,this.resource=n.resource}static createFrom(n={}){return new p(n)}}a.GetResourceComponentsInput=p;class o{constructor(n={}){e(this,"owner");e(this,"name");e(this,"plugin");e(this,"resource");e(this,"area");e(this,"extension");typeof n=="string"&&(n=JSON.parse(n)),this.owner=n.owner,this.name=n.name,this.plugin=n.plugin,this.resource=n.resource,this.area=n.area,this.extension=n.extension}static createFrom(n={}){return new o(n)}}a.ResourceComponent=o})(exports.ui||(exports.ui={}));exports.utils=void 0;(a=>{class h{constructor(p={}){e(this,"filename");e(this,"contents");typeof p=="string"&&(p=JSON.parse(p)),this.filename=p.filename,this.contents=p.contents}static createFrom(p={}){return new h(p)}}a.GetLanguageInput=h})(exports.utils||(exports.utils={}));
|
|
1
|
+
"use strict";var G=Object.defineProperty;var K=(a,h,d)=>h in a?G(a,h,{enumerable:!0,configurable:!0,writable:!0,value:d}):a[h]=d;var e=(a,h,d)=>K(a,typeof h!="symbol"?h+"":h,d);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.config=void 0;(a=>{class h{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 h(s)}}a.PluginAuthor=h;class d{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 d(s)}}a.PluginResourceComponent=d;class p{constructor(s={}){e(this,"resource");typeof s=="string"&&(s=JSON.parse(s)),this.resource=this.convertValues(s.resource,d)}static createFrom(s={}){return new p(s)}convertValues(s,g,f=!1){if(!s)return s;if(s.slice&&s.map)return s.map(O=>this.convertValues(O,g));if(typeof s=="object"){if(f){for(const O of Object.keys(s))s[O]=new g(s[O]);return s}return new g(s)}return s}}a.PluginComponents=p;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 m{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 m(s)}}a.PluginThemeColors=m;class n{constructor(s={}){e(this,"colors");typeof s=="string"&&(s=JSON.parse(s)),this.colors=this.convertValues(s.colors,m)}static createFrom(s={}){return new n(s)}convertValues(s,g,f=!1){if(!s)return s;if(s.slice&&s.map)return s.map(O=>this.convertValues(O,g));if(typeof s=="object"){if(f){for(const O of Object.keys(s))s[O]=new g(s[O]);return s}return new g(s)}return s}}a.PluginTheme=n;class l{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,h),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,n),this.components=this.convertValues(s.components,p),this.schema_version=s.schema_version,this.sdk_protocol_version=s.sdk_protocol_version}static createFrom(s={}){return new l(s)}convertValues(s,g,f=!1){if(!s)return s;if(s.slice&&s.map)return s.map(O=>this.convertValues(O,g));if(typeof s=="object"){if(f){for(const O of Object.keys(s))s[O]=new g(s[O]);return s}return new g(s)}return s}}a.PluginMeta=l})(exports.config||(exports.config={}));exports.devserver=void 0;(a=>{class h{constructor(n={}){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 n=="string"&&(n=JSON.parse(n)),this.pid=n.pid,this.protocol=n.protocol,this.protocolVersion=n.protocolVersion,this.addr=n.addr,this.vitePort=n.vitePort,this.pluginId=n.pluginId,this.version=n.version,this.startedAt=n.startedAt}static createFrom(n={}){return new h(n)}}a.DevInfoFile=h;class d{static createFrom(n={}){return new d(n)}constructor(n={}){typeof n=="string"&&(n=JSON.parse(n))}}a.DevServerManager=d;class p{constructor(n={}){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 n=="string"&&(n=JSON.parse(n)),this.pluginID=n.pluginID,this.mode=n.mode,this.devPath=n.devPath,this.vitePort=n.vitePort,this.viteURL=n.viteURL,this.viteStatus=n.viteStatus,this.goStatus=n.goStatus,this.lastBuildDuration=n.lastBuildDuration,this.lastBuildTime=n.lastBuildTime,this.lastError=n.lastError,this.grpcConnected=n.grpcConnected}static createFrom(n={}){return new p(n)}}a.DevServerState=p;class o{constructor(n={}){e(this,"timestamp");e(this,"source");e(this,"level");e(this,"message");e(this,"pluginID");typeof n=="string"&&(n=JSON.parse(n)),this.timestamp=n.timestamp,this.source=n.source,this.level=n.level,this.message=n.message,this.pluginID=n.pluginID}static createFrom(n={}){return new o(n)}}a.LogEntry=o})(exports.devserver||(exports.devserver={}));exports.exec=void 0;(a=>{class h{constructor(i={}){e(this,"label");e(this,"label_selector");e(this,"paths");e(this,"selectors");typeof i=="string"&&(i=JSON.parse(i)),this.label=i.label,this.label_selector=i.label_selector,this.paths=i.paths,this.selectors=i.selectors}static createFrom(i={}){return new h(i)}}a.ActionTargetBuilder=h;class d{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 d(i)}convertValues(i,s,g=!1){if(!i)return i;if(i.slice&&i.map)return i.map(f=>this.convertValues(f,s));if(typeof i=="object"){if(g){for(const f of Object.keys(i))i[f]=new s(i[f]);return i}return new s(i)}return i}}a.Session=d;class p{constructor(i={}){e(this,"session");e(this,"buffer");typeof i=="string"&&(i=JSON.parse(i)),this.session=this.convertValues(i.session,d),this.buffer=i.buffer}static createFrom(i={}){return new p(i)}convertValues(i,s,g=!1){if(!i)return i;if(i.slice&&i.map)return i.map(f=>this.convertValues(f,s));if(typeof i=="object"){if(g){for(const f of Object.keys(i))i[f]=new s(i[f]);return i}return new s(i)}return i}}a.AttachSessionResult=p;class o{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 o(i)}}a.CreateTerminalOptions=o;class m{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,h),this.default_command=i.default_command}static createFrom(i={}){return new m(i)}convertValues(i,s,g=!1){if(!i)return i;if(i.slice&&i.map)return i.map(f=>this.convertValues(f,s));if(typeof i=="object"){if(g){for(const f of Object.keys(i))i[f]=new s(i[f]);return i}return new s(i)}return i}}a.Handler=m;class n{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 n(i)}}a.SessionOptions=n})(exports.exec||(exports.exec={}));exports.logs=void 0;(a=>{class h{constructor(i={}){e(this,"label");e(this,"label_selector");e(this,"paths");e(this,"selectors");typeof i=="string"&&(i=JSON.parse(i)),this.label=i.label,this.label_selector=i.label_selector,this.paths=i.paths,this.selectors=i.selectors}static createFrom(i={}){return new h(i)}}a.ActionTargetBuilder=h;class d{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 d(i)}convertValues(i,s,g=!1){if(!i)return i;if(i.slice&&i.map)return i.map(f=>this.convertValues(f,s));if(typeof i=="object"){if(g){for(const f of Object.keys(i))i[f]=new s(i[f]);return i}return new s(i)}return i}}a.LogSessionOptions=d;class p{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,d)}static createFrom(i={}){return new p(i)}convertValues(i,s,g=!1){if(!i)return i;if(i.slice&&i.map)return i.map(f=>this.convertValues(f,s));if(typeof i=="object"){if(g){for(const f of Object.keys(i))i[f]=new s(i[f]);return i}return new s(i)}return i}}a.CreateSessionOptions=p;class o{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,h)}static createFrom(i={}){return new o(i)}convertValues(i,s,g=!1){if(!i)return i;if(i.slice&&i.map)return i.map(f=>this.convertValues(f,s));if(typeof i=="object"){if(g){for(const f of Object.keys(i))i[f]=new s(i[f]);return i}return new s(i)}return i}}a.Handler=o;class m{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 m(i)}}a.LogSource=m;class n{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,d),this.status=i.status,this.active_sources=this.convertValues(i.active_sources,m),this.created_at=this.convertValues(i.created_at,exports.time.Time)}static createFrom(i={}){return new n(i)}convertValues(i,s,g=!1){if(!i)return i;if(i.slice&&i.map)return i.map(f=>this.convertValues(f,s));if(typeof i=="object"){if(g){for(const f of Object.keys(i))i[f]=new s(i[f]);return i}return new s(i)}return i}}a.LogSession=n})(exports.logs||(exports.logs={}));exports.main=void 0;(a=>{class h{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 h(o)}}a.FileFilter=h;class d{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,h),this.showHiddenFiles=o.showHiddenFiles,this.canCreateDirectories=o.canCreateDirectories,this.resolvesAliases=o.resolvesAliases,this.treatPackagesAsDirectories=o.treatPackagesAsDirectories}static createFrom(o={}){return new d(o)}convertValues(o,m,n=!1){if(!o)return o;if(o.slice&&o.map)return o.map(l=>this.convertValues(l,m));if(typeof o=="object"){if(n){for(const l of Object.keys(o))o[l]=new m(o[l]);return o}return new m(o)}return o}}a.FileDialogOptions=d})(exports.main||(exports.main={}));exports.metric=void 0;(a=>{class h{constructor(r={}){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 r=="string"&&(r=JSON.parse(r)),this.metric_id=r.metric_id,this.min=r.min,this.max=r.max,this.avg=r.avg,this.sum=r.sum,this.p50=r.p50,this.p90=r.p90,this.p99=r.p99,this.count=r.count,this.window=r.window,this.labels=r.labels}static createFrom(r={}){return new h(r)}}a.AggregateValue=h;class d{constructor(r={}){e(this,"min");e(this,"max");e(this,"color");typeof r=="string"&&(r=JSON.parse(r)),this.min=r.min,this.max=r.max,this.color=r.color}static createFrom(r={}){return new d(r)}}a.ColorRange=d;class p{constructor(r={}){e(this,"metric_id");e(this,"value");e(this,"timestamp");e(this,"labels");typeof r=="string"&&(r=JSON.parse(r)),this.metric_id=r.metric_id,this.value=r.value,this.timestamp=this.convertValues(r.timestamp,exports.time.Time),this.labels=r.labels}static createFrom(r={}){return new p(r)}convertValues(r,v,V=!1){if(!r)return r;if(r.slice&&r.map)return r.map(u=>this.convertValues(u,v));if(typeof r=="object"){if(V){for(const u of Object.keys(r))r[u]=new v(r[u]);return r}return new v(r)}return r}}a.CurrentValue=p;class o{constructor(r={}){e(this,"timestamp");e(this,"value");e(this,"labels");typeof r=="string"&&(r=JSON.parse(r)),this.timestamp=this.convertValues(r.timestamp,exports.time.Time),this.value=r.value,this.labels=r.labels}static createFrom(r={}){return new o(r)}convertValues(r,v,V=!1){if(!r)return r;if(r.slice&&r.map)return r.map(u=>this.convertValues(u,v));if(typeof r=="object"){if(V){for(const u of Object.keys(r))r[u]=new v(r[u]);return r}return new v(r)}return r}}a.DataPoint=o;class m{constructor(r={}){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 r=="string"&&(r=JSON.parse(r)),this.id=r.id,this.name=r.name,this.unit=r.unit,this.icon=r.icon,this.color_ranges=this.convertValues(r.color_ranges,d),this.format_string=r.format_string,this.supported_shapes=r.supported_shapes,this.chart_group=r.chart_group}static createFrom(r={}){return new m(r)}convertValues(r,v,V=!1){if(!r)return r;if(r.slice&&r.map)return r.map(u=>this.convertValues(u,v));if(typeof r=="object"){if(V){for(const u of Object.keys(r))r[u]=new v(r[u]);return r}return new v(r)}return r}}a.MetricDescriptor=m;class n{constructor(r={}){e(this,"resource");e(this,"metrics");typeof r=="string"&&(r=JSON.parse(r)),this.resource=r.resource,this.metrics=this.convertValues(r.metrics,m)}static createFrom(r={}){return new n(r)}convertValues(r,v,V=!1){if(!r)return r;if(r.slice&&r.map)return r.map(u=>this.convertValues(u,v));if(typeof r=="object"){if(V){for(const u of Object.keys(r))r[u]=new v(r[u]);return r}return new v(r)}return r}}a.Handler=n;class l{constructor(r={}){e(this,"plugin_id");e(this,"provider_id");e(this,"name");e(this,"icon");e(this,"description");e(this,"handlers");typeof r=="string"&&(r=JSON.parse(r)),this.plugin_id=r.plugin_id,this.provider_id=r.provider_id,this.name=r.name,this.icon=r.icon,this.description=r.description,this.handlers=this.convertValues(r.handlers,n)}static createFrom(r={}){return new l(r)}convertValues(r,v,V=!1){if(!r)return r;if(r.slice&&r.map)return r.map(u=>this.convertValues(u,v));if(typeof r=="object"){if(V){for(const u of Object.keys(r))r[u]=new v(r[u]);return r}return new v(r)}return r}}a.MetricProviderSummary=l;class i{constructor(r={}){e(this,"metric_id");e(this,"data_points");e(this,"labels");typeof r=="string"&&(r=JSON.parse(r)),this.metric_id=r.metric_id,this.data_points=this.convertValues(r.data_points,o),this.labels=r.labels}static createFrom(r={}){return new i(r)}convertValues(r,v,V=!1){if(!r)return r;if(r.slice&&r.map)return r.map(u=>this.convertValues(u,v));if(typeof r=="object"){if(V){for(const u of Object.keys(r))r[u]=new v(r[u]);return r}return new v(r)}return r}}a.TimeSeries=i;class s{constructor(r={}){e(this,"time_series");e(this,"current_value");e(this,"aggregate_value");typeof r=="string"&&(r=JSON.parse(r)),this.time_series=this.convertValues(r.time_series,i),this.current_value=this.convertValues(r.current_value,p),this.aggregate_value=this.convertValues(r.aggregate_value,h)}static createFrom(r={}){return new s(r)}convertValues(r,v,V=!1){if(!r)return r;if(r.slice&&r.map)return r.map(u=>this.convertValues(u,v));if(typeof r=="object"){if(V){for(const u of Object.keys(r))r[u]=new v(r[u]);return r}return new v(r)}return r}}a.MetricResult=s;class g{constructor(r={}){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 r=="string"&&(r=JSON.parse(r)),this.resource_key=r.resource_key,this.resource_id=r.resource_id,this.resource_namespace=r.resource_namespace,this.resource_data=r.resource_data,this.metric_ids=r.metric_ids,this.shape=r.shape,this.start_time=this.convertValues(r.start_time,exports.time.Time),this.end_time=this.convertValues(r.end_time,exports.time.Time),this.step=r.step,this.params=r.params}static createFrom(r={}){return new g(r)}convertValues(r,v,V=!1){if(!r)return r;if(r.slice&&r.map)return r.map(u=>this.convertValues(u,v));if(typeof r=="object"){if(V){for(const u of Object.keys(r))r[u]=new v(r[u]);return r}return new v(r)}return r}}a.QueryRequest=g;class f{constructor(r={}){e(this,"success");e(this,"results");e(this,"error");typeof r=="string"&&(r=JSON.parse(r)),this.success=r.success,this.results=this.convertValues(r.results,s),this.error=r.error}static createFrom(r={}){return new f(r)}convertValues(r,v,V=!1){if(!r)return r;if(r.slice&&r.map)return r.map(u=>this.convertValues(u,v));if(typeof r=="object"){if(V){for(const u of Object.keys(r))r[u]=new v(r[u]);return r}return new v(r)}return r}}a.QueryResponse=f;class O{constructor(r={}){e(this,"resource_key");e(this,"resource_id");e(this,"resource_namespace");e(this,"resource_data");e(this,"metric_ids");e(this,"interval");typeof r=="string"&&(r=JSON.parse(r)),this.resource_key=r.resource_key,this.resource_id=r.resource_id,this.resource_namespace=r.resource_namespace,this.resource_data=r.resource_data,this.metric_ids=r.metric_ids,this.interval=r.interval}static createFrom(r={}){return new O(r)}}a.SubscribeRequest=O})(exports.metric||(exports.metric={}));exports.networker=void 0;(a=>{class h{constructor(n={}){e(this,"resource_id");e(this,"connection_id");typeof n=="string"&&(n=JSON.parse(n)),this.resource_id=n.resource_id,this.connection_id=n.connection_id}static createFrom(n={}){return new h(n)}}a.FindPortForwardSessionRequest=h;class d{constructor(n={}){e(this,"algorithm");e(this,"key");e(this,"enabled");typeof n=="string"&&(n=JSON.parse(n)),this.algorithm=n.algorithm,this.key=n.key,this.enabled=n.enabled}static createFrom(n={}){return new d(n)}}a.PortForwardSessionEncryption=d;class p{constructor(n={}){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 n=="string"&&(n=JSON.parse(n)),this.created_at=this.convertValues(n.created_at,exports.time.Time),this.updated_at=this.convertValues(n.updated_at,exports.time.Time),this.connection=n.connection,this.labels=n.labels,this.id=n.id,this.protocol=n.protocol,this.state=n.state,this.connection_type=n.connection_type,this.encryption=this.convertValues(n.encryption,d),this.local_port=n.local_port,this.remote_port=n.remote_port}static createFrom(n={}){return new p(n)}convertValues(n,l,i=!1){if(!n)return n;if(n.slice&&n.map)return n.map(s=>this.convertValues(s,l));if(typeof n=="object"){if(i){for(const s of Object.keys(n))n[s]=new l(n[s]);return n}return new l(n)}return n}}a.PortForwardSession=p;class o{constructor(n={}){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 n=="string"&&(n=JSON.parse(n)),this.connection=n.connection,this.labels=n.labels,this.params=n.params,this.protocol=n.protocol,this.connection_type=n.connection_type,this.encryption=this.convertValues(n.encryption,d),this.local_port=n.local_port,this.remote_port=n.remote_port}static createFrom(n={}){return new o(n)}convertValues(n,l,i=!1){if(!n)return n;if(n.slice&&n.map)return n.map(s=>this.convertValues(s,l));if(typeof n=="object"){if(i){for(const s of Object.keys(n))n[s]=new l(n[s]);return n}return new l(n)}return n}}a.PortForwardSessionOptions=o})(exports.networker||(exports.networker={}));exports.plugin=void 0;(a=>{class h{constructor(p={}){e(this,"DevMode");e(this,"DevModePath");e(this,"ExistingState");typeof p=="string"&&(p=JSON.parse(p)),this.DevMode=p.DevMode,this.DevModePath=p.DevModePath,this.ExistingState=this.convertValues(p.ExistingState,exports.types.PluginStateRecord)}static createFrom(p={}){return new h(p)}convertValues(p,o,m=!1){if(!p)return p;if(p.slice&&p.map)return p.map(n=>this.convertValues(n,o));if(typeof p=="object"){if(m){for(const n of Object.keys(p))p[n]=new o(p[n]);return p}return new o(p)}return p}}a.LoadPluginOptions=h})(exports.plugin||(exports.plugin={}));exports.pluginlog=void 0;(a=>{class h{constructor(m={}){e(this,"timestamp");e(this,"pluginID");e(this,"source");e(this,"level");e(this,"message");typeof m=="string"&&(m=JSON.parse(m)),this.timestamp=m.timestamp,this.pluginID=m.pluginID,this.source=m.source,this.level=m.level,this.message=m.message}static createFrom(m={}){return new h(m)}}a.LogEntry=h;class d{static createFrom(m={}){return new d(m)}constructor(m={}){typeof m=="string"&&(m=JSON.parse(m))}}a.Manager=d;class p{static createFrom(m={}){return new p(m)}constructor(m={}){typeof m=="string"&&(m=JSON.parse(m))}}a.PluginLogStream=p})(exports.pluginlog||(exports.pluginlog={}));exports.registry=void 0;(a=>{class h{constructor(l={}){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,"publisher_name");e(this,"installed");e(this,"installed_version");e(this,"latest_version");e(this,"update_available");typeof l=="string"&&(l=JSON.parse(l)),this.id=l.id,this.name=l.name,this.description=l.description,this.icon_url=l.icon_url,this.category=l.category,this.tags=l.tags,this.license=l.license,this.official=l.official,this.featured=l.featured,this.download_count=l.download_count,this.average_rating=l.average_rating,this.review_count=l.review_count,this.repository=l.repository,this.url=l.url,this.publisher_name=l.publisher_name,this.installed=l.installed,this.installed_version=l.installed_version,this.latest_version=l.latest_version,this.update_available=l.update_available}static createFrom(l={}){return new h(l)}}a.AvailablePlugin=h;class d{constructor(l={}){e(this,"date");e(this,"count");typeof l=="string"&&(l=JSON.parse(l)),this.date=l.date,this.count=l.count}static createFrom(l={}){return new d(l)}}a.DailyStat=d;class p{constructor(l={}){e(this,"total");e(this,"last_month");e(this,"last_week");e(this,"daily_stats");typeof l=="string"&&(l=JSON.parse(l)),this.total=l.total,this.last_month=l.last_month,this.last_week=l.last_week,this.daily_stats=this.convertValues(l.daily_stats,d)}static createFrom(l={}){return new p(l)}convertValues(l,i,s=!1){if(!l)return l;if(l.slice&&l.map)return l.map(g=>this.convertValues(g,i));if(typeof l=="object"){if(s){for(const g of Object.keys(l))l[g]=new i(l[g]);return l}return new i(l)}return l}}a.DownloadStats=p;class o{constructor(l={}){e(this,"id");e(this,"user_id");e(this,"rating");e(this,"title");e(this,"body");e(this,"created_at");typeof l=="string"&&(l=JSON.parse(l)),this.id=l.id,this.user_id=l.user_id,this.rating=l.rating,this.title=l.title,this.body=l.body,this.created_at=l.created_at}static createFrom(l={}){return new o(l)}}a.Review=o;class m{constructor(l={}){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 l=="string"&&(l=JSON.parse(l)),this.version=l.version,this.description=l.description,this.changelog=l.changelog,this.min_ide_version=l.min_ide_version,this.max_ide_version=l.max_ide_version,this.capabilities=l.capabilities,this.created_at=l.created_at}static createFrom(l={}){return new m(l)}}a.VersionInfo=m})(exports.registry||(exports.registry={}));exports.resource=void 0;(a=>{(b=>{b[b.IDLE=0]="IDLE",b[b.SYNCING=1]="SYNCING",b[b.SYNCED=2]="SYNCED",b[b.ERROR=3]="ERROR",b[b.STOPPED=4]="STOPPED",b[b.FAILED=5]="FAILED",b[b.FORBIDDEN=6]="FORBIDDEN",b[b.SKIPPED=7]="SKIPPED"})(a.WatchState||(a.WatchState={})),(b=>{b[b.ON_CONNECT=0]="ON_CONNECT",b[b.ON_FIRST_QUERY=1]="ON_FIRST_QUERY",b[b.NEVER=2]="NEVER"})(a.SyncPolicy||(a.SyncPolicy={}));class h{constructor(t={}){e(this,"type");e(this,"description");e(this,"enum");e(this,"default");e(this,"minimum");e(this,"maximum");e(this,"properties");e(this,"required");typeof t=="string"&&(t=JSON.parse(t)),this.type=t.type,this.description=t.description,this.enum=t.enum,this.default=t.default,this.minimum=t.minimum,this.maximum=t.maximum,this.properties=this.convertValues(t.properties,h,!0),this.required=t.required}static createFrom(t={}){return new h(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.SchemaProperty=h;class d{constructor(t={}){e(this,"properties");e(this,"required");typeof t=="string"&&(t=JSON.parse(t)),this.properties=this.convertValues(t.properties,h,!0),this.required=t.required}static createFrom(t={}){return new d(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.Schema=d;class p{constructor(t={}){e(this,"id");e(this,"label");e(this,"description");e(this,"icon");e(this,"scope");e(this,"streaming");e(this,"paramsSchema");e(this,"outputSchema");e(this,"dangerous");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,this.paramsSchema=this.convertValues(t.paramsSchema,d),this.outputSchema=this.convertValues(t.outputSchema,d),this.dangerous=t.dangerous}static createFrom(t={}){return new p(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.ActionDescriptor=p;class o{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 o(t)}}a.ActionInput=o;class m{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 m(t)}}a.ActionResult=m;class n{constructor(t={}){e(this,"input");e(this,"namespace");typeof t=="string"&&(t=JSON.parse(t)),this.input=t.input,this.namespace=t.namespace}static createFrom(t={}){return new n(t)}}a.ClientCreateInput=n;class l{constructor(t={}){e(this,"result");e(this,"success");e(this,"totalCount");e(this,"nextCursor");typeof t=="string"&&(t=JSON.parse(t)),this.result=t.result,this.success=t.success,this.totalCount=t.totalCount,this.nextCursor=t.nextCursor}static createFrom(t={}){return new l(t)}}a.ClientListResult=l;class i{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 i(t)}}a.ClientResult=i;class s{constructor(t={}){e(this,"input");e(this,"id");e(this,"namespace");typeof t=="string"&&(t=JSON.parse(t)),this.input=t.input,this.id=t.id,this.namespace=t.namespace}static createFrom(t={}){return new s(t)}}a.ClientUpdateInput=s;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 f{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 f(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.ColumnDefinition=f;class O{constructor(t={}){e(this,"id");e(this,"namespace");e(this,"gracePeriodSeconds");typeof t=="string"&&(t=JSON.parse(t)),this.id=t.id,this.namespace=t.namespace,this.gracePeriodSeconds=t.gracePeriodSeconds}static createFrom(t={}){return new O(t)}}a.DeleteInput=O;class j{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 j(t)}}a.EditorSchema=j;class r{constructor(t={}){e(this,"field");e(this,"operator");e(this,"value");typeof t=="string"&&(t=JSON.parse(t)),this.field=t.field,this.operator=t.operator,this.value=t.value}static createFrom(t={}){return new r(t)}}a.FilterPredicate=r;class v{constructor(t={}){e(this,"logic");e(this,"predicates");e(this,"groups");typeof t=="string"&&(t=JSON.parse(t)),this.logic=t.logic,this.predicates=this.convertValues(t.predicates,r),this.groups=this.convertValues(t.groups,v)}static createFrom(t={}){return new v(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.FilterExpression=v;class V{constructor(t={}){e(this,"path");e(this,"displayName");e(this,"description");e(this,"type");e(this,"operators");e(this,"allowedValues");e(this,"required");typeof t=="string"&&(t=JSON.parse(t)),this.path=t.path,this.displayName=t.displayName,this.description=t.description,this.type=t.type,this.operators=t.operators,this.allowedValues=t.allowedValues,this.required=t.required}static createFrom(t={}){return new V(t)}}a.FilterField=V;class u{constructor(t={}){e(this,"page");e(this,"pageSize");e(this,"cursor");typeof t=="string"&&(t=JSON.parse(t)),this.page=t.page,this.pageSize=t.pageSize,this.cursor=t.cursor}static createFrom(t={}){return new u(t)}}a.PaginationParams=u;class _{constructor(t={}){e(this,"field");e(this,"descending");typeof t=="string"&&(t=JSON.parse(t)),this.field=t.field,this.descending=t.descending}static createFrom(t={}){return new _(t)}}a.OrderField=_;class D{constructor(t={}){e(this,"filters");e(this,"textQuery");e(this,"namespaces");e(this,"order");e(this,"pagination");typeof t=="string"&&(t=JSON.parse(t)),this.filters=this.convertValues(t.filters,v),this.textQuery=t.textQuery,this.namespaces=t.namespaces,this.order=this.convertValues(t.order,_),this.pagination=this.convertValues(t.pagination,u)}static createFrom(t={}){return new D(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.FindInput=D;class R{constructor(t={}){e(this,"id");e(this,"namespace");typeof t=="string"&&(t=JSON.parse(t)),this.id=t.id,this.namespace=t.namespace}static createFrom(t={}){return new R(t)}}a.GetInput=R;class S{constructor(t={}){e(this,"type");e(this,"status");e(this,"reason");e(this,"message");e(this,"lastProbeTime");e(this,"lastTransitionTime");typeof t=="string"&&(t=JSON.parse(t)),this.type=t.type,this.status=t.status,this.reason=t.reason,this.message=t.message,this.lastProbeTime=this.convertValues(t.lastProbeTime,exports.time.Time),this.lastTransitionTime=this.convertValues(t.lastTransitionTime,exports.time.Time)}static createFrom(t={}){return new S(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.HealthCondition=S;class P{constructor(t={}){e(this,"namespaces");e(this,"order");e(this,"pagination");typeof t=="string"&&(t=JSON.parse(t)),this.namespaces=t.namespaces,this.order=this.convertValues(t.order,_),this.pagination=this.convertValues(t.pagination,u)}static createFrom(t={}){return new P(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.ListInput=P;class N{constructor(t={}){e(this,"method");e(this,"fieldPath");e(this,"ownerRefKind");e(this,"labelSelector");typeof t=="string"&&(t=JSON.parse(t)),this.method=t.method,this.fieldPath=t.fieldPath,this.ownerRefKind=t.ownerRefKind,this.labelSelector=t.labelSelector}static createFrom(t={}){return new N(t)}}a.RelationshipExtractor=N;class F{constructor(t={}){e(this,"type");e(this,"targetResourceKey");e(this,"label");e(this,"inverseLabel");e(this,"cardinality");e(this,"extractor");typeof t=="string"&&(t=JSON.parse(t)),this.type=t.type,this.targetResourceKey=t.targetResourceKey,this.label=t.label,this.inverseLabel=t.inverseLabel,this.cardinality=t.cardinality,this.extractor=this.convertValues(t.extractor,N)}static createFrom(t={}){return new F(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.RelationshipDescriptor=F;class k{constructor(t={}){e(this,"pluginId");e(this,"connectionId");e(this,"resourceKey");e(this,"id");e(this,"namespace");e(this,"displayName");typeof t=="string"&&(t=JSON.parse(t)),this.pluginId=t.pluginId,this.connectionId=t.connectionId,this.resourceKey=t.resourceKey,this.id=t.id,this.namespace=t.namespace,this.displayName=t.displayName}static createFrom(t={}){return new k(t)}}a.ResourceRef=k;class I{constructor(t={}){e(this,"descriptor");e(this,"targets");typeof t=="string"&&(t=JSON.parse(t)),this.descriptor=this.convertValues(t.descriptor,F),this.targets=this.convertValues(t.targets,k)}static createFrom(t={}){return new I(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.ResolvedRelationship=I;class J{constructor(t={}){e(this,"level");e(this,"expectedCount");e(this,"defaultPageSize");typeof t=="string"&&(t=JSON.parse(t)),this.level=t.level,this.expectedCount=t.expectedCount,this.defaultPageSize=t.defaultPageSize}static createFrom(t={}){return new J(t)}}a.ScaleHint=J;class T{constructor(t={}){e(this,"canGet");e(this,"canList");e(this,"canFind");e(this,"canCreate");e(this,"canUpdate");e(this,"canDelete");e(this,"watchable");e(this,"filterable");e(this,"searchable");e(this,"hasActions");e(this,"hasSchema");e(this,"namespaceScoped");e(this,"hasRelationships");e(this,"hasHealth");e(this,"hasEvents");e(this,"scaleHint");typeof t=="string"&&(t=JSON.parse(t)),this.canGet=t.canGet,this.canList=t.canList,this.canFind=t.canFind,this.canCreate=t.canCreate,this.canUpdate=t.canUpdate,this.canDelete=t.canDelete,this.watchable=t.watchable,this.filterable=t.filterable,this.searchable=t.searchable,this.hasActions=t.hasActions,this.hasSchema=t.hasSchema,this.namespaceScoped=t.namespaceScoped,this.hasRelationships=t.hasRelationships,this.hasHealth=t.hasHealth,this.hasEvents=t.hasEvents,this.scaleHint=this.convertValues(t.scaleHint,J)}static createFrom(t={}){return new T(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.ResourceCapabilities=T;class A{constructor(t={}){e(this,"id_accessor");e(this,"namespace_accessor");e(this,"memoizer_accessor");e(this,"columnDefs");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,f)}static createFrom(t={}){return new A(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.ResourceDefinition=A;class C{constructor(t={}){e(this,"type");e(this,"reason");e(this,"message");e(this,"source");e(this,"count");e(this,"firstSeen");e(this,"lastSeen");typeof t=="string"&&(t=JSON.parse(t)),this.type=t.type,this.reason=t.reason,this.message=t.message,this.source=t.source,this.count=t.count,this.firstSeen=this.convertValues(t.firstSeen,exports.time.Time),this.lastSeen=this.convertValues(t.lastSeen,exports.time.Time)}static createFrom(t={}){return new C(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.ResourceEvent=C;class L{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 L(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.ResourceGroup=L;class M{constructor(t={}){e(this,"status");e(this,"reason");e(this,"message");e(this,"since");e(this,"conditions");typeof t=="string"&&(t=JSON.parse(t)),this.status=t.status,this.reason=t.reason,this.message=t.message,this.since=this.convertValues(t.since,exports.time.Time),this.conditions=this.convertValues(t.conditions,S)}static createFrom(t={}){return new M(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.ResourceHealth=M;class x{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 x(t)}}a.ResourceMeta=x;class E{constructor(t={}){e(this,"partitions");typeof t=="string"&&(t=JSON.parse(t)),this.partitions=t.partitions}static createFrom(t={}){return new E(t)}}a.WatchScope=E;class U{constructor(t={}){e(this,"connectionId");e(this,"resources");e(this,"resourceCounts");e(this,"scope");typeof t=="string"&&(t=JSON.parse(t)),this.connectionId=t.connectionId,this.resources=t.resources,this.resourceCounts=t.resourceCounts,this.scope=this.convertValues(t.scope,E)}static createFrom(t={}){return new U(t)}convertValues(t,y,w=!1){if(!t)return t;if(t.slice&&t.map)return t.map(c=>this.convertValues(c,y));if(typeof t=="object"){if(w){for(const c of Object.keys(t))t[c]=new y(t[c]);return t}return new y(t)}return t}}a.WatchConnectionSummary=U})(exports.resource||(exports.resource={}));exports.settings=void 0;(a=>{(m=>{m.TEXT="text",m.SELECT="select",m.MULTISELECT="multiselect",m.INTEGER="integer",m.FLOAT="float",m.TOGGLE="toggle",m.COLOR="color",m.DATETIME="datetime",m.PASSWORD="password"})(a.SettingType||(a.SettingType={}));class h{constructor(n={}){e(this,"enabled");e(this,"allowFolders");e(this,"extensions");e(this,"multiple");e(this,"relative");e(this,"defaultPath");typeof n=="string"&&(n=JSON.parse(n)),this.enabled=n.enabled,this.allowFolders=n.allowFolders,this.extensions=n.extensions,this.multiple=n.multiple,this.relative=n.relative,this.defaultPath=n.defaultPath}static createFrom(n={}){return new h(n)}}a.SettingFileSelection=h;class d{constructor(n={}){e(this,"label");e(this,"description");e(this,"value");typeof n=="string"&&(n=JSON.parse(n)),this.label=n.label,this.description=n.description,this.value=n.value}static createFrom(n={}){return new d(n)}}a.SettingOption=d;class p{constructor(n={}){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 n=="string"&&(n=JSON.parse(n)),this.id=n.id,this.label=n.label,this.description=n.description,this.type=n.type,this.value=n.value,this.default=n.default,this.options=this.convertValues(n.options,d),this.fileSelection=this.convertValues(n.fileSelection,h),this.sensitive=n.sensitive}static createFrom(n={}){return new p(n)}convertValues(n,l,i=!1){if(!n)return n;if(n.slice&&n.map)return n.map(s=>this.convertValues(s,l));if(typeof n=="object"){if(i){for(const s of Object.keys(n))n[s]=new l(n[s]);return n}return new l(n)}return n}}a.Setting=p;class o{constructor(n={}){e(this,"settings");e(this,"id");e(this,"label");e(this,"description");e(this,"icon");typeof n=="string"&&(n=JSON.parse(n)),this.settings=this.convertValues(n.settings,p,!0),this.id=n.id,this.label=n.label,this.description=n.description,this.icon=n.icon}static createFrom(n={}){return new o(n)}convertValues(n,l,i=!1){if(!n)return n;if(n.slice&&n.map)return n.map(s=>this.convertValues(s,l));if(typeof n=="object"){if(i){for(const s of Object.keys(n))n[s]=new l(n[s]);return n}return new l(n)}return n}}a.Category=o})(exports.settings||(exports.settings={}));exports.time=void 0;(a=>{class h{static createFrom(p={}){return new h(p)}constructor(p={}){typeof p=="string"&&(p=JSON.parse(p))}}a.Time=h})(exports.time||(exports.time={}));exports.trivy=void 0;(a=>{(p=>{p.CONFIG="config",p.FILESYSTEM="fs",p.IMAGE="image",p.KUBERNETES="kubernetes",p.REPOSITORY="repository",p.ROOTFS="rootfs",p.SBOM="sbom"})(a.Command||(a.Command={})),(p=>{p.VULN="vuln",p.MISCONFIG="misconfig",p.SECRET="secret",p.LICENSE="license"})(a.Scanner||(a.Scanner={}));class h{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 h(o)}}a.ScanOptions=h;class d{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 d(o)}convertValues(o,m,n=!1){if(!o)return o;if(o.slice&&o.map)return o.map(l=>this.convertValues(l,m));if(typeof o=="object"){if(n){for(const l of Object.keys(o))o[l]=new m(o[l]);return o}return new m(o)}return o}}a.ScanResult=d})(exports.trivy||(exports.trivy={}));exports.types=void 0;(a=>{(l=>{l.UNKNOWN="UNKNOWN",l.CONNECTED="CONNECTED",l.DISCONNECTED="DISCONNECTED",l.PENDING="PENDING",l.FAILED="FAILED",l.ERROR="ERROR",l.UNAUTHORIZED="UNAUTHORIZED",l.FORBIDDEN="FORBIDDEN",l.BAD_REQUEST="BAD_REQUEST",l.NOT_FOUND="NOT_FOUND",l.TIMEOUT="TIMEOUT",l.UNAVAILABLE="UNAVAILABLE",l.REQUEST_ENTITY_TOO_LARGE="REQUEST_ENTITY_TOO_LARGE"})(a.ConnectionStatusCode||(a.ConnectionStatusCode={}));class h{constructor(i={}){e(this,"enabled");e(this,"triggers");e(this,"retry");typeof i=="string"&&(i=JSON.parse(i)),this.enabled=i.enabled,this.triggers=i.triggers,this.retry=i.retry}static createFrom(i={}){return new h(i)}}a.ConnectionAutoConnect=h;class d{constructor(i={}){e(this,"auto_connect");typeof i=="string"&&(i=JSON.parse(i)),this.auto_connect=this.convertValues(i.auto_connect,h)}static createFrom(i={}){return new d(i)}convertValues(i,s,g=!1){if(!i)return i;if(i.slice&&i.map)return i.map(f=>this.convertValues(f,s));if(typeof i=="object"){if(g){for(const f of Object.keys(i))i[f]=new s(i[f]);return i}return new s(i)}return i}}a.ConnectionLifecycle=d;class p{constructor(i={}){e(this,"last_refresh");e(this,"data");e(this,"labels");e(this,"lifecycle");e(this,"id");e(this,"uid");e(this,"name");e(this,"description");e(this,"avatar");e(this,"expiry_time");e(this,"Client");typeof i=="string"&&(i=JSON.parse(i)),this.last_refresh=this.convertValues(i.last_refresh,exports.time.Time),this.data=i.data,this.labels=i.labels,this.lifecycle=this.convertValues(i.lifecycle,d),this.id=i.id,this.uid=i.uid,this.name=i.name,this.description=i.description,this.avatar=i.avatar,this.expiry_time=i.expiry_time,this.Client=i.Client}static createFrom(i={}){return new p(i)}convertValues(i,s,g=!1){if(!i)return i;if(i.slice&&i.map)return i.map(f=>this.convertValues(f,s));if(typeof i=="object"){if(g){for(const f of Object.keys(i))i[f]=new s(i[f]);return i}return new s(i)}return i}}a.Connection=p;class o{constructor(i={}){e(this,"connection");e(this,"status");e(this,"error");e(this,"details");typeof i=="string"&&(i=JSON.parse(i)),this.connection=this.convertValues(i.connection,p),this.status=i.status,this.error=i.error,this.details=i.details}static createFrom(i={}){return new o(i)}convertValues(i,s,g=!1){if(!i)return i;if(i.slice&&i.map)return i.map(f=>this.convertValues(f,s));if(typeof i=="object"){if(g){for(const f of Object.keys(i))i[f]=new s(i[f]);return i}return new s(i)}return i}}a.ConnectionStatus=o;class m{constructor(i={}){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 i=="string"&&(i=JSON.parse(i)),this.id=i.id,this.metadata=this.convertValues(i.metadata,exports.config.PluginMeta),this.phase=i.phase,this.enabled=i.enabled,this.devMode=i.devMode,this.devPath=i.devPath,this.capabilities=i.capabilities,this.lastError=i.lastError}static createFrom(i={}){return new m(i)}convertValues(i,s,g=!1){if(!i)return i;if(i.slice&&i.map)return i.map(f=>this.convertValues(f,s));if(typeof i=="object"){if(g){for(const f of Object.keys(i))i[f]=new s(i[f]);return i}return new s(i)}return i}}a.PluginInfo=m;class n{constructor(i={}){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 i=="string"&&(i=JSON.parse(i)),this.id=i.id,this.phase=i.phase,this.metadata=this.convertValues(i.metadata,exports.config.PluginMeta),this.enabled=i.enabled,this.devMode=i.devMode,this.devPath=i.devPath,this.lastError=i.lastError,this.errorCount=i.errorCount,this.installedAt=this.convertValues(i.installedAt,exports.time.Time)}static createFrom(i={}){return new n(i)}convertValues(i,s,g=!1){if(!i)return i;if(i.slice&&i.map)return i.map(f=>this.convertValues(f,s));if(typeof i=="object"){if(g){for(const f of Object.keys(i))i[f]=new s(i[f]);return i}return new s(i)}return i}}a.PluginStateRecord=n})(exports.types||(exports.types={}));exports.ui=void 0;(a=>{class h{constructor(n={}){e(this,"plugin");typeof n=="string"&&(n=JSON.parse(n)),this.plugin=n.plugin}static createFrom(n={}){return new h(n)}}a.GetPluginComponentsInput=h;class d{constructor(n={}){e(this,"plugin");e(this,"resource");e(this,"area");typeof n=="string"&&(n=JSON.parse(n)),this.plugin=n.plugin,this.resource=n.resource,this.area=n.area}static createFrom(n={}){return new d(n)}}a.GetResourceAreaComponentInput=d;class p{constructor(n={}){e(this,"plugin");e(this,"resource");typeof n=="string"&&(n=JSON.parse(n)),this.plugin=n.plugin,this.resource=n.resource}static createFrom(n={}){return new p(n)}}a.GetResourceComponentsInput=p;class o{constructor(n={}){e(this,"owner");e(this,"name");e(this,"plugin");e(this,"resource");e(this,"area");e(this,"extension");typeof n=="string"&&(n=JSON.parse(n)),this.owner=n.owner,this.name=n.name,this.plugin=n.plugin,this.resource=n.resource,this.area=n.area,this.extension=n.extension}static createFrom(n={}){return new o(n)}}a.ResourceComponent=o})(exports.ui||(exports.ui={}));exports.utils=void 0;(a=>{class h{constructor(p={}){e(this,"filename");e(this,"contents");typeof p=="string"&&(p=JSON.parse(p)),this.filename=p.filename,this.contents=p.contents}static createFrom(p={}){return new h(p)}}a.GetLanguageInput=h})(exports.utils||(exports.utils={}));
|
package/dist/models.js
CHANGED
|
@@ -1943,10 +1943,10 @@ var _;
|
|
|
1943
1943
|
var it;
|
|
1944
1944
|
((a) => {
|
|
1945
1945
|
((p) => {
|
|
1946
|
-
p.VULN = "vuln", p.MISCONFIG = "misconfig", p.SECRET = "secret", p.LICENSE = "license";
|
|
1947
|
-
})(a.Scanner || (a.Scanner = {})), ((p) => {
|
|
1948
1946
|
p.CONFIG = "config", p.FILESYSTEM = "fs", p.IMAGE = "image", p.KUBERNETES = "kubernetes", p.REPOSITORY = "repository", p.ROOTFS = "rootfs", p.SBOM = "sbom";
|
|
1949
|
-
})(a.Command || (a.Command = {}))
|
|
1947
|
+
})(a.Command || (a.Command = {})), ((p) => {
|
|
1948
|
+
p.VULN = "vuln", p.MISCONFIG = "misconfig", p.SECRET = "secret", p.LICENSE = "license";
|
|
1949
|
+
})(a.Scanner || (a.Scanner = {}));
|
|
1950
1950
|
class h {
|
|
1951
1951
|
constructor(o = {}) {
|
|
1952
1952
|
e(this, "filePatterns");
|
|
@@ -905,12 +905,6 @@ export declare namespace time {
|
|
|
905
905
|
}
|
|
906
906
|
}
|
|
907
907
|
export declare namespace trivy {
|
|
908
|
-
enum Scanner {
|
|
909
|
-
VULN = "vuln",
|
|
910
|
-
MISCONFIG = "misconfig",
|
|
911
|
-
SECRET = "secret",
|
|
912
|
-
LICENSE = "license"
|
|
913
|
-
}
|
|
914
908
|
enum Command {
|
|
915
909
|
CONFIG = "config",
|
|
916
910
|
FILESYSTEM = "fs",
|
|
@@ -920,11 +914,17 @@ export declare namespace trivy {
|
|
|
920
914
|
ROOTFS = "rootfs",
|
|
921
915
|
SBOM = "sbom"
|
|
922
916
|
}
|
|
917
|
+
enum Scanner {
|
|
918
|
+
VULN = "vuln",
|
|
919
|
+
MISCONFIG = "misconfig",
|
|
920
|
+
SECRET = "secret",
|
|
921
|
+
LICENSE = "license"
|
|
922
|
+
}
|
|
923
923
|
class ScanOptions {
|
|
924
924
|
filePatterns: string[];
|
|
925
925
|
skipDirs: string[];
|
|
926
926
|
skipFiles: string[];
|
|
927
|
-
scanners:
|
|
927
|
+
scanners: Scanner[];
|
|
928
928
|
static createFrom(source?: any): ScanOptions;
|
|
929
929
|
constructor(source?: any);
|
|
930
930
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { types, resource } from '../models';
|
|
2
2
|
export function AddConnection(arg1:string,arg2:types.Connection):Promise<void>;
|
|
3
3
|
|
|
4
|
+
export function CheckConnection(arg1:string,arg2:string):Promise<types.ConnectionStatus>;
|
|
5
|
+
|
|
4
6
|
export function Create(arg1:string,arg2:string,arg3:string,arg4:resource.ClientCreateInput):Promise<resource.ClientResult>;
|
|
5
7
|
|
|
6
8
|
export function Delete(arg1:string,arg2:string,arg3:string,arg4:resource.DeleteInput):Promise<resource.ClientResult>;
|