@@ -5,7 +5,7 @@ import {platformAndArch} from '@shopify/cli-kit/node/os'
55import { themeEditorUrl , themePreviewUrl } from '@shopify/cli-kit/node/themes/urls'
66import { Theme } from '@shopify/cli-kit/node/themes/types'
77import { AdminSession } from '@shopify/cli-kit/node/session'
8- import { AlertCustomSection } from '@shopify/cli-kit/node/ui'
8+ import { AlertCustomSection , InlineToken } from '@shopify/cli-kit/node/ui'
99
1010interface ThemeInfo {
1111 theme : {
@@ -62,30 +62,25 @@ export async function fetchDevInfo(config: {cliVersion: string}): Promise<AlertC
6262function devConfigSection ( ) : AlertCustomSection {
6363 const store = getThemeStore ( ) || 'Not configured'
6464 const developmentTheme = getDevelopmentTheme ( )
65- return {
66- title : 'Theme Configuration' ,
67- body : {
68- tabularData : [
69- [ 'Store' , store ] ,
70- [ 'Development Theme ID' , developmentTheme ? `#${ developmentTheme } ` : { subdued : 'Not set' } ] ,
71- ] ,
72- firstColumnSubdued : true ,
73- } ,
74- }
65+ return tabularSection ( 'Theme Configuration' , [
66+ [ 'Store' , store ] ,
67+ [ 'Development Theme ID' , developmentTheme ? `#${ developmentTheme } ` : { subdued : 'Not set' } ] ,
68+ ] )
7569}
7670
7771async function systemInfoSection ( config : { cliVersion : string } ) : Promise < AlertCustomSection > {
7872 const { platform, arch} = platformAndArch ( )
73+ return tabularSection ( 'Tooling and System' , [
74+ [ 'Shopify CLI' , config . cliVersion ] ,
75+ [ 'OS' , `${ platform } -${ arch } ` ] ,
76+ [ 'Shell' , process . env . SHELL || 'unknown' ] ,
77+ [ 'Node version' , process . version ] ,
78+ ] )
79+ }
80+
81+ function tabularSection ( title : string , data : InlineToken [ ] [ ] ) : AlertCustomSection {
7982 return {
80- title : 'Tooling and System' ,
81- body : {
82- tabularData : [
83- [ 'Shopify CLI' , config . cliVersion ] ,
84- [ 'OS' , `${ platform } -${ arch } ` ] ,
85- [ 'Shell' , process . env . SHELL || 'unknown' ] ,
86- [ 'Node version' , process . version ] ,
87- ] ,
88- firstColumnSubdued : true ,
89- } ,
83+ title,
84+ body : { tabularData : data , firstColumnSubdued : true } ,
9085 }
9186}
0 commit comments