strapi-cms-audit-log 1.2.0 → 1.2.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
@@ -5,6 +5,19 @@ All notable changes to this project are documented here.
5
5
  The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
6
6
  the project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.2.1] — 2026-11-06
9
+
10
+ ### Fixed
11
+ - Building the list page's filter options no longer takes extra pooled
12
+ database connections. `readStoredOptions` ran its six `DISTINCT` queries on
13
+ raw `strapi.db.connection`, which from inside an open transaction takes a
14
+ second connection per query and can exhaust a small pool. The queries now run
15
+ in turn on a single transaction connection.
16
+
17
+ ### Changed
18
+ - Removed the upper bound on the supported Node.js version; `engines.node` is
19
+ now `>=18.0.0`.
20
+
8
21
  ## [1.2.0] — 2026-09-11
9
22
 
10
23
  Remediates every finding of the 10 September OWASP ASVS Level 2 (V7) assessment.
package/README.md CHANGED
@@ -126,7 +126,7 @@ sidebar entry are all created on boot.
126
126
  | | |
127
127
  |---|---|
128
128
  | Strapi | `^5.0.0` (developed and tested against 5.52) |
129
- | Node | `>=18 <=22` |
129
+ | Node | `>=18` |
130
130
  | Database | Any Strapi v5 supports — PostgreSQL, MySQL/MariaDB, SQLite |
131
131
 
132
132
  There is one manual step after installing: **grant the permission**. See
@@ -949,8 +949,13 @@ const auditService = ({ strapi }) => {
949
949
  sources: [...options.sources].sort(),
950
950
  outcomes: [...options.outcomes].sort()
951
951
  });
952
- const readStoredOptions = async () => {
953
- const knex = strapi.db.connection;
952
+ const readStoredOptions = () => (
953
+ // Never raw `strapi.db.connection`: from inside an open transaction it takes
954
+ // a second pooled connection, and `Promise.all` below would take six. On the
955
+ // transaction's one connection the six queries simply run in turn.
956
+ strapi.db.transaction(({ trx }) => readStoredOptionsWith(trx))
957
+ );
958
+ const readStoredOptionsWith = async (knex) => {
954
959
  const metadata = strapi.db.metadata.get(AUDIT_LOG_UID);
955
960
  const table = metadata.tableName;
956
961
  const column = (attribute) => {
@@ -947,8 +947,13 @@ const auditService = ({ strapi }) => {
947
947
  sources: [...options.sources].sort(),
948
948
  outcomes: [...options.outcomes].sort()
949
949
  });
950
- const readStoredOptions = async () => {
951
- const knex = strapi.db.connection;
950
+ const readStoredOptions = () => (
951
+ // Never raw `strapi.db.connection`: from inside an open transaction it takes
952
+ // a second pooled connection, and `Promise.all` below would take six. On the
953
+ // transaction's one connection the six queries simply run in turn.
954
+ strapi.db.transaction(({ trx }) => readStoredOptionsWith(trx))
955
+ );
956
+ const readStoredOptionsWith = async (knex) => {
952
957
  const metadata = strapi.db.metadata.get(AUDIT_LOG_UID);
953
958
  const table = metadata.tableName;
954
959
  const column = (attribute) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strapi-cms-audit-log",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Tamper-evident audit logging for Strapi v5. Content create/update/delete/publish/unpublish with field-level diffs and a per-widget before/after view, plus logins, failed logins, logouts, denied requests and admin user/role/permission/media changes — all from Community Edition events. Hash-chained, undeletable, correlation ids on every request, RBAC-protected admin UI, redaction, self-audited retention and structured-log forwarding. Built to pass an OWASP ASVS L2 (V7) review.",
5
5
  "keywords": [
6
6
  "strapi",
@@ -100,7 +100,7 @@
100
100
  "description": "Automatic audit logging with field-level diffs and an RBAC-protected admin UI."
101
101
  },
102
102
  "engines": {
103
- "node": ">=18.0.0 <=22.x.x"
103
+ "node": ">=18.0.0"
104
104
  },
105
105
  "publishConfig": {
106
106
  "access": "public"