Skip to content

Commit 98ad646

Browse files
SirSimon04KoblerS
andauthored
chore: updates for release (#35)
* update release.yml * update package * update environment * updates to readme * update readme * update readme again * prettier * update changelog * Update README.md Co-authored-by: Simon Kobler <32038731+KoblerS@users.noreply.github.com> * Update README.md Co-authored-by: Simon Kobler <32038731+KoblerS@users.noreply.github.com> --------- Co-authored-by: Simon Kobler <32038731+KoblerS@users.noreply.github.com>
1 parent 3c7c8c5 commit 98ad646

File tree

4 files changed

+34
-162
lines changed

4 files changed

+34
-162
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@ on:
55

66
permissions:
77
contents: write
8+
id-token: write
89

910
jobs:
1011
publish-npm:
1112
runs-on: ubuntu-latest
12-
environment: npm
13+
environment: npmjs:@cap-js/print
1314
steps:
1415
- uses: actions/checkout@v4
1516
- uses: actions/setup-node@v4
1617
with:
17-
node-version: 20
18+
node-version: 24
1819
registry-url: https://registry.npmjs.org/
1920

2021
- name: Run Tests
@@ -38,6 +39,4 @@ jobs:
3839
with:
3940
tag: "v${{ steps.package-version.outputs.current-version }}"
4041
body: "${{ steps.parse-changelog.outputs.body }}"
41-
- run: npm publish --access public
42-
env:
43-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
42+
- run: npm publish --access public --provenance

CHANGELOG.md

Lines changed: 2 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -4,136 +4,8 @@ All notable changes to this project will be documented in this file.
44
This project adheres to [Semantic Versioning](http://semver.org/).
55
The format is based on [Keep a Changelog](http://keepachangelog.com/).
66

7-
## Version 1.0.9 - TBD
7+
## Version 0.1.0 - TBD
88

99
### Added
1010

11-
- License entry
12-
13-
### Fixed
14-
15-
- Handling of multiple records in one request
16-
17-
### Changed
18-
19-
- prepare for CDS9 in tests
20-
21-
## Version 1.0.8 - 28.03.25
22-
23-
### Added
24-
25-
- Added @UI.MultiLineText to value fields
26-
- Added support for Multi-Tenancy
27-
- Added configuration options to disable tracking of CREATE/UPDATE/DELETE operations on a project level
28-
29-
### Fixed
30-
31-
- Handling of numeric and boolean fields was faulty, when an initial value of `0` for numeric or `false` for boolean was supplied
32-
- Decimal values were handled differently for HANA and SQlite
33-
- Missing UI Label for one attribute (`ChangeLog.ID`) of the Changes UI facet
34-
- Support for @UI.HeaderInfo.TypeName as fallback for the UI Label of the key
35-
- Compilation error when an association is used as a key
36-
- Fixed handling of unmanaged composition of many
37-
- Proper casing of the operation enum type
38-
39-
### Changed
40-
41-
- Added warning and mitigation for multi-tenant deployments with MTX
42-
- Added a disclaimer of upcoming new version having a minimum requirement of CDS 8.6 for multitenancy fix
43-
- Changed the default limit on non-HANA databases from 255 to 5000 characters for all String values
44-
- Updated peer dependency from CDS7 to CDS8
45-
46-
## Version 1.0.7 - 20.08.24
47-
48-
### Added
49-
50-
- A global switch to preserve change logs for deleted data
51-
- For hierarchical entities, a method to determine their structure and a flag to indicate whether it is a root entity was introduced. For child entities, information about the parent is recorded.
52-
53-
### Fixed
54-
55-
- CDS 8 does not support queries for draft-enabled entities on the application service anymore. This was causing: SqliteError: NOT NULL constraint failed: (...).DraftAdministrativeData_DraftUUID
56-
- CDS 8 deprecated cds.transaction, causing change logs of nested documents to be wrong, replaced with req.event
57-
- CDS 8 rejects all direct CRUD requests for auto-exposed Compositions in non-draft cases. This was affecting test cases, since the ChangeView falls into this category
58-
- req.\_params and req.context are not official APIs and stopped working with CDS 8, replaced with official APIs
59-
- When running test cases in CDS 8, some requests failed with a status code of 404
60-
- ServiceEntity is not captured in the ChangeLog table in some cases
61-
- When modeling an inline entity, a non-existent association and parent ID was recorded
62-
- Fixed handling, when reqData was undefined
63-
64-
### Changed
65-
66-
- Peer dependency to @sap/cds changed to ">=7"
67-
- Data marked as personal data using data privacy annotations won't get change-tracked anymore to satisfy product standards
68-
- Restructured Documentation
69-
70-
## Version 1.0.6 - 29.04.24
71-
72-
### Fixed
73-
74-
- Storage of wrong ObjectID in some special scenarios
75-
- Missing localization of managed fields
76-
- Views without keys won't get the association and UI facet pushed anymore
77-
78-
### Added
79-
80-
- A method to disable automatic generation of the UI Facet
81-
82-
### Changed
83-
84-
- Improved documentation of the @changelog Annotation
85-
86-
## Version 1.0.5 - 15.01.24
87-
88-
### Fixed
89-
90-
- Error on HANA when logging Boolean or Numeric Data
91-
92-
## Version 1.0.4 - 08.01.24
93-
94-
### Added
95-
96-
- Side effect annotation now allows automatic refresh after a custom action caused changes
97-
98-
### Changed
99-
100-
- Added a check to disable change tracking for views with a UNION
101-
102-
### Fixed
103-
104-
- Handling of associations within change tracked entities
105-
- Handling of change log when custom actions on child entities are called
106-
107-
## Version 1.0.3 - 10.11.23
108-
109-
### Added
110-
111-
- Added note about using `SAPUI5 v1.120.0` or later for proper lazy loading of the _Change History_ table.
112-
- In README, add warning about tracking personal data.
113-
114-
### Changed
115-
116-
- Support cases where parent/child entries are created simultaneously.
117-
- Allow for lazy loading of change history table (with SAP UI5 release 1.120.0).
118-
119-
## Version 1.0.2 - 31.10.23
120-
121-
### Changed
122-
123-
- In README, use view of the full change-tracking table instead of the customized one for the main image.
124-
125-
## Version 1.0.1 - 26.10.23
126-
127-
### Changed
128-
129-
- Flattened README structure.
130-
131-
### Fixed
132-
133-
- Labels are looked up from the service entity (not the db entity only).
134-
135-
## Version 1.0.0 - 18.10.23
136-
137-
### Added
138-
139-
- Initial release
11+
- Initial release that provides out-of-the-box integration with the SAP Print Service.

README.md

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,29 @@
44

55
## About this project
66

7-
CDS plugin for SAP Print service (package `@cap-js/print`) is a CDS plugin providing print service features through integration with [SAP Print Service](https://api.sap.com/api/PRINTAPI/overview).
7+
The `@cap-js/print` package is a [CDS plugin](https://cap.cloud.sap/docs/node.js/cds-plugins#cds-plugin-packages) that provides print service features through integration with the [SAP Print Service](https://api.sap.com/api/PRINTAPI/overview).
88

99
## Table of Contents
1010

11-
- [About this project](#about-this-project)
12-
- [Requirements](#requirements)
13-
- [Setup](#setup)
14-
1511
## Requirements and Setup
1612

17-
See [Getting Started](https://cap.cloud.sap/docs/get-started) on how to jumpstart your development and grow as you go with SAP Cloud Application Programming Model.
18-
19-
Usage of this plugin requires a valid subscription of the [SAP Print Service](https://help.sap.com/docs/SCP_PRINT_SERVICE).
13+
Using this plugin requires a valid subscription of the [SAP Print Service](https://help.sap.com/docs/SCP_PRINT_SERVICE).
2014

2115
## Usage
2216

23-
To use this plugin to print documents there are two main steps:
17+
To use this plugin to print documents, there are two main steps:
2418

25-
1. Make sure your CDS model is modelled correctly
19+
1. Ensure your model meets the requirements
2620
2. Annotate your CDS model with `@PDF.Printable`
2721

28-
### Assumptions of your model
22+
### Model Requirements
2923

30-
- The attribute you want to print is of type `LargeBinary`
31-
- This attribute has the annotation `@Core.ContentDisposition: fileName`, where `fileName` is the attribute that specifies the file name
24+
- The attribute(s) you want to print are of type `LargeBinary`
25+
- Those attributes have the annotation `@Core.ContentDisposition: fileName`, where `fileName` is the attribute that specifies the file name or a hardcoded string with the file name
3226

3327
### Annotations in CDS model
3428

35-
To use the print plugin, simply annotate your entity with `@PDF.Printable`:
29+
To use the print plugin, annotate your entity with `@PDF.Printable`:
3630

3731
```cds
3832
@PDF.Printable
@@ -42,16 +36,24 @@ entity Books as projection on my.Books;
4236
This annotation does the following things in the background:
4337

4438
- Adds an action `print` to the annotated entity with the following parameters:
45-
- `Queue`: Name of the print queue to use
46-
- `Copies`: Number of copies to print
47-
- `File`: Only added if the entity has multiple `LargeBinary` attributes. Allows selecting whicn file should be printed. Make sure the `LargeBinary` properties are annotated with `@Common.Label`
39+
- `Queue`: Name of the print queue to use.
40+
- `Copies`: Number of copies to print.
41+
- `File`: Only added if the entity has multiple `LargeBinary` attributes. Allows selecting which file should be printed. Ensure that the `LargeBinary` properties are annotated with `@Common.Label`.
4842
- This action is added to the UI and a handler is generated to process the print request.
4943
- An entity `PrintServiceQueues` is added to the service to provide available print queues in a value help.
5044
- An entity `PrintServiceFiles` is added to the service to provide available files in a value help (only if multiple `LargeBinary` attributes exist).
5145

52-
## Manual usage
46+
## Manual Usage
47+
48+
You can also use the print service to print documents manually, i.e., without the `@PDF.Printable` annotations and generated actions and handlers.
49+
50+
Use cases for a manual approach could be:
51+
52+
- You want to print documents that are not part of your CDS model, i.e., files generated at runtime.
53+
- Your model does not meet the requirements for the automatic approach.
54+
- You want to print a file type other than PDF.
5355

54-
You can also use the print service to print documents manually, i.e. without the `@PDF.Printable` annotations and generated actions and handlers. For this, you can use the `cds.connect.to`-API of CAP to connect to the print service and invoke the `print` action manually.
56+
For this, you can use the `cds.connect.to` API of CAP to connect to the print service and invoke the `print` action manually.
5557

5658
```javascript
5759
const printService = cds.connect.to("PrintService");
@@ -71,19 +73,19 @@ await printService.send("print", {
7173
const queues = await printService.get("/Queues");
7274
```
7375

74-
It is possible that for LargeBinaries, that you get from the database, the content is provided as a stream. In this case, the stream needs to be converted to base64 before passing it to the print service. For an example, have a look at the sample application in `test/bookshop/`
76+
It is possible that for LargeBinaries retrieved from the database, the content is provided as a stream. In this case, the stream needs to be converted to base64 before passing it to the print service. For example, see the sample application in `test/bookshop/`
7577

7678
## Local Development
7779

78-
When running the application locally, i.e. `cds watch`, the print service is mocked. This mock implementation prints the print job details to the console instead of sending it to the actual print service. It also provides a number of sample print queues for selection.
80+
When running the application locally, the print service is mocked. This mock implementation prints the print job details to the console instead of sending them to the actual print service. It also provides a number of sample print queues for selection.
7981

8082
## Hybrid Testing
8183

8284
You can also run the application locally with a binding to the cloud print service with CAP profiles. For more information, see [Hybrid Testing](https://cap.cloud.sap/docs/advanced/hybrid-testing#hybrid-testing). You need an instance of the SAP Print Service.
8385

8486
### Local
8587

86-
As the `hybrid` profile of the plugin uses SAP HANA Cloud to execute integration tests in CI, a profile `local` is added that uses can be used to execute the application locally with a binding to the cloud print service.
88+
As the `hybrid` profile of the plugin uses SAP HANA Cloud to execute integration tests in CI, a profile `local` is added that can be used to execute the application locally with a binding to the cloud print service.
8789

8890
```bash
8991
# Once as setup
@@ -100,16 +102,16 @@ For CI, the hybrid integration tests are automatically run against a SAP Print S
100102

101103
## Support, Feedback, Contributing
102104

103-
This project is open to feature requests/suggestions, bug reports etc. via [GitHub issues](https://github.com/cap-js/print/issues). Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](CONTRIBUTING.md).
105+
This project is open to feature requests/suggestions, bug reports, etc. via [GitHub issues](https://github.com/cap-js/print/issues). Contributions and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](CONTRIBUTING.md).
104106

105107
## Security / Disclosure
106108

107-
If you find any bug that may be a security problem, please follow our instructions at [in our security policy](https://github.com/cap-js/print/security/policy) on how to report it. Please do not create GitHub issues for security-related doubts or problems.
109+
If you find a bug that may be a security problem, please follow the instructions [in our security policy](https://github.com/cap-js/print/security/policy) on how to report it. Please do not create GitHub issues for security-related doubts or problems.
108110

109111
## Code of Conduct
110112

111113
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its [Code of Conduct](https://github.com/cap-js/.github/blob/main/CODE_OF_CONDUCT.md) at all times.
112114

113115
## Licensing
114116

115-
Copyright 2025 SAP SE or an SAP affiliate company and print contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/cap-js/print).
117+
Copyright 2025 SAP SE or an SAP affiliate company and print contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information, including third-party components and their licensing/copyright information, is available [via the REUSE tool](https://api.reuse.software/info/github.com/cap-js/print).

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@cap-js/print",
33
"version": "0.1.0",
44
"description": "CAP plugin for SAP Cloud Print Service.",
5-
"repository": "@cap-js/print",
5+
"repository": "cap-js/print",
66
"homepage": "https://cap.cloud.sap/",
77
"main": "cds-plugin.js",
88
"author": "SAP SE (https://www.sap.com)",
@@ -22,7 +22,6 @@
2222
"plugin"
2323
],
2424
"dependencies": {
25-
"@cap-js/print": "file:",
2625
"@sap-cloud-sdk/connectivity": "^3.26.4",
2726
"@sap-cloud-sdk/http-client": "^4.1.2",
2827
"@sap/xssec": "^3.6.2"

0 commit comments

Comments
 (0)