@mintlify/cli 4.1.74 → 4.1.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,4 +4,4 @@ import { dirname as __mintDirname } from 'node:path';
4
4
  const require = __mintCreateRequire(import.meta.url);
5
5
  const __filename = __mintFileURLToPath(import.meta.url);
6
6
  const __dirname = __mintDirname(__filename);
7
- export{zn as CircularRefError,W as ConfigUpdater,G as DocsConfigUpdater,K as MintConfigUpdater,Bn as PathTraversalError,Vn as RefInvalidJsonError,Hn as RefNotFoundError,ut as StrictModeError,B as assertNoGeneratedRouteCollisions,o as buildOverlayRegistryForDirectory,Y as categorizeFilePaths,X as categorizeMdxFiles,N as composeSdkFrontmatterPage,i as createPage,s as discoverOverlayFiles,f as docsConfigToRss,q as findInvalidSpecFile,Q as formatError,j as generateAsyncApiDivisions,M as generateAsyncApiFromDocsConfig,ct as generateDecoratedDocsNavigationFromPages,lt as generateDecoratedMintNavigationFromPages,st as generateDocsConfig,T as generateGraphqlDivisions,E as generateGraphqlDivisionsFromDocsConfig,v as generateOpenApiAnchorOrTab,y as generateOpenApiAnchorsOrTabs,S as generateOpenApiDivisions,C as generateOpenApiFromDocsConfig,P as generateSdkDivisionsFromDocsConfig,et as getConfigObj,tt as getConfigPath,x as getCustomLanguages,$ as getErrorPosition,p as getFaviconsConfig,nt as getFileExtension,pt as getFileList,mt as getFileListSync,ht as getFileListWithDirectories,V as getGeneratedRouteKey,D as getGraphqlRouteKey,rt as getMintIgnore,it as getMintIgnorePath,a as getOpenApiFiles,w as getOpenApiFilesFromConfig,dt as getWarnings,O as isRemoteGraphqlSource,gt as isSdkFrontmatterValue,Z as listContentFiles,k as loadGraphqlSdlSource,z as loadRemoteGraphqlSdl,F as loadSdkReferenceSource,t as mdxToRssUpdates,I as navigationHasSdkConfig,d as pageToRss,u as pathToRss,n as prebuild,h as preparseMdx,g as preparseMdxTree,r as readExplicitOverlayConfig,at as resolveFileRefs,Un as resolveRefs,ft as setWarningsSilent,c as update,b as updateDocsConfigFile,_ as updateMintConfigFile,J as warnInvalidSpecFiles,A as writeGraphqlArtifacts,l as writeMdxFilesWithNoImports,L as writeSdkArtifacts,R as writeSdkFrontmatterPages}from"./dist-BA3H54nL.js";
7
+ export{zn as CircularRefError,W as ConfigUpdater,G as DocsConfigUpdater,K as MintConfigUpdater,Bn as PathTraversalError,Vn as RefInvalidJsonError,Hn as RefNotFoundError,ut as StrictModeError,B as assertNoGeneratedRouteCollisions,o as buildOverlayRegistryForDirectory,Y as categorizeFilePaths,X as categorizeMdxFiles,N as composeSdkFrontmatterPage,i as createPage,s as discoverOverlayFiles,f as docsConfigToRss,q as findInvalidSpecFile,Q as formatError,j as generateAsyncApiDivisions,M as generateAsyncApiFromDocsConfig,ct as generateDecoratedDocsNavigationFromPages,lt as generateDecoratedMintNavigationFromPages,st as generateDocsConfig,T as generateGraphqlDivisions,E as generateGraphqlDivisionsFromDocsConfig,v as generateOpenApiAnchorOrTab,y as generateOpenApiAnchorsOrTabs,S as generateOpenApiDivisions,C as generateOpenApiFromDocsConfig,P as generateSdkDivisionsFromDocsConfig,et as getConfigObj,tt as getConfigPath,x as getCustomLanguages,$ as getErrorPosition,p as getFaviconsConfig,nt as getFileExtension,pt as getFileList,mt as getFileListSync,ht as getFileListWithDirectories,V as getGeneratedRouteKey,D as getGraphqlRouteKey,rt as getMintIgnore,it as getMintIgnorePath,a as getOpenApiFiles,w as getOpenApiFilesFromConfig,dt as getWarnings,O as isRemoteGraphqlSource,gt as isSdkFrontmatterValue,Z as listContentFiles,k as loadGraphqlSdlSource,z as loadRemoteGraphqlSdl,F as loadSdkReferenceSource,t as mdxToRssUpdates,I as navigationHasSdkConfig,d as pageToRss,u as pathToRss,n as prebuild,h as preparseMdx,g as preparseMdxTree,r as readExplicitOverlayConfig,at as resolveFileRefs,Un as resolveRefs,ft as setWarningsSilent,c as update,b as updateDocsConfigFile,_ as updateMintConfigFile,J as warnInvalidSpecFiles,A as writeGraphqlArtifacts,l as writeMdxFilesWithNoImports,L as writeSdkArtifacts,R as writeSdkFrontmatterPages}from"./dist-BZO00XVw.js";
@@ -4,4 +4,4 @@ import { dirname as __mintDirname } from 'node:path';
4
4
  const require = __mintCreateRequire(import.meta.url);
5
5
  const __filename = __mintFileURLToPath(import.meta.url);
6
6
  const __dirname = __mintDirname(__filename);
7
- export{k as AddedLog,A as BrokenLinksLog,j as DeletedLog,M as EditedLog,N as EmptyLineLog,P as ErrorLog,F as InfoLog,Q as LOCAL_LINKED_CLI_VERSION,I as LaunchLog,L as LinksToLog,R as Logs,o as PackageIslandCollector,z as RenamedLog,B as SearchDisabledLog,V as SpinnerLog,H as SuccessLog,U as UpdateLog,W as WarningLog,h as addChangeLog,g as addErrorLog,_ as addLog,v as addLogs,y as addRawErrorLog,u as checkBuild,b as clearErrorLogs,x as clearLogs,s as collectPackageIslands,t as dev,d as downloadTargetMint,l as exportSite,m as getClientVersion,S as getCurrentErrorLogs,f as getLatestClientVersion,p as getVersionMap,i as normalizeProviderPath,a as readPackagesSetup,C as removeErrorLogs,w as removeLastLog,T as removeLog,E as removeSpinnerLogs,D as replaceLog,c as resolvePageContent,O as setLoggingCallbacks}from"./dist-DgyavKdR.js";
7
+ export{k as AddedLog,A as BrokenLinksLog,j as DeletedLog,M as EditedLog,N as EmptyLineLog,P as ErrorLog,F as InfoLog,Q as LOCAL_LINKED_CLI_VERSION,I as LaunchLog,L as LinksToLog,R as Logs,o as PackageIslandCollector,z as RenamedLog,B as SearchDisabledLog,V as SpinnerLog,H as SuccessLog,U as UpdateLog,W as WarningLog,h as addChangeLog,g as addErrorLog,_ as addLog,v as addLogs,y as addRawErrorLog,u as checkBuild,b as clearErrorLogs,x as clearLogs,s as collectPackageIslands,t as dev,d as downloadTargetMint,l as exportSite,m as getClientVersion,S as getCurrentErrorLogs,f as getLatestClientVersion,p as getVersionMap,i as normalizeProviderPath,a as readPackagesSetup,C as removeErrorLogs,w as removeLastLog,T as removeLog,E as removeSpinnerLogs,D as replaceLog,c as resolvePageContent,O as setLoggingCallbacks}from"./dist-DFkRL36G.js";
@@ -4,7 +4,7 @@ import { dirname as __mintDirname } from 'node:path';
4
4
  const require = __mintCreateRequire(import.meta.url);
5
5
  const __filename = __mintFileURLToPath(import.meta.url);
6
6
  const __dirname = __mintDirname(__filename);
7
- import{a as e,i as t,n,o as r,r as i,t as a}from"./rolldown-runtime-CEAe2Uac.js";import{$t as o,A as s,An as c,At as l,Bt as u,Ct as d,Dn as f,Dt as p,E as m,En as h,Et as g,G as _,Gn as v,Gt as y,H as b,Ht as x,In as S,It as C,J as w,Jt as T,K as E,Kn as D,Lt as O,Mn as k,Mt as ee,O as A,Ot as te,Pn as j,Pt as M,Rt as N,S as P,Sn as ne,St as F,Tn as I,Tt as re,Ut as L,Vt as ie,Wt as ae,Xt as oe,Y as se,Yt as ce,Zt as le,_n as ue,_t as de,an as fe,at as pe,bn as me,bt as he,cn as ge,ct as _e,dn as ve,dt as ye,er as be,et as xe,fn as Se,ft as Ce,g as we,gn as Te,hn as Ee,i as De,in as Oe,j as ke,jt as Ae,k as je,kn as Me,kt as Ne,ln as Pe,lr as Fe,m as Ie,mn as Le,mt as Re,n as ze,nn as Be,nr as Ve,nt as He,on as Ue,ot as We,qn as Ge,qt as Ke,r as qe,rn as Je,rr as Ye,rt as Xe,s as Ze,sn as Qe,st as $e,tn as et,tt,un as nt,ut as rt,vn as it,vt as at,wn as ot,wt as st,x as ct,xn as lt,y as ut,yn as dt,yt as ft,zt as pt}from"./dist-BA3H54nL.js";import{t as mt}from"./react-CocJQ9gk.js";import{g as ht,h as R,m as gt}from"./build-Nkr-5oHQ.js";import{F as _t,I as vt,c as yt,dt as bt,it as xt,t as St,tt as Ct,w as wt}from"./utils-B7dNmFFf.js";import{n as Tt,r as Et,t as Dt}from"./remark-utils-heM5aat5.js";import{t as Ot}from"./watcher-CrrSXFeO.js";import z,{dirname as kt,extname as At,join as B,parse as jt,posix as Mt,sep as Nt}from"path";import V from"node:fs";import{spawn as Pt}from"child_process";import*as Ft from"url";import{fileURLToPath as It}from"url";import Lt,{createServer as Rt}from"http";import zt from"https";import Bt,*as Vt from"zlib";import{Buffer as Ht}from"buffer";import Ut,{EventEmitter as Wt,errorMonitor as Gt}from"events";import H,{existsSync as Kt,promises as qt,readFileSync as Jt,statSync as Yt}from"fs";import{types as Xt}from"util";import Zt from"os";import Qt,{createHash as $t}from"crypto";import{BlockList as en,isIP as tn}from"net";import nn,{Duplex as rn,PassThrough as an,Readable as on}from"node:stream";import sn from"node:process";import cn from"assert";import ln from"node:os";import un from"node:tty";import dn,{EventEmitter as fn}from"node:events";import{Buffer as pn}from"node:buffer";import mn from"node:fs/promises";import U,{basename as hn,join as gn,posix as _n,win32 as vn}from"node:path";import yn from"dns";import bn,{readFile as xn}from"fs/promises";import Sn,{pathToFileURL as Cn}from"node:url";import wn,{randomBytes as Tn,randomUUID as En}from"node:crypto";import Dn from"node:https";import On from"node:net";import kn,{ServerResponse as An}from"node:http";import{inspect as jn,promisify as Mn}from"node:util";import{checkServerIdentity as Nn}from"node:tls";import{ADDRCONFIG as Pn,ALL as Fn,V4MAPPED as In,lookup as Ln,promises as Rn}from"node:dns";import{pipeline as zn}from"node:stream/promises";import{StringDecoder as Bn}from"node:string_decoder";import Vn from"node:assert";import{pipeline as Hn}from"stream/promises";var Un=/* @__PURE__ */ a(((e,t)=>{var n=1e3,r=n*60,i=r*60,a=i*24,o=a*7,s=a*365.25;t.exports=function(e,t){t||={};var n=typeof e;if(n===`string`&&e.length>0)return c(e);if(n===`number`&&isFinite(e))return t.long?u(e):l(e);throw Error(`val is not a non-empty string or a valid number. val=`+JSON.stringify(e))};function c(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var c=parseFloat(t[1]);switch((t[2]||`ms`).toLowerCase()){case`years`:case`year`:case`yrs`:case`yr`:case`y`:return c*s;case`weeks`:case`week`:case`w`:return c*o;case`days`:case`day`:case`d`:return c*a;case`hours`:case`hour`:case`hrs`:case`hr`:case`h`:return c*i;case`minutes`:case`minute`:case`mins`:case`min`:case`m`:return c*r;case`seconds`:case`second`:case`secs`:case`sec`:case`s`:return c*n;case`milliseconds`:case`millisecond`:case`msecs`:case`msec`:case`ms`:return c;default:return}}}}function l(e){var t=Math.abs(e);return t>=a?Math.round(e/a)+`d`:t>=i?Math.round(e/i)+`h`:t>=r?Math.round(e/r)+`m`:t>=n?Math.round(e/n)+`s`:e+`ms`}function u(e){var t=Math.abs(e);return t>=a?d(e,t,a,`day`):t>=i?d(e,t,i,`hour`):t>=r?d(e,t,r,`minute`):t>=n?d(e,t,n,`second`):e+` ms`}function d(e,t,n,r){var i=t>=n*1.5;return Math.round(e/n)+` `+r+(i?`s`:``)}})),Wn=/* @__PURE__ */ a(((e,t)=>{function n(e){n.debug=n,n.default=n,n.coerce=c,n.disable=a,n.enable=i,n.enabled=o,n.humanize=Un(),n.destroy=l,Object.keys(e).forEach(t=>{n[t]=e[t]}),n.names=[],n.skips=[],n.formatters={};function t(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]}n.selectColor=t;function n(e){let t,i=null,a,o;function s(...e){if(!s.enabled)return;let r=s,i=Number(/* @__PURE__ */ new Date);r.diff=i-(t||i),r.prev=t,r.curr=i,t=i,e[0]=n.coerce(e[0]),typeof e[0]!=`string`&&e.unshift(`%O`);let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,i)=>{if(t===`%%`)return`%`;a++;let o=n.formatters[i];if(typeof o==`function`){let n=e[a];t=o.call(r,n),e.splice(a,1),a--}return t}),n.formatArgs.call(r,e),(r.log||n.log).apply(r,e)}return s.namespace=e,s.useColors=n.useColors(),s.color=n.selectColor(e),s.extend=r,s.destroy=n.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>i===null?(a!==n.namespaces&&(a=n.namespaces,o=n.enabled(e)),o):i,set:e=>{i=e}}),typeof n.init==`function`&&n.init(s),s}function r(e,t){let r=n(this.namespace+(t===void 0?`:`:t)+e);return r.log=this.log,r}function i(e){n.save(e),n.namespaces=e,n.names=[],n.skips=[];let t,r=(typeof e==`string`?e:``).split(/[\s,]+/),i=r.length;for(t=0;t<i;t++)r[t]&&(e=r[t].replace(/\*/g,`.*?`),e[0]===`-`?n.skips.push(RegExp(`^`+e.slice(1)+`$`)):n.names.push(RegExp(`^`+e+`$`)))}function a(){let e=[...n.names.map(s),...n.skips.map(s).map(e=>`-`+e)].join(`,`);return n.enable(``),e}function o(e){if(e[e.length-1]===`*`)return!0;let t,r;for(t=0,r=n.skips.length;t<r;t++)if(n.skips[t].test(e))return!1;for(t=0,r=n.names.length;t<r;t++)if(n.names[t].test(e))return!0;return!1}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,`*`)}function c(e){return e instanceof Error?e.stack||e.message:e}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}t.exports=n})),Gn=/* @__PURE__ */ a(((e,t)=>{e.formatArgs=r,e.save=i,e.load=a,e.useColors=n,e.storage=o(),e.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=/* @__PURE__ */ `#0000CC.#0000FF.#0033CC.#0033FF.#0066CC.#0066FF.#0099CC.#0099FF.#00CC00.#00CC33.#00CC66.#00CC99.#00CCCC.#00CCFF.#3300CC.#3300FF.#3333CC.#3333FF.#3366CC.#3366FF.#3399CC.#3399FF.#33CC00.#33CC33.#33CC66.#33CC99.#33CCCC.#33CCFF.#6600CC.#6600FF.#6633CC.#6633FF.#66CC00.#66CC33.#9900CC.#9900FF.#9933CC.#9933FF.#99CC00.#99CC33.#CC0000.#CC0033.#CC0066.#CC0099.#CC00CC.#CC00FF.#CC3300.#CC3333.#CC3366.#CC3399.#CC33CC.#CC33FF.#CC6600.#CC6633.#CC9900.#CC9933.#CCCC00.#CCCC33.#FF0000.#FF0033.#FF0066.#FF0099.#FF00CC.#FF00FF.#FF3300.#FF3333.#FF3366.#FF3399.#FF33CC.#FF33FF.#FF6600.#FF6633.#FF9900.#FF9933.#FFCC00.#FFCC33`.split(`.`);function n(){return typeof window<`u`&&window.process&&(window.process.type===`renderer`||window.process.__nwjs)?!0:typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<`u`&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<`u`&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(e){if(e[0]=(this.useColors?`%c`:``)+this.namespace+(this.useColors?` %c`:` `)+e[0]+(this.useColors?`%c `:` `)+`+`+t.exports.humanize(this.diff),!this.useColors)return;let n=`color: `+this.color;e.splice(1,0,n,`color: inherit`);let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,e=>{e!==`%%`&&(r++,e===`%c`&&(i=r))}),e.splice(i,0,n)}e.log=console.debug||console.log||(()=>{});function i(t){try{t?e.storage.setItem(`debug`,t):e.storage.removeItem(`debug`)}catch{}}function a(){let t;try{t=e.storage.getItem(`debug`)}catch{}return!t&&typeof process<`u`&&`env`in process&&(t=process.env.DEBUG),t}function o(){try{return localStorage}catch{}}t.exports=Wn()(e);let{formatters:s}=t.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return`[UnexpectedJSONParseError]: `+e.message}}})),Kn=/* @__PURE__ */ a(((e,t)=>{t.exports=(e,t=process.argv)=>{let n=e.startsWith(`-`)?``:e.length===1?`-`:`--`,r=t.indexOf(n+e),i=t.indexOf(`--`);return r!==-1&&(i===-1||r<i)}})),qn=/* @__PURE__ */ a(((e,n)=>{let r=t(`os`),i=t(`tty`),a=Kn(),{env:o}=process,s;a(`no-color`)||a(`no-colors`)||a(`color=false`)||a(`color=never`)?s=0:(a(`color`)||a(`colors`)||a(`color=true`)||a(`color=always`))&&(s=1),`FORCE_COLOR`in o&&(s=o.FORCE_COLOR===`true`?1:o.FORCE_COLOR===`false`?0:o.FORCE_COLOR.length===0?1:Math.min(parseInt(o.FORCE_COLOR,10),3));function c(e){return e!==0&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function l(e,t){if(s===0)return 0;if(a(`color=16m`)||a(`color=full`)||a(`color=truecolor`))return 3;if(a(`color=256`))return 2;if(e&&!t&&s===void 0)return 0;let n=s||0;if(o.TERM===`dumb`)return n;if(process.platform===`win32`){let e=r.release().split(`.`);return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if(`CI`in o)return[`TRAVIS`,`CIRCLECI`,`APPVEYOR`,`GITLAB_CI`,`GITHUB_ACTIONS`,`BUILDKITE`].some(e=>e in o)||o.CI_NAME===`codeship`?1:n;if(`TEAMCITY_VERSION`in o)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION);if(o.COLORTERM===`truecolor`)return 3;if(`TERM_PROGRAM`in o){let e=parseInt((o.TERM_PROGRAM_VERSION||``).split(`.`)[0],10);switch(o.TERM_PROGRAM){case`iTerm.app`:return e>=3?3:2;case`Apple_Terminal`:return 2}}return/-256(color)?$/i.test(o.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)||`COLORTERM`in o?1:n}function u(e){return c(l(e,e&&e.isTTY))}n.exports={supportsColor:u,stdout:c(l(!0,i.isatty(1))),stderr:c(l(!0,i.isatty(2)))}})),Jn=/* @__PURE__ */ a(((e,n)=>{let r=t(`tty`),i=t(`util`);e.init=d,e.log=c,e.formatArgs=o,e.save=l,e.load=u,e.useColors=a,e.destroy=i.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),e.colors=[6,2,3,4,5,1];try{let t=qn();t&&(t.stderr||t).level>=2&&(e.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}e.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),r=process.env[t];return r=/^(yes|on|true|enabled)$/i.test(r)?!0:/^(no|off|false|disabled)$/i.test(r)?!1:r===`null`?null:Number(r),e[n]=r,e},{});function a(){return`colors`in e.inspectOpts?!!e.inspectOpts.colors:r.isatty(process.stderr.fd)}function o(e){let{namespace:t,useColors:r}=this;if(r){let r=this.color,i=`\x1B[3`+(r<8?r:`8;5;`+r),a=` ${i};1m${t} \u001B[0m`;e[0]=a+e[0].split(`
7
+ import{a as e,i as t,n,o as r,r as i,t as a}from"./rolldown-runtime-CEAe2Uac.js";import{$t as o,A as s,An as c,At as l,Bt as u,Ct as d,Dn as f,Dt as p,E as m,En as h,Et as g,G as _,Gn as v,Gt as y,H as b,Ht as x,In as S,It as C,J as w,Jt as T,K as E,Kn as D,Lt as O,Mn as k,Mt as ee,O as A,Ot as te,Pn as j,Pt as M,Rt as N,S as P,Sn as ne,St as F,Tn as I,Tt as re,Ut as L,Vt as ie,Wt as ae,Xt as oe,Y as se,Yt as ce,Zt as le,_n as ue,_t as de,an as fe,at as pe,bn as me,bt as he,cn as ge,ct as _e,dn as ve,dt as ye,er as be,et as xe,fn as Se,ft as Ce,g as we,gn as Te,hn as Ee,i as De,in as Oe,j as ke,jt as Ae,k as je,kn as Me,kt as Ne,ln as Pe,lr as Fe,m as Ie,mn as Le,mt as Re,n as ze,nn as Be,nr as Ve,nt as He,on as Ue,ot as We,qn as Ge,qt as Ke,r as qe,rn as Je,rr as Ye,rt as Xe,s as Ze,sn as Qe,st as $e,tn as et,tt,un as nt,ut as rt,vn as it,vt as at,wn as ot,wt as st,x as ct,xn as lt,y as ut,yn as dt,yt as ft,zt as pt}from"./dist-BZO00XVw.js";import{t as mt}from"./react-CocJQ9gk.js";import{g as ht,h as R,m as gt}from"./build-Nkr-5oHQ.js";import{F as _t,I as vt,c as yt,dt as bt,it as xt,t as St,tt as Ct,w as wt}from"./utils-D9fHH3a7.js";import{n as Tt,r as Et,t as Dt}from"./remark-utils-snuBUKxh.js";import{t as Ot}from"./watcher-CrrSXFeO.js";import z,{dirname as kt,extname as At,join as B,parse as jt,posix as Mt,sep as Nt}from"path";import V from"node:fs";import{spawn as Pt}from"child_process";import*as Ft from"url";import{fileURLToPath as It}from"url";import Lt,{createServer as Rt}from"http";import zt from"https";import Bt,*as Vt from"zlib";import{Buffer as Ht}from"buffer";import Ut,{EventEmitter as Wt,errorMonitor as Gt}from"events";import H,{existsSync as Kt,promises as qt,readFileSync as Jt,statSync as Yt}from"fs";import{types as Xt}from"util";import Zt from"os";import Qt,{createHash as $t}from"crypto";import{BlockList as en,isIP as tn}from"net";import nn,{Duplex as rn,PassThrough as an,Readable as on}from"node:stream";import sn from"node:process";import cn from"assert";import ln from"node:os";import un from"node:tty";import dn,{EventEmitter as fn}from"node:events";import{Buffer as pn}from"node:buffer";import mn from"node:fs/promises";import U,{basename as hn,join as gn,posix as _n,win32 as vn}from"node:path";import yn from"dns";import bn,{readFile as xn}from"fs/promises";import Sn,{pathToFileURL as Cn}from"node:url";import wn,{randomBytes as Tn,randomUUID as En}from"node:crypto";import Dn from"node:https";import On from"node:net";import kn,{ServerResponse as An}from"node:http";import{inspect as jn,promisify as Mn}from"node:util";import{checkServerIdentity as Nn}from"node:tls";import{ADDRCONFIG as Pn,ALL as Fn,V4MAPPED as In,lookup as Ln,promises as Rn}from"node:dns";import{pipeline as zn}from"node:stream/promises";import{StringDecoder as Bn}from"node:string_decoder";import Vn from"node:assert";import{pipeline as Hn}from"stream/promises";var Un=/* @__PURE__ */ a(((e,t)=>{var n=1e3,r=n*60,i=r*60,a=i*24,o=a*7,s=a*365.25;t.exports=function(e,t){t||={};var n=typeof e;if(n===`string`&&e.length>0)return c(e);if(n===`number`&&isFinite(e))return t.long?u(e):l(e);throw Error(`val is not a non-empty string or a valid number. val=`+JSON.stringify(e))};function c(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var c=parseFloat(t[1]);switch((t[2]||`ms`).toLowerCase()){case`years`:case`year`:case`yrs`:case`yr`:case`y`:return c*s;case`weeks`:case`week`:case`w`:return c*o;case`days`:case`day`:case`d`:return c*a;case`hours`:case`hour`:case`hrs`:case`hr`:case`h`:return c*i;case`minutes`:case`minute`:case`mins`:case`min`:case`m`:return c*r;case`seconds`:case`second`:case`secs`:case`sec`:case`s`:return c*n;case`milliseconds`:case`millisecond`:case`msecs`:case`msec`:case`ms`:return c;default:return}}}}function l(e){var t=Math.abs(e);return t>=a?Math.round(e/a)+`d`:t>=i?Math.round(e/i)+`h`:t>=r?Math.round(e/r)+`m`:t>=n?Math.round(e/n)+`s`:e+`ms`}function u(e){var t=Math.abs(e);return t>=a?d(e,t,a,`day`):t>=i?d(e,t,i,`hour`):t>=r?d(e,t,r,`minute`):t>=n?d(e,t,n,`second`):e+` ms`}function d(e,t,n,r){var i=t>=n*1.5;return Math.round(e/n)+` `+r+(i?`s`:``)}})),Wn=/* @__PURE__ */ a(((e,t)=>{function n(e){n.debug=n,n.default=n,n.coerce=c,n.disable=a,n.enable=i,n.enabled=o,n.humanize=Un(),n.destroy=l,Object.keys(e).forEach(t=>{n[t]=e[t]}),n.names=[],n.skips=[],n.formatters={};function t(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]}n.selectColor=t;function n(e){let t,i=null,a,o;function s(...e){if(!s.enabled)return;let r=s,i=Number(/* @__PURE__ */ new Date);r.diff=i-(t||i),r.prev=t,r.curr=i,t=i,e[0]=n.coerce(e[0]),typeof e[0]!=`string`&&e.unshift(`%O`);let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,i)=>{if(t===`%%`)return`%`;a++;let o=n.formatters[i];if(typeof o==`function`){let n=e[a];t=o.call(r,n),e.splice(a,1),a--}return t}),n.formatArgs.call(r,e),(r.log||n.log).apply(r,e)}return s.namespace=e,s.useColors=n.useColors(),s.color=n.selectColor(e),s.extend=r,s.destroy=n.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>i===null?(a!==n.namespaces&&(a=n.namespaces,o=n.enabled(e)),o):i,set:e=>{i=e}}),typeof n.init==`function`&&n.init(s),s}function r(e,t){let r=n(this.namespace+(t===void 0?`:`:t)+e);return r.log=this.log,r}function i(e){n.save(e),n.namespaces=e,n.names=[],n.skips=[];let t,r=(typeof e==`string`?e:``).split(/[\s,]+/),i=r.length;for(t=0;t<i;t++)r[t]&&(e=r[t].replace(/\*/g,`.*?`),e[0]===`-`?n.skips.push(RegExp(`^`+e.slice(1)+`$`)):n.names.push(RegExp(`^`+e+`$`)))}function a(){let e=[...n.names.map(s),...n.skips.map(s).map(e=>`-`+e)].join(`,`);return n.enable(``),e}function o(e){if(e[e.length-1]===`*`)return!0;let t,r;for(t=0,r=n.skips.length;t<r;t++)if(n.skips[t].test(e))return!1;for(t=0,r=n.names.length;t<r;t++)if(n.names[t].test(e))return!0;return!1}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,`*`)}function c(e){return e instanceof Error?e.stack||e.message:e}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}t.exports=n})),Gn=/* @__PURE__ */ a(((e,t)=>{e.formatArgs=r,e.save=i,e.load=a,e.useColors=n,e.storage=o(),e.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=/* @__PURE__ */ `#0000CC.#0000FF.#0033CC.#0033FF.#0066CC.#0066FF.#0099CC.#0099FF.#00CC00.#00CC33.#00CC66.#00CC99.#00CCCC.#00CCFF.#3300CC.#3300FF.#3333CC.#3333FF.#3366CC.#3366FF.#3399CC.#3399FF.#33CC00.#33CC33.#33CC66.#33CC99.#33CCCC.#33CCFF.#6600CC.#6600FF.#6633CC.#6633FF.#66CC00.#66CC33.#9900CC.#9900FF.#9933CC.#9933FF.#99CC00.#99CC33.#CC0000.#CC0033.#CC0066.#CC0099.#CC00CC.#CC00FF.#CC3300.#CC3333.#CC3366.#CC3399.#CC33CC.#CC33FF.#CC6600.#CC6633.#CC9900.#CC9933.#CCCC00.#CCCC33.#FF0000.#FF0033.#FF0066.#FF0099.#FF00CC.#FF00FF.#FF3300.#FF3333.#FF3366.#FF3399.#FF33CC.#FF33FF.#FF6600.#FF6633.#FF9900.#FF9933.#FFCC00.#FFCC33`.split(`.`);function n(){return typeof window<`u`&&window.process&&(window.process.type===`renderer`||window.process.__nwjs)?!0:typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<`u`&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<`u`&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(e){if(e[0]=(this.useColors?`%c`:``)+this.namespace+(this.useColors?` %c`:` `)+e[0]+(this.useColors?`%c `:` `)+`+`+t.exports.humanize(this.diff),!this.useColors)return;let n=`color: `+this.color;e.splice(1,0,n,`color: inherit`);let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,e=>{e!==`%%`&&(r++,e===`%c`&&(i=r))}),e.splice(i,0,n)}e.log=console.debug||console.log||(()=>{});function i(t){try{t?e.storage.setItem(`debug`,t):e.storage.removeItem(`debug`)}catch{}}function a(){let t;try{t=e.storage.getItem(`debug`)}catch{}return!t&&typeof process<`u`&&`env`in process&&(t=process.env.DEBUG),t}function o(){try{return localStorage}catch{}}t.exports=Wn()(e);let{formatters:s}=t.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return`[UnexpectedJSONParseError]: `+e.message}}})),Kn=/* @__PURE__ */ a(((e,t)=>{t.exports=(e,t=process.argv)=>{let n=e.startsWith(`-`)?``:e.length===1?`-`:`--`,r=t.indexOf(n+e),i=t.indexOf(`--`);return r!==-1&&(i===-1||r<i)}})),qn=/* @__PURE__ */ a(((e,n)=>{let r=t(`os`),i=t(`tty`),a=Kn(),{env:o}=process,s;a(`no-color`)||a(`no-colors`)||a(`color=false`)||a(`color=never`)?s=0:(a(`color`)||a(`colors`)||a(`color=true`)||a(`color=always`))&&(s=1),`FORCE_COLOR`in o&&(s=o.FORCE_COLOR===`true`?1:o.FORCE_COLOR===`false`?0:o.FORCE_COLOR.length===0?1:Math.min(parseInt(o.FORCE_COLOR,10),3));function c(e){return e!==0&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function l(e,t){if(s===0)return 0;if(a(`color=16m`)||a(`color=full`)||a(`color=truecolor`))return 3;if(a(`color=256`))return 2;if(e&&!t&&s===void 0)return 0;let n=s||0;if(o.TERM===`dumb`)return n;if(process.platform===`win32`){let e=r.release().split(`.`);return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if(`CI`in o)return[`TRAVIS`,`CIRCLECI`,`APPVEYOR`,`GITLAB_CI`,`GITHUB_ACTIONS`,`BUILDKITE`].some(e=>e in o)||o.CI_NAME===`codeship`?1:n;if(`TEAMCITY_VERSION`in o)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION);if(o.COLORTERM===`truecolor`)return 3;if(`TERM_PROGRAM`in o){let e=parseInt((o.TERM_PROGRAM_VERSION||``).split(`.`)[0],10);switch(o.TERM_PROGRAM){case`iTerm.app`:return e>=3?3:2;case`Apple_Terminal`:return 2}}return/-256(color)?$/i.test(o.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)||`COLORTERM`in o?1:n}function u(e){return c(l(e,e&&e.isTTY))}n.exports={supportsColor:u,stdout:c(l(!0,i.isatty(1))),stderr:c(l(!0,i.isatty(2)))}})),Jn=/* @__PURE__ */ a(((e,n)=>{let r=t(`tty`),i=t(`util`);e.init=d,e.log=c,e.formatArgs=o,e.save=l,e.load=u,e.useColors=a,e.destroy=i.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),e.colors=[6,2,3,4,5,1];try{let t=qn();t&&(t.stderr||t).level>=2&&(e.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}e.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),r=process.env[t];return r=/^(yes|on|true|enabled)$/i.test(r)?!0:/^(no|off|false|disabled)$/i.test(r)?!1:r===`null`?null:Number(r),e[n]=r,e},{});function a(){return`colors`in e.inspectOpts?!!e.inspectOpts.colors:r.isatty(process.stderr.fd)}function o(e){let{namespace:t,useColors:r}=this;if(r){let r=this.color,i=`\x1B[3`+(r<8?r:`8;5;`+r),a=` ${i};1m${t} \u001B[0m`;e[0]=a+e[0].split(`
8
8
  `).join(`
9
9
  `+a),e.push(i+`m+`+n.exports.humanize(this.diff)+`\x1B[0m`)}else e[0]=s()+t+` `+e[0]}function s(){return e.inspectOpts.hideDate?``:(/* @__PURE__ */ new Date()).toISOString()+` `}function c(...e){return process.stderr.write(i.format(...e)+`
10
10
  `)}function l(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function u(){return process.env.DEBUG}function d(t){t.inspectOpts={};let n=Object.keys(e.inspectOpts);for(let r=0;r<n.length;r++)t.inspectOpts[n[r]]=e.inspectOpts[n[r]]}n.exports=Wn()(e);let{formatters:f}=n.exports;f.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split(`
@@ -4,4 +4,4 @@ import { dirname as __mintDirname } from 'node:path';
4
4
  const require = __mintCreateRequire(import.meta.url);
5
5
  const __filename = __mintFileURLToPath(import.meta.url);
6
6
  const __dirname = __mintDirname(__filename);
7
- import{A as e,D as t,E as n,T as r,k as i,z as a}from"./utils-B7dNmFFf.js";const o={};function s(t){let n=this,r=t||o,s=n.data(),c=s.micromarkExtensions||=[],l=s.fromMarkdownExtensions||=[],u=s.toMarkdownExtensions||=[];c.push(a(r)),l.push(i()),u.push(e(r))}const c={};function l(e){let i=this,a=e||c,o=i.data(),s=o.micromarkExtensions||=[],l=o.fromMarkdownExtensions||=[],u=o.toMarkdownExtensions||=[];s.push(r(a)),l.push(n()),u.push(t(a))}export{s as n,l as t};
7
+ import{A as e,D as t,E as n,T as r,k as i,z as a}from"./utils-D9fHH3a7.js";const o={};function s(t){let n=this,r=t||o,s=n.data(),c=s.micromarkExtensions||=[],l=s.fromMarkdownExtensions||=[],u=s.toMarkdownExtensions||=[];c.push(a(r)),l.push(i()),u.push(e(r))}const c={};function l(e){let i=this,a=e||c,o=i.data(),s=o.micromarkExtensions||=[],l=o.fromMarkdownExtensions||=[],u=o.toMarkdownExtensions||=[];s.push(r(a)),l.push(n()),u.push(t(a))}export{s as n,l as t};
@@ -4,7 +4,7 @@ import { dirname as __mintDirname } from 'node:path';
4
4
  const require = __mintCreateRequire(import.meta.url);
5
5
  const __filename = __mintFileURLToPath(import.meta.url);
6
6
  const __dirname = __mintDirname(__filename);
7
- import{i as e,o as t}from"./rolldown-runtime-CEAe2Uac.js";import{t as n}from"./multi-repo-config-C9dwfzPC.js";import{basename as r,dirname as i,extname as a,normalize as o,relative as s,resolve as c}from"path";import{fileURLToPath as l}from"url";import{readFileSync as u,readdirSync as d,statSync as f,writeFile as p}from"fs";import{format as m,inspect as h}from"util";import{notStrictEqual as g,strictEqual as ee}from"assert";import _ from"node:os";import te from"node:path";const v={right:b,center:x};var ne=class{constructor(e){this.width=e.width,this.wrap=e.wrap??!0,this.rows=[]}span(...e){let t=this.div(...e);t.span=!0}resetOutput(){this.rows=[]}div(...e){if(e.length===0&&this.div(``),this.wrap&&this.shouldApplyLayoutDSL(...e)&&typeof e[0]==`string`)return this.applyLayoutDSL(e[0]);let t=e.map(e=>typeof e==`string`?this.colFromString(e):e);return this.rows.push(t),t}shouldApplyLayoutDSL(...e){return e.length===1&&typeof e[0]==`string`&&/[\t\n]/.test(e[0])}applyLayoutDSL(e){let t=e.split(`
7
+ import{i as e,o as t}from"./rolldown-runtime-CEAe2Uac.js";import{t as n}from"./multi-repo-config-B0iQPfHD.js";import{basename as r,dirname as i,extname as a,normalize as o,relative as s,resolve as c}from"path";import{fileURLToPath as l}from"url";import{readFileSync as u,readdirSync as d,statSync as f,writeFile as p}from"fs";import{format as m,inspect as h}from"util";import{notStrictEqual as g,strictEqual as ee}from"assert";import _ from"node:os";import te from"node:path";const v={right:b,center:x};var ne=class{constructor(e){this.width=e.width,this.wrap=e.wrap??!0,this.rows=[]}span(...e){let t=this.div(...e);t.span=!0}resetOutput(){this.rows=[]}div(...e){if(e.length===0&&this.div(``),this.wrap&&this.shouldApplyLayoutDSL(...e)&&typeof e[0]==`string`)return this.applyLayoutDSL(e[0]);let t=e.map(e=>typeof e==`string`?this.colFromString(e):e);return this.rows.push(t),t}shouldApplyLayoutDSL(...e){return e.length===1&&typeof e[0]==`string`&&/[\t\n]/.test(e[0])}applyLayoutDSL(e){let t=e.split(`
8
8
  `).map(e=>e.split(` `)),n=0;return t.forEach(e=>{e.length>1&&S.stringWidth(e[0])>n&&(n=Math.min(Math.floor(this.width*.5),S.stringWidth(e[0])))}),t.forEach(e=>{this.div(...e.map((t,r)=>({text:t.trim(),padding:this.measurePadding(t),width:r===0&&e.length>1?n:void 0})))}),this.rows[this.rows.length-1]}colFromString(e){return{text:e,padding:this.measurePadding(e)}}measurePadding(e){let t=S.stripAnsi(e);return[0,t.match(/\s*$/)[0].length,0,t.match(/^\s*/)[0].length]}toString(){let e=[];return this.rows.forEach(t=>{this.rowToString(t,e)}),e.filter(e=>!e.hidden).map(e=>e.text).join(`
9
9
  `)}rowToString(e,t){return this.rasterize(e).forEach((n,r)=>{let i=``;n.forEach((n,a)=>{let{width:o}=e[a],s=this.negatePadding(e[a]),c=n;if(s>S.stringWidth(n)&&(c+=` `.repeat(s-S.stringWidth(n))),e[a].align&&e[a].align!==`left`&&this.wrap){let t=v[e[a].align];c=t(c,s),S.stringWidth(c)<s&&(c+=` `.repeat((o||0)-S.stringWidth(c)-1))}let l=e[a].padding||[0,0,0,0];l[3]&&(i+=` `.repeat(l[3])),i+=re(e[a],c,`| `),i+=c,i+=re(e[a],c,` |`),l[1]&&(i+=` `.repeat(l[1])),r===0&&t.length>0&&(i=this.renderInline(i,t[t.length-1]))}),t.push({text:i.replace(/ +$/,``),span:e.span})}),t}renderInline(e,t){let n=e.match(/^ */),r=n?n[0].length:0,i=t.text,a=S.stringWidth(i.trimRight());return t.span?this.wrap?r<a?e:(t.hidden=!0,i.trimRight()+` `.repeat(r-a)+e.trimLeft()):(t.hidden=!0,i+e):e}rasterize(e){let t=[],n=this.columnWidths(e),r;return e.forEach((e,i)=>{e.width=n[i],r=this.wrap?S.wrap(e.text,this.negatePadding(e),{hard:!0}).split(`
10
10
  `):e.text.split(`
@@ -98,4 +98,4 @@ Please do one of the following:
98
98
  - Use a different option key
99
99
  https://yargs.js.org/docs/#api-reference-version`,void 0,`versionWarning`),F(this,K,`f`).key[e]=!0,t.alias&&this.alias(e,t.alias);let n=t.deprecate||t.deprecated;n&&this.deprecateOption(e,n);let r=t.demand||t.required||t.require;r&&this.demand(e,r),t.demandOption&&this.demandOption(e,typeof t.demandOption==`string`?t.demandOption:void 0),t.conflicts&&this.conflicts(e,t.conflicts),`default`in t&&this.default(e,t.default),t.implies!==void 0&&this.implies(e,t.implies),t.nargs!==void 0&&this.nargs(e,t.nargs),t.config&&this.config(e,t.configParser),t.normalize&&this.normalize(e),t.choices&&this.choices(e,t.choices),t.coerce&&this.coerce(e,t.coerce),t.group&&this.group(e,t.group),(t.boolean||t.type===`boolean`)&&(this.boolean(e),t.alias&&this.boolean(t.alias)),(t.array||t.type===`array`)&&(this.array(e),t.alias&&this.array(t.alias)),(t.number||t.type===`number`)&&(this.number(e),t.alias&&this.number(t.alias)),(t.string||t.type===`string`)&&(this.string(e),t.alias&&this.string(t.alias)),(t.count||t.type===`count`)&&this.count(e),typeof t.global==`boolean`&&this.global(e,t.global),t.defaultDescription&&(F(this,K,`f`).defaultDescription[e]=t.defaultDescription),t.skipValidation&&this.skipValidation(e);let i=t.describe||t.description||t.desc,a=F(this,X,`f`).getDescriptions();Object.prototype.hasOwnProperty.call(a,e)&&typeof i!=`string`||this.describe(e,i),t.hidden&&this.hide(e),t.requiresArg&&this.requiresArg(e)}return this}options(e,t){return this.option(e,t)}parse(e,t,n){N(`[string|array] [function|boolean|object] [function]`,[e,t,n],arguments.length),this[Wt](),e===void 0&&(e=F(this,J,`f`)),typeof t==`object`&&(P(this,jt,t,`f`),t=n),typeof t==`function`&&(P(this,q,t,`f`),t=!1),t||P(this,J,e,`f`),F(this,q,`f`)&&P(this,B,!1,`f`);let r=this[vn](e,!!t),i=this.parsed;return F(this,L,`f`).setParsed(this.parsed),M(r)?r.then(e=>(F(this,q,`f`)&&F(this,q,`f`).call(this,F(this,z,`f`),e,F(this,G,`f`)),e)).catch(e=>{throw F(this,q,`f`)&&F(this,q,`f`)(e,this.parsed.argv,F(this,G,`f`)),e}).finally(()=>{this[rn](),this.parsed=i}):(F(this,q,`f`)&&F(this,q,`f`).call(this,F(this,z,`f`),r,F(this,G,`f`)),this[rn](),this.parsed=i,r)}parseAsync(e,t,n){let r=this.parse(e,t,n);return M(r)?r:Promise.resolve(r)}parseSync(e,t,n){let r=this.parse(e,t,n);if(M(r))throw new A(`.parseSync() must not be used with asynchronous builders, handlers, or middleware`);return r}parserConfiguration(e){return N(`<object>`,[e],arguments.length),P(this,At,e,`f`),this}pkgConf(e,t){N(`<string> [string]`,[e,t],arguments.length);let n=null,r=this[Zt](t||F(this,xt,`f`));return r[e]&&typeof r[e]==`object`&&(n=_t(r[e],t||F(this,xt,`f`),this[Kt]()[`deep-merge-config`]||!1,F(this,Y,`f`)),F(this,K,`f`).configObjects=(F(this,K,`f`).configObjects||[]).concat(n)),this}positional(e,t){N(`<string> <object>`,[e,t],arguments.length);let n=[`default`,`defaultDescription`,`implies`,`normalize`,`choices`,`conflicts`,`coerce`,`type`,`describe`,`desc`,`description`,`alias`];t=et(t,(e,t)=>e===`type`&&![`string`,`number`,`boolean`].includes(t)?!1:n.includes(e));let r=F(this,St,`f`).fullCommands[F(this,St,`f`).fullCommands.length-1],i=r?F(this,I,`f`).cmdToParseOptions(r):{array:[],alias:{},default:{},demand:{}};return Fe(i).forEach(n=>{let r=i[n];Array.isArray(r)?r.indexOf(e)!==-1&&(t[n]=!0):r[e]&&!(n in t)&&(t[n]=r[e])}),this.group(e,F(this,X,`f`).getPositionalGroupName()),this.option(e,t)}recommendCommands(e=!0){return N(`[boolean]`,[e],arguments.length),P(this,Pt,e,`f`),this}required(e,t,n){return this.demand(e,t,n)}require(e,t,n){return this.demand(e,t,n)}requiresArg(e){return N(`<array|string|object> [number]`,[e],arguments.length),typeof e==`string`&&F(this,K,`f`).narg[e]||this[Qt](this.requiresArg.bind(this),`narg`,e,NaN),this}showCompletionScript(e,t){return N(`[string] [string]`,[e,t],arguments.length),e||=this.$0,F(this,Ot,`f`).log(F(this,L,`f`).generateCompletionScript(e,t||F(this,R,`f`)||`completion`)),this}showHelp(e){if(N(`[string|function]`,[e],arguments.length),P(this,U,!0,`f`),!F(this,X,`f`).hasCachedHelpMessage()){if(!this.parsed){let t=this[vn](F(this,J,`f`),void 0,void 0,0,!0);if(M(t))return t.then(()=>{F(this,X,`f`).showHelp(e)}),this}let t=F(this,I,`f`).runDefaultBuilderOn(this);if(M(t))return t.then(()=>{F(this,X,`f`).showHelp(e)}),this}return F(this,X,`f`).showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,t){return N(`[boolean|string] [string]`,[e,t],arguments.length),F(this,X,`f`).showHelpOnFail(e,t),this}showVersion(e){return N(`[string|function]`,[e],arguments.length),F(this,X,`f`).showVersion(e),this}skipValidation(e){return N(`<array|string>`,[e],arguments.length),this[$](`skipValidation`,e),this}strict(e){return N(`[boolean]`,[e],arguments.length),P(this,Ft,e!==!1,`f`),this}strictCommands(e){return N(`[boolean]`,[e],arguments.length),P(this,It,e!==!1,`f`),this}strictOptions(e){return N(`[boolean]`,[e],arguments.length),P(this,Lt,e!==!1,`f`),this}string(e){return N(`<array|string>`,[e],arguments.length),this[$](`string`,e),this[xn](e),this}terminalWidth(){return N([],0),F(this,Y,`f`).process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return N(`<object>`,[e],arguments.length),P(this,wt,!1,`f`),F(this,Y,`f`).y18n.updateLocale(e),this}usage(e,t,n,r){if(N(`<string|null|undefined> [string|boolean] [function|object] [function]`,[e,t,n,r],arguments.length),t!==void 0){if(j(e,null,F(this,Y,`f`)),(e||``).match(/^\$0( |$)/))return this.command(e,t,n,r);throw new A(`.usage() description must start with $0 if being used as alias for .command()`)}return F(this,X,`f`).usage(e),this}usageConfiguration(e){return N(`<object>`,[e],arguments.length),P(this,Rt,e,`f`),this}version(e,t,n){let r=`version`;if(N(`[boolean|string] [string] [string]`,[e,t,n],arguments.length),F(this,Z,`f`)&&(this[Ht](F(this,Z,`f`)),F(this,X,`f`).version(void 0),P(this,Z,null,`f`)),arguments.length===0)n=this[Yt](),e=r;else if(arguments.length===1){if(e===!1)return this;n=e,e=r}else arguments.length===2&&(n=t,t=void 0);return P(this,Z,typeof e==`string`?e:r,`f`),t||=F(this,X,`f`).deferY18nLookup(`Show version number`),F(this,X,`f`).version(n||void 0),this.boolean(F(this,Z,`f`)),this.describe(F(this,Z,`f`),t),this}wrap(e){return N(`<number|null|undefined>`,[e],arguments.length),F(this,X,`f`).wrap(e),this}[(I=/* @__PURE__ */ new WeakMap,xt=/* @__PURE__ */ new WeakMap,St=/* @__PURE__ */ new WeakMap,L=/* @__PURE__ */ new WeakMap,R=/* @__PURE__ */ new WeakMap,Ct=/* @__PURE__ */ new WeakMap,z=/* @__PURE__ */ new WeakMap,wt=/* @__PURE__ */ new WeakMap,Tt=/* @__PURE__ */ new WeakMap,B=/* @__PURE__ */ new WeakMap,Et=/* @__PURE__ */ new WeakMap,V=/* @__PURE__ */ new WeakMap,H=/* @__PURE__ */ new WeakMap,U=/* @__PURE__ */ new WeakMap,W=/* @__PURE__ */ new WeakMap,Dt=/* @__PURE__ */ new WeakMap,Ot=/* @__PURE__ */ new WeakMap,G=/* @__PURE__ */ new WeakMap,K=/* @__PURE__ */ new WeakMap,kt=/* @__PURE__ */ new WeakMap,At=/* @__PURE__ */ new WeakMap,q=/* @__PURE__ */ new WeakMap,jt=/* @__PURE__ */ new WeakMap,Mt=/* @__PURE__ */ new WeakMap,Nt=/* @__PURE__ */ new WeakMap,J=/* @__PURE__ */ new WeakMap,Pt=/* @__PURE__ */ new WeakMap,Y=/* @__PURE__ */ new WeakMap,Ft=/* @__PURE__ */ new WeakMap,It=/* @__PURE__ */ new WeakMap,Lt=/* @__PURE__ */ new WeakMap,X=/* @__PURE__ */ new WeakMap,Rt=/* @__PURE__ */ new WeakMap,Z=/* @__PURE__ */ new WeakMap,Q=/* @__PURE__ */ new WeakMap,Bt)](e){if(!e._||!e[`--`])return e;e._.push.apply(e._,e[`--`]);try{delete e[`--`]}catch{}return e}[Vt](){return{log:(...e)=>{this[pn]()||console.log(...e),P(this,U,!0,`f`),F(this,G,`f`).length&&P(this,G,F(this,G,`f`)+`
100
100
  `,`f`),P(this,G,F(this,G,`f`)+e.join(` `),`f`)},error:(...e)=>{this[pn]()||console.error(...e),P(this,U,!0,`f`),F(this,G,`f`).length&&P(this,G,F(this,G,`f`)+`
101
- `,`f`),P(this,G,F(this,G,`f`)+e.join(` `),`f`)}}}[Ht](e){Fe(F(this,K,`f`)).forEach(t=>{if((e=>e===`configObjects`)(t))return;let n=F(this,K,`f`)[t];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n==`object`&&delete n[e]}),delete F(this,X,`f`).getDescriptions()[e]}[Ut](e,t,n){F(this,Tt,`f`)[n]||(F(this,Y,`f`).process.emitWarning(e,t),F(this,Tt,`f`)[n]=!0)}[Wt](){F(this,Et,`f`).push({options:F(this,K,`f`),configObjects:F(this,K,`f`).configObjects.slice(0),exitProcess:F(this,B,`f`),groups:F(this,H,`f`),strict:F(this,Ft,`f`),strictCommands:F(this,It,`f`),strictOptions:F(this,Lt,`f`),completionCommand:F(this,R,`f`),output:F(this,G,`f`),exitError:F(this,z,`f`),hasOutput:F(this,U,`f`),parsed:this.parsed,parseFn:F(this,q,`f`),parseContext:F(this,jt,`f`)}),F(this,X,`f`).freeze(),F(this,Q,`f`).freeze(),F(this,I,`f`).freeze(),F(this,V,`f`).freeze()}[Gt](){let e=``,t;return t=/\b(node|iojs|electron)(\.exe)?$/.test(F(this,Y,`f`).process.argv()[0])?F(this,Y,`f`).process.argv().slice(1,2):F(this,Y,`f`).process.argv().slice(0,1),e=t.map(e=>{let t=this[gn](F(this,xt,`f`),e);return e.match(/^(\/|([a-zA-Z]:)?\\)/)&&t.length<e.length?t:e}).join(` `).trim(),F(this,Y,`f`).getEnv(`_`)&&F(this,Y,`f`).getProcessArgvBin()===F(this,Y,`f`).getEnv(`_`)&&(e=F(this,Y,`f`).getEnv(`_`).replace(`${F(this,Y,`f`).path.dirname(F(this,Y,`f`).process.execPath())}/`,``)),e}[Kt](){return F(this,At,`f`)}[qt](){return F(this,Rt,`f`)}[Jt](){if(!F(this,wt,`f`))return;let e=F(this,Y,`f`).getEnv(`LC_ALL`)||F(this,Y,`f`).getEnv(`LC_MESSAGES`)||F(this,Y,`f`).getEnv(`LANG`)||F(this,Y,`f`).getEnv(`LANGUAGE`)||`en_US`;this.locale(e.replace(/[.:].*/,``))}[Yt](){return this[Zt]().version||`unknown`}[Xt](e){let t=e[`--`]?e[`--`]:e._;for(let e=0,n;(n=t[e])!==void 0;e++)F(this,Y,`f`).Parser.looksLikeNumber(n)&&Number.isSafeInteger(Math.floor(parseFloat(`${n}`)))&&(t[e]=Number(n));return e}[Zt](e){let t=e||`*`;if(F(this,Mt,`f`)[t])return F(this,Mt,`f`)[t];let n={};try{let t=e||F(this,Y,`f`).mainFilename;!e&&F(this,Y,`f`).path.extname(t)&&(t=F(this,Y,`f`).path.dirname(t));let r=F(this,Y,`f`).findUp(t,(e,t)=>{if(t.includes(`package.json`))return`package.json`});j(r,void 0,F(this,Y,`f`)),n=JSON.parse(F(this,Y,`f`).readFileSync(r,`utf8`))}catch{}return F(this,Mt,`f`)[t]=n||{},F(this,Mt,`f`)[t]}[$](e,t){t=[].concat(t),t.forEach(t=>{t=this[tn](t),F(this,K,`f`)[e].push(t)})}[Qt](e,t,n,r){this[en](e,t,n,r,(e,t,n)=>{F(this,K,`f`)[e][t]=n})}[$t](e,t,n,r){this[en](e,t,n,r,(e,t,n)=>{F(this,K,`f`)[e][t]=(F(this,K,`f`)[e][t]||[]).concat(n)})}[en](e,t,n,r,i){if(Array.isArray(n))n.forEach(t=>{e(t,r)});else if((e=>typeof e==`object`)(n))for(let t of Fe(n))e(t,n[t]);else i(t,this[tn](n),r)}[tn](e){return e===`__proto__`?`___proto___`:e}[nn](e,t){return this[Qt](this[nn].bind(this),`key`,e,t),this}[rn](){var e,t,n,r,i,a,o,s,c,l,u,d;let f=F(this,Et,`f`).pop();j(f,void 0,F(this,Y,`f`));let p;e=this,t=this,n=this,r=this,i=this,a=this,o=this,s=this,c=this,l=this,u=this,d=this,{options:{set value(t){P(e,K,t,`f`)}}.value,configObjects:p,exitProcess:{set value(e){P(t,B,e,`f`)}}.value,groups:{set value(e){P(n,H,e,`f`)}}.value,output:{set value(e){P(r,G,e,`f`)}}.value,exitError:{set value(e){P(i,z,e,`f`)}}.value,hasOutput:{set value(e){P(a,U,e,`f`)}}.value,parsed:this.parsed,strict:{set value(e){P(o,Ft,e,`f`)}}.value,strictCommands:{set value(e){P(s,It,e,`f`)}}.value,strictOptions:{set value(e){P(c,Lt,e,`f`)}}.value,completionCommand:{set value(e){P(l,R,e,`f`)}}.value,parseFn:{set value(e){P(u,q,e,`f`)}}.value,parseContext:{set value(e){P(d,jt,e,`f`)}}.value}=f,F(this,K,`f`).configObjects=p,F(this,X,`f`).unfreeze(),F(this,Q,`f`).unfreeze(),F(this,I,`f`).unfreeze(),F(this,V,`f`).unfreeze()}[an](e,t){return Ue(t,t=>(e(t),t))}getInternalMethods(){return{getCommandInstance:this[on].bind(this),getContext:this[sn].bind(this),getHasOutput:this[cn].bind(this),getLoggerInstance:this[ln].bind(this),getParseContext:this[un].bind(this),getParserConfiguration:this[Kt].bind(this),getUsageConfiguration:this[qt].bind(this),getUsageInstance:this[dn].bind(this),getValidationInstance:this[fn].bind(this),hasParseCallback:this[pn].bind(this),isGlobalContext:this[mn].bind(this),postProcess:this[hn].bind(this),reset:this[_n].bind(this),runValidation:this[yn].bind(this),runYargsParserAndExecuteCommands:this[vn].bind(this),setHasOutput:this[bn].bind(this)}}[on](){return F(this,I,`f`)}[sn](){return F(this,St,`f`)}[cn](){return F(this,U,`f`)}[ln](){return F(this,Ot,`f`)}[un](){return F(this,jt,`f`)||{}}[dn](){return F(this,X,`f`)}[fn](){return F(this,Q,`f`)}[pn](){return!!F(this,q,`f`)}[mn](){return F(this,Dt,`f`)}[hn](e,t,n,r){return n||M(e)||(t||(e=this[Bt](e)),(this[Kt]()[`parse-positional-numbers`]||this[Kt]()[`parse-positional-numbers`]===void 0)&&(e=this[Xt](e)),r&&(e=He(e,this,F(this,V,`f`).getMiddleware(),!1))),e}[_n](e={}){P(this,K,F(this,K,`f`)||{},`f`);let t={};t.local=F(this,K,`f`).local||[],t.configObjects=F(this,K,`f`).configObjects||[];let n={};return t.local.forEach(t=>{n[t]=!0,(e[t]||[]).forEach(e=>{n[e]=!0})}),Object.assign(F(this,Nt,`f`),Object.keys(F(this,H,`f`)).reduce((e,t)=>{let r=F(this,H,`f`)[t].filter(e=>!(e in n));return r.length>0&&(e[t]=r),e},{})),P(this,H,{},`f`),[`array`,`boolean`,`string`,`skipValidation`,`count`,`normalize`,`number`,`hiddenOptions`].forEach(e=>{t[e]=(F(this,K,`f`)[e]||[]).filter(e=>!n[e])}),[`narg`,`key`,`alias`,`default`,`defaultDescription`,`config`,`choices`,`demandedOptions`,`demandedCommands`,`deprecatedOptions`].forEach(e=>{t[e]=et(F(this,K,`f`)[e],e=>!n[e])}),t.envPrefix=F(this,K,`f`).envPrefix,P(this,K,t,`f`),P(this,X,F(this,X,`f`)?F(this,X,`f`).reset(n):rt(this,F(this,Y,`f`)),`f`),P(this,Q,F(this,Q,`f`)?F(this,Q,`f`).reset(n):mt(this,F(this,X,`f`),F(this,Y,`f`)),`f`),P(this,I,F(this,I,`f`)?F(this,I,`f`).reset():Je(F(this,X,`f`),F(this,Q,`f`),F(this,V,`f`),F(this,Y,`f`)),`f`),F(this,L,`f`)||P(this,L,lt(this,F(this,X,`f`),F(this,I,`f`),F(this,Y,`f`)),`f`),F(this,V,`f`).reset(),P(this,R,null,`f`),P(this,G,``,`f`),P(this,z,null,`f`),P(this,U,!1,`f`),this.parsed=!1,this}[gn](e,t){return F(this,Y,`f`).path.relative(e,t)}[vn](e,t,n,r=0,i=!1){let a=!!n||i;e||=F(this,J,`f`),F(this,K,`f`).__=F(this,Y,`f`).y18n.__,F(this,K,`f`).configuration=this[Kt]();let o=!!F(this,K,`f`).configuration[`populate--`],s=Object.assign({},F(this,K,`f`).configuration,{"populate--":!0}),c=F(this,Y,`f`).Parser.detailed(e,Object.assign({},F(this,K,`f`),{configuration:{"parse-positional-numbers":!1,...s}})),l=Object.assign(c.argv,F(this,jt,`f`)),u,d=c.aliases,f=!1,p=!1;Object.keys(l).forEach(e=>{e===F(this,W,`f`)&&l[e]?f=!0:e===F(this,Z,`f`)&&l[e]&&(p=!0)}),l.$0=this.$0,this.parsed=c,r===0&&F(this,X,`f`).clearCachedHelpMessage();try{if(this[Jt](),t)return this[hn](l,o,!!n,!1);F(this,W,`f`)&&[F(this,W,`f`)].concat(d[F(this,W,`f`)]||[]).filter(e=>e.length>1).includes(``+l._[l._.length-1])&&(l._.pop(),f=!0),P(this,Dt,!1,`f`);let s=F(this,I,`f`).getCommands(),m=F(this,L,`f`).completionKey in l,h=f||m||i;if(l._.length){if(s.length){let e;for(let t=r||0,a;l._[t]!==void 0;t++){if(a=String(l._[t]),s.includes(a)&&a!==F(this,R,`f`)){let e=F(this,I,`f`).runCommand(a,this,c,t+1,i,f||p||i);return this[hn](e,o,!!n,!1)}if(!e&&a!==F(this,R,`f`)){e=a;break}}!F(this,I,`f`).hasDefaultCommand()&&F(this,Pt,`f`)&&e&&!h&&F(this,Q,`f`).recommendCommands(e,s)}F(this,R,`f`)&&l._.includes(F(this,R,`f`))&&!m&&(F(this,B,`f`)&&tt(!0),this.showCompletionScript(),this.exit(0))}if(F(this,I,`f`).hasDefaultCommand()&&!h){let e=F(this,I,`f`).runCommand(null,this,c,0,i,f||p||i);return this[hn](e,o,!!n,!1)}if(m){F(this,B,`f`)&&tt(!0),e=[].concat(e);let t=e.slice(e.indexOf(`--${F(this,L,`f`).completionKey}`)+1);return F(this,L,`f`).getCompletion(t,(e,t)=>{if(e)throw new A(e.message);(t||[]).forEach(e=>{F(this,Ot,`f`).log(e)}),this.exit(0)}),this[hn](l,!o,!!n,!1)}if(F(this,U,`f`)||(f?(F(this,B,`f`)&&tt(!0),a=!0,this.showHelp(`log`),this.exit(0)):p&&(F(this,B,`f`)&&tt(!0),a=!0,F(this,X,`f`).showVersion(`log`),this.exit(0))),!a&&F(this,K,`f`).skipValidation.length>0&&(a=Object.keys(l).some(e=>F(this,K,`f`).skipValidation.indexOf(e)>=0&&l[e]===!0)),!a){if(c.error)throw new A(c.error.message);if(!m){let e=this[yn](d,{},c.error);n||(u=He(l,this,F(this,V,`f`).getMiddleware(),!0)),u=this[an](e,u??l),M(u)&&!n&&(u=u.then(()=>He(l,this,F(this,V,`f`).getMiddleware(),!1)))}}}catch(e){if(e instanceof A)F(this,X,`f`).fail(e.message,e);else throw e}return this[hn](u??l,o,!!n,!0)}[yn](e,t,n,r){let i={...this.getDemandedOptions()};return a=>{if(n)throw new A(n.message);F(this,Q,`f`).nonOptionCount(a),F(this,Q,`f`).requiredArguments(a,i);let o=!1;F(this,It,`f`)&&(o=F(this,Q,`f`).unknownCommands(a)),F(this,Ft,`f`)&&!o?F(this,Q,`f`).unknownArguments(a,e,t,!!r):F(this,Lt,`f`)&&F(this,Q,`f`).unknownArguments(a,e,{},!1,!1),F(this,Q,`f`).limitedChoices(a),F(this,Q,`f`).implications(a),F(this,Q,`f`).conflicting(a)}}[bn](){P(this,U,!0,`f`)}[xn](e){if(typeof e==`string`)F(this,K,`f`).key[e]=!0;else for(let t of e)F(this,K,`f`).key[t]=!0}};function Cn(e){return!!e&&typeof e.getInternalMethods==`function`}const wn=zt(Ne);var Tn=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const En=e=>e.option(`multi-repo`,{type:`boolean`,description:`Compose local repositories; set up a workspace if no config exists`}).option(`workspace`,{type:`string`,requiresArg:!0,description:`Path to a local multi-repo config (implies --multi-repo)`}).option(`setup`,{type:`boolean`,description:`Review saved setup (requires --multi-repo or --workspace); preserve cache`}).option(`non-interactive`,{type:`boolean`,description:`Never prompt (requires --multi-repo or --workspace and a valid config)`}).wrap(null).epilog(n),Dn=(e,t)=>En(wn(e).scriptName(t).usage(`$0 dev --multi-repo [options]`)).option(`port`,{type:`number`,default:3e3,description:`Local preview port`}).option(`open`,{type:`boolean`,default:!1,description:`Open the preview in a browser`}).option(`client-version`,{type:`string`,hidden:!0}).option(`local-client-version`,{type:`string`,hidden:!0}).option(`local-schema`,{type:`boolean`,hidden:!0}).option(`classic`,{type:`boolean`,default:!1,description:`Preview with the classic client`}).option(`beta`,{type:`boolean`,default:!1,hidden:!0}).option(`groups`,{type:`array`,description:`Mock user groups`}).option(`signed-in`,{type:`boolean`,default:!1}).option(`disable-openapi`,{type:`boolean`,default:!1}).option(`disable-prefetch`,{type:`boolean`,default:!1}).option(`host`,{type:`boolean`,default:!1}).option(`telemetry`,{alias:`t`,type:`boolean`}).help().alias(`help`,`h`).exitProcess(!1).strictOptions().fail(e=>{throw Error(e)});function On(e){return Dn(e,`mint`).help(!1).version(!1).strictOptions(!1).parseSync()._[0]===`dev`}function kn(e,n,r,i){return Tn(this,void 0,void 0,function*(){let a=Dn(e,n).parseSync();if(a.help||a.version)return;if(a.workspace!==void 0&&!a.workspace.trim())throw Error(`--workspace requires a config path.`);if(!a[`multi-repo`]&&!a.workspace)throw Error(`Use --multi-repo with --setup or --non-interactive.`);if(!Number.isInteger(a.port)||a.port<1||a.port>65535)throw Error(`--port must be an integer from 1 to 65535.`);let{resolveWorkspace:o}=yield import(`./multi-repo-setup-CWCGybny.js`),s;console.log(`Checking multi-repo configuration…`);let c=yield o({cwd:process.cwd(),workspace:a.workspace,setup:a.setup,nonInteractive:a[`non-interactive`],onSaved:e=>{s=`Saved ${e}. Keep machine-specific paths out of Git; add the local config to .gitignore.`}}),{prepareMultiRepoPreview:l}=yield import(`./multi-repo-preview-DG84R2no.js`),u=performance.now(),d=0,f=yield l(c,!0,{compositionCacheDirectory:te.join(_.homedir(),`.mintlify`,`multi-repo-compositions`),onProgress:e=>{e.stage===`cold`&&console.log(`Preparing the workspace for the first time. Large repositories can take around two minutes; later runs reuse the saved workspace.`),e.stage===`cached`&&console.log(`Checking the saved workspace for changes…`),e.stage===`watching`&&console.log(`Starting repository watchers…`),e.stage===`files`&&performance.now()-d>=1e3&&(d=performance.now(),console.log(`Checked ${e.files.toLocaleString()} files…`))}});r(f.close);let p=f.getStats();console.log(`Workspace ready in ${((performance.now()-u)/1e3).toFixed(1)}s: ${p?.reusedFiles??0} files reused. Starting preview…`);for(let e of f.sources)console.log(` ${e.repo} → /${e.mountPath}`);if(process.chdir(f.directory),typeof a.telemetry==`boolean`){let{setTelemetryEnabled:e}=yield import(`./config-CXPSls8I.js`);yield e(a.telemetry)}let[{dev:m,Logs:h},{render:g},{createElement:ee}]=yield Promise.all([import(`./dist-CfnhJnLz.js`),import(`./build-DF0EjyfW.js`),import(`./react-CA8V--cT.js`).then(e=>/* @__PURE__ */ t(e.default,1))]);g(ee(h)),yield m(Object.assign(Object.assign({},a),{groups:a.groups??(a[`signed-in`]?[]:void 0),packageName:n,previewReadyMessage:s,onExit:i}))})}export{k as a,wn as i,En as n,kn as r,On as t};
101
+ `,`f`),P(this,G,F(this,G,`f`)+e.join(` `),`f`)}}}[Ht](e){Fe(F(this,K,`f`)).forEach(t=>{if((e=>e===`configObjects`)(t))return;let n=F(this,K,`f`)[t];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n==`object`&&delete n[e]}),delete F(this,X,`f`).getDescriptions()[e]}[Ut](e,t,n){F(this,Tt,`f`)[n]||(F(this,Y,`f`).process.emitWarning(e,t),F(this,Tt,`f`)[n]=!0)}[Wt](){F(this,Et,`f`).push({options:F(this,K,`f`),configObjects:F(this,K,`f`).configObjects.slice(0),exitProcess:F(this,B,`f`),groups:F(this,H,`f`),strict:F(this,Ft,`f`),strictCommands:F(this,It,`f`),strictOptions:F(this,Lt,`f`),completionCommand:F(this,R,`f`),output:F(this,G,`f`),exitError:F(this,z,`f`),hasOutput:F(this,U,`f`),parsed:this.parsed,parseFn:F(this,q,`f`),parseContext:F(this,jt,`f`)}),F(this,X,`f`).freeze(),F(this,Q,`f`).freeze(),F(this,I,`f`).freeze(),F(this,V,`f`).freeze()}[Gt](){let e=``,t;return t=/\b(node|iojs|electron)(\.exe)?$/.test(F(this,Y,`f`).process.argv()[0])?F(this,Y,`f`).process.argv().slice(1,2):F(this,Y,`f`).process.argv().slice(0,1),e=t.map(e=>{let t=this[gn](F(this,xt,`f`),e);return e.match(/^(\/|([a-zA-Z]:)?\\)/)&&t.length<e.length?t:e}).join(` `).trim(),F(this,Y,`f`).getEnv(`_`)&&F(this,Y,`f`).getProcessArgvBin()===F(this,Y,`f`).getEnv(`_`)&&(e=F(this,Y,`f`).getEnv(`_`).replace(`${F(this,Y,`f`).path.dirname(F(this,Y,`f`).process.execPath())}/`,``)),e}[Kt](){return F(this,At,`f`)}[qt](){return F(this,Rt,`f`)}[Jt](){if(!F(this,wt,`f`))return;let e=F(this,Y,`f`).getEnv(`LC_ALL`)||F(this,Y,`f`).getEnv(`LC_MESSAGES`)||F(this,Y,`f`).getEnv(`LANG`)||F(this,Y,`f`).getEnv(`LANGUAGE`)||`en_US`;this.locale(e.replace(/[.:].*/,``))}[Yt](){return this[Zt]().version||`unknown`}[Xt](e){let t=e[`--`]?e[`--`]:e._;for(let e=0,n;(n=t[e])!==void 0;e++)F(this,Y,`f`).Parser.looksLikeNumber(n)&&Number.isSafeInteger(Math.floor(parseFloat(`${n}`)))&&(t[e]=Number(n));return e}[Zt](e){let t=e||`*`;if(F(this,Mt,`f`)[t])return F(this,Mt,`f`)[t];let n={};try{let t=e||F(this,Y,`f`).mainFilename;!e&&F(this,Y,`f`).path.extname(t)&&(t=F(this,Y,`f`).path.dirname(t));let r=F(this,Y,`f`).findUp(t,(e,t)=>{if(t.includes(`package.json`))return`package.json`});j(r,void 0,F(this,Y,`f`)),n=JSON.parse(F(this,Y,`f`).readFileSync(r,`utf8`))}catch{}return F(this,Mt,`f`)[t]=n||{},F(this,Mt,`f`)[t]}[$](e,t){t=[].concat(t),t.forEach(t=>{t=this[tn](t),F(this,K,`f`)[e].push(t)})}[Qt](e,t,n,r){this[en](e,t,n,r,(e,t,n)=>{F(this,K,`f`)[e][t]=n})}[$t](e,t,n,r){this[en](e,t,n,r,(e,t,n)=>{F(this,K,`f`)[e][t]=(F(this,K,`f`)[e][t]||[]).concat(n)})}[en](e,t,n,r,i){if(Array.isArray(n))n.forEach(t=>{e(t,r)});else if((e=>typeof e==`object`)(n))for(let t of Fe(n))e(t,n[t]);else i(t,this[tn](n),r)}[tn](e){return e===`__proto__`?`___proto___`:e}[nn](e,t){return this[Qt](this[nn].bind(this),`key`,e,t),this}[rn](){var e,t,n,r,i,a,o,s,c,l,u,d;let f=F(this,Et,`f`).pop();j(f,void 0,F(this,Y,`f`));let p;e=this,t=this,n=this,r=this,i=this,a=this,o=this,s=this,c=this,l=this,u=this,d=this,{options:{set value(t){P(e,K,t,`f`)}}.value,configObjects:p,exitProcess:{set value(e){P(t,B,e,`f`)}}.value,groups:{set value(e){P(n,H,e,`f`)}}.value,output:{set value(e){P(r,G,e,`f`)}}.value,exitError:{set value(e){P(i,z,e,`f`)}}.value,hasOutput:{set value(e){P(a,U,e,`f`)}}.value,parsed:this.parsed,strict:{set value(e){P(o,Ft,e,`f`)}}.value,strictCommands:{set value(e){P(s,It,e,`f`)}}.value,strictOptions:{set value(e){P(c,Lt,e,`f`)}}.value,completionCommand:{set value(e){P(l,R,e,`f`)}}.value,parseFn:{set value(e){P(u,q,e,`f`)}}.value,parseContext:{set value(e){P(d,jt,e,`f`)}}.value}=f,F(this,K,`f`).configObjects=p,F(this,X,`f`).unfreeze(),F(this,Q,`f`).unfreeze(),F(this,I,`f`).unfreeze(),F(this,V,`f`).unfreeze()}[an](e,t){return Ue(t,t=>(e(t),t))}getInternalMethods(){return{getCommandInstance:this[on].bind(this),getContext:this[sn].bind(this),getHasOutput:this[cn].bind(this),getLoggerInstance:this[ln].bind(this),getParseContext:this[un].bind(this),getParserConfiguration:this[Kt].bind(this),getUsageConfiguration:this[qt].bind(this),getUsageInstance:this[dn].bind(this),getValidationInstance:this[fn].bind(this),hasParseCallback:this[pn].bind(this),isGlobalContext:this[mn].bind(this),postProcess:this[hn].bind(this),reset:this[_n].bind(this),runValidation:this[yn].bind(this),runYargsParserAndExecuteCommands:this[vn].bind(this),setHasOutput:this[bn].bind(this)}}[on](){return F(this,I,`f`)}[sn](){return F(this,St,`f`)}[cn](){return F(this,U,`f`)}[ln](){return F(this,Ot,`f`)}[un](){return F(this,jt,`f`)||{}}[dn](){return F(this,X,`f`)}[fn](){return F(this,Q,`f`)}[pn](){return!!F(this,q,`f`)}[mn](){return F(this,Dt,`f`)}[hn](e,t,n,r){return n||M(e)||(t||(e=this[Bt](e)),(this[Kt]()[`parse-positional-numbers`]||this[Kt]()[`parse-positional-numbers`]===void 0)&&(e=this[Xt](e)),r&&(e=He(e,this,F(this,V,`f`).getMiddleware(),!1))),e}[_n](e={}){P(this,K,F(this,K,`f`)||{},`f`);let t={};t.local=F(this,K,`f`).local||[],t.configObjects=F(this,K,`f`).configObjects||[];let n={};return t.local.forEach(t=>{n[t]=!0,(e[t]||[]).forEach(e=>{n[e]=!0})}),Object.assign(F(this,Nt,`f`),Object.keys(F(this,H,`f`)).reduce((e,t)=>{let r=F(this,H,`f`)[t].filter(e=>!(e in n));return r.length>0&&(e[t]=r),e},{})),P(this,H,{},`f`),[`array`,`boolean`,`string`,`skipValidation`,`count`,`normalize`,`number`,`hiddenOptions`].forEach(e=>{t[e]=(F(this,K,`f`)[e]||[]).filter(e=>!n[e])}),[`narg`,`key`,`alias`,`default`,`defaultDescription`,`config`,`choices`,`demandedOptions`,`demandedCommands`,`deprecatedOptions`].forEach(e=>{t[e]=et(F(this,K,`f`)[e],e=>!n[e])}),t.envPrefix=F(this,K,`f`).envPrefix,P(this,K,t,`f`),P(this,X,F(this,X,`f`)?F(this,X,`f`).reset(n):rt(this,F(this,Y,`f`)),`f`),P(this,Q,F(this,Q,`f`)?F(this,Q,`f`).reset(n):mt(this,F(this,X,`f`),F(this,Y,`f`)),`f`),P(this,I,F(this,I,`f`)?F(this,I,`f`).reset():Je(F(this,X,`f`),F(this,Q,`f`),F(this,V,`f`),F(this,Y,`f`)),`f`),F(this,L,`f`)||P(this,L,lt(this,F(this,X,`f`),F(this,I,`f`),F(this,Y,`f`)),`f`),F(this,V,`f`).reset(),P(this,R,null,`f`),P(this,G,``,`f`),P(this,z,null,`f`),P(this,U,!1,`f`),this.parsed=!1,this}[gn](e,t){return F(this,Y,`f`).path.relative(e,t)}[vn](e,t,n,r=0,i=!1){let a=!!n||i;e||=F(this,J,`f`),F(this,K,`f`).__=F(this,Y,`f`).y18n.__,F(this,K,`f`).configuration=this[Kt]();let o=!!F(this,K,`f`).configuration[`populate--`],s=Object.assign({},F(this,K,`f`).configuration,{"populate--":!0}),c=F(this,Y,`f`).Parser.detailed(e,Object.assign({},F(this,K,`f`),{configuration:{"parse-positional-numbers":!1,...s}})),l=Object.assign(c.argv,F(this,jt,`f`)),u,d=c.aliases,f=!1,p=!1;Object.keys(l).forEach(e=>{e===F(this,W,`f`)&&l[e]?f=!0:e===F(this,Z,`f`)&&l[e]&&(p=!0)}),l.$0=this.$0,this.parsed=c,r===0&&F(this,X,`f`).clearCachedHelpMessage();try{if(this[Jt](),t)return this[hn](l,o,!!n,!1);F(this,W,`f`)&&[F(this,W,`f`)].concat(d[F(this,W,`f`)]||[]).filter(e=>e.length>1).includes(``+l._[l._.length-1])&&(l._.pop(),f=!0),P(this,Dt,!1,`f`);let s=F(this,I,`f`).getCommands(),m=F(this,L,`f`).completionKey in l,h=f||m||i;if(l._.length){if(s.length){let e;for(let t=r||0,a;l._[t]!==void 0;t++){if(a=String(l._[t]),s.includes(a)&&a!==F(this,R,`f`)){let e=F(this,I,`f`).runCommand(a,this,c,t+1,i,f||p||i);return this[hn](e,o,!!n,!1)}if(!e&&a!==F(this,R,`f`)){e=a;break}}!F(this,I,`f`).hasDefaultCommand()&&F(this,Pt,`f`)&&e&&!h&&F(this,Q,`f`).recommendCommands(e,s)}F(this,R,`f`)&&l._.includes(F(this,R,`f`))&&!m&&(F(this,B,`f`)&&tt(!0),this.showCompletionScript(),this.exit(0))}if(F(this,I,`f`).hasDefaultCommand()&&!h){let e=F(this,I,`f`).runCommand(null,this,c,0,i,f||p||i);return this[hn](e,o,!!n,!1)}if(m){F(this,B,`f`)&&tt(!0),e=[].concat(e);let t=e.slice(e.indexOf(`--${F(this,L,`f`).completionKey}`)+1);return F(this,L,`f`).getCompletion(t,(e,t)=>{if(e)throw new A(e.message);(t||[]).forEach(e=>{F(this,Ot,`f`).log(e)}),this.exit(0)}),this[hn](l,!o,!!n,!1)}if(F(this,U,`f`)||(f?(F(this,B,`f`)&&tt(!0),a=!0,this.showHelp(`log`),this.exit(0)):p&&(F(this,B,`f`)&&tt(!0),a=!0,F(this,X,`f`).showVersion(`log`),this.exit(0))),!a&&F(this,K,`f`).skipValidation.length>0&&(a=Object.keys(l).some(e=>F(this,K,`f`).skipValidation.indexOf(e)>=0&&l[e]===!0)),!a){if(c.error)throw new A(c.error.message);if(!m){let e=this[yn](d,{},c.error);n||(u=He(l,this,F(this,V,`f`).getMiddleware(),!0)),u=this[an](e,u??l),M(u)&&!n&&(u=u.then(()=>He(l,this,F(this,V,`f`).getMiddleware(),!1)))}}}catch(e){if(e instanceof A)F(this,X,`f`).fail(e.message,e);else throw e}return this[hn](u??l,o,!!n,!0)}[yn](e,t,n,r){let i={...this.getDemandedOptions()};return a=>{if(n)throw new A(n.message);F(this,Q,`f`).nonOptionCount(a),F(this,Q,`f`).requiredArguments(a,i);let o=!1;F(this,It,`f`)&&(o=F(this,Q,`f`).unknownCommands(a)),F(this,Ft,`f`)&&!o?F(this,Q,`f`).unknownArguments(a,e,t,!!r):F(this,Lt,`f`)&&F(this,Q,`f`).unknownArguments(a,e,{},!1,!1),F(this,Q,`f`).limitedChoices(a),F(this,Q,`f`).implications(a),F(this,Q,`f`).conflicting(a)}}[bn](){P(this,U,!0,`f`)}[xn](e){if(typeof e==`string`)F(this,K,`f`).key[e]=!0;else for(let t of e)F(this,K,`f`).key[t]=!0}};function Cn(e){return!!e&&typeof e.getInternalMethods==`function`}const wn=zt(Ne);var Tn=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const En=e=>e.option(`multi-repo`,{type:`boolean`,description:`Compose local repositories; set up a workspace if no config exists`}).option(`workspace`,{type:`string`,requiresArg:!0,description:`Path to a local multi-repo config (implies --multi-repo)`}).option(`setup`,{type:`boolean`,description:`Review saved setup (requires --multi-repo or --workspace); preserve cache`}).option(`non-interactive`,{type:`boolean`,description:`Never prompt (requires --multi-repo or --workspace and a valid config)`}).wrap(null).epilog(n),Dn=(e,t)=>En(wn(e).scriptName(t).usage(`$0 dev --multi-repo [options]`)).option(`port`,{type:`number`,default:3e3,description:`Local preview port`}).option(`open`,{type:`boolean`,default:!1,description:`Open the preview in a browser`}).option(`client-version`,{type:`string`,hidden:!0}).option(`local-client-version`,{type:`string`,hidden:!0}).option(`local-schema`,{type:`boolean`,hidden:!0}).option(`classic`,{type:`boolean`,default:!1,description:`Preview with the classic client`}).option(`beta`,{type:`boolean`,default:!1,hidden:!0}).option(`groups`,{type:`array`,description:`Mock user groups`}).option(`signed-in`,{type:`boolean`,default:!1}).option(`disable-openapi`,{type:`boolean`,default:!1}).option(`disable-prefetch`,{type:`boolean`,default:!1}).option(`host`,{type:`boolean`,default:!1}).option(`telemetry`,{alias:`t`,type:`boolean`}).help().alias(`help`,`h`).exitProcess(!1).strictOptions().fail(e=>{throw Error(e)});function On(e){return Dn(e,`mint`).help(!1).version(!1).strictOptions(!1).parseSync()._[0]===`dev`}function kn(e,n,r,i){return Tn(this,void 0,void 0,function*(){let a=Dn(e,n).parseSync();if(a.help||a.version)return;if(a.workspace!==void 0&&!a.workspace.trim())throw Error(`--workspace requires a config path.`);if(!a[`multi-repo`]&&!a.workspace)throw Error(`Use --multi-repo with --setup or --non-interactive.`);if(!Number.isInteger(a.port)||a.port<1||a.port>65535)throw Error(`--port must be an integer from 1 to 65535.`);let{resolveWorkspace:o}=yield import(`./multi-repo-setup-D5E45UWW.js`),s;console.log(`Checking multi-repo configuration…`);let c=yield o({cwd:process.cwd(),workspace:a.workspace,setup:a.setup,nonInteractive:a[`non-interactive`],onSaved:e=>{s=`Saved ${e}. Keep machine-specific paths out of Git; add the local config to .gitignore.`}}),{prepareMultiRepoPreview:l}=yield import(`./multi-repo-preview-0rxIuj2v.js`),u=performance.now(),d=0,f=yield l(c,!0,{compositionCacheDirectory:te.join(_.homedir(),`.mintlify`,`multi-repo-compositions`),onProgress:e=>{e.stage===`cold`&&console.log(`Preparing the workspace for the first time. Large repositories can take around two minutes; later runs reuse the saved workspace.`),e.stage===`cached`&&console.log(`Checking the saved workspace for changes…`),e.stage===`watching`&&console.log(`Starting repository watchers…`),e.stage===`files`&&performance.now()-d>=1e3&&(d=performance.now(),console.log(`Checked ${e.files.toLocaleString()} files…`))}});r(f.close);let p=f.getStats();console.log(`Workspace ready in ${((performance.now()-u)/1e3).toFixed(1)}s: ${p?.reusedFiles??0} files reused. Starting preview…`);for(let e of f.sources)console.log(` ${e.repo} → /${e.mountPath}`);if(process.chdir(f.directory),typeof a.telemetry==`boolean`){let{setTelemetryEnabled:e}=yield import(`./config-iaxhCFoX.js`);yield e(a.telemetry)}let[{dev:m,Logs:h},{render:g},{createElement:ee}]=yield Promise.all([import(`./dist-CmtJuf91.js`),import(`./build-DF0EjyfW.js`),import(`./react-CA8V--cT.js`).then(e=>/* @__PURE__ */ t(e.default,1))]);g(ee(h)),yield m(Object.assign(Object.assign({},a),{groups:a.groups??(a[`signed-in`]?[]:void 0),packageName:n,previewReadyMessage:s,onExit:i}))})}export{k as a,wn as i,En as n,kn as r,On as t};
@@ -4,4 +4,4 @@ import { dirname as __mintDirname } from 'node:path';
4
4
  const require = __mintCreateRequire(import.meta.url);
5
5
  const __filename = __mintFileURLToPath(import.meta.url);
6
6
  const __dirname = __mintDirname(__filename);
7
- export{t as isMultiRepoDev,n as multiRepoOptions,r as runMultiRepoDev}from"./multi-repo-command-DvqhX76Z.js";
7
+ export{t as isMultiRepoDev,n as multiRepoOptions,r as runMultiRepoDev}from"./multi-repo-command-B1xakqrg.js";
@@ -4,7 +4,7 @@ import { dirname as __mintDirname } from 'node:path';
4
4
  const require = __mintCreateRequire(import.meta.url);
5
5
  const __filename = __mintFileURLToPath(import.meta.url);
6
6
  const __dirname = __mintDirname(__filename);
7
- import{f as e,g as t,m as n,o as r,p as i,s as a}from"./schemas-CVKidklE.js";import o from"node:os";import{access as s,readFile as c,realpath as l}from"node:fs/promises";import u from"node:path";var d=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const f=`.mint-workspace.local.json`,p=e({sources:r(e({repo:n().trim().min(1),directory:n().trim().min(1),mountPath:n(),base:a().optional()}).strict()).min(1)}).strict(),m=(e,t)=>u.resolve(t,e===`~`?o.homedir():e.startsWith(`~/`)?u.join(o.homedir(),e.slice(2)):e);function h(e){return d(this,void 0,void 0,function*(){try{return yield s(e),!0}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return!1;throw e}})}function g(e,t){return d(this,void 0,void 0,function*(){if(t)return m(t,e);let n=u.resolve(e);for(;;){let e=u.join(n,f);if(yield h(e))return e;if((yield h(u.join(n,`.git`)))||n===o.homedir()||u.dirname(n)===n)return;n=u.dirname(n)}})}function _(e){return d(this,void 0,void 0,function*(){let{resolveFileRefs:t}=yield import(`./dist-wJL5MmMs.js`),{resolved:n,referencedFiles:r}=yield t(JSON.parse(yield c(u.join(e,`docs.json`),`utf8`)),e);return{config:n,referencedFiles:r}})}function v(e){return d(this,void 0,void 0,function*(){try{return p.parse(JSON.parse(yield c(e,`utf8`)))}catch(t){throw Error(`Invalid workspace config ${e}: ${t instanceof Error?t.message:String(t)}. Run mint dev --multi-repo --setup --workspace "${e}" to review it.`)}})}function y(e,r){return d(this,void 0,void 0,function*(){let a=p.parse(e);if(a.sources.filter(e=>e.base).length!==1)throw Error(`Exactly one source must set base: true.`);let o=/* @__PURE__ */ new Set,s=/* @__PURE__ */ new Set,c=/* @__PURE__ */ new Set,d=[],f=[];for(let e of a.sources){let a=e.mountPath.replace(/^\/+|\/+$/g,``);if((/[\\?#]/.test(a)||a.split(`/`).some(e=>e===`.`||e===`..`||e===``))&&a!==``)throw Error(`Invalid mountPath for ${e.repo}: ${e.mountPath}`);if(e.base&&a)throw Error(`The base repository must use mountPath: "".`);if(o.has(e.repo.toLowerCase()))throw Error(`Duplicate repo: ${e.repo}`);if(s.has(a)||[...s].some(e=>e&&a&&(a.startsWith(e+`/`)||e.startsWith(a+`/`))))throw Error(`Conflicting mountPath: /${a}`);let p=m(e.directory,u.dirname(r)),h,g;try{h=yield l(p),g=(yield _(p)).config}catch(t){throw Error(`Cannot load ${e.repo} at ${p}. Select a folder containing docs.json. ${t instanceof Error?t.message:String(t)}`)}if(c.has(h))throw Error(`The same folder is configured more than once: ${p}`);if(typeof g!=`object`||!g||Array.isArray(g))throw Error(`Invalid docs.json in ${p}`);f.push(i(n(),t()).parse(g)),d.push(Object.assign(Object.assign({},e),{directory:p,mountPath:a})),o.add(e.repo.toLowerCase()),s.add(a),c.add(h)}let{composeConfig:h}=yield import(`./multi-repo-preview-DG84R2no.js`);return h(d,f),{sources:d}})}const b=`
7
+ import{f as e,g as t,m as n,o as r,p as i,s as a}from"./schemas-CVKidklE.js";import o from"node:os";import{access as s,readFile as c,realpath as l}from"node:fs/promises";import u from"node:path";var d=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const f=`.mint-workspace.local.json`,p=e({sources:r(e({repo:n().trim().min(1),directory:n().trim().min(1),mountPath:n(),base:a().optional()}).strict()).min(1)}).strict(),m=(e,t)=>u.resolve(t,e===`~`?o.homedir():e.startsWith(`~/`)?u.join(o.homedir(),e.slice(2)):e);function h(e){return d(this,void 0,void 0,function*(){try{return yield s(e),!0}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return!1;throw e}})}function g(e,t){return d(this,void 0,void 0,function*(){if(t)return m(t,e);let n=u.resolve(e);for(;;){let e=u.join(n,f);if(yield h(e))return e;if((yield h(u.join(n,`.git`)))||n===o.homedir()||u.dirname(n)===n)return;n=u.dirname(n)}})}function _(e){return d(this,void 0,void 0,function*(){let{resolveFileRefs:t}=yield import(`./dist-C6IwWwv9.js`),{resolved:n,referencedFiles:r}=yield t(JSON.parse(yield c(u.join(e,`docs.json`),`utf8`)),e);return{config:n,referencedFiles:r}})}function v(e){return d(this,void 0,void 0,function*(){try{return p.parse(JSON.parse(yield c(e,`utf8`)))}catch(t){throw Error(`Invalid workspace config ${e}: ${t instanceof Error?t.message:String(t)}. Run mint dev --multi-repo --setup --workspace "${e}" to review it.`)}})}function y(e,r){return d(this,void 0,void 0,function*(){let a=p.parse(e);if(a.sources.filter(e=>e.base).length!==1)throw Error(`Exactly one source must set base: true.`);let o=/* @__PURE__ */ new Set,s=/* @__PURE__ */ new Set,c=/* @__PURE__ */ new Set,d=[],f=[];for(let e of a.sources){let a=e.mountPath.replace(/^\/+|\/+$/g,``);if((/[\\?#]/.test(a)||a.split(`/`).some(e=>e===`.`||e===`..`||e===``))&&a!==``)throw Error(`Invalid mountPath for ${e.repo}: ${e.mountPath}`);if(e.base&&a)throw Error(`The base repository must use mountPath: "".`);if(o.has(e.repo.toLowerCase()))throw Error(`Duplicate repo: ${e.repo}`);if(s.has(a)||[...s].some(e=>e&&a&&(a.startsWith(e+`/`)||e.startsWith(a+`/`))))throw Error(`Conflicting mountPath: /${a}`);let p=m(e.directory,u.dirname(r)),h,g;try{h=yield l(p),g=(yield _(p)).config}catch(t){throw Error(`Cannot load ${e.repo} at ${p}. Select a folder containing docs.json. ${t instanceof Error?t.message:String(t)}`)}if(c.has(h))throw Error(`The same folder is configured more than once: ${p}`);if(typeof g!=`object`||!g||Array.isArray(g))throw Error(`Invalid docs.json in ${p}`);f.push(i(n(),t()).parse(g)),d.push(Object.assign(Object.assign({},e),{directory:p,mountPath:a})),o.add(e.repo.toLowerCase()),s.add(a),c.add(h)}let{composeConfig:h}=yield import(`./multi-repo-preview-0rxIuj2v.js`);return h(d,f),{sources:d}})}const b=`
8
8
  Multi-repo local configuration
9
9
 
10
10
  Default: ${f}. Search from the current directory upward, stopping