@omniviewdev/runtime 0.2.0 → 0.2.2
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/hooks/resource/useResource.d.ts +3 -3
- package/dist/hooks/resource/useResourceMutations.d.ts +3 -3
- package/dist/hooks/resource/useResourceSearch.d.ts +1 -1
- package/dist/hooks/resource/useResources.d.ts +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.js +57 -57
- package/dist/models.cjs +1 -1
- package/dist/models.js +302 -348
- package/dist/types/extensions.d.ts +14 -4
- package/dist/types/homepage.d.ts +25 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/wailsjs/go/models.d.ts +33 -59
- package/dist/wailsjs/go/resource/Client.d.ts +9 -9
- package/package.json +1 -1
|
@@ -56,7 +56,7 @@ export type RegisterOpts<Props> = {
|
|
|
56
56
|
/**
|
|
57
57
|
* The component to render
|
|
58
58
|
*/
|
|
59
|
-
component: React.
|
|
59
|
+
component: React.ComponentType<Props>;
|
|
60
60
|
/**
|
|
61
61
|
* Additional optional metadata for the component
|
|
62
62
|
*/
|
|
@@ -99,6 +99,16 @@ export type CreateExtensionPointOptions<ComponentProps> = ExtensionPointSettings
|
|
|
99
99
|
*/
|
|
100
100
|
matcher?: (context: ExtensionRenderContext, item: Registration<ComponentProps>) => boolean;
|
|
101
101
|
};
|
|
102
|
+
/**
|
|
103
|
+
* A registration entry that a plugin exports to register a component into an extension point.
|
|
104
|
+
* The host app processes these at plugin load time.
|
|
105
|
+
*/
|
|
106
|
+
export type ExtensionRegistration<Props = any> = {
|
|
107
|
+
/** The ID of the extension point to register into */
|
|
108
|
+
extensionPointId: string;
|
|
109
|
+
/** The registration options for the component */
|
|
110
|
+
registration: RegisterOpts<Props>;
|
|
111
|
+
};
|
|
102
112
|
/**
|
|
103
113
|
* A registry to hold an extension points registered extensions, providing type safe access to the components.
|
|
104
114
|
*
|
|
@@ -146,7 +156,7 @@ export declare class ExtensionPointStore<ComponentProps> {
|
|
|
146
156
|
* render(component);
|
|
147
157
|
* }
|
|
148
158
|
*/
|
|
149
|
-
get(id: string): import('react').
|
|
159
|
+
get(id: string): import('react').ComponentType<ComponentProps> | undefined;
|
|
150
160
|
/**
|
|
151
161
|
* Lists all registered components in the registry. Useful for debugging or generating summaries of available components.
|
|
152
162
|
*
|
|
@@ -174,8 +184,8 @@ export declare class ExtensionPointStore<ComponentProps> {
|
|
|
174
184
|
/**
|
|
175
185
|
* Provide the components that match the given context.
|
|
176
186
|
*/
|
|
177
|
-
provide(context: ExtensionRenderContext): Array<React.
|
|
178
|
-
reorderComponents(components: Array<React.
|
|
187
|
+
provide(context: ExtensionRenderContext): Array<React.ComponentType<ComponentProps>>;
|
|
188
|
+
reorderComponents(components: Array<React.ComponentType<ComponentProps>>, ids: string[], order: string[]): Array<React.ComponentType<ComponentProps>>;
|
|
179
189
|
/**
|
|
180
190
|
* Reorder the components in the registry based on the given order.
|
|
181
191
|
*/
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Types for the omniview/home/card extension point.
|
|
4
|
+
* Plugins that contribute homepage cards import these types.
|
|
5
|
+
*/
|
|
6
|
+
export type HomepageCardSection = 'recent' | 'favorites' | 'folders' | (string & {});
|
|
7
|
+
export type HomepageCardConfig = {
|
|
8
|
+
sections: HomepageCardSection[];
|
|
9
|
+
maxItems?: number;
|
|
10
|
+
};
|
|
11
|
+
export type HomepageCardProps = {
|
|
12
|
+
pluginID: string;
|
|
13
|
+
config: HomepageCardConfig;
|
|
14
|
+
};
|
|
15
|
+
export type HomepageCardMeta = {
|
|
16
|
+
label: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
defaultConfig: HomepageCardConfig;
|
|
19
|
+
defaultWidth?: 'small' | 'medium' | 'large';
|
|
20
|
+
/** Optional icon component rendered in the card header instead of the text label. */
|
|
21
|
+
icon?: React.ComponentType<{
|
|
22
|
+
size?: number;
|
|
23
|
+
color?: string;
|
|
24
|
+
}>;
|
|
25
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -564,6 +564,33 @@ export declare namespace resource {
|
|
|
564
564
|
static createFrom(source?: any): ActionResult;
|
|
565
565
|
constructor(source?: any);
|
|
566
566
|
}
|
|
567
|
+
class ClientCreateInput {
|
|
568
|
+
input: any;
|
|
569
|
+
namespace: string;
|
|
570
|
+
static createFrom(source?: any): ClientCreateInput;
|
|
571
|
+
constructor(source?: any);
|
|
572
|
+
}
|
|
573
|
+
class ClientListResult {
|
|
574
|
+
result: any[];
|
|
575
|
+
success: boolean;
|
|
576
|
+
totalCount: number;
|
|
577
|
+
nextCursor?: string;
|
|
578
|
+
static createFrom(source?: any): ClientListResult;
|
|
579
|
+
constructor(source?: any);
|
|
580
|
+
}
|
|
581
|
+
class ClientResult {
|
|
582
|
+
result: any;
|
|
583
|
+
success: boolean;
|
|
584
|
+
static createFrom(source?: any): ClientResult;
|
|
585
|
+
constructor(source?: any);
|
|
586
|
+
}
|
|
587
|
+
class ClientUpdateInput {
|
|
588
|
+
input: any;
|
|
589
|
+
id: string;
|
|
590
|
+
namespace: string;
|
|
591
|
+
static createFrom(source?: any): ClientUpdateInput;
|
|
592
|
+
constructor(source?: any);
|
|
593
|
+
}
|
|
567
594
|
class ResourceLink {
|
|
568
595
|
idAccessor: string;
|
|
569
596
|
namespaceAccessor: string;
|
|
@@ -595,18 +622,6 @@ export declare namespace resource {
|
|
|
595
622
|
constructor(source?: any);
|
|
596
623
|
convertValues(a: any, classs: any, asMap?: boolean): any;
|
|
597
624
|
}
|
|
598
|
-
class CreateInput {
|
|
599
|
-
input: number[];
|
|
600
|
-
namespace: string;
|
|
601
|
-
static createFrom(source?: any): CreateInput;
|
|
602
|
-
constructor(source?: any);
|
|
603
|
-
}
|
|
604
|
-
class CreateResult {
|
|
605
|
-
result: number[];
|
|
606
|
-
success: boolean;
|
|
607
|
-
static createFrom(source?: any): CreateResult;
|
|
608
|
-
constructor(source?: any);
|
|
609
|
-
}
|
|
610
625
|
class DeleteInput {
|
|
611
626
|
id: string;
|
|
612
627
|
namespace: string;
|
|
@@ -614,12 +629,6 @@ export declare namespace resource {
|
|
|
614
629
|
static createFrom(source?: any): DeleteInput;
|
|
615
630
|
constructor(source?: any);
|
|
616
631
|
}
|
|
617
|
-
class DeleteResult {
|
|
618
|
-
result: number[];
|
|
619
|
-
success: boolean;
|
|
620
|
-
static createFrom(source?: any): DeleteResult;
|
|
621
|
-
constructor(source?: any);
|
|
622
|
-
}
|
|
623
632
|
class EditorSchema {
|
|
624
633
|
resourceKey: string;
|
|
625
634
|
fileMatch: string;
|
|
@@ -679,26 +688,12 @@ export declare namespace resource {
|
|
|
679
688
|
constructor(source?: any);
|
|
680
689
|
convertValues(a: any, classs: any, asMap?: boolean): any;
|
|
681
690
|
}
|
|
682
|
-
class FindResult {
|
|
683
|
-
result: number[][];
|
|
684
|
-
success: boolean;
|
|
685
|
-
totalCount: number;
|
|
686
|
-
nextCursor?: string;
|
|
687
|
-
static createFrom(source?: any): FindResult;
|
|
688
|
-
constructor(source?: any);
|
|
689
|
-
}
|
|
690
691
|
class GetInput {
|
|
691
692
|
id: string;
|
|
692
693
|
namespace: string;
|
|
693
694
|
static createFrom(source?: any): GetInput;
|
|
694
695
|
constructor(source?: any);
|
|
695
696
|
}
|
|
696
|
-
class GetResult {
|
|
697
|
-
result: number[];
|
|
698
|
-
success: boolean;
|
|
699
|
-
static createFrom(source?: any): GetResult;
|
|
700
|
-
constructor(source?: any);
|
|
701
|
-
}
|
|
702
697
|
class HealthCondition {
|
|
703
698
|
type: string;
|
|
704
699
|
status: string;
|
|
@@ -718,14 +713,6 @@ export declare namespace resource {
|
|
|
718
713
|
constructor(source?: any);
|
|
719
714
|
convertValues(a: any, classs: any, asMap?: boolean): any;
|
|
720
715
|
}
|
|
721
|
-
class ListResult {
|
|
722
|
-
result: number[][];
|
|
723
|
-
success: boolean;
|
|
724
|
-
totalCount: number;
|
|
725
|
-
nextCursor?: string;
|
|
726
|
-
static createFrom(source?: any): ListResult;
|
|
727
|
-
constructor(source?: any);
|
|
728
|
-
}
|
|
729
716
|
class RelationshipExtractor {
|
|
730
717
|
method: string;
|
|
731
718
|
fieldPath?: string;
|
|
@@ -842,19 +829,6 @@ export declare namespace resource {
|
|
|
842
829
|
static createFrom(source?: any): ResourceMeta;
|
|
843
830
|
constructor(source?: any);
|
|
844
831
|
}
|
|
845
|
-
class UpdateInput {
|
|
846
|
-
input: number[];
|
|
847
|
-
id: string;
|
|
848
|
-
namespace: string;
|
|
849
|
-
static createFrom(source?: any): UpdateInput;
|
|
850
|
-
constructor(source?: any);
|
|
851
|
-
}
|
|
852
|
-
class UpdateResult {
|
|
853
|
-
result: number[];
|
|
854
|
-
success: boolean;
|
|
855
|
-
static createFrom(source?: any): UpdateResult;
|
|
856
|
-
constructor(source?: any);
|
|
857
|
-
}
|
|
858
832
|
class WatchScope {
|
|
859
833
|
partitions?: string[];
|
|
860
834
|
static createFrom(source?: any): WatchScope;
|
|
@@ -931,6 +905,12 @@ export declare namespace time {
|
|
|
931
905
|
}
|
|
932
906
|
}
|
|
933
907
|
export declare namespace trivy {
|
|
908
|
+
enum Scanner {
|
|
909
|
+
VULN = "vuln",
|
|
910
|
+
MISCONFIG = "misconfig",
|
|
911
|
+
SECRET = "secret",
|
|
912
|
+
LICENSE = "license"
|
|
913
|
+
}
|
|
934
914
|
enum Command {
|
|
935
915
|
CONFIG = "config",
|
|
936
916
|
FILESYSTEM = "fs",
|
|
@@ -940,12 +920,6 @@ export declare namespace trivy {
|
|
|
940
920
|
ROOTFS = "rootfs",
|
|
941
921
|
SBOM = "sbom"
|
|
942
922
|
}
|
|
943
|
-
enum Scanner {
|
|
944
|
-
VULN = "vuln",
|
|
945
|
-
MISCONFIG = "misconfig",
|
|
946
|
-
SECRET = "secret",
|
|
947
|
-
LICENSE = "license"
|
|
948
|
-
}
|
|
949
923
|
class ScanOptions {
|
|
950
924
|
filePatterns: string[];
|
|
951
925
|
skipDirs: string[];
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { types, resource
|
|
1
|
+
import { types, resource } from '../models';
|
|
2
2
|
export function AddConnection(arg1:string,arg2:types.Connection):Promise<void>;
|
|
3
3
|
|
|
4
|
-
export function Create(arg1:string,arg2:string,arg3:string,arg4:resource.
|
|
4
|
+
export function Create(arg1:string,arg2:string,arg3:string,arg4:resource.ClientCreateInput):Promise<resource.ClientResult>;
|
|
5
5
|
|
|
6
|
-
export function Delete(arg1:string,arg2:string,arg3:string,arg4:resource.DeleteInput):Promise<resource.
|
|
6
|
+
export function Delete(arg1:string,arg2:string,arg3:string,arg4:resource.DeleteInput):Promise<resource.ClientResult>;
|
|
7
7
|
|
|
8
8
|
export function EnsureResourceWatch(arg1:string,arg2:string,arg3:string):Promise<void>;
|
|
9
9
|
|
|
10
10
|
export function ExecuteAction(arg1:string,arg2:string,arg3:string,arg4:string,arg5:resource.ActionInput):Promise<resource.ActionResult>;
|
|
11
11
|
|
|
12
|
-
export function Find(arg1:string,arg2:string,arg3:string,arg4:resource.FindInput):Promise<resource.
|
|
12
|
+
export function Find(arg1:string,arg2:string,arg3:string,arg4:resource.FindInput):Promise<resource.ClientListResult>;
|
|
13
13
|
|
|
14
|
-
export function Get(arg1:string,arg2:string,arg3:string,arg4:resource.GetInput):Promise<resource.
|
|
14
|
+
export function Get(arg1:string,arg2:string,arg3:string,arg4:resource.GetInput):Promise<resource.ClientResult>;
|
|
15
15
|
|
|
16
16
|
export function GetActions(arg1:string,arg2:string,arg3:string):Promise<Array<resource.ActionDescriptor>>;
|
|
17
17
|
|
|
@@ -25,7 +25,7 @@ export function GetEditorSchemas(arg1:string,arg2:string):Promise<Array<resource
|
|
|
25
25
|
|
|
26
26
|
export function GetFilterFields(arg1:string,arg2:string,arg3:string):Promise<Array<resource.FilterField>>;
|
|
27
27
|
|
|
28
|
-
export function GetHealth(arg1:string,arg2:string,arg3:string,arg4:
|
|
28
|
+
export function GetHealth(arg1:string,arg2:string,arg3:string,arg4:any):Promise<resource.ResourceHealth>;
|
|
29
29
|
|
|
30
30
|
export function GetRelationships(arg1:string,arg2:string):Promise<Array<resource.RelationshipDescriptor>>;
|
|
31
31
|
|
|
@@ -39,7 +39,7 @@ export function GetResourceGroup(arg1:string,arg2:string):Promise<resource.Resou
|
|
|
39
39
|
|
|
40
40
|
export function GetResourceGroups(arg1:string,arg2:string):Promise<Record<string, resource.ResourceGroup>>;
|
|
41
41
|
|
|
42
|
-
export function GetResourceSchema(arg1:string,arg2:string,arg3:string):Promise<
|
|
42
|
+
export function GetResourceSchema(arg1:string,arg2:string,arg3:string):Promise<any>;
|
|
43
43
|
|
|
44
44
|
export function GetResourceType(arg1:string,arg2:string):Promise<resource.ResourceMeta>;
|
|
45
45
|
|
|
@@ -51,7 +51,7 @@ export function HasResourceType(arg1:string,arg2:string):Promise<boolean>;
|
|
|
51
51
|
|
|
52
52
|
export function IsResourceWatchRunning(arg1:string,arg2:string,arg3:string):Promise<boolean>;
|
|
53
53
|
|
|
54
|
-
export function List(arg1:string,arg2:string,arg3:string,arg4:resource.ListInput):Promise<resource.
|
|
54
|
+
export function List(arg1:string,arg2:string,arg3:string,arg4:resource.ListInput):Promise<resource.ClientListResult>;
|
|
55
55
|
|
|
56
56
|
export function ListAllConnections():Promise<Record<string, Array<types.Connection>>>;
|
|
57
57
|
|
|
@@ -83,6 +83,6 @@ export function SubscribeResource(arg1:string,arg2:string,arg3:string):Promise<v
|
|
|
83
83
|
|
|
84
84
|
export function UnsubscribeResource(arg1:string,arg2:string,arg3:string):Promise<void>;
|
|
85
85
|
|
|
86
|
-
export function Update(arg1:string,arg2:string,arg3:string,arg4:resource.
|
|
86
|
+
export function Update(arg1:string,arg2:string,arg3:string,arg4:resource.ClientUpdateInput):Promise<resource.ClientResult>;
|
|
87
87
|
|
|
88
88
|
export function UpdateConnection(arg1:string,arg2:types.Connection):Promise<types.Connection>;
|