This Git samples repository was created as a reference on how to use the CDS-TS-Dispatcher decorators & CDS-TS-Repository actions.
-
Ensure you have the latest LTS version of Node.js installed (see Getting Started)
-
Install @sap/cds-dk globally:
npm i -g @sap/cds-dk
If you have Git installed, clone this repo as shown below.
git clone https://github.com/dxfrontier/cds-ts-samples.git cds-ts-dispatcher-samples
cd cds-ts-dispatcher-samples
In the cds-ts-dispatcher-samples
folder, run the following commands:
npm install
npm start
Open link in your browser: http://localhost:4004
Important
Use 'manager' as user and password 'manager' to access the services where prompt user and password.
- Install MTA Build tool globally:
npm install -g mbt
- Run the following command to build the
mta
:
mbt build
Will run the builder from mta.yaml
which has the following npm commands :
- builder: custom
commands:
- npm ci
- npm run fix
- npm run build:production
- npx @cap-js/cds-typer "*" --outputDirectory gen/srv/@cds-models
Steps
explained :
npm ci
- Will do a clean install.npm run fix
- Will run the ESLint and Prettier.npm run build:production
- will run the package.json script command for CDS build and transpilation of TS to JS and clean theTS files
.npx @cap-js/cds-typer "*" --outputDirectory gen/srv/@cds-models
- will make sure the @cds-models are generated.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Copyright (c) 2024 DXFrontier
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- @dragolea
- @sblessing
- @ABS GmbH team