@holdyourvoice/hyv 0.7.7 → 0.7.8
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/dist/index.js +1 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
1
2
|
"use strict";var ta=Object.create;var Ns=Object.defineProperty;var sa=Object.getOwnPropertyDescriptor;var ia=Object.getOwnPropertyNames;var na=Object.getPrototypeOf,ra=Object.prototype.hasOwnProperty;var bt=(n,e)=>()=>(n&&(e=n(n=0)),e);var A=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),on=(n,e)=>{for(var t in e)Ns(n,t,{get:e[t],enumerable:!0})},oa=(n,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ia(e))!ra.call(n,i)&&i!==t&&Ns(n,i,{get:()=>e[i],enumerable:!(s=sa(e,i))||s.enumerable});return n};var C=(n,e,t)=>(t=n!=null?ta(na(n)):{},oa(e||!n||!n.__esModule?Ns(t,"default",{value:n,enumerable:!0}):t,n));var vt=A(Hs=>{var zt=class extends Error{constructor(e,t,s){super(s),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},Ws=class extends zt{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Hs.CommanderError=zt;Hs.InvalidArgumentError=Ws});var Gt=A(qs=>{var{InvalidArgumentError:aa}=vt(),Vs=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,s)=>{if(!this.argChoices.includes(t))throw new aa(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,s):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function la(n){let e=n.name()+(n.variadic===!0?"...":"");return n.required?"<"+e+">":"["+e+"]"}qs.Argument=Vs;qs.humanReadableArgName=la});var Us=A(an=>{var{humanReadableArgName:ca}=Gt(),Bs=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){let t=e.commands.filter(i=>!i._hidden),s=e._getHelpCommand();return s&&!s._hidden&&t.push(s),this.sortSubcommands&&t.sort((i,r)=>i.name().localeCompare(r.name())),t}compareOptions(e,t){let s=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return s(e).localeCompare(s(t))}visibleOptions(e){let t=e.options.filter(i=>!i.hidden),s=e._getHelpOption();if(s&&!s.hidden){let i=s.short&&e._findOption(s.short),r=s.long&&e._findOption(s.long);!i&&!r?t.push(s):s.long&&!r?t.push(e.createOption(s.long,s.description)):s.short&&!i&&t.push(e.createOption(s.short,s.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let s=e.parent;s;s=s.parent){let i=s.options.filter(r=>!r.hidden);t.push(...i)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(s=>ca(s)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((s,i)=>Math.max(s,t.subcommandTerm(i).length),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((s,i)=>Math.max(s,t.optionTerm(i).length),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((s,i)=>Math.max(s,t.optionTerm(i).length),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((s,i)=>Math.max(s,t.argumentTerm(i).length),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let s="";for(let i=e.parent;i;i=i.parent)s=i.name()+" "+s;return s+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];return e.argChoices&&t.push(`choices: ${e.argChoices.map(s=>JSON.stringify(s)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(s=>JSON.stringify(s)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let s=`(${t.join(", ")})`;return e.description?`${e.description} ${s}`:s}return e.description}formatHelp(e,t){let s=t.padWidth(e,t),i=t.helpWidth||80,r=2,o=2;function a(g,p){if(p){let y=`${g.padEnd(s+o)}${p}`;return t.wrap(y,i-r,s+o)}return g}function l(g){return g.join(`
|
|
2
3
|
`).replace(/^/gm," ".repeat(r))}let c=[`Usage: ${t.commandUsage(e)}`,""],h=t.commandDescription(e);h.length>0&&(c=c.concat([t.wrap(h,i,0),""]));let u=t.visibleArguments(e).map(g=>a(t.argumentTerm(g),t.argumentDescription(g)));u.length>0&&(c=c.concat(["Arguments:",l(u),""]));let f=t.visibleOptions(e).map(g=>a(t.optionTerm(g),t.optionDescription(g)));if(f.length>0&&(c=c.concat(["Options:",l(f),""])),this.showGlobalOptions){let g=t.visibleGlobalOptions(e).map(p=>a(t.optionTerm(p),t.optionDescription(p)));g.length>0&&(c=c.concat(["Global Options:",l(g),""]))}let d=t.visibleCommands(e).map(g=>a(t.subcommandTerm(g),t.subcommandDescription(g)));return d.length>0&&(c=c.concat(["Commands:",l(d),""])),c.join(`
|
|
3
4
|
`)}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,s,i=40){let r=" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF",o=new RegExp(`[\\n][${r}]+`);if(e.match(o))return e;let a=t-s;if(a<i)return e;let l=e.slice(0,s),c=e.slice(s).replace(`\r
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holdyourvoice/hyv",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.8",
|
|
4
4
|
"description": "Hold Your Voice — voice gate layer for AI workflows",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"hyv": "dist/index.js"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
|
-
"build": "esbuild src/index.ts --bundle --platform=node --target=node20 --format=cjs --outfile=dist/index.js --minify --legal-comments=none",
|
|
12
|
-
"dev": "esbuild src/index.ts --bundle --platform=node --target=node20 --format=cjs --outfile=dist/index.js --watch",
|
|
11
|
+
"build": "esbuild src/index.ts --bundle --platform=node --target=node20 --format=cjs --outfile=dist/index.js --banner:js='#!/usr/bin/env node' --minify --legal-comments=none",
|
|
12
|
+
"dev": "esbuild src/index.ts --bundle --platform=node --target=node20 --format=cjs --outfile=dist/index.js --banner:js='#!/usr/bin/env node' --watch",
|
|
13
13
|
"postinstall": "node -e \"console.log('\\n make your ai agent sound exactly like you!\\n\\n to get started:\\n hyv init → sign in\\n hyv new my-voice → create your voice profile\\n\\n first month is just \\$1.\\n')\""
|
|
14
14
|
},
|
|
15
15
|
"keywords": [
|