karnel-termux 4.13.6 → 4.13.7
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 +3 -3
- package/karnel/tools/plugins/install.sh +24 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,14 +8,14 @@
|
|
|
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.13.
|
|
11
|
+
<img src="https://img.shields.io/badge/version-4.13.7-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">
|
|
15
15
|
</a>
|
|
16
16
|
<a href="https://www.npmjs.com/package/karnel-termux">
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
<img src="https://img.shields.io/npm/dt/karnel-termux?style=for-the-badge&logo=npm&color=cb3837" alt="npm downloads">
|
|
18
|
+
</a>
|
|
19
19
|
<a href="https://github.com/israelmarques1024-dotcom/karnel-termux/blob/main/LICENSE">
|
|
20
20
|
<img src="https://img.shields.io/badge/license-MIT-0078D4?style=for-the-badge" alt="License">
|
|
21
21
|
</a>
|
|
@@ -690,7 +690,7 @@ _plugin_registry_errors() {
|
|
|
690
690
|
if (($registry.plugins | type) != "array") then "plugins must be an array" else empty end,
|
|
691
691
|
if (($registry.plugins | type) == "array" and ($registry.plugins | all(.[]; valid_plugin) | not)) then "one or more plugin entries violate registry schema v1" else empty end,
|
|
692
692
|
if (($registry.plugins | type) == "array" and ($registry.plugins | map(.name) | length) != ($registry.plugins | map(.name) | unique | length)) then "plugin names must be unique" else empty end,
|
|
693
|
-
if (($registry.plugins | type) == "array" and ($registry.plugins | map(.repo) | length) != ($registry.plugins | map(.repo) | unique | length)) then "plugin
|
|
693
|
+
if (($registry.plugins | type) == "array" and ($registry.plugins | map(.repo + ":" + (.path // ".")) | length) != ($registry.plugins | map(.repo + ":" + (.path // ".")) | unique | length)) then "plugin repository paths must be unique" else empty end
|
|
694
694
|
]
|
|
695
695
|
end | .[]
|
|
696
696
|
' "$registry"
|
|
@@ -732,7 +732,7 @@ _plugin_fetch_registry() {
|
|
|
732
732
|
return 1
|
|
733
733
|
fi
|
|
734
734
|
|
|
735
|
-
if ! curl --fail --silent --show-error --location --connect-timeout 10 --max-time 30 --output "$destination" "$registry_url"; then
|
|
735
|
+
if ! curl --fail --silent --show-error --location --proto '=https' --proto-redir '=https' --connect-timeout 10 --max-time 30 --output "$destination" "$registry_url"; then
|
|
736
736
|
log_error "Failed to fetch the plugin registry. Check your network connection."
|
|
737
737
|
return 1
|
|
738
738
|
fi
|
|
@@ -1270,25 +1270,35 @@ install_plugin() {
|
|
|
1270
1270
|
|
|
1271
1271
|
uninstall_plugin() {
|
|
1272
1272
|
local name="$1"
|
|
1273
|
-
local plugin_dir
|
|
1273
|
+
local plugin_dir status=0
|
|
1274
1274
|
|
|
1275
1275
|
_plugin_validate_name "$name" || return 1
|
|
1276
1276
|
_plugin_prepare_plugins_dir || return 1
|
|
1277
|
-
|
|
1278
|
-
plugin_dir="$PLUGINS_DIR/$name"
|
|
1277
|
+
_plugin_acquire_plugin_lock "$name" || return 1
|
|
1279
1278
|
|
|
1280
|
-
if
|
|
1281
|
-
|
|
1282
|
-
|
|
1279
|
+
if ! _plugin_recover_interrupted_replacement "$name"; then
|
|
1280
|
+
status=1
|
|
1281
|
+
else
|
|
1282
|
+
plugin_dir="$PLUGINS_DIR/$name"
|
|
1283
|
+
if [[ ! -e "$plugin_dir" && ! -L "$plugin_dir" ]]; then
|
|
1284
|
+
log_info "Plugin '$name' is not installed."
|
|
1285
|
+
status=2
|
|
1286
|
+
elif [[ -d "$plugin_dir" && ! -L "$plugin_dir" ]] && ! _plugin_validate_symlinks "$(_plugin_canonical_existing_path "$plugin_dir")"; then
|
|
1287
|
+
status=1
|
|
1288
|
+
else
|
|
1289
|
+
log_info "Removing plugin '$name'..."
|
|
1290
|
+
if _plugin_safe_remove_path "$plugin_dir"; then
|
|
1291
|
+
log_success "Plugin '$name' removed."
|
|
1292
|
+
else
|
|
1293
|
+
status=1
|
|
1294
|
+
fi
|
|
1295
|
+
fi
|
|
1283
1296
|
fi
|
|
1284
1297
|
|
|
1285
|
-
if
|
|
1286
|
-
|
|
1298
|
+
if ! _plugin_release_plugin_lock && ((status == 0)); then
|
|
1299
|
+
status=1
|
|
1287
1300
|
fi
|
|
1288
|
-
|
|
1289
|
-
log_info "Removing plugin '$name'..."
|
|
1290
|
-
_plugin_safe_remove_path "$plugin_dir" || return 1
|
|
1291
|
-
log_success "Plugin '$name' removed."
|
|
1301
|
+
return "$status"
|
|
1292
1302
|
}
|
|
1293
1303
|
|
|
1294
1304
|
_plugin_read_metadata_field() {
|
package/package.json
CHANGED