@sap/cds-dk 4.6.3 → 4.6.4
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 +11 -0
- package/lib/import/index.js +3 -2
- package/lib/import/v2parser.js +1 -0
- package/lib/init/constants.js +1 -1
- package/npm-shrinkwrap.json +194 -444
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,17 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
6
6
|
|
|
7
7
|
The format is based on [Keep a Changelog](http://keepachangelog.com/).
|
|
8
8
|
|
|
9
|
+
## Version 4.6.4 - 2021-11-24
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- `cds import` fix for TypeError issue during OData V2 EDMX conversion to CSN.
|
|
14
|
+
- `cds import <file_name>` fix now updates the service name in the `package.json` with only the file name. Earlier, the service name sometimes used to be of the form `A.B`, with `A` being file name and `B` being a part of the schema namespace value in the EDMX file
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- `cds init` uses latest `Maven Java archetype` version `1.20.3` for creating Java projects.
|
|
19
|
+
|
|
9
20
|
## Version 4.6.3 - 2021-11-16
|
|
10
21
|
|
|
11
22
|
### Fixed
|
package/lib/import/index.js
CHANGED
|
@@ -130,12 +130,13 @@ function _convertEDMXWithMultipleSchemas(edmx, multipleSchemas, namespace) {
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
async function edmx2csn(edmx, filename, context) {
|
|
133
|
-
const result = edmx.match(/EntityType="([
|
|
133
|
+
const result = edmx.match(/EntityType="([^"]+)/);
|
|
134
134
|
const multipleSchemas = /(\s*<\/Schema>\s*<Schema [^>]*>)\s*/m;
|
|
135
135
|
if (!result) {
|
|
136
136
|
throw new Error(messages.MISSING_ENTITIES);
|
|
137
137
|
}
|
|
138
|
-
const
|
|
138
|
+
const index = result[1].lastIndexOf(".");
|
|
139
|
+
const namespace = (index > 0 ) ? result[1].substring(0, index) : result[1];
|
|
139
140
|
|
|
140
141
|
if (multipleSchemas.test(edmx)) {
|
|
141
142
|
edmx = _convertEDMXWithMultipleSchemas(edmx, multipleSchemas, namespace);
|
package/lib/import/v2parser.js
CHANGED
|
@@ -1400,6 +1400,7 @@ function _getEntitesWithNamesFromEntitySets(
|
|
|
1400
1400
|
: (name) => allEntities.indexOf(name) >= 0;
|
|
1401
1401
|
|
|
1402
1402
|
const getEntitySetNames = entityWithName => {
|
|
1403
|
+
if (!entityWithName.name) return false;
|
|
1403
1404
|
for (let i = 0; i < entityWithName.name.length; i++) {
|
|
1404
1405
|
if (!isNameInEntitySet(entityWithName.name[i]))
|
|
1405
1406
|
return false;
|