@k8slens/extensions 5.3.1-git.7973f4bce2.0 → 5.3.1-git.8082501bb3.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 (113) hide show
  1. package/dist/src/common/catalog/catalog-entity.d.ts +51 -0
  2. package/dist/src/common/cluster-types.d.ts +5 -1
  3. package/dist/src/{extensions/registries/menu-registry.d.ts → common/ipc/catalog.d.ts} +9 -6
  4. package/dist/src/{renderer/utils/copyToClipboard.d.ts → common/ipc/extension-loader.ipc.d.ts} +1 -7
  5. package/dist/src/common/ipc/index.d.ts +1 -0
  6. package/dist/src/common/k8s-api/kube-api-parse.d.ts +2 -2
  7. package/dist/src/common/k8s-api/kube-api.d.ts +29 -5
  8. package/dist/src/common/k8s-api/kube-json-api.d.ts +1 -2
  9. package/dist/src/common/protocol-handler/router.d.ts +8 -2
  10. package/dist/src/common/user-store/preferences-helpers.d.ts +14 -0
  11. package/dist/src/common/user-store/user-store.d.ts +2 -1
  12. package/dist/src/common/utils/index.d.ts +1 -0
  13. package/dist/src/common/utils/promise-exec.d.ts +1 -2
  14. package/dist/src/common/utils/readableStream.d.ts +2 -2
  15. package/dist/src/extensions/extension-api.js +949 -843
  16. package/dist/src/extensions/extension-compatibility.d.ts +3 -1
  17. package/dist/src/extensions/extension-discovery.d.ts +3 -1
  18. package/dist/src/extensions/{extension-loader.d.ts → extension-loader/extension-loader.d.ts} +15 -7
  19. package/dist/src/extensions/extension-loader/extension-loader.injectable.d.ts +24 -0
  20. package/dist/src/{renderer/components/clipboard → extensions/extension-loader}/index.d.ts +1 -1
  21. package/dist/src/extensions/extensions.injectable.d.ts +28 -0
  22. package/dist/src/extensions/getDiForUnitTesting.d.ts +22 -0
  23. package/dist/src/extensions/lens-extension.d.ts +2 -1
  24. package/dist/src/extensions/lens-main-extension.d.ts +1 -1
  25. package/dist/src/extensions/lens-renderer-extension.d.ts +6 -3
  26. package/dist/src/extensions/registries/index.d.ts +0 -1
  27. package/dist/src/extensions/renderer-api/k8s-api.d.ts +1 -0
  28. package/dist/src/main/catalog-pusher.d.ts +1 -1
  29. package/dist/src/main/cluster-manager.d.ts +1 -1
  30. package/dist/src/main/getDi.d.ts +22 -0
  31. package/dist/src/main/getDiForUnitTesting.d.ts +22 -0
  32. package/dist/src/main/helm/helm-release-manager.d.ts +9 -10
  33. package/dist/src/main/helm/helm-repo-manager.d.ts +2 -2
  34. package/dist/src/main/helm/helm-service.d.ts +2 -2
  35. package/dist/src/main/initializers/index.d.ts +0 -1
  36. package/dist/src/main/initializers/ipc.d.ts +3 -1
  37. package/dist/src/main/lens-proxy.d.ts +8 -1
  38. package/dist/src/main/menu/electron-menu-items.injectable.d.ts +28 -0
  39. package/dist/src/main/menu/electron-menu-items.test.d.ts +1 -0
  40. package/dist/src/main/menu/menu.d.ts +33 -0
  41. package/dist/src/main/protocol-handler/index.d.ts +1 -1
  42. package/dist/src/main/protocol-handler/{router.d.ts → lens-protocol-router-main/lens-protocol-router-main.d.ts} +10 -5
  43. package/dist/src/main/protocol-handler/lens-protocol-router-main/lens-protocol-router-main.injectable.d.ts +25 -0
  44. package/dist/src/main/window-manager.d.ts +3 -0
  45. package/dist/src/renderer/api/terminal-api.d.ts +0 -2
  46. package/dist/src/renderer/bootstrap.d.ts +3 -1
  47. package/dist/src/renderer/cluster-frame.d.ts +2 -1
  48. package/dist/src/renderer/components/+catalog/catalog-entity-details.d.ts +3 -3
  49. package/dist/src/renderer/components/+catalog/catalog-entity-drawer-menu.d.ts +1 -2
  50. package/dist/src/renderer/components/+catalog/catalog-entity.store.d.ts +4 -4
  51. package/dist/src/renderer/components/+catalog/catalog.d.ts +5 -6
  52. package/dist/src/renderer/components/+catalog/helpers.d.ts +26 -0
  53. package/dist/src/renderer/components/{clipboard/clipboard.d.ts → +extensions/attempt-install/attempt-install.d.ts} +10 -16
  54. package/dist/src/{main/menu.d.ts → renderer/components/+extensions/attempt-install/attempt-install.injectable.d.ts} +6 -6
  55. package/dist/src/renderer/components/+extensions/attempt-install/create-temp-files-and-validate/create-temp-files-and-validate.d.ts +11 -0
  56. package/dist/src/renderer/components/+extensions/attempt-install/get-extension-dest-folder/get-extension-dest-folder.d.ts +1 -0
  57. package/dist/src/renderer/components/+extensions/attempt-install/unpack-extension/unpack-extension.d.ts +27 -0
  58. package/dist/src/renderer/components/+extensions/attempt-install/unpack-extension/unpack-extension.injectable.d.ts +26 -0
  59. package/dist/src/renderer/components/+extensions/attempt-install/validate-package/validate-package.d.ts +22 -0
  60. package/dist/src/renderer/components/+extensions/attempt-install-by-info/attempt-install-by-info.d.ts +12 -0
  61. package/dist/src/renderer/components/+extensions/attempt-install-by-info/attempt-install-by-info.injectable.d.ts +24 -0
  62. package/dist/src/renderer/components/+extensions/attempt-installs/attempt-installs.d.ts +5 -0
  63. package/dist/src/renderer/components/+extensions/attempt-installs/attempt-installs.injectable.d.ts +24 -0
  64. package/dist/src/renderer/components/+extensions/confirm-uninstall-extension/confirm-uninstall-extension.d.ts +6 -0
  65. package/dist/src/renderer/components/+extensions/confirm-uninstall-extension/confirm-uninstall-extension.injectable.d.ts +25 -0
  66. package/dist/src/renderer/components/+extensions/disable-extension/disable-extension.d.ts +26 -0
  67. package/dist/src/renderer/components/+extensions/disable-extension/disable-extension.injectable.d.ts +25 -0
  68. package/dist/src/renderer/components/+extensions/enable-extension/enable-extension.d.ts +26 -0
  69. package/dist/src/renderer/components/+extensions/enable-extension/enable-extension.injectable.d.ts +25 -0
  70. package/dist/src/renderer/components/+extensions/extensions.d.ts +1 -15
  71. package/dist/src/renderer/components/+extensions/get-base-registry-url/get-base-registry-url.d.ts +25 -0
  72. package/dist/src/renderer/components/+extensions/get-base-registry-url/get-base-registry-url.injectable.d.ts +24 -0
  73. package/dist/src/renderer/components/+extensions/get-message-from-error/get-message-from-error.d.ts +21 -0
  74. package/dist/src/renderer/components/+extensions/install-from-input/install-from-input.d.ts +28 -0
  75. package/dist/src/renderer/components/+extensions/install-from-input/install-from-input.injectable.d.ts +24 -0
  76. package/dist/src/renderer/components/+extensions/install-from-select-file-dialog/install-from-select-file-dialog.d.ts +4 -0
  77. package/dist/src/renderer/components/+extensions/install-from-select-file-dialog/install-from-select-file-dialog.injectable.d.ts +24 -0
  78. package/dist/src/renderer/components/+extensions/install-on-drop/install-on-drop.d.ts +4 -0
  79. package/dist/src/renderer/components/+extensions/install-on-drop/install-on-drop.injectable.d.ts +24 -0
  80. package/dist/src/renderer/components/+extensions/read-file-notify/read-file-notify.d.ts +2 -0
  81. package/dist/src/renderer/{protocol-handler/app-handlers.d.ts → components/+extensions/supported-extension-formats.d.ts} +1 -1
  82. package/dist/src/renderer/components/+extensions/uninstall-extension/uninstall-extension.d.ts +26 -0
  83. package/dist/src/renderer/components/+extensions/uninstall-extension/uninstall-extension.injectable.d.ts +25 -0
  84. package/dist/src/renderer/components/+extensions/user-extensions/user-extensions.injectable.d.ts +28 -0
  85. package/dist/src/renderer/components/+network-policies/network-policy-details.d.ts +5 -2
  86. package/dist/src/renderer/components/+preferences/extension-settings.d.ts +7 -0
  87. package/dist/src/renderer/components/+preferences/preferences.d.ts +0 -2
  88. package/dist/src/renderer/components/dialog/dialog.d.ts +1 -0
  89. package/dist/src/renderer/components/dock/install-chart.d.ts +0 -1
  90. package/dist/src/renderer/components/getDi.d.ts +2 -2
  91. package/dist/src/renderer/components/kube-object-menu/dependencies/api-manager.injectable.d.ts +24 -0
  92. package/dist/src/renderer/components/kube-object-menu/dependencies/cluster-name.injectable.d.ts +27 -0
  93. package/dist/src/renderer/components/kube-object-menu/dependencies/cluster.injectable.d.ts +4 -0
  94. package/dist/src/renderer/components/kube-object-menu/dependencies/edit-resource-tab.injectable.d.ts +24 -0
  95. package/dist/src/renderer/components/kube-object-menu/dependencies/hide-details.injectable.d.ts +24 -0
  96. package/dist/src/renderer/components/kube-object-menu/dependencies/kube-object-menu-items/get-kube-object-menu-items.d.ts +29 -0
  97. package/dist/src/renderer/components/kube-object-menu/dependencies/kube-object-menu-items/kube-object-menu-items.injectable.d.ts +24 -0
  98. package/dist/src/renderer/components/kube-object-menu/dependencies/kube-object-menu-items/kube-object-menu-registry.injectable.d.ts +24 -0
  99. package/dist/src/renderer/components/kube-object-menu/index.d.ts +2 -1
  100. package/dist/src/renderer/components/kube-object-menu/kube-object-menu.d.ts +4 -13
  101. package/dist/src/{main/initializers/registries.d.ts → renderer/components/kube-object-menu/kube-object-menu.test.d.ts} +1 -1
  102. package/dist/src/renderer/components/kubeconfig-dialog/kubeconfig-dialog.d.ts +0 -1
  103. package/dist/src/renderer/components/layout/__tests__/topbar-win-linux.test.d.ts +21 -0
  104. package/dist/src/renderer/components/test-utils/renderFor.d.ts +27 -0
  105. package/dist/src/renderer/initializers/ipc.d.ts +2 -1
  106. package/dist/src/renderer/protocol-handler/bind-protocol-add-route-handlers/bind-protocol-add-route-handlers.d.ts +27 -0
  107. package/dist/src/renderer/protocol-handler/bind-protocol-add-route-handlers/bind-protocol-add-route-handlers.injectable.d.ts +24 -0
  108. package/dist/src/renderer/protocol-handler/index.d.ts +2 -2
  109. package/dist/src/renderer/protocol-handler/{router.d.ts → lens-protocol-router-renderer/lens-protocol-router-renderer.d.ts} +7 -1
  110. package/dist/src/renderer/protocol-handler/lens-protocol-router-renderer/lens-protocol-router-renderer.injectable.d.ts +25 -0
  111. package/dist/src/renderer/root-frame.d.ts +3 -1
  112. package/dist/src/renderer/utils/index.d.ts +0 -1
  113. package/package.json +1 -1
@@ -26,13 +26,42 @@ declare type ExtractEntityStatusType<Entity> = Entity extends CatalogEntity<any,
26
26
  declare type ExtractEntitySpecType<Entity> = Entity extends CatalogEntity<any, any, infer Spec> ? Spec : never;
27
27
  export declare type CatalogEntityConstructor<Entity extends CatalogEntity> = ((new (data: CatalogEntityData<ExtractEntityMetadataType<Entity>, ExtractEntityStatusType<Entity>, ExtractEntitySpecType<Entity>>) => Entity));
28
28
  export interface CatalogCategoryVersion<Entity extends CatalogEntity> {
29
+ /**
30
+ * The specific version that the associated constructor is for. This MUST be
31
+ * a DNS label and SHOULD be of the form `vN`, `vNalphaY`, or `vNbetaY` where
32
+ * `N` and `Y` are both integers greater than 0.
33
+ *
34
+ * Examples: The following are valid values for this field.
35
+ * - `v1`
36
+ * - `v1beta1`
37
+ * - `v1alpha2`
38
+ * - `v3beta2`
39
+ */
29
40
  name: string;
41
+ /**
42
+ * The constructor for the entities.
43
+ */
30
44
  entityClass: CatalogEntityConstructor<Entity>;
31
45
  }
32
46
  export interface CatalogCategorySpec {
47
+ /**
48
+ * The grouping for for the category. This MUST be a DNS label.
49
+ */
33
50
  group: string;
51
+ /**
52
+ * The specific versions of the constructors.
53
+ *
54
+ * NOTE: the field `.apiVersion` after construction MUST match `{.group}/{.versions.[] | .name}`.
55
+ * For example, if `group = "entity.k8slens.dev"` and there is an entry in `.versions` with
56
+ * `name = "v1alpha1"` then the resulting `.apiVersion` MUST be `entity.k8slens.dev/v1alpha1`
57
+ */
34
58
  versions: CatalogCategoryVersion<CatalogEntity>[];
35
59
  names: {
60
+ /**
61
+ * The kind of entity that this category is for. This value MUST be a DNS
62
+ * label and MUST be equal to the `kind` fields that are produced by the
63
+ * `.versions.[] | .entityClass` fields.
64
+ */
36
65
  kind: string;
37
66
  };
38
67
  }
@@ -76,6 +105,7 @@ export declare abstract class CatalogCategory extends CatalogCategory_base {
76
105
  export interface CatalogEntityMetadata {
77
106
  uid: string;
78
107
  name: string;
108
+ shortName?: string;
79
109
  description?: string;
80
110
  source?: string;
81
111
  labels: Record<string, string>;
@@ -151,14 +181,35 @@ export interface CatalogEntityKindData {
151
181
  readonly kind: string;
152
182
  }
153
183
  export declare abstract class CatalogEntity<Metadata extends CatalogEntityMetadata = CatalogEntityMetadata, Status extends CatalogEntityStatus = CatalogEntityStatus, Spec extends CatalogEntitySpec = CatalogEntitySpec> implements CatalogEntityKindData {
184
+ /**
185
+ * The group and version of this class.
186
+ */
154
187
  abstract readonly apiVersion: string;
188
+ /**
189
+ * A DNS label name of the entity.
190
+ */
155
191
  abstract readonly kind: string;
156
192
  metadata: Metadata;
157
193
  status: Status;
158
194
  spec: Spec;
159
195
  constructor(data: CatalogEntityData<Metadata, Status, Spec>);
196
+ /**
197
+ * Get the UID of this entity
198
+ */
160
199
  getId(): string;
200
+ /**
201
+ * Get the name of this entity
202
+ */
161
203
  getName(): string;
204
+ /**
205
+ * Get the specified source of this entity, defaulting to `"unknown"` if not
206
+ * provided
207
+ */
208
+ getSource(): string;
209
+ /**
210
+ * Get if this entity is enabled.
211
+ */
212
+ isEnabled(): boolean;
162
213
  abstract onRun?(context: CatalogEntityActionContext): void | Promise<void>;
163
214
  abstract onContextMenuOpen(context: CatalogEntityContextMenuContext): void | Promise<void>;
164
215
  abstract onSettingsOpen(context: CatalogEntitySettingsContext): void | Promise<void>;
@@ -76,7 +76,11 @@ export interface ClusterPreferences extends ClusterPrometheusPreferences {
76
76
  terminalCWD?: string;
77
77
  clusterName?: string;
78
78
  iconOrder?: number;
79
- icon?: string;
79
+ /**
80
+ * The <img> src for the cluster. If set to `null` that means that it was
81
+ * cleared by preferences.
82
+ */
83
+ icon?: string | null;
80
84
  httpsProxy?: string;
81
85
  hiddenMetrics?: string[];
82
86
  nodeShellImage?: string;
@@ -18,10 +18,13 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
- import type { MenuItemConstructorOptions } from "electron";
22
- import { BaseRegistry } from "./base-registry";
23
- export interface MenuRegistration extends MenuItemConstructorOptions {
24
- parentId: string;
25
- }
26
- export declare class MenuRegistry extends BaseRegistry<MenuRegistration> {
21
+ export declare enum CatalogIpcEvents {
22
+ /**
23
+ * This is broadcast on whenever there is an update to any catalog item
24
+ */
25
+ ITEMS = "catalog:items",
26
+ /**
27
+ * This can be sent from renderer to main to initialize a broadcast of ITEMS
28
+ */
29
+ INIT = "catalog:init"
27
30
  }
@@ -18,10 +18,4 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
- export declare function copyToClipboard(elem: HTMLElement, { resetSelection }?: {
22
- resetSelection?: boolean;
23
- }): {
24
- copied: boolean;
25
- copiedText: string;
26
- clearSelection: () => void;
27
- };
21
+ export declare const BundledExtensionsLoaded = "extension-loader:bundled-extensions-loaded";
@@ -25,3 +25,4 @@ export * from "./update-available.ipc";
25
25
  export * from "./cluster.ipc";
26
26
  export * from "./type-enforced-ipc";
27
27
  export * from "./hotbar";
28
+ export * from "./extension-loader.ipc";
@@ -28,7 +28,7 @@ export interface IKubeApiLinkRef {
28
28
  apiPrefix?: string;
29
29
  apiVersion: string;
30
30
  resource: string;
31
- name: string;
31
+ name?: string;
32
32
  namespace?: string;
33
33
  }
34
34
  export interface IKubeApiParsed extends IKubeApiLinkRef {
@@ -37,4 +37,4 @@ export interface IKubeApiParsed extends IKubeApiLinkRef {
37
37
  apiVersionWithGroup: string;
38
38
  }
39
39
  export declare function parseKubeApi(path: string): IKubeApiParsed;
40
- export declare function createKubeApiURL(ref: IKubeApiLinkRef): string;
40
+ export declare function createKubeApiURL({ apiPrefix, resource, apiVersion, name, namespace }: IKubeApiLinkRef): string;
@@ -24,9 +24,14 @@ import { KubeJsonApi, KubeJsonApiData } from "./kube-json-api";
24
24
  import type { RequestInit } from "node-fetch";
25
25
  import AbortController from "abort-controller";
26
26
  import type { Patch } from "rfc6902";
27
+ /**
28
+ * The options used for creating a `KubeApi`
29
+ */
27
30
  export interface IKubeApiOptions<T extends KubeObject> {
28
31
  /**
29
32
  * base api-path for listing all resources, e.g. "/api/v1/pods"
33
+ *
34
+ * If not specified then will be the one on the `objectConstructor`
30
35
  */
31
36
  apiBase?: string;
32
37
  /**
@@ -36,11 +41,29 @@ export interface IKubeApiOptions<T extends KubeObject> {
36
41
  * This option only has effect if checkPreferredVersion is true.
37
42
  */
38
43
  fallbackApiBases?: string[];
44
+ /**
45
+ * If `true` then will check all declared apiBases against the kube api server
46
+ * for the first accepted one.
47
+ */
48
+ checkPreferredVersion?: boolean;
49
+ /**
50
+ * The constructor for the kube objects returned from the API
51
+ */
39
52
  objectConstructor: KubeObjectConstructor<T>;
53
+ /**
54
+ * The api instance to use for making requests
55
+ *
56
+ * @default apiKube
57
+ */
40
58
  request?: KubeJsonApi;
59
+ /**
60
+ * @deprecated should be specified by `objectConstructor`
61
+ */
41
62
  isNamespaced?: boolean;
63
+ /**
64
+ * @deprecated should be specified by `objectConstructor`
65
+ */
42
66
  kind?: string;
43
- checkPreferredVersion?: boolean;
44
67
  }
45
68
  export interface IKubeApiQueryParams {
46
69
  watch?: boolean | number;
@@ -132,11 +155,11 @@ export interface DeleteResourceDescriptor extends ResourceDescriptor {
132
155
  export declare class KubeApi<T extends KubeObject> {
133
156
  protected options: IKubeApiOptions<T>;
134
157
  readonly kind: string;
135
- readonly apiBase: string;
136
- readonly apiPrefix: string;
137
- readonly apiGroup: string;
138
158
  readonly apiVersion: string;
139
- readonly apiVersionPreferred?: string;
159
+ apiBase: string;
160
+ apiPrefix: string;
161
+ apiGroup: string;
162
+ apiVersionPreferred?: string;
140
163
  readonly apiResource: string;
141
164
  readonly isNamespaced: boolean;
142
165
  objectConstructor: KubeObjectConstructor<T>;
@@ -159,6 +182,7 @@ export declare class KubeApi<T extends KubeObject> {
159
182
  setResourceVersion(namespace: string, newVersion: string): void;
160
183
  getResourceVersion(namespace?: string): string;
161
184
  refreshResourceVersion(params?: KubeApiListOptions): Promise<T[]>;
185
+ private computeApiBase;
162
186
  getUrl({ name, namespace }?: Partial<ResourceDescriptor>, query?: Partial<IKubeApiQueryParams>): string;
163
187
  protected normalizeQuery(query?: Partial<IKubeApiQueryParams>): Partial<IKubeApiQueryParams>;
164
188
  protected parseResponse(data: unknown, namespace?: string): T | T[] | null;
@@ -20,7 +20,6 @@
20
20
  */
21
21
  import { JsonApi, JsonApiData, JsonApiError } from "./json-api";
22
22
  import type { Response } from "node-fetch";
23
- import type { Cluster } from "../../main/cluster";
24
23
  export interface KubeJsonApiListMetadata {
25
24
  resourceVersion: string;
26
25
  selfLink?: string;
@@ -64,6 +63,6 @@ export interface KubeJsonApiError extends JsonApiError {
64
63
  };
65
64
  }
66
65
  export declare class KubeJsonApi extends JsonApi<KubeJsonApiData> {
67
- static forCluster(cluster: Cluster): KubeJsonApi;
66
+ static forCluster(clusterId: string): KubeJsonApi;
68
67
  protected parseError(error: KubeJsonApiError | any, res: Response): string[];
69
68
  }
@@ -19,8 +19,8 @@
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
21
  import { match } from "react-router";
22
- import { Singleton } from "../utils";
23
22
  import type Url from "url-parse";
23
+ import type { ExtensionLoader as ExtensionLoaderType } from "../../extensions/extension-loader/extension-loader";
24
24
  import type { LensExtension } from "../../extensions/lens-extension";
25
25
  import type { RouteHandler } from "../../extensions/registries/protocol-handler";
26
26
  export declare const ProtocolHandlerIpcPrefix = "protocol-handler";
@@ -54,10 +54,15 @@ export declare enum RouteAttempt {
54
54
  MISSING_EXTENSION = "no-extension"
55
55
  }
56
56
  export declare function foldAttemptResults(mainAttempt: RouteAttempt, rendererAttempt: RouteAttempt): RouteAttempt;
57
- export declare abstract class LensProtocolRouter extends Singleton {
57
+ interface Dependencies {
58
+ extensionLoader: ExtensionLoaderType;
59
+ }
60
+ export declare abstract class LensProtocolRouter {
61
+ protected dependencies: Dependencies;
58
62
  protected internalRoutes: Map<string, RouteHandler>;
59
63
  static readonly LoggingPrefix = "[PROTOCOL ROUTER]";
60
64
  static readonly ExtensionUrlSchema: string;
65
+ constructor(dependencies: Dependencies);
61
66
  /**
62
67
  * Attempts to route the given URL to all internal routes that have been registered
63
68
  * @param url the parsed URL that initiated the `lens://` protocol
@@ -108,3 +113,4 @@ export declare abstract class LensProtocolRouter extends Singleton {
108
113
  */
109
114
  removeInternalHandler(urlSchema: string): void;
110
115
  }
116
+ export {};
@@ -39,6 +39,19 @@ export interface DownloadMirror {
39
39
  }
40
40
  export declare const defaultPackageMirror = "default";
41
41
  export declare const packageMirrors: Map<string, DownloadMirror>;
42
+ export declare enum ExtensionRegistryLocation {
43
+ DEFAULT = "default",
44
+ NPMRC = "npmrc",
45
+ CUSTOM = "custom"
46
+ }
47
+ export declare type ExtensionRegistry = {
48
+ location: ExtensionRegistryLocation.DEFAULT | ExtensionRegistryLocation.NPMRC;
49
+ customUrl?: undefined;
50
+ } | {
51
+ location: ExtensionRegistryLocation.CUSTOM;
52
+ customUrl: string;
53
+ };
54
+ export declare const defaultExtensionRegistryUrl = "https://registry.npmjs.org";
42
55
  declare type PreferencesModelType<field extends keyof typeof DESCRIPTORS> = typeof DESCRIPTORS[field] extends PreferenceDescription<infer T, any> ? T : never;
43
56
  declare type UserStoreModelType<field extends keyof typeof DESCRIPTORS> = typeof DESCRIPTORS[field] extends PreferenceDescription<any, infer T> ? T : never;
44
57
  export declare type UserStoreFlatModel = {
@@ -65,6 +78,7 @@ export declare const DESCRIPTORS: {
65
78
  editorConfiguration: PreferenceDescription<EditorConfiguration, EditorConfiguration>;
66
79
  terminalCopyOnSelect: PreferenceDescription<boolean, boolean>;
67
80
  updateChannel: PreferenceDescription<string, string>;
81
+ extensionRegistryUrl: PreferenceDescription<ExtensionRegistry, ExtensionRegistry>;
68
82
  };
69
83
  export declare const CONSTANTS: {
70
84
  updateChannels: Map<string, {
@@ -20,7 +20,7 @@
20
20
  */
21
21
  import { BaseStore } from "../base-store";
22
22
  import { ObservableToggleSet } from "../../renderer/utils";
23
- import { EditorConfiguration, KubeconfigSyncValue, UserPreferencesModel } from "./preferences-helpers";
23
+ import { EditorConfiguration, ExtensionRegistry, KubeconfigSyncValue, UserPreferencesModel } from "./preferences-helpers";
24
24
  export interface UserStoreModel {
25
25
  lastSeenAppVersion: string;
26
26
  preferences: UserPreferencesModel;
@@ -47,6 +47,7 @@ export declare class UserStore extends BaseStore<UserStoreModel> {
47
47
  kubectlBinariesPath?: string;
48
48
  terminalCopyOnSelect: boolean;
49
49
  updateChannel?: string;
50
+ extensionRegistryUrl: ExtensionRegistry;
50
51
  /**
51
52
  * Download kubectl binaries matching cluster version
52
53
  */
@@ -44,6 +44,7 @@ export * from "./n-fircate";
44
44
  export * from "./objects";
45
45
  export * from "./openExternal";
46
46
  export * from "./paths";
47
+ export * from "./promise-exec";
47
48
  export * from "./reject-promise";
48
49
  export * from "./singleton";
49
50
  export * from "./sort-compare";
@@ -19,6 +19,5 @@
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
21
  /// <reference types="node" />
22
- import { exec, execFile } from "child_process";
23
- export declare const promiseExec: typeof exec.__promisify__;
22
+ import { execFile } from "child_process";
24
23
  export declare const promiseExecFile: typeof execFile.__promisify__;
@@ -39,7 +39,7 @@ export declare class ReadableWebToNodeStream<T extends TypedArray> extends Reada
39
39
  private pendingRead;
40
40
  /**
41
41
  *
42
- * @param stream Readable​Stream: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream
42
+ * @param stream ReadableStream: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream
43
43
  */
44
44
  constructor(stream: ReadableStream<T>);
45
45
  /**
@@ -50,7 +50,7 @@ export declare class ReadableWebToNodeStream<T extends TypedArray> extends Reada
50
50
  */
51
51
  _read(): Promise<void>;
52
52
  /**
53
- * If there is no unresolved read call to Web-API Readable​Stream immediately returns;
53
+ * If there is no unresolved read call to Web-API ReadableStream immediately returns;
54
54
  * otherwise will wait until the read is resolved.
55
55
  */
56
56
  waitForReadToComplete(): Promise<void>;