index.d.ts 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. import type { CompilerSystem, Logger } from '../../internal/index';
  2. /**
  3. * Creates a "logger", based off of NodeJS APIs, that will be used by the compiler and dev-server.
  4. * The NodeJS "process" object must be provided as a property in the first argument's object.
  5. * @returns a {@link Logger} object
  6. */
  7. export declare function createNodeLogger(): Logger;
  8. /**
  9. * Creates a "logger", based off of NodeJS APIs, that will be used by the compiler and dev-server.
  10. * The NodeJS "process" object must be provided as a property in the first argument's object.
  11. * @param c an object containing a `Process` for Stencil to use and a logger instanced created by {@link createNodeLogger}
  12. * @returns a {@link Logger} object
  13. * @deprecated Use {@link createNodeLogger} without parameters instead
  14. */
  15. export declare function createNodeLogger(c: {
  16. process: any;
  17. }): Logger;
  18. /**
  19. * Creates the "system", based off of NodeJS APIs, used by the compiler. This includes any and
  20. * all file system reads and writes using NodeJS. The compiler itself is unaware of Node's
  21. * `fs` module. Other system APIs include any use of `crypto` to hash content. The NodeJS
  22. * "process" object must be provided as a property in the first argument's object.
  23. * @param c an object containing a `Process` for Stencil to use and a logger instanced created by {@link createNodeLogger}
  24. * @returns a {@link CompilerSystem} object
  25. */
  26. export declare function createNodeSys(c: {
  27. process?: any;
  28. logger?: any;
  29. }): CompilerSystem;
  30. /**
  31. * Sets up the NodeJS process to be used by Stencil. This includes setting up the process's
  32. * `exit` and `uncaughtException` events to be handled by Stencil's logger.
  33. * @param c an object containing a `Process` for Stencil to use and a logger instanced created by {@link createNodeLogger}
  34. */
  35. export declare function setupNodeProcess(c: {
  36. process: any;
  37. logger: Logger;
  38. }): void;
  39. export { CompilerSystem, Logger };