Skip to content

refactor: type finite client CLI choices - #38

Merged
0xcadams merged 1 commit into
0xcadams/type-control-configfrom
0xcadams/type-client-choices
Oct 1, 2026
Merged

0xcadams merged 1 commit into
0xcadams/type-control-configfrom
0xcadams/type-client-choices

Conversation

@0xcadams

@0xcadams 0xcadams commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

What

Keep finite tnl role, maintenance-control, output-mode, and NDJSON event choices typed within the client CLI.

Why

Kong already restricts CLI choices, and generated APIs define the role and maintenance values, but command handlers passed them around as generic strings. NDJSON event kinds also have a fixed emitted set.

Changes

  • Carry generated team-role and maintenance-control enums through command handlers, retaining Kong enum tags.
  • Distinguish publish and status output modes and use a local type for emitted NDJSON event kinds.
  • Preserve CLI and JSON values and the existing publish-output mode validation.

@0xcadams
0xcadams force-pushed the 0xcadams/type-client-choices branch from a3b4e0b to b50f008 Compare October 1, 2026 06:02
@0xcadams
0xcadams changed the base branch from main to 0xcadams/type-control-config October 1, 2026 06:03
@0xcadams
0xcadams added this pull request to stack #43 October 1, 2026 06:03
@0xcadams
0xcadams force-pushed the 0xcadams/type-client-choices branch from b50f008 to 9ed2ded Compare October 1, 2026 06:30
@0xcadams
0xcadams merged commit 93769fd into main Oct 1, 2026
23 checks passed
@0xcadams
0xcadams deleted the 0xcadams/type-client-choices branch October 1, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant