gopeak 2.3.0 → 2.3.1
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/build/cli/setup.js +23 -23
- package/build/cli.js +1 -1
- package/package.json +2 -1
package/build/cli/setup.js
CHANGED
|
@@ -53,42 +53,42 @@ function generateHookBlock() {
|
|
|
53
53
|
];
|
|
54
54
|
return lines.join('\n');
|
|
55
55
|
}
|
|
56
|
-
export async function setupShellHooks() {
|
|
56
|
+
export async function setupShellHooks(args = []) {
|
|
57
|
+
const silent = args.includes('--silent');
|
|
57
58
|
const rcFile = getShellRcFile();
|
|
58
59
|
const shellName = getShellName();
|
|
60
|
+
const log = silent ? (..._args) => { } : console.log.bind(console);
|
|
59
61
|
// Check if RC file exists
|
|
60
62
|
if (!existsSync(rcFile)) {
|
|
61
|
-
|
|
63
|
+
log(`⚠️ ${rcFile} not found. Creating it.`);
|
|
62
64
|
writeFileSync(rcFile, '');
|
|
63
65
|
}
|
|
64
66
|
const content = readFileSync(rcFile, 'utf-8');
|
|
65
67
|
// Check if already installed
|
|
66
68
|
if (content.includes(MARKER_START)) {
|
|
67
|
-
// Replace existing block
|
|
68
69
|
const cleaned = removeHookBlock(content);
|
|
69
70
|
const hookBlock = generateHookBlock();
|
|
70
71
|
writeFileSync(rcFile, cleaned + '\n' + hookBlock + '\n');
|
|
71
|
-
|
|
72
|
+
log(`🔄 GoPeak shell hooks updated in ${rcFile}`);
|
|
72
73
|
}
|
|
73
74
|
else {
|
|
74
|
-
// Append new block
|
|
75
75
|
const hookBlock = generateHookBlock();
|
|
76
76
|
appendFileSync(rcFile, '\n' + hookBlock + '\n');
|
|
77
|
-
|
|
77
|
+
log(`✅ GoPeak shell hooks installed in ${rcFile}`);
|
|
78
78
|
}
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
log(` Reload with: source ${rcFile}`);
|
|
80
|
+
log('');
|
|
81
81
|
// Show onboarding (once)
|
|
82
82
|
ensureGopeakDir();
|
|
83
83
|
if (!existsSync(ONBOARDING_SHOWN_FILE)) {
|
|
84
|
-
printOnboarding();
|
|
84
|
+
printOnboarding(log);
|
|
85
85
|
writeFileSync(ONBOARDING_SHOWN_FILE, new Date().toISOString());
|
|
86
86
|
}
|
|
87
87
|
// Suggest star (once)
|
|
88
88
|
if (!existsSync(STAR_PROMPTED_FILE)) {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
log('⭐ If GoPeak helps your Godot workflow, please star us!');
|
|
90
|
+
log(' Run: gopeak star');
|
|
91
|
+
log('');
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
function removeHookBlock(content) {
|
|
@@ -98,18 +98,18 @@ function removeHookBlock(content) {
|
|
|
98
98
|
function escapeRegex(s) {
|
|
99
99
|
return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
100
100
|
}
|
|
101
|
-
function printOnboarding() {
|
|
101
|
+
function printOnboarding(log = console.log) {
|
|
102
102
|
const version = getLocalVersion();
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
log('╔══════════════════════════════════════════════════════╗');
|
|
104
|
+
log(`║ 🎮 GoPeak v${version} — AI-Powered Godot Development`
|
|
105
105
|
+ ' '.repeat(Math.max(0, 39 - version.length)) + '║');
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
106
|
+
log('║ ║');
|
|
107
|
+
log('║ 110+ tools for Godot Engine via MCP ║');
|
|
108
|
+
log('║ ║');
|
|
109
|
+
log('║ 📖 Docs: https://github.com/HaD0Yun/godot-mcp ║');
|
|
110
|
+
log('║ ⭐ Star: gopeak star ║');
|
|
111
|
+
log('║ 🔄 Update: npm update -g gopeak ║');
|
|
112
|
+
log('╚══════════════════════════════════════════════════════╝');
|
|
113
|
+
log('');
|
|
114
114
|
}
|
|
115
115
|
export { MARKER_START, MARKER_END };
|
package/build/cli.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gopeak",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"mcpName": "io.github.HaD0Yun/gopeak",
|
|
5
5
|
"description": "GoPeak — The most comprehensive MCP server for Godot Engine. 95+ tools: scene management, GDScript LSP diagnostics, DAP debugger, screenshot capture, input injection, ClassDB introspection, CC0 asset library. AI-assisted game development with Claude, Cursor, Cline, OpenCode.",
|
|
6
6
|
"type": "module",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"test:ci": "npm run test:smoke",
|
|
23
23
|
"ci": "npm run build && npm run typecheck && npm run test:ci",
|
|
24
24
|
"prepare": "npm run build",
|
|
25
|
+
"postinstall": "node build/cli.js setup --silent 2>/dev/null || true",
|
|
25
26
|
"watch": "tsc --watch",
|
|
26
27
|
"inspector": "npx @modelcontextprotocol/inspector build/index.js",
|
|
27
28
|
"pack": "npm pack --dry-run",
|