domma-cms 1.46.1 → 1.47.0
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 +7 -0
- package/admin/js/lib/api-tokens-arrange.js +2 -2
- package/admin/js/lib/whatsapp-call.js +1 -0
- package/admin/js/templates/contacts.html +2 -0
- package/admin/js/views/api-tokens.js +9 -4
- package/admin/js/views/contacts.js +12 -11
- package/admin/js/views/form-editor.js +5 -5
- package/docs/api-reference.md +22 -0
- package/package.json +1 -1
- package/plugins/_lib/admin/mail/body-menu.js +1 -1
- package/plugins/_lib/admin/mail/cms-host.js +1 -1
- package/plugins/_lib/admin/mail/compose-window.js +1 -1
- package/plugins/_lib/admin/mail/contacts.js +1 -1
- package/plugins/_lib/admin/mail/diagnostics-section.js +1 -1
- package/plugins/_lib/admin/mail/drag-drop.js +1 -1
- package/plugins/_lib/admin/mail/folder-tree.js +1 -1
- package/plugins/_lib/admin/mail/font-controls.js +1 -1
- package/plugins/_lib/admin/mail/fonts.js +1 -1
- package/plugins/_lib/admin/mail/host-context.js +1 -1
- package/plugins/_lib/admin/mail/identity.js +1 -1
- package/plugins/_lib/admin/mail/image-senders-section.js +1 -1
- package/plugins/_lib/admin/mail/keyboard.js +1 -1
- package/plugins/_lib/admin/mail/mail.html +1 -1
- package/plugins/_lib/admin/mail/message-actions.js +1 -1
- package/plugins/_lib/admin/mail/oauth-panel.js +1 -1
- package/plugins/_lib/admin/mail/panes.js +1 -1
- package/plugins/_lib/admin/mail/reader-kit.js +1 -1
- package/plugins/_lib/admin/mail/reader-runtime.js +7 -6
- package/plugins/_lib/admin/mail/reader-view.js +1 -1
- package/plugins/_lib/admin/mail/resizable.js +1 -1
- package/plugins/_lib/admin/mail/restore-spam.js +1 -1
- package/plugins/_lib/admin/mail/rules.js +1 -1
- package/plugins/_lib/admin/mail/scheduling.js +1 -1
- package/plugins/_lib/admin/mail/section-kit.js +1 -1
- package/plugins/_lib/admin/mail/security-note.js +1 -1
- package/plugins/_lib/admin/mail/settings-section.js +1 -1
- package/plugins/_lib/admin/mail/templates.js +1 -1
- package/plugins/_lib/admin/mail/threads.js +1 -1
- package/plugins/_lib/admin/mail/vacation.js +1 -1
- package/plugins/_lib/admin/mail/when-closed.js +1 -1
- package/plugins/_lib/admin/ui/dates.js +1 -1
- package/plugins/_lib/admin/ui/resizable.js +1 -1
- package/plugins/_lib/domma-mail.lock.json +80 -80
- package/plugins/_lib/mail/accountFileStore.js +1 -1
- package/plugins/_lib/mail/accountRepository.js +1 -1
- package/plugins/_lib/mail/accountRoutes.js +1 -1
- package/plugins/_lib/mail/bodyTokenProvider.js +1 -1
- package/plugins/_lib/mail/bodyTokens.js +1 -1
- package/plugins/_lib/mail/compose.js +1 -1
- package/plugins/_lib/mail/defaults.js +1 -1
- package/plugins/_lib/mail/envelope.js +1 -1
- package/plugins/_lib/mail/folderActions.js +1 -1
- package/plugins/_lib/mail/folderRuntime.js +1 -1
- package/plugins/_lib/mail/folders.js +1 -1
- package/plugins/_lib/mail/imapPoolRuntime.js +1 -1
- package/plugins/_lib/mail/mbox.js +1 -1
- package/plugins/_lib/mail/message-action.js +1 -1
- package/plugins/_lib/mail/messageSecurity.js +1 -1
- package/plugins/_lib/mail/messageSecurityProvider.js +1 -1
- package/plugins/_lib/mail/networkAddresses.js +1 -1
- package/plugins/_lib/mail/networkPolicy.js +1 -1
- package/plugins/_lib/mail/oauthAccounts.js +1 -1
- package/plugins/_lib/mail/oauthRouteRuntime.js +1 -1
- package/plugins/_lib/mail/oauthRuntime.js +1 -1
- package/plugins/_lib/mail/pollSchedule.js +1 -1
- package/plugins/_lib/mail/poller.js +1 -1
- package/plugins/_lib/mail/pollerRuntime.js +1 -1
- package/plugins/_lib/mail/priority.js +1 -1
- package/plugins/_lib/mail/publicMailbox.js +1 -1
- package/plugins/_lib/mail/readRuntime.js +1 -1
- package/plugins/_lib/mail/render.js +1 -1
- package/plugins/_lib/mail/ruleRunner.js +1 -1
- package/plugins/_lib/mail/schedulerRuntime.js +1 -1
- package/plugins/_lib/mail/secretProvider.js +1 -1
- package/plugins/_lib/mail/secretbox.js +1 -1
- package/plugins/_lib/mail/senderAuth.js +1 -1
- package/plugins/_lib/mail/sieve.js +1 -1
- package/plugins/_lib/mail/smtpService.js +1 -1
- package/plugins/_lib/mail/snoozeRuntime.js +1 -1
- package/plugins/_lib/mail/store.js +1 -1
- package/plugins/_lib/mail/subscriptions.js +1 -1
- package/plugins/_lib/mail/syncPlan.js +1 -1
- package/plugins/_lib/mail/syncRuntime.js +1 -1
- package/plugins/_lib/mail/syncSelection.js +1 -1
- package/plugins/_lib/mail/unreadBadge.js +1 -1
- package/plugins/_lib/mail/unsubscribe.js +1 -1
- package/plugins/_lib/mail/vacationRuntime.js +1 -1
- package/plugins/_lib/mail/write.js +1 -1
- package/plugins/blog/CHANGELOG.md +5 -0
- package/plugins/blog/plugin.js +3 -0
- package/plugins/blog/plugin.json +2 -2
- package/plugins/free-tier.lock.json +37 -16
- package/plugins/security/CHANGELOG.md +6 -0
- package/plugins/security/admin/lib/health.js +4 -1
- package/plugins/security/plugin.json +2 -2
- package/plugins/security/server/facts.js +2 -1
- package/plugins/security/tests/security.test.js +5 -0
- package/plugins/shopping-cart/CHANGELOG.md +7 -0
- package/plugins/shopping-cart/admin/views/orders.js +3 -4
- package/plugins/shopping-cart/lib/summary.js +1 -1
- package/plugins/shopping-cart/plugin.json +2 -2
- package/plugins/shopping-cart/public/lib/orders.js +16 -0
- package/plugins/shopping-cart/public/shop.css +1 -1
- package/plugins/shopping-cart/tests/pure.test.js +16 -0
- package/plugins/whatsapp-calling/CLAUDE.md +12 -0
- package/plugins/whatsapp-calling/admin/css/index.css +22 -0
- package/plugins/whatsapp-calling/admin/templates/index.html +56 -0
- package/plugins/whatsapp-calling/admin/views/connection-help.js +55 -0
- package/plugins/whatsapp-calling/admin/views/index.js +275 -0
- package/plugins/whatsapp-calling/config.js +7 -0
- package/plugins/whatsapp-calling/docs/guide.md +70 -0
- package/plugins/whatsapp-calling/lib/calls.js +156 -0
- package/plugins/whatsapp-calling/lib/meta.js +55 -0
- package/plugins/whatsapp-calling/lib/recipients.js +26 -0
- package/plugins/whatsapp-calling/plugin.js +123 -0
- package/plugins/whatsapp-calling/plugin.json +86 -0
- package/plugins/whatsapp-calling/tests/calling.test.js +254 -0
- package/server/routes/api/api-tokens.js +2 -2
- package/server/routes/api/collections.js +20 -2
- package/server/services/apiTokens.js +59 -4
- package/server/services/presetCollections.js +1 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.2, packages/core/src/mail/folders.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
import {resolveSubscriptions} from './subscriptions.js';
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.2, packages/core/src/mail/imapPoolRuntime.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* IMAP connection pool for the Mail Reader plugin.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.2, packages/core/src/mail/message-action.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/** Remember replies and forwards on the original message after delivery. */
|
|
4
4
|
export const SOURCE_HEADER = 'X-Domma-Message-Source';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.2, packages/core/src/mail/messageSecurity.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
import {createMessageSecurity} from './messageSecurityProvider.js';
|
|
4
4
|
export const {setMessageSecurity, canProtect, protectRaw, protectDraftRaw, unwrapRaw, parseReadable} = createMessageSecurity();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.2, packages/core/src/mail/messageSecurityProvider.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* Where signing and encryption plug into the mail core.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.2, packages/core/src/mail/networkAddresses.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/** Address classification from the CMS outbound policy, MIT licensed. */
|
|
4
4
|
import net from 'node:net';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.2, packages/core/src/mail/networkPolicy.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
import dns from 'node:dns/promises';
|
|
4
4
|
import net from 'node:net';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.2, packages/core/src/mail/oauthAccounts.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
import {randomUUID} from 'node:crypto';
|
|
4
4
|
import {MailKeyError} from './secretProvider.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.2, packages/core/src/mail/oauthRouteRuntime.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* The OAuth2 sign-in routes for mailboxes: Connect, the provider's callback,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.2, packages/core/src/mail/oauthRuntime.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* OAuth2 sign-in for mailboxes (XOAUTH2) - Microsoft 365 / Outlook.com and Gmail.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.2, packages/core/src/mail/pollSchedule.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* Deciding which mailboxes are due a poll.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.2, packages/core/src/mail/poller.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/** Compatibility entry point for the shared mail poller. */
|
|
4
4
|
export {createPoller} from './pollerRuntime.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.2, packages/core/src/mail/publicMailbox.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/** Standalone mailbox summary. Explicit fields keep credentials out of responses. */
|
|
4
4
|
export function publicMailbox(account) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.2, packages/core/src/mail/readRuntime.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
import {registerAccountRoutes} from './accountRoutes.js';
|
|
4
4
|
import {ENVELOPE_QUERY, hasAttachment, parseHeaderBlock} from './envelope.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.2, packages/core/src/mail/schedulerRuntime.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* The worker behind "send later", "undo send" and "snooze".
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.2, packages/core/src/mail/secretProvider.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
import {createCipheriv, createDecipheriv, createHash, randomBytes, scryptSync} from 'node:crypto';
|
|
4
4
|
import fs from 'node:fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.2, packages/core/src/mail/secretbox.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/** CMS compatibility entry point. Standalone hosts create their own secret box. */
|
|
4
4
|
import path from 'node:path';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.2, packages/core/src/mail/senderAuth.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* Did this message really come from the address in its From line?
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.2, packages/core/src/mail/sieve.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/** ManageSieve (RFC 5804). One bounded, TLS-verified session per operation. */
|
|
4
4
|
import net from 'node:net';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.2, packages/core/src/mail/smtpService.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* Sending, and keeping a copy where the rest of your clients will find it.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.2, packages/core/src/mail/snoozeRuntime.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
import {safeWritePool, moveMessage} from './write.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.2, packages/core/src/mail/subscriptions.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
export function resolveSubscriptions(boxes) {
|
|
4
4
|
const list = boxes ?? [];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.2, packages/core/src/mail/syncRuntime.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
import {missingUids, planFolderSync} from './syncPlan.js';
|
|
4
4
|
import {resolveSyncFolders} from './syncSelection.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.2, packages/core/src/mail/syncSelection.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* Which folders a mailbox keeps mirrored.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.2, packages/core/src/mail/unreadBadge.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* The free reader's sidebar badge - unread mail in each mailbox's INBOX.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.2, packages/core/src/mail/vacationRuntime.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
import {randomUUID} from 'node:crypto';
|
|
4
4
|
import {autoReplyHeaders, isActive, normaliseVacation, replySubject, shouldAutoReply, replyHistory} from '../admin/mail/vacation.js';
|
package/plugins/blog/plugin.js
CHANGED
|
@@ -511,6 +511,8 @@ export default async function blogPlugin(fastify, options) {
|
|
|
511
511
|
title: title.trim(),
|
|
512
512
|
slug: derivedSlug,
|
|
513
513
|
status: fields.status ?? 'draft',
|
|
514
|
+
// Born published: it has been published now (only /publish stamped a date, so these had none).
|
|
515
|
+
...(fields.status === 'published' && {publishedAt: new Date().toISOString()}),
|
|
514
516
|
authorId: uid
|
|
515
517
|
}, { createdBy: uid, source: 'admin' });
|
|
516
518
|
|
|
@@ -546,6 +548,7 @@ export default async function blogPlugin(fastify, options) {
|
|
|
546
548
|
if (taken) return reply.code(409).send({ error: `Another post already uses the slug "${fields.slug}" - choose a different one.` });
|
|
547
549
|
}
|
|
548
550
|
const merged = { ...entry.data, ...fields };
|
|
551
|
+
if (merged.status === 'published' && !merged.publishedAt) merged.publishedAt = new Date().toISOString();
|
|
549
552
|
// `seo` is merged too: the editor sends title and description only, and
|
|
550
553
|
// must not wipe what the SEO Tool set (image, noindex, focus keyword...).
|
|
551
554
|
if (merged.seo && typeof merged.seo === 'object' && entry.data.seo && typeof entry.data.seo === 'object') {
|
package/plugins/blog/plugin.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blog",
|
|
3
3
|
"displayName": "Blog",
|
|
4
|
-
"version": "1.10.
|
|
4
|
+
"version": "1.10.2",
|
|
5
5
|
"tier": "free",
|
|
6
6
|
"description": "Public-facing blog with posts, categories and comments - layouts and listings built from editable blocks.",
|
|
7
7
|
"author": "Domma CMS",
|
|
8
|
-
"date": "2026-
|
|
8
|
+
"date": "2026-11-08",
|
|
9
9
|
"icon": "file-text",
|
|
10
10
|
"admin": {
|
|
11
11
|
"css": [
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"note": "Written by `make sync-free-tier` in dcms-marketplace. Do not edit these plugins here - edit them there and sync.",
|
|
3
|
-
"source": "dcms-marketplace@
|
|
3
|
+
"source": "dcms-marketplace@32f9cef",
|
|
4
4
|
"plugins": {
|
|
5
5
|
"blog": {
|
|
6
|
-
"version": "1.10.
|
|
6
|
+
"version": "1.10.2",
|
|
7
7
|
"files": {
|
|
8
|
+
"CHANGELOG.md": "4760a7c18332f7d9fcbd34ddd339876eeecc0fd601518e4ce50e208a055d481e",
|
|
8
9
|
"CLAUDE.md": "357072eb15b3c2b04b25a18ed44b3d569e1bbdf927118d5b472a9b952c3778d0",
|
|
9
10
|
"admin/css/index.css": "8d6dfd2bfadf0bbe8efbd52ef9b397ca9d36ca699c80e260aec11f677c77a248",
|
|
10
11
|
"admin/lib/drafts.js": "60446f6bf93b790f07041fbb95dac30b12cd0ebc3caa71d15f2a7dc16c661b0d",
|
|
@@ -52,8 +53,8 @@
|
|
|
52
53
|
"lib/page.js": "02ef5b0e5aadfe5a8a5de4b7471518b24193b1dad2bda23bea06c6cc1e4743e7",
|
|
53
54
|
"lib/render.js": "0e97c6a950bc962c8d8ea4b2f21d06cb73fbcdc738d8942d6935d01309a29b1d",
|
|
54
55
|
"lib/samples.js": "e8cdb77ce22e43937707f6854d3a5cb722437dc584e22ac7b24480bef686cf85",
|
|
55
|
-
"plugin.js": "
|
|
56
|
-
"plugin.json": "
|
|
56
|
+
"plugin.js": "689bd734b0aa9c2b9a780a6c2274a91492a55471a2397376111c84a28e7c35df",
|
|
57
|
+
"plugin.json": "9aca17f3e5c6595721be73840dce5493c8e4bfdd59e344b319c426fc9e64fdd7",
|
|
57
58
|
"plugin.public.js": "0718b1610cebbdcca43012c9c4b67774c1baca2d4ccdcec4ddbd991458951cd8",
|
|
58
59
|
"public/blog.css": "fd733e6b624190da1e70dc1b6613e2376efd7f7570a28fab311d81006d03d960",
|
|
59
60
|
"public/blog.js": "d01c72a9834dcc7c5241923371f2b164ac30d20ac9f1a5c5dc5b71fa3cb09f08",
|
|
@@ -202,11 +203,12 @@
|
|
|
202
203
|
}
|
|
203
204
|
},
|
|
204
205
|
"security": {
|
|
205
|
-
"version": "1.2.
|
|
206
|
+
"version": "1.2.2",
|
|
206
207
|
"files": {
|
|
208
|
+
"CHANGELOG.md": "0919760c2ef79e52695f8332739d6bd75455d3e76c26df577294695b6edebb8e",
|
|
207
209
|
"CLAUDE.md": "1aabef04e77d9bd10ead195851a75c358b5c6657a57ad217495cf7b5b0d63538",
|
|
208
210
|
"admin/lib/blocks.js": "5ef346b7de751518f8beb9212e3b89b270ae236560ae3d8a1f40d129c50918ff",
|
|
209
|
-
"admin/lib/health.js": "
|
|
211
|
+
"admin/lib/health.js": "65b14b16cf11b1e25b6e81cd5aa9524edd4ba653780769866602c5d4d6d0a0c7",
|
|
210
212
|
"admin/lib/ip.js": "cf33be4fa2e2cad37bafd12ebec17f293891a88de402caad1bf9c9a57ce87680",
|
|
211
213
|
"admin/lib/lockout.js": "c5e5e4b2934296f81ae8ed013725485bc269a0ef3cf3bdf3c16c53936635a1ee",
|
|
212
214
|
"admin/lib/policy.js": "a4aedfd28f992e0e7759bbdac6344681eebe617c27849e91fa4405f6190f8462",
|
|
@@ -220,19 +222,20 @@
|
|
|
220
222
|
"config.js": "e6a00f7816637687d6a68ebbac65a71489246a926c28523c2a78d859e75b7ae0",
|
|
221
223
|
"docs/guide.md": "a27d5303f9146057fd79c2093d7476ada1a5ee4fd14d34df7f94ad8555d88ca0",
|
|
222
224
|
"plugin.js": "9d3a2e8b56dd637407c8abd93252dda9f67042231bc79d35771f766a62022c14",
|
|
223
|
-
"plugin.json": "
|
|
225
|
+
"plugin.json": "e50328d9df3b25608515ea9372d62cdfbc899276511af60cf2de30369e15bd03",
|
|
224
226
|
"server/common-passwords.NOTICE": "3b148a49a569bfa24feaa7879db602da8f0607fa61ab6c52b7a62391fc7c009a",
|
|
225
227
|
"server/common-passwords.txt": "68782d6a4a19a4768d5f15dd66bd534e7a33055cc755411e33f16d18c50fdcce",
|
|
226
|
-
"server/facts.js": "
|
|
228
|
+
"server/facts.js": "410f0cb5b61a13801bfbbd1f6a098af598df8ddc5a149b38416d84adf1d33eab",
|
|
227
229
|
"server/state.js": "1319b322e94a4aec176948990b2d674b28dfece761eef4d5685df474037bfc4a",
|
|
228
230
|
"tests/facts.test.js": "dc59d307033c7a9887b4d522bccd9e9d4986b6ed5cb4ffe1287282a93f54cb11",
|
|
229
231
|
"tests/screen-state.test.js": "5349273cf7cfe526a05f929115a6e4e66287e6fb05b252ea859e182e88e3925e",
|
|
230
|
-
"tests/security.test.js": "
|
|
232
|
+
"tests/security.test.js": "4429ff085475894766b5a5123880579f737eb5b7e5518b856784b852f3065070"
|
|
231
233
|
}
|
|
232
234
|
},
|
|
233
235
|
"shopping-cart": {
|
|
234
|
-
"version": "1.7.
|
|
236
|
+
"version": "1.7.3",
|
|
235
237
|
"files": {
|
|
238
|
+
"CHANGELOG.md": "9eb6067eff204d178cb58f4acb22191fce03ec84440fddf0515fa595a00fe19e",
|
|
236
239
|
"CLAUDE.md": "8c6678338cbfaddff1a0d2a70dcc8f59518b4a6a3d2d10ca4e190b9d892f857a",
|
|
237
240
|
"admin/css/index.css": "cdd7790511deef162ad30e299b4512d289583e978ba3b87d65945cdf1da3cdda",
|
|
238
241
|
"admin/lib/chart.js": "b01ce5cfac773c8df8efccab50b67d3dfa99fbead0037d817553db4a6688d4d6",
|
|
@@ -240,7 +243,7 @@
|
|
|
240
243
|
"admin/lib/email.js": "9f842932c8de39ac6878463bd49c443df82ecf64872dad48ff5362d6b61c1e2c",
|
|
241
244
|
"admin/lib/kit.js": "94e5b5d979ded3318df2d0291bc9aeeb44af945aa0e84e68f9af10f5a53ae458",
|
|
242
245
|
"admin/templates/shop.html": "c5bb03f1f7cbabfbd8202f3533783eb1848103755b1ba25fdcf1fd8e9478cb8e",
|
|
243
|
-
"admin/views/orders.js": "
|
|
246
|
+
"admin/views/orders.js": "11a4f9d1db5b6c849b136d97b97e44821bcac21b617281dda58809b442c8645e",
|
|
244
247
|
"admin/views/overview.js": "02241e75976cfa759d6ba738dd13ca0bd2bcb760d66a5f184becc2e472807efc",
|
|
245
248
|
"admin/views/products.js": "b35893d85b92db0048459431258f2a235b1f0824b3601bebc5e5d94fdcc0d10f",
|
|
246
249
|
"admin/views/sales.js": "001c08963e26df72f43d2357bbcc5a0f54f74f9d22bca319c23a28a50f40c124",
|
|
@@ -261,14 +264,14 @@
|
|
|
261
264
|
"lib/sales.js": "bc6c39d70c2ce83f4109474071e6b048dc6554c4b11ac03dbeccbdfdb5881368",
|
|
262
265
|
"lib/samples.js": "912b3d5bd543dffa5f870caf3c2b873f642fd55e3ebf3f97e1b31eeaaac77d3b",
|
|
263
266
|
"lib/shop.js": "baa5dfc4e410210e8ba13678997ee5752eb2ebe72fc4d3e449465d29b60b458d",
|
|
264
|
-
"lib/summary.js": "
|
|
267
|
+
"lib/summary.js": "ff947ccf0f63cc3095946612460f3ea7ff742803395802179b3ccd66fe961dfa",
|
|
265
268
|
"plugin.js": "650025fefd7426ffc8334807c3e88c6496067350479e2551efcf61d53c74b630",
|
|
266
|
-
"plugin.json": "
|
|
269
|
+
"plugin.json": "d057fe23713c879e1f4172261244b2d2311e89754685a73de5ab9870643af3ec",
|
|
267
270
|
"plugin.public.js": "d4304e85895f7e8e2397e64cc7a8e118e94b65c2f271369f880d92e7d32f83f8",
|
|
268
271
|
"public/account.js": "5f644016c098c7879c59948d662f5997cb61680996204ecb7897baab8945d434",
|
|
269
272
|
"public/cart.js": "7338141392ec653ff616eb75688d2a2ad08cff8427d7020d381f540be0037b73",
|
|
270
273
|
"public/lib/money.js": "d22b2b6f80dde6f7887b69e24188c05ea93c02217aba639b5331aa3bd616f4fc",
|
|
271
|
-
"public/lib/orders.js": "
|
|
274
|
+
"public/lib/orders.js": "e18d054bf385e9c15544628c81ad7746179eea74c33dbcce42dd2525f3fa210e",
|
|
272
275
|
"public/lib/products.js": "65a033b4b03c1b6d9cd7035e6be4c3fe47c7ad309dc14c4d417b6ac0fc10e2f4",
|
|
273
276
|
"public/lib/session.js": "4f71e98818a52cf2321c8dc57e33e5591deb04ebb2c0bea19dd6758827719a08",
|
|
274
277
|
"public/samples/candle-2.svg": "aca5691b9168467caf6feb7622ab154ee92504be8b887ac6c818db22476e7bed",
|
|
@@ -283,7 +286,7 @@
|
|
|
283
286
|
"public/samples/tee.svg": "287a82d7fc00acb1543b3209927ae20dcbe3d4b2a2b3de03574ab0c463385f3c",
|
|
284
287
|
"public/samples/tote-2.svg": "9c7f41cc57866e71973e413a6c87f46be48f7488d3490ceea58e24559c334813",
|
|
285
288
|
"public/samples/tote.svg": "01de817a32c8d3d8ea47ff491049f439ca3e4d4fce943dbdc62a4187139e016c",
|
|
286
|
-
"public/shop.css": "
|
|
289
|
+
"public/shop.css": "173ad430069f64581aaf3520b8f4273ec87e30e81cb4db454987226fdd097ded",
|
|
287
290
|
"roles/shop-customer.json": "3f3366c536c9fbf2b2ce146bb3090b008d5fbfe22752e764eb8e5a1de9cd611c",
|
|
288
291
|
"templates/shop.html": "4649e57d23458833a157799dc80141824eb0f658d96734bd1859c68e0ba9a8b9",
|
|
289
292
|
"tests/accounts.test.js": "79b0e91e4310d076960b2a768ada02185b6cf05cab83052ee825b13978e0a9dc",
|
|
@@ -291,7 +294,7 @@
|
|
|
291
294
|
"tests/commission.test.js": "fbc4cf83e0ed6446a09e57e4ff37a9608c81947c633c78ac6049eb0aedf6cb58",
|
|
292
295
|
"tests/drafts.test.js": "2dec0cfeadd6df1d3b90f3fd8bce1f33762811eb6e94cd7325bcb8ec31edac42",
|
|
293
296
|
"tests/email.test.js": "2190b6dd7cc9afad99d2170f002343fe3dad306aa14ac718428e5df0be54ded1",
|
|
294
|
-
"tests/pure.test.js": "
|
|
297
|
+
"tests/pure.test.js": "7fd8db1d18fbd2dcac899eaff5ee19d30f8b806bd6f342b89259413d5f205c18",
|
|
295
298
|
"tests/refunds.test.js": "0ae06afca3cf9fd1fe89f1fbc63b3676216c79e174dbcb83788180c01d078366",
|
|
296
299
|
"tests/sales.test.js": "9025bc608b04bcc14f5bb2c98b4f7c35de99f3ddab4ffa59772d045795bf2cb7",
|
|
297
300
|
"tests/seo.test.js": "1d0b77409bd65faf803af303531c7653a151b4ffd615bab4fb1708efabd670de"
|
|
@@ -347,6 +350,24 @@
|
|
|
347
350
|
"tests/themes.test.js": "23071a019db49e3161956517c8bb5bb6e41312ca453819baa761ae613b1cfb67",
|
|
348
351
|
"tests/view.test.js": "24adb2c3e4f9d84dbcd8450addb134f75e2fec25667cda106ec8c80618247e94"
|
|
349
352
|
}
|
|
353
|
+
},
|
|
354
|
+
"whatsapp-calling": {
|
|
355
|
+
"version": "0.1.0",
|
|
356
|
+
"files": {
|
|
357
|
+
"CLAUDE.md": "85f637b87da53dc8c2574bb9d79bd8153974a69e892c97d753d3f2be05b8502c",
|
|
358
|
+
"admin/css/index.css": "38e666113fc66326d8ad31248df0460c01d4419e43f60ada714a6afa4095beb5",
|
|
359
|
+
"admin/templates/index.html": "27701ef5fe0c318ba175946e1b1b0381dac66b3e8d3f3f5e2a03b9d4b7cfc46a",
|
|
360
|
+
"admin/views/connection-help.js": "3f02ddc3ce1a313bcdadef06e0ab84218a5e3fbd91a284206bfa0b52aa41bbfb",
|
|
361
|
+
"admin/views/index.js": "fa18a178bae7d88af478eb81129070cb4cb3779b6c29ff138c0b3f8289ca7b56",
|
|
362
|
+
"config.js": "f74657df66fd45ec344591a4e5417319aab073f9988fc72208f305e1bdb6ba82",
|
|
363
|
+
"docs/guide.md": "8f1153455bee52c166e055362ffe9a4b594f38819391548a6566286f547fcc5b",
|
|
364
|
+
"lib/calls.js": "6fc0bb594c78dd6f5ca3bf30631f932358ddbc61dd6a1544082dc3fffd2e45ba",
|
|
365
|
+
"lib/meta.js": "7731179034e02e98e18c5caca3fa853091ba81e494a0d3ed63b1916ada8717f8",
|
|
366
|
+
"lib/recipients.js": "59ddb6db920b089f65d83614c0e1ec3c06a8ba734d1d8f792ad5309c0350cb3f",
|
|
367
|
+
"plugin.js": "f6275457340f384c5dbe46ee932ea298df9f5bd67434c3a7e5bf1b4ab8e246a7",
|
|
368
|
+
"plugin.json": "9633ddfcfa5d6169684bc3a8b839edc3db3cdba728045737513edf45d2aac0f3",
|
|
369
|
+
"tests/calling.test.js": "c3ce0720eaac00e67bf52f1989b54642244aaf9407841dd430fd07312ce14d74"
|
|
370
|
+
}
|
|
350
371
|
}
|
|
351
372
|
}
|
|
352
373
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [1.2.2] - 2026-11-08
|
|
4
|
+
- "Unused admin accounts" counts an admin who has never signed in from when the account was made, so one added today is not reported as unused for 90+ days.
|
|
5
|
+
- The health check names itself ("Domma Security health check") when it asks for private files, so a 404 log can tell it from a visitor.
|
|
6
|
+
|
|
@@ -30,7 +30,10 @@ export function evaluate(f = {}, {now = Date.now(), staleAdminDays = 90} = {}) {
|
|
|
30
30
|
|
|
31
31
|
// --- People ---
|
|
32
32
|
const admins = f.admins || [];
|
|
33
|
-
|
|
33
|
+
// Never signed in counts from when the account was made: an admin added today is not
|
|
34
|
+
// "not signed in for 90+ days". With no date at all, it still counts as unused.
|
|
35
|
+
const since = (a) => a.lastLogin || a.createdAt;
|
|
36
|
+
const stale = admins.filter(a => !since(a) || Date.parse(since(a)) < now - staleAdminDays * DAY);
|
|
34
37
|
add({id: 'admins-stale', group: 'People', title: 'Unused admin accounts',
|
|
35
38
|
status: !admins.length ? 'info' : stale.length ? 'warn' : 'pass',
|
|
36
39
|
detail: stale.length ? `${plural(stale.length, 'admin')} not signed in for ${staleAdminDays}+ days: ${names(stale.map(a => a.name || a.email))}.` : `Every admin has signed in within ${staleAdminDays} days.`,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "security",
|
|
3
3
|
"displayName": "Security",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.2",
|
|
5
5
|
"tier": "free",
|
|
6
6
|
"description": "Keeps a Domma CMS site safe: a health check of what is weak and how to fix it, sign-in lockout after repeated wrong passwords, password rules, a log of every sign-in, and blocking of the scanners that probe every site for WordPress, .env files and the like.",
|
|
7
7
|
"author": "Domma CMS",
|
|
8
|
-
"date": "2026-
|
|
8
|
+
"date": "2026-11-08",
|
|
9
9
|
"minCmsVersion": "0.83.0",
|
|
10
10
|
"icon": "shield",
|
|
11
11
|
"permissions": [
|
|
@@ -97,7 +97,8 @@ async function probeFiles(port) {
|
|
|
97
97
|
const out = [];
|
|
98
98
|
for (const p of PRIVATE) {
|
|
99
99
|
try {
|
|
100
|
-
|
|
100
|
+
// Named, so a 404 log (SEO Pro's) can tell this check from a visitor.
|
|
101
|
+
const res = await fetch(`http://127.0.0.1:${port}${p}`, {redirect: 'manual', headers: {'user-agent': 'Domma Security health check'}, signal: AbortSignal.timeout(TIMEOUT)});
|
|
101
102
|
out.push({path: p, status: res.status});
|
|
102
103
|
} catch {
|
|
103
104
|
out.push({path: p, status: 0});
|
|
@@ -119,6 +119,11 @@ test('health: facts become checks; unknown is info, never a pass; the score coun
|
|
|
119
119
|
}, {now});
|
|
120
120
|
const st = Object.fromEntries(bad.checks.map(c => [c.id, c.status]));
|
|
121
121
|
assert.equal(st['admins-stale'], 'warn');
|
|
122
|
+
// An admin made today who has not signed in yet is not an unused account.
|
|
123
|
+
const fresh = evaluate({admins: [{name: 'New', lastLogin: null, createdAt: new Date(now - 86400000).toISOString()}]}, {now});
|
|
124
|
+
assert.equal(fresh.checks.find(c => c.id === 'admins-stale').status, 'pass');
|
|
125
|
+
const oldNever = evaluate({admins: [{name: 'Gone', lastLogin: null, createdAt: '2025-01-01T00:00:00Z'}]}, {now});
|
|
126
|
+
assert.equal(oldNever.checks.find(c => c.id === 'admins-stale').status, 'warn');
|
|
122
127
|
assert.equal(st.exposed, 'fail');
|
|
123
128
|
assert.equal(st.certificate, 'fail');
|
|
124
129
|
assert.equal(st.proxy, 'fail');
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [1.7.3] - 2026-11-08
|
|
4
|
+
- An order's extension facts show only words and numbers, with readable names ("keys short: 2"): Shop Pro's bookkeeping (counted, granted) showed raw.
|
|
5
|
+
- Needs you says an option is sold out ("Imperial sold out") rather than ": 0".
|
|
6
|
+
- At checkout a long discount name wraps without splitting its amount.
|
|
7
|
+
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import {api, claims, copy, deferItems, entriesOf, esc, fmtDate, fmtDateTime, money, moneyIn, moneyOut, mountPanels, openPanel, refreshBadge, store, when, wireRows} from '../lib/kit.js';
|
|
13
|
-
import {NEXT, STATUS_LABEL, STATUS_TONE, addressLines, orderLabel} from '/plugins/shopping-cart/public/lib/orders.js';
|
|
13
|
+
import {NEXT, STATUS_LABEL, STATUS_TONE, addressLines, orderFacts, orderLabel} from '/plugins/shopping-cart/public/lib/orders.js';
|
|
14
14
|
import {emailTo, looksLikeAddress, routeMailLinks} from '../lib/email.js';
|
|
15
15
|
|
|
16
16
|
const FILTERS = [
|
|
@@ -400,8 +400,7 @@ ${(d.lines || []).map(l => `<tr><td class="q">${l.qty}</td><td>${esc(l.name)}${l
|
|
|
400
400
|
};
|
|
401
401
|
let extPanels = null;
|
|
402
402
|
let unrouteMail = () => {};
|
|
403
|
-
const ext =
|
|
404
|
-
.filter(x => ['string', 'number', 'boolean'].includes(typeof x.v));
|
|
403
|
+
const ext = orderFacts(d.ext);
|
|
405
404
|
const addr = addressLines(d.address);
|
|
406
405
|
const html = `<div class="shp-order">
|
|
407
406
|
<div class="shp-order-head">
|
|
@@ -434,7 +433,7 @@ ${(d.lines || []).map(l => `<tr><td class="q">${l.qty}</td><td>${esc(l.name)}${l
|
|
|
434
433
|
${Array.isArray(d.refunds) && d.refunds.length ? `<div class="shp-callout shp-refunds"><strong>Refunded ${esc(money(refundedOf(d)))}${refundedOf(d) < (d.total || 0) ? ` - ${esc(money((d.total || 0) - refundedOf(d)))} left to refund` : ' - in full'}</strong>
|
|
435
434
|
<ul>${d.refunds.map(r => `<li>${esc(money(r.amount))} · ${esc(fmtDateTime(r.at))} · ${esc(r.via || '')}${r.by ? ` by ${esc(r.by)}` : ''}${r.note ? ` - ${esc(r.note)}` : ''}${r.ref ? ` <code>${esc(r.ref)}</code>` : ''}</li>`).join('')}</ul></div>` : ''}
|
|
436
435
|
${d.commission ? `<p class="shp-muted shp-ref">Platform commission: ${esc(money(d.commission.amount))} (${esc(`${d.commission.percent}%${d.commission.fixed ? ` + ${money(d.commission.fixed)}` : ''}`)})${d.commission.reversed ? ' - returned with the refund' : ''}</p>` : ''}
|
|
437
|
-
${ext.length ? `<div class="shp-ext">${ext.map(x => `<span class="shp-chip is-muted">${esc(x.
|
|
436
|
+
${ext.length ? `<div class="shp-ext">${ext.map(x => `<span class="shp-chip is-muted">${esc(x.label)}: ${esc(String(x.v))}</span>`).join('')}</div>` : ''}
|
|
438
437
|
<div data-part="ext-panels" hidden></div>
|
|
439
438
|
<h4>History</h4>
|
|
440
439
|
<ol class="shp-history">${(d.history || []).slice().reverse().map(h => `<li><span class="shp-chip is-${STATUS_TONE[h.status] || 'muted'}">${esc(STATUS_LABEL[h.status] || h.status)}</span>
|
|
@@ -70,7 +70,7 @@ export function summarise(orders, products, settings, now = Date.now()) {
|
|
|
70
70
|
const lowStock = products
|
|
71
71
|
.filter(p => p.data?.status === 'active' && p.data?.trackStock)
|
|
72
72
|
.map(p => ({id: p.id, name: p.data.name, stock: totalStock(p.data),
|
|
73
|
-
variants: (p.data.variants || []).filter(v => (Number(v.stock) || 0) <= lowAt).map(v => `${v.name}: ${v.stock
|
|
73
|
+
variants: (p.data.variants || []).filter(v => (Number(v.stock) || 0) <= lowAt).map(v => ((Number(v.stock) || 0) <= 0 ? `${v.name} sold out` : `${v.name}: ${v.stock} left`))}))
|
|
74
74
|
.filter(p => p.stock <= lowAt || p.variants.length)
|
|
75
75
|
.sort((a, b) => a.stock - b.stock);
|
|
76
76
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shopping-cart",
|
|
3
3
|
"displayName": "Shopping Cart",
|
|
4
|
-
"version": "1.7.
|
|
4
|
+
"version": "1.7.3",
|
|
5
5
|
"tier": "free",
|
|
6
6
|
"description": "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.",
|
|
7
7
|
"author": "Domma CMS",
|
|
8
|
-
"date": "2026-
|
|
8
|
+
"date": "2026-11-08",
|
|
9
9
|
"icon": "shopping-bag",
|
|
10
10
|
"permissions": [
|
|
11
11
|
{
|
|
@@ -120,3 +120,19 @@ export function addressLines(a) {
|
|
|
120
120
|
return [a.line1, a.line2, [a.city, a.region].filter(Boolean).join(', '), a.postcode, COUNTRIES[a.country] || a.country]
|
|
121
121
|
.filter(Boolean);
|
|
122
122
|
}
|
|
123
|
+
|
|
124
|
+
const ISO_TIME = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* The facts extensions keep on an order (`ext.<owner>`) worth showing staff: plain numbers and
|
|
128
|
+
* words, with the key turned into words ("keysShort" -> "keys short"). Booleans and timestamps
|
|
129
|
+
* are an extension's own bookkeeping (Shop Pro's `counted`, `granted`) and stay out - the order
|
|
130
|
+
* panel showed them raw, as "counted: true" and "granted: 2026-08-16T16:00:00.319Z".
|
|
131
|
+
*
|
|
132
|
+
* @returns {Array<{owner: string, k: string, label: string, v: string|number}>}
|
|
133
|
+
*/
|
|
134
|
+
export function orderFacts(ext = {}) {
|
|
135
|
+
return Object.entries(ext || {}).flatMap(([owner, facts]) => Object.entries(facts || {}).map(([k, v]) => ({owner, k, v})))
|
|
136
|
+
.filter(x => (typeof x.v === 'number' || (typeof x.v === 'string' && x.v.trim() && !ISO_TIME.test(x.v))))
|
|
137
|
+
.map(x => ({...x, label: x.k.replace(/([a-z])([A-Z])/g, '$1 $2').replace(/[_-]+/g, ' ').toLowerCase()}));
|
|
138
|
+
}
|
|
@@ -263,7 +263,7 @@ body {
|
|
|
263
263
|
.shop-co-summary h2 { font-size: 1.1rem; margin: 0 0 1rem; }
|
|
264
264
|
.shop-totals { margin: 0; display: flex; flex-direction: column; gap: .55rem; font-variant-numeric: tabular-nums; }
|
|
265
265
|
.shop-totals > div { display: flex; justify-content: space-between; gap: 1rem; font-size: .95rem; }
|
|
266
|
-
.shop-totals dt { color: var(--shop-muted); } .shop-totals dd { margin: 0; font-weight: 600; }
|
|
266
|
+
.shop-totals dt { color: var(--shop-muted); min-width: 0; } .shop-totals dd { margin: 0; font-weight: 600; white-space: nowrap; } /* a long discount name wraps; its amount ("-£62.78") never splits */
|
|
267
267
|
.shop-totals .is-discount dd { color: var(--shop-good); }
|
|
268
268
|
.shop-totals .is-included { font-size: .82rem; } .shop-totals .is-included dd { font-weight: 400; color: var(--shop-muted); }
|
|
269
269
|
.shop-totals .is-total { border-top: 1px solid var(--shop-line); margin-top: .35rem; padding-top: .8rem; font-size: 1.2rem; }
|