Skip to content

Commit

Permalink
feat: rewrite documentation for more clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien2p committed Feb 9, 2022
1 parent 8bc4b5f commit 959e3a1
Show file tree
Hide file tree
Showing 62 changed files with 2,943 additions and 1,334 deletions.
2 changes: 1 addition & 1 deletion .swcrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"baseUrl": "."
},
"module": {
"type": "commonjs",
"type": "CommonJS",
"strict": true,
"strictMode": true,
"lazy": false,
Expand Down
4 changes: 2 additions & 2 deletions .swcrcspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
"baseUrl": "."
},
"module": {
"type": "commonjs",
"type": "CommonJS",
"strict": true,
"strictMode": true,
"lazy": false,
"noInterop": true
"noInterop": false
}
}
585 changes: 328 additions & 257 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/coverage/badge-branches.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/medusa-extender.jpeg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/readme/scenario-1-architecture.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
583 changes: 328 additions & 255 deletions docs/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:42](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/decorators/onMedusaEntityEvent.decorator.ts#L42)
[src/decorators/onMedusaEntityEvent.decorator.ts:42](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/decorators/onMedusaEntityEvent.decorator.ts#L42)

## Properties

Expand All @@ -55,7 +55,7 @@

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:40](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/decorators/onMedusaEntityEvent.decorator.ts#L40)
[src/decorators/onMedusaEntityEvent.decorator.ts:40](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/decorators/onMedusaEntityEvent.decorator.ts#L40)

___

Expand All @@ -65,7 +65,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:39](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/decorators/onMedusaEntityEvent.decorator.ts#L39)
[src/decorators/onMedusaEntityEvent.decorator.ts:39](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/decorators/onMedusaEntityEvent.decorator.ts#L39)

## Accessors

Expand All @@ -79,7 +79,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:50](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/decorators/onMedusaEntityEvent.decorator.ts#L50)
[src/decorators/onMedusaEntityEvent.decorator.ts:50](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/decorators/onMedusaEntityEvent.decorator.ts#L50)

___

Expand All @@ -93,7 +93,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:46](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/decorators/onMedusaEntityEvent.decorator.ts#L46)
[src/decorators/onMedusaEntityEvent.decorator.ts:46](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/decorators/onMedusaEntityEvent.decorator.ts#L46)

## Methods

Expand All @@ -112,15 +112,15 @@ ___
| Name | Type |
| :------ | :------ |
| `entity` | `TEntity` |
| `options` | [`EntityEventActionOptions`](../modules/decorators_onMedusaEntityEvent_decorator.md#entityeventactionoptions)<`TEntity`\> |
| `options` | [`EntityEventActionOptions`](../modules/decorators_onMedusaEntityEvent_decorator.md#entityeventactionoptions) |

#### Returns

`MethodDecorator`

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:70](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/decorators/onMedusaEntityEvent.decorator.ts#L70)
[src/decorators/onMedusaEntityEvent.decorator.ts:70](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/decorators/onMedusaEntityEvent.decorator.ts#L70)

___

Expand All @@ -146,7 +146,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:58](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/decorators/onMedusaEntityEvent.decorator.ts#L58)
[src/decorators/onMedusaEntityEvent.decorator.ts:58](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/decorators/onMedusaEntityEvent.decorator.ts#L58)

___

Expand All @@ -165,15 +165,15 @@ ___
| Name | Type |
| :------ | :------ |
| `entity` | `TEntity` |
| `options` | [`EntityEventActionOptions`](../modules/decorators_onMedusaEntityEvent_decorator.md#entityeventactionoptions)<`TEntity`\> |
| `options` | [`EntityEventActionOptions`](../modules/decorators_onMedusaEntityEvent_decorator.md#entityeventactionoptions) |

#### Returns

`MethodDecorator`

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:84](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/decorators/onMedusaEntityEvent.decorator.ts#L84)
[src/decorators/onMedusaEntityEvent.decorator.ts:84](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/decorators/onMedusaEntityEvent.decorator.ts#L84)

___

Expand All @@ -199,7 +199,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:66](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/decorators/onMedusaEntityEvent.decorator.ts#L66)
[src/decorators/onMedusaEntityEvent.decorator.ts:66](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/decorators/onMedusaEntityEvent.decorator.ts#L66)

___

Expand All @@ -218,15 +218,15 @@ ___
| Name | Type |
| :------ | :------ |
| `entity` | `TEntity` |
| `options` | [`EntityEventActionOptions`](../modules/decorators_onMedusaEntityEvent_decorator.md#entityeventactionoptions)<`TEntity`\> |
| `options` | [`EntityEventActionOptions`](../modules/decorators_onMedusaEntityEvent_decorator.md#entityeventactionoptions) |

#### Returns

`MethodDecorator`

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:77](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/decorators/onMedusaEntityEvent.decorator.ts#L77)
[src/decorators/onMedusaEntityEvent.decorator.ts:77](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/decorators/onMedusaEntityEvent.decorator.ts#L77)

___

Expand All @@ -252,7 +252,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:62](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/decorators/onMedusaEntityEvent.decorator.ts#L62)
[src/decorators/onMedusaEntityEvent.decorator.ts:62](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/decorators/onMedusaEntityEvent.decorator.ts#L62)

___

Expand All @@ -272,15 +272,15 @@ ___
| :------ | :------ |
| `action` | [`EntityActions`](../modules/decorators_onMedusaEntityEvent_decorator.md#entityactions) |
| `entity` | `TEntity` |
| `options` | [`EntityEventActionOptions`](../modules/decorators_onMedusaEntityEvent_decorator.md#entityeventactionoptions)<`TEntity`\> |
| `options` | [`EntityEventActionOptions`](../modules/decorators_onMedusaEntityEvent_decorator.md#entityeventactionoptions) |

#### Returns

`MethodDecorator`

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:91](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/decorators/onMedusaEntityEvent.decorator.ts#L91)
[src/decorators/onMedusaEntityEvent.decorator.ts:91](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/decorators/onMedusaEntityEvent.decorator.ts#L91)

___

Expand All @@ -300,4 +300,4 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:54](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/decorators/onMedusaEntityEvent.decorator.ts#L54)
[src/decorators/onMedusaEntityEvent.decorator.ts:54](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/decorators/onMedusaEntityEvent.decorator.ts#L54)
12 changes: 6 additions & 6 deletions docs/classes/event_emmiter.Internals.CustomEventEmmiter.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ EventEmitter.constructor

#### Defined in

[src/event-emmiter.ts:21](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/event-emmiter.ts#L21)
[src/event-emmiter.ts:21](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/event-emmiter.ts#L21)

## Properties

Expand All @@ -51,7 +51,7 @@ EventEmitter.constructor

#### Defined in

[src/event-emmiter.ts:19](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/event-emmiter.ts#L19)
[src/event-emmiter.ts:19](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/event-emmiter.ts#L19)

## Methods

Expand Down Expand Up @@ -80,7 +80,7 @@ Emit an asynchrone event entity based and wait for the result.

#### Defined in

[src/event-emmiter.ts:80](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/event-emmiter.ts#L80)
[src/event-emmiter.ts:80](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/event-emmiter.ts#L80)

___

Expand Down Expand Up @@ -110,7 +110,7 @@ Register a new event handler.

#### Defined in

[src/event-emmiter.ts:31](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/event-emmiter.ts#L31)
[src/event-emmiter.ts:31](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/event-emmiter.ts#L31)

___

Expand All @@ -132,7 +132,7 @@ Apply all event handlers hold by the `listenerDescriptor`.

#### Defined in

[src/event-emmiter.ts:43](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/event-emmiter.ts#L43)
[src/event-emmiter.ts:43](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/event-emmiter.ts#L43)

___

Expand All @@ -146,4 +146,4 @@ ___

#### Defined in

[src/event-emmiter.ts:68](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/event-emmiter.ts#L68)
[src/event-emmiter.ts:68](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/event-emmiter.ts#L68)
2 changes: 1 addition & 1 deletion docs/classes/loader.Loader.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ internal container and database connection.

#### Defined in

[src/loader.ts:35](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/loader.ts#L35)
[src/loader.ts:35](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/loader.ts#L35)
8 changes: 4 additions & 4 deletions docs/classes/medusa.Medusa.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Register steps that must be executed before/after medusa is load.

#### Defined in

[src/medusa.ts:15](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/medusa.ts#L15)
src/Medusa.ts:15

## Properties

Expand All @@ -46,7 +46,7 @@ Register steps that must be executed before/after medusa is load.

#### Defined in

[src/medusa.ts:8](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/medusa.ts#L8)
src/Medusa.ts:8

___

Expand All @@ -56,7 +56,7 @@ ___

#### Defined in

[src/medusa.ts:9](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/medusa.ts#L9)
src/Medusa.ts:9

## Methods

Expand All @@ -78,4 +78,4 @@ Launch all the steps before/after medusa according to the `stepOptions`.

#### Defined in

[src/medusa.ts:23](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/medusa.ts#L23)
src/Medusa.ts:23
2 changes: 1 addition & 1 deletion docs/classes/metadata_reader.Internals.CustomMap.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ Map.get

#### Defined in

[src/metadata-reader.ts:5](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/metadata-reader.ts#L5)
[src/metadata-reader.ts:5](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/metadata-reader.ts#L5)
12 changes: 6 additions & 6 deletions docs/classes/utils.Utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Attach a new subscriber to a specific entities.

#### Defined in

[src/utils.ts:38](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/utils.ts#L38)
[src/utils.ts:38](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/utils.ts#L38)

___

Expand All @@ -80,7 +80,7 @@ Prepare the log to be shown to be consistent everywhere.

#### Defined in

[src/utils.ts:69](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/utils.ts#L69)
[src/utils.ts:69](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/utils.ts#L69)

___

Expand All @@ -102,7 +102,7 @@ Log all the routes from the express instance.

#### Defined in

[src/utils.ts:59](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/utils.ts#L59)
[src/utils.ts:59](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/utils.ts#L59)

___

Expand All @@ -123,7 +123,7 @@ ___

#### Defined in

[src/utils.ts:83](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/utils.ts#L83)
[src/utils.ts:83](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/utils.ts#L83)

___

Expand Down Expand Up @@ -153,7 +153,7 @@ Since it is not possible to use multiple extend, you can use that utilities to a

#### Defined in

[src/utils.ts:16](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/utils.ts#L16)
[src/utils.ts:16](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/utils.ts#L16)

___

Expand All @@ -173,4 +173,4 @@ ___

#### Defined in

[src/utils.ts:103](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/utils.ts#L103)
[src/utils.ts:103](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/utils.ts#L103)
2 changes: 1 addition & 1 deletion docs/interfaces/types.MedusaMiddleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ Describe a custom middleware instance.

#### Defined in

[src/types.ts:136](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/types.ts#L136)
[src/types.ts:135](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/types.ts#L135)
2 changes: 1 addition & 1 deletion docs/interfaces/types.Type.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ Function.constructor

#### Defined in

[src/types.ts:6](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/types.ts#L6)
[src/types.ts:6](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/types.ts#L6)
2 changes: 1 addition & 1 deletion docs/media/coverage/badge-branches.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/media/medusa-extender.jpeg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/media/readme/scenario-1-architecture.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

### Modules

- [contants](modules/contants.md)
- [constants](modules/constants.md)
- [decorators](modules/decorators.md)
- [decorators/components.decorator](modules/decorators_components_decorator.md)
- [decorators/module.decorator](modules/decorators_module_decorator.md)
Expand Down
16 changes: 8 additions & 8 deletions docs/modules/contants.md → docs/modules/constants.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[medusa-extender](../README.md) / [Exports](../modules.md) / contants
[medusa-extender](../README.md) / [Exports](../modules.md) / constants

# Module: contants
# Module: constants

## Table of contents

### Variables

- [INJECTABLE\_OPTIONS\_KEY](contants.md#injectable_options_key)
- [MEDUSA\_RESOLVER\_KEYS](contants.md#medusa_resolver_keys)
- [MODULE\_KEY](contants.md#module_key)
- [INJECTABLE\_OPTIONS\_KEY](constants.md#injectable_options_key)
- [MEDUSA\_RESOLVER\_KEYS](constants.md#medusa_resolver_keys)
- [MODULE\_KEY](constants.md#module_key)

## Variables

Expand All @@ -20,7 +20,7 @@ Metadata key to store config from decorated injectables.

#### Defined in

[src/contants.ts:9](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/contants.ts#L9)
[src/constants.ts:9](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/constants.ts#L9)

___

Expand Down Expand Up @@ -66,7 +66,7 @@ Hold the name of the medusa services registered into the container for later on

#### Defined in

[src/contants.ts:14](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/contants.ts#L14)
[src/constants.ts:14](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/constants.ts#L14)

___

Expand All @@ -78,4 +78,4 @@ Metadata key to store config from decorated injectables.

#### Defined in

[src/contants.ts:4](https://github.com/adrien2p/medusa-extender/blob/dd34810/src/contants.ts#L4)
[src/constants.ts:4](https://github.com/adrien2p/medusa-extender/blob/e917dcd/src/constants.ts#L4)

0 comments on commit 959e3a1

Please sign in to comment.