Skip to content

@W-22247284@ feat: add --distribution-type flag to package create and update - #1284

Merged
sshyamala-sfdc merged 2 commits into
packaging-distribution/spifrom
t/packaging-distribution/w-22247284/package-distribution-type
Sep 3, 2026
Merged

@W-22247284@ feat: add --distribution-type flag to package create and update#1284
sshyamala-sfdc merged 2 commits into
packaging-distribution/spifrom
t/packaging-distribution/w-22247284/package-distribution-type

Conversation

@sshyamala-sfdc

Copy link
Copy Markdown
Collaborator

What & why

Adds an optional --distribution-type flag to sf package create and sf package update, and surfaces the distribution type in sf package list (W-22247284).

This is the plugin half of the feature. The business logic, validation, and types live in @salesforce/packaging; this PR pins the prerelease that ships them (5.0.9-spi.6) and wires up the command surface.

Library PR: forcedotcom/packaging#926

Behavior

  • --distribution-type accepts PublicSecure or Limited only (oclif enum). Public and Private are backend-only states and are rejected.
  • Optional on create — when omitted, the backend defaults the distribution type based on the package type.
  • Gated at API version 68.0 by the library; supplying it against an older API version errors.
  • package list --verbose shows a Distribution Type column at API 68.0+.

Changes

  • --distribution-type flag on package create and package update (Flags.custom<SettableDistributionType>({ options: ['PublicSecure', 'Limited'] })), wired into their options.
  • DistributionType added to package list's Package2Result, record mapping, and verbose display column.
  • Flag messages in package_create.md / package_update.md.
  • command-snapshot.json entries for create + update; schemas updated (package-list.json, package-version-report.json).
  • Unit tests asserting flag passthrough, omission, and invalid-value rejection for both commands.
  • Pin @salesforce/packaging to 5.0.9-spi.6.

Validation

  • yarn build clean against the published 5.0.9-spi.6 (unlinked, real package).
  • 176 unit tests passing (incl. 6 new).
  • snapshot:compare and schema:compare both report "No changes have been detected."

🤖 Generated with Claude Code

…247284)

Add an optional --distribution-type flag to `package create` and
`package update`, and surface the distribution type in `package list`
(verbose, API 68.0+). The flag accepts PublicSecure or Limited only; the
library gates the value at API version 68.0 and rejects backend-only
values (Public, Private). On create, omitting the flag lets the backend
default the distribution type based on the package type.

- --distribution-type flag on create and update (Flags.custom enum)
- Distribution Type column in package list
- flag messages, command-snapshot, schemas
- unit tests asserting flag passthrough, omission, and invalid-value rejection
- pin @salesforce/packaging to 5.0.9-spi.6

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sshyamala-sfdc
sshyamala-sfdc requested a review from a team as a code owner September 2, 2026 23:07
…hemas

Picks up the library change that removes Private from DistributionType.
Regenerated schemas no longer list Private in the DistributionType enum
for package list and package version report output.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sshyamala-sfdc
sshyamala-sfdc merged commit f467a4e into packaging-distribution/spi Sep 3, 2026
13 checks passed
@sshyamala-sfdc
sshyamala-sfdc deleted the t/packaging-distribution/w-22247284/package-distribution-type branch September 3, 2026 20:27
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.

2 participants