Nuno Duque Nunes
f61bc59446
feat: block/unblock migration, help.sh optimization
...
- commands/block/: block.sh, show.sh, helpers.sh
- commands/unblock/: unblock.sh, show.sh, helpers.sh
- flag::define array type: --ip[], --subnet[], --port[], --service[]
- help.sh: use pre-cached _FLAG_C_* arrays instead of flag::_parse_constraints
- remove flag::_parse_constraints/flag::_constraint_get calls from help.sh
- adopt local var; var=value pattern for safe assignment
2026-05-30 12:31:41 +00:00
Nuno Duque Nunes
de22dbeec7
feat: list migration to command framework
...
- commands/list/list.sh: router + command::define show [*]
- commands/list/show.sh: flag::define + flag::parse, all helpers
- flag::exclusive: register under top-level command name (strip ::subcmd)
- flag::parse: validate exclusive groups, error on conflicting user flags
- --help: intercept in command::run before routing
- help::auto: don't show default subcommand in usage line
2026-05-30 04:14:21 +00:00
Nuno Duque Nunes
8ed491313d
feat: command framework + logs migration
...
- core/framework/flag.sh: flag::define, flag::parse, accessors
- core/framework/hook.sh: hook::on, hook::fire, hook::off, hook::has
- core/framework/help.sh: help::section, command::help::auto
- core/framework/command.sh: command::define, command::route, lazy loading
- core restructure: framework/ + app/ separation
- load_command: directory-based command detection
- command::exists: accepts new-style commands
- command::run: routing for new-style, legacy fallback
- commands/logs/: migrated to new framework
- logs.sh: router + command::define
- show.sh: flag::define + flag::parse, no manual case blocks
- clean.sh: flag::define + flag::parse
- remove.sh: flag::define + flag::parse
- rotate.sh: flag::define + flag::parse
- logs clean: fix dry_run bool to int conversion
- ctx::json_helper: fixed path after core restructure
- PYTHONPATH: exported in app/core.sh
2026-05-30 03:44:08 +00:00
Nuno Duque Nunes
290ac24d88
refactor: core directory restructure
...
- core/framework/: flag.sh, hook.sh, help.sh, command.sh, mixin.sh
- core/app/: wgctl-specific context.sh, json.sh
- core/framework/mixins/: json_output, no_color mixins
- core/core.sh: sources framework/core.sh + app/core.sh
- PYTHONPATH exported in app/core.sh for lib/ module resolution
- command::_load_mixins: uses _FRAMEWORK_DIR for mixin path
2026-05-30 02:50:43 +00:00