@sap/xsodata 8.0.1 → 8.0.2

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
@@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
8
8
 
9
9
  ## Unreleased
10
10
 
11
+ ## [8.0.2] - 2023-01-30
12
+
13
+ * Security fix - update @sap/xssec library to version 3.2.17.
14
+
11
15
  ## [8.0.1] - 2022-09-13
12
16
 
13
17
  * remove node 12 support
@@ -20,6 +20,7 @@ function parseBatchBody(batchContext, asyncDone) {
20
20
  return asyncDone(err, batchContext);
21
21
  }
22
22
  try {
23
+ batchContext.logger.silly(body); // log batch payload
23
24
  batchContext.batchParsed = batchParser.convertBatch(body, boundary);
24
25
  batchContext.logger.silly('batchProcessor', 'parseBody OK');
25
26
  return asyncDone(null, batchContext);
@@ -121,6 +122,7 @@ function processChangeSetPartsPreCommit(batchContext, asyncDone) {
121
122
  function processChangeSetPartsCommit(batchContext, asyncDone) {
122
123
  var parentContext = batchContext.parentContext;
123
124
  var client = parentContext.db.client;
125
+ batchContext.logger.debug('processChangeSetPartsCommit', 'commit changeset operations');
124
126
  client.commit(function (err) {
125
127
  if (err) {
126
128
  batchContext.logger.info('SQL Exec', 'Commit Error: \n' + JSON.stringify(err));
@@ -36,8 +36,8 @@ function ExitSpec(sExitSpec) {
36
36
  }
37
37
 
38
38
  /**
39
- * @param sEventType : string, one of before, after, precommit, postcommit
40
- * @param sOperation : string, one of create, update, delete
39
+ * @param sEventType : string, one of: before, after, precommit, postcommit
40
+ * @param sOperation : string, one of: create, update, delete
41
41
  * @returns {Function} ready to be plugged in the async waterfall
42
42
  */
43
43
  function eventHandler(sEventType, sOperation) {
@@ -88,13 +88,13 @@ function eventHandler(sEventType, sOperation) {
88
88
  */
89
89
  function executeExit(sExitSpec, sEventType, sOperation, context, asyncDone) {
90
90
  try {
91
- logInfoSave('custom exit', 'executing ...');
92
- logInfoSave('custom exit', 'exitName:'+sExitSpec);
93
- logInfoSave('custom exit', 'eventType:'+sEventType);
94
- logInfoSave('custom exit', 'operation:'+sOperation);
91
+ logInfoSave(context, 'custom exit', 'executing ...');
92
+ logInfoSave(context, 'custom exit', 'exitName:'+sExitSpec);
93
+ logInfoSave(context, 'custom exit', 'eventType:'+sEventType);
94
+ logInfoSave(context, 'custom exit', 'operation:'+sOperation);
95
95
  _executeExit(sExitSpec, sEventType, sOperation, context, asyncDone);
96
- } catch (x) {
97
- return asyncDone(x, context);
96
+ } catch (err) {
97
+ return asyncDone(err, context);
98
98
  }
99
99
  }
100
100
 
@@ -106,7 +106,7 @@ function logInfoSave(context, preFix, logText) {
106
106
 
107
107
  function logErrorSave(context, preFix, logText) {
108
108
  if (context.logger) {
109
- context.logger.info(preFix, logText);
109
+ context.logger.error(preFix, logText);
110
110
  }
111
111
  }
112
112
 
@@ -252,7 +252,7 @@ exports.dropTempTables = function (context, asyncDone) {
252
252
  };
253
253
 
254
254
  exports.commit = function (context, asyncDone) {
255
- context.logger.silly('dataCollectorGet', 'commit');
255
+ context.logger.debug('dataCollectorGet', 'commit');
256
256
  var client = context.db.client;
257
257
  client.commit(function (err) {
258
258
  if (err) {
@@ -143,6 +143,7 @@ exports.commit = function (context, asyncDone) {
143
143
  }
144
144
 
145
145
  var client = context.db.client;
146
+ context.logger.debug('dataCollectorLinks', 'commit');
146
147
  client.commit(function (err) {
147
148
  if (err) {
148
149
  context.logger.info('SQL Exec', 'Commit Error: \n' + JSON.stringify(err));
@@ -136,7 +136,7 @@ exports.selectData = function (context, asyncDone) {
136
136
 
137
137
 
138
138
  exports.commit = function (context, asyncDone) {
139
- context.logger.silly('dataCollectorPost', 'commit');
139
+ context.logger.debug('dataCollectorPost', 'commit');
140
140
  var client = context.db.client;
141
141
  client.commit(function (err) {
142
142
  if (err) {
@@ -164,7 +164,7 @@ exports.selectData = function (context, asyncDone) {
164
164
  };
165
165
 
166
166
  exports.commit = function (context, asyncDone) {
167
- context.logger.silly('dataCollectorPut', 'commit');
167
+ context.logger.debug('dataCollectorPut', 'commit');
168
168
  if (context.batchContext) {
169
169
  //When running in batch the commit is performed by the batch executor
170
170
  return asyncDone(null, context);
package/lib/xsodata.js CHANGED
@@ -238,10 +238,13 @@ exports.ODataHandler.prototype.processRequest = function(request, response, requ
238
238
 
239
239
  context.startTimeRequest = context.logger.getStartTimeRequest();
240
240
 
241
+ context.logger.info('xsodata', 'process method: ' + request.method);
241
242
  context.logger.info('xsodata', 'process url: ' + request.url);
242
243
  context.logger.info('xsodata', 'version: ' + packageJson.version);
243
244
  context.logger.info('xsodata', 'uriPrefix: ' + context.uriPrefix);
244
245
  context.logger.info('xsodata', 'node version: ' + process.version);
246
+ context.logger.info('xsodata', 'network request ID: ' + context.uniqueNetworkRequestID);
247
+ context.logger.info('xsodata', 'request ID: ' + context.uniqueRequestID);
245
248
 
246
249
  context.url = request.url;
247
250
  context.request = simpleRequest.createRequest(request, context);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/xsodata",
3
- "version": "8.0.1",
3
+ "version": "8.0.2",
4
4
  "description": "Expose data from a HANA database as OData V2 service with help of .xsodata files.",
5
5
  "main": "index.js",
6
6
  "license": "SEE LICENSE IN developer-license-3.1.txt",
@@ -47,7 +47,7 @@
47
47
  ],
48
48
  "dependencies": {
49
49
  "@sap/xsenv": "3.3.2",
50
- "@sap/xssec": "3.2.13",
50
+ "@sap/xssec": "3.2.17",
51
51
  "async": "3.2.4",
52
52
  "big.js": "6.2.1",
53
53
  "body-parser": "1.20.0",