Add cluster UI block injection token and current implementation as a Feature

Signed-off-by: Juho Heikka <juho.heikka@gmail.com>
This commit is contained in:
Juho Heikka committed 2023-04-05 15:59:27 +03:00
1 parent af1808dbb3
commit 66f3cc8bcf
12 files changed
+127 -5

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
module.exports = {
extends: "@k8slens/eslint-config/eslint",
parserOptions: {
project: "./tsconfig.json",
},
};
+1
View File
@@ -0,0 +1 @@
"@k8slens/eslint-config/prettier"
+17
View File
@@ -0,0 +1,17 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import type React from "react";
import { getInjectionToken } from "@ogre-tools/injectable";
export type ClusterOverviewUIBlock = {
id: string;
Component: React.ElementType;
orderNumber: number;
};
export const clusterOverviewUIBlockInjectionToken = getInjectionToken<ClusterOverviewUIBlock>({
id: "cluster-overview-ui-block-injection-token",
});
+1
View File
@@ -0,0 +1 @@
module.exports = require("@k8slens/jest").monorepoPackageConfig(__dirname).configForReact;
+41
View File
@@ -0,0 +1,41 @@
{
"name": "@k8slens/metrics",
"private": false,
"version": "6.5.0-alpha.1",
"description": "Code that is common to all Features and those registering them.",
"type": "commonjs",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"files": [
"dist"
],
"repository": {
"type": "git",
"url": "git+https://github.com/lensapp/lens.git"
},
"main": "dist/index.js",
"types": "dist/index.d.ts",
"author": {
"name": "OpenLens Authors",
"email": "info@k8slens.dev"
},
"license": "MIT",
"homepage": "https://github.com/lensapp/lens",
"scripts": {
"build": "webpack",
"clean": "rimraf dist/",
"dev": "webpack --mode=development --watch",
"test": "jest --coverage --runInBand",
"lint": "lens-lint",
"lint:fix": "lens-lint --fix"
},
"peerDependencies": {
"@ogre-tools/injectable": "^15.1.2",
"react": "^17.0.2"
},
"devDependencies": {
"@k8slens/eslint-config": "6.5.0-alpha.1"
}
}
+4
View File
@@ -0,0 +1,4 @@
{
"extends": "@k8slens/typescript/config/base.json",
"include": ["**/*.ts"]
}
+1
View File
@@ -0,0 +1 @@
module.exports = require("@k8slens/webpack").configForReact;