Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions app/incidents/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,18 @@
],
"main": "webapp/index.html",
"scripts": {
"deploy-config": "npx -p @sap/ux-ui5-tooling fiori add deploy-config cf"
"deploy-config": "npx -p @sap/ux-ui5-tooling fiori add deploy-config cf",
"build": "ui5 build preload --clean-dest --config ui5-deploy.yaml",
"build-local": "ui5 build preload --clean-dest",
"start": "ui5 serve"
},
"devDependencies": { }
"devDependencies": {
"@ui5/cli": "^4",
"ui5-task-zipper": "^3"
},
"ui5": {
"dependencies": [
"ui5-task-zipper"
]
}
}
20 changes: 20 additions & 0 deletions app/incidents/ui5-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
specVersion: '3.1'
metadata:
name: incidents
type: application
resources:
configuration:
propertiesFileSourceEncoding: UTF-8
builder:
resources:
excludes:
- "/test/**"
- "/localService/**"
customTasks:
- name: ui5-task-zipper
afterTask: generateVersionInfo
configuration:
archiveName: incidents
additionalFiles:
- xs-app.json
8 changes: 6 additions & 2 deletions app/incidents/webapp/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"dataSources": {
"mainService": {
"uri": "/odata/v4/processor/",
"uri": "odata/v4/processor/",
"type": "OData",
"settings": {
"annotations": [],
Expand Down Expand Up @@ -168,5 +168,9 @@
"sap.fiori": {
"registrationIds": [],
"archeType": "transactional"
},
"sap.cloud": {
"public": true,
"service": "ga.service"
}
}
}
18 changes: 18 additions & 0 deletions app/incidents/xs-app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"welcomeFile": "/index.html",
"authenticationMethod": "route",
"routes": [
{
"source": "^/?odata/(.*)$",
"target": "/odata/$1",
"destination": "srv-api",
"csrfProtection": true,
"authenticationType": "xsuaa"
},
{
"source": "^(.*)$",
"target": "$1",
"service": "html5-apps-repo-rt"
}
]
}
12 changes: 12 additions & 0 deletions app/router/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "approuter",
"dependencies": {
"@sap/approuter": "^19.0.0"
},
"engines": {
"node": "^20"
},
"scripts": {
"start": "node node_modules/@sap/approuter/approuter.js"
}
}
11 changes: 11 additions & 0 deletions app/router/xs-app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"welcomeFile": "cp.portal/site",
"routes": [
{
"source": "^(.*)$",
"target": "$1",
"service": "html5-apps-repo-rt",
"authenticationType": "xsuaa"
}
]
}
171 changes: 171 additions & 0 deletions mta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
_schema-version: 3.3.0
ID: ga
version: 1.0.0
description: "A simple CAP project."
parameters:
enable-parallel-deployments: true
deploy_mode: html5-repo
build-parameters:
before-all:
- builder: custom
commands:
- npm ci
- mkdir -p app/resources
- cp workzone/cdm.json app/resources/cdm.json
- npx cds build --production
modules:
- name: ga-srv
type: nodejs
path: gen/srv
parameters:
instances: 1
buildpack: nodejs_buildpack
build-parameters:
builder: npm-ci
provides:
- name: srv-api # required by consumers of CAP services (e.g. approuter)
properties:
srv-url: ${default-url}
requires:
- name: ga-db
- name: ga-auth

- name: ga
type: approuter.nodejs
path: app/router
parameters:
keep-existing-routes: true
disk-quota: 256M
memory: 256M
properties:
TENANT_HOST_PATTERN: "^(.*)-${default-uri}"
OWN_SAP_CLOUD_SERVICE: "[\"gaservice\"]"
COOKIE_BACKWARD_COMPATIBILITY: true
requires:
- name: srv-api
group: destinations
properties:
name: srv-api # must be used in xs-app.json as well
url: ~{srv-url}
forwardAuthToken: true
- name: incidents-build-workzone-service
- name: mtx-api
group: destinations
properties:
name: mtx-api # must be used in xs-app.json as well
url: ~{mtx-url}
- name: ga-html5-runtime
- name: ga-auth
provides:
- name: app-api
properties:
app-protocol: ${protocol}
app-uri: ${default-uri}

- name: ga-mtx
type: nodejs
path: gen/mtx/sidecar
requires:
- name: app-api
properties:
SUBSCRIPTION_URL: ~{app-protocol}://\${tenant_subdomain}-~{app-uri}
- name: ga-db
- name: ga-html5-repo-host
- name: ga-html5-runtime
- name: incidents-build-workzone-service
- name: ga-auth
- name: ga-registry

build-parameters:
builder: npm-ci
parameters:
instances: 1
memory: 256M
disk-quota: 512M
provides:
- name: mtx-api
properties:
mtx-url: ${default-url}

- name: ga-app-deployer
type: com.sap.application.content
path: app
requires:
- name: ga-html5-repo-host
parameters:
content-target: true
- name: incidents-build-workzone-service
build-parameters:
build-result: resources
requires:
- name: gaincidents
artifacts:
- incidents.zip
target-path: resources

- name: gaincidents
type: html5
path: app/incidents
build-parameters:
build-result: dist
builder: custom
commands:
- npm ci
- npm run build
supported-platforms:
[]

resources:
- name: ga-db
type: org.cloudfoundry.managed-service
parameters:
service: service-manager
service-plan: container

- name: ga-html5-repo-host
type: org.cloudfoundry.managed-service
parameters:
service: html5-apps-repo
service-plan: app-host
- name: ga-html5-runtime
type: org.cloudfoundry.managed-service
parameters:
service: html5-apps-repo
service-plan: app-runtime
- name: ga-registry
type: org.cloudfoundry.managed-service
requires:
- name: mtx-api
parameters:
service: saas-registry
service-plan: application
config:
xsappname: ga-${org}-${space}
appName: ga-${org}-${space}
displayName: ga
description: A simple CAP project.
category: 'Category'
appUrls:
getDependencies: ~{mtx-api/mtx-url}/-/cds/saas-provisioning/dependencies
onSubscription: ~{mtx-api/mtx-url}/-/cds/saas-provisioning/tenant/{tenantId}
onSubscriptionAsync: true
onUnSubscriptionAsync: true
onUpdateDependenciesAsync: true
callbackTimeoutMillis: 300000 # Increase if your deployments are taking longer than that
- name: incidents-build-workzone-service
parameters:
config:
providerId: ga-${org}-${space}
exposureId: ga.service
service-plan: local-entry-point
service: build-workzone-standard
type: org.cloudfoundry.managed-service
- name: ga-auth
type: org.cloudfoundry.managed-service
parameters:
service: xsuaa
service-plan: application
path: ./xs-security.json
config:
xsappname: ga-${org}-${space}
tenant-mode: shared
32 changes: 32 additions & 0 deletions mtx/sidecar/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "incidents-mtx",
"dependencies": {
"@cap-js/hana": "^2",
"@sap/cds": "^9",
"@sap/cds-mtxs": "^3",
"@sap/xssec": "^4",
"express": "^4"
},
"devDependencies": {
"@cap-js/sqlite": "^2"
},
"scripts": {
"start": "cds-serve"
},
"cds": {
"profile": "mtx-sidecar",
"requires": {
"html5-host": true,
"html5-runtime": true,
"launchpad": {
"vcap": {
"label": "build-workzone-standard",
"plan": "local-entry-point"
},
"subscriptionDependency": {
"uaa": "xsappname"
}
}
}
}
}
33 changes: 25 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@capire/incidents",
"name": "ga",
"version": "1.0.0",
"calesi": {
"@cap-js/audit-logging": "*",
Expand All @@ -12,15 +12,19 @@
"dummy": 0
},
"dependencies": {
"@sap/cds": ">=8",
"@cap-js/hana": "^2",
"@sap/cds": "^9",
"@sap/cds-mtxs": "^3",
"@sap/hana-client": "^2",
"@sap/xssec": "^4",
"express": "^4"
},
"devDependencies": {
"@cap-js/cds-test": "^0",
"@cap-js/audit-logging": "^0.8.3",
"@cap-js/cds-test": "latest",
"@cap-js/change-tracking": "^1.0.6",
"@cap-js/attachments": "^2",
"@cap-js/sqlite": "^1.0.1"
"@cap-js/sqlite": "latest",
"@sap/cds-dk": "^9",
"@sap/ux-specification": "^1.108.4"
},
"scripts": {
"watch": "cds watch",
Expand All @@ -37,6 +41,9 @@
],
"cds": {
"requires": {
"[local-multitenancy]": {
"multitenancy": true
},
"auth": {
"[development]": {
"users": {
Expand All @@ -53,8 +60,18 @@
}
}
}
},
"html5-runtime": true,
"destinations": false,
"workzone": false,
"[production]": {
"multitenancy": true,
"auth": {
"kind": "xsuaa"
}
}
}
},
"profile": "with-mtx-sidecar"
},
"private": true
}
}
Loading