@sap/cds-dk 7.0.1 → 7.0.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.
Files changed (48) hide show
  1. package/bin/add.js +34 -38
  2. package/bin/build.js +4 -0
  3. package/bin/cds.js +8 -4
  4. package/bin/compile/index.js +3 -3
  5. package/bin/help.js +2 -3
  6. package/lib/build/buildTaskEngine.js +1 -1
  7. package/lib/build/provider/buildTaskHandlerFeatureToggles.js +2 -1
  8. package/lib/build/provider/java/index.js +2 -2
  9. package/lib/build/provider/mtx-sidecar/index.js +2 -3
  10. package/lib/build/util.js +8 -0
  11. package/lib/cds.js +2 -2
  12. package/lib/init/constants.js +4 -4
  13. package/lib/init/index.js +15 -15
  14. package/lib/init/template/_merging/registry-mta.js +2 -2
  15. package/lib/init/template/approuter/index.js +7 -3
  16. package/lib/init/template/cf-manifest/index.js +4 -4
  17. package/lib/init/template/data/index.js +1 -1
  18. package/lib/init/template/hana/index.js +1 -1
  19. package/lib/init/template/java/index.js +3 -3
  20. package/lib/init/template/kibana/files/mta.yaml.hbs +29 -0
  21. package/lib/init/template/kibana/index.js +55 -0
  22. package/lib/init/template/multitenancy/files/package.json.hbs +0 -3
  23. package/lib/init/template/multitenancy/index.js +9 -3
  24. package/lib/init/template/nodejs/index.js +2 -2
  25. package/lib/init/template/pipeline/index.js +1 -1
  26. package/lib/init/template/sample/files/app/_i18n/i18n.properties +3 -32
  27. package/lib/init/template/sample/files/app/_i18n/i18n_de.properties +2 -2
  28. package/lib/init/template/sample/files/app/admin-books/fiori-service.cds +6 -7
  29. package/lib/init/template/sample/files/app/admin-books/webapp/Component.js +3 -3
  30. package/lib/init/template/sample/files/app/admin-books/webapp/i18n/i18n.properties +3 -11
  31. package/lib/init/template/sample/files/app/admin-books/webapp/manifest.json +117 -113
  32. package/lib/init/template/sample/files/app/appconfig/fioriSandboxConfig.json +38 -0
  33. package/lib/init/template/sample/files/app/browse/fiori-service.cds +56 -0
  34. package/lib/init/template/sample/files/app/browse/webapp/Component.js +7 -0
  35. package/lib/init/template/sample/files/app/browse/webapp/i18n/i18n.properties +4 -0
  36. package/lib/init/template/sample/files/app/browse/webapp/manifest.json +139 -0
  37. package/lib/init/template/sample/files/app/common.cds +78 -81
  38. package/lib/init/template/sample/files/app/services.cds +1 -0
  39. package/lib/init/template/templateBase.js +1 -1
  40. package/lib/init/template/tiny-sample/index.js +1 -1
  41. package/lib/init/util/mvn.js +1 -1
  42. package/lib/init/util/projectReader.js +2 -2
  43. package/npm-shrinkwrap.json +14 -25
  44. package/package.json +1 -1
  45. package/lib/init/template/kibana-logging/files/cds.package.json +0 -7
  46. package/lib/init/template/kibana-logging/files/mta.yaml.hbs +0 -14
  47. package/lib/init/template/kibana-logging/index.js +0 -45
  48. /package/lib/init/template/{kibana-logging → kibana}/files/package.json.hbs +0 -0
@@ -0,0 +1,139 @@
1
+ {
2
+ "_version": "1.49.0",
3
+ "sap.app": {
4
+ "id": "bookshop",
5
+ "applicationVersion": {
6
+ "version": "1.0.0"
7
+ },
8
+ "type": "application",
9
+ "title": "{{appTitle}}",
10
+ "description": "{{appDescription}}",
11
+ "i18n": "i18n/i18n.properties",
12
+ "dataSources": {
13
+ "CatalogService": {
14
+ "uri": "/browse/",
15
+ "type": "OData",
16
+ "settings": {
17
+ "odataVersion": "4.0"
18
+ }
19
+ }
20
+ },
21
+ "crossNavigation": {
22
+ "inbounds": {
23
+ "intent1": {
24
+ "signature": {
25
+ "parameters": {
26
+ "Books.ID": {
27
+ "renameTo": "ID"
28
+ },
29
+ "Authors.books.ID": {
30
+ "renameTo": "ID"
31
+ }
32
+ },
33
+ "additionalParameters": "ignored"
34
+ },
35
+ "semanticObject": "Books",
36
+ "action": "display",
37
+ "title": "{{appTitle}}",
38
+ "info": "{{appInfo}}",
39
+ "subTitle": "{{appSubTitle}}",
40
+ "icon": "sap-icon://course-book",
41
+ "indicatorDataSource": {
42
+ "dataSource": "CatalogService",
43
+ "path": "Books/$count",
44
+ "refresh": 1800
45
+ }
46
+ }
47
+ }
48
+ }
49
+ },
50
+ "sap.ui": {
51
+ "technology": "UI5",
52
+ "fullWidth": false,
53
+ "deviceTypes": {
54
+ "desktop": true,
55
+ "tablet": true,
56
+ "phone": true
57
+ }
58
+ },
59
+ "sap.ui5": {
60
+ "dependencies": {
61
+ "minUI5Version": "1.115.1",
62
+ "libs": {
63
+ "sap.fe.templates": {}
64
+ }
65
+ },
66
+ "models": {
67
+ "i18n": {
68
+ "type": "sap.ui.model.resource.ResourceModel",
69
+ "uri": "i18n/i18n.properties"
70
+ },
71
+ "": {
72
+ "dataSource": "CatalogService",
73
+ "settings": {
74
+ "synchronizationMode": "None",
75
+ "operationMode": "Server",
76
+ "autoExpandSelect": true,
77
+ "earlyRequests": true,
78
+ "groupProperties": {
79
+ "default": {
80
+ "submit": "Auto"
81
+ }
82
+ }
83
+ }
84
+ }
85
+ },
86
+ "routing": {
87
+ "routes": [
88
+ {
89
+ "pattern": ":?query:",
90
+ "name": "BooksList",
91
+ "target": "BooksList"
92
+ },
93
+ {
94
+ "pattern": "Books({key}):?query:",
95
+ "name": "BooksDetails",
96
+ "target": "BooksDetails"
97
+ }
98
+ ],
99
+ "targets": {
100
+ "BooksList": {
101
+ "type": "Component",
102
+ "id": "BooksList",
103
+ "name": "sap.fe.templates.ListReport",
104
+ "options": {
105
+ "settings": {
106
+ "entitySet": "Books",
107
+ "initialLoad": true,
108
+ "navigation": {
109
+ "Books": {
110
+ "detail": {
111
+ "route": "BooksDetails"
112
+ }
113
+ }
114
+ }
115
+ }
116
+ }
117
+ },
118
+ "BooksDetails": {
119
+ "type": "Component",
120
+ "id": "BooksDetailsList",
121
+ "name": "sap.fe.templates.ObjectPage",
122
+ "options": {
123
+ "settings": {
124
+ "entitySet": "Books"
125
+ }
126
+ }
127
+ }
128
+ }
129
+ },
130
+ "contentDensities": {
131
+ "compact": true,
132
+ "cozy": true
133
+ }
134
+ },
135
+ "sap.fiori": {
136
+ "registrationIds": [],
137
+ "archeType": "transactional"
138
+ }
139
+ }
@@ -10,16 +10,16 @@ using { sap.common, sap.common.Currencies } from '@sap/cds/common';
10
10
  // Books Lists
11
11
  //
12
12
  annotate my.Books with @(
13
- Common.SemanticKey : [ID],
14
- UI : {
15
- Identification : [{ Value: title }],
16
- SelectionFields : [
13
+ Common.SemanticKey: [ID],
14
+ UI: {
15
+ Identification: [{ Value: title }],
16
+ SelectionFields: [
17
17
  ID,
18
18
  author_ID,
19
19
  price,
20
20
  currency_code
21
21
  ],
22
- LineItem : [
22
+ LineItem: [
23
23
  { Value: ID, Label: '{i18n>Title}' },
24
24
  { Value: author.ID, Label: '{i18n>Author}' },
25
25
  { Value: genre.name },
@@ -29,16 +29,16 @@ annotate my.Books with @(
29
29
  ]
30
30
  }
31
31
  ) {
32
- ID @Common: {
33
- SemanticObject : 'Books',
32
+ ID @Common: {
33
+ SemanticObject: 'Books',
34
34
  Text: title,
35
- TextArrangement : #TextOnly
35
+ TextArrangement: #TextOnly
36
36
  };
37
- author @ValueList.entity : 'Authors';
37
+ author @ValueList.entity: 'Authors';
38
38
  };
39
39
 
40
40
  annotate Currencies with {
41
- symbol @Common.Label : '{i18n>Currency}';
41
+ symbol @Common.Label: '{i18n>Currency}';
42
42
  }
43
43
 
44
44
  ////////////////////////////////////////////////////////////////////////////
@@ -46,10 +46,10 @@ annotate Currencies with {
46
46
  // Books Details
47
47
  //
48
48
  annotate my.Books with @(UI : {HeaderInfo : {
49
- TypeName : '{i18n>Book}',
50
- TypeNamePlural : '{i18n>Books}',
51
- Title : { Value: title },
52
- Description : { Value: author.name }
49
+ TypeName : '{i18n>Book}',
50
+ TypeNamePlural: '{i18n>Books}',
51
+ Title : { Value: title },
52
+ Description : { Value: author.name }
53
53
  }, });
54
54
 
55
55
 
@@ -62,9 +62,9 @@ annotate my.Books with {
62
62
  title @title: '{i18n>Title}';
63
63
  genre @title: '{i18n>Genre}' @Common: { Text: genre.name, TextArrangement: #TextOnly };
64
64
  author @title: '{i18n>Author}' @Common: { Text: author.name, TextArrangement: #TextOnly };
65
- price @title: '{i18n>Price}' @Measures.ISOCurrency : currency_code;
65
+ price @title: '{i18n>Price}' @Measures.ISOCurrency: currency_code;
66
66
  stock @title: '{i18n>Stock}';
67
- descr @title: '{i18n>Description}' @UI.MultiLineText;
67
+ descr @title: '{i18n>Description}' @UI.MultiLineText;
68
68
  image @title: '{i18n>Image}';
69
69
  }
70
70
 
@@ -73,13 +73,13 @@ annotate my.Books with {
73
73
  // Genres List
74
74
  //
75
75
  annotate my.Genres with @(
76
- Common.SemanticKey : [name],
77
- UI : {
78
- SelectionFields : [name],
79
- LineItem : [
76
+ Common.SemanticKey: [name],
77
+ UI: {
78
+ SelectionFields: [name],
79
+ LineItem: [
80
80
  { Value: name },
81
81
  {
82
- Value : parent.name,
82
+ Value: parent.name,
83
83
  Label: 'Main Genre'
84
84
  },
85
85
  ],
@@ -95,17 +95,17 @@ annotate my.Genres with {
95
95
  // Genre Details
96
96
  //
97
97
  annotate my.Genres with @(UI : {
98
- Identification : [{ Value: name}],
99
- HeaderInfo : {
100
- TypeName : '{i18n>Genre}',
101
- TypeNamePlural : '{i18n>Genres}',
102
- Title : { Value: name },
103
- Description : { Value: ID }
98
+ Identification: [{ Value: name}],
99
+ HeaderInfo: {
100
+ TypeName : '{i18n>Genre}',
101
+ TypeNamePlural: '{i18n>Genres}',
102
+ Title : { Value: name },
103
+ Description : { Value: ID }
104
104
  },
105
- Facets : [{
106
- $Type : 'UI.ReferenceFacet',
107
- Label : '{i18n>SubGenres}',
108
- Target : 'children/@UI.LineItem'
105
+ Facets: [{
106
+ $Type : 'UI.ReferenceFacet',
107
+ Label : '{i18n>SubGenres}',
108
+ Target: 'children/@UI.LineItem'
109
109
  }, ],
110
110
  });
111
111
 
@@ -123,11 +123,11 @@ annotate my.Genres with {
123
123
  // Authors List
124
124
  //
125
125
  annotate my.Authors with @(
126
- Common.SemanticKey : [ID],
127
- UI : {
128
- Identification : [{ Value: name}],
129
- SelectionFields : [name],
130
- LineItem : [
126
+ Common.SemanticKey: [ID],
127
+ UI: {
128
+ Identification : [{ Value: name}],
129
+ SelectionFields: [ name ],
130
+ LineItem : [
131
131
  { Value: ID },
132
132
  { Value: dateOfBirth },
133
133
  { Value: dateOfDeath },
@@ -136,10 +136,10 @@ annotate my.Authors with @(
136
136
  ],
137
137
  }
138
138
  ) {
139
- ID @Common: {
140
- SemanticObject : 'Authors',
139
+ ID @Common: {
140
+ SemanticObject: 'Authors',
141
141
  Text: name,
142
- TextArrangement : #TextOnly,
142
+ TextArrangement: #TextOnly,
143
143
  };
144
144
  };
145
145
 
@@ -148,16 +148,16 @@ annotate my.Authors with @(
148
148
  // Author Details
149
149
  //
150
150
  annotate my.Authors with @(UI : {
151
- HeaderInfo : {
152
- TypeName : '{i18n>Author}',
153
- TypeNamePlural : '{i18n>Authors}',
154
- Title : { Value: name },
155
- Description : { Value: dateOfBirth }
151
+ HeaderInfo: {
152
+ TypeName : '{i18n>Author}',
153
+ TypeNamePlural: '{i18n>Authors}',
154
+ Title : { Value: name },
155
+ Description : { Value: dateOfBirth }
156
156
  },
157
- Facets : [{
158
- $Type : 'UI.ReferenceFacet',
159
- Target : 'books/@UI.LineItem'
160
- }, ],
157
+ Facets: [{
158
+ $Type : 'UI.ReferenceFacet',
159
+ Target: 'books/@UI.LineItem'
160
+ }],
161
161
  });
162
162
 
163
163
 
@@ -179,14 +179,11 @@ annotate my.Authors with {
179
179
  // Languages List
180
180
  //
181
181
  annotate common.Languages with @(
182
- Common.SemanticKey : [code],
183
- Identification : [{ Value: code}],
184
- UI : {
185
- SelectionFields : [
186
- name,
187
- descr
188
- ],
189
- LineItem : [
182
+ Common.SemanticKey: [code],
183
+ Identification: [{ Value: code }],
184
+ UI: {
185
+ SelectionFields: [ name, descr ],
186
+ LineItem: [
190
187
  { Value: code },
191
188
  { Value: name },
192
189
  ],
@@ -198,18 +195,18 @@ annotate common.Languages with @(
198
195
  // Language Details
199
196
  //
200
197
  annotate common.Languages with @(UI : {
201
- HeaderInfo : {
202
- TypeName : '{i18n>Language}',
203
- TypeNamePlural : '{i18n>Languages}',
204
- Title : { Value: name },
205
- Description : { Value: descr }
198
+ HeaderInfo: {
199
+ TypeName : '{i18n>Language}',
200
+ TypeNamePlural: '{i18n>Languages}',
201
+ Title : { Value: name },
202
+ Description : { Value: descr }
206
203
  },
207
- Facets : [{
208
- $Type : 'UI.ReferenceFacet',
209
- Label : '{i18n>Details}',
210
- Target : '@UI.FieldGroup#Details'
204
+ Facets: [{
205
+ $Type : 'UI.ReferenceFacet',
206
+ Label : '{i18n>Details}',
207
+ Target: '@UI.FieldGroup#Details'
211
208
  }, ],
212
- FieldGroup #Details : {Data : [
209
+ FieldGroup #Details: {Data : [
213
210
  { Value: code },
214
211
  { Value: name },
215
212
  { Value: descr }
@@ -221,14 +218,14 @@ annotate common.Languages with @(UI : {
221
218
  // Currencies List
222
219
  //
223
220
  annotate common.Currencies with @(
224
- Common.SemanticKey : [code],
225
- Identification : [{ Value: code}],
226
- UI : {
227
- SelectionFields : [
221
+ Common.SemanticKey: [code],
222
+ Identification: [{ Value: code}],
223
+ UI: {
224
+ SelectionFields: [
228
225
  name,
229
226
  descr
230
227
  ],
231
- LineItem : [
228
+ LineItem: [
232
229
  { Value: descr },
233
230
  { Value: symbol },
234
231
  { Value: code },
@@ -241,20 +238,20 @@ annotate common.Currencies with @(
241
238
  // Currency Details
242
239
  //
243
240
  annotate common.Currencies with @(UI : {
244
- HeaderInfo : {
245
- TypeName : '{i18n>Currency}',
246
- TypeNamePlural : '{i18n>Currencies}',
247
- Title : { Value: descr },
248
- Description : { Value: code }
241
+ HeaderInfo: {
242
+ TypeName : '{i18n>Currency}',
243
+ TypeNamePlural: '{i18n>Currencies}',
244
+ Title : { Value: descr },
245
+ Description : { Value: code }
249
246
  },
250
- Facets : [
247
+ Facets: [
251
248
  {
252
- $Type : 'UI.ReferenceFacet',
253
- Label : '{i18n>Details}',
254
- Target : '@UI.FieldGroup#Details'
249
+ $Type : 'UI.ReferenceFacet',
250
+ Label : '{i18n>Details}',
251
+ Target: '@UI.FieldGroup#Details'
255
252
  }
256
253
  ],
257
- FieldGroup #Details : {Data : [
254
+ FieldGroup #Details: {Data : [
258
255
  { Value: name },
259
256
  { Value: symbol },
260
257
  { Value: code },
@@ -2,4 +2,5 @@
2
2
  This model controls what gets served to Fiori frontends...
3
3
  */
4
4
  using from './common';
5
+ using from './browse/fiori-service';
5
6
  using from './admin-books/fiori-service';
@@ -10,7 +10,7 @@ module.exports = class TemplateBase {
10
10
  */
11
11
  constructor(generator) {
12
12
  if (generator.options?.for && typeof generator.options?.for !== 'string') {
13
- throw new Error('The --for argument must not be empty.')
13
+ throw 'The --for argument must not be empty.'
14
14
  }
15
15
  this.projectPath = cds.root;
16
16
  this.options = generator.options || {};
@@ -24,7 +24,7 @@ module.exports = class TinySampleTemplate extends require('../templateBase') {
24
24
  await commandUtil.spawnCommand('mvn', mvnAddTestsArgs, { cwd: cds.root })
25
25
  } catch (err) {
26
26
  if (err.code === 'ENOENT' && err.path === 'mvn') {
27
- throw new Error(`Maven executable 'mvn' not found, follow ${term.info(URLS.MAVEN_INSTALL_HELP)} and install Maven on your machine.`)
27
+ throw `Maven executable 'mvn' not found, follow ${term.info(URLS.MAVEN_INSTALL_HELP)} and install Maven on your machine.`
28
28
  }
29
29
  throw err
30
30
  }
@@ -164,7 +164,7 @@ class MvnArchetypeUtil {
164
164
  if (packageFromParam) {
165
165
  // explicitly specified, so do not modify
166
166
  if (!options.force && !packageFromParam.match(REGEX_JAVA_PACKAGE)) {
167
- throw new Error(`Package '${packageFromParam}' is an invalid Java package name. Use --force to use it anyway.`);
167
+ throw `Package '${packageFromParam}' is an invalid Java package name. Use --force to use it anyway.`
168
168
  }
169
169
  } else {
170
170
  // potentially overwritten by mvn param
@@ -56,7 +56,7 @@ module.exports = new class ProjectReader {
56
56
  get hasHtml5Repo() { return _hasFacet('html5-repo') },
57
57
  get hasMta() { return _hasFacet('mta') },
58
58
  get hasHelm() { return _hasFacet('helm') },
59
- get appPath() { return env.folders.app },
59
+ get appPath() { return env.folders.app ?? 'app' },
60
60
  }
61
61
 
62
62
  // setting the effective env as it might have changed by already executed 'add' commands, e.g. cds init foo --add hana,mta
@@ -102,7 +102,7 @@ module.exports = new class ProjectReader {
102
102
  const dependencies = pom?.dependencies?.[0]?.dependency
103
103
  const isOldJavaRuntime = [...dependencies].some(d => /com\.sap\.cloud\.servicesdk/.test(d?.groupId?.[0]))
104
104
  if (isOldJavaRuntime) {
105
- throw new Error("Projects using the classic CAP Java SDK are not supported")
105
+ throw "Projects using the classic CAP Java SDK are not supported"
106
106
  }
107
107
 
108
108
  const descriptor = { archiveName: path.basename(cds.root) + "-exec.jar" }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "7.0.1",
3
+ "version": "7.0.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@sap/cds-dk",
9
- "version": "7.0.1",
9
+ "version": "7.0.2",
10
10
  "license": "SEE LICENSE IN LICENSE",
11
11
  "dependencies": {
12
12
  "@sap/cds": "^7",
@@ -29,17 +29,6 @@
29
29
  "cds": "bin/cds.js",
30
30
  "cds-ts": "bin/cds-ts.js"
31
31
  },
32
- "devDependencies": {
33
- "@types/jest": "^29",
34
- "chai": "^4.3.7",
35
- "chai-as-promised": "^7.1.1",
36
- "chai-subset": "^1.6.0",
37
- "eslint-plugin-cds-dk": "file:.eslint",
38
- "jest": "^29",
39
- "semver": "^7",
40
- "ts-node": "^10.9.1",
41
- "typescript": "^5.0.4"
42
- },
43
32
  "optionalDependencies": {
44
33
  "sqlite3": "^5.0.4"
45
34
  }
@@ -72,12 +61,12 @@
72
61
  }
73
62
  },
74
63
  "node_modules/@eslint/eslintrc": {
75
- "version": "2.0.3",
64
+ "version": "2.1.0",
76
65
  "license": "MIT",
77
66
  "dependencies": {
78
67
  "ajv": "^6.12.4",
79
68
  "debug": "^4.3.2",
80
- "espree": "^9.5.2",
69
+ "espree": "^9.6.0",
81
70
  "globals": "^13.19.0",
82
71
  "ignore": "^5.2.0",
83
72
  "import-fresh": "^3.2.1",
@@ -93,7 +82,7 @@
93
82
  }
94
83
  },
95
84
  "node_modules/@eslint/js": {
96
- "version": "8.43.0",
85
+ "version": "8.44.0",
97
86
  "license": "MIT",
98
87
  "engines": {
99
88
  "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -201,7 +190,7 @@
201
190
  }
202
191
  },
203
192
  "node_modules/@sap/cds": {
204
- "version": "7.0.0",
193
+ "version": "7.0.2",
205
194
  "license": "SEE LICENSE IN LICENSE",
206
195
  "dependencies": {
207
196
  "@sap/cds-compiler": ">=3.9",
@@ -591,7 +580,7 @@
591
580
  }
592
581
  },
593
582
  "node_modules/acorn": {
594
- "version": "8.9.0",
583
+ "version": "8.10.0",
595
584
  "license": "MIT",
596
585
  "bin": {
597
586
  "acorn": "bin/acorn"
@@ -1110,13 +1099,13 @@
1110
1099
  }
1111
1100
  },
1112
1101
  "node_modules/eslint": {
1113
- "version": "8.43.0",
1102
+ "version": "8.44.0",
1114
1103
  "license": "MIT",
1115
1104
  "dependencies": {
1116
1105
  "@eslint-community/eslint-utils": "^4.2.0",
1117
1106
  "@eslint-community/regexpp": "^4.4.0",
1118
- "@eslint/eslintrc": "^2.0.3",
1119
- "@eslint/js": "8.43.0",
1107
+ "@eslint/eslintrc": "^2.1.0",
1108
+ "@eslint/js": "8.44.0",
1120
1109
  "@humanwhocodes/config-array": "^0.11.10",
1121
1110
  "@humanwhocodes/module-importer": "^1.0.1",
1122
1111
  "@nodelib/fs.walk": "^1.2.8",
@@ -1128,7 +1117,7 @@
1128
1117
  "escape-string-regexp": "^4.0.0",
1129
1118
  "eslint-scope": "^7.2.0",
1130
1119
  "eslint-visitor-keys": "^3.4.1",
1131
- "espree": "^9.5.2",
1120
+ "espree": "^9.6.0",
1132
1121
  "esquery": "^1.4.2",
1133
1122
  "esutils": "^2.0.2",
1134
1123
  "fast-deep-equal": "^3.1.3",
@@ -1148,7 +1137,7 @@
1148
1137
  "lodash.merge": "^4.6.2",
1149
1138
  "minimatch": "^3.1.2",
1150
1139
  "natural-compare": "^1.4.0",
1151
- "optionator": "^0.9.1",
1140
+ "optionator": "^0.9.3",
1152
1141
  "strip-ansi": "^6.0.1",
1153
1142
  "strip-json-comments": "^3.1.0",
1154
1143
  "text-table": "^0.2.0"
@@ -1188,10 +1177,10 @@
1188
1177
  }
1189
1178
  },
1190
1179
  "node_modules/espree": {
1191
- "version": "9.5.2",
1180
+ "version": "9.6.0",
1192
1181
  "license": "BSD-2-Clause",
1193
1182
  "dependencies": {
1194
- "acorn": "^8.8.0",
1183
+ "acorn": "^8.9.0",
1195
1184
  "acorn-jsx": "^5.3.2",
1196
1185
  "eslint-visitor-keys": "^3.4.1"
1197
1186
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "7.0.1",
3
+ "version": "7.0.2",
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": [
@@ -1,7 +0,0 @@
1
- {
2
- "cds": {
3
- "features": {
4
- "kibana_formatter": true
5
- }
6
- }
7
- }
@@ -1,14 +0,0 @@
1
- ---
2
- modules:
3
- - name: {{appName}}-srv
4
- type: {{language}}
5
- path: {{& srvPath}}
6
- requires:
7
- - name: {{appName}}-cf-logging
8
-
9
- resources:
10
- - name: {{appName}}-cf-logging
11
- type: org.cloudfoundry.managed-service
12
- parameters:
13
- service: application-logs
14
- service-plan: lite
@@ -1,45 +0,0 @@
1
- const { join } = require('path')
2
- const cds = require('../../../cds')
3
- const { readProject } = require('../../util/projectReader')
4
- const { mergeJSON, mergeYAML } = require('../../util/merge')
5
- const { srvNode4, srvJava4, kibanaLogging } = require('../_merging/registry-mta')
6
-
7
- module.exports = class KibanaLoggingTemplate extends require('../templateBase') {
8
-
9
- async canRun() {
10
- const { hasMta, hasHelm } = await readProject(this.options)
11
- if (hasHelm && !hasMta) {
12
- throw `'cds add kibana-logging' is not available for Kyma yet`
13
- }
14
- return true
15
- }
16
-
17
- async run() {
18
- const project = await readProject(this.options)
19
- const { isJava } = project
20
- if (isJava) cds.error(`kibana-logging is not implemented for project type Java yet`)
21
- await mergeJSON('package.json', join(__dirname, 'files', 'package.json.hbs'), project)
22
- await this.runDependentMerging()
23
- }
24
-
25
- async runDependentMerging() {
26
- const project = await readProject(this.options)
27
- const { hasMta, isNodejs, srvPath } = project
28
-
29
- if (hasMta) {
30
- const srv = (isNodejs ? srvNode4 : srvJava4)(srvPath)
31
- await mergeYAML(
32
- 'mta.yaml',
33
- join(__dirname, 'files', 'mta.yaml.hbs'),
34
- project,
35
- {
36
- additions: [srv, kibanaLogging],
37
- relationships: [{
38
- insert: [kibanaLogging, 'name'],
39
- into: [srv, 'requires', 'name']
40
- }],
41
- }
42
- )
43
- }
44
- }
45
- }