feat(devtools): scaffolding (just new-plugin) + just-таргеты
templates/plugin (валидный манифест+locales+README); new-plugin генерит и валидирует; validate-manifest / plugin-dev-run (каркас, App-Host v3) / sim (плейсхолдер v2). plugins/ — в .gitignore. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Alexander <akotenev2003@gmail.com>
This commit is contained in:
@@ -28,3 +28,32 @@ test-integration:
|
||||
|
||||
# полный локальный гейт
|
||||
ci: lint test deny
|
||||
|
||||
# --- плагины (F02/F03) ---
|
||||
|
||||
# валидировать манифест плагина
|
||||
validate-manifest path:
|
||||
cargo run -q -p shturman-manifest-validator -- {{path}}
|
||||
|
||||
# сгенерировать каркас плагина в plugins/<name> и проверить валидатором
|
||||
new-plugin name:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
dest="plugins/{{name}}"
|
||||
[ -e "$dest" ] && { echo "уже существует: $dest"; exit 1; }
|
||||
mkdir -p "$dest"
|
||||
cp -R templates/plugin/. "$dest/"
|
||||
for f in $(find "$dest" -type f); do
|
||||
tmp=$(mktemp); sed "s/__NAME__/{{name}}/g" "$f" > "$tmp" && mv "$tmp" "$f"
|
||||
done
|
||||
echo "создан плагин: $dest"
|
||||
cargo run -q -p shturman-manifest-validator -- "$dest/manifest.yaml"
|
||||
|
||||
# dev-запуск плагина (каркас; полноценно — с App-Host, v3)
|
||||
plugin-dev-run path:
|
||||
@echo "plugin-dev-run {{path}}: нужен App-Host (приходит в v3). Пока — валидация манифеста:"
|
||||
cargo run -q -p shturman-manifest-validator -- {{path}}/manifest.yaml
|
||||
|
||||
# Vehicle Simulator (плейсхолдер; домен E, v2)
|
||||
sim:
|
||||
@echo "Vehicle Simulator — v2 (домен E): vcan + ELM327-emu; каркас в sim/."
|
||||
|
||||
Reference in New Issue
Block a user