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:
committed by
GitHub
parent
fe25c8a91f
commit
6f1fa244fa
@@ -8,3 +8,4 @@ export * as SearchTypes from "./search"
|
||||
export * as StockLocationTypes from "./stock-location"
|
||||
export * as TransactionBaseTypes from "./transaction-base"
|
||||
export * as DAL from "./dal"
|
||||
export * as LoggerTypes from "./logger"
|
||||
|
||||
@@ -11,3 +11,4 @@ export * from "./shared-context"
|
||||
export * from "./stock-location"
|
||||
export * from "./transaction-base"
|
||||
export * from "./dal"
|
||||
export * from "./logger"
|
||||
|
||||
15
packages/types/src/logger/index.ts
Normal file
15
packages/types/src/logger/index.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
export interface 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
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Logger as _Logger } from "winston"
|
||||
import { MedusaContainer } from "../common/medusa-container"
|
||||
import { MedusaContainer } from "../common"
|
||||
import { Logger } from "../logger"
|
||||
|
||||
export type Constructor<T> = new (...args: any[]) => T
|
||||
export * from "../common/medusa-container"
|
||||
@@ -14,12 +14,6 @@ export type LogLevel =
|
||||
| "migration"
|
||||
export type LoggerOptions = boolean | "all" | LogLevel[]
|
||||
|
||||
export type Logger = _Logger & {
|
||||
progress: (activityId: string, msg: string) => void
|
||||
info: (msg: string) => void
|
||||
warn: (msg: string) => void
|
||||
}
|
||||
|
||||
export enum MODULE_SCOPE {
|
||||
INTERNAL = "internal",
|
||||
EXTERNAL = "external",
|
||||
|
||||
Reference in New Issue
Block a user