@cap-js/audit-logging 0.8.3 → 0.9.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 CHANGED
@@ -4,8 +4,16 @@ All notable changes to this project will be documented in this file.
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/).
6
6
 
7
+ ## Version 0.9.0 - 2025-06-05
8
+
9
+ ### Added
10
+
11
+ - Support for `@sap/cds^9`
12
+
7
13
  ## Version 0.8.3 - 2025-04-09
8
14
 
15
+ ### Fixed
16
+
9
17
  - Preperation for `@sap/cds^9`
10
18
 
11
19
  ## Version 0.8.2 - 2024-11-27
package/lib/utils.js CHANGED
@@ -123,7 +123,8 @@ const _buildSubSelect = (model, { entity, relative, element, next }, row, previo
123
123
  const targetAlias = _alias(element._target)
124
124
  const relativeAlias = _alias(relative)
125
125
 
126
- if (!('_relations' in relative)) {
126
+ // REVISIT: there seems to be a caching issue in cds^9 when elemets are renamed
127
+ if (!('_relations' in relative) || !relative._relations[element.name]) {
127
128
  const newRelation = Relation.to(relative)
128
129
  relative._relations = new Proxy(exposeRelation(newRelation), relationHandler(newRelation))
129
130
  }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@cap-js/audit-logging",
3
- "version": "0.8.3",
3
+ "version": "0.9.0",
4
4
  "description": "CDS plugin providing integration to the SAP Audit Log service as well as out-of-the-box personal data-related audit logging based on annotations.",
5
5
  "repository": "cap-js/audit-logging",
6
6
  "author": "SAP SE (https://www.sap.com)",
7
7
  "homepage": "https://cap.cloud.sap/",
8
- "license": "SEE LICENSE IN LICENSE",
8
+ "license": "Apache-2.0",
9
9
  "main": "cds-plugin.js",
10
10
  "files": [
11
11
  "lib",
@@ -14,21 +14,19 @@
14
14
  ],
15
15
  "scripts": {
16
16
  "lint": "npx eslint .",
17
- "test": "npm run test-new-db && npm run test-old-db",
18
- "test-new-db": "CDS_ENV='better-sqlite' npx jest --silent",
19
- "test-old-db": "CDS_ENV='legacy-sqlite' npx jest --silent"
17
+ "test": "npx jest --silent"
20
18
  },
21
19
  "peerDependencies": {
22
- "@sap/cds": ">=7"
20
+ "@sap/cds": ">=8"
23
21
  },
24
22
  "devDependencies": {
25
23
  "@cap-js/audit-logging": "file:.",
26
- "@cap-js/sqlite": "^1",
24
+ "@cap-js/cds-test": ">=0",
25
+ "@cap-js/sqlite": ">=1",
27
26
  "axios": "^1",
28
27
  "eslint": "^9",
29
28
  "express": "^4",
30
- "jest": "^29",
31
- "sqlite3": "^5.1.6"
29
+ "jest": "^29"
32
30
  },
33
31
  "cds": {
34
32
  "requires": {
package/srv/service.js CHANGED
@@ -1,8 +1,6 @@
1
1
  const cds = require('@sap/cds')
2
2
 
3
- const Base = cds.outboxed ? cds.Service : require('@sap/cds/libx/_runtime/messaging/Outbox')
4
-
5
- module.exports = class AuditLogService extends Base {
3
+ module.exports = class AuditLogService extends cds.Service {
6
4
  async init() {
7
5
  // add common audit log entry fields
8
6
  this.before('*', req => {