Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch Release 2024-01-08 #611

Merged
merged 6 commits into from
Jan 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -149,7 +149,7 @@ const config:UserConfig<CapireThemeConfig> = {
redirects.devPlugin()
],
build: {
chunkSizeWarningLimit: 4000 // chunk for local search index dominates
chunkSizeWarningLimit: 5000 // chunk for local search index dominates
}
},
transformHtml(code, id, ctx) {
11 changes: 8 additions & 3 deletions get-started/learning-sources.md
Original file line number Diff line number Diff line change
@@ -22,14 +22,19 @@ We're just getting started with this page. Please help us in that endeavour by a
h3.github::before {
content: "";
background: url(./assets/github.svg) no-repeat 0 0;
background-size: 40px;
height: 40px;
width: 40px;
background-size: 30px;
height: 30px;
width: 30px;
margin-top: -4px;
margin-right: 11px;
vertical-align: middle;
display: inline-block;
}

.dark h3.github::before, .dark li._nodejs a::before, .dark li._java a::before {
filter: brightness(.884) invert(1) hue-rotate(177deg);
}

li._nodejs {
display: inline;
margin-right: 2em;
2 changes: 1 addition & 1 deletion guides/providing-services.md
Original file line number Diff line number Diff line change
@@ -906,7 +906,7 @@ The remaining cases that need custom handlers, reduce to real custom logic, spec

**In Java**, you'd assign `EventHandler` classes using dependency injection as follows:

```js
```Java
@Component
@ServiceName("org.acme.Foo")
public class FooServiceImpl implements EventHandler {...}
4 changes: 2 additions & 2 deletions java/plugins.md
Original file line number Diff line number Diff line change
@@ -228,7 +228,7 @@ public class SampleAdapterFactory implements ServletAdapterFactory, CdsRuntimeAw
@Override
public Object create() {
// Create and return the protocol adapter
return new SampleAdater(runtime);
return new SampleAdapter(runtime);
}

@Override
@@ -318,4 +318,4 @@ One final comment on protocol adapters: even a simple protocol adapter like sket

As you've learned in this guide, there are various ways to extend the CAP Java framework. You can use one or more of the mentioned techniques and combine them in one or more Maven modules. This totally depends on your needs and requirements.

Most probably you combine the *Event Handler with custom types and annotations* mechanism together with *Sharing reusable CDS models via Maven artifacts* because the event handler mechanism might rely on shared CDS artifacts. The protocol adapters on the other hand are generic and model-independent modules that should be packaged and distributed independently.
Most probably you combine the *Event Handler with custom types and annotations* mechanism together with *Sharing reusable CDS models via Maven artifacts* because the event handler mechanism might rely on shared CDS artifacts. The protocol adapters on the other hand are generic and model-independent modules that should be packaged and distributed independently.
10 changes: 5 additions & 5 deletions node.js/fiori.md
Original file line number Diff line number Diff line change
@@ -39,10 +39,10 @@ Lean draft is enabled by default. Add this to your `cds` configuration to disabl

### Handlers Registration {#draft-support}

Class `ApplicationService` provides built-in support for Fiori Draft. All CRUD events are supported for both, active and draft entities.
Class `ApplicationService` provides built-in support for Fiori Draft. All CRUD events are supported for both, active and draft entities.
Please note that draft-enabled entities must follow a specific draft choreography.

The examples are provided for `on` handlers, but the same is true for `before` and `after` handlers.
The examples are provided for `on` handlers, but the same is true for `before` and `after` handlers.

```js
// only active entities
@@ -71,18 +71,18 @@ Additionally, you can add your logic to the draft-specific events as follows:
```

- The `CANCEL` event is triggered when you cancel the draft. In this case, the draft entity is deleted and the active entity isn't changed.
- The `EDIT` event is triggered when you start editing an active entity. As a result `MyEntity.drafts` is created.
- The `EDIT` event is triggered when you start editing an active entity. As a result `MyEntity.drafts` is created.
- The `SAVE` event is just a shortcut for `['UPDATE', 'CREATE']` on an active entity. This event is also triggered when you press the `SAVE` button in UI after finishing editing your draft. Note, that composition children of the active entity will also be updated or created.

::: info Compatibility flag
For compatibility to previous variants, set `cds.fiori.draft_compat` to `true`.
For compatibility to previous variants, set `cds.fiori.draft_compat` to `true`.
:::

### Draft Locks

To prevent inconsistency, the entities with draft are locked for modifications by other users. The lock is released when the draft is saved, canceled or a timeout is hit. The default timeout is 15 minutes. You can configure this timeout by the following application configuration property:

```json
```properties
cds.drafts.cancellationTimeout=1h
```

1,606 changes: 568 additions & 1,038 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cap-js/docs",
"version": "0.31.0",
"version": "0.36.0",
"description": "Capire on VitePress",
"type": "module",
"scripts": {
@@ -27,6 +27,6 @@
"markdownlint-cli": ">=0.35.0",
"markdownlint-rule-search-replace": "^1.1.1",
"sass": "^1.62.1",
"vitepress": "^1.0.0-rc.31"
"vitepress": "^1.0.0-rc.36"
}
}
3 changes: 2 additions & 1 deletion plugins/index.md
Original file line number Diff line number Diff line change
@@ -65,6 +65,7 @@ For Node.js all these plugins are implemented using the [`cds-plugin`](../node.j


## GraphQL Adapter

[@cap-js/graphql](https://www.npmjs.com/package/@cap-js/graphql) {.subtitle}

The GraphQL Adapter is a protocol adapter that generically generates a GraphQL schema for the models of an application and serves an endpoint that allows you to query your services using the [GraphQL](https://graphql.org) query language. All you need to do is to add the `@graphql` annotation to your service definitions like so:
@@ -92,7 +93,7 @@ Available for:

Click on the icons to get detailed instructions. {.learn-more}

See also [_Advanced > OData APIs V2 Support_](../advanced/odata#v2-support) {.learn-more}
See also [_Advanced > OData APIs > V2 Support_](../advanced/odata#v2-support) {.learn-more}