domma-cms 1.29.0 → 1.29.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.29.1] - 2026-11-02
4
+
5
+ - Forms: the `form:submitted` hook now also carries the visitor's IP address (`ip`) and their cookies (`cookies`, parsed, without the `dm_session` sign-in cookie), so a Tool acting for the visitor can honour their cookie choice. Social Media Pro 0.4.0 uses it to send LinkedIn conversions only for visitors who accepted marketing cookies.
6
+
3
7
  ## [1.29.0] - 2026-11-02
4
8
 
5
9
  - Mail: the shared mail library (`plugins/_lib/mail`, `plugins/_lib/admin/mail`) is now the Domma Mail core 0.18.0 build, with a hash lock (`plugins/_lib/domma-mail.lock.json`); shared code is authored in domma-mail and copied here by its `sync:cms`. It brings folder actions (create, rename, move and empty folders, drag mail and folders), snoozed mail, server-side filtering (Sieve) alongside rules, rule groups, and a single host policy for mail connections (`networkPolicy.js`; `hostGuard.js` `pinMailHost` still wins where it is defined). The CMS keeps its own host adapters (`accounts.js`, `send.js`, `imapPool.js`, `readRoutes.js`, `sync.js`, `scheduler.js`, `vacationRunner.js`), now thin over the shared runtimes; compose options (receipts, signing, encryption, replies filed beside the message, secure delivery only) are kept. Mail Reader, Email Pro 0.12 and the Email Pro builds from Domma Mail all run on it. Previously these files only reached a site by hand, so an engine update removed them.
@@ -59,7 +59,7 @@ Code was treated as the truth. Where docs disagree with it, the disagreement is
59
59
  | `sheets` | paid | 0.4.1 | A spreadsheet in your admin: workbooks with formulas, sorting and filters; import CSV, JSON or Excel, export CSV or Excel, print. Feed a sheet live from Contacts, collections, forms, Surveys, Campaigns, Analytics or the Shop - rows kept even if the source goes away. |
60
60
  | `shopping-cart` | free | 1.6.1 | Sell from your site: products with options, stock and pictures, a storefront and a cart that follows shoppers from page to page, and checkout with Stripe, PayPal or payment offline. Orders to fulfil in the sidebar, refunds from the order. |
61
61
  | `shopping-cart-pro` | paid | 0.2.2 | More for the Shop: discount codes, shipping zones with rates by weight or order value, tax by country and class, branded order emails from confirmation to dispatch, and Insights - takings by week, best sellers, repeat customers and abandoned checkouts you can nudge. Adds to the free Shopping Cart; a lapsed licence leaves the Cart and every order just as they were. |
62
- | `social-media-pro` | paid | 0.2.5 | How the site looks when it is shared, and posting it: share cards per page for Facebook, X, LinkedIn, WhatsApp and Slack with previews; a share image drawn for every page that has none, in the site's colours; share and follow buttons; posting to Bluesky, Mastodon and LinkedIn (through the site's own LinkedIn app, with a reminder before its 60-day sign-in runs out) - now, scheduled, or drafted automatically for every new blog post or page - with links tagged for Analytics and the posts on the Calendar. Sold with SEO Pro. |
62
+ | `social-media-pro` | paid | 0.4.0 | How the site looks when it is shared, and posting it: share cards per page for Facebook, X, LinkedIn, WhatsApp and Slack with previews; a share image drawn for every page that has none, in the site's colours; share and follow buttons; posting to Bluesky, Mastodon and LinkedIn (through the site's own LinkedIn app, with a reminder before its 60-day sign-in runs out) - now, scheduled, or drafted automatically for every new blog post or page - with links tagged for Analytics and the posts on the Calendar; and LinkedIn conversions - chosen forms reported to LinkedIn's Conversions API when a visitor who accepted marketing cookies sends one. Sold with SEO Pro. |
63
63
  | `surveys` | paid | 1.5.1 | Targeted surveys over the Forms engine: shared audiences, tokenised invites, reminders, and per-survey statistics. |
64
64
  | `theme-roller` | paid | 1.1.3 | Make your own themes: start from any built-in theme, change its colours, fonts, spacing and borders with a live preview, and save it. Saved themes join the built-in ones everywhere a theme is chosen - the site, the admin, day and night, a region of a page. Needs Domma CMS 0.73 or later to use them. |
65
65
  | `waypoint-pro` | paid | 1.3.1 | Plan and track work: projects with their own workflows, issues on a board or in a list, a backlog planned into sprints with a burndown, and comments, mentions and watchers that tell the right people. |
@@ -992,7 +992,7 @@ Where: `server/services/presetCollections.js` (`PRESETS`, `seedAll()`), `server/
992
992
  Where: **Data > API Builder** (`#/api-endpoints`); `/api/api-endpoints`; `server/services/apiEndpoints.js`, `server/routes/api/endpoints-public.js`; permission family `api-endpoints.*`. Since: 0.25.0; 0.33.x (query filters, paging); 0.77.0 (editor Tool).
993
993
  - **In-admin API reference**. **Documentation > API Reference** has pages for Authentication, Pages, Settings, Layouts, Navigation, Media, Users, Plugins, Collections, Views and Actions, and points to API Tokens, API Builder and the Content API for the external surface. The full reference is `docs/api-reference.md`.
994
994
  Where: `#/docs/api/<area>`; `admin/js/templates/docs/api-*.html`.
995
- - **Hooks for developers**. `collection:entryCreated`, `collection:entryUpdated`, `collection:entryDeleted` and `form:submitted` are emitted for plugins to listen to.
995
+ - **Hooks for developers**. `collection:entryCreated`, `collection:entryUpdated`, `collection:entryDeleted` and `form:submitted` are emitted for plugins to listen to. `form:submitted` carries `{slug, entryId, data, formTitle, ended, ip, cookies}` - the visitor's IP and cookies (without the `dm_session` sign-in cookie) since 1.29.1, so a Tool acting for the visitor can honour their cookie choice (Social Media Pro's LinkedIn conversions).
996
996
 
997
997
  ---
998
998
 
@@ -2341,12 +2341,12 @@ An add-on for the free Shopping Cart that adds what a growing shop needs: discou
2341
2341
 
2342
2342
  ### Social Media Pro (`social-media-pro`)
2343
2343
 
2344
- Tier: paid (closed source) · Version: 0.2.3 · Requires: nothing declared (share cards need the core `seo:meta` transform, core 0.89+/0.90+) · Uses: `seo` ("Share cards start from each page's SEO title, description and image"), `calendar` (scheduled and sent posts on the Calendar), `blog` and `blog-pro` (a post drafted for each new blog post) · No MongoDB
2344
+ Tier: paid (closed source) · Version: 0.4.0 · Requires: nothing declared (share cards need the core `seo:meta` transform, core 0.89+/0.90+; LinkedIn conversions need core 1.29.1+, whose `form:submitted` carries the visitor's cookies) · Uses: `seo` ("Share cards start from each page's SEO title, description and image"), `calendar` (scheduled and sent posts on the Calendar), `blog` and `blog-pro` (a post drafted for each new blog post) · No MongoDB
2345
2345
 
2346
2346
  Control how every page looks when it is shared, and post it. Social Media Pro edits share cards for Facebook, X, LinkedIn, WhatsApp and Slack with previews, draws a share image in the site's colours for any page without one, adds share and follow buttons, and posts to Bluesky, Mastodon and LinkedIn - straight away, scheduled, or drafted automatically for each new blog post or page - with links tagged for analytics and posts shown on the calendar. Sold together with SEO Pro.
2347
2347
 
2348
2348
  **Features**
2349
- - Tabs: Cards, Posts, Accounts (`#/plugins/social`, `/posts`, `/accounts`), settings slideover.
2349
+ - Tabs: Cards, Posts, Accounts, Conversions (`#/plugins/social`, `/posts`, `/accounts`, `/conversions`), settings slideover.
2350
2350
  - Cards: every page listed (All / Changed here); per page Open Graph (Facebook, LinkedIn, WhatsApp, Slack) and X card fields, empty falling back to the page's SEO values; live platform previews; links to Facebook and LinkedIn debuggers to refresh their cache. Saving clears that page's cache.
2351
2351
  - Drawn share images: 1200x630 PNG for pages without an image, three designs (bold, minimal, split), colours, font, logo (from SEO organisation settings or site brand) and URL toggles, live preview; served publicly at `/api/plugins/social-media-pro/og.png?p=<path>` only for real pages; cached.
2352
2352
  - Shortcodes:
@@ -2359,10 +2359,13 @@ Control how every page looks when it is shared, and post it. Social Media Pro ed
2359
2359
  - Auto-posting: every 5 minutes new sitemap URLs from chosen sources (blog, blog-pro, pages) become a draft or scheduled post per network after a delay (10 min); template default `{title}\n\n{description}\n\n{url}` (must contain `{url}`).
2360
2360
  - UTM tagging (`utm_source=<network>`, `utm_medium=social`, campaign `social`) so posts show in Analytics.
2361
2361
  - Calendar source `social-posts` ("Social posts") shows scheduled and sent posts on the Calendar.
2362
- - Notifications: `social-media-pro:failed` (warning), `social-media-pro:drafted` (off by default), `social-media-pro:linkedin-expiry` (0.2.0).
2362
+ - LinkedIn conversions (0.4.0): chosen forms reported server-to-server to LinkedIn's **Conversions API** (not the Insight Tag - that is SEO Pro's, for page visits). A Direct API access token from Campaign Manager (Data > Signals Manager > Direct API; no developer app, never expires), the ad account (listed from the token, or typed), and rows of form (or "Every form") -> Conversions API rule, with an optional value and currency; rules can be made from the tab (`autoAssociationType=OBJECTIVE_BASED` attaches suitable campaigns).
2363
+ - Only visitors who accept marketing cookies: while on, the cookie banner is forced on with its Marketing category and `consentVersion` gains `+capi` (everyone re-asked); `public/capture.js` records the answer as the `smp_mkt` cookie and keeps an ad's `li_fat_id` click ID 30 days; withdrawal removes both.
2364
+ - Matched by hashed email (SHA-256), hashed first/last name, the click ID and - only if switched on - the IPv4 address. Events queue and go in batches within seconds; a refused token keeps them waiting (notice `social-media-pro:conversions`) until a new one is pasted; LinkedIn's 90-day limit drops older ones. "Recent" logs sent / skipped (why) / failed (LinkedIn's reason) with no email or hash.
2365
+ - Notifications: `social-media-pro:failed` (warning), `social-media-pro:drafted` (off by default), `social-media-pro:linkedin-expiry` (0.2.0), `social-media-pro:conversions` (0.4.0).
2363
2366
  - Sidebar badge: failed posts and drafts waiting (red when any failed).
2364
2367
  - Permission `social` with `read` (View) and `manage` (Manage), granted to `admin`.
2365
- - Injects `public/share.css` in the head and `public/share.js` at body end on every public page.
2368
+ - Injects `public/share.css` in the head and `public/share.js` at body end on every public page; `public/capture.js` only while LinkedIn conversions are on.
2366
2369
 
2367
2370
  **Where:** Admin sidebar "Social" (`#/plugins/social`).
2368
2371
 
@@ -2802,6 +2805,7 @@ Later changes to these features are in the CHANGELOG (for example 0.92.1: row-le
2802
2805
  - Adding `[share]` and `[follow]` to a blog template.
2803
2806
  - Posting to LinkedIn (0.2.0): creating your own LinkedIn app, the two products to add, pasting the redirect URI, connecting, and posting as yourself or a company page.
2804
2807
  - Keeping LinkedIn connected: the 60-day sign-in, the expiry warning and reconnecting in one click.
2808
+ - Counting enquiries from LinkedIn ads (0.4.0): the Direct API token, a conversion rule, choosing the forms, the marketing-cookie banner, and reading Recent.
2805
2809
 
2806
2810
  ### Campaigns Pro (`campaigns-pro`)
2807
2811
 
@@ -409,7 +409,7 @@ options.hooks.on('content:pageCreated', ({ page, urlPath }) => {
409
409
 
410
410
  | Event | Payload | Fired when |
411
411
  |------------------|--------------------------------------|------------------------------------------------------------------------------------------------------------------|
412
- | `form:submitted` | `{ slug, entryId, data, formTitle }` | A public form submission passes validation and is stored. `entryId` is `null` if collection storage is disabled. |
412
+ | `form:submitted` | `{ slug, entryId, data, formTitle, ended, ip, cookies }` | A public form submission passes validation and is stored. `entryId` is `null` if collection storage is disabled. `ip` and `cookies` (parsed, without the `dm_session` sign-in cookie) are the visitor's, since 1.29.1. |
413
413
 
414
414
  In `data`, a file field is `{url, name, size, mime}`, a list of them when the field is `multiple`, or `''`;
415
415
  `fileRefs(value)` from `public/js/form-files.mjs` reads any of the three as a list.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "domma-cms",
3
- "version": "1.29.0",
3
+ "version": "1.29.1",
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",
@@ -47,6 +47,7 @@ import {
47
47
  import {getConfig} from '../../config.js';
48
48
  import {authenticate, requireAdmin, requirePermission} from '../../middleware/auth.js';
49
49
  import {hooks} from '../../services/hooks.js';
50
+ import {parseCookies, SESSION_COOKIE} from '../../services/viewerSession.js';
50
51
  import {pluginDenialFor} from '../../services/collectionAccess.js';
51
52
  import {deleteMedia, saveMedia} from '../../services/content.js';
52
53
  import {formMayCollect, servedType} from '../../services/mediaTypes.js';
@@ -1198,7 +1199,13 @@ export async function formsRoutes(fastify) {
1198
1199
 
1199
1200
  // An unrecorded end is not a submission anyone keeps, so nothing that
1200
1201
  // listens for submissions (plugins, the "Form submitted" notice) hears it.
1201
- if (record) hooks.emit('form:submitted', {slug, entryId: entry?.id || null, data, formTitle: form.title, ended: !!ended});
1202
+ // `ip` and `cookies` are the visitor's, for a listener acting for them (Social Media Pro's
1203
+ // LinkedIn conversions read the marketing-consent and click-ID cookies) - never the sign-in
1204
+ // session cookie.
1205
+ if (record) {
1206
+ const {[SESSION_COOKIE]: _session, ...cookies} = parseCookies(request.headers.cookie);
1207
+ hooks.emit('form:submitted', {slug, entryId: entry?.id || null, data, formTitle: form.title, ended: !!ended, ip: request.ip, cookies});
1208
+ }
1202
1209
 
1203
1210
  // Template interpolation for successRedirect. A trigger's redirect is
1204
1211
  // the more specific instruction, so it wins over the form's default.
@@ -26,7 +26,7 @@ export const SESSION_COOKIE = 'dm_session';
26
26
  * @param {string} [header]
27
27
  * @returns {Record<string, string>}
28
28
  */
29
- function parseCookies(header) {
29
+ export function parseCookies(header) {
30
30
  const out = {};
31
31
  if (!header) return out;
32
32
  for (const part of header.split(';')) {