resend-cli 2.21.0 → 2.21.1

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/cli.cjs CHANGED
@@ -24,7 +24,7 @@ Expecting one of '${i.join("', '")}'`);return this._lifeCycleHooks[t]?this._life
24
24
  `),this.outputHelp({error:!0}));let i=o||{},r=i.exitCode||1,n=i.code||"commander.error";this._exit(r,n,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in J.env){let o=t.attributeName();(this.getOptionValue(o)===void 0||["default","config","env"].includes(this.getOptionValueSource(o)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,J.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new om(this.options),o=i=>this.getOptionValue(i)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(i));this.options.filter(i=>i.implied!==void 0&&o(i.attributeName())&&t.valueFromOption(this.getOptionValue(i.attributeName()),i)).forEach(i=>{Object.keys(i.implied).filter(r=>!o(r)).forEach(r=>{this.setOptionValueWithSource(r,i.implied[r],"implied")})})}missingArgument(t){let o=`error: missing required argument '${t}'`;this.error(o,{code:"commander.missingArgument"})}optionMissingArgument(t){let o=`error: option '${t.flags}' argument missing`;this.error(o,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){let o=`error: required option '${t.flags}' not specified`;this.error(o,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,o){let i=s=>{let a=s.attributeName(),l=this.getOptionValue(a),d=this.options.find(m=>m.negate&&a===m.attributeName()),c=this.options.find(m=>!m.negate&&a===m.attributeName());return d&&(d.presetArg===void 0&&l===!1||d.presetArg!==void 0&&l===d.presetArg)?d:c||s},r=s=>{let a=i(s),l=a.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},n=`error: ${r(t)} cannot be used with ${r(o)}`;this.error(n,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let o="";if(t.startsWith("--")&&this._showSuggestionAfterError){let r=[],n=this;do{let s=n.createHelp().visibleOptions(n).filter(a=>a.long).map(a=>a.long);r=r.concat(s),n=n.parent}while(n&&!n._enablePositionalOptions);o=Yr(t,r)}let i=`error: unknown option '${t}'${o}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;let o=this.registeredArguments.length,i=o===1?"":"s",n=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${o} argument${i} but got ${t.length}.`;this.error(n,{code:"commander.excessArguments"})}unknownCommand(){let t=this.args[0],o="";if(this._showSuggestionAfterError){let r=[];this.createHelp().visibleCommands(this).forEach(n=>{r.push(n.name()),n.alias()&&r.push(n.alias())}),o=Yr(t,r)}let i=`error: unknown command '${t}'${o}`;this.error(i,{code:"commander.unknownCommand"})}version(t,o,i){if(t===void 0)return this._version;this._version=t,o=o||"-V, --version",i=i||"output the version number";let r=this.createOption(o,i);return this._versionOptionName=r.attributeName(),this._registerOption(r),this.on("option:"+r.name(),()=>{this._outputConfiguration.writeOut(`${t}
25
25
  `),this._exit(0,"commander.version",t)}),this}description(t,o){return t===void 0&&o===void 0?this._description:(this._description=t,o&&(this._argsDescription=o),this)}summary(t){return t===void 0?this._summary:(this._summary=t,this)}alias(t){if(t===void 0)return this._aliases[0];let o=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(o=this.commands[this.commands.length-1]),t===o._name)throw new Error("Command alias can't be the same as its name");let i=this.parent?._findCommand(t);if(i){let r=[i.name()].concat(i.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${r}'`)}return o._aliases.push(t),this}aliases(t){return t===void 0?this._aliases:(t.forEach(o=>this.alias(o)),this)}usage(t){if(t===void 0){if(this._usage)return this._usage;let o=this.registeredArguments.map(i=>Zu(i));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?o:[]).join(" ")}return this._usage=t,this}name(t){return t===void 0?this._name:(this._name=t,this)}helpGroup(t){return t===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=t,this)}commandsGroup(t){return t===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=t,this)}optionsGroup(t){return t===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=t,this)}_initOptionGroup(t){this._defaultOptionGroup&&!t.helpGroupHeading&&t.helpGroup(this._defaultOptionGroup)}_initCommandGroup(t){this._defaultCommandGroup&&!t.helpGroup()&&t.helpGroup(this._defaultCommandGroup)}nameFromFilename(t){return this._name=et.basename(t,et.extname(t)),this}executableDir(t){return t===void 0?this._executableDir:(this._executableDir=t,this)}helpInformation(t){let o=this.createHelp(),i=this._getOutputContext(t);o.prepareContext({error:i.error,helpWidth:i.helpWidth,outputHasColors:i.hasColors});let r=o.formatHelp(this,o);return i.hasColors?r:this._outputConfiguration.stripColor(r)}_getOutputContext(t){t=t||{};let o=!!t.error,i,r,n;return o?(i=a=>this._outputConfiguration.writeErr(a),r=this._outputConfiguration.getErrHasColors(),n=this._outputConfiguration.getErrHelpWidth()):(i=a=>this._outputConfiguration.writeOut(a),r=this._outputConfiguration.getOutHasColors(),n=this._outputConfiguration.getOutHelpWidth()),{error:o,write:a=>(r||(a=this._outputConfiguration.stripColor(a)),i(a)),hasColors:r,helpWidth:n}}outputHelp(t){let o;typeof t=="function"&&(o=t,t=void 0);let i=this._getOutputContext(t),r={error:i.error,write:i.write,command:this};this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",r)),this.emit("beforeHelp",r);let n=this.helpInformation({error:i.error});if(o&&(n=o(n),typeof n!="string"&&!Buffer.isBuffer(n)))throw new Error("outputHelp callback must return a string or a Buffer");i.write(n),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",r),this._getCommandAndAncestors().forEach(s=>s.emit("afterAllHelp",r))}helpOption(t,o){return typeof t=="boolean"?(t?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(t??"-h, --help",o??"display help for command"),(t||o)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(t){return this._helpOption=t,this._initOptionGroup(t),this}help(t){this.outputHelp(t);let o=Number(J.exitCode??0);o===0&&t&&typeof t!="function"&&t.error&&(o=1),this._exit(o,"commander.help","(outputHelp)")}addHelpText(t,o){let i=["beforeAll","before","after","afterAll"];if(!i.includes(t))throw new Error(`Unexpected value for position to addHelpText.
26
26
  Expecting one of '${i.join("', '")}'`);let r=`${t}Help`;return this.on(r,n=>{let s;typeof o=="function"?s=o({error:n.error,command:n.command}):s=o,s&&n.write(`${s}
27
- `)}),this}_outputHelpIfRequested(t){let o=this._getHelpOption();o&&t.find(r=>o.is(r))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Xr(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let o,i="127.0.0.1",r="9229",n;return(n=t.match(/^(--inspect(-brk)?)$/))!==null?o=n[1]:(n=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(o=n[1],/^\d+$/.test(n[3])?r=n[3]:i=n[3]):(n=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(o=n[1],i=n[3],r=n[4]),o&&r!=="0"?`${o}=${i}:${parseInt(r)+1}`:t})}function Hi(){if(J.env.NO_COLOR||J.env.FORCE_COLOR==="0"||J.env.FORCE_COLOR==="false")return!1;if(J.env.FORCE_COLOR||J.env.CLICOLOR_FORCE!==void 0)return!0}Qi.Command=Gi;Qi.useColor=Hi});var rn=Re($e=>{var{Argument:en}=vo(),{Command:Ni}=Zr(),{CommanderError:im,InvalidArgumentError:tn}=to(),{Help:rm}=Bi(),{Option:on}=ji();$e.program=new Ni;$e.createCommand=e=>new Ni(e);$e.createOption=(e,t)=>new on(e,t);$e.createArgument=(e,t)=>new en(e,t);$e.Command=Ni;$e.Option=on;$e.Argument=en;$e.Help=rm;$e.CommanderError=im;$e.InvalidArgumentError=tn;$e.InvalidOptionArgumentError=tn});var sn=Re((Be,nn)=>{var qe=rn();Be=nn.exports={};Be.program=new qe.Command;Be.Argument=qe.Argument;Be.Command=qe.Command;Be.CommanderError=qe.CommanderError;Be.Help=qe.Help;Be.InvalidArgumentError=qe.InvalidArgumentError;Be.InvalidOptionArgumentError=qe.InvalidArgumentError;Be.Option=qe.Option;Be.createCommand=e=>new qe.Command(e);Be.createOption=(e,t)=>new qe.Option(e,t);Be.createArgument=(e,t)=>new qe.Argument(e,t)});var ze=Re((uh,Mi)=>{var ko=process||{},cn=ko.argv||[],xo=ko.env||{},nm=!(xo.NO_COLOR||cn.includes("--no-color"))&&(!!xo.FORCE_COLOR||cn.includes("--color")||ko.platform==="win32"||(ko.stdout||{}).isTTY&&xo.TERM!=="dumb"||!!xo.CI),sm=(e,t,o=e)=>i=>{let r=""+i,n=r.indexOf(t,e.length);return~n?e+am(r,t,o,n)+t:e+r+t},am=(e,t,o,i)=>{let r="",n=0;do r+=e.substring(n,i)+o,n=i+t.length,i=e.indexOf(t,n);while(~i);return r+e.substring(n)},dn=(e=nm)=>{let t=e?sm:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Mi.exports=dn();Mi.exports.createColors=dn});var Vi=Re((Ch,Kn)=>{"use strict";var Ji={to(e,t){return t?`\x1B[${t+1};${e+1}H`:`\x1B[${e+1}G`},move(e,t){let o="";return e<0?o+=`\x1B[${-e}D`:e>0&&(o+=`\x1B[${e}C`),t<0?o+=`\x1B[${-t}A`:t>0&&(o+=`\x1B[${t}B`),o},up:(e=1)=>`\x1B[${e}A`,down:(e=1)=>`\x1B[${e}B`,forward:(e=1)=>`\x1B[${e}C`,backward:(e=1)=>`\x1B[${e}D`,nextLine:(e=1)=>"\x1B[E".repeat(e),prevLine:(e=1)=>"\x1B[F".repeat(e),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},vm={up:(e=1)=>"\x1B[S".repeat(e),down:(e=1)=>"\x1B[T".repeat(e)},Km={screen:"\x1B[2J",up:(e=1)=>"\x1B[1J".repeat(e),down:(e=1)=>"\x1B[J".repeat(e),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(e){let t="";for(let o=0;o<e;o++)t+=this.line+(o<e-1?Ji.up():"");return e&&(t+=Ji.left),t}};Kn.exports={cursor:Ji,scroll:vm,erase:Km,beep:"\x07"}});var Zi,Nn=he(()=>{Zi={name:"resend-cli",version:"2.21.0",description:"The official CLI for Resend",license:"MIT",repository:{type:"git",url:"https://github.com/resend/resend-cli"},homepage:"https://github.com/resend/resend-cli#readme",keywords:["cli","resend","email","api","tanstack-intent"],engines:{node:">=22"},packageManager:"pnpm@11.8.0",files:["dist/cli.cjs","skills/"],type:"module",bin:{resend:"./dist/cli.cjs"},scripts:{dev:"tsx src/cli.ts","dev:watch":"tsx --watch src/cli.ts",build:"node scripts/build.mjs","build:bin":"pnpm build && pkg dist/cli.cjs --config package.json --compress Brotli --target node24 --output dist/resend",lint:"biome check .","lint:fix":"biome check --write .",typecheck:"tsc --noEmit",test:"vitest run","test:e2e":"vitest run --config vitest.config.e2e.ts",prepack:"pnpm install && pnpm build && node scripts/verify-bundle.mjs"},dependencies:{"@clack/prompts":"1.4.0","@commander-js/extra-typings":"14.0.0",commander:"14.0.3",esbuild:"0.28.1","esbuild-wasm":"0.28.0",picocolors:"1.1.1",resend:"6.28.0"},pkg:{scripts:["node_modules/esbuild-wasm/bin/esbuild","node_modules/esbuild-wasm/wasm_exec.js","node_modules/esbuild-wasm/wasm_exec_node.js"],assets:["node_modules/esbuild-wasm/esbuild.wasm"]},devDependencies:{"@biomejs/biome":"2.4.11","@types/node":"24.12.4","@yao-pkg/pkg":"6.20.0",tsx:"4.22.4",typescript:"5.9.3",vitest:"4.1.9"}}});var ne,Mn,St=he(()=>{"use strict";Nn();ne=Zi.version,Mn=Zi.name});var ts=Re(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.timingSafeEqual=void 0;function es(e,t=""){if(!e)throw new Error(t)}function pp(e,t){if(e.byteLength!==t.byteLength)return!1;e instanceof DataView||(e=new DataView(ArrayBuffer.isView(e)?e.buffer:e)),t instanceof DataView||(t=new DataView(ArrayBuffer.isView(t)?t.buffer:t)),es(e instanceof DataView),es(t instanceof DataView);let o=e.byteLength,i=0,r=-1;for(;++r<o;)i|=e.getUint8(r)^t.getUint8(r);return i===0}Ho.timingSafeEqual=pp});var rs=Re(Ie=>{"use strict";var fp=Ie&&Ie.__extends||(function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,r){i.__proto__=r}||function(i,r){for(var n in r)r.hasOwnProperty(n)&&(i[n]=r[n])},e(t,o)};return function(t,o){e(t,o);function i(){this.constructor=t}t.prototype=o===null?Object.create(o):(i.prototype=o.prototype,new i)}})();Object.defineProperty(Ie,"__esModule",{value:!0});var le=256,lr=(function(){function e(t){t===void 0&&(t="="),this._paddingCharacter=t}return e.prototype.encodedLength=function(t){return this._paddingCharacter?(t+2)/3*4|0:(t*8+5)/6|0},e.prototype.encode=function(t){for(var o="",i=0;i<t.length-2;i+=3){var r=t[i]<<16|t[i+1]<<8|t[i+2];o+=this._encodeByte(r>>>18&63),o+=this._encodeByte(r>>>12&63),o+=this._encodeByte(r>>>6&63),o+=this._encodeByte(r>>>0&63)}var n=t.length-i;if(n>0){var r=t[i]<<16|(n===2?t[i+1]<<8:0);o+=this._encodeByte(r>>>18&63),o+=this._encodeByte(r>>>12&63),n===2?o+=this._encodeByte(r>>>6&63):o+=this._paddingCharacter||"",o+=this._paddingCharacter||""}return o},e.prototype.maxDecodedLength=function(t){return this._paddingCharacter?t/4*3|0:(t*6+7)/8|0},e.prototype.decodedLength=function(t){return this.maxDecodedLength(t.length-this._getPaddingLength(t))},e.prototype.decode=function(t){if(t.length===0)return new Uint8Array(0);for(var o=this._getPaddingLength(t),i=t.length-o,r=new Uint8Array(this.maxDecodedLength(i)),n=0,s=0,a=0,l=0,d=0,c=0,m=0;s<i-4;s+=4)l=this._decodeChar(t.charCodeAt(s+0)),d=this._decodeChar(t.charCodeAt(s+1)),c=this._decodeChar(t.charCodeAt(s+2)),m=this._decodeChar(t.charCodeAt(s+3)),r[n++]=l<<2|d>>>4,r[n++]=d<<4|c>>>2,r[n++]=c<<6|m,a|=l&le,a|=d&le,a|=c&le,a|=m&le;if(s<i-1&&(l=this._decodeChar(t.charCodeAt(s)),d=this._decodeChar(t.charCodeAt(s+1)),r[n++]=l<<2|d>>>4,a|=l&le,a|=d&le),s<i-2&&(c=this._decodeChar(t.charCodeAt(s+2)),r[n++]=d<<4|c>>>2,a|=c&le),s<i-3&&(m=this._decodeChar(t.charCodeAt(s+3)),r[n++]=c<<6|m,a|=m&le),a!==0)throw new Error("Base64Coder: incorrect characters for decoding");return r},e.prototype._encodeByte=function(t){var o=t;return o+=65,o+=25-t>>>8&6,o+=51-t>>>8&-75,o+=61-t>>>8&-15,o+=62-t>>>8&3,String.fromCharCode(o)},e.prototype._decodeChar=function(t){var o=le;return o+=(42-t&t-44)>>>8&-le+t-43+62,o+=(46-t&t-48)>>>8&-le+t-47+63,o+=(47-t&t-58)>>>8&-le+t-48+52,o+=(64-t&t-91)>>>8&-le+t-65+0,o+=(96-t&t-123)>>>8&-le+t-97+26,o},e.prototype._getPaddingLength=function(t){var o=0;if(this._paddingCharacter){for(var i=t.length-1;i>=0&&t[i]===this._paddingCharacter;i--)o++;if(t.length<4||o>2)throw new Error("Base64Coder: incorrect padding")}return o},e})();Ie.Coder=lr;var co=new lr;function gp(e){return co.encode(e)}Ie.encode=gp;function hp(e){return co.decode(e)}Ie.decode=hp;var os=(function(e){fp(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype._encodeByte=function(o){var i=o;return i+=65,i+=25-o>>>8&6,i+=51-o>>>8&-75,i+=61-o>>>8&-13,i+=62-o>>>8&49,String.fromCharCode(i)},t.prototype._decodeChar=function(o){var i=le;return i+=(44-o&o-46)>>>8&-le+o-45+62,i+=(94-o&o-96)>>>8&-le+o-95+63,i+=(47-o&o-58)>>>8&-le+o-48+52,i+=(64-o&o-91)>>>8&-le+o-65+0,i+=(96-o&o-123)>>>8&-le+o-97+26,i},t})(lr);Ie.URLSafeCoder=os;var is=new os;function Ap(e){return is.encode(e)}Ie.encodeURLSafe=Ap;function bp(e){return is.decode(e)}Ie.decodeURLSafe=bp;Ie.encodedLength=function(e){return co.encodedLength(e)};Ie.maxDecodedLength=function(e){return co.maxDecodedLength(e)};Ie.decodedLength=function(e){return co.decodedLength(e)}});var ss=Re((ns,Qo)=>{(function(e,t){var o={};t(o);var i=o.default;for(var r in o)i[r]=o[r];typeof Qo=="object"&&typeof Qo.exports=="object"?Qo.exports=i:typeof define=="function"&&define.amd?define(function(){return i}):e.sha256=i})(ns,function(e){"use strict";e.__esModule=!0,e.digestLength=32,e.blockSize=64;var t=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function o(m,f,b,h,A){for(var w,S,v,K,x,D,I,G,E,N,we,ie,wt;A>=64;){for(w=f[0],S=f[1],v=f[2],K=f[3],x=f[4],D=f[5],I=f[6],G=f[7],N=0;N<16;N++)we=h+N*4,m[N]=(b[we]&255)<<24|(b[we+1]&255)<<16|(b[we+2]&255)<<8|b[we+3]&255;for(N=16;N<64;N++)E=m[N-2],ie=(E>>>17|E<<15)^(E>>>19|E<<13)^E>>>10,E=m[N-15],wt=(E>>>7|E<<25)^(E>>>18|E<<14)^E>>>3,m[N]=(ie+m[N-7]|0)+(wt+m[N-16]|0);for(N=0;N<64;N++)ie=(((x>>>6|x<<26)^(x>>>11|x<<21)^(x>>>25|x<<7))+(x&D^~x&I)|0)+(G+(t[N]+m[N]|0)|0)|0,wt=((w>>>2|w<<30)^(w>>>13|w<<19)^(w>>>22|w<<10))+(w&S^w&v^S&v)|0,G=I,I=D,D=x,x=K+ie|0,K=v,v=S,S=w,w=ie+wt|0;f[0]+=w,f[1]+=S,f[2]+=v,f[3]+=K,f[4]+=x,f[5]+=D,f[6]+=I,f[7]+=G,h+=64,A-=64}return h}var i=(function(){function m(){this.digestLength=e.digestLength,this.blockSize=e.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return m.prototype.reset=function(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},m.prototype.clean=function(){for(var f=0;f<this.buffer.length;f++)this.buffer[f]=0;for(var f=0;f<this.temp.length;f++)this.temp[f]=0;this.reset()},m.prototype.update=function(f,b){if(b===void 0&&(b=f.length),this.finished)throw new Error("SHA256: can't update because hash was finished.");var h=0;if(this.bytesHashed+=b,this.bufferLength>0){for(;this.bufferLength<64&&b>0;)this.buffer[this.bufferLength++]=f[h++],b--;this.bufferLength===64&&(o(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(b>=64&&(h=o(this.temp,this.state,f,h,b),b%=64);b>0;)this.buffer[this.bufferLength++]=f[h++],b--;return this},m.prototype.finish=function(f){if(!this.finished){var b=this.bytesHashed,h=this.bufferLength,A=b/536870912|0,w=b<<3,S=b%64<56?64:128;this.buffer[h]=128;for(var v=h+1;v<S-8;v++)this.buffer[v]=0;this.buffer[S-8]=A>>>24&255,this.buffer[S-7]=A>>>16&255,this.buffer[S-6]=A>>>8&255,this.buffer[S-5]=A>>>0&255,this.buffer[S-4]=w>>>24&255,this.buffer[S-3]=w>>>16&255,this.buffer[S-2]=w>>>8&255,this.buffer[S-1]=w>>>0&255,o(this.temp,this.state,this.buffer,0,S),this.finished=!0}for(var v=0;v<8;v++)f[v*4+0]=this.state[v]>>>24&255,f[v*4+1]=this.state[v]>>>16&255,f[v*4+2]=this.state[v]>>>8&255,f[v*4+3]=this.state[v]>>>0&255;return this},m.prototype.digest=function(){var f=new Uint8Array(this.digestLength);return this.finish(f),f},m.prototype._saveState=function(f){for(var b=0;b<this.state.length;b++)f[b]=this.state[b]},m.prototype._restoreState=function(f,b){for(var h=0;h<this.state.length;h++)this.state[h]=f[h];this.bytesHashed=b,this.finished=!1,this.bufferLength=0},m})();e.Hash=i;var r=(function(){function m(f){this.inner=new i,this.outer=new i,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var b=new Uint8Array(this.blockSize);if(f.length>this.blockSize)new i().update(f).finish(b).clean();else for(var h=0;h<f.length;h++)b[h]=f[h];for(var h=0;h<b.length;h++)b[h]^=54;this.inner.update(b);for(var h=0;h<b.length;h++)b[h]^=106;this.outer.update(b),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate);for(var h=0;h<b.length;h++)b[h]=0}return m.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},m.prototype.clean=function(){for(var f=0;f<this.istate.length;f++)this.ostate[f]=this.istate[f]=0;this.inner.clean(),this.outer.clean()},m.prototype.update=function(f){return this.inner.update(f),this},m.prototype.finish=function(f){return this.outer.finished?this.outer.finish(f):(this.inner.finish(f),this.outer.update(f,this.digestLength).finish(f)),this},m.prototype.digest=function(){var f=new Uint8Array(this.digestLength);return this.finish(f),f},m})();e.HMAC=r;function n(m){var f=new i().update(m),b=f.digest();return f.clean(),b}e.hash=n,e.default=n;function s(m,f){var b=new r(m).update(f),h=b.digest();return b.clean(),h}e.hmac=s;function a(m,f,b,h){var A=h[0];if(A===0)throw new Error("hkdf: cannot expand more");f.reset(),A>1&&f.update(m),b&&f.update(b),f.update(h),f.finish(m),h[0]++}var l=new Uint8Array(e.digestLength);function d(m,f,b,h){f===void 0&&(f=l),h===void 0&&(h=32);for(var A=new Uint8Array([1]),w=s(f,m),S=new r(w),v=new Uint8Array(S.digestLength),K=v.length,x=new Uint8Array(h),D=0;D<h;D++)K===v.length&&(a(v,S,b,A),K=0),x[D]=v[K++];return S.clean(),v.fill(0),A.fill(0),x}e.hkdf=d;function c(m,f,b,h){for(var A=new r(m),w=A.digestLength,S=new Uint8Array(4),v=new Uint8Array(w),K=new Uint8Array(w),x=new Uint8Array(h),D=0;D*w<h;D++){var I=D+1;S[0]=I>>>24&255,S[1]=I>>>16&255,S[2]=I>>>8&255,S[3]=I>>>0&255,A.reset(),A.update(f),A.update(S),A.finish(K);for(var G=0;G<w;G++)v[G]=K[G];for(var G=2;G<=b;G++){A.reset(),A.update(K).finish(K);for(var E=0;E<w;E++)v[E]^=K[E]}for(var G=0;G<w&&D*w+G<h;G++)x[D*w+G]=v[G]}for(var D=0;D<w;D++)v[D]=K[D]=0;for(var D=0;D<4;D++)S[D]=0;return A.clean(),x}e.pbkdf2=c})});var cs=Re(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.Webhook=Tt.WebhookVerificationError=void 0;var yp=ts(),as=rs(),Cp=ss(),ls=300,cr=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype),this.name="ExtendableError",this.stack=new Error(t).stack}},ut=class e extends cr{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype),this.name="WebhookVerificationError"}};Tt.WebhookVerificationError=ut;var No=class e{constructor(t,o){if(!t)throw new Error("Secret can't be empty.");if(o?.format==="raw")t instanceof Uint8Array?this.key=t:this.key=Uint8Array.from(t,i=>i.charCodeAt(0));else{if(typeof t!="string")throw new Error("Expected secret to be of type string");t.startsWith(e.prefix)&&(t=t.substring(e.prefix.length)),this.key=as.decode(t)}}verify(t,o){let i={};for(let f of Object.keys(o))i[f.toLowerCase()]=o[f];let r=i["webhook-id"],n=i["webhook-signature"],s=i["webhook-timestamp"];if(!n||!r||!s)throw new ut("Missing required headers");let a=this.verifyTimestamp(s),d=this.sign(r,a,t).split(",")[1],c=n.split(" "),m=new globalThis.TextEncoder;for(let f of c){let[b,h]=f.split(",");if(b==="v1"&&(0,yp.timingSafeEqual)(m.encode(h),m.encode(d)))return JSON.parse(t.toString())}throw new ut("No matching signature found")}sign(t,o,i){if(typeof i!="string")if(i.constructor.name==="Buffer")i=i.toString();else throw new Error("Expected payload to be of type string or Buffer.");let r=new TextEncoder,n=Math.floor(o.getTime()/1e3),s=r.encode(`${t}.${n}.${i}`);return`v1,${as.encode(Cp.hmac(this.key,s))}`}verifyTimestamp(t){let o=Math.floor(Date.now()/1e3),i=parseInt(t,10);if(isNaN(i))throw new ut("Invalid Signature Headers");if(o-i>ls)throw new ut("Message timestamp too old");if(i>o+ls)throw new ut("Message timestamp too new");return new Date(i*1e3)}};Tt.Webhook=No;No.prefix="whsec_"});var Mo,ws=he(()=>{"use strict";Mo=class extends Error{constructor(t){super(`Credentials file is corrupted or contains invalid JSON: ${t}
27
+ `)}),this}_outputHelpIfRequested(t){let o=this._getHelpOption();o&&t.find(r=>o.is(r))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Xr(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let o,i="127.0.0.1",r="9229",n;return(n=t.match(/^(--inspect(-brk)?)$/))!==null?o=n[1]:(n=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(o=n[1],/^\d+$/.test(n[3])?r=n[3]:i=n[3]):(n=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(o=n[1],i=n[3],r=n[4]),o&&r!=="0"?`${o}=${i}:${parseInt(r)+1}`:t})}function Hi(){if(J.env.NO_COLOR||J.env.FORCE_COLOR==="0"||J.env.FORCE_COLOR==="false")return!1;if(J.env.FORCE_COLOR||J.env.CLICOLOR_FORCE!==void 0)return!0}Qi.Command=Gi;Qi.useColor=Hi});var rn=Re($e=>{var{Argument:en}=vo(),{Command:Ni}=Zr(),{CommanderError:im,InvalidArgumentError:tn}=to(),{Help:rm}=Bi(),{Option:on}=ji();$e.program=new Ni;$e.createCommand=e=>new Ni(e);$e.createOption=(e,t)=>new on(e,t);$e.createArgument=(e,t)=>new en(e,t);$e.Command=Ni;$e.Option=on;$e.Argument=en;$e.Help=rm;$e.CommanderError=im;$e.InvalidArgumentError=tn;$e.InvalidOptionArgumentError=tn});var sn=Re((Be,nn)=>{var qe=rn();Be=nn.exports={};Be.program=new qe.Command;Be.Argument=qe.Argument;Be.Command=qe.Command;Be.CommanderError=qe.CommanderError;Be.Help=qe.Help;Be.InvalidArgumentError=qe.InvalidArgumentError;Be.InvalidOptionArgumentError=qe.InvalidArgumentError;Be.Option=qe.Option;Be.createCommand=e=>new qe.Command(e);Be.createOption=(e,t)=>new qe.Option(e,t);Be.createArgument=(e,t)=>new qe.Argument(e,t)});var ze=Re((uh,Mi)=>{var ko=process||{},cn=ko.argv||[],xo=ko.env||{},nm=!(xo.NO_COLOR||cn.includes("--no-color"))&&(!!xo.FORCE_COLOR||cn.includes("--color")||ko.platform==="win32"||(ko.stdout||{}).isTTY&&xo.TERM!=="dumb"||!!xo.CI),sm=(e,t,o=e)=>i=>{let r=""+i,n=r.indexOf(t,e.length);return~n?e+am(r,t,o,n)+t:e+r+t},am=(e,t,o,i)=>{let r="",n=0;do r+=e.substring(n,i)+o,n=i+t.length,i=e.indexOf(t,n);while(~i);return r+e.substring(n)},dn=(e=nm)=>{let t=e?sm:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Mi.exports=dn();Mi.exports.createColors=dn});var Vi=Re((Ch,Kn)=>{"use strict";var Ji={to(e,t){return t?`\x1B[${t+1};${e+1}H`:`\x1B[${e+1}G`},move(e,t){let o="";return e<0?o+=`\x1B[${-e}D`:e>0&&(o+=`\x1B[${e}C`),t<0?o+=`\x1B[${-t}A`:t>0&&(o+=`\x1B[${t}B`),o},up:(e=1)=>`\x1B[${e}A`,down:(e=1)=>`\x1B[${e}B`,forward:(e=1)=>`\x1B[${e}C`,backward:(e=1)=>`\x1B[${e}D`,nextLine:(e=1)=>"\x1B[E".repeat(e),prevLine:(e=1)=>"\x1B[F".repeat(e),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},vm={up:(e=1)=>"\x1B[S".repeat(e),down:(e=1)=>"\x1B[T".repeat(e)},Km={screen:"\x1B[2J",up:(e=1)=>"\x1B[1J".repeat(e),down:(e=1)=>"\x1B[J".repeat(e),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(e){let t="";for(let o=0;o<e;o++)t+=this.line+(o<e-1?Ji.up():"");return e&&(t+=Ji.left),t}};Kn.exports={cursor:Ji,scroll:vm,erase:Km,beep:"\x07"}});var Zi,Nn=he(()=>{Zi={name:"resend-cli",version:"2.21.1",description:"The official CLI for Resend",license:"MIT",repository:{type:"git",url:"https://github.com/resend/resend-cli"},homepage:"https://github.com/resend/resend-cli#readme",keywords:["cli","resend","email","api","tanstack-intent"],engines:{node:">=22"},packageManager:"pnpm@11.8.0",files:["dist/cli.cjs","skills/"],type:"module",bin:{resend:"./dist/cli.cjs"},scripts:{dev:"tsx src/cli.ts","dev:watch":"tsx --watch src/cli.ts",build:"node scripts/build.mjs","build:bin":"pnpm build && pkg dist/cli.cjs --config package.json --compress Brotli --target node24 --output dist/resend",lint:"biome check .","lint:fix":"biome check --write .",typecheck:"tsc --noEmit",test:"vitest run","test:e2e":"vitest run --config vitest.config.e2e.ts",prepack:"pnpm install && pnpm build && node scripts/verify-bundle.mjs"},dependencies:{"@clack/prompts":"1.4.0","@commander-js/extra-typings":"14.0.0",commander:"14.0.3",esbuild:"0.28.1","esbuild-wasm":"0.28.0",picocolors:"1.1.1",resend:"6.28.0"},pkg:{scripts:["node_modules/esbuild-wasm/bin/esbuild","node_modules/esbuild-wasm/wasm_exec.js","node_modules/esbuild-wasm/wasm_exec_node.js"],assets:["node_modules/esbuild-wasm/esbuild.wasm"]},devDependencies:{"@biomejs/biome":"2.4.11","@types/node":"24.12.4","@yao-pkg/pkg":"6.20.0",tsx:"4.22.4",typescript:"5.9.3",vitest:"4.1.9"}}});var ne,Mn,St=he(()=>{"use strict";Nn();ne=Zi.version,Mn=Zi.name});var ts=Re(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.timingSafeEqual=void 0;function es(e,t=""){if(!e)throw new Error(t)}function pp(e,t){if(e.byteLength!==t.byteLength)return!1;e instanceof DataView||(e=new DataView(ArrayBuffer.isView(e)?e.buffer:e)),t instanceof DataView||(t=new DataView(ArrayBuffer.isView(t)?t.buffer:t)),es(e instanceof DataView),es(t instanceof DataView);let o=e.byteLength,i=0,r=-1;for(;++r<o;)i|=e.getUint8(r)^t.getUint8(r);return i===0}Ho.timingSafeEqual=pp});var rs=Re(Ie=>{"use strict";var fp=Ie&&Ie.__extends||(function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,r){i.__proto__=r}||function(i,r){for(var n in r)r.hasOwnProperty(n)&&(i[n]=r[n])},e(t,o)};return function(t,o){e(t,o);function i(){this.constructor=t}t.prototype=o===null?Object.create(o):(i.prototype=o.prototype,new i)}})();Object.defineProperty(Ie,"__esModule",{value:!0});var le=256,lr=(function(){function e(t){t===void 0&&(t="="),this._paddingCharacter=t}return e.prototype.encodedLength=function(t){return this._paddingCharacter?(t+2)/3*4|0:(t*8+5)/6|0},e.prototype.encode=function(t){for(var o="",i=0;i<t.length-2;i+=3){var r=t[i]<<16|t[i+1]<<8|t[i+2];o+=this._encodeByte(r>>>18&63),o+=this._encodeByte(r>>>12&63),o+=this._encodeByte(r>>>6&63),o+=this._encodeByte(r>>>0&63)}var n=t.length-i;if(n>0){var r=t[i]<<16|(n===2?t[i+1]<<8:0);o+=this._encodeByte(r>>>18&63),o+=this._encodeByte(r>>>12&63),n===2?o+=this._encodeByte(r>>>6&63):o+=this._paddingCharacter||"",o+=this._paddingCharacter||""}return o},e.prototype.maxDecodedLength=function(t){return this._paddingCharacter?t/4*3|0:(t*6+7)/8|0},e.prototype.decodedLength=function(t){return this.maxDecodedLength(t.length-this._getPaddingLength(t))},e.prototype.decode=function(t){if(t.length===0)return new Uint8Array(0);for(var o=this._getPaddingLength(t),i=t.length-o,r=new Uint8Array(this.maxDecodedLength(i)),n=0,s=0,a=0,l=0,d=0,c=0,m=0;s<i-4;s+=4)l=this._decodeChar(t.charCodeAt(s+0)),d=this._decodeChar(t.charCodeAt(s+1)),c=this._decodeChar(t.charCodeAt(s+2)),m=this._decodeChar(t.charCodeAt(s+3)),r[n++]=l<<2|d>>>4,r[n++]=d<<4|c>>>2,r[n++]=c<<6|m,a|=l&le,a|=d&le,a|=c&le,a|=m&le;if(s<i-1&&(l=this._decodeChar(t.charCodeAt(s)),d=this._decodeChar(t.charCodeAt(s+1)),r[n++]=l<<2|d>>>4,a|=l&le,a|=d&le),s<i-2&&(c=this._decodeChar(t.charCodeAt(s+2)),r[n++]=d<<4|c>>>2,a|=c&le),s<i-3&&(m=this._decodeChar(t.charCodeAt(s+3)),r[n++]=c<<6|m,a|=m&le),a!==0)throw new Error("Base64Coder: incorrect characters for decoding");return r},e.prototype._encodeByte=function(t){var o=t;return o+=65,o+=25-t>>>8&6,o+=51-t>>>8&-75,o+=61-t>>>8&-15,o+=62-t>>>8&3,String.fromCharCode(o)},e.prototype._decodeChar=function(t){var o=le;return o+=(42-t&t-44)>>>8&-le+t-43+62,o+=(46-t&t-48)>>>8&-le+t-47+63,o+=(47-t&t-58)>>>8&-le+t-48+52,o+=(64-t&t-91)>>>8&-le+t-65+0,o+=(96-t&t-123)>>>8&-le+t-97+26,o},e.prototype._getPaddingLength=function(t){var o=0;if(this._paddingCharacter){for(var i=t.length-1;i>=0&&t[i]===this._paddingCharacter;i--)o++;if(t.length<4||o>2)throw new Error("Base64Coder: incorrect padding")}return o},e})();Ie.Coder=lr;var co=new lr;function gp(e){return co.encode(e)}Ie.encode=gp;function hp(e){return co.decode(e)}Ie.decode=hp;var os=(function(e){fp(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype._encodeByte=function(o){var i=o;return i+=65,i+=25-o>>>8&6,i+=51-o>>>8&-75,i+=61-o>>>8&-13,i+=62-o>>>8&49,String.fromCharCode(i)},t.prototype._decodeChar=function(o){var i=le;return i+=(44-o&o-46)>>>8&-le+o-45+62,i+=(94-o&o-96)>>>8&-le+o-95+63,i+=(47-o&o-58)>>>8&-le+o-48+52,i+=(64-o&o-91)>>>8&-le+o-65+0,i+=(96-o&o-123)>>>8&-le+o-97+26,i},t})(lr);Ie.URLSafeCoder=os;var is=new os;function Ap(e){return is.encode(e)}Ie.encodeURLSafe=Ap;function bp(e){return is.decode(e)}Ie.decodeURLSafe=bp;Ie.encodedLength=function(e){return co.encodedLength(e)};Ie.maxDecodedLength=function(e){return co.maxDecodedLength(e)};Ie.decodedLength=function(e){return co.decodedLength(e)}});var ss=Re((ns,Qo)=>{(function(e,t){var o={};t(o);var i=o.default;for(var r in o)i[r]=o[r];typeof Qo=="object"&&typeof Qo.exports=="object"?Qo.exports=i:typeof define=="function"&&define.amd?define(function(){return i}):e.sha256=i})(ns,function(e){"use strict";e.__esModule=!0,e.digestLength=32,e.blockSize=64;var t=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function o(m,f,b,h,A){for(var w,S,v,K,x,D,I,G,E,N,we,ie,wt;A>=64;){for(w=f[0],S=f[1],v=f[2],K=f[3],x=f[4],D=f[5],I=f[6],G=f[7],N=0;N<16;N++)we=h+N*4,m[N]=(b[we]&255)<<24|(b[we+1]&255)<<16|(b[we+2]&255)<<8|b[we+3]&255;for(N=16;N<64;N++)E=m[N-2],ie=(E>>>17|E<<15)^(E>>>19|E<<13)^E>>>10,E=m[N-15],wt=(E>>>7|E<<25)^(E>>>18|E<<14)^E>>>3,m[N]=(ie+m[N-7]|0)+(wt+m[N-16]|0);for(N=0;N<64;N++)ie=(((x>>>6|x<<26)^(x>>>11|x<<21)^(x>>>25|x<<7))+(x&D^~x&I)|0)+(G+(t[N]+m[N]|0)|0)|0,wt=((w>>>2|w<<30)^(w>>>13|w<<19)^(w>>>22|w<<10))+(w&S^w&v^S&v)|0,G=I,I=D,D=x,x=K+ie|0,K=v,v=S,S=w,w=ie+wt|0;f[0]+=w,f[1]+=S,f[2]+=v,f[3]+=K,f[4]+=x,f[5]+=D,f[6]+=I,f[7]+=G,h+=64,A-=64}return h}var i=(function(){function m(){this.digestLength=e.digestLength,this.blockSize=e.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return m.prototype.reset=function(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},m.prototype.clean=function(){for(var f=0;f<this.buffer.length;f++)this.buffer[f]=0;for(var f=0;f<this.temp.length;f++)this.temp[f]=0;this.reset()},m.prototype.update=function(f,b){if(b===void 0&&(b=f.length),this.finished)throw new Error("SHA256: can't update because hash was finished.");var h=0;if(this.bytesHashed+=b,this.bufferLength>0){for(;this.bufferLength<64&&b>0;)this.buffer[this.bufferLength++]=f[h++],b--;this.bufferLength===64&&(o(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(b>=64&&(h=o(this.temp,this.state,f,h,b),b%=64);b>0;)this.buffer[this.bufferLength++]=f[h++],b--;return this},m.prototype.finish=function(f){if(!this.finished){var b=this.bytesHashed,h=this.bufferLength,A=b/536870912|0,w=b<<3,S=b%64<56?64:128;this.buffer[h]=128;for(var v=h+1;v<S-8;v++)this.buffer[v]=0;this.buffer[S-8]=A>>>24&255,this.buffer[S-7]=A>>>16&255,this.buffer[S-6]=A>>>8&255,this.buffer[S-5]=A>>>0&255,this.buffer[S-4]=w>>>24&255,this.buffer[S-3]=w>>>16&255,this.buffer[S-2]=w>>>8&255,this.buffer[S-1]=w>>>0&255,o(this.temp,this.state,this.buffer,0,S),this.finished=!0}for(var v=0;v<8;v++)f[v*4+0]=this.state[v]>>>24&255,f[v*4+1]=this.state[v]>>>16&255,f[v*4+2]=this.state[v]>>>8&255,f[v*4+3]=this.state[v]>>>0&255;return this},m.prototype.digest=function(){var f=new Uint8Array(this.digestLength);return this.finish(f),f},m.prototype._saveState=function(f){for(var b=0;b<this.state.length;b++)f[b]=this.state[b]},m.prototype._restoreState=function(f,b){for(var h=0;h<this.state.length;h++)this.state[h]=f[h];this.bytesHashed=b,this.finished=!1,this.bufferLength=0},m})();e.Hash=i;var r=(function(){function m(f){this.inner=new i,this.outer=new i,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var b=new Uint8Array(this.blockSize);if(f.length>this.blockSize)new i().update(f).finish(b).clean();else for(var h=0;h<f.length;h++)b[h]=f[h];for(var h=0;h<b.length;h++)b[h]^=54;this.inner.update(b);for(var h=0;h<b.length;h++)b[h]^=106;this.outer.update(b),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate);for(var h=0;h<b.length;h++)b[h]=0}return m.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},m.prototype.clean=function(){for(var f=0;f<this.istate.length;f++)this.ostate[f]=this.istate[f]=0;this.inner.clean(),this.outer.clean()},m.prototype.update=function(f){return this.inner.update(f),this},m.prototype.finish=function(f){return this.outer.finished?this.outer.finish(f):(this.inner.finish(f),this.outer.update(f,this.digestLength).finish(f)),this},m.prototype.digest=function(){var f=new Uint8Array(this.digestLength);return this.finish(f),f},m})();e.HMAC=r;function n(m){var f=new i().update(m),b=f.digest();return f.clean(),b}e.hash=n,e.default=n;function s(m,f){var b=new r(m).update(f),h=b.digest();return b.clean(),h}e.hmac=s;function a(m,f,b,h){var A=h[0];if(A===0)throw new Error("hkdf: cannot expand more");f.reset(),A>1&&f.update(m),b&&f.update(b),f.update(h),f.finish(m),h[0]++}var l=new Uint8Array(e.digestLength);function d(m,f,b,h){f===void 0&&(f=l),h===void 0&&(h=32);for(var A=new Uint8Array([1]),w=s(f,m),S=new r(w),v=new Uint8Array(S.digestLength),K=v.length,x=new Uint8Array(h),D=0;D<h;D++)K===v.length&&(a(v,S,b,A),K=0),x[D]=v[K++];return S.clean(),v.fill(0),A.fill(0),x}e.hkdf=d;function c(m,f,b,h){for(var A=new r(m),w=A.digestLength,S=new Uint8Array(4),v=new Uint8Array(w),K=new Uint8Array(w),x=new Uint8Array(h),D=0;D*w<h;D++){var I=D+1;S[0]=I>>>24&255,S[1]=I>>>16&255,S[2]=I>>>8&255,S[3]=I>>>0&255,A.reset(),A.update(f),A.update(S),A.finish(K);for(var G=0;G<w;G++)v[G]=K[G];for(var G=2;G<=b;G++){A.reset(),A.update(K).finish(K);for(var E=0;E<w;E++)v[E]^=K[E]}for(var G=0;G<w&&D*w+G<h;G++)x[D*w+G]=v[G]}for(var D=0;D<w;D++)v[D]=K[D]=0;for(var D=0;D<4;D++)S[D]=0;return A.clean(),x}e.pbkdf2=c})});var cs=Re(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.Webhook=Tt.WebhookVerificationError=void 0;var yp=ts(),as=rs(),Cp=ss(),ls=300,cr=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype),this.name="ExtendableError",this.stack=new Error(t).stack}},ut=class e extends cr{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype),this.name="WebhookVerificationError"}};Tt.WebhookVerificationError=ut;var No=class e{constructor(t,o){if(!t)throw new Error("Secret can't be empty.");if(o?.format==="raw")t instanceof Uint8Array?this.key=t:this.key=Uint8Array.from(t,i=>i.charCodeAt(0));else{if(typeof t!="string")throw new Error("Expected secret to be of type string");t.startsWith(e.prefix)&&(t=t.substring(e.prefix.length)),this.key=as.decode(t)}}verify(t,o){let i={};for(let f of Object.keys(o))i[f.toLowerCase()]=o[f];let r=i["webhook-id"],n=i["webhook-signature"],s=i["webhook-timestamp"];if(!n||!r||!s)throw new ut("Missing required headers");let a=this.verifyTimestamp(s),d=this.sign(r,a,t).split(",")[1],c=n.split(" "),m=new globalThis.TextEncoder;for(let f of c){let[b,h]=f.split(",");if(b==="v1"&&(0,yp.timingSafeEqual)(m.encode(h),m.encode(d)))return JSON.parse(t.toString())}throw new ut("No matching signature found")}sign(t,o,i){if(typeof i!="string")if(i.constructor.name==="Buffer")i=i.toString();else throw new Error("Expected payload to be of type string or Buffer.");let r=new TextEncoder,n=Math.floor(o.getTime()/1e3),s=r.encode(`${t}.${n}.${i}`);return`v1,${as.encode(Cp.hmac(this.key,s))}`}verifyTimestamp(t){let o=Math.floor(Date.now()/1e3),i=parseInt(t,10);if(isNaN(i))throw new ut("Invalid Signature Headers");if(o-i>ls)throw new ut("Message timestamp too old");if(i>o+ls)throw new ut("Message timestamp too new");return new Date(i*1e3)}};Tt.Webhook=No;No.prefix="whsec_"});var Mo,ws=he(()=>{"use strict";Mo=class extends Error{constructor(t){super(`Credentials file is corrupted or contains invalid JSON: ${t}
28
28
  The file has been preserved for manual inspection.
29
29
  To fix: either repair the JSON manually, or delete the file and run: resend login`),this.name="CorruptedCredentialsError"}}});var ur={};eo(ur,{FileBackend:()=>dr});var dr,mr=he(()=>{"use strict";Ae();dr=class{name="plaintext file";isSecure=!1;async get(t,o){let i=ve();if(!i)return null;let r=i.profiles[o];return(r?.type==="api_key"?r.api_key:null)??null}async set(t,o,i){pr(i,o)}async delete(t,o){try{return Us(o),!0}catch{return!1}}async isAvailable(){return!0}}});var vs={};eo(vs,{MacOSBackend:()=>gr});function fr(e,t){return new Promise(o=>{(0,Ss.execFile)(e,t,{timeout:5e3},(i,r,n)=>{let s=i&&"code"in i?i.code:0;o({stdout:r??"",stderr:n??"",code:s})})})}var Ss,gr,Ks=he(()=>{"use strict";Ss=require("node:child_process");gr=class{name="macOS Keychain";isSecure=!0;async get(t,o){let{stdout:i,stderr:r,code:n}=await fr("/usr/bin/security",["find-generic-password","-s",t,"-a",o,"-w"]);if(n===44)return null;if(n!==0)throw new Error(`Failed to read from macOS Keychain (exit code ${n}): ${r.trim()}`);return i.trim()||null}async set(t,o,i){let{code:r,stderr:n}=await fr("/usr/bin/security",["add-generic-password","-s",t,"-a",o,"-w",i,"-U"]);if(r!==0)throw new Error(`Failed to store credential in macOS Keychain: ${n.trim()}`)}async delete(t,o){let{code:i}=await fr("/usr/bin/security",["delete-generic-password","-s",t,"-a",o]);return i===0}async isAvailable(){return process.platform==="darwin"}}});var xs={};eo(xs,{LinuxBackend:()=>hr});function qo(e,t,o){return new Promise(i=>{(0,Lo.execFile)(e,t,{timeout:o?.timeout??5e3},(r,n,s)=>{let a=r&&"code"in r?r.code:0;i({stdout:n??"",stderr:s??"",code:a})})})}function af(e,t,o){return new Promise(i=>{let r=(0,Lo.spawn)(e,t,{stdio:["pipe","ignore","pipe"],timeout:5e3}),n="";r.stderr?.on("data",s=>{n+=s.toString()}),r.on("close",s=>{i({code:s,stderr:n})}),r.on("error",()=>{i({code:1,stderr:"Failed to spawn process"})}),r.stdin?.on("error",()=>{}),r.stdin?.write(o),r.stdin?.end()})}var Lo,hr,ks=he(()=>{"use strict";Lo=require("node:child_process");hr=class{name="Secret Service (libsecret)";isSecure=!0;async get(t,o){let{stdout:i,code:r}=await qo("secret-tool",["lookup","service",t,"account",o]);return r!==0||!i.trim()?null:i.trim()}async set(t,o,i){let{code:r,stderr:n}=await af("secret-tool",["store",`--label=Resend CLI (${o})`,"service",t,"account",o],i);if(r!==0)throw new Error(`Failed to store credential in Secret Service: ${n.trim()}`)}async delete(t,o){let{code:i}=await qo("secret-tool",["clear","service",t,"account",o]);return i===0}async isAvailable(){if(process.platform!=="linux"||(await qo("which",["secret-tool"])).code!==0)return!1;let o=await qo("secret-tool",["lookup","service","__resend_cli_probe__"],{timeout:3e3});return o.code===0||o.code===1}}});var Fs={};eo(Fs,{WindowsBackend:()=>Ar});function Wo(e){return new Promise(t=>{(0,Jo.execFile)("powershell.exe",["-NoProfile","-NonInteractive","-Command",e],{timeout:1e4},(o,i,r)=>{let n=o&&"code"in o?o.code:0;t({stdout:i??"",stderr:r??"",code:n})})})}function lf(e,t){return new Promise(o=>{let i=(0,Jo.spawn)("powershell.exe",["-NoProfile","-NonInteractive","-Command",e],{stdio:["pipe","pipe","pipe"],timeout:1e4}),r="",n="";i.stdout?.on("data",s=>{r+=s.toString()}),i.stderr?.on("data",s=>{n+=s.toString()}),i.on("close",s=>{o({stdout:r,stderr:n,code:s})}),i.on("error",()=>{o({stdout:"",stderr:"Failed to spawn process",code:1})}),i.stdin?.on("error",()=>{}),i.stdin?.write(t),i.stdin?.end()})}function mt(e){return e.replace(/'/g,"''")}var Jo,mo,Ar,Rs=he(()=>{"use strict";Jo=require("node:child_process");mo=`
30
30
  try { $null = [Windows.Security.Credentials.PasswordVault] } catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resend-cli",
3
- "version": "2.21.0",
3
+ "version": "2.21.1",
4
4
  "description": "The official CLI for Resend",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -13,7 +13,7 @@ metadata:
13
13
  author: resend
14
14
  # Skill version is independent from the CLI/package.json version —
15
15
  # bump it on skill content changes, not CLI releases.
16
- version: "2.13.0"
16
+ version: "2.14.0"
17
17
  homepage: https://resend.com/docs/cli-agents
18
18
  source: https://github.com/resend/resend-cli
19
19
  openclaw:
@@ -21,10 +21,11 @@ Detailed flag specifications for `resend webhooks` commands.
21
21
  | `--endpoint <url>` | string | Yes (non-interactive) | HTTPS webhook URL |
22
22
  | `--events <events...>` | string[] | Yes (non-interactive) | Event types or `all` |
23
23
 
24
- **All 17 events:**
24
+ **All 19 events:**
25
25
  - Email: `email.sent`, `email.delivered`, `email.delivery_delayed`, `email.bounced`, `email.complained`, `email.opened`, `email.clicked`, `email.failed`, `email.scheduled`, `email.suppressed`, `email.received`
26
26
  - Contact: `contact.created`, `contact.updated`, `contact.deleted`
27
27
  - Domain: `domain.created`, `domain.updated`, `domain.deleted`
28
+ - Suppression: `suppression.added`, `suppression.removed`
28
29
 
29
30
  **Output includes `signing_secret`.** `webhooks get` returns it again.
30
31