domma-cms 0.32.1 → 0.32.3

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.
@@ -1,9 +1,9 @@
1
1
  /*!
2
- * Domma Tools CSS v0.29.1
2
+ * Domma Tools CSS v0.29.2
3
3
  * Dynamic Object Manipulation & Modeling API
4
4
  * (c) 2026 Darryl Waterhouse & DCBW-IT
5
- * Built: 2026-06-30T17:41:03.423Z
6
- * Commit: 487d980
5
+ * Built: 2026-06-30T19:19:17.457Z
6
+ * Commit: 3e2c74c
7
7
  */
8
8
 
9
9
  /*!
@@ -1,9 +1,9 @@
1
1
  /*!
2
- * Domma Tools v0.29.1
2
+ * Domma Tools v0.29.2
3
3
  * Developer tools: Theme Roller & Page Roller
4
4
  * (c) 2026 Darryl Waterhouse & DCBW-IT
5
- * Built: 2026-06-30T17:40:55.134Z
6
- * Commit: 487d980
5
+ * Built: 2026-06-30T19:19:08.668Z
6
+ * Commit: 3e2c74c
7
7
  *
8
8
  * Requires: domma.min.js
9
9
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "domma-cms",
3
- "version": "0.32.1",
3
+ "version": "0.32.3",
4
4
  "description": "File-based CMS powered by Domma and Fastify. Run npx domma-cms my-site to create a new project.",
5
5
  "type": "module",
6
6
  "main": "server/server.js",
@@ -81,7 +81,7 @@
81
81
  "@fastify/rate-limit": "^10.3.0",
82
82
  "@fastify/static": "9.1.1",
83
83
  "bcryptjs": "^3.0.3",
84
- "domma-js": "0.29.1",
84
+ "domma-js": "0.29.2",
85
85
  "dotenv": "^17.2.3",
86
86
  "fastify": "5.8.5",
87
87
  "gray-matter": "^4.0.3",
@@ -32,6 +32,11 @@ registerPluginResource({
32
32
  export default async function surveysPlugin(fastify, options) {
33
33
  const {authenticate} = options.auth;
34
34
  const config = {...defaultConfig, ...(options.settings || {})};
35
+ // Email transport is injectable (defaults to the real SMTP service). Tests
36
+ // pass a deterministic, network-free stub so the send path can't time out on
37
+ // real SMTP / Ethereal account creation and mark every invite "bounced".
38
+ const makeTransport = options.email?.createTransport || createTransport;
39
+ const sendMail = options.email?.sendEmail || sendEmail;
35
40
  const campaigns = createCampaigns(col);
36
41
  const audience = createAudience(col);
37
42
  const ledger = createLedger(col);
@@ -119,14 +124,14 @@ export default async function surveysPlugin(fastify, options) {
119
124
  if (!survey) return reply.code(404).send({error: 'Survey not found'});
120
125
  const mode = (req.body?.audience === 'non-responders') ? 'non-responders' : 'all';
121
126
  const smtp = getConfig('site').smtp || {};
122
- const transport = await createTransport(smtp);
127
+ const transport = await makeTransport(smtp);
123
128
  // Survey links in emails must be ABSOLUTE. Prefer the configured canonical
124
129
  // site URL; fall back to the origin of this admin request so links work
125
130
  // out of the box even when config/site.json has no `url`.
126
131
  const baseUrl = (getConfig('site').url || '').replace(/\/$/, '')
127
132
  || `${req.protocol}://${req.headers.host}`;
128
133
  const {results} = await runSend({
129
- survey, mode, audience, ledger, transport, sendEmail, smtp,
134
+ survey, mode, audience, ledger, transport, sendEmail: sendMail, smtp,
130
135
  baseUrl, fromName: config.fromName, nowIso: new Date().toISOString()
131
136
  });
132
137
  return reply.send({results});