smart-thinking-mcp 11.0.0 → 11.0.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/package.json +5 -3
- package/scripts/make-executable.js +46 -0
package/package.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smart-thinking-mcp",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.2",
|
|
4
4
|
"description": "Un serveur MCP avancé pour le raisonnement multi-dimensionnel, adaptatif et collaboratif",
|
|
5
5
|
"main": "build/index.js",
|
|
6
|
+
"module": "./src/index.ts",
|
|
6
7
|
"bin": {
|
|
7
|
-
"smart-thinking-mcp": "
|
|
8
|
+
"smart-thinking-mcp": "build/index.js"
|
|
8
9
|
},
|
|
9
10
|
"files": [
|
|
10
|
-
"build"
|
|
11
|
+
"build",
|
|
12
|
+
"scripts"
|
|
11
13
|
],
|
|
12
14
|
"scripts": {
|
|
13
15
|
"build": "tsc && node scripts/make-executable.js",
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Script pour configurer les permissions d'exécution de manière cross-plateforme
|
|
3
|
+
* Compatible avec Windows, Mac et Linux
|
|
4
|
+
*/
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
const { platform } = require('os');
|
|
7
|
+
const { execSync } = require('child_process');
|
|
8
|
+
const { join, resolve } = require('path');
|
|
9
|
+
|
|
10
|
+
const isWindows = platform() === 'win32';
|
|
11
|
+
const execPath = resolve(join(__dirname, '..', 'build', 'index.js'));
|
|
12
|
+
|
|
13
|
+
console.log(`Smart-Thinking: Configuring executable at ${execPath}`);
|
|
14
|
+
console.log(`Smart-Thinking: Detected platform: ${platform()}`);
|
|
15
|
+
|
|
16
|
+
try {
|
|
17
|
+
// Vérification que le fichier existe
|
|
18
|
+
fs.accessSync(execPath);
|
|
19
|
+
|
|
20
|
+
if (!isWindows) {
|
|
21
|
+
// Unix-like systems: utiliser chmod
|
|
22
|
+
try {
|
|
23
|
+
execSync(`chmod +x "${execPath}"`);
|
|
24
|
+
console.log('Smart-Thinking: File permissions set successfully for Unix-like systems');
|
|
25
|
+
} catch (err) {
|
|
26
|
+
console.log(`Smart-Thinking: Warning - Could not set execution permissions: ${err.message}`);
|
|
27
|
+
}
|
|
28
|
+
} else {
|
|
29
|
+
// Windows: aucune action spécifique nécessaire pour les permissions
|
|
30
|
+
console.log('Smart-Thinking: File exists and is accessible on Windows');
|
|
31
|
+
|
|
32
|
+
// Vérifier si le fichier a un shebang en première ligne pour Node.js
|
|
33
|
+
const content = fs.readFileSync(execPath, 'utf8');
|
|
34
|
+
if (!content.startsWith('#!/usr/bin/env node')) {
|
|
35
|
+
try {
|
|
36
|
+
// Ajouter un shebang au début du fichier si nécessaire
|
|
37
|
+
fs.writeFileSync(execPath, `#!/usr/bin/env node\n${content}`);
|
|
38
|
+
console.log('Smart-Thinking: Added Node.js shebang to ensure proper execution');
|
|
39
|
+
} catch (writeErr) {
|
|
40
|
+
console.log(`Smart-Thinking: Warning - Could not update file with shebang: ${writeErr.message}`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
} catch (err) {
|
|
45
|
+
console.log(`Smart-Thinking: Script execution permissions setup skipped: ${err.message}`);
|
|
46
|
+
}
|