siliconflow-image-mcp 1.0.3 → 1.0.4
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/bin/siliconflow-image-mcp +28 -15
- package/dist/package.json +1 -1
- package/package.json +2 -3
- package/bin/siliconflow-image-mcp.cmd +0 -22
|
@@ -1,17 +1,30 @@
|
|
|
1
|
-
#!/bin/
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// SiliconFlow Image MCP - Universal launcher for all platforms
|
|
3
|
+
// Works on Windows (via npm wrapper), Linux, macOS
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { spawn } from 'child_process';
|
|
6
|
+
import { fileURLToPath } from 'url';
|
|
7
|
+
import { dirname, join } from 'path';
|
|
8
|
+
import { existsSync } from 'fs';
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
+
const __dirname = dirname(__filename);
|
|
12
|
+
|
|
13
|
+
// Find dist/index.js relative to this file
|
|
14
|
+
const distPath = join(__dirname, '..', 'dist', 'index.js');
|
|
15
|
+
|
|
16
|
+
if (!existsSync(distPath)) {
|
|
17
|
+
console.error('Error: Could not find siliconflow-image-mcp dist/index.js');
|
|
18
|
+
console.error('Searched in:', distPath);
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Run the main program
|
|
23
|
+
const child = spawn(process.execPath, [distPath, ...process.argv.slice(2)], {
|
|
24
|
+
stdio: 'inherit',
|
|
25
|
+
windowsHide: true
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
child.on('exit', (code) => {
|
|
29
|
+
process.exit(code);
|
|
30
|
+
});
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "siliconflow-image-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "MCP server for image generation and editing using SiliconFlow - Optimized for China users",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"bin": {
|
|
8
|
-
"siliconflow-image-mcp": "bin/siliconflow-image-mcp"
|
|
9
|
-
"siliconflow-image-mcp.cmd": "bin/siliconflow-image-mcp.cmd"
|
|
8
|
+
"siliconflow-image-mcp": "bin/siliconflow-image-mcp"
|
|
10
9
|
},
|
|
11
10
|
"files": [
|
|
12
11
|
"dist",
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
@echo off
|
|
2
|
-
REM SiliconFlow Image MCP - Windows wrapper script
|
|
3
|
-
REM Handles both local development and global installation on Windows
|
|
4
|
-
|
|
5
|
-
setlocal
|
|
6
|
-
|
|
7
|
-
REM Get the directory where this script is located
|
|
8
|
-
set "SCRIPT_DIR=%~dp0"
|
|
9
|
-
|
|
10
|
-
REM In production (npm install), dist/index.js is in node_modules/siliconflow-image-mcp/dist/
|
|
11
|
-
REM The bin script is in node_modules/siliconflow-image-mcp/bin/
|
|
12
|
-
if exist "%SCRIPT_DIR%..\dist\index.js" (
|
|
13
|
-
REM Production mode - run compiled JavaScript
|
|
14
|
-
node "%SCRIPT_DIR%..\dist\index.js" %*
|
|
15
|
-
) else if exist "%SCRIPT_DIR%..\..\dist\index.js" (
|
|
16
|
-
REM Alternative production path
|
|
17
|
-
node "%SCRIPT_DIR%..\..\dist\index.js" %*
|
|
18
|
-
) else (
|
|
19
|
-
echo Error: Could not find siliconflow-image-mcp dist/index.js
|
|
20
|
-
echo Searched in: %SCRIPT_DIR%..\dist\index.js
|
|
21
|
-
exit /b 1
|
|
22
|
-
)
|