Skip to content

Commit

Permalink
Improved error when storeFromFqdn fails
Browse files Browse the repository at this point in the history
  • Loading branch information
shauns committed Aug 6, 2024
1 parent 11e060f commit 5e819e1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
15 changes: 7 additions & 8 deletions packages/app/src/cli/services/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import {
} from '../api/graphql/development_preview.js'
import {DeveloperPlatformClient, selectDeveloperPlatformClient} from '../utilities/developer-platform-client.js'
import {tryParseInt} from '@shopify/cli-kit/common/string'
import {TokenItem, renderConfirmationPrompt, renderInfo} from '@shopify/cli-kit/node/ui'
import {Token, TokenItem, renderConfirmationPrompt, renderInfo} from '@shopify/cli-kit/node/ui'
import {partnersFqdn} from '@shopify/cli-kit/node/context/fqdn'
import {AbortError} from '@shopify/cli-kit/node/error'
import {outputContent} from '@shopify/cli-kit/node/output'
Expand Down Expand Up @@ -266,7 +266,11 @@ export async function ensureDevContext(options: DevContextOptions): Promise<DevC
return result
}

const resetHelpMessage = ['You can pass', {command: '--reset'}, 'to your command to reset your app configuration.']
const resetHelpMessage: Token[] = [
'You can pass ',
{command: '--reset'},
' to your command to reset your app configuration.',
]

interface AppFromIdOptions {
apiKey: string
Expand Down Expand Up @@ -867,12 +871,7 @@ interface CurrentlyUsedConfigInfoOptions {
configFile?: string
appDotEnv?: string
includeConfigOnDeploy?: boolean
resetMessage?: (
| string
| {
command: string
}
)[]
resetMessage?: Token[]
}

export function renderCurrentlyUsedConfigInfo({
Expand Down
3 changes: 2 additions & 1 deletion packages/cli-kit/src/public/node/ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {FatalError} from '../../private/node/ui/components/FatalError.js'
import ScalarDict from '../../private/node/ui/components/Table/ScalarDict.js'
import {Table, TableColumn, TableProps} from '../../private/node/ui/components/Table/Table.js'
import {
Token,
tokenItemToString,
InlineToken,
LinkToken,
Expand Down Expand Up @@ -718,4 +719,4 @@ This usually happens when running a command non-interactively, for example in a

export type Key = InkKey
export type InfoMessage = InfoMessageProps['message']
export {Task, TokenItem, InlineToken, LinkToken, TableColumn, InfoTableSection, ListToken, render, handleCtrlC}
export {Token, Task, TokenItem, InlineToken, LinkToken, TableColumn, InfoTableSection, ListToken, render, handleCtrlC}

0 comments on commit 5e819e1

Please sign in to comment.