file-share-mcp 1.0.21 → 1.0.24
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 +6 -0
- package/package.json +9 -3
- package/dist/utils/generate-version.js +0 -10
- package/dist/utils/logger.js +0 -45
- package/public/vite.svg +0 -1
package/README.md
CHANGED
|
@@ -228,6 +228,12 @@ public/ # Built frontend (served by the GUI server)
|
|
|
228
228
|
|
|
229
229
|
---
|
|
230
230
|
|
|
231
|
+
## Publication
|
|
232
|
+
|
|
233
|
+
Chaque push sur `master`, merge de pull request compris, publie une nouvelle version de `file-share-mcp` sur npm (`.github/workflows/publish.yml`) : `npm ci`, installation des dépendances de `gui/` et build, puis `npm version patch`, dont le commit et le tag sont poussés sur `master`, et `npm publish`. La publication passe par le trusted publishing de npm (OIDC, sans token), avec attestation de provenance. Un échec du build arrête le workflow avant la montée de version.
|
|
234
|
+
|
|
235
|
+
Sur npmjs.com, le paquet déclare ce workflow comme publieur de confiance (Settings → Trusted publishing → GitHub Actions : `Matthieu-Pesnot-Pin`, `file-share-mcp`, `publish.yml`, avec `npm publish` dans les actions autorisées). Le commit de version est poussé avec `GITHUB_TOKEN` : si `master` est protégée, la règle doit autoriser GitHub Actions à y pousser.
|
|
236
|
+
|
|
231
237
|
## License
|
|
232
238
|
|
|
233
239
|
ISC
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "file-share-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.24",
|
|
4
4
|
"description": "MCP server for bidirectional file sharing between AI agents and users, with a built-in web GUI",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
"start": "node dist/mcp-server.js",
|
|
33
33
|
"dev": "nodemon --exec \"node --loader ts-node/esm\" src/mcp-server.ts",
|
|
34
34
|
"prepublishOnly": "npm run build",
|
|
35
|
-
"release": "npm version patch && npm publish --access public && git push origin master --follow-tags",
|
|
36
35
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
37
36
|
},
|
|
38
37
|
"dependencies": {
|
|
@@ -48,8 +47,15 @@
|
|
|
48
47
|
"@types/express": "^5.0.6",
|
|
49
48
|
"@types/multer": "^2.0.0",
|
|
50
49
|
"@types/node": "^25.2.3",
|
|
51
|
-
"nodemon": "^3.1.
|
|
50
|
+
"nodemon": "^3.1.14",
|
|
52
51
|
"ts-node": "^10.9.2",
|
|
53
52
|
"typescript": "^5.9.3"
|
|
53
|
+
},
|
|
54
|
+
"overrides": {
|
|
55
|
+
"minimatch": "^11.0.1"
|
|
56
|
+
},
|
|
57
|
+
"repository": {
|
|
58
|
+
"type": "git",
|
|
59
|
+
"url": "git+https://github.com/Matthieu-Pesnot-Pin/file-share-mcp.git"
|
|
54
60
|
}
|
|
55
61
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import { fileURLToPath } from 'url';
|
|
4
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
5
|
-
const __dirname = path.dirname(__filename);
|
|
6
|
-
const packageJson = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../../package.json'), 'utf-8'));
|
|
7
|
-
const version = packageJson.version;
|
|
8
|
-
const versionFileContent = `export const VERSION = '${version}';\n`;
|
|
9
|
-
fs.writeFileSync(path.resolve(__dirname, '../version.ts'), versionFileContent);
|
|
10
|
-
console.log(`Version ${version} generated in src/version.ts`);
|
package/dist/utils/logger.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import os from 'os';
|
|
4
|
-
const logDir = path.join(os.homedir(), '.file-share-mcp', 'logs');
|
|
5
|
-
if (!fs.existsSync(logDir)) {
|
|
6
|
-
try {
|
|
7
|
-
fs.mkdirSync(logDir, { recursive: true });
|
|
8
|
-
}
|
|
9
|
-
catch (err) {
|
|
10
|
-
console.error(`Failed to create log directory ${logDir}:`, err);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
const logFile = path.join(logDir, 'server.log');
|
|
14
|
-
export function setupLogging(prefix) {
|
|
15
|
-
const originalLog = console.log;
|
|
16
|
-
const originalError = console.error;
|
|
17
|
-
const logToBoth = (msg, isError) => {
|
|
18
|
-
const timestamp = new Date().toLocaleString();
|
|
19
|
-
const formattedMsg = `[${timestamp}] [PID ${process.pid}] [${prefix}] ${msg}\n`;
|
|
20
|
-
try {
|
|
21
|
-
fs.appendFileSync(logFile, formattedMsg);
|
|
22
|
-
}
|
|
23
|
-
catch (err) {
|
|
24
|
-
// If we can't write to file, at least we tried
|
|
25
|
-
}
|
|
26
|
-
if (prefix === 'MASTER') {
|
|
27
|
-
// In MASTER, always use stderr for protocol safety
|
|
28
|
-
process.stderr.write(formattedMsg);
|
|
29
|
-
}
|
|
30
|
-
else if (isError) {
|
|
31
|
-
originalError(msg);
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
originalLog(msg);
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
console.log = (msg, ...args) => {
|
|
38
|
-
const message = typeof msg === 'string' ? msg : JSON.stringify(msg, null, 2);
|
|
39
|
-
logToBoth(message, false);
|
|
40
|
-
};
|
|
41
|
-
console.error = (msg, ...args) => {
|
|
42
|
-
const message = typeof msg === 'string' ? msg : JSON.stringify(msg, null, 2);
|
|
43
|
-
logToBoth(message, true);
|
|
44
|
-
};
|
|
45
|
-
}
|
package/public/vite.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|