nitro-web 0.3.24 → 0.3.25

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nitro-web",
3
- "version": "0.3.24",
3
+ "version": "0.3.25",
4
4
  "repository": "github:boycce/nitro-web",
5
5
  "homepage": "https://boycce.github.io/nitro-web/",
6
6
  "description": "Nitro is a battle-tested, modular base project to turbocharge your projects, styled using Tailwind 🚀",
@@ -25,8 +25,8 @@ export const optionalEmailConfigKeys = ['emailReplyTo', 'emailTestMode', 'mailgu
25
25
  * @param {string} opts.template - Template name or raw HTML, e.g., 'reset-password'
26
26
  * @param {string} opts.to - Recipient(s), e.g. "Bruce<bruce@wayneenterprises.com>,..."
27
27
  * @param {Config} opts.config - Config object
28
- * @param {string} [opts.cc] - CC, e.g. "Bruce<bruce@wayneenterprises.com>,..." (not sent in development)
29
- * @param {string} [opts.bcc] - BCC, e.g. "Bruce<bruce@wayneenterprises.com>,..." (not sent in development)
28
+ * @param {string} [opts.cc] - CC, e.g. "Bruce<bruce@wayneenterprises.com>,..."
29
+ * @param {string} [opts.bcc] - BCC, e.g. "Bruce<bruce@wayneenterprises.com>,..."
30
30
  * @param {object} [opts.data] - common template data shared across recipients
31
31
  * @param {object} [opts.swigData] - vars for Nunjucks/Swig render only (not sent to Mailgun). Inherits data.
32
32
  * @param {string} [opts.from] - sender address, e.g. "Bruce<bruce@wayneenterprises.com>"
@@ -210,9 +210,9 @@ async function sendWithMailgun(settings, html) {
210
210
  // Supports batch sending via recipientVariables, limit 1000 emails
211
211
  // https://documentation.mailgun.com/en/latest/user_manual.html?highlight=batch%20sending#batch-sending
212
212
  const processedhtml = await processTemplate(settings, html)
213
- const copies = { ...(settings.cc ? { cc: settings.cc } : {}), ...(settings.bcc ? { bcc: settings.bcc } : {}) }
214
213
  const mailgunOpts = {
215
- ...(settings.isDev ? {} : copies),
214
+ ...(settings.cc ? { cc: settings.cc } : {}),
215
+ ...(settings.bcc ? { bcc: settings.bcc } : {}),
216
216
  ...(settings.attachments?.length ? { attachments: settings.attachments } : {}),
217
217
  from: settings.from,
218
218
  html: processedhtml,
@@ -229,7 +229,6 @@ async function sendWithMailgun(settings, html) {
229
229
  if (settings.test && settings.isDev) {
230
230
  console.info('Test mode: sendEmail mailgunOpts', {
231
231
  ...mailgunOpts,
232
- ...copies,
233
232
  html: null,
234
233
  'recipient-variables': settings.recipientVariables,
235
234
  attachments: settings.attachments?.map((a) => `${a.filename} (${a.content?.length} bytes)`),
@@ -6,8 +6,8 @@
6
6
  * @param {string} opts.template - Template name or raw HTML, e.g., 'reset-password'
7
7
  * @param {string} opts.to - Recipient(s), e.g. "Bruce<bruce@wayneenterprises.com>,..."
8
8
  * @param {Config} opts.config - Config object
9
- * @param {string} [opts.cc] - CC, e.g. "Bruce<bruce@wayneenterprises.com>,..." (not sent in development)
10
- * @param {string} [opts.bcc] - BCC, e.g. "Bruce<bruce@wayneenterprises.com>,..." (not sent in development)
9
+ * @param {string} [opts.cc] - CC, e.g. "Bruce<bruce@wayneenterprises.com>,..."
10
+ * @param {string} [opts.bcc] - BCC, e.g. "Bruce<bruce@wayneenterprises.com>,..."
11
11
  * @param {object} [opts.data] - common template data shared across recipients
12
12
  * @param {object} [opts.swigData] - vars for Nunjucks/Swig render only (not sent to Mailgun). Inherits data.
13
13
  * @param {string} [opts.from] - sender address, e.g. "Bruce<bruce@wayneenterprises.com>"