This commit is contained in:
Wolfgang Koch
2021-07-06 15:40:39 +02:00
parent b7ff0cd100
commit 60ba27ff3c
14 changed files with 1517 additions and 1755 deletions

BIN
log_06_07_v1.txt Normal file

Binary file not shown.

BIN
log_25_06.txt Normal file

Binary file not shown.

View File

@@ -0,0 +1,54 @@
# Generated with Cloud MTA Build Tool version 1.1.1
version=0.0.1
MBT=C:/Users/d025985/AppData/Roaming/npm/node_modules/mbt/unpacked_bin/mbt.exe
ifndef p
$(error platform flag is expected. e.g. use make -f makefile.mta p=cf)
endif
target_provided=true
ifndef t
t="$(CURDIR)"
target_provided=false
endif
ifndef strict
strict=true
endif
ifndef mtar
mtar="*"
endif
modules := $(shell $(MBT) provide modules -d=dev)
modules := $(subst ],,$(subst [,,$(modules)))
# List of all the recipes to be executed during the build process
.PHONY: all pre_validate pre_build validate $(modules) post_build meta mtar cleanup
# Default target compile all
all: pre_validate pre_build validate $(modules) post_build meta mtar cleanup
# Validate mta.yaml
pre_validate:
@$(MBT) validate -r=${strict} -x="paths"
pre_build: pre_validate
@$(MBT) project build -p=pre
# Execute module build
define build_rule
$(1): validate
@$(MBT) module build -m=$(1) -p=${p} -t=${t}
endef
$(foreach mod,$(modules),$(eval $(call build_rule,$(mod))))# Create META-INF folder with MANIFEST.MF & mtad.yaml
meta: $(modules) post_build
@$(MBT) gen meta -p=${p} -t=${t}
post_build: $(modules)
@$(MBT) project build -p=post -t=${t}
# Validate mta.yaml
validate: pre_build
@$(MBT) validate -r=${strict}
# Pack as MTAR artifact
mtar: $(modules) meta
@$(MBT) gen mtar --mtar=${mtar} --target_provided=${target_provided} -t=${t}
cleanup: mtar
# Remove tmp folder
@$(MBT) clean -t=${t}

View File

@@ -0,0 +1,54 @@
# Generated with Cloud MTA Build Tool version 1.1.1
version=0.0.1
MBT=C:/Users/d025985/AppData/Roaming/npm/node_modules/mbt/unpacked_bin/mbt.exe
ifndef p
$(error platform flag is expected. e.g. use make -f makefile.mta p=cf)
endif
target_provided=true
ifndef t
t="$(CURDIR)"
target_provided=false
endif
ifndef strict
strict=true
endif
ifndef mtar
mtar="*"
endif
modules := $(shell $(MBT) provide modules -d=dev)
modules := $(subst ],,$(subst [,,$(modules)))
# List of all the recipes to be executed during the build process
.PHONY: all pre_validate pre_build validate $(modules) post_build meta mtar cleanup
# Default target compile all
all: pre_validate pre_build validate $(modules) post_build meta mtar cleanup
# Validate mta.yaml
pre_validate:
@$(MBT) validate -r=${strict} -x="paths"
pre_build: pre_validate
@$(MBT) project build -p=pre
# Execute module build
define build_rule
$(1): validate
@$(MBT) module build -m=$(1) -p=${p} -t=${t}
endef
$(foreach mod,$(modules),$(eval $(call build_rule,$(mod))))# Create META-INF folder with MANIFEST.MF & mtad.yaml
meta: $(modules) post_build
@$(MBT) gen meta -p=${p} -t=${t}
post_build: $(modules)
@$(MBT) project build -p=post -t=${t}
# Validate mta.yaml
validate: pre_build
@$(MBT) validate -r=${strict}
# Pack as MTAR artifact
mtar: $(modules) meta
@$(MBT) gen mtar --mtar=${mtar} --target_provided=${target_provided} -t=${t}
cleanup: mtar
# Remove tmp folder
@$(MBT) clean -t=${t}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -22,7 +22,7 @@ modules:
type: nodejs
path: app
build-parameters:
ignore: ["node_modules/"]
ignore: ["node_modules/"]
parameters:
# Keep existing URLs for this application ("routes")
keep-existing-routes: true
@@ -44,8 +44,8 @@ modules:
# ------------------------------------------------------------
type: nodejs
path: gen/srv
build-parameters:
ignore: ["node_modules/"]
# build-parameters:
# ignore: ["node_modules/"]
properties:
SAP_JWT_TRUST_ACL: [{"clientid":"*","identityzone":"sap-provisioning"}] # Trust between server and SaaS Manager
requires:

File diff suppressed because it is too large Load Diff

View File

@@ -6,13 +6,8 @@
"license": "UNLICENSED",
"private": true,
"dependencies": {
<<<<<<< HEAD
"@sap/cds": "git+https://b60833c73d12694645300a9e2b54a5650e6951ba:x-oauth-basic@github.tools.sap/cap/cds.git",
"@sap/cds-mtx": "^2",
=======
"@sap/cds": "^5.1",
"@sap/cds-mtx": "git+https://dd15a9cc2fa570fa26a4ab135f488ba260d65408:x-oauth-basic@github.wdf.sap.corp/cdx/cds-mtx.git",
>>>>>>> ac895a508ab0d84ed46845359fdb0ed7a0f0571f
"@sap/hana-client": "^2",
"@sap/hdi-deploy": "^4",
"@sap/instance-manager": "^2",

View File

@@ -5,6 +5,7 @@ class OrdersService extends cds.ApplicationService {
init(){
const { Orders_Items:OrderItems } = this.entities
/**
this.before ('UPDATE', 'Orders', async function(req) {
const { ID, Items } = req.data
if (Items) for (let { product_ID, amount } of Items) {
@@ -14,7 +15,9 @@ class OrdersService extends cds.ApplicationService {
if (amount != before) await this.orderChanged (product_ID, amount-before)
}
})
**/
/**
this.before ('DELETE', 'Orders', async function(req) {
const { ID } = req.data
const Items = await cds.tx(req).run (
@@ -22,8 +25,10 @@ class OrdersService extends cds.ApplicationService {
)
if (Items) await Promise.all (Items.map(it => this.orderChanged (it.product_ID, -it.amount)))
})
**/
return super.init()
}
/** order changed -> broadcast event */