jaz-clio 4.48.2 → 4.48.4
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.
- package/cli.mjs +0 -1
- package/package.json +1 -1
package/cli.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
#!/usr/bin/env node
|
|
3
2
|
import{createRequire}from"module";const require=createRequire(import.meta.url);
|
|
4
3
|
var PRe=Object.create;var A8=Object.defineProperty;var NRe=Object.getOwnPropertyDescriptor;var $Re=Object.getOwnPropertyNames;var qRe=Object.getPrototypeOf,LRe=Object.prototype.hasOwnProperty;var ee=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var L=(e,t)=>()=>(e&&(t=e(e=0)),t);var k=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Es=(e,t)=>{for(var r in t)A8(e,r,{get:t[r],enumerable:!0})},cee=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of $Re(t))!LRe.call(e,a)&&a!==r&&A8(e,a,{get:()=>t[a],enumerable:!(n=NRe(t,a))||n.enumerable});return e};var nn=(e,t,r)=>(r=e!=null?PRe(qRe(e)):{},cee(t||!e||!e.__esModule?A8(r,"default",{value:e,enumerable:!0}):r,e)),lee=e=>cee(A8({},"__esModule",{value:!0}),e);var mw=k(mR=>{var I8=class extends Error{constructor(t,r,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=t,this.nestedError=void 0}},fR=class extends I8{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};mR.CommanderError=I8;mR.InvalidArgumentError=fR});var T8=k(gR=>{var{InvalidArgumentError:zRe}=mw(),hR=class{constructor(t,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,t[0]){case"<":this.required=!0,this._name=t.slice(1,-1);break;case"[":this.required=!1,this._name=t.slice(1,-1);break;default:this.required=!0,this._name=t;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:r.concat(t)}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new zRe(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,n):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function BRe(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}gR.Argument=hR;gR.humanReadableArgName=BRe});var vR=k(uee=>{var{humanReadableArgName:MRe}=T8(),yR=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(t){let r=t.commands.filter(a=>!a._hidden),n=t._getHelpCommand();return n&&!n._hidden&&r.push(n),this.sortSubcommands&&r.sort((a,i)=>a.name().localeCompare(i.name())),r}compareOptions(t,r){let n=a=>a.short?a.short.replace(/^-/,""):a.long.replace(/^--/,"");return n(t).localeCompare(n(r))}visibleOptions(t){let r=t.options.filter(a=>!a.hidden),n=t._getHelpOption();if(n&&!n.hidden){let a=n.short&&t._findOption(n.short),i=n.long&&t._findOption(n.long);!a&&!i?r.push(n):n.long&&!i?r.push(t.createOption(n.long,n.description)):n.short&&!a&&r.push(t.createOption(n.short,n.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];let r=[];for(let n=t.parent;n;n=n.parent){let a=n.options.filter(i=>!i.hidden);r.push(...a)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(t){return t._argsDescription&&t.registeredArguments.forEach(r=>{r.description=r.description||t._argsDescription[r.name()]||""}),t.registeredArguments.find(r=>r.description)?t.registeredArguments:[]}subcommandTerm(t){let r=t.registeredArguments.map(n=>MRe(n)).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,r){return r.visibleCommands(t).reduce((n,a)=>Math.max(n,r.subcommandTerm(a).length),0)}longestOptionTermLength(t,r){return r.visibleOptions(t).reduce((n,a)=>Math.max(n,r.optionTerm(a).length),0)}longestGlobalOptionTermLength(t,r){return r.visibleGlobalOptions(t).reduce((n,a)=>Math.max(n,r.optionTerm(a).length),0)}longestArgumentTermLength(t,r){return r.visibleArguments(t).reduce((n,a)=>Math.max(n,r.argumentTerm(a).length),0)}commandUsage(t){let r=t._name;t._aliases[0]&&(r=r+"|"+t._aliases[0]);let n="";for(let a=t.parent;a;a=a.parent)n=a.name()+" "+n;return n+r+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){let r=[];return t.argChoices&&r.push(`choices: ${t.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),t.defaultValue!==void 0&&(t.required||t.optional||t.isBoolean()&&typeof t.defaultValue=="boolean")&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),t.presetArg!==void 0&&t.optional&&r.push(`preset: ${JSON.stringify(t.presetArg)}`),t.envVar!==void 0&&r.push(`env: ${t.envVar}`),r.length>0?`${t.description} (${r.join(", ")})`:t.description}argumentDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),t.defaultValue!==void 0&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),r.length>0){let n=`(${r.join(", ")})`;return t.description?`${t.description} ${n}`:n}return t.description}formatHelp(t,r){let n=r.padWidth(t,r),a=r.helpWidth||80,i=2,o=2;function s(m,h){if(h){let g=`${m.padEnd(n+o)}${h}`;return r.wrap(g,a-i,n+o)}return m}function c(m){return m.join(`
|
|
5
4
|
`).replace(/^/gm," ".repeat(i))}let l=[`Usage: ${r.commandUsage(t)}`,""],u=r.commandDescription(t);u.length>0&&(l=l.concat([r.wrap(u,a,0),""]));let p=r.visibleArguments(t).map(m=>s(r.argumentTerm(m),r.argumentDescription(m)));p.length>0&&(l=l.concat(["Arguments:",c(p),""]));let d=r.visibleOptions(t).map(m=>s(r.optionTerm(m),r.optionDescription(m)));if(d.length>0&&(l=l.concat(["Options:",c(d),""])),this.showGlobalOptions){let m=r.visibleGlobalOptions(t).map(h=>s(r.optionTerm(h),r.optionDescription(h)));m.length>0&&(l=l.concat(["Global Options:",c(m),""]))}let f=r.visibleCommands(t).map(m=>s(r.subcommandTerm(m),r.subcommandDescription(m)));return f.length>0&&(l=l.concat(["Commands:",c(f),""])),l.join(`
|