Skip to content

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

Draft
Patrick Vicinus (pvicinus) wants to merge 13 commits intomainfrom
TA-5049-Add-Content-CLI-option-in-variable-listing-command-for-staging-listing
Draft

TA-5049 add content-cli options to list staging variables#325
Patrick Vicinus (pvicinus) wants to merge 13 commits intomainfrom
TA-5049-Add-Content-CLI-option-in-variable-listing-command-for-staging-listing

Conversation

@pvicinus
Copy link

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

Description

Adds listing of unpublished (staging) package variables via config variables list --packageKeys, backed by Pacman’s batch staging-variables API. 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
@sonarqubecloud
Copy link

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.

2 participants