Add store-auth source and auto fallback to store list#7714
Conversation
89f393a to
619636c
Compare
1e3e4bc to
770846a
Compare
619636c to
7c049c1
Compare
770846a to
95d8a71
Compare
7c049c1 to
52daf1c
Compare
95d8a71 to
04f35fd
Compare
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
/snapit |
|
🫰✨ Thanks @nickwesselman! Your snapshot has been published to npm. Test the snapshot by installing your package globally: pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20260605172558Caution After installing, validate the version by running |
04f35fd to
065f5fa
Compare
00dce2a to
22e4f4a
Compare
10fb6d5 to
c8eed6e
Compare
c8eed6e to
aa58407
Compare
22e4f4a to
31a07f1
Compare
Only failures from authenticating and listing organizations are classified as 'unavailable' (so --from auto can fall back). In-process errors now propagate instead of masquerading as an unavailable service. The all-organizations-failed case returns 'unavailable' explicitly rather than throwing into a broad catch.
Differences in type declarationsWe detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:
New type declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/public/node/session.d.ts@@ -119,9 +119,10 @@ export declare function ensureAuthenticatedThemes(store: string, password: strin
* Ensure that we have a valid session to access the Business Platform API.
*
* @param scopes - Optional array of extra scopes to authenticate with.
+ * @param options - Optional auth behavior overrides such as .
* @returns The access token for the Business Platform API.
*/
-export declare function ensureAuthenticatedBusinessPlatform(scopes?: BusinessPlatformScope[]): Promise<string>;
+export declare function ensureAuthenticatedBusinessPlatform(scopes?: BusinessPlatformScope[], options?: EnsureAuthenticatedAdditionalOptions): Promise<string>;
/**
* Logout from Shopify.
*
|

Summary
Add the
--fromsource selector andautofallback toshopify store liston top of #7709.Demo:
Screen Recording 2026-06-05 at 11.08.13 AM.mov (uploaded via Graphite)
Scope
--from auto | organization | store-auth(defaultauto)store-authsource, backed bylistStoredStoreAuthSummaries(), rendered asSubdomain | Connected; its JSON carries onlystore+connectedAt(no user id / email)autoprefer your Shopify organization and fall back to locally stored store auth whenever the organization can't be listed for the current CLI session (not signed in, session not resolvable, reauthentication required, or any auth/network/listing error)--from organizationstrict: no fallback, original error surfacednoPromptthroughensureAuthenticatedBusinessPlatform()soautocan probe without prompting--organization-idthroughauto/organization; reject it with--from store-auth; an unknown org id is a hard error in every mode (no silent fallback)Contract
organization | store-auth; no "Business Platform" wording in the command contract or outputunavailable(original error preserved) soautoalways falls back while--from organizationrethrowsSmoke checks
store list→ falls back tostore-auth, exits 0store list --from store-auth→ local store auth table, exits 0store list --from organization→ strict, surfaces the failure