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

fix(cli): commands #114

Merged
merged 4 commits into from
Aug 14, 2022
Merged
Show file tree
Hide file tree
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
5 changes: 3 additions & 2 deletions blueprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@
["Name", "Alias", "Description"],
["`--run`", "`-r`", "Run migrations up method."],
["`--revert`", "`-u`", "Revert the last migrations."],
["`--show`", "`-s`", "Show all applied and non applied migrations."]
["`--show`", "`-s`", "Show all applied and non applied migrations."],
["`--tenant_codes [codes]`", "`-t`", "Specify on which tenant to run the command for. It can be composed of a mix of string or regexp that are comma separated (e.g \"tenant1,/specialTenant.*/\")."]
],
"cliGenerateOptionsSchematics": [
["Name", "Alias", "Description"],
Expand All @@ -154,6 +155,6 @@
["`--repository`", "`-re`", "Generate a new repository."],
["`--migration`", "`-mi`", "Generate a new migration."],
["`--validator`", "`-va`", "Generate a new validator."],
["`--path`", "`-p`", "specify the path where the component must be generated (by default the component will be generated at [`src/modules/<name>/<name>.<type>.ts`]."]
["`--path <path>`", "`-p`", "specify the path where the component must be generated (by default the component will be generated at [`src/modules/<name>/<name>.<type>.ts`]."]
]
}
35 changes: 18 additions & 17 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,18 +231,18 @@ that newly created component and add it to the `imports` list automatically.
#### Options


| Name | Alias | Description |
|----------------|-------|--------------------------------------------------|
| `<name>` | | Component name to generate |
| `--module` | `-m` | Generate a new module. |
| `--middleware` | `-mi` | Generate a new middleware. |
| `--service` | `-s` | Generate a new service. |
| `--router` | `-r` | Generate a new router. |
| `--entity` | `-e` | Generate a new entity. |
| `--repository` | `-re` | Generate a new repository. |
| `--migration` | `-mi` | Generate a new migration. |
| `--validator` | `-va` | Generate a new validator. |
| `--path` | `-p` | specify the path where the component must be generated (by default the component will be generated at [`src/modules/<name>/<name>.<type>.ts`]. |
| Name | Alias | Description |
|-----------------|-------|--------------------------------------------------|
| `<name>` | | Component name to generate |
| `--module` | `-m` | Generate a new module. |
| `--middleware` | `-mi` | Generate a new middleware. |
| `--service` | `-s` | Generate a new service. |
| `--router` | `-r` | Generate a new router. |
| `--entity` | `-e` | Generate a new entity. |
| `--repository` | `-re` | Generate a new repository. |
| `--migration` | `-mi` | Generate a new migration. |
| `--validator` | `-va` | Generate a new validator. |
| `--path <path>` | `-p` | specify the path where the component must be generated (by default the component will be generated at [`src/modules/<name>/<name>.<type>.ts`]. |


#### Examples
Expand Down Expand Up @@ -296,11 +296,12 @@ modules.exports = {
#### Options


| Name | Alias | Description |
|------------|-------|----------------------------------------------|
| `--run` | `-r` | Run migrations up method. |
| `--revert` | `-u` | Revert the last migrations. |
| `--show` | `-s` | Show all applied and non applied migrations. |
| Name | Alias | Description |
|--------------------------|-------|--------------------------------------------------|
| `--run` | `-r` | Run migrations up method. |
| `--revert` | `-u` | Revert the last migrations. |
| `--show` | `-s` | Show all applied and non applied migrations. |
| `--tenant_codes [codes]` | `-t` | Specify on which tenant to run the command for. It can be composed of a mix of string or regexp that are comma separated (e.g "tenant1,/specialTenant.*/"). |


[![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/cloudy.png)](#full-code-api-mag)
Expand Down
8 changes: 4 additions & 4 deletions docs/classes/Medusa.Medusa-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Load medusa and apply all components

#### Defined in

[src/Medusa.ts:39](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/Medusa.ts#L39)
[src/Medusa.ts:39](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/Medusa.ts#L39)

## Properties

Expand All @@ -46,7 +46,7 @@ Load medusa and apply all components

#### Defined in

[src/Medusa.ts:32](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/Medusa.ts#L32)
[src/Medusa.ts:32](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/Medusa.ts#L32)

___

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

#### Defined in

[src/Medusa.ts:33](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/Medusa.ts#L33)
[src/Medusa.ts:33](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/Medusa.ts#L33)

## Methods

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

#### Defined in

[src/Medusa.ts:47](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/Medusa.ts#L47)
[src/Medusa.ts:47](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/Medusa.ts#L47)
2 changes: 1 addition & 1 deletion docs/classes/core_componentMap.ComponentMap.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ Map.get

#### Defined in

[src/core/componentMap.ts:4](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/core/componentMap.ts#L4)
[src/core/componentMap.ts:4](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/core/componentMap.ts#L4)
10 changes: 5 additions & 5 deletions docs/classes/core_event_emmiter.Internals.CustomEventEmmiter.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ EventEmitter.constructor

#### Defined in

[src/core/event-emmiter.ts:22](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/core/event-emmiter.ts#L22)
[src/core/event-emmiter.ts:22](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/core/event-emmiter.ts#L22)

## Properties

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

#### Defined in

[src/core/event-emmiter.ts:20](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/core/event-emmiter.ts#L20)
[src/core/event-emmiter.ts:20](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/core/event-emmiter.ts#L20)

## Methods

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

#### Defined in

[src/core/event-emmiter.ts:74](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/core/event-emmiter.ts#L74)
[src/core/event-emmiter.ts:74](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/core/event-emmiter.ts#L74)

___

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

#### Defined in

[src/core/event-emmiter.ts:32](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/core/event-emmiter.ts#L32)
[src/core/event-emmiter.ts:32](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/core/event-emmiter.ts#L32)

___

Expand All @@ -132,4 +132,4 @@ Only unregister and register again non singleton based event listeners

#### Defined in

[src/core/event-emmiter.ts:45](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/core/event-emmiter.ts#L45)
[src/core/event-emmiter.ts:45](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/core/event-emmiter.ts#L45)
26 changes: 13 additions & 13 deletions docs/classes/core_logger.Logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Internal logger to display information about the build.

#### Defined in

[src/core/logger.ts:20](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/core/logger.ts#L20)
[src/core/logger.ts:20](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/core/logger.ts#L20)

## Properties

Expand All @@ -59,7 +59,7 @@ Internal logger to display information about the build.

#### Defined in

[src/core/logger.ts:10](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/core/logger.ts#L10)
[src/core/logger.ts:10](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/core/logger.ts#L10)

___

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

#### Defined in

[src/core/logger.ts:9](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/core/logger.ts#L9)
[src/core/logger.ts:9](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/core/logger.ts#L9)

___

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

#### Defined in

[src/core/logger.ts:8](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/core/logger.ts#L8)
[src/core/logger.ts:8](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/core/logger.ts#L8)

## Accessors

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

#### Defined in

[src/core/logger.ts:16](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/core/logger.ts#L16)
[src/core/logger.ts:16](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/core/logger.ts#L16)

___

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

#### Defined in

[src/core/logger.ts:12](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/core/logger.ts#L12)
[src/core/logger.ts:12](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/core/logger.ts#L12)

## Methods

Expand All @@ -131,7 +131,7 @@ Build logs taking in count the level color

#### Defined in

[src/core/logger.ts:89](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/core/logger.ts#L89)
[src/core/logger.ts:89](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/core/logger.ts#L89)

___

Expand All @@ -154,7 +154,7 @@ Display error logs in red immediately

#### Defined in

[src/core/logger.ts:66](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/core/logger.ts#L66)
[src/core/logger.ts:66](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/core/logger.ts#L66)

___

Expand All @@ -170,7 +170,7 @@ display all queues logs and then reset the queue.

#### Defined in

[src/core/logger.ts:73](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/core/logger.ts#L73)
[src/core/logger.ts:73](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/core/logger.ts#L73)

___

Expand All @@ -193,7 +193,7 @@ Display log immediately.

#### Defined in

[src/core/logger.ts:48](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/core/logger.ts#L48)
[src/core/logger.ts:48](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/core/logger.ts#L48)

___

Expand All @@ -216,7 +216,7 @@ Push new logs to queue and then show them later on.

#### Defined in

[src/core/logger.ts:34](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/core/logger.ts#L34)
[src/core/logger.ts:34](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/core/logger.ts#L34)

___

Expand All @@ -239,7 +239,7 @@ Display warning immediately.

#### Defined in

[src/core/logger.ts:57](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/core/logger.ts#L57)
[src/core/logger.ts:57](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/core/logger.ts#L57)

___

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

#### Defined in

[src/core/logger.ts:25](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/core/logger.ts#L25)
[src/core/logger.ts:25](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/core/logger.ts#L25)
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:41](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/decorators/onMedusaEntityEvent.decorator.ts#L41)
[src/decorators/onMedusaEntityEvent.decorator.ts:41](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/decorators/onMedusaEntityEvent.decorator.ts#L41)

## Properties

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

#### Defined in

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

___

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

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:38](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/decorators/onMedusaEntityEvent.decorator.ts#L38)
[src/decorators/onMedusaEntityEvent.decorator.ts:38](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/decorators/onMedusaEntityEvent.decorator.ts#L38)

## Accessors

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

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:49](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/decorators/onMedusaEntityEvent.decorator.ts#L49)
[src/decorators/onMedusaEntityEvent.decorator.ts:49](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/decorators/onMedusaEntityEvent.decorator.ts#L49)

___

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

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:45](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/decorators/onMedusaEntityEvent.decorator.ts#L45)
[src/decorators/onMedusaEntityEvent.decorator.ts:45](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/decorators/onMedusaEntityEvent.decorator.ts#L45)

## Methods

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

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:69](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/decorators/onMedusaEntityEvent.decorator.ts#L69)
[src/decorators/onMedusaEntityEvent.decorator.ts:69](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/decorators/onMedusaEntityEvent.decorator.ts#L69)

___

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

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:57](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/decorators/onMedusaEntityEvent.decorator.ts#L57)
[src/decorators/onMedusaEntityEvent.decorator.ts:57](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/decorators/onMedusaEntityEvent.decorator.ts#L57)

___

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

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:83](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/decorators/onMedusaEntityEvent.decorator.ts#L83)
[src/decorators/onMedusaEntityEvent.decorator.ts:83](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/decorators/onMedusaEntityEvent.decorator.ts#L83)

___

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

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:65](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/decorators/onMedusaEntityEvent.decorator.ts#L65)
[src/decorators/onMedusaEntityEvent.decorator.ts:65](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/decorators/onMedusaEntityEvent.decorator.ts#L65)

___

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

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:76](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/decorators/onMedusaEntityEvent.decorator.ts#L76)
[src/decorators/onMedusaEntityEvent.decorator.ts:76](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/decorators/onMedusaEntityEvent.decorator.ts#L76)

___

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

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:61](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/decorators/onMedusaEntityEvent.decorator.ts#L61)
[src/decorators/onMedusaEntityEvent.decorator.ts:61](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/decorators/onMedusaEntityEvent.decorator.ts#L61)

___

Expand Down Expand Up @@ -280,7 +280,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:90](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/decorators/onMedusaEntityEvent.decorator.ts#L90)
[src/decorators/onMedusaEntityEvent.decorator.ts:90](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/decorators/onMedusaEntityEvent.decorator.ts#L90)

___

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

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:53](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/decorators/onMedusaEntityEvent.decorator.ts#L53)
[src/decorators/onMedusaEntityEvent.decorator.ts:53](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/decorators/onMedusaEntityEvent.decorator.ts#L53)
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@

#### Defined in

[src/modules/multi-tenancy/tenant.middleware.ts:12](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/modules/multi-tenancy/tenant.middleware.ts#L12)
[src/modules/multi-tenancy/tenant.middleware.ts:12](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/modules/multi-tenancy/tenant.middleware.ts#L12)
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@

#### Defined in

[src/modules/multi-tenancy/tenant.module.ts:9](https://github.com/adrien2p/medusa-extender/blob/f27eb84/src/modules/multi-tenancy/tenant.module.ts#L9)
[src/modules/multi-tenancy/tenant.module.ts:9](https://github.com/adrien2p/medusa-extender/blob/ad78501/src/modules/multi-tenancy/tenant.module.ts#L9)
Loading