1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix code style

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen 2023-03-17 08:06:03 +02:00
parent 5391c1fdab
commit a69b03fac7
No known key found for this signature in database
GPG Key ID: 8C6CFB2FFFE8F68A
34 changed files with 47 additions and 43 deletions

View File

@ -5,5 +5,5 @@
import type { AppPaths } from "./app-path-injection-token";
import { getRequestChannel } from "@k8slens/messaging";
export const appPathsChannel = getRequestChannel<void, AppPaths>('app-paths')
export const appPathsChannel = getRequestChannel<void, AppPaths>("app-paths");

View File

@ -19,7 +19,7 @@ export const kubectlApplyAllChannel = getRequestChannel<
Result<string, string>
>("kubectl-apply-all");
export type KubectlApplyAll = (req: KubectlApplyAllArgs) => AsyncResult<string, string>
export type KubectlApplyAll = (req: KubectlApplyAllArgs) => AsyncResult<string, string>;
export const kubectlApplyAllInjectionToken = getInjectionToken<KubectlApplyAll>({
id: "kubectl-apply-all",

View File

@ -5,5 +5,5 @@
import { getRequestChannel } from "@k8slens/messaging";
export const resolveSystemProxyChannel = getRequestChannel<string, string>(
"resolve-system-proxy-channel"
"resolve-system-proxy-channel",
);

View File

@ -8,7 +8,7 @@ import { casChannel } from "../common/channel";
import certificateAuthoritiesChannelListenerInjectable from "./channel-handler.injectable";
export default getGlobalOverride(certificateAuthoritiesChannelListenerInjectable, () => ({
id: 'certificate-authorities-channel-listener',
id: "certificate-authorities-channel-listener",
channel: casChannel,
handler: () => [],
}));

View File

@ -8,7 +8,7 @@ import { globalAgent } from "https";
import { isString } from "@k8slens/utilities";
const certificateAuthoritiesChannelListenerInjectable = getRequestChannelListenerInjectable({
id: 'certificate-authorities-channel-listener',
id: "certificate-authorities-channel-listener",
channel: casChannel,
getHandler: () => () => {
if (Array.isArray(globalAgent.options.ca)) {

View File

@ -7,7 +7,7 @@ import { activateClusterChannel } from "../common/channels";
import requestClusterActivationInjectable from "./request-activation.injectable";
const activateClusterRequestChannelListenerInjectable = getRequestChannelListenerInjectable({
id: 'activate-cluster-request-channel-listener',
id: "activate-cluster-request-channel-listener",
channel: activateClusterChannel,
getHandler: (di) => di.inject(requestClusterActivationInjectable),
});

View File

@ -7,7 +7,7 @@ import { deactivateClusterChannel } from "../common/channels";
import requestClusterDeactivationInjectable from "./request-deactivation.injectable";
const clusterDeactivationRequestChannelListenerInjectable = getRequestChannelListenerInjectable({
id: 'cluster-deactivation-request-channel-listener',
id: "cluster-deactivation-request-channel-listener",
channel: deactivateClusterChannel,
getHandler: (di) => di.inject(requestClusterDeactivationInjectable),
});

View File

@ -6,5 +6,5 @@ import type { ClusterId } from "../../../../common/cluster-types";
import { getRequestChannel } from "@k8slens/messaging";
export const clearClusterAsDeletingChannel = getRequestChannel<ClusterId, void>(
"clear-cluster-as-deleting"
"clear-cluster-as-deleting",
);

View File

@ -3,10 +3,11 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import type { ClusterId } from "../../../../common/cluster-types";
import { getRequestChannel, RequestChannel } from "@k8slens/messaging";
import type { RequestChannel } from "@k8slens/messaging";
import { getRequestChannel } from "@k8slens/messaging";
export type DeleteClusterChannel = RequestChannel<ClusterId, void>;
export const deleteClusterChannel = getRequestChannel<ClusterId, void>(
"delete-cluster"
"delete-cluster",
);

View File

@ -6,5 +6,5 @@ import type { ClusterId } from "../../../../common/cluster-types";
import { getRequestChannel } from "@k8slens/messaging";
export const setClusterAsDeletingChannel = getRequestChannel<ClusterId, void>(
"set-cluster-as-deleting"
"set-cluster-as-deleting",
);

View File

@ -7,7 +7,7 @@ import { getRequestChannelListenerInjectable } from "@k8slens/messaging";
import { clearClusterAsDeletingChannel } from "../common/clear-as-deleting-channel";
const clearClusterAsDeletingChannelListenerInjectable = getRequestChannelListenerInjectable({
id: 'clear-cluster-as-deleting-channel-listener',
id: "clear-cluster-as-deleting-channel-listener",
channel: clearClusterAsDeletingChannel,
getHandler: (di) => {
const clustersThatAreBeingDeleted = di.inject(clustersThatAreBeingDeletedInjectable);

View File

@ -14,7 +14,7 @@ import { getRequestChannelListenerInjectable } from "@k8slens/messaging";
import { deleteClusterChannel } from "../common/delete-channel";
const deleteClusterChannelListenerInjectable = getRequestChannelListenerInjectable({
id: 'delete-cluster-channel-listener',
id: "delete-cluster-channel-listener",
channel: deleteClusterChannel,
getHandler: (di) => {
const emitAppEvent = di.inject(emitAppEventInjectable);

View File

@ -7,7 +7,7 @@ import { getRequestChannelListenerInjectable } from "@k8slens/messaging";
import { setClusterAsDeletingChannel } from "../common/set-as-deleting-channel";
const setClusterAsDeletingChannelHandlerInjectable = getRequestChannelListenerInjectable({
id: 'set-cluster-as-deleting-channel-handler',
id: "set-cluster-as-deleting-channel-handler",
channel: setClusterAsDeletingChannel,
getHandler: (di) => {
const clustersThatAreBeingDeleted = di.inject(clustersThatAreBeingDeletedInjectable);

View File

@ -4,8 +4,7 @@
*/
import type { ClusterId, ClusterState } from "../../../../common/cluster-types";
import type { MessageChannel } from "@k8slens/messaging";
import type { RequestChannel } from "@k8slens/messaging";
import type { MessageChannel, RequestChannel } from "@k8slens/messaging";
export interface ClusterStateSync {
clusterId: ClusterId;

View File

@ -4,7 +4,8 @@
*/
import { getInjectable } from "@ogre-tools/injectable";
import { sendMessageToChannelInjectionToken } from "@k8slens/messaging";
import { ClusterStateSync, clusterStateSyncChannel } from "../common/channels";
import type { ClusterStateSync } from "../common/channels";
import { clusterStateSyncChannel } from "../common/channels";
const emitClusterStateUpdateInjectable = getInjectable({
id: "emit-cluster-state-update",

View File

@ -7,7 +7,7 @@ import { getRequestChannelListenerInjectable } from "@k8slens/messaging";
import { initialClusterStatesChannel } from "../common/channels";
const handleInitialClusterStateSyncInjectable = getRequestChannelListenerInjectable({
id: 'handle-initial-cluster-state-sync',
id: "handle-initial-cluster-state-sync",
channel: initialClusterStatesChannel,
getHandler: (di) => {
const clusterStore = di.inject(clusterStoreInjectable);

View File

@ -8,7 +8,7 @@ import { reloadPageChannel } from "../common/channel";
import reloadPageChannelListenerInjectable from "./register-listener.injectable";
export default getGlobalOverride(reloadPageChannelListenerInjectable, () => ({
id: 'reload-page-channel-listener',
id: "reload-page-channel-listener",
channel: reloadPageChannel,
handler: () => {},
}));

View File

@ -8,7 +8,7 @@ import { getRequestChannelListenerInjectable } from "@k8slens/messaging";
import { openPathPickingDialogChannel } from "../common/channel";
const openPathPickingDialogListener = getRequestChannelListenerInjectable({
id: 'open-path-picking-dialog',
id: "open-path-picking-dialog",
channel: openPathPickingDialogChannel,
getHandler: (di) => di.inject(askUserForFilePathsInjectable),
});

View File

@ -3,8 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import type { MessageChannel } from "@k8slens/messaging";
import type { RequestChannel } from "@k8slens/messaging";
import type { MessageChannel, RequestChannel } from "@k8slens/messaging";
export type SystemThemeType = "dark" | "light";

View File

@ -4,7 +4,8 @@
*/
import { getInjectable } from "@ogre-tools/injectable";
import { sendMessageToChannelInjectionToken } from "@k8slens/messaging";
import { SystemThemeType, systemThemeTypeUpdateChannel } from "../common/channels";
import type { SystemThemeType } from "../common/channels";
import { systemThemeTypeUpdateChannel } from "../common/channels";
const emitSystemThemeTypeUpdateInjectable = getInjectable({
id: "emit-system-theme-type-update",

View File

@ -8,7 +8,7 @@ import { getRequestChannelListenerInjectable } from "@k8slens/messaging";
import { initialSystemThemeTypeChannel } from "../common/channels";
const initialSystemThemeTypeHandler = getRequestChannelListenerInjectable({
id: 'initial-system-theme-type-listener',
id: "initial-system-theme-type-listener",
channel: initialSystemThemeTypeChannel,
getHandler: (di) => {
const operatingSystemTheme = di.inject(operatingSystemThemeInjectable);

View File

@ -7,7 +7,7 @@ import appPathsInjectable from "../../common/app-paths/app-paths.injectable";
import { getRequestChannelListenerInjectable } from "@k8slens/messaging";
const appPathsRequestChannelListenerInjectable = getRequestChannelListenerInjectable({
id: 'app-paths-request-channel-listener',
id: "app-paths-request-channel-listener",
channel: appPathsChannel,
getHandler: (di) => {
const appPaths = di.inject(appPathsInjectable);

View File

@ -7,7 +7,7 @@ import { getRequestChannelListenerInjectable } from "@k8slens/messaging";
import buildVersionInjectable from "../vars/build-version/build-version.injectable";
const buildVersionChannelListenerInjectable = getRequestChannelListenerInjectable({
id: 'build-version-channel-listener',
id: "build-version-channel-listener",
channel: buildVersionChannel,
getHandler: (di) => {
const buildVersion = di.inject(buildVersionInjectable);

View File

@ -7,7 +7,7 @@ import { getRequestChannelListenerInjectable } from "@k8slens/messaging";
import getActiveHelmRepositoriesInjectable from "./get-active-helm-repositories.injectable";
const getActiveHelmRepositoriesChannelListenerInjectable = getRequestChannelListenerInjectable({
id: 'get-active-helm-repositories-channel-listener',
id: "get-active-helm-repositories-channel-listener",
channel: getActiveHelmRepositoriesChannel,
getHandler: (di) => di.inject(getActiveHelmRepositoriesInjectable),
});

View File

@ -7,7 +7,7 @@ import { removeHelmRepositoryChannel } from "../../../../common/helm/remove-helm
import { getRequestChannelListenerInjectable } from "@k8slens/messaging";
const removeHelmRepositoryChannelListenerInjectable = getRequestChannelListenerInjectable({
id: 'remove-helm-repository-channel-listener',
id: "remove-helm-repository-channel-listener",
channel: removeHelmRepositoryChannel,
getHandler: (di) => di.inject(removeHelmRepositoryInjectable),
});

View File

@ -9,7 +9,7 @@ import resourceApplierInjectable from "../resource-applier/create-resource-appli
import { getRequestChannelListenerInjectable } from "@k8slens/messaging";
const kubectlApplyAllChannelHandlerInjectable = getRequestChannelListenerInjectable({
id: 'kubectl-apply-all-channel-handler-listener',
id: "kubectl-apply-all-channel-handler-listener",
channel: kubectlApplyAllChannel,
getHandler: (di) => {
const getClusterById = di.inject(getClusterByIdInjectable);

View File

@ -9,7 +9,7 @@ import resourceApplierInjectable from "../resource-applier/create-resource-appli
import { getRequestChannelListenerInjectable } from "@k8slens/messaging";
const kubectlDeleteAllChannelHandlerInjectable = getRequestChannelListenerInjectable({
id: 'kubectl-delete-all-channel-handler-listener',
id: "kubectl-delete-all-channel-handler-listener",
channel: kubectlDeleteAllChannel,
getHandler: (di) => {
const emitAppEvent = di.inject(emitAppEventInjectable);

View File

@ -7,7 +7,7 @@ import { getRequestChannelListenerInjectable } from "@k8slens/messaging";
import lensProxyCertificateInjectable from "../../common/certificate/lens-proxy-certificate.injectable";
const lensProxyCertificateRequestHandlerInjectable = getRequestChannelListenerInjectable({
id: 'lens-proxy-certificate-request-handler-listener',
id: "lens-proxy-certificate-request-handler-listener",
channel: lensProxyCertificateChannel,
getHandler: (di) => {
const lensProxyCertificate = di.inject(lensProxyCertificateInjectable).get();

View File

@ -7,7 +7,7 @@ import { getRequestChannelListenerInjectable } from "@k8slens/messaging";
import resolveSystemProxyInjectable from "./resolve-system-proxy.injectable";
const resolveSystemProxyChannelResponderInjectable = getRequestChannelListenerInjectable({
id: 'resolve-system-proxy-channel-responder-listener',
id: "resolve-system-proxy-channel-responder-listener",
channel: resolveSystemProxyChannel,
getHandler: (di) => di.inject(resolveSystemProxyInjectable),
});

View File

@ -7,7 +7,7 @@ import { syncBoxInjectionToken } from "../../../common/utils/sync-box/sync-box-i
import { getRequestChannelListenerInjectable } from "@k8slens/messaging";
const syncBoxInitialValueChannelListenerInjectable = getRequestChannelListenerInjectable({
id: 'sync-box-initial-value-channel-listener',
id: "sync-box-initial-value-channel-listener",
channel: syncBoxInitialValueChannel,
getHandler: (di) => {
const syncBoxes = di.injectMany(syncBoxInjectionToken);

View File

@ -20,7 +20,7 @@ const navigationChannelListenerInjectable = getInjectable({
const navigateToUrl = di.inject(navigateToUrlInjectionToken);
return {
id: 'navigation-channel-listener',
id: "navigation-channel-listener",
channel: currentlyInClusterFrame
? clusterFrameNavigationChannel
: appNavigationChannel,
@ -35,7 +35,7 @@ const navigationChannelListenerInjectable = getInjectable({
};
},
injectionToken: messageChannelListenerInjectionToken
injectionToken: messageChannelListenerInjectionToken,
});
export default navigationChannelListenerInjectable;

View File

@ -1 +1,2 @@
module.exports = require("@k8slens/jest").monorepoPackageConfig(__dirname).configForNode;
module.exports =
require("@k8slens/jest").monorepoPackageConfig(__dirname).configForNode;

View File

@ -4,17 +4,18 @@ import * as timeSlots from "./time-slots";
export type StartApplication = () => Promise<void>;
export const startApplicationInjectionToken =
getInjectionToken<StartApplication>({
id: "start-application-injection-token",
});
export const startApplicationInjectionToken = getInjectionToken<StartApplication>({
id: "start-application-injection-token",
});
const startApplicationInjectable = getInjectable({
id: "start-application",
instantiate: (di): StartApplication => {
const runManyAsync = runManyFor(di)
const beforeApplicationIsLoading = runManyAsync(timeSlots.beforeApplicationIsLoadingInjectionToken);
const runManyAsync = runManyFor(di);
const beforeApplicationIsLoading = runManyAsync(
timeSlots.beforeApplicationIsLoadingInjectionToken,
);
const onLoadOfApplication = runManyAsync(timeSlots.onLoadOfApplicationInjectionToken);
const afterApplicationIsLoaded = runManyAsync(timeSlots.afterApplicationIsLoadedInjectionToken);

View File

@ -1 +1,2 @@
module.exports = require("@k8slens/jest").monorepoPackageConfig(__dirname).configForNode;
module.exports =
require("@k8slens/jest").monorepoPackageConfig(__dirname).configForNode;