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

Fix @k8slens/extensions being broken after monorepo (#7058)

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2023-01-30 13:32:30 -08:00 committed by GitHub
parent e08576ee99
commit a73f166f1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 141 additions and 3572 deletions

View File

@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import applicationInformationToken from "../../../vars/application-information-token"; import { applicationInformationToken } from "../../../vars/application-information-token";
const welcomeRouteConfigInjectable = getInjectable({ const welcomeRouteConfigInjectable = getInjectable({
id: "welcome-route-config", id: "welcome-route-config",

View File

@ -2,15 +2,10 @@
* Copyright (c) OpenLens Authors. All rights reserved. * Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import applicationInformationToken from "./vars/application-information-token";
import type { ApplicationInformation } from "./vars/application-information-token";
import { bundledExtensionInjectionToken } from "../extensions/extension-discovery/bundled-extension-token";
import * as extensionApi from "../extensions/common-api";
// @experimental // @experimental
export { export { applicationInformationToken } from "./vars/application-information-token";
applicationInformationToken, export type { ApplicationInformation } from "./vars/application-information-token";
ApplicationInformation, export { bundledExtensionInjectionToken } from "../extensions/extension-discovery/bundled-extension-token";
bundledExtensionInjectionToken,
extensionApi, export * as CommonApi from "../extensions/common-api";
};

View File

@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import applicationInformationToken from "./application-information-token"; import { applicationInformationToken } from "./application-information-token";
const applicationCopyrightInjectable = getInjectable({ const applicationCopyrightInjectable = getInjectable({
id: "application-copyright", id: "application-copyright",

View File

@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import applicationInformationToken from "./application-information-token"; import { applicationInformationToken } from "./application-information-token";
const applicationDescriptionInjectable = getInjectable({ const applicationDescriptionInjectable = getInjectable({
id: "application-description", id: "application-description",

View File

@ -4,7 +4,7 @@
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import packageJson from "../../../package.json"; import packageJson from "../../../package.json";
import applicationInformationToken from "../../common/vars/application-information-token"; import { applicationInformationToken } from "../../common/vars/application-information-token";
const applicationInformationInjectable = getInjectable({ const applicationInformationInjectable = getInjectable({
id: "application-information", id: "application-information",

View File

@ -10,8 +10,6 @@ export type ApplicationInformation = Pick<typeof packageJson, "version" | "confi
build: Partial<typeof packageJson["build"]> & { publish?: unknown[] }; build: Partial<typeof packageJson["build"]> & { publish?: unknown[] };
}; };
const applicationInformationToken = getInjectionToken<ApplicationInformation>({ export const applicationInformationToken = getInjectionToken<ApplicationInformation>({
id: "application-information-token", id: "application-information-token",
}); });
export default applicationInformationToken;

View File

@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import applicationInformationToken from "./application-information-token"; import { applicationInformationToken } from "./application-information-token";
const bundledKubectlVersionInjectable = getInjectable({ const bundledKubectlVersionInjectable = getInjectable({
id: "bundled-kubectl-version", id: "bundled-kubectl-version",

View File

@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import applicationInformationToken from "./application-information-token"; import { applicationInformationToken } from "./application-information-token";
const contentSecurityPolicyInjectable = getInjectable({ const contentSecurityPolicyInjectable = getInjectable({
id: "content-security-policy", id: "content-security-policy",

View File

@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import applicationInformationToken from "./application-information-token"; import { applicationInformationToken } from "./application-information-token";
const productNameInjectable = getInjectable({ const productNameInjectable = getInjectable({
id: "product-name", id: "product-name",

View File

@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import applicationInformationToken from "./application-information-token"; import { applicationInformationToken } from "./application-information-token";
const sentryDataSourceNameInjectable = getInjectable({ const sentryDataSourceNameInjectable = getInjectable({
id: "sentry-data-source-name", id: "sentry-data-source-name",

View File

@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import applicationInformationToken from "./application-information-token"; import { applicationInformationToken } from "./application-information-token";
const storeMigrationVersionInjectable = getInjectable({ const storeMigrationVersionInjectable = getInjectable({
id: "store-migration-version", id: "store-migration-version",

View File

@ -3,18 +3,9 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import * as Catalog from "./catalog"; export * as Catalog from "./catalog";
import * as Navigation from "./navigation"; export * as Navigation from "./navigation";
import * as K8sApi from "./k8s-api"; export * as K8sApi from "./k8s-api";
import * as Power from "./power"; export * as Power from "./power";
import { IpcMain as Ipc } from "../ipc/ipc-main"; export { IpcMain as Ipc } from "../ipc/ipc-main";
import { LensMainExtension as LensExtension } from "../lens-main-extension"; export { LensMainExtension as LensExtension } from "../lens-main-extension";
export {
Catalog,
Navigation,
K8sApi,
Ipc,
LensExtension,
Power,
};

View File

@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import applicationInformationToken from "../../../../../common/vars/application-information-token"; import { applicationInformationToken } from "../../../../../common/vars/application-information-token";
const publishIsConfiguredInjectable = getInjectable({ const publishIsConfiguredInjectable = getInjectable({
id: "publish-is-configured", id: "publish-is-configured",

View File

@ -6,7 +6,7 @@
// Fix embedded kubeconfig paths under snap config // Fix embedded kubeconfig paths under snap config
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import applicationInformationToken from "../../../common/vars/application-information-token"; import { applicationInformationToken } from "../../../common/vars/application-information-token";
import { clusterStoreMigrationInjectionToken } from "../../../common/cluster-store/migration-token"; import { clusterStoreMigrationInjectionToken } from "../../../common/cluster-store/migration-token";
import loggerInjectable from "../../../common/logger.injectable"; import loggerInjectable from "../../../common/logger.injectable";
import isSnapPackageInjectable from "../../../common/vars/is-snap-package.injectable"; import isSnapPackageInjectable from "../../../common/vars/is-snap-package.injectable";

View File

@ -3,28 +3,11 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import * as Mobx from "mobx";
import { spawn } from "node-pty"; import { spawn } from "node-pty";
import * as LensExtensionsCommonApi from "../extensions/common-api";
import * as LensExtensionsMainApi from "../extensions/main-api";
export * as Mobx from "mobx";
export * as MainApi from "../extensions/main-api";
/** export const Pty = {
* Exports for virtual package "@k8slens/extensions" for main-process.
* All exporting names available in global runtime scope:
* e.g. global.Mobx, global.LensExtensions
*/
const LensExtensions = {
Common: LensExtensionsCommonApi,
Main: LensExtensionsMainApi,
};
export type {
LensExtensionsMainApi,
};
const Pty = {
spawn, spawn,
}; };
export { Mobx, LensExtensions, Pty };

View File

@ -1,23 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
// Main process
import { getDi } from "./getDi";
import { Mobx, LensExtensions, Pty } from "./extension-api";
import { createApp } from "./create-app";
const di = getDi();
const app = createApp({
di,
mode: process.env.NODE_ENV || "development",
});
app.start().catch((error) => {
console.error(error);
process.exit(1);
});
export { Mobx, LensExtensions, Pty };

View File

@ -2,20 +2,17 @@
* Copyright (c) OpenLens Authors. All rights reserved. * Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { spawn } from "node-pty";
import { afterApplicationIsLoadedInjectionToken } from "./start-main-application/runnable-tokens/after-application-is-loaded-injection-token";
import { beforeApplicationIsLoadingInjectionToken } from "./start-main-application/runnable-tokens/before-application-is-loading-injection-token";
import { beforeElectronIsReadyInjectionToken } from "./start-main-application/runnable-tokens/before-electron-is-ready-injection-token";
import { onLoadOfApplicationInjectionToken } from "./start-main-application/runnable-tokens/on-load-of-application-injection-token";
import * as extensionApi from "./extension-api";
import { createApp } from "./create-app";
// @experimental // @experimental
export { export { afterApplicationIsLoadedInjectionToken } from "./start-main-application/runnable-tokens/after-application-is-loaded-injection-token";
createApp, export { beforeApplicationIsLoadingInjectionToken } from "./start-main-application/runnable-tokens/before-application-is-loading-injection-token";
extensionApi, export { beforeElectronIsReadyInjectionToken } from "./start-main-application/runnable-tokens/before-electron-is-ready-injection-token";
afterApplicationIsLoadedInjectionToken, export { onLoadOfApplicationInjectionToken } from "./start-main-application/runnable-tokens/on-load-of-application-injection-token";
beforeApplicationIsLoadingInjectionToken, export { createApp } from "./create-app";
beforeElectronIsReadyInjectionToken, export * as Mobx from "mobx";
onLoadOfApplicationInjectionToken, export * as MainApi from "../extensions/main-api";
export const Pty = {
spawn,
}; };

View File

@ -13,7 +13,7 @@ import openLinkInBrowserInjectable from "../../../../common/utils/open-link-in-b
import getAbsolutePathInjectable from "../../../../common/path/get-absolute-path.injectable"; import getAbsolutePathInjectable from "../../../../common/path/get-absolute-path.injectable";
import lensResourcesDirInjectable from "../../../../common/vars/lens-resources-dir.injectable"; import lensResourcesDirInjectable from "../../../../common/vars/lens-resources-dir.injectable";
import isLinuxInjectable from "../../../../common/vars/is-linux.injectable"; import isLinuxInjectable from "../../../../common/vars/is-linux.injectable";
import applicationInformationToken from "../../../../common/vars/application-information-token"; import { applicationInformationToken } from "../../../../common/vars/application-information-token";
import pathExistsSyncInjectable from "../../../../common/fs/path-exists-sync.injectable"; import pathExistsSyncInjectable from "../../../../common/fs/path-exists-sync.injectable";
import lensProxyCertificateInjectable from "../../../../common/certificate/lens-proxy-certificate.injectable"; import lensProxyCertificateInjectable from "../../../../common/certificate/lens-proxy-certificate.injectable";

View File

@ -7,7 +7,7 @@ import { docsUrl, slackUrl } from "../../../common/vars";
import type { WeblinkData } from "../../../common/weblinks-store/weblink-store"; import type { WeblinkData } from "../../../common/weblinks-store/weblink-store";
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import { weblinkStoreMigrationInjectionToken } from "../../../common/weblinks-store/migration-token"; import { weblinkStoreMigrationInjectionToken } from "../../../common/weblinks-store/migration-token";
import applicationInformationToken from "../../../common/vars/application-information-token"; import { applicationInformationToken } from "../../../common/vars/application-information-token";
import { lensDocumentationWeblinkId, lensSlackWeblinkId } from "../links"; import { lensDocumentationWeblinkId, lensSlackWeblinkId } from "../links";
const currentVersionWeblinkStoreMigrationInjectable = getInjectable({ const currentVersionWeblinkStoreMigrationInjectable = getInjectable({

View File

@ -5,33 +5,11 @@
import React from "react"; import React from "react";
import ReactDOM from "react-dom"; import ReactDOM from "react-dom";
import * as Mobx from "mobx";
import * as MobxReact from "mobx-react";
import * as ReactRouter from "react-router";
import * as ReactRouterDom from "react-router-dom";
import * as LensExtensionsCommonApi from "../extensions/common-api";
import * as LensExtensionsRendererApi from "../extensions/renderer-api";
/** export { React, ReactDOM };
* Exports for virtual package "@k8slens/extensions" for renderer-process.
* All exporting names available in global runtime scope:
* e.g. Devtools -> Console -> window.LensExtensions (renderer)
*/
const LensExtensions = {
Common: LensExtensionsCommonApi,
Renderer: LensExtensionsRendererApi,
};
export type { export * as Mobx from "mobx";
LensExtensionsRendererApi, export * as MobxReact from "mobx-react";
}; export * as ReactRouter from "react-router";
export * as ReactRouterDom from "react-router-dom";
export { export * as RendererApi from "../extensions/renderer-api";
React,
ReactDOM,
ReactRouter,
ReactRouterDom,
Mobx,
MobxReact,
LensExtensions,
};

View File

@ -1,32 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import "./components/app.scss";
import { getDi } from "./getDi";
import {
React, ReactDOM, ReactRouter,
ReactRouterDom, Mobx, MobxReact, LensExtensions,
} from "./extension-api";
import { createApp } from "./create-app";
const di = getDi();
const app = createApp({
di,
mode: process.env.NODE_ENV || "development",
});
// run
app.start();
export {
React,
ReactDOM,
ReactRouter,
ReactRouterDom,
Mobx,
MobxReact,
LensExtensions,
};

View File

@ -3,12 +3,14 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import "./components/app.scss"; import "./components/app.scss";
import React from "react";
import * as extensionApi from "./extension-api"; import ReactDOM from "react-dom";
import { createApp } from "./create-app";
// @experimental // @experimental
export { export { React, ReactDOM };
createApp, export * as Mobx from "mobx";
extensionApi, export * as MobxReact from "mobx-react";
}; export * as ReactRouter from "react-router";
export * as ReactRouterDom from "react-router-dom";
export * as RendererApi from "../extensions/renderer-api";
export { createApp } from "./create-app";

View File

@ -1268,13 +1268,6 @@
"@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/resolve-uri" "^3.0.3"
"@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/sourcemap-codec" "^1.4.10"
"@k8slens/node-fetch@^6.4.0-beta.10":
version "6.4.0-beta.10"
resolved "https://registry.yarnpkg.com/@k8slens/node-fetch/-/node-fetch-6.4.0-beta.10.tgz#48ebaf120d84b605e2e1ad9259cf40fe2cbe99fa"
integrity sha512-m804GvcQB+FdsIQiUJOtCVLh8y2nmpF62muxVegxSsX0uW41SUYgxno5JgGifXEESKCf5qCnVYQwpTam2w6ZUw==
dependencies:
node-fetch "^3.3.0"
"@kubernetes/client-node@^0.18.1": "@kubernetes/client-node@^0.18.1":
version "0.18.1" version "0.18.1"
resolved "https://registry.yarnpkg.com/@kubernetes/client-node/-/client-node-0.18.1.tgz#58d864c8f584efd0f8670f6c46bb8e9d5abd58f6" resolved "https://registry.yarnpkg.com/@kubernetes/client-node/-/client-node-0.18.1.tgz#58d864c8f584efd0f8670f6c46bb8e9d5abd58f6"
@ -4821,11 +4814,6 @@ dashdash@^1.12.0:
dependencies: dependencies:
assert-plus "^1.0.0" assert-plus "^1.0.0"
data-uri-to-buffer@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e"
integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==
data-urls@^2.0.0: data-urls@^2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b"
@ -6241,14 +6229,6 @@ fecha@^4.2.0:
resolved "https://registry.yarnpkg.com/fecha/-/fecha-4.2.3.tgz#4d9ccdbc61e8629b259fdca67e65891448d569fd" resolved "https://registry.yarnpkg.com/fecha/-/fecha-4.2.3.tgz#4d9ccdbc61e8629b259fdca67e65891448d569fd"
integrity sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw== integrity sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==
fetch-blob@^3.1.2, fetch-blob@^3.1.4:
version "3.2.0"
resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9"
integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==
dependencies:
node-domexception "^1.0.0"
web-streams-polyfill "^3.0.3"
figures@^3.0.0: figures@^3.0.0:
version "3.2.0" version "3.2.0"
resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af"
@ -6515,13 +6495,6 @@ form-data@~2.3.2:
combined-stream "^1.0.6" combined-stream "^1.0.6"
mime-types "^2.1.12" mime-types "^2.1.12"
formdata-polyfill@^4.0.10:
version "4.0.10"
resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423"
integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==
dependencies:
fetch-blob "^3.1.2"
forwarded@0.2.0: forwarded@0.2.0:
version "0.2.0" version "0.2.0"
resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811"
@ -9660,20 +9633,6 @@ node-addon-api@^5.0.0:
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-5.0.0.tgz#7d7e6f9ef89043befdb20c1989c905ebde18c501" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-5.0.0.tgz#7d7e6f9ef89043befdb20c1989c905ebde18c501"
integrity sha512-CvkDw2OEnme7ybCykJpVcKH+uAOLV2qLqiyla128dN9TkEWfrYmxG6C2boDe5KcNQqZF3orkqzGgOMvZ/JNekA== integrity sha512-CvkDw2OEnme7ybCykJpVcKH+uAOLV2qLqiyla128dN9TkEWfrYmxG6C2boDe5KcNQqZF3orkqzGgOMvZ/JNekA==
node-domexception@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5"
integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==
node-fetch@^3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.0.tgz#37e71db4ecc257057af828d523a7243d651d91e4"
integrity sha512-BKwRP/O0UvoMKp7GNdwPlObhYGB5DQqwhEDQlNKuoqwVYSxkSZCSbHjnFFmUEtwSKRPU4kNK8PbDYYitwaE3QA==
dependencies:
data-uri-to-buffer "^4.0.0"
fetch-blob "^3.1.4"
formdata-polyfill "^4.0.10"
node-forge@^1, node-forge@^1.2.1: node-forge@^1, node-forge@^1.2.1:
version "1.3.1" version "1.3.1"
resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3"
@ -13296,11 +13255,6 @@ wcwidth@^1.0.0:
dependencies: dependencies:
defaults "^1.0.3" defaults "^1.0.3"
web-streams-polyfill@^3.0.3:
version "3.2.1"
resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6"
integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==
webidl-conversions@^5.0.0: webidl-conversions@^5.0.0:
version "5.0.0" version "5.0.0"
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff"

View File

@ -5,8 +5,8 @@
"version": "6.4.0-beta.10", "version": "6.4.0-beta.10",
"copyright": "© 2022 OpenLens Authors", "copyright": "© 2022 OpenLens Authors",
"license": "MIT", "license": "MIT",
"main": "dist/src/extension-api.js", "main": "dist/extension-api.js",
"types": "dist/src/extension-api.d.ts", "types": "dist/extension-api.d.ts",
"files": [ "files": [
"dist/**/*.ts", "dist/**/*.ts",
"__mocks__/*.ts", "__mocks__/*.ts",

View File

@ -3,8 +3,6 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { extensionApi as Main } from "@k8slens/core/main"; export { MainApi as Main } from "@k8slens/core/main";
import { extensionApi as Renderer } from "@k8slens/core/renderer"; export { RendererApi as Renderer } from "@k8slens/core/renderer";
import { extensionApi as Common } from "@k8slens/core/common"; export { CommonApi as Common } from "@k8slens/core/common";
export { Main, Renderer, Common };

View File

@ -1,7 +1,8 @@
import { createContainer } from "@ogre-tools/injectable"; import { createContainer } from "@ogre-tools/injectable";
import { autoRegister } from "@ogre-tools/injectable-extension-for-auto-registration"; import { autoRegister } from "@ogre-tools/injectable-extension-for-auto-registration";
import { runInAction } from "mobx"; import { runInAction } from "mobx";
import { createApp, extensionApi } from "@k8slens/core/main"; import { createApp, MainApi } from "@k8slens/core/main";
import { CommonApi } from "@k8slens/core/common";
const di = createContainer("main"); const di = createContainer("main");
const app = createApp({ const app = createApp({
@ -29,10 +30,12 @@ app.start().catch((error) => {
process.exit(1); process.exit(1);
}) })
const { Mobx, LensExtensions, Pty } = extensionApi;
export { export {
Mobx, Mobx,
LensExtensions, Pty,
Pty } from "@k8slens/core/main";
};
export const LensExtensions = {
Main: MainApi,
Common: CommonApi,
}

View File

@ -1,7 +1,8 @@
import "@k8slens/core/styles"; import "@k8slens/core/styles";
import { createContainer } from "@ogre-tools/injectable"; import { createContainer } from "@ogre-tools/injectable";
import { runInAction } from "mobx"; import { runInAction } from "mobx";
import { createApp, extensionApi } from "@k8slens/core/renderer"; import { createApp, RendererApi } from "@k8slens/core/renderer";
import { CommonApi } from "@k8slens/core/common";
import { autoRegister } from "@ogre-tools/injectable-extension-for-auto-registration"; import { autoRegister } from "@ogre-tools/injectable-extension-for-auto-registration";
const di = createContainer("renderer"); const di = createContainer("renderer");
@ -22,16 +23,6 @@ runInAction(() => {
app.start(); app.start();
const {
React,
ReactDOM,
ReactRouter,
ReactRouterDom,
Mobx,
MobxReact,
LensExtensions
} = extensionApi;
export { export {
React, React,
ReactDOM, ReactDOM,
@ -39,5 +30,9 @@ export {
ReactRouterDom, ReactRouterDom,
Mobx, Mobx,
MobxReact, MobxReact,
LensExtensions } from "@k8slens/core/renderer";
export const LensExtensions = {
Renderer: RendererApi,
Common: CommonApi,
}; };

File diff suppressed because it is too large Load Diff