@sap/async-xsjs 1.0.8 → 2.0.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
@@ -5,6 +5,20 @@ This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
6
  The format is based on [Keep a Changelog](http://keepachangelog.com/).
7
7
 
8
+ <a name="2.0.0"></a>
9
+ ## 2.0.0 - 2023-12-08
10
+
11
+ ### Added
12
+ - Added Node.js 20.x support.
13
+
14
+ ### Updated
15
+ - Dependent node module versions updated to latest versions to support Node 20.
16
+ - Updated axios version to 1.6.2 to fix the security vulnerability.
17
+
18
+ ### Removed
19
+ - Removed support Node.js 16.x
20
+ - Removed text-mining and text-analysis features.
21
+
8
22
  <a name="1.0.8"></a>
9
23
  ## 1.0.8 - 2023-10-20
10
24
 
package/lib/logging.js CHANGED
@@ -3,7 +3,7 @@
3
3
  var logging = require('@sap/logging');
4
4
 
5
5
  var CATEGORY = '/CompatibilityLayer';
6
- var appContext = logging.createAppContext({ csnComponent: 'BC-XS-JS' });
6
+ var appContext = logging.createAppContext({ csnComponent: 'BC-XS-ASYNCJS' });
7
7
  var logContext = appContext.createLogContext({ id: '' });
8
8
  var logger = logContext.getLogger(CATEGORY);
9
9
  logger.warn = logger.warning;
package/lib/runtime.js CHANGED
@@ -318,7 +318,6 @@ Runtime.prototype.createBaseContext = function (req, locale, traceOptions) {
318
318
  var dbReqOptions = hanaDbOptions.forRequest(req, locale);
319
319
  context.db = new xs.db.DB(dbReqOptions);
320
320
  context.hdb = new xs.db.HDB(dbReqOptions, traceObject._tracer);
321
- context.text = xs.text.create(context.db);
322
321
  }
323
322
 
324
323
  var secStoreDbOptions = this.get('secureStoreDbOptions');
package/lib/xsjs/index.js CHANGED
@@ -10,4 +10,3 @@ exports.security = require('./security');
10
10
  exports.trace = require('./trace/trace');
11
11
  exports.util = require('./util');
12
12
  exports.require = require('./require');
13
- exports.text = require('./text');
@@ -1,32 +1,30 @@
1
1
  {
2
2
  "name": "@sap/async-xsjs",
3
- "version": "1.0.8",
3
+ "version": "2.0.0",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@sap/async-xsjs",
9
- "version": "1.0.8",
9
+ "version": "2.0.0",
10
10
  "license": "SEE LICENSE IN LICENSE file",
11
11
  "dependencies": {
12
12
  "@sap/audit-logging": "^5.7.1",
13
- "@sap/e2e-trace": "^3.2.0",
14
- "@sap/hana-client": "^2.18.24",
15
- "@sap/hdbext": "^8.0.0",
16
- "@sap/instance-manager": "^3.5.3",
17
- "@sap/jobs-client": "^1.7.43",
18
- "@sap/logging": "^6.2.0",
19
- "@sap/node-jwt": "^1.6.14",
20
- "@sap/node-vsi": "^1.4.21",
21
- "@sap/textanalysis": "~1.1.0",
22
- "@sap/textbundle": "^3.1.0",
23
- "@sap/textmining": "~1.1.6",
24
- "@sap/xsenv": "^3.4.0",
25
- "@sap/xsodata": "^8.0.2",
26
- "@sap/xss-secure": "^4.1.0",
27
- "@sap/xssec": "^3.3.5",
13
+ "@sap/e2e-trace": "^4.1.0",
14
+ "@sap/hana-client": "^2.19.18",
15
+ "@sap/hdbext": "^8.0.2",
16
+ "@sap/instance-manager": "^4.1.0",
17
+ "@sap/jobs-client": "^1.8.1",
18
+ "@sap/logging": "^7.1.0",
19
+ "@sap/node-jwt": "^1.6.21",
20
+ "@sap/node-vsi": "^1.4.25",
21
+ "@sap/textbundle": "^4.3.0",
22
+ "@sap/xsenv": "^4.2.0",
23
+ "@sap/xsodata": "^8.1.2",
24
+ "@sap/xss-secure": "^4.3.0",
25
+ "@sap/xssec": "^3.6.0",
28
26
  "accept-language": "2.0.16",
29
- "axios": "^1.3.5",
27
+ "axios": "^1.6.2",
30
28
  "big.js": "5.0.2",
31
29
  "body-parser": "1.19.2",
32
30
  "callsite": "1.0.0",
@@ -49,33 +47,33 @@
49
47
  "yazl": "2.4.1"
50
48
  },
51
49
  "engines": {
52
- "node": "^16.x || ^18.x"
50
+ "node": "^18.x || ^20.x"
53
51
  }
54
52
  },
55
53
  "node_modules/@sap/audit-logging": {
56
- "version": "5.7.2",
54
+ "version": "5.8.2",
57
55
  "dependencies": {
58
- "@sap/xssec": "^3.3.5",
56
+ "@sap/xssec": "^3.6.0",
59
57
  "debug": "4.3.4",
60
58
  "fetch-retry": "4.1.0",
61
- "node-cache": "5.1.0",
62
- "node-fetch": "2.6.7"
59
+ "node-cache": "5.1.2",
60
+ "node-fetch": "2.7.0"
63
61
  },
64
62
  "engines": {
65
- "node": "^12.0.0 || ^14.0.0 || ^16.0.0 || ^18.0.0"
63
+ "node": "^12.0.0 || ^14.0.0 || ^16.0.0 || ^18.0.0 || ^20.0.0"
66
64
  }
67
65
  },
68
66
  "node_modules/@sap/e2e-trace": {
69
- "version": "3.2.0",
67
+ "version": "4.1.0",
70
68
  "dependencies": {
71
69
  "request-stats": "3.0.0"
72
70
  },
73
71
  "engines": {
74
- "node": "^8.0.0 || ^10.0.0 || ^12.0.0 || ^14.0.0 || ^16.0.0 || ^18.0.0"
72
+ "node": "^12.0.0 || ^14.0.0 || ^16.0.0 || ^18.0.0 || ^20.0.0"
75
73
  }
76
74
  },
77
75
  "node_modules/@sap/hana-client": {
78
- "version": "2.18.24",
76
+ "version": "2.19.18",
79
77
  "hasInstallScript": true,
80
78
  "dependencies": {
81
79
  "debug": "3.1.0"
@@ -94,10 +92,10 @@
94
92
  "version": "2.0.0"
95
93
  },
96
94
  "node_modules/@sap/hdbext": {
97
- "version": "8.0.0",
95
+ "version": "8.0.2",
98
96
  "dependencies": {
99
- "@sap/e2e-trace": "^3.1.0",
100
- "@sap/hana-client": "2.17.21",
97
+ "@sap/e2e-trace": "^4.1.0",
98
+ "@sap/hana-client": "2.18.27",
101
99
  "accept-language": "2.0.16",
102
100
  "async": "3.2.2",
103
101
  "debug": "4.3.1",
@@ -105,11 +103,11 @@
105
103
  "verror": "1.10.0"
106
104
  },
107
105
  "engines": {
108
- "node": "^12.0.0 || ^14.0.0 || ^16.0.0 || ^18.0.0"
106
+ "node": "^12.0.0 || ^14.0.0 || ^16.0.0 || ^18.0.0 || ^20.0.0"
109
107
  }
110
108
  },
111
109
  "node_modules/@sap/hdbext/node_modules/@sap/hana-client": {
112
- "version": "2.17.21",
110
+ "version": "2.18.27",
113
111
  "hasInstallScript": true,
114
112
  "dependencies": {
115
113
  "debug": "3.1.0"
@@ -142,9 +140,9 @@
142
140
  }
143
141
  },
144
142
  "node_modules/@sap/instance-manager": {
145
- "version": "3.5.3",
143
+ "version": "4.2.0",
146
144
  "dependencies": {
147
- "@sap/xssec": "^3.2.15",
145
+ "@sap/xssec": "^3.6.0",
148
146
  "clone": "2.1.1",
149
147
  "debug": "4.3.3",
150
148
  "lru-cache": "4.1.1",
@@ -152,7 +150,7 @@
152
150
  "uuid": "7.0.0"
153
151
  },
154
152
  "engines": {
155
- "node": "^10.0.0 || ^12.0.0 || ^14.0.0 || ^16.0.0 || ^18"
153
+ "node": "^16.0.0 || ^18 || ^20"
156
154
  }
157
155
  },
158
156
  "node_modules/@sap/instance-manager/node_modules/debug": {
@@ -169,71 +167,72 @@
169
167
  }
170
168
  }
171
169
  },
170
+ "node_modules/@sap/instance-manager/node_modules/node-fetch": {
171
+ "version": "2.6.7",
172
+ "dependencies": {
173
+ "whatwg-url": "^5.0.0"
174
+ },
175
+ "engines": {
176
+ "node": "4.x || >=6.0.0"
177
+ },
178
+ "peerDependencies": {
179
+ "encoding": "^0.1.0"
180
+ },
181
+ "peerDependenciesMeta": {
182
+ "encoding": {
183
+ "optional": true
184
+ }
185
+ }
186
+ },
172
187
  "node_modules/@sap/jobs-client": {
173
- "version": "1.7.47",
188
+ "version": "1.8.1",
174
189
  "dependencies": {
175
- "@sap/xsenv": "3.4.0"
190
+ "@sap/xsenv": "4.2.0"
176
191
  },
177
192
  "engines": {
178
- "node": "^14 || ^16 || ^18"
193
+ "node": "^14 || ^16 || ^18 || ^20"
179
194
  }
180
195
  },
181
196
  "node_modules/@sap/logging": {
182
- "version": "6.2.0",
197
+ "version": "7.1.0",
183
198
  "dependencies": {
184
- "@sap/e2e-trace": "^3.1.0",
199
+ "@sap/e2e-trace": "^4.1.0",
185
200
  "lodash": "4.17.21",
186
201
  "moment": "2.29.4"
187
202
  },
188
203
  "engines": {
189
- "node": "^10.0.0 || ^12.0.0 || ^14.0.0 || ^16.0.0 || ^18.0.0"
204
+ "node": "^12.0.0 || ^14.0.0 || ^16.0.0 || ^18.0.0 || ^20.0.0"
190
205
  }
191
206
  },
192
207
  "node_modules/@sap/node-jwt": {
193
- "version": "1.6.20",
208
+ "version": "1.6.21",
194
209
  "hasInstallScript": true,
195
210
  "engines": {
196
- "node": "<19.0.0"
211
+ "node": "<21.0.0"
197
212
  }
198
213
  },
199
214
  "node_modules/@sap/node-vsi": {
200
- "version": "1.4.24",
215
+ "version": "1.4.25",
201
216
  "hasInstallScript": true,
202
217
  "engines": {
203
- "node": "<19.0.0"
204
- }
205
- },
206
- "node_modules/@sap/textanalysis": {
207
- "version": "1.1.0",
208
- "engines": {
209
- "node": "^6.0.0"
218
+ "node": "<21.0.0"
210
219
  }
211
220
  },
212
221
  "node_modules/@sap/textbundle": {
213
- "version": "3.1.0",
214
- "engines": {
215
- "node": "^6.0.0 || ^8.0.0 || ^10.0.0 || ^12.0.0"
216
- }
217
- },
218
- "node_modules/@sap/textmining": {
219
- "version": "1.1.6",
220
- "dependencies": {
221
- "hdb": "0.12.1"
222
- },
222
+ "version": "4.3.0",
223
223
  "engines": {
224
- "node": ">=0.12.7",
225
- "npm": "^2.11.x"
224
+ "node": "^8.0.0 || ^10.0.0 || ^12.0.0 || ^14.0.0 || ^16.0.0 || ^18.0.0 || ^20.0.0"
226
225
  }
227
226
  },
228
227
  "node_modules/@sap/xsenv": {
229
- "version": "3.4.0",
228
+ "version": "4.2.0",
230
229
  "dependencies": {
231
230
  "debug": "4.3.3",
232
231
  "node-cache": "^5.1.0",
233
232
  "verror": "1.10.0"
234
233
  },
235
234
  "engines": {
236
- "node": "^10.0.0 || ^12.0.0 || ^14.0.0 || ^16.0.0 || ^18.0.0"
235
+ "node": "^12.0.0 || ^14.0.0 || ^16.0.0 || ^18.0.0 || ^20.0.0"
237
236
  }
238
237
  },
239
238
  "node_modules/@sap/xsenv/node_modules/debug": {
@@ -251,45 +250,25 @@
251
250
  }
252
251
  },
253
252
  "node_modules/@sap/xsodata": {
254
- "version": "8.1.0",
253
+ "version": "8.1.2",
255
254
  "dependencies": {
256
- "@sap/xsenv": "3.4.0",
257
- "@sap/xssec": "3.2.17",
258
- "async": "3.2.4",
255
+ "@sap/xsenv": "4.2.0",
256
+ "@sap/xssec": "3.6.0",
257
+ "async": "3.2.5",
259
258
  "big.js": "6.2.1",
260
- "body-parser": "1.20.1",
261
- "hdb": "0.19.5",
259
+ "body-parser": "1.20.2",
260
+ "hdb": "0.19.7",
262
261
  "lodash": "4.17.21",
263
262
  "negotiator": "0.6.3",
264
263
  "rwlock": "5.0.0",
265
264
  "xml-writer": "1.7.0"
266
265
  },
267
266
  "engines": {
268
- "node": "^14 || ^16 || ^18"
269
- }
270
- },
271
- "node_modules/@sap/xsodata/node_modules/@sap/xssec": {
272
- "version": "3.2.17",
273
- "dependencies": {
274
- "axios": "^0.26.0",
275
- "debug": "^4.3.2",
276
- "jsonwebtoken": "^9.0.0",
277
- "lru-cache": "^6.0.0",
278
- "node-rsa": "^1.1.1",
279
- "valid-url": "1.0.9"
280
- },
281
- "engines": {
282
- "node": ">=12.0.0"
267
+ "node": "^18 || ^20"
283
268
  }
284
269
  },
285
270
  "node_modules/@sap/xsodata/node_modules/async": {
286
- "version": "3.2.4"
287
- },
288
- "node_modules/@sap/xsodata/node_modules/axios": {
289
- "version": "0.26.1",
290
- "dependencies": {
291
- "follow-redirects": "^1.14.8"
292
- }
271
+ "version": "3.2.5"
293
272
  },
294
273
  "node_modules/@sap/xsodata/node_modules/big.js": {
295
274
  "version": "6.2.1",
@@ -298,10 +277,10 @@
298
277
  }
299
278
  },
300
279
  "node_modules/@sap/xsodata/node_modules/body-parser": {
301
- "version": "1.20.1",
280
+ "version": "1.20.2",
302
281
  "dependencies": {
303
282
  "bytes": "3.1.2",
304
- "content-type": "~1.0.4",
283
+ "content-type": "~1.0.5",
305
284
  "debug": "2.6.9",
306
285
  "depd": "2.0.0",
307
286
  "destroy": "1.2.0",
@@ -309,7 +288,7 @@
309
288
  "iconv-lite": "0.4.24",
310
289
  "on-finished": "2.4.1",
311
290
  "qs": "6.11.0",
312
- "raw-body": "2.5.1",
291
+ "raw-body": "2.5.2",
313
292
  "type-is": "~1.6.18",
314
293
  "unpipe": "1.0.0"
315
294
  },
@@ -318,33 +297,24 @@
318
297
  "npm": "1.2.8000 || >= 1.4.16"
319
298
  }
320
299
  },
321
- "node_modules/@sap/xsodata/node_modules/body-parser/node_modules/debug": {
322
- "version": "2.6.9",
323
- "dependencies": {
324
- "ms": "2.0.0"
325
- }
326
- },
327
300
  "node_modules/@sap/xsodata/node_modules/content-type": {
328
301
  "version": "1.0.5",
329
302
  "engines": {
330
303
  "node": ">= 0.6"
331
304
  }
332
305
  },
306
+ "node_modules/@sap/xsodata/node_modules/debug": {
307
+ "version": "2.6.9",
308
+ "dependencies": {
309
+ "ms": "2.0.0"
310
+ }
311
+ },
333
312
  "node_modules/@sap/xsodata/node_modules/depd": {
334
313
  "version": "2.0.0",
335
314
  "engines": {
336
315
  "node": ">= 0.8"
337
316
  }
338
317
  },
339
- "node_modules/@sap/xsodata/node_modules/hdb": {
340
- "version": "0.19.5",
341
- "dependencies": {
342
- "iconv-lite": "^0.4.18"
343
- },
344
- "engines": {
345
- "node": ">= 0.12"
346
- }
347
- },
348
318
  "node_modules/@sap/xsodata/node_modules/http-errors": {
349
319
  "version": "2.0.0",
350
320
  "dependencies": {
@@ -358,15 +328,6 @@
358
328
  "node": ">= 0.8"
359
329
  }
360
330
  },
361
- "node_modules/@sap/xsodata/node_modules/lru-cache": {
362
- "version": "6.0.0",
363
- "dependencies": {
364
- "yallist": "^4.0.0"
365
- },
366
- "engines": {
367
- "node": ">=10"
368
- }
369
- },
370
331
  "node_modules/@sap/xsodata/node_modules/ms": {
371
332
  "version": "2.0.0"
372
333
  },
@@ -389,7 +350,7 @@
389
350
  }
390
351
  },
391
352
  "node_modules/@sap/xsodata/node_modules/raw-body": {
392
- "version": "2.5.1",
353
+ "version": "2.5.2",
393
354
  "dependencies": {
394
355
  "bytes": "3.1.2",
395
356
  "http-errors": "2.0.0",
@@ -406,47 +367,24 @@
406
367
  "node": ">= 0.8"
407
368
  }
408
369
  },
409
- "node_modules/@sap/xsodata/node_modules/yallist": {
410
- "version": "4.0.0"
411
- },
412
370
  "node_modules/@sap/xss-secure": {
413
- "version": "4.2.0",
371
+ "version": "4.3.0",
414
372
  "engines": {
415
- "node": "^12.0.0 || ^14.0.0 || ^16.0.0 || ^18.0.0"
373
+ "node": "^12.0.0 || ^14.0.0 || ^16.0.0 || ^18.0.0 || ^20.0.0"
416
374
  }
417
375
  },
418
376
  "node_modules/@sap/xssec": {
419
- "version": "3.3.5",
377
+ "version": "3.6.0",
420
378
  "dependencies": {
421
- "axios": "^0.26.0",
422
- "debug": "^4.3.2",
379
+ "axios": "^1.6",
380
+ "debug": "^4.3.4",
423
381
  "jsonwebtoken": "^9.0.2",
424
- "lru-cache": "^6.0.0",
425
- "node-rsa": "^1.1.1",
426
- "valid-url": "1.0.9"
427
- },
428
- "engines": {
429
- "node": ">=16.1.0"
430
- }
431
- },
432
- "node_modules/@sap/xssec/node_modules/axios": {
433
- "version": "0.26.1",
434
- "dependencies": {
435
- "follow-redirects": "^1.14.8"
436
- }
437
- },
438
- "node_modules/@sap/xssec/node_modules/lru-cache": {
439
- "version": "6.0.0",
440
- "dependencies": {
441
- "yallist": "^4.0.0"
382
+ "node-rsa": "^1.1.1"
442
383
  },
443
384
  "engines": {
444
- "node": ">=10"
385
+ "node": ">=18"
445
386
  }
446
387
  },
447
- "node_modules/@sap/xssec/node_modules/yallist": {
448
- "version": "4.0.0"
449
- },
450
388
  "node_modules/accept-language": {
451
389
  "version": "2.0.16",
452
390
  "dependencies": {
@@ -485,7 +423,7 @@
485
423
  "version": "0.4.0"
486
424
  },
487
425
  "node_modules/axios": {
488
- "version": "1.5.1",
426
+ "version": "1.6.2",
489
427
  "dependencies": {
490
428
  "follow-redirects": "^1.15.0",
491
429
  "form-data": "^4.0.0",
@@ -965,12 +903,12 @@
965
903
  "version": "1.1.2"
966
904
  },
967
905
  "node_modules/get-intrinsic": {
968
- "version": "1.2.1",
906
+ "version": "1.2.2",
969
907
  "dependencies": {
970
- "function-bind": "^1.1.1",
971
- "has": "^1.0.3",
908
+ "function-bind": "^1.1.2",
972
909
  "has-proto": "^1.0.1",
973
- "has-symbols": "^1.0.3"
910
+ "has-symbols": "^1.0.3",
911
+ "hasown": "^2.0.0"
974
912
  }
975
913
  },
976
914
  "node_modules/gopd": {
@@ -979,16 +917,10 @@
979
917
  "get-intrinsic": "^1.1.3"
980
918
  }
981
919
  },
982
- "node_modules/has": {
983
- "version": "1.0.4",
984
- "engines": {
985
- "node": ">= 0.4.0"
986
- }
987
- },
988
920
  "node_modules/has-property-descriptors": {
989
- "version": "1.0.0",
921
+ "version": "1.0.1",
990
922
  "dependencies": {
991
- "get-intrinsic": "^1.1.1"
923
+ "get-intrinsic": "^1.2.2"
992
924
  }
993
925
  },
994
926
  "node_modules/has-proto": {
@@ -1003,10 +935,19 @@
1003
935
  "node": ">= 0.4"
1004
936
  }
1005
937
  },
938
+ "node_modules/hasown": {
939
+ "version": "2.0.0",
940
+ "dependencies": {
941
+ "function-bind": "^1.1.2"
942
+ },
943
+ "engines": {
944
+ "node": ">= 0.4"
945
+ }
946
+ },
1006
947
  "node_modules/hdb": {
1007
- "version": "0.12.1",
948
+ "version": "0.19.7",
1008
949
  "dependencies": {
1009
- "iconv-lite": "^0.4.15"
950
+ "iconv-lite": "^0.4.18"
1010
951
  },
1011
952
  "engines": {
1012
953
  "node": ">= 0.12"
@@ -1192,16 +1133,16 @@
1192
1133
  "version": "1.1.0"
1193
1134
  },
1194
1135
  "node_modules/node-cache": {
1195
- "version": "5.1.0",
1136
+ "version": "5.1.2",
1196
1137
  "dependencies": {
1197
1138
  "clone": "2.x"
1198
1139
  },
1199
1140
  "engines": {
1200
- "node": ">= 0.4.6"
1141
+ "node": ">= 8.0.0"
1201
1142
  }
1202
1143
  },
1203
1144
  "node_modules/node-fetch": {
1204
- "version": "2.6.7",
1145
+ "version": "2.7.0",
1205
1146
  "dependencies": {
1206
1147
  "whatwg-url": "^5.0.0"
1207
1148
  },
@@ -1528,9 +1469,6 @@
1528
1469
  "uuid": "dist/bin/uuid"
1529
1470
  }
1530
1471
  },
1531
- "node_modules/valid-url": {
1532
- "version": "1.0.9"
1533
- },
1534
1472
  "node_modules/vary": {
1535
1473
  "version": "1.1.2",
1536
1474
  "engines": {
@@ -1586,23 +1524,23 @@
1586
1524
  },
1587
1525
  "dependencies": {
1588
1526
  "@sap/audit-logging": {
1589
- "version": "5.7.2",
1527
+ "version": "5.8.2",
1590
1528
  "requires": {
1591
- "@sap/xssec": "^3.3.5",
1529
+ "@sap/xssec": "^3.6.0",
1592
1530
  "debug": "4.3.4",
1593
1531
  "fetch-retry": "4.1.0",
1594
- "node-cache": "5.1.0",
1595
- "node-fetch": "2.6.7"
1532
+ "node-cache": "5.1.2",
1533
+ "node-fetch": "2.7.0"
1596
1534
  }
1597
1535
  },
1598
1536
  "@sap/e2e-trace": {
1599
- "version": "3.2.0",
1537
+ "version": "4.1.0",
1600
1538
  "requires": {
1601
1539
  "request-stats": "3.0.0"
1602
1540
  }
1603
1541
  },
1604
1542
  "@sap/hana-client": {
1605
- "version": "2.18.24",
1543
+ "version": "2.19.18",
1606
1544
  "requires": {
1607
1545
  "debug": "3.1.0"
1608
1546
  },
@@ -1619,10 +1557,10 @@
1619
1557
  }
1620
1558
  },
1621
1559
  "@sap/hdbext": {
1622
- "version": "8.0.0",
1560
+ "version": "8.0.2",
1623
1561
  "requires": {
1624
- "@sap/e2e-trace": "^3.1.0",
1625
- "@sap/hana-client": "2.17.21",
1562
+ "@sap/e2e-trace": "^4.1.0",
1563
+ "@sap/hana-client": "2.18.27",
1626
1564
  "accept-language": "2.0.16",
1627
1565
  "async": "3.2.2",
1628
1566
  "debug": "4.3.1",
@@ -1631,7 +1569,7 @@
1631
1569
  },
1632
1570
  "dependencies": {
1633
1571
  "@sap/hana-client": {
1634
- "version": "2.17.21",
1572
+ "version": "2.18.27",
1635
1573
  "requires": {
1636
1574
  "debug": "3.1.0"
1637
1575
  },
@@ -1656,9 +1594,9 @@
1656
1594
  }
1657
1595
  },
1658
1596
  "@sap/instance-manager": {
1659
- "version": "3.5.3",
1597
+ "version": "4.2.0",
1660
1598
  "requires": {
1661
- "@sap/xssec": "^3.2.15",
1599
+ "@sap/xssec": "^3.6.0",
1662
1600
  "clone": "2.1.1",
1663
1601
  "debug": "4.3.3",
1664
1602
  "lru-cache": "4.1.1",
@@ -1671,43 +1609,40 @@
1671
1609
  "requires": {
1672
1610
  "ms": "2.1.2"
1673
1611
  }
1612
+ },
1613
+ "node-fetch": {
1614
+ "version": "2.6.7",
1615
+ "requires": {
1616
+ "whatwg-url": "^5.0.0"
1617
+ }
1674
1618
  }
1675
1619
  }
1676
1620
  },
1677
1621
  "@sap/jobs-client": {
1678
- "version": "1.7.47",
1622
+ "version": "1.8.1",
1679
1623
  "requires": {
1680
- "@sap/xsenv": "3.4.0"
1624
+ "@sap/xsenv": "4.2.0"
1681
1625
  }
1682
1626
  },
1683
1627
  "@sap/logging": {
1684
- "version": "6.2.0",
1628
+ "version": "7.1.0",
1685
1629
  "requires": {
1686
- "@sap/e2e-trace": "^3.1.0",
1630
+ "@sap/e2e-trace": "^4.1.0",
1687
1631
  "lodash": "4.17.21",
1688
1632
  "moment": "2.29.4"
1689
1633
  }
1690
1634
  },
1691
1635
  "@sap/node-jwt": {
1692
- "version": "1.6.20"
1636
+ "version": "1.6.21"
1693
1637
  },
1694
1638
  "@sap/node-vsi": {
1695
- "version": "1.4.24"
1696
- },
1697
- "@sap/textanalysis": {
1698
- "version": "1.1.0"
1639
+ "version": "1.4.25"
1699
1640
  },
1700
1641
  "@sap/textbundle": {
1701
- "version": "3.1.0"
1702
- },
1703
- "@sap/textmining": {
1704
- "version": "1.1.6",
1705
- "requires": {
1706
- "hdb": "0.12.1"
1707
- }
1642
+ "version": "4.3.0"
1708
1643
  },
1709
1644
  "@sap/xsenv": {
1710
- "version": "3.4.0",
1645
+ "version": "4.2.0",
1711
1646
  "requires": {
1712
1647
  "debug": "4.3.3",
1713
1648
  "node-cache": "^5.1.0",
@@ -1723,48 +1658,31 @@
1723
1658
  }
1724
1659
  },
1725
1660
  "@sap/xsodata": {
1726
- "version": "8.1.0",
1661
+ "version": "8.1.2",
1727
1662
  "requires": {
1728
- "@sap/xsenv": "3.4.0",
1729
- "@sap/xssec": "3.2.17",
1730
- "async": "3.2.4",
1663
+ "@sap/xsenv": "4.2.0",
1664
+ "@sap/xssec": "3.6.0",
1665
+ "async": "3.2.5",
1731
1666
  "big.js": "6.2.1",
1732
- "body-parser": "1.20.1",
1733
- "hdb": "0.19.5",
1667
+ "body-parser": "1.20.2",
1668
+ "hdb": "0.19.7",
1734
1669
  "lodash": "4.17.21",
1735
1670
  "negotiator": "0.6.3",
1736
1671
  "rwlock": "5.0.0",
1737
1672
  "xml-writer": "1.7.0"
1738
1673
  },
1739
1674
  "dependencies": {
1740
- "@sap/xssec": {
1741
- "version": "3.2.17",
1742
- "requires": {
1743
- "axios": "^0.26.0",
1744
- "debug": "^4.3.2",
1745
- "jsonwebtoken": "^9.0.0",
1746
- "lru-cache": "^6.0.0",
1747
- "node-rsa": "^1.1.1",
1748
- "valid-url": "1.0.9"
1749
- }
1750
- },
1751
1675
  "async": {
1752
- "version": "3.2.4"
1753
- },
1754
- "axios": {
1755
- "version": "0.26.1",
1756
- "requires": {
1757
- "follow-redirects": "^1.14.8"
1758
- }
1676
+ "version": "3.2.5"
1759
1677
  },
1760
1678
  "big.js": {
1761
1679
  "version": "6.2.1"
1762
1680
  },
1763
1681
  "body-parser": {
1764
- "version": "1.20.1",
1682
+ "version": "1.20.2",
1765
1683
  "requires": {
1766
1684
  "bytes": "3.1.2",
1767
- "content-type": "~1.0.4",
1685
+ "content-type": "~1.0.5",
1768
1686
  "debug": "2.6.9",
1769
1687
  "depd": "2.0.0",
1770
1688
  "destroy": "1.2.0",
@@ -1772,31 +1690,23 @@
1772
1690
  "iconv-lite": "0.4.24",
1773
1691
  "on-finished": "2.4.1",
1774
1692
  "qs": "6.11.0",
1775
- "raw-body": "2.5.1",
1693
+ "raw-body": "2.5.2",
1776
1694
  "type-is": "~1.6.18",
1777
1695
  "unpipe": "1.0.0"
1778
- },
1779
- "dependencies": {
1780
- "debug": {
1781
- "version": "2.6.9",
1782
- "requires": {
1783
- "ms": "2.0.0"
1784
- }
1785
- }
1786
1696
  }
1787
1697
  },
1788
1698
  "content-type": {
1789
1699
  "version": "1.0.5"
1790
1700
  },
1791
- "depd": {
1792
- "version": "2.0.0"
1793
- },
1794
- "hdb": {
1795
- "version": "0.19.5",
1701
+ "debug": {
1702
+ "version": "2.6.9",
1796
1703
  "requires": {
1797
- "iconv-lite": "^0.4.18"
1704
+ "ms": "2.0.0"
1798
1705
  }
1799
1706
  },
1707
+ "depd": {
1708
+ "version": "2.0.0"
1709
+ },
1800
1710
  "http-errors": {
1801
1711
  "version": "2.0.0",
1802
1712
  "requires": {
@@ -1807,12 +1717,6 @@
1807
1717
  "toidentifier": "1.0.1"
1808
1718
  }
1809
1719
  },
1810
- "lru-cache": {
1811
- "version": "6.0.0",
1812
- "requires": {
1813
- "yallist": "^4.0.0"
1814
- }
1815
- },
1816
1720
  "ms": {
1817
1721
  "version": "2.0.0"
1818
1722
  },
@@ -1829,7 +1733,7 @@
1829
1733
  }
1830
1734
  },
1831
1735
  "raw-body": {
1832
- "version": "2.5.1",
1736
+ "version": "2.5.2",
1833
1737
  "requires": {
1834
1738
  "bytes": "3.1.2",
1835
1739
  "http-errors": "2.0.0",
@@ -1839,41 +1743,19 @@
1839
1743
  },
1840
1744
  "statuses": {
1841
1745
  "version": "2.0.1"
1842
- },
1843
- "yallist": {
1844
- "version": "4.0.0"
1845
1746
  }
1846
1747
  }
1847
1748
  },
1848
1749
  "@sap/xss-secure": {
1849
- "version": "4.2.0"
1750
+ "version": "4.3.0"
1850
1751
  },
1851
1752
  "@sap/xssec": {
1852
- "version": "3.3.5",
1753
+ "version": "3.6.0",
1853
1754
  "requires": {
1854
- "axios": "^0.26.0",
1855
- "debug": "^4.3.2",
1755
+ "axios": "^1.6",
1756
+ "debug": "^4.3.4",
1856
1757
  "jsonwebtoken": "^9.0.2",
1857
- "lru-cache": "^6.0.0",
1858
- "node-rsa": "^1.1.1",
1859
- "valid-url": "1.0.9"
1860
- },
1861
- "dependencies": {
1862
- "axios": {
1863
- "version": "0.26.1",
1864
- "requires": {
1865
- "follow-redirects": "^1.14.8"
1866
- }
1867
- },
1868
- "lru-cache": {
1869
- "version": "6.0.0",
1870
- "requires": {
1871
- "yallist": "^4.0.0"
1872
- }
1873
- },
1874
- "yallist": {
1875
- "version": "4.0.0"
1876
- }
1758
+ "node-rsa": "^1.1.1"
1877
1759
  }
1878
1760
  },
1879
1761
  "accept-language": {
@@ -1908,7 +1790,7 @@
1908
1790
  "version": "0.4.0"
1909
1791
  },
1910
1792
  "axios": {
1911
- "version": "1.5.1",
1793
+ "version": "1.6.2",
1912
1794
  "requires": {
1913
1795
  "follow-redirects": "^1.15.0",
1914
1796
  "form-data": "^4.0.0",
@@ -2262,12 +2144,12 @@
2262
2144
  "version": "1.1.2"
2263
2145
  },
2264
2146
  "get-intrinsic": {
2265
- "version": "1.2.1",
2147
+ "version": "1.2.2",
2266
2148
  "requires": {
2267
- "function-bind": "^1.1.1",
2268
- "has": "^1.0.3",
2149
+ "function-bind": "^1.1.2",
2269
2150
  "has-proto": "^1.0.1",
2270
- "has-symbols": "^1.0.3"
2151
+ "has-symbols": "^1.0.3",
2152
+ "hasown": "^2.0.0"
2271
2153
  }
2272
2154
  },
2273
2155
  "gopd": {
@@ -2276,13 +2158,10 @@
2276
2158
  "get-intrinsic": "^1.1.3"
2277
2159
  }
2278
2160
  },
2279
- "has": {
2280
- "version": "1.0.4"
2281
- },
2282
2161
  "has-property-descriptors": {
2283
- "version": "1.0.0",
2162
+ "version": "1.0.1",
2284
2163
  "requires": {
2285
- "get-intrinsic": "^1.1.1"
2164
+ "get-intrinsic": "^1.2.2"
2286
2165
  }
2287
2166
  },
2288
2167
  "has-proto": {
@@ -2291,10 +2170,16 @@
2291
2170
  "has-symbols": {
2292
2171
  "version": "1.0.3"
2293
2172
  },
2173
+ "hasown": {
2174
+ "version": "2.0.0",
2175
+ "requires": {
2176
+ "function-bind": "^1.1.2"
2177
+ }
2178
+ },
2294
2179
  "hdb": {
2295
- "version": "0.12.1",
2180
+ "version": "0.19.7",
2296
2181
  "requires": {
2297
- "iconv-lite": "^0.4.15"
2182
+ "iconv-lite": "^0.4.18"
2298
2183
  }
2299
2184
  },
2300
2185
  "http-errors": {
@@ -2438,13 +2323,13 @@
2438
2323
  "version": "1.1.0"
2439
2324
  },
2440
2325
  "node-cache": {
2441
- "version": "5.1.0",
2326
+ "version": "5.1.2",
2442
2327
  "requires": {
2443
2328
  "clone": "2.x"
2444
2329
  }
2445
2330
  },
2446
2331
  "node-fetch": {
2447
- "version": "2.6.7",
2332
+ "version": "2.7.0",
2448
2333
  "requires": {
2449
2334
  "whatwg-url": "^5.0.0"
2450
2335
  }
@@ -2682,9 +2567,6 @@
2682
2567
  "uuid": {
2683
2568
  "version": "7.0.0"
2684
2569
  },
2685
- "valid-url": {
2686
- "version": "1.0.9"
2687
- },
2688
2570
  "vary": {
2689
2571
  "version": "1.1.2"
2690
2572
  },
package/package.json CHANGED
@@ -1,27 +1,25 @@
1
1
  {
2
2
  "name": "@sap/async-xsjs",
3
3
  "description": "Compatibility layer to run XS Classic applications on XS Advanced",
4
- "version": "1.0.8",
4
+ "version": "2.0.0",
5
5
  "repository": {},
6
6
  "license": "SEE LICENSE IN LICENSE file",
7
7
  "main": "./lib",
8
8
  "dependencies": {
9
9
  "@sap/audit-logging": "^5.7.1",
10
- "@sap/e2e-trace": "^3.2.0",
11
- "@sap/hana-client": "^2.18.24",
12
- "@sap/hdbext": "^8.0.0",
13
- "@sap/instance-manager": "^3.5.3",
14
- "@sap/jobs-client": "^1.7.43",
15
- "@sap/logging": "^6.2.0",
16
- "@sap/node-jwt": "^1.6.14",
17
- "@sap/node-vsi": "^1.4.21",
18
- "@sap/textanalysis": "~1.1.0",
19
- "@sap/textbundle": "^3.1.0",
20
- "@sap/textmining": "~1.1.6",
21
- "@sap/xsenv": "^3.4.0",
22
- "@sap/xsodata": "^8.0.2",
23
- "@sap/xss-secure": "^4.1.0",
24
- "@sap/xssec": "^3.3.5",
10
+ "@sap/e2e-trace": "^4.1.0",
11
+ "@sap/hana-client": "^2.19.18",
12
+ "@sap/hdbext": "^8.0.2",
13
+ "@sap/instance-manager": "^4.1.0",
14
+ "@sap/jobs-client": "^1.8.1",
15
+ "@sap/logging": "^7.1.0",
16
+ "@sap/node-jwt": "^1.6.21",
17
+ "@sap/node-vsi": "^1.4.25",
18
+ "@sap/textbundle": "^4.3.0",
19
+ "@sap/xsenv": "^4.2.0",
20
+ "@sap/xsodata": "^8.1.2",
21
+ "@sap/xss-secure": "^4.3.0",
22
+ "@sap/xssec": "^3.6.0",
25
23
  "accept-language": "2.0.16",
26
24
  "big.js": "5.0.2",
27
25
  "body-parser": "1.19.2",
@@ -43,10 +41,10 @@
43
41
  "verror": "1.10.0",
44
42
  "yauzl": "2.6.0",
45
43
  "yazl": "2.4.1",
46
- "axios": "^1.3.5"
44
+ "axios": "^1.6.2"
47
45
  },
48
46
  "engines": {
49
- "node": "^16.x || ^18.x"
47
+ "node": "^18.x || ^20.x"
50
48
  },
51
49
  "files": [
52
50
  "lib",
@@ -1,128 +0,0 @@
1
- 'use strict';
2
-
3
- var ta = require('@sap/textanalysis');
4
- var bufferUtils = require('../../../utils/buffer-utils');
5
-
6
- module.exports = Session;
7
-
8
- function Session($db, params) {
9
- this.configuration = params.configuration;
10
- this.client = (async () => { await $db.getConnection()._client; })();
11
- this.schema = $db._dbReqOptions._globalOptions.schema;
12
- }
13
-
14
- Session.prototype.analyze = async function (params) {
15
- return await analyze(this, params);
16
- };
17
-
18
- function analyze(session, params) {
19
- var values = normalizeInput(params);
20
- values.CONFIGURATION_SCHEMA_NAME = session.schema;
21
- values.CONFIGURATION = session.configuration;
22
- return new Promise ((resolve, reject) => {
23
-
24
- ta.analyze(values, session.client, function (err, parameters, rows) {
25
- if (err) {
26
- return reject(err);
27
- }
28
- var tokens = [], entities = [], metadata = [], grammaticalRoles = [];
29
- if (rows) {
30
- for (var i = 0; i < rows.length; i++) {
31
- var row = rows[i];
32
- if (row.RULE === 'Entity Extraction') {
33
- var entity = {
34
- id: row.COUNTER,
35
- text: row.TOKEN,
36
- normalizedForm: row.NORMALIZED,
37
- labelPath: row.TYPE,
38
- offset: row.OFFSET,
39
- paragraph: row.PARAGRAPH,
40
- sentence: row.SENTENCE,
41
- parent: row.PARENT
42
- };
43
- entities.push(entity);
44
- }
45
- else if (row.RULE === 'LXP') {
46
- var token = {
47
- token: row.TOKEN,
48
- normalizedToken: row.NORMALIZED,
49
- partOfSpeech: row.TYPE,
50
- offset: row.OFFSET,
51
- paragraph: row.PARAGRAPH,
52
- sentence: row.SENTENCE
53
- // TODO: stems
54
- };
55
- tokens.push(token);
56
- }
57
- else if (row.RULE === 'Grammatical Role') {
58
- var grammaticalRoleGovernor = {
59
- id: row.PARENT,
60
- dependencyType: row.TYPE
61
- };
62
- var grammaticalRole = {
63
- id: row.COUNTER,
64
- offset: row.OFFSET,
65
- paragraph: row.PARAGRAPH,
66
- sentence: row.SENTENCE,
67
- text: row.TOKEN,
68
- governors: [grammaticalRoleGovernor]
69
- };
70
- grammaticalRoles.push(grammaticalRole);
71
- }
72
- else if (row.RULE === 'Metadata') {
73
- var meta = {
74
- id: row.COUNTER,
75
- token: row.TOKEN,
76
- tokenType: row.TYPE,
77
- offset: row.OFFSET,
78
- paragraph: row.PARAGRAPH,
79
- parent: row.PARENT
80
- };
81
- metadata.push(meta);
82
- }
83
- }
84
- }
85
- return resolve({
86
- language: parameters.LANGUAGE_CODE,
87
- mimeType: parameters.MIME_TYPE,
88
- textSize: 0, // not returned by TA_ANALYZE
89
- plaintext: parameters.PLAINTEXT,
90
- tokens: tokens,
91
- entities: entities,
92
- metadata: metadata,
93
- grammaticalRoles: grammaticalRoles
94
- });
95
- });
96
- });
97
- }
98
-
99
- function normalizeInput(params) {
100
- var mappings = {
101
- 'inputDocumentText': 'DOCUMENT_TEXT',
102
- 'language': 'LANGUAGE_CODE',
103
- 'mimeType': 'MIME_TYPE',
104
- 'tokenSeparators': 'TOKEN_SEPARATORS',
105
- 'languageDetection': 'LANGUAGE_DETECTION'
106
- };
107
-
108
- var values = {
109
- RETURN_PLAINTEXT: params.includePlainText ? 1 : 0
110
- };
111
-
112
- Object.keys(mappings).forEach(function (xscProp) {
113
- if (params.hasOwnProperty(xscProp) && params[xscProp] !== undefined) {
114
- var prop = mappings[xscProp];
115
- values[prop] = params[xscProp];
116
- }
117
- });
118
-
119
- if (params.inputDocumentBinaryContent) {
120
- values.DOCUMENT_BINARY = extractBinary(params.inputDocumentBinaryContent);
121
- }
122
-
123
- return values;
124
- }
125
-
126
- function extractBinary(binContent) {
127
- return bufferUtils.isBinary(binContent) ? bufferUtils.toBuffer(binContent) : Buffer.from(binContent);
128
- }
@@ -1,30 +0,0 @@
1
- 'use strict';
2
-
3
- var MiningSession = require('./mining/Session');
4
- var AnalysisSession = require('./analysis/Session');
5
-
6
- exports.create = createTextObject;
7
-
8
-
9
- function createTextObject($db) {
10
- return {
11
- mining: createMiningObject($db),
12
- analysis: createAnalysisObject($db)
13
- };
14
- }
15
-
16
- function createMiningObject($db) {
17
- return {
18
- Session: function (params) {
19
- return new MiningSession($db, params);
20
- }
21
- };
22
- }
23
-
24
- function createAnalysisObject($db) {
25
- return {
26
- Session: function (params) {
27
- return new AnalysisSession($db, params);
28
- }
29
- };
30
- }
@@ -1,82 +0,0 @@
1
- 'use strict';
2
-
3
- var textmining = require('@sap/textmining');
4
-
5
- module.exports = Session;
6
-
7
- function Session($db, params) {
8
- this._tm = new textmining({
9
- client: async () => { await determineClient($db, params); },
10
- referenceTable: params.referenceTable,
11
- referenceColumn: params.referenceColumn
12
- });
13
- }
14
-
15
- Session.prototype.categorizeKNN = function (params) {
16
- return new Promise ((resolve, reject) => {
17
- this._tm.categorizeKNN(params, function(err, result) {
18
- if (err) { return reject(err);}
19
- resolve(result);
20
- });
21
- });
22
- };
23
-
24
- Session.prototype.getRelatedDocuments = function (params) {
25
- return new Promise ((resolve, reject) => {
26
- this._tm.getRelatedDocuments(params, function(err, result) {
27
- if (err) { return reject(err);}
28
- resolve(result);
29
- });
30
- });
31
- };
32
-
33
- Session.prototype.getRelatedTerms = function (params) {
34
- return new Promise ((resolve, reject) => {
35
- this._tm.getRelatedTerms(params, function(err, result) {
36
- if (err) { return reject(err);}
37
- resolve(result);
38
- });
39
- });
40
- };
41
-
42
- Session.prototype.getRelevantTerms = function (params) {
43
- return new Promise ((resolve, reject) => {
44
- this._tm.getRelevantTerms(params, function(err, result) {
45
- if (err) { return reject(err);}
46
- resolve(result);
47
- });
48
- });
49
- };
50
-
51
- Session.prototype.getRelevantDocuments = function (params) {
52
- return new Promise ((resolve, reject) => {
53
- this._tm.getRelevantDocuments(params, function(err, result) {
54
- if (err) { return reject(err);}
55
- resolve(result);
56
- });
57
- });
58
- };
59
-
60
- Session.prototype.getSuggestedTerms = function (params) {
61
- return new Promise ((resolve, reject) => {
62
- this._tm.getSuggestedTerms(params, function(err, result) {
63
- if (err) { return reject(err);}
64
- resolve(result);
65
- });
66
- });
67
- };
68
-
69
- Session.prototype.initialize = function (params) {
70
- return new Promise ((resolve, reject) => {
71
- this._tm.initialize(params, function(err, result) {
72
- if (err) { return reject(err);}
73
- resolve(result);
74
- });
75
- });
76
- };
77
-
78
- async function determineClient($db, params) {
79
- var conn = params.connection || await $db.getConnection();
80
- return conn._client;
81
- }
82
-