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

WIP Kludge "moduleResolution": "node16"

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
This commit is contained in:
Iku-turso 2022-11-25 10:43:38 +02:00
parent 4ae90c46c7
commit 5286e5f54b
7 changed files with 12 additions and 5 deletions

View File

@ -8,7 +8,7 @@ import path from "path";
export type JoinPaths = (...args: string[]) => string; export type JoinPaths = (...args: string[]) => string;
const joinPathsInjectable = getInjectable({ const joinPathsInjectable = getInjectable({
id: "join-paths", id: "join-paths-1",
instantiate: (): JoinPaths => path.join, instantiate: (): JoinPaths => path.join,
// This causes side effect e.g. Windows uses different separator than e.g. linux // This causes side effect e.g. Windows uses different separator than e.g. linux

View File

@ -88,6 +88,7 @@ const toNavigationHierarchy = (composite: Composite<PreferenceItemTypes | Prefer
} }
default: { default: {
// @ts-ignore
throw checkThatAllDiscriminablesAreExhausted(value); throw checkThatAllDiscriminablesAreExhausted(value);
} }
} }

View File

@ -95,6 +95,7 @@ const toPreferenceItemHierarchy = (composite: Composite<PreferenceItemTypes>) =>
} }
default: { default: {
// @ts-ignore
throw checkThatAllDiscriminablesAreExhausted(value); throw checkThatAllDiscriminablesAreExhausted(value);
} }
} }

View File

@ -4,6 +4,7 @@
*/ */
import { registerFeature } from "@lensapp/feature-core"; import { registerFeature } from "@lensapp/feature-core";
import appPathsFeature from "@lensapp/app-paths";
import fsFeature from "@lensapp/fs"; import fsFeature from "@lensapp/fs";
import loggingFeature from "@lensapp/logging"; import loggingFeature from "@lensapp/logging";
import shellFeature from "@lensapp/shell"; import shellFeature from "@lensapp/shell";
@ -13,6 +14,7 @@ import type { DiContainer } from "@ogre-tools/injectable";
import { action } from "mobx"; import { action } from "mobx";
export default action((di: DiContainer) => { export default action((di: DiContainer) => {
registerFeature(di, appPathsFeature);
registerFeature(di, clusterFeature); registerFeature(di, clusterFeature);
registerFeature(di, fsFeature); registerFeature(di, fsFeature);
registerFeature(di, loggingFeature); registerFeature(di, loggingFeature);

View File

@ -46,6 +46,8 @@ import assert from "assert";
import startFrameInjectable from "./start-frame/start-frame.injectable"; import startFrameInjectable from "./start-frame/start-frame.injectable";
import initializeSentryReportingWithInjectable from "../common/error-reporting/initialize-sentry-reporting.injectable"; import initializeSentryReportingWithInjectable from "../common/error-reporting/initialize-sentry-reporting.injectable";
import registerFeatures from "./register-features"; import registerFeatures from "./register-features";
import { RootFrame } from "./frames/root-frame/root-frame";
import { ClusterFrame } from "./frames/cluster-frame/cluster-frame";
configurePackages(); // global packages configurePackages(); // global packages
registerCustomThemes(); // monaco editor themes registerCustomThemes(); // monaco editor themes
@ -157,10 +159,10 @@ export async function bootstrap(di: DiContainer) {
// TODO: Introduce proper architectural boundaries between root and cluster iframes // TODO: Introduce proper architectural boundaries between root and cluster iframes
if (process.isMainFrame) { if (process.isMainFrame) {
initializeApp = di.inject(initRootFrameInjectable); initializeApp = di.inject(initRootFrameInjectable);
App = (await import("./frames/root-frame/root-frame")).RootFrame; App = RootFrame;
} else { } else {
initializeApp = di.inject(initClusterFrameInjectable); initializeApp = di.inject(initClusterFrameInjectable);
App = (await import("./frames/cluster-frame/cluster-frame")).ClusterFrame; App = ClusterFrame;
} }
try { try {

View File

@ -12,7 +12,7 @@ import TreeItem from "@material-ui/lab/TreeItem";
import { cssNames } from "../../utils"; import { cssNames } from "../../utils";
import _ from "lodash"; import _ from "lodash";
import getDeepDash from "deepdash"; const getDeepDash = require("deepdash");
const deepDash = getDeepDash(_); const deepDash = getDeepDash(_);
@ -33,6 +33,7 @@ function scrollToItem(id: string) {
} }
function getSelectedNode(data: NavigationTree[]) { function getSelectedNode(data: NavigationTree[]) {
// @ts-ignore
return deepDash.findDeep(data, (value, key) => key === "selected" && value === true)?.parent; return deepDash.findDeep(data, (value, key) => key === "selected" && value === true)?.parent;
} }

View File

@ -9,7 +9,7 @@
"DOM", "DOM",
"DOM.Iterable" "DOM.Iterable"
], ],
"moduleResolution": "Node", "moduleResolution": "node16",
"sourceMap": true, "sourceMap": true,
"strict": true, "strict": true,
"noImplicitAny": true, "noImplicitAny": true,