Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmengo committed Nov 14, 2024
1 parent 78eb09f commit dcde301
Showing 1 changed file with 51 additions and 2 deletions.
53 changes: 51 additions & 2 deletions packages/cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ import HelpCommand from './cli/commands/help.js'
import List from './cli/commands/notifications/list.js'
import Generate from './cli/commands/notifications/generate.js'
import ClearCache from './cli/commands/cache/clear.js'
import ThemeCommands from '@shopify/theme'
import ThemeCommands, {
push as ThemePush,
pull as ThemePull,
fetchStoreThemes as ThemeFetchStoreThemes,
} from '@shopify/theme'
import {COMMANDS as HydrogenCommands, HOOKS as HydrogenHooks} from '@shopify/cli-hydrogen'
import {commands as AppCommands} from '@shopify/app'
import {commands as PluginCommandsCommands} from '@oclif/plugin-commands'
Expand All @@ -23,14 +27,59 @@ import {runCLI} from '@shopify/cli-kit/node/cli'
import {launchCLI} from '@shopify/cli-kit/node/cli-launcher'
import {renderFatalError} from '@shopify/cli-kit/node/ui'
import {FatalError} from '@shopify/cli-kit/node/error'
import {Theme} from '@shopify/cli-kit/node/themes/types'
import fs from 'fs'

export {DidYouMeanHook} from '@shopify/plugin-did-you-mean'
export {default as TunnelStartHook} from '@shopify/plugin-cloudflare/hooks/tunnel'
export {default as TunnelProviderHook} from '@shopify/plugin-cloudflare/hooks/provider'
export {hooks as PluginHook} from '@oclif/plugin-plugins'
export {AppSensitiveMetadataHook, AppInitHook, AppPublicMetadataHook} from '@shopify/app'
export {push, pull, fetchStoreThemes} from '@shopify/theme'

export const push: (options: {
/** Path to the theme directory */
path: string
/** Store URL (e.g. my-store.myshopify.com) */
store: string
/** Admin API access token. Will prompt if not provided */
password?: string
/** Theme ID. Will create new theme if not provided */
theme?: string
/** Keep remote files that don't exist locally */
nodelete?: boolean
/** Development theme suffix */
development?: boolean
/** Only upload files that have changed */
only?: string[]
/** Ignore specific files */
ignore?: string[]
/** Live reload */
live?: boolean
/** Allow live reload to work outside local environments */
'allow-live'?: boolean
}) => Promise<void> = ThemePush

export const pull: (options: {
/** Theme ID to pull from */
theme: string
/** Store URL (e.g. my-store.myshopify.com) */
store: string
/** Admin API access token. Will prompt if not provided */
password?: string
/** Development theme suffix */
development?: boolean
/** Only download specific files */
only?: string[]
/** Ignore specific files */
ignore?: string[]
}) => Promise<void> = ThemePull

export const fetchStoreThemes: (options: {
/** Store URL (e.g. my-store.myshopify.com) */
store: string
/** Admin API access token. Will prompt if not provided */
password: string
}) => Promise<Theme[]> = (options) => ThemeFetchStoreThemes(options.store, options.password)

export const HydrogenInitHook = HydrogenHooks.init

Expand Down

0 comments on commit dcde301

Please sign in to comment.