@mmmbuto/yazi-termux 25.12.29-01-termux → 25.12.29-termux

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/README.md CHANGED
@@ -10,12 +10,6 @@
10
10
  npm install -g @mmmbuto/yazi-termux
11
11
  ```
12
12
 
13
- **Tip:** postinstall will install recommended Termux packages automatically. To skip:
14
-
15
- ```bash
16
- YAZI_TERMUX_SKIP_POSTINSTALL=1 npm install -g @mmmbuto/yazi-termux
17
- ```
18
-
19
13
  ## Verify
20
14
 
21
15
  ```bash
package/package.json CHANGED
@@ -1,12 +1,9 @@
1
1
  {
2
2
  "name": "@mmmbuto/yazi-termux",
3
- "version": "25.12.29-01-termux",
3
+ "version": "25.12.29-termux",
4
4
  "description": "Yazi file manager (upstream 25.12.29) packaged for Android Termux ARM64. Use 'yazi' for TUI, 'ya' for CLI commands.",
5
5
  "type": "module",
6
6
  "main": "bin/yazi.js",
7
- "scripts": {
8
- "postinstall": "node bin/postinstall.js"
9
- },
10
7
  "bin": {
11
8
  "yazi": "bin/yazi.js",
12
9
  "ya": "bin/ya.js"
@@ -14,7 +11,6 @@
14
11
  "files": [
15
12
  "bin/yazi.js",
16
13
  "bin/ya.js",
17
- "bin/postinstall.js",
18
14
  "bin/yazi",
19
15
  "bin/ya",
20
16
  "README.md"
@@ -31,7 +27,7 @@
31
27
  "license": "MIT",
32
28
  "repository": {
33
29
  "type": "git",
34
- "url": "git+https://github.com/DioNanos/yazi-termux.git"
30
+ "url": "https://github.com/DioNanos/yazi-termux.git"
35
31
  },
36
32
  "homepage": "https://github.com/DioNanos/yazi-termux#readme",
37
33
  "bugs": {
@@ -1,57 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { spawnSync } from 'child_process';
4
-
5
- const isTermux =
6
- process.platform === 'android' ||
7
- (process.env.PREFIX && process.env.PREFIX.includes('/data/data/com.termux/files/usr')) ||
8
- Boolean(process.env.TERMUX_VERSION);
9
-
10
- if (!isTermux) {
11
- process.exit(0);
12
- }
13
-
14
- if (process.env.YAZI_TERMUX_SKIP_POSTINSTALL === '1') {
15
- process.exit(0);
16
- }
17
-
18
- const packages = [
19
- { name: 'file', bins: ['file'] },
20
- { name: 'zip', bins: ['zip'] },
21
- { name: 'unzip', bins: ['unzip'] },
22
- { name: 'p7zip', bins: ['7z', '7zz'] },
23
- { name: 'ripgrep', bins: ['rg'] },
24
- { name: 'fd', bins: ['fd', 'fdfind'] },
25
- { name: 'fzf', bins: ['fzf'] },
26
- { name: 'zoxide', bins: ['zoxide'] },
27
- { name: 'ffmpeg', bins: ['ffmpeg', 'ffprobe'] },
28
- { name: 'poppler', bins: ['pdftoppm'] },
29
- { name: 'imagemagick', bins: ['magick', 'convert'] },
30
- { name: 'mediainfo', bins: ['mediainfo'] },
31
- { name: 'exiftool', bins: ['exiftool'] },
32
- { name: 'chafa', bins: ['chafa'] },
33
- { name: 'termux-api', bins: ['termux-clipboard-get', 'termux-clipboard-set', 'termux-open'] }
34
- ];
35
-
36
- const hasBin = (bin) => {
37
- const res = spawnSync('sh', ['-c', `command -v ${bin}`], { stdio: 'ignore' });
38
- return res.status === 0;
39
- };
40
-
41
- const missing = packages.filter((p) => !p.bins.some(hasBin)).map((p) => p.name);
42
-
43
- if (missing.length === 0) {
44
- process.exit(0);
45
- }
46
-
47
- const hasPkg = hasBin('pkg');
48
-
49
- if (!hasPkg) {
50
- console.log('\nYazi-Termux: package manager not found (pkg).');
51
- console.log('Missing:', missing.join(', '));
52
- console.log('Install manually with:');
53
- console.log(` pkg install -y ${missing.join(' ')}`);
54
- process.exit(0);
55
- }
56
-
57
- spawnSync('pkg', ['install', '-y', ...missing], { stdio: 'inherit' });