@sap/cds-dk 10.0.4 → 10.0.6

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.
Files changed (62) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/bin/debug.js +6 -2
  3. package/bin/export.js +1 -1
  4. package/bin/up.js +1 -1
  5. package/bin/version.js +7 -3
  6. package/bin/watch.js +1 -0
  7. package/lib/build/plugins/hana/index.js +19 -2
  8. package/lib/build/plugins/helm/files/templates/_deployment_helpers.tpl +2 -0
  9. package/lib/build/plugins/nodejs/index.js +6 -3
  10. package/lib/build/util.js +1 -1
  11. package/lib/init/projectReader.js +4 -2
  12. package/lib/init/template/ams/files/containerize.yaml.hbs +1 -0
  13. package/lib/init/template/ams/files/package.json.hbs +1 -1
  14. package/lib/init/template/approuter/files/values.yaml.hbs +9 -1
  15. package/lib/init/template/data/as-csv.js +4 -2
  16. package/lib/init/template/data/as-json.js +4 -1
  17. package/lib/init/template/github-actions/files/workflows/cf.yaml.hbs +6 -6
  18. package/lib/init/template/ias/files/values.yaml.hbs +4 -4
  19. package/lib/init/template/portal/files/values.yaml.hbs +12 -0
  20. package/lib/init/template/sample/files/app/browse/fiori-service.cds +2 -0
  21. package/lib/init/template/test/files/test/test.xs.hbs +3 -2
  22. package/lib/init/template/typer/files/xsconfig.json +1 -1
  23. package/lib/init/template/typescript/files/package.json +1 -1
  24. package/lib/init/template/xsuaa/index.js +11 -7
  25. package/lib/lint/eslintHelp.json +1 -1
  26. package/lib/watch/esm-resolve-registration.js +27 -0
  27. package/lib/watch/vite-watch.js +1 -1
  28. package/node_modules/@sap/cds/CHANGELOG.md +9 -0
  29. package/node_modules/@sap/cds/lib/env/defaults.js +1 -0
  30. package/node_modules/@sap/cds/lib/plugins.js +4 -2
  31. package/node_modules/@sap/cds/lib/srv/srv-handlers.js +1 -1
  32. package/node_modules/@sap/cds/libx/_runtime/common/Service.js +1 -1
  33. package/node_modules/@sap/cds/libx/_runtime/remote/Service.js +1 -1
  34. package/node_modules/@sap/cds/package.json +1 -1
  35. package/node_modules/@sap/cds-compiler/CHANGELOG.md +26 -0
  36. package/node_modules/@sap/cds-compiler/bin/cdsse.js +1 -1
  37. package/node_modules/@sap/cds-compiler/bin/cdsv2m.js +1 -1
  38. package/node_modules/@sap/cds-compiler/doc/IncompatibleChanges_v7.md +20 -13
  39. package/node_modules/@sap/cds-compiler/lib/base/builtins.js +4 -1
  40. package/node_modules/@sap/cds-compiler/lib/base/message-registry.js +15 -2
  41. package/node_modules/@sap/cds-compiler/lib/checks/defaultValues.js +0 -1
  42. package/node_modules/@sap/cds-compiler/lib/compiler/populate.js +1 -0
  43. package/node_modules/@sap/cds-compiler/lib/compiler/resolve.js +7 -6
  44. package/node_modules/@sap/cds-compiler/lib/compiler/tweak-assocs.js +27 -6
  45. package/node_modules/@sap/cds-compiler/lib/edm/annotations/edmJson.js +5 -0
  46. package/node_modules/@sap/cds-compiler/lib/json/from-csn.js +3 -3
  47. package/node_modules/@sap/cds-compiler/lib/json/to-csn.js +5 -4
  48. package/node_modules/@sap/cds-compiler/lib/model/csnUtils.js +13 -8
  49. package/node_modules/@sap/cds-compiler/lib/parsers/AstBuildingParser.js +14 -3
  50. package/node_modules/@sap/cds-compiler/lib/tool-lib/enrichCsn.js +1 -1
  51. package/node_modules/@sap/cds-compiler/lib/transform/db/cdsPersistence.js +3 -2
  52. package/node_modules/@sap/cds-compiler/lib/transform/db/views.js +2 -2
  53. package/node_modules/@sap/cds-compiler/lib/transform/transformUtils.js +1 -2
  54. package/node_modules/@sap/cds-compiler/package.json +1 -1
  55. package/node_modules/media-typer/README.md +15 -14
  56. package/node_modules/media-typer/index.js +0 -8
  57. package/node_modules/media-typer/package.json +16 -12
  58. package/node_modules/ws/lib/receiver.js +15 -32
  59. package/node_modules/ws/lib/websocket-server.js +4 -4
  60. package/node_modules/ws/lib/websocket.js +4 -4
  61. package/node_modules/ws/package.json +5 -1
  62. package/package.json +1 -1
@@ -77,6 +77,7 @@ class Receiver extends Writable {
77
77
 
78
78
  this._totalPayloadLength = 0;
79
79
  this._messageLength = 0;
80
+ this._numFragments = 0;
80
81
  this._fragments = [];
81
82
 
82
83
  this._errored = false;
@@ -500,6 +501,19 @@ class Receiver extends Writable {
500
501
  return;
501
502
  }
502
503
 
504
+ if (this._maxFragments > 0 && ++this._numFragments > this._maxFragments) {
505
+ const error = this.createError(
506
+ RangeError,
507
+ 'Too many message fragments',
508
+ false,
509
+ 1008,
510
+ 'WS_ERR_TOO_MANY_BUFFERED_PARTS'
511
+ );
512
+
513
+ cb(error);
514
+ return;
515
+ }
516
+
503
517
  if (this._compressed) {
504
518
  this._state = INFLATING;
505
519
  this.decompress(data, cb);
@@ -507,22 +521,6 @@ class Receiver extends Writable {
507
521
  }
508
522
 
509
523
  if (data.length) {
510
- if (
511
- this._maxFragments > 0 &&
512
- this._fragments.length >= this._maxFragments
513
- ) {
514
- const error = this.createError(
515
- RangeError,
516
- 'Too many message fragments',
517
- false,
518
- 1008,
519
- 'WS_ERR_TOO_MANY_BUFFERED_PARTS'
520
- );
521
-
522
- cb(error);
523
- return;
524
- }
525
-
526
524
  //
527
525
  // This message is not compressed so its length is the sum of the payload
528
526
  // length of all fragments.
@@ -562,22 +560,6 @@ class Receiver extends Writable {
562
560
  return;
563
561
  }
564
562
 
565
- if (
566
- this._maxFragments > 0 &&
567
- this._fragments.length >= this._maxFragments
568
- ) {
569
- const error = this.createError(
570
- RangeError,
571
- 'Too many message fragments',
572
- false,
573
- 1008,
574
- 'WS_ERR_TOO_MANY_BUFFERED_PARTS'
575
- );
576
-
577
- cb(error);
578
- return;
579
- }
580
-
581
563
  this._fragments.push(buf);
582
564
  }
583
565
 
@@ -604,6 +586,7 @@ class Receiver extends Writable {
604
586
  this._totalPayloadLength = 0;
605
587
  this._messageLength = 0;
606
588
  this._fragmented = 0;
589
+ this._numFragments = 0;
607
590
  this._fragments = [];
608
591
 
609
592
  if (this._opcode === 2) {
@@ -43,9 +43,9 @@ class WebSocketServer extends EventEmitter {
43
43
  * called
44
44
  * @param {Function} [options.handleProtocols] A hook to handle protocols
45
45
  * @param {String} [options.host] The hostname where to bind the server
46
- * @param {Number} [options.maxBufferedChunks=1048576] The maximum number of
46
+ * @param {Number} [options.maxBufferedChunks=262144] The maximum number of
47
47
  * buffered data chunks
48
- * @param {Number} [options.maxFragments=131072] The maximum number of message
48
+ * @param {Number} [options.maxFragments=16384] The maximum number of message
49
49
  * fragments
50
50
  * @param {Number} [options.maxPayload=104857600] The maximum allowed message
51
51
  * size
@@ -69,8 +69,8 @@ class WebSocketServer extends EventEmitter {
69
69
  options = {
70
70
  allowSynchronousEvents: true,
71
71
  autoPong: true,
72
- maxBufferedChunks: 1024 * 1024,
73
- maxFragments: 128 * 1024,
72
+ maxBufferedChunks: 256 * 1024,
73
+ maxFragments: 16 * 1024,
74
74
  maxPayload: 100 * 1024 * 1024,
75
75
  skipUTF8Validation: false,
76
76
  perMessageDeflate: false,
@@ -646,9 +646,9 @@ module.exports = WebSocket;
646
646
  * masking key
647
647
  * @param {Number} [options.handshakeTimeout] Timeout in milliseconds for the
648
648
  * handshake request
649
- * @param {Number} [options.maxBufferedChunks=1048576] The maximum number of
649
+ * @param {Number} [options.maxBufferedChunks=262144] The maximum number of
650
650
  * buffered data chunks
651
- * @param {Number} [options.maxFragments=131072] The maximum number of message
651
+ * @param {Number} [options.maxFragments=16384] The maximum number of message
652
652
  * fragments
653
653
  * @param {Number} [options.maxPayload=104857600] The maximum allowed message
654
654
  * size
@@ -670,8 +670,8 @@ function initAsClient(websocket, address, protocols, options) {
670
670
  autoPong: true,
671
671
  closeTimeout: CLOSE_TIMEOUT,
672
672
  protocolVersion: protocolVersions[1],
673
- maxBufferedChunks: 1024 * 1024,
674
- maxFragments: 128 * 1024,
673
+ maxBufferedChunks: 256 * 1024,
674
+ maxFragments: 16 * 1024,
675
675
  maxPayload: 100 * 1024 * 1024,
676
676
  skipUTF8Validation: false,
677
677
  perMessageDeflate: true,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ws",
3
- "version": "8.21.0",
3
+ "version": "8.21.1",
4
4
  "description": "Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js",
5
5
  "keywords": [
6
6
  "HyBi",
@@ -66,5 +66,9 @@
66
66
  "nyc": "^15.0.0",
67
67
  "prettier": "^3.0.0",
68
68
  "utf-8-validate": "^6.0.0"
69
+ },
70
+ "allowScripts": {
71
+ "bufferutil": true,
72
+ "utf-8-validate": true
69
73
  }
70
74
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "10.0.4",
3
+ "version": "10.0.6",
4
4
  "description": "Command line client and development toolkit for the SAP Cloud Application Programming Model",
5
5
  "homepage": "https://cap.cloud.sap/",
6
6
  "keywords": [