Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 4e32b56 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| }); | ||
|
|
||
| async function fetchStoreInformation(storeHash: string, accessToken: string, apiHost: string) { | ||
| const response = await fetch(`https://${apiHost}/stores/${storeHash}/v2/store`, { |
Contributor
There was a problem hiding this comment.
Hmm is there another api we could use instead of a V2 endpoint?
Contributor
There was a problem hiding this comment.
Don't need a changeset yet for this stuff
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.
What/Why?
CATALYST-1759: Adds a
catalyst whoamicommand that verifies stored credentials and displays store/project info.Credential resolution follows the same priority as other CLI commands: CLI flags → env vars (
CATALYST_STORE_HASH,CATALYST_ACCESS_TOKEN) →.bigcommerce/project.jsonconfig. Calls the V2 Store Information API to verify the token and fetch the store name, and optionally looks up the linked project name ifprojectUuidis set in config.Dependency on #2876 (CATALYST-1744): This branch adds
storeHash/accessTokentoProjectConfigSchemaso it works standalone. The rebase ontoalphaafter #2876 merges will be a trivial conflict.Changes
packages/catalyst/src/cli/commands/whoami.ts— newwhoamicommandpackages/catalyst/src/cli/lib/project-config.ts— addstoreHash/accessTokento schema (matches [Catalyst-1744] Write additional variables to project config #2876)packages/catalyst/src/cli/program.ts— registerwhoamicommandpackages/catalyst/tests/mocks/handlers.ts— add MSW handler forGET /v2/storeTesting
Build, lint, and all 47 existing tests pass.
Migration
None.