domma-cms 0.116.1 → 0.116.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.
- package/admin/js/templates/docs/usage-navigation.html +20 -2
- package/admin/js/templates/docs/usage-pages.html +12 -0
- package/admin/js/templates/docs/usage-shortcodes.html +12 -0
- package/admin/js/templates/docs/usage-site-settings.html +4 -1
- package/admin/js/templates/docs/usage-tools.html +25 -7
- package/package.json +1 -1
- package/plugins/_lib/mail/imapPool.js +40 -12
- package/plugins/_lib/mail/send.js +2 -1
|
@@ -80,14 +80,32 @@
|
|
|
80
80
|
<p>The <code>admin-sidebar</code> menu is this sidebar. In the Menus editor you can move Tools
|
|
81
81
|
between folders, rename them, hide them or add links of your own. Dashboard, Menus, Users and
|
|
82
82
|
My Profile can be moved but never hidden, so you can always get back from a bad edit.</p>
|
|
83
|
-
<p>Folders can hold folders.
|
|
84
|
-
|
|
83
|
+
<p>Folders can hold folders. Tools start in groups inside Tools by what they are for -
|
|
84
|
+
Productivity, Communication, Marketing, Publishing, Business and Maintenance (a site set up
|
|
85
|
+
before 0.103 may still have a <strong>Core</strong> group); move a Tool out of its group, or
|
|
86
|
+
move the whole group, and your arrangement is kept. A group that
|
|
85
87
|
nothing of yours has been saved into is not stored - it is made again when the sidebar draws,
|
|
86
88
|
and a user who may use none of its Tools does not see it. <strong>Back to its default
|
|
87
89
|
place</strong> on a Tool puts it back in its group. Each folder remembers whether you left it
|
|
88
90
|
open or closed on its own, so closing Tools > Core does not close a project that is also
|
|
89
91
|
called Core.</p>
|
|
90
92
|
|
|
93
|
+
<h3>Counts on the sidebar</h3>
|
|
94
|
+
<p>A Tool's badge shows what needs attention - unread messages, late tasks - in red when
|
|
95
|
+
something is late. When nothing does, it shows a plain count instead of a blank: Todo the
|
|
96
|
+
tasks done, Analytics today's page views, Booking the bookings in the next seven days, the
|
|
97
|
+
Shop its products. Hover a badge for what it means. Those plain counts are left out of a
|
|
98
|
+
closed folder's total, so a folder's number still only adds up what needs you.</p>
|
|
99
|
+
|
|
100
|
+
<h3>Resize or fold the sidebar</h3>
|
|
101
|
+
<p>Drag the sidebar's right edge (mouse, touch or pen) to make it wider or narrower;
|
|
102
|
+
double-click the edge to put it back. From the keyboard, focus the edge: the arrow keys
|
|
103
|
+
change the width (with Shift for bigger steps), Home and End go to the narrowest and widest,
|
|
104
|
+
and Enter folds it. The chevron in the sidebar header - or dragging the edge past its
|
|
105
|
+
narrowest - folds it to a rail of icons: hover or focus one for its name and what its
|
|
106
|
+
count means, and click a folder to open its contents beside the rail. The width and whether
|
|
107
|
+
it is folded are remembered in this browser.</p>
|
|
108
|
+
|
|
91
109
|
<h3>Arrange the sidebar in place</h3>
|
|
92
110
|
<p>You can also rearrange the sidebar without leaving the page you are on. Click the six-dot
|
|
93
111
|
button at the top of the sidebar, beside the site name, to turn on <strong>Arrange</strong>.
|
|
@@ -81,6 +81,18 @@ Your Markdown content goes here.</code></pre>
|
|
|
81
81
|
project answers 404 to everyone. See <a href="#/docs/usage/users-roles">Users &
|
|
82
82
|
Roles</a> for how the role ladder works.</p>
|
|
83
83
|
|
|
84
|
+
<h3>Projects</h3>
|
|
85
|
+
<p>A page belongs to a project - the <code>project</code> field, or its URL's. To remove a
|
|
86
|
+
project and everything filed under it - its pages with their versions and share links,
|
|
87
|
+
collections and their entries, forms, blocks, views, components, actions, menus, API
|
|
88
|
+
endpoints and tokens - open <strong>Projects > (the project) > Settings</strong> and
|
|
89
|
+
choose <strong>Delete with contents</strong>. It lists exactly what will go and asks you to
|
|
90
|
+
type the project's slug back; links to its pages leave every other menu. Nothing is touched
|
|
91
|
+
while a user or role is filed under the project (people are never deleted with content), while
|
|
92
|
+
one of its menus fills a site slot such as the navbar, or while a built-in collection is filed
|
|
93
|
+
under it. A starter's example pages show
|
|
94
|
+
<strong>Remove sample content</strong> on the project's overview, which does the same.</p>
|
|
95
|
+
|
|
84
96
|
<h3>Navigation</h3>
|
|
85
97
|
<p>A page is added to the navbar or footer in <strong>Content > Menus</strong>, not in the page
|
|
86
98
|
editor. See <a href="#/docs/usage/navigation">Navigation</a>.</p>
|
|
@@ -946,6 +946,18 @@ Body content in **Markdown** is supported.
|
|
|
946
946
|
<code>[christmas /]</code>; <code>[christmas snow-only="true" /]</code> is just the falling snow). Many can also be added to a card, box, hero, banner, column or
|
|
947
947
|
button as attributes: <code>[card reveal reveal-animation="zoom"]</code>. Settings are at
|
|
948
948
|
<strong>System > Effects</strong>.</p>
|
|
949
|
+
<p><code>[celebrate character="robin" /]</code> puts one character on a page at any time of year,
|
|
950
|
+
whatever the theme or date: <code>elf</code>, <code>leprechaun</code>, <code>bagpiper</code>,
|
|
951
|
+
<code>knight</code>, <code>dragon</code>, <code>welsh-dragon</code>, <code>cupid</code>,
|
|
952
|
+
<code>robin</code>, <code>snowman</code> and a few cheekier ones. <code>size</code> is
|
|
953
|
+
<code>small</code>, <code>medium</code> (the default), <code>large</code>,
|
|
954
|
+
<code>xlarge</code> or a height in pixels; <code>animate="false"</code> keeps it still.
|
|
955
|
+
Christmas has two naughty elves and St Patrick's a leprechaun scene, all off unless you ask
|
|
956
|
+
for them (<code>peeing-elf</code>, <code>thieving-elf</code>, <code>mooning-elf</code>,
|
|
957
|
+
<code>mooning-leprechaun</code>, each <code>="true"</code>).</p>
|
|
958
|
+
<p>In the page editor, right-click and open <strong>Celebrations</strong> to insert any seasonal
|
|
959
|
+
theme, butterflies, ticker tape or fireworks. Right-click an existing one to switch its
|
|
960
|
+
parts on and off - Christmas's snow only, or each decoration.</p>
|
|
949
961
|
|
|
950
962
|
<h3>Actions on pages</h3>
|
|
951
963
|
<p><code>[cta action="..." entry="..."]Label[/cta]</code> places a button that runs a CMS Action
|
|
@@ -23,7 +23,10 @@
|
|
|
23
23
|
<td>General</td>
|
|
24
24
|
<td>Site title and tagline; <strong>Site URL</strong> (the site's real address, used for
|
|
25
25
|
password reset links, canonical links and the sitemap - set it); <strong>Admin
|
|
26
|
-
home</strong> (the screen the admin opens on); the default spacer size
|
|
26
|
+
home</strong> (the screen the admin opens on); the default spacer size. The
|
|
27
|
+
browser-tab icon is the brand logo, or the first letter of the site's name when there
|
|
28
|
+
is none (a <code>favicon</code> in <code>config/site.json</code> takes first
|
|
29
|
+
place).</td>
|
|
27
30
|
</tr>
|
|
28
31
|
<tr>
|
|
29
32
|
<td>SEO</td>
|
|
@@ -7,8 +7,14 @@
|
|
|
7
7
|
<div class="col-12">
|
|
8
8
|
<div class="docs-body">
|
|
9
9
|
|
|
10
|
-
<p>Contacts, Notes, Todo, Analytics and SEO are part of the CMS.
|
|
11
|
-
|
|
10
|
+
<p>Contacts, Notes, Todo, Calculator, Analytics and SEO are part of the CMS. In the sidebar's Tools folder
|
|
11
|
+
they start in groups by what they are for, alongside the Marketplace Tools:
|
|
12
|
+
<strong>Productivity</strong> (Notes, Todo, Calculator, Calendar), <strong>Communication</strong>
|
|
13
|
+
(Contacts, email, Messages), <strong>Marketing</strong> (Analytics, SEO, Feedback),
|
|
14
|
+
<strong>Publishing</strong>, <strong>Business</strong> and <strong>Maintenance</strong>, so
|
|
15
|
+
Notes is at <strong>Tools > Productivity > Notes</strong>. Anything you have already
|
|
16
|
+
arranged stays where you put it - a site set up earlier may still have them in a
|
|
17
|
+
<strong>Core</strong> group. They are on unless you switch them off at the top of the Marketplace (<strong>System >
|
|
12
18
|
Plugins</strong>). Switching a Tool off hides it and stops its screens and API; nothing is
|
|
13
19
|
deleted. Who may use each is a permission under <strong>System > Roles</strong> (Tools
|
|
14
20
|
group): the level-0 role and Admin have them all to begin with (Admin is given them once -
|
|
@@ -83,7 +89,10 @@
|
|
|
83
89
|
<p>How the site looks to search engines: an audit of every page with a score, each page's search
|
|
84
90
|
result and share card as they will look, titles and descriptions used twice, redirects (added
|
|
85
91
|
for you when a page is renamed), the sitemap and robots.txt, and who runs the site. SEO Pro
|
|
86
|
-
adds
|
|
92
|
+
(Marketplace) adds Google Search Console in the admin - searches, clicks and positions, and
|
|
93
|
+
your sitemap sent to Google by hand or once a day after pages change - verification codes,
|
|
94
|
+
IndexNow, page speed, rich results, sitemap rules, a not-found log, a link monitor and SEO
|
|
95
|
+
history. Its own guide is under <a href="#/docs/plugins">Plugin guides</a>.</p>
|
|
87
96
|
|
|
88
97
|
<h3>Notifications</h3>
|
|
89
98
|
<p>The bell in the admin, and <strong>System > Notifications</strong>. Opening the screen marks
|
|
@@ -97,14 +106,23 @@
|
|
|
97
106
|
open never appears, nor do drafts, <code>noindex</code> pages or pages in a disabled
|
|
98
107
|
project.</p>
|
|
99
108
|
|
|
109
|
+
<h3>Support</h3>
|
|
110
|
+
<p>Every site has <strong>Support</strong> in the sidebar: Domma's email, phone and hours always
|
|
111
|
+
to hand, and <strong>Ask for help</strong> to start a conversation with the Domma team -
|
|
112
|
+
normal or urgent. Replies appear in the admin, with a count on the sidebar badge, and by
|
|
113
|
+
email. Right-click a request (or use its ⋮ button, or Shift+F10) to mark it read or resolved,
|
|
114
|
+
archive it or remove it from the list. On a site Domma does not host, Support shows the
|
|
115
|
+
contact card and an email link only.</p>
|
|
116
|
+
|
|
100
117
|
<h3>Plugins</h3>
|
|
101
|
-
<p>Tools from the Marketplace (Calendar, Blog, Feedback, Mail Reader and others)
|
|
102
|
-
the Tools folder when switched on
|
|
103
|
-
its own. See <a href="#/docs/plugins">Plugin guides</a> for each one you have
|
|
118
|
+
<p>Tools from the Marketplace (Calendar, Booking, Blog, Feedback, Mail Reader and others) join
|
|
119
|
+
the same groups in the Tools folder when switched on; one the CMS does not know sits
|
|
120
|
+
directly in Tools unless the plugin names a group of its own. See <a href="#/docs/plugins">Plugin guides</a> for each one you have
|
|
104
121
|
installed, and <a href="#/docs/usage/plugins">Plugins</a> for installing and switching.</p>
|
|
105
122
|
|
|
106
123
|
|
|
107
|
-
<
|
|
124
|
+
<h3>Calculator</h3>
|
|
125
|
+
<p>Choose Floating to keep Calculator alongside your work, or Standard to open its own page. Both offer Basic and Scientific layouts. Use the settings cog in the card header to choose the layout, accent colour, angle units and floating position, or drag the floating card header. MC clears memory, MR recalls it, MS stores the current value, and M+/M− add or subtract from memory. The display previews valid calculations as you type. Scientific functions support degrees or radians. Preferences are remembered in this browser.</p>
|
|
108
126
|
|
|
109
127
|
</div>
|
|
110
128
|
</div>
|
package/package.json
CHANGED
|
@@ -206,7 +206,7 @@ export function createPool(config) {
|
|
|
206
206
|
} catch {
|
|
207
207
|
// Already down - nothing to close.
|
|
208
208
|
}
|
|
209
|
-
return {ok: false, error: describeError(err)};
|
|
209
|
+
return {ok: false, error: describeError(err, connection)};
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
|
|
@@ -261,19 +261,52 @@ export function createPool(config) {
|
|
|
261
261
|
}
|
|
262
262
|
|
|
263
263
|
/**
|
|
264
|
-
* Turn an IMAP/network error into something worth showing a user.
|
|
264
|
+
* Turn an IMAP/SMTP/network error into something worth showing a user.
|
|
265
265
|
*
|
|
266
266
|
* ImapFlow's own messages are decent but its auth failures surface as raw
|
|
267
|
-
* server responses, which vary by server and read like a stack trace.
|
|
267
|
+
* server responses, which vary by server and read like a stack trace. TLS
|
|
268
|
+
* failures are worse: OpenSSL's text ("…:tls_validate_record_header:wrong
|
|
269
|
+
* version number:…") names nothing the user can change. nodemailer also wraps
|
|
270
|
+
* every socket error as `ESOCKET`, dropping the TLS code, so those are
|
|
271
|
+
* recognised by `reason`/message as well as by code.
|
|
268
272
|
*
|
|
269
|
-
* @param {Error & {code?: string, authenticationFailed?: boolean}} err
|
|
273
|
+
* @param {Error & {code?: string, reason?: string, authenticationFailed?: boolean}} err
|
|
274
|
+
* @param {{host?: string, port?: number, secure?: boolean}} [connection] - what was tried, so the message can name it
|
|
270
275
|
* @returns {string}
|
|
271
276
|
*/
|
|
272
|
-
export function describeError(err) {
|
|
277
|
+
export function describeError(err, connection = {}) {
|
|
273
278
|
if (!err) return 'Unknown error.';
|
|
274
|
-
if (err.authenticationFailed) return 'The mail server rejected that username and password.';
|
|
279
|
+
if (err.authenticationFailed || err.code === 'EAUTH') return 'The mail server rejected that username and password.';
|
|
275
280
|
|
|
276
|
-
|
|
281
|
+
const host = connection.host || 'The mail server';
|
|
282
|
+
const port = connection.port ? `Port ${connection.port}` : 'That port';
|
|
283
|
+
const text = `${err.reason || ''} ${err.message || ''}`;
|
|
284
|
+
|
|
285
|
+
// Implicit TLS against a port that starts in plain text (587, 143, 25):
|
|
286
|
+
// the "server hello" is a greeting line, which OpenSSL reads as a bad version.
|
|
287
|
+
if (err.code === 'ERR_SSL_WRONG_VERSION_NUMBER' || /wrong version number/i.test(text)) {
|
|
288
|
+
return connection.secure
|
|
289
|
+
? `${port} does not start with TLS, so Implicit TLS must be off for it - ports 587 and 143 switch to TLS with STARTTLS. Untick Implicit TLS, or use the implicit-TLS port (465 to send, 993 to read).`
|
|
290
|
+
: `${port} answered in a different TLS mode from the one chosen. Check the port and the Implicit TLS setting.`;
|
|
291
|
+
}
|
|
292
|
+
if (['DEPTH_ZERO_SELF_SIGNED_CERT', 'SELF_SIGNED_CERT_IN_CHAIN'].includes(err.code) || /self[- ]signed certificate/i.test(text)) {
|
|
293
|
+
return `${host === 'The mail server' ? 'The mail server’s' : `${host}’s`} TLS certificate is self-signed, so the server cannot prove who it is. `
|
|
294
|
+
+ `Install a trusted certificate (Let’s Encrypt, for example) that covers this hostname on the mail server. `
|
|
295
|
+
+ `For a server you control, the plugin’s allowInsecureTLS setting accepts it instead.`;
|
|
296
|
+
}
|
|
297
|
+
if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID' || /altnames|does not match certificate/i.test(text)) {
|
|
298
|
+
return `The mail server’s TLS certificate does not cover ${connection.host || 'that hostname'}. Use the hostname the certificate was issued for, or reissue it to include this one.`;
|
|
299
|
+
}
|
|
300
|
+
if (err.code === 'CERT_HAS_EXPIRED' || /certificate has expired/i.test(text)) {
|
|
301
|
+
return 'The mail server’s TLS certificate has expired. It needs renewing on the server.';
|
|
302
|
+
}
|
|
303
|
+
if (['UNABLE_TO_VERIFY_LEAF_SIGNATURE', 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY'].includes(err.code) || /unable to (verify the first certificate|get local issuer)/i.test(text)) {
|
|
304
|
+
return 'The mail server’s TLS certificate could not be verified - it is missing its intermediate certificate, or was issued by an authority this server does not trust.';
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// nodemailer reports these as ESOCKET/EDNS; the system code survives only in the message.
|
|
308
|
+
const netCode = text.match(/\b(ENOTFOUND|EAI_AGAIN|ECONNREFUSED|ETIMEDOUT|ECONNRESET)\b/)?.[1] ?? err.code;
|
|
309
|
+
switch (netCode) {
|
|
277
310
|
case 'ENOTFOUND':
|
|
278
311
|
case 'EAI_AGAIN':
|
|
279
312
|
return 'That mail server hostname could not be resolved.';
|
|
@@ -282,11 +315,6 @@ export function describeError(err) {
|
|
|
282
315
|
case 'ETIMEDOUT':
|
|
283
316
|
case 'ECONNRESET':
|
|
284
317
|
return 'The mail server did not respond in time.';
|
|
285
|
-
case 'CERT_HAS_EXPIRED':
|
|
286
|
-
case 'DEPTH_ZERO_SELF_SIGNED_CERT':
|
|
287
|
-
case 'SELF_SIGNED_CERT_IN_CHAIN':
|
|
288
|
-
case 'ERR_TLS_CERT_ALTNAME_INVALID':
|
|
289
|
-
return 'The mail server’s TLS certificate could not be verified.';
|
|
290
318
|
default:
|
|
291
319
|
return err.message || 'The mail server connection failed.';
|
|
292
320
|
}
|
|
@@ -13,6 +13,7 @@ import {createRequire} from 'node:module';
|
|
|
13
13
|
import nodemailer from 'nodemailer';
|
|
14
14
|
|
|
15
15
|
import {bareAddress, formatFrom} from '../admin/mail/identity.js';
|
|
16
|
+
import {describeError} from './imapPool.js';
|
|
16
17
|
import {normalisePriority, priorityHeaders} from './priority.js';
|
|
17
18
|
|
|
18
19
|
// MailComposer is not on nodemailer's public export, but it is the piece that
|
|
@@ -389,7 +390,7 @@ export async function verifySmtp(transportConfig, allowInsecureTLS = false) {
|
|
|
389
390
|
await transport.verify();
|
|
390
391
|
return {ok: true};
|
|
391
392
|
} catch (err) {
|
|
392
|
-
return {ok: false, error: err
|
|
393
|
+
return {ok: false, error: describeError(err, transportConfig)};
|
|
393
394
|
} finally {
|
|
394
395
|
transport.close();
|
|
395
396
|
}
|