Compare commits

..

20 Commits

Author SHA1 Message Date
Christian Georgi
baccf26a56 Merge pull request #190 from Oschm/openSAP-week3-unit3
Open sap week3 unit3
2021-01-26 09:22:32 +01:00
Oliver Schmidt
0d6ee73920 changed loading of fe library and usage of fe AppComponent because of changes in library structure 2021-01-25 15:20:11 +00:00
Oliver Schmidt
e3159afdc2 hardcode squlite version because version 5.0.1 cant't be installed. 2021-01-25 14:52:04 +00:00
Christian Georgi
ad9a374381 Update README.md 2020-04-20 17:10:36 +02:00
Christian Georgi
9d285805cd Add package-lock.json, fix readme 2020-04-02 15:59:21 +02:00
Matthias Bühl
2faf34d264 Merge pull request #42 from SAP-samples/comment-out-@requires
comment out @requires again CatalogService.Orders
2020-03-25 17:05:10 +01:00
johannes-vogel
1de3528b45 comment out @requires again CatalogService.Orders 2020-03-25 16:22:42 +01:00
Christian Georgi
e399b9d76e Update readme 2020-03-23 17:08:23 +01:00
Harini Gunabalan
dd30cd10f8 Update README.md 2020-03-21 23:45:53 +01:00
Harini Gunabalan
fa724d4c9c Adding codebase of OpenSAP week3 unit3 demo 2020-03-21 23:46:06 +01:00
Harini Gunabalan
6cc2741c3e Adding demo codebase of OpenSAP week3 unit1 2020-03-21 23:39:12 +01:00
Daniel
06755978b2 Removed work-around for auto-exposed entities 2020-02-15 14:31:07 +01:00
Daniel
02469acebb Moved @odata.draft.enabled to app model 2020-02-15 14:25:15 +01:00
Dr. David Kunz
e2b47228db Update services.js 2020-02-12 17:13:35 +01:00
Christian Georgi
13480ad99e Added issue URL again 2020-02-04 09:11:28 +01:00
Daniel
8071faa62d Adding requires.db: {kind:'sql'} 2020-02-03 07:55:56 +01:00
johannes-vogel
9ea294586a remove link 2020-01-31 08:49:54 +01:00
Lakshmi C Rajeev
a56a11ff3e Create index.cds 2020-01-28 10:58:24 +05:30
Matthias Bühl
b4084b45cb rollback change in master 2020-01-27 15:33:14 +01:00
Matthias Bühl
26e3c0d753 check autthorization in cat service 2020-01-27 15:29:43 +01:00
14 changed files with 2117 additions and 66 deletions

41
.vscode/launch.json vendored
View File

@@ -5,45 +5,18 @@
"version": "0.2.0",
"configurations": [
{
"name": "bookshop",
"request": "launch",
"type": "node",
"runtimeExecutable": "npx",
"runtimeArgs": [
"-n"
],
"args": [
"--",
"cds",
"run",
"--in-memory"
],
"name": "bookshop", "request": "launch", "type": "node", "runtimeExecutable": "npx", "runtimeArgs": [ "-n" ],
"args": [ "--", "cds", "run", "--in-memory" ],
"cwd": "${workspaceFolder}/packages/bookshop",
"console": "integratedTerminal",
"skipFiles": [
"<node_internals>/**"
]
"skipFiles": ["<node_internals>/**"]
},
{
"name": "cds run ...",
"request": "launch",
"type": "node",
"runtimeExecutable": "npx",
"runtimeArgs": [
"-n"
],
"args": [
"--",
"cds",
"run",
"--with-mocks",
"--in-memory?"
],
"name": "cds run ...", "request": "launch", "type": "node", "runtimeExecutable": "npx", "runtimeArgs": [ "-n" ],
"args": [ "--", "cds", "run", "--with-mocks", "--in-memory?" ],
"cwd": "${workspaceFolder}/packages/${input:service}",
"console": "integratedTerminal",
"skipFiles": [
"<node_internals>/**"
]
"skipFiles": ["<node_internals>/**"]
}
],
"inputs": [
@@ -61,4 +34,4 @@
"default": "bookshop"
}
]
}
}

View File

@@ -11,7 +11,7 @@ In SAP Business Application Studio, open a terminal.
Then clone the repo with this specific branch:
```sh
git clone https://github.com/sap-samples/cloud-cap-samples projects/cloud-cap-samples -b openSAP-week3-unit4
git clone https://github.com/sap-samples/cloud-cap-samples projects/cloud-cap-samples -b openSAP-week3-unit3
cd projects/cloud-cap-samples
```

View File

@@ -8,7 +8,11 @@
"lerna": "npx --no-install lerna -v > /dev/null || npm i lerna --no-save",
"install": "(npm -s run lerna) && lerna bootstrap --hoist",
"cleanup": "lerna clean -y && rm -fr node_modules",
"bookshop": "cds watch packages/bookshop"
"bookshop": "cds watch packages/bookshop",
"bookshop-enhanced": "cds watch packages/bookshop-enhanced",
"reviews-service": "cds watch packages/reviews-service",
"bookstore": "cds watch packages/bookstore",
"media-server": "cds watch packages/media-server"
},
"dependencies": {
"@sap/cds": "^3",

View File

@@ -1,4 +1,4 @@
sap.ui.define(["sap/fe/AppComponent"], ac => ac.extend("admin.Component", {
sap.ui.define(["sap/fe/core/AppComponent"], ac => ac.extend("admin.Component", {
metadata:{ manifest:'json' }
}))

View File

@@ -24,7 +24,9 @@
"sap.ui5": {
"dependencies": {
"libs": {
"sap.fe": {}
"sap.fe.core": {},
"sap.fe.macros": {},
"sap.fe.templates": {}
}
},
"models": {

View File

@@ -1,4 +1,4 @@
sap.ui.define(["sap/fe/AppComponent"], ac => ac.extend("bookshop.Component", {
sap.ui.define(["sap/fe/core/AppComponent"], ac => ac.extend("bookshop.Component", {
metadata:{ manifest:'json' }
}))

View File

@@ -24,7 +24,9 @@
"sap.ui5": {
"dependencies": {
"libs": {
"sap.fe": {}
"sap.fe.core": {},
"sap.fe.macros": {},
"sap.fe.templates": {}
}
},
"models": {

View File

@@ -1,4 +1,4 @@
sap.ui.define(["sap/fe/AppComponent"], ac => ac.extend("orders.Component", {
sap.ui.define(["sap/fe/core/AppComponent"], ac => ac.extend("orders.Component", {
metadata:{ manifest:'json' }
}))

View File

@@ -24,7 +24,9 @@
"sap.ui5": {
"dependencies": {
"libs": {
"sap.fe": {}
"sap.fe.core": {},
"sap.fe.macros": {},
"sap.fe.templates": {}
}
},
"models": {

View File

@@ -0,0 +1,44 @@
####### Generated mta.yaml based on template version 0.2.0
####### appName = capire-bookshop
####### language=nodejs; multiTenant=false
####### approuter=
_schema-version: '3.1'
ID: sap.capire-bookshop
version: 1.0.0
description: "A simple bookshop application, build in a self-contained all-in-one fashion, i.e. w/o reusing other packages."
build-parameters:
before-all:
- builder: custom
commands:
- npm install
- cds build/all
parameters:
enable-parallel-deployments: true
modules:
############## SERVER MODULE ##########################
- name: capire-bookshop-srv
type: nodejs
path: gen/srv
properties:
EXIT: 1 # required by deploy.js task to terminate
############################################################
############## SIDECAR MODULE #########################
- name: db
type: hdb
path: gen/db
parameters:
app-name: capire-bookshop-db
requires:
#### Hana and xsuaa resources extracted from CAP configuration ####
############################################################

2027
packages/bookshop/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,25 +1,22 @@
{
"name": "@sap/capire-bookshop",
"version": "1.0.0",
"description": "A simple bookshop application, build in a self-contained all-in-one fashion, i.e. w/o reusing other packages.",
"license": "SAP SAMPLE CODE LICENSE",
"dependencies": {
"@sap/cds": "^3",
"express": "^4"
},
"scripts": {
"start": "cds run --in-memory?",
"watch": "cds watch"
},
"cds": {
"requires": {
"db": {
"model": [
"db",
"srv"
],
"kind": "sqlite"
}
}
"name": "@sap/capire-bookshop",
"version": "1.0.0",
"description": "A simple bookshop application, build in a self-contained all-in-one fashion, i.e. w/o reusing other packages.",
"license": "SAP SAMPLE CODE LICENSE",
"dependencies": {
"@sap/cds": "^3",
"express": "^4",
"sqlite3": "^5.0.0"
},
"scripts": {
"start": "cds run --in-memory?",
"watch": "cds watch"
},
"cds": {
"requires": {
"db": {
"kind": "sql"
}
}
}
}

View File

@@ -10,7 +10,7 @@ service AdminService @(_requires:'authenticated-user') {
annotate AdminService.Orders with @odata.draft.enabled;
// annotate AdminService.Books with @odata.draft.enabled;
// Temporary workaround -> https://github.wdf.sap.corp/cap/issues/issues/3121
// Temporary workaround -> cap/issues#3121
extend service AdminService with {
entity OrderItems as select from my.OrderItems;
}

View File

@@ -23,4 +23,4 @@ async function _reduceStock (req) {
`${OrderItems[i].amount} exceeds stock for book #${OrderItems[i].book_ID}`
)
}))
}
}