@laststance/claude-plugin-dashboard 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/app.js +346 -211
- package/dist/cli.js +3 -1
- package/dist/components/ComponentBadges.d.ts +0 -9
- package/dist/components/ComponentBadges.js +0 -33
- package/dist/components/ComponentDetail.d.ts +32 -0
- package/dist/components/ComponentDetail.js +106 -0
- package/dist/components/ComponentList.d.ts +36 -2
- package/dist/components/ComponentList.js +105 -11
- package/dist/components/HelpOverlay.js +1 -0
- package/dist/components/KeyHints.d.ts +1 -0
- package/dist/components/KeyHints.js +8 -1
- package/dist/components/PluginDetail.d.ts +16 -3
- package/dist/components/PluginDetail.js +29 -3
- package/dist/services/componentService.d.ts +10 -42
- package/dist/services/componentService.js +19 -412
- package/dist/services/components/hookService.d.ts +17 -0
- package/dist/services/components/hookService.js +45 -0
- package/dist/services/components/index.d.ts +41 -0
- package/dist/services/components/index.js +126 -0
- package/dist/services/components/markdownService.d.ts +39 -0
- package/dist/services/components/markdownService.js +147 -0
- package/dist/services/components/serverService.d.ts +28 -0
- package/dist/services/components/serverService.js +69 -0
- package/dist/services/components/skillService.d.ts +48 -0
- package/dist/services/components/skillService.js +164 -0
- package/dist/services/components/utils.d.ts +23 -0
- package/dist/services/components/utils.js +42 -0
- package/dist/services/pluginActionsService.d.ts +31 -2
- package/dist/services/pluginActionsService.js +65 -6
- package/dist/store/index.d.ts +46 -0
- package/dist/store/index.js +47 -0
- package/dist/store/slices/marketplaceSlice.d.ts +344 -0
- package/dist/store/slices/marketplaceSlice.js +152 -0
- package/dist/store/slices/pluginSlice.d.ts +1544 -0
- package/dist/store/slices/pluginSlice.js +191 -0
- package/dist/store/slices/uiSlice.d.ts +147 -0
- package/dist/store/slices/uiSlice.js +126 -0
- package/dist/tabs/DiscoverTab.d.ts +8 -2
- package/dist/tabs/DiscoverTab.js +2 -2
- package/dist/tabs/EnabledTab.d.ts +8 -2
- package/dist/tabs/EnabledTab.js +2 -2
- package/dist/tabs/ErrorsTab.js +1 -1
- package/dist/tabs/InstalledTab.d.ts +8 -2
- package/dist/tabs/InstalledTab.js +2 -2
- package/dist/types/index.d.ts +47 -4
- package/package.json +7 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Plugin actions service for install/uninstall operations
|
|
3
|
-
* Executes `claude plugin install/uninstall` as subprocess
|
|
2
|
+
* Plugin actions service for install/uninstall/update operations
|
|
3
|
+
* Executes `claude plugin install/uninstall/update` as subprocess
|
|
4
4
|
*/
|
|
5
5
|
import { spawn } from 'node:child_process';
|
|
6
6
|
/**
|
|
@@ -20,12 +20,51 @@ export function uninstallPlugin(pluginId) {
|
|
|
20
20
|
return executePluginAction('uninstall', pluginId);
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
24
|
-
* @param action - 'install' or 'uninstall'
|
|
23
|
+
* Update a plugin via Claude CLI
|
|
25
24
|
* @param pluginId - Plugin identifier
|
|
26
25
|
* @returns Promise resolving to action result
|
|
27
26
|
*/
|
|
28
|
-
function
|
|
27
|
+
export function updatePlugin(pluginId) {
|
|
28
|
+
return executePluginAction('update', pluginId);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Update all plugins sequentially
|
|
32
|
+
* @param pluginIds - Array of plugin identifiers to update
|
|
33
|
+
* @param onProgress - Optional callback for progress reporting
|
|
34
|
+
* @returns Promise resolving to bulk update result
|
|
35
|
+
* @example
|
|
36
|
+
* const result = await updateAllPlugins(['ctx7@official', 'sup@official'], (cur, total, id) => {
|
|
37
|
+
* console.log(`Updating (${cur}/${total}): ${id}...`)
|
|
38
|
+
* })
|
|
39
|
+
*/
|
|
40
|
+
export async function updateAllPlugins(pluginIds, onProgress) {
|
|
41
|
+
const results = [];
|
|
42
|
+
for (let i = 0; i < pluginIds.length; i++) {
|
|
43
|
+
const pluginId = pluginIds[i];
|
|
44
|
+
onProgress?.(i + 1, pluginIds.length, pluginId);
|
|
45
|
+
const result = await updatePlugin(pluginId);
|
|
46
|
+
results.push({ pluginId, result });
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
total: pluginIds.length,
|
|
50
|
+
succeeded: results.filter((r) => r.result.success).length,
|
|
51
|
+
failed: results.filter((r) => !r.result.success).length,
|
|
52
|
+
results,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/** Timeout for subprocess operations (60 seconds) */
|
|
56
|
+
const SUBPROCESS_TIMEOUT_MS = 60_000;
|
|
57
|
+
/**
|
|
58
|
+
* Execute a plugin command (install/uninstall/update) with a timeout guard
|
|
59
|
+
* @param action - 'install', 'uninstall', or 'update'
|
|
60
|
+
* @param pluginId - Plugin identifier
|
|
61
|
+
* @param timeoutMs - Timeout in milliseconds (default: 60s)
|
|
62
|
+
* @returns Promise resolving to action result
|
|
63
|
+
* @example
|
|
64
|
+
* const result = await executePluginAction('install', 'my-plugin@marketplace')
|
|
65
|
+
* // => { success: true, message: 'Installed my-plugin@marketplace' }
|
|
66
|
+
*/
|
|
67
|
+
function executePluginAction(action, pluginId, timeoutMs = SUBPROCESS_TIMEOUT_MS) {
|
|
29
68
|
return new Promise((resolve) => {
|
|
30
69
|
const child = spawn('claude', ['plugin', action, pluginId], {
|
|
31
70
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
@@ -33,6 +72,18 @@ function executePluginAction(action, pluginId) {
|
|
|
33
72
|
});
|
|
34
73
|
let stdout = '';
|
|
35
74
|
let stderr = '';
|
|
75
|
+
let settled = false;
|
|
76
|
+
const timer = setTimeout(() => {
|
|
77
|
+
if (settled)
|
|
78
|
+
return;
|
|
79
|
+
settled = true;
|
|
80
|
+
child.kill('SIGTERM');
|
|
81
|
+
resolve({
|
|
82
|
+
success: false,
|
|
83
|
+
message: `Timed out ${action}ing ${pluginId}`,
|
|
84
|
+
error: `Process did not complete within ${timeoutMs / 1000}s`,
|
|
85
|
+
});
|
|
86
|
+
}, timeoutMs);
|
|
36
87
|
child.stdout?.on('data', (data) => {
|
|
37
88
|
stdout += data.toString();
|
|
38
89
|
});
|
|
@@ -40,10 +91,14 @@ function executePluginAction(action, pluginId) {
|
|
|
40
91
|
stderr += data.toString();
|
|
41
92
|
});
|
|
42
93
|
child.on('close', (code) => {
|
|
94
|
+
if (settled)
|
|
95
|
+
return;
|
|
96
|
+
settled = true;
|
|
97
|
+
clearTimeout(timer);
|
|
43
98
|
if (code === 0) {
|
|
44
99
|
resolve({
|
|
45
100
|
success: true,
|
|
46
|
-
message: `${action === 'install' ? 'Installed' : 'Uninstalled'} ${pluginId}`,
|
|
101
|
+
message: `${action === 'install' ? 'Installed' : action === 'uninstall' ? 'Uninstalled' : 'Updated'} ${pluginId}`,
|
|
47
102
|
});
|
|
48
103
|
}
|
|
49
104
|
else {
|
|
@@ -55,6 +110,10 @@ function executePluginAction(action, pluginId) {
|
|
|
55
110
|
}
|
|
56
111
|
});
|
|
57
112
|
child.on('error', (err) => {
|
|
113
|
+
if (settled)
|
|
114
|
+
return;
|
|
115
|
+
settled = true;
|
|
116
|
+
clearTimeout(timer);
|
|
58
117
|
resolve({
|
|
59
118
|
success: false,
|
|
60
119
|
message: 'Failed to execute claude command',
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Redux store configuration for Claude Code Plugin Dashboard
|
|
3
|
+
* Combines all slices and exports typed hooks
|
|
4
|
+
*/
|
|
5
|
+
import { type TypedUseSelectorHook } from 'react-redux';
|
|
6
|
+
/**
|
|
7
|
+
* Configure the Redux store with all slices
|
|
8
|
+
*/
|
|
9
|
+
export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
|
|
10
|
+
ui: import("./slices/uiSlice.js").UiState;
|
|
11
|
+
plugins: import("./slices/pluginSlice.js").PluginState;
|
|
12
|
+
marketplaces: import("./slices/marketplaceSlice.js").MarketplaceState;
|
|
13
|
+
}, import("@reduxjs/toolkit").UnknownAction, import("@reduxjs/toolkit").Tuple<[import("@reduxjs/toolkit").StoreEnhancer<{
|
|
14
|
+
dispatch: import("@reduxjs/toolkit").ThunkDispatch<{
|
|
15
|
+
ui: import("./slices/uiSlice.js").UiState;
|
|
16
|
+
plugins: import("./slices/pluginSlice.js").PluginState;
|
|
17
|
+
marketplaces: import("./slices/marketplaceSlice.js").MarketplaceState;
|
|
18
|
+
}, undefined, import("@reduxjs/toolkit").UnknownAction>;
|
|
19
|
+
}>, import("@reduxjs/toolkit").StoreEnhancer]>>;
|
|
20
|
+
/**
|
|
21
|
+
* Store types for TypeScript
|
|
22
|
+
*/
|
|
23
|
+
export type RootState = ReturnType<typeof store.getState>;
|
|
24
|
+
export type AppDispatch = typeof store.dispatch;
|
|
25
|
+
/**
|
|
26
|
+
* Typed hooks for use throughout the app
|
|
27
|
+
*/
|
|
28
|
+
export declare const useAppDispatch: () => AppDispatch;
|
|
29
|
+
export declare const useAppSelector: TypedUseSelectorHook<RootState>;
|
|
30
|
+
/**
|
|
31
|
+
* Create a new store instance (useful for testing)
|
|
32
|
+
*/
|
|
33
|
+
export declare function createStore(): import("@reduxjs/toolkit").EnhancedStore<{
|
|
34
|
+
ui: import("./slices/uiSlice.js").UiState;
|
|
35
|
+
plugins: import("./slices/pluginSlice.js").PluginState;
|
|
36
|
+
marketplaces: import("./slices/marketplaceSlice.js").MarketplaceState;
|
|
37
|
+
}, import("@reduxjs/toolkit").UnknownAction, import("@reduxjs/toolkit").Tuple<[import("@reduxjs/toolkit").StoreEnhancer<{
|
|
38
|
+
dispatch: import("@reduxjs/toolkit").ThunkDispatch<{
|
|
39
|
+
ui: import("./slices/uiSlice.js").UiState;
|
|
40
|
+
plugins: import("./slices/pluginSlice.js").PluginState;
|
|
41
|
+
marketplaces: import("./slices/marketplaceSlice.js").MarketplaceState;
|
|
42
|
+
}, undefined, import("@reduxjs/toolkit").UnknownAction>;
|
|
43
|
+
}>, import("@reduxjs/toolkit").StoreEnhancer]>>;
|
|
44
|
+
export * from './slices/uiSlice.js';
|
|
45
|
+
export * from './slices/pluginSlice.js';
|
|
46
|
+
export * from './slices/marketplaceSlice.js';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Redux store configuration for Claude Code Plugin Dashboard
|
|
3
|
+
* Combines all slices and exports typed hooks
|
|
4
|
+
*/
|
|
5
|
+
import { configureStore } from '@reduxjs/toolkit';
|
|
6
|
+
import { useDispatch, useSelector, } from 'react-redux';
|
|
7
|
+
import uiReducer from './slices/uiSlice.js';
|
|
8
|
+
import pluginReducer from './slices/pluginSlice.js';
|
|
9
|
+
import marketplaceReducer from './slices/marketplaceSlice.js';
|
|
10
|
+
/**
|
|
11
|
+
* Configure the Redux store with all slices
|
|
12
|
+
*/
|
|
13
|
+
export const store = configureStore({
|
|
14
|
+
reducer: {
|
|
15
|
+
ui: uiReducer,
|
|
16
|
+
plugins: pluginReducer,
|
|
17
|
+
marketplaces: marketplaceReducer,
|
|
18
|
+
},
|
|
19
|
+
// Ink uses context that might not be serializable
|
|
20
|
+
middleware: (getDefaultMiddleware) => getDefaultMiddleware({
|
|
21
|
+
serializableCheck: false,
|
|
22
|
+
}),
|
|
23
|
+
});
|
|
24
|
+
/**
|
|
25
|
+
* Typed hooks for use throughout the app
|
|
26
|
+
*/
|
|
27
|
+
export const useAppDispatch = useDispatch;
|
|
28
|
+
export const useAppSelector = useSelector;
|
|
29
|
+
/**
|
|
30
|
+
* Create a new store instance (useful for testing)
|
|
31
|
+
*/
|
|
32
|
+
export function createStore() {
|
|
33
|
+
return configureStore({
|
|
34
|
+
reducer: {
|
|
35
|
+
ui: uiReducer,
|
|
36
|
+
plugins: pluginReducer,
|
|
37
|
+
marketplaces: marketplaceReducer,
|
|
38
|
+
},
|
|
39
|
+
middleware: (getDefaultMiddleware) => getDefaultMiddleware({
|
|
40
|
+
serializableCheck: false,
|
|
41
|
+
}),
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
// Re-export slice actions for convenience
|
|
45
|
+
export * from './slices/uiSlice.js';
|
|
46
|
+
export * from './slices/pluginSlice.js';
|
|
47
|
+
export * from './slices/marketplaceSlice.js';
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Marketplace state slice for marketplace data and operations
|
|
3
|
+
* Handles marketplace list, dialogs, and marketplace operations
|
|
4
|
+
*/
|
|
5
|
+
import { type PayloadAction } from '@reduxjs/toolkit';
|
|
6
|
+
import type { Marketplace } from '../../types/index.js';
|
|
7
|
+
/**
|
|
8
|
+
* Marketplace operation type
|
|
9
|
+
*/
|
|
10
|
+
export type MarketplaceOperation = 'idle' | 'adding' | 'removing' | 'updating';
|
|
11
|
+
/**
|
|
12
|
+
* Marketplace-specific state
|
|
13
|
+
*/
|
|
14
|
+
export interface MarketplaceState {
|
|
15
|
+
marketplaces: Marketplace[];
|
|
16
|
+
marketplaceOperation: MarketplaceOperation;
|
|
17
|
+
operationMarketplaceId: string | null;
|
|
18
|
+
confirmRemoveMarketplace: boolean;
|
|
19
|
+
showAddMarketplaceDialog: boolean;
|
|
20
|
+
addMarketplaceError: string | null;
|
|
21
|
+
showMarketplaceActionMenu: boolean;
|
|
22
|
+
actionMenuSelectedIndex: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Get display message for marketplace operation status
|
|
26
|
+
* @param operation - The marketplace operation type
|
|
27
|
+
* @param marketplaceId - Optional marketplace identifier
|
|
28
|
+
* @returns Display message for the operation
|
|
29
|
+
*/
|
|
30
|
+
export declare function getMarketplaceOperationMessage(operation: MarketplaceOperation, marketplaceId?: string | null): string;
|
|
31
|
+
/**
|
|
32
|
+
* Marketplace slice with reducers for all marketplace-related state changes
|
|
33
|
+
*/
|
|
34
|
+
export declare const marketplaceSlice: import("@reduxjs/toolkit").Slice<MarketplaceState, {
|
|
35
|
+
/**
|
|
36
|
+
* Set the marketplaces list
|
|
37
|
+
*/
|
|
38
|
+
setMarketplaces: (state: {
|
|
39
|
+
marketplaces: {
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
source: {
|
|
43
|
+
source: "git" | "github";
|
|
44
|
+
url?: string | undefined;
|
|
45
|
+
repo?: string | undefined;
|
|
46
|
+
};
|
|
47
|
+
installLocation: string;
|
|
48
|
+
lastUpdated: string;
|
|
49
|
+
pluginCount?: number | undefined;
|
|
50
|
+
autoUpdate?: boolean | undefined;
|
|
51
|
+
}[];
|
|
52
|
+
marketplaceOperation: MarketplaceOperation;
|
|
53
|
+
operationMarketplaceId: string | null;
|
|
54
|
+
confirmRemoveMarketplace: boolean;
|
|
55
|
+
showAddMarketplaceDialog: boolean;
|
|
56
|
+
addMarketplaceError: string | null;
|
|
57
|
+
showMarketplaceActionMenu: boolean;
|
|
58
|
+
actionMenuSelectedIndex: number;
|
|
59
|
+
}, action: PayloadAction<Marketplace[]>) => void;
|
|
60
|
+
/**
|
|
61
|
+
* Start a marketplace operation
|
|
62
|
+
*/
|
|
63
|
+
startMarketplaceOperation: (state: {
|
|
64
|
+
marketplaces: {
|
|
65
|
+
id: string;
|
|
66
|
+
name: string;
|
|
67
|
+
source: {
|
|
68
|
+
source: "git" | "github";
|
|
69
|
+
url?: string | undefined;
|
|
70
|
+
repo?: string | undefined;
|
|
71
|
+
};
|
|
72
|
+
installLocation: string;
|
|
73
|
+
lastUpdated: string;
|
|
74
|
+
pluginCount?: number | undefined;
|
|
75
|
+
autoUpdate?: boolean | undefined;
|
|
76
|
+
}[];
|
|
77
|
+
marketplaceOperation: MarketplaceOperation;
|
|
78
|
+
operationMarketplaceId: string | null;
|
|
79
|
+
confirmRemoveMarketplace: boolean;
|
|
80
|
+
showAddMarketplaceDialog: boolean;
|
|
81
|
+
addMarketplaceError: string | null;
|
|
82
|
+
showMarketplaceActionMenu: boolean;
|
|
83
|
+
actionMenuSelectedIndex: number;
|
|
84
|
+
}, action: PayloadAction<{
|
|
85
|
+
operation: "adding" | "removing" | "updating";
|
|
86
|
+
marketplaceId?: string;
|
|
87
|
+
}>) => void;
|
|
88
|
+
/**
|
|
89
|
+
* End the current marketplace operation
|
|
90
|
+
*/
|
|
91
|
+
endMarketplaceOperation: (state: {
|
|
92
|
+
marketplaces: {
|
|
93
|
+
id: string;
|
|
94
|
+
name: string;
|
|
95
|
+
source: {
|
|
96
|
+
source: "git" | "github";
|
|
97
|
+
url?: string | undefined;
|
|
98
|
+
repo?: string | undefined;
|
|
99
|
+
};
|
|
100
|
+
installLocation: string;
|
|
101
|
+
lastUpdated: string;
|
|
102
|
+
pluginCount?: number | undefined;
|
|
103
|
+
autoUpdate?: boolean | undefined;
|
|
104
|
+
}[];
|
|
105
|
+
marketplaceOperation: MarketplaceOperation;
|
|
106
|
+
operationMarketplaceId: string | null;
|
|
107
|
+
confirmRemoveMarketplace: boolean;
|
|
108
|
+
showAddMarketplaceDialog: boolean;
|
|
109
|
+
addMarketplaceError: string | null;
|
|
110
|
+
showMarketplaceActionMenu: boolean;
|
|
111
|
+
actionMenuSelectedIndex: number;
|
|
112
|
+
}) => void;
|
|
113
|
+
/**
|
|
114
|
+
* Show remove marketplace confirmation dialog
|
|
115
|
+
*/
|
|
116
|
+
showConfirmRemoveMarketplace: (state: {
|
|
117
|
+
marketplaces: {
|
|
118
|
+
id: string;
|
|
119
|
+
name: string;
|
|
120
|
+
source: {
|
|
121
|
+
source: "git" | "github";
|
|
122
|
+
url?: string | undefined;
|
|
123
|
+
repo?: string | undefined;
|
|
124
|
+
};
|
|
125
|
+
installLocation: string;
|
|
126
|
+
lastUpdated: string;
|
|
127
|
+
pluginCount?: number | undefined;
|
|
128
|
+
autoUpdate?: boolean | undefined;
|
|
129
|
+
}[];
|
|
130
|
+
marketplaceOperation: MarketplaceOperation;
|
|
131
|
+
operationMarketplaceId: string | null;
|
|
132
|
+
confirmRemoveMarketplace: boolean;
|
|
133
|
+
showAddMarketplaceDialog: boolean;
|
|
134
|
+
addMarketplaceError: string | null;
|
|
135
|
+
showMarketplaceActionMenu: boolean;
|
|
136
|
+
actionMenuSelectedIndex: number;
|
|
137
|
+
}, action: PayloadAction<string>) => void;
|
|
138
|
+
/**
|
|
139
|
+
* Hide remove marketplace confirmation dialog
|
|
140
|
+
*/
|
|
141
|
+
hideConfirmRemoveMarketplace: (state: {
|
|
142
|
+
marketplaces: {
|
|
143
|
+
id: string;
|
|
144
|
+
name: string;
|
|
145
|
+
source: {
|
|
146
|
+
source: "git" | "github";
|
|
147
|
+
url?: string | undefined;
|
|
148
|
+
repo?: string | undefined;
|
|
149
|
+
};
|
|
150
|
+
installLocation: string;
|
|
151
|
+
lastUpdated: string;
|
|
152
|
+
pluginCount?: number | undefined;
|
|
153
|
+
autoUpdate?: boolean | undefined;
|
|
154
|
+
}[];
|
|
155
|
+
marketplaceOperation: MarketplaceOperation;
|
|
156
|
+
operationMarketplaceId: string | null;
|
|
157
|
+
confirmRemoveMarketplace: boolean;
|
|
158
|
+
showAddMarketplaceDialog: boolean;
|
|
159
|
+
addMarketplaceError: string | null;
|
|
160
|
+
showMarketplaceActionMenu: boolean;
|
|
161
|
+
actionMenuSelectedIndex: number;
|
|
162
|
+
}) => void;
|
|
163
|
+
/**
|
|
164
|
+
* Show add marketplace dialog
|
|
165
|
+
*/
|
|
166
|
+
showAddMarketplaceDialog: (state: {
|
|
167
|
+
marketplaces: {
|
|
168
|
+
id: string;
|
|
169
|
+
name: string;
|
|
170
|
+
source: {
|
|
171
|
+
source: "git" | "github";
|
|
172
|
+
url?: string | undefined;
|
|
173
|
+
repo?: string | undefined;
|
|
174
|
+
};
|
|
175
|
+
installLocation: string;
|
|
176
|
+
lastUpdated: string;
|
|
177
|
+
pluginCount?: number | undefined;
|
|
178
|
+
autoUpdate?: boolean | undefined;
|
|
179
|
+
}[];
|
|
180
|
+
marketplaceOperation: MarketplaceOperation;
|
|
181
|
+
operationMarketplaceId: string | null;
|
|
182
|
+
confirmRemoveMarketplace: boolean;
|
|
183
|
+
showAddMarketplaceDialog: boolean;
|
|
184
|
+
addMarketplaceError: string | null;
|
|
185
|
+
showMarketplaceActionMenu: boolean;
|
|
186
|
+
actionMenuSelectedIndex: number;
|
|
187
|
+
}) => void;
|
|
188
|
+
/**
|
|
189
|
+
* Hide add marketplace dialog
|
|
190
|
+
*/
|
|
191
|
+
hideAddMarketplaceDialog: (state: {
|
|
192
|
+
marketplaces: {
|
|
193
|
+
id: string;
|
|
194
|
+
name: string;
|
|
195
|
+
source: {
|
|
196
|
+
source: "git" | "github";
|
|
197
|
+
url?: string | undefined;
|
|
198
|
+
repo?: string | undefined;
|
|
199
|
+
};
|
|
200
|
+
installLocation: string;
|
|
201
|
+
lastUpdated: string;
|
|
202
|
+
pluginCount?: number | undefined;
|
|
203
|
+
autoUpdate?: boolean | undefined;
|
|
204
|
+
}[];
|
|
205
|
+
marketplaceOperation: MarketplaceOperation;
|
|
206
|
+
operationMarketplaceId: string | null;
|
|
207
|
+
confirmRemoveMarketplace: boolean;
|
|
208
|
+
showAddMarketplaceDialog: boolean;
|
|
209
|
+
addMarketplaceError: string | null;
|
|
210
|
+
showMarketplaceActionMenu: boolean;
|
|
211
|
+
actionMenuSelectedIndex: number;
|
|
212
|
+
}) => void;
|
|
213
|
+
/**
|
|
214
|
+
* Set add marketplace error
|
|
215
|
+
*/
|
|
216
|
+
setAddMarketplaceError: (state: {
|
|
217
|
+
marketplaces: {
|
|
218
|
+
id: string;
|
|
219
|
+
name: string;
|
|
220
|
+
source: {
|
|
221
|
+
source: "git" | "github";
|
|
222
|
+
url?: string | undefined;
|
|
223
|
+
repo?: string | undefined;
|
|
224
|
+
};
|
|
225
|
+
installLocation: string;
|
|
226
|
+
lastUpdated: string;
|
|
227
|
+
pluginCount?: number | undefined;
|
|
228
|
+
autoUpdate?: boolean | undefined;
|
|
229
|
+
}[];
|
|
230
|
+
marketplaceOperation: MarketplaceOperation;
|
|
231
|
+
operationMarketplaceId: string | null;
|
|
232
|
+
confirmRemoveMarketplace: boolean;
|
|
233
|
+
showAddMarketplaceDialog: boolean;
|
|
234
|
+
addMarketplaceError: string | null;
|
|
235
|
+
showMarketplaceActionMenu: boolean;
|
|
236
|
+
actionMenuSelectedIndex: number;
|
|
237
|
+
}, action: PayloadAction<string | null>) => void;
|
|
238
|
+
/**
|
|
239
|
+
* Show marketplace action menu
|
|
240
|
+
*/
|
|
241
|
+
showMarketplaceActionMenu: (state: {
|
|
242
|
+
marketplaces: {
|
|
243
|
+
id: string;
|
|
244
|
+
name: string;
|
|
245
|
+
source: {
|
|
246
|
+
source: "git" | "github";
|
|
247
|
+
url?: string | undefined;
|
|
248
|
+
repo?: string | undefined;
|
|
249
|
+
};
|
|
250
|
+
installLocation: string;
|
|
251
|
+
lastUpdated: string;
|
|
252
|
+
pluginCount?: number | undefined;
|
|
253
|
+
autoUpdate?: boolean | undefined;
|
|
254
|
+
}[];
|
|
255
|
+
marketplaceOperation: MarketplaceOperation;
|
|
256
|
+
operationMarketplaceId: string | null;
|
|
257
|
+
confirmRemoveMarketplace: boolean;
|
|
258
|
+
showAddMarketplaceDialog: boolean;
|
|
259
|
+
addMarketplaceError: string | null;
|
|
260
|
+
showMarketplaceActionMenu: boolean;
|
|
261
|
+
actionMenuSelectedIndex: number;
|
|
262
|
+
}) => void;
|
|
263
|
+
/**
|
|
264
|
+
* Hide marketplace action menu
|
|
265
|
+
*/
|
|
266
|
+
hideMarketplaceActionMenu: (state: {
|
|
267
|
+
marketplaces: {
|
|
268
|
+
id: string;
|
|
269
|
+
name: string;
|
|
270
|
+
source: {
|
|
271
|
+
source: "git" | "github";
|
|
272
|
+
url?: string | undefined;
|
|
273
|
+
repo?: string | undefined;
|
|
274
|
+
};
|
|
275
|
+
installLocation: string;
|
|
276
|
+
lastUpdated: string;
|
|
277
|
+
pluginCount?: number | undefined;
|
|
278
|
+
autoUpdate?: boolean | undefined;
|
|
279
|
+
}[];
|
|
280
|
+
marketplaceOperation: MarketplaceOperation;
|
|
281
|
+
operationMarketplaceId: string | null;
|
|
282
|
+
confirmRemoveMarketplace: boolean;
|
|
283
|
+
showAddMarketplaceDialog: boolean;
|
|
284
|
+
addMarketplaceError: string | null;
|
|
285
|
+
showMarketplaceActionMenu: boolean;
|
|
286
|
+
actionMenuSelectedIndex: number;
|
|
287
|
+
}) => void;
|
|
288
|
+
/**
|
|
289
|
+
* Set action menu selected index
|
|
290
|
+
*/
|
|
291
|
+
setActionMenuIndex: (state: {
|
|
292
|
+
marketplaces: {
|
|
293
|
+
id: string;
|
|
294
|
+
name: string;
|
|
295
|
+
source: {
|
|
296
|
+
source: "git" | "github";
|
|
297
|
+
url?: string | undefined;
|
|
298
|
+
repo?: string | undefined;
|
|
299
|
+
};
|
|
300
|
+
installLocation: string;
|
|
301
|
+
lastUpdated: string;
|
|
302
|
+
pluginCount?: number | undefined;
|
|
303
|
+
autoUpdate?: boolean | undefined;
|
|
304
|
+
}[];
|
|
305
|
+
marketplaceOperation: MarketplaceOperation;
|
|
306
|
+
operationMarketplaceId: string | null;
|
|
307
|
+
confirmRemoveMarketplace: boolean;
|
|
308
|
+
showAddMarketplaceDialog: boolean;
|
|
309
|
+
addMarketplaceError: string | null;
|
|
310
|
+
showMarketplaceActionMenu: boolean;
|
|
311
|
+
actionMenuSelectedIndex: number;
|
|
312
|
+
}, action: PayloadAction<number>) => void;
|
|
313
|
+
/**
|
|
314
|
+
* Move action menu selection up or down
|
|
315
|
+
*/
|
|
316
|
+
moveActionMenuSelection: (state: {
|
|
317
|
+
marketplaces: {
|
|
318
|
+
id: string;
|
|
319
|
+
name: string;
|
|
320
|
+
source: {
|
|
321
|
+
source: "git" | "github";
|
|
322
|
+
url?: string | undefined;
|
|
323
|
+
repo?: string | undefined;
|
|
324
|
+
};
|
|
325
|
+
installLocation: string;
|
|
326
|
+
lastUpdated: string;
|
|
327
|
+
pluginCount?: number | undefined;
|
|
328
|
+
autoUpdate?: boolean | undefined;
|
|
329
|
+
}[];
|
|
330
|
+
marketplaceOperation: MarketplaceOperation;
|
|
331
|
+
operationMarketplaceId: string | null;
|
|
332
|
+
confirmRemoveMarketplace: boolean;
|
|
333
|
+
showAddMarketplaceDialog: boolean;
|
|
334
|
+
addMarketplaceError: string | null;
|
|
335
|
+
showMarketplaceActionMenu: boolean;
|
|
336
|
+
actionMenuSelectedIndex: number;
|
|
337
|
+
}, action: PayloadAction<"up" | "down">) => void;
|
|
338
|
+
}, "marketplaces", "marketplaces", import("@reduxjs/toolkit").SliceSelectors<MarketplaceState>>;
|
|
339
|
+
export declare const setMarketplaces: import("@reduxjs/toolkit").ActionCreatorWithPayload<Marketplace[], "marketplaces/setMarketplaces">, startMarketplaceOperation: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
340
|
+
operation: "adding" | "removing" | "updating";
|
|
341
|
+
marketplaceId?: string;
|
|
342
|
+
}, "marketplaces/startMarketplaceOperation">, endMarketplaceOperation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"marketplaces/endMarketplaceOperation">, showConfirmRemoveMarketplace: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "marketplaces/showConfirmRemoveMarketplace">, hideConfirmRemoveMarketplace: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"marketplaces/hideConfirmRemoveMarketplace">, showAddMarketplaceDialog: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"marketplaces/showAddMarketplaceDialog">, hideAddMarketplaceDialog: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"marketplaces/hideAddMarketplaceDialog">, setAddMarketplaceError: import("@reduxjs/toolkit").ActionCreatorWithPayload<string | null, "marketplaces/setAddMarketplaceError">, showMarketplaceActionMenu: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"marketplaces/showMarketplaceActionMenu">, hideMarketplaceActionMenu: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"marketplaces/hideMarketplaceActionMenu">, setActionMenuIndex: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "marketplaces/setActionMenuIndex">, moveActionMenuSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<"up" | "down", "marketplaces/moveActionMenuSelection">;
|
|
343
|
+
declare const _default: import("@reduxjs/toolkit").Reducer<MarketplaceState>;
|
|
344
|
+
export default _default;
|