autark-cli 0.3.1 → 0.3.2
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/autark.mjs +5 -0
- package/package.json +1 -1
package/autark.mjs
CHANGED
|
@@ -891,6 +891,11 @@ async function mailSend(rest) {
|
|
|
891
891
|
rejectUnsendableAddress(to)
|
|
892
892
|
const subject = opts.subject || ''
|
|
893
893
|
const body = mailBody(opts, { to, subject })
|
|
894
|
+
const dryRun = opts['dry-run'] === true || opts.dry_run === true
|
|
895
|
+
if (dryRun) {
|
|
896
|
+
printJson({ dry_run: true, would_send: { inbox: creds.inboxId, to, subject, body } })
|
|
897
|
+
return
|
|
898
|
+
}
|
|
894
899
|
const result = await agentmailRequest('POST', `/inboxes/${encodeURIComponent(creds.inboxId)}/messages/send`, body)
|
|
895
900
|
const action = await maybeLogMailAction(opts, {
|
|
896
901
|
kind: 'send',
|
package/package.json
CHANGED