feat(plugins): decouple runtime cache and add dynamic auto-generation

This commit is contained in:
2026-06-25 21:48:28 +05:30
parent 9a7404a65f
commit a254001da8
3 changed files with 9 additions and 13 deletions

View File

@@ -1,13 +0,0 @@
# Auto-generated plugin cache. Do not edit manually.
declare -g -A PLUGIN_URLS
declare -g -A PLUGIN_VERSIONS
declare -g -A PLUGIN_BOOTSTRAP_VERSIONS
PLUGIN_VERSIONS["weather"]="1.0.0"
PLUGIN_URLS["weather"]="https://git.adityagupta.dev/sortedcord/bootstrap/raw/branch/master/official_plugins/weather.sh"
PLUGIN_BOOTSTRAP_VERSIONS["weather"]="2.1.0"
PLUGIN_VERSIONS["sysinfo"]="1.0.0"
PLUGIN_URLS["sysinfo"]="https://git.adityagupta.dev/sortedcord/bootstrap/raw/branch/master/official_plugins/sysinfo.sh"
PLUGIN_BOOTSTRAP_VERSIONS["sysinfo"]="2.1.0"
PLUGIN_VERSIONS["todo"]="1.0.0"
PLUGIN_URLS["todo"]="https://git.adityagupta.dev/sortedcord/bootstrap/raw/branch/master/official_plugins/todo.sh"
PLUGIN_BOOTSTRAP_VERSIONS["todo"]="2.1.0"

View File

@@ -38,6 +38,10 @@ fi
# Source plugin system
if [ -f "$BOOTSTRAP_DIR/lib/plugins.sh" ]; then
. "$BOOTSTRAP_DIR/lib/plugins.sh"
if [ ! -f "$BOOTSTRAP_DIR/lib/plugin_cache.sh" ]; then
# Silently auto-generate cache if missing so official plugins are ready instantly
update_plugin_cache >/dev/null 2>&1 || true
fi
if [ -f "$BOOTSTRAP_DIR/lib/plugin_cache.sh" ]; then
. "$BOOTSTRAP_DIR/lib/plugin_cache.sh"
fi