@sap/cds-dk 7.0.3 → 7.1.1
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/bin/bind.js +5 -6
- package/bin/build.js +2 -7
- package/bin/cds.js +2 -5
- package/bin/subscribe.js +4 -4
- package/bin/unsubscribe.js +4 -4
- package/bin/upgrade.js +4 -4
- package/lib/bind/cfKeyProvider.js +9 -10
- package/lib/bind/index.js +1 -3
- package/lib/build/buildTaskEngine.js +10 -22
- package/lib/build/buildTaskFactory.js +18 -27
- package/lib/build/buildTaskHandler.js +4 -7
- package/lib/build/index.js +12 -3
- package/lib/build/provider/buildTaskProviderInternal.js +23 -15
- package/lib/build/provider/fiori/index.js +4 -3
- package/lib/build/provider/java/index.js +2 -2
- package/lib/build/provider/mtx/index.js +8 -2
- package/lib/build/util.js +13 -0
- package/lib/client/activate.js +7 -7
- package/lib/client/auth_manager.js +5 -5
- package/lib/client/base_command.js +5 -5
- package/lib/client/extend.js +2 -2
- package/lib/client/helper/logging.js +7 -2
- package/lib/client/params.js +2 -3
- package/lib/client/pull.js +3 -3
- package/lib/client/push.js +3 -3
- package/lib/client/settings_manager.js +7 -8
- package/lib/client/tenant_action.js +3 -3
- package/lib/deploy/to-hana/hana.js +1 -2
- package/lib/import/common.js +3 -0
- package/lib/import/message.js +8 -2
- package/lib/import/odata/metadataconverter/MetadataConverter.js +13 -9
- package/lib/import/odata/v4parser.js +111 -107
- package/lib/init/constants.js +1 -1
- package/lib/init/index.js +24 -11
- package/lib/init/template/cf-manifest/files/manifest.yml.hbs +1 -1
- package/lib/init/template/data/index.js +2 -3
- package/lib/init/template/lint/index.js +5 -6
- package/lib/init/template/nodejs/index.js +2 -3
- package/lib/init/template/pipeline/index.js +1 -2
- package/lib/init/util/indent.js +1 -1
- package/lib/init/util/merge.js +3 -3
- package/lib/init/util/mvn.js +17 -22
- package/lib/util/cfUtil.js +1 -2
- package/npm-shrinkwrap.json +51 -53
- package/package.json +3 -2
- package/lib/client/helper/errors.js +0 -26
- package/lib/util/version.js +0 -27
package/lib/init/index.js
CHANGED
|
@@ -3,10 +3,9 @@ const path = require('path');
|
|
|
3
3
|
const term = require('../util/term');
|
|
4
4
|
|
|
5
5
|
const { OPTIONS, COMMAND_INIT, PROJECT_FILES, REGEX_PROJECT_NAME } = require('./constants')
|
|
6
|
-
const { NODEJS, JAVA, HANA, MTA,PIPELINE,
|
|
6
|
+
const { NODEJS, JAVA, HANA, MTA,PIPELINE, TINY_SAMPLE, CF_MANIFEST } = OPTIONS
|
|
7
7
|
|
|
8
8
|
const cds = require('../cds'), { exists, readdir } = cds.utils
|
|
9
|
-
const LOG = console
|
|
10
9
|
const DEBUG = /\b(y|all|cli)\b/.test(process.env.DEBUG) ? console.debug : undefined
|
|
11
10
|
|
|
12
11
|
module.exports = class CDSGenerator {
|
|
@@ -28,7 +27,7 @@ module.exports = class CDSGenerator {
|
|
|
28
27
|
|
|
29
28
|
return true;
|
|
30
29
|
} catch (err) {
|
|
31
|
-
return err
|
|
30
|
+
return err;
|
|
32
31
|
}
|
|
33
32
|
},
|
|
34
33
|
guiOptions: {
|
|
@@ -75,7 +74,7 @@ module.exports = class CDSGenerator {
|
|
|
75
74
|
description: `Add sample content to your project.`,
|
|
76
75
|
default: '',
|
|
77
76
|
choices: [
|
|
78
|
-
{ name: 'Basic Sample Files', value:
|
|
77
|
+
{ name: 'Basic Sample Files', value: TINY_SAMPLE }
|
|
79
78
|
],
|
|
80
79
|
multiple: true,
|
|
81
80
|
target: 'add',
|
|
@@ -112,7 +111,19 @@ module.exports = class CDSGenerator {
|
|
|
112
111
|
await this.stepEnd();
|
|
113
112
|
}
|
|
114
113
|
|
|
115
|
-
async stepInit(projectName) {
|
|
114
|
+
async stepInit(projectName, options) {
|
|
115
|
+
|
|
116
|
+
if (!cds.cli?.command) {
|
|
117
|
+
// called from CAP generator
|
|
118
|
+
cds.cli = {
|
|
119
|
+
command: COMMAND_INIT,
|
|
120
|
+
// keep caller independent from internal names
|
|
121
|
+
options: {
|
|
122
|
+
cwd: options.cwd,
|
|
123
|
+
add: options.add
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
116
127
|
|
|
117
128
|
this._initialize(projectName);
|
|
118
129
|
this._greetings();
|
|
@@ -133,13 +144,13 @@ module.exports = class CDSGenerator {
|
|
|
133
144
|
if (cds.cli.command === COMMAND_INIT) {
|
|
134
145
|
const relativeProjectPath = path.relative(this.cwd, cds.root)
|
|
135
146
|
const folderName = relativeProjectPath ? `.${path.sep}${relativeProjectPath}` : 'current folder'
|
|
136
|
-
|
|
147
|
+
console.log(`Creating new CAP project in ${term.bold(folderName)}\n`)
|
|
137
148
|
}
|
|
138
149
|
if (cds.cli.options.for && typeof cds.cli.options.for !== 'string') {
|
|
139
150
|
throw 'The --for argument must not be empty.'
|
|
140
151
|
}
|
|
141
152
|
if (cds.cli.options.force) {
|
|
142
|
-
|
|
153
|
+
console.log(`Using '--force' ... existing files will be overwritten`)
|
|
143
154
|
}
|
|
144
155
|
}
|
|
145
156
|
|
|
@@ -150,7 +161,7 @@ module.exports = class CDSGenerator {
|
|
|
150
161
|
await this._fillTemplateList();
|
|
151
162
|
|
|
152
163
|
for (const template of this.templateList) {
|
|
153
|
-
|
|
164
|
+
console.log(`Adding feature '${template.name}'...`);
|
|
154
165
|
await template.run();
|
|
155
166
|
await template.runDependentMerging();
|
|
156
167
|
await template.runRelatedMerging();
|
|
@@ -158,9 +169,9 @@ module.exports = class CDSGenerator {
|
|
|
158
169
|
|
|
159
170
|
if (cds.cli.command === COMMAND_INIT) {
|
|
160
171
|
const relativeProjectPath = path.relative(this.cwd, cds.root)
|
|
161
|
-
|
|
172
|
+
console.log(`\nSuccessfully created project. Continue with '${term.bold('cd '+relativeProjectPath)}'.\n`)
|
|
162
173
|
} else {
|
|
163
|
-
|
|
174
|
+
console.log(`\nSuccessfully added features to your project.`)
|
|
164
175
|
}
|
|
165
176
|
}
|
|
166
177
|
|
|
@@ -179,7 +190,7 @@ module.exports = class CDSGenerator {
|
|
|
179
190
|
);
|
|
180
191
|
const fuzzySearch = require('../../bin/util/fuzzySearch');
|
|
181
192
|
const [bestMatch] = fuzzySearch(filename, entries);
|
|
182
|
-
|
|
193
|
+
console.log(`Unknown facet '${term.bold(filename)}'. Did you mean ${term.bold(`cds add ${bestMatch}`)}?\n\nHaven't found the proper facet yet? Here are all supported facets:\n\n ${term.bold(entries.join('\n '))}\n`);
|
|
183
194
|
process.exit(1);
|
|
184
195
|
}
|
|
185
196
|
throw err;
|
|
@@ -189,6 +200,7 @@ module.exports = class CDSGenerator {
|
|
|
189
200
|
async _fillTemplateList() {
|
|
190
201
|
const templates = new Map
|
|
191
202
|
const { command, options, argv } = cds.cli
|
|
203
|
+
|
|
192
204
|
const facets = command === COMMAND_INIT ? options.add : new Set(argv[0].split(','))
|
|
193
205
|
|
|
194
206
|
for (let facet of facets) {
|
|
@@ -216,6 +228,7 @@ module.exports = class CDSGenerator {
|
|
|
216
228
|
DEBUG?.(`Features: ${this.templateList.map(({name}) => name).join(', ')}`);
|
|
217
229
|
}
|
|
218
230
|
|
|
231
|
+
// CAP Generator API
|
|
219
232
|
async stepEnd() {
|
|
220
233
|
for (const template of this.templateList) {
|
|
221
234
|
await template.finalize();
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
const cds = require('../../../cds')
|
|
3
3
|
const { exists, fs } = cds.utils
|
|
4
4
|
const { resolve, join, relative } = require('path');
|
|
5
|
-
const LOG = console
|
|
6
5
|
const DEBUG = cds.debug('cli')
|
|
7
6
|
|
|
8
7
|
module.exports = class DataTemplate extends require('../templateBase') {
|
|
@@ -111,7 +110,7 @@ function createDataFile (isFileExists, dataFilePath, dest, force, entity) {
|
|
|
111
110
|
relFilePath = relative(cds.root, dataFilePath);
|
|
112
111
|
}
|
|
113
112
|
if (isFileExists && !force) {
|
|
114
|
-
|
|
113
|
+
console.log(`Skipping ${relFilePath}`);
|
|
115
114
|
}
|
|
116
115
|
else {
|
|
117
116
|
// continue only if file not already exists, or '--force' option provided
|
|
@@ -119,7 +118,7 @@ function createDataFile (isFileExists, dataFilePath, dest, force, entity) {
|
|
|
119
118
|
if (dataFileContent && dataFileContent.length) {
|
|
120
119
|
if (!exists(dest)) fs.mkdirSync(dest, {recursive: true})
|
|
121
120
|
fs.writeFileSync(dataFilePath, dataFileContent);
|
|
122
|
-
isFileExists ?
|
|
121
|
+
isFileExists ? console.log(`Overwriting `+relFilePath) : console.log(`Creating `+relFilePath)
|
|
123
122
|
}
|
|
124
123
|
}
|
|
125
124
|
}
|
|
@@ -10,7 +10,6 @@ const { LINT_DEV, LINT_GLOBAL } = require("../../constants").OPTIONS;
|
|
|
10
10
|
const { getConfigPath, getFileExtensions } = require("@sap/eslint-plugin-cds/lib/api");
|
|
11
11
|
const cds = require("../../../cds");
|
|
12
12
|
const { mkdirp, exists } = cds.utils;
|
|
13
|
-
const LOG = console;
|
|
14
13
|
|
|
15
14
|
const IS_WIN = os.platform() === "win32";
|
|
16
15
|
const ALLOWED_FILE_EXTENSIONS = getFileExtensions();
|
|
@@ -100,20 +99,20 @@ module.exports = class LintTemplate extends require('../templateBase') {
|
|
|
100
99
|
].join(" ")}`;
|
|
101
100
|
|
|
102
101
|
if (cds.cli.options.force) {
|
|
103
|
-
|
|
102
|
+
console.log(
|
|
104
103
|
`\n\nAlmost done - installing ${this.missingNpmDependencies["names"].length} npm dependencies:\n${task}`
|
|
105
104
|
);
|
|
106
105
|
this._runTask(task);
|
|
107
106
|
} else {
|
|
108
|
-
|
|
107
|
+
console.log(
|
|
109
108
|
`\n\nAlmost done - ${term.warn(
|
|
110
109
|
`you are missing ${this.missingNpmDependencies["names"].length} npm dependencies`
|
|
111
110
|
)}:\n`
|
|
112
111
|
);
|
|
113
112
|
this.missingNpmDependencies["msgs"].forEach((msg, i) => {
|
|
114
|
-
|
|
113
|
+
console.log(`(${i + 1}) ${msg}`);
|
|
115
114
|
if (i === this.missingNpmDependencies["msgs"].length - 1) {
|
|
116
|
-
|
|
115
|
+
console.log("\n");
|
|
117
116
|
}
|
|
118
117
|
});
|
|
119
118
|
await this._promptInstallDependencies(task);
|
|
@@ -192,7 +191,7 @@ module.exports = class LintTemplate extends require('../templateBase') {
|
|
|
192
191
|
resolve(this._runTask(task));
|
|
193
192
|
// If use declines or question timeout is reached, print todos
|
|
194
193
|
} else if (["n", "no"].includes(received.toLowerCase())) {
|
|
195
|
-
|
|
194
|
+
console.log(todos);
|
|
196
195
|
resolve();
|
|
197
196
|
} else {
|
|
198
197
|
// Close and restart question (with new timeout)
|
|
@@ -4,7 +4,6 @@ const { exists, mkdirp, path } = cds.utils
|
|
|
4
4
|
const { URLS, OPTIONS: { NODEJS, JAVA }, COMMAND_ADD } = require('../../constants')
|
|
5
5
|
const term = require('../../../util/term')
|
|
6
6
|
const { copyFiles } = require('../../util/template')
|
|
7
|
-
const LOG = console
|
|
8
7
|
|
|
9
8
|
module.exports = class NodejsTemplate extends require('../templateBase') {
|
|
10
9
|
|
|
@@ -29,7 +28,7 @@ module.exports = class NodejsTemplate extends require('../templateBase') {
|
|
|
29
28
|
}
|
|
30
29
|
|
|
31
30
|
async finalize() {
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
console.log(`Find samples on ${term.link(URLS.SAMPLES)}`)
|
|
32
|
+
console.log(`Learn about next steps at ${term.link(URLS.CAPIRE)}`)
|
|
34
33
|
}
|
|
35
34
|
}
|
|
@@ -3,7 +3,6 @@ const cds = require('../../../cds')
|
|
|
3
3
|
const { exists } = cds.utils
|
|
4
4
|
const { copyFiles } = require('../../util/template')
|
|
5
5
|
const { URLS } = require('../../constants')
|
|
6
|
-
const LOG = console
|
|
7
6
|
|
|
8
7
|
module.exports = class PipelineTemplate extends require('../templateBase') {
|
|
9
8
|
|
|
@@ -25,6 +24,6 @@ module.exports = class PipelineTemplate extends require('../templateBase') {
|
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
async finalize() {
|
|
28
|
-
|
|
27
|
+
console.log(`For information on project "Piper" and its pipelines see ${URLS.PIPELINE_HELP}`);
|
|
29
28
|
}
|
|
30
29
|
}
|
package/lib/init/util/indent.js
CHANGED
|
@@ -48,7 +48,7 @@ function detectIndent (file) {
|
|
|
48
48
|
}, { tabs: { indents: {}, total: 0, character: '\t' }, spaces: { indents: {}, total: 0, character: ' ' } })
|
|
49
49
|
|
|
50
50
|
const preferred = indents.tabs.total > indents.spaces.total ? indents.tabs : indents.spaces
|
|
51
|
-
const width = gcd(Object.keys(preferred.indents))
|
|
51
|
+
const width = gcd(Object.keys(preferred.indents)) ?? 2
|
|
52
52
|
return preferred.character.repeat(width)
|
|
53
53
|
}
|
|
54
54
|
|
package/lib/init/util/merge.js
CHANGED
|
@@ -110,14 +110,14 @@ async function mergeJSON(into, from, project, semantics) {
|
|
|
110
110
|
const resultYAML = await mergeYAML(targetYAML, sourceYAML, project, semantics)
|
|
111
111
|
result = YAML.parse(YAML.stringify(resultYAML))
|
|
112
112
|
} else {
|
|
113
|
-
const target = typeof into === 'string' ? await read(into) : into
|
|
113
|
+
const target = typeof into === 'string' ? await read(into, 'json') : into
|
|
114
114
|
result = _deepMerge(target, source)
|
|
115
115
|
}
|
|
116
116
|
// we need to stringify result on site to be able to apply the appropriate indentation.
|
|
117
117
|
// cds-utils.write is currently hardcoded to use spaces for indentation.
|
|
118
118
|
if (typeof into === 'string') {
|
|
119
|
-
const indent = exists(into) && detectIndent((await read(into, 'utf-8')).split(EOL))
|
|
120
|
-
await write(into, JSON.stringify(result, null, indent
|
|
119
|
+
const indent = exists(into) && detectIndent((await read(into, 'utf-8')).split(EOL)) || ' '
|
|
120
|
+
await write(into, JSON.stringify(result, null, indent) + EOL)
|
|
121
121
|
}
|
|
122
122
|
return result
|
|
123
123
|
}
|
package/lib/init/util/mvn.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
const { URLS, MAVEN_ARCHETYPE_VERSION, OPTIONS: { JAVA_MVN, JAVA_PACKAGE, SAMPLES, HANA }, REGEX_JAVA_PACKAGE } = require('../constants');
|
|
3
3
|
|
|
4
|
-
const { CliError } = require('../../client/helper/errors');
|
|
5
|
-
|
|
6
|
-
|
|
7
4
|
const cp = require('child_process');
|
|
8
5
|
const util = require('util');
|
|
9
6
|
const execAsync = util.promisify(cp.exec);
|
|
@@ -132,29 +129,27 @@ class MvnArchetypeUtil {
|
|
|
132
129
|
|
|
133
130
|
// -DjdkVersion=[11|17]
|
|
134
131
|
if (!params.get('-DjdkVersion')) {
|
|
132
|
+
let javaVersion
|
|
135
133
|
try {
|
|
136
|
-
|
|
137
|
-
const match = javaVersion?.stderr?.match(/version\s*"?(\d+\.\d+\.\d+)"?/);
|
|
138
|
-
if (match?.[1]) {
|
|
139
|
-
const segments = match[1]?.split('.');
|
|
140
|
-
const version = new Number(segments?.[0]);
|
|
141
|
-
switch (true) {
|
|
142
|
-
case (version < 17):
|
|
143
|
-
if (process.env.WS_BASE_URL) {
|
|
144
|
-
throw new CliError(`Java version ${match[1]} is not supported. Use Java 17 or higher. You can use command 'Java: Set Default JDK' to switch to Java 17.`)
|
|
145
|
-
}
|
|
146
|
-
throw new CliError(`Java version ${match[1]} is not supported. Use Java 17 or higher.`)
|
|
147
|
-
case (version < 20): params.set(`-DjdkVersion`, 17); break;
|
|
148
|
-
case (version >= 20): params.set(`-DjdkVersion`, 20); break;
|
|
149
|
-
default:
|
|
150
|
-
}
|
|
151
|
-
}
|
|
134
|
+
javaVersion = await execAsync('java -version');
|
|
152
135
|
} catch (err) {
|
|
153
|
-
if (err instanceof CliError) {
|
|
154
|
-
throw err;
|
|
155
|
-
}
|
|
156
136
|
DEBUG?.(err);
|
|
157
137
|
}
|
|
138
|
+
const match = javaVersion?.stderr?.match(/version\s*"?(\d+\.\d+\.\d+)"?/);
|
|
139
|
+
if (match?.[1]) {
|
|
140
|
+
const segments = match[1]?.split('.');
|
|
141
|
+
const version = new Number(segments?.[0]);
|
|
142
|
+
switch (true) {
|
|
143
|
+
case (version < 17):
|
|
144
|
+
if (process.env.WS_BASE_URL) {
|
|
145
|
+
throw `Java version ${match[1]} is not supported. Use Java 17 or higher. You can use command 'Java: Set Default JDK' to switch to Java 17.`
|
|
146
|
+
}
|
|
147
|
+
throw `Java version ${match[1]} is not supported. Use Java 17 or higher.`
|
|
148
|
+
case (version < 20): params.set(`-DjdkVersion`, 17); break;
|
|
149
|
+
case (version >= 20): params.set(`-DjdkVersion`, 20); break;
|
|
150
|
+
default:
|
|
151
|
+
}
|
|
152
|
+
}
|
|
158
153
|
}
|
|
159
154
|
|
|
160
155
|
if (options[JAVA_PACKAGE]) {
|
package/lib/util/cfUtil.js
CHANGED
|
@@ -15,7 +15,6 @@ const LOG = cds.log ? cds.log('deploy') : console;
|
|
|
15
15
|
const DEBUG = cds.debug('deploy');
|
|
16
16
|
|
|
17
17
|
const { bold, warn } = require('./term');
|
|
18
|
-
const { CliError } = require('../client/helper/errors');
|
|
19
18
|
|
|
20
19
|
const CF_COMMAND = 'cf';
|
|
21
20
|
|
|
@@ -143,7 +142,7 @@ class CfUtil {
|
|
|
143
142
|
try {
|
|
144
143
|
return (await this._cfRun('oauth-token')).stdout;
|
|
145
144
|
} catch (err) {
|
|
146
|
-
throw
|
|
145
|
+
throw err.message;
|
|
147
146
|
}
|
|
148
147
|
}
|
|
149
148
|
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap/cds-dk",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@sap/cds-dk",
|
|
9
|
-
"version": "7.
|
|
9
|
+
"version": "7.1.1",
|
|
10
10
|
"license": "SEE LICENSE IN LICENSE",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@sap/cds": "^7",
|
|
@@ -53,14 +53,14 @@
|
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
"node_modules/@eslint-community/regexpp": {
|
|
56
|
-
"version": "4.
|
|
56
|
+
"version": "4.6.2",
|
|
57
57
|
"license": "MIT",
|
|
58
58
|
"engines": {
|
|
59
59
|
"node": "^12.0.0 || ^14.0.0 || >=16.0.0"
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
"node_modules/@eslint/eslintrc": {
|
|
63
|
-
"version": "2.1.
|
|
63
|
+
"version": "2.1.1",
|
|
64
64
|
"license": "MIT",
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"ajv": "^6.12.4",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
"node_modules/@eslint/js": {
|
|
84
|
-
"version": "8.
|
|
84
|
+
"version": "8.46.0",
|
|
85
85
|
"license": "MIT",
|
|
86
86
|
"engines": {
|
|
87
87
|
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
|
@@ -138,6 +138,28 @@
|
|
|
138
138
|
"node-pre-gyp": "bin/node-pre-gyp"
|
|
139
139
|
}
|
|
140
140
|
},
|
|
141
|
+
"node_modules/@mapbox/node-pre-gyp/node_modules/make-dir": {
|
|
142
|
+
"version": "3.1.0",
|
|
143
|
+
"license": "MIT",
|
|
144
|
+
"optional": true,
|
|
145
|
+
"dependencies": {
|
|
146
|
+
"semver": "^6.0.0"
|
|
147
|
+
},
|
|
148
|
+
"engines": {
|
|
149
|
+
"node": ">=8"
|
|
150
|
+
},
|
|
151
|
+
"funding": {
|
|
152
|
+
"url": "https://github.com/sponsors/sindresorhus"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"node_modules/@mapbox/node-pre-gyp/node_modules/make-dir/node_modules/semver": {
|
|
156
|
+
"version": "6.3.1",
|
|
157
|
+
"license": "ISC",
|
|
158
|
+
"optional": true,
|
|
159
|
+
"bin": {
|
|
160
|
+
"semver": "bin/semver.js"
|
|
161
|
+
}
|
|
162
|
+
},
|
|
141
163
|
"node_modules/@nodelib/fs.scandir": {
|
|
142
164
|
"version": "2.1.5",
|
|
143
165
|
"license": "MIT",
|
|
@@ -189,11 +211,11 @@
|
|
|
189
211
|
}
|
|
190
212
|
},
|
|
191
213
|
"node_modules/@sap/cds": {
|
|
192
|
-
"version": "7.
|
|
214
|
+
"version": "7.1.1",
|
|
193
215
|
"license": "SEE LICENSE IN LICENSE",
|
|
194
216
|
"dependencies": {
|
|
195
|
-
"@sap/cds-compiler": "
|
|
196
|
-
"@sap/cds-fiori": "
|
|
217
|
+
"@sap/cds-compiler": "^4",
|
|
218
|
+
"@sap/cds-fiori": "^1",
|
|
197
219
|
"@sap/cds-foss": "^4"
|
|
198
220
|
},
|
|
199
221
|
"bin": {
|
|
@@ -205,7 +227,7 @@
|
|
|
205
227
|
}
|
|
206
228
|
},
|
|
207
229
|
"node_modules/@sap/cds-compiler": {
|
|
208
|
-
"version": "4.
|
|
230
|
+
"version": "4.1.2",
|
|
209
231
|
"license": "SEE LICENSE IN LICENSE",
|
|
210
232
|
"dependencies": {
|
|
211
233
|
"antlr4": "4.9.3"
|
|
@@ -242,7 +264,7 @@
|
|
|
242
264
|
}
|
|
243
265
|
},
|
|
244
266
|
"node_modules/@sap/cds-mtxs": {
|
|
245
|
-
"version": "1.
|
|
267
|
+
"version": "1.10.0",
|
|
246
268
|
"license": "SEE LICENSE IN LICENSE",
|
|
247
269
|
"dependencies": {
|
|
248
270
|
"@sap/hdi-deploy": "^4",
|
|
@@ -268,11 +290,11 @@
|
|
|
268
290
|
}
|
|
269
291
|
},
|
|
270
292
|
"node_modules/@sap/hdi-deploy": {
|
|
271
|
-
"version": "4.
|
|
293
|
+
"version": "4.8.0",
|
|
272
294
|
"license": "See LICENSE file",
|
|
273
295
|
"dependencies": {
|
|
274
|
-
"@sap/hana-client": "2.
|
|
275
|
-
"@sap/hdi": "4.
|
|
296
|
+
"@sap/hana-client": "2.17.22",
|
|
297
|
+
"@sap/hdi": "4.5.0",
|
|
276
298
|
"@sap/xsenv": "3.4.0",
|
|
277
299
|
"async": "3.2.3",
|
|
278
300
|
"dotenv": "10.0.0",
|
|
@@ -281,11 +303,11 @@
|
|
|
281
303
|
"micromatch": "4.0.4"
|
|
282
304
|
},
|
|
283
305
|
"engines": {
|
|
284
|
-
"node": "^12.0.0 || ^14.0.0 || ^16.0.0 || ^18.0.0"
|
|
306
|
+
"node": "^12.0.0 || ^14.0.0 || ^16.0.0 || ^18.0.0 || ^20.0.0"
|
|
285
307
|
}
|
|
286
308
|
},
|
|
287
309
|
"node_modules/@sap/hdi-deploy/node_modules/@sap/hana-client": {
|
|
288
|
-
"version": "2.
|
|
310
|
+
"version": "2.17.22",
|
|
289
311
|
"hasInstallScript": true,
|
|
290
312
|
"license": "SEE LICENSE IN developer-license-3_1.txt",
|
|
291
313
|
"dependencies": {
|
|
@@ -307,13 +329,13 @@
|
|
|
307
329
|
"license": "MIT"
|
|
308
330
|
},
|
|
309
331
|
"node_modules/@sap/hdi-deploy/node_modules/@sap/hdi": {
|
|
310
|
-
"version": "4.
|
|
332
|
+
"version": "4.5.0",
|
|
311
333
|
"license": "See LICENSE file",
|
|
312
334
|
"dependencies": {
|
|
313
335
|
"async": "3.2.3"
|
|
314
336
|
},
|
|
315
337
|
"engines": {
|
|
316
|
-
"node": ">=12 <=
|
|
338
|
+
"node": ">=12 <=20"
|
|
317
339
|
},
|
|
318
340
|
"peerDependencies": {
|
|
319
341
|
"@sap/hana-client": "^2 >= 2.5",
|
|
@@ -604,12 +626,10 @@
|
|
|
604
626
|
}
|
|
605
627
|
},
|
|
606
628
|
"node_modules/agentkeepalive": {
|
|
607
|
-
"version": "4.
|
|
629
|
+
"version": "4.5.0",
|
|
608
630
|
"license": "MIT",
|
|
609
631
|
"optional": true,
|
|
610
632
|
"dependencies": {
|
|
611
|
-
"debug": "^4.1.0",
|
|
612
|
-
"depd": "^2.0.0",
|
|
613
633
|
"humanize-ms": "^1.2.1"
|
|
614
634
|
},
|
|
615
635
|
"engines": {
|
|
@@ -1095,25 +1115,25 @@
|
|
|
1095
1115
|
}
|
|
1096
1116
|
},
|
|
1097
1117
|
"node_modules/eslint": {
|
|
1098
|
-
"version": "8.
|
|
1118
|
+
"version": "8.46.0",
|
|
1099
1119
|
"license": "MIT",
|
|
1100
1120
|
"dependencies": {
|
|
1101
1121
|
"@eslint-community/eslint-utils": "^4.2.0",
|
|
1102
|
-
"@eslint-community/regexpp": "^4.
|
|
1103
|
-
"@eslint/eslintrc": "^2.1.
|
|
1104
|
-
"@eslint/js": "8.
|
|
1122
|
+
"@eslint-community/regexpp": "^4.6.1",
|
|
1123
|
+
"@eslint/eslintrc": "^2.1.1",
|
|
1124
|
+
"@eslint/js": "^8.46.0",
|
|
1105
1125
|
"@humanwhocodes/config-array": "^0.11.10",
|
|
1106
1126
|
"@humanwhocodes/module-importer": "^1.0.1",
|
|
1107
1127
|
"@nodelib/fs.walk": "^1.2.8",
|
|
1108
|
-
"ajv": "^6.
|
|
1128
|
+
"ajv": "^6.12.4",
|
|
1109
1129
|
"chalk": "^4.0.0",
|
|
1110
1130
|
"cross-spawn": "^7.0.2",
|
|
1111
1131
|
"debug": "^4.3.2",
|
|
1112
1132
|
"doctrine": "^3.0.0",
|
|
1113
1133
|
"escape-string-regexp": "^4.0.0",
|
|
1114
|
-
"eslint-scope": "^7.2.
|
|
1115
|
-
"eslint-visitor-keys": "^3.4.
|
|
1116
|
-
"espree": "^9.6.
|
|
1134
|
+
"eslint-scope": "^7.2.2",
|
|
1135
|
+
"eslint-visitor-keys": "^3.4.2",
|
|
1136
|
+
"espree": "^9.6.1",
|
|
1117
1137
|
"esquery": "^1.4.2",
|
|
1118
1138
|
"esutils": "^2.0.2",
|
|
1119
1139
|
"fast-deep-equal": "^3.1.3",
|
|
@@ -1147,7 +1167,7 @@
|
|
|
1147
1167
|
}
|
|
1148
1168
|
},
|
|
1149
1169
|
"node_modules/eslint-scope": {
|
|
1150
|
-
"version": "7.2.
|
|
1170
|
+
"version": "7.2.2",
|
|
1151
1171
|
"license": "BSD-2-Clause",
|
|
1152
1172
|
"dependencies": {
|
|
1153
1173
|
"esrecurse": "^4.3.0",
|
|
@@ -1161,7 +1181,7 @@
|
|
|
1161
1181
|
}
|
|
1162
1182
|
},
|
|
1163
1183
|
"node_modules/eslint-visitor-keys": {
|
|
1164
|
-
"version": "3.4.
|
|
1184
|
+
"version": "3.4.2",
|
|
1165
1185
|
"license": "Apache-2.0",
|
|
1166
1186
|
"engines": {
|
|
1167
1187
|
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
|
@@ -1797,28 +1817,6 @@
|
|
|
1797
1817
|
"version": "4.6.2",
|
|
1798
1818
|
"license": "MIT"
|
|
1799
1819
|
},
|
|
1800
|
-
"node_modules/make-dir": {
|
|
1801
|
-
"version": "3.1.0",
|
|
1802
|
-
"license": "MIT",
|
|
1803
|
-
"optional": true,
|
|
1804
|
-
"dependencies": {
|
|
1805
|
-
"semver": "^6.0.0"
|
|
1806
|
-
},
|
|
1807
|
-
"engines": {
|
|
1808
|
-
"node": ">=8"
|
|
1809
|
-
},
|
|
1810
|
-
"funding": {
|
|
1811
|
-
"url": "https://github.com/sponsors/sindresorhus"
|
|
1812
|
-
}
|
|
1813
|
-
},
|
|
1814
|
-
"node_modules/make-dir/node_modules/semver": {
|
|
1815
|
-
"version": "6.3.1",
|
|
1816
|
-
"license": "ISC",
|
|
1817
|
-
"optional": true,
|
|
1818
|
-
"bin": {
|
|
1819
|
-
"semver": "bin/semver.js"
|
|
1820
|
-
}
|
|
1821
|
-
},
|
|
1822
1820
|
"node_modules/make-fetch-happen": {
|
|
1823
1821
|
"version": "9.1.0",
|
|
1824
1822
|
"license": "ISC",
|
|
@@ -2155,7 +2153,7 @@
|
|
|
2155
2153
|
}
|
|
2156
2154
|
},
|
|
2157
2155
|
"node_modules/node-watch": {
|
|
2158
|
-
"version": "0.7.
|
|
2156
|
+
"version": "0.7.4",
|
|
2159
2157
|
"license": "MIT",
|
|
2160
2158
|
"engines": {
|
|
2161
2159
|
"node": ">=6"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap/cds-dk",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.1",
|
|
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": [
|
|
@@ -39,5 +39,6 @@
|
|
|
39
39
|
"lib/",
|
|
40
40
|
"npm-shrinkwrap.json",
|
|
41
41
|
"LICENSE"
|
|
42
|
-
]
|
|
42
|
+
],
|
|
43
|
+
"_hasShrinkwrap": true
|
|
43
44
|
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
const cds = require('../../cds');
|
|
2
|
-
const { getMessage } = require('./logging');
|
|
3
|
-
|
|
4
|
-
const DEBUG = cds.debug('cli');
|
|
5
|
-
|
|
6
|
-
class CliError extends Error {
|
|
7
|
-
// noinspection JSAnnotator
|
|
8
|
-
constructor(message, { error, command } = {}) {
|
|
9
|
-
const help = command && getCommandHelp(command);
|
|
10
|
-
const stackLimit = Error.stackTraceLimit;
|
|
11
|
-
if (!DEBUG) {
|
|
12
|
-
Error.stackTraceLimit = 0
|
|
13
|
-
}
|
|
14
|
-
super(getMessage(message, { error, help }));
|
|
15
|
-
Error.stackTraceLimit = stackLimit;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function getCommandHelp(command) {
|
|
20
|
-
const cli = require('../../../bin/cds');
|
|
21
|
-
return cli?.load(command, () => ({ help: '' }))?.help ?? '';
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
module.exports = {
|
|
25
|
-
CliError
|
|
26
|
-
};
|
package/lib/util/version.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
const { join } = require('path')
|
|
2
|
-
|
|
3
|
-
function _oldMtx(cds = require('../cds')) {
|
|
4
|
-
function _hasMtxDependency() {
|
|
5
|
-
try {
|
|
6
|
-
return require(join(cds.root, 'package.json'))?.dependencies?.['@sap/cds-mtx']
|
|
7
|
-
} catch(e) {
|
|
8
|
-
return false
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
return (_hasMtxDependency() || process.env.OLD_MTX?.toLowerCase() === 'true') ?? false
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function checkMtx(cds) {
|
|
15
|
-
if (_oldMtx(cds)) {
|
|
16
|
-
const { CliError } = require('../client/helper/errors')
|
|
17
|
-
throw new CliError(`Package @sap/cds-mtx is deprecated and incompatible with @sap/cds-dk >= 7.
|
|
18
|
-
To continue using it, install version 6 of @sap/cds-dk in your project with:
|
|
19
|
-
npm i @sap/cds-dk@6
|
|
20
|
-
However, it is RECOMMENDED to migrate to @sap/cds-mtxs instead.
|
|
21
|
-
See https://cap.cloud.sap/docs/guides/multitenancy/old-mtx-migration for more.`)
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
module.exports = {
|
|
26
|
-
checkMtx
|
|
27
|
-
}
|