karnel-termux 4.17.31 → 4.17.32

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
@@ -8,7 +8,7 @@
8
8
 
9
9
  <p align="center">
10
10
  <a href="https://github.com/israelmarques1024-dotcom/karnel-termux">
11
- <img src="https://img.shields.io/badge/version-4.17.31-0078D4?style=for-the-badge" alt="Version">
11
+ <img src="https://img.shields.io/badge/version-4.17.32-0078D4?style=for-the-badge" alt="Version">
12
12
  </a>
13
13
  <a href="https://www.npmjs.com/package/karnel-termux">
14
14
  <img src="https://img.shields.io/npm/v/karnel-termux?style=for-the-badge&logo=npm&color=cb3837" alt="npm">
@@ -78,7 +78,7 @@ Why it's great:
78
78
  ### Via checksummed GitHub release (recommended)
79
79
 
80
80
  ```bash
81
- version=4.17.31
81
+ version=4.17.32
82
82
  tmpdir=$(mktemp -d) && trap 'rm -rf "$tmpdir"' EXIT
83
83
  base="https://github.com/israelmarques1024-dotcom/karnel-termux/releases/download/v$version"
84
84
  curl -fsSL "$base/karnel-termux-install.sh" -o "$tmpdir/karnel-termux-install.sh"
@@ -1 +1 @@
1
- 385a0757314adc4d9fdd8d005fb42b6f8b5c29d1
1
+ 055ef02ecb9f9ddd5bf909126730a5c00e2f09ee
@@ -201,8 +201,21 @@ activate_installer_file() {
201
201
 
202
202
  github_release_asset_sha256() {
203
203
  local repo="$1" version="$2" asset="$3" digest=""
204
- # GitHub's release API does not expose per-asset digests, so fetch the
205
- # companion checksum file published alongside the asset (common convention).
204
+ # Modern GitHub releases expose an official SHA-256 in each asset's digest
205
+ # field. Prefer it so installers do not depend on companion checksum files.
206
+ if command -v jq >/dev/null 2>&1; then
207
+ digest=$(curl -fsSL --connect-timeout 10 --max-time 30 \
208
+ -H 'Accept: application/vnd.github+json' \
209
+ "https://api.github.com/repos/$repo/releases/tags/$version" 2>/dev/null \
210
+ | jq -r --arg asset "$asset" '.assets[] | select(.name == $asset) | .digest // empty' 2>/dev/null \
211
+ | awk -F: 'NR == 1 { print $NF }' | tr -d '\r')
212
+ if [[ "$digest" =~ ^[0-9a-f]{64}$ ]]; then
213
+ echo "$digest"
214
+ return 0
215
+ fi
216
+ fi
217
+ # Older GitHub releases may not have an API digest. Try the companion
218
+ # checksum file published alongside the asset (a common convention).
206
219
  digest=$(curl -fsSL --connect-timeout 10 --max-time 30 \
207
220
  "https://github.com/$repo/releases/download/$version/$asset.sha256" 2>/dev/null \
208
221
  | awk '{print $1; exit}' | tr -d '\r')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "karnel-termux",
3
- "version": "4.17.31",
3
+ "version": "4.17.32",
4
4
  "description": "Modular Dev Environment for Termux — install languages, databases, AI agents, editors, and more with one command",
5
5
  "bin": {
6
6
  "karnel": "karnel/bin/karnel"