@sap/cds-dk 6.5.0 → 6.5.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 +21 -0
- package/bin/deploy/index.js +6 -5
- package/bin/migrate.js +5 -2
- package/lib/init/constants.js +1 -1
- package/npm-shrinkwrap.json +445 -532
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,27 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
The format is based on [Keep a Changelog](http://keepachangelog.com/).
|
|
9
9
|
|
|
10
|
+
## Version 6.5.2 - 2023-02-10
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- New versions of `@sap/cds-mtxs` and `@sap/cds-compiler`
|
|
15
|
+
- `cds init` uses latest Maven Java archetype version 1.31.1 for creating Java projects.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- `cds migrate` no longer fails because of authorization error
|
|
20
|
+
|
|
21
|
+
## Version 6.5.1 - 2023-02-06
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- `cds init` uses latest Maven Java archetype version 1.31.0 for creating Java projects.
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- `cds deploy` no longer fails to write to a `package.json` file that has no `cds` section
|
|
30
|
+
|
|
10
31
|
## Version 6.5.0 - 2023-01-27
|
|
11
32
|
|
|
12
33
|
### Added
|
package/bin/deploy/index.js
CHANGED
|
@@ -110,16 +110,17 @@ async function deploy (_model, options) { // NOSONAR
|
|
|
110
110
|
async function update_package_json (kind, model, database) {
|
|
111
111
|
const { fs, path, isfile } = cds.utils
|
|
112
112
|
const { readFile, writeFile } = fs.promises
|
|
113
|
-
const package_json = path.resolve ('package.json'), exists = isfile (package_json)
|
|
113
|
+
const package_json = path.resolve (cds.root, 'package.json'), exists = isfile (package_json)
|
|
114
114
|
const conf = exists ? JSON.parse (await readFile (package_json)) : {}
|
|
115
|
-
|
|
116
|
-
const
|
|
115
|
+
conf.cds?.requires || (conf.cds = {requires: {}})
|
|
116
|
+
const requires = conf.cds.requires
|
|
117
|
+
const { schema_evolution } = requires.db ?? {}
|
|
117
118
|
requires.db = cds.env.requires.db = { kind, model }
|
|
118
119
|
if (database) requires.db.credentials = { database }
|
|
119
120
|
else if (kind === 'sqlite') requires.db.credentials = { database:'db.sqlite' }
|
|
120
121
|
if (schema_evolution) requires.db.schema_evolution = schema_evolution
|
|
121
|
-
await writeFile (package_json, JSON.stringify(conf,null,
|
|
122
|
-
console.log (`/> ${ exists ? 'updated' : 'created' }
|
|
122
|
+
await writeFile (package_json, JSON.stringify(conf,null,2))
|
|
123
|
+
console.log (`/> ${ exists ? 'updated' : 'created' } .${path.sep}package_json`)
|
|
123
124
|
}
|
|
124
125
|
|
|
125
126
|
/* eslint no-console: off */
|
package/bin/migrate.js
CHANGED
|
@@ -44,10 +44,13 @@ module.exports = Object.assign(migrate, {
|
|
|
44
44
|
# SEE ALSO
|
|
45
45
|
`})
|
|
46
46
|
|
|
47
|
-
|
|
48
47
|
async function migrate (param, options = {}) {
|
|
49
48
|
// eslint-disable-next-line cds-dk/no-missing-dependencies
|
|
50
|
-
await require('@sap/cds-mtxs/bin/cds-mtx-migrate').run(param[0], options)
|
|
49
|
+
await require(_local('@sap/cds-mtxs/bin/cds-mtx-migrate')).run(param[0], options)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function _local (id) {
|
|
53
|
+
return require.resolve (id, { paths: [ process.cwd(), __dirname ] })
|
|
51
54
|
}
|
|
52
55
|
|
|
53
56
|
/* eslint no-console: off */
|