@unlikeotherai/unloved 0.3.4 → 0.3.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/package.json +4 -2
- package/scripts/fix-pty-perms.js +27 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unlikeotherai/unloved",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "Local multi-device AI coding cockpit",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -8,9 +8,11 @@
|
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"dist",
|
|
11
|
-
"public"
|
|
11
|
+
"public",
|
|
12
|
+
"scripts"
|
|
12
13
|
],
|
|
13
14
|
"scripts": {
|
|
15
|
+
"postinstall": "node \"$(dirname $npm_package_json)/scripts/fix-pty-perms.js\"",
|
|
14
16
|
"prebuild": "pnpm --filter @unloved/web build && rm -rf public && cp -r ../web/dist public",
|
|
15
17
|
"build": "tsup",
|
|
16
18
|
"dev": "tsup --watch"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Fix node-pty spawn-helper permissions (prebuilt binaries may lack +x)
|
|
3
|
+
const { readdirSync, chmodSync, statSync } = require('fs')
|
|
4
|
+
const { join } = require('path')
|
|
5
|
+
|
|
6
|
+
function walk(dir, name, results = []) {
|
|
7
|
+
try {
|
|
8
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
9
|
+
const full = join(dir, entry.name)
|
|
10
|
+
if (entry.isDirectory()) walk(full, name, results)
|
|
11
|
+
else if (entry.name === name) results.push(full)
|
|
12
|
+
}
|
|
13
|
+
} catch { /* skip inaccessible dirs */ }
|
|
14
|
+
return results
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const root = join(__dirname, '..', 'node_modules')
|
|
18
|
+
for (const file of walk(root, 'spawn-helper')) {
|
|
19
|
+
if (!file.includes('node-pty')) continue
|
|
20
|
+
try {
|
|
21
|
+
const stat = statSync(file)
|
|
22
|
+
if (!(stat.mode & 0o111)) {
|
|
23
|
+
chmodSync(file, 0o755)
|
|
24
|
+
console.log(`Fixed permissions: ${file}`)
|
|
25
|
+
}
|
|
26
|
+
} catch { /* ignore */ }
|
|
27
|
+
}
|