senecajs / seneca

A microservices toolkit for Node.js.
http://senecajs.org
MIT License
3.95k stars 314 forks source link

Plugin namespace conflict #914

Open vitorclelis96 opened 1 year ago

vitorclelis96 commented 1 year ago

When using the debug plugin, it's namespace will conflict with seneca definition types and it's configuration parameters will get inject with new parameters.

Seneca debug namespace:

debug?: {
      // Throw (some) errors from seneca.act.
      fragile?:    boolean | undefined;
      // Fatal errors ... aren't fatal. Not for production!
      undead?:     boolean | undefined;
      // Print debug info to console
      print?: {
          // Print options. Best used via --seneca.print.options.
          options?: boolean | undefined;
      } | undefined;
      // Trace action caller and place in args.caller$.
      act_caller?: boolean | undefined;
      // Shorten all identifiers to 2 characters.
      short_logs?: boolean | undefined;
      // Record and log callpoints (calling code locations).
      callpoint?: boolean | undefined;
  } | undefined;

Those parameters will get injected in the debug config parameters if you boot it like this:

seneca.use('debug', { ...myParams })