import{p,v as d}from"./chunk-PTIJDS6I.js";import{a as u}from"./chunk-QDYDB7DY.js";import{aa as P}from"./chunk-QPJQ67GU.js";import{b as l}from"./chunk-Q6LCSRIW.js";import{v as f}from"./chunk-E24W34C4.js";import{d as i}from"./chunk-ELIH6GCC.js";import{Ta as c,ma as h}from"./chunk-EYDNSYYE.js";import{f as r,n as m}from"./chunk-773TIA5M.js";import{e as w,g as n}from"./chunk-VKWPEFWQ.js";n();n();var g=w(P(),1),k=["assets/**","blocks/**","config/**","layout/**","listings/**/*","locales/**","sections/**","snippets/**","templates/**","templates/customers/**","release-notes.md","update_extension.json"].join("|");async function y(e){let t=await v(e),o=`${e}/${t}`,a=`${e}/(${k})`;await u({inputDirectory:e,outputZipPath:o,matchFilePattern:a}),f({body:["Your local theme was packaged in",{filePath:m(o)}]})}async function v(e){let t=r(e,"config/settings_schema.json");if(!await c(t))throw new i("Provide a config/settings_schema.json to package your theme.");let o=await j(t);if(o===void 0||o.theme_name===void 0)throw new i("Provide a theme_info.theme_name configuration in config/settings_schema.json.");return`${[o.theme_name,o.theme_version].filter(Boolean).join("-")}.zip`}async function j(e){let t=(0,g.parseJSON)(await h(e),null,!0);if(!t)throw new i("The file config/settings_schema.json contains an error. Please check if the file is valid JSON and includes the theme_info.theme_name configuration.");return t.find(o=>o.name==="theme_info")}var _,s=class extends d{async command(t){await y(t.path)}};_=s;s.summary="Package your theme into a .zip file, ready to upload to the Online Store.";s.descriptionWithMarkdown=`Packages your local theme files into a ZIP file that can be uploaded to Shopify.

  Only folders that match the [default Shopify theme folder structure](https://shopify.dev/docs/storefronts/themes/tools/cli#directory-structure) are included in the package.

  The package includes the \`listings\` directory if present (required for multi-preset themes per [Theme Store requirements](https://shopify.dev/docs/storefronts/themes/store/requirements#adding-presets-to-your-theme-zip-submission)).

  The ZIP file uses the name \`theme_name-theme_version.zip\`, based on parameters in your [settings_schema.json](https://shopify.dev/docs/storefronts/themes/architecture/config/settings-schema-json) file.`;s.description=_.descriptionWithoutMarkdown();s.flags={...l,path:p.path};s.multiEnvironmentsFlags=null;var E=s;export{E as a};
