@shopify/cli
Version:
A CLI tool to build for the Shopify platform
29 lines (21 loc) • 5.8 kB
JavaScript
import{a as l}from"../../../chunk-KKTW6ZCA.js";import"../../../chunk-FYFNUDOC.js";import"../../../chunk-JQJBBXMX.js";import"../../../chunk-OY3PNHPZ.js";import"../../../chunk-K6CTUBFC.js";import"../../../chunk-Y7JGYGV7.js";import"../../../chunk-GVQIPEZT.js";import"../../../chunk-CEIQFLCN.js";import"../../../chunk-DN2IE3VY.js";import"../../../chunk-JAO53IH2.js";import{k as i,l as h,q as a}from"../../../chunk-XITQULK4.js";import"../../../chunk-3VZEETAV.js";import"../../../chunk-IX5ICOBV.js";import"../../../chunk-SXTMSGUE.js";import"../../../chunk-QFWIDATO.js";import"../../../chunk-CBXSPL4W.js";import"../../../chunk-UJVH7FZS.js";import"../../../chunk-UXVZ2P63.js";import"../../../chunk-QSTEVZFQ.js";import"../../../chunk-5Y7GIF2W.js";import"../../../chunk-EKXY5COY.js";import"../../../chunk-4DCQNGUV.js";import{ua as o}from"../../../chunk-XONFGLJQ.js";import"../../../chunk-4LNCYIS3.js";import"../../../chunk-L2MGAEV3.js";import"../../../chunk-PRKBO42R.js";import"../../../chunk-ZSBA6VIC.js";import"../../../chunk-F2QU6WWX.js";import"../../../chunk-XULPJ6UG.js";import{b as s,c as m}from"../../../chunk-XR6GMMEU.js";import"../../../chunk-3TNEIDOD.js";import"../../../chunk-MHWV5RQV.js";import"../../../chunk-XOTA6JTZ.js";import"../../../chunk-MOA33ZFO.js";import"../../../chunk-JUVAGMIH.js";import"../../../chunk-6G6TMKXF.js";import"../../../chunk-P6XE4MH5.js";import"../../../chunk-KLMDWDT2.js";import"../../../chunk-5CH3B62S.js";import"../../../chunk-QUTQDXSL.js";import"../../../chunk-WSDN25F5.js";import"../../../chunk-M56NDIMD.js";import"../../../chunk-PD5ZHJWI.js";import{r as f}from"../../../chunk-LDGAHMS7.js";import"../../../chunk-ZR76GGZ6.js";import"../../../chunk-EENHXSWU.js";import"../../../chunk-FUOIGXI4.js";import"../../../chunk-6M3ZYNGO.js";import"../../../chunk-QYR5VPQA.js";import"../../../chunk-OBEWZXOQ.js";import"../../../chunk-N5PQPIBF.js";import"../../../chunk-CERXUPGC.js";import"../../../chunk-T4M5CWAO.js";import"../../../chunk-PRVQAHWI.js";import"../../../chunk-YTNDFQJT.js";import"../../../chunk-ULQG3XQS.js";import"../../../chunk-IU2ZQ6TE.js";import"../../../chunk-PIBY5DDZ.js";import{e as u,g as n}from"../../../chunk-VPRTJUIN.js";n();var e=u(f(),1);var r=class extends a{static{this.summary="Uploads your local theme files to the connected store, overwriting the remote version if specified."}static{this.usage=["theme push","theme push --unpublished --json"]}static{this.descriptionWithMarkdown=`Uploads your local theme files to Shopify, overwriting the remote version if specified.
If no theme is specified, then you're prompted to select the theme to overwrite from the list of the themes in your store.
You can run this command only in a directory that matches the [default Shopify theme folder structure](https://shopify.dev/docs/themes/tools/cli#directory-structure).
This command returns the following information:
- A link to the [editor](https://shopify.dev/docs/themes/tools/online-editor) for the theme in the Shopify admin.
- A [preview link](https://help.shopify.com/manual/online-store/themes/adding-themes#share-a-theme-preview-with-others) that you can share with others.
If you use the \`--json\` flag, then theme information is returned in JSON format, which can be used as a machine-readable input for scripts or continuous integration.
Sample output:
\`\`\`json
{
"theme": {
"id": 108267175958,
"name": "MyTheme",
"role": "unpublished",
"shop": "mystore.myshopify.com",
"editor_url": "https://mystore.myshopify.com/admin/themes/108267175958/editor",
"preview_url": "https://mystore.myshopify.com/?preview_theme_id=108267175958"
}
}
\`\`\`
`}static{this.description=this.descriptionWithoutMarkdown()}static{this.flags={...s,...i,...h("upload"),...m,theme:e.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"}),development:e.Flags.boolean({char:"d",description:"Push theme files from your remote development theme.",env:"SHOPIFY_FLAG_DEVELOPMENT"}),"development-context":e.Flags.string({char:"c",description:"Unique identifier for a development theme context (e.g., PR number, branch name). Reuses an existing development theme with this context name, or creates one if none exists.",env:"SHOPIFY_FLAG_DEVELOPMENT_CONTEXT",dependsOn:["development"],exclusive:["theme"]}),live:e.Flags.boolean({char:"l",description:"Push theme files from your remote live theme.",env:"SHOPIFY_FLAG_LIVE"}),unpublished:e.Flags.boolean({char:"u",description:"Create a new unpublished theme and push to it.",env:"SHOPIFY_FLAG_UNPUBLISHED"}),nodelete:e.Flags.boolean({char:"n",description:"Prevent deleting remote files that don't exist locally.",env:"SHOPIFY_FLAG_NODELETE"}),"allow-live":e.Flags.boolean({char:"a",description:"Allow push to a live theme.",env:"SHOPIFY_FLAG_ALLOW_LIVE"}),publish:e.Flags.boolean({char:"p",description:"Publish as the live theme after uploading.",env:"SHOPIFY_FLAG_PUBLISH"}),force:e.Flags.boolean({hidden:!0,char:"f",description:"Proceed without confirmation, if current directory does not seem to be theme directory.",env:"SHOPIFY_FLAG_FORCE"}),strict:e.Flags.boolean({description:"Require theme check to pass without errors before pushing. Warnings are allowed.",env:"SHOPIFY_FLAG_STRICT_PUSH"}),listing:e.Flags.string({description:"The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.",env:"SHOPIFY_FLAG_LISTING"}),environment:i.environment}}static{this.multiEnvironmentsFlags=["store","password","path",["live","development","theme"]]}async command(t,p,d,y,c){o("theme-command:push"),await l({...t,allowLive:t["allow-live"],noColor:t["no-color"],developmentContext:t["development-context"]},p,d,c),o("theme-command:push")}};export{r as default};