mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-13 21:21:44 +00:00
39 lines
851 B
TypeScript
39 lines
851 B
TypeScript
import { CoreStoreSpecifics, CoreStoreConfig } from '@shell/core/types';
|
|
|
|
import { SteveFactory, steveStoreInit } from '@shell/plugins/steve/index';
|
|
import { PRODUCT_NAME } from '../../config/harvester';
|
|
import getters from './getters';
|
|
import mutations from './mutations';
|
|
import actions from './actions';
|
|
|
|
const harvesterFactory = (): CoreStoreSpecifics => {
|
|
const steveFactory = SteveFactory();
|
|
|
|
steveFactory.getters = {
|
|
...steveFactory.getters,
|
|
...getters,
|
|
};
|
|
|
|
steveFactory.mutations = {
|
|
...steveFactory.mutations,
|
|
...mutations,
|
|
};
|
|
|
|
steveFactory.actions = {
|
|
...steveFactory.actions,
|
|
...actions,
|
|
};
|
|
|
|
return steveFactory;
|
|
};
|
|
const config: CoreStoreConfig = {
|
|
namespace: PRODUCT_NAME,
|
|
isClusterStore: true
|
|
};
|
|
|
|
export default {
|
|
specifics: harvesterFactory(),
|
|
config,
|
|
init: steveStoreInit
|
|
};
|