@mintlify/cli 4.1.70 → 4.1.71

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.
@@ -0,0 +1,7 @@
1
+ import { createRequire as __mintCreateRequire } from 'node:module';
2
+ import { fileURLToPath as __mintFileURLToPath } from 'node:url';
3
+ import { dirname as __mintDirname } from 'node:path';
4
+ const require = __mintCreateRequire(import.meta.url);
5
+ const __filename = __mintFileURLToPath(import.meta.url);
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-CmFSyH9b.js";
@@ -0,0 +1,7 @@
1
+ import { createRequire as __mintCreateRequire } from 'node:module';
2
+ import { fileURLToPath as __mintFileURLToPath } from 'node:url';
3
+ import { dirname as __mintDirname } from 'node:path';
4
+ const require = __mintCreateRequire(import.meta.url);
5
+ const __filename = __mintFileURLToPath(import.meta.url);
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-D-zUiakl.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-DSgBwhUJ.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-IN7JizKN.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-CloDxufU.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-774ll-bJ.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-DA81Ozxv.js`);yield e(a.telemetry)}let[{dev:m,Logs:h},{render:g},{createElement:ee}]=yield Promise.all([import(`./dist-DK5MQX-L.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-DGRjpipy.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-DbB27X4T.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-fnUYdROY.js`);yield e(a.telemetry)}let[{dev:m,Logs:h},{render:g},{createElement:ee}]=yield Promise.all([import(`./dist-DZy8y-yD.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--4NS7F3V.js";
7
+ export{t as isMultiRepoDev,n as multiRepoOptions,r as runMultiRepoDev}from"./multi-repo-command-BghhOvrq.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*(){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 v(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,d=/* @__PURE__ */ new Set,f=[],h=[];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)),g,_;try{g=yield l(p),_=JSON.parse(yield c(u.join(p,`docs.json`),`utf8`))}catch(t){throw Error(`Cannot load ${e.repo} at ${p}. Select a folder containing docs.json. ${t instanceof Error?t.message:String(t)}`)}if(d.has(g))throw Error(`The same folder is configured more than once: ${p}`);if(typeof _!=`object`||!_||Array.isArray(_))throw Error(`Invalid docs.json in ${p}`);h.push(i(n(),t()).parse(_)),f.push(Object.assign(Object.assign({},e),{directory:p,mountPath:a})),o.add(e.repo.toLowerCase()),s.add(a),d.add(g)}let{composeConfig:g}=yield import(`./multi-repo-preview-774ll-bJ.js`);return g(f,h),{sources:f}})}const y=`
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-CMyjEKka.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-DbB27X4T.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
@@ -40,4 +40,4 @@ Examples:
40
40
  mint dev --multi-repo
41
41
  mint dev --multi-repo --setup
42
42
  mint dev --multi-repo --workspace ./${f} --non-interactive
43
- `;export{m as a,p as c,h as i,f as n,_ as o,g as r,v as s,y as t};
43
+ `;export{m as a,y as c,h as i,p as l,f as n,_ as o,g as r,v as s,b as t};