Implement config loader. Every config property can be either an instance or a sync/async constructor of an instance. This allows users to instantiate asynchronously.
Config uses flat config style of eslintrc.
Create ingest-mongodb-public npm project that defines the standard MongoDB docs chatbot data sources config
Move everything configurable from CLI command files to config
Change "EmbedFunc" function to "Embedder" object (with embed() method) - this allows us to differentiate between a constructor and a constructed embed func in the config object. We can also decorate the object with more properties later if needed (ignore that technically you can do this with a function too in JS)
Notes
ingest-mongodb-public will need to be the new ingest on cron
TODO
[x] Implement config cleanup call in the finally blocks of withConfig()
[x] Update cron to use ingest-mongodb-public instead of ingest
Jira: https://jira.mongodb.org/browse/DOCSP-33727
Changes
embed()
method) - this allows us to differentiate between a constructor and a constructed embed func in the config object. We can also decorate the object with more properties later if needed (ignore that technically you can do this with a function too in JS)Notes
TODO
withConfig()
Future Scope