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

Merge branch 'master' into enhancement-ability-to-remove-subnamespaces

This commit is contained in:
Alex Andreev 2023-03-03 12:48:58 +03:00
commit 148a036248
23 changed files with 1036 additions and 994 deletions

View File

@ -1,7 +1,7 @@
{ {
"$schema": "node_modules/lerna/schemas/lerna-schema.json", "$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useWorkspaces": true, "useWorkspaces": true,
"version": "6.4.0-beta.13", "version": "6.5.0-alpha.0",
"npmClient": "npm", "npmClient": "npm",
"npmClientArgs": [ "npmClientArgs": [
"--network-timeout=100000" "--network-timeout=100000"

1900
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -32,6 +32,6 @@
"adr": "^1.4.3", "adr": "^1.4.3",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"lerna": "^6.5.1", "lerna": "^6.5.1",
"rimraf": "^4.1.2" "rimraf": "^4.1.3"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@k8slens/bump-version-for-cron", "name": "@k8slens/bump-version-for-cron",
"version": "6.4.0-cron.4db172da60", "version": "6.5.0-alpha.0",
"description": "CLI to bump the version to during a cron daily alpha release", "description": "CLI to bump the version to during a cron daily alpha release",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
@ -23,7 +23,7 @@
}, },
"devDependencies": { "devDependencies": {
"@swc/cli": "^0.1.61", "@swc/cli": "^0.1.61",
"@swc/core": "^1.3.35", "@swc/core": "^1.3.37",
"@types/node": "^16.18.11", "@types/node": "^16.18.11",
"@types/semver": "^7.3.13", "@types/semver": "^7.3.13",
"rimraf": "^4.1.2" "rimraf": "^4.1.2"

View File

@ -3,7 +3,7 @@
"productName": "", "productName": "",
"description": "Lens Desktop Core", "description": "Lens Desktop Core",
"homepage": "https://github.com/lensapp/lens", "homepage": "https://github.com/lensapp/lens",
"version": "6.4.0-beta.13", "version": "6.5.0-alpha.0",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/lensapp/lens.git" "url": "git+https://github.com/lensapp/lens.git"
@ -127,7 +127,7 @@
"@astronautlabs/jsonpath": "^1.1.0", "@astronautlabs/jsonpath": "^1.1.0",
"@hapi/call": "^9.0.1", "@hapi/call": "^9.0.1",
"@hapi/subtext": "^7.1.0", "@hapi/subtext": "^7.1.0",
"@k8slens/node-fetch": "^6.4.0-beta.13", "@k8slens/node-fetch": "^6.5.0-alpha.0",
"@kubernetes/client-node": "^0.18.1", "@kubernetes/client-node": "^0.18.1",
"@material-ui/styles": "^4.11.5", "@material-ui/styles": "^4.11.5",
"@ogre-tools/fp": "^15.1.1", "@ogre-tools/fp": "^15.1.1",
@ -202,7 +202,7 @@
"@material-ui/lab": "^4.0.0-alpha.60", "@material-ui/lab": "^4.0.0-alpha.60",
"@sentry/types": "^6.19.7", "@sentry/types": "^6.19.7",
"@swc/cli": "^0.1.61", "@swc/cli": "^0.1.61",
"@swc/core": "^1.3.35", "@swc/core": "^1.3.37",
"@swc/jest": "^0.2.24", "@swc/jest": "^0.2.24",
"@testing-library/dom": "^7.31.2", "@testing-library/dom": "^7.31.2",
"@testing-library/jest-dom": "^5.16.5", "@testing-library/jest-dom": "^5.16.5",
@ -329,7 +329,7 @@
"xterm-addon-fit": "^0.5.0" "xterm-addon-fit": "^0.5.0"
}, },
"peerDependencies": { "peerDependencies": {
"@k8slens/application": "^6.4.0-beta.13", "@k8slens/application": "^6.5.0-alpha.0",
"@types/byline": "^4.2.33", "@types/byline": "^4.2.33",
"@types/chart.js": "^2.9.36", "@types/chart.js": "^2.9.36",
"@types/color": "^3.0.3", "@types/color": "^3.0.3",

View File

@ -24,6 +24,7 @@ export const applicationInformationFakeInjectable = getInjectable({
welcomeRoute: "/welcome", welcomeRoute: "/welcome",
copyright: "some-copyright-information", copyright: "some-copyright-information",
description: "some-descriptive-text", description: "some-descriptive-text",
dependencies: {},
}), }),
injectionToken: applicationInformationToken, injectionToken: applicationInformationToken,

View File

@ -2,22 +2,34 @@
* 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 "@k8slens/application";
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import { bundledExtensionInjectionToken } from "../../../../../../common/library"; import { bundledExtensionInjectionToken } from "../../../../../../common/library";
import { object } from "../../../../../../common/utils";
import buildSemanticVersionInjectable from "../../../../../../common/vars/build-semantic-version.injectable"; import buildSemanticVersionInjectable from "../../../../../../common/vars/build-semantic-version.injectable";
const aboutBundledExtensionsInjectable = getInjectable({ const specificVersionsInjectable = getInjectable({
id: "about-bundled-extensions", id: "specific-versions",
instantiate: (di) => { instantiate: (di) => {
const buildSemanticVersion = di.inject(buildSemanticVersionInjectable); const buildSemanticVersion = di.inject(buildSemanticVersionInjectable);
const bundledExtensions = di.injectMany(bundledExtensionInjectionToken); const bundledExtensions = di.injectMany(bundledExtensionInjectionToken);
const applicationInformation = di.inject(applicationInformationToken);
if (buildSemanticVersion.get().prerelease[0] === "latest") { if (buildSemanticVersion.get().prerelease[0] === "latest") {
return []; return [];
} }
return bundledExtensions.map(ext => `${ext.manifest.name}: ${ext.manifest.version}`); const corePackageVersions = object.entries(applicationInformation.dependencies)
.filter(([name]) => name.startsWith("@k8slens/"))
.map(([name, version]) => `${name}: ${version}`);
const bundledExtensionVersions = bundledExtensions
.map(ext => `${ext.manifest.name}: ${ext.manifest.version}`);
return [
...corePackageVersions,
...bundledExtensionVersions,
];
}, },
}); });
export default aboutBundledExtensionsInjectable; export default specificVersionsInjectable;

View File

@ -10,7 +10,7 @@ import productNameInjectable from "../../../../../../common/vars/product-name.in
import buildVersionInjectable from "../../../../../../main/vars/build-version/build-version.injectable"; import buildVersionInjectable from "../../../../../../main/vars/build-version/build-version.injectable";
import extensionApiVersionInjectable from "../../../../../../common/vars/extension-api-version.injectable"; import extensionApiVersionInjectable from "../../../../../../common/vars/extension-api-version.injectable";
import applicationCopyrightInjectable from "../../../../../../common/vars/application-copyright.injectable"; import applicationCopyrightInjectable from "../../../../../../common/vars/application-copyright.injectable";
import aboutBundledExtensionsInjectable from "./about-bundled-extensions.injectable"; import specificVersionsInjectable from "./about-bundled-extensions.injectable";
const showAboutInjectable = getInjectable({ const showAboutInjectable = getInjectable({
id: "show-about", id: "show-about",
@ -23,7 +23,7 @@ const showAboutInjectable = getInjectable({
const appName = di.inject(appNameInjectable); const appName = di.inject(appNameInjectable);
const productName = di.inject(productNameInjectable); const productName = di.inject(productNameInjectable);
const applicationCopyright = di.inject(applicationCopyrightInjectable); const applicationCopyright = di.inject(applicationCopyrightInjectable);
const aboutBundledExtensions = di.inject(aboutBundledExtensionsInjectable); const specificVersions = di.inject(specificVersionsInjectable);
return () => { return () => {
const appInfo = [ const appInfo = [
@ -32,14 +32,26 @@ const showAboutInjectable = getInjectable({
`Electron: ${process.versions.electron}`, `Electron: ${process.versions.electron}`,
`Chrome: ${process.versions.chrome}`, `Chrome: ${process.versions.chrome}`,
`Node: ${process.versions.node}`, `Node: ${process.versions.node}`,
...aboutBundledExtensions,
applicationCopyright, applicationCopyright,
]; ];
if (specificVersions.length > 0) {
appInfo.push(
"",
"",
...specificVersions,
);
}
showMessagePopup( showMessagePopup(
`${isWindows ? " ".repeat(2) : ""}${appName}`, `${isWindows ? " ".repeat(2) : ""}${appName}`,
productName, productName,
appInfo.join("\r\n"), appInfo.join("\r\n"),
{
textWidth: specificVersions.length > 0
? 300
: undefined,
},
); );
}; };
}, },

View File

@ -5,7 +5,11 @@
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import electronDialogInjectable from "./electron-dialog.injectable"; import electronDialogInjectable from "./electron-dialog.injectable";
export type ShowMessagePopup = (title: string, message: string, detail: string) => void; export interface ShowMessagePopupOptions {
textWidth?: number;
}
export type ShowMessagePopup = (title: string, message: string, detail: string, options?: ShowMessagePopupOptions) => void;
const showMessagePopupInjectable = getInjectable({ const showMessagePopupInjectable = getInjectable({
id: "show-message-popup", id: "show-message-popup",
@ -13,13 +17,14 @@ const showMessagePopupInjectable = getInjectable({
instantiate: (di): ShowMessagePopup => { instantiate: (di): ShowMessagePopup => {
const dialog = di.inject(electronDialogInjectable); const dialog = di.inject(electronDialogInjectable);
return async (title, message, detail) => { return async (title, message, detail, options = {}) => {
await dialog.showMessageBox({ await dialog.showMessageBox({
title, title,
message, message,
detail, detail,
type: "info", type: "info",
buttons: ["Close"], buttons: ["Close"],
...options,
}); });
}; };
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "@k8slens/ensure-binaries", "name": "@k8slens/ensure-binaries",
"version": "6.4.0-beta.13", "version": "6.5.0-alpha.0",
"description": "CLI for downloading configured versions of the bundled versions of CLIs", "description": "CLI for downloading configured versions of the bundled versions of CLIs",
"main": "dist/index.js", "main": "dist/index.js",
"license": "MIT", "license": "MIT",
@ -32,7 +32,7 @@
}, },
"devDependencies": { "devDependencies": {
"@swc/cli": "^0.1.61", "@swc/cli": "^0.1.61",
"@swc/core": "^1.3.35", "@swc/core": "^1.3.37",
"@types/cli-progress": "^3.11.0", "@types/cli-progress": "^3.11.0",
"@types/gunzip-maybe": "^1.4.0", "@types/gunzip-maybe": "^1.4.0",
"@types/node": "^16.18.11", "@types/node": "^16.18.11",

View File

@ -2,7 +2,7 @@
"name": "@k8slens/extensions", "name": "@k8slens/extensions",
"productName": "OpenLens extensions", "productName": "OpenLens extensions",
"description": "OpenLens - Open Source Kubernetes IDE: extensions", "description": "OpenLens - Open Source Kubernetes IDE: extensions",
"version": "6.4.0-beta.13", "version": "6.5.0-alpha.0",
"copyright": "© 2022 OpenLens Authors", "copyright": "© 2022 OpenLens Authors",
"license": "MIT", "license": "MIT",
"main": "dist/extension-api.js", "main": "dist/extension-api.js",
@ -26,7 +26,7 @@
"prepare:dev": "npm run build" "prepare:dev": "npm run build"
}, },
"dependencies": { "dependencies": {
"@k8slens/core": "^6.4.0-beta.13" "@k8slens/core": "^6.5.0-alpha.0"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^16.18.6", "@types/node": "^16.18.6",

View File

@ -1,6 +1,6 @@
{ {
"name": "@k8slens/generate-tray-icons", "name": "@k8slens/generate-tray-icons",
"version": "6.4.0-beta.13", "version": "6.5.0-alpha.0",
"description": "CLI generating tray icons for building a lens-like application", "description": "CLI generating tray icons for building a lens-like application",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
@ -23,7 +23,7 @@
}, },
"devDependencies": { "devDependencies": {
"@swc/cli": "^0.1.61", "@swc/cli": "^0.1.61",
"@swc/core": "^1.3.35", "@swc/core": "^1.3.37",
"@types/jsdom": "^20.0.1", "@types/jsdom": "^20.0.1",
"@types/node": "^18.11.18", "@types/node": "^18.11.18",
"@types/sharp": "^0.31.1", "@types/sharp": "^0.31.1",

View File

@ -1,7 +1,7 @@
{ {
"name": "@k8slens/jest", "name": "@k8slens/jest",
"private": false, "private": false,
"version": "0.0.1", "version": "6.5.0-alpha.0",
"description": "Jest configuration and scripts for Lens packages.", "description": "Jest configuration and scripts for Lens packages.",
"type": "commonjs", "type": "commonjs",
"publishConfig": { "publishConfig": {
@ -20,7 +20,7 @@
"license": "MIT", "license": "MIT",
"homepage": "https://github.com/lensapp/lens", "homepage": "https://github.com/lensapp/lens",
"dependencies": { "dependencies": {
"@swc/core": "^1.3.20", "@swc/core": "^1.3.37",
"@swc/jest": "^0.2.23", "@swc/jest": "^0.2.23",
"@testing-library/jest-dom": "^5.16.5", "@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0", "@testing-library/react": "^13.4.0",

View File

@ -1,7 +1,7 @@
{ {
"name": "@k8slens/typescript", "name": "@k8slens/typescript",
"private": false, "private": false,
"version": "0.0.1", "version": "6.5.0-alpha.0",
"description": "Typescript configuration for Lens packages.", "description": "Typescript configuration for Lens packages.",
"type": "commonjs", "type": "commonjs",
"publishConfig": { "publishConfig": {

View File

@ -1,7 +1,7 @@
{ {
"name": "@k8slens/webpack", "name": "@k8slens/webpack",
"private": false, "private": false,
"version": "0.0.1", "version": "6.5.0-alpha.0",
"description": "Webpack configurations and scripts for Lens packages.", "description": "Webpack configurations and scripts for Lens packages.",
"type": "commonjs", "type": "commonjs",
"publishConfig": { "publishConfig": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@k8slens/node-fetch", "name": "@k8slens/node-fetch",
"version": "6.4.0-beta.13", "version": "6.5.0-alpha.0",
"description": "Node fetch for Lens", "description": "Node fetch for Lens",
"license": "MIT", "license": "MIT",
"private": false, "private": false,

View File

@ -4,7 +4,7 @@
"productName": "OpenLens", "productName": "OpenLens",
"description": "OpenLens - Open Source IDE for Kubernetes", "description": "OpenLens - Open Source IDE for Kubernetes",
"homepage": "https://github.com/lensapp/lens", "homepage": "https://github.com/lensapp/lens",
"version": "6.4.0-beta.13", "version": "6.5.0-alpha.0",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/lensapp/lens.git" "url": "git+https://github.com/lensapp/lens.git"
@ -195,10 +195,10 @@
} }
}, },
"dependencies": { "dependencies": {
"@k8slens/application": "^6.4.0-beta.13", "@k8slens/application": "^6.5.0-alpha.0",
"@k8slens/core": "^6.4.0-beta.13", "@k8slens/core": "^6.5.0-alpha.0",
"@k8slens/ensure-binaries": "^6.4.0-beta.13", "@k8slens/ensure-binaries": "^6.5.0-alpha.0",
"@k8slens/generate-tray-icons": "^6.4.0-beta.13", "@k8slens/generate-tray-icons": "^6.5.0-alpha.0",
"@ogre-tools/fp": "^15.1.1", "@ogre-tools/fp": "^15.1.1",
"@ogre-tools/injectable": "^15.1.1", "@ogre-tools/injectable": "^15.1.1",
"@ogre-tools/injectable-extension-for-auto-registration": "^15.1.1", "@ogre-tools/injectable-extension-for-auto-registration": "^15.1.1",
@ -208,10 +208,11 @@
"rimraf": "^4.1.2" "rimraf": "^4.1.2"
}, },
"devDependencies": { "devDependencies": {
"@k8slens/node-fetch": "^6.4.0-beta.13", "@electron/rebuild": "^3.2.10",
"@k8slens/node-fetch": "^6.5.0-alpha.0",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.10", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
"@swc/cli": "^0.1.61", "@swc/cli": "^0.1.61",
"@swc/core": "^1.3.35", "@swc/core": "^1.3.37",
"@swc/jest": "^0.2.24", "@swc/jest": "^0.2.24",
"@types/byline": "^4.2.33", "@types/byline": "^4.2.33",
"@types/chart.js": "^2.9.36", "@types/chart.js": "^2.9.36",
@ -272,7 +273,6 @@
"webpack-cli": "^4.9.2", "webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.11.1", "webpack-dev-server": "^4.11.1",
"webpack-node-externals": "^3.0.0", "webpack-node-externals": "^3.0.0",
"xterm-addon-fit": "^0.5.0", "xterm-addon-fit": "^0.5.0"
"@electron/rebuild": "^3.2.10"
} }
} }

View File

@ -8,12 +8,9 @@ import { applicationInformationToken } from "@k8slens/application";
const applicationInformationInjectable = getInjectable({ const applicationInformationInjectable = getInjectable({
id: "application-information", id: "application-information",
injectionToken: applicationInformationToken,
instantiate: () => { instantiate: () => {
const { const {
version, version,
config: { config: {
bundledHelmVersion, bundledHelmVersion,
bundledKubectlVersion, bundledKubectlVersion,
@ -22,12 +19,12 @@ const applicationInformationInjectable = getInjectable({
sentryDsn, sentryDsn,
welcomeRoute, welcomeRoute,
}, },
productName, productName,
build, build,
copyright, copyright,
description, description,
name, name,
dependencies,
} = packageJson; } = packageJson;
return { return {
@ -43,9 +40,11 @@ const applicationInformationInjectable = getInjectable({
contentSecurityPolicy, contentSecurityPolicy,
welcomeRoute, welcomeRoute,
updatingIsEnabled: (build as any)?.publish?.length > 0, updatingIsEnabled: (build as any)?.publish?.length > 0,
dependencies,
}; };
}, },
causesSideEffects: true, causesSideEffects: true,
injectionToken: applicationInformationToken,
}); });
export default applicationInformationInjectable; export default applicationInformationInjectable;

View File

@ -1,6 +1,6 @@
{ {
"name": "@k8slens/release-tool", "name": "@k8slens/release-tool",
"version": "6.4.0-beta.13", "version": "6.5.0-alpha.0",
"description": "Release tool for lens monorepo", "description": "Release tool for lens monorepo",
"main": "dist/index.mjs", "main": "dist/index.mjs",
"license": "MIT", "license": "MIT",
@ -15,7 +15,7 @@
"type": "module", "type": "module",
"devDependencies": { "devDependencies": {
"@swc/cli": "^0.1.61", "@swc/cli": "^0.1.61",
"@swc/core": "^1.3.35", "@swc/core": "^1.3.37",
"@types/inquirer": "^9.0.3", "@types/inquirer": "^9.0.3",
"@types/node": "^16.18.11", "@types/node": "^16.18.11",
"@types/semver": "^7.3.13", "@types/semver": "^7.3.13",

View File

@ -1,6 +1,6 @@
{ {
"name": "@k8slens/semver", "name": "@k8slens/semver",
"version": "6.4.0-beta.13", "version": "6.5.0-alpha.0",
"description": "CLI over semver package for picking parts of a version", "description": "CLI over semver package for picking parts of a version",
"license": "MIT", "license": "MIT",
"private": true, "private": true,
@ -15,7 +15,7 @@
}, },
"devDependencies": { "devDependencies": {
"@swc/cli": "^0.1.61", "@swc/cli": "^0.1.61",
"@swc/core": "^1.3.35", "@swc/core": "^1.3.37",
"@types/command-line-args": "^5.2.0", "@types/command-line-args": "^5.2.0",
"@types/node": "^16.18.11", "@types/node": "^16.18.11",
"@types/semver": "^7.3.13", "@types/semver": "^7.3.13",

View File

@ -1,7 +1,7 @@
{ {
"name": "@k8slens/application", "name": "@k8slens/application",
"private": false, "private": false,
"version": "6.4.0-beta.13", "version": "6.5.0-alpha.0",
"description": "Package for creating Lens applications", "description": "Package for creating Lens applications",
"type": "commonjs", "type": "commonjs",
"files": [ "files": [

View File

@ -17,6 +17,7 @@ export type ApplicationInformation = {
contentSecurityPolicy: string, contentSecurityPolicy: string,
welcomeRoute: string, welcomeRoute: string,
updatingIsEnabled: boolean; updatingIsEnabled: boolean;
dependencies: Partial<Record<string, string>>;
} }
export const applicationInformationToken = getInjectionToken<ApplicationInformation>({ export const applicationInformationToken = getInjectionToken<ApplicationInformation>({

View File

@ -1,9 +1,15 @@
{ {
"name": "@k8slens/feature-core", "name": "@k8slens/feature-core",
"private": false, "private": false,
"version": "0.0.1", "version": "6.5.0-alpha.0",
"description": "Code that is common to all Features and those registering them.", "description": "Code that is common to all Features and those registering them.",
"type": "commonjs", "type": "commonjs",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"files": [ "files": [
"dist" "dist"
], ],