Comparing version 0.1.5 to 0.1.6
@@ -32,2 +32,1 @@ #!/usr/bin/env node | ||
`+Se(e,u.usageOpts)),new iu(r.message)}},au=(e,t,u)=>{let r=lu(e),D={},n,o,s=u.start;for(;s<t.length;){let i=t[s];if(n){if(hu(o,D,n,i))break;n=null,s++}else{if(u.help.includes(i)){console.log(Se(e,u.usageOpts));return}let c=cu(e,r,D,i);if(n=c.id,o=c.spec,s=s+~~(c.state<2),c.state)break}}return n&&T(`missing value for: --${n}`),{result:fu(e,D),index:s,rest:t.slice(s),done:s>=t.length}},lu=e=>Object.entries(e).reduce((t,[u,r])=>(r.alias&&(t[r.alias]=u),t),{}),cu=(e,t,u,r)=>{if(r[0]==="-"){let D;if(r[1]==="-"){if(r==="--")return{state:1};D=st(r.substring(2))}else D=t[r.substring(1)],!D&&T(`unknown option: ${r}`);let n=e[D];return!n&&T(D),n.flag&&(u[D]=!0,D=void 0,n.fn&&!n.fn("true"))?{state:1,spec:n}:{state:0,id:D,spec:n}}return{state:2}},hu=(e,t,u,r)=>(/^-[a-z]/i.test(r)&&T(`missing value for: --${u}`),e.multi?rt(t[u])?t[u].push(r):t[u]=[r]:t[u]=r,e.fn&&!e.fn(r)),fu=(e,t)=>{let u;for(let r in e)u=e[r],t[r]===void 0?u.default!==void 0?t[r]=u.default:u.optional===!1&&T(`missing arg: --${r}`):u.coerce&&Fu(u,t,r);return t},Fu=(e,t,u)=>{try{e.multi&&e.delim&&(t[u]=t[u].reduce((r,D)=>(r.push(...D.split(e.delim)),r),[])),t[u]=e.coerce(t[u])}catch(r){throw new Error(`arg --${u}: ${r.message}`)}};var Ut=zt(Pt(),1),er={accessToken:H({alias:"t",hint:"TOKEN",desc:"Mastodon Access Token"}),blocklist:H({alias:"b",hint:"PATH",desc:"Blocklist file path"}),config:H({alias:"c",hint:"PATH",desc:"Custom config file path"}),endpoint:H({alias:"e",hint:"URL",desc:"Mastodon server URL"}),reset:W({desc:"Reset config (cannot be used with other options)"}),save:W({desc:"Save config to default location"}),rejectMedia:W({desc:"Reject media from domains (works with `limit`, `noop`)"}),rejectReports:W({desc:"Reject reports from domains (works with `limit`, `noop`)"}),severity:H({alias:"s",hint:"LEVEL",desc:"Block severity level (silence, suspend, noop)"}),obfuscate:W({desc:"Obfuscate domains in public comment"}),privateComment:H({hint:"COMMENT",desc:"Private comment"}),publicComment:H({hint:"COMMENT",desc:"Public comment"}),nonInteractive:W({desc:"Disable interactive mode"})},rD=async()=>{let e=ft(er,process.argv);return Ut.default.debug(`Arguments: ${JSON.stringify(e==null?void 0:e.result,null,2)}`),e==null?void 0:e.result};export{rD as args}; | ||
//# sourceMappingURL=args.js.map |
{ | ||
"name": "mastodont", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
1089439
5
4571