UNPKG

@shopify/cli

Version:

A CLI tool to build for the Shopify platform

2 lines (1 loc) 792 B
import{c as u,d as t,l as h}from"./chunk-M56NDIMD.js";import{g as i}from"./chunk-VPRTJUIN.js";i();var o=e=>new a(e),s=e=>new n(e),a=class{constructor(r){this.value=r}isErr(){return!1}doOnOk(r){return r(this.value),o(this.value)}valueOrBug(){return this.value}valueOrAbort(){return this.value}map(r){return o(r(this.value))}mapError(r){return o(this.value)}},n=class{constructor(r){this.error=r}isErr(){return!0}doOnOk(r){return s(this.error)}valueOrBug(){throw this.error}valueOrAbort(){if(this.error instanceof u)throw this.error;if(this.error instanceof h.ExtendableError||this.error instanceof Error){let r=new t(this.error.message);throw r.stack=this.error.stack,r}else throw new t(`${this.error}`)}map(r){return s(this.error)}mapError(r){return s(r(this.error))}};export{o as a,s as b};