Skip to content

Commit

Permalink
chore: Fix sample-cap dependencies (#359)
Browse files Browse the repository at this point in the history
* adjust package json for release

* fix: Changes from lint

* fix numbering

---------

Co-authored-by: cloud-sdk-js <[email protected]>
  • Loading branch information
deekshas8 and cloud-sdk-js authored Dec 10, 2024
1 parent 14cdfd8 commit 0053b2e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 74 deletions.
74 changes: 12 additions & 62 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 7 additions & 8 deletions sample-cap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,13 @@ Sample CAP application written in TypeScript to demonstrate the usage of SAP Clo
> All CDS services are marked with `@requires: 'any'` and are publicly accessible in order to simplify the deployment process.
> Apply proper authentication mechanisms to avoid unauthorized access.
1. Install dependencies using `pnpm install`.
2. Transpile the CAP application using `pnpm build`.

3. Modify `services` and `routes` values in `manifest.yml`.

4. Login using `cf login -a API_ENDPOINT -o ORG -s SPACE`.

5. Deploy the application using `cf push`.
1. Update the `@sap-ai-sdk/*` dependencies from `"workspace:^"` to the semver version `^1`
2. Install dependencies using `pnpm install`.
3. Transpile the CAP application using `pnpm build`.
4. Run `deploy:postbuild` to add a `package-lock.json`
5. Modify `services` and `routes` values in `manifest.yml`.
6. Login using `cf login -a API_ENDPOINT -o ORG -s SPACE`.
7. Deploy the application using `cf push`.

## Usage

Expand Down
8 changes: 4 additions & 4 deletions sample-cap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"repository": "https://github.com/sap/ai-sdk-js",
"private": true,
"dependencies": {
"@sap-ai-sdk/ai-api": "^1",
"@sap-ai-sdk/foundation-models": "^1",
"@sap-ai-sdk/orchestration": "^1",
"@sap-ai-sdk/ai-api": "workspace:^",
"@sap-ai-sdk/foundation-models": "workspace:^",
"@sap-ai-sdk/orchestration": "workspace:^",
"express": "^4",
"@sap/xssec": "^4",
"@sap/cds": "^8.5.1"
Expand All @@ -22,7 +22,7 @@
"cds-build": "cds build --production",
"compile": "tsc",
"cleanup": "rm -f ./dist/srv/srv/**/*.ts ./dist/srv/package-lock.json",
"postbuild": "pushd ./dist/srv && npm i --package-lock-only && popd",
"deploy:postbuild": "pushd ./dist/srv && npm i --package-lock-only && popd",
"start": "npx cds-serve",
"watch": "cds-tsx watch",
"watch:hybrid": "cds-tsx watch --profile hybrid",
Expand Down

0 comments on commit 0053b2e

Please sign in to comment.