UNPKG

@shopify/cli

Version:

A CLI tool to build for the Shopify platform

2 lines (1 loc) 1.14 kB
import{c as d}from"./chunk-CBXSPL4W.js";import{xa as i}from"./chunk-XONFGLJQ.js";import{A as s,D as u,w as a,x as c}from"./chunk-6G6TMKXF.js";import{g as m}from"./chunk-VPRTJUIN.js";m();function f(e){return[`'${e.name}'`,{subdued:`(#${e.id})`}]}function y(e){return{list:{items:e.map(f)}}}async function b(e,r="It doesn't seem like you're running this command in a theme directory.",o,n){if(e)return!0;if(n)return c({headline:o?`Environment: ${o}`:"",body:r}),!1;if(a({body:r}),!process.stdout.isTTY)return!0;let t=await s({message:"Do you want to proceed?"});return i(`theme-service:confirm-directory:${t}`),t}async function g(e,r,o){if(e.role!==d||!process.stdout.isTTY||o)return!0;let n=`You're about to ${r} on your live theme "${e.name}". This will make changes visible to customers. Are you sure you want to proceed?`,t=await s({message:n,confirmationMessage:"Yes, proceed with live theme",cancellationMessage:"No, cancel"});return i(`theme-service:confirm-live-theme:${t}`),t}async function v(e,r,o=!1){e.length>0&&await u(e,{renderOptions:{stdout:r??process.stderr},noProgressBar:o})}export{f as a,y as b,b as c,g as d,v as e};