Skip to content

Commit 7044579

Browse files
authored
Merge pull request #6250 from Shopify/08-13-add_events_for_the_info_command
Add events for `shopify theme info`
2 parents dc3246c + 5e253da commit 7044579

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • packages/theme/src/cli/services

packages/theme/src/cli/services/info.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {themeEditorUrl, themePreviewUrl} from '@shopify/cli-kit/node/themes/urls
66
import {Theme} from '@shopify/cli-kit/node/themes/types'
77
import {AdminSession} from '@shopify/cli-kit/node/session'
88
import {AlertCustomSection, InlineToken} from '@shopify/cli-kit/node/ui'
9+
import {recordEvent} from '@shopify/cli-kit/node/analytics'
910

1011
interface ThemeInfo {
1112
theme: {
@@ -60,8 +61,11 @@ export async function fetchDevInfo(config: {cliVersion: string}): Promise<AlertC
6061
}
6162

6263
function devConfigSection(): AlertCustomSection {
63-
const store = getThemeStore() || 'Not configured'
64+
const store = getThemeStore() ?? 'Not configured'
6465
const developmentTheme = getDevelopmentTheme()
66+
67+
recordEvent(`theme-command:info:dev-theme-loaded:${developmentTheme}`)
68+
6569
return tabularSection('Theme Configuration', [
6670
['Store', store],
6771
['Development Theme ID', developmentTheme ? `#${developmentTheme}` : {subdued: 'Not set'}],

0 commit comments

Comments
 (0)