@sap/cds-dk 9.4.2 → 9.5.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 (151) hide show
  1. package/CHANGELOG.md +94 -0
  2. package/bin/compile/index.js +1 -1
  3. package/bin/data-products/index.js +10 -2
  4. package/bin/data-products/prepare-csn.js +63 -26
  5. package/bin/export.js +1 -1
  6. package/bin/help.js +2 -3
  7. package/bin/import.js +13 -3
  8. package/bin/repl.js +7 -11
  9. package/bin/up.js +164 -13
  10. package/bin/util/containerize.js +183 -0
  11. package/bin/version.js +4 -4
  12. package/lib/bind/k8s.js +1 -1
  13. package/lib/build/buildTaskEngine.js +5 -2
  14. package/lib/build/plugin.js +1 -1
  15. package/lib/build/plugins/helm/files/templates/_deployment_helpers.tpl +1 -1
  16. package/lib/build/plugins/helm/index.js +7 -7
  17. package/lib/build/provider/hana/2migration.js +16 -24
  18. package/lib/build/provider/hana/index.js +11 -3
  19. package/lib/build/provider/hana/template/.hdiconfig-all +7 -1
  20. package/lib/build/provider/hana/template/package.json +1 -1
  21. package/lib/build/provider/internalBuildPlugin.js +15 -1
  22. package/lib/build/provider/java/index.js +12 -1
  23. package/lib/build/provider/mtx-sidecar/index.js +2 -1
  24. package/lib/build/provider/nodejs/index.js +2 -1
  25. package/lib/build/util.js +3 -3
  26. package/lib/compile/to_openapi.js +1 -5
  27. package/lib/import/common.js +5 -4
  28. package/lib/import/message.js +1 -1
  29. package/lib/import/odata/ParserContext.js +1 -0
  30. package/lib/import/odata/v4parser.js +48 -3
  31. package/lib/import/openapi/importOpenAPI.js +6 -1
  32. package/lib/init/constants.js +1 -1
  33. package/lib/init/index.js +15 -6
  34. package/lib/init/merge.js +16 -0
  35. package/lib/init/projectReader.js +54 -24
  36. package/lib/init/registries/mta.js +5 -2
  37. package/lib/init/registries/xs-app.js +7 -1
  38. package/lib/init/template/ams/index.js +1 -1
  39. package/lib/init/template/app-frontend/files/app-package.json.hbs +1 -7
  40. package/lib/init/template/app-frontend/files/ui5.yaml.hbs +20 -1
  41. package/lib/init/template/app-frontend/index.js +0 -4
  42. package/lib/init/template/application-logging/index.js +9 -14
  43. package/lib/init/template/approuter/files/mta.yaml.hbs +7 -2
  44. package/lib/init/template/approuter/index.js +21 -16
  45. package/lib/init/template/audit-logging/index.js +2 -2
  46. package/lib/init/template/cloud-logging/index.js +2 -3
  47. package/lib/init/template/containerize/files/containerize.yaml.hbs +17 -3
  48. package/lib/init/template/containerize/index.js +0 -4
  49. package/lib/init/template/data/as-json.js +18 -20
  50. package/lib/init/template/destination/index.js +0 -4
  51. package/lib/init/template/dynatrace/index.js +0 -2
  52. package/lib/init/template/github-actions/files/kyma-setup/action.yaml +0 -2
  53. package/lib/init/template/github-actions/files/workflows/cf.yaml.hbs +16 -1
  54. package/lib/init/template/github-actions/files/workflows/test.yaml.hbs +20 -0
  55. package/lib/init/template/github-actions/index.js +5 -8
  56. package/lib/init/template/hana/files/db/package.json +2 -2
  57. package/lib/init/template/hana/files/mta.yaml.hbs +0 -4
  58. package/lib/init/template/hana/index.js +5 -7
  59. package/lib/init/template/helm/index.js +16 -33
  60. package/lib/init/template/helm-unified-runtime/index.js +0 -4
  61. package/lib/init/template/html5-repo/files/app-package.json.hbs +1 -7
  62. package/lib/init/template/html5-repo/files/containerize.yaml.hbs +0 -9
  63. package/lib/init/template/html5-repo/files/mta.yaml.hbs +0 -7
  64. package/lib/init/template/html5-repo/files/ui5.yaml.hbs +20 -1
  65. package/lib/init/template/html5-repo/files/values.yaml.hbs +6 -0
  66. package/lib/init/template/html5-repo/files/xs-app.json.hbs +5 -3
  67. package/lib/init/template/html5-repo/index.js +8 -14
  68. package/lib/init/template/ias/files/values.yaml.hbs +6 -6
  69. package/lib/init/template/ias/index.js +14 -23
  70. package/lib/init/template/kyma/index.js +14 -1
  71. package/lib/init/template/malware-scanner/files/mta.yaml.hbs +3 -1
  72. package/lib/init/template/malware-scanner/files/values.yaml +3 -1
  73. package/lib/init/template/multitenancy/files/mta.yaml.hbs +1 -3
  74. package/lib/init/template/multitenancy/files/values.yaml.hbs +8 -0
  75. package/lib/init/template/multitenancy/index.js +10 -5
  76. package/lib/init/template/nodejs/files/package.json.hbs +1 -1
  77. package/lib/init/template/pipeline/files/app-package.json.hbs +1 -7
  78. package/lib/init/template/pipeline/files/ui5.yaml.hbs +20 -1
  79. package/lib/init/template/pipeline/index.js +6 -3
  80. package/lib/init/template/portal/files/mta.yaml.hbs +5 -3
  81. package/lib/init/template/portal/index.js +3 -6
  82. package/lib/init/template/sample/files/_i18n/i18n_de.properties +12 -0
  83. package/lib/init/template/sample/files/_i18n/i18n_en.properties +21 -0
  84. package/lib/init/template/sample/files/_i18n/i18n_fr.properties +20 -0
  85. package/lib/init/template/sample/files/_i18n/messages_de.properties +34 -0
  86. package/lib/init/template/sample/files/_i18n/messages_en.properties +34 -0
  87. package/lib/init/template/sample/files/_i18n/messages_fr.properties +34 -0
  88. package/lib/init/template/sample/files/app/_i18n/i18n_de.properties +0 -26
  89. package/lib/init/template/sample/files/app/_i18n/i18n_en.properties +8 -0
  90. package/lib/init/template/sample/files/app/admin-authors/fiori-service.cds +52 -0
  91. package/lib/init/template/sample/files/app/admin-authors/webapp/Component.js.hbs +3 -0
  92. package/lib/init/template/sample/files/app/admin-authors/webapp/i18n/i18n.properties +11 -0
  93. package/lib/init/template/sample/files/app/admin-authors/webapp/manifest.json +130 -0
  94. package/lib/init/template/sample/files/app/admin-books/fiori-service.cds +81 -88
  95. package/lib/init/template/sample/files/app/admin-books/webapp/Component.js.hbs +3 -0
  96. package/lib/init/template/sample/files/app/admin-books/webapp/i18n/i18n.properties +10 -2
  97. package/lib/init/template/sample/files/app/admin-books/webapp/manifest.json +24 -48
  98. package/lib/init/template/sample/files/app/appconfig/fioriSandboxConfig.json +54 -3
  99. package/lib/init/template/sample/files/app/browse/fiori-service.cds +30 -30
  100. package/lib/init/template/sample/files/app/browse/webapp/Component.js.hbs +3 -0
  101. package/lib/init/template/sample/files/app/browse/webapp/i18n/i18n.properties +10 -3
  102. package/lib/init/template/sample/files/app/browse/webapp/manifest.json +18 -23
  103. package/lib/init/template/sample/files/app/common.cds +126 -158
  104. package/lib/init/template/sample/files/app/fiori-apps.html +30 -0
  105. package/lib/init/template/sample/files/app/genres/fiori-service.cds +33 -0
  106. package/lib/init/template/sample/files/app/genres/tree-view.cds +42 -0
  107. package/lib/init/template/sample/files/app/genres/value-help.cds +6 -0
  108. package/lib/init/template/sample/files/app/genres/webapp/Component.js.hbs +3 -0
  109. package/lib/init/template/sample/files/app/genres/webapp/i18n/i18n.properties +4 -0
  110. package/lib/init/template/sample/files/app/genres/webapp/i18n/i18n_de.properties +2 -0
  111. package/lib/init/template/sample/files/app/genres/webapp/manifest.json +126 -0
  112. package/lib/init/template/sample/files/app/services.cds +6 -2
  113. package/lib/init/template/sample/files/db/currencies.cds +13 -0
  114. package/lib/init/template/sample/files/db/data/sap.capire.bookshop-Books.csv +5 -5
  115. package/lib/init/template/sample/files/db/data/{sap.capire.bookshop-Books_texts.csv → sap.capire.bookshop-Books.texts.csv} +4 -4
  116. package/lib/init/template/sample/files/db/data/sap.capire.bookshop-Genres.csv +42 -15
  117. package/lib/init/template/sample/files/db/data/sap.common-Currencies.csv +12 -0
  118. package/lib/init/template/sample/files/db/data/sap.common-Currencies.texts.csv +15 -0
  119. package/lib/init/template/sample/files/db/hana/index.cds +10 -0
  120. package/lib/init/template/sample/files/db/schema.cds +35 -22
  121. package/lib/init/template/sample/files/db/sqlite/index.cds +10 -0
  122. package/lib/init/template/sample/files/package.json.hbs +14 -1
  123. package/lib/init/template/sample/files/srv/access-control.cds +3 -0
  124. package/lib/init/template/sample/files/srv/admin-service.cds +3 -2
  125. package/lib/init/template/sample/files/srv/cat-service.cds +7 -11
  126. package/lib/init/template/sample/index.js +26 -17
  127. package/lib/init/template/telemetry/index.js +1 -3
  128. package/lib/init/template/typescript/files/package.json +1 -1
  129. package/lib/init/template/workzone-standard/files/mta.yaml.hbs +0 -5
  130. package/lib/init/template/workzone-standard/index.js +0 -1
  131. package/lib/init/template/xsuaa/files/mta.yaml.hbs +4 -0
  132. package/lib/init/template/xsuaa/index.js +5 -7
  133. package/lib/lint/Linter.js +10 -4
  134. package/lib/lint/eslintHelp.json +1 -1
  135. package/lib/mtx/tenant_action.js +12 -4
  136. package/lib/util/checksum.js +32 -0
  137. package/lib/util/question.js +60 -7
  138. package/npm-shrinkwrap.json +61 -37
  139. package/package.json +2 -2
  140. package/lib/init/template/app-frontend/files/ui5-deploy.yaml.hbs +0 -25
  141. package/lib/init/template/github-actions/files/cf-setup/action.yaml +0 -53
  142. package/lib/init/template/html5-repo/files/ui5-deploy.yaml.hbs +0 -25
  143. package/lib/init/template/pipeline/files/ui5-deploy.yaml.hbs +0 -25
  144. package/lib/init/template/sample/files/app/_i18n/i18n.properties +0 -29
  145. package/lib/init/template/sample/files/app/admin-books/webapp/Component.js +0 -8
  146. package/lib/init/template/sample/files/app/admin-books/webapp/i18n/i18n_de.properties +0 -3
  147. package/lib/init/template/sample/files/app/admin-books/webapp/i18n/i18n_en.properties +0 -3
  148. package/lib/init/template/sample/files/app/browse/webapp/Component.js +0 -7
  149. package/lib/init/template/sample/files/app/browse/webapp/i18n/i18n_de.properties +0 -3
  150. package/lib/init/template/sample/files/app/browse/webapp/i18n/i18n_en.properties +0 -4
  151. package/lib/init/template/sample/files/app/index.html +0 -32
@@ -0,0 +1,126 @@
1
+ {
2
+ "_version": "1.8.0",
3
+ "sap.app": {
4
+ "id": "genres",
5
+ "type": "application",
6
+ "title": "{{appTitle}}",
7
+ "description": "{{appDescription}}",
8
+ "applicationVersion": {
9
+ "version": "1.0.0"
10
+ },
11
+ "dataSources": {
12
+ "AdminService": {
13
+ "uri": "odata/v4/admin/",
14
+ "type": "OData",
15
+ "settings": {
16
+ "odataVersion": "4.0"
17
+ }
18
+ }
19
+ },
20
+ "crossNavigation": {
21
+ "inbounds": {
22
+ "Genres-display": {
23
+ "signature": {
24
+ "parameters": {},
25
+ "additionalParameters": "allowed"
26
+ },
27
+ "title": "{{appTitle}}",
28
+ "subTitle": "{{appDescription}}",
29
+ "semanticObject": "Genres",
30
+ "action": "display"
31
+ }
32
+ }
33
+ }
34
+ },
35
+ "sap.ui5": {
36
+ "dependencies": {
37
+ "minUI5Version": "1.136.0",
38
+ "libs": {
39
+ "sap.fe.templates": {}
40
+ }
41
+ },
42
+ "models": {
43
+ "i18n": {
44
+ "type": "sap.ui.model.resource.ResourceModel",
45
+ "uri": "i18n/i18n.properties"
46
+ },
47
+ "": {
48
+ "dataSource": "AdminService",
49
+ "settings": {
50
+ "synchronizationMode": "None",
51
+ "operationMode": "Server",
52
+ "autoExpandSelect": true,
53
+ "earlyRequests": true
54
+ }
55
+ }
56
+ },
57
+ "routing": {
58
+ "routes": [
59
+ {
60
+ "pattern": ":?query:",
61
+ "name": "GenresList",
62
+ "target": "GenresList"
63
+ },
64
+ {
65
+ "pattern": "Genres({key}):?query:",
66
+ "name": "GenresDetails",
67
+ "target": "GenresDetails"
68
+ }
69
+ ],
70
+ "targets": {
71
+ "GenresList": {
72
+ "type": "Component",
73
+ "id": "GenresList",
74
+ "name": "sap.fe.templates.ListReport",
75
+ "options": {
76
+ "settings": {
77
+ "contextPath": "/Genres",
78
+ "liveMode": true,
79
+ "navigation": {
80
+ "Genres": {
81
+ "detail": {
82
+ "route": "GenresDetails"
83
+ }
84
+ }
85
+ },
86
+ "controlConfiguration": {
87
+ "@com.sap.vocabularies.UI.v1.LineItem": {
88
+ "tableSettings": {
89
+ "hierarchyQualifier": "GenresHierarchy",
90
+ "type": "TreeTable"
91
+ }
92
+ }
93
+ }
94
+ }
95
+ }
96
+ },
97
+ "GenresDetails": {
98
+ "type": "Component",
99
+ "id": "GenresDetails",
100
+ "name": "sap.fe.templates.ObjectPage",
101
+ "options": {
102
+ "settings": {
103
+ "contextPath": "/Genres"
104
+ }
105
+ }
106
+ }
107
+ }
108
+ },
109
+ "contentDensities": {
110
+ "compact": true,
111
+ "cozy": true
112
+ }
113
+ },
114
+ "sap.ui": {
115
+ "technology": "UI5",
116
+ "deviceTypes": {
117
+ "desktop": true,
118
+ "tablet": true,
119
+ "phone": true
120
+ }
121
+ },
122
+ "sap.fiori": {
123
+ "registrationIds": [],
124
+ "archeType": "transactional"
125
+ }
126
+ }
@@ -1,6 +1,10 @@
1
1
  /*
2
2
  This model controls what gets served to Fiori frontends...
3
3
  */
4
- using from './common';
5
- using from './browse/fiori-service';
4
+
5
+ using from './admin-authors/fiori-service';
6
6
  using from './admin-books/fiori-service';
7
+ using from './browse/fiori-service';
8
+ using from './genres/fiori-service';
9
+
10
+ using from './common';
@@ -0,0 +1,13 @@
1
+ using { sap } from '@sap/cds/common';
2
+
3
+ extend sap.common.Currencies with {
4
+ // Currencies.code = ISO 4217 alphabetic three-letter code
5
+ // with the first two letters being equal to ISO 3166 alphabetic country codes
6
+ // See also:
7
+ // [1] https://www.iso.org/iso-4217-currency-codes.html
8
+ // [2] https://www.currency-iso.org/en/home/tables/table-a1.html
9
+ // [3] https://www.ibm.com/support/knowledgecenter/en/SSZLC2_7.0.0/com.ibm.commerce.payments.developer.doc/refs/rpylerl2mst97.htm
10
+ numcode : Integer;
11
+ exponent : Integer; //> e.g. 2 --> 1 Dollar = 10^2 Cent
12
+ minor : String; //> e.g. 'Cent'
13
+ }
@@ -1,6 +1,6 @@
1
1
  ID,title,descr,author_ID,stock,price,currency_code,genre_ID
2
- 201,Wuthering Heights,"Wuthering Heights, Emily Brontë's only novel, was published in 1847 under the pseudonym ""Ellis Bell"". It was written between October 1845 and June 1846. Wuthering Heights and Anne Brontë's Agnes Grey were accepted by publisher Thomas Newby before the success of their sister Charlotte's novel Jane Eyre. After Emily's death, Charlotte edited the manuscript of Wuthering Heights and arranged for the edited version to be published as a posthumous second edition in 1850.",101,12,11.11,GBP,11
3
- 207,Jane Eyre,"Jane Eyre /ɛər/ (originally published as Jane Eyre: An Autobiography) is a novel by English writer Charlotte Brontë, published under the pen name ""Currer Bell"", on 16 October 1847, by Smith, Elder & Co. of London. The first American edition was published the following year by Harper & Brothers of New York. Primarily a bildungsroman, Jane Eyre follows the experiences of its eponymous heroine, including her growth to adulthood and her love for Mr. Rochester, the brooding master of Thornfield Hall. The novel revolutionised prose fiction in that the focus on Jane's moral and spiritual development is told through an intimate, first-person narrative, where actions and events are coloured by a psychological intensity. The book contains elements of social criticism, with a strong sense of Christian morality at its core and is considered by many to be ahead of its time because of Jane's individualistic character and how the novel approaches the topics of class, sexuality, religion and feminism.",107,11,12.34,GBP,11
4
- 251,The Raven,"""The Raven"" is a narrative poem by American writer Edgar Allan Poe. First published in January 1845, the poem is often noted for its musicality, stylized language, and supernatural atmosphere. It tells of a talking raven's mysterious visit to a distraught lover, tracing the man's slow fall into madness. The lover, often identified as being a student, is lamenting the loss of his love, Lenore. Sitting on a bust of Pallas, the raven seems to further distress the protagonist with its constant repetition of the word ""Nevermore"". The poem makes use of folk, mythological, religious, and classical references.",150,333,13.13,USD,16
5
- 252,Eleonora,"""Eleonora"" is a short story by Edgar Allan Poe, first published in 1842 in Philadelphia in the literary annual The Gift. It is often regarded as somewhat autobiographical and has a relatively ""happy"" ending.",150,555,14,USD,16
6
- 271,Catweazle,"Catweazle is a British fantasy television series, starring Geoffrey Bayldon in the title role, and created by Richard Carpenter for London Weekend Television. The first series, produced and directed by Quentin Lawrence, was screened in the UK on ITV in 1970. The second series, directed by David Reid and David Lane, was shown in 1971. Each series had thirteen episodes, most but not all written by Carpenter, who also published two books based on the scripts.",170,22,150,JPY,13
2
+ 201,Wuthering Heights,"Wuthering Heights, Emily Brontë's only novel, was published in 1847 under the pseudonym ""Ellis Bell"". It was written between October 1845 and June 1846. Wuthering Heights and Anne Brontë's Agnes Grey were accepted by publisher Thomas Newby before the success of their sister Charlotte's novel Jane Eyre. After Emily's death, Charlotte edited the manuscript of Wuthering Heights and arranged for the edited version to be published as a posthumous second edition in 1850.",101,12,11.11,GBP,11aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
3
+ 207,Jane Eyre,"Jane Eyre /ɛər/ (originally published as Jane Eyre: An Autobiography) is a novel by English writer Charlotte Brontë, published under the pen name ""Currer Bell"", on 16 October 1847, by Smith, Elder & Co. of London. The first American edition was published the following year by Harper & Brothers of New York. Primarily a bildungsroman, Jane Eyre follows the experiences of its eponymous heroine, including her growth to adulthood and her love for Mr. Rochester, the brooding master of Thornfield Hall. The novel revolutionised prose fiction in that the focus on Jane's moral and spiritual development is told through an intimate, first-person narrative, where actions and events are coloured by a psychological intensity. The book contains elements of social criticism, with a strong sense of Christian morality at its core and is considered by many to be ahead of its time because of Jane's individualistic character and how the novel approaches the topics of class, sexuality, religion and feminism.",107,11,12.34,GBP,11aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
4
+ 251,The Raven,"""The Raven"" is a narrative poem by American writer Edgar Allan Poe. First published in January 1845, the poem is often noted for its musicality, stylized language, and supernatural atmosphere. It tells of a talking raven's mysterious visit to a distraught lover, tracing the man's slow fall into madness. The lover, often identified as being a student, is lamenting the loss of his love, Lenore. Sitting on a bust of Pallas, the raven seems to further distress the protagonist with its constant repetition of the word ""Nevermore"". The poem makes use of folk, mythological, religious, and classical references.",150,333,13.13,USD,16aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
5
+ 252,Eleonora,"""Eleonora"" is a short story by Edgar Allan Poe, first published in 1842 in Philadelphia in the literary annual The Gift. It is often regarded as somewhat autobiographical and has a relatively ""happy"" ending.",150,555,14,USD,15aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
6
+ 271,Catweazle,"Catweazle is a British fantasy television series, starring Geoffrey Bayldon in the title role, and created by Richard Carpenter for London Weekend Television. The first series, produced and directed by Quentin Lawrence, was screened in the UK on ITV in 1970. The second series, directed by David Reid and David Lane, was shown in 1971. Each series had thirteen episodes, most but not all written by Carpenter, who also published two books based on the scripts.",170,22,150,JPY,13aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
@@ -1,5 +1,5 @@
1
1
  ID_texts,ID,locale,title,descr
2
- 52eee553-266d-4fdd-a5ca-909910e76ae4,201,de,Sturmhöhe,"Sturmhöhe (Originaltitel: Wuthering Heights) ist der einzige Roman der englischen Schriftstellerin Emily Brontë (1818–1848). Der 1847 unter dem Pseudonym Ellis Bell veröffentlichte Roman wurde vom viktorianischen Publikum weitgehend abgelehnt, heute gilt er als ein Klassiker der britischen Romanliteratur des 19. Jahrhunderts."
3
- 54e58142-f06e-49c1-a51d-138f86cea34e,201,fr,Les Hauts de Hurlevent,"Les Hauts de Hurlevent (titre original : Wuthering Heights), parfois orthographié Les Hauts de Hurle-Vent, est l'unique roman d'Emily Brontë, publié pour la première fois en 1847 sous le pseudonyme d’Ellis Bell. Loin d'être un récit moralisateur, Emily Brontë achève néanmoins le roman dans une atmosphère sereine, suggérant le triomphe de la paix et du Bien sur la vengeance et le Mal."
4
- bbbf8a88-797d-4790-af1c-1cc857718ee0,207,de,Jane Eyre,"Jane Eyre. Eine Autobiographie (Originaltitel: Jane Eyre. An Autobiography), erstmals erschienen im Jahr 1847 unter dem Pseudonym Currer Bell, ist der erste veröffentlichte Roman der britischen Autorin Charlotte Brontë und ein Klassiker der viktorianischen Romanliteratur des 19. Jahrhunderts. Der Roman erzählt in Form einer Ich-Erzählung die Lebensgeschichte von Jane Eyre (ausgesprochen /ˌdʒeɪn ˈɛə/), die nach einer schweren Kindheit eine Stelle als Gouvernante annimmt und sich in ihren Arbeitgeber verliebt, jedoch immer wieder um ihre Freiheit und Selbstbestimmung kämpfen muss. Als klein, dünn, blass, stets schlicht dunkel gekleidet und mit strengem Mittelscheitel beschrieben, gilt die Heldin des Romans Jane Eyre nicht zuletzt aufgrund der Kino- und Fernsehversionen der melodramatischen Romanvorlage als die bekannteste englische Gouvernante der Literaturgeschichte"
5
- a90d4378-1a3e-48e7-b60b-5670e78807e1,252,de,Eleonora,“Eleonora” ist eine Erzählung von Edgar Allan Poe. Sie wurde 1841 erstveröffentlicht. In ihr geht es um das Paradox der Treue in der Treulosigkeit.
2
+ d2a65a27-9f2a-480f-bc38-84ee8ec5c13e,201,de,Sturmhöhe,"Sturmhöhe (Originaltitel: Wuthering Heights) ist der einzige Roman der englischen Schriftstellerin Emily Brontë (1818–1848). Der 1847 unter dem Pseudonym Ellis Bell veröffentlichte Roman wurde vom viktorianischen Publikum weitgehend abgelehnt, heute gilt er als ein Klassiker der britischen Romanliteratur des 19. Jahrhunderts."
3
+ 8c42c706-a979-41cf-9ffe-91e6cf1383a0,201,fr,Les Hauts de Hurlevent,"Les Hauts de Hurlevent (titre original : Wuthering Heights), parfois orthographié Les Hauts de Hurle-Vent, est l'unique roman d'Emily Brontë, publié pour la première fois en 1847 sous le pseudonyme d’Ellis Bell. Loin d'être un récit moralisateur, Emily Brontë achève néanmoins le roman dans une atmosphère sereine, suggérant le triomphe de la paix et du Bien sur la vengeance et le Mal."
4
+ 9e1c4c81-dc90-4600-85b1-e9dd4bf12ce0,207,de,Jane Eyre,"Jane Eyre. Eine Autobiographie (Originaltitel: Jane Eyre. An Autobiography), erstmals erschienen im Jahr 1847 unter dem Pseudonym Currer Bell, ist der erste veröffentlichte Roman der britischen Autorin Charlotte Brontë und ein Klassiker der viktorianischen Romanliteratur des 19. Jahrhunderts. Der Roman erzählt in Form einer Ich-Erzählung die Lebensgeschichte von Jane Eyre (ausgesprochen /ˌdʒeɪn ˈɛə/), die nach einer schweren Kindheit eine Stelle als Gouvernante annimmt und sich in ihren Arbeitgeber verliebt, jedoch immer wieder um ihre Freiheit und Selbstbestimmung kämpfen muss. Als klein, dünn, blass, stets schlicht dunkel gekleidet und mit strengem Mittelscheitel beschrieben, gilt die Heldin des Romans Jane Eyre nicht zuletzt aufgrund der Kino- und Fernsehversionen der melodramatischen Romanvorlage als die bekannteste englische Gouvernante der Literaturgeschichte"
5
+ 9be0524b-4cb9-4fc1-9dc2-d65b1c13cf53,252,de,Eleonora,"“Eleonora” ist eine Erzählung von Edgar Allan Poe. Sie wurde 1841 erstveröffentlicht. In ihr geht es um das Paradox der Treue in der Treulosigkeit."
@@ -1,16 +1,43 @@
1
1
  ID,parent_ID,name
2
- 10,,Fiction
3
- 11,10,Drama
4
- 12,10,Poetry
5
- 13,10,Fantasy
6
- 14,10,Science Fiction
7
- 15,10,Romance
8
- 16,10,Mystery
9
- 17,10,Thriller
10
- 18,10,Dystopia
11
- 19,10,Fairy Tale
12
- 20,,Non-Fiction
13
- 21,20,Biography
14
- 22,21,Autobiography
15
- 23,20,Essay
16
- 24,20,Speech
2
+ 10aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,,Fiction
3
+ 11aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,10aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Drama
4
+ 12aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,10aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Poetry
5
+ 13aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,10aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Fantasy
6
+ 131aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,13aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Fairy Tale
7
+ 132aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,13aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Epic Fantasy
8
+ 133aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,13aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,High Fantasy
9
+ 134aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,13aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Gothic
10
+ 14aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,10aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Science Fiction
11
+ 141aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,14aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Utopian and Dystopian
12
+ 1411aaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,141aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Utopian
13
+ 1412aaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,141aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Dystopian
14
+ 14121aaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,1412aaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Cyberpunk
15
+ 141211aa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,14121aaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Steampunk
16
+ 142aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,14aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Space Opera
17
+ 143aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,14aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Time Travel
18
+ 144aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,14aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Tech Noir
19
+ 15aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,10aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Romance
20
+ 151aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,15aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Contemporary Romance
21
+ 152aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,15aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Historical Romance
22
+ 153aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,15aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Romantic Suspense
23
+ 16aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,10aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Mystery
24
+ 161aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,16aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Crime
25
+ 1611aaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,161aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Thriller
26
+ 16111aaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,1611aaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Police Procedural
27
+ 16112aaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,1611aaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Legal Thriller
28
+ 16113aaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,1611aaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Medical Thriller
29
+ 16114aaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,1611aaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Spy Thriller
30
+ 1612aaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,161aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Detective
31
+ 1613aaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,161aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Suspense
32
+ 162aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,16aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Noir
33
+ 1621aaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,162aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Nordic Noir
34
+ 1622aaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,162aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Tart Noir
35
+ 163aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,16aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Cozy Mystery
36
+ 17aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,10aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Adventure
37
+ 18aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,10aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Short Story
38
+ 19aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,10aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Graphic Novel
39
+ 20aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,,Non-Fiction
40
+ 21aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,20aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Biography
41
+ 22aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,21aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Autobiography
42
+ 23aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,20aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Essay
43
+ 24aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,20aaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,Speech
@@ -0,0 +1,12 @@
1
+ code,symbol,name,descr,numcode,minor,exponent
2
+ EUR,€,Euro,European Euro,978,Cent,2
3
+ USD,$,US Dollar,United States Dollar,840,Cent,2
4
+ CAD,$,Canadian Dollar,Canadian Dollar,124,Cent,2
5
+ AUD,$,Australian Dollar,Australian Dollar,036,Cent,2
6
+ GBP,£,British Pound,Great Britain Pound,826,Penny,2
7
+ ILS,₪,Shekel,Israeli New Shekel,376,Agorat,2
8
+ INR,₹,Rupee,Indian Rupee,356,Paise,2
9
+ QAR,﷼,Riyal,Katar Riyal,356,Dirham,2
10
+ SAR,﷼,Riyal,Saudi Riyal,682,Halala,2
11
+ JPY,¥,Yen,Japanese Yen,392,Sen,2
12
+ CNY,¥,Yuan,Chinese Yuan Renminbi,156,Jiao,1
@@ -0,0 +1,15 @@
1
+ code,locale,name,descr
2
+ EUR,de,Euro,European Euro
3
+ USD,de,US-Dollar,United States Dollar
4
+ CAD,de,Kanadischer Dollar,Kanadischer Dollar
5
+ AUD,de,Australischer Dollar,Australischer Dollar
6
+ GBP,de,Pfund,Britische Pfund
7
+ ILS,de,Schekel,Israelische Schekel
8
+ JPY,de,Yen,Japanische Yen
9
+ EUR,fr,euro,de la Zone euro
10
+ USD,fr,dollar,dollar des États-Unis
11
+ CAD,fr,dollar canadien,dollar canadien
12
+ AUD,fr,dollar australien,dollar australien
13
+ GBP,fr,livre sterling,pound sterling
14
+ ILS,fr,Shekel,shekel israelien
15
+ JPY,fr,Yen,Yen japonais
@@ -0,0 +1,10 @@
1
+ //
2
+ // Add Author.age and .lifetime with a DB-specific function
3
+ //
4
+
5
+ using { AdminService } from '../../srv/admin-service';
6
+
7
+ extend projection AdminService.Authors with {
8
+ YEARS_BETWEEN(dateOfBirth, dateOfDeath) as age: Integer,
9
+ YEAR(dateOfBirth) || ' – ' || YEAR(dateOfDeath) as lifetime : String
10
+ }
@@ -1,33 +1,46 @@
1
- using { Currency, managed, sap } from '@sap/cds/common';
1
+ using {
2
+ Currency,
3
+ cuid,
4
+ managed,
5
+ sap
6
+ } from '@sap/cds/common';
2
7
 
3
8
  namespace sap.capire.bookshop;
4
9
 
5
10
  entity Books : managed {
6
- key ID : Integer;
7
- title : localized String(111) @mandatory;
8
- descr : localized String(1111);
9
- author : Association to Authors @mandatory;
10
- genre : Association to Genres;
11
- stock : Integer;
12
- price : Decimal;
13
- currency : Currency;
11
+ key ID : Integer;
12
+ author : Association to Authors @mandatory;
13
+ title : localized String @mandatory;
14
+ descr : localized String;
15
+ genre : Association to Genres;
16
+ stock : Integer;
17
+ price : Price;
18
+ currency : Currency;
14
19
  }
15
20
 
16
21
  entity Authors : managed {
17
- key ID : Integer;
18
- name : String(111) @mandatory;
19
- dateOfBirth : Date;
20
- dateOfDeath : Date;
21
- placeOfBirth : String;
22
- placeOfDeath : String;
23
- books : Association to many Books
24
- on books.author = $self;
22
+ key ID : Integer;
23
+ name : String @mandatory;
24
+ dateOfBirth : Date;
25
+ dateOfDeath : Date;
26
+ placeOfBirth : String;
27
+ placeOfDeath : String;
28
+ books : Association to many Books
29
+ on books.author = $self;
25
30
  }
26
31
 
27
32
  /** Hierarchically organized Code List for Genres */
28
- entity Genres : sap.common.CodeList {
29
- key ID : Integer;
30
- parent : Association to Genres;
31
- children : Composition of many Genres
32
- on children.parent = $self;
33
+ entity Genres : cuid, sap.common.CodeList {
34
+ parent : Association to Genres;
35
+ children : Composition of many Genres
36
+ on children.parent = $self;
33
37
  }
38
+
39
+ type Price : Decimal(9, 2);
40
+
41
+
42
+ // --------------------------------------------------------------------------------
43
+ // Temporary workaround for this situation:
44
+ // - Fiori apps in bookstore annotate Books with @fiori.draft.enabled.
45
+ // - Because of that .csv data has to eagerly fill in ID_texts column.
46
+ annotate Books with @fiori.draft.enabled;
@@ -0,0 +1,10 @@
1
+ //
2
+ // Add Author.age and .lifetime with a DB-specific function
3
+ //
4
+
5
+ using { AdminService } from '../../srv/admin-service';
6
+
7
+ extend projection AdminService.Authors with {
8
+ strftime('%Y',dateOfDeath)-strftime('%Y',dateOfBirth) as age: Integer,
9
+ strftime('%Y',dateOfBirth) || ' – ' || strftime('%Y',dateOfDeath) as lifetime : String
10
+ }
@@ -1 +1,14 @@
1
- {}
1
+ {
2
+ "cds": {
3
+ "requires": {
4
+ "db-ext": {
5
+ "[development]": {
6
+ "model": "db/sqlite"
7
+ },
8
+ "[production]": {
9
+ "model": "db/hana"
10
+ }
11
+ }
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,3 @@
1
+ using {AdminService} from './admin-service';
2
+
3
+ annotate AdminService with @requires: 'admin';
@@ -1,6 +1,7 @@
1
1
  using {sap.capire.bookshop as my} from '../db/schema';
2
2
 
3
- service AdminService @(requires: 'admin') {
4
- entity Books as projection on my.Books;
3
+ service AdminService {
5
4
  entity Authors as projection on my.Authors;
5
+ entity Books as projection on my.Books;
6
+ entity Genres as projection on my.Genres;
6
7
  }
@@ -5,7 +5,11 @@ service CatalogService {
5
5
  /** For displaying lists of Books */
6
6
  @readonly
7
7
  entity ListOfBooks as
8
- projection on Books
8
+ projection on Books {
9
+ *,
10
+ genre.name as genre,
11
+ currency.symbol as currency,
12
+ }
9
13
  excluding {
10
14
  descr
11
15
  };
@@ -23,15 +27,7 @@ service CatalogService {
23
27
  };
24
28
 
25
29
  @requires: 'authenticated-user'
26
- action submitOrder(book : Books : ID @mandatory,
27
- quantity : Integer @mandatory
28
- ) returns {
29
- stock : Integer
30
- };
31
-
32
- event OrderedBook : {
33
- book : Books : ID;
34
- quantity : Integer;
35
- buyer : String
30
+ action submitOrder(book: Books:ID, quantity: Integer) returns {
31
+ stock : Integer
36
32
  };
37
33
  }
@@ -19,29 +19,38 @@ module.exports = class SampleTemplate extends require('../../plugin') {
19
19
  return new ExtensionGenerator().addSample()
20
20
  }
21
21
 
22
- const { db, srv, app } = env4('production').folders
23
-
24
- switch (project.language) {
25
- case 'nodejs': {
26
- await Promise.all([
27
- copy(join(__dirname, 'files/db')).to(db),
28
- copy(join(__dirname, 'files/srv')).to(srv)
29
- ])
30
- const lang = project.isTypescript ? 'typescript' : 'javascript'
31
- await renderAndCopy(join(__dirname, 'files', lang), srv, project)
32
- await copy(join(__dirname, 'files/app')).to(app)
33
- break
22
+ const env = env4('production')
23
+ const { db, srv, app } = env.folders
24
+ const i18n = env.i18n.folders[0]
25
+ const { appName, appPath } = project
26
+
27
+ if (project.language === 'java') {
28
+ await mvn.add('sample')
29
+ } else {
30
+ await Promise.all([
31
+ copy(join(__dirname, 'files/db')).to(db),
32
+ copy(join(__dirname, 'files/srv')).to(srv),
33
+ copy(join(__dirname, 'files/_i18n')).to(i18n)
34
+ ])
35
+ const lang = project.isTypescript ? 'typescript' : 'javascript'
36
+ await renderAndCopy(join(__dirname, 'files', lang), srv, project)
37
+ for (const uiApp of ['admin-books', 'admin-authors', 'browse', 'genres']) {
38
+ project.app = uiApp
39
+ await renderAndCopy(join(__dirname, 'files/app', uiApp), join(app, uiApp), project)
34
40
  }
35
- case 'java':
36
- await mvn.add('sample')
37
- break
41
+ await Promise.all([
42
+ copy(join(__dirname, 'files/app/common.cds')).to(app, 'common.cds'),
43
+ copy(join(__dirname, 'files/app/fiori-apps.html')).to(app, 'fiori-apps.html'),
44
+ copy(join(__dirname, 'files/app/services.cds')).to(app, 'services.cds'),
45
+ copy(join(__dirname, 'files/app/appconfig')).to(app, 'appconfig'),
46
+ copy(join(__dirname, 'files/app/_i18n')).to(app, '_i18n')
47
+ ])
38
48
  }
39
49
 
40
- const { appName, appPath, appUIPaths } = project
41
50
  await merge(__dirname, 'files/package.json.hbs').into('package.json', { with: { appPath }})
42
51
 
43
52
  // manifest.json must be unique
44
- await Promise.all(appUIPaths.map(async p => {
53
+ await Promise.all(project.appUIPaths.map(async p => {
45
54
  const manifest = await read(join(appPath, p, 'webapp/manifest.json'))
46
55
  manifest['sap.app'].id = appName + '.' + p
47
56
  await write(join(appPath, p, 'webapp/manifest.json'), manifest, { spaces: 2 })
@@ -1,9 +1,7 @@
1
- const cds = require('../../../cds')
2
-
3
1
  module.exports = class extends require('../../plugin') {
4
2
 
5
3
  static hasInProduction(env) {
6
- return !!env.requires?.telemetry || cds.cli.argv?.includes('telemetry') || !!cds.cli.options?.add?.telemetry
4
+ return !!env.requires?.telemetry
7
5
  }
8
6
 
9
7
  requires() {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "devDependencies": {
3
3
  "@cap-js/cds-types": "^0.15.0",
4
- "@types/node": "^22.0.0",
4
+ "@types/node": "^24.0.0",
5
5
  "tsx": "^4",
6
6
  "typescript": "^5"
7
7
  }
@@ -82,11 +82,6 @@ resources:
82
82
  HTML5.DynamicDestination: true
83
83
  requires:
84
84
  - name: srv-api
85
- group: destinations
86
- properties:
87
- name: srv-api # must be used in xs-app.json as well
88
- url: ~{srv-url}
89
- forwardAuthToken: true
90
85
 
91
86
  - name: {{appName}}-html5-repo-host
92
87
  type: org.cloudfoundry.managed-service
@@ -86,7 +86,6 @@ module.exports = class extends require('../../plugin') {
86
86
  }]
87
87
  const relationships = []
88
88
  if (addMultitenancy) {
89
- additions.push(html5RepoHost)
90
89
  relationships.push({
91
90
  insert: [html5RepoHost, 'name'],
92
91
  into: [mtxSidecar4(isJava ? 'mtx/sidecar' : 'gen/mtx/sidecar'), 'requires', 'name']
@@ -22,6 +22,10 @@ resources:
22
22
  config:
23
23
  xsappname: {{appName}}-${org}-${space}
24
24
  tenant-mode: {{#hasMultitenancy}}shared{{/hasMultitenancy}}{{^hasMultitenancy}}dedicated{{/hasMultitenancy}}
25
+ oauth2-configuration:
26
+ credential-types:
27
+ - "binding-secret"
28
+ - "x509"
25
29
  {{#hasRoles}}{{^hasCustomRoleCollections}}
26
30
  role-collections:
27
31
  {{#roles}}
@@ -33,14 +33,14 @@ module.exports = class XsuaaTemplate extends require('../../plugin') {
33
33
 
34
34
  async combine() {
35
35
  const project = readProject()
36
- const { addMultitenancy, addMta, hasMta, addHelm, hasHelm, addHelmUnifiedRuntime, isJava, srvPath } = project
36
+ const { addMultitenancy, hasMultitenancy, addMta, hasMta, addHelm, hasHelm, hasHelmUnifiedRuntime, addHelmUnifiedRuntime, isJava, srvPath } = project
37
37
 
38
38
  const cds = require('../../../../lib')
39
39
  const xsSecurity = await (async () => {
40
40
  try {
41
41
  const models = await cds.load(cds.env.folders.srv)
42
42
  return cds.compile.to.xsuaa(models)
43
- } catch (error) { /* ignore */ }
43
+ } catch { /* ignore */ }
44
44
  })() ?? { scopes: [], attributes: [], 'role-templates': [], 'authorities-inheritance': false }
45
45
 
46
46
  const additions = xsSecurity.scopes.map(scope => ({ in: 'scopes', where: { name: scope.name } }))
@@ -53,16 +53,14 @@ module.exports = class XsuaaTemplate extends require('../../plugin') {
53
53
  additions.push(xsuaa)
54
54
  if (addMta) {
55
55
  const srv = srv4(srvPath)
56
- additions.push(srv)
57
56
  relationships.push({
58
57
  insert: [xsuaa, 'name'],
59
58
  into: [srv, 'requires', 'name']
60
59
  })
61
60
  }
62
- if (addMultitenancy) {
61
+ if (hasMultitenancy) {
63
62
  const mtxSidecar = mtxSidecar4(isJava ? 'mtx/sidecar' : 'gen/mtx/sidecar')
64
- additions.push(mtxSidecar)
65
- overwrites.push({ item: [mtxSidecar, 'parameters.tenant-mode'], withValue: 'shared' })
63
+ overwrites.push({ item: [xsuaa, 'parameters.config.tenant-mode'], withValue: 'shared' })
66
64
  relationships.push({
67
65
  insert: [xsuaa, 'name'],
68
66
  into: [mtxSidecar, 'requires', 'name']
@@ -84,7 +82,7 @@ module.exports = class XsuaaTemplate extends require('../../plugin') {
84
82
  await merge(__dirname, 'files/mta.yaml.hbs').into('mta.yaml', { project, additions, overwrites, relationships })
85
83
  }
86
84
 
87
- if (addHelm || addHelmUnifiedRuntime || addMultitenancy && hasHelm) {
85
+ if (addHelm || addHelmUnifiedRuntime || addMultitenancy && (hasHelm || hasHelmUnifiedRuntime)) {
88
86
  const overwrites = addMultitenancy ? [{ item: 'xsuaa.parameters.tenant-mode', withValue: 'shared' }] : []
89
87
  await merge(__dirname, 'files/values.yaml.hbs').into('chart/values.yaml', { with: project, overwrites })
90
88
  await merge({
@@ -65,10 +65,16 @@ async function findConfigPath (currentDir = '.') {
65
65
  let configDir = path.resolve(currentDir)
66
66
  while (configDir && configDir !== path.dirname(configDir)) {
67
67
  for (const configFile of configFiles) {
68
- const configPath = path.join(configDir, configFile)
69
- const config = await tryRequire(configPath)
70
- if ((configFile !== 'package.json' || config?.eslintConfig) && isfile(configPath)) {
71
- return configPath
68
+ try {
69
+ const configPath = path.join(configDir, configFile)
70
+ const config = await tryRequire(configPath)
71
+ if ((configFile !== 'package.json' || config?.eslintConfig) && isfile(configPath)) {
72
+ return configPath
73
+ }
74
+ } catch {
75
+ // attempting to load config files may fail for various reasons we can not easily verify by error code, for example
76
+ // "Cannot use import statement outside a module" in a TS context, or attempting to read .mts files without properly setting them up.
77
+ // We just ignore these errors and treat them as "no valid config found so far, continue searching", lest the exception flys up.
72
78
  }
73
79
  }
74
80
  configDir = path.dirname(configDir)