Use store auth sessions for theme commands#7783
Draft
alfonso-noriega wants to merge 1 commit into
Draft
Conversation
Contributor
Author
|
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. |
4 tasks
Contributor
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/common/url.d.ts@@ -12,20 +12,4 @@ export declare function isValidURL(url: string): boolean;
* @param url - The string to parse into a URL.
* @returns A URL object if the parsing is successful, undefined otherwise.
*/
-export declare function safeParseURL(url: string): URL | undefined;
-/**
- * Extracts the lowercased hostname from a URL-shaped string. Tolerates
- * bare hosts (without a scheme) and inputs that come back from APIs as
- * either or .
- *
- * @param value - A URL or bare host string, possibly null/undefined.
- * @returns The lowercased hostname, or undefined when the input is empty.
- */
-export declare function extractHost(value: string | null | undefined): string | undefined;
-/**
- * Extracts the subdomain handle from a URL or host.
- *
- * @param value - A URL or host string, possibly null/undefined.
- * @returns The myshopify subdomain handle, or undefined when the input isn't a URL.
- */
-export declare function extractMyshopifyHandle(value: string | null | undefined): string | undefined;
\ No newline at end of file
+export declare function safeParseURL(url: string): URL | undefined;
\ No newline at end of file
|
f0160e7 to
72f8f19
Compare
9bae25d to
58a57dd
Compare
72f8f19 to
b504c98
Compare
58a57dd to
56a026b
Compare
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.

WHY are these changes introduced?
Fixes https://github.com/shop/issues-develop/issues/22916.
Preview stores created by
shopify store create previewpersist an Admin API token in the store-auth cache.theme pullandtheme pushshould be able to use that cached token when the user does not provide a Theme Access/Admin token via--password.WHAT is this pull request doing?
@shopify/storehelper that loads a matching store-auth cached Admin session using the same store-auth session path asstore execute.--passwordstill wins, but missing--passwordcan fall back to a matching cached store-auth Admin API token before normal theme authentication.passwordwhen the matching store-auth cache session satisfies auth.How to test your changes?
pnpm --filter @shopify/theme exec vitest run src/cli/utilities/theme-command.test.tspnpm --filter @shopify/store exec vitest run src/cli/services/store/auth/theme-session.test.tspnpm --filter @shopify/theme run type-checkpnpm --filter @shopify/store run type-checkpnpm nx run theme:lint --skip-nx-cache --output-style=streampnpm nx run store:lint --skip-nx-cache --output-style=streampnpm --filter @shopify/theme run buildpnpm --filter @shopify/store run buildnode bin/run-knip-ci.js/usr/bin/git diff --checkPost-release steps
None.
Checklist