@sap/xsodata 8.0.0 → 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 +9 -1
- package/lib/processor/batchProcessor.js +2 -0
- package/lib/processor/exitProcessor.js +9 -9
- package/lib/sql/dataCollectorGet.js +1 -1
- package/lib/sql/dataCollectorLinks.js +1 -0
- package/lib/sql/dataCollectorPost.js +1 -1
- package/lib/sql/dataCollectorPut.js +1 -1
- package/lib/sql/statementProcessor.js +1 -2
- package/lib/xsodata.js +3 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -8,11 +8,19 @@ 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
|
+
|
|
15
|
+
## [8.0.1] - 2022-09-13
|
|
16
|
+
|
|
17
|
+
* remove node 12 support
|
|
18
|
+
|
|
11
19
|
## [8.0.0] - 2022-08-04
|
|
12
20
|
|
|
13
21
|
* HANA Cloud database support added
|
|
14
22
|
* Public synonym support added
|
|
15
|
-
* Update module dependencies
|
|
23
|
+
* Update node module dependencies
|
|
16
24
|
|
|
17
25
|
## [7.5.5] - 2022-04-21
|
|
18
26
|
|
|
@@ -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 (
|
|
97
|
-
return asyncDone(
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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);
|
|
@@ -133,8 +133,7 @@ const execTempTableStatements = (context, stmsInput,asyncDone) => {
|
|
|
133
133
|
const stms = Array.isArray(stmsInput) ? stmsInput : [stmsInput];
|
|
134
134
|
var index;
|
|
135
135
|
context.logger.silly('dataCollector', 'execTempTableStatements');
|
|
136
|
-
context.logger
|
|
137
|
-
.debug('dataCollector', 'execTempTableStatements statements', JSON.stringify(stms, null, 2));
|
|
136
|
+
context.logger.debug('dataCollector', 'execTempTableStatements statements', JSON.stringify(stms, null, ' '));
|
|
138
137
|
|
|
139
138
|
return execCleanSessionStatements(stms, context, function done(err, context) {
|
|
140
139
|
|
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.
|
|
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.
|
|
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",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"xml-writer": "1.7.0"
|
|
59
59
|
},
|
|
60
60
|
"engines": {
|
|
61
|
-
"node": "^
|
|
61
|
+
"node": "^14 || ^16"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@sap/hana-client": "2.10.20",
|