-
Notifications
You must be signed in to change notification settings - Fork 229
Read client steps from remote config #6941
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 03-10-add_client_steps_implementation_to_support_existing_functionalities
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -141,6 +141,7 @@ import { | |
| AppLogsSubscribeMutationVariables, | ||
| } from '../../api/graphql/app-management/generated/app-logs-subscribe.js' | ||
| import {SourceExtension} from '../../api/graphql/app-management/generated/types.js' | ||
| import {ClientSteps} from '../../services/build/client-steps.js' | ||
| import {getPartnersToken} from '@shopify/cli-kit/node/environment' | ||
| import {ensureAuthenticatedAppManagementAndBusinessPlatform, Session} from '@shopify/cli-kit/node/session' | ||
| import {isUnitTest} from '@shopify/cli-kit/node/context/local' | ||
|
|
@@ -454,6 +455,7 @@ export class AppManagementClient implements DeveloperPlatformClient { | |
| identifier: spec.identifier, | ||
| externalIdentifier: spec.externalIdentifier, | ||
| gated: false, | ||
| clientSteps: parseClientSteps(spec.clientSteps), | ||
| options: { | ||
| managementExperience: 'cli', | ||
| registrationLimit: spec.uidStrategy.appModuleLimit, | ||
|
|
@@ -1431,3 +1433,7 @@ function toUserError(err: CreateAppVersionMutation['appVersionCreate']['userErro | |
| function isStoreProvisionable(permissions: string[]) { | ||
| return permissions.includes('ondemand_access_to_stores') | ||
| } | ||
| function parseClientSteps(clientSteps: string | null | undefined): ClientSteps | undefined { | ||
| if (!clientSteps) return undefined | ||
| return JSON.parse(clientSteps) | ||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unhandled JSON.parse can crash specifications fetch
Evidence: function parseClientSteps(clientSteps: string | null | undefined): ClientSteps | undefined {
if (!clientSteps) return undefined
return JSON.parse(clientSteps)
}This can make the CLI fail to fetch extension specifications, potentially breaking deploy/build flows for users receiving malformed |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am worried about the coupling of client <> server we're doing here and the implications it has.