@sap/cds-dk 7.9.4 → 8.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 (286) hide show
  1. package/CHANGELOG.md +2116 -0
  2. package/bin/add.js +18 -52
  3. package/bin/bind.js +2 -2
  4. package/bin/build.js +29 -4
  5. package/bin/cds.js +23 -11
  6. package/bin/compile/index.js +7 -6
  7. package/bin/completion/index.js +70 -46
  8. package/bin/completion/scripts/cds-bash.sh +4 -1
  9. package/bin/completion/scripts/cds-fish.fish +13 -0
  10. package/bin/completion/scripts/cds-ps.ps1 +2 -1
  11. package/bin/completion/scripts/cds-zsh.sh +2 -1
  12. package/bin/deploy/index.js +6 -5
  13. package/bin/deploy/to-sqlite.js +2 -2
  14. package/bin/extend.js +19 -50
  15. package/bin/help.js +2 -2
  16. package/bin/init.js +10 -77
  17. package/bin/login.js +13 -5
  18. package/bin/migrate.js +1 -1
  19. package/bin/pull.js +11 -0
  20. package/bin/repl.js +3 -0
  21. package/bin/test.js +5 -0
  22. package/bin/version.js +7 -7
  23. package/bin/watch.js +2 -11
  24. package/lib/bind/KubernetesApiAccessor.js +10 -9
  25. package/lib/build/buildTaskEngine.js +11 -7
  26. package/lib/build/buildTaskFactory.js +15 -43
  27. package/lib/build/buildTaskProviderFactory.js +16 -44
  28. package/lib/build/constants.js +3 -3
  29. package/lib/build/index.js +2 -2
  30. package/lib/build/{buildPlugin.js → plugin.js} +65 -46
  31. package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/content-deployment/Chart.yaml +1 -1
  32. package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/content-deployment/values.yaml +1 -1
  33. package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/service-instance/Chart.yaml +1 -1
  34. package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/service-instance/templates/_helpers.tpl +7 -0
  35. package/lib/build/plugins/helm/files/subcharts/service-instance/templates/servicebinding.yaml +32 -0
  36. package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/service-instance/templates/serviceinstance.yaml +3 -0
  37. package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/service-instance/values.schema.json +63 -0
  38. package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/service-instance/values.yaml +23 -1
  39. package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/Chart.yaml +1 -1
  40. package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/templates/deployment.yaml +2 -0
  41. package/lib/build/plugins/helm/files/subcharts/web-application/templates/hpa.yaml +22 -0
  42. package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/templates/pod-disruption-budget.yaml +1 -0
  43. package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/values.schema.json +49 -0
  44. package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/values.yaml +8 -2
  45. package/lib/{init/template/helm/files/chart → build/plugins/helm/files}/templates/_deployment_helpers.tpl +5 -0
  46. package/lib/build/plugins/helm/files/templates/_helpers.tpl +13 -0
  47. package/lib/build/plugins/helm/index.js +81 -0
  48. package/lib/build/plugins.js +12 -15
  49. package/lib/build/provider/featureToggleBuildPlugin.js +7 -39
  50. package/lib/build/provider/hana/2migration.js +168 -124
  51. package/lib/build/provider/hana/index.js +20 -25
  52. package/lib/build/provider/hana/template/.hdiconfig-all +3 -0
  53. package/lib/build/provider/hana/template/.hdiconfig-cloud +3 -0
  54. package/lib/build/provider/hana/template/package.json +4 -3
  55. package/lib/build/provider/internalBuildPlugin.js +32 -97
  56. package/lib/build/provider/internalBuildTaskProvider.js +10 -46
  57. package/lib/build/provider/java/index.js +2 -3
  58. package/lib/build/provider/mtx/index.js +5 -4
  59. package/lib/build/provider/mtx-extension/index.js +5 -2
  60. package/lib/build/provider/mtx-sidecar/index.js +2 -2
  61. package/lib/build/util.js +83 -12
  62. package/lib/compile/to-mermaid.js +108 -0
  63. package/lib/compile/to_asyncapi.js +7 -0
  64. package/lib/compile/to_openapi.js +7 -0
  65. package/lib/deploy/to-hana/hana.js +37 -34
  66. package/lib/deploy/to-hana/hdiDeployUtil.js +8 -6
  67. package/lib/env/schemas/cds-rc.js +1 -1
  68. package/lib/import/common.js +2 -2
  69. package/lib/import/odata/metadataconverter/MetadataConverter.js +4 -4
  70. package/lib/import/odata/v2parser.js +83 -197
  71. package/lib/import/odata/v4parser.js +1 -38
  72. package/lib/import/openapi/importOpenAPI.js +164 -42
  73. package/lib/index.js +10 -12
  74. package/lib/init/bas.js +91 -0
  75. package/lib/init/constants.js +16 -10
  76. package/lib/init/index.js +74 -150
  77. package/lib/init/merge.js +12 -20
  78. package/lib/init/mvn.js +103 -150
  79. package/lib/init/plugin.js +11 -7
  80. package/lib/init/projectReader.js +53 -19
  81. package/lib/init/registries/mta.js +51 -6
  82. package/lib/init/template/application-logging/files/package.json.hbs +7 -0
  83. package/lib/init/template/application-logging/index.js +13 -1
  84. package/lib/init/template/approuter/files/containerize.yaml.hbs +10 -0
  85. package/lib/init/template/approuter/files/mta.yaml.hbs +1 -2
  86. package/lib/init/template/approuter/files/values.yaml.hbs +19 -4
  87. package/lib/init/template/approuter/files/xs-app.json.hbs +12 -3
  88. package/lib/init/template/approuter/index.js +29 -25
  89. package/lib/init/template/attachments/files/mta.yaml.hbs +14 -0
  90. package/lib/init/template/attachments/files/package.json.hbs +5 -0
  91. package/lib/init/template/attachments/files/values.yaml +7 -0
  92. package/lib/init/template/attachments/index.js +53 -0
  93. package/lib/init/template/audit-logging/files/mta.yaml.hbs +14 -0
  94. package/lib/init/template/audit-logging/files/package.json.hbs +7 -0
  95. package/lib/init/template/audit-logging/index.js +66 -0
  96. package/lib/init/template/cf-manifest/index.js +4 -0
  97. package/lib/init/template/completion/completionSetup.js +54 -33
  98. package/lib/init/template/completion/index.js +7 -1
  99. package/lib/init/template/connectivity/index.js +4 -4
  100. package/lib/init/template/containerize/files/containerize.yaml.hbs +26 -0
  101. package/lib/init/template/containerize/index.js +24 -0
  102. package/lib/init/template/data/index.js +4 -0
  103. package/lib/init/template/destination/files/mta.yaml.hbs +25 -1
  104. package/lib/init/template/destination/index.js +12 -2
  105. package/lib/init/template/enterprise-messaging/index.js +6 -3
  106. package/lib/init/template/enterprise-messaging-shared/index.js +5 -1
  107. package/lib/init/template/extensibility/files/package.json.hbs +1 -1
  108. package/lib/init/template/extensibility/files/xs-security.json.hbs +2 -8
  109. package/lib/init/template/extensibility/index.js +3 -1
  110. package/lib/init/template/file-based-messaging/index.js +4 -0
  111. package/lib/init/template/h2/index.js +4 -0
  112. package/lib/init/template/hana/files/containerize.yaml.hbs +10 -0
  113. package/lib/init/template/hana/files/db/package.json +3 -2
  114. package/lib/init/template/hana/files/package.json.hbs +4 -7
  115. package/lib/init/template/hana/files/src/.hdiconfig +3 -0
  116. package/lib/init/template/hana/files/values.yaml.hbs +1 -2
  117. package/lib/init/template/hana/index.js +15 -7
  118. package/lib/init/template/helm/files/Chart.yaml.hbs +2 -3
  119. package/lib/init/template/helm/files/values.schema.json +2173 -0
  120. package/lib/init/template/helm/files/values.yaml.hbs +11 -6
  121. package/lib/init/template/helm/index.js +77 -18
  122. package/lib/init/template/helm-unified-runtime/index.js +19 -56
  123. package/lib/init/template/html5-repo/files/app-package.json.hbs +11 -7
  124. package/lib/init/template/html5-repo/files/manifest.json +13 -0
  125. package/lib/init/template/html5-repo/files/mta.yaml.hbs +41 -8
  126. package/lib/init/template/html5-repo/files/ui5-deploy.yaml.hbs +21 -0
  127. package/lib/init/template/html5-repo/files/ui5.yaml.hbs +2 -29
  128. package/lib/init/template/html5-repo/files/values.yaml.hbs +6 -2
  129. package/lib/init/template/html5-repo/files/xs-app.json.hbs +21 -8
  130. package/lib/init/template/html5-repo/index.js +33 -30
  131. package/lib/init/template/http/index.js +36 -12
  132. package/lib/init/template/java/index.js +18 -12
  133. package/lib/init/template/kafka/index.js +4 -0
  134. package/lib/init/template/lint/index.js +7 -2
  135. package/lib/init/template/liquibase/index.js +4 -0
  136. package/lib/init/template/local-messaging/index.js +4 -0
  137. package/lib/init/template/malware-scanner/files/mta.yaml.hbs +14 -0
  138. package/lib/init/template/malware-scanner/files/package.json.hbs +17 -0
  139. package/lib/init/template/malware-scanner/files/values.yaml +7 -0
  140. package/lib/init/template/malware-scanner/index.js +47 -0
  141. package/lib/init/template/mta/files/mta.yaml.hbs +3 -3
  142. package/lib/init/template/mta/files/package.json +1 -1
  143. package/lib/init/template/mta/index.js +4 -0
  144. package/lib/init/template/mtx/index.js +4 -0
  145. package/lib/init/template/multitenancy/files/containerize.yaml.hbs +10 -0
  146. package/lib/init/template/multitenancy/files/mta.yaml.hbs +0 -1
  147. package/lib/init/template/multitenancy/files/package.json.hbs +1 -1
  148. package/lib/init/template/multitenancy/files/package.sidecar.json.hbs +6 -5
  149. package/lib/init/template/multitenancy/files/values.yaml.hbs +14 -24
  150. package/lib/init/template/multitenancy/index.js +50 -28
  151. package/lib/init/template/nodejs/files/eslint.config.mjs +2 -0
  152. package/lib/init/template/nodejs/files/package.json.hbs +2 -3
  153. package/lib/init/template/nodejs/index.js +4 -0
  154. package/lib/init/template/notifications/files/mta.yaml.hbs +2 -2
  155. package/lib/init/template/notifications/index.js +4 -0
  156. package/lib/init/template/pipeline/files/.pipeline/config.yml +1 -1
  157. package/lib/init/template/pipeline/files/Jenkinsfile +1 -1
  158. package/lib/init/template/pipeline/index.js +4 -0
  159. package/lib/init/template/portal/files/mta.yaml.hbs +52 -0
  160. package/lib/init/template/portal/files/package.json.hbs +11 -0
  161. package/lib/init/template/portal/files/package.sidecar.json +7 -0
  162. package/lib/init/template/portal/files/portal-site/CommonDataModel.json.hbs +97 -0
  163. package/lib/init/template/portal/files/portal-site/i18n/catalog.properties +1 -0
  164. package/lib/init/template/portal/files/portal-site/i18n/catalog_de.properties +1 -0
  165. package/lib/init/template/portal/files/portal-site/i18n/group.properties +1 -0
  166. package/lib/init/template/portal/files/portal-site/i18n/group_de.properties +1 -0
  167. package/lib/init/template/portal/index.js +84 -0
  168. package/lib/init/template/postgres/index.js +5 -1
  169. package/lib/init/template/redis-messaging/index.js +4 -0
  170. package/lib/init/template/sample/files/app/admin-books/webapp/i18n/i18n_de.properties +3 -0
  171. package/lib/init/template/sample/files/app/admin-books/webapp/i18n/i18n_en.properties +3 -0
  172. package/lib/init/template/sample/files/app/admin-books/webapp/manifest.json +13 -1
  173. package/lib/init/template/sample/files/app/browse/webapp/i18n/i18n.properties +2 -2
  174. package/lib/init/template/sample/files/app/browse/webapp/i18n/i18n_de.properties +3 -0
  175. package/lib/init/template/sample/files/app/browse/webapp/i18n/i18n_en.properties +4 -0
  176. package/lib/init/template/sample/files/app/browse/webapp/manifest.json +3 -3
  177. package/lib/init/template/sample/files/app/index.html +1 -1
  178. package/lib/init/template/sample/files/db/data/sap.capire.bookshop-Authors.csv +5 -5
  179. package/lib/init/template/sample/files/db/data/sap.capire.bookshop-Books.csv +6 -6
  180. package/lib/init/template/sample/files/db/data/sap.capire.bookshop-Books_texts.csv +5 -5
  181. package/lib/init/template/sample/files/db/data/sap.capire.bookshop-Genres.csv +16 -16
  182. package/lib/init/template/sample/files/nodejs/cat-service.js +2 -2
  183. package/lib/init/template/sample/files/package.json.hbs +3 -0
  184. package/lib/init/template/sample/index.js +16 -9
  185. package/lib/init/template/sqlite/index.js +4 -0
  186. package/lib/init/template/tiny-sample/files/nodejs/db/data/my.bookshop-Books.csv +3 -3
  187. package/lib/init/template/tiny-sample/files/nodejs/srv/cat-service.cds.hbs +1 -1
  188. package/lib/init/template/tiny-sample/index.js +4 -0
  189. package/lib/init/template/toggles/files/package.json.hbs +1 -1
  190. package/lib/init/template/toggles/index.js +4 -0
  191. package/lib/init/template/typer/index.js +4 -0
  192. package/lib/init/template/typescript/files/package.json +12 -0
  193. package/lib/init/template/typescript/files/tsconfig.json +13 -0
  194. package/lib/init/template/typescript/index.js +39 -0
  195. package/lib/init/template/workzone/index.js +5 -0
  196. package/lib/init/template/workzone-standard/files/manifest.json.hbs +6 -0
  197. package/lib/init/template/workzone-standard/index.js +30 -0
  198. package/lib/init/template/xsuaa/files/package.json.hbs +1 -1
  199. package/lib/init/template/xsuaa/files/values.yaml.hbs +3 -2
  200. package/lib/init/template/xsuaa/index.js +11 -7
  201. package/lib/init/validate.js +27 -0
  202. package/lib/lint/generators.js +1 -1
  203. package/lib/lint/io.js +25 -7
  204. package/lib/mtx/auth_manager.js +64 -30
  205. package/lib/mtx/download_legacy.js +2 -2
  206. package/lib/mtx/index.js +0 -4
  207. package/lib/mtx/params.js +32 -38
  208. package/lib/mtx/pull.js +151 -43
  209. package/lib/mtx/push.js +3 -3
  210. package/lib/mtx/settings_manager.js +75 -35
  211. package/lib/mtx/tenant_action.js +1 -1
  212. package/lib/mtx/util/cf.js +1 -1
  213. package/lib/mtx/util/fs.js +26 -1
  214. package/lib/mtx/util/logging.js +7 -3
  215. package/lib/util/command.js +0 -2
  216. package/lib/util/fs.js +2 -3
  217. package/lib/util/question.js +28 -0
  218. package/lib/util/term.js +5 -3
  219. package/npm-shrinkwrap.json +231 -1089
  220. package/package.json +13 -8
  221. package/bin/activate.js +0 -77
  222. package/lib/compile/asyncapi/channels.js +0 -22
  223. package/lib/compile/asyncapi/components/messageTraits/index.js +0 -89
  224. package/lib/compile/asyncapi/components/messages/index.js +0 -173
  225. package/lib/compile/asyncapi/components/schemas/annotations.js +0 -33
  226. package/lib/compile/asyncapi/components/schemas/array.js +0 -8
  227. package/lib/compile/asyncapi/components/schemas/cache.js +0 -14
  228. package/lib/compile/asyncapi/components/schemas/definition.js +0 -187
  229. package/lib/compile/asyncapi/components/schemas/enum.js +0 -16
  230. package/lib/compile/asyncapi/components/schemas/examples.js +0 -10
  231. package/lib/compile/asyncapi/components/schemas/index.js +0 -14
  232. package/lib/compile/asyncapi/components/schemas/localized.js +0 -29
  233. package/lib/compile/asyncapi/components/schemas/primitiveElement.js +0 -41
  234. package/lib/compile/asyncapi/components/schemas/ref.js +0 -45
  235. package/lib/compile/asyncapi/components/schemas/utils.js +0 -108
  236. package/lib/compile/asyncapi/index.js +0 -247
  237. package/lib/compile/asyncapi/message.js +0 -13
  238. package/lib/compile/asyncapi/utils.js +0 -27
  239. package/lib/compile/openapi/csdl2openapi.js +0 -2448
  240. package/lib/compile/openapi/index.js +0 -68
  241. package/lib/init/template/helm/files/chart/templates/NOTES.txt +0 -14
  242. package/lib/init/template/helm/files/chart/templates/_helpers.tpl +0 -28
  243. package/lib/init/template/helm/files/chart/values.root.schema.json +0 -61
  244. package/lib/init/template/helm/files/chart/values.schema.json +0 -366
  245. package/lib/init/template/helm-unified-runtime/files/Chart.yaml.hbs +0 -10
  246. package/lib/init/template/helm-unified-runtime/files/templates/_deployment_helpers.tpl +0 -90
  247. package/lib/init/template/helm-unified-runtime/files/templates/_helpers.tpl +0 -28
  248. package/lib/init/template/helm-unified-runtime/files/values.root.schema.json +0 -61
  249. package/lib/init/template/helm-unified-runtime/files/values.schema.json +0 -366
  250. package/lib/init/template/helm-unified-runtime/files/values.yaml.hbs +0 -26
  251. package/lib/init/template/helm-unified-runtime/package.json +0 -4
  252. package/lib/init/template/multitenancy/files/mtxs-configmap-java-approuter.yaml +0 -20
  253. package/lib/init/template/multitenancy/files/mtxs-configmap-java.yaml +0 -18
  254. package/lib/init/template/multitenancy/files/mtxs-configmap-nodejs-approuter.yaml +0 -12
  255. package/lib/init/template/multitenancy/files/mtxs-configmap-nodejs.yaml +0 -12
  256. package/lib/init/template/multitenancy/files/saas-registry-secret.yaml +0 -9
  257. package/lib/init/template/nodejs/files/eslint.config.js +0 -13
  258. package/lib/init/template/notebook/index.js +0 -11
  259. package/lib/init/template/samples/index.js +0 -9
  260. package/lib/mtx/activate.js +0 -238
  261. package/lib/mtx/extend.js +0 -173
  262. package/lib/util/exec.d.ts +0 -54
  263. package/lib/util/exec.js +0 -211
  264. /package/lib/{init/template/approuter/files → build/plugins/helm/files/plugins/approuter}/approuter-configmap.yaml +0 -0
  265. /package/lib/{init/template/connectivity/files → build/plugins/helm/files/plugins/connectivity}/connectivity-proxy-info.yaml +0 -0
  266. /package/lib/{init/template/html5-repo/files → build/plugins/helm/files/plugins/html5-repo}/html5-apps-deployer-configmap.yaml +0 -0
  267. /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/content-deployment/templates/_helpers.tpl +0 -0
  268. /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/content-deployment/templates/job.yaml +0 -0
  269. /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/content-deployment/templates/secret.yaml +0 -0
  270. /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/content-deployment/templates/service-account.yaml +0 -0
  271. /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/content-deployment/templates/service-binding.yaml +0 -0
  272. /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/content-deployment/values.schema.json +0 -0
  273. /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/templates/NOTES.txt +0 -0
  274. /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/templates/_api.tpl +0 -0
  275. /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/templates/_helpers.tpl +0 -0
  276. /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/templates/api-rule.yaml +0 -0
  277. /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/templates/network-policy.yaml +0 -0
  278. /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/templates/rbac.yaml +0 -0
  279. /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/templates/secret.yaml +0 -0
  280. /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/templates/service-account.yaml +0 -0
  281. /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/templates/service-binding.yaml +0 -0
  282. /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/templates/service.yaml +0 -0
  283. /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/templates/virtual-service.yaml +0 -0
  284. /package/lib/{init/template/helm-unified-runtime → build/plugins/helm}/files/templates/NOTES.txt +0 -0
  285. /package/lib/init/template/{nodejs/files → java}/.cdsrc.json +0 -0
  286. /package/lib/init/template/tiny-sample/files/nodejs/db/{data-model.cds → schema.cds} +0 -0
package/bin/add.js CHANGED
@@ -1,6 +1,7 @@
1
1
  const cds = require('../lib/cds'), { fs } = cds.utils
2
2
  const DEBUG = cds.debug('add')
3
3
  const { join } = require('path')
4
+ const cmd = require('../lib/util/command')
4
5
 
5
6
  const fromDk = fs.readdirSync(join(__dirname, '../lib/init/template'))
6
7
  const fromPlugins = require('../lib/init/add').registered
@@ -17,8 +18,8 @@ for (const plugin of [...fromDk, ...Object.keys(Object.fromEntries(fromPlugins))
17
18
 
18
19
  const byShortcut = (a, b) => (b.short ? 1 : 0) - (a.short ? 1 : 0)
19
20
 
20
- const options = ['--for', ...Object.values(conf).flatMap(p => p.options).sort(byShortcut).map(o => o.key)]
21
- const shortcuts = ['-4', ...Object.values(conf).flatMap(p => p.options).sort(byShortcut).map(o => o.short)]
21
+ const options = ['--for', '--package', ...Object.values(conf).flatMap(p => p.options).sort(byShortcut).map(o => o.key), '--java:mvn']
22
+ const shortcuts = ['-4', '-p', ...Object.values(conf).flatMap(p => p.options).sort(byShortcut).map(o => o.short)]
22
23
  const flags = ['--force', ...Object.values(conf).flatMap(p => p.flags).map(o => o.key)]
23
24
  DEBUG?.('cli config ', { options, shortcuts, flags })
24
25
 
@@ -36,54 +37,7 @@ module.exports = Object.assign(add, {
36
37
 
37
38
  Pick any of these:
38
39
 
39
- *hana* - add support for SAP HANA
40
-
41
- *sqlite* - add support for SQLite
42
-
43
- *postgres* - add support for PostgreSQL
44
-
45
- *liquibase* - add support for Liquibase
46
-
47
- *xsuaa* - add support for authentication via XSUAA
48
-
49
- *multitenancy* - add support for multitenancy
50
-
51
- *toggles* - add support for feature toggles
52
-
53
- *extensibility* - add support for extensibility
54
-
55
- *approuter* - add support for application routing
56
-
57
- *local-messaging* - add support for local messaging
58
-
59
- *file-based-messaging* - add support for file-based messaging
60
-
61
- *enterprise-messaging* - add support for SAP Event Mesh
62
-
63
- *redis-messaging* - add support for Redis messaging
64
-
65
- *kibana* - add support for Kibana formatting
66
-
67
- *mta* - add support for MTA-based deployment
68
-
69
- *cf-manifest* - add support for CF-native deployment
70
-
71
- *helm* - add support for Helm-based Kyma deployment
72
-
73
- *html5-repo* - add support for the HTML5 repository
74
-
75
- *pipeline* - add files for CI/CD pipeline integration
76
-
77
- *tiny-sample* - add minimal sample files
78
-
79
- *sample* - add sample files including Fiori UI
80
-
81
- *data* - add CSV headers for modeled entities
82
-
83
- *typer* - add type generation for CDS models
84
-
85
- *lint* - add support for CDS Lint
86
-
40
+ ${cds.cli.command !== 'completion' && require('../lib/init').help({ exclude: ['java', 'nodejs'] })}
87
41
 
88
42
  # OPTIONS
89
43
 
@@ -95,6 +49,10 @@ module.exports = Object.assign(add, {
95
49
 
96
50
  Overwrite all files in case the target files already exist.
97
51
 
52
+ *--package* <name>
53
+
54
+ Pull a package from your npm registry.
55
+
98
56
 
99
57
  # FEATURE OPTIONS
100
58
 
@@ -145,6 +103,14 @@ async function add(args) {
145
103
  // await cds.plugins
146
104
  const CDSGenerator = require('../lib/init')
147
105
  const generator = new CDSGenerator()
148
- const features = args.map(f => f.split(/[,\s+]/)).flat()
149
- await generator.add(features)
106
+ const features = args.map(f => f.split(/[,\s]/)).flat()
107
+ if (cds.cli.options?.package) {
108
+ console.log(`running with --package, adding dependency ${cds.cli.options.package}`)
109
+ await cmd.spawnCommand(`npm`, ['add', cds.cli.options.package], { cwd: cds.root })
110
+ await cmd.spawnCommand(`cds`, ['add', ...features], { cwd: cds.root }) // plugins need to reload
111
+ // await cds.plugins
112
+ // await generator.add(features)
113
+ } else {
114
+ await generator.add(features)
115
+ }
150
116
  }
package/bin/bind.js CHANGED
@@ -44,7 +44,7 @@ module.exports = Object.assign(cds_bind, {
44
44
  be added to *package.json* or *.cdsrc.json*. If *path* is a directory, the *.cdsrc.json*
45
45
  file in that directory is used. Defaults to *.cdsrc-private.json*.
46
46
 
47
- *-a | --to-app-services <app>* (Beta)
47
+ *-a | --to-app-services* <app>
48
48
 
49
49
  Bind to a given application (Cloud Foundry only).
50
50
 
@@ -52,7 +52,7 @@ module.exports = Object.assign(cds_bind, {
52
52
 
53
53
  Skip automatic creation of service keys.
54
54
 
55
- *-c | --credentials* <JSON|{file path}> (Beta)
55
+ *-c | --credentials* <JSON|{file path}>
56
56
 
57
57
  JSON or file path defining custom fields overwriting service credentials.
58
58
  Custom credentials are merged with the credentials read from BTP when running your application in hybrid mode.
package/bin/build.js CHANGED
@@ -1,6 +1,6 @@
1
1
  module.exports = Object.assign(build, {
2
2
  handleCompletion,
3
- options: ['--project', '--src', '--dest', '--for', '--use', '--opts', '--log-level', '--options-model'],
3
+ options: ['--project', '--src', '--dest', '--for', '--opts', '--log-level', '--options-model'],
4
4
  shortcuts: ['-in', '-s', '-o', '-4'],
5
5
  flags: ['--clean', '--no-clean', '--ws', '--ws-pack'], // REVISIT: --clean is deprecated, backward compatibility
6
6
  help: `
@@ -69,7 +69,7 @@ module.exports = Object.assign(build, {
69
69
  Runs 'cds build' for the specified project, default is current working
70
70
  directory.
71
71
 
72
- *--no-clean* (beta)
72
+ *--no-clean*
73
73
  Skips cleaning the build output folder before running the actual build
74
74
  operation. Clients need to clean the output folder upfront to ensure
75
75
  consistent build results.
@@ -86,7 +86,7 @@ module.exports = Object.assign(build, {
86
86
  Npm workspaces are typically used in mono or multi-repo setups whereas each workspace
87
87
  folder represents a microservice CAP project with subfolders _db_, _srv_, _app_.
88
88
  With the *ws* option the model scope used in executed build tasks is calculated based on
89
- all workspaces. This also applies to the feature toggles. Feature toggles defined cross workspace
89
+ all workspaces. This also applies to the feature toggles. Feature toggles defined cross workspace
90
90
  are merged. The output is created in the _mtx/sidecar_ for multitenant applications
91
91
  or in the 'srv' folder for node.js apps if no sidecar exists.
92
92
  HANA native content distributed across the workspaces is copied into the top-level 'db'
@@ -162,7 +162,32 @@ async function build([project], options = {}) {
162
162
  }
163
163
  delete options["no-clean"]
164
164
  }
165
-
165
+ // convert opts string to task options object
166
+ if (options.opts) {
167
+ options.taskOptions = scanTaskOptionParams(options.opts)
168
+ delete options.opts
169
+ }
166
170
  const { build } = require('../lib/build')
167
171
  await build(options)
168
172
  }
173
+
174
+ function scanTaskOptionParams(optsParams) {
175
+ // need to create new regex every call since a constant would keep the match state
176
+ const quoteRegex = /([\w-]+)=([\w/.-]+|\[([\w/,.-]+)\])/g
177
+
178
+ // captures a=1 => a:1
179
+ // a=[x,y,z] => a:[x,y,z]
180
+ // a=1,b=[x,y,z] => a:1 b=[x,y,z]
181
+ let match = quoteRegex.exec(optsParams)
182
+ const taskOptions = {}
183
+
184
+ while (match != null) {
185
+ const key = match[1]
186
+ const value = match[3] || match[2]
187
+ const valueArray = value.split(",")
188
+ taskOptions[key] = valueArray.length > 1 ? valueArray.map((entry) => entry.trim()) : value
189
+ match = quoteRegex.exec(optsParams)
190
+ }
191
+ return taskOptions
192
+ }
193
+
package/bin/cds.js CHANGED
@@ -17,7 +17,7 @@ const cli = {
17
17
  d: 'deploy',
18
18
  l: 'login',
19
19
  o: 'logout',
20
- t: 'lint',
20
+ t: 'test',
21
21
  v: 'version', '-v':'version', '--version':'version',
22
22
  h: 'help', '?':'help', '-?':'help', '--help':'help',
23
23
  r: 'repl', '-r':'repl',
@@ -25,6 +25,9 @@ const cli = {
25
25
  },
26
26
 
27
27
  async exec (cmd = process.argv[2], ...argv) {
28
+ const path = require('node:path')
29
+ const fs = require('node:fs')
30
+
28
31
  if (!argv.length) argv = process.argv.slice(3)
29
32
  if (!cmd) cmd = process.stdin.isTTY ? 'help' : 'compile'
30
33
  if (cmd in this.Shortcuts) cmd = process.argv[2] = this.Shortcuts[cmd]
@@ -51,13 +54,6 @@ const cli = {
51
54
  appendArgs = argv.slice(endOfOptions + 1)
52
55
  argv = argv.slice(0, endOfOptions)
53
56
  }
54
- // REVISIT: Have to do it here to allow custom flags for plugins!
55
- if (cmd === 'add') {
56
- await cds.plugins
57
- for (const [, Plugin] of cds.add.registered) {
58
- task.options.push(...Object.keys((new Plugin).options()).map(key => '--'+key))
59
- }
60
- }
61
57
 
62
58
  const args = this.args(task, argv)
63
59
  args[0].push(...appendArgs)
@@ -66,7 +62,22 @@ const cli = {
66
62
  argv: args[0],
67
63
  options: args[1],
68
64
  }
65
+
66
+ // REVISIT: Have to do it here to allow custom flags for plugins!
67
+ if (cmd === 'add') {
68
+ await cds.plugins
69
+ for (const [, Plugin] of cds.add.registered) {
70
+ task.options.push(...Object.keys((new Plugin).options()).map(key => '--'+key))
71
+ }
72
+ }
69
73
  if (args[1]?.['resolve-bindings']) await _resolveBindings({ silent: cmd === 'env' })
74
+
75
+ // cds.root may for some subcommands not point to the correct directory (e.g. cds w where users can pass a project directory)
76
+ // showing the full detected path should give the user an idea whether this info is relevant for them
77
+ const tsconfig = path.join(cds.root ?? '.', 'tsconfig.json')
78
+ if (!process.env.CDS_TYPESCRIPT && fs.existsSync(tsconfig)) {
79
+ console.info(`Detected ${tsconfig}. If this is a TypeScript project, consider running commands using cds-ts instead of cds.`)
80
+ }
70
81
  return await task.apply(this, args)
71
82
  }
72
83
  } catch (e) {
@@ -107,7 +118,8 @@ const cli = {
107
118
  else throw 'Invalid option: '+ a
108
119
  }
109
120
  // consistent production setting for NODE_ENV and CDS_ENV
110
- if (process.env.NODE_ENV !== 'production') process.env.NODE_ENV = process.env.CDS_ENV?.split(',').find(p => p === 'production') || process.env.NODE_ENV
121
+ // if (process.env.NODE_ENV !== 'production') process.env.NODE_ENV = process.env.CDS_ENV?.split(',').find(p => p === 'production') || process.env.NODE_ENV
122
+ if (process.env.NODE_ENV !== 'production') { if (process.env.CDS_ENV?.split(',').includes('production')) process.env.NODE_ENV = 'production' }
111
123
  else process.env.CDS_ENV = Array.from(new Set([...process.env.CDS_ENV?.split(',') ?? [], 'production']))
112
124
 
113
125
  function add (k,v) { options[k.slice(2)] = v || true }
@@ -213,8 +225,8 @@ if (!module.parent) module.exports()
213
225
 
214
226
 
215
227
  function getCommands() {
216
- const fs = require('fs');
217
- const path = require('path');
228
+ const fs = require('node:fs');
229
+ const path = require('node:path');
218
230
 
219
231
  const excludeList = ['cds.js', 'cds-ts.js', 'fix-redirects.js'];
220
232
 
@@ -1,4 +1,5 @@
1
- const path = require("path");
1
+ const path = require('path')
2
+ const {colors} = require('../../lib/util/term')
2
3
 
3
4
  module.exports = Object.assign ( compile, {
4
5
  handleCompletion,
@@ -40,8 +41,8 @@ module.exports = Object.assign ( compile, {
40
41
 
41
42
  - json, yml
42
43
  - edm, edmx, edmx-v2, edmx-v4, edmx-w4, edmx-x4
43
- - sql, hdbcds, hdbtable
44
- - cdl [beta]
44
+ - sql, hdbcds, hdbtable, hana
45
+ - cdl
45
46
  - xsuaa
46
47
  - openapi
47
48
  - asyncapi
@@ -159,7 +160,7 @@ async function handleCompletion(currentWord, previousWord, argv, util) {
159
160
  switch (previousWord) {
160
161
  case '-2':
161
162
  case '--to':
162
- return ['json', 'yml', 'edm', 'edmx', 'edmx-v2', 'edmx-v4', 'sql', 'hdbcds', 'hdbtable', 'cdl', 'xsuaa', 'openapi', 'asyncapi'];
163
+ return ['json', 'yml', 'edm', 'edmx', 'edmx-v2', 'edmx-v4', 'sql', 'hdbcds', 'hdbtable', 'hana', 'cdl', 'xsuaa', 'openapi', 'asyncapi'];
163
164
  case '-4':
164
165
  case '--for':
165
166
  return ['odata', 'sql'];
@@ -328,13 +329,13 @@ async function compile (models, options={}) {
328
329
  function consoleLog(o) {
329
330
  if (typeof o === 'string') return console.log (o)
330
331
  if (process.stdout.isTTY) {
331
- o = inspect(o,{colors: true, depth: 111, compact:false}).replace(/\[Object: null prototype\] /g, '')
332
+ o = inspect(o,{colors, depth: 111, compact:false}).replace(/\[Object: null prototype\] /g, '')
332
333
  } else
333
334
  o = JSON.stringify(o, null, 2)
334
335
  return console.log (o)
335
336
  }
336
337
 
337
- function suffix4 (x) { return x && x !== 'hdbtable' && ({
338
+ function suffix4 (x) { return x && x !== 'hdbtable' && x !== 'hana' && ({
338
339
  edmx: '.xml',
339
340
  "edmx-v2": '.xml',
340
341
  "edmx-v4": '.xml',
@@ -3,7 +3,7 @@ const path = require('node:path');
3
3
  const cds = require('../../bin/cds');
4
4
  const { bold } = require('../../lib/util/term');
5
5
 
6
- const SUPPORTED_SHELLS = ['bash', 'gitbash', 'zsh', 'ps']
6
+
7
7
 
8
8
  module.exports = Object.assign(completion, {
9
9
  handleCompletion,
@@ -13,20 +13,20 @@ module.exports = Object.assign(completion, {
13
13
  help: `
14
14
  # SYNOPSIS
15
15
 
16
- -- beta feature --
17
-
18
16
  *cds completion* <options>
19
17
 
20
18
  Adds or removes shell completion for cds commands. Currently supported shells:
21
- bash, Git Bash, zsh, and PowerShell.
19
+ Bash, fish, Git Bash, Zsh, and PowerShell.
22
20
 
23
21
  Depending on the operating system and the shell type, the following files will be changed:
24
22
  Linux, WSL
25
- bash: ~/.bashrc
26
- zsh: ~/.zshrc
23
+ Bash: ~/.bashrc
24
+ fish: ~/.config/fish/config.fish
25
+ Zsh: ~/.zshrc
27
26
  macOS
28
- bash: ~/.bash_profile
29
- zsh: ~/.zshrc
27
+ Bash: ~/.bash_profile
28
+ fish: ~/.config/fish/config.fish
29
+ Zsh: ~/.zshrc
30
30
  Windows
31
31
  PowerShell: $PROFILE
32
32
  Git Bash: ~/.bash_profile
@@ -41,9 +41,10 @@ module.exports = Object.assign(completion, {
41
41
  *--remove*
42
42
  Remove shell completion for cds commands (see examples).
43
43
 
44
- *--shell* <bash | gitbash | ps | zsh>
44
+ *--shell* <bash | fish | gitbash | ps | zsh>
45
45
  Force the shell completion code to be added to the correct shell profile file.
46
46
  bash: macOS, Linux, WSL
47
+ fish: macOS, Linux, WSL
47
48
  zsh: macOS, Linux, WSL
48
49
  gitbash: Git Bash for Windows
49
50
  ps: PowerShell
@@ -52,12 +53,12 @@ module.exports = Object.assign(completion, {
52
53
 
53
54
  *cds* completion --add # Add shell completion for cds commands
54
55
  *cds* completion --remove # Remove shell completion for cds commands
55
- *cds* completion --add --shell bash # Add shell completion for cds commands and enforce using bash shell
56
+ *cds* completion --add --shell bash # Add shell completion for cds commands and enforce using Bash shell
56
57
 
57
58
  # ALIASES
58
59
 
59
60
  *cds* add completion # Add shell completion for cds commands
60
- *cds* add completion --shell bash # Add shell completion for cds commands and enforce using bash shell
61
+ *cds* add completion --shell bash # Add shell completion for cds commands and enforce using Bash shell
61
62
 
62
63
  `});
63
64
 
@@ -65,17 +66,21 @@ function getScriptFile(shell) {
65
66
  switch (shell) {
66
67
  case 'bash':
67
68
  case 'gitbash':
68
- return 'cds-bash.sh'
69
+ return 'cds-bash.sh';
70
+ case 'fish':
71
+ return 'cds-fish.fish';
69
72
  case 'ps':
70
- return 'cds-ps.ps1'
73
+ return 'cds-ps.ps1';
71
74
  case 'zsh':
72
- return 'cds-zsh.sh'
75
+ return 'cds-zsh.sh';
73
76
  case '':
74
77
  case undefined:
75
78
  case null:
76
79
  throw 'Internal error: option --shell is missing';
77
- default:
78
- throw `Internal error: unsupported shell: ${shell}`;
80
+ default: {
81
+ const completionSetup = require('../../lib/init/template/completion/completionSetup');
82
+ throw `Internal error: unsupported shell: ${shell}, supported shells are ${completionSetup.supportedShells.join(', ')}`;
83
+ }
79
84
  }
80
85
  }
81
86
 
@@ -85,8 +90,8 @@ async function completion(_argv, options) {
85
90
  return console.log(path.join(__dirname, 'scripts', scriptFile));
86
91
  }
87
92
 
93
+ const completionSetup = require('../../lib/init/template/completion/completionSetup');
88
94
  if (options.add || options.remove) {
89
- const completionSetup = require('../../lib/init/template/completion/completionSetup');
90
95
  await completionSetup.setup(options.add, options);
91
96
  return;
92
97
  }
@@ -104,21 +109,17 @@ async function completion(_argv, options) {
104
109
  }
105
110
 
106
111
  const shell = localOptions.shell;
107
- if (!SUPPORTED_SHELLS.includes(shell)) {
108
- throw `internal Error: no completion handler found for type: ${shell}`;
112
+ if (!completionSetup.supportedShells.includes(shell)) {
113
+ throw `internal Error: no completion handler found for shell type: ${shell}, supported shells are ${completionSetup.supportedShells.join(', ')}`;
109
114
  }
110
115
 
111
- const currentWord = localOptions.curr;
112
- const previousWord = localOptions.prev;
113
- const line = localOptions.line;
116
+ const currentWord = localOptions.curr?.trim().replace(/^'|'$/g, '');
117
+ const previousWord = localOptions.prev?.trim().replace(/^'|'$/g, '');
118
+ const line = localOptions.line?.trim().replace(/^'|'$/g, '');
114
119
  const segments = getSegments(line);
115
120
  const cdsCmd = segments[1] || '';
116
121
 
117
- let completions = await getCompletions(cdsCmd, previousWord, currentWord, segments);
118
- if (currentWord && shell === 'ps') {
119
- completions = completions.filter(v => v?.startsWith(currentWord));
120
- }
121
-
122
+ const completions = await getCompletions(cdsCmd, previousWord, currentWord, segments);
122
123
  reply(completions);
123
124
  }
124
125
 
@@ -131,7 +132,8 @@ async function handleCompletion(currentWord, previousWord, argv, _util) {
131
132
  }
132
133
 
133
134
  if (previousWord === '--shell') {
134
- return ['bash', 'gitbash', 'ps', 'zsh'];
135
+ const { supportedShells } = require('../../lib/init/template/completion/completionSetup');
136
+ return supportedShells;
135
137
  }
136
138
 
137
139
  return allOptionsFlags;
@@ -184,29 +186,51 @@ function getUtil() {
184
186
  }
185
187
 
186
188
  async function getCompletions(cdsCmd, previousWord, currentWord, segments) {
187
- if (cdsCmd === currentWord) {
188
- return cds.cmds;
189
+ const _filter = (completions, currentWord) => {
190
+ return completions.filter(token => token?.startsWith(currentWord));
189
191
  }
190
192
 
191
- try {
192
- const cdsCmdObj = getCdsCmd(cdsCmd);
193
- if (typeof cdsCmdObj.handleCompletion === 'function') {
194
- return await cdsCmdObj.handleCompletion(currentWord, previousWord, segments, getUtil());
193
+ const _getCompletions = async () => {
194
+ if (previousWord === 'cds') {
195
+ if (!currentWord) {
196
+ return cds.cmds;
197
+ } else {
198
+ const completions = _filter(cds.cmds, currentWord);
199
+ if (completions.length > 0) {
200
+ return completions;
201
+ }
202
+ cdsCmd = 'compile';
203
+ previousWord = 'compile';
204
+ }
195
205
  }
196
206
 
197
- if (currentWord?.startsWith('-')) {
198
- return getAllOptions(cdsCmdObj, segments);
199
- }
200
-
201
- const completionFs = require('./completionFs');
202
- const all = await completionFs.readdir(currentWord);
203
- if (!(cdsCmdObj.options?.includes(previousWord) || cdsCmdObj.shortcuts?.includes(previousWord))) {
204
- const allOptions = getAllOptions(cdsCmdObj, segments);
205
- all.push(...allOptions);
207
+ try {
208
+ const cdsCmdObj = getCdsCmd(cdsCmd);
209
+ if (typeof cdsCmdObj.handleCompletion === 'function') {
210
+ return await cdsCmdObj.handleCompletion(currentWord, previousWord, segments, getUtil());
211
+ }
212
+
213
+ if (currentWord?.startsWith('-')) {
214
+ return getAllOptions(cdsCmdObj, segments);
215
+ }
216
+
217
+ const completionFs = require('./completionFs');
218
+ const all = await completionFs.readdir(currentWord);
219
+ if (!(cdsCmdObj.options?.includes(previousWord) || cdsCmdObj.shortcuts?.includes(previousWord))) {
220
+ const allOptions = getAllOptions(cdsCmdObj, segments);
221
+ all.push(...allOptions);
222
+ }
223
+
224
+ return all;
225
+ } catch (err) {
226
+ return [];
206
227
  }
228
+ }
207
229
 
208
- return all;
209
- } catch (err) {
210
- return [];
230
+ let completions = await _getCompletions();
231
+ if (currentWord) {
232
+ completions = _filter(completions, currentWord);
211
233
  }
234
+
235
+ return completions;
212
236
  }
@@ -8,7 +8,10 @@ _completeCds()
8
8
  COMPREPLY=()
9
9
  current="${COMP_WORDS[COMP_CWORD]}"
10
10
  previous="${COMP_WORDS[COMP_CWORD - 1]}"
11
- options=$($CDS_COMMAND completion --shell bash --prev "$previous" --curr "$current" --line "${COMP_WORDS[*]}")
11
+
12
+ # double quoting needed to avoid word 'h' to be recognized as command shortcut 'help'
13
+ options=$($CDS_COMMAND completion --shell bash --prev "'$previous'" --curr "'$current'" --line "'${COMP_WORDS[*]}'")
14
+
12
15
  COMPREPLY=( $(compgen -W "${options}" -- ${current}) )
13
16
  compopt -o nosort -o nospace
14
17
  return 0
@@ -0,0 +1,13 @@
1
+ #!/bin/fish
2
+
3
+ set CDS_COMMAND "cds"
4
+ function _completeCds
5
+ set -l line (commandline -cp)
6
+ set -l words (string split " " -- $line)
7
+
8
+ # double quoting needed to avoid word 'h' to be recognized as command shortcut 'help'
9
+ echo ($CDS_COMMAND completion --shell fish --prev "'$words[-2]'" --curr "'$words[-1]'" --line "'$line'")
10
+ end
11
+
12
+ # split into string array so result is not interpreted as single string
13
+ complete -c $CDS_COMMAND --no-files --keep-order --arguments "(_completeCds | string split ' ')"
@@ -11,7 +11,8 @@ Register-ArgumentCompleter -Native -CommandName $COMMAND -ScriptBlock {
11
11
  $previousWord = $cmdSegments[$cmdSegments.Count - 1].Extent.Text
12
12
  }
13
13
 
14
- $options = & $COMMAND completion --shell ps --prev "$previousWord" --curr "$wordToComplete" --line "$commandAst"
14
+ # double quoting needed to avoid word 'h' to be recognized as command shortcut 'help'
15
+ $options = & $COMMAND completion --shell ps --prev "'$previousWord'" --curr "'$wordToComplete'" --line "'$commandAst'"
15
16
  foreach ($option in $options) {
16
17
  [System.Management.Automation.CompletionResult]::new($option, $option, 'ParameterValue', $option)
17
18
  }
@@ -6,7 +6,8 @@
6
6
  CDS_COMMAND="cds"
7
7
 
8
8
  _completeCds() {
9
- compadd -S '' -V 'force no sort' -- `${CDS_COMMAND} completion --shell zsh --prev "${words[CURRENT-1]}" --curr "${words[CURRENT]}" --line "${words}"`
9
+ # double quoting needed to avoid word 'h' to be recognized as command shortcut 'help'
10
+ compadd -S '' -V 'force no sort' -- `${CDS_COMMAND} completion --shell zsh --prev "'${words[CURRENT-1]}'" --curr "'${words[CURRENT]}'" --line "'${words}'"`
10
11
  }
11
12
 
12
13
  compdef _completeCds ${CDS_COMMAND}
@@ -29,8 +29,9 @@ module.exports = Object.assign(deploy, {
29
29
 
30
30
  *--profile* <profile,...>
31
31
 
32
- Loads the configuration data for the specified profile(s). 'cds build' is executed based on this profile settings.
33
- The *development* profile is used by default.
32
+ Loads the configuration data for the specified profile(s). 'cds build' is executed based on these profile settings,
33
+ additionally binding information is resolved based on these profile settings. If a corresponding binding exists its service
34
+ name and service key will be used. The *development* profile is used by default.
34
35
 
35
36
  *--dry*
36
37
 
@@ -44,16 +45,16 @@ module.exports = Object.assign(deploy, {
44
45
 
45
46
  Deprecated. The package.json file is no longer modified.
46
47
 
47
- *--auto-undeploy* (beta feature)
48
+ *--auto-undeploy*
48
49
 
49
50
  Tell HDI deployer to automatically undeploy deleted resources.
50
51
 
51
- *--tunnel-address* (beta feature)
52
+ *--tunnel-address*
52
53
 
53
54
  Deploy through the given address (host:port) rather than the original
54
55
  database address. The tunnel must have been opened before, e.g. using 'cf ssh'.
55
56
 
56
- *--vcap-file* (beta feature)
57
+ *--vcap-file*
57
58
 
58
59
  Use credentials from the given file when deploying to *SAP HANA*, instead of
59
60
  creating new credentials. File must be in *default-env.json* format, with a root
@@ -5,12 +5,12 @@ exports.deploy = function deploy_to_sqlite (_model, _db, options) {
5
5
  const cds = require('../../lib/cds')
6
6
  const conf = cds.env.requires.db ?? {}
7
7
  const fts = cds.env.requires.toggles && cds.env.features.folders
8
- const model = _model || conf.model || cds.resolve(!fts ? '*' : ['*',fts], false)
8
+ const model = _model || cds.resolve(!fts ? '*' : ['*',fts], false)
9
9
  let file = 'db'
10
10
  if (options.to) {
11
11
  file = 'sqlite:'+ _database4 (_db, options.to, conf)
12
12
  // current 'sqlite' default is bad, as we want to default to 'plain', so ignore it
13
- const env_dialect = cds.env.sql.dialect !== 'sqlite' ? cds.env.sql.dialect : 'plain'
13
+ const env_dialect = cds.env.sql.dialect || 'plain'
14
14
  const to_dialect = options.to && options.to.match(/^(\w+)/) && RegExp.$1
15
15
  if (to_dialect) options.dialect = (to_dialect === 'sql')
16
16
  ? conf.dialect ?? env_dialect