Cody Jackson 2d2615128c
Putting in some temporary workarounds regarding the typesystem
Without these changes we can't build the app using `yarn build-pkg harvester` because it complains about missing modules in @rancher/shell imports. I believe this will be resolved by https://github.com/rancher/dashboard/issues/11797#issue-2502509655 and we should remove this change once that occurs.
2024-10-23 17:00:57 +02:00

29 lines
1.1 KiB
TypeScript

//@ts-nocheck
import { importTypes } from '@rancher/auto-import';
import { IPlugin } from '@shell/core/types';
import extensionRoutes from './routing/harvester-routing';
import harvesterCommonStore from './store/harvester-common';
import harvesterStore from './store/harvester-store';
import customValidators from './validators';
// Init the package
export default function (plugin: IPlugin) {
// Auto-import model, detail, edit from the folders
importTypes(plugin);
// Provide plugin metadata from package.json
plugin.metadata = require('./package.json');
// Built-in icon
plugin.metadata.icon = require('./icon.svg');
plugin.addProduct(require('./config/harvester-manager'));
plugin.addProduct(require('./config/harvester-cluster'));
plugin.addDashboardStore(harvesterCommonStore.config.namespace, harvesterCommonStore.specifics, harvesterCommonStore.config);
plugin.addDashboardStore(harvesterStore.config.namespace, harvesterStore.specifics, harvesterStore.config, harvesterStore.init);
plugin.validators = customValidators;
plugin.addRoutes(extensionRoutes);
}