From c75e3b39939bddba1bab7eeb2477c01beba68aeb Mon Sep 17 00:00:00 2001 From: adrien2p Date: Thu, 17 Mar 2022 22:29:40 +0100 Subject: [PATCH] docs: Update getting started --- README.md | 82 +---------------- docs/README.md | 91 +++---------------- docs/classes/Medusa.Medusa-1.md | 8 +- ...nt_emmiter.Internals.CustomEventEmmiter.md | 12 +-- docs/classes/core_logger.Logger.md | 26 +++--- ...ore_metadata_reader.Internals.CustomMap.md | 2 +- ...tityEvent_decorator.OnMedusaEntityEvent.md | 26 +++--- .../interfaces/core_types.MedusaMiddleware.md | 2 +- docs/interfaces/core_types.Type.md | 2 +- .../modules_monitoring.MonitoringOptions.md | 30 +++--- ...i_commands_generate_component.Internals.md | 2 +- .../cli_commands_generate_component.md | 6 +- docs/modules/cli_commands_init.md | 2 +- docs/modules/cli_commands_migrate.md | 2 +- docs/modules/cli_templates_entity_template.md | 2 +- .../cli_templates_middleware_template.md | 2 +- .../cli_templates_migration_template.md | 2 +- docs/modules/cli_templates_module_template.md | 2 +- .../cli_templates_repository_template.md | 2 +- docs/modules/cli_templates_router_template.md | 2 +- .../modules/cli_templates_service_template.md | 2 +- .../cli_templates_validator_template.md | 2 +- docs/modules/cli_utils_create_directory.md | 2 +- .../cli_utils_lookup_closest_module.md | 2 +- .../cli_utils_parse_component_value.md | 2 +- docs/modules/core.md | 7 ++ docs/modules/core_constants.md | 6 +- docs/modules/core_event_emmiter.Internals.md | 2 +- docs/modules/core_event_emmiter.md | 2 +- docs/modules/core_metadata_reader.md | 4 +- docs/modules/core_package_loader.md | 4 +- docs/modules/core_types.md | 34 +++---- docs/modules/core_utils.md | 37 +++++++- .../decorators_components_decorator.md | 14 +-- ...ators_helpers_build_component_decorator.md | 2 +- docs/modules/decorators_module_decorator.md | 2 +- ...ecorators_onMedusaEntityEvent_decorator.md | 10 +- docs/modules/loaders.md | 7 ++ docs/modules/loaders_admin_api_loader.md | 2 +- docs/modules/loaders_database_loader.md | 2 +- docs/modules/loaders_entities_loader.md | 8 +- .../loaders_helpers_apply_middlewares.md | 4 +- docs/modules/loaders_helpers_apply_routers.md | 4 +- docs/modules/loaders_migrations_loader.md | 2 +- docs/modules/loaders_plugins_loader.md | 2 +- docs/modules/loaders_repository_loader.md | 4 +- docs/modules/loaders_services_loader.md | 6 +- docs/modules/loaders_store_api_loader.md | 2 +- docs/modules/loaders_validators_loader.md | 2 +- docs/modules/modules_monitoring.md | 2 +- documentation/01-getting-started.md | 80 +--------------- documentation/02-api-documentation.md | 12 ++- documentation/_README_BUILT.md | 91 +++---------------- 53 files changed, 218 insertions(+), 451 deletions(-) diff --git a/README.md b/README.md index 0c9ed620..df99ef00 100644 --- a/README.md +++ b/README.md @@ -80,89 +80,11 @@ Depending on your situation, pick the right getting started section. In that case, you must already have scaffold a new medusa store project. If that's not the case you can [follow the tutorial here](https://docs.medusajs.com/quickstart/quick-start). -Run the following command in your terminal +Run the following command in your terminal (The last version is 1.5.5) ```bash npm install medusa-extender -``` - -To benefit from all the features that the extender offers you, the usage of typescript is recommended. - -Then let's create the `tsconfig.json` configuration - -```bash -npm i -D typescript -echo '{ - "compilerOptions": { - "module": "CommonJS", - "declaration": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "allowSyntheticDefaultImports": true, - "moduleResolution": "node", - "target": "es2017", - "sourceMap": true, - "skipLibCheck": true, - "allowJs": true, - "outDir": "dist", - "rootDir": "src", - "esModuleInterop": true - }, - "include": [ - "src" - ], - "exclude": [ - "dist", - "node_modules", - "**/*.spec.ts" - ] -}' > tsconfig.json -``` - -update the scripts in your `package.json` - -```json -{ - "scripts": { - "build": "rm -rf dist && tsc", - "start": "npm run build && node dist/main.js" - } -} -``` - -add a main file in the `src` directory - -```typescript -// src/main.ts - -import express = require('express'); -import { Medusa } from 'medusa-extender'; -import { resolve } from 'path'; - -async function bootstrap() { - const expressInstance = express(); - - const rootDir = resolve(__dirname, '..'); - await new Medusa(rootDir, expressInstance).load([]); - - expressInstance.listen(9000, () => { - console.info('Server successfully started on port 9000'); - }); -} - -bootstrap(); -``` - -And finally update the `develop.sh` script with the following - -```bash -#!/bin/bash - -#Run migrations to ensure the database is updated -medusa migrations run - -#Start development environment -npm run start +./node_modules/.bin/medex init ``` That's it, you are now ready to run your server :rocket: diff --git a/docs/README.md b/docs/README.md index 6e28ee15..17ef7991 100644 --- a/docs/README.md +++ b/docs/README.md @@ -78,6 +78,7 @@ * [Utilities :wrench:](#utilities-wrench) * [attachOrReplaceEntitySubscriber](#attachorreplaceentitysubscriber) * [repositoryMixin](#repositorymixin) + * [Omit](#omit) * [Starters](#starters) * [Internal modules](#internal-modules) * [Monitoring](#monitoring) @@ -115,85 +116,7 @@ Run the following command in your terminal (The last version is 1.5.5) ```bash npm install medusa-extender -``` - -To benefit from all the features that the extender offers you, the usage of typescript is recommended. - -Then let's create the `tsconfig.json` configuration - -```bash -npm i -D typescript -echo '{ - "compilerOptions": { - "module": "CommonJS", - "declaration": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "allowSyntheticDefaultImports": true, - "moduleResolution": "node", - "target": "es2017", - "sourceMap": true, - "skipLibCheck": true, - "allowJs": true, - "outDir": "dist", - "rootDir": "src", - "esModuleInterop": true - }, - "include": [ - "src" - ], - "exclude": [ - "dist", - "node_modules", - "**/*.spec.ts" - ] -}' > tsconfig.json -``` - -update the scripts in your `package.json` - -```json -{ - "scripts": { - "build": "rm -rf dist && tsc", - "start": "npm run build && node dist/main.js" - } -} -``` - -add a main file in the `src` directory - -```typescript -// src/main.ts - -import express = require('express'); -import { Medusa } from 'medusa-extender'; -import { resolve } from 'path'; - -async function bootstrap() { - const expressInstance = express(); - - const rootDir = resolve(__dirname, '..'); - await new Medusa(rootDir, expressInstance).load([]); - - expressInstance.listen(9000, () => { - console.info('Server successfully started on port 9000'); - }); -} - -bootstrap(); -``` - -And finally update the `develop.sh` script with the following - -```bash -#!/bin/bash - -#Run migrations to ensure the database is updated -medusa migrations run - -#Start development environment -npm run start +./node_modules/.bin/medex init ``` That's it, you are now ready to run your server :rocket: @@ -969,6 +892,16 @@ To usage is easy and can be seen [here](#onmedusaentityevent). This utility is mandatory when you extend an existing repository. Since that to be able to work the repository must extend multiple classes in order to reflect the original repository and the custom extension that you've made. The usage is easy and can be seen [here](#repository). + +### Omit + +The `Omit` utility allows you to omit a set of properties from a class. +In some cases, extending a class to change the type of a property makes +typescript complains about the typings. In such cases, omitting the parent +property in order to re-create it with your own type in the child class. + +> ATTENTION!! This usage must be done carefully to avoid to break things without +> noticing it. [![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/cloudy.png)](#starters) diff --git a/docs/classes/Medusa.Medusa-1.md b/docs/classes/Medusa.Medusa-1.md index fea6f64c..9f90a0b9 100644 --- a/docs/classes/Medusa.Medusa-1.md +++ b/docs/classes/Medusa.Medusa-1.md @@ -36,7 +36,7 @@ Load medusa and apply all components #### Defined in -[src/Medusa.ts:38](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/Medusa.ts#L38) +[src/Medusa.ts:38](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/Medusa.ts#L38) ## Properties @@ -46,7 +46,7 @@ Load medusa and apply all components #### Defined in -[src/Medusa.ts:31](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/Medusa.ts#L31) +[src/Medusa.ts:31](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/Medusa.ts#L31) ___ @@ -56,7 +56,7 @@ ___ #### Defined in -[src/Medusa.ts:32](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/Medusa.ts#L32) +[src/Medusa.ts:32](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/Medusa.ts#L32) ## Methods @@ -76,4 +76,4 @@ ___ #### Defined in -[src/Medusa.ts:46](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/Medusa.ts#L46) +[src/Medusa.ts:46](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/Medusa.ts#L46) diff --git a/docs/classes/core_event_emmiter.Internals.CustomEventEmmiter.md b/docs/classes/core_event_emmiter.Internals.CustomEventEmmiter.md index a9989fb5..09f794a9 100644 --- a/docs/classes/core_event_emmiter.Internals.CustomEventEmmiter.md +++ b/docs/classes/core_event_emmiter.Internals.CustomEventEmmiter.md @@ -41,7 +41,7 @@ EventEmitter.constructor #### Defined in -[src/core/event-emmiter.ts:21](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/event-emmiter.ts#L21) +[src/core/event-emmiter.ts:21](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/event-emmiter.ts#L21) ## Properties @@ -51,7 +51,7 @@ EventEmitter.constructor #### Defined in -[src/core/event-emmiter.ts:19](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/event-emmiter.ts#L19) +[src/core/event-emmiter.ts:19](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/event-emmiter.ts#L19) ## Methods @@ -80,7 +80,7 @@ Emit an asynchrone event entity based and wait for the result. #### Defined in -[src/core/event-emmiter.ts:80](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/event-emmiter.ts#L80) +[src/core/event-emmiter.ts:80](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/event-emmiter.ts#L80) ___ @@ -110,7 +110,7 @@ Register a new event handler. #### Defined in -[src/core/event-emmiter.ts:31](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/event-emmiter.ts#L31) +[src/core/event-emmiter.ts:31](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/event-emmiter.ts#L31) ___ @@ -132,7 +132,7 @@ Apply all event handlers hold by the `listenerDescriptor`. #### Defined in -[src/core/event-emmiter.ts:43](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/event-emmiter.ts#L43) +[src/core/event-emmiter.ts:43](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/event-emmiter.ts#L43) ___ @@ -146,4 +146,4 @@ ___ #### Defined in -[src/core/event-emmiter.ts:68](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/event-emmiter.ts#L68) +[src/core/event-emmiter.ts:68](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/event-emmiter.ts#L68) diff --git a/docs/classes/core_logger.Logger.md b/docs/classes/core_logger.Logger.md index d8aee1fc..d963d857 100644 --- a/docs/classes/core_logger.Logger.md +++ b/docs/classes/core_logger.Logger.md @@ -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/37cc0bb/src/core/logger.ts#L20) +[src/core/logger.ts:20](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/logger.ts#L20) ## Properties @@ -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/37cc0bb/src/core/logger.ts#L10) +[src/core/logger.ts:10](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/logger.ts#L10) ___ @@ -69,7 +69,7 @@ ___ #### Defined in -[src/core/logger.ts:9](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/logger.ts#L9) +[src/core/logger.ts:9](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/logger.ts#L9) ___ @@ -79,7 +79,7 @@ ___ #### Defined in -[src/core/logger.ts:8](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/logger.ts#L8) +[src/core/logger.ts:8](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/logger.ts#L8) ## Accessors @@ -93,7 +93,7 @@ ___ #### Defined in -[src/core/logger.ts:16](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/logger.ts#L16) +[src/core/logger.ts:16](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/logger.ts#L16) ___ @@ -107,7 +107,7 @@ ___ #### Defined in -[src/core/logger.ts:12](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/logger.ts#L12) +[src/core/logger.ts:12](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/logger.ts#L12) ## Methods @@ -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/37cc0bb/src/core/logger.ts#L89) +[src/core/logger.ts:89](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/logger.ts#L89) ___ @@ -154,7 +154,7 @@ Display error logs in red immediately #### Defined in -[src/core/logger.ts:66](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/logger.ts#L66) +[src/core/logger.ts:66](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/logger.ts#L66) ___ @@ -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/37cc0bb/src/core/logger.ts#L73) +[src/core/logger.ts:73](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/logger.ts#L73) ___ @@ -193,7 +193,7 @@ Display log immediately. #### Defined in -[src/core/logger.ts:48](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/logger.ts#L48) +[src/core/logger.ts:48](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/logger.ts#L48) ___ @@ -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/37cc0bb/src/core/logger.ts#L34) +[src/core/logger.ts:34](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/logger.ts#L34) ___ @@ -239,7 +239,7 @@ Display warning immediately. #### Defined in -[src/core/logger.ts:57](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/logger.ts#L57) +[src/core/logger.ts:57](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/logger.ts#L57) ___ @@ -260,4 +260,4 @@ ___ #### Defined in -[src/core/logger.ts:25](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/logger.ts#L25) +[src/core/logger.ts:25](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/logger.ts#L25) diff --git a/docs/classes/core_metadata_reader.Internals.CustomMap.md b/docs/classes/core_metadata_reader.Internals.CustomMap.md index ff33814f..da011780 100644 --- a/docs/classes/core_metadata_reader.Internals.CustomMap.md +++ b/docs/classes/core_metadata_reader.Internals.CustomMap.md @@ -84,4 +84,4 @@ Map.get #### Defined in -[src/core/metadata-reader.ts:5](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/metadata-reader.ts#L5) +[src/core/metadata-reader.ts:5](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/metadata-reader.ts#L5) diff --git a/docs/classes/decorators_onMedusaEntityEvent_decorator.OnMedusaEntityEvent.md b/docs/classes/decorators_onMedusaEntityEvent_decorator.OnMedusaEntityEvent.md index 916a67dc..45a17ce5 100644 --- a/docs/classes/decorators_onMedusaEntityEvent_decorator.OnMedusaEntityEvent.md +++ b/docs/classes/decorators_onMedusaEntityEvent_decorator.OnMedusaEntityEvent.md @@ -45,7 +45,7 @@ #### Defined in -[src/decorators/onMedusaEntityEvent.decorator.ts:41](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/onMedusaEntityEvent.decorator.ts#L41) +[src/decorators/onMedusaEntityEvent.decorator.ts:41](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/onMedusaEntityEvent.decorator.ts#L41) ## Properties @@ -55,7 +55,7 @@ #### Defined in -[src/decorators/onMedusaEntityEvent.decorator.ts:39](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/onMedusaEntityEvent.decorator.ts#L39) +[src/decorators/onMedusaEntityEvent.decorator.ts:39](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/onMedusaEntityEvent.decorator.ts#L39) ___ @@ -65,7 +65,7 @@ ___ #### Defined in -[src/decorators/onMedusaEntityEvent.decorator.ts:38](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/onMedusaEntityEvent.decorator.ts#L38) +[src/decorators/onMedusaEntityEvent.decorator.ts:38](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/onMedusaEntityEvent.decorator.ts#L38) ## Accessors @@ -79,7 +79,7 @@ ___ #### Defined in -[src/decorators/onMedusaEntityEvent.decorator.ts:49](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/onMedusaEntityEvent.decorator.ts#L49) +[src/decorators/onMedusaEntityEvent.decorator.ts:49](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/onMedusaEntityEvent.decorator.ts#L49) ___ @@ -93,7 +93,7 @@ ___ #### Defined in -[src/decorators/onMedusaEntityEvent.decorator.ts:45](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/onMedusaEntityEvent.decorator.ts#L45) +[src/decorators/onMedusaEntityEvent.decorator.ts:45](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/onMedusaEntityEvent.decorator.ts#L45) ## Methods @@ -120,7 +120,7 @@ ___ #### Defined in -[src/decorators/onMedusaEntityEvent.decorator.ts:69](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/onMedusaEntityEvent.decorator.ts#L69) +[src/decorators/onMedusaEntityEvent.decorator.ts:69](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/onMedusaEntityEvent.decorator.ts#L69) ___ @@ -146,7 +146,7 @@ ___ #### Defined in -[src/decorators/onMedusaEntityEvent.decorator.ts:57](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/onMedusaEntityEvent.decorator.ts#L57) +[src/decorators/onMedusaEntityEvent.decorator.ts:57](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/onMedusaEntityEvent.decorator.ts#L57) ___ @@ -173,7 +173,7 @@ ___ #### Defined in -[src/decorators/onMedusaEntityEvent.decorator.ts:83](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/onMedusaEntityEvent.decorator.ts#L83) +[src/decorators/onMedusaEntityEvent.decorator.ts:83](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/onMedusaEntityEvent.decorator.ts#L83) ___ @@ -199,7 +199,7 @@ ___ #### Defined in -[src/decorators/onMedusaEntityEvent.decorator.ts:65](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/onMedusaEntityEvent.decorator.ts#L65) +[src/decorators/onMedusaEntityEvent.decorator.ts:65](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/onMedusaEntityEvent.decorator.ts#L65) ___ @@ -226,7 +226,7 @@ ___ #### Defined in -[src/decorators/onMedusaEntityEvent.decorator.ts:76](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/onMedusaEntityEvent.decorator.ts#L76) +[src/decorators/onMedusaEntityEvent.decorator.ts:76](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/onMedusaEntityEvent.decorator.ts#L76) ___ @@ -252,7 +252,7 @@ ___ #### Defined in -[src/decorators/onMedusaEntityEvent.decorator.ts:61](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/onMedusaEntityEvent.decorator.ts#L61) +[src/decorators/onMedusaEntityEvent.decorator.ts:61](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/onMedusaEntityEvent.decorator.ts#L61) ___ @@ -280,7 +280,7 @@ ___ #### Defined in -[src/decorators/onMedusaEntityEvent.decorator.ts:90](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/onMedusaEntityEvent.decorator.ts#L90) +[src/decorators/onMedusaEntityEvent.decorator.ts:90](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/onMedusaEntityEvent.decorator.ts#L90) ___ @@ -300,4 +300,4 @@ ___ #### Defined in -[src/decorators/onMedusaEntityEvent.decorator.ts:53](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/onMedusaEntityEvent.decorator.ts#L53) +[src/decorators/onMedusaEntityEvent.decorator.ts:53](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/onMedusaEntityEvent.decorator.ts#L53) diff --git a/docs/interfaces/core_types.MedusaMiddleware.md b/docs/interfaces/core_types.MedusaMiddleware.md index fd6fd237..8b9750c6 100644 --- a/docs/interfaces/core_types.MedusaMiddleware.md +++ b/docs/interfaces/core_types.MedusaMiddleware.md @@ -33,4 +33,4 @@ Describe a custom middleware instance. #### Defined in -[src/core/types.ts:152](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/types.ts#L152) +[src/core/types.ts:152](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/types.ts#L152) diff --git a/docs/interfaces/core_types.Type.md b/docs/interfaces/core_types.Type.md index f843a503..b0b8e53d 100644 --- a/docs/interfaces/core_types.Type.md +++ b/docs/interfaces/core_types.Type.md @@ -40,4 +40,4 @@ Function.constructor #### Defined in -[src/core/types.ts:6](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/types.ts#L6) +[src/core/types.ts:6](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/types.ts#L6) diff --git a/docs/interfaces/modules_monitoring.MonitoringOptions.md b/docs/interfaces/modules_monitoring.MonitoringOptions.md index 344d64ed..6db5277b 100644 --- a/docs/interfaces/modules_monitoring.MonitoringOptions.md +++ b/docs/interfaces/modules_monitoring.MonitoringOptions.md @@ -35,7 +35,7 @@ #### Defined in -[src/modules/monitoring.ts:15](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/modules/monitoring.ts#L15) +[src/modules/monitoring.ts:15](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/modules/monitoring.ts#L15) ___ @@ -45,7 +45,7 @@ ___ #### Defined in -[src/modules/monitoring.ts:17](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/modules/monitoring.ts#L17) +[src/modules/monitoring.ts:17](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/modules/monitoring.ts#L17) ___ @@ -55,7 +55,7 @@ ___ #### Defined in -[src/modules/monitoring.ts:12](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/modules/monitoring.ts#L12) +[src/modules/monitoring.ts:12](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/modules/monitoring.ts#L12) ___ @@ -65,7 +65,7 @@ ___ #### Defined in -[src/modules/monitoring.ts:19](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/modules/monitoring.ts#L19) +[src/modules/monitoring.ts:19](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/modules/monitoring.ts#L19) ___ @@ -75,7 +75,7 @@ ___ #### Defined in -[src/modules/monitoring.ts:7](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/modules/monitoring.ts#L7) +[src/modules/monitoring.ts:7](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/modules/monitoring.ts#L7) ___ @@ -85,7 +85,7 @@ ___ #### Defined in -[src/modules/monitoring.ts:8](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/modules/monitoring.ts#L8) +[src/modules/monitoring.ts:8](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/modules/monitoring.ts#L8) ___ @@ -95,7 +95,7 @@ ___ #### Defined in -[src/modules/monitoring.ts:13](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/modules/monitoring.ts#L13) +[src/modules/monitoring.ts:13](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/modules/monitoring.ts#L13) ___ @@ -105,7 +105,7 @@ ___ #### Defined in -[src/modules/monitoring.ts:14](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/modules/monitoring.ts#L14) +[src/modules/monitoring.ts:14](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/modules/monitoring.ts#L14) ___ @@ -115,7 +115,7 @@ ___ #### Defined in -[src/modules/monitoring.ts:18](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/modules/monitoring.ts#L18) +[src/modules/monitoring.ts:18](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/modules/monitoring.ts#L18) ___ @@ -125,7 +125,7 @@ ___ #### Defined in -[src/modules/monitoring.ts:10](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/modules/monitoring.ts#L10) +[src/modules/monitoring.ts:10](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/modules/monitoring.ts#L10) ___ @@ -135,7 +135,7 @@ ___ #### Defined in -[src/modules/monitoring.ts:9](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/modules/monitoring.ts#L9) +[src/modules/monitoring.ts:9](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/modules/monitoring.ts#L9) ___ @@ -145,7 +145,7 @@ ___ #### Defined in -[src/modules/monitoring.ts:11](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/modules/monitoring.ts#L11) +[src/modules/monitoring.ts:11](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/modules/monitoring.ts#L11) ___ @@ -155,7 +155,7 @@ ___ #### Defined in -[src/modules/monitoring.ts:6](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/modules/monitoring.ts#L6) +[src/modules/monitoring.ts:6](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/modules/monitoring.ts#L6) ## Methods @@ -177,7 +177,7 @@ ___ #### Defined in -[src/modules/monitoring.ts:20](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/modules/monitoring.ts#L20) +[src/modules/monitoring.ts:20](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/modules/monitoring.ts#L20) ___ @@ -199,4 +199,4 @@ ___ #### Defined in -[src/modules/monitoring.ts:16](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/modules/monitoring.ts#L16) +[src/modules/monitoring.ts:16](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/modules/monitoring.ts#L16) diff --git a/docs/modules/cli_commands_generate_component.Internals.md b/docs/modules/cli_commands_generate_component.Internals.md index 14e4c2b9..c14bcb96 100644 --- a/docs/modules/cli_commands_generate_component.Internals.md +++ b/docs/modules/cli_commands_generate_component.Internals.md @@ -32,4 +32,4 @@ #### Defined in -[src/cli/commands/generate-component.ts:18](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/cli/commands/generate-component.ts#L18) +[src/cli/commands/generate-component.ts:18](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/cli/commands/generate-component.ts#L18) diff --git a/docs/modules/cli_commands_generate_component.md b/docs/modules/cli_commands_generate_component.md index f29f6b3b..02ce58cf 100644 --- a/docs/modules/cli_commands_generate_component.md +++ b/docs/modules/cli_commands_generate_component.md @@ -38,7 +38,7 @@ Create the component file and fill it with the template content. #### Defined in -[src/cli/commands/generate-component.ts:106](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/cli/commands/generate-component.ts#L106) +[src/cli/commands/generate-component.ts:106](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/cli/commands/generate-component.ts#L106) ___ @@ -61,7 +61,7 @@ Generate the required components from the user command. #### Defined in -[src/cli/commands/generate-component.ts:45](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/cli/commands/generate-component.ts#L45) +[src/cli/commands/generate-component.ts:45](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/cli/commands/generate-component.ts#L45) ___ @@ -83,4 +83,4 @@ Lookup for the closest module from the component and update its imports. #### Defined in -[src/cli/commands/generate-component.ts:133](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/cli/commands/generate-component.ts#L133) +[src/cli/commands/generate-component.ts:133](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/cli/commands/generate-component.ts#L133) diff --git a/docs/modules/cli_commands_init.md b/docs/modules/cli_commands_init.md index dcb62f0e..39403e8c 100644 --- a/docs/modules/cli_commands_init.md +++ b/docs/modules/cli_commands_init.md @@ -22,4 +22,4 @@ Update or create everything related to medusa-extender in an existing medusa pro #### Defined in -[src/cli/commands/init.ts:12](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/cli/commands/init.ts#L12) +[src/cli/commands/init.ts:12](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/cli/commands/init.ts#L12) diff --git a/docs/modules/cli_commands_migrate.md b/docs/modules/cli_commands_migrate.md index 83dfffbf..eb5d90ec 100644 --- a/docs/modules/cli_commands_migrate.md +++ b/docs/modules/cli_commands_migrate.md @@ -28,4 +28,4 @@ Run the migrations using the medusa-config.js config. #### Defined in -[src/cli/commands/migrate.ts:9](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/cli/commands/migrate.ts#L9) +[src/cli/commands/migrate.ts:9](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/cli/commands/migrate.ts#L9) diff --git a/docs/modules/cli_templates_entity_template.md b/docs/modules/cli_templates_entity_template.md index ad58df9b..9176a4e5 100644 --- a/docs/modules/cli_templates_entity_template.md +++ b/docs/modules/cli_templates_entity_template.md @@ -28,4 +28,4 @@ Provide a basic template for the entity component generation. #### Defined in -[src/cli/templates/entity-template.ts:7](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/cli/templates/entity-template.ts#L7) +[src/cli/templates/entity-template.ts:7](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/cli/templates/entity-template.ts#L7) diff --git a/docs/modules/cli_templates_middleware_template.md b/docs/modules/cli_templates_middleware_template.md index 622fb66c..5153dd20 100644 --- a/docs/modules/cli_templates_middleware_template.md +++ b/docs/modules/cli_templates_middleware_template.md @@ -28,4 +28,4 @@ Provide a basic template for the middleware component generation. #### Defined in -[src/cli/templates/middleware-template.ts:7](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/cli/templates/middleware-template.ts#L7) +[src/cli/templates/middleware-template.ts:7](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/cli/templates/middleware-template.ts#L7) diff --git a/docs/modules/cli_templates_migration_template.md b/docs/modules/cli_templates_migration_template.md index 2e698af0..f1cb53d4 100644 --- a/docs/modules/cli_templates_migration_template.md +++ b/docs/modules/cli_templates_migration_template.md @@ -28,4 +28,4 @@ Provide a basic template for the migration component generation. #### Defined in -[src/cli/templates/migration-template.ts:7](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/cli/templates/migration-template.ts#L7) +[src/cli/templates/migration-template.ts:7](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/cli/templates/migration-template.ts#L7) diff --git a/docs/modules/cli_templates_module_template.md b/docs/modules/cli_templates_module_template.md index 858eed51..9b8b7a2e 100644 --- a/docs/modules/cli_templates_module_template.md +++ b/docs/modules/cli_templates_module_template.md @@ -28,4 +28,4 @@ Provide a basic template for the module component generation. #### Defined in -[src/cli/templates/module-template.ts:7](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/cli/templates/module-template.ts#L7) +[src/cli/templates/module-template.ts:7](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/cli/templates/module-template.ts#L7) diff --git a/docs/modules/cli_templates_repository_template.md b/docs/modules/cli_templates_repository_template.md index a12ff986..36a200a4 100644 --- a/docs/modules/cli_templates_repository_template.md +++ b/docs/modules/cli_templates_repository_template.md @@ -28,4 +28,4 @@ Provide a basic template for the repository component generation. #### Defined in -[src/cli/templates/repository-template.ts:7](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/cli/templates/repository-template.ts#L7) +[src/cli/templates/repository-template.ts:7](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/cli/templates/repository-template.ts#L7) diff --git a/docs/modules/cli_templates_router_template.md b/docs/modules/cli_templates_router_template.md index 34fb7651..b44a46d7 100644 --- a/docs/modules/cli_templates_router_template.md +++ b/docs/modules/cli_templates_router_template.md @@ -28,4 +28,4 @@ Provide a basic template for the router component generation. #### Defined in -[src/cli/templates/router-template.ts:7](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/cli/templates/router-template.ts#L7) +[src/cli/templates/router-template.ts:7](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/cli/templates/router-template.ts#L7) diff --git a/docs/modules/cli_templates_service_template.md b/docs/modules/cli_templates_service_template.md index 0defc6d8..8ace094a 100644 --- a/docs/modules/cli_templates_service_template.md +++ b/docs/modules/cli_templates_service_template.md @@ -28,4 +28,4 @@ Provide a basic template for the service component generation. #### Defined in -[src/cli/templates/service-template.ts:7](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/cli/templates/service-template.ts#L7) +[src/cli/templates/service-template.ts:7](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/cli/templates/service-template.ts#L7) diff --git a/docs/modules/cli_templates_validator_template.md b/docs/modules/cli_templates_validator_template.md index db7a97b8..d4dcd268 100644 --- a/docs/modules/cli_templates_validator_template.md +++ b/docs/modules/cli_templates_validator_template.md @@ -28,4 +28,4 @@ Provide a basic template for the validator component generation. #### Defined in -[src/cli/templates/validator-template.ts:7](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/cli/templates/validator-template.ts#L7) +[src/cli/templates/validator-template.ts:7](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/cli/templates/validator-template.ts#L7) diff --git a/docs/modules/cli_utils_create_directory.md b/docs/modules/cli_utils_create_directory.md index 9d583e32..743a4eb8 100644 --- a/docs/modules/cli_utils_create_directory.md +++ b/docs/modules/cli_utils_create_directory.md @@ -30,4 +30,4 @@ Create the new directory, if necessary, that will receive the components. #### Defined in -[src/cli/utils/create-directory.ts:10](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/cli/utils/create-directory.ts#L10) +[src/cli/utils/create-directory.ts:10](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/cli/utils/create-directory.ts#L10) diff --git a/docs/modules/cli_utils_lookup_closest_module.md b/docs/modules/cli_utils_lookup_closest_module.md index 708342ec..51bbd013 100644 --- a/docs/modules/cli_utils_lookup_closest_module.md +++ b/docs/modules/cli_utils_lookup_closest_module.md @@ -29,4 +29,4 @@ Lookup for the closest module component from the destination path. #### Defined in -[src/cli/utils/lookup-closest-module.ts:9](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/cli/utils/lookup-closest-module.ts#L9) +[src/cli/utils/lookup-closest-module.ts:9](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/cli/utils/lookup-closest-module.ts#L9) diff --git a/docs/modules/cli_utils_parse_component_value.md b/docs/modules/cli_utils_parse_component_value.md index 2ac19c4e..a3667894 100644 --- a/docs/modules/cli_utils_parse_component_value.md +++ b/docs/modules/cli_utils_parse_component_value.md @@ -37,4 +37,4 @@ Parse the component information to create a kind of descriptor. #### Defined in -[src/cli/utils/parse-component-value.ts:7](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/cli/utils/parse-component-value.ts#L7) +[src/cli/utils/parse-component-value.ts:7](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/cli/utils/parse-component-value.ts#L7) diff --git a/docs/modules/core.md b/docs/modules/core.md index dfd281b8..05933718 100644 --- a/docs/modules/core.md +++ b/docs/modules/core.md @@ -23,6 +23,7 @@ - [MedusaRouteOptions](core.md#medusarouteoptions) - [MiddlewareInjectionOptions](core.md#middlewareinjectionoptions) - [MixinReturnType](core.md#mixinreturntype) +- [Omit](core.md#omit) - [RepositoryInjectableOptions](core.md#repositoryinjectableoptions) - [RouterInjectionOptions](core.md#routerinjectionoptions) - [RoutesInjectionRouterConfiguration](core.md#routesinjectionrouterconfiguration) @@ -141,6 +142,12 @@ Re-exports [MixinReturnType](core_types.md#mixinreturntype) ___ +### Omit + +Re-exports [Omit](core_utils.md#omit) + +___ + ### RepositoryInjectableOptions Re-exports [RepositoryInjectableOptions](core_types.md#repositoryinjectableoptions) diff --git a/docs/modules/core_constants.md b/docs/modules/core_constants.md index 76becfc3..2fe876cb 100644 --- a/docs/modules/core_constants.md +++ b/docs/modules/core_constants.md @@ -20,7 +20,7 @@ Metadata key to store config from decorated injectables. #### Defined in -[src/core/constants.ts:9](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/constants.ts#L9) +[src/core/constants.ts:9](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/constants.ts#L9) ___ @@ -66,7 +66,7 @@ Hold the name of the medusa services registered into the container for later on #### Defined in -[src/core/constants.ts:14](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/constants.ts#L14) +[src/core/constants.ts:14](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/constants.ts#L14) ___ @@ -78,4 +78,4 @@ Metadata key to store config from decorated injectables. #### Defined in -[src/core/constants.ts:4](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/constants.ts#L4) +[src/core/constants.ts:4](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/constants.ts#L4) diff --git a/docs/modules/core_event_emmiter.Internals.md b/docs/modules/core_event_emmiter.Internals.md index 3a174ef9..b68fd97b 100644 --- a/docs/modules/core_event_emmiter.Internals.md +++ b/docs/modules/core_event_emmiter.Internals.md @@ -38,4 +38,4 @@ A listener descriptor. #### Defined in -[src/core/event-emmiter.ts:9](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/event-emmiter.ts#L9) +[src/core/event-emmiter.ts:9](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/event-emmiter.ts#L9) diff --git a/docs/modules/core_event_emmiter.md b/docs/modules/core_event_emmiter.md index 49bcb84c..03fad1dc 100644 --- a/docs/modules/core_event_emmiter.md +++ b/docs/modules/core_event_emmiter.md @@ -23,4 +23,4 @@ Export the instance of the event emmiter. #### Defined in -[src/core/event-emmiter.ts:102](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/event-emmiter.ts#L102) +[src/core/event-emmiter.ts:102](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/event-emmiter.ts#L102) diff --git a/docs/modules/core_metadata_reader.md b/docs/modules/core_metadata_reader.md index e4bbcd68..7728450c 100644 --- a/docs/modules/core_metadata_reader.md +++ b/docs/modules/core_metadata_reader.md @@ -41,7 +41,7 @@ Return the options from components. #### Defined in -[src/core/metadata-reader.ts:49](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/metadata-reader.ts#L49) +[src/core/metadata-reader.ts:49](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/metadata-reader.ts#L49) ___ @@ -65,4 +65,4 @@ Read all metadata from the imported modules and extract components that will be #### Defined in -[src/core/metadata-reader.ts:16](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/metadata-reader.ts#L16) +[src/core/metadata-reader.ts:16](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/metadata-reader.ts#L16) diff --git a/docs/modules/core_package_loader.md b/docs/modules/core_package_loader.md index 03bf6f19..a83b22f5 100644 --- a/docs/modules/core_package_loader.md +++ b/docs/modules/core_package_loader.md @@ -24,7 +24,7 @@ Return the install command from the user package manager. #### Defined in -[src/core/package-loader.ts:52](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/package-loader.ts#L52) +[src/core/package-loader.ts:52](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/package-loader.ts#L52) ___ @@ -48,4 +48,4 @@ Load packages at run time. #### Defined in -[src/core/package-loader.ts:12](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/package-loader.ts#L12) +[src/core/package-loader.ts:12](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/package-loader.ts#L12) diff --git a/docs/modules/core_types.md b/docs/modules/core_types.md index 822c1f5f..5f0a216c 100644 --- a/docs/modules/core_types.md +++ b/docs/modules/core_types.md @@ -53,7 +53,7 @@ #### Defined in -[src/core/types.ts:9](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/types.ts#L9) +[src/core/types.ts:9](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/types.ts#L9) ___ @@ -78,7 +78,7 @@ Defines the injection options for entities. #### Defined in -[src/core/types.ts:26](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/types.ts#L26) +[src/core/types.ts:26](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/types.ts#L26) ___ @@ -96,7 +96,7 @@ Determine which options type it actually is depending on the component type. #### Defined in -[src/core/types.ts:94](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/types.ts#L94) +[src/core/types.ts:94](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/types.ts#L94) ___ @@ -114,7 +114,7 @@ Determine which options type it actually is depending on the component type. #### Defined in -[src/core/types.ts:117](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/types.ts#L117) +[src/core/types.ts:117](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/types.ts#L117) ___ @@ -126,7 +126,7 @@ Components that does not required any other options that Type. #### Defined in -[src/core/types.ts:14](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/types.ts#L14) +[src/core/types.ts:14](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/types.ts#L14) ___ @@ -144,7 +144,7 @@ Union of all options type possible for injectable. #### Defined in -[src/core/types.ts:83](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/types.ts#L83) +[src/core/types.ts:83](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/types.ts#L83) ___ @@ -156,7 +156,7 @@ Describe the expected request from a middleware [MedusaMiddleware](../interfaces #### Defined in -[src/core/types.ts:130](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/types.ts#L130) +[src/core/types.ts:130](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/types.ts#L130) ___ @@ -175,7 +175,7 @@ Medusa request extended. #### Defined in -[src/core/types.ts:123](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/types.ts#L123) +[src/core/types.ts:123](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/types.ts#L123) ___ @@ -185,7 +185,7 @@ ___ #### Defined in -[src/core/types.ts:137](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/types.ts#L137) +[src/core/types.ts:137](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/types.ts#L137) ___ @@ -204,7 +204,7 @@ Describe all the available options for the Route [MedusaMiddleware](../interface #### Defined in -[src/core/types.ts:142](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/types.ts#L142) +[src/core/types.ts:142](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/types.ts#L142) ___ @@ -223,7 +223,7 @@ Defines the injection options for middlewares. #### Defined in -[src/core/types.ts:68](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/types.ts#L68) +[src/core/types.ts:68](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/types.ts#L68) ___ @@ -242,7 +242,7 @@ Mix the return type of two objects. #### Defined in -[src/core/types.ts:158](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/types.ts#L158) +[src/core/types.ts:158](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/types.ts#L158) ___ @@ -267,7 +267,7 @@ Defines the injection options for services, entities, repositories. #### Defined in -[src/core/types.ts:43](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/types.ts#L43) +[src/core/types.ts:43](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/types.ts#L43) ___ @@ -285,7 +285,7 @@ Defines the injection options for routes. #### Defined in -[src/core/types.ts:61](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/types.ts#L61) +[src/core/types.ts:61](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/types.ts#L61) ___ @@ -306,7 +306,7 @@ Define a router and its configuration. #### Defined in -[src/core/types.ts:51](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/types.ts#L51) +[src/core/types.ts:51](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/types.ts#L51) ___ @@ -332,7 +332,7 @@ Defines the injection options for service. #### Defined in -[src/core/types.ts:34](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/types.ts#L34) +[src/core/types.ts:34](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/types.ts#L34) ___ @@ -356,4 +356,4 @@ Defines the injection options for routes. #### Defined in -[src/core/types.ts:76](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/types.ts#L76) +[src/core/types.ts:76](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/types.ts#L76) diff --git a/docs/modules/core_utils.md b/docs/modules/core_utils.md index dbe97fab..f0ed97b2 100644 --- a/docs/modules/core_utils.md +++ b/docs/modules/core_utils.md @@ -6,11 +6,44 @@ ### Functions +- [Omit](core_utils.md#omit) - [attachOrReplaceEntitySubscriber](core_utils.md#attachorreplaceentitysubscriber) - [repositoryMixin](core_utils.md#repositorymixin) ## Functions +### Omit + +▸ **Omit**<`T`, `K`\>(`Class`, `keys`): () => `Omit`<`T`, `K`\> + +Allow to omit some property from a class. + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | `T` | +| `K` | extends `string` \| `number` \| `symbol` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `Class` | () => `T` | +| `keys` | `K`[] | + +#### Returns + +`fn` + +• **new Omit**() + +#### Defined in + +[src/core/utils.ts:53](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/utils.ts#L53) + +___ + ### attachOrReplaceEntitySubscriber ▸ **attachOrReplaceEntitySubscriber**<`T`\>(`connection`, `Subscriber`, `transactionalEntityManager?`): `void` @@ -37,7 +70,7 @@ Attach a new subscriber to a specific entities. #### Defined in -[src/core/utils.ts:30](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/utils.ts#L30) +[src/core/utils.ts:30](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/utils.ts#L30) ___ @@ -67,4 +100,4 @@ Since it is not possible to use multiple extend, you can use that utilities to a #### Defined in -[src/core/utils.ts:10](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/core/utils.ts#L10) +[src/core/utils.ts:10](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/core/utils.ts#L10) diff --git a/docs/modules/decorators_components_decorator.md b/docs/modules/decorators_components_decorator.md index c2af86ea..95d37794 100644 --- a/docs/modules/decorators_components_decorator.md +++ b/docs/modules/decorators_components_decorator.md @@ -40,7 +40,7 @@ Mark a class as an entity to be used by the loader. #### Defined in -[src/decorators/components.decorator.ts:16](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/components.decorator.ts#L16) +[src/decorators/components.decorator.ts:16](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/components.decorator.ts#L16) ___ @@ -62,7 +62,7 @@ Mark a class as a middleware to be used by the loader. #### Defined in -[src/decorators/components.decorator.ts:43](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/components.decorator.ts#L43) +[src/decorators/components.decorator.ts:43](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/components.decorator.ts#L43) ___ @@ -78,7 +78,7 @@ Mark a class as a migration to be used by the loader. #### Defined in -[src/decorators/components.decorator.ts:51](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/components.decorator.ts#L51) +[src/decorators/components.decorator.ts:51](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/components.decorator.ts#L51) ___ @@ -106,7 +106,7 @@ Mark a class as a repository to be used by the loader. #### Defined in -[src/decorators/components.decorator.ts:34](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/components.decorator.ts#L34) +[src/decorators/components.decorator.ts:34](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/components.decorator.ts#L34) ___ @@ -128,7 +128,7 @@ Mark a class as a router to be used by the loader. #### Defined in -[src/decorators/components.decorator.ts:60](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/components.decorator.ts#L60) +[src/decorators/components.decorator.ts:60](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/components.decorator.ts#L60) ___ @@ -156,7 +156,7 @@ Mark a class as a service to be used by the loader. #### Defined in -[src/decorators/components.decorator.ts:25](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/components.decorator.ts#L25) +[src/decorators/components.decorator.ts:25](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/components.decorator.ts#L25) ___ @@ -178,4 +178,4 @@ Mark a class as a validator to be used by the validator utility. #### Defined in -[src/decorators/components.decorator.ts:69](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/components.decorator.ts#L69) +[src/decorators/components.decorator.ts:69](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/components.decorator.ts#L69) diff --git a/docs/modules/decorators_helpers_build_component_decorator.md b/docs/modules/decorators_helpers_build_component_decorator.md index efe5a13e..e00542d8 100644 --- a/docs/modules/decorators_helpers_build_component_decorator.md +++ b/docs/modules/decorators_helpers_build_component_decorator.md @@ -32,4 +32,4 @@ #### Defined in -[src/decorators/helpers/build-component-decorator.ts:4](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/helpers/build-component-decorator.ts#L4) +[src/decorators/helpers/build-component-decorator.ts:4](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/helpers/build-component-decorator.ts#L4) diff --git a/docs/modules/decorators_module_decorator.md b/docs/modules/decorators_module_decorator.md index 03e537c5..10633b1a 100644 --- a/docs/modules/decorators_module_decorator.md +++ b/docs/modules/decorators_module_decorator.md @@ -29,4 +29,4 @@ Mark a class as aa module and store all injectable on it. #### Defined in -[src/decorators/module.decorator.ts:9](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/module.decorator.ts#L9) +[src/decorators/module.decorator.ts:9](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/module.decorator.ts#L9) diff --git a/docs/modules/decorators_onMedusaEntityEvent_decorator.md b/docs/modules/decorators_onMedusaEntityEvent_decorator.md index 3a167670..58b18661 100644 --- a/docs/modules/decorators_onMedusaEntityEvent_decorator.md +++ b/docs/modules/decorators_onMedusaEntityEvent_decorator.md @@ -24,7 +24,7 @@ #### Defined in -[src/decorators/onMedusaEntityEvent.decorator.ts:10](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/onMedusaEntityEvent.decorator.ts#L10) +[src/decorators/onMedusaEntityEvent.decorator.ts:10](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/onMedusaEntityEvent.decorator.ts#L10) ___ @@ -41,7 +41,7 @@ ___ #### Defined in -[src/decorators/onMedusaEntityEvent.decorator.ts:5](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/onMedusaEntityEvent.decorator.ts#L5) +[src/decorators/onMedusaEntityEvent.decorator.ts:5](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/onMedusaEntityEvent.decorator.ts#L5) ___ @@ -60,7 +60,7 @@ Event types that can be emitted. #### Defined in -[src/decorators/onMedusaEntityEvent.decorator.ts:15](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/onMedusaEntityEvent.decorator.ts#L15) +[src/decorators/onMedusaEntityEvent.decorator.ts:15](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/onMedusaEntityEvent.decorator.ts#L15) ___ @@ -86,7 +86,7 @@ The arguments expected by the [OnMedusaEntityEvent](../classes/decorators_onMedu #### Defined in -[src/decorators/onMedusaEntityEvent.decorator.ts:24](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/onMedusaEntityEvent.decorator.ts#L24) +[src/decorators/onMedusaEntityEvent.decorator.ts:24](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/onMedusaEntityEvent.decorator.ts#L24) ___ @@ -112,4 +112,4 @@ The arguments expected by the event handler. #### Defined in -[src/decorators/onMedusaEntityEvent.decorator.ts:32](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/decorators/onMedusaEntityEvent.decorator.ts#L32) +[src/decorators/onMedusaEntityEvent.decorator.ts:32](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/decorators/onMedusaEntityEvent.decorator.ts#L32) diff --git a/docs/modules/loaders.md b/docs/modules/loaders.md index a8c3346c..b65e72e6 100644 --- a/docs/modules/loaders.md +++ b/docs/modules/loaders.md @@ -19,6 +19,7 @@ - [MedusaRouteOptions](loaders.md#medusarouteoptions) - [MiddlewareInjectionOptions](loaders.md#middlewareinjectionoptions) - [MixinReturnType](loaders.md#mixinreturntype) +- [Omit](loaders.md#omit) - [RepositoryInjectableOptions](loaders.md#repositoryinjectableoptions) - [RouterInjectionOptions](loaders.md#routerinjectionoptions) - [RoutesInjectionRouterConfiguration](loaders.md#routesinjectionrouterconfiguration) @@ -123,6 +124,12 @@ Re-exports [MixinReturnType](core_types.md#mixinreturntype) ___ +### Omit + +Re-exports [Omit](core_utils.md#omit) + +___ + ### RepositoryInjectableOptions Re-exports [RepositoryInjectableOptions](core_types.md#repositoryinjectableoptions) diff --git a/docs/modules/loaders_admin_api_loader.md b/docs/modules/loaders_admin_api_loader.md index b707d776..f1d26888 100644 --- a/docs/modules/loaders_admin_api_loader.md +++ b/docs/modules/loaders_admin_api_loader.md @@ -31,4 +31,4 @@ Apply middlewares and routes on the underlying @medusajs admin API. #### Defined in -[src/loaders/admin-api.loader.ts:13](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/loaders/admin-api.loader.ts#L13) +[src/loaders/admin-api.loader.ts:13](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/loaders/admin-api.loader.ts#L13) diff --git a/docs/modules/loaders_database_loader.md b/docs/modules/loaders_database_loader.md index 00621825..906905e6 100644 --- a/docs/modules/loaders_database_loader.md +++ b/docs/modules/loaders_database_loader.md @@ -27,4 +27,4 @@ #### Defined in -[src/loaders/database.loader.ts:5](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/loaders/database.loader.ts#L5) +[src/loaders/database.loader.ts:5](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/loaders/database.loader.ts#L5) diff --git a/docs/modules/loaders_entities_loader.md b/docs/modules/loaders_entities_loader.md index 788b7e22..410993f3 100644 --- a/docs/modules/loaders_entities_loader.md +++ b/docs/modules/loaders_entities_loader.md @@ -33,7 +33,7 @@ Load all custom entities into the underlying @medusajs instance. #### Defined in -[src/loaders/entities.loader.ts:13](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/loaders/entities.loader.ts#L13) +[src/loaders/entities.loader.ts:13](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/loaders/entities.loader.ts#L13) ___ @@ -56,7 +56,7 @@ Load all custom entities that override @medusajs instance entities. #### Defined in -[src/loaders/entities.loader.ts:36](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/loaders/entities.loader.ts#L36) +[src/loaders/entities.loader.ts:36](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/loaders/entities.loader.ts#L36) ___ @@ -76,7 +76,7 @@ ___ #### Defined in -[src/loaders/entities.loader.ts:63](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/loaders/entities.loader.ts#L63) +[src/loaders/entities.loader.ts:63](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/loaders/entities.loader.ts#L63) ___ @@ -97,4 +97,4 @@ ___ #### Defined in -[src/loaders/entities.loader.ts:51](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/loaders/entities.loader.ts#L51) +[src/loaders/entities.loader.ts:51](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/loaders/entities.loader.ts#L51) diff --git a/docs/modules/loaders_helpers_apply_middlewares.md b/docs/modules/loaders_helpers_apply_middlewares.md index 1e4c5803..54acab89 100644 --- a/docs/modules/loaders_helpers_apply_middlewares.md +++ b/docs/modules/loaders_helpers_apply_middlewares.md @@ -31,7 +31,7 @@ Apply all middlewares on the app that must be applied after the @medusajs authen #### Defined in -[src/loaders/helpers/apply-middlewares.ts:40](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/loaders/helpers/apply-middlewares.ts#L40) +[src/loaders/helpers/apply-middlewares.ts:40](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/loaders/helpers/apply-middlewares.ts#L40) ___ @@ -55,4 +55,4 @@ Apply all middlewares on the app that must be applied before the @medusajs authe #### Defined in -[src/loaders/helpers/apply-middlewares.ts:18](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/loaders/helpers/apply-middlewares.ts#L18) +[src/loaders/helpers/apply-middlewares.ts:18](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/loaders/helpers/apply-middlewares.ts#L18) diff --git a/docs/modules/loaders_helpers_apply_routers.md b/docs/modules/loaders_helpers_apply_routers.md index 964d6bd6..209a752e 100644 --- a/docs/modules/loaders_helpers_apply_routers.md +++ b/docs/modules/loaders_helpers_apply_routers.md @@ -31,7 +31,7 @@ Apply all routes on the app that must be applied after the @medusajs authenticat #### Defined in -[src/loaders/helpers/apply-routers.ts:26](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/loaders/helpers/apply-routers.ts#L26) +[src/loaders/helpers/apply-routers.ts:26](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/loaders/helpers/apply-routers.ts#L26) ___ @@ -55,4 +55,4 @@ Apply all routes on the app that must be applied before the @medusajs authentica #### Defined in -[src/loaders/helpers/apply-routers.ts:10](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/loaders/helpers/apply-routers.ts#L10) +[src/loaders/helpers/apply-routers.ts:10](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/loaders/helpers/apply-routers.ts#L10) diff --git a/docs/modules/loaders_migrations_loader.md b/docs/modules/loaders_migrations_loader.md index 90d264a5..c50d3778 100644 --- a/docs/modules/loaders_migrations_loader.md +++ b/docs/modules/loaders_migrations_loader.md @@ -30,4 +30,4 @@ Run custom migrations that are find from the provided directory and stored in a #### Defined in -[src/loaders/migrations.loader.ts:13](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/loaders/migrations.loader.ts#L13) +[src/loaders/migrations.loader.ts:13](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/loaders/migrations.loader.ts#L13) diff --git a/docs/modules/loaders_plugins_loader.md b/docs/modules/loaders_plugins_loader.md index a3ba03ae..50e0c30c 100644 --- a/docs/modules/loaders_plugins_loader.md +++ b/docs/modules/loaders_plugins_loader.md @@ -29,4 +29,4 @@ Register all listeners before the plugins are loaded to be sure that the scope m #### Defined in -[src/loaders/plugins.loader.ts:11](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/loaders/plugins.loader.ts#L11) +[src/loaders/plugins.loader.ts:11](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/loaders/plugins.loader.ts#L11) diff --git a/docs/modules/loaders_repository_loader.md b/docs/modules/loaders_repository_loader.md index 88fd126c..d8d4b303 100644 --- a/docs/modules/loaders_repository_loader.md +++ b/docs/modules/loaders_repository_loader.md @@ -30,7 +30,7 @@ Load all custom repositories that override @medusajs instance entities. #### Defined in -[src/loaders/repository.loader.ts:37](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/loaders/repository.loader.ts#L37) +[src/loaders/repository.loader.ts:37](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/loaders/repository.loader.ts#L37) ___ @@ -54,4 +54,4 @@ Load all custom repositories into the underlying @medusajs instance. #### Defined in -[src/loaders/repository.loader.ts:14](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/loaders/repository.loader.ts#L14) +[src/loaders/repository.loader.ts:14](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/loaders/repository.loader.ts#L14) diff --git a/docs/modules/loaders_services_loader.md b/docs/modules/loaders_services_loader.md index 75f1f167..727378c4 100644 --- a/docs/modules/loaders_services_loader.md +++ b/docs/modules/loaders_services_loader.md @@ -30,7 +30,7 @@ #### Defined in -[src/loaders/services.loader.ts:55](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/loaders/services.loader.ts#L55) +[src/loaders/services.loader.ts:55](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/loaders/services.loader.ts#L55) ___ @@ -52,7 +52,7 @@ ___ #### Defined in -[src/loaders/services.loader.ts:40](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/loaders/services.loader.ts#L40) +[src/loaders/services.loader.ts:40](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/loaders/services.loader.ts#L40) ___ @@ -75,4 +75,4 @@ Load all custom services and overridden services into the underlying @medusajs i #### Defined in -[src/loaders/services.loader.ts:12](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/loaders/services.loader.ts#L12) +[src/loaders/services.loader.ts:12](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/loaders/services.loader.ts#L12) diff --git a/docs/modules/loaders_store_api_loader.md b/docs/modules/loaders_store_api_loader.md index 0e7b6492..e569f19d 100644 --- a/docs/modules/loaders_store_api_loader.md +++ b/docs/modules/loaders_store_api_loader.md @@ -31,4 +31,4 @@ Apply middlewares and routes on store API. #### Defined in -[src/loaders/store-api.loader.ts:13](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/loaders/store-api.loader.ts#L13) +[src/loaders/store-api.loader.ts:13](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/loaders/store-api.loader.ts#L13) diff --git a/docs/modules/loaders_validators_loader.md b/docs/modules/loaders_validators_loader.md index 8dcc597e..c290689e 100644 --- a/docs/modules/loaders_validators_loader.md +++ b/docs/modules/loaders_validators_loader.md @@ -29,4 +29,4 @@ Load all custom extended validators into the underlying @medusajs instance. #### Defined in -[src/loaders/validators.loader.ts:11](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/loaders/validators.loader.ts#L11) +[src/loaders/validators.loader.ts:11](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/loaders/validators.loader.ts#L11) diff --git a/docs/modules/modules_monitoring.md b/docs/modules/modules_monitoring.md index e42a84ba..ba07e36f 100644 --- a/docs/modules/modules_monitoring.md +++ b/docs/modules/modules_monitoring.md @@ -31,4 +31,4 @@ #### Defined in -[src/modules/monitoring.ts:25](https://github.com/adrien2p/medusa-extender/blob/37cc0bb/src/modules/monitoring.ts#L25) +[src/modules/monitoring.ts:25](https://github.com/adrien2p/medusa-extender/blob/a04f7cb/src/modules/monitoring.ts#L25) diff --git a/documentation/01-getting-started.md b/documentation/01-getting-started.md index 166fb8e9..2903bc3a 100644 --- a/documentation/01-getting-started.md +++ b/documentation/01-getting-started.md @@ -10,85 +10,7 @@ Run the following command in your terminal (The last version is {{ pkg.version } ```bash npm install {{ pkg.name }} -``` - -To benefit from all the features that the extender offers you, the usage of typescript is recommended. - -Then let's create the `tsconfig.json` configuration - -```bash -npm i -D typescript -echo '{ - "compilerOptions": { - "module": "CommonJS", - "declaration": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "allowSyntheticDefaultImports": true, - "moduleResolution": "node", - "target": "es2017", - "sourceMap": true, - "skipLibCheck": true, - "allowJs": true, - "outDir": "dist", - "rootDir": "src", - "esModuleInterop": true - }, - "include": [ - "src" - ], - "exclude": [ - "dist", - "node_modules", - "**/*.spec.ts" - ] -}' > tsconfig.json -``` - -update the scripts in your `package.json` - -```json -{ - "scripts": { - "build": "rm -rf dist && tsc", - "start": "npm run build && node dist/main.js" - } -} -``` - -add a main file in the `src` directory - -```typescript -// src/main.ts - -import express = require('express'); -import { Medusa } from 'medusa-extender'; -import { resolve } from 'path'; - -async function bootstrap() { - const expressInstance = express(); - - const rootDir = resolve(__dirname, '..'); - await new Medusa(rootDir, expressInstance).load([]); - - expressInstance.listen(9000, () => { - console.info('Server successfully started on port 9000'); - }); -} - -bootstrap(); -``` - -And finally update the `develop.sh` script with the following - -```bash -#!/bin/bash - -#Run migrations to ensure the database is updated -medusa migrations run - -#Start development environment -npm run start +./node_modules/.bin/medex init ``` That's it, you are now ready to run your server :rocket: diff --git a/documentation/02-api-documentation.md b/documentation/02-api-documentation.md index b48b3bb6..89e48ab2 100644 --- a/documentation/02-api-documentation.md +++ b/documentation/02-api-documentation.md @@ -575,4 +575,14 @@ To usage is easy and can be seen [here](#onmedusaentityevent). This utility is mandatory when you extend an existing repository. Since that to be able to work the repository must extend multiple classes in order to reflect the original repository -and the custom extension that you've made. The usage is easy and can be seen [here](#repository). \ No newline at end of file +and the custom extension that you've made. The usage is easy and can be seen [here](#repository). + +### Omit + +The `Omit` utility allows you to omit a set of properties from a class. +In some cases, extending a class to change the type of a property makes +typescript complains about the typings. In such cases, omitting the parent +property in order to re-create it with your own type in the child class. + +> ATTENTION!! This usage must be done carefully to avoid to break things without +> noticing it. \ No newline at end of file diff --git a/documentation/_README_BUILT.md b/documentation/_README_BUILT.md index 6e28ee15..17ef7991 100644 --- a/documentation/_README_BUILT.md +++ b/documentation/_README_BUILT.md @@ -78,6 +78,7 @@ * [Utilities :wrench:](#utilities-wrench) * [attachOrReplaceEntitySubscriber](#attachorreplaceentitysubscriber) * [repositoryMixin](#repositorymixin) + * [Omit](#omit) * [Starters](#starters) * [Internal modules](#internal-modules) * [Monitoring](#monitoring) @@ -115,85 +116,7 @@ Run the following command in your terminal (The last version is 1.5.5) ```bash npm install medusa-extender -``` - -To benefit from all the features that the extender offers you, the usage of typescript is recommended. - -Then let's create the `tsconfig.json` configuration - -```bash -npm i -D typescript -echo '{ - "compilerOptions": { - "module": "CommonJS", - "declaration": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "allowSyntheticDefaultImports": true, - "moduleResolution": "node", - "target": "es2017", - "sourceMap": true, - "skipLibCheck": true, - "allowJs": true, - "outDir": "dist", - "rootDir": "src", - "esModuleInterop": true - }, - "include": [ - "src" - ], - "exclude": [ - "dist", - "node_modules", - "**/*.spec.ts" - ] -}' > tsconfig.json -``` - -update the scripts in your `package.json` - -```json -{ - "scripts": { - "build": "rm -rf dist && tsc", - "start": "npm run build && node dist/main.js" - } -} -``` - -add a main file in the `src` directory - -```typescript -// src/main.ts - -import express = require('express'); -import { Medusa } from 'medusa-extender'; -import { resolve } from 'path'; - -async function bootstrap() { - const expressInstance = express(); - - const rootDir = resolve(__dirname, '..'); - await new Medusa(rootDir, expressInstance).load([]); - - expressInstance.listen(9000, () => { - console.info('Server successfully started on port 9000'); - }); -} - -bootstrap(); -``` - -And finally update the `develop.sh` script with the following - -```bash -#!/bin/bash - -#Run migrations to ensure the database is updated -medusa migrations run - -#Start development environment -npm run start +./node_modules/.bin/medex init ``` That's it, you are now ready to run your server :rocket: @@ -969,6 +892,16 @@ To usage is easy and can be seen [here](#onmedusaentityevent). This utility is mandatory when you extend an existing repository. Since that to be able to work the repository must extend multiple classes in order to reflect the original repository and the custom extension that you've made. The usage is easy and can be seen [here](#repository). + +### Omit + +The `Omit` utility allows you to omit a set of properties from a class. +In some cases, extending a class to change the type of a property makes +typescript complains about the typings. In such cases, omitting the parent +property in order to re-create it with your own type in the child class. + +> ATTENTION!! This usage must be done carefully to avoid to break things without +> noticing it. [![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/cloudy.png)](#starters)