@k8slens/extensions 6.2.0-git.9ed64a29df.0 → 6.2.0-git.a89eb486d8.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.
- package/dist/src/common/app-paths/directory-for-logs.injectable.d.ts +2 -0
- package/dist/src/common/ipc/index.d.ts +0 -1
- package/dist/src/common/logger/transports.d.ts +6 -0
- package/dist/src/common/logger.d.ts +3 -0
- package/dist/src/extensions/extension-api.js +21 -155
- package/dist/src/main/logger/console-format.d.ts +39 -0
- package/dist/src/main/logger/console-transport.injectable.d.ts +3 -0
- package/dist/src/main/logger/file-transport.injectable.d.ts +3 -0
- package/dist/src/main/logger/level.global-override-for-injectable.d.ts +9 -0
- package/dist/src/main/logger/level.injectable.d.ts +3 -0
- package/dist/src/main/start-main-application/runnable-tokens/phases.d.ts +16 -0
- package/dist/src/main/start-main-application/runnables/show-initial-window.injectable.d.ts +5 -0
- package/dist/src/main/start-main-application/runnables/show-loading.injectable.d.ts +5 -0
- package/dist/src/main/start-main-application/start-main-application.injectable.d.ts +1 -1
- package/dist/src/renderer/logger/browser-transport.injectable.d.ts +3 -0
- package/package.json +1 -1
- package/dist/src/common/ipc/__tests__/type-enforced-ipc.test.d.ts +0 -5
- package/dist/src/common/ipc/type-enforced-ipc.d.ts +0 -40
@@ -0,0 +1,39 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) OpenLens Authors. All rights reserved.
|
3
|
+
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
|
+
*/
|
5
|
+
/// <reference types="node" />
|
6
|
+
import type { InspectOptions } from "util";
|
7
|
+
export interface ConsoleFormatOptions {
|
8
|
+
showMeta?: boolean;
|
9
|
+
metaStrip?: string[];
|
10
|
+
inspectOptions?: InspectOptions;
|
11
|
+
}
|
12
|
+
interface TransformableInfo {
|
13
|
+
level: string;
|
14
|
+
message: string;
|
15
|
+
[key: string | symbol]: any;
|
16
|
+
}
|
17
|
+
export declare class ConsoleFormat {
|
18
|
+
private static readonly reSpaces;
|
19
|
+
private static readonly reSpacesOrEmpty;
|
20
|
+
private static readonly reColor;
|
21
|
+
private static readonly defaultStrip;
|
22
|
+
private static readonly chars;
|
23
|
+
private readonly showMeta;
|
24
|
+
private readonly metaStrip;
|
25
|
+
private readonly inspectOptions;
|
26
|
+
constructor(opts?: ConsoleFormatOptions);
|
27
|
+
private getLines;
|
28
|
+
private message;
|
29
|
+
private pad;
|
30
|
+
private ms;
|
31
|
+
private stack;
|
32
|
+
private _cause;
|
33
|
+
private cause;
|
34
|
+
private meta;
|
35
|
+
private getColor;
|
36
|
+
private write;
|
37
|
+
transform(info: TransformableInfo): TransformableInfo;
|
38
|
+
}
|
39
|
+
export {};
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) OpenLens Authors. All rights reserved.
|
3
|
+
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
|
+
*/
|
5
|
+
declare const _default: {
|
6
|
+
injectable: import("@ogre-tools/injectable").Injectable<import("./level.injectable").LogLevel, unknown, void>;
|
7
|
+
overridingInstantiate: import("@ogre-tools/injectable").Instantiate<import("./level.injectable").LogLevel, void>;
|
8
|
+
};
|
9
|
+
export default _default;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) OpenLens Authors. All rights reserved.
|
3
|
+
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
|
+
*/
|
5
|
+
import type { Runnable } from "../../../common/runnable/run-many-for";
|
6
|
+
import type { RunnableSync } from "../../../common/runnable/run-many-sync-for";
|
7
|
+
/**
|
8
|
+
* These tokens are here so that the importing of their respective dependencies
|
9
|
+
* can be delayed until all of them are ready
|
10
|
+
*/
|
11
|
+
/**
|
12
|
+
* This runnable token should only have the app paths init so that it can be run by itself
|
13
|
+
*/
|
14
|
+
export declare const appPathsRunnablePhaseInjectionToken: import("@ogre-tools/injectable").InjectionToken<RunnableSync<void>, void>;
|
15
|
+
export declare const showLoadingRunnablePhaseInjectionToken: import("@ogre-tools/injectable").InjectionToken<Runnable<void>, void>;
|
16
|
+
export declare const showInitialWindowRunnablePhaseInjectionToken: import("@ogre-tools/injectable").InjectionToken<Runnable<void>, void>;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const startMainApplicationInjectable: import("@ogre-tools/injectable").Injectable<
|
1
|
+
declare const startMainApplicationInjectable: import("@ogre-tools/injectable").Injectable<Promise<void>, unknown, void>;
|
2
2
|
export default startMainApplicationInjectable;
|
package/package.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"name": "@k8slens/extensions",
|
3
3
|
"productName": "OpenLens extensions",
|
4
4
|
"description": "OpenLens - Open Source Kubernetes IDE: extensions",
|
5
|
-
"version": "6.2.0-git.
|
5
|
+
"version": "6.2.0-git.a89eb486d8.0",
|
6
6
|
"copyright": "© 2022 OpenLens Authors",
|
7
7
|
"license": "MIT",
|
8
8
|
"main": "dist/src/extensions/extension-api.js",
|
@@ -1,40 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright (c) OpenLens Authors. All rights reserved.
|
3
|
-
* Licensed under MIT License. See LICENSE in root directory for more information.
|
4
|
-
*/
|
5
|
-
/// <reference types="node" />
|
6
|
-
import type { EventEmitter } from "events";
|
7
|
-
import type { Disposer } from "../utils";
|
8
|
-
export declare type ListenerEvent<EM extends EventEmitter> = Parameters<Parameters<EM["on"]>[1]>[0];
|
9
|
-
export declare type ListVerifier<T extends any[]> = (args: unknown[]) => args is T;
|
10
|
-
export declare type Rest<T> = T extends [any, ...infer R] ? R : [];
|
11
|
-
/**
|
12
|
-
* Adds a listener to `source` that waits for the first IPC message with the correct
|
13
|
-
* argument data is sent.
|
14
|
-
* @param channel The channel to be listened on
|
15
|
-
* @param listener The function for the channel to be called if the args of the correct type
|
16
|
-
* @param verifier The function to be called to verify that the args are the correct type
|
17
|
-
*/
|
18
|
-
export declare function onceCorrect<IPC extends EventEmitter, Listener extends (event: ListenerEvent<IPC>, ...args: any[]) => any>({ source, channel, listener, verifier, }: {
|
19
|
-
source: IPC;
|
20
|
-
channel: string;
|
21
|
-
listener: Listener;
|
22
|
-
verifier: ListVerifier<Rest<Parameters<Listener>>>;
|
23
|
-
}): void;
|
24
|
-
/**
|
25
|
-
* Adds a listener to `source` that checks to verify the arguments before calling the handler.
|
26
|
-
* @param channel The channel to be listened on
|
27
|
-
* @param listener The function for the channel to be called if the args of the correct type
|
28
|
-
* @param verifier The function to be called to verify that the args are the correct type
|
29
|
-
*/
|
30
|
-
export declare function onCorrect<IPC extends EventEmitter, Listener extends (event: ListenerEvent<IPC>, ...args: any[]) => any>({ source, channel, listener, verifier, }: {
|
31
|
-
source: IPC;
|
32
|
-
channel: string;
|
33
|
-
listener: Listener;
|
34
|
-
verifier: ListVerifier<Rest<Parameters<Listener>>>;
|
35
|
-
}): Disposer;
|
36
|
-
export declare function handleCorrect<Handler extends (event: Electron.IpcMainInvokeEvent, ...args: any[]) => any>({ channel, handler, verifier, }: {
|
37
|
-
channel: string;
|
38
|
-
handler: Handler;
|
39
|
-
verifier: ListVerifier<Rest<Parameters<Handler>>>;
|
40
|
-
}): Disposer;
|