monol-plugin-scout 2.0.6 → 2.0.8
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "monol-plugin-scout",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"description": "Claude Code 플러그인 마켓플레이스 모니터링 및 추천 에이전트",
|
|
5
5
|
"author": "Kent",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,9 +19,14 @@
|
|
|
19
19
|
"marketplace",
|
|
20
20
|
"monol"
|
|
21
21
|
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"postinstall": "node scripts/install.js",
|
|
24
|
+
"preuninstall": "node scripts/uninstall.js"
|
|
25
|
+
},
|
|
22
26
|
"files": [
|
|
23
27
|
".claude-plugin",
|
|
24
28
|
"monol-plugin-scout-pkg",
|
|
29
|
+
"scripts",
|
|
25
30
|
"docs",
|
|
26
31
|
"examples",
|
|
27
32
|
"README.md",
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const os = require('os');
|
|
6
|
+
|
|
7
|
+
const MARKETPLACE_NAME = 'monol';
|
|
8
|
+
const PLUGIN_NAME = 'monol-plugin-scout';
|
|
9
|
+
|
|
10
|
+
// Get the installed package location
|
|
11
|
+
const packageDir = path.resolve(__dirname, '..');
|
|
12
|
+
|
|
13
|
+
// Claude settings paths
|
|
14
|
+
const claudeDir = path.join(os.homedir(), '.claude');
|
|
15
|
+
const settingsPath = path.join(claudeDir, 'settings.json');
|
|
16
|
+
const pluginsDir = path.join(claudeDir, 'plugins');
|
|
17
|
+
const knownMarketplacesPath = path.join(pluginsDir, 'known_marketplaces.json');
|
|
18
|
+
|
|
19
|
+
function ensureDir(dir) {
|
|
20
|
+
if (!fs.existsSync(dir)) {
|
|
21
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function readJSON(filepath) {
|
|
26
|
+
if (fs.existsSync(filepath)) {
|
|
27
|
+
try {
|
|
28
|
+
return JSON.parse(fs.readFileSync(filepath, 'utf8'));
|
|
29
|
+
} catch (e) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function writeJSON(filepath, data) {
|
|
37
|
+
fs.writeFileSync(filepath, JSON.stringify(data, null, 2) + '\n');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function install() {
|
|
41
|
+
console.log(`\n📦 Installing ${PLUGIN_NAME} Claude Code plugin...\n`);
|
|
42
|
+
|
|
43
|
+
// Ensure directories exist
|
|
44
|
+
ensureDir(claudeDir);
|
|
45
|
+
ensureDir(pluginsDir);
|
|
46
|
+
|
|
47
|
+
// Update settings.json
|
|
48
|
+
let settings = readJSON(settingsPath) || {};
|
|
49
|
+
|
|
50
|
+
if (!settings.extraKnownMarketplaces) {
|
|
51
|
+
settings.extraKnownMarketplaces = {};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Use shared marketplace name 'monol'
|
|
55
|
+
if (!settings.extraKnownMarketplaces[MARKETPLACE_NAME]) {
|
|
56
|
+
settings.extraKnownMarketplaces[MARKETPLACE_NAME] = {
|
|
57
|
+
source: {
|
|
58
|
+
source: 'npm',
|
|
59
|
+
package: PLUGIN_NAME
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (!settings.enabledPlugins) {
|
|
65
|
+
settings.enabledPlugins = {};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
settings.enabledPlugins[`${PLUGIN_NAME}@${MARKETPLACE_NAME}`] = true;
|
|
69
|
+
|
|
70
|
+
writeJSON(settingsPath, settings);
|
|
71
|
+
console.log(`✅ Updated ${settingsPath}`);
|
|
72
|
+
|
|
73
|
+
// Update known_marketplaces.json
|
|
74
|
+
let knownMarketplaces = readJSON(knownMarketplacesPath) || {};
|
|
75
|
+
|
|
76
|
+
// Only update if not already set by another monol plugin
|
|
77
|
+
if (!knownMarketplaces[MARKETPLACE_NAME]) {
|
|
78
|
+
knownMarketplaces[MARKETPLACE_NAME] = {
|
|
79
|
+
source: {
|
|
80
|
+
source: 'npm',
|
|
81
|
+
package: PLUGIN_NAME
|
|
82
|
+
},
|
|
83
|
+
installLocation: packageDir,
|
|
84
|
+
lastUpdated: new Date().toISOString()
|
|
85
|
+
};
|
|
86
|
+
writeJSON(knownMarketplacesPath, knownMarketplaces);
|
|
87
|
+
console.log(`✅ Updated ${knownMarketplacesPath}`);
|
|
88
|
+
} else {
|
|
89
|
+
console.log(`ℹ️ Marketplace '${MARKETPLACE_NAME}' already registered`);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
console.log(`
|
|
93
|
+
🎉 ${PLUGIN_NAME} installed successfully!
|
|
94
|
+
|
|
95
|
+
Available commands:
|
|
96
|
+
/scout - 프로젝트 분석 및 플러그인 추천
|
|
97
|
+
/scout --quick - 빠른 스캔 (점수 80+ 만)
|
|
98
|
+
/scout compare - 플러그인 비교
|
|
99
|
+
/scout cleanup - 미사용 플러그인 정리
|
|
100
|
+
/scout explore - 마켓플레이스 탐색
|
|
101
|
+
/scout audit - 보안/업데이트 점검
|
|
102
|
+
/scout fork - 플러그인 포크
|
|
103
|
+
|
|
104
|
+
Restart Claude Code to activate the plugin.
|
|
105
|
+
`);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
try {
|
|
109
|
+
install();
|
|
110
|
+
} catch (error) {
|
|
111
|
+
console.error('❌ Installation failed:', error.message);
|
|
112
|
+
process.exit(1);
|
|
113
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const os = require('os');
|
|
6
|
+
|
|
7
|
+
const MARKETPLACE_NAME = 'monol';
|
|
8
|
+
const PLUGIN_NAME = 'monol-plugin-scout';
|
|
9
|
+
|
|
10
|
+
// Claude settings paths
|
|
11
|
+
const claudeDir = path.join(os.homedir(), '.claude');
|
|
12
|
+
const settingsPath = path.join(claudeDir, 'settings.json');
|
|
13
|
+
const pluginsDir = path.join(claudeDir, 'plugins');
|
|
14
|
+
const knownMarketplacesPath = path.join(pluginsDir, 'known_marketplaces.json');
|
|
15
|
+
|
|
16
|
+
function readJSON(filepath) {
|
|
17
|
+
if (fs.existsSync(filepath)) {
|
|
18
|
+
try {
|
|
19
|
+
return JSON.parse(fs.readFileSync(filepath, 'utf8'));
|
|
20
|
+
} catch (e) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function writeJSON(filepath, data) {
|
|
28
|
+
fs.writeFileSync(filepath, JSON.stringify(data, null, 2) + '\n');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function uninstall() {
|
|
32
|
+
console.log(`\n🗑️ Uninstalling ${PLUGIN_NAME} Claude Code plugin...\n`);
|
|
33
|
+
|
|
34
|
+
// Update settings.json - only remove this plugin's enabledPlugins entry
|
|
35
|
+
let settings = readJSON(settingsPath);
|
|
36
|
+
if (settings) {
|
|
37
|
+
if (settings.enabledPlugins && settings.enabledPlugins[`${PLUGIN_NAME}@${MARKETPLACE_NAME}`]) {
|
|
38
|
+
delete settings.enabledPlugins[`${PLUGIN_NAME}@${MARKETPLACE_NAME}`];
|
|
39
|
+
}
|
|
40
|
+
writeJSON(settingsPath, settings);
|
|
41
|
+
console.log(`✅ Removed from ${settingsPath}`);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Note: Don't remove marketplace from known_marketplaces.json
|
|
45
|
+
// as other monol plugins may still be using it
|
|
46
|
+
|
|
47
|
+
console.log(`\n✅ ${PLUGIN_NAME} uninstalled successfully!\n`);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
try {
|
|
51
|
+
uninstall();
|
|
52
|
+
} catch (error) {
|
|
53
|
+
console.error('❌ Uninstallation failed:', error.message);
|
|
54
|
+
process.exit(1);
|
|
55
|
+
}
|