mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix cluster-settings package build process
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
1 parent
df327dc109
commit
2709119910
3 files changed
+57
-9
No files matched your search
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "@k8slens/cluster-settings",
|
||||
"version": "6.5.0-alpha.",
|
||||
"description": "Injection tokens exporter for cluster settings configuration",
|
||||
"version": "6.5.0-alpha.1",
|
||||
"description": "Injection token exporter for cluster settings configuration",
|
||||
"license": "MIT",
|
||||
"private": false,
|
||||
"mode": "production",
|
||||
"mode": "production",
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
"registry": "https://registry.npmjs.org/"
|
||||
@@ -16,13 +16,16 @@
|
||||
],
|
||||
"scripts": {
|
||||
"clean": "rimraf dist/",
|
||||
"build": "swc ./src/index.ts -d ./dist"
|
||||
"generate-types": "tsc --d --declarationDir ./dist --declarationMap --emitDeclarationOnly",
|
||||
"build": "npm run generate-types && swc ./src/index.ts -d ./dist"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ogre-tools/injectable": "^15.1.2",
|
||||
"@swc/cli": "^0.1.61",
|
||||
"@swc/core": "^1.3.37",
|
||||
"@types/node": "^16.18.11",
|
||||
"@types/semver": "^7.3.13",
|
||||
"rimraf": "^4.1.2"
|
||||
"rimraf": "^4.1.2",
|
||||
"typescript": "^5.0.2"
|
||||
}
|
||||
}
|
||||
@@ -1,2 +1,30 @@
|
||||
export * from "../../core/src/renderer/components/cluster-settings/cluster-settings-menu-injection-token";
|
||||
export * from "../../core/src/renderer/components/cluster-settings/cluster-settings-component-injection-token";
|
||||
import { getInjectionToken } from "@ogre-tools/injectable";
|
||||
|
||||
type ClusterPreferences = {
|
||||
clusterName?: string;
|
||||
icon?: string | null;
|
||||
}
|
||||
|
||||
export interface ClusterIconMenuItem {
|
||||
id: string;
|
||||
title: string;
|
||||
disabled?: (preferences: ClusterPreferences) => boolean;
|
||||
onClick: (preferences: ClusterPreferences) => void;
|
||||
}
|
||||
|
||||
export const clusterIconSettingsMenuInjectionToken = getInjectionToken<ClusterIconMenuItem>({
|
||||
id: "cluster-icon-settings-menu-injection-token",
|
||||
});
|
||||
|
||||
export interface ClusterIconSettingComponentProps {
|
||||
preferences: ClusterPreferences;
|
||||
}
|
||||
|
||||
export interface ClusterIconSettingsComponent {
|
||||
id: string;
|
||||
Component: React.ComponentType<ClusterIconSettingComponentProps>;
|
||||
}
|
||||
|
||||
export const clusterIconSettingsComponentInjectionToken = getInjectionToken<ClusterIconSettingsComponent>({
|
||||
id: "cluster-icon-settings-component-injection-token",
|
||||
});
|
||||
Reference in new issue
Block a user