Skip to content

Commit

Permalink
Fix broken outlines (#2228)
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeniyBurmistrov committed Feb 2, 2022
1 parent 4a7685e commit 46e90ce
Show file tree
Hide file tree
Showing 22 changed files with 88 additions and 84 deletions.
2 changes: 1 addition & 1 deletion docs/Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: This is a set of guidelines for contributing to reSolve and its pac

This is a set of guidelines for contributing to reSolve and its packages hosted in the [ReImagined](https://github.com/reimagined) project on GitHub. These guidelines are designed to give you a general idea of our vision. Please do not treat them as strict rules you are obliged to follow, and feel free to propose changes to this document in a Pull Request.

#### Table Of Contents
**Table Of Contents**

- [Pull Requests](#pull-requests)
- [Definition of the Done](#definition-of-the-done)
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ description: Full stack CQRS, DDD, Event Sourcing framework for Node.js

[Step-by-Step Tutorial](tutorial.md)

#### Basics
## Basics

- [Write Side](write-side.md)
- [Aggregates](write-side.md#aggregates)
Expand Down Expand Up @@ -49,7 +49,7 @@ description: Full stack CQRS, DDD, Event Sourcing framework for Node.js
- [Write and Read Sides](resolve-app-structure.md#write-and-read-sides)
- [Folder Structure](resolve-app-structure.md#folder-structure)

#### Guides
## Guides

- [Modules](modules.md)
- [Authentication and Authorization](authentication-and-authorization.md)
Expand Down
16 changes: 8 additions & 8 deletions docs/api-handlers.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Use API Handlers to provide your reSolve server with the capability

Use API Handlers to provide your reSolve server with the capability to handle arbitrary HTTP requests. ReSolve API handlers have the following general structure:

##### common/api-handlers/my-api-handler.js:
**common/api-handlers/my-api-handler.js:**

```js
export default async (req, res) => {
Expand Down Expand Up @@ -73,7 +73,7 @@ The response object provides the following interface:

An API handler should be registered in the `apiHandlers` section of the application's configuration file.

##### config.app.js:
**config.app.js:**

```js
const appConfig = {
Expand Down Expand Up @@ -101,7 +101,7 @@ Refer to the [Application Configuration](application-configuration.md) topic for

## Implementation Examples

##### Send Text
### Send Text

```js
export default async (req, res) => {
Expand All @@ -111,7 +111,7 @@ export default async (req, res) => {
}
```

##### Send JSON
### Send JSON

```js
export default async (req, res) => {
Expand All @@ -124,7 +124,7 @@ export default async (req, res) => {
}
```

##### Send File
### Send File

```js
export default async (req, res) => {
Expand All @@ -136,7 +136,7 @@ export default async (req, res) => {
}
```

##### Set Cookies
### Set Cookies

```js
export default async (req, res) => {
Expand All @@ -146,15 +146,15 @@ export default async (req, res) => {
}
```

##### Redirect
### Redirect

```js
export default async (req, res) => {
res.redirect('/settings')
}
```

##### Custom status
### Custom Status

```js
export default async (req, res) => {
Expand Down
2 changes: 1 addition & 1 deletion docs/api/client/entry-point.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: The entry point is a function that is the first to be called when t

The entry point is a function that is called first when the client script runs. It takes a reSolve context object as a parameter.

##### client/index.js:
**client/index.js:**

```js
const main = async resolveContext => {
Expand Down
10 changes: 5 additions & 5 deletions docs/api/client/http-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The request body should have the `application/json` content type and contain the
| `commandType` | string | The command type that the aggregate can handle. |
| `payload` | object | Parameters the command accepts. |

#### Example
### Example

```js
const apiCommandsUrl = '/api/commands'
Expand Down Expand Up @@ -73,7 +73,7 @@ To query a Read Model from the client side, send a POST request to the following
http://{host}:{port}/api/query/{readModel}/{resolver}
```

#### URL Parameters:
### URL Parameters:

| Name | Description |
| ----------- | ----------------------------------------------------------------------- |
Expand All @@ -93,7 +93,7 @@ The request body should have the `application/json` content type and the followi

The object contains parameters that the resolver accepts.

#### Example
### Example

```js
const apiQueryUrl = '/api/query'
Expand All @@ -120,14 +120,14 @@ To query a View Model from the client side, send a GET request to the following
http://{host}:{port}/api/query/{viewModel}/{aggregateIds}
```

#### URL Parameters
### URL Parameters

| Name | Description |
| -------------- | ---------------------------------------------------------------------------------------------------------- |
| `viewModel` | The View Model name as defined in the application's configuration file. |
| `aggregateIds` | The comma-separated list of Aggregate IDs to include in the View Model. Use `*` to include all Aggregates. |

#### Example
### Example

```js
const apiQueryUrl = '/api/query'
Expand Down
6 changes: 4 additions & 2 deletions docs/api/client/request-middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ title: Request Middleware
description: Middleware implements intermediate logic that can modify the response object or handle errors before they are passed to the callback function.
---

## Overview

The [@resolve-js/client](#resolve-client-library) and [@resolve-js/react-hooks](#resolve-react-hooks-library) libraries allow you to use request middleware to extend the client's functionality. Middleware implements intermediate logic that can modify the response object or handle errors before they are passed to the callback function.

Use a command's or query's `middleware` option to specify middleware:

#### @resolve-js/client:
**@resolve-js/client:**

```js
client.query(
Expand Down Expand Up @@ -40,7 +42,7 @@ client.query(
})
```

#### @resolve-js/react-hooks:
**@resolve-js/react-hooks:**

```js
const myQuery = useQuery(
Expand Down
12 changes: 6 additions & 6 deletions docs/api/client/resolve-redux.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The reSolve framework includes the client **@resolve-js/redux** library used to

Creates a hook that executes a reSolve command.

##### Example
#### Example

```js
const { execute: toggleItem } = useReduxCommand({
Expand All @@ -37,7 +37,7 @@ const { execute: toggleItem } = useReduxCommand({

Creates a hook that queries a Read Model.

##### Example
#### Example

```js
const { request: getLists, selector: allLists } = useReduxReadModel(
Expand Down Expand Up @@ -127,7 +127,7 @@ const { data, status } = useReduxViewModelSelector('this-list')

Connects a React component to a reSolve View Model.

##### Example
#### Example

```js
export const mapStateToOptions = (state, ownProps) => {
Expand Down Expand Up @@ -164,7 +164,7 @@ export default connectViewModel(mapStateToOptions)(

Connects a React component to a reSolve Read Model.

##### Example
#### Example

```js
import { sendAggregateAction } from '@resolve-js/redux'
Expand Down Expand Up @@ -197,7 +197,7 @@ export default connectReadModel(mapStateToOptions)(

Fixes URLs passed to the specified props and ensures they use the correct root folder path.

##### Example
#### Example

```js
export default connectRootBasedUrls(['href'])(Link)
Expand All @@ -207,7 +207,7 @@ export default connectRootBasedUrls(['href'])(Link)

Fixes URLs passed to the specified props to correct the static resource folder path.

##### Example
#### Example

```js
export default connectStaticBasedUrls(['css', 'favicon'])(Header)
Expand Down
2 changes: 0 additions & 2 deletions docs/api/resolve-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ Builds an application.

#### Example

#### build

<!-- prettier-ignore-start -->

[mdis]:# (../../tests/resolve-scripts-sample/run.js#build)
Expand Down
20 changes: 10 additions & 10 deletions docs/application-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Specifies an array of the application's API Handlers. An API handler configurati
| handler | The path to the file that contains the handler's definition. |
| method | The HTTP method to handle. |

##### Example:
#### Example:

```js
apiHandlers: [
Expand All @@ -94,7 +94,7 @@ apiHandlers: [

Specifies an array of the client application script's entry points. The entry point is specified as a path to a JavaScript file. The file should export a function that takes a `resolveContext` as a parameter.

##### client/index.js:
#### client/index.js:

```js
const main = async resolveContext => {
Expand All @@ -103,7 +103,7 @@ const main = async resolveContext => {
export default main
```

##### config.app.js:
#### config.app.js:

```js
clientEntries: ['client/index.js']
Expand Down Expand Up @@ -154,7 +154,7 @@ The following target options are available:

To serve SSR markup to the client, you need to register the **live-require-handler.js** API handler in the **apiHandlers** configuration section:

##### config.app.js:
#### config.app.js:

```js
...
Expand Down Expand Up @@ -196,7 +196,7 @@ Specifies an adapter used to connect to to the application's event store. An ada
| module | The name of a module or the path to a file that defines an adapter. |
| options | An object that defines the adapter's options as key-value pairs. |

##### Example:
#### Example:

```js
eventstoreAdapter: {
Expand Down Expand Up @@ -358,7 +358,7 @@ Specifies the application's Monitoring adapters as key-value pairs. An adapter c
| module | The name of a module or the path to a file that defines an adapter . |
| options | An object that defines the adapter's options as key-value pairs. |

##### Example:
#### Example:

```js
monitoringAdapters: {
Expand Down Expand Up @@ -424,7 +424,7 @@ An array of the application's Read Models. A Read Model configuration object wit
| resolvers | A path to a file that defines a Read Model resolver. |
| connectorName | The name of a connector used to connect the Read Model to its store. |

##### Example:
#### Example:

```js
readModels: [
Expand All @@ -446,7 +446,7 @@ Specifies the application's Read Model connectors as key-value pairs. A connecto
| module | The name of a module or the path to a file that defines a connector. |
| options | An object that defines the connector's options as key-value pairs. |

##### Example:
#### Example:

```js
readModelConnectors: {
Expand Down Expand Up @@ -625,7 +625,7 @@ Specifies an array of the application's Sagas. A Saga configuration object withi
| connectorName | Defines a Read Model storage used to store the saga's persistent data. |
| encryption | A path to a file that defines data encryption and decryption logic. |

##### Example:
#### Example:

<!-- prettier-ignore-start -->

Expand Down Expand Up @@ -660,7 +660,7 @@ A scheduler adapter configuration object has the following fields:
| module | The name of a module or the path to a file that defines an adapter. |
| options | An object that defines the adapter's options as key-value pairs. |

##### Example:
#### Example:

```js
schedulers: {
Expand Down
4 changes: 2 additions & 2 deletions docs/authentication-and-authorization.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Use the following steps to implement a user registry:

For example, you can write the following if you want to grant permissions to a user:

#### Write side - The "user" aggregate
### Write side - The "user" aggregate

```js
// user.commands.js
Expand Down Expand Up @@ -121,7 +121,7 @@ grantPermission: (state, command) => {
...
```

#### Read side - The "users" read model
### Read side - The "users" read model

```js
// users.projection.js
Expand Down
10 changes: 5 additions & 5 deletions docs/custom-read-model-connectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ You can implement a custom Read Model connector to define how a Read Model's dat

The code sample below demonstrates how to implement a connector that provides a file-based storage for Read Models.

##### common/read-models/custom-read-model-connector.js:
**common/read-models/custom-read-model-connector.js:**

<!-- prettier-ignore-start -->

Expand Down Expand Up @@ -71,7 +71,7 @@ A connector is defined as a function that receives an `options` argument. This a

Register the connector in the application's configuration file.

##### config.app.js:
**config.app.js:**

```js
readModelConnectors: {
Expand All @@ -86,7 +86,7 @@ readModelConnectors: {

Now you can assign the custom connector to a Read Model by name as shown below.

##### config.app.js:
**config.app.js:**

```js
readModels: [
Expand All @@ -102,7 +102,7 @@ Now you can assign the custom connector to a Read Model by name as shown below.

The code sample below demonstrates how you can use the custom store's API in the Read Model's code.

##### common/read-models/custom-read-model.projection.js:
**common/read-models/custom-read-model.projection.js:**

<!-- prettier-ignore-start -->

Expand All @@ -125,7 +125,7 @@ export default projection

<!-- prettier-ignore-end -->

##### common/read-models/custom-read-model.resolvers.js:
**common/read-models/custom-read-model.resolvers.js:**

<!-- prettier-ignore-start -->

Expand Down

0 comments on commit 46e90ce

Please sign in to comment.