Merge branch 'master' into master
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
"jest": true
|
"jest": true
|
||||||
},
|
},
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"ecmaVersion": 2017
|
"ecmaVersion": 2018
|
||||||
},
|
},
|
||||||
"globals": {
|
"globals": {
|
||||||
"SELECT": true,
|
"SELECT": true,
|
||||||
|
|||||||
27
.vscode/launch.json
vendored
27
.vscode/launch.json
vendored
@@ -5,19 +5,17 @@
|
|||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "cds run",
|
"name": "bookshop", "request": "launch", "type": "node", "runtimeExecutable": "npx", "runtimeArgs": [ "-n" ],
|
||||||
"request": "launch",
|
"args": [ "--", "cds", "run", "--in-memory" ],
|
||||||
"type": "node",
|
"cwd": "${workspaceFolder}/packages/bookshop",
|
||||||
"runtimeExecutable": "npx",
|
"console": "integratedTerminal",
|
||||||
"runtimeArgs": ["-n"],
|
"skipFiles": ["<node_internals>/**"]
|
||||||
"args": ["--", "cds", "run", "--with-mocks", "--in-memory?"], // the leading "--" arg ensures it works with as well as without debugging
|
},
|
||||||
|
{
|
||||||
|
"name": "cds run ...", "request": "launch", "type": "node", "runtimeExecutable": "npx", "runtimeArgs": [ "-n" ],
|
||||||
|
"args": [ "--", "cds", "run", "--with-mocks", "--in-memory?" ],
|
||||||
"cwd": "${workspaceFolder}/packages/${input:service}",
|
"cwd": "${workspaceFolder}/packages/${input:service}",
|
||||||
"console": "integratedTerminal",
|
"console": "integratedTerminal",
|
||||||
"serverReadyAction": {
|
|
||||||
"pattern": "server listening on (https?://\\S+|[0-9]+)",
|
|
||||||
"uriFormat": "http://localhost:%s",
|
|
||||||
"action": "openExternally"
|
|
||||||
},
|
|
||||||
"skipFiles": ["<node_internals>/**"]
|
"skipFiles": ["<node_internals>/**"]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -31,12 +29,9 @@
|
|||||||
"bookstore",
|
"bookstore",
|
||||||
"media-server",
|
"media-server",
|
||||||
"office-supplies",
|
"office-supplies",
|
||||||
"orders-service",
|
"reviews-service"
|
||||||
"products-service",
|
|
||||||
"reviews-service",
|
|
||||||
"user-service"
|
|
||||||
],
|
],
|
||||||
"default": "bookstore"
|
"default": "bookshop"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
@@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
"files.exclude": {
|
"files.exclude": {
|
||||||
"**/.gitignore": false,
|
"**/.gitignore": true,
|
||||||
"**/.git": false,
|
"**/.vscode": true
|
||||||
"**/.vscode": false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
21
.vscode/tasks.json
vendored
21
.vscode/tasks.json
vendored
@@ -4,23 +4,14 @@
|
|||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"tasks": [
|
"tasks": [
|
||||||
{
|
{
|
||||||
"type": "shell", "label": "cds run bookshop",
|
"type": "npm", "script": "watch", "path": "packages/bookshop/",
|
||||||
"command": "npx", "args": [ "cds", "watch", "packages/bookshop" ],
|
"options": { "env": { "PORT": "4004" }},
|
||||||
"presentation": { "group": "A" },
|
"presentation": { "group": "A" }
|
||||||
"problemMatcher": []
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "shell", "label": "cds run bookshop-enhanced",
|
"type": "npm", "script": "watch", "path": "packages/reviews-service/",
|
||||||
"command": "npx", "args": [ "cds", "watch", "packages/bookshop-enhanced" ],
|
"options": { "env": { "PORT": "5005" }},
|
||||||
"presentation": { "group": "A" },
|
"presentation": { "group": "A" }
|
||||||
"problemMatcher": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "shell", "label": "cds run reviews-service",
|
|
||||||
"command": "npx", "args": [ "cds", "watch", "packages/reviews-service" ],
|
|
||||||
"options": {"env": { "PORT":"5005" }},
|
|
||||||
"presentation": { "group": "A" },
|
|
||||||
"problemMatcher": []
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -17,15 +17,13 @@ The samples provided can be run in a local setup on SQLite Database.
|
|||||||
|
|
||||||
#### Optional (if you want to import the code into an editor)
|
#### Optional (if you want to import the code into an editor)
|
||||||
* [VS Code](https://code.visualstudio.com)
|
* [VS Code](https://code.visualstudio.com)
|
||||||
* [Add CDS extension to VS](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/be944d6d51f343f6b3f53c29c44ff00a.html)
|
* [Add CDS extension to VS](https://cap.cloud.sap/docs/get-started/in-vscode#add-cds-editor)
|
||||||
|
|
||||||
## Download and Installation
|
## Download and Installation
|
||||||
|
|
||||||
#### Install `cds` development kit
|
#### Install `cds` development kit
|
||||||
```sh
|
```sh
|
||||||
# sets the registry for `@sap` packages
|
# `@sap`-scoped packages are set via .npmrc
|
||||||
npm set @sap:registry=https://npm.sap.com
|
|
||||||
|
|
||||||
npm install -g @sap/cds-dk
|
npm install -g @sap/cds-dk
|
||||||
cds #> test-run it
|
cds #> test-run it
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
"bookshop": "cds watch packages/bookshop",
|
"bookshop": "cds watch packages/bookshop",
|
||||||
"bookshop-enhanced": "cds watch packages/bookshop-enhanced",
|
"bookshop-enhanced": "cds watch packages/bookshop-enhanced",
|
||||||
"reviews-service": "cds watch packages/reviews-service",
|
"reviews-service": "cds watch packages/reviews-service",
|
||||||
|
|
||||||
"bookstore": "cds watch packages/bookstore",
|
"bookstore": "cds watch packages/bookstore",
|
||||||
"media-server": "cds watch packages/media-server"
|
"media-server": "cds watch packages/media-server"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,7 +11,9 @@
|
|||||||
"express": "*"
|
"express": "*"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "npx cds run"
|
"reviews-service": "PORT=5005 cds run ../reviews-service --bind --in-memory?",
|
||||||
|
"start": "cds run --in-memory?",
|
||||||
|
"watch": "cds watch"
|
||||||
},
|
},
|
||||||
"cds": {
|
"cds": {
|
||||||
"requires": {
|
"requires": {
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
<script src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
|
<script src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
|
||||||
data-sap-ui-libs="sap.m, sap.ushell, sap.collaboration, sap.ui.layout"
|
data-sap-ui-libs="sap.m, sap.ushell, sap.collaboration, sap.ui.layout"
|
||||||
data-sap-ui-compatVersion="edge"
|
data-sap-ui-compatVersion="edge"
|
||||||
data-sap-ui-theme="sap_belize"
|
data-sap-ui-theme="sap_fiori_3"
|
||||||
data-sap-ui-frameOptions="allow"
|
data-sap-ui-frameOptions="allow"
|
||||||
></script>
|
></script>
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
"express": "*"
|
"express": "*"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "npx cds run"
|
"start": "cds run --in-memory?",
|
||||||
|
"watch": "cds watch"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,8 @@
|
|||||||
"app", "srv", "db"
|
"app", "srv", "db"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "cds run"
|
"start": "cds run --in-memory?",
|
||||||
|
"watch": "cds watch"
|
||||||
},
|
},
|
||||||
"cds": {
|
"cds": {
|
||||||
"requires": {
|
"requires": {
|
||||||
|
|||||||
@@ -8,6 +8,10 @@
|
|||||||
"@sap/cds": "latest",
|
"@sap/cds": "latest",
|
||||||
"express": "*"
|
"express": "*"
|
||||||
},
|
},
|
||||||
|
"scripts": {
|
||||||
|
"start": "cds run --in-memory?",
|
||||||
|
"watch": "cds watch"
|
||||||
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"db",
|
"db",
|
||||||
"srv",
|
"srv",
|
||||||
|
|||||||
Reference in New Issue
Block a user