Skip to content

TA-5049 add content-cli options to list staging variables#325

Merged
Jing Sun (kuvia) merged 16 commits intomainfrom
TA-5049-Add-Content-CLI-option-in-variable-listing-command-for-staging-listing
Mar 31, 2026
Merged

TA-5049 add content-cli options to list staging variables#325
Jing Sun (kuvia) merged 16 commits intomainfrom
TA-5049-Add-Content-CLI-option-in-variable-listing-command-for-staging-listing

Conversation

@pvicinus
Copy link
Copy Markdown
Contributor

@pvicinus Patrick Vicinus (pvicinus) commented Mar 23, 2026

Description

Adds listing of unpublished (staging) package variables via config variables list --packageKeys. Published variables stay on --keysByVersion / --keysByVersionFile. The two approaches are mutually exclusive (CLI validates and errors if combined or if neither is provided).

Relevant links

Checklist

  • I have self-reviewed this PR
  • I have tested the change and proved that it works in different scenarios
  • I have updated docs if needed

Summary

  • config variables list --packageKeys <key> … — staging variables; optional --json writes a JSON array of { packageKey, variables } per package.
  • config variables list --keysByVersion … or --keysByVersionFile … — unchanged for published versions; JSON entries include version.

Verify

content-cli config variables list -p <profile> --packageKeys <pkg1> [<pkg2> ...]
content-cli config variables list -p <profile> --packageKeys <pkg1> --json
yarn test

- Document --json as array of Pacman manifests per package
- Mock GET responses as { packageKey, variables }
- Remove unused FatalError import; format results.push

Includes-AI-Code: true
Made-with: Cursor
Use Pacman batch staging-variables API (by-package-keys) for
config variables listStaging, with optional variableType filter.

Document listStaging in the user guide like other variable listing
commands—command-focused, without internal API details.

Includes-AI-Code: true
Made-with: Cursor
- Move listStagingVariables coverage to config-list-staging-variables.spec.ts
- Align assertions with listVariables (post body, json export, errors)
- Add withQueryString helper for mock URLs

Includes-AI-Code: true
Made-with: Cursor
Replace listStaging with --packageKeys on variables list; mutual exclusion
with versioned options. Consolidate tests, update user guide, and set
Commander defaults on variables list options (module.spec mirrors parsed shape).
Pass variables list options through to ConfigCommandService without casts.

Includes-AI-Code: true
Made-with: Cursor
Drop the staging variable type filter from config variables list and the
Pacman client call. Update config-commands.md: mutual exclusivity of
modes, shared JSON manifest shape (version only for published), and
clearer published vs unpublished documentation.

Includes-AI-Code: true
Made-with: Cursor
@pvicinus Patrick Vicinus (pvicinus) changed the title Ta 5049 add content cli option in variable listing command for staging listing TA-5049 add content-cli options to list staging variables Mar 23, 2026
@ZgjimHaziri Zgjim Haziri (ZgjimHaziri) changed the base branch from master to main March 23, 2026 18:02
@kuvia Jing Sun (kuvia) marked this pull request as ready for review March 25, 2026 11:32
@kuvia Jing Sun (kuvia) requested a review from a team as a code owner March 25, 2026 11:32
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions to understand the process

@kuvia Jing Sun (kuvia) merged commit 48833ab into main Mar 31, 2026
6 checks passed
@kuvia Jing Sun (kuvia) deleted the TA-5049-Add-Content-CLI-option-in-variable-listing-command-for-staging-listing branch March 31, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

8 participants