@omniviewdev/runtime 0.1.10 → 0.2.0

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.
Files changed (42) hide show
  1. package/dist/Client-BRYjLBXY.cjs +1 -0
  2. package/dist/{Client-DRRyPmcf.js → Client-RGYOEzh2.js} +312 -275
  3. package/dist/api.cjs +1 -1
  4. package/dist/api.d.ts +1 -0
  5. package/dist/api.js +95 -51
  6. package/dist/context/drawer/types.d.ts +1 -1
  7. package/dist/errors/types.d.ts +2 -0
  8. package/dist/hooks/connection/useConnectionStatus.d.ts +3 -3
  9. package/dist/hooks/connection/useConnections.d.ts +2 -2
  10. package/dist/hooks/resource/index.d.ts +2 -1
  11. package/dist/hooks/resource/useActiveSyncs.d.ts +2 -2
  12. package/dist/hooks/resource/useEditorSchemas.d.ts +2 -2
  13. package/dist/hooks/resource/useEventBatcher.d.ts +55 -0
  14. package/dist/hooks/resource/useResource.d.ts +9 -21
  15. package/dist/hooks/resource/useResourceActions.d.ts +3 -3
  16. package/dist/hooks/resource/useResourceGroups.d.ts +1 -1
  17. package/dist/hooks/resource/useResourceMutations.d.ts +14 -7
  18. package/dist/hooks/resource/useResourceSearch.d.ts +1 -1
  19. package/dist/hooks/resource/useResourceType.d.ts +1 -1
  20. package/dist/hooks/resource/useResourceTypes.d.ts +1 -1
  21. package/dist/hooks/resource/useResources.d.ts +14 -22
  22. package/dist/hooks/resource/useWatchState.d.ts +28 -0
  23. package/dist/index.cjs +2 -2
  24. package/dist/index.d.ts +1 -0
  25. package/dist/index.js +1406 -1295
  26. package/dist/models.cjs +1 -1
  27. package/dist/models.js +1343 -972
  28. package/dist/types/index.d.ts +1 -1
  29. package/dist/types/watch.d.ts +29 -0
  30. package/dist/utils/activeSyncAggregator.d.ts +13 -8
  31. package/dist/utils/resourceKey.d.ts +12 -0
  32. package/dist/wailsjs/go/devserver/DevServerManager.d.ts +2 -0
  33. package/dist/wailsjs/go/models.d.ts +400 -214
  34. package/dist/wailsjs/go/plugin/pluginManager.d.ts +3 -1
  35. package/dist/wailsjs/go/pluginlog/Manager.d.ts +18 -0
  36. package/dist/wailsjs/go/resource/Client.d.ts +39 -23
  37. package/package.json +1 -1
  38. package/dist/Client-BtQwAB3N.cjs +0 -1
  39. package/dist/errors/parseAppError.test.d.ts +0 -1
  40. package/dist/hooks/resource/useInformerState.d.ts +0 -24
  41. package/dist/types/informer.d.ts +0 -49
  42. package/dist/utils/activeSyncAggregator.test.d.ts +0 -1
@@ -1,4 +1,4 @@
1
1
  export * from './app';
2
2
  export * from './plugin';
3
3
  export * from './extensions';
4
- export * from './informer';
4
+ export * from './watch';
@@ -0,0 +1,29 @@
1
+ import { resource } from '../wailsjs/go/models';
2
+ export type WatchState = resource.WatchState;
3
+ export declare const WatchState: typeof resource.WatchState;
4
+ export type SyncPolicy = resource.SyncPolicy;
5
+ export declare const SyncPolicy: typeof resource.SyncPolicy;
6
+ /**
7
+ * WatchStateEvent is emitted when a resource's watch state changes.
8
+ * Matches Go type: plugin-sdk/pkg/v1/resource.WatchStateEvent
9
+ */
10
+ export interface WatchStateEvent {
11
+ pluginId: string;
12
+ connection: string;
13
+ resourceKey: string;
14
+ state: WatchState;
15
+ resourceCount: number;
16
+ message?: string;
17
+ errorCode?: string;
18
+ }
19
+ /**
20
+ * WatchConnectionSummary provides an aggregate view of all watch states for a connection.
21
+ */
22
+ export interface WatchConnectionSummary {
23
+ connection: string;
24
+ resources: Record<string, WatchState>;
25
+ resourceCounts: Record<string, number>;
26
+ totalResources: number;
27
+ syncedCount: number;
28
+ errorCount: number;
29
+ }
@@ -1,29 +1,34 @@
1
- import { InformerResourceState, InformerStateEvent } from '../types/informer';
1
+ import { WatchState, WatchStateEvent } from '../types/watch';
2
2
  export interface ActiveSync {
3
3
  pluginID: string;
4
4
  connectionID: string;
5
+ /** Total resources including skipped */
5
6
  totalResources: number;
7
+ /** Total watched resources (excluding skipped) */
8
+ watchedTotal: number;
6
9
  syncedCount: number;
7
10
  errorCount: number;
8
- /** Count of resources in any terminal state (Synced + Error + Cancelled) */
11
+ forbiddenCount: number;
12
+ skippedCount: number;
13
+ /** Count of watched resources in any terminal state (Synced + Error + Stopped + Failed + Forbidden) */
9
14
  doneCount: number;
10
- /** 0-1 progress fraction */
15
+ /** 0-1 progress fraction based on watched resources only */
11
16
  progress: number;
12
17
  }
13
18
  export interface ResourceTracker {
14
- states: Record<string, InformerResourceState>;
19
+ states: Record<string, WatchState>;
15
20
  pluginID: string;
16
21
  connectionID: string;
17
22
  }
18
23
  /** Compute an ActiveSync from a ResourceTracker */
19
24
  export declare function computeActiveSync(tracker: ResourceTracker): ActiveSync;
20
- /** Whether a sync is considered "done" (all resources reached terminal state) */
25
+ /** Whether a sync is considered "done" (all watched resources reached terminal state) */
21
26
  export declare function isSyncDone(sync: ActiveSync): boolean;
22
27
  /** Whether any syncs are still actively in progress */
23
28
  export declare function hasActiveSyncing(syncs: ActiveSync[]): boolean;
24
- /** Compute aggregate progress across multiple syncs */
29
+ /** Compute aggregate progress across multiple syncs (watched resources only) */
25
30
  export declare function aggregateProgress(syncs: ActiveSync[]): number;
26
31
  /** Build a tracker key from an event */
27
- export declare function trackerKey(event: InformerStateEvent): string;
32
+ export declare function trackerKey(event: WatchStateEvent): string;
28
33
  /** Update a trackers map with a new event, returning the updated tracker */
29
- export declare function updateTracker(trackers: Map<string, ResourceTracker>, event: InformerStateEvent): ResourceTracker;
34
+ export declare function updateTracker(trackers: Map<string, ResourceTracker>, event: WatchStateEvent): ResourceTracker;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Pure utility functions for parsing and formatting resource keys.
3
+ * Resource keys follow the SDK format "group::version::Kind" (e.g. "core::v1::Pod").
4
+ */
5
+ /** Parse a resource key like "core::v1::Pod" into { group, version, kind } */
6
+ export declare const parseResourceKey: (key: string) => {
7
+ group: string;
8
+ version: string;
9
+ kind: string;
10
+ };
11
+ /** Pretty-print group name: "core" -> "Core", "apps" -> "Apps" */
12
+ export declare const formatGroup: (group: string) => string;
@@ -11,6 +11,8 @@ export function IsManaged(arg1:string):Promise<boolean>;
11
11
 
12
12
  export function ListDevServerStates():Promise<Array<devserver.DevServerState>>;
13
13
 
14
+ export function RebuildPlugin(arg1:string):Promise<void>;
15
+
14
16
  export function RestartDevServer(arg1:string):Promise<devserver.DevServerState>;
15
17
 
16
18
  export function Shutdown():Promise<void>;