fix(build): add postbuild hook to set executable permissions on Mac/Linux

Add chmod 755 for ccw/bin/ccw.js and ccw-mcp.js after TypeScript compilation.
This fixes the issue where ccw CLI cannot be executed directly on Mac/Linux
after npm run build due to missing execute permissions.
This commit is contained in:
catlog22
2026-02-25 23:19:25 +08:00
parent b4d3426e6a
commit 25f442b329

View File

@@ -13,6 +13,7 @@
],
"scripts": {
"build": "tsc -p ccw/tsconfig.json",
"postbuild": "node -e \"const fs=require('fs');['ccw/bin/ccw.js','ccw/bin/ccw-mcp.js'].forEach(f=>{try{fs.chmodSync(f,0o755)}catch{}})\"",
"start": "node ccw/bin/ccw.js",
"test": "node --experimental-strip-types --test ccw/tests/*.test.js",
"test:visual": "node --experimental-strip-types --test ccw/tests/visual/**/*.visual.test.ts",