Lines 1-38javascript
1// Process global — must exist before bundle init
2if (!globalThis.process) { globalThis.process = {
3 env: { NO_COLOR: "1", FORCE_COLOR: "0", NODE_ENV: "production" },
4 cwd: function() { return "/"; },
6 argv: ["browser", "uip"],
7 stdout: { isTTY: false, write: function(d) { console.log(d); return true; }, columns: 80 },
8 stderr: { isTTY: false, write: function(d) { console.error(d); return true; }, columns: 80 },
9 stdin: { isTTY: true, setEncoding: function() {}, on: function() { return this; }, resume: function() { return this; }, pause: function() { return this; } },
12 versions: { node: "20.0.0" }
14var process = globalThis.process;
15var process2 = globalThis.process;
16var Sa=Object.create;var kt=Object.defineProperty;var Ca=Object.getOwnPropertyDescriptor;var ka=Object.getOwnPropertyNames;var Aa=Object.getPrototypeOf,Pa=Object.prototype.hasOwnProperty;var he=(n,e,t
18`,r(u,s+1))}};return r(e,0),t}parse(e){let t=0;function r(u){let d=++t,c=u.length===1?"dir":"file",[p,f,w]=u;return p=parseInt(p,8),f=f?parseInt(f):0,w=w?parseInt(w):Date.now(),new Map([[Z,{mode:p,type:c,size:f,mtimeMs:w,ino:d}]])}let i=e.trim().split(`
19`),s=this._makeRoot(),a=[{indent:-1,node:s},{indent:0,node:null}];for(let u of i){let c=u.match(/^\t*/)[0].length;u=u.slice(c);let[p,...f]=u.split(" "),w=r(f);if(c<=a[a.length-1].indent)for(;c<=a[a.length-1].indent;)a.pop();a.push({indent:c,node:w}),a[a.length-2].node.set(p,w)}return s}_lookup(e,t=!0){let r=this._root,i="/",s=ne.split(e);for(let a=0;a<s.length;++a){let u=s[a];if(r=r.get(u),!r)throw new qa(e);if(t||a<s.length-1){let d=r.get(Z);if(d.type==="symlink"){let c=ne.resolve(i,d.target);r=this._lookup(c)}i?i=ne.join(i,u):i=u}}return r}mkdir(e,{mode:t}){if(e==="/")throw new ti;let r=this ...
20`)}displayWidth(e){return Gi(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t==="[command]"?this.styleSubcommandText(t):t[0]==="["||t[0]==="<"
21`+" ".repeat(t+d)),a+u+" ".repeat(d)+f.replace(/\n/g,`
22${a}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let r=e.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,s=[];return r.forEach(a=>{let u=a.match(i);if(u===null){s.push("");return}let d=[u.shift()],c=this.displayWidth(d[0]);u.forEach(p=>{let f=this.displayWidth(p);if(c+f<=t){d.push(p),c+=f;return}s.push(d.join(""));let w=p.trimStart();d=[w],c=this.displayWidth(w)}),s.push(d.join(""))}),s.join(`
23`)}};function Gi(n){let e=/\x1b\[\d*(;\d*)*m/g;return n.replace(e,"")}Pn.Help=An;Pn.stripColor=Gi});var Ln=z(Nn=>{"use strict";var{InvalidArgumentError:Fl}=rt(),Rn=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let r=Ml(e);this.short=r.shortFlag,this.long=r.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden ...
24- a short flag is a single dash and a single character
25 - either use a single dash and a single character (for a short flag)
26 - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):r.test(a)?new Error(`${u}
27- too many short flags`):i.test(a)?new Error(`${u}
28- too many long flags`):new Error(`${u}
29- unrecognised flag format`)}if(e===void 0&&t===void 0)throw new Error(`option creation failed due to no flags found in '${n}'.`);return{shortFlag:e,longFlag:t}}Nn.Option=Rn;Nn.DualOptions=In});var Wi=z(Vi=>{
30(Did you mean one of ${r.join(", ")}?)`:r.length===1?`
31(Did you mean ${r[0]}?)`:""}Vi.suggestSimilar=$l});var Ji=z(Hn=>{"use strict";var Hl=(Ii(),Ve(Ri)).EventEmitter,Fn=(Nt(),Ve(Li)),Se=(Mi(),Ve(Fi)),Ft=(Ui(),Ve(Hi)),j=(qi(),Ve(ji)),{Argument:Ul,humanReadableArgName:jl}=It(),{CommanderError:Mn}=rt(),{Help:ql,stripColor:Gl}=On(),{Option:Yi,DualOptions:Bl}=Ln(),{suggestSimilar:zi}=Wi(),Dn=class n extends Hl{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[] ...
32- specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new Ul(e,t)}argument(e,t,r,i){let s=this.createArgument(e,t);return typeof r=="function"?s.default(i).argParser(r):s.default(r),this.addArgument(s),this}arguments(e){return e.trim().split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t?.variadic)throw new
33Expecting one of '${r.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!==
34- already used by option '${t.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let t=i=>[i.name()].concat(i.aliases()),r=t(e).find(i=>this._findCommand(i));if(r){let i=t(this._findCommand(r)).join("|"),s=t(e).join("|");throw new Error(`cannot add command '${s}' as already have command '${i}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),r=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(r,e.defaultValue===void 0?!0:e.defaultValue,"default")}el ...
35- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],
36 - if '${r}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
37 - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
38 - ${i}`;throw new Error(s)}_executeSubCommand(e,t){t=t.slice();let r=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function s(p,f
Long lines were clipped for display.