From 13af32a865622e195baf9d2c39365a240eb04220 Mon Sep 17 00:00:00 2001 From: Vladislav Leonkev Date: Tue, 21 Jan 2025 12:20:59 +0100 Subject: [PATCH] add changes for fiori service deployment --- bookstore/srv/fiori.cds | 1 - fiori/package.json | 47 +++++++++++++++++++++++++++++------------ fiori/server.js | 1 + fiori/srv/.gitkeep | 0 mta.yaml | 7 +++--- 5 files changed, 38 insertions(+), 18 deletions(-) delete mode 100644 bookstore/srv/fiori.cds create mode 100644 fiori/server.js create mode 100644 fiori/srv/.gitkeep diff --git a/bookstore/srv/fiori.cds b/bookstore/srv/fiori.cds deleted file mode 100644 index 75603d1e..00000000 --- a/bookstore/srv/fiori.cds +++ /dev/null @@ -1 +0,0 @@ -using from '../../fiori/app/services.cds'; diff --git a/fiori/package.json b/fiori/package.json index 85a56ab9..f7708d4c 100644 --- a/fiori/package.json +++ b/fiori/package.json @@ -2,10 +2,18 @@ "name": "@capire/fiori", "version": "1.0.0", "dependencies": { + "@capire/bookshop": "*", + "@capire/reviews": "*", + "@capire/orders": "*", + "@capire/common": "*", + "@capire/data-viewer": "*", "@capire/bookstore": "*", + "@sap-cloud-sdk/http-client": "^3.24.0", + "@sap-cloud-sdk/resilience": "^3.24.0", "@sap/cds": ">=5", "@cap-js-community/odata-v2-adapter": "^1", - "express": "^4.17.1" + "express": "^4.17.1", + "@cap-js/hana": "^1" }, "devDependencies": { "@cap-js/sqlite": "^1" @@ -18,25 +26,36 @@ "requires": { "ReviewsService": { "kind": "odata", - "model": "@capire/reviews" + "model": "@capire/reviews", + "[production]": { + "credentials": { + "destination": "reviews-dest", + "path": "/reviews" + } + } }, "OrdersService": { "kind": "odata", - "model": "@capire/orders" - }, - "messaging": { + "model": "@capire/orders", "[production]": { - "kind": "enterprise-messaging" - }, - "[development]": { - "kind": "file-based-messaging" - }, - "[hybrid]": { - "kind": "enterprise-messaging-shared" + "credentials": { + "destination": "orders-dest", + "path": "/odata/v4/orders" + } } }, - "db": { - "kind": "sql" + "[production]": { + "auth": "xsuaa", + "db": "hana", + "messaging": "enterprise-messaging" + }, + "[development]": { + "db": "sql", + "messaging": "file-based-messaging" + }, + "[hybrid]": { + "db": "hana", + "messaging": "enterprise-messaging-shared" }, "db-ext": { "[development]": { diff --git a/fiori/server.js b/fiori/server.js new file mode 100644 index 00000000..5808c936 --- /dev/null +++ b/fiori/server.js @@ -0,0 +1 @@ +require('@capire/bookstore/server') diff --git a/fiori/srv/.gitkeep b/fiori/srv/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/mta.yaml b/mta.yaml index 12ffdad3..987cf31a 100644 --- a/mta.yaml +++ b/mta.yaml @@ -12,7 +12,8 @@ build-parameters: - npx cds build --for hana --production --ws - npx cds build ./orders --for nodejs --production --ws-pack - npx cds build ./reviews --for nodejs --production --ws-pack - - npx cds build ./bookstore --for nodejs --production --ws-pack + - npx cds build ./fiori --for nodejs --production --ws-pack + modules: - name: orders-srv type: nodejs @@ -54,9 +55,9 @@ modules: - name: samples-db - name: samples-auth - - name: bookstore-srv + - name: fiori-srv type: nodejs - path: bookstore/gen/srv + path: fiori/gen/srv parameters: buildpack: nodejs_buildpack readiness-health-check-type: http