feat: ESLint, shell completions, Docker, nfpm packaging, CI/CD
- ESLint with typescript-eslint + prettier (eslint.config.js) - Shell completions for bash and fish (scripts/generate-completions.ts) - Multi-stage Dockerfile for bastion (fedora:43 + dnsmasq + node) - nfpm.yaml for RPM/DEB packaging with bun-compiled binary - Build scripts: build-rpm.sh, build-bastion.sh, publish-rpm/deb.sh - Gitea Actions CI/CD: lint, typecheck, test, build, publish Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
67
bastion/completions/lab.bash
Normal file
67
bastion/completions/lab.bash
Normal file
@@ -0,0 +1,67 @@
|
||||
# lab bash completions -- auto-generated by scripts/generate-completions.ts
|
||||
# DO NOT EDIT MANUALLY -- run: pnpm completions:generate
|
||||
|
||||
_lab() {
|
||||
local cur prev words cword
|
||||
_init_completion || return
|
||||
|
||||
local top_commands="init provision"
|
||||
|
||||
# Extract the subcommand chain (skip options and their values)
|
||||
local -a subcmd_chain=()
|
||||
local i skip_next=false
|
||||
for ((i=1; i < cword; i++)); do
|
||||
if $skip_next; then skip_next=false; continue; fi
|
||||
case "${words[i]}" in
|
||||
-*) ;; # skip options
|
||||
*) subcmd_chain+=("${words[i]}") ;;
|
||||
esac
|
||||
done
|
||||
|
||||
local chain_len=${#subcmd_chain[@]}
|
||||
local chain_str="${subcmd_chain[*]}"
|
||||
|
||||
case "$chain_str" in
|
||||
"init bastion standalone start")
|
||||
COMPREPLY=($(compgen -W "--port --dir --domain --dhcp-mode --fedora --arch --timezone --locale --skip-dnsmasq --skip-artifacts -h --help" -- "$cur"))
|
||||
return ;;
|
||||
"init bastion standalone stop")
|
||||
COMPREPLY=($(compgen -W "--dir -h --help" -- "$cur"))
|
||||
return ;;
|
||||
"init bastion standalone status")
|
||||
COMPREPLY=($(compgen -W "--dir --port -h --help" -- "$cur"))
|
||||
return ;;
|
||||
"init bastion standalone")
|
||||
COMPREPLY=($(compgen -W "start stop status -h --help" -- "$cur"))
|
||||
return ;;
|
||||
"init bastion")
|
||||
COMPREPLY=($(compgen -W "standalone -h --help" -- "$cur"))
|
||||
return ;;
|
||||
"provision list")
|
||||
COMPREPLY=($(compgen -W "--port -h --help" -- "$cur"))
|
||||
return ;;
|
||||
"provision install")
|
||||
COMPREPLY=($(compgen -W "--role --disk --port -h --help" -- "$cur"))
|
||||
return ;;
|
||||
"provision reprovision")
|
||||
COMPREPLY=($(compgen -W "--role --disk --port -h --help" -- "$cur"))
|
||||
return ;;
|
||||
"provision forget")
|
||||
COMPREPLY=($(compgen -W "--port -h --help" -- "$cur"))
|
||||
return ;;
|
||||
"init")
|
||||
COMPREPLY=($(compgen -W "bastion -h --help" -- "$cur"))
|
||||
return ;;
|
||||
"provision")
|
||||
COMPREPLY=($(compgen -W "list install reprovision forget -h --help" -- "$cur"))
|
||||
return ;;
|
||||
"")
|
||||
COMPREPLY=($(compgen -W "$top_commands -h --help -v --version" -- "$cur"))
|
||||
return ;;
|
||||
*)
|
||||
COMPREPLY=($(compgen -W "-h --help" -- "$cur"))
|
||||
return ;;
|
||||
esac
|
||||
}
|
||||
|
||||
complete -F _lab lab
|
||||
Reference in New Issue
Block a user