UNPKG

@shopify/cli

Version:

A CLI tool to build for the Shopify platform

5 lines (4 loc) 957 B
import{b as f,e as c}from"./chunk-7ESSIN27.js";import{d as s}from"./chunk-M56NDIMD.js";import{$ as l,Ta as i,qa as m,wa as p}from"./chunk-N5PQPIBF.js";import{d as o}from"./chunk-IU2ZQ6TE.js";import{g as a}from"./chunk-VPRTJUIN.js";a();async function v(t,r){let n=t?.path??"",e=o(r,n);if(!await i(e))throw new s(` The extension is not available for ${t?.value}`);return e}async function P({name:t,app:r}){let n=l(t),e=o(r.directory,c.extensions.directoryName,n);if(await i(e))throw new s(` A directory with this name (${n}) already exists. Choose a new name for your extension.`);return await p(e),await m(o(e,f.lockFile)),e}async function b({localApp:t,developerPlatformClient:r,apiKey:n,organizationId:e}){let{dashboardManagedExtensionRegistrations:h}=(await r.appExtensionRegistrations({id:n,apiKey:n,organizationId:e})).app;return h.length>0||t.allExtensions.filter(x=>x.isThemeExtension).length>0||t.allExtensions.length>0}export{v as a,P as b,b as c};