feat(medusa): Module Resolution API (#2597)

This commit is contained in:
Oliver Windall Juhl
2022-11-20 22:01:46 +01:00
committed by GitHub
parent e09f6e8a1e
commit d7997ef256
20 changed files with 209 additions and 21 deletions
@@ -26,6 +26,8 @@ class Telemeter {
this.queueCount_ = this.store_.getQueueCount()
this.featureFlags_ = new Set()
this.modules_ = new Set()
this.plugins_ = []
}
getMachineId() {
@@ -133,6 +135,8 @@ class Telemeter {
medusa_version: this.getMedusaVersion(),
cli_version: this.getCliVersion(),
feature_flags: Array.from(this.featureFlags_),
modules: Array.from(this.modules_),
plugins: this.plugins_,
}
this.store_.addEvent(event)
@@ -161,6 +165,18 @@ class Telemeter {
this.featureFlags_.add(flag)
}
}
trackModule(module) {
if (module) {
this.modules_.add(module)
}
}
trackPlugin(plugin) {
if (plugin) {
this.plugins_.push(plugin)
}
}
}
export default Telemeter