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.
Files changed (2) hide show
  1. package/autark.mjs +5 -0
  2. 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autark-cli",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "CLI for autark \u2014 hypothesis-driven product runbooks. Track products, hypotheses, runs, and actions from the terminal.",
5
5
  "type": "module",
6
6
  "license": "MIT",