-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial Commit Based on Standard Demo
- Loading branch information
1 parent
9e55b3b
commit 0e8a680
Showing
15 changed files
with
1,543 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"extends": "eslint:recommended", | ||
"env": { | ||
"es2022": true, | ||
"node": true, | ||
"jest": true, | ||
"mocha": true | ||
}, | ||
"globals": { | ||
"SELECT": true, | ||
"INSERT": true, | ||
"UPSERT": true, | ||
"UPDATE": true, | ||
"DELETE": true, | ||
"CREATE": true, | ||
"DROP": true, | ||
"CDL": true, | ||
"CQL": true, | ||
"CXL": true, | ||
"cds": true | ||
}, | ||
"rules": { | ||
"no-console": "off", | ||
"require-atomic-updates": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# CAP cap-media-demo | ||
_out | ||
*.db | ||
*.sqlite | ||
connection.properties | ||
default-*.json | ||
.cdsrc-private.json | ||
gen/ | ||
node_modules/ | ||
target/ | ||
|
||
# Web IDE, App Studio | ||
.che/ | ||
.gen/ | ||
|
||
# MTA | ||
*_mta_build_tmp | ||
*.mtar | ||
mta_archives/ | ||
|
||
# Other | ||
.DS_Store | ||
*.orig | ||
*.log | ||
|
||
*.iml | ||
*.flattened-pom.xml | ||
|
||
# IDEs | ||
# .vscode | ||
# .idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. | ||
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp | ||
|
||
// List of extensions which should be recommended for users of this workspace. | ||
"recommendations": [ | ||
"SAPSE.vscode-cds", | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"mechatroner.rainbow-csv", | ||
"qwtel.sqlite-viewer", | ||
"humao.rest-client", | ||
"sdras.night-owl" | ||
], | ||
// List of extensions recommended by VS Code that should not be recommended for users of this workspace. | ||
"unwantedRecommendations": [ | ||
|
||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "cds watch", | ||
"request": "launch", | ||
"type": "node", | ||
"cwd": "${workspaceFolder}", | ||
"runtimeExecutable": "cds", | ||
"args": [ | ||
"watch", | ||
"--with-mocks", | ||
"--in-memory?" | ||
], | ||
"skipFiles": [ | ||
"<node_internals>/**" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "shell", | ||
"label": "cds watch", | ||
"command": "cds", | ||
"args": ["watch"], | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"type": "shell", | ||
"label": "cds serve", | ||
"command": "cds", | ||
"args": ["serve", "--with-mocks", "--in-memory?"], | ||
"problemMatcher": [] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,15 @@ | ||
# cap-media-demo | ||
CAP Media Demo | ||
# CAP Media Demo | ||
|
||
A simple demo project to demonstrate how to incorporate media in a CAP App | ||
|
||
This was copied from the [CAP Cloud Samples](https://github.com/SAP-samples/cloud-cap-samples/tree/main/media) | ||
|
||
|
||
## Running the project | ||
- Open a new terminal and run `cds watch` | ||
|
||
|
||
## Running the Test Cases (.http files) | ||
Requires REST Client for VS Code [humao.rest-client](https://marketplace.visualstudio.com/items?itemName=humao.rest-client) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace sap.capire.media; | ||
|
||
entity Media { | ||
|
||
key id:Integer; | ||
@Core.MediaType: mediaType | ||
content : LargeBinary ; | ||
|
||
@Core.IsMediaType: true | ||
mediaType : String; | ||
fileName : String; | ||
applicationName:String; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
using from './db/schema'; | ||
using from './srv/media-service'; |
Oops, something went wrong.