@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.
- package/CHANGELOG.md +2116 -0
- package/bin/add.js +18 -52
- package/bin/bind.js +2 -2
- package/bin/build.js +29 -4
- package/bin/cds.js +23 -11
- package/bin/compile/index.js +7 -6
- package/bin/completion/index.js +70 -46
- package/bin/completion/scripts/cds-bash.sh +4 -1
- package/bin/completion/scripts/cds-fish.fish +13 -0
- package/bin/completion/scripts/cds-ps.ps1 +2 -1
- package/bin/completion/scripts/cds-zsh.sh +2 -1
- package/bin/deploy/index.js +6 -5
- package/bin/deploy/to-sqlite.js +2 -2
- package/bin/extend.js +19 -50
- package/bin/help.js +2 -2
- package/bin/init.js +10 -77
- package/bin/login.js +13 -5
- package/bin/migrate.js +1 -1
- package/bin/pull.js +11 -0
- package/bin/repl.js +3 -0
- package/bin/test.js +5 -0
- package/bin/version.js +7 -7
- package/bin/watch.js +2 -11
- package/lib/bind/KubernetesApiAccessor.js +10 -9
- package/lib/build/buildTaskEngine.js +11 -7
- package/lib/build/buildTaskFactory.js +15 -43
- package/lib/build/buildTaskProviderFactory.js +16 -44
- package/lib/build/constants.js +3 -3
- package/lib/build/index.js +2 -2
- package/lib/build/{buildPlugin.js → plugin.js} +65 -46
- package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/content-deployment/Chart.yaml +1 -1
- package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/content-deployment/values.yaml +1 -1
- package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/service-instance/Chart.yaml +1 -1
- package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/service-instance/templates/_helpers.tpl +7 -0
- package/lib/build/plugins/helm/files/subcharts/service-instance/templates/servicebinding.yaml +32 -0
- package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/service-instance/templates/serviceinstance.yaml +3 -0
- package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/service-instance/values.schema.json +63 -0
- package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/service-instance/values.yaml +23 -1
- package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/Chart.yaml +1 -1
- package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/templates/deployment.yaml +2 -0
- package/lib/build/plugins/helm/files/subcharts/web-application/templates/hpa.yaml +22 -0
- package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/templates/pod-disruption-budget.yaml +1 -0
- package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/values.schema.json +49 -0
- package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/values.yaml +8 -2
- package/lib/{init/template/helm/files/chart → build/plugins/helm/files}/templates/_deployment_helpers.tpl +5 -0
- package/lib/build/plugins/helm/files/templates/_helpers.tpl +13 -0
- package/lib/build/plugins/helm/index.js +81 -0
- package/lib/build/plugins.js +12 -15
- package/lib/build/provider/featureToggleBuildPlugin.js +7 -39
- package/lib/build/provider/hana/2migration.js +168 -124
- package/lib/build/provider/hana/index.js +20 -25
- package/lib/build/provider/hana/template/.hdiconfig-all +3 -0
- package/lib/build/provider/hana/template/.hdiconfig-cloud +3 -0
- package/lib/build/provider/hana/template/package.json +4 -3
- package/lib/build/provider/internalBuildPlugin.js +32 -97
- package/lib/build/provider/internalBuildTaskProvider.js +10 -46
- package/lib/build/provider/java/index.js +2 -3
- package/lib/build/provider/mtx/index.js +5 -4
- package/lib/build/provider/mtx-extension/index.js +5 -2
- package/lib/build/provider/mtx-sidecar/index.js +2 -2
- package/lib/build/util.js +83 -12
- package/lib/compile/to-mermaid.js +108 -0
- package/lib/compile/to_asyncapi.js +7 -0
- package/lib/compile/to_openapi.js +7 -0
- package/lib/deploy/to-hana/hana.js +37 -34
- package/lib/deploy/to-hana/hdiDeployUtil.js +8 -6
- package/lib/env/schemas/cds-rc.js +1 -1
- package/lib/import/common.js +2 -2
- package/lib/import/odata/metadataconverter/MetadataConverter.js +4 -4
- package/lib/import/odata/v2parser.js +83 -197
- package/lib/import/odata/v4parser.js +1 -38
- package/lib/import/openapi/importOpenAPI.js +164 -42
- package/lib/index.js +10 -12
- package/lib/init/bas.js +91 -0
- package/lib/init/constants.js +16 -10
- package/lib/init/index.js +74 -150
- package/lib/init/merge.js +12 -20
- package/lib/init/mvn.js +103 -150
- package/lib/init/plugin.js +11 -7
- package/lib/init/projectReader.js +53 -19
- package/lib/init/registries/mta.js +51 -6
- package/lib/init/template/application-logging/files/package.json.hbs +7 -0
- package/lib/init/template/application-logging/index.js +13 -1
- package/lib/init/template/approuter/files/containerize.yaml.hbs +10 -0
- package/lib/init/template/approuter/files/mta.yaml.hbs +1 -2
- package/lib/init/template/approuter/files/values.yaml.hbs +19 -4
- package/lib/init/template/approuter/files/xs-app.json.hbs +12 -3
- package/lib/init/template/approuter/index.js +29 -25
- package/lib/init/template/attachments/files/mta.yaml.hbs +14 -0
- package/lib/init/template/attachments/files/package.json.hbs +5 -0
- package/lib/init/template/attachments/files/values.yaml +7 -0
- package/lib/init/template/attachments/index.js +53 -0
- package/lib/init/template/audit-logging/files/mta.yaml.hbs +14 -0
- package/lib/init/template/audit-logging/files/package.json.hbs +7 -0
- package/lib/init/template/audit-logging/index.js +66 -0
- package/lib/init/template/cf-manifest/index.js +4 -0
- package/lib/init/template/completion/completionSetup.js +54 -33
- package/lib/init/template/completion/index.js +7 -1
- package/lib/init/template/connectivity/index.js +4 -4
- package/lib/init/template/containerize/files/containerize.yaml.hbs +26 -0
- package/lib/init/template/containerize/index.js +24 -0
- package/lib/init/template/data/index.js +4 -0
- package/lib/init/template/destination/files/mta.yaml.hbs +25 -1
- package/lib/init/template/destination/index.js +12 -2
- package/lib/init/template/enterprise-messaging/index.js +6 -3
- package/lib/init/template/enterprise-messaging-shared/index.js +5 -1
- package/lib/init/template/extensibility/files/package.json.hbs +1 -1
- package/lib/init/template/extensibility/files/xs-security.json.hbs +2 -8
- package/lib/init/template/extensibility/index.js +3 -1
- package/lib/init/template/file-based-messaging/index.js +4 -0
- package/lib/init/template/h2/index.js +4 -0
- package/lib/init/template/hana/files/containerize.yaml.hbs +10 -0
- package/lib/init/template/hana/files/db/package.json +3 -2
- package/lib/init/template/hana/files/package.json.hbs +4 -7
- package/lib/init/template/hana/files/src/.hdiconfig +3 -0
- package/lib/init/template/hana/files/values.yaml.hbs +1 -2
- package/lib/init/template/hana/index.js +15 -7
- package/lib/init/template/helm/files/Chart.yaml.hbs +2 -3
- package/lib/init/template/helm/files/values.schema.json +2173 -0
- package/lib/init/template/helm/files/values.yaml.hbs +11 -6
- package/lib/init/template/helm/index.js +77 -18
- package/lib/init/template/helm-unified-runtime/index.js +19 -56
- package/lib/init/template/html5-repo/files/app-package.json.hbs +11 -7
- package/lib/init/template/html5-repo/files/manifest.json +13 -0
- package/lib/init/template/html5-repo/files/mta.yaml.hbs +41 -8
- package/lib/init/template/html5-repo/files/ui5-deploy.yaml.hbs +21 -0
- package/lib/init/template/html5-repo/files/ui5.yaml.hbs +2 -29
- package/lib/init/template/html5-repo/files/values.yaml.hbs +6 -2
- package/lib/init/template/html5-repo/files/xs-app.json.hbs +21 -8
- package/lib/init/template/html5-repo/index.js +33 -30
- package/lib/init/template/http/index.js +36 -12
- package/lib/init/template/java/index.js +18 -12
- package/lib/init/template/kafka/index.js +4 -0
- package/lib/init/template/lint/index.js +7 -2
- package/lib/init/template/liquibase/index.js +4 -0
- package/lib/init/template/local-messaging/index.js +4 -0
- package/lib/init/template/malware-scanner/files/mta.yaml.hbs +14 -0
- package/lib/init/template/malware-scanner/files/package.json.hbs +17 -0
- package/lib/init/template/malware-scanner/files/values.yaml +7 -0
- package/lib/init/template/malware-scanner/index.js +47 -0
- package/lib/init/template/mta/files/mta.yaml.hbs +3 -3
- package/lib/init/template/mta/files/package.json +1 -1
- package/lib/init/template/mta/index.js +4 -0
- package/lib/init/template/mtx/index.js +4 -0
- package/lib/init/template/multitenancy/files/containerize.yaml.hbs +10 -0
- package/lib/init/template/multitenancy/files/mta.yaml.hbs +0 -1
- package/lib/init/template/multitenancy/files/package.json.hbs +1 -1
- package/lib/init/template/multitenancy/files/package.sidecar.json.hbs +6 -5
- package/lib/init/template/multitenancy/files/values.yaml.hbs +14 -24
- package/lib/init/template/multitenancy/index.js +50 -28
- package/lib/init/template/nodejs/files/eslint.config.mjs +2 -0
- package/lib/init/template/nodejs/files/package.json.hbs +2 -3
- package/lib/init/template/nodejs/index.js +4 -0
- package/lib/init/template/notifications/files/mta.yaml.hbs +2 -2
- package/lib/init/template/notifications/index.js +4 -0
- package/lib/init/template/pipeline/files/.pipeline/config.yml +1 -1
- package/lib/init/template/pipeline/files/Jenkinsfile +1 -1
- package/lib/init/template/pipeline/index.js +4 -0
- package/lib/init/template/portal/files/mta.yaml.hbs +52 -0
- package/lib/init/template/portal/files/package.json.hbs +11 -0
- package/lib/init/template/portal/files/package.sidecar.json +7 -0
- package/lib/init/template/portal/files/portal-site/CommonDataModel.json.hbs +97 -0
- package/lib/init/template/portal/files/portal-site/i18n/catalog.properties +1 -0
- package/lib/init/template/portal/files/portal-site/i18n/catalog_de.properties +1 -0
- package/lib/init/template/portal/files/portal-site/i18n/group.properties +1 -0
- package/lib/init/template/portal/files/portal-site/i18n/group_de.properties +1 -0
- package/lib/init/template/portal/index.js +84 -0
- package/lib/init/template/postgres/index.js +5 -1
- package/lib/init/template/redis-messaging/index.js +4 -0
- package/lib/init/template/sample/files/app/admin-books/webapp/i18n/i18n_de.properties +3 -0
- package/lib/init/template/sample/files/app/admin-books/webapp/i18n/i18n_en.properties +3 -0
- package/lib/init/template/sample/files/app/admin-books/webapp/manifest.json +13 -1
- package/lib/init/template/sample/files/app/browse/webapp/i18n/i18n.properties +2 -2
- package/lib/init/template/sample/files/app/browse/webapp/i18n/i18n_de.properties +3 -0
- package/lib/init/template/sample/files/app/browse/webapp/i18n/i18n_en.properties +4 -0
- package/lib/init/template/sample/files/app/browse/webapp/manifest.json +3 -3
- package/lib/init/template/sample/files/app/index.html +1 -1
- package/lib/init/template/sample/files/db/data/sap.capire.bookshop-Authors.csv +5 -5
- package/lib/init/template/sample/files/db/data/sap.capire.bookshop-Books.csv +6 -6
- package/lib/init/template/sample/files/db/data/sap.capire.bookshop-Books_texts.csv +5 -5
- package/lib/init/template/sample/files/db/data/sap.capire.bookshop-Genres.csv +16 -16
- package/lib/init/template/sample/files/nodejs/cat-service.js +2 -2
- package/lib/init/template/sample/files/package.json.hbs +3 -0
- package/lib/init/template/sample/index.js +16 -9
- package/lib/init/template/sqlite/index.js +4 -0
- package/lib/init/template/tiny-sample/files/nodejs/db/data/my.bookshop-Books.csv +3 -3
- package/lib/init/template/tiny-sample/files/nodejs/srv/cat-service.cds.hbs +1 -1
- package/lib/init/template/tiny-sample/index.js +4 -0
- package/lib/init/template/toggles/files/package.json.hbs +1 -1
- package/lib/init/template/toggles/index.js +4 -0
- package/lib/init/template/typer/index.js +4 -0
- package/lib/init/template/typescript/files/package.json +12 -0
- package/lib/init/template/typescript/files/tsconfig.json +13 -0
- package/lib/init/template/typescript/index.js +39 -0
- package/lib/init/template/workzone/index.js +5 -0
- package/lib/init/template/workzone-standard/files/manifest.json.hbs +6 -0
- package/lib/init/template/workzone-standard/index.js +30 -0
- package/lib/init/template/xsuaa/files/package.json.hbs +1 -1
- package/lib/init/template/xsuaa/files/values.yaml.hbs +3 -2
- package/lib/init/template/xsuaa/index.js +11 -7
- package/lib/init/validate.js +27 -0
- package/lib/lint/generators.js +1 -1
- package/lib/lint/io.js +25 -7
- package/lib/mtx/auth_manager.js +64 -30
- package/lib/mtx/download_legacy.js +2 -2
- package/lib/mtx/index.js +0 -4
- package/lib/mtx/params.js +32 -38
- package/lib/mtx/pull.js +151 -43
- package/lib/mtx/push.js +3 -3
- package/lib/mtx/settings_manager.js +75 -35
- package/lib/mtx/tenant_action.js +1 -1
- package/lib/mtx/util/cf.js +1 -1
- package/lib/mtx/util/fs.js +26 -1
- package/lib/mtx/util/logging.js +7 -3
- package/lib/util/command.js +0 -2
- package/lib/util/fs.js +2 -3
- package/lib/util/question.js +28 -0
- package/lib/util/term.js +5 -3
- package/npm-shrinkwrap.json +231 -1089
- package/package.json +13 -8
- package/bin/activate.js +0 -77
- package/lib/compile/asyncapi/channels.js +0 -22
- package/lib/compile/asyncapi/components/messageTraits/index.js +0 -89
- package/lib/compile/asyncapi/components/messages/index.js +0 -173
- package/lib/compile/asyncapi/components/schemas/annotations.js +0 -33
- package/lib/compile/asyncapi/components/schemas/array.js +0 -8
- package/lib/compile/asyncapi/components/schemas/cache.js +0 -14
- package/lib/compile/asyncapi/components/schemas/definition.js +0 -187
- package/lib/compile/asyncapi/components/schemas/enum.js +0 -16
- package/lib/compile/asyncapi/components/schemas/examples.js +0 -10
- package/lib/compile/asyncapi/components/schemas/index.js +0 -14
- package/lib/compile/asyncapi/components/schemas/localized.js +0 -29
- package/lib/compile/asyncapi/components/schemas/primitiveElement.js +0 -41
- package/lib/compile/asyncapi/components/schemas/ref.js +0 -45
- package/lib/compile/asyncapi/components/schemas/utils.js +0 -108
- package/lib/compile/asyncapi/index.js +0 -247
- package/lib/compile/asyncapi/message.js +0 -13
- package/lib/compile/asyncapi/utils.js +0 -27
- package/lib/compile/openapi/csdl2openapi.js +0 -2448
- package/lib/compile/openapi/index.js +0 -68
- package/lib/init/template/helm/files/chart/templates/NOTES.txt +0 -14
- package/lib/init/template/helm/files/chart/templates/_helpers.tpl +0 -28
- package/lib/init/template/helm/files/chart/values.root.schema.json +0 -61
- package/lib/init/template/helm/files/chart/values.schema.json +0 -366
- package/lib/init/template/helm-unified-runtime/files/Chart.yaml.hbs +0 -10
- package/lib/init/template/helm-unified-runtime/files/templates/_deployment_helpers.tpl +0 -90
- package/lib/init/template/helm-unified-runtime/files/templates/_helpers.tpl +0 -28
- package/lib/init/template/helm-unified-runtime/files/values.root.schema.json +0 -61
- package/lib/init/template/helm-unified-runtime/files/values.schema.json +0 -366
- package/lib/init/template/helm-unified-runtime/files/values.yaml.hbs +0 -26
- package/lib/init/template/helm-unified-runtime/package.json +0 -4
- package/lib/init/template/multitenancy/files/mtxs-configmap-java-approuter.yaml +0 -20
- package/lib/init/template/multitenancy/files/mtxs-configmap-java.yaml +0 -18
- package/lib/init/template/multitenancy/files/mtxs-configmap-nodejs-approuter.yaml +0 -12
- package/lib/init/template/multitenancy/files/mtxs-configmap-nodejs.yaml +0 -12
- package/lib/init/template/multitenancy/files/saas-registry-secret.yaml +0 -9
- package/lib/init/template/nodejs/files/eslint.config.js +0 -13
- package/lib/init/template/notebook/index.js +0 -11
- package/lib/init/template/samples/index.js +0 -9
- package/lib/mtx/activate.js +0 -238
- package/lib/mtx/extend.js +0 -173
- package/lib/util/exec.d.ts +0 -54
- package/lib/util/exec.js +0 -211
- /package/lib/{init/template/approuter/files → build/plugins/helm/files/plugins/approuter}/approuter-configmap.yaml +0 -0
- /package/lib/{init/template/connectivity/files → build/plugins/helm/files/plugins/connectivity}/connectivity-proxy-info.yaml +0 -0
- /package/lib/{init/template/html5-repo/files → build/plugins/helm/files/plugins/html5-repo}/html5-apps-deployer-configmap.yaml +0 -0
- /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/content-deployment/templates/_helpers.tpl +0 -0
- /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/content-deployment/templates/job.yaml +0 -0
- /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/content-deployment/templates/secret.yaml +0 -0
- /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/content-deployment/templates/service-account.yaml +0 -0
- /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/content-deployment/templates/service-binding.yaml +0 -0
- /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/content-deployment/values.schema.json +0 -0
- /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/templates/NOTES.txt +0 -0
- /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/templates/_api.tpl +0 -0
- /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/templates/_helpers.tpl +0 -0
- /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/templates/api-rule.yaml +0 -0
- /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/templates/network-policy.yaml +0 -0
- /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/templates/rbac.yaml +0 -0
- /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/templates/secret.yaml +0 -0
- /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/templates/service-account.yaml +0 -0
- /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/templates/service-binding.yaml +0 -0
- /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/templates/service.yaml +0 -0
- /package/lib/{init/template/helm/files → build/plugins/helm/files/subcharts}/web-application/templates/virtual-service.yaml +0 -0
- /package/lib/{init/template/helm-unified-runtime → build/plugins/helm}/files/templates/NOTES.txt +0 -0
- /package/lib/init/template/{nodejs/files → java}/.cdsrc.json +0 -0
- /package/lib/init/template/tiny-sample/files/nodejs/db/{data-model.cds → schema.cds} +0 -0
|
@@ -6,6 +6,10 @@ const { notificationTypesDeployer } = require('../../registries/mta')
|
|
|
6
6
|
|
|
7
7
|
module.exports = class NotificationsTemplate extends require('../../plugin') {
|
|
8
8
|
|
|
9
|
+
static help() {
|
|
10
|
+
return 'SAP BTP Notification Service'
|
|
11
|
+
}
|
|
12
|
+
|
|
9
13
|
requires() {
|
|
10
14
|
return [DESTINATION]
|
|
11
15
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# For a reference of the configuration concept and available options, please have a look into its documentation.
|
|
4
4
|
#
|
|
5
5
|
# The documentation for the most recent pipeline version can always be found at:
|
|
6
|
-
# https://
|
|
6
|
+
# https://www.project-piper.io/
|
|
7
7
|
#
|
|
8
8
|
# This is a YAML-file. YAML is an indentation-sensitive file format. Please make sure to properly indent changes to it.
|
|
9
9
|
###
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This file bootstraps the codified Continuous Delivery pipeline for extensions of SAP solutions such as SAP S/4HANA.
|
|
5
5
|
* The pipeline helps you to deliver software changes quickly and in a reliable manner.
|
|
6
6
|
* A suitable Jenkins instance is required to run the pipeline.
|
|
7
|
-
* More information on getting started with Continuous Delivery can be found here: https://
|
|
7
|
+
* More information on getting started with Continuous Delivery can be found here: https://www.project-piper.io/
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
@Library('piper-lib-os') _
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
modules:
|
|
3
|
+
- name: {{appName}}-srv
|
|
4
|
+
type: {{language}}
|
|
5
|
+
path: {{& srvPath}}
|
|
6
|
+
requires:
|
|
7
|
+
- name: {{appName}}-portal
|
|
8
|
+
|
|
9
|
+
- name: {{appName}}-mtx
|
|
10
|
+
type: nodejs
|
|
11
|
+
path: {{#isNodejs}}gen/{{/isNodejs}}mtx/sidecar
|
|
12
|
+
requires:
|
|
13
|
+
- name: {{appName}}-portal
|
|
14
|
+
|
|
15
|
+
- name: {{appName}}
|
|
16
|
+
type: approuter.nodejs
|
|
17
|
+
requires:
|
|
18
|
+
- name: {{appName}}-portal
|
|
19
|
+
|
|
20
|
+
- name: {{appName}}-portal-deployer
|
|
21
|
+
type: com.sap.application.content
|
|
22
|
+
path: app/portal
|
|
23
|
+
{{#hasMultitenancy}}
|
|
24
|
+
parameters:
|
|
25
|
+
config:
|
|
26
|
+
TENANT_HOST_PATTERN: "^(.*)-${default-uri}"
|
|
27
|
+
{{/hasMultitenancy}}
|
|
28
|
+
requires:
|
|
29
|
+
- name: {{appName}}-portal
|
|
30
|
+
parameters:
|
|
31
|
+
content-target: true
|
|
32
|
+
service-key:
|
|
33
|
+
name: {{appName}}-portal-key
|
|
34
|
+
config:
|
|
35
|
+
content-endpoint: developer
|
|
36
|
+
- name: {{appName}}-auth
|
|
37
|
+
- name: {{appName}}-html5-repo-host
|
|
38
|
+
- name: {{appName}}-app-deployer
|
|
39
|
+
deployed-after:
|
|
40
|
+
- {{appName}}-app-deployer
|
|
41
|
+
|
|
42
|
+
resources:
|
|
43
|
+
- name: {{appName}}-portal
|
|
44
|
+
type: org.cloudfoundry.managed-service
|
|
45
|
+
parameters:
|
|
46
|
+
service: portal
|
|
47
|
+
service-plan: standard
|
|
48
|
+
|
|
49
|
+
- name: {{appName}}-destination
|
|
50
|
+
type: org.cloudfoundry.managed-service
|
|
51
|
+
parameters:
|
|
52
|
+
service: destination
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_version": "3.0.0",
|
|
3
|
+
"identification": {
|
|
4
|
+
"title": "{{appName}}",
|
|
5
|
+
"id": "{{appName}}-flp",
|
|
6
|
+
"entityType": "bundle"
|
|
7
|
+
},
|
|
8
|
+
"payload": {
|
|
9
|
+
"catalogs": [
|
|
10
|
+
{
|
|
11
|
+
"_version": "3.0.0",
|
|
12
|
+
"identification": {
|
|
13
|
+
"id": "{{appName}}-catalog",
|
|
14
|
+
"title": "{{#literal}}{{title}}{{/literal}}",
|
|
15
|
+
"entityType": "catalog",
|
|
16
|
+
"i18n": "i18n/catalog.properties"
|
|
17
|
+
},
|
|
18
|
+
"payload": {
|
|
19
|
+
"viz": [
|
|
20
|
+
{{#apps}}
|
|
21
|
+
{
|
|
22
|
+
"appId": "{{appName}}.{{app}}",
|
|
23
|
+
"vizId": "{{vizId}}"
|
|
24
|
+
}{{#isNotLast}},{{/isNotLast}}
|
|
25
|
+
{{/apps}}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"groups": [
|
|
31
|
+
{
|
|
32
|
+
"_version": "3.0.0",
|
|
33
|
+
"identification": {
|
|
34
|
+
"id": "{{appName}}-group",
|
|
35
|
+
"title": "{{#literal}}{{title}}{{/literal}}",
|
|
36
|
+
"entityType": "group",
|
|
37
|
+
"i18n": "i18n/group.properties"
|
|
38
|
+
},
|
|
39
|
+
"payload": {
|
|
40
|
+
"viz": [
|
|
41
|
+
{{#apps}}
|
|
42
|
+
{
|
|
43
|
+
"id": "{{appName}}{{app}}-001",
|
|
44
|
+
"appId": "{{appName}}.{{app}}",
|
|
45
|
+
"vizId": "{{vizId}}"
|
|
46
|
+
}{{#isNotLast}},{{/isNotLast}}
|
|
47
|
+
{{/apps}}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"sites": [
|
|
53
|
+
{
|
|
54
|
+
"_version": "3.0.0",
|
|
55
|
+
"identification": {
|
|
56
|
+
"id": "{{appName}}-site",
|
|
57
|
+
"entityType": "site",
|
|
58
|
+
"title": "{{appName}}",
|
|
59
|
+
"description": "{{appDescription}}"
|
|
60
|
+
},
|
|
61
|
+
"payload": {
|
|
62
|
+
"config": {
|
|
63
|
+
"ushellConfig": {
|
|
64
|
+
"renderers": {
|
|
65
|
+
"fiori2": {
|
|
66
|
+
"componentData": {
|
|
67
|
+
"config": {
|
|
68
|
+
"applications": {
|
|
69
|
+
"Shell-home": {}
|
|
70
|
+
},
|
|
71
|
+
"enableSearch": true,
|
|
72
|
+
"enablePersonalization": true,
|
|
73
|
+
"enableSetTheme": true,
|
|
74
|
+
"enableSetLanguage": true
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"groupsOrder": ["{{appName}}-group"],
|
|
82
|
+
"sap.cloud.portal": {
|
|
83
|
+
"config": {
|
|
84
|
+
"theme.id": "sap_horizon",
|
|
85
|
+
"theme.active": [
|
|
86
|
+
"sap_horizon",
|
|
87
|
+
"sap_horizon_dark",
|
|
88
|
+
"sap_horizon_hcw",
|
|
89
|
+
"sap_horizon_hcb"
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
title=Bookshop
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
title=Bücherladen
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
title=Bookshop
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
title=Bücherladen
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
const cds = require('../../../cds')
|
|
2
|
+
const { path } = cds.utils
|
|
3
|
+
const { readProject } = require('../../projectReader')
|
|
4
|
+
const { merge } = require('../../merge')
|
|
5
|
+
const { srv4, portal, portalDeployer, xsuaa, html5RepoHost, appDeployer, approuter, mtxSidecar4 } = require('../../registries/mta')
|
|
6
|
+
const { renderAndCopy } = require('../../template')
|
|
7
|
+
|
|
8
|
+
module.exports = class PortalTemplate extends require('../../plugin') {
|
|
9
|
+
|
|
10
|
+
static help() {
|
|
11
|
+
return 'SAP BTP Portal Service'
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
requires() {
|
|
15
|
+
return ['html5-repo', 'approuter']
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
static hasInProduction(env) {
|
|
19
|
+
return !!env.requires?.portal
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async run() {
|
|
23
|
+
const project = readProject()
|
|
24
|
+
const { configFile } = project
|
|
25
|
+
await merge(__dirname, 'files/package.json.hbs').into(configFile, { project })
|
|
26
|
+
project.literal = () => text => text
|
|
27
|
+
await renderAndCopy(path.join(__dirname, 'files/portal-site'), 'app/portal/portal-site', project)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
async combine() {
|
|
31
|
+
const project = readProject()
|
|
32
|
+
const { isJava, hasMta, srvPath, hasHtml5Repo, hasXsuaa, hasApprouter, hasMultitenancy } = project
|
|
33
|
+
|
|
34
|
+
if (hasMultitenancy) {
|
|
35
|
+
await merge(__dirname, 'files/package.sidecar.json').into('mtx/sidecar/package.json')
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (hasMta) {
|
|
39
|
+
const srv = srv4(srvPath)
|
|
40
|
+
const additions = [srv, portal, portalDeployer]
|
|
41
|
+
const relationships = [{
|
|
42
|
+
insert: [portal, 'name'],
|
|
43
|
+
into: [portalDeployer, 'requires', 'name']
|
|
44
|
+
}, {
|
|
45
|
+
insert: [appDeployer, 'name'],
|
|
46
|
+
into: [portalDeployer, 'requires', 'name']
|
|
47
|
+
}]
|
|
48
|
+
|
|
49
|
+
if (hasXsuaa) {
|
|
50
|
+
relationships.push({
|
|
51
|
+
insert: [xsuaa, 'name'],
|
|
52
|
+
into: [portalDeployer, 'requires', 'name']
|
|
53
|
+
})
|
|
54
|
+
}
|
|
55
|
+
if (hasHtml5Repo) {
|
|
56
|
+
relationships.push({
|
|
57
|
+
insert: [html5RepoHost, 'name'],
|
|
58
|
+
into: [portalDeployer, 'requires', 'name']
|
|
59
|
+
})
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (hasApprouter) {
|
|
63
|
+
additions.push(approuter)
|
|
64
|
+
relationships.push({
|
|
65
|
+
insert: [portal, 'name'],
|
|
66
|
+
into: [approuter, 'requires', 'name']
|
|
67
|
+
})
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (hasMultitenancy) {
|
|
71
|
+
relationships.push({
|
|
72
|
+
insert: [portal, 'name'],
|
|
73
|
+
into: [mtxSidecar4(isJava ? 'mtx/sidecar' : 'gen/mtx/sidecar'), 'requires', 'name']
|
|
74
|
+
})
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
await merge(__dirname, 'files/mta.yaml.hbs').into('mta.yaml', {
|
|
78
|
+
with: project, additions, relationships
|
|
79
|
+
})
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// if (hasHelm) TODO
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -7,6 +7,10 @@ const { srv4, postgres, postgresDeployer } = require('../../registries/mta')
|
|
|
7
7
|
|
|
8
8
|
module.exports = class PostgresTemplate extends require('../../plugin') {
|
|
9
9
|
|
|
10
|
+
static help() {
|
|
11
|
+
return 'database support for PostgreSQL'
|
|
12
|
+
}
|
|
13
|
+
|
|
10
14
|
async canRun() {
|
|
11
15
|
const { hasMta, hasHelm, hasHelmUnifiedRuntime } = readProject()
|
|
12
16
|
if ((hasHelm || hasHelmUnifiedRuntime) && !hasMta) throw `'cds add postgres' is not available for Kyma yet`
|
|
@@ -21,7 +25,7 @@ module.exports = class PostgresTemplate extends require('../../plugin') {
|
|
|
21
25
|
const project = readProject()
|
|
22
26
|
const { configFile, isJava } = project
|
|
23
27
|
project.shortcut = !(await read(configFile)).cds?.requires?.db?.kind
|
|
24
|
-
await merge(__dirname, 'files/package.json.hbs').into(
|
|
28
|
+
await merge(__dirname, 'files/package.json.hbs').into('package.json', { project })
|
|
25
29
|
if (isJava) await mvn.add('postgresql')
|
|
26
30
|
}
|
|
27
31
|
|
|
@@ -6,6 +6,10 @@ const { srv4, redis } = require('../../registries/mta')
|
|
|
6
6
|
|
|
7
7
|
module.exports = class RedisMessagingTemplate extends require('../../plugin') {
|
|
8
8
|
|
|
9
|
+
static help() {
|
|
10
|
+
return 'messaging via Redis'
|
|
11
|
+
}
|
|
12
|
+
|
|
9
13
|
async canRun() {
|
|
10
14
|
const { hasMta, hasHelm, hasHelmUnifiedRuntime, isJava } = readProject()
|
|
11
15
|
const onlyHelm = !hasMta && (hasHelmUnifiedRuntime || hasHelm)
|
|
@@ -11,12 +11,24 @@
|
|
|
11
11
|
"i18n": "i18n/i18n.properties",
|
|
12
12
|
"dataSources": {
|
|
13
13
|
"AdminService": {
|
|
14
|
-
"uri": "
|
|
14
|
+
"uri": "odata/v4/admin/",
|
|
15
15
|
"type": "OData",
|
|
16
16
|
"settings": {
|
|
17
17
|
"odataVersion": "4.0"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
+
},
|
|
21
|
+
"crossNavigation": {
|
|
22
|
+
"inbounds": {
|
|
23
|
+
"intent-Books-manage": {
|
|
24
|
+
"signature": {
|
|
25
|
+
"parameters": {},
|
|
26
|
+
"additionalParameters": "allowed"
|
|
27
|
+
},
|
|
28
|
+
"semanticObject": "Books",
|
|
29
|
+
"action": "manage"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
20
32
|
}
|
|
21
33
|
},
|
|
22
34
|
"sap.ui": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"i18n": "i18n/i18n.properties",
|
|
12
12
|
"dataSources": {
|
|
13
13
|
"CatalogService": {
|
|
14
|
-
"uri": "
|
|
14
|
+
"uri": "odata/v4/catalog/",
|
|
15
15
|
"type": "OData",
|
|
16
16
|
"settings": {
|
|
17
17
|
"odataVersion": "4.0"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"crossNavigation": {
|
|
22
22
|
"inbounds": {
|
|
23
|
-
"
|
|
23
|
+
"Books-display": {
|
|
24
24
|
"signature": {
|
|
25
25
|
"parameters": {
|
|
26
26
|
"Books.ID": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"renameTo": "ID"
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
|
-
"additionalParameters": "
|
|
33
|
+
"additionalParameters": "allowed"
|
|
34
34
|
},
|
|
35
35
|
"semanticObject": "Books",
|
|
36
36
|
"action": "display",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
data-sap-ui-frameOptions="allow"
|
|
25
25
|
></script>
|
|
26
26
|
<script>
|
|
27
|
-
sap.ui.getCore().attachInit(()=> sap.ushell.Container.createRenderer().placeAt("content"))
|
|
27
|
+
sap.ui.getCore().attachInit(() => sap.ushell.Container.createRenderer().placeAt("content"))
|
|
28
28
|
</script>
|
|
29
29
|
|
|
30
30
|
</head>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
ID
|
|
2
|
-
101
|
|
3
|
-
107
|
|
4
|
-
150
|
|
5
|
-
170
|
|
1
|
+
ID,name,dateOfBirth,placeOfBirth,dateOfDeath,placeOfDeath
|
|
2
|
+
101,Emily Brontë,1818-07-30,"Thornton, Yorkshire",1848-12-19,"Haworth, Yorkshire"
|
|
3
|
+
107,Charlotte Brontë,1818-04-21,"Thornton, Yorkshire",1855-03-31,"Haworth, Yorkshire"
|
|
4
|
+
150,Edgar Allen Poe,1809-01-19,"Boston, Massachusetts",1849-10-07,"Baltimore, Maryland"
|
|
5
|
+
170,Richard Carpenter,1929-08-14,"King’s Lynn, Norfolk",2012-02-26,"Hertfordshire, England"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
ID
|
|
2
|
-
201
|
|
3
|
-
207
|
|
4
|
-
251
|
|
5
|
-
252
|
|
6
|
-
271
|
|
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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
ID_texts
|
|
2
|
-
52eee553-266d-4fdd-a5ca-909910e76ae4
|
|
3
|
-
54e58142-f06e-49c1-a51d-138f86cea34e
|
|
4
|
-
bbbf8a88-797d-4790-af1c-1cc857718ee0
|
|
5
|
-
a90d4378-1a3e-48e7-b60b-5670e78807e1
|
|
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.
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
ID
|
|
2
|
-
10
|
|
3
|
-
11
|
|
4
|
-
12
|
|
5
|
-
13
|
|
6
|
-
14
|
|
7
|
-
15
|
|
8
|
-
16
|
|
9
|
-
17
|
|
10
|
-
18
|
|
11
|
-
19
|
|
12
|
-
20
|
|
13
|
-
21
|
|
14
|
-
22
|
|
15
|
-
23
|
|
16
|
-
24
|
|
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
|
|
@@ -16,8 +16,8 @@ class CatalogService extends cds.ApplicationService { init(){
|
|
|
16
16
|
})
|
|
17
17
|
|
|
18
18
|
// Add some discount for overstocked books
|
|
19
|
-
this.after ('
|
|
20
|
-
if (
|
|
19
|
+
this.after ('each','ListOfBooks', book => {
|
|
20
|
+
if (book.stock > 111) book.title += ` -- 11% discount!`
|
|
21
21
|
})
|
|
22
22
|
|
|
23
23
|
return super.init()
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
const { join } = require('path')
|
|
2
2
|
const cds = require('../../../cds'), { exists, read, write, copy } = cds.utils
|
|
3
3
|
const { env4, readProject } = require('../../projectReader')
|
|
4
|
+
const { merge } = require('../../merge')
|
|
4
5
|
const mvn = require('../../mvn')
|
|
5
6
|
|
|
6
7
|
module.exports = class SampleTemplate extends require('../../plugin') {
|
|
7
8
|
|
|
9
|
+
static help() {
|
|
10
|
+
return 'add sample files including Fiori UI'
|
|
11
|
+
}
|
|
12
|
+
|
|
8
13
|
async run() {
|
|
9
14
|
const { db, srv, app } = env4('production').folders
|
|
10
15
|
const language = exists('pom.xml') ? 'java' : 'nodejs'
|
|
@@ -15,17 +20,19 @@ module.exports = class SampleTemplate extends require('../../plugin') {
|
|
|
15
20
|
copy(join(__dirname, 'files/srv')).to(srv)
|
|
16
21
|
])
|
|
17
22
|
await copy(join(__dirname, 'files', language)).to(srv)
|
|
18
|
-
await copy(join(__dirname, 'files
|
|
19
|
-
const { appName, appPath, appUIPaths } = readProject()
|
|
20
|
-
|
|
21
|
-
// manifest.json must be unique // REVISIT: Check if relevant for `cds add sample` in Java scenario
|
|
22
|
-
await Promise.all(appUIPaths.map(async p => {
|
|
23
|
-
const manifest = await read(join(appPath, p, 'webapp/manifest.json'))
|
|
24
|
-
manifest['sap.app'].id = appName + '.' + p
|
|
25
|
-
await write(join(appPath, p, 'webapp/manifest.json'), manifest, { spaces: 2 })
|
|
26
|
-
}))
|
|
23
|
+
await copy(join(__dirname, 'files/app')).to(app)
|
|
27
24
|
} else if (language === 'java') {
|
|
28
25
|
await mvn.add('sample')
|
|
29
26
|
}
|
|
27
|
+
|
|
28
|
+
const { appName, appPath, appUIPaths } = readProject()
|
|
29
|
+
await merge(__dirname, 'files/package.json.hbs').into('package.json', { with: { appPath }})
|
|
30
|
+
|
|
31
|
+
// manifest.json must be unique
|
|
32
|
+
await Promise.all(appUIPaths.map(async p => {
|
|
33
|
+
const manifest = await read(join(appPath, p, 'webapp/manifest.json'))
|
|
34
|
+
manifest['sap.app'].id = appName + '.' + p
|
|
35
|
+
await write(join(appPath, p, 'webapp/manifest.json'), manifest, { spaces: 2 })
|
|
36
|
+
}))
|
|
30
37
|
}
|
|
31
38
|
}
|
|
@@ -4,6 +4,10 @@ const { merge } = require('../../merge')
|
|
|
4
4
|
|
|
5
5
|
module.exports = class SQLiteTemplate extends require('../../plugin') {
|
|
6
6
|
|
|
7
|
+
static help() {
|
|
8
|
+
return 'database support for SQLite'
|
|
9
|
+
}
|
|
10
|
+
|
|
7
11
|
async run() {
|
|
8
12
|
const project = readProject()
|
|
9
13
|
const { isNodejs, isJava, configFile } = project
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
ID
|
|
2
|
-
1
|
|
3
|
-
2
|
|
1
|
+
ID,title,stock
|
|
2
|
+
1,Wuthering Heights,100
|
|
3
|
+
2,Jane Eyre,500
|