Skip to content

Commit

Permalink
Merge pull request #13 from Braffolk/dev
Browse files Browse the repository at this point in the history
Add bin entry and enhance postbuild script for recursive chmod on .js…
  • Loading branch information
Braffolk authored Jan 22, 2025
2 parents a06a8a8 + 053fb05 commit b10a0b0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
"description": "Provides summarised output from various actions that could otherwise eat up tokens and cause crashes",
"type": "module",
"main": "build/index.js",
"bin": {
"mcp-summarization-functions": "build/index.js"
},
"engines": {
"node": ">=22.0.0"
},
"scripts": {
"preinstall": "node -e \"if (process.versions.node < '22.0.0') { console.error('Requires Node.js 22 or higher. Current version: ' + process.versions.node); process.exit(1); }\"",
"build": "tsc",
"postbuild": "node -e \"if (process.platform !== 'win32') { require('fs').chmodSync('build/index.js', '755'); }\"",
"postbuild": "node -e \"if (process.platform !== 'win32') { const fs = require('fs'); const path = require('path'); function chmodRecursive(dir) { fs.readdirSync(dir, { withFileTypes: true }).forEach(dirent => { const fullPath = path.join(dir, dirent.name); if (dirent.isDirectory()) { chmodRecursive(fullPath); } else if (dirent.name.endsWith('.js')) { console.log('Setting chmod 755 on:', fullPath); fs.chmodSync(fullPath, '755'); } }); } chmodRecursive('build'); }\"",
"start": "node build/index.js",
"watch": "tsc -w",
"test": "NODE_OPTIONS='--experimental-vm-modules --no-warnings' jest",
Expand Down

0 comments on commit b10a0b0

Please sign in to comment.