Repository navigation
Conversation
flb token create -o <org> ended its success line with "pinned to undefined". The Registry Service returns a token's organization as its id (org_…), and the CLI read .slug from it as if it were an object. The token itself was pinned correctly. The message now names the organization passed with -o, and otherwise whatever the response carries: a slug from an object, or the id. The same assumption left the ORG column of flb token list empty for pinned tokens; it now shows the slug, looked up from the account when a token carries only the id, and the id when that lookup fails. token create --save also kept the previous default organization instead of the one the new token is pinned to. --json output is unchanged: it passes the service's response through.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
flb token create -o <org-slug>ends its success line withpinned to undefined:The Registry Service returns a token's
organizationas the organization's id ("org_…", seeTokenResource), and the CLI read.slugfrom it as if it were an object. The token itself is pinned correctly; only the output is wrong.Changes
flb token create: the message names the organization passed with-o/--organization, and otherwise what the response carries: the slug of an object, or the id string. Nothing is said about pinning when the response has no organization.flb token list: the same assumption left theORGcolumn empty for every pinned token. It now shows the slug. When a token carries only the id, the slug is looked up fromGET /v1/account(one extra request, only when a listed token is pinned by id); if that lookup fails, the id is shown.flb token create --save: the stored default organization came fromdetails.organization?.slug, so it silently kept the previous default. It now takes the slug passed with-o(an id passed with-ois not stored as a slug).TokenDetails.organizationis typed asstring | { id?, slug?, name? } | null.--jsonoutput is unchanged: it passes the service's response through. No API change.Tests
test/unit/auth.test.tscovers the create message,--saveand the list column with both response shapes (id string, object with a slug), plus the unpinned case and the failed account lookup. The three new tests fail onmainand pass here.npm run typecheck,npm run buildandnpm test(136 tests) pass locally.Release
There is no open
release/v*branch (v2.0.1 merged and its branch is gone), so this targetsmain. Merging it does not tag or publish:release.ymlonly tags when arelease/v*branch merges. It ships with the next release branch, which needs the version bump inpackage.json/package-lock.jsonand aRELEASE.mdentry for this fix.