Skip to content

feat: add sf package trust link status command (W-23970571) - #1274

Open
sshyamala-sfdc wants to merge 2 commits into
packaging-distribution/spifrom
t/packaging-distribution/w-23970571/trust-link-status
Open

feat: add sf package trust link status command (W-23970571)#1274
sshyamala-sfdc wants to merge 2 commits into
packaging-distribution/spifrom
t/packaging-distribution/w-23970571/trust-link-status

Conversation

@sshyamala-sfdc

Copy link
Copy Markdown
Collaborator

What & Why

Adds the sf package trust link status command (W-23970571, SPI / Public Secure), the developer/authoring-org side verb that reports where a Public Secure (VerifiedDev) trust link stands in the two-way handshake. Thin oclif wrapper over PackageTrustLink.status() in @salesforce/packaging.

Behavior

Read-only. Runs against the connected authoring org (the 1GP namespace org or 2GP Dev Hub); standard --target-org / --api-version / --json.

  • No link → logs "Not Linked"; returns { Status: 'Not Linked', linked: false }.
  • Link present → logs the status (Pending/Accepted/Declined/Revoked/Failed) with the verified org, plus a line per timestamp that's set (Requested, Established, Revoked); returns the full result. Unset timestamps are omitted so --json stays clean.

Hidden/beta command (hidden = true; state = 'beta'), consistent with the sibling request/unlink verbs; no package.json subtopic entry.

Files

  • src/commands/package/trust/link/status.ts — the command.
  • messages/package_trust_link_status.md — summary/description/examples + output messages.
  • test/commands/package/packageTrustLinkStatus.test.ts — 4 unit tests.
  • schemas/package-trust-link-status.json, command-snapshot.json — new command entry.
  • package.json / yarn.lock — pin @salesforce/packaging 5.0.9-spi.1 (the prerelease adding status).

Testing

Verified against the published @salesforce/packaging@5.0.9-spi.1 (not a yarn link): yarn build clean, full unit suite 140 passing, snapshot:compare and schema:compare both report no changes.

Related

Library PR: forcedotcom/packaging#920 (adds PackageTrustLink.status, publishes 5.0.9-spi.1). Sibling verbs request and unlink already on packaging-distribution/spi.

Merge order: merge the library PR #920 first (so the pinned prerelease is final), then this one.

sshyamala-sfdc and others added 2 commits August 28, 2026 03:10
Add the hidden/beta `sf package trust link status` command that reports the
connected authoring org's Public Secure (VerifiedDev) trust-link state:
Not Linked, or the link's status (Pending/Accepted/Declined/Revoked/Failed)
with the timestamps that are set. Thin wrapper over PackageTrustLink.status.

Pins @salesforce/packaging 5.0.9-spi.1 (the prerelease that adds status).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… t/packaging-distribution/w-23970571/trust-link-status

# Conflicts:
#	command-snapshot.json
#	package.json
#	yarn.lock
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