@sap/cds-dk 7.0.2 → 7.1.0

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 (90) hide show
  1. package/bin/add.js +2 -2
  2. package/bin/bind.js +5 -7
  3. package/bin/build.js +2 -7
  4. package/bin/cds.js +6 -8
  5. package/bin/deploy/to-hana.js +1 -1
  6. package/bin/init.js +2 -2
  7. package/bin/subscribe.js +4 -4
  8. package/bin/unsubscribe.js +4 -4
  9. package/bin/upgrade.js +4 -4
  10. package/lib/bind/cfKeyProvider.js +10 -10
  11. package/lib/bind/index.js +4 -3
  12. package/lib/bind/userCdsrcJsonStorageProvider.js +2 -10
  13. package/lib/build/buildTaskEngine.js +9 -22
  14. package/lib/build/buildTaskFactory.js +18 -27
  15. package/lib/build/constants.js +16 -14
  16. package/lib/build/index.js +12 -3
  17. package/lib/build/provider/buildTaskProviderInternal.js +23 -15
  18. package/lib/build/provider/mtx/index.js +8 -2
  19. package/lib/build/provider/mtx/resourcesTarBuilder.js +2 -6
  20. package/lib/build/provider/mtx-sidecar/index.js +13 -8
  21. package/lib/build/util.js +13 -0
  22. package/lib/client/activate.js +7 -7
  23. package/lib/client/auth_manager.js +5 -5
  24. package/lib/client/base_command.js +7 -10
  25. package/lib/client/extend.js +2 -2
  26. package/lib/client/helper/logging.js +7 -2
  27. package/lib/client/params.js +2 -3
  28. package/lib/client/pull.js +3 -3
  29. package/lib/client/push.js +3 -3
  30. package/lib/client/settings_manager.js +7 -8
  31. package/lib/client/tenant_action.js +3 -3
  32. package/lib/compile/asyncapi/components/messages/index.js +41 -18
  33. package/lib/compile/asyncapi/index.js +23 -2
  34. package/lib/deploy/to-hana/hana.js +1 -2
  35. package/lib/import/common.js +3 -0
  36. package/lib/import/message.js +2 -1
  37. package/lib/import/odata/metadataconverter/MetadataConverter.js +1 -0
  38. package/lib/import/odata/v4parser.js +85 -95
  39. package/lib/init/constants.js +1 -1
  40. package/lib/init/index.js +78 -73
  41. package/lib/init/template/approuter/index.js +3 -4
  42. package/lib/init/template/auditlog/index.js +3 -4
  43. package/lib/init/template/cf-manifest/files/manifest.yml.hbs +15 -23
  44. package/lib/init/template/cf-manifest/files/services-manifest.yml.hbs +22 -17
  45. package/lib/init/template/cf-manifest/index.js +2 -2
  46. package/lib/init/template/connectivity/index.js +2 -3
  47. package/lib/init/template/data/index.js +7 -8
  48. package/lib/init/template/destination/index.js +3 -5
  49. package/lib/init/template/enterprise-messaging/index.js +4 -5
  50. package/lib/init/template/enterprise-messaging-shared/index.js +3 -4
  51. package/lib/init/template/extensibility/index.js +2 -3
  52. package/lib/init/template/file-based-messaging/index.js +2 -2
  53. package/lib/init/template/hana/files/mta.yaml.hbs +1 -1
  54. package/lib/init/template/hana/index.js +39 -63
  55. package/lib/init/template/helm/index.js +15 -14
  56. package/lib/init/template/html5-repo/index.js +3 -7
  57. package/lib/init/template/java/index.js +3 -3
  58. package/lib/init/template/kibana/index.js +3 -4
  59. package/lib/init/template/lint/index.js +13 -13
  60. package/lib/init/template/mta/index.js +3 -2
  61. package/lib/init/template/multitenancy/files/package.sidecar.json.hbs +1 -1
  62. package/lib/init/template/multitenancy/index.js +16 -37
  63. package/lib/init/template/nodejs/index.js +4 -6
  64. package/lib/init/template/pipeline/index.js +3 -4
  65. package/lib/init/template/redis-messaging/index.js +3 -4
  66. package/lib/init/template/sample/files/app/admin-books/webapp/manifest.json +1 -1
  67. package/lib/init/template/sample/files/app/browse/webapp/manifest.json +1 -1
  68. package/lib/init/template/sample/files/srv/admin-service.cds +1 -1
  69. package/lib/init/template/sample/files/srv/cat-service.cds +1 -1
  70. package/lib/init/template/sample/index.js +6 -5
  71. package/lib/init/template/sqlite/index.js +1 -1
  72. package/lib/init/template/templateBase.js +9 -19
  73. package/lib/init/template/tiny-sample/index.js +5 -5
  74. package/lib/init/template/toggles/index.js +1 -2
  75. package/lib/init/template/typer/files/xsconfig.json +0 -1
  76. package/lib/init/template/typer/index.js +1 -1
  77. package/lib/init/template/xsuaa/index.js +3 -4
  78. package/lib/init/util/indent.js +57 -0
  79. package/lib/init/util/merge.js +72 -16
  80. package/lib/init/util/mvn.js +40 -31
  81. package/lib/init/util/projectReader.js +52 -168
  82. package/lib/init/util/template.js +12 -11
  83. package/lib/init/util/xml.js +6 -6
  84. package/lib/util/cfUtil.js +1 -2
  85. package/lib/util/pruneAxiosErrors.js +22 -0
  86. package/lib/watch/open.js +6 -3
  87. package/npm-shrinkwrap.json +356 -309
  88. package/package.json +1 -2
  89. package/lib/client/helper/errors.js +0 -26
  90. package/lib/util/version.js +0 -27
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "7.0.2",
3
+ "version": "7.1.0",
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": [
@@ -17,7 +17,6 @@
17
17
  "main": "lib/index.js",
18
18
  "dependencies": {
19
19
  "@sap/cds": "^7",
20
- "@sap/cds-compiler": "^4",
21
20
  "@sap/cds-foss": "^4.0.2",
22
21
  "@sap/cds-mtxs": "^1.9.0",
23
22
  "@sap/eslint-plugin-cds": "^2.6.0",
@@ -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
- };
@@ -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
- }