resend-cli 2.7.0-preview.0 → 2.7.0-preview.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 +381 -297
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -1,165 +1,249 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var
|
|
3
|
-
`)}displayWidth(t){return
|
|
4
|
-
`+" ".repeat(
|
|
5
|
-
${s}`)}boxWrap(t,
|
|
6
|
-
`)}};function
|
|
2
|
+
"use strict";var Ru=Object.create;var mi=Object.defineProperty;var Du=Object.getOwnPropertyDescriptor;var _u=Object.getOwnPropertyNames;var Bu=Object.getPrototypeOf,Eu=Object.prototype.hasOwnProperty;var me=(e,t,o)=>()=>{if(o)throw o[0];try{return e&&(t=e(e=0)),t}catch(i){throw o=[i],i}};var ve=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(o){throw t=0,o}},Lt=(e,t)=>{for(var o in t)mi(e,o,{get:t[o],enumerable:!0})},Tu=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of _u(t))!Eu.call(e,r)&&r!==o&&mi(e,r,{get:()=>t[r],enumerable:!(i=Du(t,r))||i.enumerable});return e};var fe=(e,t,o)=>(o=e!=null?Ru(Bu(e)):{},Tu(t||!e||!e.__esModule?mi(o,"default",{value:e,enumerable:!0}):o,e));var Wt=ve(gi=>{var go=class extends Error{constructor(t,o,i){super(i),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=o,this.exitCode=t,this.nestedError=void 0}},fi=class extends go{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};gi.CommanderError=go;gi.InvalidArgumentError=fi});var Ao=ve(hi=>{var{InvalidArgumentError:Ou}=Wt(),Ai=class{constructor(t,o){switch(this.description=o||"",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.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(t,o){return o===this.defaultValue||!Array.isArray(o)?[t]:(o.push(t),o)}default(t,o){return this.defaultValue=t,this.defaultValueDescription=o,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(o,i)=>{if(!this.argChoices.includes(o))throw new Ou(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(o,i):o},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function ju(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}hi.Argument=Ai;hi.humanReadableArgName=ju});var yi=ve(Ci=>{var{humanReadableArgName:Iu}=Ao(),bi=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(t){this.helpWidth=this.helpWidth??t.helpWidth??80}visibleCommands(t){let o=t.commands.filter(r=>!r._hidden),i=t._getHelpCommand();return i&&!i._hidden&&o.push(i),this.sortSubcommands&&o.sort((r,n)=>r.name().localeCompare(n.name())),o}compareOptions(t,o){let i=r=>r.short?r.short.replace(/^-/,""):r.long.replace(/^--/,"");return i(t).localeCompare(i(o))}visibleOptions(t){let o=t.options.filter(r=>!r.hidden),i=t._getHelpOption();if(i&&!i.hidden){let r=i.short&&t._findOption(i.short),n=i.long&&t._findOption(i.long);!r&&!n?o.push(i):i.long&&!n?o.push(t.createOption(i.long,i.description)):i.short&&!r&&o.push(t.createOption(i.short,i.description))}return this.sortOptions&&o.sort(this.compareOptions),o}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];let o=[];for(let i=t.parent;i;i=i.parent){let r=i.options.filter(n=>!n.hidden);o.push(...r)}return this.sortOptions&&o.sort(this.compareOptions),o}visibleArguments(t){return t._argsDescription&&t.registeredArguments.forEach(o=>{o.description=o.description||t._argsDescription[o.name()]||""}),t.registeredArguments.find(o=>o.description)?t.registeredArguments:[]}subcommandTerm(t){let o=t.registeredArguments.map(i=>Iu(i)).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(o?" "+o:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,o){return o.visibleCommands(t).reduce((i,r)=>Math.max(i,this.displayWidth(o.styleSubcommandTerm(o.subcommandTerm(r)))),0)}longestOptionTermLength(t,o){return o.visibleOptions(t).reduce((i,r)=>Math.max(i,this.displayWidth(o.styleOptionTerm(o.optionTerm(r)))),0)}longestGlobalOptionTermLength(t,o){return o.visibleGlobalOptions(t).reduce((i,r)=>Math.max(i,this.displayWidth(o.styleOptionTerm(o.optionTerm(r)))),0)}longestArgumentTermLength(t,o){return o.visibleArguments(t).reduce((i,r)=>Math.max(i,this.displayWidth(o.styleArgumentTerm(o.argumentTerm(r)))),0)}commandUsage(t){let o=t._name;t._aliases[0]&&(o=o+"|"+t._aliases[0]);let i="";for(let r=t.parent;r;r=r.parent)i=r.name()+" "+i;return i+o+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){let o=[];if(t.argChoices&&o.push(`choices: ${t.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),t.defaultValue!==void 0&&(t.required||t.optional||t.isBoolean()&&typeof t.defaultValue=="boolean")&&o.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),t.presetArg!==void 0&&t.optional&&o.push(`preset: ${JSON.stringify(t.presetArg)}`),t.envVar!==void 0&&o.push(`env: ${t.envVar}`),o.length>0){let i=`(${o.join(", ")})`;return t.description?`${t.description} ${i}`:i}return t.description}argumentDescription(t){let o=[];if(t.argChoices&&o.push(`choices: ${t.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),t.defaultValue!==void 0&&o.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),o.length>0){let i=`(${o.join(", ")})`;return t.description?`${t.description} ${i}`:i}return t.description}formatItemList(t,o,i){return o.length===0?[]:[i.styleTitle(t),...o,""]}groupItems(t,o,i){let r=new Map;return t.forEach(n=>{let s=i(n);r.has(s)||r.set(s,[])}),o.forEach(n=>{let s=i(n);r.has(s)||r.set(s,[]),r.get(s).push(n)}),r}formatHelp(t,o){let i=o.padWidth(t,o),r=o.helpWidth??80;function n(u,m){return o.formatItem(u,i,m,o)}let s=[`${o.styleTitle("Usage:")} ${o.styleUsage(o.commandUsage(t))}`,""],a=o.commandDescription(t);a.length>0&&(s=s.concat([o.boxWrap(o.styleCommandDescription(a),r),""]));let l=o.visibleArguments(t).map(u=>n(o.styleArgumentTerm(o.argumentTerm(u)),o.styleArgumentDescription(o.argumentDescription(u))));if(s=s.concat(this.formatItemList("Arguments:",l,o)),this.groupItems(t.options,o.visibleOptions(t),u=>u.helpGroupHeading??"Options:").forEach((u,m)=>{let b=u.map(A=>n(o.styleOptionTerm(o.optionTerm(A)),o.styleOptionDescription(o.optionDescription(A))));s=s.concat(this.formatItemList(m,b,o))}),o.showGlobalOptions){let u=o.visibleGlobalOptions(t).map(m=>n(o.styleOptionTerm(o.optionTerm(m)),o.styleOptionDescription(o.optionDescription(m))));s=s.concat(this.formatItemList("Global Options:",u,o))}return this.groupItems(t.commands,o.visibleCommands(t),u=>u.helpGroup()||"Commands:").forEach((u,m)=>{let b=u.map(A=>n(o.styleSubcommandTerm(o.subcommandTerm(A)),o.styleSubcommandDescription(o.subcommandDescription(A))));s=s.concat(this.formatItemList(m,b,o))}),s.join(`
|
|
3
|
+
`)}displayWidth(t){return Er(t).length}styleTitle(t){return t}styleUsage(t){return t.split(" ").map(o=>o==="[options]"?this.styleOptionText(o):o==="[command]"?this.styleSubcommandText(o):o[0]==="["||o[0]==="<"?this.styleArgumentText(o):this.styleCommandText(o)).join(" ")}styleCommandDescription(t){return this.styleDescriptionText(t)}styleOptionDescription(t){return this.styleDescriptionText(t)}styleSubcommandDescription(t){return this.styleDescriptionText(t)}styleArgumentDescription(t){return this.styleDescriptionText(t)}styleDescriptionText(t){return t}styleOptionTerm(t){return this.styleOptionText(t)}styleSubcommandTerm(t){return t.split(" ").map(o=>o==="[options]"?this.styleOptionText(o):o[0]==="["||o[0]==="<"?this.styleArgumentText(o):this.styleSubcommandText(o)).join(" ")}styleArgumentTerm(t){return this.styleArgumentText(t)}styleOptionText(t){return t}styleArgumentText(t){return t}styleSubcommandText(t){return t}styleCommandText(t){return t}padWidth(t,o){return Math.max(o.longestOptionTermLength(t,o),o.longestGlobalOptionTermLength(t,o),o.longestSubcommandTermLength(t,o),o.longestArgumentTermLength(t,o))}preformatted(t){return/\n[^\S\r\n]/.test(t)}formatItem(t,o,i,r){let s=" ".repeat(2);if(!i)return s+t;let a=t.padEnd(o+t.length-r.displayWidth(t)),l=2,c=(this.helpWidth??80)-o-l-2,u;return c<this.minWidthToWrap||r.preformatted(i)?u=i:u=r.boxWrap(i,c).replace(/\n/g,`
|
|
4
|
+
`+" ".repeat(o+l)),s+a+" ".repeat(l)+u.replace(/\n/g,`
|
|
5
|
+
${s}`)}boxWrap(t,o){if(o<this.minWidthToWrap)return t;let i=t.split(/\r\n|\n/),r=/[\s]*[^\s]+/g,n=[];return i.forEach(s=>{let a=s.match(r);if(a===null){n.push("");return}let l=[a.shift()],d=this.displayWidth(l[0]);a.forEach(c=>{let u=this.displayWidth(c);if(d+u<=o){l.push(c),d+=u;return}n.push(l.join(""));let m=c.trimStart();l=[m],d=this.displayWidth(m)}),n.push(l.join(""))}),n.join(`
|
|
6
|
+
`)}};function Er(e){let t=/\x1b\[\d*(;\d*)*m/g;return e.replace(t,"")}Ci.Help=bi;Ci.stripColor=Er});var wi=ve(Si=>{var{InvalidArgumentError:Pu}=Wt(),Ui=class{constructor(t,o){this.flags=t,this.description=o||"",this.required=t.includes("<"),this.optional=t.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(t),this.mandatory=!1;let i=$u(t);this.short=i.shortFlag,this.long=i.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=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(t,o){return this.defaultValue=t,this.defaultValueDescription=o,this}preset(t){return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflictsWith.concat(t),this}implies(t){let o=t;return typeof t=="string"&&(o={[t]:!0}),this.implied=Object.assign(this.implied||{},o),this}env(t){return this.envVar=t,this}argParser(t){return this.parseArg=t,this}makeOptionMandatory(t=!0){return this.mandatory=!!t,this}hideHelp(t=!0){return this.hidden=!!t,this}_collectValue(t,o){return o===this.defaultValue||!Array.isArray(o)?[t]:(o.push(t),o)}choices(t){return this.argChoices=t.slice(),this.parseArg=(o,i)=>{if(!this.argChoices.includes(o))throw new Pu(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(o,i):o},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Tr(this.name().replace(/^no-/,"")):Tr(this.name())}helpGroup(t){return this.helpGroupHeading=t,this}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Ki=class{constructor(t){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,t.forEach(o=>{o.negate?this.negativeOptions.set(o.attributeName(),o):this.positiveOptions.set(o.attributeName(),o)}),this.negativeOptions.forEach((o,i)=>{this.positiveOptions.has(i)&&this.dualOptions.add(i)})}valueFromOption(t,o){let i=o.attributeName();if(!this.dualOptions.has(i))return!0;let r=this.negativeOptions.get(i).presetArg,n=r!==void 0?r:!1;return o.negate===(n===t)}};function Tr(e){return e.split("-").reduce((t,o)=>t+o[0].toUpperCase()+o.slice(1))}function $u(e){let t,o,i=/^-[^-]$/,r=/^--[^-]/,n=e.split(/[ |,]+/).concat("guard");if(i.test(n[0])&&(t=n.shift()),r.test(n[0])&&(o=n.shift()),!t&&i.test(n[0])&&(t=n.shift()),!t&&r.test(n[0])&&(t=o,o=n.shift()),n[0].startsWith("-")){let s=n[0],a=`option creation failed due to '${s}' in option flags '${e}'`;throw/^-[^-][^-]/.test(s)?new Error(`${a}
|
|
7
7
|
- a short flag is a single dash and a single character
|
|
8
8
|
- either use a single dash and a single character (for a short flag)
|
|
9
|
-
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`):
|
|
10
|
-
- too many short flags`):
|
|
9
|
+
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`):i.test(s)?new Error(`${a}
|
|
10
|
+
- too many short flags`):r.test(s)?new Error(`${a}
|
|
11
11
|
- too many long flags`):new Error(`${a}
|
|
12
|
-
- unrecognised flag format`)}if(t===void 0&&
|
|
13
|
-
(Did you mean one of ${
|
|
14
|
-
(Did you mean ${
|
|
15
|
-
- specify the name in Command constructor or using .name()`);return
|
|
16
|
-
Expecting one of '${
|
|
17
|
-
- already used by option '${
|
|
18
|
-
- 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=[],this.processedArgs=[]}_checkForMissingExecutable(t,
|
|
19
|
-
- if '${
|
|
12
|
+
- unrecognised flag format`)}if(t===void 0&&o===void 0)throw new Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:o}}Si.Option=Ui;Si.DualOptions=Ki});var jr=ve(Or=>{function Hu(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let o=[];for(let i=0;i<=e.length;i++)o[i]=[i];for(let i=0;i<=t.length;i++)o[0][i]=i;for(let i=1;i<=t.length;i++)for(let r=1;r<=e.length;r++){let n=1;e[r-1]===t[i-1]?n=0:n=1,o[r][i]=Math.min(o[r-1][i]+1,o[r][i-1]+1,o[r-1][i-1]+n),r>1&&i>1&&e[r-1]===t[i-2]&&e[r-2]===t[i-1]&&(o[r][i]=Math.min(o[r][i],o[r-2][i-2]+1))}return o[e.length][t.length]}function Qu(e,t){if(!t||t.length===0)return"";t=Array.from(new Set(t));let o=e.startsWith("--");o&&(e=e.slice(2),t=t.map(s=>s.slice(2)));let i=[],r=3,n=.4;return t.forEach(s=>{if(s.length<=1)return;let a=Hu(e,s),l=Math.max(e.length,s.length);(l-a)/l>n&&(a<r?(r=a,i=[s]):a===r&&i.push(s))}),i.sort((s,a)=>s.localeCompare(a)),o&&(i=i.map(s=>`--${s}`)),i.length>1?`
|
|
13
|
+
(Did you mean one of ${i.join(", ")}?)`:i.length===1?`
|
|
14
|
+
(Did you mean ${i[0]}?)`:""}Or.suggestSimilar=Qu});var Hr=ve(Ri=>{var Gu=require("node:events").EventEmitter,vi=require("node:child_process"),ze=require("node:path"),ho=require("node:fs"),L=require("node:process"),{Argument:Nu,humanReadableArgName:qu}=Ao(),{CommanderError:xi}=Wt(),{Help:Mu,stripColor:Lu}=yi(),{Option:Ir,DualOptions:Wu}=wi(),{suggestSimilar:Pr}=jr(),Fi=class e extends Gu{constructor(t){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=[],this._scriptPath=null,this._name=t||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:o=>L.stdout.write(o),writeErr:o=>L.stderr.write(o),outputError:(o,i)=>i(o),getOutHelpWidth:()=>L.stdout.isTTY?L.stdout.columns:void 0,getErrHelpWidth:()=>L.stderr.isTTY?L.stderr.columns:void 0,getOutHasColors:()=>ki()??(L.stdout.isTTY&&L.stdout.hasColors?.()),getErrHasColors:()=>ki()??(L.stderr.isTTY&&L.stderr.hasColors?.()),stripColor:o=>Lu(o)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(t){return this._outputConfiguration=t._outputConfiguration,this._helpOption=t._helpOption,this._helpCommand=t._helpCommand,this._helpConfiguration=t._helpConfiguration,this._exitCallback=t._exitCallback,this._storeOptionsAsProperties=t._storeOptionsAsProperties,this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue,this._allowExcessArguments=t._allowExcessArguments,this._enablePositionalOptions=t._enablePositionalOptions,this._showHelpAfterError=t._showHelpAfterError,this._showSuggestionAfterError=t._showSuggestionAfterError,this}_getCommandAndAncestors(){let t=[];for(let o=this;o;o=o.parent)t.push(o);return t}command(t,o,i){let r=o,n=i;typeof r=="object"&&r!==null&&(n=r,r=null),n=n||{};let[,s,a]=t.match(/([^ ]+) *(.*)/),l=this.createCommand(s);return r&&(l.description(r),l._executableHandler=!0),n.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(n.noHelp||n.hidden),l._executableFile=n.executableFile||null,a&&l.arguments(a),this._registerCommand(l),l.parent=this,l.copyInheritedSettings(this),r?this:l}createCommand(t){return new e(t)}createHelp(){return Object.assign(new Mu,this.configureHelp())}configureHelp(t){return t===void 0?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return t===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...t},this)}showHelpAfterError(t=!0){return typeof t!="string"&&(t=!!t),this._showHelpAfterError=t,this}showSuggestionAfterError(t=!0){return this._showSuggestionAfterError=!!t,this}addCommand(t,o){if(!t._name)throw new Error(`Command passed to .addCommand() must have a name
|
|
15
|
+
- specify the name in Command constructor or using .name()`);return o=o||{},o.isDefault&&(this._defaultCommandName=t._name),(o.noHelp||o.hidden)&&(t._hidden=!0),this._registerCommand(t),t.parent=this,t._checkForBrokenPassThrough(),this}createArgument(t,o){return new Nu(t,o)}argument(t,o,i,r){let n=this.createArgument(t,o);return typeof i=="function"?n.default(r).argParser(i):n.default(i),this.addArgument(n),this}arguments(t){return t.trim().split(/ +/).forEach(o=>{this.argument(o)}),this}addArgument(t){let o=this.registeredArguments.slice(-1)[0];if(o?.variadic)throw new Error(`only the last argument can be variadic '${o.name()}'`);if(t.required&&t.defaultValue!==void 0&&t.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${t.name()}'`);return this.registeredArguments.push(t),this}helpCommand(t,o){if(typeof t=="boolean")return this._addImplicitHelpCommand=t,t&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let i=t??"help [command]",[,r,n]=i.match(/([^ ]+) *(.*)/),s=o??"display help for command",a=this.createCommand(r);return a.helpOption(!1),n&&a.arguments(n),s&&a.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=a,(t||o)&&this._initCommandGroup(a),this}addHelpCommand(t,o){return typeof t!="object"?(this.helpCommand(t,o),this):(this._addImplicitHelpCommand=!0,this._helpCommand=t,this._initCommandGroup(t),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(t,o){let i=["preSubcommand","preAction","postAction"];if(!i.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.
|
|
16
|
+
Expecting one of '${i.join("', '")}'`);return this._lifeCycleHooks[t]?this._lifeCycleHooks[t].push(o):this._lifeCycleHooks[t]=[o],this}exitOverride(t){return t?this._exitCallback=t:this._exitCallback=o=>{if(o.code!=="commander.executeSubCommandAsync")throw o},this}_exit(t,o,i){this._exitCallback&&this._exitCallback(new xi(t,o,i)),L.exit(t)}action(t){let o=i=>{let r=this.registeredArguments.length,n=i.slice(0,r);return this._storeOptionsAsProperties?n[r]=this:n[r]=this.opts(),n.push(this),t.apply(this,n)};return this._actionHandler=o,this}createOption(t,o){return new Ir(t,o)}_callParseArg(t,o,i,r){try{return t.parseArg(o,i)}catch(n){if(n.code==="commander.invalidArgument"){let s=`${r} ${n.message}`;this.error(s,{exitCode:n.exitCode,code:n.code})}throw n}}_registerOption(t){let o=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(o){let i=t.long&&this._findOption(t.long)?t.long:t.short;throw new Error(`Cannot add option '${t.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${i}'
|
|
17
|
+
- already used by option '${o.flags}'`)}this._initOptionGroup(t),this.options.push(t)}_registerCommand(t){let o=r=>[r.name()].concat(r.aliases()),i=o(t).find(r=>this._findCommand(r));if(i){let r=o(this._findCommand(i)).join("|"),n=o(t).join("|");throw new Error(`cannot add command '${n}' as already have command '${r}'`)}this._initCommandGroup(t),this.commands.push(t)}addOption(t){this._registerOption(t);let o=t.name(),i=t.attributeName();if(t.negate){let n=t.long.replace(/^--no-/,"--");this._findOption(n)||this.setOptionValueWithSource(i,t.defaultValue===void 0?!0:t.defaultValue,"default")}else t.defaultValue!==void 0&&this.setOptionValueWithSource(i,t.defaultValue,"default");let r=(n,s,a)=>{n==null&&t.presetArg!==void 0&&(n=t.presetArg);let l=this.getOptionValue(i);n!==null&&t.parseArg?n=this._callParseArg(t,n,l,s):n!==null&&t.variadic&&(n=t._collectValue(n,l)),n==null&&(t.negate?n=!1:t.isBoolean()||t.optional?n=!0:n=""),this.setOptionValueWithSource(i,n,a)};return this.on("option:"+o,n=>{let s=`error: option '${t.flags}' argument '${n}' is invalid.`;r(n,s,"cli")}),t.envVar&&this.on("optionEnv:"+o,n=>{let s=`error: option '${t.flags}' value '${n}' from env '${t.envVar}' is invalid.`;r(n,s,"env")}),this}_optionEx(t,o,i,r,n){if(typeof o=="object"&&o instanceof Ir)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(o,i);if(s.makeOptionMandatory(!!t.mandatory),typeof r=="function")s.default(n).argParser(r);else if(r instanceof RegExp){let a=r;r=(l,d)=>{let c=a.exec(l);return c?c[0]:d},s.default(n).argParser(r)}else s.default(r);return this.addOption(s)}option(t,o,i,r){return this._optionEx({},t,o,i,r)}requiredOption(t,o,i,r){return this._optionEx({mandatory:!0},t,o,i,r)}combineFlagAndOptionalValue(t=!0){return this._combineFlagAndOptionalValue=!!t,this}allowUnknownOption(t=!0){return this._allowUnknownOption=!!t,this}allowExcessArguments(t=!0){return this._allowExcessArguments=!!t,this}enablePositionalOptions(t=!0){return this._enablePositionalOptions=!!t,this}passThroughOptions(t=!0){return this._passThroughOptions=!!t,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(t=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!t,this}getOptionValue(t){return this._storeOptionsAsProperties?this[t]:this._optionValues[t]}setOptionValue(t,o){return this.setOptionValueWithSource(t,o,void 0)}setOptionValueWithSource(t,o,i){return this._storeOptionsAsProperties?this[t]=o:this._optionValues[t]=o,this._optionValueSources[t]=i,this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let o;return this._getCommandAndAncestors().forEach(i=>{i.getOptionValueSource(t)!==void 0&&(o=i.getOptionValueSource(t))}),o}_prepareUserArgs(t,o){if(t!==void 0&&!Array.isArray(t))throw new Error("first parameter to parse must be array or undefined");if(o=o||{},t===void 0&&o.from===void 0){L.versions?.electron&&(o.from="electron");let r=L.execArgv??[];(r.includes("-e")||r.includes("--eval")||r.includes("-p")||r.includes("--print"))&&(o.from="eval")}t===void 0&&(t=L.argv),this.rawArgs=t.slice();let i;switch(o.from){case void 0:case"node":this._scriptPath=t[1],i=t.slice(2);break;case"electron":L.defaultApp?(this._scriptPath=t[1],i=t.slice(2)):i=t.slice(1);break;case"user":i=t.slice(0);break;case"eval":i=t.slice(1);break;default:throw new Error(`unexpected parse option { from: '${o.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",i}parse(t,o){this._prepareForParse();let i=this._prepareUserArgs(t,o);return this._parseCommand([],i),this}async parseAsync(t,o){this._prepareForParse();let i=this._prepareUserArgs(t,o);return await this._parseCommand([],i),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
|
|
18
|
+
- 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=[],this.processedArgs=[]}_checkForMissingExecutable(t,o,i){if(ho.existsSync(t))return;let r=o?`searched for local subcommand relative to directory '${o}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",n=`'${t}' does not exist
|
|
19
|
+
- if '${i}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
20
20
|
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
21
|
-
- ${
|
|
21
|
+
- ${r}`;throw new Error(n)}_executeSubCommand(t,o){o=o.slice();let i=!1,r=[".js",".ts",".tsx",".mjs",".cjs"];function n(c,u){let m=ze.resolve(c,u);if(ho.existsSync(m))return m;if(r.includes(ze.extname(u)))return;let b=r.find(A=>ho.existsSync(`${m}${A}`));if(b)return`${m}${b}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=t._executableFile||`${this._name}-${t._name}`,a=this._executableDir||"";if(this._scriptPath){let c;try{c=ho.realpathSync(this._scriptPath)}catch{c=this._scriptPath}a=ze.resolve(ze.dirname(c),a)}if(a){let c=n(a,s);if(!c&&!t._executableFile&&this._scriptPath){let u=ze.basename(this._scriptPath,ze.extname(this._scriptPath));u!==this._name&&(c=n(a,`${u}-${t._name}`))}s=c||s}i=r.includes(ze.extname(s));let l;L.platform!=="win32"?i?(o.unshift(s),o=$r(L.execArgv).concat(o),l=vi.spawn(L.argv[0],o,{stdio:"inherit"})):l=vi.spawn(s,o,{stdio:"inherit"}):(this._checkForMissingExecutable(s,a,t._name),o.unshift(s),o=$r(L.execArgv).concat(o),l=vi.spawn(L.execPath,o,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(u=>{L.on(u,()=>{l.killed===!1&&l.exitCode===null&&l.kill(u)})});let d=this._exitCallback;l.on("close",c=>{c=c??1,d?d(new xi(c,"commander.executeSubCommandAsync","(close)")):L.exit(c)}),l.on("error",c=>{if(c.code==="ENOENT")this._checkForMissingExecutable(s,a,t._name);else if(c.code==="EACCES")throw new Error(`'${s}' not executable`);if(!d)L.exit(1);else{let u=new xi(1,"commander.executeSubCommandAsync","(error)");u.nestedError=c,d(u)}}),this.runningCommand=l}_dispatchSubcommand(t,o,i){let r=this._findCommand(t);r||this.help({error:!0}),r._prepareForParse();let n;return n=this._chainOrCallSubCommandHook(n,r,"preSubcommand"),n=this._chainOrCall(n,()=>{if(r._executableHandler)this._executeSubCommand(r,o.concat(i));else return r._parseCommand(o,i)}),n}_dispatchHelpCommand(t){t||this.help();let o=this._findCommand(t);return o&&!o._executableHandler&&o.help(),this._dispatchSubcommand(t,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((t,o)=>{t.required&&this.args[o]==null&&this.missingArgument(t.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let t=(i,r,n)=>{let s=r;if(r!==null&&i.parseArg){let a=`error: command-argument value '${r}' is invalid for argument '${i.name()}'.`;s=this._callParseArg(i,r,n,a)}return s};this._checkNumberOfArguments();let o=[];this.registeredArguments.forEach((i,r)=>{let n=i.defaultValue;i.variadic?r<this.args.length?(n=this.args.slice(r),i.parseArg&&(n=n.reduce((s,a)=>t(i,a,s),i.defaultValue))):n===void 0&&(n=[]):r<this.args.length&&(n=this.args[r],i.parseArg&&(n=t(i,n,i.defaultValue))),o[r]=n}),this.processedArgs=o}_chainOrCall(t,o){return t?.then&&typeof t.then=="function"?t.then(()=>o()):o()}_chainOrCallHooks(t,o){let i=t,r=[];return this._getCommandAndAncestors().reverse().filter(n=>n._lifeCycleHooks[o]!==void 0).forEach(n=>{n._lifeCycleHooks[o].forEach(s=>{r.push({hookedCommand:n,callback:s})})}),o==="postAction"&&r.reverse(),r.forEach(n=>{i=this._chainOrCall(i,()=>n.callback(n.hookedCommand,this))}),i}_chainOrCallSubCommandHook(t,o,i){let r=t;return this._lifeCycleHooks[i]!==void 0&&this._lifeCycleHooks[i].forEach(n=>{r=this._chainOrCall(r,()=>n(this,o))}),r}_parseCommand(t,o){let i=this.parseOptions(o);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(i.operands),o=i.unknown,this.args=t.concat(o),t&&this._findCommand(t[0]))return this._dispatchSubcommand(t[0],t.slice(1),o);if(this._getHelpCommand()&&t[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(t[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(o),this._dispatchSubcommand(this._defaultCommandName,t,o);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(i.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let r=()=>{i.unknown.length>0&&this.unknownOption(i.unknown[0])},n=`command:${this.name()}`;if(this._actionHandler){r(),this._processArguments();let s;return s=this._chainOrCallHooks(s,"preAction"),s=this._chainOrCall(s,()=>this._actionHandler(this.processedArgs)),this.parent&&(s=this._chainOrCall(s,()=>{this.parent.emit(n,t,o)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent?.listenerCount(n))r(),this._processArguments(),this.parent.emit(n,t,o);else if(t.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",t,o);this.listenerCount("command:*")?this.emit("command:*",t,o):this.commands.length?this.unknownCommand():(r(),this._processArguments())}else this.commands.length?(r(),this.help({error:!0})):(r(),this._processArguments())}_findCommand(t){if(t)return this.commands.find(o=>o._name===t||o._aliases.includes(t))}_findOption(t){return this.options.find(o=>o.is(t))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(t=>{t.options.forEach(o=>{o.mandatory&&t.getOptionValue(o.attributeName())===void 0&&t.missingMandatoryOptionValue(o)})})}_checkForConflictingLocalOptions(){let t=this.options.filter(i=>{let r=i.attributeName();return this.getOptionValue(r)===void 0?!1:this.getOptionValueSource(r)!=="default"});t.filter(i=>i.conflictsWith.length>0).forEach(i=>{let r=t.find(n=>i.conflictsWith.includes(n.attributeName()));r&&this._conflictingOption(i,r)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(t=>{t._checkForConflictingLocalOptions()})}parseOptions(t){let o=[],i=[],r=o;function n(c){return c.length>1&&c[0]==="-"}let s=c=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(c)?!this._getCommandAndAncestors().some(u=>u.options.map(m=>m.short).some(m=>/^-\d$/.test(m))):!1,a=null,l=null,d=0;for(;d<t.length||l;){let c=l??t[d++];if(l=null,c==="--"){r===i&&r.push(c),r.push(...t.slice(d));break}if(a&&(!n(c)||s(c))){this.emit(`option:${a.name()}`,c);continue}if(a=null,n(c)){let u=this._findOption(c);if(u){if(u.required){let m=t[d++];m===void 0&&this.optionMissingArgument(u),this.emit(`option:${u.name()}`,m)}else if(u.optional){let m=null;d<t.length&&(!n(t[d])||s(t[d]))&&(m=t[d++]),this.emit(`option:${u.name()}`,m)}else this.emit(`option:${u.name()}`);a=u.variadic?u:null;continue}}if(c.length>2&&c[0]==="-"&&c[1]!=="-"){let u=this._findOption(`-${c[1]}`);if(u){u.required||u.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${u.name()}`,c.slice(2)):(this.emit(`option:${u.name()}`),l=`-${c.slice(2)}`);continue}}if(/^--[^=]+=/.test(c)){let u=c.indexOf("="),m=this._findOption(c.slice(0,u));if(m&&(m.required||m.optional)){this.emit(`option:${m.name()}`,c.slice(u+1));continue}}if(r===o&&n(c)&&!(this.commands.length===0&&s(c))&&(r=i),(this._enablePositionalOptions||this._passThroughOptions)&&o.length===0&&i.length===0){if(this._findCommand(c)){o.push(c),i.push(...t.slice(d));break}else if(this._getHelpCommand()&&c===this._getHelpCommand().name()){o.push(c,...t.slice(d));break}else if(this._defaultCommandName){i.push(c,...t.slice(d));break}}if(this._passThroughOptions){r.push(c,...t.slice(d));break}r.push(c)}return{operands:o,unknown:i}}opts(){if(this._storeOptionsAsProperties){let t={},o=this.options.length;for(let i=0;i<o;i++){let r=this.options[i].attributeName();t[r]=r===this._versionOptionName?this._version:this[r]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((t,o)=>Object.assign(t,o.opts()),{})}error(t,o){this._outputConfiguration.outputError(`${t}
|
|
22
22
|
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
23
23
|
`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|
24
|
-
`),this.outputHelp({error:!0}));let
|
|
25
|
-
`),this._exit(0,"commander.version",t)}),this}description(t,
|
|
26
|
-
Expecting one of '${
|
|
27
|
-
`)}),this}_outputHelpIfRequested(t){let r=this._getHelpOption();r&&t.find(o=>r.is(o))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Lo(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let r,n="127.0.0.1",o="9229",i;return(i=t.match(/^(--inspect(-brk)?)$/))!==null?r=i[1]:(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=i[1],/^\d+$/.test(i[3])?o=i[3]:n=i[3]):(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=i[1],n=i[3],o=i[4]),r&&o!=="0"?`${r}=${n}:${parseInt(o)+1}`:t})}function Dn(){if(V.env.NO_COLOR||V.env.FORCE_COLOR==="0"||V.env.FORCE_COLOR==="false")return!1;if(V.env.FORCE_COLOR||V.env.CLICOLOR_FORCE!==void 0)return!0}Sn.Command=En;Sn.useColor=Dn});var Wo=Ae(Re=>{var{Argument:Mo}=hr(),{Command:Tn}=Ho(),{CommanderError:Vu,InvalidArgumentError:qo}=Kt(),{Help:Ku}=Cn(),{Option:Uo}=kn();Re.program=new Tn;Re.createCommand=e=>new Tn(e);Re.createOption=(e,t)=>new Uo(e,t);Re.createArgument=(e,t)=>new Mo(e,t);Re.Command=Tn;Re.Option=Uo;Re.Argument=Mo;Re.Help=Ku;Re.CommanderError=Vu;Re.InvalidArgumentError=qo;Re.InvalidOptionArgumentError=qo});var Ko=Ae((Te,Vo)=>{var Le=Wo();Te=Vo.exports={};Te.program=new Le.Command;Te.Argument=Le.Argument;Te.Command=Le.Command;Te.CommanderError=Le.CommanderError;Te.Help=Le.Help;Te.InvalidArgumentError=Le.InvalidArgumentError;Te.InvalidOptionArgumentError=Le.InvalidArgumentError;Te.Option=Le.Option;Te.createCommand=e=>new Le.Command(e);Te.createOption=(e,t)=>new Le.Option(e,t);Te.createArgument=(e,t)=>new Le.Argument(e,t)});var rt=Ae((Cf,On)=>{var yr=process||{},Yo=yr.argv||[],br=yr.env||{},zu=!(br.NO_COLOR||Yo.includes("--no-color"))&&(!!br.FORCE_COLOR||Yo.includes("--color")||yr.platform==="win32"||(yr.stdout||{}).isTTY&&br.TERM!=="dumb"||!!br.CI),Ju=(e,t,r=e)=>n=>{let o=""+n,i=o.indexOf(t,e.length);return~i?e+Yu(o,t,r,i)+t:e+o+t},Yu=(e,t,r,n)=>{let o="",i=0;do o+=e.substring(i,n)+r,i=n+t.length,n=e.indexOf(t,i);while(~n);return o+e.substring(i)},Qo=(e=zu)=>{let t=e?Ju:()=>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")}};On.exports=Qo();On.exports.createColors=Qo});var Fn=Ae((Sf,mi)=>{"use strict";var Rn={to(e,t){return t?`\x1B[${t+1};${e+1}H`:`\x1B[${e+1}G`},move(e,t){let r="";return e<0?r+=`\x1B[${-e}D`:e>0&&(r+=`\x1B[${e}C`),t<0?r+=`\x1B[${-t}A`:t>0&&(r+=`\x1B[${t}B`),r},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"},pd={up:(e=1)=>"\x1B[S".repeat(e),down:(e=1)=>"\x1B[T".repeat(e)},fd={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 r=0;r<e;r++)t+=this.line+(r<e-1?Rn.up():"");return e&&(t+=Rn.left),t}};mi.exports={cursor:Rn,scroll:pd,erase:fd,beep:"\x07"}});var Mn,Ei=ye(()=>{Mn={name:"resend-cli",version:"2.7.0-preview.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.14.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 te,Di,yt=ye(()=>{"use strict";Ei();te=Mn.version,Di=Mn.name});var Gi=Ae(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.timingSafeEqual=void 0;function Bi(e,t=""){if(!e)throw new Error(t)}function Ud(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)),Bi(e instanceof DataView),Bi(t instanceof DataView);let r=e.byteLength,n=0,o=-1;for(;++o<r;)n|=e.getUint8(o)^t.getUint8(o);return n===0}Or.timingSafeEqual=Ud});var Mi=Ae(Ie=>{"use strict";var Wd=Ie&&Ie.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();Object.defineProperty(Ie,"__esModule",{value:!0});var oe=256,Qn=(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 r="",n=0;n<t.length-2;n+=3){var o=t[n]<<16|t[n+1]<<8|t[n+2];r+=this._encodeByte(o>>>18&63),r+=this._encodeByte(o>>>12&63),r+=this._encodeByte(o>>>6&63),r+=this._encodeByte(o>>>0&63)}var i=t.length-n;if(i>0){var o=t[n]<<16|(i===2?t[n+1]<<8:0);r+=this._encodeByte(o>>>18&63),r+=this._encodeByte(o>>>12&63),i===2?r+=this._encodeByte(o>>>6&63):r+=this._paddingCharacter||"",r+=this._paddingCharacter||""}return r},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 r=this._getPaddingLength(t),n=t.length-r,o=new Uint8Array(this.maxDecodedLength(n)),i=0,s=0,a=0,l=0,d=0,c=0,u=0;s<n-4;s+=4)l=this._decodeChar(t.charCodeAt(s+0)),d=this._decodeChar(t.charCodeAt(s+1)),c=this._decodeChar(t.charCodeAt(s+2)),u=this._decodeChar(t.charCodeAt(s+3)),o[i++]=l<<2|d>>>4,o[i++]=d<<4|c>>>2,o[i++]=c<<6|u,a|=l&oe,a|=d&oe,a|=c&oe,a|=u&oe;if(s<n-1&&(l=this._decodeChar(t.charCodeAt(s)),d=this._decodeChar(t.charCodeAt(s+1)),o[i++]=l<<2|d>>>4,a|=l&oe,a|=d&oe),s<n-2&&(c=this._decodeChar(t.charCodeAt(s+2)),o[i++]=d<<4|c>>>2,a|=c&oe),s<n-3&&(u=this._decodeChar(t.charCodeAt(s+3)),o[i++]=c<<6|u,a|=u&oe),a!==0)throw new Error("Base64Coder: incorrect characters for decoding");return o},e.prototype._encodeByte=function(t){var r=t;return r+=65,r+=25-t>>>8&6,r+=51-t>>>8&-75,r+=61-t>>>8&-15,r+=62-t>>>8&3,String.fromCharCode(r)},e.prototype._decodeChar=function(t){var r=oe;return r+=(42-t&t-44)>>>8&-oe+t-43+62,r+=(46-t&t-48)>>>8&-oe+t-47+63,r+=(47-t&t-58)>>>8&-oe+t-48+52,r+=(64-t&t-91)>>>8&-oe+t-65+0,r+=(96-t&t-123)>>>8&-oe+t-97+26,r},e.prototype._getPaddingLength=function(t){var r=0;if(this._paddingCharacter){for(var n=t.length-1;n>=0&&t[n]===this._paddingCharacter;n--)r++;if(t.length<4||r>2)throw new Error("Base64Coder: incorrect padding")}return r},e})();Ie.Coder=Qn;var nr=new Qn;function Vd(e){return nr.encode(e)}Ie.encode=Vd;function Kd(e){return nr.decode(e)}Ie.decode=Kd;var Li=(function(e){Wd(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype._encodeByte=function(r){var n=r;return n+=65,n+=25-r>>>8&6,n+=51-r>>>8&-75,n+=61-r>>>8&-13,n+=62-r>>>8&49,String.fromCharCode(n)},t.prototype._decodeChar=function(r){var n=oe;return n+=(44-r&r-46)>>>8&-oe+r-45+62,n+=(94-r&r-96)>>>8&-oe+r-95+63,n+=(47-r&r-58)>>>8&-oe+r-48+52,n+=(64-r&r-91)>>>8&-oe+r-65+0,n+=(96-r&r-123)>>>8&-oe+r-97+26,n},t})(Qn);Ie.URLSafeCoder=Li;var Hi=new Li;function zd(e){return Hi.encode(e)}Ie.encodeURLSafe=zd;function Jd(e){return Hi.decode(e)}Ie.decodeURLSafe=Jd;Ie.encodedLength=function(e){return nr.encodedLength(e)};Ie.maxDecodedLength=function(e){return nr.maxDecodedLength(e)};Ie.decodedLength=function(e){return nr.decodedLength(e)}});var Ui=Ae((qi,Ir)=>{(function(e,t){var r={};t(r);var n=r.default;for(var o in r)n[o]=r[o];typeof Ir=="object"&&typeof Ir.exports=="object"?Ir.exports=n:typeof define=="function"&&define.amd?define(function(){return n}):e.sha256=n})(qi,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 r(u,p,y,g,b){for(var _,k,x,A,B,D,I,T,E,P,be,ee,gt;b>=64;){for(_=p[0],k=p[1],x=p[2],A=p[3],B=p[4],D=p[5],I=p[6],T=p[7],P=0;P<16;P++)be=g+P*4,u[P]=(y[be]&255)<<24|(y[be+1]&255)<<16|(y[be+2]&255)<<8|y[be+3]&255;for(P=16;P<64;P++)E=u[P-2],ee=(E>>>17|E<<15)^(E>>>19|E<<13)^E>>>10,E=u[P-15],gt=(E>>>7|E<<25)^(E>>>18|E<<14)^E>>>3,u[P]=(ee+u[P-7]|0)+(gt+u[P-16]|0);for(P=0;P<64;P++)ee=(((B>>>6|B<<26)^(B>>>11|B<<21)^(B>>>25|B<<7))+(B&D^~B&I)|0)+(T+(t[P]+u[P]|0)|0)|0,gt=((_>>>2|_<<30)^(_>>>13|_<<19)^(_>>>22|_<<10))+(_&k^_&x^k&x)|0,T=I,I=D,D=B,B=A+ee|0,A=x,x=k,k=_,_=ee+gt|0;p[0]+=_,p[1]+=k,p[2]+=x,p[3]+=A,p[4]+=B,p[5]+=D,p[6]+=I,p[7]+=T,g+=64,b-=64}return g}var n=(function(){function u(){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 u.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},u.prototype.clean=function(){for(var p=0;p<this.buffer.length;p++)this.buffer[p]=0;for(var p=0;p<this.temp.length;p++)this.temp[p]=0;this.reset()},u.prototype.update=function(p,y){if(y===void 0&&(y=p.length),this.finished)throw new Error("SHA256: can't update because hash was finished.");var g=0;if(this.bytesHashed+=y,this.bufferLength>0){for(;this.bufferLength<64&&y>0;)this.buffer[this.bufferLength++]=p[g++],y--;this.bufferLength===64&&(r(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(y>=64&&(g=r(this.temp,this.state,p,g,y),y%=64);y>0;)this.buffer[this.bufferLength++]=p[g++],y--;return this},u.prototype.finish=function(p){if(!this.finished){var y=this.bytesHashed,g=this.bufferLength,b=y/536870912|0,_=y<<3,k=y%64<56?64:128;this.buffer[g]=128;for(var x=g+1;x<k-8;x++)this.buffer[x]=0;this.buffer[k-8]=b>>>24&255,this.buffer[k-7]=b>>>16&255,this.buffer[k-6]=b>>>8&255,this.buffer[k-5]=b>>>0&255,this.buffer[k-4]=_>>>24&255,this.buffer[k-3]=_>>>16&255,this.buffer[k-2]=_>>>8&255,this.buffer[k-1]=_>>>0&255,r(this.temp,this.state,this.buffer,0,k),this.finished=!0}for(var x=0;x<8;x++)p[x*4+0]=this.state[x]>>>24&255,p[x*4+1]=this.state[x]>>>16&255,p[x*4+2]=this.state[x]>>>8&255,p[x*4+3]=this.state[x]>>>0&255;return this},u.prototype.digest=function(){var p=new Uint8Array(this.digestLength);return this.finish(p),p},u.prototype._saveState=function(p){for(var y=0;y<this.state.length;y++)p[y]=this.state[y]},u.prototype._restoreState=function(p,y){for(var g=0;g<this.state.length;g++)this.state[g]=p[g];this.bytesHashed=y,this.finished=!1,this.bufferLength=0},u})();e.Hash=n;var o=(function(){function u(p){this.inner=new n,this.outer=new n,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var y=new Uint8Array(this.blockSize);if(p.length>this.blockSize)new n().update(p).finish(y).clean();else for(var g=0;g<p.length;g++)y[g]=p[g];for(var g=0;g<y.length;g++)y[g]^=54;this.inner.update(y);for(var g=0;g<y.length;g++)y[g]^=106;this.outer.update(y),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate);for(var g=0;g<y.length;g++)y[g]=0}return u.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},u.prototype.clean=function(){for(var p=0;p<this.istate.length;p++)this.ostate[p]=this.istate[p]=0;this.inner.clean(),this.outer.clean()},u.prototype.update=function(p){return this.inner.update(p),this},u.prototype.finish=function(p){return this.outer.finished?this.outer.finish(p):(this.inner.finish(p),this.outer.update(p,this.digestLength).finish(p)),this},u.prototype.digest=function(){var p=new Uint8Array(this.digestLength);return this.finish(p),p},u})();e.HMAC=o;function i(u){var p=new n().update(u),y=p.digest();return p.clean(),y}e.hash=i,e.default=i;function s(u,p){var y=new o(u).update(p),g=y.digest();return y.clean(),g}e.hmac=s;function a(u,p,y,g){var b=g[0];if(b===0)throw new Error("hkdf: cannot expand more");p.reset(),b>1&&p.update(u),y&&p.update(y),p.update(g),p.finish(u),g[0]++}var l=new Uint8Array(e.digestLength);function d(u,p,y,g){p===void 0&&(p=l),g===void 0&&(g=32);for(var b=new Uint8Array([1]),_=s(p,u),k=new o(_),x=new Uint8Array(k.digestLength),A=x.length,B=new Uint8Array(g),D=0;D<g;D++)A===x.length&&(a(x,k,y,b),A=0),B[D]=x[A++];return k.clean(),x.fill(0),b.fill(0),B}e.hkdf=d;function c(u,p,y,g){for(var b=new o(u),_=b.digestLength,k=new Uint8Array(4),x=new Uint8Array(_),A=new Uint8Array(_),B=new Uint8Array(g),D=0;D*_<g;D++){var I=D+1;k[0]=I>>>24&255,k[1]=I>>>16&255,k[2]=I>>>8&255,k[3]=I>>>0&255,b.reset(),b.update(p),b.update(k),b.finish(A);for(var T=0;T<_;T++)x[T]=A[T];for(var T=2;T<=y;T++){b.reset(),b.update(A).finish(A);for(var E=0;E<_;E++)x[E]^=A[E]}for(var T=0;T<_&&D*_+T<g;T++)B[D*_+T]=x[T]}for(var D=0;D<_;D++)x[D]=A[D]=0;for(var D=0;D<4;D++)k[D]=0;return b.clean(),B}e.pbkdf2=c})});var Ki=Ae(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.Webhook=Et.WebhookVerificationError=void 0;var Yd=Gi(),Wi=Mi(),Qd=Ui(),Vi=300,Xn=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype),this.name="ExtendableError",this.stack=new Error(t).stack}},at=class e extends Xn{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype),this.name="WebhookVerificationError"}};Et.WebhookVerificationError=at;var Pr=class e{constructor(t,r){if(!t)throw new Error("Secret can't be empty.");if(r?.format==="raw")t instanceof Uint8Array?this.key=t:this.key=Uint8Array.from(t,n=>n.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=Wi.decode(t)}}verify(t,r){let n={};for(let p of Object.keys(r))n[p.toLowerCase()]=r[p];let o=n["webhook-id"],i=n["webhook-signature"],s=n["webhook-timestamp"];if(!i||!o||!s)throw new at("Missing required headers");let a=this.verifyTimestamp(s),d=this.sign(o,a,t).split(",")[1],c=i.split(" "),u=new globalThis.TextEncoder;for(let p of c){let[y,g]=p.split(",");if(y==="v1"&&(0,Yd.timingSafeEqual)(u.encode(g),u.encode(d)))return JSON.parse(t.toString())}throw new at("No matching signature found")}sign(t,r,n){if(typeof n!="string")if(n.constructor.name==="Buffer")n=n.toString();else throw new Error("Expected payload to be of type string or Buffer.");let o=new TextEncoder,i=Math.floor(r.getTime()/1e3),s=o.encode(`${t}.${i}.${n}`);return`v1,${Wi.encode(Qd.hmac(this.key,s))}`}verifyTimestamp(t){let r=Math.floor(Date.now()/1e3),n=parseInt(t,10);if(isNaN(n))throw new at("Invalid Signature Headers");if(r-n>Vi)throw new at("Message timestamp too old");if(n>r+Vi)throw new at("Message timestamp too new");return new Date(n*1e3)}};Et.Webhook=Pr;Pr.prefix="whsec_"});var jr,os=ye(()=>{"use strict";jr=class extends Error{constructor(t){super(`Credentials file is corrupted or contains invalid JSON: ${t}
|
|
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 L.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()}`,L.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new Wu(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(u=>u.negate&&a===u.attributeName()),c=this.options.find(u=>!u.negate&&a===u.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=Pr(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=Pr(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
|
+
`),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=>qu(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=ze.basename(t,ze.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(L.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
|
+
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 $r(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 ki(){if(L.env.NO_COLOR||L.env.FORCE_COLOR==="0"||L.env.FORCE_COLOR==="false")return!1;if(L.env.FORCE_COLOR||L.env.CLICOLOR_FORCE!==void 0)return!0}Ri.Command=Fi;Ri.useColor=ki});var qr=ve(Oe=>{var{Argument:Qr}=Ao(),{Command:Di}=Hr(),{CommanderError:Ju,InvalidArgumentError:Gr}=Wt(),{Help:Vu}=yi(),{Option:Nr}=wi();Oe.program=new Di;Oe.createCommand=e=>new Di(e);Oe.createOption=(e,t)=>new Nr(e,t);Oe.createArgument=(e,t)=>new Qr(e,t);Oe.Command=Di;Oe.Option=Nr;Oe.Argument=Qr;Oe.Help=Vu;Oe.CommanderError=Ju;Oe.InvalidArgumentError=Gr;Oe.InvalidOptionArgumentError=Gr});var Lr=ve((De,Mr)=>{var He=qr();De=Mr.exports={};De.program=new He.Command;De.Argument=He.Argument;De.Command=He.Command;De.CommanderError=He.CommanderError;De.Help=He.Help;De.InvalidArgumentError=He.InvalidArgumentError;De.InvalidOptionArgumentError=He.InvalidArgumentError;De.Option=He.Option;De.createCommand=e=>new He.Command(e);De.createOption=(e,t)=>new He.Option(e,t);De.createArgument=(e,t)=>new He.Argument(e,t)});var ot=ve((Sf,_i)=>{var Co=process||{},Vr=Co.argv||[],bo=Co.env||{},zu=!(bo.NO_COLOR||Vr.includes("--no-color"))&&(!!bo.FORCE_COLOR||Vr.includes("--color")||Co.platform==="win32"||(Co.stdout||{}).isTTY&&bo.TERM!=="dumb"||!!bo.CI),Yu=(e,t,o=e)=>i=>{let r=""+i,n=r.indexOf(t,e.length);return~n?e+Xu(r,t,o,n)+t:e+r+t},Xu=(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)},zr=(e=zu)=>{let t=e?Yu:()=>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")}};_i.exports=zr();_i.exports.createColors=zr});var ji=ve((Bf,pn)=>{"use strict";var Oi={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"},gd={up:(e=1)=>"\x1B[S".repeat(e),down:(e=1)=>"\x1B[T".repeat(e)},Ad={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?Oi.up():"");return e&&(t+=Oi.left),t}};pn.exports={cursor:Oi,scroll:gd,erase:Ad,beep:"\x07"}});var Gi,Fn=me(()=>{Gi={name:"resend-cli",version:"2.7.0-preview.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.14.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 te,kn,bt=me(()=>{"use strict";Fn();te=Gi.version,kn=Gi.name});var $n=ve(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});Bo.timingSafeEqual=void 0;function Pn(e,t=""){if(!e)throw new Error(t)}function Ld(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)),Pn(e instanceof DataView),Pn(t instanceof DataView);let o=e.byteLength,i=0,r=-1;for(;++r<o;)i|=e.getUint8(r)^t.getUint8(r);return i===0}Bo.timingSafeEqual=Ld});var Gn=ve(Be=>{"use strict";var Wd=Be&&Be.__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(Be,"__esModule",{value:!0});var re=256,Yi=(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,u=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)),u=this._decodeChar(t.charCodeAt(s+3)),r[n++]=l<<2|d>>>4,r[n++]=d<<4|c>>>2,r[n++]=c<<6|u,a|=l&re,a|=d&re,a|=c&re,a|=u&re;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&re,a|=d&re),s<i-2&&(c=this._decodeChar(t.charCodeAt(s+2)),r[n++]=d<<4|c>>>2,a|=c&re),s<i-3&&(u=this._decodeChar(t.charCodeAt(s+3)),r[n++]=c<<6|u,a|=u&re),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=re;return o+=(42-t&t-44)>>>8&-re+t-43+62,o+=(46-t&t-48)>>>8&-re+t-47+63,o+=(47-t&t-58)>>>8&-re+t-48+52,o+=(64-t&t-91)>>>8&-re+t-65+0,o+=(96-t&t-123)>>>8&-re+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})();Be.Coder=Yi;var io=new Yi;function Jd(e){return io.encode(e)}Be.encode=Jd;function Vd(e){return io.decode(e)}Be.decode=Vd;var Hn=(function(e){Wd(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=re;return i+=(44-o&o-46)>>>8&-re+o-45+62,i+=(94-o&o-96)>>>8&-re+o-95+63,i+=(47-o&o-58)>>>8&-re+o-48+52,i+=(64-o&o-91)>>>8&-re+o-65+0,i+=(96-o&o-123)>>>8&-re+o-97+26,i},t})(Yi);Be.URLSafeCoder=Hn;var Qn=new Hn;function zd(e){return Qn.encode(e)}Be.encodeURLSafe=zd;function Yd(e){return Qn.decode(e)}Be.decodeURLSafe=Yd;Be.encodedLength=function(e){return io.encodedLength(e)};Be.maxDecodedLength=function(e){return io.maxDecodedLength(e)};Be.decodedLength=function(e){return io.decodedLength(e)}});var qn=ve((Nn,Eo)=>{(function(e,t){var o={};t(o);var i=o.default;for(var r in o)i[r]=o[r];typeof Eo=="object"&&typeof Eo.exports=="object"?Eo.exports=i:typeof define=="function"&&define.amd?define(function(){return i}):e.sha256=i})(Nn,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(u,m,b,A,h){for(var K,w,S,v,P,k,B,D,F,E,be,ee,At;h>=64;){for(K=m[0],w=m[1],S=m[2],v=m[3],P=m[4],k=m[5],B=m[6],D=m[7],E=0;E<16;E++)be=A+E*4,u[E]=(b[be]&255)<<24|(b[be+1]&255)<<16|(b[be+2]&255)<<8|b[be+3]&255;for(E=16;E<64;E++)F=u[E-2],ee=(F>>>17|F<<15)^(F>>>19|F<<13)^F>>>10,F=u[E-15],At=(F>>>7|F<<25)^(F>>>18|F<<14)^F>>>3,u[E]=(ee+u[E-7]|0)+(At+u[E-16]|0);for(E=0;E<64;E++)ee=(((P>>>6|P<<26)^(P>>>11|P<<21)^(P>>>25|P<<7))+(P&k^~P&B)|0)+(D+(t[E]+u[E]|0)|0)|0,At=((K>>>2|K<<30)^(K>>>13|K<<19)^(K>>>22|K<<10))+(K&w^K&S^w&S)|0,D=B,B=k,k=P,P=v+ee|0,v=S,S=w,w=K,K=ee+At|0;m[0]+=K,m[1]+=w,m[2]+=S,m[3]+=v,m[4]+=P,m[5]+=k,m[6]+=B,m[7]+=D,A+=64,h-=64}return A}var i=(function(){function u(){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 u.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},u.prototype.clean=function(){for(var m=0;m<this.buffer.length;m++)this.buffer[m]=0;for(var m=0;m<this.temp.length;m++)this.temp[m]=0;this.reset()},u.prototype.update=function(m,b){if(b===void 0&&(b=m.length),this.finished)throw new Error("SHA256: can't update because hash was finished.");var A=0;if(this.bytesHashed+=b,this.bufferLength>0){for(;this.bufferLength<64&&b>0;)this.buffer[this.bufferLength++]=m[A++],b--;this.bufferLength===64&&(o(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(b>=64&&(A=o(this.temp,this.state,m,A,b),b%=64);b>0;)this.buffer[this.bufferLength++]=m[A++],b--;return this},u.prototype.finish=function(m){if(!this.finished){var b=this.bytesHashed,A=this.bufferLength,h=b/536870912|0,K=b<<3,w=b%64<56?64:128;this.buffer[A]=128;for(var S=A+1;S<w-8;S++)this.buffer[S]=0;this.buffer[w-8]=h>>>24&255,this.buffer[w-7]=h>>>16&255,this.buffer[w-6]=h>>>8&255,this.buffer[w-5]=h>>>0&255,this.buffer[w-4]=K>>>24&255,this.buffer[w-3]=K>>>16&255,this.buffer[w-2]=K>>>8&255,this.buffer[w-1]=K>>>0&255,o(this.temp,this.state,this.buffer,0,w),this.finished=!0}for(var S=0;S<8;S++)m[S*4+0]=this.state[S]>>>24&255,m[S*4+1]=this.state[S]>>>16&255,m[S*4+2]=this.state[S]>>>8&255,m[S*4+3]=this.state[S]>>>0&255;return this},u.prototype.digest=function(){var m=new Uint8Array(this.digestLength);return this.finish(m),m},u.prototype._saveState=function(m){for(var b=0;b<this.state.length;b++)m[b]=this.state[b]},u.prototype._restoreState=function(m,b){for(var A=0;A<this.state.length;A++)this.state[A]=m[A];this.bytesHashed=b,this.finished=!1,this.bufferLength=0},u})();e.Hash=i;var r=(function(){function u(m){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(m.length>this.blockSize)new i().update(m).finish(b).clean();else for(var A=0;A<m.length;A++)b[A]=m[A];for(var A=0;A<b.length;A++)b[A]^=54;this.inner.update(b);for(var A=0;A<b.length;A++)b[A]^=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 A=0;A<b.length;A++)b[A]=0}return u.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},u.prototype.clean=function(){for(var m=0;m<this.istate.length;m++)this.ostate[m]=this.istate[m]=0;this.inner.clean(),this.outer.clean()},u.prototype.update=function(m){return this.inner.update(m),this},u.prototype.finish=function(m){return this.outer.finished?this.outer.finish(m):(this.inner.finish(m),this.outer.update(m,this.digestLength).finish(m)),this},u.prototype.digest=function(){var m=new Uint8Array(this.digestLength);return this.finish(m),m},u})();e.HMAC=r;function n(u){var m=new i().update(u),b=m.digest();return m.clean(),b}e.hash=n,e.default=n;function s(u,m){var b=new r(u).update(m),A=b.digest();return b.clean(),A}e.hmac=s;function a(u,m,b,A){var h=A[0];if(h===0)throw new Error("hkdf: cannot expand more");m.reset(),h>1&&m.update(u),b&&m.update(b),m.update(A),m.finish(u),A[0]++}var l=new Uint8Array(e.digestLength);function d(u,m,b,A){m===void 0&&(m=l),A===void 0&&(A=32);for(var h=new Uint8Array([1]),K=s(m,u),w=new r(K),S=new Uint8Array(w.digestLength),v=S.length,P=new Uint8Array(A),k=0;k<A;k++)v===S.length&&(a(S,w,b,h),v=0),P[k]=S[v++];return w.clean(),S.fill(0),h.fill(0),P}e.hkdf=d;function c(u,m,b,A){for(var h=new r(u),K=h.digestLength,w=new Uint8Array(4),S=new Uint8Array(K),v=new Uint8Array(K),P=new Uint8Array(A),k=0;k*K<A;k++){var B=k+1;w[0]=B>>>24&255,w[1]=B>>>16&255,w[2]=B>>>8&255,w[3]=B>>>0&255,h.reset(),h.update(m),h.update(w),h.finish(v);for(var D=0;D<K;D++)S[D]=v[D];for(var D=2;D<=b;D++){h.reset(),h.update(v).finish(v);for(var F=0;F<K;F++)S[F]^=v[F]}for(var D=0;D<K&&k*K+D<A;D++)P[k*K+D]=S[D]}for(var k=0;k<K;k++)S[k]=v[k]=0;for(var k=0;k<4;k++)w[k]=0;return h.clean(),P}e.pbkdf2=c})});var Wn=ve(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.Webhook=Ft.WebhookVerificationError=void 0;var Xd=$n(),Mn=Gn(),Zd=qn(),Ln=300,Xi=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype),this.name="ExtendableError",this.stack=new Error(t).stack}},at=class e extends Xi{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype),this.name="WebhookVerificationError"}};Ft.WebhookVerificationError=at;var To=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=Mn.decode(t)}}verify(t,o){let i={};for(let m of Object.keys(o))i[m.toLowerCase()]=o[m];let r=i["webhook-id"],n=i["webhook-signature"],s=i["webhook-timestamp"];if(!n||!r||!s)throw new at("Missing required headers");let a=this.verifyTimestamp(s),d=this.sign(r,a,t).split(",")[1],c=n.split(" "),u=new globalThis.TextEncoder;for(let m of c){let[b,A]=m.split(",");if(b==="v1"&&(0,Xd.timingSafeEqual)(u.encode(A),u.encode(d)))return JSON.parse(t.toString())}throw new at("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,${Mn.encode(Zd.hmac(this.key,s))}`}verifyTimestamp(t){let o=Math.floor(Date.now()/1e3),i=parseInt(t,10);if(isNaN(i))throw new at("Invalid Signature Headers");if(o-i>Ln)throw new at("Message timestamp too old");if(i>o+Ln)throw new at("Message timestamp too new");return new Date(i*1e3)}};Ft.Webhook=To;To.prefix="whsec_"});var Oo,rs=me(()=>{"use strict";Oo=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
|
-
To fix: either repair the JSON manually, or delete the file and run: resend login`),this.name="CorruptedCredentialsError"}}});var
|
|
29
|
+
To fix: either repair the JSON manually, or delete the file and run: resend login`),this.name="CorruptedCredentialsError"}}});var er={};Lt(er,{FileBackend:()=>Zi});var Zi,tr=me(()=>{"use strict";ge();Zi=class{name="plaintext file";isSecure=!1;async get(t,o){let i=ye();if(!i)return null;let r=i.profiles[o];return(r?.type==="api_key"?r.api_key:null)??null}async set(t,o,i){or(i,o)}async delete(t,o){try{return ns(o),!0}catch{return!1}}async isAvailable(){return!0}}});var as={};Lt(as,{MacOSBackend:()=>rr});function ir(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,rr,ls=me(()=>{"use strict";ss=require("node:child_process");rr=class{name="macOS Keychain";isSecure=!0;async get(t,o){let{stdout:i,stderr:r,code:n}=await ir("/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 ir("/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 ir("/usr/bin/security",["delete-generic-password","-s",t,"-a",o]);return i===0}async isAvailable(){return process.platform==="darwin"}}});var cs={};Lt(cs,{LinuxBackend:()=>nr});function jo(e,t,o){return new Promise(i=>{(0,Io.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 _p(e,t,o){return new Promise(i=>{let r=(0,Io.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 Io,nr,us=me(()=>{"use strict";Io=require("node:child_process");nr=class{name="Secret Service (libsecret)";isSecure=!0;async get(t,o){let{stdout:i,code:r}=await jo("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 _p("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 jo("secret-tool",["clear","service",t,"account",o]);return i===0}async isAvailable(){if(process.platform!=="linux"||(await jo("which",["secret-tool"])).code!==0)return!1;let o=await jo("secret-tool",["lookup","service","__resend_cli_probe__"],{timeout:3e3});return o.code===0||o.code===1}}});var ds={};Lt(ds,{WindowsBackend:()=>sr});function Po(e){return new Promise(t=>{(0,$o.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 Bp(e,t){return new Promise(o=>{let i=(0,$o.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 lt(e){return e.replace(/'/g,"''")}var $o,no,sr,ps=me(()=>{"use strict";$o=require("node:child_process");no=`
|
|
30
30
|
try { $null = [Windows.Security.Credentials.PasswordVault] } catch {
|
|
31
31
|
[void][Windows.Security.Credentials.PasswordVault,Windows.Security.Credentials,ContentType=WindowsRuntime]
|
|
32
32
|
}
|
|
33
|
-
`,
|
|
33
|
+
`,sr=class{name="Windows Credential Manager";isSecure=!0;async get(t,o){let i=`${no}
|
|
34
34
|
$v = New-Object Windows.Security.Credentials.PasswordVault
|
|
35
35
|
try {
|
|
36
|
-
$c = $v.Retrieve('${lt(t)}', '${lt(
|
|
36
|
+
$c = $v.Retrieve('${lt(t)}', '${lt(o)}')
|
|
37
37
|
$c.RetrievePassword()
|
|
38
38
|
Write-Output $c.Password
|
|
39
39
|
} catch {
|
|
40
40
|
exit 1
|
|
41
41
|
}
|
|
42
|
-
`,{stdout:
|
|
42
|
+
`,{stdout:r,code:n}=await Po(i);return n!==0||!r.trim()?null:r.trim()}async set(t,o,i){let r=`${no}
|
|
43
43
|
$v = New-Object Windows.Security.Credentials.PasswordVault
|
|
44
44
|
try {
|
|
45
|
-
$c = $v.Retrieve('${lt(t)}', '${lt(
|
|
45
|
+
$c = $v.Retrieve('${lt(t)}', '${lt(o)}')
|
|
46
46
|
$v.Remove($c)
|
|
47
47
|
} catch {}
|
|
48
|
-
`;await
|
|
48
|
+
`;await Po(r);let n=`${no}
|
|
49
49
|
$secret = [Console]::In.ReadLine()
|
|
50
50
|
$v = New-Object Windows.Security.Credentials.PasswordVault
|
|
51
|
-
$c = New-Object Windows.Security.Credentials.PasswordCredential('${lt(t)}', '${lt(
|
|
51
|
+
$c = New-Object Windows.Security.Credentials.PasswordCredential('${lt(t)}', '${lt(o)}', $secret)
|
|
52
52
|
$v.Add($c)
|
|
53
|
-
`,{code:s,stderr:a}=await
|
|
53
|
+
`,{code:s,stderr:a}=await Bp(n,i);if(s!==0)throw new Error(`Failed to store credential in Windows Credential Manager: ${a.trim()}`)}async delete(t,o){let i=`${no}
|
|
54
54
|
$v = New-Object Windows.Security.Credentials.PasswordVault
|
|
55
55
|
try {
|
|
56
|
-
$c = $v.Retrieve('${lt(t)}', '${lt(
|
|
56
|
+
$c = $v.Retrieve('${lt(t)}', '${lt(o)}')
|
|
57
57
|
$v.Remove($c)
|
|
58
58
|
} catch {
|
|
59
59
|
exit 1
|
|
60
60
|
}
|
|
61
|
-
`,{code:o}=await Nr(n);return o===0}async isAvailable(){if(process.platform!=="win32")return!1;let{code:t}=await Nr(`${ir} $null = New-Object Windows.Security.Credentials.PasswordVault`);return t===0}}});async function Qe(){if(Ve)return Ve;let e=process.env.RESEND_CREDENTIAL_STORE;if(e==="file"){let{FileBackend:r}=await Promise.resolve().then(()=>(to(),eo));return Ve=new r,Ve}if(e==="secure_storage"){let r=await ps();if(r)return Ve=r,Ve}if(!e){let r=await ps();if(r)return Ve=r,Ve}let{FileBackend:t}=await Promise.resolve().then(()=>(to(),eo));return Ve=new t,Ve}async function ps(){if(process.platform==="darwin"){let{MacOSBackend:e}=await Promise.resolve().then(()=>(ls(),as)),t=new e;if(await t.isAvailable())return t}else if(process.platform==="linux"){let{LinuxBackend:e}=await Promise.resolve().then(()=>(us(),cs)),t=new e;if(await t.isAvailable())return t}else if(process.platform==="win32"){let{WindowsBackend:e}=await Promise.resolve().then(()=>(ms(),ds)),t=new e;if(await t.isAvailable())return t}return null}var He,Ve,ao=ye(()=>{"use strict";He="resend-cli",Ve=null});function Xe(e,t){(0,we.mkdirSync)((0,gs.dirname)(e),{recursive:!0});let r=Pm(e);try{let n=t();return n instanceof Promise?n.finally(()=>lo(e,r)):(lo(e,r),n)}catch(n){throw lo(e,r),n}}var hs,we,gs,Om,Im,fs,Pm,lo,jm,Rm,bs=ye(()=>{"use strict";hs=require("node:crypto"),we=require("node:fs"),gs=require("node:path"),Om=1e4,Im=50,fs=200;Pm=e=>{let t=(0,hs.randomUUID)();for(let r=0;r<fs;r++)try{let n=(0,we.openSync)(e,"wx");try{(0,we.writeSync)(n,t)}finally{(0,we.closeSync)(n)}return t}catch(n){if(n.code!=="EEXIST")throw n;if(jm(e)){try{(0,we.unlinkSync)(e)}catch{}continue}Rm(Im)}throw new Error(`Could not acquire lock on ${e} after ${fs} retries. If no other resend process is running, delete the lock file manually.`)},lo=(e,t)=>{try{if((0,we.readFileSync)(e,"utf-8")!==t)return;(0,we.unlinkSync)(e)}catch{}},jm=e=>{try{let t=(0,we.statSync)(e);return Date.now()-t.mtimeMs>Om}catch{return!0}},Rm=e=>{Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,e)}});function mo(e){let t=e.split(".");if(t.length!==3)throw new Error(co);let r;try{r=JSON.parse(Buffer.from(t[1],"base64url").toString())}catch{throw new Error(co)}if(typeof r!="object"||r===null||typeof r.exp!="number")throw new Error(co);return r.exp}function Cs(e){let t=new Error("Received an unexpected response from Resend while authenticating. Please run `resend login` again.");if(typeof e!="object"||e===null)throw t;let r=e;if(typeof r.access_token!="string"||r.access_token.length===0||typeof r.refresh_token!="string"||r.refresh_token.length===0||typeof r.scope!="string")throw t;return r}async function ws(e,t,r){try{return await fetch(e,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:t,signal:AbortSignal.timeout(Fm)})}catch(n){let o=n instanceof Error&&n.name==="TimeoutError"?`${r} timed out after 30s. Check your connection and try again.`:"Could not reach the Resend API. Check your connection and try again.",i=new Error(o);throw i.name=po,i}}async function _s(e,t){let r=Math.floor(Date.now()/1e3);if(e.access_token_expires_at>r+Nm)return{access_token:e.access_token,scope:e.scope};let n=process.env.RESEND_BASE_URL??"https://api.resend.com",o=await ws(`${n}/oauth/token`,new URLSearchParams({grant_type:"refresh_token",client_id:Gr,refresh_token:e.refresh_token}),"Token refresh");if(!o.ok)throw new Error(`Token refresh failed (${o.status}). Please run \`resend login\` again.`);let i=Cs(await o.json());return await Hr({access_token:i.access_token,access_token_expires_at:mo(i.access_token),refresh_token:i.refresh_token,scope:i.scope},t),{access_token:i.access_token,scope:i.scope}}function uo(e){return e.toString("base64url")}function ys(e,t){return`<!doctype html><html><head><title>Resend CLI</title></head><body style="font-family:system-ui;text-align:center;padding:2rem"><h2>${e}</h2><p>${t}</p></body></html>`}function xs(){let e=uo((0,sr.randomBytes)(64)),t=uo((0,sr.createHash)("sha256").update(e).digest()),r=uo((0,sr.randomBytes)(24));return{codeVerifier:e,codeChallenge:t,state:r}}function ks(){return new Promise((e,t)=>{let r,n,o=new Promise((a,l)=>{r=a,n=l}),i=(0,vs.createServer)((a,l)=>{let d=new URL(a.url??"/","http://127.0.0.1");if(d.pathname!=="/oauth/callback"){l.writeHead(404,{Connection:"close"}),l.end();return}let c=d.searchParams.get("code"),u=d.searchParams.get("state"),p=d.searchParams.get("error"),y=p?`Authorization denied: ${p}`:!c||!u?"Missing code or state in OAuth callback":null,g=y?ys("Authentication failed",`${y}. Return to your terminal and try again.`):ys("Authentication complete","You can close this tab and return to your terminal.");l.writeHead(200,{"Content-Type":"text/html; charset=utf-8",Connection:"close"}),l.end(g,()=>{a.socket.destroy()}),i.close(),clearTimeout(s),y?n(new Error(y)):c&&u&&r({code:c,state:u})}),s=setTimeout(()=>{i.close(),n(new Error("OAuth login timed out after 5 minutes. Please try again."))},300*1e3);i.listen(0,"127.0.0.1",()=>{let{port:a}=i.address();e({port:a,waitForCallback:o})}),i.on("error",t)})}async function As(e){let t=await ws(`${e.baseUrl}/oauth/token`,new URLSearchParams({grant_type:"authorization_code",client_id:e.clientId,code:e.code,redirect_uri:e.redirectUri,code_verifier:e.codeVerifier}),"Token exchange");if(!t.ok){let r="";try{let n=await t.json();r=n.error_description??n.error??""}catch{}throw new Error(`Token exchange failed (${t.status})${r?`: ${r}`:""}`)}return Cs(await t.json())}var sr,vs,Gr,co,Fm,Nm,po,Lr=ye(()=>{"use strict";sr=require("node:crypto"),vs=require("node:http");fe();Gr="7136aa0b-625c-4c9c-8820-e9784c8eb141",co="Received an invalid access token from Resend. Please run `resend login` to authenticate again.";Fm=3e4,Nm=60,po="OAuthNetworkError"});var $s,_e,Es,Ds,Bm,Ss=ye(()=>{"use strict";$s=require("node:crypto"),_e=require("node:fs"),Es=require("node:path"),Ds=(e,t,r)=>{let n=`${e}.tmp.${process.pid}.${(0,$s.randomUUID)()}`;try{let o=(0,_e.openSync)(n,"w",r);try{(0,_e.writeSync)(o,t),(0,_e.fsyncSync)(o)}finally{(0,_e.closeSync)(o)}(0,_e.renameSync)(n,e),Bm((0,Es.dirname)(e))}catch(o){try{(0,_e.unlinkSync)(n)}catch{}throw o}},Bm=e=>{if(process.platform!=="win32")try{let t=(0,_e.openSync)(e,"r");try{(0,_e.fsyncSync)(t)}finally{(0,_e.closeSync)(t)}}catch{}}});function Ne(){return process.env.XDG_CONFIG_HOME?(0,St.join)(process.env.XDG_CONFIG_HOME,"resend"):process.platform==="win32"&&process.env.APPDATA?(0,St.join)(process.env.APPDATA,"resend"):(0,St.join)((0,Is.homedir)(),".config","resend")}function wt(){return(0,St.join)(Ne(),"credentials.json")}function Ts(e){return e.type==="oauth_grant"?ho(e)?{type:"oauth_grant",...e}:{type:"oauth_grant",scope:typeof e.scope=="string"?e.scope:""}:{type:"api_key",...e.api_key!==void 0?{api_key:e.api_key}:{},...e.permission?{permission:e.permission}:{}}}function fo(){try{return Ce()}catch{return null}}function Ce(){let e=wt();if(!(0,Pe.existsSync)(e))return null;let t=(0,Pe.readFileSync)(e,"utf-8");if(t.trim().length===0)return null;let r;try{r=JSON.parse(t)}catch{throw new jr(e)}if(typeof r=="object"&&r!==null&&"api_key"in r&&!("profiles"in r)&&!("teams"in r))return{active_profile:"default",profiles:{default:{type:"api_key",api_key:r.api_key}}};if("profiles"in r){let n=r.storage==="keychain"?"secure_storage":r.storage,o=r.profiles;return{active_profile:r.active_profile??"default",...n?{storage:n}:{},profiles:Object.fromEntries(Object.entries(o).map(([i,s])=>[i,Ts(s)]))}}if("teams"in r){let n=r.teams;return{active_profile:r.active_team??"default",profiles:Object.fromEntries(Object.entries(n).map(([o,i])=>[o,Ts(i)]))}}return null}function ut(e){let t=Ne();(0,Pe.mkdirSync)(t,{recursive:!0,mode:448});let r=wt();return Ds(r,`${JSON.stringify(e,null,2)}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
`,{code:r}=await Po(i);return r===0}async isAvailable(){if(process.platform!=="win32")return!1;let{code:t}=await Po(`${no} $null = New-Object Windows.Security.Credentials.PasswordVault`);return t===0}}});async function Ye(){if(Le)return Le;let e=process.env.RESEND_CREDENTIAL_STORE;if(e==="file"){let{FileBackend:o}=await Promise.resolve().then(()=>(tr(),er));return Le=new o,Le}if(e==="secure_storage"){let o=await ms();if(o)return Le=o,Le}if(!e){let o=await ms();if(o)return Le=o,Le}let{FileBackend:t}=await Promise.resolve().then(()=>(tr(),er));return Le=new t,Le}async function ms(){if(process.platform==="darwin"){let{MacOSBackend:e}=await Promise.resolve().then(()=>(ls(),as)),t=new e;if(await t.isAvailable())return t}else if(process.platform==="linux"){let{LinuxBackend:e}=await Promise.resolve().then(()=>(us(),cs)),t=new e;if(await t.isAvailable())return t}else if(process.platform==="win32"){let{WindowsBackend:e}=await Promise.resolve().then(()=>(ps(),ds)),t=new e;if(await t.isAvailable())return t}return null}var Qe,Le,ar=me(()=>{"use strict";Qe="resend-cli",Le=null});function Xe(e,t){(0,Ue.mkdirSync)((0,As.dirname)(e),{recursive:!0});let o=Op(e);try{let i=t();return i instanceof Promise?i.finally(()=>lr(e,o)):(lr(e,o),i)}catch(i){throw lr(e,o),i}}var gs,Ue,As,Ep,Tp,fs,Op,lr,jp,Ip,hs=me(()=>{"use strict";gs=require("node:crypto"),Ue=require("node:fs"),As=require("node:path"),Ep=1e4,Tp=50,fs=200;Op=e=>{let t=(0,gs.randomUUID)();for(let o=0;o<fs;o++)try{let i=(0,Ue.openSync)(e,"wx");try{(0,Ue.writeSync)(i,t)}finally{(0,Ue.closeSync)(i)}return t}catch(i){if(i.code!=="EEXIST")throw i;if(jp(e)){try{(0,Ue.unlinkSync)(e)}catch{}continue}Ip(Tp)}throw new Error(`Could not acquire lock on ${e} after ${fs} retries. If no other resend process is running, delete the lock file manually.`)},lr=(e,t)=>{try{if((0,Ue.readFileSync)(e,"utf-8")!==t)return;(0,Ue.unlinkSync)(e)}catch{}},jp=e=>{try{let t=(0,Ue.statSync)(e);return Date.now()-t.mtimeMs>Ep}catch{return!0}},Ip=e=>{Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,e)}});var bs,Cs=me(()=>{"use strict";bs="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAAD/4QCARXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAIdpAAQAAAABAAAATgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAABkCgAwAEAAAAAQAAA4QAAAAA/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/AABEIA4QGQAMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2wBDAAQEBAQEBAYEBAYJBgYGCQwJCQkJDA8MDAwMDA8SDw8PDw8PEhISEhISEhIVFRUVFRUZGRkZGRwcHBwcHBwcHBz/2wBDAQQFBQcHBwwHBwwdFBAUHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR3/3QAEAGT/2gAMAwEAAhEDEQA/APgDrRRRQAUUUUAFFFFABRRRQAUUUUAFFH0ooAKKKKACiiigAooooAKKKOKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAoo+tFABRRRQAUUUUAFFFFABRRRQAUuaSigB1FIDRQAtFFFABRSUtABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUtFACUUUYoAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACikpaACiiigAooooAKKKKACkNLSUAdx4RvyDJp7n1dPb+8K9DXDgHGK8Ltbh7W4juI/vIciva7C6S7giuYj8sg70AaCgA1fifjBqkPpirEfHOc0AaqHIGTUwwapxEDk1aUjpQA888VGyg1IKUrkZ70AUJI+M4yaoyRe1bDLgVVdCRnrigDAljP+elUZYh909jXQSR9ttUpY++OvrQBgyRkt6/3arPERnAyPStmSJckY6/0qkynseaAMto153dPU1WyQTnuP0rRZCDt2ZOOtViGIHOeeKAKmD9cjqf89aRVBAJPT1qfaVBzgnqfxqJlbBI45oAjIyCMZNIcjoAakYHHXAHrSAEDHY96AGfwjGN1BOF9/wDPSk4Y7BwemaU4IyBQAq5IIzgj06UdOQBgcE035QpDd+1KoABbGc/yoAcuBntnrSguDzwB+IoG4qdoGP50u4gbeqk5xjmgB44I5yCOKmUu3zE44/Oq67Tn3/SpApABycmgC5vPBXGferyZAyOp555rLRuxzkVfidCATwelAGtEQDnoa0IpDt9zxWJGctuB+X1rRikAGQe9AG5F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ooooAKKKKACiiigAooooAWkoooAKKKKACiiigAooooAKKKKACiiigAopaSgAoopfegBKKKKACiiigAooooAKKO1FABQKKKAFpabTqACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigApKWigAooooASlxRRQB6H4N1IvG+nyHmP5k+h6j8DXo0bZXJ4HrXz/Z3UlldR3UX3oznHqO4/GvdbG5jureK5i5WRQ350Aay46A8+tTr6VXTGOepqdTjpQBZXqKlBBzVdWJ61MDQBKDnNLgmmjFLzmgBCO4qJlzkfjU+abtJ6mgDPZCBzyaqPHz0rWdetVZF4NAGM8fB6VSkQAccitkoAKrSpzuwDigDHeIL1AyPTv8AjVB4wxPGD1yOorZdC33OAKrNGP4sc96AMZ41yVJyTyMe1V2bBOeeMZrTkjVc5BJHaq0itwMcDt/WgCkVy2MDtwP88Uxhzzgj19asOgyWVSajIXqOB3z3oAh+QnDHgd/Q0uecjlR0pzKu4hQfpTcENg844oAaF6njmlwxJ3dMZH4UrDB44x3FH3evTuKAFDckL0zjmhcjOeo6Uw7dwwCMfpSgncQMH3NAE2QWx1zTwGOQuCw+73pgOBzjd396T5trbQKALiFiqkjI681bibBO8HJ7d/wqlk4DK244wRViEbkBU4+tAGpE3pnjitGEkjJ/GsSOQ7suCM9vetKJxxzxntQBuxMeAOwrTjcYAJrBikOeeDmtKB8nBHBoA1lAPINSdearo3AFWB0oAMegphyOoxUtNI/woArlODVZ0J4A4P8AKrrD/CoXHGB1oAzZYzgKOMGqjqdpAANarpwR6VSkQqBigDIkU5w3B6+1UpEwfn6H9K13Q54xntVKZBnJHOMf59qAMyWNcsTgKP0qhtYAso3BuorVdHbD5+vGR+FU2QfeXjFAFJwG5wM+hHT6VDhQfmPB/SrJQk7uo6+majC9mPzUAQ9FAbg561Jn935Z9aRsE46/1+lC5VunXpQBJtIY85578GpQ2FH96olHKqSc+vXFOOwtgr8p96AAE46cntTmLY4A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0bY5JoA21w2PyNOxjiqkL55Herq4IyaAIytRkfSrBHpUZAoApOmefSqzLxn07VoMODUDqMGgDJcFevNVJVwQ3PPpWoyY4AqnIpz1x60AZcq4JwOD+dVHCl+mcVqOScjGPeqkig9AOaAMt0U/e+XGenrVTZgjnGB07GtPALemOKqSJxxxjuep9qAM50DNhlJ/HFMAXaMc/j0q06jkL0PHPaq+3Dc8Y49h9aAIwPl5Xvk1NtBKyA/j6UxioGOpzkEdPekPJLcHv7UASof7+DuPbtUzIxyynHbFRIAVXb1BOf/rVIhBIUg7s9e3NAEvO4g8HHH0pVLkbW5zTT0YDHp1p6nCjnGOuev4e1ADCu44k4Ge3elYFQNwIOcUikrgAjKn/AD0p3GCuD/hQA3BxgEEE4yetRklMnsc1LgZy3I7496G2+3y9j3oAjKr1Y1GAB3xj/IqZlHBIyDx8tMIRs7icEYHegCDaQxYcZ7f59ajYHJ+XmrEg24Vj/wDrpmBt6YwecmgCtsDMexHIxTSEByT3696s/NuKr1I9qjYZXK447HrQBWI47A/41Ey/5/wqzg9WGTUZ78fQelAFJl9arsnWr5Xiq7IaAM91qsy1pMlVXWgD/9X4EooooAKOtFFABRRRQAUUUUAFJS0lABRRRQAUUUUAFFFJQAtJS0lABS0UZoASiiigAooooAKKWigBKWiigAooooASloooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAEpaKKACiiigAoopKAFoozSUAHWiiigAooooAKKKWgBKKKKAFpKKKADrRRRQAUUUUAFFHSigAooooAKKKKACiiigAooooAKKKKACiijrQAUUUUAFFFHSgAooo96ACiiigBaSiigAooooAKKKKACiiigAooooAKKPaigAooooAKKKKACiiigAooooAWikooAKKKKACiiigApaSigApaKSgAooooAKKKKACiiigAooooAKKKKALmn302nXcV3AcNGc/Udx+NfQWnX0F/bR3MD7kkGR6/T6ivnGu38G659hujYTn91ORtJP3W/+vQB7cp+UHrUi8g561VifK9etWVHFAEg5p1Np3TigBwpRTR604dPagApaMUnWgBMVEwyam9/SmHvQBXYZqFlH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TRlSGA9/bBoAU8fdbJWpkOSATz6VWfaQGUDcKmVnjJJOD6UAWOdwO7IPA+tLhs45UjkZPFMRlJKrnJOTg1Mqrkq3CgcZ68UAKCQevTGB60Fwr7Tyx6UikSFWU89cHtS7kfLDJI6CgBWIxtKgMelRyDpt5X3qY8rknB4GKbkcKv3TxQBGfm5AyCe1RkgfKDnvk1OqkjJBGfWkCsq7GIHcY/WgCAjKkL379qjIVVIb5c4XPXip8ZOw9u4qFtwJ2jAPNADHAVcN0H6/jUJToe/T/8AVVgKG6kZA49qZ23IcNQBW5wARz/Wo9uRluntxVplIQSckNx+NQMpZgSeD0NAFZlYfKBkDvUDr9488dKvsuSB7Z+tVCoHOPXigD//1/gWkpaKAEooooAKKKKAEpaKKAEpaKKAEopfpSUAFFFFABRRS0AJRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUtFACUUUUAFFFFABRRRQAUUUUAFLRRQAUYopfegBKSlooASiiigAooooAKKKKACiiigAooooAKSlooASilooASilpKAClopKACiiigAopaSgAooooAKKKKACiiigAooo+tABRRR1oAKKKKACiiigApaSigAooooAKKWkoAKKKKACiiigApaSigApaSigAooooAKKKWgApKWkoAKKKKADpRRS0AJRRRQAUUUUAFFFFABRRS0AJS0nSigAooooAKKKKACiiigAopaSgAooooAWk96WigaCikpaQBRSUtMLB0rt/BviAabObG5P7ic/KT/C3+BriKSgR9SxPuAOetWh2xXm/gvxD/AGhD9gunzcQrxn+JB/Ud69FU5HvQBMKUc00HJpRxzQA/FGKAeKKAG4pDkU+koAjI9abwalIz1qNulAELKOuKiI9eRVhhz71EVxz7UAQN1GO9V2BB9AatEKevUc49KiIPPf1+lAFcoOo/GoCoUjBxj171aK4HUfSoGAOMDOKAKzjgjv69qrvGMceuKtsv3sHOfyqJlTPT8qAKbKD16rnA9arOpRCQMjuKvEEHsSe57VCysQMfXp1oAz3TYMnoeKgbDkccjt7VfZfkP+eag2ZAPRjxigCkdueRye/t6VGy7m4GAO3pVtlO35sA5pr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B9cW86TRrJGwdXAKkcgg8gg1aAHWvnbwh4tk0S4FreuzWL5GOpjPqPb1H4179a3cVzCs0DiRGGVYHgj2pDLZ9e9H1p1BApiIyKYVqUik2igCoy4JYnp/Oomyc+1XSc9MGoiv5igCmQAvPINV2ABxjg9aush5J71Ay5PTtQBT2/MQTxUZQe4qyy4b5+lRkc4xxQBTbAyMbselQ4BAxyT2q5t2HAGQ1QsozkUAViCXy3OKjK+nHvU/APqKhKHd0oAhIBG3pnvUe3qCeTUzddpAOaZtw5zwMUAVsAqSep4o2k42gc1NhmyAR+VRFTkAdeaAIyDyhGR6DrQAVIZQQBx7UoDcCNh7mlyyvwdwP8JoAkU7FAbDDB9vzq5C556AAcf8A16oZUOU2/ewfxqwoKHD5FAGrE5YB84I4NbUDlcc5PSufhlyNxG31961baQDA/n70AdGnUehqwAPzqlAwxgdBWguMc0ARFcEmoGXqKuNyKiZaAKDA/wCNRjKmrbLxVZl4yp/E0AX4H4waewA/Gs6FipGe9ag/eJ9KAK7A5yKpSDnitLr17VXdFwTigDGkQ44GKougySBgg1sSLgkD86oShV5IAx1oAy2Gdx9OhquV565781oOGLEOMelVGXorYoApMeMn1+tV2HT1Aq6VYsG65HbpUDb48Bx1PGKAKbFuB0zVdw2ODsxzn3q7JhZOe9RMVAIYZB6UAU9u9SPrnnrURDeVtVcr196tMoJIAGQOaiJGQQMntzx+NAEahsfKO3XFJhQc5/D3p5yykDoeaaOeXXCgdutAEm7awUc56+1SAngLwR196gjC+XnnsRnvj1p+Np69eeKALR3AKwxjP5mngncSxyD3qKMlsA4yPyxUqs5zlQDnGBQBKqkgbjnjrTRuALL34weelJ8+WwBxjBx2p6gFckdetADMbcyEcjgj1pD8nGMjGckilXCrgcjufSl2qrEYzk0Af//W+DKKWjmgBKKWigBuKTFOooAbRS4pKACiiigBKKWkoASloxRQAlFLS0AJRS0YoAbRS0UAJRS0UAJRilooASilooASilooASilooAKSlooASjmlooASilooASilooASilpKACiiloASilooASiiloASjrS0UAJR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uKiGQx3HBpPl6EY9M9qAJkUvwzEH09qlUjJJ6E44/SqvIOe46/41OFIHXvQBOpjDDcTk96RdqksCSfTNIuQgfOQTSludpxn35oAlP3hk4x1HpSNlVJfuaUkgfKCc9cdaGYlSoXI6jH8uaAP//X+DqKdSUAJRS0lACYpMU6igBpopaSgBKSnUUANopaKAEooxRigAopcUlAAKKKKACiiigANJS0UAJRS0UAJRS0UAGKKKKACkpaKACkpaKAEopaSgAopaKAEopaKAEopaKAEopaKAEopaKAEooooAKWikoAWkpaKAEopaKAEopaSgApKdRQA2ilooASiiigAooooAKKKKACiiigAooooASilooASilooASiiigAooooAKKWkoAKSlooASloooASilpKACiiigAooooAKKKKACkxS0UAJiilooASilooAbS0tFACUUtFACdaKWigBKKWkoAOtFFFACUUUUAFLSUtABRRRQAUlFLQAUUUUAFJS0UAFFJS0AFFFFACUUtFACUUUUAFFFLQAfWij60UAJRRRQAUUdKOlABRRS0AJRRRQAUUUUAFFFH1oAKWkpaBoSloooAWul8O+J7/AMPzjymL2zNmSE9D2yPQ1zVJQB9YaRq9nq9ot5ZSCRD1HdT3BHY1tAivk/RNdv8AQroXFm2VJ+eMn5XHuPX0NfRXh/xFY69bCa0JDjG+M/eQ+h9vegDpiPWkxSg07HpQIiIzURU1axmmEUAUmQ1EVJY56HtV0qfyqFo8HI60AZ7j0HHaoWTJOec1oFcZ9KgcEnjjPagCiUJ4xu+tV2BwSR+dXSpzgHj1qFgDnHegCi6nGeq0wjHtVxwc4A+WoWUnG0cUAUsMM89P1qPaBk8HNWGTIODkVGVIHB56igCswGNuOveogNg+XqOtWmRcdc571ER8xPc8UAQtkjJOFHI/rTCDuGOBzkf0qU8AYB460MA2Q2QRQAwMynIOBx06Af8A1+lTxsB2JqAkKBjknn/61SLnJTPJFAGnFIN2SRW/azEHk9OlcmgPGO3Wte3mKnj7tAHbQPuAJPWrn3h9KwrOcECtqNsigBrioWXFWyKiYUAUmUnoKruh+lXiPxqIgfSgCshKNkVog+aoPes10wcg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xQA2inYpMUANxSEU6igBhFJinkUlADMUU/FNxQA3FFOxSUAM70U7FGKAG0tLRQA2ilooASilooASjFLRQAmKMUtGKAEopaKAEoxS4ooAbRTqTFACUUtFACUUtFACUUtJQAlLRS0AJRS0UANopaWgBtFLSUAFFFLigBKKWigBKKWigBKKOlFACGilooAKSj3paYCUlOpOaQBRRRQAlFLjvRQAYpKdSUAJRS0ntQAUZoooAPaiiigBKWiigBPaloooASilooASiloxQAlFLSUAFFLSUAFFFFACUU6koASloooASjilooASilpKACilooASiiigAooooAKKKKACkpaKAExS0UUAFJzS0UAFNp2KSgBKWlooASiiigBMUmMU6igBlLRikoAKKKWgBKKKKACiikoAWiiigAooooAKKWigBKKWkoAKKKKACiiigAooooAKKWkoAKKKKACiiigAooooAKOlFFABRRRQAUmaWk60AFFFFABRRRQAUUUUAHSur8N+L9T8OSbIT51qxy0Lnj6qf4TXK0mKAPrTw94j07xBafaLKTkffjPDofcenuOK6MN+NfGFreXNjcJdWkrQyocq6nBFe8+FPiRZ3+yz1oi2ujwJekTn8fun68fSgD1cimlBSrKHH+H86f2oArMmagaPjmtDFRMlAGWyADHrVZk7GtZ48iq7RnGT0H50AZTRnA31WdBk8dK15Iy3HB7mqkoxnjg9qAMl1wc+vAzUDoVUkcjr71qMueew6Zqq6uWJboaAKBBAyBzUOFA9cd6vmNck9/Sq7oQu44x2oArFQwUjjHrTGVQcrnOMH0/CrIBHJHY800jo2Puj+dACRkDMYPbIq3HJgkk5AqmG2naM8+tTg8qo5xQB0FvPswSeT1rpLaTcuO+K4mGQhhj8a37K4B2j86AOmxkComFLC4IweakYdiKAKrCoyARVplHWoiOOlAFVlzyeKiIweBmrRGTUTJzkcZoAFOD04psi4yR9KIyVba3IqU4xigDNdOvrjpWc6smcdDyfWtxwOp6ms+WM5YnoPTvQBjvH3xx6DrVRgQAT0PatOVWBGM4PeqbxqAR156+lAFBxwGA6Y6dqhcMrZA6GrjjBK9OAfYmoHUAAdaAKTL0255GTVd3OCv8XU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ZATx0rOlQe/v71sSrWfIpPPtx7UAf/1/E/HPw91PwXItyJDe6ZIcLcBcFD2WQDgH0PQ+1ee5DKCOcjNfoJLDFcQvbTxrNFINrxuAysD2IPBr5w8e/CWay87WvCEJlt8l5bNT80YP8AzyB5I/2eo7UDPCCKYRUhOQc8FThgeMEdQfemsMGgCEimYqbFMIoEREU2pSKYaAIzTTT6aRQAym/SpCKQigBmKSn0UANpKdSUAJSU40lACd6Q0tFADKMU7FGKAGYpKfikoAbSU+koAbRS0lABikp1GKAG0lLijFACUlPpMUAN70uKMUtACU2nGkxQAlJTqSgBKKXFJQAUlLR70AJSU6kxQAlFLRQAlLRRQAlFLikoASjFLRQAhpOlLSUAJSU6koASloooAKbTqT2oAbiinUlACUUtFACUlLSUAJRS0lAB9KSlxSUAJijFOpO1ADcUUUUAJRRRQAUUUYoASig0UAJRS0lACfyopaSgBKWiigBDSU6koAbRS0lABRRRQAlFLSUAFFFFACUUUUAFFHSloASiiigApKWigBKKKKADvSUtJQAUUUlAC4pppTSdaACilpKAEopaKAE5opaSgBKKXikoAKKKKACkpaSgBKKKOhoAKKKSgBaSlooASloooASg0UGgBKKKKACkpaKAG0UuKSgBKKKKAEpaKSgApaKBQAUUUUAFJS0UAFFFFACUUtFACUlLRQAlFLSe1ABS0lFABSU6koASij3paAEooooAKKKKACkpaKACjrSUUAFBoooASiiigAooooAKKKKACiiigAoopKACiiigApKWigBKOlFFAHTeGPFWp+F70XFk5aFiPNhJOxwP5H0NfVXhXxhpfie1M9k5WVDiSF8BlJ9u49xXxf8ASr2najfaVdx3unzNBNGflZf6+oPpQM+8gc81WnjIxInbqK818FfEiy8SFNPvwlpf7ehOEkI/uE9z/d/LNepgqw96AIY3V14pLhCVDr1Tr9DVd90L5/gb9KvKQw24+91oEUCB3yQKpSJxkcf1rRKlH2dCOhqvIuetAH//0PVge49ealzjkHFU1f3qcNQB5P49+FVp4mkfVtFZbPU9uGTGIpyOm4Do3bPfvXyzdW1xZXMlnfQtb3MJIeNwQQRx36j0NfoADXG+NfA2l+NrHyrg+RfRcw3Kj5lPo3qp9PyoGfFBHFMrf8ReGdZ8Kag2mazEFPWOVeY5F7FT/Q81hdeaQEZFRkVPioyKYiLFMNSkU00AR4pKdTTQA2ilooATFNxUlIetAEdFOIpKAEpKdSUANxS0tJQAlNp9JQA3HNJipO1NoAYRSU+koAbilo9qWgBppKfikNADaKWjFADc0UtFACUUUUAJRRRigBMUlOxSUAJijFOpKAEpDTsUmKAE6UUfWloASilooASkNLSUAJRQeKWgBKTpS0lABSUtFADaWlpKACijvRQAmKTFO+tBoAZS0Uc0AIKMUtJ7UAJikp1JigBKKWkoASjrS0UANxSYp1JQAlFLikoASiiigBPpRRRQAlJT6TFADaSnd6OKAEooooASjFFFACUmKWigBKSlpKACkoooAWkpaSgAooooADRRSUAFFLSUAFFLiigBMUlLRQAlJS0lMAooopAFJS0UANo4paSgAooooASkp1JQAUlFFABRS0lABSGlpKAEoopaAEopaKAEooooAKKKKAEoopaAEpKdikNACUUtHSgBKQilooAZRTjSUAJRRijtQAlKKKKACiiigAooooAKKKKACiiigApKWkoAKSlooASloooASilptAC0lFFABRRRQAGiiigANJS0UAJRS0UAJRRS0AJRRRQAmKKWkoAKKKKACiiigAooooASilpKACkpaKAEooo+tABSikpaAHo7RsHRirKcgjggjuK9+8C/FLf5Oj+JXw5IWO7JwD6CT0/3vz9a+f6KAPvnKyDae/IqtG7RSbG9eDXzT4D+JNzoTrpetO8+nNhUc5Z4Pp3K+o7dvSvpOKa31K0jurKVZopV3RuhyCPUfyNAFqUBgsvcdRVZl9DzU8EhYeW3UfezUagqzIw4HYUAf//R72OfOAKupJXJRXYbHzce1bENxwCT16UAbyvmpQ1Zkcucc1aV/egDP1/w/pPibTn0vWIBNDJ0I4ZG7MrdiK+RPGvgTVvBl0DKGudPmJEN0Bx/uvj7rfXrX2gGFMura01C0lsL+Jbi2nXbJG/KsPQ0Dufn4cYGKjNetfED4X3PhUS61pDtd6WWLOhH7y3BPHT7ye/UV5MGVl3Kcg96AIzTTTzTTQIZikp9JigCOilNFACUlLiigBtIadSYoAbijFOoNADKKdSYoAbiinYpKAG0lOpKAExTcU+mmgBKMUtJQAUlLSUAJij6UtFADaMUtFACUlLRQA2loooASkp1JQAUlKaMUANopxpKAEpcUUdaAG0U7rSUAJSUuKQ0AFJS0UANoxS0UANop1HFADaSnUGgBtLRRQAU2looASloooAQ0lLRQA0UYpaKAG0U6koASkpaKAEpKWigBKDS0lACUlOptACEUUtBoASiiigBKSlpaAGmkpaKAENJTqbQAtNp1JQAlJTqSgBtFLSUAFFAooASiiigApKWigAoxRRQACiikoAKKKKAE70UUUAJRS0lACUtFFACUUtJQAlFBooADSUtFACUUUUAJRRRQAUlLSGgA6UUUUAHWiiigBKKKKAFpKKOKACig0UAFFJRQAUn1paSgAopKWgApCKWigBtFKabQAtJRRQAUUUUAFFFJQAtFFFABRRRQAlFLSGgAooooAKPeik+tAC0UlLQA2lopKACiiigAooooAKKKKACkpaKAEooxRQAUtJS0AFJRRQAlLRRQAlFFFABRRRQAUUUGgBKKKKAEooooAKWkooAWlpKKRQo4rv/AAT47vvCd0InzcadIf3sGeV9Xj5wG9ex79jXAA0tAj7j0/UrLWrCPVdKlE0Mg6j+RHUMO4NXnbIWUcdiBXxz4U8W6n4UvfPtGL28h/fQE/JIP6MOx/pX1do+uabr2njVNLcy274VlPDIw6qw7Efr1pgf/9JsU/Hy9Dz6fnW1b3JCpuK4PQ9yK4aObCghwx3ck9/atmG4A6EYbpigDuILoHg8fWtFJc9x9K46G54AznGa2ILjAXPegDo1epwwzzzWVHPuAx3q0su7nNAF9gsgYOodHGGVgCCPQg9a+cviN8J5Imk1/wAHW+5MFrizTsepeIfzUfhX0Osn41OrbTkdaAPzvVwwyKQ19UfED4T2utLPrXhlFt9SOXktxxHcHuR2Rz+R78818syxywTSW9xG0UsTFHjcYZWHBBB6EUAMooooAaab3p5pKAG0UpFJQAGm06jFACYpKWigBtFLiigBtIadSUANxSU6koAbRSmkoASkp30ooAbijFLiigBvU0UuKMUANxS4pcUUAMpDT6SgBtFLRigBtFFLigBKKXFJQAlFLRQAlFFFACUlOoxQA2kp9JQA2g8U6koAbRilpDQAneilpKAEopaKACm06jpQA2ilpKAEpaKWgBtJS0UAJRilooAbikp5ptACUhpaKAEooooASil96SgBKKWigBppKd70fWgBnNFOpKAEoNLSUABoo70UANNJTqKAG0UtJQAUlFFACdqSlooASkpaSgAooooABRRRQAUUUfSgBKSlooAKKSigBOKKKWgBKSlooASiiigApKKKACkxRS0AFNpaSgBaSiigBKKWigBKKKDQAUfSikoAWkpaSgBDRRiigAooooASloooASiiigApOtLSUAFFFFABRRRQAU3FLS0AN6UlONNoAKKKKACiiigAooooAKKKKACkpaSgAooooAKKKKACikooASilo96AEooooAKKKKAEpaKKACkpaSgApaKSgAoopaACkpfrSGgBDS0UUAJRS0lABRRRQAUUUUAJRRRmgBKKWkoAKWiigAoopKkoUUtJRQA6us8H+LLzwnqi3kJL28mFuIuzp/LcOoP9K5KkpiP/0+CjnkJXfgkdCPX1Na0U4XIzgDue9clFOoyF+8Tlv8+1asMxVgz9B0Pc59KAOvhnIA2nGOOP/r1qxXO35mOQOOv+FcdBPkBW57kg8D0z71rwXOFGzHPJ+tAHaR3Iznd0xWrDPkdeK4uGckDbjPqe+K2YboHpQB1ccmRnNWlc44rCinbGegrQSYEdeaANEPXnfjv4c6f4zha7t2S01ZF+Scj5ZAOiS45I7Buo+ld0rVMHoA+B9W0fU9Cv5NM1e3a2uYuWQ85B6MpHDKexFZwr7k8V+EtH8Y6f9i1RNsqcw3CY8yJvY91PdTwfavkLxV4Q1jwfffY9UTdFIT5FwnMcoHdT2Pqp5FAHMEUlONJQA2kp1FADcUlOptABikpaKAG0UuPWkoASilooASkxTqT2oAYRSGnmkIoAb1paKKAG0U6kNACUUtBoAbSYp1IaAEpMc06m0AFJS0lABSUtFADaSnUUAN9qKKMUAFFApaAEpKdSUAJRS0lACdKQ06koATFJ1paKAExSU6koASjFLRQAlG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KSlpKACijNIeKACikooAKKKKACkpaKAEooooASiiimAUUUUgCiiigApKKKACkpaSgAopaSgAopKKAA0lLRQAlHel96SgAooooAKKKKACiiigBKKKKACiiloASkpaSgAooooAKKKKACiiigBKSlpKACiiigAo60UlABRRRQAUUUUALRSUUALSYoooASilooAKKKKAEopaSgAooo6UAJRRRQAUUGigAoopaACm0tJQB//R+ZdzcoOMY6fzpVDcEgkiofmYjBwO/tipMuAdp3YP50ATg7iXIxkA4x1p6gHDkAA9xUXmAjcGPHf39KfzwQRnGcDpxQBMGyPl+UHPfv8AWnLtXJbJ7YqFBnnoQelTKy7+Onqe/wBaALAyjEsCuMdPSpzId+CAM/rVPO3Geh5BJ7elT7iWCgAdhQBcV8c5wKljY7s9jVRWIznmpVft37UAXwRn3qyrkAEdaz0Y9+DVhW54oAvRtircch5zWWrHpVlGNAGzHN6VejnrASQir0cnTmgDoops1qRT4rl45cd60I5gDQB1cFx2rYguRxzXHwzdMGtOCc5AoA7WKbIq6r1y9vc8cmtWK4PTNAGyGNQ3tlZarZS6bqcKXNrOMSRuMg+n4jseopI3BGasKRQB8lfEP4X3fhUyatpBa70knJyMy2+ez46p6P8AnjrXkQORkdK/RQ4YFWAZWBBBGQQeoIPUGvnf4g/B4jzdb8GQ5U5eawXkj1aH2/2Py9KAPnOijkEgggg4IPBBHUEUUAHWlpuaWgAoopM0APzS0we1OzQAtL3pvenZ4oAU0lJmlFAAeaXvTaWgBaSkpRQAdKSl4zQetADaKXFJQAlFKaSgAoNFFADTRS8UUAN60UtJQAUlFFABRRRQAnvSUuKSgBKKWkoASkp1JQA2ilooAQ0lLScdqAEoooNADaKWigBtFLSUAIaSlpKACk70tJQAtFFFACc0hp1J3oASkpaSgAzRS9qSgBMUYoooATtSUtIeKAD6Uho5oxQAUlL0pKACkpaKAEpKKKAEopaSgBKSlNFACUlKaMUAJSUtFADTRSmkoASiijpQAlFFFACe1FFGKACkpfakoAKKKKAEooooAKKSigAooJpKAFpKWm0AFLSUUAHei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G9HLjpV+Kc8c1z0cvHNXopeRQB0sVx6mtOKYY61ysc1aMUvvQB1cVxkcGtGKcHjNcpHPnHNaEU+O9AHVRyVx3jXwLpPja1HnkWuoxDEN2oyf92QdWT9R2rchuMgZq+stAHwrrvh/VvDOoyaXrMPkzJypByki9nRv4lP6d8Vjg192+IPDmjeLNObTNah8xOscq8Swv/eRv5g8GvkTxp4I1XwXfeTdgzWUxP2e6A+WQeh/uuO4P1FAzjxQDTRx1paAFpe1NzRmgQ/NGaZzS5oAdSUUZoAWikzR9KAFopKKAFpelJRQAUe9NozQAtLTaM0ALSUlFABR2pM0H1oAWm59aM0maACjNNzSUAOzSUlFADqSkooAM0UlFABRRSUAJRRmigApKOetFACUZopMUAHFJS0lABSUUhoAWkoooAKSiigAopKKAFpKKKACikozQAUlBpKAFpppc0hoASiikoAWkoooAKSiigApKWkoASiiigAooooAKKKTNAATSUUUAFJmijrQAUUUUAJRRRQAUUUGgApKKSgBaTpRR9aACiiigAooooAKKKKACiig0AJSUUtABSUUUAFFFFABRRiigAooooASiiigBaKKKAEpKXvSUALSUUUAFFFFABRRiigAoopKAFpKKKACkoooAKKKKACiiigAopKWgAopKWgBDS0lFAC0UUUAHtRRRQAUUUUAJRRS0AJRS0lABRRRQAUUUUAFJS0lACUUUUAFJTqbQB//0/lD2pw9abS0AOApwpuc0o96AJOO9LmmDFL04oAeKdmmCnCgB4NOBqOnigB9Lmm0vagB2aWkpaAFp1MpRQA+im0tADhS036UtADs06mZoFAD80ueaZS0ASD3pc0wHvS8UAPz60uajFPB9aAJAakU+lQg9qcGoAm3c08NVcE0/PSgCyrVMGqmp561MDgUAW1cVOjVnq2e9TqxoAvo3INWUeswOanRjxzQBqpIOlXIpRxWKr1MspB60AbySjNXkm5rAilq6kvQ0Ab8c1aUVxjFcyk/FXo5umDQB1cNxitOK4z1NclHNjFaMU54yaAOtinX1p17a2OrWMum6lCtzaTjDxvyD7j0I7EcisKK47VoRzkEYNAHzF8Qfhhe+Ef+JppjN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UUAFJmlpKACjNJRQAtJmkooAUmkopKAFpKKKACkoooASiikoAWikooAWkooNABmijNJQAUUUlABRRSGgBaSiigAooooAQ0UZooASiij2oASlopKAFooooAKSijvQAtJS0lABSUtJQAUUUUAFFFJQAtJS0UAFFFJQAUUUUAJRRRQAUUUUAFFFFACUtFFABRRSUALSUZooAKM0lFABSUtFABSUtJQAUtJ1paACijpQaAEoopaAEozRSUALRRRQAUUUUAJS5oooAKSiigBaKKKAEooooAKWkooAWiiigAoopKAFpKWm0ALSUtFACUUtJQAUlOptAH/9b5GzTgarg08NigCfNPBzUAPFPBoAm3ZpwNQg08GgCYGng1EDTx0oAfmlzTKKAJBRTQaUc0AOp2aZ70uaAH0tMzS0APFLTBTqAFzTgaZS0AO4opoNFADs0uaZmlzQA7PrRTc0ZoAfRmm5pc+lAC55pc1HmlBoAkzSg4plGaAJQaXJqLPalzQBNu5o3VHmjNAEwb15pwbnrUIOKUHFAFpWp4c5qqpp+aALgcU8PiqQbtUqmgC8r1MkhFZ4Y1MretAGkslWBKB+NZSuanR80AaySVbSX0rGVyKsJL09aAN2OarscwNYKSe9W45TQB0Uc/PXNX45zmubjlwM1ejnPWgDqIZj68VeSQiuZhmwRk1opc470AdBFMuGSRVkjkBR0cBlZTwQwPBBrwjx38KTbRya54PiaSAfNNYjLPH6tF3ZPVeo9x09lSbvmrsV0ynKsQc8HuKAPhYEHpRX0x42+Gtnryy6roKrbapy7wjCxXB9h0Rz69D355r5rngntZpLa6jaGaJiro42spHYg0hkdApM0maYh2aWmZp3agAzRmim0AO60ZpM0tAC5pM5opKAFopKM5oAWjNN4ooAXNBNN60e9ABRmkpKAHZpM02igBaM0nSigAzQaTIooAKM0UlAB9aKKSgBKM0UUAFFFIaAFpKM0lAC5pKM0lABRSUUALSUUUAFJSk0lABRSUUALmk6UUmaACiikoAWkoozQAUlFJTAWjNJSUgFopKKAFopKKAFpKM0lABRRRQAlLSUtACUtJRQAlFFFABRRRQAUUlFABmlpKKACiiigBDRRRQ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KKTvQAvfFJS96SgBaKDR60AFIeDS0h6mgBaQc0tIvagAHNLSClFACUUetFACGig9KKACkpaSgB1J3pfWk70wCikpfSkAUnpS0ncUALRS0goADRQaKAEpaQ0UAFFFFABS0Cj1oASlpKX1oATrSUopKAP/Z"});function dr(e){let t=e.split(".");if(t.length!==3)throw new Error(cr);let o;try{o=JSON.parse(Buffer.from(t[1],"base64url").toString())}catch{throw new Error(cr)}if(typeof o!="object"||o===null||typeof o.exp!="number")throw new Error(cr);return o.exp}function Ks(e){let t=new Error("Received an unexpected response from Resend while authenticating. Please run `resend login` again.");if(typeof e!="object"||e===null)throw t;let o=e;if(typeof o.access_token!="string"||o.access_token.length===0||typeof o.refresh_token!="string"||o.refresh_token.length===0||typeof o.scope!="string")throw t;return o}async function Ss(e,t,o){try{return await fetch(e,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:t,signal:AbortSignal.timeout(Pp)})}catch(i){let r=i instanceof Error&&i.name==="TimeoutError"?`${o} timed out after 30s. Check your connection and try again.`:"Could not reach the Resend API. Check your connection and try again.",n=new Error(r);throw n.name=pr,n}}async function ws(e,t){let o=Math.floor(Date.now()/1e3);if(e.access_token_expires_at>o+$p)return{access_token:e.access_token,scope:e.scope};let i=process.env.RESEND_BASE_URL??"https://api.resend.com",r=await Ss(`${i}/oauth/token`,new URLSearchParams({grant_type:"refresh_token",client_id:Ho,refresh_token:e.refresh_token}),"Token refresh");if(!r.ok)throw new Error(`Token refresh failed (${r.status}). Please run \`resend login\` again.`);let n=Ks(await r.json());return await Go({access_token:n.access_token,access_token_expires_at:dr(n.access_token),refresh_token:n.refresh_token,scope:n.scope},t),{access_token:n.access_token,scope:n.scope}}function ur(e){return e.toString("base64url")}function ys(e){let{heading:t,message:o}=e;return`<!doctype html>
|
|
62
|
+
<html lang="en">
|
|
63
|
+
<head>
|
|
64
|
+
<meta charset="utf-8" />
|
|
65
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
66
|
+
<title>Resend CLI</title>
|
|
67
|
+
<style>
|
|
68
|
+
:root { color-scheme: dark; }
|
|
69
|
+
* { box-sizing: border-box; }
|
|
70
|
+
html, body { margin: 0; height: 100%; }
|
|
71
|
+
body {
|
|
72
|
+
min-height: 100dvh;
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
padding: 2rem;
|
|
77
|
+
background-color: #000;
|
|
78
|
+
color: #a1a4a5;
|
|
79
|
+
font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
80
|
+
-webkit-font-smoothing: antialiased;
|
|
81
|
+
text-rendering: optimizeLegibility;
|
|
82
|
+
}
|
|
83
|
+
.bg {
|
|
84
|
+
position: fixed;
|
|
85
|
+
inset: 0;
|
|
86
|
+
z-index: 0;
|
|
87
|
+
pointer-events: none;
|
|
88
|
+
user-select: none;
|
|
89
|
+
background-image: url("${bs}");
|
|
90
|
+
background-size: cover;
|
|
91
|
+
background-position: center;
|
|
92
|
+
opacity: 0.2;
|
|
93
|
+
}
|
|
94
|
+
@media (min-width: 640px) {
|
|
95
|
+
.bg { opacity: 1; }
|
|
96
|
+
}
|
|
97
|
+
main {
|
|
98
|
+
position: relative;
|
|
99
|
+
z-index: 1;
|
|
100
|
+
width: 100%;
|
|
101
|
+
max-width: 28rem;
|
|
102
|
+
text-align: center;
|
|
103
|
+
}
|
|
104
|
+
.logo { width: 48px; height: 48px; display: inline-block; }
|
|
105
|
+
h1 {
|
|
106
|
+
margin: 1.5rem 0 0;
|
|
107
|
+
font-size: 28px;
|
|
108
|
+
line-height: 34px;
|
|
109
|
+
letter-spacing: -0.045rem;
|
|
110
|
+
font-weight: 500;
|
|
111
|
+
color: #f0f0f0;
|
|
112
|
+
text-wrap: balance;
|
|
113
|
+
}
|
|
114
|
+
p {
|
|
115
|
+
margin: 0.75rem 0 0;
|
|
116
|
+
font-size: 15px;
|
|
117
|
+
line-height: 1.5;
|
|
118
|
+
color: #a1a4a5;
|
|
119
|
+
text-wrap: balance;
|
|
120
|
+
}
|
|
121
|
+
</style>
|
|
122
|
+
</head>
|
|
123
|
+
<body>
|
|
124
|
+
<div class="bg"></div>
|
|
125
|
+
<main>
|
|
126
|
+
${Hp}
|
|
127
|
+
<h1>${t}</h1>
|
|
128
|
+
<p>${o}</p>
|
|
129
|
+
</main>
|
|
130
|
+
</body>
|
|
131
|
+
</html>`}function vs(){let e=ur((0,so.randomBytes)(64)),t=ur((0,so.createHash)("sha256").update(e).digest()),o=ur((0,so.randomBytes)(24));return{codeVerifier:e,codeChallenge:t,state:o}}function xs(){return new Promise((e,t)=>{let o,i,r=new Promise((a,l)=>{o=a,i=l}),n=(0,Us.createServer)((a,l)=>{let d=new URL(a.url??"/","http://127.0.0.1");if(d.pathname!=="/oauth/callback"){l.writeHead(404,{Connection:"close"}),l.end();return}let c=d.searchParams.get("code"),u=d.searchParams.get("state"),m=d.searchParams.get("error"),b=m?`Authorization denied: ${m}`:!c||!u?"Missing code or state in OAuth callback":null,A=ys(b?{heading:"Authentication failed",message:`${b}. Return to your terminal and try again.`}:{heading:"Authentication complete",message:"You can close this tab and return to your terminal."});l.writeHead(200,{"Content-Type":"text/html; charset=utf-8",Connection:"close"}),l.end(A,()=>{a.socket.destroy()}),n.close(),clearTimeout(s),b?i(new Error(b)):c&&u&&o({code:c,state:u})}),s=setTimeout(()=>{n.close(),i(new Error("OAuth login timed out after 5 minutes. Please try again."))},300*1e3);n.listen(0,"127.0.0.1",()=>{let{port:a}=n.address();e({port:a,waitForCallback:r})}),n.on("error",t)})}async function Fs(e){let t=await Ss(`${e.baseUrl}/oauth/token`,new URLSearchParams({grant_type:"authorization_code",client_id:e.clientId,code:e.code,redirect_uri:e.redirectUri,code_verifier:e.codeVerifier}),"Token exchange");if(!t.ok){let o="";try{let i=await t.json();o=i.error_description??i.error??""}catch{}throw new Error(`Token exchange failed (${t.status})${o?`: ${o}`:""}`)}return Ks(await t.json())}var so,Us,Ho,cr,Pp,$p,pr,Hp,Qo=me(()=>{"use strict";so=require("node:crypto"),Us=require("node:http");ge();Cs();Ho="7136aa0b-625c-4c9c-8820-e9784c8eb141",cr="Received an invalid access token from Resend. Please run `resend login` to authenticate again.";Pp=3e4,$p=60,pr="OAuthNetworkError";Hp=`<svg class="logo" role="img" aria-label="Resend" fill="none" viewBox="0 0 78 78" xmlns="http://www.w3.org/2000/svg">
|
|
132
|
+
<rect x="1" y="1" width="76" height="76" rx="21" stroke="#FDFDFD" stroke-opacity="0.1" stroke-width="2" />
|
|
133
|
+
<path d="M43.0184 21C49.9908 21 54.1374 25.1467 54.1374 30.6513C54.1374 36.1558 49.9908 40.3025 43.0184 40.3025H39.4953L57 57H44.6329L31.3118 44.3394C30.3578 43.4587 29.9174 42.4312 29.9174 41.5506C29.9174 40.3029 30.7984 39.202 32.4864 38.7249L39.3485 36.8897C41.954 36.1925 43.7522 34.1741 43.7522 31.5319C43.7522 28.3027 41.1098 26.4312 37.8438 26.4312H21V21H43.0184Z" fill="url(#resend_cli_logo_a)" />
|
|
134
|
+
<path d="M54.1375 30.6513C54.1374 25.1467 49.9908 21 43.0184 21V20.55C46.5934 20.55 49.4879 21.6142 51.4941 23.4275C53.4405 25.1867 54.5189 27.6229 54.5844 30.3832L54.5875 30.6513C54.5875 33.5218 53.5032 36.0591 51.4941 37.875C49.5505 39.6317 46.7734 40.6853 43.3515 40.7495L43.0184 40.7525H40.619L58.1237 57.45H44.4532L44.3231 57.3261L31.0064 44.6694C29.978 43.7199 29.4675 42.579 29.4674 41.5506C29.4674 40.0491 30.5379 38.8082 32.3643 38.292L32.37 38.2903L39.2321 36.4551C41.6742 35.8016 43.3023 33.9377 43.3023 31.5319C43.3023 30.0523 42.7022 28.9051 41.7383 28.1191C40.7652 27.3258 39.3949 26.8812 37.8438 26.8812H20.55V20.55H43.0184V21H21V26.4312H37.8438C41.1098 26.4312 43.7522 28.3027 43.7523 31.5319C43.7523 34.1741 41.954 36.1925 39.3485 36.8897L32.4865 38.7249C30.7984 39.202 29.9174 40.3029 29.9174 41.5506C29.9175 42.4312 30.3578 43.4587 31.3118 44.3393L44.633 57H57.0001L39.4953 40.3025H43.0184C49.9909 40.3025 54.1375 36.1558 54.1375 30.6513Z" fill="url(#resend_cli_logo_b)" />
|
|
135
|
+
<defs>
|
|
136
|
+
<linearGradient id="resend_cli_logo_a" x1="39" y1="21" x2="58.1887" y2="56.4242" gradientUnits="userSpaceOnUse">
|
|
137
|
+
<stop stop-color="#FDFDFD" />
|
|
138
|
+
<stop offset="1" stop-color="#ADADAD" />
|
|
139
|
+
</linearGradient>
|
|
140
|
+
<linearGradient id="resend_cli_logo_b" x1="39.3369" y1="20.55" x2="58.8097" y2="57.1549" gradientUnits="userSpaceOnUse">
|
|
141
|
+
<stop stop-color="#FDFDFD" />
|
|
142
|
+
<stop offset="1" stop-color="#ADADAD" />
|
|
143
|
+
</linearGradient>
|
|
144
|
+
</defs>
|
|
145
|
+
</svg>`});var ks,Ke,Rs,Ds,Qp,_s=me(()=>{"use strict";ks=require("node:crypto"),Ke=require("node:fs"),Rs=require("node:path"),Ds=(e,t,o)=>{let i=`${e}.tmp.${process.pid}.${(0,ks.randomUUID)()}`;try{let r=(0,Ke.openSync)(i,"w",o);try{(0,Ke.writeSync)(r,t),(0,Ke.fsyncSync)(r)}finally{(0,Ke.closeSync)(r)}(0,Ke.renameSync)(i,e),Qp((0,Rs.dirname)(e))}catch(r){try{(0,Ke.unlinkSync)(i)}catch{}throw r}},Qp=e=>{if(process.platform!=="win32")try{let t=(0,Ke.openSync)(e,"r");try{(0,Ke.fsyncSync)(t)}finally{(0,Ke.closeSync)(t)}}catch{}}});function Ie(){return process.env.XDG_CONFIG_HOME?(0,Rt.join)(process.env.XDG_CONFIG_HOME,"resend"):process.platform==="win32"&&process.env.APPDATA?(0,Rt.join)(process.env.APPDATA,"resend"):(0,Rt.join)((0,Ts.homedir)(),".config","resend")}function Ut(){return(0,Rt.join)(Ie(),"credentials.json")}function Bs(e){return e.type==="oauth_grant"?fr(e)?{type:"oauth_grant",...e}:{type:"oauth_grant",scope:typeof e.scope=="string"?e.scope:""}:{type:"api_key",...e.api_key!==void 0?{api_key:e.api_key}:{},...e.permission?{permission:e.permission}:{}}}function mr(){try{return ye()}catch{return null}}function ye(){let e=Ut();if(!(0,Ee.existsSync)(e))return null;let t=(0,Ee.readFileSync)(e,"utf-8");if(t.trim().length===0)return null;let o;try{o=JSON.parse(t)}catch{throw new Oo(e)}if(typeof o=="object"&&o!==null&&"api_key"in o&&!("profiles"in o)&&!("teams"in o))return{active_profile:"default",profiles:{default:{type:"api_key",api_key:o.api_key}}};if("profiles"in o){let i=o.storage==="keychain"?"secure_storage":o.storage,r=o.profiles;return{active_profile:o.active_profile??"default",...i?{storage:i}:{},profiles:Object.fromEntries(Object.entries(r).map(([n,s])=>[n,Bs(s)]))}}if("teams"in o){let i=o.teams;return{active_profile:o.active_team??"default",profiles:Object.fromEntries(Object.entries(i).map(([r,n])=>[r,Bs(n)]))}}return null}function ut(e){let t=Ie();(0,Ee.mkdirSync)(t,{recursive:!0,mode:448});let o=Ut();return Ds(o,`${JSON.stringify(e,null,2)}
|
|
146
|
+
`,384),(0,Ee.chmodSync)(o,384),o}function No(e){if(e)return e;let t=process.env.RESEND_PROFILE;if(t)return t;let o=ye();return o?.active_profile?o.active_profile:"default"}function or(e,t,o){let i=t||"default",r=ne(i);if(r)throw new Error(r);return Xe(ct(),()=>{let n=ye()||{active_profile:"default",profiles:{}},s={...n.profiles,[i]:{type:"api_key",api_key:e,...o&&{permission:o}}},a={...n,profiles:s,...Object.keys(s).length===1?{active_profile:i}:{}};return ut(a)})}function ns(e){return Xe(ct(),()=>{let t=ye();if(!t)throw new Error("No credentials file found.");let o=e||No();if(!t.profiles[o])throw new Error(`Profile "${o}" not found. Available profiles: ${Object.keys(t.profiles).join(", ")}`);let{[o]:i,...r}=t.profiles;if(Object.keys(r).length===0){let s=Ut();return(0,Ee.unlinkSync)(s),s}let n=t.active_profile===o?Object.keys(r)[0]||"default":t.active_profile;return ut({...t,active_profile:n,profiles:r})})}function ao(e){let t=ne(e);if(t)throw new Error(t);Xe(ct(),()=>{let o=ye();if(!o)throw new Error("No credentials file found. Run: resend login");if(!o.profiles[e])throw new Error(`Profile "${e}" not found. Available profiles: ${Object.keys(o.profiles).join(", ")}`);ut({...o,active_profile:e})})}function Se(){let e=ye();return e?Object.keys(e.profiles).map(t=>({name:t,active:t===e.active_profile})):[]}function ne(e){if(!e||e.length===0)return"Profile name must not be empty";if(e.length>64)return"Profile name must be 64 characters or fewer";if(!/^[a-zA-Z0-9._-]+$/.test(e))return"Profile name must contain only letters, numbers, dots, dashes, and underscores"}function dt(e){return e.length<=7?`${e.slice(0,3)}...`:`${e.slice(0,3)}...${e.slice(-4)}`}function fr(e){if(typeof e!="object"||e===null)return!1;let t=e;return typeof t.access_token=="string"&&typeof t.access_token_expires_at=="number"&&typeof t.refresh_token=="string"&&typeof t.scope=="string"}function Gp(e){return fr(e)?e:null}function Np(e){let t;try{t=JSON.parse(e)}catch{t=null}if(!fr(t))throw new Error("Stored OAuth credentials are invalid. Please run `resend login` to authenticate again.");return t}async function Kt(e,t,o){if(e)return{type:"api_key",key:e,source:"flag"};let i=process.env.RESEND_API_KEY;if(i)return{type:"api_key",key:i,source:"env"};let r=ye(),n=t||process.env.RESEND_PROFILE||r?.active_profile||"default";if(r?.storage==="secure_storage"&&r.profiles[n]){let s=r.profiles[n],l=await(await Ye()).get(Qe,n);if(l){if(s.type==="oauth_grant"){let d=Np(l);return Es(d,n,"secure_storage",o)}return{type:"api_key",key:l,source:"secure_storage",profile:n,permission:s.permission}}}if(r){let s=r.profiles[n];if(s?.type==="api_key"&&s.api_key)return{type:"api_key",key:s.api_key,source:"config",profile:n,permission:s.permission};if(s?.type==="oauth_grant"){let a=Gp(s);if(a)return Es(a,n,"config",o)}}return null}async function Es(e,t,o,i){if(i?.refresh===!1)return{type:"oauth_grant",access_token:e.access_token,profile:t,scope:e.scope,source:o};let{access_token:r,scope:n}=await ws(e,t);return{type:"oauth_grant",access_token:r,profile:t,scope:n,source:o}}async function Os(e,t,o){let i=t||"default",r=ne(i);if(r)throw new Error(r);let n=await Ye();return n.isSecure?{configPath:await Xe(ct(),async()=>{await n.set(Qe,i,e);let a=ye()||{active_profile:"default",profiles:{}},l={...a.profiles,[i]:{type:"api_key",...o&&{permission:o}}};return ut({...a,storage:"secure_storage",profiles:l,...Object.keys(l).length===1?{active_profile:i}:{}})}),backend:n}:{configPath:or(e,i,o),backend:n}}async function Go(e,t){let o=t||"default",i=ne(o);if(i)throw new Error(i);let r=await Ye();return{configPath:await Xe(ct(),async()=>{let s=ye()||{active_profile:"default",profiles:{}},a=r.isSecure?{type:"oauth_grant",scope:e.scope}:{type:"oauth_grant",...e};r.isSecure&&await r.set(Qe,o,JSON.stringify(e));let l={...s.profiles,[o]:a};try{return ut({...s,storage:r.isSecure?"secure_storage":"file",profiles:l,...Object.keys(l).length===1?{active_profile:o}:{}})}catch(d){throw r.isSecure&&await r.delete(Qe,o).catch(()=>{}),d}}),backend:r}}async function qo(e){return Xe(ct(),async()=>{let t=ye(),o=e||process.env.RESEND_PROFILE||t?.active_profile||"default";if(!t?.profiles[o])throw new Error(t?`Profile "${o}" not found. Available profiles: ${Object.keys(t.profiles).join(", ")}`:"No credentials file found.");if(t.storage==="secure_storage"){let s=await Ye();if(s.isSecure&&!await s.delete(Qe,o))throw new Error(`Failed to remove API key for profile "${o}" from ${s.name}. Credential may still exist in secure storage.`)}let{[o]:i,...r}=t.profiles;if(Object.keys(r).length===0){let s=Ut();return(0,Ee.unlinkSync)(s),s}let n=t.active_profile===o?Object.keys(r)[0]||"default":t.active_profile;return ut({...t,active_profile:n,profiles:r})})}async function js(){return Xe(ct(),async()=>{let e=mr(),t=Ut();if(e?.storage==="secure_storage"){let o=await Ye();if(o.isSecure){let i=Object.keys(e.profiles),r=await Promise.all(i.map(s=>o.delete(Qe,s))),n=i.filter((s,a)=>!r[a]);if(n.length>0){let s=Object.fromEntries(Object.entries(e.profiles).filter(([l])=>!r[i.indexOf(l)])),a=Object.keys(s);throw ut({...e,active_profile:e.active_profile&&s[e.active_profile]?e.active_profile:a[0]??"default",profiles:s}),new Error(`Failed to remove API keys from ${o.name} for profiles: ${n.join(", ")}. Credentials may still exist in secure storage.`)}}}return(0,Ee.existsSync)(t)&&(0,Ee.unlinkSync)(t),t})}async function Mo(e,t){if(e===t)return;let o=ne(t);if(o)throw new Error(o);await Xe(ct(),async()=>{let i=ye();if(!i)throw new Error("No credentials file found. Run: resend login");if(!i.profiles[e])throw new Error(`Profile "${e}" not found. Available profiles: ${Object.keys(i.profiles).join(", ")}`);if(i.profiles[t])throw new Error(`Profile "${t}" already exists.`);if(i.storage==="secure_storage"){let s=await Ye();if(s.isSecure){let a=await s.get(Qe,e);if(a&&(await s.set(Qe,t,a),!await s.delete(Qe,e))){let d=await s.delete(Qe,t);throw new Error(d?`Failed to remove old credential "${e}" from ${s.name} during rename. The rename has been rolled back.`:`Failed to remove old credential "${e}" from ${s.name} during rename. Rollback also failed \u2014 credential "${t}" may still exist in secure storage.`)}}}let{[e]:r,...n}=i.profiles;ut({...i,active_profile:i.active_profile===e?t:i.active_profile,profiles:{...n,[t]:r}})})}var Ee,Ts,Rt,Dt,ct,ge=me(()=>{"use strict";Ee=require("node:fs"),Ts=require("node:os"),Rt=require("node:path");rs();ar();hs();Qo();_s();Dt=`Sending-only keys work with: emails send, emails batch, broadcasts send.
|
|
147
|
+
Create a full access key at https://resend.com/api-keys`;ct=()=>(0,Rt.join)(Ie(),"credentials.json.lock")});function U(){return!(!process.stdin.isTTY||!process.stdout.isTTY||process.env.CI==="true"||process.env.CI==="1"||process.env.GITHUB_ACTIONS||process.env.TERM==="dumb")}var Ze,V=me(()=>{"use strict";Ze=process.platform!=="win32"||!!process.env.WT_SESSION||process.env.TERM_PROGRAM==="vscode"});function _l(){return(0,Dl.join)(Ie(),"update-state.json")}function ym(){try{return JSON.parse((0,Qt.readFileSync)(_l(),"utf-8"))}catch{return null}}function Um(e){(0,Qt.mkdirSync)(Ie(),{recursive:!0,mode:448}),(0,Qt.writeFileSync)(_l(),JSON.stringify(e),{mode:384})}function li(e,t){let o=d=>d.replace(/^v/,"").split(".").map(Number),[i,r,n]=o(e),[s,a,l]=o(t);return s!==i?s>i:a!==r?a>r:l>n}async function wr(){try{let e=await fetch(Sr,{headers:{Accept:"application/vnd.github.v3+json"},signal:AbortSignal.timeout(5e3)});if(!e.ok)return null;let t=await e.json();if(t.prerelease||t.draft)return null;let o=t.tag_name?.replace(/^v/,"");return!o||!/^\d+\.\d+\.\d+$/.test(o)?null:o}catch{return null}}function Km(e){return!!(e?.json||process.env.RESEND_NO_UPDATE_NOTIFIER==="1"||process.env.CI==="true"||process.env.CI==="1"||process.env.GITHUB_ACTIONS||!process.stdout.isTTY)}function Bl(){let e=ci();return e.startsWith("npm")?"npm":e.startsWith("brew")?"homebrew":e.startsWith("curl")||e.startsWith("irm")?"install-script":"manual"}function ci(){let e=process.execPath||process.argv[0]||"",t=process.argv[1]||"";return process.env.npm_execpath||/node_modules/.test(t)||/node_modules/.test(e)?"npm install -g resend-cli":/\/(Cellar|homebrew)\//i.test(e)?"brew update && brew upgrade resend":/[/\\]\.resend[/\\]bin[/\\]/.test(e)?process.platform==="win32"?"irm https://resend.com/install.ps1 | iex":"curl -fsSL https://resend.com/install.sh | bash":"https://github.com/resend/resend-cli/releases/latest"}function Rl(e){let t=ci(),o=t.startsWith("http"),i="\x1B[2m",r="\x1B[33m",n="\x1B[36m",s="\x1B[0m",a=["",`${i}Update available: ${r}v${te}${s}${i} \u2192 ${n}v${e}${s}`,`${i}${o?"Visit":"Run"}: ${n}${t}${s}`];return process.platform==="win32"&&a.push(`${i}Or download from: ${n}https://github.com/resend/resend-cli/releases/latest${s}`),a.push(""),a.join(`
|
|
148
|
+
`)}async function El(e){if(Km(e))return;let t=ym(),o=Date.now();if(t&&o-t.lastChecked<Cm){li(te,t.latestVersion)&&process.stderr.write(Rl(t.latestVersion));return}let i=await wr();i&&(Um({lastChecked:o,latestVersion:i}),li(te,i)&&process.stderr.write(Rl(i)))}var Qt,Dl,Cm,Sr,fo=me(()=>{"use strict";Qt=require("node:fs"),Dl=require("node:path");ge();bt();Cm=3600*1e3,Sr="https://api.github.com/repos/resend/resend-cli/releases/latest"});var vu={};Lt(vu,{flushFromFile:()=>nf,flushPayload:()=>wu,getOrCreateAnonymousId:()=>Su,getSpoolDir:()=>Rr,isDisabled:()=>Ku,trackCommand:()=>Dr});function Zm(){return Xm[process.platform]??process.platform}function Rr(){let e=(0,Ne.join)(Ie(),"telemetry-spool");return(0,M.mkdirSync)(e,{recursive:!0,mode:448}),e}function Ku(){return!Uu||process.env.DO_NOT_TRACK==="1"||process.env.RESEND_TELEMETRY_DISABLED==="1"}function Su(){let e=Ie(),t=(0,Ne.join)(e,"telemetry-id");try{let i=(0,M.readFileSync)(t,"utf-8").trim();if(i)return i}catch{}let o=crypto.randomUUID();return(0,M.mkdirSync)(e,{recursive:!0,mode:448}),(0,M.writeFileSync)(t,o,{mode:384}),o}function ef(e){if(!e)return;let t=Ie(),o=(0,Ne.join)(t,"telemetry-notice-shown");(0,M.existsSync)(o)||((0,M.mkdirSync)(t,{recursive:!0,mode:448}),(0,M.writeFileSync)(o,"",{mode:384}),process.stderr.write(`
|
|
65
149
|
Resend collects anonymous CLI usage data to improve the tool.
|
|
66
150
|
To opt out: export RESEND_TELEMETRY_DISABLED=1
|
|
67
151
|
|
|
68
|
-
`))}function
|
|
152
|
+
`))}function Dr(e,t){if(!Ku())try{let o=U()&&!t.json;ef(o);let i=Su(),r={command:e,cli_version:te,os:Zm(),node_version:process.version,interactive:o,install_method:Bl()};t.flags?.length&&(r.flags=t.flags),t.globalFlags?.length&&(r.global_flags=t.globalFlags);let n=crypto.randomUUID(),s=JSON.stringify({api_key:Uu,distinct_id:i,event:"cli.used",properties:r,_nonce:n}),a=Rr(),l=(0,Ne.join)(a,`resend-telemetry-${crypto.randomUUID()}.json`),d=(0,M.openSync)(l,M.constants.O_CREAT|M.constants.O_EXCL|M.constants.O_WRONLY|(M.constants.O_NOFOLLOW??0),384);try{(0,M.writeFileSync)(d,s)}finally{(0,M.closeSync)(d)}let c="pkg"in process,u=c?["telemetry","flush",l]:process.execArgv.concat([process.argv[1],"telemetry","flush",l]);(0,yu.spawn)(process.execPath,u,{detached:!0,stdio:"ignore",env:{...process.env,RESEND_TELEMETRY_DISABLED:"1",...c?{PKG_EXECPATH:""}:{}}}).unref()}catch{}}async function wu(e){let t=JSON.parse(e);if(!tf(t))throw new Error("invalid telemetry payload schema");let{_nonce:o,...i}=t,r=JSON.stringify(i),n=await fetch(Ym,{method:"POST",headers:{"Content-Type":"application/json"},body:r,signal:AbortSignal.timeout(3e3)});if(!n.ok)throw new Error(`telemetry flush failed: ${n.status}`)}async function nf(e){let t=(0,Ne.join)(e),o=Rr(),i=(0,Ne.basename)(t);if((0,Ne.dirname)(t)!==o||!rf.test(i)||(0,M.realpathSync)((0,Ne.dirname)(t))!==(0,M.realpathSync)(o))throw new Error("invalid telemetry flush path");let r=(0,M.openSync)(t,M.constants.O_RDONLY|M.constants.O_NOFOLLOW),n;try{let s=(0,M.fstatSync)(r);if(!s.isFile()||s.nlink!==1)throw new Error("invalid telemetry flush path");n=(0,M.readFileSync)(r,"utf-8")}finally{(0,M.closeSync)(r)}try{await wu(n)}finally{(0,M.unlinkSync)(t)}}var yu,M,Ne,Uu,Ym,Xm,Cu,tf,of,rf,_r=me(()=>{"use strict";yu=require("node:child_process"),M=require("node:fs"),Ne=require("node:path");ge();V();fo();bt();Uu="phc_AgEBpcQTRsBl3UgQX2U8XvimTlgdXG6YEhfvJl2cUfc",Ym="https://us.i.posthog.com/capture/",Xm={darwin:"macOS",win32:"Windows",linux:"Linux"};Cu=new Set(["api_key","distinct_id","event","properties","_nonce"]),tf=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;let t=e,o=Object.keys(t);return o.length!==Cu.size||o.some(i=>!Cu.has(i))?!1:typeof t.api_key=="string"&&typeof t.distinct_id=="string"&&t.event==="cli.used"&&typeof t.properties=="object"&&t.properties!==null&&!Array.isArray(t.properties)&&typeof t._nonce=="string"&&t._nonce.length>0};of="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",rf=new RegExp(`^resend-telemetry-${of}\\.json$`)});var Wr=fe(Lr(),1),{program:ff,createCommand:gf,createArgument:Af,createOption:hf,CommanderError:bf,InvalidArgumentError:Cf,InvalidOptionArgumentError:yf,Command:p,Argument:Jr,Option:z,Help:Uf}=Wr.default;var Mt=fe(ot(),1);var Zu=`Global options:
|
|
69
153
|
--api-key <key> API key (or set RESEND_API_KEY env var)
|
|
70
154
|
-p, --profile <name> Profile to use (overrides RESEND_PROFILE)
|
|
71
155
|
--json Force JSON output (also auto-enabled when stdout is piped)
|
|
72
|
-
-q, --quiet Suppress spinners and status output (implies --json)`,
|
|
156
|
+
-q, --quiet Suppress spinners and status output (implies --json)`,ed=`Global options:
|
|
73
157
|
-p, --profile <name> Profile to use
|
|
74
158
|
--json Force JSON output
|
|
75
|
-
-q, --quiet Suppress spinners and status output (implies --json)`,
|
|
159
|
+
-q, --quiet Suppress spinners and status output (implies --json)`,td=' {"error":{"message":"<message>","code":"<code>"}}';function f(e){let t=[];return e.context!=null&&t.push(e.context),t.push(e.setup?ed:Zu),e.output!=null&&t.push(`Output (--json or piped):
|
|
76
160
|
${e.output}`),e.errorCodes!=null&&t.push(`Errors (exit code 1, JSON on stderr when using --json or non-TTY):
|
|
77
|
-
${
|
|
161
|
+
${td}
|
|
78
162
|
Codes: ${e.errorCodes.join(" | ")}`),t.push(`Examples:
|
|
79
|
-
${e.examples.map(
|
|
163
|
+
${e.examples.map(o=>` $ ${o}`).join(`
|
|
80
164
|
`)}`),`
|
|
81
165
|
${t.join(`
|
|
82
166
|
|
|
83
|
-
`)}`}var
|
|
84
|
-
`),c=!1;for(let u=0;u<d.length;u++){let
|
|
85
|
-
`){
|
|
86
|
-
`&&(
|
|
87
|
-
`)}var
|
|
88
|
-
`),
|
|
89
|
-
`),
|
|
90
|
-
`).map((a,l,d)=>{let c=
|
|
91
|
-
`)}var
|
|
92
|
-
`),
|
|
93
|
-
`).length-1;this.output.write(
|
|
94
|
-
`);this.output.write(s[
|
|
95
|
-
`).slice(
|
|
96
|
-
`)),this._prevFrame=e;return}}this.output.write(
|
|
97
|
-
`);
|
|
167
|
+
`)}`}var Ko=require("node:util"),Jt=require("node:process");var mn=fe(require("node:readline"),1);var Yr=(()=>{let e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return t=>{let o=0;for(e.lastIndex=0;e.test(t);)o+=1;return t.length-o}})(),Xr=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,Zr=e=>e===8987||e===9001||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e>=131072&&e<=196605||e>=196608&&e<=262141;var od=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,id=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,en=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,rd=/\t{1,1000}/y,tn=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,nd=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,sd=/\p{M}+/gu,ad={limit:1/0,ellipsis:""},on=(e,t={},o={})=>{let i=t.limit??1/0,r=t.ellipsis??"",n=t?.ellipsisWidth??(r?on(r,ad,o).width:0),s=0,a=o.controlWidth??0,l=o.tabWidth??8,d=o.emojiWidth??2,c=2,u=o.regularWidth??1,m=o.wideWidth??c,b=[[nd,u],[od,s],[id,a],[rd,l],[tn,d],[en,m]],A=0,h=0,K=e.length,w=0,S=!1,v=K,P=Math.max(0,i-n),k=0,B=0,D=0,F=0;e:for(;;){if(B>k||h>=K&&h>A){let E=e.slice(k,B)||e.slice(A,h);w=0;for(let be of E.replaceAll(sd,"")){let ee=be.codePointAt(0)||0;if(Xr(ee)?F=c:Zr(ee)?F=m:F=u,D+F>P&&(v=Math.min(v,Math.max(k,A)+w)),D+F>i){S=!0;break e}w+=be.length,D+=F}k=B=0}if(h>=K)break e;for(let E=0,be=b.length;E<be;E++){let[ee,At]=b[E];if(ee.lastIndex=h,ee.test(e)){if(w=ee===en?Yr(e.slice(h,ee.lastIndex)):ee===tn?1:ee.lastIndex-h,F=w*At,D+F>P&&(v=Math.min(v,h+Math.floor((P-D)/At))),D+F>i){S=!0;break e}D+=F,k=A,B=h,h=A=ee.lastIndex;continue e}}h+=1}return{width:S?P:D,index:S?v:K,truncated:S,ellipsed:S&&i>=n}},rn=on;var ld={limit:1/0,ellipsis:"",ellipsisWidth:0},cd=(e,t={})=>rn(e,ld,t).width,qe=cd;var yo="\x1B",cn="\x9B",ud=39,Ei="\x07",un="[",dd="]",dn="m",Ti=`${dd}8;;`,nn=new RegExp(`(?:\\${un}(?<code>\\d+)m|\\${Ti}(?<uri>.*)${Ei})`,"y"),sn=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},an=e=>`${yo}${un}${e}${dn}`,ln=e=>`${yo}${Ti}${e}${Ei}`,Bi=(e,t,o)=>{let i=t[Symbol.iterator](),r=!1,n=!1,s=e.at(-1),a=s===void 0?0:qe(s),l=i.next(),d=i.next(),c=0;for(;!l.done;){let u=l.value,m=qe(u);a+m<=o?e[e.length-1]+=u:(e.push(u),a=0),(u===yo||u===cn)&&(r=!0,n=t.startsWith(Ti,c+1)),r?n?u===Ei&&(r=!1,n=!1):u===dn&&(r=!1):(a+=m,a===o&&!d.done&&(e.push(""),a=0)),l=d,d=i.next(),c+=u.length}s=e.at(-1),!a&&s!==void 0&&s.length&&e.length>1&&(e[e.length-2]+=e.pop())},pd=e=>{let t=e.split(" "),o=t.length;for(;o&&!qe(t[o-1]);)o--;return o===t.length?e:t.slice(0,o).join(" ")+t.slice(o).join("")},md=(e,t,o={})=>{if(o.trim!==!1&&e.trim()==="")return"";let i="",r,n,s=e.split(" "),a=[""],l=0;for(let u=0;u<s.length;u++){let m=s[u];if(o.trim!==!1){let A=a.at(-1)??"",h=A.trimStart();A.length!==h.length&&(a[a.length-1]=h,l=qe(h))}u!==0&&(l>=t&&(o.wordWrap===!1||o.trim===!1)&&(a.push(""),l=0),(l||o.trim===!1)&&(a[a.length-1]+=" ",l++));let b=qe(m);if(o.hard&&b>t){let A=t-l,h=1+Math.floor((b-A-1)/t);Math.floor((b-1)/t)<h&&a.push(""),Bi(a,m,t),l=qe(a.at(-1)??"");continue}if(l+b>t&&l&&b){if(o.wordWrap===!1&&l<t){Bi(a,m,t),l=qe(a.at(-1)??"");continue}a.push(""),l=0}if(l+b>t&&o.wordWrap===!1){Bi(a,m,t),l=qe(a.at(-1)??"");continue}a[a.length-1]+=m,l+=b}o.trim!==!1&&(a=a.map(u=>pd(u)));let d=a.join(`
|
|
168
|
+
`),c=!1;for(let u=0;u<d.length;u++){let m=d[u];if(i+=m,c)c=!1;else if(c=m>="\uD800"&&m<="\uDBFF",c)continue;if(m===yo||m===cn){nn.lastIndex=u+1;let A=nn.exec(d)?.groups;if(A?.code!==void 0){let h=Number.parseFloat(A.code);r=h===ud?void 0:h}else A?.uri!==void 0&&(n=A.uri.length===0?void 0:A.uri)}if(d[u+1]===`
|
|
169
|
+
`){n&&(i+=ln(""));let b=r?sn(r):void 0;r&&b&&(i+=an(b))}else m===`
|
|
170
|
+
`&&(r&&sn(r)&&(i+=an(r)),n&&(i+=ln(n)))}return i},fd=/\r?\n/;function wt(e,t,o){return String(e).normalize().split(fd).map(i=>md(i,t,o)).join(`
|
|
171
|
+
`)}var _e=fe(ji(),1);function ht(e,t,o){if(!o.some(s=>!s.disabled))return e;let i=e+t,r=Math.max(o.length-1,0),n=i<0?r:i>r?0:i;return o[n].disabled?ht(n,t<0?-1:1,o):n}var hd=["up","down","left","right","space","enter","cancel"],bd=["January","February","March","April","May","June","July","August","September","October","November","December"],Ce={actions:new Set(hd),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]]),messages:{cancel:"Canceled",error:"Something went wrong"},withGuide:!0,date:{monthNames:[...bd],messages:{required:"Please enter a valid date",invalidMonth:"There are only 12 months in a year",invalidDay:(e,t)=>`There are only ${e} days in ${t}`,afterMin:e=>`Date must be on or after ${e.toISOString().slice(0,10)}`,beforeMax:e=>`Date must be on or before ${e.toISOString().slice(0,10)}`}}};function fn(e,t){if(typeof e=="string")return Ce.aliases.get(e)===t;for(let o of e)if(o!==void 0&&fn(o,t))return!0;return!1}function Cd(e,t){if(e===t)return;let o=e.split(`
|
|
172
|
+
`),i=t.split(`
|
|
173
|
+
`),r=Math.max(o.length,i.length),n=[];for(let s=0;s<r;s++)o[s]!==i[s]&&n.push(s);return{lines:n,numLinesBefore:o.length,numLinesAfter:i.length,numLines:r}}var Tf=globalThis.process.platform.startsWith("win"),Ii=Symbol("clack:cancel");function x(e){return e===Ii}function Uo(e,t){let o=e;o.isTTY&&o.setRawMode(t)}var Pi=e=>"columns"in e&&typeof e.columns=="number"?e.columns:80,$i=e=>"rows"in e&&typeof e.rows=="number"?e.rows:20;function it(e,t,o,i=o,r=o,n){let s=Pi(e??Jt.stdout);return wt(t,s-o.length,{hard:!0,trim:!1}).split(`
|
|
174
|
+
`).map((a,l,d)=>{let c=n?n(a,l):a;return l===0?`${i}${c}`:l===d.length-1?`${r}${c}`:`${o}${c}`}).join(`
|
|
175
|
+
`)}var Vt=class{input;output;_abortSignal;rl;opts;_render;_track=!1;_prevFrame="";_subscribers=new Map;_cursor=0;state="initial";error="";value;userInput="";constructor(e,t=!0){let{input:o=Jt.stdin,output:i=Jt.stdout,render:r,signal:n,...s}=e;this.opts=s,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=r.bind(this),this._track=t,this._abortSignal=n,this.input=o,this.output=i}unsubscribe(){this._subscribers.clear()}setSubscriber(e,t){let o=this._subscribers.get(e)??[];o.push(t),this._subscribers.set(e,o)}on(e,t){this.setSubscriber(e,{cb:t})}once(e,t){this.setSubscriber(e,{cb:t,once:!0})}emit(e,...t){let o=this._subscribers.get(e)??[],i=[];for(let r of o)r.cb(...t),r.once&&i.push(()=>o.splice(o.indexOf(r),1));for(let r of i)r()}prompt(){return new Promise(e=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),e(Ii);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}this.rl=mn.default.createInterface({input:this.input,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),this.rl.prompt(),this.opts.initialUserInput!==void 0&&this._setUserInput(this.opts.initialUserInput,!0),this.input.on("keypress",this.onKeypress),Uo(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(_e.cursor.show),this.output.off("resize",this.render),Uo(this.input,!1),e(this.value)}),this.once("cancel",()=>{this.output.write(_e.cursor.show),this.output.off("resize",this.render),Uo(this.input,!1),e(Ii)})})}_isActionKey(e,t){return e===" "}_shouldSubmit(e,t){return!0}_setValue(e){this.value=e,this.emit("value",this.value)}_setUserInput(e,t){this.userInput=e??"",this.emit("userInput",this.userInput),t&&this._track&&this.rl&&(this.rl.write(this.userInput),this._cursor=this.rl.cursor)}_clearUserInput(){this.rl?.write(null,{ctrl:!0,name:"u"}),this._setUserInput("")}onKeypress(e,t){if(this._track&&t.name!=="return"&&(t.name&&this._isActionKey(e,t)&&this.rl?.write(null,{ctrl:!0,name:"h"}),this._cursor=this.rl?.cursor??0,this._setUserInput(this.rl?.line)),this.state==="error"&&(this.state="active"),t?.name&&(!this._track&&Ce.aliases.has(t.name)&&this.emit("cursor",Ce.aliases.get(t.name)),Ce.actions.has(t.name)&&this.emit("cursor",t.name)),e&&(e.toLowerCase()==="y"||e.toLowerCase()==="n")&&this.emit("confirm",e.toLowerCase()==="y"),this.emit("key",e?.toLowerCase(),t),t?.name==="return"&&this._shouldSubmit(e,t)){if(this.opts.validate){let o=this.opts.validate(this.value);o&&(this.error=o instanceof Error?o.message:o,this.state="error",this.rl?.write(this.userInput))}this.state!=="error"&&(this.state="submit")}fn([e,t?.name,t?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
|
|
176
|
+
`),Uo(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let e=wt(this._prevFrame,process.stdout.columns,{hard:!0,trim:!1}).split(`
|
|
177
|
+
`).length-1;this.output.write(_e.cursor.move(-999,e*-1))}render(){let e=wt(this._render(this)??"",process.stdout.columns,{hard:!0,trim:!1});if(e!==this._prevFrame){if(this.state==="initial")this.output.write(_e.cursor.hide);else{let t=Cd(this._prevFrame,e),o=$i(this.output);if(this.restoreCursor(),t){let i=Math.max(0,t.numLinesAfter-o),r=Math.max(0,t.numLinesBefore-o),n=t.lines.find(s=>s>=i);if(n===void 0){this._prevFrame=e;return}if(t.lines.length===1){this.output.write(_e.cursor.move(0,n-r)),this.output.write(_e.erase.lines(1));let s=e.split(`
|
|
178
|
+
`);this.output.write(s[n]),this._prevFrame=e,this.output.write(_e.cursor.move(0,s.length-n-1));return}else if(t.lines.length>1){if(i<r)n=i;else{let a=n-r;a>0&&this.output.write(_e.cursor.move(0,a))}this.output.write(_e.erase.down());let s=e.split(`
|
|
179
|
+
`).slice(n);this.output.write(s.join(`
|
|
180
|
+
`)),this._prevFrame=e;return}}this.output.write(_e.erase.down())}this.output.write(e),this.state==="initial"&&(this.state="active"),this._prevFrame=e}}};var So=class extends Vt{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(t){super(t,!1),this.value=!!t.initialValue,this.on("userInput",()=>{this.value=this._value}),this.on("confirm",o=>{this.output.write(_e.cursor.move(0,-1)),this.value=o,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};var gn=class extends Vt{options;cursor=0;get _value(){return this.options[this.cursor].value}get _enabledOptions(){return this.options.filter(e=>e.disabled!==!0)}toggleAll(){let e=this._enabledOptions,t=this.value!==void 0&&this.value.length===e.length;this.value=t?[]:e.map(o=>o.value)}toggleInvert(){let e=this.value;if(!e)return;let t=this._enabledOptions.filter(o=>!e.includes(o.value));this.value=t.map(o=>o.value)}toggleValue(){this.value===void 0&&(this.value=[]);let e=this.value.includes(this._value);this.value=e?this.value.filter(t=>t!==this._value):[...this.value,this._value]}constructor(e){super(e,!1),this.options=e.options,this.value=[...e.initialValues??[]];let t=Math.max(this.options.findIndex(({value:o})=>o===e.cursorAt),0);this.cursor=this.options[t].disabled?ht(t,1,this.options):t,this.on("key",o=>{o==="a"&&this.toggleAll(),o==="i"&&this.toggleInvert()}),this.on("cursor",o=>{switch(o){case"left":case"up":this.cursor=ht(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=ht(this.cursor,1,this.options);break;case"space":this.toggleValue();break}})}},wo=class extends Vt{_mask="\u2022";get cursor(){return this._cursor}get masked(){return this.userInput.replaceAll(/./g,this._mask)}get userInputWithCursor(){if(this.state==="submit"||this.state==="cancel")return this.masked;let t=this.userInput;if(this.cursor>=t.length)return`${this.masked}${(0,Ko.styleText)(["inverse","hidden"],"_")}`;let o=this.masked,i=o.slice(0,this.cursor),r=o.slice(this.cursor);return`${i}${(0,Ko.styleText)("inverse",r[0])}${r.slice(1)}`}clear(){this._clearUserInput()}constructor({mask:t,...o}){super(o),this._mask=t??"\u2022",this.on("userInput",i=>{this._setValue(i)})}},vo=class extends Vt{options;cursor=0;get _selectedValue(){return this.options[this.cursor]}changeValue(){this.value=this._selectedValue.value}constructor(t){super(t,!1),this.options=t.options;let o=this.options.findIndex(({value:r})=>r===t.initialValue),i=o===-1?0:o;this.cursor=this.options[i].disabled?ht(i,1,this.options):i,this.changeValue(),this.on("cursor",r=>{switch(r){case"left":case"up":this.cursor=ht(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=ht(this.cursor,1,this.options);break}this.changeValue()})}};var xo=class extends Vt{get userInputWithCursor(){if(this.state==="submit")return this.userInput;let t=this.userInput;if(this.cursor>=t.length)return`${this.userInput}\u2588`;let o=t.slice(0,this.cursor),[i,...r]=t.slice(this.cursor);return`${o}${(0,Ko.styleText)("inverse",i)}${r.join("")}`}get cursor(){return this._cursor}constructor(t){super({...t,initialUserInput:t.initialUserInput??t.initialValue}),this.on("userInput",o=>{this._setValue(o)}),this.on("finalize",()=>{this.value||(this.value=t.defaultValue),this.value===void 0&&(this.value="")})}};var C=require("node:util"),je=fe(require("node:process"),1);var Cn=fe(ji(),1);function yd(){return je.default.platform!=="win32"?je.default.env.TERM!=="linux":!!je.default.env.CI||!!je.default.env.WT_SESSION||!!je.default.env.TERMINUS_SUBLIME||je.default.env.ConEmuTask==="{cmd::Cmder}"||je.default.env.TERM_PROGRAM==="Terminus-Sublime"||je.default.env.TERM_PROGRAM==="vscode"||je.default.env.TERM==="xterm-256color"||je.default.env.TERM==="alacritty"||je.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Ud=yd();var J=(e,t)=>Ud?e:t,Kd=J("\u25C6","*"),Sd=J("\u25A0","x"),wd=J("\u25B2","x"),yn=J("\u25C7","o"),vd=J("\u250C","T"),T=J("\u2502","|"),Me=J("\u2514","\u2014"),Jf=J("\u2510","T"),Vf=J("\u2518","\u2014"),Hi=J("\u25CF",">"),ko=J("\u25CB"," "),xd=J("\u25FB","[\u2022]"),An=J("\u25FC","[+]"),hn=J("\u25FB","[ ]"),Fd=J("\u25AA","\u2022"),zf=J("\u2500","-"),Yf=J("\u256E","+"),Xf=J("\u251C","+"),Zf=J("\u256F","+"),eg=J("\u2570","+"),tg=J("\u256D","+"),kd=J("\u25CF","\u2022"),Rd=J("\u25C6","*"),Dd=J("\u25B2","!"),_d=J("\u25A0","x"),Yt=e=>{switch(e){case"initial":case"active":return(0,C.styleText)("cyan",Kd);case"cancel":return(0,C.styleText)("red",Sd);case"error":return(0,C.styleText)("yellow",wd);case"submit":return(0,C.styleText)("green",yn)}},Un=e=>{switch(e){case"initial":case"active":return(0,C.styleText)("cyan",T);case"cancel":return(0,C.styleText)("red",T);case"error":return(0,C.styleText)("yellow",T);case"submit":return(0,C.styleText)("green",T)}},bn=(e,t,o,i,r,n=!1)=>{let s=t,a=0;if(n)for(let l=i-1;l>=o&&(s-=e[l].length,a++,!(s<=r));l--);else for(let l=o;l<i&&(s-=e[l].length,a++,!(s<=r));l++);return{lineCount:s,removals:a}},Qi=({cursor:e,options:t,style:o,output:i=process.stdout,maxItems:r=Number.POSITIVE_INFINITY,columnPadding:n=0,rowPadding:s=4})=>{let a=Pi(i)-n,l=$i(i),d=(0,C.styleText)("dim","..."),c=Math.max(l-s,0),u=Math.max(Math.min(r,c),5),m=0;e>=u-3&&(m=Math.max(Math.min(e-u+3,t.length-u),0));let b=u<t.length&&m>0,A=u<t.length&&m+u<t.length,h=Math.min(m+u,t.length),K=[],w=0;b&&w++,A&&w++;let S=m+(b?1:0),v=h-(A?1:0);for(let k=S;k<v;k++){let B=wt(o(t[k],k===e),a,{hard:!0,trim:!1}).split(`
|
|
181
|
+
`);K.push(B),w+=B.length}if(w>c){let k=0,B=0,D=w,F=e-S,E=c,be=()=>bn(K,D,0,F,E),ee=()=>bn(K,D,F+1,K.length,E,!0);b?({lineCount:D,removals:k}=be(),D>E&&(A||(E-=1),{lineCount:D,removals:B}=ee())):(A||(E-=1),{lineCount:D,removals:B}=ee(),D>E&&(E-=1,{lineCount:D,removals:k}=be())),k>0&&(b=!0,K.splice(0,k)),B>0&&(A=!0,K.splice(K.length-B,B))}let P=[];b&&P.push(d);for(let k of K)for(let B of k)P.push(B);return A&&P.push(d),P};var rt=e=>{let t=e.active??"Yes",o=e.inactive??"No";return new So({active:t,inactive:o,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue??!0,render(){let i=e.withGuide??Ce.withGuide,r=`${Yt(this.state)} `,n=i?`${(0,C.styleText)("gray",T)} `:"",s=it(e.output,e.message,n,r),a=`${i?`${(0,C.styleText)("gray",T)}
|
|
98
182
|
`:""}${s}
|
|
99
|
-
`,l=this.value?t:
|
|
100
|
-
${(0,
|
|
101
|
-
${(0,
|
|
102
|
-
`:` ${(0,
|
|
183
|
+
`,l=this.value?t:o;switch(this.state){case"submit":{let d=i?`${(0,C.styleText)("gray",T)} `:"";return`${a}${d}${(0,C.styleText)("dim",l)}`}case"cancel":{let d=i?`${(0,C.styleText)("gray",T)} `:"";return`${a}${d}${(0,C.styleText)(["strikethrough","dim"],l)}${i?`
|
|
184
|
+
${(0,C.styleText)("gray",T)}`:""}`}default:{let d=i?`${(0,C.styleText)("cyan",T)} `:"",c=i?(0,C.styleText)("cyan",Me):"";return`${a}${d}${this.value?`${(0,C.styleText)("green",Hi)} ${t}`:`${(0,C.styleText)("dim",ko)} ${(0,C.styleText)("dim",t)}`}${e.vertical?i?`
|
|
185
|
+
${(0,C.styleText)("cyan",T)} `:`
|
|
186
|
+
`:` ${(0,C.styleText)("dim","/")} `}${this.value?`${(0,C.styleText)("dim",ko)} ${(0,C.styleText)("dim",o)}`:`${(0,C.styleText)("green",Hi)} ${o}`}
|
|
103
187
|
${c}
|
|
104
|
-
`}}}}).prompt()};var
|
|
105
|
-
`);if(u.length>0){let[
|
|
188
|
+
`}}}}).prompt()};var Kn=async(e,t)=>{let o={},i=Object.keys(e);for(let r of i){let n=e[r],s=await n({results:o})?.catch(a=>{throw a});if(typeof t?.onCancel=="function"&&x(s)){o[r]="canceled",t.onCancel({results:o});continue}o[r]=s}return o};var Y={message:(e=[],{symbol:t=(0,C.styleText)("gray",T),secondarySymbol:o=(0,C.styleText)("gray",T),output:i=process.stdout,spacing:r=1,withGuide:n}={})=>{let s=[],a=n??Ce.withGuide,l=a?o:"",d=a?`${t} `:"",c=a?`${o} `:"";for(let m=0;m<r;m++)s.push(l);let u=Array.isArray(e)?e:e.split(`
|
|
189
|
+
`);if(u.length>0){let[m,...b]=u;m.length>0?s.push(`${d}${m}`):s.push(a?t:"");for(let A of b)A.length>0?s.push(`${c}${A}`):s.push(a?o:"")}i.write(`${s.join(`
|
|
106
190
|
`)}
|
|
107
|
-
`)},info:(e,t)=>{
|
|
108
|
-
|
|
109
|
-
`)},
|
|
110
|
-
`)},
|
|
111
|
-
${(0,
|
|
112
|
-
|
|
113
|
-
`)};var
|
|
114
|
-
`).map(
|
|
115
|
-
`),
|
|
116
|
-
${(0,
|
|
117
|
-
`:""}${
|
|
118
|
-
`,s=this.value??[],a=(l,d)=>{if(l.disabled)return t(l,"disabled");let c=s.includes(l.value);return d&&c?t(l,"active-selected"):c?t(l,"selected"):t(l,d?"active":"inactive")};switch(this.state){case"submit":{let l=this.options.filter(({value:c})=>s.includes(c)).map(c=>t(c,"submitted")).join((0,
|
|
119
|
-
${(0,
|
|
120
|
-
`).map((
|
|
121
|
-
`),c=
|
|
191
|
+
`)},info:(e,t)=>{Y.message(e,{...t,symbol:(0,C.styleText)("blue",kd)})},success:(e,t)=>{Y.message(e,{...t,symbol:(0,C.styleText)("green",Rd)})},step:(e,t)=>{Y.message(e,{...t,symbol:(0,C.styleText)("green",yn)})},warn:(e,t)=>{Y.message(e,{...t,symbol:(0,C.styleText)("yellow",Dd)})},warning:(e,t)=>{Y.warn(e,t)},error:(e,t)=>{Y.message(e,{...t,symbol:(0,C.styleText)("red",_d)})}},Sn=(e="",t)=>{let o=t?.output??process.stdout,i=t?.withGuide??Ce.withGuide?`${(0,C.styleText)("gray",Me)} `:"";o.write(`${i}${(0,C.styleText)("red",e)}
|
|
192
|
+
|
|
193
|
+
`)},wn=(e="",t)=>{let o=t?.output??process.stdout,i=t?.withGuide??Ce.withGuide?`${(0,C.styleText)("gray",vd)} `:"";o.write(`${i}${e}
|
|
194
|
+
`)},Ro=(e="",t)=>{let o=t?.output??process.stdout,i=t?.withGuide??Ce.withGuide?`${(0,C.styleText)("gray",T)}
|
|
195
|
+
${(0,C.styleText)("gray",Me)} `:"";o.write(`${i}${e}
|
|
196
|
+
|
|
197
|
+
`)};var zt=(e,t)=>e.split(`
|
|
198
|
+
`).map(o=>t(o)).join(`
|
|
199
|
+
`),vn=e=>{let t=(i,r)=>{let n=i.label??String(i.value);return r==="disabled"?`${(0,C.styleText)("gray",hn)} ${zt(n,s=>(0,C.styleText)(["strikethrough","gray"],s))}${i.hint?` ${(0,C.styleText)("dim",`(${i.hint??"disabled"})`)}`:""}`:r==="active"?`${(0,C.styleText)("cyan",xd)} ${n}${i.hint?` ${(0,C.styleText)("dim",`(${i.hint})`)}`:""}`:r==="selected"?`${(0,C.styleText)("green",An)} ${zt(n,s=>(0,C.styleText)("dim",s))}${i.hint?` ${(0,C.styleText)("dim",`(${i.hint})`)}`:""}`:r==="cancelled"?`${zt(n,s=>(0,C.styleText)(["strikethrough","dim"],s))}`:r==="active-selected"?`${(0,C.styleText)("green",An)} ${n}${i.hint?` ${(0,C.styleText)("dim",`(${i.hint})`)}`:""}`:r==="submitted"?`${zt(n,s=>(0,C.styleText)("dim",s))}`:`${(0,C.styleText)("dim",hn)} ${zt(n,s=>(0,C.styleText)("dim",s))}`},o=e.required??!0;return new gn({options:e.options,signal:e.signal,input:e.input,output:e.output,initialValues:e.initialValues,required:o,cursorAt:e.cursorAt,validate(i){if(o&&(i===void 0||i.length===0))return`Please select at least one option.
|
|
200
|
+
${(0,C.styleText)("reset",(0,C.styleText)("dim",`Press ${(0,C.styleText)(["gray","bgWhite","inverse"]," space ")} to select, ${(0,C.styleText)("gray",(0,C.styleText)("bgWhite",(0,C.styleText)("inverse"," enter ")))} to submit`))}`},render(){let i=e.withGuide??Ce.withGuide,r=it(e.output,e.message,i?`${Un(this.state)} `:"",`${Yt(this.state)} `),n=`${i?`${(0,C.styleText)("gray",T)}
|
|
201
|
+
`:""}${r}
|
|
202
|
+
`,s=this.value??[],a=(l,d)=>{if(l.disabled)return t(l,"disabled");let c=s.includes(l.value);return d&&c?t(l,"active-selected"):c?t(l,"selected"):t(l,d?"active":"inactive")};switch(this.state){case"submit":{let l=this.options.filter(({value:c})=>s.includes(c)).map(c=>t(c,"submitted")).join((0,C.styleText)("dim",", "))||(0,C.styleText)("dim","none"),d=it(e.output,l,i?`${(0,C.styleText)("gray",T)} `:"");return`${n}${d}`}case"cancel":{let l=this.options.filter(({value:c})=>s.includes(c)).map(c=>t(c,"cancelled")).join((0,C.styleText)("dim",", "));if(l.trim()==="")return`${n}${(0,C.styleText)("gray",T)}`;let d=it(e.output,l,i?`${(0,C.styleText)("gray",T)} `:"");return`${n}${d}${i?`
|
|
203
|
+
${(0,C.styleText)("gray",T)}`:""}`}case"error":{let l=i?`${(0,C.styleText)("yellow",T)} `:"",d=this.error.split(`
|
|
204
|
+
`).map((m,b)=>b===0?`${i?`${(0,C.styleText)("yellow",Me)} `:""}${(0,C.styleText)("yellow",m)}`:` ${m}`).join(`
|
|
205
|
+
`),c=n.split(`
|
|
122
206
|
`).length,u=d.split(`
|
|
123
|
-
`).length+1;return`${
|
|
207
|
+
`).length+1;return`${n}${l}${Qi({output:e.output,options:this.options,cursor:this.cursor,maxItems:e.maxItems,columnPadding:l.length,rowPadding:c+u,style:a}).join(`
|
|
124
208
|
${l}`)}
|
|
125
209
|
${d}
|
|
126
|
-
`}default:{let l=
|
|
127
|
-
`).length,c=
|
|
210
|
+
`}default:{let l=i?`${(0,C.styleText)("cyan",T)} `:"",d=n.split(`
|
|
211
|
+
`).length,c=i?2:1;return`${n}${l}${Qi({output:e.output,options:this.options,cursor:this.cursor,maxItems:e.maxItems,columnPadding:l.length,rowPadding:d+c,style:a}).join(`
|
|
128
212
|
${l}`)}
|
|
129
|
-
${
|
|
130
|
-
`}}}}).prompt()};var
|
|
131
|
-
`:""}${
|
|
132
|
-
`,
|
|
133
|
-
${
|
|
134
|
-
${s}${(0,
|
|
135
|
-
`}case"submit":{let
|
|
136
|
-
${(0,
|
|
213
|
+
${i?(0,C.styleText)("cyan",Me):""}
|
|
214
|
+
`}}}}).prompt()};var xn=e=>new wo({validate:e.validate,mask:e.mask??Fd,signal:e.signal,input:e.input,output:e.output,render(){let t=e.withGuide??Ce.withGuide,o=`${t?`${(0,C.styleText)("gray",T)}
|
|
215
|
+
`:""}${Yt(this.state)} ${e.message}
|
|
216
|
+
`,i=this.userInputWithCursor,r=this.masked;switch(this.state){case"error":{let n=t?`${(0,C.styleText)("yellow",T)} `:"",s=t?`${(0,C.styleText)("yellow",Me)} `:"",a=r??"";return e.clearOnError&&this.clear(),`${o.trim()}
|
|
217
|
+
${n}${a}
|
|
218
|
+
${s}${(0,C.styleText)("yellow",this.error)}
|
|
219
|
+
`}case"submit":{let n=t?`${(0,C.styleText)("gray",T)} `:"",s=r?(0,C.styleText)("dim",r):"";return`${o}${n}${s}`}case"cancel":{let n=t?`${(0,C.styleText)("gray",T)} `:"",s=r?(0,C.styleText)(["strikethrough","dim"],r):"";return`${o}${n}${s}${r&&t?`
|
|
220
|
+
${(0,C.styleText)("gray",T)}`:""}`}default:{let n=t?`${(0,C.styleText)("cyan",T)} `:"",s=t?(0,C.styleText)("cyan",Me):"";return`${o}${n}${i}
|
|
137
221
|
${s}
|
|
138
|
-
`}}}}).prompt();var
|
|
222
|
+
`}}}}).prompt();var og={light:J("\u2500","-"),heavy:J("\u2501","="),block:J("\u2588","#")};var Fo=(e,t)=>e.includes(`
|
|
139
223
|
`)?e.split(`
|
|
140
|
-
`).map(
|
|
141
|
-
`):t(e),se=e=>{let t=(
|
|
142
|
-
`:""}${
|
|
143
|
-
`;switch(this.state){case"submit":{let a=
|
|
144
|
-
${(0,
|
|
145
|
-
`).length,c=
|
|
224
|
+
`).map(o=>t(o)).join(`
|
|
225
|
+
`):t(e),se=e=>{let t=(o,i)=>{let r=o.label??String(o.value);switch(i){case"disabled":return`${(0,C.styleText)("gray",ko)} ${Fo(r,n=>(0,C.styleText)("gray",n))}${o.hint?` ${(0,C.styleText)("dim",`(${o.hint??"disabled"})`)}`:""}`;case"selected":return`${Fo(r,n=>(0,C.styleText)("dim",n))}`;case"active":return`${(0,C.styleText)("green",Hi)} ${r}${o.hint?` ${(0,C.styleText)("dim",`(${o.hint})`)}`:""}`;case"cancelled":return`${Fo(r,n=>(0,C.styleText)(["strikethrough","dim"],n))}`;default:return`${(0,C.styleText)("dim",ko)} ${Fo(r,n=>(0,C.styleText)("dim",n))}`}};return new vo({options:e.options,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue,render(){let o=e.withGuide??Ce.withGuide,i=`${Yt(this.state)} `,r=`${Un(this.state)} `,n=it(e.output,e.message,r,i),s=`${o?`${(0,C.styleText)("gray",T)}
|
|
226
|
+
`:""}${n}
|
|
227
|
+
`;switch(this.state){case"submit":{let a=o?`${(0,C.styleText)("gray",T)} `:"",l=it(e.output,t(this.options[this.cursor],"selected"),a);return`${s}${l}`}case"cancel":{let a=o?`${(0,C.styleText)("gray",T)} `:"",l=it(e.output,t(this.options[this.cursor],"cancelled"),a);return`${s}${l}${o?`
|
|
228
|
+
${(0,C.styleText)("gray",T)}`:""}`}default:{let a=o?`${(0,C.styleText)("cyan",T)} `:"",l=o?(0,C.styleText)("cyan",Me):"",d=s.split(`
|
|
229
|
+
`).length,c=o?2:1;return`${s}${a}${Qi({output:e.output,cursor:this.cursor,options:this.options,maxItems:e.maxItems,columnPadding:a.length,rowPadding:d+c,style:(u,m)=>t(u,u.disabled?"disabled":m?"active":"inactive")}).join(`
|
|
146
230
|
${a}`)}
|
|
147
231
|
${l}
|
|
148
|
-
`}}}}).prompt()};var
|
|
149
|
-
`:""}${
|
|
150
|
-
`,
|
|
151
|
-
${a}${
|
|
232
|
+
`}}}}).prompt()};var ig=`${(0,C.styleText)("gray",T)} `;var X=e=>new xo({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,output:e.output,signal:e.signal,input:e.input,render(){let t=e?.withGuide??Ce.withGuide,o=`${`${t?`${(0,C.styleText)("gray",T)}
|
|
233
|
+
`:""}${Yt(this.state)} `}${e.message}
|
|
234
|
+
`,i=e.placeholder?(0,C.styleText)("inverse",e.placeholder[0])+(0,C.styleText)("dim",e.placeholder.slice(1)):(0,C.styleText)(["inverse","hidden"],"_"),r=this.userInput?this.userInputWithCursor:i,n=this.value??"";switch(this.state){case"error":{let s=this.error?` ${(0,C.styleText)("yellow",this.error)}`:"",a=t?`${(0,C.styleText)("yellow",T)} `:"",l=t?(0,C.styleText)("yellow",Me):"";return`${o.trim()}
|
|
235
|
+
${a}${r}
|
|
152
236
|
${l}${s}
|
|
153
|
-
`}case"submit":{let s=
|
|
154
|
-
${a}`:""}`}default:{let s=t?`${(0,
|
|
237
|
+
`}case"submit":{let s=n?` ${(0,C.styleText)("dim",n)}`:"",a=t?(0,C.styleText)("gray",T):"";return`${o}${a}${s}`}case"cancel":{let s=n?` ${(0,C.styleText)(["strikethrough","dim"],n)}`:"",a=t?(0,C.styleText)("gray",T):"";return`${o}${a}${s}${n.trim()?`
|
|
238
|
+
${a}`:""}`}default:{let s=t?`${(0,C.styleText)("cyan",T)} `:"",a=t?(0,C.styleText)("cyan",Me):"";return`${o}${s}${r}
|
|
155
239
|
${a}
|
|
156
|
-
`}}}}).prompt();var
|
|
157
|
-
`)}finalize(){return st(new Blob(this.chunks,{type:"application/octet-stream"}))}};var
|
|
158
|
-
`;if(
|
|
159
|
-
-- `)?
|
|
160
|
-
`+
|
|
161
|
-
`+
|
|
162
|
-
`,"𝔑":"\u{1D511}","⁠":"\u2060"," ":"\xA0","ℕ":"\u2115","⫬":"\u2AEC","≢":"\u2262","≭":"\u226D","∦":"\u2226","∉":"\u2209","≠":"\u2260","≂̸":"\u2242\u0338","∄":"\u2204","≯":"\u226F","≱":"\u2271","≧̸":"\u2267\u0338","≫̸":"\u226B\u0338","≹":"\u2279","⩾̸":"\u2A7E\u0338","≵":"\u2275","≎̸":"\u224E\u0338","≏̸":"\u224F\u0338","⋪":"\u22EA","⧏̸":"\u29CF\u0338","⋬":"\u22EC","≮":"\u226E","≰":"\u2270","≸":"\u2278","≪̸":"\u226A\u0338","⩽̸":"\u2A7D\u0338","≴":"\u2274","⪢̸":"\u2AA2\u0338","⪡̸":"\u2AA1\u0338","⊀":"\u2280","⪯̸":"\u2AAF\u0338","⋠":"\u22E0","∌":"\u220C","⋫":"\u22EB","⧐̸":"\u29D0\u0338","⋭":"\u22ED","⊏̸":"\u228F\u0338","⋢":"\u22E2","⊐̸":"\u2290\u0338","⋣":"\u22E3","⊂⃒":"\u2282\u20D2","⊈":"\u2288","⊁":"\u2281","⪰̸":"\u2AB0\u0338","⋡":"\u22E1","≿̸":"\u227F\u0338","⊃⃒":"\u2283\u20D2","⊉":"\u2289","≁":"\u2241","≄":"\u2244","≇":"\u2247","≉":"\u2249","∤":"\u2224","𝒩":"\u{1D4A9}","Ñ":"\xD1","Ñ":"\xD1","Ν":"\u039D","Œ":"\u0152","Ó":"\xD3","Ó":"\xD3","Ô":"\xD4","Ô":"\xD4","О":"\u041E","Ő":"\u0150","𝔒":"\u{1D512}","Ò":"\xD2","Ò":"\xD2","Ō":"\u014C","Ω":"\u03A9","Ο":"\u039F","𝕆":"\u{1D546}","“":"\u201C","‘":"\u2018","⩔":"\u2A54","𝒪":"\u{1D4AA}","Ø":"\xD8","Ø":"\xD8","Õ":"\xD5","Õ":"\xD5","⨷":"\u2A37","Ö":"\xD6","Ö":"\xD6","‾":"\u203E","⏞":"\u23DE","⎴":"\u23B4","⏜":"\u23DC","∂":"\u2202","П":"\u041F","𝔓":"\u{1D513}","Φ":"\u03A6","Π":"\u03A0","±":"\xB1","ℌ":"\u210C","ℙ":"\u2119","⪻":"\u2ABB","≺":"\u227A","⪯":"\u2AAF","≼":"\u227C","≾":"\u227E","″":"\u2033","∏":"\u220F","∷":"\u2237","∝":"\u221D","𝒫":"\u{1D4AB}","Ψ":"\u03A8",""":'"',""":'"',"𝔔":"\u{1D514}","ℚ":"\u211A","𝒬":"\u{1D4AC}","⤐":"\u2910","®":"\xAE","®":"\xAE","Ŕ":"\u0154","⟫":"\u27EB","↠":"\u21A0","⤖":"\u2916","Ř":"\u0158","Ŗ":"\u0156","Р":"\u0420","ℜ":"\u211C","∋":"\u220B","⇋":"\u21CB","⥯":"\u296F","ℜ":"\u211C","Ρ":"\u03A1","⟩":"\u27E9","→":"\u2192","⇥":"\u21E5","⇄":"\u21C4","⌉":"\u2309","⟧":"\u27E7","⥝":"\u295D","⇂":"\u21C2","⥕":"\u2955","⌋":"\u230B","⊢":"\u22A2","↦":"\u21A6","⥛":"\u295B","⊳":"\u22B3","⧐":"\u29D0","⊵":"\u22B5","⥏":"\u294F","⥜":"\u295C","↾":"\u21BE","⥔":"\u2954","⇀":"\u21C0","⥓":"\u2953","⇒":"\u21D2","ℝ":"\u211D","⥰":"\u2970","⇛":"\u21DB","ℛ":"\u211B","↱":"\u21B1","⧴":"\u29F4","Щ":"\u0429","Ш":"\u0428","Ь":"\u042C","Ś":"\u015A","⪼":"\u2ABC","Š":"\u0160","Ş":"\u015E","Ŝ":"\u015C","С":"\u0421","𝔖":"\u{1D516}","↓":"\u2193","←":"\u2190","→":"\u2192","↑":"\u2191","Σ":"\u03A3","∘":"\u2218","𝕊":"\u{1D54A}","√":"\u221A","□":"\u25A1","⊓":"\u2293","⊏":"\u228F","⊑":"\u2291","⊐":"\u2290","⊒":"\u2292","⊔":"\u2294","𝒮":"\u{1D4AE}","⋆":"\u22C6","⋐":"\u22D0","⋐":"\u22D0","⊆":"\u2286","≻":"\u227B","⪰":"\u2AB0","≽":"\u227D","≿":"\u227F","∋":"\u220B","∑":"\u2211","⋑":"\u22D1","⊃":"\u2283","⊇":"\u2287","⋑":"\u22D1","Þ":"\xDE","Þ":"\xDE","™":"\u2122","Ћ":"\u040B","Ц":"\u0426","	":" ","Τ":"\u03A4","Ť":"\u0164","Ţ":"\u0162","Т":"\u0422","𝔗":"\u{1D517}","∴":"\u2234","Θ":"\u0398","  ":"\u205F\u200A"," ":"\u2009","∼":"\u223C","≃":"\u2243","≅":"\u2245","≈":"\u2248","𝕋":"\u{1D54B}","⃛":"\u20DB","𝒯":"\u{1D4AF}","Ŧ":"\u0166","Ú":"\xDA","Ú":"\xDA","↟":"\u219F","⥉":"\u2949","Ў":"\u040E","Ŭ":"\u016C","Û":"\xDB","Û":"\xDB","У":"\u0423","Ű":"\u0170","𝔘":"\u{1D518}","Ù":"\xD9","Ù":"\xD9","Ū":"\u016A","_":"_","⏟":"\u23DF","⎵":"\u23B5","⏝":"\u23DD","⋃":"\u22C3","⊎":"\u228E","Ų":"\u0172","𝕌":"\u{1D54C}","↑":"\u2191","⤒":"\u2912","⇅":"\u21C5","↕":"\u2195","⥮":"\u296E","⊥":"\u22A5","↥":"\u21A5","⇑":"\u21D1","⇕":"\u21D5","↖":"\u2196","↗":"\u2197","ϒ":"\u03D2","Υ":"\u03A5","Ů":"\u016E","𝒰":"\u{1D4B0}","Ũ":"\u0168","Ü":"\xDC","Ü":"\xDC","⊫":"\u22AB","⫫":"\u2AEB","В":"\u0412","⊩":"\u22A9","⫦":"\u2AE6","⋁":"\u22C1","‖":"\u2016","‖":"\u2016","∣":"\u2223","|":"|","❘":"\u2758","≀":"\u2240"," ":"\u200A","𝔙":"\u{1D519}","𝕍":"\u{1D54D}","𝒱":"\u{1D4B1}","⊪":"\u22AA","Ŵ":"\u0174","⋀":"\u22C0","𝔚":"\u{1D51A}","𝕎":"\u{1D54E}","𝒲":"\u{1D4B2}","𝔛":"\u{1D51B}","Ξ":"\u039E","𝕏":"\u{1D54F}","𝒳":"\u{1D4B3}","Я":"\u042F","Ї":"\u0407","Ю":"\u042E","Ý":"\xDD","Ý":"\xDD","Ŷ":"\u0176","Ы":"\u042B","𝔜":"\u{1D51C}","𝕐":"\u{1D550}","𝒴":"\u{1D4B4}","Ÿ":"\u0178","Ж":"\u0416","Ź":"\u0179","Ž":"\u017D","З":"\u0417","Ż":"\u017B","​":"\u200B","Ζ":"\u0396","ℨ":"\u2128","ℤ":"\u2124","𝒵":"\u{1D4B5}","á":"\xE1","á":"\xE1","ă":"\u0103","∾":"\u223E","∾̳":"\u223E\u0333","∿":"\u223F","â":"\xE2","â":"\xE2","´":"\xB4","´":"\xB4","а":"\u0430","æ":"\xE6","æ":"\xE6","⁡":"\u2061","𝔞":"\u{1D51E}","à":"\xE0","à":"\xE0","ℵ":"\u2135","ℵ":"\u2135","α":"\u03B1","ā":"\u0101","⨿":"\u2A3F","&":"&","&":"&","∧":"\u2227","⩕":"\u2A55","⩜":"\u2A5C","⩘":"\u2A58","⩚":"\u2A5A","∠":"\u2220","⦤":"\u29A4","∠":"\u2220","∡":"\u2221","⦨":"\u29A8","⦩":"\u29A9","⦪":"\u29AA","⦫":"\u29AB","⦬":"\u29AC","⦭":"\u29AD","⦮":"\u29AE","⦯":"\u29AF","∟":"\u221F","⊾":"\u22BE","⦝":"\u299D","∢":"\u2222","Å":"\xC5","⍼":"\u237C","ą":"\u0105","𝕒":"\u{1D552}","≈":"\u2248","⩰":"\u2A70","⩯":"\u2A6F","≊":"\u224A","≋":"\u224B","'":"'","≈":"\u2248","≊":"\u224A","å":"\xE5","å":"\xE5","𝒶":"\u{1D4B6}","*":"*","≈":"\u2248","≍":"\u224D","ã":"\xE3","ã":"\xE3","ä":"\xE4","ä":"\xE4","∳":"\u2233","⨑":"\u2A11","⫭":"\u2AED","≌":"\u224C","϶":"\u03F6","‵":"\u2035","∽":"\u223D","⋍":"\u22CD","⊽":"\u22BD","⌅":"\u2305","⌅":"\u2305","⎵":"\u23B5","⎶":"\u23B6","≌":"\u224C","б":"\u0431","„":"\u201E","∵":"\u2235","∵":"\u2235","⦰":"\u29B0","϶":"\u03F6","ℬ":"\u212C","β":"\u03B2","ℶ":"\u2136","≬":"\u226C","𝔟":"\u{1D51F}","⋂":"\u22C2","◯":"\u25EF","⋃":"\u22C3","⨀":"\u2A00","⨁":"\u2A01","⨂":"\u2A02","⨆":"\u2A06","★":"\u2605","▽":"\u25BD","△":"\u25B3","⨄":"\u2A04","⋁":"\u22C1","⋀":"\u22C0","⤍":"\u290D","⧫":"\u29EB","▪":"\u25AA","▴":"\u25B4","▾":"\u25BE","◂":"\u25C2","▸":"\u25B8","␣":"\u2423","▒":"\u2592","░":"\u2591","▓":"\u2593","█":"\u2588","=⃥":"=\u20E5","≡⃥":"\u2261\u20E5","⌐":"\u2310","𝕓":"\u{1D553}","⊥":"\u22A5","⊥":"\u22A5","⋈":"\u22C8","╗":"\u2557","╔":"\u2554","╖":"\u2556","╓":"\u2553","═":"\u2550","╦":"\u2566","╩":"\u2569","╤":"\u2564","╧":"\u2567","╝":"\u255D","╚":"\u255A","╜":"\u255C","╙":"\u2559","║":"\u2551","╬":"\u256C","╣":"\u2563","╠":"\u2560","╫":"\u256B","╢":"\u2562","╟":"\u255F","⧉":"\u29C9","╕":"\u2555","╒":"\u2552","┐":"\u2510","┌":"\u250C","─":"\u2500","╥":"\u2565","╨":"\u2568","┬":"\u252C","┴":"\u2534","⊟":"\u229F","⊞":"\u229E","⊠":"\u22A0","╛":"\u255B","╘":"\u2558","┘":"\u2518","└":"\u2514","│":"\u2502","╪":"\u256A","╡":"\u2561","╞":"\u255E","┼":"\u253C","┤":"\u2524","├":"\u251C","‵":"\u2035","˘":"\u02D8","¦":"\xA6","¦":"\xA6","𝒷":"\u{1D4B7}","⁏":"\u204F","∽":"\u223D","⋍":"\u22CD","\":"\\","⧅":"\u29C5","⟈":"\u27C8","•":"\u2022","•":"\u2022","≎":"\u224E","⪮":"\u2AAE","≏":"\u224F","≏":"\u224F","ć":"\u0107","∩":"\u2229","⩄":"\u2A44","⩉":"\u2A49","⩋":"\u2A4B","⩇":"\u2A47","⩀":"\u2A40","∩︀":"\u2229\uFE00","⁁":"\u2041","ˇ":"\u02C7","⩍":"\u2A4D","č":"\u010D","ç":"\xE7","ç":"\xE7","ĉ":"\u0109","⩌":"\u2A4C","⩐":"\u2A50","ċ":"\u010B","¸":"\xB8","¸":"\xB8","⦲":"\u29B2","¢":"\xA2","¢":"\xA2","·":"\xB7","𝔠":"\u{1D520}","ч":"\u0447","✓":"\u2713","✓":"\u2713","χ":"\u03C7","○":"\u25CB","⧃":"\u29C3","ˆ":"\u02C6","≗":"\u2257","↺":"\u21BA","↻":"\u21BB","®":"\xAE","Ⓢ":"\u24C8","⊛":"\u229B","⊚":"\u229A","⊝":"\u229D","≗":"\u2257","⨐":"\u2A10","⫯":"\u2AEF","⧂":"\u29C2","♣":"\u2663","♣":"\u2663",":":":","≔":"\u2254","≔":"\u2254",",":",","@":"@","∁":"\u2201","∘":"\u2218","∁":"\u2201","ℂ":"\u2102","≅":"\u2245","⩭":"\u2A6D","∮":"\u222E","𝕔":"\u{1D554}","∐":"\u2210","©":"\xA9","©":"\xA9","℗":"\u2117","↵":"\u21B5","✗":"\u2717","𝒸":"\u{1D4B8}","⫏":"\u2ACF","⫑":"\u2AD1","⫐":"\u2AD0","⫒":"\u2AD2","⋯":"\u22EF","⤸":"\u2938","⤵":"\u2935","⋞":"\u22DE","⋟":"\u22DF","↶":"\u21B6","⤽":"\u293D","∪":"\u222A","⩈":"\u2A48","⩆":"\u2A46","⩊":"\u2A4A","⊍":"\u228D","⩅":"\u2A45","∪︀":"\u222A\uFE00","↷":"\u21B7","⤼":"\u293C","⋞":"\u22DE","⋟":"\u22DF","⋎":"\u22CE","⋏":"\u22CF","¤":"\xA4","¤":"\xA4","↶":"\u21B6","↷":"\u21B7","⋎":"\u22CE","⋏":"\u22CF","∲":"\u2232","∱":"\u2231","⌭":"\u232D","⇓":"\u21D3","⥥":"\u2965","†":"\u2020","ℸ":"\u2138","↓":"\u2193","‐":"\u2010","⊣":"\u22A3","⤏":"\u290F","˝":"\u02DD","ď":"\u010F","д":"\u0434","ⅆ":"\u2146","‡":"\u2021","⇊":"\u21CA","⩷":"\u2A77","°":"\xB0","°":"\xB0","δ":"\u03B4","⦱":"\u29B1","⥿":"\u297F","𝔡":"\u{1D521}","⇃":"\u21C3","⇂":"\u21C2","⋄":"\u22C4","⋄":"\u22C4","♦":"\u2666","♦":"\u2666","¨":"\xA8","ϝ":"\u03DD","⋲":"\u22F2","÷":"\xF7","÷":"\xF7","÷":"\xF7","⋇":"\u22C7","⋇":"\u22C7","ђ":"\u0452","⌞":"\u231E","⌍":"\u230D","$":"$","𝕕":"\u{1D555}","˙":"\u02D9","≐":"\u2250","≑":"\u2251","∸":"\u2238","∔":"\u2214","⊡":"\u22A1","⌆":"\u2306","↓":"\u2193","⇊":"\u21CA","⇃":"\u21C3","⇂":"\u21C2","⤐":"\u2910","⌟":"\u231F","⌌":"\u230C","𝒹":"\u{1D4B9}","ѕ":"\u0455","⧶":"\u29F6","đ":"\u0111","⋱":"\u22F1","▿":"\u25BF","▾":"\u25BE","⇵":"\u21F5","⥯":"\u296F","⦦":"\u29A6","џ":"\u045F","⟿":"\u27FF","⩷":"\u2A77","≑":"\u2251","é":"\xE9","é":"\xE9","⩮":"\u2A6E","ě":"\u011B","≖":"\u2256","ê":"\xEA","ê":"\xEA","≕":"\u2255","э":"\u044D","ė":"\u0117","ⅇ":"\u2147","≒":"\u2252","𝔢":"\u{1D522}","⪚":"\u2A9A","è":"\xE8","è":"\xE8","⪖":"\u2A96","⪘":"\u2A98","⪙":"\u2A99","⏧":"\u23E7","ℓ":"\u2113","⪕":"\u2A95","⪗":"\u2A97","ē":"\u0113","∅":"\u2205","∅":"\u2205","∅":"\u2205"," ":"\u2004"," ":"\u2005"," ":"\u2003","ŋ":"\u014B"," ":"\u2002","ę":"\u0119","𝕖":"\u{1D556}","⋕":"\u22D5","⧣":"\u29E3","⩱":"\u2A71","ε":"\u03B5","ε":"\u03B5","ϵ":"\u03F5","≖":"\u2256","≕":"\u2255","≂":"\u2242","⪖":"\u2A96","⪕":"\u2A95","=":"=","≟":"\u225F","≡":"\u2261","⩸":"\u2A78","⧥":"\u29E5","≓":"\u2253","⥱":"\u2971","ℯ":"\u212F","≐":"\u2250","≂":"\u2242","η":"\u03B7","ð":"\xF0","ð":"\xF0","ë":"\xEB","ë":"\xEB","€":"\u20AC","!":"!","∃":"\u2203","ℰ":"\u2130","ⅇ":"\u2147","≒":"\u2252","ф":"\u0444","♀":"\u2640","ffi":"\uFB03","ff":"\uFB00","ffl":"\uFB04","𝔣":"\u{1D523}","fi":"\uFB01","fj":"fj","♭":"\u266D","fl":"\uFB02","▱":"\u25B1","ƒ":"\u0192","𝕗":"\u{1D557}","∀":"\u2200","⋔":"\u22D4","⫙":"\u2AD9","⨍":"\u2A0D","½":"\xBD","½":"\xBD","⅓":"\u2153","¼":"\xBC","¼":"\xBC","⅕":"\u2155","⅙":"\u2159","⅛":"\u215B","⅔":"\u2154","⅖":"\u2156","¾":"\xBE","¾":"\xBE","⅗":"\u2157","⅜":"\u215C","⅘":"\u2158","⅚":"\u215A","⅝":"\u215D","⅞":"\u215E","⁄":"\u2044","⌢":"\u2322","𝒻":"\u{1D4BB}","≧":"\u2267","⪌":"\u2A8C","ǵ":"\u01F5","γ":"\u03B3","ϝ":"\u03DD","⪆":"\u2A86","ğ":"\u011F","ĝ":"\u011D","г":"\u0433","ġ":"\u0121","≥":"\u2265","⋛":"\u22DB","≥":"\u2265","≧":"\u2267","⩾":"\u2A7E","⩾":"\u2A7E","⪩":"\u2AA9","⪀":"\u2A80","⪂":"\u2A82","⪄":"\u2A84","⋛︀":"\u22DB\uFE00","⪔":"\u2A94","𝔤":"\u{1D524}","≫":"\u226B","⋙":"\u22D9","ℷ":"\u2137","ѓ":"\u0453","≷":"\u2277","⪒":"\u2A92","⪥":"\u2AA5","⪤":"\u2AA4","≩":"\u2269","⪊":"\u2A8A","⪊":"\u2A8A","⪈":"\u2A88","⪈":"\u2A88","≩":"\u2269","⋧":"\u22E7","𝕘":"\u{1D558}","`":"`","ℊ":"\u210A","≳":"\u2273","⪎":"\u2A8E","⪐":"\u2A90",">":">",">":">","⪧":"\u2AA7","⩺":"\u2A7A","⋗":"\u22D7","⦕":"\u2995","⩼":"\u2A7C","⪆":"\u2A86","⥸":"\u2978","⋗":"\u22D7","⋛":"\u22DB","⪌":"\u2A8C","≷":"\u2277","≳":"\u2273","≩︀":"\u2269\uFE00","≩︀":"\u2269\uFE00","⇔":"\u21D4"," ":"\u200A","½":"\xBD","ℋ":"\u210B","ъ":"\u044A","↔":"\u2194","⥈":"\u2948","↭":"\u21AD","ℏ":"\u210F","ĥ":"\u0125","♥":"\u2665","♥":"\u2665","…":"\u2026","⊹":"\u22B9","𝔥":"\u{1D525}","⤥":"\u2925","⤦":"\u2926","⇿":"\u21FF","∻":"\u223B","↩":"\u21A9","↪":"\u21AA","𝕙":"\u{1D559}","―":"\u2015","𝒽":"\u{1D4BD}","ℏ":"\u210F","ħ":"\u0127","⁃":"\u2043","‐":"\u2010","í":"\xED","í":"\xED","⁣":"\u2063","î":"\xEE","î":"\xEE","и":"\u0438","е":"\u0435","¡":"\xA1","¡":"\xA1","⇔":"\u21D4","𝔦":"\u{1D526}","ì":"\xEC","ì":"\xEC","ⅈ":"\u2148","⨌":"\u2A0C","∭":"\u222D","⧜":"\u29DC","℩":"\u2129","ij":"\u0133","ī":"\u012B","ℑ":"\u2111","ℐ":"\u2110","ℑ":"\u2111","ı":"\u0131","⊷":"\u22B7","Ƶ":"\u01B5","∈":"\u2208","℅":"\u2105","∞":"\u221E","⧝":"\u29DD","ı":"\u0131","∫":"\u222B","⊺":"\u22BA","ℤ":"\u2124","⊺":"\u22BA","⨗":"\u2A17","⨼":"\u2A3C","ё":"\u0451","į":"\u012F","𝕚":"\u{1D55A}","ι":"\u03B9","⨼":"\u2A3C","¿":"\xBF","¿":"\xBF","𝒾":"\u{1D4BE}","∈":"\u2208","⋹":"\u22F9","⋵":"\u22F5","⋴":"\u22F4","⋳":"\u22F3","∈":"\u2208","⁢":"\u2062","ĩ":"\u0129","і":"\u0456","ï":"\xEF","ï":"\xEF","ĵ":"\u0135","й":"\u0439","𝔧":"\u{1D527}","ȷ":"\u0237","𝕛":"\u{1D55B}","𝒿":"\u{1D4BF}","ј":"\u0458","є":"\u0454","κ":"\u03BA","ϰ":"\u03F0","ķ":"\u0137","к":"\u043A","𝔨":"\u{1D528}","ĸ":"\u0138","х":"\u0445","ќ":"\u045C","𝕜":"\u{1D55C}","𝓀":"\u{1D4C0}","⇚":"\u21DA","⇐":"\u21D0","⤛":"\u291B","⤎":"\u290E","≦":"\u2266","⪋":"\u2A8B","⥢":"\u2962","ĺ":"\u013A","⦴":"\u29B4","ℒ":"\u2112","λ":"\u03BB","⟨":"\u27E8","⦑":"\u2991","⟨":"\u27E8","⪅":"\u2A85","«":"\xAB","«":"\xAB","←":"\u2190","⇤":"\u21E4","⤟":"\u291F","⤝":"\u291D","↩":"\u21A9","↫":"\u21AB","⤹":"\u2939","⥳":"\u2973","↢":"\u21A2","⪫":"\u2AAB","⤙":"\u2919","⪭":"\u2AAD","⪭︀":"\u2AAD\uFE00","⤌":"\u290C","❲":"\u2772","{":"{","[":"[","⦋":"\u298B","⦏":"\u298F","⦍":"\u298D","ľ":"\u013E","ļ":"\u013C","⌈":"\u2308","{":"{","л":"\u043B","⤶":"\u2936","“":"\u201C","„":"\u201E","⥧":"\u2967","⥋":"\u294B","↲":"\u21B2","≤":"\u2264","←":"\u2190","↢":"\u21A2","↽":"\u21BD","↼":"\u21BC","⇇":"\u21C7","↔":"\u2194","⇆":"\u21C6","⇋":"\u21CB","↭":"\u21AD","⋋":"\u22CB","⋚":"\u22DA","≤":"\u2264","≦":"\u2266","⩽":"\u2A7D","⩽":"\u2A7D","⪨":"\u2AA8","⩿":"\u2A7F","⪁":"\u2A81","⪃":"\u2A83","⋚︀":"\u22DA\uFE00","⪓":"\u2A93","⪅":"\u2A85","⋖":"\u22D6","⋚":"\u22DA","⪋":"\u2A8B","≶":"\u2276","≲":"\u2272","⥼":"\u297C","⌊":"\u230A","𝔩":"\u{1D529}","≶":"\u2276","⪑":"\u2A91","↽":"\u21BD","↼":"\u21BC","⥪":"\u296A","▄":"\u2584","љ":"\u0459","≪":"\u226A","⇇":"\u21C7","⌞":"\u231E","⥫":"\u296B","◺":"\u25FA","ŀ":"\u0140","⎰":"\u23B0","⎰":"\u23B0","≨":"\u2268","⪉":"\u2A89","⪉":"\u2A89","⪇":"\u2A87","⪇":"\u2A87","≨":"\u2268","⋦":"\u22E6","⟬":"\u27EC","⇽":"\u21FD","⟦":"\u27E6","⟵":"\u27F5","⟷":"\u27F7","⟼":"\u27FC","⟶":"\u27F6","↫":"\u21AB","↬":"\u21AC","⦅":"\u2985","𝕝":"\u{1D55D}","⨭":"\u2A2D","⨴":"\u2A34","∗":"\u2217","_":"_","◊":"\u25CA","◊":"\u25CA","⧫":"\u29EB","(":"(","⦓":"\u2993","⇆":"\u21C6","⌟":"\u231F","⇋":"\u21CB","⥭":"\u296D","‎":"\u200E","⊿":"\u22BF","‹":"\u2039","𝓁":"\u{1D4C1}","↰":"\u21B0","≲":"\u2272","⪍":"\u2A8D","⪏":"\u2A8F","[":"[","‘":"\u2018","‚":"\u201A","ł":"\u0142","<":"<","<":"<","⪦":"\u2AA6","⩹":"\u2A79","⋖":"\u22D6","⋋":"\u22CB","⋉":"\u22C9","⥶":"\u2976","⩻":"\u2A7B","⦖":"\u2996","◃":"\u25C3","⊴":"\u22B4","◂":"\u25C2","⥊":"\u294A","⥦":"\u2966","≨︀":"\u2268\uFE00","≨︀":"\u2268\uFE00","∺":"\u223A","¯":"\xAF","¯":"\xAF","♂":"\u2642","✠":"\u2720","✠":"\u2720","↦":"\u21A6","↦":"\u21A6","↧":"\u21A7","↤":"\u21A4","↥":"\u21A5","▮":"\u25AE","⨩":"\u2A29","м":"\u043C","—":"\u2014","∡":"\u2221","𝔪":"\u{1D52A}","℧":"\u2127","µ":"\xB5","µ":"\xB5","∣":"\u2223","*":"*","⫰":"\u2AF0","·":"\xB7","·":"\xB7","−":"\u2212","⊟":"\u229F","∸":"\u2238","⨪":"\u2A2A","⫛":"\u2ADB","…":"\u2026","∓":"\u2213","⊧":"\u22A7","𝕞":"\u{1D55E}","∓":"\u2213","𝓂":"\u{1D4C2}","∾":"\u223E","μ":"\u03BC","⊸":"\u22B8","⊸":"\u22B8","⋙̸":"\u22D9\u0338","≫⃒":"\u226B\u20D2","≫̸":"\u226B\u0338","⇍":"\u21CD","⇎":"\u21CE","⋘̸":"\u22D8\u0338","≪⃒":"\u226A\u20D2","≪̸":"\u226A\u0338","⇏":"\u21CF","⊯":"\u22AF","⊮":"\u22AE","∇":"\u2207","ń":"\u0144","∠⃒":"\u2220\u20D2","≉":"\u2249","⩰̸":"\u2A70\u0338","≋̸":"\u224B\u0338","ʼn":"\u0149","≉":"\u2249","♮":"\u266E","♮":"\u266E","ℕ":"\u2115"," ":"\xA0"," ":"\xA0","≎̸":"\u224E\u0338","≏̸":"\u224F\u0338","⩃":"\u2A43","ň":"\u0148","ņ":"\u0146","≇":"\u2247","⩭̸":"\u2A6D\u0338","⩂":"\u2A42","н":"\u043D","–":"\u2013","≠":"\u2260","⇗":"\u21D7","⤤":"\u2924","↗":"\u2197","↗":"\u2197","≐̸":"\u2250\u0338","≢":"\u2262","⤨":"\u2928","≂̸":"\u2242\u0338","∄":"\u2204","∄":"\u2204","𝔫":"\u{1D52B}","≧̸":"\u2267\u0338","≱":"\u2271","≱":"\u2271","≧̸":"\u2267\u0338","⩾̸":"\u2A7E\u0338","⩾̸":"\u2A7E\u0338","≵":"\u2275","≯":"\u226F","≯":"\u226F","⇎":"\u21CE","↮":"\u21AE","⫲":"\u2AF2","∋":"\u220B","⋼":"\u22FC","⋺":"\u22FA","∋":"\u220B","њ":"\u045A","⇍":"\u21CD","≦̸":"\u2266\u0338","↚":"\u219A","‥":"\u2025","≰":"\u2270","↚":"\u219A","↮":"\u21AE","≰":"\u2270","≦̸":"\u2266\u0338","⩽̸":"\u2A7D\u0338","⩽̸":"\u2A7D\u0338","≮":"\u226E","≴":"\u2274","≮":"\u226E","⋪":"\u22EA","⋬":"\u22EC","∤":"\u2224","𝕟":"\u{1D55F}","¬":"\xAC","¬":"\xAC","∉":"\u2209","⋹̸":"\u22F9\u0338","⋵̸":"\u22F5\u0338","∉":"\u2209","⋷":"\u22F7","⋶":"\u22F6","∌":"\u220C","∌":"\u220C","⋾":"\u22FE","⋽":"\u22FD","∦":"\u2226","∦":"\u2226","⫽⃥":"\u2AFD\u20E5","∂̸":"\u2202\u0338","⨔":"\u2A14","⊀":"\u2280","⋠":"\u22E0","⪯̸":"\u2AAF\u0338","⊀":"\u2280","⪯̸":"\u2AAF\u0338","⇏":"\u21CF","↛":"\u219B","⤳̸":"\u2933\u0338","↝̸":"\u219D\u0338","↛":"\u219B","⋫":"\u22EB","⋭":"\u22ED","⊁":"\u2281","⋡":"\u22E1","⪰̸":"\u2AB0\u0338","𝓃":"\u{1D4C3}","∤":"\u2224","∦":"\u2226","≁":"\u2241","≄":"\u2244","≄":"\u2244","∤":"\u2224","∦":"\u2226","⋢":"\u22E2","⋣":"\u22E3","⊄":"\u2284","⫅̸":"\u2AC5\u0338","⊈":"\u2288","⊂⃒":"\u2282\u20D2","⊈":"\u2288","⫅̸":"\u2AC5\u0338","⊁":"\u2281","⪰̸":"\u2AB0\u0338","⊅":"\u2285","⫆̸":"\u2AC6\u0338","⊉":"\u2289","⊃⃒":"\u2283\u20D2","⊉":"\u2289","⫆̸":"\u2AC6\u0338","≹":"\u2279","ñ":"\xF1","ñ":"\xF1","≸":"\u2278","⋪":"\u22EA","⋬":"\u22EC","⋫":"\u22EB","⋭":"\u22ED","ν":"\u03BD","#":"#","№":"\u2116"," ":"\u2007","⊭":"\u22AD","⤄":"\u2904","≍⃒":"\u224D\u20D2","⊬":"\u22AC","≥⃒":"\u2265\u20D2",">⃒":">\u20D2","⧞":"\u29DE","⤂":"\u2902","≤⃒":"\u2264\u20D2","<⃒":"<\u20D2","⊴⃒":"\u22B4\u20D2","⤃":"\u2903","⊵⃒":"\u22B5\u20D2","∼⃒":"\u223C\u20D2","⇖":"\u21D6","⤣":"\u2923","↖":"\u2196","↖":"\u2196","⤧":"\u2927","Ⓢ":"\u24C8","ó":"\xF3","ó":"\xF3","⊛":"\u229B","⊚":"\u229A","ô":"\xF4","ô":"\xF4","о":"\u043E","⊝":"\u229D","ő":"\u0151","⨸":"\u2A38","⊙":"\u2299","⦼":"\u29BC","œ":"\u0153","⦿":"\u29BF","𝔬":"\u{1D52C}","˛":"\u02DB","ò":"\xF2","ò":"\xF2","⧁":"\u29C1","⦵":"\u29B5","Ω":"\u03A9","∮":"\u222E","↺":"\u21BA","⦾":"\u29BE","⦻":"\u29BB","‾":"\u203E","⧀":"\u29C0","ō":"\u014D","ω":"\u03C9","ο":"\u03BF","⦶":"\u29B6","⊖":"\u2296","𝕠":"\u{1D560}","⦷":"\u29B7","⦹":"\u29B9","⊕":"\u2295","∨":"\u2228","↻":"\u21BB","⩝":"\u2A5D","ℴ":"\u2134","ℴ":"\u2134","ª":"\xAA","ª":"\xAA","º":"\xBA","º":"\xBA","⊶":"\u22B6","⩖":"\u2A56","⩗":"\u2A57","⩛":"\u2A5B","ℴ":"\u2134","ø":"\xF8","ø":"\xF8","⊘":"\u2298","õ":"\xF5","õ":"\xF5","⊗":"\u2297","⨶":"\u2A36","ö":"\xF6","ö":"\xF6","⌽":"\u233D","∥":"\u2225","¶":"\xB6","¶":"\xB6","∥":"\u2225","⫳":"\u2AF3","⫽":"\u2AFD","∂":"\u2202","п":"\u043F","%":"%",".":".","‰":"\u2030","⊥":"\u22A5","‱":"\u2031","𝔭":"\u{1D52D}","φ":"\u03C6","ϕ":"\u03D5","ℳ":"\u2133","☎":"\u260E","π":"\u03C0","⋔":"\u22D4","ϖ":"\u03D6","ℏ":"\u210F","ℎ":"\u210E","ℏ":"\u210F","+":"+","⨣":"\u2A23","⊞":"\u229E","⨢":"\u2A22","∔":"\u2214","⨥":"\u2A25","⩲":"\u2A72","±":"\xB1","±":"\xB1","⨦":"\u2A26","⨧":"\u2A27","±":"\xB1","⨕":"\u2A15","𝕡":"\u{1D561}","£":"\xA3","£":"\xA3","≺":"\u227A","⪳":"\u2AB3","⪷":"\u2AB7","≼":"\u227C","⪯":"\u2AAF","≺":"\u227A","⪷":"\u2AB7","≼":"\u227C","⪯":"\u2AAF","⪹":"\u2AB9","⪵":"\u2AB5","⋨":"\u22E8","≾":"\u227E","′":"\u2032","ℙ":"\u2119","⪵":"\u2AB5","⪹":"\u2AB9","⋨":"\u22E8","∏":"\u220F","⌮":"\u232E","⌒":"\u2312","⌓":"\u2313","∝":"\u221D","∝":"\u221D","≾":"\u227E","⊰":"\u22B0","𝓅":"\u{1D4C5}","ψ":"\u03C8"," ":"\u2008","𝔮":"\u{1D52E}","⨌":"\u2A0C","𝕢":"\u{1D562}","⁗":"\u2057","𝓆":"\u{1D4C6}","ℍ":"\u210D","⨖":"\u2A16","?":"?","≟":"\u225F",""":'"',""":'"',"⇛":"\u21DB","⇒":"\u21D2","⤜":"\u291C","⤏":"\u290F","⥤":"\u2964","∽̱":"\u223D\u0331","ŕ":"\u0155","√":"\u221A","⦳":"\u29B3","⟩":"\u27E9","⦒":"\u2992","⦥":"\u29A5","⟩":"\u27E9","»":"\xBB","»":"\xBB","→":"\u2192","⥵":"\u2975","⇥":"\u21E5","⤠":"\u2920","⤳":"\u2933","⤞":"\u291E","↪":"\u21AA","↬":"\u21AC","⥅":"\u2945","⥴":"\u2974","↣":"\u21A3","↝":"\u219D","⤚":"\u291A","∶":"\u2236","ℚ":"\u211A","⤍":"\u290D","❳":"\u2773","}":"}","]":"]","⦌":"\u298C","⦎":"\u298E","⦐":"\u2990","ř":"\u0159","ŗ":"\u0157","⌉":"\u2309","}":"}","р":"\u0440","⤷":"\u2937","⥩":"\u2969","”":"\u201D","”":"\u201D","↳":"\u21B3","ℜ":"\u211C","ℛ":"\u211B","ℜ":"\u211C","ℝ":"\u211D","▭":"\u25AD","®":"\xAE","®":"\xAE","⥽":"\u297D","⌋":"\u230B","𝔯":"\u{1D52F}","⇁":"\u21C1","⇀":"\u21C0","⥬":"\u296C","ρ":"\u03C1","ϱ":"\u03F1","→":"\u2192","↣":"\u21A3","⇁":"\u21C1","⇀":"\u21C0","⇄":"\u21C4","⇌":"\u21CC","⇉":"\u21C9","↝":"\u219D","⋌":"\u22CC","˚":"\u02DA","≓":"\u2253","⇄":"\u21C4","⇌":"\u21CC","‏":"\u200F","⎱":"\u23B1","⎱":"\u23B1","⫮":"\u2AEE","⟭":"\u27ED","⇾":"\u21FE","⟧":"\u27E7","⦆":"\u2986","𝕣":"\u{1D563}","⨮":"\u2A2E","⨵":"\u2A35",")":")","⦔":"\u2994","⨒":"\u2A12","⇉":"\u21C9","›":"\u203A","𝓇":"\u{1D4C7}","↱":"\u21B1","]":"]","’":"\u2019","’":"\u2019","⋌":"\u22CC","⋊":"\u22CA","▹":"\u25B9","⊵":"\u22B5","▸":"\u25B8","⧎":"\u29CE","⥨":"\u2968","℞":"\u211E","ś":"\u015B","‚":"\u201A","≻":"\u227B","⪴":"\u2AB4","⪸":"\u2AB8","š":"\u0161","≽":"\u227D","⪰":"\u2AB0","ş":"\u015F","ŝ":"\u015D","⪶":"\u2AB6","⪺":"\u2ABA","⋩":"\u22E9","⨓":"\u2A13","≿":"\u227F","с":"\u0441","⋅":"\u22C5","⊡":"\u22A1","⩦":"\u2A66","⇘":"\u21D8","⤥":"\u2925","↘":"\u2198","↘":"\u2198","§":"\xA7","§":"\xA7",";":";","⤩":"\u2929","∖":"\u2216","∖":"\u2216","✶":"\u2736","𝔰":"\u{1D530}","⌢":"\u2322","♯":"\u266F","щ":"\u0449","ш":"\u0448","∣":"\u2223","∥":"\u2225","­":"\xAD","­":"\xAD","σ":"\u03C3","ς":"\u03C2","ς":"\u03C2","∼":"\u223C","⩪":"\u2A6A","≃":"\u2243","≃":"\u2243","⪞":"\u2A9E","⪠":"\u2AA0","⪝":"\u2A9D","⪟":"\u2A9F","≆":"\u2246","⨤":"\u2A24","⥲":"\u2972","←":"\u2190","∖":"\u2216","⨳":"\u2A33","⧤":"\u29E4","∣":"\u2223","⌣":"\u2323","⪪":"\u2AAA","⪬":"\u2AAC","⪬︀":"\u2AAC\uFE00","ь":"\u044C","/":"/","⧄":"\u29C4","⌿":"\u233F","𝕤":"\u{1D564}","♠":"\u2660","♠":"\u2660","∥":"\u2225","⊓":"\u2293","⊓︀":"\u2293\uFE00","⊔":"\u2294","⊔︀":"\u2294\uFE00","⊏":"\u228F","⊑":"\u2291","⊏":"\u228F","⊑":"\u2291","⊐":"\u2290","⊒":"\u2292","⊐":"\u2290","⊒":"\u2292","□":"\u25A1","□":"\u25A1","▪":"\u25AA","▪":"\u25AA","→":"\u2192","𝓈":"\u{1D4C8}","∖":"\u2216","⌣":"\u2323","⋆":"\u22C6","☆":"\u2606","★":"\u2605","ϵ":"\u03F5","ϕ":"\u03D5","¯":"\xAF","⊂":"\u2282","⫅":"\u2AC5","⪽":"\u2ABD","⊆":"\u2286","⫃":"\u2AC3","⫁":"\u2AC1","⫋":"\u2ACB","⊊":"\u228A","⪿":"\u2ABF","⥹":"\u2979","⊂":"\u2282","⊆":"\u2286","⫅":"\u2AC5","⊊":"\u228A","⫋":"\u2ACB","⫇":"\u2AC7","⫕":"\u2AD5","⫓":"\u2AD3","≻":"\u227B","⪸":"\u2AB8","≽":"\u227D","⪰":"\u2AB0","⪺":"\u2ABA","⪶":"\u2AB6","⋩":"\u22E9","≿":"\u227F","∑":"\u2211","♪":"\u266A","¹":"\xB9","¹":"\xB9","²":"\xB2","²":"\xB2","³":"\xB3","³":"\xB3","⊃":"\u2283","⫆":"\u2AC6","⪾":"\u2ABE","⫘":"\u2AD8","⊇":"\u2287","⫄":"\u2AC4","⟉":"\u27C9","⫗":"\u2AD7","⥻":"\u297B","⫂":"\u2AC2","⫌":"\u2ACC","⊋":"\u228B","⫀":"\u2AC0","⊃":"\u2283","⊇":"\u2287","⫆":"\u2AC6","⊋":"\u228B","⫌":"\u2ACC","⫈":"\u2AC8","⫔":"\u2AD4","⫖":"\u2AD6","⇙":"\u21D9","⤦":"\u2926","↙":"\u2199","↙":"\u2199","⤪":"\u292A","ß":"\xDF","ß":"\xDF","⌖":"\u2316","τ":"\u03C4","⎴":"\u23B4","ť":"\u0165","ţ":"\u0163","т":"\u0442","⃛":"\u20DB","⌕":"\u2315","𝔱":"\u{1D531}","∴":"\u2234","∴":"\u2234","θ":"\u03B8","ϑ":"\u03D1","ϑ":"\u03D1","≈":"\u2248","∼":"\u223C"," ":"\u2009","≈":"\u2248","∼":"\u223C","þ":"\xFE","þ":"\xFE","˜":"\u02DC","×":"\xD7","×":"\xD7","⊠":"\u22A0","⨱":"\u2A31","⨰":"\u2A30","∭":"\u222D","⤨":"\u2928","⊤":"\u22A4","⌶":"\u2336","⫱":"\u2AF1","𝕥":"\u{1D565}","⫚":"\u2ADA","⤩":"\u2929","‴":"\u2034","™":"\u2122","▵":"\u25B5","▿":"\u25BF","◃":"\u25C3","⊴":"\u22B4","≜":"\u225C","▹":"\u25B9","⊵":"\u22B5","◬":"\u25EC","≜":"\u225C","⨺":"\u2A3A","⨹":"\u2A39","⧍":"\u29CD","⨻":"\u2A3B","⏢":"\u23E2","𝓉":"\u{1D4C9}","ц":"\u0446","ћ":"\u045B","ŧ":"\u0167","≬":"\u226C","↞":"\u219E","↠":"\u21A0","⇑":"\u21D1","⥣":"\u2963","ú":"\xFA","ú":"\xFA","↑":"\u2191","ў":"\u045E","ŭ":"\u016D","û":"\xFB","û":"\xFB","у":"\u0443","⇅":"\u21C5","ű":"\u0171","⥮":"\u296E","⥾":"\u297E","𝔲":"\u{1D532}","ù":"\xF9","ù":"\xF9","↿":"\u21BF","↾":"\u21BE","▀":"\u2580","⌜":"\u231C","⌜":"\u231C","⌏":"\u230F","◸":"\u25F8","ū":"\u016B","¨":"\xA8","¨":"\xA8","ų":"\u0173","𝕦":"\u{1D566}","↑":"\u2191","↕":"\u2195","↿":"\u21BF","↾":"\u21BE","⊎":"\u228E","υ":"\u03C5","ϒ":"\u03D2","υ":"\u03C5","⇈":"\u21C8","⌝":"\u231D","⌝":"\u231D","⌎":"\u230E","ů":"\u016F","◹":"\u25F9","𝓊":"\u{1D4CA}","⋰":"\u22F0","ũ":"\u0169","▵":"\u25B5","▴":"\u25B4","⇈":"\u21C8","ü":"\xFC","ü":"\xFC","⦧":"\u29A7","⇕":"\u21D5","⫨":"\u2AE8","⫩":"\u2AE9","⊨":"\u22A8","⦜":"\u299C","ϵ":"\u03F5","ϰ":"\u03F0","∅":"\u2205","ϕ":"\u03D5","ϖ":"\u03D6","∝":"\u221D","↕":"\u2195","ϱ":"\u03F1","ς":"\u03C2","⊊︀":"\u228A\uFE00","⫋︀":"\u2ACB\uFE00","⊋︀":"\u228B\uFE00","⫌︀":"\u2ACC\uFE00","ϑ":"\u03D1","⊲":"\u22B2","⊳":"\u22B3","в":"\u0432","⊢":"\u22A2","∨":"\u2228","⊻":"\u22BB","≚":"\u225A","⋮":"\u22EE","|":"|","|":"|","𝔳":"\u{1D533}","⊲":"\u22B2","⊂⃒":"\u2282\u20D2","⊃⃒":"\u2283\u20D2","𝕧":"\u{1D567}","∝":"\u221D","⊳":"\u22B3","𝓋":"\u{1D4CB}","⫋︀":"\u2ACB\uFE00","⊊︀":"\u228A\uFE00","⫌︀":"\u2ACC\uFE00","⊋︀":"\u228B\uFE00","⦚":"\u299A","ŵ":"\u0175","⩟":"\u2A5F","∧":"\u2227","≙":"\u2259","℘":"\u2118","𝔴":"\u{1D534}","𝕨":"\u{1D568}","℘":"\u2118","≀":"\u2240","≀":"\u2240","𝓌":"\u{1D4CC}","⋂":"\u22C2","◯":"\u25EF","⋃":"\u22C3","▽":"\u25BD","𝔵":"\u{1D535}","⟺":"\u27FA","⟷":"\u27F7","ξ":"\u03BE","⟸":"\u27F8","⟵":"\u27F5","⟼":"\u27FC","⋻":"\u22FB","⨀":"\u2A00","𝕩":"\u{1D569}","⨁":"\u2A01","⨂":"\u2A02","⟹":"\u27F9","⟶":"\u27F6","𝓍":"\u{1D4CD}","⨆":"\u2A06","⨄":"\u2A04","△":"\u25B3","⋁":"\u22C1","⋀":"\u22C0","ý":"\xFD","ý":"\xFD","я":"\u044F","ŷ":"\u0177","ы":"\u044B","¥":"\xA5","¥":"\xA5","𝔶":"\u{1D536}","ї":"\u0457","𝕪":"\u{1D56A}","𝓎":"\u{1D4CE}","ю":"\u044E","ÿ":"\xFF","ÿ":"\xFF","ź":"\u017A","ž":"\u017E","з":"\u0437","ż":"\u017C","ℨ":"\u2128","ζ":"\u03B6","𝔷":"\u{1D537}","ж":"\u0436","⇝":"\u21DD","𝕫":"\u{1D56B}","𝓏":"\u{1D4CF}","‍":"\u200D","‌":"\u200C"},qn=Nd;function Bd(e){return e.replace(/&(#\d+|#x[a-f0-9]+|[a-z]+\d*);?/gi,(t,r)=>{if(typeof qn[t]=="string")return qn[t];if(r.charAt(0)!=="#"||t.charAt(t.length-1)!==";")return t;let n;r.charAt(1)==="x"?n=parseInt(r.substr(2),16):n=parseInt(r.substr(1),10);let o="";return n>=55296&&n<=57343||n>1114111?"\uFFFD":(n>65535&&(n-=65536,o+=String.fromCharCode(n>>>10&1023|55296),n=56320|n&1023),o+=String.fromCharCode(n),o)})}function Ct(e){return e.trim().replace(/[<>"'?&]/g,t=>{let r=t.charCodeAt(0).toString(16);return r.length<2&&(r="0"+r),"&#x"+r.toUpperCase()+";"})}function Pi(e){return"<div>"+Ct(e).replace(/\n/g,"<br />")+"</div>"}function ji(e){return e=e.replace(/\r?\n/g,"").replace(/<\!\-\-.*?\-\->/gi," ").replace(/<br\b[^>]*>/gi,`
|
|
240
|
+
`}}}}).prompt();var co=fe(ot(),1);bt();process.env.RESEND_USER_AGENT=`resend-cli:${te}`;var nt=new TextEncoder,Rn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xt=new Uint8Array(256);for(let e=0;e<Rn.length;e++)Xt[Rn.charCodeAt(e)]=e;function Do(e){let t=Math.ceil(e.length/4)*3,o=e.length,i=0;e.length%4===3?t--:e.length%4===2?t-=2:e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);let r=new ArrayBuffer(t),n=new Uint8Array(r);for(let s=0;s<o;s+=4){let a=Xt[e.charCodeAt(s)],l=Xt[e.charCodeAt(s+1)],d=Xt[e.charCodeAt(s+2)],c=Xt[e.charCodeAt(s+3)];n[i++]=a<<2|l>>4,n[i++]=(l&15)<<4|d>>2,n[i++]=(d&3)<<6|c&63}return r}function vt(e){e=e||"utf8";let t;try{t=new TextDecoder(e)}catch{t=new TextDecoder("windows-1252")}return t}async function st(e){if("arrayBuffer"in e)return await e.arrayBuffer();let t=new FileReader;return new Promise((o,i)=>{t.onload=function(r){o(r.target.result)},t.onerror=function(r){i(t.error)},t.readAsArrayBuffer(e)})}function Dn(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70?String.fromCharCode(e):!1}function Ed(e,t,o){let i=e.indexOf("*");i>=0&&(e=e.substr(0,i)),t=t.toUpperCase();let r;if(t==="Q"){o=o.replace(/=\s+([0-9a-fA-F])/g,"=$1").replace(/[_\s]/g," ");let n=nt.encode(o),s=[];for(let l=0,d=n.length;l<d;l++){let c=n[l];if(l<=d-2&&c===61){let u=Dn(n[l+1]),m=Dn(n[l+2]);if(u&&m){let b=parseInt(u+m,16);s.push(b),l+=2;continue}}s.push(c)}r=new ArrayBuffer(s.length);let a=new DataView(r);for(let l=0,d=s.length;l<d;l++)a.setUint8(l,s[l])}else t==="B"?r=Do(o.replace(/[^a-zA-Z0-9\+\/=]+/g,"")):r=nt.encode(o);return vt(e).decode(r)}function Ct(e){let t=!0,o=!1;for(;!o;){let i=(e||"").toString().replace(/(=\?([^?]+)\?[Bb]\?([^?]*)\?=)\s*(?==\?([^?]+)\?[Bb]\?[^?]*\?=)/g,(r,n,s,a,l)=>t&&s===l&&a.length%4===0&&!/=$/.test(a)?n+"__\0JOIN\0__":r).replace(/(=\?([^?]+)\?[Qq]\?[^?]*\?=)\s*(?==\?([^?]+)\?[Qq]\?[^?]*\?=)/g,(r,n,s,a)=>t&&s===a?n+"__\0JOIN\0__":r).replace(/(\?=)?__\x00JOIN\x00__(=\?([^?]+)\?[QqBb]\?)?/g,"").replace(/(=\?[^?]+\?[QqBb]\?[^?]*\?=)\s+(?==\?[^?]+\?[QqBb]\?[^?]*\?=)/g,"$1").replace(/=\?([\w_\-*]+)\?([QqBb])\?([^?]*)\?=/g,(r,n,s,a)=>Ed(n,s,a));if(t&&i.indexOf("\uFFFD")>=0)t=!1;else return i}}function Td(e,t){t=t||"utf-8";let o=[];for(let n=0;n<e.length;n++){let s=e.charAt(n);if(s==="%"&&/^[a-f0-9]{2}/i.test(e.substr(n+1,2))){let a=e.substr(n+1,2);n+=2,o.push(parseInt(a,16))}else if(s.charCodeAt(0)>126){s=nt.encode(s);for(let a=0;a<s.length;a++)o.push(s[a])}else o.push(s.charCodeAt(0))}let i=new ArrayBuffer(o.length),r=new DataView(i);for(let n=0,s=o.length;n<s;n++)r.setUint8(n,o[n]);return vt(t).decode(i)}function _n(e){let t=new Map;Object.keys(e.params).forEach(o=>{let i=o.match(/\*((\d+)\*?)?$/);if(!i)return;let r=o.substr(0,i.index).toLowerCase(),n=Number(i[2])||0,s;t.has(r)?s=t.get(r):(s={charset:!1,values:[]},t.set(r,s));let a=e.params[o];n===0&&i[0].charAt(i[0].length-1)==="*"&&(i=a.match(/^([^']*)'[^']*'(.*)$/))&&(s.charset=i[1]||"utf-8",a=i[2]),s.values.push({nr:n,value:a}),delete e.params[o]}),t.forEach((o,i)=>{e.params[i]=Td(o.values.sort((r,n)=>r.nr-n.nr).map(r=>r.value).join(""),o.charset)})}var Zt=class{constructor(){this.chunks=[]}update(t){this.chunks.push(t),this.chunks.push(`
|
|
241
|
+
`)}finalize(){return st(new Blob(this.chunks,{type:"application/octet-stream"}))}};var eo=class{constructor(t){t=t||{},this.decoder=t.decoder||new TextDecoder,this.maxChunkSize=100*1024,this.chunks=[],this.remainder=""}update(t){let o=this.decoder.decode(t);if(o=o.replace(/[^a-zA-Z0-9+\/]+/g,""),this.remainder+=o,this.remainder.length>=this.maxChunkSize){let i=Math.floor(this.remainder.length/4)*4,r;i===this.remainder.length?(r=this.remainder,this.remainder=""):(r=this.remainder.substr(0,i),this.remainder=this.remainder.substr(i)),r.length&&this.chunks.push(Do(r))}}finalize(){return this.remainder&&!/^=+$/.test(this.remainder)&&this.chunks.push(Do(this.remainder)),st(new Blob(this.chunks,{type:"application/octet-stream"}))}};var Bn=/^=[a-f0-9]{2}$/i,Od=/(?==[a-f0-9]{2})/i,jd=/=\r?\n/g,Id=/=[a-fA-F0-9]?$/,to=class{constructor(t){t=t||{},this.decoder=t.decoder||new TextDecoder,this.maxChunkSize=100*1024,this.remainder="",this.chunks=[]}decodeQPBytes(t){let o=new ArrayBuffer(t.length),i=new DataView(o);for(let r=0,n=t.length;r<n;r++)i.setUint8(r,parseInt(t[r],16));return o}decodeChunks(t){t=t.replace(jd,"");let o=t.split(Od),i=[];for(let r of o){if(r.charAt(0)!=="="){i.length&&(this.chunks.push(this.decodeQPBytes(i)),i=[]),this.chunks.push(r);continue}if(r.length===3){Bn.test(r)?i.push(r.substr(1)):(i.length&&(this.chunks.push(this.decodeQPBytes(i)),i=[]),this.chunks.push(r));continue}if(r.length>3){let n=r.substr(0,3);Bn.test(n)?(i.push(r.substr(1,2)),this.chunks.push(this.decodeQPBytes(i)),i=[],r=r.substr(3),this.chunks.push(r)):(i.length&&(this.chunks.push(this.decodeQPBytes(i)),i=[]),this.chunks.push(r))}}i.length&&this.chunks.push(this.decodeQPBytes(i))}update(t){let o=this.decoder.decode(t)+`
|
|
242
|
+
`;if(o=this.remainder+o,o.length<this.maxChunkSize){this.remainder=o;return}this.remainder="";let i=o.match(Id);if(i){if(i.index===0){this.remainder=o;return}this.remainder=o.substr(i.index),o=o.substr(0,i.index)}this.decodeChunks(o)}finalize(){return this.remainder.length&&(this.decodeChunks(this.remainder),this.remainder=""),st(new Blob(this.chunks,{type:"application/octet-stream"}))}};var Pd=vt(),xt=class{constructor(t){if(this.options=t||{},this.postalMime=this.options.postalMime,this.root=!!this.options.parentNode,this.childNodes=[],this.options.parentNode){if(this.parentNode=this.options.parentNode,this.depth=this.parentNode.depth+1,this.depth>this.options.maxNestingDepth)throw new Error(`Maximum MIME nesting depth of ${this.options.maxNestingDepth} levels exceeded`);this.options.parentNode.childNodes.push(this)}else this.depth=0;this.state="header",this.headerLines=[],this.headerSize=0;let i=(this.options.parentMultipartType||null)==="digest"?"message/rfc822":"text/plain";this.contentType={value:i,default:!0},this.contentTransferEncoding={value:"8bit"},this.contentDisposition={value:""},this.headers=[],this.contentDecoder=!1}setupContentDecoder(t){/base64/i.test(t)?this.contentDecoder=new eo:/quoted-printable/i.test(t)?this.contentDecoder=new to({decoder:vt(this.contentType.parsed.params.charset)}):this.contentDecoder=new Zt}async finalize(){if(this.state==="finished")return;this.state==="header"&&this.processHeaders();let t=this.postalMime.boundaries;for(let o=t.length-1;o>=0;o--)if(t[o].node===this){t.splice(o,1);break}await this.finalizeChildNodes(),this.content=this.contentDecoder?await this.contentDecoder.finalize():null,this.state="finished"}async finalizeChildNodes(){for(let t of this.childNodes)await t.finalize()}stripComments(t){let o="",i=0,r=!1,n=!1;for(let s=0;s<t.length;s++){let a=t.charAt(s);if(r){i===0&&(o+=a),r=!1;continue}if(a==="\\"){r=!0,i===0&&(o+=a);continue}if(a==='"'&&i===0){n=!n,o+=a;continue}if(!n){if(a==="("){i++;continue}if(a===")"&&i>0){i--;continue}}i===0&&(o+=a)}return o}parseStructuredHeader(t){t=this.stripComments(t);let o={value:!1,params:{}},i=!1,r="",n="value",s=!1,a=!1,l;for(let d=0,c=t.length;d<c;d++)switch(l=t.charAt(d),n){case"key":if(l==="="){i=r.trim().toLowerCase(),n="value",r="";break}r+=l;break;case"value":if(a)r+=l;else if(l==="\\"){a=!0;continue}else s&&l===s?s=!1:!s&&l==='"'?s=l:!s&&l===";"?(i===!1?o.value=r.trim():o.params[i]=r.trim(),n="key",r=""):r+=l;a=!1;break}return r=r.trim(),n==="value"?i===!1?o.value=r:o.params[i]=r:r&&(o.params[r.toLowerCase()]=""),o.value&&(o.value=o.value.toLowerCase()),_n(o),o}decodeFlowedText(t,o){return t.split(/\r?\n/).reduce((i,r)=>i.endsWith(" ")&&i!=="-- "&&!i.endsWith(`
|
|
243
|
+
-- `)?o?i.slice(0,-1)+r:i+r:i+`
|
|
244
|
+
`+r).replace(/^ /gm,"")}getTextContent(){if(!this.content)return"";let t=vt(this.contentType.parsed.params.charset).decode(this.content);return/^flowed$/i.test(this.contentType.parsed.params.format)&&(t=this.decodeFlowedText(t,/^yes$/i.test(this.contentType.parsed.params.delsp))),t}processHeaders(){for(let t=this.headerLines.length-1;t>=0;t--){let o=this.headerLines[t];t&&/^\s/.test(o)&&(this.headerLines[t-1]+=`
|
|
245
|
+
`+o,this.headerLines.splice(t,1))}this.rawHeaderLines=[];for(let t=this.headerLines.length-1;t>=0;t--){let o=this.headerLines[t],i=o.indexOf(":"),r=i<0?o.trim():o.substr(0,i).trim();this.rawHeaderLines.push({key:r.toLowerCase(),line:o});let n=o.replace(/\s+/g," ");i=n.indexOf(":");let s=i<0?n.trim():n.substr(0,i).trim(),a=i<0?"":n.substr(i+1).trim();switch(this.headers.push({key:s.toLowerCase(),originalKey:s,value:a}),s.toLowerCase()){case"content-type":this.contentType.default&&(this.contentType={value:a,parsed:{}});break;case"content-transfer-encoding":this.contentTransferEncoding={value:a,parsed:{}};break;case"content-disposition":this.contentDisposition={value:a,parsed:{}};break;case"content-id":this.contentId=a;break;case"content-description":this.contentDescription=a;break}}this.contentType.parsed=this.parseStructuredHeader(this.contentType.value),this.contentType.multipart=/^multipart\//i.test(this.contentType.parsed.value)?this.contentType.parsed.value.substr(this.contentType.parsed.value.indexOf("/")+1):!1,this.contentType.multipart&&this.contentType.parsed.params.boundary&&this.postalMime.boundaries.push({value:nt.encode(this.contentType.parsed.params.boundary),node:this}),this.contentDisposition.parsed=this.parseStructuredHeader(this.contentDisposition.value),this.contentTransferEncoding.encoding=this.contentTransferEncoding.value.toLowerCase().split(/[^\w-]/).shift(),this.setupContentDecoder(this.contentTransferEncoding.encoding)}feed(t){switch(this.state){case"header":if(!t.length)return this.state="body",this.processHeaders();if(this.headerSize+=t.length,this.headerSize>this.options.maxHeadersSize)throw new Error(`Maximum header size of ${this.options.maxHeadersSize} bytes exceeded`);this.headerLines.push(Pd.decode(t));break;case"body":this.contentDecoder.update(t)}}};var $d={"Æ":"\xC6","Æ":"\xC6","&":"&","&":"&","Á":"\xC1","Á":"\xC1","Ă":"\u0102","Â":"\xC2","Â":"\xC2","А":"\u0410","𝔄":"\u{1D504}","À":"\xC0","À":"\xC0","Α":"\u0391","Ā":"\u0100","⩓":"\u2A53","Ą":"\u0104","𝔸":"\u{1D538}","⁡":"\u2061","Å":"\xC5","Å":"\xC5","𝒜":"\u{1D49C}","≔":"\u2254","Ã":"\xC3","Ã":"\xC3","Ä":"\xC4","Ä":"\xC4","∖":"\u2216","⫧":"\u2AE7","⌆":"\u2306","Б":"\u0411","∵":"\u2235","ℬ":"\u212C","Β":"\u0392","𝔅":"\u{1D505}","𝔹":"\u{1D539}","˘":"\u02D8","ℬ":"\u212C","≎":"\u224E","Ч":"\u0427","©":"\xA9","©":"\xA9","Ć":"\u0106","⋒":"\u22D2","ⅅ":"\u2145","ℭ":"\u212D","Č":"\u010C","Ç":"\xC7","Ç":"\xC7","Ĉ":"\u0108","∰":"\u2230","Ċ":"\u010A","¸":"\xB8","·":"\xB7","ℭ":"\u212D","Χ":"\u03A7","⊙":"\u2299","⊖":"\u2296","⊕":"\u2295","⊗":"\u2297","∲":"\u2232","”":"\u201D","’":"\u2019","∷":"\u2237","⩴":"\u2A74","≡":"\u2261","∯":"\u222F","∮":"\u222E","ℂ":"\u2102","∐":"\u2210","∳":"\u2233","⨯":"\u2A2F","𝒞":"\u{1D49E}","⋓":"\u22D3","≍":"\u224D","ⅅ":"\u2145","⤑":"\u2911","Ђ":"\u0402","Ѕ":"\u0405","Џ":"\u040F","‡":"\u2021","↡":"\u21A1","⫤":"\u2AE4","Ď":"\u010E","Д":"\u0414","∇":"\u2207","Δ":"\u0394","𝔇":"\u{1D507}","´":"\xB4","˙":"\u02D9","˝":"\u02DD","`":"`","˜":"\u02DC","⋄":"\u22C4","ⅆ":"\u2146","𝔻":"\u{1D53B}","¨":"\xA8","⃜":"\u20DC","≐":"\u2250","∯":"\u222F","¨":"\xA8","⇓":"\u21D3","⇐":"\u21D0","⇔":"\u21D4","⫤":"\u2AE4","⟸":"\u27F8","⟺":"\u27FA","⟹":"\u27F9","⇒":"\u21D2","⊨":"\u22A8","⇑":"\u21D1","⇕":"\u21D5","∥":"\u2225","↓":"\u2193","⤓":"\u2913","⇵":"\u21F5","̑":"\u0311","⥐":"\u2950","⥞":"\u295E","↽":"\u21BD","⥖":"\u2956","⥟":"\u295F","⇁":"\u21C1","⥗":"\u2957","⊤":"\u22A4","↧":"\u21A7","⇓":"\u21D3","𝒟":"\u{1D49F}","Đ":"\u0110","Ŋ":"\u014A","Ð":"\xD0","Ð":"\xD0","É":"\xC9","É":"\xC9","Ě":"\u011A","Ê":"\xCA","Ê":"\xCA","Э":"\u042D","Ė":"\u0116","𝔈":"\u{1D508}","È":"\xC8","È":"\xC8","∈":"\u2208","Ē":"\u0112","◻":"\u25FB","▫":"\u25AB","Ę":"\u0118","𝔼":"\u{1D53C}","Ε":"\u0395","⩵":"\u2A75","≂":"\u2242","⇌":"\u21CC","ℰ":"\u2130","⩳":"\u2A73","Η":"\u0397","Ë":"\xCB","Ë":"\xCB","∃":"\u2203","ⅇ":"\u2147","Ф":"\u0424","𝔉":"\u{1D509}","◼":"\u25FC","▪":"\u25AA","𝔽":"\u{1D53D}","∀":"\u2200","ℱ":"\u2131","ℱ":"\u2131","Ѓ":"\u0403",">":">",">":">","Γ":"\u0393","Ϝ":"\u03DC","Ğ":"\u011E","Ģ":"\u0122","Ĝ":"\u011C","Г":"\u0413","Ġ":"\u0120","𝔊":"\u{1D50A}","⋙":"\u22D9","𝔾":"\u{1D53E}","≥":"\u2265","⋛":"\u22DB","≧":"\u2267","⪢":"\u2AA2","≷":"\u2277","⩾":"\u2A7E","≳":"\u2273","𝒢":"\u{1D4A2}","≫":"\u226B","Ъ":"\u042A","ˇ":"\u02C7","^":"^","Ĥ":"\u0124","ℌ":"\u210C","ℋ":"\u210B","ℍ":"\u210D","─":"\u2500","ℋ":"\u210B","Ħ":"\u0126","≎":"\u224E","≏":"\u224F","Е":"\u0415","IJ":"\u0132","Ё":"\u0401","Í":"\xCD","Í":"\xCD","Î":"\xCE","Î":"\xCE","И":"\u0418","İ":"\u0130","ℑ":"\u2111","Ì":"\xCC","Ì":"\xCC","ℑ":"\u2111","Ī":"\u012A","ⅈ":"\u2148","⇒":"\u21D2","∬":"\u222C","∫":"\u222B","⋂":"\u22C2","⁣":"\u2063","⁢":"\u2062","Į":"\u012E","𝕀":"\u{1D540}","Ι":"\u0399","ℐ":"\u2110","Ĩ":"\u0128","І":"\u0406","Ï":"\xCF","Ï":"\xCF","Ĵ":"\u0134","Й":"\u0419","𝔍":"\u{1D50D}","𝕁":"\u{1D541}","𝒥":"\u{1D4A5}","Ј":"\u0408","Є":"\u0404","Х":"\u0425","Ќ":"\u040C","Κ":"\u039A","Ķ":"\u0136","К":"\u041A","𝔎":"\u{1D50E}","𝕂":"\u{1D542}","𝒦":"\u{1D4A6}","Љ":"\u0409","<":"<","<":"<","Ĺ":"\u0139","Λ":"\u039B","⟪":"\u27EA","ℒ":"\u2112","↞":"\u219E","Ľ":"\u013D","Ļ":"\u013B","Л":"\u041B","⟨":"\u27E8","←":"\u2190","⇤":"\u21E4","⇆":"\u21C6","⌈":"\u2308","⟦":"\u27E6","⥡":"\u2961","⇃":"\u21C3","⥙":"\u2959","⌊":"\u230A","↔":"\u2194","⥎":"\u294E","⊣":"\u22A3","↤":"\u21A4","⥚":"\u295A","⊲":"\u22B2","⧏":"\u29CF","⊴":"\u22B4","⥑":"\u2951","⥠":"\u2960","↿":"\u21BF","⥘":"\u2958","↼":"\u21BC","⥒":"\u2952","⇐":"\u21D0","⇔":"\u21D4","⋚":"\u22DA","≦":"\u2266","≶":"\u2276","⪡":"\u2AA1","⩽":"\u2A7D","≲":"\u2272","𝔏":"\u{1D50F}","⋘":"\u22D8","⇚":"\u21DA","Ŀ":"\u013F","⟵":"\u27F5","⟷":"\u27F7","⟶":"\u27F6","⟸":"\u27F8","⟺":"\u27FA","⟹":"\u27F9","𝕃":"\u{1D543}","↙":"\u2199","↘":"\u2198","ℒ":"\u2112","↰":"\u21B0","Ł":"\u0141","≪":"\u226A","⤅":"\u2905","М":"\u041C"," ":"\u205F","ℳ":"\u2133","𝔐":"\u{1D510}","∓":"\u2213","𝕄":"\u{1D544}","ℳ":"\u2133","Μ":"\u039C","Њ":"\u040A","Ń":"\u0143","Ň":"\u0147","Ņ":"\u0145","Н":"\u041D","​":"\u200B","​":"\u200B","​":"\u200B","​":"\u200B","≫":"\u226B","≪":"\u226A","
":`
|
|
246
|
+
`,"𝔑":"\u{1D511}","⁠":"\u2060"," ":"\xA0","ℕ":"\u2115","⫬":"\u2AEC","≢":"\u2262","≭":"\u226D","∦":"\u2226","∉":"\u2209","≠":"\u2260","≂̸":"\u2242\u0338","∄":"\u2204","≯":"\u226F","≱":"\u2271","≧̸":"\u2267\u0338","≫̸":"\u226B\u0338","≹":"\u2279","⩾̸":"\u2A7E\u0338","≵":"\u2275","≎̸":"\u224E\u0338","≏̸":"\u224F\u0338","⋪":"\u22EA","⧏̸":"\u29CF\u0338","⋬":"\u22EC","≮":"\u226E","≰":"\u2270","≸":"\u2278","≪̸":"\u226A\u0338","⩽̸":"\u2A7D\u0338","≴":"\u2274","⪢̸":"\u2AA2\u0338","⪡̸":"\u2AA1\u0338","⊀":"\u2280","⪯̸":"\u2AAF\u0338","⋠":"\u22E0","∌":"\u220C","⋫":"\u22EB","⧐̸":"\u29D0\u0338","⋭":"\u22ED","⊏̸":"\u228F\u0338","⋢":"\u22E2","⊐̸":"\u2290\u0338","⋣":"\u22E3","⊂⃒":"\u2282\u20D2","⊈":"\u2288","⊁":"\u2281","⪰̸":"\u2AB0\u0338","⋡":"\u22E1","≿̸":"\u227F\u0338","⊃⃒":"\u2283\u20D2","⊉":"\u2289","≁":"\u2241","≄":"\u2244","≇":"\u2247","≉":"\u2249","∤":"\u2224","𝒩":"\u{1D4A9}","Ñ":"\xD1","Ñ":"\xD1","Ν":"\u039D","Œ":"\u0152","Ó":"\xD3","Ó":"\xD3","Ô":"\xD4","Ô":"\xD4","О":"\u041E","Ő":"\u0150","𝔒":"\u{1D512}","Ò":"\xD2","Ò":"\xD2","Ō":"\u014C","Ω":"\u03A9","Ο":"\u039F","𝕆":"\u{1D546}","“":"\u201C","‘":"\u2018","⩔":"\u2A54","𝒪":"\u{1D4AA}","Ø":"\xD8","Ø":"\xD8","Õ":"\xD5","Õ":"\xD5","⨷":"\u2A37","Ö":"\xD6","Ö":"\xD6","‾":"\u203E","⏞":"\u23DE","⎴":"\u23B4","⏜":"\u23DC","∂":"\u2202","П":"\u041F","𝔓":"\u{1D513}","Φ":"\u03A6","Π":"\u03A0","±":"\xB1","ℌ":"\u210C","ℙ":"\u2119","⪻":"\u2ABB","≺":"\u227A","⪯":"\u2AAF","≼":"\u227C","≾":"\u227E","″":"\u2033","∏":"\u220F","∷":"\u2237","∝":"\u221D","𝒫":"\u{1D4AB}","Ψ":"\u03A8",""":'"',""":'"',"𝔔":"\u{1D514}","ℚ":"\u211A","𝒬":"\u{1D4AC}","⤐":"\u2910","®":"\xAE","®":"\xAE","Ŕ":"\u0154","⟫":"\u27EB","↠":"\u21A0","⤖":"\u2916","Ř":"\u0158","Ŗ":"\u0156","Р":"\u0420","ℜ":"\u211C","∋":"\u220B","⇋":"\u21CB","⥯":"\u296F","ℜ":"\u211C","Ρ":"\u03A1","⟩":"\u27E9","→":"\u2192","⇥":"\u21E5","⇄":"\u21C4","⌉":"\u2309","⟧":"\u27E7","⥝":"\u295D","⇂":"\u21C2","⥕":"\u2955","⌋":"\u230B","⊢":"\u22A2","↦":"\u21A6","⥛":"\u295B","⊳":"\u22B3","⧐":"\u29D0","⊵":"\u22B5","⥏":"\u294F","⥜":"\u295C","↾":"\u21BE","⥔":"\u2954","⇀":"\u21C0","⥓":"\u2953","⇒":"\u21D2","ℝ":"\u211D","⥰":"\u2970","⇛":"\u21DB","ℛ":"\u211B","↱":"\u21B1","⧴":"\u29F4","Щ":"\u0429","Ш":"\u0428","Ь":"\u042C","Ś":"\u015A","⪼":"\u2ABC","Š":"\u0160","Ş":"\u015E","Ŝ":"\u015C","С":"\u0421","𝔖":"\u{1D516}","↓":"\u2193","←":"\u2190","→":"\u2192","↑":"\u2191","Σ":"\u03A3","∘":"\u2218","𝕊":"\u{1D54A}","√":"\u221A","□":"\u25A1","⊓":"\u2293","⊏":"\u228F","⊑":"\u2291","⊐":"\u2290","⊒":"\u2292","⊔":"\u2294","𝒮":"\u{1D4AE}","⋆":"\u22C6","⋐":"\u22D0","⋐":"\u22D0","⊆":"\u2286","≻":"\u227B","⪰":"\u2AB0","≽":"\u227D","≿":"\u227F","∋":"\u220B","∑":"\u2211","⋑":"\u22D1","⊃":"\u2283","⊇":"\u2287","⋑":"\u22D1","Þ":"\xDE","Þ":"\xDE","™":"\u2122","Ћ":"\u040B","Ц":"\u0426","	":" ","Τ":"\u03A4","Ť":"\u0164","Ţ":"\u0162","Т":"\u0422","𝔗":"\u{1D517}","∴":"\u2234","Θ":"\u0398","  ":"\u205F\u200A"," ":"\u2009","∼":"\u223C","≃":"\u2243","≅":"\u2245","≈":"\u2248","𝕋":"\u{1D54B}","⃛":"\u20DB","𝒯":"\u{1D4AF}","Ŧ":"\u0166","Ú":"\xDA","Ú":"\xDA","↟":"\u219F","⥉":"\u2949","Ў":"\u040E","Ŭ":"\u016C","Û":"\xDB","Û":"\xDB","У":"\u0423","Ű":"\u0170","𝔘":"\u{1D518}","Ù":"\xD9","Ù":"\xD9","Ū":"\u016A","_":"_","⏟":"\u23DF","⎵":"\u23B5","⏝":"\u23DD","⋃":"\u22C3","⊎":"\u228E","Ų":"\u0172","𝕌":"\u{1D54C}","↑":"\u2191","⤒":"\u2912","⇅":"\u21C5","↕":"\u2195","⥮":"\u296E","⊥":"\u22A5","↥":"\u21A5","⇑":"\u21D1","⇕":"\u21D5","↖":"\u2196","↗":"\u2197","ϒ":"\u03D2","Υ":"\u03A5","Ů":"\u016E","𝒰":"\u{1D4B0}","Ũ":"\u0168","Ü":"\xDC","Ü":"\xDC","⊫":"\u22AB","⫫":"\u2AEB","В":"\u0412","⊩":"\u22A9","⫦":"\u2AE6","⋁":"\u22C1","‖":"\u2016","‖":"\u2016","∣":"\u2223","|":"|","❘":"\u2758","≀":"\u2240"," ":"\u200A","𝔙":"\u{1D519}","𝕍":"\u{1D54D}","𝒱":"\u{1D4B1}","⊪":"\u22AA","Ŵ":"\u0174","⋀":"\u22C0","𝔚":"\u{1D51A}","𝕎":"\u{1D54E}","𝒲":"\u{1D4B2}","𝔛":"\u{1D51B}","Ξ":"\u039E","𝕏":"\u{1D54F}","𝒳":"\u{1D4B3}","Я":"\u042F","Ї":"\u0407","Ю":"\u042E","Ý":"\xDD","Ý":"\xDD","Ŷ":"\u0176","Ы":"\u042B","𝔜":"\u{1D51C}","𝕐":"\u{1D550}","𝒴":"\u{1D4B4}","Ÿ":"\u0178","Ж":"\u0416","Ź":"\u0179","Ž":"\u017D","З":"\u0417","Ż":"\u017B","​":"\u200B","Ζ":"\u0396","ℨ":"\u2128","ℤ":"\u2124","𝒵":"\u{1D4B5}","á":"\xE1","á":"\xE1","ă":"\u0103","∾":"\u223E","∾̳":"\u223E\u0333","∿":"\u223F","â":"\xE2","â":"\xE2","´":"\xB4","´":"\xB4","а":"\u0430","æ":"\xE6","æ":"\xE6","⁡":"\u2061","𝔞":"\u{1D51E}","à":"\xE0","à":"\xE0","ℵ":"\u2135","ℵ":"\u2135","α":"\u03B1","ā":"\u0101","⨿":"\u2A3F","&":"&","&":"&","∧":"\u2227","⩕":"\u2A55","⩜":"\u2A5C","⩘":"\u2A58","⩚":"\u2A5A","∠":"\u2220","⦤":"\u29A4","∠":"\u2220","∡":"\u2221","⦨":"\u29A8","⦩":"\u29A9","⦪":"\u29AA","⦫":"\u29AB","⦬":"\u29AC","⦭":"\u29AD","⦮":"\u29AE","⦯":"\u29AF","∟":"\u221F","⊾":"\u22BE","⦝":"\u299D","∢":"\u2222","Å":"\xC5","⍼":"\u237C","ą":"\u0105","𝕒":"\u{1D552}","≈":"\u2248","⩰":"\u2A70","⩯":"\u2A6F","≊":"\u224A","≋":"\u224B","'":"'","≈":"\u2248","≊":"\u224A","å":"\xE5","å":"\xE5","𝒶":"\u{1D4B6}","*":"*","≈":"\u2248","≍":"\u224D","ã":"\xE3","ã":"\xE3","ä":"\xE4","ä":"\xE4","∳":"\u2233","⨑":"\u2A11","⫭":"\u2AED","≌":"\u224C","϶":"\u03F6","‵":"\u2035","∽":"\u223D","⋍":"\u22CD","⊽":"\u22BD","⌅":"\u2305","⌅":"\u2305","⎵":"\u23B5","⎶":"\u23B6","≌":"\u224C","б":"\u0431","„":"\u201E","∵":"\u2235","∵":"\u2235","⦰":"\u29B0","϶":"\u03F6","ℬ":"\u212C","β":"\u03B2","ℶ":"\u2136","≬":"\u226C","𝔟":"\u{1D51F}","⋂":"\u22C2","◯":"\u25EF","⋃":"\u22C3","⨀":"\u2A00","⨁":"\u2A01","⨂":"\u2A02","⨆":"\u2A06","★":"\u2605","▽":"\u25BD","△":"\u25B3","⨄":"\u2A04","⋁":"\u22C1","⋀":"\u22C0","⤍":"\u290D","⧫":"\u29EB","▪":"\u25AA","▴":"\u25B4","▾":"\u25BE","◂":"\u25C2","▸":"\u25B8","␣":"\u2423","▒":"\u2592","░":"\u2591","▓":"\u2593","█":"\u2588","=⃥":"=\u20E5","≡⃥":"\u2261\u20E5","⌐":"\u2310","𝕓":"\u{1D553}","⊥":"\u22A5","⊥":"\u22A5","⋈":"\u22C8","╗":"\u2557","╔":"\u2554","╖":"\u2556","╓":"\u2553","═":"\u2550","╦":"\u2566","╩":"\u2569","╤":"\u2564","╧":"\u2567","╝":"\u255D","╚":"\u255A","╜":"\u255C","╙":"\u2559","║":"\u2551","╬":"\u256C","╣":"\u2563","╠":"\u2560","╫":"\u256B","╢":"\u2562","╟":"\u255F","⧉":"\u29C9","╕":"\u2555","╒":"\u2552","┐":"\u2510","┌":"\u250C","─":"\u2500","╥":"\u2565","╨":"\u2568","┬":"\u252C","┴":"\u2534","⊟":"\u229F","⊞":"\u229E","⊠":"\u22A0","╛":"\u255B","╘":"\u2558","┘":"\u2518","└":"\u2514","│":"\u2502","╪":"\u256A","╡":"\u2561","╞":"\u255E","┼":"\u253C","┤":"\u2524","├":"\u251C","‵":"\u2035","˘":"\u02D8","¦":"\xA6","¦":"\xA6","𝒷":"\u{1D4B7}","⁏":"\u204F","∽":"\u223D","⋍":"\u22CD","\":"\\","⧅":"\u29C5","⟈":"\u27C8","•":"\u2022","•":"\u2022","≎":"\u224E","⪮":"\u2AAE","≏":"\u224F","≏":"\u224F","ć":"\u0107","∩":"\u2229","⩄":"\u2A44","⩉":"\u2A49","⩋":"\u2A4B","⩇":"\u2A47","⩀":"\u2A40","∩︀":"\u2229\uFE00","⁁":"\u2041","ˇ":"\u02C7","⩍":"\u2A4D","č":"\u010D","ç":"\xE7","ç":"\xE7","ĉ":"\u0109","⩌":"\u2A4C","⩐":"\u2A50","ċ":"\u010B","¸":"\xB8","¸":"\xB8","⦲":"\u29B2","¢":"\xA2","¢":"\xA2","·":"\xB7","𝔠":"\u{1D520}","ч":"\u0447","✓":"\u2713","✓":"\u2713","χ":"\u03C7","○":"\u25CB","⧃":"\u29C3","ˆ":"\u02C6","≗":"\u2257","↺":"\u21BA","↻":"\u21BB","®":"\xAE","Ⓢ":"\u24C8","⊛":"\u229B","⊚":"\u229A","⊝":"\u229D","≗":"\u2257","⨐":"\u2A10","⫯":"\u2AEF","⧂":"\u29C2","♣":"\u2663","♣":"\u2663",":":":","≔":"\u2254","≔":"\u2254",",":",","@":"@","∁":"\u2201","∘":"\u2218","∁":"\u2201","ℂ":"\u2102","≅":"\u2245","⩭":"\u2A6D","∮":"\u222E","𝕔":"\u{1D554}","∐":"\u2210","©":"\xA9","©":"\xA9","℗":"\u2117","↵":"\u21B5","✗":"\u2717","𝒸":"\u{1D4B8}","⫏":"\u2ACF","⫑":"\u2AD1","⫐":"\u2AD0","⫒":"\u2AD2","⋯":"\u22EF","⤸":"\u2938","⤵":"\u2935","⋞":"\u22DE","⋟":"\u22DF","↶":"\u21B6","⤽":"\u293D","∪":"\u222A","⩈":"\u2A48","⩆":"\u2A46","⩊":"\u2A4A","⊍":"\u228D","⩅":"\u2A45","∪︀":"\u222A\uFE00","↷":"\u21B7","⤼":"\u293C","⋞":"\u22DE","⋟":"\u22DF","⋎":"\u22CE","⋏":"\u22CF","¤":"\xA4","¤":"\xA4","↶":"\u21B6","↷":"\u21B7","⋎":"\u22CE","⋏":"\u22CF","∲":"\u2232","∱":"\u2231","⌭":"\u232D","⇓":"\u21D3","⥥":"\u2965","†":"\u2020","ℸ":"\u2138","↓":"\u2193","‐":"\u2010","⊣":"\u22A3","⤏":"\u290F","˝":"\u02DD","ď":"\u010F","д":"\u0434","ⅆ":"\u2146","‡":"\u2021","⇊":"\u21CA","⩷":"\u2A77","°":"\xB0","°":"\xB0","δ":"\u03B4","⦱":"\u29B1","⥿":"\u297F","𝔡":"\u{1D521}","⇃":"\u21C3","⇂":"\u21C2","⋄":"\u22C4","⋄":"\u22C4","♦":"\u2666","♦":"\u2666","¨":"\xA8","ϝ":"\u03DD","⋲":"\u22F2","÷":"\xF7","÷":"\xF7","÷":"\xF7","⋇":"\u22C7","⋇":"\u22C7","ђ":"\u0452","⌞":"\u231E","⌍":"\u230D","$":"$","𝕕":"\u{1D555}","˙":"\u02D9","≐":"\u2250","≑":"\u2251","∸":"\u2238","∔":"\u2214","⊡":"\u22A1","⌆":"\u2306","↓":"\u2193","⇊":"\u21CA","⇃":"\u21C3","⇂":"\u21C2","⤐":"\u2910","⌟":"\u231F","⌌":"\u230C","𝒹":"\u{1D4B9}","ѕ":"\u0455","⧶":"\u29F6","đ":"\u0111","⋱":"\u22F1","▿":"\u25BF","▾":"\u25BE","⇵":"\u21F5","⥯":"\u296F","⦦":"\u29A6","џ":"\u045F","⟿":"\u27FF","⩷":"\u2A77","≑":"\u2251","é":"\xE9","é":"\xE9","⩮":"\u2A6E","ě":"\u011B","≖":"\u2256","ê":"\xEA","ê":"\xEA","≕":"\u2255","э":"\u044D","ė":"\u0117","ⅇ":"\u2147","≒":"\u2252","𝔢":"\u{1D522}","⪚":"\u2A9A","è":"\xE8","è":"\xE8","⪖":"\u2A96","⪘":"\u2A98","⪙":"\u2A99","⏧":"\u23E7","ℓ":"\u2113","⪕":"\u2A95","⪗":"\u2A97","ē":"\u0113","∅":"\u2205","∅":"\u2205","∅":"\u2205"," ":"\u2004"," ":"\u2005"," ":"\u2003","ŋ":"\u014B"," ":"\u2002","ę":"\u0119","𝕖":"\u{1D556}","⋕":"\u22D5","⧣":"\u29E3","⩱":"\u2A71","ε":"\u03B5","ε":"\u03B5","ϵ":"\u03F5","≖":"\u2256","≕":"\u2255","≂":"\u2242","⪖":"\u2A96","⪕":"\u2A95","=":"=","≟":"\u225F","≡":"\u2261","⩸":"\u2A78","⧥":"\u29E5","≓":"\u2253","⥱":"\u2971","ℯ":"\u212F","≐":"\u2250","≂":"\u2242","η":"\u03B7","ð":"\xF0","ð":"\xF0","ë":"\xEB","ë":"\xEB","€":"\u20AC","!":"!","∃":"\u2203","ℰ":"\u2130","ⅇ":"\u2147","≒":"\u2252","ф":"\u0444","♀":"\u2640","ffi":"\uFB03","ff":"\uFB00","ffl":"\uFB04","𝔣":"\u{1D523}","fi":"\uFB01","fj":"fj","♭":"\u266D","fl":"\uFB02","▱":"\u25B1","ƒ":"\u0192","𝕗":"\u{1D557}","∀":"\u2200","⋔":"\u22D4","⫙":"\u2AD9","⨍":"\u2A0D","½":"\xBD","½":"\xBD","⅓":"\u2153","¼":"\xBC","¼":"\xBC","⅕":"\u2155","⅙":"\u2159","⅛":"\u215B","⅔":"\u2154","⅖":"\u2156","¾":"\xBE","¾":"\xBE","⅗":"\u2157","⅜":"\u215C","⅘":"\u2158","⅚":"\u215A","⅝":"\u215D","⅞":"\u215E","⁄":"\u2044","⌢":"\u2322","𝒻":"\u{1D4BB}","≧":"\u2267","⪌":"\u2A8C","ǵ":"\u01F5","γ":"\u03B3","ϝ":"\u03DD","⪆":"\u2A86","ğ":"\u011F","ĝ":"\u011D","г":"\u0433","ġ":"\u0121","≥":"\u2265","⋛":"\u22DB","≥":"\u2265","≧":"\u2267","⩾":"\u2A7E","⩾":"\u2A7E","⪩":"\u2AA9","⪀":"\u2A80","⪂":"\u2A82","⪄":"\u2A84","⋛︀":"\u22DB\uFE00","⪔":"\u2A94","𝔤":"\u{1D524}","≫":"\u226B","⋙":"\u22D9","ℷ":"\u2137","ѓ":"\u0453","≷":"\u2277","⪒":"\u2A92","⪥":"\u2AA5","⪤":"\u2AA4","≩":"\u2269","⪊":"\u2A8A","⪊":"\u2A8A","⪈":"\u2A88","⪈":"\u2A88","≩":"\u2269","⋧":"\u22E7","𝕘":"\u{1D558}","`":"`","ℊ":"\u210A","≳":"\u2273","⪎":"\u2A8E","⪐":"\u2A90",">":">",">":">","⪧":"\u2AA7","⩺":"\u2A7A","⋗":"\u22D7","⦕":"\u2995","⩼":"\u2A7C","⪆":"\u2A86","⥸":"\u2978","⋗":"\u22D7","⋛":"\u22DB","⪌":"\u2A8C","≷":"\u2277","≳":"\u2273","≩︀":"\u2269\uFE00","≩︀":"\u2269\uFE00","⇔":"\u21D4"," ":"\u200A","½":"\xBD","ℋ":"\u210B","ъ":"\u044A","↔":"\u2194","⥈":"\u2948","↭":"\u21AD","ℏ":"\u210F","ĥ":"\u0125","♥":"\u2665","♥":"\u2665","…":"\u2026","⊹":"\u22B9","𝔥":"\u{1D525}","⤥":"\u2925","⤦":"\u2926","⇿":"\u21FF","∻":"\u223B","↩":"\u21A9","↪":"\u21AA","𝕙":"\u{1D559}","―":"\u2015","𝒽":"\u{1D4BD}","ℏ":"\u210F","ħ":"\u0127","⁃":"\u2043","‐":"\u2010","í":"\xED","í":"\xED","⁣":"\u2063","î":"\xEE","î":"\xEE","и":"\u0438","е":"\u0435","¡":"\xA1","¡":"\xA1","⇔":"\u21D4","𝔦":"\u{1D526}","ì":"\xEC","ì":"\xEC","ⅈ":"\u2148","⨌":"\u2A0C","∭":"\u222D","⧜":"\u29DC","℩":"\u2129","ij":"\u0133","ī":"\u012B","ℑ":"\u2111","ℐ":"\u2110","ℑ":"\u2111","ı":"\u0131","⊷":"\u22B7","Ƶ":"\u01B5","∈":"\u2208","℅":"\u2105","∞":"\u221E","⧝":"\u29DD","ı":"\u0131","∫":"\u222B","⊺":"\u22BA","ℤ":"\u2124","⊺":"\u22BA","⨗":"\u2A17","⨼":"\u2A3C","ё":"\u0451","į":"\u012F","𝕚":"\u{1D55A}","ι":"\u03B9","⨼":"\u2A3C","¿":"\xBF","¿":"\xBF","𝒾":"\u{1D4BE}","∈":"\u2208","⋹":"\u22F9","⋵":"\u22F5","⋴":"\u22F4","⋳":"\u22F3","∈":"\u2208","⁢":"\u2062","ĩ":"\u0129","і":"\u0456","ï":"\xEF","ï":"\xEF","ĵ":"\u0135","й":"\u0439","𝔧":"\u{1D527}","ȷ":"\u0237","𝕛":"\u{1D55B}","𝒿":"\u{1D4BF}","ј":"\u0458","є":"\u0454","κ":"\u03BA","ϰ":"\u03F0","ķ":"\u0137","к":"\u043A","𝔨":"\u{1D528}","ĸ":"\u0138","х":"\u0445","ќ":"\u045C","𝕜":"\u{1D55C}","𝓀":"\u{1D4C0}","⇚":"\u21DA","⇐":"\u21D0","⤛":"\u291B","⤎":"\u290E","≦":"\u2266","⪋":"\u2A8B","⥢":"\u2962","ĺ":"\u013A","⦴":"\u29B4","ℒ":"\u2112","λ":"\u03BB","⟨":"\u27E8","⦑":"\u2991","⟨":"\u27E8","⪅":"\u2A85","«":"\xAB","«":"\xAB","←":"\u2190","⇤":"\u21E4","⤟":"\u291F","⤝":"\u291D","↩":"\u21A9","↫":"\u21AB","⤹":"\u2939","⥳":"\u2973","↢":"\u21A2","⪫":"\u2AAB","⤙":"\u2919","⪭":"\u2AAD","⪭︀":"\u2AAD\uFE00","⤌":"\u290C","❲":"\u2772","{":"{","[":"[","⦋":"\u298B","⦏":"\u298F","⦍":"\u298D","ľ":"\u013E","ļ":"\u013C","⌈":"\u2308","{":"{","л":"\u043B","⤶":"\u2936","“":"\u201C","„":"\u201E","⥧":"\u2967","⥋":"\u294B","↲":"\u21B2","≤":"\u2264","←":"\u2190","↢":"\u21A2","↽":"\u21BD","↼":"\u21BC","⇇":"\u21C7","↔":"\u2194","⇆":"\u21C6","⇋":"\u21CB","↭":"\u21AD","⋋":"\u22CB","⋚":"\u22DA","≤":"\u2264","≦":"\u2266","⩽":"\u2A7D","⩽":"\u2A7D","⪨":"\u2AA8","⩿":"\u2A7F","⪁":"\u2A81","⪃":"\u2A83","⋚︀":"\u22DA\uFE00","⪓":"\u2A93","⪅":"\u2A85","⋖":"\u22D6","⋚":"\u22DA","⪋":"\u2A8B","≶":"\u2276","≲":"\u2272","⥼":"\u297C","⌊":"\u230A","𝔩":"\u{1D529}","≶":"\u2276","⪑":"\u2A91","↽":"\u21BD","↼":"\u21BC","⥪":"\u296A","▄":"\u2584","љ":"\u0459","≪":"\u226A","⇇":"\u21C7","⌞":"\u231E","⥫":"\u296B","◺":"\u25FA","ŀ":"\u0140","⎰":"\u23B0","⎰":"\u23B0","≨":"\u2268","⪉":"\u2A89","⪉":"\u2A89","⪇":"\u2A87","⪇":"\u2A87","≨":"\u2268","⋦":"\u22E6","⟬":"\u27EC","⇽":"\u21FD","⟦":"\u27E6","⟵":"\u27F5","⟷":"\u27F7","⟼":"\u27FC","⟶":"\u27F6","↫":"\u21AB","↬":"\u21AC","⦅":"\u2985","𝕝":"\u{1D55D}","⨭":"\u2A2D","⨴":"\u2A34","∗":"\u2217","_":"_","◊":"\u25CA","◊":"\u25CA","⧫":"\u29EB","(":"(","⦓":"\u2993","⇆":"\u21C6","⌟":"\u231F","⇋":"\u21CB","⥭":"\u296D","‎":"\u200E","⊿":"\u22BF","‹":"\u2039","𝓁":"\u{1D4C1}","↰":"\u21B0","≲":"\u2272","⪍":"\u2A8D","⪏":"\u2A8F","[":"[","‘":"\u2018","‚":"\u201A","ł":"\u0142","<":"<","<":"<","⪦":"\u2AA6","⩹":"\u2A79","⋖":"\u22D6","⋋":"\u22CB","⋉":"\u22C9","⥶":"\u2976","⩻":"\u2A7B","⦖":"\u2996","◃":"\u25C3","⊴":"\u22B4","◂":"\u25C2","⥊":"\u294A","⥦":"\u2966","≨︀":"\u2268\uFE00","≨︀":"\u2268\uFE00","∺":"\u223A","¯":"\xAF","¯":"\xAF","♂":"\u2642","✠":"\u2720","✠":"\u2720","↦":"\u21A6","↦":"\u21A6","↧":"\u21A7","↤":"\u21A4","↥":"\u21A5","▮":"\u25AE","⨩":"\u2A29","м":"\u043C","—":"\u2014","∡":"\u2221","𝔪":"\u{1D52A}","℧":"\u2127","µ":"\xB5","µ":"\xB5","∣":"\u2223","*":"*","⫰":"\u2AF0","·":"\xB7","·":"\xB7","−":"\u2212","⊟":"\u229F","∸":"\u2238","⨪":"\u2A2A","⫛":"\u2ADB","…":"\u2026","∓":"\u2213","⊧":"\u22A7","𝕞":"\u{1D55E}","∓":"\u2213","𝓂":"\u{1D4C2}","∾":"\u223E","μ":"\u03BC","⊸":"\u22B8","⊸":"\u22B8","⋙̸":"\u22D9\u0338","≫⃒":"\u226B\u20D2","≫̸":"\u226B\u0338","⇍":"\u21CD","⇎":"\u21CE","⋘̸":"\u22D8\u0338","≪⃒":"\u226A\u20D2","≪̸":"\u226A\u0338","⇏":"\u21CF","⊯":"\u22AF","⊮":"\u22AE","∇":"\u2207","ń":"\u0144","∠⃒":"\u2220\u20D2","≉":"\u2249","⩰̸":"\u2A70\u0338","≋̸":"\u224B\u0338","ʼn":"\u0149","≉":"\u2249","♮":"\u266E","♮":"\u266E","ℕ":"\u2115"," ":"\xA0"," ":"\xA0","≎̸":"\u224E\u0338","≏̸":"\u224F\u0338","⩃":"\u2A43","ň":"\u0148","ņ":"\u0146","≇":"\u2247","⩭̸":"\u2A6D\u0338","⩂":"\u2A42","н":"\u043D","–":"\u2013","≠":"\u2260","⇗":"\u21D7","⤤":"\u2924","↗":"\u2197","↗":"\u2197","≐̸":"\u2250\u0338","≢":"\u2262","⤨":"\u2928","≂̸":"\u2242\u0338","∄":"\u2204","∄":"\u2204","𝔫":"\u{1D52B}","≧̸":"\u2267\u0338","≱":"\u2271","≱":"\u2271","≧̸":"\u2267\u0338","⩾̸":"\u2A7E\u0338","⩾̸":"\u2A7E\u0338","≵":"\u2275","≯":"\u226F","≯":"\u226F","⇎":"\u21CE","↮":"\u21AE","⫲":"\u2AF2","∋":"\u220B","⋼":"\u22FC","⋺":"\u22FA","∋":"\u220B","њ":"\u045A","⇍":"\u21CD","≦̸":"\u2266\u0338","↚":"\u219A","‥":"\u2025","≰":"\u2270","↚":"\u219A","↮":"\u21AE","≰":"\u2270","≦̸":"\u2266\u0338","⩽̸":"\u2A7D\u0338","⩽̸":"\u2A7D\u0338","≮":"\u226E","≴":"\u2274","≮":"\u226E","⋪":"\u22EA","⋬":"\u22EC","∤":"\u2224","𝕟":"\u{1D55F}","¬":"\xAC","¬":"\xAC","∉":"\u2209","⋹̸":"\u22F9\u0338","⋵̸":"\u22F5\u0338","∉":"\u2209","⋷":"\u22F7","⋶":"\u22F6","∌":"\u220C","∌":"\u220C","⋾":"\u22FE","⋽":"\u22FD","∦":"\u2226","∦":"\u2226","⫽⃥":"\u2AFD\u20E5","∂̸":"\u2202\u0338","⨔":"\u2A14","⊀":"\u2280","⋠":"\u22E0","⪯̸":"\u2AAF\u0338","⊀":"\u2280","⪯̸":"\u2AAF\u0338","⇏":"\u21CF","↛":"\u219B","⤳̸":"\u2933\u0338","↝̸":"\u219D\u0338","↛":"\u219B","⋫":"\u22EB","⋭":"\u22ED","⊁":"\u2281","⋡":"\u22E1","⪰̸":"\u2AB0\u0338","𝓃":"\u{1D4C3}","∤":"\u2224","∦":"\u2226","≁":"\u2241","≄":"\u2244","≄":"\u2244","∤":"\u2224","∦":"\u2226","⋢":"\u22E2","⋣":"\u22E3","⊄":"\u2284","⫅̸":"\u2AC5\u0338","⊈":"\u2288","⊂⃒":"\u2282\u20D2","⊈":"\u2288","⫅̸":"\u2AC5\u0338","⊁":"\u2281","⪰̸":"\u2AB0\u0338","⊅":"\u2285","⫆̸":"\u2AC6\u0338","⊉":"\u2289","⊃⃒":"\u2283\u20D2","⊉":"\u2289","⫆̸":"\u2AC6\u0338","≹":"\u2279","ñ":"\xF1","ñ":"\xF1","≸":"\u2278","⋪":"\u22EA","⋬":"\u22EC","⋫":"\u22EB","⋭":"\u22ED","ν":"\u03BD","#":"#","№":"\u2116"," ":"\u2007","⊭":"\u22AD","⤄":"\u2904","≍⃒":"\u224D\u20D2","⊬":"\u22AC","≥⃒":"\u2265\u20D2",">⃒":">\u20D2","⧞":"\u29DE","⤂":"\u2902","≤⃒":"\u2264\u20D2","<⃒":"<\u20D2","⊴⃒":"\u22B4\u20D2","⤃":"\u2903","⊵⃒":"\u22B5\u20D2","∼⃒":"\u223C\u20D2","⇖":"\u21D6","⤣":"\u2923","↖":"\u2196","↖":"\u2196","⤧":"\u2927","Ⓢ":"\u24C8","ó":"\xF3","ó":"\xF3","⊛":"\u229B","⊚":"\u229A","ô":"\xF4","ô":"\xF4","о":"\u043E","⊝":"\u229D","ő":"\u0151","⨸":"\u2A38","⊙":"\u2299","⦼":"\u29BC","œ":"\u0153","⦿":"\u29BF","𝔬":"\u{1D52C}","˛":"\u02DB","ò":"\xF2","ò":"\xF2","⧁":"\u29C1","⦵":"\u29B5","Ω":"\u03A9","∮":"\u222E","↺":"\u21BA","⦾":"\u29BE","⦻":"\u29BB","‾":"\u203E","⧀":"\u29C0","ō":"\u014D","ω":"\u03C9","ο":"\u03BF","⦶":"\u29B6","⊖":"\u2296","𝕠":"\u{1D560}","⦷":"\u29B7","⦹":"\u29B9","⊕":"\u2295","∨":"\u2228","↻":"\u21BB","⩝":"\u2A5D","ℴ":"\u2134","ℴ":"\u2134","ª":"\xAA","ª":"\xAA","º":"\xBA","º":"\xBA","⊶":"\u22B6","⩖":"\u2A56","⩗":"\u2A57","⩛":"\u2A5B","ℴ":"\u2134","ø":"\xF8","ø":"\xF8","⊘":"\u2298","õ":"\xF5","õ":"\xF5","⊗":"\u2297","⨶":"\u2A36","ö":"\xF6","ö":"\xF6","⌽":"\u233D","∥":"\u2225","¶":"\xB6","¶":"\xB6","∥":"\u2225","⫳":"\u2AF3","⫽":"\u2AFD","∂":"\u2202","п":"\u043F","%":"%",".":".","‰":"\u2030","⊥":"\u22A5","‱":"\u2031","𝔭":"\u{1D52D}","φ":"\u03C6","ϕ":"\u03D5","ℳ":"\u2133","☎":"\u260E","π":"\u03C0","⋔":"\u22D4","ϖ":"\u03D6","ℏ":"\u210F","ℎ":"\u210E","ℏ":"\u210F","+":"+","⨣":"\u2A23","⊞":"\u229E","⨢":"\u2A22","∔":"\u2214","⨥":"\u2A25","⩲":"\u2A72","±":"\xB1","±":"\xB1","⨦":"\u2A26","⨧":"\u2A27","±":"\xB1","⨕":"\u2A15","𝕡":"\u{1D561}","£":"\xA3","£":"\xA3","≺":"\u227A","⪳":"\u2AB3","⪷":"\u2AB7","≼":"\u227C","⪯":"\u2AAF","≺":"\u227A","⪷":"\u2AB7","≼":"\u227C","⪯":"\u2AAF","⪹":"\u2AB9","⪵":"\u2AB5","⋨":"\u22E8","≾":"\u227E","′":"\u2032","ℙ":"\u2119","⪵":"\u2AB5","⪹":"\u2AB9","⋨":"\u22E8","∏":"\u220F","⌮":"\u232E","⌒":"\u2312","⌓":"\u2313","∝":"\u221D","∝":"\u221D","≾":"\u227E","⊰":"\u22B0","𝓅":"\u{1D4C5}","ψ":"\u03C8"," ":"\u2008","𝔮":"\u{1D52E}","⨌":"\u2A0C","𝕢":"\u{1D562}","⁗":"\u2057","𝓆":"\u{1D4C6}","ℍ":"\u210D","⨖":"\u2A16","?":"?","≟":"\u225F",""":'"',""":'"',"⇛":"\u21DB","⇒":"\u21D2","⤜":"\u291C","⤏":"\u290F","⥤":"\u2964","∽̱":"\u223D\u0331","ŕ":"\u0155","√":"\u221A","⦳":"\u29B3","⟩":"\u27E9","⦒":"\u2992","⦥":"\u29A5","⟩":"\u27E9","»":"\xBB","»":"\xBB","→":"\u2192","⥵":"\u2975","⇥":"\u21E5","⤠":"\u2920","⤳":"\u2933","⤞":"\u291E","↪":"\u21AA","↬":"\u21AC","⥅":"\u2945","⥴":"\u2974","↣":"\u21A3","↝":"\u219D","⤚":"\u291A","∶":"\u2236","ℚ":"\u211A","⤍":"\u290D","❳":"\u2773","}":"}","]":"]","⦌":"\u298C","⦎":"\u298E","⦐":"\u2990","ř":"\u0159","ŗ":"\u0157","⌉":"\u2309","}":"}","р":"\u0440","⤷":"\u2937","⥩":"\u2969","”":"\u201D","”":"\u201D","↳":"\u21B3","ℜ":"\u211C","ℛ":"\u211B","ℜ":"\u211C","ℝ":"\u211D","▭":"\u25AD","®":"\xAE","®":"\xAE","⥽":"\u297D","⌋":"\u230B","𝔯":"\u{1D52F}","⇁":"\u21C1","⇀":"\u21C0","⥬":"\u296C","ρ":"\u03C1","ϱ":"\u03F1","→":"\u2192","↣":"\u21A3","⇁":"\u21C1","⇀":"\u21C0","⇄":"\u21C4","⇌":"\u21CC","⇉":"\u21C9","↝":"\u219D","⋌":"\u22CC","˚":"\u02DA","≓":"\u2253","⇄":"\u21C4","⇌":"\u21CC","‏":"\u200F","⎱":"\u23B1","⎱":"\u23B1","⫮":"\u2AEE","⟭":"\u27ED","⇾":"\u21FE","⟧":"\u27E7","⦆":"\u2986","𝕣":"\u{1D563}","⨮":"\u2A2E","⨵":"\u2A35",")":")","⦔":"\u2994","⨒":"\u2A12","⇉":"\u21C9","›":"\u203A","𝓇":"\u{1D4C7}","↱":"\u21B1","]":"]","’":"\u2019","’":"\u2019","⋌":"\u22CC","⋊":"\u22CA","▹":"\u25B9","⊵":"\u22B5","▸":"\u25B8","⧎":"\u29CE","⥨":"\u2968","℞":"\u211E","ś":"\u015B","‚":"\u201A","≻":"\u227B","⪴":"\u2AB4","⪸":"\u2AB8","š":"\u0161","≽":"\u227D","⪰":"\u2AB0","ş":"\u015F","ŝ":"\u015D","⪶":"\u2AB6","⪺":"\u2ABA","⋩":"\u22E9","⨓":"\u2A13","≿":"\u227F","с":"\u0441","⋅":"\u22C5","⊡":"\u22A1","⩦":"\u2A66","⇘":"\u21D8","⤥":"\u2925","↘":"\u2198","↘":"\u2198","§":"\xA7","§":"\xA7",";":";","⤩":"\u2929","∖":"\u2216","∖":"\u2216","✶":"\u2736","𝔰":"\u{1D530}","⌢":"\u2322","♯":"\u266F","щ":"\u0449","ш":"\u0448","∣":"\u2223","∥":"\u2225","­":"\xAD","­":"\xAD","σ":"\u03C3","ς":"\u03C2","ς":"\u03C2","∼":"\u223C","⩪":"\u2A6A","≃":"\u2243","≃":"\u2243","⪞":"\u2A9E","⪠":"\u2AA0","⪝":"\u2A9D","⪟":"\u2A9F","≆":"\u2246","⨤":"\u2A24","⥲":"\u2972","←":"\u2190","∖":"\u2216","⨳":"\u2A33","⧤":"\u29E4","∣":"\u2223","⌣":"\u2323","⪪":"\u2AAA","⪬":"\u2AAC","⪬︀":"\u2AAC\uFE00","ь":"\u044C","/":"/","⧄":"\u29C4","⌿":"\u233F","𝕤":"\u{1D564}","♠":"\u2660","♠":"\u2660","∥":"\u2225","⊓":"\u2293","⊓︀":"\u2293\uFE00","⊔":"\u2294","⊔︀":"\u2294\uFE00","⊏":"\u228F","⊑":"\u2291","⊏":"\u228F","⊑":"\u2291","⊐":"\u2290","⊒":"\u2292","⊐":"\u2290","⊒":"\u2292","□":"\u25A1","□":"\u25A1","▪":"\u25AA","▪":"\u25AA","→":"\u2192","𝓈":"\u{1D4C8}","∖":"\u2216","⌣":"\u2323","⋆":"\u22C6","☆":"\u2606","★":"\u2605","ϵ":"\u03F5","ϕ":"\u03D5","¯":"\xAF","⊂":"\u2282","⫅":"\u2AC5","⪽":"\u2ABD","⊆":"\u2286","⫃":"\u2AC3","⫁":"\u2AC1","⫋":"\u2ACB","⊊":"\u228A","⪿":"\u2ABF","⥹":"\u2979","⊂":"\u2282","⊆":"\u2286","⫅":"\u2AC5","⊊":"\u228A","⫋":"\u2ACB","⫇":"\u2AC7","⫕":"\u2AD5","⫓":"\u2AD3","≻":"\u227B","⪸":"\u2AB8","≽":"\u227D","⪰":"\u2AB0","⪺":"\u2ABA","⪶":"\u2AB6","⋩":"\u22E9","≿":"\u227F","∑":"\u2211","♪":"\u266A","¹":"\xB9","¹":"\xB9","²":"\xB2","²":"\xB2","³":"\xB3","³":"\xB3","⊃":"\u2283","⫆":"\u2AC6","⪾":"\u2ABE","⫘":"\u2AD8","⊇":"\u2287","⫄":"\u2AC4","⟉":"\u27C9","⫗":"\u2AD7","⥻":"\u297B","⫂":"\u2AC2","⫌":"\u2ACC","⊋":"\u228B","⫀":"\u2AC0","⊃":"\u2283","⊇":"\u2287","⫆":"\u2AC6","⊋":"\u228B","⫌":"\u2ACC","⫈":"\u2AC8","⫔":"\u2AD4","⫖":"\u2AD6","⇙":"\u21D9","⤦":"\u2926","↙":"\u2199","↙":"\u2199","⤪":"\u292A","ß":"\xDF","ß":"\xDF","⌖":"\u2316","τ":"\u03C4","⎴":"\u23B4","ť":"\u0165","ţ":"\u0163","т":"\u0442","⃛":"\u20DB","⌕":"\u2315","𝔱":"\u{1D531}","∴":"\u2234","∴":"\u2234","θ":"\u03B8","ϑ":"\u03D1","ϑ":"\u03D1","≈":"\u2248","∼":"\u223C"," ":"\u2009","≈":"\u2248","∼":"\u223C","þ":"\xFE","þ":"\xFE","˜":"\u02DC","×":"\xD7","×":"\xD7","⊠":"\u22A0","⨱":"\u2A31","⨰":"\u2A30","∭":"\u222D","⤨":"\u2928","⊤":"\u22A4","⌶":"\u2336","⫱":"\u2AF1","𝕥":"\u{1D565}","⫚":"\u2ADA","⤩":"\u2929","‴":"\u2034","™":"\u2122","▵":"\u25B5","▿":"\u25BF","◃":"\u25C3","⊴":"\u22B4","≜":"\u225C","▹":"\u25B9","⊵":"\u22B5","◬":"\u25EC","≜":"\u225C","⨺":"\u2A3A","⨹":"\u2A39","⧍":"\u29CD","⨻":"\u2A3B","⏢":"\u23E2","𝓉":"\u{1D4C9}","ц":"\u0446","ћ":"\u045B","ŧ":"\u0167","≬":"\u226C","↞":"\u219E","↠":"\u21A0","⇑":"\u21D1","⥣":"\u2963","ú":"\xFA","ú":"\xFA","↑":"\u2191","ў":"\u045E","ŭ":"\u016D","û":"\xFB","û":"\xFB","у":"\u0443","⇅":"\u21C5","ű":"\u0171","⥮":"\u296E","⥾":"\u297E","𝔲":"\u{1D532}","ù":"\xF9","ù":"\xF9","↿":"\u21BF","↾":"\u21BE","▀":"\u2580","⌜":"\u231C","⌜":"\u231C","⌏":"\u230F","◸":"\u25F8","ū":"\u016B","¨":"\xA8","¨":"\xA8","ų":"\u0173","𝕦":"\u{1D566}","↑":"\u2191","↕":"\u2195","↿":"\u21BF","↾":"\u21BE","⊎":"\u228E","υ":"\u03C5","ϒ":"\u03D2","υ":"\u03C5","⇈":"\u21C8","⌝":"\u231D","⌝":"\u231D","⌎":"\u230E","ů":"\u016F","◹":"\u25F9","𝓊":"\u{1D4CA}","⋰":"\u22F0","ũ":"\u0169","▵":"\u25B5","▴":"\u25B4","⇈":"\u21C8","ü":"\xFC","ü":"\xFC","⦧":"\u29A7","⇕":"\u21D5","⫨":"\u2AE8","⫩":"\u2AE9","⊨":"\u22A8","⦜":"\u299C","ϵ":"\u03F5","ϰ":"\u03F0","∅":"\u2205","ϕ":"\u03D5","ϖ":"\u03D6","∝":"\u221D","↕":"\u2195","ϱ":"\u03F1","ς":"\u03C2","⊊︀":"\u228A\uFE00","⫋︀":"\u2ACB\uFE00","⊋︀":"\u228B\uFE00","⫌︀":"\u2ACC\uFE00","ϑ":"\u03D1","⊲":"\u22B2","⊳":"\u22B3","в":"\u0432","⊢":"\u22A2","∨":"\u2228","⊻":"\u22BB","≚":"\u225A","⋮":"\u22EE","|":"|","|":"|","𝔳":"\u{1D533}","⊲":"\u22B2","⊂⃒":"\u2282\u20D2","⊃⃒":"\u2283\u20D2","𝕧":"\u{1D567}","∝":"\u221D","⊳":"\u22B3","𝓋":"\u{1D4CB}","⫋︀":"\u2ACB\uFE00","⊊︀":"\u228A\uFE00","⫌︀":"\u2ACC\uFE00","⊋︀":"\u228B\uFE00","⦚":"\u299A","ŵ":"\u0175","⩟":"\u2A5F","∧":"\u2227","≙":"\u2259","℘":"\u2118","𝔴":"\u{1D534}","𝕨":"\u{1D568}","℘":"\u2118","≀":"\u2240","≀":"\u2240","𝓌":"\u{1D4CC}","⋂":"\u22C2","◯":"\u25EF","⋃":"\u22C3","▽":"\u25BD","𝔵":"\u{1D535}","⟺":"\u27FA","⟷":"\u27F7","ξ":"\u03BE","⟸":"\u27F8","⟵":"\u27F5","⟼":"\u27FC","⋻":"\u22FB","⨀":"\u2A00","𝕩":"\u{1D569}","⨁":"\u2A01","⨂":"\u2A02","⟹":"\u27F9","⟶":"\u27F6","𝓍":"\u{1D4CD}","⨆":"\u2A06","⨄":"\u2A04","△":"\u25B3","⋁":"\u22C1","⋀":"\u22C0","ý":"\xFD","ý":"\xFD","я":"\u044F","ŷ":"\u0177","ы":"\u044B","¥":"\xA5","¥":"\xA5","𝔶":"\u{1D536}","ї":"\u0457","𝕪":"\u{1D56A}","𝓎":"\u{1D4CE}","ю":"\u044E","ÿ":"\xFF","ÿ":"\xFF","ź":"\u017A","ž":"\u017E","з":"\u0437","ż":"\u017C","ℨ":"\u2128","ζ":"\u03B6","𝔷":"\u{1D537}","ж":"\u0436","⇝":"\u21DD","𝕫":"\u{1D56B}","𝓏":"\u{1D4CF}","‍":"\u200D","‌":"\u200C"},Ni=$d;function Hd(e){return e.replace(/&(#\d+|#x[a-f0-9]+|[a-z]+\d*);?/gi,(t,o)=>{if(typeof Ni[t]=="string")return Ni[t];if(o.charAt(0)!=="#"||t.charAt(t.length-1)!==";")return t;let i;o.charAt(1)==="x"?i=parseInt(o.substr(2),16):i=parseInt(o.substr(1),10);let r="";return i>=55296&&i<=57343||i>1114111?"\uFFFD":(i>65535&&(i-=65536,r+=String.fromCharCode(i>>>10&1023|55296),i=56320|i&1023),r+=String.fromCharCode(i),r)})}function yt(e){return e.trim().replace(/[<>"'?&]/g,t=>{let o=t.charCodeAt(0).toString(16);return o.length<2&&(o="0"+o),"&#x"+o.toUpperCase()+";"})}function En(e){return"<div>"+yt(e).replace(/\n/g,"<br />")+"</div>"}function Tn(e){return e=e.replace(/\r?\n/g,"").replace(/<\!\-\-.*?\-\->/gi," ").replace(/<br\b[^>]*>/gi,`
|
|
163
247
|
`).replace(/<\/?(p|div|table|tr|td|th)\b[^>]*>/gi,`
|
|
164
248
|
|
|
165
249
|
`).replace(/<script\b[^>]*>.*?<\/script\b[^>]*>/gi," ").replace(/^.*<body\b[^>]*>/i,"").replace(/^.*<\/head\b[^>]*>/i,"").replace(/^.*<\!doctype\b[^>]*>/i,"").replace(/<\/body\b[^>]*>.*$/i,"").replace(/<\/html\b[^>]*>.*$/i,"").replace(/<a\b[^>]*href\s*=\s*["']?([^\s"']+)[^>]*>/gi," ($1) ").replace(/<\/?(span|em|i|strong|b|u|a)\b[^>]*>/gi,"").replace(/<li\b[^>]*>[\n\u0001\s]*/gi,"* ").replace(/<hr\b[^>]*>/g,`
|
|
@@ -169,60 +253,60 @@ ${a}
|
|
|
169
253
|
|
|
170
254
|
`).replace(/^\n+/,`
|
|
171
255
|
`).replace(/\n+$/,`
|
|
172
|
-
`),e=
|
|
173
|
-
`)}return
|
|
174
|
-
${
|
|
256
|
+
`),e=Hd(e),e}function On(e){return[].concat(e.name||[]).concat(e.name?`<${e.address}>`:e.address).join(" ")}function qi(e){let t=[],o=(i,r)=>{if(r&&t.push(", "),i.group){let n=`${i.name}:`,s=";";t.push(n),i.group.forEach(o),t.push(s)}else t.push(On(i))};return e.forEach(o),t.join("")}function jn(e){return`<a href="mailto:${yt(e.address)}" class="postal-email-address">${yt(e.name||`<${e.address}>`)}</a>`}function Mi(e){let t=[],o=(i,r)=>{if(r&&t.push('<span class="postal-email-address-separator">, </span>'),i.group){let n=`<span class="postal-email-address-group">${yt(i.name)}:</span>`,s='<span class="postal-email-address-group">;</span>';t.push(n),i.group.forEach(o),t.push(s)}else t.push(jn(i))};return e.forEach(o),t.join(" ")}function Qd(e,t,o){e=(e||"").toString(),t=t||76;let i=0,r=e.length,n="",s,a;for(;i<r;){if(s=e.substr(i,t),s.length<t){n+=s;break}if(a=s.match(/^[^\n\r]*(\r?\n|\r)/)){s=a[0],n+=s,i+=s.length;continue}else(a=s.match(/(\s+)[^\s]*$/))&&a[0].length-(o?(a[1]||"").length:0)<s.length?s=s.substr(0,s.length-(a[0].length-(o?(a[1]||"").length:0))):(a=e.substr(i+s.length).match(/^[^\s]+(\s*)/))&&(s=s+a[0].substr(0,a[0].length-(o?0:(a[1]||"").length)));n+=s,i+=s.length,i<r&&(n+=`\r
|
|
257
|
+
`)}return n}function Li(e){let t=[];if(e.from&&t.push({key:"From",val:On(e.from)}),e.subject&&t.push({key:"Subject",val:e.subject}),e.date){let s={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1},a=typeof Intl>"u"?e.date:new Intl.DateTimeFormat("default",s).format(new Date(e.date));t.push({key:"Date",val:a})}e.to&&e.to.length&&t.push({key:"To",val:qi(e.to)}),e.cc&&e.cc.length&&t.push({key:"Cc",val:qi(e.cc)}),e.bcc&&e.bcc.length&&t.push({key:"Bcc",val:qi(e.bcc)});let o=t.map(s=>s.key.length).reduce((s,a)=>a>s?a:s,0);t=t.flatMap(s=>{let a=o-s.key.length,l=`${s.key}: ${" ".repeat(a)}`,d=`${" ".repeat(s.key.length+1)} ${" ".repeat(a)}`;return Qd(s.val,80,!0).split(/\r?\n/).map(u=>u.trim()).map((u,m)=>`${m?d:l}${u}`)});let i=t.map(s=>s.length).reduce((s,a)=>a>s?a:s,0),r="-".repeat(i);return`
|
|
258
|
+
${r}
|
|
175
259
|
${t.join(`
|
|
176
260
|
`)}
|
|
177
|
-
${
|
|
178
|
-
`}function
|
|
179
|
-
<div class="postal-email-header-row">`)}${t.length?"</div>":""}</div>`}function
|
|
180
|
-
`,",",";"].includes(
|
|
181
|
-
`&&(t=" "),(t.charCodeAt(0)>=33||[" "," "].includes(t))&&(this.node.value+=t),this.escaped=!1}},
|
|
261
|
+
${r}
|
|
262
|
+
`}function Wi(e){let t=[];if(e.from&&t.push(`<div class="postal-email-header-key">From</div><div class="postal-email-header-value">${jn(e.from)}</div>`),e.subject&&t.push(`<div class="postal-email-header-key">Subject</div><div class="postal-email-header-value postal-email-header-subject">${yt(e.subject)}</div>`),e.date){let i={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1},r=typeof Intl>"u"?e.date:new Intl.DateTimeFormat("default",i).format(new Date(e.date));t.push(`<div class="postal-email-header-key">Date</div><div class="postal-email-header-value postal-email-header-date" data-date="${yt(e.date)}">${yt(r)}</div>`)}return e.to&&e.to.length&&t.push(`<div class="postal-email-header-key">To</div><div class="postal-email-header-value">${Mi(e.to)}</div>`),e.cc&&e.cc.length&&t.push(`<div class="postal-email-header-key">Cc</div><div class="postal-email-header-value">${Mi(e.cc)}</div>`),e.bcc&&e.bcc.length&&t.push(`<div class="postal-email-header-key">Bcc</div><div class="postal-email-header-value">${Mi(e.bcc)}</div>`),`<div class="postal-email-header">${t.length?'<div class="postal-email-header-row">':""}${t.join(`</div>
|
|
263
|
+
<div class="postal-email-header-row">`)}${t.length?"</div>":""}</div>`}function Gd(e,t){let o=!1,i="text",r,n=[],s={address:[],comment:[],group:[],text:[],textWasQuoted:[]},a,l,d=!1;for(a=0,l=e.length;a<l;a++){let c=e[a],u=a?e[a-1]:null;if(c.type==="operator")switch(c.value){case"<":i="address",d=!1;break;case"(":i="comment",d=!1;break;case":":i="group",o=!0,d=!1;break;case'"':d=!d,i="text";break;default:i="text",d=!1;break}else c.value&&(i==="address"&&(c.value=c.value.replace(/^[^<]*<\s*/,"")),u&&u.noBreak&&s[i].length?(s[i][s[i].length-1]+=c.value,i==="text"&&d&&(s.textWasQuoted[s.textWasQuoted.length-1]=!0)):(s[i].push(c.value),i==="text"&&s.textWasQuoted.push(d)))}if(!s.text.length&&s.comment.length&&(s.text=s.comment,s.comment=[]),o){s.text=s.text.join(" ");let c=[];s.group.length&&Vi(s.group.join(","),{_depth:t+1}).forEach(m=>{m.group?c=c.concat(m.group):c.push(m)}),n.push({name:Ct(s.text||r&&r.name),group:c})}else{if(!s.address.length&&s.text.length){for(a=s.text.length-1;a>=0;a--)if(!s.textWasQuoted[a]&&s.text[a].match(/^[^@\s]+@[^@\s]+$/)){s.address=s.text.splice(a,1),s.textWasQuoted.splice(a,1);break}let c=function(u){return s.address.length?u:(s.address=[u.trim()]," ")};if(!s.address.length)for(a=s.text.length-1;a>=0&&!(!s.textWasQuoted[a]&&(s.text[a]=s.text[a].replace(/\s*\b[^@\s]+@[^\s]+\b\s*/,c).trim(),s.address.length));a--);}if(!s.text.length&&s.comment.length&&(s.text=s.comment,s.comment=[]),s.address.length>1&&(s.text=s.text.concat(s.address.splice(1))),s.text=s.text.join(" "),s.address=s.address.join(" "),!s.address&&/^=\?[^=]+?=$/.test(s.text.trim())){let c=Ct(s.text);if(/<[^<>]+@[^<>]+>/.test(c)){let u=Vi(c);if(u&&u.length)return u}return[{address:"",name:c}]}r={address:s.address||s.text||"",name:Ct(s.text||s.address||"")},r.address===r.name&&((r.address||"").match(/@/)?r.name="":r.address=""),n.push(r)}return n}var Ji=class{constructor(t){this.str=(t||"").toString(),this.operatorCurrent="",this.operatorExpecting="",this.node=null,this.escaped=!1,this.list=[],this.operators={'"':'"',"(":")","<":">",",":"",":":";",";":""}}tokenize(){let t=[];for(let o=0,i=this.str.length;o<i;o++){let r=this.str.charAt(o),n=o<i-1?this.str.charAt(o+1):null;this.checkChar(r,n)}return this.list.forEach(o=>{o.value=(o.value||"").toString().trim(),o.value&&t.push(o)}),t}checkChar(t,o){if(!this.escaped){if(t===this.operatorExpecting){this.node={type:"operator",value:t},o&&![" "," ","\r",`
|
|
264
|
+
`,",",";"].includes(o)&&(this.node.noBreak=!0),this.list.push(this.node),this.node=null,this.operatorExpecting="",this.escaped=!1;return}else if(!this.operatorExpecting&&t in this.operators){this.node={type:"operator",value:t},this.list.push(this.node),this.node=null,this.operatorExpecting=this.operators[t],this.escaped=!1;return}else if(this.operatorExpecting==='"'&&t==="\\"){this.escaped=!0;return}}this.node||(this.node={type:"text",value:""},this.list.push(this.node)),t===`
|
|
265
|
+
`&&(t=" "),(t.charCodeAt(0)>=33||[" "," "].includes(t))&&(this.node.value+=t),this.escaped=!1}},Nd=50;function Vi(e,t){t=t||{};let o=t._depth||0;if(o>Nd)return[];let r=new Ji(e).tokenize(),n=[],s=[],a=[];if(r.forEach(l=>{l.type==="operator"&&(l.value===","||l.value===";")?(s.length&&n.push(s),s=[]):s.push(l)}),s.length&&n.push(s),n.forEach(l=>{l=Gd(l,o),l.length&&(a=a.concat(l))}),t.flatten){let l=[],d=c=>{c.forEach(u=>{if(u.group)return d(u.group);l.push(u)})};return d(a),l}return a}var _o=Vi;function In(e){for(var t="",o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(e),r=i.byteLength,n=r%3,s=r-n,a,l,d,c,u,m=0;m<s;m=m+3)u=i[m]<<16|i[m+1]<<8|i[m+2],a=(u&16515072)>>18,l=(u&258048)>>12,d=(u&4032)>>6,c=u&63,t+=o[a]+o[l]+o[d]+o[c];return n==1?(u=i[s],a=(u&252)>>2,l=(u&3)<<4,t+=o[a]+o[l]+"=="):n==2&&(u=i[s]<<8|i[s+1],a=(u&64512)>>10,l=(u&1008)>>4,d=(u&15)<<2,t+=o[a]+o[l]+o[d]+"="),t}var qd=256,Md=2*1024*1024;function zi(e){return e.replace(/-(.)/g,(t,o)=>o.toUpperCase())}var oo=class e{static parse(t,o){return new e(o).parse(t)}constructor(t){this.options=t||{},this.mimeOptions={maxNestingDepth:this.options.maxNestingDepth||qd,maxHeadersSize:this.options.maxHeadersSize||Md},this.root=this.currentNode=new xt({postalMime:this,...this.mimeOptions}),this.boundaries=[],this.textContent={},this.attachments=[],this.attachmentEncoding=(this.options.attachmentEncoding||"").toString().replace(/[-_\s]/g,"").trim().toLowerCase()||"arraybuffer",this.started=!1}async finalize(){await this.root.finalize()}async processLine(t,o){let i=this.boundaries;if(i.length&&t.length>2&&t[0]===45&&t[1]===45)for(let r=i.length-1;r>=0;r--){let n=i[r];if(t.length<n.value.length+2)continue;let s=!0;for(let c=0;c<n.value.length;c++)if(t[c+2]!==n.value[c]){s=!1;break}if(!s)continue;let a=n.value.length+2,l=!1;t.length>=n.value.length+4&&t[n.value.length+2]===45&&t[n.value.length+3]===45&&(l=!0,a=n.value.length+4);let d=!0;for(let c=a;c<t.length;c++)if(t[c]!==32&&t[c]!==9){d=!1;break}if(d)return l?(await n.node.finalize(),this.currentNode=n.node.parentNode||this.root):(await n.node.finalizeChildNodes(),this.currentNode=new xt({postalMime:this,parentNode:n.node,parentMultipartType:n.node.contentType.multipart,...this.mimeOptions})),o?this.finalize():void 0}if(this.currentNode.feed(t),o)return this.finalize()}readLine(){let t=this.readPos,o=this.readPos;for(;this.readPos<this.av.length;){let i=this.av[this.readPos++];if(i!==13&&i!==10&&(o=this.readPos),i===10)return{bytes:new Uint8Array(this.buf,t,o-t),done:this.readPos>=this.av.length}}return{bytes:new Uint8Array(this.buf,t,o-t),done:this.readPos>=this.av.length}}async processNodeTree(){let t={},o=new Set,i=this.textMap=new Map,r=this.forceRfc822Attachments(),n=async(s,a,l)=>{if(a=a||!1,l=l||!1,s.contentType.multipart)s.contentType.multipart==="alternative"?a=s:s.contentType.multipart==="related"&&(l=s);else if(this.isInlineMessageRfc822(s)&&!r){let d=new e;s.subMessage=await d.parse(s.content),i.has(s)||i.set(s,{});let c=i.get(s);(s.subMessage.text||!s.subMessage.html)&&(c.plain=c.plain||[],c.plain.push({type:"subMessage",value:s.subMessage}),o.add("plain")),s.subMessage.html&&(c.html=c.html||[],c.html.push({type:"subMessage",value:s.subMessage}),o.add("html")),d.textMap&&d.textMap.forEach((u,m)=>{i.set(m,u)});for(let u of s.subMessage.attachments||[])this.attachments.push(u)}else if(this.isInlineTextNode(s)){let d=s.contentType.parsed.value.substr(s.contentType.parsed.value.indexOf("/")+1),c=a||s;i.has(c)||i.set(c,{});let u=i.get(c);u[d]=u[d]||[],u[d].push({type:"text",value:s.getTextContent()}),o.add(d)}else if(s.content){let d=s.contentDisposition?.parsed?.params?.filename||s.contentType.parsed.params.name||null,c={filename:d?Ct(d):null,mimeType:s.contentType.parsed.value,disposition:s.contentDisposition?.parsed?.value||null};switch(l&&s.contentId&&(c.related=!0),s.contentDescription&&(c.description=s.contentDescription),s.contentId&&(c.contentId=s.contentId),s.contentType.parsed.value){case"text/calendar":case"application/ics":{s.contentType.parsed.params.method&&(c.method=s.contentType.parsed.params.method.toString().toUpperCase().trim());let u=s.getTextContent().replace(/\r?\n/g,`
|
|
182
266
|
`).replace(/\n*$/,`
|
|
183
|
-
`);c.content=
|
|
184
|
-
`)}),this.textContent=t}isInlineTextNode(t){if(t.contentDisposition?.parsed?.value==="attachment")return!1;switch(t.contentType.parsed?.value){case"text/html":case"text/plain":return!0;default:return!1}}isInlineMessageRfc822(t){return t.contentType.parsed?.value!=="message/rfc822"?!1:(t.contentDisposition?.parsed?.value||(this.options.rfc822Attachments?"attachment":"inline"))==="inline"}forceRfc822Attachments(){if(this.options.forceRfc822Attachments)return!0;let t=!1,r=n=>{n.contentType.multipart||n.contentType.parsed&&["message/delivery-status","message/feedback-report"].includes(n.contentType.parsed.value)&&(t=!0);for(let o of n.childNodes)r(o)};return r(this.root),t}async resolveStream(t){let r=0,n=[],o=t.getReader();for(;;){let{done:a,value:l}=await o.read();if(a)break;n.push(l),r+=l.length}let i=new Uint8Array(r),s=0;for(let a of n)i.set(a,s),s+=a.length;return i}async parse(t){if(this.started)throw new Error("Can not reuse parser, create a new PostalMime object");for(this.started=!0,t&&typeof t.getReader=="function"&&(t=await this.resolveStream(t)),t=t||new ArrayBuffer(0),typeof t=="string"&&(t=it.encode(t)),(t instanceof Blob||Object.prototype.toString.call(t)==="[object Blob]")&&(t=await st(t)),t.buffer instanceof ArrayBuffer&&(t=new Uint8Array(t).buffer),this.buf=t,this.av=new Uint8Array(t),this.readPos=0;this.readPos<this.av.length;){let o=this.readLine();await this.processLine(o.bytes,o.done)}await this.processNodeTree();let r={headers:this.root.headers.map(o=>({key:o.key,originalKey:o.originalKey,value:o.value})).reverse()};for(let o of["from","sender"]){let i=this.root.headers.find(s=>s.key===o);if(i&&i.value){let s=Tr(i.value);s&&s.length&&(r[o]=s[0])}}for(let o of["delivered-to","return-path"]){let i=this.root.headers.find(s=>s.key===o);if(i&&i.value){let s=Tr(i.value);if(s&&s.length&&s[0].address){let a=Yn(o);r[a]=s[0].address}}}for(let o of["to","cc","bcc","reply-to"]){let i=this.root.headers.filter(a=>a.key===o),s=[];if(i.filter(a=>a&&a.value).map(a=>Tr(a.value)).forEach(a=>s=s.concat(a||[])),s&&s.length){let a=Yn(o);r[a]=s}}for(let o of["subject","message-id","in-reply-to","references"]){let i=this.root.headers.find(s=>s.key===o);if(i&&i.value){let s=Yn(o);r[s]=vt(i.value)}}let n=this.root.headers.find(o=>o.key==="date");if(n){let o=new Date(n.value);o.toString()==="Invalid Date"?o=n.value:o=o.toISOString(),r.date=o}switch(this.textContent?.html&&(r.html=this.textContent.html),this.textContent?.plain&&(r.text=this.textContent.plain),r.attachments=this.attachments,r.headerLines=(this.root.rawHeaderLines||[]).slice().reverse(),this.attachmentEncoding){case"arraybuffer":break;case"base64":for(let i of r.attachments||[])i?.content&&(i.content=Ni(i.content),i.encoding="base64");break;case"utf8":let o=new TextDecoder("utf8");for(let i of r.attachments||[])i?.content&&(i.content=o.decode(i.content),i.encoding="utf8");break;default:throw new Error("Unknown attachment encoding")}return r}};var es=pe(Ki(),1),Xd="6.14.0";function ae(e){let t=new URLSearchParams;return e.limit!==void 0&&t.set("limit",e.limit.toString()),"after"in e&&e.after!==void 0&&t.set("after",e.after),"before"in e&&e.before!==void 0&&t.set("before",e.before),t.toString()}var Zd=class{constructor(e){this.resend=e}async create(e,t={}){return await this.resend.post("/api-keys",e,t)}async list(e={}){let t=ae(e),r=t?`/api-keys?${t}`:"/api-keys";return await this.resend.get(r)}async remove(e){return await this.resend.delete(`/api-keys/${e}`)}},em=class{constructor(e){this.resend=e}async get(e){return await this.resend.get(`/automations/${e.automationId}/runs/${e.runId}`)}async list(e){let t=ae(e),r=new URLSearchParams(t);if(e.status){let i=Array.isArray(e.status)?e.status.join(","):e.status;r.set("status",i)}let n=r.toString(),o=n?`/automations/${e.automationId}/runs?${n}`:`/automations/${e.automationId}/runs`;return await this.resend.get(o)}};function ts(e){switch(e.type){case"trigger":return{key:e.key,type:e.type,config:{event_name:e.config.eventName}};case"delay":return{key:e.key,type:e.type,config:e.config};case"send_email":return{key:e.key,type:e.type,config:{template:e.config.template,subject:e.config.subject,from:e.config.from,reply_to:e.config.replyTo}};case"wait_for_event":return{key:e.key,type:e.type,config:{event_name:e.config.eventName,timeout:e.config.timeout,filter_rule:e.config.filterRule}};case"condition":return{key:e.key,type:e.type,config:e.config};case"contact_update":return{key:e.key,type:e.type,config:{first_name:e.config.firstName,last_name:e.config.lastName,unsubscribed:e.config.unsubscribed,properties:e.config.properties}};case"contact_delete":return{key:e.key,type:e.type,config:e.config};case"add_to_segment":return{key:e.key,type:e.type,config:{segment_id:e.config.segmentId}}}}function rs(e){return{from:e.from,to:e.to,type:e.type}}function tm(e){return{name:e.name,status:e.status,steps:e.steps.map(ts),connections:e.connections.map(rs)}}function rm(e){return{event:e.event,contact_id:e.contactId,email:e.email,payload:e.payload}}var nm=class{constructor(e){this.resend=e,this.runs=new em(this.resend)}async create(e){return await this.resend.post("/automations",tm(e))}async list(e={}){let t=[ae(e)];e.status&&t.push(`status=${encodeURIComponent(e.status)}`);let r=t.filter(Boolean).join("&"),n=r?`/automations?${r}`:"/automations";return await this.resend.get(n)}async get(e){return await this.resend.get(`/automations/${e}`)}async remove(e){return await this.resend.delete(`/automations/${e}`)}async update(e,t){let r={};return t.name!==void 0&&(r.name=t.name),t.status!==void 0&&(r.status=t.status),t.steps!==void 0&&(r.steps=t.steps.map(ts)),t.connections!==void 0&&(r.connections=t.connections.map(rs)),await this.resend.patch(`/automations/${e}`,r)}async stop(e){return await this.resend.post(`/automations/${e}/stop`)}};function om(e){return e?.map(t=>({content:t.content,filename:t.filename,path:t.path,content_type:t.contentType,content_id:t.contentId}))}function ns(e){return{attachments:om(e.attachments),bcc:e.bcc,cc:e.cc,from:e.from,headers:e.headers,html:e.html,reply_to:e.replyTo,scheduled_at:e.scheduledAt,subject:e.subject,tags:e.tags,text:e.text,to:e.to,template:e.template?{id:e.template.id,variables:e.template.variables}:void 0,topic_id:e.topicId}}async function or(e){let t;try{({render:t}=await import("@react-email/render"))}catch{throw new Error("Failed to render React component. Make sure to install `@react-email/render` or `@react-email/components`.")}return t(e)}var im=class{constructor(e){this.resend=e}async send(e,t){return this.create(e,t)}async create(e,t){let r=[];for(let n of e)n.react&&(n.html=await or(n.react),n.react=void 0),r.push(ns(n));return await this.resend.post("/emails/batch",r,{...t,headers:{"x-batch-validation":t?.batchValidation??"strict",...t?.headers}})}},sm=class{constructor(e){this.resend=e}async create(e,t={}){let r=e.react?await or(e.react):e.html;return await this.resend.post("/broadcasts",{name:e.name,segment_id:e.segmentId,audience_id:e.audienceId,preview_text:e.previewText,from:e.from,html:r,reply_to:e.replyTo,subject:e.subject,text:e.text,topic_id:e.topicId,send:e.send,scheduled_at:e.scheduledAt},t)}async send(e,t){return await this.resend.post(`/broadcasts/${e}/send`,{scheduled_at:t?.scheduledAt})}async list(e={}){let t=ae(e),r=t?`/broadcasts?${t}`:"/broadcasts";return await this.resend.get(r)}async get(e){return await this.resend.get(`/broadcasts/${e}`)}async remove(e){return await this.resend.delete(`/broadcasts/${e}`)}async update(e,t){let r=t.react?await or(t.react):t.html;return await this.resend.patch(`/broadcasts/${e}`,{name:t.name,segment_id:t.segmentId,audience_id:t.audienceId,from:t.from,html:r,text:t.text,subject:t.subject,reply_to:t.replyTo,preview_text:t.previewText,topic_id:t.topicId})}};function zi(e){return{id:e.id,key:e.key,createdAt:e.created_at,type:e.type,fallbackValue:e.fallback_value}}function Ji(e){return"key"in e?{key:e.key,type:e.type,fallback_value:e.fallbackValue}:{fallback_value:e.fallbackValue}}var am=class{constructor(e){this.resend=e}async create(e){let t=Ji(e);return await this.resend.post("/contact-properties",t)}async list(e={}){let t=ae(e),r=t?`/contact-properties?${t}`:"/contact-properties",n=await this.resend.get(r);return n.data?{data:{...n.data,data:n.data.data.map(o=>zi(o))},headers:n.headers,error:null}:n}async get(e){if(!e)return{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}};let t=await this.resend.get(`/contact-properties/${e}`);return t.data?{data:{object:"contact_property",...zi(t.data)},headers:t.headers,error:null}:t}async update(e){if(!e.id)return{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}};let t=Ji(e);return await this.resend.patch(`/contact-properties/${e.id}`,t)}async remove(e){return e?await this.resend.delete(`/contact-properties/${e}`):{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}}}},lm=class{constructor(e){this.resend=e}async create(e,t={}){let r=this.buildCreateFormData(e);return this.resend.post("/contacts/imports",r,t)}async list(e={}){let t=new URLSearchParams(ae(e));e.status!==void 0&&t.set("status",e.status);let r=t.toString(),n=r?`/contacts/imports?${r}`:"/contacts/imports";return this.resend.get(n)}async get(e){return this.resend.get(`/contacts/imports/${e}`)}buildCreateFormData(e){let t=new FormData;return t.append("file",e.file),this.appendField(t,"column_map",this.buildColumnMap(e.columnMap??null)),this.appendField(t,"on_conflict",e.onConflict??null),this.appendField(t,"segments",e.segments??null),this.appendField(t,"topics",e.topics??null),t}buildColumnMap(e){return e===null?null:{email:e.email,first_name:e.firstName,last_name:e.lastName,unsubscribed:e.unsubscribed,properties:e.properties}}appendField(e,t,r){r!==null&&e.append(t,typeof r=="string"?r:JSON.stringify(r))}},cm=class{constructor(e){this.resend=e}async list(e){if(!e.contactId&&!e.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let t=e.email?e.email:e.contactId,r=ae(e),n=r?`/contacts/${t}/segments?${r}`:`/contacts/${t}/segments`;return await this.resend.get(n)}async add(e){if(!e.contactId&&!e.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let t=e.email?e.email:e.contactId;return this.resend.post(`/contacts/${t}/segments/${e.segmentId}`)}async remove(e){if(!e.contactId&&!e.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let t=e.email?e.email:e.contactId;return this.resend.delete(`/contacts/${t}/segments/${e.segmentId}`)}},um=class{constructor(e){this.resend=e}async update(e){if(!e.id&&!e.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let t=e.email?e.email:e.id;return this.resend.patch(`/contacts/${t}/topics`,e.topics)}async list(e){if(!e.id&&!e.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let t=e.email?e.email:e.id,r=ae(e),n=r?`/contacts/${t}/topics?${r}`:`/contacts/${t}/topics`;return this.resend.get(n)}},dm=class{constructor(e){this.resend=e,this.imports=new lm(this.resend),this.topics=new um(this.resend),this.segments=new cm(this.resend)}async create(e,t={}){return"audienceId"in e?"segments"in e||"topics"in e?{data:null,headers:null,error:{message:"`audienceId` is deprecated, and cannot be used together with `segments` or `topics`. Use `segments` instead to add one or more segments to the new contact.",statusCode:null,name:"invalid_parameter"}}:await this.resend.post(`/audiences/${e.audienceId}/contacts`,{unsubscribed:e.unsubscribed,email:e.email,first_name:e.firstName,last_name:e.lastName,properties:e.properties},t):await this.resend.post("/contacts",{unsubscribed:e.unsubscribed,email:e.email,first_name:e.firstName,last_name:e.lastName,properties:e.properties,segments:e.segments,topics:e.topics},t)}async list(e={}){let t=e.segmentId??e.audienceId;if(!t){let o=ae(e),i=o?`/contacts?${o}`:"/contacts";return await this.resend.get(i)}let r=ae(e),n=r?`/segments/${t}/contacts?${r}`:`/segments/${t}/contacts`;return await this.resend.get(n)}async get(e){return typeof e=="string"?this.resend.get(`/contacts/${e}`):!e.id&&!e.email?{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}}:e.audienceId?this.resend.get(`/audiences/${e.audienceId}/contacts/${e?.email?e?.email:e?.id}`):this.resend.get(`/contacts/${e?.email?e?.email:e?.id}`)}async update(e){return!e.id&&!e.email?{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}}:e.audienceId?await this.resend.patch(`/audiences/${e.audienceId}/contacts/${e?.email?e?.email:e?.id}`,{unsubscribed:e.unsubscribed,first_name:e.firstName,last_name:e.lastName,properties:e.properties}):await this.resend.patch(`/contacts/${e?.email?e?.email:e?.id}`,{unsubscribed:e.unsubscribed,first_name:e.firstName,last_name:e.lastName,properties:e.properties})}async remove(e){return typeof e=="string"?this.resend.delete(`/contacts/${e}`):!e.id&&!e.email?{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}}:e.audienceId?this.resend.delete(`/audiences/${e.audienceId}/contacts/${e?.email?e?.email:e?.id}`):this.resend.delete(`/contacts/${e?.email?e?.email:e?.id}`)}};function mm(e){return{name:e.name,region:e.region,custom_return_path:e.customReturnPath,capabilities:e.capabilities,open_tracking:e.openTracking,click_tracking:e.clickTracking,tls:e.tls,tracking_subdomain:e.trackingSubdomain}}var pm=class{constructor(e){this.resend=e}async create(e,t={}){return await this.resend.post("/domains/claim",{name:e.name,region:e.region,custom_return_path:e.customReturnPath,open_tracking:e.openTracking,click_tracking:e.clickTracking,tracking_subdomain:e.trackingSubdomain},t)}async get(e){return await this.resend.get(`/domains/${e}/claim`)}async verify(e){return await this.resend.post(`/domains/${e}/claim/verify`)}},fm=class{constructor(e){this.resend=e,this.claims=new pm(this.resend)}async create(e,t={}){return await this.resend.post("/domains",mm(e),t)}async list(e={}){let t=ae(e),r=t?`/domains?${t}`:"/domains";return await this.resend.get(r)}async get(e){return await this.resend.get(`/domains/${e}`)}async update(e){return await this.resend.patch(`/domains/${e.id}`,{click_tracking:e.clickTracking,open_tracking:e.openTracking,tls:e.tls,capabilities:e.capabilities,tracking_subdomain:e.trackingSubdomain})}async remove(e){return await this.resend.delete(`/domains/${e}`)}async verify(e){return await this.resend.post(`/domains/${e}/verify`)}},hm=class{constructor(e){this.resend=e}async get(e){let{emailId:t,id:r}=e;return await this.resend.get(`/emails/${t}/attachments/${r}`)}async list(e){let{emailId:t}=e,r=ae(e),n=r?`/emails/${t}/attachments?${r}`:`/emails/${t}/attachments`;return await this.resend.get(n)}},gm=class{constructor(e){this.resend=e}async get(e){let{emailId:t,id:r}=e;return await this.resend.get(`/emails/receiving/${t}/attachments/${r}`)}async list(e){let{emailId:t}=e,r=ae(e),n=r?`/emails/receiving/${t}/attachments?${r}`:`/emails/receiving/${t}/attachments`;return await this.resend.get(n)}},bm=class{constructor(e){this.resend=e,this.attachments=new gm(e)}async get(e,t={}){let r=new URLSearchParams;t.html_format!==void 0&&r.set("html_format",t.html_format);let n=r.toString(),o=n?`/emails/receiving/${e}?${n}`:`/emails/receiving/${e}`;return await this.resend.get(o)}async list(e={}){let t=ae(e),r=t?`/emails/receiving?${t}`:"/emails/receiving";return await this.resend.get(r)}async forward(e){let{emailId:t,to:r,from:n}=e,o=e.passthrough!==!1,i=await this.get(t);if(i.error)return{data:null,error:i.error,headers:i.headers};let s=i.data,a=s.subject||"(no subject)";if(o)return this.forwardPassthrough(s,{to:r,from:n,subject:a});let l=a.startsWith("Fwd:")?a:`Fwd: ${a}`;return this.forwardWrapped(s,{to:r,from:n,subject:l,text:"text"in e?e.text:void 0,html:"html"in e?e.html:void 0})}async forwardPassthrough(e,t){let{to:r,from:n,subject:o}=t;if(!e.raw?.download_url)return{data:null,error:{name:"validation_error",message:"Raw email content is not available for this email",statusCode:400},headers:null};let i=await fetch(e.raw.download_url);if(!i.ok)return{data:null,error:{name:"application_error",message:"Failed to download raw email content",statusCode:i.status},headers:null};let s=await i.text(),a=await rr.parse(s,{attachmentEncoding:"base64"}),l=a.attachments.map(d=>{let c=d.contentId?d.contentId.replace(/^<|>$/g,""):void 0;return{filename:d.filename,content:d.content.toString(),content_type:d.mimeType,content_id:c||void 0}});return await this.resend.post("/emails",{from:n,to:r,subject:o,text:a.text||void 0,html:a.html||void 0,attachments:l.length>0?l:void 0})}async forwardWrapped(e,t){let{to:r,from:n,subject:o,text:i,html:s}=t;if(!e.raw?.download_url)return{data:null,error:{name:"validation_error",message:"Raw email content is not available for this email",statusCode:400},headers:null};let a=await fetch(e.raw.download_url);if(!a.ok)return{data:null,error:{name:"application_error",message:"Failed to download raw email content",statusCode:a.status},headers:null};let l=await a.text();return await this.resend.post("/emails",{from:n,to:r,subject:o,text:i,html:s,attachments:[{filename:"forwarded_message.eml",content:Buffer.from(l).toString("base64"),content_type:"message/rfc822"}]})}},ym=class{constructor(e){this.resend=e,this.attachments=new hm(e),this.receiving=new bm(e)}async send(e,t={}){return this.create(e,t)}async create(e,t={}){let r={...e};return e.react&&(r.html=await or(e.react)),await this.resend.post("/emails",ns(r),t)}async get(e){return await this.resend.get(`/emails/${e}`)}async list(e={}){let t=ae(e),r=t?`/emails?${t}`:"/emails";return await this.resend.get(r)}async update(e){return await this.resend.patch(`/emails/${e.id}`,{scheduled_at:e.scheduledAt})}async cancel(e){return await this.resend.post(`/emails/${e}/cancel`)}},vm=class{constructor(e){this.resend=e}async send(e){return await this.resend.post("/events/send",rm(e))}async create(e){return await this.resend.post("/events",e)}async get(e){return await this.resend.get(`/events/${encodeURIComponent(e)}`)}async list(e={}){let t=ae(e),r=t?`/events?${t}`:"/events";return await this.resend.get(r)}async update(e,t){return await this.resend.patch(`/events/${encodeURIComponent(e)}`,t)}async remove(e){return await this.resend.delete(`/events/${encodeURIComponent(e)}`)}},Cm=class{constructor(e){this.resend=e}async list(e={}){let t=ae(e),r=t?`/logs?${t}`:"/logs";return await this.resend.get(r)}async get(e){return await this.resend.get(`/logs/${e}`)}},wm=class{constructor(e){this.resend=e}async create(e,t={}){return await this.resend.post("/segments",e,t)}async list(e={}){let t=ae(e),r=t?`/segments?${t}`:"/segments";return await this.resend.get(r)}async get(e){return await this.resend.get(`/segments/${e}`)}async remove(e){return await this.resend.delete(`/segments/${e}`)}};function _m(e={}){let t=new URLSearchParams;return e.before&&t.set("before",e.before),e.after&&t.set("after",e.after),e.limit&&t.set("limit",e.limit.toString()),t.size>0?`?${t.toString()}`:""}function xm(e){return e?.map(t=>({key:t.key,type:t.type,fallback_value:t.fallbackValue}))}function Yi(e){return{name:"name"in e?e.name:void 0,subject:e.subject,html:e.html,text:e.text,alias:e.alias,from:e.from,reply_to:e.replyTo,variables:xm(e.variables)}}var Qi=class{constructor(e,t){this.promise=e,this.publishFn=t}then(e,t){return this.promise.then(e,t)}async publish(){let{data:e,error:t}=await this.promise;return t?{data:null,headers:null,error:t}:this.publishFn(e.id)}},km=class{constructor(e){this.resend=e}create(e){return new Qi(this.performCreate(e),this.publish.bind(this))}async performCreate(e){let t={...e};return e.react&&(t.html=await or(e.react)),this.resend.post("/templates",Yi(t))}async remove(e){return await this.resend.delete(`/templates/${e}`)}async get(e){return await this.resend.get(`/templates/${e}`)}async list(e={}){return this.resend.get(`/templates${_m(e)}`)}duplicate(e){return new Qi(this.resend.post(`/templates/${e}/duplicate`),this.publish.bind(this))}async publish(e){return await this.resend.post(`/templates/${e}/publish`)}async update(e,t){return await this.resend.patch(`/templates/${e}`,Yi(t))}},Am=class{constructor(e){this.resend=e}async create(e){let{defaultSubscription:t,...r}=e;return await this.resend.post("/topics",{...r,default_subscription:t})}async list(){return await this.resend.get("/topics")}async get(e){return e?await this.resend.get(`/topics/${e}`):{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}}}async update(e){return e.id?await this.resend.patch(`/topics/${e.id}`,e):{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}}}async remove(e){return e?await this.resend.delete(`/topics/${e}`):{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}}}},$m=class{constructor(e){this.resend=e}async create(e,t={}){return await this.resend.post("/webhooks",e,t)}async get(e){return await this.resend.get(`/webhooks/${e}`)}async list(e={}){let t=ae(e),r=t?`/webhooks?${t}`:"/webhooks";return await this.resend.get(r)}async update(e,t){return await this.resend.patch(`/webhooks/${e}`,t)}async remove(e){return await this.resend.delete(`/webhooks/${e}`)}verify(e){return new es.Webhook(e.webhookSecret).verify(e.payload,{"webhook-id":e.headers.id,"webhook-timestamp":e.headers.timestamp,"webhook-signature":e.headers.signature})}},Xi="https://api.resend.com",Zi=`resend-node:${Xd}`;function Em(){return typeof process<"u"&&process.env&&process.env.RESEND_BASE_URL||Xi}function Dm(){return typeof process<"u"&&process.env&&process.env.RESEND_USER_AGENT||Zi}var Dt=class{constructor(e,t){if(this.key=e,this.segments=new wm(this),this.apiKeys=new Zd(this),this.audiences=this.segments,this.automations=new nm(this),this.batch=new im(this),this.broadcasts=new sm(this),this.contactProperties=new am(this),this.contacts=new dm(this),this.domains=new fm(this),this.emails=new ym(this),this.events=new vm(this),this.logs=new Cm(this),this.templates=new km(this),this.topics=new Am(this),this.webhooks=new $m(this),!e&&(typeof process<"u"&&process.env&&(this.key=process.env.RESEND_API_KEY),!this.key))throw new Error('Missing API key. Pass it to the constructor `new Resend("re_123")`');this.baseUrl=t?.baseUrl??Em(),this.userAgent=t?.userAgent??Dm(),this.headers=new Headers({Authorization:`Bearer ${this.key}`,"User-Agent":this.userAgent,"Content-Type":"application/json"})}async fetchRequest(e,t={}){try{let r=await fetch(`${this.baseUrl}${e}`,t);if(!r.ok)try{let n=await r.text();return{data:null,error:JSON.parse(n),headers:Object.fromEntries(r.headers.entries())}}catch(n){if(n instanceof SyntaxError)return{data:null,error:{name:"application_error",statusCode:r.status,message:"Internal server error. We are unable to process your request right now, please try again later."},headers:Object.fromEntries(r.headers.entries())};let o={message:r.statusText,statusCode:r.status,name:"application_error"};return n instanceof Error?{data:null,error:{...o,message:n.message},headers:Object.fromEntries(r.headers.entries())}:{data:null,error:o,headers:Object.fromEntries(r.headers.entries())}}return{data:await r.json(),error:null,headers:Object.fromEntries(r.headers.entries())}}catch{return{data:null,error:{name:"application_error",statusCode:null,message:"Unable to fetch data. The request could not be resolved."},headers:null}}}async post(e,t,r={}){let n=new Headers(this.headers),o=typeof FormData<"u"&&t instanceof FormData;if(o&&n.delete("Content-Type"),r.headers)for(let[s,a]of new Headers(r.headers).entries())n.set(s,a);r.idempotencyKey&&n.set("Idempotency-Key",r.idempotencyKey);let i={method:"POST",body:o?t:JSON.stringify(t),...r,headers:n};return this.fetchRequest(e,i)}async get(e,t={}){let r=new Headers(this.headers);if(t.headers)for(let[o,i]of new Headers(t.headers).entries())r.set(o,i);let n={method:"GET",...t,headers:r};return this.fetchRequest(e,n)}async put(e,t,r={}){let n=new Headers(this.headers);if(r.headers)for(let[i,s]of new Headers(r.headers).entries())n.set(i,s);let o={method:"PUT",body:JSON.stringify(t),...r,headers:n};return this.fetchRequest(e,o)}async patch(e,t,r={}){let n=new Headers(this.headers);if(r.headers)for(let[i,s]of new Headers(r.headers).entries())n.set(i,s);let o={method:"PATCH",body:JSON.stringify(t),...r,headers:n};return this.fetchRequest(e,o)}async delete(e,t,r={}){let n=new Headers(this.headers);if(r.headers)for(let[i,s]of new Headers(r.headers).entries())n.set(i,s);let o={method:"DELETE",body:t===void 0?void 0:JSON.stringify(t),...r,headers:n};return this.fetchRequest(e,o)}};fe();var go=pe(rt(),1);function q(e,t){return e instanceof Error?e.message:t}function Rs(e){return!!(e||!process.stdout.isTTY)}function N(e,t={}){Rs(t.json)?console.log(JSON.stringify(e,null,2)):console.log(typeof e=="string"?e:JSON.stringify(e,null,2)),t.exitCode!==void 0&&process.exit(t.exitCode)}var Hm=new Set(["content-type","retry-after"]);function Mm(e){let t={};for(let[r,n]of Object.entries(e)){let o=r.toLowerCase();(Hm.has(o)||o.startsWith("x-"))&&(t[o]=n)}return t}function h(e,t={}){let r=t.exitCode??1,n=e.headers&&Object.keys(e.headers).length>0?Mm(e.headers):void 0,o=n!==void 0&&Object.keys(n).length>0;if(Rs(t.json)){let i={message:e.message,code:e.code??"unknown"};typeof e.statusCode=="number"&&(i.statusCode=e.statusCode),o&&(i.headers=n),typeof e.body=="string"&&e.body.length>0&&(i.body=e.body),console.error(JSON.stringify({error:i},null,2))}else{console.error(`${go.default.red("Error:")} ${e.message}`);let i=[];if(typeof e.statusCode=="number"&&i.push(`HTTP ${e.statusCode}`),o)for(let[s,a]of Object.entries(n))i.push(`${s}: ${a}`);i.length>0&&console.error(go.default.dim(`[${i.join("; ")}]`))}process.exit(r)}var Fs={sending_access:0,full_access:1};function qm(e,t){return Fs[e]>=Fs[t]}async function Z(e,t){let r=e.profile;try{let n=await _t(e.apiKey,r);if(!n){if(r){let s=xe();if(!s.some(l=>l.name===r))throw new Error(`Profile "${r}" not found. Available profiles: ${s.map(l=>l.name).join(", ")||"(none)"}`)}throw new Error("No API key found. Set RESEND_API_KEY, use --api-key, or run: resend login")}let o;if(n.type==="api_key")o=n.permission;else{let s=n.scope.split(" ").filter(Boolean);s.includes("full_access")?o="full_access":s.includes("emails:send")?o="sending_access":h({message:`Unrecognized credential scope${n.scope?` "${n.scope}"`:""}. Run \`resend login\` to re-authenticate.`,code:"unrecognized_scope"},{json:e.json})}if(o){let s=t?.permission??"full_access";qm(o,s)||h({message:`This command requires full access. Your current credential has sending access only.
|
|
185
|
-
${
|
|
186
|
-
`):process.stderr.write("\r\x1B[2K")},clear(){clearInterval(s),process.stderr.write("\r\x1B[2K")},warn(a){clearInterval(s),process.stderr.write(`\r\x1B[2K ${
|
|
187
|
-
`)},fail(a){clearInterval(s),process.stderr.write(`\r\x1B[2K ${
|
|
188
|
-
`)}}}
|
|
267
|
+
`);c.content=nt.encode(u);break}default:c.content=s.content}this.attachments.push(c)}for(let d of s.childNodes)await n(d,a,l)};await n(this.root,!1,!1),i.forEach(s=>{o.forEach(a=>{if(t[a]||(t[a]=[]),s[a])s[a].forEach(l=>{switch(l.type){case"text":t[a].push(l.value);break;case"subMessage":switch(a){case"html":t[a].push(Wi(l.value));break;case"plain":t[a].push(Li(l.value));break}break}});else{let l;switch(a){case"html":l="plain";break;case"plain":l="html";break}(s[l]||[]).forEach(d=>{switch(d.type){case"text":switch(a){case"html":t[a].push(En(d.value));break;case"plain":t[a].push(Tn(d.value));break}break;case"subMessage":switch(a){case"html":t[a].push(Wi(d.value));break;case"plain":t[a].push(Li(d.value));break}break}})}})}),Object.keys(t).forEach(s=>{t[s]=t[s].join(`
|
|
268
|
+
`)}),this.textContent=t}isInlineTextNode(t){if(t.contentDisposition?.parsed?.value==="attachment")return!1;switch(t.contentType.parsed?.value){case"text/html":case"text/plain":return!0;default:return!1}}isInlineMessageRfc822(t){return t.contentType.parsed?.value!=="message/rfc822"?!1:(t.contentDisposition?.parsed?.value||(this.options.rfc822Attachments?"attachment":"inline"))==="inline"}forceRfc822Attachments(){if(this.options.forceRfc822Attachments)return!0;let t=!1,o=i=>{i.contentType.multipart||i.contentType.parsed&&["message/delivery-status","message/feedback-report"].includes(i.contentType.parsed.value)&&(t=!0);for(let r of i.childNodes)o(r)};return o(this.root),t}async resolveStream(t){let o=0,i=[],r=t.getReader();for(;;){let{done:a,value:l}=await r.read();if(a)break;i.push(l),o+=l.length}let n=new Uint8Array(o),s=0;for(let a of i)n.set(a,s),s+=a.length;return n}async parse(t){if(this.started)throw new Error("Can not reuse parser, create a new PostalMime object");for(this.started=!0,t&&typeof t.getReader=="function"&&(t=await this.resolveStream(t)),t=t||new ArrayBuffer(0),typeof t=="string"&&(t=nt.encode(t)),(t instanceof Blob||Object.prototype.toString.call(t)==="[object Blob]")&&(t=await st(t)),t.buffer instanceof ArrayBuffer&&(t=new Uint8Array(t).buffer),this.buf=t,this.av=new Uint8Array(t),this.readPos=0;this.readPos<this.av.length;){let r=this.readLine();await this.processLine(r.bytes,r.done)}await this.processNodeTree();let o={headers:this.root.headers.map(r=>({key:r.key,originalKey:r.originalKey,value:r.value})).reverse()};for(let r of["from","sender"]){let n=this.root.headers.find(s=>s.key===r);if(n&&n.value){let s=_o(n.value);s&&s.length&&(o[r]=s[0])}}for(let r of["delivered-to","return-path"]){let n=this.root.headers.find(s=>s.key===r);if(n&&n.value){let s=_o(n.value);if(s&&s.length&&s[0].address){let a=zi(r);o[a]=s[0].address}}}for(let r of["to","cc","bcc","reply-to"]){let n=this.root.headers.filter(a=>a.key===r),s=[];if(n.filter(a=>a&&a.value).map(a=>_o(a.value)).forEach(a=>s=s.concat(a||[])),s&&s.length){let a=zi(r);o[a]=s}}for(let r of["subject","message-id","in-reply-to","references"]){let n=this.root.headers.find(s=>s.key===r);if(n&&n.value){let s=zi(r);o[s]=Ct(n.value)}}let i=this.root.headers.find(r=>r.key==="date");if(i){let r=new Date(i.value);r.toString()==="Invalid Date"?r=i.value:r=r.toISOString(),o.date=r}switch(this.textContent?.html&&(o.html=this.textContent.html),this.textContent?.plain&&(o.text=this.textContent.plain),o.attachments=this.attachments,o.headerLines=(this.root.rawHeaderLines||[]).slice().reverse(),this.attachmentEncoding){case"arraybuffer":break;case"base64":for(let n of o.attachments||[])n?.content&&(n.content=In(n.content),n.encoding="base64");break;case"utf8":let r=new TextDecoder("utf8");for(let n of o.attachments||[])n?.content&&(n.content=r.decode(n.content),n.encoding="utf8");break;default:throw new Error("Unknown attachment encoding")}return o}};var es=fe(Wn(),1),ep="6.14.0";function ae(e){let t=new URLSearchParams;return e.limit!==void 0&&t.set("limit",e.limit.toString()),"after"in e&&e.after!==void 0&&t.set("after",e.after),"before"in e&&e.before!==void 0&&t.set("before",e.before),t.toString()}var tp=class{constructor(e){this.resend=e}async create(e,t={}){return await this.resend.post("/api-keys",e,t)}async list(e={}){let t=ae(e),o=t?`/api-keys?${t}`:"/api-keys";return await this.resend.get(o)}async remove(e){return await this.resend.delete(`/api-keys/${e}`)}},op=class{constructor(e){this.resend=e}async get(e){return await this.resend.get(`/automations/${e.automationId}/runs/${e.runId}`)}async list(e){let t=ae(e),o=new URLSearchParams(t);if(e.status){let n=Array.isArray(e.status)?e.status.join(","):e.status;o.set("status",n)}let i=o.toString(),r=i?`/automations/${e.automationId}/runs?${i}`:`/automations/${e.automationId}/runs`;return await this.resend.get(r)}};function ts(e){switch(e.type){case"trigger":return{key:e.key,type:e.type,config:{event_name:e.config.eventName}};case"delay":return{key:e.key,type:e.type,config:e.config};case"send_email":return{key:e.key,type:e.type,config:{template:e.config.template,subject:e.config.subject,from:e.config.from,reply_to:e.config.replyTo}};case"wait_for_event":return{key:e.key,type:e.type,config:{event_name:e.config.eventName,timeout:e.config.timeout,filter_rule:e.config.filterRule}};case"condition":return{key:e.key,type:e.type,config:e.config};case"contact_update":return{key:e.key,type:e.type,config:{first_name:e.config.firstName,last_name:e.config.lastName,unsubscribed:e.config.unsubscribed,properties:e.config.properties}};case"contact_delete":return{key:e.key,type:e.type,config:e.config};case"add_to_segment":return{key:e.key,type:e.type,config:{segment_id:e.config.segmentId}}}}function os(e){return{from:e.from,to:e.to,type:e.type}}function ip(e){return{name:e.name,status:e.status,steps:e.steps.map(ts),connections:e.connections.map(os)}}function rp(e){return{event:e.event,contact_id:e.contactId,email:e.email,payload:e.payload}}var np=class{constructor(e){this.resend=e,this.runs=new op(this.resend)}async create(e){return await this.resend.post("/automations",ip(e))}async list(e={}){let t=[ae(e)];e.status&&t.push(`status=${encodeURIComponent(e.status)}`);let o=t.filter(Boolean).join("&"),i=o?`/automations?${o}`:"/automations";return await this.resend.get(i)}async get(e){return await this.resend.get(`/automations/${e}`)}async remove(e){return await this.resend.delete(`/automations/${e}`)}async update(e,t){let o={};return t.name!==void 0&&(o.name=t.name),t.status!==void 0&&(o.status=t.status),t.steps!==void 0&&(o.steps=t.steps.map(ts)),t.connections!==void 0&&(o.connections=t.connections.map(os)),await this.resend.patch(`/automations/${e}`,o)}async stop(e){return await this.resend.post(`/automations/${e}/stop`)}};function sp(e){return e?.map(t=>({content:t.content,filename:t.filename,path:t.path,content_type:t.contentType,content_id:t.contentId}))}function is(e){return{attachments:sp(e.attachments),bcc:e.bcc,cc:e.cc,from:e.from,headers:e.headers,html:e.html,reply_to:e.replyTo,scheduled_at:e.scheduledAt,subject:e.subject,tags:e.tags,text:e.text,to:e.to,template:e.template?{id:e.template.id,variables:e.template.variables}:void 0,topic_id:e.topicId}}async function ro(e){let t;try{({render:t}=await import("@react-email/render"))}catch{throw new Error("Failed to render React component. Make sure to install `@react-email/render` or `@react-email/components`.")}return t(e)}var ap=class{constructor(e){this.resend=e}async send(e,t){return this.create(e,t)}async create(e,t){let o=[];for(let i of e)i.react&&(i.html=await ro(i.react),i.react=void 0),o.push(is(i));return await this.resend.post("/emails/batch",o,{...t,headers:{"x-batch-validation":t?.batchValidation??"strict",...t?.headers}})}},lp=class{constructor(e){this.resend=e}async create(e,t={}){let o=e.react?await ro(e.react):e.html;return await this.resend.post("/broadcasts",{name:e.name,segment_id:e.segmentId,audience_id:e.audienceId,preview_text:e.previewText,from:e.from,html:o,reply_to:e.replyTo,subject:e.subject,text:e.text,topic_id:e.topicId,send:e.send,scheduled_at:e.scheduledAt},t)}async send(e,t){return await this.resend.post(`/broadcasts/${e}/send`,{scheduled_at:t?.scheduledAt})}async list(e={}){let t=ae(e),o=t?`/broadcasts?${t}`:"/broadcasts";return await this.resend.get(o)}async get(e){return await this.resend.get(`/broadcasts/${e}`)}async remove(e){return await this.resend.delete(`/broadcasts/${e}`)}async update(e,t){let o=t.react?await ro(t.react):t.html;return await this.resend.patch(`/broadcasts/${e}`,{name:t.name,segment_id:t.segmentId,audience_id:t.audienceId,from:t.from,html:o,text:t.text,subject:t.subject,reply_to:t.replyTo,preview_text:t.previewText,topic_id:t.topicId})}};function Jn(e){return{id:e.id,key:e.key,createdAt:e.created_at,type:e.type,fallbackValue:e.fallback_value}}function Vn(e){return"key"in e?{key:e.key,type:e.type,fallback_value:e.fallbackValue}:{fallback_value:e.fallbackValue}}var cp=class{constructor(e){this.resend=e}async create(e){let t=Vn(e);return await this.resend.post("/contact-properties",t)}async list(e={}){let t=ae(e),o=t?`/contact-properties?${t}`:"/contact-properties",i=await this.resend.get(o);return i.data?{data:{...i.data,data:i.data.data.map(r=>Jn(r))},headers:i.headers,error:null}:i}async get(e){if(!e)return{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}};let t=await this.resend.get(`/contact-properties/${e}`);return t.data?{data:{object:"contact_property",...Jn(t.data)},headers:t.headers,error:null}:t}async update(e){if(!e.id)return{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}};let t=Vn(e);return await this.resend.patch(`/contact-properties/${e.id}`,t)}async remove(e){return e?await this.resend.delete(`/contact-properties/${e}`):{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}}}},up=class{constructor(e){this.resend=e}async create(e,t={}){let o=this.buildCreateFormData(e);return this.resend.post("/contacts/imports",o,t)}async list(e={}){let t=new URLSearchParams(ae(e));e.status!==void 0&&t.set("status",e.status);let o=t.toString(),i=o?`/contacts/imports?${o}`:"/contacts/imports";return this.resend.get(i)}async get(e){return this.resend.get(`/contacts/imports/${e}`)}buildCreateFormData(e){let t=new FormData;return t.append("file",e.file),this.appendField(t,"column_map",this.buildColumnMap(e.columnMap??null)),this.appendField(t,"on_conflict",e.onConflict??null),this.appendField(t,"segments",e.segments??null),this.appendField(t,"topics",e.topics??null),t}buildColumnMap(e){return e===null?null:{email:e.email,first_name:e.firstName,last_name:e.lastName,unsubscribed:e.unsubscribed,properties:e.properties}}appendField(e,t,o){o!==null&&e.append(t,typeof o=="string"?o:JSON.stringify(o))}},dp=class{constructor(e){this.resend=e}async list(e){if(!e.contactId&&!e.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let t=e.email?e.email:e.contactId,o=ae(e),i=o?`/contacts/${t}/segments?${o}`:`/contacts/${t}/segments`;return await this.resend.get(i)}async add(e){if(!e.contactId&&!e.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let t=e.email?e.email:e.contactId;return this.resend.post(`/contacts/${t}/segments/${e.segmentId}`)}async remove(e){if(!e.contactId&&!e.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let t=e.email?e.email:e.contactId;return this.resend.delete(`/contacts/${t}/segments/${e.segmentId}`)}},pp=class{constructor(e){this.resend=e}async update(e){if(!e.id&&!e.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let t=e.email?e.email:e.id;return this.resend.patch(`/contacts/${t}/topics`,e.topics)}async list(e){if(!e.id&&!e.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let t=e.email?e.email:e.id,o=ae(e),i=o?`/contacts/${t}/topics?${o}`:`/contacts/${t}/topics`;return this.resend.get(i)}},mp=class{constructor(e){this.resend=e,this.imports=new up(this.resend),this.topics=new pp(this.resend),this.segments=new dp(this.resend)}async create(e,t={}){return"audienceId"in e?"segments"in e||"topics"in e?{data:null,headers:null,error:{message:"`audienceId` is deprecated, and cannot be used together with `segments` or `topics`. Use `segments` instead to add one or more segments to the new contact.",statusCode:null,name:"invalid_parameter"}}:await this.resend.post(`/audiences/${e.audienceId}/contacts`,{unsubscribed:e.unsubscribed,email:e.email,first_name:e.firstName,last_name:e.lastName,properties:e.properties},t):await this.resend.post("/contacts",{unsubscribed:e.unsubscribed,email:e.email,first_name:e.firstName,last_name:e.lastName,properties:e.properties,segments:e.segments,topics:e.topics},t)}async list(e={}){let t=e.segmentId??e.audienceId;if(!t){let r=ae(e),n=r?`/contacts?${r}`:"/contacts";return await this.resend.get(n)}let o=ae(e),i=o?`/segments/${t}/contacts?${o}`:`/segments/${t}/contacts`;return await this.resend.get(i)}async get(e){return typeof e=="string"?this.resend.get(`/contacts/${e}`):!e.id&&!e.email?{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}}:e.audienceId?this.resend.get(`/audiences/${e.audienceId}/contacts/${e?.email?e?.email:e?.id}`):this.resend.get(`/contacts/${e?.email?e?.email:e?.id}`)}async update(e){return!e.id&&!e.email?{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}}:e.audienceId?await this.resend.patch(`/audiences/${e.audienceId}/contacts/${e?.email?e?.email:e?.id}`,{unsubscribed:e.unsubscribed,first_name:e.firstName,last_name:e.lastName,properties:e.properties}):await this.resend.patch(`/contacts/${e?.email?e?.email:e?.id}`,{unsubscribed:e.unsubscribed,first_name:e.firstName,last_name:e.lastName,properties:e.properties})}async remove(e){return typeof e=="string"?this.resend.delete(`/contacts/${e}`):!e.id&&!e.email?{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}}:e.audienceId?this.resend.delete(`/audiences/${e.audienceId}/contacts/${e?.email?e?.email:e?.id}`):this.resend.delete(`/contacts/${e?.email?e?.email:e?.id}`)}};function fp(e){return{name:e.name,region:e.region,custom_return_path:e.customReturnPath,capabilities:e.capabilities,open_tracking:e.openTracking,click_tracking:e.clickTracking,tls:e.tls,tracking_subdomain:e.trackingSubdomain}}var gp=class{constructor(e){this.resend=e}async create(e,t={}){return await this.resend.post("/domains/claim",{name:e.name,region:e.region,custom_return_path:e.customReturnPath,open_tracking:e.openTracking,click_tracking:e.clickTracking,tracking_subdomain:e.trackingSubdomain},t)}async get(e){return await this.resend.get(`/domains/${e}/claim`)}async verify(e){return await this.resend.post(`/domains/${e}/claim/verify`)}},Ap=class{constructor(e){this.resend=e,this.claims=new gp(this.resend)}async create(e,t={}){return await this.resend.post("/domains",fp(e),t)}async list(e={}){let t=ae(e),o=t?`/domains?${t}`:"/domains";return await this.resend.get(o)}async get(e){return await this.resend.get(`/domains/${e}`)}async update(e){return await this.resend.patch(`/domains/${e.id}`,{click_tracking:e.clickTracking,open_tracking:e.openTracking,tls:e.tls,capabilities:e.capabilities,tracking_subdomain:e.trackingSubdomain})}async remove(e){return await this.resend.delete(`/domains/${e}`)}async verify(e){return await this.resend.post(`/domains/${e}/verify`)}},hp=class{constructor(e){this.resend=e}async get(e){let{emailId:t,id:o}=e;return await this.resend.get(`/emails/${t}/attachments/${o}`)}async list(e){let{emailId:t}=e,o=ae(e),i=o?`/emails/${t}/attachments?${o}`:`/emails/${t}/attachments`;return await this.resend.get(i)}},bp=class{constructor(e){this.resend=e}async get(e){let{emailId:t,id:o}=e;return await this.resend.get(`/emails/receiving/${t}/attachments/${o}`)}async list(e){let{emailId:t}=e,o=ae(e),i=o?`/emails/receiving/${t}/attachments?${o}`:`/emails/receiving/${t}/attachments`;return await this.resend.get(i)}},Cp=class{constructor(e){this.resend=e,this.attachments=new bp(e)}async get(e,t={}){let o=new URLSearchParams;t.html_format!==void 0&&o.set("html_format",t.html_format);let i=o.toString(),r=i?`/emails/receiving/${e}?${i}`:`/emails/receiving/${e}`;return await this.resend.get(r)}async list(e={}){let t=ae(e),o=t?`/emails/receiving?${t}`:"/emails/receiving";return await this.resend.get(o)}async forward(e){let{emailId:t,to:o,from:i}=e,r=e.passthrough!==!1,n=await this.get(t);if(n.error)return{data:null,error:n.error,headers:n.headers};let s=n.data,a=s.subject||"(no subject)";if(r)return this.forwardPassthrough(s,{to:o,from:i,subject:a});let l=a.startsWith("Fwd:")?a:`Fwd: ${a}`;return this.forwardWrapped(s,{to:o,from:i,subject:l,text:"text"in e?e.text:void 0,html:"html"in e?e.html:void 0})}async forwardPassthrough(e,t){let{to:o,from:i,subject:r}=t;if(!e.raw?.download_url)return{data:null,error:{name:"validation_error",message:"Raw email content is not available for this email",statusCode:400},headers:null};let n=await fetch(e.raw.download_url);if(!n.ok)return{data:null,error:{name:"application_error",message:"Failed to download raw email content",statusCode:n.status},headers:null};let s=await n.text(),a=await oo.parse(s,{attachmentEncoding:"base64"}),l=a.attachments.map(d=>{let c=d.contentId?d.contentId.replace(/^<|>$/g,""):void 0;return{filename:d.filename,content:d.content.toString(),content_type:d.mimeType,content_id:c||void 0}});return await this.resend.post("/emails",{from:i,to:o,subject:r,text:a.text||void 0,html:a.html||void 0,attachments:l.length>0?l:void 0})}async forwardWrapped(e,t){let{to:o,from:i,subject:r,text:n,html:s}=t;if(!e.raw?.download_url)return{data:null,error:{name:"validation_error",message:"Raw email content is not available for this email",statusCode:400},headers:null};let a=await fetch(e.raw.download_url);if(!a.ok)return{data:null,error:{name:"application_error",message:"Failed to download raw email content",statusCode:a.status},headers:null};let l=await a.text();return await this.resend.post("/emails",{from:i,to:o,subject:r,text:n,html:s,attachments:[{filename:"forwarded_message.eml",content:Buffer.from(l).toString("base64"),content_type:"message/rfc822"}]})}},yp=class{constructor(e){this.resend=e,this.attachments=new hp(e),this.receiving=new Cp(e)}async send(e,t={}){return this.create(e,t)}async create(e,t={}){let o={...e};return e.react&&(o.html=await ro(e.react)),await this.resend.post("/emails",is(o),t)}async get(e){return await this.resend.get(`/emails/${e}`)}async list(e={}){let t=ae(e),o=t?`/emails?${t}`:"/emails";return await this.resend.get(o)}async update(e){return await this.resend.patch(`/emails/${e.id}`,{scheduled_at:e.scheduledAt})}async cancel(e){return await this.resend.post(`/emails/${e}/cancel`)}},Up=class{constructor(e){this.resend=e}async send(e){return await this.resend.post("/events/send",rp(e))}async create(e){return await this.resend.post("/events",e)}async get(e){return await this.resend.get(`/events/${encodeURIComponent(e)}`)}async list(e={}){let t=ae(e),o=t?`/events?${t}`:"/events";return await this.resend.get(o)}async update(e,t){return await this.resend.patch(`/events/${encodeURIComponent(e)}`,t)}async remove(e){return await this.resend.delete(`/events/${encodeURIComponent(e)}`)}},Kp=class{constructor(e){this.resend=e}async list(e={}){let t=ae(e),o=t?`/logs?${t}`:"/logs";return await this.resend.get(o)}async get(e){return await this.resend.get(`/logs/${e}`)}},Sp=class{constructor(e){this.resend=e}async create(e,t={}){return await this.resend.post("/segments",e,t)}async list(e={}){let t=ae(e),o=t?`/segments?${t}`:"/segments";return await this.resend.get(o)}async get(e){return await this.resend.get(`/segments/${e}`)}async remove(e){return await this.resend.delete(`/segments/${e}`)}};function wp(e={}){let t=new URLSearchParams;return e.before&&t.set("before",e.before),e.after&&t.set("after",e.after),e.limit&&t.set("limit",e.limit.toString()),t.size>0?`?${t.toString()}`:""}function vp(e){return e?.map(t=>({key:t.key,type:t.type,fallback_value:t.fallbackValue}))}function zn(e){return{name:"name"in e?e.name:void 0,subject:e.subject,html:e.html,text:e.text,alias:e.alias,from:e.from,reply_to:e.replyTo,variables:vp(e.variables)}}var Yn=class{constructor(e,t){this.promise=e,this.publishFn=t}then(e,t){return this.promise.then(e,t)}async publish(){let{data:e,error:t}=await this.promise;return t?{data:null,headers:null,error:t}:this.publishFn(e.id)}},xp=class{constructor(e){this.resend=e}create(e){return new Yn(this.performCreate(e),this.publish.bind(this))}async performCreate(e){let t={...e};return e.react&&(t.html=await ro(e.react)),this.resend.post("/templates",zn(t))}async remove(e){return await this.resend.delete(`/templates/${e}`)}async get(e){return await this.resend.get(`/templates/${e}`)}async list(e={}){return this.resend.get(`/templates${wp(e)}`)}duplicate(e){return new Yn(this.resend.post(`/templates/${e}/duplicate`),this.publish.bind(this))}async publish(e){return await this.resend.post(`/templates/${e}/publish`)}async update(e,t){return await this.resend.patch(`/templates/${e}`,zn(t))}},Fp=class{constructor(e){this.resend=e}async create(e){let{defaultSubscription:t,...o}=e;return await this.resend.post("/topics",{...o,default_subscription:t})}async list(){return await this.resend.get("/topics")}async get(e){return e?await this.resend.get(`/topics/${e}`):{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}}}async update(e){return e.id?await this.resend.patch(`/topics/${e.id}`,e):{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}}}async remove(e){return e?await this.resend.delete(`/topics/${e}`):{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}}}},kp=class{constructor(e){this.resend=e}async create(e,t={}){return await this.resend.post("/webhooks",e,t)}async get(e){return await this.resend.get(`/webhooks/${e}`)}async list(e={}){let t=ae(e),o=t?`/webhooks?${t}`:"/webhooks";return await this.resend.get(o)}async update(e,t){return await this.resend.patch(`/webhooks/${e}`,t)}async remove(e){return await this.resend.delete(`/webhooks/${e}`)}verify(e){return new es.Webhook(e.webhookSecret).verify(e.payload,{"webhook-id":e.headers.id,"webhook-timestamp":e.headers.timestamp,"webhook-signature":e.headers.signature})}},Xn="https://api.resend.com",Zn=`resend-node:${ep}`;function Rp(){return typeof process<"u"&&process.env&&process.env.RESEND_BASE_URL||Xn}function Dp(){return typeof process<"u"&&process.env&&process.env.RESEND_USER_AGENT||Zn}var kt=class{constructor(e,t){if(this.key=e,this.segments=new Sp(this),this.apiKeys=new tp(this),this.audiences=this.segments,this.automations=new np(this),this.batch=new ap(this),this.broadcasts=new lp(this),this.contactProperties=new cp(this),this.contacts=new mp(this),this.domains=new Ap(this),this.emails=new yp(this),this.events=new Up(this),this.logs=new Kp(this),this.templates=new xp(this),this.topics=new Fp(this),this.webhooks=new kp(this),!e&&(typeof process<"u"&&process.env&&(this.key=process.env.RESEND_API_KEY),!this.key))throw new Error('Missing API key. Pass it to the constructor `new Resend("re_123")`');this.baseUrl=t?.baseUrl??Rp(),this.userAgent=t?.userAgent??Dp(),this.headers=new Headers({Authorization:`Bearer ${this.key}`,"User-Agent":this.userAgent,"Content-Type":"application/json"})}async fetchRequest(e,t={}){try{let o=await fetch(`${this.baseUrl}${e}`,t);if(!o.ok)try{let i=await o.text();return{data:null,error:JSON.parse(i),headers:Object.fromEntries(o.headers.entries())}}catch(i){if(i instanceof SyntaxError)return{data:null,error:{name:"application_error",statusCode:o.status,message:"Internal server error. We are unable to process your request right now, please try again later."},headers:Object.fromEntries(o.headers.entries())};let r={message:o.statusText,statusCode:o.status,name:"application_error"};return i instanceof Error?{data:null,error:{...r,message:i.message},headers:Object.fromEntries(o.headers.entries())}:{data:null,error:r,headers:Object.fromEntries(o.headers.entries())}}return{data:await o.json(),error:null,headers:Object.fromEntries(o.headers.entries())}}catch{return{data:null,error:{name:"application_error",statusCode:null,message:"Unable to fetch data. The request could not be resolved."},headers:null}}}async post(e,t,o={}){let i=new Headers(this.headers),r=typeof FormData<"u"&&t instanceof FormData;if(r&&i.delete("Content-Type"),o.headers)for(let[s,a]of new Headers(o.headers).entries())i.set(s,a);o.idempotencyKey&&i.set("Idempotency-Key",o.idempotencyKey);let n={method:"POST",body:r?t:JSON.stringify(t),...o,headers:i};return this.fetchRequest(e,n)}async get(e,t={}){let o=new Headers(this.headers);if(t.headers)for(let[r,n]of new Headers(t.headers).entries())o.set(r,n);let i={method:"GET",...t,headers:o};return this.fetchRequest(e,i)}async put(e,t,o={}){let i=new Headers(this.headers);if(o.headers)for(let[n,s]of new Headers(o.headers).entries())i.set(n,s);let r={method:"PUT",body:JSON.stringify(t),...o,headers:i};return this.fetchRequest(e,r)}async patch(e,t,o={}){let i=new Headers(this.headers);if(o.headers)for(let[n,s]of new Headers(o.headers).entries())i.set(n,s);let r={method:"PATCH",body:JSON.stringify(t),...o,headers:i};return this.fetchRequest(e,r)}async delete(e,t,o={}){let i=new Headers(this.headers);if(o.headers)for(let[n,s]of new Headers(o.headers).entries())i.set(n,s);let r={method:"DELETE",body:t===void 0?void 0:JSON.stringify(t),...o,headers:i};return this.fetchRequest(e,r)}};ge();var gr=fe(ot(),1);function N(e,t){return e instanceof Error?e.message:t}function Is(e){return!!(e||!process.stdout.isTTY)}function I(e,t={}){Is(t.json)?console.log(JSON.stringify(e,null,2)):console.log(typeof e=="string"?e:JSON.stringify(e,null,2)),t.exitCode!==void 0&&process.exit(t.exitCode)}var qp=new Set(["content-type","retry-after"]);function Mp(e){let t={};for(let[o,i]of Object.entries(e)){let r=o.toLowerCase();(qp.has(r)||r.startsWith("x-"))&&(t[r]=i)}return t}function g(e,t={}){let o=t.exitCode??1,i=e.headers&&Object.keys(e.headers).length>0?Mp(e.headers):void 0,r=i!==void 0&&Object.keys(i).length>0;if(Is(t.json)){let n={message:e.message,code:e.code??"unknown"};typeof e.statusCode=="number"&&(n.statusCode=e.statusCode),r&&(n.headers=i),typeof e.body=="string"&&e.body.length>0&&(n.body=e.body),console.error(JSON.stringify({error:n},null,2))}else{console.error(`${gr.default.red("Error:")} ${e.message}`);let n=[];if(typeof e.statusCode=="number"&&n.push(`HTTP ${e.statusCode}`),r)for(let[s,a]of Object.entries(i))n.push(`${s}: ${a}`);n.length>0&&console.error(gr.default.dim(`[${n.join("; ")}]`))}process.exit(o)}var Ps={sending_access:0,full_access:1};function Lp(e,t){return Ps[e]>=Ps[t]}async function Z(e,t){let o=e.profile;try{let i=await Kt(e.apiKey,o);if(!i){if(o){let s=Se();if(!s.some(l=>l.name===o))throw new Error(`Profile "${o}" not found. Available profiles: ${s.map(l=>l.name).join(", ")||"(none)"}`)}throw new Error("No API key found. Set RESEND_API_KEY, use --api-key, or run: resend login")}let r;if(i.type==="api_key")r=i.permission;else{let s=i.scope.split(" ").filter(Boolean);s.includes("full_access")?r="full_access":s.includes("emails:send")?r="sending_access":g({message:`Unrecognized credential scope${i.scope?` "${i.scope}"`:""}. Run \`resend login\` to re-authenticate.`,code:"unrecognized_scope"},{json:e.json})}if(r){let s=t?.permission??"full_access";Lp(r,s)||g({message:`This command requires full access. Your current credential has sending access only.
|
|
269
|
+
${Dt}`,code:"insufficient_permissions"},{json:e.json})}let n=i.type==="api_key"?i.key:i.access_token;return new kt(n)}catch(i){g({message:N(i,"Failed to create client"),code:"auth_error"},{json:e.json})}}var $s=130;function Wp(){process.stderr.isTTY&&process.stderr.write("\r\x1B[2K"),console.error("Cancelled."),process.exit($s)}var _t;function Hs(){_t=Wp,process.on("SIGINT",_t),process.on("uncaughtException",e=>{g({message:N(e,"An unexpected error occurred"),code:"unexpected_error"},{}),process.exit(1)})}function Lo(e){_t&&process.removeListener("SIGINT",_t),_t=e,process.on("SIGINT",_t)}function Bt(){return $s}ge();var Wo=fe(ot(),1);V();var Qs=[1,2,4],Jp=Qs.length,Vp=new Set(["internal_server_error","service_unavailable","gateway_timeout"]),zp=(e,t)=>!!(e==="rate_limit_exceeded"||t&&e!==void 0&&Vp.has(e)),Yp=e=>{let t=e?.["retry-after"];if(!t)return;let o=Number(t);if(Number.isFinite(o)&&o>=0)return o;let i=Date.parse(t);if(!Number.isNaN(i)){let r=(i-Date.now())/1e3;return r>0?r:0}},Xp=e=>new Promise(t=>setTimeout(t,e)),lo=async(e,t,o=0)=>{let i=await e(),r=t?.retryTransient??!1;if(i.error&&o<Jp&&zp(i.error.name,r)){let n=Yp(i.headers)??Qs[o];return t?.onRetry?.(o,n,i.error.name??""),await Xp(n*1e3),lo(e,t,o+1)}return i};var Gs=(e,t)=>new Promise((o,i)=>{let r=setTimeout(()=>{i(new Error(`Request timed out after ${t/1e3}s`))},t);r.unref(),e.then(n=>{clearTimeout(r),o(n)},n=>{clearTimeout(r),i(n)})});var em=Ze?String.fromCodePoint(10004):"v",tm=Ze?String.fromCodePoint(9888):"!",om=Ze?String.fromCodePoint(10007):"x",im=["\u2839","\u2838","\u2834","\u2826","\u2807","\u280F","\u2819","\u2839"],rm=80;async function Fe(e,t,o,i,r={}){let n=oe(e,i.quiet);try{let{data:s,error:a,headers:l}=await lo(()=>Gs(t(),3e4),{retryTransient:r.retryTransient,onRetry:(d,c,u)=>{n.update(u==="rate_limit_exceeded"?`Rate limited, retrying in ${c}s...`:`Server error, retrying in ${c}s...`)}});return a&&(n.stop(),g({message:a.message,code:o,statusCode:a.statusCode,headers:l},{json:i.json})),s===null&&(n.stop(),g({message:"Unexpected empty response",code:o,headers:l},{json:i.json})),n.stop(),s}catch(s){return n.stop(),g({message:N(s,"Unknown error"),code:o},{json:i.json})}}function oe(e,t){if(t||!U())return{update(a){},stop(a){},clear(){},warn(a){},fail(a){}};let o=Ze?im:["-","\\","|","/"],i=rm,r=0,n=e,s=setInterval(()=>{process.stderr.write(`\r\x1B[2K ${o[r++%o.length]} ${n}`)},i);return{update(a){n=a},stop(a){clearInterval(s),a?process.stderr.write(`\r\x1B[2K ${Wo.default.green(em)} ${a}
|
|
270
|
+
`):process.stderr.write("\r\x1B[2K")},clear(){clearInterval(s),process.stderr.write("\r\x1B[2K")},warn(a){clearInterval(s),process.stderr.write(`\r\x1B[2K ${Wo.default.yellow(tm)} ${a}
|
|
271
|
+
`)},fail(a){clearInterval(s),process.stderr.write(`\r\x1B[2K ${Wo.default.red(om)} ${a}
|
|
272
|
+
`)}}}V();function R(e){Sn(e),process.exit(Bt())}async function Ms(e,t,o){(!U()||o.json)&&g({message:"Use --yes to confirm deletion in non-interactive mode.",code:"confirmation_required"},{json:o.json});let i=await rt({message:t});(x(i)||!i)&&R("Deletion cancelled.")}async function Jo(e,t){let o=ne(e);if(!o)return e;if(!U()||t.json)return g({message:`Profile "${e}" has an invalid name: ${o}`,code:"invalid_profile_name"},{json:t.json}),null;Y.warn(`Profile "${e}" has an invalid name: ${o}`);let i=await X({message:"Enter a new name for this profile:",placeholder:e.replace(/[^a-zA-Z0-9._-]/g,"-"),validate:r=>ne(r)});x(i)&&R("Rename cancelled.");try{await Mo(e,i)}catch(r){return g({message:N(r,"Failed to rename profile"),code:"rename_failed"},{json:t.json}),null}return Y.success(`Profile renamed to '${i}'.`),i}async function q(e,t,o,i){if(e!==void 0)return e;(!U()||i.json)&&g(o,{json:i.json});let r=await X({message:t.message,placeholder:t.placeholder,defaultValue:t.defaultValue,validate:t.validate??(n=>!t.defaultValue&&(!n||n.length===0)?`${t.message} is required`:void 0)});return x(r)&&R("Cancelled."),r}async function Et(e,t,o,i){if(e!==void 0)return e;(!U()||i.json)&&g(o,{json:i.json});let r=await se({message:t.message,options:t.options});return x(r)&&R("Cancelled."),r}async function Ls(e,t,o){let i=t.filter(s=>s.required!==!1&&e[s.flag]==="");if(i.length>0){let s=i.map(a=>`--${a.flag}`).join(", ");g({message:`Empty value for required flags: ${s}`,code:"invalid_options"},{json:o.json})}let r=t.filter(s=>s.required!==!1&&!e[s.flag]);if(r.length===0)return e;if(!U()||o.json){let s=r.map(a=>`--${a.flag}`).join(", ");g({message:`Missing required flags: ${s}`,code:"missing_flags"},{json:o.json})}let n=await Kn(Object.fromEntries(r.map(s=>[s.flag,()=>X({message:s.message,placeholder:s.placeholder,defaultValue:s.defaultValue,validate:s.validate??(a=>!s.defaultValue&&(!a||a.length===0)?`${s.message} is required`:void 0)})])),{onCancel:()=>R("Operation cancelled.")});return{...e,...n}}var nm=20,Ns="__fetch_more__",qs="__none__";async function le(e,t,o,i){if(e)return{id:e,label:e};let r=i?.optional??!1;if(!U()||o.json){if(r)return;g({message:"Missing required argument: id",code:"missing_id"},{json:o.json})}let n=await Z(o),s=[];for(;;){let a=s.at(-1)?.id,l=oe(s.length===0?`Fetching ${t.resourcePlural}...`:`Fetching more ${t.resourcePlural}...`,o.quiet),d=await t.fetchItems(n,{limit:nm,...a&&{after:a}});if(d.error||!d.data){if(r){l.clear();return}l.fail(`Failed to fetch ${t.resourcePlural}`),g({message:d.error?.message??"Unexpected empty response",code:"list_error"},{json:o.json})}s.push(...d.data.data);let c=d.data.has_more??!1,u=t.filter?s.filter(t.filter):s;if(u.length===0&&!c&&r){l.clear();return}if(l.stop(s.length===u.length?`${t.resourcePlural} fetched`:`More ${t.resourcePlural} fetched`),u.length===0&&!c&&(Y.warn(`No ${t.resourcePlural} found.`),g({message:`No ${t.resourcePlural} found.`,code:"no_items"},{json:o.json})),u.length===0&&c&&!r)continue;let m=u.map(h=>({item:h,...t.display(h)})),b=m.map(({item:h,label:K,hint:w})=>({value:h.id,label:K,hint:w}));r&&b.unshift({value:qs,label:"None"}),c&&b.push({value:Ns,label:"Fetch more..."});let A=await se({message:`Select a ${t.resource}`,options:b});if(x(A)&&R("Cancelled."),A===qs)return;if(A!==Ns){let h=m.find(({item:K})=>K.id===A);return{id:A,label:h?.label??A}}}}async function y(e,t,o,i){return(await le(e,t,o,i))?.id}var Ws=require("node:util"),sm=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]|\r(?!\n)/g,we=e=>(0,Ws.stripVTControlCharacters)(String(e)).replace(sm,"");function Tt(e){return typeof e=="string"?we(e):Array.isArray(e)?e.map(Tt):e!==null&&typeof e=="object"?Object.fromEntries(Object.entries(e).map(([t,o])=>[t,Tt(o)])):e}V();async function $(e,t){let o=e.permission?{permission:e.permission}:void 0,i=await Z(t,o),r=await Fe(e.loading,()=>e.sdkCall(i),"fetch_error",t,{retryTransient:!0});!t.json&&U()?e.onInteractive(Tt(r)):I(r,{json:t.json})}async function ie(e,t,o,i){let r=o.permission?{permission:o.permission}:void 0,n=await Z(i,r);t||await Ms(e,o.confirmMessage,i),await Fe(o.loading,()=>o.sdkCall(n),"delete_error",i),!i.json&&U()?console.log(o.successMsg):I({object:o.object,id:e,deleted:!0},{json:i.json})}async function W(e,t){let o=e.permission?{permission:e.permission}:void 0,i=await Z(t,o),r=await Fe(e.loading,()=>e.sdkCall(i),"create_error",t);!t.json&&U()?e.onInteractive(Tt(r)):I(r,{json:t.json})}async function O(e,t){let o=e.permission?{permission:e.permission}:void 0,i=await Z(t,o),r=await Fe(e.loading,()=>e.sdkCall(i),e.errorCode,t,{retryTransient:e.retryTransient});!t.json&&U()?console.log(e.successMsg):I(r,{json:t.json})}async function _(e,t){let o=e.permission?{permission:e.permission}:void 0,i=await Z(t,o),r=await Fe(e.loading,()=>e.sdkCall(i),"list_error",t,{retryTransient:!0});!t.json&&U()?e.onInteractive(Tt(r)):I(r,{json:t.json})}V();V();var ue=Ze?{h:String.fromCodePoint(9472),v:String.fromCodePoint(9474),tl:String.fromCodePoint(9484),tr:String.fromCodePoint(9488),bl:String.fromCodePoint(9492),br:String.fromCodePoint(9496),lm:String.fromCodePoint(9500),rm:String.fromCodePoint(9508),tm:String.fromCodePoint(9516),bm:String.fromCodePoint(9524),mm:String.fromCodePoint(9532)}:{h:"-",v:"|",tl:"+",tr:"+",bl:"+",br:"+",lm:"+",rm:"+",tm:"+",bm:"+",mm:"+"};function am(){return process.stdout.columns}function lm(e,t,o){let i=Math.max(...e.map(n=>n.length)),r=Math.max(20,Math.min(o,60));return t.map((n,s)=>{let a=String(s+1),l=`${ue.h}${ue.h} ${a} ${ue.h.repeat(Math.max(0,r-a.length-4))}`,d=e.map((c,u)=>` ${c.padEnd(i)} ${n[u]}`);return[l,...d].join(`
|
|
189
273
|
`)}).join(`
|
|
190
274
|
|
|
191
|
-
`)}function
|
|
192
|
-
`)}
|
|
275
|
+
`)}function j(e,t,o="(no results)"){if(t.length===0)return o;let i=t.map(c=>c.map(we)),r=e.map((c,u)=>Math.max(c.length,...i.map(m=>m[u].length))),n=am();if(n!==void 0&&r.reduce((u,m)=>u+m,0)+3*r.length+1>n)return lm(e,i,n);let s=ue.tl+r.map(c=>ue.h.repeat(c+2)).join(ue.tm)+ue.tr,a=ue.lm+r.map(c=>ue.h.repeat(c+2)).join(ue.mm)+ue.rm,l=ue.bl+r.map(c=>ue.h.repeat(c+2)).join(ue.bm)+ue.br,d=c=>ue.v+" "+c.map((u,m)=>u.padEnd(r[m])).join(` ${ue.v} `)+" "+ue.v;return[s,d(e),a,...i.map(d),l].join(`
|
|
276
|
+
`)}V();var Ar=Ze?String.fromCodePoint(9472):"-";function Vo(e,t){return e.length===0?"(no DNS records)":e.map(i=>{let r=i.name?i.name.includes(".")?i.name:`${i.name}.${t}`:t;return[`${Ar}${Ar} ${i.type} ${Ar.repeat(40)}`,` Name ${r}`,` TTL ${i.ttl}`,` Value ${i.value}`].join(`
|
|
193
277
|
`)}).join(`
|
|
194
278
|
|
|
195
|
-
`)}function
|
|
279
|
+
`)}function Js(e){let t=e.map(o=>[o.name,o.status,o.region,o.id]);return j(["Name","Status","Region","ID"],t,"(no domains)")}function Vs(e){switch(e){case"verified":return"\u2713 Verified";case"pending":return"\u23F3 Pending";case"not_started":return"\u25CB Not started";case"partially_verified":return"\u25D0 Partially verified";case"partially_failed":return"\u25D0 Partially failed";case"failed":case"temporary_failure":return"\u2717 Failed";default:return e}}var ke={resource:"domain",resourcePlural:"domains",fetchItems:(e,{limit:t,after:o})=>e.domains.list({limit:t,...o&&{after:o}}),display:e=>({label:e.name,hint:e.id})};var zs=new p("create").description("Create a new API key and display the token (shown once \u2014 store it immediately)").option("--name <name>","API key name (max 50 characters)").addOption(new z("--permission <permission>","Permission level").choices(["full_access","sending_access"])).option("--domain-id <id>","Restrict a sending_access key to a single domain ID").addHelpText("after",f({context:`Non-interactive: --name is required (no prompts when stdin/stdout is not a TTY).
|
|
196
280
|
|
|
197
281
|
Permissions:
|
|
198
282
|
full_access Full API access (default)
|
|
199
283
|
sending_access Send-only access; optionally scope to a domain with --domain-id`,output:` {"id":"<id>","token":"<token>"}
|
|
200
|
-
The token is only returned at creation time and cannot be retrieved again.`,errorCodes:["auth_error","missing_name","invalid_flags","create_error"],examples:['resend api-keys create --name "Production"','resend api-keys create --name "CI Token" --permission sending_access','resend api-keys create --name "Domain Token" --permission sending_access --domain-id <domain-id>','resend api-keys create --name "Production" --json']})).action(async(e,t)=>{let
|
|
201
|
-
${
|
|
284
|
+
The token is only returned at creation time and cannot be retrieved again.`,errorCodes:["auth_error","missing_name","invalid_flags","create_error"],examples:['resend api-keys create --name "Production"','resend api-keys create --name "CI Token" --permission sending_access','resend api-keys create --name "Domain Token" --permission sending_access --domain-id <domain-id>','resend api-keys create --name "Production" --json']})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=e.name,r=e.permission;if(!i){(!U()||o.json)&&g({message:"Missing --name flag.",code:"missing_name"},{json:o.json});let s=await X({message:"Key name",placeholder:"e.g. My API Key",validate:l=>{if(!l)return"Name is required";if(l.length>50)return"Name must be 50 characters or less"}});x(s)&&R("Cancelled."),i=s;let a=await se({message:"Permission level",options:[{value:"full_access",label:"Full access"},{value:"sending_access",label:"Sending access only"}]});x(a)&&R("Cancelled."),r=a}let n=e.domainId;n!==void 0&&r!=="sending_access"&&g({message:"--domain-id requires --permission sending_access",code:"invalid_flags"},{json:o.json}),!n&&r==="sending_access"&&(n=await y(void 0,ke,o,{optional:!0})),await W({loading:"Creating API key...",sdkCall:s=>s.apiKeys.create({name:i,...r&&{permission:r},...n&&{domain_id:n}}),onInteractive:s=>{console.log(` ${co.default.gray("Name:")} ${i}`),console.log(` ${co.default.gray("ID:")} ${s.id}`),console.log(` ${co.default.gray("Token:")} ${s.token}`),console.log(`
|
|
285
|
+
${co.default.yellow("\u26A0")} Store this token now \u2014 it cannot be retrieved again.`)}},o)});var Ys={resource:"API key",resourcePlural:"API keys",fetchItems:(e,{limit:t,after:o})=>e.apiKeys.list({limit:t,...o&&{after:o}}),display:e=>({label:e.name,hint:e.id})};function Xs(e){let t=e.map(o=>[o.name,o.id,o.created_at,o.last_used_at??""]);return j(["Name","ID","Created","Last used"],t,"(no API keys)")}var Zs=new p("delete").alias("rm").description("Delete an API key \u2014 any services using it will immediately lose access").argument("[id]","API key ID").option("--yes","Skip confirmation prompt").addHelpText("after",f({context:`Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.
|
|
202
286
|
|
|
203
287
|
Warning: Deleting a key is immediate and irreversible. Any service using this key
|
|
204
288
|
will stop authenticating instantly. The current key (used to call this command)
|
|
205
|
-
can delete itself \u2014 the API does not prevent self-deletion.`,output:' {"object":"api-key","id":"<id>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend api-keys delete dacf4072-aa82-4ff3-97de-514ae3000ee0 --yes","resend api-keys delete dacf4072-aa82-4ff3-97de-514ae3000ee0 --yes --json"]})).action(async(e,t,
|
|
206
|
-
ID: ${
|
|
207
|
-
Any services using this key will stop working.`,loading:"Deleting API key...",object:"api-key",successMsg:"API key deleted",sdkCall:
|
|
289
|
+
can delete itself \u2014 the API does not prevent self-deletion.`,output:' {"object":"api-key","id":"<id>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend api-keys delete dacf4072-aa82-4ff3-97de-514ae3000ee0 --yes","resend api-keys delete dacf4072-aa82-4ff3-97de-514ae3000ee0 --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await le(e,Ys,i);await ie(r.id,!!t.yes,{confirmMessage:`Delete API key "${r.label}"?
|
|
290
|
+
ID: ${r.id}
|
|
291
|
+
Any services using this key will stop working.`,loading:"Deleting API key...",object:"api-key",successMsg:"API key deleted",sdkCall:n=>n.apiKeys.remove(r.id)},i)});ge();function H(e,t){let o=parseInt(e,10);return(Number.isNaN(o)||o<1||o>100)&&g({message:"--limit must be an integer between 1 and 100",code:"invalid_limit"},{json:t.json}),o}function Q(e,t,o,i){return t!==void 0&&o!==void 0&&g({message:"Cannot use --after and --before together. Pass only one cursor.",code:"invalid_pagination"},{json:i.json}),t!==void 0?{limit:e,after:t}:o!==void 0?{limit:e,before:o}:{limit:e}}function G(e,t,o){if(!e.has_more||e.data.length===0)return;let i=!!o.before,r=i?e.data[0].id:e.data[e.data.length-1].id,n=i?"--before":"--after",s=o.limit?` --limit ${o.limit}`:"",a=o.apiKey?` --api-key ${dt(o.apiKey)}`:"",l=o.profile?` --profile ${o.profile}`:"";console.log(`
|
|
208
292
|
Fetch the next page:
|
|
209
|
-
$ resend ${t} ${
|
|
210
|
-
Tokens are never included in list responses.`,errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend api-keys list","resend api-keys list --limit 25 --json","resend api-keys list --after <cursor> --json"]})).action(async(e,t)=>{let
|
|
293
|
+
$ resend ${t} ${n} ${r}${s}${a}${l}`)}var ea=new p("list").alias("ls").description("List all API keys (IDs and names \u2014 tokens are never returned by this endpoint)").option("--limit <n>","Maximum number of API keys to return (1-100)","10").option("--after <cursor>","Cursor for forward pagination \u2014 list items after this ID").option("--before <cursor>","Cursor for backward pagination \u2014 list items before this ID").addHelpText("after",f({output:` {"object":"list","has_more":false,"data":[{"id":"<id>","name":"<name>","created_at":"<date>","last_used_at":"<date>|null"}]}
|
|
294
|
+
Tokens are never included in list responses.`,errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend api-keys list","resend api-keys list --limit 25 --json","resend api-keys list --after <cursor> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=H(e.limit,o),r=Q(i,e.after,e.before,o);await _({loading:"Fetching API keys...",sdkCall:n=>n.apiKeys.list(r),onInteractive:n=>{console.log(Xs(n.data)),G(n,"api-keys list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var ta=new p("api-keys").description("Manage API keys for authentication").addHelpText("after",f({context:`Security notes:
|
|
211
295
|
- Tokens are only shown at creation time and cannot be retrieved again.
|
|
212
296
|
- Use sending_access keys with --domain-id for per-domain CI tokens.
|
|
213
|
-
- Deleting a key is immediate \u2014 any service using it loses access instantly.`,examples:["resend api-keys list",'resend api-keys create --name "Production"','resend api-keys create --name "CI Token" --permission sending_access --domain-id <domain-id>',"resend api-keys delete <id> --yes"]})).addCommand(zs).addCommand(
|
|
297
|
+
- Deleting a key is immediate \u2014 any service using it loses access instantly.`,examples:["resend api-keys list",'resend api-keys create --name "Production"','resend api-keys create --name "CI Token" --permission sending_access --domain-id <domain-id>',"resend api-keys delete <id> --yes"]})).addCommand(zs).addCommand(ea,{isDefault:!0}).addCommand(Zs);ge();V();function cm(e){let t=Se();if(e.json){I({profiles:t},{json:!0});return}if(t.length===0){console.log("No profiles configured. Run: resend login");return}U()&&console.log(`
|
|
214
298
|
Profiles
|
|
215
|
-
`);let
|
|
216
|
-
${d.toString()}`);let u=
|
|
217
|
-
${
|
|
299
|
+
`);let o=!1;for(let i of t){let r=i.active?" (active)":"",n=ne(i.name)!==void 0;n&&(o=!0),console.log(` ${i.active?"\u25B8":" "} ${i.name}${r}${n?" (invalid name)":""}`)}o&&U()&&console.log("\n Profiles with invalid names can be renamed via `resend auth rename`."),U()&&console.log("")}var oa=new p("list").description("List all profiles").action((e,t)=>{cm(t.optsWithGlobals())});var ia=require("node:child_process"),uo=fe(ot(),1),Ge="https://resend.com";function zo(e){return new Promise(t=>{let o=process.platform==="win32"?"cmd.exe":process.platform==="darwin"?"open":"xdg-open",i=e.replaceAll('"',""),r=process.platform==="win32"?["/c","start",'""',`"${i}"`]:[e];(0,ia.execFile)(o,r,{timeout:5e3,windowsVerbatimArguments:!0},n=>t(!n))})}async function Re(e,t){let o=await zo(e);t?.json||t?.quiet||(o?console.log(uo.default.dim("Opened"),uo.default.blue(e)):console.warn(uo.default.yellow("Could not open browser. Visit this link:"),uo.default.blue(e)))}var de={emails:`${Ge}/emails`,logs:`${Ge}/logs`,log:e=>`${Ge}/logs/${e}`,templates:`${Ge}/templates`,template:e=>`${Ge}/templates/${e}`,broadcasts:`${Ge}/broadcasts`,broadcast:e=>`${Ge}/broadcasts/${e}`,documentation:`${Ge}/docs`,automations:`${Ge}/automations`,automation:e=>`${Ge}/automations/${e}/editor`,events:`${Ge}/automations/events`};ge();Qo();V();var hr="https://resend.com/api-keys?new=true";async function ra(e,t){let o=e.profile!==void 0?e.profile.trim():void 0;if(o!==void 0){let r=ne(o);return r&&g({message:r,code:"invalid_profile_name"},{json:e.json}),o}if(!U()||e.json)return o;let i=Se();if(i.length>0){let r=[...i.map(s=>({value:s.name,label:`${s.name} (overwrite)`,hint:ne(s.name)?"invalid name":void 0})),{value:"__new__",label:"+ Create new profile"}],n=await se({message:t,options:r});if(x(n)&&R("Login cancelled."),n==="__new__"){let s=await X({message:"Enter a name for the new profile:",validate:l=>ne((l??"").trim())});if(x(s)&&R("Login cancelled."),o=(s??"").trim()||"default",i.some(l=>l.name===o)){let l=await rt({message:`Profile '${o}' already exists. Overwrite?`});(x(l)||!l)&&R("Login cancelled.")}}else if(ne(n)){let s=await Jo(n,e);if(!s)return;o=s}else o=n}else o="default";return o}function na(e){let{noun:t,profileLabel:o,configPath:i,backend:r}=e,n=r.isSecure?`in ${r.name}`:`at ${i}`,s=`${t} stored for profile '${o}' ${n}`;if(U()?Ro(s):console.log(s),!r.isSecure&&process.platform==="linux"){let a="Tip: Install libsecret-tools and a Secret Service provider (e.g. gnome-keyring) to store credentials in secure storage instead of a plaintext file.";U()?Y.info(a):console.log(a)}}async function um(e){let{codeVerifier:t,codeChallenge:o,state:i}=vs(),r=oe("Starting local callback server...",e.quiet),n,s;try{({port:n,waitForCallback:s}=await xs()),r.stop("")}catch(v){r.fail("Failed to start callback server"),g({message:N(v,"Failed to start callback server"),code:"oauth_error"},{json:e.json})}let a=`http://127.0.0.1:${n}/oauth/callback`,l=process.env.RESEND_BASE_URL??"https://api.resend.com",d=new URL(`${l}/oauth/authorize`);d.search=new URLSearchParams({client_id:Ho,response_type:"code",redirect_uri:a,scope:"full_access",state:i,code_challenge:o,code_challenge_method:"S256"}).toString(),await zo(d.toString())?Y.info("Browser opened. Complete authentication to continue."):Y.warn(`Could not open browser. Visit this URL to authenticate:
|
|
300
|
+
${d.toString()}`);let u=oe("Waiting for browser authentication...",e.quiet),m;try{m=await s}catch(v){u.fail("Authentication failed"),g({message:N(v,"Authentication failed"),code:"oauth_error"},{json:e.json})}m.state!==i&&(u.fail("Authentication failed"),g({message:"State mismatch in OAuth callback. Possible CSRF attack.",code:"oauth_state_mismatch"},{json:e.json})),u.stop("Browser authentication complete");let b=oe("Exchanging authorization code...",e.quiet),A;try{A=await Fs({code:m.code,codeVerifier:t,redirectUri:a,clientId:Ho,baseUrl:l})}catch(v){b.fail("Token exchange failed"),g({message:N(v,"Token exchange failed"),code:"oauth_error"},{json:e.json})}b.stop("Authenticated successfully");let h=await ra(e,"Save credentials to which profile?"),K=h||"default",{configPath:w,backend:S}=await Go({access_token:A.access_token,access_token_expires_at:dr(A.access_token),refresh_token:A.refresh_token,scope:A.scope},h);if(h)try{ao(K)}catch(v){g({message:N(v,"Failed to switch profile"),code:"switch_failed"},{json:e.json})}e.json?I({success:!0,config_path:w,profile:K,storage:S.name,scope:A.scope},{json:!0}):na({noun:"Credentials",profileLabel:K,configPath:w,backend:S})}var Yo=new p("login").description("Save a Resend API key").option("--key <key>","API key to store (required in non-interactive mode)").addHelpText("after",f({setup:!0,context:"Non-interactive: --key is required (no prompts will appear when stdin/stdout is not a TTY).",output:' {"success":true,"config_path":"<path>","profile":"<name>"}',errorCodes:["missing_key","invalid_key_format","validation_failed","invalid_profile_name","switch_failed","write_failed","oauth_error","oauth_state_mismatch"],examples:["resend login --key re_123456789","resend login (interactive \u2014 prompts and opens browser)","RESEND_API_KEY=re_123 resend emails send ... (skip login; use env var directly)"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=typeof e.key=="string"?e.key.trim():e.key;if(!i){(!U()||o.json)&&g({message:"Missing --key flag. Provide your API key in non-interactive mode.",code:"missing_key"},{json:o.json}),wn("Resend Authentication");let c=await se({message:"How would you like to authenticate?",options:[{value:"oauth",label:"Login with Resend (opens browser)"},{value:"browser",label:"Get API key from resend.com (opens browser)"},{value:"manual",label:"Enter API key manually"}]});if(x(c)&&R("Login cancelled."),c==="oauth"){await um(o);return}Y.info(`Use a full access API key for complete CLI access.
|
|
301
|
+
${Dt}`),c==="browser"&&(await zo(hr)?Y.info(`Opened ${hr}`):Y.warn(`Could not open browser. Visit ${hr} manually.`));let u=await xn({message:"Enter your Resend API key:",validate:m=>{if(!m)return"API key is required";if(!m.startsWith("re_"))return"API key must start with re_"}});x(u)&&R("Login cancelled."),i=u.trim()}(!i||!i.startsWith("re_"))&&g({message:"Invalid API key format. Key must start with re_",code:"invalid_key_format"},{json:o.json});let r=oe("Validating API key...",o.quiet),n="full_access";try{let c=new kt(i),{error:u}=await c.domains.list();if(u){let m=u;m.name==="restricted_api_key"?(n="sending_access",r.warn("API key is valid (sending access only)")):(r.fail("API key validation failed"),g({message:m.message||"Failed to validate API key",code:"validation_failed"},{json:o.json}))}else r.stop("API key is valid (full access)")}catch(c){r.fail("API key validation failed"),g({message:N(c,"Failed to validate API key"),code:"validation_failed"},{json:o.json})}let s=await ra(o,"Save API key to which profile?"),{configPath:a,backend:l}=await Os(i,s,n),d=s||"default";if(s)try{ao(d)}catch(c){g({message:N(c,"Failed to switch profile"),code:"switch_failed"},{json:o.json})}o.json?I({success:!0,config_path:a,profile:d,storage:l.name,permission:n},{json:!0}):na({noun:"API key",profileLabel:d,configPath:a,backend:l})});var sa=require("node:fs");ge();V();var Xo=new p("logout").description("Remove your saved Resend API key").addHelpText("after",f({setup:!0,context:`Removes the saved API key from secure storage and the credentials file.
|
|
218
302
|
|
|
219
303
|
When --profile is specified, only that profile's entry is removed.
|
|
220
304
|
When no profile is specified, all profiles are removed.
|
|
221
305
|
|
|
222
|
-
If no credentials file exists, exits cleanly with no error.`,output:' {"success":true,"config_path":"<path>"}',errorCodes:["remove_failed"],examples:["resend logout","resend logout --profile staging","resend logout --json"]})).action(async(e,t)=>{let
|
|
306
|
+
If no credentials file exists, exits cleanly with no error.`,output:' {"success":true,"config_path":"<path>"}',errorCodes:["remove_failed"],examples:["resend logout","resend logout --profile staging","resend logout --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=Ut(),r=mr();if(!r&&!(0,sa.existsSync)(i)){!o.json&&U()?console.log("No saved credentials found. Nothing to remove."):I({success:!0,already_logged_out:!0},{json:o.json});return}let n=o.profile,s=!n,a=n??"all";if(!s&&r&&!r.profiles[a]&&g({message:`Profile "${a}" not found. Available profiles: ${Object.keys(r.profiles).join(", ")}`,code:"remove_failed"},{json:o.json}),!o.json&&U()){let l=s?"Remove all saved API keys?":`Remove saved API key for profile '${a}'?`,d=await rt({message:l});(x(d)||!d)&&R("Logout cancelled.")}try{s?await js():await qo(a)}catch(l){g({message:N(l,"Failed to remove credentials"),code:"remove_failed"},{json:o.json})}if(!o.json&&U()){let l=s?"Logged out. All API keys removed.":`Logged out. API key removed for profile '${a}'.`;Ro(l)}else I({success:!0,config_path:i,profile:s?"all":a},{json:o.json})});ge();V();async function dm(e,t){let o=e;if(!o){if(!U()||t.json){g({message:"Missing profile name. Provide a profile name in non-interactive mode.",code:"missing_name"},{json:t.json});return}let i=Se();if(i.length===0){g({message:"No profiles configured. Run `resend login` first.",code:"no_profiles"},{json:t.json});return}let r=await se({message:"Remove which profile?",options:i.map(n=>({value:n.name,label:n.name,hint:n.active?"active":void 0}))});x(r)&&R("Remove cancelled."),o=r}if(!t.json&&U()){let i=await rt({message:`Remove profile '${o}' and its API key?`});(x(i)||!i)&&R("Remove cancelled.")}try{await qo(o)}catch(i){g({message:N(i,"Failed to remove profile"),code:"remove_failed"},{json:t.json});return}t.json?I({success:!0,removed_profile:o},{json:!0}):console.log(`Profile '${o}' removed.`)}var aa=new p("remove").description("Remove a profile").argument("[name]","Profile name to remove").action(async(e,t,o)=>{await dm(e,o.optsWithGlobals())});ge();V();async function pm(e,t,o){let i=e,r=t;if(!i){if(!U()||o.json){g({message:"Missing profile name. Provide old and new names in non-interactive mode.",code:"missing_name"},{json:o.json});return}let n=Se();if(n.length===0){g({message:"No profiles configured. Run `resend login` first.",code:"no_profiles"},{json:o.json});return}let s=await se({message:"Rename which profile?",options:n.map(a=>({value:a.name,label:a.name,hint:a.active?"active":ne(a.name)?"invalid name":void 0}))});x(s)&&R("Rename cancelled."),i=s}if(!r){if(!U()||o.json){g({message:"Missing new name. Provide old and new names in non-interactive mode.",code:"missing_name"},{json:o.json});return}let n=await X({message:`Enter new name for '${i}':`,placeholder:i.replace(/[^a-zA-Z0-9._-]/g,"-"),validate:s=>ne(s)});x(n)&&R("Rename cancelled."),r=n}try{await Mo(i,r)}catch(n){g({message:N(n,"Failed to rename profile"),code:"rename_failed"},{json:o.json});return}o.json?I({success:!0,old_name:i,new_name:r},{json:!0}):console.log(`Profile '${i}' renamed to '${r}'.`)}var la=new p("rename").description("Rename a profile").argument("[old-name]","Current profile name").argument("[new-name]","New profile name").action(async(e,t,o,i)=>{await pm(e,t,i.optsWithGlobals())});ge();V();async function mm(e,t){let o=e;if(!o){if(!U()||t.json){g({message:"Missing profile name. Provide a profile name in non-interactive mode.",code:"missing_name"},{json:t.json});return}let n=Se();if(n.length===0){g({message:"No profiles configured. Run `resend login` first.",code:"no_profiles"},{json:t.json});return}let s=await se({message:"Switch to which profile?",options:n.map(a=>({value:a.name,label:a.name,hint:a.active?"active":ne(a.name)?"invalid name":void 0}))});x(s)&&R("Switch cancelled."),o=s}if(Se().some(n=>n.name===o)){let n=await Jo(o,t);if(!n)return;o=n}try{ao(o)}catch(n){g({message:N(n,"Failed to switch profile"),code:"switch_failed"},{json:t.json});return}t.json?I({success:!0,active_profile:o},{json:!0}):console.log(`Switched to profile '${o}'.`)}var ca=new p("switch").description("Switch the active profile").argument("[name]","Profile name to switch to").action(async(e,t,o)=>{await mm(e,o.optsWithGlobals())});var ua=new p("auth").description("Manage authentication and profiles").addHelpText("after",f({setup:!0,context:`Environment variables:
|
|
223
307
|
RESEND_API_KEY API key (overrides stored credentials)
|
|
224
308
|
RESEND_PROFILE Profile name (overrides config default)
|
|
225
|
-
RESEND_CREDENTIAL_STORE Storage method: "secure_storage" or "file"`,examples:["resend login","resend login --key re_123456789","resend logout","resend auth list","resend auth switch staging","resend auth rename staging production","resend auth remove staging"]})).addCommand(
|
|
309
|
+
RESEND_CREDENTIAL_STORE Storage method: "secure_storage" or "file"`,examples:["resend login","resend login --key re_123456789","resend logout","resend auth list","resend auth switch staging","resend auth rename staging production","resend auth remove staging"]})).addCommand(Yo).addCommand(Xo).addCommand(oa,{isDefault:!0}).addCommand(ca).addCommand(la).addCommand(aa);var br=require("node:fs");function ce(e,t){if(e==="-"){process.stdin.isTTY&&g({message:"No input piped to stdin",code:"stdin_read_error"},{json:t.json});try{return(0,br.readFileSync)(0,"utf-8")}catch{g({message:"Failed to read from stdin",code:"stdin_read_error"},{json:t.json})}}try{return(0,br.readFileSync)(e,"utf-8")}catch{g({message:`Failed to read file: ${e}`,code:"file_read_error"},{json:t.json})}}function St(e,t,o){if(e!==void 0)try{return JSON.parse(e)}catch(i){g({message:`Invalid JSON for ${t}: ${i instanceof Error?i.message:"parse error"}`,code:"invalid_json"},{json:o.json})}}var da=new p("create").description("Create a new automation").option("--name <name>","Automation name").addOption(new z("--status <status>","Initial status").choices(["enabled","disabled"])).option("--steps <json>","Steps array as JSON string").option("--connections <json>","Connections array as JSON string").option("--file <path>",'Path to a JSON file containing the full automation payload (use "-" for stdin)').addHelpText("after",f({context:`Non-interactive: --name and --steps/--connections (or --file) are required.
|
|
226
310
|
|
|
227
311
|
Payload format:
|
|
228
312
|
--file accepts a JSON object with { name, status?, steps, connections }.
|
|
@@ -230,17 +314,17 @@ Payload format:
|
|
|
230
314
|
When using --file, --name/--status/--steps/--connections flags override file values.
|
|
231
315
|
|
|
232
316
|
Step types: trigger, delay, send_email, wait_for_event, condition
|
|
233
|
-
Connection types: default, condition_met, condition_not_met, timeout, event_received`,output:' {"object":"automation","id":"<id>"}',errorCodes:["auth_error","missing_name","missing_steps","missing_connections","invalid_json","file_read_error","create_error"],examples:["resend automations create --file automation.json","cat automation.json | resend automations create --file -","resend automations create --file automation.json --status disabled",`resend automations create --name "Welcome Flow" --steps '[...]' --connections '[...]'`]})).action(async(e,t)=>{let
|
|
234
|
-
This cannot be undone.`,loading:"Deleting automation...",object:"automation",successMsg:"Automation deleted",sdkCall:
|
|
317
|
+
Connection types: default, condition_met, condition_not_met, timeout, event_received`,output:' {"object":"automation","id":"<id>"}',errorCodes:["auth_error","missing_name","missing_steps","missing_connections","invalid_json","file_read_error","create_error"],examples:["resend automations create --file automation.json","cat automation.json | resend automations create --file -","resend automations create --file automation.json --status disabled",`resend automations create --name "Welcome Flow" --steps '[...]' --connections '[...]'`]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i={};if(e.file){let l=ce(e.file,o);try{i=JSON.parse(l)}catch(d){g({message:`Invalid JSON in --file: ${d instanceof Error?d.message:"parse error"}`,code:"invalid_json"},{json:o.json})}(typeof i!="object"||i===null||Array.isArray(i))&&g({message:"--file must contain a JSON object with automation properties (name, steps, connections).",code:"invalid_json"},{json:o.json})}let r=await q(e.name??i.name,{message:"Automation name",placeholder:"e.g. Welcome Flow"},{message:"Missing --name flag.",code:"missing_name"},o),n=St(e.steps,"--steps",o)??i.steps;(!n||!Array.isArray(n)||n.length===0)&&g({message:"Missing or empty steps. Provide --steps as a JSON array or use --file.",code:"missing_steps"},{json:o.json});let s=St(e.connections,"--connections",o)??i.connections;s||g({message:"Missing connections. Provide --connections as a JSON array or use --file (empty array is valid for single-step automations).",code:"missing_connections"},{json:o.json}),Array.isArray(s)||g({message:"--connections must be a JSON array.",code:"invalid_json"},{json:o.json});let a=e.status??i.status;await W({loading:"Creating automation...",sdkCall:l=>l.automations.create({name:r,steps:n,connections:s,...a&&{status:a}}),onInteractive:l=>{console.log(`Automation created: ${l.id}`)}},o)});function pa(e){let t=e.map(o=>[o.name,Cr(o.status),o.created_at,o.id]);return j(["Name","Status","Created","ID"],t,"(no automations)")}function Cr(e){switch(e){case"enabled":return"\u2713 Enabled";case"disabled":return"\u25CB Disabled";default:return e}}var We={resource:"automation",resourcePlural:"automations",fetchItems:(e,{limit:t,after:o})=>e.automations.list({limit:t,...o&&{after:o}}),display:e=>({label:e.name,hint:e.id})};var ma=new p("delete").alias("rm").description("Delete an automation").argument("[id]","Automation ID").option("--yes","Skip confirmation prompt").addHelpText("after",f({context:"Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.",output:' {"object":"automation","id":"<id>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend automations delete <id> --yes","resend automations delete <id> --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,We,i);await ie(r,!!t.yes,{confirmMessage:`Delete automation ${r}?
|
|
318
|
+
This cannot be undone.`,loading:"Deleting automation...",object:"automation",successMsg:"Automation deleted",sdkCall:n=>n.automations.remove(r)},i)});var fa=new p("get").description("Retrieve an automation with its steps and connections").argument("[id]","Automation ID").addHelpText("after",f({output:` Full automation object including steps and connections arrays.
|
|
235
319
|
|
|
236
|
-
Automation status values: enabled | disabled`,errorCodes:["auth_error","fetch_error"],examples:["resend automations get <id>","resend automations get <id> --json"]})).action(async(e,t,
|
|
237
|
-
Steps:`);let s=
|
|
238
|
-
Connections:`);let s=
|
|
320
|
+
Automation status values: enabled | disabled`,errorCodes:["auth_error","fetch_error"],examples:["resend automations get <id>","resend automations get <id> --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,We,i);await $({loading:"Fetching automation...",sdkCall:n=>n.automations.get(r),onInteractive:n=>{if(console.log(`${n.name} \u2014 ${Cr(n.status)}`),console.log(`ID: ${n.id}`),console.log(`Created: ${n.created_at}`),n.updated_at&&console.log(`Updated: ${n.updated_at}`),n.steps.length>0){console.log(`
|
|
321
|
+
Steps:`);let s=n.steps.map(a=>[a.key,a.type]);console.log(j(["Key","Type"],s,"(no steps)"))}if(n.connections.length>0){console.log(`
|
|
322
|
+
Connections:`);let s=n.connections.map(a=>[a.from,a.to,a.type]);console.log(j(["From","To","Type"],s,"(no connections)"))}}},i)});var ga=new p("list").alias("ls").description("List all automations").option("--limit <n>","Maximum number of automations to return (1-100)","10").option("--after <cursor>","Return automations after this cursor (next page)").option("--before <cursor>","Return automations before this cursor (previous page)").addHelpText("after",f({output:' {"object":"list","data":[...],"has_more":true}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend automations list","resend automations list --limit 25 --json","resend automations list --after <cursor> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=H(e.limit,o),r=Q(i,e.after,e.before,o);await _({loading:"Fetching automations...",sdkCall:n=>n.automations.list(r),onInteractive:n=>{console.log(pa(n.data)),G(n,"automations list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var Aa=new p("open").description("Open an automation or the automations list in the Resend dashboard").argument("[id]","Automation ID \u2014 omit to open the automations list").addHelpText("after",f({context:`Opens the Resend dashboard in your default browser.
|
|
239
323
|
With an ID: opens that automation's editor.
|
|
240
|
-
Without an ID: opens the automations list.`,examples:["resend automations open","resend automations open 019d4ef1-8266-71d4-a1aa-60ce5d0eaea7"]})).action(async(e,t,
|
|
324
|
+
Without an ID: opens the automations list.`,examples:["resend automations open","resend automations open 019d4ef1-8266-71d4-a1aa-60ce5d0eaea7"]})).action(async(e,t,o)=>{let i=e?de.automation(e):de.automations,r=o.optsWithGlobals();await Re(i,r)});var ha=new p("get").description("Retrieve details of a specific automation run").option("--automation-id <id>","Automation ID").option("--run-id <id>","Run ID").addHelpText("after",f({output:" Full automation run object with status, trigger, and timestamps.",errorCodes:["auth_error","missing_automation_id","missing_run_id","fetch_error"],examples:["resend automations runs get --automation-id <id> --run-id <id>","resend automations runs get --automation-id <id> --run-id <id> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await q(e.automationId,{message:"Automation ID"},{message:"Missing --automation-id flag.",code:"missing_automation_id"},o),r=await q(e.runId,{message:"Run ID"},{message:"Missing --run-id flag.",code:"missing_run_id"},o);await $({loading:"Fetching automation run...",sdkCall:n=>n.automations.runs.get({automationId:i,runId:r}),onInteractive:n=>{console.log(`Run: ${n.id}`),console.log(`Status: ${n.status}`),n.started_at&&console.log(`Started: ${n.started_at}`),n.completed_at&&console.log(`Completed: ${n.completed_at}`),console.log(`Created: ${n.created_at}`)}},o)});var ba=new p("list").alias("ls").description("List runs for an automation").argument("[automation-id]","Automation ID").option("--status <status>","Filter by status (running, completed, failed, cancelled). Comma-separated.").option("--limit <n>","Maximum number of runs to return (1-100)","10").option("--after <cursor>","Return runs after this cursor (next page)").option("--before <cursor>","Return runs before this cursor (previous page)").addHelpText("after",f({output:' {"object":"list","data":[...],"has_more":true}',errorCodes:["auth_error","missing_id","invalid_limit","list_error"],examples:["resend automations runs <automation-id>","resend automations runs list <automation-id>","resend automations runs list <automation-id> --status running","resend automations runs list <automation-id> --limit 25 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,We,i),n=H(t.limit,i),s=Q(n,t.after,t.before,i);await _({loading:"Fetching automation runs...",sdkCall:a=>a.automations.runs.list({automationId:r,...s,...t.status?{status:t.status}:{}}),onInteractive:a=>{let l=a.data.map(d=>[d.id,d.status,d.started_at??"-",d.completed_at??"-"]);console.log(j(["ID","Status","Started","Completed"],l,"(no runs)")),G(a,`automations runs list ${r}`,{limit:n,before:t.before,apiKey:i.apiKey,profile:i.profile})}},i)});var Ca=new p("runs").description("Manage automation runs").addHelpText("after",f({context:`Runs represent individual executions of an automation.
|
|
241
325
|
Each run is triggered by an event and progresses through the automation's steps.
|
|
242
326
|
|
|
243
|
-
Run status values: running | completed | failed | cancelled`,examples:["resend automations runs <automation-id>","resend automations runs list <automation-id> --limit 25","resend automations runs get --automation-id <id> --run-id <id>"]})).addCommand(
|
|
327
|
+
Run status values: running | completed | failed | cancelled`,examples:["resend automations runs <automation-id>","resend automations runs list <automation-id> --limit 25","resend automations runs get --automation-id <id> --run-id <id>"]})).addCommand(ba,{isDefault:!0}).addCommand(ha);var ya=new p("stop").description("Stop a running automation").argument("[id]","Automation ID").addHelpText("after",f({context:"Stops a running automation by setting its status to disabled and cancelling active runs.",output:' {"object":"automation","id":"<id>","status":"disabled"}',errorCodes:["auth_error","stop_error"],examples:["resend automations stop <id>","resend automations stop <id> --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,We,i);await O({loading:"Stopping automation...",sdkCall:n=>n.automations.stop(r),errorCode:"stop_error",successMsg:"Automation stopped"},i)});var Ua=new p("update").description("Update an automation status (enable or disable)").argument("[id]","Automation ID").addOption(new z("--status <status>","New status").choices(["enabled","disabled"])).addHelpText("after",f({output:' {"object":"automation","id":"<id>","status":"<status>"}',errorCodes:["auth_error","missing_status","update_error"],examples:["resend automations update <id> --status enabled","resend automations update <id> --status disabled --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,We,i),n=await Et(t.status,{message:"Status",options:[{value:"enabled",label:"Enabled"},{value:"disabled",label:"Disabled"}]},{message:"Missing --status flag.",code:"missing_status"},i);await O({loading:"Updating automation...",sdkCall:s=>s.automations.update(r,{status:n}),errorCode:"update_error",successMsg:`Automation updated: ${r} (${n})`},i)});var Ka=new p("automations").description("Manage automations").addHelpText("after",f({context:`Automations are event-driven workflows composed of steps and connections.
|
|
244
328
|
|
|
245
329
|
Steps define the actions (trigger, delay, send_email, wait_for_event, condition).
|
|
246
330
|
Connections define the flow between steps (default, condition_met, condition_not_met, timeout, event_received).
|
|
@@ -250,10 +334,10 @@ Lifecycle:
|
|
|
250
334
|
2. resend automations update <id> --status enabled
|
|
251
335
|
3. resend automations stop <id> (stop automation)
|
|
252
336
|
4. resend automations runs <id> (inspect runs)
|
|
253
|
-
5. resend automations open <id> (view in dashboard)`,examples:["resend automations list",'resend automations create --name "Welcome Flow" --file workflow.json',"resend automations get <id>","resend automations update <id> --status enabled","resend automations stop <id>","resend automations delete <id> --yes","resend automations runs <automation-id>","resend automations runs get --automation-id <id> --run-id <id>","resend automations open <id>"]})).addCommand(
|
|
337
|
+
5. resend automations open <id> (view in dashboard)`,examples:["resend automations list",'resend automations create --name "Welcome Flow" --file workflow.json',"resend automations get <id>","resend automations update <id> --status enabled","resend automations stop <id>","resend automations delete <id> --yes","resend automations runs <automation-id>","resend automations runs get --automation-id <id> --run-id <id>","resend automations open <id>"]})).addCommand(da).addCommand(fa).addCommand(ga,{isDefault:!0}).addCommand(Ua).addCommand(ma).addCommand(ya).addCommand(Aa).addCommand(Ca);async function Zo(e){try{let{data:t,error:o}=await e.domains.list();return o||!t?[]:t.data.filter(i=>i.status==="verified"&&i.capabilities.sending==="enabled").map(i=>i.name)}catch{return[]}}var fm=["noreply","hello"];async function ei(e){let t;if(e.length===1)t=e[0];else{let r=await se({message:"Select a verified domain",options:e.map(n=>({value:n,label:n}))});x(r)&&R("Send cancelled."),t=r}let o=fm.map(r=>({value:`${r}@${t}`,label:`${r}@${t}`}));o.push({value:null,label:"Custom address..."});let i=await se({message:`From address (@${t})`,options:o});if(x(i)&&R("Send cancelled."),i===null){let r=await X({message:"From address",placeholder:`e.g. you@${t}`,validate:n=>!n||!n.includes("@")?"Enter a valid email address":void 0});return x(r)&&R("Send cancelled."),r}return i}var jt=require("node:fs"),Ba=require("node:path");var ti=require("node:fs"),ka=require("node:os"),Ot=fe(require("node:path"),1);function Sa(){return"pkg"in process?require("esbuild-wasm"):require("esbuild")}var va=require("node:fs"),xa=fe(require("node:path"),1);function wa(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Fa=e=>({name:"rendering-utilities-exporter",setup:t=>{t.onLoad({filter:new RegExp(e.map(o=>wa(o)).join("|"))},async({path:o})=>({contents:`${await va.promises.readFile(o,"utf8")};
|
|
254
338
|
export { render } from 'react-email-module-that-will-export-render'
|
|
255
339
|
export { createElement as reactEmailCreateReactElement } from 'react';
|
|
256
|
-
`,loader:
|
|
340
|
+
`,loader:xa.default.extname(o).slice(1)})),t.onResolve({filter:/^react-email-module-that-will-export-render$/},async o=>{let i={kind:"import-statement",importer:o.importer,resolveDir:o.resolveDir,namespace:o.namespace},r=await t.resolve("react-email",i);return r.errors.length===0||(r=await t.resolve("@react-email/components",i),r.errors.length===0)||(r=await t.resolve("@react-email/render",i),r.errors.length>0&&r.errors[0]&&(r.errors[0].text="Failed to import `render` from `react-email` (6.0+), `@react-email/components` (5.x), or `@react-email/render`. Install one of them in your project.")),r})}});async function Ra(e){let t=Ot.default.resolve(e),o=(0,ti.mkdtempSync)(Ot.default.join((0,ka.tmpdir)(),"resend-react-email-"));try{let{build:n}=Sa();await n({bundle:!0,entryPoints:[t],format:"cjs",jsx:"automatic",logLevel:"silent",outExtension:{".js":".cjs"},outdir:o,platform:"node",plugins:[Fa([t])],write:!0})}catch(n){throw(0,ti.rmSync)(o,{recursive:!0,force:!0}),n}let i=Ot.default.basename(t,Ot.default.extname(t));return{cjsPath:Ot.default.join(o,`${i}.cjs`),tmpDir:o}}var Da=require("node:module");async function _a(e){let t=(0,Da.createRequire)(e);delete t.cache[e];let o=t(e);return o.render(o.reactEmailCreateReactElement(o.default,{}),{})}var yr=e=>{e&&(0,jt.rmSync)(e,{recursive:!0,force:!0})},Pe=async(e,t)=>{if(e.trim()==="")return g({message:"--react-email path cannot be empty",code:"react_email_build_error"},{json:t.json});let o=(0,Ba.resolve)(e);if(!(0,jt.existsSync)(o))return g({message:`File not found: ${e}`,code:"react_email_build_error"},{json:t.json});if(!(0,jt.statSync)(o).isFile())return g({message:`--react-email path must be a file, got a directory: ${e}`,code:"react_email_build_error"},{json:t.json});let i=oe("Bundling React Email template...",t.quiet),r;try{let n=await Ra(e);r=n.tmpDir,i.stop("Bundled React Email template");let s=oe("Rendering React Email template...",t.quiet);try{let a=await _a(n.cjsPath);return s.stop("Rendered React Email template"),yr(r),a}catch(a){return s.fail("Failed to render React Email template"),yr(r),g({message:N(a,"Failed to render React Email template"),code:"react_email_render_error"},{json:t.json})}}catch(n){return i.fail("Failed to bundle React Email template"),yr(r),g({message:N(n,"Failed to bundle React Email template"),code:"react_email_build_error"},{json:t.json})}};V();var $e={resource:"segment",resourcePlural:"segments",fetchItems:(e,{limit:t,after:o})=>e.segments.list({limit:t,...o&&{after:o}}),display:e=>({label:e.name,hint:e.id})};function oi(e){let t=e.map(o=>[o.name,o.id,o.created_at]);return j(["Name","ID","Created"],t,"(no segments)")}var pt={resource:"topic",resourcePlural:"topics",fetchItems:e=>e.topics.list().then(t=>({...t,data:t.data?{data:t.data.data,has_more:!1}:null})),display:e=>({label:e.name,hint:e.id})};function Ea(e){let t=e.map(o=>[o.name,o.description??"",o.id,o.created_at]);return j(["Name","Description","ID","Created"],t,"(no topics)")}var Ta=new p("create").description("Create a broadcast draft (or send immediately with --send)").option("--from <address>","Sender address \u2014 required").option("--subject <subject>","Email subject \u2014 required").option("--segment-id <id>","Target segment ID \u2014 required").option("--html <html>","HTML body (supports {{{FIRST_NAME|fallback}}} triple-brace variable interpolation)").option("--html-file <path>",'Path to an HTML file for the body (use "-" for stdin, supports {{{FIRST_NAME|fallback}}} variable interpolation)').option("--text <text>","Plain-text body").option("--text-file <path>",'Path to a plain-text file for the body (use "-" for stdin)').option("--react-email <path>","Path to a React Email template (.tsx) to bundle, render, and use as HTML body").option("--name <name>","Internal label for the broadcast (optional)").option("--reply-to <address>","Reply-to address (optional)").option("--preview-text <text>","Preview text shown in inbox below the subject line (optional)").option("--topic-id <id>","Associate with a topic for subscription filtering (optional)").option("--send","Send immediately on create instead of saving as draft").option("--scheduled-at <datetime>",'Schedule delivery \u2014 ISO 8601 or natural language e.g. "in 1 hour", "tomorrow at 9am ET" (only valid with --send)').option("--dry-run","Validate input and print the create request JSON without calling the API (interactive: type segment/topic IDs; lists are not fetched)").addHelpText("after",f({context:`Non-interactive: --from, --subject, and --segment-id are required.
|
|
257
341
|
Body: provide at least one of --html, --html-file, --text, --text-file, or --react-email.
|
|
258
342
|
|
|
259
343
|
Use --dry-run to print the request JSON without creating a broadcast.
|
|
@@ -265,26 +349,26 @@ Variable interpolation:
|
|
|
265
349
|
Scheduling:
|
|
266
350
|
Use --scheduled-at with --send to schedule delivery.
|
|
267
351
|
Accepts ISO 8601 (e.g. 2026-08-05T11:52:01Z) or natural language (e.g. "in 1 hour").
|
|
268
|
-
--scheduled-at without --send is ignored.`,output:' {"id":"<broadcast-id>"}',errorCodes:["auth_error","missing_from","missing_subject","missing_segment","missing_body","file_read_error","invalid_options","stdin_read_error","react_email_build_error","react_email_render_error","create_error"],examples:['resend broadcasts create --from onboarding@resend.com --subject "Weekly Update" --segment-id 7b1e0a3d-4c5f-4e8a-9b2d-1a3c5e7f9b2d --html "<p>Hello {{{FIRST_NAME|there}}}</p>"','resend broadcasts create --from onboarding@resend.com --subject "Launch" --segment-id 7b1e0a3d-4c5f-4e8a-9b2d-1a3c5e7f9b2d --html-file ./email.html --send','resend broadcasts create --from onboarding@resend.com --subject "Launch" --segment-id 7b1e0a3d-4c5f-4e8a-9b2d-1a3c5e7f9b2d --text "Hello!" --send --scheduled-at "tomorrow at 9am ET"']})).action(async(e,t)=>{let
|
|
352
|
+
--scheduled-at without --send is ignored.`,output:' {"id":"<broadcast-id>"}',errorCodes:["auth_error","missing_from","missing_subject","missing_segment","missing_body","file_read_error","invalid_options","stdin_read_error","react_email_build_error","react_email_render_error","create_error"],examples:['resend broadcasts create --from onboarding@resend.com --subject "Weekly Update" --segment-id 7b1e0a3d-4c5f-4e8a-9b2d-1a3c5e7f9b2d --html "<p>Hello {{{FIRST_NAME|there}}}</p>"','resend broadcasts create --from onboarding@resend.com --subject "Launch" --segment-id 7b1e0a3d-4c5f-4e8a-9b2d-1a3c5e7f9b2d --html-file ./email.html --send','resend broadcasts create --from onboarding@resend.com --subject "Launch" --segment-id 7b1e0a3d-4c5f-4e8a-9b2d-1a3c5e7f9b2d --text "Hello!" --send --scheduled-at "tomorrow at 9am ET"']})).action(async(e,t)=>{let o=t.optsWithGlobals();e.htmlFile==="-"&&e.textFile==="-"&&g({message:"Cannot read both --html-file and --text-file from stdin. Pipe to one and pass the other as a file path.",code:"invalid_options"},{json:o.json}),e.reactEmail&&(e.html||e.htmlFile)&&g({message:"Cannot use --react-email with --html or --html-file",code:"invalid_options"},{json:o.json}),e.html!==void 0&&e.htmlFile!==void 0&&g({message:"--html and --html-file are mutually exclusive.",code:"invalid_options"},{json:o.json}),e.text!==void 0&&e.textFile!==void 0&&g({message:"--text and --text-file are mutually exclusive.",code:"invalid_options"},{json:o.json});let i=e.from,r=e.subject,n=e.segmentId;if(!i&&U()&&!o.json&&!e.dryRun){let c=await Z(o),u=await Zo(c);u.length>0&&(i=await ei(u))}if(!i){(!U()||o.json)&&g({message:"Missing --from flag.",code:"missing_from"},{json:o.json});let c=await X({message:"From address",placeholder:"e.g. onboarding@resend.com",validate:u=>u?void 0:"Required"});x(c)&&R("Cancelled."),i=c}if(!r){(!U()||o.json)&&g({message:"Missing --subject flag.",code:"missing_subject"},{json:o.json});let c=await X({message:"Subject",placeholder:"e.g. Weekly Newsletter",validate:u=>u?void 0:"Required"});x(c)&&R("Cancelled."),r=c}if(!n)if((!U()||o.json)&&g({message:"Missing --segment-id flag.",code:"missing_segment"},{json:o.json}),e.dryRun){let c=await X({message:"Segment ID",placeholder:"e.g. 7b1e0a3d-4c5f-4e8a-9b2d-1a3c5e7f9b2d",validate:u=>u?void 0:"Required"});x(c)&&R("Cancelled."),n=c}else n=await y(void 0,$e,o);let s=e.reactEmail?await Pe(e.reactEmail,o):e.htmlFile?ce(e.htmlFile,o):e.html,a=e.textFile?ce(e.textFile,o):e.text;if(!s&&!a){(!U()||o.json)&&g({message:"Missing body. Provide --html, --html-file, --text, --text-file, or --react-email.",code:"missing_body"},{json:o.json});let c=await X({message:"Body (plain text)",placeholder:"e.g. Hello {{{FIRST_NAME|there}}}!",validate:u=>u?void 0:"Required"});x(c)&&R("Cancelled."),a=c}let l=e.topicId;if(!l&&U()&&!o.json)if(e.dryRun){let c=await X({message:"Topic ID (optional)",placeholder:"Press Enter to skip"});x(c)&&R("Cancelled."),l=c.trim()||void 0}else l=await y(void 0,pt,o,{optional:!0});let d={from:i,subject:r,segmentId:n,...s&&{html:s},...a&&{text:a},...e.name&&{name:e.name},...e.replyTo&&{replyTo:e.replyTo},...e.previewText&&{previewText:e.previewText},...l&&{topicId:l},...e.send&&{send:!0},...e.send&&e.scheduledAt&&{scheduledAt:e.scheduledAt}};if(e.dryRun){I({dryRun:!0,request:d},{json:o.json});return}await W({loading:"Creating broadcast...",sdkCall:c=>c.broadcasts.create(d),onInteractive:c=>{e.send?e.scheduledAt?console.log(`Broadcast scheduled: ${c.id}`):console.log(`Broadcast sent: ${c.id}`):(console.log(`Broadcast created: ${c.id}`),console.log("Status: draft"),console.log(`Send it with: resend broadcasts send ${c.id}`))}},o)});function Ur(e){switch(e){case"draft":return"\u25CB Draft";case"queued":return"\u23F3 Queued";case"sent":return"\u2713 Sent";default:return e}}var It={resource:"broadcast",resourcePlural:"broadcasts",fetchItems:(e,{limit:t,after:o})=>e.broadcasts.list({limit:t,...o&&{after:o}}),display:e=>({label:e.name??"(untitled)",hint:e.id})},Oa={resource:"broadcast",resourcePlural:"broadcasts",fetchItems:(e,{limit:t,after:o})=>e.broadcasts.list({limit:t,...o&&{after:o}}),display:e=>({label:e.name??"(untitled)",hint:`${Ur(e.status)} ${e.id}`}),filter:e=>e.status==="draft"};function ja(e){let t=e.map(o=>[o.name??"(untitled)",o.status,o.created_at,o.id]);return j(["Name","Status","Created","ID"],t,"(no broadcasts)")}var Ia=new p("delete").alias("rm").description("Delete a broadcast \u2014 draft broadcasts are removed; scheduled broadcasts are cancelled before delivery").argument("[id]","Broadcast ID").option("--yes","Skip confirmation prompt").addHelpText("after",f({context:`Warning: Deleting a scheduled broadcast cancels its delivery immediately.
|
|
269
353
|
Only draft and scheduled broadcasts can be deleted; sent broadcasts cannot.
|
|
270
354
|
|
|
271
|
-
Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.`,output:' {"object":"broadcast","id":"<id>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend broadcasts delete d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --yes","resend broadcasts delete d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --yes --json"]})).action(async(e,t,
|
|
272
|
-
ID: ${
|
|
273
|
-
If scheduled, delivery will be cancelled.`,loading:"Deleting broadcast...",object:"broadcast",successMsg:"Broadcast deleted",sdkCall:
|
|
274
|
-
Use this command to retrieve the full broadcast payload.`,output:' {"id":"...","object":"broadcast","name":"...","segment_id":"...","from":"...","subject":"...","status":"draft|queued|sent","created_at":"...","scheduled_at":null,"sent_at":null}',errorCodes:["auth_error","fetch_error"],examples:["resend broadcasts get d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6","resend broadcasts get d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --json"]})).action(async(e,t,
|
|
275
|
-
To retrieve full details (html, from, subject), use: resend broadcasts get <id>`,output:' {"object":"list","has_more":false,"data":[{"id":"...","name":"...","status":"draft|queued|sent","created_at":"..."}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend broadcasts list","resend broadcasts list --limit 5","resend broadcasts list --after d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --limit 10","resend broadcasts list --json"]})).action(async(e,t)=>{let
|
|
355
|
+
Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.`,output:' {"object":"broadcast","id":"<id>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend broadcasts delete d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --yes","resend broadcasts delete d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await le(e,It,i);await ie(r.id,!!t.yes,{confirmMessage:`Delete broadcast "${r.label}"?
|
|
356
|
+
ID: ${r.id}
|
|
357
|
+
If scheduled, delivery will be cancelled.`,loading:"Deleting broadcast...",object:"broadcast",successMsg:"Broadcast deleted",sdkCall:n=>n.broadcasts.remove(r.id)},i)});var Pa=new p("get").description("Retrieve full details for a broadcast including HTML body, status, and delivery times").argument("[id]","Broadcast ID").addHelpText("after",f({context:`Note: The list command returns summary objects without html/text/from/subject.
|
|
358
|
+
Use this command to retrieve the full broadcast payload.`,output:' {"id":"...","object":"broadcast","name":"...","segment_id":"...","from":"...","subject":"...","status":"draft|queued|sent","created_at":"...","scheduled_at":null,"sent_at":null}',errorCodes:["auth_error","fetch_error"],examples:["resend broadcasts get d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6","resend broadcasts get d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,It,i);await $({loading:"Fetching broadcast...",sdkCall:n=>n.broadcasts.get(r),onInteractive:n=>{console.log(`Broadcast: ${n.id}`),console.log(` Status: ${Ur(n.status)}`),console.log(` Name: ${n.name??"(untitled)"}`),console.log(` From: ${n.from??"\u2014"}`),console.log(` Subject: ${n.subject??"\u2014"}`),console.log(` Segment: ${n.segment_id??"\u2014"}`),n.preview_text&&console.log(` Preview: ${n.preview_text}`),n.topic_id&&console.log(` Topic: ${n.topic_id}`),console.log(` Created: ${n.created_at}`),n.scheduled_at&&console.log(` Scheduled: ${n.scheduled_at}`),n.sent_at&&console.log(` Sent: ${n.sent_at}`)}},i)});var $a=new p("list").alias("ls").description('List broadcasts \u2014 returns summary objects (use "get <id>" for full details including html/text)').option("--limit <n>","Maximum number of results to return (1-100)","10").option("--after <cursor>","Cursor for forward pagination \u2014 list items after this ID").option("--before <cursor>","Cursor for backward pagination \u2014 list items before this ID").addHelpText("after",f({context:`Note: List results include name, status, created_at, and id only.
|
|
359
|
+
To retrieve full details (html, from, subject), use: resend broadcasts get <id>`,output:' {"object":"list","has_more":false,"data":[{"id":"...","name":"...","status":"draft|queued|sent","created_at":"..."}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend broadcasts list","resend broadcasts list --limit 5","resend broadcasts list --after d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --limit 10","resend broadcasts list --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=H(e.limit,o),r=Q(i,e.after,e.before,o);await _({loading:"Fetching broadcasts...",sdkCall:n=>n.broadcasts.list(r),onInteractive:n=>{console.log(ja(n.data)),G(n,"broadcasts list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var Ha=new p("open").description("Open a broadcast or the broadcasts list in the Resend dashboard").argument("[id]","Broadcast ID \u2014 omit to open the broadcasts list").addHelpText("after",f({context:`Opens the Resend dashboard in your default browser.
|
|
276
360
|
With an ID: opens that broadcast's page for viewing or editing.
|
|
277
|
-
Without an ID: opens the broadcasts list.`,examples:["resend broadcasts open","resend broadcasts open d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6"]})).action(async(e,t,
|
|
361
|
+
Without an ID: opens the broadcasts list.`,examples:["resend broadcasts open","resend broadcasts open d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6"]})).action(async(e,t,o)=>{let i=e?de.broadcast(e):de.broadcasts,r=o.optsWithGlobals();await Re(i,r)});var Qa=new p("send").description("Send a draft broadcast (API-created drafts only \u2014 dashboard broadcasts cannot be sent via API)").argument("[id]","Broadcast ID").option("--scheduled-at <datetime>",'Schedule delivery \u2014 ISO 8601 or natural language e.g. "in 1 hour", "tomorrow at 9am ET"').addHelpText("after",f({context:`Note: Only broadcasts created via the API can be sent via this command.
|
|
278
362
|
Broadcasts created in the Resend dashboard cannot be sent programmatically.
|
|
279
363
|
|
|
280
364
|
Scheduling:
|
|
281
365
|
--scheduled-at accepts ISO 8601 (e.g. 2026-08-05T11:52:01Z) or
|
|
282
|
-
natural language (e.g. "in 1 hour", "tomorrow at 9am ET").`,output:' {"id":"<broadcast-id>"}',errorCodes:["auth_error","send_error"],examples:["resend broadcasts send d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6",'resend broadcasts send d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --scheduled-at "in 1 hour"','resend broadcasts send d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --scheduled-at "2026-08-05T11:52:01Z" --json']})).action(async(e,t,
|
|
366
|
+
natural language (e.g. "in 1 hour", "tomorrow at 9am ET").`,output:' {"id":"<broadcast-id>"}',errorCodes:["auth_error","send_error"],examples:["resend broadcasts send d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6",'resend broadcasts send d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --scheduled-at "in 1 hour"','resend broadcasts send d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --scheduled-at "2026-08-05T11:52:01Z" --json']})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,Oa,i);await O({loading:t.scheduledAt?"Scheduling broadcast...":"Sending broadcast...",sdkCall:n=>n.broadcasts.send(r,{...t.scheduledAt&&{scheduledAt:t.scheduledAt}}),errorCode:"send_error",successMsg:t.scheduledAt?"Broadcast scheduled":"Broadcast sent",permission:"sending_access"},i)});var Ga=new p("update").description("Update a draft broadcast \u2014 only drafts can be updated; sent broadcasts are immutable").argument("[id]","Broadcast ID").option("--from <address>","Update sender address").option("--subject <subject>","Update subject").option("--html <html>","Update HTML body (supports {{{FIRST_NAME|fallback}}} variable interpolation)").option("--html-file <path>",'Path to an HTML file to replace the body (use "-" for stdin, supports {{{FIRST_NAME|fallback}}} variable interpolation)').option("--text <text>","Update plain-text body").option("--text-file <path>",'Path to a plain-text file to replace the body (use "-" for stdin)').option("--react-email <path>","Path to a React Email template (.tsx) to bundle, render, and use as HTML body").option("--name <name>","Update internal label").addHelpText("after",f({context:`Note: Only draft broadcasts can be updated.
|
|
283
367
|
If the broadcast is already sent or sending, the API will return an error.
|
|
284
368
|
|
|
285
369
|
Variable interpolation:
|
|
286
370
|
HTML bodies support triple-brace syntax for contact properties.
|
|
287
|
-
Example: {{{FIRST_NAME|Friend}}} \u2014 uses FIRST_NAME or falls back to "Friend".`,output:' {"id":"<broadcast-id>"}',errorCodes:["auth_error","no_changes","file_read_error","invalid_options","stdin_read_error","react_email_build_error","react_email_render_error","update_error"],examples:['resend broadcasts update d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --subject "Updated Subject"',"resend broadcasts update d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --html-file ./new-email.html",'resend broadcasts update d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --name "Q1 Newsletter" --from "onboarding@resend.com" --json','echo "<p>New content</p>" | resend broadcasts update d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --html-file -']})).action(async(e,t,
|
|
371
|
+
Example: {{{FIRST_NAME|Friend}}} \u2014 uses FIRST_NAME or falls back to "Friend".`,output:' {"id":"<broadcast-id>"}',errorCodes:["auth_error","no_changes","file_read_error","invalid_options","stdin_read_error","react_email_build_error","react_email_render_error","update_error"],examples:['resend broadcasts update d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --subject "Updated Subject"',"resend broadcasts update d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --html-file ./new-email.html",'resend broadcasts update d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --name "Q1 Newsletter" --from "onboarding@resend.com" --json','echo "<p>New content</p>" | resend broadcasts update d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --html-file -']})).action(async(e,t,o)=>{let i=o.optsWithGlobals();t.from==null&&t.subject==null&&t.html==null&&t.htmlFile==null&&t.text==null&&t.textFile==null&&t.reactEmail==null&&t.name==null&&g({message:"Provide at least one option to update: --from, --subject, --html, --html-file, --text, --text-file, --react-email, or --name.",code:"no_changes"},{json:i.json}),t.htmlFile==="-"&&t.textFile==="-"&&g({message:"Cannot read both --html-file and --text-file from stdin. Pipe to one and pass the other as a file path.",code:"invalid_options"},{json:i.json}),t.reactEmail!=null&&(t.html!=null||t.htmlFile!=null)&&g({message:"Cannot use --react-email with --html or --html-file",code:"invalid_options"},{json:i.json}),t.html!=null&&t.htmlFile!=null&&g({message:"--html and --html-file are mutually exclusive.",code:"invalid_options"},{json:i.json}),t.text!=null&&t.textFile!=null&&g({message:"--text and --text-file are mutually exclusive.",code:"invalid_options"},{json:i.json});let r=await y(e,It,i),n=t.reactEmail!=null?await Pe(t.reactEmail,i):t.htmlFile!=null?ce(t.htmlFile,i):t.html,s=t.textFile!=null?ce(t.textFile,i):t.text;await O({loading:"Updating broadcast...",sdkCall:a=>a.broadcasts.update(r,{...t.from!=null&&{from:t.from},...t.subject!=null&&{subject:t.subject},...n!=null&&{html:n},...s!=null&&{text:s},...t.name!=null&&{name:t.name}}),errorCode:"update_error",successMsg:`Broadcast updated: ${r}`},i)});var Na=new p("broadcasts").description("Manage broadcasts").addHelpText("after",f({context:`Lifecycle:
|
|
288
372
|
Broadcasts follow a draft \u2192 send flow:
|
|
289
373
|
1. create \u2014 creates a draft (or sends immediately with --send)
|
|
290
374
|
2. send \u2014 sends an API-created draft (dashboard broadcasts cannot be sent via API)
|
|
@@ -295,25 +379,25 @@ Template variables:
|
|
|
295
379
|
Example: {{{FIRST_NAME|Friend}}} \u2014 uses FIRST_NAME or falls back to "Friend".
|
|
296
380
|
|
|
297
381
|
Scheduling:
|
|
298
|
-
--scheduled-at accepts ISO 8601 or natural language e.g. "in 1 hour", "tomorrow at 9am ET".`,examples:["resend broadcasts list",'resend broadcasts create --from onboarding@resend.com --subject "Launch" --segment-id 7b1e0a3d-4c5f-4e8a-9b2d-1a3c5e7f9b2d --html "<p>Hi {{{FIRST_NAME|there}}}</p>"',"resend broadcasts send d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6",'resend broadcasts send d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --scheduled-at "in 1 hour"',"resend broadcasts get d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6",'resend broadcasts update d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --subject "Updated Subject"',"resend broadcasts delete d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --yes","resend broadcasts open","resend broadcasts open d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6"]})).addCommand(
|
|
299
|
-
`)}function
|
|
300
|
-
`)}function Wa(e){let t=e.name,
|
|
301
|
-
`)}function
|
|
302
|
-
`)}var
|
|
303
|
-
In machine mode (piped, CI, or --json), the tree is JSON you can feed to agents or scripts.`,examples:["resend commands","resend commands --json",'resend commands | jq ".subcommands[].name"']})).action((e,t)=>{let
|
|
304
|
-
`),process.exit(1));let
|
|
305
|
-
`),
|
|
306
|
-
fpath=(${
|
|
307
|
-
`,a=(0,
|
|
382
|
+
--scheduled-at accepts ISO 8601 or natural language e.g. "in 1 hour", "tomorrow at 9am ET".`,examples:["resend broadcasts list",'resend broadcasts create --from onboarding@resend.com --subject "Launch" --segment-id 7b1e0a3d-4c5f-4e8a-9b2d-1a3c5e7f9b2d --html "<p>Hi {{{FIRST_NAME|there}}}</p>"',"resend broadcasts send d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6",'resend broadcasts send d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --scheduled-at "in 1 hour"',"resend broadcasts get d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6",'resend broadcasts update d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --subject "Updated Subject"',"resend broadcasts delete d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6 --yes","resend broadcasts open","resend broadcasts open d1c2b3a4-5e6f-7a8b-9c0d-e1f2a3b4c5d6"]})).addCommand(Ta).addCommand(Ha).addCommand(Qa).addCommand(Pa).addCommand($a,{isDefault:!0}).addCommand(Ga).addCommand(Ia);function po(e){let t=[];for(let i of e.commands)i._hidden||t.push(po(i));let o=[];for(let i of e.options)i.hidden||o.push({long:i.long,short:i.short,description:i.description,takesValue:i.required||i.optional,choices:i.argChoices});return{name:e.name(),aliases:e.aliases(),description:e.description(),subcommands:t,options:o}}function mo(e,t,o){let i=t?`${t} ${e.name}`:e.name,r=[],n=[];for(let a of e.subcommands){n.push({name:a.name,description:a.description});for(let l of a.aliases)n.push({name:l,description:a.description})}let s=[...e.options,...o];r.push({path:i,subcommands:n,options:s});for(let a of e.subcommands)r.push(...mo(a,i,o));return r}function Kr(e){let t=new Set;function o(i){for(let r of i.options)r.takesValue&&(r.long&&t.add(r.long),r.short&&t.add(r.short));for(let r of i.subcommands)o(r)}return o(e),[...t]}function Ma(e){let t=mo(e,"",[]),o=[],i=e.name;o.push(`# bash completion for ${i}`),o.push(`# Generated by: ${i} completion bash`),o.push(""),o.push(`_${i}_completions() {`),o.push(" local cur prev words cword"),o.push(" if type _init_completion &>/dev/null; then _init_completion || return; else"),o.push(' cur="${COMP_WORDS[COMP_CWORD]}"'),o.push(' prev="${COMP_WORDS[COMP_CWORD-1]}"'),o.push(' words=("${COMP_WORDS[@]}")'),o.push(" cword=$COMP_CWORD"),o.push(" fi"),o.push("");let n=Kr(e).join("|");o.push(' local cmd_path=""'),o.push(" local i=1"),o.push(" while [ $i -lt $cword ]; do"),o.push(' case "${words[$i]}" in'),n&&o.push(` ${n}) i=$((i + 1)) ;;`),o.push(" -*) ;;"),o.push(' *) cmd_path="${cmd_path:+$cmd_path }${words[$i]}" ;;'),o.push(" esac"),o.push(" i=$((i + 1))"),o.push(" done"),o.push(""),o.push(' case "$cmd_path" in');for(let s of t){let a=s.path===e.name?"":s.path.replace(`${e.name} `,""),l=s.options.filter(h=>h.choices&&h.long),d=s.options.map(h=>h.long).filter(Boolean).join(" "),c=s.subcommands.map(h=>h.name).join(" "),u=l.length>0,m=d.length>0,b=c.length>0;if(!u&&!m&&!b)continue;o.push(` "${a}")`);let A=s.options.filter(h=>h.takesValue&&!h.choices);if(u||A.length>0){o.push(' case "$prev" in');for(let h of l)o.push(` ${h.long}) COMPREPLY=($(compgen -W "${h.choices?.join(" ")}" -- "$cur")); return ;;`);if(A.length>0){let h=A.flatMap(K=>[K.long,K.short].filter(Boolean)).join("|");o.push(` ${h}) return ;;`)}o.push(" esac")}m&&(o.push(' if [[ "$cur" == -* ]]; then'),o.push(` COMPREPLY=($(compgen -W "${d}" -- "$cur")); return`),o.push(" fi")),b&&o.push(` COMPREPLY=($(compgen -W "${c}" -- "$cur"))`),o.push(" ;;")}return o.push(" esac"),o.push("}"),o.push(""),o.push(`complete -o default -F _${i}_completions ${i}`),o.join(`
|
|
383
|
+
`)}function La(e){let t=mo(e,"",[]),o=[],i=e.name;o.push(`#compdef ${i}`),o.push(`# zsh completion for ${i}`),o.push(`# Generated by: ${i} completion zsh`),o.push(""),o.push(`_${i}() {`),o.push(" local cur prev cmd_path"),o.push(' cur="${words[$CURRENT]}"'),o.push(' prev="${words[$CURRENT-1]}"'),o.push("");let n=Kr(e).join("|");o.push(' cmd_path=""'),o.push(" for ((i=2; i < CURRENT; i++)); do"),o.push(' case "${words[$i]}" in'),n&&o.push(` ${n}) ((i++)) ;;`),o.push(" -*) ;;"),o.push(' *) cmd_path="${cmd_path:+$cmd_path }${words[$i]}" ;;'),o.push(" esac"),o.push(" done"),o.push(""),o.push(' case "$cmd_path" in');for(let s of t){let a=s.path===e.name?"":s.path.replace(`${e.name} `,""),l=s.options.filter(m=>m.choices&&m.long),d=s.options.filter(m=>m.long),c=s.subcommands.length>0;o.push(` "${a}")`);let u=s.options.filter(m=>m.takesValue&&!m.choices);if(l.length>0||u.length>0){o.push(' case "$prev" in');for(let m of l)o.push(` ${m.long}) compadd -- ${m.choices?.join(" ")}; return ;;`);if(u.length>0){let m=u.flatMap(b=>[b.long,b.short].filter(Boolean)).join("|");o.push(` ${m}) _files; return ;;`)}o.push(" esac")}if(d.length>0){o.push(' if [[ "$cur" == -* ]]; then');let m=d.map(b=>`"${b.long}:${qa(b.description)}"`).join(" ");o.push(` local -a opts=(${m}); _describe 'option' opts; return`),o.push(" fi")}if(c){let m=s.subcommands.map(b=>`"${b.name}:${qa(b.description)}"`).join(" ");o.push(` local -a cmds=(${m}); _describe 'command' cmds`)}else o.push(" _files");o.push(" ;;")}return o.push(" esac"),o.push("}"),o.push(""),o.push(`compdef _${i} ${i}`),o.join(`
|
|
384
|
+
`)}function Wa(e){let t=e.name,o=mo(e,"",[]),i=[];i.push(`# fish completion for ${t}`),i.push(`# Generated by: ${t} completion fish`),i.push("");let r=o[0];for(let n of r.subcommands)i.push(`complete -c ${t} -n "__fish_use_subcommand" -a "${n.name}" -d "${ii(n.description)}"`);for(let n of e.options)if(n.long){let s=n.long.replace("--",""),a=`complete -c ${t} -l "${s}"`;n.short&&(a+=` -s "${n.short.replace("-","")}"`),n.takesValue&&(a+=" -r"),n.choices&&(a+=` -a "${n.choices.join(" ")}"`),a+=` -d "${ii(n.description)}"`,i.push(a)}for(let n of o.slice(1)){let s=n.path.split(" ").slice(1),l=`__fish_seen_subcommand_from ${s[s.length-1]}`;for(let d of n.subcommands)i.push(`complete -c ${t} -n "${l}" -a "${d.name}" -d "${ii(d.description)}"`);for(let d of n.options)if(d.long){let c=d.long.replace("--",""),u=`complete -c ${t} -n "${l}" -l "${c}"`;d.short&&(u+=` -s "${d.short.replace("-","")}"`),d.takesValue&&(u+=" -r"),d.choices&&(u+=` -a "${d.choices.join(" ")}"`),u+=` -d "${ii(d.description)}"`,i.push(u)}}return i.join(`
|
|
385
|
+
`)}function qa(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/:/g,"\\:")}function ii(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function Ja(e){let t=e.name,o=mo(e,"",[]),i=[];i.push(`# PowerShell completion for ${t}`),i.push(`# Generated by: ${t} completion powershell`),i.push(""),i.push(`Register-ArgumentCompleter -Native -CommandName ${t} -ScriptBlock {`),i.push(" param($wordToComplete, $commandAst, $cursorPosition)"),i.push(""),i.push(' $words = $commandAst.ToString().Substring(0, $cursorPosition) -split "\\s+"');let n=Kr(e).map(s=>`"${s}"`).join(", ");i.push(" $cmdPath = @()"),i.push(` $valueFlags = @(${n})`),i.push(" for ($i = 1; $i -lt $words.Count - 1; $i++) {"),i.push(" if ($valueFlags -contains $words[$i]) { $i++; continue }"),i.push(' if ($words[$i] -notlike "-*") { $cmdPath += $words[$i] }'),i.push(" }"),i.push(' $joined = $cmdPath -join " "'),i.push(" $cur = $words[-1]"),i.push(' if ($words.Count -eq 1) { $cur = "" }'),i.push(""),i.push(' $prev = if ($words.Count -ge 2) { $words[-2] } else { "" }'),i.push(""),i.push(" switch ($joined) {");for(let s of o){let a=s.path===e.name?"":s.path.replace(`${e.name} `,""),l=s.options.filter(h=>h.choices&&h.long),d=s.options.map(h=>h.long).filter(Boolean).map(h=>`"${h}"`).join(", "),c=s.subcommands.map(h=>`"${h.name}"`).join(", "),u=l.length>0,m=d.length>0,b=c.length>0;if(!u&&!m&&!b)continue;i.push(` "${a}" {`);let A=s.options.filter(h=>h.takesValue&&!h.choices);if(u||A.length>0){i.push(" switch ($prev) {");for(let h of l){let K=h.choices?.map(w=>`"${w}"`).join(", ");i.push(` "${h.long}" { @(${K}) | Where-Object { $_ -like "$cur*" } | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_) }; return }`)}if(A.length>0){let h=A.flatMap(K=>[K.long,K.short].filter(Boolean)).map(K=>`"${K}"`).join(", ");i.push(` { $_ -in @(${h}) } { return }`)}i.push(" }")}m&&(i.push(' if ($cur -like "-*") {'),i.push(` @(${d}) | Where-Object { $_ -like "$cur*" } | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_) }; return`),i.push(" }")),b&&i.push(` @(${c}) | Where-Object { $_ -like "$cur*" } | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_) }`),i.push(" }")}return i.push(" }"),i.push("}"),i.join(`
|
|
386
|
+
`)}var Va=new p("commands").description("Print the full command tree as JSON (for agents and tooling)").addHelpText("after",f({context:`Outputs every subcommand, option, and description from the CLI definition.
|
|
387
|
+
In machine mode (piped, CI, or --json), the tree is JSON you can feed to agents or scripts.`,examples:["resend commands","resend commands --json",'resend commands | jq ".subcommands[].name"']})).action((e,t)=>{let o=t.parent;if(!o)throw new Error("commands must be registered on the root program");let i=t.optsWithGlobals(),r=po(o);I(r,{json:i.json})});var pe=require("node:fs"),mt=require("node:os"),Te=require("node:path");V();var Xa=["bash","zsh","fish","powershell"],ri="# resend shell completion";function gm(){let e=process.env.SHELL;if(e){let t=(0,Te.basename)(e);if(t==="bash")return"bash";if(t==="zsh")return"zsh";if(t==="fish")return"fish"}if(process.env.PSModulePath)return"powershell"}async function Am(e){if(e)return e;let t=gm();if(t)return t;U()||(process.stderr.write(`error: could not detect shell. Pass the shell name explicitly.
|
|
388
|
+
`),process.exit(1));let o=await se({message:"Which shell do you use?",options:Xa.map(i=>({value:i,label:i}))});return x(o)&&R("Cancelled."),o}function za(e){switch(e){case"bash":return process.platform==="darwin"?(0,Te.join)((0,mt.homedir)(),".bash_profile"):(0,Te.join)((0,mt.homedir)(),".bashrc");case"zsh":return(0,Te.join)((0,mt.homedir)(),".zshrc");case"powershell":return process.platform==="win32"?(0,Te.join)((0,mt.homedir)(),"Documents","PowerShell","Microsoft.PowerShell_profile.ps1"):(0,Te.join)((0,mt.homedir)(),".config","powershell","Microsoft.PowerShell_profile.ps1")}}function hm(e,t){switch(e){case"bash":return Ma(t);case"zsh":return La(t);case"fish":return Wa(t);case"powershell":return Ja(t)}}function Ya(e,t,o){(0,pe.existsSync)(e)||(0,pe.mkdirSync)(e,{recursive:!0});let i=(0,Te.join)(e,t);return(0,pe.writeFileSync)(i,`${o}
|
|
389
|
+
`),i}function bm(e,t){switch(e){case"zsh":{let o=(0,Te.join)((0,mt.homedir)(),".zsh","completions"),i=Ya(o,"_resend",t);Y.success(`Completions written to ${i}`);let r=za(e),n=!0;if((0,pe.existsSync)(r)&&(0,pe.readFileSync)(r,"utf8").includes(o)&&(n=!1),n){let s=`${ri}
|
|
390
|
+
fpath=(${o} $fpath)
|
|
391
|
+
`,a=(0,pe.existsSync)(r)?(0,pe.readFileSync)(r,"utf8"):"",l=a.match(/^.*compinit.*$/m);if(l){let d=a.indexOf(l[0]),c=a.slice(0,d),u=a.slice(d);(0,pe.writeFileSync)(r,`${c}${s}
|
|
308
392
|
${u}`)}else{let d=`
|
|
309
393
|
${s}autoload -Uz compinit && compinit
|
|
310
|
-
`;(0,
|
|
311
|
-
${
|
|
394
|
+
`;(0,pe.writeFileSync)(r,d,{flag:"a"})}Y.info(`Added completion path to ${r}`)}Y.info("Restart your shell to activate completions.");return}case"fish":{let o=(0,Te.join)((0,mt.homedir)(),".config","fish","completions"),i=Ya(o,"resend.fish",t);Y.success(`Completions written to ${i}`),Y.info("Completions will be available in new fish sessions.");return}case"bash":case"powershell":{let o=za(e),i=e==="powershell"?`
|
|
395
|
+
${ri}
|
|
312
396
|
resend completion powershell | Invoke-Expression
|
|
313
397
|
`:`
|
|
314
|
-
${
|
|
398
|
+
${ri}
|
|
315
399
|
eval "$(resend completion ${e})"
|
|
316
|
-
`;if((0,
|
|
400
|
+
`;if((0,pe.existsSync)(o)&&(0,pe.readFileSync)(o,"utf8").includes(ri)){Y.info(`Completions already installed in ${o}`);return}let r=(0,Te.dirname)(o);(0,pe.existsSync)(r)||(0,pe.mkdirSync)(r,{recursive:!0}),(0,pe.writeFileSync)(o,i,{flag:"a"}),Y.success(`Completions added to ${o}`),Y.info("Restart your shell to activate completions.");return}}}var Za=new p("completion").description("Generate shell completion script").addArgument(new Jr("[shell]","Shell type").choices(Xa)).option("--install","Install completions into your shell profile").addHelpText("after",f({context:`Outputs a completion script for the given shell. The shell is auto-detected
|
|
317
401
|
from $SHELL when not specified.
|
|
318
402
|
|
|
319
403
|
Quick setup:
|
|
@@ -333,7 +417,7 @@ Manual setup:
|
|
|
333
417
|
PowerShell (add to $PROFILE):
|
|
334
418
|
resend completion powershell >> $PROFILE
|
|
335
419
|
|
|
336
|
-
Homebrew users: completions may be configured automatically by your formula.`,examples:["resend completion --install","resend completion bash","resend completion zsh",'eval "$(resend completion bash)"']})).action(async(e,t,
|
|
420
|
+
Homebrew users: completions may be configured automatically by your formula.`,examples:["resend completion --install","resend completion bash","resend completion zsh",'eval "$(resend completion bash)"']})).action(async(e,t,o)=>{let i=await Am(e),r=o.parent;if(!r)throw new Error("completion command must be registered under a parent");let n=po(r),s=hm(i,n);if(t.install){bm(i,s);return}if(!e&&U()){o.help();return}console.log(s)});var el=new p("create").description("Create a new contact property definition").addOption(new z("--key <key>","Property key name, used in broadcast template interpolation (e.g. company_name, department)")).addOption(new z("--type <type>","Property data type: 'string' for text values, 'number' for numeric values").choices(["string","number"])).option("--fallback-value <value>","Default value used in broadcast templates when a contact has no value set for this property").addHelpText("after",f({context:`Property keys are used as identifiers in broadcast HTML template interpolation:
|
|
337
421
|
{{{PROPERTY_NAME|fallback}}} \u2014 triple-brace syntax substitutes the contact's value
|
|
338
422
|
{{{company_name|Unknown}}} \u2014 falls back to "Unknown" if the property is not set
|
|
339
423
|
|
|
@@ -341,20 +425,20 @@ Reserved keys (cannot be used): FIRST_NAME, LAST_NAME, EMAIL, UNSUBSCRIBE_URL
|
|
|
341
425
|
|
|
342
426
|
Non-interactive: --key and --type are required. --fallback-value is optional.
|
|
343
427
|
Warning: do not create properties with reserved key names \u2014 they will conflict with
|
|
344
|
-
built-in contact fields and may cause unexpected behavior in broadcasts.`,output:' {"object":"contact_property","id":"<id>"}',errorCodes:["auth_error","missing_key","missing_type","invalid_fallback_value","create_error"],examples:["resend contact-properties create --key company_name --type string",'resend contact-properties create --key company_name --type string --fallback-value "Unknown"',"resend contact-properties create --key employee_count --type number --fallback-value 0","resend contact-properties create --key department --type string --json"]})).action(async(e,t)=>{let
|
|
428
|
+
built-in contact fields and may cause unexpected behavior in broadcasts.`,output:' {"object":"contact_property","id":"<id>"}',errorCodes:["auth_error","missing_key","missing_type","invalid_fallback_value","create_error"],examples:["resend contact-properties create --key company_name --type string",'resend contact-properties create --key company_name --type string --fallback-value "Unknown"',"resend contact-properties create --key employee_count --type number --fallback-value 0","resend contact-properties create --key department --type string --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await q(e.key,{message:"Property key",placeholder:"e.g. company_name"},{message:"Missing --key flag.",code:"missing_key"},o),r=await Et(e.type,{message:"Property data type",options:[{value:"string",label:"string \u2014 text values"},{value:"number",label:"number \u2014 numeric values"}]},{message:"Missing --type flag.",code:"missing_type"},o),n;if(e.fallbackValue!==void 0)if(r==="number"){let a=parseFloat(e.fallbackValue);Number.isNaN(a)&&g({message:"--fallback-value must be a valid number for number-type properties.",code:"invalid_fallback_value"},{json:o.json}),n=a}else n=e.fallbackValue;let s={key:i,type:r,...n!==void 0&&{fallbackValue:n}};await W({loading:"Creating contact property...",sdkCall:a=>a.contactProperties.create(s),onInteractive:a=>{console.log(`Contact property created: ${a.id}`)}},o)});var Pt={resource:"contact property",resourcePlural:"contact properties",fetchItems:(e,{limit:t,after:o})=>e.contactProperties.list({limit:t,...o&&{after:o}}),display:e=>({label:`${e.key} (${e.type})`,hint:e.id})};function tl(e){let t=e.map(o=>[o.key,o.type,o.fallbackValue!=null?String(o.fallbackValue):"",o.id,o.createdAt]);return j(["Key","Type","Fallback Value","ID","Created"],t,"(no contact properties)")}var ol=new p("delete").alias("rm").description("Delete a contact property definition").argument("[id]","Contact property UUID").option("--yes","Skip the confirmation prompt (required in non-interactive mode)").addHelpText("after",f({context:`WARNING: Deleting a property definition removes that property value from ALL contacts
|
|
345
429
|
permanently. This cannot be undone, and any broadcasts that reference this property key
|
|
346
430
|
via {{{PROPERTY_NAME}}} will render an empty string or their inline fallback instead.
|
|
347
431
|
|
|
348
|
-
Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.`,output:' {"object":"contact_property","id":"<id>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend contact-properties delete b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --yes","resend contact-properties delete b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --yes --json"]})).action(async(e,t,
|
|
349
|
-
ID: ${
|
|
350
|
-
This will remove this property from ALL contacts permanently.`,loading:"Deleting contact property...",object:"contact_property",successMsg:"Contact property deleted",sdkCall:
|
|
432
|
+
Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.`,output:' {"object":"contact_property","id":"<id>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend contact-properties delete b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --yes","resend contact-properties delete b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await le(e,Pt,i);await ie(r.id,!!t.yes,{confirmMessage:`Delete contact property "${r.label}"?
|
|
433
|
+
ID: ${r.id}
|
|
434
|
+
This will remove this property from ALL contacts permanently.`,loading:"Deleting contact property...",object:"contact_property",successMsg:"Contact property deleted",sdkCall:n=>n.contactProperties.remove(r.id)},i)});var il=new p("get").description("Retrieve a contact property definition by ID").argument("[id]","Contact property UUID").addHelpText("after",f({output:` {
|
|
351
435
|
"object": "contact_property",
|
|
352
436
|
"id": "<uuid>",
|
|
353
437
|
"key": "company_name",
|
|
354
438
|
"type": "string",
|
|
355
439
|
"fallbackValue": null,
|
|
356
440
|
"createdAt": "2026-01-01T00:00:00.000Z"
|
|
357
|
-
}`,errorCodes:["auth_error","fetch_error"],examples:["resend contact-properties get b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d","resend contact-properties get b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --json"]})).action(async(e,t,
|
|
441
|
+
}`,errorCodes:["auth_error","fetch_error"],examples:["resend contact-properties get b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d","resend contact-properties get b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,Pt,i);await $({loading:"Fetching contact property...",sdkCall:n=>n.contactProperties.get(r),onInteractive:n=>{console.log(`${n.key} (${n.type})`),console.log(`ID: ${n.id}`),console.log(`Created: ${n.createdAt}`),console.log(`Fallback value: ${n.fallbackValue??"(none)"}`)}},i)});var rl=new p("list").alias("ls").description("List all contact property definitions").option("--limit <n>","Maximum number of contact properties to return (1-100)","10").option("--after <cursor>","Return contact properties after this cursor (next page)").option("--before <cursor>","Return contact properties before this cursor (previous page)").addHelpText("after",f({context:`Pagination: use --after or --before with a contact property ID as the cursor.
|
|
358
442
|
Only one of --after or --before may be used at a time.
|
|
359
443
|
The response includes has_more: true when additional pages exist.`,output:` {
|
|
360
444
|
"object": "list",
|
|
@@ -362,14 +446,14 @@ This will remove this property from ALL contacts permanently.`,loading:"Deleting
|
|
|
362
446
|
"data": [
|
|
363
447
|
{ "id": "<uuid>", "key": "company_name", "type": "string", "fallbackValue": null, "createdAt": "..." }
|
|
364
448
|
]
|
|
365
|
-
}`,errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend contact-properties list","resend contact-properties list --limit 25 --json","resend contact-properties list --after b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --json"]})).action(async(e,t)=>{let
|
|
449
|
+
}`,errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend contact-properties list","resend contact-properties list --limit 25 --json","resend contact-properties list --after b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=H(e.limit,o),r=Q(i,e.after,e.before,o);await _({loading:"Fetching contact properties...",sdkCall:n=>n.contactProperties.list(r),onInteractive:n=>{console.log(tl(n.data)),G(n,"contact-properties list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var nl=new p("update").description("Update a contact property definition").argument("[id]","Contact property UUID").option("--fallback-value <value>","New fallback value used in broadcast templates when a contact has no value set for this property").option("--clear-fallback-value","Remove the fallback value (sets it to null)").addHelpText("after",f({context:`Note: the property key and type cannot be changed after creation. Only the fallback value
|
|
366
450
|
is updatable. Renaming a property would break existing broadcasts that reference the old key.
|
|
367
451
|
|
|
368
452
|
--fallback-value and --clear-fallback-value are mutually exclusive.
|
|
369
453
|
|
|
370
454
|
The fallback value is used in broadcast template interpolation when a contact has no value:
|
|
371
455
|
{{{company_name|Unknown}}} \u2014 inline fallback (takes precedence over the property's fallback)
|
|
372
|
-
{{{company_name}}} \u2014 uses the property's stored fallback value if set`,output:' {"object":"contact_property","id":"<id>"}',errorCodes:["auth_error","no_changes","conflicting_flags","fetch_error","invalid_fallback_value","update_error"],examples:['resend contact-properties update b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --fallback-value "Acme Corp"',"resend contact-properties update b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --fallback-value 42","resend contact-properties update b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --clear-fallback-value",'resend contact-properties update b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --fallback-value "Unknown" --json']})).action(async(e,t,
|
|
456
|
+
{{{company_name}}} \u2014 uses the property's stored fallback value if set`,output:' {"object":"contact_property","id":"<id>"}',errorCodes:["auth_error","no_changes","conflicting_flags","fetch_error","invalid_fallback_value","update_error"],examples:['resend contact-properties update b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --fallback-value "Acme Corp"',"resend contact-properties update b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --fallback-value 42","resend contact-properties update b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --clear-fallback-value",'resend contact-properties update b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --fallback-value "Unknown" --json']})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,Pt,i);t.fallbackValue===void 0&&!t.clearFallbackValue&&g({message:"Provide at least one option to update: --fallback-value or --clear-fallback-value.",code:"no_changes"},{json:i.json}),t.fallbackValue!==void 0&&t.clearFallbackValue&&g({message:"--fallback-value and --clear-fallback-value are mutually exclusive.",code:"conflicting_flags"},{json:i.json});let n=t.clearFallbackValue?null:t.fallbackValue;if(typeof n=="string"){let s=await Z(i);if((await Fe("Fetching contact property...",()=>s.contactProperties.get(r),"fetch_error",i,{retryTransient:!0})).type==="number"){let l=parseFloat(n);Number.isNaN(l)&&g({message:"--fallback-value must be a valid number for number-type properties.",code:"invalid_fallback_value"},{json:i.json}),n=l}}await O({loading:"Updating contact property...",sdkCall:s=>s.contactProperties.update({id:r,...n!==void 0&&{fallbackValue:n}}),errorCode:"update_error",successMsg:`Contact property updated: ${r}`},i)});var sl=new p("contact-properties").description("Manage contact property definitions").addHelpText("after",f({context:`Contact properties define the schema for custom data stored on contacts.
|
|
373
457
|
Think of them as column definitions \u2014 you create a property definition (e.g. company_name)
|
|
374
458
|
and then set values for that property on individual contacts via "resend contacts update --properties".
|
|
375
459
|
|
|
@@ -384,9 +468,9 @@ Supported types:
|
|
|
384
468
|
number \u2014 numeric values (useful for counts, scores, thresholds)
|
|
385
469
|
|
|
386
470
|
Note: property keys and types are immutable after creation. Only the fallback value can
|
|
387
|
-
be updated. Deleting a property removes it from all contacts.`,examples:["resend contact-properties list","resend contact-properties create --key company_name --type string",'resend contact-properties create --key plan --type string --fallback-value "free"',"resend contact-properties create --key score --type number --fallback-value 0","resend contact-properties get b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d",'resend contact-properties update b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --fallback-value "Unknown"',"resend contact-properties update b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --clear-fallback-value","resend contact-properties delete b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --yes"]})).addCommand(
|
|
471
|
+
be updated. Deleting a property removes it from all contacts.`,examples:["resend contact-properties list","resend contact-properties create --key company_name --type string",'resend contact-properties create --key plan --type string --fallback-value "free"',"resend contact-properties create --key score --type number --fallback-value 0","resend contact-properties get b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d",'resend contact-properties update b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --fallback-value "Unknown"',"resend contact-properties update b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --clear-fallback-value","resend contact-properties delete b4a3c2d1-6e5f-8a7b-0c9d-2e1f4a3b6c5d --yes"]})).addCommand(el).addCommand(il).addCommand(rl,{isDefault:!0}).addCommand(nl).addCommand(ol);function ni(e){let t=e.map(o=>[o.email,o.first_name??"",o.last_name??"",o.unsubscribed?"yes":"no",o.id]);return j(["Email","First Name","Last Name","Unsubscribed","ID"],t,"(no contacts)")}function al(e){let t=e.map(o=>[o.name,o.subscription,o.id,o.description??""]);return j(["Name","Subscription","ID","Description"],t,"(no topic subscriptions)")}var Ae={resource:"contact",resourcePlural:"contacts",fetchItems:(e,{limit:t,after:o})=>e.contacts.list({limit:t,...o&&{after:o}}),display:e=>({label:e.email,hint:e.id})};function $t(e){return e.includes("@")?{email:e}:{id:e}}function Ht(e){return e.includes("@")?{email:e}:{contactId:e}}function si(e,t){let o;try{o=JSON.parse(e)}catch{g({message:"Invalid --topics JSON. Expected an array of {id, subscription} objects.",code:"invalid_topics"},{json:t.json})}return Array.isArray(o)||g({message:"Invalid --topics JSON. Expected an array of {id, subscription} objects.",code:"invalid_topics"},{json:t.json}),o}function ai(e,t){if(e)try{return JSON.parse(e)}catch{g({message:"Invalid --properties JSON.",code:"invalid_properties"},{json:t.json})}}var ll=new p("add-segment").description("Add a contact to a segment").argument("[contactId]","Contact UUID or email address").option("--segment-id <id>","Segment ID to add the contact to (required)").addHelpText("after",f({context:`The <contactId> argument accepts either a UUID or an email address.
|
|
388
472
|
|
|
389
|
-
Non-interactive: --segment-id is required.`,output:' {"id":"<segment-membership-id>"}',errorCodes:["auth_error","missing_segment_id","add_segment_error"],examples:["resend contacts add-segment e169aa45-1ecf-4183-9955-b1499d5701d3 --segment-id 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend contacts add-segment steve.wozniak@gmail.com --segment-id 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t,
|
|
473
|
+
Non-interactive: --segment-id is required.`,output:' {"id":"<segment-membership-id>"}',errorCodes:["auth_error","missing_segment_id","add_segment_error"],examples:["resend contacts add-segment e169aa45-1ecf-4183-9955-b1499d5701d3 --segment-id 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend contacts add-segment steve.wozniak@gmail.com --segment-id 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,Ae,i),n=await y(t.segmentId,$e,i),s={...Ht(r),segmentId:n};await O({loading:"Adding contact to segment...",sdkCall:a=>a.contacts.segments.add(s),errorCode:"add_segment_error",successMsg:`Contact added to segment: ${n}`},i)});V();var cl=new p("create").description("Create a new contact").option("--email <email>","Contact email address (required)").option("--first-name <name>","First name").option("--last-name <name>","Last name").option("--unsubscribed","Globally unsubscribe the contact from all broadcasts").option("--properties <json>",`Custom properties as a JSON string (e.g. '{"company":"Acme"}')`).option("--segment-id <id...>","Segment ID to add the contact to on creation (repeatable: --segment-id abc --segment-id def)").addHelpText("after",f({context:`Non-interactive: --email is required. All other flags are optional.
|
|
390
474
|
|
|
391
475
|
Properties: pass a JSON object string to --properties (e.g. '{"plan":"pro","company":"Acme"}').
|
|
392
476
|
Properties are stored as custom contact attributes. To clear a property, set it to null.
|
|
@@ -394,11 +478,11 @@ Properties: pass a JSON object string to --properties (e.g. '{"plan":"pro","comp
|
|
|
394
478
|
|
|
395
479
|
Segments: use --segment-id once per segment to add the contact to one or more segments on creation.
|
|
396
480
|
|
|
397
|
-
Unsubscribed: setting --unsubscribed is a team-wide opt-out from all broadcasts, regardless of segments/topics.`,output:' {"object":"contact","id":"<id>"}',errorCodes:["auth_error","missing_email","invalid_properties","create_error"],examples:["resend contacts create --email steve.wozniak@gmail.com","resend contacts create --email steve.wozniak@gmail.com --first-name Steve --last-name Wozniak",`resend contacts create --email steve.wozniak@gmail.com --properties '{"company":"Acme","plan":"pro"}'`]})).action(async(e,t)=>{let
|
|
481
|
+
Unsubscribed: setting --unsubscribed is a team-wide opt-out from all broadcasts, regardless of segments/topics.`,output:' {"object":"contact","id":"<id>"}',errorCodes:["auth_error","missing_email","invalid_properties","create_error"],examples:["resend contacts create --email steve.wozniak@gmail.com","resend contacts create --email steve.wozniak@gmail.com --first-name Steve --last-name Wozniak",`resend contacts create --email steve.wozniak@gmail.com --properties '{"company":"Acme","plan":"pro"}'`]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await q(e.email,{message:"Email address",placeholder:"steve.wozniak@gmail.com"},{message:"Missing --email flag.",code:"missing_email"},o),r=e.firstName,n=e.lastName;if(U()&&!o.json&&!e.firstName){let l=await X({message:"First name (optional)"});x(l)&&R("Cancelled."),l&&(r=l)}if(U()&&!o.json&&!e.lastName){let l=await X({message:"Last name (optional)"});x(l)&&R("Cancelled."),l&&(n=l)}let s=ai(e.properties,o),a=e.segmentId??[];await W({loading:"Creating contact...",sdkCall:l=>l.contacts.create({email:i,...r&&{firstName:r},...n&&{lastName:n},...e.unsubscribed&&{unsubscribed:!0},...s&&{properties:s},...a.length>0&&{segments:a.map(d=>({id:d}))}}),onInteractive:l=>{console.log(`Contact created: ${l.id}`)}},o)});var ul=new p("delete").alias("rm").description("Delete a contact").argument("[id]","Contact UUID or email address \u2014 both are accepted by the API").option("--yes","Skip the confirmation prompt (required in non-interactive mode)").addHelpText("after",f({context:`The <id> argument accepts either a UUID or an email address.
|
|
398
482
|
|
|
399
|
-
Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.`,output:' {"object":"contact","id":"<id>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend contacts delete 520784e2-887d-4c25-b53c-4ad46ad38100 --yes","resend contacts delete acme@example.com --yes --json"]})).action(async(e,t,
|
|
400
|
-
ID: ${
|
|
401
|
-
This cannot be undone.`,loading:"Deleting contact...",object:"contact",successMsg:"Contact deleted",sdkCall:
|
|
483
|
+
Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.`,output:' {"object":"contact","id":"<id>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend contacts delete 520784e2-887d-4c25-b53c-4ad46ad38100 --yes","resend contacts delete acme@example.com --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await le(e,Ae,i);await ie(r.id,!!t.yes,{confirmMessage:`Delete contact "${r.label}"?
|
|
484
|
+
ID: ${r.id}
|
|
485
|
+
This cannot be undone.`,loading:"Deleting contact...",object:"contact",successMsg:"Contact deleted",sdkCall:n=>n.contacts.remove(r.id)},i)});var dl=new p("get").description("Retrieve a contact by ID or email address").argument("[id]","Contact UUID or email address \u2014 both are accepted by the API").addHelpText("after",f({output:` {
|
|
402
486
|
"object": "contact",
|
|
403
487
|
"id": "e169aa45-1ecf-4183-9955-b1499d5701d3",
|
|
404
488
|
"email": "steve.wozniak@gmail.com",
|
|
@@ -407,7 +491,7 @@ This cannot be undone.`,loading:"Deleting contact...",object:"contact",successMs
|
|
|
407
491
|
"created_at": "2026-01-01T00:00:00.000Z",
|
|
408
492
|
"unsubscribed": false,
|
|
409
493
|
"properties": {}
|
|
410
|
-
}`,errorCodes:["auth_error","fetch_error"],examples:["resend contacts get e169aa45-1ecf-4183-9955-b1499d5701d3","resend contacts get steve.wozniak@gmail.com","resend contacts get e169aa45-1ecf-4183-9955-b1499d5701d3 --json"]})).action(async(e,t,
|
|
494
|
+
}`,errorCodes:["auth_error","fetch_error"],examples:["resend contacts get e169aa45-1ecf-4183-9955-b1499d5701d3","resend contacts get steve.wozniak@gmail.com","resend contacts get e169aa45-1ecf-4183-9955-b1499d5701d3 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,Ae,i);await $({loading:"Fetching contact...",sdkCall:n=>n.contacts.get(r),onInteractive:n=>{let s=[n.first_name,n.last_name].filter(Boolean).join(" ");console.log(`${n.email}${s?` (${s})`:""}`),console.log(`ID: ${n.id}`),console.log(`Created: ${n.created_at}`),console.log(`Unsubscribed: ${n.unsubscribed?"yes":"no"}`);let a=Object.entries(n.properties??{});if(a.length>0){console.log("Properties:");for(let[l,d]of a)console.log(` ${l}: ${d.value}`)}}},i)});var gl=require("node:fs"),Al=require("node:path");function pl(e){let t=e.map(o=>[o.status,String(o.counts.total),String(o.counts.created),String(o.counts.updated),String(o.counts.skipped),String(o.counts.failed),o.created_at,o.id]);return j(["Status","Total","Created","Updated","Skipped","Failed","Created At","ID"],t,"(no contact imports)")}var ml={resource:"contact import",resourcePlural:"contact imports",fetchItems:(e,{limit:t,after:o})=>e.contacts.imports.list({limit:t,...o&&{after:o}}),display:e=>({label:`${e.status} - ${e.counts.total} contacts`,hint:e.id})};function fl(e,t){if(!e)return;let o;try{o=JSON.parse(e)}catch{g({message:"Invalid --column-map JSON.",code:"invalid_column_map"},{json:t.json})}return(typeof o!="object"||o===null||Array.isArray(o))&&g({message:"Invalid --column-map JSON. Expected an object mapping contact fields to CSV column headers.",code:"invalid_column_map"},{json:t.json}),o}var hl=new p("create").description("Import contacts in bulk from a local CSV file").option("--file <path>","Path to the CSV file to import (required)").option("--column-map <json>",`Map CSV columns to contact fields as a JSON object (e.g. '{"email":"Email","firstName":"First Name"}')`).addOption(new z("--on-conflict <strategy>","How to handle contacts that already exist").choices(["upsert","skip"])).option("--segment-id <id...>","Segment ID to add imported contacts to (repeatable: --segment-id abc --segment-id def)").option("--topics <json>","Topic subscriptions as a JSON array of {id, subscription} objects").addHelpText("after",f({context:`Non-interactive: --file is required. All other flags are optional.
|
|
411
495
|
|
|
412
496
|
The CSV file is uploaded as multipart form data (max 100MB).
|
|
413
497
|
|
|
@@ -423,32 +507,32 @@ On conflict: --on-conflict upsert (default) updates existing contacts; skip leav
|
|
|
423
507
|
|
|
424
508
|
Segments: use --segment-id once per segment to add imported contacts to one or more segments.
|
|
425
509
|
|
|
426
|
-
Topics: pass a JSON array of {id, subscription} objects (subscription is "opt_in" or "opt_out").`,output:' {"object":"contact_import","id":"<id>"}',errorCodes:["auth_error","missing_file","file_read_error","invalid_column_map","invalid_topics","create_error"],examples:["resend contacts imports create --file ./contacts.csv",`resend contacts imports create --file ./contacts.csv --column-map '{"email":"Email","firstName":"First Name"}'`,"resend contacts imports create --file ./contacts.csv --on-conflict skip --segment-id 78261eea-8f8b-4381-83c6-79fa7120f1cf"]})).action(async(e,t)=>{let
|
|
510
|
+
Topics: pass a JSON array of {id, subscription} objects (subscription is "opt_in" or "opt_out").`,output:' {"object":"contact_import","id":"<id>"}',errorCodes:["auth_error","missing_file","file_read_error","invalid_column_map","invalid_topics","create_error"],examples:["resend contacts imports create --file ./contacts.csv",`resend contacts imports create --file ./contacts.csv --column-map '{"email":"Email","firstName":"First Name"}'`,"resend contacts imports create --file ./contacts.csv --on-conflict skip --segment-id 78261eea-8f8b-4381-83c6-79fa7120f1cf"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await q(e.file,{message:"Path to the CSV file",placeholder:"./contacts.csv"},{message:"Missing --file flag.",code:"missing_file"},o),r;try{r=(0,gl.readFileSync)(i)}catch{g({message:`Failed to read file: ${i}`,code:"file_read_error"},{json:o.json})}let n=new File([new Uint8Array(r)],(0,Al.basename)(i),{type:"text/csv"}),s=fl(e.columnMap,o),a=(e.segmentId??[]).map(d=>({id:d})),l=e.topics!==void 0?si(e.topics,o):void 0;await W({loading:"Starting contact import...",sdkCall:d=>d.contacts.imports.create({file:n,...s&&{columnMap:s},...e.onConflict&&{onConflict:e.onConflict},...a.length>0&&{segments:a},...l&&{topics:l}}),onInteractive:d=>{console.log(`Contact import started: ${d.id}`)}},o)});var bl=new p("get").description("Retrieve a contact import by ID").argument("[id]","Contact import ID").addHelpText("after",f({output:` {
|
|
427
511
|
"object": "contact_import",
|
|
428
512
|
"id": "479e3145-dd38-476b-932c-529ceb705947",
|
|
429
513
|
"status": "completed",
|
|
430
514
|
"created_at": "2026-05-15T18:32:37.823Z",
|
|
431
515
|
"completed_at": "2026-05-15T18:33:42.916Z",
|
|
432
516
|
"counts": {"total":1200,"created":800,"updated":300,"skipped":75,"failed":25}
|
|
433
|
-
}`,errorCodes:["auth_error","fetch_error"],examples:["resend contacts imports get 479e3145-dd38-476b-932c-529ceb705947","resend contacts imports get 479e3145-dd38-476b-932c-529ceb705947 --json"]})).action(async(e,t,
|
|
517
|
+
}`,errorCodes:["auth_error","fetch_error"],examples:["resend contacts imports get 479e3145-dd38-476b-932c-529ceb705947","resend contacts imports get 479e3145-dd38-476b-932c-529ceb705947 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,ml,i);await $({loading:"Fetching contact import...",sdkCall:n=>n.contacts.imports.get(r),onInteractive:n=>{console.log(`${n.id} - ${n.status}`),console.log(`Created: ${n.created_at}`),n.completed_at&&console.log(`Completed: ${n.completed_at}`);let s=n.counts;console.log(`Counts: ${s.total} total, ${s.created} created, ${s.updated} updated, ${s.skipped} skipped, ${s.failed} failed`)}},i)});var Cl=new p("list").alias("ls").description("List contact imports").option("--limit <n>","Maximum number of contact imports to return (1-100)","10").option("--after <cursor>","Return imports after this cursor (next page)").option("--before <cursor>","Return imports before this cursor (previous page)").addOption(new z("--status <status>","Filter by import status").choices(["queued","in_progress","completed","failed"])).addHelpText("after",f({context:`Pagination: use --after or --before with a contact import ID as the cursor.
|
|
434
518
|
Only one of --after or --before may be used at a time.
|
|
435
|
-
The response includes has_more: true when additional pages exist.`,output:' {"object":"list","has_more":false,"data":[{"object":"contact_import","id":"...","status":"completed","counts":{"total":1200,"created":800,"updated":300,"skipped":75,"failed":25}}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend contacts imports list","resend contacts imports list --status completed --json","resend contacts imports list --after 479e3145-dd38-476b-932c-529ceb705947 --json"]})).action(async(e,t)=>{let
|
|
519
|
+
The response includes has_more: true when additional pages exist.`,output:' {"object":"list","has_more":false,"data":[{"object":"contact_import","id":"...","status":"completed","counts":{"total":1200,"created":800,"updated":300,"skipped":75,"failed":25}}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend contacts imports list","resend contacts imports list --status completed --json","resend contacts imports list --after 479e3145-dd38-476b-932c-529ceb705947 --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=H(e.limit,o),r=Q(i,e.after,e.before,o);await _({loading:"Fetching contact imports...",sdkCall:n=>n.contacts.imports.list({...r,...e.status&&{status:e.status}}),onInteractive:n=>{console.log(pl(n.data)),G(n,"contacts imports list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var yl=new p("imports").description("Import contacts in bulk from a CSV file").addHelpText("after",f({context:`Import lifecycle:
|
|
436
520
|
1. resend contacts imports create --file ./contacts.csv (returns the import id)
|
|
437
521
|
2. resend contacts imports get <id> (poll until "completed")
|
|
438
522
|
3. resend contacts imports list (review past imports)
|
|
439
523
|
|
|
440
524
|
Imports run asynchronously. The create command returns immediately with an id while
|
|
441
|
-
the file is processed in the background.`,examples:["resend contacts imports create --file ./contacts.csv","resend contacts imports get 479e3145-dd38-476b-932c-529ceb705947","resend contacts imports list --status completed"]})).addCommand(hl).addCommand(
|
|
525
|
+
the file is processed in the background.`,examples:["resend contacts imports create --file ./contacts.csv","resend contacts imports get 479e3145-dd38-476b-932c-529ceb705947","resend contacts imports list --status completed"]})).addCommand(hl).addCommand(bl).addCommand(Cl,{isDefault:!0});var Ul=new p("list").alias("ls").description("List all contacts").option("--limit <n>","Maximum number of contacts to return (1-100)","10").option("--after <cursor>","Return contacts after this cursor (next page)").option("--before <cursor>","Return contacts before this cursor (previous page)").addHelpText("after",f({context:`Contacts are global \u2014 they are not scoped to audiences or segments since the 2025 migration.
|
|
442
526
|
|
|
443
527
|
Pagination: use --after or --before with a contact ID as the cursor.
|
|
444
528
|
Only one of --after or --before may be used at a time.
|
|
445
|
-
The response includes has_more: true when additional pages exist.`,output:' {"object":"list","data":[{"id":"...","email":"...","first_name":"...","last_name":"...","unsubscribed":false}],"has_more":false}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend contacts list","resend contacts list --limit 25 --json","resend contacts list --after 479e3145-dd38-4932-8c0c-e58b548c9e76 --json"]})).action(async(e,t)=>{let
|
|
446
|
-
The <segmentId> argument must be a segment UUID (not an email).`,output:' {"id":"<segment-id>","deleted":true}',errorCodes:["auth_error","remove_segment_error"],examples:["resend contacts remove-segment e169aa45-1ecf-4183-9955-b1499d5701d3 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend contacts remove-segment steve.wozniak@gmail.com 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t,
|
|
529
|
+
The response includes has_more: true when additional pages exist.`,output:' {"object":"list","data":[{"id":"...","email":"...","first_name":"...","last_name":"...","unsubscribed":false}],"has_more":false}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend contacts list","resend contacts list --limit 25 --json","resend contacts list --after 479e3145-dd38-4932-8c0c-e58b548c9e76 --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=H(e.limit,o),r=Q(i,e.after,e.before,o);await _({loading:"Fetching contacts...",sdkCall:n=>n.contacts.list(r),onInteractive:n=>{console.log(ni(n.data)),G(n,"contacts list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var Kl=new p("remove-segment").description("Remove a contact from a segment").argument("[contactId]","Contact UUID or email address").argument("[segmentId]","Segment ID to remove the contact from").addHelpText("after",f({context:`The <contactId> argument accepts either a UUID or an email address.
|
|
530
|
+
The <segmentId> argument must be a segment UUID (not an email).`,output:' {"id":"<segment-id>","deleted":true}',errorCodes:["auth_error","remove_segment_error"],examples:["resend contacts remove-segment e169aa45-1ecf-4183-9955-b1499d5701d3 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend contacts remove-segment steve.wozniak@gmail.com 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t,o,i)=>{let r=i.optsWithGlobals(),n=await y(e,Ae,r),s=await y(t,$e,r),a={...Ht(n),segmentId:s};await O({loading:"Removing contact from segment...",sdkCall:l=>l.contacts.segments.remove(a),errorCode:"remove_segment_error",successMsg:`Contact removed from segment: ${s}`},r)});var Sl=new p("segments").description("List the segments a contact belongs to").argument("[id]","Contact UUID or email address").addHelpText("after",f({context:"The <id> argument accepts either a UUID or an email address.",output:' {"object":"list","data":[{"id":"<segment-uuid>","name":"Newsletter Subscribers","created_at":"..."}],"has_more":false}',errorCodes:["auth_error","list_error"],examples:["resend contacts segments e169aa45-1ecf-4183-9955-b1499d5701d3","resend contacts segments steve.wozniak@gmail.com","resend contacts segments e169aa45-1ecf-4183-9955-b1499d5701d3 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,Ae,i);await _({loading:"Fetching segments...",sdkCall:n=>n.contacts.segments.list(Ht(r)),onInteractive:n=>console.log(oi(n.data))},i)});var wl=new p("topics").description("List a contact's topic subscriptions").argument("[id]","Contact UUID or email address").addHelpText("after",f({context:`The <id> argument accepts either a UUID or an email address.
|
|
447
531
|
|
|
448
532
|
Topics control which broadcast email types a contact receives.
|
|
449
533
|
subscription values: "opt_in" (receiving) | "opt_out" (not receiving)
|
|
450
534
|
|
|
451
|
-
Use "resend contacts update-topics <id>" to change subscription statuses.`,output:' {"object":"list","data":[{"id":"...","name":"Product Updates","description":"...","subscription":"opt_in"}],"has_more":false}',errorCodes:["auth_error","list_error"],examples:["resend contacts topics e169aa45-1ecf-4183-9955-b1499d5701d3","resend contacts topics steve.wozniak@gmail.com","resend contacts topics e169aa45-1ecf-4183-9955-b1499d5701d3 --json"]})).action(async(e,t,
|
|
535
|
+
Use "resend contacts update-topics <id>" to change subscription statuses.`,output:' {"object":"list","data":[{"id":"...","name":"Product Updates","description":"...","subscription":"opt_in"}],"has_more":false}',errorCodes:["auth_error","list_error"],examples:["resend contacts topics e169aa45-1ecf-4183-9955-b1499d5701d3","resend contacts topics steve.wozniak@gmail.com","resend contacts topics e169aa45-1ecf-4183-9955-b1499d5701d3 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,Ae,i);await _({loading:"Fetching topic subscriptions...",sdkCall:n=>n.contacts.topics.list($t(r)),onInteractive:n=>console.log(al(n.data))},i)});var vl=new p("update").description("Update a contact's subscription status or custom properties").argument("[id]","Contact UUID or email address \u2014 both are accepted by the API").option("--unsubscribed","Globally unsubscribe the contact from all broadcasts").option("--no-unsubscribed","Re-subscribe the contact (clears the global unsubscribe flag)").option("--properties <json>",`JSON object of properties to merge (e.g. '{"company":"Acme"}'); set a key to null to clear it`).addHelpText("after",f({context:`The <id> argument accepts either a UUID or an email address.
|
|
452
536
|
|
|
453
537
|
Subscription toggle:
|
|
454
538
|
--unsubscribed Sets unsubscribed: true \u2014 contact will not receive any broadcasts.
|
|
@@ -456,7 +540,7 @@ Subscription toggle:
|
|
|
456
540
|
Omitting both flags leaves the subscription status unchanged.
|
|
457
541
|
|
|
458
542
|
Properties: --properties merges the given JSON object with existing properties.
|
|
459
|
-
Set a key to null to clear it: '{"company":null}'.`,output:' {"object":"contact","id":"<id>"}',errorCodes:["auth_error","invalid_properties","update_error"],examples:["resend contacts update e169aa45-1ecf-4183-9955-b1499d5701d3 --unsubscribed","resend contacts update acme@example.com --no-unsubscribed",`resend contacts update e169aa45-1ecf-4183-9955-b1499d5701d3 --properties '{"plan":"pro"}'`,"resend contacts update acme@example.com --unsubscribed --json"]})).action(async(e,t,
|
|
543
|
+
Set a key to null to clear it: '{"company":null}'.`,output:' {"object":"contact","id":"<id>"}',errorCodes:["auth_error","invalid_properties","update_error"],examples:["resend contacts update e169aa45-1ecf-4183-9955-b1499d5701d3 --unsubscribed","resend contacts update acme@example.com --no-unsubscribed",`resend contacts update e169aa45-1ecf-4183-9955-b1499d5701d3 --properties '{"plan":"pro"}'`,"resend contacts update acme@example.com --unsubscribed --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,Ae,i),n=ai(t.properties,i),s={...$t(r),...t.unsubscribed!==void 0&&{unsubscribed:t.unsubscribed},...n&&{properties:n}};await O({loading:"Updating contact...",sdkCall:a=>a.contacts.update(s),errorCode:"update_error",successMsg:`Contact updated: ${r}`},i)});V();var xl=new p("update-topics").description("Update a contact's topic subscription statuses").argument("[id]","Contact UUID or email address").option("--topics <json>",`JSON array of topic subscriptions (required) \u2014 e.g. '[{"id":"topic-uuid","subscription":"opt_in"}]'`).addHelpText("after",f({context:`The <id> argument accepts either a UUID or an email address.
|
|
460
544
|
|
|
461
545
|
Non-interactive: --topics is required.
|
|
462
546
|
|
|
@@ -465,7 +549,7 @@ Topics JSON format:
|
|
|
465
549
|
subscription values: "opt_in" | "opt_out"
|
|
466
550
|
|
|
467
551
|
This operation replaces all topic subscriptions for the specified topics.
|
|
468
|
-
Topics not included in the array are left unchanged.`,output:' {"id":"<contact-id>"}',errorCodes:["auth_error","missing_topics","invalid_topics","update_topics_error"],examples:[`resend contacts update-topics e169aa45-1ecf-4183-9955-b1499d5701d3 --topics '[{"id":"b6d24b8e-af0b-4c3c-be0c-359bbd97381e","subscription":"opt_in"}]'`,`resend contacts update-topics steve.wozniak@gmail.com --topics '[{"id":"b6d24b8e-af0b-4c3c-be0c-359bbd97381e","subscription":"opt_out"},{"id":"07d84122-7224-4881-9c31-1c048e204602","subscription":"opt_in"}]' --json`]})).action(async(e,t,
|
|
552
|
+
Topics not included in the array are left unchanged.`,output:' {"id":"<contact-id>"}',errorCodes:["auth_error","missing_topics","invalid_topics","update_topics_error"],examples:[`resend contacts update-topics e169aa45-1ecf-4183-9955-b1499d5701d3 --topics '[{"id":"b6d24b8e-af0b-4c3c-be0c-359bbd97381e","subscription":"opt_in"}]'`,`resend contacts update-topics steve.wozniak@gmail.com --topics '[{"id":"b6d24b8e-af0b-4c3c-be0c-359bbd97381e","subscription":"opt_out"},{"id":"07d84122-7224-4881-9c31-1c048e204602","subscription":"opt_in"}]' --json`]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,Ae,i),n=await Z(i),s=t.topics;if(!s){(!U()||i.json)&&g({message:"Missing --topics flag.",code:"missing_topics"},{json:i.json});let d=await X({message:`Topics JSON (e.g. '[{"id":"topic-uuid","subscription":"opt_in"}]')`,placeholder:'[{"id":"topic-uuid","subscription":"opt_in"}]',validate:c=>c?void 0:"Required"});x(d)&&R("Cancelled."),s=d}let a=si(s,i),l=await Fe("Updating topic subscriptions...",()=>n.contacts.topics.update({...$t(r),topics:a}),"update_topics_error",i);!i.json&&U()?console.log(`Topic subscriptions updated for contact: ${r}`):I(l,{json:i.json})});var Fl=new p("contacts").description("Manage contacts").addHelpText("after",f({context:`Contacts are global entities (not audience-scoped since the 2025 migration).
|
|
469
553
|
Each contact is identified by a UUID or email address \u2014 both are accepted in all subcommands.
|
|
470
554
|
|
|
471
555
|
Properties:
|
|
@@ -482,7 +566,7 @@ Segments:
|
|
|
482
566
|
Manage membership with "resend contacts add-segment" and "resend contacts remove-segment".
|
|
483
567
|
|
|
484
568
|
Imports:
|
|
485
|
-
Bulk-import contacts from a CSV file with "resend contacts imports create --file <path>".`,examples:["resend contacts list","resend contacts create --email steve.wozniak@gmail.com --first-name Steve","resend contacts get e169aa45-1ecf-4183-9955-b1499d5701d3","resend contacts get steve.wozniak@gmail.com","resend contacts update acme@example.com --unsubscribed","resend contacts delete e169aa45-1ecf-4183-9955-b1499d5701d3 --yes","resend contacts segments steve.wozniak@gmail.com","resend contacts add-segment steve.wozniak@gmail.com --segment-id 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend contacts remove-segment steve.wozniak@gmail.com 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend contacts topics steve.wozniak@gmail.com",`resend contacts update-topics steve.wozniak@gmail.com --topics '[{"id":"b6d24b8e-af0b-4c3c-be0c-359bbd97381e","subscription":"opt_in"}]'`,"resend contacts imports create --file ./contacts.csv"]})).addCommand(
|
|
569
|
+
Bulk-import contacts from a CSV file with "resend contacts imports create --file <path>".`,examples:["resend contacts list","resend contacts create --email steve.wozniak@gmail.com --first-name Steve","resend contacts get e169aa45-1ecf-4183-9955-b1499d5701d3","resend contacts get steve.wozniak@gmail.com","resend contacts update acme@example.com --unsubscribed","resend contacts delete e169aa45-1ecf-4183-9955-b1499d5701d3 --yes","resend contacts segments steve.wozniak@gmail.com","resend contacts add-segment steve.wozniak@gmail.com --segment-id 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend contacts remove-segment steve.wozniak@gmail.com 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend contacts topics steve.wozniak@gmail.com",`resend contacts update-topics steve.wozniak@gmail.com --topics '[{"id":"b6d24b8e-af0b-4c3c-be0c-359bbd97381e","subscription":"opt_in"}]'`,"resend contacts imports create --file ./contacts.csv"]})).addCommand(cl).addCommand(dl).addCommand(Ul,{isDefault:!0}).addCommand(vl).addCommand(ul).addCommand(Sl).addCommand(ll).addCommand(Kl).addCommand(wl).addCommand(xl).addCommand(yl);var kl=new p("docs").description("Open the Resend documentation in your browser").addHelpText("after",f({context:"Opens https://resend.com/docs in your default browser.",examples:["resend docs"]})).action(async(e,t)=>{let o=t.optsWithGlobals();await Re(de.documentation,o)});ge();ar();Qo();V();fo();bt();var vr="TimeoutError",Tl=(e,t)=>{let o,i=new Promise((r,n)=>{o=setTimeout(()=>{let s=new Error(`Operation timed out after ${t}ms`);s.name=vr,n(s)},t)});return Promise.race([e,i]).finally(()=>{clearTimeout(o)})};var Sm=5e3;function wm(e){return e instanceof Error&&e.name===pr}async function vm(){try{let e=await fetch(Sr,{headers:{Accept:"application/vnd.github.v3+json"},signal:AbortSignal.timeout(5e3)});if(!e.ok)return{name:"CLI Version",status:"warn",message:`v${te} (could not check for updates)`};let t=await e.json();if(t.prerelease||t.draft)return{name:"CLI Version",status:"warn",message:`v${te} (could not check for updates)`};let o=t.tag_name?.replace(/^v/,"")??"unknown";return o===te?{name:"CLI Version",status:"pass",message:`v${te} (latest)`}:{name:"CLI Version",status:"warn",message:`v${te} (latest: v${o})`,detail:"Update available"}}catch{return{name:"CLI Version",status:"warn",message:`v${te} (could not check for updates)`}}}async function xm(e){let t;try{t=await Kt(e,void 0,{refresh:!1})}catch(n){return{name:"API Key",status:"fail",message:N(n,"Authentication failed"),detail:"Run: resend login"}}if(!t)return{name:"API Key",status:"fail",message:"No API key found",detail:"Run: resend login"};let o=t.type==="api_key"?t.key:t.access_token,i=t.profile?`, profile: ${t.profile}`:"",r=t.type==="oauth_grant"?`${t.source} (oauth)`:t.source;return{name:"API Key",status:"pass",message:`${dt(o)} (source: ${r}${i})`}}async function Fm(e){let t;try{t=await Kt(e)}catch(r){let n=wm(r);return{name:"API Validation",status:n?"warn":"fail",message:N(r,"Authentication failed"),...n?{}:{detail:"Run: resend login"}}}if(!t)return{name:"API Validation",status:"fail",message:"Skipped \u2014 no API key"};let o=t.type==="api_key"?t.key:t.access_token,i=t.type==="api_key"?"API key":"credential";try{let r=new kt(o),{data:n,error:s}=await Tl(r.domains.list(),Sm);if(s){let c=s;return c.name==="restricted_api_key"?{name:"API Validation",status:"warn",message:`Sending-only ${i}`,detail:Dt}:c.name==="application_error"?{name:"API Validation",status:"warn",message:"Network error. Check your connection and try again"}:{name:"API Validation",status:"fail",message:`Invalid ${i}: ${s.message}`}}let a=n?.data??[],l=a.filter(c=>c.status==="verified"),d=a.filter(c=>c.status!=="verified");return a.length===0?{name:"Domains",status:"warn",message:"No domains configured",detail:"Add a domain at https://resend.com/domains"}:l.length===0?{name:"Domains",status:"warn",message:`${d.length} domain(s) pending verification`,detail:a.map(c=>`${c.name} (${c.status})`).join(", ")}:{name:"Domains",status:"pass",message:`${l.length} verified, ${d.length} pending`,detail:a.map(c=>`${c.name} (${c.status})`).join(", ")}}catch(r){return r instanceof Error&&r.name===vr?{name:"API Validation",status:"warn",message:"Request timed out"}:{name:"API Validation",status:"fail",message:N(r,`Failed to validate ${i}`)}}}var Ol=new p("doctor").description("Check CLI version, API key, and domain status").addHelpText("after",f({setup:!0,context:`Checks performed:
|
|
486
570
|
CLI Version Is the installed version up to date?
|
|
487
571
|
API Key Is a key present (--api-key, RESEND_API_KEY, or credentials file)?
|
|
488
572
|
Credential Storage Which backend is storing credentials (secure storage vs plaintext file)?
|
|
@@ -495,39 +579,39 @@ Imports:
|
|
|
495
579
|
]
|
|
496
580
|
}
|
|
497
581
|
status values: "pass" | "warn" | "fail"
|
|
498
|
-
Exit code 1 if any check has status "fail"`,examples:["resend doctor","resend doctor --json"]})).action(async(e,t)=>{let
|
|
582
|
+
Exit code 1 if any check has status "fail"`,examples:["resend doctor","resend doctor --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=[],r=U()&&!o.json;r&&console.log(`
|
|
499
583
|
Resend Doctor
|
|
500
|
-
`);let
|
|
501
|
-
Add this TXT record at your DNS provider:`),console.log(` ${
|
|
502
|
-
Then run \`resend domains claim verify ${
|
|
584
|
+
`);let n=r?oe("Checking CLI version..."):null,s=await vm();i.push(s),s.status==="warn"?n?.warn(s.message):n?.stop(s.message),n=r?oe("Checking API key..."):null;let a=await xm(o.apiKey);i.push(a),a.status==="fail"?n?.fail(a.message):n?.stop(a.message),n=r?oe("Checking credential storage..."):null;let l=await Ye(),d=ye(),c=l.isSecure,u={name:"Credential Storage",status:c?"pass":"warn",message:c?l.name:"plaintext file",...!c&&process.env.RESEND_CREDENTIAL_STORE!=="file"&&(d?.storage==="secure_storage"||process.env.RESEND_CREDENTIAL_STORE==="secure_storage")?{detail:"Secure backend unavailable despite secure storage preference \u2014 falling back to plaintext"}:{}};i.push(u),u.status==="warn"?n?.warn(u.message):n?.stop(u.message),n=r?oe("Validating API key & domains..."):null;let m=await Fm(o.apiKey);i.push(m),m.status==="fail"?n?.fail(m.message):m.status==="warn"?n?.warn(m.message):n?.stop(m.message);let b=i.some(A=>A.status==="fail");!o.json&&U()?console.log(""):I({ok:!b,checks:i},{json:o.json}),b&&process.exit(1)});var jl=new p("create").description("Start a claim for a domain another Resend account has verified").option("--name <domain>","Domain name to claim (e.g. example.com)").addOption(new z("--region <region>","Sending region").choices(["us-east-1","eu-west-1","sa-east-1","ap-northeast-1"])).option("--tracking-subdomain <subdomain>","Subdomain for click and open tracking (e.g. track)").option("--custom-return-path <subdomain>","Subdomain for the Return-Path address (e.g. bounce)").option("--open-tracking","Enable open tracking").option("--no-open-tracking","Disable open tracking").option("--click-tracking","Enable click tracking").option("--no-click-tracking","Disable click tracking").addHelpText("after",f({context:"Non-interactive: --name is required (no prompts when stdin/stdout is not a TTY)",output:" domain_claim object with the placeholder domain_id and the TXT record to add to DNS.",errorCodes:["auth_error","missing_name","create_error"],examples:["resend domains claim create --name example.com","resend domains claim create --name example.com --region eu-west-1","resend domains claim create --name example.com --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await q(e.name,{message:"Domain name to claim",placeholder:"example.com"},{message:"Missing --name flag.",code:"missing_name"},o);await W({loading:"Starting domain claim...",sdkCall:r=>r.domains.claims.create({name:i,...e.region&&{region:e.region},...e.customReturnPath!==void 0&&{customReturnPath:e.customReturnPath},...e.openTracking!==void 0&&{openTracking:e.openTracking},...e.clickTracking!==void 0&&{clickTracking:e.clickTracking},...e.trackingSubdomain!==void 0&&{trackingSubdomain:e.trackingSubdomain}}),onInteractive:r=>{console.log(`Claim started for ${r.name} (claim id: ${r.id}, domain id: ${r.domain_id})`),console.log(`Status: ${r.status}`),console.log(`
|
|
585
|
+
Add this TXT record at your DNS provider:`),console.log(` ${r.record.name} TXT ${r.record.value}`),console.log(`
|
|
586
|
+
Then run \`resend domains claim verify ${r.domain_id}\`.`)}},o)});var Il=new p("get").description("Retrieve the latest claim for a domain").argument("[id]","Domain ID (the placeholder domain created by the claim)").addHelpText("after",f({output:` domain_claim object: status, domain_id, the TXT record, blocked_reason, expires_at.
|
|
503
587
|
|
|
504
|
-
Claim status values: pending | verified | completed | blocked | expired | superseded | canceled | failed`,errorCodes:["auth_error","fetch_error","not_found"],examples:["resend domains claim get 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend domains claim get 4dd369bc-aa82-4ff3-97de-514ae3000ee0 --json"]})).action(async(e,t,
|
|
505
|
-
TXT record:`),console.log(` ${
|
|
588
|
+
Claim status values: pending | verified | completed | blocked | expired | superseded | canceled | failed`,errorCodes:["auth_error","fetch_error","not_found"],examples:["resend domains claim get 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend domains claim get 4dd369bc-aa82-4ff3-97de-514ae3000ee0 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,ke,i);await $({loading:"Fetching domain claim...",sdkCall:n=>n.domains.claims.get(r),onInteractive:n=>{console.log(`${n.name} \u2014 ${n.status}`),console.log(`Claim ID: ${n.id}`),console.log(`Domain ID: ${n.domain_id}`),n.blocked_reason&&console.log(`Blocked: ${n.blocked_reason}`),console.log(`Expires: ${n.expires_at}`),console.log(`
|
|
589
|
+
TXT record:`),console.log(` ${n.record.name} TXT ${n.record.value}`)}},i)});var Pl=new p("verify").description("Trigger DNS verification and transfer for a domain claim").argument("[id]","Domain ID (the placeholder domain created by the claim)").addHelpText("after",f({output:" domain_claim object (status stays pending while verification runs async).",errorCodes:["auth_error","verify_error","not_found"],examples:["resend domains claim verify 4dd369bc-aa82-4ff3-97de-514ae3000ee0"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,ke,i);await O({loading:"Verifying domain claim...",sdkCall:n=>n.domains.claims.verify(r),errorCode:"verify_error",successMsg:`Domain claim verification started. Check status with resend domains claim get ${r}.`},i)});var $l=new p("claim").description("Claim a domain already verified by another Resend account").addHelpText("after",f({context:`Claim lifecycle:
|
|
506
590
|
1. resend domains claim create --name example.com (returns the TXT record)
|
|
507
591
|
2. Configure the TXT record at your DNS provider
|
|
508
592
|
3. resend domains claim verify <domain-id> (trigger verification + transfer)
|
|
509
593
|
4. resend domains claim get <domain-id> (poll until "completed")
|
|
510
594
|
5. The transferred domain has NEW DKIM records \u2014 update DNS, then run:
|
|
511
|
-
resend domains verify <domain-id>`,examples:["resend domains claim create --name example.com","resend domains claim get 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend domains claim verify 4dd369bc-aa82-4ff3-97de-514ae3000ee0"]})).addCommand(jl).addCommand(
|
|
512
|
-
DNS Records to configure:`),console.log(
|
|
513
|
-
Run \`resend domains verify ${
|
|
514
|
-
ID: ${
|
|
515
|
-
This cannot be undone.`,loading:"Deleting domain...",object:"domain",successMsg:"Domain deleted",sdkCall:
|
|
516
|
-
|
|
517
|
-
Domain status values: not_started | pending | verified | failed | partially_verified | partially_failed`,errorCodes:["auth_error","fetch_error"],examples:["resend domains get 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend domains get 4dd369bc-aa82-4ff3-97de-514ae3000ee0 --json"]})).action(async(e,t,
|
|
518
|
-
DNS Records:`),console.log(
|
|
519
|
-
The list response does not include DNS records \u2014 use "resend domains get <id>" for that.`,errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend domains list","resend domains list --limit 25 --json","resend domains list --after <cursor> --json"]})).action(async(e,t)=>{let
|
|
520
|
-
Poll the status with: resend domains get <id>`,output:' {"object":"domain","id":"<id>"}',errorCodes:["auth_error","verify_error"],examples:["resend domains verify 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend domains verify 4dd369bc-aa82-4ff3-97de-514ae3000ee0 --json"]})).action(async(e,t,
|
|
595
|
+
resend domains verify <domain-id>`,examples:["resend domains claim create --name example.com","resend domains claim get 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend domains claim verify 4dd369bc-aa82-4ff3-97de-514ae3000ee0"]})).addCommand(jl).addCommand(Il).addCommand(Pl);var Hl=new p("create").description("Create a new domain and receive DNS records to configure").option("--name <domain>","Domain name (e.g. example.com)").addOption(new z("--region <region>","Sending region").choices(["us-east-1","eu-west-1","sa-east-1","ap-northeast-1"])).addOption(new z("--tls <mode>","TLS mode (default: opportunistic)").choices(["opportunistic","enforced"])).option("--tracking-subdomain <subdomain>","Subdomain for click and open tracking (e.g. track)").option("--sending","Enable sending capability (default: enabled)").option("--receiving","Enable receiving capability (default: disabled)").addHelpText("after",f({context:"Non-interactive: --name is required (no prompts when stdin/stdout is not a TTY)",output:" Full domain object with DNS records array to configure in your DNS provider.",errorCodes:["auth_error","missing_name","create_error"],examples:["resend domains create --name example.com","resend domains create --name example.com --region eu-west-1 --tls enforced","resend domains create --name example.com --tracking-subdomain track","resend domains create --name example.com --receiving --json","resend domains create --name example.com --sending --receiving --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await q(e.name,{message:"Domain name",placeholder:"example.com"},{message:"Missing --name flag.",code:"missing_name"},o);await W({loading:"Creating domain...",sdkCall:r=>r.domains.create({name:i,...e.region&&{region:e.region},...e.tls&&{tls:e.tls},...e.trackingSubdomain&&{trackingSubdomain:e.trackingSubdomain},...(e.sending||e.receiving)&&{capabilities:{...e.sending&&{sending:"enabled"},...e.receiving&&{receiving:"enabled"}}}}),onInteractive:r=>{console.log(`Domain created: ${r.name} (id: ${r.id})`),console.log(`
|
|
596
|
+
DNS Records to configure:`),console.log(Vo(r.records,r.name)),console.log(`
|
|
597
|
+
Run \`resend domains verify ${r.id}\` after configuring DNS.`)}},o)});var Ql=new p("delete").alias("rm").description("Delete a domain").argument("[id]","Domain ID").option("--yes","Skip confirmation prompt").addHelpText("after",f({context:"Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.",output:' {"object":"domain","id":"<id>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend domains delete 4dd369bc-aa82-4ff3-97de-514ae3000ee0 --yes","resend domains delete 4dd369bc-aa82-4ff3-97de-514ae3000ee0 --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await le(e,ke,i);await ie(r.id,!!t.yes,{confirmMessage:`Delete domain "${r.label}"?
|
|
598
|
+
ID: ${r.id}
|
|
599
|
+
This cannot be undone.`,loading:"Deleting domain...",object:"domain",successMsg:"Domain deleted",sdkCall:n=>n.domains.remove(r.id)},i)});var Gl=new p("get").description("Retrieve a domain with its DNS records and current verification status").argument("[id]","Domain ID").addHelpText("after",f({output:` Full domain object including records array and current status.
|
|
600
|
+
|
|
601
|
+
Domain status values: not_started | pending | verified | failed | partially_verified | partially_failed`,errorCodes:["auth_error","fetch_error"],examples:["resend domains get 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend domains get 4dd369bc-aa82-4ff3-97de-514ae3000ee0 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,ke,i);await $({loading:"Fetching domain...",sdkCall:n=>n.domains.get(r),onInteractive:n=>{console.log(`${n.name} \u2014 ${Vs(n.status)}`),console.log(`ID: ${n.id}`),console.log(`Region: ${n.region}`),console.log(`Created: ${n.created_at}`),n.open_tracking!==void 0&&console.log(`Open tracking: ${n.open_tracking?"enabled":"disabled"}`),n.click_tracking!==void 0&&console.log(`Click tracking: ${n.click_tracking?"enabled":"disabled"}`),n.tracking_subdomain&&console.log(`Tracking subdomain: ${n.tracking_subdomain}`),n.records.length>0&&(console.log(`
|
|
602
|
+
DNS Records:`),console.log(Vo(n.records,n.name)))}},i)});var Nl=new p("list").alias("ls").description("List all domains").option("--limit <n>","Maximum number of domains to return (1-100)","10").option("--after <cursor>","Return domains after this cursor (next page)").option("--before <cursor>","Return domains before this cursor (previous page)").addHelpText("after",f({output:` {"object":"list","data":[...],"has_more":true}
|
|
603
|
+
The list response does not include DNS records \u2014 use "resend domains get <id>" for that.`,errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend domains list","resend domains list --limit 25 --json","resend domains list --after <cursor> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=H(e.limit,o),r=Q(i,e.after,e.before,o);await _({loading:"Fetching domains...",sdkCall:n=>n.domains.list(r),onInteractive:n=>{console.log(Js(n.data)),G(n,"domains list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var ql=new p("update").description("Update domain settings: TLS mode, tracking, and tracking subdomain").argument("[id]","Domain ID").addOption(new z("--tls <mode>","TLS mode").choices(["opportunistic","enforced"])).option("--open-tracking","Enable open tracking").option("--no-open-tracking","Disable open tracking").option("--click-tracking","Enable click tracking").option("--no-click-tracking","Disable click tracking").option("--tracking-subdomain <subdomain>","Subdomain for click and open tracking (e.g. track)").addHelpText("after",f({output:' {"object":"domain","id":"<id>"}',errorCodes:["auth_error","no_changes","update_error"],examples:["resend domains update <id> --tls enforced","resend domains update <id> --open-tracking --click-tracking","resend domains update <id> --tracking-subdomain track","resend domains update <id> --no-open-tracking --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,ke,i),{tls:n,openTracking:s,clickTracking:a,trackingSubdomain:l}=t;!n&&s===void 0&&a===void 0&&!l&&g({message:"Provide at least one option to update: --tls, --open-tracking, --click-tracking, or --tracking-subdomain.",code:"no_changes"},{json:i.json});let d={id:r};n&&(d.tls=n),s!==void 0&&(d.openTracking=s),a!==void 0&&(d.clickTracking=a),l&&(d.trackingSubdomain=l),await O({loading:"Updating domain...",sdkCall:c=>c.domains.update(d),errorCode:"update_error",successMsg:`Domain updated: ${r}`},i)});var Ml=new p("verify").description("Trigger async DNS verification for a domain").argument("[id]","Domain ID").addHelpText("after",f({context:`Verification is async \u2014 the domain enters "pending" status while DNS records are checked.
|
|
604
|
+
Poll the status with: resend domains get <id>`,output:' {"object":"domain","id":"<id>"}',errorCodes:["auth_error","verify_error"],examples:["resend domains verify 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend domains verify 4dd369bc-aa82-4ff3-97de-514ae3000ee0 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,ke,i);await O({loading:"Verifying domain...",sdkCall:n=>n.domains.verify(r),errorCode:"verify_error",successMsg:`Domain verification started. Check status with resend domains get ${r}.`},i)});var Ll=new p("domains").description("Manage verified sending and receiving domains").addHelpText("after",f({context:`Domain lifecycle:
|
|
521
605
|
1. resend domains create --name example.com (get DNS records)
|
|
522
606
|
2. Configure DNS records at your DNS provider
|
|
523
607
|
3. resend domains verify <id> (trigger verification)
|
|
524
|
-
4. resend domains get <id> (poll until "verified")`,examples:["resend domains list","resend domains create --name example.com --region us-east-1","resend domains verify 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend domains get 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend domains update <id> --tls enforced --open-tracking","resend domains delete <id> --yes","resend domains claim create --name example.com"]})).addCommand(
|
|
525
|
-
resend emails attachment <emailId> <attachmentId> --json | jq -r .download_url | xargs curl -O`,output:' {"object":"attachment","id":"<uuid>","filename":"invoice.pdf","size":51200,"content_type":"application/pdf","content_disposition":"attachment","content_id":null,"download_url":"<signed-url>","expires_at":"<iso-date>"}',errorCodes:["auth_error","fetch_error"],examples:["resend emails attachment <email-id> <attachment-id>","resend emails attachment <email-id> <attachment-id> --json"]})).action(async(e,t,
|
|
608
|
+
4. resend domains get <id> (poll until "verified")`,examples:["resend domains list","resend domains create --name example.com --region us-east-1","resend domains verify 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend domains get 4dd369bc-aa82-4ff3-97de-514ae3000ee0","resend domains update <id> --tls enforced --open-tracking","resend domains delete <id> --yes","resend domains claim create --name example.com"]})).addCommand(Hl).addCommand(Ml).addCommand(Gl).addCommand(Nl,{isDefault:!0}).addCommand(ql).addCommand(Ql).addCommand($l);var Je={resource:"email",resourcePlural:"emails",fetchItems:(e,{limit:t,after:o})=>e.emails.list({limit:t,...o&&{after:o}}),display:e=>({label:e.subject||"(no subject)",hint:e.id})};function Wl(e){return{resource:"attachment",resourcePlural:"attachments",fetchItems:(t,{limit:o,after:i})=>t.emails.attachments.list({emailId:e,limit:o,...i&&{after:i}}),display:t=>({label:t.filename??"(unnamed)",hint:t.id})}}function ui(e){let t=e.map(o=>[o.filename??"(unnamed)",o.content_type,String(o.size),o.id]);return j(["Filename","Content-Type","Size (bytes)","ID"],t,"(no attachments)")}var Jl=new p("attachment").description("Retrieve a single attachment from a sent (outbound) email").argument("[emailId]","Email UUID").argument("[attachmentId]","Attachment UUID").addHelpText("after",f({context:`The download_url is a signed URL that expires in ~1 hour. Download the file directly:
|
|
609
|
+
resend emails attachment <emailId> <attachmentId> --json | jq -r .download_url | xargs curl -O`,output:' {"object":"attachment","id":"<uuid>","filename":"invoice.pdf","size":51200,"content_type":"application/pdf","content_disposition":"attachment","content_id":null,"download_url":"<signed-url>","expires_at":"<iso-date>"}',errorCodes:["auth_error","fetch_error"],examples:["resend emails attachment <email-id> <attachment-id>","resend emails attachment <email-id> <attachment-id> --json"]})).action(async(e,t,o,i)=>{let r=i.optsWithGlobals(),n=await y(e,Je,r),s=await y(t,Wl(n),r);await $({loading:"Fetching attachment...",sdkCall:a=>a.emails.attachments.get({emailId:n,id:s}),onInteractive:a=>{console.log(`${a.filename??"(unnamed)"}`),console.log(`ID: ${a.id}`),console.log(`Content-Type: ${a.content_type}`),console.log(`Size: ${a.size} bytes`),console.log(`Disposition: ${a.content_disposition}`),console.log(`Download URL: ${a.download_url}`),console.log(`Expires: ${a.expires_at}`)}},r)});var Vl=new p("attachments").description("List attachments on a sent (outbound) email").argument("[emailId]","Email UUID").option("--limit <n>","Maximum number of attachments to return (1-100)","10").option("--after <cursor>","Return attachments after this cursor (next page)").option("--before <cursor>","Return attachments before this cursor (previous page)").addHelpText("after",f({context:`Each attachment has a download_url (signed, expires ~1 hour).
|
|
526
610
|
Use the attachment sub-command to retrieve a single attachment with its download URL:
|
|
527
611
|
resend emails attachment <emailId> <attachmentId>
|
|
528
612
|
|
|
529
613
|
content_disposition: "inline" means the attachment is embedded in the HTML body (e.g. an image).
|
|
530
|
-
content_disposition: "attachment" means it is a standalone file download.`,output:' {"object":"list","has_more":false,"data":[{"id":"<uuid>","filename":"invoice.pdf","size":51200,"content_type":"application/pdf","content_disposition":"attachment","content_id":null,"download_url":"<url>","expires_at":"<iso-date>"}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend emails attachments <email-id>","resend emails attachments <email-id> --json","resend emails attachments <email-id> --limit 25 --json"]})).action(async(e,t,
|
|
614
|
+
content_disposition: "attachment" means it is a standalone file download.`,output:' {"object":"list","has_more":false,"data":[{"id":"<uuid>","filename":"invoice.pdf","size":51200,"content_type":"application/pdf","content_disposition":"attachment","content_id":null,"download_url":"<url>","expires_at":"<iso-date>"}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend emails attachments <email-id>","resend emails attachments <email-id> --json","resend emails attachments <email-id> --limit 25 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,Je,i),n=H(t.limit,i),s=Q(n,t.after,t.before,i);await _({loading:"Fetching attachments...",sdkCall:a=>a.emails.attachments.list({emailId:r,...s}),onInteractive:a=>{console.log(ui(a.data)),G(a,`emails attachments ${r}`,{limit:n,before:t.before,apiKey:i.apiKey,profile:i.profile})}},i)});V();var zl=new p("batch").description("Send up to 100 emails in a single API request from a JSON file").option("--file <path>",'Path to a JSON file containing an array of email objects (use "-" for stdin; required in non-interactive mode)').option("--react-email <path>","Path to a React Email template (.tsx) \u2014 rendered HTML is set on every email in the batch").option("--idempotency-key <key>","Deduplicate this batch request using this key").addOption(new z("--batch-validation <mode>","Validation mode: strict (default, fail all on error) or permissive (partial success)").choices(["strict","permissive"])).addHelpText("after",f({context:`Non-interactive: --file
|
|
531
615
|
Limit: 100 emails per request (API hard limit \u2014 warned if exceeded)
|
|
532
616
|
Unsupported per-email fields: attachments, scheduled_at
|
|
533
617
|
|
|
@@ -535,53 +619,53 @@ File format (--file path):
|
|
|
535
619
|
[
|
|
536
620
|
{"from":"onboarding@resend.com","to":["delivered@resend.com"],"subject":"Hello","text":"Hi"},
|
|
537
621
|
{"from":"onboarding@resend.com","to":["delivered@resend.com"],"subject":"Hello","html":"<b>Hi</b>"}
|
|
538
|
-
]`,output:' [{"id":"<email-id>"},{"id":"<email-id>"}]',errorCodes:["auth_error","missing_file","file_read_error","stdin_read_error","invalid_json","invalid_format","react_email_build_error","react_email_render_error","batch_error"],examples:["resend emails batch --file ./emails.json","resend emails batch --file ./emails.json --batch-validation permissive",`echo '[{"from":"onboarding@resend.com","to":["delivered@resend.com"],"subject":"Hi","text":"Hello"}]' | resend emails batch --file -`]})).action(async(e,t)=>{let
|
|
539
|
-
${c.length} email${c.length===1?"":"s"} failed:`);for(let u of c)console.warn(` [${u.index}] ${u.message}`)}}else
|
|
540
|
-
resend emails receiving attachment <emailId> <attachmentId> --json | jq -r .download_url | xargs curl -O`,output:' {"object":"attachment","id":"<uuid>","filename":"invoice.pdf","size":51200,"content_type":"application/pdf","content_disposition":"attachment","content_id":null,"download_url":"<signed-url>","expires_at":"<iso-date>"}',errorCodes:["auth_error","fetch_error"],examples:["resend emails receiving attachment <email-id> <attachment-id>","resend emails receiving attachment <email-id> <attachment-id> --json"]})).action(async(e,t,
|
|
622
|
+
]`,output:' [{"id":"<email-id>"},{"id":"<email-id>"}]',errorCodes:["auth_error","missing_file","file_read_error","stdin_read_error","invalid_json","invalid_format","react_email_build_error","react_email_render_error","batch_error"],examples:["resend emails batch --file ./emails.json","resend emails batch --file ./emails.json --batch-validation permissive",`echo '[{"from":"onboarding@resend.com","to":["delivered@resend.com"],"subject":"Hi","text":"Hello"}]' | resend emails batch --file -`]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await Z(o,{permission:"sending_access"}),r=await q(e.file,{message:"Path to JSON file",placeholder:"./emails.json"},{message:"Missing --file flag. Provide a JSON file with an array of email objects.",code:"missing_file"},o),n=ce(r,o),s;try{s=JSON.parse(n)}catch{g({message:"File content is not valid JSON.",code:"invalid_json"},{json:o.json})}Array.isArray(s)||g({message:"File content must be a JSON array of email objects.",code:"invalid_format"},{json:o.json});let a=s;if(a.length>100&&console.warn(`Warning: ${a.length} emails exceeds the 100-email limit. The API may reject this request.`),e.reactEmail){let u=await Pe(e.reactEmail,o);for(let m of a)m.html=u}for(let u=0;u<a.length;u++){let m=a[u];(m===null||typeof m!="object"||Array.isArray(m))&&g({message:`Email at index ${u} must be a JSON object.`,code:"invalid_format"},{json:o.json}),"attachments"in m&&g({message:`Email at index ${u} contains "attachments", which is not supported in batch sends.`,code:"batch_error"},{json:o.json}),"scheduled_at"in m&&g({message:`Email at index ${u} contains "scheduled_at", which is not supported in batch sends.`,code:"batch_error"},{json:o.json})}let l=await Fe("Sending batch...",()=>{let u={...e.idempotencyKey&&{idempotencyKey:e.idempotencyKey},...e.batchValidation&&{batchValidation:e.batchValidation}};return i.batch.send(a,Object.keys(u).length>0?u:void 0)},"batch_error",o),d=l.data,c=l.errors;if(!o.json&&U()){console.log(`Sent ${d.length} email${d.length===1?"":"s"}`);for(let u of d)console.log(` ${u.id}`);if(c&&c.length>0){console.warn(`
|
|
623
|
+
${c.length} email${c.length===1?"":"s"} failed:`);for(let u of c)console.warn(` [${u.index}] ${u.message}`)}}else I(c&&c.length>0?{data:d,errors:c}:d,{json:o.json})});var Yl=new p("cancel").description("Cancel a scheduled email").argument("[id]","Email ID").addHelpText("after",f({output:' {"object":"email","id":"<email-id>"}',errorCodes:["auth_error","cancel_error"],examples:["resend emails cancel <email-id>","resend emails cancel <email-id> --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,Je,i);await O({loading:"Cancelling email...",sdkCall:n=>n.emails.cancel(r),errorCode:"cancel_error",successMsg:`Email cancelled: ${r}`},i)});var Xl=new p("get").description("Retrieve a sent email by ID").argument("[id]","Email ID").addHelpText("after",f({output:' {"object":"email","id":"<uuid>","from":"onboarding@resend.com","to":["delivered@resend.com"],"subject":"Hello","html":"<p>Hi</p>","text":"Hi","last_event":"delivered","created_at":"<iso-date>","scheduled_at":null,"bcc":null,"cc":null,"reply_to":null}',errorCodes:["auth_error","fetch_error"],examples:["resend emails get <email-id>","resend emails get <email-id> --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,Je,i);await $({loading:"Fetching email...",sdkCall:n=>n.emails.get(r),onInteractive:n=>{console.log(`From: ${n.from}`),console.log(`To: ${n.to.join(", ")}`),console.log(`Subject: ${n.subject}`),console.log(`Status: ${n.last_event}`),console.log(`Date: ${n.created_at}`),n.scheduled_at&&console.log(`Scheduled: ${n.scheduled_at}`)}},i)});function km(e){let t=e.map(o=>{let i=o.to.join(", "),r=i.length>40?`${i.slice(0,37)}...`:i,n=o.subject.length>50?`${o.subject.slice(0,47)}...`:o.subject;return[o.from,r,n,o.last_event??"\u2014",o.created_at,o.id]});return j(["From","To","Subject","Status","Created","ID"],t,"(no sent emails)")}var Zl=new p("list").alias("ls").description('List sent emails \u2014 returns summary (use "get <id>" for full details)').option("--limit <n>","Maximum number of emails to return (1-100)","10").option("--after <cursor>","Cursor for forward pagination \u2014 list items after this ID").option("--before <cursor>","Cursor for backward pagination \u2014 list items before this ID").addHelpText("after",f({context:"Lists emails sent by your team. For emails received by your domain, use: resend emails receiving list",output:' {"object":"list","has_more":false,"data":[{"id":"...","to":["..."],"from":"...","subject":"...","created_at":"...","last_event":"delivered|opened|...","scheduled_at":null}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend emails list","resend emails list --limit 5","resend emails list --after <email-id> --limit 10","resend emails list --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=H(e.limit,o),r=Q(i,e.after,e.before,o);await _({loading:"Fetching sent emails...",sdkCall:n=>n.emails.list(r),onInteractive:n=>{console.log(km(n.data)),G(n,"emails list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var ft={resource:"received email",resourcePlural:"received emails",fetchItems:(e,{limit:t,after:o})=>e.emails.receiving.list({limit:t,...o&&{after:o}}),display:e=>({label:e.subject||"(no subject)",hint:e.id})};function ec(e){return{resource:"attachment",resourcePlural:"attachments",fetchItems:(t,{limit:o,after:i})=>t.emails.receiving.attachments.list({emailId:e,limit:o,...i&&{after:i}}),display:t=>({label:t.filename??"(unnamed)",hint:t.id})}}function tc(e){let t=e.map(o=>{let i=o.to.join(", "),r=i.length>40?`${i.slice(0,37)}...`:i,n=o.subject.length>50?`${o.subject.slice(0,47)}...`:o.subject;return[o.from,r,n,o.created_at,o.id]});return j(["From","To","Subject","Created At","ID"],t,"(no received emails)")}var oc=new p("attachment").description("Retrieve a single attachment from a received (inbound) email").argument("[emailId]","Received email UUID").argument("[attachmentId]","Attachment UUID").addHelpText("after",f({context:`The download_url is a signed URL that expires in ~1 hour. Download the file directly:
|
|
624
|
+
resend emails receiving attachment <emailId> <attachmentId> --json | jq -r .download_url | xargs curl -O`,output:' {"object":"attachment","id":"<uuid>","filename":"invoice.pdf","size":51200,"content_type":"application/pdf","content_disposition":"attachment","content_id":null,"download_url":"<signed-url>","expires_at":"<iso-date>"}',errorCodes:["auth_error","fetch_error"],examples:["resend emails receiving attachment <email-id> <attachment-id>","resend emails receiving attachment <email-id> <attachment-id> --json"]})).action(async(e,t,o,i)=>{let r=i.optsWithGlobals(),n=await y(e,ft,r),s=await y(t,ec(n),r);await $({loading:"Fetching attachment...",sdkCall:a=>a.emails.receiving.attachments.get({emailId:n,id:s}),onInteractive:a=>{console.log(`${a.filename??"(unnamed)"}`),console.log(`ID: ${a.id}`),console.log(`Content-Type: ${a.content_type}`),console.log(`Size: ${a.size} bytes`),console.log(`Disposition: ${a.content_disposition}`),console.log(`Download URL: ${a.download_url}`),console.log(`Expires: ${a.expires_at}`)}},r)});var ic=new p("attachments").description("List attachments on a received (inbound) email").argument("[emailId]","Received email UUID").option("--limit <n>","Maximum number of attachments to return (1-100)","10").option("--after <cursor>","Return attachments after this cursor (next page)").option("--before <cursor>","Return attachments before this cursor (previous page)").addHelpText("after",f({context:`Each attachment has a download_url (signed, expires ~1 hour).
|
|
541
625
|
Use the attachment sub-command to retrieve a single attachment with its download URL:
|
|
542
626
|
resend emails receiving attachment <emailId> <attachmentId>
|
|
543
627
|
|
|
544
628
|
content_disposition: "inline" means the attachment is embedded in the HTML body (e.g. an image).
|
|
545
|
-
content_disposition: "attachment" means it is a standalone file download.`,output:' {"object":"list","has_more":false,"data":[{"id":"<uuid>","filename":"invoice.pdf","size":51200,"content_type":"application/pdf","content_disposition":"attachment","content_id":null,"download_url":"<url>","expires_at":"<iso-date>"}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend emails receiving attachments <email-id>","resend emails receiving attachments <email-id> --json","resend emails receiving attachments <email-id> --limit 25 --json"]})).action(async(e,t,
|
|
546
|
-
Forwards the original email content (passthrough mode).`,output:' {"id":"<email-id>"}',errorCodes:["auth_error","create_error"],examples:["resend emails receiving forward <email-id> --to delivered@resend.com --from onboarding@resend.com","resend emails receiving forward <email-id> --to delivered@resend.com --from onboarding@resend.com --json"]})).action(async(e,t,
|
|
629
|
+
content_disposition: "attachment" means it is a standalone file download.`,output:' {"object":"list","has_more":false,"data":[{"id":"<uuid>","filename":"invoice.pdf","size":51200,"content_type":"application/pdf","content_disposition":"attachment","content_id":null,"download_url":"<url>","expires_at":"<iso-date>"}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend emails receiving attachments <email-id>","resend emails receiving attachments <email-id> --json","resend emails receiving attachments <email-id> --limit 25 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,ft,i),n=H(t.limit,i),s=Q(n,t.after,t.before,i);await _({loading:"Fetching attachments...",sdkCall:a=>a.emails.receiving.attachments.list({emailId:r,...s}),onInteractive:a=>{console.log(ui(a.data)),G(a,`emails receiving attachments ${r}`,{limit:n,before:t.before,apiKey:i.apiKey,profile:i.profile})}},i)});var rc=new p("forward").description("Forward a received email").argument("[id]","Received email ID").requiredOption("--to <addresses...>","Recipient address(es)").requiredOption("--from <address>","Sender address").addHelpText("after",f({context:`Required: --to, --from
|
|
630
|
+
Forwards the original email content (passthrough mode).`,output:' {"id":"<email-id>"}',errorCodes:["auth_error","create_error"],examples:["resend emails receiving forward <email-id> --to delivered@resend.com --from onboarding@resend.com","resend emails receiving forward <email-id> --to delivered@resend.com --from onboarding@resend.com --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,ft,i);await W({loading:"Forwarding email...",sdkCall:n=>n.emails.receiving.forward({emailId:r,to:t.to,from:t.from}),onInteractive:n=>{console.log(`Email forwarded: ${n.id}`)}},i)});var nc=new p("get").description("Retrieve a single received (inbound) email with full details including HTML, text, and headers").argument("[id]","Received email UUID").addHelpText("after",f({context:`The raw.download_url field is a signed URL (expires ~1 hour) containing the full RFC 2822
|
|
547
631
|
MIME message. Pipe it to curl to save the original email:
|
|
548
632
|
resend emails receiving get <id> --json | jq -r .raw.download_url | xargs curl > email.eml
|
|
549
633
|
|
|
550
634
|
Attachments are listed in the attachments array. Use the attachments sub-command to get
|
|
551
635
|
download URLs:
|
|
552
|
-
resend emails receiving attachments <id>`,output:' {"object":"email","id":"<uuid>","to":["inbox@example.com"],"from":"sender@external.com","subject":"Hello","html":"<p>Hello!</p>","text":"Hello!","headers":{"x-mailer":"..."},"message_id":"<str>","bcc":[],"cc":[],"reply_to":[],"raw":{"download_url":"<url>","expires_at":"<iso-date>"},"attachments":[]}',errorCodes:["auth_error","fetch_error"],examples:["resend emails receiving get <email-id>","resend emails receiving get <email-id> --json"]})).action(async(e,t,
|
|
553
|
-
(HTML body only \u2014 use --json to view or pipe to a browser)`)}},
|
|
636
|
+
resend emails receiving attachments <id>`,output:' {"object":"email","id":"<uuid>","to":["inbox@example.com"],"from":"sender@external.com","subject":"Hello","html":"<p>Hello!</p>","text":"Hello!","headers":{"x-mailer":"..."},"message_id":"<str>","bcc":[],"cc":[],"reply_to":[],"raw":{"download_url":"<url>","expires_at":"<iso-date>"},"attachments":[]}',errorCodes:["auth_error","fetch_error"],examples:["resend emails receiving get <email-id>","resend emails receiving get <email-id> --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,ft,i);await $({loading:"Fetching received email...",sdkCall:n=>n.emails.receiving.get(r),onInteractive:n=>{if(console.log(`From: ${n.from}`),console.log(`To: ${n.to.join(", ")}`),console.log(`Subject: ${n.subject}`),console.log(`Date: ${n.created_at}`),n.attachments.length>0&&console.log(`Files: ${n.attachments.length} attachment(s)`),n.text){let s=n.text.length>200?`${n.text.slice(0,197)}...`:n.text;console.log(`${s}`)}else n.html&&console.log(`
|
|
637
|
+
(HTML body only \u2014 use --json to view or pipe to a browser)`)}},i)});var sc=new p("list").alias("ls").description("List received (inbound) emails for domains with receiving enabled").option("--limit <n>","Maximum number of emails to return (1-100)","10").option("--after <cursor>","Return emails after this cursor (next page)").option("--before <cursor>","Return emails before this cursor (previous page)").addHelpText("after",f({context:`Receiving must be enabled on the domain first:
|
|
554
638
|
resend domains update <id> --receiving enabled
|
|
555
639
|
|
|
556
640
|
Pagination: use --after or --before with a received email ID as the cursor.
|
|
557
641
|
Only one of --after or --before may be used at a time.
|
|
558
|
-
The response includes has_more: true when additional pages exist.`,output:' {"object":"list","has_more":false,"data":[{"id":"<uuid>","to":["inbox@example.com"],"from":"sender@external.com","subject":"Hello","created_at":"<iso-date>","message_id":"<str>","bcc":null,"cc":null,"reply_to":null,"attachments":[]}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend emails receiving list","resend emails receiving list --limit 25 --json","resend emails receiving list --after <email-id> --json"]})).action(async(e,t)=>{let
|
|
559
|
-
`)}},
|
|
642
|
+
The response includes has_more: true when additional pages exist.`,output:' {"object":"list","has_more":false,"data":[{"id":"<uuid>","to":["inbox@example.com"],"from":"sender@external.com","subject":"Hello","created_at":"<iso-date>","message_id":"<str>","bcc":null,"cc":null,"reply_to":null,"attachments":[]}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend emails receiving list","resend emails receiving list --limit 25 --json","resend emails receiving list --after <email-id> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=H(e.limit,o),r=Q(i,e.after,e.before,o);await _({loading:"Fetching received emails...",sdkCall:n=>n.emails.receiving.list(r),onInteractive:n=>{console.log(tc(n.data)),G(n,"emails receiving list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var et=fe(ot(),1);V();var ac=(e=1e4)=>{if(!Number.isInteger(e)||e<1)throw new RangeError(`maxSize must be a positive integer, got ${e}`);let t=new Map,o=()=>{let i=t.keys().next();i.done||t.delete(i.value)};return{has:i=>t.has(i)?(t.delete(i),t.set(i,!0),!0):!1,add:i=>{if(t.has(i)){t.delete(i),t.set(i,!0);return}t.size>=e&&o(),t.set(i,!0)},size:()=>t.size}};var xr=100,lc=5,Fr=()=>new Date().toLocaleTimeString("en-GB",{hour12:!1}),Rm=(e,t)=>{if(t)console.log(JSON.stringify(e));else{let o=e.to.map(we).join(", "),i=et.default.dim(`[${Fr()}]`),r=we(e.subject),n=r.length>50?`${r.slice(0,47)}...`:r,s=we(e.from),a=we(e.id);process.stderr.write(`${i} ${s} -> ${o} ${et.default.bold(`"${n}"`)} ${et.default.dim(a)}
|
|
643
|
+
`)}},Dm=(e,t)=>{let o=e.findIndex(i=>t.has(i.id));return o===-1?{newEmails:e,foundSeen:!1}:{newEmails:e.slice(0,o),foundSeen:!0}},cc=new p("listen").description("Poll for new inbound emails and display them as they arrive").option("--interval <seconds>","Polling interval in seconds (minimum 2)","5").addHelpText("after",f({context:`Long-running command that polls the receiving API at a fixed
|
|
560
644
|
interval and prints each new email as it arrives.
|
|
561
645
|
|
|
562
646
|
Interactive output shows one line per email. When piped (or with --json),
|
|
563
647
|
output is NDJSON (one JSON object per line).
|
|
564
648
|
|
|
565
|
-
Ctrl+C exits cleanly.`,examples:["resend emails receiving listen","resend emails receiving listen --interval 10","resend emails receiving listen --json | head -3"]})).action(async(e,t)=>{let
|
|
566
|
-
`),process.stderr.write(` ${et.default.bold("Polling:")} every ${
|
|
649
|
+
Ctrl+C exits cleanly.`,examples:["resend emails receiving listen","resend emails receiving listen --interval 10","resend emails receiving listen --json | head -3"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=Number.parseInt(e.interval??"5",10);(Number.isNaN(i)||i<2)&&g({message:"Polling interval must be at least 2 seconds.",code:"invalid_interval"},{json:o.json});let r=await Z(o),n=o.json||!U(),s=oe("Connecting...",o.quiet||n),a=ac(),l=0;try{let{data:h,error:K}=await r.emails.receiving.list({limit:1});(K||!h)&&(s.fail("Failed to connect"),g({message:K?.message??"Unexpected empty response",code:"list_error"},{json:o.json}));for(let w of h.data)a.add(w.id);s.stop("Ready")}catch(h){s.fail("Failed to connect"),g({message:N(h,"Unknown error"),code:"list_error"},{json:o.json})}n||(process.stderr.write(`
|
|
650
|
+
`),process.stderr.write(` ${et.default.bold("Polling:")} every ${i}s
|
|
567
651
|
`),process.stderr.write(`
|
|
568
652
|
Listening for new inbound emails. Press Ctrl+C to stop.
|
|
569
653
|
|
|
570
|
-
`));let d=
|
|
571
|
-
`),l>=5&&
|
|
572
|
-
`)},
|
|
654
|
+
`));let d=h=>{l++,n||process.stderr.write(`${et.default.dim(`[${Fr()}]`)} ${et.default.yellow("Warning:")} ${h}
|
|
655
|
+
`),l>=5&&g({message:"Exiting after 5 consecutive API failures.",code:"poll_error"},{json:o.json})},c=async(h,K,w)=>{if(w<=0)return{emails:K,hasMore:!0};let S=h?{limit:xr,after:h}:{limit:xr},{data:v,error:P}=await lo(()=>r.emails.receiving.list(S));if(P||!v)return{emails:K,error:P?.message??"Empty response",hasMore:!1};let{newEmails:k,foundSeen:B}=Dm(v.data,a),D=[...K,...k];if(B||!v.has_more)return{emails:D,hasMore:!1};let F=v.data[v.data.length-1]?.id;return F?c(F,D,w-1):{emails:D,hasMore:!0}},u,m=()=>{let h=`Hit page cap of ${lc*xr} emails this poll; remaining will be picked up next tick.`;n?console.log(JSON.stringify({warning:"page_cap_reached",message:h})):process.stderr.write(`${et.default.dim(`[${Fr()}]`)} ${et.default.yellow("Warning:")} ${h}
|
|
656
|
+
`)},b=async()=>{try{let h=await c(void 0,[],lc);h.error&&d(h.error),h.hasMore&&m();let K=h.emails.toReversed();for(let w of K)a.add(w.id);if(h.emails.length>0){l=0;for(let w of K)Rm(w,n)}else h.error||(l=0)}catch(h){d(N(h,"Unknown error"))}finally{u=setTimeout(b,i*1e3)}};u=setTimeout(b,i*1e3);let A=()=>{clearTimeout(u),n||process.stderr.write(`
|
|
573
657
|
Stopped listening.
|
|
574
|
-
`),process.exit(
|
|
575
|
-
resend domains update <id> --receiving enabled`,examples:["resend emails receiving list","resend emails receiving listen","resend emails receiving get <email-id>","resend emails receiving attachments <email-id>","resend emails receiving attachment <email-id> <attachment-id>","resend emails receiving forward <email-id> --to delivered@resend.com --from onboarding@resend.com"]})).addCommand(
|
|
576
|
-
Use --dry-run to print the request JSON without sending (attachments show filename and byteLength only).`,output:' {"id":"<email-id>"}',errorCodes:["auth_error","missing_body","file_read_error","invalid_options","stdin_read_error","invalid_header","invalid_tag","invalid_var","template_body_conflict","template_attachment_conflict","react_email_build_error","react_email_render_error","send_error"],examples:['resend emails send --from onboarding@resend.com --to delivered@resend.com --subject "Hello" --text "Hi"','resend emails send --from onboarding@resend.com --to delivered@resend.com --subject "Hello" --html "<b>Hi</b>"','resend emails send --from onboarding@resend.com --to delivered@resend.com --subject "Hello" --text "Hi" --attachment ./report.pdf',"resend emails send --template tmpl_123 --to delivered@resend.com"]})).action(async(e,t)=>{let
|
|
577
|
-
`),l=ce(e.htmlFile,
|
|
578
|
-
`),d=ce(e.textFile,
|
|
658
|
+
`),process.exit(Bt())};Lo(A),process.on("SIGTERM",A),await new Promise(()=>{})});var uc=new p("receiving").description("Manage received (inbound) emails \u2014 requires domain receiving to be enabled").addHelpText("after",f({context:`Receiving must be enabled on the domain first:
|
|
659
|
+
resend domains update <id> --receiving enabled`,examples:["resend emails receiving list","resend emails receiving listen","resend emails receiving get <email-id>","resend emails receiving attachments <email-id>","resend emails receiving attachment <email-id> <attachment-id>","resend emails receiving forward <email-id> --to delivered@resend.com --from onboarding@resend.com"]})).addCommand(sc,{isDefault:!0}).addCommand(nc).addCommand(cc).addCommand(ic).addCommand(oc).addCommand(rc);var dc=require("node:fs"),pc=require("node:path");V();function _m(e){let{attachments:t,...o}=e;return t?.length?{...o,attachments:t.map(i=>({filename:i.filename,byteLength:Buffer.isBuffer(i.content)?i.content.byteLength:Buffer.byteLength(String(i.content),"utf8")}))}:o}var mc=new p("send").description("Send an email").option("--from <address>","Sender address (required unless using --template)").option("--to <addresses...>","Recipient address(es) (required)").option("--subject <subject>","Email subject (required unless using --template)").option("--html <html>","HTML body").option("--html-file <path>",'Path to an HTML file for the body (use "-" for stdin)').option("--text <text>","Plain-text body").option("--text-file <path>",'Path to a plain-text file for the body (use "-" for stdin)').option("--react-email <path>","Path to a React Email template (.tsx) to bundle, render, and send").option("--cc <addresses...>","CC recipients").option("--bcc <addresses...>","BCC recipients").option("--reply-to <address>","Reply-to address").option("--scheduled-at <datetime>",'Schedule email for later \u2014 ISO 8601 or natural language e.g. "in 1 hour", "tomorrow at 9am ET"').option("--attachment <paths...>","File path(s) to attach").option("--headers <key=value...>","Custom headers as key=value pairs (e.g. X-Entity-Ref-ID=123)").option("--tags <name=value...>","Email tags as name=value pairs (e.g. category=marketing)").option("--idempotency-key <key>","Deduplicate this send request using this key").option("--dry-run","Validate input and print the request JSON without calling the API (interactive: verified-domain list is not fetched)").option("--template <id>","Template ID to use").option("--var <key=value...>","Template variables as key=value pairs (repeatable, e.g. --var name=John --var count=42)").addHelpText("after",f({context:`Required: --to and either --template, --react-email, or (--from, --subject, and one of --text | --text-file | --html | --html-file).
|
|
660
|
+
Use --dry-run to print the request JSON without sending (attachments show filename and byteLength only).`,output:' {"id":"<email-id>"}',errorCodes:["auth_error","missing_body","file_read_error","invalid_options","stdin_read_error","invalid_header","invalid_tag","invalid_var","template_body_conflict","template_attachment_conflict","react_email_build_error","react_email_render_error","send_error"],examples:['resend emails send --from onboarding@resend.com --to delivered@resend.com --subject "Hello" --text "Hi"','resend emails send --from onboarding@resend.com --to delivered@resend.com --subject "Hello" --html "<b>Hi</b>"','resend emails send --from onboarding@resend.com --to delivered@resend.com --subject "Hello" --text "Hi" --attachment ./report.pdf',"resend emails send --template tmpl_123 --to delivered@resend.com"]})).action(async(e,t)=>{let o=t.optsWithGlobals();e.htmlFile==="-"&&e.textFile==="-"&&g({message:"Cannot read both --html-file and --text-file from stdin. Pipe to one and pass the other as a file path.",code:"invalid_options"},{json:o.json}),e.from===""&&g({message:"--from cannot be empty",code:"invalid_options"},{json:o.json});let i=!!e.template;e.var&&!i&&g({message:"--var can only be used with --template",code:"invalid_var"},{json:o.json}),e.reactEmail&&(e.html||e.htmlFile||i)&&g({message:"Cannot use --react-email with --html, --html-file, or --template",code:"invalid_options"},{json:o.json}),i&&(e.html||e.htmlFile||e.text||e.textFile)&&g({message:"Cannot use --template with --html, --html-file, --text, or --text-file",code:"template_body_conflict"},{json:o.json}),i&&e.attachment&&g({message:"Cannot use --attachment with --template",code:"template_attachment_conflict"},{json:o.json});let r=e.var?Object.fromEntries(e.var.map(S=>{let v=S.indexOf("=");v<1&&g({message:`Invalid var format: "${S}". Expected key=value.`,code:"invalid_var"},{json:o.json});let P=S.slice(0,v),k=S.slice(v+1);return[P,k]})):void 0,n=e.from;if(!e.dryRun&&!n&&!i&&U()&&!o.json){let S=await Z(o,{permission:"sending_access"}),v=await Zo(S);v.length>0&&(n=await ei(v))}let s=[{flag:"from",message:"From address",placeholder:"onboarding@resend.dev",defaultValue:"onboarding@resend.dev",required:!i},{flag:"to",message:"To address",placeholder:"delivered@resend.dev",defaultValue:"delivered@resend.dev"},{flag:"subject",message:"Subject",placeholder:"Hello!",defaultValue:"Hello!",required:!i}],a=await Ls({from:n,to:e.to?.[0],subject:e.subject},s,o),l=e.html,d=e.text;e.htmlFile&&(e.html&&process.stderr.write(`Warning: both --html and --html-file provided; using --html-file
|
|
661
|
+
`),l=ce(e.htmlFile,o)),e.textFile&&(e.text&&process.stderr.write(`Warning: both --text and --text-file provided; using --text-file
|
|
662
|
+
`),d=ce(e.textFile,o)),e.reactEmail&&(l=await Pe(e.reactEmail,o));let c=d;!i&&!e.reactEmail&&!l&&!d&&(c=await q(void 0,{message:"Email body (plain text)",placeholder:"Hello, World!",defaultValue:"Hello, World!"},{message:"Missing email body. Provide --html, --html-file, --text, --text-file, or --react-email",code:"missing_body"},o));let u=e.to??[a.to],m=e.attachment?.map(S=>{try{let v=(0,dc.readFileSync)(S);return{filename:(0,pc.basename)(S),content:v}}catch{return g({message:`Failed to read file: ${S}`,code:"file_read_error"},{json:o.json})}}),b=e.headers?Object.fromEntries(e.headers.map(S=>{let v=S.indexOf("=");return v<1&&g({message:`Invalid header format: "${S}". Expected key=value.`,code:"invalid_header"},{json:o.json}),[S.slice(0,v),S.slice(v+1)]})):void 0,A=e.tags?.map(S=>{let v=S.indexOf("=");return v<1&&g({message:`Invalid tag format: "${S}". Expected name=value.`,code:"invalid_tag"},{json:o.json}),{name:S.slice(0,v),value:S.slice(v+1)}}),h;if(i?h={template:{id:e.template,...r&&{variables:r}},to:u,...a.from&&{from:a.from},...a.subject&&{subject:a.subject},...e.cc&&{cc:e.cc},...e.bcc&&{bcc:e.bcc},...e.replyTo&&{replyTo:e.replyTo},...e.scheduledAt&&{scheduledAt:e.scheduledAt},...b&&{headers:b},...A&&{tags:A}}:h={from:a.from,to:u,subject:a.subject,...l&&{html:l},...c&&{text:c},...e.cc&&{cc:e.cc},...e.bcc&&{bcc:e.bcc},...e.replyTo&&{replyTo:e.replyTo},...e.scheduledAt&&{scheduledAt:e.scheduledAt},...m&&{attachments:m},...b&&{headers:b},...A&&{tags:A}},e.dryRun){I({dryRun:!0,request:_m(h)},{json:o.json});return}let K=await Z(o,{permission:"sending_access"}),w=await Fe(e.scheduledAt?"Scheduling email...":"Sending email...",()=>K.emails.send(h,e.idempotencyKey?{idempotencyKey:e.idempotencyKey}:void 0),"send_error",o);!o.json&&U()?e.scheduledAt?console.log(`Email scheduled: ${w.id}`):console.log(`Email sent: ${w.id}`):I(w,{json:o.json})});var fc=new p("update").description("Update a scheduled email").argument("[id]","Email ID").requiredOption("--scheduled-at <datetime>","New scheduled date in ISO 8601 format (e.g. 2024-08-05T11:52:01.858Z)").addHelpText("after",f({context:"Required: --scheduled-at",output:' {"object":"email","id":"<email-id>"}',errorCodes:["auth_error","update_error"],examples:["resend emails update <email-id> --scheduled-at 2024-08-05T11:52:01.858Z","resend emails update <email-id> --scheduled-at 2024-08-05T11:52:01.858Z --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,Je,i);await O({loading:"Updating email...",sdkCall:n=>n.emails.update({id:r,scheduledAt:t.scheduledAt}),errorCode:"update_error",successMsg:`Email updated: ${r}`},i)});var gc=new p("emails").description("Send and manage emails").addHelpText("after",f({examples:['resend emails send --from onboarding@resend.com --to delivered@resend.com --subject "Hello" --text "Hi"',"resend emails get <email-id>","resend emails batch --file ./emails.json","resend emails cancel <email-id>","resend emails attachments <email-id>","resend emails attachment <email-id> <attachment-id>","resend emails receiving list","resend emails receiving forward <email-id> --to delivered@resend.com --from onboarding@resend.com"]})).addCommand(Zl,{isDefault:!0}).addCommand(mc).addCommand(Xl).addCommand(zl).addCommand(Yl).addCommand(fc).addCommand(Vl).addCommand(Jl).addCommand(uc);var Bm=new Set(["string","number","boolean","date"]);function kr(e){if(!e)return"(none)";let t=Object.entries(e);return t.length===0?"(empty)":t.map(([o,i])=>`${o}:${i}`).join(", ")}function Ac(e){let t=e.map(o=>[o.name,kr(o.schema),o.created_at,o.id]);return j(["Name","Schema","Created","ID"],t,"(no events)")}function di(e,t){if(e==="null")return null;let o=St(e,"--schema",t);(typeof o!="object"||o===null||Array.isArray(o))&&g({message:"--schema must be a JSON object mapping field names to types (string | number | boolean | date).",code:"invalid_schema"},{json:t.json});for(let[i,r]of Object.entries(o))(typeof r!="string"||!Bm.has(r))&&g({message:`Invalid schema type for "${i}": "${r}". Must be one of: string, number, boolean, date.`,code:"invalid_schema"},{json:t.json});return o}var Gt={resource:"event",resourcePlural:"events",fetchItems:(e,{limit:t,after:o})=>e.events.list({limit:t,...o&&{after:o}}),display:e=>({label:e.name,hint:e.id})};var hc=new p("create").description("Create a new event definition").option("--name <name>","Event name (e.g. user.signed_up)").option("--schema <json>","Schema as JSON mapping field names to types (string | number | boolean | date)").addHelpText("after",f({context:`Non-interactive: --name is required. --schema is optional.
|
|
579
663
|
|
|
580
664
|
Schema format:
|
|
581
665
|
A JSON object mapping field names to type strings.
|
|
582
666
|
Valid types: string, number, boolean, date.
|
|
583
|
-
Example: '{"plan":"string","age":"number","active":"boolean"}'`,output:' {"object":"event","id":"<id>"}',errorCodes:["auth_error","missing_name","invalid_schema","create_error"],examples:['resend events create --name "user.signed_up"',`resend events create --name "order.completed" --schema '{"amount":"number","currency":"string"}'`,'resend events create --name "user.signed_up" --json']})).action(async(e,t)=>{let
|
|
584
|
-
This cannot be undone.`,loading:"Deleting event...",object:"event",successMsg:"Event deleted",sdkCall:
|
|
667
|
+
Example: '{"plan":"string","age":"number","active":"boolean"}'`,output:' {"object":"event","id":"<id>"}',errorCodes:["auth_error","missing_name","invalid_schema","create_error"],examples:['resend events create --name "user.signed_up"',`resend events create --name "order.completed" --schema '{"amount":"number","currency":"string"}'`,'resend events create --name "user.signed_up" --json']})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await q(e.name,{message:"Event name",placeholder:"e.g. user.signed_up"},{message:"Missing --name flag.",code:"missing_name"},o),r=e.schema?di(e.schema,o):void 0;await W({loading:"Creating event...",sdkCall:n=>n.events.create({name:i,...r!==void 0&&{schema:r}}),onInteractive:n=>{console.log(`Event created: ${n.id}`)}},o)});var bc=new p("delete").alias("rm").description("Delete an event definition").argument("[id]","Event ID").option("--yes","Skip confirmation prompt").addHelpText("after",f({context:"Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.",output:' {"object":"event","id":"<id>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend events delete <id> --yes","resend events delete <id> --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,Gt,i);await ie(r,!!t.yes,{confirmMessage:`Delete event ${r}?
|
|
668
|
+
This cannot be undone.`,loading:"Deleting event...",object:"event",successMsg:"Event deleted",sdkCall:n=>n.events.remove(r)},i)});var Cc=new p("get").description("Retrieve an event definition").argument("[id]","Event ID").addHelpText("after",f({output:" Full event object including schema.",errorCodes:["auth_error","fetch_error"],examples:["resend events get <id>","resend events get <id> --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,Gt,i);await $({loading:"Fetching event...",sdkCall:n=>n.events.get(r),onInteractive:n=>{console.log(n.name),console.log(`ID: ${n.id}`),console.log(`Schema: ${kr(n.schema)}`),console.log(`Created: ${n.created_at}`),n.updated_at&&console.log(`Updated: ${n.updated_at}`)}},i)});var yc=new p("list").alias("ls").description("List all events").option("--limit <n>","Maximum number of events to return (1-100)","10").option("--after <cursor>","Return events after this cursor (next page)").option("--before <cursor>","Return events before this cursor (previous page)").addHelpText("after",f({output:' {"object":"list","data":[...],"has_more":true}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend events list","resend events list --limit 25 --json","resend events list --after <cursor> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=H(e.limit,o),r=Q(i,e.after,e.before,o);await _({loading:"Fetching events...",sdkCall:n=>n.events.list(r),onInteractive:n=>{console.log(Ac(n.data)),G(n,"events list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var Uc=new p("open").description("Open the events page in the Resend dashboard").addHelpText("after",f({context:"Opens the events management page in the Resend dashboard in your default browser.",examples:["resend events open"]})).action(async(e,t)=>{let o=t.optsWithGlobals();await Re(de.events,o)});var Kc=new p("send").description("Send an event to trigger automations for a contact").option("--event <name>","Event name (e.g. user.signed_up)").option("--contact-id <id>","Contact ID (mutually exclusive with --email)").option("--email <email>","Contact email (mutually exclusive with --contact-id)").option("--payload <json>","Event payload as JSON string").addHelpText("after",f({context:`Sends an event for a specific contact, triggering any automations listening for it.
|
|
585
669
|
|
|
586
670
|
Contact targeting:
|
|
587
671
|
Provide exactly one of --contact-id or --email to identify the contact.
|
|
@@ -589,12 +673,12 @@ Contact targeting:
|
|
|
589
673
|
|
|
590
674
|
Payload:
|
|
591
675
|
Optional JSON object with event-specific data.
|
|
592
|
-
Must match the event's schema if one is defined.`,output:' {"object":"event","event":"<name>"}',errorCodes:["auth_error","missing_event","missing_contact","conflicting_contact","invalid_json","send_error"],examples:['resend events send --event "user.signed_up" --contact-id <id>','resend events send --event "user.signed_up" --email user@example.com',`resend events send --event "order.completed" --contact-id <id> --payload '{"amount":99,"currency":"usd"}'`]})).action(async(e,t)=>{let
|
|
676
|
+
Must match the event's schema if one is defined.`,output:' {"object":"event","event":"<name>"}',errorCodes:["auth_error","missing_event","missing_contact","conflicting_contact","invalid_json","send_error"],examples:['resend events send --event "user.signed_up" --contact-id <id>','resend events send --event "user.signed_up" --email user@example.com',`resend events send --event "order.completed" --contact-id <id> --payload '{"amount":99,"currency":"usd"}'`]})).action(async(e,t)=>{let o=t.optsWithGlobals();e.contactId!==void 0&&e.email!==void 0&&g({message:"Cannot use both --contact-id and --email. Provide only one.",code:"conflicting_contact"},{json:o.json});let i=await q(e.event,{message:"Event name",placeholder:"e.g. user.signed_up"},{message:"Missing --event flag.",code:"missing_event"},o),r=e.contactId,n=e.email;!r&&!n&&(await Et(void 0,{message:"Identify contact by",options:[{value:"contact-id",label:"Contact ID"},{value:"email",label:"Email address"}]},{message:"Missing --contact-id or --email flag.",code:"missing_contact"},o)==="contact-id"?r=await q(void 0,{message:"Contact ID"},{message:"Missing contact ID.",code:"missing_contact"},o):n=await q(void 0,{message:"Email address",placeholder:"user@example.com"},{message:"Missing email.",code:"missing_contact"},o));let s=St(e.payload,"--payload",o),a=r?{event:i,contactId:r,...s&&{payload:s}}:{event:i,email:n,...s&&{payload:s}};await O({loading:"Sending event...",sdkCall:l=>l.events.send(a),errorCode:"send_error",successMsg:`Event sent: ${i}`},o)});V();var Sc=new p("update").description("Update an event schema").argument("[id]","Event ID").option("--schema <json>",'New schema as JSON (or "null" to clear the schema)').addHelpText("after",f({context:`Non-interactive: --schema is required. Pass "null" to remove the schema.
|
|
593
677
|
|
|
594
678
|
Schema format:
|
|
595
679
|
A JSON object mapping field names to type strings.
|
|
596
680
|
Valid types: string, number, boolean, date.
|
|
597
|
-
Example: '{"plan":"string","age":"number"}'`,output:' {"object":"event","id":"<id>"}',errorCodes:["auth_error","missing_schema","invalid_schema","update_error"],examples:[`resend events update <id> --schema '{"plan":"string","age":"number"}'`,"resend events update <id> --schema null",`resend events update <id> --schema '{"plan":"string"}' --json`]})).action(async(e,t,
|
|
681
|
+
Example: '{"plan":"string","age":"number"}'`,output:' {"object":"event","id":"<id>"}',errorCodes:["auth_error","missing_schema","invalid_schema","update_error"],examples:[`resend events update <id> --schema '{"plan":"string","age":"number"}'`,"resend events update <id> --schema null",`resend events update <id> --schema '{"plan":"string"}' --json`]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,Gt,i),n=t.schema;n===void 0&&((!U()||i.json)&&g({message:"Missing --schema flag.",code:"missing_schema"},{json:i.json}),n=await q(void 0,{message:'Schema JSON (or "null" to clear)',placeholder:'{"field":"string"}'},{message:"Missing --schema flag.",code:"missing_schema"},i));let s=di(n,i);await O({loading:"Updating event...",sdkCall:a=>a.events.update(r,{schema:s}),errorCode:"update_error",successMsg:`Event updated: ${r}`},i)});var wc=new p("events").description("Manage events").addHelpText("after",f({context:`Events define the signals that trigger automations.
|
|
598
682
|
Each event has a name and an optional typed schema (string | number | boolean | date fields).
|
|
599
683
|
|
|
600
684
|
Lifecycle:
|
|
@@ -603,33 +687,33 @@ Lifecycle:
|
|
|
603
687
|
3. resend events list
|
|
604
688
|
4. resend events get <id>
|
|
605
689
|
5. resend events update <id> --schema '{"plan":"string","trial":"boolean"}'
|
|
606
|
-
6. resend events delete <id> --yes`,examples:["resend events list",'resend events create --name "user.signed_up"',`resend events create --name "order.completed" --schema '{"amount":"number","currency":"string"}'`,"resend events get <id>",`resend events update <id> --schema '{"plan":"string"}'`,"resend events update <id> --schema null","resend events delete <id> --yes",'resend events send --event "user.signed_up" --contact-id <id>',`resend events send --event "user.signed_up" --email user@example.com --payload '{"plan":"pro"}'`]})).addCommand(hc).addCommand(
|
|
690
|
+
6. resend events delete <id> --yes`,examples:["resend events list",'resend events create --name "user.signed_up"',`resend events create --name "order.completed" --schema '{"amount":"number","currency":"string"}'`,"resend events get <id>",`resend events update <id> --schema '{"plan":"string"}'`,"resend events update <id> --schema null","resend events delete <id> --yes",'resend events send --event "user.signed_up" --contact-id <id>',`resend events send --event "user.signed_up" --email user@example.com --payload '{"plan":"pro"}'`]})).addCommand(hc).addCommand(Cc).addCommand(yc,{isDefault:!0}).addCommand(Sc).addCommand(bc).addCommand(Uc).addCommand(Kc);function vc(e){let t=e.map(o=>[o.method,o.endpoint,String(o.response_status),o.created_at,o.id]);return j(["Method","Endpoint","Status","Created","ID"],t,"(no logs)")}var xc={resource:"log",resourcePlural:"logs",fetchItems:(e,{limit:t,after:o})=>e.logs.list({limit:t,...o&&{after:o}}),display:e=>({label:`${e.method} ${e.endpoint}`,hint:e.id})};var Fc=new p("get").description("Retrieve a single API request log with full request/response bodies").argument("[id]","Log ID").addHelpText("after",f({output:" Full log object including request_body and response_body.",errorCodes:["auth_error","fetch_error"],examples:["resend logs get 3d4a472d-bc6d-4dd2-aa9d-d3d11b549e55","resend logs get 3d4a472d-bc6d-4dd2-aa9d-d3d11b549e55 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,xc,i);await $({loading:"Fetching log...",sdkCall:n=>n.logs.get(r),onInteractive:n=>{console.log(`${n.method} ${n.endpoint} \u2014 ${n.response_status}`),console.log(`ID: ${n.id}`),console.log(`Created: ${n.created_at}`),console.log(`User-Agent: ${n.user_agent??"(none)"}`),n.request_body&&console.log(`
|
|
607
691
|
Request Body:
|
|
608
|
-
${JSON.stringify(
|
|
692
|
+
${JSON.stringify(n.request_body,null,2)}`),n.response_body&&console.log(`
|
|
609
693
|
Response Body:
|
|
610
|
-
${JSON.stringify(
|
|
611
|
-
The list response does not include request/response bodies \u2014 use "resend logs get <id>" for that.`,errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend logs list","resend logs list --limit 25 --json","resend logs list --after <cursor> --json"]})).action(async(e,t)=>{let
|
|
694
|
+
${JSON.stringify(n.response_body,null,2)}`)}},i)});var kc=new p("list").alias("ls").description("List API request logs").option("--limit <n>","Maximum number of logs to return (1-100)","10").option("--after <cursor>","Return logs after this cursor (next page)").option("--before <cursor>","Return logs before this cursor (previous page)").addHelpText("after",f({output:` {"object":"list","data":[...],"has_more":true}
|
|
695
|
+
The list response does not include request/response bodies \u2014 use "resend logs get <id>" for that.`,errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend logs list","resend logs list --limit 25 --json","resend logs list --after <cursor> --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=H(e.limit,o),r=Q(i,e.after,e.before,o);await _({loading:"Fetching logs...",sdkCall:n=>n.logs.list(r),onInteractive:n=>{console.log(vc(n.data)),G(n,"logs list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var Rc=new p("open").description("Open a log or the logs list in the Resend dashboard").argument("[id]","Log ID \u2014 omit to open the logs list").addHelpText("after",f({context:`Opens the Resend dashboard in your default browser.
|
|
612
696
|
With an ID: opens that log's detail page.
|
|
613
|
-
Without an ID: opens the logs list.`,examples:["resend logs open","resend logs open 3d4a472d-bc6d-4dd2-aa9d-d3d11b549e55"]})).action(async(e,t,
|
|
697
|
+
Without an ID: opens the logs list.`,examples:["resend logs open","resend logs open 3d4a472d-bc6d-4dd2-aa9d-d3d11b549e55"]})).action(async(e,t,o)=>{let i=e?de.log(e):de.logs,r=o.optsWithGlobals();await Re(i,r)});var Dc=new p("logs").description("View API request logs").addHelpText("after",f({examples:["resend logs list","resend logs list --limit 25 --json","resend logs get 3d4a472d-bc6d-4dd2-aa9d-d3d11b549e55","resend logs open","resend logs open 3d4a472d-bc6d-4dd2-aa9d-d3d11b549e55"]})).addCommand(Fc).addCommand(kc,{isDefault:!0}).addCommand(Rc);var _c=new p("open").description("Open the Resend dashboard in your browser").addHelpText("after",f({context:"Opens https://resend.com/emails in your default browser.",examples:["resend open"]})).action(async(e,t)=>{let o=t.optsWithGlobals();await Re(de.emails,o)});var Bc=new p("contacts").description("List contacts belonging to a segment").argument("[segmentId]","ID of the segment").option("--limit <n>","Maximum number of contacts to return (1-100)","10").option("--after <cursor>","Return contacts after this cursor (next page)").option("--before <cursor>","Return contacts before this cursor (previous page)").addHelpText("after",f({context:`Lists all contacts that belong to the given segment.
|
|
614
698
|
|
|
615
699
|
If no segment ID is provided interactively, a picker will prompt you to choose one.
|
|
616
700
|
|
|
617
701
|
Pagination: use --after or --before with a contact ID as the cursor.
|
|
618
702
|
Only one of --after or --before may be used at a time.
|
|
619
|
-
The response includes has_more: true when additional pages exist.`,output:' {"object":"list","data":[{"id":"...","email":"...","first_name":"...","last_name":"...","unsubscribed":false}],"has_more":false}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend segments contacts 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend segments contacts 78261eea-8f8b-4381-83c6-79fa7120f1cf --limit 25 --json","resend segments contacts 78261eea-8f8b-4381-83c6-79fa7120f1cf --after 479e3145-dd38-4932-8c0c-e58b548c9e76"]})).action(async(e,t,
|
|
703
|
+
The response includes has_more: true when additional pages exist.`,output:' {"object":"list","data":[{"id":"...","email":"...","first_name":"...","last_name":"...","unsubscribed":false}],"has_more":false}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend segments contacts 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend segments contacts 78261eea-8f8b-4381-83c6-79fa7120f1cf --limit 25 --json","resend segments contacts 78261eea-8f8b-4381-83c6-79fa7120f1cf --after 479e3145-dd38-4932-8c0c-e58b548c9e76"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,$e,i),n=H(t.limit,i),s=Q(n,t.after,t.before,i);await _({loading:"Fetching segment contacts...",sdkCall:a=>a.contacts.list({segmentId:r,...s}),onInteractive:a=>{console.log(ni(a.data)),G(a,`segments contacts ${r}`,{limit:n,before:t.before,apiKey:i.apiKey,profile:i.profile})}},i)});var Ec=new p("create").description("Create a new segment").option("--name <name>","Segment name (required)").addHelpText("after",f({context:`Segments are named groups of contacts. Broadcasts target segments via segment_id.
|
|
620
704
|
Contacts can belong to multiple segments. Audiences are deprecated \u2014 use segments instead.
|
|
621
705
|
|
|
622
|
-
Non-interactive: --name is required.`,output:' {"object":"segment","id":"<uuid>","name":"<name>"}',errorCodes:["auth_error","missing_name","create_error"],examples:['resend segments create --name "Newsletter Subscribers"','resend segments create --name "Beta Users" --json']})).action(async(e,t)=>{let
|
|
706
|
+
Non-interactive: --name is required.`,output:' {"object":"segment","id":"<uuid>","name":"<name>"}',errorCodes:["auth_error","missing_name","create_error"],examples:['resend segments create --name "Newsletter Subscribers"','resend segments create --name "Beta Users" --json']})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await q(e.name,{message:"Segment name",placeholder:"e.g. Newsletter Subscribers"},{message:"Missing --name flag.",code:"missing_name"},o);await W({loading:"Creating segment...",sdkCall:r=>r.segments.create({name:i}),onInteractive:r=>{console.log(`Segment created: ${r.id}`),console.log(`Name: ${r.name}`)}},o)});var Tc=new p("delete").alias("rm").description("Delete a segment").argument("[id]","Segment UUID").option("--yes","Skip the confirmation prompt (required in non-interactive mode)").addHelpText("after",f({context:`Warning: Deleting a segment removes it as a target for future broadcasts,
|
|
623
707
|
but does NOT delete the contacts within it.
|
|
624
708
|
|
|
625
|
-
Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.`,output:' {"object":"segment","id":"<uuid>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend segments delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes","resend segments delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes --json"]})).action(async(e,t,
|
|
626
|
-
ID: ${
|
|
627
|
-
Contacts will not be deleted, but broadcasts targeting this segment will no longer work.`,loading:"Deleting segment...",object:"segment",successMsg:"Segment deleted",sdkCall:
|
|
709
|
+
Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.`,output:' {"object":"segment","id":"<uuid>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend segments delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes","resend segments delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await le(e,$e,i);await ie(r.id,!!t.yes,{confirmMessage:`Delete segment "${r.label}"?
|
|
710
|
+
ID: ${r.id}
|
|
711
|
+
Contacts will not be deleted, but broadcasts targeting this segment will no longer work.`,loading:"Deleting segment...",object:"segment",successMsg:"Segment deleted",sdkCall:n=>n.segments.remove(r.id)},i)});var Oc=new p("get").description("Retrieve a segment by ID").argument("[id]","Segment UUID").addHelpText("after",f({output:' {"object":"segment","id":"<uuid>","name":"<name>","created_at":"<iso-date>"}',errorCodes:["auth_error","fetch_error"],examples:["resend segments get 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend segments get 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,$e,i);await $({loading:"Fetching segment...",sdkCall:n=>n.segments.get(r),onInteractive:n=>{console.log(`${n.name}`),console.log(`ID: ${n.id}`),console.log(`Created: ${n.created_at}`)}},i)});var jc=new p("list").alias("ls").description("List all segments").option("--limit <n>","Maximum number of segments to return (1-100)","10").option("--after <cursor>","Return segments after this cursor (next page)").option("--before <cursor>","Return segments before this cursor (previous page)").addHelpText("after",f({context:`Pagination: use --after or --before with a segment ID as the cursor.
|
|
628
712
|
Only one of --after or --before may be used at a time.
|
|
629
713
|
The response includes has_more: true when additional pages exist.
|
|
630
714
|
|
|
631
715
|
Use "resend segments list" to discover segment IDs for use with broadcasts
|
|
632
|
-
or "resend contacts add-segment".`,output:' {"object":"list","data":[{"id":"<uuid>","name":"<name>","created_at":"<iso-date>"}],"has_more":false}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend segments list","resend segments list --limit 25 --json","resend segments list --after 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t)=>{let
|
|
716
|
+
or "resend contacts add-segment".`,output:' {"object":"list","data":[{"id":"<uuid>","name":"<name>","created_at":"<iso-date>"}],"has_more":false}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend segments list","resend segments list --limit 25 --json","resend segments list --after 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=H(e.limit,o),r=Q(i,e.after,e.before,o);await _({loading:"Fetching segments...",sdkCall:n=>n.segments.list(r),onInteractive:n=>{console.log(oi(n.data)),G(n,"segments list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var Ic=new p("segments").description("Manage segments").addHelpText("after",f({context:`Segments are the modern replacement for Audiences (deprecated).
|
|
633
717
|
A segment is a named group of contacts. Broadcasts target segments via segment_id.
|
|
634
718
|
Contacts can belong to multiple segments.
|
|
635
719
|
|
|
@@ -638,7 +722,7 @@ Segment membership is managed through the contacts namespace:
|
|
|
638
722
|
resend contacts remove-segment <contactId> <segmentId>
|
|
639
723
|
resend contacts segments <contactId>
|
|
640
724
|
|
|
641
|
-
There is no "update" endpoint \u2014 to rename a segment, delete it and recreate.`,examples:["resend segments list",'resend segments create --name "Newsletter Subscribers"',"resend segments get 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend segments contacts 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend segments delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes"]})).addCommand(
|
|
725
|
+
There is no "update" endpoint \u2014 to rename a segment, delete it and recreate.`,examples:["resend segments list",'resend segments create --name "Newsletter Subscribers"',"resend segments get 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend segments contacts 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend segments delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes"]})).addCommand(Bc).addCommand(Ec).addCommand(Oc).addCommand(jc,{isDefault:!0}).addCommand(Tc);V();function pi(e){return e.map(t=>{let[o,i,...r]=t.split(":");if(!o)throw new Error(`Invalid --var "${t}": key is required.`);if(i!=="string"&&i!=="number")throw new Error(`Invalid --var "${t}": type must be "string" or "number".`);let n=r.length?r.join(":"):void 0;if(n!=null&&n==="")throw new Error(`Invalid --var "${t}": fallback value cannot be empty.`);let s=n;if(i==="number"){if(s!=null&&Number.isNaN(Number(s)))throw new Error(`Invalid --var "${t}": fallback "${s}" is not a valid number.`);return{key:o,type:"number",...s!=null?{fallbackValue:Number(s)}:{}}}return{key:o,type:"string",...s!=null?{fallbackValue:s}:{}}})}var Ve={resource:"template",resourcePlural:"templates",fetchItems:(e,{limit:t,after:o})=>e.templates.list({limit:t,...o&&{after:o}}),display:e=>({label:e.name,hint:e.id})};function Pc(e){let t=e.map(o=>[o.name,o.status,o.alias??"",o.id,o.created_at]);return j(["Name","Status","Alias","ID","Created"],t,"(no templates)")}var $c=new p("create").description("Create a new template").option("--name <name>","Template name \u2014 required").option("--html <html>","HTML body").option("--html-file <path>",'Path to an HTML file for the body (use "-" for stdin)').option("--subject <subject>","Email subject").option("--text <text>","Plain-text body").option("--text-file <path>",'Path to a plain-text file for the body (use "-" for stdin)').option("--react-email <path>","Path to a React Email template (.tsx) to bundle, render, and use as HTML body").option("--from <address>","Sender address").option("--reply-to <address>","Reply-to address").option("--alias <alias>","Template alias for lookup by name").option("--var <var...>","Template variable: KEY:type or KEY:type:fallback (repeatable)").addHelpText("after",f({context:`Creates a new draft template. Use "resend templates publish" to make it available for sending.
|
|
642
726
|
|
|
643
727
|
--name is required. Body: provide --html, --html-file, or --react-email. Optionally add --text or --text-file for plain-text.
|
|
644
728
|
|
|
@@ -648,24 +732,24 @@ There is no "update" endpoint \u2014 to rename a segment, delete it and recreate
|
|
|
648
732
|
--html "<p>Hi {{{NAME}}}, your total is {{{PRICE}}}</p>"
|
|
649
733
|
--var NAME:string --var PRICE:number:0
|
|
650
734
|
|
|
651
|
-
Non-interactive: --name and a body (--html, --html-file, or --react-email) are required. --text-file provides a plain-text fallback.`,output:' {"object":"template","id":"<template-id>"}',errorCodes:["auth_error","missing_name","missing_body","file_read_error","invalid_options","stdin_read_error","react_email_build_error","react_email_render_error","create_error"],examples:['resend templates create --name "Welcome" --html "<h1>Hello</h1>" --subject "Welcome!"','resend templates create --name "Newsletter" --html-file ./template.html --from acme@example.com','resend templates create --name "Onboarding" --html "<p>Hi</p>" --alias onboarding --json','resend templates create --name "Order" --html "<p>{{{PRODUCT}}}: {{{PRICE}}}</p>" --var PRODUCT:string:item --var PRICE:number:25']})).action(async(e,t)=>{let
|
|
652
|
-
`),
|
|
653
|
-
`),
|
|
735
|
+
Non-interactive: --name and a body (--html, --html-file, or --react-email) are required. --text-file provides a plain-text fallback.`,output:' {"object":"template","id":"<template-id>"}',errorCodes:["auth_error","missing_name","missing_body","file_read_error","invalid_options","stdin_read_error","react_email_build_error","react_email_render_error","create_error"],examples:['resend templates create --name "Welcome" --html "<h1>Hello</h1>" --subject "Welcome!"','resend templates create --name "Newsletter" --html-file ./template.html --from acme@example.com','resend templates create --name "Onboarding" --html "<p>Hi</p>" --alias onboarding --json','resend templates create --name "Order" --html "<p>{{{PRODUCT}}}: {{{PRICE}}}</p>" --var PRODUCT:string:item --var PRICE:number:25']})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=e.name;if(!i){(!U()||o.json)&&g({message:"Missing --name flag.",code:"missing_name"},{json:o.json});let s=await X({message:"Template name",placeholder:"e.g. Welcome Email",validate:a=>a?void 0:"Required"});x(s)&&R("Cancelled."),i=s}e.htmlFile==="-"&&e.textFile==="-"&&g({message:"Cannot read both --html-file and --text-file from stdin. Pipe to one and pass the other as a file path.",code:"invalid_options"},{json:o.json}),e.reactEmail&&(e.html||e.htmlFile)&&g({message:"Cannot use --react-email with --html or --html-file",code:"invalid_options"},{json:o.json});let r=e.html,n=e.text;if(e.htmlFile&&(e.html&&process.stderr.write(`Warning: both --html and --html-file provided; using --html-file
|
|
736
|
+
`),r=ce(e.htmlFile,o)),e.textFile&&(e.text&&process.stderr.write(`Warning: both --text and --text-file provided; using --text-file
|
|
737
|
+
`),n=ce(e.textFile,o)),e.reactEmail&&(r=await Pe(e.reactEmail,o)),!r){(!U()||o.json)&&g({message:"Missing body. Provide --html, --html-file, or --react-email.",code:"missing_body"},{json:o.json});let s=await X({message:"HTML body",placeholder:"<h1>Hello {{name}}</h1>",validate:a=>a?void 0:"Required"});x(s)&&R("Cancelled."),r=s}await W({loading:"Creating template...",sdkCall:s=>Promise.resolve(s.templates.create({name:i,html:r,...e.subject&&{subject:e.subject},...n&&{text:n},...e.from&&{from:e.from},...e.replyTo&&{replyTo:e.replyTo},...e.alias&&{alias:e.alias},...e.var&&{variables:pi(e.var)}})),onInteractive:s=>{console.log(`Template created: ${s.id}`)}},o)});var Hc=new p("delete").alias("rm").description("Delete a template").argument("[id]","Template ID or alias").option("--yes","Skip the confirmation prompt (required in non-interactive mode)").addHelpText("after",f({context:`Warning: Deleting a template is permanent and cannot be undone.
|
|
654
738
|
|
|
655
|
-
Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.`,output:' {"object":"template","id":"<uuid>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend templates delete 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend templates delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes","resend templates rm my-template-alias --yes","resend templates delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes --json"]})).action(async(e,t,
|
|
656
|
-
ID: ${
|
|
657
|
-
This action is permanent and cannot be undone.`,loading:"Deleting template...",object:"template",successMsg:"Template deleted",sdkCall:
|
|
739
|
+
Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.`,output:' {"object":"template","id":"<uuid>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend templates delete 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend templates delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes","resend templates rm my-template-alias --yes","resend templates delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await le(e,Ve,i);await ie(r.id,!!t.yes,{confirmMessage:`Delete template "${r.label}"?
|
|
740
|
+
ID: ${r.id}
|
|
741
|
+
This action is permanent and cannot be undone.`,loading:"Deleting template...",object:"template",successMsg:"Template deleted",sdkCall:n=>n.templates.remove(r.id)},i)});var Qc=new p("duplicate").description("Duplicate a template").argument("[id]","Template ID or alias to duplicate").addHelpText("after",f({context:`Creates a copy of an existing template and returns the new template ID.
|
|
658
742
|
The duplicate is created as a draft with " (Copy)" appended to the original name.
|
|
659
|
-
All fields (HTML, subject, variables, etc.) are copied to the new template.`,output:' {"object":"template","id":"<new-template-id>"}',errorCodes:["auth_error","create_error"],examples:["resend templates duplicate 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend templates duplicate my-template-alias --json"]})).action(async(e,t,
|
|
743
|
+
All fields (HTML, subject, variables, etc.) are copied to the new template.`,output:' {"object":"template","id":"<new-template-id>"}',errorCodes:["auth_error","create_error"],examples:["resend templates duplicate 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend templates duplicate my-template-alias --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,Ve,i);await W({loading:"Duplicating template...",sdkCall:n=>Promise.resolve(n.templates.duplicate(r)),onInteractive:n=>{console.log(`Template duplicated: ${n.id}`)}},i)});var Gc=new p("get").description("Retrieve a template by ID or alias").argument("[id]","Template ID or alias").addHelpText("after",f({context:"Returns the full template including HTML body, variables, and publication status.",output:' {"object":"template","id":"...","name":"...","subject":"...","status":"draft|published","html":"...","alias":"...","from":"...","reply_to":["..."],"variables":[...],"created_at":"...","updated_at":"..."}',errorCodes:["auth_error","fetch_error"],examples:["resend templates get 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend templates get my-template-alias","resend templates get 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,Ve,i);await $({loading:"Fetching template...",sdkCall:n=>n.templates.get(r),onInteractive:n=>{if(console.log(`${n.name}`),console.log(`ID: ${n.id}`),console.log(`Status: ${n.status}`),n.alias&&console.log(`Alias: ${n.alias}`),n.subject&&console.log(`Subject: ${n.subject}`),n.from&&console.log(`From: ${n.from}`),n.reply_to?.length&&console.log(`Reply-To: ${n.reply_to.join(", ")}`),n.html){let s=n.html.length>200?`${n.html.slice(0,197)}...`:n.html;console.log(`HTML: ${s}`)}n.variables?.length&&console.log(`Variables: ${n.variables.map(s=>s.key).join(", ")}`),n.published_at&&console.log(`Published: ${n.published_at}`),console.log(`Created: ${n.created_at}`),console.log(`Updated: ${n.updated_at}`)}},i)});var Nc=new p("list").alias("ls").description("List all templates").option("--limit <n>","Maximum number of templates to return (1-100)","10").option("--after <cursor>","Cursor for forward pagination \u2014 list items after this ID").option("--before <cursor>","Cursor for backward pagination \u2014 list items before this ID").addHelpText("after",f({output:' {"object":"list","has_more":false,"data":[{"id":"...","name":"...","status":"draft|published","alias":"...","created_at":"..."}]}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend templates list","resend templates list --limit 5","resend templates list --after <template-id> --limit 10","resend templates list --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=H(e.limit,o),r=Q(i,e.after,e.before,o);await _({loading:"Fetching templates...",sdkCall:n=>n.templates.list(r),onInteractive:n=>{console.log(Pc(n.data)),G(n,"templates list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var qc=new p("open").description("Open a template or the templates list in the Resend dashboard").argument("[id]","Template ID \u2014 omit to open the templates list").addHelpText("after",f({context:`Opens the Resend dashboard in your default browser.
|
|
660
744
|
With an ID: opens that template's page for editing or viewing.
|
|
661
|
-
Without an ID: opens the templates list.`,examples:["resend templates open","resend templates open 78261eea-8f8b-4381-83c6-79fa7120f1cf"]})).action(async(e,t,
|
|
745
|
+
Without an ID: opens the templates list.`,examples:["resend templates open","resend templates open 78261eea-8f8b-4381-83c6-79fa7120f1cf"]})).action(async(e,t,o)=>{let i=e?de.template(e):de.templates,r=o.optsWithGlobals();await Re(i,r)});var Mc=new p("publish").description("Publish a draft template").argument("[id]","Template ID or alias").addHelpText("after",f({context:`Promotes a draft template to published status, making it available for use in emails.
|
|
662
746
|
After updating a published template, re-publish to make the changes live.
|
|
663
|
-
Publishing an already-published template re-publishes it with the latest draft changes.`,output:' {"object":"template","id":"<template-id>"}',errorCodes:["auth_error","publish_error"],examples:["resend templates publish 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend templates publish 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t,
|
|
747
|
+
Publishing an already-published template re-publishes it with the latest draft changes.`,output:' {"object":"template","id":"<template-id>"}',errorCodes:["auth_error","publish_error"],examples:["resend templates publish 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend templates publish 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,Ve,i);await O({loading:"Publishing template...",sdkCall:n=>n.templates.publish(r),errorCode:"publish_error",successMsg:`Template published: ${r}`,retryTransient:!0},i)});var Lc=new p("update").description("Update an existing template").argument("[id]","Template ID or alias").option("--name <name>","Update template name").option("--html <html>","Update HTML body").option("--html-file <path>",'Path to an HTML file to replace the body (use "-" for stdin)').option("--subject <subject>","Update subject").option("--text <text>","Update plain-text body").option("--text-file <path>",'Path to a plain-text file to replace the body (use "-" for stdin)').option("--react-email <path>","Path to a React Email template (.tsx) to bundle, render, and use as HTML body").option("--from <address>","Update sender address").option("--reply-to <address>","Update reply-to address").option("--alias <alias>","Update template alias").option("--var <var...>","Template variable: KEY:type or KEY:type:fallback (repeatable)").addHelpText("after",f({context:`At least one option is required. Only the provided fields are changed; others are left as-is.
|
|
664
748
|
|
|
665
749
|
--var declares a template variable using the format KEY:type or KEY:type:fallback.
|
|
666
750
|
Valid types: string, number.
|
|
667
|
-
Variables must match {{{KEY}}} placeholders in the HTML body.`,output:' {"object":"template","id":"<template-id>"}',errorCodes:["auth_error","no_changes","file_read_error","invalid_options","stdin_read_error","react_email_build_error","react_email_render_error","update_error"],examples:['resend templates update 78261eea-8f8b-4381-83c6-79fa7120f1cf --name "Updated Name"',"resend templates update 78261eea-8f8b-4381-83c6-79fa7120f1cf --html-file ./new-template.html",'resend templates update 78261eea-8f8b-4381-83c6-79fa7120f1cf --subject "New Subject" --from "acme@example.com" --json',"resend templates update 78261eea-8f8b-4381-83c6-79fa7120f1cf --var PRODUCT:string:item --var PRICE:number:25"]})).action(async(e,t,
|
|
668
|
-
`),s=ce(t.textFile,
|
|
751
|
+
Variables must match {{{KEY}}} placeholders in the HTML body.`,output:' {"object":"template","id":"<template-id>"}',errorCodes:["auth_error","no_changes","file_read_error","invalid_options","stdin_read_error","react_email_build_error","react_email_render_error","update_error"],examples:['resend templates update 78261eea-8f8b-4381-83c6-79fa7120f1cf --name "Updated Name"',"resend templates update 78261eea-8f8b-4381-83c6-79fa7120f1cf --html-file ./new-template.html",'resend templates update 78261eea-8f8b-4381-83c6-79fa7120f1cf --subject "New Subject" --from "acme@example.com" --json',"resend templates update 78261eea-8f8b-4381-83c6-79fa7120f1cf --var PRODUCT:string:item --var PRICE:number:25"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals();t.name==null&&t.html==null&&t.htmlFile==null&&t.reactEmail==null&&t.subject==null&&t.text==null&&t.textFile==null&&t.from==null&&t.replyTo==null&&t.alias==null&&t.var==null&&g({message:"Provide at least one option to update: --name, --html, --html-file, --react-email, --subject, --text, --text-file, --from, --reply-to, --alias, or --var.",code:"no_changes"},{json:i.json}),t.reactEmail!=null&&(t.html!=null||t.htmlFile!=null)&&g({message:"Cannot use --react-email with --html or --html-file",code:"invalid_options"},{json:i.json}),t.html!=null&&t.htmlFile!=null&&g({message:"--html and --html-file are mutually exclusive.",code:"invalid_options"},{json:i.json}),t.htmlFile==="-"&&t.textFile==="-"&&g({message:"Cannot read both --html-file and --text-file from stdin. Pipe to one and pass the other as a file path.",code:"invalid_options"},{json:i.json});let r=await y(e,Ve,i),n=t.html,s=t.text;t.htmlFile!=null&&(n=ce(t.htmlFile,i)),t.textFile!=null&&(t.text!=null&&process.stderr.write(`Warning: both --text and --text-file provided; using --text-file
|
|
752
|
+
`),s=ce(t.textFile,i)),t.reactEmail!=null&&(n=await Pe(t.reactEmail,i)),await O({loading:"Updating template...",sdkCall:a=>a.templates.update(r,{...t.name!=null&&{name:t.name},...n!=null&&{html:n},...t.subject!=null&&{subject:t.subject},...s!=null&&{text:s},...t.from!=null&&{from:t.from},...t.replyTo!=null&&{replyTo:t.replyTo},...t.alias!=null&&{alias:t.alias},...t.var!=null&&{variables:pi(t.var)}}),errorCode:"update_error",successMsg:`Template updated: ${r}`,retryTransient:!0},i)});var Wc=new p("templates").description("Manage templates").addHelpText("after",f({context:`Lifecycle:
|
|
669
753
|
Templates follow a draft \u2192 published workflow:
|
|
670
754
|
1. create \u2014 creates a draft template
|
|
671
755
|
2. update \u2014 edits name, subject, HTML, variables, etc.
|
|
@@ -679,7 +763,7 @@ Template variables:
|
|
|
679
763
|
Each variable must be declared with --var when creating or updating:
|
|
680
764
|
--var KEY:type e.g. --var NAME:string
|
|
681
765
|
--var KEY:type:fallback e.g. --var PRICE:number:25
|
|
682
|
-
Valid types: string, number.`,examples:["resend templates list",'resend templates create --name "Welcome" --html "<h1>Hello {{{NAME}}}</h1>" --subject "Welcome!" --var NAME:string',"resend templates get 78261eea-8f8b-4381-83c6-79fa7120f1cf",'resend templates update 78261eea-8f8b-4381-83c6-79fa7120f1cf --subject "Updated Subject"',"resend templates publish 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend templates duplicate 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend templates delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes","resend templates open","resend templates open 78261eea-8f8b-4381-83c6-79fa7120f1cf"]})).addCommand(
|
|
766
|
+
Valid types: string, number.`,examples:["resend templates list",'resend templates create --name "Welcome" --html "<h1>Hello {{{NAME}}}</h1>" --subject "Welcome!" --var NAME:string',"resend templates get 78261eea-8f8b-4381-83c6-79fa7120f1cf",'resend templates update 78261eea-8f8b-4381-83c6-79fa7120f1cf --subject "Updated Subject"',"resend templates publish 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend templates duplicate 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend templates delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes","resend templates open","resend templates open 78261eea-8f8b-4381-83c6-79fa7120f1cf"]})).addCommand($c).addCommand(Gc).addCommand(qc).addCommand(Nc,{isDefault:!0}).addCommand(Lc).addCommand(Hc).addCommand(Mc).addCommand(Qc);var Jc=new p("create").description("Create a new topic for subscription management").option("--name <name>","Topic name (required)").option("--description <description>","Description shown to contacts when managing subscriptions").addOption(new z("--default-subscription <mode>","Default subscription state for contacts").choices(["opt_in","opt_out"]).default("opt_in")).addHelpText("after",f({context:`Topics enable fine-grained subscription management. Contacts can opt in or out of
|
|
683
767
|
individual topics. Broadcasts can target only contacts opted into a specific topic.
|
|
684
768
|
|
|
685
769
|
Example topics: "Product Updates", "Security Alerts", "Weekly Digest".
|
|
@@ -688,16 +772,16 @@ Example topics: "Product Updates", "Security Alerts", "Weekly Digest".
|
|
|
688
772
|
opt_in Contacts receive broadcasts unless they explicitly opt out (default)
|
|
689
773
|
opt_out Contacts do NOT receive broadcasts unless they explicitly opt in
|
|
690
774
|
|
|
691
|
-
Non-interactive: --name is required.`,output:' {"id":"<uuid>"}',errorCodes:["auth_error","missing_name","create_error"],examples:['resend topics create --name "Product Updates"','resend topics create --name "Weekly Digest" --default-subscription opt_out','resend topics create --name "Security Alerts" --description "Critical security notices" --json']})).action(async(e,t)=>{let
|
|
775
|
+
Non-interactive: --name is required.`,output:' {"id":"<uuid>"}',errorCodes:["auth_error","missing_name","create_error"],examples:['resend topics create --name "Product Updates"','resend topics create --name "Weekly Digest" --default-subscription opt_out','resend topics create --name "Security Alerts" --description "Critical security notices" --json']})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await q(e.name,{message:"Topic name",placeholder:"e.g. Product Updates"},{message:"Missing --name flag.",code:"missing_name"},o);await W({loading:"Creating topic...",sdkCall:r=>r.topics.create({name:i,defaultSubscription:e.defaultSubscription,...e.description&&{description:e.description}}),onInteractive:r=>{console.log(`Topic created: ${r.id}`)}},o)});var Vc=new p("delete").alias("rm").description("Delete a topic").argument("[id]","Topic UUID").option("--yes","Skip the confirmation prompt (required in non-interactive mode)").addHelpText("after",f({context:`Warning: Deleting a topic removes all contact subscriptions to that topic and may affect
|
|
692
776
|
broadcasts that reference this topic_id. Contacts themselves are not deleted.
|
|
693
777
|
|
|
694
|
-
Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.`,output:' {"object":"topic","id":"<uuid>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend topics delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes","resend topics delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes --json"]})).action(async(e,t,
|
|
695
|
-
ID: ${
|
|
696
|
-
All contact subscriptions and broadcast associations will be removed.`,loading:"Deleting topic...",object:"topic",successMsg:"Topic deleted",sdkCall:
|
|
697
|
-
contacts is handled via "resend contacts topics <contactId>".`,output:' {"data":[{"id":"<uuid>","name":"<name>","description":"<desc>","default_subscription":"opt_in|opt_out","created_at":"<iso-date>"}]}',errorCodes:["auth_error","list_error"],examples:["resend topics list","resend topics list --json"]})).action(async(e,t)=>{let
|
|
778
|
+
Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.`,output:' {"object":"topic","id":"<uuid>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend topics delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes","resend topics delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await le(e,pt,i);await ie(r.id,!!t.yes,{confirmMessage:`Delete topic "${r.label}"?
|
|
779
|
+
ID: ${r.id}
|
|
780
|
+
All contact subscriptions and broadcast associations will be removed.`,loading:"Deleting topic...",object:"topic",successMsg:"Topic deleted",sdkCall:n=>n.topics.remove(r.id)},i)});var zc=new p("get").description("Retrieve a topic by ID").argument("[id]","Topic UUID").addHelpText("after",f({output:' {"id":"<uuid>","name":"<name>","description":"<desc>","default_subscription":"opt_in|opt_out","created_at":"<iso-date>"}',errorCodes:["auth_error","fetch_error"],examples:["resend topics get 78261eea-8f8b-4381-83c6-79fa7120f1cf","resend topics get 78261eea-8f8b-4381-83c6-79fa7120f1cf --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,pt,i);await $({loading:"Fetching topic...",sdkCall:n=>n.topics.get(r),onInteractive:n=>{console.log(`${n.name}`),console.log(`ID: ${n.id}`),n.description&&console.log(`Description: ${n.description}`),console.log(`Default subscription: ${n.default_subscription}`),console.log(`Created: ${n.created_at}`)}},i)});var Yc=new p("list").alias("ls").description("List all topics").addHelpText("after",f({context:`Returns all topics in your account. Topic subscription management for individual
|
|
781
|
+
contacts is handled via "resend contacts topics <contactId>".`,output:' {"data":[{"id":"<uuid>","name":"<name>","description":"<desc>","default_subscription":"opt_in|opt_out","created_at":"<iso-date>"}]}',errorCodes:["auth_error","list_error"],examples:["resend topics list","resend topics list --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals();await _({loading:"Fetching topics...",sdkCall:i=>i.topics.list(),onInteractive:i=>console.log(Ea(i.data))},o)});var Xc=new p("update").description("Update a topic's name or description").argument("[id]","Topic UUID").option("--name <name>","New topic name").option("--description <description>","New description shown to contacts").addHelpText("after",f({context:`At least one of --name or --description must be provided to update the topic.
|
|
698
782
|
|
|
699
783
|
Note: --default-subscription cannot be changed after creation.
|
|
700
|
-
To change the default subscription, delete the topic and recreate it.`,output:' {"id":"<uuid>"}',errorCodes:["auth_error","no_changes","update_error"],examples:['resend topics update 78261eea-8f8b-4381-83c6-79fa7120f1cf --name "Security Alerts"','resend topics update 78261eea-8f8b-4381-83c6-79fa7120f1cf --description "Critical notices" --json']})).action(async(e,t,
|
|
784
|
+
To change the default subscription, delete the topic and recreate it.`,output:' {"id":"<uuid>"}',errorCodes:["auth_error","no_changes","update_error"],examples:['resend topics update 78261eea-8f8b-4381-83c6-79fa7120f1cf --name "Security Alerts"','resend topics update 78261eea-8f8b-4381-83c6-79fa7120f1cf --description "Critical notices" --json']})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,pt,i);!t.name&&!t.description&&g({message:"Provide at least one option to update: --name or --description.",code:"no_changes"},{json:i.json}),await O({loading:"Updating topic...",sdkCall:n=>n.topics.update({id:r,...t.name&&{name:t.name},...t.description&&{description:t.description}}),errorCode:"update_error",successMsg:`Topic updated: ${r}`},i)});var Zc=new p("topics").description("Manage topics for contact subscription preferences").addHelpText("after",f({context:`Topics enable fine-grained subscription management beyond the global unsubscribe flag.
|
|
701
785
|
A contact can opt in or out of individual topics independently.
|
|
702
786
|
|
|
703
787
|
Broadcasts can target a topic_id so only contacts who have opted into that topic
|
|
@@ -710,11 +794,11 @@ Subscription states:
|
|
|
710
794
|
|
|
711
795
|
Contact topic subscriptions are managed via the contacts namespace:
|
|
712
796
|
resend contacts topics <contactId>
|
|
713
|
-
resend contacts update-topics <contactId> --topic-id <id> --subscription opt_in`,examples:["resend topics list",'resend topics create --name "Product Updates"','resend topics create --name "Weekly Digest" --default-subscription opt_out',"resend topics get 78261eea-8f8b-4381-83c6-79fa7120f1cf",'resend topics update 78261eea-8f8b-4381-83c6-79fa7120f1cf --name "Security Alerts"',"resend topics delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes"]})).addCommand(
|
|
797
|
+
resend contacts update-topics <contactId> --topic-id <id> --subscription opt_in`,examples:["resend topics list",'resend topics create --name "Product Updates"','resend topics create --name "Weekly Digest" --default-subscription opt_out',"resend topics get 78261eea-8f8b-4381-83c6-79fa7120f1cf",'resend topics update 78261eea-8f8b-4381-83c6-79fa7120f1cf --name "Security Alerts"',"resend topics delete 78261eea-8f8b-4381-83c6-79fa7120f1cf --yes"]})).addCommand(Jc).addCommand(zc).addCommand(Yc,{isDefault:!0}).addCommand(Xc).addCommand(Vc);V();fo();bt();var eu=new p("update").description("Check for available CLI updates").addHelpText("after",f({context:`Checks the latest release on GitHub (bypasses the cache).
|
|
714
798
|
Shows the current version, latest version, and how to upgrade.`,output:` {"current":"1.4.0","latest":"1.5.0","update_available":true,"upgrade_command":"npm install -g resend-cli"}
|
|
715
|
-
{"current":"1.5.0","latest":"1.5.0","update_available":false}`,examples:["resend update","resend update --json"]})).action(async(e,t)=>{let
|
|
799
|
+
{"current":"1.5.0","latest":"1.5.0","update_available":false}`,examples:["resend update","resend update --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),r=U()&&!o.json?oe("Checking for updates..."):null,n=await wr();if(!n){r?.fail("Could not check for updates"),g({message:"Could not reach GitHub releases",code:"fetch_failed"},{json:o.json});return}let s=li(te,n),a=ci();if(o.json||!U()){I({current:te,latest:n,update_available:s,...s?{upgrade_command:a}:{}},{json:o.json});return}if(s){let l=a.startsWith("http");r?.warn(`Update available: v${te} \u2192 v${n}`),console.log(`
|
|
716
800
|
${l?"Visit":"Run"}: \x1B[36m${a}\x1B[0m
|
|
717
|
-
`)}else
|
|
801
|
+
`)}else r?.stop(`Already up to date (v${te})`)});V();var tt=["email.sent","email.delivered","email.delivery_delayed","email.bounced","email.complained","email.opened","email.clicked","email.failed","email.scheduled","email.suppressed","email.received","contact.created","contact.updated","contact.deleted","domain.created","domain.updated","domain.deleted"];function Nt(e){return e.flatMap(t=>t.split(",")).map(t=>t.trim()).filter(Boolean)}var qt={resource:"webhook",resourcePlural:"webhooks",fetchItems:(e,{limit:t,after:o})=>e.webhooks.list({limit:t,...o&&{after:o}}),display:e=>({label:e.endpoint,hint:e.id})};function tu(e){let t=e.map(o=>{let i=(o.events??[]).join(", "),r=i.length>60?`${i.slice(0,57)}...`:i;return[o.endpoint,r,o.status,o.id]});return j(["Endpoint","Events","Status","ID"],t,"(no webhooks)")}var ou=new p("create").description("Register a new webhook endpoint to receive real-time event notifications").option("--endpoint <endpoint>","HTTPS URL to receive webhook events (required)").option("--events <events...>",'Event types to subscribe to (comma or space-separated). Use "all" for all 17 events.').addHelpText("after",f({context:`Webhooks deliver real-time event notifications to your HTTPS endpoint.
|
|
718
802
|
Events fire per-recipient: a batch email to 3 recipients generates 3 email.sent events.
|
|
719
803
|
|
|
720
804
|
--endpoint must use HTTPS.
|
|
@@ -735,20 +819,20 @@ The signing_secret in the response is shown ONCE \u2014 save it immediately to v
|
|
|
735
819
|
webhook payloads using Svix signature headers (svix-id, svix-timestamp, svix-signature).
|
|
736
820
|
Use resend.webhooks.verify() in your application to validate incoming payloads.
|
|
737
821
|
|
|
738
|
-
Non-interactive: --endpoint and --events are required.`,output:' {"object":"webhook","id":"<uuid>","signing_secret":"<whsec_...>"}',errorCodes:["auth_error","missing_endpoint","missing_events","create_error"],examples:["resend webhooks create --endpoint https://app.example.com/hooks/resend --events all","resend webhooks create --endpoint https://app.example.com/hooks/resend --events email.sent email.bounced","resend webhooks create --endpoint https://app.example.com/hooks/resend --events all --json"]})).action(async(e,t)=>{let
|
|
822
|
+
Non-interactive: --endpoint and --events are required.`,output:' {"object":"webhook","id":"<uuid>","signing_secret":"<whsec_...>"}',errorCodes:["auth_error","missing_endpoint","missing_events","create_error"],examples:["resend webhooks create --endpoint https://app.example.com/hooks/resend --events all","resend webhooks create --endpoint https://app.example.com/hooks/resend --events email.sent email.bounced","resend webhooks create --endpoint https://app.example.com/hooks/resend --events all --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await q(e.endpoint,{message:"Webhook endpoint URL",placeholder:"https://your-app.com/webhooks/resend",validate:s=>{if(!s)return"Endpoint URL is required";if(!s.startsWith("https://"))return"Endpoint must use HTTPS"}},{message:"Missing --endpoint flag.",code:"missing_endpoint"},o),r,n=e.events?.length?Nt(e.events):void 0;if(n?.includes("all"))r=tt;else if(n?.length)r=n;else{(!U()||o.json)&&g({message:"Missing --events flag.",code:"missing_events"},{json:o.json});let s=await vn({message:"Select event types to subscribe to",options:tt.map(a=>({value:a,label:a}))});x(s)&&R("Cancelled."),r=s}await W({loading:"Creating webhook...",sdkCall:s=>s.webhooks.create({endpoint:i,events:r}),onInteractive:s=>{console.log("Webhook created"),console.log(`ID: ${s.id}`),console.log(`Signing Secret: ${s.signing_secret}`),console.log("Save the signing secret \u2014 it is only shown once.")}},o)});var iu=new p("delete").alias("rm").description("Delete a webhook endpoint and stop all event deliveries to it").argument("[id]","Webhook UUID").option("--yes","Skip the confirmation prompt (required in non-interactive mode)").addHelpText("after",f({context:`Warning: Deleting a webhook immediately stops event delivery to the endpoint.
|
|
739
823
|
In-flight events may still be attempted once before the deletion takes effect.
|
|
740
824
|
To temporarily pause delivery without losing configuration, use:
|
|
741
825
|
resend webhooks update <id> --status disabled
|
|
742
826
|
|
|
743
|
-
Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.`,output:' {"object":"webhook","id":"<uuid>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend webhooks delete wh_abc123 --yes","resend webhooks delete wh_abc123 --yes --json"]})).action(async(e,t,
|
|
744
|
-
ID: ${
|
|
745
|
-
Events will no longer be delivered to this endpoint.`,loading:"Deleting webhook...",object:"webhook",successMsg:"Webhook deleted",sdkCall:
|
|
746
|
-
To rotate secrets, delete the webhook and recreate it.`,output:' {"object":"webhook","id":"<uuid>","endpoint":"<url>","events":["<event>"],"status":"enabled|disabled","created_at":"<iso-date>","signing_secret":"<whsec_...>"}',errorCodes:["auth_error","fetch_error"],examples:["resend webhooks get wh_abc123","resend webhooks get wh_abc123 --json"]})).action(async(e,t,
|
|
827
|
+
Non-interactive: --yes is required to confirm deletion when stdin/stdout is not a TTY.`,output:' {"object":"webhook","id":"<uuid>","deleted":true}',errorCodes:["auth_error","confirmation_required","delete_error"],examples:["resend webhooks delete wh_abc123 --yes","resend webhooks delete wh_abc123 --yes --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await le(e,qt,i);await ie(r.id,!!t.yes,{confirmMessage:`Delete webhook "${r.label}"?
|
|
828
|
+
ID: ${r.id}
|
|
829
|
+
Events will no longer be delivered to this endpoint.`,loading:"Deleting webhook...",object:"webhook",successMsg:"Webhook deleted",sdkCall:n=>n.webhooks.remove(r.id)},i)});var ru=new p("get").description("Retrieve a webhook endpoint configuration by ID").argument("[id]","Webhook UUID").addHelpText("after",f({context:`Note: The signing_secret is not returned by the get endpoint.
|
|
830
|
+
To rotate secrets, delete the webhook and recreate it.`,output:' {"object":"webhook","id":"<uuid>","endpoint":"<url>","events":["<event>"],"status":"enabled|disabled","created_at":"<iso-date>","signing_secret":"<whsec_...>"}',errorCodes:["auth_error","fetch_error"],examples:["resend webhooks get wh_abc123","resend webhooks get wh_abc123 --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,qt,i);await $({loading:"Fetching webhook...",sdkCall:n=>n.webhooks.get(r),onInteractive:n=>{console.log(`${n.endpoint}`),console.log(`ID: ${n.id}`),console.log(`Status: ${n.status}`),console.log(`Events: ${(n.events??[]).join(", ")||"(none)"}`),console.log(`Created: ${n.created_at}`)}},i)});var nu=new p("list").alias("ls").description("List all registered webhook endpoints").option("--limit <n>","Maximum number of webhooks to return (1-100)","10").option("--after <cursor>","Return webhooks after this cursor (next page)").option("--before <cursor>","Return webhooks before this cursor (previous page)").addHelpText("after",f({context:`Pagination: use --after or --before with a webhook ID as the cursor.
|
|
747
831
|
Only one of --after or --before may be used at a time.
|
|
748
|
-
The response includes has_more: true when additional pages exist.`,output:' {"object":"list","data":[{"id":"<uuid>","endpoint":"<url>","events":["<event>"],"status":"enabled","created_at":"<iso-date>"}],"has_more":false}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend webhooks list","resend webhooks list --limit 25 --json","resend webhooks list --after wh_abc123 --json"]})).action(async(e,t)=>{let
|
|
832
|
+
The response includes has_more: true when additional pages exist.`,output:' {"object":"list","data":[{"id":"<uuid>","endpoint":"<url>","events":["<event>"],"status":"enabled","created_at":"<iso-date>"}],"has_more":false}',errorCodes:["auth_error","invalid_limit","list_error"],examples:["resend webhooks list","resend webhooks list --limit 25 --json","resend webhooks list --after wh_abc123 --json"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=H(e.limit,o),r=Q(i,e.after,e.before,o);await _({loading:"Fetching webhooks...",sdkCall:n=>n.webhooks.list(r),onInteractive:n=>{console.log(tu(n.data)),G(n,"webhooks list",{limit:i,before:e.before,apiKey:o.apiKey,profile:o.profile})}},o)});var au=require("node:http");var he=fe(ot(),1);V();function su(e){return e?"error"in e?e.timeout?{status:504,body:"Forward target timed out"}:{status:502,body:"Forward target unreachable"}:e.status>=200&&e.status<300?{status:200,body:"OK"}:{status:e.status,body:"Forward target failed"}:{status:200,body:"OK"}}var lu=["svix-id","svix-timestamp","svix-signature"],Em=3e4;function Tm(){return new Date().toLocaleTimeString("en-GB",{hour12:!1})}function Om(e){let t=we(e.type??"unknown"),o=e.data??{},i=we(o.id??""),r="";if(t.startsWith("email.")){let n=we(o.from??""),s=we(Array.isArray(o.to)?o.to[0]:"");(n||s)&&(r=`${n} -> ${s}`)}else t.startsWith("domain.")?r=we(o.name??""):t.startsWith("contact.")&&(r=we(o.email??""));return{type:t,resourceId:i,detail:r}}function jm(e){let t=`${e} ${Im(e)}`;return e>=200&&e<300?he.default.green(t):e>=400&&e<500?he.default.yellow(t):he.default.red(t)}function Im(e){return{200:"OK",201:"Created",204:"No Content",400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout"}[e]??""}async function Pm(e,t,o){let i={"content-type":"application/json"};for(let s of lu){let a=o[s];a&&(i[s]=a)}let r=e.startsWith("http")?e:`http://${e}`;return{status:(await fetch(r,{method:"POST",headers:i,body:t,signal:AbortSignal.timeout(Em)})).status}}function $m(e){return new Promise((t,o)=>{let i=[];e.on("data",r=>i.push(r)),e.on("end",()=>t(Buffer.concat(i).toString())),e.on("error",o)})}async function Hm(e,t,o){process.stderr.write(`
|
|
749
833
|
Cleaning up...`);try{await e.webhooks.remove(t),process.stderr.write(` Webhook ${t} deleted.
|
|
750
834
|
`)}catch{process.stderr.write(` Failed to delete webhook ${t}.
|
|
751
|
-
`)}
|
|
835
|
+
`)}o.close()}var cu=new p("listen").description("Listen for webhook events locally during development").option("--url <url>","Public URL for receiving webhooks (your tunnel URL)").option("--forward-to <url>","Forward payloads to this local URL").option("--events <events...>","Event types to listen for (default: all)").option("--port <port>","Local server port","4318").addHelpText("after",f({context:`Start a local server that receives Resend webhook events in real time.
|
|
752
836
|
|
|
753
837
|
You must provide a public URL (e.g. from ngrok or localtunnel) that
|
|
754
838
|
points to the local server port. The CLI will:
|
|
@@ -759,26 +843,26 @@ points to the local server port. The CLI will:
|
|
|
759
843
|
5. Delete the temporary webhook on exit (Ctrl+C)
|
|
760
844
|
|
|
761
845
|
Important: your tunnel must forward traffic to the same port as --port (default 4318).
|
|
762
|
-
For example, if using ngrok: ngrok http 4318`,examples:["resend webhooks listen --url https://example.ngrok-free.app","resend webhooks listen --url https://example.ngrok-free.app --forward-to localhost:3000/webhook","resend webhooks listen --url https://example.ngrok-free.app --events email.sent email.bounced","resend webhooks listen --url https://example.ngrok-free.app --port 8080"]})).action(async(e,t)=>{let
|
|
763
|
-
`),e.forwardTo&&
|
|
764
|
-
`):process.stderr.write(`${
|
|
765
|
-
`)}}let
|
|
766
|
-
`),process.stderr.write(` ${
|
|
767
|
-
`),process.stderr.write(` ${
|
|
768
|
-
`),process.stderr.write(` ${
|
|
769
|
-
`),process.stderr.write(` ${
|
|
770
|
-
`),e.forwardTo){let
|
|
846
|
+
For example, if using ngrok: ngrok http 4318`,examples:["resend webhooks listen --url https://example.ngrok-free.app","resend webhooks listen --url https://example.ngrok-free.app --forward-to localhost:3000/webhook","resend webhooks listen --url https://example.ngrok-free.app --events email.sent email.bounced","resend webhooks listen --url https://example.ngrok-free.app --port 8080"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=await q(e.url,{message:"Public tunnel URL",placeholder:"https://example.ngrok-free.app",validate:A=>{if(!A)return"URL is required";if(!A.startsWith("https://")&&!A.startsWith("http://"))return"URL must start with http:// or https://"}},{message:"Missing --url flag.",code:"missing_url"},o),r=Number.parseInt(e.port??"4318",10);(Number.isNaN(r)||r<1||r>65535)&&g({message:"Invalid port number.",code:"invalid_port"},{json:o.json});let n=e.events?.length?Nt(e.events):void 0,s;n?.includes("all")?s=tt:n?.length?s=n:s=tt;let a=await Z(o),l=o.json||!U(),d=(0,au.createServer)(async(A,h)=>{try{if(A.method!=="POST"){h.writeHead(405).end("Method not allowed");return}let K=await $m(A),w;try{w=JSON.parse(K)}catch{h.writeHead(400).end("Invalid JSON");return}let S={};for(let F of lu){let E=A.headers[F];S[F]=Array.isArray(E)?E[0]:E}let{type:v,resourceId:P,detail:k}=Om(w),B;if(e.forwardTo)try{let{status:F}=await Pm(e.forwardTo,K,S);B={status:F}}catch(F){let E=F instanceof DOMException&&F.name==="TimeoutError";B={error:F instanceof Error?F.message:"Unknown error",timeout:E}}if(l){let F={timestamp:new Date().toISOString(),type:v,resource_id:P,payload:w};e.forwardTo&&B&&(F.forwarded="error"in B?{url:e.forwardTo,error:B.error}:{url:e.forwardTo,status:B.status}),console.log(JSON.stringify(F))}else{let F=he.default.dim(`[${Tm()}]`),E=v.padEnd(20),be=P.padEnd(14);if(process.stderr.write(`${F} ${he.default.bold(E)} ${he.default.cyan(be)} ${k}
|
|
847
|
+
`),e.forwardTo&&B){let ee=e.forwardTo.startsWith("http")?e.forwardTo:`http://${e.forwardTo}`;"error"in B?process.stderr.write(`${he.default.dim(" -> POST")} ${ee} ${he.default.red(`[Error: ${B.error}]`)}
|
|
848
|
+
`):process.stderr.write(`${he.default.dim(" -> POST")} ${ee} ${he.default.dim(`[${jm(B.status)}]`)}
|
|
849
|
+
`)}}let D=su(B);h.writeHead(D.status).end(D.body)}catch{h.headersSent||h.writeHead(500).end("Internal error")}});try{await new Promise((A,h)=>{d.on("error",h),d.listen(r,A)})}catch(A){g({message:A instanceof Error?`Failed to start local server on port ${r}: ${A.message}`:`Failed to start local server on port ${r}`,code:"server_listen_error"},{json:o.json})}let c=oe("Setting up webhook listener...",o.quiet),u;try{let{data:A,error:h}=await a.webhooks.create({endpoint:i,events:s});(h||!A)&&(c.fail("Failed to create webhook"),d.close(),g({message:h?.message??"Unexpected empty response",code:"create_error"},{json:o.json})),u=A.id}catch(A){c.fail("Failed to create webhook"),d.close(),g({message:A instanceof Error?A.message:"Unknown error",code:"create_error"},{json:o.json})}if(c.stop("Webhook listener ready"),!l){let A=s.length===tt.length?"all events":s.length<=3?s.join(", "):`${s.slice(0,3).join(", ")} (+${s.length-3} more)`;if(process.stderr.write(`
|
|
850
|
+
`),process.stderr.write(` ${he.default.bold("Webhook:")} ${u}
|
|
851
|
+
`),process.stderr.write(` ${he.default.bold("Endpoint:")} ${i}
|
|
852
|
+
`),process.stderr.write(` ${he.default.bold("Events:")} ${A}
|
|
853
|
+
`),process.stderr.write(` ${he.default.bold("Server:")} http://localhost:${r}
|
|
854
|
+
`),e.forwardTo){let h=e.forwardTo.startsWith("http")?e.forwardTo:`http://${e.forwardTo}`;process.stderr.write(` ${he.default.bold("Forward:")} ${h}
|
|
771
855
|
`)}process.stderr.write(`
|
|
772
856
|
Ready! Listening for webhook events. Press Ctrl+C to stop.
|
|
773
857
|
|
|
774
|
-
`)}let
|
|
858
|
+
`)}let m=!1,b=async()=>{m||(m=!0,await Hm(a,u,d),process.exit(Bt()))};Lo(b),process.on("SIGTERM",b),await new Promise(()=>{})});var uu=new p("update").description("Update a webhook's endpoint URL, event subscriptions, or enabled status").argument("[id]","Webhook UUID").option("--endpoint <endpoint>","New HTTPS URL for this webhook").option("--events <events...>",'Replace the full event subscription list (comma or space-separated). Use "all" for all 17 events.').addOption(new z("--status <status>","Enable or disable event delivery for this webhook").choices(["enabled","disabled"])).addHelpText("after",f({context:`At least one of --endpoint, --events, or --status must be provided.
|
|
775
859
|
|
|
776
860
|
--events replaces the entire event list (it is not additive).
|
|
777
861
|
Use "all" as a shorthand for all 17 event types.
|
|
778
862
|
|
|
779
863
|
--status controls whether events are delivered to this endpoint:
|
|
780
864
|
enabled Events are delivered (default on creation)
|
|
781
|
-
disabled Events are suppressed without deleting the webhook`,output:' {"object":"webhook","id":"<uuid>"}',errorCodes:["auth_error","no_changes","update_error"],examples:["resend webhooks update wh_abc123 --endpoint https://new-app.example.com/hooks/resend","resend webhooks update wh_abc123 --events email.sent email.bounced","resend webhooks update wh_abc123 --events all","resend webhooks update wh_abc123 --status disabled","resend webhooks update wh_abc123 --endpoint https://new-app.example.com/hooks/resend --events all --json"]})).action(async(e,t,
|
|
865
|
+
disabled Events are suppressed without deleting the webhook`,output:' {"object":"webhook","id":"<uuid>"}',errorCodes:["auth_error","no_changes","update_error"],examples:["resend webhooks update wh_abc123 --endpoint https://new-app.example.com/hooks/resend","resend webhooks update wh_abc123 --events email.sent email.bounced","resend webhooks update wh_abc123 --events all","resend webhooks update wh_abc123 --status disabled","resend webhooks update wh_abc123 --endpoint https://new-app.example.com/hooks/resend --events all --json"]})).action(async(e,t,o)=>{let i=o.optsWithGlobals(),r=await y(e,qt,i),n=t.events?.length?Nt(t.events):void 0,s=n!==void 0;!t.endpoint&&!s&&!t.status&&g({message:"Provide at least one option to update: --endpoint, --events, or --status.",code:"no_changes"},{json:i.json}),s&&!n.length&&g({message:"Missing --events values.",code:"no_changes"},{json:i.json});let a=n?.includes("all")?tt:n?.length?n:void 0;await O({loading:"Updating webhook...",sdkCall:l=>l.webhooks.update(r,{...t.endpoint&&{endpoint:t.endpoint},...a?.length&&{events:a},...t.status&&{status:t.status}}),errorCode:"update_error",successMsg:`Webhook updated: ${r}`},i)});var du=new p("webhooks").description("Manage webhook endpoints for real-time event notifications").addHelpText("after",f({context:`Webhooks let you receive real-time event notifications from Resend at an HTTPS endpoint.
|
|
782
866
|
Payloads are signed with Svix headers for verification.
|
|
783
867
|
|
|
784
868
|
Event categories (17 total):
|
|
@@ -790,25 +874,25 @@ Event categories (17 total):
|
|
|
790
874
|
|
|
791
875
|
Signature verification (Svix):
|
|
792
876
|
Each delivery includes headers: svix-id, svix-timestamp, svix-signature
|
|
793
|
-
Verify payloads in your application using: resend.webhooks.verify({ payload, headers, webhookSecret })`,examples:["resend webhooks list","resend webhooks create --endpoint https://app.example.com/hooks/resend --events all","resend webhooks get wh_abc123","resend webhooks update wh_abc123 --status disabled","resend webhooks delete wh_abc123 --yes"]})).addCommand(
|
|
794
|
-
Shows which profile is active and where the active credential comes from.`,output:' {"authenticated":true,"profile":"production","api_key":"re_...abcd","source":"config","config_path":"/Users/you/.config/resend/credentials.json"}\n {"error":{"message":"Not authenticated.\\nRun `resend login` to get started.","code":"not_authenticated"}}',examples:["resend whoami","resend whoami --json","resend whoami --profile production"]})).action(async(e,t)=>{let
|
|
795
|
-
Available profiles: ${
|
|
877
|
+
Verify payloads in your application using: resend.webhooks.verify({ payload, headers, webhookSecret })`,examples:["resend webhooks list","resend webhooks create --endpoint https://app.example.com/hooks/resend --events all","resend webhooks get wh_abc123","resend webhooks update wh_abc123 --status disabled","resend webhooks delete wh_abc123 --yes"]})).addCommand(ou).addCommand(ru).addCommand(cu).addCommand(nu,{isDefault:!0}).addCommand(uu).addCommand(iu);var mu=require("node:path");ge();V();var pu={flag:"flag",env:"environment variable",config:"config file",secure_storage:"secure storage"},Qm={full_access:"full access",sending_access:"sending access"},fu=new p("whoami").description("Show current authentication status").addHelpText("after",f({setup:!0,context:`Local only \u2014 no network calls.
|
|
878
|
+
Shows which profile is active and where the active credential comes from.`,output:' {"authenticated":true,"profile":"production","api_key":"re_...abcd","source":"config","config_path":"/Users/you/.config/resend/credentials.json"}\n {"error":{"message":"Not authenticated.\\nRun `resend login` to get started.","code":"not_authenticated"}}',examples:["resend whoami","resend whoami --json","resend whoami --profile production"]})).action(async(e,t)=>{let o=t.optsWithGlobals(),i=o.profile,r=await Kt(o.apiKey,i,{refresh:!1});if(!r){let m=i||No(i),b=Se(),A=b.some(S=>S.name===m),h=i||process.env.RESEND_PROFILE,K=h&&!A?`Profile "${m}" not found.
|
|
879
|
+
Available profiles: ${b.map(S=>S.name).join(", ")||"(none)"}`:"Not authenticated.\nRun `resend login` to get started.",w=h&&!A?"profile_not_found":"not_authenticated";o.json||!U()?g({message:K,code:w},{json:o.json}):g({message:K,code:w},{json:!1})}let n=r.profile??No(i),s=(0,mu.join)(Ie(),"credentials.json"),a=r.type==="api_key"?r.key:r.access_token,l=r.source,d=r.type==="api_key"?r.permission:void 0;if(o.json||!U()){I({authenticated:!0,profile:n,api_key:dt(a),source:l,...d&&{permission:d},config_path:s},{json:o.json});return}let c=r.type==="oauth_grant"?`${pu[l]} (oauth)`:pu[l],u=d?Qm[d]:void 0;console.log(""),console.log(` Profile: ${n}`),console.log(r.type==="oauth_grant"?` Token: ${dt(a)}`:` API Key: ${dt(a)}`),console.log(` Source: ${c}`),u&&console.log(` Access: ${u}`),console.log(` Config: ${s}`),console.log("")});function gu(e,t={}){let o=t.getArgv??(()=>process.argv.slice(2)),i=[],r=[e];for(;r.length>0;){let n=r.pop();if(!n)break;i.push(n);for(let s of n.commands)r.push(s)}for(let n of i){let a=n.configureOutput().outputError??((l,d)=>d(l));n.configureOutput({outputError:(l,d)=>{a(Gm(l,e,o()),d)}})}}function Gm(e,t,o){if(!qm(e))return e;let i=Nm(t,o);return i?Mm(e,i):e}function Nm(e,t){let o=e,i=[];for(let r=0;r<t.length;r+=1){let n=t[r];if(!n||n==="--")return;let s=r;if(n.startsWith("-")&&n!=="-"){let d=n.startsWith("--")?n.split("=",1)[0]:n.length>2?n.slice(0,2):n,c;for(let u of Lm(o)){for(let m of u.createHelp().visibleOptions(u))if(m.long===d||m.short===d){c=m;break}if(c)break}if(!c)s=void 0;else if(!c.required&&!c.optional)s=r+1;else if(c.variadic)s=t.length;else if(n.startsWith("--")&&n.includes("="))s=r+1;else if(!n.startsWith("--")&&n.length>2)s=r+1;else{let u=t[r+1];c.optional&&(u===void 0||u.startsWith("-"))?s=r+1:s=Math.min(r+2,t.length)}}if(s===void 0)return;if(s!==r){r=s-1;continue}if(n.startsWith("-"))return;let a=Wm(o).find(d=>hu(d).has(n));if(a){o=a,i.push(a.name());continue}let l=Jm(n,Au(o)).map(d=>[e.name(),...i,d.name()].join(" "));return l.length===0?void 0:{unknownCommand:n,suggestions:l}}}function qm(e){return/^error: unknown command /.test(e)||/^error: too many arguments/.test(e)}function Mm(e,t){let o=e.endsWith(`
|
|
796
880
|
`)?`
|
|
797
|
-
`:"",{suggestions:
|
|
881
|
+
`:"",{suggestions:i}=t,r=i.length===1?"Did you mean this?":"Did you mean one of these?",n=i.map(s=>` ${s}`).join(`
|
|
798
882
|
`);return`error: unknown command '${t.unknownCommand}'
|
|
799
883
|
|
|
800
|
-
${
|
|
801
|
-
${
|
|
802
|
-
`);for(let e of
|
|
884
|
+
${r}
|
|
885
|
+
${n}${o}`}function Lm(e){let t=[];for(let o=e;o;o=o.parent)t.push(o);return t}function Au(e){return e.createHelp().visibleCommands(e).filter(t=>!t._hidden)}function Wm(e){let t=[...e.commands];for(let o of Au(e))t.includes(o)||t.push(o);return t}function hu(e){return new Set([e.name(),...e.aliases()])}function Jm(e,t){let o=t.map(r=>{let n=Number.POSITIVE_INFINITY;for(let s of hu(r)){if(s.length<=1)continue;let a=Vm(e,s,3),l=Math.max(e.length,s.length),d=(l-a)/l;a<=3&&d>.4&&a<n&&(n=a)}return{command:r,distance:n}}).filter(r=>Number.isFinite(r.distance));if(o.length===0)return[];let i=Math.min(...o.map(r=>r.distance));return o.filter(r=>r.distance===i).sort((r,n)=>r.command.name().localeCompare(n.command.name())).map(r=>r.command)}function Vm(e,t,o=Number.POSITIVE_INFINITY){if(Math.abs(e.length-t.length)>o)return Math.max(e.length,t.length);let i=[];for(let r=0;r<=e.length;r+=1)i[r]=[r];for(let r=0;r<=t.length;r+=1)i[0][r]=r;for(let r=1;r<=t.length;r+=1)for(let n=1;n<=e.length;n+=1){let s=e[n-1]===t[r-1]?0:1;i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+s),n>1&&r>1&&e[n-1]===t[r-2]&&e[n-2]===t[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+1))}return i[e.length][t.length]}var zm=[" \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 "," \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557"," \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551"," \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551"," \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D"," \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u255D "];function bu(){process.stdout.write(`
|
|
886
|
+
`);for(let e of zm)process.stdout.write(`${e}
|
|
803
887
|
`);process.stdout.write(`
|
|
804
|
-
`)}
|
|
805
|
-
${
|
|
888
|
+
`)}_r();fo();bt();Hs();var Br="",xu=[],Fu=[],gt=new p().name("resend").description("Resend CLI \u2014 email for developers").configureHelp({showGlobalOptions:!0,styleTitle:e=>Mt.default.gray(e)}).configureOutput({writeErr:e=>{process.stderr.write(e.replace(/^error:/,()=>Mt.default.red("error:")))}}).helpCommand(!0).version(`${kn} v${te}`,"-v, --version","Output the current version").option("--api-key <key>","Resend API key (overrides env/config)").option("-p, --profile <name>","Profile to use (overrides RESEND_PROFILE)").option("--json","Force JSON output").option("-q, --quiet","Suppress spinners and status output (implies --json)").option("--insecure-storage","Save API key as plaintext instead of secure storage").hook("preAction",(e,t)=>{let o=[];for(let r=t;r?.parent;r=r.parent)o.unshift(r.name());Br=o.join(" ");let i=r=>r.options.filter(n=>r.getOptionValueSource(n.attributeName())==="cli").map(n=>n.long?.replace(/^--/,"")??n.short?.replace(/^-/,"")??"").filter(Boolean);xu=i(t),Fu=i(e),t.optsWithGlobals().quiet&&e.setOptionValue("json",!0),t.optsWithGlobals().insecureStorage&&(process.env.RESEND_CREDENTIAL_STORE="file")}).addHelpText("after",`
|
|
889
|
+
${Mt.default.gray("Examples:")}
|
|
806
890
|
|
|
807
891
|
- Login to Resend
|
|
808
892
|
|
|
809
|
-
${
|
|
893
|
+
${Mt.default.blue("$ resend login")}
|
|
810
894
|
|
|
811
895
|
- Send an email
|
|
812
896
|
|
|
813
|
-
${
|
|
814
|
-
`).action(()=>{process.stdout.isTTY&&
|
|
897
|
+
${Mt.default.blue("$ resend emails send")}
|
|
898
|
+
`).action(()=>{process.stdout.isTTY&&bu();let e=gt.opts();e.apiKey&&g({message:"--api-key is a per-command override and was not saved. To store your API key, run `resend login`.",code:"missing_command"},{json:e.json}),gt.help()}).addCommand(Yo).addCommand(gc).addCommand(Na).addCommand(Ka).addCommand(wc).addCommand(Wc).addCommand(Fl).addCommand(sl).addCommand(Ic).addCommand(Zc).addCommand(Ll).addCommand(Dc).addCommand(ta).addCommand(du).addCommand(ua).addCommand(Xo).addCommand(fu).addCommand(Ol).addCommand(_c).addCommand(kl).addCommand(eu).addCommand(Va).addCommand(Za),ku=new p("telemetry").description("Telemetry management").helpCommand(!1);ku.command("flush").argument("<file>").action(async e=>{let{flushFromFile:t}=await Promise.resolve().then(()=>(_r(),vu));await t(e)});gt.addCommand(ku,{hidden:!0});gu(gt);gt.parseAsync().then(()=>{let e=gt.args[0];if(e==="update"||e==="telemetry")return;Br&&Dr(Br,{...gt.opts(),flags:xu,globalFlags:Fu});let t=gt.opts();El({json:!!(t.json||t.quiet)}).catch(()=>{})}).catch(e=>{g({message:N(e,"An unexpected error occurred"),code:"unexpected_error"})});
|