chore(medusa-cli): Cleanup plugin setup (#4420)

* chore(medusa-cli): Cleanup plugin setup

* fix: logger types

* fix event bus local

* fix event bus redis

* Create late-dragons-collect.md

* move to ts

* remove unused command

* env

* fix
This commit is contained in:
Adrien de Peretti
2023-06-28 16:37:25 +02:00
committed by GitHub
parent fe25c8a91f
commit 6f1fa244fa
32 changed files with 244 additions and 521 deletions
+14 -5
View File
@@ -1,7 +1,6 @@
import { CommonTypes } from "@medusajs/types"
import { Request } from "express"
import { MedusaContainer as coreMedusaContainer } from "medusa-core-utils"
import { Logger as _Logger } from "winston"
import { Customer, User } from "../models"
import { FindConfig, RequestQueryFields } from "./common"
@@ -31,10 +30,20 @@ export type ClassConstructor<T> = {
export type MedusaContainer = coreMedusaContainer
export type Logger = _Logger & {
progress: (activityId: string, msg: string) => void
info: (msg: string) => void
warn: (msg: string) => void
export type Logger = {
panic: (data) => void
shouldLog: (level: string) => void
setLogLevel: (level: string) => void
unsetLogLevel: () => void
activity: (message: string, config?) => void
progress: (activityId, message) => void
error: (messageOrError, error?) => void
failure: (activityId, message) => void
success: (activityId, message) => void
debug: (message) => void
info: (message) => void
warn: (message) => void
log: (...args) => void
}
export type Constructor<T> = new (...args: any[]) => T