This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async function loadInternalModule(loadOptions) { | |
| try { | |
| // FUNCTION BREADCRUMB: loadInternalModule() | |
| // | |
| // INPUT: | |
| // loadOptions = { | |
| // container: AiminaabeeContainer, // Parent DI container (Awilix container instance) | |
| // resolution: ModuleResolution, // Module config object with path, options, dependencies |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //-------------------------------Function explanation----------------------------------------- | |
| export function defineLink( | |
| leftService: DefineLinkInputSource | DefineReadOnlyLinkInputSource, | |
| // StoreModule.linkable.store (CombinedSource with toJSON method) | |
| rightService: DefineLinkInputSource | DefineReadOnlyLinkInputSource, | |
| // { linkable: ProductModule.linkable.product, isList: true } (InputOptions) | |
| linkServiceOptions?: ExtraOptions | ReadOnlyExtraOptions | |
| // { database: { table: "store_product", idPrefix: "strprod" } } | |
| ): DefineLinkExport { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const initialize = async ( | |
| options?: ModuleServiceInitializeOptions | ..., | |
| pluginLinksDefinitions?: ModuleJoinerConfig[], | |
| injectedDependencies?: InitializeModuleInjectableDependencies | |
| ): Promise<{ [link: string]: ILinkModule }> => { | |
| // Accumulator object that will store all initialized link modules | |
| // Keys are service names (e.g., 'store_product'), values are ILinkModule instances | |
| const allLinks = {} | |
| /* | |
| allLinks: { |
OlderNewer