Skip to content

Commit 467bb76

Browse files
authored
Merge pull request #57 from webzard-io/bowen/export-kubeapi
feat: export kubeApi types
2 parents 3b6e1b9 + d7d8da1 commit 467bb76

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "k8s-api-provider",
3-
"version": "0.0.31",
3+
"version": "0.0.32",
44
"description": "K8s ui data provider",
55
"main": "lib/index.js",
66
"module": "lib/index.js",

src/kube-api.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export type Unstructured = {
3333
metadata?: ObjectMeta;
3434
};
3535

36-
type KubeApiQueryParams = {
36+
export type KubeApiQueryParams = {
3737
watch?: boolean | number;
3838
resourceVersion?: string;
3939
timeoutSeconds?: number;
@@ -58,7 +58,7 @@ type ResourceDescriptor = {
5858
namespace?: string;
5959
};
6060

61-
type KubeApiListOptions = {
61+
export type KubeApiListOptions = {
6262
namespace?: string;
6363
query?: KubeApiQueryParams;
6464
fetchOptions?: Options;
@@ -84,7 +84,7 @@ type KubeObjectConstructor = {
8484
resource: string;
8585
};
8686

87-
type KubeApiOptions = {
87+
export type KubeApiOptions = {
8888
basePath: string;
8989
watchWsBasePath?: string;
9090
kubeApiTimeout?: number | false;
@@ -235,7 +235,7 @@ export class KubeApi<T extends UnstructuredList> {
235235
private basePath: string;
236236
private resourceBasePath: string;
237237
private namespace?: string;
238-
private resource: string;
238+
resource: string;
239239
private maxTimeout = Math.pow(2, 10) * 1000;
240240
private retryTimes = 0;
241241
private retryTimer: ReturnType<typeof setTimeout> | undefined;
@@ -611,7 +611,7 @@ export class KubeApi<T extends UnstructuredList> {
611611
return stop;
612612
}
613613

614-
private getUrl(
614+
getUrl(
615615
{ name, namespace }: Partial<ResourceDescriptor> = {},
616616
query?: Partial<KubeApiQueryParams>,
617617
watch?: boolean

0 commit comments

Comments
 (0)