@sap/cds-dk 8.9.3 → 8.9.5

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
@@ -7,6 +7,20 @@ This project adheres to [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  The format is based on [Keep a Changelog](https://keepachangelog.com/).
9
9
 
10
+ ## Version 8.9.5 - 2025-06-05
11
+
12
+ ### Fixed
13
+
14
+ - Bump `tar-fs` to address CVE-2024-12905.
15
+ - `cds add data` now correctly works for nested structured properties.
16
+ - Help text of `cds debug`.
17
+
18
+ ## Version 8.9.4 - 2025-05-26
19
+
20
+ ### Changed
21
+
22
+ - `cds init` uses latest Maven Java archetype version 3.10.1 for creating Java projects.
23
+
10
24
  ## Version 8.9.3 - 2025-04-24
11
25
 
12
26
  ### Fixed
package/bin/debug.js CHANGED
@@ -15,7 +15,7 @@ module.exports = Object.assign(debug, {
15
15
  Cloud Foundry space (check with 'cf target').
16
16
  SSH access to the app is required (check with 'cf ssh-enabled').
17
17
 
18
- If no <app> is given, the app in the current working is started
18
+ If no <app> is given, the app in the current working directory is started
19
19
  (with 'cds watch --debug' for Node.js and 'mvn spring-boot:run' for Java).
20
20
 
21
21
  # OPTIONS
@@ -5,7 +5,7 @@ module.exports = {
5
5
  COMMAND_ADD: 'add',
6
6
 
7
7
  JAVA_LTS_VERSIONS: [17, 21],
8
- MAVEN_ARCHETYPE_VERSION: '3.9.1',
8
+ MAVEN_ARCHETYPE_VERSION: '3.10.1',
9
9
 
10
10
  OPTIONS: Object.freeze({
11
11
  COMPLETION: 'completion',
@@ -40,10 +40,11 @@ module.exports = async (data={}, csn, { headerOnly=false, separator=',' }={}) =>
40
40
  record.push(...Object.values(value))
41
41
  }
42
42
  else if (element.is_struct && element.type !== 'cds.Map') {
43
+ const {headers: structHeaders, records: structRecords} = resolveStruct(value, name);
43
44
  if (i === 0) {
44
- header.push(...Object.keys(value).map(structField => name + '_' + structField))
45
+ header.push(...structHeaders)
45
46
  }
46
- record.push(...Object.values(value))
47
+ record.push(...structRecords)
47
48
  }
48
49
  else {
49
50
  if (i === 0) header.push(name)
@@ -62,13 +63,28 @@ module.exports = async (data={}, csn, { headerOnly=false, separator=',' }={}) =>
62
63
 
63
64
  data[entity.name] = res
64
65
 
65
- function escape(value) {
66
- if (typeof value === 'string' && (value.includes('"') || value.includes(separator))) {
67
- return `"${value.replace(/"/g, '""')}"` // escape double quotes, then quote the value
68
- }
69
- return value
70
- }
71
66
  })
67
+ function escape(value) {
68
+ if (typeof value === 'string' && (value.includes('"') || value.includes(separator))) {
69
+ return `"${value.replace(/"/g, '""')}"` // escape double quotes, then quote the value
70
+ }
71
+ return value
72
+ }
73
+
74
+ function resolveStruct(v, prefix) {
75
+ return Object.entries(v).reduce((acc, [key, val]) => {
76
+ //structs can be within structs
77
+ if (typeof val === 'object') {
78
+ const {headers, records} = resolveStruct(val, prefix + '_' + key);
79
+ acc.headers = acc.headers.concat(headers);
80
+ acc.records = acc.records.concat(records);
81
+ } else {
82
+ acc.headers.push(prefix + '_' + key);
83
+ acc.records.push(val);
84
+ }
85
+ return acc;
86
+ }, {headers: [], records: []});
87
+ }
72
88
  }
73
89
  return data
74
90
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "8.9.3",
3
+ "version": "8.9.5",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@sap/cds-dk",
9
- "version": "8.9.3",
9
+ "version": "8.9.5",
10
10
  "license": "SEE LICENSE IN LICENSE",
11
11
  "dependencies": {
12
12
  "@cap-js/asyncapi": "^1.0.0",
@@ -43,19 +43,19 @@
43
43
  }
44
44
  },
45
45
  "node_modules/@cap-js/db-service": {
46
- "version": "1.20.0",
46
+ "version": "1.20.2",
47
47
  "license": "SEE LICENSE",
48
48
  "optional": true,
49
49
  "dependencies": {
50
50
  "generic-pool": "^3.9.0"
51
51
  },
52
52
  "peerDependencies": {
53
- "@sap/cds": ">=7.9"
53
+ "@sap/cds": ">=7.9 <9"
54
54
  }
55
55
  },
56
56
  "node_modules/@cap-js/openapi": {
57
- "version": "1.2.1",
58
- "license": "SEE LICENSE IN LICENSE",
57
+ "version": "1.2.3",
58
+ "license": "Apache-2.0",
59
59
  "dependencies": {
60
60
  "pluralize": "^8.0.0"
61
61
  },
@@ -64,7 +64,7 @@
64
64
  }
65
65
  },
66
66
  "node_modules/@cap-js/sqlite": {
67
- "version": "1.11.0",
67
+ "version": "1.11.1",
68
68
  "license": "SEE LICENSE",
69
69
  "optional": true,
70
70
  "dependencies": {
@@ -72,11 +72,11 @@
72
72
  "better-sqlite3": "^11.0.0"
73
73
  },
74
74
  "peerDependencies": {
75
- "@sap/cds": ">=7.6"
75
+ "@sap/cds": ">=7.6 <9"
76
76
  }
77
77
  },
78
78
  "node_modules/@eslint-community/eslint-utils": {
79
- "version": "4.6.1",
79
+ "version": "4.7.0",
80
80
  "license": "MIT",
81
81
  "dependencies": {
82
82
  "eslint-visitor-keys": "^3.4.3"
@@ -121,14 +121,14 @@
121
121
  }
122
122
  },
123
123
  "node_modules/@eslint/config-helpers": {
124
- "version": "0.2.1",
124
+ "version": "0.2.2",
125
125
  "license": "Apache-2.0",
126
126
  "engines": {
127
127
  "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
128
128
  }
129
129
  },
130
130
  "node_modules/@eslint/core": {
131
- "version": "0.13.0",
131
+ "version": "0.14.0",
132
132
  "license": "Apache-2.0",
133
133
  "dependencies": {
134
134
  "@types/json-schema": "^7.0.15"
@@ -159,10 +159,13 @@
159
159
  }
160
160
  },
161
161
  "node_modules/@eslint/js": {
162
- "version": "9.25.1",
162
+ "version": "9.28.0",
163
163
  "license": "MIT",
164
164
  "engines": {
165
165
  "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
166
+ },
167
+ "funding": {
168
+ "url": "https://eslint.org/donate"
166
169
  }
167
170
  },
168
171
  "node_modules/@eslint/object-schema": {
@@ -173,10 +176,10 @@
173
176
  }
174
177
  },
175
178
  "node_modules/@eslint/plugin-kit": {
176
- "version": "0.2.8",
179
+ "version": "0.3.1",
177
180
  "license": "Apache-2.0",
178
181
  "dependencies": {
179
- "@eslint/core": "^0.13.0",
182
+ "@eslint/core": "^0.14.0",
180
183
  "levn": "^0.4.1"
181
184
  },
182
185
  "engines": {
@@ -224,7 +227,7 @@
224
227
  }
225
228
  },
226
229
  "node_modules/@humanwhocodes/retry": {
227
- "version": "0.4.2",
230
+ "version": "0.4.3",
228
231
  "license": "Apache-2.0",
229
232
  "engines": {
230
233
  "node": ">=18.18"
@@ -235,10 +238,10 @@
235
238
  }
236
239
  },
237
240
  "node_modules/@sap/cds": {
238
- "version": "8.9.2",
241
+ "version": "8.9.4",
239
242
  "license": "SEE LICENSE IN LICENSE",
240
243
  "dependencies": {
241
- "@sap/cds-compiler": ">=5.1",
244
+ "@sap/cds-compiler": "^5",
242
245
  "@sap/cds-fiori": "^1",
243
246
  "@sap/cds-foss": "^5.0.0"
244
247
  },
@@ -265,7 +268,7 @@
265
268
  }
266
269
  },
267
270
  "node_modules/@sap/cds-compiler": {
268
- "version": "5.9.2",
271
+ "version": "5.9.4",
269
272
  "license": "SEE LICENSE IN LICENSE",
270
273
  "dependencies": {
271
274
  "antlr4": "4.9.3"
@@ -376,7 +379,7 @@
376
379
  }
377
380
  },
378
381
  "node_modules/@sap/xsenv": {
379
- "version": "5.5.0",
382
+ "version": "5.6.1",
380
383
  "license": "SEE LICENSE IN LICENSE file",
381
384
  "dependencies": {
382
385
  "debug": "4.4.0",
@@ -481,7 +484,7 @@
481
484
  "license": "MIT"
482
485
  },
483
486
  "node_modules/axios": {
484
- "version": "1.8.4",
487
+ "version": "1.9.0",
485
488
  "license": "MIT",
486
489
  "dependencies": {
487
490
  "follow-redirects": "^1.15.6",
@@ -513,7 +516,7 @@
513
516
  "optional": true
514
517
  },
515
518
  "node_modules/better-sqlite3": {
516
- "version": "11.9.1",
519
+ "version": "11.10.0",
517
520
  "hasInstallScript": true,
518
521
  "license": "MIT",
519
522
  "optional": true,
@@ -926,17 +929,17 @@
926
929
  }
927
930
  },
928
931
  "node_modules/eslint": {
929
- "version": "9.25.1",
932
+ "version": "9.28.0",
930
933
  "license": "MIT",
931
934
  "dependencies": {
932
935
  "@eslint-community/eslint-utils": "^4.2.0",
933
936
  "@eslint-community/regexpp": "^4.12.1",
934
937
  "@eslint/config-array": "^0.20.0",
935
938
  "@eslint/config-helpers": "^0.2.1",
936
- "@eslint/core": "^0.13.0",
939
+ "@eslint/core": "^0.14.0",
937
940
  "@eslint/eslintrc": "^3.3.1",
938
- "@eslint/js": "9.25.1",
939
- "@eslint/plugin-kit": "^0.2.8",
941
+ "@eslint/js": "9.28.0",
942
+ "@eslint/plugin-kit": "^0.3.1",
940
943
  "@humanfs/node": "^0.16.6",
941
944
  "@humanwhocodes/module-importer": "^1.0.1",
942
945
  "@humanwhocodes/retry": "^0.4.2",
@@ -1734,7 +1737,7 @@
1734
1737
  "license": "MIT"
1735
1738
  },
1736
1739
  "node_modules/node-abi": {
1737
- "version": "3.74.0",
1740
+ "version": "3.75.0",
1738
1741
  "license": "MIT",
1739
1742
  "optional": true,
1740
1743
  "dependencies": {
@@ -2047,7 +2050,7 @@
2047
2050
  "license": "ISC"
2048
2051
  },
2049
2052
  "node_modules/semver": {
2050
- "version": "7.7.1",
2053
+ "version": "7.7.2",
2051
2054
  "license": "ISC",
2052
2055
  "bin": {
2053
2056
  "semver": "bin/semver.js"
@@ -2280,7 +2283,7 @@
2280
2283
  }
2281
2284
  },
2282
2285
  "node_modules/tar-fs": {
2283
- "version": "2.1.2",
2286
+ "version": "2.1.3",
2284
2287
  "license": "MIT",
2285
2288
  "optional": true,
2286
2289
  "dependencies": {
@@ -2440,7 +2443,7 @@
2440
2443
  "optional": true
2441
2444
  },
2442
2445
  "node_modules/ws": {
2443
- "version": "8.18.1",
2446
+ "version": "8.18.2",
2444
2447
  "license": "MIT",
2445
2448
  "engines": {
2446
2449
  "node": ">=10.0.0"
@@ -2476,13 +2479,13 @@
2476
2479
  }
2477
2480
  },
2478
2481
  "node_modules/yaml": {
2479
- "version": "2.7.1",
2482
+ "version": "2.8.0",
2480
2483
  "license": "ISC",
2481
2484
  "bin": {
2482
2485
  "yaml": "bin.mjs"
2483
2486
  },
2484
2487
  "engines": {
2485
- "node": ">= 14"
2488
+ "node": ">= 14.6"
2486
2489
  }
2487
2490
  },
2488
2491
  "node_modules/yocto-queue": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "8.9.3",
3
+ "version": "8.9.5",
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": [